[Midnightbsd-cvs] src [6720] vendor/perl/dist: Perl 5.18.2
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Aug 27 07:27:42 EDT 2014
Revision: 6720
http://svnweb.midnightbsd.org/src/?rev=6720
Author: laffer1
Date: 2014-08-27 07:27:40 -0400 (Wed, 27 Aug 2014)
Log Message:
-----------
Perl 5.18.2
Modified Paths:
--------------
vendor/perl/dist/AUTHORS
vendor/perl/dist/Cross/config.sh-arm-linux
vendor/perl/dist/Cross/config.sh-arm-linux-n770
vendor/perl/dist/INSTALL
vendor/perl/dist/MANIFEST
vendor/perl/dist/META.json
vendor/perl/dist/META.yml
vendor/perl/dist/Makefile.SH
vendor/perl/dist/NetWare/Makefile
vendor/perl/dist/NetWare/config_H.wc
vendor/perl/dist/Porting/cmpVERSION.pl
vendor/perl/dist/Porting/config.sh
vendor/perl/dist/Porting/config_H
vendor/perl/dist/Porting/perldelta_template.pod
vendor/perl/dist/Porting/todo.pod
vendor/perl/dist/README
vendor/perl/dist/README.haiku
vendor/perl/dist/README.macosx
vendor/perl/dist/README.os2
vendor/perl/dist/README.vms
vendor/perl/dist/dist/Module-CoreList/Changes
vendor/perl/dist/dist/Module-CoreList/MANIFEST
vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm
vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList/Utils.pm
vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList.pm
vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList.pod
vendor/perl/dist/ext/B/B/Concise.pm
vendor/perl/dist/ext/B/B.pm
vendor/perl/dist/ext/B/B.xs
vendor/perl/dist/ext/B/t/b.t
vendor/perl/dist/ext/B/t/concise.t
vendor/perl/dist/ext/File-Glob/Glob.pm
vendor/perl/dist/ext/File-Glob/Glob.xs
vendor/perl/dist/ext/SDBM_File/Makefile.PL
vendor/perl/dist/gv.c
vendor/perl/dist/hints/catamount.sh
vendor/perl/dist/hv.h
vendor/perl/dist/intrpvar.h
vendor/perl/dist/lib/English.pm
vendor/perl/dist/op.c
vendor/perl/dist/patchlevel.h
vendor/perl/dist/perlio.c
vendor/perl/dist/plan9/config.plan9
vendor/perl/dist/plan9/config_sh.sample
vendor/perl/dist/pod/perl.pod
vendor/perl/dist/pod/perl5180delta.pod
vendor/perl/dist/pod/perldelta.pod
vendor/perl/dist/pod/perlhack.pod
vendor/perl/dist/pod/perlhist.pod
vendor/perl/dist/pod/perlrepository.pod
vendor/perl/dist/pp_ctl.c
vendor/perl/dist/pp_hot.c
vendor/perl/dist/regcomp.c
vendor/perl/dist/sv.c
vendor/perl/dist/t/comp/parser.t
vendor/perl/dist/t/mro/basic.t
vendor/perl/dist/t/op/method.t
vendor/perl/dist/t/op/negate.t
vendor/perl/dist/t/porting/known_pod_issues.dat
vendor/perl/dist/t/re/overload.t
vendor/perl/dist/t/re/pat.t
vendor/perl/dist/t/re/re_tests
vendor/perl/dist/t/re/reg_pmod.t
vendor/perl/dist/toke.c
vendor/perl/dist/vms/descrip_mms.template
vendor/perl/dist/vms/vms.c
vendor/perl/dist/win32/Makefile
vendor/perl/dist/win32/makefile.mk
vendor/perl/dist/win32/pod.mak
Added Paths:
-----------
vendor/perl/dist/dist/Module-CoreList/t/is_core.t
vendor/perl/dist/ext/File-Glob/t/threads.t
vendor/perl/dist/pod/perl5181delta.pod
Removed Paths:
-------------
vendor/perl/dist/Porting/checkARGS_ASSERT.pl
vendor/perl/dist/Porting/curliff.pl
vendor/perl/dist/Porting/findvars
vendor/perl/dist/Porting/fixCORE
vendor/perl/dist/Porting/fixvars
vendor/perl/dist/Porting/genlog
vendor/perl/dist/Porting/mergelog
vendor/perl/dist/Porting/mergelog-tool
vendor/perl/dist/cpan/Compress-Raw-Bzip2/pod/
vendor/perl/dist/cpan/Compress-Raw-Zlib/pod/
vendor/perl/dist/cpan/Devel-DProf/
vendor/perl/dist/cpan/Digest-SHA/src/hmac.c
vendor/perl/dist/cpan/Digest-SHA/src/hmac.h
vendor/perl/dist/cpan/Digest-SHA/src/hmacxtra.c
vendor/perl/dist/cpan/Digest-SHA/src/shaxtra.c
vendor/perl/dist/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/YAML.pm
vendor/perl/dist/cpan/File-Temp/Temp.pm
vendor/perl/dist/cpan/Getopt-Long/t/gol-compat.t
vendor/perl/dist/cpan/HTTP-Tiny/t/120_put.t
vendor/perl/dist/cpan/IO-Compress/pod/
vendor/perl/dist/cpan/List-Util/XS.pp
vendor/perl/dist/cpan/List-Util/lib/List/Util/PP.pm
vendor/perl/dist/cpan/List-Util/lib/Scalar/Util/
vendor/perl/dist/cpan/List-Util/t/expfail.t
vendor/perl/dist/cpan/List-Util/t/p_00version.t
vendor/perl/dist/cpan/List-Util/t/p_blessed.t
vendor/perl/dist/cpan/List-Util/t/p_first.t
vendor/perl/dist/cpan/List-Util/t/p_lln.t
vendor/perl/dist/cpan/List-Util/t/p_max.t
vendor/perl/dist/cpan/List-Util/t/p_maxstr.t
vendor/perl/dist/cpan/List-Util/t/p_min.t
vendor/perl/dist/cpan/List-Util/t/p_minstr.t
vendor/perl/dist/cpan/List-Util/t/p_openhan.t
vendor/perl/dist/cpan/List-Util/t/p_readonly.t
vendor/perl/dist/cpan/List-Util/t/p_reduce.t
vendor/perl/dist/cpan/List-Util/t/p_refaddr.t
vendor/perl/dist/cpan/List-Util/t/p_reftype.t
vendor/perl/dist/cpan/List-Util/t/p_shuffle.t
vendor/perl/dist/cpan/List-Util/t/p_sum.t
vendor/perl/dist/cpan/List-Util/t/p_tainted.t
vendor/perl/dist/cpan/Locale-Codes/lib/Locale/Constants.pm
vendor/perl/dist/cpan/Locale-Codes/lib/Locale/Constants.pod
vendor/perl/dist/cpan/Module-Load-Conditional/t/02_Parse_Version.t
vendor/perl/dist/cpan/Perl-OSType/t/00-compile.t
vendor/perl/dist/cpan/Pod-Parser/lib/Pod/Checker.pm
vendor/perl/dist/cpan/Pod-Parser/lib/Pod/Usage.pm
vendor/perl/dist/cpan/Pod-Parser/scripts/pod2usage.PL
vendor/perl/dist/cpan/Pod-Parser/scripts/podchecker.PL
vendor/perl/dist/cpan/Pod-Parser/t/pod/p2u_data.pl
vendor/perl/dist/cpan/Pod-Parser/t/pod/pod2usage.t
vendor/perl/dist/cpan/Pod-Parser/t/pod/pod2usage.xr
vendor/perl/dist/cpan/Pod-Parser/t/pod/pod2usage2.t
vendor/perl/dist/cpan/Pod-Parser/t/pod/podchkenc.t
vendor/perl/dist/cpan/Pod-Parser/t/pod/podchkenc.xr
vendor/perl/dist/cpan/Pod-Parser/t/pod/poderrs.t
vendor/perl/dist/cpan/Pod-Parser/t/pod/poderrs.xr
vendor/perl/dist/cpan/Pod-Parser/t/pod/usage.pod
vendor/perl/dist/cpan/Pod-Parser/t/pod/usage2.pod
vendor/perl/dist/cpan/Shell/
vendor/perl/dist/cpan/Tie-File/
vendor/perl/dist/cpan/Time-HiRes/t/HiRes.t
vendor/perl/dist/cpan/Unicode-Collate/Collate/Locale/sw.pl
vendor/perl/dist/cpan/Version-Requirements/
vendor/perl/dist/dist/Attribute-Handlers/README
vendor/perl/dist/dist/B-Lint/
vendor/perl/dist/dist/ExtUtils-ParseXS/t/basic.t
vendor/perl/dist/dist/ExtUtils-ParseXS/t/more.t
vendor/perl/dist/dist/ExtUtils-ParseXS/t/usage.t
vendor/perl/dist/dist/File-CheckTree/
vendor/perl/dist/dist/Pod-Perldoc/
vendor/perl/dist/ext/Attribute-Handlers/
vendor/perl/dist/ext/B/B/Debug.pm
vendor/perl/dist/ext/B/B/Deparse.pm
vendor/perl/dist/ext/B/B/Lint/
vendor/perl/dist/ext/B/B/Lint.pm
vendor/perl/dist/ext/B/defsubs_h.PL
vendor/perl/dist/ext/B/t/debug.t
vendor/perl/dist/ext/B/t/deparse.t
vendor/perl/dist/ext/B/t/lint.t
vendor/perl/dist/ext/B/t/pluglib/
vendor/perl/dist/ext/Compress/
vendor/perl/dist/ext/Compress-Raw-Bzip2/
vendor/perl/dist/ext/Compress-Raw-Zlib/
vendor/perl/dist/ext/Cwd/
vendor/perl/dist/ext/DB_File/
vendor/perl/dist/ext/Data/
vendor/perl/dist/ext/Data-Dumper/
vendor/perl/dist/ext/Devel/
vendor/perl/dist/ext/Devel-DProf/
vendor/perl/dist/ext/Devel-PPPort/
vendor/perl/dist/ext/Digest/
vendor/perl/dist/ext/Digest-MD5/
vendor/perl/dist/ext/Digest-SHA/
vendor/perl/dist/ext/DynaLoader/XSLoader_pm.PL
vendor/perl/dist/ext/DynaLoader/dl_beos.xs
vendor/perl/dist/ext/DynaLoader/dl_mac.xs
vendor/perl/dist/ext/DynaLoader/dl_mpeix.xs
vendor/perl/dist/ext/DynaLoader/dl_vmesa.xs
vendor/perl/dist/ext/DynaLoader/t/XSLoader.t
vendor/perl/dist/ext/Encode/
vendor/perl/dist/ext/File/
vendor/perl/dist/ext/Filter/
vendor/perl/dist/ext/Filter-Util-Call/
vendor/perl/dist/ext/Hash/
vendor/perl/dist/ext/Hash-Util-FieldHash/t/10_hash.t
vendor/perl/dist/ext/I18N/
vendor/perl/dist/ext/I18N-Langinfo/fallback/
vendor/perl/dist/ext/IO/
vendor/perl/dist/ext/IO-Compress/
vendor/perl/dist/ext/IO_Compress_Base/
vendor/perl/dist/ext/IO_Compress_Zlib/
vendor/perl/dist/ext/IPC/
vendor/perl/dist/ext/IPC-Open2/
vendor/perl/dist/ext/IPC-SysV/
vendor/perl/dist/ext/List/
vendor/perl/dist/ext/List-Util/
vendor/perl/dist/ext/MIME/
vendor/perl/dist/ext/MIME-Base64/
vendor/perl/dist/ext/Math/
vendor/perl/dist/ext/Math-BigInt-FastCalc/
vendor/perl/dist/ext/Module-Pluggable/
vendor/perl/dist/ext/Opcode/Makefile.PL
vendor/perl/dist/ext/Opcode/Safe.pm
vendor/perl/dist/ext/POSIX/POSIX.pm
vendor/perl/dist/ext/POSIX/POSIX.pod
vendor/perl/dist/ext/POSIX/hints/uts.pl
vendor/perl/dist/ext/PerlIO/
vendor/perl/dist/ext/Pod-Html/Html.pm
vendor/perl/dist/ext/Pod-Html/pod2html.PL
vendor/perl/dist/ext/Safe/
vendor/perl/dist/ext/Socket/
vendor/perl/dist/ext/Storable/
vendor/perl/dist/ext/Sys/
vendor/perl/dist/ext/Sys-Syslog/
vendor/perl/dist/ext/Test-Harness/
vendor/perl/dist/ext/Text/
vendor/perl/dist/ext/Text-Soundex/
vendor/perl/dist/ext/Time/
vendor/perl/dist/ext/Time-HiRes/
vendor/perl/dist/ext/Time-Piece/
vendor/perl/dist/ext/Unicode/
vendor/perl/dist/ext/Unicode-Normalize/
vendor/perl/dist/ext/Win32/
vendor/perl/dist/ext/Win32API/
vendor/perl/dist/ext/Win32API-File/
vendor/perl/dist/ext/XS/
vendor/perl/dist/ext/XS-Typemap/typemap
vendor/perl/dist/ext/attrs/
vendor/perl/dist/ext/mro/t/
vendor/perl/dist/ext/re/hints/
vendor/perl/dist/ext/threads/
vendor/perl/dist/ext/threads-shared/
vendor/perl/dist/ext/util/
vendor/perl/dist/hints/beos.sh
vendor/perl/dist/hints/machten.sh
vendor/perl/dist/hints/machten_2.sh
vendor/perl/dist/hints/mpeix.sh
vendor/perl/dist/hints/rhapsody.sh
vendor/perl/dist/hints/uts.sh
vendor/perl/dist/hints/vmesa.sh
vendor/perl/dist/lib/Archive/
vendor/perl/dist/lib/Attribute/
vendor/perl/dist/lib/AutoLoader/
vendor/perl/dist/lib/AutoLoader.pm
vendor/perl/dist/lib/AutoLoader.t
vendor/perl/dist/lib/AutoSplit.pm
vendor/perl/dist/lib/AutoSplit.t
vendor/perl/dist/lib/CGI/
vendor/perl/dist/lib/CGI.pm
vendor/perl/dist/lib/CPAN/
vendor/perl/dist/lib/CPAN.pm
vendor/perl/dist/lib/CPANPLUS/
vendor/perl/dist/lib/CPANPLUS.pm
vendor/perl/dist/lib/Carp/
vendor/perl/dist/lib/Carp.pm
vendor/perl/dist/lib/Carp.t
vendor/perl/dist/lib/Class/ISA/
vendor/perl/dist/lib/Class/ISA.pm
vendor/perl/dist/lib/Cwd.pm
vendor/perl/dist/lib/Devel/
vendor/perl/dist/lib/Digest/
vendor/perl/dist/lib/Digest.pm
vendor/perl/dist/lib/Dumpvalue.pm
vendor/perl/dist/lib/Dumpvalue.t
vendor/perl/dist/lib/Env/
vendor/perl/dist/lib/Env.pm
vendor/perl/dist/lib/ExtUtils/CBuilder/
vendor/perl/dist/lib/ExtUtils/CBuilder.pm
vendor/perl/dist/lib/ExtUtils/Command/
vendor/perl/dist/lib/ExtUtils/Command.pm
vendor/perl/dist/lib/ExtUtils/Constant/
vendor/perl/dist/lib/ExtUtils/Constant.pm
vendor/perl/dist/lib/ExtUtils/Install.pm
vendor/perl/dist/lib/ExtUtils/Installed.pm
vendor/perl/dist/lib/ExtUtils/Liblist/
vendor/perl/dist/lib/ExtUtils/Liblist.pm
vendor/perl/dist/lib/ExtUtils/MANIFEST.SKIP
vendor/perl/dist/lib/ExtUtils/MM.pm
vendor/perl/dist/lib/ExtUtils/MM_AIX.pm
vendor/perl/dist/lib/ExtUtils/MM_Any.pm
vendor/perl/dist/lib/ExtUtils/MM_BeOS.pm
vendor/perl/dist/lib/ExtUtils/MM_Cygwin.pm
vendor/perl/dist/lib/ExtUtils/MM_DOS.pm
vendor/perl/dist/lib/ExtUtils/MM_Darwin.pm
vendor/perl/dist/lib/ExtUtils/MM_MacOS.pm
vendor/perl/dist/lib/ExtUtils/MM_NW5.pm
vendor/perl/dist/lib/ExtUtils/MM_OS2.pm
vendor/perl/dist/lib/ExtUtils/MM_QNX.pm
vendor/perl/dist/lib/ExtUtils/MM_UWIN.pm
vendor/perl/dist/lib/ExtUtils/MM_Unix.pm
vendor/perl/dist/lib/ExtUtils/MM_VMS.pm
vendor/perl/dist/lib/ExtUtils/MM_VOS.pm
vendor/perl/dist/lib/ExtUtils/MM_Win32.pm
vendor/perl/dist/lib/ExtUtils/MM_Win95.pm
vendor/perl/dist/lib/ExtUtils/MY.pm
vendor/perl/dist/lib/ExtUtils/MakeMaker/
vendor/perl/dist/lib/ExtUtils/MakeMaker.pm
vendor/perl/dist/lib/ExtUtils/Manifest.pm
vendor/perl/dist/lib/ExtUtils/Mkbootstrap.pm
vendor/perl/dist/lib/ExtUtils/Mksymlists.pm
vendor/perl/dist/lib/ExtUtils/NOTES
vendor/perl/dist/lib/ExtUtils/PATCHING
vendor/perl/dist/lib/ExtUtils/Packlist.pm
vendor/perl/dist/lib/ExtUtils/ParseXS/
vendor/perl/dist/lib/ExtUtils/ParseXS.pm
vendor/perl/dist/lib/ExtUtils/README
vendor/perl/dist/lib/ExtUtils/TODO
vendor/perl/dist/lib/ExtUtils/instmodsh
vendor/perl/dist/lib/ExtUtils/t/00compile.t
vendor/perl/dist/lib/ExtUtils/t/Constant.t
vendor/perl/dist/lib/ExtUtils/t/FIRST_MAKEFILE.t
vendor/perl/dist/lib/ExtUtils/t/INST.t
vendor/perl/dist/lib/ExtUtils/t/INSTALL_BASE.t
vendor/perl/dist/lib/ExtUtils/t/INST_PREFIX.t
vendor/perl/dist/lib/ExtUtils/t/Install.t
vendor/perl/dist/lib/ExtUtils/t/InstallWithMM.t
vendor/perl/dist/lib/ExtUtils/t/Installapi2.t
vendor/perl/dist/lib/ExtUtils/t/Installed.t
vendor/perl/dist/lib/ExtUtils/t/Liblist.t
vendor/perl/dist/lib/ExtUtils/t/MM_Any.t
vendor/perl/dist/lib/ExtUtils/t/MM_BeOS.t
vendor/perl/dist/lib/ExtUtils/t/MM_Cygwin.t
vendor/perl/dist/lib/ExtUtils/t/MM_NW5.t
vendor/perl/dist/lib/ExtUtils/t/MM_OS2.t
vendor/perl/dist/lib/ExtUtils/t/MM_Unix.t
vendor/perl/dist/lib/ExtUtils/t/MM_VMS.t
vendor/perl/dist/lib/ExtUtils/t/MM_Win32.t
vendor/perl/dist/lib/ExtUtils/t/MakeMaker_Parameters.t
vendor/perl/dist/lib/ExtUtils/t/Manifest.t
vendor/perl/dist/lib/ExtUtils/t/Mkbootstrap.t
vendor/perl/dist/lib/ExtUtils/t/PL_FILES.t
vendor/perl/dist/lib/ExtUtils/t/Packlist.t
vendor/perl/dist/lib/ExtUtils/t/VERSION_FROM.t
vendor/perl/dist/lib/ExtUtils/t/WriteEmptyMakefile.t
vendor/perl/dist/lib/ExtUtils/t/arch_check.t
vendor/perl/dist/lib/ExtUtils/t/backwards.t
vendor/perl/dist/lib/ExtUtils/t/basic.t
vendor/perl/dist/lib/ExtUtils/t/build_man.t
vendor/perl/dist/lib/ExtUtils/t/bytes.t
vendor/perl/dist/lib/ExtUtils/t/can_write_dir.t
vendor/perl/dist/lib/ExtUtils/t/cd.t
vendor/perl/dist/lib/ExtUtils/t/config.t
vendor/perl/dist/lib/ExtUtils/t/cp.t
vendor/perl/dist/lib/ExtUtils/t/dir_target.t
vendor/perl/dist/lib/ExtUtils/t/eu_command.t
vendor/perl/dist/lib/ExtUtils/t/fix_libs.t
vendor/perl/dist/lib/ExtUtils/t/fixin.t
vendor/perl/dist/lib/ExtUtils/t/hints.t
vendor/perl/dist/lib/ExtUtils/t/installed_file.t
vendor/perl/dist/lib/ExtUtils/t/is_of_type.t
vendor/perl/dist/lib/ExtUtils/t/make.t
vendor/perl/dist/lib/ExtUtils/t/maketext_filter.t
vendor/perl/dist/lib/ExtUtils/t/metafile_data.t
vendor/perl/dist/lib/ExtUtils/t/metafile_file.t
vendor/perl/dist/lib/ExtUtils/t/min_perl_version.t
vendor/perl/dist/lib/ExtUtils/t/miniperl.t
vendor/perl/dist/lib/ExtUtils/t/oneliner.t
vendor/perl/dist/lib/ExtUtils/t/parse_version.t
vendor/perl/dist/lib/ExtUtils/t/pm.t
vendor/perl/dist/lib/ExtUtils/t/pm_to_blib.t
vendor/perl/dist/lib/ExtUtils/t/pod2man.t
vendor/perl/dist/lib/ExtUtils/t/postamble.t
vendor/perl/dist/lib/ExtUtils/t/prefixify.t
vendor/perl/dist/lib/ExtUtils/t/prereq.t
vendor/perl/dist/lib/ExtUtils/t/prereq_print.t
vendor/perl/dist/lib/ExtUtils/t/problems.t
vendor/perl/dist/lib/ExtUtils/t/prompt.t
vendor/perl/dist/lib/ExtUtils/t/recurs.t
vendor/perl/dist/lib/ExtUtils/t/revision.t
vendor/perl/dist/lib/ExtUtils/t/split_command.t
vendor/perl/dist/lib/ExtUtils/t/test_boilerplate.t
vendor/perl/dist/lib/ExtUtils/t/testdata/
vendor/perl/dist/lib/ExtUtils/t/testlib.t
vendor/perl/dist/lib/ExtUtils/t/writemakefile_args.t
vendor/perl/dist/lib/ExtUtils/t/xs.t
vendor/perl/dist/lib/ExtUtils/testlib.pm
vendor/perl/dist/lib/ExtUtils/xsubpp
vendor/perl/dist/lib/Fatal.pm
vendor/perl/dist/lib/Fatal.t
vendor/perl/dist/lib/File/CheckTree.pm
vendor/perl/dist/lib/File/CheckTree.t
vendor/perl/dist/lib/File/DosGlob.pm
vendor/perl/dist/lib/File/DosGlob.t
vendor/perl/dist/lib/File/Fetch/
vendor/perl/dist/lib/File/Fetch.pm
vendor/perl/dist/lib/File/Path.pm
vendor/perl/dist/lib/File/Path.t
vendor/perl/dist/lib/File/Spec/
vendor/perl/dist/lib/File/Spec.pm
vendor/perl/dist/lib/File/Temp/
vendor/perl/dist/lib/File/Temp.pm
vendor/perl/dist/lib/FileCache/
vendor/perl/dist/lib/FileCache.pm
vendor/perl/dist/lib/Filter/
vendor/perl/dist/lib/Getopt/Long/
vendor/perl/dist/lib/Getopt/Long.pm
vendor/perl/dist/lib/I18N/
vendor/perl/dist/lib/IO/
vendor/perl/dist/lib/IPC/
vendor/perl/dist/lib/Locale/
vendor/perl/dist/lib/Log/
vendor/perl/dist/lib/Math/
vendor/perl/dist/lib/Memoize/
vendor/perl/dist/lib/Memoize.pm
vendor/perl/dist/lib/Module/
vendor/perl/dist/lib/NEXT/
vendor/perl/dist/lib/NEXT.pm
vendor/perl/dist/lib/Net/Cmd.pm
vendor/perl/dist/lib/Net/Config.eg
vendor/perl/dist/lib/Net/Config.pm
vendor/perl/dist/lib/Net/Domain.pm
vendor/perl/dist/lib/Net/FTP/
vendor/perl/dist/lib/Net/FTP.pm
vendor/perl/dist/lib/Net/Hostname.pm.eg
vendor/perl/dist/lib/Net/NNTP.pm
vendor/perl/dist/lib/Net/Netrc.pm
vendor/perl/dist/lib/Net/POP3.pm
vendor/perl/dist/lib/Net/Ping/
vendor/perl/dist/lib/Net/Ping.pm
vendor/perl/dist/lib/Net/README
vendor/perl/dist/lib/Net/SMTP.pm
vendor/perl/dist/lib/Net/Time.pm
vendor/perl/dist/lib/Net/demos/
vendor/perl/dist/lib/Net/libnetFAQ.pod
vendor/perl/dist/lib/Net/t/
vendor/perl/dist/lib/Object/
vendor/perl/dist/lib/Package/
vendor/perl/dist/lib/Params/
vendor/perl/dist/lib/Parse/
vendor/perl/dist/lib/PerlIO/
vendor/perl/dist/lib/Pod/Checker.pm
vendor/perl/dist/lib/Pod/Escapes/
vendor/perl/dist/lib/Pod/Escapes.pm
vendor/perl/dist/lib/Pod/Find.pm
vendor/perl/dist/lib/Pod/Functions.pm
vendor/perl/dist/lib/Pod/Html.pm
vendor/perl/dist/lib/Pod/InputObjects.pm
vendor/perl/dist/lib/Pod/LaTeX.pm
vendor/perl/dist/lib/Pod/Man.pm
vendor/perl/dist/lib/Pod/ParseLink.pm
vendor/perl/dist/lib/Pod/ParseUtils.pm
vendor/perl/dist/lib/Pod/Parser.pm
vendor/perl/dist/lib/Pod/Perldoc/
vendor/perl/dist/lib/Pod/Perldoc.pm
vendor/perl/dist/lib/Pod/PlainText.pm
vendor/perl/dist/lib/Pod/Plainer.pm
vendor/perl/dist/lib/Pod/Select.pm
vendor/perl/dist/lib/Pod/Simple/
vendor/perl/dist/lib/Pod/Simple.pm
vendor/perl/dist/lib/Pod/Simple.pod
vendor/perl/dist/lib/Pod/Text/
vendor/perl/dist/lib/Pod/Text.pm
vendor/perl/dist/lib/Pod/Usage.pm
vendor/perl/dist/lib/Pod/t/Functions.t
vendor/perl/dist/lib/Pod/t/basic.cap
vendor/perl/dist/lib/Pod/t/basic.clr
vendor/perl/dist/lib/Pod/t/basic.man
vendor/perl/dist/lib/Pod/t/basic.ovr
vendor/perl/dist/lib/Pod/t/basic.pod
vendor/perl/dist/lib/Pod/t/basic.t
vendor/perl/dist/lib/Pod/t/basic.txt
vendor/perl/dist/lib/Pod/t/color.t
vendor/perl/dist/lib/Pod/t/contains_pod.t
vendor/perl/dist/lib/Pod/t/eol.t
vendor/perl/dist/lib/Pod/t/filehandle.t
vendor/perl/dist/lib/Pod/t/htmlescp.pod
vendor/perl/dist/lib/Pod/t/htmlescp.t
vendor/perl/dist/lib/Pod/t/htmllink.pod
vendor/perl/dist/lib/Pod/t/htmllink.t
vendor/perl/dist/lib/Pod/t/htmlview.pod
vendor/perl/dist/lib/Pod/t/htmlview.t
vendor/perl/dist/lib/Pod/t/man-options.t
vendor/perl/dist/lib/Pod/t/man-utf8.t
vendor/perl/dist/lib/Pod/t/man.t
vendor/perl/dist/lib/Pod/t/parselink.t
vendor/perl/dist/lib/Pod/t/pod-parser.t
vendor/perl/dist/lib/Pod/t/pod-spelling.t
vendor/perl/dist/lib/Pod/t/pod.t
vendor/perl/dist/lib/Pod/t/pod2html-lib.pl
vendor/perl/dist/lib/Pod/t/pod2latex.t
vendor/perl/dist/lib/Pod/t/termcap.t
vendor/perl/dist/lib/Pod/t/text-encoding.t
vendor/perl/dist/lib/Pod/t/text-options.t
vendor/perl/dist/lib/Pod/t/text-utf8.t
vendor/perl/dist/lib/Pod/t/text.t
vendor/perl/dist/lib/Pod/t/user.t
vendor/perl/dist/lib/Search/
vendor/perl/dist/lib/SelfLoader/
vendor/perl/dist/lib/SelfLoader-buggy.t
vendor/perl/dist/lib/SelfLoader.pm
vendor/perl/dist/lib/SelfLoader.t
vendor/perl/dist/lib/Shell.pm
vendor/perl/dist/lib/Shell.t
vendor/perl/dist/lib/Switch/
vendor/perl/dist/lib/Switch.pm
vendor/perl/dist/lib/Term/
vendor/perl/dist/lib/Test/
vendor/perl/dist/lib/Test.pm
vendor/perl/dist/lib/Text/
vendor/perl/dist/lib/Thread/
vendor/perl/dist/lib/Tie/File/
vendor/perl/dist/lib/Tie/File.pm
vendor/perl/dist/lib/Tie/Hash/
vendor/perl/dist/lib/Tie/Memoize.pm
vendor/perl/dist/lib/Tie/Memoize.t
vendor/perl/dist/lib/Tie/RefHash/
vendor/perl/dist/lib/Tie/RefHash.pm
vendor/perl/dist/lib/Time/Local.pm
vendor/perl/dist/lib/Time/Local.t
vendor/perl/dist/lib/Unicode/Collate/
vendor/perl/dist/lib/Unicode/Collate.pm
vendor/perl/dist/lib/abbrev.pl
vendor/perl/dist/lib/assert.pl
vendor/perl/dist/lib/attributes.pm
vendor/perl/dist/lib/autodie/
vendor/perl/dist/lib/autodie.pm
vendor/perl/dist/lib/autouse.pm
vendor/perl/dist/lib/autouse.t
vendor/perl/dist/lib/base/
vendor/perl/dist/lib/base.pm
vendor/perl/dist/lib/bigfloat.pl
vendor/perl/dist/lib/bigfloatpl.t
vendor/perl/dist/lib/bigint.pl
vendor/perl/dist/lib/bigint.pm
vendor/perl/dist/lib/bigintpl.t
vendor/perl/dist/lib/bignum/
vendor/perl/dist/lib/bignum.pm
vendor/perl/dist/lib/bigrat.pl
vendor/perl/dist/lib/bigrat.pm
vendor/perl/dist/lib/cacheout.pl
vendor/perl/dist/lib/complete.pl
vendor/perl/dist/lib/constant.pm
vendor/perl/dist/lib/constant.t
vendor/perl/dist/lib/ctime.pl
vendor/perl/dist/lib/dotsh.pl
vendor/perl/dist/lib/encoding/
vendor/perl/dist/lib/exceptions.pl
vendor/perl/dist/lib/fastcwd.pl
vendor/perl/dist/lib/fields.pm
vendor/perl/dist/lib/find.pl
vendor/perl/dist/lib/finddepth.pl
vendor/perl/dist/lib/flush.pl
vendor/perl/dist/lib/getcwd.pl
vendor/perl/dist/lib/getopt.pl
vendor/perl/dist/lib/getopts.pl
vendor/perl/dist/lib/hostname.pl
vendor/perl/dist/lib/if.pm
vendor/perl/dist/lib/if.t
vendor/perl/dist/lib/importenv.pl
vendor/perl/dist/lib/lib.t
vendor/perl/dist/lib/lib_pm.PL
vendor/perl/dist/lib/look.pl
vendor/perl/dist/lib/mro.pm
vendor/perl/dist/lib/newgetopt.pl
vendor/perl/dist/lib/open2.pl
vendor/perl/dist/lib/open3.pl
vendor/perl/dist/lib/parent/
vendor/perl/dist/lib/parent.pm
vendor/perl/dist/lib/pwd.pl
vendor/perl/dist/lib/shellwords.pl
vendor/perl/dist/lib/stat.pl
vendor/perl/dist/lib/syslog.pl
vendor/perl/dist/lib/tainted.pl
vendor/perl/dist/lib/termcap.pl
vendor/perl/dist/lib/timelocal.pl
vendor/perl/dist/lib/unicore/mktables.lst
vendor/perl/dist/lib/validate.pl
vendor/perl/dist/lib/version.t
vendor/perl/dist/pod/checkpods.PL
vendor/perl/dist/pod/perl5110delta.pod
vendor/perl/dist/pod/perl5111delta.pod
vendor/perl/dist/pod/perl5112delta.pod
vendor/perl/dist/pod/perl5113delta.pod
vendor/perl/dist/pod/perl5114delta.pod
vendor/perl/dist/pod/perl5115delta.pod
vendor/perl/dist/pod/perl5130delta.pod
vendor/perl/dist/pod/perl51310delta.pod
vendor/perl/dist/pod/perl51311delta.pod
vendor/perl/dist/pod/perl5131delta.pod
vendor/perl/dist/pod/perl5132delta.pod
vendor/perl/dist/pod/perl5133delta.pod
vendor/perl/dist/pod/perl5134delta.pod
vendor/perl/dist/pod/perl5135delta.pod
vendor/perl/dist/pod/perl5136delta.pod
vendor/perl/dist/pod/perl5137delta.pod
vendor/perl/dist/pod/perl5138delta.pod
vendor/perl/dist/pod/perl5139delta.pod
vendor/perl/dist/pod/perl570delta.pod
vendor/perl/dist/pod/perl571delta.pod
vendor/perl/dist/pod/perl572delta.pod
vendor/perl/dist/pod/perl573delta.pod
vendor/perl/dist/pod/perl590delta.pod
vendor/perl/dist/pod/perl591delta.pod
vendor/perl/dist/pod/perl592delta.pod
vendor/perl/dist/pod/perl593delta.pod
vendor/perl/dist/pod/perl594delta.pod
vendor/perl/dist/pod/perl595delta.pod
vendor/perl/dist/pod/perlapi.pod
vendor/perl/dist/pod/perlcompile.pod
vendor/perl/dist/pod/perldoc.pod
vendor/perl/dist/pod/perlfaq.pod
vendor/perl/dist/pod/perlfaq1.pod
vendor/perl/dist/pod/perlfaq2.pod
vendor/perl/dist/pod/perlfaq3.pod
vendor/perl/dist/pod/perlfaq4.pod
vendor/perl/dist/pod/perlfaq5.pod
vendor/perl/dist/pod/perlfaq6.pod
vendor/perl/dist/pod/perlfaq7.pod
vendor/perl/dist/pod/perlfaq8.pod
vendor/perl/dist/pod/perlfaq9.pod
vendor/perl/dist/pod/perlglossary.pod
vendor/perl/dist/pod/perlintern.pod
vendor/perl/dist/pod/perlmodlib.pod
vendor/perl/dist/pod/perlothrtut.pod
vendor/perl/dist/pod/perltoc.pod
vendor/perl/dist/pod/perlxs.pod
vendor/perl/dist/pod/perlxstut.pod
vendor/perl/dist/pod/pod2html.PL
vendor/perl/dist/pod/pod2latex.PL
vendor/perl/dist/pod/pod2man.PL
vendor/perl/dist/pod/pod2text.PL
vendor/perl/dist/pod/pod2usage.PL
vendor/perl/dist/pod/podchecker.PL
vendor/perl/dist/pod/podselect.PL
vendor/perl/dist/pod/roffitall
vendor/perl/dist/t/Module_Pluggable/
vendor/perl/dist/t/TestInit.pm
vendor/perl/dist/t/cmd/while.t
vendor/perl/dist/t/comp/cpp.aux
vendor/perl/dist/t/comp/cpp.t
vendor/perl/dist/t/comp/script.t
vendor/perl/dist/t/lib/Dev/
vendor/perl/dist/t/lib/Dummy.pm
vendor/perl/dist/t/lib/Filter/
vendor/perl/dist/t/lib/HasSigDie.pm
vendor/perl/dist/t/lib/MakeMaker/
vendor/perl/dist/t/lib/Math/
vendor/perl/dist/t/lib/NoExporter.pm
vendor/perl/dist/t/lib/Parse/
vendor/perl/dist/t/lib/Test/
vendor/perl/dist/t/lib/TieIn.pm
vendor/perl/dist/t/lib/TieOut.pm
vendor/perl/dist/t/lib/compress/
vendor/perl/dist/t/lib/contains_bad_pod.xr
vendor/perl/dist/t/lib/contains_pod.xr
vendor/perl/dist/t/lib/dprof/
vendor/perl/dist/t/lib/filter-util.pl
vendor/perl/dist/t/lib/manifest.t
vendor/perl/dist/t/lib/sample-tests/
vendor/perl/dist/t/op/arith.t
vendor/perl/dist/t/op/array_base.aux
vendor/perl/dist/t/op/cmp.t
vendor/perl/dist/t/op/concat.t
vendor/perl/dist/t/op/lc_user.t
vendor/perl/dist/t/op/magic_phase.t
vendor/perl/dist/t/op/pat.t
vendor/perl/dist/t/op/pat_thr.t
vendor/perl/dist/t/op/qq.t
vendor/perl/dist/t/op/qr_gc.t
vendor/perl/dist/t/op/qrstack.t
vendor/perl/dist/t/op/re.t
vendor/perl/dist/t/op/re_tests
vendor/perl/dist/t/op/reg_email.t
vendor/perl/dist/t/op/reg_email_thr.t
vendor/perl/dist/t/op/reg_fold.t
vendor/perl/dist/t/op/reg_mesg.t
vendor/perl/dist/t/op/reg_namedcapture.t
vendor/perl/dist/t/op/reg_nc_tie.t
vendor/perl/dist/t/op/reg_pmod.t
vendor/perl/dist/t/op/reg_posixcc.t
vendor/perl/dist/t/op/reg_unsafe.t
vendor/perl/dist/t/op/regexp.t
vendor/perl/dist/t/op/regexp_noamp.t
vendor/perl/dist/t/op/regexp_notrie.t
vendor/perl/dist/t/op/regexp_qr.t
vendor/perl/dist/t/op/regexp_qr_embed.t
vendor/perl/dist/t/op/regexp_qr_embed_thr.t
vendor/perl/dist/t/op/regexp_trielist.t
vendor/perl/dist/t/op/regexp_unicode_prop.t
vendor/perl/dist/t/op/regexp_unicode_prop_thr.t
vendor/perl/dist/t/op/rxcode.t
vendor/perl/dist/t/op/subst.t
vendor/perl/dist/t/op/substT.t
vendor/perl/dist/t/op/subst_amp.t
vendor/perl/dist/t/op/subst_wamp.t
vendor/perl/dist/t/op/turkish.t
vendor/perl/dist/t/op/while_readdir.t
vendor/perl/dist/t/pod/
vendor/perl/dist/t/porting/buildtoc.t
vendor/perl/dist/t/re/substr.t
vendor/perl/dist/t/re/substr_thr.t
vendor/perl/dist/t/run/switchPx.aux
vendor/perl/dist/t/run/switchPx.t
vendor/perl/dist/utils/dprofpp.PL
vendor/perl/dist/vms/sockadapt.c
vendor/perl/dist/vms/sockadapt.h
vendor/perl/dist/vos/syslog.h
vendor/perl/dist/win32/config.bc
vendor/perl/dist/win32/config.gc64
vendor/perl/dist/win32/config.gc64nox
vendor/perl/dist/win32/config.vc64
vendor/perl/dist/win32/config_H.bc
vendor/perl/dist/win32/config_H.gc64
vendor/perl/dist/win32/config_H.gc64nox
vendor/perl/dist/win32/config_H.vc64
vendor/perl/dist/win32/genmk95.pl
vendor/perl/dist/win32/mdelete.bat
vendor/perl/dist/win32/sync_ext.pl
Modified: vendor/perl/dist/AUTHORS
===================================================================
--- vendor/perl/dist/AUTHORS 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/AUTHORS 2014-08-27 11:27:40 UTC (rev 6720)
@@ -412,6 +412,7 @@
Goro Fuji <gfuji at cpan.org>
Grace Lee <grace at hal.com>
Graham Barr <gbarr at pobox.com>
+Graham Knop <haarg at haarg.org>
Graham TerMarsch <graham at howlingfrog.com>
Grant McLean <grantm at cpan.org>
Greg Bacon <gbacon at itsc.uah.edu>
Modified: vendor/perl/dist/Cross/config.sh-arm-linux
===================================================================
--- vendor/perl/dist/Cross/config.sh-arm-linux 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Cross/config.sh-arm-linux 2014-08-27 11:27:40 UTC (rev 6720)
@@ -34,10 +34,10 @@
api_revision='5'
api_subversion='0'
api_version='18'
-api_versionstring='5.18.1'
+api_versionstring='5.18.0'
ar='ar'
-archlib='/usr/lib/perl5/5.18.1/armv4l-linux'
-archlibexp='/usr/lib/perl5/5.18.1/armv4l-linux'
+archlib='/usr/lib/perl5/5.18.2/armv4l-linux'
+archlibexp='/usr/lib/perl5/5.18.2/armv4l-linux'
archname64=''
archname='armv4l-linux'
archobjs=''
@@ -56,7 +56,7 @@
cat='cat'
cc='cc'
cccdlflags='-fpic'
-ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.18.1/armv4l-linux/CORE'
+ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.18.2/armv4l-linux/CORE'
ccflags='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='arm-linux-gcc'
@@ -732,7 +732,7 @@
inc_version_list_init='0'
incpath=''
inews=''
-installarchlib='./install_me_here/usr/lib/perl5/5.18.1/armv4l-linux'
+installarchlib='./install_me_here/usr/lib/perl5/5.18.2/armv4l-linux'
installbin='./install_me_here/usr/bin'
installhtml1dir=''
installhtml3dir=''
@@ -740,13 +740,13 @@
installman3dir='./install_me_here/usr/share/man/man3'
installprefix='./install_me_here/usr'
installprefixexp='./install_me_here/usr'
-installprivlib='./install_me_here/usr/lib/perl5/5.18.1'
+installprivlib='./install_me_here/usr/lib/perl5/5.18.2'
installscript='./install_me_here/usr/bin'
-installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.18.1/armv4l-linux'
+installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.18.2/armv4l-linux'
installsitebin='./install_me_here/usr/bin'
installsitehtml1dir=''
installsitehtml3dir=''
-installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.18.1'
+installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.18.2'
installsiteman1dir='./install_me_here/usr/share/man/man1'
installsiteman3dir='./install_me_here/usr/share/man/man3'
installsitescript='./install_me_here/usr/bin'
@@ -875,8 +875,8 @@
pr=''
prefix='/usr'
prefixexp='/usr'
-privlib='/usr/lib/perl5/5.18.1'
-privlibexp='/usr/lib/perl5/5.18.1'
+privlib='/usr/lib/perl5/5.18.2'
+privlibexp='/usr/lib/perl5/5.18.2'
procselfexe='"/proc/self/exe"'
prototype='define'
ptrsize='4'
@@ -941,8 +941,8 @@
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0'
sig_size='68'
signal_t='void'
-sitearch='/usr/lib/perl5/site_perl/5.18.1/armv4l-linux'
-sitearchexp='/usr/lib/perl5/site_perl/5.18.1/armv4l-linux'
+sitearch='/usr/lib/perl5/site_perl/5.18.2/armv4l-linux'
+sitearchexp='/usr/lib/perl5/site_perl/5.18.2/armv4l-linux'
sitebin='/usr/bin'
sitebinexp='/usr/bin'
sitehtml1dir=''
@@ -949,9 +949,9 @@
sitehtml1direxp=''
sitehtml3dir=''
sitehtml3direxp=''
-sitelib='/usr/lib/perl5/site_perl/5.18.1'
+sitelib='/usr/lib/perl5/site_perl/5.18.2'
sitelib_stem='/usr/lib/perl5/site_perl'
-sitelibexp='/usr/lib/perl5/site_perl/5.18.1'
+sitelibexp='/usr/lib/perl5/site_perl/5.18.2'
siteman1dir='/usr/share/man/man1'
siteman1direxp='/usr/share/man/man1'
siteman3dir='/usr/share/man/man3'
@@ -990,7 +990,7 @@
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
-subversion='1'
+subversion='2'
sysman='/usr/share/man/man1'
tail=''
tar=''
@@ -1080,8 +1080,8 @@
vendorprefixexp=''
vendorscript=''
vendorscriptexp=''
-version='5.18.1'
-version_patchlevel_string='version 18 subversion 1'
+version='5.18.2'
+version_patchlevel_string='version 18 subversion 2'
versiononly='undef'
vi=''
voidflags='15'
@@ -1096,7 +1096,7 @@
config_argc=0
PERL_REVISION=5
PERL_VERSION=18
-PERL_SUBVERSION=1
+PERL_SUBVERSION=2
PERL_API_REVISION=5
PERL_API_VERSION=18
PERL_API_SUBVERSION=0
Modified: vendor/perl/dist/Cross/config.sh-arm-linux-n770
===================================================================
--- vendor/perl/dist/Cross/config.sh-arm-linux-n770 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Cross/config.sh-arm-linux-n770 2014-08-27 11:27:40 UTC (rev 6720)
@@ -34,10 +34,10 @@
api_revision='5'
api_subversion='0'
api_version='18'
-api_versionstring='5.18.1'
+api_versionstring='5.18.0'
ar='ar'
-archlib='/usr/lib/perl5/5.18.1/armv4l-linux'
-archlibexp='/usr/lib/perl5/5.18.1/armv4l-linux'
+archlib='/usr/lib/perl5/5.18.2/armv4l-linux'
+archlibexp='/usr/lib/perl5/5.18.2/armv4l-linux'
archname64=''
archname='armv4l-linux'
archobjs=''
@@ -55,7 +55,7 @@
cat='cat'
cc='arm-none-linux-gnueabi-gcc'
cccdlflags='-fpic'
-ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.18.1/armv4l-linux/CORE'
+ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.18.2/armv4l-linux/CORE'
ccflags='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='arm-linux-gcc'
@@ -703,7 +703,7 @@
inc_version_list_init='0'
incpath=''
inews=''
-installarchlib='./install_me_here/usr/lib/perl5/5.18.1/armv4l-linux'
+installarchlib='./install_me_here/usr/lib/perl5/5.18.2/armv4l-linux'
installbin='./install_me_here/usr/bin'
installhtml1dir=''
installhtml3dir=''
@@ -711,13 +711,13 @@
installman3dir='./install_me_here/usr/share/man/man3'
installprefix='./install_me_here/usr'
installprefixexp='./install_me_here/usr'
-installprivlib='./install_me_here/usr/lib/perl5/5.18.1'
+installprivlib='./install_me_here/usr/lib/perl5/5.18.2'
installscript='./install_me_here/usr/bin'
-installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.18.1/armv4l-linux'
+installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.18.2/armv4l-linux'
installsitebin='./install_me_here/usr/bin'
installsitehtml1dir=''
installsitehtml3dir=''
-installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.18.1'
+installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.18.2'
installsiteman1dir='./install_me_here/usr/share/man/man1'
installsiteman3dir='./install_me_here/usr/share/man/man3'
installsitescript='./install_me_here/usr/bin'
@@ -845,8 +845,8 @@
pr=''
prefix='/usr'
prefixexp='/usr'
-privlib='/usr/lib/perl5/5.18.1'
-privlibexp='/usr/lib/perl5/5.18.1'
+privlib='/usr/lib/perl5/5.18.2'
+privlibexp='/usr/lib/perl5/5.18.2'
procselfexe='"/proc/self/exe"'
prototype='define'
ptrsize='4'
@@ -907,8 +907,8 @@
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 17, 29, 31, 0'
sig_size='68'
signal_t='void'
-sitearch='/usr/lib/perl5/site_perl/5.18.1/armv4l-linux'
-sitearchexp='/usr/lib/perl5/site_perl/5.18.1/armv4l-linux'
+sitearch='/usr/lib/perl5/site_perl/5.18.2/armv4l-linux'
+sitearchexp='/usr/lib/perl5/site_perl/5.18.2/armv4l-linux'
sitebin='/usr/bin'
sitebinexp='/usr/bin'
sitehtml1dir=''
@@ -915,9 +915,9 @@
sitehtml1direxp=''
sitehtml3dir=''
sitehtml3direxp=''
-sitelib='/usr/lib/perl5/site_perl/5.18.1'
+sitelib='/usr/lib/perl5/site_perl/5.18.2'
sitelib_stem='/usr/lib/perl5/site_perl'
-sitelibexp='/usr/lib/perl5/site_perl/5.18.1'
+sitelibexp='/usr/lib/perl5/site_perl/5.18.2'
siteman1dir='/usr/share/man/man1'
siteman1direxp='/usr/share/man/man1'
siteman3dir='/usr/share/man/man3'
@@ -954,7 +954,7 @@
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
-subversion='1'
+subversion='2'
sysman='/usr/share/man/man1'
tail=''
tar=''
@@ -1040,8 +1040,8 @@
vendorprefixexp=''
vendorscript=''
vendorscriptexp=''
-version='5.18.1'
-version_patchlevel_string='version 18 subversion 1'
+version='5.18.2'
+version_patchlevel_string='version 18 subversion 2'
versiononly='undef'
vi=''
voidflags='15'
@@ -1056,7 +1056,7 @@
config_argc=0
PERL_REVISION=5
PERL_VERSION=18
-PERL_SUBVERSION=1
+PERL_SUBVERSION=2
PERL_API_REVISION=5
PERL_API_VERSION=18
PERL_API_SUBVERSION=0
Modified: vendor/perl/dist/INSTALL
===================================================================
--- vendor/perl/dist/INSTALL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/INSTALL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -563,7 +563,7 @@
=item Directories for the perl distribution
-By default, Configure will use the following directories for 5.18.1.
+By default, Configure will use the following directories for 5.18.2.
$version is the full perl version number, including subversion, e.g.
5.12.3, and $archname is a string like sun4-sunos,
determined by Configure. The full definitions of all Configure
@@ -2346,7 +2346,7 @@
=head1 Coexistence with earlier versions of perl 5
-Perl 5.18.1 is not binary compatible with earlier versions of Perl.
+Perl 5.18.2 is not binary compatible with earlier versions of Perl.
In other words, you will have to recompile your XS modules.
In general, you can usually safely upgrade from one version of Perl (e.g.
@@ -2420,9 +2420,9 @@
libraries after 5.6.0, but not for executables. TODO?) One convenient
way to do this is by using a separate prefix for each version, such as
- sh Configure -Dprefix=/opt/perl5.18.1
+ sh Configure -Dprefix=/opt/perl5.18.2
-and adding /opt/perl5.18.1/bin to the shell PATH variable. Such users
+and adding /opt/perl5.18.2/bin to the shell PATH variable. Such users
may also wish to add a symbolic link /usr/local/bin/perl so that
scripts can still start with #!/usr/local/bin/perl.
@@ -2437,11 +2437,11 @@
=head2 Upgrading from 5.17.11 or earlier
-B<Perl 5.18.1 may not be binary compatible with Perl 5.17.11 or
+B<Perl 5.18.2 may not be binary compatible with Perl 5.17.11 or
earlier Perl releases.> Perl modules having binary parts
(meaning that a C compiler is used) will have to be recompiled to be
-used with 5.18.1. If you find you do need to rebuild an extension with
-5.18.1, you may safely do so without disturbing the older
+used with 5.18.2. If you find you do need to rebuild an extension with
+5.18.2, you may safely do so without disturbing the older
installations. (See L<"Coexistence with earlier versions of perl 5">
above.)
@@ -2474,15 +2474,15 @@
print("$f\n");
}
-in Linux with perl-5.18.1 is as follows (under $Config{prefix}):
+in Linux with perl-5.18.2 is as follows (under $Config{prefix}):
./bin/perl
- ./lib/perl5/5.18.1/strict.pm
- ./lib/perl5/5.18.1/warnings.pm
- ./lib/perl5/5.18.1/i686-linux/File/Glob.pm
- ./lib/perl5/5.18.1/feature.pm
- ./lib/perl5/5.18.1/XSLoader.pm
- ./lib/perl5/5.18.1/i686-linux/auto/File/Glob/Glob.so
+ ./lib/perl5/5.18.2/strict.pm
+ ./lib/perl5/5.18.2/warnings.pm
+ ./lib/perl5/5.18.2/i686-linux/File/Glob.pm
+ ./lib/perl5/5.18.2/feature.pm
+ ./lib/perl5/5.18.2/XSLoader.pm
+ ./lib/perl5/5.18.2/i686-linux/auto/File/Glob/Glob.so
Secondly, for perl-5.10.1, the Debian perl-base package contains 591 files,
(of which 510 are for lib/unicore) totaling about 3.5MB in its i386 version.
Modified: vendor/perl/dist/MANIFEST
===================================================================
--- vendor/perl/dist/MANIFEST 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/MANIFEST 2014-08-27 11:27:40 UTC (rev 6720)
@@ -3456,6 +3456,7 @@
dist/Module-CoreList/t/corelist.t Module::CoreList tests
dist/Module-CoreList/t/deprecated.t Module::CoreList tests
dist/Module-CoreList/t/find_modules.t Module::CoreList tests
+dist/Module-CoreList/t/is_core.t Module::CoreList tests
dist/Module-CoreList/t/pod.t Module::CoreList tests
dist/Module-CoreList/t/utils.t Module::CoreList tests
dist/Net-Ping/Changes Net::Ping
@@ -3797,6 +3798,7 @@
ext/File-Glob/TODO File::Glob extension todo list
ext/File-Glob/t/rt114984.t See if File::Glob works
ext/File-Glob/t/taint.t See if File::Glob works
+ext/File-Glob/t/threads.t See if File::Glob + threads works
ext/GDBM_File/GDBM_File.pm GDBM extension Perl module
ext/GDBM_File/GDBM_File.xs GDBM extension external subroutines
ext/GDBM_File/hints/sco.pl Hint for GDBM_File for named architecture
@@ -4726,6 +4728,7 @@
pod/perl5162delta.pod Perl changes in version 5.16.2
pod/perl5163delta.pod Perl changes in version 5.16.3
pod/perl5180delta.pod Perl changes in version 5.18.0
+pod/perl5181delta.pod Perl changes in version 5.18.1
pod/perl561delta.pod Perl changes in version 5.6.1
pod/perl56delta.pod Perl changes in version 5.6
pod/perl581delta.pod Perl changes in version 5.8.1
@@ -4804,6 +4807,7 @@
pod/perlreftut.pod Perl references short introduction
pod/perlreguts.pod Perl regular expression engine internals
pod/perlre.pod Perl regular expressions, the rest of the story
+pod/perlrepository.pod
pod/perlrequick.pod Perl regular expressions quick start
pod/perlreref.pod Perl regular expressions quick reference
pod/perlretut.pod Perl regular expressions tutorial
Modified: vendor/perl/dist/META.json
===================================================================
--- vendor/perl/dist/META.json 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/META.json 2014-08-27 11:27:40 UTC (rev 6720)
@@ -131,5 +131,5 @@
"url" : "http://perl5.git.perl.org/"
}
},
- "version" : "5.018001"
+ "version" : "5.018002"
}
Modified: vendor/perl/dist/META.yml
===================================================================
--- vendor/perl/dist/META.yml 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/META.yml 2014-08-27 11:27:40 UTC (rev 6720)
@@ -118,4 +118,4 @@
homepage: http://www.perl.org/
license: http://dev.perl.org/licenses/
repository: http://perl5.git.perl.org/
-version: 5.018001
+version: 5.018002
Modified: vendor/perl/dist/Makefile.SH
===================================================================
--- vendor/perl/dist/Makefile.SH 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Makefile.SH 2014-08-27 11:27:40 UTC (rev 6720)
@@ -492,7 +492,7 @@
ndt_obj = $(obj0) $(obj1) $(obj2) $(obj3) $(ARCHOBJS)
obj = $(ndt_obj) $(DTRACE_O)
-perltoc_pod_prereqs = extra.pods pod/perl5181delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod
+perltoc_pod_prereqs = extra.pods pod/perl5182delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod
generated_pods = pod/perltoc.pod $(perltoc_pod_prereqs)
generated_headers = uudmap.h bitcount.h mg_data.h
@@ -1068,9 +1068,9 @@
pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
$(MINIPERL) $(Icwd) pod/perlmodlib.PL -q
-pod/perl5181delta.pod: pod/perldelta.pod
- $(RMS) pod/perl5181delta.pod
- $(LNS) perldelta.pod pod/perl5181delta.pod
+pod/perl5182delta.pod: pod/perldelta.pod
+ $(RMS) pod/perl5182delta.pod
+ $(LNS) perldelta.pod pod/perl5182delta.pod
extra.pods: $(MINIPERL_EXE)
- at test ! -f extra.pods || rm -f `cat extra.pods`
Modified: vendor/perl/dist/NetWare/Makefile
===================================================================
--- vendor/perl/dist/NetWare/Makefile 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/NetWare/Makefile 2014-08-27 11:27:40 UTC (rev 6720)
@@ -86,7 +86,7 @@
# Here comes the CW tools - TO BE FILLED TO BUILD WITH CW -
-MODULE_DESC = "Perl 5.18.1 for NetWare"
+MODULE_DESC = "Perl 5.18.2 for NetWare"
CCTYPE = CodeWarrior
C_COMPILER = mwccnlm -c
CPP_COMPILER = mwccnlm
@@ -462,7 +462,7 @@
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-INST_VER = \5.18.1
+INST_VER = \5.18.2
#
# Comment this out if you DON'T want your perl installation to have
Modified: vendor/perl/dist/NetWare/config_H.wc
===================================================================
--- vendor/perl/dist/NetWare/config_H.wc 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/NetWare/config_H.wc 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1048,7 +1048,7 @@
* This symbol contains the ~name expanded version of ARCHLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define ARCHLIB "c:\\perl\\5.18.1\\lib\\NetWare-x86-multi-thread" /**/
+#define ARCHLIB "c:\\perl\\5.18.2\\lib\\NetWare-x86-multi-thread" /**/
/*#define ARCHLIB_EXP "" /**/
/* ARCHNAME:
@@ -1079,8 +1079,8 @@
* This symbol is the filename expanded version of the BIN symbol, for
* programs that do not want to deal with that at run-time.
*/
-#define BIN "c:\\perl\\5.18.1\\bin\\NetWare-x86-multi-thread" /**/
-#define BIN_EXP "c:\\perl\\5.18.1\\bin\\NetWare-x86-multi-thread" /**/
+#define BIN "c:\\perl\\5.18.2\\bin\\NetWare-x86-multi-thread" /**/
+#define BIN_EXP "c:\\perl\\5.18.2\\bin\\NetWare-x86-multi-thread" /**/
/* BYTEORDER:
* This symbol holds the hexadecimal constant defined in byteorder,
@@ -3063,7 +3063,7 @@
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "c:\\perl\\site\\5.18.1\\lib\\NetWare-x86-multi-thread" /**/
+#define SITEARCH "c:\\perl\\site\\5.18.2\\lib\\NetWare-x86-multi-thread" /**/
/*#define SITEARCH_EXP "" /**/
/* SITELIB:
@@ -3086,7 +3086,7 @@
* removed. The elements in inc_version_list (inc_version_list.U) can
* be tacked onto this variable to generate a list of directories to search.
*/
-#define SITELIB "c:\\perl\\site\\5.18.1\\lib" /**/
+#define SITELIB "c:\\perl\\site\\5.18.2\\lib" /**/
/*#define SITELIB_EXP "" /**/
#define SITELIB_STEM "" /**/
Deleted: vendor/perl/dist/Porting/checkARGS_ASSERT.pl
===================================================================
--- vendor/perl/dist/Porting/checkARGS_ASSERT.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/checkARGS_ASSERT.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,32 +0,0 @@
-#!/usr/bin/perl -w
-use strict;
-
-# Print out any PERL_ARGS_ASSERT* macro that was declared but not used.
-
-my %declared;
-my %used;
-
-open my $fh, '<', 'proto.h' or die "Can't open proto.h: $!";
-while (<$fh>) {
- $declared{$1}++ if /^#define\s+(PERL_ARGS_ASSERT[A-Za-z_]+)\s+/;
-}
-
-if (!@ARGV) {
- open my $fh, '<', 'MANIFEST' or die "Can't open MANIFEST: $!";
- while (<$fh>) {
- # *.c or */*.c
- push @ARGV, $1 if m!^((?:[^/]+/)?[^/]+\.c)\t!;
- }
-}
-
-while (<>) {
- $used{$1}++ if /^\s+(PERL_ARGS_ASSERT_[A-Za-z_]+);$/;
-}
-
-my %unused;
-
-foreach (keys %declared) {
- $unused{$_}++ unless $used{$_};
-}
-
-print $_, "\n" foreach sort keys %unused;
Modified: vendor/perl/dist/Porting/cmpVERSION.pl
===================================================================
--- vendor/perl/dist/Porting/cmpVERSION.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/cmpVERSION.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -37,10 +37,16 @@
my $null = devnull();
unless (defined $tag_to_compare) {
+ my $check = 'HEAD';
+ while(1) {
+ $check = `git describe --abbrev=0 $check 2>$null`;
+ chomp $check;
+ last unless $check =~ /-RC/;
+ $check .= '^';
+ }
+ $tag_to_compare = $check;
# Thanks to David Golden for this suggestion.
- $tag_to_compare = `git describe --abbrev=0 2>$null`;
- chomp $tag_to_compare;
}
unless (length $tag_to_compare) {
Modified: vendor/perl/dist/Porting/config.sh
===================================================================
--- vendor/perl/dist/Porting/config.sh 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/config.sh 2014-08-27 11:27:40 UTC (rev 6720)
@@ -47,10 +47,10 @@
api_revision='5'
api_subversion='0'
api_version='18'
-api_versionstring='5.18.1'
+api_versionstring='5.18.0'
ar='ar'
-archlib='/opt/perl/lib/5.18.1/i686-linux-64int'
-archlibexp='/opt/perl/lib/5.18.1/i686-linux-64int'
+archlib='/opt/perl/lib/5.18.2/i686-linux-64int'
+archlibexp='/opt/perl/lib/5.18.2/i686-linux-64int'
archname64='64int'
archname='i686-linux-64int'
archobjs=''
@@ -750,7 +750,7 @@
incpath=''
inews=''
initialinstalllocation='/opt/perl/bin'
-installarchlib='/opt/perl/lib/5.18.1/i686-linux-64int'
+installarchlib='/opt/perl/lib/5.18.2/i686-linux-64int'
installbin='/opt/perl/bin'
installhtml1dir=''
installhtml3dir=''
@@ -758,13 +758,13 @@
installman3dir='/opt/perl/man/man3'
installprefix='/opt/perl'
installprefixexp='/opt/perl'
-installprivlib='/opt/perl/lib/5.18.1'
+installprivlib='/opt/perl/lib/5.18.2'
installscript='/opt/perl/bin'
-installsitearch='/opt/perl/lib/site_perl/5.18.1/i686-linux-64int'
+installsitearch='/opt/perl/lib/site_perl/5.18.2/i686-linux-64int'
installsitebin='/opt/perl/bin'
installsitehtml1dir=''
installsitehtml3dir=''
-installsitelib='/opt/perl/lib/site_perl/5.18.1'
+installsitelib='/opt/perl/lib/site_perl/5.18.2'
installsiteman1dir='/opt/perl/man/man1'
installsiteman3dir='/opt/perl/man/man3'
installsitescript='/opt/perl/bin'
@@ -887,7 +887,7 @@
perl_static_inline='static __inline__'
perladmin='yourname at yourhost.yourplace.com'
perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc'
-perlpath='/opt/perl/bin/perl5.18.1'
+perlpath='/opt/perl/bin/perl5.18.2'
pg='pg'
phostname=''
pidtype='pid_t'
@@ -896,8 +896,8 @@
pr=''
prefix='/opt/perl'
prefixexp='/opt/perl'
-privlib='/opt/perl/lib/5.18.1'
-privlibexp='/opt/perl/lib/5.18.1'
+privlib='/opt/perl/lib/5.18.2'
+privlibexp='/opt/perl/lib/5.18.2'
procselfexe='"/proc/self/exe"'
prototype='define'
ptrsize='4'
@@ -963,8 +963,8 @@
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 6, 17, 29, 31, 0'
sig_size='69'
signal_t='void'
-sitearch='/opt/perl/lib/site_perl/5.18.1/i686-linux-64int'
-sitearchexp='/opt/perl/lib/site_perl/5.18.1/i686-linux-64int'
+sitearch='/opt/perl/lib/site_perl/5.18.2/i686-linux-64int'
+sitearchexp='/opt/perl/lib/site_perl/5.18.2/i686-linux-64int'
sitebin='/opt/perl/bin'
sitebinexp='/opt/perl/bin'
sitehtml1dir=''
@@ -971,9 +971,9 @@
sitehtml1direxp=''
sitehtml3dir=''
sitehtml3direxp=''
-sitelib='/opt/perl/lib/site_perl/5.18.1'
+sitelib='/opt/perl/lib/site_perl/5.18.2'
sitelib_stem='/opt/perl/lib/site_perl'
-sitelibexp='/opt/perl/lib/site_perl/5.18.1'
+sitelibexp='/opt/perl/lib/site_perl/5.18.2'
siteman1dir='/opt/perl/man/man1'
siteman1direxp='/opt/perl/man/man1'
siteman3dir='/opt/perl/man/man3'
@@ -999,7 +999,7 @@
ssizetype='ssize_t'
st_ino_sign='1'
st_ino_size='4'
-startperl='#!/opt/perl/bin/perl5.18.1'
+startperl='#!/opt/perl/bin/perl5.18.2'
startsh='#!/bin/sh'
static_ext=' '
stdchar='char'
@@ -1012,7 +1012,7 @@
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
-subversion='1'
+subversion='2'
sysman='/usr/share/man/man1'
tail=''
tar=''
@@ -1102,8 +1102,8 @@
vendorprefixexp=''
vendorscript=''
vendorscriptexp=''
-version='5.18.1'
-version_patchlevel_string='version 18 subversion 1'
+version='5.18.2'
+version_patchlevel_string='version 18 subversion 2'
versiononly='define'
vi=''
voidflags='15'
@@ -1127,7 +1127,7 @@
config_arg9='-dE'
PERL_REVISION=5
PERL_VERSION=18
-PERL_SUBVERSION=1
+PERL_SUBVERSION=2
PERL_API_REVISION=5
PERL_API_VERSION=18
PERL_API_SUBVERSION=0
Modified: vendor/perl/dist/Porting/config_H
===================================================================
--- vendor/perl/dist/Porting/config_H 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/config_H 2014-08-27 11:27:40 UTC (rev 6720)
@@ -966,8 +966,8 @@
* This symbol contains the ~name expanded version of ARCHLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define ARCHLIB "/pro/lib/perl5/5.18.1/i686-linux-64int-ld" /**/
-#define ARCHLIB_EXP "/pro/lib/perl5/5.18.1/i686-linux-64int-ld" /**/
+#define ARCHLIB "/pro/lib/perl5/5.18.2/i686-linux-64int-ld" /**/
+#define ARCHLIB_EXP "/pro/lib/perl5/5.18.2/i686-linux-64int-ld" /**/
/* ARCHNAME:
* This symbol holds a string representing the architecture name.
@@ -2074,8 +2074,8 @@
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "/pro/lib/perl5/5.18.1" /**/
-#define PRIVLIB_EXP "/pro/lib/perl5/5.18.1" /**/
+#define PRIVLIB "/pro/lib/perl5/5.18.2" /**/
+#define PRIVLIB_EXP "/pro/lib/perl5/5.18.2" /**/
/* PTRSIZE:
* This symbol contains the size of a pointer, so that the C preprocessor
@@ -2125,8 +2125,8 @@
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "/pro/lib/perl5/site_perl/5.18.1/i686-linux-64int-ld" /**/
-#define SITEARCH_EXP "/pro/lib/perl5/site_perl/5.18.1/i686-linux-64int-ld" /**/
+#define SITEARCH "/pro/lib/perl5/site_perl/5.18.2/i686-linux-64int-ld" /**/
+#define SITEARCH_EXP "/pro/lib/perl5/site_perl/5.18.2/i686-linux-64int-ld" /**/
/* SITELIB:
* This symbol contains the name of the private library for this package.
@@ -2148,8 +2148,8 @@
* removed. The elements in inc_version_list (inc_version_list.U) can
* be tacked onto this variable to generate a list of directories to search.
*/
-#define SITELIB "/pro/lib/perl5/site_perl/5.18.1" /**/
-#define SITELIB_EXP "/pro/lib/perl5/site_perl/5.18.1" /**/
+#define SITELIB "/pro/lib/perl5/site_perl/5.18.2" /**/
+#define SITELIB_EXP "/pro/lib/perl5/site_perl/5.18.2" /**/
#define SITELIB_STEM "/pro/lib/perl5/site_perl" /**/
/* SSize_t:
@@ -4369,7 +4369,7 @@
* script to make sure (one hopes) that it runs with perl and not
* some shell.
*/
-#define STARTPERL "#!/pro/bin/perl5.18.1" /**/
+#define STARTPERL "#!/pro/bin/perl5.18.2" /**/
/* HAS_STDIO_STREAM_ARRAY:
* This symbol, if defined, tells that there is an array
Deleted: vendor/perl/dist/Porting/curliff.pl
===================================================================
--- vendor/perl/dist/Porting/curliff.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/curliff.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,43 +0,0 @@
-#!/usr/bin/perl -ws
-
-# curliff.pl - convert certain files in the Perl distribution that
-# need to be in CR-LF format to CR-LF, or back to LF format (with the
-# -r option). The CR-LF format is NOT to be used for checking in
-# files to the Perforce repository, but it IS to be used when making
-# Perl snapshots or releases.
-
-use strict;
-
-use vars qw($r);
-
-# This list is also in makerel.
-my @FILES = qw(
- djgpp/configure.bat
- README.ce
- README.dos
- README.symbian
- README.win32
- symbian/config.pl
- symbian/makesis.pl
- symbian/README
- symbian/xsbuild.pl
- win32/Makefile
- win32/makefile.mk
- win32/Makefile.ce
- win32/ce-helpers/compile-all.bat
- win32/ce-helpers/compile.bat
- win32/ce-helpers/registry.bat
- );
-
-{
- local($^I, @ARGV) = ('.orig', @FILES);
- while (<>) {
- if ($r) {
- s/\015\012/\012/; # Curliffs to liffs.
- } else {
- s/\015?\012/\015\012/; # Curliffs and liffs to curliffs.
- }
- print;
- close ARGV if eof; # Reset $.
- }
-}
Deleted: vendor/perl/dist/Porting/findvars
===================================================================
--- vendor/perl/dist/Porting/findvars 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/findvars 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,359 +0,0 @@
-#!/usr/bin/perl -w
-
-$pat = '';
-# construct word list
-while (<DATA>) {
- chomp;
- next unless $_;
- $pat .= "$_|";
-}
-chop $pat if $pat =~ /\|$/;
-
-# grep
-while (<>) {
- print "$ARGV\:$.\:$_" if s/\b($pat)\b/#$1#/og;
-# this variant might useful if the transformation is more complicated
-# if (/^(.*?)\b($pat)\b(.*)$/o) {
-# my $head = "$1#$2#";
-# $_ = $3;
-# while (/^(.*?)\b($pat)\b(.*)$/o) {
-# $head .= "$1#$2#";
-# $_ = $3;
-# }
-# print "$ARGV\:$.\:$head$_\n";
-# }
-}
-continue {
- close ARGV if eof;
-}
-__END__
-Argv
-Cmd
-DBcv
-DBgv
-DBline
-DBsignal
-DBsingle
-DBsub
-DBtrace
-No
-Sv
-Xpv
-Yes
-amagic_generation
-ampergv
-an
-archpat_auto
-argvgv
-argvoutgv
-av_fetch_sv
-basetime
-beginav
-bodytarget
-bostr
-bufend
-bufptr
-cddir
-chopset
-collation_ix
-collation_name
-collation_standard
-collxfrm_base
-collxfrm_mult
-colors
-colorset
-compcv
-compiling
-comppad
-comppad_name
-comppad_name_fill
-comppad_name_floor
-cop_seqmax
-copline
-cryptseen
-cshlen
-cshname
-curcop
-curcopdb
-curinterp
-curpad
-curpm
-curstack
-curstackinfo
-curstash
-curstname
-dbargs
-debdelim
-debname
-debstash
-debug
-defgv
-defoutgv
-defstash
-delaymagic
-diehook
-dirty
-dlevel
-dlmax
-do_undump
-doextract
-doswitches
-dowarn
-dumplvl
-e_script
-egid
-endav
-envgv
-errgv
-error_count
-euid
-eval_root
-eval_start
-evalseq
-exitlist
-exitlistlen
-expect
-extralen
-fdpid
-filemode
-firstgv
-forkprocess
-formfeed
-formtarget
-generation
-gensym
-gid
-globalstash
-he_root
-hexdigit
-hintgv
-hints
-hv_fetch_ent_mh
-hv_fetch_sv
-in_clean_all
-in_clean_objs
-in_eval
-in_my
-in_my_stash
-incgv
-initav
-inplace
-last_in_gv
-last_lop
-last_lop_op
-last_proto
-last_uni
-lastfd
-lastgotoprobe
-lastscream
-lastsize
-lastspbase
-laststatval
-laststype
-leftgv
-lex_brackets
-lex_brackstack
-lex_casemods
-lex_casestack
-lex_defer
-lex_dojoin
-lex_expect
-lex_fakebrack
-lex_formbrack
-lex_inpat
-lex_inwhat
-lex_op
-lex_repl
-lex_starts
-lex_state
-lex_stuff
-lineary
-linestart
-linestr
-localizing
-localpatches
-main_cv
-main_root
-main_start
-mainstack
-malloc_mutex
-markstack
-markstack_max
-markstack_ptr
-max_intro_pending
-maxo
-maxscream
-maxsysfd
-mess_sv
-min_intro_pending
-minus_F
-minus_a
-minus_c
-minus_l
-minus_n
-minus_p
-modcount
-modglobal
-multi_close
-multi_end
-multi_open
-multi_start
-multiline
-mystrk
-na
-nexttoke
-nexttype
-nextval
-ninterps
-nomemok
-numeric_local
-numeric_name
-numeric_standard
-ofmt
-ofs
-ofslen
-oldbufptr
-oldlastpm
-oldname
-oldoldbufptr
-op
-op_mask
-op_seqmax
-opsave
-origalen
-origargc
-origargv
-origenviron
-origfilename
-ors
-orslen
-osname
-pad_reset_pending
-padix
-padix_floor
-patchlevel
-patleave
-pending_ident
-perl_destruct_level
-perldb
-pidstatus
-preambleav
-preambled
-preprocess
-profiledata
-reg_eval_set
-reg_flags
-reg_start_tmp
-reg_start_tmpl
-regbol
-regcc
-regcode
-regcomp_parse
-regcomp_rx
-regcompp
-regdata
-regdummy
-regendp
-regeol
-regexecp
-regflags
-regindent
-reginput
-reginterp_cnt
-reglastparen
-regnarrate
-regnaughty
-regnpar
-regprecomp
-regprev
-regprogram
-regsawback
-regseen
-regsize
-regstartp
-regtill
-regxend
-replgv
-restartop
-retstack
-retstack_ix
-retstack_max
-rightgv
-rs
-rsfp
-rsfp_filters
-runops
-savestack
-savestack_ix
-savestack_max
-sawampersand
-sawstudy
-sawvec
-scopestack
-scopestack_ix
-scopestack_max
-screamfirst
-screamnext
-secondgv
-seen_evals
-seen_zerolen
-sh_path
-siggv
-sighandlerp
-sortcop
-sortcxix
-sortstash
-specialsv_list
-splitstr
-stack_base
-stack_max
-stack_sp
-start_env
-statbuf
-statcache
-statgv
-statname
-statusvalue
-statusvalue_vms
-stdingv
-strchop
-strtab
-sub_generation
-sublex_info
-subline
-subname
-sv_arenaroot
-sv_count
-sv_no
-sv_objcount
-sv_root
-sv_undef
-sv_yes
-sys_intern
-tainted
-tainting
-thisexpr
-thr_key
-timesbuf
-tmps_floor
-tmps_ix
-tmps_max
-tmps_stack
-tokenbuf
-top_env
-toptarget
-uid
-unsafe
-warnhook
-xiv_arenaroot
-xiv_root
-xnv_root
-xpv_root
-xrv_root
-piMem
-piENV
-piStdIO
-piLIO
-piDir
-piSock
-piProc
Deleted: vendor/perl/dist/Porting/fixCORE
===================================================================
--- vendor/perl/dist/Porting/fixCORE 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/fixCORE 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,68 +0,0 @@
-#!/usr/bin/perl -w
-use Data::Dumper;
-
-my $targ = shift;
-my $inc = join(' ',map("-I$_", at INC));
-
-my $work = 1;
-while ($work)
- {
- open(PIPE,"$^X -w $inc -M$targ -e '' 2>&1 |") || die "Cannot open pipe to child:$!";
- my %fix;
- while (<PIPE>)
- {
- if (/^Ambiguous call resolved as CORE::(\w+)\(\), qualify as such or use \& at (\S+) line (\d+)/
- && -f $2 )
- {
- my ($var,$file,$line) = ($1,$2,$3);
- $fix{$file} = [] unless exists $fix{$file};
- push(@{$fix{$file}},[$line => $var]) unless ($var =~ /^PL_/ || $file =~ /\.h$/);
- }
- print;
- }
- close(PIPE);
-# warn "Make returned $?\n";
-# last unless $?;
- my $changed = 0;
- foreach my $file (keys %fix)
- {
- my @ar = sort( { $a->[0] <=> $b->[0] } @{delete $fix{$file}});
- my @miss;
- my $fixed = 0;
- @ARGV = ($file);
- $. = 0;
- local $^I = '.sav';
- while (<>)
- {
- while (@ar && $. == $ar[0][0])
- {
- my ($line,$var) = @{shift(@ar)};
- if (s/(?<!CORE::)\b$var\b(?=\s*\()/CORE::$var/)
- {
- warn "$file:$line: FIX $var\n";
- $fixed++;
- $changed++;
- }
- else
- {
- push(@miss,[$line,$var,$_]);
- }
- }
- print;
- }
- unless ($fixed)
- {
- rename("$file$^I",$file);
- if (@miss)
- {
- while (@miss)
- {
- my ($line,$var,$txt) = @{shift(@miss)};
- warn "$file:$line:$var | $txt";
- }
- }
- }
- }
- last unless $changed;
- }
-
Deleted: vendor/perl/dist/Porting/fixvars
===================================================================
--- vendor/perl/dist/Porting/fixvars 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/fixvars 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,69 +0,0 @@
-#!/usr/bin/perl -w
-use Data::Dumper;
-
-my $targ = (@ARGV) ? join(' ', at ARGV) : 'miniperl' ;
-
-my $work = 1;
-while ($work)
- {
- open(PIPE,"make $targ 2>&1 |") || die "Cannot open pipe to make:$!";
- my %fix;
- while (<PIPE>)
- {
- if (/^(.*):(\d+):\s+\`(\w+)'\s+undeclared/ && -f $1 )
- {
- my ($file,$line,$var) = ($1,$2,$3);
- $fix{$file} = [] unless exists $fix{$file};
- push(@{$fix{$file}},[$line => $var]) unless ($var =~ /^PL_/ || $file =~ /\.h$/);
- }
- print;
- }
- close(PIPE);
- warn "Make returned $?\n";
- last unless $?;
- my $changed = 0;
- foreach my $file (keys %fix)
- {
- my @ar = sort( { $a->[0] <=> $b->[0] } @{delete $fix{$file}});
- my @miss;
- my $fixed = 0;
- unless (-w $file)
- {
- system("d4","edit",$file);
- }
- @ARGV = ($file);
- $. = 0;
- local $^I = '.sav';
- while (<>)
- {
- while (@ar && $. == $ar[0][0])
- {
- my ($line,$var) = @{shift(@ar)};
- if (s/\b$var\b/PL_$var/)
- {
- warn "$file:$line: FIX $var\n";
- $fixed++;
- $changed++;
- }
- else
- {
- push(@miss,[$line,$var,$_]);
- }
- }
- print;
- }
- unless ($fixed)
- {
- rename("$file$^I",$file);
- if (@miss)
- {
- while (@miss)
- {
- my ($line,$var,$txt) = @{shift(@miss)};
- warn "$file:$line:$var | $txt";
- }
- }
- }
- }
- last unless $changed;
- }
Deleted: vendor/perl/dist/Porting/genlog
===================================================================
--- vendor/perl/dist/Porting/genlog 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/genlog 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,144 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Generate a nice changelist by querying perforce.
-#
-# Each change is described with the change number, description,
-# which branch the change happened in, files modified,
-# and who was responsible for entering the change.
-#
-# Can be called with a list of change numbers or a range of the
-# form "12..42". Changelog will be printed from highest number
-# to lowest.
-#
-# Outputs the changelist to stdout.
-#
-# Gurusamy Sarathy <gsar at activestate.com>
-#
-
-use Text::Wrap;
-use Text::Tabs;
-
-$0 =~ s|^.*/||;
-unless (@ARGV) {
- die <<USAGE;
- $0 [-p \$P4PORT] [-bi branch_include] [-be branch_exclude] <change numbers or from..to>
-USAGE
-}
-
-my @changes;
-
-my %editkind;
- at editkind{ qw( add edit delete integrate branch )}
- = qw( + ! - !> +> );
-
-my $p4port = $ENV{P4PORT} || 'localhost:1666';
-
-my @branch_include;
-my @branch_exclude;
-my %branch_include;
-my %branch_exclude;
-
-while (@ARGV) {
- $_ = shift;
- if (/^(\d+)\.\.(\d+)?$/) {
- push @changes, $1 .. ($2 || (split(' ', `p4 changes -m 1`))[1]);
- }
- elsif (/^\d+$/) {
- push @changes, $_;
- }
- elsif (/^-p(.*)$/) {
- $p4port = $1 || shift;
- }
- elsif (/^-bi(.*)$/) {
- push @branch_include, $1 || shift;
- }
- elsif (/^-be(.*)$/) {
- push @branch_exclude, $1 || shift;
- }
- else {
- warn "Arguments must be change numbers, ignoring `$_'\n";
- }
-}
-
- at changes = sort { $b <=> $a } @changes;
-
- at branch_include{@branch_include} = @branch_include if @branch_include;
- at branch_exclude{@branch_exclude} = @branch_exclude if @branch_exclude;
-
-my @desc = `p4 -p $p4port describe -s @changes`;
-if ($?) {
- die "$0: `p4 -p $p4port describe -s @changes` failed, status[$?]\n";
-}
-else {
- tr/\r/\n/ foreach @desc;
- chomp @desc;
- while (@desc) {
- my ($change,$who,$date,$time, at log,$branch,$file,$type,%files);
- my $skip = 0;
- my $nbranch = 0;
- $_ = shift @desc;
- if (/^Change (\d+) by (\w+)\@.+ on (\S+) (\S+)\s*$/) {
- ($change, $who, $date, $time) = ($1,$2,$3,$4);
- $_ = shift @desc; # get rid of empty line
- while (@desc) {
- $_ = shift @desc;
- last if /^Affected/;
- push @log, $_;
- }
- if (/^Affected/) {
- $_ = shift @desc; # get rid of empty line
- while ($_ = shift @desc) {
- last unless /^\.\.\./;
- if (m{^\.\.\. //depot/(.*?perl|[^/]*)/([^#]+)#\d+ (\w+)\s*$}) {
- ($branch,$file,$type) = ($1,$2,$3);
- $nbranch++;
- if (exists $branch_exclude{$branch} or
- @branch_include and
- not exists $branch_include{$branch}) {
- $skip++;
- }
- $files{$branch} = {} unless exists $files{$branch};
- $files{$branch}{$type} = [] unless exists $files{$branch}{$type};
- push @{$files{$branch}{$type}}, $file;
- }
- else {
- warn "Unknown line [$_], ignoring\n";
- }
- }
- }
- }
- next if ((not $change) or $skip);
- my $output = ("_" x 76) . "\n";
- $output .= sprintf <<EOT, $change, $who, $date, $time;
-[%6s] By: %-25s on %9s %9s
-EOT
- $output .= " Log: ";
- my $i = 0;
- while (@log) {
- $_ = shift @log;
- s/^\s*//;
- s/^\[.*\]\s*// unless $i ;
- # don't print last empty line
- if ($_ or @log) {
- $output .= " " if $i++;
- $output .= "$_\n";
- }
- }
- for my $branch (sort keys %files) {
- $output .= sprintf "%11s: $branch\n", 'Branch';
- for my $kind (sort keys %{$files{$branch}}) {
- warn("### $kind ###\n"), next unless exists $editkind{$kind};
- my $files = $files{$branch}{$kind};
- # don't show large branches and integrations
- $files = ["($kind " . scalar(@$files) . ' files)']
- if (@$files > 25 && ($kind eq 'integrate'
- || $kind eq 'branch'))
- || @$files > 100;
- $output .= wrap(sprintf("%12s ", $editkind{$kind}),
- sprintf("%12s ", $editkind{$kind}),
- "@$files\n");
- }
- }
- print unexpand($output);
- }
-}
Deleted: vendor/perl/dist/Porting/mergelog
===================================================================
--- vendor/perl/dist/Porting/mergelog 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/mergelog 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,3957 +0,0 @@
-# DAPM 26-Jan-09
-#
-# first attempt at a one-line-per-patch status log for bleed to maint
-# integrations
-#
-# leading whitespace is continuation of previous line
-#
-# -------------------------------------------
-#
-# Key:
-#
-# Finished processing this change (CAPS):
-#
-# A part of branch merged in single Aggregate merge,
-# rather than being individually cherry-picked;
-# i.e. this particular commit was rejected, but the change itself
-# will have been applied elsewhere
-# M completely merged
-# P partially merged, the rest rejected
-# R rejected
-#
-# Not fully processed (lower case or symbols):
-#
-# d defer until a later release
-# m partially merged, awaiting further action
-# . not yet reviewed
-# ! reviewed but not yet merged; awaiting something else
-#
-# -------------------------------------------
-
-M a70a5f2eb5 2007/12/19 32643
-R d70281d618 2007/12/19 32644 blead-specific
-M 270d01deff 2007/12/19 32645
-R 4eeeaff6ef 2007/12/19 32646 blead-specific
-M 5e49647a08 2007/12/19 32647
-M 13a7998c93 2007/12/19 32648
-P 7120b314ec 2007/12/19 32649 just the pod/perl5100delta.pod change
-M 00881caab9 2007/12/19 32650
-M c97a6147af 2007/12/19 32651
-M b0ad0448d7 2007/12/19 32652
-M 1cdea1e2b4 2007/12/19 32653
-M 328c41c4a9 2007/12/19 32654
-R f463b80e1c 2007/12/19 32655 blead-specific
-M d40f418c09 2007/12/19 32656
-M 8fda732ba3 2007/12/19 32657
-M 794f469712 2007/12/19 32658
-M b965d173aa 2007/12/19 32659
-M 7f01fda696 2007/12/19 32660
-M bb8b33994a 2007/12/19 32661
-M 51dec9fbf4 2007/12/19 32662
-M 5e727a3e37 2007/12/20 32663
-M 764458a485 2007/12/20 32664
-M 1163f0e44f 2007/12/20 32665
-M 84a943b5b5 2007/12/20 32666
-M c34316b3a9 2007/12/20 32667
-M 01c2a943c2 2007/12/20 32668
-M 6682be1cb0 2007/12/20 32669
-M 8119684ffb 2007/12/20 32670
-M 1318745670 2007/12/20 32671
-M 56d7a0868d 2007/12/20 32672
-M 69f36734c1 2007/12/20 32673
-M 82c0efa4e8 2007/12/20 32674
-M ac572bf4fd 2007/12/20 32675
-M 78ac7dd959 2007/12/20 32676
-M bd649c1676 2007/12/20 32677
-M e50442680d 2007/12/20 32678
-M 3bdcbd26ea 2007/12/20 32679
-R 878d132a73 2007/12/20 32680 each @array; too scary!
-M 360ea906b1 2007/12/20 32681
-R 6fc9eaaa1c 2007/12/20 32682 regen: do manually
-M 959037a055 2007/12/21 32683
-R ba235770e5 2007/12/21 32684 don't delete Perl_magic_setglob (BinCompat)
-M 5e2a19fce2 2007/12/21 32685
-M c826f41b69 2007/12/21 32686
-M 644741fd20 2007/12/21 32687
-M 22883ac550 2007/12/21 32688
-M 3f5211dd25 2007/12/21 32689
- this was backed out in maint by 555150c249,
- then re-merged by 85152dbe94
-M aab391487e 2007/12/21 32690
-M f05ddbb84c 2007/12/21 32691
-R aeedbbed67 2007/12/21 32692 more each @array (see 32680)
-M a9eee89a8b 2007/12/22 32693
-M 54cea8cc4e 2007/12/22 32698
-M 9568a12365 2007/12/22 32699
-M 64484faa0b 2007/12/22 32701
-M 3376de987a 2007/12/22 32702
-M d3f5e39945 2007/12/22 32703
-M bfd025d94e 2007/12/22 32704
-M 2a0de2c52a 2007/12/22 32705
-M d0cc0e64ef 2007/12/22 32706
-R 24792b8dab 2007/12/22 32707 removes core defn of Null*; not BackCompat
-R de84dc04df 2007/12/22 32708 make assert not eval-able; not BackCompat
-M 8f85282b4f 2007/12/22 32709
-M f57255841c 2007/12/22 32710
-M 51310be14a 2007/12/22 32711
-M dfe169eecc 2007/12/22 32712
-M 4e205ed637 2007/12/23 32713
-R 95bfaf42e7 2007/12/23 32714 s/510/511/g;
-R 6977076943 2007/12/23 32715 new assert
-M 718140ec19 2007/12/23 32716
-M e537ac38cb 2007/12/23 32717
-R 2fdb99a57e 2007/12/23 32718 typo fix to 32708
-R 27ceb59774 2007/12/23 32719 typo fix to 32708
-M 1f36f092f8 2007/12/24 32720
-M d34ed59f58 2007/12/25 32721
-R abf0ed0d39 2007/12/25 32722 s/510/511/g
-M 2421bbdb12 2007/12/25 32723
-M c975a42590 2007/12/26 32724
-P b53eecb41c 2007/12/26 32725 just ext/Storable/Storable.xs
-M 649a2d69cb 2007/12/26 32726
-M 056749dc23 2007/12/26 32727
-M d374f9c73e 2007/12/26 32728
-M 460b70c2ae 2007/12/26 32729
-M db1511c850 2007/12/26 32730
-M d6f4ea2ea9 2007/12/26 32731
-M 62ba2c9348 2007/12/26 32732
-M 0707d6cc81 2007/12/26 32733
-P 4df7f6afd8 2007/12/26 32734 didn't actually remove RV
-M a784fd7c04 2007/12/26 32735
-M dd48e7ab8e 2007/12/26 32736
-M 43230e26bd 2007/12/26 32737
-R 238b27b30e 2007/12/26 32738 specific to non-SVt_RV
-M 7d879f32d6 2007/12/27 32739
-P 3ce3ed558a 2007/12/27 32740 appears B.pm and Peek.t were silently merged
-M eedd3f9945 2007/12/27 32741
-R 124ee91afb 2007/12/27 32742 new assertion
-M 1f257c956c 2007/12/27 32743
-M 2cd48dfddd 2007/12/27 32744
-P f708cfc10f 2007/12/27 32745 REGEXP as native type
- only merged the tests
-M 88044e374e 2007/12/27 32746
-M 03949bffb4 2007/12/27 32747
-P a2794585f2 2007/12/27 32748 merged just the pat.t tests; the rest was REGEXP-as-SV-type stuff
-M 96704b718c 2007/12/27 32749
-P 662f1f9e0a 2007/12/28 32750 just the ext/Encode/ucm/cp858.ucm addition
-P 5c35adbb8f 2007/12/28 32751 skipped adding SVt_REGEXP type
-P f19b4ba939 2007/12/28 32752 just the Peek.t part
-M 220fc49f9c 2007/12/28 32753
-M 3a9b2cacfb 2007/12/28 32754
-R 2c96c0d61c 2007/12/28 32755 'struct regexp' stuff; not BinCompat
-M bb661a585c 2007/12/28 32756
-R 51aa200460 2007/12/28 32757 'struct regexp' stuff; not BinCompat
-M 866c78d1cf 2007/12/29 32758
-M a1cf41cd41 2007/12/29 32759
-R 453d94a93e 2007/12/29 32760 Perl_av_iter_p() return IV* rather than I32*
-M 10300be478 2007/12/29 32761
-M c8e4cf8b70 2007/12/29 32762
-M 15895f8a35 2007/12/29 32763
-M c0bacbefa7 2007/12/29 32773
-M 14f3b9f2b0 2007/12/29 32774
-R 52d81aa88a 2007/12/29 32775 reorders external regexp flags
-R 156d2b4303 2007/12/29 32776 fix for 32760
-M 0d3c21b03f 2007/12/29 32777
-M 50af2e611e 2007/12/29 32778
-M 50baa5ea22 2007/12/29 32779
-M a7c93bfc3d 2007/12/30 32780
-M b7a4fb4f15 2007/12/30 32781
-M 02f90d034d 2007/12/30 32782
-R 20f4945e16 2007/12/30 32783 bit reorg of sv.h - would be too hard to merge
-M f019531057 2007/12/30 32784
-R b07fa058fb 2007/12/30 32785 fix for 32783
-M d020892c81 2007/12/31 32786
-M 7a7524138a 2007/12/31 32787
-M ceb531cd9f 2007/12/31 32788
-M 488344d27a 2007/12/31 32789
-R 68cad0541e 2007/12/31 32790 don't delete mathoms added by 32789
-M b9893e571a 2007/12/31 32791
-R 20bff64c49 2007/12/31 32792 fix for 32760
-M e9a8c0991e 2008/01/01 32793
-M 04b62921f0 2008/01/01 32795
-M 580e570ede 2008/01/01 32797
-M ead6d9e190 2008/01/01 32798
-M 483e88ad22 2008/01/01 32799
-M 13e592d266 2008/01/01 32800
-M 3d66076ad0 2008/01/02 32801
-M 07bc277f32 2008/01/02 32802
-M 84679df57c 2008/01/02 32803
-P 288b8c02c5 2008/01/02 32804 add SVt_REGEXP: only merge
- cflags.SH ext/Devel/Peek/t/Peek.t
-M d991eed6a6 2008/01/02 32805
-R e350b669f3 2008/01/02 32806 fix to 32804
-M 740cce10af 2008/01/02 32807
-M 94fc106db5 2008/01/03 32808
-M 37589e1eef 2008/01/03 32809
-M d914baabc2 2008/01/03 32810
-M e04fc022e4 2008/01/03 32811
-M 289d3c6afe 2008/01/03 32812
-M a663657d0c 2008/01/03 32813
-M 09cae46f2f 2008/01/03 32814
-M 4ea5041177 2008/01/03 32815
-M 1eb9e81d30 2008/01/03 32816
-M d16d613cba 2008/01/03 32817
-M 59cd0e26eb 2008/01/03 32818
-M 84bafc024a 2008/01/03 32819
-M ad25789c15 2008/01/03 32820
-M 6e449a3ab1 2008/01/04 32821
-M 22f1178fc6 2008/01/04 32822
-M ae374e95f2 2008/01/04 32823
-M 121b77126d 2008/01/04 32824
-M 5b17c0846f 2008/01/04 32825
-M c8d66bb329 2008/01/04 32826
-M c1a049cb5a 2008/01/04 32827
-R d75c0fe73b 2008/01/04 32828 fix for rejected 878d132a73 (each @array)
-M e4594d660c 2008/01/04 32829
-M 0a8174e120 2008/01/04 32830
-M 70b32c0be2 2008/01/04 32831
-M 553688848e 2008/01/04 32832
-M d1f3479f8c 2008/01/04 32833
-M 8f14ea018e 2008/01/04 32834
-R 7f60507992 2008/01/04 32835 fix to 32804
-R 7a4bba223a 2008/01/04 32836 nicholas suggested no (merged then reverted)
-R bdd9a1b1ec 2008/01/05 32837 specific to new regexp stuff
-R 69240efd70 2008/01/05 32838 see 32836
-M 5a51db0500 2008/01/05 32839
-M efd26800e7 2008/01/05 32840
-P f7c278bfa9 2008/01/05 32841 skip more struct regexp diddling
- just apply ext/B/t/optree_constants.t, ext/Devel/Peek/t/Peek.t
-M 08f1872725 2008/01/05 32842
-M 5509d87acd 2008/01/05 32843
-M e16f710823 2008/01/05 32844
-R 9d17798df3 2008/01/05 32845 skip more struct regexp diddling
-
-M ec4c3bb069 2008/01/05 32846
-M 88570a3e91 2008/01/05 32847
-M 4979e2888f 2008/01/05 32848
-M 3c8556c3bf 2008/01/05 32849
-R e2560c3357 2008/01/05 32850 fix for bleed-specific re stuff
-R b9ad30b40c 2008/01/05 32851 Make Perl_pregcomp() use SvUTF8: not BinCompat
- originally merged as 33972, then backed out again
- by 1f1f9ba37f5670f787f95ba511742e9cf4d9ca66
-R 8f6ae13c8a 2008/01/05 32852 Abolish RXf_UTF8: not BackCompat
-M 5daac39cdf 2008/01/05 32853
-R 1af6200d18 2008/01/05 32854 skip more struct regexp diddling
-M a6307b373e 2008/01/05 32855
-M 9d6c4c89d7 2008/01/05 32856
-M 0357f1fd55 2008/01/05 32857
-M d0a30c4343 2008/01/05 32858
-P 08e4474067 2008/01/05 32859 only Peek.t from SVt_REGEXP stuff
- see also b6f6091627
-M 62a1a1efb4 2008/01/05 32860
-R d2f13c598f 2008/01/05 32861 Make REGEXP a type distinct from SV.
-R a11c868346 2008/01/05 32862 bleed-only
-R fd44068c47 2008/01/06 32863 uses SVt_REGEXP
-M 92905b42ad 2008/01/06 32864
-M 5186cc1225 2008/01/06 32865
-M ecd6c0a032 2008/01/06 32866
-M 9cddf794fc 2008/01/06 32867
-M ede1273d4e 2008/01/06 32868
-M 35925e80e0 2008/01/06 32869
-M e3c86cb707 2008/01/06 32870
-M 00bfa1c17d 2008/01/06 32871
-M e1f17637d1 2008/01/06 32872
-M 3a28f3fb1b 2008/01/06 32873
-M b376053de5 2008/01/06 32874
-M e846cbe53f 2008/01/06 32875
-M 74295f0bd8 2008/01/06 32876
-M 1f27373c61 2008/01/06 32877
-M c57cf257e9 2008/01/06 32878
-M 3bc0704bd7 2008/01/06 32879
-P 0fc92fc6bb 2008/01/06 32880 only Peek.t, Test/Builder.pm from
- SVt_REGEXP stuff
-M 4ab99479ee 2008/01/06 32881
-R b7c9370f5c 2008/01/06 32882 uses SVt_REGEXP
-M f84167b372 2008/01/06 32883
-M a5d81eb5c7 2008/01/07 32884
-M 8725a05e43 2008/01/07 32885
-M b6c155fe18 2008/01/07 32886
-M 10a3d64ebf 2008/01/07 32887
-M f5df47822a 2008/01/07 32888
-M 5e895007ab 2008/01/07 32889
-R b7e0bd9e80 2008/01/07 32890 uses SVt_REGEXP
-M fafafbaf70 2008/01/07 32891
-M 205f85e8df 2008/01/07 32892
-M c1939273d4 2008/01/07 32893
-M a43d94f2c0 2008/01/07 32894
-M 36c662f48c 2008/01/07 32895
-R f63535fc1e 2008/01/07 32896 part of 32880
-M 7d8473223d 2008/01/08 32897
-R 9a8b670905 2008/01/08 32899 fix subsumed by later fixes
-R 10599a699e 2008/01/08 32900 uses SVt_REGEXP
-R 937c6efd46 2008/01/08 32901 uses SVt_REGEXP
-R 86d2c25d57 2008/01/08 32902 uses SVt_REGEXP
-M 536daee00b 2008/01/08 32903
-M b0169937a1 2008/01/08 32904
-M 1f0bbb5680 2008/01/08 32905
-M 33894c1aa3 2008/01/09 32906
-M aacdad3c65 2008/01/09 32907
-M 1515bec641 2008/01/09 32908
-M 9210de830a 2008/01/09 32909
-M 2e8342de65 2008/01/09 32910
-M 192c1e277b 2008/01/09 32911
-M d0328fd7d6 2008/01/09 32912
-R d2ece331da 2008/01/09 32913 fix to 32899
-M 86a885eb6a 2008/01/09 32914
-M 084e50c2bb 2008/01/09 32915
-M c90cd22b2f 2008/01/09 32916
-M 77abb4c607 2008/01/09 32918
-M e3dd4663a7 2008/01/09 32920
-M c2dedb9378 2008/01/09 32921
-M d610630931 2008/01/09 32922
-P 0a0b43fa5b 2008/01/09 32925 just pod/perlapi.pod (rest is fix for 32851)
-M 3f163fbbeb 2008/01/09 32926
-M 613d6c3e99 2008/01/09 32927
-M 3f9706904c 2008/01/09 32928
-M 036846d3cb 2008/01/09 32929
-M 89eb5450df 2008/01/09 32930
-M e3faa678eb 2008/01/09 32931
-M 66b1de8708 2008/01/09 32932
-M 1db36481d1 2008/01/09 32933
-R 67d2d14de0 2008/01/10 32934 remove reg_stringify: not BinCompat
-M 574b88211c 2008/01/10 32935
-M bfd95973f1 2008/01/10 32937
-M 9231370572 2008/01/10 32938
-M 86c29d75e7 2008/01/10 32939
-M f9077f1bb4 2008/01/10 32940
-M 61525e559c 2008/01/10 32941
-R 110f3028c1 2008/01/10 32942 fix subsumed by later fixes
-R 5c9f9c9cf9 2008/01/10 32943 SVt_REGEXP specific
-M e68531976a 2008/01/10 32944
-M ad86357938 2008/01/11 32945
-M 6800ac04a9 2008/01/11 32946
-M 4b48cf3945 2008/01/11 32947
-M 52b4506763 2008/01/11 32948
-M ccb2c8b8ab 2008/01/11 32949
-R 14a49a2428 2008/01/11 32950 SVt_REGEXP specific
-R 1017f0c58d 2008/01/11 32951 SVt_REGEXP specific
-R 737ddd9966 2008/01/11 32952 remove PM_GETRE_SAFE etc: not SrcCompat
-M 5ac1e9b286 2008/01/11 32953
-R 4c84d7f2a0 2008/01/11 32954 remove -P switch: not BackCompat
-M 2b9dff6775 2008/01/11 32955
-R 9688998215 2008/01/11 32956 fix to 32954
-R 2f3529075c 2008/01/11 32958 fix to 32954
-R 402d2eb199 2008/01/11 32959 make PL_regex_pad[0] and SV: breakage risk
-M 895aa832c4 2008/01/11 32960
-R 4450b63044 2008/01/11 32961 SVt_REGEXP specific
-R 200ff815b6 2008/01/11 32962 fix to 32961
-M c9242b3f0d 2008/01/11 32963
-M e7c47b03cc 2008/01/12 32964
-M 83d8c2948c 2008/01/12 32965
-M 1de7d430c3 2008/01/12 32966
-M ea9222e036 2008/01/12 32967
-M d064452989 2008/01/12 32968
-R 9f621bb00a 2008/01/12 32969 length(undef) returns undef not 0: not BackCompat
-M 7637cd0734 2008/01/13 32970
-R 656266fc52 2008/01/13 32971 update to 9f621bb00a
-M 34f1896bf0 2008/01/14 32974
-R 9064044581 2008/01/14 32976 SVt_REGEXP specific
-M 643faf2806 2008/01/14 32977
-M 3e946625bd 2008/01/14 32978
-M a2309040b8 2008/01/15 32979
-M 8a0ba8a1aa 2008/01/15 32980
-M 9244ff22d9 2008/01/15 32981
-M d77cdebfaf 2008/01/16 32982
-M f5798d0b20 2008/01/16 32986
-M dda3675659 2008/01/17 32987
-M ac27d13b82 2008/01/17 32988
-M f3828575f1 2008/01/17 32989
-R b88df9907a 2008/01/17 32990 adds new warning
-M 3d826b294b 2008/01/18 32993
-M eb36cb72ef 2008/01/18 32994
-M 4bc6199fc6 2008/01/18 32995
-M 69867b4e28 2008/01/18 32996
-M 7191f387c0 2008/01/18 32997
-M b3c649451a 2008/01/18 32998
-M 81c61bd599 2008/01/18 32999
-M ec2019add1 2008/01/18 33000
-M f20b29985d 2008/01/18 33001
-M 829372d389 2008/01/18 33002
-M 51356d76df 2008/01/18 33003
-M 47031da69d 2008/01/18 33004
-M d11865445a 2008/01/19 33009
-M 0cbdab3870 2008/01/20 33010
-M 0588a1501b 2008/01/20 33011
-R 10067d9ac7 2008/01/20 33012 changes sig of PUSHFORMAT
-M c2d565bf20 2008/01/20 33013
-R f9c764c5b8 2008/01/20 33014 changes struct block_sub; not BinCompat
-R a61a706455 2008/01/20 33015 changes struct block_loop; not BinCompat
-R 8e6639977c 2008/01/20 33016 changes block_sub etc; not BinCompat
-M bafb2adc25 2008/01/20 33017
-R ae423868f0 2008/01/20 33018 changes block_sub etc; not BinCompat
-R bf38a47800 2008/01/21 33019 Change the hasargs return value from caller
-M 4f9115300b 2008/01/21 33020
-M 51ce55291b 2008/01/21 33021
-R 98625aca47 2008/01/21 33022 Change the wantarray result from caller
-M b8d2d791b6 2008/01/21 33023
-M 7df0357e86 2008/01/21 33024
-R 2f8edad0d3 2008/01/21 33025 change values for G_SCALAR etc
-M 377b109895 2008/01/21 33026
-R 3701055e79 2008/01/21 33027 Squeeze the context type down to 4 bits
-R 446d078759 2008/01/21 33028 In struct block change blku_type from U8 to U16,
-M 85a646323d 2008/01/21 33029
-R 17347a5143 2008/01/21 33030 In struct block_eval, eliminate old_in_eval
-M ebef0ab4be 2008/01/21 33031
-R 1f27d7886b 2008/01/21 33032 Tidy up context type flags.
-M 99710fe38e 2008/01/21 33033
-M c5bed6a7fc 2008/01/21 33034
-R 1ed74d0486 2008/01/21 33035 Eliminate the U8 sbu_once from struct subst,
-M 5c8c4cb2e5 2008/01/22 33036
-M 776a38e311 2008/01/22 33038
-M c297d531cc 2008/01/22 33040
-M 1e4c78015e 2008/01/23 33041
-M bf7c0a3d50 2008/01/23 33042
-M c57d4fd46a 2008/01/23 33043
-M 0a3c33ab0f 2008/01/23 33045
-M d73cfe96d5 2008/01/23 33046
-M f27add2b10 2008/01/23 33047
-M d2aeed1648 2008/01/23 33048
-P b68c599a12 2008/01/23 33049 skipped: sv.c t/op/inc.t
-M 3134ad69d9 2008/01/23 33050
-P 3ae1b22641 2008/01/23 33051 only remove Null?? from core; skip deprecating
-M 9849c14cd9 2008/01/23 33052
-M 9bdb0282d4 2008/01/23 33053
-M 7ea950175c 2008/01/23 33054
-M b10924eb6f 2008/01/23 33055
-M 9f99c5dc9c 2008/01/23 33056
-R 3b719c58b6 2008/01/24 33057 Split CXt_LOOP into CXt_LOOP_PLAIN and ...
-M 4b70616db4 2008/01/24 33058
-R a28356daf9 2008/01/24 33059 adds CXt_LOOP_STACK
-R 8b73ab1881 2008/01/24 33060 uses CXt_LOOP_STACK
-R c6fdafd0fe 2008/01/24 33061 adds CXt_LOOP_LAZYIV
-R c25bf6989e 2008/01/24 33062 uses CXt_LOOP_STACK
-R 493b0a3c46 2008/01/24 33063 uses CXt_LOOP_LAZYIV
-M de5429e8ea 2008/01/24 33064
-R a12a6a4d3f 2008/01/24 33065 uses new warning only added in blead
-M f38e12df22 2008/01/25 33066
-R 3bf7733be4 2008/01/25 33067 depends on new CXt_ stuff
-M 267cc4a811 2008/01/25 33068
-R 167f2c4d08 2008/01/25 33069 not BinCompat
-R d01136d6c9 2008/01/26 33070 more messing with struct block_loop
-P c0a413d189 2008/01/26 33071 only Peek.t; rest is fix for skipped 33069
-R 5edb5b2abb 2008/01/26 33072 Eliminate OP_SETSTATE
-R 840fe43365 2008/01/26 33073 update to 33070
-R b99874c792 2008/01/26 33074 more loop messing
-R 9a98d8a1ee 2008/01/26 33075 fix to 33074
-R d28d780685 2008/01/26 33076 more loop messing
-R 7fe4498558 2008/01/26 33077 fixes to bleed-only bits
-R f32d39a24d 2008/01/26 33078 blead-specific optimisation
-R dceb5f6256 2008/01/26 33079 fix to 33072
-P 09edbca0f5 2008/01/26 33080 itersave not removed
-R e846cb9248 2008/01/26 33081 not BinCompat
-M b900987b60 2008/01/27 33082
-P c9289b7b6d 2008/01/28 33083 Perl_save_padsv not removed
-M 899488baa2 2008/01/28 33084
-M 001d637e39 2008/01/28 33085 *** Perl_call_sv() VOL added to flags arg.
-R 6b75f04219 2008/01/28 33086 changed sig of PUSHEVAL
-M c6502f5c7c 2008/01/28 33087
-R 0a0ffbced7 2008/01/28 33088 lc(undef) etc now warn
-M 704d42154d 2008/01/28 33089
-M ea7cd9ccaf 2008/01/28 33090
-M 53bc175b76 2008/01/28 33091
-M a62d3a1b93 2008/01/28 33092
-M bda6a610ca 2008/01/28 33093
-M 89cc892864 2008/01/28 33094
-M e199845280 2008/01/28 33095
-M b41b1dd440 2008/01/28 33096
-M b75eac34e2 2008/01/28 33097
-M 8d2ac73b58 2008/01/28 33098
-M 74175ec198 2008/01/28 33099
-M a0604b4cdf 2008/01/29 33101
-M 7a823c1420 2008/01/29 33102
-R 15f169a108 2008/01/29 33103 consting
-M e3176d0917 2008/01/29 33104
-M c3c3bebb63 2008/01/29 33105
-P 8c54174d09 2008/01/29 33106 fixes for 33081 not merged
-R 52d1f6fbd7 2008/01/29 33109 update to 33106
-M fad23372ba 2008/01/30 33124
-M 2b631c9356 2008/01/30 33125
-M e148a7d386 2008/01/30 33127
-m 384f06ae49 2008/01/30 33129 lib/Math/BigInt/CalcEmu.pm pod fix skipped
-R 83f994449f 2008/01/31 33142 fix to 33103
-M af20bb8057 2008/01/31 33143
-M a371bcf3a4 2008/01/31 33144
-M 70aab261fe 2008/01/31 33152
-M 9135cc1c9c 2008/01/31 33153
-M ea6a7c5888 2008/01/31 33154
-M 43b09ad7a3 2008/02/01 33163
-M bb9fb6628b 2008/02/01 33170
-M 437d3b4e2c 2008/02/01 33178
-M fb632ce3b9 2008/02/02 33181
-R 92e45a3e6a 2008/02/02 33182 minor optimisation with breakage risk
- see also 96ccaf5388
-M 357244ac7b 2008/02/02 33193
-M 349133794f 2008/02/02 33206
-M 98deaf8b6f 2008/02/02 33208
-M b57c8994d1 2008/02/03 33222
-M 000fd473bc 2008/02/03 33223
-M 1bcecb7728 2008/02/03 33226
-R e1c418065b 2008/02/03 33228 consting
-M a0e63aba9e 2008/02/04 33229
-M 196d796ca0 2008/02/04 33230
-R de37a1949a 2008/02/04 33231 consting
-R 76753e7fcd 2008/02/04 33232 messing with CXt_ values
-M 8f3d514bf2 2008/02/04 33233
-M d0f7eaaf66 2008/02/04 33234
-M 519bf2a30a 2008/02/04 33235
-M 1c92ff99e7 2008/02/05 33236
-M 616f6b200d 2008/02/05 33237
-M cd6d5856d5 2008/02/05 33238
-M c6f750d107 2008/02/06 33239
-M 913ba1b7a5 2008/02/06 33241
-M 5d6b07c5a4 2008/02/06 33242
-M 6127f3cdd0 2008/02/07 33244
-R aad570aaa6 2008/02/07 33245 consting
-M 08c5d56415 2008/02/07 33246
-M 82cfb3a2c3 2008/02/08 33247
-M b727803b27 2008/02/08 33248
-R 5de3775cb1 2008/02/08 33249 consting
-M a592ba15a3 2008/02/08 33250
-M ddd401edfb 2008/02/08 33251
-R d5ece4e2f6 2008/02/08 33252 MM_Unix.pm: superceded by later merge
-M 9f4452f71a 2008/02/08 33253
-M 039698bb08 2008/02/08 33254
-M 099b16d3b5 2008/02/08 33255
-R 3468c7eaa8 2008/02/08 33256 changes sig of mg_copy() fns: not BinCompat
-M f88ee2835d 2008/02/08 33257
-M 7b0f711abd 2008/02/08 33258 IO::Handle
-M 3722f0dc40 2008/02/08 33259
-M 7e8c2d18d3 2008/02/08 33260
-M f8a4dbc572 2008/02/08 33261
-M 28c7948a09 2008/02/09 33262
-M 20b7c8df8c 2008/02/09 33263
-M 41d86c6b93 2008/02/09 33264
-M ca4cfd2853 2008/02/09 33265
-M 806b8cc26f 2008/02/10 33266
-R e71197e288 2008/02/10 33267 optimize OP_IS_* macros: not BinCompat
-M f7a782ffe2 2008/02/10 33268
-M bcabcc50f8 2008/02/10 33269
-M 734c245124 2008/02/10 33270
-M 9f6cc744b0 2008/02/10 33271
-M f3dc127a72 2008/02/10 33272
-R 8798655dec 2008/02/10 33273
-M dd568cb698 2008/02/11 33274
-M d207eff153 2008/02/11 33275
-M 251cc6a663 2008/02/11 33276
-R 7abfa3119c 2008/02/11 33277 a perltodo addition later done in bleed (33338)
-M 05cb221f7e 2008/02/11 33278
-M 8074533a0c 2008/02/11 33279
-M 22ccb26d0b 2008/02/11 33280
-M bd3ac2f12c 2008/02/11 33281
-M 8b4fe3688e 2008/02/11 33282
-M cf684db655 2008/02/11 33283
-M d38c8166c7 2008/02/11 33284
-M 53e8571218 2008/02/11 33285
-M d3056722ea 2008/02/12 33286
-M 3d4dd4c7b4 2008/02/12 33287
-M 4048f0105b 2008/02/12 33289
-M 9f10164a6c 2008/02/12 33290
-M 7918f24d20 2008/02/12 33291
-P 654eccd594 2008/02/12 33292 added PERL_BITFIELD* macros, but kept their
- 5.10.0 values.
-M 57dd0abb43 2008/02/12 33293
-M 795ee8854b 2008/02/12 33294
-M e25a7dc23f 2008/02/13 33295
-M babfacb9bd 2008/02/13 33296
-M 6ba536972b 2008/02/13 33297
-M 16bf6295de 2008/02/13 33298
-M 589df73be5 2008/02/13 33299
-M a3e405b265 2008/02/13 33300
-M cae86ea865 2008/02/13 33301
-R 781e3f0500 2008/02/13 33302 This change was later revoked by 33307
-M 9f4ee62979 2008/02/14 33303
-R fe9845cc76 2008/02/14 33304 I32 -> svtype in various fn sigs: Not BinCompat
-R 86f9315f71 2008/02/14 33305 changes a warning: not BackCompat (maybe)
-R c91c3a7516 2008/02/14 33306 fix for 33305
-R 7e623da313 2008/02/14 33307 see 33302
-R c4a2fd1a6f 2008/02/14 33308 fix for 33305
-R fa01e09300 2008/02/14 33309 fix for 33305
-M b16276bb9e 2008/02/14 33310
-M 27eaf14c55 2008/02/14 33311
-M e5e2ca09e6 2008/02/14 33312
-M 66072c9214 2008/02/14 33313
-M 7a81c58e43 2008/02/14 33314
-M 0053d415f5 2008/02/15 33315
-M 320adbb0e2 2008/02/15 33316
-M ac29ea6187 2008/02/15 33317
-M f16e9d76b4 2008/02/15 33318
-M 4137585d16 2008/02/15 33321
-M 50a25f5b3f 2008/02/16 33322
-M 34795b444e 2008/02/16 33323
-M 639081d6f9 2008/02/17 33324
-M 250257bbff 2008/02/17 33325
-M 3dd5fe6bfa 2008/02/18 33326
-M 4f61fd4b74 2008/02/18 33327
-M f7918450ac 2008/02/18 33328
-M 898471883c 2008/02/18 33329
-M 3fe25e0f6c 2008/02/18 33330
-M 54c7876f68 2008/02/18 33331
-M 473d7a83d6 2008/02/18 33332
-M 788c0c32a9 2008/02/18 33333
-M 16ec96eb5a 2008/02/18 33334
-M cb644b64ca 2008/02/20 33335
-R f30de7493b 2008/02/20 33336 fix to 33231
-M 1518d620d8 2008/02/20 33337
-R 9784f5f42a 2008/02/20 33338 Eliminate Perl_ck_lengthconst. Not BinCompat
-M 69587ea4eb 2008/02/21 33339
-M ba889e8f21 2008/02/21 33340
-M ce2ea237c5 2008/02/21 33341
-M 50edf520be 2008/02/22 33342
-M 9ec7171b93 2008/02/22 33343
-M 3caf316a13 2008/02/22 33344
-M 44490ef232 2008/02/22 33345
-R 46c71dd0b9 2008/02/22 33346 fix to 33338
-M f7e8b52a89 2008/02/22 33347
-M 76febb1c61 2008/02/22 33349
-M ec6c7eee5f 2008/02/22 33350
-M a93e78e3a0 2008/02/22 33352
-M 27c6397cde 2008/02/22 33353
-R c2f6176938 2008/02/22 33354 update embed.h: done manually at some point
-R 910e06714a 2008/02/22 33355 stops a couple of PL_ vars being volatile.
- I Don't know if it breaks BinCompat, but better safe than sorry...
-R 996c9baa63 2008/02/23 33356 adds a new op, so probably not BinCompat
-M 13432c88f9 2008/02/24 33357
-M 54c0bb3429 2008/02/24 33358
-M 7ef93cb2ba 2008/02/25 33359
-M 33d16ee735 2008/02/25 33360
-M 0a7dbd1b0b 2008/02/25 33361
-M 7fb1c73b91 2008/02/25 33362 (a chunk was missed and later added by
- 1255429e0faeb4e15efc61f7de8b03d43616155f)
-M c13076132a 2008/02/25 33363
-R 6ecf81d654 2008/02/25 33364 appears to be a follow-up to 33267
-R 14278b9c79 2008/02/25 33365 regen following 33356
-M 0a3a8dc0cd 2008/02/25 33366
-M 5fa9f95182 2008/02/25 33367
-M 553e7bb0c8 2008/02/25 33368
-M c427f4d2d4 2008/02/25 33369
-M 0934c9d92d 2008/02/25 33370
-M 721e227587 2008/02/25 33371
-M 03f3e794d7 2008/02/26 33372
-M 9ac1cbc083 2008/02/26 33373
-M cb7b5e07a2 2008/02/26 33374 this was applied out-of-sequence, so in fact
- several chunks were skipped since they were
- no longer needed.
-M dda32041ca 2008/02/26 33375
-R d2c25739ad 2008/02/26 33376 removes DEBUG_S
-M 98653f182f 2008/02/26 33377
-M 5d487c263b 2008/02/26 33378
-M ca7c1a2998 2008/02/26 33379
-M cfe5289891 2008/02/27 33380
-M e050cc0e6d 2008/02/27 33383
-M bcfe2509c9 2008/02/27 33384
-R 5fa45a31a1 2008/02/27 33385 fix to 33231
-M 54683d5edb 2008/02/27 33386
-M 291f766ec7 2008/02/27 33387
-M 4fd0a9b869 2008/02/27 33388
-M 6410718072 2008/02/27 33389
-M d8fca4022b 2008/02/27 33390
-M 705e6672c0 2008/02/29 33391
-M 6874676959 2008/02/29 33392
-M 2a7f4b9b07 2008/02/29 33393
-M 04955c1432 2008/02/29 33394
-M cd06ac219e 2008/02/29 33395
-M 3040be6a41 2008/02/29 33396
-M f35ac149cc 2008/02/29 33397
-M 451405367b 2008/02/29 33398
-M df029878ce 2008/02/29 33399
-R 7bc54ceabb 2008/02/29 33400 consting
-M 1a5dcd2a85 2008/02/29 33401
-M 566cc23fa3 2008/03/01 33402
-R 2e000ff293 2008/03/01 33403 consting
-M f6d658ccb3 2008/03/01 33404
-M 596fddd5e3 2008/03/02 33405
-R 2b021c5385 2008/03/02 33406 consting
-M 0544e6df68 2008/03/02 33407
-M 48dbb59ed9 2008/03/02 33408
-R af828c0195 2008/03/02 33409 consting
-M 546acaf953 2008/03/02 33410
-R ac1e9476da 2008/03/02 33411 consting
-M 3128eefee5 2008/03/03 33414
-M 5dd54fb425 2008/03/03 33416
-M 487af1873b 2008/03/03 33423
-M 51873376c5 2008/03/04 33431
-M 06494c4ce5 2008/03/04 33433
-M 1dcb720a51 2008/03/04 33434
-M b84c11c86f 2008/03/04 33437
-M 1e74786ab0 2008/03/05 33438
-M 9a35f1ea05 2008/03/05 33439
-M c491a205b5 2008/03/05 33440
-M b810cbf363 2008/03/05 33442
-M 354c4f6702 2008/03/05 33445
-M 042560a65f 2008/03/06 33447
-R 31e9e0a31e 2008/03/06 33448 consting
-R 6e9b0e18b7 2008/03/06 33450 consting
-M 75ca6fb6be 2008/03/07 33451
-M 2fed2a1ba9 2008/03/08 33452
-M 52a5bfab88 2008/03/08 33453
-M 7ba1936902 2008/03/09 33455
-M 8ed0547917 2008/03/09 33456
-M 3788ef8ffa 2008/03/10 33457
-M 218787bdb7 2008/03/10 33458
-M 3f6d40bd7f 2008/03/10 33460
-M 8964cfe010 2008/03/10 33462
-M 77e217c696 2008/03/10 33463
-M 58a97135f4 2008/03/10 33466
-M 27aaedc17a 2008/03/10 33467
-M 124e6c8489 2008/03/10 33468
-M 0db9c0cf00 2008/03/10 33469
-M 1842fafe88 2008/03/10 33470
-R 23f13727cc 2008/03/11 33471 consting
-R 12964ddd5d 2008/03/11 33473 consting
-M 09ec0e7302 2008/03/11 33480
-M 7e73a9801b 2008/03/11 33481
-M 867ade395b 2008/03/11 33482
-M b449fc5bc1 2008/03/11 33485
-M c0abe5aa02 2008/03/12 33486
-M 7c65b8e220 2008/03/12 33487
-M 02e7afe2ea 2008/03/12 33488
-R 89e3821218 2008/03/12 33489 consting
-M 1d791a44a4 2008/03/12 33491
-M 711e8db2de 2008/03/12 33492
-M 0dbed2e582 2008/03/12 33493
-M b63c7c552a 2008/03/12 33495
-M 9bab90c0f2 2008/03/12 33498
-M 848ff2a150 2008/03/12 33499
-M ba7c8aa54e 2008/03/12 33500
-M 81d4a902ec 2008/03/13 33503
-M 5ca745d264 2008/03/13 33504
-M 183ac38d1d 2008/03/13 33505
-M 4386d69d88 2008/03/13 33506
-R 66ceb53250 2008/03/13 33507 consting
-R 4f58fed66d 2008/03/13 33508 fix for 33507
-M 9a53e70c2f 2008/03/14 33523
-M c9967ac82c 2008/03/14 33531
-M b2866d4731 2008/03/14 33534
-M b6b9a09997 2008/03/15 33537
-M 424a4936e3 2008/03/15 33538
-M 08858ed21b 2008/03/17 33539
-R 3be3cdd69f 2008/03/18 33541 fix for 33507
-M 8b53a00d11 2008/03/18 33542
-M c762d24b2c 2008/03/19 33543
-M 4052d21cf2 2008/03/20 33544
-M 216dac0429 2008/03/21 33547
-M ed1b9de06a 2008/03/24 33550
-M 70ceb34a90 2008/03/24 33551
-M c21563cb95 2008/03/24 33552
-M f175cff5ca 2008/03/24 33553
-M 7027b9a31b 2008/03/25 33554
-M d3153aa44f 2008/03/25 33556
-M 502d9230ec 2008/03/25 33557
-M 8a5a710d2a 2008/03/25 33558
-M 0c42fe9565 2008/03/25 33559
-M 523f125d4a 2008/03/25 33560
-R 1eb6e4ca6a 2008/03/25 33561 consting
-M ba40575b1b 2008/03/25 33562
-R b88ec9b84f 2008/03/25 33563 fix for 33561
-M 8c32f14907 2008/03/25 33564
-M c05290799f 2008/03/25 33565
-M 038ae9a457 2008/03/25 33566
-M 553b5000d7 2008/03/25 33567
-M 86de2d7dbe 2008/03/26 33568
-M 2ae0a74966 2008/03/26 33569
-M 9df8f87f35 2008/03/26 33570
-M d884a504e3 2008/03/26 33571
-M 88405f6502 2008/03/26 33573
-R 431844234a 2008/03/26 33575 MM_Unix.pm: superceded by later merge
-R 43e0a8bc5b 2008/03/26 33577 make meta
-M ec08ff806c 2008/03/26 33578
-M efcbbafbf1 2008/03/26 33579
-M ce47496284 2008/03/26 33580
-M 083e921211 2008/03/27 33583
-M 643e696a61 2008/03/27 33584
-M b50d78f710 2008/03/28 33589
-M a5bd55ee89 2008/03/28 33591
-P 0078014ad8 2008/03/28 33592 lib/CGI/t/upload_post_text.txt wasn't added,
- but thats okay because 33643 should have deleted it anyway
-M 02eafbe222 2008/03/28 33594
-M d17ea59705 2008/03/29 33595
-M cddfcddc19 2008/03/29 33596
-M 3420cd608b 2008/03/29 33597
-M 1cd66f7c5b 2008/03/29 33598
-M 551574687c 2008/03/29 33601
-M 08593cf4c9 2008/03/30 33606
-M 95aa056551 2008/03/30 33608
-M a5e412a342 2008/03/30 33609
-M cc8432b2c2 2008/03/31 33612
-M c0dd94a09f 2008/03/31 33618
-M 6f154b1b7e 2008/03/31 33621
-M 33768f1313 2008/03/31 33622
-M d8528f07d4 2008/03/31 33623
-M c595d0543e 2008/04/01 33624
-M 159fce989f 2008/04/01 33625
-M 27aecdc667 2008/04/01 33626
-M 84335ee933 2008/04/01 33627
-M e82be400b1 2008/04/02 33629
-M f25eda1080 2008/04/02 33631
-M aedff202e4 2008/04/02 33632
-M 63da683703 2008/04/03 33639
-P 15f82b891b 2008/04/03 33643 skipped deleting lib/CGI/t/upload_post_text.txt
- (see 33592)
-M 8aef763e17 2008/04/04 33644
-R 2e1c5ef038 2008/04/04 33645 make a couple of PL_ vars static: not BinCompat
-M cd387eedac 2008/04/04 33646
-M 8a4f037860 2008/04/05 33647
-M 20e8a3a35e 2008/04/05 33648
-M 5cd1aaf046 2008/04/06 33649
-M 9f5e10ca92 2008/04/06 33650
-M f126b98bb2 2008/04/06 33651
-M 439cad7f0a 2008/04/06 33652 add 'Exterminate! cop_label' to perltodo
-M 4b65a91961 2008/04/06 33653
-R 06f53df5b0 2008/04/06 33654 removes SAVECOPLABEL* macros
-R b1cf8b3600 2008/04/06 33655 change to CxLABEL not applicable to maint
-P dca6062a86 2008/04/07 33656 only Deparse.pm; the cop.h stuff isn't BinCompat
-P 012da8e581 2008/04/07 33657 only perltodo part (undoing 33652)
-M d5b8ed548f 2008/04/07 33658
-R 223bd15485 2008/04/07 33659 fix to the S_refcounted_he_new_common() function,
- which only exists in blead
-M 7a07078aee 2008/04/08 33661
-M 52960e22f7 2008/04/08 33663
-M 3462340b11 2008/04/09 33664
-M f2df708187 2008/04/11 33665
-M 4de3d1625c 2008/04/11 33666
-M 89c6a13e14 2008/04/11 33667
-M 9d0f7ed753 2008/04/11 33668
-M c4f3bd1eee 2008/04/11 33669
-M 4d567a5610 2008/04/12 33670
-M a2e578dad2 2008/04/13 33671
-M 1d175cda9d 2008/04/13 33672
-M bf8300decc 2008/04/13 33673
-M 946b2ae57c 2008/04/14 33674
-M 523b30316c 2008/04/14 33675
-M 9d6bff3578 2008/04/14 33676
-R 72241cc917 2008/04/14 33677 fix to store_cop_label(), which isn't in blead
-M a1021d5787 2008/04/14 33678
-M 61a59f30bc 2008/04/14 33679
-M 1bab44f9bb 2008/04/14 33680
-M 549135093e 2008/04/14 33681
-M bfa6c41890 2008/04/14 33682
-M b3562f19ee 2008/04/15 33683
-M 5562fa714b 2008/04/15 33684
-M ef0d4e1792 2008/04/15 33685
-M d3004175ef 2008/04/15 33686
-M c53f1caa29 2008/04/15 33687
-M ea2e58b901 2008/04/15 33688
-M da0c1bbe91 2008/04/15 33689
-M bdff39c73b 2008/04/15 33690
-M 5633ac3d94 2008/04/15 33691
-M dfa82ec08f 2008/04/15 33692
-M e780cd3490 2008/04/15 33693
-M cc93af5fbd 2008/04/15 33695
-M 7edbdc6bb4 2008/04/16 33696
-M b91ba1f24f 2008/04/16 33697
-M f1e71051a8 2008/04/16 33698
-M 0bc2b4f8b4 2008/04/16 33699
-M 2f90724352 2008/04/16 33700
-M c94593d002 2008/04/16 33701
-R 256d1bb207 2008/04/17 33702 (unknown reason)
-R 22e0b5c0d8 2008/04/17 33703 (unknown reason)
-R c49b597d07 2008/04/17 33704 (unknown reason)
-M 37698ac13e 2008/04/17 33705
-R eff494dd14 2008/04/17 33706 (unknown reason)
-R c9bf4021f2 2008/04/17 33707 (unknown reason)
-M 057163d74a 2008/04/17 33708
-M 12e06b6fd7 2008/04/17 33709
-M f6f3a1fea2 2008/04/18 33710
-M 4e42dfb144 2008/04/18 33711
-M 514f8bac36 2008/04/18 33712
-M 432fb0a0d3 2008/04/18 33713
-M 7ecdd21170 2008/04/19 33714
-M 0dceeee6e9 2008/04/21 33715
-M d54256afc2 2008/04/21 33716
-M b5701e9edd 2008/04/22 33720
-M c3fb68a339 2008/04/22 33721
-M 18a16cc572 2008/04/22 33724
-M 5d96f59891 2008/04/23 33734
-M c6eb6e8a70 2008/04/24 33737
-M c829329af6 2008/04/24 33738
-M 33bf2ce557 2008/04/24 33739
-M 671637fed4 2008/04/24 33740
-M 406878ddde 2008/04/24 33741
-M 5f31e3ad80 2008/04/26 33747
-M c2aba5b82f 2008/04/26 33748
-M 5bf4f5b389 2008/04/26 33749
-M a26136ef4f 2008/04/26 33750 hand-merged by change 33785
-M 216e512e84 2008/04/26 33751
-M fdf0a293a8 2008/04/26 33752
-M f8d0f69b87 2008/04/27 33753
-M 798518689d 2008/04/27 33756
-M 05bc20f304 2008/04/27 33757
-M d12f7a6a49 2008/04/27 33758
-M 8241c1c038 2008/04/27 33759
-M 3d6c2ba7f8 2008/04/27 33760
-M 016e9c5695 2008/04/28 33761
-M ad3a8c6706 2008/04/28 33762
-M 40c7cc6dda 2008/04/29 33763
-M 83eea843e6 2008/04/30 33764
-M 9c2a5cfebc 2008/04/30 33765
-R a79b25b7e1 2008/04/30 33766 (unknown reason)
-M 987aaf079b 2008/04/30 33767
-M eb5a2f3c94 2008/04/30 33768
-M 4dafff080a 2008/04/30 33769
-M a91d1d4276 2008/04/30 33770
-M 98274836b0 2008/04/30 33771
-M 9de9b613d4 2008/04/30 33772
-M ebb7c588e1 2008/04/30 33773
-M d4e5d774f7 2008/04/30 33774
-M aa4af5426d 2008/04/30 33775
-M aa472d819a 2008/05/01 33776
-M e67b97bd97 2008/05/02 33777 hand-merged by change 33785 (allowing for
- no SVt_REGEXP)
-M 90630e3c74 2008/05/02 33778
-M 4eb6bdb812 2008/05/02 33779
-M fd72f444d8 2008/05/02 33780
-M 47c27f0161 2008/05/02 33781
-M 058e2a45ff 2008/05/02 33782
-M d7a49bad0e 2008/05/04 33783
-M 048d9da8ec 2008/05/04 33788
-M 76051f89dc 2008/05/07 33789
-M 02c1405339 2008/05/08 33790
-M bd1c7bd234 2008/05/08 33791
-M b1d302cbe7 2008/05/08 33792
-M cfa308ca48 2008/05/08 33793
-m 81ec4fbc83 2008/05/08 33794 Just the 'make Copy.t strict-safe' part
-! 9c76cba290 2008/05/08 33795 (the version bump of this change appears in maint via #34522)
-! 91ca337ee7 2008/05/08 33796 Copy.pm stuff
-M 8a3f7e956e 2008/05/09 33797
-M e4911a48a0 2008/05/09 33798
-M a94e4597e1 2008/05/10 33799
-M 0263186c5d 2008/05/10 33800
-! c4e1003e21 2008/05/10 33804 File::Copy
-M 56b24bb689 2008/05/10 33807
-M ac9d3a9d44 2008/05/10 33808
-M f6d55995ce 2008/05/10 33809
-M 500a801928 2008/05/10 33811
-R 547bb2675d 2008/05/10 33814 (unknown reason)
-M 68f8932eb5 2008/05/10 33815
-M be71433107 2008/05/10 33816
-M 9f63972859 2008/05/11 33822
-M 8d2082b010 2008/05/13 33824
-M a5d7522178 2008/05/15 33825
-M 9b68a132fa 2008/05/15 33826
-M d195d98b12 2008/05/15 33827
-M d5e10e571a 2008/05/15 33828
-M 61699fd9cf 2008/05/15 33829
-M 839c1407d2 2008/05/15 33830
-M 1e968d83d8 2008/05/15 33831
-M 06c0dd34a6 2008/05/16 33832
-M f05d7009ff 2008/05/16 33833
-M 1d888ee364 2008/05/16 33834
-M 5668511f4f 2008/05/16 33835
-M 373098c085 2008/05/16 33836
-M 206957a79d 2008/05/16 33837
-M b8d86d89db 2008/05/16 33838
-M 670096dbbf 2008/05/16 33839
-M 9649ed94a1 2008/05/17 33840
-M a55bb48be6 2008/05/17 33841
-M 8f68b0e606 2008/05/17 33843
-M a33f2d9ff7 2008/05/17 33845
-M a1787f2408 2008/05/18 33846
-M 09782346ff 2008/05/18 33847
-M 5f1da31cc3 2008/05/18 33848
-M b0fdf69ec5 2008/05/18 33849
-M 0d7a9d9f45 2008/05/18 33850
-M 03b22f1b10 2008/05/18 33851
-M e9d89077a6 2008/05/18 33852
-M 8233f60648 2008/05/18 33853
-M e385c3bfc8 2008/05/18 33854
-R be25f60935 2008/05/18 33858 Add ..., !!!, and ??? operators
- probably not BackCompat
-M 68006eeaf2 2008/05/19 33859
-M a8f3d2d7ed 2008/05/19 33860
-M 2227e2d5ff 2008/05/19 33861
-M 9e6fc21fcd 2008/05/19 33862
-M 3cc5758cc9 2008/05/19 33863
-M dca8fd5cbb 2008/05/19 33864
-M 91d0cbf6b4 2008/05/19 33865
-M bcb8f0e81f 2008/05/19 33869
-R d3c2e0214a 2008/05/19 33870 (unknown reason)
-M 3182b11b46 2008/05/19 33871
-R 984f9f6647 2008/05/20 33874 was merged, then later reverted by be5c7c66a6
-R ace56ae504 2008/05/20 33876 was merged, then later reverted by 384dc2341d
-M b2f871edc3 2008/05/20 33887
-R 9453289ade 2008/05/20 33890 was merged, then later reverted by 749f7a5348
-M 99978bb4f6 2008/05/20 33891
-M e99d581a4a 2008/05/21 33896
-M 72bfe1b2b3 2008/05/21 33897
-M ea86b3de35 2008/05/21 33898
-M 1eea129cab 2008/05/21 33899
-M 79706302bf 2008/05/21 33900
-M afa74d4282 2008/05/21 33901
-M 8565890c86 2008/05/21 33902
-M 5488f21b4e 2008/05/22 33905
-M effb568a5e 2008/05/22 33906
-M 827116e637 2008/05/22 33907
-M b60ab40eb1 2008/05/23 33909
-M 93c512172a 2008/05/23 33910
-M 68c65ec0ad 2008/05/23 33911
-M b27284eed0 2008/05/23 33912
-M b8e1b25f6a 2008/05/23 33914
-! 32d6804057 2008/05/23 33916 File::Copy
-M 3df1a9e2cb 2008/05/24 33918
-M e08926902e 2008/05/24 33919
-M 4f923b5674 2008/05/25 33927
-M d49025b75d 2008/05/25 33936
-M 62b40d2474 2008/05/27 33937
-M 2c476adc76 2008/05/27 33939
-M ad56049d11 2008/05/29 33948
-M 3ab9413366 2008/05/29 33949
-M 10489e4195 2008/05/30 33951
-M 8ba22ff48d 2008/05/30 33952
-M 19c4478c87 2008/05/31 33956
-M a1c7933fc4 2008/05/31 33971
-M 70f874d356 2008/06/01 33973
-M e336069e0f 2008/06/01 33974
-M 597c4554ca 2008/06/01 33975
-M 848ead8701 2008/06/01 33977
-M 9d97e8b8ca 2008/06/01 33978
-M ac0638ad05 2008/06/01 33979
-M a811a5cf5b 2008/06/01 33980
-R 1e21d011cd 2008/06/01 33981 (unknown reason)
-M d685c22b7f 2008/06/01 33982
-M bc3f1c14f9 2008/06/01 33983 ext/IO/lib/IO/Dir.pm 1.06_01
-M 6f86311fbd 2008/06/01 33984 ext/IO/lib/IO/Dir.pm 1.06_01
-M a911a0f814 2008/06/01 33985
-! 7029ff3723 2008/06/02 33986 File::Copy
-M 55595e835e 2008/06/02 33987
-M af638b876e 2008/06/02 33988
-M 04636146cb 2008/06/02 33989
-M 4319409baa 2008/06/02 33990
-M 597fc7a09a 2008/06/03 33991
-M 11ed4d0171 2008/06/03 33992
-M 83b907a4c2 2008/06/03 33993
-M ccea220c53 2008/06/04 33995
-M f0291b57b3 2008/06/04 33996
-M 69473a205b 2008/06/04 33997
-R 42e4baff30 2008/06/05 33998 assimilate HTML-Parser; reversed by 34001
-M 8365c870bf 2008/06/05 33999
-M 8737ae4dee 2008/06/05 34000
-R 8ba733f51b 2008/06/05 34001 see 33998
-M dce0cf36a3 2008/06/05 34002
-M df19a7184d 2008/06/05 34003
-M 3fe752ba88 2008/06/06 34004
-M f93f88eb61 2008/06/06 34005
-M 599230fcc2 2008/06/07 34014
-M 6f878116a0 2008/06/07 34016
-M 4d5692de8d 2008/06/08 34019
-M 26ab4e07be 2008/06/08 34020
-R 9e8d7757ba 2008/06/08 34021 (unknown reason)
-R 327323c144 2008/06/08 34022 (unknown reason)
-R aef2a98a19 2008/06/08 34023 (unknown reason)
-M 24ead1638d 2008/06/08 34024
-M 5a33563ff2 2008/06/08 34025
-M 055cc54b41 2008/06/08 34026
-M d6db67f2d9 2008/06/08 34027 smartmatch doc patch
-P 91a462243e 2008/06/08 34028 update Pod-Perldoc to version 3.14_07
- merged just the Maintainers.pl bit;
- the rest rejected as Pod-Perldoc >= 3.14_06
- breaks BackCompat
-M 603aa20df5 2008/06/08 34029
-M 7948fc082b 2008/06/08 34030
-M e5ae200f29 2008/06/08 34031
-M 3ec35e0f92 2008/06/09 34038
-M 3a92e6ae87 2008/06/09 34039
-M f21873d1c0 2008/06/10 34040
-M 3d8721739e 2008/06/10 34041
-M c0ed5c7567 2008/06/11 34042
-M 661290c7db 2008/06/11 34043
-M d4d22eb373 2008/06/11 34044
-M 93f00e883a 2008/06/13 34045
-M 8381071f75 2008/06/13 34046
-M 6c791b1568 2008/06/13 34047
-M 561ee912c4 2008/06/13 34048
-M 1090e0729d 2008/06/13 34049
-M 84bd4c3a0c 2008/06/13 34050
-M 3d4f2f8982 2008/06/13 34051
-M 211b0ba37c 2008/06/13 34052
-M e0951028b5 2008/06/14 34053
-M cd1a9f552f 2008/06/15 34054
-M 49c95d583e 2008/06/15 34055
-M 67fcfcf925 2008/06/15 34056
-M 803e1be130 2008/06/16 34057
-M 2605937c60 2008/06/16 34058
-M d4a42255d2 2008/06/16 34060
-M 54c90be196 2008/06/16 34061
-M 227375e110 2008/06/16 34063
-M 1d8eaf8cf5 2008/06/16 34064
-M 8dc00b2f10 2008/06/17 34067
-M 8433848b13 2008/06/17 34068
-M ab69dbc258 2008/06/17 34069
-M cba5fa5d0a 2008/06/17 34070
-M 799361c3c9 2008/06/17 34071
-M e1371c0327 2008/06/18 34072
-M d909c5cbac 2008/06/18 34073
-M 15b48317ac 2008/06/19 34074
-M 79a3ac157a 2008/06/20 34075
-M a73918ec93 2008/06/21 34076
-M 8b0dea507b 2008/06/22 34077
-M 532939df37 2008/06/23 34078
-M b48653af3d 2008/06/23 34080
-M 5437faeb38 2008/06/24 34081
-M d59d305206 2008/06/24 34083
-M fa8d183667 2008/06/24 34084
-M 7367e658df 2008/06/24 34085
-M 7541f2962a 2008/06/25 34086
-M 6cefa69e9d 2008/06/25 34087
-M a3ed38f29b 2008/06/25 34088
-M 5c0c92498b 2008/06/26 34089
-M 280cf07eab 2008/06/27 34090
-M 087986a76c 2008/06/28 34091
-M 6e592b3a92 2008/06/28 34092
-M b11304a195 2008/06/28 34093
-M a7aed57248 2008/06/30 34094
-M 4482644218 2008/07/01 34097
-M c4393b60d8 2008/07/02 34098
-M 928cb7d46e 2008/07/03 34099
-M a782d47cad 2008/07/03 34100
-M ab14db95b0 2008/07/03 34101
-M a13351642e 2008/07/06 34102 one chunk initially missed; was later
- added by f68cd6cd87c795f45dc31a692500c8221c711525
-
-M 2fd0906e14 2008/07/07 34103
-M 81c4fd9ed7 2008/07/07 34105
-M cbb9e8a748 2008/07/07 34107
-M 5fe9b82b31 2008/07/08 34109
-M 98916cfa40 2008/07/08 34110
-M 5bcaa86b3b 2008/07/08 34112
-M 92a3ac59c9 2008/07/08 34114
-M 4b7e285e7a 2008/07/09 34115
-M 994c4576e6 2008/07/09 34116
-M 39b6627f59 2008/07/10 34117
-M 7600f30e40 2008/07/10 34118
-M 36a30365a7 2008/07/10 34120
-M 6108250ca7 2008/07/11 34121
-M f5b75c1c0d 2008/07/11 34122
-M 2027357eec 2008/07/11 34123
-M 90f67b0003 2008/07/11 34124
-M e32383e2a3 2008/07/11 34125
-M d2821e7281 2008/07/11 34126
-M a49b46c637 2008/07/11 34127
-M 4612962a48 2008/07/11 34128
-M f3f2f1a347 2008/07/11 34129
-M 9c0a17a0f8 2008/07/11 34130
-M 597140e250 2008/07/11 34131
-M bfe27a5875 2008/07/12 34132
-R 30ec677dd4 2008/07/12 34133 was integrated, then backed out by 35026 - can't remember why
-R c568a9d186 2008/07/12 34134 (unknown reason)
-M 003d2c645c 2008/07/12 34135
-M 26bfa6e19e 2008/07/13 34136
-M 7e455f685b 2008/07/13 34137
-M 6c65d5f933 2008/07/13 34138
-M e8e72d4192 2008/07/13 34139
-M 35c6393c7a 2008/07/13 34140
-M a469502ffd 2008/07/15 34141
-M 219bf41872 2008/07/15 34142
-M e27835eefa 2008/07/15 34143
-M 837cb3bace 2008/07/15 34144
-M e11a3f9e25 2008/07/16 34145
-M 7cd4b8a818 2008/07/16 34146
-M 7e1027b93a 2008/07/16 34147
-M 966e813891 2008/07/16 34148
-M e4ddb720dd 2008/07/16 34149
-M 4271b52731 2008/07/16 34150
-M ec83ea38eb 2008/07/18 34151
-M 7bb7fa3865 2008/07/22 34152
-M 0e4e3f6e96 2008/07/22 34153
-M 2d4a14fe01 2008/07/23 34154
-M ed272d6f37 2008/07/23 34155
-M 8fdbae2509 2008/07/23 34156
-M dab34d0f01 2008/07/26 34157
-R 341b787604 2008/07/26 34158 (unknown reason)
-M 48f8bad929 2008/07/26 34159
-M 3880c8ecf1 2008/07/27 34160
-M 395ff119ce 2008/07/29 34162
-M b09a11114b 2008/07/30 34163
-M 3e927c5026 2008/07/30 34164
-M 85d2acea42 2008/07/30 34165
-M a1fea99b3d 2008/07/31 34166
-M 5129b2ca8d 2008/07/31 34167
-M b78dccfb97 2008/07/31 34168
-M f7c6915850 2008/07/31 34169
-M f9a01fbf80 2008/08/04 34170
-M fcf99ed44d 2008/08/06 34171
-M 9a4933c3f3 2008/08/06 34172
-M 7a7e493693 2008/08/06 34173
-M 9ae5a6c323 2008/08/06 34174
-M 75ff0aabd9 2008/08/06 34175
-M e6867818d3 2008/08/07 34176
-M 0ae187c229 2008/08/07 34177
-M c1ddc35c47 2008/08/07 34178
-M 748a4b20da 2008/08/07 34179
-M 1c25d39434 2008/08/07 34180
-M 213f370f28 2008/08/07 34181
-M 62a28c976c 2008/08/07 34182
-M 16570ae7ee 2008/08/08 34183
-M 2d90ac9586 2008/08/08 34184
-M 67d8fe77dd 2008/08/08 34185
-M 1d40d392b4 2008/08/08 34188
-M c707cc0022 2008/08/08 34189
-M cd1d2f8a20 2008/08/09 34190
-M 2f4cffa772 2008/08/09 34191
-M 0279961e65 2008/08/09 34192
-M 6dbcfe36a5 2008/08/10 34193
-M e0ef849f91 2008/08/10 34194
-M a13fba344b 2008/08/10 34195
-M ffe4764e69 2008/08/10 34196
-M 1c5b513e3f 2008/08/10 34197
-M 07a28ea7fe 2008/08/11 34198
-M 5f9145a3c5 2008/08/11 34200
-R a201cd3127 2008/08/11 34201 (unknown reason)
-M 2811b8367c 2008/08/12 34202
-M 7aa55bb4d7 2008/08/13 34203
-M b091e0d1cb 2008/08/17 34204
-M 06d90eb2f6 2008/08/19 34205
-M 90bc526312 2008/08/19 34206
-M 69032df759 2008/08/19 34207
-M 7ee5fac837 2008/08/20 34208
-M b17f5ab768 2008/08/20 34209
-M 41fae7a143 2008/08/20 34210
-M fd996479e2 2008/08/21 34211
-M 90e91dd8c9 2008/08/21 34212
-M 785bee4f7c 2008/08/21 34213
-M 8e45cc2bb9 2008/08/22 34214
-M f46ee2483d 2008/08/22 34215
-M d28af14635 2008/08/22 34216
-M 5da8ab6323 2008/08/22 34217
-M 56e771c1bc 2008/08/22 34218
-M b5920ff0f6 2008/08/24 34219
-M 990198f075 2008/08/24 34220
-M 8c44bff1ac 2008/08/24 34221
-M fd8ebd06d0 2008/08/24 34222
-M 228ee848f0 2008/08/24 34223
-R 777723442a 2008/08/24 34224 (unknown reason)
-M 9d27dca99b 2008/08/24 34225
-M 2a21c44486 2008/08/25 34226
-M fbd6575c91 2008/08/26 34227
-M 45f2a18c3b 2008/08/26 34228
-M 6dcddb8726 2008/08/26 34229
-M c1d0a804f4 2008/08/26 34230
-M fe0438b3fd 2008/08/26 34231
-M e34765e4dc 2008/08/26 34232
-M 6459291e97 2008/08/26 34233
-M d3133c8951 2008/08/28 34234
-M 99d21f8bc4 2008/08/30 34235
-M 08baf50377 2008/08/30 34236
-M 10865379b2 2008/08/30 34237
-M d976ca1bf5 2008/09/01 34238
-M 95731d2265 2008/09/02 34239
-M 98fca0e8e7 2008/09/02 34240
-M 162f8c6795 2008/09/02 34241
-M 8d159ec130 2008/09/02 34242
-M 98af1e1420 2008/09/02 34243
-R b51c85cfec 2008/09/03 34252 version bumps subsumed by later merges
-M 9c7085bebb 2008/09/03 34258
-M 920f5fe1a2 2008/09/05 34272
-M 598d6e99fa 2008/09/05 34278
-M 6ada912ce2 2008/09/05 34282
-M e1c7048425 2008/09/07 34302
-M 9276022363 2008/09/07 34303
-M 00ca1d0d42 2008/09/07 34306
-M b91dd380a9 2008/09/07 34307
-M 0b9c91f651 2008/09/07 34308
-M 5625ef69b6 2008/09/07 34309
-R edbe35ea95 2008/09/07 34310 optimise 'if !$x' -
- might have subtle overloading issues
-M 6ae70e43e2 2008/09/07 34311
-M ea581a515b 2008/09/07 34312
-M cd1b270f96 2008/09/07 34314
-M 3551ef6f06 2008/09/08 34315
-M c1c45e367d 2008/09/08 34316
-M 5a20539ce2 2008/09/08 34317 see also 54d0eb3cfc
-M f0cb210418 2008/09/08 34318
-M 2234743e59 2008/09/08 34319
-M f8a128a908 2008/09/08 34320
-M e37e15afdc 2008/09/08 34321
-R 07f3cdf531 2008/09/08 34322 see 34310
-M 8b80c7bdc6 2008/09/09 34324
-M 0642d82a23 2008/09/09 34328
-M 9965363eb5 2008/09/09 34329
-R 76eeff750b 2008/09/10 34330 update Changes
-M 6516816e47 2008/09/10 34334
-M a6c9a8153f 2008/09/10 34337
-M 31f0e52e4a 2008/09/11 34338
-M 477acd91b7 2008/09/11 34348
-M 515a4f721c 2008/09/11 34349
-M 4a9e32d883 2008/09/11 34350
-M d43aa7f92b 2008/09/11 34351
-M 90903f12d8 2008/09/11 34352
-M c109477dfd 2008/09/11 34353
-M a49ba3fcbe 2008/09/12 34354
-M 5782d50227 2008/09/12 34355
-M 6e4aef5913 2008/09/12 34356
-M ed09b296cb 2008/09/12 34357
-M 71c4dbc371 2008/09/13 34358
-M 27fc0087fc 2008/09/13 34359
-M 18eb2ade7d 2008/09/14 34361
-M 73e6e416ba 2008/09/15 34363
-M bc9c751170 2008/09/15 34364
-M ae8d64f560 2008/09/15 34365
-M 14be452708 2008/09/15 34369
-M 343ed43ca4 2008/09/15 34370
-M 82f1394b02 2008/09/15 34371
-M 3affb40daa 2008/09/16 34373
-M f89542f789 2008/09/16 34377
-M 7ed5353dcf 2008/09/17 34378
-M f2b0c9f791 2008/09/17 34379
-M 3544fab439 2008/09/19 34380
-R c33269f7cc 2008/09/20 34381 make 2 fns static:
- S_regdump_extflags was arady present in 5.10.0,
- S_get_aux_mg was added by 32680, which isn't merged
-R 1da83c398c 2008/09/20 34383 fix for S_refcounted_he_new_common,
- which is only in blead
-M 5eb30066fe 2008/09/20 34384 IO::Handle
-M d3383c7531 2008/09/21 34385
-M 592b6146ab 2008/09/21 34386
-M df6b13cea9 2008/09/21 34387
-M 73bf75527b 2008/09/21 34388
-M 1f025261d8 2008/09/21 34389
-M 309c1fb6a6 2008/09/22 34390
-M 8adca19127 2008/09/22 34391
-M f5bb2f4989 2008/09/22 34392
-M 44d268c35b 2008/09/22 34400
-M 99df65aa94 2008/09/23 34402
-M 389a661add 2008/09/23 34404
-M 4d3af52d85 2008/09/23 34406
-M b20801968f 2008/09/23 34408
-M f667a15aba 2008/09/23 34409
-M 2402d92aa3 2008/09/24 34414
-M ce0834da05 2008/09/25 34416
-M f9c1763618 2008/09/25 34417
-M 5b1f73597c 2008/09/25 34418
-M b648617953 2008/09/25 34419
-M a4a03afaa8 2008/09/26 34420
-M 2504ae5250 2008/09/26 34421
-M 80a65c702a 2008/09/26 34422
-M 9f34a1744f 2008/09/26 34423
-M 9253672d50 2008/09/26 34425
-M 35f998ddd1 2008/09/27 34433
-M bb07982c12 2008/09/27 34434
-M 494bd33348 2008/09/27 34435
-M 2e65e370d3 2008/09/29 34440
-M e6a5675bfd 2008/09/29 34441
-M ec0c3fb5aa 2008/09/29 34442
-M 690aedd128 2008/09/29 34443
-M 5bca5c48fc 2008/09/29 34444
-M 738349a8c2 2008/09/30 34446
-M c1c8b72b4c 2008/09/30 34447
-M d1ef72e8d5 2008/09/30 34448
-M 049aaf37de 2008/09/30 34449
-M 565590b5d6 2008/10/01 34451
-M 642eb38136 2008/10/01 34452
-M 5ccadbde51 2008/10/01 34453
-M c3ae9cdede 2008/10/01 34454
-M 969386165d 2008/10/03 34456
-M 7d4b806a36 2008/10/05 34457
-M 9c2e5420e4 2008/10/05 34458
-M 37937176ad 2008/10/05 34460
-M 9be01f29fa 2008/10/05 34463
-M 45cf45700e 2008/10/05 34464
-M 8c9af2bf5b 2008/10/06 34466
-M 92e71c9183 2008/10/07 34469
-M 83ff24d4e9 2008/10/07 34470
-M 6553334e8c 2008/10/07 34471
-M 6e65461805 2008/10/10 34472
-M be4f373d52 2008/10/11 34473
-M d5f3326709 2008/10/12 34474
-M c01be2ceee 2008/10/12 34475
-M e7fab88422 2008/10/14 34479
-M 6bf6381f45 2008/10/15 34481
-M bf87a6a153 2008/10/15 34482
-M ccbd73a450 2008/10/15 34483
-M 717da8a420 2008/10/15 34484
-M b47164137a 2008/10/15 34485
-M f56953582a 2008/10/15 34486
-M 87f9c3f59c 2008/10/15 34488
-M 50d1e3bd60 2008/10/15 34490
-M 417991fcde 2008/10/15 34491
-M 95e0691656 2008/10/16 34494
-M a65cb92d1f 2008/10/17 34498
-M 1b289682be 2008/10/18 34504
-M 711690a16d 2008/10/18 34505
-M a954f6ee31 2008/10/18 34506 see fd3789393493ada3cc3ec01fcbc500c4e9c0f5b1
-M b023a8eeff 2008/10/18 34507
-M 1d5acac0f9 2008/10/18 34508
-R 14297b8f35 2008/10/18 34509 makemeta
-M dbcf044e38 2008/10/18 34510
-M 444c2e40cd 2008/10/18 34513
-M 486bcc50ba 2008/10/19 34514
-! e55c0a828f 2008/10/19 34519
-! 15baf0c4b0 2008/10/20 34521 lib/File/Copy.pm - skipping new perms stuff
-M 5f259b1a7b 2008/10/20 34526
-M afe79e7bf0 2008/10/20 34528
-M 325f7ffd84 2008/10/20 34529
-M 7a0d61f233 2008/10/20 34531
-M b5b9b3855f 2008/10/20 34541
-M b230e30d6b 2008/10/21 34542
-M 8589c6b914 2008/10/21 34543
-M 730397904b 2008/10/21 34544
-M c76230386f 2008/10/21 34545
-M 3ac4909ed2 2008/10/21 34546
-M 2e32143ebf 2008/10/21 34548
-M e853cbadf1 2008/10/21 34553
-M 881e6572cd 2008/10/21 34554
-M fd7af15511 2008/10/21 34555
-M 1bae32dbd4 2008/10/23 34561
-M 28ff97357b 2008/10/23 34562
-M 2adc35ddaf 2008/10/24 34566
-M 0b0ab8012d 2008/10/24 34567
-M d7a2c63ca1 2008/10/24 34568
-R 56b5603ec7 2008/10/24 34569 make regen
-M 4ca7bcefeb 2008/10/24 34570
-M dfc72f41b0 2008/10/24 34571
-M 4975ecc97f 2008/10/24 34573
-M bef8a12803 2008/10/24 34574
-M b61433a9ad 2008/10/24 34575
-M 3eef1deb30 2008/10/24 34576
-M d1401ee92e 2008/10/24 34577
-M 9dbded1fc0 2008/10/25 34579
-M 3b4d0bf4f5 2008/10/25 34581
-M 6f03633b5f 2008/10/25 34583
-M 2a59936d33 2008/10/25 34584
-M 1129b882ce 2008/10/25 34585
-M 67edeb9aab 2008/10/25 34586
-M e8e5c75e9a 2008/10/25 34587
-M 1b1b430b4d 2008/10/25 34589
-M 8bdaab24c0 2008/10/25 34590
-M 7a5ea4aefc 2008/10/25 34591
-M e187df3b2e 2008/10/26 34595
-M d8723f436e 2008/10/26 34596
-M 12754f92d4 2008/10/26 34598
-M 5fe77bf88d 2008/10/26 34600
-M 61c26d1849 2008/10/27 34602
-M 159e8d6463 2008/10/27 34603
-R bb5dd93d07 2008/10/27 34604 de-consting
-M b1bc3f345d 2008/10/27 34605
-M c7304ea260 2008/10/27 34606
-M fa89a9aebf 2008/10/27 34607
-M a062e10d14 2008/10/27 34608
-M 4a4ab19ce2 2008/10/27 34609
-M 8f629a87fe 2008/10/27 34610
-M 3b3a0cf42f 2008/10/27 34611
-M f065df047b 2008/10/27 34612
-M e9726144ea 2008/10/27 34613
-M 3f08339969 2008/10/28 34615
-M f47f16450c 2008/10/28 34617
-R 0c289d1353 2008/10/28 34618 consting
-M dbebbdb4f8 2008/10/28 34619
-M 44591ba566 2008/10/28 34620
-M c690345083 2008/10/28 34621
-M 3cb1dbc621 2008/10/28 34622
-M 4c4652b6d9 2008/10/28 34623
-M ef8f769977 2008/10/28 34624
-M 1d1936752b 2008/10/28 34626
-R 6c1b357c76 2008/10/28 34627 consting
-M b8082b6e76 2008/10/28 34628
-M 85fbaab29c 2008/10/28 34629
-M df00ff3bee 2008/10/29 34630
- (bits of this were backed out by 0b9295f, then
- reapplied bit by bit as CPAN modules synced with
- blead)
-M 4b0b5bad69 2008/10/29 34631
-R 1c1947d58d 2008/10/29 34634 MM_Haiku.pm: later deleted by 6fea91d48c
-M 2f9d49b43d 2008/10/29 34637
-M 5254b38efe 2008/10/29 34638
-M cb1ea1622d 2008/10/29 34639
-M c146e5603f 2008/10/29 34640
-M 87cea99e29 2008/10/29 34642
-M 21887892fe 2008/10/29 34643
-R d45f5b305b 2008/10/29 34645 consting
-R 126f53f392 2008/10/29 34646 consting
-M ea726b5259 2008/10/29 34647
-M d969665116 2008/10/29 34648
-M 70d97eb0b4 2008/10/29 34649
-M 502c6561fc 2008/10/29 34650
-M 76f68e9bb8 2008/10/29 34653
-M a45c7426c9 2008/10/29 34654
-M d724f706d6 2008/10/30 34660
-M e7d3eb55e8 2008/10/30 34661
-M cfbf46cd7f 2008/10/30 34666
-M 4148925fb9 2008/10/30 34667
-M 643f470b35 2008/10/30 34668
-M db42c9028c 2008/10/30 34669
-M 48ab574387 2008/10/30 34670
-M daba3364ed 2008/10/30 34671
-R 1593ad5716 2008/10/30 34672 consting
-R b3dbd76e6e 2008/10/30 34673 consting (follow-up to 34673)
-M ad64d0ecd5 2008/10/30 34675
-M b7e2d8c7ee 2008/10/31 34676
-M 260890edab 2008/10/31 34677
-R 88e52f1cd8 2008/10/31 34678 consting (fix to 34672)
-M 159b6efe04 2008/10/31 34679
-M 9480d411d9 2008/10/31 34691
-M b8fcbefe62 2008/11/01 34693
-M f1f6607626 2008/11/02 34694
-M 47127b64dd 2008/11/02 34695
-M 618078e967 2008/11/02 34696
-M 8fa2328729 2008/11/02 34697
-M 4ac71550d2 2008/11/02 34698
-M 65d4ed585f 2008/11/02 34699
-M 76c6a2133b 2008/11/03 34700
-M 71f20845bf 2008/11/03 34702
-M 2a6a7022ea 2008/11/03 34703
-M 65269a95bf 2008/11/03 34705
-M 4c85b59c15 2008/11/03 34706
-M e84ce9a271 2008/11/03 34710
-M 26bfd92470 2008/11/03 34712
-M eaade56ead 2008/11/04 34714
-M 30cf951a66 2008/11/05 34733
-M 4954abf77f 2008/11/05 34742
-M aff3edb5cf 2008/11/06 34746
-M a4893424bc 2008/11/06 34747
-M 24d786f4d2 2008/11/06 34755
-M e74475c7f7 2008/11/06 34756
-M 3327bb648b 2008/11/06 34757
-M 9f2f055aa1 2008/11/07 34758
-M 2dab2cc13c 2008/11/07 34759
-M ff885cf246 2008/11/07 34760
-M 82d700dc3b 2008/11/07 34761
-M eaa0815147 2008/11/07 34762
-M b5f955b7be 2008/11/07 34763
-M 296ff6bd3a 2008/11/07 34764
-R 9b411def1b 2008/11/07 34765 Pod-Perldoc-3.15: 14_06 changes -v arg to -D
-M 3339dfd8ef 2008/11/07 34766
-M 463559e728 2008/11/07 34768
-M da7fcca4b8 2008/11/07 34769
-P d2c6dc5ee5 2008/11/07 34770 skipped some bleed regex-specific chunks
-M 36ba69bed1 2008/11/08 34771
-M d0da4e620e 2008/11/08 34772
-M 3ff3a8b6a3 2008/11/08 34773
-M 5fae6dc1d2 2008/11/08 34774
-M 2556f95e0f 2008/11/08 34775
-M 414bf5ae08 2008/11/08 34776
-M 622e1e49fb 2008/11/08 34777
-M 2376d97dd5 2008/11/08 34778
-M 8d06e08c4f 2008/11/08 34779
-R 53f65a9ef4 2008/11/09 34780 on 32-bit platforms sprintf '%lld',2^32) now
- gives 'Invalid conversion in printf:' warning and outputs %lld
- rather than -1. Not very backwards compatible.
-R 8ff953de44 2008/11/09 34781 rejected for same reason as 34780
-M d85e265b2a 2008/11/09 34782
-R 1d1ac7bc98 2008/11/09 34783 rejected for same reason as 34780
-M 867b93c3db 2008/11/09 34784
-M dba1316b19 2008/11/09 34785
-M 4c90698d34 2008/11/10 34786
-M b306dcb398 2008/11/10 34789
-M 1a3aec58bb 2008/11/10 34790
-M b538b56a2e 2008/11/10 34792
-M f19a12a3a6 2008/11/10 34804
-M b78893c993 2008/11/10 34814
-M 95960e9d32 2008/11/11 34815
-M f9cff2501b 2008/11/12 34817
-M 0c8767aece 2008/11/12 34818
-R 9711599ee3 2008/11/12 34819 local $SIG{FOO}: patch changes sig of
- mg_localize, so not BinCompat
-R 64f0785ed5 2008/11/12 34820 updating perlapi etc is branch-specific
-M 25cf7dea41 2008/11/12 34822
-M 95458265ab 2008/11/12 34823
-M 3bcc0c4bdd 2008/11/12 34824
-M 83ce3e12e0 2008/11/12 34825
-M 1d37e71175 2008/11/12 34827
-M df25d2ffed 2008/11/12 34828
-R af7df2578e 2008/11/13 34829 see 34819
-M fc8f615e0f 2008/11/13 34830
-R e23d9e2f39 2008/11/14 34831 allow tied $, : chip implied there are minor BackCompat issues
-M 6fd69bbe2b 2008/11/14 34832
-M 1ad62f6493 2008/11/14 34833
-M 9f4b9cd0c4 2008/11/14 34834
-M 7accc71d75 2008/11/14 34835
-M 89d1f0ef1b 2008/11/14 34836
-M 59b714e260 2008/11/15 34837
-M 7d83ec3941 2008/11/16 34838
-M 0643ac23d9 2008/11/16 34839
-M 2cce807b99 2008/11/16 34840
-M 0a87f2eacd 2008/11/16 34843
-M 2990415a45 2008/11/16 34844
-M 7834d9fbab 2008/11/16 34845
-M 79c530cb74 2008/11/16 34852
-M 47a7661deb 2008/11/16 34854
-M a44e3ce226 2008/11/16 34857
-M d10ced8a07 2008/11/16 34859
-M ec93b65fd8 2008/11/17 34860
-M 5cdbb95e9c 2008/11/17 34861
-M e016bc2d26 2008/11/17 34862
-M 1bb3cfc505 2008/11/17 34864
-M 324f9e447b 2008/11/17 34867
-M c9907023d8 2008/11/17 34870
-M aac018bb00 2008/11/17 34873
-R e389bba906 2008/11/17 34874 it was only a tidy-up patch and the code had diverged considerably
-M 1d963ff3e2 2008/11/17 34876
-M 27382b8e6a 2008/11/17 34877
-M 606f8fc822 2008/11/18 34879
-M 1e421c0cc8 2008/11/18 34880
-M 7fabfecee1 2008/11/18 34881
-M 84281c3142 2008/11/18 34882
-M 6f479e0525 2008/11/18 34883
-M fd06b02ce1 2008/11/18 34886
-M 49947b4460 2008/11/18 34887
-M 139d0ce69f 2008/11/20 34896
-M 0dddfacae0 2008/11/24 34901
-R 9c90164953 2008/11/24 34902 may change @INC, so not BackCompat
-R 6a57758be8 2008/11/24 34903 running autodoc.pl
-R 8226a3d7ea 2008/11/24 34904 Promote Perl_setdefout() to the public API - might mess with code
- that has a setdefout function
-R b08e453b5a 2008/11/25 34905 introduces new warning
-M 74b7c41f0d 2008/11/25 34906
-R e91684bfbb 2008/11/25 34907 fix for do {return } context - I don't trust op-fiddling
-R 5658d0a991 2008/11/25 34908 void push() no longer calls FETCHSIZE: visible optimisation
-M aaf9c2b266 2008/11/25 34909
-M 9b5c4ba4b5 2008/11/25 34910
-M 3779476a6b 2008/11/25 34914
-M 2e58fc35b9 2008/11/25 34915
-R 7d0905b923 2008/11/26 34917 Replace Perl_my() with macro: Not BinCompat
-R 12e93c28cc 2008/11/26 34918 make linklist private: not BinCompat
-R 2dd5337ba7 2008/11/26 34919 make scalarkids,scalarseq private: not BinCompat
-R 412da0037c 2008/11/26 34920 make listkids private: not BinCompat
-R 1c8a42233e 2008/11/26 34921 fix for 34907
-R 11cd919dc4 2008/11/26 34922 remove Perl_cv_ckproto: not BinCompat
-R e3cf49e2e2 2008/11/26 34923 make vdie private: not BinCompat
-R b7783a124f 2008/11/26 34924 make force_list,fold_constants,gen_constant_list private: not BinCompat
-R 0da8eb3af0 2008/11/26 34925 make ingroup,gen_constant_list private: not BinCompat
-R c8aa86e111 2008/11/26 34926 make is_gv_magical private: not BinCompat
-R 1f4e14d11a 2008/11/26 34927 remove Perl_magicname: not BinCompat
-R 82af08ae5f 2008/11/26 34929 make pad_reset private: not BinCompat
-R f0cb02e3e7 2008/11/26 34930 make PL_pad_reset_pending bool and rejig intrpvar.h: not BinCompat
-R 9d8f40c4d2 2008/11/26 34931 merge S_is_gv_magical, Perl_is_gv_magical_sv: not BinCompat
-R ed4173efcf 2008/11/26 34932 make pidgone() private: not BinCompat
-R 0d86688dc4 2008/11/26 34933 make pmtrans() and refkids() private: not BinCompat
-R 1f676739c0 2008/11/26 34934 add static to the recent changes: not BinCompat
-R 9c105995f0 2008/11/26 34935 make rxres_free() and rxres_restore() private: not BinCompat
-M aec08fdf1c 2008/11/26 34936
-R b429380fd7 2008/11/26 34937 remove Perl_oopsCV: not BinCompat
-R d2bd4e7f98 2008/11/26 34938 make sv_add_arena() private: not BinCompat
-R 90f7771ac0 2008/11/26 34939 update perlintern.pod from 34931
-R 051b305ded 2008/11/26 34940 make setenv_getix() private: not BinCompat
-R af41e527c8 2008/11/26 34941 make yywarn() private: not BinCompat
-M 6702284617 2008/11/26 34942
-M 428bacd701 2008/11/27 34943
-R cd34071197 2008/11/27 34944 remove av_fake: not BinCompat
-M bbead3ca7e 2008/11/27 34945
-M d67fec574f 2008/11/27 34946
-R 1d0620e07f 2008/11/27 34947 fix to 34944 which is already rejected
-M 94d1e7066c 2008/11/27 34948
-M a76803d012 2008/11/28 34949
-M 1be1b388c1 2008/11/28 34950
-R c8d90063b6 2008/11/28 34951 (empty patch)
-M 580410d244 2008/11/28 34952
-M 503ba33a32 2008/11/29 34953
-M 13d4578c5c 2008/11/30 34954
-M c6ae76470e 2008/11/30 34955
-M 2fd8beea01 2008/11/30 34956
-M e22024d3cf 2008/11/30 34957
-M 747e2fae43 2008/11/30 34958
-M 1409bc0658 2008/11/30 34959
-M dfcd3de5de 2008/12/01 34960
-M e1051f11a3 2008/12/01 34961
-M 7623d42629 2008/12/01 34963
-R 601cee3b44 2008/12/01 34964 reorder SAVEHINTS(): not BinCompat
-M da8315f8f4 2008/12/01 34965
-M be84297eef 2008/12/01 34966 skipped re-implementing Perl_save_hints since
- the push order is different between bleed
- and maint
-M 35d4f826f8 2008/12/01 34967
-M 85a721ca70 2008/12/01 34968
-M 8e41545fc5 2008/12/01 34969
-R 9e73050990 2008/12/01 34970 fix to the bit of 34966 thats been skipped
-R 3a9222bef6 2008/12/01 34971 remove setenv_getix(): not BinCompat,
- as in maint, it's not a static function
-P efd0b058b2 2008/12/01 34972 many of the updates were skipped because the
- functions aren't static in maint
-M fd1b367e71 2008/12/01 34973
-M 3c20a832e0 2008/12/02 34975
-M c4cd47ac59 2008/12/02 34976
-M 359d40bacc 2008/12/02 34977
-M c30d8139ea 2008/12/02 34979
-R 925cfbb8b1 2008/12/02 34980 remove PERLDB_ASSERTION macro: not BackCompat
-M 83fca67e98 2008/12/02 34981
-M 4f5084fafb 2008/12/02 34982
-M 21efc95700 2008/12/02 34983
-M 99d3381e87 2008/12/02 34984
-R f9bddea7d2 2008/12/02 34985 Implement PERLDBf_SAVESRC_INVALID: too risky and/or BackCompat
-R eb044b1091 2008/12/02 34986 more PERLDBf_SAVESRC_INVALID fiddling
-M 302c0c9335 2008/12/03 34987
-M fcdf39cfa4 2008/12/03 34994
-M 6a3877213b 2008/12/03 34995
-M 68224244ef 2008/12/04 35006
-M fe5460cc78 2008/12/04 35007
-M 210707008b 2008/12/04 35008
-M aa11950981 2008/12/04 35009
-M 827f156d05 2008/12/04 35010
-M c42ebacb0e 2008/12/04 35011
-M 0e5b5e32d0 2008/12/04 35012
-M 33839f2f06 2008/12/04 35013
-M 4ee3916907 2008/12/05 35018
-M 96109fb740 2008/12/05 35021
-M 251a4af1a6 2008/12/05 35022
-M c12100a4ed 2008/12/05 35023
-M a452d459f5 2008/12/06 35036
-M adc4231601 2008/12/06 35038
-M 5acb776856 2008/12/06 35039
-M 811896537c 2008/12/06 35050
-M 7a8d7d2666 2008/12/06 35055
-M 4b7873d413 2008/12/09 35058
-M f1618b100c 2008/12/09 35059
-M 5d2f5760bd 2008/12/09 35060
-M a5cf58215d 2008/12/09 35066
-M 859c7a68a0 2008/12/09 35067
-M 94ccb80714 2008/12/10 35073
-R 32e653230c 2008/12/11 35074 adds extra arg to tie's EOF method; new feature, risks breakage
-M 955d1b3d5f 2008/12/12 35075
-M 58ff3f5e57 2008/12/12 35076 silent hack to Test::Harness 3.14; needed for Test::Simple 0.86
-M 8f70d4fde1 2008/12/12 35077
-M 798f208dbf 2008/12/12 35078
-M 3826db83df 2008/12/12 35079
-M 98960e6aa9 2008/12/12 35080
-M 30fc4309ed 2008/12/13 35082
-M 7f8ee4bea3 2008/12/14 35088
-M 5b5f44f3a3 2008/12/14 35096
-M c5252117ef 2008/12/15 35097
-M 2610e7a430 2008/12/15 35099
-M ca8d723e95 2008/12/15 35101
-R a23fa242b3 2008/12/15 35102 sort MANIFEST: did it manually instead
-M 8328529578 2008/12/15 35105
-M 29c6b3372e 2008/12/15 35106
-M bdd3a62baa 2008/12/16 35118 IPC::Cmd 0.42
-M 74ae847926 2008/12/16 35119 CPANPLUS 0.84_01
-M 4dbf56a072 2008/12/16 35120
-M fb063f91dc 2008/12/19 [admin] set up .gitignore files
-M 1a95a0fc1d 2008/12/19 Porting: add a little script to find a perforce ch
-M 5e137bc214 2008/12/19 Fix up .gitignore files some more
-M 274f27f99d 2008/12/19 add .patch to the config file
-M 1e89acdfb3 2008/12/19 Add various files generated by a Win32 build to .g
-M 6421dfaca6 2008/12/19 Silence a podchecker warning in perlxs.pod
-M 6b6e6e926f 2008/12/19 File::Fetch 0.18
-M 9b31c40c5f 2008/12/19 Subject: [PATCH] Update Module::Load::Conditional
-M 4da9db91c1 2008/12/19 Subject: [PATCH] Version updates for Package::Cons
-M 61eaa953f4 2008/12/19 Subject: [PATCH] Update version of Module::Loaded
-M 495650dc2e 2008/12/19 IPC::Cmd 0.42_01; waiting for CPAN sync
-M 687d0cf84a 2008/12/19 Fix new Module-Load-Conditional test, which otherw
-M c1a4ae1c32 2008/12/19 Add pod page corresponding to README.haiku in .git
-M 14e848788c 2008/12/19 Subject: Re: [PATCH] Update Archive::Extract to 0.
-M d7dd28b668 2008/12/19 add a minimal pod/perlrepository.pod
-M f6706af390 2008/12/19 Add perlhaiku into pod.lst
-M 00f54a078e 2008/12/19 Add perlrepository to the list of pod
-M 9f968a8d97 2008/12/19 Add other files modified by buildtoc
-M 1a0f15d538 2008/12/19 explain how to switch a git from git:// protocol t
-M 85d7fce9b9 2008/12/19 fix thinko
-A 3b8a5fb0f9 2008/12/19 Change perl.git to perl-git to not confuse people
-M 9b9ea58460 2008/12/19 merge in changes
- MERGE: 3b8a5fb0f9 85d7fce9b9
-M 0908149504 2008/12/19 Show how to switch between branches
-M 572f57ba16 2008/12/19 Mention that cloning over HTTP is slow
-M c2cf2042fe 2008/12/19 Add a section on how to submit a patch
-M b1fccde5a5 2008/12/19 In the patch section, show how to work on a tempor
-M 7df2e4bc09 2008/12/19 Add a section on applying a patch
-M 2bbc8d558d 2008/12/19 Subject: PATCH 5.10 documentation
-M 75fb765136 2008/12/19 after applying, committers should push
-M 4adc95e616 2008/12/19
-R 60bc01042e 2008/12/19 parents of merge individually committed
- MERGE: 2bbc8d558d 4adc95e616
-M 985dc10ab3 2008/12/20 Subject: [perl #61418] perlthanks isn't documented
-M dc96081217 2008/12/20 It looks like the previous patch is working fine o
-M 734abad9c3 2008/12/20 Add a program to switch to a Perforce id
-M c8254d1d77 2008/12/20 Fix the 'or' precedence in case open fail
-M 2af192eebd 2008/12/20 Do not use a dash between git and its subcommand
-M 12322d2287 2008/12/20 From Paul Fenwick <pjf at perltraining.com.au>; Instr
-M 0b09a93a0c 2008/12/20 git-flavoured autodie 1.997 patch
-M f544576134 2008/12/20 Improve perlrepository.pod to explain how to check
-M e9040dfd2e 2008/12/20 Really ignore .patch files
-M a9b05323ea 2008/12/20 use checkout -b and not the more verbose two step
-M 39219fd358 2008/12/20 explain git status and stuff about remotes
-M 7f6effc75c 2008/12/20 explain more stuff about status
-M 23f8d33e69 2008/12/20 trim trailing spaces
-M d98474738f 2008/12/20 Various corrections and formatting nits to perlrep
-M fdea92759c 2008/12/20 point fix to MM_Unix.pm; waiting for new MM on CPAN
-M 184487f090 2008/12/20 Note how to set user name and e-mail address.
-M 99eeb6ff4a 2008/12/20 Re-sort the MANIFEST in the preferred order.
-R ca046c5bd0 2008/12/20 I regenerated pod/perltoc.pod rather than merging
-M a2450f8e38 2008/12/20 Remove repository.pod, as it is entirely about the
-M 4ebeba21ba 2008/12/20 add some stuff to .gitignore
-M f6a80292c3 2008/12/20 make perl use git-describe for PATCHNUM
-M f9b1f86577 2008/12/20 Added missing autodie exception classes to MANIFES
-M 8b845f197a 2008/12/20 /bin/sh isn't /usr/bin/perl :-)
-M 1b3f4ab12d 2008/12/20 There shouldn't be a ByteLoader directory in ext,
-M d5a094bddd 2008/12/20 MANIFEST files want tabs. Hysterical raisins.
-M a21dc152d0 2008/12/20 Add missing files to the MANIFEST
-M 4d1e77f96f 2008/12/20 Replace Jarkko's manicheck utility with my own
-M f87ebf2c28 2008/12/20 f6a80292c3db127d1561c118f409c1cffd1b55d9 needs to
-M 640238c5b2 2008/12/21 PATCH -- POD error in Symbol.pm
-M de8ca8af19 2008/12/21 WCOREDUMP is in <sys/wait.h>
-M da09661133 2008/12/21 Add the perlperf manpage, by Richard Foley
-R ca50760a0f 2008/12/21 blead-specific
-M 6051489bf3 2008/12/21 Note the correct way to make a branch to track a r
-M b0d365353c 2008/12/21 add a comment about git clean to the perlrepositor
-M f6c12373ef 2008/12/21 Document how commiters can keep 'origin' as a git
-R 453f08842f 2008/12/21 Individual commits merged instead
- MERGE: 6051489bf3 f6c12373ef
-M d82a90c178 2008/12/21 A short introduction to git bisect.
-m 3b46207fed 2008/12/22 lib/Text/Balanced.pm part of these
- pod still temporarily removed (c4f43d3);
- wait until its been merged upstream
-M 09645c26bf 2008/12/22 Note the --author option of git commit, and theref
-M 9d68b7edc4 2008/12/23 Add a section on committing to maintenance version
-M 8002990476 2008/12/23 Add a new Porting/podtidy to reformat pod using Po
-M 6acba58e99 2008/12/23 Remove inconsistent formatting in pod/perlreposito
-M 7f98bb4e58 2008/12/23 Subject: Patch for hints/netbsd.sh
-R 235f84edee 2008/12/23 skip merge commit:individual elements were merged
- MERGE: 7f98bb4e58 6acba58e99
-R 4e32d3ada0 2008/12/23 Individual commits merged instead
- MERGE: 453f08842f 235f84edee
-M 0f04e85fb3 2008/12/25 Make PERL_PATCHLEVEL a single value quoted string
-M 64ab118f07 2008/12/25 Move 'make check' in pods/ to using Pod::Checker
-M f4084e3915 2008/12/25 Minor pod fixes to make Pod::Checker happy with th
-M 94442a1e23 2008/12/25 Remove all mention of checkpods
-M 7a21560e6d 2008/12/25 Remove completed perltodo entry
-M caa547d451 2008/12/25
-M 4df4f5d097 2008/12/25
-M 9ae51f7f1f 2008/12/25 Some source files and documentation files need not
-M d4222de008 2008/12/25 Lies, damn lies and end-of-block comments
-M 0147cd53fa 2008/12/25 Use the F formatting codes for filenames in pod/pe
-R ccb8f6a64f 2008/12/25 -Ilib on #! line now prepends rather than appends to
- @INC. Even though its a bug-fix, it's not backwards
- compatible
-R 54ad55c59e 2008/12/25 follows on from ccb8f6a64f being rejected
-M 8be3533f72 2008/12/26 autodie information added to Maintainers.pl
-M f755e97d9b 2008/12/26 Some additions to perlrepository.pod
-M b16c2e4a25 2008/12/26 Remove mentions of the old way of rsync'ing the so
-R e9c9f4ae5f 2008/12/26 Individual commits merged instead
- MERGE: 4e32d3ada0 b16c2e4a25
-R e7049783a8 2008/12/26 follows on from ccb8f6a64f being rejected
-R 20189146be 2008/12/26 not BackCompat (see also ccb8f6a64f, e7049783a8,
- 3a9a9ba7ba, e28f3139a6)
-R 7e9bdbacf6 2008/12/26 Individual commits merged instead
- MERGE: e9c9f4ae5f 20189146be
-R 580f5bb24e 2008/12/26 part of @INC order stuff
-M eccdc4d715 2008/12/26 Upgrade to podlators 2.2.1
-M fe749c9aa8 2008/12/26 Update comments and documentation dealing with utf
-M 42bde815c4 2008/12/26 Fix two pod links
-R f08e058428 2008/12/26 "Regen docs and headers" - ran by hand instead
-M 2779b694b3 2008/12/26 sv_dup(): avoid cloning empty arrays
-M 6a71721dfc 2008/12/27 Remove "b" flag for sv_utf8_upgrade_nomg in embed.
-M 8565263ab8 2008/12/27 make sure that the perl -v/-V output corresponds t
-M ce0e211a90 2008/12/27 more build dependency changes, we should make sure
-M a7d5944154 2008/12/27 fix broken indentation, and move PERL_PATCHNUM log
-M 419464e2da 2008/12/27 clean up .patchnum in make clean
-M ba4bb01ebc 2008/12/27 smarter make_patchnum.sh, get the .patchnum from t
-M 10275c2978 2008/12/27 slightly smarter make_patchnum logic, detect if th
-M 531a2f446e 2008/12/27 Generate .patchnum from .patch or .git
-M e2ea577947 2008/12/27 make git-describe info show up in -V output in the
-M 4f68271caa 2008/12/27 tidier -v output
-M 6abfca009f 2008/12/27 better git based version numbering (hopefully sane
-M 7ba92e4f5d 2008/12/27 add a newline for clarity
-M 1e05a8c509 2008/12/27 forgot that i was modifying a generated file
-M b06e0d456d 2008/12/27 remove .sha1 file as well if necessary
-M 6f6ff2420d 2008/12/27 come new version related code in perl.c is not ena
-M c8bf35be1f 2008/12/27 rebuild cflags if cflags.sh changes
-M 953f6acfa2 2008/12/27 make make_patchnum.sh (more) portable
-M ceab6eb3d1 2008/12/27 apparently this isnt necessary after all.
-M e21c97b906 2008/12/27 add cflags as a dependency for all object files. (
-M 70bda14b72 2008/12/27 better .patchnum/.sha1 dependency stuff
-M b7e5ec797d 2008/12/27 ignore bugBLAH.pl files as they are likely dev/tes
-M 6962fb1a1f 2008/12/27 fix bug #57042 - preserve $^R across TRIE matches
-M 01593199f3 2008/12/27 tweak dependency
-A b6658357ff 2008/12/27 Tweak make_patchnum.sh to cope with /bin/sh on Sol
-M 2b19871751 2008/12/27 fix problem on some platforms
-M 4e7245b537 2008/12/27 Merge branch 'blead' of nicholas at perl5.git.perl.or
- MERGE: b6658357ff 2b19871751
-M fa60396f12 2008/12/27 Repurpose struct mro_meta to allow it to store cac
-M 123892d916 2008/12/27 Add MRO_GET_PRIVATE_DATA() to use the cached mro p
-M a3e6e81e81 2008/12/27 Add Perl_mro_register() to register Method Resolut
-M c60bad7b88 2008/12/27 Explictly export Perl_mro_meta_init() so that HvMR
-M b2685f0c86 2008/12/27 Proper pluggable Method Resolution Orders. 'c3' is
-M 58d4c5dfb9 2008/12/27 Remove the comment that the mro:: functions are ac
-M 553e831a35 2008/12/27 Optimisation of the use of the meta structure - do
-M 31b9005d8f 2008/12/27 Break out the set-the-MRO logic from the XS_mro_se
-R 3a6fa573ae 2008/12/27 not BinCompat
-R 9953ff723f 2008/12/27 not BinCompat
-R 1e9bd1186a 2008/12/27 Move all mro:: XS functions from mro.c to ext/mro/
- Nicholas thinks this is probably not BackCompat
- If this is ever merged, see also fbb5a95cd7,
- cd1759d8c2, a4133167b5
-M a44093a96f 2008/12/28 Fix typo in code not yet used.
-M 527df579b2 2008/12/28 Precomputing the hash value for a string represent
-M 58ca560a9a 2008/12/28 Also test Perl_hv_common() and pre-computed hashes
-M 90acdc2acf 2008/12/28 Verify that pre-computing hashes with shared hash
-M 44b87b5061 2008/12/28 Add a key flag HVhek_KEYCANONICAL for Perl_hv_comm
-M 5844ac76c2 2008/12/28 Add casts to gain C++ compatibility, as spotted by
-M 3cf20fa2fb 2008/12/28 Revise malformed utf8 test case
-M 3f0c5693d0 2008/12/28 Fix malformed utf8 in regexec.c
-R d30e492cce 2008/12/28 Introduce SvCANEXISTDELETE in pp.h, which simplify
-R c68ec7a9f9 2008/12/28 Add save_adelete()/SAVEADELETE() to save on the st
-R 4ad10a0b60 2008/12/28 On scope end, delete localized array elements that
-R 92970b93f5 2008/12/28 Also define 'localizing' in pp_helem for the sake
- The four above changes make {local $a[BIG] }
- shrink the array on scope exit, which is nice,
- but not very BackCompat
-M fc0bcb62b8 2008/12/28 Handle non-numeric version numbers in ext/Digest/M
-M b62fb10ea9 2008/12/28 Let us direct Switch questions to P5P.
-M cd3d9d4725 2008/12/28 Switch.pm doesn't appear to support plain arrays a
-M 6a9befb105 2008/12/28 Fix line numbering issues with POD filtered by Swi
-M 39bcdda02e 2008/12/28 Make Switch.pm skip POD like perl does
-M 01c2a33d9c 2008/12/29 Bump switch version to 2.14
-M 9e1694326e 2008/12/29 PL_registered_mros can start with 1 hash bucket, a
-M 3eb629a04d 2008/12/29 Mark my dual-life modules as authoritative in blea
-R fbb5a95cd7 2008/12/29 In mro_get_mro, use the length and UTF-8-ness now
- depends on 1e9bd1186a
-M 675b0f774d 2008/12/30 added information how to build on Leopard
-M 46807d8e80 2008/12/31 much better git related version numbering in our (
-M 54bb77241e 2008/12/31 varargs functions such as sv_catpvf can't have com
-M 8ffec826be 2008/12/31 Solaris /bin/sh doesn't do POSIX $( ... ) syntax f
-M a2837a9e92 2008/12/31 Solaris awk (at least) thinks that + should be esc
-M 5f58995418 2008/12/31 cflags also runs under /bin/sh so can't use $()
-M d0a9311f60 2008/12/31 More efficient API choices for string appending.
-M 050a6864cc 2008/12/31 Switching from $() to `` requires two more backtic
-M 28b1daef84 2008/12/31 Switching to `` requires one more \ to escape $Con
-M 9c3905ef05 2009/01/01 First cut at handling git patch numbers on VMS.
-M 50eca76146 2009/01/01 From: Max Maischein <corion at corion.net>
-M e46c382ee1 2009/01/02 'overloading' pragma
-M 23f6cb2856 2009/01/02 Fix a couple of typos in overloading.pm docs
-M d15cd83130 2009/01/02 Move variable declaration without initialisation a
-M 67fbe0e1b1 2009/01/02 Bump copyright year after previous change d15cd831
-M 1839a85047 2009/01/02 Mention overloading.pm in perl5110delta
- except that I added it to perl5101delta :-)
-M 8c8eee8276 2009/01/02 [perl #54956] crash on binary-or lvalue operation
-M f4b6e4b303 2009/01/02 Bump copyright year after previous change
-R 797f6e9fa6 2009/01/02 Merge branch 'yuval/overloading' into blead
- MERGE: f4b6e4b303 1839a85047
- individual commits on both branches merged
-! b3ab6785f6 2009/01/02 Faster sv_utf8_upgrade()
- as-is, it needs a mathom version of
- sv_utf8_upgrade_flags added, which is too much
- like hard work. Maybe revists some other time
-M effb3d1176 2009/01/02 Factorize numeric constant for "overloading" lexic
-M 83706693c6 2009/01/02 Bump coopyright year in embed.pl and various files
-M d87d3eede5 2009/01/02 Fix overload index mismatch in overloading logic.
-M abb619adf8 2009/01/02 Add a new test for overloading.pm
-R 8a9589bc6c 2009/01/02 Merge branch 'failing-test-for-overloading-pragma'
- MERGE: d87d3eede5 abb619adf8
- individual commits on both branches merged
-M ed15e57687 2009/01/02 In amagic_call(), offset should be strictly lesser
-M 7e49475998 2009/01/02 Minimal mention of overloading.pm in overload.pm
-M b472f62a79 2009/01/02 add undef tests to t/op/smartmatch.t
-M a86f5011b5 2009/01/02 add eval and error support to the t/op/smartmatch.
-M 1cfb70492a 2009/01/02 More comprehensive smartmatch.t, supersedes smobj.
-M e947c198f4 2009/01/02 [perl #61392] Method call documentation in perlobj
-M 49c3858588 2009/01/02 a test for Paul Evan's qr leak
-M 3776a20299 2009/01/03 Subject: [PATCH] Update autodie to 1.998
-M 44250bdc17 2009/01/03 Fix a thinko in regression test for [perl #54956]
-M 00bf72ff15 2009/01/03 Following change 34356, which decoupled get_isa_ha
-M aea323039b 2009/01/03 get_isa_hash() is only used in S_isa_lookup(), so
-M 0c429c7857 2009/01/03 Add some basic decriptions and/or usage info to so
-M a7d002a112 2009/01/03 some more Porting/ script documentation
-M 2547c837a7 2009/01/03 add -d option to Porting/cmpVERSION.pl to display
-#
-# start of y2038 block; not yet applied as possibly not stable
-#
-d a272e669f4 2009/01/03 Patch in a 64 bit clean gmtime_r() and localtime_r
-d 9af245219b 2009/01/03 Update to the latest version of the y2038 code.
-d a64acb403a 2009/01/03 Update from the latest y2038.
-d 767e26d7c8 2009/01/03 Remove all of localtime64's own includes. Perl's a
-d af9b2bf51b 2009/01/03 Change the way the check_tm assertion function is
-d 769448c3ca 2009/01/03 Cleaning up the Time::gmtime and Time::localtime t
-d 9b3ca67b76 2009/01/03 Write down the logic behind the localtime vs gmtim
-d 7bda3dfccb 2009/01/03 Update from y2038.
-d 5b6366c2b2 2009/01/03 Fix the overflow warning to just check for an erro
-d af8328142f 2009/01/03 Update from y2038 project.
-d c07fe26c2b 2009/01/03 Pull in changes from y2038
-d ea722b766b 2009/01/03 Update from y2038
-d 003c3b95c2 2009/01/03 Update from y2038 project.
-d 65a38213a5 2009/01/03 We are no longer slaves to the vagaries of time_t.
-d b9020a0ae3 2009/01/03 Fix the test plan on gmtime
-d 750c447b41 2009/01/03 Update from y2038
-d 948ea7a98b 2009/01/03 Update from y2038
-d dc164757d6 2009/01/03 Update some docs to explain that Perl no longer ha
-d 4c91ace1ab 2009/01/03 Everything should now work with negative times, so
-d 7643e68fdb 2009/01/03 Rename localtime64.[ch] to time64.[ch] to mirror c
-d 806a119aef 2009/01/03 Remove the AIX work around code. Instead it should
-d 7315c673ba 2009/01/03 Fix pulling a large time off the stack by using a
-d 0fb7f756cb 2009/01/03 We are no longer bound by the limits of the tm str
-d 8efababc2f 2009/01/03 Fix gmtime() and localtime() so they can pop times
-d b86b480f73 2009/01/03 Update from y2038
-d 461d5a49bc 2009/01/03 Update from y2038.
-d 0e3c5d8bc7 2009/01/03 Turn quads on in the VC configurations.
-d 1821818801 2009/01/03 Apply bleadperl at 34470 by hand while waiting for th
-d d4fb0a1f15 2009/01/03 Update from y2038
-d f433f45e72 2009/01/03 Merge branch 'schwern/y2038' into blead
-#
-# end of y2038 block
-#
-M 4ba0c7624a 2009/01/03 Changing get_isa_hash() to static means that it ne
-R ef3b26468f 2009/01/03 skip merge; 4ba0c7624a applied instead
- MERGE: f433f45e72 4ba0c7624a
-M 105ae85463 2009/01/03 Remove duplicate return in S_mro_get_linear_isa_c3
-M bd2db5df3c 2009/01/04 make Dumper.xs work with 5.10.x
-M c012444fd8 2009/01/04 Another regexp failure with utf8-flagged string an
-M 6bb0de4e5b 2009/01/04
-M 7b1668ed3d 2009/01/04 bump ExtUtils/MM.pm version number after change 34
-M 166a466fb1 2009/01/04 modified make_patchnum.sh script
-M 8ed12dca53 2009/01/04 prepare for refactoring to perl
-M 786aaa2520 2009/01/04 Almost a literal conversion of make_patchnum.sh
-M b6194a9dbf 2009/01/04 various changes
-M 29299e4722 2009/01/04 move subs from bottom to top, and add a vim and sh
-M f22725be88 2009/01/04 Message about making make_patchnum.pl Perl 5.005 c
-M dcff826f70 2009/01/04 eliminate .patchnum and related infrastrcuture fro
-M 6033099bd8 2009/01/04 Add more documentation to make_patchnum.pl
-M e59c84fcaa 2009/01/04 Added win32/.gitignore to ignore stuff from the Wi
-M d11bf41369 2009/01/04 Added config.w32 to win32/.gitignore
-M e47d8d2377 2009/01/04 Added stuff so that perl.exe now builds clean with
-M e9be352a56 2009/01/04 doesnt quite work yet, but provisional steps towar
-M 12d7e04de3 2009/01/04 this seems to work, still not using the perl versi
-M eb5c076f82 2009/01/04 eliminate make_patchnum.sh, and make the build pro
-M 505afc734e 2009/01/04 add better pod and headers, and clean up some whit
-M a49f3ea332 2009/01/04 eliminate double stringification, the defines as d
-d ef3a38ffad 2009/01/05 y2038
-M e08e1e1d05 2009/01/05 VMS posix exit fixes
-M 17a5646396 2009/01/05 UNKNOWN should not have been a bareword at e9be352
-M 20231e4a0b 2009/01/05 Typo fix in stock PERL_PATCHNUM definition
-M 91c3081c67 2009/01/05 Correct vim modeline
-M 737f445947 2009/01/05 Update copyright year to 2009.
-M 1702870677 2009/01/05 Adjustments to POSIX for the Haiku port
-M e5c8c22050 2009/01/05 Bump two module versions after Haiku port
-M e5620114d8 2009/01/05 Upgrade to Time::HiRes 1.9719
-M ff34631365 2009/01/05 "rm -f" better in "make clean" targets
-M aa4ca55799 2009/01/05 Emit less PERL_ARGS_ASSERT_* macros
-M b480728ce1 2009/01/05 Update AutoLoader to 5.68.
-M ca03d8e975 2009/01/05 Add lib/CORE/ to .gitignore (needed on Windows)
-M 05b0cfd1d0 2009/01/06 On VMS, run make_patchnum.pl, not make_patchnum.co
-M 02c87a88cb 2009/01/06 Merge t/.gitignore in main git ignore file
-M 318c766aaa 2009/01/06 Move .bat gitignores with their unix counterparts
-M 87dd31c880 2009/01/06 Remove notes about -v from perltodo
-M 1be1464a25 2009/01/06 Use git instead of p4 for the --opened option of P
-M a44f43ac9f 2009/01/06 Delete the largely obsolete Porting/patching.pod
-M 291c4ed918 2009/01/06 Remove a couple of p4-specific utilities
-M 8ff80fc4c8 2009/01/06 Add a --checkout / -c flag to git-find-p4-change
-R 26b6dc3ff0 2009/01/06 Require a space or a newline after a "#line XXX" d
- might break something
-M d60c045354 2009/01/06 Added 21st century data to 'SELECTED RELEASE SIZES
-M 2ecb5b57f4 2009/01/06 Remove duplicate entry
-M cd47ef9975 2009/01/06 Update data for 5.7.3 release
-M ee4d0b42de 2009/01/06 Calculated patch sizes for the modern era.
-M 5d2559deee 2009/01/06 Sync with Filter::Simple 0.84 which has a CPAN-rel
-M a45445a7d0 2009/01/06 Avoid wrapping long lines when displaying as man p
-M 256697c9a2 2009/01/06 Updated the 'some statistics for the other subdire
-R f0fcb8ecf1 2009/01/06 Merge branch 'blead' of ssh://perl5.git.perl.org/g
- MERGE: 256697c9a2 5d2559deee
- commits individually merged
-M e9daf013fd 2009/01/06 Add David Golden (DAGOLDEN) to AUTHORS
-R 2dc734a0f7 2009/01/06 Merge branch 'blead' of ssh://perl5.git.perl.org/g
- MERGE: e9daf013fd f0fcb8ecf1
- commits individually merged
-M ebd4d70bfc 2009/01/07 VMS thread context fixes
-M b53f367798 2009/01/07 VMS feature logical name fixes
-M 6191341389 2009/01/07 CPAN.pm on CPAN is considered upstream
-R 19d2664622 2009/01/08 sort MANIFEST
- did it separately instead
-M 1e70e886df 2009/01/08 Use a slightly more paranoid regex
-! fc06fdeb76 2009/01/08 Make File::Copy detect Unix compatibility mode on
- Didn't apply 2.14 as it changed semantics, so
- skip this 2.15 too. Maybe review later and merge
- the non-dodgy bits of 2.14?
-M c45e3c4898 2009/01/08 Fixed spelling of 'uncondtional', as reported by R
-M 3e2a970dfe 2009/01/08 t/x2p/s2p.t fix for VMS in UNIX mode
-M 6d74d930c1 2009/01/08 t/op/chdir.t, t/op/defins.t on VMS
-M 0e88df1c02 2009/01/08 mkppport using catfile for catdir
-M ca48d8be88 2009/01/08 lib/blib.t, lib/h2xs.t patches for VMS
-M 6a164b5b33 2009/01/08 ext/File/Gob/t/basic.t, ext/POSIX/t/posix.t vms fi
-M 449de3c2d9 2009/01/08 vms.c backslash efs and long name fixes
-M c25fe68d8a 2009/01/09 Change the link to the sort pragma to be more clea
-m ca7d924f07 2009/01/09 Prefer tabs over spaces in MANIFEST
- y2038 bits not merged yet
-M 9469eb4a69 2009/01/09 Fixed some spelling errors
-R 1a47dce1fa 2009/01/09 Merge branch 'blead' of ssh://perl5.git.perl.org/g
- MERGE: 9469eb4a69 ca7d924f07
- merged individual commits instead
-M 699e896abc 2009/01/09 -Be consistent with kb/kB.
-M 9a2f2e6b8d 2009/01/09 Fix typo in pod/perltodo.pod
-R 9948897efc 2009/01/09 Typo fix in pod/perl5110delta.pod
- blead-specific
-M b8486b9d23 2009/01/09 simple_trnlnm needs an actual length as its last a
-d 478780ab3d 2009/01/09 fake_localtime_r and fake_gmtime_r may need thread
- y2038
-M 6c981e149c 2009/01/09 Capitalize "latin"
-M 80983d2147 2009/01/09 Fix typo
-M c1e3149410 2009/01/09 Be consistent in writing deobfuscator
-M 53e80d0bfa 2009/01/09 Merge changes from PathTools: 'Update to support V
-M ae5a807c7d 2009/01/09 'VMS support for Unix and extended file specificat
-R 8ddb446c41 2009/01/10 Typo fix in pod/perldiag.pod
- fix for 777723442a
-A 0fb8cc817d 2009/01/10 move ext/utils/make_ext to ext/utils/make_ext.pl
-M 8e0aa7ce8b 2009/01/10 Fix typo in pod/perldsc.pod
-A a2f19a19a2 2009/01/10 miniperl-ification of ext/utils/make_ext
-M 36b6faa83d 2009/01/10 Revision to thread context fixes from ebd4d70bfcb4
-M e919cd191e 2009/01/10 vms setup_cmddsc buffer fixes.
-! 37930f0f2f 2009/01/10 File::Copy fixes for VMS follow-up
- see fc06fdeb76
-A 3dac15a5e5 2009/01/11 MERGE: a2f19a19a2 37930f0f2f
-M c24e7b67b5 2009/01/11 Remove make_patchnum.com (now using make_patchnum.
-M 2b52f3e448 2009/01/11 Merge branch 'blead' into miniperl-make-ext
- MERGE: 3dac15a5e5 c24e7b67b5
- I aggregate-merged the following three:
- 0fb8cc817d a2f19a19a2 3dac15a5e5
-M 5a4e0b04af 2009/01/11 Remove make_patchnum.com from MANIFEST following
-M e5d7cba1d0 2009/01/11 Add -Ilib to the invocations of make_ext.pl. I gue
-M 8a646e0bef 2009/01/11 more vms thread ctx fixes
-M 7898bf0b95 2009/01/12 Test that overload::constant works in eval("")
-M 5abd40ff97 2009/01/12 add git-make-p4-refs script to Porting
-R 2a167b4e6e 2009/01/12 Merge commit 'nothingmuch/p4_git_utils' into blead
- MERGE: 7898bf0b95 5abd40ff97
- merged individual commits instead
-M 8550bf4881 2009/01/12 Fix typo in pod/perlhack.pod
-M 85d5bcfac3 2009/01/12 Ignore ext/DB_File/constants.xs.
-M 1ec755da0d 2009/01/12 make_patchnum requires miniperl$(EXE_EXT) to run,
-M af4015f1af 2009/01/12 Correct the over-zealous addition of $(RUN) into t
-M 7222c10abc 2009/01/12 Add $(EXE_EXT) where it was missing from $(RUN) ./
-M efdc43f501 2009/01/12 show -E in error message when called with -E
-R 37d5d4df4e 2009/01/12 Fix my refactoring typo in change 33001 that broke
- for some reason, I directly fixed this (commit
- d42378e0ada9dd1d4ab5ffa99eeedae3bf14dd02, rather than
- merging Nicholas's fix)
-M df27866545 2009/01/13 vms - vmsspec refactor
-M abf724c9ab 2009/01/13 Capitalize "SysV" correctly
-M 0e5ce2c762 2009/01/13 vms - unixspec refactor
-M a148edb68f 2009/01/13 Restore Win32 build by creating git_version.h.
-M 049aabcba3 2009/01/13 Give the git file browser URL as the most up to da
-! cd1759d8c2 2009/01/13 Silence Win32 compiler warnings.
- fixes to: 1e9bd1186a (mro code moving), y2038
-d 554fcfb9c5 2009/01/13 Silence time64.c build warning
- y2038
-M 550428fe48 2009/01/13 ext/Hash/Util/Makefile.PL should not recurse to Fi
-M fdd40f9619 2009/01/13 chomp the output from git ls-files. Display a help
-M c5654d5b66 2009/01/13 Add the upstream status to the output of Porting/M
-M 29638d28d4 2009/01/13 If there is one argument, and it looks like a comm
-M 61edc68382 2009/01/14 Make make_ext.pl write out a shell script of its a
-M 0b4436e8e0 2009/01/14 Actually commit the state infomation at the end of
-M f340d83a2d 2009/01/14 applying patches and upstream
-R 07714eb488 2009/01/14 Allow '\r' after "#line XXX" directives.
- fix for 26b6dc3ff0
-M 15cb7b9da6 2009/01/14 Upgrade to Module-Build-0.31012
-M 2319519c80 2009/01/14 Upgrade to ExtUtils-Command-1.16
-M 7e4d713840 2009/01/14 Upgrade to ExtUtils-Manifest-1.56
-M 1e98a568fc 2009/01/14 Upgrade to Math-Complex-1.55
-M 4621490ec7 2009/01/14 Note Math-Complex's test files in Porting/Maintain
-M e23621c75d 2009/01/15 make add-package git friendly and fix bugs (take 2
-M 77a135fea3 2009/01/15 [perl #59908] \x, \0, and \N{} not ok in double-qu
-M 5d8e6e4189 2009/01/15 Change documentation for UCD::casespec() to match
-M 6fb6c61459 2009/01/15 vms rmsexpand refactor
-M 98c7875d34 2009/01/15 Fix handling of DECC$DISABLE_POSIX_ROOT feature on
-M 4e759823f6 2009/01/15 Fix t/uni/lex_utf8.t entry in MANIFEST
-M 8f718e95d9 2009/01/16 use F<> in perlrepository.pod consistently and rem
-P 609122bd05 2009/01/16 Add warning about octal > 377 in some regexes
- skip, as it adds a new warning to possibly
- working code
- (a dummy version of the test was added to maint
- to keep test count in sync with blead)
-M c53941b4d2 2009/01/16 Fix deparsing of readpipe() ([perl #62428])
-M 3319632a10 2009/01/17 Need even more stack for VMS_IA64-ithread.
-M b1b1ee3cbf 2009/01/18 UPSTREAM => blead; because CPAN => 0
-d a8cb02613d 2009/01/18 consting goodness for time64
- y2038
-M 6db37112cd 2009/01/18 Add 5.8.9 to list of versions known to Module::Cor
-M 65395b02d2 2009/01/18 Add ExtUtils::Miniperl to the list of core modules
-M 8f83a467c1 2009/01/18 Add aliases for several version numbers in Module:
-M 51d6c659b2 2009/01/18 Upgrade to Devel::PPPort 3.15
-M ca05901bcd 2009/01/18 Jarkko says: Upstream for Math::Complex is the CPA
-M deb20ba305 2009/01/18 [perl #62488] B::Deparse fails on 'CORE::require(S
-M 21b5215870 2009/01/18 Make B::Deparse handle the _ prototype
-d b02dc803f4 2009/01/18 Not everybody (hardly anybody?) uses const for tm.
- y2038
-M 642d3d283b 2009/01/19 ignore realclean.sh
-R 7bf7986364 2009/01/19 Combine sv_utf8_upgrade with a following grow
- needs b3ab6785f6
-d 4c6e94b1e7 2009/01/19 Be sure to call L_R_TZSET before localtime_r()
- y2038
-R b3647a3612 2009/01/19 about warnings if forks fail in Perl_my_popen
- new warnings - possible BackCompat issues
-R c973c02eeb 2009/01/19 Add warning category
- fix for b3647a3612
-M 9d1cda07d7 2009/01/19 Upgrade to podlators 2.2.2
-M ae209c08de 2009/01/19 Mark podlators as preferably to be patched upstrea
-M c7c8b664ff 2009/01/19 Fix h2xs enum handling with C++ comments
-M ae6979a87b 2009/01/19 Add NameAliases.txt; regenerate mktables.list
-M 0161444183 2009/01/19 SetUID scripts are deprecated for 5.12
-M fdd05153c5 2009/01/19 Update Maintainers.pl
-M b8a4246cca 2009/01/19 Upgrade to Module::Load::Conditional 0.30
-M ab06b35309 2009/01/19 add-package fix
-M 85a8a980a9 2009/01/19 Upgrade to Module::Load 0.14
-M 1fe570cc5e 2009/01/20 Pathify_dirspec replacement
-M fbb3ee5af3 2009/01/20 Optimize away calls to empty DESTROY methods
-M 15a6779ee7 2009/01/20 Remove perltodo entry about empty destructors
-R 4823492e83 2009/01/20 Merge branch 'empty-destroy-optimisation' into ble
- MERGE: 1fe570cc5e 15a6779ee7
- (individual commits merged instead)
-M e0d6880329 2009/01/20 Upgrade to Archive-Tar-1.44
-M 54d012c665 2009/01/21 Change 28063 should have removed the call to savep
-M def18e4c9f 2009/01/21 Change 54d012c665eb635f1e4fac1f1ec5aba1229ad9ca wa
-M 5079785043 2009/01/21 Make DB_File use -ldb on MSWin32 with a gcc compil
-M b8921b3e20 2009/01/21 POD typos
-M 8253c7d6f3 2009/01/21 Correct the call to get_hv() to use GV_ADD for the
-M 797f796a96 2009/01/21 remove some indirect method calls, add a caveat
-M 2b393bf410 2009/01/21 now get non-dual lived code
-M 6673a63c63 2009/01/21 Update the documentation of get_hv() to note that
-M cbfd0a879b 2009/01/21 Update the documentation of get_av() to note that
-M 64ace3f88f 2009/01/21 Update the documentation of get_sv() to note that
-M 3509f64745 2009/01/21 Correct the form of the flags passed to perl_get_s
-M 8583b25748 2009/01/21 Correct the form of the flags passed to perl_get_s
-M 0da0e72871 2009/01/21 Correct the form of the flags passed to perl_get_c
-M e350d0e0ab 2009/01/21 In attrs::get(), use Perl_get_cvn_flags() rather t
-R b96d8cd966 2009/01/21 Add get_cvs() as a shortcut for STR_WITH_LEN() and
- the new get_cvs macro isn't core only.
-M 3f48f963d8 2009/01/21 Convert db_get_cv() to use get_cvn_flags() as it a
-R 2c67934f13 2009/01/21 Note that nothing in core uses Perl_get_cv any mor
- not true for maint
-M 64bc6d5446 2009/01/22 Upgrade to Encode-2.27
-M 7c7ad0a9c4 2009/01/23 Fix deparsing of constant subroutines
-M bf799c6455 2009/01/23 Add a perlmini.o and perlmini.c akin to opmini.o a
-M 486cd78004 2009/01/23 Amend patchlevel.h so that git_version.h is only #
-M ac2e3cea0e 2009/01/23 Upgrade to Devel::PPPort 3.16
-M cf5a8da688 2009/01/23 Ensure that C++ modules can be built against a per
-M 35726f546a 2009/01/23 Remove redundant #ifndef SETUID_SCRIPTS_ARE_SECURE
-M 42f7d22ff0 2009/01/23 sperl.o also needs to depend on git_version.h
-R cc69b689ee 2009/01/23 suidperl goes. Not BackCompat.
-M 5c9818e9e6 2009/01/24 Build miniperl with a special version of perl.c on
-M 6ef6dcadfc 2009/01/24 VMS has a mode where it preserved case, and also h
-M 16ad9bfac1 2009/01/24 The exit code of make_patchnum.pl is no longer use
-M 8c4561fbb4 2009/01/24 Add -DPERL_IS_MINIPERL when building the object fi
-M 931482b7d6 2009/01/25 Port 486cd780047ff22471c5cbe417911a042ae23962 to w
-M ec47230bf7 2009/01/25 microperl also needs a canned git config.
-d 5d09c1ed83 2009/01/25 microperl has no idea about 64 bit types, so don't
- y2038
-M 0639114fb4 2009/01/25 Regenerate uconfig.h
-M a90aae4c56 2009/01/25 Remove stock_git_version.h as nothing uses it any
-R 076a2a80a0 2009/01/25 Code refs aren't lockable
- potentially not BackCompat
-! e63b33793c 2009/01/25 Move cp(1)-like permission changes from copy to cp
- more permission messing stuff
-M 8afc33d629 2009/01/25 Revert "show -E in error message when called with
-M 52c447a82d 2009/01/25 Document that $0 is set to "-e" when perl is run w
-R 96f2655e63 2009/01/25 Merge branch 'Eefix' into blead
- MERGE: e63b33793c 52c447a82d
- individual commits merged
-M fcd65f8d43 2009/01/25 Unbreak build on Windows
-M 04bf47ee13 2009/01/25 Unbreak Makefile too (replicate fcd65f8d4322911242
-M 9ec269cbd7 2009/01/25 Some POD patches for PerlIO and PerlIO::var
-M 1ffb79efad 2009/01/25 Add perlmini.c to .gitignore
-M 29a982501a 2009/01/25 [perl #57176] Including XSUB.h before perl.h gives
-M 85e7c9deba 2009/01/25 vms glob patches
-M 8a5aa89570 2009/01/25 According to Yuval, Tie::RefHash is maintained at
-M a979ce91b3 2009/01/25 vms fileify_dirspec refactor / Unix mode fixes
-M b3a04dd304 2009/01/26 Fix memory leak
-! 7fa8fd0b55 2009/01/26 Check for the group entry returned by getpwuid as
- more File/Copy.pm perms stuff
-! 205139309c 2009/01/26 Tests to check cp() doesn't drop set[eu]id bits.
- more File/Copy.pm perms stuff
-M 0549aefb17 2009/01/26 Run podtidy on pod/perlrepository.pod and document
-M 03050721b3 2009/01/26 Add a section on how to submit a patch using GitHu
-M 4497a157d1 2009/01/26 Make t/win32/system.t use the more common compiler
-M c6d234b82f 2009/01/26 Break the --create-perllibst-h and --list-static-l
-! b1144ebad0 2009/01/27 Silence verbosity in lib/File/Copy.t during 'make
- more File/Copy.pm perms stuff
-M 3127de7dcb 2009/01/27 unicore Makefile didn't clean sub-sub directories
-M b6922eda63 2009/01/27 Change to use 5.1 Unicode file versions
-M 4feb7f0986 2009/01/27 In buildext.pl, refactor the @ARGV parsing into a
-M 23d483e2ac 2009/01/27 In the code for printing -v, replace longhand newS
-M 97a26ad97b 2009/01/28 Fold ext/util/make_ext_cross into ext/util/make_ex
-M 3f3ffb6144 2009/01/28 Move ext/util/make_ext.pl to the top level.
-M 8ed969f8dc 2009/01/28 Pass $(MAKE) as one quoted commandline argument, t
-R 06ba78de6d 2009/01/29 do_exec() is a mathom, so call its replacement dir
- in bleed, was soon reverted by 5dd60a5265
-M aaaf44d72f 2009/01/29 Add an explicit --all option to buildext.pl, rathe
-M c9e1d5f914 2009/01/29 Upgrade to Win32-0.39.
-R 5dd60a5265 2009/01/29 Revert "do_exec() is a mathom, so call its replace
- see 06ba78de6d
-M 4846f1d798 2009/01/29 vmspath without thread context.
-M e2fabae1d9 2009/01/29 Add --options with arguments to make_ext.pl. Pass
-M c15dd1a1b8 2009/01/29 win32/ext was removed by change 30379 in 2007, so
-M dc3c30404e 2009/01/29 Tweaks to pod/perlrepository.pod
-M 1bc4b319ba 2009/01/30 Upgrade to Pod-Parser-1.36.
-M 57f7515dc9 2009/01/30 Pod correction for ExtUtils::XSSymSet.
-M 42fe6305f0 2009/01/30 Replace the one file timestamp dependency check wi
-M 222046efb2 2009/01/30 Fix paths on new pod2usage2 tests to work in the c
-M b8d39eba91 2009/01/30 Use Config; rather than parsing config.sh and push
-M 9822e6e0ce 2009/01/30 Eliminate $makeargs by prepending its contents to
-M d793a8a7f7 2009/01/30 The logic to set $makefile to 'Makefile.old' can't
-M c337d41ae5 2009/01/30 Move the target generic logic above the extension
-M e3b840254a 2009/01/31 The hack to write out realclean.sh and veryclean.s
-M 744ac0eac5 2009/01/31 Make lib/Config_heavy.pl part of $(CONFIGPM) as th
-M 1a76ca1adb 2009/01/31 Make dir and target --options to buildext.pl. Upda
-M 484c6321d9 2009/01/31 Create build_extension() to encapsulate the per-ex
-M fc67841296 2009/01/31 Use the build_extension() routine from win32/build
-M 07f3cc2a61 2009/01/31 Move the static/dynamic/nonxs LINKTYPE logic from
-M 3b333d01f6 2009/01/31 Update Makefile-cross-SH with 07f3cc2a611daebb9d83
-M 11f6a7695e 2009/02/01 Correctly escape $ in debug statement
-M a79902b1d0 2009/02/01 The $@ was actually a botched conversion from $mak
-M ca5de986dd 2009/02/01 Loop over @extspec, calling build_extension() on e
-M eb1f8df73c 2009/02/01 Replacing system $scalar with system @list require
-M 34001da35a 2009/02/01 Make Time/HiRes/Makefile.PL produce a Makefile if
-M a520a2c43d 2009/02/01 For the vmsish pragma, make sure there is a thread
-M 312ac60b38 2009/02/01 vms stat patches (take 2)
-M cbbb00c6b5 2009/02/01 Cast result to character size before array indexed
-M 22901f3092 2009/02/01 Put parentheses around macro arguments
-M d8bf0b8cc0 2009/02/02 Upgrade DB_File to 1.818.
-M a37eaad4a1 2009/02/02 Upgrade to Encode-2.29.
-M a7f1e69b4b 2009/02/02 Update CPAN.pm to 1.93_03
-M 421926c2f2 2009/02/02 Restore broken clean target in win32/makefile.mk
-R a681c2f143 2009/02/02 When loading a PerlIO::via layer, first look in th
- alters search order for C<open "via(Foo)">.
- While a useful bugfix, might break old code
-R 2fe765f8bd 2009/02/02 Bump version of PerlIO::via after previous change
- see a681c2f143
-M b7d08f5e04 2009/02/02 Add missed file ext/DB_File/config.in and update e
-M 440530af1a 2009/02/02 ext/DB_File needs a ppport.h
-M 767c16ab36 2009/02/02 Make t/pod/pod2usage2.t work on case insensitive f
-M 286d62c215 2009/02/02 Fold win32/buildext.pl into make_ext.pl
-M d1b150139f 2009/02/02 Convert the last few references from buildext.pl t
-M 200cbd6aa5 2009/02/03
-M 3ddd48aab4 2009/02/03 Oops. Missed these two files from commit 200cbd6aa
-
-M d57db09df2 2009/02/03 Refactor to avoid changing directory, and avoid ne
-M d94c5a782e 2009/02/04 vms kill_file / rmdir updates
-M b94a8c495f 2009/02/04 vms rename Unix mode fixes
-M 21afb10428 2009/02/04 long-ago h2xs changes
-M 1f200948c4 2009/02/04 setpgrp() should extend the stack before modifying
-M 0598b5ab36 2009/02/04 A test for FindExt, not run by make test. (Useful
-M 3380c781dc 2009/02/04 Clearer variable names. Add a mode line coda.
-M f44bdceebe 2009/02/04 Also cope with extension directory names of the fo
-M 8b2bdce690 2009/02/04 Upgrade to Pod-Parser-1.37.
-M e08c66ce39 2009/02/04 Some refactoring in the loop that constructs param
-M c5aac6ab21 2009/02/04 Remove the / from the end of the extension directo
-M 7ad017a880 2009/02/04 When normalising @extspec, use the result of s///
-M e2c1c280e8 2009/02/05 Move XSSymSet.pm to lib/ExtUtils/, but only instal
-M aefe3e7eb5 2009/02/05 Exclude VMS extensions on non-VMS.
-M c8f794576f 2009/02/05 "wide character" warnings are severe
-M 3f2c382a9c 2009/02/06 Use an ordinary paragraph to reference sv.h.
-M 238a6851e1 2009/02/06 Cope with new-style ext/Data-Dumper as well as old
-M 099c20a12a 2009/02/06 Rename ext/IPC/SysV to ext/IPC-SysV
-M 18bdacd6ec 2009/02/06 Rename ext/Sys/Syslog to ext/Sys-Syslog
-M d2a6e61ca1 2009/02/06 Rename ext/Sys/Syslog to ext/Sys-Syslog and ext/IP
-M 030a108e79 2009/02/07 FindExt matches on extension name, not directory n
-M 442749d5ef 2009/02/07 Remove duplicate code from dynamic_ext(), static_e
-M c05a5c573c 2009/02/07 The correct name of PERL_UTF8_magic is PERL_MAGIC_
-M 26f467e271 2009/02/07 Update Module::Load to 0.16
-M 7fee2b4cbf 2009/02/07 ext/Sys-Syslog/t/constants.t needs to find macros.
-M 003db2bd2e 2009/02/07 pare down docs of UNIVERSAL in perlobj
-M ba593fa967 2009/02/07 relocate "warnings" section of UNIVERSAL man page
-! 7607398696 2009/02/07 Skip the 0oX... mode copying tests when chmod fail
- more File/Copy.pm perms stuff
-R 1d9f57de15 2009/02/07 deprecate UNIVERSAL->import
- makes UNIVERSAL::import produce a new warning
-R cd477a63b7 2009/02/07 Add test for previous patch (deprecation of UNIVER
- see 1d9f57de15
-M 9b6474b65b 2009/02/07 pp_send() doesn't need to allocate 1000 stack slot
-R b3f1e0ca82 2009/02/07 require warnings; as late as possible, to avoid a
- see 1d9f57de15
-! 2770a1ce29 2009/02/07 Carp 1.05 shipped with 5.8.8. Remove work-around f
- wait for Exporter 5.64 to be backported to CPAN
-! 86627c6ade 2009/02/07 Fix Exporter test for 2770a1ce2934f4277de13f4f795b
-M 902aaf3efe 2009/02/07 Port make_ext.pl to VMS.
-M 1f29050e2e 2009/02/08 Data-Dumper --> Data/Dumper for VMS extension list
-M c091f99a22 2009/02/08 Use make_ext.pl on VMS to build, clean, and realcl
-M 6ebb060182 2009/02/08 Skip tests for flattened extensions that weren't b
-M 46c0537469 2009/02/08 Fix some thread context mistakes that snuck in wit
-M caf82a0113 2009/02/08 add link for those who look at overload for overri
-M 4282a474dc 2009/02/08 Rename ext/Win32API/File to ext/Win32API-File
-M 062138d82f 2009/02/09 Goodbye, make_ext.com; make_ext.pl will take over
-M dc539f3db6 2009/02/09 Rename ext/Compress/Raw/Zlib to ext/Compress-Raw-Z
-M 3259204198 2009/02/09 Rename ext/Compress/Zlib to ext/Compress-Zlib
-M 8255effd11 2009/02/09 Rename ext/Data/Dumper to ext/Data-Dumper
-M d8b931c930 2009/02/09 In The Grand Trek, Filter::Util::Call's call.t did
-M 9d3a1c7447 2009/02/09 Rename ext/Devel/DProf to ext/Devel-DProf
-M 0ff33da805 2009/02/09 Rename ext/Devel/PPPort to ext/Devel-PPPort
-M f930745250 2009/02/09 Rename ext/Devel/Peek to ext/Devel-Peek
-M ec46a77bc6 2009/02/09 Rename ext/Digest/MD5 to ext/Digest-MD5
-M 12fc04c96e 2009/02/09 Rename ext/Digest/SHA to ext/Digest-SHA
-M 005c4f26b0 2009/02/09 Rename ext/File/Glob to ext/File-Glob
-M e602752717 2009/02/09 Rename ext/Filter/Util/Call to ext/Filter-Util-Cal
-M c3d8257849 2009/02/09 Rename ext/Hash/Util/FieldHash to ext/Hash-Util-Fi
-M 48e8cb2025 2009/02/09 Rename ext/Hash/Util to ext/Hash-Util
-M 2c864a0811 2009/02/09 Rename ext/I18N/Langinfo to ext/I18N-Langinfo
-M e505b8249f 2009/02/09 Rename ext/List/Util as ext/List-Util
-M 384674d352 2009/02/09 Rename ext/MIME/Base64 to ext/MIME-Base64
-M f43b80dabc 2009/02/09 Rename ext/Math/BigInt/FastCalc to ext/Math-BigInt
-M d91320e42f 2009/02/09 Rename ext/Module/Pluggable to ext/Module-Pluggabl
-M 9df1f84527 2009/02/09 Move 3 tests from ext/PerlIO/t to their relevant P
-M a47facf7a1 2009/02/09 Move the 4 tests of core PerlIO functionality to t
-M d730472d2f 2009/02/09 Rename ext/PerlIO/encoding to ext/PerlIO-encoding
-M b4bd6dcd45 2009/02/09 Rename ext/PerlIO/scalar to ext/PerlIO-scalar
-M e5db20f449 2009/02/09 Rename ext/PerlIO/via to ext/PerlIO-via
-M 0450807c0b 2009/02/09 Rename ext/Sys/Hostname to ext/Sys-Hostname
-M f715bbfb20 2009/02/09 Rename ext/Test/Harness to ext/Test-Harness
-M d119459be9 2009/02/09 correct typo, replacing "complement" with "complim
-M 9bdb6db8a6 2009/02/09 Rename ext/Text/Soundex to ext/Text-Soundex
-M 40d04ec442 2009/02/09 Rename ext/Time/HiRes to ext/Time-HiRes
-M 50acc947dd 2009/02/09 Rename ext/Time/Piece to ext/Time-Piece
-M b3cfe24873 2009/02/09 Rename ext/Unicode/Normalize to ext/Unicode-Normal
-M 4455f5a681 2009/02/09 Rename ext/XS/APItest to ext/XS-APItest
-M 2336398ced 2009/02/09 Rename ext/XS/Typemap to ext/XS-Typemap
-M 3831a78769 2009/02/09 Rename ext/threads/shared to ext/threads-shared
-M abd7186c67 2009/02/09 Remove special casing for extensions nested inside
-M 4d9538c1f3 2009/02/10 Logic changes for the VMS-specific mkdir/chdir/chm
-M a0373bf6e1 2009/02/10 Sys-Syslog I18N-Langinfo have long names now.
-M 3dd13b2022 2009/02/10 Move Safe.pm into ext/Safe, and temporarily give i
-M abf03c67be 2009/02/10 Adjust name of Test-Harness directory in .gitignor
-M 1f8a0b3863 2009/02/10 All extensions are at the top level, so no longer
-M a04d4598ad 2009/02/10 lib/Config_git.pl mustn't be built concurrently wi
-M 6ed34527c3 2009/02/10 metaconfig needs these two symlinks
-M 38fddf8b5d 2009/02/10 Restore old behavior for perl builds with (still)
-M 2dac21aa16 2009/02/10 Comment inside evaluated shell string causes havoc
-M 8e08999f3b 2009/02/10 mention English name of %+ in perlvar.pod
-M 43239f9092 2009/02/10 Fix previous patch. Actually it's written PAREN, n
-M 37d29c6f34 2009/02/11 Update makerel to make a release from a git checko
-M c6f023287f 2009/02/11 Fix previous patch. Actually it's written PAREN, n
-d 8098e75c0b 2009/02/11 avoid confusing gcc with -2147483648
- y2038
-M bf8d1304d5 2009/02/11 vms fgetname wrapper.
-M f9916dde00 2009/02/12 Update CPAN.pm to 1.93_51
-M 7f9994e0a5 2009/02/12 Fix MANIFEST for CPAN 1.93_51 inclusion
-M 142f6a0dad 2009/02/12 Skip tests for flattened extensions that weren't b
-M cdaa314533 2009/02/12 Update .gitignore with new flat extension path
-M 32d85a01d8 2009/02/12 Ignore some temporary files created by ext/DB_File
-M e469bedac8 2009/02/12 win32/ext doesn't exist any more, so no need to lo
-M 8a3df56c4f 2009/02/12 win32/ext doesn't exist any more, so no need to lo
-M e7deb4af6a 2009/02/12 Upgrade to Math-Complex-1.56
-M a95b6808ef 2009/02/12 Unigue test file names in t/lib/warnings/9enabled
-M 619cec6d45 2009/02/12 Find extensions on VMS even when they don't have a
-M e74f76b27b 2009/02/12 make_ext.pl now generates a Makefile.PL if needed.
-M 261f6fe66f 2009/02/12 Move Attribute::Handlers from lib to ext. The layo
-M d9acc78d35 2009/02/12 Remove double slash in MANIFEST
-M 50615ac827 2009/02/13 More gitignore adjustments
-M 565e63af02 2009/02/13 Remove one of the two definitions of the a_const c
-M 25a0c96dcc 2009/02/13 More tests for array-ref smart match
-M e5de85fa00 2009/02/13 Remove obsolete comment; document test format
-M 229c18ce2b 2009/02/13 Document error "Smart matching a non-overloaded ob
-M 161d997670 2009/02/13 Add tests for undef smart-matching
-M 33570f8ba0 2009/02/13 $object ~~ undef should always test for definednes
-M 43a65c285f 2009/02/13 Handle uninitialized interpreter when performing v
-M 911225b602 2009/02/13 Remove code that has never been used in any test
-M 18d11902f6 2009/02/13 More tests for coderefs and smart match
-R 11baf631ab 2009/02/14 Forbid to use "foreach" as an attribute
- not BackCompat
-M f3b6b452d5 2009/02/14 Make git-find-p4-change only find changes done und
-M aeda4cd8e5 2009/02/14 Ignore lib/NDBM_File.pm
-M 89b2b9f7f6 2009/02/14 Ignore the OS X GNUmakefile*s, and t/test_state.
-M 9f937944c5 2009/02/14 Add git_version.h to private so that make distclea
-M cd5cc49dbc 2009/02/14 Clear Module::Build smoke on VMS while waiting for
-R 3a9a9ba7ba 2009/02/15 For -I, need to also unshift version and architect
- part of @INC order stuff
-R e28f3139a6 2009/02/15 Refactor S_incpush() to take 1 flags parameter, in
- part of @INC order stuff
-M 3d55b451d9 2009/02/15 ExtUtils::Install VMS extended character set suppo
-R 20ce4c1139 2009/02/15 In S_incpush(), rename the parameter from dir to p
- part of @INC order stuff
-R 55b4bc1cac 2009/02/15 Refactor the separator splitting loop of S_incpush
- part of @INC order stuff
-R a26c0e281c 2009/02/15 Loop in S_init_perllib(), only calling S_incpush*(
- part of @INC order stuff
-R b9ba2fadb1 2009/02/15 In @INC, move ARCHLIB and PRIVLIB after the curren
- part of @INC order stuff
-R 4705144da6 2009/02/15 Ensure that the pointer to S_incpush_use_sep() is
- part of @INC order stuff
-M bf63da66ae 2009/02/16 Yves states that patches to ExtUtils::Install shou
-M e120390b47 2009/02/16 Extra regex tests
-M 40bed538bd 2009/02/16 Upgrade to Encode 2.31
-M 2b93ed3263 2009/02/16 [perl #63234] [DOC PATCH] fix some missing parts o
-R 95bb830374 2009/02/16 Don't add PRIVLIB_EXP to @INC twice.
- part of @INC order stuff
-M 1ab9acc5e0 2009/02/16 Use tempfile() in tests
-R cf2a733d64 2009/02/16 add missing perforce-era entry to Changes files
- blead-specifc
-M eb3b8c7b72 2009/02/16 Update copyright years. 2008 sneaks in because of
-M e8e3635e32 2009/02/16 Replace *printf "%d.%d.%d", PERL_REVISION, PERL_VE
-M e50b42d3b9 2009/02/16 Abolish PERL_AV_SUFFIX_FMT, which was rendered obs
-M b79b76e09d 2009/02/16 PERL_FS_VER_FMT is only used with the current perl
-M bdb1cbf7b5 2009/02/16 As PERL_ARCH_FMT_PATH is a compile time constant,
-M 96e4a95712 2009/02/16 By spliting PERL_ARCH_FMT into PERL_ARCH_FMT_PREFI
-R 1fa74d9f24 2009/02/16 As WIN32 is already using different flags to incpu
- part of @INC order stuff
-M a89d24b9fe 2009/02/16 Ignore #defines in in patchlevel.h that end the li
-M d942165649 2009/02/16 Move PERL_VERSION_STRING from patchlevel.h to perl
-R 6434436b0d 2009/02/17 In S_incpush(), avoid "possible loss of data" warn
- part of @INC order stuff
-M 104393a727 2009/02/17 Get $ENV{PERL5LIB} into a known consistent state u
-M d5226c4c8f 2009/02/17 In runenv.t, break apart running perl and testing
-R 72533a49cb 2009/02/17 Tests for S_incpush_use_sep() splitting on : (or p
- part of @INC order stuff
-R 50d61629dc 2009/02/17 Pass the length of the string to S_incpush_use_sep
- part of @INC order stuff
-R 12865a2da0 2009/02/18 Remove the stub nw_get_sitelib(), and undefine SIT
- trival patch thats fiddly to merge
-M 4300f93b02 2009/02/19 [PATCH] DB_File 1.819
-M 7e8acedc1c 2009/02/20 Fixed missing word in Text::Wrap POD
-M c26da522aa 2009/02/20 Add a section on merging from a branch via GitHub
-M 5c9c28c679 2009/02/20 Remove an extra space
-M 9e079acef3 2009/02/20 Better diagnostics for the ~~ test
-M fceebc475d 2009/02/20 Fix {%hash} ~~ %hash test
-M 4cbab0e90c 2009/02/20 Reorder and complete tests for smart matching with
-M 2bab0636fd 2009/02/20 Remove the -x from the cherry pick and show how to
-R 70b6a84e97 2009/02/20 Merge branch 'blead' of ssh://perl5.git.perl.org/g
- MERGE: 2bab0636fd 4cbab0e90c
- individual commits merged
-M 9732edbb48 2009/02/20 Wonky example in perlthrtut
-R e42f52dd7f 2009/02/20 Silence a casting warning with memchr()
- part of @INC order stuff
-M db6dbf6ec9 2009/02/20 Check for thread failure in prime number example
-M fd2c5c6c39 2009/02/20 Text::Wrap maintained via the CPAN release
-R e6a0bbf8b4 2009/02/20 Add a parameter to win32_get_{priv,site,vendor}lib
- part of @INC order stuff
-M 73aec0b1ca 2009/02/20 More smartmatch tests
-M 58472d87a6 2009/02/20 Move redefinition of lstat above its first use in
-M 778e045f83 2009/02/20 Avoid VMS long filename support on older systems t
-d 7f336194cf 2009/02/21 Skip time64 when there is no 64-bit integer type a
- y2038
-M 1487aac67a 2009/02/21 Upgrade to ExtUtils::MakeMaker 6.49_01
-M 2f30d0d0af 2009/02/21 Re-apply changes 4adc95e616bac7ee and 200cbd6aa595
-R 3aaf6557bb 2009/02/21 In S_init_perllib(), correct errors in the MACOS_T
- part of @INC order stuff
-d ec4d613228 2009/02/21 Use "system" gmtime in time64 on VMS so C<vmsish '
- y2038
-R 04c9eeccd3 2009/02/21 NetWare has PRIVLIB_EXP as something other than a
- part of @INC order stuff
-R 3964fe451c 2009/02/21 Change the value passed into S_init_perllib() to a
- part of @INC order stuff
-R 2cace6acdf 2009/02/22 Unwind the implicit loop in S_init_perllib(), by w
- part of @INC order stuff
-R 32910c7adf 2009/02/22 In S_init_perllib(), only call PerlEnv_getenv("PER
- part of @INC order stuff
-R 35ba5ce91a 2009/02/22 In S_init_perllib(), s can be const char*
- part of @INC order stuff
-R 7fc7310782 2009/02/22 In S_incpush(), replace (addsubdirs || addoldvers)
- part of @INC order stuff
-R 929e5b34a4 2009/02/22 In S_init_perllib(), initialise perl5lib to NULL,
- part of @INC order stuff
-R c992324bfe 2009/02/22 In S_incpush(), move push @INC, ".../$archname" if
- part of @INC order stuff
-R a8f9c4338a 2009/02/22 In S_init_perllib(), push the bare SITELIB_STEM on
- part of @INC order stuff
-R 21110102bd 2009/02/22 In S_init_perllib(), push the bare VENDORLIB_STEM
- part of @INC order stuff
-R ee80e7be00 2009/02/22 7fc731078209e8c26ed8bba477edfd90724c7146 missed on
- part of @INC order stuff
-R 1e3208d822 2009/02/22 Move unversioned directories in PERL_OTHERLIBDIRS
- part of @INC order stuff
-R be71fc8f64 2009/02/22 Tidy up incpush. Re-order the macros, and re-inden
- part of @INC order stuff
-R 10cc20f60c 2009/02/22 In S_incpush, move the declaration of subdir insid
- part of @INC order stuff
-R 7ffdaae673 2009/02/22 Optimise S_incpush() by avoiding repeatedly copyin
- part of @INC order stuff
-R 08d0d8ab11 2009/02/22 For S_incpush(), dir is never NULL, and len is alw
- part of @INC order stuff
-M d83484c23e 2009/02/23 time_t is unsigned 32-bit on VMS; pick sGMTIME_max
-R f05b5874ed 2009/02/23 VMS-specific nit in S_init_perllib after 2cace6acd
- part of @INC order stuff
-M f785e3a13b 2009/02/23 vms.c - Remove .DIR; in UNIX mode.
-! e76b2c0c0a 2009/02/23 Add deprecate.pm. Deprecate shipping Switch.pm in
- maybe add this if there are CPAN updates to Switch,
- or if other things need deprecate.pm.
-M 4cdcc1f2a1 2009/02/23 Module::Build Changes from 0.31012, which hadn't b
-M 97b85144d8 2009/02/23 Temporarily reverse out change cd5cc49dbc0e5ee7482
-M 66e531b6b2 2009/02/23 Update to Module::Build 0.31_04 (with a tweak to M
-M 86bddcbfaf 2009/02/23 Re-apply cd5cc49dbc0e5ee748252c2da8b435855908e6d2
-R 6df20272fc 2009/02/23 Fix unused variable warning
- part of @INC order stuff
-M 40596bc538 2009/02/23 fileno() was failing when passed a NULL. I'm gues
-R 5e99c35995 2009/02/23 Merge branch 'blead' of ssh://stevep@perl5.git.per
- MERGE: 40596bc538 6df20272fc
- individual commits merged
-R ad3a6de0a2 2009/02/24 In S_parse_body(), sv hasn't been needed since -P
- fix to 32954
-M e301958b4a 2009/02/24 Upgrade to threads 1.72
-M c6cab44f03 2009/02/24 Upgrade to threads::shared 1.28
-M b925ea3bf3 2009/02/24 Fix to installing non-xs ext's in priv lib
-M 7ffb779818 2009/02/24 Fix line number test for scalar attribute handlers
-! d4be36a8ea 2009/02/24 remove explicit caller depth in deprecate.pm by se
- skip deprecate.pm for now
-M 15e5e8668b 2009/02/25 add-package.pl fixup
-! c0f08d2c3a 2009/02/25 test script for deprecate.pm
- skip deprecate.pm for now
-M 851e29585b 2009/02/25 MakeMaker is first-come in Maintainers.pl.
-M e4866e2e9b 2009/02/25 fix typo in pod/perlperf.pod
-M d9e167fc3a 2009/02/25 Update Filter::Util::Call to 1.08
-M 20caf59dc5 2009/02/26 Make non-blocking mode work on Windows in IO::Sock
-M 3aa396043e 2009/02/26 Remove needless sed line added with 4318d5a0158916
-M 6c0ec79a2e 2009/02/26 Correct the paths for the nonxs_ext targets, follo
-M ac62bc6fc9 2009/02/26 Remove spurious TODO indicators
-M 57df1c468e 2009/02/26 6c0ec79a2e9c445ac9999df2 failed to build from dist
-! 04fd187ebc 2009/02/27 add standard documentation to deprecate
- skip deprecate.pm for now
-! 6b913759a0 2009/02/27 rewrote deprecate test using File::Spec
- skip deprecate.pm for now
-! b032e88887 2009/02/27 NAME section must fit on one line
- skip deprecate.pm for now
-M f72763ca64 2009/02/28 Hash::Util::FieldHash 1.03 leaks SVs which are use
-! 096fcbb836 2009/02/28 Make deprecate.pm work on VMS.
- skip deprecate.pm for now
-M c23d817369 2009/03/01 Update to Term::ANSIColor 2.00
-M e83ba0bd96 2009/03/01 Update CPANPLUS::Dist::Build to 0.08
-M 223ddb2fc0 2009/03/01 Mark modules upgraded today as "upstream from CPAN
-M bdb7fd9ff2 2009/03/01 Add Compress-Raw-Bzip2, by Paul Marquess
-M 1c058b48fe 2009/03/01 Better gitignore file for Compress-Raw-Bzip2
-M f56ed502c9 2009/03/01 Make util.c compile on systems without getcwd()
-M b6be863a9c 2009/03/02 Bump versions to 0.10 for CPAN sync
-M 4443dd534c 2009/03/02 Update CPANPLUS to 0.85_06
-M be96f5c3c1 2009/03/02 Integrate Parse::CPAN::Meta 0.04 into core
-M 4ec613fc9e 2009/03/02 Bump versions to 0.12 to sync with CPAN version
-M 985e6bb7f5 2009/03/03 Remove the MANIFEST from Compress-Raw-Bzip2
-M 8d4c519e13 2009/03/03 Add contact info for Simon Wistow in Porting/Maint
-M 32a618150c 2009/03/03 Add Parse::CPAN::Meta to Porting/Maintainers.pl
-M c59d1bfa19 2009/03/03 Update Parse::CPAN::Meta to 0.04_01
-M 8f42c23d28 2009/03/04 Add a failing test for stack corruption with MULTI
-M e74f3fd4b4 2009/03/04 Update Archive::Extract to 0.31_02
-A f92e1a16ee 2009/03/04 Make // behave like || in when clauses
-A 516817b472 2009/03/04 Document that when() treats specially most of the
-A aa2407c5c4 2009/03/04 Remove TODO tests about && in when() clauses
-A 202d7cbdf6 2009/03/04 The new smart match dispatch table for 5.10.1 onwa
-M cad0fd6e0f 2009/03/05 Fix installation of 'autodie'
-M db4e6d0949 2009/03/05 Merge of autodie 1.999 into blead.
-M 86840a9d37 2009/03/05 Updated MANIFEST for autodie 1.999
-M bef46b70a2 2009/03/05 Update Archive::Tar to 1.46
-M ec6cc21dee 2009/03/05 In dl_vms.xs, treat dl_last_error like the SV that
-M 3e8320ccc2 2009/03/06 fix a couple of comments that annoyingly look like
-M 2645075aa0 2009/03/06 Upgrade to Module-Build-0.32
-M 69e34dac30 2009/03/06 Upgrade Text::Tabs+Text::Wrap to version 2009.0305
-A 6e03d74383 2009/03/06 Make the "..." flip-flop operator work in scalar c
-M bdaf8c65d3 2009/03/06 Upgrade to Test-Harness-3.16
-A 84c82fbf77 2009/03/06 Remove special case for coderefs with empty protot
-M 3f8c823a28 2009/03/07 Add a bunch of missing files to the MANIFEST
-M f325df1b45 2009/03/07 Fixing the cast for the result of (getgrent())->gr
-M 9f5407a9b9 2009/03/07 Fix test failure with t/TEST
-M 4e71788c75 2009/03/07 Update to Encode 2.32
-M 8c472fc1d4 2009/03/07 Make DynaLoader clone its private data under threa
-R 96ccaf5388 2009/03/07 Make PerlIO::get_layers really test flgok before r
- fix to 92e45a3e6a
-M 1bbbfc5065 2009/03/07 Fix MULTICALL in List-Util
-M 7cae69c7f0 2009/03/08 Cwd and File::Spec are maintained as part of PathT
-M 6b3d80d96d 2009/03/08 synchronize Getopt::Long CHANGES file to the corre
-M a4876a67e7 2009/03/08 Fix synchronization of Getopt::Long CHANGES file t
-M e8fb11d7f7 2009/03/08 Update t/harness to reflect behaviour changes in T
-M a5e72d97a7 2009/03/08 Need to -I../lib explicitly, as TAP::Parser no lon
-M e276a45bf1 2009/03/08 Remove declaration of XS_Internals_inc_sub_generat
-M af6492bf9e 2009/03/08 lib/Text/TabsWrap/t/dnsparks.t should skip under T
-M edd52d85e4 2009/03/10 Fix a printf compilation warning
-M b92436812d 2009/03/11 Merge Attribute::Handlers 0.82 into core
-M 7cc1b246ee 2009/03/11 Merge Parse::CPAN::Meta 0.05 into core
-M 701602e6f2 2009/03/11 [PATCH] Update CPANPLUS::Dist::Build to 0.14
-M 7bb74d351e 2009/03/11 [PATCH] Update Archive::Extract to 0.31_03
-A 85af77a509 2009/03/12 Some tests reorgarnisation for ~~ against undef an
-M 34a81e2b89 2009/03/12 Fix #56194 Regex: (((??{1 + $^N}))) behaves differ
-M 3a7a94e274 2009/03/13 Make eval{} (entertry) trappable by Safe
-A 62ec5f5862 2009/03/13 Make smart matching ~~ undef dispatch only on the
-d 05fe29fd3b 2009/03/13 Make overflow warnings in gmtime/localtime only oc
- y2038
-d 7a67abdf14 2009/03/13 Ignore the decimal part of any floating point argu
- y2038
-M 4d9f3eeb6f 2009/03/13 Ilya M. is no longer maintaining Data::Dumper. Ass
-M 5a7ebd3db9 2009/03/13 Add -E in the command-line usage in perl.pod
-d 43eb98159e 2009/03/13 Tests for floating point args to localtime and gmt
- y2038
-M df3467db16 2009/03/14 Return OPERATOR('[') for '[' without falling throu
-M f50fa36f2a 2009/03/14 Better test case for [perl #63854] Error parsing "
-M 319fab5061 2009/03/14 Create IO-Compress
-M cee5ec9732 2009/03/14 Remove directories from manifest
-M eb1dd64e3e 2009/03/14 Disambiguate mention of -E in perl.pod and in perl
-M 8f11c4a440 2009/03/15 Upgrade to IPC::SysV 2.01
-M 17c79f4337 2009/03/15 Add IPC::SysV to Porting/Maintainers.pl
-M 78b3516b6c 2009/03/15 Update UPSTREAM for Devel::PPPort
-M 7bb03b244e 2009/03/15 Upgrade to Devel::PPPort 3.17
-A a4a197da79 2009/03/17 Iterative smart match over keys/elements when a co
-A 6ac83b6344 2009/03/17 Fix a warnings test that was failing due to smart
-A 203d1e8938 2009/03/17 Test that in "~~ sub", the sub is not called on em
-A 168ff81826 2009/03/17 Document that empty sets don't smart-match
-M 6210e03fb1 2009/03/18 Fix typo in English name of $&
-M 245490700b 2009/03/18 Doc fix: the /k regexp modifier should really be w
-A 0cfbf1eaba 2009/03/18 Remove obsolete or redundant tests
-A 2e0e16c9a7 2009/03/18 Reverse the order of operands for several "~~ hash
-A 61a621c635 2009/03/18 Smart match when a hash is on the RHS
-M a0df7637f6 2009/03/19 Upgrade to Module-Pluggable-3.9
-M 5bc8ef5059 2009/03/19 Upgrade to Attribute-Handlers-0.83
-M 4a28828fc8 2009/03/19 Undo the INST_LIB change from the Module-Pluggable
-M 53102b2bf3 2009/03/19 Bump Module-Pluggable VERSION following 4a28828fc8
-M de9b652d38 2009/03/19 pod/perlreftut.pod: keep example in tune with the
-R 38bb37b9aa 2009/03/20 Revert the op.c part of 3049cdab to enable shared
- it fixes an optimisation bug that been around
- for years; and the fix might introduce some
- new bugs
-M 16bf6aa6d6 2009/03/20 Remove unnecessary MANIFEST file for IO-Compress
-M baddfc4720 2009/03/21 Update CPANPLUS::Dist::Build to 0.16
-M 07abd197a8 2009/03/21 Correct a few file references in README files
-M e57a4e52f2 2009/03/21 fix typo - s/was/what/ is to be ignored
-M ac56ae2e85 2009/03/22 update MANIFEST for file removed by 16bf6aa6d68d98
-M c966426a3b 2009/03/22 fix [RT #60034]. An equivalent fix was already in
-M 7efcbeefb3 2009/03/22 Fixes for ext/compress
-A 2a37c5e731 2009/03/23 Add more tests with an empty hash on the right of
-M 76467b2a65 2009/03/23 Upgrade to ExtUtils-MakeMaker-6.50
-A b38a9f03cc 2009/03/23 Revert order of ~~ in definition of smart matching
-A b0138e9991 2009/03/23 Refactoring work on '~~ @array' implementation
-A a566f585de 2009/03/23 Make ~~ qr// non-commutative
-A 33ed63a220 2009/03/23 Implement "~~ $scalar" for numbers and strings
-A ecf7aef391 2009/03/24 Fix tests for ~~ overloading
-M 18a10db9e0 2009/03/24 Mark Florian Ragwitz as the NEXT maintainer. NEXT
-A 07edf49764 2009/03/24 Make []~~\&f and {}~~\&f match
-A da9849c509 2009/03/24 Specify that the behaviour of $foo ~~ Range should
-A fc83907687 2009/03/24 Fix equivalent code in perlsyn for Array~~Hash
-M d5fe29ea03 2009/03/24 Mark upstream as blead for Net::Ping.
-R 3dae3b3445 2009/03/24 Merge branch 'blead' of ssh://stevep@perl5.git.per
- MERGE: d5fe29ea03 18a10db9e0
- individual commits merged
-M 373b131131 2009/03/24 Add a SEE ALSO section based on suggestions from D
-A 2522c35a14 2009/03/24 More tests. Simplify tests for ~~ overloading
-A 7c41e62ef6 2009/03/24 Inline macro tryAMAGICbinSET() in smart match rout
-M 6f63574e65 2009/03/24 Fix for regular expressions for RFC2822.
-M 2d373db117 2009/03/24 For some reason, the core version and the cpan ver
-M c331296618 2009/03/24 Fix perl #63924: shmget limited to 32 bit segment
-R f14bcc5683 2009/03/24 Merge branch 'blead' of ssh://perl5.git.perl.org/g
- MERGE: c331296618 2d373db117
- individual commits merged
-M ce1534abac 2009/03/24 Make regen_perly.pl compatible with bison 2.4
-M aae7e7b3d1 2009/03/24 Update the version requirement message in regen_pe
-M 86247f3d60 2009/03/25 Upgrade to Encode-2.33.
-R 3d43828503 2009/03/25 Merge branch 'blead' of ssh://stevep@perl5.git.per
- MERGE: 86247f3d60 aae7e7b3d1
- individual commits merged
-M 9b33fb8e6c 2009/03/25 Add SEE ALSO's to find2perl and File::Find.
-M 036055ae9a 2009/03/25 [perl #63914] Time::Piece reports timezone incorre
-M 06b0438142 2009/03/25 find2perl (was Re: help unblock me from *@perl.org
-M 281206e6bb 2009/03/25 One more to ignore for metaconfig
-M 5086dff9f4 2009/03/25 Detection of IPv6 clueful functions by Configure (
-M d7fba2bf7c 2009/03/25 IPv6 config variables for the other OS's
-M d002ef56a2 2009/03/25 Move Module:Pluggable tests from t/Module_Pluggabl
-M 83c6af6020 2009/03/25 d002ef56a2861d99 didn't fix the Makefile.PL to ref
-# #
-# start of Filetest overloading BRANCH
-# rejected this branch because its a new feature, touches quite a bit of
-# core stuff, and who knows, might breaks something.
-R 8c8d0d995d 2009/03/25 Add new overloading type.
-R 9846fe2208 2009/03/25 Run overload.pl.
-R d89f1457dd 2009/03/25 Tests for -X overloading.
-R 1b606c4906 2009/03/25 Call -X magic from pp_ftread.
-R d3ebc3eb19 2009/03/25 Adjust tests.
-R 180b7b9bf7 2009/03/25 Move magic logic into tryAMAGICftest macro.
-R 07fe7c6a9f 2009/03/25 Finish the rest of the -X ops.
-R 448e77d75c 2009/03/25 Add -X overloading to File::stat.
-R 0f0923a377 2009/03/25 -M, -C, -A for File::stat.
-R f6aa80235c 2009/03/25 More tests for -X/string/random overloading.
-R c4c7412cbf 2009/03/25 Fall back to "" overload for -X.
-R 4d57d24f51 2009/03/25 Test stacked overloaded -X.
-R 7fb13887d7 2009/03/25 Stacked overloaded -X.
-R 709edd5bfa 2009/03/25 I missed a s/stat_cando/cando/ in File::stat.
-R cd22a09c8c 2009/03/25 Tests for -X overload on File::stat.
- this also introduces unfixed bug #65368
-R e22107918e 2009/03/25 Docs for -X overloading.
-R 4f9e790296 2009/03/25 Reinstate File::stat::stat_cando.
-R b7c4737f31 2009/03/25 Warnings for File::stat deficiencies.
-R cf5afd7805 2009/03/25 I assume VMS doesn't have a superuser.
-R f29a27fe8a 2009/03/25 Bump File::stat's $VERSION.
-R 6cf0ee866a 2009/03/25 Docs for File::stat.
-R d0c91b6afc 2009/03/25 Test -X overloads on GLOB and IO refs.
-R 52f7f5abcb 2009/03/25 IO refs always stringify for -t, -T and -B.
-R 500ff13f18 2009/03/25 -l was missing an SPAGAIN.
-# back to main
-A c3886e8b36 2009/03/25 Adjustments to the ~~ dispatch table
-M 776304fb74 2009/03/25 fix smoke issues with the compression modules
-M df4bc1f3db 2009/03/26 make_ext.pl's automatic Makefile.PL generation can
-M b81ac31e6a 2009/03/26 No need to set MAN3PODS now that make_ext.pl takes
-M a2b175af91 2009/03/26 make_ext.pl should also set INSTALLMAN1DIR=none wh
-M c3e2aceb2c 2009/03/26 Simplify the file description for ext/threads
-M c71e4075e7 2009/03/26 Remove now-redundant references to MAN3PODS in cor
-M 12f277603d 2009/03/26 Remove MAN3PODS and NORECURS from Makefile.PLs whe
-M e34f487206 2009/03/26 Correct the path for IO - needs a trailing / to st
-M 7a71a51454 2009/03/26 Remove MAN3PODS from modules' Makefile.PLs which a
-M 4d3e0127a2 2009/03/26 Undo the local change to Time::Piece's Makfile.PL
-M fc833dfd81 2009/03/26 make_ext.pl's automatic Makefile.PL generation can
-M 5c1e544edd 2009/03/26 Ignore Makefile.PLs that are now autogenerated.
-# more Filetest overloading BRANCH
-R fa7f7498c3 2009/03/26 -ugk don't call string overload when S_IXXX isn't
-R 0e985b6b12 2009/03/26 The DOSish branch of File::stat->cando had its arg
-# back to main
-d 7430375d19 2009/03/26 Namespace clean-up for time64.
- y2038
-d c8269701e1 2009/03/26 Remove unused function S_copy_big_TM_to_little_tm
- y2038
-! 036d8bd42e 2009/03/27 Add inet_pton() and inet_ntop() to Socket.
- some preliminary support for IPv6 - perhaps
- add it later???
-R 81cdde7ffa 2009/03/27 Merge branch 'blead' of ssh://stevep@perl5.git.per
- MERGE: 036d8bd42e c8269701e1
- individual commits merged
-! e9872d0414 2009/03/27 What am I thinking? Just bump the version.
- see 036d8bd42e
-! 4411113f31 2009/03/27 Add inet_pton and inet_ntop to the list of functio
- see 036d8bd42e
-R 40b195f125 2009/03/27 Merge commit 'mauzo/over-X' into blead
- MERGE: 4411113f31 0e985b6b12
-# Filetest overloading now merged into main
-M d82dd1bcff 2009/03/27 Some standards compliance for the new Time::Piece
-! 37fa5116bc 2009/03/27 Fix concise-xs.t after recent changes to Socket.pm
- see 036d8bd42e
-d 673062a98a 2009/03/27 Forgot one "static" in 7430375d1909c2b62c1fb3f9c6e
- y2038
-! d21dfdd8f2 2009/03/27 Also skip test 20 in t/Socket.t when no IPv6 is av
- see 036d8bd42e
-R b11720532d 2009/03/28 Improve mro merging error messages.
- changed diagnostic
-R f20dcd76e7 2009/03/28 Allow when to be used as a statement modifier
- high risk of breakage
-M 7536ed5788 2009/03/28 In Perl_sv_setsv_cow(), dstr can be NULL.
-R 4b1c7d9edb 2009/03/28 Don't COW PVFMs, as the IVX is now used for FmLINE
- update to rejected change c568a9d186
-R a214957f7e 2009/03/29 Don't call SvPV_const() on the method name at the
- only an optimisation, and the code has diverged
-M d4d72fe625 2009/03/29 Make Time::Piece use the init_tm() in util.c, bump
-M a773d2c778 2009/03/29 DB_File 1.820: Remove MAN3PODS => {}
-M 51683ce6d9 2009/03/29 Update to Unicode::Normalize 1.03
-R 9340c80aae 2009/03/29 In Perl_newCONSTSUB(), sv should not be NULL.
- not BackCompat
-R 99ab892b64 2009/03/29 Change Perl_newCONSTSUB() so that a NULL sv genera
- not BackCompat
-R d5cecc0e63 2009/03/29 Change Regexp::DESTROY to be a constant subroutine
- not BackCompat
-R a35666c6be 2009/03/29 Document that DESTROY is subject to AUTOLOAD, and
- not BackCompat
-R 2a8f410418 2009/03/29 Merge commit 'origin/postfixwhen' into blead
- MERGE: a35666c6be f20dcd76e7
-M cf3f0ffbff 2009/03/29 provide minimal documentation for the MUTABLE_*()
-R 4f8ea571d5 2009/03/29 Document when as a syntax modifier
- see f20dcd76e7
-M dc82791df0 2009/03/30 Updates for ext/compress*
-M 3acf89b2d2 2009/03/30 Make references to the Glossary in Config.pm and C
-M b1c3c09642 2009/03/30 TZ setting must contain an offset.
-M 89b75a3bb5 2009/03/31 Upgrade to CPANPLUS-Dist-Build-0.18.
-M b75281af56 2009/03/31 Avoid "Constant subroutine ... redefined" warning,
-R 85a79b09b8 2009/03/31 Note why we need a seemingly useless empty &Regexp
- needs d5cecc0e63
-M cedab142c3 2009/03/31 Don't create an empty Errno.pm if there is an erro
-M a19443d4be 2009/03/31 Upgrade to Getopt::Long 2.38
-M 87da6a1ba6 2009/03/31 Getopt::Long is maintained on CPAN
-M f5800e99d7 2009/03/31 Close the file before renaming it. Problem spotted
-M 2dcc2c2419 2009/03/31 Can't use inet_ntop and inet_pton under Cygwin bec
-R 0a8c518df2 2009/03/31 Remove the 5.005 threads details from the document
- removing :lock from the doc might confuse
- someone (!)
-M 80c061e3d2 2009/04/01 Sadahiro says that "first-come" should be preferre
-R e9fd6cc75e 2009/04/02 Skip bug in new File::stat test.
-M eb53357261 2009/04/02 document PERL_SYS_INIT, PERL_SYS_TERM and that the
-M 8c31914eb8 2009/04/03 Don't assign needlessly to dirname. (which seems t
-M ae2e8cc73f 2009/04/03 Don't needlessly assign to pagname (which seems to
-M 081f72ad6f 2009/04/03 In sdbm_open(), replace strcat()s and strcpy()s wi
-M f67e8e0b61 2009/04/06 Remove libbsd/libBSD from wanted libs on AIX
-R 55b6781562 2009/04/07 Deprecate assignment to $[
- not BackCompat
-M 05d7b09c88 2009/04/07 Make h2ph look in "include-fixed", needed by at le
-M fd2b7f5590 2009/04/07 Docs: Typo: \{-1} -> \g{-1}
-M 074a7adc8d 2009/04/07 Docs: Typo: 'no strict subs' -> 'no strict refs'
-M 4dfdcbc906 2009/04/07 Docs: Minor reorganization.
-M 2ee409f9fc 2009/04/07 Docs: Make the "use base" purpose more obvious
-M c98e0e85db 2009/04/07 Docs: Quick explanation of duck typing and a warni
-M 549d696aa7 2009/04/07 Docs: Get rid of those awful tabs!
-M c7b05296e4 2009/04/07 Docs: Better[?] development of SUPER
-M 507fa6a58e 2009/04/07 Docs: Cleanup lead-in to instance variables
-M 32914eef96 2009/04/07 Docs: Better orgnization of instance discussion
-M 33739d6a0b 2009/04/07 Docs: Make use of $self and $class clear
-M 64261f91d3 2009/04/07 Docs: Minor modifications to discussion of constru
-M c30f1015c2 2009/04/07 Docs: Clarify that a class is not an instance
-M 9cbc8da9ae 2009/04/07 Docs: Expanded treatment of adding instance variab
-M 9014bf7fb4 2009/04/07 Docs: Update summary and add copyright
-M 9fd5bac037 2009/04/07 Docs: Fixed a couple of [my] typos
-M 082b74eb74 2009/04/08 Upgrade to NEXT-0.62.
-M 36d7a91d20 2009/04/08 h2xs incorrectly treats enum values like macros
-M a8ba03fb20 2009/04/08 Use of freed comppad array during clear_yystack()
-M 932dfdf14c 2009/04/08 Net::hostent fails make test if can't resolve loca
-R 5929274fd6 2009/04/09 Merge commit 'rafl/blead' into blead
- MERGE: 932dfdf14c 082b74eb74
-M 0e4fe7cb8f 2009/04/09 Update CPANPLUS::Dist::Build to 0.20
-! 5a8cf36709 2009/04/09 Fix declaration-after-statement in ext/Socket/Sock
- see 036d8bd42e
-M ee6d2783b2 2009/04/09 Don't SEGV while warning about redefining the form
-M f1a7681278 2009/04/10 Upgrade to NEXT-0.63.
-R d62c72f641 2009/04/12 Remove attrs, which has been deprecated since 1999
- lets not in maint!
-R 674e4532c9 2009/04/12 Sort the MANIFEST.
- done manually instead
-R 718f7b5acf 2009/04/12 Rebuild pod/perltoc.pod.
- done manually instead
-R cee202b7be 2009/04/12 Eliminate "Old Perl threads tutorial", which descr
- harmless to keep it for now
-R 8e5dadda1c 2009/04/12 Deprecate use of the attribute :locked on subrouti
- don't want new warnings in maint
-M 42f6aa011a 2009/04/12 Remove #ifdef CVf_LVALUE/#endif - LVALUE subs aren
-R 48462a74af 2009/04/12 Convert xsutils.c and lib/attributes.pm to a regul
- too hard to merge
-R c32124fea7 2009/04/12 Deprecate using "locked" with the attributes pragm
- don't want new warnings in maint
-R f1a3ce43fb 2009/04/12 Deprecate using "unique" with the attributes pragm
- don't want new warnings in maint
-R 6db6f3536f 2009/04/12 s/locked/lvalue/ in the examples, and remove menti
- needs c32124fea7 and onwards
-R 009f650f63 2009/04/12 Remove a link to the attrs pragma, which has now b
- attrs hasn't been removed
-R d32faaf3b4 2009/04/13 GvUNIQUE* have been defined as 0 since 2005/06/30
- BackCompat
-P e95ab0c0d2 2009/04/13 Remove CVf_LOCKED and CvLOCKED*(), now that nothin
- BackCompat
- (just grab the concise-xs.t part)
- (and the CVf_LOCKED in the use line)
-M b871937fe0 2009/04/13 Refactor the SKIP parser to also handle TODOs. TOD
-M 6ee4ed1065 2009/04/13 Propagate the upgraded TODO/SKIP parser from ext/B
-M f9cd5d9f11 2009/04/13 Tweak t/lib/common.pl to use test.pl's (better) te
-M aa381260d0 2009/04/13 A perl-version portable fix for B coping with CVf_
-M ac0f141316 2009/04/13 Correct two other tests that apparently should be
-M 4a4b8592c1 2009/04/13 our $TODO should be local $::TODO, revealing a bug
-M 79289e05b8 2009/04/13 TODO tests for deparsing strict, warnings as strin
-R 6e0da8f3ff 2009/04/13 Restore prototypes to XS code in attributes, accid
- see 48462a74af
-M c14f59c3c1 2009/04/13 [PATCH] Compress-Raw-Bzip2 2.018 (was RE: Compress
-M f996b9a332 2009/04/13 Remove Makefile.PLs that make_ext.pl can automatic
-M 5dfb71230e 2009/04/13 Remove an unnecessary use Config;
-M ad6402bdb9 2009/04/13 Upgrade to CGI.pm-3.43
-R 3915ffe07a 2009/04/13 Merge branch 'blead' of ssh://stevep@perl5.git.per
- MERGE: ad6402bdb9 5dfb71230e
- individual commits merged
-M 2f2071b189 2009/04/13 [PATCH] Update CPAN.pm to 1.93_52
-M 512e1353c9 2009/04/14 Add file missed in previous commit.
-M 5a7d111884 2009/04/14 Documentation Patch: perlxs.pod
-M edd0a813ce 2009/04/16 Update CPANPLUS::Dist::Build to 0.22
-M 76c8ecbc54 2009/04/16 Build bzip2 witha C++ compiler
-M c1a2df7619 2009/04/16 Add tests to verify that h2ph output compiles and
-M c0cc52e96e 2009/04/16 Squelch 'Constant subroutine ... undefined' warnin
-M b36d99fa00 2009/04/16 Data::Dumper hash iterator needs to be reset on al
-M ea6189f6ad 2009/04/16 Bump VERSION of Data::Dumper
-R 4acdd4cdd4 2009/04/16 Ignore attributes.pm in lib since it's now an XS m
- see 48462a74af
-M bb21036d6b 2009/04/16 Avoid loading Config, as we don't need to distingu
-M f1aeb07864 2009/04/16 Ignore some autogenerated makefiles
-M d0fc6d8d26 2009/04/17 Remove last vestiges of USE_WIN32_RTL_ENV
-M 8d0cd07e60 2009/04/17 Add reference to MS KB article describing leak in
-M 848ad75c71 2009/04/17 In autodoc.pl, remove the unused parameters and fu
-M bc35008162 2009/04/17 In autodoc.pl, inline and hence eliminate walk_tab
-M 6e0733998e 2009/04/17 Fix failing Time-Piece tests on Win32
-M 344af494c3 2009/04/18 Generate perlapi.pod and perlintern.pod at build t
-M d092c3cd1c 2009/04/18 Add a --quiet option, to suppress all the routine
-M 3dc608da20 2009/04/18 grep then sort, as it's more efficient to sort a s
-M 7b73ff9889 2009/04/18 As autodoc.pl no longer rebuilds repository files,
-M ce75ce2a31 2009/04/18 fix trivial typo in MANIFEST
-M 58ccccf697 2009/04/18 Here are some patches for QNX6 against 5.10.x. Unp
-M 2d871820ee 2009/04/18 autodoc.pl needs -Ilib. I had been testing with a
-M cd09325492 2009/04/18 Make autodoc.pl accept the root dir in @ARGV
-R 6fea91d48c 2009/04/18 Remove ExtUtils::MM_Haiku
- see 1c1947d58d
-M db34a22aed 2009/04/19 For VMS, generate the delete rules for generated a
-M 9e64a65643 2009/04/19 For Win32, add the generated files to the delete l
-M 6d664f0724 2009/04/19 In buildtoc, refactor all the duplicated checking
-M 8e7bc40f98 2009/04/19 Move the symlink fo perl51110delta.pod to perldelt
-M 327014894c 2009/04/19 In the context of PERL_OLD_COPY_ON_WRITE, remove c
-M ddea3ea7e3 2009/04/19 Simpify logic in Perl_pad_free(): SvIsCOW() has th
-M e0be038f12 2009/04/19 In the Makefile, no need to change into pod/ to cr
-M dc1ddadda0 2009/04/19 Make lib/h2ph.t use t/test.pl.
-M 2543619455 2009/04/19 Make h2ph's generated preamble require-able when e
-A 2da5311b94 2009/04/20 Document that ~~ overload will only work on the RH
-A f008545ed2 2009/04/20 Remove some empty lines in a code example
-M dd0cfdaa8f 2009/04/20 Move vms/perlvms.pod to pod/ and update the Makfil
-M 31f6f5aa00 2009/04/20 Clarify PERL_SYS_INIT3() usage.
-M b9b2d9df6a 2009/04/20 Remove leftover copying of perlvms.pod on Win32
-M 08115d9c48 2009/04/20 Fix calling of autodoc.pl in Win32 nmake Makefile
-M 0fdd9e5c24 2009/04/20 In corelist.pl, refactor to avoid repeating the fi
-M da09dfe31d 2009/04/20 Tweak corelist.pl's heuristics to cope with the re
-M 7eb47696de 2009/04/21 Build perltoc.pod, rather than shipping it. This w
-M b0f0014b9a 2009/04/21 We need $(MINIPERL_EXE) before we can run autodoc.
-M 3bc8f799d8 2009/04/21 Fix reference to perlvms.pod after move to new loc
-M 3e21d4f037 2009/04/21 7eb47696deb9a7343fb4847f7342919a6df59e21 should be
-M 706b232f0e 2009/04/22 Sean would like to pass on his maintainership of I
-M c98623cf8b 2009/04/23 Space between target and colon is not optional in
-M 75585ce3d6 2009/04/23 Add an idea to perltodo
-M 15a429282c 2009/04/23 qr_gc.t is only TODO on 5.11.x+
-M e1ae7bac59 2009/04/23 Break out the logic that maps file names to module
-M fb237dfd6e 2009/04/23 Use files_to_modules() and a CPAN mirror to map mo
-M 29cab1c7c7 2009/04/23 Add %upstream and %bug_tracker data to Module::Cor
- its a 2.17_01 version. Wait for proper release?
-d 0accdd48ba 2009/04/23 Use %Module::CoreList::bug_tracker to print out up
- wait till its more tested and stable
-M bfeb82207b 2009/04/24 Run buildtoc on VMS.
-M 0b01631df0 2009/04/24 Clean up pod/buildtoc so it will run on VMS.
-M 8fd7046754 2009/04/25 Flag that perltoc.pod should be omitted from perlt
-M 776e8d8cea 2009/04/25 [perl #56644] TODO was too severe. Only :unix :std
-! 4efe685a06 2009/04/25 make the File::Copy permission change from 2.15 on
- awaiting any other File::Copy merging
-d d95a2ea538 2009/04/25 Make time64 use NV for time_t, I32 for year, not Q
- y2038
-M 30a06a3af1 2009/04/25 perltoc.pod depends on perldelta.pod.
-d 2b622f1ab9 2009/04/26 [PATCH] Allow PERL5OPT=-W
-M 46ad78bae1 2009/04/26 [PATCH] Update Term::UI to 0.20
-R f21000970a 2009/04/26 Fix #if/#else bug introduced with MACOS_TRADITIONA
- leave MACOS_TRADITIONAL stuff broken as-is
-R e37778c28b 2009/04/27 Remove all #ifdef MACOS_TRADITIONAL code in core a
- leave MACOS_TRADITIONAL stuff broken as-is
-R e51b748d59 2009/04/27 Simplifications to S_incpush() now possible withou
- depends on MACOS_TRADITIONAL removal
-M 20afcebf45 2009/04/27 Update CPANPLUS to 0.86
-M 39a48622bc 2009/04/27 Update CPANPLUS::Dist::Build to version 0.24
-M bb23f8d160 2009/04/27 Minor fixups for the documentation for crypt.
-d 287a962e68 2009/04/28 Fix -p function and Fcntl::S_IFIFO constant under
-M 02f445e176 2009/04/28 Update CPANPLUS to 0.8601
-M 15cfc26182 2009/05/01 Add generated perltoc to git ignore list
-M 615b7a35f0 2009/05/02 t/test - Hack for VMS pipe bug.
-M 4feb3b7200 2009/05/02 Update Archive::Tar to 1.48
-M 740bae8797 2009/05/02 fix POD typo
-M b017ed2380 2009/05/02 Document that XS_VERSION_BOOTCHECK may break if $V
-M f31522f37e 2009/05/03 Remove warnings "Exiting given/when via next/last"
-M 1ebfab3267 2009/05/03 Add tests for last and next in when()
-M ea6efd2c81 2009/05/03 RE: [PATCH] compress 2.018
-M 94fe740e5e 2009/05/04 Update CPAN.pm to 1.93_53
-M 7a9a6fa18c 2009/05/04 Clarify that =encoding is global in POD
-M 80b215cbdd 2009/05/04 Patch to fix the problem enclosed.
-M 2b78b7715e 2009/05/04 Update IPC::Cmd to 0.44
-M 1dffc4d1a2 2009/05/04 Fix SEGVs when cloning a typeglob that has been un
-M 566771cc12 2009/05/04 Make Perl_hek_dup() cope with a NULL "source" para
-M 46d6503777 2009/05/04 In Perl_gp_dup(), no need to explicitly zero ret->
-! 079cb8cc5a 2009/05/05 Make File::Copy always return 0 (not "") on failur
- more File::Copy stuff
-! 216e7dec10 2009/05/05 Bump version of File::Copy
- more File::Copy stuff
-A 329802ba97 2009/05/05 Clarify that @a ~~ @b recursively smart matches
-A f1bef09e91 2009/05/05 Add tests for @array ~~ $string
-A 9de654f174 2009/05/05 Merge branch 'blead' into smartmatch
- MERGE: f1bef09e91 216e7dec10
-M 12016aadb5 2009/05/05 Fix Time-Piece tests on Win32 with PERL_IMPLICIT_S
-A d444f7e3a3 2009/05/05 Fix test for stringification of arrays.
-M 46f1a616f5 2009/05/05 Document that FileCache uses symbolic references
-M 045cad9882 2009/05/05 Bump $VERSION of FileCache
-M 41881f2581 2009/05/05 Add $(LDLIBPTH) to the documentation generation co
-M 4dcdb34ab7 2009/05/06 Export two more PerlIO symbols.
-M bebf870e6d 2009/05/06 perltie.pod docpatch
-M 938cfd5cbc 2009/05/06 Fix code before declaration compile error on Win32
-d df31f9b1de 2009/05/06 -Duserelocatableinc and -Duseshrplib don't work to
-M 81ab4c4438 2009/05/06 Fix POSIX::tzset() as per Time::Piece::_tzset().
-A ad0781bc8e 2009/05/06 Rewrite tests for objects and ~~
-M 3ecadf9633 2009/05/07 Fix ExtUtils::Miniperl on Win32
-M 4320d0941c 2009/05/07 Upgrade to CPANPLUS-Dist-Build-0.26
-M 2d96a87905 2009/05/07 Bring PathTools changes file in sync with... PathT
-M c1413a7f3f 2009/05/08 Update CPAN.pm to 1.93_54
-M 1e3c652eb4 2009/05/08 git checkout in add-package.pl, not git co
-M 52f75a8770 2009/05/08 Upgrade CPANPLUS::Dist::Build to 0.28
-M 5f1c709273 2009/05/08 Silence Win32 compiler warning in IO.xs
-A 031a44ed33 2009/05/08 More tests for ~~
-A 6d743019f3 2009/05/08 Make ~~ overloading only be invoked on the right a
-A 365c4e3d76 2009/05/08 Inline macros used only once
-A d0b243e39c 2009/05/08 Document what to do with object on the left and ad
-A 015eb7b967 2009/05/09 Implement distributivity in $scalar ~~ @array
-A 41e726ac82 2009/05/09 Treat blessed references on the left of C<~~> as s
-A 0483c67272 2009/05/09 Add tests for object ~~ regexp
-A 90a32bcb5e 2009/05/09 Add a test for object ~~ string, with stringificat
-A ea0c2dbd5f 2009/05/09 Implement Hash/Array ~~ Regex (with tests)
-! f4388f027b 2009/05/09 Revert "Bump version of File::Copy"
- more File::Copy stuff
-M 6c34c32116 2009/05/10 Pull PathTools 3.30 (which was just a blead sync.)
-M b7a0f54ced 2009/05/10 Update info on number of magic types\n\nRemove men
-M 0befdfba7e 2009/05/10 Making ExtUtils::ParseXS use strict; is TODO.
-M 318bf70858 2009/05/10 Replacing dump.c's use of SVs as temporaries is TO
-M 4477f4efa6 2009/05/10 bump Storage version to 2.20 to distinguish it fro
-d d5e98372e6 2009/05/11 Allow typed arrays and hashes
- (maybe merge just the tests at some point?)
- (just Attribute-Handlers/t/multi.t was
- cherry-picked as 46e4e78b24)
-M eb1c4873a4 2009/05/11 Update IO to CPAN 1.24 release
-A f118ea0d48 2009/05/12 Remove proposed (but unimplemented) $foo ~~ Range
-M 9c53f8ae1a 2009/05/12 remove all Changes* files
-M 9519d2ec68 2009/05/12 Resurrect the Changes file as a simple guide to fi
-A 054b75b0ac 2009/05/12 Smart matching is to-done.
-A ae20c3aa7c 2009/05/12 Register ~~ operator overloading in its own catego
-M 7214e7c31c 2009/05/12 add perl589delta.pod to blead
-M 5f320ac744 2009/05/12 Upgrade to Time-Piece-1.14
-M 8177d4d97c 2009/05/12 Skip test for changing TZ if running in a pseudo-f
-R fc5be80860 2009/05/12 Add perl589delta.pod to pod.lst, and run pod/build
- done manually instead of merging
-d 8d1c3e263b 2009/05/12 Inline S_glob_2pv() into Perl_sv_2pv_flags(). (Exi
-M f7bbabd3de 2009/05/13 select() generates "Invalid parameter" messages on
-A 289d21b27f 2009/05/13 Enable more warnings in smart match tests
-M 56d86adf5b 2009/05/13 Merge branch 'smartmatch' into blead
- MERGE: f7bbabd3de 289d21b27f
- followed by maint-specific fixups with
- d0f09470a5 (no SVt_REGEXP)
-M 36f064bc37 2009/05/13 do/require don't treat '.\foo' or '..\foo' as "abs
-M ea8b8ad24d 2009/05/14 Remove remaining POD tags in verbatim paragraphs
-M 58ab674396 2009/05/14 document Git_Data
-d 233b59f5c8 2009/05/14 pp.c and time64.c don't need to be executable
- y2038
-M 8024b5df24 2009/05/14 Move autodie tests in lib/autodie/t, so they are p
-M 7fecd077a7 2009/05/14 Fix failing autodie test with new smartmatch seman
-d b1fc363696 2009/05/14 Amelioration of the error message "Unrecognized ch
-R 3f66cd9441 2009/05/14 WIN32 preprocessor symbols is usually tested with
- blead-specific fix to 36f064bc37
-M 6294c16100 2009/05/15 Add some documentation to the heads of the various
-M 266db279d4 2009/05/15 make regcomp.pl use the standard foo.h-new naming
-M f014cfc264 2009/05/15 tidy up regen.pl (no functional changes)
-M e2bcdfc01b 2009/05/15 add lib/overload/numbers.pm to (unused) output fil
-d 07d48c2ab5 2009/05/15 make script execution order in regen.pl mostly alp
-M 3523994b04 2009/05/15 update the head comments in makedef.pl
-M 9685b82382 2009/05/16 tt is a reserved device name on VMS
-M 2061eafe56 2009/05/17 make corecpan.pl sort case insensitively, so that
-M 2a570317cf 2009/05/17 resort Maintainers.pl module list
-M da92fd6071 2009/05/17 add reload_manifest() function to Porting/maintain
-M 392c9d37bb 2009/05/17 make Porting/corecpan.pl use the MANIFEST file of
-M f7f403a29d 2009/05/17 Maintainers.pl: most Compress stuff is now under e
-M f6e59a58ce 2009/05/17 update Porting/corecpan.pl to handle new ext/ stru
-M 19e87f2212 2009/05/17 make Porting/corecpan.pl handle versions hidden in
-M de044c3605 2009/05/17 Upgrade to Parse::CPAN::Meta 1.38
-M bfca551dce 2009/05/17 add --checkmani option to Porting/Maintainers
-M adcdf46b83 2009/05/17 add _PERLLIB pseudo-module to Maintainers.pl and u
-M 43f325442c 2009/05/17 fix typo in Porting/Maintainers.pl
-M 5c24ba53b3 2009/05/18 Note 2.20 in the changelog.
-d ebee25a225 2009/05/18 In Perl_mg_dup(), don't call ptr_table_fetch, as w
-d c160a1863e 2009/05/18 In Perl_mg_dup(), the while loop does the NULL che
-d 0228edf6a5 2009/05/18 In Perl_mg_dup(), remove a branch by tracking the
-d 45f7fcc88f 2009/05/18 Tidy the implementation of Perl_mg_dup().
-d b3a120bf72 2009/05/18 In Perl_ptr_table_new(), fight back against the cu
-d 4a341259ef 2009/05/18 In perl_clone_using(), don't use Newxz() for array
-M efc36d52fb 2009/05/18 Remove old version of Fatal.t test, now moved unde
-d 538f2e763f 2009/05/18 Add S_sv_dup_inc_multiple(), used in place of loop
-M 329f7b8d6d 2009/05/19 Update CPANPLUS::Dist::Build to CPAN version 0.30
-M c87a7fa902 2009/05/19 Ignore ".output" files, that might be generated by
-d e92c6be834 2009/05/19 In perl_clone_using(), use sv_dup_inc_multiple() t
-d 0bdedcb342 2009/05/19 In Perl_gv_fetchpvn_flags(), don't re-zero memory
-d d85f917eae 2009/05/19 In Perl_yylex(), no need to Newxz() a buffer we im
-d 2b1d1392b6 2009/05/19 Pass the output file name to generate_uudmap, and
-M 3680f2e2de 2009/05/19 Re: [PATCH] Update CPANPLUS::Dist::Build to CPAN v
-M c4a30c8caa 2009/05/19 Document the purpose of PL_psig_ptr and PL_psig_na
-d 136e04590f 2009/05/19 In Perl_magic_setsig(), clarify the scope of a blo
-d 79f8582810 2009/05/20 In Perl_magic_clearsig(), only call LEAVE if we ca
-d 869053c868 2009/05/20 Break out the file output code from generate_uudma
-d efa50c51e3 2009/05/20 Replace run-time on-demand initialisation of PL_bi
-R efb0071775 2009/05/20 Remove binary compatibility scaffolding for the ch
-M 477af4ed3f 2009/05/20 Ignore bitcount.h
-d 4b63d99d50 2009/05/20 Tests for calls to Perl_croak() in the C source. S
-M b2978f4e66 2009/05/20 Convert t/op/magic.t to use test.pl
-M c0d1ef7249 2009/05/20 Update bisect notes
-M ef595a33cf 2009/05/20 fix glob-assign for FORMAT
-d 179c85a2d7 2009/05/20 Perl_magic_clearsig() needs to remove magic, else
-d 38a124f06b 2009/05/20 Merge the bulk of Perl_magic_clearsig() into Perl_
-d 9dfa190b44 2009/05/20 Refactor Perl_magic_setsig() to remove duplication
-d 79fd38228c 2009/05/20 In Perl_magic_setsig(), don't discard and then rec
-M f0ba5af609 2009/05/20 Add new files from Parse::CPAN::Meta 1.38 to the M
-M 35df902d51 2009/05/20 run dos2unix on lib/Parse/CPAN/Meta.pm
-d 8ac77ac96d 2009/05/20 Perl_mg_clear() did not cope with the called magic
-d 708854f2ff 2009/05/21 Cache the signal number or -1 in mg_private, to re
-d d525a7b208 2009/05/21 Use only one block of memory for both PL_psig_name
-d b14647bbef 2009/05/21 Remove all the 5005threads specific mutex macros,
-d 2243c3b251 2009/05/21 In Perl_magic_setisa(), re-order two independant r
-d 0e44608102 2009/05/21 Merge Perl_magic_setisa() and Perl_magic_clearisa(
-M 41cb7b2bbf 2009/05/21 $? needs upgrade to PVLV when COMPLEX_STATUS is de
-M 4400b3fbcd 2009/05/22 Smoke failing on longdouble
-d 58a26b1261 2009/05/22 In Perl_magic_setsig(), silence a "possible loss o
-M ae8ade6528 2009/05/22 TODO must be on same line as message for TAP.
-d e69c155ade 2009/05/23 Move the code to add magic to $0 into Perl_gv_fetc
-M 6fbdb1ccd2 2009/05/24 perlpodspec corrections
-M 59c5d19941 2009/05/24 Remove vim swap file
-M 4d87b51d90 2009/05/24 Ignore vim swap files
-M b15feb55e4 2009/05/24 In the ~~ implementation, consistently use the SV-
-M 6f76d139d7 2009/05/24 Change the specs of %h~~%h to avoid mentioning ~~
-M 2c9d2554ad 2009/05/24 Allow ~~ overloading on the left side, when the ri
-M 2cb9bde746 2009/05/24 Fix test for overload in given() with smart match
-M e21a6cc6e2 2009/05/24 Update CPAN.pm to 1.94
-M 035fa39eee 2009/05/25 Revert "Fix failing autodie test with new smartmat
-M 37e07c4054 2009/05/25 Avoid using Test::More in given/when tests
-M 0cb48d0073 2009/05/25 Skip tests if PerlIO::scalar is not available
-M 3484683b77 2009/05/25 Skip under miniperl (cannot load Fcntl)
-R 822146ea06 2009/05/25 Fix test if Fcntl couldn't be loaded (for example
- fix to Filetest stuff which has already been rejected
-M 98d0ccc7b4 2009/05/25 Skip tests that use attributes.pm under miniperl
-M 751caec9e6 2009/05/25 Don't run mro/* tests under miniperl
-M 0a690b6aaf 2009/05/25 Remove now-obsolete note on ~~ overloading working
-M 8b8da387fd 2009/05/25 Describe smart match and switch changes in perldel
- (merged by hand into perl5101delta.pod rather
- than perl5110delta.pod)
-M 7dda6b54f0 2009/05/26 patch at 2009-05-25.21:50:08 text-options.t file clea
-M 7cd487314b 2009/05/26 patch at 2009-05-25.21:50:08 perl5db.t leaves db.out
-M 8df0e0edf4 2009/05/26 patch at 2009-05-25.21:50:08 magic.t leaves $ENV{foo}
-M 1710b4c094 2009/05/26 File tests were already treated as boolean in when
- (merged by hand into perl5101delta.pod rather
- than perl5110delta.pod)
-M 9091a61877 2009/05/26 A couple of nits in the ~~ perldelta entry
- (merged by hand into perl5101delta.pod rather
- than perl5110delta.pod)
-d 4f187fc917 2009/05/26 Explicitely point to $. when it causes an uninitia
-R 5a33cafb3e 2009/05/26 Merge branch 'blead' of camel:/gitroot/perl into b
- MERGE: 9091a61877 4f187fc917
- individual commits merged instead
-d 933981904d 2009/05/26 More tests for uninitialized warnings in ranges
-R 9a8a8154e7 2009/05/26 Merge branch 'blead' of camel:/gitroot/perl into b
- MERGE: 5a33cafb3e 933981904d
- individual commits merged instead
-M 54f7170d62 2009/05/26 Catch interdependencies for static builds too
-R bd67d4df63 2009/05/27 Merge branch 'blead' of camel:/gitroot/perl into b
- MERGE: 9a8a8154e7 54f7170d62
- individual commits merged instead
-M 20a4c497f5 2009/05/28 Add a guide to writing a perldelta.
-M b8de32d599 2009/05/28 Fix [RT#66098] -- stricter checking on SvIVX expos
-M ec6d81aba3 2009/05/29 Document the PERL_LOADMOD_ flags
-M 68346ec51a 2009/05/30 Spelling nit
-M 92be70015f 2009/05/30 clarified documentation about using lexical $err i
-M f6c108d16c 2009/05/30 Bump version of IPC::Open3
-M cda5537682 2009/05/30 Fix [RT#63110] -- two small memory leaks were intr
-M 9ef5ed94af 2009/05/30 Fix [RT#6266] -- sv_pos_u2b expects to be called w
-M e3b1b6b13d 2009/05/30 Nicholas says that SvREFCNT_dec should be sufficie
-M cddedc1511 2009/05/30 Fix Filter::Simple entry in Maintainers.pl
-M b73790d3c9 2009/05/31 Document test structure
-M fa13de9435 2009/05/31 Add regression test for [RT#63110]
-R 73496db2b4 2009/05/31 Merge branch 'memleaktest' into blead
- MERGE: b73790d3c9 fa13de9435
-M aa6341cbeb 2009/05/31 Add test case from RT#54758.
-M 8c1a9f829d 2009/05/31 Silence a warning emitted by test added by last co
-M 3244086bce 2009/05/31 Clarify perldebug documentation
-M 5db42a49f0 2009/05/31 Maintainers.pl: there is no DB::File, and describe
-M 002904c4e2 2009/05/31 Maintainers.pl: rationalise distributions:
-M a55d270df0 2009/05/31 add DISTRIBUTION field to %Modules in Maintainers.
-M e30e10b5a3 2009/05/31 Clarify the meaning of the %Modules keys in Mainta
-M 462ea751d7 2009/05/31 convert Maintainers.pl from an 8 to a 4 char inden
-M a23b815090 2009/05/31 fix Math::BigInt, PathTools entries in Maintainers
-M abba722db5 2009/05/31 wrap some long FILES fields in Maintainers.pl
-M c494f1f448 2009/05/31 Fix casting warning
-d d22862789d 2009/05/31 Auto-complete lexicals in the debugger shell
-M 20f91e418d 2009/05/31 Mention Devel::NYTProf in perldebug
-M 5bdf71cc92 2009/06/01 Upgrade to ExtUtils::MakeMaker 6.52
-M 5bc8648cf6 2009/06/01 Add test boilerplate to the new MakeMaker tests
-M c6ebb5120d 2009/06/01 Minor doc fix for the smart table legend (clarify
-M ee18cc6c23 2009/06/01 Smart-match perldelta adjustments
- (merged by hand into perl5101delta.pod rather
- than perl5110delta.pod)
-M 532217f118 2009/06/01 More ~~ tests
-M 4291ccc37c 2009/06/01 Protect against spaces in build directory name whe
-M 5a1562d6aa 2009/06/01 Correct test output for t/op/eval.t (missing newli
-d 900ac0519e 2009/06/01 Fix RT26188, speed up keys() on empty hash
-d 58da6fbcb8 2009/06/01 Add benchmark test for keys() on empty hashes (RT2
-M 0106d5186f 2009/06/02 resync some files with their CPAN equivalents (jus
-M f09dbad6e7 2009/06/02 start adding new EXCLUDED and MAP entries to Maint
-M 0e945d0082 2009/06/02 stop git whining about trailing whitespace (picky
-R 9a7d94ef19 2009/06/02 Merge branch 'eumm652' into blead
- MERGE: 0e945d0082 5bc8648cf6
- individual components cherry-picked
-R abf6c2ea23 2009/06/02 Merge branch 'smartmatch' into blead
- MERGE: 9a7d94ef19 532217f118
-M ee0ea5142b 2009/06/02 Adjust MANIFEST
-d 9eb4ebd161 2009/06/02 In Perl_hv_iternext_flags(), clarify and generalis
-M ab45a0fa26 2009/06/02 Disentangling -g and -DDEBUGGING is a TODO.
-M 5988ef3d51 2009/06/02 parenthesize check for a flag
-M e42df61ffa 2009/06/02 Update CPANPLUS::Dist::Build to CPAN version 0.32
-M 2b4f847434 2009/06/03 add more EXCLUDED and MAP keys to Maintainers.pl
-d bc6438f27b 2009/06/03 Fix bug introduced in 67924fd which put the key _<
-
- perl5db.pl fixes.
- see <9aaadf9c0906031434h9efd16dr4f074954013b3bd at mail.gmail.com>
- also deferred:
- c7ab0c8202
- af6d5e2961
- ff2f7ef032
- f96342d4d7
- b468dcb6f9
- 422c59bf48
- 606adbbb49
-
-d c7ab0c8202 2009/06/03 Add the debugger script which tests for undefs in
-d af6d5e2961 2009/06/03 Fix shebang line and permissions of lib/perl5db.t
-d ff2f7ef032 2009/06/03 Add lib/perl5db/t/symbol-table-bug to the MANIFEST
-d f96342d4d7 2009/06/04 Merge branch 'debugger_symbols' of github.com:leto
- MERGE: 2b4f847434 ff2f7ef032
-d f1ce3bf1be 2009/06/04 Remember if binaries are ELF
-R caa34d58d7 2009/06/04 Merge branch 'blead' of camel.booking.com:/gitroot
- MERGE: f1ce3bf1be 2b4f847434
-d b468dcb6f9 2009/06/04 Bump version of perl5db.pl to 1.33, add changelog
-d c8be058c40 2009/06/04 Assuming that $SIG{PIPE} is not set can be bogus w
- (fix to 179c85a2d7)
-! 1be14c39f7 2009/06/04 Correctly interpolate the attempted permissions as
- more File::Copy stuff
-M 30e682852b 2009/06/04 vms.c EFS logical name fix.
-M 8415bfe009 2009/06/04 MakeMaker must handle an empty $self->{LIBS} array
-M 50255d58c0 2009/06/04 Test case to go with 30e682852bf42358156ed62e06e91
-d 422c59bf48 2009/06/04 Fix my comment about DB::sub and make it DB::DB
-M e8b9ce6006 2009/06/05 [perl #9328] Update INSTALL example for BerkeleyDB
-M 813720522f 2009/06/05 overload.pl shouldnt update its output uncondition
-M dcfdccf94c 2009/06/06 [PATCH] *-Compress-* 2.020
-M f699e9507c 2009/06/06 add yet more EXCLUDED and MAP keys to Maintainers.
-M 8e91ec7fd4 2009/06/06 Faster utf8_length method -- fixes [RT#50250]
-M 899c4039f7 2009/06/06 Update Parse::CPAN::Meta to 1.39
-M c2231af7a3 2009/06/06 Require at least 5.008 for pack('J'...) in Data::D
-M 4872991160 2009/06/06 Increment Data::Dumper version to 2.121_20
-M ab4d8678d5 2009/06/06 For the Data::Dumper CPAN version on 5.6, we need
-M ecf5217a6a 2009/06/06 Data::Dumper on 5.6.* needs to use old IDs
-d 606adbbb49 2009/06/06 Merge commit 'leto/debugger_symbols' into blead
- MERGE: ecf5217a6a 422c59bf48
-M d9f203a523 2009/06/06 Mark all .t and .pm files as non executable
-M 04fe7e4318 2009/06/06 Synchronize with Data::Dumper 2.121_20 on CPAN
-M 3c4bf43449 2009/06/06 sync a bunch of files with Test::Simple 0.86
-M d8ada404a5 2009/06/06 add more Maintianers.pl EXCLUDED and MAP fields
-d 01be072998 2009/06/07 main: Unregister signal handler before destroying
- see <1242849212-19840-1-git-send-email-john.wright at hp.com>
-d b762d86673 2009/06/07 Mask signals in thread creation and destruction to
-d 26618b64e8 2009/06/07 Bump version of threads.pm
-d 7dcc656fa9 2009/06/07 Add a test for a thread-enabled debugger
-M a39e16d8bc 2009/06/07 Upgrade to Test-Harness-3.17
-d d2aa556d1d 2009/06/07 There is no pthread_sigmask on VMS, so use sigproc
-M c095625522 2009/06/08 Upgrade to MakeMaker 6.53_02
-M e39d780342 2009/06/08 Add missing test boilerplates to new MakeMaker tes
-d d7dfc388e0 2009/06/08 fix RT 39060, errno incorrectly set in perlio
- see also fcac5cf149
-M 3c2847f4f8 2009/06/08 Upgrade NEXT to 0.64.
-M 2654429ed6 2009/06/08 add remaining Maintainers.pl EXCLUDED and MAP fiel
-M c081cc94ad 2009/06/08 Bump lib.pm version to match CPAN release
-M 7083d81af9 2009/06/08 Errno is no longer dual-lived
-M 983ed8e949 2009/06/08 Jesse Vincent now maintains Test.pm
-M 59ea7c6d8e 2009/06/08 Sync bleadperl and Net-Ping with the release of Ne
-M 6283f212c4 2009/06/08 Update Maintainers.pl: Pod-Escapes and Test
-M 8e6b08e459 2009/06/08 Update Test.pm to CPAN's 1.25_02.
-M 9758931364 2009/06/08 t/op/my_stash.t should use test.pl instead of Test
-d e8ee98b8d6 2009/06/08 Make h2xs add a dependency on Test.pm for < 5.6.2
-d 242a51a422 2009/06/09 Upgrade to threads 1.73
-M e8514a9ea0 2009/06/09 Fix regression test for RT 63110 when running with
-M 344f2c40b1 2009/06/09 Revised description of => operator
-d 8264cf3272 2009/06/09 Mask thread signal handling fix on Win32
-M fb22f0eaa0 2009/06/09 Add lib/NEXT/t/dynamically_scoped_regex_vars.t to
-d bcbea5d217 2009/06/09 Fix threads build on Win32
-M f6085ff72b 2009/06/09 Upgrade to Data::Dumper stable release 2.122
-M 23be15b77e 2009/06/09 Upgrade to Digest-1.16
-M c8780a7366 2009/06/09 Upgrade to Digest-MD5-2.39
-M dfed8d3771 2009/06/09 Upgrade to MIME-Base64-3.08
-M af6a0f9e3d 2009/06/10 [PATCH] Filter-Util-Call (was RE: pmqs: dual life
-M 12c541f435 2009/06/10 Upgrade Attribute::Handlers to 0.84
-d 26e8050aaf 2009/06/10 [perl #66452] TMPDIR not honored when opening an a
- see also 0b99e9860e
-R 454dbe4084 2009/06/10 Merge branch 'blead' of ssh://stevep@perl5.git.per
- MERGE: 26e8050aaf 12c541f435
-M 75b0fd110a 2009/06/10 remove from blead, some files already removed from
-M 8bc7f08e00 2009/06/10 update comment in overload.pl following 813720522f
-M 92a24ac3df 2009/06/10 Small typo in example.
-d 0b99e9860e 2009/06/10 Do not honor TMPDIR for anonymous temporary files
-M f2e81f84c3 2009/06/11 Document findsym in Attribute::Handlers
-M cc650b8bbb 2009/06/11 Sync to Data::Dumper 2.123
-d 7019aa1126 2009/06/11 Add t/benchmark to tests run if $ENV{PERL_BENCHMAR
-d 29b39dde48 2009/06/11 It's not necessary to hardcode skipping of benchma
-d fcac5cf149 2009/06/11 Some portability and clean-up for errno.t.
-M 937f2ad5ba 2009/06/11 Make Compare.t work when filenames can't have whit
-M 55ae25dcfe 2009/06/12 Upgrade to Devel::PPPort 3.18
-M 8565c31a57 2009/06/12 Upgrade to Devel::PPPort 3.18_01
-M 412304fbe6 2009/06/12 fix trivial typo in perldelta
-M 71605646f0 2009/06/12 bump lib/ExtUtils/Constant.pm version to 0.22 sinc
-M 7ac0cca805 2009/06/12 further sync blead with Net-Ping-2.36
-M 46ea7543fc 2009/06/12 trivial whitspace syncup between blead and CPAN Te
-M d11aa99931 2009/06/12 update Porting/Maintainers.pl with recent module v
-M 85da676d83 2009/06/12 fully sync blead with B::Debug 1.11 (debug.t was o
-M 756b13bcb9 2009/06/12 sync lib/CPAN/SIGNATURE with its equivalent in the
-M a8ac7c450a 2009/06/12 sync CPANPLUS-Dist-Build with CPAN (trivial whites
-M 622d33709f 2009/06/12 remove two files not part of the IO-Compress CPAN
-M cd4199a7a7 2009/06/12 sync lib/Locale/Maketext/ChangeLog from CPAN distr
-M dc0ab4fe1a 2009/06/12 remove typo fix from LaTex.pm, to keep it in sync
-M 5ffe72f324 2009/06/12 Improve the description of Pod/Stuff.pm in MANIFES
-M 66c0721227 2009/06/12 sync t/pod/pod2usage2.t with CPAN (trivial whitesp
-M bf5dc52173 2009/06/12 sync lib/Pod/Simple/ChangeLog with CPAN
-M e2868e4853 2009/06/12 remove ext/Storable/MANIFEST; its out of date rela
-M b866c0be7f 2009/06/12 in Maintainers.pl, move Text-Tabs+Wrap to its corr
-M 1edf8e51d7 2009/06/12 sync ext/Text-Soundex/README with the CPAN version
-M f46c322273 2009/06/12 Update perlmodlib.PL to accomodate the re-arrangin
-R 176cb5a0e1 2009/06/12 Regenerated perlmodlib.pod
- now done at build time
-M 5abfb2931e 2009/06/13 FindBin doesn't need to use Config;
-R a9df907534 2009/06/13 Resort MANIFEST.
- did manually instead
-M c0b6140e88 2009/06/13 Make SvOK and SvTRUE API docs slightly less utterl
-M 0228b1bbd4 2009/06/13 Update to Archive::Extract 0.32
-M 1c82faa772 2009/06/13 Update to Archive::Tar 1.50
-M a0995fd479 2009/06/13 Update to CPANPLUS 0.87_01
-M 26ad458aeb 2009/06/13 Update CPANPLUS::Dist::Build to CPAN version 0.34
-M e8041d9b83 2009/06/13 In perlmodlib.PL, just open files in their origina
-M 291c64f4c0 2009/06/13 Make perlmodlib.PL chdir into pod. Add a -q flag t
-M 6e2c892858 2009/06/13 Generate perlmodlib.pod at build time, instead of
-M 19be90356d 2009/06/13 Update CPANPLUS to 0.87_02
-M f475b4a222 2009/06/13 Update Archive::Tar to 1.52
-M 1e2f36ef3d 2009/06/13 Eliminate the regen_pods target from pod/Makefile,
-M 22b7b87b20 2009/06/13 Remove autodoc.pl from regen.pl and the lists of r
-M 8861d6254f 2009/06/13 minor updates to Maintainers.pl
-M 7475ca45e9 2009/06/13 Update to IO-1.25 from CPAN
-M 6f5e54b9db 2009/06/13 Nit for the "Missing right brace" error message de
-M 3fd1d62e36 2009/06/13 More updates for Porting/Maintainers.pl
-M a1e6383bbc 2009/06/13 Add perlmodlib.pod in .gitignore, since it's now g
-R aac81c6486 2009/06/13 Merge branch 'blead' of camel:/gitroot/perl into b
- MERGE: a1e6383bbc 3fd1d62e36
-M 6e7200087b 2009/06/13 Add \N idea from Perl 6 to perltodo
-M 760f623a76 2009/06/13 synchronise lib/Log/Message/t/02_Log-Message.t wit
-M 20fc10417a 2009/06/13 Update to Data::Dumper 2.124
-M 0ec3513818 2009/06/13 Upgrade IPC::Cmd to 0.46
-M 439578a8cd 2009/06/13 Correct the NAME in the Pod of ExtUtils::Constant:
-M cf9cbb1fcb 2009/06/13 Improve perlmodlib.PL. Reduce the amount of specia
-M 5b5041827e 2009/06/13 Bring the joy of strict (and warnings) to perlmodl
-M 4231740464 2009/06/14 Upgrade to Devel::PPPort 3.19
-d f63574b540 2009/06/14 Skip threaded debugger tests unless $Config{usethr
-d 9c955c4d43 2009/06/14 Add a test to the debugger about not having thread
-d eb78bf8f0d 2009/06/14 Merge branch 'blead' into debugger_symbols
- MERGE: 9c955c4d43 4231740464
-d c6757210fa 2009/06/15 The attached patch to perlio.c fixes the problem o
-M d947e7a211 2009/06/15 Fix readline example in perlfunc
-d 65269dc7d2 2009/06/15 Update 'threads' version in Maintainers.pl
-M 91490fbe11 2009/06/15 Update 'NEXT' version in Maintainers.pl
-d afefe6bfcf 2009/06/16 Implement new regex escape \N
-M 17633433c1 2009/06/16 add-package.pl lib exclude fixed
-M 9441003632 2009/06/16 [PATCH] Updating Module::Build to 0.33_02
-d c741660aac 2009/06/17 Basic docs for \N
-d cbf4a12974 2009/06/17 Some more tests for \N
-d 71e9c5323d 2009/06/17 Add perldelta entry for \N
-M 5ad5b34cb2 2009/06/18 Handle the rare but legal angle bracket in unixify
-d e061ec81dc 2009/06/18 Merge branch 'backslash-N' into blead
- MERGE: 5ad5b34cb2 71e9c5323d
-M 906a0c07e3 2009/06/18 Remove CPANPLUS's SQLite tests from the core.
-d 3b910a0663 2009/06/18 Add gcc predefined macros to $Config{cppsymbols} o
-M ed690650a4 2009/06/18 Make expand-macro.pl scan config.h, if it exists.
-M 4784c5e80c 2009/06/18 Allow expand-macro.pl to expand macros in perl.h w
-M 458b44e7bc 2009/06/19 Fix API docs:SvGAMAGIC returns a U32, not a char*
-M 2c95b6e4c4 2009/06/19 Maintainers.pl: add @IGNORABLE and document EXCLUD
-M cb097e7a7e 2009/06/19 add Porting/core-cpan-diff
-M 6379002239 2009/06/21 Upgrade to threads::shared 1.29
-M a51040a0e9 2009/06/21 add-package.pl lib exclude fixed
-M 3f1788e11f 2009/06/21 make_patchnum.pl now works in -Dmksymlink target d
-
- these three commits (fix for #58530)
- convert a CV in a deleted glob to ANON,
- which makes me twitch. See also 6eb667c676,
- ab9c44463c, fbad106ea7 2221b6e72e, fb6e4a4e45
-
-d d018fae575 2009/06/21 Tests for deleting stash entries.
-d f1c32fec87 2009/06/21 When a glob is deleted, mark its sub as ANON.
-d 4fec321675 2009/06/21 Regenerate headers and fix compilation with thread
-
-M de10be12cd 2009/06/21 point illguts at perl.org
-
- PERL_MEM_LOG changes:
- <cfe85dfa0906121048q47ad85e6s8e10579bd3764a43 at mail.gmail.com>
-d 73d1d97336 2009/06/21 invert and rename PERL_MEM_LOG_STDERR to PERL_MEM_
-d 1cd8acb500 2009/06/21 simplify PERL_MEM_LOG
-d 10a879f5b1 2009/06/21 update PERL_MEM_LOG in perlhack.pod
-d fd5aa6c359 2009/06/21 Regenerate headers
-d 4bd8fafa9f 2009/06/21 Also replace PERL_MEM_LOG_STDERR by PERL_MEM_LOG_N
-d 2e5b50041f 2009/06/21 A few docs nits after the few last commits
-d b953482e2d 2009/06/21 drop remaining mentions of PERL_MEM_LOG_FOO envars
-
-d ad6656ab32 2009/06/22 Merge branch 'blead' into debugger_symbols
- MERGE: eb78bf8f0d b953482e2d
-d 9b76ae71c6 2009/06/22 Fix skipping tests with threads in last commit
-d 53409900a7 2009/06/22 Fix test with non-threaded perls
-M 7277a900f7 2009/06/22 add release_managers_guide.pod
-M 1aff535472 2009/06/22 typos, link to thread with ideas about testing sta
-d 6eb667c676 2009/06/22 Instead of a const char *, pass a HEK * to anonymi
-R 38b3c827d8 2009/06/22 Merge commit 'szabgab/release_process' into blead
- MERGE: 6eb667c676 1aff535472
-d aeeb13907a 2009/06/22 avoid trying to load packages that are in the same
-M 68f62fdf7f 2009/06/23 Add Porting/release_managers_guide.pod to MANIFEST
-M d2651550ea 2009/06/23 Added new required fields to makesis.pl
-d ab9c44463c 2009/06/23 Fix blead segfault on Cygwin for t/op/stash.t
-M 3c4fb04a91 2009/06/23 Fix for RT #52552.
-M 9c3cb3e150 2009/06/23 version bumps in Maintainers.pl
-M 3eccaf6d20 2009/06/23 Update threads::shared in Porting/Maintainers.pl t
-M 8a9741846a 2009/06/23 Ammend unhelpful description of debugger watch com
-M ddb418268d 2009/06/23 another Maintainers.pl version update
-M 16fb65535f 2009/06/23 sync lib/Module/Build/Changes with CPAN equivalent
-M 49f8307ec5 2009/06/23 Add a paragraph noting that perl5-security-report@
- (added by hand to perl5101delta.pod)
-M f337e9820d 2009/06/23 When writing a perldelta, choose either "regex" or
-M aad1d01f81 2009/06/23 Note that the "Deep recursion" depth warning thres
-M 0b179affb5 2009/06/23 sync lib/CPANPLUS/Backend.pm with CPAN
-M 627cd18c09 2009/06/24 Update CPANPLUS::Dist::Build to CPAN version 0.35_
-M 8bca5c8a8b 2009/06/24 Update Maintainers.pl accordingly
-M 8c814d1a54 2009/06/24 core-cpan-diff: continue with next distro on downl
-M f0ce33d74d 2009/06/24 core-cpan-diff: include author path in distro vers
-M d4fb20eeed 2009/06/24 Fix some typos and grammar infelicities in core te
-R ef55af2a5a 2009/06/24 Fix a semantic error in the Pod. (wrong heading le
- blead-specific
-M 5ee651a9b9 2009/06/24 Mention parallel testing in INSTALL and perl5110de
-M 6fbc735bab 2009/06/24 Add tests for smart match overload fallback
-M 665f5e9843 2009/06/24 Clarifications to the perldelta notes on smart mat
- (added by hand to perl5101delta.pod)
-M 27abe0f194 2009/06/25 As Errno is formally no longer dual-lived, give it
-M 839bc55ad6 2009/06/25 Upgrade to File::Path 2.07_03
-M 15932acc61 2009/06/25 Add documentation for the method resolution plugin
-d e63be7465b 2009/06/25 Trim all trailing / from "." in @INC when filling
-M 05b4f1ece2 2009/06/25 document the maximum length of barewords
-d 31c91b4357 2009/06/25 Don't enqueue pending signals during global destru
-M 98814a2b07 2009/06/25 Better description for the changes about the range
- (added by hand to perl5101delta.pod)
-M d00c6acb56 2009/06/26 pod/perlfilter.pod: two POD typos
-M ee91d26e06 2009/06/26 Update RExC_npar and after_freeze correctly after
-M 956cae9a39 2009/06/26 PATCH small documentation change for UCD.pm
-M 3bce050656 2009/06/26 One more regression test for RT #59734
-M ef25d9aae6 2009/06/27 Update CPANPLUS::Dist::Build to CPAN version 0.35_
-M 198e857cc6 2009/06/27 Update Archive::Extract to 0.34
-M 6b1bef9ae6 2009/06/27 Update CPAN.pm to 1.9402
-M 0e637710e6 2009/06/27 Changed to incorporate latest SDKs.
- waiting for reply from Adam Russell
-d fe13d51d64 2009/06/27 Add test to make sure everything that outputs an e
-d 87a63fff81 2009/06/27 Add support for TODO diag tests -- a list in DATA
-d f7223e8e1a 2009/06/27 Adjustments to t/pod/diag.t
-M 8d16e270aa 2009/06/27 Upgrade to File::Fetch 0.20
-M a3de5d0b2a 2009/06/27 Update CPANPLUS to 0.87_03
-d fbad106ea7 2009/06/27 Make stash.t redirect stderr.
-M ea0799344c 2009/06/27 sync blead with Update Archive::Extract 0.34
-M c51ff80d06 2009/06/27 update Maintainers.pl
-M 4e390bd81a 2009/06/27 bump Dynaloader to 1.10 to distinguish it from the
-M 6653081c26 2009/06/27 upgrade to Time::Piece 1.15
-M 673223b5b2 2009/06/27 upgrade to ExtUtils::CBuilder 0.25
-M 708f9ca6cd 2009/06/28 Update ExtUtils::ParseXS to 2.19_03
-M 4fd19576a6 2009/06/28 Document what $* used to do on older versions
-M a9320c62d9 2009/06/28 Extra examples for 'sort'
-M 1cb246e8dc 2009/06/28 Small pod/wording fixes
-M 03dbc343c8 2009/06/28 Bump Safe version to 2.17 for CPAN release
-M 40b9d4d925 2009/06/28 Silence warnings in test with 5.10.0
-M 439e01810c 2009/06/28 Move module part of the base.pm test suite in base
-M d19d8ad381 2009/06/28 Add base.pm tests from the CPAN distribution
-M 956e881e4f 2009/06/28 Bump version of fields.pm to 2.14 to match the ver
-d 7f6de3fd9c 2009/06/28 Add t/pod/diag.t to the MANIFEST
-M 0ee0837e8d 2009/06/28 Removed obsolete E32Dll dll entry point which was
-M f941e6586d 2009/06/28 Integrate version.pm-0.77 into bleadperl
-M 23837600fa 2009/06/29 Update Module::Build to 0.33_05
-M 9b657a623c 2009/06/29 pjf: dual life modules
-M 74182dbd45 2009/06/29 fix MANIFEST perms & add case-insensitive exclude
-M c3624cb8d7 2009/06/29 tjenness: dual life modules
-M 43639bac1f 2009/06/29 patch submission(symbian/PerlBase.cpp)
-M 515fe3bd5a 2009/06/29 patch submission(symbian/symbian_utils.dll)
-M e1466347d2 2009/06/29 add some BUGS items to Porting/Maintainers
-M 78fb583c05 2009/06/29 Stop buildtoc warning that perltoc.pod is missing
-M 6986f47f54 2009/06/29 Update ExtUtils::ParseXS to 2.19_04
-M 75cdbdc152 2009/06/29 Subject: Re: dual-life: IO 1.25 and Scalar-List-Ut
-M 9015f106ca 2009/06/30 Updating ExtUtils::CBuilder to 0.26
-M 3eff6cdadf 2009/06/30 sync base with CPAN and update Maintainers.pl
-M 205b02ff96 2009/06/30 more Maintainers.pl version tweaks
-M 2ff286160a 2009/06/30 Update to Scalar-List-Utils-1.21 from CPAN
-M 1460e873ec 2009/06/30 bump Scalar-List-Utils version in Maintainers.pl
-d 2221b6e72e 2009/07/01 Quiet t/op/stash.t output
-M 36392a5f57 2009/07/01 Update CPANPLUS::Dist::Build to CPAN version 0.35_
-M 9b5b006ca2 2009/07/01 patch submission(symbian/config.pl)
-M fb51372e8e 2009/07/01 Make C<undef ~~ 0> and C<undef ~~ ""> not match (l
-M f235159a74 2009/07/01 patch submission(symbian/PerlBase.h)
-M 100ba29750 2009/07/01 Update ExtUtils::CBuilder to 0.2601
-M eb8d423fed 2009/07/01 autodie 2.03
-M 9cf72a4efb 2009/07/01 [Configure]: avoid leaking Win32CORE.c into output
-M bf79bdf5e2 2009/07/01 Tabs, not spaces, in MANIFEST.
-M 55ec0dff63 2009/07/01 Updating ExtUtils-ParseXS to 2.20
-R 24054a13bb 2009/07/01 make manisort.
- ran it manually instead
-M aa51dd4123 2009/07/02 Added docs from Wolfgang Laun to perlpacktut about
-M 6c4f9c520f 2009/07/02 Upgrade autodie to 2.04
-M 4ed3fda49b 2009/07/02 Unused 'cv'
-M 873f5ddf07 2009/07/02 Remove fake facility strings from VMS start-up war
-M 906cdd2b28 2009/07/02 Some bugs in Perl regexp (core Perl issues)
-M 7df6222977 2009/07/03 Changes made by Osvaldo Villalon.
-M 3f16acfd45 2009/07/03 Osvaldo Villalon's changes to symbian_dll.cpp.=0A=
-M 2f2424c095 2009/07/03 Osvaldo Villalon's changes to sdk.pl.
-M 1f003618ae 2009/07/03 bump memoize version to distinguish it from 5.8.9
-M d0eaab344a 2009/07/03 Revert "Bump Module-Pluggable VERSION following
-M 47dd4b73b9 2009/07/03 upate Maintainers.pl versions
-M dfe582519f 2009/07/03 sync CPAN with, er..., CPAN
-M 2ffb8fb7bd 2009/07/03 sync ExtUtils::CBuilder with CPAN
-M ededf8dc60 2009/07/03 sync Module::Build with CPAN
-M ce2c78aa98 2009/07/03 mark I18N::LangTags as no longer dual-life
-M 2fb8ff88df 2009/07/03 add -x option to Porting/cmpVERSION.pl
-M 7536d87983 2009/07/03 make cmpVERSION.pl ignore Config.pm
-M af048c1888 2009/07/03 bump versions of non-dual-life modules that
-M 6b99f28a36 2009/07/04 The 2nd arg to save_alloc() must be cast to I32 to
-M 02b13d1d54 2009/07/04 Merge autodie 2.05 into core.
-M 0183efc542 2009/07/04 Update CPANPLUS::Dist::Build to CPAN version 0.36
-M 9ef43512fc 2009/07/04 Updated ExtUtils::CBuilder to 0.2602
-M 752ce16633 2009/07/06 Update Module::Build to 0.33_06
-M 5cd3f21a9a 2009/07/06 Added missing 2009 to perl.h copyright header
-M ab6722ad2c 2009/07/06 sync ExtUtils::CBuilder with CPAM
-M e7d8bd5654 2009/07/06 sync Module::Build with CPAN
-M 95e016b968 2009/07/06 bump autodie veresion in Maintainers.pl
-M cceec05296 2009/07/06 Maintainers.pl: Explanation as to why autodie test
-M 3e887aae38 2009/07/06 update to Test::Simple 0.92
-M 45d8b36ec0 2009/07/06 add core boilerplate to three new Test::Simple tes
-M b7bed276c4 2009/07/06 clarify usage of Porting/Maintainers
-M b36de39969 2009/07/06 re-add Test::Simple exclude accidentally removed d
-M b074547015 2009/07/06 Don't dump autodie from core (was Re: Coring Varia
-M 84d2fa142c 2009/07/06 Regex fails when string is too long
-M 75e3c8a32e 2009/07/06 upgrade to ExtUtils::MakeMaker 6.53_03
-M 58118e0c79 2009/07/07 limit what add-package.pl might try to delete
-R 53eb19dd57 2009/07/07 use strict by default if "use 5.011" is in effect!
-R 5cc917d61a 2009/07/07 Fast enabling of strictures when version 5.11.0 is
-M 56bfbabc02 2009/07/07 rebump Hash::Util::FieldHash from 1.03_01 to 1.04
-M 8bc57f96f9 2009/07/07 update to CPANPLUS 0.88
-M 5f244db984 2009/07/07 some fixes to makerel:
-R 01851bb732 2009/07/07 Merge branch 'strict-by-default' into blead
- MERGE: 5f244db984 5cc917d61a
-! fd18815927 2009/07/08 Make File::Copy::rmscopy return the documented val
-M 718192e995 2009/07/08 Updating Module::Build to 0.34
-M 56f4542c02 2009/07/08 Fix compiler warning when cuserid is absent and si
-M 82fefbc11a 2009/07/08 Ignore libperl.so.
-R 4b3db487f2 2009/07/08 Mention in perldelta that "use 5.011" enables stri
-d f37b8c3fdc 2009/07/08 Add a pluggable hook in op_free()
-M e5b34a7678 2009/07/08 Update ExtUtils::ParseXS to 2.20_01
-R 242f8760e6 2009/07/08 Add a parameter "destructing" to Gv_AMupdate()
- not bincompat
-R c3a9a7905d 2009/07/08 Modify the return value of Gv_AMupdate to indicate
- see 242f8760e6
-M 14564ebe90 2009/07/09 Skip File::Copy return tests on Windows and VMS
-M 1640e9f0f3 2009/07/09 fix segfault in -Dx without threads
-R 37f2ccb85a 2009/07/09 Merge commit '1640e9f0f39bf8108370c2f5d99bb100fe6c
- MERGE: 14564ebe90 1640e9f0f3
-M 32878f30ba 2009/07/09 Make INSTALL -Duserelocatableinc aware
-R e2c0f81f62 2009/07/09 Make kill() fatal for non-numeric pids
- it's a change in behaviour
-d b5b25974c1 2009/07/09 Upgrade to Term::ANSIColor 2.01
- see also 0b4f5b79b7
-M 4d6e9c138f 2009/07/09 Avoid test failure on Linux when STDIN is /dev/nul
-R 5f52195583 2009/07/09 Fix compiler warning in doio.c
- see e2c0f81f62
-M ac7d481af7 2009/07/10 add lib/ExtUtils/ParseXS/Changes to MANIFEST
-M 1a1e8f7d43 2009/07/10 Encode 2.34
-M f4fe2a3055 2009/07/10 Remove %patchlevel hash
-M d00e3d8a41 2009/07/10 ExtUtils::MakeMaker 6.54
-d 0b4f5b79b7 2009/07/10 Maintainers.pl: bump Term::ANSIColor version
-M d55aad059d 2009/07/11 Subject: [PATCH] Have add-package.pl include the C
-M a5446a64ab 2009/07/11 [perl #61520] Segfault in debugger with tr// and U
-d fb6e4a4e45 2009/07/12 Wrong skip count in t/op/stash.t
-M d6521b5650 2009/07/12 Some missing realclean items for VMS.
-d 3983eafb40 2009/07/12 h2ph: handle "#if defined SYMBOL" better
- see also 9a108c6c20
-M 5472f9ed71 2009/07/13 Better flock detection for autodie tests
-M 5823dc9fae 2009/07/13 Clean up t/op/sort.t to constrain tests which use
-M 03c97657d9 2009/07/13 Upgrade to Encode 2.35
-d 9a108c6c20 2009/07/13 Cosmetic change
-M 7de6a4226c 2009/07/13 upate pumpking list
-d ba7a454966 2009/07/14 Merge Carp::Heavy into Carp
-d 4dd71923a4 2009/07/14 Don't preload Carp::Heavy in warnings.pm
-M b47aa4955a 2009/07/14 Explain camel and dromedary repository servers
-M d3319df775 2009/07/14 Update my address.
-R fa7a1c653b 2009/07/14 fix some perl version numbers
- blead-specific
-M ae1b7029e5 2009/07/14 add Porting/bump-perl-version
-M 7ae6965a19 2009/07/14 test_harness, not just test, needs unpack_files on
-M 32a73b0d97 2009/07/15 add Porting/bump-perl-version to MANIFEST
-M cabc01fc4a 2009/07/15 document given/when in perltrap
-d 799dfa8f13 2009/07/15 The op_free() hook doesn't need to return an OP*,
-d 2f175318a4 2009/07/15 Document PL_opfreehook
-M f6af439460 2009/07/15 expand Porting/release_managers_guide.pod
-M d9ac7b6b66 2009/07/16 An update to the pod is in order for the PERL_VMS_
-M b6d6132c15 2009/07/16 ExtUtils::MakeMaker 6.55_01
-M d3efbeccdc 2009/07/16 patch submisson(symbian/symbian_utils.cpp)
-M 89ad885892 2009/07/16 patch submission(AUTHORS)
-M a2cba4bc78 2009/07/16 Note that editing pod.list then running pod/buildt
-M 5538866cd3 2009/07/16 overloading.pm will work with 5.10.1
-M b34f6083b4 2009/07/16 bump Encode version in Maintainers.pl
-M ec55d5e404 2009/07/16 URL and other fix-ups for README.vms
-M 90dc4aa576 2009/07/16 Additional perlvms.pod updates related to POSIX ex
-M 4facedc50e 2009/07/16 No whitespace before comment allowed in VMS make u
-! 0010debf16 2009/07/16 Add a version number to B::Lint::Debug
- wait for CPAN sync
-d 02569b8398 2009/07/16 Describe changes to Carp and Carp::Heavy
-M e3c125ffa5 2009/07/17 README.aix for Perl 5.10.1
-M c533d96e5f 2009/07/17 hints/aix.sh remove libgdbm from wanted libs - dbm
-R b6f6091627 2009/07/17 Eliminate struct regexp_allocated and xpvio_alloca
- remove stuff added by already-rejected 08e4474067
-M 69ba284b5e 2009/07/17 Allocate XPV* memory using sizeof() and the offset
-M 557305a74c 2009/07/17 document why SQLite tests are exlcuded
-M 69a4390734 2009/07/17 Fix ExtUtils::Installed failure with -Duserelocata
-M c456aab3e6 2009/07/18 fix pod2usage2 test for all case-insensitive syste
-M 3012b81707 2009/07/18 Some of the TODOs in switches.t actually work on V
-M a71f1801ba 2009/07/18 Configure should sort inc_version_list
-M e1018a69a6 2009/07/18 add basic usage info to Porting/corelist.pl
-M 781ea95a92 2009/07/18 Provisional update of CoreList for 5.10.1
-M 210de33e13 2009/07/18 add info on updating CoreList and tags to release_
-M 6e40fbf9a5 2009/07/18 add extra note about CoreList to release_managers_
-M ce4f4fe213 2009/07/18 Fix some nits in release_managers_guide.pod
-M 26d68d86a3 2009/07/18 mro::method_changed_in(..) ignores AUTOLOAD (RT #6
-M dcd43ceb79 2009/07/19 bring up to date with ExtUtils-Install v1.52_02
-M 80be973138 2009/07/19 Be sure to find the vmsish pragma for one-liners i
-M 9271ca568a 2009/07/19 (mostly) sync blead with ExtUtils::Install 1.52_02
-M f0fb50b599 2009/07/19 sync to 1.52_03 (hopefully properly this time)
-M 7d48cb41fd 2009/07/19 forgot the version Bump - sigh
-M 1db12997af 2009/07/20 Mention DTrace in INSTALL.
-M addebd58fe 2009/07/20 minor updates to release_managers_guide.pod
-R cda5e2ec34 2009/07/20 Test that `use feature' doesn't leak a scalar duri
-R a5326e85f7 2009/07/20 Revert "Test that `use feature' doesn't leak a sca
-R 259976bd43 2009/07/20 Typo Fixes in Diagnostic
- see f1a3ce43fb
-R b7a2910fd6 2009/07/20 Another typo, as spotted by Offer Kaye <offer.kaye
- see f1a3ce43fb
-R dee8984cba 2009/07/21 perltodo: forbid labels with keyword names
-R de6375e332 2009/07/21 perltodo: truncate() prototype
-d bb74b0ee4e 2009/07/21 Simplify the code that sets $_ in given()
-d 16f708c9bc 2009/07/22 Fix File::Copy::copy with pipes on GNU/kFreeBSD
-R 678ae90b5b 2009/07/22 Remove !!! and ??? operators
- see be25f60935
-R 044c880baa 2009/07/22 Document the yada yada operator in perldelta
- see be25f60935
-M 13f7636463 2009/07/22 Ignore t/op/require.t byproducts
-R 4fffee8e5b 2009/07/22 Merge branch 'nobangs' into blead
- MERGE: 13f7636463 044c880baa
- see be25f60935
-d bb5aedc13f 2009/07/22 Teach goto how to cross given/when blocks
-M d17935ef19 2009/07/22 ExtUtils::ParseXS 2.2002
-d 50f17f89e3 2009/07/22 Make fresh_perl_is() strip newlines off the expect
-d 76856ab861 2009/07/22 This is a test for rt.cpan.org 60508 which I can't
- see also 5945e41e91
-d 95266a8888 2009/07/22 v-strings are not deprecated
-M 7f4ffa9dba 2009/07/23 [rjbs] very minor tweaks to description of maint/b
-R 28271a2356 2009/07/23 Merge branch 'blead' of ssh://perl5.git.perl.org/p
- MERGE: 7f4ffa9dba 95266a8888
-R a4133167b5 2009/07/23 Restore full name of mro::mro_invalidate_all_metho
- see 1e9bd1186a
-d 5945e41e91 2009/07/23 Add file to the MANIFEST and sort
-M 2d0587d880 2009/07/24 Todo: decapsulation of smart match argument
-M 107bd1173c 2009/07/24 Thinko in given() description, found by chromatic
-M 98107fc726 2009/07/24 Rephrase note about CHECK and INIT in eval("") in
-d aa5e9df811 2009/07/24 This test is for [perl #60508] (it's in rt.perl.or
-d 4283ec8b81 2009/07/24 Add a test for mro::method_changed_in() and mro::i
-M dc0a62a1fb 2009/07/24 minor tweaks to release_managers_guide.pod
-M 8b8cdb3af1 2009/07/24 bump-perl-version missed "perl5.10.0" style string
-M 87b6d2691f 2009/07/24 mention Deprecations in how_to_write_a_perldelta.p
-M 636a19183a 2009/07/24 tweaks to release_managers_guide.pod
-M 7840a289bf 2009/07/25 autodie 2.06_01
-M 85bdf03b25 2009/07/25 add -b option to makerel to make a .bz2 file
-d 7eedc5ec65 2009/07/25 Add test case for [perl #61222] + a test case for
-d 8ad0ee873e 2009/07/25 Add the new db tests to the MANIFEST
-d 7d88e6c43c 2009/07/25 When dumping a hash, display the mro_meta structur
-M 1375cf1cf2 2009/07/25 When resetting our children, wipe out the isa cach
-d b7bfa855cd 2009/07/25 Do not use a regex in DB::sub
- perl5db.pl has been merged; the tests
- deferred till after 5.10.1
-d d80618d264 2009/07/25 Save and restore PL_regeol for op inside of regex
-d 2788925507 2009/07/25 Tests for commit 1375cf1cf2085f851bb176047d5e60248
-
-# delete local $a[$idx]
-#
-d 91d1c79f6c 2009/07/25 Introduce save_aelem_flags()
-d 75d34a09f3 2009/07/25 Add a new SAVEf_KEEPOLDELEM flag to save_scalar_at
-d af097752b4 2009/07/25 Introduce save_hdelete() and SAVEHDELETE()
-d 47cfc530da 2009/07/25 Use the new SAVEHDELETE() macro wherever possible
-d 7332a6c406 2009/07/25 Introduce "delete local"
-
-M f0c5aa00ee 2009/07/26 dup saved_curcop in PL_parser
-d 4ba71d51f7 2009/07/26 Allow -C on the #! line when it is identical to -C
- add but the t/run/switchC.t have been merged;
- at the test back (and ff19758235) post-5.10.1
-M fc46f0f6ac 2009/07/26 perldelta entry noting when -C is now allowed on t
- (merged by hand into 5.10.1 perldelats)
-M bd0ab00df4 2009/07/26 Tidy code added in 4ba71d51f72efb2af8dc9748dd62219
-d 74b2b4b178 2009/07/26 Add tests for where -C differs between then #! and
-M 9db5571e8d 2009/07/26 Suggest using Inline as a pre-uploading test for a
-M bd54d59dd6 2009/07/26 fix vim highlighting problem
-d e9105d30ed 2009/07/26 much better swap logic to support reentrancy and f
- There is a maint-specifc version of this patch
- available; see
- <alpine.LFD.2.00.0908022008030.27039 at ein.m-l.org>
- also see 41377f6490
-M 1784bd3e6b 2009/07/26 needed something to change to test patch mailing l
-M 89f530a6b8 2009/07/27 Add security contact information to perlsec
-M 4085a37725 2009/07/27 Update Module::Build to 0.34_02
-d ff19758235 2009/07/27 Avoid using embedded newlines in the "one"liners p
-R 82151c42dd 2009/07/27 Make cxinc member of the public API
- pollutes whole world with #define cxinc ...
-M 174830c759 2009/07/27 missing "to" in perlxs
-d 6100a0a495 2009/07/27 syswrite prints garbage if called with empty scala
-d e41cc77942 2009/07/27 Regression test for [perl #67912]
-d 0214bff6a3 2009/07/27 Replace Test::More by test.pl
-d c1d4704a25 2009/07/27 Make test pass with miniperl
-d c5836baf9b 2009/07/27 Make test pass with miniperl
-d 8e2e2108bd 2009/07/27 Add core test boilerplate to some base.pm tests
-d 304efdcbf5 2009/07/27 Add core test boilerplates
-d d361fafa2e 2009/07/27 Document "delete local" in perlsub
-d a5c2649359 2009/07/27 Add support for new flag D in embed.fnc (deprecate
-d dfeca2c828 2009/07/27 Port t/op/sysio.t to test.pl
-d dd61358a03 2009/07/27 Really check that sysread(I, $x, 1, -4) dies with
-M 031cefa092 2009/07/27 add a simple utility to Porting/ which knows how t
-M 16f0d0fcc4 2009/07/27 cleanup the EUI/EUMM test mess, and bump Install.p
-d 41377f6490 2009/07/27 remove Devel-PPPort part change included in e9105d
-M 692a467c73 2009/07/27 Final release of version-0.77 for inclusion in 5.1
-M 05b3708e8e 2009/07/27 bump 'version' to 0.77 in Maintainers.pl
-M 919d72bf3e 2009/07/28 add tool to create .tgz snapshot files with .patch
-M 09236310cc 2009/07/28 update manifest to reflect two new utilities
-M a23cb041bc 2009/07/28 Add Porting/make_snapshot.pl
-M fe4f778754 2009/07/28 changes required to Make It Work on the perl gitwe
-M 40c5390990 2009/07/28 dont leave temporary files laying around
-M 46743ef75e 2009/07/28 A first stab at walking through the release-manage
-M 9b05e87488 2009/07/28 makerel now tells you _which_ files differ from th
-d 0409250f9c 2009/07/29 Make test pass with -t
-R f71d6157c7 2009/07/29 Forbid labels with keyword names
- not backwards compatible
-M bc35a5dd94 2009/07/29 Tabs, not spaces, in MANIFEST.
-M 6a7cbfe84d 2009/07/29 podtidy
-M 5bd03515d2 2009/07/29 bump-perl-version false positives
-M 398f002c97 2009/07/29 Add a test to verify that the MANIFEST file is wel
-d 8bc6a5d5cc 2009/07/29 warnings.pl and lib/warnings.pm have been changed
- warnings.pm hasn't changed in maint, and
- warnings.pl doesn't matter much
-M c372fac7e5 2009/07/29 Sort the MANIFEST.
-M b8ca42e11b 2009/07/29 Add MANIFEST sort test
-M 1d5727c1fd 2009/07/29 hints/bsdos.sh: Add correct flags for compilation
-d f9a83b0024 2009/07/29 Merge branch 'deletelocal' into blead
- MERGE: 1d5727c1fd d361fafa2e
-M ef314d296a 2009/07/29 Escape the periods in some Stratus VOS-specific co
-M 3d967d9abe 2009/07/29 Avoid shelling out to an external sort to verify t
-M 55878aed38 2009/07/29 add 'regen' steps to the release_managers_guide
-M dc2f75c0f2 2009/07/29 Porting/corelist.pl can now update Module::CoreLis
-M b20f263759 2009/07/29 much much quicker solution
-M ed34cb0da3 2009/07/29 convert the contents of make_dot_patch into a func
-M 11a595870a 2009/07/29 we want the git-describe of the requested item, no
-M 4e86fc4bd8 2009/07/30 Sort MANIFEST using Perl
-M ee56566fc6 2009/07/30 'git st' is not a standard git command.
-M 8cf77941f2 2009/07/30 Try longst prefixes first, else lib/CPAN may match
-R 28ccebc469 2009/07/30 Add new error "Can't use keyword '%s' as a label"
- not backwards compatible
-M daa8514ad7 2009/07/31 Add lib/version/Internals.pod to MANIFEST and Port
-M f96e7a95cb 2009/07/31 Add Porting/GitUtils.pm to MANIFEST
-M f629640b47 2009/07/31 Mention in apidocs that av_push takes ownership of
-M 781f5a38a3 2009/07/31 Clean up the .exists files on VMS.
-M fd838dcfd6 2009/07/31 Start refactoring out release management steps tha
-M db3f805ef9 2009/07/31 Copyediting the release_managers_guide.
-M 8c35d28540 2009/07/31 Linearized the release-manager's guide to make it
-M 98b0b1df93 2009/07/31 Fixed maintainership for lib/ExtUtils/t/InstallWit
-d 2b4af749f7 2009/07/31 made the manicheck actions (previously releng) int
-M 5c4676374b 2009/08/01 Removed a release-engineering step. (It's been rep
-d 61a7d4fdb0 2009/08/01 Pre-resolve symlink for File::Stat test under -Dmk
-d 942d1a9e30 2009/08/03 Clean up the new maintainers.t to be a bit more se
-M 00229b9760 2009/08/03 Udpdated checkAUTHORS.pl to expect the output of g
-M ce80ee9198 2009/08/03 Updated the release_managers_guide with informatio
-M f1dc912dca 2009/08/03 Updated Ingy's entry in Authors to match his legal
-M 3c975e438f 2009/08/03 Updated AUTHORS to include all contributors with m
-M 1c05a96ef7 2009/08/03 Reoved the suggestion that we might want to consid
-M 8fccd523e6 2009/08/03 buildtoc should be executable
-d bf61c8520d 2009/08/03 Flipped checkcase.pl from a porting tool to an act
- see also 6b77813cba
-M 57433fbf3a 2009/08/03 Be a bit clearer about always needing to regen per
-M 96db07ef41 2009/08/03 Minor typo fix in a comment
-M 233e9d1c28 2009/08/03 Y2038 doc pointers in the little helper C tools
-M 44a7a252c8 2009/08/03 Move content of Todo.micro into perltodo
-d 6b77813cba 2009/08/03 Add the new "porting" test directory to the test h
-M d5f2802546 2009/08/03 Document what needs to happen when you add a new t
-M 1841b79869 2009/08/03 MacPerl is gone. Its test bits should be now remov
-M 1af1c0d6fc 2009/08/03 Update the description of the 'system' function to
-d cd86ed9d43 2009/08/03 Remove the port to MiNT. It's a dead platform tha
-d e94c1c0554 2009/08/03 Removed vestigal support for Tenon Intersystems Ma
-M a7fb14411f 2009/08/03 Yuval Kogman's address was special cased for non-i
-M 95da743b36 2009/08/03 Minor spelling nit in last perlfunc updated
-d 9e8c38e478 2009/08/03 Remove the README for the now-gone machten port
-M fda5b70af8 2009/08/03 Further work to cut down the unattributed authors
-M 91fb030ae1 2009/08/03 Maintainers.pl: update for ExtUtils::Install
-M d10dbbde5a 2009/08/03 bump-perl-version: over-keen false-positive remova
-M 38711ea604 2009/08/03 Continued work to get Porting/checkAUTHORS.pl to a
-M b5e2dde18e 2009/08/03 Now down to 50 addresses in the git logs who aren'
-M 4d2c8158ba 2009/08/04 Fix corelist generation section of the release man
-M bfadf2baa9 2009/08/04 Improve the broken order of the release_managers_g
-M c2615aa941 2009/08/04 Removed bald-faced lies I inserted about the merge
-M d781deb654 2009/08/04 WIFEXITED() cygwin regression
-d dd3e51dc8a 2009/08/04 Promote blocks resulting from constant folding to
-M 2e831dfd27 2009/08/04 release_managers_guide: make into two logical sect
-M 20b15ed1ed 2009/08/04 The AUTHORS file is now short only about thirty 'r
-M dd0e54ba0e 2009/08/04 minor tweaks to release_managers_guide.pod
-M d7eb1120ad 2009/08/04 release_managers_guide: add patchlevel.h stuff
-d 46a76da79a 2009/08/05 win32/perlhost.h: use symbolic constant
-R 240bfeb992 2009/08/05 add CLONEf_KEEP_PTR_TABLE to win fork emulation.
- (see 682bcedc3e)
-M c07671d743 2009/08/05 Now down to 17 unknown addresses which "should" be
-M b0b93b3c77 2009/08/05 in perl_clone_using, free the prt_table
-R 682bcedc3e 2009/08/05 Revert "add CLONEf_KEEP_PTR_TABLE to win fork emul
-M 039dab9882 2009/08/05 The current CPAN is very noisy on download failure
-M cb06ebec41 2009/08/05 ExtUtils::MakeMaker 6.55_02
-M 3ed7368117 2009/08/05 fix for EU:MM 6.55_02 failing test,
-M 909fb0b7fb 2009/08/05 Updated Module::CoreList for the 5.10.1 release
-M a0db33fef5 2009/08/06 release_managers_guide: tweak ordering of 'on-the-
-M ecc9c9d9c3 2009/08/06 Porting/makerel: handle more sha1 variants,
-M a42352eec1 2009/08/06 more release_managers_guide.pod tweaking
-M bf8ea21502 2009/08/06 Minor typo and formatting fixes to the release man
-M 9c1f068a70 2009/08/06 broke out checkAUTHORS aliasing for our two "merij
-d be4a20f47d 2009/08/06 Make gv_IOadd accept a NULL argument
-M c40e8e9bf4 2009/08/06 pod/perlipc.pod: add some hints on avoiding pipe d
-d ef9da979fc 2009/08/07 [perl #68108] : also fix if/else constant folding
-M 53967bb90f 2009/08/07 perltodo: Propagate compilation hints to the debug
-M e37e7c833e 2009/08/07 5.10.1-RC1 is released
-R cc4a32e9b8 2009/08/07 Remove GvREFCNT_inc(), which is deprecated and unu
-d af3885a078 2009/08/08 In pp_caller, remove a GvMULTI_on() by adding GV_A
-d 9a0c975abc 2009/08/08 Update some distributions in Porting/Maintainers.p
-d 70abb3320b 2009/08/08 Synchronize AutoLoader with CPAN's 5.69
-d 552b942743 2009/08/08 Synchronize with CPAN's Attribute::Handlers 0.86
-d 5e60330210 2009/08/08 Spellcheck
-d a36ee16f61 2009/08/08 Move variable declaration to where it's used
-d 4d0a25002d 2009/08/08 Synchronize with CPAN's Data::Dumper 2.125
-d 1776cbe852 2009/08/08 Move the "types are equal" early return ahead of t
-d d5713896ec 2009/08/08 Merge gv_AVadd(), gv_HVadd() and gv_SVadd() into g
-d 85dca89a8f 2009/08/08 Perl_newIO() can become a mathom by making newIO()
-d bb85b28a6d 2009/08/08 Merge gv_IOadd() into gv_add_by_type().
-d fc279e463d 2009/08/09 Inline _seq_dir_rules(), as it is now used in only
-d 226de47957 2009/08/09 Run the main tests "slowest first" by ordering the
-R 7989172bfe 2009/08/09 Add 5.10.1-RC1 release to perlhist
-M 1a7f3fa0f2 2009/08/10 Bump Module::Build version to 0.340201
-M 249829ce66 2009/08/10 bump Module::Build in Maintainers.pl
-d 3350824ec1 2009/08/10 Upgrade to 'threads' 1.74
-d 891f9d0e20 2009/08/10 Update threads to 1.74
-d 66ce101fb6 2009/08/10 MANIFEST and Porting/Maintainers.pl update
-d 5b48f78c51 2009/08/10 Upgrade to threads::shared 1.31
-d ba2d061b7a 2009/08/11 Reduce thread count in threads::shared stress test
-d 133fac12ff 2009/08/11 Restore t/harness path checks on Win32
-M 4cd37d19e1 2009/08/11 PERL_DONT_CREATE_GVSV was documented in perl589del
-M 746c0b3537 2009/08/11 release_managers_guide: mention updating http://ww
-M 06aa495b2e 2009/08/11 INSTALL: mention that env vars can affect tests
-M f343f96080 2009/08/11 Removed '...' ellipses from docs about '...' flip-
-M adbb55c01a 2009/08/11 s/PERL5OPTS/PERL5OPTS/ in INSTALL
-M ad2561310d 2009/08/11 On Windows normalize $^X using GetLongPathName()
-M 805b101128 2009/08/12 ameliorate B::Deparse slowdown
-M 679b67fee6 2009/08/12 Don't explicitly link against msvcrt when using Mi
-M d62d5a537d 2009/08/12 install Config_heavy.pl in archlib
-M 94a9a4bc91 2009/08/12 Remove duplicate entry (from config_heavy.pl)
-M 521fe6911c 2009/08/12 document split in void context in perlfunc.pod
-M 47b1f09620 2009/08/12 release_managers_guide: mention testing perlbug
-M 8a00c8caf7 2009/08/12 perlbug.PL assumes patchlevel.h has simple patch l
-M 7acb6aa6c2 2009/08/12 Typos in perlbug.PL
-d cb4bdfcf96 2009/08/12 Added a failing test for a bareword parsing regres
-d 972ee0bb66 2009/08/13 Mark as TODO the failing tests added in cb4bdfcf f
-R 9af20c7fc2 2009/08/13 Mention the unit of time
-R e64d4d0a20 2009/08/13 Revert "Mention the unit of time"
-M cf284a245b 2009/08/13 Perl_die_nocontext() is also called with NULL from
-M 109f04419a 2009/08/13 Merge the updated perlfaq from the perlfaq reposit
-M ac1205a52f 2009/08/13 Updated Maintainers.pl to note that p5p/blead is r
-R 303def5230 2009/08/13 Merge commit 'dromedary/blead' into blead
- MERGE: ac1205a52f cf284a245b
-d 00d2151d81 2009/08/13 Revert "Revert "Mention the unit of time""
-M 4cc80fc4cb 2009/08/13 Install arch-dependent files into $archlib.
-M d60a104409 2009/08/13 release_managers_guide: add release compare item,
-M 4a2c3333c5 2009/08/14 Add Bob Wilkinson's email address to AUTHORS
-R d1cddda8a7 2009/08/14 Fix PROCESSOR_ARCHITECTURE in dmake builds.
-M 9b1007c4e4 2009/08/14 Import WIN64 environment variable into makefile.mk
-R e99480546c 2009/08/15 Revert bogus PROCESSOR_ARCHITECTURE fix.
-M 76f108ac8c 2009/08/15 Explain that the load_module() import list must be
-M c67d51c392 2009/08/15 release_managers_guide: typo fixes
-M e13751452f 2009/08/15 quick fix cpan -r
-M 54c717c313 2009/08/15 Suppress system messages when op/ref.t calls die o
-R 5115136b5a 2009/08/16 sv_peek(): SvOOK offset is no longer in IVX
- maint still stores OOK in IVX
-M a930c511fc 2009/08/16 [perl #68530] "version::CLASS" warning in Safe.pm
-d 663b33b066 2009/08/16 Skip maintainers.t on VMS.
-M 27d8d4f034 2009/08/17 Sebastien decided what was the UPSTREAM for his mo
-d 672c0ce9f4 2009/08/18 Generate perl version-dependent regexps once, rath
-d c5764f7084 2009/08/18 Convert perl version check in import() from run ti
-d 7064c127dd 2009/08/18 No need to flush the package's MRO cache if we've
-d f7fd2659b1 2009/08/18 Flush the MRO cache at the end, rather than the st
-M 7894ad662a 2009/08/18 Correctly detect NDBM_File availability
-M a47a8f3cfe 2009/08/18 Updated Module::CoreList for 5.10.1-RC2
-M a14438df21 2009/08/19 release_managers_guide: minor tweaks
-M e9d2e818e0 2009/08/19 bleed and 5.10.1 - documentation fix - README.aix
-M 6bc0591006 2009/08/19 bump Safe version to 2.18
-d f89a1e08e6 2009/08/19 Add PERL_DISABLE_PMC to the list of -V's compile-t
-M e7598a06d7 2009/08/20 Teach perlivp about the new stucture of the IO::Co
-d c3acb9e076 2009/08/20 Perl_newHVhv() should copy immortal values as-is,
-d 73519bd018 2009/08/20 Optimise S_mro_get_linear_isa_dfs() when dealing w
-d d7c0d2821c 2009/08/20 add -DM flag to track smartmatch resolution
-d b0413f463e 2009/08/20 Optimise mro_get_linear_isa_c3() when there is a s
-d 04e5ac63d9 2009/08/20 Instead of trusting mro::get_linear_isa(), test it
-M b3ed409dee 2009/08/20 incremental improvement in ~~ documentation, alrea
- (this was actally applied separately to
- blead and maint rather than cherry-picked)
-d a18d9f20d1 2009/08/21 In mro_get_linear_isa_c3() optimise even if AvARRA
-d 81a8de77c9 2009/08/21 Remove a refactoring typo - don't post-increment $
-d a8ae8fee10 2009/08/21 Use the constant _CAN_PCS to optimise out things t
-d f747ebd621 2009/08/21 Add clear magic to %^H so that the HE chain is res
-d 17eef65c2f 2009/08/21 Fix build warning in mro.c
-d 59d8e2ce29 2009/08/21 Eliminate SV leak in mro::_nextcan - hv_store_ent(
-d 8e234d892c 2009/08/21 sv_newmortal() is faster than sv_2mortal(newSV(0))
-d 9c1314f0ea 2009/08/21 gv_efullname3() could return NULL, so mro::_nextca
-d c1754fcef4 2009/08/22 In Perl_newATTRSUB(), we know the lengths, so can
-d ed4a8a9b7d 2009/08/22 In Perl_newATTRSUB(), refactor the calls to gv_fet
-d ae5c1e95b5 2009/08/22 In pp_entersub, replace gv_fetchpv() with gv_fetch
-M 74d3927541 2009/08/22 add the CGI "default_value for popup_menu()" fix f
-d 68a4c8b9f2 2009/08/22 upgrade GCI from 3.43 to 3.45
-d 0e44158ce9 2009/08/22 re-apply boilerplate to CGI test files
-M 0de1c906c3 2009/08/22 better document smart match overloading
-M 459fc3ca45 2009/08/22 mention perlivp in release_managers_guide
-d 828dad175c 2009/08/22 Eliminate the remaining definitions for *_allocate
-d c8e503bfe4 2009/08/22 Eliminate *_ALLOCATED_HEAD and *_HEAD macros which
-M 6c1a81b03e 2009/08/22 Update Module::CoreList for 5.10.1
-M 52a66c2cc3 2009/08/22 more release_managers_guide tweaks
Deleted: vendor/perl/dist/Porting/mergelog-tool
===================================================================
--- vendor/perl/dist/Porting/mergelog-tool 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/mergelog-tool 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,379 +0,0 @@
-#!/usr/bin/perl
-#
-# mergelog-tool, DAPM 15-Feb-2009
-#
-# Process metadata records stored in a text file that concern merges
-# between bleed and maint perl
-
-use 5.010;
-
-use warnings;
-use strict;
-
-use Getopt::Std;
-
-my $SHA_LEN = 10; # how many characters in the shortened SHA-1 hash
-
-my %STATUS = (
- 'M' => 'Fully merged',
- 'P' => 'Partally merged, the rest rejected',
- 'R' => 'Fully rejected',
- 'A' => 'part of branch merged in single Aggregate merge',
- 'd' => 'Defer until a later release',
- 'm' => 'Partally merged, the rest pending',
- '!' => 'Reviewed but awaiting action',
- '.' => 'Unreviewed',
-);
-
-
-my %OPTS;
-
-sub usage { die <<EOF; }
-usage: $0 [-ch] [-f record_file] -c|-m|-u
- -c just check syntax of record file
- -f file name of record file
- -h help
- -M Directory in which to create mailboxes
- -m generate mailboxes (in current directory by default)
- -u update log file with latest commits (previous renamed .bak)
-EOF
-
-getopts('cf:hM:mu', \%OPTS) or usage;
-usage if $OPTS{h};
-
-my $action = join '', map $OPTS{$_} ? $_ : '', qw(c m u);
-die "The action must be one of -c, -m, -u\n" unless $action =~ /^[cmu]$/;
-
-my $record_filename = $OPTS{f} // "Porting/mergelog";
-
-{
- my ($records, $index) = read_merge_record_file($record_filename);
- exit 0 if $action eq 'c';
-
- if ($action eq 'm') {
- generate_mailboxes($records, $index, ($OPTS{M} // '.'));
- exit 0;
- }
-
- if ($action eq 'u') {
- update_record_file($records, $index, $record_filename);
- }
-}
-
-
-
-exit 0;
-
-
-# given a file name, read in the merge record file and return
-# an array of records and an index of commit ids that link to records in
-# that array.
-#
-# Comment records and line continutions are captured in such a way
-# that it should be possible to exactly regenerate the original file
-# (apart from minor whitespace differences).
-
-sub read_merge_record_file {
- my ($file) = @_;
-
- open my $fh, '<', $file
- or die "$0: Can't open '$file': $!\n";
-
- my %index;
- my @records;
- while (<$fh>) {
- if ($. == 1 or /^\S/) {
- # new entry
- if (/^#/) {
- # comment
- push @records, [ '#', undef, undef, $' ];
- next;
- }
- my ($flag, $commit, $date, $rest) = split ' ', $_, 4;
- defined $rest
- or die "$0: malformed line at $file:$.:\n$_";
- $flag =~ /^[AMPRdm!\.]$/
- or die "$0: unrecognised flag '$flag' at $file:$.\n";
- $commit =~ /^[0-9a-f]{$SHA_LEN}$/
- or die "$0: badly-formed commit '$commit' at $file:$.\n";
- $index{$commit} and
- die "Duplicate commit '$commit' at $file:$.\n";
- push @records, [ $flag, $commit, $date, $rest ];
- $index{$commit} = $records[-1];
- }
- else {
- # continuation line
- if ( (($records[-1][0] // '') eq '#') and /\S/) {
- die
- "$0: illegal continuation line after comment at $file:$.:\n$_";
- }
- $records[-1][-1] .= $_;
- }
- }
- chomp $_->[3] for @records;
- return \@records, \%index;
-}
-
-# given a ref to a record array, and a file handle, write the records out
-#
-sub write_merge_record_file {
- my ($records, $fh) = @_;
- for my $record (@$records) {
- if ($record->[0] eq '#') {
- print $fh @$record[0,3], "\n";;
- }
- else {
- printf $fh "%s %s %s %s\n", @$record;
- }
- }
-}
-
-
-# get a list of commit records based on the passed format and args.
-# Format should start with %H. $fieldcount is the expected number
-# of fields per record.
-#
-# Returns both a hash and a list
-
-sub get_commits {
- my ($format, $args, $fieldcount) = @_;
-
- # XXX make this depend on current branch rather than hard-coding???
- my $range = "perl-5.10.0..origin/blead";
-
-
- # Initially I just used \x00 as a record separator, but at least one
- # diff had a null char in it! (5254b38e) So add some extra text too
- my $SEP = 'RjqenKHPaNJq';
-
- open my $log, "git log $args --pretty=format:'%x00$SEP$format' $range|"
- or die "$0: failed to execute 'git log': $!\n";
-
-
- my %commits;
- my @commits;
- {
- local $/ = "\x00$SEP";
- while (<$log>) {
- chomp;
- next unless length; # skip first null record
- my $rec = [ split /\x01/, $_];
- die "$0: unexpected commit field count: ", scalar(@$rec), "\n"
- if @$rec != $fieldcount;
- my $short = substr($rec->[0], 0, $SHA_LEN);
- if (exists $commits{$short}) {
- die <<EOF;
-$0: Internal error: duplicate short commit found: '$short'.
-This means that the shortened SHA-1 hashes in the log file are no longer
-long enough. The log file will need altering and this script modified
-before you can proceed.
-EOF
- }
- $commits{$short} = $rec;
- push @commits, $rec;
- }
- }
-
- close $log;
- return \%commits, [ reverse @commits ];
-}
-
-
-# Create three mailboxes in the given directory, containing accepted
-# rejected and pending changes
-
-sub generate_mailboxes {
- my ($records, $index, $dir) = @_;
-
- die "$0: No such directory: '$dir'\n" unless -d $dir;
-
- my %mboxes;
- for (qw(accepted rejected pending)) {
- my $f = "$dir/p5c_$_";
- my $fh;
- open $fh, '>', $f or die "$0: failed to create '$f': $!\n";
- $mboxes{$_} = $fh;
- }
-
- my ($commits) = get_commits(
- '%H%x01%an%x01%ae%x01%aD%x01%ce%x01%cD%x01%s%x01%b%x01%P%x01',
- '--stat -p -M', 10);
-
- my %counts;
- my $status;
- my $linesep = '=' x 70;
-
- for my $record (@$records) {
- next if $record->[0] eq '#';
-
- $status = "Status: RO\n"; # email is read and old
-
- my $fh;
- if ($record->[0] =~ /^[AMP]$/) {
- $fh = $mboxes{accepted};
- $counts{accepted}++;
- }
- elsif ($record->[0] =~ /^[dR]$/) {
- $fh = $mboxes{rejected};
- $counts{rejected}++;
- }
- elsif ($record->[0] =~ /^[m!\.]$/) {
- $fh = $mboxes{pending};
- $counts{pending}++;
- $status = '' if $record->[0] eq '.'; # mark email as new
- }
- else {
- die "$0: Unexpected flag type '$record->[0]'\n";
- }
-
- # $commit arrays contain:
- # 0 commit SHA1
- # 1 Author Name
- # 2 Author Email
- # 3 Author Date (RFC822)
- # 4 Committer Email
- # 5 Committer Date (RFC822)
- # 6 Subject
- # 7 Body
- # 8 parents
- # 9 File list and diff (--stat -p)
-
- my $shortsha1 = $record->[1];
- my $c = $commits->{$shortsha1};
- die "$0: Unknown commit '$shortsha1'\n" unless $c;
-
-
-
- my $subj = "$record->[0] $shortsha1 "
- # a slight subterfuge here to avoid three X's in this src
- . (($record->[3] =~ /[X]XX/) ? 'X'.'XX ' : '') . ($c->[6] // '');
-
- my $cdate = $c->[5];
- # convert RFC822 date into mbox 'From ' header format
- # Fri, 20 Feb 2009 14:45:36 +0100
- # Wed Jan 9 19:47:43 2008
- $cdate =~ s/ [+\-]\d{4}$//;
- $cdate =~ s{^(\w\w\w),(\s+\d+) (\w\w\w) (\d{4}) ([\d:]{8})$}
- {$1 $3$2 $5 $4}
- or die "$0: Can't convert RFC822 date: '$cdate'\n";
-
- my @parents = map substr($_,0,$SHA_LEN), split ' ', $c->[8];
- my $merged = @parents > 1 ? "MERGED: @parents\n" : '';
-
- my $files_and_diff = $c->[9];
- $files_and_diff =~ s/^---/\n---\n/;
- $files_and_diff =~ s/^( \d+ files changed,)/\n$1/m;
- $files_and_diff =~ s/^diff /$linesep\n\ndiff /m;
-
- # truncate long bodies
-
- if (length($files_and_diff) > 100_000) {
- substr($files_and_diff, 100_000) =
- "\n\n***TRUNCATED at 100Kbytes\n";
- }
-
- my $body = <<EOF;
-From: $c->[1] <$c->[2]>
-Date: $c->[3]
-Subject: $subj
-Message-Id: <fake:$c->[0]>
-$status
-Commit: $c->[0]
-Author: $c->[1] <$c->[2]>
-Date: $c->[3]
-${merged}Status: [$record->[0]] ($STATUS{$record->[0]})
-Notes: $record->[3]
-$linesep
-
-$c->[6]
-$c->[7]
-$files_and_diff
-EOF
-
- $body =~ s/^From />From /gm; # mbox 'From ' escaping
- $body = "From $c->[4] $cdate\n$body";
-
- print $fh $body;
- }
- for (values %mboxes) {
- close $_ or die "$0: close: $!\n";
- }
- for (qw(accepted rejected pending)) {
- printf "%4d %s mailbox entries\n", $counts{$_}, $_;
- }
-}
-
-
-sub update_record_file {
- my ($records, $index, $record_filename) = @_;
-
- my ($commit_hash, $commits) =
- get_commits('%H%x01%P%x01%ct%x01%s', '', 4);
-
- # confirm that commits is a superset of records
- for (keys %$index) {
- $commit_hash->{$_}
- or die "$0: Entry '$_' in log file is not a recognised commit\n";
- }
-
- # convert git log output to log file format
-
- for my $c (@$commits) {
- my ($sha1, $parents, $date, $subject) = @$c;
- $sha1 = substr($sha1, 0, $SHA_LEN);
- my ($yy,$mm,$dd) = (gmtime($date))[5,4,3];
- $date = sprintf "%04d/%02d/%02d", $yy+1900, $mm+1, $dd;
- chomp $subject;
- $subject = substr($subject, 0, 50);
- my @parents = split ' ', $parents;
- if (@parents > 1) {
- $subject .= "\n\t\t\t\tMERGE: "
- . join ' ', map substr($_,0,$SHA_LEN), @parents;
- }
- @$c = ();
- push @$c, '.', $sha1, $date, $subject;
- }
-
-
- # merge log file and new commits
-
- my @out;
- COMMIT: for my $c (@$commits) {
- while (1) {
- my $r = $records->[0];
- last unless $r;
- if ($r->[0] eq '#') {
- push @out, $r;
- shift @$records;
- next;
- }
-
- if ($r->[1] eq $c->[1]) {
- push @out, $r;
- shift @$records;
- next COMMIT;
- }
- last;
- }
- push @out, $c;
- }
- @$records and die
- "$0: Internal error: unexpected log records left after merge\n";
-
-
- my $new = "$record_filename.new";
- my $bak = "$record_filename.bak";
-
- die "$0: $new already exists\n" if -e $new;
- open my $out, '>', $new
- or die "$0: Can't create '$new': $!\n";
- write_merge_record_file(\@out,$out);
- close $out
- or die "$0: close($new): $!\n";
- -s $new < -s $record_filename
- and die "$0: new file '$new' is smaller than existing file\n";
- rename $record_filename, $bak
- or die "$0: rename $record_filename -> $bak: $!\n";
- rename $new, $record_filename
- or die "$0: rename $new -> $record_filename: $!\n";
-}
Modified: vendor/perl/dist/Porting/perldelta_template.pod
===================================================================
--- vendor/perl/dist/Porting/perldelta_template.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/perldelta_template.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -366,7 +366,7 @@
XXX Generate this with:
- perl Porting/acknowledgements.pl v5.18.1..HEAD
+ perl Porting/acknowledgements.pl v5.18.2..HEAD
=head1 Reporting Bugs
Modified: vendor/perl/dist/Porting/todo.pod
===================================================================
--- vendor/perl/dist/Porting/todo.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/Porting/todo.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -466,7 +466,7 @@
On these systems, it might be the default compilation mode, and there
is currently no guarantee that passing no use64bitall option to the
Configure process will build a 32bit perl. Implementing -Duse32bit*
-options would be nice for perl 5.18.1.
+options would be nice for perl 5.18.2.
=head2 Profile Perl - am I hot or not?
@@ -1173,7 +1173,7 @@
=head1 Big projects
Tasks that will get your name mentioned in the description of the "Highlights
-of 5.18.1"
+of 5.18.2"
=head2 make ithreads more robust
Modified: vendor/perl/dist/README
===================================================================
--- vendor/perl/dist/README 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/README 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,6 +1,6 @@
Perl is Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-by Larry Wall and others. All rights reserved.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
+2013 by Larry Wall and others. All rights reserved.
Modified: vendor/perl/dist/README.haiku
===================================================================
--- vendor/perl/dist/README.haiku 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/README.haiku 2014-08-27 11:27:40 UTC (rev 6720)
@@ -22,9 +22,9 @@
Make perl executable and create a symlink for libperl:
chmod a+x /boot/common/bin/perl
- cd /boot/common/lib; ln -s perl5/5.18.1/BePC-haiku/CORE/libperl.so .
+ cd /boot/common/lib; ln -s perl5/5.18.2/BePC-haiku/CORE/libperl.so .
-Replace C<5.18.1> with your respective version of Perl.
+Replace C<5.18.2> with your respective version of Perl.
=head1 KNOWN PROBLEMS
Modified: vendor/perl/dist/README.macosx
===================================================================
--- vendor/perl/dist/README.macosx 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/README.macosx 2014-08-27 11:27:40 UTC (rev 6720)
@@ -10,9 +10,9 @@
This document briefly describes Perl under Mac OS X.
- curl http://www.cpan.org/src/perl-5.18.1.tar.gz > perl-5.18.0.tar.gz
- tar -xzf perl-5.18.1.tar.gz
- cd perl-5.18.1
+ curl http://www.cpan.org/src/perl-5.18.2.tar.gz > perl-5.18.0.tar.gz
+ tar -xzf perl-5.18.2.tar.gz
+ cd perl-5.18.2
./Configure -des -Dprefix=/usr/local/
make
make test
@@ -20,7 +20,7 @@
=head1 DESCRIPTION
-The latest Perl release (5.18.1 as of this writing) builds without changes
+The latest Perl release (5.18.2 as of this writing) builds without changes
under all versions of Mac OS X from 10.3 "Panther" onwards.
In order to build your own version of Perl you will need 'make',
Modified: vendor/perl/dist/README.os2
===================================================================
--- vendor/perl/dist/README.os2 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/README.os2 2014-08-27 11:27:40 UTC (rev 6720)
@@ -618,7 +618,7 @@
=item Additional Perl modules
- unzip perl_ste.zip -d f:/perllib/lib/site_perl/5.18.1/
+ unzip perl_ste.zip -d f:/perllib/lib/site_perl/5.18.2/
Same remark as above applies. Additionally, if this directory is not
one of directories on @INC (and @INC is influenced by C<PERLLIB_PREFIX>), you
Modified: vendor/perl/dist/README.vms
===================================================================
--- vendor/perl/dist/README.vms 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/README.vms 2014-08-27 11:27:40 UTC (rev 6720)
@@ -142,11 +142,11 @@
choice. Once you have done so, use a command like the following to
unpack the archive:
- vmstar -xvf perl-5^.18^.1.tar
+ vmstar -xvf perl-5^.18^.2.tar
Then set default to the top-level source directory like so:
- set default [.perl-5^.18^.1]
+ set default [.perl-5^.18^.2]
and proceed with configuration as described in the next section.
Deleted: vendor/perl/dist/cpan/Digest-SHA/src/hmac.c
===================================================================
--- vendor/perl/dist/cpan/Digest-SHA/src/hmac.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Digest-SHA/src/hmac.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,103 +0,0 @@
-/*
- * hmac.c: routines to compute HMAC-SHA-1/224/256/384/512 digests
- *
- * Ref: FIPS PUB 198 The Keyed-Hash Message Authentication Code
- *
- * Copyright (C) 2003-2011 Mark Shelor, All Rights Reserved
- *
- * Version: 5.61
- * Wed Mar 9 05:26:36 MST 2011
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "hmac.h"
-#include "sha.h"
-
-/* hmacopen: creates a new HMAC-SHA digest object */
-HMAC *hmacopen(int alg, unsigned char *key, unsigned int keylen)
-{
- unsigned int i;
- HMAC *h;
-
- SHA_newz(0, h, 1, HMAC);
- if (h == NULL)
- return(NULL);
- if ((h->isha = shaopen(alg)) == NULL) {
- SHA_free(h);
- return(NULL);
- }
- if ((h->osha = shaopen(alg)) == NULL) {
- shaclose(h->isha);
- SHA_free(h);
- return(NULL);
- }
- if (keylen <= h->osha->blocksize / 8)
- memcpy(h->key, key, keylen);
- else {
- if ((h->ksha = shaopen(alg)) == NULL) {
- shaclose(h->isha);
- shaclose(h->osha);
- SHA_free(h);
- return(NULL);
- }
- shawrite(key, keylen * 8, h->ksha);
- shafinish(h->ksha);
- memcpy(h->key, shadigest(h->ksha), h->ksha->digestlen);
- shaclose(h->ksha);
- }
- for (i = 0; i < h->osha->blocksize / 8; i++)
- h->key[i] ^= 0x5c;
- shawrite(h->key, h->osha->blocksize, h->osha);
- for (i = 0; i < h->isha->blocksize / 8; i++)
- h->key[i] ^= (0x5c ^ 0x36);
- shawrite(h->key, h->isha->blocksize, h->isha);
- memset(h->key, 0, sizeof(h->key));
- return(h);
-}
-
-/* hmacwrite: triggers a state update using data in bitstr/bitcnt */
-unsigned long hmacwrite(unsigned char *bitstr, unsigned long bitcnt, HMAC *h)
-{
- return(shawrite(bitstr, bitcnt, h->isha));
-}
-
-/* hmacfinish: computes final digest state */
-void hmacfinish(HMAC *h)
-{
- shafinish(h->isha);
- shawrite(shadigest(h->isha), h->isha->digestlen * 8, h->osha);
- shaclose(h->isha);
- shafinish(h->osha);
-}
-
-/* hmacdigest: returns pointer to digest (binary) */
-unsigned char *hmacdigest(HMAC *h)
-{
- return(shadigest(h->osha));
-}
-
-/* hmachex: returns pointer to digest (hexadecimal) */
-char *hmachex(HMAC *h)
-{
- return(shahex(h->osha));
-}
-
-/* hmacbase64: returns pointer to digest (Base 64) */
-char *hmacbase64(HMAC *h)
-{
- return(shabase64(h->osha));
-}
-
-/* hmacclose: de-allocates digest object */
-int hmacclose(HMAC *h)
-{
- if (h != NULL) {
- shaclose(h->osha);
- memset(h, 0, sizeof(HMAC));
- SHA_free(h);
- }
- return(0);
-}
Deleted: vendor/perl/dist/cpan/Digest-SHA/src/hmac.h
===================================================================
--- vendor/perl/dist/cpan/Digest-SHA/src/hmac.h 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Digest-SHA/src/hmac.h 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,64 +0,0 @@
-/*
- * hmac.h: header file for HMAC-SHA-1/224/256/384/512 routines
- *
- * Ref: FIPS PUB 198 The Keyed-Hash Message Authentication Code
- *
- * Copyright (C) 2003-2011 Mark Shelor, All Rights Reserved
- *
- * Version: 5.61
- * Wed Mar 9 05:26:36 MST 2011
- *
- */
-
-#ifndef _INCLUDE_HMAC_H_
-#define _INCLUDE_HMAC_H_
-
-#include "sha.h"
-
-typedef struct {
- SHA *ksha;
- SHA *isha;
- SHA *osha;
- unsigned char key[SHA_MAX_BLOCK_BITS/8];
-} HMAC;
-
-#define _HMAC_STATE HMAC *h
-#define _HMAC_ALG int alg
-#define _HMAC_DATA unsigned char *bitstr, unsigned long bitcnt
-#define _HMAC_KEY unsigned char *key, unsigned int keylen
-
-HMAC *hmacopen (_HMAC_ALG, _HMAC_KEY);
-unsigned long hmacwrite (_HMAC_DATA, _HMAC_STATE);
-void hmacfinish (_HMAC_STATE);
-unsigned char *hmacdigest (_HMAC_STATE);
-char *hmachex (_HMAC_STATE);
-char *hmacbase64 (_HMAC_STATE);
-int hmacclose (_HMAC_STATE);
-
-#ifndef SHA_PERL_MODULE
-
-unsigned char *hmac1digest (_HMAC_DATA, _HMAC_KEY);
-char *hmac1hex (_HMAC_DATA, _HMAC_KEY);
-char *hmac1base64 (_HMAC_DATA, _HMAC_KEY);
-unsigned char *hmac224digest (_HMAC_DATA, _HMAC_KEY);
-char *hmac224hex (_HMAC_DATA, _HMAC_KEY);
-char *hmac224base64 (_HMAC_DATA, _HMAC_KEY);
-unsigned char *hmac256digest (_HMAC_DATA, _HMAC_KEY);
-char *hmac256hex (_HMAC_DATA, _HMAC_KEY);
-char *hmac256base64 (_HMAC_DATA, _HMAC_KEY);
-unsigned char *hmac384digest (_HMAC_DATA, _HMAC_KEY);
-char *hmac384hex (_HMAC_DATA, _HMAC_KEY);
-char *hmac384base64 (_HMAC_DATA, _HMAC_KEY);
-unsigned char *hmac512digest (_HMAC_DATA, _HMAC_KEY);
-char *hmac512hex (_HMAC_DATA, _HMAC_KEY);
-char *hmac512base64 (_HMAC_DATA, _HMAC_KEY);
-unsigned char *hmac512224digest (_HMAC_DATA, _HMAC_KEY);
-char *hmac512224hex (_HMAC_DATA, _HMAC_KEY);
-char *hmac512224base64 (_HMAC_DATA, _HMAC_KEY);
-unsigned char *hmac512256digest (_HMAC_DATA, _HMAC_KEY);
-char *hmac512256hex (_HMAC_DATA, _HMAC_KEY);
-char *hmac512256base64 (_HMAC_DATA, _HMAC_KEY);
-
-#endif
-
-#endif /* _INCLUDE_HMAC_H_ */
Deleted: vendor/perl/dist/cpan/Digest-SHA/src/hmacxtra.c
===================================================================
--- vendor/perl/dist/cpan/Digest-SHA/src/hmacxtra.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Digest-SHA/src/hmacxtra.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,62 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include "hmac.h"
-
-static unsigned char *hmaccomp(alg, fmt, bitstr, bitcnt, key, keylen)
-int alg;
-int fmt;
-unsigned char *bitstr;
-unsigned long bitcnt;
-unsigned char *key;
-unsigned int keylen;
-{
- HMAC *h;
- static unsigned char digest[SHA_MAX_HEX_LEN+1];
- unsigned char *ret = digest;
-
- if ((h = hmacopen(alg, key, keylen)) == NULL)
- return(NULL);
- hmacwrite(bitstr, bitcnt, h);
- hmacfinish(h);
- if (fmt == SHA_FMT_RAW)
- memcpy(digest, hmacdigest(h), h->osha->digestlen);
- else if (fmt == SHA_FMT_HEX)
- strcpy((char *) digest, hmachex(h));
- else if (fmt == SHA_FMT_BASE64)
- strcpy((char *) digest, hmacbase64(h));
- else
- ret = NULL;
- hmacclose(h);
- return(ret);
-}
-
-#define HMAC_DIRECT(type, name, alg, fmt) \
-type name(bitstr, bitcnt, key, keylen) \
-unsigned char *bitstr; \
-unsigned long bitcnt; \
-unsigned char *key; \
-unsigned int keylen; \
-{ \
- return((type) hmaccomp(alg, fmt, bitstr, bitcnt, \
- key, keylen)); \
-}
-
-HMAC_DIRECT(unsigned char *, hmac1digest, SHA1, SHA_FMT_RAW)
-HMAC_DIRECT(char *, hmac1hex, SHA1, SHA_FMT_HEX)
-HMAC_DIRECT(char *, hmac1base64, SHA1, SHA_FMT_BASE64)
-
-HMAC_DIRECT(unsigned char *, hmac224digest, SHA224, SHA_FMT_RAW)
-HMAC_DIRECT(char *, hmac224hex, SHA224, SHA_FMT_HEX)
-HMAC_DIRECT(char *, hmac224base64, SHA224, SHA_FMT_BASE64)
-
-HMAC_DIRECT(unsigned char *, hmac256digest, SHA256, SHA_FMT_RAW)
-HMAC_DIRECT(char *, hmac256hex, SHA256, SHA_FMT_HEX)
-HMAC_DIRECT(char *, hmac256base64, SHA256, SHA_FMT_BASE64)
-
-HMAC_DIRECT(unsigned char *, hmac384digest, SHA384, SHA_FMT_RAW)
-HMAC_DIRECT(char *, hmac384hex, SHA384, SHA_FMT_HEX)
-HMAC_DIRECT(char *, hmac384base64, SHA384, SHA_FMT_BASE64)
-
-HMAC_DIRECT(unsigned char *, hmac512digest, SHA512, SHA_FMT_RAW)
-HMAC_DIRECT(char *, hmac512hex, SHA512, SHA_FMT_HEX)
-HMAC_DIRECT(char *, hmac512base64, SHA512, SHA_FMT_BASE64)
Deleted: vendor/perl/dist/cpan/Digest-SHA/src/shaxtra.c
===================================================================
--- vendor/perl/dist/cpan/Digest-SHA/src/shaxtra.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Digest-SHA/src/shaxtra.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,57 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include "sha.h"
-
-static unsigned char *shacomp(alg, fmt, bitstr, bitcnt)
-int alg;
-int fmt;
-unsigned char *bitstr;
-unsigned long bitcnt;
-{
- SHA *s;
- static unsigned char digest[SHA_MAX_HEX_LEN+1];
- unsigned char *ret = digest;
-
- if ((s = shaopen(alg)) == NULL)
- return(NULL);
- shawrite(bitstr, bitcnt, s);
- shafinish(s);
- if (fmt == SHA_FMT_RAW)
- memcpy(digest, shadigest(s), s->digestlen);
- else if (fmt == SHA_FMT_HEX)
- strcpy((char *) digest, shahex(s));
- else if (fmt == SHA_FMT_BASE64)
- strcpy((char *) digest, shabase64(s));
- else
- ret = NULL;
- shaclose(s);
- return(ret);
-}
-
-#define SHA_DIRECT(type, name, alg, fmt) \
-type name(bitstr, bitcnt) \
-unsigned char *bitstr; \
-unsigned long bitcnt; \
-{ \
- return((type) shacomp(alg, fmt, bitstr, bitcnt)); \
-}
-
-SHA_DIRECT(unsigned char *, sha1digest, SHA1, SHA_FMT_RAW)
-SHA_DIRECT(char *, sha1hex, SHA1, SHA_FMT_HEX)
-SHA_DIRECT(char *, sha1base64, SHA1, SHA_FMT_BASE64)
-
-SHA_DIRECT(unsigned char *, sha224digest, SHA224, SHA_FMT_RAW)
-SHA_DIRECT(char *, sha224hex, SHA224, SHA_FMT_HEX)
-SHA_DIRECT(char *, sha224base64, SHA224, SHA_FMT_BASE64)
-
-SHA_DIRECT(unsigned char *, sha256digest, SHA256, SHA_FMT_RAW)
-SHA_DIRECT(char *, sha256hex, SHA256, SHA_FMT_HEX)
-SHA_DIRECT(char *, sha256base64, SHA256, SHA_FMT_BASE64)
-
-SHA_DIRECT(unsigned char *, sha384digest, SHA384, SHA_FMT_RAW)
-SHA_DIRECT(char *, sha384hex, SHA384, SHA_FMT_HEX)
-SHA_DIRECT(char *, sha384base64, SHA384, SHA_FMT_BASE64)
-
-SHA_DIRECT(unsigned char *, sha512digest, SHA512, SHA_FMT_RAW)
-SHA_DIRECT(char *, sha512hex, SHA512, SHA_FMT_HEX)
-SHA_DIRECT(char *, sha512base64, SHA512, SHA_FMT_BASE64)
Deleted: vendor/perl/dist/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/YAML.pm
===================================================================
--- vendor/perl/dist/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/YAML.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/YAML.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,658 +0,0 @@
-package ExtUtils::MakeMaker::YAML;
-
-use strict;
-
-# UTF Support?
-sub HAVE_UTF8 () { $] >= 5.007003 }
-BEGIN {
- if ( HAVE_UTF8 ) {
- # The string eval helps hide this from Test::MinimumVersion
- eval "require utf8;";
- die "Failed to load UTF-8 support" if $@;
- }
-
- # Class structure
- require 5.004;
- require Exporter;
- require Carp;
- $ExtUtils::MakeMaker::YAML::VERSION = '1.44';
- @ExtUtils::MakeMaker::YAML::ISA = qw{ Exporter };
- @ExtUtils::MakeMaker::YAML::EXPORT = qw{ Load Dump };
- @ExtUtils::MakeMaker::YAML::EXPORT_OK = qw{ LoadFile DumpFile freeze thaw };
-
- # Error storage
- $ExtUtils::MakeMaker::YAML::errstr = '';
-}
-
-# The character class of all characters we need to escape
-# NOTE: Inlined, since it's only used once
-# my $RE_ESCAPE = '[\\x00-\\x08\\x0b-\\x0d\\x0e-\\x1f\"\n]';
-
-# Printed form of the unprintable characters in the lowest range
-# of ASCII characters, listed by ASCII ordinal position.
-my @UNPRINTABLE = qw(
- z x01 x02 x03 x04 x05 x06 a
- x08 t n v f r x0e x0f
- x10 x11 x12 x13 x14 x15 x16 x17
- x18 x19 x1a e x1c x1d x1e x1f
-);
-
-# Printable characters for escapes
-my %UNESCAPES = (
- z => "\x00", a => "\x07", t => "\x09",
- n => "\x0a", v => "\x0b", f => "\x0c",
- r => "\x0d", e => "\x1b", '\\' => '\\',
-);
-
-# Special magic boolean words
-my %QUOTE = map { $_ => 1 } qw{
- null Null NULL
- y Y yes Yes YES n N no No NO
- true True TRUE false False FALSE
- on On ON off Off OFF
-};
-
-
-
-
-
-#####################################################################
-# Implementation
-
-# Create an empty ExtUtils::MakeMaker::YAML object
-sub new {
- my $class = shift;
- bless [ @_ ], $class;
-}
-
-# Create an object from a file
-sub read {
- my $class = ref $_[0] ? ref shift : shift;
-
- # Check the file
- my $file = shift or return $class->_error( 'You did not specify a file name' );
- return $class->_error( "File '$file' does not exist" ) unless -e $file;
- return $class->_error( "'$file' is a directory, not a file" ) unless -f _;
- return $class->_error( "Insufficient permissions to read '$file'" ) unless -r _;
-
- # Slurp in the file
- local $/ = undef;
- local *CFG;
- unless ( open(CFG, $file) ) {
- return $class->_error("Failed to open file '$file': $!");
- }
- my $contents = <CFG>;
- unless ( close(CFG) ) {
- return $class->_error("Failed to close file '$file': $!");
- }
-
- $class->read_string( $contents );
-}
-
-# Create an object from a string
-sub read_string {
- my $class = ref $_[0] ? ref shift : shift;
- my $self = bless [], $class;
- my $string = $_[0];
- unless ( defined $string ) {
- return $self->_error("Did not provide a string to load");
- }
-
- # Byte order marks
- # NOTE: Keeping this here to educate maintainers
- # my %BOM = (
- # "\357\273\277" => 'UTF-8',
- # "\376\377" => 'UTF-16BE',
- # "\377\376" => 'UTF-16LE',
- # "\377\376\0\0" => 'UTF-32LE'
- # "\0\0\376\377" => 'UTF-32BE',
- # );
- if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
- return $self->_error("Stream has a non UTF-8 BOM");
- } else {
- # Strip UTF-8 bom if found, we'll just ignore it
- $string =~ s/^\357\273\277//;
- }
-
- # Try to decode as utf8
- utf8::decode($string) if HAVE_UTF8;
-
- # Check for some special cases
- return $self unless length $string;
- unless ( $string =~ /[\012\015]+\z/ ) {
- return $self->_error("Stream does not end with newline character");
- }
-
- # Split the file into lines
- my @lines = grep { ! /^\s*(?:\#.*)?\z/ }
- split /(?:\015{1,2}\012|\015|\012)/, $string;
-
- # Strip the initial YAML header
- @lines and $lines[0] =~ /^\%YAML[: ][\d\.]+.*\z/ and shift @lines;
-
- # A nibbling parser
- while ( @lines ) {
- # Do we have a document header?
- if ( $lines[0] =~ /^---\s*(?:(.+)\s*)?\z/ ) {
- # Handle scalar documents
- shift @lines;
- if ( defined $1 and $1 !~ /^(?:\#.+|\%YAML[: ][\d\.]+)\z/ ) {
- push @$self, $self->_read_scalar( "$1", [ undef ], \@lines );
- next;
- }
- }
-
- if ( ! @lines or $lines[0] =~ /^(?:---|\.\.\.)/ ) {
- # A naked document
- push @$self, undef;
- while ( @lines and $lines[0] !~ /^---/ ) {
- shift @lines;
- }
-
- } elsif ( $lines[0] =~ /^\s*\-/ ) {
- # An array at the root
- my $document = [ ];
- push @$self, $document;
- $self->_read_array( $document, [ 0 ], \@lines );
-
- } elsif ( $lines[0] =~ /^(\s*)\S/ ) {
- # A hash at the root
- my $document = { };
- push @$self, $document;
- $self->_read_hash( $document, [ length($1) ], \@lines );
-
- } else {
- Carp::croak("ExtUtils::MakeMaker::YAML failed to classify the line '$lines[0]'");
- }
- }
-
- $self;
-}
-
-# Deparse a scalar string to the actual scalar
-sub _read_scalar {
- my ($self, $string, $indent, $lines) = @_;
-
- # Trim trailing whitespace
- $string =~ s/\s*\z//;
-
- # Explitic null/undef
- return undef if $string eq '~';
-
- # Single quote
- if ( $string =~ /^\'(.*?)\'\z/ ) {
- return '' unless defined $1;
- $string = $1;
- $string =~ s/\'\'/\'/g;
- return $string;
- }
-
- # Double quote.
- # The commented out form is simpler, but overloaded the Perl regex
- # engine due to recursion and backtracking problems on strings
- # larger than 32,000ish characters. Keep it for reference purposes.
- # if ( $string =~ /^\"((?:\\.|[^\"])*)\"\z/ ) {
- if ( $string =~ /^\"([^\\"]*(?:\\.[^\\"]*)*)\"\z/ ) {
- # Reusing the variable is a little ugly,
- # but avoids a new variable and a string copy.
- $string = $1;
- $string =~ s/\\"/"/g;
- $string =~ s/\\([never\\fartz]|x([0-9a-fA-F]{2}))/(length($1)>1)?pack("H2",$2):$UNESCAPES{$1}/gex;
- return $string;
- }
-
- # Special cases
- if ( $string =~ /^[\'\"!&]/ ) {
- Carp::croak("ExtUtils::MakeMaker::YAML does not support a feature in line '$lines->[0]'");
- }
- return {} if $string eq '{}';
- return [] if $string eq '[]';
-
- # Regular unquoted string
- return $string unless $string =~ /^[>|]/;
-
- # Error
- Carp::croak("ExtUtils::MakeMaker::YAML failed to find multi-line scalar content") unless @$lines;
-
- # Check the indent depth
- $lines->[0] =~ /^(\s*)/;
- $indent->[-1] = length("$1");
- if ( defined $indent->[-2] and $indent->[-1] <= $indent->[-2] ) {
- Carp::croak("ExtUtils::MakeMaker::YAML found bad indenting in line '$lines->[0]'");
- }
-
- # Pull the lines
- my @multiline = ();
- while ( @$lines ) {
- $lines->[0] =~ /^(\s*)/;
- last unless length($1) >= $indent->[-1];
- push @multiline, substr(shift(@$lines), length($1));
- }
-
- my $j = (substr($string, 0, 1) eq '>') ? ' ' : "\n";
- my $t = (substr($string, 1, 1) eq '-') ? '' : "\n";
- return join( $j, @multiline ) . $t;
-}
-
-# Parse an array
-sub _read_array {
- my ($self, $array, $indent, $lines) = @_;
-
- while ( @$lines ) {
- # Check for a new document
- if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) {
- while ( @$lines and $lines->[0] !~ /^---/ ) {
- shift @$lines;
- }
- return 1;
- }
-
- # Check the indent level
- $lines->[0] =~ /^(\s*)/;
- if ( length($1) < $indent->[-1] ) {
- return 1;
- } elsif ( length($1) > $indent->[-1] ) {
- Carp::croak("ExtUtils::MakeMaker::YAML found bad indenting in line '$lines->[0]'");
- }
-
- if ( $lines->[0] =~ /^(\s*\-\s+)[^\'\"]\S*\s*:(?:\s+|$)/ ) {
- # Inline nested hash
- my $indent2 = length("$1");
- $lines->[0] =~ s/-/ /;
- push @$array, { };
- $self->_read_hash( $array->[-1], [ @$indent, $indent2 ], $lines );
-
- } elsif ( $lines->[0] =~ /^\s*\-(\s*)(.+?)\s*\z/ ) {
- # Array entry with a value
- shift @$lines;
- push @$array, $self->_read_scalar( "$2", [ @$indent, undef ], $lines );
-
- } elsif ( $lines->[0] =~ /^\s*\-\s*\z/ ) {
- shift @$lines;
- unless ( @$lines ) {
- push @$array, undef;
- return 1;
- }
- if ( $lines->[0] =~ /^(\s*)\-/ ) {
- my $indent2 = length("$1");
- if ( $indent->[-1] == $indent2 ) {
- # Null array entry
- push @$array, undef;
- } else {
- # Naked indenter
- push @$array, [ ];
- $self->_read_array( $array->[-1], [ @$indent, $indent2 ], $lines );
- }
-
- } elsif ( $lines->[0] =~ /^(\s*)\S/ ) {
- push @$array, { };
- $self->_read_hash( $array->[-1], [ @$indent, length("$1") ], $lines );
-
- } else {
- Carp::croak("ExtUtils::MakeMaker::YAML failed to classify line '$lines->[0]'");
- }
-
- } elsif ( defined $indent->[-2] and $indent->[-1] == $indent->[-2] ) {
- # This is probably a structure like the following...
- # ---
- # foo:
- # - list
- # bar: value
- #
- # ... so lets return and let the hash parser handle it
- return 1;
-
- } else {
- Carp::croak("ExtUtils::MakeMaker::YAML failed to classify line '$lines->[0]'");
- }
- }
-
- return 1;
-}
-
-# Parse an array
-sub _read_hash {
- my ($self, $hash, $indent, $lines) = @_;
-
- while ( @$lines ) {
- # Check for a new document
- if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) {
- while ( @$lines and $lines->[0] !~ /^---/ ) {
- shift @$lines;
- }
- return 1;
- }
-
- # Check the indent level
- $lines->[0] =~ /^(\s*)/;
- if ( length($1) < $indent->[-1] ) {
- return 1;
- } elsif ( length($1) > $indent->[-1] ) {
- Carp::croak("ExtUtils::MakeMaker::YAML found bad indenting in line '$lines->[0]'");
- }
-
- # Get the key
- unless ( $lines->[0] =~ s/^\s*([^\'\" ][^\n]*?)\s*:(\s+|$)// ) {
- if ( $lines->[0] =~ /^\s*[?\'\"]/ ) {
- Carp::croak("ExtUtils::MakeMaker::YAML does not support a feature in line '$lines->[0]'");
- }
- Carp::croak("ExtUtils::MakeMaker::YAML failed to classify line '$lines->[0]'");
- }
- my $key = $1;
-
- # Do we have a value?
- if ( length $lines->[0] ) {
- # Yes
- $hash->{$key} = $self->_read_scalar( shift(@$lines), [ @$indent, undef ], $lines );
- } else {
- # An indent
- shift @$lines;
- unless ( @$lines ) {
- $hash->{$key} = undef;
- return 1;
- }
- if ( $lines->[0] =~ /^(\s*)-/ ) {
- $hash->{$key} = [];
- $self->_read_array( $hash->{$key}, [ @$indent, length($1) ], $lines );
- } elsif ( $lines->[0] =~ /^(\s*)./ ) {
- my $indent2 = length("$1");
- if ( $indent->[-1] >= $indent2 ) {
- # Null hash entry
- $hash->{$key} = undef;
- } else {
- $hash->{$key} = {};
- $self->_read_hash( $hash->{$key}, [ @$indent, length($1) ], $lines );
- }
- }
- }
- }
-
- return 1;
-}
-
-# Save an object to a file
-sub write {
- my $self = shift;
- my $file = shift or return $self->_error('No file name provided');
-
- # Write it to the file
- open( CFG, '>' . $file ) or return $self->_error(
- "Failed to open file '$file' for writing: $!"
- );
- print CFG $self->write_string;
- close CFG;
-
- return 1;
-}
-
-# Save an object to a string
-sub write_string {
- my $self = shift;
- return '' unless @$self;
-
- # Iterate over the documents
- my $indent = 0;
- my @lines = ();
- foreach my $cursor ( @$self ) {
- push @lines, '---';
-
- # An empty document
- if ( ! defined $cursor ) {
- # Do nothing
-
- # A scalar document
- } elsif ( ! ref $cursor ) {
- $lines[-1] .= ' ' . $self->_write_scalar( $cursor, $indent );
-
- # version object
- } elsif ( ref $cursor eq 'version' ) {
- $lines[-1] .= ' ' . $self->_write_scalar( $cursor->stringify, $indent );
-
- # A list at the root
- } elsif ( ref $cursor eq 'ARRAY' ) {
- unless ( @$cursor ) {
- $lines[-1] .= ' []';
- next;
- }
- push @lines, $self->_write_array( $cursor, $indent, {} );
-
- # A hash at the root
- } elsif ( ref $cursor eq 'HASH' ) {
- unless ( %$cursor ) {
- $lines[-1] .= ' {}';
- next;
- }
- push @lines, $self->_write_hash( $cursor, $indent, {} );
-
- } else {
- Carp::croak("Cannot serialize " . ref($cursor));
- }
- }
-
- join '', map { "$_\n" } @lines;
-}
-
-sub _write_scalar {
- my $string = $_[1];
- return '~' unless defined $string;
- return "''" unless length $string;
- if ( $string =~ /[\x00-\x08\x0b-\x0d\x0e-\x1f\"\'\n]/ ) {
- $string =~ s/\\/\\\\/g;
- $string =~ s/"/\\"/g;
- $string =~ s/\n/\\n/g;
- $string =~ s/([\x00-\x1f])/\\$UNPRINTABLE[ord($1)]/g;
- return qq|"$string"|;
- }
- if ( $string =~ /(?:^\W|\s)/ or $QUOTE{$string} ) {
- return "'$string'";
- }
- return $string;
-}
-
-sub _write_array {
- my ($self, $array, $indent, $seen) = @_;
- if ( $seen->{refaddr($array)}++ ) {
- die "ExtUtils::MakeMaker::YAML does not support circular references";
- }
- my @lines = ();
- foreach my $el ( @$array ) {
- my $line = (' ' x $indent) . '-';
- my $type = ref $el;
- if ( ! $type ) {
- $line .= ' ' . $self->_write_scalar( $el, $indent + 1 );
- push @lines, $line;
-
- # version object
- } elsif ( $type eq 'version' ) {
- $line .= ' ' . $self->_write_scalar( $el->stringify, $indent + 1 );
- push @lines, $line;
-
- } elsif ( $type eq 'ARRAY' ) {
- if ( @$el ) {
- push @lines, $line;
- push @lines, $self->_write_array( $el, $indent + 1, $seen );
- } else {
- $line .= ' []';
- push @lines, $line;
- }
-
- } elsif ( $type eq 'HASH' ) {
- if ( keys %$el ) {
- push @lines, $line;
- push @lines, $self->_write_hash( $el, $indent + 1, $seen );
- } else {
- $line .= ' {}';
- push @lines, $line;
- }
-
- } else {
- die "ExtUtils::MakeMaker::YAML does not support $type references";
- }
- }
-
- @lines;
-}
-
-sub _write_hash {
- my ($self, $hash, $indent, $seen) = @_;
- if ( $seen->{refaddr($hash)}++ ) {
- die "ExtUtils::MakeMaker::YAML does not support circular references";
- }
- my @lines = ();
- foreach my $name ( sort keys %$hash ) {
- my $el = $hash->{$name};
- my $line = (' ' x $indent) . "$name:";
- my $type = ref $el;
- if ( ! $type ) {
- $line .= ' ' . $self->_write_scalar( $el, $indent + 1 );
- push @lines, $line;
-
- # version object
- } elsif ( $type eq 'version' ) {
- $line .= ' ' . $self->_write_scalar( $el->stringify, $indent + 1 );
- push @lines, $line;
-
- } elsif ( $type eq 'ARRAY' ) {
- if ( @$el ) {
- push @lines, $line;
- push @lines, $self->_write_array( $el, $indent + 1, $seen );
- } else {
- $line .= ' []';
- push @lines, $line;
- }
-
- } elsif ( $type eq 'HASH' ) {
- if ( keys %$el ) {
- push @lines, $line;
- push @lines, $self->_write_hash( $el, $indent + 1, $seen );
- } else {
- $line .= ' {}';
- push @lines, $line;
- }
-
- } else {
- die "ExtUtils::MakeMaker::YAML does not support $type references";
- }
- }
-
- @lines;
-}
-
-# Set error
-sub _error {
- $ExtUtils::MakeMaker::YAML::errstr = $_[1];
- undef;
-}
-
-# Retrieve error
-sub errstr {
- $ExtUtils::MakeMaker::YAML::errstr;
-}
-
-
-
-
-
-#####################################################################
-# YAML Compatibility
-
-sub Dump {
- ExtUtils::MakeMaker::YAML->new(@_)->write_string;
-}
-
-sub Load {
- my $self = ExtUtils::MakeMaker::YAML->read_string(@_);
- unless ( $self ) {
- Carp::croak("Failed to load YAML document from string");
- }
- if ( wantarray ) {
- return @$self;
- } else {
- # To match YAML.pm, return the last document
- return $self->[-1];
- }
-}
-
-BEGIN {
- *freeze = *Dump;
- *thaw = *Load;
-}
-
-sub DumpFile {
- my $file = shift;
- ExtUtils::MakeMaker::YAML->new(@_)->write($file);
-}
-
-sub LoadFile {
- my $self = ExtUtils::MakeMaker::YAML->read($_[0]);
- unless ( $self ) {
- Carp::croak("Failed to load YAML document from '" . ($_[0] || '') . "'");
- }
- if ( wantarray ) {
- return @$self;
- } else {
- # Return only the last document to match YAML.pm,
- return $self->[-1];
- }
-}
-
-
-
-
-
-#####################################################################
-# Use Scalar::Util if possible, otherwise emulate it
-
-BEGIN {
- eval {
- require Scalar::Util;
- *refaddr = *Scalar::Util::refaddr;
- };
- eval <<'END_PERL' if $@;
-# Failed to load Scalar::Util
-sub refaddr {
- my $pkg = ref($_[0]) or return undef;
- if (!!UNIVERSAL::can($_[0], 'can')) {
- bless $_[0], 'Scalar::Util::Fake';
- } else {
- $pkg = undef;
- }
- "$_[0]" =~ /0x(\w+)/;
- my $i = do { local $^W; hex $1 };
- bless $_[0], $pkg if defined $pkg;
- $i;
-}
-END_PERL
-
-}
-
-1;
-
-__END__
-
-=pod
-
-=head1 NAME
-
-ExtUtils::MakeMaker::YAML - clone of YAML::Tiny
-
-=head1 SYNOPSIS
-
-See L<YAML::Tiny>
-
-=head1 AUTHOR
-
-Adam Kennedy E<lt>adamk at cpan.orgE<gt>
-
-=head1 SEE ALSO
-
-L<YAML>, L<YAML::Syck>
-
-=head1 COPYRIGHT
-
-Copyright 2006 - 2010 Adam Kennedy.
-
-This program is free software; you can redistribute
-it and/or modify it under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/cpan/File-Temp/Temp.pm
===================================================================
--- vendor/perl/dist/cpan/File-Temp/Temp.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/File-Temp/Temp.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,2452 +0,0 @@
-package File::Temp;
-
-=head1 NAME
-
-File::Temp - return name and handle of a temporary file safely
-
-=begin __INTERNALS
-
-=head1 PORTABILITY
-
-This section is at the top in order to provide easier access to
-porters. It is not expected to be rendered by a standard pod
-formatting tool. Please skip straight to the SYNOPSIS section if you
-are not trying to port this module to a new platform.
-
-This module is designed to be portable across operating systems and it
-currently supports Unix, VMS, DOS, OS/2, Windows and Mac OS
-(Classic). When porting to a new OS there are generally three main
-issues that have to be solved:
-
-=over 4
-
-=item *
-
-Can the OS unlink an open file? If it can not then the
-C<_can_unlink_opened_file> method should be modified.
-
-=item *
-
-Are the return values from C<stat> reliable? By default all the
-return values from C<stat> are compared when unlinking a temporary
-file using the filename and the handle. Operating systems other than
-unix do not always have valid entries in all fields. If C<unlink0> fails
-then the C<stat> comparison should be modified accordingly.
-
-=item *
-
-Security. Systems that can not support a test for the sticky bit
-on a directory can not use the MEDIUM and HIGH security tests.
-The C<_can_do_level> method should be modified accordingly.
-
-=back
-
-=end __INTERNALS
-
-=head1 SYNOPSIS
-
- use File::Temp qw/ tempfile tempdir /;
-
- $fh = tempfile();
- ($fh, $filename) = tempfile();
-
- ($fh, $filename) = tempfile( $template, DIR => $dir);
- ($fh, $filename) = tempfile( $template, SUFFIX => '.dat');
- ($fh, $filename) = tempfile( $template, TMPDIR => 1 );
-
- binmode( $fh, ":utf8" );
-
- $dir = tempdir( CLEANUP => 1 );
- ($fh, $filename) = tempfile( DIR => $dir );
-
-Object interface:
-
- require File::Temp;
- use File::Temp ();
- use File::Temp qw/ :seekable /;
-
- $fh = File::Temp->new();
- $fname = $fh->filename;
-
- $fh = File::Temp->new(TEMPLATE => $template);
- $fname = $fh->filename;
-
- $tmp = File::Temp->new( UNLINK => 0, SUFFIX => '.dat' );
- print $tmp "Some data\n";
- print "Filename is $tmp\n";
- $tmp->seek( 0, SEEK_END );
-
-The following interfaces are provided for compatibility with
-existing APIs. They should not be used in new code.
-
-MkTemp family:
-
- use File::Temp qw/ :mktemp /;
-
- ($fh, $file) = mkstemp( "tmpfileXXXXX" );
- ($fh, $file) = mkstemps( "tmpfileXXXXXX", $suffix);
-
- $tmpdir = mkdtemp( $template );
-
- $unopened_file = mktemp( $template );
-
-POSIX functions:
-
- use File::Temp qw/ :POSIX /;
-
- $file = tmpnam();
- $fh = tmpfile();
-
- ($fh, $file) = tmpnam();
-
-Compatibility functions:
-
- $unopened_file = File::Temp::tempnam( $dir, $pfx );
-
-=head1 DESCRIPTION
-
-C<File::Temp> can be used to create and open temporary files in a safe
-way. There is both a function interface and an object-oriented
-interface. The File::Temp constructor or the tempfile() function can
-be used to return the name and the open filehandle of a temporary
-file. The tempdir() function can be used to create a temporary
-directory.
-
-The security aspect of temporary file creation is emphasized such that
-a filehandle and filename are returned together. This helps guarantee
-that a race condition can not occur where the temporary file is
-created by another process between checking for the existence of the
-file and its opening. Additional security levels are provided to
-check, for example, that the sticky bit is set on world writable
-directories. See L<"safe_level"> for more information.
-
-For compatibility with popular C library functions, Perl implementations of
-the mkstemp() family of functions are provided. These are, mkstemp(),
-mkstemps(), mkdtemp() and mktemp().
-
-Additionally, implementations of the standard L<POSIX|POSIX>
-tmpnam() and tmpfile() functions are provided if required.
-
-Implementations of mktemp(), tmpnam(), and tempnam() are provided,
-but should be used with caution since they return only a filename
-that was valid when function was called, so cannot guarantee
-that the file will not exist by the time the caller opens the filename.
-
-Filehandles returned by these functions support the seekable methods.
-
-=cut
-
-# 5.6.0 gives us S_IWOTH, S_IWGRP, our and auto-vivifying filehandls
-# People would like a version on 5.004 so give them what they want :-)
-use 5.004;
-use strict;
-use Carp;
-use File::Spec 0.8;
-use File::Path qw/ rmtree /;
-use Fcntl 1.03;
-use IO::Seekable; # For SEEK_*
-use Errno;
-require VMS::Stdio if $^O eq 'VMS';
-
-# pre-emptively load Carp::Heavy. If we don't when we run out of file
-# handles and attempt to call croak() we get an error message telling
-# us that Carp::Heavy won't load rather than an error telling us we
-# have run out of file handles. We either preload croak() or we
-# switch the calls to croak from _gettemp() to use die.
-eval { require Carp::Heavy; };
-
-# Need the Symbol package if we are running older perl
-require Symbol if $] < 5.006;
-
-### For the OO interface
-use base qw/ IO::Handle IO::Seekable /;
-use overload '""' => "STRINGIFY", fallback => 1;
-
-# use 'our' on v5.6.0
-use vars qw($VERSION @EXPORT_OK %EXPORT_TAGS $DEBUG $KEEP_ALL);
-
-$DEBUG = 0;
-$KEEP_ALL = 0;
-
-# We are exporting functions
-
-use base qw/Exporter/;
-
-# Export list - to allow fine tuning of export table
-
- at EXPORT_OK = qw{
- tempfile
- tempdir
- tmpnam
- tmpfile
- mktemp
- mkstemp
- mkstemps
- mkdtemp
- unlink0
- cleanup
- SEEK_SET
- SEEK_CUR
- SEEK_END
- };
-
-# Groups of functions for export
-
-%EXPORT_TAGS = (
- 'POSIX' => [qw/ tmpnam tmpfile /],
- 'mktemp' => [qw/ mktemp mkstemp mkstemps mkdtemp/],
- 'seekable' => [qw/ SEEK_SET SEEK_CUR SEEK_END /],
- );
-
-# add contents of these tags to @EXPORT
-Exporter::export_tags('POSIX','mktemp','seekable');
-
-# Version number
-
-$VERSION = '0.22';
-
-# This is a list of characters that can be used in random filenames
-
-my @CHARS = (qw/ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
- a b c d e f g h i j k l m n o p q r s t u v w x y z
- 0 1 2 3 4 5 6 7 8 9 _
- /);
-
-# Maximum number of tries to make a temp file before failing
-
-use constant MAX_TRIES => 1000;
-
-# Minimum number of X characters that should be in a template
-use constant MINX => 4;
-
-# Default template when no template supplied
-
-use constant TEMPXXX => 'X' x 10;
-
-# Constants for the security level
-
-use constant STANDARD => 0;
-use constant MEDIUM => 1;
-use constant HIGH => 2;
-
-# OPENFLAGS. If we defined the flag to use with Sysopen here this gives
-# us an optimisation when many temporary files are requested
-
-my $OPENFLAGS = O_CREAT | O_EXCL | O_RDWR;
-my $LOCKFLAG;
-
-unless ($^O eq 'MacOS') {
- for my $oflag (qw/ NOFOLLOW BINARY LARGEFILE NOINHERIT /) {
- my ($bit, $func) = (0, "Fcntl::O_" . $oflag);
- no strict 'refs';
- $OPENFLAGS |= $bit if eval {
- # Make sure that redefined die handlers do not cause problems
- # e.g. CGI::Carp
- local $SIG{__DIE__} = sub {};
- local $SIG{__WARN__} = sub {};
- $bit = &$func();
- 1;
- };
- }
- # Special case O_EXLOCK
- $LOCKFLAG = eval {
- local $SIG{__DIE__} = sub {};
- local $SIG{__WARN__} = sub {};
- &Fcntl::O_EXLOCK();
- };
-}
-
-# On some systems the O_TEMPORARY flag can be used to tell the OS
-# to automatically remove the file when it is closed. This is fine
-# in most cases but not if tempfile is called with UNLINK=>0 and
-# the filename is requested -- in the case where the filename is to
-# be passed to another routine. This happens on windows. We overcome
-# this by using a second open flags variable
-
-my $OPENTEMPFLAGS = $OPENFLAGS;
-unless ($^O eq 'MacOS') {
- for my $oflag (qw/ TEMPORARY /) {
- my ($bit, $func) = (0, "Fcntl::O_" . $oflag);
- local($@);
- no strict 'refs';
- $OPENTEMPFLAGS |= $bit if eval {
- # Make sure that redefined die handlers do not cause problems
- # e.g. CGI::Carp
- local $SIG{__DIE__} = sub {};
- local $SIG{__WARN__} = sub {};
- $bit = &$func();
- 1;
- };
- }
-}
-
-# Private hash tracking which files have been created by each process id via the OO interface
-my %FILES_CREATED_BY_OBJECT;
-
-# INTERNAL ROUTINES - not to be used outside of package
-
-# Generic routine for getting a temporary filename
-# modelled on OpenBSD _gettemp() in mktemp.c
-
-# The template must contain X's that are to be replaced
-# with the random values
-
-# Arguments:
-
-# TEMPLATE - string containing the XXXXX's that is converted
-# to a random filename and opened if required
-
-# Optionally, a hash can also be supplied containing specific options
-# "open" => if true open the temp file, else just return the name
-# default is 0
-# "mkdir"=> if true, we are creating a temp directory rather than tempfile
-# default is 0
-# "suffixlen" => number of characters at end of PATH to be ignored.
-# default is 0.
-# "unlink_on_close" => indicates that, if possible, the OS should remove
-# the file as soon as it is closed. Usually indicates
-# use of the O_TEMPORARY flag to sysopen.
-# Usually irrelevant on unix
-# "use_exlock" => Indicates that O_EXLOCK should be used. Default is true.
-
-# Optionally a reference to a scalar can be passed into the function
-# On error this will be used to store the reason for the error
-# "ErrStr" => \$errstr
-
-# "open" and "mkdir" can not both be true
-# "unlink_on_close" is not used when "mkdir" is true.
-
-# The default options are equivalent to mktemp().
-
-# Returns:
-# filehandle - open file handle (if called with doopen=1, else undef)
-# temp name - name of the temp file or directory
-
-# For example:
-# ($fh, $name) = _gettemp($template, "open" => 1);
-
-# for the current version, failures are associated with
-# stored in an error string and returned to give the reason whilst debugging
-# This routine is not called by any external function
-sub _gettemp {
-
- croak 'Usage: ($fh, $name) = _gettemp($template, OPTIONS);'
- unless scalar(@_) >= 1;
-
- # the internal error string - expect it to be overridden
- # Need this in case the caller decides not to supply us a value
- # need an anonymous scalar
- my $tempErrStr;
-
- # Default options
- my %options = (
- "open" => 0,
- "mkdir" => 0,
- "suffixlen" => 0,
- "unlink_on_close" => 0,
- "use_exlock" => 1,
- "ErrStr" => \$tempErrStr,
- );
-
- # Read the template
- my $template = shift;
- if (ref($template)) {
- # Use a warning here since we have not yet merged ErrStr
- carp "File::Temp::_gettemp: template must not be a reference";
- return ();
- }
-
- # Check that the number of entries on stack are even
- if (scalar(@_) % 2 != 0) {
- # Use a warning here since we have not yet merged ErrStr
- carp "File::Temp::_gettemp: Must have even number of options";
- return ();
- }
-
- # Read the options and merge with defaults
- %options = (%options, @_) if @_;
-
- # Make sure the error string is set to undef
- ${$options{ErrStr}} = undef;
-
- # Can not open the file and make a directory in a single call
- if ($options{"open"} && $options{"mkdir"}) {
- ${$options{ErrStr}} = "doopen and domkdir can not both be true\n";
- return ();
- }
-
- # Find the start of the end of the Xs (position of last X)
- # Substr starts from 0
- my $start = length($template) - 1 - $options{"suffixlen"};
-
- # Check that we have at least MINX x X (e.g. 'XXXX") at the end of the string
- # (taking suffixlen into account). Any fewer is insecure.
-
- # Do it using substr - no reason to use a pattern match since
- # we know where we are looking and what we are looking for
-
- if (substr($template, $start - MINX + 1, MINX) ne 'X' x MINX) {
- ${$options{ErrStr}} = "The template must end with at least ".
- MINX . " 'X' characters\n";
- return ();
- }
-
- # Replace all the X at the end of the substring with a
- # random character or just all the XX at the end of a full string.
- # Do it as an if, since the suffix adjusts which section to replace
- # and suffixlen=0 returns nothing if used in the substr directly
- # and generate a full path from the template
-
- my $path = _replace_XX($template, $options{"suffixlen"});
-
-
- # Split the path into constituent parts - eventually we need to check
- # whether the directory exists
- # We need to know whether we are making a temp directory
- # or a tempfile
-
- my ($volume, $directories, $file);
- my $parent; # parent directory
- if ($options{"mkdir"}) {
- # There is no filename at the end
- ($volume, $directories, $file) = File::Spec->splitpath( $path, 1);
-
- # The parent is then $directories without the last directory
- # Split the directory and put it back together again
- my @dirs = File::Spec->splitdir($directories);
-
- # If @dirs only has one entry (i.e. the directory template) that means
- # we are in the current directory
- if ($#dirs == 0) {
- $parent = File::Spec->curdir;
- } else {
-
- if ($^O eq 'VMS') { # need volume to avoid relative dir spec
- $parent = File::Spec->catdir($volume, @dirs[0..$#dirs-1]);
- $parent = 'sys$disk:[]' if $parent eq '';
- } else {
-
- # Put it back together without the last one
- $parent = File::Spec->catdir(@dirs[0..$#dirs-1]);
-
- # ...and attach the volume (no filename)
- $parent = File::Spec->catpath($volume, $parent, '');
- }
-
- }
-
- } else {
-
- # Get rid of the last filename (use File::Basename for this?)
- ($volume, $directories, $file) = File::Spec->splitpath( $path );
-
- # Join up without the file part
- $parent = File::Spec->catpath($volume,$directories,'');
-
- # If $parent is empty replace with curdir
- $parent = File::Spec->curdir
- unless $directories ne '';
-
- }
-
- # Check that the parent directories exist
- # Do this even for the case where we are simply returning a name
- # not a file -- no point returning a name that includes a directory
- # that does not exist or is not writable
-
- unless (-e $parent) {
- ${$options{ErrStr}} = "Parent directory ($parent) does not exist";
- return ();
- }
- unless (-d $parent) {
- ${$options{ErrStr}} = "Parent directory ($parent) is not a directory";
- return ();
- }
-
- # Check the stickiness of the directory and chown giveaway if required
- # If the directory is world writable the sticky bit
- # must be set
-
- if (File::Temp->safe_level == MEDIUM) {
- my $safeerr;
- unless (_is_safe($parent,\$safeerr)) {
- ${$options{ErrStr}} = "Parent directory ($parent) is not safe ($safeerr)";
- return ();
- }
- } elsif (File::Temp->safe_level == HIGH) {
- my $safeerr;
- unless (_is_verysafe($parent, \$safeerr)) {
- ${$options{ErrStr}} = "Parent directory ($parent) is not safe ($safeerr)";
- return ();
- }
- }
-
-
- # Now try MAX_TRIES time to open the file
- for (my $i = 0; $i < MAX_TRIES; $i++) {
-
- # Try to open the file if requested
- if ($options{"open"}) {
- my $fh;
-
- # If we are running before perl5.6.0 we can not auto-vivify
- if ($] < 5.006) {
- $fh = &Symbol::gensym;
- }
-
- # Try to make sure this will be marked close-on-exec
- # XXX: Win32 doesn't respect this, nor the proper fcntl,
- # but may have O_NOINHERIT. This may or may not be in Fcntl.
- local $^F = 2;
-
- # Attempt to open the file
- my $open_success = undef;
- if ( $^O eq 'VMS' and $options{"unlink_on_close"} && !$KEEP_ALL) {
- # make it auto delete on close by setting FAB$V_DLT bit
- $fh = VMS::Stdio::vmssysopen($path, $OPENFLAGS, 0600, 'fop=dlt');
- $open_success = $fh;
- } else {
- my $flags = ( ($options{"unlink_on_close"} && !$KEEP_ALL) ?
- $OPENTEMPFLAGS :
- $OPENFLAGS );
- $flags |= $LOCKFLAG if (defined $LOCKFLAG && $options{use_exlock});
- $open_success = sysopen($fh, $path, $flags, 0600);
- }
- if ( $open_success ) {
-
- # in case of odd umask force rw
- chmod(0600, $path);
-
- # Opened successfully - return file handle and name
- return ($fh, $path);
-
- } else {
-
- # Error opening file - abort with error
- # if the reason was anything but EEXIST
- unless ($!{EEXIST}) {
- ${$options{ErrStr}} = "Could not create temp file $path: $!";
- return ();
- }
-
- # Loop round for another try
-
- }
- } elsif ($options{"mkdir"}) {
-
- # Open the temp directory
- if (mkdir( $path, 0700)) {
- # in case of odd umask
- chmod(0700, $path);
-
- return undef, $path;
- } else {
-
- # Abort with error if the reason for failure was anything
- # except EEXIST
- unless ($!{EEXIST}) {
- ${$options{ErrStr}} = "Could not create directory $path: $!";
- return ();
- }
-
- # Loop round for another try
-
- }
-
- } else {
-
- # Return true if the file can not be found
- # Directory has been checked previously
-
- return (undef, $path) unless -e $path;
-
- # Try again until MAX_TRIES
-
- }
-
- # Did not successfully open the tempfile/dir
- # so try again with a different set of random letters
- # No point in trying to increment unless we have only
- # 1 X say and the randomness could come up with the same
- # file MAX_TRIES in a row.
-
- # Store current attempt - in principal this implies that the
- # 3rd time around the open attempt that the first temp file
- # name could be generated again. Probably should store each
- # attempt and make sure that none are repeated
-
- my $original = $path;
- my $counter = 0; # Stop infinite loop
- my $MAX_GUESS = 50;
-
- do {
-
- # Generate new name from original template
- $path = _replace_XX($template, $options{"suffixlen"});
-
- $counter++;
-
- } until ($path ne $original || $counter > $MAX_GUESS);
-
- # Check for out of control looping
- if ($counter > $MAX_GUESS) {
- ${$options{ErrStr}} = "Tried to get a new temp name different to the previous value $MAX_GUESS times.\nSomething wrong with template?? ($template)";
- return ();
- }
-
- }
-
- # If we get here, we have run out of tries
- ${ $options{ErrStr} } = "Have exceeded the maximum number of attempts ("
- . MAX_TRIES . ") to open temp file/dir";
-
- return ();
-
-}
-
-# Internal routine to replace the XXXX... with random characters
-# This has to be done by _gettemp() every time it fails to
-# open a temp file/dir
-
-# Arguments: $template (the template with XXX),
-# $ignore (number of characters at end to ignore)
-
-# Returns: modified template
-
-sub _replace_XX {
-
- croak 'Usage: _replace_XX($template, $ignore)'
- unless scalar(@_) == 2;
-
- my ($path, $ignore) = @_;
-
- # Do it as an if, since the suffix adjusts which section to replace
- # and suffixlen=0 returns nothing if used in the substr directly
- # Alternatively, could simply set $ignore to length($path)-1
- # Don't want to always use substr when not required though.
- my $end = ( $] >= 5.006 ? "\\z" : "\\Z" );
-
- if ($ignore) {
- substr($path, 0, - $ignore) =~ s/X(?=X*$end)/$CHARS[ int( rand( @CHARS ) ) ]/ge;
- } else {
- $path =~ s/X(?=X*$end)/$CHARS[ int( rand( @CHARS ) ) ]/ge;
- }
- return $path;
-}
-
-# Internal routine to force a temp file to be writable after
-# it is created so that we can unlink it. Windows seems to occassionally
-# force a file to be readonly when written to certain temp locations
-sub _force_writable {
- my $file = shift;
- chmod 0600, $file;
-}
-
-
-# internal routine to check to see if the directory is safe
-# First checks to see if the directory is not owned by the
-# current user or root. Then checks to see if anyone else
-# can write to the directory and if so, checks to see if
-# it has the sticky bit set
-
-# Will not work on systems that do not support sticky bit
-
-#Args: directory path to check
-# Optionally: reference to scalar to contain error message
-# Returns true if the path is safe and false otherwise.
-# Returns undef if can not even run stat() on the path
-
-# This routine based on version written by Tom Christiansen
-
-# Presumably, by the time we actually attempt to create the
-# file or directory in this directory, it may not be safe
-# anymore... Have to run _is_safe directly after the open.
-
-sub _is_safe {
-
- my $path = shift;
- my $err_ref = shift;
-
- # Stat path
- my @info = stat($path);
- unless (scalar(@info)) {
- $$err_ref = "stat(path) returned no values";
- return 0;
- }
- ;
- return 1 if $^O eq 'VMS'; # owner delete control at file level
-
- # Check to see whether owner is neither superuser (or a system uid) nor me
- # Use the effective uid from the $> variable
- # UID is in [4]
- if ($info[4] > File::Temp->top_system_uid() && $info[4] != $>) {
-
- Carp::cluck(sprintf "uid=$info[4] topuid=%s euid=$> path='$path'",
- File::Temp->top_system_uid());
-
- $$err_ref = "Directory owned neither by root nor the current user"
- if ref($err_ref);
- return 0;
- }
-
- # check whether group or other can write file
- # use 066 to detect either reading or writing
- # use 022 to check writability
- # Do it with S_IWOTH and S_IWGRP for portability (maybe)
- # mode is in info[2]
- if (($info[2] & &Fcntl::S_IWGRP) || # Is group writable?
- ($info[2] & &Fcntl::S_IWOTH) ) { # Is world writable?
- # Must be a directory
- unless (-d $path) {
- $$err_ref = "Path ($path) is not a directory"
- if ref($err_ref);
- return 0;
- }
- # Must have sticky bit set
- unless (-k $path) {
- $$err_ref = "Sticky bit not set on $path when dir is group|world writable"
- if ref($err_ref);
- return 0;
- }
- }
-
- return 1;
-}
-
-# Internal routine to check whether a directory is safe
-# for temp files. Safer than _is_safe since it checks for
-# the possibility of chown giveaway and if that is a possibility
-# checks each directory in the path to see if it is safe (with _is_safe)
-
-# If _PC_CHOWN_RESTRICTED is not set, does the full test of each
-# directory anyway.
-
-# Takes optional second arg as scalar ref to error reason
-
-sub _is_verysafe {
-
- # Need POSIX - but only want to bother if really necessary due to overhead
- require POSIX;
-
- my $path = shift;
- print "_is_verysafe testing $path\n" if $DEBUG;
- return 1 if $^O eq 'VMS'; # owner delete control at file level
-
- my $err_ref = shift;
-
- # Should Get the value of _PC_CHOWN_RESTRICTED if it is defined
- # and If it is not there do the extensive test
- local($@);
- my $chown_restricted;
- $chown_restricted = &POSIX::_PC_CHOWN_RESTRICTED()
- if eval { &POSIX::_PC_CHOWN_RESTRICTED(); 1};
-
- # If chown_resticted is set to some value we should test it
- if (defined $chown_restricted) {
-
- # Return if the current directory is safe
- return _is_safe($path,$err_ref) if POSIX::sysconf( $chown_restricted );
-
- }
-
- # To reach this point either, the _PC_CHOWN_RESTRICTED symbol
- # was not avialable or the symbol was there but chown giveaway
- # is allowed. Either way, we now have to test the entire tree for
- # safety.
-
- # Convert path to an absolute directory if required
- unless (File::Spec->file_name_is_absolute($path)) {
- $path = File::Spec->rel2abs($path);
- }
-
- # Split directory into components - assume no file
- my ($volume, $directories, undef) = File::Spec->splitpath( $path, 1);
-
- # Slightly less efficient than having a function in File::Spec
- # to chop off the end of a directory or even a function that
- # can handle ../ in a directory tree
- # Sometimes splitdir() returns a blank at the end
- # so we will probably check the bottom directory twice in some cases
- my @dirs = File::Spec->splitdir($directories);
-
- # Concatenate one less directory each time around
- foreach my $pos (0.. $#dirs) {
- # Get a directory name
- my $dir = File::Spec->catpath($volume,
- File::Spec->catdir(@dirs[0.. $#dirs - $pos]),
- ''
- );
-
- print "TESTING DIR $dir\n" if $DEBUG;
-
- # Check the directory
- return 0 unless _is_safe($dir,$err_ref);
-
- }
-
- return 1;
-}
-
-
-
-# internal routine to determine whether unlink works on this
-# platform for files that are currently open.
-# Returns true if we can, false otherwise.
-
-# Currently WinNT, OS/2 and VMS can not unlink an opened file
-# On VMS this is because the O_EXCL flag is used to open the
-# temporary file. Currently I do not know enough about the issues
-# on VMS to decide whether O_EXCL is a requirement.
-
-sub _can_unlink_opened_file {
-
- if ($^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'VMS' || $^O eq 'dos' || $^O eq 'MacOS') {
- return 0;
- } else {
- return 1;
- }
-
-}
-
-# internal routine to decide which security levels are allowed
-# see safe_level() for more information on this
-
-# Controls whether the supplied security level is allowed
-
-# $cando = _can_do_level( $level )
-
-sub _can_do_level {
-
- # Get security level
- my $level = shift;
-
- # Always have to be able to do STANDARD
- return 1 if $level == STANDARD;
-
- # Currently, the systems that can do HIGH or MEDIUM are identical
- if ( $^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'cygwin' || $^O eq 'dos' || $^O eq 'MacOS' || $^O eq 'mpeix') {
- return 0;
- } else {
- return 1;
- }
-
-}
-
-# This routine sets up a deferred unlinking of a specified
-# filename and filehandle. It is used in the following cases:
-# - Called by unlink0 if an opened file can not be unlinked
-# - Called by tempfile() if files are to be removed on shutdown
-# - Called by tempdir() if directories are to be removed on shutdown
-
-# Arguments:
-# _deferred_unlink( $fh, $fname, $isdir );
-#
-# - filehandle (so that it can be expclicitly closed if open
-# - filename (the thing we want to remove)
-# - isdir (flag to indicate that we are being given a directory)
-# [and hence no filehandle]
-
-# Status is not referred to since all the magic is done with an END block
-
-{
- # Will set up two lexical variables to contain all the files to be
- # removed. One array for files, another for directories They will
- # only exist in this block.
-
- # This means we only have to set up a single END block to remove
- # all files.
-
- # in order to prevent child processes inadvertently deleting the parent
- # temp files we use a hash to store the temp files and directories
- # created by a particular process id.
-
- # %files_to_unlink contains values that are references to an array of
- # array references containing the filehandle and filename associated with
- # the temp file.
- my (%files_to_unlink, %dirs_to_unlink);
-
- # Set up an end block to use these arrays
- END {
- local($., $@, $!, $^E, $?);
- cleanup();
- }
-
- # Cleanup function. Always triggered on END but can be invoked
- # manually.
- sub cleanup {
- if (!$KEEP_ALL) {
- # Files
- my @files = (exists $files_to_unlink{$$} ?
- @{ $files_to_unlink{$$} } : () );
- foreach my $file (@files) {
- # close the filehandle without checking its state
- # in order to make real sure that this is closed
- # if its already closed then I dont care about the answer
- # probably a better way to do this
- close($file->[0]); # file handle is [0]
-
- if (-f $file->[1]) { # file name is [1]
- _force_writable( $file->[1] ); # for windows
- unlink $file->[1] or warn "Error removing ".$file->[1];
- }
- }
- # Dirs
- my @dirs = (exists $dirs_to_unlink{$$} ?
- @{ $dirs_to_unlink{$$} } : () );
- foreach my $dir (@dirs) {
- if (-d $dir) {
- # Some versions of rmtree will abort if you attempt to remove
- # the directory you are sitting in. We protect that and turn it
- # into a warning. We do this because this occurs during
- # cleanup and so can not be caught by the user.
- eval { rmtree($dir, $DEBUG, 0); };
- warn $@ if ($@ && $^W);
- }
- }
-
- # clear the arrays
- @{ $files_to_unlink{$$} } = ()
- if exists $files_to_unlink{$$};
- @{ $dirs_to_unlink{$$} } = ()
- if exists $dirs_to_unlink{$$};
- }
- }
-
-
- # This is the sub called to register a file for deferred unlinking
- # This could simply store the input parameters and defer everything
- # until the END block. For now we do a bit of checking at this
- # point in order to make sure that (1) we have a file/dir to delete
- # and (2) we have been called with the correct arguments.
- sub _deferred_unlink {
-
- croak 'Usage: _deferred_unlink($fh, $fname, $isdir)'
- unless scalar(@_) == 3;
-
- my ($fh, $fname, $isdir) = @_;
-
- warn "Setting up deferred removal of $fname\n"
- if $DEBUG;
-
- # If we have a directory, check that it is a directory
- if ($isdir) {
-
- if (-d $fname) {
-
- # Directory exists so store it
- # first on VMS turn []foo into [.foo] for rmtree
- $fname = VMS::Filespec::vmspath($fname) if $^O eq 'VMS';
- $dirs_to_unlink{$$} = []
- unless exists $dirs_to_unlink{$$};
- push (@{ $dirs_to_unlink{$$} }, $fname);
-
- } else {
- carp "Request to remove directory $fname could not be completed since it does not exist!\n" if $^W;
- }
-
- } else {
-
- if (-f $fname) {
-
- # file exists so store handle and name for later removal
- $files_to_unlink{$$} = []
- unless exists $files_to_unlink{$$};
- push(@{ $files_to_unlink{$$} }, [$fh, $fname]);
-
- } else {
- carp "Request to remove file $fname could not be completed since it is not there!\n" if $^W;
- }
-
- }
-
- }
-
-
-}
-
-=head1 OBJECT-ORIENTED INTERFACE
-
-This is the primary interface for interacting with
-C<File::Temp>. Using the OO interface a temporary file can be created
-when the object is constructed and the file can be removed when the
-object is no longer required.
-
-Note that there is no method to obtain the filehandle from the
-C<File::Temp> object. The object itself acts as a filehandle. Also,
-the object is configured such that it stringifies to the name of the
-temporary file, and can be compared to a filename directly. The object
-isa C<IO::Handle> and isa C<IO::Seekable> so all those methods are
-available.
-
-=over 4
-
-=item B<new>
-
-Create a temporary file object.
-
- my $tmp = File::Temp->new();
-
-by default the object is constructed as if C<tempfile>
-was called without options, but with the additional behaviour
-that the temporary file is removed by the object destructor
-if UNLINK is set to true (the default).
-
-Supported arguments are the same as for C<tempfile>: UNLINK
-(defaulting to true), DIR, EXLOCK and SUFFIX. Additionally, the filename
-template is specified using the TEMPLATE option. The OPEN option
-is not supported (the file is always opened).
-
- $tmp = File::Temp->new( TEMPLATE => 'tempXXXXX',
- DIR => 'mydir',
- SUFFIX => '.dat');
-
-Arguments are case insensitive.
-
-Can call croak() if an error occurs.
-
-=cut
-
-sub new {
- my $proto = shift;
- my $class = ref($proto) || $proto;
-
- # read arguments and convert keys to upper case
- my %args = @_;
- %args = map { uc($_), $args{$_} } keys %args;
-
- # see if they are unlinking (defaulting to yes)
- my $unlink = (exists $args{UNLINK} ? $args{UNLINK} : 1 );
- delete $args{UNLINK};
-
- # template (store it in an array so that it will
- # disappear from the arg list of tempfile)
- my @template = ( exists $args{TEMPLATE} ? $args{TEMPLATE} : () );
- delete $args{TEMPLATE};
-
- # Protect OPEN
- delete $args{OPEN};
-
- # Open the file and retain file handle and file name
- my ($fh, $path) = tempfile( @template, %args );
-
- print "Tmp: $fh - $path\n" if $DEBUG;
-
- # Store the filename in the scalar slot
- ${*$fh} = $path;
-
- # Cache the filename by pid so that the destructor can decide whether to remove it
- $FILES_CREATED_BY_OBJECT{$$}{$path} = 1;
-
- # Store unlink information in hash slot (plus other constructor info)
- %{*$fh} = %args;
-
- # create the object
- bless $fh, $class;
-
- # final method-based configuration
- $fh->unlink_on_destroy( $unlink );
-
- return $fh;
-}
-
-=item B<newdir>
-
-Create a temporary directory using an object oriented interface.
-
- $dir = File::Temp->newdir();
-
-By default the directory is deleted when the object goes out of scope.
-
-Supports the same options as the C<tempdir> function. Note that directories
-created with this method default to CLEANUP => 1.
-
- $dir = File::Temp->newdir( $template, %options );
-
-=cut
-
-sub newdir {
- my $self = shift;
-
- # need to handle args as in tempdir because we have to force CLEANUP
- # default without passing CLEANUP to tempdir
- my $template = (scalar(@_) % 2 == 1 ? shift(@_) : undef );
- my %options = @_;
- my $cleanup = (exists $options{CLEANUP} ? $options{CLEANUP} : 1 );
-
- delete $options{CLEANUP};
-
- my $tempdir;
- if (defined $template) {
- $tempdir = tempdir( $template, %options );
- } else {
- $tempdir = tempdir( %options );
- }
- return bless { DIRNAME => $tempdir,
- CLEANUP => $cleanup,
- LAUNCHPID => $$,
- }, "File::Temp::Dir";
-}
-
-=item B<filename>
-
-Return the name of the temporary file associated with this object
-(if the object was created using the "new" constructor).
-
- $filename = $tmp->filename;
-
-This method is called automatically when the object is used as
-a string.
-
-=cut
-
-sub filename {
- my $self = shift;
- return ${*$self};
-}
-
-sub STRINGIFY {
- my $self = shift;
- return $self->filename;
-}
-
-=item B<dirname>
-
-Return the name of the temporary directory associated with this
-object (if the object was created using the "newdir" constructor).
-
- $dirname = $tmpdir->dirname;
-
-This method is called automatically when the object is used in string context.
-
-=item B<unlink_on_destroy>
-
-Control whether the file is unlinked when the object goes out of scope.
-The file is removed if this value is true and $KEEP_ALL is not.
-
- $fh->unlink_on_destroy( 1 );
-
-Default is for the file to be removed.
-
-=cut
-
-sub unlink_on_destroy {
- my $self = shift;
- if (@_) {
- ${*$self}{UNLINK} = shift;
- }
- return ${*$self}{UNLINK};
-}
-
-=item B<DESTROY>
-
-When the object goes out of scope, the destructor is called. This
-destructor will attempt to unlink the file (using C<unlink1>)
-if the constructor was called with UNLINK set to 1 (the default state
-if UNLINK is not specified).
-
-No error is given if the unlink fails.
-
-If the object has been passed to a child process during a fork, the
-file will be deleted when the object goes out of scope in the parent.
-
-For a temporary directory object the directory will be removed
-unless the CLEANUP argument was used in the constructor (and set to
-false) or C<unlink_on_destroy> was modified after creation.
-
-If the global variable $KEEP_ALL is true, the file or directory
-will not be removed.
-
-=cut
-
-sub DESTROY {
- local($., $@, $!, $^E, $?);
- my $self = shift;
-
- # Make sure we always remove the file from the global hash
- # on destruction. This prevents the hash from growing uncontrollably
- # and post-destruction there is no reason to know about the file.
- my $file = $self->filename;
- my $was_created_by_proc;
- if (exists $FILES_CREATED_BY_OBJECT{$$}{$file}) {
- $was_created_by_proc = 1;
- delete $FILES_CREATED_BY_OBJECT{$$}{$file};
- }
-
- if (${*$self}{UNLINK} && !$KEEP_ALL) {
- print "# ---------> Unlinking $self\n" if $DEBUG;
-
- # only delete if this process created it
- return unless $was_created_by_proc;
-
- # The unlink1 may fail if the file has been closed
- # by the caller. This leaves us with the decision
- # of whether to refuse to remove the file or simply
- # do an unlink without test. Seems to be silly
- # to do this when we are trying to be careful
- # about security
- _force_writable( $file ); # for windows
- unlink1( $self, $file )
- or unlink($file);
- }
-}
-
-=back
-
-=head1 FUNCTIONS
-
-This section describes the recommended interface for generating
-temporary files and directories.
-
-=over 4
-
-=item B<tempfile>
-
-This is the basic function to generate temporary files.
-The behaviour of the file can be changed using various options:
-
- $fh = tempfile();
- ($fh, $filename) = tempfile();
-
-Create a temporary file in the directory specified for temporary
-files, as specified by the tmpdir() function in L<File::Spec>.
-
- ($fh, $filename) = tempfile($template);
-
-Create a temporary file in the current directory using the supplied
-template. Trailing `X' characters are replaced with random letters to
-generate the filename. At least four `X' characters must be present
-at the end of the template.
-
- ($fh, $filename) = tempfile($template, SUFFIX => $suffix)
-
-Same as previously, except that a suffix is added to the template
-after the `X' translation. Useful for ensuring that a temporary
-filename has a particular extension when needed by other applications.
-But see the WARNING at the end.
-
- ($fh, $filename) = tempfile($template, DIR => $dir);
-
-Translates the template as before except that a directory name
-is specified.
-
- ($fh, $filename) = tempfile($template, TMPDIR => 1);
-
-Equivalent to specifying a DIR of "File::Spec->tmpdir", writing the file
-into the same temporary directory as would be used if no template was
-specified at all.
-
- ($fh, $filename) = tempfile($template, UNLINK => 1);
-
-Return the filename and filehandle as before except that the file is
-automatically removed when the program exits (dependent on
-$KEEP_ALL). Default is for the file to be removed if a file handle is
-requested and to be kept if the filename is requested. In a scalar
-context (where no filename is returned) the file is always deleted
-either (depending on the operating system) on exit or when it is
-closed (unless $KEEP_ALL is true when the temp file is created).
-
-Use the object-oriented interface if fine-grained control of when
-a file is removed is required.
-
-If the template is not specified, a template is always
-automatically generated. This temporary file is placed in tmpdir()
-(L<File::Spec>) unless a directory is specified explicitly with the
-DIR option.
-
- $fh = tempfile( DIR => $dir );
-
-If called in scalar context, only the filehandle is returned and the
-file will automatically be deleted when closed on operating systems
-that support this (see the description of tmpfile() elsewhere in this
-document). This is the preferred mode of operation, as if you only
-have a filehandle, you can never create a race condition by fumbling
-with the filename. On systems that can not unlink an open file or can
-not mark a file as temporary when it is opened (for example, Windows
-NT uses the C<O_TEMPORARY> flag) the file is marked for deletion when
-the program ends (equivalent to setting UNLINK to 1). The C<UNLINK>
-flag is ignored if present.
-
- (undef, $filename) = tempfile($template, OPEN => 0);
-
-This will return the filename based on the template but
-will not open this file. Cannot be used in conjunction with
-UNLINK set to true. Default is to always open the file
-to protect from possible race conditions. A warning is issued
-if warnings are turned on. Consider using the tmpnam()
-and mktemp() functions described elsewhere in this document
-if opening the file is not required.
-
-If the operating system supports it (for example BSD derived systems), the
-filehandle will be opened with O_EXLOCK (open with exclusive file lock).
-This can sometimes cause problems if the intention is to pass the filename
-to another system that expects to take an exclusive lock itself (such as
-DBD::SQLite) whilst ensuring that the tempfile is not reused. In this
-situation the "EXLOCK" option can be passed to tempfile. By default EXLOCK
-will be true (this retains compatibility with earlier releases).
-
- ($fh, $filename) = tempfile($template, EXLOCK => 0);
-
-Options can be combined as required.
-
-Will croak() if there is an error.
-
-=cut
-
-sub tempfile {
-
- # Can not check for argument count since we can have any
- # number of args
-
- # Default options
- my %options = (
- "DIR" => undef, # Directory prefix
- "SUFFIX" => '', # Template suffix
- "UNLINK" => 0, # Do not unlink file on exit
- "OPEN" => 1, # Open file
- "TMPDIR" => 0, # Place tempfile in tempdir if template specified
- "EXLOCK" => 1, # Open file with O_EXLOCK
- );
-
- # Check to see whether we have an odd or even number of arguments
- my $template = (scalar(@_) % 2 == 1 ? shift(@_) : undef);
-
- # Read the options and merge with defaults
- %options = (%options, @_) if @_;
-
- # First decision is whether or not to open the file
- if (! $options{"OPEN"}) {
-
- warn "tempfile(): temporary filename requested but not opened.\nPossibly unsafe, consider using tempfile() with OPEN set to true\n"
- if $^W;
-
- }
-
- if ($options{"DIR"} and $^O eq 'VMS') {
-
- # on VMS turn []foo into [.foo] for concatenation
- $options{"DIR"} = VMS::Filespec::vmspath($options{"DIR"});
- }
-
- # Construct the template
-
- # Have a choice of trying to work around the mkstemp/mktemp/tmpnam etc
- # functions or simply constructing a template and using _gettemp()
- # explicitly. Go for the latter
-
- # First generate a template if not defined and prefix the directory
- # If no template must prefix the temp directory
- if (defined $template) {
- # End up with current directory if neither DIR not TMPDIR are set
- if ($options{"DIR"}) {
-
- $template = File::Spec->catfile($options{"DIR"}, $template);
-
- } elsif ($options{TMPDIR}) {
-
- $template = File::Spec->catfile(File::Spec->tmpdir, $template );
-
- }
-
- } else {
-
- if ($options{"DIR"}) {
-
- $template = File::Spec->catfile($options{"DIR"}, TEMPXXX);
-
- } else {
-
- $template = File::Spec->catfile(File::Spec->tmpdir, TEMPXXX);
-
- }
-
- }
-
- # Now add a suffix
- $template .= $options{"SUFFIX"};
-
- # Determine whether we should tell _gettemp to unlink the file
- # On unix this is irrelevant and can be worked out after the file is
- # opened (simply by unlinking the open filehandle). On Windows or VMS
- # we have to indicate temporary-ness when we open the file. In general
- # we only want a true temporary file if we are returning just the
- # filehandle - if the user wants the filename they probably do not
- # want the file to disappear as soon as they close it (which may be
- # important if they want a child process to use the file)
- # For this reason, tie unlink_on_close to the return context regardless
- # of OS.
- my $unlink_on_close = ( wantarray ? 0 : 1);
-
- # Create the file
- my ($fh, $path, $errstr);
- croak "Error in tempfile() using $template: $errstr"
- unless (($fh, $path) = _gettemp($template,
- "open" => $options{'OPEN'},
- "mkdir"=> 0 ,
- "unlink_on_close" => $unlink_on_close,
- "suffixlen" => length($options{'SUFFIX'}),
- "ErrStr" => \$errstr,
- "use_exlock" => $options{EXLOCK},
- ) );
-
- # Set up an exit handler that can do whatever is right for the
- # system. This removes files at exit when requested explicitly or when
- # system is asked to unlink_on_close but is unable to do so because
- # of OS limitations.
- # The latter should be achieved by using a tied filehandle.
- # Do not check return status since this is all done with END blocks.
- _deferred_unlink($fh, $path, 0) if $options{"UNLINK"};
-
- # Return
- if (wantarray()) {
-
- if ($options{'OPEN'}) {
- return ($fh, $path);
- } else {
- return (undef, $path);
- }
-
- } else {
-
- # Unlink the file. It is up to unlink0 to decide what to do with
- # this (whether to unlink now or to defer until later)
- unlink0($fh, $path) or croak "Error unlinking file $path using unlink0";
-
- # Return just the filehandle.
- return $fh;
- }
-
-
-}
-
-=item B<tempdir>
-
-This is the recommended interface for creation of temporary
-directories. By default the directory will not be removed on exit
-(that is, it won't be temporary; this behaviour can not be changed
-because of issues with backwards compatibility). To enable removal
-either use the CLEANUP option which will trigger removal on program
-exit, or consider using the "newdir" method in the object interface which
-will allow the directory to be cleaned up when the object goes out of
-scope.
-
-The behaviour of the function depends on the arguments:
-
- $tempdir = tempdir();
-
-Create a directory in tmpdir() (see L<File::Spec|File::Spec>).
-
- $tempdir = tempdir( $template );
-
-Create a directory from the supplied template. This template is
-similar to that described for tempfile(). `X' characters at the end
-of the template are replaced with random letters to construct the
-directory name. At least four `X' characters must be in the template.
-
- $tempdir = tempdir ( DIR => $dir );
-
-Specifies the directory to use for the temporary directory.
-The temporary directory name is derived from an internal template.
-
- $tempdir = tempdir ( $template, DIR => $dir );
-
-Prepend the supplied directory name to the template. The template
-should not include parent directory specifications itself. Any parent
-directory specifications are removed from the template before
-prepending the supplied directory.
-
- $tempdir = tempdir ( $template, TMPDIR => 1 );
-
-Using the supplied template, create the temporary directory in
-a standard location for temporary files. Equivalent to doing
-
- $tempdir = tempdir ( $template, DIR => File::Spec->tmpdir);
-
-but shorter. Parent directory specifications are stripped from the
-template itself. The C<TMPDIR> option is ignored if C<DIR> is set
-explicitly. Additionally, C<TMPDIR> is implied if neither a template
-nor a directory are supplied.
-
- $tempdir = tempdir( $template, CLEANUP => 1);
-
-Create a temporary directory using the supplied template, but
-attempt to remove it (and all files inside it) when the program
-exits. Note that an attempt will be made to remove all files from
-the directory even if they were not created by this module (otherwise
-why ask to clean it up?). The directory removal is made with
-the rmtree() function from the L<File::Path|File::Path> module.
-Of course, if the template is not specified, the temporary directory
-will be created in tmpdir() and will also be removed at program exit.
-
-Will croak() if there is an error.
-
-=cut
-
-# '
-
-sub tempdir {
-
- # Can not check for argument count since we can have any
- # number of args
-
- # Default options
- my %options = (
- "CLEANUP" => 0, # Remove directory on exit
- "DIR" => '', # Root directory
- "TMPDIR" => 0, # Use tempdir with template
- );
-
- # Check to see whether we have an odd or even number of arguments
- my $template = (scalar(@_) % 2 == 1 ? shift(@_) : undef );
-
- # Read the options and merge with defaults
- %options = (%options, @_) if @_;
-
- # Modify or generate the template
-
- # Deal with the DIR and TMPDIR options
- if (defined $template) {
-
- # Need to strip directory path if using DIR or TMPDIR
- if ($options{'TMPDIR'} || $options{'DIR'}) {
-
- # Strip parent directory from the filename
- #
- # There is no filename at the end
- $template = VMS::Filespec::vmspath($template) if $^O eq 'VMS';
- my ($volume, $directories, undef) = File::Spec->splitpath( $template, 1);
-
- # Last directory is then our template
- $template = (File::Spec->splitdir($directories))[-1];
-
- # Prepend the supplied directory or temp dir
- if ($options{"DIR"}) {
-
- $template = File::Spec->catdir($options{"DIR"}, $template);
-
- } elsif ($options{TMPDIR}) {
-
- # Prepend tmpdir
- $template = File::Spec->catdir(File::Spec->tmpdir, $template);
-
- }
-
- }
-
- } else {
-
- if ($options{"DIR"}) {
-
- $template = File::Spec->catdir($options{"DIR"}, TEMPXXX);
-
- } else {
-
- $template = File::Spec->catdir(File::Spec->tmpdir, TEMPXXX);
-
- }
-
- }
-
- # Create the directory
- my $tempdir;
- my $suffixlen = 0;
- if ($^O eq 'VMS') { # dir names can end in delimiters
- $template =~ m/([\.\]:>]+)$/;
- $suffixlen = length($1);
- }
- if ( ($^O eq 'MacOS') && (substr($template, -1) eq ':') ) {
- # dir name has a trailing ':'
- ++$suffixlen;
- }
-
- my $errstr;
- croak "Error in tempdir() using $template: $errstr"
- unless ((undef, $tempdir) = _gettemp($template,
- "open" => 0,
- "mkdir"=> 1 ,
- "suffixlen" => $suffixlen,
- "ErrStr" => \$errstr,
- ) );
-
- # Install exit handler; must be dynamic to get lexical
- if ( $options{'CLEANUP'} && -d $tempdir) {
- _deferred_unlink(undef, $tempdir, 1);
- }
-
- # Return the dir name
- return $tempdir;
-
-}
-
-=back
-
-=head1 MKTEMP FUNCTIONS
-
-The following functions are Perl implementations of the
-mktemp() family of temp file generation system calls.
-
-=over 4
-
-=item B<mkstemp>
-
-Given a template, returns a filehandle to the temporary file and the name
-of the file.
-
- ($fh, $name) = mkstemp( $template );
-
-In scalar context, just the filehandle is returned.
-
-The template may be any filename with some number of X's appended
-to it, for example F</tmp/temp.XXXX>. The trailing X's are replaced
-with unique alphanumeric combinations.
-
-Will croak() if there is an error.
-
-=cut
-
-
-
-sub mkstemp {
-
- croak "Usage: mkstemp(template)"
- if scalar(@_) != 1;
-
- my $template = shift;
-
- my ($fh, $path, $errstr);
- croak "Error in mkstemp using $template: $errstr"
- unless (($fh, $path) = _gettemp($template,
- "open" => 1,
- "mkdir"=> 0 ,
- "suffixlen" => 0,
- "ErrStr" => \$errstr,
- ) );
-
- if (wantarray()) {
- return ($fh, $path);
- } else {
- return $fh;
- }
-
-}
-
-
-=item B<mkstemps>
-
-Similar to mkstemp(), except that an extra argument can be supplied
-with a suffix to be appended to the template.
-
- ($fh, $name) = mkstemps( $template, $suffix );
-
-For example a template of C<testXXXXXX> and suffix of C<.dat>
-would generate a file similar to F<testhGji_w.dat>.
-
-Returns just the filehandle alone when called in scalar context.
-
-Will croak() if there is an error.
-
-=cut
-
-sub mkstemps {
-
- croak "Usage: mkstemps(template, suffix)"
- if scalar(@_) != 2;
-
-
- my $template = shift;
- my $suffix = shift;
-
- $template .= $suffix;
-
- my ($fh, $path, $errstr);
- croak "Error in mkstemps using $template: $errstr"
- unless (($fh, $path) = _gettemp($template,
- "open" => 1,
- "mkdir"=> 0 ,
- "suffixlen" => length($suffix),
- "ErrStr" => \$errstr,
- ) );
-
- if (wantarray()) {
- return ($fh, $path);
- } else {
- return $fh;
- }
-
-}
-
-=item B<mkdtemp>
-
-Create a directory from a template. The template must end in
-X's that are replaced by the routine.
-
- $tmpdir_name = mkdtemp($template);
-
-Returns the name of the temporary directory created.
-
-Directory must be removed by the caller.
-
-Will croak() if there is an error.
-
-=cut
-
-#' # for emacs
-
-sub mkdtemp {
-
- croak "Usage: mkdtemp(template)"
- if scalar(@_) != 1;
-
- my $template = shift;
- my $suffixlen = 0;
- if ($^O eq 'VMS') { # dir names can end in delimiters
- $template =~ m/([\.\]:>]+)$/;
- $suffixlen = length($1);
- }
- if ( ($^O eq 'MacOS') && (substr($template, -1) eq ':') ) {
- # dir name has a trailing ':'
- ++$suffixlen;
- }
- my ($junk, $tmpdir, $errstr);
- croak "Error creating temp directory from template $template\: $errstr"
- unless (($junk, $tmpdir) = _gettemp($template,
- "open" => 0,
- "mkdir"=> 1 ,
- "suffixlen" => $suffixlen,
- "ErrStr" => \$errstr,
- ) );
-
- return $tmpdir;
-
-}
-
-=item B<mktemp>
-
-Returns a valid temporary filename but does not guarantee
-that the file will not be opened by someone else.
-
- $unopened_file = mktemp($template);
-
-Template is the same as that required by mkstemp().
-
-Will croak() if there is an error.
-
-=cut
-
-sub mktemp {
-
- croak "Usage: mktemp(template)"
- if scalar(@_) != 1;
-
- my $template = shift;
-
- my ($tmpname, $junk, $errstr);
- croak "Error getting name to temp file from template $template: $errstr"
- unless (($junk, $tmpname) = _gettemp($template,
- "open" => 0,
- "mkdir"=> 0 ,
- "suffixlen" => 0,
- "ErrStr" => \$errstr,
- ) );
-
- return $tmpname;
-}
-
-=back
-
-=head1 POSIX FUNCTIONS
-
-This section describes the re-implementation of the tmpnam()
-and tmpfile() functions described in L<POSIX>
-using the mkstemp() from this module.
-
-Unlike the L<POSIX|POSIX> implementations, the directory used
-for the temporary file is not specified in a system include
-file (C<P_tmpdir>) but simply depends on the choice of tmpdir()
-returned by L<File::Spec|File::Spec>. On some implementations this
-location can be set using the C<TMPDIR> environment variable, which
-may not be secure.
-If this is a problem, simply use mkstemp() and specify a template.
-
-=over 4
-
-=item B<tmpnam>
-
-When called in scalar context, returns the full name (including path)
-of a temporary file (uses mktemp()). The only check is that the file does
-not already exist, but there is no guarantee that that condition will
-continue to apply.
-
- $file = tmpnam();
-
-When called in list context, a filehandle to the open file and
-a filename are returned. This is achieved by calling mkstemp()
-after constructing a suitable template.
-
- ($fh, $file) = tmpnam();
-
-If possible, this form should be used to prevent possible
-race conditions.
-
-See L<File::Spec/tmpdir> for information on the choice of temporary
-directory for a particular operating system.
-
-Will croak() if there is an error.
-
-=cut
-
-sub tmpnam {
-
- # Retrieve the temporary directory name
- my $tmpdir = File::Spec->tmpdir;
-
- croak "Error temporary directory is not writable"
- if $tmpdir eq '';
-
- # Use a ten character template and append to tmpdir
- my $template = File::Spec->catfile($tmpdir, TEMPXXX);
-
- if (wantarray() ) {
- return mkstemp($template);
- } else {
- return mktemp($template);
- }
-
-}
-
-=item B<tmpfile>
-
-Returns the filehandle of a temporary file.
-
- $fh = tmpfile();
-
-The file is removed when the filehandle is closed or when the program
-exits. No access to the filename is provided.
-
-If the temporary file can not be created undef is returned.
-Currently this command will probably not work when the temporary
-directory is on an NFS file system.
-
-Will croak() if there is an error.
-
-=cut
-
-sub tmpfile {
-
- # Simply call tmpnam() in a list context
- my ($fh, $file) = tmpnam();
-
- # Make sure file is removed when filehandle is closed
- # This will fail on NFS
- unlink0($fh, $file)
- or return undef;
-
- return $fh;
-
-}
-
-=back
-
-=head1 ADDITIONAL FUNCTIONS
-
-These functions are provided for backwards compatibility
-with common tempfile generation C library functions.
-
-They are not exported and must be addressed using the full package
-name.
-
-=over 4
-
-=item B<tempnam>
-
-Return the name of a temporary file in the specified directory
-using a prefix. The file is guaranteed not to exist at the time
-the function was called, but such guarantees are good for one
-clock tick only. Always use the proper form of C<sysopen>
-with C<O_CREAT | O_EXCL> if you must open such a filename.
-
- $filename = File::Temp::tempnam( $dir, $prefix );
-
-Equivalent to running mktemp() with $dir/$prefixXXXXXXXX
-(using unix file convention as an example)
-
-Because this function uses mktemp(), it can suffer from race conditions.
-
-Will croak() if there is an error.
-
-=cut
-
-sub tempnam {
-
- croak 'Usage tempnam($dir, $prefix)' unless scalar(@_) == 2;
-
- my ($dir, $prefix) = @_;
-
- # Add a string to the prefix
- $prefix .= 'XXXXXXXX';
-
- # Concatenate the directory to the file
- my $template = File::Spec->catfile($dir, $prefix);
-
- return mktemp($template);
-
-}
-
-=back
-
-=head1 UTILITY FUNCTIONS
-
-Useful functions for dealing with the filehandle and filename.
-
-=over 4
-
-=item B<unlink0>
-
-Given an open filehandle and the associated filename, make a safe
-unlink. This is achieved by first checking that the filename and
-filehandle initially point to the same file and that the number of
-links to the file is 1 (all fields returned by stat() are compared).
-Then the filename is unlinked and the filehandle checked once again to
-verify that the number of links on that file is now 0. This is the
-closest you can come to making sure that the filename unlinked was the
-same as the file whose descriptor you hold.
-
- unlink0($fh, $path)
- or die "Error unlinking file $path safely";
-
-Returns false on error but croaks() if there is a security
-anomaly. The filehandle is not closed since on some occasions this is
-not required.
-
-On some platforms, for example Windows NT, it is not possible to
-unlink an open file (the file must be closed first). On those
-platforms, the actual unlinking is deferred until the program ends and
-good status is returned. A check is still performed to make sure that
-the filehandle and filename are pointing to the same thing (but not at
-the time the end block is executed since the deferred removal may not
-have access to the filehandle).
-
-Additionally, on Windows NT not all the fields returned by stat() can
-be compared. For example, the C<dev> and C<rdev> fields seem to be
-different. Also, it seems that the size of the file returned by stat()
-does not always agree, with C<stat(FH)> being more accurate than
-C<stat(filename)>, presumably because of caching issues even when
-using autoflush (this is usually overcome by waiting a while after
-writing to the tempfile before attempting to C<unlink0> it).
-
-Finally, on NFS file systems the link count of the file handle does
-not always go to zero immediately after unlinking. Currently, this
-command is expected to fail on NFS disks.
-
-This function is disabled if the global variable $KEEP_ALL is true
-and an unlink on open file is supported. If the unlink is to be deferred
-to the END block, the file is still registered for removal.
-
-This function should not be called if you are using the object oriented
-interface since the it will interfere with the object destructor deleting
-the file.
-
-=cut
-
-sub unlink0 {
-
- croak 'Usage: unlink0(filehandle, filename)'
- unless scalar(@_) == 2;
-
- # Read args
- my ($fh, $path) = @_;
-
- cmpstat($fh, $path) or return 0;
-
- # attempt remove the file (does not work on some platforms)
- if (_can_unlink_opened_file()) {
-
- # return early (Without unlink) if we have been instructed to retain files.
- return 1 if $KEEP_ALL;
-
- # XXX: do *not* call this on a directory; possible race
- # resulting in recursive removal
- croak "unlink0: $path has become a directory!" if -d $path;
- unlink($path) or return 0;
-
- # Stat the filehandle
- my @fh = stat $fh;
-
- print "Link count = $fh[3] \n" if $DEBUG;
-
- # Make sure that the link count is zero
- # - Cygwin provides deferred unlinking, however,
- # on Win9x the link count remains 1
- # On NFS the link count may still be 1 but we cant know that
- # we are on NFS
- return ( $fh[3] == 0 or $^O eq 'cygwin' ? 1 : 0);
-
- } else {
- _deferred_unlink($fh, $path, 0);
- return 1;
- }
-
-}
-
-=item B<cmpstat>
-
-Compare C<stat> of filehandle with C<stat> of provided filename. This
-can be used to check that the filename and filehandle initially point
-to the same file and that the number of links to the file is 1 (all
-fields returned by stat() are compared).
-
- cmpstat($fh, $path)
- or die "Error comparing handle with file";
-
-Returns false if the stat information differs or if the link count is
-greater than 1. Calls croak if there is a security anomaly.
-
-On certain platforms, for example Windows, not all the fields returned by stat()
-can be compared. For example, the C<dev> and C<rdev> fields seem to be
-different in Windows. Also, it seems that the size of the file
-returned by stat() does not always agree, with C<stat(FH)> being more
-accurate than C<stat(filename)>, presumably because of caching issues
-even when using autoflush (this is usually overcome by waiting a while
-after writing to the tempfile before attempting to C<unlink0> it).
-
-Not exported by default.
-
-=cut
-
-sub cmpstat {
-
- croak 'Usage: cmpstat(filehandle, filename)'
- unless scalar(@_) == 2;
-
- # Read args
- my ($fh, $path) = @_;
-
- warn "Comparing stat\n"
- if $DEBUG;
-
- # Stat the filehandle - which may be closed if someone has manually
- # closed the file. Can not turn off warnings without using $^W
- # unless we upgrade to 5.006 minimum requirement
- my @fh;
- {
- local ($^W) = 0;
- @fh = stat $fh;
- }
- return unless @fh;
-
- if ($fh[3] > 1 && $^W) {
- carp "unlink0: fstat found too many links; SB=@fh" if $^W;
- }
-
- # Stat the path
- my @path = stat $path;
-
- unless (@path) {
- carp "unlink0: $path is gone already" if $^W;
- return;
- }
-
- # this is no longer a file, but may be a directory, or worse
- unless (-f $path) {
- confess "panic: $path is no longer a file: SB=@fh";
- }
-
- # Do comparison of each member of the array
- # On WinNT dev and rdev seem to be different
- # depending on whether it is a file or a handle.
- # Cannot simply compare all members of the stat return
- # Select the ones we can use
- my @okstat = (0..$#fh); # Use all by default
- if ($^O eq 'MSWin32') {
- @okstat = (1,2,3,4,5,7,8,9,10);
- } elsif ($^O eq 'os2') {
- @okstat = (0, 2..$#fh);
- } elsif ($^O eq 'VMS') { # device and file ID are sufficient
- @okstat = (0, 1);
- } elsif ($^O eq 'dos') {
- @okstat = (0,2..7,11..$#fh);
- } elsif ($^O eq 'mpeix') {
- @okstat = (0..4,8..10);
- }
-
- # Now compare each entry explicitly by number
- for (@okstat) {
- print "Comparing: $_ : $fh[$_] and $path[$_]\n" if $DEBUG;
- # Use eq rather than == since rdev, blksize, and blocks (6, 11,
- # and 12) will be '' on platforms that do not support them. This
- # is fine since we are only comparing integers.
- unless ($fh[$_] eq $path[$_]) {
- warn "Did not match $_ element of stat\n" if $DEBUG;
- return 0;
- }
- }
-
- return 1;
-}
-
-=item B<unlink1>
-
-Similar to C<unlink0> except after file comparison using cmpstat, the
-filehandle is closed prior to attempting to unlink the file. This
-allows the file to be removed without using an END block, but does
-mean that the post-unlink comparison of the filehandle state provided
-by C<unlink0> is not available.
-
- unlink1($fh, $path)
- or die "Error closing and unlinking file";
-
-Usually called from the object destructor when using the OO interface.
-
-Not exported by default.
-
-This function is disabled if the global variable $KEEP_ALL is true.
-
-Can call croak() if there is a security anomaly during the stat()
-comparison.
-
-=cut
-
-sub unlink1 {
- croak 'Usage: unlink1(filehandle, filename)'
- unless scalar(@_) == 2;
-
- # Read args
- my ($fh, $path) = @_;
-
- cmpstat($fh, $path) or return 0;
-
- # Close the file
- close( $fh ) or return 0;
-
- # Make sure the file is writable (for windows)
- _force_writable( $path );
-
- # return early (without unlink) if we have been instructed to retain files.
- return 1 if $KEEP_ALL;
-
- # remove the file
- return unlink($path);
-}
-
-=item B<cleanup>
-
-Calling this function will cause any temp files or temp directories
-that are registered for removal to be removed. This happens automatically
-when the process exits but can be triggered manually if the caller is sure
-that none of the temp files are required. This method can be registered as
-an Apache callback.
-
-On OSes where temp files are automatically removed when the temp file
-is closed, calling this function will have no effect other than to remove
-temporary directories (which may include temporary files).
-
- File::Temp::cleanup();
-
-Not exported by default.
-
-=back
-
-=head1 PACKAGE VARIABLES
-
-These functions control the global state of the package.
-
-=over 4
-
-=item B<safe_level>
-
-Controls the lengths to which the module will go to check the safety of the
-temporary file or directory before proceeding.
-Options are:
-
-=over 8
-
-=item STANDARD
-
-Do the basic security measures to ensure the directory exists and is
-writable, that temporary files are opened only if they do not already
-exist, and that possible race conditions are avoided. Finally the
-L<unlink0|"unlink0"> function is used to remove files safely.
-
-=item MEDIUM
-
-In addition to the STANDARD security, the output directory is checked
-to make sure that it is owned either by root or the user running the
-program. If the directory is writable by group or by other, it is then
-checked to make sure that the sticky bit is set.
-
-Will not work on platforms that do not support the C<-k> test
-for sticky bit.
-
-=item HIGH
-
-In addition to the MEDIUM security checks, also check for the
-possibility of ``chown() giveaway'' using the L<POSIX|POSIX>
-sysconf() function. If this is a possibility, each directory in the
-path is checked in turn for safeness, recursively walking back to the
-root directory.
-
-For platforms that do not support the L<POSIX|POSIX>
-C<_PC_CHOWN_RESTRICTED> symbol (for example, Windows NT) it is
-assumed that ``chown() giveaway'' is possible and the recursive test
-is performed.
-
-=back
-
-The level can be changed as follows:
-
- File::Temp->safe_level( File::Temp::HIGH );
-
-The level constants are not exported by the module.
-
-Currently, you must be running at least perl v5.6.0 in order to
-run with MEDIUM or HIGH security. This is simply because the
-safety tests use functions from L<Fcntl|Fcntl> that are not
-available in older versions of perl. The problem is that the version
-number for Fcntl is the same in perl 5.6.0 and in 5.005_03 even though
-they are different versions.
-
-On systems that do not support the HIGH or MEDIUM safety levels
-(for example Win NT or OS/2) any attempt to change the level will
-be ignored. The decision to ignore rather than raise an exception
-allows portable programs to be written with high security in mind
-for the systems that can support this without those programs failing
-on systems where the extra tests are irrelevant.
-
-If you really need to see whether the change has been accepted
-simply examine the return value of C<safe_level>.
-
- $newlevel = File::Temp->safe_level( File::Temp::HIGH );
- die "Could not change to high security"
- if $newlevel != File::Temp::HIGH;
-
-=cut
-
-{
- # protect from using the variable itself
- my $LEVEL = STANDARD;
- sub safe_level {
- my $self = shift;
- if (@_) {
- my $level = shift;
- if (($level != STANDARD) && ($level != MEDIUM) && ($level != HIGH)) {
- carp "safe_level: Specified level ($level) not STANDARD, MEDIUM or HIGH - ignoring\n" if $^W;
- } else {
- # Dont allow this on perl 5.005 or earlier
- if ($] < 5.006 && $level != STANDARD) {
- # Cant do MEDIUM or HIGH checks
- croak "Currently requires perl 5.006 or newer to do the safe checks";
- }
- # Check that we are allowed to change level
- # Silently ignore if we can not.
- $LEVEL = $level if _can_do_level($level);
- }
- }
- return $LEVEL;
- }
-}
-
-=item TopSystemUID
-
-This is the highest UID on the current system that refers to a root
-UID. This is used to make sure that the temporary directory is
-owned by a system UID (C<root>, C<bin>, C<sys> etc) rather than
-simply by root.
-
-This is required since on many unix systems C</tmp> is not owned
-by root.
-
-Default is to assume that any UID less than or equal to 10 is a root
-UID.
-
- File::Temp->top_system_uid(10);
- my $topid = File::Temp->top_system_uid;
-
-This value can be adjusted to reduce security checking if required.
-The value is only relevant when C<safe_level> is set to MEDIUM or higher.
-
-=cut
-
-{
- my $TopSystemUID = 10;
- $TopSystemUID = 197108 if $^O eq 'interix'; # "Administrator"
- sub top_system_uid {
- my $self = shift;
- if (@_) {
- my $newuid = shift;
- croak "top_system_uid: UIDs should be numeric"
- unless $newuid =~ /^\d+$/s;
- $TopSystemUID = $newuid;
- }
- return $TopSystemUID;
- }
-}
-
-=item B<$KEEP_ALL>
-
-Controls whether temporary files and directories should be retained
-regardless of any instructions in the program to remove them
-automatically. This is useful for debugging but should not be used in
-production code.
-
- $File::Temp::KEEP_ALL = 1;
-
-Default is for files to be removed as requested by the caller.
-
-In some cases, files will only be retained if this variable is true
-when the file is created. This means that you can not create a temporary
-file, set this variable and expect the temp file to still be around
-when the program exits.
-
-=item B<$DEBUG>
-
-Controls whether debugging messages should be enabled.
-
- $File::Temp::DEBUG = 1;
-
-Default is for debugging mode to be disabled.
-
-=back
-
-=head1 WARNING
-
-For maximum security, endeavour always to avoid ever looking at,
-touching, or even imputing the existence of the filename. You do not
-know that that filename is connected to the same file as the handle
-you have, and attempts to check this can only trigger more race
-conditions. It's far more secure to use the filehandle alone and
-dispense with the filename altogether.
-
-If you need to pass the handle to something that expects a filename
-then, on a unix system, use C<"/dev/fd/" . fileno($fh)> for arbitrary
-programs, or more generally C<< "+<=&" . fileno($fh) >> for Perl
-programs. You will have to clear the close-on-exec bit on that file
-descriptor before passing it to another process.
-
- use Fcntl qw/F_SETFD F_GETFD/;
- fcntl($tmpfh, F_SETFD, 0)
- or die "Can't clear close-on-exec flag on temp fh: $!\n";
-
-=head2 Temporary files and NFS
-
-Some problems are associated with using temporary files that reside
-on NFS file systems and it is recommended that a local filesystem
-is used whenever possible. Some of the security tests will most probably
-fail when the temp file is not local. Additionally, be aware that
-the performance of I/O operations over NFS will not be as good as for
-a local disk.
-
-=head2 Forking
-
-In some cases files created by File::Temp are removed from within an
-END block. Since END blocks are triggered when a child process exits
-(unless C<POSIX::_exit()> is used by the child) File::Temp takes care
-to only remove those temp files created by a particular process ID. This
-means that a child will not attempt to remove temp files created by the
-parent process.
-
-If you are forking many processes in parallel that are all creating
-temporary files, you may need to reset the random number seed using
-srand(EXPR) in each child else all the children will attempt to walk
-through the same set of random file names and may well cause
-themselves to give up if they exceed the number of retry attempts.
-
-=head2 Directory removal
-
-Note that if you have chdir'ed into the temporary directory and it is
-subsequently cleaned up (either in the END block or as part of object
-destruction), then you will get a warning from File::Path::rmtree().
-
-=head2 BINMODE
-
-The file returned by File::Temp will have been opened in binary mode
-if such a mode is available. If that is not correct, use the C<binmode()>
-function to change the mode of the filehandle.
-
-Note that you can modify the encoding of a file opened by File::Temp
-also by using C<binmode()>.
-
-=head1 HISTORY
-
-Originally began life in May 1999 as an XS interface to the system
-mkstemp() function. In March 2000, the OpenBSD mkstemp() code was
-translated to Perl for total control of the code's
-security checking, to ensure the presence of the function regardless of
-operating system and to help with portability. The module was shipped
-as a standard part of perl from v5.6.1.
-
-=head1 SEE ALSO
-
-L<POSIX/tmpnam>, L<POSIX/tmpfile>, L<File::Spec>, L<File::Path>
-
-See L<IO::File> and L<File::MkTemp>, L<Apache::TempFile> for
-different implementations of temporary file handling.
-
-See L<File::Tempdir> for an alternative object-oriented wrapper for
-the C<tempdir> function.
-
-=head1 AUTHOR
-
-Tim Jenness E<lt>tjenness at cpan.orgE<gt>
-
-Copyright (C) 2007-2009 Tim Jenness.
-Copyright (C) 1999-2007 Tim Jenness and the UK Particle Physics and
-Astronomy Research Council. All Rights Reserved. This program is free
-software; you can redistribute it and/or modify it under the same
-terms as Perl itself.
-
-Original Perl implementation loosely based on the OpenBSD C code for
-mkstemp(). Thanks to Tom Christiansen for suggesting that this module
-should be written and providing ideas for code improvements and
-security enhancements.
-
-=cut
-
-package File::Temp::Dir;
-
-use File::Path qw/ rmtree /;
-use strict;
-use overload '""' => "STRINGIFY", fallback => 1;
-
-# private class specifically to support tempdir objects
-# created by File::Temp->newdir
-
-# ostensibly the same method interface as File::Temp but without
-# inheriting all the IO::Seekable methods and other cruft
-
-# Read-only - returns the name of the temp directory
-
-sub dirname {
- my $self = shift;
- return $self->{DIRNAME};
-}
-
-sub STRINGIFY {
- my $self = shift;
- return $self->dirname;
-}
-
-sub unlink_on_destroy {
- my $self = shift;
- if (@_) {
- $self->{CLEANUP} = shift;
- }
- return $self->{CLEANUP};
-}
-
-sub DESTROY {
- my $self = shift;
- local($., $@, $!, $^E, $?);
- if ($self->unlink_on_destroy &&
- $$ == $self->{LAUNCHPID} && !$File::Temp::KEEP_ALL) {
- if (-d $self->{DIRNAME}) {
- # Some versions of rmtree will abort if you attempt to remove
- # the directory you are sitting in. We protect that and turn it
- # into a warning. We do this because this occurs during object
- # destruction and so can not be caught by the user.
- eval { rmtree($self->{DIRNAME}, $File::Temp::DEBUG, 0); };
- warn $@ if ($@ && $^W);
- }
- }
-}
-
-
-1;
Deleted: vendor/perl/dist/cpan/Getopt-Long/t/gol-compat.t
===================================================================
--- vendor/perl/dist/cpan/Getopt-Long/t/gol-compat.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Getopt-Long/t/gol-compat.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,39 +0,0 @@
-#!./perl -w
-
-no strict;
-
-BEGIN {
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- chdir 't';
- }
-}
-
-{
- # Silence the deprecation warnings from newgetopt.pl for the purpose
- # of testing. These tests will be removed along with newgetopt.pl in
- # the next major release of perl.
- local $SIG{__WARN__} = sub {
- if ($_[0] !~ /will be removed from the Perl core distribution/) {
- print(STDERR @_);
- }
- };
- require "newgetopt.pl";
-}
-
-print "1..9\n";
-
- at ARGV = qw(-Foo -baR --foo bar);
-$newgetopt::ignorecase = 0;
-$newgetopt::ignorecase = 0;
-undef $opt_baR;
-undef $opt_bar;
-print "ok 1\n" if NGetOpt ("foo", "Foo=s");
-print ((defined $opt_foo) ? "" : "not ", "ok 2\n");
-print (($opt_foo == 1) ? "" : "not ", "ok 3\n");
-print ((defined $opt_Foo) ? "" : "not ", "ok 4\n");
-print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n");
-print ((@ARGV == 1) ? "" : "not ", "ok 6\n");
-print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n");
-print (!(defined $opt_baR) ? "" : "not ", "ok 8\n");
-print (!(defined $opt_bar) ? "" : "not ", "ok 9\n");
Deleted: vendor/perl/dist/cpan/HTTP-Tiny/t/120_put.t
===================================================================
--- vendor/perl/dist/cpan/HTTP-Tiny/t/120_put.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/HTTP-Tiny/t/120_put.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,82 +0,0 @@
-#!perl
-#
-# This file is part of HTTP-Tiny
-#
-# This software is copyright (c) 2011 by Christian Hansen.
-#
-# This is free software; you can redistribute it and/or modify it under
-# the same terms as the Perl 5 programming language system itself.
-#
-
-use strict;
-use warnings;
-
-use File::Basename;
-use Test::More 0.88;
-use t::Util qw[tmpfile rewind slurp monkey_patch dir_list parse_case
- set_socket_source sort_headers $CRLF $LF];
-use HTTP::Tiny;
-BEGIN { monkey_patch() }
-
-for my $file ( dir_list("t/cases", qr/^put/ ) ) {
- my $data = do { local (@ARGV,$/) = $file; <> };
- my ($params, $expect_req, $give_res) = split /--+\n/, $data;
- # cleanup source data
- my $version = HTTP::Tiny->VERSION || 0;
- $expect_req =~ s{VERSION}{$version};
- s{\n}{$CRLF}g for ($expect_req, $give_res);
-
- # figure out what request to make
- my $case = parse_case($params);
- my $url = $case->{url}[0];
- my %options;
-
- my %headers;
- for my $line ( @{ $case->{headers} } ) {
- my ($k,$v) = ($line =~ m{^([^:]+): (.*)$}g);
- $headers{$k} = $v;
- }
- $options{headers} = \%headers if %headers;
-
- if ( $case->{content} ) {
- $options{content} = $case->{content}[0];
- }
- elsif ( $case->{content_cb} ) {
- $options{content} = eval join "\n", @{$case->{content_cb}};
- }
-
- if ( $case->{trailer_cb} ) {
- $options{trailer_callback} = eval join "\n", @{$case->{trailer_cb}};
- }
-
- # setup mocking and test
- my $res_fh = tmpfile($give_res);
- my $req_fh = tmpfile();
-
- my $http = HTTP::Tiny->new;
- set_socket_source($req_fh, $res_fh);
-
- (my $url_basename = $url) =~ s{.*/}{};
-
- my @call_args = %options ? ($url, \%options) : ($url);
- my $response = $http->request('PUT', at call_args);
-
- my $got_req = slurp($req_fh);
-
- my $label = basename($file);
-
- is( sort_headers($got_req), sort_headers($expect_req), "$label request" );
-
- my ($rc) = $give_res =~ m{\S+\s+(\d+)}g;
- is( $response->{status}, $rc, "$label response code $rc" )
- or diag $response->{content};
-
- if ( substr($rc,0,1) eq '2' ) {
- ok( $response->{success}, "$label success flag true" );
- }
- else {
- ok( ! $response->{success}, "$label success flag false" );
- }
-}
-
-done_testing;
Deleted: vendor/perl/dist/cpan/List-Util/XS.pp
===================================================================
--- vendor/perl/dist/cpan/List-Util/XS.pp 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/XS.pp 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,45 +0,0 @@
-package List::Util::XS;
-use strict;
-use vars qw($VERSION);
-
-$VERSION = undef;
-
-sub VERSION {
- require Carp;
- Carp::croak("You need to install Scalar-List-Utils with a C compiler to ensure the XS is compiled")
- if defined $_[1];
- $VERSION;
-}
-
-1;
-__END__
-
-=head1 NAME
-
-List::Util::XS - Indicate if List::Util was compiled with a C compiler
-
-=head1 SYNOPSIS
-
- use List::Util::XS 1.20;
-
-=head1 DESCRIPTION
-
-B<*** This instalation does not have XS installed ***>
-
-C<List::Util::XS> can be used as a dependency to ensure List::Util was
-installed using a C compiler and that the XS version is installed.
-
-During installation C<$List::Util::XS::VERSION> will be set to
-C<undef> if the XS was not compiled.
-
-=head1 SEE ALSO
-
-L<Scalar::Util>, L<List::Util>, L<List::MoreUtils>
-
-=head1 COPYRIGHT
-
-Copyright (c) 2008 Graham Barr <gbarr at pobox.com>. All rights reserved.
-This program is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/cpan/List-Util/lib/List/Util/PP.pm
===================================================================
--- vendor/perl/dist/cpan/List-Util/lib/List/Util/PP.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/lib/List/Util/PP.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,83 +0,0 @@
-# List::Util::PP.pm
-#
-# Copyright (c) 1997-2009 Graham Barr <gbarr at pobox.com>. All rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-
-package List::Util::PP;
-
-use strict;
-use warnings;
-use vars qw(@ISA @EXPORT $VERSION $a $b);
-require Exporter;
-
- at ISA = qw(Exporter);
- at EXPORT = qw(first min max minstr maxstr reduce sum shuffle);
-$VERSION = "1.23";
-$VERSION = eval $VERSION;
-
-sub reduce (&@) {
- my $code = shift;
- require Scalar::Util;
- my $type = Scalar::Util::reftype($code);
- unless($type and $type eq 'CODE') {
- require Carp;
- Carp::croak("Not a subroutine reference");
- }
- no strict 'refs';
-
- return shift unless @_ > 1;
-
- use vars qw($a $b);
-
- my $caller = caller;
- local(*{$caller."::a"}) = \my $a;
- local(*{$caller."::b"}) = \my $b;
-
- $a = shift;
- foreach (@_) {
- $b = $_;
- $a = &{$code}();
- }
-
- $a;
-}
-
-sub first (&@) {
- my $code = shift;
- require Scalar::Util;
- my $type = Scalar::Util::reftype($code);
- unless($type and $type eq 'CODE') {
- require Carp;
- Carp::croak("Not a subroutine reference");
- }
-
- foreach (@_) {
- return $_ if &{$code}();
- }
-
- undef;
-}
-
-
-sub sum (@) { reduce { $a + $b } @_ }
-
-sub min (@) { reduce { $a < $b ? $a : $b } @_ }
-
-sub max (@) { reduce { $a > $b ? $a : $b } @_ }
-
-sub minstr (@) { reduce { $a lt $b ? $a : $b } @_ }
-
-sub maxstr (@) { reduce { $a gt $b ? $a : $b } @_ }
-
-sub shuffle (@) {
- my @a=\(@_);
- my $n;
- my $i=@_;
- map {
- $n = rand($i--);
- (${$a[$n]}, $a[$n] = $a[$i])[0];
- } @_;
-}
-
-1;
Deleted: vendor/perl/dist/cpan/List-Util/t/expfail.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/expfail.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/expfail.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,29 +0,0 @@
-#!./perl
-
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- require Config; import Config;
- keys %Config; # Silence warning
- if ($Config{extensions} !~ /\bList\/Util\b/) {
- print "1..0 # Skip: List::Util was not built\n";
- exit 0;
- }
- }
-}
-
-use Test::More tests => 3;
-use strict;
-
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-require Scalar::Util;
-
-for my $func (qw(dualvar set_prototype weaken)) {
- eval { Scalar::Util->import($func); };
- like(
- $@,
- qr/$func is only available with the XS/,
- "no pure perl $func: error raised",
- );
-}
Deleted: vendor/perl/dist/cpan/List-Util/t/p_00version.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_00version.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_00version.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,26 +0,0 @@
-#!./perl
-
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- require Config; import Config;
- keys %Config; # Silence warning
- if ($Config{extensions} !~ /\bList\/Util\b/) {
- print "1..0 # Skip: List::Util was not built\n";
- exit 0;
- }
- }
-}
-
-use Test::More tests => 2;
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-require Scalar::Util;
-require List::Util;
-
-is( $Scalar::Util::PP::VERSION, $List::Util::VERSION, "VERSION mismatch");
-is( $List::Util::PP::VERSION, $List::Util::VERSION, "VERSION mismatch");
-
Deleted: vendor/perl/dist/cpan/List-Util/t/p_blessed.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_blessed.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_blessed.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_first.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_first.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_first.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,8 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-$::PERL_ONLY = $::PERL_ONLY = 1; # Mustn't use it only once!
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_lln.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_lln.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_lln.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_max.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_max.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_max.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_maxstr.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_maxstr.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_maxstr.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_min.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_min.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_min.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_minstr.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_minstr.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_minstr.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_openhan.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_openhan.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_openhan.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_readonly.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_readonly.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_readonly.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_reduce.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_reduce.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_reduce.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,8 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-$::PERL_ONLY = $::PERL_ONLY = 1; # Mustn't use it only once!
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_refaddr.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_refaddr.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_refaddr.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_reftype.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_reftype.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_reftype.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_shuffle.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_shuffle.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_shuffle.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_sum.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_sum.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_sum.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-do $f; die $@ if $@;
Deleted: vendor/perl/dist/cpan/List-Util/t/p_tainted.t
===================================================================
--- vendor/perl/dist/cpan/List-Util/t/p_tainted.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/List-Util/t/p_tainted.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,12 +0,0 @@
-#!./perl -T
-
-use File::Spec;
-
-# force perl-only version to be tested
-$List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1;
-
-(my $f = __FILE__) =~ s/p_//;
-my $filename = ($^O eq 'MSWin32' || $^O eq 'VMS')
- ? File::Spec->rel2abs(File::Spec->catfile(".", $f))
- : File::Spec->catfile(".", $f);
-do $filename; die $@ if $@;
Deleted: vendor/perl/dist/cpan/Locale-Codes/lib/Locale/Constants.pm
===================================================================
--- vendor/perl/dist/cpan/Locale-Codes/lib/Locale/Constants.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Locale-Codes/lib/Locale/Constants.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,80 +0,0 @@
-package Locale::Constants;
-# Copyright (C) 2001 Canon Research Centre Europe (CRE).
-# Copyright (C) 2002-2009 Neil Bowers
-# Copyright (c) 2010-2011 Sullivan Beck
-# This program is free software; you can redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-use strict;
-use warnings;
-
-require Exporter;
-
-#-----------------------------------------------------------------------
-# Public Global Variables
-#-----------------------------------------------------------------------
-
-our($VERSION, at ISA, at EXPORT);
-
-$VERSION='3.16';
- at ISA = qw(Exporter);
- at EXPORT = qw(LOCALE_CODE_ALPHA_2
- LOCALE_CODE_ALPHA_3
- LOCALE_CODE_NUMERIC
- LOCALE_CODE_FIPS
- LOCALE_CODE_DOM
- LOCALE_CODE_DEFAULT
-
- LOCALE_LANG_ALPHA_2
- LOCALE_LANG_ALPHA_3
- LOCALE_LANG_TERM
- LOCALE_LANG_DEFAULT
-
- LOCALE_CURR_ALPHA
- LOCALE_CURR_NUMERIC
- LOCALE_CURR_DEFAULT
-
- LOCALE_SCRIPT_ALPHA
- LOCALE_SCRIPT_NUMERIC
- LOCALE_SCRIPT_DEFAULT
- );
-
-#-----------------------------------------------------------------------
-# Constants
-#-----------------------------------------------------------------------
-
-use constant LOCALE_CODE_ALPHA_2 => 1;
-use constant LOCALE_CODE_ALPHA_3 => 2;
-use constant LOCALE_CODE_NUMERIC => 3;
-use constant LOCALE_CODE_FIPS => 4;
-use constant LOCALE_CODE_DOM => 5;
-
-use constant LOCALE_CODE_DEFAULT => LOCALE_CODE_ALPHA_2;
-
-use constant LOCALE_LANG_ALPHA_2 => 1;
-use constant LOCALE_LANG_ALPHA_3 => 2;
-use constant LOCALE_LANG_TERM => 3;
-
-use constant LOCALE_LANG_DEFAULT => LOCALE_LANG_ALPHA_2;
-
-use constant LOCALE_CURR_ALPHA => 1;
-use constant LOCALE_CURR_NUMERIC => 2;
-
-use constant LOCALE_CURR_DEFAULT => LOCALE_CURR_ALPHA;
-
-use constant LOCALE_SCRIPT_ALPHA => 1;
-use constant LOCALE_SCRIPT_NUMERIC => 2;
-
-use constant LOCALE_SCRIPT_DEFAULT => LOCALE_SCRIPT_ALPHA;
-
-1;
-# Local Variables:
-# mode: cperl
-# indent-tabs-mode: nil
-# cperl-indent-level: 3
-# cperl-continued-statement-offset: 2
-# cperl-continued-brace-offset: 0
-# cperl-brace-offset: 0
-# cperl-brace-imaginary-offset: 0
-# cperl-label-offset: -2
-# End:
Deleted: vendor/perl/dist/cpan/Locale-Codes/lib/Locale/Constants.pod
===================================================================
--- vendor/perl/dist/cpan/Locale-Codes/lib/Locale/Constants.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Locale-Codes/lib/Locale/Constants.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,41 +0,0 @@
-=pod
-
-=head1 NAME
-
-Locale::Constants - constants for Locale codes
-
-=head1 DESCRIPTION
-
-B<Locale::Constants> defines symbols which are used in the other
-modules from the Locale-Codes distribution.
-
-You shouldn't have to C<use> this module directly yourself - it is
-used by the other Locale modules, which in turn export the symbols.
-
-The constants are documented in each of the Locale modules.
-
-=head1 KNOWN BUGS AND LIMITATIONS
-
-None known.
-
-=head1 SEE ALSO
-
-Locale::Codes
-
-=head1 AUTHOR
-
-See Locale::Codes for full author history.
-
-Currently maintained by Sullivan Beck (sbeck at cpan.org).
-
-=head1 COPYRIGHT
-
- Copyright (c) 1997-2001 Canon Research Centre Europe (CRE).
- Copyright (c) 2001-2010 Neil Bowers
- Copyright (c) 2010-2011 Sullivan Beck
-
-This module is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
-
-=cut
-
Deleted: vendor/perl/dist/cpan/Module-Load-Conditional/t/02_Parse_Version.t
===================================================================
--- vendor/perl/dist/cpan/Module-Load-Conditional/t/02_Parse_Version.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Module-Load-Conditional/t/02_Parse_Version.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,99 +0,0 @@
-BEGIN { chdir 't' if -d 't' }
-
-use strict;
-use lib qw[../lib];
-use Test::More 'no_plan';
-
-my $Class = 'Module::Load::Conditional';
-my $Meth = '_parse_version';
-my $Verbose = @ARGV ? 1 : 0;
-
-use_ok( $Class );
-
-### versions that should parse
-{ for my $str ( __PACKAGE__->_succeed ) {
- my $res = $Class->$Meth( $str, $Verbose );
- ok( defined $res, "String '$str' identified as version string" );
-
- ### XXX version.pm 0.69 pure perl fails tests under 5.6.2.
- ### XXX version.pm <= 0.69 do not have a complete overload
- ### implementation, which causes the following error:
- ### $ perl -Mversion -le'qv(1)+0'
- ### Operation "+": no method found,
- ### left argument in overloaded package version,
- ### right argument has no overloaded magic at -e line 1
- ### so we do the comparison ourselves, and then feed it to
- ### the Test::More::ok().
- ###
- ### Mailed jpeacock and p5p about both issues on 25-1-2007:
- ### http://xrl.us/uem7
- ### (http://www.xray.mpe.mpg.de/mailing-lists/
- ### perl5-porters/2007-01/msg00805.html)
-
- ### Quell "Argument isn't numeric in gt" warnings...
- my $bool = do { local $^W; $res > 0 };
-
- ok( $bool, " Version is '$res'" );
- isnt( $res, '0.0', " Not the default value" );
- }
-}
-
-### version that should fail
-{ for my $str ( __PACKAGE__->_fail ) {
- my $res = $Class->$Meth( $str, $Verbose );
- ok( ! defined $res, "String '$str' is not a version string" );
- }
-}
-
-
-################################
-###
-### VERSION declarations to test
-###
-################################
-
-sub _succeed {
- return grep { /\S/ } map { s/^\s*//; $_ } split "\n", q[
- $VERSION = 1;
- *VERSION = \'1.01';
- use version; $VERSION = qv('0.0.2');
- use version; $VERSION = qv('3.0.14');
- ($VERSION) = '$Revision: 1.1.1.1 $' =~ /\s(\d+\.\d+)\s/;
- ( $VERSION ) = sprintf "%d.%02d", q$Revision: 1.1.1.1 $ =~ m/ (\d+) \. (\d+) /gx;
- ($GD::Graph::area::VERSION) = '$Revision: 1.1.1.1 $' =~ /\s([\d.]+)/;
- ($GD::Graph::axestype::VERSION) = '$Revision: 1.1.1.1 $' =~ /\s([\d.]+)/;
- ($GD::Graph::colour::VERSION) = '$Revision: 1.1.1.1 $' =~ /\s([\d.]+)/;
- ($GD::Graph::pie::VERSION) = '$Revision: 1.1.1.1 $' =~ /\s([\d.]+)/;
- ($GD::Text::Align::VERSION) = '$Revision: 1.1.1.1 $' =~ /\s([\d.]+)/;
- $VERSION = qv('0.0.1');
- use version; $VERSION = qv('0.0.3');
- $VERSION = do { my @r = ( ( $v = q<Version value="0.20.1"> ) =~ /\d+/g ); sprintf "%d.%02d", $r[0], int( $r[1] / 10 ) };
- ($VERSION) = sprintf '%i.%03i', split(/\./,('$Revision: 1.1.1.1 $' =~ /Revision: (\S+)\s/)[0]); # $Date: 2011-05-18 13:33:29 $
- ( $VERSION = q($Id: 02_Parse_Version.t,v 1.1.1.1 2011-05-18 13:33:29 laffer1 Exp $) ) =~ s/^.*\s+(\d+)\/(\d+)\/(\d+).*$/$1$2$3/; # all one line for MakeMaker
- ($VERSION) = q $Revision: 1.1.1.1 $ =~ /([\d.]+)/;
- ($VERSION) = q$Revision: 1.1.1.1 $ =~ /([\d.]+)/;
- $VERSION = "3.0.8";
- $VERSION = '1.0.5';
- ];
-}
-
-sub _fail {
- return grep { /\S/ } map { s/^\s*//; $_ } split "\n", q[
- use vars qw($VERSION $AUTOLOAD %ERROR $ERROR $Warn $Die);
- sub version { $GD::Graph::colour::VERSION }
- my $VERS = qr{ $HWS VERSION $HWS \n }xms;
- diag( "Testing $main_module \$${main_module}::VERSION" );
- our ( $VERSION, $v, $_VERSION );
- my $seen = { q{::} => { 'VERSION' => 1 } }; # avoid multiple scans
- eval "$module->VERSION"
- 'VERSION' => '1.030' # Variable and Value
- 'VERSION' => '2.121_020'
- 'VERSION' => '0.050', # Standard variable $VERSION
- use vars qw( $VERSION $seq @FontDirs );
- $VERSION
- # *VERSION = \'1.01';
- # ( $VERSION ) = '$Revision: 1.1.1.1 $ ' =~ /\$Revision:\s+([^\s]+)/;
- #$VERSION = sprintf("%d.%s", map {s/_//g; $_} q$Name: not supported by cvs2svn $ =~ /-(\d+)_([\d_]+)/);
- #$VERSION = sprintf("%d.%s", map {s/_//g; $_} q$Name: not supported by cvs2svn $ =~ /-(\d+)_([\d_]+)/);
- ];
-}
Deleted: vendor/perl/dist/cpan/Perl-OSType/t/00-compile.t
===================================================================
--- vendor/perl/dist/cpan/Perl-OSType/t/00-compile.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Perl-OSType/t/00-compile.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,53 +0,0 @@
-#!perl
-#
-# This file is part of Perl-OSType
-#
-# This software is copyright (c) 2010 by David Golden.
-#
-# This is free software; you can redistribute it and/or modify it under
-# the same terms as the Perl 5 programming language system itself.
-#
-
-use strict;
-use warnings;
-
-use Test::More;
-use File::Find;
-use File::Temp qw{ tempdir };
-
-my @modules;
-find(
- sub {
- return if $File::Find::name !~ /\.pm\z/;
- my $found = $File::Find::name;
- $found =~ s{^lib/}{};
- $found =~ s{[/\\]}{::}g;
- $found =~ s/\.pm$//;
- # nothing to skip
- push @modules, $found;
- },
- 'lib',
-);
-
-my @scripts = glob "bin/*";
-
-my $plan = scalar(@modules) + scalar(@scripts);
-$plan ? (plan tests => $plan) : (plan skip_all => "no tests to run");
-
-{
- # fake home for cpan-testers
- local $ENV{HOME} = tempdir( CLEANUP => 1 );
-
- like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" )
- for sort @modules;
-
- SKIP: {
- eval "use Test::Script 1.05; 1;";
- skip "Test::Script needed to test script compilation", scalar(@scripts) if $@;
- foreach my $file ( @scripts ) {
- my $script = $file;
- $script =~ s!.*/!!;
- script_compiles( $file, "$script script compiles" );
- }
- }
-}
Deleted: vendor/perl/dist/cpan/Pod-Parser/lib/Pod/Checker.pm
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/lib/Pod/Checker.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/lib/Pod/Checker.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1268 +0,0 @@
-#############################################################################
-# Pod/Checker.pm -- check pod documents for syntax errors
-#
-# Copyright (C) 1994-2000 by Bradford Appleton. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-package Pod::Checker;
-use strict;
-
-use vars qw($VERSION @ISA @EXPORT %VALID_COMMANDS %VALID_SEQUENCES);
-$VERSION = '1.45'; ## Current version of this package
-require 5.005; ## requires this Perl version or later
-
-use Pod::ParseUtils; ## for hyperlinks and lists
-
-=head1 NAME
-
-Pod::Checker, podchecker() - check pod documents for syntax errors
-
-=head1 SYNOPSIS
-
- use Pod::Checker;
-
- $syntax_okay = podchecker($filepath, $outputpath, %options);
-
- my $checker = new Pod::Checker %options;
- $checker->parse_from_file($filepath, \*STDERR);
-
-=head1 OPTIONS/ARGUMENTS
-
-C<$filepath> is the input POD to read and C<$outputpath> is
-where to write POD syntax error messages. Either argument may be a scalar
-indicating a file-path, or else a reference to an open filehandle.
-If unspecified, the input-file it defaults to C<\*STDIN>, and
-the output-file defaults to C<\*STDERR>.
-
-=head2 podchecker()
-
-This function can take a hash of options:
-
-=over 4
-
-=item B<-warnings> =E<gt> I<val>
-
-Turn warnings on/off. I<val> is usually 1 for on, but higher values
-trigger additional warnings. See L<"Warnings">.
-
-=back
-
-=head1 DESCRIPTION
-
-B<podchecker> will perform syntax checking of Perl5 POD format documentation.
-
-Curious/ambitious users are welcome to propose additional features they wish
-to see in B<Pod::Checker> and B<podchecker> and verify that the checks are
-consistent with L<perlpod>.
-
-The following checks are currently performed:
-
-=over 4
-
-=item *
-
-Unknown '=xxxx' commands, unknown 'XE<lt>...E<gt>' interior-sequences,
-and unterminated interior sequences.
-
-=item *
-
-Check for proper balancing of C<=begin> and C<=end>. The contents of such
-a block are generally ignored, i.e. no syntax checks are performed.
-
-=item *
-
-Check for proper nesting and balancing of C<=over>, C<=item> and C<=back>.
-
-=item *
-
-Check for same nested interior-sequences (e.g.
-C<LE<lt>...LE<lt>...E<gt>...E<gt>>).
-
-=item *
-
-Check for malformed or non-existing entities C<EE<lt>...E<gt>>.
-
-=item *
-
-Check for correct syntax of hyperlinks C<LE<lt>...E<gt>>. See L<perlpod>
-for details.
-
-=item *
-
-Check for unresolved document-internal links. This check may also reveal
-misspelled links that seem to be internal links but should be links
-to something else.
-
-=back
-
-=head1 DIAGNOSTICS
-
-=head2 Errors
-
-=over 4
-
-=item * empty =headn
-
-A heading (C<=head1> or C<=head2>) without any text? That ain't no
-heading!
-
-=item * =over on line I<N> without closing =back
-
-The C<=over> command does not have a corresponding C<=back> before the
-next heading (C<=head1> or C<=head2>) or the end of the file.
-
-=item * =item without previous =over
-
-=item * =back without previous =over
-
-An C<=item> or C<=back> command has been found outside a
-C<=over>/C<=back> block.
-
-=item * No argument for =begin
-
-A C<=begin> command was found that is not followed by the formatter
-specification.
-
-=item * =end without =begin
-
-A standalone C<=end> command was found.
-
-=item * Nested =begin's
-
-There were at least two consecutive C<=begin> commands without
-the corresponding C<=end>. Only one C<=begin> may be active at
-a time.
-
-=item * =for without formatter specification
-
-There is no specification of the formatter after the C<=for> command.
-
-=item * unresolved internal link I<NAME>
-
-The given link to I<NAME> does not have a matching node in the current
-POD. This also happened when a single word node name is not enclosed in
-C<"">.
-
-=item * Unknown command "I<CMD>"
-
-An invalid POD command has been found. Valid are C<=head1>, C<=head2>,
-C<=head3>, C<=head4>, C<=over>, C<=item>, C<=back>, C<=begin>, C<=end>,
-C<=for>, C<=pod>, C<=cut>
-
-=item * Unknown interior-sequence "I<SEQ>"
-
-An invalid markup command has been encountered. Valid are:
-C<BE<lt>E<gt>>, C<CE<lt>E<gt>>, C<EE<lt>E<gt>>, C<FE<lt>E<gt>>,
-C<IE<lt>E<gt>>, C<LE<lt>E<gt>>, C<SE<lt>E<gt>>, C<XE<lt>E<gt>>,
-C<ZE<lt>E<gt>>
-
-=item * nested commands I<CMD>E<lt>...I<CMD>E<lt>...E<gt>...E<gt>
-
-Two nested identical markup commands have been found. Generally this
-does not make sense.
-
-=item * garbled entity I<STRING>
-
-The I<STRING> found cannot be interpreted as a character entity.
-
-=item * Entity number out of range
-
-An entity specified by number (dec, hex, oct) is out of range (1-255).
-
-=item * malformed link LE<lt>E<gt>
-
-The link found cannot be parsed because it does not conform to the
-syntax described in L<perlpod>.
-
-=item * nonempty ZE<lt>E<gt>
-
-The C<ZE<lt>E<gt>> sequence is supposed to be empty.
-
-=item * empty XE<lt>E<gt>
-
-The index entry specified contains nothing but whitespace.
-
-=item * Spurious text after =pod / =cut
-
-The commands C<=pod> and C<=cut> do not take any arguments.
-
-=item * Spurious character(s) after =back
-
-The C<=back> command does not take any arguments.
-
-=back
-
-=head2 Warnings
-
-These may not necessarily cause trouble, but indicate mediocre style.
-
-=over 4
-
-=item * multiple occurrence of link target I<name>
-
-The POD file has some C<=item> and/or C<=head> commands that have
-the same text. Potential hyperlinks to such a text cannot be unique then.
-This warning is printed only with warning level greater than one.
-
-=item * line containing nothing but whitespace in paragraph
-
-There is some whitespace on a seemingly empty line. POD is very sensitive
-to such things, so this is flagged. B<vi> users switch on the B<list>
-option to avoid this problem.
-
-=begin _disabled_
-
-=item * file does not start with =head
-
-The file starts with a different POD directive than head.
-This is most probably something you do not want.
-
-=end _disabled_
-
-=item * previous =item has no contents
-
-There is a list C<=item> right above the flagged line that has no
-text contents. You probably want to delete empty items.
-
-=item * preceding non-item paragraph(s)
-
-A list introduced by C<=over> starts with a text or verbatim paragraph,
-but continues with C<=item>s. Move the non-item paragraph out of the
-C<=over>/C<=back> block.
-
-=item * =item type mismatch (I<one> vs. I<two>)
-
-A list started with e.g. a bullet-like C<=item> and continued with a
-numbered one. This is obviously inconsistent. For most translators the
-type of the I<first> C<=item> determines the type of the list.
-
-=item * I<N> unescaped C<E<lt>E<gt>> in paragraph
-
-Angle brackets not written as C<E<lt>ltE<gt>> and C<E<lt>gtE<gt>>
-can potentially cause errors as they could be misinterpreted as
-markup commands. This is only printed when the -warnings level is
-greater than 1.
-
-=item * Unknown entity
-
-A character entity was found that does not belong to the standard
-ISO set or the POD specials C<verbar> and C<sol>.
-
-=item * No items in =over
-
-The list opened with C<=over> does not contain any items.
-
-=item * No argument for =item
-
-C<=item> without any parameters is deprecated. It should either be followed
-by C<*> to indicate an unordered list, by a number (optionally followed
-by a dot) to indicate an ordered (numbered) list or simple text for a
-definition list.
-
-=item * empty section in previous paragraph
-
-The previous section (introduced by a C<=head> command) does not contain
-any text. This usually indicates that something is missing. Note: A
-C<=head1> followed immediately by C<=head2> does not trigger this warning.
-
-=item * Verbatim paragraph in NAME section
-
-The NAME section (C<=head1 NAME>) should consist of a single paragraph
-with the script/module name, followed by a dash `-' and a very short
-description of what the thing is good for.
-
-=item * =headI<n> without preceding higher level
-
-For example if there is a C<=head2> in the POD file prior to a
-C<=head1>.
-
-=back
-
-=head2 Hyperlinks
-
-There are some warnings with respect to malformed hyperlinks:
-
-=over 4
-
-=item * ignoring leading/trailing whitespace in link
-
-There is whitespace at the beginning or the end of the contents of
-LE<lt>...E<gt>.
-
-=item * (section) in '$page' deprecated
-
-There is a section detected in the page name of LE<lt>...E<gt>, e.g.
-C<LE<lt>passwd(2)E<gt>>. POD hyperlinks may point to POD documents only.
-Please write C<CE<lt>passwd(2)E<gt>> instead. Some formatters are able
-to expand this to appropriate code. For links to (builtin) functions,
-please say C<LE<lt>perlfunc/mkdirE<gt>>, without ().
-
-=item * alternative text/node '%s' contains non-escaped | or /
-
-The characters C<|> and C</> are special in the LE<lt>...E<gt> context.
-Although the hyperlink parser does its best to determine which "/" is
-text and which is a delimiter in case of doubt, one ought to escape
-these literal characters like this:
-
- / E<sol>
- | E<verbar>
-
-=back
-
-=head1 RETURN VALUE
-
-B<podchecker> returns the number of POD syntax errors found or -1 if
-there were no POD commands at all found in the file.
-
-=head1 EXAMPLES
-
-See L</SYNOPSIS>
-
-=head1 INTERFACE
-
-While checking, this module collects document properties, e.g. the nodes
-for hyperlinks (C<=headX>, C<=item>) and index entries (C<XE<lt>E<gt>>).
-POD translators can use this feature to syntax-check and get the nodes in
-a first pass before actually starting to convert. This is expensive in terms
-of execution time, but allows for very robust conversions.
-
-Since PodParser-1.24 the B<Pod::Checker> module uses only the B<poderror>
-method to print errors and warnings. The summary output (e.g.
-"Pod syntax OK") has been dropped from the module and has been included in
-B<podchecker> (the script). This allows users of B<Pod::Checker> to
-control completely the output behavior. Users of B<podchecker> (the script)
-get the well-known behavior.
-
-=cut
-
-#############################################################################
-
-#use diagnostics;
-use Carp qw(croak);
-use Exporter;
-use Pod::Parser;
-
- at ISA = qw(Pod::Parser);
- at EXPORT = qw(&podchecker);
-
-my %VALID_COMMANDS = (
- 'pod' => 1,
- 'cut' => 1,
- 'head1' => 1,
- 'head2' => 1,
- 'head3' => 1,
- 'head4' => 1,
- 'over' => 1,
- 'back' => 1,
- 'item' => 1,
- 'for' => 1,
- 'begin' => 1,
- 'end' => 1,
- 'encoding' => 1,
-);
-
-my %VALID_SEQUENCES = (
- 'I' => 1,
- 'B' => 1,
- 'S' => 1,
- 'C' => 1,
- 'L' => 1,
- 'F' => 1,
- 'X' => 1,
- 'Z' => 1,
- 'E' => 1,
-);
-
-# stolen from HTML::Entities
-my %ENTITIES = (
- # Some normal chars that have special meaning in SGML context
- amp => '&', # ampersand
-'gt' => '>', # greater than
-'lt' => '<', # less than
- quot => '"', # double quote
-
- # PUBLIC ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML
- AElig => '\xC6', # capital AE diphthong (ligature)
- Aacute => '\xC1', # capital A, acute accent
- Acirc => '\xC2', # capital A, circumflex accent
- Agrave => '\xC0', # capital A, grave accent
- Aring => '\xC5', # capital A, ring
- Atilde => '\xC3', # capital A, tilde
- Auml => '\xC4', # capital A, dieresis or umlaut mark
- Ccedil => '\xC7', # capital C, cedilla
- ETH => '\xD0', # capital Eth, Icelandic
- Eacute => '\xC9', # capital E, acute accent
- Ecirc => '\xCA', # capital E, circumflex accent
- Egrave => '\xC8', # capital E, grave accent
- Euml => '\xCB', # capital E, dieresis or umlaut mark
- Iacute => '\xCD', # capital I, acute accent
- Icirc => '\xCE', # capital I, circumflex accent
- Igrave => '\xCC', # capital I, grave accent
- Iuml => '\xCF', # capital I, dieresis or umlaut mark
- Ntilde => '\xD1', # capital N, tilde
- Oacute => '\xD3', # capital O, acute accent
- Ocirc => '\xD4', # capital O, circumflex accent
- Ograve => '\xD2', # capital O, grave accent
- Oslash => '\xD8', # capital O, slash
- Otilde => '\xD5', # capital O, tilde
- Ouml => '\xD6', # capital O, dieresis or umlaut mark
- THORN => '\xDE', # capital THORN, Icelandic
- Uacute => '\xDA', # capital U, acute accent
- Ucirc => '\xDB', # capital U, circumflex accent
- Ugrave => '\xD9', # capital U, grave accent
- Uuml => '\xDC', # capital U, dieresis or umlaut mark
- Yacute => '\xDD', # capital Y, acute accent
- aacute => '\xE1', # small a, acute accent
- acirc => '\xE2', # small a, circumflex accent
- aelig => '\xE6', # small ae diphthong (ligature)
- agrave => '\xE0', # small a, grave accent
- aring => '\xE5', # small a, ring
- atilde => '\xE3', # small a, tilde
- auml => '\xE4', # small a, dieresis or umlaut mark
- ccedil => '\xE7', # small c, cedilla
- eacute => '\xE9', # small e, acute accent
- ecirc => '\xEA', # small e, circumflex accent
- egrave => '\xE8', # small e, grave accent
- eth => '\xF0', # small eth, Icelandic
- euml => '\xEB', # small e, dieresis or umlaut mark
- iacute => '\xED', # small i, acute accent
- icirc => '\xEE', # small i, circumflex accent
- igrave => '\xEC', # small i, grave accent
- iuml => '\xEF', # small i, dieresis or umlaut mark
- ntilde => '\xF1', # small n, tilde
- oacute => '\xF3', # small o, acute accent
- ocirc => '\xF4', # small o, circumflex accent
- ograve => '\xF2', # small o, grave accent
- oslash => '\xF8', # small o, slash
- otilde => '\xF5', # small o, tilde
- ouml => '\xF6', # small o, dieresis or umlaut mark
- szlig => '\xDF', # small sharp s, German (sz ligature)
- thorn => '\xFE', # small thorn, Icelandic
- uacute => '\xFA', # small u, acute accent
- ucirc => '\xFB', # small u, circumflex accent
- ugrave => '\xF9', # small u, grave accent
- uuml => '\xFC', # small u, dieresis or umlaut mark
- yacute => '\xFD', # small y, acute accent
- yuml => '\xFF', # small y, dieresis or umlaut mark
-
- # Some extra Latin 1 chars that are listed in the HTML3.2 draft (21-May-96)
- copy => '\xA9', # copyright sign
- reg => '\xAE', # registered sign
- nbsp => "\240", # non breaking space
-
- # Additional ISO-8859/1 entities listed in rfc1866 (section 14)
- iexcl => '\xA1',
- cent => '\xA2',
- pound => '\xA3',
- curren => '\xA4',
- yen => '\xA5',
- brvbar => '\xA6',
- sect => '\xA7',
- uml => '\xA8',
- ordf => '\xAA',
- laquo => '\xAB',
-'not' => '\xAC', # not is a keyword in perl
- shy => '\xAD',
- macr => '\xAF',
- deg => '\xB0',
- plusmn => '\xB1',
- sup1 => '\xB9',
- sup2 => '\xB2',
- sup3 => '\xB3',
- acute => '\xB4',
- micro => '\xB5',
- para => '\xB6',
- middot => '\xB7',
- cedil => '\xB8',
- ordm => '\xBA',
- raquo => '\xBB',
- frac14 => '\xBC',
- frac12 => '\xBD',
- frac34 => '\xBE',
- iquest => '\xBF',
-'times' => '\xD7', # times is a keyword in perl
- divide => '\xF7',
-
-# some POD special entities
- verbar => '|',
- sol => '/'
-);
-
-##---------------------------------------------------------------------------
-
-##---------------------------------
-## Function definitions begin here
-##---------------------------------
-
-sub podchecker {
- my ($infile, $outfile, %options) = @_;
- local $_;
-
- ## Set defaults
- $infile ||= \*STDIN;
- $outfile ||= \*STDERR;
-
- ## Now create a pod checker
- my $checker = new Pod::Checker(%options);
-
- ## Now check the pod document for errors
- $checker->parse_from_file($infile, $outfile);
-
- ## Return the number of errors found
- return $checker->num_errors();
-}
-
-##---------------------------------------------------------------------------
-
-##-------------------------------
-## Method definitions begin here
-##-------------------------------
-
-##################################
-
-=over 4
-
-=item C<Pod::Checker-E<gt>new( %options )>
-
-Return a reference to a new Pod::Checker object that inherits from
-Pod::Parser and is used for calling the required methods later. The
-following options are recognized:
-
-C<-warnings =E<gt> num>
- Print warnings if C<num> is true. The higher the value of C<num>,
-the more warnings are printed. Currently there are only levels 1 and 2.
-
-C<-quiet =E<gt> num>
- If C<num> is true, do not print any errors/warnings. This is useful
-when Pod::Checker is used to munge POD code into plain text from within
-POD formatters.
-
-=cut
-
-## sub new {
-## my $this = shift;
-## my $class = ref($this) || $this;
-## my %params = @_;
-## my $self = {%params};
-## bless $self, $class;
-## $self->initialize();
-## return $self;
-## }
-
-sub initialize {
- my $self = shift;
- ## Initialize number of errors, and setup an error function to
- ## increment this number and then print to the designated output.
- $self->{_NUM_ERRORS} = 0;
- $self->{_NUM_WARNINGS} = 0;
- $self->{-quiet} ||= 0;
- # set the error handling subroutine
- $self->errorsub($self->{-quiet} ? sub { 1; } : 'poderror');
- $self->{_commands} = 0; # total number of POD commands encountered
- $self->{_list_stack} = []; # stack for nested lists
- $self->{_have_begin} = ''; # stores =begin
- $self->{_links} = []; # stack for internal hyperlinks
- $self->{_nodes} = []; # stack for =head/=item nodes
- $self->{_index} = []; # text in X<>
- # print warnings?
- $self->{-warnings} = 1 unless(defined $self->{-warnings});
- $self->{_current_head1} = ''; # the current =head1 block
- $self->parseopts(-process_cut_cmd => 1, -warnings => $self->{-warnings});
-}
-
-##################################
-
-=item C<$checker-E<gt>poderror( @args )>
-
-=item C<$checker-E<gt>poderror( {%opts}, @args )>
-
-Internal method for printing errors and warnings. If no options are
-given, simply prints "@_". The following options are recognized and used
-to form the output:
-
- -msg
-
-A message to print prior to C<@args>.
-
- -line
-
-The line number the error occurred in.
-
- -file
-
-The file (name) the error occurred in.
-
- -severity
-
-The error level, should be 'WARNING' or 'ERROR'.
-
-=cut
-
-# Invoked as $self->poderror( @args ), or $self->poderror( {%opts}, @args )
-sub poderror {
- my $self = shift;
- my %opts = (ref $_[0]) ? %{shift()} : ();
-
- ## Retrieve options
- chomp( my $msg = ($opts{-msg} || '')."@_" );
- my $line = (exists $opts{-line}) ? " at line $opts{-line}" : '';
- my $file = (exists $opts{-file}) ? " in file $opts{-file}" : '';
- unless (exists $opts{-severity}) {
- ## See if can find severity in message prefix
- $opts{-severity} = $1 if ( $msg =~ s/^\**\s*([A-Z]{3,}):\s+// );
- }
- my $severity = (exists $opts{-severity}) ? "*** $opts{-severity}: " : '';
-
- ## Increment error count and print message "
- ++($self->{_NUM_ERRORS})
- if(!%opts || ($opts{-severity} && $opts{-severity} eq 'ERROR'));
- ++($self->{_NUM_WARNINGS})
- if(!%opts || ($opts{-severity} && $opts{-severity} eq 'WARNING'));
- unless($self->{-quiet}) {
- my $out_fh = $self->output_handle() || \*STDERR;
- print $out_fh ($severity, $msg, $line, $file, "\n")
- if($self->{-warnings} || !%opts || $opts{-severity} ne 'WARNING');
- }
-}
-
-##################################
-
-=item C<$checker-E<gt>num_errors()>
-
-Set (if argument specified) and retrieve the number of errors found.
-
-=cut
-
-sub num_errors {
- return (@_ > 1) ? ($_[0]->{_NUM_ERRORS} = $_[1]) : $_[0]->{_NUM_ERRORS};
-}
-
-##################################
-
-=item C<$checker-E<gt>num_warnings()>
-
-Set (if argument specified) and retrieve the number of warnings found.
-
-=cut
-
-sub num_warnings {
- return (@_ > 1) ? ($_[0]->{_NUM_WARNINGS} = $_[1]) : $_[0]->{_NUM_WARNINGS};
-}
-
-##################################
-
-=item C<$checker-E<gt>name()>
-
-Set (if argument specified) and retrieve the canonical name of POD as
-found in the C<=head1 NAME> section.
-
-=cut
-
-sub name {
- return (@_ > 1 && $_[1]) ?
- ($_[0]->{-name} = $_[1]) : $_[0]->{-name};
-}
-
-##################################
-
-=item C<$checker-E<gt>node()>
-
-Add (if argument specified) and retrieve the nodes (as defined by C<=headX>
-and C<=item>) of the current POD. The nodes are returned in the order of
-their occurrence. They consist of plain text, each piece of whitespace is
-collapsed to a single blank.
-
-=cut
-
-sub node {
- my ($self,$text) = @_;
- if(defined $text) {
- $text =~ s/\s+$//s; # strip trailing whitespace
- $text =~ s/\s+/ /gs; # collapse whitespace
- # add node, order important!
- push(@{$self->{_nodes}}, $text);
- # keep also a uniqueness counter
- $self->{_unique_nodes}->{$text}++ if($text !~ /^\s*$/s);
- return $text;
- }
- @{$self->{_nodes}};
-}
-
-##################################
-
-=item C<$checker-E<gt>idx()>
-
-Add (if argument specified) and retrieve the index entries (as defined by
-C<XE<lt>E<gt>>) of the current POD. They consist of plain text, each piece
-of whitespace is collapsed to a single blank.
-
-=cut
-
-# set/return index entries of current POD
-sub idx {
- my ($self,$text) = @_;
- if(defined $text) {
- $text =~ s/\s+$//s; # strip trailing whitespace
- $text =~ s/\s+/ /gs; # collapse whitespace
- # add node, order important!
- push(@{$self->{_index}}, $text);
- # keep also a uniqueness counter
- $self->{_unique_nodes}->{$text}++ if($text !~ /^\s*$/s);
- return $text;
- }
- @{$self->{_index}};
-}
-
-##################################
-
-=item C<$checker-E<gt>hyperlink()>
-
-Add (if argument specified) and retrieve the hyperlinks (as defined by
-C<LE<lt>E<gt>>) of the current POD. They consist of a 2-item array: line
-number and C<Pod::Hyperlink> object.
-
-=back
-
-=cut
-
-# set/return hyperlinks of the current POD
-sub hyperlink {
- my $self = shift;
- if($_[0]) {
- push(@{$self->{_links}}, $_[0]);
- return $_[0];
- }
- @{$self->{_links}};
-}
-
-## overrides for Pod::Parser
-
-sub end_pod {
- ## Do some final checks and
- ## print the number of errors found
- my $self = shift;
- my $infile = $self->input_file();
-
- if(@{$self->{_list_stack}}) {
- my $list;
- while(($list = $self->_close_list('EOF',$infile)) &&
- $list->indent() ne 'auto') {
- $self->poderror({ -line => 'EOF', -file => $infile,
- -severity => 'ERROR', -msg => '=over on line ' .
- $list->start() . ' without closing =back' });
- }
- }
-
- # check validity of document internal hyperlinks
- # first build the node names from the paragraph text
- my %nodes;
- foreach($self->node()) {
- $nodes{$_} = 1;
- if(/^(\S+)\s+\S/) {
- # we have more than one word. Use the first as a node, too.
- # This is used heavily in perlfunc.pod
- $nodes{$1} ||= 2; # derived node
- }
- }
- foreach($self->idx()) {
- $nodes{$_} = 3; # index node
- }
- foreach($self->hyperlink()) {
- my ($line,$link) = @$_;
- # _TODO_ what if there is a link to the page itself by the name,
- # e.g. in Tk::Pod : L<Tk::Pod/"DESCRIPTION">
- if($link->node() && !$link->page() && $link->type() ne 'hyperlink') {
- my $node = $self->_check_ptree($self->parse_text($link->node(),
- $line), $line, $infile, 'L');
- if($node && !$nodes{$node}) {
- $self->poderror({ -line => $line || '', -file => $infile,
- -severity => 'ERROR',
- -msg => "unresolved internal link '$node'"});
- }
- }
- }
-
- # check the internal nodes for uniqueness. This pertains to
- # =headX, =item and X<...>
- if($self->{-warnings} && $self->{-warnings}>1) {
- foreach(grep($self->{_unique_nodes}->{$_} > 1,
- keys %{$self->{_unique_nodes}})) {
- $self->poderror({ -line => '-', -file => $infile,
- -severity => 'WARNING',
- -msg => "multiple occurrence of link target '$_'"});
- }
- }
-
- # no POD found here
- $self->num_errors(-1) if($self->{_commands} == 0);
-}
-
-# check a POD command directive
-sub command {
- my ($self, $cmd, $paragraph, $line_num, $pod_para) = @_;
- my ($file, $line) = $pod_para->file_line;
- ## Check the command syntax
- my $arg; # this will hold the command argument
- if (! $VALID_COMMANDS{$cmd}) {
- $self->poderror({ -line => $line, -file => $file, -severity => 'ERROR',
- -msg => "Unknown command '$cmd'" });
- }
- else { # found a valid command
- $self->{_commands}++; # delete this line if below is enabled again
-
- ##### following check disabled due to strong request
- #if(!$self->{_commands}++ && $cmd !~ /^head/) {
- # $self->poderror({ -line => $line, -file => $file,
- # -severity => 'WARNING',
- # -msg => "file does not start with =head" });
- #}
-
- # check syntax of particular command
- if($cmd eq 'over') {
- # check for argument
- $arg = $self->interpolate_and_check($paragraph, $line,$file);
- my $indent = 4; # default
- if($arg && $arg =~ /^\s*(\d+)\s*$/) {
- $indent = $1;
- }
- # start a new list
- $self->_open_list($indent,$line,$file);
- }
- elsif($cmd eq 'item') {
- # are we in a list?
- unless(@{$self->{_list_stack}}) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => '=item without previous =over' });
- # auto-open in case we encounter many more
- $self->_open_list('auto',$line,$file);
- }
- my $list = $self->{_list_stack}->[0];
- # check whether the previous item had some contents
- if(defined $self->{_list_item_contents} &&
- $self->{_list_item_contents} == 0) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'previous =item has no contents' });
- }
- if($list->{_has_par}) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'preceding non-item paragraph(s)' });
- delete $list->{_has_par};
- }
- # check for argument
- $arg = $self->interpolate_and_check($paragraph, $line, $file);
- if($arg && $arg =~ /(\S+)/) {
- $arg =~ s/[\s\n]+$//;
- my $type;
- if($arg =~ /^[*]\s*(\S*.*)/) {
- $type = 'bullet';
- $self->{_list_item_contents} = $1 ? 1 : 0;
- $arg = $1;
- }
- elsif($arg =~ /^\d+\.?\s+(\S*)/) {
- $type = 'number';
- $self->{_list_item_contents} = $1 ? 1 : 0;
- $arg = $1;
- }
- else {
- $type = 'definition';
- $self->{_list_item_contents} = 1;
- }
- my $first = $list->type();
- if($first && $first ne $type) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => "=item type mismatch ('$first' vs. '$type')"});
- }
- else { # first item
- $list->type($type);
- }
- }
- else {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'No argument for =item' });
- $arg = ' '; # empty
- $self->{_list_item_contents} = 0;
- }
- # add this item
- $list->item($arg);
- # remember this node
- $self->node($arg);
- }
- elsif($cmd eq 'back') {
- # check if we have an open list
- unless(@{$self->{_list_stack}}) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => '=back without previous =over' });
- }
- else {
- # check for spurious characters
- $arg = $self->interpolate_and_check($paragraph, $line,$file);
- if($arg && $arg =~ /\S/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'Spurious character(s) after =back' });
- }
- # close list
- my $list = $self->_close_list($line,$file);
- # check for empty lists
- if(!$list->item() && $self->{-warnings}) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'No items in =over (at line ' .
- $list->start() . ') / =back list'});
- }
- }
- }
- elsif($cmd =~ /^head(\d+)/) {
- my $hnum = $1;
- $self->{"_have_head_$hnum"}++; # count head types
- if($hnum > 1 && !$self->{'_have_head_'.($hnum -1)}) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => "=head$hnum without preceding higher level"});
- }
- # check whether the previous =head section had some contents
- if(defined $self->{_commands_in_head} &&
- $self->{_commands_in_head} == 0 &&
- defined $self->{_last_head} &&
- $self->{_last_head} >= $hnum) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'empty section in previous paragraph'});
- }
- $self->{_commands_in_head} = -1;
- $self->{_last_head} = $hnum;
- # check if there is an open list
- if(@{$self->{_list_stack}}) {
- my $list;
- while(($list = $self->_close_list($line,$file)) &&
- $list->indent() ne 'auto') {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => '=over on line '. $list->start() .
- " without closing =back (at $cmd)" });
- }
- }
- # remember this node
- $arg = $self->interpolate_and_check($paragraph, $line,$file);
- $arg =~ s/[\s\n]+$//s;
- $self->node($arg);
- unless(length($arg)) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => "empty =$cmd"});
- }
- if($cmd eq 'head1') {
- $self->{_current_head1} = $arg;
- } else {
- $self->{_current_head1} = '';
- }
- }
- elsif($cmd eq 'begin') {
- if($self->{_have_begin}) {
- # already have a begin
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => q{Nested =begin's (first at line } .
- $self->{_have_begin} . ')'});
- }
- else {
- # check for argument
- $arg = $self->interpolate_and_check($paragraph, $line,$file);
- unless($arg && $arg =~ /(\S+)/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'No argument for =begin'});
- }
- # remember the =begin
- $self->{_have_begin} = "$line:$1";
- }
- }
- elsif($cmd eq 'end') {
- if($self->{_have_begin}) {
- # close the existing =begin
- $self->{_have_begin} = '';
- # check for spurious characters
- $arg = $self->interpolate_and_check($paragraph, $line,$file);
- # the closing argument is optional
- #if($arg && $arg =~ /\S/) {
- # $self->poderror({ -line => $line, -file => $file,
- # -severity => 'WARNING',
- # -msg => "Spurious character(s) after =end" });
- #}
- }
- else {
- # don't have a matching =begin
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => '=end without =begin' });
- }
- }
- elsif($cmd eq 'for') {
- unless($paragraph =~ /\s*(\S+)\s*/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => '=for without formatter specification' });
- }
- $arg = ''; # do not expand paragraph below
- }
- elsif($cmd =~ /^(pod|cut)$/) {
- # check for argument
- $arg = $self->interpolate_and_check($paragraph, $line,$file);
- if($arg && $arg =~ /(\S+)/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => "Spurious text after =$cmd"});
- }
- }
- $self->{_commands_in_head}++;
- ## Check the interior sequences in the command-text
- $self->interpolate_and_check($paragraph, $line,$file)
- unless(defined $arg);
- }
-}
-
-sub _open_list
-{
- my ($self,$indent,$line,$file) = @_;
- my $list = Pod::List->new(
- -indent => $indent,
- -start => $line,
- -file => $file);
- unshift(@{$self->{_list_stack}}, $list);
- undef $self->{_list_item_contents};
- $list;
-}
-
-sub _close_list
-{
- my ($self,$line,$file) = @_;
- my $list = shift(@{$self->{_list_stack}});
- if(defined $self->{_list_item_contents} &&
- $self->{_list_item_contents} == 0) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'previous =item has no contents' });
- }
- undef $self->{_list_item_contents};
- $list;
-}
-
-# process a block of some text
-sub interpolate_and_check {
- my ($self, $paragraph, $line, $file) = @_;
- ## Check the interior sequences in the command-text
- # and return the text
- $self->_check_ptree(
- $self->parse_text($paragraph,$line), $line, $file, '');
-}
-
-sub _check_ptree {
- my ($self,$ptree,$line,$file,$nestlist) = @_;
- local($_);
- my $text = '';
- # process each node in the parse tree
- foreach(@$ptree) {
- # regular text chunk
- unless(ref) {
- # count the unescaped angle brackets
- # complain only when warning level is greater than 1
- if($self->{-warnings} && $self->{-warnings}>1) {
- my $count;
- if($count = tr/<>/<>/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => "$count unescaped <> in paragraph" });
- }
- }
- $text .= $_;
- next;
- }
- # have an interior sequence
- my $cmd = $_->cmd_name();
- my $contents = $_->parse_tree();
- ($file,$line) = $_->file_line();
- # check for valid tag
- if (! $VALID_SEQUENCES{$cmd}) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => qq(Unknown interior-sequence '$cmd')});
- # expand it anyway
- $text .= $self->_check_ptree($contents, $line, $file, "$nestlist$cmd");
- next;
- }
- if($nestlist =~ /$cmd/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => "nested commands $cmd<...$cmd<...>...>"});
- # _TODO_ should we add the contents anyway?
- # expand it anyway, see below
- }
- if($cmd eq 'E') {
- # preserve entities
- if(@$contents > 1 || ref $$contents[0] || $$contents[0] !~ /^\w+$/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'garbled entity ' . $_->raw_text()});
- next;
- }
- my $ent = $$contents[0];
- my $val;
- if($ent =~ /^0x[0-9a-f]+$/i) {
- # hexadec entity
- $val = hex($ent);
- }
- elsif($ent =~ /^0\d+$/) {
- # octal
- $val = oct($ent);
- }
- elsif($ent =~ /^\d+$/) {
- # numeric entity
- $val = $ent;
- }
- if(defined $val) {
- if($val>0 && $val<256) {
- $text .= chr($val);
- }
- else {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'Entity number out of range ' . $_->raw_text()});
- }
- }
- elsif($ENTITIES{$ent}) {
- # known ISO entity
- $text .= $ENTITIES{$ent};
- }
- else {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'Unknown entity ' . $_->raw_text()});
- $text .= "E<$ent>";
- }
- }
- elsif($cmd eq 'L') {
- # try to parse the hyperlink
- my $link = Pod::Hyperlink->new($contents->raw_text());
- unless(defined $link) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'malformed link ' . $_->raw_text() ." : $@"});
- next;
- }
- $link->line($line); # remember line
- if($self->{-warnings}) {
- foreach my $w ($link->warning()) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => $w });
- }
- }
- # check the link text
- $text .= $self->_check_ptree($self->parse_text($link->text(),
- $line), $line, $file, "$nestlist$cmd");
- # remember link
- $self->hyperlink([$line,$link]);
- }
- elsif($cmd =~ /[BCFIS]/) {
- # add the guts
- $text .= $self->_check_ptree($contents, $line, $file, "$nestlist$cmd");
- }
- elsif($cmd eq 'Z') {
- if(length($contents->raw_text())) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'Nonempty Z<>'});
- }
- }
- elsif($cmd eq 'X') {
- my $idx = $self->_check_ptree($contents, $line, $file, "$nestlist$cmd");
- if($idx =~ /^\s*$/s) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'Empty X<>'});
- }
- else {
- # remember this node
- $self->idx($idx);
- }
- }
- else {
- # not reached
- croak 'internal error';
- }
- }
- $text;
-}
-
-# process a block of verbatim text
-sub verbatim {
- ## Nothing particular to check
- my ($self, $paragraph, $line_num, $pod_para) = @_;
-
- $self->_preproc_par($paragraph);
-
- if($self->{_current_head1} eq 'NAME') {
- my ($file, $line) = $pod_para->file_line;
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'Verbatim paragraph in NAME section' });
- }
-}
-
-# process a block of regular text
-sub textblock {
- my ($self, $paragraph, $line_num, $pod_para) = @_;
- my ($file, $line) = $pod_para->file_line;
-
- $self->_preproc_par($paragraph);
-
- # skip this paragraph if in a =begin block
- unless($self->{_have_begin}) {
- my $block = $self->interpolate_and_check($paragraph, $line,$file);
- if($self->{_current_head1} eq 'NAME') {
- if($block =~ /^\s*(\S+?)\s*[,-]/) {
- # this is the canonical name
- $self->{-name} = $1 unless(defined $self->{-name});
- }
- }
- }
-}
-
-sub _preproc_par
-{
- my $self = shift;
- $_[0] =~ s/[\s\n]+$//;
- if($_[0]) {
- $self->{_commands_in_head}++;
- $self->{_list_item_contents}++ if(defined $self->{_list_item_contents});
- if(@{$self->{_list_stack}} && !$self->{_list_stack}->[0]->item()) {
- $self->{_list_stack}->[0]->{_has_par} = 1;
- }
- }
-}
-
-1;
-
-__END__
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Brad Appleton E<lt>bradapp at enteract.comE<gt> (initial version),
-Marek Rouchal E<lt>marekr at cpan.orgE<gt>
-
-Based on code for B<Pod::Text::pod2text()> written by
-Tom Christiansen E<lt>tchrist at mox.perl.comE<gt>
-
-=cut
-
Deleted: vendor/perl/dist/cpan/Pod-Parser/lib/Pod/Usage.pm
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/lib/Pod/Usage.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/lib/Pod/Usage.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,730 +0,0 @@
-#############################################################################
-# Pod/Usage.pm -- print usage messages for the running script.
-#
-# Copyright (C) 1996-2000 by Bradford Appleton. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-package Pod::Usage;
-use strict;
-
-use vars qw($VERSION @ISA @EXPORT);
-$VERSION = '1.36'; ## Current version of this package
-require 5.005; ## requires this Perl version or later
-
-=head1 NAME
-
-Pod::Usage, pod2usage() - print a usage message from embedded pod documentation
-
-=head1 SYNOPSIS
-
- use Pod::Usage
-
- my $message_text = "This text precedes the usage message.";
- my $exit_status = 2; ## The exit status to use
- my $verbose_level = 0; ## The verbose level to use
- my $filehandle = \*STDERR; ## The filehandle to write to
-
- pod2usage($message_text);
-
- pod2usage($exit_status);
-
- pod2usage( { -message => $message_text ,
- -exitval => $exit_status ,
- -verbose => $verbose_level,
- -output => $filehandle } );
-
- pod2usage( -msg => $message_text ,
- -exitval => $exit_status ,
- -verbose => $verbose_level,
- -output => $filehandle );
-
- pod2usage( -verbose => 2,
- -noperldoc => 1 )
-
-=head1 ARGUMENTS
-
-B<pod2usage> should be given either a single argument, or a list of
-arguments corresponding to an associative array (a "hash"). When a single
-argument is given, it should correspond to exactly one of the following:
-
-=over 4
-
-=item *
-
-A string containing the text of a message to print I<before> printing
-the usage message
-
-=item *
-
-A numeric value corresponding to the desired exit status
-
-=item *
-
-A reference to a hash
-
-=back
-
-If more than one argument is given then the entire argument list is
-assumed to be a hash. If a hash is supplied (either as a reference or
-as a list) it should contain one or more elements with the following
-keys:
-
-=over 4
-
-=item C<-message>
-
-=item C<-msg>
-
-The text of a message to print immediately prior to printing the
-program's usage message.
-
-=item C<-exitval>
-
-The desired exit status to pass to the B<exit()> function.
-This should be an integer, or else the string "NOEXIT" to
-indicate that control should simply be returned without
-terminating the invoking process.
-
-=item C<-verbose>
-
-The desired level of "verboseness" to use when printing the usage
-message. If the corresponding value is 0, then only the "SYNOPSIS"
-section of the pod documentation is printed. If the corresponding value
-is 1, then the "SYNOPSIS" section, along with any section entitled
-"OPTIONS", "ARGUMENTS", or "OPTIONS AND ARGUMENTS" is printed. If the
-corresponding value is 2 or more then the entire manpage is printed.
-
-The special verbosity level 99 requires to also specify the -sections
-parameter; then these sections are extracted (see L<Pod::Select>)
-and printed.
-
-=item C<-sections>
-
-A string representing a selection list for sections to be printed
-when -verbose is set to 99, e.g. C<"NAME|SYNOPSIS|DESCRIPTION|VERSION">.
-
-Alternatively, an array reference of section specifications can be used:
-
- pod2usage(-verbose => 99,
- -sections => [ qw(fred fred/subsection) ] );
-
-=item C<-output>
-
-A reference to a filehandle, or the pathname of a file to which the
-usage message should be written. The default is C<\*STDERR> unless the
-exit value is less than 2 (in which case the default is C<\*STDOUT>).
-
-=item C<-input>
-
-A reference to a filehandle, or the pathname of a file from which the
-invoking script's pod documentation should be read. It defaults to the
-file indicated by C<$0> (C<$PROGRAM_NAME> for users of F<English.pm>).
-
-If you are calling B<pod2usage()> from a module and want to display
-that module's POD, you can use this:
-
- use Pod::Find qw(pod_where);
- pod2usage( -input => pod_where({-inc => 1}, __PACKAGE__) );
-
-=item C<-pathlist>
-
-A list of directory paths. If the input file does not exist, then it
-will be searched for in the given directory list (in the order the
-directories appear in the list). It defaults to the list of directories
-implied by C<$ENV{PATH}>. The list may be specified either by a reference
-to an array, or by a string of directory paths which use the same path
-separator as C<$ENV{PATH}> on your system (e.g., C<:> for Unix, C<;> for
-MSWin32 and DOS).
-
-=item C<-noperldoc>
-
-By default, Pod::Usage will call L<perldoc> when -verbose >= 2 is
-specified. This does not work well e.g. if the script was packed
-with L<PAR>. The -noperldoc option suppresses the external call to
-L<perldoc> and uses the simple text formatter (L<Pod::Text>) to
-output the POD.
-
-=back
-
-=head1 DESCRIPTION
-
-B<pod2usage> will print a usage message for the invoking script (using
-its embedded pod documentation) and then exit the script with the
-desired exit status. The usage message printed may have any one of three
-levels of "verboseness": If the verbose level is 0, then only a synopsis
-is printed. If the verbose level is 1, then the synopsis is printed
-along with a description (if present) of the command line options and
-arguments. If the verbose level is 2, then the entire manual page is
-printed.
-
-Unless they are explicitly specified, the default values for the exit
-status, verbose level, and output stream to use are determined as
-follows:
-
-=over 4
-
-=item *
-
-If neither the exit status nor the verbose level is specified, then the
-default is to use an exit status of 2 with a verbose level of 0.
-
-=item *
-
-If an exit status I<is> specified but the verbose level is I<not>, then the
-verbose level will default to 1 if the exit status is less than 2 and
-will default to 0 otherwise.
-
-=item *
-
-If an exit status is I<not> specified but verbose level I<is> given, then
-the exit status will default to 2 if the verbose level is 0 and will
-default to 1 otherwise.
-
-=item *
-
-If the exit status used is less than 2, then output is printed on
-C<STDOUT>. Otherwise output is printed on C<STDERR>.
-
-=back
-
-Although the above may seem a bit confusing at first, it generally does
-"the right thing" in most situations. This determination of the default
-values to use is based upon the following typical Unix conventions:
-
-=over 4
-
-=item *
-
-An exit status of 0 implies "success". For example, B<diff(1)> exits
-with a status of 0 if the two files have the same contents.
-
-=item *
-
-An exit status of 1 implies possibly abnormal, but non-defective, program
-termination. For example, B<grep(1)> exits with a status of 1 if
-it did I<not> find a matching line for the given regular expression.
-
-=item *
-
-An exit status of 2 or more implies a fatal error. For example, B<ls(1)>
-exits with a status of 2 if you specify an illegal (unknown) option on
-the command line.
-
-=item *
-
-Usage messages issued as a result of bad command-line syntax should go
-to C<STDERR>. However, usage messages issued due to an explicit request
-to print usage (like specifying B<-help> on the command line) should go
-to C<STDOUT>, just in case the user wants to pipe the output to a pager
-(such as B<more(1)>).
-
-=item *
-
-If program usage has been explicitly requested by the user, it is often
-desirable to exit with a status of 1 (as opposed to 0) after issuing
-the user-requested usage message. It is also desirable to give a
-more verbose description of program usage in this case.
-
-=back
-
-B<pod2usage> doesn't force the above conventions upon you, but it will
-use them by default if you don't expressly tell it to do otherwise. The
-ability of B<pod2usage()> to accept a single number or a string makes it
-convenient to use as an innocent looking error message handling function:
-
- use Pod::Usage;
- use Getopt::Long;
-
- ## Parse options
- GetOptions("help", "man", "flag1") || pod2usage(2);
- pod2usage(1) if ($opt_help);
- pod2usage(-verbose => 2) if ($opt_man);
-
- ## Check for too many filenames
- pod2usage("$0: Too many files given.\n") if (@ARGV > 1);
-
-Some user's however may feel that the above "economy of expression" is
-not particularly readable nor consistent and may instead choose to do
-something more like the following:
-
- use Pod::Usage;
- use Getopt::Long;
-
- ## Parse options
- GetOptions("help", "man", "flag1") || pod2usage(-verbose => 0);
- pod2usage(-verbose => 1) if ($opt_help);
- pod2usage(-verbose => 2) if ($opt_man);
-
- ## Check for too many filenames
- pod2usage(-verbose => 2, -message => "$0: Too many files given.\n")
- if (@ARGV > 1);
-
-As with all things in Perl, I<there's more than one way to do it>, and
-B<pod2usage()> adheres to this philosophy. If you are interested in
-seeing a number of different ways to invoke B<pod2usage> (although by no
-means exhaustive), please refer to L<"EXAMPLES">.
-
-=head1 EXAMPLES
-
-Each of the following invocations of C<pod2usage()> will print just the
-"SYNOPSIS" section to C<STDERR> and will exit with a status of 2:
-
- pod2usage();
-
- pod2usage(2);
-
- pod2usage(-verbose => 0);
-
- pod2usage(-exitval => 2);
-
- pod2usage({-exitval => 2, -output => \*STDERR});
-
- pod2usage({-verbose => 0, -output => \*STDERR});
-
- pod2usage(-exitval => 2, -verbose => 0);
-
- pod2usage(-exitval => 2, -verbose => 0, -output => \*STDERR);
-
-Each of the following invocations of C<pod2usage()> will print a message
-of "Syntax error." (followed by a newline) to C<STDERR>, immediately
-followed by just the "SYNOPSIS" section (also printed to C<STDERR>) and
-will exit with a status of 2:
-
- pod2usage("Syntax error.");
-
- pod2usage(-message => "Syntax error.", -verbose => 0);
-
- pod2usage(-msg => "Syntax error.", -exitval => 2);
-
- pod2usage({-msg => "Syntax error.", -exitval => 2, -output => \*STDERR});
-
- pod2usage({-msg => "Syntax error.", -verbose => 0, -output => \*STDERR});
-
- pod2usage(-msg => "Syntax error.", -exitval => 2, -verbose => 0);
-
- pod2usage(-message => "Syntax error.",
- -exitval => 2,
- -verbose => 0,
- -output => \*STDERR);
-
-Each of the following invocations of C<pod2usage()> will print the
-"SYNOPSIS" section and any "OPTIONS" and/or "ARGUMENTS" sections to
-C<STDOUT> and will exit with a status of 1:
-
- pod2usage(1);
-
- pod2usage(-verbose => 1);
-
- pod2usage(-exitval => 1);
-
- pod2usage({-exitval => 1, -output => \*STDOUT});
-
- pod2usage({-verbose => 1, -output => \*STDOUT});
-
- pod2usage(-exitval => 1, -verbose => 1);
-
- pod2usage(-exitval => 1, -verbose => 1, -output => \*STDOUT});
-
-Each of the following invocations of C<pod2usage()> will print the
-entire manual page to C<STDOUT> and will exit with a status of 1:
-
- pod2usage(-verbose => 2);
-
- pod2usage({-verbose => 2, -output => \*STDOUT});
-
- pod2usage(-exitval => 1, -verbose => 2);
-
- pod2usage({-exitval => 1, -verbose => 2, -output => \*STDOUT});
-
-=head2 Recommended Use
-
-Most scripts should print some type of usage message to C<STDERR> when a
-command line syntax error is detected. They should also provide an
-option (usually C<-H> or C<-help>) to print a (possibly more verbose)
-usage message to C<STDOUT>. Some scripts may even wish to go so far as to
-provide a means of printing their complete documentation to C<STDOUT>
-(perhaps by allowing a C<-man> option). The following complete example
-uses B<Pod::Usage> in combination with B<Getopt::Long> to do all of these
-things:
-
- use Getopt::Long;
- use Pod::Usage;
-
- my $man = 0;
- my $help = 0;
- ## Parse options and print usage if there is a syntax error,
- ## or if usage was explicitly requested.
- GetOptions('help|?' => \$help, man => \$man) or pod2usage(2);
- pod2usage(1) if $help;
- pod2usage(-verbose => 2) if $man;
-
- ## If no arguments were given, then allow STDIN to be used only
- ## if it's not connected to a terminal (otherwise print usage)
- pod2usage("$0: No files given.") if ((@ARGV == 0) && (-t STDIN));
- __END__
-
- =head1 NAME
-
- sample - Using GetOpt::Long and Pod::Usage
-
- =head1 SYNOPSIS
-
- sample [options] [file ...]
-
- Options:
- -help brief help message
- -man full documentation
-
- =head1 OPTIONS
-
- =over 8
-
- =item B<-help>
-
- Print a brief help message and exits.
-
- =item B<-man>
-
- Prints the manual page and exits.
-
- =back
-
- =head1 DESCRIPTION
-
- B<This program> will read the given input file(s) and do something
- useful with the contents thereof.
-
- =cut
-
-=head1 CAVEATS
-
-By default, B<pod2usage()> will use C<$0> as the path to the pod input
-file. Unfortunately, not all systems on which Perl runs will set C<$0>
-properly (although if C<$0> isn't found, B<pod2usage()> will search
-C<$ENV{PATH}> or else the list specified by the C<-pathlist> option).
-If this is the case for your system, you may need to explicitly specify
-the path to the pod docs for the invoking script using something
-similar to the following:
-
- pod2usage(-exitval => 2, -input => "/path/to/your/pod/docs");
-
-In the pathological case that a script is called via a relative path
-I<and> the script itself changes the current working directory
-(see L<perlfunc/chdir>) I<before> calling pod2usage, Pod::Usage will
-fail even on robust platforms. Don't do that.
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Marek Rouchal E<lt>marekr at cpan.orgE<gt>
-
-Brad Appleton E<lt>bradapp at enteract.comE<gt>
-
-Based on code for B<Pod::Text::pod2text()> written by
-Tom Christiansen E<lt>tchrist at mox.perl.comE<gt>
-
-=head1 ACKNOWLEDGMENTS
-
-Steven McDougall E<lt>swmcd at world.std.comE<gt> for his help and patience
-with re-writing this manpage.
-
-=head1 SEE ALSO
-
-L<Pod::Parser>, L<Getopt::Long>, L<Pod::Find>
-
-=cut
-
-#############################################################################
-
-#use diagnostics;
-use Carp;
-use Config;
-use Exporter;
-use File::Spec;
-
- at EXPORT = qw(&pod2usage);
-BEGIN {
- if ( $] >= 5.005_58 ) {
- require Pod::Text;
- @ISA = qw( Pod::Text );
- }
- else {
- require Pod::PlainText;
- @ISA = qw( Pod::PlainText );
- }
-}
-
-require Pod::Select;
-
-##---------------------------------------------------------------------------
-
-##---------------------------------
-## Function definitions begin here
-##---------------------------------
-
-sub pod2usage {
- local($_) = shift;
- my %opts;
- ## Collect arguments
- if (@_ > 0) {
- ## Too many arguments - assume that this is a hash and
- ## the user forgot to pass a reference to it.
- %opts = ($_, @_);
- }
- elsif (!defined $_) {
- $_ = '';
- }
- elsif (ref $_) {
- ## User passed a ref to a hash
- %opts = %{$_} if (ref($_) eq 'HASH');
- }
- elsif (/^[-+]?\d+$/) {
- ## User passed in the exit value to use
- $opts{'-exitval'} = $_;
- }
- else {
- ## User passed in a message to print before issuing usage.
- $_ and $opts{'-message'} = $_;
- }
-
- ## Need this for backward compatibility since we formerly used
- ## options that were all uppercase words rather than ones that
- ## looked like Unix command-line options.
- ## to be uppercase keywords)
- %opts = map {
- my ($key, $val) = ($_, $opts{$_});
- $key =~ s/^(?=\w)/-/;
- $key =~ /^-msg/i and $key = '-message';
- $key =~ /^-exit/i and $key = '-exitval';
- lc($key) => $val;
- } (keys %opts);
-
- ## Now determine default -exitval and -verbose values to use
- if ((! defined $opts{'-exitval'}) && (! defined $opts{'-verbose'})) {
- $opts{'-exitval'} = 2;
- $opts{'-verbose'} = 0;
- }
- elsif (! defined $opts{'-exitval'}) {
- $opts{'-exitval'} = ($opts{'-verbose'} > 0) ? 1 : 2;
- }
- elsif (! defined $opts{'-verbose'}) {
- $opts{'-verbose'} = (lc($opts{'-exitval'}) eq 'noexit' ||
- $opts{'-exitval'} < 2);
- }
-
- ## Default the output file
- $opts{'-output'} = (lc($opts{'-exitval'}) eq 'noexit' ||
- $opts{'-exitval'} < 2) ? \*STDOUT : \*STDERR
- unless (defined $opts{'-output'});
- ## Default the input file
- $opts{'-input'} = $0 unless (defined $opts{'-input'});
-
- ## Look up input file in path if it doesnt exist.
- unless ((ref $opts{'-input'}) || (-e $opts{'-input'})) {
- my $basename = $opts{'-input'};
- my $pathsep = ($^O =~ /^(?:dos|os2|MSWin32)$/i) ? ';'
- : (($^O eq 'MacOS' || $^O eq 'VMS') ? ',' : ':');
- my $pathspec = $opts{'-pathlist'} || $ENV{PATH} || $ENV{PERL5LIB};
-
- my @paths = (ref $pathspec) ? @$pathspec : split($pathsep, $pathspec);
- for my $dirname (@paths) {
- $_ = File::Spec->catfile($dirname, $basename) if length;
- last if (-e $_) && ($opts{'-input'} = $_);
- }
- }
-
- ## Now create a pod reader and constrain it to the desired sections.
- my $parser = new Pod::Usage(USAGE_OPTIONS => \%opts);
- if ($opts{'-verbose'} == 0) {
- $parser->select('(?:SYNOPSIS|USAGE)\s*');
- }
- elsif ($opts{'-verbose'} == 1) {
- my $opt_re = '(?i)' .
- '(?:OPTIONS|ARGUMENTS)' .
- '(?:\s*(?:AND|\/)\s*(?:OPTIONS|ARGUMENTS))?';
- $parser->select( '(?:SYNOPSIS|USAGE)\s*', $opt_re, "DESCRIPTION/$opt_re" );
- }
- elsif ($opts{'-verbose'} >= 2 && $opts{'-verbose'} != 99) {
- $parser->select('.*');
- }
- elsif ($opts{'-verbose'} == 99) {
- my $sections = $opts{'-sections'};
- $parser->select( (ref $sections) ? @$sections : $sections );
- $opts{'-verbose'} = 1;
- }
-
- ## Now translate the pod document and then exit with the desired status
- if ( !$opts{'-noperldoc'}
- and $opts{'-verbose'} >= 2
- and !ref($opts{'-input'})
- and $opts{'-output'} == \*STDOUT )
- {
- ## spit out the entire PODs. Might as well invoke perldoc
- my $progpath = File::Spec->catfile($Config{scriptdir}, 'perldoc');
- print { $opts{'-output'} } ($opts{'-message'}, "\n") if($opts{'-message'});
- if(defined $opts{-input} && $opts{-input} =~ /^\s*(\S.*?)\s*$/) {
- # the perldocs back to 5.005 should all have -F
- # without -F there are warnings in -T scripts
- system($progpath, '-F', $1);
- if($?) {
- # RT16091: fall back to more if perldoc failed
- system(($Config{pager} || $ENV{PAGER} || '/bin/more'), $1);
- }
- } else {
- croak "Unspecified input file or insecure argument.\n";
- }
- }
- else {
- $parser->parse_from_file($opts{'-input'}, $opts{'-output'});
- }
-
- exit($opts{'-exitval'}) unless (lc($opts{'-exitval'}) eq 'noexit');
-}
-
-##---------------------------------------------------------------------------
-
-##-------------------------------
-## Method definitions begin here
-##-------------------------------
-
-sub new {
- my $this = shift;
- my $class = ref($this) || $this;
- my %params = @_;
- my $self = {%params};
- bless $self, $class;
- if ($self->can('initialize')) {
- $self->initialize();
- } else {
- $self = $self->SUPER::new();
- %$self = (%$self, %params);
- }
- return $self;
-}
-
-sub select {
- my ($self, @sections) = @_;
- if ($ISA[0]->can('select')) {
- $self->SUPER::select(@sections);
- } else {
- # we're using Pod::Simple - need to mimic the behavior of Pod::Select
- my $add = ($sections[0] eq '+') ? shift(@sections) : '';
- ## Reset the set of sections to use
- unless (@sections) {
- delete $self->{USAGE_SELECT} unless ($add);
- return;
- }
- $self->{USAGE_SELECT} = []
- unless ($add && $self->{USAGE_SELECT});
- my $sref = $self->{USAGE_SELECT};
- ## Compile each spec
- for my $spec (@sections) {
- my $cs = Pod::Select::_compile_section_spec($spec);
- if ( defined $cs ) {
- ## Store them in our sections array
- push(@$sref, $cs);
- } else {
- carp qq{Ignoring section spec "$spec"!\n};
- }
- }
- }
-}
-
-# Override Pod::Text->seq_i to return just "arg", not "*arg*".
-sub seq_i { return $_[1] }
-
-# This overrides the Pod::Text method to do something very akin to what
-# Pod::Select did as well as the work done below by preprocess_paragraph.
-# Note that the below is very, very specific to Pod::Text.
-sub _handle_element_end {
- my ($self, $element) = @_;
- if ($element eq 'head1') {
- $self->{USAGE_HEADINGS} = [ $$self{PENDING}[-1][1] ];
- if ($self->{USAGE_OPTIONS}->{-verbose} < 2) {
- $$self{PENDING}[-1][1] =~ s/^\s*SYNOPSIS\s*$/USAGE/;
- }
- } elsif ($element =~ /^head(\d+)$/ && $1) { # avoid 0
- my $idx = $1 - 1;
- $self->{USAGE_HEADINGS} = [] unless($self->{USAGE_HEADINGS});
- $self->{USAGE_HEADINGS}->[$idx] = $$self{PENDING}[-1][1];
- }
- if ($element =~ /^head\d+$/) {
- $$self{USAGE_SKIPPING} = 1;
- if (!$$self{USAGE_SELECT} || !@{ $$self{USAGE_SELECT} }) {
- $$self{USAGE_SKIPPING} = 0;
- } else {
- my @headings = @{$$self{USAGE_HEADINGS}};
- for my $section_spec ( @{$$self{USAGE_SELECT}} ) {
- my $match = 1;
- for (my $i = 0; $i < $Pod::Select::MAX_HEADING_LEVEL; ++$i) {
- $headings[$i] = '' unless defined $headings[$i];
- my $regex = $section_spec->[$i];
- my $negated = ($regex =~ s/^\!//);
- $match &= ($negated ? ($headings[$i] !~ /${regex}/)
- : ($headings[$i] =~ /${regex}/));
- last unless ($match);
- } # end heading levels
- if ($match) {
- $$self{USAGE_SKIPPING} = 0;
- last;
- }
- } # end sections
- }
-
- # Try to do some lowercasing instead of all-caps in headings, and use
- # a colon to end all headings.
- if($self->{USAGE_OPTIONS}->{-verbose} < 2) {
- local $_ = $$self{PENDING}[-1][1];
- s{([A-Z])([A-Z]+)}{((length($2) > 2) ? $1 : lc($1)) . lc($2)}ge;
- s/\s*$/:/ unless (/:\s*$/);
- $_ .= "\n";
- $$self{PENDING}[-1][1] = $_;
- }
- }
- if ($$self{USAGE_SKIPPING} && $element !~ m/^over-/) {
- pop @{ $$self{PENDING} };
- } else {
- $self->SUPER::_handle_element_end($element);
- }
-}
-
-# required for Pod::Simple API
-sub start_document {
- my $self = shift;
- $self->SUPER::start_document();
- my $msg = $self->{USAGE_OPTIONS}->{-message} or return 1;
- my $out_fh = $self->output_fh();
- print $out_fh "$msg\n";
-}
-
-# required for old Pod::Parser API
-sub begin_pod {
- my $self = shift;
- $self->SUPER::begin_pod(); ## Have to call superclass
- my $msg = $self->{USAGE_OPTIONS}->{-message} or return 1;
- my $out_fh = $self->output_handle();
- print $out_fh "$msg\n";
-}
-
-sub preprocess_paragraph {
- my $self = shift;
- local $_ = shift;
- my $line = shift;
- ## See if this is a heading and we arent printing the entire manpage.
- if (($self->{USAGE_OPTIONS}->{-verbose} < 2) && /^=head/) {
- ## Change the title of the SYNOPSIS section to USAGE
- s/^=head1\s+SYNOPSIS\s*$/=head1 USAGE/;
- ## Try to do some lowercasing instead of all-caps in headings
- s{([A-Z])([A-Z]+)}{((length($2) > 2) ? $1 : lc($1)) . lc($2)}ge;
- ## Use a colon to end all headings
- s/\s*$/:/ unless (/:\s*$/);
- $_ .= "\n";
- }
- return $self->SUPER::preprocess_paragraph($_);
-}
-
-1; # keep require happy
Deleted: vendor/perl/dist/cpan/Pod-Parser/scripts/pod2usage.PL
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/scripts/pod2usage.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/scripts/pod2usage.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,180 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
-chdir(dirname($0));
-$file = basename($0, '.PL');
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{'startperl'}
- eval 'exec perl -S \$0 "\$@"'
- if 0;
-!GROK!THIS!
-
-# In the following, perl variables are not expanded during extraction.
-
-print OUT <<'!NO!SUBS!';
-
-#############################################################################
-# pod2usage -- command to print usage messages from embedded pod docs
-#
-# Copyright (c) 1996-2000 by Bradford Appleton. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-use strict;
-#use diagnostics;
-
-=head1 NAME
-
-pod2usage - print usage messages from embedded pod docs in files
-
-=head1 SYNOPSIS
-
-=over 12
-
-=item B<pod2usage>
-
-[B<-help>]
-[B<-man>]
-[B<-exit>S< >I<exitval>]
-[B<-output>S< >I<outfile>]
-[B<-verbose> I<level>]
-[B<-pathlist> I<dirlist>]
-I<file>
-
-=back
-
-=head1 OPTIONS AND ARGUMENTS
-
-=over 8
-
-=item B<-help>
-
-Print a brief help message and exit.
-
-=item B<-man>
-
-Print this command's manual page and exit.
-
-=item B<-exit> I<exitval>
-
-The exit status value to return.
-
-=item B<-output> I<outfile>
-
-The output file to print to. If the special names "-" or ">&1" or ">&STDOUT"
-are used then standard output is used. If ">&2" or ">&STDERR" is used then
-standard error is used.
-
-=item B<-verbose> I<level>
-
-The desired level of verbosity to use:
-
- 1 : print SYNOPSIS only
- 2 : print SYNOPSIS sections and any OPTIONS/ARGUMENTS sections
- 3 : print the entire manpage (similar to running pod2text)
-
-=item B<-pathlist> I<dirlist>
-
-Specifies one or more directories to search for the input file if it
-was not supplied with an absolute path. Each directory path in the given
-list should be separated by a ':' on Unix (';' on MSWin32 and DOS).
-
-=item I<file>
-
-The pathname of a file containing pod documentation to be output in
-usage message format (defaults to standard input).
-
-=back
-
-=head1 DESCRIPTION
-
-B<pod2usage> will read the given input file looking for pod
-documentation and will print the corresponding usage message.
-If no input file is specified then standard input is read.
-
-B<pod2usage> invokes the B<pod2usage()> function in the B<Pod::Usage>
-module. Please see L<Pod::Usage/pod2usage()>.
-
-=head1 SEE ALSO
-
-L<Pod::Usage>, L<pod2text(1)>
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Brad Appleton E<lt>bradapp at enteract.comE<gt>
-
-Based on code for B<pod2text(1)> written by
-Tom Christiansen E<lt>tchrist at mox.perl.comE<gt>
-
-=cut
-
-use Pod::Usage;
-use Getopt::Long;
-
-## Define options
-my %options = ();
-my @opt_specs = (
- 'help',
- 'man',
- 'exit=i',
- 'output=s',
- 'pathlist=s',
- 'verbose=i',
-);
-
-## Parse options
-GetOptions(\%options, @opt_specs) || pod2usage(2);
-pod2usage(1) if ($options{help});
-pod2usage(VERBOSE => 2) if ($options{man});
-
-## Dont default to STDIN if connected to a terminal
-pod2usage(2) if ((@ARGV == 0) && (-t STDIN));
-
- at ARGV = ('-') unless (@ARGV);
-if (@ARGV > 1) {
- print STDERR "pod2usage: Too many filenames given\n\n";
- pod2usage(2);
-}
-
-my %usage = ();
-$usage{-input} = shift(@ARGV);
-$usage{-exitval} = $options{'exit'} if (defined $options{'exit'});
-$usage{-output} = $options{'output'} if (defined $options{'output'});
-$usage{-verbose} = $options{'verbose'} if (defined $options{'verbose'});
-$usage{-pathlist} = $options{'pathlist'} if (defined $options{'pathlist'});
-
-pod2usage(\%usage);
-
-
-!NO!SUBS!
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
Deleted: vendor/perl/dist/cpan/Pod-Parser/scripts/podchecker.PL
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/scripts/podchecker.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/scripts/podchecker.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,186 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
-chdir(dirname($0));
-($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
- if ($^O eq 'VMS' or $^O eq 'os2' or $^O eq 'dos'); # "case-forgiving"
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{'startperl'}
- eval 'exec perl -S \$0 "\$@"'
- if 0;
-!GROK!THIS!
-
-# In the following, perl variables are not expanded during extraction.
-
-print OUT <<'!NO!SUBS!';
-#############################################################################
-# podchecker -- command to invoke the podchecker function in Pod::Checker
-#
-# Copyright (c) 1998-2000 by Bradford Appleton. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-use strict;
-#use diagnostics;
-
-=head1 NAME
-
-podchecker - check the syntax of POD format documentation files
-
-=head1 SYNOPSIS
-
-B<podchecker> [B<-help>] [B<-man>] [B<-(no)warnings>] [I<file>S< >...]
-
-=head1 OPTIONS AND ARGUMENTS
-
-=over 8
-
-=item B<-help>
-
-Print a brief help message and exit.
-
-=item B<-man>
-
-Print the manual page and exit.
-
-=item B<-warnings> B<-nowarnings>
-
-Turn on/off printing of warnings. Repeating B<-warnings> increases the
-warning level, i.e. more warnings are printed. Currently increasing to
-level two causes flagging of unescaped "E<lt>,E<gt>" characters.
-
-=item I<file>
-
-The pathname of a POD file to syntax-check (defaults to standard input).
-
-=back
-
-=head1 DESCRIPTION
-
-B<podchecker> will read the given input files looking for POD
-syntax errors in the POD documentation and will print any errors
-it find to STDERR. At the end, it will print a status message
-indicating the number of errors found.
-
-Directories are ignored, an appropriate warning message is printed.
-
-B<podchecker> invokes the B<podchecker()> function exported by B<Pod::Checker>
-Please see L<Pod::Checker/podchecker()> for more details.
-
-=head1 RETURN VALUE
-
-B<podchecker> returns a 0 (zero) exit status if all specified
-POD files are ok.
-
-=head1 ERRORS
-
-B<podchecker> returns the exit status 1 if at least one of
-the given POD files has syntax errors.
-
-The status 2 indicates that at least one of the specified
-files does not contain I<any> POD commands.
-
-Status 1 overrides status 2. If you want unambiguous
-results, call B<podchecker> with one single argument only.
-
-=head1 SEE ALSO
-
-L<Pod::Parser> and L<Pod::Checker>
-
-=head1 AUTHORS
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Brad Appleton E<lt>bradapp at enteract.comE<gt>,
-Marek Rouchal E<lt>marekr at cpan.orgE<gt>
-
-Based on code for B<Pod::Text::pod2text(1)> written by
-Tom Christiansen E<lt>tchrist at mox.perl.comE<gt>
-
-=cut
-
-
-use Pod::Checker;
-use Pod::Usage;
-use Getopt::Long;
-
-## Define options
-my %options;
-
-## Parse options
-GetOptions(\%options, qw(help man warnings+ nowarnings)) || pod2usage(2);
-pod2usage(1) if ($options{help});
-pod2usage(-verbose => 2) if ($options{man});
-
-if($options{nowarnings}) {
- $options{warnings} = 0;
-}
-elsif(!defined $options{warnings}) {
- $options{warnings} = 1; # default is warnings on
-}
-
-## Dont default to STDIN if connected to a terminal
-pod2usage(2) if ((@ARGV == 0) && (-t STDIN));
-
-## Invoke podchecker()
-my $status = 0;
- at ARGV = qw(-) unless(@ARGV);
-for my $podfile (@ARGV) {
- if($podfile eq '-') {
- $podfile = '<&STDIN';
- }
- elsif(-d $podfile) {
- warn "podchecker: Warning: Ignoring directory '$podfile'\n";
- next;
- }
- my $errors =
- podchecker($podfile, undef, '-warnings' => $options{warnings});
- if($errors > 0) {
- # errors occurred
- $status = 1;
- printf STDERR ("%s has %d pod syntax %s.\n",
- $podfile, $errors,
- ($errors == 1) ? 'error' : 'errors');
- }
- elsif($errors < 0) {
- # no pod found
- $status = 2 unless($status);
- print STDERR "$podfile does not contain any pod commands.\n";
- }
- else {
- print STDERR "$podfile pod syntax OK.\n";
- }
-}
-exit $status;
-
-!NO!SUBS!
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
Deleted: vendor/perl/dist/cpan/Pod-Parser/t/pod/p2u_data.pl
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/t/pod/p2u_data.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/t/pod/p2u_data.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,18 +0,0 @@
-use Pod::Usage;
-pod2usage(-verbose => 2, -exit => 17, -input => \*DATA);
-
-__DATA__
-=head1 NAME
-
-Test
-
-=head1 SYNOPSIS
-
-perl podusagetest.pl
-
-=head1 DESCRIPTION
-
-This is a test.
-
-=cut
-
Deleted: vendor/perl/dist/cpan/Pod-Parser/t/pod/pod2usage.t
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/t/pod/pod2usage.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/t/pod/pod2usage.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,18 +0,0 @@
-BEGIN {
- use File::Basename;
- my $THISDIR = dirname $0;
- unshift @INC, $THISDIR;
- require "testp2pt.pl";
- import TestPodIncPlainText;
-}
-
-my %options = map { $_ => 1 } @ARGV; ## convert cmdline to options-hash
-my $passed = testpodplaintext \%options, $0;
-exit( ($passed == 1) ? 0 : -1 ) unless $ENV{HARNESS_ACTIVE};
-
-
-__END__
-
-=include pod2usage.PL
-
-
Deleted: vendor/perl/dist/cpan/Pod-Parser/t/pod/pod2usage.xr
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/t/pod/pod2usage.xr 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/t/pod/pod2usage.xr 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,57 +0,0 @@
-###### begin =include pod2usage.PL #####
-NAME
- pod2usage - print usage messages from embedded pod docs in files
-
-SYNOPSIS
- pod2usage [-help] [-man] [-exit *exitval*] [-output *outfile*]
- [-verbose *level*] [-pathlist *dirlist*] *file*
-
-OPTIONS AND ARGUMENTS
- -help Print a brief help message and exit.
-
- -man Print this command's manual page and exit.
-
- -exit *exitval*
- The exit status value to return.
-
- -output *outfile*
- The output file to print to. If the special names "-" or ">&1"
- or ">&STDOUT" are used then standard output is used. If ">&2" or
- ">&STDERR" is used then standard error is used.
-
- -verbose *level*
- The desired level of verbosity to use:
-
- 1 : print SYNOPSIS only
- 2 : print SYNOPSIS sections and any OPTIONS/ARGUMENTS sections
- 3 : print the entire manpage (similar to running pod2text)
-
- -pathlist *dirlist*
- Specifies one or more directories to search for the input file
- if it was not supplied with an absolute path. Each directory
- path in the given list should be separated by a ':' on Unix (';'
- on MSWin32 and DOS).
-
- *file* The pathname of a file containing pod documentation to be output
- in usage message format (defaults to standard input).
-
-DESCRIPTION
- pod2usage will read the given input file looking for pod documentation
- and will print the corresponding usage message. If no input file is
- specified then standard input is read.
-
- pod2usage invokes the pod2usage() function in the Pod::Usage module.
- Please see the pod2usage() entry in the Pod::Usage manpage.
-
-SEE ALSO
- the Pod::Usage manpage, the pod2text(1) manpage
-
-AUTHOR
- Please report bugs using http://rt.cpan.org.
-
- Brad Appleton <bradapp at enteract.com>
-
- Based on code for pod2text(1) written by Tom Christiansen
- <tchrist at mox.perl.com>
-
-###### end =include pod2usage.PL #####
Deleted: vendor/perl/dist/cpan/Pod-Parser/t/pod/pod2usage2.t
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/t/pod/pod2usage2.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/t/pod/pod2usage2.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,357 +0,0 @@
-#!/usr/bin/perl -w
-
-use Test::More;
-use strict;
-
-BEGIN {
- if ($^O eq 'MSWin32' || $^O eq 'VMS') {
- plan skip_all => "Not portable on Win32 or VMS\n";
- }
- else {
- plan tests => 34;
- }
- use_ok ("Pod::Usage");
-}
-
-sub getoutput
-{
- my ($code) = @_;
- my $pid = open(TEST_IN, "-|");
- unless(defined $pid) {
- die "Cannot fork: $!";
- }
- if($pid) {
- # parent
- my @out = <TEST_IN>;
- close(TEST_IN);
- my $exit = $?>>8;
- s/^/#/ for @out;
- local $" = "";
- print "#EXIT=$exit OUTPUT=+++#@out#+++\n";
- return($exit, join("", at out));
- }
- # child
- open(STDERR, ">&STDOUT");
- Test::More->builder->no_ending(1);
- &$code;
- print "--NORMAL-RETURN--\n";
- exit 0;
-}
-
-sub compare
-{
- my ($left,$right) = @_;
- $left =~ s/^#\s+/#/gm;
- $right =~ s/^#\s+/#/gm;
- $left =~ s/\s+/ /gm;
- $right =~ s/\s+/ /gm;
- $left eq $right;
-}
-
-SKIP: {
-if('Pod::Usage'->isa('Pod::Text') && $Pod::Text::VERSION < 2.18) {
- skip("Formatting with Pod::Text $Pod::Text::VERSION not reliable", 33);
-}
-
-my ($exit, $text) = getoutput( sub { pod2usage() } );
-is ($exit, 2, "Exit status pod2usage ()");
-ok (compare ($text, <<'EOT'), "Output test pod2usage ()");
-#Usage:
-# frobnicate [ -r | --recursive ] [ -f | --force ] file ...
-#
-EOT
-
-($exit, $text) = getoutput( sub { pod2usage(
- -message => 'You naughty person, what did you say?',
- -verbose => 1 ) });
-is ($exit, 1, "Exit status pod2usage (-message => '...', -verbose => 1)");
-ok (compare ($text, <<'EOT'), "Output test pod2usage (-message => '...', -verbose => 1)") or diag("Got:\n$text\n");
-#You naughty person, what did you say?
-# Usage:
-# frobnicate [ -r | --recursive ] [ -f | --force ] file ...
-#
-# Options:
-# -r | --recursive
-# Run recursively.
-#
-# -f | --force
-# Just do it!
-#
-# -n number
-# Specify number of frobs, default is 42.
-#
-EOT
-
-($exit, $text) = getoutput( sub { pod2usage(
- -verbose => 2, -exit => 42 ) } );
-is ($exit, 42, "Exit status pod2usage (-verbose => 2, -exit => 42)");
-ok (compare ($text, <<'EOT'), "Output test pod2usage (-verbose => 2, -exit => 42)");
-#NAME
-# frobnicate - do what I mean
-#
-# SYNOPSIS
-# frobnicate [ -r | --recursive ] [ -f | --force ] file ...
-#
-# DESCRIPTION
-# frobnicate does foo and bar and what not.
-#
-# OPTIONS
-# -r | --recursive
-# Run recursively.
-#
-# -f | --force
-# Just do it!
-#
-# -n number
-# Specify number of frobs, default is 42.
-#
-EOT
-
-($exit, $text) = getoutput( sub { pod2usage(0) } );
-is ($exit, 0, "Exit status pod2usage (0)");
-ok (compare ($text, <<'EOT'), "Output test pod2usage (0)");
-#Usage:
-# frobnicate [ -r | --recursive ] [ -f | --force ] file ...
-#
-# Options:
-# -r | --recursive
-# Run recursively.
-#
-# -f | --force
-# Just do it!
-#
-# -n number
-# Specify number of frobs, default is 42.
-#
-EOT
-
-($exit, $text) = getoutput( sub { pod2usage(42) } );
-is ($exit, 42, "Exit status pod2usage (42)");
-ok (compare ($text, <<'EOT'), "Output test pod2usage (42)");
-#Usage:
-# frobnicate [ -r | --recursive ] [ -f | --force ] file ...
-#
-EOT
-
-($exit, $text) = getoutput( sub { pod2usage(-verbose => 0, -exit => 'NOEXIT') } );
-is ($exit, 0, "Exit status pod2usage (-verbose => 0, -exit => 'NOEXIT')");
-ok (compare ($text, <<'EOT'), "Output test pod2usage (-verbose => 0, -exit => 'NOEXIT')");
-#Usage:
-# frobnicate [ -r | --recursive ] [ -f | --force ] file ...
-#
-# --NORMAL-RETURN--
-EOT
-
-($exit, $text) = getoutput( sub { pod2usage(-verbose => 99, -sections => 'DESCRIPTION') } );
-is ($exit, 1, "Exit status pod2usage (-verbose => 99, -sections => 'DESCRIPTION')");
-ok (compare ($text, <<'EOT'), "Output test pod2usage (-verbose => 99, -sections => 'DESCRIPTION')");
-#Description:
-# frobnicate does foo and bar and what not.
-#
-EOT
-
-# does the __DATA__ work ok as input
-my (@blib, $test_script, $pod_file1, , $pod_file2);
-if (!$ENV{PERL_CORE}) {
- @blib = '-Mblib';
-}
-$test_script = File::Spec->catfile(qw(t pod p2u_data.pl));
-$pod_file1 = File::Spec->catfile(qw(t pod usage.pod));
-$pod_file2 = File::Spec->catfile(qw(t pod usage2.pod));
-
-
-($exit, $text) = getoutput( sub { system($^X, @blib, $test_script); exit($? >> 8); } );
-$text =~ s{#Using.*/blib.*\n}{}; # older blib's emit something to STDERR
-is ($exit, 17, "Exit status pod2usage (-verbose => 2, -input => \*DATA)");
-ok (compare ($text, <<'EOT'), "Output test pod2usage (-verbose => 2, -input => \*DATA)") or diag "Got:\n$text\n";
-#NAME
-# Test
-#
-#SYNOPSIS
-# perl podusagetest.pl
-#
-#DESCRIPTION
-# This is a test.
-#
-EOT
-
-# test that SYNOPSIS and USAGE are printed
-($exit, $text) = getoutput( sub { pod2usage(-input => $pod_file1,
- -exitval => 0, -verbose => 0); });
-$text =~ s{#Using.*/blib.*\n}{}; # older blib's emit something to STDERR
-is ($exit, 0, "Exit status pod2usage with USAGE");
-ok (compare ($text, <<'EOT'), "Output test pod2usage with USAGE") or diag "Got:\n$text\n";
-#Usage:
-# This is a test for CPAN#33020
-#
-#Usage:
-# And this will be also printed.
-#
-EOT
-
-# test that SYNOPSIS and USAGE are printed with options
-($exit, $text) = getoutput( sub { pod2usage(-input => $pod_file1,
- -exitval => 0, -verbose => 1); });
-$text =~ s{#Using.*/blib.*\n}{}; # older blib's emit something to STDERR
-is ($exit, 0, "Exit status pod2usage with USAGE and verbose=1");
-ok (compare ($text, <<'EOT'), "Output test pod2usage with USAGE and verbose=1") or diag "Got:\n$text\n";
-#Usage:
-# This is a test for CPAN#33020
-#
-#Usage:
-# And this will be also printed.
-#
-#Options:
-# And this with verbose == 1
-#
-EOT
-
-# test that only USAGE is printed when requested
-($exit, $text) = getoutput( sub { pod2usage(-input => $pod_file1,
- -exitval => 0, -verbose => 99, -sections => 'USAGE'); });
-$text =~ s{#Using.*/blib.*\n}{}; # older blib's emit something to STDERR
-is ($exit, 0, "Exit status pod2usage with USAGE and verbose=99");
-ok (compare ($text, <<'EOT'), "Output test pod2usage with USAGE and verbose=99") or diag "Got:\n$text\n";
-#Usage:
-# This is a test for CPAN#33020
-#
-EOT
-
-# test with pod_where
-use_ok('Pod::Find', qw(pod_where));
-
-($exit, $text) = getoutput( sub { pod2usage( -input => pod_where({-inc => 1}, 'Pod::Usage'),
- -exitval => 0, -verbose => 0) } );
-$text =~ s{#Using.*/blib.*\n}{}; # older blib's emit something to STDERR
-is ($exit, 0, "Exit status pod2usage with Pod::Find");
-ok (compare ($text, <<'EOT'), "Output test pod2usage with Pod::Find") or diag "Got:\n$text\n";
-#Usage:
-# use Pod::Usage
-#
-# my $message_text = "This text precedes the usage message.";
-# my $exit_status = 2; ## The exit status to use
-# my $verbose_level = 0; ## The verbose level to use
-# my $filehandle = \*STDERR; ## The filehandle to write to
-#
-# pod2usage($message_text);
-#
-# pod2usage($exit_status);
-#
-# pod2usage( { -message => $message_text ,
-# -exitval => $exit_status ,
-# -verbose => $verbose_level,
-# -output => $filehandle } );
-#
-# pod2usage( -msg => $message_text ,
-# -exitval => $exit_status ,
-# -verbose => $verbose_level,
-# -output => $filehandle );
-#
-# pod2usage( -verbose => 2,
-# -noperldoc => 1 )
-#
-EOT
-
-# verify that sections are correctly found after nested headings
-($exit, $text) = getoutput( sub { pod2usage(-input => $pod_file2,
- -exitval => 0, -verbose => 99,
- -sections => [qw(BugHeader BugHeader/.*')]) });
-$text =~ s{#Using.*/blib.*\n}{}; # older blib's emit something to STDERR
-is ($exit, 0, "Exit status pod2usage with nested headings");
-ok (compare ($text, <<'EOT'), "Output test pod2usage with nested headings") or diag "Got:\n$text\n";
-#BugHeader:
-# Some text
-#
-# BugHeader2:
-# More
-# Still More
-#
-EOT
-
-# Verify that =over =back work OK
-($exit, $text) = getoutput( sub {
- pod2usage(-input => $pod_file2,
- -exitval => 0, -verbose => 99, -sections => 'BugHeader/BugHeader2') } );
-$text =~ s{#Using.*/blib.*\n}{}; # older blib's emit something to STDERR
-is ($exit, 0, "Exit status pod2usage with over/back");
-ok (compare ($text, <<'EOT'), "Output test pod2usage with over/back") or diag "Got:\n$text\n";
-# BugHeader2:
-# More
-# Still More
-#
-EOT
-
-# new array API for -sections
-($exit, $text) = getoutput( sub {
- pod2usage(-input => $pod_file2,
- -exitval => 0, -verbose => 99, -sections => [qw(Heading-1/!.+ Heading-2/.+)]) } );
-$text =~ s{#Using.*/blib.*\n}{}; # older blib's emit something to STDERR
-is ($exit, 0, "Exit status pod2usage with -sections => []");
-ok (compare ($text, <<'EOT'), "Output test pod2usage with -sections => []") or diag "Got:\n$text\n";
-#Heading-1:
-# One
-# Two
-#
-# Heading-2.2:
-# More text.
-#
-EOT
-
-# allow subheadings in OPTIONS and ARGUMENTS
-($exit, $text) = getoutput( sub {
- pod2usage(-input => $pod_file2,
- -exitval => 0, -verbose => 1) } );
-$text =~ s{#Using.*/blib.*\n}{}; # older blib's emit something to STDERR
-$text =~ s{[*](destination|files)[*]}{$1}g; # strip * chars
-is ($exit, 0, "Exit status pod2usage with subheadings in OPTIONS");
-ok (compare ($text, <<'EOT'), "Output test pod2usage with subheadings in OPTIONS") or diag "Got:\n$text\n";
-#Options and Arguments:
-# Arguments:
-# The required arguments (which typically follow any options on the
-# command line) are:
-#
-# destination
-# files
-#
-# Options:
-# Options may be abbreviated. Options which take values may be separated
-# from the values by whitespace or the "=" character.
-#
-EOT
-} # end SKIP
-
-__END__
-
-=head1 NAME
-
-frobnicate - do what I mean
-
-=head1 SYNOPSIS
-
-B<frobnicate> S<[ B<-r> | B<--recursive> ]> S<[ B<-f> | B<--force> ]>
- file ...
-
-=head1 DESCRIPTION
-
-B<frobnicate> does foo and bar and what not.
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-r> | B<--recursive>
-
-Run recursively.
-
-=item B<-f> | B<--force>
-
-Just do it!
-
-=item B<-n> number
-
-Specify number of frobs, default is 42.
-
-=back
-
-=cut
-
Deleted: vendor/perl/dist/cpan/Pod-Parser/t/pod/podchkenc.t
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/t/pod/podchkenc.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/t/pod/podchkenc.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,29 +0,0 @@
-#!/usr/bin/perl
-BEGIN {
- use File::Basename;
- my $THISDIR = dirname $0;
- unshift @INC, $THISDIR;
- require "testpchk.pl";
- import TestPodChecker;
-}
-
-# this tests Pod::Checker accepts =encoding directive
-
-my %options = map { $_ => 1 } @ARGV; ## convert cmdline to options-hash
-my $passed = testpodchecker \%options, $0;
-exit( ($passed == 1) ? 0 : -1 ) unless $ENV{HARNESS_ACTIVE};
-
-__END__
-
-=encoding utf8
-
-=encode utf8
-
-dummy error
-
-=head1 An example.
-
-'Twas brillig, and the slithy toves did gyre and gimble in the wabe.
-
-=cut
-
Deleted: vendor/perl/dist/cpan/Pod-Parser/t/pod/podchkenc.xr
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/t/pod/podchkenc.xr 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/t/pod/podchkenc.xr 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1 +0,0 @@
-*** ERROR: Unknown command 'encode' at line 20 in file t/pod/podchkenc.t
Deleted: vendor/perl/dist/cpan/Pod-Parser/t/pod/poderrs.t
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/t/pod/poderrs.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/t/pod/poderrs.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,209 +0,0 @@
-BEGIN {
- use File::Basename;
- my $THISDIR = dirname $0;
- unshift @INC, $THISDIR;
- require "testpchk.pl";
- import TestPodChecker;
-}
-
-my %options = map { $_ => 1 } @ARGV; ## convert cmdline to options-hash
-my $passed = testpodchecker \%options, $0;
-exit( ($passed == 1) ? 0 : -1 ) unless $ENV{HARNESS_ACTIVE};
-
-### Deliberately throw in some blank but non-empty lines
-
-### The above line should contain spaces
-
-
-__END__
-
-=head2 This should cause a warning
-
-=head1 NAME
-
-poderrors.t - test Pod::Checker on some pod syntax errors
-
-=unknown1 this is an unknown command with two N<unknownA>
-and D<unknownB> interior sequences.
-
-This is some paragraph text with some unknown interior sequences,
-such as Q<unknown2>,
-A<unknown3>,
-and Y<unknown4 V<unknown5>>.
-
-Now try some unterminated sequences like
-I<hello mudda!
-B<hello fadda!
-
-Here I am at C<camp granada!
-
-Camps is very,
-entertaining.
-And they say we'll have some fun if it stops raining!
-
-Okay, now use a non-empty blank line to terminate a paragraph and make
-sure we get a warning.
-
-The above blank line contains tabs and spaces only
-
-=head1 Additional tests
-
-=head2 item without over
-
-=item oops
-
-=head2 back without over
-
-=back
-
-=head2 over without back
-
-=over 4
-
-=item aaps
-
-=head2 end without begin
-
-=end
-
-=head2 begin and begin
-
-=begin html
-
-=begin text
-
-=end
-
-=end
-
-second one results in end w/o begin
-
-=head2 begin w/o formatter
-
-=begin
-
-=end
-
-=head2 for w/o formatter
-
-=for
-
-something...
-
-=head2 Nested sequences of the same type
-
-C<code I<italic C<code again!>>>
-
-=head2 Garbled entities
-
-E<alea iacta est>
-E<C<auml>>
-E<abcI<bla>>
-E<0x100>
-E<07777>
-E<300>
-
-=head2 Unresolved internal links
-
-L</"begin or begin">
-L<"end with begin">
-L</OoPs>
-
-=head2 Some links with problems
-
-L<abc
-def>
-L<>
-L< aha>
-L<oho >
-L<"Warnings"> this one is ok
-L</unescaped> ok too, this POD has an X of the same name
-
-=head2 Warnings
-
-L<passwd(5)>
-L<some text with / in it|perlvar/$|> should give warnings as hell
-
-=over 4
-
-=item bla
-
-=back 200
-
-the 200 is evil
-
-=begin html
-
-What?
-
-=end xml
-
-X<unescaped>see these unescaped < and > in the text?
-
-=head2 Misc
-
-Z<ddd> should be empty
-
-X<> should not be empty
-
-=over four
-
-This paragrapgh is misplaced - it ought to be an item.
-
-=item four should be numeric!
-
-=item
-
-=item blah
-
-=item previous is all empty!!!
-
-=back
-
-All empty over/back:
-
-=over 4
-
-=back
-
-item w/o name
-
-=cut
-
-=pod bla
-
-bla is evil
-
-=cut blub
-
-blub is evil
-
-=head2 reoccurence
-
-=over 4
-
-=item Misc
-
-we already have a head Misc
-
-=back
-
-=head2 some heading
-
-=head2 another one
-
-previous section is empty!
-
-=head1 LINK TESTS
-
-Due to bug reported by Rafael Garcia-Suarez "rgarciasuarez at free.fr":
-
-The following hyperlinks :
-L<"I/O Operators">
-L<perlop/"I/O Operators">
-trigger a podchecker warning (using bleadperl) :
- node 'I/O Operators' contains non-escaped | or /
-
-=cut
-
-
Deleted: vendor/perl/dist/cpan/Pod-Parser/t/pod/poderrs.xr
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/t/pod/poderrs.xr 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/t/pod/poderrs.xr 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,47 +0,0 @@
-*** WARNING: =head2 without preceding higher level at line 20 in file t/pod/poderrs.t
-*** WARNING: empty section in previous paragraph at line 22 in file t/pod/poderrs.t
-*** ERROR: Unknown command 'unknown1' at line 26 in file t/pod/poderrs.t
-*** ERROR: Unknown interior-sequence 'Q' at line 30 in file t/pod/poderrs.t
-*** ERROR: Unknown interior-sequence 'A' at line 31 in file t/pod/poderrs.t
-*** ERROR: Unknown interior-sequence 'Y' at line 32 in file t/pod/poderrs.t
-*** ERROR: Unknown interior-sequence 'V' at line 32 in file t/pod/poderrs.t
-*** ERROR: unterminated B<...> at line 36 in file t/pod/poderrs.t
-*** ERROR: unterminated I<...> at line 35 in file t/pod/poderrs.t
-*** ERROR: unterminated C<...> at line 38 in file t/pod/poderrs.t
-*** WARNING: line containing nothing but whitespace in paragraph at line 46 in file t/pod/poderrs.t
-*** ERROR: =item without previous =over at line 53 in file t/pod/poderrs.t
-*** ERROR: =back without previous =over at line 57 in file t/pod/poderrs.t
-*** ERROR: =over on line 61 without closing =back (at head2) at line 65 in file t/pod/poderrs.t
-*** ERROR: =end without =begin at line 67 in file t/pod/poderrs.t
-*** ERROR: Nested =begin's (first at line 71:html) at line 73 in file t/pod/poderrs.t
-*** ERROR: =end without =begin at line 77 in file t/pod/poderrs.t
-*** ERROR: No argument for =begin at line 83 in file t/pod/poderrs.t
-*** ERROR: =for without formatter specification at line 89 in file t/pod/poderrs.t
-*** WARNING: nested commands C<...C<...>...> at line 95 in file t/pod/poderrs.t
-*** ERROR: garbled entity E<alea iacta est> at line 99 in file t/pod/poderrs.t
-*** ERROR: garbled entity E<C<auml>> at line 100 in file t/pod/poderrs.t
-*** ERROR: garbled entity E<abcI<bla>> at line 101 in file t/pod/poderrs.t
-*** ERROR: Entity number out of range E<0x100> at line 102 in file t/pod/poderrs.t
-*** ERROR: Entity number out of range E<07777> at line 103 in file t/pod/poderrs.t
-*** ERROR: Entity number out of range E<300> at line 104 in file t/pod/poderrs.t
-*** ERROR: malformed link L<> : empty link at line 116 in file t/pod/poderrs.t
-*** WARNING: ignoring leading whitespace in link at line 117 in file t/pod/poderrs.t
-*** WARNING: ignoring trailing whitespace in link at line 118 in file t/pod/poderrs.t
-*** WARNING: (section) in 'passwd(5)' deprecated at line 124 in file t/pod/poderrs.t
-*** WARNING: node '$|' contains non-escaped | or / at line 125 in file t/pod/poderrs.t
-*** WARNING: alternative text '$|' contains non-escaped | or / at line 125 in file t/pod/poderrs.t
-*** ERROR: Spurious character(s) after =back at line 131 in file t/pod/poderrs.t
-*** ERROR: Nonempty Z<> at line 145 in file t/pod/poderrs.t
-*** ERROR: Empty X<> at line 147 in file t/pod/poderrs.t
-*** WARNING: preceding non-item paragraph(s) at line 153 in file t/pod/poderrs.t
-*** WARNING: No argument for =item at line 155 in file t/pod/poderrs.t
-*** WARNING: previous =item has no contents at line 157 in file t/pod/poderrs.t
-*** WARNING: No items in =over (at line 165) / =back list at line 167 in file t/pod/poderrs.t
-*** ERROR: Spurious text after =pod at line 173 in file t/pod/poderrs.t
-*** ERROR: Spurious text after =cut at line 177 in file t/pod/poderrs.t
-*** WARNING: empty section in previous paragraph at line 193 in file t/pod/poderrs.t
-*** ERROR: unresolved internal link 'begin or begin' at line 108 in file t/pod/poderrs.t
-*** ERROR: unresolved internal link 'end with begin' at line 109 in file t/pod/poderrs.t
-*** ERROR: unresolved internal link 'OoPs' at line 110 in file t/pod/poderrs.t
-*** ERROR: unresolved internal link 'abc def' at line 114 in file t/pod/poderrs.t
-*** ERROR: unresolved internal link 'I/O Operators' at line 202 in file t/pod/poderrs.t
Deleted: vendor/perl/dist/cpan/Pod-Parser/t/pod/usage.pod
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/t/pod/usage.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/t/pod/usage.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,18 +0,0 @@
-=head1 NAME
-
-usage.pod - example for testing USAGE and SYNOPSIS
-
-=head1 USAGE
-
-This is a test for CPAN#33020
-
-=head1 SYNOPSIS
-
-And this will be also printed.
-
-=head1 OPTIONS
-
-And this with verbose == 1
-
-=cut
-
Deleted: vendor/perl/dist/cpan/Pod-Parser/t/pod/usage2.pod
===================================================================
--- vendor/perl/dist/cpan/Pod-Parser/t/pod/usage2.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Pod-Parser/t/pod/usage2.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,56 +0,0 @@
-=head1 Heading-1
-
-=over 100
-
-=item One
-
-=item Two
-
-=back
-
-=head2 Heading 2
-
-Some text
-
-=head1 BugHeader
-
-Some text
-
-=head2 BugHeader2
-
-=over 4
-
-=item More
-
-=item Still More
-
-=back
-
-=head1 Heading-2
-
-=head2 Heading-2.2
-
-More text.
-
-=head1 OPTIONS AND ARGUMENTS
-
-=head2 Arguments
-
-The required arguments (which typically follow any options on the
-command line) are:
-
-=over
-
-=item I<destination>
-
-=item I<files>
-
-=back
-
-=head2 Options
-
-Options may be abbreviated. Options which take values may be separated
-from the values by whitespace or the "=" character.
-
-=cut
-
Deleted: vendor/perl/dist/cpan/Time-HiRes/t/HiRes.t
===================================================================
--- vendor/perl/dist/cpan/Time-HiRes/t/HiRes.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Time-HiRes/t/HiRes.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,828 +0,0 @@
-#!./perl -w
-
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't' if -d 't';
- @INC = '../lib';
- require Config; import Config;
- if (" $Config{'extensions'} " !~ m[ Time/HiRes ]) {
- print "1..0 # Skip -- Perl configured without Time::HiRes module\n";
- exit 0;
- }
- }
-}
-
-BEGIN { $| = 1; print "1..48\n"; }
-
-END { print "not ok 1\n" unless $loaded }
-
-use Time::HiRes 1.9704; # Remember to bump this once in a while.
-use Time::HiRes qw(tv_interval);
-
-$loaded = 1;
-
-print "ok 1\n";
-
-use strict;
-
-my $have_gettimeofday = &Time::HiRes::d_gettimeofday;
-my $have_usleep = &Time::HiRes::d_usleep;
-my $have_nanosleep = &Time::HiRes::d_nanosleep;
-my $have_ualarm = &Time::HiRes::d_ualarm;
-my $have_clock_gettime = &Time::HiRes::d_clock_gettime;
-my $have_clock_getres = &Time::HiRes::d_clock_getres;
-my $have_clock_nanosleep = &Time::HiRes::d_clock_nanosleep;
-my $have_clock = &Time::HiRes::d_clock;
-my $have_hires_stat = &Time::HiRes::d_hires_stat;
-
-sub has_symbol {
- my $symbol = shift;
- eval "use Time::HiRes qw($symbol)";
- return 0 unless $@ eq '';
- eval "my \$a = $symbol";
- return $@ eq '';
-}
-
-printf "# have_gettimeofday = %d\n", $have_gettimeofday;
-printf "# have_usleep = %d\n", $have_usleep;
-printf "# have_nanosleep = %d\n", $have_nanosleep;
-printf "# have_ualarm = %d\n", $have_ualarm;
-printf "# have_clock_gettime = %d\n", $have_clock_gettime;
-printf "# have_clock_getres = %d\n", $have_clock_getres;
-printf "# have_clock_nanosleep = %d\n", $have_clock_nanosleep;
-printf "# have_clock = %d\n", $have_clock;
-printf "# have_hires_stat = %d\n", $have_hires_stat;
-
-import Time::HiRes 'gettimeofday' if $have_gettimeofday;
-import Time::HiRes 'usleep' if $have_usleep;
-import Time::HiRes 'nanosleep' if $have_nanosleep;
-import Time::HiRes 'ualarm' if $have_ualarm;
-import Time::HiRes 'clock_gettime' if $have_clock_gettime;
-import Time::HiRes 'clock_getres' if $have_clock_getres;
-import Time::HiRes 'clock_nanosleep' if $have_clock_nanosleep;
-import Time::HiRes 'clock' if $have_clock;
-
-use Config;
-
-use Time::HiRes qw(gettimeofday);
-
-my $have_alarm = $Config{d_alarm};
-my $have_fork = $Config{d_fork};
-my $waitfor = 360; # 30-45 seconds is normal (load affects this).
-my $timer_pid;
-my $TheEnd;
-
-if ($have_fork) {
- print "# I am the main process $$, starting the timer process...\n";
- $timer_pid = fork();
- if (defined $timer_pid) {
- if ($timer_pid == 0) { # We are the kid, set up the timer.
- my $ppid = getppid();
- print "# I am the timer process $$, sleeping for $waitfor seconds...\n";
- sleep($waitfor - 2); # Workaround for perlbug #49073
- sleep(2); # Wait for parent to exit
- if (kill(0, $ppid)) { # Check if parent still exists
- warn "\n$0: overall time allowed for tests (${waitfor}s) exceeded!\n";
- print "# Terminating main process $ppid...\n";
- kill('KILL', $ppid);
- print "# This is the timer process $$, over and out.\n";
- }
- exit(0);
- } else {
- print "# The timer process $timer_pid launched, continuing testing...\n";
- $TheEnd = time() + $waitfor;
- }
- } else {
- warn "$0: fork failed: $!\n";
- }
-} else {
- print "# No timer process (need fork)\n";
-}
-
-my $xdefine = '';
-
-if (open(XDEFINE, "xdefine")) {
- chomp($xdefine = <XDEFINE> || "");
- close(XDEFINE);
-}
-
-# Ideally, we'd like to test that the timers are rather precise.
-# However, if the system is busy, there are no guarantees on how
-# quickly we will return. This limit used to be 10%, but that
-# was occasionally triggered falsely.
-# So let's try 25%.
-# Another possibility might be to print "ok" if the test completes fine
-# with (say) 10% slosh, "skip - system may have been busy?" if the test
-# completes fine with (say) 30% slosh, and fail otherwise. If you do that,
-# consider changing over to test.pl at the same time.
-# --A.D., Nov 27, 2001
-my $limit = 0.25; # 25% is acceptable slosh for testing timers
-
-sub skip {
- map { print "ok $_ # skipped\n" } @_;
-}
-
-sub ok {
- my ($n, $result, @info) = @_;
- if ($result) {
- print "ok $n\n";
- }
- else {
- print "not ok $n\n";
- print "# @info\n" if @info;
- }
-}
-
-unless ($have_gettimeofday) {
- skip 2..6;
-}
-else {
- my @one = gettimeofday();
- ok 2, @one == 2, 'gettimeofday returned ', 0+ at one, ' args';
- ok 3, $one[0] > 850_000_000, "@one too small";
-
- sleep 1;
-
- my @two = gettimeofday();
- ok 4, ($two[0] > $one[0] || ($two[0] == $one[0] && $two[1] > $one[1])),
- "@two is not greater than @one";
-
- my $f = Time::HiRes::time();
- ok 5, $f > 850_000_000, "$f too small";
- ok 6, $f - $two[0] < 2, "$f - $two[0] >= 2";
-}
-
-unless ($have_usleep) {
- skip 7..8;
-}
-else {
- use Time::HiRes qw(usleep);
- my $one = time;
- usleep(10_000);
- my $two = time;
- usleep(10_000);
- my $three = time;
- ok 7, $one == $two || $two == $three, "slept too long, $one $two $three";
-
- unless ($have_gettimeofday) {
- skip 8;
- }
- else {
- my $f = Time::HiRes::time();
- usleep(500_000);
- my $f2 = Time::HiRes::time();
- my $d = $f2 - $f;
- ok 8, $d > 0.4 && $d < 0.9, "slept $d secs $f to $f2";
- }
-}
-
-# Two-arg tv_interval() is always available.
-{
- my $f = tv_interval [5, 100_000], [10, 500_000];
- ok 9, abs($f - 5.4) < 0.001, $f;
-}
-
-unless ($have_gettimeofday) {
- skip 10;
-}
-else {
- my $r = [gettimeofday()];
- my $f = tv_interval $r;
- ok 10, $f < 2, $f;
-}
-
-unless ($have_usleep && $have_gettimeofday) {
- skip 11;
-}
-else {
- my $r = [ gettimeofday() ];
- Time::HiRes::sleep( 0.5 );
- my $f = tv_interval $r;
- ok 11, $f > 0.4 && $f < 0.9, "slept $f instead of 0.5 secs.";
-}
-
-unless ($have_ualarm && $have_alarm) {
- skip 12..13;
-}
-else {
- my $tick = 0;
- local $SIG{ ALRM } = sub { $tick++ };
-
- my $one = time; $tick = 0; ualarm(10_000); while ($tick == 0) { }
- my $two = time; $tick = 0; ualarm(10_000); while ($tick == 0) { }
- my $three = time;
- ok 12, $one == $two || $two == $three, "slept too long, $one $two $three";
- print "# tick = $tick, one = $one, two = $two, three = $three\n";
-
- $tick = 0; ualarm(10_000, 10_000); while ($tick < 3) { }
- ok 13, 1;
- ualarm(0);
- print "# tick = $tick, one = $one, two = $two, three = $three\n";
-}
-
-# Did we even get close?
-
-unless ($have_gettimeofday) {
- skip 14;
-} else {
- my ($s, $n, $i) = (0);
- for $i (1 .. 100) {
- $s += Time::HiRes::time() - time();
- $n++;
- }
- # $s should be, at worst, equal to $n
- # (time() may be rounding down, up, or closest),
- # but allow 10% of slop.
- ok 14, abs($s) / $n <= 1.10, "Time::HiRes::time() not close to time()";
- print "# s = $s, n = $n, s/n = ", abs($s)/$n, "\n";
-}
-
-my $has_ualarm = $Config{d_ualarm};
-
-$has_ualarm ||= $xdefine =~ /-DHAS_UALARM/;
-
-my $can_subsecond_alarm =
- defined &Time::HiRes::gettimeofday &&
- defined &Time::HiRes::ualarm &&
- defined &Time::HiRes::usleep &&
- $has_ualarm;
-
-unless ($can_subsecond_alarm) {
- for (15..17) {
- print "ok $_ # Skip: no gettimeofday or no ualarm or no usleep\n";
- }
-} else {
- use Time::HiRes qw(time alarm sleep);
- eval { require POSIX };
- my $use_sigaction =
- !$@ && defined &POSIX::sigaction && &POSIX::SIGALRM > 0;
-
- my ($f, $r, $i, $not, $ok);
-
- $f = time;
- print "# time...$f\n";
- print "ok 15\n";
-
- $r = [Time::HiRes::gettimeofday()];
- sleep (0.5);
- print "# sleep...", Time::HiRes::tv_interval($r), "\nok 16\n";
-
- $r = [Time::HiRes::gettimeofday()];
- $i = 5;
- my $oldaction;
- if ($use_sigaction) {
- $oldaction = new POSIX::SigAction;
- printf "# sigaction tick, ALRM = %d\n", &POSIX::SIGALRM;
-
- # Perl's deferred signals may be too wimpy to break through
- # a restartable select(), so use POSIX::sigaction if available.
-
- POSIX::sigaction(&POSIX::SIGALRM,
- POSIX::SigAction->new("tick"),
- $oldaction)
- or die "Error setting SIGALRM handler with sigaction: $!\n";
- } else {
- print "# SIG tick\n";
- $SIG{ALRM} = "tick";
- }
-
- # On VMS timers can not interrupt select.
- if ($^O eq 'VMS') {
- $ok = "Skip: VMS select() does not get interrupted.";
- } else {
- while ($i > 0) {
- alarm(0.3);
- select (undef, undef, undef, 3);
- my $ival = Time::HiRes::tv_interval ($r);
- print "# Select returned! $i $ival\n";
- print "# ", abs($ival/3 - 1), "\n";
- # Whether select() gets restarted after signals is
- # implementation dependent. If it is restarted, we
- # will get about 3.3 seconds: 3 from the select, 0.3
- # from the alarm. If this happens, let's just skip
- # this particular test. --jhi
- if (abs($ival/3.3 - 1) < $limit) {
- $ok = "Skip: your select() may get restarted by your SIGALRM (or just retry test)";
- undef $not;
- last;
- }
- my $exp = 0.3 * (5 - $i);
- if ($exp == 0) {
- $not = "while: divisor became zero";
- last;
- }
- # This test is more sensitive, so impose a softer limit.
- if (abs($ival/$exp - 1) > 4*$limit) {
- my $ratio = abs($ival/$exp);
- $not = "while: $exp sleep took $ival ratio $ratio";
- last;
- }
- $ok = $i;
- }
- }
-
- sub tick {
- $i--;
- my $ival = Time::HiRes::tv_interval ($r);
- print "# Tick! $i $ival\n";
- my $exp = 0.3 * (5 - $i);
- if ($exp == 0) {
- $not = "tick: divisor became zero";
- last;
- }
- # This test is more sensitive, so impose a softer limit.
- if (abs($ival/$exp - 1) > 4*$limit) {
- my $ratio = abs($ival/$exp);
- $not = "tick: $exp sleep took $ival ratio $ratio";
- $i = 0;
- }
- }
-
- if ($use_sigaction) {
- POSIX::sigaction(&POSIX::SIGALRM, $oldaction);
- } else {
- alarm(0); # can't cancel usig %SIG
- }
-
- print $not ? "not ok 17 # $not\n" : "ok 17 # $ok\n";
-}
-
-unless (defined &Time::HiRes::setitimer
- && defined &Time::HiRes::getitimer
- && has_symbol('ITIMER_VIRTUAL')
- && $Config{sig_name} =~ m/\bVTALRM\b/
- && $^O ne 'nto' # nto: QNX 6 has the API but no implementation
- && $^O ne 'haiku' # haiku: has the API but no implementation
- ) {
- for (18..19) {
- print "ok $_ # Skip: no virtual interval timers\n";
- }
-} else {
- use Time::HiRes qw(setitimer getitimer ITIMER_VIRTUAL);
-
- my $i = 3;
- my $r = [Time::HiRes::gettimeofday()];
-
- $SIG{VTALRM} = sub {
- $i ? $i-- : setitimer(&ITIMER_VIRTUAL, 0);
- print "# Tick! $i ", Time::HiRes::tv_interval($r), "\n";
- };
-
- print "# setitimer: ", join(" ", setitimer(ITIMER_VIRTUAL, 0.5, 0.4)), "\n";
-
- # Assume interval timer granularity of $limit * 0.5 seconds. Too bold?
- my $virt = getitimer(&ITIMER_VIRTUAL);
- print "not " unless defined $virt && abs($virt / 0.5) - 1 < $limit;
- print "ok 18\n";
-
- print "# getitimer: ", join(" ", getitimer(ITIMER_VIRTUAL)), "\n";
-
- while (getitimer(&ITIMER_VIRTUAL)) {
- my $j;
- for (1..1000) { $j++ } # Can't be unbreakable, must test getitimer().
- }
-
- print "# getitimer: ", join(" ", getitimer(ITIMER_VIRTUAL)), "\n";
-
- $virt = getitimer(&ITIMER_VIRTUAL);
- print "not " unless defined $virt && $virt == 0;
- print "ok 19\n";
-
- $SIG{VTALRM} = 'DEFAULT';
-}
-
-if ($have_gettimeofday &&
- $have_usleep) {
- use Time::HiRes qw(usleep);
-
- my ($t0, $td);
-
- my $sleep = 1.5; # seconds
- my $msg;
-
- $t0 = gettimeofday();
- $a = abs(sleep($sleep) / $sleep - 1.0);
- $td = gettimeofday() - $t0;
- my $ratio = 1.0 + $a;
-
- $msg = "$td went by while sleeping $sleep, ratio $ratio.\n";
-
- if ($td < $sleep * (1 + $limit)) {
- print $a < $limit ? "ok 20 # $msg" : "not ok 20 # $msg";
- } else {
- print "ok 20 # Skip: $msg";
- }
-
- $t0 = gettimeofday();
- $a = abs(usleep($sleep * 1E6) / ($sleep * 1E6) - 1.0);
- $td = gettimeofday() - $t0;
- $ratio = 1.0 + $a;
-
- $msg = "$td went by while sleeping $sleep, ratio $ratio.\n";
-
- if ($td < $sleep * (1 + $limit)) {
- print $a < $limit ? "ok 21 # $msg" : "not ok 21 # $msg";
- } else {
- print "ok 21 # Skip: $msg";
- }
-
-} else {
- for (20..21) {
- print "ok $_ # Skip: no gettimeofday\n";
- }
-}
-
-unless ($have_nanosleep) {
- skip 22..23;
-}
-else {
- my $one = CORE::time;
- nanosleep(10_000_000);
- my $two = CORE::time;
- nanosleep(10_000_000);
- my $three = CORE::time;
- ok 22, $one == $two || $two == $three, "slept too long, $one $two $three";
-
- unless ($have_gettimeofday) {
- skip 23;
- }
- else {
- my $f = Time::HiRes::time();
- nanosleep(500_000_000);
- my $f2 = Time::HiRes::time();
- my $d = $f2 - $f;
- ok 23, $d > 0.4 && $d < 0.9, "slept $d secs $f to $f2";
- }
-}
-
-eval { sleep(-1) };
-print $@ =~ /::sleep\(-1\): negative time not invented yet/ ?
- "ok 24\n" : "not ok 24\n";
-
-eval { usleep(-2) };
-print $@ =~ /::usleep\(-2\): negative time not invented yet/ ?
- "ok 25\n" : "not ok 25\n";
-
-if ($have_ualarm) {
- eval { alarm(-3) };
- print $@ =~ /::alarm\(-3, 0\): negative time not invented yet/ ?
- "ok 26\n" : "not ok 26\n";
-
- eval { ualarm(-4) };
- print $@ =~ /::ualarm\(-4, 0\): negative time not invented yet/ ?
- "ok 27\n" : "not ok 27\n";
-} else {
- skip 26;
- skip 27;
-}
-
-if ($have_nanosleep) {
- eval { nanosleep(-5) };
- print $@ =~ /::nanosleep\(-5\): negative time not invented yet/ ?
- "ok 28\n" : "not ok 28\n";
-} else {
- skip 28;
-}
-
-# Find the loop size N (a for() loop 0..N-1)
-# that will take more than T seconds.
-
-if ($have_ualarm && $] >= 5.008001) {
- # http://groups.google.com/group/perl.perl5.porters/browse_thread/thread/adaffaaf939b042e/20dafc298df737f0%2320dafc298df737f0?sa=X&oi=groupsr&start=0&num=3
- # Perl changes [18765] and [18770], perl bug [perl #20920]
-
- print "# Finding delay loop...\n";
-
- my $T = 0.01;
- use Time::HiRes qw(time);
- my $DelayN = 1024;
- my $i;
- N: {
- do {
- my $t0 = time();
- for ($i = 0; $i < $DelayN; $i++) { }
- my $t1 = time();
- my $dt = $t1 - $t0;
- print "# N = $DelayN, t1 = $t1, t0 = $t0, dt = $dt\n";
- last N if $dt > $T;
- $DelayN *= 2;
- } while (1);
- }
-
- # The time-burner which takes at least T (default 1) seconds.
- my $Delay = sub {
- my $c = @_ ? shift : 1;
- my $n = $c * $DelayN;
- my $i;
- for ($i = 0; $i < $n; $i++) { }
- };
-
- # Next setup a periodic timer (the two-argument alarm() of
- # Time::HiRes, behind the curtains the libc getitimer() or
- # ualarm()) which has a signal handler that takes so much time (on
- # the first initial invocation) that the first periodic invocation
- # (second invocation) will happen before the first invocation has
- # finished. In Perl 5.8.0 the "safe signals" concept was
- # implemented, with unfortunately at least one bug that caused a
- # core dump on reentering the handler. This bug was fixed by the
- # time of Perl 5.8.1.
-
- # Do not try mixing sleep() and alarm() for testing this.
-
- my $a = 0; # Number of alarms we receive.
- my $A = 2; # Number of alarms we will handle before disarming.
- # (We may well get $A + 1 alarms.)
-
- $SIG{ALRM} = sub {
- $a++;
- print "# Alarm $a - ", time(), "\n";
- alarm(0) if $a >= $A; # Disarm the alarm.
- $Delay->(2); # Try burning CPU at least for 2T seconds.
- };
-
- use Time::HiRes qw(alarm);
- alarm($T, $T); # Arm the alarm.
-
- $Delay->(10); # Try burning CPU at least for 10T seconds.
-
- print "ok 29\n"; # Not core dumping by now is considered to be the success.
-} else {
- skip 29;
-}
-
-if ($have_clock_gettime &&
- # All implementations of clock_gettime()
- # are SUPPOSED TO support CLOCK_REALTIME.
- has_symbol('CLOCK_REALTIME')) {
- my $ok = 0;
- TRY: {
- for my $try (1..3) {
- print "# CLOCK_REALTIME: try = $try\n";
- my $t0 = clock_gettime(&CLOCK_REALTIME);
- use Time::HiRes qw(sleep);
- my $T = 1.5;
- sleep($T);
- my $t1 = clock_gettime(&CLOCK_REALTIME);
- if ($t0 > 0 && $t1 > $t0) {
- print "# t1 = $t1, t0 = $t0\n";
- my $dt = $t1 - $t0;
- my $rt = abs(1 - $dt / $T);
- print "# dt = $dt, rt = $rt\n";
- if ($rt <= 2 * $limit) {
- $ok = 1;
- last TRY;
- }
- } else {
- print "# Error: t0 = $t0, t1 = $t1\n";
- }
- my $r = rand() + rand();
- printf "# Sleeping for %.6f seconds...\n", $r;
- sleep($r);
- }
- }
- if ($ok) {
- print "ok 30\n";
- } else {
- print "not ok 30\n";
- }
-} else {
- print "# No clock_gettime\n";
- skip 30;
-}
-
-if ($have_clock_getres) {
- my $tr = clock_getres();
- if ($tr > 0) {
- print "ok 31 # tr = $tr\n";
- } else {
- print "not ok 31 # tr = $tr\n";
- }
-} else {
- print "# No clock_getres\n";
- skip 31;
-}
-
-if ($have_clock_nanosleep &&
- has_symbol('CLOCK_REALTIME')) {
- my $s = 1.5e9;
- my $t = clock_nanosleep(&CLOCK_REALTIME, $s);
- my $r = abs(1 - $t / $s);
- if ($r < 2 * $limit) {
- print "ok 32\n";
- } else {
- print "not ok 32 # $t = $t, r = $r\n";
- }
-} else {
- print "# No clock_nanosleep\n";
- skip 32;
-}
-
-if ($have_clock) {
- my @clock = clock();
- print "# clock = @clock\n";
- for my $i (1..3) {
- for (my $j = 0; $j < 1e6; $j++) { }
- push @clock, clock();
- print "# clock = @clock\n";
- }
- if ($clock[0] >= 0 &&
- $clock[1] > $clock[0] &&
- $clock[2] > $clock[1] &&
- $clock[3] > $clock[2]) {
- print "ok 33\n";
- } else {
- print "not ok 33\n";
- }
-} else {
- skip 33;
-}
-
-sub bellish { # Cheap emulation of a bell curve.
- my ($min, $max) = @_;
- my $rand = ($max - $min) / 5;
- my $sum = 0;
- for my $i (0..4) {
- $sum += rand($rand);
- }
- return $min + $sum;
-}
-
-if ($have_ualarm) {
- # 1_100_000 sligthly over 1_000_000,
- # 2_200_000 slightly over 2**31/1000,
- # 4_300_000 slightly over 2**32/1000.
- for my $t ([34, 100_000],
- [35, 1_100_000],
- [36, 2_200_000],
- [37, 4_300_000]) {
- my ($i, $n) = @$t;
- my $ok;
- for my $retry (1..10) {
- my $alarmed = 0;
- local $SIG{ ALRM } = sub { $alarmed++ };
- my $t0 = Time::HiRes::time();
- print "# t0 = $t0\n";
- print "# ualarm($n)\n";
- ualarm($n); 1 while $alarmed == 0;
- my $t1 = Time::HiRes::time();
- print "# t1 = $t1\n";
- my $dt = $t1 - $t0;
- print "# dt = $dt\n";
- my $r = $dt / ($n/1e6);
- print "# r = $r\n";
- $ok =
- ($n < 1_000_000 || # Too much noise.
- ($r >= 0.8 && $r <= 1.6));
- last if $ok;
- my $nap = bellish(3, 15);
- printf "# Retrying in %.1f seconds...\n", $nap;
- Time::HiRes::sleep($nap);
- }
- ok $i, $ok, "ualarm($n) close enough";
- }
-} else {
- print "# No ualarm\n";
- skip 34..37;
-}
-
-if ($^O =~ /^(cygwin|MSWin)/) {
- print "# $^O: timestamps may not be good enough\n";
- skip 38;
-} elsif (&Time::HiRes::d_hires_stat) {
- my @stat;
- my @atime;
- my @mtime;
- for (1..5) {
- Time::HiRes::sleep(rand(0.1) + 0.1);
- open(X, ">$$");
- print X $$;
- close(X);
- @stat = Time::HiRes::stat($$);
- push @mtime, $stat[9];
- Time::HiRes::sleep(rand(0.1) + 0.1);
- open(X, "<$$");
- <X>;
- close(X);
- @stat = Time::HiRes::stat($$);
- push @atime, $stat[8];
- }
- 1 while unlink $$;
- print "# mtime = @mtime\n";
- print "# atime = @atime\n";
- my $ai = 0;
- my $mi = 0;
- my $ss = 0;
- for (my $i = 1; $i < @atime; $i++) {
- if ($atime[$i] >= $atime[$i-1]) {
- $ai++;
- }
- if ($atime[$i] > int($atime[$i])) {
- $ss++;
- }
- }
- for (my $i = 1; $i < @mtime; $i++) {
- if ($mtime[$i] >= $mtime[$i-1]) {
- $mi++;
- }
- if ($mtime[$i] > int($mtime[$i])) {
- $ss++;
- }
- }
- print "# ai = $ai, mi = $mi, ss = $ss\n";
- # Need at least 75% of monotonical increase and
- # 20% of subsecond results. Yes, this is guessing.
- if ($ss == 0) {
- print "# No subsecond timestamps detected\n";
- skip 38;
- } elsif ($mi/(@mtime-1) >= 0.75 && $ai/(@atime-1) >= 0.75 &&
- $ss/(@mtime+ at atime) >= 0.2) {
- print "ok 38\n";
- } else {
- print "not ok 38\n";
- }
-} else {
- print "# No effectual d_hires_stat\n";
- skip 38;
-}
-
-unless ($can_subsecond_alarm) {
- skip 39..44;
-} else {
- {
- my $alrm;
- $SIG{ALRM} = sub { $alrm++ };
- Time::HiRes::alarm(0.1);
- my $t0 = time();
- 1 while time() - $t0 <= 1;
- print $alrm ? "ok 39\n" : "not ok 39\n";
- }
- {
- my $alrm;
- $SIG{ALRM} = sub { $alrm++ };
- Time::HiRes::alarm(1.1);
- my $t0 = time();
- 1 while time() - $t0 <= 2;
- print $alrm ? "ok 40\n" : "not ok 40\n";
- }
-
- {
- my $alrm = 0;
- $SIG{ALRM} = sub { $alrm++ };
- my $got = Time::HiRes::alarm(2.7);
- ok(41, $got == 0, $got);
-
- my $t0 = time();
- 1 while time() - $t0 <= 1;
-
- $got = Time::HiRes::alarm(0);
- ok(42, $got > 0 && $got < 1.8, $got);
-
- ok(43, $alrm == 0, $alrm);
-
- $got = Time::HiRes::alarm(0);
- ok(44, $got == 0, $got);
- }
-}
-
-unless ($have_ualarm) {
- skip 45..48;
-}
-else {
- {
- my $alrm = 0;
- $SIG{ALRM} = sub { $alrm++ };
- my $got = Time::HiRes::ualarm(500_000);
- ok(45, $got == 0, $got);
-
- my $t0 = Time::HiRes::time();
- my $t1;
- do {
- $t1 = Time::HiRes::time();
- } while $t1 - $t0 <= 0.3;
- print "# t0 = $t0\n# t1 = $t1\n# t1 - t0 = ", ($t1 - $t0), "\n";
-
- $got = Time::HiRes::ualarm(0);
- ok(46, $got > 0 && $got < 300_000, $got);
-
- ok(47, $alrm == 0, $alrm);
-
- $got = Time::HiRes::ualarm(0);
- ok(48, $got == 0, $got);
- }
-}
-
-END {
- if ($timer_pid) { # Only in the main process.
- my $left = $TheEnd - time();
- printf "# I am the main process $$, terminating the timer process $timer_pid\n# before it terminates me in %d seconds (testing took %d seconds).\n", $left, $waitfor - $left;
- if (kill(0, $timer_pid)) {
- local $? = 0;
- my $kill = kill('KILL', $timer_pid); # We are done, the timer can go.
- wait();
- printf "# kill KILL $timer_pid = %d\n", $kill;
- }
- unlink("ktrace.out"); # Used in BSD system call tracing.
- print "# All done.\n";
- }
-}
-
Deleted: vendor/perl/dist/cpan/Unicode-Collate/Collate/Locale/sw.pl
===================================================================
--- vendor/perl/dist/cpan/Unicode-Collate/Collate/Locale/sw.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/cpan/Unicode-Collate/Collate/Locale/sw.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,28 +0,0 @@
-+{
- entry => <<'ENTRY', # for DUCET v6.0.0
-0063 0068 ; [.15BA.0020.0002.0063] # <LATIN SMALL LETTER C, LATIN SMALL LETTER H>
-0043 0068 ; [.15BA.0020.0007.0043] # <LATIN CAPITAL LETTER C, LATIN SMALL LETTER H>
-0043 0048 ; [.15BA.0020.0008.0043] # <LATIN CAPITAL LETTER C, LATIN CAPITAL LETTER H>
-0064 0068 ; [.15E5.0020.0002.0064] # <LATIN SMALL LETTER D, LATIN SMALL LETTER H>
-0044 0068 ; [.15E5.0020.0007.0044] # <LATIN CAPITAL LETTER D, LATIN SMALL LETTER H>
-0044 0048 ; [.15E5.0020.0008.0044] # <LATIN CAPITAL LETTER D, LATIN CAPITAL LETTER H>
-0067 0068 ; [.1645.0020.0002.0067] # <LATIN SMALL LETTER G, LATIN SMALL LETTER H>
-0047 0068 ; [.1645.0020.0007.0047] # <LATIN CAPITAL LETTER G, LATIN SMALL LETTER H>
-0047 0048 ; [.1645.0020.0008.0047] # <LATIN CAPITAL LETTER G, LATIN CAPITAL LETTER H>
-006B 0068 ; [.16B3.0020.0002.006B] # <LATIN SMALL LETTER K, LATIN SMALL LETTER H>
-004B 0068 ; [.16B3.0020.0007.004B] # <LATIN CAPITAL LETTER K, LATIN SMALL LETTER H>
-004B 0048 ; [.16B3.0020.0008.004B] # <LATIN CAPITAL LETTER K, LATIN CAPITAL LETTER H>
-006E 0067 0027 ; [.1703.0020.0002.006E] # <LATIN SMALL LETTER N, LATIN SMALL LETTER G, APOSTROPHE>
-004E 0067 0027 ; [.1703.0020.0007.004E] # <LATIN CAPITAL LETTER N, LATIN SMALL LETTER G, APOSTROPHE>
-004E 0047 0027 ; [.1703.0020.0008.004E] # <LATIN CAPITAL LETTER N, LATIN CAPITAL LETTER G, APOSTROPHE>
-006E 0079 ; [.1704.0020.0002.006E] # <LATIN SMALL LETTER N, LATIN SMALL LETTER Y>
-004E 0079 ; [.1704.0020.0007.004E] # <LATIN CAPITAL LETTER N, LATIN SMALL LETTER Y>
-004E 0059 ; [.1704.0020.0008.004E] # <LATIN CAPITAL LETTER N, LATIN CAPITAL LETTER Y>
-0073 0068 ; [.17A7.0020.0002.0073] # <LATIN SMALL LETTER S, LATIN SMALL LETTER H>
-0053 0068 ; [.17A7.0020.0007.0053] # <LATIN CAPITAL LETTER S, LATIN SMALL LETTER H>
-0053 0048 ; [.17A7.0020.0008.0053] # <LATIN CAPITAL LETTER S, LATIN CAPITAL LETTER H>
-0074 0068 ; [.17CA.0020.0002.0074] # <LATIN SMALL LETTER T, LATIN SMALL LETTER H>
-0054 0068 ; [.17CA.0020.0007.0054] # <LATIN CAPITAL LETTER T, LATIN SMALL LETTER H>
-0054 0048 ; [.17CA.0020.0008.0054] # <LATIN CAPITAL LETTER T, LATIN CAPITAL LETTER H>
-ENTRY
-};
Deleted: vendor/perl/dist/dist/Attribute-Handlers/README
===================================================================
--- vendor/perl/dist/dist/Attribute-Handlers/README 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/dist/Attribute-Handlers/README 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,605 +0,0 @@
-==============================================================================
- Attribute::Handlers
-==============================================================================
-
-
-NAME
- Attribute::Handlers - Simpler definition of attribute handlers
-
-VERSION
- This document describes version 0.79 of Attribute::Handlers, released
- November 25, 2007.
-
-SYNOPSIS
- package MyClass;
- require 5.006;
- use Attribute::Handlers;
- no warnings 'redefine';
-
-
- sub Good : ATTR(SCALAR) {
- my ($package, $symbol, $referent, $attr, $data) = @_;
-
- # Invoked for any scalar variable with a :Good attribute,
- # provided the variable was declared in MyClass (or
- # a derived class) or typed to MyClass.
-
- # Do whatever to $referent here (executed in CHECK phase).
- ...
- }
-
- sub Bad : ATTR(SCALAR) {
- # Invoked for any scalar variable with a :Bad attribute,
- # provided the variable was declared in MyClass (or
- # a derived class) or typed to MyClass.
- ...
- }
-
- sub Good : ATTR(ARRAY) {
- # Invoked for any array variable with a :Good attribute,
- # provided the variable was declared in MyClass (or
- # a derived class) or typed to MyClass.
- ...
- }
-
- sub Good : ATTR(HASH) {
- # Invoked for any hash variable with a :Good attribute,
- # provided the variable was declared in MyClass (or
- # a derived class) or typed to MyClass.
- ...
- }
-
- sub Ugly : ATTR(CODE) {
- # Invoked for any subroutine declared in MyClass (or a
- # derived class) with an :Ugly attribute.
- ...
- }
-
- sub Omni : ATTR {
- # Invoked for any scalar, array, hash, or subroutine
- # with an :Omni attribute, provided the variable or
- # subroutine was declared in MyClass (or a derived class)
- # or the variable was typed to MyClass.
- # Use ref($_[2]) to determine what kind of referent it was.
- ...
- }
-
-
- use Attribute::Handlers autotie => { Cycle => Tie::Cycle };
-
- my $next : Cycle(['A'..'Z']);
-
-DESCRIPTION
- This module, when inherited by a package, allows that package's class to
- define attribute handler subroutines for specific attributes. Variables
- and subroutines subsequently defined in that package, or in packages
- derived from that package may be given attributes with the same names as
- the attribute handler subroutines, which will then be called in one of
- the compilation phases (i.e. in a "BEGIN", "CHECK", "INIT", or "END"
- block). ("UNITCHECK" blocks don't correspond to a global compilation
- phase, so they can't be specified here.)
-
- To create a handler, define it as a subroutine with the same name as the
- desired attribute, and declare the subroutine itself with the attribute
- ":ATTR". For example:
-
- package LoudDecl;
- use Attribute::Handlers;
-
- sub Loud :ATTR {
- my ($package, $symbol, $referent, $attr, $data, $phase, $filename, $linenum) = @_;
- print STDERR
- ref($referent), " ",
- *{$symbol}{NAME}, " ",
- "($referent) ", "was just declared ",
- "and ascribed the ${attr} attribute ",
- "with data ($data)\n",
- "in phase $phase\n",
- "in file $filename at line $linenum\n";
- }
-
- This creates a handler for the attribute ":Loud" in the class LoudDecl.
- Thereafter, any subroutine declared with a ":Loud" attribute in the
- class LoudDecl:
-
- package LoudDecl;
-
- sub foo: Loud {...}
-
- causes the above handler to be invoked, and passed:
-
- [0] the name of the package into which it was declared;
-
- [1] a reference to the symbol table entry (typeglob) containing the
- subroutine;
-
- [2] a reference to the subroutine;
-
- [3] the name of the attribute;
-
- [4] any data associated with that attribute;
-
- [5] the name of the phase in which the handler is being invoked;
-
- [6] the filename in which the handler is being invoked;
-
- [7] the line number in this file.
-
- Likewise, declaring any variables with the ":Loud" attribute within the
- package:
-
- package LoudDecl;
-
- my $foo :Loud;
- my @foo :Loud;
- my %foo :Loud;
-
- will cause the handler to be called with a similar argument list
- (except, of course, that $_[2] will be a reference to the variable).
-
- The package name argument will typically be the name of the class into
- which the subroutine was declared, but it may also be the name of a
- derived class (since handlers are inherited).
-
- If a lexical variable is given an attribute, there is no symbol table to
- which it belongs, so the symbol table argument ($_[1]) is set to the
- string 'LEXICAL' in that case. Likewise, ascribing an attribute to an
- anonymous subroutine results in a symbol table argument of 'ANON'.
-
- The data argument passes in the value (if any) associated with the
- attribute. For example, if &foo had been declared:
-
- sub foo :Loud("turn it up to 11, man!") {...}
-
- then a reference to an array containing the string "turn it up to 11,
- man!" would be passed as the last argument.
-
- Attribute::Handlers makes strenuous efforts to convert the data argument
- ($_[4]) to a useable form before passing it to the handler (but see
- "Non-interpretive attribute handlers"). If those efforts succeed, the
- interpreted data is passed in an array reference; if they fail, the raw
- data is passed as a string. For example, all of these:
-
- sub foo :Loud(till=>ears=>are=>bleeding) {...}
- sub foo :Loud(qw/till ears are bleeding/) {...}
- sub foo :Loud(qw/my, ears, are, bleeding/) {...}
- sub foo :Loud(till,ears,are,bleeding) {...}
-
- causes it to pass "['till','ears','are','bleeding']" as the handler's
- data argument. While:
-
- sub foo :Loud(['till','ears','are','bleeding']) {...}
-
- causes it to pass "[ ['till','ears','are','bleeding'] ]"; the array
- reference specified in the data being passed inside the standard array
- reference indicating successful interpretation.
-
- However, if the data can't be parsed as valid Perl, then it is passed as
- an uninterpreted string. For example:
-
- sub foo :Loud(my,ears,are,bleeding) {...}
- sub foo :Loud(qw/my ears are bleeding) {...}
-
- cause the strings 'my,ears,are,bleeding' and 'qw/my ears are bleeding'
- respectively to be passed as the data argument.
-
- If no value is associated with the attribute, "undef" is passed.
-
- Typed lexicals
- Regardless of the package in which it is declared, if a lexical variable
- is ascribed an attribute, the handler that is invoked is the one
- belonging to the package to which it is typed. For example, the
- following declarations:
-
- package OtherClass;
-
- my LoudDecl $loudobj : Loud;
- my LoudDecl @loudobjs : Loud;
- my LoudDecl %loudobjex : Loud;
-
- causes the LoudDecl::Loud handler to be invoked (even if OtherClass also
- defines a handler for ":Loud" attributes).
-
- Type-specific attribute handlers
- If an attribute handler is declared and the ":ATTR" specifier is given
- the name of a built-in type ("SCALAR", "ARRAY", "HASH", or "CODE"), the
- handler is only applied to declarations of that type. For example, the
- following definition:
-
- package LoudDecl;
-
- sub RealLoud :ATTR(SCALAR) { print "Yeeeeow!" }
-
- creates an attribute handler that applies only to scalars:
-
- package Painful;
- use base LoudDecl;
-
- my $metal : RealLoud; # invokes &LoudDecl::RealLoud
- my @metal : RealLoud; # error: unknown attribute
- my %metal : RealLoud; # error: unknown attribute
- sub metal : RealLoud {...} # error: unknown attribute
-
- You can, of course, declare separate handlers for these types as well
- (but you'll need to specify "no warnings 'redefine'" to do it quietly):
-
- package LoudDecl;
- use Attribute::Handlers;
- no warnings 'redefine';
-
- sub RealLoud :ATTR(SCALAR) { print "Yeeeeow!" }
- sub RealLoud :ATTR(ARRAY) { print "Urrrrrrrrrr!" }
- sub RealLoud :ATTR(HASH) { print "Arrrrrgggghhhhhh!" }
- sub RealLoud :ATTR(CODE) { croak "Real loud sub torpedoed" }
-
- You can also explicitly indicate that a single handler is meant to be
- used for all types of referents like so:
-
- package LoudDecl;
- use Attribute::Handlers;
-
- sub SeriousLoud :ATTR(ANY) { warn "Hearing loss imminent" }
-
- (I.e. "ATTR(ANY)" is a synonym for ":ATTR").
-
- Non-interpretive attribute handlers
- Occasionally the strenuous efforts Attribute::Handlers makes to convert
- the data argument ($_[4]) to a useable form before passing it to the
- handler get in the way.
-
- You can turn off that eagerness-to-help by declaring an attribute
- handler with the keyword "RAWDATA". For example:
-
- sub Raw : ATTR(RAWDATA) {...}
- sub Nekkid : ATTR(SCALAR,RAWDATA) {...}
- sub Au::Naturale : ATTR(RAWDATA,ANY) {...}
-
- Then the handler makes absolutely no attempt to interpret the data it
- receives and simply passes it as a string:
-
- my $power : Raw(1..100); # handlers receives "1..100"
-
- Phase-specific attribute handlers
- By default, attribute handlers are called at the end of the compilation
- phase (in a "CHECK" block). This seems to be optimal in most cases
- because most things that can be defined are defined by that point but
- nothing has been executed.
-
- However, it is possible to set up attribute handlers that are called at
- other points in the program's compilation or execution, by explicitly
- stating the phase (or phases) in which you wish the attribute handler to
- be called. For example:
-
- sub Early :ATTR(SCALAR,BEGIN) {...}
- sub Normal :ATTR(SCALAR,CHECK) {...}
- sub Late :ATTR(SCALAR,INIT) {...}
- sub Final :ATTR(SCALAR,END) {...}
- sub Bookends :ATTR(SCALAR,BEGIN,END) {...}
-
- As the last example indicates, a handler may be set up to be (re)called
- in two or more phases. The phase name is passed as the handler's final
- argument.
-
- Note that attribute handlers that are scheduled for the "BEGIN" phase
- are handled as soon as the attribute is detected (i.e. before any
- subsequently defined "BEGIN" blocks are executed).
-
- Attributes as "tie" interfaces
- Attributes make an excellent and intuitive interface through which to
- tie variables. For example:
-
- use Attribute::Handlers;
- use Tie::Cycle;
-
- sub UNIVERSAL::Cycle : ATTR(SCALAR) {
- my ($package, $symbol, $referent, $attr, $data, $phase) = @_;
- $data = [ $data ] unless ref $data eq 'ARRAY';
- tie $$referent, 'Tie::Cycle', $data;
- }
-
- # and thereafter...
-
- package main;
-
- my $next : Cycle('A'..'Z'); # $next is now a tied variable
-
- while (<>) {
- print $next;
- }
-
- Note that, because the "Cycle" attribute receives its arguments in the
- $data variable, if the attribute is given a list of arguments, $data
- will consist of a single array reference; otherwise, it will consist of
- the single argument directly. Since Tie::Cycle requires its cycling
- values to be passed as an array reference, this means that we need to
- wrap non-array-reference arguments in an array constructor:
-
- $data = [ $data ] unless ref $data eq 'ARRAY';
-
- Typically, however, things are the other way around: the tieable class
- expects its arguments as a flattened list, so the attribute looks like:
-
- sub UNIVERSAL::Cycle : ATTR(SCALAR) {
- my ($package, $symbol, $referent, $attr, $data, $phase) = @_;
- my @data = ref $data eq 'ARRAY' ? @$data : $data;
- tie $$referent, 'Tie::Whatever', @data;
- }
-
- This software pattern is so widely applicable that Attribute::Handlers
- provides a way to automate it: specifying 'autotie' in the "use
- Attribute::Handlers" statement. So, the cycling example, could also be
- written:
-
- use Attribute::Handlers autotie => { Cycle => 'Tie::Cycle' };
-
- # and thereafter...
-
- package main;
-
- my $next : Cycle(['A'..'Z']); # $next is now a tied variable
-
- while (<>) {
- print $next;
-
- Note that we now have to pass the cycling values as an array reference,
- since the "autotie" mechanism passes "tie" a list of arguments as a list
- (as in the Tie::Whatever example), *not* as an array reference (as in
- the original Tie::Cycle example at the start of this section).
-
- The argument after 'autotie' is a reference to a hash in which each key
- is the name of an attribute to be created, and each value is the class
- to which variables ascribed that attribute should be tied.
-
- Note that there is no longer any need to import the Tie::Cycle module --
- Attribute::Handlers takes care of that automagically. You can even pass
- arguments to the module's "import" subroutine, by appending them to the
- class name. For example:
-
- use Attribute::Handlers
- autotie => { Dir => 'Tie::Dir qw(DIR_UNLINK)' };
-
- If the attribute name is unqualified, the attribute is installed in the
- current package. Otherwise it is installed in the qualifier's package:
-
- package Here;
-
- use Attribute::Handlers autotie => {
- Other::Good => Tie::SecureHash, # tie attr installed in Other::
- Bad => Tie::Taxes, # tie attr installed in Here::
- UNIVERSAL::Ugly => Software::Patent # tie attr installed everywhere
- };
-
- Autoties are most commonly used in the module to which they actually
- tie, and need to export their attributes to any module that calls them.
- To facilitate this, Attribute::Handlers recognizes a special
- "pseudo-class" -- "__CALLER__", which may be specified as the qualifier
- of an attribute:
-
- package Tie::Me::Kangaroo:Down::Sport;
-
- use Attribute::Handlers autotie => { '__CALLER__::Roo' => __PACKAGE__ };
-
- This causes Attribute::Handlers to define the "Roo" attribute in the
- package that imports the Tie::Me::Kangaroo:Down::Sport module.
-
- Note that it is important to quote the __CALLER__::Roo identifier
- because a bug in perl 5.8 will refuse to parse it and cause an unknown
- error.
-
- Passing the tied object to "tie"
- Occasionally it is important to pass a reference to the object being
- tied to the TIESCALAR, TIEHASH, etc. that ties it.
-
- The "autotie" mechanism supports this too. The following code:
-
- use Attribute::Handlers autotieref => { Selfish => Tie::Selfish };
- my $var : Selfish(@args);
-
- has the same effect as:
-
- tie my $var, 'Tie::Selfish', @args;
-
- But when "autotieref" is used instead of "autotie":
-
- use Attribute::Handlers autotieref => { Selfish => Tie::Selfish };
- my $var : Selfish(@args);
-
- the effect is to pass the "tie" call an extra reference to the variable
- being tied:
-
- tie my $var, 'Tie::Selfish', \$var, @args;
-
-EXAMPLES
- If the class shown in SYNOPSIS were placed in the MyClass.pm module,
- then the following code:
-
- package main;
- use MyClass;
-
- my MyClass $slr :Good :Bad(1**1-1) :Omni(-vorous);
-
- package SomeOtherClass;
- use base MyClass;
-
- sub tent { 'acle' }
-
- sub fn :Ugly(sister) :Omni('po',tent()) {...}
- my @arr :Good :Omni(s/cie/nt/);
- my %hsh :Good(q/bye/) :Omni(q/bus/);
-
- would cause the following handlers to be invoked:
-
- # my MyClass $slr :Good :Bad(1**1-1) :Omni(-vorous);
-
- MyClass::Good:ATTR(SCALAR)( 'MyClass', # class
- 'LEXICAL', # no typeglob
- \$slr, # referent
- 'Good', # attr name
- undef # no attr data
- 'CHECK', # compiler phase
- );
-
- MyClass::Bad:ATTR(SCALAR)( 'MyClass', # class
- 'LEXICAL', # no typeglob
- \$slr, # referent
- 'Bad', # attr name
- 0 # eval'd attr data
- 'CHECK', # compiler phase
- );
-
- MyClass::Omni:ATTR(SCALAR)( 'MyClass', # class
- 'LEXICAL', # no typeglob
- \$slr, # referent
- 'Omni', # attr name
- '-vorous' # eval'd attr data
- 'CHECK', # compiler phase
- );
-
-
- # sub fn :Ugly(sister) :Omni('po',tent()) {...}
-
- MyClass::UGLY:ATTR(CODE)( 'SomeOtherClass', # class
- \*SomeOtherClass::fn, # typeglob
- \&SomeOtherClass::fn, # referent
- 'Ugly', # attr name
- 'sister' # eval'd attr data
- 'CHECK', # compiler phase
- );
-
- MyClass::Omni:ATTR(CODE)( 'SomeOtherClass', # class
- \*SomeOtherClass::fn, # typeglob
- \&SomeOtherClass::fn, # referent
- 'Omni', # attr name
- ['po','acle'] # eval'd attr data
- 'CHECK', # compiler phase
- );
-
-
- # my @arr :Good :Omni(s/cie/nt/);
-
- MyClass::Good:ATTR(ARRAY)( 'SomeOtherClass', # class
- 'LEXICAL', # no typeglob
- \@arr, # referent
- 'Good', # attr name
- undef # no attr data
- 'CHECK', # compiler phase
- );
-
- MyClass::Omni:ATTR(ARRAY)( 'SomeOtherClass', # class
- 'LEXICAL', # no typeglob
- \@arr, # referent
- 'Omni', # attr name
- "" # eval'd attr data
- 'CHECK', # compiler phase
- );
-
-
- # my %hsh :Good(q/bye) :Omni(q/bus/);
-
- MyClass::Good:ATTR(HASH)( 'SomeOtherClass', # class
- 'LEXICAL', # no typeglob
- \%hsh, # referent
- 'Good', # attr name
- 'q/bye' # raw attr data
- 'CHECK', # compiler phase
- );
-
- MyClass::Omni:ATTR(HASH)( 'SomeOtherClass', # class
- 'LEXICAL', # no typeglob
- \%hsh, # referent
- 'Omni', # attr name
- 'bus' # eval'd attr data
- 'CHECK', # compiler phase
- );
-
- Installing handlers into UNIVERSAL, makes them...err..universal. For
- example:
-
- package Descriptions;
- use Attribute::Handlers;
-
- my %name;
- sub name { return $name{$_[2]}||*{$_[1]}{NAME} }
-
- sub UNIVERSAL::Name :ATTR {
- $name{$_[2]} = $_[4];
- }
-
- sub UNIVERSAL::Purpose :ATTR {
- print STDERR "Purpose of ", &name, " is $_[4]\n";
- }
-
- sub UNIVERSAL::Unit :ATTR {
- print STDERR &name, " measured in $_[4]\n";
- }
-
- Let's you write:
-
- use Descriptions;
-
- my $capacity : Name(capacity)
- : Purpose(to store max storage capacity for files)
- : Unit(Gb);
-
-
- package Other;
-
- sub foo : Purpose(to foo all data before barring it) { }
-
- # etc.
-
-DIAGNOSTICS
- "Bad attribute type: ATTR(%s)"
- An attribute handler was specified with an ":ATTR(*ref_type*)", but
- the type of referent it was defined to handle wasn't one of the five
- permitted: "SCALAR", "ARRAY", "HASH", "CODE", or "ANY".
-
- "Attribute handler %s doesn't handle %s attributes"
- A handler for attributes of the specified name *was* defined, but
- not for the specified type of declaration. Typically encountered whe
- trying to apply a "VAR" attribute handler to a subroutine, or a
- "SCALAR" attribute handler to some other type of variable.
-
- "Declaration of %s attribute in package %s may clash with future
- reserved word"
- A handler for an attributes with an all-lowercase name was declared.
- An attribute with an all-lowercase name might have a meaning to Perl
- itself some day, even though most don't yet. Use a mixed-case
- attribute name, instead.
-
- "Can't have two ATTR specifiers on one subroutine"
- You just can't, okay? Instead, put all the specifications together
- with commas between them in a single "ATTR(*specification*)".
-
- "Can't autotie a %s"
- You can only declare autoties for types "SCALAR", "ARRAY", and
- "HASH". They're the only things (apart from typeglobs -- which are
- not declarable) that Perl can tie.
-
- "Internal error: %s symbol went missing"
- Something is rotten in the state of the program. An attributed
- subroutine ceased to exist between the point it was declared and the
- point at which its attribute handler(s) would have been called.
-
- "Won't be able to apply END handler"
- You have defined an END handler for an attribute that is being
- applied to a lexical variable. Since the variable may not be
- available during END this won't happen.
-
-AUTHOR
- Damian Conway (damian at conway.org). The maintainer of this module is now
- Rafael Garcia-Suarez (rgarciasuarez at gmail.com).
-
- Maintainer of the CPAN release is Steffen Mueller (smueller at cpan.org).
- Contact him with technical difficulties with respect to the packaging of
- the CPAN module.
-
-BUGS
- There are undoubtedly serious bugs lurking somewhere in code this funky
- :-) Bug reports and other feedback are most welcome.
-
-COPYRIGHT AND LICENSE
- Copyright (c) 2001-2009, Damian Conway. All Rights Reserved.
- This module is free software. It may be used, redistributed
- and/or modified under the same terms as Perl itself.
-
Deleted: vendor/perl/dist/dist/ExtUtils-ParseXS/t/basic.t
===================================================================
--- vendor/perl/dist/dist/ExtUtils-ParseXS/t/basic.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/dist/ExtUtils-ParseXS/t/basic.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,80 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use Test::More;
-use Config;
-use DynaLoader;
-use ExtUtils::CBuilder;
-
-plan tests => 10;
-
-my ($source_file, $obj_file, $lib_file);
-
-require_ok( 'ExtUtils::ParseXS' );
-ExtUtils::ParseXS->import('process_file');
-
-chdir 't' or die "Can't chdir to t/, $!";
-
-use Carp; $SIG{__WARN__} = \&Carp::cluck;
-
-#########################
-
-# Try sending to filehandle
-tie *FH, 'Foo';
-process_file( filename => 'XSTest.xs', output => \*FH, prototypes => 1 );
-like tied(*FH)->content, '/is_even/', "Test that output contains some text";
-
-$source_file = 'XSTest.c';
-
-# Try sending to file
-process_file(filename => 'XSTest.xs', output => $source_file, prototypes => 0);
-ok -e $source_file, "Create an output file";
-
-my $quiet = $ENV{PERL_CORE} && !$ENV{HARNESS_ACTIVE};
-my $b = ExtUtils::CBuilder->new(quiet => $quiet);
-
-SKIP: {
- skip "no compiler available", 2
- if ! $b->have_compiler;
- $obj_file = $b->compile( source => $source_file );
- ok $obj_file;
- ok -e $obj_file, "Make sure $obj_file exists";
-}
-
-SKIP: {
- skip "no dynamic loading", 5
- if !$b->have_compiler || !$Config{usedl};
- my $module = 'XSTest';
- $lib_file = $b->link( objects => $obj_file, module_name => $module );
- ok $lib_file;
- ok -e $lib_file, "Make sure $lib_file exists";
-
- eval {require XSTest};
- is $@, '';
- ok XSTest::is_even(8);
- ok !XSTest::is_even(9);
-
- # Win32 needs to close the DLL before it can unlink it, but unfortunately
- # dl_unload_file was missing on Win32 prior to perl change #24679!
- if ($^O eq 'MSWin32' and defined &DynaLoader::dl_unload_file) {
- for (my $i = 0; $i < @DynaLoader::dl_modules; $i++) {
- if ($DynaLoader::dl_modules[$i] eq $module) {
- DynaLoader::dl_unload_file($DynaLoader::dl_librefs[$i]);
- last;
- }
- }
- }
-}
-
-unless ($ENV{PERL_NO_CLEANUP}) {
- for ( $obj_file, $lib_file, $source_file) {
- next unless defined $_;
- 1 while unlink $_;
- }
-}
-
-#####################################################################
-
-sub Foo::TIEHANDLE { bless {}, 'Foo' }
-sub Foo::PRINT { shift->{buf} .= join '', @_ }
-sub Foo::content { shift->{buf} }
Deleted: vendor/perl/dist/dist/ExtUtils-ParseXS/t/more.t
===================================================================
--- vendor/perl/dist/dist/ExtUtils-ParseXS/t/more.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/dist/ExtUtils-ParseXS/t/more.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,110 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use Test::More;
-use Config;
-use DynaLoader;
-use ExtUtils::CBuilder;
-use attributes;
-use overload;
-
-plan tests => 25;
-
-my ($source_file, $obj_file, $lib_file);
-
-require_ok( 'ExtUtils::ParseXS' );
-ExtUtils::ParseXS->import('process_file');
-
-chdir 't' or die "Can't chdir to t/, $!";
-
-use Carp; $SIG{__WARN__} = \&Carp::cluck;
-
-#########################
-
-$source_file = 'XSMore.c';
-
-# Try sending to file
-ExtUtils::ParseXS->process_file(
- filename => 'XSMore.xs',
- output => $source_file,
-);
-ok -e $source_file, "Create an output file";
-
-my $quiet = $ENV{PERL_CORE} && !$ENV{HARNESS_ACTIVE};
-my $b = ExtUtils::CBuilder->new(quiet => $quiet);
-
-SKIP: {
- skip "no compiler available", 2
- if ! $b->have_compiler;
- $obj_file = $b->compile( source => $source_file );
- ok $obj_file;
- ok -e $obj_file, "Make sure $obj_file exists";
-}
-
-SKIP: {
- skip "no dynamic loading", 21
- if !$b->have_compiler || !$Config{usedl};
- my $module = 'XSMore';
- $lib_file = $b->link( objects => $obj_file, module_name => $module );
- ok $lib_file;
- ok -e $lib_file, "Make sure $lib_file exists";
-
- eval{
- package XSMore;
- our $VERSION = 42;
- our $boot_ok;
- DynaLoader::bootstrap_inherit(__PACKAGE__, $VERSION); # VERSIONCHECK disabled
-
- sub new{ bless {}, shift }
- };
- is $@, '';
- is ExtUtils::ParseXS::errors(), 0, 'ExtUtils::ParseXS::errors()';
-
- is $XSMore::boot_ok, 100, 'the BOOT keyword';
-
- ok XSMore::include_ok(), 'the INCLUDE keyword';
- is prototype(\&XSMore::include_ok), "", 'the PROTOTYPES keyword';
-
- is prototype(\&XSMore::prototype_ssa), '$$@', 'the PROTOTYPE keyword';
-
- is_deeply [attributes::get(\&XSMore::attr_method)], [qw(method)], 'the ATTRS keyword';
- is prototype(\&XSMore::attr_method), '$;@', 'ATTRS with prototype';
-
- is XSMore::return_1(), 1, 'the CASE keyword (1)';
- is XSMore::return_2(), 2, 'the CASE keyword (2)';
- is prototype(\&XSMore::return_1), "", 'ALIAS with prototype (1)';
- is prototype(\&XSMore::return_2), "", 'ALIAS with prototype (2)';
-
- is XSMore::arg_init(200), 200, 'argument init';
-
- ok overload::Overloaded(XSMore->new), 'the FALLBACK keyword';
- is abs(XSMore->new), 42, 'the OVERLOAD keyword';
-
- my @a;
- XSMore::hook(\@a);
- is_deeply \@a, [qw(INIT CODE POSTCALL CLEANUP)], 'the INIT & POSTCALL & CLEANUP keywords';
-
- is_deeply [XSMore::outlist()], [ord('a'), ord('b')], 'the OUTLIST keyword';
-
- is XSMore::len("foo"), 3, 'the length keyword';
-
- is XSMore::sum(5, 9), 14, 'the INCLUDE_COMMAND directive';
-
- # Win32 needs to close the DLL before it can unlink it, but unfortunately
- # dl_unload_file was missing on Win32 prior to perl change #24679!
- if ($^O eq 'MSWin32' and defined &DynaLoader::dl_unload_file) {
- for (my $i = 0; $i < @DynaLoader::dl_modules; $i++) {
- if ($DynaLoader::dl_modules[$i] eq $module) {
- DynaLoader::dl_unload_file($DynaLoader::dl_librefs[$i]);
- last;
- }
- }
- }
-}
-
-unless ($ENV{PERL_NO_CLEANUP}) {
- for ( $obj_file, $lib_file, $source_file) {
- next unless defined $_;
- 1 while unlink $_;
- }
-}
Deleted: vendor/perl/dist/dist/ExtUtils-ParseXS/t/usage.t
===================================================================
--- vendor/perl/dist/dist/ExtUtils-ParseXS/t/usage.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/dist/ExtUtils-ParseXS/t/usage.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,117 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use Test::More;
-use Config;
-use DynaLoader;
-use ExtUtils::CBuilder;
-
-if ( $] < 5.008 ) {
- plan skip_all => "INTERFACE keyword support broken before 5.8";
-}
-else {
- plan tests => 24;
-}
-
-my ($source_file, $obj_file, $lib_file, $module);
-
-require_ok( 'ExtUtils::ParseXS' );
-ExtUtils::ParseXS->import('process_file');
-
-chdir 't' or die "Can't chdir to t/, $!";
-
-use Carp; $SIG{__WARN__} = \&Carp::cluck;
-
-#########################
-
-$source_file = 'XSUsage.c';
-
-# Try sending to file
-process_file(filename => 'XSUsage.xs', output => $source_file);
-ok -e $source_file, "Create an output file";
-
-# TEST doesn't like extraneous output
-my $quiet = $ENV{PERL_CORE} && !$ENV{HARNESS_ACTIVE};
-
-# Try to compile the file! Don't get too fancy, though.
-my $b = ExtUtils::CBuilder->new(quiet => $quiet);
-
-SKIP: {
- skip "no compiler available", 2
- if ! $b->have_compiler;
- $module = 'XSUsage';
-
- $obj_file = $b->compile( source => $source_file );
- ok $obj_file;
- ok -e $obj_file, "Make sure $obj_file exists";
-}
-SKIP: {
- skip "no dynamic loading", 20
- if !$b->have_compiler || !$Config{usedl};
-
- $lib_file = $b->link( objects => $obj_file, module_name => $module );
- ok $lib_file;
- ok -e $lib_file, "Make sure $lib_file exists";
-
- eval {require XSUsage};
- is $@, '';
-
- # The real tests here - for each way of calling the functions, call with the
- # wrong number of arguments and check the Usage line is what we expect
-
- eval { XSUsage::one(1) };
- ok $@;
- ok $@ =~ /^Usage: XSUsage::one/;
-
- eval { XSUsage::two(1) };
- ok $@;
- ok $@ =~ /^Usage: XSUsage::two/;
-
- eval { XSUsage::two_x(1) };
- ok $@;
- ok $@ =~ /^Usage: XSUsage::two_x/;
-
- eval { FOO::two(1) };
- ok $@;
- ok $@ =~ /^Usage: FOO::two/;
-
- eval { XSUsage::three(1) };
- ok $@;
- ok $@ =~ /^Usage: XSUsage::three/;
-
- eval { XSUsage::four(1) };
- ok !$@;
-
- eval { XSUsage::five() };
- ok $@;
- ok $@ =~ /^Usage: XSUsage::five/;
-
- eval { XSUsage::six() };
- ok !$@;
-
- eval { XSUsage::six(1) };
- ok !$@;
-
- eval { XSUsage::six(1,2) };
- ok $@;
- ok $@ =~ /^Usage: XSUsage::six/;
-
- # Win32 needs to close the DLL before it can unlink it, but unfortunately
- # dl_unload_file was missing on Win32 prior to perl change #24679!
- if ($^O eq 'MSWin32' and defined &DynaLoader::dl_unload_file) {
- for (my $i = 0; $i < @DynaLoader::dl_modules; $i++) {
- if ($DynaLoader::dl_modules[$i] eq $module) {
- DynaLoader::dl_unload_file($DynaLoader::dl_librefs[$i]);
- last;
- }
- }
- }
-}
-
-unless ($ENV{PERL_NO_CLEANUP}) {
- for ( $obj_file, $lib_file, $source_file) {
- next unless defined $_;
- 1 while unlink $_;
- }
-}
-
Modified: vendor/perl/dist/dist/Module-CoreList/Changes
===================================================================
--- vendor/perl/dist/dist/Module-CoreList/Changes 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/dist/Module-CoreList/Changes 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,6 +1,36 @@
-2.95 Mon Jun 22 2013
+3.02
+ - Prepared for v5.19.7
+
+3.01 Wed Nov 20 2013
+ - Finalised for v5.19.6
+
+3.00 Sun Oct 20 2013
+ - Updated for v5.19.5
+ - exported %delta
+ - fixed bug in is_core(): it was naively assuming a linear sequence of releases,
+ rather than the tree with multiple branches.
+
+2.99 Fri Sep 20 2013
+ - Updated for v5.19.4
+ - fixed Module::Build core deprecation
+ - changes_between now has the same API as all other functions
+ - added is_core() which returns true if a module is/was core
+ in a specific version of Perl. Can optionally specify minimum
+ version of the module.
+
+2.98 Wed Aug 21 2013
+ - Prepared for v5.19.4
+
+2.97 Tue Aug 20 2013
- Updated for v5.19.3
+2.96 Mon Aug 12 2013
+ - Utils module listing all utilities released with core
+ - Updated for v5.18.1
+
+2.95 Mon Jun 22 2013
+ - Prepared for v5.19.3
+
2.94 Sun Jun 21 2013
- Updated for v5.19.2
Modified: vendor/perl/dist/dist/Module-CoreList/MANIFEST
===================================================================
--- vendor/perl/dist/dist/Module-CoreList/MANIFEST 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/dist/Module-CoreList/MANIFEST 2014-08-27 11:27:40 UTC (rev 6720)
@@ -12,5 +12,7 @@
t/corelist.t
t/deprecated.t
t/find_modules.t
+t/is_core.t
t/pod.t
+t/utils.t
META.json Module JSON meta-data (added by MakeMaker)
Modified: vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm
===================================================================
--- vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -3,7 +3,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = "2.96";
+$VERSION = "3.03";
sub TIEHASH {
my ($class, $changed, $removed, $parent) = @_;
Modified: vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList/Utils.pm
===================================================================
--- vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList/Utils.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList/Utils.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -6,7 +6,7 @@
use Module::CoreList;
use Module::CoreList::TieHashDelta;
-$VERSION = '2.96';
+$VERSION = '3.03';
sub utilities {
my $perl = shift;
@@ -815,6 +815,13 @@
removed => {
}
},
+ 5.018002 => {
+ delta_from => 5.018001,
+ changed => {
+ },
+ removed => {
+ }
+ },
5.019000 => {
delta_from => 5.018000,
changed => {
@@ -847,6 +854,34 @@
removed => {
}
},
+ 5.019004 => {
+ delta_from => 5.019003,
+ changed => {
+ },
+ removed => {
+ }
+ },
+ 5.019005 => {
+ delta_from => 5.019004,
+ changed => {
+ },
+ removed => {
+ }
+ },
+ 5.019006 => {
+ delta_from => 5.019005,
+ changed => {
+ },
+ removed => {
+ }
+ },
+ 5.019007 => {
+ delta_from => 5.019006,
+ changed => {
+ },
+ removed => {
+ }
+ },
);
for my $version (sort { $a <=> $b } keys %delta) {
Modified: vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList.pm
===================================================================
--- vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,9 +1,9 @@
package Module::CoreList;
use strict;
use vars qw/$VERSION %released %version %families %upstream
- %bug_tracker %deprecated/;
+ %bug_tracker %deprecated %delta/;
use Module::CoreList::TieHashDelta;
-$VERSION = '2.96';
+$VERSION = '3.03';
my $dumpinc = 0;
sub import {
@@ -110,7 +110,9 @@
}
sub changes_between {
- my ($left_ver, $right_ver) = @_;
+ my $left_ver = shift;
+ $left_ver = shift if eval { $left_ver->isa(__PACKAGE__) };
+ my $right_ver = shift;
my $left = $version{ $left_ver };
my $right = $version{ $right_ver };
@@ -235,6 +237,12 @@
5.019001 => '2013-06-21',
5.019002 => '2013-07-22',
5.018001 => '2013-08-12',
+ 5.019003 => '2013-08-20',
+ 5.019004 => '2013-09-20',
+ 5.019005 => '2013-10-20',
+ 5.019006 => '2013-11-20',
+ 5.019007 => '2013-12-20',
+ 5.018002 => '2014-01-09',
);
for my $version ( sort { $a <=> $b } keys %released ) {
@@ -242,7 +250,7 @@
push @{ $families{ $family }} , $version;
}
-my %delta = (
+%delta = (
5 => {
changed => {
'AnyDBM_File' => undef,
@@ -8025,6 +8033,32 @@
removed => {
}
},
+ 5.018001 => {
+ delta_from => 5.018000,
+ changed => {
+ 'B' => '1.42_01',
+ 'Config' => '5.018001',
+ 'Digest::SHA' => '5.84_01',
+ 'Module::CoreList' => '2.96',
+ 'Module::CoreList::TieHashDelta'=> '2.96',
+ 'Module::CoreList::Utils'=> '2.96',
+ },
+ removed => {
+ 'VMS::Filespec' => 1,
+ }
+ },
+ 5.018002 => {
+ delta_from => 5.018001,
+ changed => {
+ 'B' => '1.42_02',
+ 'B::Concise' => '0.95_01',
+ 'Config' => '5.018002',
+ 'File::Glob' => '1.20_01',
+ 'Module::CoreList' => '3.03',
+ 'Module::CoreList::TieHashDelta'=> '3.03',
+ 'Module::CoreList::Utils'=> '3.03',
+ },
+ },
5.019000 => {
delta_from => 5.018000,
changed => {
@@ -8455,22 +8489,834 @@
removed => {
}
},
- 5.018001 => {
- delta_from => 5.018000,
+ 5.019003 => {
+ delta_from => 5.019002,
changed => {
- 'B' => '1.42_01',
- 'Config' => '5.018001',
- 'Digest::SHA' => '5.84_01',
- 'Module::CoreList' => '2.96',
- 'Module::CoreList::TieHashDelta'=> '2.96',
- 'Module::CoreList::Utils'=> '2.96',
+ 'B' => '1.45',
+ 'CPAN::Meta' => '2.132140',
+ 'CPAN::Meta::Converter' => '2.132140',
+ 'CPAN::Meta::Feature' => '2.132140',
+ 'CPAN::Meta::History' => '2.132140',
+ 'CPAN::Meta::Prereqs' => '2.132140',
+ 'CPAN::Meta::Spec' => '2.132140',
+ 'CPAN::Meta::Validator' => '2.132140',
+ 'Carp' => '1.31',
+ 'Carp::Heavy' => '1.31',
+ 'Compress::Raw::Bzip2' => '2.062',
+ 'Compress::Raw::Zlib' => '2.062',
+ 'Compress::Zlib' => '2.062',
+ 'Config' => '5.019003',
+ 'Config::Perl::V' => '0.19',
+ 'Cwd' => '3.44',
+ 'Data::Dumper' => '2.148',
+ 'Devel::PPPort' => '3.21',
+ 'Devel::Peek' => '1.13',
+ 'DynaLoader' => '1.19',
+ 'Encode' => '2.52',
+ 'Encode::Alias' => '2.17',
+ 'Encode::Encoding' => '2.06',
+ 'Encode::GSM0338' => '2.04',
+ 'Encode::MIME::Header' => '2.14',
+ 'Encode::Unicode' => '2.08',
+ 'English' => '1.08',
+ 'Exporter' => '5.69',
+ 'Exporter::Heavy' => '5.69',
+ 'ExtUtils::Command::MM' => '6.72',
+ 'ExtUtils::Liblist' => '6.72',
+ 'ExtUtils::Liblist::Kid'=> '6.72',
+ 'ExtUtils::MM' => '6.72',
+ 'ExtUtils::MM_AIX' => '6.72',
+ 'ExtUtils::MM_Any' => '6.72',
+ 'ExtUtils::MM_BeOS' => '6.72',
+ 'ExtUtils::MM_Cygwin' => '6.72',
+ 'ExtUtils::MM_DOS' => '6.72',
+ 'ExtUtils::MM_Darwin' => '6.72',
+ 'ExtUtils::MM_MacOS' => '6.72',
+ 'ExtUtils::MM_NW5' => '6.72',
+ 'ExtUtils::MM_OS2' => '6.72',
+ 'ExtUtils::MM_QNX' => '6.72',
+ 'ExtUtils::MM_UWIN' => '6.72',
+ 'ExtUtils::MM_Unix' => '6.72',
+ 'ExtUtils::MM_VMS' => '6.72',
+ 'ExtUtils::MM_VOS' => '6.72',
+ 'ExtUtils::MM_Win32' => '6.72',
+ 'ExtUtils::MM_Win95' => '6.72',
+ 'ExtUtils::MY' => '6.72',
+ 'ExtUtils::MakeMaker' => '6.72',
+ 'ExtUtils::MakeMaker::Config'=> '6.72',
+ 'ExtUtils::Mkbootstrap' => '6.72',
+ 'ExtUtils::Mksymlists' => '6.72',
+ 'ExtUtils::ParseXS::Eval'=> '3.21',
+ 'ExtUtils::testlib' => '6.72',
+ 'File::Spec' => '3.44',
+ 'File::Spec::Cygwin' => '3.44',
+ 'File::Spec::Epoc' => '3.44',
+ 'File::Spec::Functions' => '3.44',
+ 'File::Spec::Mac' => '3.44',
+ 'File::Spec::OS2' => '3.44',
+ 'File::Spec::Unix' => '3.44',
+ 'File::Spec::VMS' => '3.44',
+ 'File::Spec::Win32' => '3.44',
+ 'Getopt::Std' => '1.10',
+ 'IO::Compress::Adapter::Bzip2'=> '2.062',
+ 'IO::Compress::Adapter::Deflate'=> '2.062',
+ 'IO::Compress::Adapter::Identity'=> '2.062',
+ 'IO::Compress::Base' => '2.062',
+ 'IO::Compress::Base::Common'=> '2.062',
+ 'IO::Compress::Bzip2' => '2.062',
+ 'IO::Compress::Deflate' => '2.062',
+ 'IO::Compress::Gzip' => '2.062',
+ 'IO::Compress::Gzip::Constants'=> '2.062',
+ 'IO::Compress::RawDeflate'=> '2.062',
+ 'IO::Compress::Zip' => '2.062',
+ 'IO::Compress::Zip::Constants'=> '2.062',
+ 'IO::Compress::Zlib::Constants'=> '2.062',
+ 'IO::Compress::Zlib::Extra'=> '2.062',
+ 'IO::Uncompress::Adapter::Bunzip2'=> '2.062',
+ 'IO::Uncompress::Adapter::Identity'=> '2.062',
+ 'IO::Uncompress::Adapter::Inflate'=> '2.062',
+ 'IO::Uncompress::AnyInflate'=> '2.062',
+ 'IO::Uncompress::AnyUncompress'=> '2.062',
+ 'IO::Uncompress::Base' => '2.062',
+ 'IO::Uncompress::Bunzip2'=> '2.062',
+ 'IO::Uncompress::Gunzip'=> '2.062',
+ 'IO::Uncompress::Inflate'=> '2.062',
+ 'IO::Uncompress::RawInflate'=> '2.062',
+ 'IO::Uncompress::Unzip' => '2.062',
+ 'IPC::Cmd' => '0.84',
+ 'IPC::Msg' => '2.04',
+ 'IPC::Open3' => '1.15',
+ 'IPC::Semaphore' => '2.04',
+ 'IPC::SharedMem' => '2.04',
+ 'IPC::SysV' => '2.04',
+ 'List::Util' => '1.31',
+ 'List::Util::XS' => '1.31',
+ 'Math::BigFloat::Trace' => '0.36',
+ 'Math::BigInt::Trace' => '0.36',
+ 'Module::Build' => '0.4007',
+ 'Module::Build::Base' => '0.4007',
+ 'Module::Build::Compat' => '0.4007',
+ 'Module::Build::Config' => '0.4007',
+ 'Module::Build::Cookbook'=> '0.4007',
+ 'Module::Build::Dumper' => '0.4007',
+ 'Module::Build::ModuleInfo'=> '0.4007',
+ 'Module::Build::Notes' => '0.4007',
+ 'Module::Build::PPMMaker'=> '0.4007',
+ 'Module::Build::Platform::Default'=> '0.4007',
+ 'Module::Build::Platform::MacOS'=> '0.4007',
+ 'Module::Build::Platform::Unix'=> '0.4007',
+ 'Module::Build::Platform::VMS'=> '0.4007',
+ 'Module::Build::Platform::VOS'=> '0.4007',
+ 'Module::Build::Platform::Windows'=> '0.4007',
+ 'Module::Build::Platform::aix'=> '0.4007',
+ 'Module::Build::Platform::cygwin'=> '0.4007',
+ 'Module::Build::Platform::darwin'=> '0.4007',
+ 'Module::Build::Platform::os2'=> '0.4007',
+ 'Module::Build::PodParser'=> '0.4007',
+ 'Module::CoreList' => '2.97',
+ 'Module::CoreList::TieHashDelta'=> '2.97',
+ 'Module::CoreList::Utils'=> '2.97',
+ 'Net::Cmd' => '2.30',
+ 'Net::Config' => '1.12',
+ 'Net::Domain' => '2.22',
+ 'Net::FTP' => '2.78',
+ 'Net::FTP::dataconn' => '0.12',
+ 'Net::NNTP' => '2.25',
+ 'Net::Netrc' => '2.14',
+ 'Net::POP3' => '2.30',
+ 'Net::SMTP' => '2.32',
+ 'PerlIO' => '1.08',
+ 'Pod::Functions' => '1.08',
+ 'Pod::Functions::Functions'=> '1.08',
+ 'Scalar::Util' => '1.31',
+ 'Socket' => '2.011',
+ 'Storable' => '2.46',
+ 'Time::HiRes' => '1.9726',
+ 'Time::Piece' => '1.22',
+ 'Time::Seconds' => '1.22',
+ 'XS::APItest' => '0.55',
+ 'bigint' => '0.36',
+ 'bignum' => '0.36',
+ 'bigrat' => '0.36',
+ 'constant' => '1.28',
+ 'diagnostics' => '1.32',
+ 'inc::latest' => '0.4007',
+ 'mro' => '1.13',
+ 'parent' => '0.226',
+ 'utf8' => '1.13',
+ 'version' => '0.9903',
},
removed => {
- 'VMS::Filespec' => 1,
+ 'Module::Build::Platform::Amiga'=> 1,
+ 'Module::Build::Platform::EBCDIC'=> 1,
+ 'Module::Build::Platform::MPEiX'=> 1,
+ 'Module::Build::Platform::RiscOS'=> 1,
}
},
+ 5.019004 => {
+ delta_from => 5.019003,
+ changed => {
+ 'B' => '1.46',
+ 'B::Concise' => '0.99',
+ 'B::Deparse' => '1.23',
+ 'CPAN' => '2.03',
+ 'CPAN::Meta' => '2.132620',
+ 'CPAN::Meta::Converter' => '2.132620',
+ 'CPAN::Meta::Feature' => '2.132620',
+ 'CPAN::Meta::History' => '2.132620',
+ 'CPAN::Meta::Prereqs' => '2.132620',
+ 'CPAN::Meta::Requirements'=> '2.123',
+ 'CPAN::Meta::Spec' => '2.132620',
+ 'CPAN::Meta::Validator' => '2.132620',
+ 'Carp' => '1.32',
+ 'Carp::Heavy' => '1.32',
+ 'Config' => '5.019004',
+ 'Data::Dumper' => '2.149',
+ 'Devel::Peek' => '1.14',
+ 'DynaLoader' => '1.20',
+ 'Encode' => '2.55',
+ 'Encode::Alias' => '2.18',
+ 'Encode::CN::HZ' => '2.07',
+ 'Encode::Encoder' => '2.03',
+ 'Encode::Encoding' => '2.07',
+ 'Encode::GSM0338' => '2.05',
+ 'Encode::Guess' => '2.06',
+ 'Encode::JP::JIS7' => '2.05',
+ 'Encode::KR::2022_KR' => '2.03',
+ 'Encode::MIME::Header' => '2.15',
+ 'Encode::MIME::Header::ISO_2022_JP'=> '1.04',
+ 'Encode::Unicode' => '2.09',
+ 'Encode::Unicode::UTF7' => '2.08',
+ 'Errno' => '1.20',
+ 'Exporter' => '5.70',
+ 'Exporter::Heavy' => '5.70',
+ 'ExtUtils::CBuilder' => '0.280212',
+ 'ExtUtils::CBuilder::Base'=> '0.280212',
+ 'ExtUtils::CBuilder::Platform::Unix'=> '0.280212',
+ 'ExtUtils::CBuilder::Platform::VMS'=> '0.280212',
+ 'ExtUtils::CBuilder::Platform::Windows'=> '0.280212',
+ 'ExtUtils::CBuilder::Platform::Windows::BCC'=> '0.280212',
+ 'ExtUtils::CBuilder::Platform::Windows::GCC'=> '0.280212',
+ 'ExtUtils::CBuilder::Platform::Windows::MSVC'=> '0.280212',
+ 'ExtUtils::CBuilder::Platform::aix'=> '0.280212',
+ 'ExtUtils::CBuilder::Platform::cygwin'=> '0.280212',
+ 'ExtUtils::CBuilder::Platform::darwin'=> '0.280212',
+ 'ExtUtils::CBuilder::Platform::dec_osf'=> '0.280212',
+ 'ExtUtils::CBuilder::Platform::os2'=> '0.280212',
+ 'ExtUtils::Command' => '1.18',
+ 'ExtUtils::Command::MM' => '6.76',
+ 'ExtUtils::Liblist' => '6.76',
+ 'ExtUtils::Liblist::Kid'=> '6.76',
+ 'ExtUtils::MM' => '6.76',
+ 'ExtUtils::MM_AIX' => '6.76',
+ 'ExtUtils::MM_Any' => '6.76',
+ 'ExtUtils::MM_BeOS' => '6.76',
+ 'ExtUtils::MM_Cygwin' => '6.76',
+ 'ExtUtils::MM_DOS' => '6.76',
+ 'ExtUtils::MM_Darwin' => '6.76',
+ 'ExtUtils::MM_MacOS' => '6.76',
+ 'ExtUtils::MM_NW5' => '6.76',
+ 'ExtUtils::MM_OS2' => '6.76',
+ 'ExtUtils::MM_QNX' => '6.76',
+ 'ExtUtils::MM_UWIN' => '6.76',
+ 'ExtUtils::MM_Unix' => '6.76',
+ 'ExtUtils::MM_VMS' => '6.76',
+ 'ExtUtils::MM_VOS' => '6.76',
+ 'ExtUtils::MM_Win32' => '6.76',
+ 'ExtUtils::MM_Win95' => '6.76',
+ 'ExtUtils::MY' => '6.76',
+ 'ExtUtils::MakeMaker' => '6.76',
+ 'ExtUtils::MakeMaker::Config'=> '6.76',
+ 'ExtUtils::Mkbootstrap' => '6.76',
+ 'ExtUtils::Mksymlists' => '6.76',
+ 'ExtUtils::ParseXS' => '3.23',
+ 'ExtUtils::ParseXS::Constants'=> '3.23',
+ 'ExtUtils::ParseXS::CountLines'=> '3.23',
+ 'ExtUtils::ParseXS::Eval'=> '3.23',
+ 'ExtUtils::ParseXS::Utilities'=> '3.23',
+ 'ExtUtils::Typemaps' => '3.23',
+ 'ExtUtils::Typemaps::Cmd'=> '3.23',
+ 'ExtUtils::Typemaps::InputMap'=> '3.23',
+ 'ExtUtils::Typemaps::OutputMap'=> '3.23',
+ 'ExtUtils::Typemaps::Type'=> '3.23',
+ 'ExtUtils::testlib' => '6.76',
+ 'Fatal' => '2.21',
+ 'File::Copy' => '2.28',
+ 'File::Find' => '1.25',
+ 'File::Glob' => '1.21',
+ 'FileCache' => '1.09',
+ 'HTTP::Tiny' => '0.035',
+ 'Hash::Util::FieldHash' => '1.13',
+ 'I18N::LangTags' => '0.40',
+ 'IO' => '1.29',
+ 'IO::Socket' => '1.37',
+ 'IPC::Open3' => '1.16',
+ 'JSON::PP' => '2.27202_01',
+ 'List::Util' => '1.32',
+ 'List::Util::XS' => '1.32',
+ 'Locale::Codes' => '3.27',
+ 'Locale::Codes::Constants'=> '3.27',
+ 'Locale::Codes::Country'=> '3.27',
+ 'Locale::Codes::Country_Codes'=> '3.27',
+ 'Locale::Codes::Country_Retired'=> '3.27',
+ 'Locale::Codes::Currency'=> '3.27',
+ 'Locale::Codes::Currency_Codes'=> '3.27',
+ 'Locale::Codes::Currency_Retired'=> '3.27',
+ 'Locale::Codes::LangExt'=> '3.27',
+ 'Locale::Codes::LangExt_Codes'=> '3.27',
+ 'Locale::Codes::LangExt_Retired'=> '3.27',
+ 'Locale::Codes::LangFam'=> '3.27',
+ 'Locale::Codes::LangFam_Codes'=> '3.27',
+ 'Locale::Codes::LangFam_Retired'=> '3.27',
+ 'Locale::Codes::LangVar'=> '3.27',
+ 'Locale::Codes::LangVar_Codes'=> '3.27',
+ 'Locale::Codes::LangVar_Retired'=> '3.27',
+ 'Locale::Codes::Language'=> '3.27',
+ 'Locale::Codes::Language_Codes'=> '3.27',
+ 'Locale::Codes::Language_Retired'=> '3.27',
+ 'Locale::Codes::Script' => '3.27',
+ 'Locale::Codes::Script_Codes'=> '3.27',
+ 'Locale::Codes::Script_Retired'=> '3.27',
+ 'Locale::Country' => '3.27',
+ 'Locale::Currency' => '3.27',
+ 'Locale::Language' => '3.27',
+ 'Locale::Script' => '3.27',
+ 'Math::BigFloat' => '1.9991',
+ 'Math::BigInt' => '1.9993',
+ 'Math::BigInt::FastCalc'=> '0.31',
+ 'Module::CoreList' => '2.99',
+ 'Module::CoreList::TieHashDelta'=> '2.99',
+ 'Module::CoreList::Utils'=> '2.99',
+ 'Module::Load::Conditional'=> '0.58',
+ 'Module::Metadata' => '1.000018',
+ 'Opcode' => '1.26',
+ 'POSIX' => '1.35',
+ 'Parse::CPAN::Meta' => '1.4407',
+ 'Perl::OSType' => '1.005',
+ 'Pod::Html' => '1.21',
+ 'Scalar::Util' => '1.32',
+ 'Socket' => '2.012',
+ 'Storable' => '2.47',
+ 'Term::ReadLine' => '1.14',
+ 'Test::Builder' => '0.98_06',
+ 'Test::Builder::Module' => '0.98_06',
+ 'Test::More' => '0.98_06',
+ 'Test::Simple' => '0.98_06',
+ 'Time::Piece' => '1.23',
+ 'Time::Seconds' => '1.23',
+ 'Unicode::Collate' => '0.99',
+ 'Unicode::UCD' => '0.54',
+ 'XS::APItest' => '0.56',
+ 'XS::Typemap' => '0.11',
+ '_charnames' => '1.39',
+ 'autodie' => '2.21',
+ 'autodie::exception' => '2.21',
+ 'autodie::exception::system'=> '2.21',
+ 'autodie::hints' => '2.21',
+ 'autodie::skip' => '2.21',
+ 'charnames' => '1.39',
+ 'diagnostics' => '1.33',
+ 'mro' => '1.14',
+ 'parent' => '0.228',
+ 'perlfaq' => '5.0150044',
+ 're' => '0.26',
+ 'version' => '0.9904',
+ 'warnings' => '1.19',
+ },
+ removed => {
+ }
+ },
+ 5.019005 => {
+ delta_from => 5.019004,
+ changed => {
+ 'App::Prove' => '3.29',
+ 'App::Prove::State' => '3.29',
+ 'App::Prove::State::Result'=> '3.29',
+ 'App::Prove::State::Result::Test'=> '3.29',
+ 'CPAN::Meta' => '2.132830',
+ 'CPAN::Meta::Converter' => '2.132830',
+ 'CPAN::Meta::Feature' => '2.132830',
+ 'CPAN::Meta::History' => '2.132830',
+ 'CPAN::Meta::Prereqs' => '2.132830',
+ 'CPAN::Meta::Requirements'=> '2.125',
+ 'CPAN::Meta::Spec' => '2.132830',
+ 'CPAN::Meta::Validator' => '2.132830',
+ 'CPAN::Meta::YAML' => '0.010',
+ 'Config' => '5.019005',
+ 'Cwd' => '3.45',
+ 'ExtUtils::Command::MM' => '6.80',
+ 'ExtUtils::Install' => '1.61',
+ 'ExtUtils::Liblist' => '6.80',
+ 'ExtUtils::Liblist::Kid'=> '6.80',
+ 'ExtUtils::MM' => '6.80',
+ 'ExtUtils::MM_AIX' => '6.80',
+ 'ExtUtils::MM_Any' => '6.80',
+ 'ExtUtils::MM_BeOS' => '6.80',
+ 'ExtUtils::MM_Cygwin' => '6.80',
+ 'ExtUtils::MM_DOS' => '6.80',
+ 'ExtUtils::MM_Darwin' => '6.80',
+ 'ExtUtils::MM_MacOS' => '6.80',
+ 'ExtUtils::MM_NW5' => '6.80',
+ 'ExtUtils::MM_OS2' => '6.80',
+ 'ExtUtils::MM_QNX' => '6.80',
+ 'ExtUtils::MM_UWIN' => '6.80',
+ 'ExtUtils::MM_Unix' => '6.80',
+ 'ExtUtils::MM_VMS' => '6.80',
+ 'ExtUtils::MM_VOS' => '6.80',
+ 'ExtUtils::MM_Win32' => '6.80',
+ 'ExtUtils::MM_Win95' => '6.80',
+ 'ExtUtils::MY' => '6.80',
+ 'ExtUtils::MakeMaker' => '6.80',
+ 'ExtUtils::MakeMaker::Config'=> '6.80',
+ 'ExtUtils::Mkbootstrap' => '6.80',
+ 'ExtUtils::Mksymlists' => '6.80',
+ 'ExtUtils::testlib' => '6.80',
+ 'Fatal' => '2.22',
+ 'File::Fetch' => '0.44',
+ 'File::Glob' => '1.22',
+ 'File::Spec' => '3.45',
+ 'File::Spec::Cygwin' => '3.45',
+ 'File::Spec::Epoc' => '3.45',
+ 'File::Spec::Functions' => '3.45',
+ 'File::Spec::Mac' => '3.45',
+ 'File::Spec::OS2' => '3.45',
+ 'File::Spec::Unix' => '3.45',
+ 'File::Spec::VMS' => '3.45',
+ 'File::Spec::Win32' => '3.45',
+ 'File::Temp' => '0.2304',
+ 'Getopt::Long' => '2.42',
+ 'HTTP::Tiny' => '0.036',
+ 'IPC::Cmd' => '0.84_01',
+ 'JSON::PP' => '2.27203',
+ 'List::Util' => '1.35',
+ 'List::Util::XS' => '1.35',
+ 'Module::CoreList' => '3.00',
+ 'Module::CoreList::TieHashDelta'=> '3.00',
+ 'Module::CoreList::Utils'=> '3.00',
+ 'Module::Metadata' => '1.000019',
+ 'Parse::CPAN::Meta' => '1.4409',
+ 'Perl::OSType' => '1.006',
+ 'PerlIO::scalar' => '0.17',
+ 'Pod::Man' => '2.28',
+ 'Pod::Text' => '3.18',
+ 'Pod::Text::Termcap' => '2.08',
+ 'Scalar::Util' => '1.35',
+ 'TAP::Base' => '3.29',
+ 'TAP::Formatter::Base' => '3.29',
+ 'TAP::Formatter::Color' => '3.29',
+ 'TAP::Formatter::Console'=> '3.29',
+ 'TAP::Formatter::Console::ParallelSession'=> '3.29',
+ 'TAP::Formatter::Console::Session'=> '3.29',
+ 'TAP::Formatter::File' => '3.29',
+ 'TAP::Formatter::File::Session'=> '3.29',
+ 'TAP::Formatter::Session'=> '3.29',
+ 'TAP::Harness' => '3.29',
+ 'TAP::Harness::Env' => '3.29',
+ 'TAP::Object' => '3.29',
+ 'TAP::Parser' => '3.29',
+ 'TAP::Parser::Aggregator'=> '3.29',
+ 'TAP::Parser::Grammar' => '3.29',
+ 'TAP::Parser::Iterator' => '3.29',
+ 'TAP::Parser::Iterator::Array'=> '3.29',
+ 'TAP::Parser::Iterator::Process'=> '3.29',
+ 'TAP::Parser::Iterator::Stream'=> '3.29',
+ 'TAP::Parser::IteratorFactory'=> '3.29',
+ 'TAP::Parser::Multiplexer'=> '3.29',
+ 'TAP::Parser::Result' => '3.29',
+ 'TAP::Parser::Result::Bailout'=> '3.29',
+ 'TAP::Parser::Result::Comment'=> '3.29',
+ 'TAP::Parser::Result::Plan'=> '3.29',
+ 'TAP::Parser::Result::Pragma'=> '3.29',
+ 'TAP::Parser::Result::Test'=> '3.29',
+ 'TAP::Parser::Result::Unknown'=> '3.29',
+ 'TAP::Parser::Result::Version'=> '3.29',
+ 'TAP::Parser::Result::YAML'=> '3.29',
+ 'TAP::Parser::ResultFactory'=> '3.29',
+ 'TAP::Parser::Scheduler'=> '3.29',
+ 'TAP::Parser::Scheduler::Job'=> '3.29',
+ 'TAP::Parser::Scheduler::Spinner'=> '3.29',
+ 'TAP::Parser::Source' => '3.29',
+ 'TAP::Parser::SourceHandler'=> '3.29',
+ 'TAP::Parser::SourceHandler::Executable'=> '3.29',
+ 'TAP::Parser::SourceHandler::File'=> '3.29',
+ 'TAP::Parser::SourceHandler::Handle'=> '3.29',
+ 'TAP::Parser::SourceHandler::Perl'=> '3.29',
+ 'TAP::Parser::SourceHandler::RawTAP'=> '3.29',
+ 'TAP::Parser::YAMLish::Reader'=> '3.29',
+ 'TAP::Parser::YAMLish::Writer'=> '3.29',
+ 'Test::Builder' => '0.99',
+ 'Test::Builder::Module' => '0.99',
+ 'Test::Builder::Tester' => '1.23_002',
+ 'Test::Builder::Tester::Color'=> '1.23_002',
+ 'Test::Harness' => '3.29',
+ 'Test::More' => '0.99',
+ 'Test::Simple' => '0.99',
+ 'Unicode' => '6.3.0',
+ 'Unicode::Normalize' => '1.17',
+ 'Unicode::UCD' => '0.55',
+ 'attributes' => '0.22',
+ 'autodie' => '2.22',
+ 'autodie::exception' => '2.22',
+ 'autodie::exception::system'=> '2.22',
+ 'autodie::hints' => '2.22',
+ 'autodie::skip' => '2.22',
+ 'feature' => '1.34',
+ 'threads' => '1.89',
+ 'warnings' => '1.20',
+ },
+ removed => {
+ 'TAP::Parser::Utils' => 1,
+ }
+ },
+ 5.019006 => {
+ delta_from => 5.019005,
+ changed => {
+ 'App::Prove' => '3.30',
+ 'App::Prove::State' => '3.30',
+ 'App::Prove::State::Result'=> '3.30',
+ 'App::Prove::State::Result::Test'=> '3.30',
+ 'Archive::Tar' => '1.96',
+ 'Archive::Tar::Constant'=> '1.96',
+ 'Archive::Tar::File' => '1.96',
+ 'AutoLoader' => '5.74',
+ 'B' => '1.47',
+ 'B::Concise' => '0.991',
+ 'B::Debug' => '1.19',
+ 'B::Deparse' => '1.24',
+ 'Benchmark' => '1.18',
+ 'Compress::Raw::Bzip2' => '2.063',
+ 'Compress::Raw::Zlib' => '2.063',
+ 'Compress::Zlib' => '2.063',
+ 'Config' => '5.019006',
+ 'DB_File' => '1.831',
+ 'Devel::Peek' => '1.15',
+ 'DynaLoader' => '1.21',
+ 'Errno' => '1.20_01',
+ 'ExtUtils::Command::MM' => '6.82',
+ 'ExtUtils::Liblist' => '6.82',
+ 'ExtUtils::Liblist::Kid'=> '6.82',
+ 'ExtUtils::MM' => '6.82',
+ 'ExtUtils::MM_AIX' => '6.82',
+ 'ExtUtils::MM_Any' => '6.82',
+ 'ExtUtils::MM_BeOS' => '6.82',
+ 'ExtUtils::MM_Cygwin' => '6.82',
+ 'ExtUtils::MM_DOS' => '6.82',
+ 'ExtUtils::MM_Darwin' => '6.82',
+ 'ExtUtils::MM_MacOS' => '6.82',
+ 'ExtUtils::MM_NW5' => '6.82',
+ 'ExtUtils::MM_OS2' => '6.82',
+ 'ExtUtils::MM_QNX' => '6.82',
+ 'ExtUtils::MM_UWIN' => '6.82',
+ 'ExtUtils::MM_Unix' => '6.82',
+ 'ExtUtils::MM_VMS' => '6.82',
+ 'ExtUtils::MM_VOS' => '6.82',
+ 'ExtUtils::MM_Win32' => '6.82',
+ 'ExtUtils::MM_Win95' => '6.82',
+ 'ExtUtils::MY' => '6.82',
+ 'ExtUtils::MakeMaker' => '6.82',
+ 'ExtUtils::MakeMaker::Config'=> '6.82',
+ 'ExtUtils::Mkbootstrap' => '6.82',
+ 'ExtUtils::Mksymlists' => '6.82',
+ 'ExtUtils::testlib' => '6.82',
+ 'File::DosGlob' => '1.12',
+ 'File::Find' => '1.26',
+ 'File::Glob' => '1.23',
+ 'HTTP::Tiny' => '0.038',
+ 'IO' => '1.30',
+ 'IO::Compress::Adapter::Bzip2'=> '2.063',
+ 'IO::Compress::Adapter::Deflate'=> '2.063',
+ 'IO::Compress::Adapter::Identity'=> '2.063',
+ 'IO::Compress::Base' => '2.063',
+ 'IO::Compress::Base::Common'=> '2.063',
+ 'IO::Compress::Bzip2' => '2.063',
+ 'IO::Compress::Deflate' => '2.063',
+ 'IO::Compress::Gzip' => '2.063',
+ 'IO::Compress::Gzip::Constants'=> '2.063',
+ 'IO::Compress::RawDeflate'=> '2.063',
+ 'IO::Compress::Zip' => '2.063',
+ 'IO::Compress::Zip::Constants'=> '2.063',
+ 'IO::Compress::Zlib::Constants'=> '2.063',
+ 'IO::Compress::Zlib::Extra'=> '2.063',
+ 'IO::Select' => '1.22',
+ 'IO::Uncompress::Adapter::Bunzip2'=> '2.063',
+ 'IO::Uncompress::Adapter::Identity'=> '2.063',
+ 'IO::Uncompress::Adapter::Inflate'=> '2.063',
+ 'IO::Uncompress::AnyInflate'=> '2.063',
+ 'IO::Uncompress::AnyUncompress'=> '2.063',
+ 'IO::Uncompress::Base' => '2.063',
+ 'IO::Uncompress::Bunzip2'=> '2.063',
+ 'IO::Uncompress::Gunzip'=> '2.063',
+ 'IO::Uncompress::Inflate'=> '2.063',
+ 'IO::Uncompress::RawInflate'=> '2.063',
+ 'IO::Uncompress::Unzip' => '2.063',
+ 'IPC::Cmd' => '0.90',
+ 'Locale::Maketext' => '1.25',
+ 'Module::Build' => '0.4202',
+ 'Module::Build::Base' => '0.4202',
+ 'Module::Build::Compat' => '0.4202',
+ 'Module::Build::Config' => '0.4202',
+ 'Module::Build::Cookbook'=> '0.4202',
+ 'Module::Build::Dumper' => '0.4202',
+ 'Module::Build::ModuleInfo'=> '0.4202',
+ 'Module::Build::Notes' => '0.4202',
+ 'Module::Build::PPMMaker'=> '0.4202',
+ 'Module::Build::Platform::Default'=> '0.4202',
+ 'Module::Build::Platform::MacOS'=> '0.4202',
+ 'Module::Build::Platform::Unix'=> '0.4202',
+ 'Module::Build::Platform::VMS'=> '0.4202',
+ 'Module::Build::Platform::VOS'=> '0.4202',
+ 'Module::Build::Platform::Windows'=> '0.4202',
+ 'Module::Build::Platform::aix'=> '0.4202',
+ 'Module::Build::Platform::cygwin'=> '0.4202',
+ 'Module::Build::Platform::darwin'=> '0.4202',
+ 'Module::Build::Platform::os2'=> '0.4202',
+ 'Module::Build::PodParser'=> '0.4202',
+ 'Module::CoreList' => '3.01',
+ 'Module::CoreList::TieHashDelta'=> '3.01',
+ 'Module::CoreList::Utils'=> '3.01',
+ 'Opcode' => '1.27',
+ 'POSIX' => '1.36',
+ 'Package::Constants' => '0.04',
+ 'PerlIO::scalar' => '0.18',
+ 'PerlIO::via' => '0.13',
+ 'SDBM_File' => '1.10',
+ 'Socket' => '2.013',
+ 'TAP::Base' => '3.30',
+ 'TAP::Formatter::Base' => '3.30',
+ 'TAP::Formatter::Color' => '3.30',
+ 'TAP::Formatter::Console'=> '3.30',
+ 'TAP::Formatter::Console::ParallelSession'=> '3.30',
+ 'TAP::Formatter::Console::Session'=> '3.30',
+ 'TAP::Formatter::File' => '3.30',
+ 'TAP::Formatter::File::Session'=> '3.30',
+ 'TAP::Formatter::Session'=> '3.30',
+ 'TAP::Harness' => '3.30',
+ 'TAP::Harness::Env' => '3.30',
+ 'TAP::Object' => '3.30',
+ 'TAP::Parser' => '3.30',
+ 'TAP::Parser::Aggregator'=> '3.30',
+ 'TAP::Parser::Grammar' => '3.30',
+ 'TAP::Parser::Iterator' => '3.30',
+ 'TAP::Parser::Iterator::Array'=> '3.30',
+ 'TAP::Parser::Iterator::Process'=> '3.30',
+ 'TAP::Parser::Iterator::Stream'=> '3.30',
+ 'TAP::Parser::IteratorFactory'=> '3.30',
+ 'TAP::Parser::Multiplexer'=> '3.30',
+ 'TAP::Parser::Result' => '3.30',
+ 'TAP::Parser::Result::Bailout'=> '3.30',
+ 'TAP::Parser::Result::Comment'=> '3.30',
+ 'TAP::Parser::Result::Plan'=> '3.30',
+ 'TAP::Parser::Result::Pragma'=> '3.30',
+ 'TAP::Parser::Result::Test'=> '3.30',
+ 'TAP::Parser::Result::Unknown'=> '3.30',
+ 'TAP::Parser::Result::Version'=> '3.30',
+ 'TAP::Parser::Result::YAML'=> '3.30',
+ 'TAP::Parser::ResultFactory'=> '3.30',
+ 'TAP::Parser::Scheduler'=> '3.30',
+ 'TAP::Parser::Scheduler::Job'=> '3.30',
+ 'TAP::Parser::Scheduler::Spinner'=> '3.30',
+ 'TAP::Parser::Source' => '3.30',
+ 'TAP::Parser::SourceHandler'=> '3.30',
+ 'TAP::Parser::SourceHandler::Executable'=> '3.30',
+ 'TAP::Parser::SourceHandler::File'=> '3.30',
+ 'TAP::Parser::SourceHandler::Handle'=> '3.30',
+ 'TAP::Parser::SourceHandler::Perl'=> '3.30',
+ 'TAP::Parser::SourceHandler::RawTAP'=> '3.30',
+ 'TAP::Parser::YAMLish::Reader'=> '3.30',
+ 'TAP::Parser::YAMLish::Writer'=> '3.30',
+ 'Term::Cap' => '1.15',
+ 'Test::Builder' => '1.001002',
+ 'Test::Builder::Module' => '1.001002',
+ 'Test::Harness' => '3.30',
+ 'Test::More' => '1.001002',
+ 'Test::Simple' => '1.001002',
+ 'Tie::StdHandle' => '4.4',
+ 'Unicode::Collate' => '1.02',
+ 'Unicode::Collate::CJK::Korean'=> '1.02',
+ 'Unicode::Collate::Locale'=> '1.02',
+ 'XS::APItest' => '0.57',
+ 'XS::Typemap' => '0.12',
+ 'arybase' => '0.07',
+ 'bignum' => '0.37',
+ 'constant' => '1.29',
+ 'fields' => '2.17',
+ 'inc::latest' => '0.4202',
+ 'threads' => '1.90',
+ 'threads::shared' => '1.45',
+ },
+ removed => {
+ }
+ },
+ 5.019007 => {
+ delta_from => 5.019006,
+ changed => {
+ 'CGI' => '3.64',
+ 'CGI::Apache' => '1.02',
+ 'CGI::Carp' => '3.64',
+ 'CGI::Cookie' => '1.31',
+ 'CGI::Fast' => '1.10',
+ 'CGI::Pretty' => '3.64',
+ 'CGI::Push' => '1.06',
+ 'CGI::Switch' => '1.02',
+ 'CGI::Util' => '3.64',
+ 'CPAN::Meta' => '2.133380',
+ 'CPAN::Meta::Converter' => '2.133380',
+ 'CPAN::Meta::Feature' => '2.133380',
+ 'CPAN::Meta::History' => '2.133380',
+ 'CPAN::Meta::Prereqs' => '2.133380',
+ 'CPAN::Meta::Spec' => '2.133380',
+ 'CPAN::Meta::Validator' => '2.133380',
+ 'Config' => '5.019007',
+ 'Data::Dumper' => '2.150',
+ 'DynaLoader' => '1.22',
+ 'ExtUtils::Command::MM' => '6.84',
+ 'ExtUtils::Liblist' => '6.84',
+ 'ExtUtils::Liblist::Kid'=> '6.84',
+ 'ExtUtils::MM' => '6.84',
+ 'ExtUtils::MM_AIX' => '6.84',
+ 'ExtUtils::MM_Any' => '6.84',
+ 'ExtUtils::MM_BeOS' => '6.84',
+ 'ExtUtils::MM_Cygwin' => '6.84',
+ 'ExtUtils::MM_DOS' => '6.84',
+ 'ExtUtils::MM_Darwin' => '6.84',
+ 'ExtUtils::MM_MacOS' => '6.84',
+ 'ExtUtils::MM_NW5' => '6.84',
+ 'ExtUtils::MM_OS2' => '6.84',
+ 'ExtUtils::MM_QNX' => '6.84',
+ 'ExtUtils::MM_UWIN' => '6.84',
+ 'ExtUtils::MM_Unix' => '6.84',
+ 'ExtUtils::MM_VMS' => '6.84',
+ 'ExtUtils::MM_VOS' => '6.84',
+ 'ExtUtils::MM_Win32' => '6.84',
+ 'ExtUtils::MM_Win95' => '6.84',
+ 'ExtUtils::MY' => '6.84',
+ 'ExtUtils::MakeMaker' => '6.84',
+ 'ExtUtils::MakeMaker::Config'=> '6.84',
+ 'ExtUtils::Mkbootstrap' => '6.84',
+ 'ExtUtils::Mksymlists' => '6.84',
+ 'ExtUtils::testlib' => '6.84',
+ 'File::Fetch' => '0.46',
+ 'HTTP::Tiny' => '0.039',
+ 'Locale::Codes' => '3.28',
+ 'Locale::Codes::Constants'=> '3.28',
+ 'Locale::Codes::Country'=> '3.28',
+ 'Locale::Codes::Country_Codes'=> '3.28',
+ 'Locale::Codes::Country_Retired'=> '3.28',
+ 'Locale::Codes::Currency'=> '3.28',
+ 'Locale::Codes::Currency_Codes'=> '3.28',
+ 'Locale::Codes::Currency_Retired'=> '3.28',
+ 'Locale::Codes::LangExt'=> '3.28',
+ 'Locale::Codes::LangExt_Codes'=> '3.28',
+ 'Locale::Codes::LangExt_Retired'=> '3.28',
+ 'Locale::Codes::LangFam'=> '3.28',
+ 'Locale::Codes::LangFam_Codes'=> '3.28',
+ 'Locale::Codes::LangFam_Retired'=> '3.28',
+ 'Locale::Codes::LangVar'=> '3.28',
+ 'Locale::Codes::LangVar_Codes'=> '3.28',
+ 'Locale::Codes::LangVar_Retired'=> '3.28',
+ 'Locale::Codes::Language'=> '3.28',
+ 'Locale::Codes::Language_Codes'=> '3.28',
+ 'Locale::Codes::Language_Retired'=> '3.28',
+ 'Locale::Codes::Script' => '3.28',
+ 'Locale::Codes::Script_Codes'=> '3.28',
+ 'Locale::Codes::Script_Retired'=> '3.28',
+ 'Locale::Country' => '3.28',
+ 'Locale::Currency' => '3.28',
+ 'Locale::Language' => '3.28',
+ 'Locale::Script' => '3.28',
+ 'Module::Build' => '0.4203',
+ 'Module::Build::Base' => '0.4203',
+ 'Module::Build::Compat' => '0.4203',
+ 'Module::Build::Config' => '0.4203',
+ 'Module::Build::Cookbook'=> '0.4203',
+ 'Module::Build::Dumper' => '0.4203',
+ 'Module::Build::ModuleInfo'=> '0.4203',
+ 'Module::Build::Notes' => '0.4203',
+ 'Module::Build::PPMMaker'=> '0.4203',
+ 'Module::Build::Platform::Default'=> '0.4203',
+ 'Module::Build::Platform::MacOS'=> '0.4203',
+ 'Module::Build::Platform::Unix'=> '0.4203',
+ 'Module::Build::Platform::VMS'=> '0.4203',
+ 'Module::Build::Platform::VOS'=> '0.4203',
+ 'Module::Build::Platform::Windows'=> '0.4203',
+ 'Module::Build::Platform::aix'=> '0.4203',
+ 'Module::Build::Platform::cygwin'=> '0.4203',
+ 'Module::Build::Platform::darwin'=> '0.4203',
+ 'Module::Build::Platform::os2'=> '0.4203',
+ 'Module::Build::PodParser'=> '0.4203',
+ 'Module::CoreList' => '3.02',
+ 'Module::CoreList::TieHashDelta'=> '3.02',
+ 'Module::CoreList::Utils'=> '3.02',
+ 'POSIX' => '1.37',
+ 'PathTools::Cwd' => '3.45',
+ 'PerlIO::encoding' => '0.17',
+ 'PerlIO::via' => '0.14',
+ 'SDBM_File' => '1.11',
+ 'Storable' => '2.48',
+ 'Time::Piece' => '1.24',
+ 'Time::Seconds' => '1.24',
+ 'Unicode::Collate' => '1.04',
+ 'Win32' => '0.48',
+ 'XS::APItest' => '0.58',
+ 'base' => '2.20',
+ 'constant' => '1.30',
+ 'inc::latest' => '0.4203',
+ 'threads' => '1.91',
+ },
+ removed => {
+ }
+ },
);
+sub is_core
+{
+ my $module = shift;
+ $module = shift if eval { $module->isa(__PACKAGE__) } && @_ > 0 && defined($_[0]) && $_[0] =~ /^\w/;
+ my ($module_version, $perl_version);
+
+ $module_version = shift if @_ > 0;
+ $perl_version = @_ > 0 ? shift : $^V;
+
+ my $first_release = first_release($module);
+
+ return 0 if !defined($first_release) || $first_release > $perl_version;
+
+ my $final_release = removed_from($module);
+
+ return 0 if defined($final_release) && $perl_version > $final_release;
+
+ # If a minimum version of the module was specified:
+ # Step through all perl releases ($prn)
+ # so we can find what version of the module
+ # was included in the specified version of perl.
+ # On the way if we pass the required module version, we can
+ # short-circuit and return true
+ if (defined($module_version)) {
+ # The Perl releases aren't a linear sequence, but a tree. We need to build the path
+ # of releases from 5 to the specified release, and follow the module's version(s)
+ # along that path.
+ my @releases = ($perl_version);
+ my $rel = $perl_version;
+ while (defined($rel)) {
+ $rel = $delta{$rel}->{delta_from};
+ unshift(@releases, $rel) if defined($rel);
+ }
+ RELEASE:
+ foreach my $prn (@releases) {
+ next RELEASE if $prn <= $first_release;
+ last RELEASE if $prn > $perl_version;
+ next unless defined(my $next_module_version
+ = $delta{$prn}->{changed}->{$module});
+ return 1 if $next_module_version >= $module_version;
+ }
+ return 0;
+ }
+
+ return 1 if !defined($final_release);
+
+ return $perl_version <= $final_release;
+}
+
for my $version (sort { $a <=> $b } keys %delta) {
my $data = $delta{$version};
@@ -8625,9 +9471,25 @@
5.017012 => { delta_from => 5.017011 },
5.018 => { delta_from => 5.017012 },
+ 5.018001 => {
+ delta_from => 5.018,
+ changed => {
+ },
+ removed => {
+ }
+ },
+ 5.018002 => {
+ delta_from => 5.018001,
+ changed => {
+ },
+ removed => {
+ }
+ },
+
5.019 => {
delta_from => 5.018,
+ changed => { 'Module::Build' => 1 },
removed => { map { $_ => 1 } qw/
Archive::Extract
B::Lint
@@ -8703,13 +9565,58 @@
removed => {
}
},
- 5.018001 => {
- delta_from => 5.018,
+ 5.019003 => {
+ delta_from => 5.019002,
changed => {
},
removed => {
}
},
+ 5.019004 => {
+ delta_from => 5.019003,
+ changed => {
+ 'Module::Build::Base' => '1',
+ 'Module::Build::Compat' => '1',
+ 'Module::Build::Config' => '1',
+ 'Module::Build::ConfigData'=> '1',
+ 'Module::Build::Cookbook'=> '1',
+ 'Module::Build::Dumper' => '1',
+ 'Module::Build::ModuleInfo'=> '1',
+ 'Module::Build::Notes' => '1',
+ 'Module::Build::PPMMaker'=> '1',
+ 'Module::Build::Platform::Default'=> '1',
+ 'Module::Build::Platform::MacOS'=> '1',
+ 'Module::Build::Platform::Unix'=> '1',
+ 'Module::Build::Platform::VMS'=> '1',
+ 'Module::Build::Platform::VOS'=> '1',
+ 'Module::Build::Platform::Windows'=> '1',
+ 'Module::Build::Platform::aix'=> '1',
+ 'Module::Build::Platform::cygwin'=> '1',
+ 'Module::Build::Platform::darwin'=> '1',
+ 'Module::Build::Platform::os2'=> '1',
+ 'Module::Build::PodParser'=> '1',
+ 'Module::Build::Version'=> '1',
+ 'Module::Build::YAML' => '1',
+ 'inc::latest' => '1',
+ },
+ removed => {
+ }
+ },
+ 5.019005 => {
+ delta_from => 5.019004,
+ changed => {
+ },
+ removed => {
+ }
+ },
+ 5.019006 => {
+ delta_from => 5.019005,
+ changed => {
+ 'Package::Constants' => '1',
+ },
+ removed => {
+ }
+ },
);
for my $version (sort { $a <=> $b } keys %deprecated) {
@@ -8726,18 +9633,12 @@
'App::Prove::State' => 'cpan',
'App::Prove::State::Result'=> 'cpan',
'App::Prove::State::Result::Test'=> 'cpan',
- 'Archive::Extract' => 'cpan',
'Archive::Tar' => 'cpan',
'Archive::Tar::Constant'=> 'cpan',
'Archive::Tar::File' => 'cpan',
- 'Attribute::Handlers' => 'blead',
'AutoLoader' => 'cpan',
'AutoSplit' => 'cpan',
- 'B::Concise' => 'blead',
'B::Debug' => 'cpan',
- 'B::Deparse' => 'blead',
- 'B::Lint' => 'cpan',
- 'B::Lint::Debug' => 'cpan',
'CGI' => 'cpan',
'CGI::Apache' => 'cpan',
'CGI::Carp' => 'cpan',
@@ -8789,56 +9690,11 @@
'CPAN::Tarzip' => 'cpan',
'CPAN::URL' => 'cpan',
'CPAN::Version' => 'cpan',
- 'CPANPLUS' => 'cpan',
- 'CPANPLUS::Backend' => 'cpan',
- 'CPANPLUS::Backend::RV' => 'cpan',
- 'CPANPLUS::Config' => 'cpan',
- 'CPANPLUS::Config::HomeEnv'=> 'cpan',
- 'CPANPLUS::Configure' => 'cpan',
- 'CPANPLUS::Configure::Setup'=> 'cpan',
- 'CPANPLUS::Dist' => 'cpan',
- 'CPANPLUS::Dist::Autobundle'=> 'cpan',
- 'CPANPLUS::Dist::Base' => 'cpan',
- 'CPANPLUS::Dist::Build' => 'cpan',
- 'CPANPLUS::Dist::Build::Constants'=> 'cpan',
- 'CPANPLUS::Dist::MM' => 'cpan',
- 'CPANPLUS::Dist::Sample'=> 'cpan',
- 'CPANPLUS::Error' => 'cpan',
- 'CPANPLUS::Internals' => 'cpan',
- 'CPANPLUS::Internals::Constants'=> 'cpan',
- 'CPANPLUS::Internals::Constants::Report'=> 'cpan',
- 'CPANPLUS::Internals::Extract'=> 'cpan',
- 'CPANPLUS::Internals::Fetch'=> 'cpan',
- 'CPANPLUS::Internals::Report'=> 'cpan',
- 'CPANPLUS::Internals::Search'=> 'cpan',
- 'CPANPLUS::Internals::Source'=> 'cpan',
- 'CPANPLUS::Internals::Source::Memory'=> 'cpan',
- 'CPANPLUS::Internals::Source::SQLite'=> 'cpan',
- 'CPANPLUS::Internals::Source::SQLite::Tie'=> 'cpan',
- 'CPANPLUS::Internals::Utils'=> 'cpan',
- 'CPANPLUS::Internals::Utils::Autoflush'=> 'cpan',
- 'CPANPLUS::Module' => 'cpan',
- 'CPANPLUS::Module::Author'=> 'cpan',
- 'CPANPLUS::Module::Author::Fake'=> 'cpan',
- 'CPANPLUS::Module::Checksums'=> 'cpan',
- 'CPANPLUS::Module::Fake'=> 'cpan',
- 'CPANPLUS::Module::Signature'=> 'cpan',
- 'CPANPLUS::Selfupdate' => 'cpan',
- 'CPANPLUS::Shell' => 'cpan',
- 'CPANPLUS::Shell::Classic'=> 'cpan',
- 'CPANPLUS::Shell::Default'=> 'cpan',
- 'CPANPLUS::Shell::Default::Plugins::CustomSource'=> 'cpan',
- 'CPANPLUS::Shell::Default::Plugins::Remote'=> 'cpan',
- 'CPANPLUS::Shell::Default::Plugins::Source'=> 'cpan',
- 'Carp' => 'blead',
- 'Carp::Heavy' => 'blead',
'Compress::Raw::Bzip2' => 'cpan',
'Compress::Raw::Zlib' => 'cpan',
'Compress::Zlib' => 'cpan',
'Config::Perl::V' => 'cpan',
- 'Cwd' => 'blead',
'DB_File' => 'cpan',
- 'Devel::InnerPackage' => 'cpan',
'Devel::PPPort' => 'cpan',
'Digest' => 'cpan',
'Digest::MD5' => 'cpan',
@@ -8869,79 +9725,42 @@
'Encode::TW' => 'cpan',
'Encode::Unicode' => 'cpan',
'Encode::Unicode::UTF7' => 'cpan',
- 'Exporter' => 'blead',
- 'Exporter::Heavy' => 'blead',
- 'ExtUtils::CBuilder' => 'blead',
- 'ExtUtils::CBuilder::Base'=> 'blead',
- 'ExtUtils::CBuilder::Platform::Unix'=> 'blead',
- 'ExtUtils::CBuilder::Platform::VMS'=> 'blead',
- 'ExtUtils::CBuilder::Platform::Windows'=> 'blead',
- 'ExtUtils::CBuilder::Platform::Windows::BCC'=> 'blead',
- 'ExtUtils::CBuilder::Platform::Windows::GCC'=> 'blead',
- 'ExtUtils::CBuilder::Platform::Windows::MSVC'=> 'blead',
- 'ExtUtils::CBuilder::Platform::aix'=> 'blead',
- 'ExtUtils::CBuilder::Platform::cygwin'=> 'blead',
- 'ExtUtils::CBuilder::Platform::darwin'=> 'blead',
- 'ExtUtils::CBuilder::Platform::dec_osf'=> 'blead',
- 'ExtUtils::CBuilder::Platform::os2'=> 'blead',
- 'ExtUtils::Command::MM' => 'first-come',
- 'ExtUtils::Constant' => undef,
- 'ExtUtils::Constant::Base'=> undef,
- 'ExtUtils::Constant::ProxySubs'=> undef,
- 'ExtUtils::Constant::Utils'=> undef,
- 'ExtUtils::Constant::XS'=> undef,
- 'ExtUtils::Install' => 'blead',
- 'ExtUtils::Installed' => 'blead',
- 'ExtUtils::Liblist' => 'first-come',
- 'ExtUtils::Liblist::Kid'=> 'first-come',
- 'ExtUtils::MM' => 'first-come',
- 'ExtUtils::MM_AIX' => 'first-come',
- 'ExtUtils::MM_Any' => 'first-come',
- 'ExtUtils::MM_BeOS' => 'first-come',
- 'ExtUtils::MM_Cygwin' => 'first-come',
- 'ExtUtils::MM_DOS' => 'first-come',
- 'ExtUtils::MM_Darwin' => 'first-come',
- 'ExtUtils::MM_MacOS' => 'first-come',
- 'ExtUtils::MM_NW5' => 'first-come',
- 'ExtUtils::MM_OS2' => 'first-come',
- 'ExtUtils::MM_QNX' => 'first-come',
- 'ExtUtils::MM_UWIN' => 'first-come',
- 'ExtUtils::MM_Unix' => 'first-come',
- 'ExtUtils::MM_VMS' => 'first-come',
- 'ExtUtils::MM_VOS' => 'first-come',
- 'ExtUtils::MM_Win32' => 'first-come',
- 'ExtUtils::MM_Win95' => 'first-come',
- 'ExtUtils::MY' => 'first-come',
- 'ExtUtils::MakeMaker' => 'first-come',
- 'ExtUtils::MakeMaker::Config'=> 'first-come',
- 'ExtUtils::Mkbootstrap' => 'first-come',
- 'ExtUtils::Mksymlists' => 'first-come',
- 'ExtUtils::Packlist' => 'blead',
- 'ExtUtils::ParseXS' => 'blead',
- 'ExtUtils::ParseXS::Constants'=> 'blead',
- 'ExtUtils::ParseXS::CountLines'=> 'blead',
- 'ExtUtils::ParseXS::Utilities'=> 'blead',
- 'ExtUtils::Typemaps' => 'blead',
- 'ExtUtils::Typemaps::Cmd'=> 'blead',
- 'ExtUtils::Typemaps::InputMap'=> 'blead',
- 'ExtUtils::Typemaps::OutputMap'=> 'blead',
- 'ExtUtils::Typemaps::Type'=> 'blead',
- 'ExtUtils::testlib' => 'first-come',
+ 'ExtUtils::Command::MM' => 'cpan',
+ 'ExtUtils::Constant' => 'cpan',
+ 'ExtUtils::Constant::Base'=> 'cpan',
+ 'ExtUtils::Constant::ProxySubs'=> 'cpan',
+ 'ExtUtils::Constant::Utils'=> 'cpan',
+ 'ExtUtils::Constant::XS'=> 'cpan',
+ 'ExtUtils::Liblist' => 'cpan',
+ 'ExtUtils::Liblist::Kid'=> 'cpan',
+ 'ExtUtils::MM' => 'cpan',
+ 'ExtUtils::MM_AIX' => 'cpan',
+ 'ExtUtils::MM_Any' => 'cpan',
+ 'ExtUtils::MM_BeOS' => 'cpan',
+ 'ExtUtils::MM_Cygwin' => 'cpan',
+ 'ExtUtils::MM_DOS' => 'cpan',
+ 'ExtUtils::MM_Darwin' => 'cpan',
+ 'ExtUtils::MM_MacOS' => 'cpan',
+ 'ExtUtils::MM_NW5' => 'cpan',
+ 'ExtUtils::MM_OS2' => 'cpan',
+ 'ExtUtils::MM_QNX' => 'cpan',
+ 'ExtUtils::MM_UWIN' => 'cpan',
+ 'ExtUtils::MM_Unix' => 'cpan',
+ 'ExtUtils::MM_VMS' => 'cpan',
+ 'ExtUtils::MM_VOS' => 'cpan',
+ 'ExtUtils::MM_Win32' => 'cpan',
+ 'ExtUtils::MM_Win95' => 'cpan',
+ 'ExtUtils::MY' => 'cpan',
+ 'ExtUtils::MakeMaker' => 'cpan',
+ 'ExtUtils::MakeMaker::Config'=> 'cpan',
+ 'ExtUtils::Mkbootstrap' => 'cpan',
+ 'ExtUtils::Mksymlists' => 'cpan',
+ 'ExtUtils::testlib' => 'cpan',
'Fatal' => 'cpan',
'File::Fetch' => 'cpan',
'File::GlobMapper' => 'cpan',
- 'File::Path' => undef,
- 'File::Spec' => 'blead',
- 'File::Spec::Cygwin' => 'blead',
- 'File::Spec::Epoc' => 'blead',
- 'File::Spec::Functions' => 'blead',
- 'File::Spec::Mac' => 'blead',
- 'File::Spec::OS2' => 'blead',
- 'File::Spec::Unix' => 'blead',
- 'File::Spec::VMS' => 'blead',
- 'File::Spec::Win32' => 'blead',
+ 'File::Path' => 'cpan',
'File::Temp' => 'cpan',
- 'Filter::Simple' => 'blead',
'Filter::Util::Call' => 'cpan',
'Getopt::Long' => 'cpan',
'HTTP::Tiny' => 'cpan',
@@ -8970,7 +9789,7 @@
'IO::Uncompress::Inflate'=> 'cpan',
'IO::Uncompress::RawInflate'=> 'cpan',
'IO::Uncompress::Unzip' => 'cpan',
- 'IO::Zlib' => undef,
+ 'IO::Zlib' => 'cpan',
'IPC::Cmd' => 'cpan',
'IPC::Msg' => 'cpan',
'IPC::Semaphore' => 'cpan',
@@ -9006,26 +9825,10 @@
'Locale::Country' => 'cpan',
'Locale::Currency' => 'cpan',
'Locale::Language' => 'cpan',
- 'Locale::Maketext' => 'blead',
- 'Locale::Maketext::Guts'=> 'blead',
- 'Locale::Maketext::GutsLoader'=> 'blead',
'Locale::Maketext::Simple'=> 'cpan',
'Locale::Script' => 'cpan',
- 'Log::Message' => 'cpan',
- 'Log::Message::Config' => 'cpan',
- 'Log::Message::Handlers'=> 'cpan',
- 'Log::Message::Item' => 'cpan',
- 'Log::Message::Simple' => 'cpan',
'MIME::Base64' => 'cpan',
'MIME::QuotedPrint' => 'cpan',
- 'Math::BigFloat' => 'blead',
- 'Math::BigFloat::Trace' => 'blead',
- 'Math::BigInt' => 'blead',
- 'Math::BigInt::Calc' => 'blead',
- 'Math::BigInt::CalcEmu' => 'blead',
- 'Math::BigInt::FastCalc'=> 'blead',
- 'Math::BigInt::Trace' => 'blead',
- 'Math::BigRat' => 'blead',
'Math::Complex' => 'cpan',
'Math::Trig' => 'cpan',
'Memoize' => 'cpan',
@@ -9046,12 +9849,8 @@
'Module::Build::ModuleInfo'=> 'cpan',
'Module::Build::Notes' => 'cpan',
'Module::Build::PPMMaker'=> 'cpan',
- 'Module::Build::Platform::Amiga'=> 'cpan',
'Module::Build::Platform::Default'=> 'cpan',
- 'Module::Build::Platform::EBCDIC'=> 'cpan',
- 'Module::Build::Platform::MPEiX'=> 'cpan',
'Module::Build::Platform::MacOS'=> 'cpan',
- 'Module::Build::Platform::RiscOS'=> 'cpan',
'Module::Build::Platform::Unix'=> 'cpan',
'Module::Build::Platform::VMS'=> 'cpan',
'Module::Build::Platform::VOS'=> 'cpan',
@@ -9063,42 +9862,34 @@
'Module::Build::PodParser'=> 'cpan',
'Module::Build::Version'=> 'cpan',
'Module::Build::YAML' => 'cpan',
- 'Module::CoreList' => 'blead',
- 'Module::CoreList::TieHashDelta'=> 'blead',
- 'Module::CoreList::Utils'=> 'blead',
'Module::Load' => 'cpan',
'Module::Load::Conditional'=> 'cpan',
'Module::Loaded' => 'cpan',
'Module::Metadata' => 'cpan',
- 'Module::Pluggable' => 'cpan',
- 'Module::Pluggable::Object'=> 'cpan',
'NEXT' => 'cpan',
- 'Net::Cmd' => undef,
- 'Net::Config' => undef,
- 'Net::Domain' => undef,
- 'Net::FTP' => undef,
- 'Net::FTP::A' => undef,
- 'Net::FTP::E' => undef,
- 'Net::FTP::I' => undef,
- 'Net::FTP::L' => undef,
- 'Net::FTP::dataconn' => undef,
- 'Net::NNTP' => undef,
- 'Net::Netrc' => undef,
- 'Net::POP3' => undef,
- 'Net::Ping' => 'blead',
- 'Net::SMTP' => undef,
- 'Net::Time' => undef,
- 'Object::Accessor' => 'cpan',
+ 'Net::Cmd' => 'cpan',
+ 'Net::Config' => 'cpan',
+ 'Net::Domain' => 'cpan',
+ 'Net::FTP' => 'cpan',
+ 'Net::FTP::A' => 'cpan',
+ 'Net::FTP::E' => 'cpan',
+ 'Net::FTP::I' => 'cpan',
+ 'Net::FTP::L' => 'cpan',
+ 'Net::FTP::dataconn' => 'cpan',
+ 'Net::NNTP' => 'cpan',
+ 'Net::Netrc' => 'cpan',
+ 'Net::POP3' => 'cpan',
+ 'Net::SMTP' => 'cpan',
+ 'Net::Time' => 'cpan',
'Package::Constants' => 'cpan',
'Params::Check' => 'cpan',
'Parse::CPAN::Meta' => 'cpan',
'Perl::OSType' => 'cpan',
- 'PerlIO::via::QuotedPrint'=> undef,
+ 'PerlIO::via::QuotedPrint'=> 'cpan',
'Pod::Checker' => 'cpan',
- 'Pod::Escapes' => undef,
+ 'Pod::Escapes' => 'cpan',
'Pod::Find' => 'cpan',
'Pod::InputObjects' => 'cpan',
- 'Pod::LaTeX' => undef,
'Pod::Man' => 'cpan',
'Pod::ParseLink' => 'cpan',
'Pod::ParseUtils' => 'cpan',
@@ -9151,11 +9942,8 @@
'Pod::Text::Overstrike' => 'cpan',
'Pod::Text::Termcap' => 'cpan',
'Pod::Usage' => 'cpan',
- 'Safe' => 'blead',
'Scalar::Util' => 'cpan',
- 'SelfLoader' => 'blead',
'Socket' => 'cpan',
- 'Storable' => 'blead',
'Sys::Syslog' => 'cpan',
'Sys::Syslog::Win32' => 'cpan',
'TAP::Base' => 'cpan',
@@ -9168,6 +9956,7 @@
'TAP::Formatter::File::Session'=> 'cpan',
'TAP::Formatter::Session'=> 'cpan',
'TAP::Harness' => 'cpan',
+ 'TAP::Harness::Env' => 'cpan',
'TAP::Object' => 'cpan',
'TAP::Parser' => 'cpan',
'TAP::Parser::Aggregator'=> 'cpan',
@@ -9198,13 +9987,10 @@
'TAP::Parser::SourceHandler::Handle'=> 'cpan',
'TAP::Parser::SourceHandler::Perl'=> 'cpan',
'TAP::Parser::SourceHandler::RawTAP'=> 'cpan',
- 'TAP::Parser::Utils' => 'cpan',
'TAP::Parser::YAMLish::Reader'=> 'cpan',
'TAP::Parser::YAMLish::Writer'=> 'cpan',
'Term::ANSIColor' => 'cpan',
- 'Term::Cap' => undef,
- 'Term::UI' => 'cpan',
- 'Term::UI::History' => 'cpan',
+ 'Term::Cap' => 'cpan',
'Test' => 'cpan',
'Test::Builder' => 'cpan',
'Test::Builder::Module' => 'cpan',
@@ -9214,58 +10000,37 @@
'Test::More' => 'cpan',
'Test::Simple' => 'cpan',
'Text::Balanced' => 'cpan',
- 'Text::ParseWords' => undef,
- 'Text::Soundex' => undef,
+ 'Text::ParseWords' => 'cpan',
'Text::Tabs' => 'cpan',
'Text::Wrap' => 'cpan',
- 'Thread::Queue' => 'blead',
- 'Thread::Semaphore' => 'blead',
- 'Tie::File' => 'blead',
'Tie::RefHash' => 'cpan',
'Time::HiRes' => 'cpan',
'Time::Local' => 'cpan',
- 'Time::Piece' => undef,
- 'Time::Seconds' => undef,
- 'Unicode::Collate' => 'first-come',
- 'Unicode::Collate::CJK::Big5'=> 'first-come',
- 'Unicode::Collate::CJK::GB2312'=> 'first-come',
- 'Unicode::Collate::CJK::JISX0208'=> 'first-come',
- 'Unicode::Collate::CJK::Korean'=> 'first-come',
- 'Unicode::Collate::CJK::Pinyin'=> 'first-come',
- 'Unicode::Collate::CJK::Stroke'=> 'first-come',
- 'Unicode::Collate::CJK::Zhuyin'=> 'first-come',
- 'Unicode::Collate::Locale'=> 'first-come',
- 'Unicode::Normalize' => 'first-come',
- 'Unicode::UCD' => 'blead',
- 'VMS::DCLsym' => undef,
- 'VMS::Stdio' => undef,
+ 'Time::Piece' => 'cpan',
+ 'Time::Seconds' => 'cpan',
+ 'Unicode::Collate' => 'cpan',
+ 'Unicode::Collate::CJK::Big5'=> 'cpan',
+ 'Unicode::Collate::CJK::GB2312'=> 'cpan',
+ 'Unicode::Collate::CJK::JISX0208'=> 'cpan',
+ 'Unicode::Collate::CJK::Korean'=> 'cpan',
+ 'Unicode::Collate::CJK::Pinyin'=> 'cpan',
+ 'Unicode::Collate::CJK::Stroke'=> 'cpan',
+ 'Unicode::Collate::CJK::Zhuyin'=> 'cpan',
+ 'Unicode::Collate::Locale'=> 'cpan',
+ 'Unicode::Normalize' => 'cpan',
'Win32' => 'cpan',
'Win32API::File' => 'cpan',
'Win32API::File::ExtUtils::Myconst2perl'=> 'cpan',
- 'Win32CORE' => undef,
- 'XSLoader' => undef,
'autodie' => 'cpan',
'autodie::exception' => 'cpan',
'autodie::exception::system'=> 'cpan',
'autodie::hints' => 'cpan',
- 'base' => 'blead',
- 'bigint' => 'blead',
- 'bignum' => 'blead',
- 'bigrat' => 'blead',
- 'constant' => 'blead',
+ 'autodie::skip' => 'cpan',
'encoding' => 'cpan',
- 'encoding::warnings' => undef,
- 'fields' => 'blead',
- 'if' => 'blead',
+ 'encoding::warnings' => 'cpan',
'inc::latest' => 'cpan',
- 'lib' => 'blead',
- 'parent' => undef,
+ 'parent' => 'cpan',
'perlfaq' => 'cpan',
- 'threads' => 'blead',
- 'threads::shared' => 'blead',
- 'version' => undef,
- 'warnings' => 'blead',
- 'warnings::register' => 'blead',
);
%bug_tracker = (
@@ -9274,16 +10039,10 @@
'App::Prove::State' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
'App::Prove::State::Result'=> 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
'App::Prove::State::Result::Test'=> 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
- 'Archive::Extract' => undef,
'Archive::Tar' => undef,
'Archive::Tar::Constant'=> undef,
'Archive::Tar::File' => undef,
- 'Attribute::Handlers' => undef,
- 'B::Concise' => undef,
'B::Debug' => undef,
- 'B::Deparse' => undef,
- 'B::Lint' => undef,
- 'B::Lint::Debug' => undef,
'CGI' => undef,
'CGI::Apache' => undef,
'CGI::Carp' => undef,
@@ -9317,15 +10076,15 @@
'CPAN::InfoObj' => undef,
'CPAN::Kwalify' => undef,
'CPAN::LWP::UserAgent' => undef,
- 'CPAN::Meta' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta',
- 'CPAN::Meta::Converter' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta',
- 'CPAN::Meta::Feature' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta',
- 'CPAN::Meta::History' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta',
- 'CPAN::Meta::Prereqs' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta',
- 'CPAN::Meta::Requirements'=> 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta-Requirements',
- 'CPAN::Meta::Spec' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta',
- 'CPAN::Meta::Validator' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta',
- 'CPAN::Meta::YAML' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta-YAML',
+ 'CPAN::Meta' => 'https://github.com/Perl-Toolchain-Gang/CPAN-Meta/issues',
+ 'CPAN::Meta::Converter' => 'https://github.com/Perl-Toolchain-Gang/CPAN-Meta/issues',
+ 'CPAN::Meta::Feature' => 'https://github.com/Perl-Toolchain-Gang/CPAN-Meta/issues',
+ 'CPAN::Meta::History' => 'https://github.com/Perl-Toolchain-Gang/CPAN-Meta/issues',
+ 'CPAN::Meta::Prereqs' => 'https://github.com/Perl-Toolchain-Gang/CPAN-Meta/issues',
+ 'CPAN::Meta::Requirements'=> 'https://github.com/dagolden/CPAN-Meta-Requirements/issues',
+ 'CPAN::Meta::Spec' => 'https://github.com/Perl-Toolchain-Gang/CPAN-Meta/issues',
+ 'CPAN::Meta::Validator' => 'https://github.com/Perl-Toolchain-Gang/CPAN-Meta/issues',
+ 'CPAN::Meta::YAML' => 'https://github.com/dagolden/CPAN-Meta-YAML/issues',
'CPAN::Mirrors' => undef,
'CPAN::Module' => undef,
'CPAN::Nox' => undef,
@@ -9335,56 +10094,11 @@
'CPAN::Tarzip' => undef,
'CPAN::URL' => undef,
'CPAN::Version' => undef,
- 'CPANPLUS' => undef,
- 'CPANPLUS::Backend' => undef,
- 'CPANPLUS::Backend::RV' => undef,
- 'CPANPLUS::Config' => undef,
- 'CPANPLUS::Config::HomeEnv'=> undef,
- 'CPANPLUS::Configure' => undef,
- 'CPANPLUS::Configure::Setup'=> undef,
- 'CPANPLUS::Dist' => undef,
- 'CPANPLUS::Dist::Autobundle'=> undef,
- 'CPANPLUS::Dist::Base' => undef,
- 'CPANPLUS::Dist::Build' => undef,
- 'CPANPLUS::Dist::Build::Constants'=> undef,
- 'CPANPLUS::Dist::MM' => undef,
- 'CPANPLUS::Dist::Sample'=> undef,
- 'CPANPLUS::Error' => undef,
- 'CPANPLUS::Internals' => undef,
- 'CPANPLUS::Internals::Constants'=> undef,
- 'CPANPLUS::Internals::Constants::Report'=> undef,
- 'CPANPLUS::Internals::Extract'=> undef,
- 'CPANPLUS::Internals::Fetch'=> undef,
- 'CPANPLUS::Internals::Report'=> undef,
- 'CPANPLUS::Internals::Search'=> undef,
- 'CPANPLUS::Internals::Source'=> undef,
- 'CPANPLUS::Internals::Source::Memory'=> undef,
- 'CPANPLUS::Internals::Source::SQLite'=> undef,
- 'CPANPLUS::Internals::Source::SQLite::Tie'=> undef,
- 'CPANPLUS::Internals::Utils'=> undef,
- 'CPANPLUS::Internals::Utils::Autoflush'=> undef,
- 'CPANPLUS::Module' => undef,
- 'CPANPLUS::Module::Author'=> undef,
- 'CPANPLUS::Module::Author::Fake'=> undef,
- 'CPANPLUS::Module::Checksums'=> undef,
- 'CPANPLUS::Module::Fake'=> undef,
- 'CPANPLUS::Module::Signature'=> undef,
- 'CPANPLUS::Selfupdate' => undef,
- 'CPANPLUS::Shell' => undef,
- 'CPANPLUS::Shell::Classic'=> undef,
- 'CPANPLUS::Shell::Default'=> undef,
- 'CPANPLUS::Shell::Default::Plugins::CustomSource'=> undef,
- 'CPANPLUS::Shell::Default::Plugins::Remote'=> undef,
- 'CPANPLUS::Shell::Default::Plugins::Source'=> undef,
- 'Carp' => undef,
- 'Carp::Heavy' => undef,
'Compress::Raw::Bzip2' => undef,
'Compress::Raw::Zlib' => undef,
'Compress::Zlib' => undef,
'Config::Perl::V' => undef,
- 'Cwd' => undef,
'DB_File' => undef,
- 'Devel::InnerPackage' => undef,
'Devel::PPPort' => undef,
'Digest' => undef,
'Digest::MD5' => undef,
@@ -9415,79 +10129,42 @@
'Encode::TW' => undef,
'Encode::Unicode' => undef,
'Encode::Unicode::UTF7' => undef,
- 'Exporter' => undef,
- 'Exporter::Heavy' => undef,
- 'ExtUtils::CBuilder' => undef,
- 'ExtUtils::CBuilder::Base'=> undef,
- 'ExtUtils::CBuilder::Platform::Unix'=> undef,
- 'ExtUtils::CBuilder::Platform::VMS'=> undef,
- 'ExtUtils::CBuilder::Platform::Windows'=> undef,
- 'ExtUtils::CBuilder::Platform::Windows::BCC'=> undef,
- 'ExtUtils::CBuilder::Platform::Windows::GCC'=> undef,
- 'ExtUtils::CBuilder::Platform::Windows::MSVC'=> undef,
- 'ExtUtils::CBuilder::Platform::aix'=> undef,
- 'ExtUtils::CBuilder::Platform::cygwin'=> undef,
- 'ExtUtils::CBuilder::Platform::darwin'=> undef,
- 'ExtUtils::CBuilder::Platform::dec_osf'=> undef,
- 'ExtUtils::CBuilder::Platform::os2'=> undef,
- 'ExtUtils::Command::MM' => undef,
+ 'ExtUtils::Command::MM' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
'ExtUtils::Constant' => undef,
'ExtUtils::Constant::Base'=> undef,
'ExtUtils::Constant::ProxySubs'=> undef,
'ExtUtils::Constant::Utils'=> undef,
'ExtUtils::Constant::XS'=> undef,
- 'ExtUtils::Install' => undef,
- 'ExtUtils::Installed' => undef,
- 'ExtUtils::Liblist' => undef,
- 'ExtUtils::Liblist::Kid'=> undef,
- 'ExtUtils::MM' => undef,
- 'ExtUtils::MM_AIX' => undef,
- 'ExtUtils::MM_Any' => undef,
- 'ExtUtils::MM_BeOS' => undef,
- 'ExtUtils::MM_Cygwin' => undef,
- 'ExtUtils::MM_DOS' => undef,
- 'ExtUtils::MM_Darwin' => undef,
- 'ExtUtils::MM_MacOS' => undef,
- 'ExtUtils::MM_NW5' => undef,
- 'ExtUtils::MM_OS2' => undef,
- 'ExtUtils::MM_QNX' => undef,
- 'ExtUtils::MM_UWIN' => undef,
- 'ExtUtils::MM_Unix' => undef,
- 'ExtUtils::MM_VMS' => undef,
- 'ExtUtils::MM_VOS' => undef,
- 'ExtUtils::MM_Win32' => undef,
- 'ExtUtils::MM_Win95' => undef,
- 'ExtUtils::MY' => undef,
- 'ExtUtils::MakeMaker' => undef,
- 'ExtUtils::MakeMaker::Config'=> undef,
- 'ExtUtils::Mkbootstrap' => undef,
- 'ExtUtils::Mksymlists' => undef,
- 'ExtUtils::Packlist' => undef,
- 'ExtUtils::ParseXS' => undef,
- 'ExtUtils::ParseXS::Constants'=> undef,
- 'ExtUtils::ParseXS::CountLines'=> undef,
- 'ExtUtils::ParseXS::Utilities'=> undef,
- 'ExtUtils::Typemaps' => undef,
- 'ExtUtils::Typemaps::Cmd'=> undef,
- 'ExtUtils::Typemaps::InputMap'=> undef,
- 'ExtUtils::Typemaps::OutputMap'=> undef,
- 'ExtUtils::Typemaps::Type'=> undef,
- 'ExtUtils::testlib' => undef,
+ 'ExtUtils::Liblist' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::Liblist::Kid'=> 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_AIX' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_Any' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_BeOS' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_Cygwin' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_DOS' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_Darwin' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_MacOS' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_NW5' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_OS2' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_QNX' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_UWIN' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_Unix' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_VMS' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_VOS' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_Win32' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MM_Win95' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MY' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MakeMaker' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::MakeMaker::Config'=> 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::Mkbootstrap' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::Mksymlists' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
+ 'ExtUtils::testlib' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker',
'Fatal' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=autodie',
'File::Fetch' => undef,
'File::GlobMapper' => undef,
'File::Path' => undef,
- 'File::Spec' => undef,
- 'File::Spec::Cygwin' => undef,
- 'File::Spec::Epoc' => undef,
- 'File::Spec::Functions' => undef,
- 'File::Spec::Mac' => undef,
- 'File::Spec::OS2' => undef,
- 'File::Spec::Unix' => undef,
- 'File::Spec::VMS' => undef,
- 'File::Spec::Win32' => undef,
- 'File::Temp' => 'https://rt.cpan.org/Public/Dist/Display.html?Name=File-Temp',
- 'Filter::Simple' => undef,
+ 'File::Temp' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=File-Temp',
'Filter::Util::Call' => undef,
'Getopt::Long' => undef,
'HTTP::Tiny' => 'https://github.com/chansen/p5-http-tiny/issues',
@@ -9552,26 +10229,10 @@
'Locale::Country' => undef,
'Locale::Currency' => undef,
'Locale::Language' => undef,
- 'Locale::Maketext' => undef,
- 'Locale::Maketext::Guts'=> undef,
- 'Locale::Maketext::GutsLoader'=> undef,
'Locale::Maketext::Simple'=> undef,
'Locale::Script' => undef,
- 'Log::Message' => undef,
- 'Log::Message::Config' => undef,
- 'Log::Message::Handlers'=> undef,
- 'Log::Message::Item' => undef,
- 'Log::Message::Simple' => undef,
'MIME::Base64' => undef,
'MIME::QuotedPrint' => undef,
- 'Math::BigFloat' => undef,
- 'Math::BigFloat::Trace' => undef,
- 'Math::BigInt' => undef,
- 'Math::BigInt::Calc' => undef,
- 'Math::BigInt::CalcEmu' => undef,
- 'Math::BigInt::FastCalc'=> undef,
- 'Math::BigInt::Trace' => undef,
- 'Math::BigRat' => undef,
'Math::Complex' => undef,
'Math::Trig' => undef,
'Memoize' => undef,
@@ -9592,12 +10253,8 @@
'Module::Build::ModuleInfo'=> undef,
'Module::Build::Notes' => undef,
'Module::Build::PPMMaker'=> undef,
- 'Module::Build::Platform::Amiga'=> undef,
'Module::Build::Platform::Default'=> undef,
- 'Module::Build::Platform::EBCDIC'=> undef,
- 'Module::Build::Platform::MPEiX'=> undef,
'Module::Build::Platform::MacOS'=> undef,
- 'Module::Build::Platform::RiscOS'=> undef,
'Module::Build::Platform::Unix'=> undef,
'Module::Build::Platform::VMS'=> undef,
'Module::Build::Platform::VOS'=> undef,
@@ -9609,15 +10266,10 @@
'Module::Build::PodParser'=> undef,
'Module::Build::Version'=> undef,
'Module::Build::YAML' => undef,
- 'Module::CoreList' => undef,
- 'Module::CoreList::TieHashDelta'=> undef,
- 'Module::CoreList::Utils'=> undef,
'Module::Load' => undef,
'Module::Load::Conditional'=> undef,
'Module::Loaded' => undef,
- 'Module::Metadata' => undef,
- 'Module::Pluggable' => undef,
- 'Module::Pluggable::Object'=> undef,
+ 'Module::Metadata' => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Module-Metadata',
'NEXT' => undef,
'Net::Cmd' => undef,
'Net::Config' => undef,
@@ -9631,20 +10283,17 @@
'Net::NNTP' => undef,
'Net::Netrc' => undef,
'Net::POP3' => undef,
- 'Net::Ping' => undef,
'Net::SMTP' => undef,
'Net::Time' => undef,
- 'Object::Accessor' => undef,
'Package::Constants' => undef,
'Params::Check' => undef,
- 'Parse::CPAN::Meta' => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Parse-CPAN-Meta',
- 'Perl::OSType' => 'https://github.com/dagolden/perl-ostype/issues',
+ 'Parse::CPAN::Meta' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Parse-CPAN-Meta',
+ 'Perl::OSType' => 'https://github.com/dagolden/Perl-OSType/issues',
'PerlIO::via::QuotedPrint'=> undef,
'Pod::Checker' => undef,
'Pod::Escapes' => undef,
'Pod::Find' => undef,
'Pod::InputObjects' => undef,
- 'Pod::LaTeX' => undef,
'Pod::Man' => undef,
'Pod::ParseLink' => undef,
'Pod::ParseUtils' => undef,
@@ -9697,11 +10346,8 @@
'Pod::Text::Overstrike' => undef,
'Pod::Text::Termcap' => undef,
'Pod::Usage' => undef,
- 'Safe' => undef,
'Scalar::Util' => undef,
- 'SelfLoader' => undef,
'Socket' => undef,
- 'Storable' => undef,
'Sys::Syslog' => undef,
'Sys::Syslog::Win32' => undef,
'TAP::Base' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
@@ -9714,6 +10360,7 @@
'TAP::Formatter::File::Session'=> 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
'TAP::Formatter::Session'=> 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
'TAP::Harness' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
+ 'TAP::Harness::Env' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
'TAP::Object' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
'TAP::Parser' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
'TAP::Parser::Aggregator'=> 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
@@ -9744,29 +10391,22 @@
'TAP::Parser::SourceHandler::Handle'=> 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
'TAP::Parser::SourceHandler::Perl'=> 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
'TAP::Parser::SourceHandler::RawTAP'=> 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
- 'TAP::Parser::Utils' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
'TAP::Parser::YAMLish::Reader'=> 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
'TAP::Parser::YAMLish::Writer'=> 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
'Term::ANSIColor' => undef,
'Term::Cap' => undef,
- 'Term::UI' => undef,
- 'Term::UI::History' => undef,
'Test' => undef,
- 'Test::Builder' => 'http://github.com/schwern/test-more/issues',
- 'Test::Builder::Module' => 'http://github.com/schwern/test-more/issues',
+ 'Test::Builder' => 'http://github.com/schwern/test-more/issues/',
+ 'Test::Builder::Module' => 'http://github.com/schwern/test-more/issues/',
'Test::Builder::Tester' => 'http://github.com/schwern/test-more/issues',
'Test::Builder::Tester::Color'=> 'http://github.com/schwern/test-more/issues',
'Test::Harness' => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Harness',
- 'Test::More' => 'http://github.com/schwern/test-more/issues',
- 'Test::Simple' => 'http://github.com/schwern/test-more/issues',
+ 'Test::More' => 'http://github.com/schwern/test-more/issues/',
+ 'Test::Simple' => 'http://github.com/schwern/test-more/issues/',
'Text::Balanced' => undef,
'Text::ParseWords' => undef,
- 'Text::Soundex' => undef,
'Text::Tabs' => undef,
'Text::Wrap' => undef,
- 'Thread::Queue' => undef,
- 'Thread::Semaphore' => undef,
- 'Tie::File' => undef,
'Tie::RefHash' => undef,
'Time::HiRes' => undef,
'Time::Local' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Time-Local',
@@ -9782,34 +10422,19 @@
'Unicode::Collate::CJK::Zhuyin'=> undef,
'Unicode::Collate::Locale'=> undef,
'Unicode::Normalize' => undef,
- 'Unicode::UCD' => undef,
- 'VMS::Stdio' => undef,
'Win32' => undef,
'Win32API::File' => undef,
'Win32API::File::ExtUtils::Myconst2perl'=> undef,
- 'XSLoader' => 'https://rt.perl.org/rt3/Search/Results.html?Query=Queue=\'perl5\' AND Content LIKE \'module=XSLoader\' AND (Status=\'open\' OR Status=\'new\' OR Status=\'stalled\')',
'autodie' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=autodie',
'autodie::exception' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=autodie',
'autodie::exception::system'=> 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=autodie',
'autodie::hints' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=autodie',
- 'base' => undef,
- 'bigint' => undef,
- 'bignum' => undef,
- 'bigrat' => undef,
- 'constant' => undef,
+ 'autodie::skip' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=autodie',
'encoding' => undef,
'encoding::warnings' => undef,
- 'fields' => undef,
- 'if' => undef,
'inc::latest' => undef,
- 'lib' => undef,
'parent' => undef,
'perlfaq' => 'https://github.com/perl-doc-cats/perlfaq/issues',
- 'threads' => undef,
- 'threads::shared' => undef,
- 'version' => undef,
- 'warnings' => undef,
- 'warnings::register' => undef,
);
# Create aliases with trailing zeros for $] use
Modified: vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList.pod
===================================================================
--- vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/dist/Module-CoreList/lib/Module/CoreList.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -12,6 +12,10 @@
print Module::CoreList->first_release_by_date('File::Spec'); # prints 5.005
print Module::CoreList->first_release('File::Spec', 0.82); # prints 5.006001
+ if (Module::CoreList::is_core('File::Spec')) {
+ print "File::Spec is a core module\n";
+ }
+
print join ', ', Module::CoreList->find_modules(qr/Data/);
# prints 'Data::Dumper'
print join ', ', Module::CoreList->find_modules(qr/test::h.*::.*s/i, 5.008008);
@@ -71,6 +75,19 @@
Takes a perl version as an argument. Returns that perl version if it exists or C<undef>
otherwise.
+=item C<is_core( MODULE, [ MODULE_VERSION, [ PERL_VERSION ] ] )>
+
+Available in version 2.99 and above.
+
+Returns true if MODULE was bundled with the specified version of Perl.
+You can optionally specify a minimum version of the module,
+and can also specify a version of Perl.
+If a version of Perl isn't specified,
+C<is_core()> will use the version of Perl that is running (ie C<$^V>).
+
+If you want to specify the version of Perl, but don't care about
+the version of the module, pass C<undef> for the module version:
+
=item C<is_deprecated( MODULE, PERL_VERSION )>
Available in version 2.22 and above.
@@ -142,6 +159,20 @@
Starting with 2.10, the special module name C<Unicode> refers to the version of
the Unicode Character Database bundled with Perl.
+=item C<%Module::CoreList::delta>
+
+Available in version 3.00 and above.
+
+C<%Module::CoreList::version> is implemented via C<Module::CoreList::TieHashDelta>
+using this hash of delta changes.
+
+It is a hash of hashes that is keyed on perl version. Each keyed hash will have the
+following keys:
+
+ delta_from - a previous perl version that the changes are based on
+ changed - a hash of module/versions that have changed
+ removed - a hash of modules that have been removed
+
=item C<%Module::CoreList::released>
Keyed on perl version this contains ISO
@@ -197,7 +228,7 @@
5.15.0, 5.15.1, 5.15.2, 5.15.3, 5.15.4, 5.15.5, 5.15.6, 5.15.7, 5.15.8,
5.15.9, 5.16.0, 5.16.1, 5.16.2, 5.16.3, 5.17.0, 5.17.1, 5.17.2, 5.17.3,
5.17.4, 5.17.5, 5.17.6, 5.17.7, 5.17.8, 5.17.9, 5.17.10, 5.17.11, 5.18.0,
-5.19.0, 5.19.1, 5.19.2, 5.19.3 and 5.18.1 releases of perl.
+5.19.0, 5.19.1, 5.19.2, 5.19.3, 5.19.4, 5.19.5, 5.19.6 and 5.19.7 releases of perl.
=head1 HISTORY
Added: vendor/perl/dist/dist/Module-CoreList/t/is_core.t
===================================================================
--- vendor/perl/dist/dist/Module-CoreList/t/is_core.t (rev 0)
+++ vendor/perl/dist/dist/Module-CoreList/t/is_core.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -0,0 +1,67 @@
+#!perl -w
+use strict;
+use Module::CoreList;
+use Test::More tests => 33;
+
+BEGIN { require_ok('Module::CoreList'); }
+
+ok(!Module::CoreList::is_core('Module::Path'), 'Module::Path has never been in core');
+ok(!Module::CoreList::is_core('Module::Path', undef, '5.016003'), 'Module::Path has never been in core');
+ok(!Module::CoreList::is_core('Module::Path', undef), 'Module::Path has never been in core');
+
+# List::Util::PP was added in 5.010001 and removed in 5.017001
+ok(!Module::CoreList::is_core('List::Util::PP', undef, '5.002'), 'List::Util::PP was added in 5.10.1 so not in core in 5.002');
+ok(Module::CoreList::is_core('List::Util::PP', undef, '5.016003'), 'List::Util::PP was in core in 5.16.3');
+ok(!Module::CoreList::is_core('List::Util::PP', undef, '5.018001'), 'List::Util::PP was removed in 5.17.1 so not in core in 5.18.1');
+
+# Carp has always been a core module
+ok(Module::CoreList::is_core('Carp', undef, '5'), 'Carp was a core module in first release of perl 5');
+ok(Module::CoreList::is_core('Carp', undef, '5.019004'), 'Carp was still a core module in 5.19.4');
+ok(Module::CoreList::is_core('Carp'), "Carp should be a core module whatever version of perl you're running");
+
+ok(Module::CoreList::is_core('attributes', undef, '5.00503') == 0, "attributes weren't in 5.00503");
+ok(Module::CoreList::is_core('attributes', undef, '5.006001') == 1, "attributes were in 5.6.1");
+ok(Module::CoreList::is_core('Pod::Plainer', undef, '5.012001') == 1, "Pod::Plainer was core in 5.12.1");
+ok(Module::CoreList::is_core('Pod::Plainer', undef, '5.016003') == 0, "Pod::Plainer was removed in 5.13.1");
+
+# history of module 'encoding' in core
+# version 1.00 included in 5.007003
+# version 1.35 included in 5.008
+# version 1.47 included in 5.008001
+# version 1.48 included in 5.008003
+# version 2.00 included in 5.008005
+# version 2.01 included in 5.008006
+# version 2.02 included in 5.008008
+# version 2.6_01 included in 5.008009
+# version 2.04 included in 5.009004
+# version 2.06 included in 5.009005
+# version 2.6_01 included in 5.010001
+# version 2.12 included in 5.019001
+
+ok(!Module::CoreList::is_core('encoding', undef, '5'), "encoding wasn't in core in first release of perl 5");
+ok(!Module::CoreList::is_core('encoding', '1.00', '5'), "encoding 1.00 wasn't in core in first release of perl 5");
+ok(!Module::CoreList::is_core('encoding', '1.35', '5.007003'), "encoding 1.35 wasn't yet in core in perl 5.007003");
+ok(Module::CoreList::is_core('encoding', '1.35', '5.008'), "encoding 1.35 was first included in perl 5.008");
+ok(Module::CoreList::is_core('encoding', '1.35', '5.009004'), "encoding 2.04 (>1.35) was included in 5.009004");
+ok(Module::CoreList::is_core('encoding', '2.01', '5.008007'), "encoding 2.01 was first in core in perl 5.008006, so was core in 5.8.7");
+ok(Module::CoreList->is_core('encoding', '2.01', '5.008007'), "encoding 2.01 was first in core in perl 5.008006, so was core in 5.8.7");
+
+# Module::CoreList (2.17) was first included in 5.008009
+ok(!Module::CoreList::is_core('Module::CoreList', undef, '5.007003'), "Module::CoreList wasn't core in perl 5.7.3");
+ok(!Module::CoreList->is_core('Module::CoreList', undef, '5.007003'), "Module::CoreList wasn't core in perl 5.7.3 (class method)");
+
+# Test for situations where different branches on the perl
+# release tree had different versions of a module, and a naive
+# checking of perl release number will trip you up
+ok(Module::CoreList->is_core('Text::Soundex', '1.01', '5.008007'), "Text::Soundex 1.01 was first included in 5.007003");
+ok(Module::CoreList->is_core('Text::Soundex', '3.03', '5.008009'), "Text::Soundex 3.03 was included in 5.008009");
+ok(!Module::CoreList->is_core('Text::Soundex', '3.03', '5.009003'), "5.009003 still had Text::Soundex 1.01");
+ok(Module::CoreList->is_core('Text::Soundex', '1.01', '5.009003'), "5.009003 still had Text::Soundex 1.01");
+ok(!Module::CoreList->is_core('Text::Soundex', '3.03', '5.009005'), "5.009005 still had Text::Soundex 3.02");
+ok(Module::CoreList->is_core('Text::Soundex', '3.02', '5.009005'), "5.009005 had Text::Soundex 3.02");
+ok(Module::CoreList->is_core('Text::Soundex', '3.03', '5.01'), "5.01 had Text::Soundex 3.03");
+
+# 5.002 was the first perl release where core modules had a version number
+ok(Module::CoreList->is_core('DB_File', '1.01', '5.002'), "DB_File 1.01 was included in 5.002");
+ok(!Module::CoreList->is_core('DB_File', '1.03', '5.002'), "DB_File 1.03 wasn't included in 5.002");
+ok(Module::CoreList->is_core('DB_File', '1.03', '5.00307'), "DB_File 1.03 was included in 5.00307");
Modified: vendor/perl/dist/ext/B/B/Concise.pm
===================================================================
--- vendor/perl/dist/ext/B/B/Concise.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/B/B/Concise.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -14,7 +14,7 @@
use Exporter (); # use #5
-our $VERSION = "0.95";
+our $VERSION = "0.95_01";
our @ISA = qw(Exporter);
our @EXPORT_OK = qw( set_style set_style_standard add_callback
concise_subref concise_cv concise_main
@@ -711,7 +711,14 @@
$hr->{svaddr} = sprintf("%#x", $$sv);
if ($hr->{svclass} eq "GV" && $sv->isGV_with_GP()) {
my $gv = $sv;
- my $stash = $gv->STASH->NAME; if ($stash eq "main") {
+ my $stash = $gv->STASH;
+ if (class($stash) eq "SPECIAL") {
+ $stash = "<none>";
+ }
+ else {
+ $stash = $stash->NAME;
+ }
+ if ($stash eq "main") {
$stash = "";
} else {
$stash = $stash . "::";
Deleted: vendor/perl/dist/ext/B/B/Debug.pm
===================================================================
--- vendor/perl/dist/ext/B/B/Debug.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/B/B/Debug.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,420 +0,0 @@
-package B::Debug;
-
-our $VERSION = '1.11';
-
-use strict;
-require 5.006;
-use B qw(peekop class walkoptree walkoptree_exec
- main_start main_root cstring sv_undef);
-use Config;
-my (@optype, @specialsv_name);
-require B;
-if ($] < 5.009) {
- require B::Asmdata;
- B::Asmdata->import qw(@optype @specialsv_name);
-} else {
- B->import qw(@optype @specialsv_name);
-}
-my $have_B_Flags;
-if (!$ENV{PERL_CORE}){ # avoid CORE test crashes
- eval { require B::Flags and $have_B_Flags++ };
-}
-my %done_gv;
-
-sub _printop {
- my $op = shift;
- my $addr = ${$op} ? $op->ppaddr : '';
- $addr =~ s/^PL_ppaddr// if $addr;
- return sprintf "0x%x %s %s", ${$op}, ${$op} ? class($op) : '', $addr;
-}
-
-sub B::OP::debug {
- my ($op) = @_;
- printf <<'EOT', class($op), $$op, $op->ppaddr, _printop($op->next), _printop($op->sibling), $op->targ, $op->type;
-%s (0x%lx)
- op_ppaddr %s
- op_next %s
- op_sibling %s
- op_targ %d
- op_type %d
-EOT
- if ($] > 5.009) {
- printf <<'EOT', $op->opt;
- op_opt %d
-EOT
- } else {
- printf <<'EOT', $op->seq;
- op_seq %d
-EOT
- }
- if ($have_B_Flags) {
- printf <<'EOT', $op->flags, $op->flagspv, $op->private, $op->privatepv;
- op_flags %d %s
- op_private %d %s
-EOT
- } else {
- printf <<'EOT', $op->flags, $op->private;
- op_flags %d
- op_private %d
-EOT
- }
-}
-
-sub B::UNOP::debug {
- my ($op) = @_;
- $op->B::OP::debug();
- printf "\top_first\t%s\n", _printop($op->first);
-}
-
-sub B::BINOP::debug {
- my ($op) = @_;
- $op->B::UNOP::debug();
- printf "\top_last \t%s\n", _printop($op->last);
-}
-
-sub B::LOOP::debug {
- my ($op) = @_;
- $op->B::BINOP::debug();
- printf <<'EOT', _printop($op->redoop), _printop($op->nextop), _printop($op->lastop);
- op_redoop %s
- op_nextop %s
- op_lastop %s
-EOT
-}
-
-sub B::LOGOP::debug {
- my ($op) = @_;
- $op->B::UNOP::debug();
- printf "\top_other\t%s\n", _printop($op->other);
-}
-
-sub B::LISTOP::debug {
- my ($op) = @_;
- $op->B::BINOP::debug();
- printf "\top_children\t%d\n", $op->children;
-}
-
-sub B::PMOP::debug {
- my ($op) = @_;
- $op->B::LISTOP::debug();
- printf "\top_pmreplroot\t0x%x\n", $] < 5.008 ? ${$op->pmreplroot} : $op->pmreplroot;
- printf "\top_pmreplstart\t0x%x\n", ${$op->pmreplstart};
- printf "\top_pmnext\t0x%x\n", ${$op->pmnext} if $] < 5.009005;
- if ($Config{'useithreads'}) {
- printf "\top_pmstashpv\t%s\n", cstring($op->pmstashpv);
- printf "\top_pmoffset\t%d\n", $op->pmoffset;
- } else {
- printf "\top_pmstash\t%s\n", cstring($op->pmstash);
- }
- printf "\top_precomp\t%s\n", cstring($op->precomp);
- printf "\top_pmflags\t0x%x\n", $op->pmflags;
- printf "\top_reflags\t0x%x\n", $op->reflags if $] >= 5.009;
- printf "\top_pmpermflags\t0x%x\n", $op->pmpermflags if $] < 5.009;
- printf "\top_pmdynflags\t0x%x\n", $op->pmdynflags if $] < 5.009;
- $op->pmreplroot->debug if $] < 5.008;
-}
-
-sub B::COP::debug {
- my ($op) = @_;
- $op->B::OP::debug();
- my $cop_io = class($op->io) eq 'SPECIAL' ? '' : $op->io->as_string;
- printf <<'EOT', $op->label, $op->stashpv, $op->file, $op->cop_seq, $op->arybase, $op->line, ${$op->warnings}, cstring($cop_io);
- cop_label "%s"
- cop_stashpv "%s"
- cop_file "%s"
- cop_seq %d
- cop_arybase %d
- cop_line %d
- cop_warnings 0x%x
- cop_io %s
-EOT
-}
-
-sub B::SVOP::debug {
- my ($op) = @_;
- $op->B::OP::debug();
- printf "\top_sv\t\t0x%x\n", ${$op->sv};
- $op->sv->debug;
-}
-
-sub B::PVOP::debug {
- my ($op) = @_;
- $op->B::OP::debug();
- printf "\top_pv\t\t%s\n", cstring($op->pv);
-}
-
-sub B::PADOP::debug {
- my ($op) = @_;
- $op->B::OP::debug();
- printf "\top_padix\t%ld\n", $op->padix;
-}
-
-sub B::NULL::debug {
- my ($sv) = @_;
- if ($$sv == ${sv_undef()}) {
- print "&sv_undef\n";
- } else {
- printf "NULL (0x%x)\n", $$sv;
- }
-}
-
-sub B::SV::debug {
- my ($sv) = @_;
- if (!$$sv) {
- print class($sv), " = NULL\n";
- return;
- }
- printf <<'EOT', class($sv), $$sv, $sv->REFCNT, $sv->FLAGS;
-%s (0x%x)
- REFCNT %d
- FLAGS 0x%x
-EOT
-}
-
-sub B::RV::debug {
- my ($rv) = @_;
- B::SV::debug($rv);
- printf <<'EOT', ${$rv->RV};
- RV 0x%x
-EOT
- $rv->RV->debug;
-}
-
-sub B::PV::debug {
- my ($sv) = @_;
- $sv->B::SV::debug();
- my $pv = $sv->PV();
- printf <<'EOT', cstring($pv), length($pv);
- xpv_pv %s
- xpv_cur %d
-EOT
-}
-
-sub B::IV::debug {
- my ($sv) = @_;
- $sv->B::SV::debug();
- printf "\txiv_iv\t\t%d\n", $sv->IV;
-}
-
-sub B::NV::debug {
- my ($sv) = @_;
- $sv->B::IV::debug();
- printf "\txnv_nv\t\t%s\n", $sv->NV;
-}
-
-sub B::PVIV::debug {
- my ($sv) = @_;
- $sv->B::PV::debug();
- printf "\txiv_iv\t\t%d\n", $sv->IV;
-}
-
-sub B::PVNV::debug {
- my ($sv) = @_;
- $sv->B::PVIV::debug();
- printf "\txnv_nv\t\t%s\n", $sv->NV;
-}
-
-sub B::PVLV::debug {
- my ($sv) = @_;
- $sv->B::PVNV::debug();
- printf "\txlv_targoff\t%d\n", $sv->TARGOFF;
- printf "\txlv_targlen\t%u\n", $sv->TARGLEN;
- printf "\txlv_type\t%s\n", cstring(chr($sv->TYPE));
-}
-
-sub B::BM::debug {
- my ($sv) = @_;
- $sv->B::PVNV::debug();
- printf "\txbm_useful\t%d\n", $sv->USEFUL;
- printf "\txbm_previous\t%u\n", $sv->PREVIOUS;
- printf "\txbm_rare\t%s\n", cstring(chr($sv->RARE));
-}
-
-sub B::CV::debug {
- my ($sv) = @_;
- $sv->B::PVNV::debug();
- my ($stash) = $sv->STASH;
- my ($start) = $sv->START;
- my ($root) = $sv->ROOT;
- my ($padlist) = $sv->PADLIST;
- my ($file) = $sv->FILE;
- my ($gv) = $sv->GV;
- printf <<'EOT', $$stash, $$start, $$root, $$gv, $file, $sv->DEPTH, $padlist, ${$sv->OUTSIDE}, $sv->OUTSIDE_SEQ;
- STASH 0x%x
- START 0x%x
- ROOT 0x%x
- GV 0x%x
- FILE %s
- DEPTH %d
- PADLIST 0x%x
- OUTSIDE 0x%x
- OUTSIDE_SEQ %d
-EOT
- $start->debug if $start;
- $root->debug if $root;
- $gv->debug if $gv;
- $padlist->debug if $padlist;
-}
-
-sub B::AV::debug {
- my ($av) = @_;
- $av->B::SV::debug;
- # tied arrays may leave out FETCHSIZE
- my (@array) = eval { $av->ARRAY; };
- print "\tARRAY\t\t(", join(", ", map("0x" . $$_, @array)), ")\n";
- my $fill = eval { scalar(@array) };
- if ($Config{'useithreads'}) {
- printf <<'EOT', $fill, $av->MAX, $av->OFF;
- FILL %d
- MAX %d
- OFF %d
-EOT
- } else {
- printf <<'EOT', $fill, $av->MAX;
- FILL %d
- MAX %d
-EOT
- }
- printf <<'EOT', $av->AvFLAGS if $] < 5.009;
- AvFLAGS %d
-EOT
-}
-
-sub B::GV::debug {
- my ($gv) = @_;
- if ($done_gv{$$gv}++) {
- printf "GV %s::%s\n", $gv->STASH->NAME, $gv->SAFENAME;
- return;
- }
- my ($sv) = $gv->SV;
- my ($av) = $gv->AV;
- my ($cv) = $gv->CV;
- $gv->B::SV::debug;
- printf <<'EOT', $gv->SAFENAME, $gv->STASH->NAME, $gv->STASH, $$sv, $gv->GvREFCNT, $gv->FORM, $$av, ${$gv->HV}, ${$gv->EGV}, $$cv, $gv->CVGEN, $gv->LINE, $gv->FILE, $gv->GvFLAGS;
- NAME %s
- STASH %s (0x%x)
- SV 0x%x
- GvREFCNT %d
- FORM 0x%x
- AV 0x%x
- HV 0x%x
- EGV 0x%x
- CV 0x%x
- CVGEN %d
- LINE %d
- FILE %s
- GvFLAGS 0x%x
-EOT
- $sv->debug if $sv;
- $av->debug if $av;
- $cv->debug if $cv;
-}
-
-sub B::SPECIAL::debug {
- my $sv = shift;
- print $specialsv_name[$$sv], "\n";
-}
-
-sub compile {
- my $order = shift;
- B::clearsym();
- if ($order && $order eq "exec") {
- return sub { walkoptree_exec(main_start, "debug") }
- } else {
- return sub { walkoptree(main_root, "debug") }
- }
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-B::Debug - Walk Perl syntax tree, printing debug info about ops
-
-=head1 SYNOPSIS
-
- perl -MO=Debug[,OPTIONS] foo.pl
-
-=head1 DESCRIPTION
-
-See F<ext/B/README> and the newer L<B::Concise>, L<B::Terse>.
-
-=head1 OPTIONS
-
-With option -exec, walks tree in execute order,
-otherwise in basic order.
-
-=head1 Changes
-
- 1.11 2008-07-14 rurban
- avoid B::Flags in CORE tests not to crash on old XS in @INC
-
- 1.10 2008-06-28 rurban
- require 5.006; Test::More not possible in 5.00505
- our => my
-
- 1.09 2008-06-18 rurban
- minor META.yml syntax fix
- 5.8.0 ending nextstate test failure: be more tolerant
- PREREQ_PM Test::More
-
- 1.08 2008-06-17 rurban
- support 5.00558 - 5.6.2
-
- 1.07 2008-06-16 rurban
- debug.t: fix strawberry perl quoting issue
-
- 1.06 2008-06-11 rurban
- added B::Flags output
- dual-life CPAN as B-Debug-1.06 and CORE
- protect scalar(@array) if tied arrays leave out FETCHSIZE
-
- 1.05_03 2008-04-16 rurban
- ithread fixes in B::AV
- B-C-1.04_??
-
- B-C-1.04_09 2008-02-24 rurban
- support 5.8 (import Asmdata)
-
- 1.05_02 2008-02-21 rurban
- added _printop
- B-C-1.04_08 and CORE
-
- 1.05_01 2008-02-05 rurban
- 5.10 fix for op->seq
- B-C-1.04_04
-
-=head1 AUTHOR
-
-Malcolm Beattie, C<mbeattie at sable.ox.ac.uk>
-Reini Urban C<rurban at cpan.org>
-
-=head1 LICENSE
-
-Copyright (c) 1996, 1997 Malcolm Beattie
-Copyright (c) 2008 Reini Urban
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- a) the GNU General Public License as published by the Free
- Software Foundation; either version 1, or (at your option) any
- later version, or
-
- b) the "Artistic License" which comes with this kit.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
- the GNU General Public License or the Artistic License for more details.
-
- You should have received a copy of the Artistic License with this kit,
- in the file named "Artistic". If not, you can get one from the Perl
- distribution. You should also have received a copy of the GNU General
- Public License, in the file named "Copying". If not, you can get one
- from the Perl distribution or else write to the Free Software Foundation,
- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-
-=cut
Deleted: vendor/perl/dist/ext/B/B/Deparse.pm
===================================================================
--- vendor/perl/dist/ext/B/B/Deparse.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/B/B/Deparse.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,4858 +0,0 @@
-# B::Deparse.pm
-# Copyright (c) 1998-2000, 2002, 2003, 2004, 2005, 2006 Stephen McCamant.
-# All rights reserved.
-# This module is free software; you can redistribute and/or modify
-# it under the same terms as Perl itself.
-
-# This is based on the module of the same name by Malcolm Beattie,
-# but essentially none of his code remains.
-
-package B::Deparse;
-use Carp;
-use B qw(class main_root main_start main_cv svref_2object opnumber perlstring
- OPf_WANT OPf_WANT_VOID OPf_WANT_SCALAR OPf_WANT_LIST
- OPf_KIDS OPf_REF OPf_STACKED OPf_SPECIAL OPf_MOD OPpPAD_STATE
- OPpLVAL_INTRO OPpOUR_INTRO OPpENTERSUB_AMPER OPpSLICE OPpCONST_BARE
- OPpTRANS_SQUASH OPpTRANS_DELETE OPpTRANS_COMPLEMENT OPpTARGET_MY
- OPpCONST_ARYBASE OPpEXISTS_SUB OPpSORT_NUMERIC OPpSORT_INTEGER
- OPpSORT_REVERSE OPpSORT_INPLACE OPpSORT_DESCEND OPpITER_REVERSED
- SVf_IOK SVf_NOK SVf_ROK SVf_POK SVpad_OUR SVf_FAKE SVs_RMG SVs_SMG
- CVf_METHOD CVf_LVALUE
- PMf_KEEP PMf_GLOBAL PMf_CONTINUE PMf_EVAL PMf_ONCE
- PMf_MULTILINE PMf_SINGLELINE PMf_FOLD PMf_EXTENDED),
- ($] < 5.009 ? 'PMf_SKIPWHITE' : 'RXf_SKIPWHITE'),
- ($] < 5.011 ? 'CVf_LOCKED' : ());
-$VERSION = 0.89;
-use strict;
-use vars qw/$AUTOLOAD/;
-use warnings ();
-
-BEGIN {
- # Easiest way to keep this code portable between 5.12.x and 5.10.x looks to
- # be to fake up a dummy CVf_LOCKED that will never actually be true.
- *CVf_LOCKED = sub () {0} unless defined &CVf_LOCKED;
-}
-
-# Changes between 0.50 and 0.51:
-# - fixed nulled leave with live enter in sort { }
-# - fixed reference constants (\"str")
-# - handle empty programs gracefully
-# - handle infinte loops (for (;;) {}, while (1) {})
-# - differentiate between `for my $x ...' and `my $x; for $x ...'
-# - various minor cleanups
-# - moved globals into an object
-# - added `-u', like B::C
-# - package declarations using cop_stash
-# - subs, formats and code sorted by cop_seq
-# Changes between 0.51 and 0.52:
-# - added pp_threadsv (special variables under USE_5005THREADS)
-# - added documentation
-# Changes between 0.52 and 0.53:
-# - many changes adding precedence contexts and associativity
-# - added `-p' and `-s' output style options
-# - various other minor fixes
-# Changes between 0.53 and 0.54:
-# - added support for new `for (1..100)' optimization,
-# thanks to Gisle Aas
-# Changes between 0.54 and 0.55:
-# - added support for new qr// construct
-# - added support for new pp_regcreset OP
-# Changes between 0.55 and 0.56:
-# - tested on base/*.t, cmd/*.t, comp/*.t, io/*.t
-# - fixed $# on non-lexicals broken in last big rewrite
-# - added temporary fix for change in opcode of OP_STRINGIFY
-# - fixed problem in 0.54's for() patch in `for (@ary)'
-# - fixed precedence in conditional of ?:
-# - tweaked list paren elimination in `my($x) = @_'
-# - made continue-block detection trickier wrt. null ops
-# - fixed various prototype problems in pp_entersub
-# - added support for sub prototypes that never get GVs
-# - added unquoting for special filehandle first arg in truncate
-# - print doubled rv2gv (a bug) as `*{*GV}' instead of illegal `**GV'
-# - added semicolons at the ends of blocks
-# - added -l `#line' declaration option -- fixes cmd/subval.t 27,28
-# Changes between 0.56 and 0.561:
-# - fixed multiply-declared my var in pp_truncate (thanks to Sarathy)
-# - used new B.pm symbolic constants (done by Nick Ing-Simmons)
-# Changes between 0.561 and 0.57:
-# - stylistic changes to symbolic constant stuff
-# - handled scope in s///e replacement code
-# - added unquote option for expanding "" into concats, etc.
-# - split method and proto parts of pp_entersub into separate functions
-# - various minor cleanups
-# Changes after 0.57:
-# - added parens in \&foo (patch by Albert Dvornik)
-# Changes between 0.57 and 0.58:
-# - fixed `0' statements that weren't being printed
-# - added methods for use from other programs
-# (based on patches from James Duncan and Hugo van der Sanden)
-# - added -si and -sT to control indenting (also based on a patch from Hugo)
-# - added -sv to print something else instead of '???'
-# - preliminary version of utf8 tr/// handling
-# Changes after 0.58:
-# - uses of $op->ppaddr changed to new $op->name (done by Sarathy)
-# - added support for Hugo's new OP_SETSTATE (like nextstate)
-# Changes between 0.58 and 0.59
-# - added support for Chip's OP_METHOD_NAMED
-# - added support for Ilya's OPpTARGET_MY optimization
-# - elided arrows before `()' subscripts when possible
-# Changes between 0.59 and 0.60
-# - support for method attribues was added
-# - some warnings fixed
-# - separate recognition of constant subs
-# - rewrote continue block handling, now recoginizing for loops
-# - added more control of expanding control structures
-# Changes between 0.60 and 0.61 (mostly by Robin Houston)
-# - many bug-fixes
-# - support for pragmas and 'use'
-# - support for the little-used $[ variable
-# - support for __DATA__ sections
-# - UTF8 support
-# - BEGIN, CHECK, INIT and END blocks
-# - scoping of subroutine declarations fixed
-# - compile-time output from the input program can be suppressed, so that the
-# output is just the deparsed code. (a change to O.pm in fact)
-# - our() declarations
-# - *all* the known bugs are now listed in the BUGS section
-# - comprehensive test mechanism (TEST -deparse)
-# Changes between 0.62 and 0.63 (mostly by Rafael Garcia-Suarez)
-# - bug-fixes
-# - new switch -P
-# - support for command-line switches (-l, -0, etc.)
-# Changes between 0.63 and 0.64
-# - support for //, CHECK blocks, and assertions
-# - improved handling of foreach loops and lexicals
-# - option to use Data::Dumper for constants
-# - more bug fixes
-# - discovered lots more bugs not yet fixed
-#
-# ...
-#
-# Changes between 0.72 and 0.73
-# - support new switch constructs
-
-# Todo:
-# (See also BUGS section at the end of this file)
-#
-# - finish tr/// changes
-# - add option for even more parens (generalize \&foo change)
-# - left/right context
-# - copy comments (look at real text with $^P?)
-# - avoid semis in one-statement blocks
-# - associativity of &&=, ||=, ?:
-# - ',' => '=>' (auto-unquote?)
-# - break long lines ("\r" as discretionary break?)
-# - configurable syntax highlighting: ANSI color, HTML, TeX, etc.
-# - more style options: brace style, hex vs. octal, quotes, ...
-# - print big ints as hex/octal instead of decimal (heuristic?)
-# - handle `my $x if 0'?
-# - version using op_next instead of op_first/sibling?
-# - avoid string copies (pass arrays, one big join?)
-# - here-docs?
-
-# Current test.deparse failures
-# comp/hints 6 - location of BEGIN blocks wrt. block openings
-# run/switchI 1 - missing -I switches entirely
-# perl -Ifoo -e 'print @INC'
-# op/caller 2 - warning mask propagates backwards before warnings::register
-# 'use warnings; BEGIN {${^WARNING_BITS} eq "U"x12;} use warnings::register'
-# op/getpid 2 - can't assign to shared my() declaration (threads only)
-# 'my $x : shared = 5'
-# op/override 7 - parens on overriden require change v-string interpretation
-# 'BEGIN{*CORE::GLOBAL::require=sub {}} require v5.6'
-# c.f. 'BEGIN { *f = sub {0} }; f 2'
-# op/pat 774 - losing Unicode-ness of Latin1-only strings
-# 'use charnames ":short"; $x="\N{latin:a with acute}"'
-# op/recurse 12 - missing parens on recursive call makes it look like method
-# 'sub f { f($x) }'
-# op/subst 90 - inconsistent handling of utf8 under "use utf8"
-# op/taint 29 - "use re 'taint'" deparsed in the wrong place wrt. block open
-# op/tiehandle compile - "use strict" deparsed in the wrong place
-# uni/tr_ several
-# ext/B/t/xref 11 - line numbers when we add newlines to one-line subs
-# ext/Data/Dumper/t/dumper compile
-# ext/DB_file/several
-# ext/Encode/several
-# ext/Ernno/Errno warnings
-# ext/IO/lib/IO/t/io_sel 23
-# ext/PerlIO/t/encoding compile
-# ext/POSIX/t/posix 6
-# ext/Socket/Socket 8
-# ext/Storable/t/croak compile
-# lib/Attribute/Handlers/t/multi compile
-# lib/bignum/ several
-# lib/charnames 35
-# lib/constant 32
-# lib/English 40
-# lib/ExtUtils/t/bytes 4
-# lib/File/DosGlob compile
-# lib/Filter/Simple/t/data 1
-# lib/Math/BigInt/t/constant 1
-# lib/Net/t/config Deparse-warning
-# lib/overload compile
-# lib/Switch/ several
-# lib/Symbol 4
-# lib/Test/Simple several
-# lib/Term/Complete
-# lib/Tie/File/t/29_downcopy 5
-# lib/vars 22
-
-# Object fields (were globals):
-#
-# avoid_local:
-# (local($a), local($b)) and local($a, $b) have the same internal
-# representation but the short form looks better. We notice we can
-# use a large-scale local when checking the list, but need to prevent
-# individual locals too. This hash holds the addresses of OPs that
-# have already had their local-ness accounted for. The same thing
-# is done with my().
-#
-# curcv:
-# CV for current sub (or main program) being deparsed
-#
-# curcvlex:
-# Cached hash of lexical variables for curcv: keys are names,
-# each value is an array of pairs, indicating the cop_seq of scopes
-# in which a var of that name is valid.
-#
-# curcop:
-# COP for statement being deparsed
-#
-# curstash:
-# name of the current package for deparsed code
-#
-# subs_todo:
-# array of [cop_seq, CV, is_format?] for subs and formats we still
-# want to deparse
-#
-# protos_todo:
-# as above, but [name, prototype] for subs that never got a GV
-#
-# subs_done, forms_done:
-# keys are addresses of GVs for subs and formats we've already
-# deparsed (or at least put into subs_todo)
-#
-# subs_declared
-# keys are names of subs for which we've printed declarations.
-# That means we can omit parentheses from the arguments.
-#
-# subs_deparsed
-# Keeps track of fully qualified names of all deparsed subs.
-#
-# parens: -p
-# linenums: -l
-# unquote: -q
-# cuddle: ` ' or `\n', depending on -sC
-# indent_size: -si
-# use_tabs: -sT
-# ex_const: -sv
-
-# A little explanation of how precedence contexts and associativity
-# work:
-#
-# deparse() calls each per-op subroutine with an argument $cx (short
-# for context, but not the same as the cx* in the perl core), which is
-# a number describing the op's parents in terms of precedence, whether
-# they're inside an expression or at statement level, etc. (see
-# chart below). When ops with children call deparse on them, they pass
-# along their precedence. Fractional values are used to implement
-# associativity (`($x + $y) + $z' => `$x + $y + $y') and related
-# parentheses hacks. The major disadvantage of this scheme is that
-# it doesn't know about right sides and left sides, so say if you
-# assign a listop to a variable, it can't tell it's allowed to leave
-# the parens off the listop.
-
-# Precedences:
-# 26 [TODO] inside interpolation context ("")
-# 25 left terms and list operators (leftward)
-# 24 left ->
-# 23 nonassoc ++ --
-# 22 right **
-# 21 right ! ~ \ and unary + and -
-# 20 left =~ !~
-# 19 left * / % x
-# 18 left + - .
-# 17 left << >>
-# 16 nonassoc named unary operators
-# 15 nonassoc < > <= >= lt gt le ge
-# 14 nonassoc == != <=> eq ne cmp
-# 13 left &
-# 12 left | ^
-# 11 left &&
-# 10 left ||
-# 9 nonassoc .. ...
-# 8 right ?:
-# 7 right = += -= *= etc.
-# 6 left , =>
-# 5 nonassoc list operators (rightward)
-# 4 right not
-# 3 left and
-# 2 left or xor
-# 1 statement modifiers
-# 0.5 statements, but still print scopes as do { ... }
-# 0 statement level
-
-# Nonprinting characters with special meaning:
-# \cS - steal parens (see maybe_parens_unop)
-# \n - newline and indent
-# \t - increase indent
-# \b - decrease indent (`outdent')
-# \f - flush left (no indent)
-# \cK - kill following semicolon, if any
-
-sub null {
- my $op = shift;
- return class($op) eq "NULL";
-}
-
-sub todo {
- my $self = shift;
- my($cv, $is_form) = @_;
- return unless ($cv->FILE eq $0 || exists $self->{files}{$cv->FILE});
- my $seq;
- if ($cv->OUTSIDE_SEQ) {
- $seq = $cv->OUTSIDE_SEQ;
- } elsif (!null($cv->START) and is_state($cv->START)) {
- $seq = $cv->START->cop_seq;
- } else {
- $seq = 0;
- }
- push @{$self->{'subs_todo'}}, [$seq, $cv, $is_form];
- unless ($is_form || class($cv->STASH) eq 'SPECIAL') {
- $self->{'subs_deparsed'}{$cv->STASH->NAME."::".$cv->GV->NAME} = 1;
- }
-}
-
-sub next_todo {
- my $self = shift;
- my $ent = shift @{$self->{'subs_todo'}};
- my $cv = $ent->[1];
- my $gv = $cv->GV;
- my $name = $self->gv_name($gv);
- if ($ent->[2]) {
- return "format $name =\n"
- . $self->deparse_format($ent->[1]). "\n";
- } else {
- $self->{'subs_declared'}{$name} = 1;
- if ($name eq "BEGIN") {
- my $use_dec = $self->begin_is_use($cv);
- if (defined ($use_dec) and $self->{'expand'} < 5) {
- return () if 0 == length($use_dec);
- return $use_dec;
- }
- }
- my $l = '';
- if ($self->{'linenums'}) {
- my $line = $gv->LINE;
- my $file = $gv->FILE;
- $l = "\n\f#line $line \"$file\"\n";
- }
- my $p = '';
- if (class($cv->STASH) ne "SPECIAL") {
- my $stash = $cv->STASH->NAME;
- if ($stash ne $self->{'curstash'}) {
- $p = "package $stash;\n";
- $name = "$self->{'curstash'}::$name" unless $name =~ /::/;
- $self->{'curstash'} = $stash;
- }
- $name =~ s/^\Q$stash\E::(?!\z|.*::)//;
- }
- return "${p}${l}sub $name " . $self->deparse_sub($cv);
- }
-}
-
-# Return a "use" declaration for this BEGIN block, if appropriate
-sub begin_is_use {
- my ($self, $cv) = @_;
- my $root = $cv->ROOT;
- local @$self{qw'curcv curcvlex'} = ($cv);
-#require B::Debug;
-#B::walkoptree($cv->ROOT, "debug");
- my $lineseq = $root->first;
- return if $lineseq->name ne "lineseq";
-
- my $req_op = $lineseq->first->sibling;
- return if $req_op->name ne "require";
-
- my $module;
- if ($req_op->first->private & OPpCONST_BARE) {
- # Actually it should always be a bareword
- $module = $self->const_sv($req_op->first)->PV;
- $module =~ s[/][::]g;
- $module =~ s/.pm$//;
- }
- else {
- $module = $self->const($self->const_sv($req_op->first), 6);
- }
-
- my $version;
- my $version_op = $req_op->sibling;
- return if class($version_op) eq "NULL";
- if ($version_op->name eq "lineseq") {
- # We have a version parameter; skip nextstate & pushmark
- my $constop = $version_op->first->next->next;
-
- return unless $self->const_sv($constop)->PV eq $module;
- $constop = $constop->sibling;
- $version = $self->const_sv($constop);
- if (class($version) eq "IV") {
- $version = $version->int_value;
- } elsif (class($version) eq "NV") {
- $version = $version->NV;
- } elsif (class($version) ne "PVMG") {
- # Includes PVIV and PVNV
- $version = $version->PV;
- } else {
- # version specified as a v-string
- $version = 'v'.join '.', map ord, split //, $version->PV;
- }
- $constop = $constop->sibling;
- return if $constop->name ne "method_named";
- return if $self->const_sv($constop)->PV ne "VERSION";
- }
-
- $lineseq = $version_op->sibling;
- return if $lineseq->name ne "lineseq";
- my $entersub = $lineseq->first->sibling;
- if ($entersub->name eq "stub") {
- return "use $module $version ();\n" if defined $version;
- return "use $module ();\n";
- }
- return if $entersub->name ne "entersub";
-
- # See if there are import arguments
- my $args = '';
-
- my $svop = $entersub->first->sibling; # Skip over pushmark
- return unless $self->const_sv($svop)->PV eq $module;
-
- # Pull out the arguments
- for ($svop=$svop->sibling; $svop->name ne "method_named";
- $svop = $svop->sibling) {
- $args .= ", " if length($args);
- $args .= $self->deparse($svop, 6);
- }
-
- my $use = 'use';
- my $method_named = $svop;
- return if $method_named->name ne "method_named";
- my $method_name = $self->const_sv($method_named)->PV;
-
- if ($method_name eq "unimport") {
- $use = 'no';
- }
-
- # Certain pragmas are dealt with using hint bits,
- # so we ignore them here
- if ($module eq 'strict' || $module eq 'integer'
- || $module eq 'bytes' || $module eq 'warnings'
- || $module eq 'feature') {
- return "";
- }
-
- if (defined $version && length $args) {
- return "$use $module $version ($args);\n";
- } elsif (defined $version) {
- return "$use $module $version;\n";
- } elsif (length $args) {
- return "$use $module ($args);\n";
- } else {
- return "$use $module;\n";
- }
-}
-
-sub stash_subs {
- my ($self, $pack) = @_;
- my (@ret, $stash);
- if (!defined $pack) {
- $pack = '';
- $stash = \%::;
- }
- else {
- $pack =~ s/(::)?$/::/;
- no strict 'refs';
- $stash = \%$pack;
- }
- my %stash = svref_2object($stash)->ARRAY;
- while (my ($key, $val) = each %stash) {
- my $class = class($val);
- if ($class eq "PV") {
- # Just a prototype. As an ugly but fairly effective way
- # to find out if it belongs here is to see if the AUTOLOAD
- # (if any) for the stash was defined in one of our files.
- my $A = $stash{"AUTOLOAD"};
- if (defined ($A) && class($A) eq "GV" && defined($A->CV)
- && class($A->CV) eq "CV") {
- my $AF = $A->FILE;
- next unless $AF eq $0 || exists $self->{'files'}{$AF};
- }
- push @{$self->{'protos_todo'}}, [$pack . $key, $val->PV];
- } elsif ($class eq "IV") {
- # Just a name. As above.
- my $A = $stash{"AUTOLOAD"};
- if (defined ($A) && class($A) eq "GV" && defined($A->CV)
- && class($A->CV) eq "CV") {
- my $AF = $A->FILE;
- next unless $AF eq $0 || exists $self->{'files'}{$AF};
- }
- push @{$self->{'protos_todo'}}, [$pack . $key, undef];
- } elsif ($class eq "GV") {
- if (class(my $cv = $val->CV) ne "SPECIAL") {
- next if $self->{'subs_done'}{$$val}++;
- next if $$val != ${$cv->GV}; # Ignore imposters
- $self->todo($cv, 0);
- }
- if (class(my $cv = $val->FORM) ne "SPECIAL") {
- next if $self->{'forms_done'}{$$val}++;
- next if $$val != ${$cv->GV}; # Ignore imposters
- $self->todo($cv, 1);
- }
- if (class($val->HV) ne "SPECIAL" && $key =~ /::$/) {
- $self->stash_subs($pack . $key)
- unless $pack eq '' && $key eq 'main::';
- # avoid infinite recursion
- }
- }
- }
-}
-
-sub print_protos {
- my $self = shift;
- my $ar;
- my @ret;
- foreach $ar (@{$self->{'protos_todo'}}) {
- my $proto = (defined $ar->[1] ? " (". $ar->[1] . ")" : "");
- push @ret, "sub " . $ar->[0] . "$proto;\n";
- }
- delete $self->{'protos_todo'};
- return @ret;
-}
-
-sub style_opts {
- my $self = shift;
- my $opts = shift;
- my $opt;
- while (length($opt = substr($opts, 0, 1))) {
- if ($opt eq "C") {
- $self->{'cuddle'} = " ";
- $opts = substr($opts, 1);
- } elsif ($opt eq "i") {
- $opts =~ s/^i(\d+)//;
- $self->{'indent_size'} = $1;
- } elsif ($opt eq "T") {
- $self->{'use_tabs'} = 1;
- $opts = substr($opts, 1);
- } elsif ($opt eq "v") {
- $opts =~ s/^v([^.]*)(.|$)//;
- $self->{'ex_const'} = $1;
- }
- }
-}
-
-sub new {
- my $class = shift;
- my $self = bless {}, $class;
- $self->{'cuddle'} = "\n";
- $self->{'curcop'} = undef;
- $self->{'curstash'} = "main";
- $self->{'ex_const'} = "'???'";
- $self->{'expand'} = 0;
- $self->{'files'} = {};
- $self->{'indent_size'} = 4;
- $self->{'linenums'} = 0;
- $self->{'parens'} = 0;
- $self->{'subs_todo'} = [];
- $self->{'unquote'} = 0;
- $self->{'use_dumper'} = 0;
- $self->{'use_tabs'} = 0;
-
- $self->{'ambient_arybase'} = 0;
- $self->{'ambient_warnings'} = undef; # Assume no lexical warnings
- $self->{'ambient_hints'} = 0;
- $self->{'ambient_hinthash'} = undef;
- $self->init();
-
- while (my $arg = shift @_) {
- if ($arg eq "-d") {
- $self->{'use_dumper'} = 1;
- require Data::Dumper;
- } elsif ($arg =~ /^-f(.*)/) {
- $self->{'files'}{$1} = 1;
- } elsif ($arg eq "-l") {
- $self->{'linenums'} = 1;
- } elsif ($arg eq "-p") {
- $self->{'parens'} = 1;
- } elsif ($arg eq "-P") {
- $self->{'noproto'} = 1;
- } elsif ($arg eq "-q") {
- $self->{'unquote'} = 1;
- } elsif (substr($arg, 0, 2) eq "-s") {
- $self->style_opts(substr $arg, 2);
- } elsif ($arg =~ /^-x(\d)$/) {
- $self->{'expand'} = $1;
- }
- }
- return $self;
-}
-
-{
- # Mask out the bits that L<warnings::register> uses
- my $WARN_MASK;
- BEGIN {
- $WARN_MASK = $warnings::Bits{all} | $warnings::DeadBits{all};
- }
- sub WARN_MASK () {
- return $WARN_MASK;
- }
-}
-
-# Initialise the contextual information, either from
-# defaults provided with the ambient_pragmas method,
-# or from perl's own defaults otherwise.
-sub init {
- my $self = shift;
-
- $self->{'arybase'} = $self->{'ambient_arybase'};
- $self->{'warnings'} = defined ($self->{'ambient_warnings'})
- ? $self->{'ambient_warnings'} & WARN_MASK
- : undef;
- $self->{'hints'} = $self->{'ambient_hints'};
- $self->{'hints'} &= 0xFF if $] < 5.009;
- $self->{'hinthash'} = $self->{'ambient_hinthash'};
-
- # also a convenient place to clear out subs_declared
- delete $self->{'subs_declared'};
-}
-
-sub compile {
- my(@args) = @_;
- return sub {
- my $self = B::Deparse->new(@args);
- # First deparse command-line args
- if (defined $^I) { # deparse -i
- print q(BEGIN { $^I = ).perlstring($^I).qq(; }\n);
- }
- if ($^W) { # deparse -w
- print qq(BEGIN { \$^W = $^W; }\n);
- }
- if ($/ ne "\n" or defined $O::savebackslash) { # deparse -l and -0
- my $fs = perlstring($/) || 'undef';
- my $bs = perlstring($O::savebackslash) || 'undef';
- print qq(BEGIN { \$/ = $fs; \$\\ = $bs; }\n);
- }
- my @BEGINs = B::begin_av->isa("B::AV") ? B::begin_av->ARRAY : ();
- my @UNITCHECKs = B::unitcheck_av->isa("B::AV")
- ? B::unitcheck_av->ARRAY
- : ();
- my @CHECKs = B::check_av->isa("B::AV") ? B::check_av->ARRAY : ();
- my @INITs = B::init_av->isa("B::AV") ? B::init_av->ARRAY : ();
- my @ENDs = B::end_av->isa("B::AV") ? B::end_av->ARRAY : ();
- for my $block (@BEGINs, @UNITCHECKs, @CHECKs, @INITs, @ENDs) {
- $self->todo($block, 0);
- }
- $self->stash_subs();
- local($SIG{"__DIE__"}) =
- sub {
- if ($self->{'curcop'}) {
- my $cop = $self->{'curcop'};
- my($line, $file) = ($cop->line, $cop->file);
- print STDERR "While deparsing $file near line $line,\n";
- }
- };
- $self->{'curcv'} = main_cv;
- $self->{'curcvlex'} = undef;
- print $self->print_protos;
- @{$self->{'subs_todo'}} =
- sort {$a->[0] <=> $b->[0]} @{$self->{'subs_todo'}};
- print $self->indent($self->deparse_root(main_root)), "\n"
- unless null main_root;
- my @text;
- while (scalar(@{$self->{'subs_todo'}})) {
- push @text, $self->next_todo;
- }
- print $self->indent(join("", @text)), "\n" if @text;
-
- # Print __DATA__ section, if necessary
- no strict 'refs';
- my $laststash = defined $self->{'curcop'}
- ? $self->{'curcop'}->stash->NAME : $self->{'curstash'};
- if (defined *{$laststash."::DATA"}{IO}) {
- print "package $laststash;\n"
- unless $laststash eq $self->{'curstash'};
- print "__DATA__\n";
- print readline(*{$laststash."::DATA"});
- }
- }
-}
-
-sub coderef2text {
- my $self = shift;
- my $sub = shift;
- croak "Usage: ->coderef2text(CODEREF)" unless UNIVERSAL::isa($sub, "CODE");
-
- $self->init();
- return $self->indent($self->deparse_sub(svref_2object($sub)));
-}
-
-sub ambient_pragmas {
- my $self = shift;
- my ($arybase, $hint_bits, $warning_bits, $hinthash) = (0, 0);
-
- while (@_ > 1) {
- my $name = shift();
- my $val = shift();
-
- if ($name eq 'strict') {
- require strict;
-
- if ($val eq 'none') {
- $hint_bits &= ~strict::bits(qw/refs subs vars/);
- next();
- }
-
- my @names;
- if ($val eq "all") {
- @names = qw/refs subs vars/;
- }
- elsif (ref $val) {
- @names = @$val;
- }
- else {
- @names = split' ', $val;
- }
- $hint_bits |= strict::bits(@names);
- }
-
- elsif ($name eq '$[') {
- $arybase = $val;
- }
-
- elsif ($name eq 'integer'
- || $name eq 'bytes'
- || $name eq 'utf8') {
- require "$name.pm";
- if ($val) {
- $hint_bits |= ${$::{"${name}::"}{"hint_bits"}};
- }
- else {
- $hint_bits &= ~${$::{"${name}::"}{"hint_bits"}};
- }
- }
-
- elsif ($name eq 're') {
- require re;
- if ($val eq 'none') {
- $hint_bits &= ~re::bits(qw/taint eval/);
- next();
- }
-
- my @names;
- if ($val eq 'all') {
- @names = qw/taint eval/;
- }
- elsif (ref $val) {
- @names = @$val;
- }
- else {
- @names = split' ',$val;
- }
- $hint_bits |= re::bits(@names);
- }
-
- elsif ($name eq 'warnings') {
- if ($val eq 'none') {
- $warning_bits = $warnings::NONE;
- next();
- }
-
- my @names;
- if (ref $val) {
- @names = @$val;
- }
- else {
- @names = split/\s+/, $val;
- }
-
- $warning_bits = $warnings::NONE if !defined ($warning_bits);
- $warning_bits |= warnings::bits(@names);
- }
-
- elsif ($name eq 'warning_bits') {
- $warning_bits = $val;
- }
-
- elsif ($name eq 'hint_bits') {
- $hint_bits = $val;
- }
-
- elsif ($name eq '%^H') {
- $hinthash = $val;
- }
-
- else {
- croak "Unknown pragma type: $name";
- }
- }
- if (@_) {
- croak "The ambient_pragmas method expects an even number of args";
- }
-
- $self->{'ambient_arybase'} = $arybase;
- $self->{'ambient_warnings'} = $warning_bits;
- $self->{'ambient_hints'} = $hint_bits;
- $self->{'ambient_hinthash'} = $hinthash;
-}
-
-# This method is the inner loop, so try to keep it simple
-sub deparse {
- my $self = shift;
- my($op, $cx) = @_;
-
- Carp::confess("Null op in deparse") if !defined($op)
- || class($op) eq "NULL";
- my $meth = "pp_" . $op->name;
- return $self->$meth($op, $cx);
-}
-
-sub indent {
- my $self = shift;
- my $txt = shift;
- my @lines = split(/\n/, $txt);
- my $leader = "";
- my $level = 0;
- my $line;
- for $line (@lines) {
- my $cmd = substr($line, 0, 1);
- if ($cmd eq "\t" or $cmd eq "\b") {
- $level += ($cmd eq "\t" ? 1 : -1) * $self->{'indent_size'};
- if ($self->{'use_tabs'}) {
- $leader = "\t" x ($level / 8) . " " x ($level % 8);
- } else {
- $leader = " " x $level;
- }
- $line = substr($line, 1);
- }
- if (substr($line, 0, 1) eq "\f") {
- $line = substr($line, 1); # no indent
- } else {
- $line = $leader . $line;
- }
- $line =~ s/\cK;?//g;
- }
- return join("\n", @lines);
-}
-
-sub deparse_sub {
- my $self = shift;
- my $cv = shift;
- my $proto = "";
-Carp::confess("NULL in deparse_sub") if !defined($cv) || $cv->isa("B::NULL");
-Carp::confess("SPECIAL in deparse_sub") if $cv->isa("B::SPECIAL");
- local $self->{'curcop'} = $self->{'curcop'};
- if ($cv->FLAGS & SVf_POK) {
- $proto = "(". $cv->PV . ") ";
- }
- if ($cv->CvFLAGS & (CVf_METHOD|CVf_LOCKED|CVf_LVALUE)) {
- $proto .= ": ";
- $proto .= "lvalue " if $cv->CvFLAGS & CVf_LVALUE;
- $proto .= "locked " if $cv->CvFLAGS & CVf_LOCKED;
- $proto .= "method " if $cv->CvFLAGS & CVf_METHOD;
- }
-
- local($self->{'curcv'}) = $cv;
- local($self->{'curcvlex'});
- local(@$self{qw'curstash warnings hints hinthash'})
- = @$self{qw'curstash warnings hints hinthash'};
- my $body;
- if (not null $cv->ROOT) {
- my $lineseq = $cv->ROOT->first;
- if ($lineseq->name eq "lineseq") {
- my @ops;
- for(my$o=$lineseq->first; $$o; $o=$o->sibling) {
- push @ops, $o;
- }
- $body = $self->lineseq(undef, @ops).";";
- my $scope_en = $self->find_scope_en($lineseq);
- if (defined $scope_en) {
- my $subs = join"", $self->seq_subs($scope_en);
- $body .= ";\n$subs" if length($subs);
- }
- }
- else {
- $body = $self->deparse($cv->ROOT->first, 0);
- }
- }
- else {
- my $sv = $cv->const_sv;
- if ($$sv) {
- # uh-oh. inlinable sub... format it differently
- return $proto . "{ " . $self->const($sv, 0) . " }\n";
- } else { # XSUB? (or just a declaration)
- return "$proto;\n";
- }
- }
- return $proto ."{\n\t$body\n\b}" ."\n";
-}
-
-sub deparse_format {
- my $self = shift;
- my $form = shift;
- my @text;
- local($self->{'curcv'}) = $form;
- local($self->{'curcvlex'});
- local($self->{'in_format'}) = 1;
- local(@$self{qw'curstash warnings hints hinthash'})
- = @$self{qw'curstash warnings hints hinthash'};
- my $op = $form->ROOT;
- my $kid;
- return "\f." if $op->first->name eq 'stub'
- || $op->first->name eq 'nextstate';
- $op = $op->first->first; # skip leavewrite, lineseq
- while (not null $op) {
- $op = $op->sibling; # skip nextstate
- my @exprs;
- $kid = $op->first->sibling; # skip pushmark
- push @text, "\f".$self->const_sv($kid)->PV;
- $kid = $kid->sibling;
- for (; not null $kid; $kid = $kid->sibling) {
- push @exprs, $self->deparse($kid, 0);
- }
- push @text, "\f".join(", ", @exprs)."\n" if @exprs;
- $op = $op->sibling;
- }
- return join("", @text) . "\f.";
-}
-
-sub is_scope {
- my $op = shift;
- return $op->name eq "leave" || $op->name eq "scope"
- || $op->name eq "lineseq"
- || ($op->name eq "null" && class($op) eq "UNOP"
- && (is_scope($op->first) || $op->first->name eq "enter"));
-}
-
-sub is_state {
- my $name = $_[0]->name;
- return $name eq "nextstate" || $name eq "dbstate" || $name eq "setstate";
-}
-
-sub is_miniwhile { # check for one-line loop (`foo() while $y--')
- my $op = shift;
- return (!null($op) and null($op->sibling)
- and $op->name eq "null" and class($op) eq "UNOP"
- and (($op->first->name =~ /^(and|or)$/
- and $op->first->first->sibling->name eq "lineseq")
- or ($op->first->name eq "lineseq"
- and not null $op->first->first->sibling
- and $op->first->first->sibling->name eq "unstack")
- ));
-}
-
-# Check if the op and its sibling are the initialization and the rest of a
-# for (..;..;..) { ... } loop
-sub is_for_loop {
- my $op = shift;
- # This OP might be almost anything, though it won't be a
- # nextstate. (It's the initialization, so in the canonical case it
- # will be an sassign.) The sibling is a lineseq whose first child
- # is a nextstate and whose second is a leaveloop.
- my $lseq = $op->sibling;
- if (!is_state $op and !null($lseq) and $lseq->name eq "lineseq") {
- if ($lseq->first && !null($lseq->first) && is_state($lseq->first)
- && (my $sib = $lseq->first->sibling)) {
- return (!null($sib) && $sib->name eq "leaveloop");
- }
- }
- return 0;
-}
-
-sub is_scalar {
- my $op = shift;
- return ($op->name eq "rv2sv" or
- $op->name eq "padsv" or
- $op->name eq "gv" or # only in array/hash constructs
- $op->flags & OPf_KIDS && !null($op->first)
- && $op->first->name eq "gvsv");
-}
-
-sub maybe_parens {
- my $self = shift;
- my($text, $cx, $prec) = @_;
- if ($prec < $cx # unary ops nest just fine
- or $prec == $cx and $cx != 4 and $cx != 16 and $cx != 21
- or $self->{'parens'})
- {
- $text = "($text)";
- # In a unop, let parent reuse our parens; see maybe_parens_unop
- $text = "\cS" . $text if $cx == 16;
- return $text;
- } else {
- return $text;
- }
-}
-
-# same as above, but get around the `if it looks like a function' rule
-sub maybe_parens_unop {
- my $self = shift;
- my($name, $kid, $cx) = @_;
- if ($cx > 16 or $self->{'parens'}) {
- $kid = $self->deparse($kid, 1);
- if ($name eq "umask" && $kid =~ /^\d+$/) {
- $kid = sprintf("%#o", $kid);
- }
- return "$name($kid)";
- } else {
- $kid = $self->deparse($kid, 16);
- if ($name eq "umask" && $kid =~ /^\d+$/) {
- $kid = sprintf("%#o", $kid);
- }
- if (substr($kid, 0, 1) eq "\cS") {
- # use kid's parens
- return $name . substr($kid, 1);
- } elsif (substr($kid, 0, 1) eq "(") {
- # avoid looks-like-a-function trap with extra parens
- # (`+' can lead to ambiguities)
- return "$name(" . $kid . ")";
- } else {
- return "$name $kid";
- }
- }
-}
-
-sub maybe_parens_func {
- my $self = shift;
- my($func, $text, $cx, $prec) = @_;
- if ($prec <= $cx or substr($text, 0, 1) eq "(" or $self->{'parens'}) {
- return "$func($text)";
- } else {
- return "$func $text";
- }
-}
-
-sub maybe_local {
- my $self = shift;
- my($op, $cx, $text) = @_;
- my $our_intro = ($op->name =~ /^(gv|rv2)[ash]v$/) ? OPpOUR_INTRO : 0;
- if ($op->private & (OPpLVAL_INTRO|$our_intro)
- and not $self->{'avoid_local'}{$$op}) {
- my $our_local = ($op->private & OPpLVAL_INTRO) ? "local" : "our";
- if( $our_local eq 'our' ) {
- # XXX This assertion fails code with non-ASCII identifiers,
- # like ./ext/Encode/t/jperl.t
- die "Unexpected our($text)\n" unless $text =~ /^\W(\w+::)*\w+\z/;
- $text =~ s/(\w+::)+//;
- }
- if (want_scalar($op)) {
- return "$our_local $text";
- } else {
- return $self->maybe_parens_func("$our_local", $text, $cx, 16);
- }
- } else {
- return $text;
- }
-}
-
-sub maybe_targmy {
- my $self = shift;
- my($op, $cx, $func, @args) = @_;
- if ($op->private & OPpTARGET_MY) {
- my $var = $self->padname($op->targ);
- my $val = $func->($self, $op, 7, @args);
- return $self->maybe_parens("$var = $val", $cx, 7);
- } else {
- return $func->($self, $op, $cx, @args);
- }
-}
-
-sub padname_sv {
- my $self = shift;
- my $targ = shift;
- return $self->{'curcv'}->PADLIST->ARRAYelt(0)->ARRAYelt($targ);
-}
-
-sub maybe_my {
- my $self = shift;
- my($op, $cx, $text) = @_;
- if ($op->private & OPpLVAL_INTRO and not $self->{'avoid_local'}{$$op}) {
- my $my = $op->private & OPpPAD_STATE ? "state" : "my";
- if (want_scalar($op)) {
- return "$my $text";
- } else {
- return $self->maybe_parens_func($my, $text, $cx, 16);
- }
- } else {
- return $text;
- }
-}
-
-# The following OPs don't have functions:
-
-# pp_padany -- does not exist after parsing
-
-sub AUTOLOAD {
- if ($AUTOLOAD =~ s/^.*::pp_//) {
- warn "unexpected OP_".uc $AUTOLOAD;
- return "XXX";
- } else {
- die "Undefined subroutine $AUTOLOAD called";
- }
-}
-
-sub DESTROY {} # Do not AUTOLOAD
-
-# $root should be the op which represents the root of whatever
-# we're sequencing here. If it's undefined, then we don't append
-# any subroutine declarations to the deparsed ops, otherwise we
-# append appropriate declarations.
-sub lineseq {
- my($self, $root, @ops) = @_;
- my($expr, @exprs);
-
- my $out_cop = $self->{'curcop'};
- my $out_seq = defined($out_cop) ? $out_cop->cop_seq : undef;
- my $limit_seq;
- if (defined $root) {
- $limit_seq = $out_seq;
- my $nseq;
- $nseq = $self->find_scope_st($root->sibling) if ${$root->sibling};
- $limit_seq = $nseq if !defined($limit_seq)
- or defined($nseq) && $nseq < $limit_seq;
- }
- $limit_seq = $self->{'limit_seq'}
- if defined($self->{'limit_seq'})
- && (!defined($limit_seq) || $self->{'limit_seq'} < $limit_seq);
- local $self->{'limit_seq'} = $limit_seq;
-
- $self->walk_lineseq($root, \@ops,
- sub { push @exprs, $_[0]} );
-
- my $body = join(";\n", grep {length} @exprs);
- my $subs = "";
- if (defined $root && defined $limit_seq && !$self->{'in_format'}) {
- $subs = join "\n", $self->seq_subs($limit_seq);
- }
- return join(";\n", grep {length} $body, $subs);
-}
-
-sub scopeop {
- my($real_block, $self, $op, $cx) = @_;
- my $kid;
- my @kids;
-
- local(@$self{qw'curstash warnings hints hinthash'})
- = @$self{qw'curstash warnings hints hinthash'} if $real_block;
- if ($real_block) {
- $kid = $op->first->sibling; # skip enter
- if (is_miniwhile($kid)) {
- my $top = $kid->first;
- my $name = $top->name;
- if ($name eq "and") {
- $name = "while";
- } elsif ($name eq "or") {
- $name = "until";
- } else { # no conditional -> while 1 or until 0
- return $self->deparse($top->first, 1) . " while 1";
- }
- my $cond = $top->first;
- my $body = $cond->sibling->first; # skip lineseq
- $cond = $self->deparse($cond, 1);
- $body = $self->deparse($body, 1);
- return "$body $name $cond";
- }
- } else {
- $kid = $op->first;
- }
- for (; !null($kid); $kid = $kid->sibling) {
- push @kids, $kid;
- }
- if ($cx > 0) { # inside an expression, (a do {} while for lineseq)
- return "do {\n\t" . $self->lineseq($op, @kids) . "\n\b}";
- } else {
- my $lineseq = $self->lineseq($op, @kids);
- return (length ($lineseq) ? "$lineseq;" : "");
- }
-}
-
-sub pp_scope { scopeop(0, @_); }
-sub pp_lineseq { scopeop(0, @_); }
-sub pp_leave { scopeop(1, @_); }
-
-# This is a special case of scopeop and lineseq, for the case of the
-# main_root. The difference is that we print the output statements as
-# soon as we get them, for the sake of impatient users.
-sub deparse_root {
- my $self = shift;
- my($op) = @_;
- local(@$self{qw'curstash warnings hints hinthash'})
- = @$self{qw'curstash warnings hints hinthash'};
- my @kids;
- return if null $op->first; # Can happen, e.g., for Bytecode without -k
- for (my $kid = $op->first->sibling; !null($kid); $kid = $kid->sibling) {
- push @kids, $kid;
- }
- $self->walk_lineseq($op, \@kids,
- sub { print $self->indent($_[0].';');
- print "\n" unless $_[1] == $#kids;
- });
-}
-
-sub walk_lineseq {
- my ($self, $op, $kids, $callback) = @_;
- my @kids = @$kids;
- for (my $i = 0; $i < @kids; $i++) {
- my $expr = "";
- if (is_state $kids[$i]) {
- $expr = $self->deparse($kids[$i++], 0);
- if ($i > $#kids) {
- $callback->($expr, $i);
- last;
- }
- }
- if (is_for_loop($kids[$i])) {
- $callback->($expr . $self->for_loop($kids[$i], 0), $i++);
- next;
- }
- $expr .= $self->deparse($kids[$i], (@kids != 1)/2);
- $expr =~ s/;\n?\z//;
- $callback->($expr, $i);
- }
-}
-
-# The BEGIN {} is used here because otherwise this code isn't executed
-# when you run B::Deparse on itself.
-my %globalnames;
-BEGIN { map($globalnames{$_}++, "SIG", "STDIN", "STDOUT", "STDERR", "INC",
- "ENV", "ARGV", "ARGVOUT", "_"); }
-
-sub gv_name {
- my $self = shift;
- my $gv = shift;
-Carp::confess() unless ref($gv) eq "B::GV";
- my $stash = $gv->STASH->NAME;
- my $name = $gv->SAFENAME;
- if ($stash eq 'main' && $name =~ /^::/) {
- $stash = '::';
- }
- elsif (($stash eq 'main' && $globalnames{$name})
- or ($stash eq $self->{'curstash'} && !$globalnames{$name}
- && ($stash eq 'main' || $name !~ /::/))
- or $name =~ /^[^A-Za-z_:]/)
- {
- $stash = "";
- } else {
- $stash = $stash . "::";
- }
- if ($name =~ /^(\^..|{)/) {
- $name = "{$name}"; # ${^WARNING_BITS}, etc and ${
- }
- return $stash . $name;
-}
-
-# Return the name to use for a stash variable.
-# If a lexical with the same name is in scope, it may need to be
-# fully-qualified.
-sub stash_variable {
- my ($self, $prefix, $name) = @_;
-
- return "$prefix$name" if $name =~ /::/;
-
- unless ($prefix eq '$' || $prefix eq '@' || #'
- $prefix eq '%' || $prefix eq '$#') {
- return "$prefix$name";
- }
-
- my $v = ($prefix eq '$#' ? '@' : $prefix) . $name;
- return $prefix .$self->{'curstash'}.'::'. $name if $self->lex_in_scope($v);
- return "$prefix$name";
-}
-
-sub lex_in_scope {
- my ($self, $name) = @_;
- $self->populate_curcvlex() if !defined $self->{'curcvlex'};
-
- return 0 if !defined($self->{'curcop'});
- my $seq = $self->{'curcop'}->cop_seq;
- return 0 if !exists $self->{'curcvlex'}{$name};
- for my $a (@{$self->{'curcvlex'}{$name}}) {
- my ($st, $en) = @$a;
- return 1 if $seq > $st && $seq <= $en;
- }
- return 0;
-}
-
-sub populate_curcvlex {
- my $self = shift;
- for (my $cv = $self->{'curcv'}; class($cv) eq "CV"; $cv = $cv->OUTSIDE) {
- my $padlist = $cv->PADLIST;
- # an undef CV still in lexical chain
- next if class($padlist) eq "SPECIAL";
- my @padlist = $padlist->ARRAY;
- my @ns = $padlist[0]->ARRAY;
-
- for (my $i=0; $i<@ns; ++$i) {
- next if class($ns[$i]) eq "SPECIAL";
- next if $ns[$i]->FLAGS & SVpad_OUR; # Skip "our" vars
- if (class($ns[$i]) eq "PV") {
- # Probably that pesky lexical @_
- next;
- }
- my $name = $ns[$i]->PVX;
- my ($seq_st, $seq_en) =
- ($ns[$i]->FLAGS & SVf_FAKE)
- ? (0, 999999)
- : ($ns[$i]->COP_SEQ_RANGE_LOW, $ns[$i]->COP_SEQ_RANGE_HIGH);
-
- push @{$self->{'curcvlex'}{$name}}, [$seq_st, $seq_en];
- }
- }
-}
-
-sub find_scope_st { ((find_scope(@_))[0]); }
-sub find_scope_en { ((find_scope(@_))[1]); }
-
-# Recurses down the tree, looking for pad variable introductions and COPs
-sub find_scope {
- my ($self, $op, $scope_st, $scope_en) = @_;
- carp("Undefined op in find_scope") if !defined $op;
- return ($scope_st, $scope_en) unless $op->flags & OPf_KIDS;
-
- my @queue = ($op);
- while(my $op = shift @queue ) {
- for (my $o=$op->first; $$o; $o=$o->sibling) {
- if ($o->name =~ /^pad.v$/ && $o->private & OPpLVAL_INTRO) {
- my $s = int($self->padname_sv($o->targ)->COP_SEQ_RANGE_LOW);
- my $e = $self->padname_sv($o->targ)->COP_SEQ_RANGE_HIGH;
- $scope_st = $s if !defined($scope_st) || $s < $scope_st;
- $scope_en = $e if !defined($scope_en) || $e > $scope_en;
- return ($scope_st, $scope_en);
- }
- elsif (is_state($o)) {
- my $c = $o->cop_seq;
- $scope_st = $c if !defined($scope_st) || $c < $scope_st;
- $scope_en = $c if !defined($scope_en) || $c > $scope_en;
- return ($scope_st, $scope_en);
- }
- elsif ($o->flags & OPf_KIDS) {
- unshift (@queue, $o);
- }
- }
- }
-
- return ($scope_st, $scope_en);
-}
-
-# Returns a list of subs which should be inserted before the COP
-sub cop_subs {
- my ($self, $op, $out_seq) = @_;
- my $seq = $op->cop_seq;
- # If we have nephews, then our sequence number indicates
- # the cop_seq of the end of some sort of scope.
- if (class($op->sibling) ne "NULL" && $op->sibling->flags & OPf_KIDS
- and my $nseq = $self->find_scope_st($op->sibling) ) {
- $seq = $nseq;
- }
- $seq = $out_seq if defined($out_seq) && $out_seq < $seq;
- return $self->seq_subs($seq);
-}
-
-sub seq_subs {
- my ($self, $seq) = @_;
- my @text;
-#push @text, "# ($seq)\n";
-
- return "" if !defined $seq;
- while (scalar(@{$self->{'subs_todo'}})
- and $seq > $self->{'subs_todo'}[0][0]) {
- push @text, $self->next_todo;
- }
- return @text;
-}
-
-# Notice how subs and formats are inserted between statements here;
-# also $[ assignments and pragmas.
-sub pp_nextstate {
- my $self = shift;
- my($op, $cx) = @_;
- $self->{'curcop'} = $op;
- my @text;
- push @text, $self->cop_subs($op);
- push @text, $op->label . ": " if $op->label;
- my $stash = $op->stashpv;
- if ($stash ne $self->{'curstash'}) {
- push @text, "package $stash;\n";
- $self->{'curstash'} = $stash;
- }
-
- if ($self->{'arybase'} != $op->arybase) {
- push @text, '$[ = '. $op->arybase .";\n";
- $self->{'arybase'} = $op->arybase;
- }
-
- my $warnings = $op->warnings;
- my $warning_bits;
- if ($warnings->isa("B::SPECIAL") && $$warnings == 4) {
- $warning_bits = $warnings::Bits{"all"} & WARN_MASK;
- }
- elsif ($warnings->isa("B::SPECIAL") && $$warnings == 5) {
- $warning_bits = $warnings::NONE;
- }
- elsif ($warnings->isa("B::SPECIAL")) {
- $warning_bits = undef;
- }
- else {
- $warning_bits = $warnings->PV & WARN_MASK;
- }
-
- if (defined ($warning_bits) and
- !defined($self->{warnings}) || $self->{'warnings'} ne $warning_bits) {
- push @text, declare_warnings($self->{'warnings'}, $warning_bits);
- $self->{'warnings'} = $warning_bits;
- }
-
- if ($self->{'hints'} != $op->hints) {
- push @text, declare_hints($self->{'hints'}, $op->hints);
- $self->{'hints'} = $op->hints;
- }
-
- # hack to check that the hint hash hasn't changed
- if ($] > 5.009 &&
- "@{[sort %{$self->{'hinthash'} || {}}]}"
- ne "@{[sort %{$op->hints_hash->HASH || {}}]}") {
- push @text, declare_hinthash($self->{'hinthash'}, $op->hints_hash->HASH, $self->{indent_size});
- $self->{'hinthash'} = $op->hints_hash->HASH;
- }
-
- # This should go after of any branches that add statements, to
- # increase the chances that it refers to the same line it did in
- # the original program.
- if ($self->{'linenums'}) {
- push @text, "\f#line " . $op->line .
- ' "' . $op->file, qq'"\n';
- }
-
- return join("", @text);
-}
-
-sub declare_warnings {
- my ($from, $to) = @_;
- if (($to & WARN_MASK) eq (warnings::bits("all") & WARN_MASK)) {
- return "use warnings;\n";
- }
- elsif (($to & WARN_MASK) eq ("\0"x length($to) & WARN_MASK)) {
- return "no warnings;\n";
- }
- return "BEGIN {\${^WARNING_BITS} = ".perlstring($to)."}\n";
-}
-
-sub declare_hints {
- my ($from, $to) = @_;
- my $use = $to & ~$from;
- my $no = $from & ~$to;
- my $decls = "";
- for my $pragma (hint_pragmas($use)) {
- $decls .= "use $pragma;\n";
- }
- for my $pragma (hint_pragmas($no)) {
- $decls .= "no $pragma;\n";
- }
- return $decls;
-}
-
-# Internal implementation hints that the core sets automatically, so don't need
-# (or want) to be passed back to the user
-my %ignored_hints = (
- 'open<' => 1,
- 'open>' => 1,
- ':' => 1,
-);
-
-sub declare_hinthash {
- my ($from, $to, $indent) = @_;
- my @decls;
- for my $key (keys %$to) {
- next if $ignored_hints{$key};
- if (!defined $from->{$key} or $from->{$key} ne $to->{$key}) {
- push @decls, qq(\$^H{'$key'} = q($to->{$key}););
- }
- }
- for my $key (keys %$from) {
- next if $ignored_hints{$key};
- if (!exists $to->{$key}) {
- push @decls, qq(delete \$^H{'$key'};);
- }
- }
- @decls or return '';
- return join("\n" . (" " x $indent), "BEGIN {", @decls) . "\n}\n";
-}
-
-sub hint_pragmas {
- my ($bits) = @_;
- my @pragmas;
- push @pragmas, "integer" if $bits & 0x1;
- push @pragmas, "strict 'refs'" if $bits & 0x2;
- push @pragmas, "bytes" if $bits & 0x8;
- return @pragmas;
-}
-
-sub pp_dbstate { pp_nextstate(@_) }
-sub pp_setstate { pp_nextstate(@_) }
-
-sub pp_unstack { return "" } # see also leaveloop
-
-sub baseop {
- my $self = shift;
- my($op, $cx, $name) = @_;
- return $name;
-}
-
-sub pp_stub {
- my $self = shift;
- my($op, $cx, $name) = @_;
- if ($cx >= 1) {
- return "()";
- }
- else {
- return "();";
- }
-}
-sub pp_wantarray { baseop(@_, "wantarray") }
-sub pp_fork { baseop(@_, "fork") }
-sub pp_wait { maybe_targmy(@_, \&baseop, "wait") }
-sub pp_getppid { maybe_targmy(@_, \&baseop, "getppid") }
-sub pp_time { maybe_targmy(@_, \&baseop, "time") }
-sub pp_tms { baseop(@_, "times") }
-sub pp_ghostent { baseop(@_, "gethostent") }
-sub pp_gnetent { baseop(@_, "getnetent") }
-sub pp_gprotoent { baseop(@_, "getprotoent") }
-sub pp_gservent { baseop(@_, "getservent") }
-sub pp_ehostent { baseop(@_, "endhostent") }
-sub pp_enetent { baseop(@_, "endnetent") }
-sub pp_eprotoent { baseop(@_, "endprotoent") }
-sub pp_eservent { baseop(@_, "endservent") }
-sub pp_gpwent { baseop(@_, "getpwent") }
-sub pp_spwent { baseop(@_, "setpwent") }
-sub pp_epwent { baseop(@_, "endpwent") }
-sub pp_ggrent { baseop(@_, "getgrent") }
-sub pp_sgrent { baseop(@_, "setgrent") }
-sub pp_egrent { baseop(@_, "endgrent") }
-sub pp_getlogin { baseop(@_, "getlogin") }
-
-sub POSTFIX () { 1 }
-
-# I couldn't think of a good short name, but this is the category of
-# symbolic unary operators with interesting precedence
-
-sub pfixop {
- my $self = shift;
- my($op, $cx, $name, $prec, $flags) = (@_, 0);
- my $kid = $op->first;
- $kid = $self->deparse($kid, $prec);
- return $self->maybe_parens(($flags & POSTFIX) ? "$kid$name" : "$name$kid",
- $cx, $prec);
-}
-
-sub pp_preinc { pfixop(@_, "++", 23) }
-sub pp_predec { pfixop(@_, "--", 23) }
-sub pp_postinc { maybe_targmy(@_, \&pfixop, "++", 23, POSTFIX) }
-sub pp_postdec { maybe_targmy(@_, \&pfixop, "--", 23, POSTFIX) }
-sub pp_i_preinc { pfixop(@_, "++", 23) }
-sub pp_i_predec { pfixop(@_, "--", 23) }
-sub pp_i_postinc { maybe_targmy(@_, \&pfixop, "++", 23, POSTFIX) }
-sub pp_i_postdec { maybe_targmy(@_, \&pfixop, "--", 23, POSTFIX) }
-sub pp_complement { maybe_targmy(@_, \&pfixop, "~", 21) }
-
-sub pp_negate { maybe_targmy(@_, \&real_negate) }
-sub real_negate {
- my $self = shift;
- my($op, $cx) = @_;
- if ($op->first->name =~ /^(i_)?negate$/) {
- # avoid --$x
- $self->pfixop($op, $cx, "-", 21.5);
- } else {
- $self->pfixop($op, $cx, "-", 21);
- }
-}
-sub pp_i_negate { pp_negate(@_) }
-
-sub pp_not {
- my $self = shift;
- my($op, $cx) = @_;
- if ($cx <= 4) {
- $self->pfixop($op, $cx, "not ", 4);
- } else {
- $self->pfixop($op, $cx, "!", 21);
- }
-}
-
-sub unop {
- my $self = shift;
- my($op, $cx, $name) = @_;
- my $kid;
- if ($op->flags & OPf_KIDS) {
- $kid = $op->first;
- my $builtinname = $name;
- $builtinname =~ /^CORE::/ or $builtinname = "CORE::$name";
- if (defined prototype($builtinname)
- && prototype($builtinname) =~ /^;?\*/
- && $kid->name eq "rv2gv") {
- $kid = $kid->first;
- }
-
- return $self->maybe_parens_unop($name, $kid, $cx);
- } else {
- return $name . ($op->flags & OPf_SPECIAL ? "()" : "");
- }
-}
-
-sub pp_chop { maybe_targmy(@_, \&unop, "chop") }
-sub pp_chomp { maybe_targmy(@_, \&unop, "chomp") }
-sub pp_schop { maybe_targmy(@_, \&unop, "chop") }
-sub pp_schomp { maybe_targmy(@_, \&unop, "chomp") }
-sub pp_defined { unop(@_, "defined") }
-sub pp_undef { unop(@_, "undef") }
-sub pp_study { unop(@_, "study") }
-sub pp_ref { unop(@_, "ref") }
-sub pp_pos { maybe_local(@_, unop(@_, "pos")) }
-
-sub pp_sin { maybe_targmy(@_, \&unop, "sin") }
-sub pp_cos { maybe_targmy(@_, \&unop, "cos") }
-sub pp_rand { maybe_targmy(@_, \&unop, "rand") }
-sub pp_srand { unop(@_, "srand") }
-sub pp_exp { maybe_targmy(@_, \&unop, "exp") }
-sub pp_log { maybe_targmy(@_, \&unop, "log") }
-sub pp_sqrt { maybe_targmy(@_, \&unop, "sqrt") }
-sub pp_int { maybe_targmy(@_, \&unop, "int") }
-sub pp_hex { maybe_targmy(@_, \&unop, "hex") }
-sub pp_oct { maybe_targmy(@_, \&unop, "oct") }
-sub pp_abs { maybe_targmy(@_, \&unop, "abs") }
-
-sub pp_length { maybe_targmy(@_, \&unop, "length") }
-sub pp_ord { maybe_targmy(@_, \&unop, "ord") }
-sub pp_chr { maybe_targmy(@_, \&unop, "chr") }
-
-sub pp_each { unop(@_, "each") }
-sub pp_values { unop(@_, "values") }
-sub pp_keys { unop(@_, "keys") }
-sub pp_aeach { unop(@_, "each") }
-sub pp_avalues { unop(@_, "values") }
-sub pp_akeys { unop(@_, "keys") }
-sub pp_pop { unop(@_, "pop") }
-sub pp_shift { unop(@_, "shift") }
-
-sub pp_caller { unop(@_, "caller") }
-sub pp_reset { unop(@_, "reset") }
-sub pp_exit { unop(@_, "exit") }
-sub pp_prototype { unop(@_, "prototype") }
-
-sub pp_close { unop(@_, "close") }
-sub pp_fileno { unop(@_, "fileno") }
-sub pp_umask { unop(@_, "umask") }
-sub pp_untie { unop(@_, "untie") }
-sub pp_tied { unop(@_, "tied") }
-sub pp_dbmclose { unop(@_, "dbmclose") }
-sub pp_getc { unop(@_, "getc") }
-sub pp_eof { unop(@_, "eof") }
-sub pp_tell { unop(@_, "tell") }
-sub pp_getsockname { unop(@_, "getsockname") }
-sub pp_getpeername { unop(@_, "getpeername") }
-
-sub pp_chdir { maybe_targmy(@_, \&unop, "chdir") }
-sub pp_chroot { maybe_targmy(@_, \&unop, "chroot") }
-sub pp_readlink { unop(@_, "readlink") }
-sub pp_rmdir { maybe_targmy(@_, \&unop, "rmdir") }
-sub pp_readdir { unop(@_, "readdir") }
-sub pp_telldir { unop(@_, "telldir") }
-sub pp_rewinddir { unop(@_, "rewinddir") }
-sub pp_closedir { unop(@_, "closedir") }
-sub pp_getpgrp { maybe_targmy(@_, \&unop, "getpgrp") }
-sub pp_localtime { unop(@_, "localtime") }
-sub pp_gmtime { unop(@_, "gmtime") }
-sub pp_alarm { unop(@_, "alarm") }
-sub pp_sleep { maybe_targmy(@_, \&unop, "sleep") }
-
-sub pp_dofile { unop(@_, "do") }
-sub pp_entereval { unop(@_, "eval") }
-
-sub pp_ghbyname { unop(@_, "gethostbyname") }
-sub pp_gnbyname { unop(@_, "getnetbyname") }
-sub pp_gpbyname { unop(@_, "getprotobyname") }
-sub pp_shostent { unop(@_, "sethostent") }
-sub pp_snetent { unop(@_, "setnetent") }
-sub pp_sprotoent { unop(@_, "setprotoent") }
-sub pp_sservent { unop(@_, "setservent") }
-sub pp_gpwnam { unop(@_, "getpwnam") }
-sub pp_gpwuid { unop(@_, "getpwuid") }
-sub pp_ggrnam { unop(@_, "getgrnam") }
-sub pp_ggrgid { unop(@_, "getgrgid") }
-
-sub pp_lock { unop(@_, "lock") }
-
-sub pp_continue { unop(@_, "continue"); }
-sub pp_break {
- my ($self, $op) = @_;
- return "" if $op->flags & OPf_SPECIAL;
- unop(@_, "break");
-}
-
-sub givwhen {
- my $self = shift;
- my($op, $cx, $givwhen) = @_;
-
- my $enterop = $op->first;
- my ($head, $block);
- if ($enterop->flags & OPf_SPECIAL) {
- $head = "default";
- $block = $self->deparse($enterop->first, 0);
- }
- else {
- my $cond = $enterop->first;
- my $cond_str = $self->deparse($cond, 1);
- $head = "$givwhen ($cond_str)";
- $block = $self->deparse($cond->sibling, 0);
- }
-
- return "$head {\n".
- "\t$block\n".
- "\b}\cK";
-}
-
-sub pp_leavegiven { givwhen(@_, "given"); }
-sub pp_leavewhen { givwhen(@_, "when"); }
-
-sub pp_exists {
- my $self = shift;
- my($op, $cx) = @_;
- my $arg;
- if ($op->private & OPpEXISTS_SUB) {
- # Checking for the existence of a subroutine
- return $self->maybe_parens_func("exists",
- $self->pp_rv2cv($op->first, 16), $cx, 16);
- }
- if ($op->flags & OPf_SPECIAL) {
- # Array element, not hash element
- return $self->maybe_parens_func("exists",
- $self->pp_aelem($op->first, 16), $cx, 16);
- }
- return $self->maybe_parens_func("exists", $self->pp_helem($op->first, 16),
- $cx, 16);
-}
-
-sub pp_delete {
- my $self = shift;
- my($op, $cx) = @_;
- my $arg;
- if ($op->private & OPpSLICE) {
- if ($op->flags & OPf_SPECIAL) {
- # Deleting from an array, not a hash
- return $self->maybe_parens_func("delete",
- $self->pp_aslice($op->first, 16),
- $cx, 16);
- }
- return $self->maybe_parens_func("delete",
- $self->pp_hslice($op->first, 16),
- $cx, 16);
- } else {
- if ($op->flags & OPf_SPECIAL) {
- # Deleting from an array, not a hash
- return $self->maybe_parens_func("delete",
- $self->pp_aelem($op->first, 16),
- $cx, 16);
- }
- return $self->maybe_parens_func("delete",
- $self->pp_helem($op->first, 16),
- $cx, 16);
- }
-}
-
-sub pp_require {
- my $self = shift;
- my($op, $cx) = @_;
- my $opname = $op->flags & OPf_SPECIAL ? 'CORE::require' : 'require';
- if (class($op) eq "UNOP" and $op->first->name eq "const"
- and $op->first->private & OPpCONST_BARE)
- {
- my $name = $self->const_sv($op->first)->PV;
- $name =~ s[/][::]g;
- $name =~ s/\.pm//g;
- return "$opname $name";
- } else {
- $self->unop($op, $cx, $opname);
- }
-}
-
-sub pp_scalar {
- my $self = shift;
- my($op, $cx) = @_;
- my $kid = $op->first;
- if (not null $kid->sibling) {
- # XXX Was a here-doc
- return $self->dquote($op);
- }
- $self->unop(@_, "scalar");
-}
-
-
-sub padval {
- my $self = shift;
- my $targ = shift;
- return $self->{'curcv'}->PADLIST->ARRAYelt(1)->ARRAYelt($targ);
-}
-
-sub anon_hash_or_list {
- my $self = shift;
- my($op, $cx) = @_;
-
- my($pre, $post) = @{{"anonlist" => ["[","]"],
- "anonhash" => ["{","}"]}->{$op->name}};
- my($expr, @exprs);
- $op = $op->first->sibling; # skip pushmark
- for (; !null($op); $op = $op->sibling) {
- $expr = $self->deparse($op, 6);
- push @exprs, $expr;
- }
- if ($pre eq "{" and $cx < 1) {
- # Disambiguate that it's not a block
- $pre = "+{";
- }
- return $pre . join(", ", @exprs) . $post;
-}
-
-sub pp_anonlist {
- my $self = shift;
- my ($op, $cx) = @_;
- if ($op->flags & OPf_SPECIAL) {
- return $self->anon_hash_or_list($op, $cx);
- }
- warn "Unexpected op pp_" . $op->name() . " without OPf_SPECIAL";
- return 'XXX';
-}
-
-*pp_anonhash = \&pp_anonlist;
-
-sub pp_refgen {
- my $self = shift;
- my($op, $cx) = @_;
- my $kid = $op->first;
- if ($kid->name eq "null") {
- $kid = $kid->first;
- if (!null($kid->sibling) and
- $kid->sibling->name eq "anoncode") {
- return $self->e_anoncode({ code => $self->padval($kid->sibling->targ) });
- } elsif ($kid->name eq "pushmark") {
- my $sib_name = $kid->sibling->name;
- if ($sib_name =~ /^(pad|rv2)[ah]v$/
- and not $kid->sibling->flags & OPf_REF)
- {
- # The @a in \(@a) isn't in ref context, but only when the
- # parens are there.
- return "\\(" . $self->pp_list($op->first) . ")";
- } elsif ($sib_name eq 'entersub') {
- my $text = $self->deparse($kid->sibling, 1);
- # Always show parens for \(&func()), but only with -p otherwise
- $text = "($text)" if $self->{'parens'}
- or $kid->sibling->private & OPpENTERSUB_AMPER;
- return "\\$text";
- }
- }
- }
- $self->pfixop($op, $cx, "\\", 20);
-}
-
-sub e_anoncode {
- my ($self, $info) = @_;
- my $text = $self->deparse_sub($info->{code});
- return "sub " . $text;
-}
-
-sub pp_srefgen { pp_refgen(@_) }
-
-sub pp_readline {
- my $self = shift;
- my($op, $cx) = @_;
- my $kid = $op->first;
- $kid = $kid->first if $kid->name eq "rv2gv"; # <$fh>
- return "<" . $self->deparse($kid, 1) . ">" if is_scalar($kid);
- return $self->unop($op, $cx, "readline");
-}
-
-sub pp_rcatline {
- my $self = shift;
- my($op) = @_;
- return "<" . $self->gv_name($self->gv_or_padgv($op)) . ">";
-}
-
-# Unary operators that can occur as pseudo-listops inside double quotes
-sub dq_unop {
- my $self = shift;
- my($op, $cx, $name, $prec, $flags) = (@_, 0, 0);
- my $kid;
- if ($op->flags & OPf_KIDS) {
- $kid = $op->first;
- # If there's more than one kid, the first is an ex-pushmark.
- $kid = $kid->sibling if not null $kid->sibling;
- return $self->maybe_parens_unop($name, $kid, $cx);
- } else {
- return $name . ($op->flags & OPf_SPECIAL ? "()" : "");
- }
-}
-
-sub pp_ucfirst { dq_unop(@_, "ucfirst") }
-sub pp_lcfirst { dq_unop(@_, "lcfirst") }
-sub pp_uc { dq_unop(@_, "uc") }
-sub pp_lc { dq_unop(@_, "lc") }
-sub pp_quotemeta { maybe_targmy(@_, \&dq_unop, "quotemeta") }
-
-sub loopex {
- my $self = shift;
- my ($op, $cx, $name) = @_;
- if (class($op) eq "PVOP") {
- return "$name " . $op->pv;
- } elsif (class($op) eq "OP") {
- return $name;
- } elsif (class($op) eq "UNOP") {
- # Note -- loop exits are actually exempt from the
- # looks-like-a-func rule, but a few extra parens won't hurt
- return $self->maybe_parens_unop($name, $op->first, $cx);
- }
-}
-
-sub pp_last { loopex(@_, "last") }
-sub pp_next { loopex(@_, "next") }
-sub pp_redo { loopex(@_, "redo") }
-sub pp_goto { loopex(@_, "goto") }
-sub pp_dump { loopex(@_, "dump") }
-
-sub ftst {
- my $self = shift;
- my($op, $cx, $name) = @_;
- if (class($op) eq "UNOP") {
- # Genuine `-X' filetests are exempt from the LLAFR, but not
- # l?stat(); for the sake of clarity, give'em all parens
- return $self->maybe_parens_unop($name, $op->first, $cx);
- } elsif (class($op) =~ /^(SV|PAD)OP$/) {
- return $self->maybe_parens_func($name, $self->pp_gv($op, 1), $cx, 16);
- } else { # I don't think baseop filetests ever survive ck_ftst, but...
- return $name;
- }
-}
-
-sub pp_lstat { ftst(@_, "lstat") }
-sub pp_stat { ftst(@_, "stat") }
-sub pp_ftrread { ftst(@_, "-R") }
-sub pp_ftrwrite { ftst(@_, "-W") }
-sub pp_ftrexec { ftst(@_, "-X") }
-sub pp_fteread { ftst(@_, "-r") }
-sub pp_ftewrite { ftst(@_, "-w") }
-sub pp_fteexec { ftst(@_, "-x") }
-sub pp_ftis { ftst(@_, "-e") }
-sub pp_fteowned { ftst(@_, "-O") }
-sub pp_ftrowned { ftst(@_, "-o") }
-sub pp_ftzero { ftst(@_, "-z") }
-sub pp_ftsize { ftst(@_, "-s") }
-sub pp_ftmtime { ftst(@_, "-M") }
-sub pp_ftatime { ftst(@_, "-A") }
-sub pp_ftctime { ftst(@_, "-C") }
-sub pp_ftsock { ftst(@_, "-S") }
-sub pp_ftchr { ftst(@_, "-c") }
-sub pp_ftblk { ftst(@_, "-b") }
-sub pp_ftfile { ftst(@_, "-f") }
-sub pp_ftdir { ftst(@_, "-d") }
-sub pp_ftpipe { ftst(@_, "-p") }
-sub pp_ftlink { ftst(@_, "-l") }
-sub pp_ftsuid { ftst(@_, "-u") }
-sub pp_ftsgid { ftst(@_, "-g") }
-sub pp_ftsvtx { ftst(@_, "-k") }
-sub pp_fttty { ftst(@_, "-t") }
-sub pp_fttext { ftst(@_, "-T") }
-sub pp_ftbinary { ftst(@_, "-B") }
-
-sub SWAP_CHILDREN () { 1 }
-sub ASSIGN () { 2 } # has OP= variant
-sub LIST_CONTEXT () { 4 } # Assignment is in list context
-
-my(%left, %right);
-
-sub assoc_class {
- my $op = shift;
- my $name = $op->name;
- if ($name eq "concat" and $op->first->name eq "concat") {
- # avoid spurious `=' -- see comment in pp_concat
- return "concat";
- }
- if ($name eq "null" and class($op) eq "UNOP"
- and $op->first->name =~ /^(and|x?or)$/
- and null $op->first->sibling)
- {
- # Like all conditional constructs, OP_ANDs and OP_ORs are topped
- # with a null that's used as the common end point of the two
- # flows of control. For precedence purposes, ignore it.
- # (COND_EXPRs have these too, but we don't bother with
- # their associativity).
- return assoc_class($op->first);
- }
- return $name . ($op->flags & OPf_STACKED ? "=" : "");
-}
-
-# Left associative operators, like `+', for which
-# $a + $b + $c is equivalent to ($a + $b) + $c
-
-BEGIN {
- %left = ('multiply' => 19, 'i_multiply' => 19,
- 'divide' => 19, 'i_divide' => 19,
- 'modulo' => 19, 'i_modulo' => 19,
- 'repeat' => 19,
- 'add' => 18, 'i_add' => 18,
- 'subtract' => 18, 'i_subtract' => 18,
- 'concat' => 18,
- 'left_shift' => 17, 'right_shift' => 17,
- 'bit_and' => 13,
- 'bit_or' => 12, 'bit_xor' => 12,
- 'and' => 3,
- 'or' => 2, 'xor' => 2,
- );
-}
-
-sub deparse_binop_left {
- my $self = shift;
- my($op, $left, $prec) = @_;
- if ($left{assoc_class($op)} && $left{assoc_class($left)}
- and $left{assoc_class($op)} == $left{assoc_class($left)})
- {
- return $self->deparse($left, $prec - .00001);
- } else {
- return $self->deparse($left, $prec);
- }
-}
-
-# Right associative operators, like `=', for which
-# $a = $b = $c is equivalent to $a = ($b = $c)
-
-BEGIN {
- %right = ('pow' => 22,
- 'sassign=' => 7, 'aassign=' => 7,
- 'multiply=' => 7, 'i_multiply=' => 7,
- 'divide=' => 7, 'i_divide=' => 7,
- 'modulo=' => 7, 'i_modulo=' => 7,
- 'repeat=' => 7,
- 'add=' => 7, 'i_add=' => 7,
- 'subtract=' => 7, 'i_subtract=' => 7,
- 'concat=' => 7,
- 'left_shift=' => 7, 'right_shift=' => 7,
- 'bit_and=' => 7,
- 'bit_or=' => 7, 'bit_xor=' => 7,
- 'andassign' => 7,
- 'orassign' => 7,
- );
-}
-
-sub deparse_binop_right {
- my $self = shift;
- my($op, $right, $prec) = @_;
- if ($right{assoc_class($op)} && $right{assoc_class($right)}
- and $right{assoc_class($op)} == $right{assoc_class($right)})
- {
- return $self->deparse($right, $prec - .00001);
- } else {
- return $self->deparse($right, $prec);
- }
-}
-
-sub binop {
- my $self = shift;
- my ($op, $cx, $opname, $prec, $flags) = (@_, 0);
- my $left = $op->first;
- my $right = $op->last;
- my $eq = "";
- if ($op->flags & OPf_STACKED && $flags & ASSIGN) {
- $eq = "=";
- $prec = 7;
- }
- if ($flags & SWAP_CHILDREN) {
- ($left, $right) = ($right, $left);
- }
- $left = $self->deparse_binop_left($op, $left, $prec);
- $left = "($left)" if $flags & LIST_CONTEXT
- && $left !~ /^(my|our|local|)[\@\(]/;
- $right = $self->deparse_binop_right($op, $right, $prec);
- return $self->maybe_parens("$left $opname$eq $right", $cx, $prec);
-}
-
-sub pp_add { maybe_targmy(@_, \&binop, "+", 18, ASSIGN) }
-sub pp_multiply { maybe_targmy(@_, \&binop, "*", 19, ASSIGN) }
-sub pp_subtract { maybe_targmy(@_, \&binop, "-",18, ASSIGN) }
-sub pp_divide { maybe_targmy(@_, \&binop, "/", 19, ASSIGN) }
-sub pp_modulo { maybe_targmy(@_, \&binop, "%", 19, ASSIGN) }
-sub pp_i_add { maybe_targmy(@_, \&binop, "+", 18, ASSIGN) }
-sub pp_i_multiply { maybe_targmy(@_, \&binop, "*", 19, ASSIGN) }
-sub pp_i_subtract { maybe_targmy(@_, \&binop, "-", 18, ASSIGN) }
-sub pp_i_divide { maybe_targmy(@_, \&binop, "/", 19, ASSIGN) }
-sub pp_i_modulo { maybe_targmy(@_, \&binop, "%", 19, ASSIGN) }
-sub pp_pow { maybe_targmy(@_, \&binop, "**", 22, ASSIGN) }
-
-sub pp_left_shift { maybe_targmy(@_, \&binop, "<<", 17, ASSIGN) }
-sub pp_right_shift { maybe_targmy(@_, \&binop, ">>", 17, ASSIGN) }
-sub pp_bit_and { maybe_targmy(@_, \&binop, "&", 13, ASSIGN) }
-sub pp_bit_or { maybe_targmy(@_, \&binop, "|", 12, ASSIGN) }
-sub pp_bit_xor { maybe_targmy(@_, \&binop, "^", 12, ASSIGN) }
-
-sub pp_eq { binop(@_, "==", 14) }
-sub pp_ne { binop(@_, "!=", 14) }
-sub pp_lt { binop(@_, "<", 15) }
-sub pp_gt { binop(@_, ">", 15) }
-sub pp_ge { binop(@_, ">=", 15) }
-sub pp_le { binop(@_, "<=", 15) }
-sub pp_ncmp { binop(@_, "<=>", 14) }
-sub pp_i_eq { binop(@_, "==", 14) }
-sub pp_i_ne { binop(@_, "!=", 14) }
-sub pp_i_lt { binop(@_, "<", 15) }
-sub pp_i_gt { binop(@_, ">", 15) }
-sub pp_i_ge { binop(@_, ">=", 15) }
-sub pp_i_le { binop(@_, "<=", 15) }
-sub pp_i_ncmp { binop(@_, "<=>", 14) }
-
-sub pp_seq { binop(@_, "eq", 14) }
-sub pp_sne { binop(@_, "ne", 14) }
-sub pp_slt { binop(@_, "lt", 15) }
-sub pp_sgt { binop(@_, "gt", 15) }
-sub pp_sge { binop(@_, "ge", 15) }
-sub pp_sle { binop(@_, "le", 15) }
-sub pp_scmp { binop(@_, "cmp", 14) }
-
-sub pp_sassign { binop(@_, "=", 7, SWAP_CHILDREN) }
-sub pp_aassign { binop(@_, "=", 7, SWAP_CHILDREN | LIST_CONTEXT) }
-
-sub pp_smartmatch {
- my ($self, $op, $cx) = @_;
- if ($op->flags & OPf_SPECIAL) {
- return $self->deparse($op->last, $cx);
- }
- else {
- binop(@_, "~~", 14);
- }
-}
-
-# `.' is special because concats-of-concats are optimized to save copying
-# by making all but the first concat stacked. The effect is as if the
-# programmer had written `($a . $b) .= $c', except legal.
-sub pp_concat { maybe_targmy(@_, \&real_concat) }
-sub real_concat {
- my $self = shift;
- my($op, $cx) = @_;
- my $left = $op->first;
- my $right = $op->last;
- my $eq = "";
- my $prec = 18;
- if ($op->flags & OPf_STACKED and $op->first->name ne "concat") {
- $eq = "=";
- $prec = 7;
- }
- $left = $self->deparse_binop_left($op, $left, $prec);
- $right = $self->deparse_binop_right($op, $right, $prec);
- return $self->maybe_parens("$left .$eq $right", $cx, $prec);
-}
-
-# `x' is weird when the left arg is a list
-sub pp_repeat {
- my $self = shift;
- my($op, $cx) = @_;
- my $left = $op->first;
- my $right = $op->last;
- my $eq = "";
- my $prec = 19;
- if ($op->flags & OPf_STACKED) {
- $eq = "=";
- $prec = 7;
- }
- if (null($right)) { # list repeat; count is inside left-side ex-list
- my $kid = $left->first->sibling; # skip pushmark
- my @exprs;
- for (; !null($kid->sibling); $kid = $kid->sibling) {
- push @exprs, $self->deparse($kid, 6);
- }
- $right = $kid;
- $left = "(" . join(", ", @exprs). ")";
- } else {
- $left = $self->deparse_binop_left($op, $left, $prec);
- }
- $right = $self->deparse_binop_right($op, $right, $prec);
- return $self->maybe_parens("$left x$eq $right", $cx, $prec);
-}
-
-sub range {
- my $self = shift;
- my ($op, $cx, $type) = @_;
- my $left = $op->first;
- my $right = $left->sibling;
- $left = $self->deparse($left, 9);
- $right = $self->deparse($right, 9);
- return $self->maybe_parens("$left $type $right", $cx, 9);
-}
-
-sub pp_flop {
- my $self = shift;
- my($op, $cx) = @_;
- my $flip = $op->first;
- my $type = ($flip->flags & OPf_SPECIAL) ? "..." : "..";
- return $self->range($flip->first, $cx, $type);
-}
-
-# one-line while/until is handled in pp_leave
-
-sub logop {
- my $self = shift;
- my ($op, $cx, $lowop, $lowprec, $highop, $highprec, $blockname) = @_;
- my $left = $op->first;
- my $right = $op->first->sibling;
- if ($cx < 1 and is_scope($right) and $blockname
- and $self->{'expand'} < 7)
- { # if ($a) {$b}
- $left = $self->deparse($left, 1);
- $right = $self->deparse($right, 0);
- return "$blockname ($left) {\n\t$right\n\b}\cK";
- } elsif ($cx < 1 and $blockname and not $self->{'parens'}
- and $self->{'expand'} < 7) { # $b if $a
- $right = $self->deparse($right, 1);
- $left = $self->deparse($left, 1);
- return "$right $blockname $left";
- } elsif ($cx > $lowprec and $highop) { # $a && $b
- $left = $self->deparse_binop_left($op, $left, $highprec);
- $right = $self->deparse_binop_right($op, $right, $highprec);
- return $self->maybe_parens("$left $highop $right", $cx, $highprec);
- } else { # $a and $b
- $left = $self->deparse_binop_left($op, $left, $lowprec);
- $right = $self->deparse_binop_right($op, $right, $lowprec);
- return $self->maybe_parens("$left $lowop $right", $cx, $lowprec);
- }
-}
-
-sub pp_and { logop(@_, "and", 3, "&&", 11, "if") }
-sub pp_or { logop(@_, "or", 2, "||", 10, "unless") }
-sub pp_dor { logop(@_, "err", 2, "//", 10, "") }
-
-# xor is syntactically a logop, but it's really a binop (contrary to
-# old versions of opcode.pl). Syntax is what matters here.
-sub pp_xor { logop(@_, "xor", 2, "", 0, "") }
-
-sub logassignop {
- my $self = shift;
- my ($op, $cx, $opname) = @_;
- my $left = $op->first;
- my $right = $op->first->sibling->first; # skip sassign
- $left = $self->deparse($left, 7);
- $right = $self->deparse($right, 7);
- return $self->maybe_parens("$left $opname $right", $cx, 7);
-}
-
-sub pp_andassign { logassignop(@_, "&&=") }
-sub pp_orassign { logassignop(@_, "||=") }
-sub pp_dorassign { logassignop(@_, "//=") }
-
-sub listop {
- my $self = shift;
- my($op, $cx, $name) = @_;
- my(@exprs);
- my $parens = ($cx >= 5) || $self->{'parens'};
- my $kid = $op->first->sibling;
- return $name if null $kid;
- my $first;
- $name = "socketpair" if $name eq "sockpair";
- my $proto = prototype("CORE::$name");
- if (defined $proto
- && $proto =~ /^;?\*/
- && $kid->name eq "rv2gv") {
- $first = $self->deparse($kid->first, 6);
- }
- else {
- $first = $self->deparse($kid, 6);
- }
- if ($name eq "chmod" && $first =~ /^\d+$/) {
- $first = sprintf("%#o", $first);
- }
- $first = "+$first" if not $parens and substr($first, 0, 1) eq "(";
- push @exprs, $first;
- $kid = $kid->sibling;
- if (defined $proto && $proto =~ /^\*\*/ && $kid->name eq "rv2gv") {
- push @exprs, $self->deparse($kid->first, 6);
- $kid = $kid->sibling;
- }
- for (; !null($kid); $kid = $kid->sibling) {
- push @exprs, $self->deparse($kid, 6);
- }
- if ($parens) {
- return "$name(" . join(", ", @exprs) . ")";
- } else {
- return "$name " . join(", ", @exprs);
- }
-}
-
-sub pp_bless { listop(@_, "bless") }
-sub pp_atan2 { maybe_targmy(@_, \&listop, "atan2") }
-sub pp_substr { maybe_local(@_, listop(@_, "substr")) }
-sub pp_vec { maybe_local(@_, listop(@_, "vec")) }
-sub pp_index { maybe_targmy(@_, \&listop, "index") }
-sub pp_rindex { maybe_targmy(@_, \&listop, "rindex") }
-sub pp_sprintf { maybe_targmy(@_, \&listop, "sprintf") }
-sub pp_formline { listop(@_, "formline") } # see also deparse_format
-sub pp_crypt { maybe_targmy(@_, \&listop, "crypt") }
-sub pp_unpack { listop(@_, "unpack") }
-sub pp_pack { listop(@_, "pack") }
-sub pp_join { maybe_targmy(@_, \&listop, "join") }
-sub pp_splice { listop(@_, "splice") }
-sub pp_push { maybe_targmy(@_, \&listop, "push") }
-sub pp_unshift { maybe_targmy(@_, \&listop, "unshift") }
-sub pp_reverse { listop(@_, "reverse") }
-sub pp_warn { listop(@_, "warn") }
-sub pp_die { listop(@_, "die") }
-# Actually, return is exempt from the LLAFR (see examples in this very
-# module!), but for consistency's sake, ignore that fact
-sub pp_return { listop(@_, "return") }
-sub pp_open { listop(@_, "open") }
-sub pp_pipe_op { listop(@_, "pipe") }
-sub pp_tie { listop(@_, "tie") }
-sub pp_binmode { listop(@_, "binmode") }
-sub pp_dbmopen { listop(@_, "dbmopen") }
-sub pp_sselect { listop(@_, "select") }
-sub pp_select { listop(@_, "select") }
-sub pp_read { listop(@_, "read") }
-sub pp_sysopen { listop(@_, "sysopen") }
-sub pp_sysseek { listop(@_, "sysseek") }
-sub pp_sysread { listop(@_, "sysread") }
-sub pp_syswrite { listop(@_, "syswrite") }
-sub pp_send { listop(@_, "send") }
-sub pp_recv { listop(@_, "recv") }
-sub pp_seek { listop(@_, "seek") }
-sub pp_fcntl { listop(@_, "fcntl") }
-sub pp_ioctl { listop(@_, "ioctl") }
-sub pp_flock { maybe_targmy(@_, \&listop, "flock") }
-sub pp_socket { listop(@_, "socket") }
-sub pp_sockpair { listop(@_, "sockpair") }
-sub pp_bind { listop(@_, "bind") }
-sub pp_connect { listop(@_, "connect") }
-sub pp_listen { listop(@_, "listen") }
-sub pp_accept { listop(@_, "accept") }
-sub pp_shutdown { listop(@_, "shutdown") }
-sub pp_gsockopt { listop(@_, "getsockopt") }
-sub pp_ssockopt { listop(@_, "setsockopt") }
-sub pp_chown { maybe_targmy(@_, \&listop, "chown") }
-sub pp_unlink { maybe_targmy(@_, \&listop, "unlink") }
-sub pp_chmod { maybe_targmy(@_, \&listop, "chmod") }
-sub pp_utime { maybe_targmy(@_, \&listop, "utime") }
-sub pp_rename { maybe_targmy(@_, \&listop, "rename") }
-sub pp_link { maybe_targmy(@_, \&listop, "link") }
-sub pp_symlink { maybe_targmy(@_, \&listop, "symlink") }
-sub pp_mkdir { maybe_targmy(@_, \&listop, "mkdir") }
-sub pp_open_dir { listop(@_, "opendir") }
-sub pp_seekdir { listop(@_, "seekdir") }
-sub pp_waitpid { maybe_targmy(@_, \&listop, "waitpid") }
-sub pp_system { maybe_targmy(@_, \&listop, "system") }
-sub pp_exec { maybe_targmy(@_, \&listop, "exec") }
-sub pp_kill { maybe_targmy(@_, \&listop, "kill") }
-sub pp_setpgrp { maybe_targmy(@_, \&listop, "setpgrp") }
-sub pp_getpriority { maybe_targmy(@_, \&listop, "getpriority") }
-sub pp_setpriority { maybe_targmy(@_, \&listop, "setpriority") }
-sub pp_shmget { listop(@_, "shmget") }
-sub pp_shmctl { listop(@_, "shmctl") }
-sub pp_shmread { listop(@_, "shmread") }
-sub pp_shmwrite { listop(@_, "shmwrite") }
-sub pp_msgget { listop(@_, "msgget") }
-sub pp_msgctl { listop(@_, "msgctl") }
-sub pp_msgsnd { listop(@_, "msgsnd") }
-sub pp_msgrcv { listop(@_, "msgrcv") }
-sub pp_semget { listop(@_, "semget") }
-sub pp_semctl { listop(@_, "semctl") }
-sub pp_semop { listop(@_, "semop") }
-sub pp_ghbyaddr { listop(@_, "gethostbyaddr") }
-sub pp_gnbyaddr { listop(@_, "getnetbyaddr") }
-sub pp_gpbynumber { listop(@_, "getprotobynumber") }
-sub pp_gsbyname { listop(@_, "getservbyname") }
-sub pp_gsbyport { listop(@_, "getservbyport") }
-sub pp_syscall { listop(@_, "syscall") }
-
-sub pp_glob {
- my $self = shift;
- my($op, $cx) = @_;
- my $text = $self->dq($op->first->sibling); # skip pushmark
- if ($text =~ /^\$?(\w|::|\`)+$/ # could look like a readline
- or $text =~ /[<>]/) {
- return 'glob(' . single_delim('qq', '"', $text) . ')';
- } else {
- return '<' . $text . '>';
- }
-}
-
-# Truncate is special because OPf_SPECIAL makes a bareword first arg
-# be a filehandle. This could probably be better fixed in the core
-# by moving the GV lookup into ck_truc.
-
-sub pp_truncate {
- my $self = shift;
- my($op, $cx) = @_;
- my(@exprs);
- my $parens = ($cx >= 5) || $self->{'parens'};
- my $kid = $op->first->sibling;
- my $fh;
- if ($op->flags & OPf_SPECIAL) {
- # $kid is an OP_CONST
- $fh = $self->const_sv($kid)->PV;
- } else {
- $fh = $self->deparse($kid, 6);
- $fh = "+$fh" if not $parens and substr($fh, 0, 1) eq "(";
- }
- my $len = $self->deparse($kid->sibling, 6);
- if ($parens) {
- return "truncate($fh, $len)";
- } else {
- return "truncate $fh, $len";
- }
-}
-
-sub indirop {
- my $self = shift;
- my($op, $cx, $name) = @_;
- my($expr, @exprs);
- my $kid = $op->first->sibling;
- my $indir = "";
- if ($op->flags & OPf_STACKED) {
- $indir = $kid;
- $indir = $indir->first; # skip rv2gv
- if (is_scope($indir)) {
- $indir = "{" . $self->deparse($indir, 0) . "}";
- $indir = "{;}" if $indir eq "{}";
- } elsif ($indir->name eq "const" && $indir->private & OPpCONST_BARE) {
- $indir = $self->const_sv($indir)->PV;
- } else {
- $indir = $self->deparse($indir, 24);
- }
- $indir = $indir . " ";
- $kid = $kid->sibling;
- }
- if ($name eq "sort" && $op->private & (OPpSORT_NUMERIC | OPpSORT_INTEGER)) {
- $indir = ($op->private & OPpSORT_DESCEND) ? '{$b <=> $a} '
- : '{$a <=> $b} ';
- }
- elsif ($name eq "sort" && $op->private & OPpSORT_DESCEND) {
- $indir = '{$b cmp $a} ';
- }
- for (; !null($kid); $kid = $kid->sibling) {
- $expr = $self->deparse($kid, 6);
- push @exprs, $expr;
- }
- my $name2 = $name;
- if ($name eq "sort" && $op->private & OPpSORT_REVERSE) {
- $name2 = 'reverse sort';
- }
- if ($name eq "sort" && ($op->private & OPpSORT_INPLACE)) {
- return "$exprs[0] = $name2 $indir $exprs[0]";
- }
-
- my $args = $indir . join(", ", @exprs);
- if ($indir ne "" and $name eq "sort") {
- # We don't want to say "sort(f 1, 2, 3)", since perl -w will
- # give bareword warnings in that case. Therefore if context
- # requires, we'll put parens around the outside "(sort f 1, 2,
- # 3)". Unfortunately, we'll currently think the parens are
- # necessary more often that they really are, because we don't
- # distinguish which side of an assignment we're on.
- if ($cx >= 5) {
- return "($name2 $args)";
- } else {
- return "$name2 $args";
- }
- } else {
- return $self->maybe_parens_func($name2, $args, $cx, 5);
- }
-
-}
-
-sub pp_prtf { indirop(@_, "printf") }
-sub pp_print { indirop(@_, "print") }
-sub pp_say { indirop(@_, "say") }
-sub pp_sort { indirop(@_, "sort") }
-
-sub mapop {
- my $self = shift;
- my($op, $cx, $name) = @_;
- my($expr, @exprs);
- my $kid = $op->first; # this is the (map|grep)start
- $kid = $kid->first->sibling; # skip a pushmark
- my $code = $kid->first; # skip a null
- if (is_scope $code) {
- $code = "{" . $self->deparse($code, 0) . "} ";
- } else {
- $code = $self->deparse($code, 24) . ", ";
- }
- $kid = $kid->sibling;
- for (; !null($kid); $kid = $kid->sibling) {
- $expr = $self->deparse($kid, 6);
- push @exprs, $expr if defined $expr;
- }
- return $self->maybe_parens_func($name, $code . join(", ", @exprs), $cx, 5);
-}
-
-sub pp_mapwhile { mapop(@_, "map") }
-sub pp_grepwhile { mapop(@_, "grep") }
-sub pp_mapstart { baseop(@_, "map") }
-sub pp_grepstart { baseop(@_, "grep") }
-
-sub pp_list {
- my $self = shift;
- my($op, $cx) = @_;
- my($expr, @exprs);
- my $kid = $op->first->sibling; # skip pushmark
- my $lop;
- my $local = "either"; # could be local(...), my(...), state(...) or our(...)
- for ($lop = $kid; !null($lop); $lop = $lop->sibling) {
- # This assumes that no other private flags equal 128, and that
- # OPs that store things other than flags in their op_private,
- # like OP_AELEMFAST, won't be immediate children of a list.
- #
- # OP_ENTERSUB can break this logic, so check for it.
- # I suspect that open and exit can too.
-
- if (!($lop->private & (OPpLVAL_INTRO|OPpOUR_INTRO)
- or $lop->name eq "undef")
- or $lop->name eq "entersub"
- or $lop->name eq "exit"
- or $lop->name eq "open")
- {
- $local = ""; # or not
- last;
- }
- if ($lop->name =~ /^pad[ash]v$/) {
- if ($lop->private & OPpPAD_STATE) { # state()
- ($local = "", last) if $local =~ /^(?:local|our|my)$/;
- $local = "state";
- } else { # my()
- ($local = "", last) if $local =~ /^(?:local|our|state)$/;
- $local = "my";
- }
- } elsif ($lop->name =~ /^(gv|rv2)[ash]v$/
- && $lop->private & OPpOUR_INTRO
- or $lop->name eq "null" && $lop->first->name eq "gvsv"
- && $lop->first->private & OPpOUR_INTRO) { # our()
- ($local = "", last) if $local =~ /^(?:my|local|state)$/;
- $local = "our";
- } elsif ($lop->name ne "undef"
- # specifically avoid the "reverse sort" optimisation,
- # where "reverse" is nullified
- && !($lop->name eq 'sort' && ($lop->flags & OPpSORT_REVERSE)))
- {
- # local()
- ($local = "", last) if $local =~ /^(?:my|our|state)$/;
- $local = "local";
- }
- }
- $local = "" if $local eq "either"; # no point if it's all undefs
- return $self->deparse($kid, $cx) if null $kid->sibling and not $local;
- for (; !null($kid); $kid = $kid->sibling) {
- if ($local) {
- if (class($kid) eq "UNOP" and $kid->first->name eq "gvsv") {
- $lop = $kid->first;
- } else {
- $lop = $kid;
- }
- $self->{'avoid_local'}{$$lop}++;
- $expr = $self->deparse($kid, 6);
- delete $self->{'avoid_local'}{$$lop};
- } else {
- $expr = $self->deparse($kid, 6);
- }
- push @exprs, $expr;
- }
- if ($local) {
- return "$local(" . join(", ", @exprs) . ")";
- } else {
- return $self->maybe_parens( join(", ", @exprs), $cx, 6);
- }
-}
-
-sub is_ifelse_cont {
- my $op = shift;
- return ($op->name eq "null" and class($op) eq "UNOP"
- and $op->first->name =~ /^(and|cond_expr)$/
- and is_scope($op->first->first->sibling));
-}
-
-sub pp_cond_expr {
- my $self = shift;
- my($op, $cx) = @_;
- my $cond = $op->first;
- my $true = $cond->sibling;
- my $false = $true->sibling;
- my $cuddle = $self->{'cuddle'};
- unless ($cx < 1 and (is_scope($true) and $true->name ne "null") and
- (is_scope($false) || is_ifelse_cont($false))
- and $self->{'expand'} < 7) {
- $cond = $self->deparse($cond, 8);
- $true = $self->deparse($true, 6);
- $false = $self->deparse($false, 8);
- return $self->maybe_parens("$cond ? $true : $false", $cx, 8);
- }
-
- $cond = $self->deparse($cond, 1);
- $true = $self->deparse($true, 0);
- my $head = "if ($cond) {\n\t$true\n\b}";
- my @elsifs;
- while (!null($false) and is_ifelse_cont($false)) {
- my $newop = $false->first;
- my $newcond = $newop->first;
- my $newtrue = $newcond->sibling;
- $false = $newtrue->sibling; # last in chain is OP_AND => no else
- if ($newcond->name eq "lineseq")
- {
- # lineseq to ensure correct line numbers in elsif()
- # Bug #37302 fixed by change #33710.
- $newcond = $newcond->first->sibling;
- }
- $newcond = $self->deparse($newcond, 1);
- $newtrue = $self->deparse($newtrue, 0);
- push @elsifs, "elsif ($newcond) {\n\t$newtrue\n\b}";
- }
- if (!null($false)) {
- $false = $cuddle . "else {\n\t" .
- $self->deparse($false, 0) . "\n\b}\cK";
- } else {
- $false = "\cK";
- }
- return $head . join($cuddle, "", @elsifs) . $false;
-}
-
-sub pp_once {
- my ($self, $op, $cx) = @_;
- my $cond = $op->first;
- my $true = $cond->sibling;
-
- return $self->deparse($true, $cx);
-}
-
-sub loop_common {
- my $self = shift;
- my($op, $cx, $init) = @_;
- my $enter = $op->first;
- my $kid = $enter->sibling;
- local(@$self{qw'curstash warnings hints hinthash'})
- = @$self{qw'curstash warnings hints hinthash'};
- my $head = "";
- my $bare = 0;
- my $body;
- my $cond = undef;
- if ($kid->name eq "lineseq") { # bare or infinite loop
- if ($kid->last->name eq "unstack") { # infinite
- $head = "while (1) "; # Can't use for(;;) if there's a continue
- $cond = "";
- } else {
- $bare = 1;
- }
- $body = $kid;
- } elsif ($enter->name eq "enteriter") { # foreach
- my $ary = $enter->first->sibling; # first was pushmark
- my $var = $ary->sibling;
- if ($ary->name eq 'null' and $enter->private & OPpITER_REVERSED) {
- # "reverse" was optimised away
- $ary = listop($self, $ary->first->sibling, 1, 'reverse');
- } elsif ($enter->flags & OPf_STACKED
- and not null $ary->first->sibling->sibling)
- {
- $ary = $self->deparse($ary->first->sibling, 9) . " .. " .
- $self->deparse($ary->first->sibling->sibling, 9);
- } else {
- $ary = $self->deparse($ary, 1);
- }
- if (null $var) {
- if ($enter->flags & OPf_SPECIAL) { # thread special var
- $var = $self->pp_threadsv($enter, 1);
- } else { # regular my() variable
- $var = $self->pp_padsv($enter, 1);
- }
- } elsif ($var->name eq "rv2gv") {
- $var = $self->pp_rv2sv($var, 1);
- if ($enter->private & OPpOUR_INTRO) {
- # our declarations don't have package names
- $var =~ s/^(.).*::/$1/;
- $var = "our $var";
- }
- } elsif ($var->name eq "gv") {
- $var = "\$" . $self->deparse($var, 1);
- }
- $body = $kid->first->first->sibling; # skip OP_AND and OP_ITER
- if (!is_state $body->first and $body->first->name ne "stub") {
- confess unless $var eq '$_';
- $body = $body->first;
- return $self->deparse($body, 2) . " foreach ($ary)";
- }
- $head = "foreach $var ($ary) ";
- } elsif ($kid->name eq "null") { # while/until
- $kid = $kid->first;
- my $name = {"and" => "while", "or" => "until"}->{$kid->name};
- $cond = $self->deparse($kid->first, 1);
- $head = "$name ($cond) ";
- $body = $kid->first->sibling;
- } elsif ($kid->name eq "stub") { # bare and empty
- return "{;}"; # {} could be a hashref
- }
- # If there isn't a continue block, then the next pointer for the loop
- # will point to the unstack, which is kid's last child, except
- # in a bare loop, when it will point to the leaveloop. When neither of
- # these conditions hold, then the second-to-last child is the continue
- # block (or the last in a bare loop).
- my $cont_start = $enter->nextop;
- my $cont;
- if ($$cont_start != $$op && ${$cont_start} != ${$body->last}) {
- if ($bare) {
- $cont = $body->last;
- } else {
- $cont = $body->first;
- while (!null($cont->sibling->sibling)) {
- $cont = $cont->sibling;
- }
- }
- my $state = $body->first;
- my $cuddle = $self->{'cuddle'};
- my @states;
- for (; $$state != $$cont; $state = $state->sibling) {
- push @states, $state;
- }
- $body = $self->lineseq(undef, @states);
- if (defined $cond and not is_scope $cont and $self->{'expand'} < 3) {
- $head = "for ($init; $cond; " . $self->deparse($cont, 1) .") ";
- $cont = "\cK";
- } else {
- $cont = $cuddle . "continue {\n\t" .
- $self->deparse($cont, 0) . "\n\b}\cK";
- }
- } else {
- return "" if !defined $body;
- if (length $init) {
- $head = "for ($init; $cond;) ";
- }
- $cont = "\cK";
- $body = $self->deparse($body, 0);
- }
- $body =~ s/;?$/;\n/;
-
- return $head . "{\n\t" . $body . "\b}" . $cont;
-}
-
-sub pp_leaveloop { shift->loop_common(@_, "") }
-
-sub for_loop {
- my $self = shift;
- my($op, $cx) = @_;
- my $init = $self->deparse($op, 1);
- return $self->loop_common($op->sibling->first->sibling, $cx, $init);
-}
-
-sub pp_leavetry {
- my $self = shift;
- return "eval {\n\t" . $self->pp_leave(@_) . "\n\b}";
-}
-
-BEGIN { eval "sub OP_CONST () {" . opnumber("const") . "}" }
-BEGIN { eval "sub OP_STRINGIFY () {" . opnumber("stringify") . "}" }
-BEGIN { eval "sub OP_RV2SV () {" . opnumber("rv2sv") . "}" }
-BEGIN { eval "sub OP_LIST () {" . opnumber("list") . "}" }
-
-sub pp_null {
- my $self = shift;
- my($op, $cx) = @_;
- if (class($op) eq "OP") {
- # old value is lost
- return $self->{'ex_const'} if $op->targ == OP_CONST;
- } elsif ($op->first->name eq "pushmark") {
- return $self->pp_list($op, $cx);
- } elsif ($op->first->name eq "enter") {
- return $self->pp_leave($op, $cx);
- } elsif ($op->first->name eq "leave") {
- return $self->pp_leave($op->first, $cx);
- } elsif ($op->first->name eq "scope") {
- return $self->pp_scope($op->first, $cx);
- } elsif ($op->targ == OP_STRINGIFY) {
- return $self->dquote($op, $cx);
- } elsif (!null($op->first->sibling) and
- $op->first->sibling->name eq "readline" and
- $op->first->sibling->flags & OPf_STACKED) {
- return $self->maybe_parens($self->deparse($op->first, 7) . " = "
- . $self->deparse($op->first->sibling, 7),
- $cx, 7);
- } elsif (!null($op->first->sibling) and
- $op->first->sibling->name eq "trans" and
- $op->first->sibling->flags & OPf_STACKED) {
- return $self->maybe_parens($self->deparse($op->first, 20) . " =~ "
- . $self->deparse($op->first->sibling, 20),
- $cx, 20);
- } elsif ($op->flags & OPf_SPECIAL && $cx < 1 && !$op->targ) {
- return "do {\n\t". $self->deparse($op->first, $cx) ."\n\b};";
- } elsif (!null($op->first->sibling) and
- $op->first->sibling->name eq "null" and
- class($op->first->sibling) eq "UNOP" and
- $op->first->sibling->first->flags & OPf_STACKED and
- $op->first->sibling->first->name eq "rcatline") {
- return $self->maybe_parens($self->deparse($op->first, 18) . " .= "
- . $self->deparse($op->first->sibling, 18),
- $cx, 18);
- } else {
- return $self->deparse($op->first, $cx);
- }
-}
-
-sub padname {
- my $self = shift;
- my $targ = shift;
- return $self->padname_sv($targ)->PVX;
-}
-
-sub padany {
- my $self = shift;
- my $op = shift;
- return substr($self->padname($op->targ), 1); # skip $/@/%
-}
-
-sub pp_padsv {
- my $self = shift;
- my($op, $cx) = @_;
- return $self->maybe_my($op, $cx, $self->padname($op->targ));
-}
-
-sub pp_padav { pp_padsv(@_) }
-sub pp_padhv { pp_padsv(@_) }
-
-my @threadsv_names;
-
-BEGIN {
- @threadsv_names = ("_", "1", "2", "3", "4", "5", "6", "7", "8", "9",
- "&", "`", "'", "+", "/", ".", ",", "\\", '"', ";",
- "^", "-", "%", "=", "|", "~", ":", "^A", "^E",
- "!", "@");
-}
-
-sub pp_threadsv {
- my $self = shift;
- my($op, $cx) = @_;
- return $self->maybe_local($op, $cx, "\$" . $threadsv_names[$op->targ]);
-}
-
-sub gv_or_padgv {
- my $self = shift;
- my $op = shift;
- if (class($op) eq "PADOP") {
- return $self->padval($op->padix);
- } else { # class($op) eq "SVOP"
- return $op->gv;
- }
-}
-
-sub pp_gvsv {
- my $self = shift;
- my($op, $cx) = @_;
- my $gv = $self->gv_or_padgv($op);
- return $self->maybe_local($op, $cx, $self->stash_variable("\$",
- $self->gv_name($gv)));
-}
-
-sub pp_gv {
- my $self = shift;
- my($op, $cx) = @_;
- my $gv = $self->gv_or_padgv($op);
- return $self->gv_name($gv);
-}
-
-sub pp_aelemfast {
- my $self = shift;
- my($op, $cx) = @_;
- my $name;
- if ($op->flags & OPf_SPECIAL) { # optimised PADAV
- $name = $self->padname($op->targ);
- $name =~ s/^@/\$/;
- }
- else {
- my $gv = $self->gv_or_padgv($op);
- $name = $self->gv_name($gv);
- $name = $self->{'curstash'}."::$name"
- if $name !~ /::/ && $self->lex_in_scope('@'.$name);
- $name = '$' . $name;
- }
-
- return $name . "[" . ($op->private + $self->{'arybase'}) . "]";
-}
-
-sub rv2x {
- my $self = shift;
- my($op, $cx, $type) = @_;
-
- if (class($op) eq 'NULL' || !$op->can("first")) {
- carp("Unexpected op in pp_rv2x");
- return 'XXX';
- }
- my $kid = $op->first;
- if ($kid->name eq "gv") {
- return $self->stash_variable($type, $self->deparse($kid, 0));
- } elsif (is_scalar $kid) {
- my $str = $self->deparse($kid, 0);
- if ($str =~ /^\$([^\w\d])\z/) {
- # "$$+" isn't a legal way to write the scalar dereference
- # of $+, since the lexer can't tell you aren't trying to
- # do something like "$$ + 1" to get one more than your
- # PID. Either "${$+}" or "$${+}" are workable
- # disambiguations, but if the programmer did the former,
- # they'd be in the "else" clause below rather than here.
- # It's not clear if this should somehow be unified with
- # the code in dq and re_dq that also adds lexer
- # disambiguation braces.
- $str = '$' . "{$1}"; #'
- }
- return $type . $str;
- } else {
- return $type . "{" . $self->deparse($kid, 0) . "}";
- }
-}
-
-sub pp_rv2sv { maybe_local(@_, rv2x(@_, "\$")) }
-sub pp_rv2hv { maybe_local(@_, rv2x(@_, "%")) }
-sub pp_rv2gv { maybe_local(@_, rv2x(@_, "*")) }
-
-# skip rv2av
-sub pp_av2arylen {
- my $self = shift;
- my($op, $cx) = @_;
- if ($op->first->name eq "padav") {
- return $self->maybe_local($op, $cx, '$#' . $self->padany($op->first));
- } else {
- return $self->maybe_local($op, $cx,
- $self->rv2x($op->first, $cx, '$#'));
- }
-}
-
-# skip down to the old, ex-rv2cv
-sub pp_rv2cv {
- my ($self, $op, $cx) = @_;
- if (!null($op->first) && $op->first->name eq 'null' &&
- $op->first->targ eq OP_LIST)
- {
- return $self->rv2x($op->first->first->sibling, $cx, "&")
- }
- else {
- return $self->rv2x($op, $cx, "")
- }
-}
-
-sub list_const {
- my $self = shift;
- my($cx, @list) = @_;
- my @a = map $self->const($_, 6), @list;
- if (@a == 0) {
- return "()";
- } elsif (@a == 1) {
- return $a[0];
- } elsif ( @a > 2 and !grep(!/^-?\d+$/, @a)) {
- # collapse (-1,0,1,2) into (-1..2)
- my ($s, $e) = @a[0,-1];
- my $i = $s;
- return $self->maybe_parens("$s..$e", $cx, 9)
- unless grep $i++ != $_, @a;
- }
- return $self->maybe_parens(join(", ", @a), $cx, 6);
-}
-
-sub pp_rv2av {
- my $self = shift;
- my($op, $cx) = @_;
- my $kid = $op->first;
- if ($kid->name eq "const") { # constant list
- my $av = $self->const_sv($kid);
- return $self->list_const($cx, $av->ARRAY);
- } else {
- return $self->maybe_local($op, $cx, $self->rv2x($op, $cx, "\@"));
- }
- }
-
-sub is_subscriptable {
- my $op = shift;
- if ($op->name =~ /^[ahg]elem/) {
- return 1;
- } elsif ($op->name eq "entersub") {
- my $kid = $op->first;
- return 0 unless null $kid->sibling;
- $kid = $kid->first;
- $kid = $kid->sibling until null $kid->sibling;
- return 0 if is_scope($kid);
- $kid = $kid->first;
- return 0 if $kid->name eq "gv";
- return 0 if is_scalar($kid);
- return is_subscriptable($kid);
- } else {
- return 0;
- }
-}
-
-sub elem_or_slice_array_name
-{
- my $self = shift;
- my ($array, $left, $padname, $allow_arrow) = @_;
-
- if ($array->name eq $padname) {
- return $self->padany($array);
- } elsif (is_scope($array)) { # ${expr}[0]
- return "{" . $self->deparse($array, 0) . "}";
- } elsif ($array->name eq "gv") {
- $array = $self->gv_name($self->gv_or_padgv($array));
- if ($array !~ /::/) {
- my $prefix = ($left eq '[' ? '@' : '%');
- $array = $self->{curstash}.'::'.$array
- if $self->lex_in_scope($prefix . $array);
- }
- return $array;
- } elsif (!$allow_arrow || is_scalar $array) { # $x[0], $$x[0], ...
- return $self->deparse($array, 24);
- } else {
- return undef;
- }
-}
-
-sub elem_or_slice_single_index
-{
- my $self = shift;
- my ($idx) = @_;
-
- $idx = $self->deparse($idx, 1);
-
- # Outer parens in an array index will confuse perl
- # if we're interpolating in a regular expression, i.e.
- # /$x$foo[(-1)]/ is *not* the same as /$x$foo[-1]/
- #
- # If $self->{parens}, then an initial '(' will
- # definitely be paired with a final ')'. If
- # !$self->{parens}, the misleading parens won't
- # have been added in the first place.
- #
- # [You might think that we could get "(...)...(...)"
- # where the initial and final parens do not match
- # each other. But we can't, because the above would
- # only happen if there's an infix binop between the
- # two pairs of parens, and *that* means that the whole
- # expression would be parenthesized as well.]
- #
- $idx =~ s/^\((.*)\)$/$1/ if $self->{'parens'};
-
- # Hash-element braces will autoquote a bareword inside themselves.
- # We need to make sure that C<$hash{warn()}> doesn't come out as
- # C<$hash{warn}>, which has a quite different meaning. Currently
- # B::Deparse will always quote strings, even if the string was a
- # bareword in the original (i.e. the OPpCONST_BARE flag is ignored
- # for constant strings.) So we can cheat slightly here - if we see
- # a bareword, we know that it is supposed to be a function call.
- #
- $idx =~ s/^([A-Za-z_]\w*)$/$1()/;
-
- return $idx;
-}
-
-sub elem {
- my $self = shift;
- my ($op, $cx, $left, $right, $padname) = @_;
- my($array, $idx) = ($op->first, $op->first->sibling);
-
- $idx = $self->elem_or_slice_single_index($idx);
-
- unless ($array->name eq $padname) { # Maybe this has been fixed
- $array = $array->first; # skip rv2av (or ex-rv2av in _53+)
- }
- if (my $array_name=$self->elem_or_slice_array_name
- ($array, $left, $padname, 1)) {
- return "\$" . $array_name . $left . $idx . $right;
- } else {
- # $x[20][3]{hi} or expr->[20]
- my $arrow = is_subscriptable($array) ? "" : "->";
- return $self->deparse($array, 24) . $arrow . $left . $idx . $right;
- }
-
-}
-
-sub pp_aelem { maybe_local(@_, elem(@_, "[", "]", "padav")) }
-sub pp_helem { maybe_local(@_, elem(@_, "{", "}", "padhv")) }
-
-sub pp_gelem {
- my $self = shift;
- my($op, $cx) = @_;
- my($glob, $part) = ($op->first, $op->last);
- $glob = $glob->first; # skip rv2gv
- $glob = $glob->first if $glob->name eq "rv2gv"; # this one's a bug
- my $scope = is_scope($glob);
- $glob = $self->deparse($glob, 0);
- $part = $self->deparse($part, 1);
- return "*" . ($scope ? "{$glob}" : $glob) . "{$part}";
-}
-
-sub slice {
- my $self = shift;
- my ($op, $cx, $left, $right, $regname, $padname) = @_;
- my $last;
- my(@elems, $kid, $array, $list);
- if (class($op) eq "LISTOP") {
- $last = $op->last;
- } else { # ex-hslice inside delete()
- for ($kid = $op->first; !null $kid->sibling; $kid = $kid->sibling) {}
- $last = $kid;
- }
- $array = $last;
- $array = $array->first
- if $array->name eq $regname or $array->name eq "null";
- $array = $self->elem_or_slice_array_name($array,$left,$padname,0);
- $kid = $op->first->sibling; # skip pushmark
- if ($kid->name eq "list") {
- $kid = $kid->first->sibling; # skip list, pushmark
- for (; !null $kid; $kid = $kid->sibling) {
- push @elems, $self->deparse($kid, 6);
- }
- $list = join(", ", @elems);
- } else {
- $list = $self->elem_or_slice_single_index($kid);
- }
- return "\@" . $array . $left . $list . $right;
-}
-
-sub pp_aslice { maybe_local(@_, slice(@_, "[", "]", "rv2av", "padav")) }
-sub pp_hslice { maybe_local(@_, slice(@_, "{", "}", "rv2hv", "padhv")) }
-
-sub pp_lslice {
- my $self = shift;
- my($op, $cx) = @_;
- my $idx = $op->first;
- my $list = $op->last;
- my(@elems, $kid);
- $list = $self->deparse($list, 1);
- $idx = $self->deparse($idx, 1);
- return "($list)" . "[$idx]";
-}
-
-sub want_scalar {
- my $op = shift;
- return ($op->flags & OPf_WANT) == OPf_WANT_SCALAR;
-}
-
-sub want_list {
- my $op = shift;
- return ($op->flags & OPf_WANT) == OPf_WANT_LIST;
-}
-
-sub _method {
- my $self = shift;
- my($op, $cx) = @_;
- my $kid = $op->first->sibling; # skip pushmark
- my($meth, $obj, @exprs);
- if ($kid->name eq "list" and want_list $kid) {
- # When an indirect object isn't a bareword but the args are in
- # parens, the parens aren't part of the method syntax (the LLAFR
- # doesn't apply), but they make a list with OPf_PARENS set that
- # doesn't get flattened by the append_elem that adds the method,
- # making a (object, arg1, arg2, ...) list where the object
- # usually is. This can be distinguished from
- # `($obj, $arg1, $arg2)->meth()' (which is legal if $arg2 is an
- # object) because in the later the list is in scalar context
- # as the left side of -> always is, while in the former
- # the list is in list context as method arguments always are.
- # (Good thing there aren't method prototypes!)
- $meth = $kid->sibling;
- $kid = $kid->first->sibling; # skip pushmark
- $obj = $kid;
- $kid = $kid->sibling;
- for (; not null $kid; $kid = $kid->sibling) {
- push @exprs, $kid;
- }
- } else {
- $obj = $kid;
- $kid = $kid->sibling;
- for (; !null ($kid->sibling) && $kid->name ne "method_named";
- $kid = $kid->sibling) {
- push @exprs, $kid
- }
- $meth = $kid;
- }
-
- if ($meth->name eq "method_named") {
- $meth = $self->const_sv($meth)->PV;
- } else {
- $meth = $meth->first;
- if ($meth->name eq "const") {
- # As of 5.005_58, this case is probably obsoleted by the
- # method_named case above
- $meth = $self->const_sv($meth)->PV; # needs to be bare
- }
- }
-
- return { method => $meth, variable_method => ref($meth),
- object => $obj, args => \@exprs };
-}
-
-# compat function only
-sub method {
- my $self = shift;
- my $info = $self->_method(@_);
- return $self->e_method( $self->_method(@_) );
-}
-
-sub e_method {
- my ($self, $info) = @_;
- my $obj = $self->deparse($info->{object}, 24);
-
- my $meth = $info->{method};
- $meth = $self->deparse($meth, 1) if $info->{variable_method};
- my $args = join(", ", map { $self->deparse($_, 6) } @{$info->{args}} );
- my $kid = $obj . "->" . $meth;
- if (length $args) {
- return $kid . "(" . $args . ")"; # parens mandatory
- } else {
- return $kid;
- }
-}
-
-# returns "&" if the prototype doesn't match the args,
-# or ("", $args_after_prototype_demunging) if it does.
-sub check_proto {
- my $self = shift;
- return "&" if $self->{'noproto'};
- my($proto, @args) = @_;
- my($arg, $real);
- my $doneok = 0;
- my @reals;
- # An unbackslashed @ or % gobbles up the rest of the args
- 1 while $proto =~ s/(?<!\\)([@%])[^\]]+$/$1/;
- while ($proto) {
- $proto =~ s/^(\\?[\$\@&%*_]|\\\[[\$\@&%*]+\]|;)//;
- my $chr = $1;
- if ($chr eq "") {
- return "&" if @args;
- } elsif ($chr eq ";") {
- $doneok = 1;
- } elsif ($chr eq "@" or $chr eq "%") {
- push @reals, map($self->deparse($_, 6), @args);
- @args = ();
- } else {
- $arg = shift @args;
- last unless $arg;
- if ($chr eq "\$" || $chr eq "_") {
- if (want_scalar $arg) {
- push @reals, $self->deparse($arg, 6);
- } else {
- return "&";
- }
- } elsif ($chr eq "&") {
- if ($arg->name =~ /^(s?refgen|undef)$/) {
- push @reals, $self->deparse($arg, 6);
- } else {
- return "&";
- }
- } elsif ($chr eq "*") {
- if ($arg->name =~ /^s?refgen$/
- and $arg->first->first->name eq "rv2gv")
- {
- $real = $arg->first->first; # skip refgen, null
- if ($real->first->name eq "gv") {
- push @reals, $self->deparse($real, 6);
- } else {
- push @reals, $self->deparse($real->first, 6);
- }
- } else {
- return "&";
- }
- } elsif (substr($chr, 0, 1) eq "\\") {
- $chr =~ tr/\\[]//d;
- if ($arg->name =~ /^s?refgen$/ and
- !null($real = $arg->first) and
- ($chr =~ /\$/ && is_scalar($real->first)
- or ($chr =~ /@/
- && class($real->first->sibling) ne 'NULL'
- && $real->first->sibling->name
- =~ /^(rv2|pad)av$/)
- or ($chr =~ /%/
- && class($real->first->sibling) ne 'NULL'
- && $real->first->sibling->name
- =~ /^(rv2|pad)hv$/)
- #or ($chr =~ /&/ # This doesn't work
- # && $real->first->name eq "rv2cv")
- or ($chr =~ /\*/
- && $real->first->name eq "rv2gv")))
- {
- push @reals, $self->deparse($real, 6);
- } else {
- return "&";
- }
- }
- }
- }
- return "&" if $proto and !$doneok; # too few args and no `;'
- return "&" if @args; # too many args
- return ("", join ", ", @reals);
-}
-
-sub pp_entersub {
- my $self = shift;
- my($op, $cx) = @_;
- return $self->e_method($self->_method($op, $cx))
- unless null $op->first->sibling;
- my $prefix = "";
- my $amper = "";
- my($kid, @exprs);
- if ($op->flags & OPf_SPECIAL && !($op->flags & OPf_MOD)) {
- $prefix = "do ";
- } elsif ($op->private & OPpENTERSUB_AMPER) {
- $amper = "&";
- }
- $kid = $op->first;
- $kid = $kid->first->sibling; # skip ex-list, pushmark
- for (; not null $kid->sibling; $kid = $kid->sibling) {
- push @exprs, $kid;
- }
- my $simple = 0;
- my $proto = undef;
- if (is_scope($kid)) {
- $amper = "&";
- $kid = "{" . $self->deparse($kid, 0) . "}";
- } elsif ($kid->first->name eq "gv") {
- my $gv = $self->gv_or_padgv($kid->first);
- if (class($gv->CV) ne "SPECIAL") {
- $proto = $gv->CV->PV if $gv->CV->FLAGS & SVf_POK;
- }
- $simple = 1; # only calls of named functions can be prototyped
- $kid = $self->deparse($kid, 24);
- if (!$amper) {
- if ($kid eq 'main::') {
- $kid = '::';
- } elsif ($kid !~ /^(?:\w|::)(?:[\w\d]|::(?!\z))*\z/) {
- $kid = single_delim("q", "'", $kid) . '->';
- }
- }
- } elsif (is_scalar ($kid->first) && $kid->first->name ne 'rv2cv') {
- $amper = "&";
- $kid = $self->deparse($kid, 24);
- } else {
- $prefix = "";
- my $arrow = is_subscriptable($kid->first) ? "" : "->";
- $kid = $self->deparse($kid, 24) . $arrow;
- }
-
- # Doesn't matter how many prototypes there are, if
- # they haven't happened yet!
- my $declared;
- {
- no strict 'refs';
- no warnings 'uninitialized';
- $declared = exists $self->{'subs_declared'}{$kid}
- || (
- defined &{ ${$self->{'curstash'}."::"}{$kid} }
- && !exists
- $self->{'subs_deparsed'}{$self->{'curstash'}."::".$kid}
- && defined prototype $self->{'curstash'}."::".$kid
- );
- if (!$declared && defined($proto)) {
- # Avoid "too early to check prototype" warning
- ($amper, $proto) = ('&');
- }
- }
-
- my $args;
- if ($declared and defined $proto and not $amper) {
- ($amper, $args) = $self->check_proto($proto, @exprs);
- if ($amper eq "&") {
- $args = join(", ", map($self->deparse($_, 6), @exprs));
- }
- } else {
- $args = join(", ", map($self->deparse($_, 6), @exprs));
- }
- if ($prefix or $amper) {
- if ($op->flags & OPf_STACKED) {
- return $prefix . $amper . $kid . "(" . $args . ")";
- } else {
- return $prefix . $amper. $kid;
- }
- } else {
- # glob() invocations can be translated into calls of
- # CORE::GLOBAL::glob with a second parameter, a number.
- # Reverse this.
- if ($kid eq "CORE::GLOBAL::glob") {
- $kid = "glob";
- $args =~ s/\s*,[^,]+$//;
- }
-
- # It's a syntax error to call CORE::GLOBAL::foo without a prefix,
- # so it must have been translated from a keyword call. Translate
- # it back.
- $kid =~ s/^CORE::GLOBAL:://;
-
- my $dproto = defined($proto) ? $proto : "undefined";
- if (!$declared) {
- return "$kid(" . $args . ")";
- } elsif ($dproto eq "") {
- return $kid;
- } elsif ($dproto eq "\$" and is_scalar($exprs[0])) {
- # is_scalar is an excessively conservative test here:
- # really, we should be comparing to the precedence of the
- # top operator of $exprs[0] (ala unop()), but that would
- # take some major code restructuring to do right.
- return $self->maybe_parens_func($kid, $args, $cx, 16);
- } elsif ($dproto ne '$' and defined($proto) || $simple) { #'
- return $self->maybe_parens_func($kid, $args, $cx, 5);
- } else {
- return "$kid(" . $args . ")";
- }
- }
-}
-
-sub pp_enterwrite { unop(@_, "write") }
-
-# escape things that cause interpolation in double quotes,
-# but not character escapes
-sub uninterp {
- my($str) = @_;
- $str =~ s/(^|\G|[^\\])((?:\\\\)*)([\$\@]|\\[uUlLQE])/$1$2\\$3/g;
- return $str;
-}
-
-{
-my $bal;
-BEGIN {
- use re "eval";
- # Matches any string which is balanced with respect to {braces}
- $bal = qr(
- (?:
- [^\\{}]
- | \\\\
- | \\[{}]
- | \{(??{$bal})\}
- )*
- )x;
-}
-
-# the same, but treat $|, $), $( and $ at the end of the string differently
-sub re_uninterp {
- my($str) = @_;
-
- $str =~ s/
- ( ^|\G # $1
- | [^\\]
- )
-
- ( # $2
- (?:\\\\)*
- )
-
- ( # $3
- (\(\?\??\{$bal\}\)) # $4
- | [\$\@]
- (?!\||\)|\(|$)
- | \\[uUlLQE]
- )
-
- /defined($4) && length($4) ? "$1$2$4" : "$1$2\\$3"/xeg;
-
- return $str;
-}
-
-# This is for regular expressions with the /x modifier
-# We have to leave comments unmangled.
-sub re_uninterp_extended {
- my($str) = @_;
-
- $str =~ s/
- ( ^|\G # $1
- | [^\\]
- )
-
- ( # $2
- (?:\\\\)*
- )
-
- ( # $3
- ( \(\?\??\{$bal\}\) # $4 (skip over (?{}) and (??{}) blocks)
- | \#[^\n]* # (skip over comments)
- )
- | [\$\@]
- (?!\||\)|\(|$|\s)
- | \\[uUlLQE]
- )
-
- /defined($4) && length($4) ? "$1$2$4" : "$1$2\\$3"/xeg;
-
- return $str;
-}
-}
-
-my %unctrl = # portable to to EBCDIC
- (
- "\c@" => '\c@', # unused
- "\cA" => '\cA',
- "\cB" => '\cB',
- "\cC" => '\cC',
- "\cD" => '\cD',
- "\cE" => '\cE',
- "\cF" => '\cF',
- "\cG" => '\cG',
- "\cH" => '\cH',
- "\cI" => '\cI',
- "\cJ" => '\cJ',
- "\cK" => '\cK',
- "\cL" => '\cL',
- "\cM" => '\cM',
- "\cN" => '\cN',
- "\cO" => '\cO',
- "\cP" => '\cP',
- "\cQ" => '\cQ',
- "\cR" => '\cR',
- "\cS" => '\cS',
- "\cT" => '\cT',
- "\cU" => '\cU',
- "\cV" => '\cV',
- "\cW" => '\cW',
- "\cX" => '\cX',
- "\cY" => '\cY',
- "\cZ" => '\cZ',
- "\c[" => '\c[', # unused
- "\c\\" => '\c\\', # unused
- "\c]" => '\c]', # unused
- "\c_" => '\c_', # unused
- );
-
-# character escapes, but not delimiters that might need to be escaped
-sub escape_str { # ASCII, UTF8
- my($str) = @_;
- $str =~ s/(.)/ord($1) > 255 ? sprintf("\\x{%x}", ord($1)) : $1/eg;
- $str =~ s/\a/\\a/g;
-# $str =~ s/\cH/\\b/g; # \b means something different in a regex
- $str =~ s/\t/\\t/g;
- $str =~ s/\n/\\n/g;
- $str =~ s/\e/\\e/g;
- $str =~ s/\f/\\f/g;
- $str =~ s/\r/\\r/g;
- $str =~ s/([\cA-\cZ])/$unctrl{$1}/ge;
- $str =~ s/([[:^print:]])/sprintf("\\%03o", ord($1))/ge;
- return $str;
-}
-
-# For regexes with the /x modifier.
-# Leave whitespace unmangled.
-sub escape_extended_re {
- my($str) = @_;
- $str =~ s/(.)/ord($1) > 255 ? sprintf("\\x{%x}", ord($1)) : $1/eg;
- $str =~ s/([[:^print:]])/
- ($1 =~ y! \t\n!!) ? $1 : sprintf("\\%03o", ord($1))/ge;
- $str =~ s/\n/\n\f/g;
- return $str;
-}
-
-# Don't do this for regexen
-sub unback {
- my($str) = @_;
- $str =~ s/\\/\\\\/g;
- return $str;
-}
-
-# Remove backslashes which precede literal control characters,
-# to avoid creating ambiguity when we escape the latter.
-sub re_unback {
- my($str) = @_;
-
- # the insane complexity here is due to the behaviour of "\c\"
- $str =~ s/(^|[^\\]|\\c\\)(?<!\\c)\\(\\\\)*(?=[[:^print:]])/$1$2/g;
- return $str;
-}
-
-sub balanced_delim {
- my($str) = @_;
- my @str = split //, $str;
- my($ar, $open, $close, $fail, $c, $cnt, $last_bs);
- for $ar (['[',']'], ['(',')'], ['<','>'], ['{','}']) {
- ($open, $close) = @$ar;
- $fail = 0; $cnt = 0; $last_bs = 0;
- for $c (@str) {
- if ($c eq $open) {
- $fail = 1 if $last_bs;
- $cnt++;
- } elsif ($c eq $close) {
- $fail = 1 if $last_bs;
- $cnt--;
- if ($cnt < 0) {
- # qq()() isn't ")("
- $fail = 1;
- last;
- }
- }
- $last_bs = $c eq '\\';
- }
- $fail = 1 if $cnt != 0;
- return ($open, "$open$str$close") if not $fail;
- }
- return ("", $str);
-}
-
-sub single_delim {
- my($q, $default, $str) = @_;
- return "$default$str$default" if $default and index($str, $default) == -1;
- if ($q ne 'qr') {
- (my $succeed, $str) = balanced_delim($str);
- return "$q$str" if $succeed;
- }
- for my $delim ('/', '"', '#') {
- return "$q$delim" . $str . $delim if index($str, $delim) == -1;
- }
- if ($default) {
- $str =~ s/$default/\\$default/g;
- return "$default$str$default";
- } else {
- $str =~ s[/][\\/]g;
- return "$q/$str/";
- }
-}
-
-my $max_prec;
-BEGIN { $max_prec = int(0.999 + 8*length(pack("F", 42))*log(2)/log(10)); }
-
-# Split a floating point number into an integer mantissa and a binary
-# exponent. Assumes you've already made sure the number isn't zero or
-# some weird infinity or NaN.
-sub split_float {
- my($f) = @_;
- my $exponent = 0;
- if ($f == int($f)) {
- while ($f % 2 == 0) {
- $f /= 2;
- $exponent++;
- }
- } else {
- while ($f != int($f)) {
- $f *= 2;
- $exponent--;
- }
- }
- my $mantissa = sprintf("%.0f", $f);
- return ($mantissa, $exponent);
-}
-
-sub const {
- my $self = shift;
- my($sv, $cx) = @_;
- if ($self->{'use_dumper'}) {
- return $self->const_dumper($sv, $cx);
- }
- if (class($sv) eq "SPECIAL") {
- # sv_undef, sv_yes, sv_no
- return ('undef', '1', $self->maybe_parens("!1", $cx, 21))[$$sv-1];
- }
- if (class($sv) eq "NULL") {
- return 'undef';
- }
- # convert a version object into the "v1.2.3" string in its V magic
- if ($sv->FLAGS & SVs_RMG) {
- for (my $mg = $sv->MAGIC; $mg; $mg = $mg->MOREMAGIC) {
- return $mg->PTR if $mg->TYPE eq 'V';
- }
- }
-
- if ($sv->FLAGS & SVf_IOK) {
- my $str = $sv->int_value;
- $str = $self->maybe_parens($str, $cx, 21) if $str < 0;
- return $str;
- } elsif ($sv->FLAGS & SVf_NOK) {
- my $nv = $sv->NV;
- if ($nv == 0) {
- if (pack("F", $nv) eq pack("F", 0)) {
- # positive zero
- return "0";
- } else {
- # negative zero
- return $self->maybe_parens("-.0", $cx, 21);
- }
- } elsif (1/$nv == 0) {
- if ($nv > 0) {
- # positive infinity
- return $self->maybe_parens("9**9**9", $cx, 22);
- } else {
- # negative infinity
- return $self->maybe_parens("-9**9**9", $cx, 21);
- }
- } elsif ($nv != $nv) {
- # NaN
- if (pack("F", $nv) eq pack("F", sin(9**9**9))) {
- # the normal kind
- return "sin(9**9**9)";
- } elsif (pack("F", $nv) eq pack("F", -sin(9**9**9))) {
- # the inverted kind
- return $self->maybe_parens("-sin(9**9**9)", $cx, 21);
- } else {
- # some other kind
- my $hex = unpack("h*", pack("F", $nv));
- return qq'unpack("F", pack("h*", "$hex"))';
- }
- }
- # first, try the default stringification
- my $str = "$nv";
- if ($str != $nv) {
- # failing that, try using more precision
- $str = sprintf("%.${max_prec}g", $nv);
-# if (pack("F", $str) ne pack("F", $nv)) {
- if ($str != $nv) {
- # not representable in decimal with whatever sprintf()
- # and atof() Perl is using here.
- my($mant, $exp) = split_float($nv);
- return $self->maybe_parens("$mant * 2**$exp", $cx, 19);
- }
- }
- $str = $self->maybe_parens($str, $cx, 21) if $nv < 0;
- return $str;
- } elsif ($sv->FLAGS & SVf_ROK && $sv->can("RV")) {
- my $ref = $sv->RV;
- if (class($ref) eq "AV") {
- return "[" . $self->list_const(2, $ref->ARRAY) . "]";
- } elsif (class($ref) eq "HV") {
- my %hash = $ref->ARRAY;
- my @elts;
- for my $k (sort keys %hash) {
- push @elts, "$k => " . $self->const($hash{$k}, 6);
- }
- return "{" . join(", ", @elts) . "}";
- } elsif (class($ref) eq "CV") {
- return "sub " . $self->deparse_sub($ref);
- }
- if ($ref->FLAGS & SVs_SMG) {
- for (my $mg = $ref->MAGIC; $mg; $mg = $mg->MOREMAGIC) {
- if ($mg->TYPE eq 'r') {
- my $re = re_uninterp(escape_str(re_unback($mg->precomp)));
- return single_delim("qr", "", $re);
- }
- }
- }
-
- return $self->maybe_parens("\\" . $self->const($ref, 20), $cx, 20);
- } elsif ($sv->FLAGS & SVf_POK) {
- my $str = $sv->PV;
- if ($str =~ /[[:^print:]]/) {
- return single_delim("qq", '"', uninterp escape_str unback $str);
- } else {
- return single_delim("q", "'", unback $str);
- }
- } else {
- return "undef";
- }
-}
-
-sub const_dumper {
- my $self = shift;
- my($sv, $cx) = @_;
- my $ref = $sv->object_2svref();
- my $dumper = Data::Dumper->new([$$ref], ['$v']);
- $dumper->Purity(1)->Terse(1)->Deparse(1)->Indent(0)->Useqq(1)->Sortkeys(1);
- my $str = $dumper->Dump();
- if ($str =~ /^\$v/) {
- return '${my ' . $str . ' \$v}';
- } else {
- return $str;
- }
-}
-
-sub const_sv {
- my $self = shift;
- my $op = shift;
- my $sv = $op->sv;
- # the constant could be in the pad (under useithreads)
- $sv = $self->padval($op->targ) unless $$sv;
- return $sv;
-}
-
-sub pp_const {
- my $self = shift;
- my($op, $cx) = @_;
- if ($op->private & OPpCONST_ARYBASE) {
- return '$[';
- }
-# if ($op->private & OPpCONST_BARE) { # trouble with `=>' autoquoting
-# return $self->const_sv($op)->PV;
-# }
- my $sv = $self->const_sv($op);
- return $self->const($sv, $cx);
-}
-
-sub dq {
- my $self = shift;
- my $op = shift;
- my $type = $op->name;
- if ($type eq "const") {
- return '$[' if $op->private & OPpCONST_ARYBASE;
- return uninterp(escape_str(unback($self->const_sv($op)->as_string)));
- } elsif ($type eq "concat") {
- my $first = $self->dq($op->first);
- my $last = $self->dq($op->last);
-
- # Disambiguate "${foo}bar", "${foo}{bar}", "${foo}[1]", "$foo\::bar"
- ($last =~ /^[A-Z\\\^\[\]_?]/ &&
- $first =~ s/([\$@])\^$/${1}{^}/) # "${^}W" etc
- || ($last =~ /^[:'{\[\w_]/ && #'
- $first =~ s/([\$@])([A-Za-z_]\w*)$/${1}{$2}/);
-
- return $first . $last;
- } elsif ($type eq "uc") {
- return '\U' . $self->dq($op->first->sibling) . '\E';
- } elsif ($type eq "lc") {
- return '\L' . $self->dq($op->first->sibling) . '\E';
- } elsif ($type eq "ucfirst") {
- return '\u' . $self->dq($op->first->sibling);
- } elsif ($type eq "lcfirst") {
- return '\l' . $self->dq($op->first->sibling);
- } elsif ($type eq "quotemeta") {
- return '\Q' . $self->dq($op->first->sibling) . '\E';
- } elsif ($type eq "join") {
- return $self->deparse($op->last, 26); # was join($", @ary)
- } else {
- return $self->deparse($op, 26);
- }
-}
-
-sub pp_backtick {
- my $self = shift;
- my($op, $cx) = @_;
- # skip pushmark if it exists (readpipe() vs ``)
- my $child = $op->first->sibling->isa('B::NULL')
- ? $op->first : $op->first->sibling;
- return single_delim("qx", '`', $self->dq($child));
-}
-
-sub dquote {
- my $self = shift;
- my($op, $cx) = @_;
- my $kid = $op->first->sibling; # skip ex-stringify, pushmark
- return $self->deparse($kid, $cx) if $self->{'unquote'};
- $self->maybe_targmy($kid, $cx,
- sub {single_delim("qq", '"', $self->dq($_[1]))});
-}
-
-# OP_STRINGIFY is a listop, but it only ever has one arg
-sub pp_stringify { maybe_targmy(@_, \&dquote) }
-
-# tr/// and s/// (and tr[][], tr[]//, tr###, etc)
-# note that tr(from)/to/ is OK, but not tr/from/(to)
-sub double_delim {
- my($from, $to) = @_;
- my($succeed, $delim);
- if ($from !~ m[/] and $to !~ m[/]) {
- return "/$from/$to/";
- } elsif (($succeed, $from) = balanced_delim($from) and $succeed) {
- if (($succeed, $to) = balanced_delim($to) and $succeed) {
- return "$from$to";
- } else {
- for $delim ('/', '"', '#') { # note no `'' -- s''' is special
- return "$from$delim$to$delim" if index($to, $delim) == -1;
- }
- $to =~ s[/][\\/]g;
- return "$from/$to/";
- }
- } else {
- for $delim ('/', '"', '#') { # note no '
- return "$delim$from$delim$to$delim"
- if index($to . $from, $delim) == -1;
- }
- $from =~ s[/][\\/]g;
- $to =~ s[/][\\/]g;
- return "/$from/$to/";
- }
-}
-
-# Only used by tr///, so backslashes hyphens
-sub pchr { # ASCII
- my($n) = @_;
- if ($n == ord '\\') {
- return '\\\\';
- } elsif ($n == ord "-") {
- return "\\-";
- } elsif ($n >= ord(' ') and $n <= ord('~')) {
- return chr($n);
- } elsif ($n == ord "\a") {
- return '\\a';
- } elsif ($n == ord "\b") {
- return '\\b';
- } elsif ($n == ord "\t") {
- return '\\t';
- } elsif ($n == ord "\n") {
- return '\\n';
- } elsif ($n == ord "\e") {
- return '\\e';
- } elsif ($n == ord "\f") {
- return '\\f';
- } elsif ($n == ord "\r") {
- return '\\r';
- } elsif ($n >= ord("\cA") and $n <= ord("\cZ")) {
- return '\\c' . chr(ord("@") + $n);
- } else {
-# return '\x' . sprintf("%02x", $n);
- return '\\' . sprintf("%03o", $n);
- }
-}
-
-sub collapse {
- my(@chars) = @_;
- my($str, $c, $tr) = ("");
- for ($c = 0; $c < @chars; $c++) {
- $tr = $chars[$c];
- $str .= pchr($tr);
- if ($c <= $#chars - 2 and $chars[$c + 1] == $tr + 1 and
- $chars[$c + 2] == $tr + 2)
- {
- for (; $c <= $#chars-1 and $chars[$c + 1] == $chars[$c] + 1; $c++)
- {}
- $str .= "-";
- $str .= pchr($chars[$c]);
- }
- }
- return $str;
-}
-
-sub tr_decode_byte {
- my($table, $flags) = @_;
- my(@table) = unpack("s*", $table);
- splice @table, 0x100, 1; # Number of subsequent elements
- my($c, $tr, @from, @to, @delfrom, $delhyphen);
- if ($table[ord "-"] != -1 and
- $table[ord("-") - 1] == -1 || $table[ord("-") + 1] == -1)
- {
- $tr = $table[ord "-"];
- $table[ord "-"] = -1;
- if ($tr >= 0) {
- @from = ord("-");
- @to = $tr;
- } else { # -2 ==> delete
- $delhyphen = 1;
- }
- }
- for ($c = 0; $c < @table; $c++) {
- $tr = $table[$c];
- if ($tr >= 0) {
- push @from, $c; push @to, $tr;
- } elsif ($tr == -2) {
- push @delfrom, $c;
- }
- }
- @from = (@from, @delfrom);
- if ($flags & OPpTRANS_COMPLEMENT) {
- my @newfrom = ();
- my %from;
- @from{@from} = (1) x @from;
- for ($c = 0; $c < 256; $c++) {
- push @newfrom, $c unless $from{$c};
- }
- @from = @newfrom;
- }
- unless ($flags & OPpTRANS_DELETE || !@to) {
- pop @to while $#to and $to[$#to] == $to[$#to -1];
- }
- my($from, $to);
- $from = collapse(@from);
- $to = collapse(@to);
- $from .= "-" if $delhyphen;
- return ($from, $to);
-}
-
-sub tr_chr {
- my $x = shift;
- if ($x == ord "-") {
- return "\\-";
- } elsif ($x == ord "\\") {
- return "\\\\";
- } else {
- return chr $x;
- }
-}
-
-# XXX This doesn't yet handle all cases correctly either
-
-sub tr_decode_utf8 {
- my($swash_hv, $flags) = @_;
- my %swash = $swash_hv->ARRAY;
- my $final = undef;
- $final = $swash{'FINAL'}->IV if exists $swash{'FINAL'};
- my $none = $swash{"NONE"}->IV;
- my $extra = $none + 1;
- my(@from, @delfrom, @to);
- my $line;
- foreach $line (split /\n/, $swash{'LIST'}->PV) {
- my($min, $max, $result) = split(/\t/, $line);
- $min = hex $min;
- if (length $max) {
- $max = hex $max;
- } else {
- $max = $min;
- }
- $result = hex $result;
- if ($result == $extra) {
- push @delfrom, [$min, $max];
- } else {
- push @from, [$min, $max];
- push @to, [$result, $result + $max - $min];
- }
- }
- for my $i (0 .. $#from) {
- if ($from[$i][0] == ord '-') {
- unshift @from, splice(@from, $i, 1);
- unshift @to, splice(@to, $i, 1);
- last;
- } elsif ($from[$i][1] == ord '-') {
- $from[$i][1]--;
- $to[$i][1]--;
- unshift @from, ord '-';
- unshift @to, ord '-';
- last;
- }
- }
- for my $i (0 .. $#delfrom) {
- if ($delfrom[$i][0] == ord '-') {
- push @delfrom, splice(@delfrom, $i, 1);
- last;
- } elsif ($delfrom[$i][1] == ord '-') {
- $delfrom[$i][1]--;
- push @delfrom, ord '-';
- last;
- }
- }
- if (defined $final and $to[$#to][1] != $final) {
- push @to, [$final, $final];
- }
- push @from, @delfrom;
- if ($flags & OPpTRANS_COMPLEMENT) {
- my @newfrom;
- my $next = 0;
- for my $i (0 .. $#from) {
- push @newfrom, [$next, $from[$i][0] - 1];
- $next = $from[$i][1] + 1;
- }
- @from = ();
- for my $range (@newfrom) {
- if ($range->[0] <= $range->[1]) {
- push @from, $range;
- }
- }
- }
- my($from, $to, $diff);
- for my $chunk (@from) {
- $diff = $chunk->[1] - $chunk->[0];
- if ($diff > 1) {
- $from .= tr_chr($chunk->[0]) . "-" . tr_chr($chunk->[1]);
- } elsif ($diff == 1) {
- $from .= tr_chr($chunk->[0]) . tr_chr($chunk->[1]);
- } else {
- $from .= tr_chr($chunk->[0]);
- }
- }
- for my $chunk (@to) {
- $diff = $chunk->[1] - $chunk->[0];
- if ($diff > 1) {
- $to .= tr_chr($chunk->[0]) . "-" . tr_chr($chunk->[1]);
- } elsif ($diff == 1) {
- $to .= tr_chr($chunk->[0]) . tr_chr($chunk->[1]);
- } else {
- $to .= tr_chr($chunk->[0]);
- }
- }
- #$final = sprintf("%04x", $final) if defined $final;
- #$none = sprintf("%04x", $none) if defined $none;
- #$extra = sprintf("%04x", $extra) if defined $extra;
- #print STDERR "final: $final\n none: $none\nextra: $extra\n";
- #print STDERR $swash{'LIST'}->PV;
- return (escape_str($from), escape_str($to));
-}
-
-sub pp_trans {
- my $self = shift;
- my($op, $cx) = @_;
- my($from, $to);
- if (class($op) eq "PVOP") {
- ($from, $to) = tr_decode_byte($op->pv, $op->private);
- } else { # class($op) eq "SVOP"
- ($from, $to) = tr_decode_utf8($op->sv->RV, $op->private);
- }
- my $flags = "";
- $flags .= "c" if $op->private & OPpTRANS_COMPLEMENT;
- $flags .= "d" if $op->private & OPpTRANS_DELETE;
- $to = "" if $from eq $to and $flags eq "";
- $flags .= "s" if $op->private & OPpTRANS_SQUASH;
- return "tr" . double_delim($from, $to) . $flags;
-}
-
-sub re_dq_disambiguate {
- my ($first, $last) = @_;
- # Disambiguate "${foo}bar", "${foo}{bar}", "${foo}[1]"
- ($last =~ /^[A-Z\\\^\[\]_?]/ &&
- $first =~ s/([\$@])\^$/${1}{^}/) # "${^}W" etc
- || ($last =~ /^[{\[\w_]/ &&
- $first =~ s/([\$@])([A-Za-z_]\w*)$/${1}{$2}/);
- return $first . $last;
-}
-
-# Like dq(), but different
-sub re_dq {
- my $self = shift;
- my ($op, $extended) = @_;
-
- my $type = $op->name;
- if ($type eq "const") {
- return '$[' if $op->private & OPpCONST_ARYBASE;
- my $unbacked = re_unback($self->const_sv($op)->as_string);
- return re_uninterp_extended(escape_extended_re($unbacked))
- if $extended;
- return re_uninterp(escape_str($unbacked));
- } elsif ($type eq "concat") {
- my $first = $self->re_dq($op->first, $extended);
- my $last = $self->re_dq($op->last, $extended);
- return re_dq_disambiguate($first, $last);
- } elsif ($type eq "uc") {
- return '\U' . $self->re_dq($op->first->sibling, $extended) . '\E';
- } elsif ($type eq "lc") {
- return '\L' . $self->re_dq($op->first->sibling, $extended) . '\E';
- } elsif ($type eq "ucfirst") {
- return '\u' . $self->re_dq($op->first->sibling, $extended);
- } elsif ($type eq "lcfirst") {
- return '\l' . $self->re_dq($op->first->sibling, $extended);
- } elsif ($type eq "quotemeta") {
- return '\Q' . $self->re_dq($op->first->sibling, $extended) . '\E';
- } elsif ($type eq "join") {
- return $self->deparse($op->last, 26); # was join($", @ary)
- } else {
- return $self->deparse($op, 26);
- }
-}
-
-sub pure_string {
- my ($self, $op) = @_;
- return 0 if null $op;
- my $type = $op->name;
-
- if ($type eq 'const') {
- return 1;
- }
- elsif ($type =~ /^[ul]c(first)?$/ || $type eq 'quotemeta') {
- return $self->pure_string($op->first->sibling);
- }
- elsif ($type eq 'join') {
- my $join_op = $op->first->sibling; # Skip pushmark
- return 0 unless $join_op->name eq 'null' && $join_op->targ eq OP_RV2SV;
-
- my $gvop = $join_op->first;
- return 0 unless $gvop->name eq 'gvsv';
- return 0 unless '"' eq $self->gv_name($self->gv_or_padgv($gvop));
-
- return 0 unless ${$join_op->sibling} eq ${$op->last};
- return 0 unless $op->last->name =~ /^(?:[ah]slice|(?:rv2|pad)av)$/;
- }
- elsif ($type eq 'concat') {
- return $self->pure_string($op->first)
- && $self->pure_string($op->last);
- }
- elsif (is_scalar($op) || $type =~ /^[ah]elem$/) {
- return 1;
- }
- elsif ($type eq "null" and $op->can('first') and not null $op->first and
- $op->first->name eq "null" and $op->first->can('first')
- and not null $op->first->first and
- $op->first->first->name eq "aelemfast") {
- return 1;
- }
- else {
- return 0;
- }
-
- return 1;
-}
-
-sub regcomp {
- my $self = shift;
- my($op, $cx, $extended) = @_;
- my $kid = $op->first;
- $kid = $kid->first if $kid->name eq "regcmaybe";
- $kid = $kid->first if $kid->name eq "regcreset";
- if ($kid->name eq "null" and !null($kid->first)
- and $kid->first->name eq 'pushmark')
- {
- my $str = '';
- $kid = $kid->first->sibling;
- while (!null($kid)) {
- my $first = $str;
- my $last = $self->re_dq($kid, $extended);
- $str = re_dq_disambiguate($first, $last);
- $kid = $kid->sibling;
- }
- return $str, 1;
- }
-
- return ($self->re_dq($kid, $extended), 1) if $self->pure_string($kid);
- return ($self->deparse($kid, $cx), 0);
-}
-
-sub pp_regcomp {
- my ($self, $op, $cx) = @_;
- return (($self->regcomp($op, $cx, 0))[0]);
-}
-
-# osmic acid -- see osmium tetroxide
-
-my %matchwords;
-map($matchwords{join "", sort split //, $_} = $_, 'cig', 'cog', 'cos', 'cogs',
- 'cox', 'go', 'is', 'ism', 'iso', 'mig', 'mix', 'osmic', 'ox', 'sic',
- 'sig', 'six', 'smog', 'so', 'soc', 'sog', 'xi');
-
-sub matchop {
- my $self = shift;
- my($op, $cx, $name, $delim) = @_;
- my $kid = $op->first;
- my ($binop, $var, $re) = ("", "", "");
- if ($op->flags & OPf_STACKED) {
- $binop = 1;
- $var = $self->deparse($kid, 20);
- $kid = $kid->sibling;
- }
- my $quote = 1;
- my $extended = ($op->pmflags & PMf_EXTENDED);
- if (null $kid) {
- my $unbacked = re_unback($op->precomp);
- if ($extended) {
- $re = re_uninterp_extended(escape_extended_re($unbacked));
- } else {
- $re = re_uninterp(escape_str(re_unback($op->precomp)));
- }
- } elsif ($kid->name ne 'regcomp') {
- carp("found ".$kid->name." where regcomp expected");
- } else {
- ($re, $quote) = $self->regcomp($kid, 21, $extended);
- }
- my $flags = "";
- $flags .= "c" if $op->pmflags & PMf_CONTINUE;
- $flags .= "g" if $op->pmflags & PMf_GLOBAL;
- $flags .= "i" if $op->pmflags & PMf_FOLD;
- $flags .= "m" if $op->pmflags & PMf_MULTILINE;
- $flags .= "o" if $op->pmflags & PMf_KEEP;
- $flags .= "s" if $op->pmflags & PMf_SINGLELINE;
- $flags .= "x" if $op->pmflags & PMf_EXTENDED;
- $flags = $matchwords{$flags} if $matchwords{$flags};
- if ($op->pmflags & PMf_ONCE) { # only one kind of delimiter works here
- $re =~ s/\?/\\?/g;
- $re = "?$re?";
- } elsif ($quote) {
- $re = single_delim($name, $delim, $re);
- }
- $re = $re . $flags if $quote;
- if ($binop) {
- return $self->maybe_parens("$var =~ $re", $cx, 20);
- } else {
- return $re;
- }
-}
-
-sub pp_match { matchop(@_, "m", "/") }
-sub pp_pushre { matchop(@_, "m", "/") }
-sub pp_qr { matchop(@_, "qr", "") }
-
-sub pp_split {
- my $self = shift;
- my($op, $cx) = @_;
- my($kid, @exprs, $ary, $expr);
- $kid = $op->first;
-
- # For our kid (an OP_PUSHRE), pmreplroot is never actually the
- # root of a replacement; it's either empty, or abused to point to
- # the GV for an array we split into (an optimization to save
- # assignment overhead). Depending on whether we're using ithreads,
- # this OP* holds either a GV* or a PADOFFSET. Luckily, B.xs
- # figures out for us which it is.
- my $replroot = $kid->pmreplroot;
- my $gv = 0;
- if (ref($replroot) eq "B::GV") {
- $gv = $replroot;
- } elsif (!ref($replroot) and $replroot > 0) {
- $gv = $self->padval($replroot);
- }
- $ary = $self->stash_variable('@', $self->gv_name($gv)) if $gv;
-
- for (; !null($kid); $kid = $kid->sibling) {
- push @exprs, $self->deparse($kid, 6);
- }
-
- # handle special case of split(), and split(' ') that compiles to /\s+/
- $kid = $op->first;
- if ( $kid->flags & OPf_SPECIAL
- and ( $] < 5.009 ? $kid->pmflags & PMf_SKIPWHITE()
- : $kid->reflags & RXf_SKIPWHITE() ) ) {
- $exprs[0] = "' '";
- }
-
- $expr = "split(" . join(", ", @exprs) . ")";
- if ($ary) {
- return $self->maybe_parens("$ary = $expr", $cx, 7);
- } else {
- return $expr;
- }
-}
-
-# oxime -- any of various compounds obtained chiefly by the action of
-# hydroxylamine on aldehydes and ketones and characterized by the
-# bivalent grouping C=NOH [Webster's Tenth]
-
-my %substwords;
-map($substwords{join "", sort split //, $_} = $_, 'ego', 'egoism', 'em',
- 'es', 'ex', 'exes', 'gee', 'go', 'goes', 'ie', 'ism', 'iso', 'me',
- 'meese', 'meso', 'mig', 'mix', 'os', 'ox', 'oxime', 'see', 'seem',
- 'seg', 'sex', 'sig', 'six', 'smog', 'sog', 'some', 'xi');
-
-sub pp_subst {
- my $self = shift;
- my($op, $cx) = @_;
- my $kid = $op->first;
- my($binop, $var, $re, $repl) = ("", "", "", "");
- if ($op->flags & OPf_STACKED) {
- $binop = 1;
- $var = $self->deparse($kid, 20);
- $kid = $kid->sibling;
- }
- my $flags = "";
- if (null($op->pmreplroot)) {
- $repl = $self->dq($kid);
- $kid = $kid->sibling;
- } else {
- $repl = $op->pmreplroot->first; # skip substcont
- while ($repl->name eq "entereval") {
- $repl = $repl->first;
- $flags .= "e";
- }
- if ($op->pmflags & PMf_EVAL) {
- $repl = $self->deparse($repl->first, 0);
- } else {
- $repl = $self->dq($repl);
- }
- }
- my $extended = ($op->pmflags & PMf_EXTENDED);
- if (null $kid) {
- my $unbacked = re_unback($op->precomp);
- if ($extended) {
- $re = re_uninterp_extended(escape_extended_re($unbacked));
- }
- else {
- $re = re_uninterp(escape_str($unbacked));
- }
- } else {
- ($re) = $self->regcomp($kid, 1, $extended);
- }
- $flags .= "e" if $op->pmflags & PMf_EVAL;
- $flags .= "g" if $op->pmflags & PMf_GLOBAL;
- $flags .= "i" if $op->pmflags & PMf_FOLD;
- $flags .= "m" if $op->pmflags & PMf_MULTILINE;
- $flags .= "o" if $op->pmflags & PMf_KEEP;
- $flags .= "s" if $op->pmflags & PMf_SINGLELINE;
- $flags .= "x" if $extended;
- $flags = $substwords{$flags} if $substwords{$flags};
- if ($binop) {
- return $self->maybe_parens("$var =~ s"
- . double_delim($re, $repl) . $flags,
- $cx, 20);
- } else {
- return "s". double_delim($re, $repl) . $flags;
- }
-}
-
-1;
-__END__
-
-=head1 NAME
-
-B::Deparse - Perl compiler backend to produce perl code
-
-=head1 SYNOPSIS
-
-B<perl> B<-MO=Deparse>[B<,-d>][B<,-f>I<FILE>][B<,-p>][B<,-q>][B<,-l>]
- [B<,-s>I<LETTERS>][B<,-x>I<LEVEL>] I<prog.pl>
-
-=head1 DESCRIPTION
-
-B::Deparse is a backend module for the Perl compiler that generates
-perl source code, based on the internal compiled structure that perl
-itself creates after parsing a program. The output of B::Deparse won't
-be exactly the same as the original source, since perl doesn't keep
-track of comments or whitespace, and there isn't a one-to-one
-correspondence between perl's syntactical constructions and their
-compiled form, but it will often be close. When you use the B<-p>
-option, the output also includes parentheses even when they are not
-required by precedence, which can make it easy to see if perl is
-parsing your expressions the way you intended.
-
-While B::Deparse goes to some lengths to try to figure out what your
-original program was doing, some parts of the language can still trip
-it up; it still fails even on some parts of Perl's own test suite. If
-you encounter a failure other than the most common ones described in
-the BUGS section below, you can help contribute to B::Deparse's
-ongoing development by submitting a bug report with a small
-example.
-
-=head1 OPTIONS
-
-As with all compiler backend options, these must follow directly after
-the '-MO=Deparse', separated by a comma but not any white space.
-
-=over 4
-
-=item B<-d>
-
-Output data values (when they appear as constants) using Data::Dumper.
-Without this option, B::Deparse will use some simple routines of its
-own for the same purpose. Currently, Data::Dumper is better for some
-kinds of data (such as complex structures with sharing and
-self-reference) while the built-in routines are better for others
-(such as odd floating-point values).
-
-=item B<-f>I<FILE>
-
-Normally, B::Deparse deparses the main code of a program, and all the subs
-defined in the same file. To include subs defined in other files, pass the
-B<-f> option with the filename. You can pass the B<-f> option several times, to
-include more than one secondary file. (Most of the time you don't want to
-use it at all.) You can also use this option to include subs which are
-defined in the scope of a B<#line> directive with two parameters.
-
-=item B<-l>
-
-Add '#line' declarations to the output based on the line and file
-locations of the original code.
-
-=item B<-p>
-
-Print extra parentheses. Without this option, B::Deparse includes
-parentheses in its output only when they are needed, based on the
-structure of your program. With B<-p>, it uses parentheses (almost)
-whenever they would be legal. This can be useful if you are used to
-LISP, or if you want to see how perl parses your input. If you say
-
- if ($var & 0x7f == 65) {print "Gimme an A!"}
- print ($which ? $a : $b), "\n";
- $name = $ENV{USER} or "Bob";
-
-C<B::Deparse,-p> will print
-
- if (($var & 0)) {
- print('Gimme an A!')
- };
- (print(($which ? $a : $b)), '???');
- (($name = $ENV{'USER'}) or '???')
-
-which probably isn't what you intended (the C<'???'> is a sign that
-perl optimized away a constant value).
-
-=item B<-P>
-
-Disable prototype checking. With this option, all function calls are
-deparsed as if no prototype was defined for them. In other words,
-
- perl -MO=Deparse,-P -e 'sub foo (\@) { 1 } foo @x'
-
-will print
-
- sub foo (\@) {
- 1;
- }
- &foo(\@x);
-
-making clear how the parameters are actually passed to C<foo>.
-
-=item B<-q>
-
-Expand double-quoted strings into the corresponding combinations of
-concatenation, uc, ucfirst, lc, lcfirst, quotemeta, and join. For
-instance, print
-
- print "Hello, $world, @ladies, \u$gentlemen\E, \u\L$me!";
-
-as
-
- print 'Hello, ' . $world . ', ' . join($", @ladies) . ', '
- . ucfirst($gentlemen) . ', ' . ucfirst(lc $me . '!');
-
-Note that the expanded form represents the way perl handles such
-constructions internally -- this option actually turns off the reverse
-translation that B::Deparse usually does. On the other hand, note that
-C<$x = "$y"> is not the same as C<$x = $y>: the former makes the value
-of $y into a string before doing the assignment.
-
-=item B<-s>I<LETTERS>
-
-Tweak the style of B::Deparse's output. The letters should follow
-directly after the 's', with no space or punctuation. The following
-options are available:
-
-=over 4
-
-=item B<C>
-
-Cuddle C<elsif>, C<else>, and C<continue> blocks. For example, print
-
- if (...) {
- ...
- } else {
- ...
- }
-
-instead of
-
- if (...) {
- ...
- }
- else {
- ...
- }
-
-The default is not to cuddle.
-
-=item B<i>I<NUMBER>
-
-Indent lines by multiples of I<NUMBER> columns. The default is 4 columns.
-
-=item B<T>
-
-Use tabs for each 8 columns of indent. The default is to use only spaces.
-For instance, if the style options are B<-si4T>, a line that's indented
-3 times will be preceded by one tab and four spaces; if the options were
-B<-si8T>, the same line would be preceded by three tabs.
-
-=item B<v>I<STRING>B<.>
-
-Print I<STRING> for the value of a constant that can't be determined
-because it was optimized away (mnemonic: this happens when a constant
-is used in B<v>oid context). The end of the string is marked by a period.
-The string should be a valid perl expression, generally a constant.
-Note that unless it's a number, it probably needs to be quoted, and on
-a command line quotes need to be protected from the shell. Some
-conventional values include 0, 1, 42, '', 'foo', and
-'Useless use of constant omitted' (which may need to be
-B<-sv"'Useless use of constant omitted'.">
-or something similar depending on your shell). The default is '???'.
-If you're using B::Deparse on a module or other file that's require'd,
-you shouldn't use a value that evaluates to false, since the customary
-true constant at the end of a module will be in void context when the
-file is compiled as a main program.
-
-=back
-
-=item B<-x>I<LEVEL>
-
-Expand conventional syntax constructions into equivalent ones that expose
-their internal operation. I<LEVEL> should be a digit, with higher values
-meaning more expansion. As with B<-q>, this actually involves turning off
-special cases in B::Deparse's normal operations.
-
-If I<LEVEL> is at least 3, C<for> loops will be translated into equivalent
-while loops with continue blocks; for instance
-
- for ($i = 0; $i < 10; ++$i) {
- print $i;
- }
-
-turns into
-
- $i = 0;
- while ($i < 10) {
- print $i;
- } continue {
- ++$i
- }
-
-Note that in a few cases this translation can't be perfectly carried back
-into the source code -- if the loop's initializer declares a my variable,
-for instance, it won't have the correct scope outside of the loop.
-
-If I<LEVEL> is at least 5, C<use> declarations will be translated into
-C<BEGIN> blocks containing calls to C<require> and C<import>; for
-instance,
-
- use strict 'refs';
-
-turns into
-
- sub BEGIN {
- require strict;
- do {
- 'strict'->import('refs')
- };
- }
-
-If I<LEVEL> is at least 7, C<if> statements will be translated into
-equivalent expressions using C<&&>, C<?:> and C<do {}>; for instance
-
- print 'hi' if $nice;
- if ($nice) {
- print 'hi';
- }
- if ($nice) {
- print 'hi';
- } else {
- print 'bye';
- }
-
-turns into
-
- $nice and print 'hi';
- $nice and do { print 'hi' };
- $nice ? do { print 'hi' } : do { print 'bye' };
-
-Long sequences of elsifs will turn into nested ternary operators, which
-B::Deparse doesn't know how to indent nicely.
-
-=back
-
-=head1 USING B::Deparse AS A MODULE
-
-=head2 Synopsis
-
- use B::Deparse;
- $deparse = B::Deparse->new("-p", "-sC");
- $body = $deparse->coderef2text(\&func);
- eval "sub func $body"; # the inverse operation
-
-=head2 Description
-
-B::Deparse can also be used on a sub-by-sub basis from other perl
-programs.
-
-=head2 new
-
- $deparse = B::Deparse->new(OPTIONS)
-
-Create an object to store the state of a deparsing operation and any
-options. The options are the same as those that can be given on the
-command line (see L</OPTIONS>); options that are separated by commas
-after B<-MO=Deparse> should be given as separate strings.
-
-=head2 ambient_pragmas
-
- $deparse->ambient_pragmas(strict => 'all', '$[' => $[);
-
-The compilation of a subroutine can be affected by a few compiler
-directives, B<pragmas>. These are:
-
-=over 4
-
-=item *
-
-use strict;
-
-=item *
-
-use warnings;
-
-=item *
-
-Assigning to the special variable $[
-
-=item *
-
-use integer;
-
-=item *
-
-use bytes;
-
-=item *
-
-use utf8;
-
-=item *
-
-use re;
-
-=back
-
-Ordinarily, if you use B::Deparse on a subroutine which has
-been compiled in the presence of one or more of these pragmas,
-the output will include statements to turn on the appropriate
-directives. So if you then compile the code returned by coderef2text,
-it will behave the same way as the subroutine which you deparsed.
-
-However, you may know that you intend to use the results in a
-particular context, where some pragmas are already in scope. In
-this case, you use the B<ambient_pragmas> method to describe the
-assumptions you wish to make.
-
-Not all of the options currently have any useful effect. See
-L</BUGS> for more details.
-
-The parameters it accepts are:
-
-=over 4
-
-=item strict
-
-Takes a string, possibly containing several values separated
-by whitespace. The special values "all" and "none" mean what you'd
-expect.
-
- $deparse->ambient_pragmas(strict => 'subs refs');
-
-=item $[
-
-Takes a number, the value of the array base $[.
-
-=item bytes
-
-=item utf8
-
-=item integer
-
-If the value is true, then the appropriate pragma is assumed to
-be in the ambient scope, otherwise not.
-
-=item re
-
-Takes a string, possibly containing a whitespace-separated list of
-values. The values "all" and "none" are special. It's also permissible
-to pass an array reference here.
-
- $deparser->ambient_pragmas(re => 'eval');
-
-
-=item warnings
-
-Takes a string, possibly containing a whitespace-separated list of
-values. The values "all" and "none" are special, again. It's also
-permissible to pass an array reference here.
-
- $deparser->ambient_pragmas(warnings => [qw[void io]]);
-
-If one of the values is the string "FATAL", then all the warnings
-in that list will be considered fatal, just as with the B<warnings>
-pragma itself. Should you need to specify that some warnings are
-fatal, and others are merely enabled, you can pass the B<warnings>
-parameter twice:
-
- $deparser->ambient_pragmas(
- warnings => 'all',
- warnings => [FATAL => qw/void io/],
- );
-
-See L<perllexwarn> for more information about lexical warnings.
-
-=item hint_bits
-
-=item warning_bits
-
-These two parameters are used to specify the ambient pragmas in
-the format used by the special variables $^H and ${^WARNING_BITS}.
-
-They exist principally so that you can write code like:
-
- { my ($hint_bits, $warning_bits);
- BEGIN {($hint_bits, $warning_bits) = ($^H, ${^WARNING_BITS})}
- $deparser->ambient_pragmas (
- hint_bits => $hint_bits,
- warning_bits => $warning_bits,
- '$[' => 0 + $[
- ); }
-
-which specifies that the ambient pragmas are exactly those which
-are in scope at the point of calling.
-
-=item %^H
-
-This parameter is used to specify the ambient pragmas which are
-stored in the special hash %^H.
-
-=back
-
-=head2 coderef2text
-
- $body = $deparse->coderef2text(\&func)
- $body = $deparse->coderef2text(sub ($$) { ... })
-
-Return source code for the body of a subroutine (a block, optionally
-preceded by a prototype in parens), given a reference to the
-sub. Because a subroutine can have no names, or more than one name,
-this method doesn't return a complete subroutine definition -- if you
-want to eval the result, you should prepend "sub subname ", or "sub "
-for an anonymous function constructor. Unless the sub was defined in
-the main:: package, the code will include a package declaration.
-
-=head1 BUGS
-
-=over 4
-
-=item *
-
-The only pragmas to be completely supported are: C<use warnings>,
-C<use strict 'refs'>, C<use bytes>, and C<use integer>. (C<$[>, which
-behaves like a pragma, is also supported.)
-
-Excepting those listed above, we're currently unable to guarantee that
-B::Deparse will produce a pragma at the correct point in the program.
-(Specifically, pragmas at the beginning of a block often appear right
-before the start of the block instead.)
-Since the effects of pragmas are often lexically scoped, this can mean
-that the pragma holds sway over a different portion of the program
-than in the input file.
-
-=item *
-
-In fact, the above is a specific instance of a more general problem:
-we can't guarantee to produce BEGIN blocks or C<use> declarations in
-exactly the right place. So if you use a module which affects compilation
-(such as by over-riding keywords, overloading constants or whatever)
-then the output code might not work as intended.
-
-This is the most serious outstanding problem, and will require some help
-from the Perl core to fix.
-
-=item *
-
-If a keyword is over-ridden, and your program explicitly calls
-the built-in version by using CORE::keyword, the output of B::Deparse
-will not reflect this. If you run the resulting code, it will call
-the over-ridden version rather than the built-in one. (Maybe there
-should be an option to B<always> print keyword calls as C<CORE::name>.)
-
-=item *
-
-Some constants don't print correctly either with or without B<-d>.
-For instance, neither B::Deparse nor Data::Dumper know how to print
-dual-valued scalars correctly, as in:
-
- use constant E2BIG => ($!=7); $y = E2BIG; print $y, 0+$y;
-
- use constant H => { "#" => 1 }; H->{"#"};
-
-=item *
-
-An input file that uses source filtering probably won't be deparsed into
-runnable code, because it will still include the B<use> declaration
-for the source filtering module, even though the code that is
-produced is already ordinary Perl which shouldn't be filtered again.
-
-=item *
-
-Optimised away statements are rendered as '???'. This includes statements that
-have a compile-time side-effect, such as the obscure
-
- my $x if 0;
-
-which is not, consequently, deparsed correctly.
-
- foreach my $i (@_) { 0 }
- =>
- foreach my $i (@_) { '???' }
-
-=item *
-
-Lexical (my) variables declared in scopes external to a subroutine
-appear in code2ref output text as package variables. This is a tricky
-problem, as perl has no native facility for refering to a lexical variable
-defined within a different scope, although L<PadWalker> is a good start.
-
-=item *
-
-There are probably many more bugs on non-ASCII platforms (EBCDIC).
-
-=back
-
-=head1 AUTHOR
-
-Stephen McCamant <smcc at CSUA.Berkeley.EDU>, based on an earlier version
-by Malcolm Beattie <mbeattie at sable.ox.ac.uk>, with contributions from
-Gisle Aas, James Duncan, Albert Dvornik, Robin Houston, Dave Mitchell,
-Hugo van der Sanden, Gurusamy Sarathy, Nick Ing-Simmons, and Rafael
-Garcia-Suarez.
-
-=cut
Deleted: vendor/perl/dist/ext/B/B/Lint.pm
===================================================================
--- vendor/perl/dist/ext/B/B/Lint.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/B/B/Lint.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,792 +0,0 @@
-package B::Lint;
-
-our $VERSION = '1.11'; ## no critic
-
-=head1 NAME
-
-B::Lint - Perl lint
-
-=head1 SYNOPSIS
-
-perl -MO=Lint[,OPTIONS] foo.pl
-
-=head1 DESCRIPTION
-
-The B::Lint module is equivalent to an extended version of the B<-w>
-option of B<perl>. It is named after the program F<lint> which carries
-out a similar process for C programs.
-
-=head1 OPTIONS AND LINT CHECKS
-
-Option words are separated by commas (not whitespace) and follow the
-usual conventions of compiler backend options. Following any options
-(indicated by a leading B<->) come lint check arguments. Each such
-argument (apart from the special B<all> and B<none> options) is a
-word representing one possible lint check (turning on that check) or
-is B<no-foo> (turning off that check). Before processing the check
-arguments, a standard list of checks is turned on. Later options
-override earlier ones. Available options are:
-
-=over 8
-
-=item B<magic-diamond>
-
-Produces a warning whenever the magic C<E<lt>E<gt>> readline is
-used. Internally it uses perl's two-argument open which itself treats
-filenames with special characters specially. This could allow
-interestingly named files to have unexpected effects when reading.
-
- % touch 'rm *|'
- % perl -pe 1
-
-The above creates a file named C<rm *|>. When perl opens it with
-C<E<lt>E<gt>> it actually executes the shell program C<rm *>. This
-makes C<E<lt>E<gt>> dangerous to use carelessly.
-
-=item B<context>
-
-Produces a warning whenever an array is used in an implicit scalar
-context. For example, both of the lines
-
- $foo = length(@bar);
- $foo = @bar;
-
-will elicit a warning. Using an explicit B<scalar()> silences the
-warning. For example,
-
- $foo = scalar(@bar);
-
-=item B<implicit-read> and B<implicit-write>
-
-These options produce a warning whenever an operation implicitly
-reads or (respectively) writes to one of Perl's special variables.
-For example, B<implicit-read> will warn about these:
-
- /foo/;
-
-and B<implicit-write> will warn about these:
-
- s/foo/bar/;
-
-Both B<implicit-read> and B<implicit-write> warn about this:
-
- for (@a) { ... }
-
-=item B<bare-subs>
-
-This option warns whenever a bareword is implicitly quoted, but is also
-the name of a subroutine in the current package. Typical mistakes that it will
-trap are:
-
- use constant foo => 'bar';
- @a = ( foo => 1 );
- $b{foo} = 2;
-
-Neither of these will do what a naive user would expect.
-
-=item B<dollar-underscore>
-
-This option warns whenever C<$_> is used either explicitly anywhere or
-as the implicit argument of a B<print> statement.
-
-=item B<private-names>
-
-This option warns on each use of any variable, subroutine or
-method name that lives in a non-current package but begins with
-an underscore ("_"). Warnings aren't issued for the special case
-of the single character name "_" by itself (e.g. C<$_> and C<@_>).
-
-=item B<undefined-subs>
-
-This option warns whenever an undefined subroutine is invoked.
-This option will only catch explicitly invoked subroutines such
-as C<foo()> and not indirect invocations such as C<&$subref()>
-or C<$obj-E<gt>meth()>. Note that some programs or modules delay
-definition of subs until runtime by means of the AUTOLOAD
-mechanism.
-
-=item B<regexp-variables>
-
-This option warns whenever one of the regexp variables C<$`>, C<$&> or C<$'>
-is used. Any occurrence of any of these variables in your
-program can slow your whole program down. See L<perlre> for
-details.
-
-=item B<all>
-
-Turn all warnings on.
-
-=item B<none>
-
-Turn all warnings off.
-
-=back
-
-=head1 NON LINT-CHECK OPTIONS
-
-=over 8
-
-=item B<-u Package>
-
-Normally, Lint only checks the main code of the program together
-with all subs defined in package main. The B<-u> option lets you
-include other package names whose subs are then checked by Lint.
-
-=back
-
-=head1 EXTENDING LINT
-
-Lint can be extended by with plugins. Lint uses L<Module::Pluggable>
-to find available plugins. Plugins are expected but not required to
-inform Lint of which checks they are adding.
-
-The C<< B::Lint->register_plugin( MyPlugin => \@new_checks ) >> method
-adds the list of C<@new_checks> to the list of valid checks. If your
-module wasn't loaded by L<Module::Pluggable> then your class name is
-added to the list of plugins.
-
-You must create a C<match( \%checks )> method in your plugin class or one
-of its parents. It will be called on every op as a regular method call
-with a hash ref of checks as its parameter.
-
-The class methods C<< B::Lint->file >> and C<< B::Lint->line >> contain
-the current filename and line number.
-
- package Sample;
- use B::Lint;
- B::Lint->register_plugin( Sample => [ 'good_taste' ] );
-
- sub match {
- my ( $op, $checks_href ) = shift @_;
- if ( $checks_href->{good_taste} ) {
- ...
- }
- }
-
-=head1 TODO
-
-=over
-
-=item while(<FH>) stomps $_
-
-=item strict oo
-
-=item unchecked system calls
-
-=item more tests, validate against older perls
-
-=back
-
-=head1 BUGS
-
-This is only a very preliminary version.
-
-=head1 AUTHOR
-
-Malcolm Beattie, mbeattie at sable.ox.ac.uk.
-
-=head1 ACKNOWLEDGEMENTS
-
-Sebastien Aperghis-Tramoni - bug fixes
-
-=cut
-
-use strict;
-use B qw( walkoptree_slow
- main_root main_cv walksymtable parents
- OPpOUR_INTRO
- OPf_WANT_VOID OPf_WANT_LIST OPf_WANT OPf_STACKED SVf_POK );
-use Carp 'carp';
-
-# The current M::P doesn't know about .pmc files.
-use Module::Pluggable ( require => 1 );
-
-use List::Util 'first';
-## no critic Prototypes
-sub any (&@) { my $test = shift @_; $test->() and return 1 for @_; return 0 }
-
-BEGIN {
-
- # Import or create some constants from B. B doesn't provide
- # everything I need so some things like OPpCONST_BARE are defined
- # here.
- for my $sym ( qw( begin_av check_av init_av end_av ),
- [ 'OPpCONST_BARE' => 64 ] )
- {
- my $val;
- ( $sym, $val ) = @$sym if ref $sym;
-
- if ( any { $sym eq $_ } @B::EXPORT_OK, @B::EXPORT ) {
- B->import($sym);
- }
- else {
- require constant;
- constant->import( $sym => $val );
- }
- }
-}
-
-my $file = "unknown"; # shadows current filename
-my $line = 0; # shadows current line number
-my $curstash = "main"; # shadows current stash
-my $curcv; # shadows current B::CV for pad lookups
-
-sub file {$file}
-sub line {$line}
-sub curstash {$curstash}
-sub curcv {$curcv}
-
-# Lint checks
-my %check;
-my %implies_ok_context;
-
-map( $implies_ok_context{$_}++,
- qw(scalar av2arylen aelem aslice helem hslice
- keys values hslice defined undef delete) );
-
-# Lint checks turned on by default
-my @default_checks
- = qw(context magic_diamond undefined_subs regexp_variables);
-
-my %valid_check;
-
-# All valid checks
-for my $check (
- qw(context implicit_read implicit_write dollar_underscore
- private_names bare_subs undefined_subs regexp_variables
- magic_diamond )
- )
-{
- $valid_check{$check} = __PACKAGE__;
-}
-
-# Debugging options
-my ($debug_op);
-
-my %done_cv; # used to mark which subs have already been linted
-my @extra_packages; # Lint checks mainline code and all subs which are
- # in main:: or in one of these packages.
-
-sub warning {
- my $format = ( @_ < 2 ) ? "%s" : shift @_;
- warn sprintf( "$format at %s line %d\n", @_, $file, $line );
- return undef; ## no critic undef
-}
-
-# This gimme can't cope with context that's only determined
-# at runtime via dowantarray().
-sub gimme {
- my $op = shift @_;
- my $flags = $op->flags;
- if ( $flags & OPf_WANT ) {
- return ( ( $flags & OPf_WANT ) == OPf_WANT_LIST ? 1 : 0 );
- }
- return undef; ## no critic undef
-}
-
-my @plugins = __PACKAGE__->plugins;
-
-sub inside_grepmap {
-
- # A boolean function to be used while inside a B::walkoptree_slow
- # call. If we are in the EXPR part of C<grep EXPR, ...> or C<grep
- # { EXPR } ...>, this returns true.
- return any { $_->name =~ m/\A(?:grep|map)/xms } @{ parents() };
-}
-
-sub inside_foreach_modifier {
-
- # TODO: use any()
-
- # A boolean function to be used while inside a B::walkoptree_slow
- # call. If we are in the EXPR part of C<EXPR foreach ...> this
- # returns true.
- for my $ancestor ( @{ parents() } ) {
- next unless $ancestor->name eq 'leaveloop';
-
- my $first = $ancestor->first;
- next unless $first->name eq 'enteriter';
-
- next if $first->redoop->name =~ m/\A(?:next|db|set)state\z/xms;
-
- return 1;
- }
- return 0;
-}
-
-for (
- [qw[ B::PADOP::gv_harder gv padix]],
- [qw[ B::SVOP::sv_harder sv targ]],
- [qw[ B::SVOP::gv_harder gv padix]]
- )
-{
-
- # I'm generating some functions here because they're mostly
- # similar. It's all for compatibility with threaded
- # perl. Perhaps... this code should inspect $Config{usethreads}
- # and generate a *specific* function. I'm leaving it generic for
- # the moment.
- #
- # In threaded perl SVs and GVs aren't used directly in the optrees
- # like they are in non-threaded perls. The ops that would use a SV
- # or GV keep an index into the subroutine's scratchpad. I'm
- # currently ignoring $cv->DEPTH and that might be at my peril.
-
- my ( $subname, $attr, $pad_attr ) = @$_;
- my $target = do { ## no critic strict
- no strict 'refs';
- \*$subname;
- };
- *$target = sub {
- my ($op) = @_;
-
- my $elt;
- if ( not $op->isa('B::PADOP') ) {
- $elt = $op->$attr;
- }
- return $elt if eval { $elt->isa('B::SV') };
-
- my $ix = $op->$pad_attr;
- my @entire_pad = $curcv->PADLIST->ARRAY;
- my @elts = map +( $_->ARRAY )[$ix], @entire_pad;
- ($elt) = first {
- eval { $_->isa('B::SV') } ? $_ : ();
- }
- @elts[ 0, reverse 1 .. $#elts ];
- return $elt;
- };
-}
-
-sub B::OP::lint {
- my ($op) = @_;
-
- # This is a fallback ->lint for all the ops where I haven't
- # defined something more specific. Nothing happens here.
-
- # Call all registered plugins
- my $m;
- $m = $_->can('match'), $op->$m( \%check ) for @plugins;
- return;
-}
-
-sub B::COP::lint {
- my ($op) = @_;
-
- # nextstate ops sit between statements. Whenever I see one I
- # update the current info on file, line, and stash. This code also
- # updates it when it sees a dbstate or setstate op. I have no idea
- # what those are but having seen them mentioned together in other
- # parts of the perl I think they're kind of equivalent.
- if ( $op->name =~ m/\A(?:next|db|set)state\z/ ) {
- $file = $op->file;
- $line = $op->line;
- $curstash = $op->stash->NAME;
- }
-
- # Call all registered plugins
- my $m;
- $m = $_->can('match'), $op->$m( \%check ) for @plugins;
- return;
-}
-
-sub B::UNOP::lint {
- my ($op) = @_;
-
- my $opname = $op->name;
-
-CONTEXT: {
-
- # Check arrays and hashes in scalar or void context where
- # scalar() hasn't been used.
-
- next
- unless $check{context}
- and $opname =~ m/\Arv2[ah]v\z/xms
- and not gimme($op);
-
- my ( $parent, $gparent ) = @{ parents() }[ 0, 1 ];
- my $pname = $parent->name;
-
- next if $implies_ok_context{$pname};
-
- # Three special cases to deal with: "foreach (@foo)", "delete
- # $a{$b}", and "exists $a{$b}" null out the parent so we have to
- # check for a parent of pp_null and a grandparent of
- # pp_enteriter, pp_delete, pp_exists
-
- next
- if $pname eq "null"
- and $gparent->name =~ m/\A(?:delete|enteriter|exists)\z/xms;
-
- # our( @bar ); would also trigger this error so I exclude
- # that.
- next
- if $op->private & OPpOUR_INTRO
- and ( $op->flags & OPf_WANT ) == OPf_WANT_VOID;
-
- warning 'Implicit scalar context for %s in %s',
- $opname eq "rv2av" ? "array" : "hash", $parent->desc;
- }
-
-PRIVATE_NAMES: {
-
- # Looks for calls to methods with names that begin with _ and
- # that aren't visible within the current package. Maybe this
- # should look at @ISA.
- next
- unless $check{private_names}
- and $opname =~ m/\Amethod/xms;
-
- my $methop = $op->first;
- next unless $methop->name eq "const";
-
- my $method = $methop->sv_harder->PV;
- next
- unless $method =~ m/\A_/xms
- and not defined &{"$curstash\::$method"};
-
- warning q[Illegal reference to private method name '%s'], $method;
- }
-
- # Call all registered plugins
- my $m;
- $m = $_->can('match'), $op->$m( \%check ) for @plugins;
- return;
-}
-
-sub B::PMOP::lint {
- my ($op) = @_;
-
-IMPLICIT_READ: {
-
- # Look for /.../ that doesn't use =~ to bind to something.
- next
- unless $check{implicit_read}
- and $op->name eq "match"
- and not( $op->flags & OPf_STACKED
- or inside_grepmap() );
- warning 'Implicit match on $_';
- }
-
-IMPLICIT_WRITE: {
-
- # Look for s/.../.../ that doesn't use =~ to bind to
- # something.
- next
- unless $check{implicit_write}
- and $op->name eq "subst"
- and not $op->flags & OPf_STACKED;
- warning 'Implicit substitution on $_';
- }
-
- # Call all registered plugins
- my $m;
- $m = $_->can('match'), $op->$m( \%check ) for @plugins;
- return;
-}
-
-sub B::LOOP::lint {
- my ($op) = @_;
-
-IMPLICIT_FOO: {
-
- # Look for C<for ( ... )>.
- next
- unless ( $check{implicit_read} or $check{implicit_write} )
- and $op->name eq "enteriter";
-
- my $last = $op->last;
- next
- unless $last->name eq "gv"
- and $last->gv_harder->NAME eq "_"
- and $op->redoop->name =~ m/\A(?:next|db|set)state\z/xms;
-
- warning 'Implicit use of $_ in foreach';
- }
-
- # Call all registered plugins
- my $m;
- $m = $_->can('match'), $op->$m( \%check ) for @plugins;
- return;
-}
-
-# In threaded vs non-threaded perls you'll find that threaded perls
-# use PADOP in place of SVOPs so they can do lookups into the
-# scratchpad to find things. I suppose this is so a optree can be
-# shared between threads and all symbol table muckery will just get
-# written to a scratchpad.
-*B::PADOP::lint = *B::PADOP::lint = \&B::SVOP::lint;
-
-sub B::SVOP::lint {
- my ($op) = @_;
-
-MAGIC_DIAMOND: {
- next
- unless $check{magic_diamond}
- and parents()->[0]->name eq 'readline'
- and $op->gv_harder->NAME eq 'ARGV';
-
- warning 'Use of <>';
- }
-
-BARE_SUBS: {
- next
- unless $check{bare_subs}
- and $op->name eq 'const'
- and $op->private & OPpCONST_BARE;
-
- my $sv = $op->sv_harder;
- next unless $sv->FLAGS & SVf_POK;
-
- my $sub = $sv->PV;
- my $subname = "$curstash\::$sub";
-
- # I want to skip over things that were declared with the
- # constant pragma. Well... sometimes. Hmm. I want to ignore
- # C<<use constant FOO => ...>> but warn on C<<FOO => ...>>
- # later. The former is typical declaration syntax and the
- # latter would be an error.
- #
- # Skipping over both could be handled by looking if
- # $constant::declared{$subname} is true.
-
- # Check that it's a function.
- next
- unless exists &{"$curstash\::$sub"};
-
- warning q[Bare sub name '%s' interpreted as string], $sub;
- }
-
-PRIVATE_NAMES: {
- next unless $check{private_names};
-
- my $opname = $op->name;
- if ( $opname =~ m/\Agv(?:sv)?\z/xms ) {
-
- # Looks for uses of variables and stuff that are named
- # private and we're not in the same package.
- my $gv = $op->gv_harder;
- my $name = $gv->NAME;
- next
- unless $name =~ m/\A_./xms
- and $gv->STASH->NAME ne $curstash;
-
- warning q[Illegal reference to private name '%s'], $name;
- }
- elsif ( $opname eq "method_named" ) {
- my $method = $op->sv_harder->PV;
- next unless $method =~ m/\A_./xms;
-
- warning q[Illegal reference to private method name '%s'], $method;
- }
- }
-
-DOLLAR_UNDERSCORE: {
-
- # Warn on uses of $_ with a few exceptions. I'm not warning on
- # $_ inside grep, map, or statement modifer foreach because
- # they localize $_ and it'd be impossible to use these
- # features without getting warnings.
-
- next
- unless $check{dollar_underscore}
- and $op->name eq "gvsv"
- and $op->gv_harder->NAME eq "_"
- and not( inside_grepmap
- or inside_foreach_modifier );
-
- warning 'Use of $_';
- }
-
-REGEXP_VARIABLES: {
-
- # Look for any uses of $`, $&, or $'.
- next
- unless $check{regexp_variables}
- and $op->name eq "gvsv";
-
- my $name = $op->gv_harder->NAME;
- next unless $name =~ m/\A[\&\'\`]\z/xms;
-
- warning 'Use of regexp variable $%s', $name;
- }
-
-UNDEFINED_SUBS: {
-
- # Look for calls to functions that either don't exist or don't
- # have a definition.
- next
- unless $check{undefined_subs}
- and $op->name eq "gv"
- and $op->next->name eq "entersub";
-
- my $gv = $op->gv_harder;
- my $subname = $gv->STASH->NAME . "::" . $gv->NAME;
-
- no strict 'refs'; ## no critic strict
- if ( not exists &$subname ) {
- $subname =~ s/\Amain:://;
- warning q[Nonexistant subroutine '%s' called], $subname;
- }
- elsif ( not defined &$subname ) {
- $subname =~ s/\A\&?main:://;
- warning q[Undefined subroutine '%s' called], $subname;
- }
- }
-
- # Call all registered plugins
- my $m;
- $m = $_->can('match'), $op->$m( \%check ) for @plugins;
- return;
-}
-
-sub B::GV::lintcv {
-
- # Example: B::svref_2object( \ *A::Glob )->lintcv
-
- my $gv = shift @_;
- my $cv = $gv->CV;
- return unless $cv->can('lintcv');
- $cv->lintcv;
- return;
-}
-
-sub B::CV::lintcv {
-
- # Example: B::svref_2object( \ &foo )->lintcv
-
- # Write to the *global* $
- $curcv = shift @_;
-
- #warn sprintf("lintcv: %s::%s (done=%d)\n",
- # $gv->STASH->NAME, $gv->NAME, $done_cv{$$curcv});#debug
- return unless ref($curcv) and $$curcv and not $done_cv{$$curcv}++;
- my $root = $curcv->ROOT;
-
- #warn " root = $root (0x$$root)\n";#debug
- walkoptree_slow( $root, "lint" ) if $$root;
- return;
-}
-
-sub do_lint {
- my %search_pack;
-
- # Copy to the global $curcv for use in pad lookups.
- $curcv = main_cv;
- walkoptree_slow( main_root, "lint" ) if ${ main_root() };
-
- # Do all the miscellaneous non-sub blocks.
- for my $av ( begin_av, init_av, check_av, end_av ) {
- next unless eval { $av->isa('B::AV') };
- for my $cv ( $av->ARRAY ) {
- next unless ref($cv) and $cv->FILE eq $0;
- $cv->lintcv;
- }
- }
-
- walksymtable(
- \%main::,
- sub {
- if ( $_[0]->FILE eq $0 ) { $_[0]->lintcv }
- },
- sub {1}
- );
- return;
-}
-
-sub compile {
- my @options = @_;
-
- # Turn on default lint checks
- for my $opt (@default_checks) {
- $check{$opt} = 1;
- }
-
-OPTION:
- while ( my $option = shift @options ) {
- my ( $opt, $arg );
- unless ( ( $opt, $arg ) = $option =~ m/\A-(.)(.*)/xms ) {
- unshift @options, $option;
- last OPTION;
- }
-
- if ( $opt eq "-" && $arg eq "-" ) {
- shift @options;
- last OPTION;
- }
- elsif ( $opt eq "D" ) {
- $arg ||= shift @options;
- foreach my $arg ( split //, $arg ) {
- if ( $arg eq "o" ) {
- B->debug(1);
- }
- elsif ( $arg eq "O" ) {
- $debug_op = 1;
- }
- }
- }
- elsif ( $opt eq "u" ) {
- $arg ||= shift @options;
- push @extra_packages, $arg;
- }
- }
-
- foreach my $opt ( @default_checks, @options ) {
- $opt =~ tr/-/_/;
- if ( $opt eq "all" ) {
- %check = %valid_check;
- }
- elsif ( $opt eq "none" ) {
- %check = ();
- }
- else {
- if ( $opt =~ s/\Ano_//xms ) {
- $check{$opt} = 0;
- }
- else {
- $check{$opt} = 1;
- }
- carp "No such check: $opt"
- unless defined $valid_check{$opt};
- }
- }
-
- # Remaining arguments are things to check. So why aren't I
- # capturing them or something? I don't know.
-
- return \&do_lint;
-}
-
-sub register_plugin {
- my ( undef, $plugin, $new_checks ) = @_;
-
- # Allow the user to be lazy and not give us a name.
- $plugin = caller unless defined $plugin;
-
- # Register the plugin's named checks, if any.
- for my $check ( eval {@$new_checks} ) {
- if ( not defined $check ) {
- carp 'Undefined value in checks.';
- next;
- }
- if ( exists $valid_check{$check} ) {
- carp
- "$check is already registered as a $valid_check{$check} feature.";
- next;
- }
-
- $valid_check{$check} = $plugin;
- }
-
- # Register a non-Module::Pluggable loaded module. @plugins already
- # contains whatever M::P found on disk. The user might load a
- # plugin manually from some arbitrary namespace and ask for it to
- # be registered.
- if ( not any { $_ eq $plugin } @plugins ) {
- push @plugins, $plugin;
- }
-
- return;
-}
-
-1;
Modified: vendor/perl/dist/ext/B/B.pm
===================================================================
--- vendor/perl/dist/ext/B/B.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/B/B.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -15,7 +15,7 @@
# walkoptree comes from B.xs
BEGIN {
- $B::VERSION = '1.42_01';
+ $B::VERSION = '1.42_02';
@B::EXPORT_OK = ();
# Our BOOT code needs $VERSION set, and will append to @EXPORT_OK.
Modified: vendor/perl/dist/ext/B/B.xs
===================================================================
--- vendor/perl/dist/ext/B/B.xs 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/B/B.xs 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1875,11 +1875,8 @@
void
GV(cv)
B::CV cv
- PREINIT:
- GV *gv;
CODE:
- gv = CvGV(cv);
- ST(0) = gv ? make_sv_object(aTHX_ (SV*)gv) : &PL_sv_undef;
+ ST(0) = make_sv_object(aTHX_ (SV*)CvGV(cv));
#if PERL_VERSION > 17
Deleted: vendor/perl/dist/ext/B/defsubs_h.PL
===================================================================
--- vendor/perl/dist/ext/B/defsubs_h.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/B/defsubs_h.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,98 +0,0 @@
-# Do not remove the following line; MakeMaker relies on it to identify
-# this file as a template for defsubs.h
-# Extracting defsubs.h (with variable substitutions)
-#!perl -w
-use File::Spec;
-my (undef, $headerpath) = @ARGV;
-my ($out) = __FILE__ =~ /(^.*)\.PL/i;
-$out =~ s/_h$/.h/;
-unlink $out if -l $out;
-open(OUT,">$out") || die "Cannot open $file:$!";
-print "Extracting $out...\n";
-print OUT <<"END";
-/*
- !!! Don't modify this file - it's autogenerated from $0 !!!
- */
-END
-
-foreach my $const (qw(
- CVf_ANON
- CVf_CLONE
- CVf_CLONED
- CVf_CONST
- CVf_LOCKED
- CVf_LVALUE
- CVf_METHOD
- CVf_NODEBUG
- CVf_UNIQUE
- CVf_WEAKOUTSIDE
- GVf_IMPORTED_AV
- GVf_IMPORTED_CV
- GVf_IMPORTED_HV
- GVf_IMPORTED_SV
- HEf_SVKEY
- SVTYPEMASK
- SVf_FAKE
- SVf_IOK
- SVf_IVisUV
- SVf_NOK
- SVf_POK
- SVf_READONLY
- SVf_ROK
- SVp_IOK
- SVp_NOK
- SVp_POK
- SVpad_OUR
- SVs_RMG
- SVs_SMG
- SVt_PVGV
- SVt_PVHV
- PAD_FAKELEX_ANON
- PAD_FAKELEX_MULTI
- ))
- {
- doconst($const);
- }
-
-if ($] < 5.009) {
- # This is only present in 5.10, but it's useful to B::Deparse to be able
- # to import a dummy value from B
- doconst(OPpPAD_STATE);
-}
-
-if ($] >= 5.009) {
- # Constant not present in 5.8.x
- doconst(CVf_ISXSUB);
-} else {
- # Constant not present after 5.8.x
- doconst(AVf_REAL);
-}
-
-if ($] < 5.011) {
- # Constant not present after 5.10.x
- doconst(CVf_LOCKED);
-}
-
-foreach my $tuple (['op.h'],['cop.h'],['regexp.h','RXf_'])
- {
- my $file = $tuple->[0];
- my $pfx = $tuple->[1] || '';
- my $path = File::Spec->catfile($headerpath, $file);
- open(OPH,"$path") || die "Cannot open $path:$!";
- while (<OPH>)
- {
- doconst($1) if (/#define\s+($pfx\w+)\s+([\(\)\|\dx]+)\s*(?:$|\/\*)/);
- }
- close(OPH);
- }
-close(OUT);
-
-sub doconst
-{
- my $sym = shift;
- my $l = length($sym);
- print OUT <<"END";
- newCONSTSUB(stash,"$sym",newSViv($sym));
- av_push(export_ok,newSVpvn("$sym",$l));
-END
-}
Modified: vendor/perl/dist/ext/B/t/b.t
===================================================================
--- vendor/perl/dist/ext/B/t/b.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/B/t/b.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -405,7 +405,7 @@
ok($cv, "make a B::CV from a lexical sub reference");
isa_ok($cv, "B::CV");
my $gv = $cv->GV;
- is($gv, undef, "GV on a lexical sub is NULL");
+ isa_ok($gv, "B::SPECIAL", "GV on a lexical sub");
my $hek = $cv->NAME_HEK;
is($hek, "bar", "check the NAME_HEK");
}
Modified: vendor/perl/dist/ext/B/t/concise.t
===================================================================
--- vendor/perl/dist/ext/B/t/concise.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/B/t/concise.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -10,7 +10,7 @@
require 'test.pl'; # we use runperl from 'test.pl', so can't use Test::More
}
-plan tests => 160;
+plan tests => 161;
require_ok("B::Concise");
@@ -455,4 +455,11 @@
);
unlike $out, 'main::foo', '-nobanner';
+# glob
+$out =
+ runperl(
+ switches => ["-MO=Concise"], prog=>'<.>', stderr => 1
+ );
+like $out, '\*<none>::', '<.>';
+
__END__
Deleted: vendor/perl/dist/ext/B/t/debug.t
===================================================================
--- vendor/perl/dist/ext/B/t/debug.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/B/t/debug.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,90 +0,0 @@
-#!./perl
-
-BEGIN {
- delete $ENV{PERL_DL_NONLAZY} if $] < 5.005_58; #Perl_byterun problem
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- if ($^O eq 'MacOS') {
- @INC = qw(: ::lib ::macos:lib);
- } else {
- @INC = '.';
- push @INC, '../lib';
- }
- } else {
- unshift @INC, 't';
- }
- require Config;
- if (($Config::Config{'extensions'} !~ /\bB\b/) ){
- print "1..0 # Skip -- Perl configured without B module\n";
- exit 0;
- }
-}
-
-$| = 1;
-use warnings;
-use strict;
-use Config;
-use Test::More tests => 8;
-use B;
-use B::Debug;
-
-my $a;
-my $Is_VMS = $^O eq 'VMS';
-my $Is_MacOS = $^O eq 'MacOS';
-
-my $path = join " ", map { qq["-I$_"] } @INC;
-my $redir = $Is_MacOS ? "" : "2>&1";
-
-$a = `$^X $path "-MO=Debug" -e 1 $redir`;
-like($a, qr/\bLISTOP\b.*\bOP\b.*\bCOP\b.*\bOP\b/s);
-
-
-$a = `$^X $path "-MO=Terse" -e 1 $redir`;
-like($a, qr/\bLISTOP\b.*leave.*\n OP\b.*enter.*\n COP\b.*nextstate.*\n OP\b.*null/s);
-
-$a = `$^X $path "-MO=Terse" -ane "s/foo/bar/" $redir`;
-$a =~ s/\(0x[^)]+\)//g;
-$a =~ s/\[[^\]]+\]//g;
-$a =~ s/-e syntax OK//;
-$a =~ s/[^a-z ]+//g;
-$a =~ s/\s+/ /g;
-$a =~ s/\b(s|foo|bar|ullsv)\b\s?//g;
-$a =~ s/^\s+//;
-$a =~ s/\s+$//;
-$a =~ s/\s+nextstate$//; # if $] < 5.008001; # 5.8.0 adds it. 5.8.8 not anymore
-my $is_thread = $Config{use5005threads} && $Config{use5005threads} eq 'define';
-if ($is_thread) {
- $b=<<EOF;
-leave enter nextstate label leaveloop enterloop null and defined null
-threadsv readline gv lineseq nextstate aassign null pushmark split pushre
-threadsv const null pushmark rvav gv nextstate subst const unstack
-EOF
-} else {
- $b=<<EOF;
-leave enter nextstate label leaveloop enterloop null and defined null null
-gvsv readline gv lineseq nextstate aassign null pushmark split pushre null
-gvsv const null pushmark rvav gv nextstate subst const unstack
-EOF
-}
-#$b .= " nextstate" if $] < 5.008001; # ??
-$b=~s/\n/ /g;$b=~s/\s+/ /g;
-$b =~ s/\s+$//;
-is($a, $b);
-
-like(B::Debug::_printop(B::main_root), qr/LISTOP\s+\[OP_LEAVE\]/);
-like(B::Debug::_printop(B::main_start), qr/OP\s+\[OP_ENTER\]/);
-
-$a = `$^X $path "-MO=Debug" -e "B::main_root->debug" $redir`;
-like($a, qr/op_next\s+0x0/m);
-$a = `$^X $path "-MO=Debug" -e "B::main_start->debug" $redir`;
-like($a, qr/PL_ppaddr\[OP_ENTER\]/m);
-
-# pass missing FETCHSIZE, fixed with 1.06
-my $tmp = "tmp.pl";
-open TMP, "> $tmp";
-print TMP 'BEGIN{tie @a, __PACKAGE__;sub TIEARRAY {bless{}} sub FETCH{1}};
-print $a[1]';
-close TMP;
-$a = `$^X $path "-MO=Debug" $tmp $redir`;
-unlink $tmp;
-unlike($a, qr/locate object method "FETCHSIZE"/m);
Deleted: vendor/perl/dist/ext/B/t/deparse.t
===================================================================
--- vendor/perl/dist/ext/B/t/deparse.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/B/t/deparse.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,527 +0,0 @@
-#!./perl
-
-BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- if ($^O eq 'MacOS') {
- @INC = qw(: ::lib ::macos:lib);
- } else {
- @INC = '.';
- push @INC, '../lib';
- }
- } else {
- unshift @INC, 't';
- }
- require Config;
- if (($Config::Config{'extensions'} !~ /\bB\b/) ){
- print "1..0 # Skip -- Perl configured without B module\n";
- exit 0;
- }
-}
-
-use warnings;
-use strict;
-BEGIN {
- # BEGIN block is acutally a subroutine :-)
- return unless $] > 5.009;
- require feature;
- feature->import(':5.10');
-}
-use Test::More tests => 70;
-use Config ();
-
-use B::Deparse;
-my $deparse = B::Deparse->new();
-ok($deparse);
-
-# Tell B::Deparse about our ambient pragmas
-{ my ($hint_bits, $warning_bits, $hinthash);
- BEGIN { ($hint_bits, $warning_bits, $hinthash) = ($^H, ${^WARNING_BITS}, \%^H); }
- $deparse->ambient_pragmas (
- hint_bits => $hint_bits,
- warning_bits => $warning_bits,
- '$[' => 0 + $[,
- '%^H' => $hinthash,
- );
-}
-
-$/ = "\n####\n";
-while (<DATA>) {
- chomp;
- # This code is pinched from the t/lib/common.pl for TODO.
- # It's not clear how to avoid duplication
- # Now tweaked a bit to do skip or todo
- my %reason;
- foreach my $what (qw(skip todo)) {
- s/^#\s*\U$what\E\s*(.*)\n//m and $reason{$what} = $1;
- # If the SKIP reason starts ? then it's taken as a code snippet to
- # evaluate. This provides the flexibility to have conditional SKIPs
- if ($reason{$what} && $reason{$what} =~ s/^\?//) {
- my $temp = eval $reason{$what};
- if ($@) {
- die "# In \U$what\E code reason:\n# $reason{$what}\n$@";
- }
- $reason{$what} = $temp;
- }
- }
-
- s/^\s*#\s*(.*)$//mg;
- my ($num, $testname) = $1 =~ m/(\d+)\s*(.*)/;
-
- if ($reason{skip}) {
- # Like this to avoid needing a label SKIP:
- Test::More->builder->skip($reason{skip});
- next;
- }
-
- my ($input, $expected);
- if (/(.*)\n>>>>\n(.*)/s) {
- ($input, $expected) = ($1, $2);
- }
- else {
- ($input, $expected) = ($_, $_);
- }
-
- my $coderef = eval "sub {$input}";
-
- if ($@) {
- diag("$num deparsed: $@");
- ok(0, $testname);
- }
- else {
- my $deparsed = $deparse->coderef2text( $coderef );
- my $regex = $expected;
- $regex =~ s/(\S+)/\Q$1/g;
- $regex =~ s/\s+/\\s+/g;
- $regex = '^\{\s*' . $regex . '\s*\}$';
-
- local $::TODO = $reason{todo};
- like($deparsed, qr/$regex/, $testname);
- }
-}
-
-use constant 'c', 'stuff';
-is((eval "sub ".$deparse->coderef2text(\&c))->(), 'stuff');
-
-my $a = 0;
-is("{\n (-1) ** \$a;\n}", $deparse->coderef2text(sub{(-1) ** $a }));
-
-use constant cr => ['hello'];
-my $string = "sub " . $deparse->coderef2text(\&cr);
-my $val = (eval $string)->() or diag $string;
-is(ref($val), 'ARRAY');
-is($val->[0], 'hello');
-
-my $Is_VMS = $^O eq 'VMS';
-my $Is_MacOS = $^O eq 'MacOS';
-
-my $path = join " ", map { qq["-I$_"] } @INC;
-$path .= " -MMac::err=unix" if $Is_MacOS;
-my $redir = $Is_MacOS ? "" : "2>&1";
-
-$a = `$^X $path "-MO=Deparse" -anlwi.bak -e 1 $redir`;
-$a =~ s/-e syntax OK\n//g;
-$a =~ s/.*possible typo.*\n//; # Remove warning line
-$a =~ s{\\340\\242}{\\s} if (ord("\\") == 224); # EBCDIC, cp 1047 or 037
-$a =~ s{\\274\\242}{\\s} if (ord("\\") == 188); # $^O eq 'posix-bc'
-$b = <<'EOF';
-BEGIN { $^I = ".bak"; }
-BEGIN { $^W = 1; }
-BEGIN { $/ = "\n"; $\ = "\n"; }
-LINE: while (defined($_ = <ARGV>)) {
- chomp $_;
- our(@F) = split(' ', $_, 0);
- '???';
-}
-EOF
-$b =~ s/(LINE:)/sub BEGIN {
- 'MacPerl'->bootstrap;
- 'OSA'->bootstrap;
- 'XL'->bootstrap;
-}
-$1/ if $Is_MacOS;
-is($a, $b);
-
-#Re: perlbug #35857, patch #24505
-#handle warnings::register-ed packages properly.
-package B::Deparse::Wrapper;
-use strict;
-use warnings;
-use warnings::register;
-sub getcode {
- my $deparser = B::Deparse->new();
- return $deparser->coderef2text(shift);
-}
-
-package Moo;
-use overload '0+' => sub { 42 };
-
-package main;
-use strict;
-use warnings;
-use constant GLIPP => 'glipp';
-use constant PI => 4;
-use constant OVERLOADED_NUMIFICATION => bless({}, 'Moo');
-use Fcntl qw/O_TRUNC O_APPEND O_EXCL/;
-BEGIN { delete $::Fcntl::{O_APPEND}; }
-use POSIX qw/O_CREAT/;
-sub test {
- my $val = shift;
- my $res = B::Deparse::Wrapper::getcode($val);
- like( $res, qr/use warnings/);
-}
-my ($q,$p);
-my $x=sub { ++$q,++$p };
-test($x);
-eval <<EOFCODE and test($x);
- package bar;
- use strict;
- use warnings;
- use warnings::register;
- package main;
- 1
-EOFCODE
-
-__DATA__
-# 2
-1;
-####
-# 3
-{
- no warnings;
- '???';
- 2;
-}
-####
-# 4
-my $test;
-++$test and $test /= 2;
->>>>
-my $test;
-$test /= 2 if ++$test;
-####
-# 5
--((1, 2) x 2);
-####
-# 6
-{
- my $test = sub : lvalue {
- my $x;
- }
- ;
-}
-####
-# 7
-{
- my $test = sub : method {
- my $x;
- }
- ;
-}
-####
-# 8
-{
- my $test = sub : locked method {
- my $x;
- }
- ;
-}
-####
-# 9
-{
- 234;
-}
-continue {
- 123;
-}
-####
-# 10
-my $x;
-print $main::x;
-####
-# 11
-my @x;
-print $main::x[1];
-####
-# 12
-my %x;
-$x{warn()};
-####
-# 13
-my $foo;
-$_ .= <ARGV> . <$foo>;
-####
-# 14
-my $foo = "Ab\x{100}\200\x{200}\377Cd\000Ef\x{1000}\cA\x{2000}\cZ";
-####
-# 15
-s/x/'y';/e;
-####
-# 16 - various lypes of loop
-{ my $x; }
-####
-# 17
-while (1) { my $k; }
-####
-# 18
-my ($x, at a);
-$x=1 for @a;
->>>>
-my($x, @a);
-$x = 1 foreach (@a);
-####
-# 19
-for (my $i = 0; $i < 2;) {
- my $z = 1;
-}
-####
-# 20
-for (my $i = 0; $i < 2; ++$i) {
- my $z = 1;
-}
-####
-# 21
-for (my $i = 0; $i < 2; ++$i) {
- my $z = 1;
-}
-####
-# 22
-my $i;
-while ($i) { my $z = 1; } continue { $i = 99; }
-####
-# 23
-foreach my $i (1, 2) {
- my $z = 1;
-}
-####
-# 24
-my $i;
-foreach $i (1, 2) {
- my $z = 1;
-}
-####
-# 25
-my $i;
-foreach my $i (1, 2) {
- my $z = 1;
-}
-####
-# 26
-foreach my $i (1, 2) {
- my $z = 1;
-}
-####
-# 27
-foreach our $i (1, 2) {
- my $z = 1;
-}
-####
-# 28
-my $i;
-foreach our $i (1, 2) {
- my $z = 1;
-}
-####
-# 29
-my @x;
-print reverse sort(@x);
-####
-# 30
-my @x;
-print((sort {$b cmp $a} @x));
-####
-# 31
-my @x;
-print((reverse sort {$b <=> $a} @x));
-####
-# 32
-our @a;
-print $_ foreach (reverse @a);
-####
-# 33
-our @a;
-print $_ foreach (reverse 1, 2..5);
-####
-# 34 (bug #38684)
-our @ary;
- at ary = split(' ', 'foo', 0);
-####
-# 35 (bug #40055)
-do { () };
-####
-# 36 (ibid.)
-do { my $x = 1; $x };
-####
-# 37 <20061012113037.GJ25805 at c4.convolution.nl>
-my $f = sub {
- +{[]};
-} ;
-####
-# 38 (bug #43010)
-'!@$%'->();
-####
-# 39 (ibid.)
-::();
-####
-# 40 (ibid.)
-'::::'->();
-####
-# 41 (ibid.)
-&::::;
-####
-# 42
-my $bar;
-'Foo'->$bar('orz');
-####
-# 43
-'Foo'->bar('orz');
-####
-# 44
-'Foo'->bar;
-####
-# SKIP ?$] < 5.010 && "say not implemented on this Perl version"
-# 45 say
-say 'foo';
-####
-# SKIP ?$] < 5.010 && "state vars not implemented on this Perl version"
-# 46 state vars
-state $x = 42;
-####
-# SKIP ?$] < 5.010 && "state vars not implemented on this Perl version"
-# 47 state var assignment
-{
- my $y = (state $x = 42);
-}
-####
-# SKIP ?$] < 5.010 && "state vars not implemented on this Perl version"
-# 48 state vars in anoymous subroutines
-$a = sub {
- state $x;
- return $x++;
-}
-;
-####
-# SKIP ?$] < 5.011 && 'each @array not implemented on this Perl version'
-# 49 each @array;
-each @ARGV;
-each @$a;
-####
-# SKIP ?$] < 5.011 && 'each @array not implemented on this Perl version'
-# 50 keys @array; values @array
-keys @$a if keys @ARGV;
-values @ARGV if values @$a;
-####
-# 51 Anonymous arrays and hashes, and references to them
-my $a = {};
-my $b = \{};
-my $c = [];
-my $d = \[];
-####
-# SKIP ?$] < 5.010 && "smartmatch and given/when not implemented on this Perl version"
-# 52 implicit smartmatch in given/when
-given ('foo') {
- when ('bar') { continue; }
- when ($_ ~~ 'quux') { continue; }
- default { 0; }
-}
-####
-# 53 conditions in elsifs (regression in change #33710 which fixed bug #37302)
-if ($a) { x(); }
-elsif ($b) { x(); }
-elsif ($a and $b) { x(); }
-elsif ($a or $b) { x(); }
-else { x(); }
-####
-# 54 interpolation in regexps
-my($y, $t);
-/x${y}z$t/;
-####
-# TODO new undocumented cpan-bug #33708
-# 55 (cpan-bug #33708)
-%{$_ || {}}
-####
-# TODO hash constants not yet fixed
-# 56 (cpan-bug #33708)
-use constant H => { "#" => 1 }; H->{"#"}
-####
-# TODO optimized away 0 not yet fixed
-# 57 (cpan-bug #33708)
-foreach my $i (@_) { 0 }
-####
-# 58 placeholder for skipped edbe35ea95
-1;
-####
-# 59 placeholder for skipped edbe35ea95
-1;
-####
-# 60 tests that should be constant folded
-x() if 1;
-x() if GLIPP;
-x() if !GLIPP;
-x() if GLIPP && GLIPP;
-x() if !GLIPP || GLIPP;
-x() if do { GLIPP };
-x() if do { no warnings 'void'; 5; GLIPP };
-x() if do { !GLIPP };
-if (GLIPP) { x() } else { z() }
-if (!GLIPP) { x() } else { z() }
-if (GLIPP) { x() } elsif (GLIPP) { z() }
-if (!GLIPP) { x() } elsif (GLIPP) { z() }
-if (GLIPP) { x() } elsif (!GLIPP) { z() }
-if (!GLIPP) { x() } elsif (!GLIPP) { z() }
-if (!GLIPP) { x() } elsif (!GLIPP) { z() } elsif (GLIPP) { t() }
-if (!GLIPP) { x() } elsif (!GLIPP) { z() } elsif (!GLIPP) { t() }
-if (!GLIPP) { x() } elsif (!GLIPP) { z() } elsif (!GLIPP) { t() }
->>>>
-x();
-x();
-'???';
-x();
-x();
-x();
-x();
-do {
- '???'
-};
-do {
- x()
-};
-do {
- z()
-};
-do {
- x()
-};
-do {
- z()
-};
-do {
- x()
-};
-'???';
-do {
- t()
-};
-'???';
-!1;
-####
-# TODO Only strict 'refs' currently supported
-# 68 strict
-no strict;
-$x;
-####
-# TODO Subsets of warnings could be encoded textually, rather than as bitflips.
-no warnings 'deprecated';
-my $x;
-####
-# TODO Better test for CPAN #33708 - the deparsed code has different behaviour
-use strict;
-no warnings;
-
-foreach (0..3) {
- my $x = 2;
- {
- my $x if 0;
- print ++$x, "\n";
- }
-}
Deleted: vendor/perl/dist/ext/B/t/lint.t
===================================================================
--- vendor/perl/dist/ext/B/t/lint.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/B/t/lint.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,151 +0,0 @@
-#!./perl -w
-
-BEGIN {
- if ( $ENV{PERL_CORE} ) {
- chdir('t') if -d 't';
- @INC = ( '.', '../lib' );
- }
- else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
- require Config;
- if ( ( $Config::Config{'extensions'} !~ /\bB\b/ ) ) {
- print "1..0 # Skip -- Perl configured without B module\n";
- exit 0;
- }
- require 'test.pl';
-}
-use strict;
-use warnings;
-
-plan tests => 29;
-
-# Runs a separate perl interpreter with the appropriate lint options
-# turned on
-sub runlint ($$$;$) {
- my ( $opts, $prog, $result, $testname ) = @_;
- my $res = runperl(
- switches => ["-MO=Lint,$opts"],
- prog => $prog,
- stderr => 1,
- );
- $res =~ s/-e syntax OK\n$//;
- local $::Level = $::Level + 1;
- is( $res, $result, $testname || $opts );
-}
-
-runlint 'magic-diamond', 'while(<>){}', <<'RESULT';
-Use of <> at -e line 1
-RESULT
-
-runlint 'magic-diamond', 'while(<ARGV>){}', <<'RESULT';
-Use of <> at -e line 1
-RESULT
-
-runlint 'magic-diamond', 'while(<FOO>){}', <<'RESULT';
-RESULT
-
-runlint 'context', '$foo = @bar', <<'RESULT';
-Implicit scalar context for array in scalar assignment at -e line 1
-RESULT
-
-runlint 'context', '$foo = length @bar', <<'RESULT';
-Implicit scalar context for array in length at -e line 1
-RESULT
-
-runlint 'context', 'our @bar', '';
-
-runlint 'context', 'exists $BAR{BAZ}', '';
-
-runlint 'implicit-read', '/foo/', <<'RESULT';
-Implicit match on $_ at -e line 1
-RESULT
-
-runlint 'implicit-read', 'grep /foo/, ()', '';
-
-runlint 'implicit-read', 'grep { /foo/ } ()', '';
-
-runlint 'implicit-write', 's/foo/bar/', <<'RESULT';
-Implicit substitution on $_ at -e line 1
-RESULT
-
-runlint 'implicit-read', 'for ( @ARGV ) { 1 }',
- <<'RESULT', 'implicit-read in foreach';
-Implicit use of $_ in foreach at -e line 1
-RESULT
-
-runlint 'implicit-read', '1 for @ARGV', '', 'implicit-read in foreach';
-
-runlint 'dollar-underscore', '$_ = 1', <<'RESULT';
-Use of $_ at -e line 1
-RESULT
-
-runlint 'dollar-underscore', 'sub foo {}; foo( $_ ) for @A', '';
-runlint 'dollar-underscore', 'sub foo {}; map { foo( $_ ) } @A', '';
-runlint 'dollar-underscore', 'sub foo {}; grep { foo( $_ ) } @A', '';
-
-runlint 'dollar-underscore', 'print',
- <<'RESULT', 'dollar-underscore in print';
-Use of $_ at -e line 1
-RESULT
-
-runlint 'private-names', 'sub A::_f{};A::_f()', <<'RESULT';
-Illegal reference to private name '_f' at -e line 1
-RESULT
-
-runlint 'private-names', '$A::_x', <<'RESULT';
-Illegal reference to private name '_x' at -e line 1
-RESULT
-
-runlint 'private-names', 'sub A::_f{};A->_f()', <<'RESULT',
-Illegal reference to private method name '_f' at -e line 1
-RESULT
- 'private-names (method)';
-
-runlint 'undefined-subs', 'foo()', <<'RESULT';
-Nonexistant subroutine 'foo' called at -e line 1
-RESULT
-
-runlint 'undefined-subs', 'foo();sub foo;', <<'RESULT';
-Undefined subroutine 'foo' called at -e line 1
-RESULT
-
-runlint 'regexp-variables', 'print $&', <<'RESULT';
-Use of regexp variable $& at -e line 1
-RESULT
-
-runlint 'regexp-variables', 's/./$&/', <<'RESULT';
-Use of regexp variable $& at -e line 1
-RESULT
-
-runlint 'bare-subs', 'sub bare(){1};$x=bare', '';
-
-runlint 'bare-subs', 'sub bare(){1}; $x=[bare=>0]; $x=$y{bare}', <<'RESULT';
-Bare sub name 'bare' interpreted as string at -e line 1
-Bare sub name 'bare' interpreted as string at -e line 1
-RESULT
-
-{
-
- # Check for backwards-compatible plugin support. This was where
- # preloaded mdoules would register themselves with B::Lint.
- my $res = runperl(
- switches => ["-MB::Lint"],
- prog =>
- 'BEGIN{B::Lint->register_plugin(X=>[q[x]])};use O(qw[Lint x]);sub X::match{warn qq[X ok.\n]};dummy()',
- stderr => 1,
- );
- like( $res, qr/X ok\./, 'Lint legacy plugin' );
-}
-
-{
-
- # Check for Module::Plugin support
- my $res = runperl(
- switches => [ '-I../ext/B/t/pluglib', '-MO=Lint,none' ],
- prog => 1,
- stderr => 1,
- );
- like( $res, qr/Module::Pluggable ok\./, 'Lint uses Module::Pluggable' );
-}
Deleted: vendor/perl/dist/ext/DynaLoader/XSLoader_pm.PL
===================================================================
--- vendor/perl/dist/ext/DynaLoader/XSLoader_pm.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/DynaLoader/XSLoader_pm.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,407 +0,0 @@
-use strict;
-use Config;
-
-sub to_string {
- my ($value) = @_;
- $value =~ s/\\/\\\\/g;
- $value =~ s/'/\\'/g;
- return "'$value'";
-}
-
-1 while unlink "XSLoader.pm";
-open OUT, ">XSLoader.pm" or die $!;
-print OUT <<'EOT';
-# Generated from XSLoader.pm.PL (resolved %Config::Config value)
-
-package XSLoader;
-
-$VERSION = "0.10";
-
-#use strict;
-
-# enable debug/trace messages from DynaLoader perl code
-# $dl_debug = $ENV{PERL_DL_DEBUG} || 0 unless defined $dl_debug;
-
-EOT
-
-print OUT ' my $dl_dlext = ', to_string($Config::Config{'dlext'}), ";\n" ;
-
-print OUT <<'EOT';
-
-package DynaLoader;
-
-# No prizes for guessing why we don't say 'bootstrap DynaLoader;' here.
-# NOTE: All dl_*.xs (including dl_none.xs) define a dl_error() XSUB
-boot_DynaLoader('DynaLoader') if defined(&boot_DynaLoader) &&
- !defined(&dl_error);
-package XSLoader;
-
-sub load {
- package DynaLoader;
-
- die q{XSLoader::load('Your::Module', $Your::Module::VERSION)} unless @_;
-
- my($module) = $_[0];
-
- # work with static linking too
- my $boots = "$module\::bootstrap";
- goto &$boots if defined &$boots;
-
- goto retry unless $module and defined &dl_load_file;
-
- my @modparts = split(/::/,$module);
- my $modfname = $modparts[-1];
-
-EOT
-
-print OUT <<'EOT' if defined &DynaLoader::mod2fname;
- # Some systems have restrictions on files names for DLL's etc.
- # mod2fname returns appropriate file base name (typically truncated)
- # It may also edit @modparts if required.
- $modfname = &mod2fname(\@modparts) if defined &mod2fname;
-
-EOT
-
-print OUT <<'EOT' if $^O eq 'os2';
-
- # os2 static build can dynaload, but cannot dynaload Perl modules...
- die 'Dynaloaded Perl modules are not available in this build of Perl' if $OS2::is_static;
-
-EOT
-
-print OUT <<'EOT';
- my $modpname = join('/', at modparts);
- my $modlibname = (caller())[1];
- my $c = @modparts;
- $modlibname =~ s,[\\/][^\\/]+$,, while $c--; # Q&D basename
- my $file = "$modlibname/auto/$modpname/$modfname.$dl_dlext";
-
-# print STDERR "XSLoader::load for $module ($file)\n" if $dl_debug;
-
- my $bs = $file;
- $bs =~ s/(\.\w+)?(;\d*)?$/\.bs/; # look for .bs 'beside' the library
-
- if (-s $bs) { # only read file if it's not empty
-# print STDERR "BS: $bs ($^O, $dlsrc)\n" if $dl_debug;
- eval { do $bs; };
- warn "$bs: $@\n" if $@;
- }
-
- goto retry if not -f $file or -s $bs;
-
- my $bootname = "boot_$module";
- $bootname =~ s/\W/_/g;
- @DynaLoader::dl_require_symbols = ($bootname);
-
- my $boot_symbol_ref;
-
-EOT
-
- if ($^O eq 'darwin') {
-print OUT <<'EOT';
- if ($boot_symbol_ref = dl_find_symbol(0, $bootname)) {
- goto boot; #extension library has already been loaded, e.g. darwin
- }
-EOT
- }
-
-print OUT <<'EOT';
- # Many dynamic extension loading problems will appear to come from
- # this section of code: XYZ failed at line 123 of DynaLoader.pm.
- # Often these errors are actually occurring in the initialisation
- # C code of the extension XS file. Perl reports the error as being
- # in this perl code simply because this was the last perl code
- # it executed.
-
- my $libref = dl_load_file($file, 0) or do {
- require Carp;
- Carp::croak("Can't load '$file' for module $module: " . dl_error());
- };
- push(@DynaLoader::dl_librefs,$libref); # record loaded object
-
- my @unresolved = dl_undef_symbols();
- if (@unresolved) {
- require Carp;
- Carp::carp("Undefined symbols present after loading $file: @unresolved\n");
- }
-
- $boot_symbol_ref = dl_find_symbol($libref, $bootname) or do {
- require Carp;
- Carp::croak("Can't find '$bootname' symbol in $file\n");
- };
-
- push(@DynaLoader::dl_modules, $module); # record loaded module
-
- boot:
- my $xs = dl_install_xsub($boots, $boot_symbol_ref, $file);
-
- # See comment block above
- push(@DynaLoader::dl_shared_objects, $file); # record files loaded
- return &$xs(@_);
-
- retry:
- my $bootstrap_inherit = DynaLoader->can('bootstrap_inherit') ||
- XSLoader->can('bootstrap_inherit');
- goto &$bootstrap_inherit;
-}
-
-# Versions of DynaLoader prior to 5.6.0 don't have this function.
-sub bootstrap_inherit {
- package DynaLoader;
-
- my $module = $_[0];
- local *DynaLoader::isa = *{"$module\::ISA"};
- local @DynaLoader::isa = (@DynaLoader::isa, 'DynaLoader');
- # Cannot goto due to delocalization. Will report errors on a wrong line?
- require DynaLoader;
- DynaLoader::bootstrap(@_);
-}
-
-1;
-
-
-__END__
-
-=head1 NAME
-
-XSLoader - Dynamically load C libraries into Perl code
-
-=head1 VERSION
-
-Version 0.10
-
-=head1 SYNOPSIS
-
- package YourPackage;
- use XSLoader;
-
- XSLoader::load 'YourPackage', $YourPackage::VERSION;
-
-=head1 DESCRIPTION
-
-This module defines a standard I<simplified> interface to the dynamic
-linking mechanisms available on many platforms. Its primary purpose is
-to implement cheap automatic dynamic loading of Perl modules.
-
-For a more complicated interface, see L<DynaLoader>. Many (most)
-features of C<DynaLoader> are not implemented in C<XSLoader>, like for
-example the C<dl_load_flags>, not honored by C<XSLoader>.
-
-=head2 Migration from C<DynaLoader>
-
-A typical module using L<DynaLoader|DynaLoader> starts like this:
-
- package YourPackage;
- require DynaLoader;
-
- our @ISA = qw( OnePackage OtherPackage DynaLoader );
- our $VERSION = '0.01';
- bootstrap YourPackage $VERSION;
-
-Change this to
-
- package YourPackage;
- use XSLoader;
-
- our @ISA = qw( OnePackage OtherPackage );
- our $VERSION = '0.01';
- XSLoader::load 'YourPackage', $VERSION;
-
-In other words: replace C<require DynaLoader> by C<use XSLoader>, remove
-C<DynaLoader> from C<@ISA>, change C<bootstrap> by C<XSLoader::load>. Do not
-forget to quote the name of your package on the C<XSLoader::load> line,
-and add comma (C<,>) before the arguments (C<$VERSION> above).
-
-Of course, if C<@ISA> contained only C<DynaLoader>, there is no need to have
-the C<@ISA> assignment at all; moreover, if instead of C<our> one uses the
-more backward-compatible
-
- use vars qw($VERSION @ISA);
-
-one can remove this reference to C<@ISA> together with the C<@ISA> assignment.
-
-If no C<$VERSION> was specified on the C<bootstrap> line, the last line becomes
-
- XSLoader::load 'YourPackage';
-
-=head2 Backward compatible boilerplate
-
-If you want to have your cake and eat it too, you need a more complicated
-boilerplate.
-
- package YourPackage;
- use vars qw($VERSION @ISA);
-
- @ISA = qw( OnePackage OtherPackage );
- $VERSION = '0.01';
- eval {
- require XSLoader;
- XSLoader::load('YourPackage', $VERSION);
- 1;
- } or do {
- require DynaLoader;
- push @ISA, 'DynaLoader';
- bootstrap YourPackage $VERSION;
- };
-
-The parentheses about C<XSLoader::load()> arguments are needed since we replaced
-C<use XSLoader> by C<require>, so the compiler does not know that a function
-C<XSLoader::load()> is present.
-
-This boilerplate uses the low-overhead C<XSLoader> if present; if used with
-an antic Perl which has no C<XSLoader>, it falls back to using C<DynaLoader>.
-
-=head1 Order of initialization: early load()
-
-I<Skip this section if the XSUB functions are supposed to be called from other
-modules only; read it only if you call your XSUBs from the code in your module,
-or have a C<BOOT:> section in your XS file (see L<perlxs/"The BOOT: Keyword">).
-What is described here is equally applicable to the L<DynaLoader|DynaLoader>
-interface.>
-
-A sufficiently complicated module using XS would have both Perl code (defined
-in F<YourPackage.pm>) and XS code (defined in F<YourPackage.xs>). If this
-Perl code makes calls into this XS code, and/or this XS code makes calls to
-the Perl code, one should be careful with the order of initialization.
-
-The call to C<XSLoader::load()> (or C<bootstrap()>) has three side effects:
-
-=over
-
-=item *
-
-if C<$VERSION> was specified, a sanity check is done to ensure that the
-versions of the F<.pm> and the (compiled) F<.xs> parts are compatible;
-
-=item *
-
-the XSUBs are made accessible from Perl;
-
-=item *
-
-if a C<BOOT:> section was present in the F<.xs> file, the code there is called.
-
-=back
-
-Consequently, if the code in the F<.pm> file makes calls to these XSUBs, it is
-convenient to have XSUBs installed before the Perl code is defined; for
-example, this makes prototypes for XSUBs visible to this Perl code.
-Alternatively, if the C<BOOT:> section makes calls to Perl functions (or
-uses Perl variables) defined in the F<.pm> file, they must be defined prior to
-the call to C<XSLoader::load()> (or C<bootstrap()>).
-
-The first situation being much more frequent, it makes sense to rewrite the
-boilerplate as
-
- package YourPackage;
- use XSLoader;
- use vars qw($VERSION @ISA);
-
- BEGIN {
- @ISA = qw( OnePackage OtherPackage );
- $VERSION = '0.01';
-
- # Put Perl code used in the BOOT: section here
-
- XSLoader::load 'YourPackage', $VERSION;
- }
-
- # Put Perl code making calls into XSUBs here
-
-=head2 The most hairy case
-
-If the interdependence of your C<BOOT:> section and Perl code is
-more complicated than this (e.g., the C<BOOT:> section makes calls to Perl
-functions which make calls to XSUBs with prototypes), get rid of the C<BOOT:>
-section altogether. Replace it with a function C<onBOOT()>, and call it like
-this:
-
- package YourPackage;
- use XSLoader;
- use vars qw($VERSION @ISA);
-
- BEGIN {
- @ISA = qw( OnePackage OtherPackage );
- $VERSION = '0.01';
- XSLoader::load 'YourPackage', $VERSION;
- }
-
- # Put Perl code used in onBOOT() function here; calls to XSUBs are
- # prototype-checked.
-
- onBOOT;
-
- # Put Perl initialization code assuming that XS is initialized here
-
-
-=head1 DIAGNOSTICS
-
-=over
-
-=item C<Can't find '%s' symbol in %s>
-
-B<(F)> The bootstrap symbol could not be found in the extension module.
-
-=item C<Can't load '%s' for module %s: %s>
-
-B<(F)> The loading or initialisation of the extension module failed.
-The detailed error follows.
-
-=item C<Undefined symbols present after loading %s: %s>
-
-B<(W)> As the message says, some symbols stay undefined although the
-extension module was correctly loaded and initialised. The list of undefined
-symbols follows.
-
-=item C<XSLoader::load('Your::Module', $Your::Module::VERSION)>
-
-B<(F)> You tried to invoke C<load()> without any argument. You must supply
-a module name, and optionally its version.
-
-=back
-
-
-=head1 LIMITATIONS
-
-To reduce the overhead as much as possible, only one possible location
-is checked to find the extension DLL (this location is where C<make install>
-would put the DLL). If not found, the search for the DLL is transparently
-delegated to C<DynaLoader>, which looks for the DLL along the C<@INC> list.
-
-In particular, this is applicable to the structure of C<@INC> used for testing
-not-yet-installed extensions. This means that running uninstalled extensions
-may have much more overhead than running the same extensions after
-C<make install>.
-
-
-=head1 BUGS
-
-Please report any bugs or feature requests via the perlbug(1) utility.
-
-
-=head1 SEE ALSO
-
-L<DynaLoader>
-
-
-=head1 AUTHORS
-
-Ilya Zakharevich originally extracted C<XSLoader> from C<DynaLoader>.
-
-CPAN version is currently maintained by SE<eacute>bastien Aperghis-Tramoni
-E<lt>sebastien at aperghis.netE<gt>.
-
-Previous maintainer was Michael G Schwern <schwern at pobox.com>.
-
-
-=head1 COPYRIGHT & LICENSE
-
-Copyright (C) 1990-2007 by Larry Wall and others.
-
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-EOT
-
-close OUT or die $!;
Deleted: vendor/perl/dist/ext/DynaLoader/dl_beos.xs
===================================================================
--- vendor/perl/dist/ext/DynaLoader/dl_beos.xs 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/DynaLoader/dl_beos.xs 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,133 +0,0 @@
-/*
- * dl_beos.xs, by Tom Spindler
- * based on dl_dlopen.xs, by Paul Marquess
- */
-
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
-
-#include <be/kernel/image.h>
-#include <OS.h>
-#include <stdlib.h>
-#include <limits.h>
-
-#define dlerror() strerror(errno)
-
-#include "dlutils.c" /* SaveError() etc */
-
-static void
-dl_private_init(pTHX)
-{
- (void)dl_generic_private_init(aTHX);
-}
-
-MODULE = DynaLoader PACKAGE = DynaLoader
-
-BOOT:
- (void)dl_private_init(aTHX);
-
-
-void *
-dl_load_file(filename, flags=0)
- char * filename
- int flags
- CODE:
-{ image_id bogo;
- char *path;
- path = malloc(PATH_MAX);
- if (*filename != '/') {
- getcwd(path, PATH_MAX);
- strcat(path, "/");
- strcat(path, filename);
- } else {
- strcpy(path, filename);
- }
-
- DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_load_file(%s,%x):\n", path, flags));
- bogo = load_add_on(path);
- DLDEBUG(2,PerlIO_printf(Perl_debug_log, " libref=%lx\n", (unsigned long) RETVAL));
- ST(0) = sv_newmortal() ;
- if (bogo < 0) {
- SaveError(aTHX_ "%s", strerror(bogo));
- PerlIO_printf(Perl_debug_log, "load_add_on(%s) : %d (%s)\n", path, bogo, strerror(bogo));
- } else {
- RETVAL = (void *) bogo;
- sv_setiv( ST(0), PTR2IV(RETVAL) );
- }
- free(path);
-}
-
-void *
-dl_find_symbol(libhandle, symbolname)
- void * libhandle
- char * symbolname
- CODE:
- status_t retcode;
- void *adr = 0;
-#ifdef DLSYM_NEEDS_UNDERSCORE
- symbolname = Perl_form_nocontext("_%s", symbolname);
-#endif
- RETVAL = NULL;
- DLDEBUG(2, PerlIO_printf(Perl_debug_log,
- "dl_find_symbol(handle=%lx, symbol=%s)\n",
- (unsigned long) libhandle, symbolname));
- retcode = get_image_symbol((image_id) libhandle, symbolname,
- B_SYMBOL_TYPE_TEXT, (void **) &adr);
- RETVAL = adr;
- DLDEBUG(2, PerlIO_printf(Perl_debug_log,
- " symbolref = %lx\n", (unsigned long) RETVAL));
- ST(0) = sv_newmortal() ;
- if (RETVAL == NULL) {
- SaveError(aTHX_ "%s", strerror(retcode)) ;
- PerlIO_printf(Perl_debug_log, "retcode = %p (%s)\n", retcode, strerror(retcode));
- } else
- sv_setiv( ST(0), PTR2IV(RETVAL));
-
-
-void
-dl_undef_symbols()
- PPCODE:
-
-
-
-# These functions should not need changing on any platform:
-
-void
-dl_install_xsub(perl_name, symref, filename="$Package")
- char * perl_name
- void * symref
- const char * filename
- CODE:
- DLDEBUG(2,PerlIO_printf(Perl_debug_log, "dl_install_xsub(name=%s, symref=%lx)\n",
- perl_name, (unsigned long) symref));
- ST(0) = sv_2mortal(newRV((SV*)newXS_flags(perl_name,
- (void(*)(pTHX_ CV *))symref,
- filename, NULL,
- XS_DYNAMIC_FILENAME)));
-
-
-char *
-dl_error()
- CODE:
- dMY_CXT;
- RETVAL = dl_last_error ;
- OUTPUT:
- RETVAL
-
-#if defined(USE_ITHREADS)
-
-void
-CLONE(...)
- CODE:
- MY_CXT_CLONE;
-
- /* MY_CXT_CLONE just does a memcpy on the whole structure, so to avoid
- * using Perl variables that belong to another thread, we create our
- * own for this thread.
- */
- MY_CXT.x_dl_last_error = newSVpvn("", 0);
-
-#endif
-
-# end.
Deleted: vendor/perl/dist/ext/DynaLoader/dl_mac.xs
===================================================================
--- vendor/perl/dist/ext/DynaLoader/dl_mac.xs 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/DynaLoader/dl_mac.xs 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,162 +0,0 @@
-/* dl_mac.xs
- *
- * Platform: Macintosh CFM
- * Author: Matthias Neeracher <neeri at iis.ee.ethz.ch>
- * Adapted from dl_dlopen.xs reference implementation by
- * Paul Marquess (pmarquess at bfsec.bt.co.uk)
- * $Log: not supported by cvs2svn $
- * Revision 1.3 1998/04/07 01:47:24 neeri
- * MacPerl 5.2.0r4b1
- *
- * Revision 1.2 1997/08/08 16:39:18 neeri
- * MacPerl 5.1.4b1 + time() fix
- *
- * Revision 1.1 1997/04/07 20:48:23 neeri
- * Synchronized with MacPerl 5.1.4a1
- *
- */
-
-#define MAC_CONTEXT
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
-
-#include <CodeFragments.h>
-
-typedef CFragConnectionID ConnectionID;
-
-typedef struct {
- ConnectionID ** x_connections;
-} my_cxtx_t; /* this *must* be named my_cxtx_t */
-
-#define DL_CXT_EXTRA /* ask for dl_cxtx to be defined in dlutils.c */
-#include "dlutils.c" /* SaveError() etc */
-
-#define dl_connections (dl_cxtx.x_connections)
-
-static void terminate(pTHX_ void *ptr)
-{
- dMY_CXT;
- int size = GetHandleSize((Handle) dl_connections) / sizeof(ConnectionID);
- HLock((Handle) dl_connections);
- while (size)
- CloseConnection(*dl_connections + --size);
- DisposeHandle((Handle) dl_connections);
- dl_connections = nil;
-}
-
-static void
-dl_private_init(pTHX)
-{
- (void)dl_generic_private_init(aTHX);
-}
-
-MODULE = DynaLoader PACKAGE = DynaLoader
-
-BOOT:
- (void)dl_private_init(aTHX);
-
-
-ConnectionID
-dl_load_file(filename, flags=0)
- char * filename
- int flags
- PREINIT:
- OSErr err;
- FSSpec spec;
- ConnectionID connID;
- Ptr mainAddr;
- Str255 errName;
- CODE:
- DLDEBUG(1,PerlIO_printf(Perl_debug_log,"dl_load_file(%s):\n", filename));
- err = GUSIPath2FSp(filename, &spec);
- if (!err)
- err =
- GetDiskFragment(
- &spec, 0, 0, spec.name, kLoadCFrag, &connID, &mainAddr, errName);
- if (!err) {
- dMY_CXT;
- if (!dl_connections) {
- dl_connections = (ConnectionID **)NewHandle(0);
- call_atexit(terminate, (void*)0);
- }
- PtrAndHand((Ptr) &connID, (Handle) dl_connections, sizeof(ConnectionID));
- RETVAL = connID;
- } else
- RETVAL = (ConnectionID) 0;
- DLDEBUG(2,PerlIO_printf(Perl_debug_log," libref=%d\n", RETVAL));
- ST(0) = sv_newmortal() ;
- if (err)
- SaveError(aTHX_ "DynaLoader error [%d, %#s]", err, errName) ;
- else
- sv_setiv( ST(0), (IV)RETVAL);
-
-void *
-dl_find_symbol(connID, symbol)
- ConnectionID connID
- Str255 symbol
- CODE:
- {
- OSErr err;
- Ptr symAddr;
- CFragSymbolClass symClass;
- DLDEBUG(2,PerlIO_printf(Perl_debug_log,"dl_find_symbol(handle=%x, symbol=%#s)\n",
- connID, symbol));
- err = FindSymbol(connID, symbol, &symAddr, &symClass);
- if (err)
- symAddr = (Ptr) 0;
- RETVAL = (void *) symAddr;
- DLDEBUG(2,PerlIO_printf(Perl_debug_log," symbolref = %x\n", RETVAL));
- ST(0) = sv_newmortal() ;
- if (err)
- SaveError(aTHX_ "DynaLoader error [%d]!", err) ;
- else
- sv_setiv( ST(0), (IV)RETVAL);
- }
-
-void
-dl_undef_symbols()
- PPCODE:
-
-
-
-# These functions should not need changing on any platform:
-
-void
-dl_install_xsub(perl_name, symref, filename="$Package")
- char * perl_name
- void * symref
- const char * filename
- CODE:
- DLDEBUG(2,PerlIO_printf(Perl_debug_log,"dl_install_xsub(name=%s, symref=%x)\n",
- perl_name, symref));
- ST(0) = sv_2mortal(newRV((SV*)newXS_flags(perl_name,
- (void(*)(pTHX_ CV *))symref,
- filename, NULL,
- XS_DYNAMIC_FILENAME)));
-
-
-char *
-dl_error()
- CODE:
- dMY_CXT;
- RETVAL = dl_last_error ;
- OUTPUT:
- RETVAL
-
-#if defined(USE_ITHREADS)
-
-void
-CLONE(...)
- CODE:
- MY_CXT_CLONE;
-
- /* MY_CXT_CLONE just does a memcpy on the whole structure, so to avoid
- * using Perl variables that belong to another thread, we create our
- * own for this thread.
- */
- MY_CXT.x_dl_last_error = newSVpvn("", 0);
-
-#endif
-
-# end.
Deleted: vendor/perl/dist/ext/DynaLoader/dl_mpeix.xs
===================================================================
--- vendor/perl/dist/ext/DynaLoader/dl_mpeix.xs 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/DynaLoader/dl_mpeix.xs 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,146 +0,0 @@
-/*
- * Author: Mark Klein (mklein at dis.com)
- * Version: 2.1, 1996/07/25
- * Version: 2.2, 1997/09/25 Mark Bixby (markb at cccd.edu)
- * Version: 2.3, 1998/11/19 Mark Bixby (markb at cccd.edu)
- * Version: 2.4, 2002/03/24 Mark Bixby (mark at bixby.org)
- */
-
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
-
-#ifdef __GNUC__
-extern void HPGETPROCPLABEL( int parms,
- char * procname,
- void * plabel,
- int * status,
- char * firstfile,
- int casesensitive,
- int symboltype,
- int * datasize,
- int position,
- int searchpath,
- int binding);
-#else
-#pragma intrinsic HPGETPROCPLABEL
-#endif
-#include "dlutils.c" /* for SaveError() etc */
-
-typedef struct {
- char filename[PATH_MAX + 3];
- } t_mpe_dld, *p_mpe_dld;
-
-static void
-dl_private_init(pTHX)
-{
- (void)dl_generic_private_init(aTHX);
-}
-
-MODULE = DynaLoader PACKAGE = DynaLoader
-
-BOOT:
- (void)dl_private_init(aTHX);
-
-void *
-dl_load_file(filename, flags=0)
- char * filename
- int flags
- PREINIT:
- char buf[PATH_MAX + 3];
- p_mpe_dld obj = NULL;
-
- CODE:
- DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_load_file(%s,%x):\n", filename,
-flags));
- if (flags & 0x01)
- Perl_warn(aTHX_
-"Can't make loaded symbols global on this platform while loading %s",filename);
- obj = (p_mpe_dld) safemalloc(sizeof(t_mpe_dld));
- memzero(obj, sizeof(t_mpe_dld));
- if (filename[0] != '/')
- {
- getcwd(buf,sizeof(buf));
- sprintf(obj->filename," %s/%s ",buf,filename);
- }
- else
- sprintf(obj->filename," %s ",filename);
-
- DLDEBUG(2,PerlIO_printf(Perl_debug_log," libref=%x\n", obj));
-
- ST(0) = sv_newmortal() ;
- if (obj == NULL)
- SaveError(aTHX_"%s",Strerror(errno));
- else
- sv_setiv( ST(0), PTR2IV(obj) );
-
-void *
-dl_find_symbol(libhandle, symbolname)
- void * libhandle
- char * symbolname
- CODE:
- int datalen;
- p_mpe_dld obj = (p_mpe_dld) libhandle;
- char symname[PATH_MAX + 3];
- void * symaddr = NULL;
- int status;
- DLDEBUG(2,PerlIO_printf(Perl_debug_log,"dl_find_symbol(handle=%x, symbol=%s)\n",
- libhandle, symbolname));
- ST(0) = sv_newmortal() ;
- errno = 0;
-
- sprintf(symname, " %s ", symbolname);
- HPGETPROCPLABEL(8, symname, &symaddr, &status, obj->filename, 1,
- 0, &datalen, 1, 0, 0);
-
- DLDEBUG(2,PerlIO_printf(Perl_debug_log," symbolref(PROCEDURE) = %x, status=%x\n", symaddr, status));
-
- if (status != 0) {
- SaveError(aTHX_"%s",(errno) ? Strerror(errno) : "Symbol not found") ;
- } else {
- sv_setiv( ST(0), PTR2IV(symaddr) );
- }
-
-void
-dl_undef_symbols()
- PPCODE:
-
-# These functions should not need changing on any platform:
-
-void
-dl_install_xsub(perl_name, symref, filename="$Package")
- char * perl_name
- void * symref
- const char * filename
- CODE:
- DLDEBUG(2,PerlIO_printf(Perl_debug_log,"dl_install_xsub(name=%s, symref=%x)\n",
- perl_name, symref));
- ST(0) = sv_2mortal(newRV((SV*)newXS_flags(perl_name,
- (void(*)(pTHX_ CV *))symref,
- filename, NULL,
- XS_DYNAMIC_FILENAME)));
-
-char *
-dl_error()
- CODE:
- dMY_CXT;
- RETVAL = dl_last_error ;
- OUTPUT:
- RETVAL
-
-#if defined(USE_ITHREADS)
-
-void
-CLONE(...)
- CODE:
- MY_CXT_CLONE;
-
- /* MY_CXT_CLONE just does a memcpy on the whole structure, so to avoid
- * using Perl variables that belong to another thread, we create our
- * own for this thread.
- */
- MY_CXT.x_dl_last_error = newSVpvn("", 0);
-
-#endif
-
-# end.
Deleted: vendor/perl/dist/ext/DynaLoader/dl_vmesa.xs
===================================================================
--- vendor/perl/dist/ext/DynaLoader/dl_vmesa.xs 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/DynaLoader/dl_vmesa.xs 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,192 +0,0 @@
-/* dl_vmesa.xs
- *
- * Platform: VM/ESA, possibly others which use dllload etc.
- * Author: Neale Ferguson (neale at mailbox.tabnsw.com.au)
- * Created: 23rd September, 1998
- *
- *
- */
-
-/* Porting notes:
-
-
- Definition of VM/ESA dynamic Linking functions
- ==============================================
- In order to make this implementation easier to understand here is a
- quick definition of the VM/ESA Dynamic Linking functions which are
- used here.
-
- dlopen
- ------
- void *
- dlopen(const char *path)
-
- This function takes the name of a dynamic object file and returns
- a descriptor which can be used by dlsym later. It returns NULL on
- error.
-
-
- dllsym
- ------
- void *
- dlsym(void *handle, char *symbol)
-
- Takes the handle returned from dlopen and the name of a symbol to
- get the address of. If the symbol was found a pointer is
- returned. It returns NULL on error.
-
- dlerror
- -------
- char * dlerror()
-
- Returns a null-terminated string which describes the last error
- that occurred with the other dll functions. After each call to
- dlerror the error message will be reset to a null pointer. The
- SaveError function is used to save the error as soo as it happens.
-
-
- Return Types
- ============
- In this implementation the two functions, dl_load_file &
- dl_find_symbol, return void *. This is because the underlying SunOS
- dynamic linker calls also return void *. This is not necessarily
- the case for all architectures. For example, some implementation
- will want to return a char * for dl_load_file.
-
- If void * is not appropriate for your architecture, you will have to
- change the void * to whatever you require. If you are not certain of
- how Perl handles C data types, I suggest you start by consulting
- Dean Roerich's Perl 5 API document. Also, have a look in the typemap
- file (in the ext directory) for a fairly comprehensive list of types
- that are already supported. If you are completely stuck, I suggest you
- post a message to perl5-porters, comp.lang.perl.misc or if you are really
- desperate to me.
-
- Remember when you are making any changes that the return value from
- dl_load_file is used as a parameter in the dl_find_symbol
- function. Also the return value from find_symbol is used as a parameter
- to install_xsub.
-
-
- Dealing with Error Messages
- ============================
- In order to make the handling of dynamic linking errors as generic as
- possible you should store any error messages associated with your
- implementation with the StoreError function.
-
- In the case of VM/ESA the function dlerror returns the error message
- associated with the last dynamic link error. As the VM/ESA dynamic
- linker functions return NULL on error every call to a VM/ESA dynamic
- dynamic link routine is coded like this
-
- RETVAL = dlopen(filename) ;
- if (RETVAL == NULL)
- SaveError(aTHX_ "%s",dlerror()) ;
-
- Note that SaveError() takes a printf format string. Use a "%s" as
- the first parameter if the error may contain and % characters.
-
-*/
-
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
-#include <dll.h>
-
-
-#include "dlutils.c" /* SaveError() etc */
-
-
-static void
-dl_private_init(pTHX)
-{
- (void)dl_generic_private_init(aTHX);
-}
-
-MODULE = DynaLoader PACKAGE = DynaLoader
-
-BOOT:
- (void)dl_private_init(aTHX);
-
-
-void *
-dl_load_file(filename, flags=0)
- char * filename
- int flags
- CODE:
- if (flags & 0x01)
- Perl_warn(aTHX_ "Can't make loaded symbols global on this platform while loading %s",filename);
- DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_load_file(%s,%x):\n", filename,flags));
- RETVAL = dlopen(filename) ;
- DLDEBUG(2,PerlIO_printf(Perl_debug_log, " libref=%lx\n", (unsigned long) RETVAL));
- ST(0) = sv_newmortal() ;
- if (RETVAL == NULL)
- SaveError(aTHX_ "%s",dlerror()) ;
- else
- sv_setiv( ST(0), PTR2IV(RETVAL) );
-
-
-void *
-dl_find_symbol(libhandle, symbolname)
- void * libhandle
- char * symbolname
- CODE:
- DLDEBUG(2, PerlIO_printf(Perl_debug_log,
- "dl_find_symbol(handle=%lx, symbol=%s)\n",
- (unsigned long) libhandle, symbolname));
- RETVAL = dlsym(libhandle, symbolname);
- DLDEBUG(2, PerlIO_printf(Perl_debug_log,
- " symbolref = %lx\n", (unsigned long) RETVAL));
- ST(0) = sv_newmortal() ;
- if (RETVAL == NULL)
- SaveError(aTHX_ "%s",dlerror()) ;
- else
- sv_setiv( ST(0), PTR2IV(RETVAL) );
-
-
-void
-dl_undef_symbols()
- PPCODE:
-
-
-
-# These functions should not need changing on any platform:
-
-void
-dl_install_xsub(perl_name, symref, filename="$Package")
- char * perl_name
- void * symref
- const char * filename
- CODE:
- DLDEBUG(2,PerlIO_printf(Perl_debug_log, "dl_install_xsub(name=%s, symref=%lx)\n",
- perl_name, (unsigned long) symref));
- ST(0) = sv_2mortal(newRV((SV*)newXS_flags(perl_name,
- (void(*)(pTHX_ CV *))symref,
- filename, NULL,
- XS_DYNAMIC_FILENAME)));
-
-
-char *
-dl_error()
- CODE:
- dMY_CXT;
- RETVAL = dl_last_error ;
- OUTPUT:
- RETVAL
-
-#if defined(USE_ITHREADS)
-
-void
-CLONE(...)
- CODE:
- MY_CXT_CLONE;
-
- /* MY_CXT_CLONE just does a memcpy on the whole structure, so to avoid
- * using Perl variables that belong to another thread, we create our
- * own for this thread.
- */
- MY_CXT.x_dl_last_error = newSVpvn("", 0);
-
-#endif
-
-# end.
Deleted: vendor/perl/dist/ext/DynaLoader/t/XSLoader.t
===================================================================
--- vendor/perl/dist/ext/DynaLoader/t/XSLoader.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/DynaLoader/t/XSLoader.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,87 +0,0 @@
-#!perl -T
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = '../lib';
- }
-}
-
-use strict;
-use Config;
-
-my $db_file;
-BEGIN {
- eval "use Test::More";
- if ($@) {
- print "1..0 # Skip: Test::More not available\n";
- die "Test::More not available\n";
- }
-
- use Config;
- foreach (qw/SDBM_File GDBM_File ODBM_File NDBM_File DB_File/) {
- if ($Config{extensions} =~ /\b$_\b/) {
- $db_file = $_;
- last;
- }
- }
-}
-
-
-my %modules = (
- # ModuleName => q|code to check that it was loaded|,
- 'Cwd' => q| ::can_ok( 'Cwd' => 'fastcwd' ) |, # 5.7 ?
- 'File::Glob' => q| ::can_ok( 'File::Glob' => 'doglob' ) |, # 5.6
- $db_file => q| ::can_ok( $db_file => 'TIEHASH' ) |, # 5.0
- 'Socket' => q| ::can_ok( 'Socket' => 'inet_aton' ) |, # 5.0
- 'Time::HiRes'=> q| ::can_ok( 'Time::HiRes' => 'usleep' ) |, # 5.7.3
-);
-
-plan tests => keys(%modules) * 4 + 5;
-
-# Try to load the module
-use_ok( 'XSLoader' );
-
-# Check functions
-can_ok( 'XSLoader' => 'load' );
-can_ok( 'XSLoader' => 'bootstrap_inherit' );
-
-# Check error messages
-eval { XSLoader::load() };
-like( $@, '/^XSLoader::load\(\'Your::Module\', \$Your::Module::VERSION\)/',
- "calling XSLoader::load() with no argument" );
-
-eval q{ package Thwack; XSLoader::load('Thwack'); };
-if ($Config{usedl}) {
- like( $@, q{/^Can't locate loadable object for module Thwack in @INC/},
- "calling XSLoader::load() under a package with no XS part" );
-}
-else {
- like( $@, q{/^Can't load module Thwack, dynamic loading not available in this perl./},
- "calling XSLoader::load() under a package with no XS part" );
-}
-
-# Now try to load well known XS modules
-my $extensions = $Config{'extensions'};
-$extensions =~ s|/|::|g;
-
-for my $module (sort keys %modules) {
- my $warnings = "";
- local $SIG{__WARN__} = sub { $warnings = $_[0] };
-
- SKIP: {
- skip "$module not available", 4 if $extensions !~ /\b$module\b/;
-
- eval qq{ package $module; XSLoader::load('$module', "qunckkk"); };
- like( $@, "/^$module object version \\S+ does not match bootstrap parameter (?:qunckkk|0)/",
- "calling XSLoader::load() with a XS module and an incorrect version" );
- like( $warnings, "/^\$|^Version string 'qunckkk' contains invalid data; ignoring: 'qunckkk'/",
- "in Perl 5.10, DynaLoader warns about the incorrect version string" );
-
- eval qq{ package $module; XSLoader::load('$module'); };
- is( $@, '', "XSLoader::load($module)");
-
- eval qq{ package $module; $modules{$module}; };
- }
-}
-
Modified: vendor/perl/dist/ext/File-Glob/Glob.pm
===================================================================
--- vendor/perl/dist/ext/File-Glob/Glob.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/File-Glob/Glob.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -37,7 +37,7 @@
@EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob');
-$VERSION = '1.20';
+$VERSION = '1.20_01';
sub import {
require Exporter;
Modified: vendor/perl/dist/ext/File-Glob/Glob.xs
===================================================================
--- vendor/perl/dist/ext/File-Glob/Glob.xs 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/File-Glob/Glob.xs 2014-08-27 11:27:40 UTC (rev 6720)
@@ -9,6 +9,9 @@
#define MY_CXT_KEY "File::Glob::_guts" XS_VERSION
typedef struct {
+#ifdef USE_ITHREADS
+ tTHX interp;
+#endif
int x_GLOB_ERROR;
HV * x_GLOB_ENTRIES;
Perl_ophook_t x_GLOB_OLD_OPHOOK;
@@ -385,6 +388,33 @@
iterate(aTHX_ doglob_iter_wrapper);
SPAGAIN;
+#ifdef USE_ITHREADS
+
+void
+CLONE(...)
+INIT:
+ HV *glob_entries_clone = NULL;
+CODE:
+ PERL_UNUSED_ARG(items);
+ {
+ dMY_CXT;
+ if ( MY_CXT.x_GLOB_ENTRIES ) {
+ CLONE_PARAMS param;
+ param.stashes = NULL;
+ param.flags = 0;
+ param.proto_perl = MY_CXT.interp;
+
+ glob_entries_clone = MUTABLE_HV(sv_dup_inc((SV*)MY_CXT.x_GLOB_ENTRIES, ¶m));
+ }
+ }
+ {
+ MY_CXT_CLONE;
+ MY_CXT.x_GLOB_ENTRIES = glob_entries_clone;
+ MY_CXT.interp = aTHX;
+ }
+
+#endif
+
BOOT:
{
#ifndef PERL_EXTERNAL_GLOB
@@ -400,6 +430,9 @@
dMY_CXT;
MY_CXT.x_GLOB_ENTRIES = NULL;
MY_CXT.x_GLOB_OLD_OPHOOK = PL_opfreehook;
+#ifdef USE_ITHREADS
+ MY_CXT.interp = aTHX;
+#endif
PL_opfreehook = glob_ophook;
}
}
Added: vendor/perl/dist/ext/File-Glob/t/threads.t
===================================================================
--- vendor/perl/dist/ext/File-Glob/t/threads.t (rev 0)
+++ vendor/perl/dist/ext/File-Glob/t/threads.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -0,0 +1,71 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ require Config; import Config;
+ if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) {
+ print "1..0\n";
+ exit 0;
+ }
+}
+use strict;
+use warnings;
+# Test::More needs threads pre-loaded
+use if $Config{useithreads}, 'threads';
+use Test::More;
+
+BEGIN {
+ if (! $Config{'useithreads'}) {
+ plan skip_all => "Perl not compiled with 'useithreads'";
+ }
+}
+
+use File::Temp qw(tempdir);
+use File::Spec qw();
+use File::Glob qw(csh_glob);
+
+my($dir) = tempdir(CLEANUP => 1)
+ or die "Could not create temporary directory";
+
+my @temp_files = qw(1_file.tmp 2_file.tmp 3_file.tmp);
+for my $file (@temp_files) {
+ open my $fh, ">", File::Spec->catfile($dir, $file)
+ or die "Could not create file $dir/$file: $!";
+ close $fh;
+}
+my $cwd = Cwd::cwd();
+chdir $dir
+ or die "Could not chdir to $dir: $!";
+
+sub do_glob { scalar csh_glob("*") }
+# Stablish some glob state
+my $first_file = do_glob();
+is($first_file, $temp_files[0]);
+
+my @files;
+push @files, threads->create(\&do_glob)->join() for 1..5;
+is_deeply(
+ \@files,
+ [($temp_files[1]) x 5],
+ "glob() state is cloned for new threads"
+);
+
+ at files = threads->create({'context' => 'list'},
+ sub {
+ return do_glob(), threads->create(\&do_glob)->join()
+ })->join();
+
+is_deeply(
+ \@files,
+ [@temp_files[1,2]],
+ "..and for new threads inside threads"
+);
+
+my $second_file = do_glob();
+is($second_file, $temp_files[1], "state doesn't leak from threads");
+
+chdir $cwd
+ or die "Could not chdir back to $cwd: $!";
+
+done_testing;
Deleted: vendor/perl/dist/ext/Hash-Util-FieldHash/t/10_hash.t
===================================================================
--- vendor/perl/dist/ext/Hash-Util-FieldHash/t/10_hash.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/Hash-Util-FieldHash/t/10_hash.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,110 +0,0 @@
-#!./perl -w
-use Test::More;
-
-use strict;
-use Hash::Util::FieldHash qw( :all);
-
-no warnings 'misc';
-
-plan tests => 5;
-
-fieldhash my %h;
-
-ok (!Internals::HvREHASH(%h), "hash doesn't start with rehash flag on");
-
-foreach (1..10) {
- $h{"\0"x$_}++;
-}
-
-ok (!Internals::HvREHASH(%h), "10 entries doesn't trigger rehash");
-
-foreach (11..20) {
- $h{"\0"x$_}++;
-}
-
-ok (Internals::HvREHASH(%h), "20 entries triggers rehash");
-
-
-
-
-# second part using an emulation of the PERL_HASH in perl, mounting an
-# attack on a pre-populated hash. This is also useful if you need normal
-# keys which don't contain \0 -- suitable for stashes
-
-use constant MASK_U32 => 2**32;
-use constant HASH_SEED => 0;
-use constant THRESHOLD => 14;
-use constant START => "a";
-
-# some initial hash data
-fieldhash my %h2;
-%h2 = map {$_ => 1} 'a'..'cc';
-
-ok (!Internals::HvREHASH(%h2),
- "starting with pre-populated non-pathological hash (rehash flag if off)");
-
-my @keys = get_keys(\%h2);
-$h2{$_}++ for @keys;
-ok (Internals::HvREHASH(%h2),
- scalar(@keys) . " colliding into the same bucket keys are triggering rehash");
-
-sub get_keys {
- my $hr = shift;
-
- # the minimum of bits required to mount the attack on a hash
- my $min_bits = log(THRESHOLD)/log(2);
-
- # if the hash has already been populated with a significant amount
- # of entries the number of mask bits can be higher
- my $keys = scalar keys %$hr;
- my $bits = $keys ? log($keys)/log(2) : 0;
- $bits = $min_bits if $min_bits > $bits;
-
- $bits = int($bits) < $bits ? int($bits) + 1 : int($bits);
- # need to add 2 bits to cover the internal split cases
- $bits += 2;
- my $mask = 2**$bits-1;
- print "# using mask: $mask ($bits)\n";
-
- my @keys;
- my $s = START;
- my $c = 0;
- # get 2 keys on top of the THRESHOLD
- my $hash;
- while (@keys < THRESHOLD+2) {
- # next if exists $hash->{$s};
- $hash = hash($s);
- next unless ($hash & $mask) == 0;
- $c++;
- printf "# %2d: %5s, %10s\n", $c, $s, $hash;
- push @keys, $s;
- } continue {
- $s++;
- }
-
- return @keys;
-}
-
-
-# trying to provide the fastest equivalent of C macro's PERL_HASH in
-# Perl - the main complication is that it uses U32 integer, which we
-# can't do it perl, without doing some tricks
-sub hash {
- my $s = shift;
- my @c = split //, $s;
- my $u = HASH_SEED;
- for (@c) {
- # (A % M) + (B % M) == (A + B) % M
- # This works because '+' produces a NV, which is big enough to hold
- # the intermediate result. We only need the % before any "^" and "&"
- # to get the result in the range for an I32.
- # and << doesn't work on NV, so using 1 << 10
- $u += ord;
- $u += $u * (1 << 10); $u %= MASK_U32;
- $u ^= $u >> 6;
- }
- $u += $u << 3; $u %= MASK_U32;
- $u ^= $u >> 11; $u %= MASK_U32;
- $u += $u << 15; $u %= MASK_U32;
- $u;
-}
Deleted: vendor/perl/dist/ext/Opcode/Makefile.PL
===================================================================
--- vendor/perl/dist/ext/Opcode/Makefile.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/Opcode/Makefile.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,6 +0,0 @@
-use ExtUtils::MakeMaker;
-WriteMakefile(
- NAME => 'Opcode',
- MAN3PODS => {},
- VERSION_FROM => 'Opcode.pm',
-);
Deleted: vendor/perl/dist/ext/Opcode/Safe.pm
===================================================================
--- vendor/perl/dist/ext/Opcode/Safe.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/Opcode/Safe.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,621 +0,0 @@
-package Safe;
-
-use 5.003_11;
-use strict;
-
-$Safe::VERSION = "2.12";
-
-# *** Don't declare any lexicals above this point ***
-#
-# This function should return a closure which contains an eval that can't
-# see any lexicals in scope (apart from __ExPr__ which is unavoidable)
-
-sub lexless_anon_sub {
- # $_[0] is package;
- # $_[1] is strict flag;
- my $__ExPr__ = $_[2]; # must be a lexical to create the closure that
- # can be used to pass the value into the safe
- # world
-
- # Create anon sub ref in root of compartment.
- # Uses a closure (on $__ExPr__) to pass in the code to be executed.
- # (eval on one line to keep line numbers as expected by caller)
- eval sprintf
- 'package %s; %s strict; sub { @_=(); eval q[my $__ExPr__;] . $__ExPr__; }',
- $_[0], $_[1] ? 'use' : 'no';
-}
-
-use Carp;
-use Carp::Heavy;
-
-use Opcode 1.01, qw(
- opset opset_to_ops opmask_add
- empty_opset full_opset invert_opset verify_opset
- opdesc opcodes opmask define_optag opset_to_hex
-);
-
-*ops_to_opset = \&opset; # Temporary alias for old Penguins
-
-
-my $default_root = 0;
-# share *_ and functions defined in universal.c
-# Don't share stuff like *UNIVERSAL:: otherwise code from the
-# compartment can 0wn functions in UNIVERSAL
-my $default_share = [qw[
- *_
- &PerlIO::get_layers
- &Regexp::DESTROY
- &re::is_regexp
- &re::regname
- &re::regnames
- &re::regnames_count
- &Tie::Hash::NamedCapture::FETCH
- &Tie::Hash::NamedCapture::STORE
- &Tie::Hash::NamedCapture::DELETE
- &Tie::Hash::NamedCapture::CLEAR
- &Tie::Hash::NamedCapture::EXISTS
- &Tie::Hash::NamedCapture::FIRSTKEY
- &Tie::Hash::NamedCapture::NEXTKEY
- &Tie::Hash::NamedCapture::SCALAR
- &Tie::Hash::NamedCapture::flags
- &UNIVERSAL::isa
- &UNIVERSAL::can
- &UNIVERSAL::DOES
- &UNIVERSAL::VERSION
- &utf8::is_utf8
- &utf8::valid
- &utf8::encode
- &utf8::decode
- &utf8::upgrade
- &utf8::downgrade
- &utf8::native_to_unicode
- &utf8::unicode_to_native
- &version::()
- &version::new
- &version::(""
- &version::stringify
- &version::(0+
- &version::numify
- &version::normal
- &version::(cmp
- &version::(<=>
- &version::vcmp
- &version::(bool
- &version::boolean
- &version::(nomethod
- &version::noop
- &version::is_alpha
- &version::qv
-]];
-
-sub new {
- my($class, $root, $mask) = @_;
- my $obj = {};
- bless $obj, $class;
-
- if (defined($root)) {
- croak "Can't use \"$root\" as root name"
- if $root =~ /^main\b/ or $root !~ /^\w[:\w]*$/;
- $obj->{Root} = $root;
- $obj->{Erase} = 0;
- }
- else {
- $obj->{Root} = "Safe::Root".$default_root++;
- $obj->{Erase} = 1;
- }
-
- # use permit/deny methods instead till interface issues resolved
- # XXX perhaps new Safe 'Root', mask => $mask, foo => bar, ...;
- croak "Mask parameter to new no longer supported" if defined $mask;
- $obj->permit_only(':default');
-
- # We must share $_ and @_ with the compartment or else ops such
- # as split, length and so on won't default to $_ properly, nor
- # will passing argument to subroutines work (via @_). In fact,
- # for reasons I don't completely understand, we need to share
- # the whole glob *_ rather than $_ and @_ separately, otherwise
- # @_ in non default packages within the compartment don't work.
- $obj->share_from('main', $default_share);
- Opcode::_safe_pkg_prep($obj->{Root}) if($Opcode::VERSION > 1.04);
- return $obj;
-}
-
-sub DESTROY {
- my $obj = shift;
- $obj->erase('DESTROY') if $obj->{Erase};
-}
-
-sub erase {
- my ($obj, $action) = @_;
- my $pkg = $obj->root();
- my ($stem, $leaf);
-
- no strict 'refs';
- $pkg = "main::$pkg\::"; # expand to full symbol table name
- ($stem, $leaf) = $pkg =~ m/(.*::)(\w+::)$/;
-
- # The 'my $foo' is needed! Without it you get an
- # 'Attempt to free unreferenced scalar' warning!
- my $stem_symtab = *{$stem}{HASH};
-
- #warn "erase($pkg) stem=$stem, leaf=$leaf";
- #warn " stem_symtab hash ".scalar(%$stem_symtab)."\n";
- # ", join(', ', %$stem_symtab),"\n";
-
-# delete $stem_symtab->{$leaf};
-
- my $leaf_glob = $stem_symtab->{$leaf};
- my $leaf_symtab = *{$leaf_glob}{HASH};
-# warn " leaf_symtab ", join(', ', %$leaf_symtab),"\n";
- %$leaf_symtab = ();
- #delete $leaf_symtab->{'__ANON__'};
- #delete $leaf_symtab->{'foo'};
- #delete $leaf_symtab->{'main::'};
-# my $foo = undef ${"$stem\::"}{"$leaf\::"};
-
- if ($action and $action eq 'DESTROY') {
- delete $stem_symtab->{$leaf};
- } else {
- $obj->share_from('main', $default_share);
- }
- 1;
-}
-
-
-sub reinit {
- my $obj= shift;
- $obj->erase;
- $obj->share_redo;
-}
-
-sub root {
- my $obj = shift;
- croak("Safe root method now read-only") if @_;
- return $obj->{Root};
-}
-
-
-sub mask {
- my $obj = shift;
- return $obj->{Mask} unless @_;
- $obj->deny_only(@_);
-}
-
-# v1 compatibility methods
-sub trap { shift->deny(@_) }
-sub untrap { shift->permit(@_) }
-
-sub deny {
- my $obj = shift;
- $obj->{Mask} |= opset(@_);
-}
-sub deny_only {
- my $obj = shift;
- $obj->{Mask} = opset(@_);
-}
-
-sub permit {
- my $obj = shift;
- # XXX needs testing
- $obj->{Mask} &= invert_opset opset(@_);
-}
-sub permit_only {
- my $obj = shift;
- $obj->{Mask} = invert_opset opset(@_);
-}
-
-
-sub dump_mask {
- my $obj = shift;
- print opset_to_hex($obj->{Mask}),"\n";
-}
-
-
-
-sub share {
- my($obj, @vars) = @_;
- $obj->share_from(scalar(caller), \@vars);
-}
-
-sub share_from {
- my $obj = shift;
- my $pkg = shift;
- my $vars = shift;
- my $no_record = shift || 0;
- my $root = $obj->root();
- croak("vars not an array ref") unless ref $vars eq 'ARRAY';
- no strict 'refs';
- # Check that 'from' package actually exists
- croak("Package \"$pkg\" does not exist")
- unless keys %{"$pkg\::"};
- my $arg;
- foreach $arg (@$vars) {
- # catch some $safe->share($var) errors:
- my ($var, $type);
- $type = $1 if ($var = $arg) =~ s/^(\W)//;
- # warn "share_from $pkg $type $var";
- *{$root."::$var"} = (!$type) ? \&{$pkg."::$var"}
- : ($type eq '&') ? \&{$pkg."::$var"}
- : ($type eq '$') ? \${$pkg."::$var"}
- : ($type eq '@') ? \@{$pkg."::$var"}
- : ($type eq '%') ? \%{$pkg."::$var"}
- : ($type eq '*') ? *{$pkg."::$var"}
- : croak(qq(Can't share "$type$var" of unknown type));
- }
- $obj->share_record($pkg, $vars) unless $no_record or !$vars;
-}
-
-sub share_record {
- my $obj = shift;
- my $pkg = shift;
- my $vars = shift;
- my $shares = \%{$obj->{Shares} ||= {}};
- # Record shares using keys of $obj->{Shares}. See reinit.
- @{$shares}{@$vars} = ($pkg) x @$vars if @$vars;
-}
-sub share_redo {
- my $obj = shift;
- my $shares = \%{$obj->{Shares} ||= {}};
- my($var, $pkg);
- while(($var, $pkg) = each %$shares) {
- # warn "share_redo $pkg\:: $var";
- $obj->share_from($pkg, [ $var ], 1);
- }
-}
-sub share_forget {
- delete shift->{Shares};
-}
-
-sub varglob {
- my ($obj, $var) = @_;
- no strict 'refs';
- return *{$obj->root()."::$var"};
-}
-
-
-sub reval {
- my ($obj, $expr, $strict) = @_;
- my $root = $obj->{Root};
-
- my $evalsub = lexless_anon_sub($root,$strict, $expr);
- return Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub);
-}
-
-sub rdo {
- my ($obj, $file) = @_;
- my $root = $obj->{Root};
-
- my $evalsub = eval
- sprintf('package %s; sub { @_ = (); do $file }', $root);
- return Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub);
-}
-
-
-1;
-
-__END__
-
-=head1 NAME
-
-Safe - Compile and execute code in restricted compartments
-
-=head1 SYNOPSIS
-
- use Safe;
-
- $compartment = new Safe;
-
- $compartment->permit(qw(time sort :browse));
-
- $result = $compartment->reval($unsafe_code);
-
-=head1 DESCRIPTION
-
-The Safe extension module allows the creation of compartments
-in which perl code can be evaluated. Each compartment has
-
-=over 8
-
-=item a new namespace
-
-The "root" of the namespace (i.e. "main::") is changed to a
-different package and code evaluated in the compartment cannot
-refer to variables outside this namespace, even with run-time
-glob lookups and other tricks.
-
-Code which is compiled outside the compartment can choose to place
-variables into (or I<share> variables with) the compartment's namespace
-and only that data will be visible to code evaluated in the
-compartment.
-
-By default, the only variables shared with compartments are the
-"underscore" variables $_ and @_ (and, technically, the less frequently
-used %_, the _ filehandle and so on). This is because otherwise perl
-operators which default to $_ will not work and neither will the
-assignment of arguments to @_ on subroutine entry.
-
-=item an operator mask
-
-Each compartment has an associated "operator mask". Recall that
-perl code is compiled into an internal format before execution.
-Evaluating perl code (e.g. via "eval" or "do 'file'") causes
-the code to be compiled into an internal format and then,
-provided there was no error in the compilation, executed.
-Code evaluated in a compartment compiles subject to the
-compartment's operator mask. Attempting to evaluate code in a
-compartment which contains a masked operator will cause the
-compilation to fail with an error. The code will not be executed.
-
-The default operator mask for a newly created compartment is
-the ':default' optag.
-
-It is important that you read the L<Opcode> module documentation
-for more information, especially for detailed definitions of opnames,
-optags and opsets.
-
-Since it is only at the compilation stage that the operator mask
-applies, controlled access to potentially unsafe operations can
-be achieved by having a handle to a wrapper subroutine (written
-outside the compartment) placed into the compartment. For example,
-
- $cpt = new Safe;
- sub wrapper {
- # vet arguments and perform potentially unsafe operations
- }
- $cpt->share('&wrapper');
-
-=back
-
-
-=head1 WARNING
-
-The authors make B<no warranty>, implied or otherwise, about the
-suitability of this software for safety or security purposes.
-
-The authors shall not in any case be liable for special, incidental,
-consequential, indirect or other similar damages arising from the use
-of this software.
-
-Your mileage will vary. If in any doubt B<do not use it>.
-
-
-=head2 RECENT CHANGES
-
-The interface to the Safe module has changed quite dramatically since
-version 1 (as supplied with Perl5.002). Study these pages carefully if
-you have code written to use Safe version 1 because you will need to
-makes changes.
-
-
-=head2 Methods in class Safe
-
-To create a new compartment, use
-
- $cpt = new Safe;
-
-Optional argument is (NAMESPACE), where NAMESPACE is the root namespace
-to use for the compartment (defaults to "Safe::Root0", incremented for
-each new compartment).
-
-Note that version 1.00 of the Safe module supported a second optional
-parameter, MASK. That functionality has been withdrawn pending deeper
-consideration. Use the permit and deny methods described below.
-
-The following methods can then be used on the compartment
-object returned by the above constructor. The object argument
-is implicit in each case.
-
-
-=over 8
-
-=item permit (OP, ...)
-
-Permit the listed operators to be used when compiling code in the
-compartment (in I<addition> to any operators already permitted).
-
-You can list opcodes by names, or use a tag name; see
-L<Opcode/"Predefined Opcode Tags">.
-
-=item permit_only (OP, ...)
-
-Permit I<only> the listed operators to be used when compiling code in
-the compartment (I<no> other operators are permitted).
-
-=item deny (OP, ...)
-
-Deny the listed operators from being used when compiling code in the
-compartment (other operators may still be permitted).
-
-=item deny_only (OP, ...)
-
-Deny I<only> the listed operators from being used when compiling code
-in the compartment (I<all> other operators will be permitted).
-
-=item trap (OP, ...)
-
-=item untrap (OP, ...)
-
-The trap and untrap methods are synonyms for deny and permit
-respectfully.
-
-=item share (NAME, ...)
-
-This shares the variable(s) in the argument list with the compartment.
-This is almost identical to exporting variables using the L<Exporter>
-module.
-
-Each NAME must be the B<name> of a non-lexical variable, typically
-with the leading type identifier included. A bareword is treated as a
-function name.
-
-Examples of legal names are '$foo' for a scalar, '@foo' for an
-array, '%foo' for a hash, '&foo' or 'foo' for a subroutine and '*foo'
-for a glob (i.e. all symbol table entries associated with "foo",
-including scalar, array, hash, sub and filehandle).
-
-Each NAME is assumed to be in the calling package. See share_from
-for an alternative method (which share uses).
-
-=item share_from (PACKAGE, ARRAYREF)
-
-This method is similar to share() but allows you to explicitly name the
-package that symbols should be shared from. The symbol names (including
-type characters) are supplied as an array reference.
-
- $safe->share_from('main', [ '$foo', '%bar', 'func' ]);
-
-
-=item varglob (VARNAME)
-
-This returns a glob reference for the symbol table entry of VARNAME in
-the package of the compartment. VARNAME must be the B<name> of a
-variable without any leading type marker. For example,
-
- $cpt = new Safe 'Root';
- $Root::foo = "Hello world";
- # Equivalent version which doesn't need to know $cpt's package name:
- ${$cpt->varglob('foo')} = "Hello world";
-
-
-=item reval (STRING)
-
-This evaluates STRING as perl code inside the compartment.
-
-The code can only see the compartment's namespace (as returned by the
-B<root> method). The compartment's root package appears to be the
-C<main::> package to the code inside the compartment.
-
-Any attempt by the code in STRING to use an operator which is not permitted
-by the compartment will cause an error (at run-time of the main program
-but at compile-time for the code in STRING). The error is of the form
-"'%s' trapped by operation mask...".
-
-If an operation is trapped in this way, then the code in STRING will
-not be executed. If such a trapped operation occurs or any other
-compile-time or return error, then $@ is set to the error message, just
-as with an eval().
-
-If there is no error, then the method returns the value of the last
-expression evaluated, or a return statement may be used, just as with
-subroutines and B<eval()>. The context (list or scalar) is determined
-by the caller as usual.
-
-This behaviour differs from the beta distribution of the Safe extension
-where earlier versions of perl made it hard to mimic the return
-behaviour of the eval() command and the context was always scalar.
-
-Some points to note:
-
-If the entereval op is permitted then the code can use eval "..." to
-'hide' code which might use denied ops. This is not a major problem
-since when the code tries to execute the eval it will fail because the
-opmask is still in effect. However this technique would allow clever,
-and possibly harmful, code to 'probe' the boundaries of what is
-possible.
-
-Any string eval which is executed by code executing in a compartment,
-or by code called from code executing in a compartment, will be eval'd
-in the namespace of the compartment. This is potentially a serious
-problem.
-
-Consider a function foo() in package pkg compiled outside a compartment
-but shared with it. Assume the compartment has a root package called
-'Root'. If foo() contains an eval statement like eval '$foo = 1' then,
-normally, $pkg::foo will be set to 1. If foo() is called from the
-compartment (by whatever means) then instead of setting $pkg::foo, the
-eval will actually set $Root::pkg::foo.
-
-This can easily be demonstrated by using a module, such as the Socket
-module, which uses eval "..." as part of an AUTOLOAD function. You can
-'use' the module outside the compartment and share an (autoloaded)
-function with the compartment. If an autoload is triggered by code in
-the compartment, or by any code anywhere that is called by any means
-from the compartment, then the eval in the Socket module's AUTOLOAD
-function happens in the namespace of the compartment. Any variables
-created or used by the eval'd code are now under the control of
-the code in the compartment.
-
-A similar effect applies to I<all> runtime symbol lookups in code
-called from a compartment but not compiled within it.
-
-
-
-=item rdo (FILENAME)
-
-This evaluates the contents of file FILENAME inside the compartment.
-See above documentation on the B<reval> method for further details.
-
-=item root (NAMESPACE)
-
-This method returns the name of the package that is the root of the
-compartment's namespace.
-
-Note that this behaviour differs from version 1.00 of the Safe module
-where the root module could be used to change the namespace. That
-functionality has been withdrawn pending deeper consideration.
-
-=item mask (MASK)
-
-This is a get-or-set method for the compartment's operator mask.
-
-With no MASK argument present, it returns the current operator mask of
-the compartment.
-
-With the MASK argument present, it sets the operator mask for the
-compartment (equivalent to calling the deny_only method).
-
-=back
-
-
-=head2 Some Safety Issues
-
-This section is currently just an outline of some of the things code in
-a compartment might do (intentionally or unintentionally) which can
-have an effect outside the compartment.
-
-=over 8
-
-=item Memory
-
-Consuming all (or nearly all) available memory.
-
-=item CPU
-
-Causing infinite loops etc.
-
-=item Snooping
-
-Copying private information out of your system. Even something as
-simple as your user name is of value to others. Much useful information
-could be gleaned from your environment variables for example.
-
-=item Signals
-
-Causing signals (especially SIGFPE and SIGALARM) to affect your process.
-
-Setting up a signal handler will need to be carefully considered
-and controlled. What mask is in effect when a signal handler
-gets called? If a user can get an imported function to get an
-exception and call the user's signal handler, does that user's
-restricted mask get re-instated before the handler is called?
-Does an imported handler get called with its original mask or
-the user's one?
-
-=item State Changes
-
-Ops such as chdir obviously effect the process as a whole and not just
-the code in the compartment. Ops such as rand and srand have a similar
-but more subtle effect.
-
-=back
-
-=head2 AUTHOR
-
-Originally designed and implemented by Malcolm Beattie.
-
-Reworked to use the Opcode module and other changes added by Tim Bunce.
-
-Currently maintained by the Perl 5 Porters, <perl5-porters at perl.org>.
-
-=cut
-
Deleted: vendor/perl/dist/ext/POSIX/POSIX.pm
===================================================================
--- vendor/perl/dist/ext/POSIX/POSIX.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/POSIX/POSIX.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1042 +0,0 @@
-package POSIX;
-use strict;
-use warnings;
-
-our(@ISA, %EXPORT_TAGS, @EXPORT_OK, @EXPORT, $AUTOLOAD, %SIGRT) = ();
-
-our $VERSION = "1.17";
-
-use AutoLoader;
-
-use XSLoader ();
-
-use Fcntl qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK F_SETFD
- F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND
- O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC
- O_WRONLY SEEK_CUR SEEK_END SEEK_SET
- S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG
- S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID
- S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR);
-
-# Grandfather old foo_h form to new :foo_h form
-my $loaded;
-
-sub import {
- load_imports() unless $loaded++;
- my $this = shift;
- my @list = map { m/^\w+_h$/ ? ":$_" : $_ } @_;
- local $Exporter::ExportLevel = 1;
- Exporter::import($this, at list);
-}
-
-sub croak { require Carp; goto &Carp::croak }
-# declare usage to assist AutoLoad
-sub usage;
-
-XSLoader::load 'POSIX', $VERSION;
-
-sub AUTOLOAD {
- no strict;
- no warnings 'uninitialized';
- if ($AUTOLOAD =~ /::(_?[a-z])/) {
- # require AutoLoader;
- $AutoLoader::AUTOLOAD = $AUTOLOAD;
- goto &AutoLoader::AUTOLOAD
- }
- local $! = 0;
- my $constname = $AUTOLOAD;
- $constname =~ s/.*:://;
- my ($error, $val) = constant($constname);
- croak $error if $error;
- *$AUTOLOAD = sub { $val };
-
- goto &$AUTOLOAD;
-}
-
-package POSIX::SigAction;
-
-use AutoLoader 'AUTOLOAD';
-
-package POSIX::SigRt;
-
-use AutoLoader 'AUTOLOAD';
-
-use Tie::Hash;
-
-use vars qw($SIGACTION_FLAGS $_SIGRTMIN $_SIGRTMAX $_sigrtn @ISA);
- at POSIX::SigRt::ISA = qw(Tie::StdHash);
-
-$SIGACTION_FLAGS = 0;
-
-tie %POSIX::SIGRT, 'POSIX::SigRt';
-
-sub DESTROY {};
-
-package POSIX;
-
-1;
-__END__
-
-sub usage {
- my ($mess) = @_;
- croak "Usage: POSIX::$mess";
-}
-
-sub redef {
- my ($mess) = @_;
- croak "Use method $mess instead";
-}
-
-sub unimpl {
- my ($mess) = @_;
- $mess =~ s/xxx//;
- croak "Unimplemented: POSIX::$mess";
-}
-
-sub assert {
- usage "assert(expr)" if @_ != 1;
- if (!$_[0]) {
- croak "Assertion failed";
- }
-}
-
-sub tolower {
- usage "tolower(string)" if @_ != 1;
- lc($_[0]);
-}
-
-sub toupper {
- usage "toupper(string)" if @_ != 1;
- uc($_[0]);
-}
-
-sub closedir {
- usage "closedir(dirhandle)" if @_ != 1;
- CORE::closedir($_[0]);
-}
-
-sub opendir {
- usage "opendir(directory)" if @_ != 1;
- my $dirhandle;
- CORE::opendir($dirhandle, $_[0])
- ? $dirhandle
- : undef;
-}
-
-sub readdir {
- usage "readdir(dirhandle)" if @_ != 1;
- CORE::readdir($_[0]);
-}
-
-sub rewinddir {
- usage "rewinddir(dirhandle)" if @_ != 1;
- CORE::rewinddir($_[0]);
-}
-
-sub errno {
- usage "errno()" if @_ != 0;
- $! + 0;
-}
-
-sub creat {
- usage "creat(filename, mode)" if @_ != 2;
- &open($_[0], &O_WRONLY | &O_CREAT | &O_TRUNC, $_[1]);
-}
-
-sub fcntl {
- usage "fcntl(filehandle, cmd, arg)" if @_ != 3;
- CORE::fcntl($_[0], $_[1], $_[2]);
-}
-
-sub getgrgid {
- usage "getgrgid(gid)" if @_ != 1;
- CORE::getgrgid($_[0]);
-}
-
-sub getgrnam {
- usage "getgrnam(name)" if @_ != 1;
- CORE::getgrnam($_[0]);
-}
-
-sub atan2 {
- usage "atan2(x,y)" if @_ != 2;
- CORE::atan2($_[0], $_[1]);
-}
-
-sub cos {
- usage "cos(x)" if @_ != 1;
- CORE::cos($_[0]);
-}
-
-sub exp {
- usage "exp(x)" if @_ != 1;
- CORE::exp($_[0]);
-}
-
-sub fabs {
- usage "fabs(x)" if @_ != 1;
- CORE::abs($_[0]);
-}
-
-sub log {
- usage "log(x)" if @_ != 1;
- CORE::log($_[0]);
-}
-
-sub pow {
- usage "pow(x,exponent)" if @_ != 2;
- $_[0] ** $_[1];
-}
-
-sub sin {
- usage "sin(x)" if @_ != 1;
- CORE::sin($_[0]);
-}
-
-sub sqrt {
- usage "sqrt(x)" if @_ != 1;
- CORE::sqrt($_[0]);
-}
-
-sub getpwnam {
- usage "getpwnam(name)" if @_ != 1;
- CORE::getpwnam($_[0]);
-}
-
-sub getpwuid {
- usage "getpwuid(uid)" if @_ != 1;
- CORE::getpwuid($_[0]);
-}
-
-sub longjmp {
- unimpl "longjmp() is C-specific: use die instead";
-}
-
-sub setjmp {
- unimpl "setjmp() is C-specific: use eval {} instead";
-}
-
-sub siglongjmp {
- unimpl "siglongjmp() is C-specific: use die instead";
-}
-
-sub sigsetjmp {
- unimpl "sigsetjmp() is C-specific: use eval {} instead";
-}
-
-sub kill {
- usage "kill(pid, sig)" if @_ != 2;
- CORE::kill $_[1], $_[0];
-}
-
-sub raise {
- usage "raise(sig)" if @_ != 1;
- CORE::kill $_[0], $$; # Is this good enough?
-}
-
-sub offsetof {
- unimpl "offsetof() is C-specific, stopped";
-}
-
-sub clearerr {
- redef "IO::Handle::clearerr()";
-}
-
-sub fclose {
- redef "IO::Handle::close()";
-}
-
-sub fdopen {
- redef "IO::Handle::new_from_fd()";
-}
-
-sub feof {
- redef "IO::Handle::eof()";
-}
-
-sub fgetc {
- redef "IO::Handle::getc()";
-}
-
-sub fgets {
- redef "IO::Handle::gets()";
-}
-
-sub fileno {
- redef "IO::Handle::fileno()";
-}
-
-sub fopen {
- redef "IO::File::open()";
-}
-
-sub fprintf {
- unimpl "fprintf() is C-specific--use printf instead";
-}
-
-sub fputc {
- unimpl "fputc() is C-specific--use print instead";
-}
-
-sub fputs {
- unimpl "fputs() is C-specific--use print instead";
-}
-
-sub fread {
- unimpl "fread() is C-specific--use read instead";
-}
-
-sub freopen {
- unimpl "freopen() is C-specific--use open instead";
-}
-
-sub fscanf {
- unimpl "fscanf() is C-specific--use <> and regular expressions instead";
-}
-
-sub fseek {
- redef "IO::Seekable::seek()";
-}
-
-sub fsync {
- redef "IO::Handle::sync()";
-}
-
-sub ferror {
- redef "IO::Handle::error()";
-}
-
-sub fflush {
- redef "IO::Handle::flush()";
-}
-
-sub fgetpos {
- redef "IO::Seekable::getpos()";
-}
-
-sub fsetpos {
- redef "IO::Seekable::setpos()";
-}
-
-sub ftell {
- redef "IO::Seekable::tell()";
-}
-
-sub fwrite {
- unimpl "fwrite() is C-specific--use print instead";
-}
-
-sub getc {
- usage "getc(handle)" if @_ != 1;
- CORE::getc($_[0]);
-}
-
-sub getchar {
- usage "getchar()" if @_ != 0;
- CORE::getc(STDIN);
-}
-
-sub gets {
- usage "gets()" if @_ != 0;
- scalar <STDIN>;
-}
-
-sub perror {
- print STDERR "@_: " if @_;
- print STDERR $!,"\n";
-}
-
-sub printf {
- usage "printf(pattern, args...)" if @_ < 1;
- CORE::printf STDOUT @_;
-}
-
-sub putc {
- unimpl "putc() is C-specific--use print instead";
-}
-
-sub putchar {
- unimpl "putchar() is C-specific--use print instead";
-}
-
-sub puts {
- unimpl "puts() is C-specific--use print instead";
-}
-
-sub remove {
- usage "remove(filename)" if @_ != 1;
- (-d $_[0]) ? CORE::rmdir($_[0]) : CORE::unlink($_[0]);
-}
-
-sub rename {
- usage "rename(oldfilename, newfilename)" if @_ != 2;
- CORE::rename($_[0], $_[1]);
-}
-
-sub rewind {
- usage "rewind(filehandle)" if @_ != 1;
- CORE::seek($_[0],0,0);
-}
-
-sub scanf {
- unimpl "scanf() is C-specific--use <> and regular expressions instead";
-}
-
-sub sprintf {
- usage "sprintf(pattern,args)" if @_ == 0;
- CORE::sprintf(shift, at _);
-}
-
-sub sscanf {
- unimpl "sscanf() is C-specific--use regular expressions instead";
-}
-
-sub tmpfile {
- redef "IO::File::new_tmpfile()";
-}
-
-sub ungetc {
- redef "IO::Handle::ungetc()";
-}
-
-sub vfprintf {
- unimpl "vfprintf() is C-specific";
-}
-
-sub vprintf {
- unimpl "vprintf() is C-specific";
-}
-
-sub vsprintf {
- unimpl "vsprintf() is C-specific";
-}
-
-sub abs {
- usage "abs(x)" if @_ != 1;
- CORE::abs($_[0]);
-}
-
-sub atexit {
- unimpl "atexit() is C-specific: use END {} instead";
-}
-
-sub atof {
- unimpl "atof() is C-specific, stopped";
-}
-
-sub atoi {
- unimpl "atoi() is C-specific, stopped";
-}
-
-sub atol {
- unimpl "atol() is C-specific, stopped";
-}
-
-sub bsearch {
- unimpl "bsearch() not supplied";
-}
-
-sub calloc {
- unimpl "calloc() is C-specific, stopped";
-}
-
-sub div {
- unimpl "div() is C-specific, use /, % and int instead";
-}
-
-sub exit {
- usage "exit(status)" if @_ != 1;
- CORE::exit($_[0]);
-}
-
-sub free {
- unimpl "free() is C-specific, stopped";
-}
-
-sub getenv {
- usage "getenv(name)" if @_ != 1;
- $ENV{$_[0]};
-}
-
-sub labs {
- unimpl "labs() is C-specific, use abs instead";
-}
-
-sub ldiv {
- unimpl "ldiv() is C-specific, use /, % and int instead";
-}
-
-sub malloc {
- unimpl "malloc() is C-specific, stopped";
-}
-
-sub qsort {
- unimpl "qsort() is C-specific, use sort instead";
-}
-
-sub rand {
- unimpl "rand() is non-portable, use Perl's rand instead";
-}
-
-sub realloc {
- unimpl "realloc() is C-specific, stopped";
-}
-
-sub srand {
- unimpl "srand()";
-}
-
-sub system {
- usage "system(command)" if @_ != 1;
- CORE::system($_[0]);
-}
-
-sub memchr {
- unimpl "memchr() is C-specific, use index() instead";
-}
-
-sub memcmp {
- unimpl "memcmp() is C-specific, use eq instead";
-}
-
-sub memcpy {
- unimpl "memcpy() is C-specific, use = instead";
-}
-
-sub memmove {
- unimpl "memmove() is C-specific, use = instead";
-}
-
-sub memset {
- unimpl "memset() is C-specific, use x instead";
-}
-
-sub strcat {
- unimpl "strcat() is C-specific, use .= instead";
-}
-
-sub strchr {
- unimpl "strchr() is C-specific, use index() instead";
-}
-
-sub strcmp {
- unimpl "strcmp() is C-specific, use eq instead";
-}
-
-sub strcpy {
- unimpl "strcpy() is C-specific, use = instead";
-}
-
-sub strcspn {
- unimpl "strcspn() is C-specific, use regular expressions instead";
-}
-
-sub strerror {
- usage "strerror(errno)" if @_ != 1;
- local $! = $_[0];
- $! . "";
-}
-
-sub strlen {
- unimpl "strlen() is C-specific, use length instead";
-}
-
-sub strncat {
- unimpl "strncat() is C-specific, use .= instead";
-}
-
-sub strncmp {
- unimpl "strncmp() is C-specific, use eq instead";
-}
-
-sub strncpy {
- unimpl "strncpy() is C-specific, use = instead";
-}
-
-sub strpbrk {
- unimpl "strpbrk() is C-specific, stopped";
-}
-
-sub strrchr {
- unimpl "strrchr() is C-specific, use rindex() instead";
-}
-
-sub strspn {
- unimpl "strspn() is C-specific, stopped";
-}
-
-sub strstr {
- usage "strstr(big, little)" if @_ != 2;
- CORE::index($_[0], $_[1]);
-}
-
-sub strtok {
- unimpl "strtok() is C-specific, stopped";
-}
-
-sub chmod {
- usage "chmod(mode, filename)" if @_ != 2;
- CORE::chmod($_[0], $_[1]);
-}
-
-sub fstat {
- usage "fstat(fd)" if @_ != 1;
- local *TMP;
- CORE::open(TMP, "<&$_[0]"); # Gross.
- my @l = CORE::stat(TMP);
- CORE::close(TMP);
- @l;
-}
-
-sub mkdir {
- usage "mkdir(directoryname, mode)" if @_ != 2;
- CORE::mkdir($_[0], $_[1]);
-}
-
-sub stat {
- usage "stat(filename)" if @_ != 1;
- CORE::stat($_[0]);
-}
-
-sub umask {
- usage "umask(mask)" if @_ != 1;
- CORE::umask($_[0]);
-}
-
-sub wait {
- usage "wait()" if @_ != 0;
- CORE::wait();
-}
-
-sub waitpid {
- usage "waitpid(pid, options)" if @_ != 2;
- CORE::waitpid($_[0], $_[1]);
-}
-
-sub gmtime {
- usage "gmtime(time)" if @_ != 1;
- CORE::gmtime($_[0]);
-}
-
-sub localtime {
- usage "localtime(time)" if @_ != 1;
- CORE::localtime($_[0]);
-}
-
-sub time {
- usage "time()" if @_ != 0;
- CORE::time;
-}
-
-sub alarm {
- usage "alarm(seconds)" if @_ != 1;
- CORE::alarm($_[0]);
-}
-
-sub chdir {
- usage "chdir(directory)" if @_ != 1;
- CORE::chdir($_[0]);
-}
-
-sub chown {
- usage "chown(uid, gid, filename)" if @_ != 3;
- CORE::chown($_[0], $_[1], $_[2]);
-}
-
-sub execl {
- unimpl "execl() is C-specific, stopped";
-}
-
-sub execle {
- unimpl "execle() is C-specific, stopped";
-}
-
-sub execlp {
- unimpl "execlp() is C-specific, stopped";
-}
-
-sub execv {
- unimpl "execv() is C-specific, stopped";
-}
-
-sub execve {
- unimpl "execve() is C-specific, stopped";
-}
-
-sub execvp {
- unimpl "execvp() is C-specific, stopped";
-}
-
-sub fork {
- usage "fork()" if @_ != 0;
- CORE::fork;
-}
-
-sub getegid {
- usage "getegid()" if @_ != 0;
- $) + 0;
-}
-
-sub geteuid {
- usage "geteuid()" if @_ != 0;
- $> + 0;
-}
-
-sub getgid {
- usage "getgid()" if @_ != 0;
- $( + 0;
-}
-
-sub getgroups {
- usage "getgroups()" if @_ != 0;
- my %seen;
- grep(!$seen{$_}++, split(' ', $) ));
-}
-
-sub getlogin {
- usage "getlogin()" if @_ != 0;
- CORE::getlogin();
-}
-
-sub getpgrp {
- usage "getpgrp()" if @_ != 0;
- CORE::getpgrp;
-}
-
-sub getpid {
- usage "getpid()" if @_ != 0;
- $$;
-}
-
-sub getppid {
- usage "getppid()" if @_ != 0;
- CORE::getppid;
-}
-
-sub getuid {
- usage "getuid()" if @_ != 0;
- $<;
-}
-
-sub isatty {
- usage "isatty(filehandle)" if @_ != 1;
- -t $_[0];
-}
-
-sub link {
- usage "link(oldfilename, newfilename)" if @_ != 2;
- CORE::link($_[0], $_[1]);
-}
-
-sub rmdir {
- usage "rmdir(directoryname)" if @_ != 1;
- CORE::rmdir($_[0]);
-}
-
-sub setbuf {
- redef "IO::Handle::setbuf()";
-}
-
-sub setvbuf {
- redef "IO::Handle::setvbuf()";
-}
-
-sub sleep {
- usage "sleep(seconds)" if @_ != 1;
- $_[0] - CORE::sleep($_[0]);
-}
-
-sub unlink {
- usage "unlink(filename)" if @_ != 1;
- CORE::unlink($_[0]);
-}
-
-sub utime {
- usage "utime(filename, atime, mtime)" if @_ != 3;
- CORE::utime($_[1], $_[2], $_[0]);
-}
-
-sub load_imports {
-%EXPORT_TAGS = (
-
- assert_h => [qw(assert NDEBUG)],
-
- ctype_h => [qw(isalnum isalpha iscntrl isdigit isgraph islower
- isprint ispunct isspace isupper isxdigit tolower toupper)],
-
- dirent_h => [],
-
- errno_h => [qw(E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT
- EAGAIN EALREADY EBADF EBUSY ECHILD ECONNABORTED
- ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ EDOM EDQUOT
- EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EINPROGRESS
- EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
- EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH
- ENFILE ENOBUFS ENODEV ENOENT ENOEXEC ENOLCK ENOMEM
- ENOPROTOOPT ENOSPC ENOSYS ENOTBLK ENOTCONN ENOTDIR
- ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
- EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT EPROTOTYPE
- ERANGE EREMOTE ERESTART EROFS ESHUTDOWN ESOCKTNOSUPPORT
- ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS ETXTBSY
- EUSERS EWOULDBLOCK EXDEV errno)],
-
- fcntl_h => [qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK
- F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK
- O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK
- O_RDONLY O_RDWR O_TRUNC O_WRONLY
- creat
- SEEK_CUR SEEK_END SEEK_SET
- S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU
- S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG S_ISUID
- S_IWGRP S_IWOTH S_IWUSR)],
-
- float_h => [qw(DBL_DIG DBL_EPSILON DBL_MANT_DIG
- DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP
- DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP
- FLT_DIG FLT_EPSILON FLT_MANT_DIG
- FLT_MAX FLT_MAX_10_EXP FLT_MAX_EXP
- FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP
- FLT_RADIX FLT_ROUNDS
- LDBL_DIG LDBL_EPSILON LDBL_MANT_DIG
- LDBL_MAX LDBL_MAX_10_EXP LDBL_MAX_EXP
- LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP)],
-
- grp_h => [],
-
- limits_h => [qw( ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX
- INT_MAX INT_MIN LINK_MAX LONG_MAX LONG_MIN MAX_CANON
- MAX_INPUT MB_LEN_MAX NAME_MAX NGROUPS_MAX OPEN_MAX
- PATH_MAX PIPE_BUF SCHAR_MAX SCHAR_MIN SHRT_MAX SHRT_MIN
- SSIZE_MAX STREAM_MAX TZNAME_MAX UCHAR_MAX UINT_MAX
- ULONG_MAX USHRT_MAX _POSIX_ARG_MAX _POSIX_CHILD_MAX
- _POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT
- _POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_OPEN_MAX
- _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SSIZE_MAX
- _POSIX_STREAM_MAX _POSIX_TZNAME_MAX)],
-
- locale_h => [qw(LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES
- LC_MONETARY LC_NUMERIC LC_TIME NULL
- localeconv setlocale)],
-
- math_h => [qw(HUGE_VAL acos asin atan ceil cosh fabs floor fmod
- frexp ldexp log10 modf pow sinh tan tanh)],
-
- pwd_h => [],
-
- setjmp_h => [qw(longjmp setjmp siglongjmp sigsetjmp)],
-
- signal_h => [qw(SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK
- SA_RESETHAND SA_RESTART SA_SIGINFO SIGABRT SIGALRM
- SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL
- SIGPIPE %SIGRT SIGRTMIN SIGRTMAX SIGQUIT SIGSEGV SIGSTOP
- SIGTERM SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2
- SIG_BLOCK SIG_DFL SIG_ERR SIG_IGN SIG_SETMASK SIG_UNBLOCK
- raise sigaction signal sigpending sigprocmask sigsuspend)],
-
- stdarg_h => [],
-
- stddef_h => [qw(NULL offsetof)],
-
- stdio_h => [qw(BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid
- L_tmpname NULL SEEK_CUR SEEK_END SEEK_SET
- STREAM_MAX TMP_MAX stderr stdin stdout
- clearerr fclose fdopen feof ferror fflush fgetc fgetpos
- fgets fopen fprintf fputc fputs fread freopen
- fscanf fseek fsetpos ftell fwrite getchar gets
- perror putc putchar puts remove rewind
- scanf setbuf setvbuf sscanf tmpfile tmpnam
- ungetc vfprintf vprintf vsprintf)],
-
- stdlib_h => [qw(EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX NULL RAND_MAX
- abort atexit atof atoi atol bsearch calloc div
- free getenv labs ldiv malloc mblen mbstowcs mbtowc
- qsort realloc strtod strtol strtoul wcstombs wctomb)],
-
- string_h => [qw(NULL memchr memcmp memcpy memmove memset strcat
- strchr strcmp strcoll strcpy strcspn strerror strlen
- strncat strncmp strncpy strpbrk strrchr strspn strstr
- strtok strxfrm)],
-
- sys_stat_h => [qw(S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU
- S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG
- S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR
- fstat mkfifo)],
-
- sys_times_h => [],
-
- sys_types_h => [],
-
- sys_utsname_h => [qw(uname)],
-
- sys_wait_h => [qw(WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED
- WNOHANG WSTOPSIG WTERMSIG WUNTRACED)],
-
- termios_h => [qw( B0 B110 B1200 B134 B150 B1800 B19200 B200 B2400
- B300 B38400 B4800 B50 B600 B75 B9600 BRKINT CLOCAL
- CREAD CS5 CS6 CS7 CS8 CSIZE CSTOPB ECHO ECHOE ECHOK
- ECHONL HUPCL ICANON ICRNL IEXTEN IGNBRK IGNCR IGNPAR
- INLCR INPCK ISIG ISTRIP IXOFF IXON NCCS NOFLSH OPOST
- PARENB PARMRK PARODD TCIFLUSH TCIOFF TCIOFLUSH TCION
- TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW
- TOSTOP VEOF VEOL VERASE VINTR VKILL VMIN VQUIT VSTART
- VSTOP VSUSP VTIME
- cfgetispeed cfgetospeed cfsetispeed cfsetospeed tcdrain
- tcflow tcflush tcgetattr tcsendbreak tcsetattr )],
-
- time_h => [qw(CLK_TCK CLOCKS_PER_SEC NULL asctime clock ctime
- difftime mktime strftime tzset tzname)],
-
- unistd_h => [qw(F_OK NULL R_OK SEEK_CUR SEEK_END SEEK_SET
- STDERR_FILENO STDIN_FILENO STDOUT_FILENO W_OK X_OK
- _PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON
- _PC_MAX_INPUT _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX
- _PC_PIPE_BUF _PC_VDISABLE _POSIX_CHOWN_RESTRICTED
- _POSIX_JOB_CONTROL _POSIX_NO_TRUNC _POSIX_SAVED_IDS
- _POSIX_VDISABLE _POSIX_VERSION _SC_ARG_MAX
- _SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL
- _SC_NGROUPS_MAX _SC_OPEN_MAX _SC_PAGESIZE _SC_SAVED_IDS
- _SC_STREAM_MAX _SC_TZNAME_MAX _SC_VERSION
- _exit access ctermid cuserid
- dup2 dup execl execle execlp execv execve execvp
- fpathconf fsync getcwd getegid geteuid getgid getgroups
- getpid getuid isatty lseek pathconf pause setgid setpgid
- setsid setuid sysconf tcgetpgrp tcsetpgrp ttyname)],
-
- utime_h => [],
-
-);
-
-# Exporter::export_tags();
-{
- # De-duplicate the export list:
- my %export;
- @export{map {@$_} values %EXPORT_TAGS} = ();
- # Doing the de-dup with a temporary hash has the advantage that the SVs in
- # @EXPORT are actually shared hash key sacalars, which will save some memory.
- push @EXPORT, keys %export;
-}
-
- at EXPORT_OK = qw(
- abs
- alarm
- atan2
- chdir
- chmod
- chown
- close
- closedir
- cos
- exit
- exp
- fcntl
- fileno
- fork
- getc
- getgrgid
- getgrnam
- getlogin
- getpgrp
- getppid
- getpwnam
- getpwuid
- gmtime
- isatty
- kill
- lchown
- link
- localtime
- log
- mkdir
- nice
- open
- opendir
- pipe
- printf
- rand
- read
- readdir
- rename
- rewinddir
- rmdir
- sin
- sleep
- sprintf
- sqrt
- srand
- stat
- system
- time
- times
- umask
- unlink
- utime
- wait
- waitpid
- write
-);
-
-require Exporter;
-}
-
-package POSIX::SigAction;
-
-sub new { bless {HANDLER => $_[1], MASK => $_[2], FLAGS => $_[3] || 0, SAFE => 0}, $_[0] }
-sub handler { $_[0]->{HANDLER} = $_[1] if @_ > 1; $_[0]->{HANDLER} };
-sub mask { $_[0]->{MASK} = $_[1] if @_ > 1; $_[0]->{MASK} };
-sub flags { $_[0]->{FLAGS} = $_[1] if @_ > 1; $_[0]->{FLAGS} };
-sub safe { $_[0]->{SAFE} = $_[1] if @_ > 1; $_[0]->{SAFE} };
-
-package POSIX::SigRt;
-
-
-sub _init {
- $_SIGRTMIN = &POSIX::SIGRTMIN;
- $_SIGRTMAX = &POSIX::SIGRTMAX;
- $_sigrtn = $_SIGRTMAX - $_SIGRTMIN;
-}
-
-sub _croak {
- &_init unless defined $_sigrtn;
- die "POSIX::SigRt not available" unless defined $_sigrtn && $_sigrtn > 0;
-}
-
-sub _getsig {
- &_croak;
- my $rtsig = $_[0];
- # Allow (SIGRT)?MIN( + n)?, a common idiom when doing these things in C.
- $rtsig = $_SIGRTMIN + ($1 || 0)
- if $rtsig =~ /^(?:(?:SIG)?RT)?MIN(\s*\+\s*(\d+))?$/;
- return $rtsig;
-}
-
-sub _exist {
- my $rtsig = _getsig($_[1]);
- my $ok = $rtsig >= $_SIGRTMIN && $rtsig <= $_SIGRTMAX;
- ($rtsig, $ok);
-}
-
-sub _check {
- my ($rtsig, $ok) = &_exist;
- die "No POSIX::SigRt signal $_[1] (valid range SIGRTMIN..SIGRTMAX, or $_SIGRTMIN..$_SIGRTMAX)"
- unless $ok;
- return $rtsig;
-}
-
-sub new {
- my ($rtsig, $handler, $flags) = @_;
- my $sigset = POSIX::SigSet->new($rtsig);
- my $sigact = POSIX::SigAction->new($handler,
- $sigset,
- $flags);
- POSIX::sigaction($rtsig, $sigact);
-}
-
-sub EXISTS { &_exist }
-sub FETCH { my $rtsig = &_check;
- my $oa = POSIX::SigAction->new();
- POSIX::sigaction($rtsig, undef, $oa);
- return $oa->{HANDLER} }
-sub STORE { my $rtsig = &_check; new($rtsig, $_[2], $SIGACTION_FLAGS) }
-sub DELETE { delete $SIG{ &_check } }
-sub CLEAR { &_exist; delete @SIG{ &POSIX::SIGRTMIN .. &POSIX::SIGRTMAX } }
-sub SCALAR { &_croak; $_sigrtn + 1 }
Deleted: vendor/perl/dist/ext/POSIX/POSIX.pod
===================================================================
--- vendor/perl/dist/ext/POSIX/POSIX.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/POSIX/POSIX.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,2210 +0,0 @@
-=head1 NAME
-
-POSIX - Perl interface to IEEE Std 1003.1
-
-=head1 SYNOPSIS
-
- use POSIX;
- use POSIX qw(setsid);
- use POSIX qw(:errno_h :fcntl_h);
-
- printf "EINTR is %d\n", EINTR;
-
- $sess_id = POSIX::setsid();
-
- $fd = POSIX::open($path, O_CREAT|O_EXCL|O_WRONLY, 0644);
- # note: that's a filedescriptor, *NOT* a filehandle
-
-=head1 DESCRIPTION
-
-The POSIX module permits you to access all (or nearly all) the standard
-POSIX 1003.1 identifiers. Many of these identifiers have been given Perl-ish
-interfaces.
-
-I<Everything is exported by default> with the exception of any POSIX
-functions with the same name as a built-in Perl function, such as
-C<abs>, C<alarm>, C<rmdir>, C<write>, etc.., which will be exported
-only if you ask for them explicitly. This is an unfortunate backwards
-compatibility feature. You can stop the exporting by saying C<use
-POSIX ()> and then use the fully qualified names (ie. C<POSIX::SEEK_END>).
-
-This document gives a condensed list of the features available in the POSIX
-module. Consult your operating system's manpages for general information on
-most features. Consult L<perlfunc> for functions which are noted as being
-identical to Perl's builtin functions.
-
-The first section describes POSIX functions from the 1003.1 specification.
-The second section describes some classes for signal objects, TTY objects,
-and other miscellaneous objects. The remaining sections list various
-constants and macros in an organization which roughly follows IEEE Std
-1003.1b-1993.
-
-=head1 NOTE
-
-The POSIX module is probably the most complex Perl module supplied with
-the standard distribution. It incorporates autoloading, namespace games,
-and dynamic loading of code that's in Perl, C, or both. It's a great
-source of wisdom.
-
-=head1 CAVEATS
-
-A few functions are not implemented because they are C specific. If you
-attempt to call these, they will print a message telling you that they
-aren't implemented, and suggest using the Perl equivalent should one
-exist. For example, trying to access the setjmp() call will elicit the
-message "setjmp() is C-specific: use eval {} instead".
-
-Furthermore, some evil vendors will claim 1003.1 compliance, but in fact
-are not so: they will not pass the PCTS (POSIX Compliance Test Suites).
-For example, one vendor may not define EDEADLK, or the semantics of the
-errno values set by open(2) might not be quite right. Perl does not
-attempt to verify POSIX compliance. That means you can currently
-successfully say "use POSIX", and then later in your program you find
-that your vendor has been lax and there's no usable ICANON macro after
-all. This could be construed to be a bug.
-
-=head1 FUNCTIONS
-
-=over 8
-
-=item _exit
-
-This is identical to the C function C<_exit()>. It exits the program
-immediately which means among other things buffered I/O is B<not> flushed.
-
-Note that when using threads and in Linux this is B<not> a good way to
-exit a thread because in Linux processes and threads are kind of the
-same thing (Note: while this is the situation in early 2003 there are
-projects under way to have threads with more POSIXly semantics in Linux).
-If you want not to return from a thread, detach the thread.
-
-=item abort
-
-This is identical to the C function C<abort()>. It terminates the
-process with a C<SIGABRT> signal unless caught by a signal handler or
-if the handler does not return normally (it e.g. does a C<longjmp>).
-
-=item abs
-
-This is identical to Perl's builtin C<abs()> function, returning
-the absolute value of its numerical argument.
-
-=item access
-
-Determines the accessibility of a file.
-
- if( POSIX::access( "/", &POSIX::R_OK ) ){
- print "have read permission\n";
- }
-
-Returns C<undef> on failure. Note: do not use C<access()> for
-security purposes. Between the C<access()> call and the operation
-you are preparing for the permissions might change: a classic
-I<race condition>.
-
-=item acos
-
-This is identical to the C function C<acos()>, returning
-the arcus cosine of its numerical argument. See also L<Math::Trig>.
-
-=item alarm
-
-This is identical to Perl's builtin C<alarm()> function,
-either for arming or disarming the C<SIGARLM> timer.
-
-=item asctime
-
-This is identical to the C function C<asctime()>. It returns
-a string of the form
-
- "Fri Jun 2 18:22:13 2000\n\0"
-
-and it is called thusly
-
- $asctime = asctime($sec, $min, $hour, $mday, $mon, $year,
- $wday, $yday, $isdst);
-
-The C<$mon> is zero-based: January equals C<0>. The C<$year> is
-1900-based: 2001 equals C<101>. C<$wday> and C<$yday> default to zero
-(and are usually ignored anyway), and C<$isdst> defaults to -1.
-
-=item asin
-
-This is identical to the C function C<asin()>, returning
-the arcus sine of its numerical argument. See also L<Math::Trig>.
-
-=item assert
-
-Unimplemented, but you can use L<perlfunc/die> and the L<Carp> module
-to achieve similar things.
-
-=item atan
-
-This is identical to the C function C<atan()>, returning the
-arcus tangent of its numerical argument. See also L<Math::Trig>.
-
-=item atan2
-
-This is identical to Perl's builtin C<atan2()> function, returning
-the arcus tangent defined by its two numerical arguments, the I<y>
-coordinate and the I<x> coordinate. See also L<Math::Trig>.
-
-=item atexit
-
-atexit() is C-specific: use C<END {}> instead, see L<perlsub>.
-
-=item atof
-
-atof() is C-specific. Perl converts strings to numbers transparently.
-If you need to force a scalar to a number, add a zero to it.
-
-=item atoi
-
-atoi() is C-specific. Perl converts strings to numbers transparently.
-If you need to force a scalar to a number, add a zero to it.
-If you need to have just the integer part, see L<perlfunc/int>.
-
-=item atol
-
-atol() is C-specific. Perl converts strings to numbers transparently.
-If you need to force a scalar to a number, add a zero to it.
-If you need to have just the integer part, see L<perlfunc/int>.
-
-=item bsearch
-
-bsearch() not supplied. For doing binary search on wordlists,
-see L<Search::Dict>.
-
-=item calloc
-
-calloc() is C-specific. Perl does memory management transparently.
-
-=item ceil
-
-This is identical to the C function C<ceil()>, returning the smallest
-integer value greater than or equal to the given numerical argument.
-
-=item chdir
-
-This is identical to Perl's builtin C<chdir()> function, allowing
-one to change the working (default) directory, see L<perlfunc/chdir>.
-
-=item chmod
-
-This is identical to Perl's builtin C<chmod()> function, allowing
-one to change file and directory permissions, see L<perlfunc/chmod>.
-
-=item chown
-
-This is identical to Perl's builtin C<chown()> function, allowing one
-to change file and directory owners and groups, see L<perlfunc/chown>.
-
-=item clearerr
-
-Use the method C<IO::Handle::clearerr()> instead, to reset the error
-state (if any) and EOF state (if any) of the given stream.
-
-=item clock
-
-This is identical to the C function C<clock()>, returning the
-amount of spent processor time in microseconds.
-
-=item close
-
-Close the file. This uses file descriptors such as those obtained by calling
-C<POSIX::open>.
-
- $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
- POSIX::close( $fd );
-
-Returns C<undef> on failure.
-
-See also L<perlfunc/close>.
-
-=item closedir
-
-This is identical to Perl's builtin C<closedir()> function for closing
-a directory handle, see L<perlfunc/closedir>.
-
-=item cos
-
-This is identical to Perl's builtin C<cos()> function, for returning
-the cosine of its numerical argument, see L<perlfunc/cos>.
-See also L<Math::Trig>.
-
-=item cosh
-
-This is identical to the C function C<cosh()>, for returning
-the hyperbolic cosine of its numeric argument. See also L<Math::Trig>.
-
-=item creat
-
-Create a new file. This returns a file descriptor like the ones returned by
-C<POSIX::open>. Use C<POSIX::close> to close the file.
-
- $fd = POSIX::creat( "foo", 0611 );
- POSIX::close( $fd );
-
-See also L<perlfunc/sysopen> and its C<O_CREAT> flag.
-
-=item ctermid
-
-Generates the path name for the controlling terminal.
-
- $path = POSIX::ctermid();
-
-=item ctime
-
-This is identical to the C function C<ctime()> and equivalent
-to C<asctime(localtime(...))>, see L</asctime> and L</localtime>.
-
-=item cuserid
-
-Get the login name of the owner of the current process.
-
- $name = POSIX::cuserid();
-
-=item difftime
-
-This is identical to the C function C<difftime()>, for returning
-the time difference (in seconds) between two times (as returned
-by C<time()>), see L</time>.
-
-=item div
-
-div() is C-specific, use L<perlfunc/int> on the usual C</> division and
-the modulus C<%>.
-
-=item dup
-
-This is similar to the C function C<dup()>, for duplicating a file
-descriptor.
-
-This uses file descriptors such as those obtained by calling
-C<POSIX::open>.
-
-Returns C<undef> on failure.
-
-=item dup2
-
-This is similar to the C function C<dup2()>, for duplicating a file
-descriptor to an another known file descriptor.
-
-This uses file descriptors such as those obtained by calling
-C<POSIX::open>.
-
-Returns C<undef> on failure.
-
-=item errno
-
-Returns the value of errno.
-
- $errno = POSIX::errno();
-
-This identical to the numerical values of the C<$!>, see L<perlvar/$ERRNO>.
-
-=item execl
-
-execl() is C-specific, see L<perlfunc/exec>.
-
-=item execle
-
-execle() is C-specific, see L<perlfunc/exec>.
-
-=item execlp
-
-execlp() is C-specific, see L<perlfunc/exec>.
-
-=item execv
-
-execv() is C-specific, see L<perlfunc/exec>.
-
-=item execve
-
-execve() is C-specific, see L<perlfunc/exec>.
-
-=item execvp
-
-execvp() is C-specific, see L<perlfunc/exec>.
-
-=item exit
-
-This is identical to Perl's builtin C<exit()> function for exiting the
-program, see L<perlfunc/exit>.
-
-=item exp
-
-This is identical to Perl's builtin C<exp()> function for
-returning the exponent (I<e>-based) of the numerical argument,
-see L<perlfunc/exp>.
-
-=item fabs
-
-This is identical to Perl's builtin C<abs()> function for returning
-the absolute value of the numerical argument, see L<perlfunc/abs>.
-
-=item fclose
-
-Use method C<IO::Handle::close()> instead, or see L<perlfunc/close>.
-
-=item fcntl
-
-This is identical to Perl's builtin C<fcntl()> function,
-see L<perlfunc/fcntl>.
-
-=item fdopen
-
-Use method C<IO::Handle::new_from_fd()> instead, or see L<perlfunc/open>.
-
-=item feof
-
-Use method C<IO::Handle::eof()> instead, or see L<perlfunc/eof>.
-
-=item ferror
-
-Use method C<IO::Handle::error()> instead.
-
-=item fflush
-
-Use method C<IO::Handle::flush()> instead.
-See also L<perlvar/$OUTPUT_AUTOFLUSH>.
-
-=item fgetc
-
-Use method C<IO::Handle::getc()> instead, or see L<perlfunc/read>.
-
-=item fgetpos
-
-Use method C<IO::Seekable::getpos()> instead, or see L<L/seek>.
-
-=item fgets
-
-Use method C<IO::Handle::gets()> instead. Similar to E<lt>E<gt>, also known
-as L<perlfunc/readline>.
-
-=item fileno
-
-Use method C<IO::Handle::fileno()> instead, or see L<perlfunc/fileno>.
-
-=item floor
-
-This is identical to the C function C<floor()>, returning the largest
-integer value less than or equal to the numerical argument.
-
-=item fmod
-
-This is identical to the C function C<fmod()>.
-
- $r = fmod($x, $y);
-
-It returns the remainder C<$r = $x - $n*$y>, where C<$n = trunc($x/$y)>.
-The C<$r> has the same sign as C<$x> and magnitude (absolute value)
-less than the magnitude of C<$y>.
-
-=item fopen
-
-Use method C<IO::File::open()> instead, or see L<perlfunc/open>.
-
-=item fork
-
-This is identical to Perl's builtin C<fork()> function
-for duplicating the current process, see L<perlfunc/fork>
-and L<perlfork> if you are in Windows.
-
-=item fpathconf
-
-Retrieves the value of a configurable limit on a file or directory. This
-uses file descriptors such as those obtained by calling C<POSIX::open>.
-
-The following will determine the maximum length of the longest allowable
-pathname on the filesystem which holds C</var/foo>.
-
- $fd = POSIX::open( "/var/foo", &POSIX::O_RDONLY );
- $path_max = POSIX::fpathconf( $fd, &POSIX::_PC_PATH_MAX );
-
-Returns C<undef> on failure.
-
-=item fprintf
-
-fprintf() is C-specific, see L<perlfunc/printf> instead.
-
-=item fputc
-
-fputc() is C-specific, see L<perlfunc/print> instead.
-
-=item fputs
-
-fputs() is C-specific, see L<perlfunc/print> instead.
-
-=item fread
-
-fread() is C-specific, see L<perlfunc/read> instead.
-
-=item free
-
-free() is C-specific. Perl does memory management transparently.
-
-=item freopen
-
-freopen() is C-specific, see L<perlfunc/open> instead.
-
-=item frexp
-
-Return the mantissa and exponent of a floating-point number.
-
- ($mantissa, $exponent) = POSIX::frexp( 1.234e56 );
-
-=item fscanf
-
-fscanf() is C-specific, use E<lt>E<gt> and regular expressions instead.
-
-=item fseek
-
-Use method C<IO::Seekable::seek()> instead, or see L<perlfunc/seek>.
-
-=item fsetpos
-
-Use method C<IO::Seekable::setpos()> instead, or seek L<perlfunc/seek>.
-
-=item fstat
-
-Get file status. This uses file descriptors such as those obtained by
-calling C<POSIX::open>. The data returned is identical to the data from
-Perl's builtin C<stat> function.
-
- $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
- @stats = POSIX::fstat( $fd );
-
-=item fsync
-
-Use method C<IO::Handle::sync()> instead.
-
-=item ftell
-
-Use method C<IO::Seekable::tell()> instead, or see L<perlfunc/tell>.
-
-=item fwrite
-
-fwrite() is C-specific, see L<perlfunc/print> instead.
-
-=item getc
-
-This is identical to Perl's builtin C<getc()> function,
-see L<perlfunc/getc>.
-
-=item getchar
-
-Returns one character from STDIN. Identical to Perl's C<getc()>,
-see L<perlfunc/getc>.
-
-=item getcwd
-
-Returns the name of the current working directory.
-See also L<Cwd>.
-
-=item getegid
-
-Returns the effective group identifier. Similar to Perl' s builtin
-variable C<$(>, see L<perlvar/$EGID>.
-
-=item getenv
-
-Returns the value of the specified environment variable.
-The same information is available through the C<%ENV> array.
-
-=item geteuid
-
-Returns the effective user identifier. Identical to Perl's builtin C<$E<gt>>
-variable, see L<perlvar/$EUID>.
-
-=item getgid
-
-Returns the user's real group identifier. Similar to Perl's builtin
-variable C<$)>, see L<perlvar/$GID>.
-
-=item getgrgid
-
-This is identical to Perl's builtin C<getgrgid()> function for
-returning group entries by group identifiers, see
-L<perlfunc/getgrgid>.
-
-=item getgrnam
-
-This is identical to Perl's builtin C<getgrnam()> function for
-returning group entries by group names, see L<perlfunc/getgrnam>.
-
-=item getgroups
-
-Returns the ids of the user's supplementary groups. Similar to Perl's
-builtin variable C<$)>, see L<perlvar/$GID>.
-
-=item getlogin
-
-This is identical to Perl's builtin C<getlogin()> function for
-returning the user name associated with the current session, see
-L<perlfunc/getlogin>.
-
-=item getpgrp
-
-This is identical to Perl's builtin C<getpgrp()> function for
-returning the process group identifier of the current process, see
-L<perlfunc/getpgrp>.
-
-=item getpid
-
-Returns the process identifier. Identical to Perl's builtin
-variable C<$$>, see L<perlvar/$PID>.
-
-=item getppid
-
-This is identical to Perl's builtin C<getppid()> function for
-returning the process identifier of the parent process of the current
-process , see L<perlfunc/getppid>.
-
-=item getpwnam
-
-This is identical to Perl's builtin C<getpwnam()> function for
-returning user entries by user names, see L<perlfunc/getpwnam>.
-
-=item getpwuid
-
-This is identical to Perl's builtin C<getpwuid()> function for
-returning user entries by user identifiers, see L<perlfunc/getpwuid>.
-
-=item gets
-
-Returns one line from C<STDIN>, similar to E<lt>E<gt>, also known
-as the C<readline()> function, see L<perlfunc/readline>.
-
-B<NOTE>: if you have C programs that still use C<gets()>, be very
-afraid. The C<gets()> function is a source of endless grief because
-it has no buffer overrun checks. It should B<never> be used. The
-C<fgets()> function should be preferred instead.
-
-=item getuid
-
-Returns the user's identifier. Identical to Perl's builtin C<$E<lt>> variable,
-see L<perlvar/$UID>.
-
-=item gmtime
-
-This is identical to Perl's builtin C<gmtime()> function for
-converting seconds since the epoch to a date in Greenwich Mean Time,
-see L<perlfunc/gmtime>.
-
-=item isalnum
-
-This is identical to the C function, except that it can apply to a
-single character or to a whole string. Note that locale settings may
-affect what characters are considered C<isalnum>. Does not work on
-Unicode characters code point 256 or higher. Consider using regular
-expressions and the C</[[:alnum:]]/> construct instead, or possibly
-the C</\w/> construct.
-
-=item isalpha
-
-This is identical to the C function, except that it can apply to
-a single character or to a whole string. Note that locale settings
-may affect what characters are considered C<isalpha>. Does not work
-on Unicode characters code point 256 or higher. Consider using regular
-expressions and the C</[[:alpha:]]/> construct instead.
-
-=item isatty
-
-Returns a boolean indicating whether the specified filehandle is connected
-to a tty. Similar to the C<-t> operator, see L<perlfunc/-X>.
-
-=item iscntrl
-
-This is identical to the C function, except that it can apply to
-a single character or to a whole string. Note that locale settings
-may affect what characters are considered C<iscntrl>. Does not work
-on Unicode characters code point 256 or higher. Consider using regular
-expressions and the C</[[:cntrl:]]/> construct instead.
-
-=item isdigit
-
-This is identical to the C function, except that it can apply to
-a single character or to a whole string. Note that locale settings
-may affect what characters are considered C<isdigit> (unlikely, but
-still possible). Does not work on Unicode characters code point 256
-or higher. Consider using regular expressions and the C</[[:digit:]]/>
-construct instead, or the C</\d/> construct.
-
-=item isgraph
-
-This is identical to the C function, except that it can apply to
-a single character or to a whole string. Note that locale settings
-may affect what characters are considered C<isgraph>. Does not work
-on Unicode characters code point 256 or higher. Consider using regular
-expressions and the C</[[:graph:]]/> construct instead.
-
-=item islower
-
-This is identical to the C function, except that it can apply to
-a single character or to a whole string. Note that locale settings
-may affect what characters are considered C<islower>. Does not work
-on Unicode characters code point 256 or higher. Consider using regular
-expressions and the C</[[:lower:]]/> construct instead. Do B<not> use
-C</[a-z]/>.
-
-=item isprint
-
-This is identical to the C function, except that it can apply to
-a single character or to a whole string. Note that locale settings
-may affect what characters are considered C<isprint>. Does not work
-on Unicode characters code point 256 or higher. Consider using regular
-expressions and the C</[[:print:]]/> construct instead.
-
-=item ispunct
-
-This is identical to the C function, except that it can apply to
-a single character or to a whole string. Note that locale settings
-may affect what characters are considered C<ispunct>. Does not work
-on Unicode characters code point 256 or higher. Consider using regular
-expressions and the C</[[:punct:]]/> construct instead.
-
-=item isspace
-
-This is identical to the C function, except that it can apply to
-a single character or to a whole string. Note that locale settings
-may affect what characters are considered C<isspace>. Does not work
-on Unicode characters code point 256 or higher. Consider using regular
-expressions and the C</[[:space:]]/> construct instead, or the C</\s/>
-construct. (Note that C</\s/> and C</[[:space:]]/> are slightly
-different in that C</[[:space:]]/> can normally match a vertical tab,
-while C</\s/> does not.)
-
-=item isupper
-
-This is identical to the C function, except that it can apply to
-a single character or to a whole string. Note that locale settings
-may affect what characters are considered C<isupper>. Does not work
-on Unicode characters code point 256 or higher. Consider using regular
-expressions and the C</[[:upper:]]/> construct instead. Do B<not> use
-C</[A-Z]/>.
-
-=item isxdigit
-
-This is identical to the C function, except that it can apply to a single
-character or to a whole string. Note that locale settings may affect what
-characters are considered C<isxdigit> (unlikely, but still possible).
-Does not work on Unicode characters code point 256 or higher.
-Consider using regular expressions and the C</[[:xdigit:]]/>
-construct instead, or simply C</[0-9a-f]/i>.
-
-=item kill
-
-This is identical to Perl's builtin C<kill()> function for sending
-signals to processes (often to terminate them), see L<perlfunc/kill>.
-
-=item labs
-
-(For returning absolute values of long integers.)
-labs() is C-specific, see L<perlfunc/abs> instead.
-
-=item ldexp
-
-This is identical to the C function C<ldexp()>
-for multiplying floating point numbers with powers of two.
-
- $x_quadrupled = POSIX::ldexp($x, 2);
-
-=item ldiv
-
-(For computing dividends of long integers.)
-ldiv() is C-specific, use C</> and C<int()> instead.
-
-=item link
-
-This is identical to Perl's builtin C<link()> function
-for creating hard links into files, see L<perlfunc/link>.
-
-=item localeconv
-
-Get numeric formatting information. Returns a reference to a hash
-containing the current locale formatting values.
-
-Here is how to query the database for the B<de> (Deutsch or German) locale.
-
- $loc = POSIX::setlocale( &POSIX::LC_ALL, "de" );
- print "Locale = $loc\n";
- $lconv = POSIX::localeconv();
- print "decimal_point = ", $lconv->{decimal_point}, "\n";
- print "thousands_sep = ", $lconv->{thousands_sep}, "\n";
- print "grouping = ", $lconv->{grouping}, "\n";
- print "int_curr_symbol = ", $lconv->{int_curr_symbol}, "\n";
- print "currency_symbol = ", $lconv->{currency_symbol}, "\n";
- print "mon_decimal_point = ", $lconv->{mon_decimal_point}, "\n";
- print "mon_thousands_sep = ", $lconv->{mon_thousands_sep}, "\n";
- print "mon_grouping = ", $lconv->{mon_grouping}, "\n";
- print "positive_sign = ", $lconv->{positive_sign}, "\n";
- print "negative_sign = ", $lconv->{negative_sign}, "\n";
- print "int_frac_digits = ", $lconv->{int_frac_digits}, "\n";
- print "frac_digits = ", $lconv->{frac_digits}, "\n";
- print "p_cs_precedes = ", $lconv->{p_cs_precedes}, "\n";
- print "p_sep_by_space = ", $lconv->{p_sep_by_space}, "\n";
- print "n_cs_precedes = ", $lconv->{n_cs_precedes}, "\n";
- print "n_sep_by_space = ", $lconv->{n_sep_by_space}, "\n";
- print "p_sign_posn = ", $lconv->{p_sign_posn}, "\n";
- print "n_sign_posn = ", $lconv->{n_sign_posn}, "\n";
-
-=item localtime
-
-This is identical to Perl's builtin C<localtime()> function for
-converting seconds since the epoch to a date see L<perlfunc/localtime>.
-
-=item log
-
-This is identical to Perl's builtin C<log()> function,
-returning the natural (I<e>-based) logarithm of the numerical argument,
-see L<perlfunc/log>.
-
-=item log10
-
-This is identical to the C function C<log10()>,
-returning the 10-base logarithm of the numerical argument.
-You can also use
-
- sub log10 { log($_[0]) / log(10) }
-
-or
-
- sub log10 { log($_[0]) / 2.30258509299405 }
-
-or
-
- sub log10 { log($_[0]) * 0.434294481903252 }
-
-=item longjmp
-
-longjmp() is C-specific: use L<perlfunc/die> instead.
-
-=item lseek
-
-Move the file's read/write position. This uses file descriptors such as
-those obtained by calling C<POSIX::open>.
-
- $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
- $off_t = POSIX::lseek( $fd, 0, &POSIX::SEEK_SET );
-
-Returns C<undef> on failure.
-
-=item malloc
-
-malloc() is C-specific. Perl does memory management transparently.
-
-=item mblen
-
-This is identical to the C function C<mblen()>.
-Perl does not have any support for the wide and multibyte
-characters of the C standards, so this might be a rather
-useless function.
-
-=item mbstowcs
-
-This is identical to the C function C<mbstowcs()>.
-Perl does not have any support for the wide and multibyte
-characters of the C standards, so this might be a rather
-useless function.
-
-=item mbtowc
-
-This is identical to the C function C<mbtowc()>.
-Perl does not have any support for the wide and multibyte
-characters of the C standards, so this might be a rather
-useless function.
-
-=item memchr
-
-memchr() is C-specific, see L<perlfunc/index> instead.
-
-=item memcmp
-
-memcmp() is C-specific, use C<eq> instead, see L<perlop>.
-
-=item memcpy
-
-memcpy() is C-specific, use C<=>, see L<perlop>, or see L<perlfunc/substr>.
-
-=item memmove
-
-memmove() is C-specific, use C<=>, see L<perlop>, or see L<perlfunc/substr>.
-
-=item memset
-
-memset() is C-specific, use C<x> instead, see L<perlop>.
-
-=item mkdir
-
-This is identical to Perl's builtin C<mkdir()> function
-for creating directories, see L<perlfunc/mkdir>.
-
-=item mkfifo
-
-This is similar to the C function C<mkfifo()> for creating
-FIFO special files.
-
- if (mkfifo($path, $mode)) { ....
-
-Returns C<undef> on failure. The C<$mode> is similar to the
-mode of C<mkdir()>, see L<perlfunc/mkdir>, though for C<mkfifo>
-you B<must> specify the C<$mode>.
-
-=item mktime
-
-Convert date/time info to a calendar time.
-
-Synopsis:
-
- mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1)
-
-The month (C<mon>), weekday (C<wday>), and yearday (C<yday>) begin at zero.
-I.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1. The
-year (C<year>) is given in years since 1900. I.e. The year 1995 is 95; the
-year 2001 is 101. Consult your system's C<mktime()> manpage for details
-about these and the other arguments.
-
-Calendar time for December 12, 1995, at 10:30 am.
-
- $time_t = POSIX::mktime( 0, 30, 10, 12, 11, 95 );
- print "Date = ", POSIX::ctime($time_t);
-
-Returns C<undef> on failure.
-
-=item modf
-
-Return the integral and fractional parts of a floating-point number.
-
- ($fractional, $integral) = POSIX::modf( 3.14 );
-
-=item nice
-
-This is similar to the C function C<nice()>, for changing
-the scheduling preference of the current process. Positive
-arguments mean more polite process, negative values more
-needy process. Normal user processes can only be more polite.
-
-Returns C<undef> on failure.
-
-=item offsetof
-
-offsetof() is C-specific, you probably want to see L<perlfunc/pack> instead.
-
-=item open
-
-Open a file for reading for writing. This returns file descriptors, not
-Perl filehandles. Use C<POSIX::close> to close the file.
-
-Open a file read-only with mode 0666.
-
- $fd = POSIX::open( "foo" );
-
-Open a file for read and write.
-
- $fd = POSIX::open( "foo", &POSIX::O_RDWR );
-
-Open a file for write, with truncation.
-
- $fd = POSIX::open( "foo", &POSIX::O_WRONLY | &POSIX::O_TRUNC );
-
-Create a new file with mode 0640. Set up the file for writing.
-
- $fd = POSIX::open( "foo", &POSIX::O_CREAT | &POSIX::O_WRONLY, 0640 );
-
-Returns C<undef> on failure.
-
-See also L<perlfunc/sysopen>.
-
-=item opendir
-
-Open a directory for reading.
-
- $dir = POSIX::opendir( "/var" );
- @files = POSIX::readdir( $dir );
- POSIX::closedir( $dir );
-
-Returns C<undef> on failure.
-
-=item pathconf
-
-Retrieves the value of a configurable limit on a file or directory.
-
-The following will determine the maximum length of the longest allowable
-pathname on the filesystem which holds C</var>.
-
- $path_max = POSIX::pathconf( "/var", &POSIX::_PC_PATH_MAX );
-
-Returns C<undef> on failure.
-
-=item pause
-
-This is similar to the C function C<pause()>, which suspends
-the execution of the current process until a signal is received.
-
-Returns C<undef> on failure.
-
-=item perror
-
-This is identical to the C function C<perror()>, which outputs to the
-standard error stream the specified message followed by ": " and the
-current error string. Use the C<warn()> function and the C<$!>
-variable instead, see L<perlfunc/warn> and L<perlvar/$ERRNO>.
-
-=item pipe
-
-Create an interprocess channel. This returns file descriptors like those
-returned by C<POSIX::open>.
-
- my ($read, $write) = POSIX::pipe();
- POSIX::write( $write, "hello", 5 );
- POSIX::read( $read, $buf, 5 );
-
-See also L<perlfunc/pipe>.
-
-=item pow
-
-Computes C<$x> raised to the power C<$exponent>.
-
- $ret = POSIX::pow( $x, $exponent );
-
-You can also use the C<**> operator, see L<perlop>.
-
-=item printf
-
-Formats and prints the specified arguments to STDOUT.
-See also L<perlfunc/printf>.
-
-=item putc
-
-putc() is C-specific, see L<perlfunc/print> instead.
-
-=item putchar
-
-putchar() is C-specific, see L<perlfunc/print> instead.
-
-=item puts
-
-puts() is C-specific, see L<perlfunc/print> instead.
-
-=item qsort
-
-qsort() is C-specific, see L<perlfunc/sort> instead.
-
-=item raise
-
-Sends the specified signal to the current process.
-See also L<perlfunc/kill> and the C<$$> in L<perlvar/$PID>.
-
-=item rand
-
-C<rand()> is non-portable, see L<perlfunc/rand> instead.
-
-=item read
-
-Read from a file. This uses file descriptors such as those obtained by
-calling C<POSIX::open>. If the buffer C<$buf> is not large enough for the
-read then Perl will extend it to make room for the request.
-
- $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
- $bytes = POSIX::read( $fd, $buf, 3 );
-
-Returns C<undef> on failure.
-
-See also L<perlfunc/sysread>.
-
-=item readdir
-
-This is identical to Perl's builtin C<readdir()> function
-for reading directory entries, see L<perlfunc/readdir>.
-
-=item realloc
-
-realloc() is C-specific. Perl does memory management transparently.
-
-=item remove
-
-This is identical to Perl's builtin C<unlink()> function
-for removing files, see L<perlfunc/unlink>.
-
-=item rename
-
-This is identical to Perl's builtin C<rename()> function
-for renaming files, see L<perlfunc/rename>.
-
-=item rewind
-
-Seeks to the beginning of the file.
-
-=item rewinddir
-
-This is identical to Perl's builtin C<rewinddir()> function for
-rewinding directory entry streams, see L<perlfunc/rewinddir>.
-
-=item rmdir
-
-This is identical to Perl's builtin C<rmdir()> function
-for removing (empty) directories, see L<perlfunc/rmdir>.
-
-=item scanf
-
-scanf() is C-specific, use E<lt>E<gt> and regular expressions instead,
-see L<perlre>.
-
-=item setgid
-
-Sets the real group identifier and the effective group identifier for
-this process. Similar to assigning a value to the Perl's builtin
-C<$)> variable, see L<perlvar/$EGID>, except that the latter
-will change only the real user identifier, and that the setgid()
-uses only a single numeric argument, as opposed to a space-separated
-list of numbers.
-
-=item setjmp
-
-C<setjmp()> is C-specific: use C<eval {}> instead,
-see L<perlfunc/eval>.
-
-=item setlocale
-
-Modifies and queries program's locale. The following examples assume
-
- use POSIX qw(setlocale LC_ALL LC_CTYPE);
-
-has been issued.
-
-The following will set the traditional UNIX system locale behavior
-(the second argument C<"C">).
-
- $loc = setlocale( LC_ALL, "C" );
-
-The following will query the current LC_CTYPE category. (No second
-argument means 'query'.)
-
- $loc = setlocale( LC_CTYPE );
-
-The following will set the LC_CTYPE behaviour according to the locale
-environment variables (the second argument C<"">).
-Please see your systems C<setlocale(3)> documentation for the locale
-environment variables' meaning or consult L<perllocale>.
-
- $loc = setlocale( LC_CTYPE, "" );
-
-The following will set the LC_COLLATE behaviour to Argentinian
-Spanish. B<NOTE>: The naming and availability of locales depends on
-your operating system. Please consult L<perllocale> for how to find
-out which locales are available in your system.
-
- $loc = setlocale( LC_ALL, "es_AR.ISO8859-1" );
-
-=item setpgid
-
-This is similar to the C function C<setpgid()> for
-setting the process group identifier of the current process.
-
-Returns C<undef> on failure.
-
-=item setsid
-
-This is identical to the C function C<setsid()> for
-setting the session identifier of the current process.
-
-=item setuid
-
-Sets the real user identifier and the effective user identifier for
-this process. Similar to assigning a value to the Perl's builtin
-C<$E<lt>> variable, see L<perlvar/$UID>, except that the latter
-will change only the real user identifier.
-
-=item sigaction
-
-Detailed signal management. This uses C<POSIX::SigAction> objects for
-the C<action> and C<oldaction> arguments (the oldaction can also be
-just a hash reference). Consult your system's C<sigaction> manpage
-for details, see also C<POSIX::SigRt>.
-
-Synopsis:
-
- sigaction(signal, action, oldaction = 0)
-
-Returns C<undef> on failure. The C<signal> must be a number (like
-SIGHUP), not a string (like "SIGHUP"), though Perl does try hard
-to understand you.
-
-If you use the SA_SIGINFO flag, the signal handler will in addition to
-the first argument, the signal name, also receive a second argument, a
-hash reference, inside which are the following keys with the following
-semantics, as defined by POSIX/SUSv3:
-
- signo the signal number
- errno the error number
- code if this is zero or less, the signal was sent by
- a user process and the uid and pid make sense,
- otherwise the signal was sent by the kernel
-
-The following are also defined by POSIX/SUSv3, but unfortunately
-not very widely implemented:
-
- pid the process id generating the signal
- uid the uid of the process id generating the signal
- status exit value or signal for SIGCHLD
- band band event for SIGPOLL
-
-A third argument is also passed to the handler, which contains a copy
-of the raw binary contents of the siginfo structure: if a system has
-some non-POSIX fields, this third argument is where to unpack() them
-from.
-
-Note that not all siginfo values make sense simultaneously (some are
-valid only for certain signals, for example), and not all values make
-sense from Perl perspective, you should to consult your system's
-C<sigaction> and possibly also C<siginfo> documentation.
-
-=item siglongjmp
-
-siglongjmp() is C-specific: use L<perlfunc/die> instead.
-
-=item sigpending
-
-Examine signals that are blocked and pending. This uses C<POSIX::SigSet>
-objects for the C<sigset> argument. Consult your system's C<sigpending>
-manpage for details.
-
-Synopsis:
-
- sigpending(sigset)
-
-Returns C<undef> on failure.
-
-=item sigprocmask
-
-Change and/or examine calling process's signal mask. This uses
-C<POSIX::SigSet> objects for the C<sigset> and C<oldsigset> arguments.
-Consult your system's C<sigprocmask> manpage for details.
-
-Synopsis:
-
- sigprocmask(how, sigset, oldsigset = 0)
-
-Returns C<undef> on failure.
-
-=item sigsetjmp
-
-C<sigsetjmp()> is C-specific: use C<eval {}> instead,
-see L<perlfunc/eval>.
-
-=item sigsuspend
-
-Install a signal mask and suspend process until signal arrives. This uses
-C<POSIX::SigSet> objects for the C<signal_mask> argument. Consult your
-system's C<sigsuspend> manpage for details.
-
-Synopsis:
-
- sigsuspend(signal_mask)
-
-Returns C<undef> on failure.
-
-=item sin
-
-This is identical to Perl's builtin C<sin()> function
-for returning the sine of the numerical argument,
-see L<perlfunc/sin>. See also L<Math::Trig>.
-
-=item sinh
-
-This is identical to the C function C<sinh()>
-for returning the hyperbolic sine of the numerical argument.
-See also L<Math::Trig>.
-
-=item sleep
-
-This is functionally identical to Perl's builtin C<sleep()> function
-for suspending the execution of the current for process for certain
-number of seconds, see L<perlfunc/sleep>. There is one significant
-difference, however: C<POSIX::sleep()> returns the number of
-B<unslept> seconds, while the C<CORE::sleep()> returns the
-number of slept seconds.
-
-=item sprintf
-
-This is similar to Perl's builtin C<sprintf()> function
-for returning a string that has the arguments formatted as requested,
-see L<perlfunc/sprintf>.
-
-=item sqrt
-
-This is identical to Perl's builtin C<sqrt()> function.
-for returning the square root of the numerical argument,
-see L<perlfunc/sqrt>.
-
-=item srand
-
-Give a seed the pseudorandom number generator, see L<perlfunc/srand>.
-
-=item sscanf
-
-sscanf() is C-specific, use regular expressions instead,
-see L<perlre>.
-
-=item stat
-
-This is identical to Perl's builtin C<stat()> function
-for returning information about files and directories.
-
-=item strcat
-
-strcat() is C-specific, use C<.=> instead, see L<perlop>.
-
-=item strchr
-
-strchr() is C-specific, see L<perlfunc/index> instead.
-
-=item strcmp
-
-strcmp() is C-specific, use C<eq> or C<cmp> instead, see L<perlop>.
-
-=item strcoll
-
-This is identical to the C function C<strcoll()>
-for collating (comparing) strings transformed using
-the C<strxfrm()> function. Not really needed since
-Perl can do this transparently, see L<perllocale>.
-
-=item strcpy
-
-strcpy() is C-specific, use C<=> instead, see L<perlop>.
-
-=item strcspn
-
-strcspn() is C-specific, use regular expressions instead,
-see L<perlre>.
-
-=item strerror
-
-Returns the error string for the specified errno.
-Identical to the string form of the C<$!>, see L<perlvar/$ERRNO>.
-
-=item strftime
-
-Convert date and time information to string. Returns the string.
-
-Synopsis:
-
- strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
-
-The month (C<mon>), weekday (C<wday>), and yearday (C<yday>) begin at zero.
-I.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1. The
-year (C<year>) is given in years since 1900. I.e., the year 1995 is 95; the
-year 2001 is 101. Consult your system's C<strftime()> manpage for details
-about these and the other arguments.
-
-If you want your code to be portable, your format (C<fmt>) argument
-should use only the conversion specifiers defined by the ANSI C
-standard (C89, to play safe). These are C<aAbBcdHIjmMpSUwWxXyYZ%>.
-But even then, the B<results> of some of the conversion specifiers are
-non-portable. For example, the specifiers C<aAbBcpZ> change according
-to the locale settings of the user, and both how to set locales (the
-locale names) and what output to expect are non-standard.
-The specifier C<c> changes according to the timezone settings of the
-user and the timezone computation rules of the operating system.
-The C<Z> specifier is notoriously unportable since the names of
-timezones are non-standard. Sticking to the numeric specifiers is the
-safest route.
-
-The given arguments are made consistent as though by calling
-C<mktime()> before calling your system's C<strftime()> function,
-except that the C<isdst> value is not affected.
-
-The string for Tuesday, December 12, 1995.
-
- $str = POSIX::strftime( "%A, %B %d, %Y", 0, 0, 0, 12, 11, 95, 2 );
- print "$str\n";
-
-=item strlen
-
-strlen() is C-specific, use C<length()> instead, see L<perlfunc/length>.
-
-=item strncat
-
-strncat() is C-specific, use C<.=> instead, see L<perlop>.
-
-=item strncmp
-
-strncmp() is C-specific, use C<eq> instead, see L<perlop>.
-
-=item strncpy
-
-strncpy() is C-specific, use C<=> instead, see L<perlop>.
-
-=item strpbrk
-
-strpbrk() is C-specific, use regular expressions instead,
-see L<perlre>.
-
-=item strrchr
-
-strrchr() is C-specific, see L<perlfunc/rindex> instead.
-
-=item strspn
-
-strspn() is C-specific, use regular expressions instead,
-see L<perlre>.
-
-=item strstr
-
-This is identical to Perl's builtin C<index()> function,
-see L<perlfunc/index>.
-
-=item strtod
-
-String to double translation. Returns the parsed number and the number
-of characters in the unparsed portion of the string. Truly
-POSIX-compliant systems set $! ($ERRNO) to indicate a translation
-error, so clear $! before calling strtod. However, non-POSIX systems
-may not check for overflow, and therefore will never set $!.
-
-strtod should respect any POSIX I<setlocale()> settings.
-
-To parse a string $str as a floating point number use
-
- $! = 0;
- ($num, $n_unparsed) = POSIX::strtod($str);
-
-The second returned item and $! can be used to check for valid input:
-
- if (($str eq '') || ($n_unparsed != 0) || $!) {
- die "Non-numeric input $str" . ($! ? ": $!\n" : "\n");
- }
-
-When called in a scalar context strtod returns the parsed number.
-
-=item strtok
-
-strtok() is C-specific, use regular expressions instead, see
-L<perlre>, or L<perlfunc/split>.
-
-=item strtol
-
-String to (long) integer translation. Returns the parsed number and
-the number of characters in the unparsed portion of the string. Truly
-POSIX-compliant systems set $! ($ERRNO) to indicate a translation
-error, so clear $! before calling strtol. However, non-POSIX systems
-may not check for overflow, and therefore will never set $!.
-
-strtol should respect any POSIX I<setlocale()> settings.
-
-To parse a string $str as a number in some base $base use
-
- $! = 0;
- ($num, $n_unparsed) = POSIX::strtol($str, $base);
-
-The base should be zero or between 2 and 36, inclusive. When the base
-is zero or omitted strtol will use the string itself to determine the
-base: a leading "0x" or "0X" means hexadecimal; a leading "0" means
-octal; any other leading characters mean decimal. Thus, "1234" is
-parsed as a decimal number, "01234" as an octal number, and "0x1234"
-as a hexadecimal number.
-
-The second returned item and $! can be used to check for valid input:
-
- if (($str eq '') || ($n_unparsed != 0) || !$!) {
- die "Non-numeric input $str" . $! ? ": $!\n" : "\n";
- }
-
-When called in a scalar context strtol returns the parsed number.
-
-=item strtoul
-
-String to unsigned (long) integer translation. strtoul() is identical
-to strtol() except that strtoul() only parses unsigned integers. See
-L</strtol> for details.
-
-Note: Some vendors supply strtod() and strtol() but not strtoul().
-Other vendors that do supply strtoul() parse "-1" as a valid value.
-
-=item strxfrm
-
-String transformation. Returns the transformed string.
-
- $dst = POSIX::strxfrm( $src );
-
-Used in conjunction with the C<strcoll()> function, see L</strcoll>.
-
-Not really needed since Perl can do this transparently, see
-L<perllocale>.
-
-=item sysconf
-
-Retrieves values of system configurable variables.
-
-The following will get the machine's clock speed.
-
- $clock_ticks = POSIX::sysconf( &POSIX::_SC_CLK_TCK );
-
-Returns C<undef> on failure.
-
-=item system
-
-This is identical to Perl's builtin C<system()> function, see
-L<perlfunc/system>.
-
-=item tan
-
-This is identical to the C function C<tan()>, returning the
-tangent of the numerical argument. See also L<Math::Trig>.
-
-=item tanh
-
-This is identical to the C function C<tanh()>, returning the
-hyperbolic tangent of the numerical argument. See also L<Math::Trig>.
-
-=item tcdrain
-
-This is similar to the C function C<tcdrain()> for draining
-the output queue of its argument stream.
-
-Returns C<undef> on failure.
-
-=item tcflow
-
-This is similar to the C function C<tcflow()> for controlling
-the flow of its argument stream.
-
-Returns C<undef> on failure.
-
-=item tcflush
-
-This is similar to the C function C<tcflush()> for flushing
-the I/O buffers of its argument stream.
-
-Returns C<undef> on failure.
-
-=item tcgetpgrp
-
-This is identical to the C function C<tcgetpgrp()> for returning the
-process group identifier of the foreground process group of the controlling
-terminal.
-
-=item tcsendbreak
-
-This is similar to the C function C<tcsendbreak()> for sending
-a break on its argument stream.
-
-Returns C<undef> on failure.
-
-=item tcsetpgrp
-
-This is similar to the C function C<tcsetpgrp()> for setting the
-process group identifier of the foreground process group of the controlling
-terminal.
-
-Returns C<undef> on failure.
-
-=item time
-
-This is identical to Perl's builtin C<time()> function
-for returning the number of seconds since the epoch
-(whatever it is for the system), see L<perlfunc/time>.
-
-=item times
-
-The times() function returns elapsed realtime since some point in the past
-(such as system startup), user and system times for this process, and user
-and system times used by child processes. All times are returned in clock
-ticks.
-
- ($realtime, $user, $system, $cuser, $csystem) = POSIX::times();
-
-Note: Perl's builtin C<times()> function returns four values, measured in
-seconds.
-
-=item tmpfile
-
-Use method C<IO::File::new_tmpfile()> instead, or see L<File::Temp>.
-
-=item tmpnam
-
-Returns a name for a temporary file.
-
- $tmpfile = POSIX::tmpnam();
-
-For security reasons, which are probably detailed in your system's
-documentation for the C library tmpnam() function, this interface
-should not be used; instead see L<File::Temp>.
-
-=item tolower
-
-This is identical to the C function, except that it can apply to a single
-character or to a whole string. Consider using the C<lc()> function,
-see L<perlfunc/lc>, or the equivalent C<\L> operator inside doublequotish
-strings.
-
-=item toupper
-
-This is identical to the C function, except that it can apply to a single
-character or to a whole string. Consider using the C<uc()> function,
-see L<perlfunc/uc>, or the equivalent C<\U> operator inside doublequotish
-strings.
-
-=item ttyname
-
-This is identical to the C function C<ttyname()> for returning the
-name of the current terminal.
-
-=item tzname
-
-Retrieves the time conversion information from the C<tzname> variable.
-
- POSIX::tzset();
- ($std, $dst) = POSIX::tzname();
-
-=item tzset
-
-This is identical to the C function C<tzset()> for setting
-the current timezone based on the environment variable C<TZ>,
-to be used by C<ctime()>, C<localtime()>, C<mktime()>, and C<strftime()>
-functions.
-
-=item umask
-
-This is identical to Perl's builtin C<umask()> function
-for setting (and querying) the file creation permission mask,
-see L<perlfunc/umask>.
-
-=item uname
-
-Get name of current operating system.
-
- ($sysname, $nodename, $release, $version, $machine) = POSIX::uname();
-
-Note that the actual meanings of the various fields are not
-that well standardized, do not expect any great portability.
-The C<$sysname> might be the name of the operating system,
-the C<$nodename> might be the name of the host, the C<$release>
-might be the (major) release number of the operating system,
-the C<$version> might be the (minor) release number of the
-operating system, and the C<$machine> might be a hardware identifier.
-Maybe.
-
-=item ungetc
-
-Use method C<IO::Handle::ungetc()> instead.
-
-=item unlink
-
-This is identical to Perl's builtin C<unlink()> function
-for removing files, see L<perlfunc/unlink>.
-
-=item utime
-
-This is identical to Perl's builtin C<utime()> function
-for changing the time stamps of files and directories,
-see L<perlfunc/utime>.
-
-=item vfprintf
-
-vfprintf() is C-specific, see L<perlfunc/printf> instead.
-
-=item vprintf
-
-vprintf() is C-specific, see L<perlfunc/printf> instead.
-
-=item vsprintf
-
-vsprintf() is C-specific, see L<perlfunc/sprintf> instead.
-
-=item wait
-
-This is identical to Perl's builtin C<wait()> function,
-see L<perlfunc/wait>.
-
-=item waitpid
-
-Wait for a child process to change state. This is identical to Perl's
-builtin C<waitpid()> function, see L<perlfunc/waitpid>.
-
- $pid = POSIX::waitpid( -1, POSIX::WNOHANG );
- print "status = ", ($? / 256), "\n";
-
-=item wcstombs
-
-This is identical to the C function C<wcstombs()>.
-Perl does not have any support for the wide and multibyte
-characters of the C standards, so this might be a rather
-useless function.
-
-=item wctomb
-
-This is identical to the C function C<wctomb()>.
-Perl does not have any support for the wide and multibyte
-characters of the C standards, so this might be a rather
-useless function.
-
-=item write
-
-Write to a file. This uses file descriptors such as those obtained by
-calling C<POSIX::open>.
-
- $fd = POSIX::open( "foo", &POSIX::O_WRONLY );
- $buf = "hello";
- $bytes = POSIX::write( $fd, $buf, 5 );
-
-Returns C<undef> on failure.
-
-See also L<perlfunc/syswrite>.
-
-=back
-
-=head1 CLASSES
-
-=head2 POSIX::SigAction
-
-=over 8
-
-=item new
-
-Creates a new C<POSIX::SigAction> object which corresponds to the C
-C<struct sigaction>. This object will be destroyed automatically when
-it is no longer needed. The first parameter is the handler, a sub
-reference. The second parameter is a C<POSIX::SigSet> object, it
-defaults to the empty set. The third parameter contains the
-C<sa_flags>, it defaults to 0.
-
- $sigset = POSIX::SigSet->new(SIGINT, SIGQUIT);
- $sigaction = POSIX::SigAction->new( \&handler, $sigset, &POSIX::SA_NOCLDSTOP );
-
-This C<POSIX::SigAction> object is intended for use with the C<POSIX::sigaction()>
-function.
-
-=back
-
-=over 8
-
-=item handler
-
-=item mask
-
-=item flags
-
-accessor functions to get/set the values of a SigAction object.
-
- $sigset = $sigaction->mask;
- $sigaction->flags(&POSIX::SA_RESTART);
-
-=item safe
-
-accessor function for the "safe signals" flag of a SigAction object; see
-L<perlipc> for general information on safe (a.k.a. "deferred") signals. If
-you wish to handle a signal safely, use this accessor to set the "safe" flag
-in the C<POSIX::SigAction> object:
-
- $sigaction->safe(1);
-
-You may also examine the "safe" flag on the output action object which is
-filled in when given as the third parameter to C<POSIX::sigaction()>:
-
- sigaction(SIGINT, $new_action, $old_action);
- if ($old_action->safe) {
- # previous SIGINT handler used safe signals
- }
-
-=back
-
-=head2 POSIX::SigRt
-
-=over 8
-
-=item %SIGRT
-
-A hash of the POSIX realtime signal handlers. It is an extension of
-the standard %SIG, the $POSIX::SIGRT{SIGRTMIN} is roughly equivalent
-to $SIG{SIGRTMIN}, but the right POSIX moves (see below) are made with
-the POSIX::SigSet and POSIX::sigaction instead of accessing the %SIG.
-
-You can set the %POSIX::SIGRT elements to set the POSIX realtime
-signal handlers, use C<delete> and C<exists> on the elements, and use
-C<scalar> on the C<%POSIX::SIGRT> to find out how many POSIX realtime
-signals there are available (SIGRTMAX - SIGRTMIN + 1, the SIGRTMAX is
-a valid POSIX realtime signal).
-
-Setting the %SIGRT elements is equivalent to calling this:
-
- sub new {
- my ($rtsig, $handler, $flags) = @_;
- my $sigset = POSIX::SigSet($rtsig);
- my $sigact = POSIX::SigAction->new($handler, $sigset, $flags);
- sigaction($rtsig, $sigact);
- }
-
-The flags default to zero, if you want something different you can
-either use C<local> on $POSIX::SigRt::SIGACTION_FLAGS, or you can
-derive from POSIX::SigRt and define your own C<new()> (the tied hash
-STORE method of the %SIGRT calls C<new($rtsig, $handler, $SIGACTION_FLAGS)>,
-where the $rtsig ranges from zero to SIGRTMAX - SIGRTMIN + 1).
-
-Just as with any signal, you can use sigaction($rtsig, undef, $oa) to
-retrieve the installed signal handler (or, rather, the signal action).
-
-B<NOTE:> whether POSIX realtime signals really work in your system, or
-whether Perl has been compiled so that it works with them, is outside
-of this discussion.
-
-=item SIGRTMIN
-
-Return the minimum POSIX realtime signal number available, or C<undef>
-if no POSIX realtime signals are available.
-
-=item SIGRTMAX
-
-Return the maximum POSIX realtime signal number available, or C<undef>
-if no POSIX realtime signals are available.
-
-=back
-
-=head2 POSIX::SigSet
-
-=over 8
-
-=item new
-
-Create a new SigSet object. This object will be destroyed automatically
-when it is no longer needed. Arguments may be supplied to initialize the
-set.
-
-Create an empty set.
-
- $sigset = POSIX::SigSet->new;
-
-Create a set with SIGUSR1.
-
- $sigset = POSIX::SigSet->new( &POSIX::SIGUSR1 );
-
-=item addset
-
-Add a signal to a SigSet object.
-
- $sigset->addset( &POSIX::SIGUSR2 );
-
-Returns C<undef> on failure.
-
-=item delset
-
-Remove a signal from the SigSet object.
-
- $sigset->delset( &POSIX::SIGUSR2 );
-
-Returns C<undef> on failure.
-
-=item emptyset
-
-Initialize the SigSet object to be empty.
-
- $sigset->emptyset();
-
-Returns C<undef> on failure.
-
-=item fillset
-
-Initialize the SigSet object to include all signals.
-
- $sigset->fillset();
-
-Returns C<undef> on failure.
-
-=item ismember
-
-Tests the SigSet object to see if it contains a specific signal.
-
- if( $sigset->ismember( &POSIX::SIGUSR1 ) ){
- print "contains SIGUSR1\n";
- }
-
-=back
-
-=head2 POSIX::Termios
-
-=over 8
-
-=item new
-
-Create a new Termios object. This object will be destroyed automatically
-when it is no longer needed. A Termios object corresponds to the termios
-C struct. new() mallocs a new one, getattr() fills it from a file descriptor,
-and setattr() sets a file descriptor's parameters to match Termios' contents.
-
- $termios = POSIX::Termios->new;
-
-=item getattr
-
-Get terminal control attributes.
-
-Obtain the attributes for stdin.
-
- $termios->getattr( 0 ) # Recommended for clarity.
- $termios->getattr()
-
-Obtain the attributes for stdout.
-
- $termios->getattr( 1 )
-
-Returns C<undef> on failure.
-
-=item getcc
-
-Retrieve a value from the c_cc field of a termios object. The c_cc field is
-an array so an index must be specified.
-
- $c_cc[1] = $termios->getcc(1);
-
-=item getcflag
-
-Retrieve the c_cflag field of a termios object.
-
- $c_cflag = $termios->getcflag;
-
-=item getiflag
-
-Retrieve the c_iflag field of a termios object.
-
- $c_iflag = $termios->getiflag;
-
-=item getispeed
-
-Retrieve the input baud rate.
-
- $ispeed = $termios->getispeed;
-
-=item getlflag
-
-Retrieve the c_lflag field of a termios object.
-
- $c_lflag = $termios->getlflag;
-
-=item getoflag
-
-Retrieve the c_oflag field of a termios object.
-
- $c_oflag = $termios->getoflag;
-
-=item getospeed
-
-Retrieve the output baud rate.
-
- $ospeed = $termios->getospeed;
-
-=item setattr
-
-Set terminal control attributes.
-
-Set attributes immediately for stdout.
-
- $termios->setattr( 1, &POSIX::TCSANOW );
-
-Returns C<undef> on failure.
-
-=item setcc
-
-Set a value in the c_cc field of a termios object. The c_cc field is an
-array so an index must be specified.
-
- $termios->setcc( &POSIX::VEOF, 1 );
-
-=item setcflag
-
-Set the c_cflag field of a termios object.
-
- $termios->setcflag( $c_cflag | &POSIX::CLOCAL );
-
-=item setiflag
-
-Set the c_iflag field of a termios object.
-
- $termios->setiflag( $c_iflag | &POSIX::BRKINT );
-
-=item setispeed
-
-Set the input baud rate.
-
- $termios->setispeed( &POSIX::B9600 );
-
-Returns C<undef> on failure.
-
-=item setlflag
-
-Set the c_lflag field of a termios object.
-
- $termios->setlflag( $c_lflag | &POSIX::ECHO );
-
-=item setoflag
-
-Set the c_oflag field of a termios object.
-
- $termios->setoflag( $c_oflag | &POSIX::OPOST );
-
-=item setospeed
-
-Set the output baud rate.
-
- $termios->setospeed( &POSIX::B9600 );
-
-Returns C<undef> on failure.
-
-=item Baud rate values
-
-B38400 B75 B200 B134 B300 B1800 B150 B0 B19200 B1200 B9600 B600 B4800 B50 B2400 B110
-
-=item Terminal interface values
-
-TCSADRAIN TCSANOW TCOON TCIOFLUSH TCOFLUSH TCION TCIFLUSH TCSAFLUSH TCIOFF TCOOFF
-
-=item c_cc field values
-
-VEOF VEOL VERASE VINTR VKILL VQUIT VSUSP VSTART VSTOP VMIN VTIME NCCS
-
-=item c_cflag field values
-
-CLOCAL CREAD CSIZE CS5 CS6 CS7 CS8 CSTOPB HUPCL PARENB PARODD
-
-=item c_iflag field values
-
-BRKINT ICRNL IGNBRK IGNCR IGNPAR INLCR INPCK ISTRIP IXOFF IXON PARMRK
-
-=item c_lflag field values
-
-ECHO ECHOE ECHOK ECHONL ICANON IEXTEN ISIG NOFLSH TOSTOP
-
-=item c_oflag field values
-
-OPOST
-
-=back
-
-=head1 PATHNAME CONSTANTS
-
-=over 8
-
-=item Constants
-
-_PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON _PC_MAX_INPUT _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX _PC_PIPE_BUF _PC_VDISABLE
-
-=back
-
-=head1 POSIX CONSTANTS
-
-=over 8
-
-=item Constants
-
-_POSIX_ARG_MAX _POSIX_CHILD_MAX _POSIX_CHOWN_RESTRICTED _POSIX_JOB_CONTROL _POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT _POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_NO_TRUNC _POSIX_OPEN_MAX _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SAVED_IDS _POSIX_SSIZE_MAX _POSIX_STREAM_MAX _POSIX_TZNAME_MAX _POSIX_VDISABLE _POSIX_VERSION
-
-=back
-
-=head1 SYSTEM CONFIGURATION
-
-=over 8
-
-=item Constants
-
-_SC_ARG_MAX _SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL _SC_NGROUPS_MAX _SC_OPEN_MAX _SC_PAGESIZE _SC_SAVED_IDS _SC_STREAM_MAX _SC_TZNAME_MAX _SC_VERSION
-
-=back
-
-=head1 ERRNO
-
-=over 8
-
-=item Constants
-
-E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF
-EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ
-EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EINPROGRESS EINTR
-EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE ENAMETOOLONG
-ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODEV ENOENT ENOEXEC
-ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK ENOTCONN ENOTDIR
-ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM EPFNOSUPPORT EPIPE
-EPROCLIM EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART EROFS
-ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS
-ETXTBSY EUSERS EWOULDBLOCK EXDEV
-
-=back
-
-=head1 FCNTL
-
-=over 8
-
-=item Constants
-
-FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_OK F_RDLCK F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC O_WRONLY
-
-=back
-
-=head1 FLOAT
-
-=over 8
-
-=item Constants
-
-DBL_DIG DBL_EPSILON DBL_MANT_DIG DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP FLT_DIG FLT_EPSILON FLT_MANT_DIG FLT_MAX FLT_MAX_10_EXP FLT_MAX_EXP FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP FLT_RADIX FLT_ROUNDS LDBL_DIG LDBL_EPSILON LDBL_MANT_DIG LDBL_MAX LDBL_MAX_10_EXP LDBL_MAX_EXP LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP
-
-=back
-
-=head1 LIMITS
-
-=over 8
-
-=item Constants
-
-ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX INT_MAX INT_MIN LINK_MAX LONG_MAX LONG_MIN MAX_CANON MAX_INPUT MB_LEN_MAX NAME_MAX NGROUPS_MAX OPEN_MAX PATH_MAX PIPE_BUF SCHAR_MAX SCHAR_MIN SHRT_MAX SHRT_MIN SSIZE_MAX STREAM_MAX TZNAME_MAX UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX
-
-=back
-
-=head1 LOCALE
-
-=over 8
-
-=item Constants
-
-LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME
-
-=back
-
-=head1 MATH
-
-=over 8
-
-=item Constants
-
-HUGE_VAL
-
-=back
-
-=head1 SIGNAL
-
-=over 8
-
-=item Constants
-
-SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK SA_RESETHAND SA_RESTART
-SA_SIGINFO SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT
-SIGKILL SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU
-SIGUSR1 SIGUSR2 SIG_BLOCK SIG_DFL SIG_ERR SIG_IGN SIG_SETMASK
-SIG_UNBLOCK
-
-=back
-
-=head1 STAT
-
-=over 8
-
-=item Constants
-
-S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR
-
-=item Macros
-
-S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG
-
-=back
-
-=head1 STDLIB
-
-=over 8
-
-=item Constants
-
-EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX RAND_MAX
-
-=back
-
-=head1 STDIO
-
-=over 8
-
-=item Constants
-
-BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid L_tmpname TMP_MAX
-
-=back
-
-=head1 TIME
-
-=over 8
-
-=item Constants
-
-CLK_TCK CLOCKS_PER_SEC
-
-=back
-
-=head1 UNISTD
-
-=over 8
-
-=item Constants
-
-R_OK SEEK_CUR SEEK_END SEEK_SET STDIN_FILENO STDOUT_FILENO STDERR_FILENO W_OK X_OK
-
-=back
-
-=head1 WAIT
-
-=over 8
-
-=item Constants
-
-WNOHANG WUNTRACED
-
-=over 16
-
-=item WNOHANG
-
-Do not suspend the calling process until a child process
-changes state but instead return immediately.
-
-=item WUNTRACED
-
-Catch stopped child processes.
-
-=back
-
-=item Macros
-
-WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG WIFSTOPPED WSTOPSIG
-
-=over 16
-
-=item WIFEXITED
-
-WIFEXITED($?) returns true if the child process exited normally
-(C<exit()> or by falling off the end of C<main()>)
-
-=item WEXITSTATUS
-
-WEXITSTATUS($?) returns the normal exit status of the child process
-(only meaningful if WIFEXITED($?) is true)
-
-=item WIFSIGNALED
-
-WIFSIGNALED($?) returns true if the child process terminated because
-of a signal
-
-=item WTERMSIG
-
-WTERMSIG($?) returns the signal the child process terminated for
-(only meaningful if WIFSIGNALED($?) is true)
-
-=item WIFSTOPPED
-
-WIFSTOPPED($?) returns true if the child process is currently stopped
-(can happen only if you specified the WUNTRACED flag to waitpid())
-
-=item WSTOPSIG
-
-WSTOPSIG($?) returns the signal the child process was stopped for
-(only meaningful if WIFSTOPPED($?) is true)
-
-=back
-
-=back
-
Deleted: vendor/perl/dist/ext/POSIX/hints/uts.pl
===================================================================
--- vendor/perl/dist/ext/POSIX/hints/uts.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/POSIX/hints/uts.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,9 +0,0 @@
-# UTS - Leaving -lm in there results in death of make with the message:
-# LD_RUN_PATH="/usr/ccs/lib" ld -G -z text POSIX.o \
-# -o ../../lib/auto/POS IX/POSIX.so -lm
-# relocations referenced
-# from file(s)
-# /usr/ccs/lib/libm.a(acos.o)
-# ...
-
-$self->{LIBS} = [''];
Deleted: vendor/perl/dist/ext/Pod-Html/Html.pm
===================================================================
--- vendor/perl/dist/ext/Pod-Html/Html.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/Pod-Html/Html.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,2247 +0,0 @@
-package Pod::Html;
-use strict;
-require Exporter;
-
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = 1.11;
- at ISA = qw(Exporter);
- at EXPORT = qw(pod2html htmlify);
- at EXPORT_OK = qw(anchorify);
-
-use Carp;
-use Config;
-use Cwd;
-use File::Spec;
-use File::Spec::Unix;
-use Getopt::Long;
-
-use locale; # make \w work right in non-ASCII lands
-
-=head1 NAME
-
-Pod::Html - module to convert pod files to HTML
-
-=head1 SYNOPSIS
-
- use Pod::Html;
- pod2html([options]);
-
-=head1 DESCRIPTION
-
-Converts files from pod format (see L<perlpod>) to HTML format. It
-can automatically generate indexes and cross-references, and it keeps
-a cache of things it knows how to cross-reference.
-
-=head1 FUNCTIONS
-
-=head2 pod2html
-
- pod2html("pod2html",
- "--podpath=lib:ext:pod:vms",
- "--podroot=/usr/src/perl",
- "--htmlroot=/perl/nmanual",
- "--libpods=perlfunc:perlguts:perlvar:perlrun:perlop",
- "--recurse",
- "--infile=foo.pod",
- "--outfile=/perl/nmanual/foo.html");
-
-pod2html takes the following arguments:
-
-=over 4
-
-=item backlink
-
- --backlink="Back to Top"
-
-Adds "Back to Top" links in front of every C<head1> heading (except for
-the first). By default, no backlinks are generated.
-
-=item cachedir
-
- --cachedir=name
-
-Creates the item and directory caches in the given directory.
-
-=item css
-
- --css=stylesheet
-
-Specify the URL of a cascading style sheet. Also disables all HTML/CSS
-C<style> attributes that are output by default (to avoid conflicts).
-
-=item flush
-
- --flush
-
-Flushes the item and directory caches.
-
-=item header
-
- --header
- --noheader
-
-Creates header and footer blocks containing the text of the C<NAME>
-section. By default, no headers are generated.
-
-=item help
-
- --help
-
-Displays the usage message.
-
-=item hiddendirs
-
- --hiddendirs
- --nohiddendirs
-
-Include hidden directories in the search for POD's in podpath if recurse
-is set.
-The default is not to traverse any directory whose name begins with C<.>.
-See L</"podpath"> and L</"recurse">.
-
-[This option is for backward compatibility only.
-It's hard to imagine that one would usefully create a module with a
-name component beginning with C<.>.]
-
-=item htmldir
-
- --htmldir=name
-
-Sets the directory in which the resulting HTML file is placed. This
-is used to generate relative links to other files. Not passing this
-causes all links to be absolute, since this is the value that tells
-Pod::Html the root of the documentation tree.
-
-=item htmlroot
-
- --htmlroot=name
-
-Sets the base URL for the HTML files. When cross-references are made,
-the HTML root is prepended to the URL.
-
-=item index
-
- --index
- --noindex
-
-Generate an index at the top of the HTML file. This is the default
-behaviour.
-
-=item infile
-
- --infile=name
-
-Specify the pod file to convert. Input is taken from STDIN if no
-infile is specified.
-
-=item libpods
-
- --libpods=name:...:name
-
-List of page names (eg, "perlfunc") which contain linkable C<=item>s.
-
-=item netscape
-
- --netscape
- --nonetscape
-
-B<Deprecated>, has no effect. For backwards compatibility only.
-
-=item outfile
-
- --outfile=name
-
-Specify the HTML file to create. Output goes to STDOUT if no outfile
-is specified.
-
-=item podpath
-
- --podpath=name:...:name
-
-Specify which subdirectories of the podroot contain pod files whose
-HTML converted forms can be linked to in cross references.
-
-=item podroot
-
- --podroot=name
-
-Specify the base directory for finding library pods.
-
-=item quiet
-
- --quiet
- --noquiet
-
-Don't display I<mostly harmless> warning messages. These messages
-will be displayed by default. But this is not the same as C<verbose>
-mode.
-
-=item recurse
-
- --recurse
- --norecurse
-
-Recurse into subdirectories specified in podpath (default behaviour).
-
-=item title
-
- --title=title
-
-Specify the title of the resulting HTML file.
-
-=item verbose
-
- --verbose
- --noverbose
-
-Display progress messages. By default, they won't be displayed.
-
-=back
-
-=head2 htmlify
-
- htmlify($heading);
-
-Converts a pod section specification to a suitable section specification
-for HTML. Note that we keep spaces and special characters except
-C<", ?> (Netscape problem) and the hyphen (writer's problem...).
-
-=head2 anchorify
-
- anchorify(@heading);
-
-Similar to C<htmlify()>, but turns non-alphanumerics into underscores. Note
-that C<anchorify()> is not exported by default.
-
-=head1 ENVIRONMENT
-
-Uses C<$Config{pod2html}> to setup default options.
-
-=head1 AUTHOR
-
-Tom Christiansen, E<lt>tchrist at perl.comE<gt>.
-
-=head1 SEE ALSO
-
-L<perlpod>
-
-=head1 COPYRIGHT
-
-This program is distributed under the Artistic License.
-
-=cut
-
-my($Cachedir);
-my($Dircache, $Itemcache);
-my @Begin_Stack;
-my @Libpods;
-my($Htmlroot, $Htmldir, $Htmlfile, $Htmlfileurl);
-my($Podfile, @Podpath, $Podroot);
-my $Css;
-
-my $Recurse;
-my $Quiet;
-my $HiddenDirs;
-my $Verbose;
-my $Doindex;
-
-my $Backlink;
-my($Listlevel, @Listtype);
-my $ListNewTerm;
-use vars qw($Ignore); # need to localize it later.
-
-my(%Items_Named, @Items_Seen);
-my($Title, $Header);
-
-my $Top;
-my $Paragraph;
-
-my %Sections;
-
-# Caches
-my %Pages = (); # associative array used to find the location
- # of pages referenced by L<> links.
-my %Items = (); # associative array used to find the location
- # of =item directives referenced by C<> links
-
-my %Local_Items;
-my $Is83;
-
-my $Curdir = File::Spec->curdir;
-
-init_globals();
-
-sub init_globals {
- $Cachedir = "."; # The directory to which item and directory
- # caches will be written.
-
- $Dircache = "pod2htmd.tmp";
- $Itemcache = "pod2htmi.tmp";
-
- @Begin_Stack = (); # begin/end stack
-
- @Libpods = (); # files to search for links from C<> directives
- $Htmlroot = "/"; # http-server base directory from which all
- # relative paths in $podpath stem.
- $Htmldir = ""; # The directory to which the html pages
- # will (eventually) be written.
- $Htmlfile = ""; # write to stdout by default
- $Htmlfileurl = ""; # The url that other files would use to
- # refer to this file. This is only used
- # to make relative urls that point to
- # other files.
-
- $Podfile = ""; # read from stdin by default
- @Podpath = (); # list of directories containing library pods.
- $Podroot = $Curdir; # filesystem base directory from which all
- # relative paths in $podpath stem.
- $Css = ''; # Cascading style sheet
- $Recurse = 1; # recurse on subdirectories in $podpath.
- $Quiet = 0; # not quiet by default
- $Verbose = 0; # not verbose by default
- $Doindex = 1; # non-zero if we should generate an index
- $Backlink = ''; # text for "back to top" links
- $Listlevel = 0; # current list depth
- @Listtype = (); # list types for open lists
- $ListNewTerm = 0; # indicates new term in definition list; used
- # to correctly open/close <dd> tags
- $Ignore = 1; # whether or not to format text. we don't
- # format text until we hit our first pod
- # directive.
-
- @Items_Seen = (); # for multiples of the same item in perlfunc
- %Items_Named = ();
- $Header = 0; # produce block header/footer
- $Title = ''; # title to give the pod(s)
- $Top = 1; # true if we are at the top of the doc. used
- # to prevent the first <hr /> directive.
- $Paragraph = ''; # which paragraph we're processing (used
- # for error messages)
- %Sections = (); # sections within this page
-
- %Local_Items = ();
- $Is83 = $^O eq 'dos'; # Is it an 8.3 filesystem?
-}
-
-#
-# clean_data: global clean-up of pod data
-#
-sub clean_data($){
- my( $dataref ) = @_;
- for my $i ( 0..$#{$dataref} ) {
- ${$dataref}[$i] =~ s/\s+\Z//;
-
- # have a look for all-space lines
- if( ${$dataref}[$i] =~ /^\s+$/m and $dataref->[$i] !~ /^\s/ ){
- my @chunks = split( /^\s+$/m, ${$dataref}[$i] );
- splice( @$dataref, $i, 1, @chunks );
- }
- }
-}
-
-
-sub pod2html {
- local(@ARGV) = @_;
- local($/);
- local $_;
-
- init_globals();
-
- $Is83 = 0 if (defined (&Dos::UseLFN) && Dos::UseLFN());
-
- # cache of %Pages and %Items from last time we ran pod2html
-
- #undef $opt_help if defined $opt_help;
-
- # parse the command-line parameters
- parse_command_line();
-
- # escape the backlink argument (same goes for title but is done later...)
- $Backlink = html_escape($Backlink) if defined $Backlink;
-
- # set some variables to their default values if necessary
- my $pod;
- unless (@ARGV && $ARGV[0]) {
- if ($Podfile and $Podfile ne '-') {
- open $pod, '<', $Podfile
- or die "$0: cannot open $Podfile file for input: $!\n";
- } else {
- open $pod, '-';
- }
- } else {
- $Podfile = $ARGV[0]; # XXX: might be more filenames
- $pod = *ARGV;
- }
- $Htmlfile = "-" unless $Htmlfile; # stdout
- $Htmlroot = "" if $Htmlroot eq "/"; # so we don't get a //
- $Htmldir =~ s#/\z## ; # so we don't get a //
- if ( $Htmlroot eq ''
- && defined( $Htmldir )
- && $Htmldir ne ''
- && substr( $Htmlfile, 0, length( $Htmldir ) ) eq $Htmldir
- )
- {
- # Set the 'base' url for this file, so that we can use it
- # as the location from which to calculate relative links
- # to other files. If this is '', then absolute links will
- # be used throughout.
- $Htmlfileurl= "$Htmldir/" . substr( $Htmlfile, length( $Htmldir ) + 1);
- }
-
- # read the pod a paragraph at a time
- warn "Scanning for sections in input file(s)\n" if $Verbose;
- $/ = "";
- my @poddata = <$pod>;
- close $pod;
-
- # be eol agnostic
- for (@poddata) {
- if (/\r/) {
- if (/\r\n/) {
- @poddata = map { s/\r\n/\n/g;
- /\n\n/ ?
- map { "$_\n\n" } split /\n\n/ :
- $_ } @poddata;
- } else {
- @poddata = map { s/\r/\n/g;
- /\n\n/ ?
- map { "$_\n\n" } split /\n\n/ :
- $_ } @poddata;
- }
- last;
- }
- }
-
- clean_data( \@poddata );
-
- # scan the pod for =head[1-6] directives and build an index
- my $index = scan_headings(\%Sections, @poddata);
-
- unless($index) {
- warn "No headings in $Podfile\n" if $Verbose;
- }
-
- # open the output file
- my $html;
- if($Htmlfile and $Htmlfile ne '-') {
- open $html, ">", $Htmlfile
- or die "$0: cannot open $Htmlfile file for output: $!\n";
- } else {
- open $html, ">-";
- }
-
- # put a title in the HTML file if one wasn't specified
- if ($Title eq '') {
- TITLE_SEARCH: {
- for (my $i = 0; $i < @poddata; $i++) {
- if ($poddata[$i] =~ /^=head1\s*NAME\b/m) {
- for my $para ( @poddata[$i, $i+1] ) {
- last TITLE_SEARCH
- if ($Title) = $para =~ /(\S+\s+-+.*\S)/s;
- }
- }
-
- }
- }
- }
- if (!$Title and $Podfile =~ /\.pod\z/) {
- # probably a split pod so take first =head[12] as title
- for (my $i = 0; $i < @poddata; $i++) {
- last if ($Title) = $poddata[$i] =~ /^=head[12]\s*(.*)/;
- }
- warn "adopted '$Title' as title for $Podfile\n"
- if $Verbose and $Title;
- }
- if ($Title) {
- $Title =~ s/\s*\(.*\)//;
- } else {
- warn "$0: no title for $Podfile.\n" unless $Quiet;
- $Podfile =~ /^(.*)(\.[^.\/]+)?\z/s;
- $Title = ($Podfile eq "-" ? 'No Title' : $1);
- warn "using $Title" if $Verbose;
- }
- $Title = html_escape($Title);
-
- my $csslink = '';
- my $bodystyle = ' style="background-color: white"';
- my $tdstyle = ' style="background-color: #cccccc"';
-
- if ($Css) {
- $csslink = qq(\n<link rel="stylesheet" href="$Css" type="text/css" />);
- $csslink =~ s,\\,/,g;
- $csslink =~ s,(/.):,$1|,;
- $bodystyle = '';
- $tdstyle = '';
- }
-
- my $block = $Header ? <<END_OF_BLOCK : '';
-<table border="0" width="100%" cellspacing="0" cellpadding="3">
-<tr><td class="block"$tdstyle valign="middle">
-<big><strong><span class="block"> $Title</span></strong></big>
-</td></tr>
-</table>
-END_OF_BLOCK
-
- print $html <<END_OF_HEAD;
-<?xml version="1.0" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>$Title</title>$csslink
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rev="made" href="mailto:$Config{perladmin}" />
-</head>
-
-<body$bodystyle>
-$block
-END_OF_HEAD
-
- # load/reload/validate/cache %Pages and %Items
- get_cache($Dircache, $Itemcache, \@Podpath, $Podroot, $Recurse);
-
- # scan the pod for =item directives
- scan_items( \%Local_Items, "", @poddata);
-
- # put an index at the top of the file. note, if $Doindex is 0 we
- # still generate an index, but surround it with an html comment.
- # that way some other program can extract it if desired.
- $index =~ s/--+/-/g;
-
- my $hr = ($Doindex and $index) ? qq(<hr name="index" />) : "";
-
- unless ($Doindex)
- {
- $index = qq(<!--\n$index\n-->\n);
- }
-
- print $html <<"END_OF_INDEX";
-
-<!-- INDEX BEGIN -->
-<div name="index">
-<p><a name=\"__index__\"></a></p>
-$index
-$hr
-</div>
-<!-- INDEX END -->
-
-END_OF_INDEX
-
- # now convert this file
- my $after_item; # set to true after an =item
- warn "Converting input file $Podfile\n" if $Verbose;
- foreach my $i (0..$#poddata){
- $_ = $poddata[$i];
- $Paragraph = $i+1;
- if (/^(=.*)/s) { # is it a pod directive?
- $Ignore = 0;
- $after_item = 0;
- $_ = $1;
- if (/^=begin\s+(\S+)\s*(.*)/si) {# =begin
- process_begin($html, $1, $2);
- } elsif (/^=end\s+(\S+)\s*(.*)/si) {# =end
- process_end($1, $2);
- } elsif (/^=cut/) { # =cut
- process_cut();
- } elsif (/^=pod/) { # =pod
- process_pod();
- } else {
- next if @Begin_Stack && $Begin_Stack[-1] ne 'html';
-
- if (/^=(head[1-6])\s+(.*\S)/s) { # =head[1-6] heading
- process_head( $html, $1, $2, $Doindex && $index );
- } elsif (/^=item\s*(.*\S)?/sm) { # =item text
- process_item( $html, $1 );
- $after_item = 1;
- } elsif (/^=over\s*(.*)/) { # =over N
- process_over();
- } elsif (/^=back/) { # =back
- process_back( $html );
- } elsif (/^=for\s+(\S+)\s*(.*)/si) {# =for
- process_for( $html, $1, $2 );
- } else {
- /^=(\S*)\s*/;
- warn "$0: $Podfile: unknown pod directive '$1' in "
- . "paragraph $Paragraph. ignoring.\n" unless $Quiet;
- }
- }
- $Top = 0;
- }
- else {
- next if $Ignore;
- if (@Begin_Stack) {
- print $html $_ if $Begin_Stack[-1] eq 'html';
- next;
- }
- my $text = $_;
-
- # Open tag for definition list as we have something to put in it
- if( $ListNewTerm ){
- print $html "<dd>\n";
- $ListNewTerm = 0;
- }
-
- if( $text =~ /\A\s+/ ){
- process_pre( \$text );
- print $html "<pre>\n$text</pre>\n";
-
- } else {
- process_text( \$text );
-
- # experimental: check for a paragraph where all lines
- # have some ...\t...\t...\n pattern
- if( $text =~ /\t/ ){
- my @lines = split( "\n", $text );
- if( @lines > 1 ){
- my $all = 2;
- foreach my $line ( @lines ){
- if( $line =~ /\S/ && $line !~ /\t/ ){
- $all--;
- last if $all == 0;
- }
- }
- if( $all > 0 ){
- $text =~ s/\t+/<td>/g;
- $text =~ s/^/<tr><td>/gm;
- $text = '<table cellspacing="0" cellpadding="0">' .
- $text . '</table>';
- }
- }
- }
- ## end of experimental
-
- print $html "<p>$text</p>\n";
- }
- $after_item = 0;
- }
- }
-
- # finish off any pending directives
- finish_list( $html );
-
- # link to page index
- print $html "<p><a href=\"#__index__\"><small>$Backlink</small></a></p>\n"
- if $Doindex and $index and $Backlink;
-
- print $html <<END_OF_TAIL;
-$block
-</body>
-
-</html>
-END_OF_TAIL
-
- # close the html file
- close $html or die "Failed to close $Htmlfile: $!";
-
- warn "Finished\n" if $Verbose;
-}
-
-##############################################################################
-
-sub usage {
- my $podfile = shift;
- warn "$0: $podfile: @_\n" if @_;
- die <<END_OF_USAGE;
-Usage: $0 --help --htmlroot=<name> --infile=<name> --outfile=<name>
- --podpath=<name>:...:<name> --podroot=<name>
- --libpods=<name>:...:<name> --recurse --verbose --index
- --netscape --norecurse --noindex --cachedir=<name>
-
- --backlink - set text for "back to top" links (default: none).
- --cachedir - directory for the item and directory cache files.
- --css - stylesheet URL
- --flush - flushes the item and directory caches.
- --[no]header - produce block header/footer (default is no headers).
- --help - prints this message.
- --hiddendirs - search hidden directories in podpath
- --htmldir - directory for resulting HTML files.
- --htmlroot - http-server base directory from which all relative paths
- in podpath stem (default is /).
- --[no]index - generate an index at the top of the resulting html
- (default behaviour).
- --infile - filename for the pod to convert (input taken from stdin
- by default).
- --libpods - colon-separated list of pages to search for =item pod
- directives in as targets of C<> and implicit links (empty
- by default). note, these are not filenames, but rather
- page names like those that appear in L<> links.
- --outfile - filename for the resulting html file (output sent to
- stdout by default).
- --podpath - colon-separated list of directories containing library
- pods (empty by default).
- --podroot - filesystem base directory from which all relative paths
- in podpath stem (default is .).
- --[no]quiet - suppress some benign warning messages (default is off).
- --[no]recurse - recurse on those subdirectories listed in podpath
- (default behaviour).
- --title - title that will appear in resulting html file.
- --[no]verbose - self-explanatory (off by default).
- --[no]netscape - deprecated, has no effect. for backwards compatibility only.
-
-END_OF_USAGE
-
-}
-
-sub parse_command_line {
- my ($opt_backlink,$opt_cachedir,$opt_css,$opt_flush,$opt_header,$opt_help,
- $opt_htmldir,$opt_htmlroot,$opt_index,$opt_infile,$opt_libpods,
- $opt_netscape,$opt_outfile,$opt_podpath,$opt_podroot,$opt_quiet,
- $opt_recurse,$opt_title,$opt_verbose,$opt_hiddendirs);
-
- unshift @ARGV, split ' ', $Config{pod2html} if $Config{pod2html};
- my $result = GetOptions(
- 'backlink=s' => \$opt_backlink,
- 'cachedir=s' => \$opt_cachedir,
- 'css=s' => \$opt_css,
- 'flush' => \$opt_flush,
- 'header!' => \$opt_header,
- 'help' => \$opt_help,
- 'hiddendirs!'=> \$opt_hiddendirs,
- 'htmldir=s' => \$opt_htmldir,
- 'htmlroot=s' => \$opt_htmlroot,
- 'index!' => \$opt_index,
- 'infile=s' => \$opt_infile,
- 'libpods=s' => \$opt_libpods,
- 'netscape!' => \$opt_netscape,
- 'outfile=s' => \$opt_outfile,
- 'podpath=s' => \$opt_podpath,
- 'podroot=s' => \$opt_podroot,
- 'quiet!' => \$opt_quiet,
- 'recurse!' => \$opt_recurse,
- 'title=s' => \$opt_title,
- 'verbose!' => \$opt_verbose,
- );
- usage("-", "invalid parameters") if not $result;
-
- usage("-") if defined $opt_help; # see if the user asked for help
- $opt_help = ""; # just to make -w shut-up.
-
- @Podpath = split(":", $opt_podpath) if defined $opt_podpath;
- @Libpods = split(":", $opt_libpods) if defined $opt_libpods;
-
- $Backlink = $opt_backlink if defined $opt_backlink;
- $Cachedir = $opt_cachedir if defined $opt_cachedir;
- $Css = $opt_css if defined $opt_css;
- $Header = $opt_header if defined $opt_header;
- $Htmldir = $opt_htmldir if defined $opt_htmldir;
- $Htmlroot = $opt_htmlroot if defined $opt_htmlroot;
- $Doindex = $opt_index if defined $opt_index;
- $Podfile = $opt_infile if defined $opt_infile;
- $HiddenDirs = $opt_hiddendirs if defined $opt_hiddendirs;
- $Htmlfile = $opt_outfile if defined $opt_outfile;
- $Podroot = $opt_podroot if defined $opt_podroot;
- $Quiet = $opt_quiet if defined $opt_quiet;
- $Recurse = $opt_recurse if defined $opt_recurse;
- $Title = $opt_title if defined $opt_title;
- $Verbose = $opt_verbose if defined $opt_verbose;
-
- warn "Flushing item and directory caches\n"
- if $opt_verbose && defined $opt_flush;
- $Dircache = "$Cachedir/pod2htmd.tmp";
- $Itemcache = "$Cachedir/pod2htmi.tmp";
- if (defined $opt_flush) {
- 1 while unlink($Dircache, $Itemcache);
- }
-}
-
-
-my $Saved_Cache_Key;
-
-sub get_cache {
- my($dircache, $itemcache, $podpath, $podroot, $recurse) = @_;
- my @cache_key_args = @_;
-
- # A first-level cache:
- # Don't bother reading the cache files if they still apply
- # and haven't changed since we last read them.
-
- my $this_cache_key = cache_key(@cache_key_args);
-
- return if $Saved_Cache_Key and $this_cache_key eq $Saved_Cache_Key;
-
- # load the cache of %Pages and %Items if possible. $tests will be
- # non-zero if successful.
- my $tests = 0;
- if (-f $dircache && -f $itemcache) {
- warn "scanning for item cache\n" if $Verbose;
- $tests = load_cache($dircache, $itemcache, $podpath, $podroot);
- }
-
- # if we didn't succeed in loading the cache then we must (re)build
- # %Pages and %Items.
- if (!$tests) {
- warn "scanning directories in pod-path\n" if $Verbose;
- scan_podpath($podroot, $recurse, 0);
- }
- $Saved_Cache_Key = cache_key(@cache_key_args);
-}
-
-sub cache_key {
- my($dircache, $itemcache, $podpath, $podroot, $recurse) = @_;
- return join('!', $dircache, $itemcache, $recurse,
- @$podpath, $podroot, stat($dircache), stat($itemcache));
-}
-
-#
-# load_cache - tries to find if the caches stored in $dircache and $itemcache
-# are valid caches of %Pages and %Items. if they are valid then it loads
-# them and returns a non-zero value.
-#
-sub load_cache {
- my($dircache, $itemcache, $podpath, $podroot) = @_;
- my($tests);
- local $_;
-
- $tests = 0;
-
- open(CACHE, "<$itemcache") ||
- die "$0: error opening $itemcache for reading: $!\n";
- $/ = "\n";
-
- # is it the same podpath?
- $_ = <CACHE>;
- chomp($_);
- $tests++ if (join(":", @$podpath) eq $_);
-
- # is it the same podroot?
- $_ = <CACHE>;
- chomp($_);
- $tests++ if ($podroot eq $_);
-
- # load the cache if its good
- if ($tests != 2) {
- close(CACHE);
- return 0;
- }
-
- warn "loading item cache\n" if $Verbose;
- while (<CACHE>) {
- /(.*?) (.*)$/;
- $Items{$1} = $2;
- }
- close(CACHE);
-
- warn "scanning for directory cache\n" if $Verbose;
- open(CACHE, "<$dircache") ||
- die "$0: error opening $dircache for reading: $!\n";
- $/ = "\n";
- $tests = 0;
-
- # is it the same podpath?
- $_ = <CACHE>;
- chomp($_);
- $tests++ if (join(":", @$podpath) eq $_);
-
- # is it the same podroot?
- $_ = <CACHE>;
- chomp($_);
- $tests++ if ($podroot eq $_);
-
- # load the cache if its good
- if ($tests != 2) {
- close(CACHE);
- return 0;
- }
-
- warn "loading directory cache\n" if $Verbose;
- while (<CACHE>) {
- /(.*?) (.*)$/;
- $Pages{$1} = $2;
- }
-
- close(CACHE);
-
- return 1;
-}
-
-#
-# scan_podpath - scans the directories specified in @podpath for directories,
-# .pod files, and .pm files. it also scans the pod files specified in
-# @Libpods for =item directives.
-#
-sub scan_podpath {
- my($podroot, $recurse, $append) = @_;
- my($pwd, $dir);
- my($libpod, $dirname, $pod, @files, @poddata);
-
- unless($append) {
- %Items = ();
- %Pages = ();
- }
-
- # scan each directory listed in @Podpath
- $pwd = getcwd();
- chdir($podroot)
- || die "$0: error changing to directory $podroot: $!\n";
- foreach $dir (@Podpath) {
- scan_dir($dir, $recurse);
- }
-
- # scan the pods listed in @Libpods for =item directives
- foreach $libpod (@Libpods) {
- # if the page isn't defined then we won't know where to find it
- # on the system.
- next unless defined $Pages{$libpod} && $Pages{$libpod};
-
- # if there is a directory then use the .pod and .pm files within it.
- # NOTE: Only finds the first so-named directory in the tree.
-# if ($Pages{$libpod} =~ /([^:]*[^(\.pod|\.pm)]):/) {
- if ($Pages{$libpod} =~ /([^:]*(?<!\.pod)(?<!\.pm)):/) {
- # find all the .pod and .pm files within the directory
- $dirname = $1;
- opendir(DIR, $dirname) ||
- die "$0: error opening directory $dirname: $!\n";
- @files = grep(/(\.pod|\.pm)\z/ && ! -d $_, readdir(DIR));
- closedir(DIR);
-
- # scan each .pod and .pm file for =item directives
- foreach $pod (@files) {
- open my $fh, '<', "$dirname/$pod"
- or die "$0: error opening $dirname/$pod for input: $!\n";
- @poddata = <$fh>;
- close $fh;
- clean_data( \@poddata );
-
- scan_items( \%Items, "$dirname/$pod", @poddata);
- }
-
- # use the names of files as =item directives too.
-### Don't think this should be done this way - confuses issues.(WL)
-### foreach $pod (@files) {
-### $pod =~ /^(.*)(\.pod|\.pm)$/;
-### $Items{$1} = "$dirname/$1.html" if $1;
-### }
- } elsif ($Pages{$libpod} =~ /([^:]*\.pod):/ ||
- $Pages{$libpod} =~ /([^:]*\.pm):/) {
- # scan the .pod or .pm file for =item directives
- $pod = $1;
- open my $fh, '<', $pod
- or die "$0: error opening $pod for input: $!\n";
- @poddata = <$fh>;
- close $fh;
- clean_data( \@poddata );
-
- scan_items( \%Items, "$pod", @poddata);
- } else {
- warn "$0: shouldn't be here (line ".__LINE__."\n" unless $Quiet;
- }
- }
- @poddata = (); # clean-up a bit
-
- chdir($pwd)
- || die "$0: error changing to directory $pwd: $!\n";
-
- # cache the item list for later use
- warn "caching items for later use\n" if $Verbose;
- open my $cache, '>', $Itemcache
- or die "$0: error open $Itemcache for writing: $!\n";
-
- print $cache join(":", @Podpath) . "\n$podroot\n";
- foreach my $key (keys %Items) {
- print $cache "$key $Items{$key}\n";
- }
-
- close $cache or die "error closing $Itemcache: $!";
-
- # cache the directory list for later use
- warn "caching directories for later use\n" if $Verbose;
- open $cache, '>', $Dircache
- or die "$0: error open $Dircache for writing: $!\n";
-
- print $cache join(":", @Podpath) . "\n$podroot\n";
- foreach my $key (keys %Pages) {
- print $cache "$key $Pages{$key}\n";
- }
-
- close $cache or die "error closing $Dircache: $!";
-}
-
-#
-# scan_dir - scans the directory specified in $dir for subdirectories, .pod
-# files, and .pm files. notes those that it finds. this information will
-# be used later in order to figure out where the pages specified in L<>
-# links are on the filesystem.
-#
-sub scan_dir {
- my($dir, $recurse) = @_;
- my($t, @subdirs, @pods, $pod, $dirname, @dirs);
- local $_;
-
- @subdirs = ();
- @pods = ();
-
- opendir(DIR, $dir) ||
- die "$0: error opening directory $dir: $!\n";
- while (defined($_ = readdir(DIR))) {
- if (-d "$dir/$_" && $_ ne "." && $_ ne ".."
- && ($HiddenDirs || !/^\./)
- ) { # directory
- $Pages{$_} = "" unless defined $Pages{$_};
- $Pages{$_} .= "$dir/$_:";
- push(@subdirs, $_);
- } elsif (/\.pod\z/) { # .pod
- s/\.pod\z//;
- $Pages{$_} = "" unless defined $Pages{$_};
- $Pages{$_} .= "$dir/$_.pod:";
- push(@pods, "$dir/$_.pod");
- } elsif (/\.html\z/) { # .html
- s/\.html\z//;
- $Pages{$_} = "" unless defined $Pages{$_};
- $Pages{$_} .= "$dir/$_.pod:";
- } elsif (/\.pm\z/) { # .pm
- s/\.pm\z//;
- $Pages{$_} = "" unless defined $Pages{$_};
- $Pages{$_} .= "$dir/$_.pm:";
- push(@pods, "$dir/$_.pm");
- } elsif (-T "$dir/$_") { # script(?)
- local *F;
- if (open(F, "$dir/$_")) {
- my $line;
- while (defined($line = <F>)) {
- if ($line =~ /^=(?:pod|head1)/) {
- $Pages{$_} = "" unless defined $Pages{$_};
- $Pages{$_} .= "$dir/$_.pod:";
- last;
- }
- }
- close(F);
- }
- }
- }
- closedir(DIR);
-
- # recurse on the subdirectories if necessary
- if ($recurse) {
- foreach my $subdir (@subdirs) {
- scan_dir("$dir/$subdir", $recurse);
- }
- }
-}
-
-#
-# scan_headings - scan a pod file for head[1-6] tags, note the tags, and
-# build an index.
-#
-sub scan_headings {
- my($sections, @data) = @_;
- my($tag, $which_head, $otitle, $listdepth, $index);
-
- local $Ignore = 0;
-
- $listdepth = 0;
- $index = "";
-
- # scan for =head directives, note their name, and build an index
- # pointing to each of them.
- foreach my $line (@data) {
- if ($line =~ /^=(head)([1-6])\s+(.*)/) {
- ($tag, $which_head, $otitle) = ($1,$2,$3);
-
- my $title = depod( $otitle );
- my $name = anchorify( $title );
- $$sections{$name} = 1;
- $title = process_text( \$otitle );
-
- while ($which_head != $listdepth) {
- if ($which_head > $listdepth) {
- $index .= "\n" . ("\t" x $listdepth) . "<ul>\n";
- $listdepth++;
- } elsif ($which_head < $listdepth) {
- $listdepth--;
- $index .= "\n" . ("\t" x $listdepth) . "</ul>\n";
- }
- }
-
- $index .= "\n" . ("\t" x $listdepth) . "<li>" .
- "<a href=\"#" . $name . "\">" .
- $title . "</a></li>";
- }
- }
-
- # finish off the lists
- while ($listdepth--) {
- $index .= "\n" . ("\t" x $listdepth) . "</ul>\n";
- }
-
- # get rid of bogus lists
- $index =~ s,\t*<ul>\s*</ul>\n,,g;
-
- return $index;
-}
-
-#
-# scan_items - scans the pod specified by $pod for =item directives. we
-# will use this information later on in resolving C<> links.
-#
-sub scan_items {
- my( $itemref, $pod, @poddata ) = @_;
- my($i, $item);
- local $_;
-
- $pod =~ s/\.pod\z//;
- $pod .= ".html" if $pod;
-
- foreach $i (0..$#poddata) {
- my $txt = depod( $poddata[$i] );
-
- # figure out what kind of item it is.
- # Build string for referencing this item.
- if ( $txt =~ /\A=item\s+\*\s*(.*)\Z/s ) { # bulleted list
- next unless $1;
- $item = $1;
- } elsif( $txt =~ /\A=item\s+(?>\d+\.?)\s*(.*)\Z/s ) { # numbered list
- $item = $1;
- } elsif( $txt =~ /\A=item\s+(.*)\Z/s ) { # definition list
- $item = $1;
- } else {
- next;
- }
- my $fid = fragment_id( $item );
- $$itemref{$fid} = "$pod" if $fid;
- }
-}
-
-#
-# process_head - convert a pod head[1-6] tag and convert it to HTML format.
-#
-sub process_head {
- my($fh, $tag, $heading, $hasindex) = @_;
-
- # figure out the level of the =head
- $tag =~ /head([1-6])/;
- my $level = $1;
-
- finish_list( $fh );
-
- print $fh "<p>\n";
- if( $level == 1 && ! $Top ){
- print $fh "<a href=\"#__index__\"><small>$Backlink</small></a>\n"
- if $hasindex and $Backlink;
- print $fh "</p>\n<hr />\n"
- } else {
- print $fh "</p>\n";
- }
-
- my $name = anchorify( depod( $heading ) );
- my $convert = process_text( \$heading );
- print $fh "<h$level><a name=\"$name\">$convert</a></h$level>\n";
-}
-
-
-#
-# emit_item_tag - print an =item's text
-# Note: The global $EmittedItem is used for inhibiting self-references.
-#
-my $EmittedItem;
-
-sub emit_item_tag {
- my( $fh, $otext, $text, $compact ) = @_;
- my $item = fragment_id( depod($text) , -generate);
- Carp::confess("Undefined fragment '$text' (".depod($text).") from fragment_id() in emit_item_tag() in $Podfile")
- if !defined $item;
- $EmittedItem = $item;
- ### print STDERR "emit_item_tag=$item ($text)\n";
-
- print $fh '<strong>';
- if ($Items_Named{$item}++) {
- print $fh process_text( \$otext );
- } else {
- my $name = $item;
- $name = anchorify($name);
- print $fh qq{<a name="$name" class="item">}, process_text( \$otext ), '</a>';
- }
- print $fh "</strong>";
- undef( $EmittedItem );
-}
-
-sub new_listitem {
- my ($fh, $tag) = @_;
- # Open tag for definition list as we have something to put in it
- if( ($tag ne 'dl') && ($ListNewTerm) ){
- print $fh "<dd>\n";
- $ListNewTerm = 0;
- }
-
- if( $Items_Seen[$Listlevel]++ == 0 ){
- # start of new list
- push( @Listtype, "$tag" );
- print $fh "<$tag>\n";
- } else {
- # if this is not the first item, close the previous one
- if ( $tag eq 'dl' ){
- print $fh "</dd>\n" unless $ListNewTerm;
- } else {
- print $fh "</li>\n";
- }
- }
- my $opentag = $tag eq 'dl' ? 'dt' : 'li';
- print $fh "<$opentag>";
-}
-
-#
-# process_item - convert a pod item tag and convert it to HTML format.
-#
-sub process_item {
- my ($fh, $otext) = @_;
-
- # lots of documents start a list without doing an =over. this is
- # bad! but, the proper thing to do seems to be to just assume
- # they did do an =over. so warn them once and then continue.
- if( $Listlevel == 0 ){
- warn "$0: $Podfile: unexpected =item directive in paragraph $Paragraph. ignoring.\n" unless $Quiet;
- process_over();
- }
-
- # remove formatting instructions from the text
- my $text = depod( $otext );
-
- # all the list variants:
- if( $text =~ /\A\*/ ){ # bullet
- new_listitem( $fh, 'ul' );
- if ($text =~ /\A\*\s+(\S.*)\Z/s ) { # with additional text
- my $tag = $1;
- $otext =~ s/\A\*\s+//;
- emit_item_tag( $fh, $otext, $tag, 1 );
- print $fh "\n";
- }
-
- } elsif( $text =~ /\A\d+/ ){ # numbered list
- new_listitem( $fh, 'ol' );
- if ($text =~ /\A(?>\d+\.?)\s*(\S.*)\Z/s ) { # with additional text
- my $tag = $1;
- $otext =~ s/\A\d+\.?\s*//;
- emit_item_tag( $fh, $otext, $tag, 1 );
- print $fh "\n";
- }
-
- } else { # definition list
- # new_listitem takes care of opening the <dt> tag
- new_listitem( $fh, 'dl' );
- if ($text =~ /\A(.+)\Z/s ){ # should have text
- emit_item_tag( $fh, $otext, $text, 1 );
- # write the definition term and close <dt> tag
- print $fh "</dt>\n";
- }
- # trigger opening a <dd> tag for the actual definition; will not
- # happen if next paragraph is also a definition term (=item)
- $ListNewTerm = 1;
- }
- print $fh "\n";
-}
-
-#
-# process_over - process a pod over tag and start a corresponding HTML list.
-#
-sub process_over {
- # start a new list
- $Listlevel++;
- push( @Items_Seen, 0 );
-}
-
-#
-# process_back - process a pod back tag and convert it to HTML format.
-#
-sub process_back {
- my $fh = shift;
- if( $Listlevel == 0 ){
- warn "$0: $Podfile: unexpected =back directive in paragraph $Paragraph. ignoring.\n" unless $Quiet;
- return;
- }
-
- # close off the list. note, I check to see if $Listtype[$Listlevel] is
- # defined because an =item directive may have never appeared and thus
- # $Listtype[$Listlevel] may have never been initialized.
- $Listlevel--;
- if( defined $Listtype[$Listlevel] ){
- if ( $Listtype[$Listlevel] eq 'dl' ){
- print $fh "</dd>\n" unless $ListNewTerm;
- } else {
- print $fh "</li>\n";
- }
- print $fh "</$Listtype[$Listlevel]>\n";
- pop( @Listtype );
- $ListNewTerm = 0;
- }
-
- # clean up item count
- pop( @Items_Seen );
-}
-
-#
-# process_cut - process a pod cut tag, thus start ignoring pod directives.
-#
-sub process_cut {
- $Ignore = 1;
-}
-
-#
-# process_pod - process a pod tag, thus stop ignoring pod directives
-# until we see a corresponding cut.
-#
-sub process_pod {
- # no need to set $Ignore to 0 cause the main loop did it
-}
-
-#
-# process_for - process a =for pod tag. if it's for html, spit
-# it out verbatim, if illustration, center it, otherwise ignore it.
-#
-sub process_for {
- my ($fh, $whom, $text) = @_;
- if ( $whom =~ /^(pod2)?html$/i) {
- print $fh $text;
- } elsif ($whom =~ /^illustration$/i) {
- 1 while chomp $text;
- for my $ext (qw[.png .gif .jpeg .jpg .tga .pcl .bmp]) {
- $text .= $ext, last if -r "$text$ext";
- }
- print $fh qq{<p align="center"><img src="$text" alt="$text illustration" /></p>};
- }
-}
-
-#
-# process_begin - process a =begin pod tag. this pushes
-# whom we're beginning on the begin stack. if there's a
-# begin stack, we only print if it us.
-#
-sub process_begin {
- my ($fh, $whom, $text) = @_;
- $whom = lc($whom);
- push (@Begin_Stack, $whom);
- if ( $whom =~ /^(pod2)?html$/) {
- print $fh $text if $text;
- }
-}
-
-#
-# process_end - process a =end pod tag. pop the
-# begin stack. die if we're mismatched.
-#
-sub process_end {
- my($whom, $text) = @_;
- $whom = lc($whom);
- if (!defined $Begin_Stack[-1] or $Begin_Stack[-1] ne $whom ) {
- Carp::confess("Unmatched begin/end at chunk $Paragraph in pod $Podfile\n")
- }
- pop( @Begin_Stack );
-}
-
-#
-# process_pre - indented paragraph, made into <pre></pre>
-#
-sub process_pre {
- my( $text ) = @_;
- my( $rest );
- return if $Ignore;
-
- $rest = $$text;
-
- # insert spaces in place of tabs
- $rest =~ s#(.+)#
- my $line = $1;
- 1 while $line =~ s/(\t+)/' ' x ((length($1) * 8) - $-[0] % 8)/e;
- $line;
- #eg;
-
- # convert some special chars to HTML escapes
- $rest = html_escape($rest);
-
- # try and create links for all occurrences of perl.* within
- # the preformatted text.
- $rest =~ s{
- (\s*)(perl\w+)
- }{
- if ( defined $Pages{$2} ){ # is a link
- qq($1<a href="$Htmlroot/$Pages{$2}">$2</a>);
- } elsif (defined $Pages{dosify($2)}) { # is a link
- qq($1<a href="$Htmlroot/$Pages{dosify($2)}">$2</a>);
- } else {
- "$1$2";
- }
- }xeg;
- $rest =~ s{
- (<a\ href="?) ([^>:]*:)? ([^>:]*) \.pod: ([^>:]*:)?
- }{
- my $url ;
- if ( $Htmlfileurl ne '' ){
- # Here, we take advantage of the knowledge
- # that $Htmlfileurl ne '' implies $Htmlroot eq ''.
- # Since $Htmlroot eq '', we need to prepend $Htmldir
- # on the fron of the link to get the absolute path
- # of the link's target. We check for a leading '/'
- # to avoid corrupting links that are #, file:, etc.
- my $old_url = $3 ;
- $old_url = "$Htmldir$old_url" if $old_url =~ m{^\/};
- $url = relativize_url( "$old_url.html", $Htmlfileurl );
- } else {
- $url = "$3.html" ;
- }
- "$1$url" ;
- }xeg;
-
- # Look for embedded URLs and make them into links. We don't
- # relativize them since they are best left as the author intended.
-
- my $urls = '(' . join ('|', qw{
- http
- telnet
- mailto
- news
- gopher
- file
- wais
- ftp
- } )
- . ')';
-
- my $ltrs = '\w';
- my $gunk = '/#~:.?+=&%@!\-';
- my $punc = '.:!?\-;';
- my $any = "${ltrs}${gunk}${punc}";
-
- $rest =~ s{
- \b # start at word boundary
- ( # begin $1 {
- $urls : # need resource and a colon
- (?!:) # Ignore File::, among others.
- [$any] +? # followed by one or more of any valid
- # character, but be conservative and
- # take only what you need to....
- ) # end $1 }
- (?=
- " > # maybe pre-quoted '<a href="...">'
- | # or:
- [$punc]* # 0 or more punctuation
- (?: # followed
- [^$any] # by a non-url char
- | # or
- $ # end of the string
- ) #
- | # or else
- $ # then end of the string
- )
- }{<a href="$1">$1</a>}igox;
-
- # text should be as it is (verbatim)
- $$text = $rest;
-}
-
-
-#
-# pure text processing
-#
-# pure_text/inIS_text: differ with respect to automatic C<> recognition.
-# we don't want this to happen within IS
-#
-sub pure_text($){
- my $text = shift();
- process_puretext( $text, 1 );
-}
-
-sub inIS_text($){
- my $text = shift();
- process_puretext( $text, 0 );
-}
-
-#
-# process_puretext - process pure text (without pod-escapes) converting
-# double-quotes and handling implicit C<> links.
-#
-sub process_puretext {
- my($text, $notinIS) = @_;
-
- ## Guessing at func() or [\$\@%&]*var references in plain text is destined
- ## to produce some strange looking ref's. uncomment to disable:
- ## $notinIS = 0;
-
- my(@words, $lead, $trail);
-
- # keep track of leading and trailing white-space
- $lead = ($text =~ s/\A(\s+)//s ? $1 : "");
- $trail = ($text =~ s/(\s+)\Z//s ? $1 : "");
-
- # split at space/non-space boundaries
- @words = split( /(?<=\s)(?=\S)|(?<=\S)(?=\s)/, $text );
-
- # process each word individually
- foreach my $word (@words) {
- # skip space runs
- next if $word =~ /^\s*$/;
- # see if we can infer a link or a function call
- #
- # NOTE: This is a word based search, it won't automatically
- # mark "substr($var, 1, 2)" because the 1st word would be "substr($var"
- # User has to enclose those with proper C<>
-
- if( $notinIS && $word =~
- m/
- ^([a-z_]{2,}) # The function name
- \(
- ([0-9][a-z]* # Manual page(1) or page(1M)
- |[^)]*[\$\@\%][^)]+ # ($foo), (1, @foo), (%hash)
- | # ()
- )
- \)
- ([.,;]?)$ # a possible punctuation follows
- /xi
- ) {
- # has parenthesis so should have been a C<> ref
- ## try for a pagename (perlXXX(1))?
- my( $func, $args, $rest ) = ( $1, $2, $3 || '' );
- if( $args =~ /^\d+$/ ){
- my $url = page_sect( $word, '' );
- if( defined $url ){
- $word = qq(<a href="$url" class="man">the $word manpage</a>$rest);
- next;
- }
- }
- ## try function name for a link, append tt'ed argument list
- $word = emit_C( $func, '', "($args)") . $rest;
-
-#### disabled. either all (including $\W, $\w+{.*} etc.) or nothing.
-## } elsif( $notinIS && $word =~ /^[\$\@%&*]+\w+$/) {
-## # perl variables, should be a C<> ref
-## $word = emit_C( $word );
-
- } elsif ($word =~ m,^\w+://\w,) {
- # looks like a URL
- # Don't relativize it: leave it as the author intended
- $word = qq(<a href="$word">$word</a>);
- } elsif ($word =~ /[\w.-]+\@[\w-]+\.\w/) {
- # looks like an e-mail address
- my ($w1, $w2, $w3) = ("", $word, "");
- ($w1, $w2, $w3) = ("(", $1, ")$2") if $word =~ /^\((.*?)\)(,?)/;
- ($w1, $w2, $w3) = ("<", $1, ">$2") if $word =~ /^<(.*?)>(,?)/;
- $word = qq($w1<a href="mailto:$w2">$w2</a>$w3);
- } else {
- $word = html_escape($word) if $word =~ /["&<>]/;
- }
- }
-
- # put everything back together
- return $lead . join( '', @words ) . $trail;
-}
-
-
-#
-# process_text - handles plaintext that appears in the input pod file.
-# there may be pod commands embedded within the text so those must be
-# converted to html commands.
-#
-
-sub process_text1($$;$$);
-sub pattern ($) { $_[0] ? '\s+'.('>' x ($_[0] + 1)) : '>' }
-sub closing ($) { local($_) = shift; (defined && s/\s+\z//) ? length : 0 }
-
-sub process_text {
- return if $Ignore;
- my( $tref ) = @_;
- my $res = process_text1( 0, $tref );
- $res =~ s/\s+$//s;
- $$tref = $res;
-}
-
-sub process_text_rfc_links {
- my $text = shift;
-
- # For every "RFCnnnn" or "RFC nnn", link it to the authoritative
- # ource. Do not use the /i modifier here. Require "RFC" to be written in
- # in capital letters.
-
- $text =~ s{
- (?<=[^<>[:alpha:]]) # Make sure this is not an URL already
- (RFC\s*([0-9]{1,5}))(?![0-9]) # max 5 digits
- }
- {<a href="http://www.ietf.org/rfc/rfc$2.txt" class="rfc">$1</a>}gx;
-
- $text;
-}
-
-sub process_text1($$;$$){
- my( $lev, $rstr, $func, $closing ) = @_;
- my $res = '';
-
- unless (defined $func) {
- $func = '';
- $lev++;
- }
-
- if( $func eq 'B' ){
- # B<text> - boldface
- $res = '<strong>' . process_text1( $lev, $rstr ) . '</strong>';
-
- } elsif( $func eq 'C' ){
- # C<code> - can be a ref or <code></code>
- # need to extract text
- my $par = go_ahead( $rstr, 'C', $closing );
-
- ## clean-up of the link target
- my $text = depod( $par );
-
- ### my $x = $par =~ /[BI]</ ? 'yes' : 'no' ;
- ### print STDERR "-->call emit_C($par) lev=$lev, par with BI=$x\n";
-
- $res = emit_C( $text, $lev > 1 || ($par =~ /[BI]</) );
-
- } elsif( $func eq 'E' ){
- # E<x> - convert to character
- $$rstr =~ s/^([^>]*)>//;
- my $escape = $1;
- $escape =~ s/^0?x([\dA-F]+)$/#x$1/i
- or $escape =~ s/^0([0-7]+)$/'#'.oct($1)/ei
- or $escape =~ s/^(\d+)$/#$1/;
- $res = "&$escape;";
-
- } elsif( $func eq 'F' ){
- # F<filename> - italicize
- $res = '<em class="file">' . process_text1( $lev, $rstr ) . '</em>';
-
- } elsif( $func eq 'I' ){
- # I<text> - italicize
- $res = '<em>' . process_text1( $lev, $rstr ) . '</em>';
-
- } elsif( $func eq 'L' ){
- # L<link> - link
- ## L<text|cross-ref> => produce text, use cross-ref for linking
- ## L<cross-ref> => make text from cross-ref
- ## need to extract text
- my $par = go_ahead( $rstr, 'L', $closing );
-
- # some L<>'s that shouldn't be:
- # a) full-blown URL's are emitted as-is
- if( $par =~ m{^\w+://}s ){
- return make_URL_href( $par );
- }
- # b) C<...> is stripped and treated as C<>
- if( $par =~ /^C<(.*)>$/ ){
- my $text = depod( $1 );
- return emit_C( $text, $lev > 1 || ($par =~ /[BI]</) );
- }
-
- # analyze the contents
- $par =~ s/\n/ /g; # undo word-wrapped tags
- my $opar = $par;
- my $linktext;
- if( $par =~ s{^([^|]+)\|}{} ){
- $linktext = $1;
- }
-
- # make sure sections start with a /
- $par =~ s{^"}{/"};
-
- my( $page, $section, $ident );
-
- # check for link patterns
- if( $par =~ m{^([^/]+?)/(?!")(.*?)$} ){ # name/ident
- # we've got a name/ident (no quotes)
- if (length $2) {
- ( $page, $ident ) = ( $1, $2 );
- } else {
- ( $page, $section ) = ( $1, $2 );
- }
- ### print STDERR "--> L<$par> to page $page, ident $ident\n";
-
- } elsif( $par =~ m{^(.*?)/"?(.*?)"?$} ){ # [name]/"section"
- # even though this should be a "section", we go for ident first
- ( $page, $ident ) = ( $1, $2 );
- ### print STDERR "--> L<$par> to page $page, section $section\n";
-
- } elsif( $par =~ /\s/ ){ # this must be a section with missing quotes
- ( $page, $section ) = ( '', $par );
- ### print STDERR "--> L<$par> to void page, section $section\n";
-
- } else {
- ( $page, $section ) = ( $par, '' );
- ### print STDERR "--> L<$par> to page $par, void section\n";
- }
-
- # now, either $section or $ident is defined. the convoluted logic
- # below tries to resolve L<> according to what the user specified.
- # failing this, we try to find the next best thing...
- my( $url, $ltext, $fid );
-
- RESOLVE: {
- if( defined $ident ){
- ## try to resolve $ident as an item
- ( $url, $fid ) = coderef( $page, $ident );
- if( $url ){
- if( ! defined( $linktext ) ){
- $linktext = $ident;
- $linktext .= " in " if $ident && $page;
- $linktext .= "the $page manpage" if $page;
- }
- ### print STDERR "got coderef url=$url\n";
- last RESOLVE;
- }
- ## no luck: go for a section (auto-quoting!)
- $section = $ident;
- }
- ## now go for a section
- my $htmlsection = htmlify( $section );
- $url = page_sect( $page, $htmlsection );
- if( $url ){
- if( ! defined( $linktext ) ){
- $linktext = $section;
- $linktext .= " in " if $section && $page;
- $linktext .= "the $page manpage" if $page;
- }
- ### print STDERR "got page/section url=$url\n";
- last RESOLVE;
- }
- ## no luck: go for an ident
- if( $section ){
- $ident = $section;
- } else {
- $ident = $page;
- $page = undef();
- }
- ( $url, $fid ) = coderef( $page, $ident );
- if( $url ){
- if( ! defined( $linktext ) ){
- $linktext = $ident;
- $linktext .= " in " if $ident && $page;
- $linktext .= "the $page manpage" if $page;
- }
- ### print STDERR "got section=>coderef url=$url\n";
- last RESOLVE;
- }
-
- # warning; show some text.
- $linktext = $opar unless defined $linktext;
- warn "$0: $Podfile: cannot resolve L<$opar> in paragraph $Paragraph.\n" unless $Quiet;
- }
-
- # now we have a URL or just plain code
- $$rstr = $linktext . '>' . $$rstr;
- if( defined( $url ) ){
- $res = "<a href=\"$url\">" . process_text1( $lev, $rstr ) . '</a>';
- } else {
- $res = '<em>' . process_text1( $lev, $rstr ) . '</em>';
- }
-
- } elsif( $func eq 'S' ){
- # S<text> - non-breaking spaces
- $res = process_text1( $lev, $rstr );
- $res =~ s/ / /g;
-
- } elsif( $func eq 'X' ){
- # X<> - ignore
- warn "$0: $Podfile: invalid X<> in paragraph $Paragraph.\n"
- unless $$rstr =~ s/^[^>]*>// or $Quiet;
- } elsif( $func eq 'Z' ){
- # Z<> - empty
- warn "$0: $Podfile: invalid Z<> in paragraph $Paragraph.\n"
- unless $$rstr =~ s/^>// or $Quiet;
-
- } else {
- my $term = pattern $closing;
- while( $$rstr =~ s/\A(.*?)(([BCEFILSXZ])<(<+[^\S\n]+)?|$term)//s ){
- # all others: either recurse into new function or
- # terminate at closing angle bracket(s)
- my $pt = $1;
- $pt .= $2 if !$3 && $lev == 1;
- $res .= $lev == 1 ? pure_text( $pt ) : inIS_text( $pt );
- return $res if !$3 && $lev > 1;
- if( $3 ){
- $res .= process_text1( $lev, $rstr, $3, closing $4 );
- }
- }
- if( $lev == 1 ){
- $res .= pure_text( $$rstr );
- } elsif( ! $Quiet ) {
- my $snippet = substr($$rstr,0,60);
- warn "$0: $Podfile: undelimited $func<> in paragraph $Paragraph: '$snippet'.\n"
-
- }
- $res = process_text_rfc_links($res);
- }
- return $res;
-}
-
-#
-# go_ahead: extract text of an IS (can be nested)
-#
-sub go_ahead($$$){
- my( $rstr, $func, $closing ) = @_;
- my $res = '';
- my @closing = ($closing);
- while( $$rstr =~
- s/\A(.*?)(([BCEFILSXZ])<(<+\s+)?|@{[pattern $closing[0]]})//s ){
- $res .= $1;
- unless( $3 ){
- shift @closing;
- return $res unless @closing;
- } else {
- unshift @closing, closing $4;
- }
- $res .= $2;
- }
- unless ($Quiet) {
- my $snippet = substr($$rstr,0,60);
- warn "$0: $Podfile: undelimited $func<> in paragraph $Paragraph (go_ahead): '$snippet'.\n"
- }
- return $res;
-}
-
-#
-# emit_C - output result of C<text>
-# $text is the depod-ed text
-#
-sub emit_C($;$$){
- my( $text, $nocode, $args ) = @_;
- $args = '' unless defined $args;
- my $res;
- my( $url, $fid ) = coderef( undef(), $text );
-
- # need HTML-safe text
- my $linktext = html_escape( "$text$args" );
-
- if( defined( $url ) &&
- (!defined( $EmittedItem ) || $EmittedItem ne $fid ) ){
- $res = "<a href=\"$url\"><code>$linktext</code></a>";
- } elsif( 0 && $nocode ){
- $res = $linktext;
- } else {
- $res = "<code>$linktext</code>";
- }
- return $res;
-}
-
-#
-# html_escape: make text safe for HTML
-#
-sub html_escape {
- my $rest = $_[0];
- $rest =~ s/&/&/g;
- $rest =~ s/</</g;
- $rest =~ s/>/>/g;
- $rest =~ s/"/"/g;
- # ' is only in XHTML, not HTML4. Be conservative
- #$rest =~ s/'/'/g;
- return $rest;
-}
-
-
-#
-# dosify - convert filenames to 8.3
-#
-sub dosify {
- my($str) = @_;
- return lc($str) if $^O eq 'VMS'; # VMS just needs casing
- if ($Is83) {
- $str = lc $str;
- $str =~ s/(\.\w+)/substr ($1,0,4)/ge;
- $str =~ s/(\w+)/substr ($1,0,8)/ge;
- }
- return $str;
-}
-
-#
-# page_sect - make a URL from the text of a L<>
-#
-sub page_sect($$) {
- my( $page, $section ) = @_;
- my( $linktext, $page83, $link); # work strings
-
- # check if we know that this is a section in this page
- if (!defined $Pages{$page} && defined $Sections{$page}) {
- $section = $page;
- $page = "";
- ### print STDERR "reset page='', section=$section\n";
- }
-
- $page83=dosify($page);
- $page=$page83 if (defined $Pages{$page83});
- if ($page eq "") {
- $link = "#" . anchorify( $section );
- } elsif ( $page =~ /::/ ) {
- $page =~ s,::,/,g;
- # Search page cache for an entry keyed under the html page name,
- # then look to see what directory that page might be in. NOTE:
- # this will only find one page. A better solution might be to produce
- # an intermediate page that is an index to all such pages.
- my $page_name = $page ;
- $page_name =~ s,^.*/,,s ;
- if ( defined( $Pages{ $page_name } ) &&
- $Pages{ $page_name } =~ /([^:]*$page)\.(?:pod|pm):/
- ) {
- $page = $1 ;
- }
- else {
- # NOTE: This branch assumes that all A::B pages are located in
- # $Htmlroot/A/B.html . This is often incorrect, since they are
- # often in $Htmlroot/lib/A/B.html or such like. Perhaps we could
- # analyze the contents of %Pages and figure out where any
- # cousins of A::B are, then assume that. So, if A::B isn't found,
- # but A::C is found in lib/A/C.pm, then A::B is assumed to be in
- # lib/A/B.pm. This is also limited, but it's an improvement.
- # Maybe a hints file so that the links point to the correct places
- # nonetheless?
-
- }
- $link = "$Htmlroot/$page.html";
- $link .= "#" . anchorify( $section ) if ($section);
- } elsif (!defined $Pages{$page}) {
- $link = "";
- } else {
- $section = anchorify( $section ) if $section ne "";
- ### print STDERR "...section=$section\n";
-
- # if there is a directory by the name of the page, then assume that an
- # appropriate section will exist in the subdirectory
-# if ($section ne "" && $Pages{$page} =~ /([^:]*[^(\.pod|\.pm)]):/) {
- if ($section ne "" && $Pages{$page} =~ /([^:]*(?<!\.pod)(?<!\.pm)):/) {
- $link = "$Htmlroot/$1/$section.html";
- ### print STDERR "...link=$link\n";
-
- # since there is no directory by the name of the page, the section will
- # have to exist within a .html of the same name. thus, make sure there
- # is a .pod or .pm that might become that .html
- } else {
- $section = "#$section" if $section;
- ### print STDERR "...section=$section\n";
-
- # check if there is a .pod with the page name.
- # for L<Foo>, Foo.(pod|pm) is preferred to A/Foo.(pod|pm)
- if ($Pages{$page} =~ /([^:]*)\.(?:pod|pm):/) {
- $link = "$Htmlroot/$1.html$section";
- } else {
- $link = "";
- }
- }
- }
-
- if ($link) {
- # Here, we take advantage of the knowledge that $Htmlfileurl ne ''
- # implies $Htmlroot eq ''. This means that the link in question
- # needs a prefix of $Htmldir if it begins with '/'. The test for
- # the initial '/' is done to avoid '#'-only links, and to allow
- # for other kinds of links, like file:, ftp:, etc.
- my $url ;
- if ( $Htmlfileurl ne '' ) {
- $link = "$Htmldir$link" if $link =~ m{^/}s;
- $url = relativize_url( $link, $Htmlfileurl );
-# print( " b: [$link,$Htmlfileurl,$url]\n" );
- }
- else {
- $url = $link ;
- }
- return $url;
-
- } else {
- return undef();
- }
-}
-
-#
-# relativize_url - convert an absolute URL to one relative to a base URL.
-# Assumes both end in a filename.
-#
-sub relativize_url {
- my ($dest,$source) = @_ ;
-
- my ($dest_volume,$dest_directory,$dest_file) =
- File::Spec::Unix->splitpath( $dest ) ;
- $dest = File::Spec::Unix->catpath( $dest_volume, $dest_directory, '' ) ;
-
- my ($source_volume,$source_directory,$source_file) =
- File::Spec::Unix->splitpath( $source ) ;
- $source = File::Spec::Unix->catpath( $source_volume, $source_directory, '' ) ;
-
- my $rel_path = '' ;
- if ( $dest ne '' ) {
- $rel_path = File::Spec::Unix->abs2rel( $dest, $source ) ;
- }
-
- if ( $rel_path ne '' &&
- substr( $rel_path, -1 ) ne '/' &&
- substr( $dest_file, 0, 1 ) ne '#'
- ) {
- $rel_path .= "/$dest_file" ;
- }
- else {
- $rel_path .= "$dest_file" ;
- }
-
- return $rel_path ;
-}
-
-
-#
-# coderef - make URL from the text of a C<>
-#
-sub coderef($$){
- my( $page, $item ) = @_;
- my( $url );
-
- my $fid = fragment_id( $item );
-
- if( defined( $page ) && $page ne "" ){
- # we have been given a $page...
- $page =~ s{::}{/}g;
-
- Carp::confess("Undefined fragment '$item' from fragment_id() in coderef() in $Podfile")
- if !defined $fid;
- # Do we take it? Item could be a section!
- my $base = $Items{$fid} || "";
- $base =~ s{[^/]*/}{};
- if( $base ne "$page.html" ){
- ### print STDERR "coderef( $page, $item ): items{$fid} = $Items{$fid} = $base => discard page!\n";
- $page = undef();
- }
-
- } else {
- # no page - local items precede cached items
- if( defined( $fid ) ){
- if( exists $Local_Items{$fid} ){
- $page = $Local_Items{$fid};
- } else {
- $page = $Items{$fid};
- }
- }
- }
-
- # if there was a pod file that we found earlier with an appropriate
- # =item directive, then create a link to that page.
- if( defined $page ){
- if( $page ){
- if( exists $Pages{$page} and $Pages{$page} =~ /([^:.]*)\.[^:]*:/){
- $page = $1 . '.html';
- }
- my $link = "$Htmlroot/$page#" . anchorify($fid);
-
- # Here, we take advantage of the knowledge that $Htmlfileurl
- # ne '' implies $Htmlroot eq ''.
- if ( $Htmlfileurl ne '' ) {
- $link = "$Htmldir$link" ;
- $url = relativize_url( $link, $Htmlfileurl ) ;
- } else {
- $url = $link ;
- }
- } else {
- $url = "#" . anchorify($fid);
- }
-
- confess "url has space: $url" if $url =~ /"[^"]*\s[^"]*"/;
- }
- return( $url, $fid );
-}
-
-
-
-#
-# Adapted from Nick Ing-Simmons' PodToHtml package.
-sub relative_url {
- my $source_file = shift ;
- my $destination_file = shift;
-
- my $source = URI::file->new_abs($source_file);
- my $uo = URI::file->new($destination_file,$source)->abs;
- return $uo->rel->as_string;
-}
-
-
-#
-# finish_list - finish off any pending HTML lists. this should be called
-# after the entire pod file has been read and converted.
-#
-sub finish_list {
- my $fh = shift;
- if( $Listlevel ){
- warn "$0: $Podfile: unterminated list(s) at =head in paragraph $Paragraph. ignoring.\n" unless $Quiet;
- while( $Listlevel ){
- process_back( $fh );
- }
- }
-}
-
-#
-# htmlify - converts a pod section specification to a suitable section
-# specification for HTML. Note that we keep spaces and special characters
-# except ", ? (Netscape problem) and the hyphen (writer's problem...).
-#
-sub htmlify {
- my( $heading) = @_;
- $heading =~ s/(\s+)/ /g;
- $heading =~ s/\s+\Z//;
- $heading =~ s/\A\s+//;
- # The hyphen is a disgrace to the English language.
- # $heading =~ s/[-"?]//g;
- $heading =~ s/["?]//g;
- $heading = lc( $heading );
- return $heading;
-}
-
-#
-# similar to htmlify, but turns non-alphanumerics into underscores
-#
-sub anchorify {
- my ($anchor) = @_;
- $anchor = htmlify($anchor);
- $anchor =~ s/\W/_/g;
- return $anchor;
-}
-
-#
-# depod - convert text by eliminating all interior sequences
-# Note: can be called with copy or modify semantics
-#
-my %E2c;
-$E2c{lt} = '<';
-$E2c{gt} = '>';
-$E2c{sol} = '/';
-$E2c{verbar} = '|';
-$E2c{amp} = '&'; # in Tk's pods
-
-sub depod1($;$$);
-
-sub depod($){
- my $string;
- if( ref( $_[0] ) ){
- $string = ${$_[0]};
- ${$_[0]} = depod1( \$string );
- } else {
- $string = $_[0];
- depod1( \$string );
- }
-}
-
-sub depod1($;$$){
- my( $rstr, $func, $closing ) = @_;
- my $res = '';
- return $res unless defined $$rstr;
- if( ! defined( $func ) ){
- # skip to next begin of an interior sequence
- while( $$rstr =~ s/\A(.*?)([BCEFILSXZ])<(<+[^\S\n]+)?//s ){
- # recurse into its text
- $res .= $1 . depod1( $rstr, $2, closing $3);
- }
- $res .= $$rstr;
- } elsif( $func eq 'E' ){
- # E<x> - convert to character
- $$rstr =~ s/^([^>]*)>//;
- $res .= $E2c{$1} || "";
- } elsif( $func eq 'X' ){
- # X<> - ignore
- $$rstr =~ s/^[^>]*>//;
- } elsif( $func eq 'Z' ){
- # Z<> - empty
- $$rstr =~ s/^>//;
- } else {
- # all others: either recurse into new function or
- # terminate at closing angle bracket
- my $term = pattern $closing;
- while( $$rstr =~ s/\A(.*?)(([BCEFILSXZ])<(<+[^\S\n]+)?|$term)//s ){
- $res .= $1;
- last unless $3;
- $res .= depod1( $rstr, $3, closing $4 );
- }
- ## If we're here and $2 ne '>': undelimited interior sequence.
- ## Ignored, as this is called without proper indication of where we are.
- ## Rely on process_text to produce diagnostics.
- }
- return $res;
-}
-
-{
- my %seen; # static fragment record hash
-
-sub fragment_id_readable {
- my $text = shift;
- my $generate = shift; # optional flag
-
- my $orig = $text;
-
- # leave the words for the fragment identifier,
- # change everything else to underbars.
- $text =~ s/[^A-Za-z0-9_]+/_/g; # do not use \W to avoid locale dependency.
- $text =~ s/_{2,}/_/g;
- $text =~ s/\A_//;
- $text =~ s/_\Z//;
-
- unless ($text)
- {
- # Nothing left after removing punctuation, so leave it as is
- # E.g. if option is named: "=item -#"
-
- $text = $orig;
- }
-
- if ($generate) {
- if ( exists $seen{$text} ) {
- # This already exists, make it unique
- $seen{$text}++;
- $text = $text . $seen{$text};
- } else {
- $seen{$text} = 1; # first time seen this fragment
- }
- }
-
- $text;
-}}
-
-my @HC;
-sub fragment_id_obfuscated { # This was the old "_2d_2d__"
- my $text = shift;
- my $generate = shift; # optional flag
-
- # text? Normalize by obfuscating the fragment id to make it unique
- $text =~ s/\s+/_/sg;
-
- $text =~ s{(\W)}{
- defined( $HC[ord($1)] ) ? $HC[ord($1)]
- : ( $HC[ord($1)] = sprintf( "%%%02X", ord($1) ) ) }gxe;
- $text = substr( $text, 0, 50 );
-
- $text;
-}
-
-#
-# fragment_id - construct a fragment identifier from:
-# a) =item text
-# b) contents of C<...>
-#
-
-sub fragment_id {
- my $text = shift;
- my $generate = shift; # optional flag
-
- $text =~ s/\s+\Z//s;
- if( $text ){
- # a method or function?
- return $1 if $text =~ /(\w+)\s*\(/;
- return $1 if $text =~ /->\s*(\w+)\s*\(?/;
-
- # a variable name?
- return $1 if $text =~ /^([\$\@%*]\S+)/;
-
- # some pattern matching operator?
- return $1 if $text =~ m|^(\w+/).*/\w*$|;
-
- # fancy stuff... like "do { }"
- return $1 if $text =~ m|^(\w+)\s*{.*}$|;
-
- # honour the perlfunc manpage: func [PAR[,[ ]PAR]...]
- # and some funnies with ... Module ...
- return $1 if $text =~ m{^([a-z\d_]+)(\s+[A-Z,/& ][A-Z\d,/& ]*)?$};
- return $1 if $text =~ m{^([a-z\d]+)\s+Module(\s+[A-Z\d,/& ]+)?$};
-
- return fragment_id_readable($text, $generate);
- } else {
- return;
- }
-}
-
-#
-# make_URL_href - generate HTML href from URL
-# Special treatment for CGI queries.
-#
-sub make_URL_href($){
- my( $url ) = @_;
- if( $url !~
- s{^(http:[-\w/#~:.+=&%@!]+)(\?.*)$}{<a href="$1$2">$1</a>}i ){
- $url = "<a href=\"$url\">$url</a>";
- }
- return $url;
-}
-
-1;
Deleted: vendor/perl/dist/ext/Pod-Html/pod2html.PL
===================================================================
--- vendor/perl/dist/ext/Pod-Html/pod2html.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/Pod-Html/pod2html.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,183 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
-chdir dirname($0);
-$file = basename($0, '.PL');
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{startperl}
- eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
-!GROK!THIS!
-
-# In the following, perl variables are not expanded during extraction.
-
-print OUT <<'!NO!SUBS!';
-=pod
-
-=head1 NAME
-
-pod2html - convert .pod files to .html files
-
-=head1 SYNOPSIS
-
- pod2html --help --htmlroot=<name> --infile=<name> --outfile=<name>
- --podpath=<name>:...:<name> --podroot=<name>
- --libpods=<name>:...:<name> --recurse --norecurse --verbose
- --index --noindex --title=<name>
-
-=head1 DESCRIPTION
-
-Converts files from pod format (see L<perlpod>) to HTML format.
-
-=head1 ARGUMENTS
-
-pod2html takes the following arguments:
-
-=over 4
-
-=item help
-
- --help
-
-Displays the usage message.
-
-=item htmlroot
-
- --htmlroot=name
-
-Sets the base URL for the HTML files. When cross-references are made,
-the HTML root is prepended to the URL.
-
-=item infile
-
- --infile=name
-
-Specify the pod file to convert. Input is taken from STDIN if no
-infile is specified.
-
-=item outfile
-
- --outfile=name
-
-Specify the HTML file to create. Output goes to STDOUT if no outfile
-is specified.
-
-=item podroot
-
- --podroot=name
-
-Specify the base directory for finding library pods.
-
-=item podpath
-
- --podpath=name:...:name
-
-Specify which subdirectories of the podroot contain pod files whose
-HTML converted forms can be linked-to in cross-references.
-
-=item libpods
-
- --libpods=name:...:name
-
-List of page names (eg, "perlfunc") which contain linkable C<=item>s.
-
-=item netscape
-
- --netscape
-
-Use Netscape HTML directives when applicable.
-
-=item nonetscape
-
- --nonetscape
-
-Do not use Netscape HTML directives (default).
-
-=item index
-
- --index
-
-Generate an index at the top of the HTML file (default behaviour).
-
-=item noindex
-
- --noindex
-
-Do not generate an index at the top of the HTML file.
-
-
-=item recurse
-
- --recurse
-
-Recurse into subdirectories specified in podpath (default behaviour).
-
-=item norecurse
-
- --norecurse
-
-Do not recurse into subdirectories specified in podpath.
-
-=item title
-
- --title=title
-
-Specify the title of the resulting HTML file.
-
-=item verbose
-
- --verbose
-
-Display progress messages.
-
-=back
-
-=head1 AUTHOR
-
-Tom Christiansen, E<lt>tchrist at perl.comE<gt>.
-
-=head1 BUGS
-
-See L<Pod::Html> for a list of known bugs in the translator.
-
-=head1 SEE ALSO
-
-L<perlpod>, L<Pod::Html>
-
-=head1 COPYRIGHT
-
-This program is distributed under the Artistic License.
-
-=cut
-
-use Pod::Html;
-
-pod2html @ARGV;
-!NO!SUBS!
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
Modified: vendor/perl/dist/ext/SDBM_File/Makefile.PL
===================================================================
--- vendor/perl/dist/ext/SDBM_File/Makefile.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/SDBM_File/Makefile.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -23,6 +23,12 @@
PERL_MALLOC_OK => 1,
);
+# We don't want the default subdir rule, as it creates a race condition with the
+# rule we add below.
+sub MY::subdir_x {
+ return '';
+}
+
sub MY::postamble {
if ($^O =~ /MSWin32/ && !defined($ENV{SYSTEMROOT})) {
if ($Config{'make'} =~ /dmake/i) {
Deleted: vendor/perl/dist/ext/XS-Typemap/typemap
===================================================================
--- vendor/perl/dist/ext/XS-Typemap/typemap 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/ext/XS-Typemap/typemap 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,19 +0,0 @@
-# Typemap file for typemap testing
-# includes bonus typemap entries
-# Mainly so that all the standard typemaps can be exercised even when
-# there is not a corresponding type explicitly identified in the standard
-# typemap
-
-svtype T_ENUM
-intRef * T_PTRREF
-intRef T_IV
-intObj * T_PTROBJ
-intObj T_IV
-intRefIv * T_REF_IV_PTR
-intRefIv T_IV
-intArray * T_ARRAY
-intOpq T_IV
-intOpq * T_OPAQUEPTR
-shortOPQ T_OPAQUE
-shortOPQ * T_OPAQUEPTR
-astruct * T_OPAQUEPTR
Modified: vendor/perl/dist/gv.c
===================================================================
--- vendor/perl/dist/gv.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/gv.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1123,7 +1123,8 @@
packname = sv_2mortal(newSVhek(HvNAME_HEK(stash)));
if (flags & GV_SUPER) sv_catpvs(packname, "::SUPER");
}
- if (!(gv = gv_fetchmeth_pvn(stash, S_autoload, S_autolen, FALSE, is_utf8)))
+ if (!(gv = gv_fetchmeth_pvn(stash, S_autoload, S_autolen, FALSE,
+ is_utf8 | (flags & GV_SUPER))))
return NULL;
cv = GvCV(gv);
Deleted: vendor/perl/dist/hints/beos.sh
===================================================================
--- vendor/perl/dist/hints/beos.sh 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/hints/beos.sh 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,82 +0,0 @@
-# BeOS hints file
-
-if [ ! -f beos/nm ]; then mwcc -w all -o beos/nm beos/nm.c 2>/dev/null; fi
-# If this fails, that's all right - it's only for PPC.
-
-prefix="/boot/home/config"
-
-#cpp="mwcc -e"
-
-libpth='/boot/beos/system/lib /boot/home/config/lib'
-usrinc='/boot/develop/headers/posix'
-locinc='/boot/develop/headers/ /boot/home/config/include'
-
-libc='/boot/beos/system/lib/libroot.so'
-libs=' '
-
-d_bcmp='define'
-d_bcopy='define'
-d_bzero='define'
-d_index='define'
-#d_htonl='define' # It exists, but much hackery would be required to support.
-# a bunch of extra includes would have to be added, and it's only used at
-# one place in the non-socket perl code.
-
-#these are all in libdll.a, which my version of nm doesn't know how to parse.
-#if I can get it to both do that, and scan multiple library files, perhaps
-#these can be gotten rid of.
-
-usemymalloc='n'
-# Hopefully, Be's malloc knows better than perl's.
-
-d_link='undef'
-dont_use_nlink='define'
-# no posix (aka hard) links for us!
-
-d_syserrlst='undef'
-# the array syserrlst[] is useless for the most part.
-# large negative numbers really kind of suck in arrays.
-
-# Sockets didn't use to be real sockets but BONE changes this.
-if [ ! -f /boot/develop/headers/be/bone/sys/socket.h ]; then
- d_socket='undef'
- d_gethbyaddr='undef'
- d_gethbyname='undef'
- d_getsbyname='undef'
-
- libs='-lnet'
-fi
-
-# There's a third party flock() emulation. Check, if it is available.
-echo "#include <flock.h>" > try.c
-if cc -E $CFLAGS try.c 2> /dev/null | grep "flock.*("; then
- d_flock='define'
- d_flockproto='define'
- libs="$libs -lflock"
- ldflags="$ldflags -L/boot/home/config/lib"
-else
- cat << 'EOM' >&4
-
-I couldn't find a <flock.h> header defining a flock() prototype. That header
-comes with the flock server package (available on BeBits). You have to add
-the path to the directory containing the header via the environment variable
-CFLAGS (should contain -I</path/to/dir/of/flock/header>). Perl will be compiled
-without flock() support, if the flock server package is not installed or the
-header not found.
-
-EOM
-
-fi
-rm try.c
-
-ld='gcc'
-
-export PATH="$PATH:$PWD/beos"
-
-case "$ldlibpthname" in
-'') ldlibpthname=LIBRARY_PATH ;;
-esac
-
-# the waitpid() wrapper (among other things)
-archobjs="beos.o"
-test -f beos.c || cp beos/beos.c .
Modified: vendor/perl/dist/hints/catamount.sh
===================================================================
--- vendor/perl/dist/hints/catamount.sh 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/hints/catamount.sh 2014-08-27 11:27:40 UTC (rev 6720)
@@ -31,11 +31,11 @@
# mkdir -p /opt/perl-catamount
# mkdir -p /opt/perl-catamount/include
# mkdir -p /opt/perl-catamount/lib
-# mkdir -p /opt/perl-catamount/lib/perl5/5.18.1
+# mkdir -p /opt/perl-catamount/lib/perl5/5.18.2
# mkdir -p /opt/perl-catamount/bin
# cp *.h /opt/perl-catamount/include
# cp libperl.a /opt/perl-catamount/lib
-# cp -pr lib/* /opt/perl-catamount/lib/perl5/5.18.1
+# cp -pr lib/* /opt/perl-catamount/lib/perl5/5.18.2
# cp miniperl perl run.sh cc.sh /opt/perl-catamount/lib
#
# With the headers and the libperl.a you can embed Perl to your Catamount
Deleted: vendor/perl/dist/hints/machten.sh
===================================================================
--- vendor/perl/dist/hints/machten.sh 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/hints/machten.sh 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,276 +0,0 @@
-#! /bin/bash
-# machten.sh
-# This is for MachTen 4.1.4. It might work on other versions and variants
-# too. MachTen is now obsolete, lacks many features expected in modern UNIX
-# implementations, and suffers from a number of bugs which are likely never
-# to be fixed. This means that, in the absence of extensive work on
-# this file and on the perl source code, versions of perl later than 5.6.x
-# cannot successfully be built on MachTen. This file enforces this
-# restriction. Should you wish to port a later version of perl to MachTen,
-# feel free to contact me for pointers.
-# -- Dominic Dunlop <domo at computer.org> 040213
-#
-# Users of earlier MachTen versions might need a fixed tr from ftp.tenon.com.
-# This should be described in the MachTen release notes.
-#
-# MachTen 2.x has its own hint file.
-#
-# The original version of this file was put together by Andy Dougherty
-# <doughera at lafayette.edu> based on comments from lots of
-# folks, especially
-# Mark Pease <peasem at primenet.com>
-# Martijn Koster <m.koster at webcrawler.com>
-# Richard Yeh <rcyeh at cco.caltech.edu>
-#
-# Prevent building of perls later than 5.6.x, stating why -- see above.
-# -- Dominic Dunlop <domo at computer.org> 040213
-# Deny system's false claims to support mmap() and munmap(); note
-# also that Sys V IPC (re)disabled by jhi due to continuing inadequacy
-# -- Dominic Dunlop <domo at computer.org> 001111
-# Remove dynamic loading libraries from search; enable SysV IPC with
-# MachTen 4.1.4 and above; define SYSTEM_ALIGN_BYTES for old MT versions
-# -- Dominic Dunlop <domo at computer.org> 000224
-# Disable shadow password file access: MT 4.1.1 has necessary library
-# functions, but not header file (or documentation)
-# -- Dominic Dunlop <domo at computer.org> 990804
-# For now, explicitly disable dynamic loading -- MT 4.1.1 has it,
-# but these hints do not yet support it.
-# Define NOTEDEF_MACHTEN to undo gratuitous Tenon hack to signal.h.
-# -- Dominic Dunlop <domo at computer.org> 9800802
-# Completely disable SysV IPC pending more complete support from Tenon
-# -- Dominic Dunlop <domo at computer.org> 980712
-# Use vfork and perl's malloc by default
-# -- Dominic Dunlop <domo at computer.org> 980630
-# Raise perl's stack size again; cut down reg_infty; document
-# -- Dominic Dunlop <domo at computer.org> 980619
-# Use of semctl() can crash system: disable -- Dominic Dunlop 980506
-# Raise stack size further; slight tweaks to accomodate MT 4.1
-# -- Dominic Dunlop <domo at computer.org> 980211
-# Raise perl's stack size -- Dominic Dunlop <domo at tcp.ip.lu> 970922
-# Reinstate sigsetjmp iff version is 4.0.3 or greater; use nm
-# (assumes Configure change); prune libswanted -- Dominic Dunlop 970113
-# Warn about test failure due to old Berkeley db -- Dominic Dunlop 970105
-# Do not use perl's malloc; SysV IPC OK -- Neil Cutcliffe, Tenon 961030
-# File::Find's use of link count disabled by Dominic Dunlop 960528
-# Perl's use of sigsetjmp etc. disabled by Dominic Dunlop 960521
-
-# Assume that PERL_REVISON in patchlevel.h is 5.
-# If you want to try building perl-5.8.x or later, set PERL_VERSION_SAFE_MAX
-# appropriately in your environment before running Configure.
-if [ `awk '$1=="#define" && $2=="PERL_VERSION"{print $3}' patchlevel.h` \
- -gt ${PERL_VERSION_SAFE_MAX:-6} ]
-then
- cat <<EOF >&4
-
-Perl versions greater than 5.6.x have not been ported to MachTen. If you
-wish to build a version from the 5.6 track, please see the notes in
-README.machten
-EOF
- exit 1
-fi
-#
-# MachTen 4.1.1's support for shadow password file access is incomplete:
-# disable its use completely.
-d_getspnam=${d_getspnam:-undef}
-
-# MachTen 4.1.1 does support dynamic loading, but perl doesn't
-# know how to use it yet.
-usedl=${usedl:-undef}
-
-# MachTen 4.1.1 may have an unhelpful hack in /usr/include/signal.h.
-# Undo it if so.
-if grep NOTDEF_MACHTEN /usr/include/signal.h > /dev/null
-then
- ccflags="$ccflags -DNOTDEF_MACHTEN"
-fi
-
-# Power MachTen is a real memory system and its standard malloc
-# has been optimized for this. Using this malloc instead of Perl's
-# malloc may result in significant memory savings. In particular,
-# unlike most UNIX memory allocation subsystems, MachTen's free()
-# really does return unneeded process data memory to the system.
-# However, MachTen's malloc() is woefully slow -- maybe 100 times
-# slower than perl's own, so perl's own is usually the better
-# choice. In order to use perl's malloc(), the sbrk() system call
-# must be simulated using MachTen's malloc(). See malloc.c for
-# precise details of how this is achieved. Recent improvements
-# to perl's malloc() currently crash MachTen, and so are disabled
-# by -DPLAIN_MALLOC and -DNO_FANCY_MALLOC.
-usemymalloc=${usemymalloc:-y}
-
-# Older versions of MachTen malloc() data on a two-byte boundary, which
-# works, but slows down operations on long, float and double data.
-# Perl's malloc() can compensate if SYSTEM_ALLOC_ALIGNMENT is suitably
-# defined.
-if expr "$osvers" \< "4.1" >/dev/null
-then
-system_alloc_alignment=" -DSYSTEM_ALLOC_ALIGNMENT=2"
-fi
-# Do not wrap the following long line
-malloc_cflags='ccflags="$ccflags -DPLAIN_MALLOC -DNO_FANCY_MALLOC -DUSE_PERL_SBRK$system_alloc_alignment"'
-
-# When MachTen does a fork(), it immediately copies the whole of
-# the parent process' data space for the child. This can be
-# expensive. Using vfork() where appropriate avoids this cost.
-d_vfork=${d_vfork:-define}
-
-# Specify a high level of optimization (-O3 wouldn't do much more)
-optimize=${optimize:--O2 -fomit-frame-pointer}
-
-# Make symbol table listings less voluminous
-nmopts=-gp
-
-# Set reg_infty -- the maximum allowable number of repeats in regular
-# expressions such as /a{1,$max_repeats}/, and the maximum number of
-# times /a*/ will match. Setting this too high without having a stack
-# large enough to accommodate deep recursion in the regular expression
-# engine allows perl to crash your Mac due to stack overrun if it
-# encounters a pathological regular expression. The default is a
-# compromise between capability and required stack size (see below).
-# You may override the default value from the Configure command-line
-# like this:
-#
-# Configure -Dreg_infty=16368 ...
-
-reg_infty=${reg_infty:-2047}
-
-# If you want to have many perl processes active simultaneously --
-# processing CGI forms -- for example, you should opt for a small stack.
-# For safety, you should set reg_infty no larger than the corresponding
-# value given in this table:
-#
-# Stack size reg_infty value supported
-# ---------- -------------------------
-# 128k 2**8-1 (256)
-# 256k 2**9-1 (511)
-# 512k 2**10-1 (1023)
-# 1M 2**11-1 (2047)
-# ...
-# 16M 2**15-1 (32767) (perl's default value)
-
-# This script selects a safe stack size based on the value of reg_infty
-# specified above. However, you may choose to take a risk and set
-# stack size lower: pathological regular expressions are rare in real-world
-# programs. But be aware that, if perl does encounter one, it WILL
-# crash your system. Do not set stack size lower than 96k unless
-# you want perl's installation tests ( make test ) to crash your system.
-#
-# You may override the default value from the Configure command-line
-# by specifying the required size in kilobytes like this:
-#
-# Configure -Dstack_size=96
-
-if [ "X$stack_size" = 'X' ]
-then
- stack_size=128
- X=`expr $reg_infty / 256`
-
- while [ $X -gt 0 ]
- do
- X=`expr $X / 2`
- stack_size=`expr $stack_size \* 2`
- done
- X=`expr $stack_size \* 1024`
-fi
-
-ldflags="$ldflags -Xlstack=$X"
-ccflags="$ccflags -DREG_INFTY=$reg_infty"
-
-# Install in /usr/local by default
-prefix='/usr/local'
-
-# At least on PowerMac, doubles must be aligned on 8 byte boundaries.
-# I don't know if this is true for all MachTen systems, or how to
-# determine this automatically.
-alignbytes=8
-
-# 4.0.2 and earlier had a problem with perl's use of sigsetjmp and
-# friends. Use setjmp and friends instead.
-expr "$osvers" \< "4.0.3" > /dev/null && d_sigsetjmp='undef'
-
-# System V IPC before MachTen 4.1.4 is incomplete (missing msg function
-# prototypes, no ftok()), buggy (semctl(.., .., IPC_STATUS, ..) hangs
-# system), and undocumented. Claim it's not there at all before 4.1.4.
-if expr "$osvers" \< "4.1.4" >/dev/null
-then
-d_msg=${d_msg:-undef}
-d_sem=${d_sem:-undef}
-d_shm=${d_shm:-undef}
-fi
-
-
-# As of MachTen 4.1.4 the msg* and shm* are in libc but unimplemented
-# (an attempt to use them causes a runtime error)
-# XXX Configure probe for really functional msg*() is needed XXX
-# XXX Configure probe for really functional shm*() is needed XXX
-if test "$d_msg" = ""; then
- d_msgget=${d_msgget:-undef}
- d_msgctl=${d_msgctl:-undef}
- d_msgsnd=${d_msgsnd:-undef}
- d_msgrcv=${d_msgrcv:-undef}
- case "$d_msgget$d_msgsnd$d_msgctl$d_msgrcv" in
- *"undef"*) d_msg="$undef" ;;
- esac
-fi
-if test "$d_shm" = ""; then
- d_shmat=${d_shmat:-undef}
- d_shmdt=${d_shmdt:-undef}
- d_shmget=${d_shmget:-undef}
- d_shmctl=${d_shmctl:-undef}
- case "$d_shmat$d_shmctl$d_shmdt$d_shmget" in
- *"undef"*) d_shm="$undef" ;;
- esac
-fi
-
-# MachTen has stubs for mmap and munmap(), but they just result in the
-# caller being killed on the grounds of "Bad system call"
-d_mmap=${d_mmap:-undef}
-d_munmap=${d_munmap:-undef}
-
-# Get rid of some extra libs which it takes Configure a tediously
-# long time never to find on MachTen, or which break perl
-set `echo X "$libswanted "|sed -e 's/ net / /' -e 's/ socket / /' \
- -e 's/ inet / /' -e 's/ nsl / /' -e 's/ nm / /' -e 's/ malloc / /' \
- -e 's/ ld / /' -e 's/ sun / /' -e 's/ posix / /' \
- -e 's/ cposix / /' -e 's/ crypt / /' -e 's/ dl / /' -e 's/ dld / /' \
- -e 's/ ucb / /' -e 's/ bsd / /' -e 's/ BSD / /' -e 's/ PW / /'`
-shift
-libswanted="$*"
-
-# While link counts on MachTen 4.1's fast file systems work correctly,
-# on Macintosh Heirarchical File Systems, (and on HFS+)
-# MachTen always reports ony two links to directories, even if they
-# contain subdirectories. Consequently, we use this variable to stop
-# File::Find using the link count to determine whether there are
-# subdirectories to be searched. This will generate a harmless message:
-# Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
-# Propagating recommended variable dont_use_nlink
-dont_use_nlink=define
-
-cat <<EOM >&4
-
-At the end of Configure, you will see a harmless message
-
-Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
- Propagating recommended variable dont_use_nlink
- Propagating recommended variable nmopts
- Propagating recommended variable malloc_cflags...
- Propagating recommended variable reg_infty
- Propagating recommended variable system_alloc_alignment
-Read the File::Find documentation for more information about dont_use_nlink
-
-Your perl will be built with a stack size of ${stack_size}k and a regular
-expression repeat count limit of $reg_infty. If you want alternative
-values, see the file hints/machten.sh for advice on how to change them.
-
-Tests
- io/fs test 4 and
- op/stat test 3
-may fail since MachTen may not return a useful nlinks field to stat
-on directories.
-
-EOM
-expr "$osvers" \< "4.1" >/dev/null && test -r ./broken-db.msg && \
- . ./broken-db.msg
-
-unset stack_size X
Deleted: vendor/perl/dist/hints/machten_2.sh
===================================================================
--- vendor/perl/dist/hints/machten_2.sh 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/hints/machten_2.sh 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,91 +0,0 @@
-# machten.sh
-# This file has been put together by Mark Pease <peasem at primenet.com>
-# Comments, questions, and improvements welcome!
-#
-# MachTen does not support dynamic loading. If you wish to, you
-# can fetch, compile, and install the dld package.
-# This ought to work with the ext/DynaLoader/dl_dld.xs in the
-# perl5 package. Have fun!
-# Some possible locations for dld:
-# ftp-swiss.ai.mit.edu:pub/scm/dld-3.2.7.tar.gz
-# prep.ai.mit.edu:/pub/gnu/jacal/dld-3.2.7.tar.gz
-# ftp.cs.indiana.edu:/pub/scheme-repository/imp/SCM-support/dld-3.2.7.tar.gz
-# tsx-11.mit.edu:/pub/linux/sources/libs/dld-3.2.7.tar.gz
-#
-# Original version was for MachTen 2.1.1.
-# Last modified by Andy Dougherty <doughera at lafayette.edu>
-# Tue Aug 13 12:31:01 EDT 1996
-#
-# Warning about tests which no longer fail
-# fixed by Tom Phoenix <rootbeer at teleport.com>
-# March 5, 1997
-#
-# Locale, optimization, and malloc changes by Tom Phoenix Mar 15, 1997
-#
-# groupstype change and note about t/lib/findbin.t by Tom, Mar 24, 1997
-
-# MachTen's ability to have valid filepaths beginning with "//" may
-# be causing lib/FindBin.pm to fail. I don't know how to fix it, but
-# the reader is encouraged to do so! :-) -- Tom
-
-# There seem to be some hard-to-diagnose problems under MachTen's
-# malloc, so we'll use Perl's. If you have problems which Perl's
-# malloc's diagnostics can't help you with, you may wish to use
-# MachTen's malloc after all.
-case "$usemymalloc" in
-'') usemymalloc='y' ;;
-esac
-
-# I (Tom Phoenix) don't know how to test for locales on MachTen. (If
-# you do, please fix this hints file!) But since mine didn't come
-# with locales working out of the box, I'll assume that's the case
-# for most folks.
-case "$d_setlocale" in
-'') d_setlocale=undef
-esac
-
-# MachTen doesn't have secure setid scripts
-d_suidsafe='undef'
-
-# groupstype should be gid_t, as near as I can tell, but it only
-# seems to work right when it's int.
-groupstype='int'
-
-case "$optimize" in
-'') optimize='-O2' ;;
-esac
-
-so='none'
-# These are useful only if you have DLD, but harmless otherwise.
-# Make sure gcc doesn't use -fpic.
-cccdlflags=' ' # That's an empty space.
-lddlflags='-r'
-dlext='o'
-
-# MachTen does not support POSIX enough to compile the POSIX module.
-useposix=false
-
-#MachTen might have an incomplete Berkeley DB implementation.
-i_db=$undef
-
-#MachTen versions 2.X have no hard links. This variable is used
-# by File::Find.
-# This will generate a harmless message:
-# Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
-# Propagating recommended variable dont_use_nlink
-# Without this, tests io/fs #4 and op/stat #3 will fail.
-dont_use_nlink=define
-
-cat <<'EOM' >&4
-
-At the end of Configure, you will see a harmless message
-
-Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
- Propagating recommended variable dont_use_nlink
-
-Read the File::Find documentation for more information.
-
-It's possible that test t/lib/findbin.t will fail on some configurations
-of MachTen.
-
-EOM
Deleted: vendor/perl/dist/hints/mpeix.sh
===================================================================
--- vendor/perl/dist/hints/mpeix.sh 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/hints/mpeix.sh 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,136 +0,0 @@
-# Created for 5.003 by Mark Klein, mklein at dis.com.
-# Substantially revised for 5.004_01 by Mark Bixby, markb at cccd.edu.
-# Revised again for 5.004_69 by Mark Bixby, markb at cccd.edu.
-# Revised for 5.6.0 by Mark Bixby, mbixby at power.net.
-# Revised for 5.7.3 by Mark Bixby, mark at bixby.org.
-# Revised for 5.8.0 by Mark Bixby, mark at bixby.org.
-# Revised for 5.8.8/5.9.3 by Ken Hirsch, kenhirsch at ftml.net
-#
-osname='mpeix'
-osvers=`uname -r | sed -e 's/.[A-Z]\.\([0-9]\)\([0-9]\)\.[0-9][0-9]/\1.\2/'`
-
-#
-# Don't use nm. Instead, we'll use the MPEAUTOCONF environment variable
-# to force error for unresolved externals.
-# This is slower than nm (about 70 minutes instead of 35 minutes),
-# but much more reliable.
-
-usenm='false'
-export AUTOCONF=1 MPEAUTOCONF=1
-
-# Work around the broken inline cat bug that corrupts here docs
-#
-alias -x cat=/bin/cat
-#
-# Various directory locations.
-#
-# Which ones of these does Configure get wrong?
-test -z "$prefix" && prefix="/$HPACCOUNT/$HPGROUP"
-archname='PA-RISC1.1'
-bin="$prefix"
-installman1dir="$prefix/man/man1"
-installman3dir="$prefix/man/man3"
-man1dir="$prefix/man/man1"
-man3dir="$prefix/man/man3"
-perlpath="$prefix/PERL"
-scriptdir="$prefix"
-startperl="#!$prefix/perl"
-startsh='#!/bin/sh'
-
-#
-# Compiling.
-#
-test -z "$cc" && cc='gcc'
-cccdlflags='none'
-ccdlflags='-Xlinker -WL,xl=/usr/lib/libcurses.sl,/lib/libsvipc.sl,/usr/lib/libsocket.sl,/usr/lib/libstr.sl,/lib/libm.sl,/lib/libc.sl'
-ccflags="$ccflags -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -D_POSIX_JOB_CONTROL"
-locincpth="$locincpth /usr/local/include /usr/contrib/include /BIND/CURRENT/include /SYSLOG/PUB"
-test -z "$optimize" && optimize="-O2"
-ranlib='/bin/true'
-# Special compiling options for certain source files.
-# But what if you want -g?
-regcomp_cflags='optimize=-O'
-toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
-
-#
-# Linking.
-#
-# Build a fixed sigsetjmp that can be used in dynamic libraries
-# This needs to be compiled with -O2, so I do it here, rather
-# than with make
-gcc -c -O2 mpeix/mpeix_setjmp.c
-lddlflags="-b $PWD/mpeix_setjmp.o"
-
-# Delete bsd and BSD from the library list. Remove other randomly ordered
-# libraries and then re-add them in their proper order (the MPE linker is
-# order-sensitive). Add additional MPE-specific libraries.
-for mpe_remove in bind bsd BSD c curses m socket str svipc syslog; do
- set `echo " $libswanted " | sed -e 's/ / /g' -e "s/ $mpe_remove //"`
- libswanted="$*"
-done
-libswanted="$libswanted bind syslog curses svipc socket str m c"
-loclibpth="$loclibpth /usr/local/lib /usr/contrib/lib /BIND/CURRENT/lib /SYSLOG/PUB"
-#
-# External functions and data items.
-#
-# Q: Does Configure *really* get *all* of these wrong?
-#
-# A: Yes. There are two MPE problems here. The 'undef' functions exist on MPE,
-# but are merely dummy routines that return ENOTIMPL or ESYSERR. Since they're
-# useless, let's just tell Perl to avoid them. Also, a few data items are
-# 'undef' because while they may exist in structures, they are uninitialized.
-
-d_Gconvert='gcvt((x),(n),(b))'
-
-d_inetaton='undef'
-
-# these fields exist, but are uninitialized
-d_pwage='undef'
-d_pwcomment='undef'
-d_pwgecos='undef'
-d_pwpasswd='undef'
-d_statblks='undef'
-
-# These functions exist,
-# but either return ENOSYS/ESYSERR/ENOSYS or work so differently
-# that it is not helpful to include them
-
-d_lchown='undef'
-d_link='undef'
-d_setegid='undef'
-d_seteuid='undef'
-d_setitimer='undef'
-d_setpgid='undef'
-d_setsid='undef'
-
-
-# These are defined in mpeix/mpeix.c
-d_gettimeod='define'
-d_truncate='define'
-
-# Include files.
-#
-#??i_gdbm='undef' # the port is currently incomplete
-
-i_termios='undef' # we have termios, but not the full set (just tcget/setattr)
-
-i_time='define'
-i_systime='undef'
-i_systimek='undef'
-timeincl='/usr/include/time.h'
-#
-# Data types.
-#
-timetype='time_t'
-
-# Functionality.
-#
-uselargefiles="$undef"
-
-# Expected functionality provided in mpeix.c.
-#
-
-# Help gmake find mpeix.c
-test -h mpeix.c || ln -s mpeix/mpeix.c mpeix.c
-
-archobjs='mpeix.o mpeix_setjmp.o'
Deleted: vendor/perl/dist/hints/rhapsody.sh
===================================================================
--- vendor/perl/dist/hints/rhapsody.sh 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/hints/rhapsody.sh 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,138 +0,0 @@
-##
-# Rhapsody (Mac OS X Server) hints
-# Wilfredo Sanchez <wsanchez at wsanchez.net>
-##
-
-##
-# Paths
-##
-
-# Configure hasn't figured out the version number yet. Bummer.
-perl_revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $src/patchlevel.h`
-perl_version=`awk '/define[ ]+PERL_VERSION/ {print $3}' $src/patchlevel.h`
-perl_subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $src/patchlevel.h`
-version="${perl_revision}.${perl_version}.${perl_subversion}"
-
-# BSD paths
-case "$prefix" in
- '')
- # Default install; use non-system directories
- prefix='/usr/local'; # Built-in perl uses /usr
- siteprefix='/usr/local';
- vendorprefix='/usr'; usevendorprefix='define';
-
- # Where to put modules.
- sitelib="/Local/Library/Perl/${version}"; # FIXME: Want "/Network/Perl/${version}" also
- vendorlib="/System/Library/Perl/${version}"; # Apple-supplied modules
- ;;
-
- '/usr')
- # We are building/replacing the built-in perl
- siteprefix='/usr/local';
- vendorprefix='/usr/local'; usevendorprefix='define';
-
- # Where to put modules.
- sitelib="/Local/Library/Perl/${version}"; # FIXME: Want "/Network/Perl/${version}" also
- vendorlib="/System/Library/Perl/${version}"; # Apple-supplied modules
- ;;
-esac
-
-##
-# Tool chain settings
-##
-
-# Since we can build fat, the archname doesn't need the processor type
-archname='rhapsody';
-
-# nm works.
-usenm='true';
-
-# Libc is in libsystem.
-libc='/System/Library/Frameworks/System.framework/System';
-
-# Optimize.
-optimize='-O3';
-
-# -fno-common because common symbols are not allowed in MH_DYLIB
-ccflags="${ccflags} -fno-common"
-
-# Unverified whether this is necessary on Rhapsody, but the test shouldn't hurt.
-# At least on Darwin 1.3.x:
-#
-# # define INT32_MIN -2147483648
-# int main () {
-# double a = INT32_MIN;
-# printf ("INT32_MIN=%g\n", a);
-# return 0;
-# }
-# will output:
-# INT32_MIN=2.14748e+09
-# Note that the INT32_MIN has become positive.
-# INT32_MIN is set in /usr/include/stdint.h by:
-# #define INT32_MIN -2147483648
-# which seems to break the gcc. Defining INT32_MIN as (-2147483647-1)
-# seems to work. INT64_MIN seems to be similarly broken.
-# -- Nicholas Clark, Ken Williams, and Edward Moy
-#
-case "$(grep '^#define INT32_MIN' /usr/include/stdint.h)" in
- *-2147483648) ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" ;;
-esac
-
-# cpp-precomp is problematic.
-cppflags='${cppflags} -traditional-cpp';
-
-# This is necessary because perl's build system doesn't
-# apply cppflags to cc compile lines as it should.
-ccflags="${ccflags} ${cppflags}"
-
-# Shared library extension is .dylib.
-# Bundle extension is .bundle.
-ld='cc';
-so='dylib';
-dlext='bundle';
-dlsrc='dl_dyld.xs';
-usedl='define';
-cccdlflags='';
-lddlflags="${ldflags} -bundle -undefined suppress";
-ldlibpthname='DYLD_LIBRARY_PATH';
-useshrplib='true';
-
-##
-# System libraries
-##
-
-# vfork works
-usevfork='true';
-
-# our malloc works (but allow users to override)
-case "$usemymalloc" in
-'') usemymalloc='n' ;;
-esac
-
-#
-# The libraries are not threadsafe in Rhapsody
-#
-# Fix when Apple fixes libc.
-#
-case "$usethreads$useithreads" in
- *define*)
- cat <<EOM >&4
-
-
-
-*** Warning, there might be problems with your libraries with
-*** regards to threading. The test ext/threads/t/libc.t is likely
-*** to fail.
-
-EOM
- ;;
-esac
-
-##
-# Build process
-##
-
-# Case-insensitive filesystems don't get along with Makefile and
-# makefile in the same place. Since Darwin uses GNU make, this dodges
-# the problem.
-firstmakefile=GNUmakefile;
Deleted: vendor/perl/dist/hints/uts.sh
===================================================================
--- vendor/perl/dist/hints/uts.sh 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/hints/uts.sh 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,32 +0,0 @@
-archname='s390'
-archobjs='uts/strtol_wrap.o uts/sprintf_wrap.o'
-cc='cc -Xa'
-ccflags='-XTSTRINGS=1500000 -DStrtol=strtol_wrap32 -DStrtoul=strtoul_wrap32 -DSPRINTF_E_BUG'
-cccdlflags='-pic'
-d_bincompat3='undef'
-d_csh='undef'
-d_lstat='define'
-d_suidsafe='define'
-dlsrc='dl_dlopen.xs'
-i_ieeefp='undef'
-ld='ld'
-lddlflags='-G -z text'
-libperl='libperl.so'
-libpth='/lib /usr/lib /usr/ccs/lib'
-libs='-lsocket -lnsl -ldl -lm'
-libswanted='m'
-prefix='/usr/local'
-toke_cflags='optimize=""'
-useshrplib='true'
-
-#################################
-# Some less routine stuff:
-#################################
-cc -g -Xa -c -pic -O uts/strtol_wrap.c -o uts/strtol_wrap.o
-cc -g -Xa -c -pic -O uts/sprintf_wrap.c -o uts/sprintf_wrap.o
-# Make POSIX a static extension.
-cat <<'EOSH' > config.over
-static_ext='POSIX B'
-dynamic_ext=`echo " $dynamic_ext " |
- sed -e 's/ POSIX / /' -e 's/ B / /'`
-EOSH
Deleted: vendor/perl/dist/hints/vmesa.sh
===================================================================
--- vendor/perl/dist/hints/vmesa.sh 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/hints/vmesa.sh 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,342 +0,0 @@
-# hints/vmesa.sh
-#
-# VM/ESA hints by Neale Ferguson (neale at mailbox.tabnsw.com.au)
-#
-# Currently (1999-Jan-09) Configure cannot be used in VM/ESA because
-# too many things are done differently in the C compiler environment.
-# Therefore the hints file is hand-crafted. --jhi at iki.fi
-#
-
-case "$archname" in
-'') archname="$osname" ;;
-esac
-bin='/usr/local/bin'
-binexp='/usr/local/bin'
-byacc='byacc'
-c='\c'
-cc='c89'
-ccflags="-D_OE_SOCKETS -DOLD_PTHREADS_API -DYYDYNAMIC -DDEBUGGING -I.." \
- "-I/usr/local/include -W c,hwopts\\\(string\\\),langlvl\\\(ansi\\\)"
-clocktype='clock_t'
-cryptlib="n"
-d_Gconvert='gcvt((x),(n),(b))'
-d_access='define'
-d_alarm='define'
-d_archlib='define'
-# randbits='15'
-archobjs="vmesa.o"
-d_attribute_format='undef'
-d_attribute_malloc='undef'
-d_attribute_nonnull='undef'
-d_attribute_noreturn='undef'
-d_attribute_pure='undef'
-d_attribute_unused='undef'
-d_attribute_warn_unused_result='undef'
-d_bcmp='define'
-d_bcopy='define'
-d_bsd='undef'
-d_bsdgetpgrp='undef'
-d_bsdsetpgrp='undef'
-d_bzero='define'
-d_casti32='define'
-d_castneg='define'
-d_charvspr='undef'
-d_chown='define'
-d_chroot='undef'
-d_chsize='undef'
-d_closedir='define'
-d_const='define'
-d_crypt='undef'
-d_csh='undef'
-d_cuserid='define'
-d_dbl_dig='define'
-d_difftime='define'
-d_dirnamlen='undef'
-d_dlerror='define'
-d_dlopen='define'
-d_dlsymun='define'
-d_dosuid='undef'
-d_dup2='define'
-d_endgrent='undef'
-d_endpwent='undef'
-d_eofnblk='define'
-d_eunice='undef'
-d_fchmod='define'
-d_fchown='define'
-d_fcntl='define'
-d_fd_macros='define'
-d_fd_set='define'
-d_fds_bits='define'
-d_fgetpos='define'
-d_flexfnam='define'
-d_flock='undef'
-d_fork='undef'
-d_fpathconf='define'
-d_fsetpos='define'
-d_ftime='undef'
-d_getgrent='undef'
-d_gethent='define'
-d_gethname='undef'
-d_getlogin='define'
-d_getpgid='undef'
-d_getpgrp='define'
-d_getpgrp2='undef'
-d_getppid='define'
-d_getprior='undef'
-d_getpwent='undef'
-d_gettimeod='define'
-d_gnulibc='undef'
-d_htonl='define'
-d_index='define'
-d_inetaton='undef'
-d_isascii='define'
-d_killpg='define'
-d_link='define'
-d_locconv='define'
-d_lockf='define'
-d_longdbl='undef'
-d_longllong='undef'
-d_lstat='define'
-d_mblen='define'
-d_mbstowcs='define'
-d_mbtowc='define'
-d_memcmp='define'
-d_memcpy='define'
-d_memmove='define'
-d_memset='define'
-d_mkdir='define'
-d_mkfifo='define'
-d_mktime='define'
-d_msg='define'
-d_msgctl='define'
-d_msgget='define'
-d_msgrcv='define'
-d_msgsnd='define'
-d_mymalloc='undef'
-d_nice='undef'
-d_oldsock='undef'
-d_open3='define'
-d_pathconf='define'
-d_pause='define'
-d_phostname='undef'
-d_pipe='define'
-d_poll='undef'
-d_portable='define'
-d_pwage='undef'
-d_pwchange='undef'
-d_pwclass='undef'
-d_pwcomment='undef'
-d_pwexpire='undef'
-d_pwquota='undef'
-d_readdir='define'
-d_readlink='define'
-d_rename='define'
-d_rewinddir='define'
-d_rmdir='define'
-d_safebcpy='define'
-d_safemcpy='undef'
-d_sanemcmp='define'
-d_sched_yield='undef'
-d_seekdir='undef'
-d_select='define'
-d_sem='define'
-d_semctl='define'
-d_semctl_semid_ds='define'
-d_semget='define'
-d_semop='define'
-d_setegid='define'
-d_seteuid='define'
-d_setgrent='undef'
-d_setgrps='undef'
-d_setlinebuf='undef'
-d_setlocale='define'
-d_setpgid='define'
-d_setpgrp='define'
-d_setpgrp2='undef'
-d_setprior='undef'
-d_setpwent='undef'
-d_setregid='undef'
-d_setresgid='undef'
-d_setresuid='undef'
-d_setreuid='undef'
-d_setrgid='undef'
-d_setruid='undef'
-d_setsid='define'
-d_sfio='undef'
-d_shm='define'
-d_shmat='define'
-d_shmatprototype='define'
-d_shmctl='define'
-d_shmdt='define'
-d_shmget='define'
-d_sigaction='define'
-d_sigsetjmp='define'
-d_socket='define'
-d_sockpair='undef'
-d_statblks='undef'
-d_stdio_cnt_lval='undef'
-d_stdio_ptr_lval='undef'
-d_stdiobase='undef'
-d_stdstdio='undef'
-d_strchr='define'
-d_strcoll='define'
-d_strctcpy='undef'
-d_strerrm='strerror(e)'
-d_strerror='define'
-d_strtod='define'
-d_strtol='define'
-d_strtoul='define'
-d_strxfrm='define'
-d_suidsafe='undef'
-d_symlink='define'
-d_syscall='undef'
-d_sysconf='define'
-d_sysernlst="n"
-d_syserrlst='undef'
-d_system='define'
-d_tcgetpgrp='define'
-d_tcsetpgrp='define'
-d_telldir='undef'
-d_time='define'
-d_times='define'
-d_truncate='define'
-d_tzname='define'
-d_umask='define'
-d_uname='define'
-d_union_semun='undef'
-d_vfork='define'
-d_void_closedir='undef'
-d_voidsig='define'
-d_voidtty="n"
-d_volatile='define'
-d_vprintf='define'
-d_waitpid='define'
-d_wait4='undef'
-d_wcstombs='define'
-d_wctomb='define'
-d_xenix='undef'
-db_hashtype='u_int32_t'
-db_prefixtype='size_t'
-direntrytype='struct dirent'
-dlext='none'
-dlsrc='dl_vmesa.xs'
-dynamic_ext=''
-eagain='EAGAIN'
-ebcdic='define'
-exe_ext=''
-fpostype='fpos_t'
-freetype='void'
-groupstype='gid_t'
-h_fcntl='false'
-h_sysfile='true'
-hint='recommended'
-i_arpainet="define"
-i_bsdioctl="n"
-i_db='undef'
-i_dbm='define'
-i_dirent='define'
-i_dld='define'
-i_dlfcn='define'
-i_fcntl='undef'
-i_float='define'
-i_gdbm='define'
-i_grp='define'
-i_limits='define'
-i_locale='define'
-i_malloc='undef'
-i_math='define'
-i_memory='define'
-i_ndbm='define'
-i_neterrno='undef'
-i_niin='define'
-i_pwd='define'
-i_rpcsvcdbm='undef'
-i_sfio='undef'
-i_sgtty='undef'
-i_stdarg='define'
-i_stddef='define'
-i_stdlib='define'
-i_string='define'
-i_sysdir='define'
-i_sysfile='define'
-i_sysfilio='undef'
-i_sysin='undef'
-i_sysioctl='define'
-i_sysndir='undef'
-i_sysparam='undef'
-i_sysresrc='define'
-i_sysselct='undef'
-i_syssockio="n"
-i_sysstat='define'
-i_systime='define'
-i_systimek='undef'
-i_systimes='define'
-i_systypes='define'
-i_sysun='define'
-i_syswait='define'
-i_termio='undef'
-i_termios='define'
-i_time='undef'
-i_unistd='define'
-i_utime='define'
-i_values='undef'
-i_varargs='undef'
-i_varhdr='stdarg.h'
-i_vfork='undef'
-ld='c89'
-ldflags='-L/usr/local/lib -L.'
-lib_ext='.a'
-libc=''
-libperl='libperl.a'
-libpth='/usr/local/lib /lib /usr/lib'
-libs='-l//posxsock -l//vmmtlib -lgdbm -lxpg4'
-libswanted='gdbm'
-lint="n"
-locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
-loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
-make_set_make='#'
-make='gnumake'
-mallocobj=''
-mallocsrc=''
-malloctype='void *'
-netdb_hlen_type='size_t'
-netdb_host_type='char *'
-netdb_name_type='const char *'
-netdb_net_type='in_addr_t'
-o_nonblock='O_NONBLOCK'
-obj_ext='.o'
-optimize='undef'
-prefix='/usr/local'
-prefixexp='/usr/local'
-prototype='define'
-ranlib=':'
-rd_nodata='-1'
-scriptdir='/usr/local/bin'
-scriptdirexp='/usr/local/bin'
-selecttype='fd_set *'
-shmattype='void *'
-shrpenv=''
-signal_t='void'
-sig_name_init='"ZERO","HUP","INT","ABRT","ILL","POLL","URG","STOP","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","USR1","USR2","NUM18","CONT","CHLD","TTIN","TTOU","IO","QUIT","TSTP","TRAP","NUM27","WINCH","XCPU","XFSZ","VTALRM","PROF","NUM33","NUM34","NUM35","NUM36","NUM3","NUM38","NUM39","NUM40","NUM41","NUM42","NUM43","NUM44","NUM45","NUM46","NUM47","NUM48","NUM49","CLD"'
-sig_num_init='0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,20 '
-sizetype='size_t'
-so='.a'
-ssizetype='ssize_t'
-static_ext='Data/Dumper Digest/MD5 Fcntl Filter/Util/Call GDBM_File IO IPC/SysV List/Util MIME/Base64 NDBM_File Opcode PerlIO/scalar POSIX Socket Storable Time/HiRes Time/Piece attributes re'
-stdchar='char'
-stdio_cnt='(fp)->__countIn'
-stdio_ptr='(fp)->__bufPtr'
-timeincl='sys/time.h '
-timetype='time_t'
-uidtype='uid_t'
-usedl='define'
-usemymalloc='n'
-usenm='false'
-useopcode='true'
-useperlio='undef'
-useposix='true'
-usesfio='false'
-useshrplib='false'
-usethreads='y'
-usevfork='true'
-vi='x'
Modified: vendor/perl/dist/hv.h
===================================================================
--- vendor/perl/dist/hv.h 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/hv.h 2014-08-27 11:27:40 UTC (rev 6720)
@@ -81,6 +81,7 @@
U32 pkg_gen; /* Bumps when local methods/@ISA change */
const struct mro_alg *mro_which; /* which mro alg is in use? */
HV *isa; /* Everything this class @ISA */
+ U32 destroy_gen; /* Generation number of DESTROY cache */
};
#define MRO_GET_PRIVATE_DATA(smeta, which) \
Modified: vendor/perl/dist/intrpvar.h
===================================================================
--- vendor/perl/dist/intrpvar.h 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/intrpvar.h 2014-08-27 11:27:40 UTC (rev 6720)
@@ -741,7 +741,7 @@
/* Hook for File::Glob */
PERLVARI(I, globhook, globhook_t, NULL)
-/* The last unconditional member of the interpreter structure when 5.18.1 was
+/* The last unconditional member of the interpreter structure when 5.18.2 was
released. The offset of the end of this is baked into a global variable in
any shared perl library which will allow a sanity test in future perl
releases. */
Deleted: vendor/perl/dist/lib/AutoLoader.pm
===================================================================
--- vendor/perl/dist/lib/AutoLoader.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/AutoLoader.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,429 +0,0 @@
-package AutoLoader;
-
-use strict;
-use 5.006_001;
-
-our($VERSION, $AUTOLOAD);
-
-my $is_dosish;
-my $is_epoc;
-my $is_vms;
-my $is_macos;
-
-BEGIN {
- $is_dosish = $^O eq 'dos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'NetWare';
- $is_epoc = $^O eq 'epoc';
- $is_vms = $^O eq 'VMS';
- $is_macos = $^O eq 'MacOS';
- $VERSION = '5.68';
-}
-
-AUTOLOAD {
- my $sub = $AUTOLOAD;
- my $filename = AutoLoader::find_filename( $sub );
-
- my $save = $@;
- local $!; # Do not munge the value.
- eval { local $SIG{__DIE__}; require $filename };
- if ($@) {
- if (substr($sub,-9) eq '::DESTROY') {
- no strict 'refs';
- *$sub = sub {};
- $@ = undef;
- } elsif ($@ =~ /^Can't locate/) {
- # The load might just have failed because the filename was too
- # long for some old SVR3 systems which treat long names as errors.
- # If we can successfully truncate a long name then it's worth a go.
- # There is a slight risk that we could pick up the wrong file here
- # but autosplit should have warned about that when splitting.
- if ($filename =~ s/(\w{12,})\.al$/substr($1,0,11).".al"/e){
- eval { local $SIG{__DIE__}; require $filename };
- }
- }
- if ($@){
- $@ =~ s/ at .*\n//;
- my $error = $@;
- require Carp;
- Carp::croak($error);
- }
- }
- $@ = $save;
- goto &$sub;
-}
-
-sub find_filename {
- my $sub = shift;
- my $filename;
- # Braces used to preserve $1 et al.
- {
- # Try to find the autoloaded file from the package-qualified
- # name of the sub. e.g., if the sub needed is
- # Getopt::Long::GetOptions(), then $INC{Getopt/Long.pm} is
- # something like '/usr/lib/perl5/Getopt/Long.pm', and the
- # autoload file is '/usr/lib/perl5/auto/Getopt/Long/GetOptions.al'.
- #
- # However, if @INC is a relative path, this might not work. If,
- # for example, @INC = ('lib'), then $INC{Getopt/Long.pm} is
- # 'lib/Getopt/Long.pm', and we want to require
- # 'auto/Getopt/Long/GetOptions.al' (without the leading 'lib').
- # In this case, we simple prepend the 'auto/' and let the
- # C<require> take care of the searching for us.
-
- my ($pkg,$func) = ($sub =~ /(.*)::([^:]+)$/);
- $pkg =~ s#::#/#g;
- if (defined($filename = $INC{"$pkg.pm"})) {
- if ($is_macos) {
- $pkg =~ tr#/#:#;
- $filename = undef
- unless $filename =~ s#^(.*)$pkg\.pm\z#$1auto:$pkg:$func.al#s;
- } else {
- $filename = undef
- unless $filename =~ s#^(.*)$pkg\.pm\z#$1auto/$pkg/$func.al#s;
- }
-
- # if the file exists, then make sure that it is a
- # a fully anchored path (i.e either '/usr/lib/auto/foo/bar.al',
- # or './lib/auto/foo/bar.al'. This avoids C<require> searching
- # (and failing) to find the 'lib/auto/foo/bar.al' because it
- # looked for 'lib/lib/auto/foo/bar.al', given @INC = ('lib').
-
- if (defined $filename and -r $filename) {
- unless ($filename =~ m|^/|s) {
- if ($is_dosish) {
- unless ($filename =~ m{^([a-z]:)?[\\/]}is) {
- if ($^O ne 'NetWare') {
- $filename = "./$filename";
- } else {
- $filename = "$filename";
- }
- }
- }
- elsif ($is_epoc) {
- unless ($filename =~ m{^([a-z?]:)?[\\/]}is) {
- $filename = "./$filename";
- }
- }
- elsif ($is_vms) {
- # XXX todo by VMSmiths
- $filename = "./$filename";
- }
- elsif (!$is_macos) {
- $filename = "./$filename";
- }
- }
- }
- else {
- $filename = undef;
- }
- }
- unless (defined $filename) {
- # let C<require> do the searching
- $filename = "auto/$sub.al";
- $filename =~ s#::#/#g;
- }
- }
- return $filename;
-}
-
-sub import {
- my $pkg = shift;
- my $callpkg = caller;
-
- #
- # Export symbols, but not by accident of inheritance.
- #
-
- if ($pkg eq 'AutoLoader') {
- if ( @_ and $_[0] =~ /^&?AUTOLOAD$/ ) {
- no strict 'refs';
- *{ $callpkg . '::AUTOLOAD' } = \&AUTOLOAD;
- }
- }
-
- #
- # Try to find the autosplit index file. Eg., if the call package
- # is POSIX, then $INC{POSIX.pm} is something like
- # '/usr/local/lib/perl5/POSIX.pm', and the autosplit index file is in
- # '/usr/local/lib/perl5/auto/POSIX/autosplit.ix', so we require that.
- #
- # However, if @INC is a relative path, this might not work. If,
- # for example, @INC = ('lib'), then
- # $INC{POSIX.pm} is 'lib/POSIX.pm', and we want to require
- # 'auto/POSIX/autosplit.ix' (without the leading 'lib').
- #
-
- (my $calldir = $callpkg) =~ s#::#/#g;
- my $path = $INC{$calldir . '.pm'};
- if (defined($path)) {
- # Try absolute path name, but only eval it if the
- # transformation from module path to autosplit.ix path
- # succeeded!
- my $replaced_okay;
- if ($is_macos) {
- (my $malldir = $calldir) =~ tr#/#:#;
- $replaced_okay = ($path =~ s#^(.*)$malldir\.pm\z#$1auto:$malldir:autosplit.ix#s);
- } else {
- $replaced_okay = ($path =~ s#^(.*)$calldir\.pm\z#$1auto/$calldir/autosplit.ix#);
- }
-
- eval { require $path; } if $replaced_okay;
- # If that failed, try relative path with normal @INC searching.
- if (!$replaced_okay or $@) {
- $path ="auto/$calldir/autosplit.ix";
- eval { require $path; };
- }
- if ($@) {
- my $error = $@;
- require Carp;
- Carp::carp($error);
- }
- }
-}
-
-sub unimport {
- my $callpkg = caller;
-
- no strict 'refs';
-
- for my $exported (qw( AUTOLOAD )) {
- my $symname = $callpkg . '::' . $exported;
- undef *{ $symname } if \&{ $symname } == \&{ $exported };
- *{ $symname } = \&{ $symname };
- }
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-AutoLoader - load subroutines only on demand
-
-=head1 SYNOPSIS
-
- package Foo;
- use AutoLoader 'AUTOLOAD'; # import the default AUTOLOAD subroutine
-
- package Bar;
- use AutoLoader; # don't import AUTOLOAD, define our own
- sub AUTOLOAD {
- ...
- $AutoLoader::AUTOLOAD = "...";
- goto &AutoLoader::AUTOLOAD;
- }
-
-=head1 DESCRIPTION
-
-The B<AutoLoader> module works with the B<AutoSplit> module and the
-C<__END__> token to defer the loading of some subroutines until they are
-used rather than loading them all at once.
-
-To use B<AutoLoader>, the author of a module has to place the
-definitions of subroutines to be autoloaded after an C<__END__> token.
-(See L<perldata>.) The B<AutoSplit> module can then be run manually to
-extract the definitions into individual files F<auto/funcname.al>.
-
-B<AutoLoader> implements an AUTOLOAD subroutine. When an undefined
-subroutine in is called in a client module of B<AutoLoader>,
-B<AutoLoader>'s AUTOLOAD subroutine attempts to locate the subroutine in a
-file with a name related to the location of the file from which the
-client module was read. As an example, if F<POSIX.pm> is located in
-F</usr/local/lib/perl5/POSIX.pm>, B<AutoLoader> will look for perl
-subroutines B<POSIX> in F</usr/local/lib/perl5/auto/POSIX/*.al>, where
-the C<.al> file has the same name as the subroutine, sans package. If
-such a file exists, AUTOLOAD will read and evaluate it,
-thus (presumably) defining the needed subroutine. AUTOLOAD will then
-C<goto> the newly defined subroutine.
-
-Once this process completes for a given function, it is defined, so
-future calls to the subroutine will bypass the AUTOLOAD mechanism.
-
-=head2 Subroutine Stubs
-
-In order for object method lookup and/or prototype checking to operate
-correctly even when methods have not yet been defined it is necessary to
-"forward declare" each subroutine (as in C<sub NAME;>). See
-L<perlsub/"SYNOPSIS">. Such forward declaration creates "subroutine
-stubs", which are place holders with no code.
-
-The AutoSplit and B<AutoLoader> modules automate the creation of forward
-declarations. The AutoSplit module creates an 'index' file containing
-forward declarations of all the AutoSplit subroutines. When the
-AutoLoader module is 'use'd it loads these declarations into its callers
-package.
-
-Because of this mechanism it is important that B<AutoLoader> is always
-C<use>d and not C<require>d.
-
-=head2 Using B<AutoLoader>'s AUTOLOAD Subroutine
-
-In order to use B<AutoLoader>'s AUTOLOAD subroutine you I<must>
-explicitly import it:
-
- use AutoLoader 'AUTOLOAD';
-
-=head2 Overriding B<AutoLoader>'s AUTOLOAD Subroutine
-
-Some modules, mainly extensions, provide their own AUTOLOAD subroutines.
-They typically need to check for some special cases (such as constants)
-and then fallback to B<AutoLoader>'s AUTOLOAD for the rest.
-
-Such modules should I<not> import B<AutoLoader>'s AUTOLOAD subroutine.
-Instead, they should define their own AUTOLOAD subroutines along these
-lines:
-
- use AutoLoader;
- use Carp;
-
- sub AUTOLOAD {
- my $sub = $AUTOLOAD;
- (my $constname = $sub) =~ s/.*:://;
- my $val = constant($constname, @_ ? $_[0] : 0);
- if ($! != 0) {
- if ($! =~ /Invalid/ || $!{EINVAL}) {
- $AutoLoader::AUTOLOAD = $sub;
- goto &AutoLoader::AUTOLOAD;
- }
- else {
- croak "Your vendor has not defined constant $constname";
- }
- }
- *$sub = sub { $val }; # same as: eval "sub $sub { $val }";
- goto &$sub;
- }
-
-If any module's own AUTOLOAD subroutine has no need to fallback to the
-AutoLoader's AUTOLOAD subroutine (because it doesn't have any AutoSplit
-subroutines), then that module should not use B<AutoLoader> at all.
-
-=head2 Package Lexicals
-
-Package lexicals declared with C<my> in the main block of a package
-using B<AutoLoader> will not be visible to auto-loaded subroutines, due to
-the fact that the given scope ends at the C<__END__> marker. A module
-using such variables as package globals will not work properly under the
-B<AutoLoader>.
-
-The C<vars> pragma (see L<perlmod/"vars">) may be used in such
-situations as an alternative to explicitly qualifying all globals with
-the package namespace. Variables pre-declared with this pragma will be
-visible to any autoloaded routines (but will not be invisible outside
-the package, unfortunately).
-
-=head2 Not Using AutoLoader
-
-You can stop using AutoLoader by simply
-
- no AutoLoader;
-
-=head2 B<AutoLoader> vs. B<SelfLoader>
-
-The B<AutoLoader> is similar in purpose to B<SelfLoader>: both delay the
-loading of subroutines.
-
-B<SelfLoader> uses the C<__DATA__> marker rather than C<__END__>.
-While this avoids the use of a hierarchy of disk files and the
-associated open/close for each routine loaded, B<SelfLoader> suffers a
-startup speed disadvantage in the one-time parsing of the lines after
-C<__DATA__>, after which routines are cached. B<SelfLoader> can also
-handle multiple packages in a file.
-
-B<AutoLoader> only reads code as it is requested, and in many cases
-should be faster, but requires a mechanism like B<AutoSplit> be used to
-create the individual files. L<ExtUtils::MakeMaker> will invoke
-B<AutoSplit> automatically if B<AutoLoader> is used in a module source
-file.
-
-=head1 CAVEATS
-
-AutoLoaders prior to Perl 5.002 had a slightly different interface. Any
-old modules which use B<AutoLoader> should be changed to the new calling
-style. Typically this just means changing a require to a use, adding
-the explicit C<'AUTOLOAD'> import if needed, and removing B<AutoLoader>
-from C<@ISA>.
-
-On systems with restrictions on file name length, the file corresponding
-to a subroutine may have a shorter name that the routine itself. This
-can lead to conflicting file names. The I<AutoSplit> package warns of
-these potential conflicts when used to split a module.
-
-AutoLoader may fail to find the autosplit files (or even find the wrong
-ones) in cases where C<@INC> contains relative paths, B<and> the program
-does C<chdir>.
-
-=head1 SEE ALSO
-
-L<SelfLoader> - an autoloader that doesn't use external files.
-
-=head1 AUTHOR
-
-C<AutoLoader> is maintained by the perl5-porters. Please direct
-any questions to the canonical mailing list. Anything that
-is applicable to the CPAN release can be sent to its maintainer,
-though.
-
-Author and Maintainer: The Perl5-Porters <perl5-porters at perl.org>
-
-Maintainer of the CPAN release: Steffen Mueller <smueller at cpan.org>
-
-=head1 COPYRIGHT AND LICENSE
-
-This package has been part of the perl core since the first release
-of perl5. It has been released separately to CPAN so older installations
-can benefit from bug fixes.
-
-This package has the same copyright and license as the perl core:
-
- Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- by Larry Wall and others
-
- All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- a) the GNU General Public License as published by the Free
- Software Foundation; either version 1, or (at your option) any
- later version, or
-
- b) the "Artistic License" which comes with this Kit.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
- the GNU General Public License or the Artistic License for more details.
-
- You should have received a copy of the Artistic License with this
- Kit, in the file named "Artistic". If not, I'll be glad to provide one.
-
- You should also have received a copy of the GNU General Public License
- along with this program in the file named "Copying". If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA or visit their web page on the internet at
- http://www.gnu.org/copyleft/gpl.html.
-
- For those of you that choose to use the GNU General Public License,
- my interpretation of the GNU General Public License is that no Perl
- script falls under the terms of the GPL unless you explicitly put
- said script under the terms of the GPL yourself. Furthermore, any
- object code linked with perl does not automatically fall under the
- terms of the GPL, provided such object code only adds definitions
- of subroutines and variables, and does not otherwise impair the
- resulting interpreter from executing any standard Perl script. I
- consider linking in C subroutines in this manner to be the moral
- equivalent of defining subroutines in the Perl language itself. You
- may sell such an object file as proprietary provided that you provide
- or offer to provide the Perl source, as specified by the GNU General
- Public License. (This is merely an alternate way of specifying input
- to the program.) You may also sell a binary produced by the dumping of
- a running Perl script that belongs to you, provided that you provide or
- offer to provide the Perl source as specified by the GPL. (The
- fact that a Perl interpreter and your code are in the same binary file
- is, in this case, a form of mere aggregation.) This is my interpretation
- of the GPL. If you still have concerns or difficulties understanding
- my intent, feel free to contact me. Of course, the Artistic License
- spells all this out for your protection, so you may prefer to use that.
-
-=cut
Deleted: vendor/perl/dist/lib/AutoLoader.t
===================================================================
--- vendor/perl/dist/lib/AutoLoader.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/AutoLoader.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,186 +0,0 @@
-#!./perl -w
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-use strict;
-use File::Spec;
-use File::Path;
-
-my $dir;
-BEGIN
-{
- $dir = File::Spec->catdir( "auto-$$" );
- unshift @INC, $dir;
-}
-
-use Test::More tests => 22;
-
-# First we must set up some autoloader files
-my $fulldir = File::Spec->catdir( $dir, 'auto', 'Foo' );
-mkpath( $fulldir ) or die "Can't mkdir '$fulldir': $!";
-
-open(FOO, '>', File::Spec->catfile( $fulldir, 'foo.al' ))
- or die "Can't open foo file: $!";
-print FOO <<'EOT';
-package Foo;
-sub foo { shift; shift || "foo" }
-1;
-EOT
-close(FOO);
-
-open(BAR, '>', File::Spec->catfile( $fulldir, 'bar.al' ))
- or die "Can't open bar file: $!";
-print BAR <<'EOT';
-package Foo;
-sub bar { shift; shift || "bar" }
-1;
-EOT
-close(BAR);
-
-open(BAZ, '>', File::Spec->catfile( $fulldir, 'bazmarkhian.al' ))
- or die "Can't open bazmarkhian file: $!";
-print BAZ <<'EOT';
-package Foo;
-sub bazmarkhianish { shift; shift || "baz" }
-1;
-EOT
-close(BAZ);
-
-open(BLECH, '>', File::Spec->catfile( $fulldir, 'blechanawilla.al' ))
- or die "Can't open blech file: $!";
-print BLECH <<'EOT';
-package Foo;
-sub blechanawilla { compilation error (
-EOT
-close(BLECH);
-
-# This is just to keep the old SVR3 systems happy; they may fail
-# to find the above file so we duplicate it where they should find it.
-open(BLECH, '>', File::Spec->catfile( $fulldir, 'blechanawil.al' ))
- or die "Can't open blech file: $!";
-print BLECH <<'EOT';
-package Foo;
-sub blechanawilla { compilation error (
-EOT
-close(BLECH);
-
-# Let's define the package
-package Foo;
-require AutoLoader;
-AutoLoader->import( 'AUTOLOAD' );
-
-sub new { bless {}, shift };
-sub foo;
-sub bazmarkhianish;
-
-package main;
-
-my $foo = Foo->new();
-
-my $result = $foo->can( 'foo' );
-ok( $result, 'can() first time' );
-is( $foo->foo, 'foo', 'autoloaded first time' );
-is( $foo->foo, 'foo', 'regular call' );
-is( $result, \&Foo::foo, 'can() returns ref to regular installed sub' );
-$result = $foo->can( 'bar' );
-ok( $result, 'can() should work when importing AUTOLOAD too' );
-is( $foo->bar, 'bar', 'regular call' );
-is( $result, \&Foo::bar, '... returning ref to regular installed sub' );
-
-eval {
- $foo->will_fail;
-};
-like( $@, qr/^Can't locate/, 'undefined method' );
-
-$result = $foo->can( 'will_fail' );
-ok( ! $result, 'can() should fail on undefined methods' );
-
-# Used to be trouble with this
-eval {
- my $foo = Foo->new();
- die "oops";
-};
-like( $@, qr/oops/, 'indirect method call' );
-
-# Pass regular expression variable to autoloaded function. This used
-# to go wrong because AutoLoader used regular expressions to generate
-# autoloaded filename.
-'foo' =~ /(\w+)/;
-
-is( $foo->bar($1), 'foo', 'autoloaded method should not stomp match vars' );
-is( $foo->bar($1), 'foo', '(again)' );
-is( $foo->bazmarkhianish($1), 'foo', 'for any method call' );
-is( $foo->bazmarkhianish($1), 'foo', '(again)' );
-
-# Used to retry long subnames with shorter filenames on any old
-# exception, including compilation error. Now AutoLoader only
-# tries shorter filenames if it can't find the long one.
-eval {
- $foo->blechanawilla;
-};
-like( $@, qr/syntax error/i, 'require error propagates' );
-
-# test recursive autoloads
-open(F, '>', File::Spec->catfile( $fulldir, 'a.al'))
- or die "Cannot make 'a' file: $!";
-print F <<'EOT';
-package Foo;
-BEGIN { b() }
-sub a { ::ok( 1, 'adding a new autoloaded method' ); }
-1;
-EOT
-close(F);
-
-open(F, '>', File::Spec->catfile( $fulldir, 'b.al'))
- or die "Cannot make 'b' file: $!";
-print F <<'EOT';
-package Foo;
-sub b { ::ok( 1, 'adding a new autoloaded method' ) }
-1;
-EOT
-close(F);
-Foo::a();
-
-package Bar;
-AutoLoader->import();
-::ok( ! defined &AUTOLOAD, 'AutoLoader should not export AUTOLOAD by default' );
-::ok( ! defined &can, '... nor can()' );
-
-package Foo;
-AutoLoader->unimport();
-eval { Foo->baz() };
-::like( $@, qr/locate object method "baz"/,
- 'unimport() should remove imported AUTOLOAD()' );
-
-package Baz;
-
-sub AUTOLOAD { 'i am here' }
-
-AutoLoader->import();
-AutoLoader->unimport();
-
-::is( Baz->AUTOLOAD(), 'i am here', '... but not non-imported AUTOLOAD()' );
-
-
-package SomeClass;
-use AutoLoader 'AUTOLOAD';
-sub new {
- bless {} => shift;
-}
-
-package main;
-
-$INC{"SomeClass.pm"} = $0; # Prepare possible recursion
-{
- my $p = SomeClass->new();
-} # <-- deep recursion in AUTOLOAD looking for SomeClass::DESTROY?
-::ok(1, "AutoLoader shouldn't loop forever if \%INC is modified");
-
-# cleanup
-END {
- return unless $dir && -d $dir;
- rmtree $dir;
-}
Deleted: vendor/perl/dist/lib/AutoSplit.pm
===================================================================
--- vendor/perl/dist/lib/AutoSplit.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/AutoSplit.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,592 +0,0 @@
-package AutoSplit;
-
-use Exporter ();
-use Config qw(%Config);
-use File::Basename ();
-use File::Path qw(mkpath);
-use File::Spec::Functions qw(curdir catfile catdir);
-use strict;
-our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $Verbose, $Keep, $Maxlen,
- $CheckForAutoloader, $CheckModTime);
-
-$VERSION = "1.06";
- at ISA = qw(Exporter);
- at EXPORT = qw(&autosplit &autosplit_lib_modules);
- at EXPORT_OK = qw($Verbose $Keep $Maxlen $CheckForAutoloader $CheckModTime);
-
-=head1 NAME
-
-AutoSplit - split a package for autoloading
-
-=head1 SYNOPSIS
-
- autosplit($file, $dir, $keep, $check, $modtime);
-
- autosplit_lib_modules(@modules);
-
-=head1 DESCRIPTION
-
-This function will split up your program into files that the AutoLoader
-module can handle. It is used by both the standard perl libraries and by
-the MakeMaker utility, to automatically configure libraries for autoloading.
-
-The C<autosplit> interface splits the specified file into a hierarchy
-rooted at the directory C<$dir>. It creates directories as needed to reflect
-class hierarchy, and creates the file F<autosplit.ix>. This file acts as
-both forward declaration of all package routines, and as timestamp for the
-last update of the hierarchy.
-
-The remaining three arguments to C<autosplit> govern other options to
-the autosplitter.
-
-=over 2
-
-=item $keep
-
-If the third argument, I<$keep>, is false, then any
-pre-existing C<*.al> files in the autoload directory are removed if
-they are no longer part of the module (obsoleted functions).
-$keep defaults to 0.
-
-=item $check
-
-The
-fourth argument, I<$check>, instructs C<autosplit> to check the module
-currently being split to ensure that it includes a C<use>
-specification for the AutoLoader module, and skips the module if
-AutoLoader is not detected.
-$check defaults to 1.
-
-=item $modtime
-
-Lastly, the I<$modtime> argument specifies
-that C<autosplit> is to check the modification time of the module
-against that of the C<autosplit.ix> file, and only split the module if
-it is newer.
-$modtime defaults to 1.
-
-=back
-
-Typical use of AutoSplit in the perl MakeMaker utility is via the command-line
-with:
-
- perl -e 'use AutoSplit; autosplit($ARGV[0], $ARGV[1], 0, 1, 1)'
-
-Defined as a Make macro, it is invoked with file and directory arguments;
-C<autosplit> will split the specified file into the specified directory and
-delete obsolete C<.al> files, after checking first that the module does use
-the AutoLoader, and ensuring that the module is not already currently split
-in its current form (the modtime test).
-
-The C<autosplit_lib_modules> form is used in the building of perl. It takes
-as input a list of files (modules) that are assumed to reside in a directory
-B<lib> relative to the current directory. Each file is sent to the
-autosplitter one at a time, to be split into the directory B<lib/auto>.
-
-In both usages of the autosplitter, only subroutines defined following the
-perl I<__END__> token are split out into separate files. Some
-routines may be placed prior to this marker to force their immediate loading
-and parsing.
-
-=head2 Multiple packages
-
-As of version 1.01 of the AutoSplit module it is possible to have
-multiple packages within a single file. Both of the following cases
-are supported:
-
- package NAME;
- __END__
- sub AAA { ... }
- package NAME::option1;
- sub BBB { ... }
- package NAME::option2;
- sub BBB { ... }
-
- package NAME;
- __END__
- sub AAA { ... }
- sub NAME::option1::BBB { ... }
- sub NAME::option2::BBB { ... }
-
-=head1 DIAGNOSTICS
-
-C<AutoSplit> will inform the user if it is necessary to create the
-top-level directory specified in the invocation. It is preferred that
-the script or installation process that invokes C<AutoSplit> have
-created the full directory path ahead of time. This warning may
-indicate that the module is being split into an incorrect path.
-
-C<AutoSplit> will warn the user of all subroutines whose name causes
-potential file naming conflicts on machines with drastically limited
-(8 characters or less) file name length. Since the subroutine name is
-used as the file name, these warnings can aid in portability to such
-systems.
-
-Warnings are issued and the file skipped if C<AutoSplit> cannot locate
-either the I<__END__> marker or a "package Name;"-style specification.
-
-C<AutoSplit> will also emit general diagnostics for inability to
-create directories or files.
-
-=head1 AUTHOR
-
-C<AutoSplit> is maintained by the perl5-porters. Please direct
-any questions to the canonical mailing list. Anything that
-is applicable to the CPAN release can be sent to its maintainer,
-though.
-
-Author and Maintainer: The Perl5-Porters <perl5-porters at perl.org>
-
-Maintainer of the CPAN release: Steffen Mueller <smueller at cpan.org>
-
-=head1 COPYRIGHT AND LICENSE
-
-This package has been part of the perl core since the first release
-of perl5. It has been released separately to CPAN so older installations
-can benefit from bug fixes.
-
-This package has the same copyright and license as the perl core:
-
- Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- by Larry Wall and others
-
- All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- a) the GNU General Public License as published by the Free
- Software Foundation; either version 1, or (at your option) any
- later version, or
-
- b) the "Artistic License" which comes with this Kit.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
- the GNU General Public License or the Artistic License for more details.
-
- You should have received a copy of the Artistic License with this
- Kit, in the file named "Artistic". If not, I'll be glad to provide one.
-
- You should also have received a copy of the GNU General Public License
- along with this program in the file named "Copying". If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA or visit their web page on the internet at
- http://www.gnu.org/copyleft/gpl.html.
-
- For those of you that choose to use the GNU General Public License,
- my interpretation of the GNU General Public License is that no Perl
- script falls under the terms of the GPL unless you explicitly put
- said script under the terms of the GPL yourself. Furthermore, any
- object code linked with perl does not automatically fall under the
- terms of the GPL, provided such object code only adds definitions
- of subroutines and variables, and does not otherwise impair the
- resulting interpreter from executing any standard Perl script. I
- consider linking in C subroutines in this manner to be the moral
- equivalent of defining subroutines in the Perl language itself. You
- may sell such an object file as proprietary provided that you provide
- or offer to provide the Perl source, as specified by the GNU General
- Public License. (This is merely an alternate way of specifying input
- to the program.) You may also sell a binary produced by the dumping of
- a running Perl script that belongs to you, provided that you provide or
- offer to provide the Perl source as specified by the GPL. (The
- fact that a Perl interpreter and your code are in the same binary file
- is, in this case, a form of mere aggregation.) This is my interpretation
- of the GPL. If you still have concerns or difficulties understanding
- my intent, feel free to contact me. Of course, the Artistic License
- spells all this out for your protection, so you may prefer to use that.
-
-=cut
-
-# for portability warn about names longer than $maxlen
-$Maxlen = 8; # 8 for dos, 11 (14-".al") for SYSVR3
-$Verbose = 1; # 0=none, 1=minimal, 2=list .al files
-$Keep = 0;
-$CheckForAutoloader = 1;
-$CheckModTime = 1;
-
-my $IndexFile = "autosplit.ix"; # file also serves as timestamp
-my $maxflen = 255;
-$maxflen = 14 if $Config{'d_flexfnam'} ne 'define';
-if (defined (&Dos::UseLFN)) {
- $maxflen = Dos::UseLFN() ? 255 : 11;
-}
-my $Is_VMS = ($^O eq 'VMS');
-
-# allow checking for valid ': attrlist' attachments.
-# extra jugglery required to support both 5.8 and 5.9/5.10 features
-# (support for 5.8 required for cross-compiling environments)
-
-my $attr_list =
- $] >= 5.009005 ?
- eval <<'__QR__'
- qr{
- \s* : \s*
- (?:
- # one attribute
- (?> # no backtrack
- (?! \d) \w+
- (?<nested> \( (?: [^()]++ | (?&nested)++ )*+ \) ) ?
- )
- (?: \s* : \s* | \s+ (?! :) )
- )*
- }x
-__QR__
- :
- do {
- # In pre-5.9.5 world we have to do dirty tricks.
- # (we use 'our' rather than 'my' here, due to the rather complex and buggy
- # behaviour of lexicals with qr// and (??{$lex}) )
- our $trick1; # yes, cannot our and assign at the same time.
- $trick1 = qr{ \( (?: (?> [^()]+ ) | (??{ $trick1 }) )* \) }x;
- our $trick2 = qr{ (?> (?! \d) \w+ (?:$trick1)? ) (?:\s*\:\s*|\s+(?!\:)) }x;
- qr{ \s* : \s* (?: $trick2 )* }x;
- };
-
-sub autosplit{
- my($file, $autodir, $keep, $ckal, $ckmt) = @_;
- # $file - the perl source file to be split (after __END__)
- # $autodir - the ".../auto" dir below which to write split subs
- # Handle optional flags:
- $keep = $Keep unless defined $keep;
- $ckal = $CheckForAutoloader unless defined $ckal;
- $ckmt = $CheckModTime unless defined $ckmt;
- autosplit_file($file, $autodir, $keep, $ckal, $ckmt);
-}
-
-sub carp{
- require Carp;
- goto &Carp::carp;
-}
-
-# This function is used during perl building/installation
-# ./miniperl -e 'use AutoSplit; autosplit_lib_modules(@ARGV)' ...
-
-sub autosplit_lib_modules {
- my(@modules) = @_; # list of Module names
- local $_; # Avoid clobber.
- while (defined($_ = shift @modules)) {
- while (m#([^:]+)::([^:].*)#) { # in case specified as ABC::XYZ
- $_ = catfile($1, $2);
- }
- s|\\|/|g; # bug in ksh OS/2
- s#^lib/##s; # incase specified as lib/*.pm
- my($lib) = catfile(curdir(), "lib");
- if ($Is_VMS) { # may need to convert VMS-style filespecs
- $lib =~ s#^\[\]#.\/#;
- }
- s#^$lib\W+##s; # incase specified as ./lib/*.pm
- if ($Is_VMS && /[:>\]]/) { # may need to convert VMS-style filespecs
- my ($dir,$name) = (/(.*])(.*)/s);
- $dir =~ s/.*lib[\.\]]//s;
- $dir =~ s#[\.\]]#/#g;
- $_ = $dir . $name;
- }
- autosplit_file(catfile($lib, $_), catfile($lib, "auto"),
- $Keep, $CheckForAutoloader, $CheckModTime);
- }
- 0;
-}
-
-
-# private functions
-
-my $self_mod_time = (stat __FILE__)[9];
-
-sub autosplit_file {
- my($filename, $autodir, $keep, $check_for_autoloader, $check_mod_time)
- = @_;
- my(@outfiles);
- local($_);
- local($/) = "\n";
-
- # where to write output files
- $autodir ||= catfile(curdir(), "lib", "auto");
- if ($Is_VMS) {
- ($autodir = VMS::Filespec::unixpath($autodir)) =~ s|/\z||;
- $filename = VMS::Filespec::unixify($filename); # may have dirs
- }
- unless (-d $autodir){
- mkpath($autodir,0,0755);
- # We should never need to create the auto dir
- # here. installperl (or similar) should have done
- # it. Expecting it to exist is a valuable sanity check against
- # autosplitting into some random directory by mistake.
- print "Warning: AutoSplit had to create top-level " .
- "$autodir unexpectedly.\n";
- }
-
- # allow just a package name to be used
- $filename .= ".pm" unless ($filename =~ m/\.pm\z/);
-
- open(my $in, "<$filename") or die "AutoSplit: Can't open $filename: $!\n";
- my($pm_mod_time) = (stat($filename))[9];
- my($autoloader_seen) = 0;
- my($in_pod) = 0;
- my($def_package,$last_package,$this_package,$fnr);
- while (<$in>) {
- # Skip pod text.
- $fnr++;
- $in_pod = 1 if /^=\w/;
- $in_pod = 0 if /^=cut/;
- next if ($in_pod || /^=cut/);
- next if /^\s*#/;
-
- # record last package name seen
- $def_package = $1 if (m/^\s*package\s+([\w:]+)\s*;/);
- ++$autoloader_seen if m/^\s*(use|require)\s+AutoLoader\b/;
- ++$autoloader_seen if m/\bISA\s*=.*\bAutoLoader\b/;
- last if /^__END__/;
- }
- if ($check_for_autoloader && !$autoloader_seen){
- print "AutoSplit skipped $filename: no AutoLoader used\n"
- if ($Verbose>=2);
- return 0;
- }
- $_ or die "Can't find __END__ in $filename\n";
-
- $def_package or die "Can't find 'package Name;' in $filename\n";
-
- my($modpname) = _modpname($def_package);
-
- # this _has_ to match so we have a reasonable timestamp file
- die "Package $def_package ($modpname.pm) does not ".
- "match filename $filename"
- unless ($filename =~ m/\Q$modpname.pm\E$/ or
- ($^O eq 'dos') or ($^O eq 'MSWin32') or ($^O eq 'NetWare') or
- $Is_VMS && $filename =~ m/$modpname.pm/i);
-
- my($al_idx_file) = catfile($autodir, $modpname, $IndexFile);
-
- if ($check_mod_time){
- my($al_ts_time) = (stat("$al_idx_file"))[9] || 1;
- if ($al_ts_time >= $pm_mod_time and
- $al_ts_time >= $self_mod_time){
- print "AutoSplit skipped ($al_idx_file newer than $filename)\n"
- if ($Verbose >= 2);
- return undef; # one undef, not a list
- }
- }
-
- my($modnamedir) = catdir($autodir, $modpname);
- print "AutoSplitting $filename ($modnamedir)\n"
- if $Verbose;
-
- unless (-d $modnamedir){
- mkpath($modnamedir,0,0777);
- }
-
- # We must try to deal with some SVR3 systems with a limit of 14
- # characters for file names. Sadly we *cannot* simply truncate all
- # file names to 14 characters on these systems because we *must*
- # create filenames which exactly match the names used by AutoLoader.pm.
- # This is a problem because some systems silently truncate the file
- # names while others treat long file names as an error.
-
- my $Is83 = $maxflen==11; # plain, case INSENSITIVE dos filenames
-
- my(@subnames, $subname, %proto, %package);
- my @cache = ();
- my $caching = 1;
- $last_package = '';
- my $out;
- while (<$in>) {
- $fnr++;
- $in_pod = 1 if /^=\w/;
- $in_pod = 0 if /^=cut/;
- next if ($in_pod || /^=cut/);
- # the following (tempting) old coding gives big troubles if a
- # cut is forgotten at EOF:
- # next if /^=\w/ .. /^=cut/;
- if (/^package\s+([\w:]+)\s*;/) {
- $this_package = $def_package = $1;
- }
-
- if (/^sub\s+([\w:]+)(\s*(?:\(.*?\))?(?:$attr_list)?)/) {
- print $out "# end of $last_package\::$subname\n1;\n"
- if $last_package;
- $subname = $1;
- my $proto = $2 || '';
- if ($subname =~ s/(.*):://){
- $this_package = $1;
- } else {
- $this_package = $def_package;
- }
- my $fq_subname = "$this_package\::$subname";
- $package{$fq_subname} = $this_package;
- $proto{$fq_subname} = $proto;
- push(@subnames, $fq_subname);
- my($lname, $sname) = ($subname, substr($subname,0,$maxflen-3));
- $modpname = _modpname($this_package);
- my($modnamedir) = catdir($autodir, $modpname);
- mkpath($modnamedir,0,0777);
- my($lpath) = catfile($modnamedir, "$lname.al");
- my($spath) = catfile($modnamedir, "$sname.al");
- my $path;
-
- if (!$Is83 and open($out, ">$lpath")){
- $path=$lpath;
- print " writing $lpath\n" if ($Verbose>=2);
- } else {
- open($out, ">$spath") or die "Can't create $spath: $!\n";
- $path=$spath;
- print " writing $spath (with truncated name)\n"
- if ($Verbose>=1);
- }
- push(@outfiles, $path);
- my $lineno = $fnr - @cache;
- print $out <<EOT;
-# NOTE: Derived from $filename.
-# Changes made here will be lost when autosplit is run again.
-# See AutoSplit.pm.
-package $this_package;
-
-#line $lineno "$filename (autosplit into $path)"
-EOT
- print $out @cache;
- @cache = ();
- $caching = 0;
- }
- if($caching) {
- push(@cache, $_) if @cache || /\S/;
- } else {
- print $out $_;
- }
- if(/^\}/) {
- if($caching) {
- print $out @cache;
- @cache = ();
- }
- print $out "\n";
- $caching = 1;
- }
- $last_package = $this_package if defined $this_package;
- }
- if ($subname) {
- print $out @cache,"1;\n# end of $last_package\::$subname\n";
- close($out);
- }
- close($in);
-
- if (!$keep){ # don't keep any obsolete *.al files in the directory
- my(%outfiles);
- # @outfiles{@outfiles} = @outfiles;
- # perl downcases all filenames on VMS (which upcases all filenames) so
- # we'd better downcase the sub name list too, or subs with upper case
- # letters in them will get their .al files deleted right after they're
- # created. (The mixed case sub name won't match the all-lowercase
- # filename, and so be cleaned up as a scrap file)
- if ($Is_VMS or $Is83) {
- %outfiles = map {lc($_) => lc($_) } @outfiles;
- } else {
- @outfiles{@outfiles} = @outfiles;
- }
- my(%outdirs, at outdirs);
- for (@outfiles) {
- $outdirs{File::Basename::dirname($_)}||=1;
- }
- for my $dir (keys %outdirs) {
- opendir(my $outdir,$dir);
- foreach (sort readdir($outdir)){
- next unless /\.al\z/;
- my($file) = catfile($dir, $_);
- $file = lc $file if $Is83 or $Is_VMS;
- next if $outfiles{$file};
- print " deleting $file\n" if ($Verbose>=2);
- my($deleted,$thistime); # catch all versions on VMS
- do { $deleted += ($thistime = unlink $file) } while ($thistime);
- carp ("Unable to delete $file: $!") unless $deleted;
- }
- closedir($outdir);
- }
- }
-
- open(my $ts,">$al_idx_file") or
- carp ("AutoSplit: unable to create timestamp file ($al_idx_file): $!");
- print $ts "# Index created by AutoSplit for $filename\n";
- print $ts "# (file acts as timestamp)\n";
- $last_package = '';
- for my $fqs (@subnames) {
- my($subname) = $fqs;
- $subname =~ s/.*:://;
- print $ts "package $package{$fqs};\n"
- unless $last_package eq $package{$fqs};
- print $ts "sub $subname $proto{$fqs};\n";
- $last_package = $package{$fqs};
- }
- print $ts "1;\n";
- close($ts);
-
- _check_unique($filename, $Maxlen, 1, @outfiles);
-
- @outfiles;
-}
-
-sub _modpname ($) {
- my($package) = @_;
- my $modpname = $package;
- if ($^O eq 'MSWin32') {
- $modpname =~ s#::#\\#g;
- } else {
- my @modpnames = ();
- while ($modpname =~ m#(.*?[^:])::([^:].*)#) {
- push @modpnames, $1;
- $modpname = $2;
- }
- $modpname = catfile(@modpnames, $modpname);
- }
- if ($Is_VMS) {
- $modpname = VMS::Filespec::unixify($modpname); # may have dirs
- }
- $modpname;
-}
-
-sub _check_unique {
- my($filename, $maxlen, $warn, @outfiles) = @_;
- my(%notuniq) = ();
- my(%shorts) = ();
- my(@toolong) = grep(
- length(File::Basename::basename($_))
- > $maxlen,
- @outfiles
- );
-
- foreach (@toolong){
- my($dir) = File::Basename::dirname($_);
- my($file) = File::Basename::basename($_);
- my($trunc) = substr($file,0,$maxlen);
- $notuniq{$dir}{$trunc} = 1 if $shorts{$dir}{$trunc};
- $shorts{$dir}{$trunc} = $shorts{$dir}{$trunc} ?
- "$shorts{$dir}{$trunc}, $file" : $file;
- }
- if (%notuniq && $warn){
- print "$filename: some names are not unique when " .
- "truncated to $maxlen characters:\n";
- foreach my $dir (sort keys %notuniq){
- print " directory $dir:\n";
- foreach my $trunc (sort keys %{$notuniq{$dir}}) {
- print " $shorts{$dir}{$trunc} truncate to $trunc\n";
- }
- }
- }
-}
-
-1;
-__END__
-
-# test functions so AutoSplit.pm can be applied to itself:
-sub test1 ($) { "test 1\n"; }
-sub test2 ($$) { "test 2\n"; }
-sub test3 ($$$) { "test 3\n"; }
-sub testtesttesttest4_1 { "test 4\n"; }
-sub testtesttesttest4_2 { "duplicate test 4\n"; }
-sub Just::Another::test5 { "another test 5\n"; }
-sub test6 { return join ":", __FILE__,__LINE__; }
-package Yet::Another::AutoSplit;
-sub testtesttesttest4_1 ($) { "another test 4\n"; }
-sub testtesttesttest4_2 ($$) { "another duplicate test 4\n"; }
-package Yet::More::Attributes;
-sub test_a1 ($) : locked :locked { 1; }
-sub test_a2 : locked { 1; }
Deleted: vendor/perl/dist/lib/AutoSplit.t
===================================================================
--- vendor/perl/dist/lib/AutoSplit.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/AutoSplit.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,419 +0,0 @@
-#!./perl -w
-
-# AutoLoader.t runs before this test, so it seems safe to assume that it will
-# work.
-
-my($incdir, $lib);
-BEGIN {
- chdir 't' if -d 't';
- if ($^O eq 'dos') {
- print "1..0 # This test is not 8.3-aware.\n";
- exit 0;
- }
- if ($^O eq 'MacOS') {
- $incdir = ":auto-$$";
- $lib = '-I::lib:';
- } else {
- $incdir = "auto-$$";
- $lib = '"-I../lib"'; # ok on unix, nt, The extra \" are for VMS
- }
- @INC = $incdir;
- push @INC, '../lib';
-}
-my $runperl = "$^X $lib";
-
-use warnings;
-use strict;
-use Test::More tests => 58;
-use File::Spec;
-use File::Find;
-
-require AutoSplit; # Run time. Check it compiles.
-ok (1, "AutoSplit loaded");
-
-END {
- use File::Path;
- print "# $incdir being removed...\n";
- rmtree($incdir);
-}
-
-mkdir $incdir,0755;
-
-my @tests;
-{
- # local this else it buggers up the chomp() below.
- # Hmm. Would be nice to have this as a regexp.
- local $/
- = "################################################################\n";
- @tests = <DATA>;
- close DATA;
-}
-
-my $pathsep = $^O eq 'MSWin32' ? '\\' : $^O eq 'MacOS' ? ':' : '/';
-my $endpathsep = $^O eq 'MacOS' ? ':' : '';
-
-sub split_a_file {
- my $contents = shift;
- my $file = $_[0];
- if (defined $contents) {
- open FILE, ">$file" or die "Can't open $file: $!";
- print FILE $contents;
- close FILE or die "Can't close $file: $!";
- }
-
- # Assumption: no characters in arguments need escaping from the shell or perl
- my $com = qq($runperl -e "use AutoSplit; autosplit (qw(@_))");
- print "# command: $com\n";
- # There may be a way to capture STDOUT without spawning a child process, but
- # it's probably worthwhile spawning, as it ensures that nothing in AutoSplit
- # can load functions from split modules into this perl.
- my $output = `$com`;
- warn "Exit status $? from running: >>$com<<" if $?;
- return $output;
-}
-
-my $i = 0;
-my $dir = File::Spec->catdir($incdir, 'auto');
-if ($^O eq 'VMS') {
- $dir = VMS::Filespec::unixify($dir);
- $dir =~ s/\/$//;
-} elsif ($^O eq 'MacOS') {
- $dir =~ s/:$//;
-}
-
-foreach (@tests) {
- my $module = 'A' . $i . '_' . $$ . 'splittest';
- my $file = File::Spec->catfile($incdir,"$module.pm");
- s/\*INC\*/$incdir/gm;
- s/\*DIR\*/$dir/gm;
- s/\*MOD\*/$module/gm;
- s/\*PATHSEP\*/$pathsep/gm;
- s/\*ENDPATHSEP\*/$endpathsep/gm;
- s#//#/#gm;
- # Build a hash for this test.
- my %args = /^\#\#\ ([^\n]*)\n # Key is on a line starting ##
- ((?:[^\#]+ # Any number of characters not #
- | \#(?!\#) # or a # character not followed by #
- | (?<!\n)\# # or a # character not preceded by \n
- )*)/sgmx;
- foreach ($args{Name}, $args{Require}, $args{Extra}) {
- chomp $_ if defined $_;
- }
- $args{Get} ||= '';
-
- my @extra_args = !defined $args{Extra} ? () : split /,/, $args{Extra};
- my ($output, $body);
- if ($args{File}) {
- $body ="package $module;\n" . $args{File};
- $output = split_a_file ($body, $file, $dir, @extra_args);
- } else {
- # Repeat tests
- $output = split_a_file (undef, $file, $dir, @extra_args);
- }
-
- if ($^O eq 'VMS') {
- my ($filespec, $replacement);
- while ($output =~ m/(\[.+\])/) {
- $filespec = $1;
- $replacement = VMS::Filespec::unixify($filespec);
- $replacement =~ s/\/$//;
- $output =~ s/\Q$filespec\E/$replacement/;
- }
- }
-
- # test n+1
- is($output, $args{Get}, "Output from autosplit()ing $args{Name}");
-
- if ($args{Files}) {
- $args{Files} =~ s!/!:!gs if $^O eq 'MacOS';
- my (%missing, %got);
- find (sub {$got{$File::Find::name}++ unless -d $_}, $dir);
- foreach (split /\n/, $args{Files}) {
- next if /^#/;
- $_ = lc($_) if $^O eq 'VMS';
- unless (delete $got{$_}) {
- $missing{$_}++;
- }
- }
- my @missing = keys %missing;
- # test n+2
- unless (ok (!@missing, "Are any expected files missing?")) {
- print "# These files are missing\n";
- print "# $_\n" foreach sort @missing;
- }
- my @extra = keys %got;
- # test n+3
- unless (ok (!@extra, "Are any extra files present?")) {
- print "# These files are unexpectedly present:\n";
- print "# $_\n" foreach sort @extra;
- }
- }
- if ($args{Require}) {
- $args{Require} =~ s|/|:|gm if $^O eq 'MacOS';
- my $com = 'require "' . File::Spec->catfile ('auto', $args{Require}) . '"';
- $com =~ s{\\}{/}gm if ($^O eq 'MSWin32');
- eval $com;
- # test n+3
- ok ($@ eq '', $com) or print "# \$\@ = '$@'\n";
- if (defined $body) {
- eval $body or die $@;
- }
- }
- # match tests to check for prototypes
- if ($args{Match}) {
- local $/;
- my $file = File::Spec->catfile($dir, $args{Require});
- open IX, $file or die "Can't open '$file': $!";
- my $ix = <IX>;
- close IX or die "Can't close '$file': $!";
- foreach my $pat (split /\n/, $args{Match}) {
- next if $pat =~ /^\#/;
- like ($ix, qr/^\s*$pat\s*$/m, "match $pat");
- }
- }
- # code tests contain eval{}ed ok()s etc
- if ($args{Tests}) {
- foreach my $code (split /\n/, $args{Tests}) {
- next if $code =~ /^\#/;
- defined eval $code or fail(), print "# Code: $code\n# Error: $@";
- }
- }
- if (my $sleepfor = $args{Sleep}) {
- # We need to sleep for a while
- # Need the sleep hack else the next test is so fast that the timestamp
- # compare routine in AutoSplit thinks that it shouldn't split the files.
- my $time = time;
- my $until = $time + $sleepfor;
- my $attempts = 3;
- do {
- sleep ($sleepfor)
- } while (time < $until && --$attempts > 0);
- if ($attempts == 0) {
- printf << "EOM", time;
-# Attempted to sleep for $sleepfor second(s), started at $time, now %d.
-# sleep attempt ppears to have failed; some tests may fail as a result.
-EOM
- }
- }
- unless ($args{SameAgain}) {
- $i++;
- rmtree($dir);
- mkdir $dir, 0775;
- }
-}
-
-__DATA__
-## Name
-tests from the end of the AutoSplit module.
-## File
-use AutoLoader 'AUTOLOAD';
-{package Just::Another;
- use AutoLoader 'AUTOLOAD';
-}
- at Yet::Another::AutoSplit::ISA = 'AutoLoader';
-1;
-__END__
-sub test1 ($) { "test 1"; }
-sub test2 ($$) { "test 2"; }
-sub test3 ($$$) { "test 3"; }
-sub testtesttesttest4_1 { "test 4"; }
-sub testtesttesttest4_2 { "duplicate test 4"; }
-sub Just::Another::test5 { "another test 5"; }
-sub test6 { return join ":", __FILE__,__LINE__; }
-package Yet::Another::AutoSplit;
-sub testtesttesttest4_1 ($) { "another test 4"; }
-sub testtesttesttest4_2 ($$) { "another duplicate test 4"; }
-package Yet::More::Attributes;
-sub test_a1 ($) : locked :locked { 1; }
-sub test_a2 : locked { 1; }
-# And that was all it has. You were expected to manually inspect the output
-## Get
-Warning: AutoSplit had to create top-level *DIR* unexpectedly.
-AutoSplitting *INC**PATHSEP**MOD*.pm (*DIR**PATHSEP**MOD**ENDPATHSEP*)
-*INC**PATHSEP**MOD*.pm: some names are not unique when truncated to 8 characters:
- directory *DIR**PATHSEP**MOD**ENDPATHSEP*:
- testtesttesttest4_1.al, testtesttesttest4_2.al truncate to testtest
- directory *DIR**PATHSEP*Yet*PATHSEP*Another*PATHSEP*AutoSplit*ENDPATHSEP*:
- testtesttesttest4_1.al, testtesttesttest4_2.al truncate to testtest
-## Files
-*DIR*/*MOD*/autosplit.ix
-*DIR*/*MOD*/test1.al
-*DIR*/*MOD*/test2.al
-*DIR*/*MOD*/test3.al
-*DIR*/*MOD*/testtesttesttest4_1.al
-*DIR*/*MOD*/testtesttesttest4_2.al
-*DIR*/Just/Another/test5.al
-*DIR*/*MOD*/test6.al
-*DIR*/Yet/Another/AutoSplit/testtesttesttest4_1.al
-*DIR*/Yet/Another/AutoSplit/testtesttesttest4_2.al
-*DIR*/Yet/More/Attributes/test_a1.al
-*DIR*/Yet/More/Attributes/test_a2.al
-## Require
-*MOD*/autosplit.ix
-## Match
-# Need to find these lines somewhere in the required file
-sub test1\s*\(\$\);
-sub test2\s*\(\$\$\);
-sub test3\s*\(\$\$\$\);
-sub testtesttesttest4_1\s*\(\$\);
-sub testtesttesttest4_2\s*\(\$\$\);
-sub test_a1\s*\(\$\)\s*:\s*locked\s*:\s*locked\s*;
-sub test_a2\s*:\s*locked\s*;
-## Tests
-is (*MOD*::test1 (1), 'test 1');
-is (*MOD*::test2 (1,2), 'test 2');
-is (*MOD*::test3 (1,2,3), 'test 3');
-ok (!defined eval "*MOD*::test1 () eq 'test 1'" and $@ =~ /^Not enough arguments for *MOD*::test1/, "Check prototypes mismatch fails") or print "# \$\@='$@'";
-is (&*MOD*::testtesttesttest4_1, "test 4");
-is (&*MOD*::testtesttesttest4_2, "duplicate test 4");
-is (&Just::Another::test5, "another test 5");
-# very messy way to interpolate function into regexp, but it's going to be
-# needed to get : for Mac filespecs
-like (&*MOD*::test6, qr!^\Q*INC**PATHSEP**MOD*\E\.pm \(autosplit into \Q@{[File::Spec->catfile('*DIR*','*MOD*', 'test6.al')]}\E\):\d+$!);
-ok (Yet::Another::AutoSplit->testtesttesttest4_1 eq "another test 4");
-################################################################
-## Name
-missing use AutoLoader;
-## File
-1;
-__END__
-## Get
-## Files
-# There should be no files.
-################################################################
-## Name
-missing use AutoLoader; (but don't skip)
-## Extra
-0, 0
-## File
-1;
-__END__
-## Get
-AutoSplitting *INC**PATHSEP**MOD*.pm (*DIR**PATHSEP**MOD**ENDPATHSEP*)
-## Require
-*MOD*/autosplit.ix
-## Files
-*DIR*/*MOD*/autosplit.ix
-################################################################
-## Name
-Split prior to checking whether obsolete files get deleted
-## File
-use AutoLoader 'AUTOLOAD';
-1;
-__END__
-sub obsolete {our $hidden_a; return $hidden_a++;}
-sub gonner {warn "This gonner function should never get called"}
-## Get
-AutoSplitting *INC**PATHSEP**MOD*.pm (*DIR**PATHSEP**MOD**ENDPATHSEP*)
-## Require
-*MOD*/autosplit.ix
-## Files
-*DIR*/*MOD*/autosplit.ix
-*DIR*/*MOD*/gonner.al
-*DIR*/*MOD*/obsolete.al
-## Tests
-is (&*MOD*::obsolete, 0);
-is (&*MOD*::obsolete, 1);
-## Sleep
-4
-## SameAgain
-True, so don't scrub this directory.
-IIRC DOS FAT filesystems have only 2 second granularity.
-################################################################
-## Name
-Check whether obsolete files get deleted
-## File
-use AutoLoader 'AUTOLOAD';
-1;
-__END__
-sub skeleton {"bones"};
-sub ghost {"scream"}; # This definition gets overwritten with the one below
-sub ghoul {"wail"};
-sub zombie {"You didn't use fire."};
-sub flying_pig {"Oink oink flap flap"};
-## Get
-AutoSplitting *INC**PATHSEP**MOD*.pm (*DIR**PATHSEP**MOD**ENDPATHSEP*)
-## Require
-*MOD*/autosplit.ix
-## Files
-*DIR*/*MOD*/autosplit.ix
-*DIR*/*MOD*/skeleton.al
-*DIR*/*MOD*/zombie.al
-*DIR*/*MOD*/ghost.al
-*DIR*/*MOD*/ghoul.al
-*DIR*/*MOD*/flying_pig.al
-## Tests
-is (&*MOD*::skeleton, "bones", "skeleton");
-eval {&*MOD*::gonner}; ok ($@ =~ m!^Can't locate auto/*MOD*/gonner.al in \@INC!, "Check &*MOD*::gonner is now a gonner") or print "# \$\@='$@'\n";
-## Sleep
-4
-## SameAgain
-True, so don't scrub this directory.
-################################################################
-## Name
-Check whether obsolete files remain when keep is 1
-## Extra
-1, 1
-## File
-use AutoLoader 'AUTOLOAD';
-1;
-__END__
-sub ghost {"bump"};
-sub wraith {9};
-## Get
-AutoSplitting *INC**PATHSEP**MOD*.pm (*DIR**PATHSEP**MOD**ENDPATHSEP*)
-## Require
-*MOD*/autosplit.ix
-## Files
-*DIR*/*MOD*/autosplit.ix
-*DIR*/*MOD*/skeleton.al
-*DIR*/*MOD*/zombie.al
-*DIR*/*MOD*/ghost.al
-*DIR*/*MOD*/ghoul.al
-*DIR*/*MOD*/wraith.al
-*DIR*/*MOD*/flying_pig.al
-## Tests
-is (&*MOD*::ghost, "bump");
-is (&*MOD*::zombie, "You didn't use fire.", "Are our zombies undead?");
-## Sleep
-4
-## SameAgain
-True, so don't scrub this directory.
-################################################################
-## Name
-Without the timestamp check make sure that nothing happens
-## Extra
-0, 1, 1
-## Require
-*MOD*/autosplit.ix
-## Files
-*DIR*/*MOD*/autosplit.ix
-*DIR*/*MOD*/skeleton.al
-*DIR*/*MOD*/zombie.al
-*DIR*/*MOD*/ghost.al
-*DIR*/*MOD*/ghoul.al
-*DIR*/*MOD*/wraith.al
-*DIR*/*MOD*/flying_pig.al
-## Tests
-is (&*MOD*::ghoul, "wail", "still haunted");
-is (&*MOD*::zombie, "You didn't use fire.", "Are our zombies still undead?");
-## Sleep
-4
-## SameAgain
-True, so don't scrub this directory.
-################################################################
-## Name
-With the timestamp check make sure that things happen (stuff gets deleted)
-## Extra
-0, 1, 0
-## Get
-AutoSplitting *INC**PATHSEP**MOD*.pm (*DIR**PATHSEP**MOD**ENDPATHSEP*)
-## Require
-*MOD*/autosplit.ix
-## Files
-*DIR*/*MOD*/autosplit.ix
-*DIR*/*MOD*/ghost.al
-*DIR*/*MOD*/wraith.al
-## Tests
-is (&*MOD*::wraith, 9);
-eval {&*MOD*::flying_pig}; ok ($@ =~ m!^Can't locate auto/*MOD*/flying_pig.al in \@INC!, "There are no flying pigs") or print "# \$\@='$@'\n";
Deleted: vendor/perl/dist/lib/CGI.pm
===================================================================
--- vendor/perl/dist/lib/CGI.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/CGI.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7885 +0,0 @@
-package CGI;
-require 5.004;
-use Carp 'croak';
-
-# See the bottom of this file for the POD documentation. Search for the
-# string '=head'.
-
-# You can run this file through either pod2man or pod2html to produce pretty
-# documentation in manual or html file format (these utilities are part of the
-# Perl 5 distribution).
-
-# Copyright 1995-1998 Lincoln D. Stein. All rights reserved.
-# It may be used and modified freely, but I do request that this copyright
-# notice remain attached to the file. You may modify this module as you
-# wish, but if you redistribute a modified version, please attach a note
-# listing the modifications you have made.
-
-# The most recent version and complete docs are available at:
-# http://stein.cshl.org/WWW/software/CGI/
-
-$CGI::revision = '$Id: CGI.pm,v 1.1.1.2 2011-02-17 12:49:38 laffer1 Exp $';
-$CGI::VERSION='3.43';
-
-# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
-# UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
-# $CGITempFile::TMPDIRECTORY = '/usr/tmp';
-use CGI::Util qw(rearrange rearrange_header make_attributes unescape escape expires ebcdic2ascii ascii2ebcdic);
-
-#use constant XHTML_DTD => ['-//W3C//DTD XHTML Basic 1.0//EN',
-# 'http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd'];
-
-use constant XHTML_DTD => ['-//W3C//DTD XHTML 1.0 Transitional//EN',
- 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'];
-
-{
- local $^W = 0;
- $TAINTED = substr("$0$^X",0,0);
-}
-
-$MOD_PERL = 0; # no mod_perl by default
-
-#global settings
-$POST_MAX = -1; # no limit to uploaded files
-$DISABLE_UPLOADS = 0;
-
- at SAVED_SYMBOLS = ();
-
-
-# >>>>> Here are some globals that you might want to adjust <<<<<<
-sub initialize_globals {
- # Set this to 1 to enable copious autoloader debugging messages
- $AUTOLOAD_DEBUG = 0;
-
- # Set this to 1 to generate XTML-compatible output
- $XHTML = 1;
-
- # Change this to the preferred DTD to print in start_html()
- # or use default_dtd('text of DTD to use');
- $DEFAULT_DTD = [ '-//W3C//DTD HTML 4.01 Transitional//EN',
- 'http://www.w3.org/TR/html4/loose.dtd' ] ;
-
- # Set this to 1 to enable NOSTICKY scripts
- # or:
- # 1) use CGI qw(-nosticky)
- # 2) $CGI::nosticky(1)
- $NOSTICKY = 0;
-
- # Set this to 1 to enable NPH scripts
- # or:
- # 1) use CGI qw(-nph)
- # 2) CGI::nph(1)
- # 3) print header(-nph=>1)
- $NPH = 0;
-
- # Set this to 1 to enable debugging from @ARGV
- # Set to 2 to enable debugging from STDIN
- $DEBUG = 1;
-
- # Set this to 1 to make the temporary files created
- # during file uploads safe from prying eyes
- # or do...
- # 1) use CGI qw(:private_tempfiles)
- # 2) CGI::private_tempfiles(1);
- $PRIVATE_TEMPFILES = 0;
-
- # Set this to 1 to generate automatic tab indexes
- $TABINDEX = 0;
-
- # Set this to 1 to cause files uploaded in multipart documents
- # to be closed, instead of caching the file handle
- # or:
- # 1) use CGI qw(:close_upload_files)
- # 2) $CGI::close_upload_files(1);
- # Uploads with many files run out of file handles.
- # Also, for performance, since the file is already on disk,
- # it can just be renamed, instead of read and written.
- $CLOSE_UPLOAD_FILES = 0;
-
- # Automatically determined -- don't change
- $EBCDIC = 0;
-
- # Change this to 1 to suppress redundant HTTP headers
- $HEADERS_ONCE = 0;
-
- # separate the name=value pairs by semicolons rather than ampersands
- $USE_PARAM_SEMICOLONS = 1;
-
- # Do not include undefined params parsed from query string
- # use CGI qw(-no_undef_params);
- $NO_UNDEF_PARAMS = 0;
-
- # return everything as utf-8
- $PARAM_UTF8 = 0;
-
- # Other globals that you shouldn't worry about.
- undef $Q;
- $BEEN_THERE = 0;
- $DTD_PUBLIC_IDENTIFIER = "";
- undef @QUERY_PARAM;
- undef %EXPORT;
- undef $QUERY_CHARSET;
- undef %QUERY_FIELDNAMES;
- undef %QUERY_TMPFILES;
-
- # prevent complaints by mod_perl
- 1;
-}
-
-# ------------------ START OF THE LIBRARY ------------
-
-*end_form = \&endform;
-
-# make mod_perlhappy
-initialize_globals();
-
-# FIGURE OUT THE OS WE'RE RUNNING UNDER
-# Some systems support the $^O variable. If not
-# available then require() the Config library
-unless ($OS) {
- unless ($OS = $^O) {
- require Config;
- $OS = $Config::Config{'osname'};
- }
-}
-if ($OS =~ /^MSWin/i) {
- $OS = 'WINDOWS';
-} elsif ($OS =~ /^VMS/i) {
- $OS = 'VMS';
-} elsif ($OS =~ /^dos/i) {
- $OS = 'DOS';
-} elsif ($OS =~ /^MacOS/i) {
- $OS = 'MACINTOSH';
-} elsif ($OS =~ /^os2/i) {
- $OS = 'OS2';
-} elsif ($OS =~ /^epoc/i) {
- $OS = 'EPOC';
-} elsif ($OS =~ /^cygwin/i) {
- $OS = 'CYGWIN';
-} else {
- $OS = 'UNIX';
-}
-
-# Some OS logic. Binary mode enabled on DOS, NT and VMS
-$needs_binmode = $OS=~/^(WINDOWS|DOS|OS2|MSWin|CYGWIN)/;
-
-# This is the default class for the CGI object to use when all else fails.
-$DefaultClass = 'CGI' unless defined $CGI::DefaultClass;
-
-# This is where to look for autoloaded routines.
-$AutoloadClass = $DefaultClass unless defined $CGI::AutoloadClass;
-
-# The path separator is a slash, backslash or semicolon, depending
-# on the paltform.
-$SL = {
- UNIX => '/', OS2 => '\\', EPOC => '/', CYGWIN => '/',
- WINDOWS => '\\', DOS => '\\', MACINTOSH => ':', VMS => '/'
- }->{$OS};
-
-# This no longer seems to be necessary
-# Turn on NPH scripts by default when running under IIS server!
-# $NPH++ if defined($ENV{'SERVER_SOFTWARE'}) && $ENV{'SERVER_SOFTWARE'}=~/IIS/;
-$IIS++ if defined($ENV{'SERVER_SOFTWARE'}) && $ENV{'SERVER_SOFTWARE'}=~/IIS/;
-
-# Turn on special checking for Doug MacEachern's modperl
-if (exists $ENV{MOD_PERL}) {
- # mod_perl handlers may run system() on scripts using CGI.pm;
- # Make sure so we don't get fooled by inherited $ENV{MOD_PERL}
- if (exists $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} == 2) {
- $MOD_PERL = 2;
- require Apache2::Response;
- require Apache2::RequestRec;
- require Apache2::RequestUtil;
- require Apache2::RequestIO;
- require APR::Pool;
- } else {
- $MOD_PERL = 1;
- require Apache;
- }
-}
-
-# Turn on special checking for ActiveState's PerlEx
-$PERLEX++ if defined($ENV{'GATEWAY_INTERFACE'}) && $ENV{'GATEWAY_INTERFACE'} =~ /^CGI-PerlEx/;
-
-# Define the CRLF sequence. I can't use a simple "\r\n" because the meaning
-# of "\n" is different on different OS's (sometimes it generates CRLF, sometimes LF
-# and sometimes CR). The most popular VMS web server
-# doesn't accept CRLF -- instead it wants a LR. EBCDIC machines don't
-# use ASCII, so \015\012 means something different. I find this all
-# really annoying.
-$EBCDIC = "\t" ne "\011";
-if ($OS eq 'VMS') {
- $CRLF = "\n";
-} elsif ($EBCDIC) {
- $CRLF= "\r\n";
-} else {
- $CRLF = "\015\012";
-}
-
-if ($needs_binmode) {
- $CGI::DefaultClass->binmode(\*main::STDOUT);
- $CGI::DefaultClass->binmode(\*main::STDIN);
- $CGI::DefaultClass->binmode(\*main::STDERR);
-}
-
-%EXPORT_TAGS = (
- ':html2'=>['h1'..'h6',qw/p br hr ol ul li dl dt dd menu code var strong em
- tt u i b blockquote pre img a address cite samp dfn html head
- base body Link nextid title meta kbd start_html end_html
- input Select option comment charset escapeHTML/],
- ':html3'=>[qw/div table caption th td TR Tr sup Sub strike applet Param nobr
- embed basefont style span layer ilayer font frameset frame script small big Area Map/],
- ':html4'=>[qw/abbr acronym bdo col colgroup del fieldset iframe
- ins label legend noframes noscript object optgroup Q
- thead tbody tfoot/],
- ':netscape'=>[qw/blink fontsize center/],
- ':form'=>[qw/textfield textarea filefield password_field hidden checkbox checkbox_group
- submit reset defaults radio_group popup_menu button autoEscape
- scrolling_list image_button start_form end_form startform endform
- start_multipart_form end_multipart_form isindex tmpFileName uploadInfo URL_ENCODED MULTIPART/],
- ':cgi'=>[qw/param upload path_info path_translated request_uri url self_url script_name
- cookie Dump
- raw_cookie request_method query_string Accept user_agent remote_host content_type
- remote_addr referer server_name server_software server_port server_protocol virtual_port
- virtual_host remote_ident auth_type http append
- save_parameters restore_parameters param_fetch
- remote_user user_name header redirect import_names put
- Delete Delete_all url_param cgi_error/],
- ':ssl' => [qw/https/],
- ':cgi-lib' => [qw/ReadParse PrintHeader HtmlTop HtmlBot SplitParam Vars/],
- ':html' => [qw/:html2 :html3 :html4 :netscape/],
- ':standard' => [qw/:html2 :html3 :html4 :form :cgi/],
- ':push' => [qw/multipart_init multipart_start multipart_end multipart_final/],
- ':all' => [qw/:html2 :html3 :netscape :form :cgi :internal :html4/]
- );
-
-# Custom 'can' method for both autoloaded and non-autoloaded subroutines.
-# Author: Cees Hek <cees at sitesuite.com.au>
-
-sub can {
- my($class, $method) = @_;
-
- # See if UNIVERSAL::can finds it.
-
- if (my $func = $class -> SUPER::can($method) ){
- return $func;
- }
-
- # Try to compile the function.
-
- eval {
- # _compile looks at $AUTOLOAD for the function name.
-
- local $AUTOLOAD = join "::", $class, $method;
- &_compile;
- };
-
- # Now that the function is loaded (if it exists)
- # just use UNIVERSAL::can again to do the work.
-
- return $class -> SUPER::can($method);
-}
-
-# to import symbols into caller
-sub import {
- my $self = shift;
-
- # This causes modules to clash.
- undef %EXPORT_OK;
- undef %EXPORT;
-
- $self->_setup_symbols(@_);
- my ($callpack, $callfile, $callline) = caller;
-
- # To allow overriding, search through the packages
- # Till we find one in which the correct subroutine is defined.
- my @packages = ($self,@{"$self\:\:ISA"});
- for $sym (keys %EXPORT) {
- my $pck;
- my $def = ${"$self\:\:AutoloadClass"} || $DefaultClass;
- for $pck (@packages) {
- if (defined(&{"$pck\:\:$sym"})) {
- $def = $pck;
- last;
- }
- }
- *{"${callpack}::$sym"} = \&{"$def\:\:$sym"};
- }
-}
-
-sub compile {
- my $pack = shift;
- $pack->_setup_symbols('-compile', at _);
-}
-
-sub expand_tags {
- my($tag) = @_;
- return ("start_$1","end_$1") if $tag=~/^(?:\*|start_|end_)(.+)/;
- my(@r);
- return ($tag) unless $EXPORT_TAGS{$tag};
- for (@{$EXPORT_TAGS{$tag}}) {
- push(@r,&expand_tags($_));
- }
- return @r;
-}
-
-#### Method: new
-# The new routine. This will check the current environment
-# for an existing query string, and initialize itself, if so.
-####
-sub new {
- my($class, at initializer) = @_;
- my $self = {};
-
- bless $self,ref $class || $class || $DefaultClass;
-
- # always use a tempfile
- $self->{'use_tempfile'} = 1;
-
- if (ref($initializer[0])
- && (UNIVERSAL::isa($initializer[0],'Apache')
- ||
- UNIVERSAL::isa($initializer[0],'Apache2::RequestRec')
- )) {
- $self->r(shift @initializer);
- }
- if (ref($initializer[0])
- && (UNIVERSAL::isa($initializer[0],'CODE'))) {
- $self->upload_hook(shift @initializer, shift @initializer);
- $self->{'use_tempfile'} = shift @initializer if (@initializer > 0);
- }
- if ($MOD_PERL) {
- if ($MOD_PERL == 1) {
- $self->r(Apache->request) unless $self->r;
- my $r = $self->r;
- $r->register_cleanup(\&CGI::_reset_globals);
- $self->_setup_symbols(@SAVED_SYMBOLS) if @SAVED_SYMBOLS;
- }
- else {
- # XXX: once we have the new API
- # will do a real PerlOptions -SetupEnv check
- $self->r(Apache2::RequestUtil->request) unless $self->r;
- my $r = $self->r;
- $r->subprocess_env unless exists $ENV{REQUEST_METHOD};
- $r->pool->cleanup_register(\&CGI::_reset_globals);
- $self->_setup_symbols(@SAVED_SYMBOLS) if @SAVED_SYMBOLS;
- }
- undef $NPH;
- }
- $self->_reset_globals if $PERLEX;
- $self->init(@initializer);
- return $self;
-}
-
-# We provide a DESTROY method so that we can ensure that
-# temporary files are closed (via Fh->DESTROY) before they
-# are unlinked (via CGITempFile->DESTROY) because it is not
-# possible to unlink an open file on Win32. We explicitly
-# call DESTROY on each, rather than just undefing them and
-# letting Perl DESTROY them by garbage collection, in case the
-# user is still holding any reference to them as well.
-sub DESTROY {
- my $self = shift;
- if ($OS eq 'WINDOWS') {
- for my $href (values %{$self->{'.tmpfiles'}}) {
- $href->{hndl}->DESTROY if defined $href->{hndl};
- $href->{name}->DESTROY if defined $href->{name};
- }
- }
-}
-
-sub r {
- my $self = shift;
- my $r = $self->{'.r'};
- $self->{'.r'} = shift if @_;
- $r;
-}
-
-sub upload_hook {
- my $self;
- if (ref $_[0] eq 'CODE') {
- $CGI::Q = $self = $CGI::DefaultClass->new(@_);
- } else {
- $self = shift;
- }
- my ($hook,$data,$use_tempfile) = @_;
- $self->{'.upload_hook'} = $hook;
- $self->{'.upload_data'} = $data;
- $self->{'use_tempfile'} = $use_tempfile if defined $use_tempfile;
-}
-
-#### Method: param
-# Returns the value(s)of a named parameter.
-# If invoked in a list context, returns the
-# entire list. Otherwise returns the first
-# member of the list.
-# If name is not provided, return a list of all
-# the known parameters names available.
-# If more than one argument is provided, the
-# second and subsequent arguments are used to
-# set the value of the parameter.
-####
-sub param {
- my($self, at p) = self_or_default(@_);
- return $self->all_parameters unless @p;
- my($name,$value, at other);
-
- # For compatibility between old calling style and use_named_parameters() style,
- # we have to special case for a single parameter present.
- if (@p > 1) {
- ($name,$value, at other) = rearrange([NAME,[DEFAULT,VALUE,VALUES]], at p);
- my(@values);
-
- if (substr($p[0],0,1) eq '-') {
- @values = defined($value) ? (ref($value) && ref($value) eq 'ARRAY' ? @{$value} : $value) : ();
- } else {
- for ($value, at other) {
- push(@values,$_) if defined($_);
- }
- }
- # If values is provided, then we set it.
- if (@values or defined $value) {
- $self->add_parameter($name);
- $self->{param}{$name}=[@values];
- }
- } else {
- $name = $p[0];
- }
-
- return unless defined($name) && $self->{param}{$name};
-
- my @result = @{$self->{param}{$name}};
-
- if ($PARAM_UTF8) {
- eval "require Encode; 1;" unless Encode->can('decode'); # bring in these functions
- @result = map {ref $_ ? $_ : Encode::decode(utf8=>$_) } @result;
- }
-
- return wantarray ? @result : $result[0];
-}
-
-sub self_or_default {
- return @_ if defined($_[0]) && (!ref($_[0])) &&($_[0] eq 'CGI');
- unless (defined($_[0]) &&
- (ref($_[0]) eq 'CGI' || UNIVERSAL::isa($_[0],'CGI')) # slightly optimized for common case
- ) {
- $Q = $CGI::DefaultClass->new unless defined($Q);
- unshift(@_,$Q);
- }
- return wantarray ? @_ : $Q;
-}
-
-sub self_or_CGI {
- local $^W=0; # prevent a warning
- if (defined($_[0]) &&
- (substr(ref($_[0]),0,3) eq 'CGI'
- || UNIVERSAL::isa($_[0],'CGI'))) {
- return @_;
- } else {
- return ($DefaultClass, at _);
- }
-}
-
-########################################
-# THESE METHODS ARE MORE OR LESS PRIVATE
-# GO TO THE __DATA__ SECTION TO SEE MORE
-# PUBLIC METHODS
-########################################
-
-# Initialize the query object from the environment.
-# If a parameter list is found, this object will be set
-# to a hash in which parameter names are keys
-# and the values are stored as lists
-# If a keyword list is found, this method creates a bogus
-# parameter list with the single parameter 'keywords'.
-
-sub init {
- my $self = shift;
- my($query_string,$meth,$content_length,$fh, at lines) = ('','','','');
-
- my $is_xforms;
-
- my $initializer = shift; # for backward compatibility
- local($/) = "\n";
-
- # set autoescaping on by default
- $self->{'escape'} = 1;
-
- # if we get called more than once, we want to initialize
- # ourselves from the original query (which may be gone
- # if it was read from STDIN originally.)
- if (defined(@QUERY_PARAM) && !defined($initializer)) {
- for my $name (@QUERY_PARAM) {
- my $val = $QUERY_PARAM{$name}; # always an arrayref;
- $self->param('-name'=>$name,'-value'=> $val);
- if (defined $val and ref $val eq 'ARRAY') {
- for my $fh (grep {defined(fileno($_))} @$val) {
- seek($fh,0,0); # reset the filehandle.
- }
-
- }
- }
- $self->charset($QUERY_CHARSET);
- $self->{'.fieldnames'} = {%QUERY_FIELDNAMES};
- $self->{'.tmpfiles'} = {%QUERY_TMPFILES};
- return;
- }
-
- $meth=$ENV{'REQUEST_METHOD'} if defined($ENV{'REQUEST_METHOD'});
- $content_length = defined($ENV{'CONTENT_LENGTH'}) ? $ENV{'CONTENT_LENGTH'} : 0;
-
- $fh = to_filehandle($initializer) if $initializer;
-
- # set charset to the safe ISO-8859-1
- $self->charset('ISO-8859-1');
-
- METHOD: {
-
- # avoid unreasonably large postings
- if (($POST_MAX > 0) && ($content_length > $POST_MAX)) {
- #discard the post, unread
- $self->cgi_error("413 Request entity too large");
- last METHOD;
- }
-
- # Process multipart postings, but only if the initializer is
- # not defined.
- if ($meth eq 'POST'
- && defined($ENV{'CONTENT_TYPE'})
- && $ENV{'CONTENT_TYPE'}=~m|^multipart/form-data|
- && !defined($initializer)
- ) {
- my($boundary) = $ENV{'CONTENT_TYPE'} =~ /boundary=\"?([^\";,]+)\"?/;
- $self->read_multipart($boundary,$content_length);
- last METHOD;
- }
-
- # Process XForms postings. We know that we have XForms in the
- # following cases:
- # method eq 'POST' && content-type eq 'application/xml'
- # method eq 'POST' && content-type =~ /multipart\/related.+start=/
- # There are more cases, actually, but for now, we don't support other
- # methods for XForm posts.
- # In a XForm POST, the QUERY_STRING is parsed normally.
- # If the content-type is 'application/xml', we just set the param
- # XForms:Model (referring to the xml syntax) param containing the
- # unparsed XML data.
- # In the case of multipart/related we set XForms:Model as above, but
- # the other parts are available as uploads with the Content-ID as the
- # the key.
- # See the URL below for XForms specs on this issue.
- # http://www.w3.org/TR/2006/REC-xforms-20060314/slice11.html#submit-options
- if ($meth eq 'POST' && defined($ENV{'CONTENT_TYPE'})) {
- if ($ENV{'CONTENT_TYPE'} eq 'application/xml') {
- my($param) = 'XForms:Model';
- my($value) = '';
- $self->add_parameter($param);
- $self->read_from_client(\$value,$content_length,0)
- if $content_length > 0;
- push (@{$self->{param}{$param}},$value);
- $is_xforms = 1;
- } elsif ($ENV{'CONTENT_TYPE'} =~ /multipart\/related.+boundary=\"?([^\";,]+)\"?.+start=\"?\<?([^\"\>]+)\>?\"?/) {
- my($boundary,$start) = ($1,$2);
- my($param) = 'XForms:Model';
- $self->add_parameter($param);
- my($value) = $self->read_multipart_related($start,$boundary,$content_length,0);
- push (@{$self->{param}{$param}},$value);
- if ($MOD_PERL) {
- $query_string = $self->r->args;
- } else {
- $query_string = $ENV{'QUERY_STRING'} if defined $ENV{'QUERY_STRING'};
- $query_string ||= $ENV{'REDIRECT_QUERY_STRING'} if defined $ENV{'REDIRECT_QUERY_STRING'};
- }
- $is_xforms = 1;
- }
- }
-
-
- # If initializer is defined, then read parameters
- # from it.
- if (!$is_xforms && defined($initializer)) {
- if (UNIVERSAL::isa($initializer,'CGI')) {
- $query_string = $initializer->query_string;
- last METHOD;
- }
- if (ref($initializer) && ref($initializer) eq 'HASH') {
- for (keys %$initializer) {
- $self->param('-name'=>$_,'-value'=>$initializer->{$_});
- }
- last METHOD;
- }
-
- if (defined($fh) && ($fh ne '')) {
- while (<$fh>) {
- chomp;
- last if /^=/;
- push(@lines,$_);
- }
- # massage back into standard format
- if ("@lines" =~ /=/) {
- $query_string=join("&", at lines);
- } else {
- $query_string=join("+", at lines);
- }
- last METHOD;
- }
-
- # last chance -- treat it as a string
- $initializer = $$initializer if ref($initializer) eq 'SCALAR';
- $query_string = $initializer;
-
- last METHOD;
- }
-
- # If method is GET or HEAD, fetch the query from
- # the environment.
- if ($is_xforms || $meth=~/^(GET|HEAD)$/) {
- if ($MOD_PERL) {
- $query_string = $self->r->args;
- } else {
- $query_string = $ENV{'QUERY_STRING'} if defined $ENV{'QUERY_STRING'};
- $query_string ||= $ENV{'REDIRECT_QUERY_STRING'} if defined $ENV{'REDIRECT_QUERY_STRING'};
- }
- last METHOD;
- }
-
- if ($meth eq 'POST' || $meth eq 'PUT') {
- $self->read_from_client(\$query_string,$content_length,0)
- if $content_length > 0;
- # Some people want to have their cake and eat it too!
- # Uncomment this line to have the contents of the query string
- # APPENDED to the POST data.
- # $query_string .= (length($query_string) ? '&' : '') . $ENV{'QUERY_STRING'} if defined $ENV{'QUERY_STRING'};
- last METHOD;
- }
-
- # If $meth is not of GET, POST or HEAD, assume we're being debugged offline.
- # Check the command line and then the standard input for data.
- # We use the shellwords package in order to behave the way that
- # UN*X programmers expect.
- if ($DEBUG)
- {
- my $cmdline_ret = read_from_cmdline();
- $query_string = $cmdline_ret->{'query_string'};
- if (defined($cmdline_ret->{'subpath'}))
- {
- $self->path_info($cmdline_ret->{'subpath'});
- }
- }
- }
-
-# YL: Begin Change for XML handler 10/19/2001
- if (!$is_xforms && ($meth eq 'POST' || $meth eq 'PUT')
- && defined($ENV{'CONTENT_TYPE'})
- && $ENV{'CONTENT_TYPE'} !~ m|^application/x-www-form-urlencoded|
- && $ENV{'CONTENT_TYPE'} !~ m|^multipart/form-data| ) {
- my($param) = $meth . 'DATA' ;
- $self->add_parameter($param) ;
- push (@{$self->{param}{$param}},$query_string);
- undef $query_string ;
- }
-# YL: End Change for XML handler 10/19/2001
-
- # We now have the query string in hand. We do slightly
- # different things for keyword lists and parameter lists.
- if (defined $query_string && length $query_string) {
- if ($query_string =~ /[&=;]/) {
- $self->parse_params($query_string);
- } else {
- $self->add_parameter('keywords');
- $self->{param}{'keywords'} = [$self->parse_keywordlist($query_string)];
- }
- }
-
- # Special case. Erase everything if there is a field named
- # .defaults.
- if ($self->param('.defaults')) {
- $self->delete_all();
- }
-
- # hash containing our defined fieldnames
- $self->{'.fieldnames'} = {};
- for ($self->param('.cgifields')) {
- $self->{'.fieldnames'}->{$_}++;
- }
-
- # Clear out our default submission button flag if present
- $self->delete('.submit');
- $self->delete('.cgifields');
-
- $self->save_request unless defined $initializer;
-}
-
-# FUNCTIONS TO OVERRIDE:
-# Turn a string into a filehandle
-sub to_filehandle {
- my $thingy = shift;
- return undef unless $thingy;
- return $thingy if UNIVERSAL::isa($thingy,'GLOB');
- return $thingy if UNIVERSAL::isa($thingy,'FileHandle');
- if (!ref($thingy)) {
- my $caller = 1;
- while (my $package = caller($caller++)) {
- my($tmp) = $thingy=~/[\':]/ ? $thingy : "$package\:\:$thingy";
- return $tmp if defined(fileno($tmp));
- }
- }
- return undef;
-}
-
-# send output to the browser
-sub put {
- my($self, at p) = self_or_default(@_);
- $self->print(@p);
-}
-
-# print to standard output (for overriding in mod_perl)
-sub print {
- shift;
- CORE::print(@_);
-}
-
-# get/set last cgi_error
-sub cgi_error {
- my ($self,$err) = self_or_default(@_);
- $self->{'.cgi_error'} = $err if defined $err;
- return $self->{'.cgi_error'};
-}
-
-sub save_request {
- my($self) = @_;
- # We're going to play with the package globals now so that if we get called
- # again, we initialize ourselves in exactly the same way. This allows
- # us to have several of these objects.
- @QUERY_PARAM = $self->param; # save list of parameters
- for (@QUERY_PARAM) {
- next unless defined $_;
- $QUERY_PARAM{$_}=$self->{param}{$_};
- }
- $QUERY_CHARSET = $self->charset;
- %QUERY_FIELDNAMES = %{$self->{'.fieldnames'}};
- %QUERY_TMPFILES = %{ $self->{'.tmpfiles'} || {} };
-}
-
-sub parse_params {
- my($self,$tosplit) = @_;
- my(@pairs) = split(/[&;]/,$tosplit);
- my($param,$value);
- for (@pairs) {
- ($param,$value) = split('=',$_,2);
- next unless defined $param;
- next if $NO_UNDEF_PARAMS and not defined $value;
- $value = '' unless defined $value;
- $param = unescape($param);
- $value = unescape($value);
- $self->add_parameter($param);
- push (@{$self->{param}{$param}},$value);
- }
-}
-
-sub add_parameter {
- my($self,$param)=@_;
- return unless defined $param;
- push (@{$self->{'.parameters'}},$param)
- unless defined($self->{param}{$param});
-}
-
-sub all_parameters {
- my $self = shift;
- return () unless defined($self) && $self->{'.parameters'};
- return () unless @{$self->{'.parameters'}};
- return @{$self->{'.parameters'}};
-}
-
-# put a filehandle into binary mode (DOS)
-sub binmode {
- return unless defined($_[1]) && defined fileno($_[1]);
- CORE::binmode($_[1]);
-}
-
-sub _make_tag_func {
- my ($self,$tagname) = @_;
- my $func = qq(
- sub $tagname {
- my (\$q,\$a,\@rest) = self_or_default(\@_);
- my(\$attr) = '';
- if (ref(\$a) && ref(\$a) eq 'HASH') {
- my(\@attr) = make_attributes(\$a,\$q->{'escape'});
- \$attr = " \@attr" if \@attr;
- } else {
- unshift \@rest,\$a if defined \$a;
- }
- );
- if ($tagname=~/start_(\w+)/i) {
- $func .= qq! return "<\L$1\E\$attr>";} !;
- } elsif ($tagname=~/end_(\w+)/i) {
- $func .= qq! return "<\L/$1\E>"; } !;
- } else {
- $func .= qq#
- return \$XHTML ? "\L<$tagname\E\$attr />" : "\L<$tagname\E\$attr>" unless \@rest;
- my(\$tag,\$untag) = ("\L<$tagname\E\$attr>","\L</$tagname>\E");
- my \@result = map { "\$tag\$_\$untag" }
- (ref(\$rest[0]) eq 'ARRAY') ? \@{\$rest[0]} : "\@rest";
- return "\@result";
- }#;
- }
-return $func;
-}
-
-sub AUTOLOAD {
- print STDERR "CGI::AUTOLOAD for $AUTOLOAD\n" if $CGI::AUTOLOAD_DEBUG;
- my $func = &_compile;
- goto &$func;
-}
-
-sub _compile {
- my($func) = $AUTOLOAD;
- my($pack,$func_name);
- {
- local($1,$2); # this fixes an obscure variable suicide problem.
- $func=~/(.+)::([^:]+)$/;
- ($pack,$func_name) = ($1,$2);
- $pack=~s/::SUPER$//; # fix another obscure problem
- $pack = ${"$pack\:\:AutoloadClass"} || $CGI::DefaultClass
- unless defined(${"$pack\:\:AUTOLOADED_ROUTINES"});
-
- my($sub) = \%{"$pack\:\:SUBS"};
- unless (%$sub) {
- my($auto) = \${"$pack\:\:AUTOLOADED_ROUTINES"};
- local ($@,$!);
- eval "package $pack; $$auto";
- croak("$AUTOLOAD: $@") if $@;
- $$auto = ''; # Free the unneeded storage (but don't undef it!!!)
- }
- my($code) = $sub->{$func_name};
-
- $code = "sub $AUTOLOAD { }" if (!$code and $func_name eq 'DESTROY');
- if (!$code) {
- (my $base = $func_name) =~ s/^(start_|end_)//i;
- if ($EXPORT{':any'} ||
- $EXPORT{'-any'} ||
- $EXPORT{$base} ||
- (%EXPORT_OK || grep(++$EXPORT_OK{$_},&expand_tags(':html')))
- && $EXPORT_OK{$base}) {
- $code = $CGI::DefaultClass->_make_tag_func($func_name);
- }
- }
- croak("Undefined subroutine $AUTOLOAD\n") unless $code;
- local ($@,$!);
- eval "package $pack; $code";
- if ($@) {
- $@ =~ s/ at .*\n//;
- croak("$AUTOLOAD: $@");
- }
- }
- CORE::delete($sub->{$func_name}); #free storage
- return "$pack\:\:$func_name";
-}
-
-sub _selected {
- my $self = shift;
- my $value = shift;
- return '' unless $value;
- return $XHTML ? qq(selected="selected" ) : qq(selected );
-}
-
-sub _checked {
- my $self = shift;
- my $value = shift;
- return '' unless $value;
- return $XHTML ? qq(checked="checked" ) : qq(checked );
-}
-
-sub _reset_globals { initialize_globals(); }
-
-sub _setup_symbols {
- my $self = shift;
- my $compile = 0;
-
- # to avoid reexporting unwanted variables
- undef %EXPORT;
-
- for (@_) {
- $HEADERS_ONCE++, next if /^[:-]unique_headers$/;
- $NPH++, next if /^[:-]nph$/;
- $NOSTICKY++, next if /^[:-]nosticky$/;
- $DEBUG=0, next if /^[:-]no_?[Dd]ebug$/;
- $DEBUG=2, next if /^[:-][Dd]ebug$/;
- $USE_PARAM_SEMICOLONS++, next if /^[:-]newstyle_urls$/;
- $PARAM_UTF8++, next if /^[:-]utf8$/;
- $XHTML++, next if /^[:-]xhtml$/;
- $XHTML=0, next if /^[:-]no_?xhtml$/;
- $USE_PARAM_SEMICOLONS=0, next if /^[:-]oldstyle_urls$/;
- $PRIVATE_TEMPFILES++, next if /^[:-]private_tempfiles$/;
- $TABINDEX++, next if /^[:-]tabindex$/;
- $CLOSE_UPLOAD_FILES++, next if /^[:-]close_upload_files$/;
- $EXPORT{$_}++, next if /^[:-]any$/;
- $compile++, next if /^[:-]compile$/;
- $NO_UNDEF_PARAMS++, next if /^[:-]no_undef_params$/;
-
- # This is probably extremely evil code -- to be deleted some day.
- if (/^[-]autoload$/) {
- my($pkg) = caller(1);
- *{"${pkg}::AUTOLOAD"} = sub {
- my($routine) = $AUTOLOAD;
- $routine =~ s/^.*::/CGI::/;
- &$routine;
- };
- next;
- }
-
- for (&expand_tags($_)) {
- tr/a-zA-Z0-9_//cd; # don't allow weird function names
- $EXPORT{$_}++;
- }
- }
- _compile_all(keys %EXPORT) if $compile;
- @SAVED_SYMBOLS = @_;
-}
-
-sub charset {
- my ($self,$charset) = self_or_default(@_);
- $self->{'.charset'} = $charset if defined $charset;
- $self->{'.charset'};
-}
-
-sub element_id {
- my ($self,$new_value) = self_or_default(@_);
- $self->{'.elid'} = $new_value if defined $new_value;
- sprintf('%010d',$self->{'.elid'}++);
-}
-
-sub element_tab {
- my ($self,$new_value) = self_or_default(@_);
- $self->{'.etab'} ||= 1;
- $self->{'.etab'} = $new_value if defined $new_value;
- my $tab = $self->{'.etab'}++;
- return '' unless $TABINDEX or defined $new_value;
- return qq(tabindex="$tab" );
-}
-
-###############################################################################
-################# THESE FUNCTIONS ARE AUTOLOADED ON DEMAND ####################
-###############################################################################
-$AUTOLOADED_ROUTINES = ''; # get rid of -w warning
-$AUTOLOADED_ROUTINES=<<'END_OF_AUTOLOAD';
-
-%SUBS = (
-
-'URL_ENCODED'=> <<'END_OF_FUNC',
-sub URL_ENCODED { 'application/x-www-form-urlencoded'; }
-END_OF_FUNC
-
-'MULTIPART' => <<'END_OF_FUNC',
-sub MULTIPART { 'multipart/form-data'; }
-END_OF_FUNC
-
-'SERVER_PUSH' => <<'END_OF_FUNC',
-sub SERVER_PUSH { 'multipart/x-mixed-replace;boundary="' . shift() . '"'; }
-END_OF_FUNC
-
-'new_MultipartBuffer' => <<'END_OF_FUNC',
-# Create a new multipart buffer
-sub new_MultipartBuffer {
- my($self,$boundary,$length) = @_;
- return MultipartBuffer->new($self,$boundary,$length);
-}
-END_OF_FUNC
-
-'read_from_client' => <<'END_OF_FUNC',
-# Read data from a file handle
-sub read_from_client {
- my($self, $buff, $len, $offset) = @_;
- local $^W=0; # prevent a warning
- return $MOD_PERL
- ? $self->r->read($$buff, $len, $offset)
- : read(\*STDIN, $$buff, $len, $offset);
-}
-END_OF_FUNC
-
-'delete' => <<'END_OF_FUNC',
-#### Method: delete
-# Deletes the named parameter entirely.
-####
-sub delete {
- my($self, at p) = self_or_default(@_);
- my(@names) = rearrange([NAME], at p);
- my @to_delete = ref($names[0]) eq 'ARRAY' ? @$names[0] : @names;
- my %to_delete;
- for my $name (@to_delete)
- {
- CORE::delete $self->{param}{$name};
- CORE::delete $self->{'.fieldnames'}->{$name};
- $to_delete{$name}++;
- }
- @{$self->{'.parameters'}}=grep { !exists($to_delete{$_}) } $self->param();
- return;
-}
-END_OF_FUNC
-
-#### Method: import_names
-# Import all parameters into the given namespace.
-# Assumes namespace 'Q' if not specified
-####
-'import_names' => <<'END_OF_FUNC',
-sub import_names {
- my($self,$namespace,$delete) = self_or_default(@_);
- $namespace = 'Q' unless defined($namespace);
- die "Can't import names into \"main\"\n" if \%{"${namespace}::"} == \%::;
- if ($delete || $MOD_PERL || exists $ENV{'FCGI_ROLE'}) {
- # can anyone find an easier way to do this?
- for (keys %{"${namespace}::"}) {
- local *symbol = "${namespace}::${_}";
- undef $symbol;
- undef @symbol;
- undef %symbol;
- }
- }
- my($param, at value,$var);
- for $param ($self->param) {
- # protect against silly names
- ($var = $param)=~tr/a-zA-Z0-9_/_/c;
- $var =~ s/^(?=\d)/_/;
- local *symbol = "${namespace}::$var";
- @value = $self->param($param);
- @symbol = @value;
- $symbol = $value[0];
- }
-}
-END_OF_FUNC
-
-#### Method: keywords
-# Keywords acts a bit differently. Calling it in a list context
-# returns the list of keywords.
-# Calling it in a scalar context gives you the size of the list.
-####
-'keywords' => <<'END_OF_FUNC',
-sub keywords {
- my($self, at values) = self_or_default(@_);
- # If values is provided, then we set it.
- $self->{param}{'keywords'}=[@values] if @values;
- my(@result) = defined($self->{param}{'keywords'}) ? @{$self->{param}{'keywords'}} : ();
- @result;
-}
-END_OF_FUNC
-
-# These are some tie() interfaces for compatibility
-# with Steve Brenner's cgi-lib.pl routines
-'Vars' => <<'END_OF_FUNC',
-sub Vars {
- my $q = shift;
- my %in;
- tie(%in,CGI,$q);
- return %in if wantarray;
- return \%in;
-}
-END_OF_FUNC
-
-# These are some tie() interfaces for compatibility
-# with Steve Brenner's cgi-lib.pl routines
-'ReadParse' => <<'END_OF_FUNC',
-sub ReadParse {
- local(*in);
- if (@_) {
- *in = $_[0];
- } else {
- my $pkg = caller();
- *in=*{"${pkg}::in"};
- }
- tie(%in,CGI);
- return scalar(keys %in);
-}
-END_OF_FUNC
-
-'PrintHeader' => <<'END_OF_FUNC',
-sub PrintHeader {
- my($self) = self_or_default(@_);
- return $self->header();
-}
-END_OF_FUNC
-
-'HtmlTop' => <<'END_OF_FUNC',
-sub HtmlTop {
- my($self, at p) = self_or_default(@_);
- return $self->start_html(@p);
-}
-END_OF_FUNC
-
-'HtmlBot' => <<'END_OF_FUNC',
-sub HtmlBot {
- my($self, at p) = self_or_default(@_);
- return $self->end_html(@p);
-}
-END_OF_FUNC
-
-'SplitParam' => <<'END_OF_FUNC',
-sub SplitParam {
- my ($param) = @_;
- my (@params) = split ("\0", $param);
- return (wantarray ? @params : $params[0]);
-}
-END_OF_FUNC
-
-'MethGet' => <<'END_OF_FUNC',
-sub MethGet {
- return request_method() eq 'GET';
-}
-END_OF_FUNC
-
-'MethPost' => <<'END_OF_FUNC',
-sub MethPost {
- return request_method() eq 'POST';
-}
-END_OF_FUNC
-
-'TIEHASH' => <<'END_OF_FUNC',
-sub TIEHASH {
- my $class = shift;
- my $arg = $_[0];
- if (ref($arg) && UNIVERSAL::isa($arg,'CGI')) {
- return $arg;
- }
- return $Q ||= $class->new(@_);
-}
-END_OF_FUNC
-
-'STORE' => <<'END_OF_FUNC',
-sub STORE {
- my $self = shift;
- my $tag = shift;
- my $vals = shift;
- my @vals = index($vals,"\0")!=-1 ? split("\0",$vals) : $vals;
- $self->param(-name=>$tag,-value=>\@vals);
-}
-END_OF_FUNC
-
-'FETCH' => <<'END_OF_FUNC',
-sub FETCH {
- return $_[0] if $_[1] eq 'CGI';
- return undef unless defined $_[0]->param($_[1]);
- return join("\0",$_[0]->param($_[1]));
-}
-END_OF_FUNC
-
-'FIRSTKEY' => <<'END_OF_FUNC',
-sub FIRSTKEY {
- $_[0]->{'.iterator'}=0;
- $_[0]->{'.parameters'}->[$_[0]->{'.iterator'}++];
-}
-END_OF_FUNC
-
-'NEXTKEY' => <<'END_OF_FUNC',
-sub NEXTKEY {
- $_[0]->{'.parameters'}->[$_[0]->{'.iterator'}++];
-}
-END_OF_FUNC
-
-'EXISTS' => <<'END_OF_FUNC',
-sub EXISTS {
- exists $_[0]->{param}{$_[1]};
-}
-END_OF_FUNC
-
-'DELETE' => <<'END_OF_FUNC',
-sub DELETE {
- $_[0]->delete($_[1]);
-}
-END_OF_FUNC
-
-'CLEAR' => <<'END_OF_FUNC',
-sub CLEAR {
- %{$_[0]}=();
-}
-####
-END_OF_FUNC
-
-####
-# Append a new value to an existing query
-####
-'append' => <<'EOF',
-sub append {
- my($self, at p) = self_or_default(@_);
- my($name,$value) = rearrange([NAME,[VALUE,VALUES]], at p);
- my(@values) = defined($value) ? (ref($value) ? @{$value} : $value) : ();
- if (@values) {
- $self->add_parameter($name);
- push(@{$self->{param}{$name}}, at values);
- }
- return $self->param($name);
-}
-EOF
-
-#### Method: delete_all
-# Delete all parameters
-####
-'delete_all' => <<'EOF',
-sub delete_all {
- my($self) = self_or_default(@_);
- my @param = $self->param();
- $self->delete(@param);
-}
-EOF
-
-'Delete' => <<'EOF',
-sub Delete {
- my($self, at p) = self_or_default(@_);
- $self->delete(@p);
-}
-EOF
-
-'Delete_all' => <<'EOF',
-sub Delete_all {
- my($self, at p) = self_or_default(@_);
- $self->delete_all(@p);
-}
-EOF
-
-#### Method: autoescape
-# If you want to turn off the autoescaping features,
-# call this method with undef as the argument
-'autoEscape' => <<'END_OF_FUNC',
-sub autoEscape {
- my($self,$escape) = self_or_default(@_);
- my $d = $self->{'escape'};
- $self->{'escape'} = $escape;
- $d;
-}
-END_OF_FUNC
-
-
-#### Method: version
-# Return the current version
-####
-'version' => <<'END_OF_FUNC',
-sub version {
- return $VERSION;
-}
-END_OF_FUNC
-
-#### Method: url_param
-# Return a parameter in the QUERY_STRING, regardless of
-# whether this was a POST or a GET
-####
-'url_param' => <<'END_OF_FUNC',
-sub url_param {
- my ($self, at p) = self_or_default(@_);
- my $name = shift(@p);
- return undef unless exists($ENV{QUERY_STRING});
- unless (exists($self->{'.url_param'})) {
- $self->{'.url_param'}={}; # empty hash
- if ($ENV{QUERY_STRING} =~ /=/) {
- my(@pairs) = split(/[&;]/,$ENV{QUERY_STRING});
- my($param,$value);
- for (@pairs) {
- ($param,$value) = split('=',$_,2);
- $param = unescape($param);
- $value = unescape($value);
- push(@{$self->{'.url_param'}->{$param}},$value);
- }
- } else {
- $self->{'.url_param'}->{'keywords'} = [$self->parse_keywordlist($ENV{QUERY_STRING})];
- }
- }
- return keys %{$self->{'.url_param'}} unless defined($name);
- return () unless $self->{'.url_param'}->{$name};
- return wantarray ? @{$self->{'.url_param'}->{$name}}
- : $self->{'.url_param'}->{$name}->[0];
-}
-END_OF_FUNC
-
-#### Method: Dump
-# Returns a string in which all the known parameter/value
-# pairs are represented as nested lists, mainly for the purposes
-# of debugging.
-####
-'Dump' => <<'END_OF_FUNC',
-sub Dump {
- my($self) = self_or_default(@_);
- my($param,$value, at result);
- return '<ul></ul>' unless $self->param;
- push(@result,"<ul>");
- for $param ($self->param) {
- my($name)=$self->escapeHTML($param);
- push(@result,"<li><strong>$param</strong></li>");
- push(@result,"<ul>");
- for $value ($self->param($param)) {
- $value = $self->escapeHTML($value);
- $value =~ s/\n/<br \/>\n/g;
- push(@result,"<li>$value</li>");
- }
- push(@result,"</ul>");
- }
- push(@result,"</ul>");
- return join("\n", at result);
-}
-END_OF_FUNC
-
-#### Method as_string
-#
-# synonym for "dump"
-####
-'as_string' => <<'END_OF_FUNC',
-sub as_string {
- &Dump(@_);
-}
-END_OF_FUNC
-
-#### Method: save
-# Write values out to a filehandle in such a way that they can
-# be reinitialized by the filehandle form of the new() method
-####
-'save' => <<'END_OF_FUNC',
-sub save {
- my($self,$filehandle) = self_or_default(@_);
- $filehandle = to_filehandle($filehandle);
- my($param);
- local($,) = ''; # set print field separator back to a sane value
- local($\) = ''; # set output line separator to a sane value
- for $param ($self->param) {
- my($escaped_param) = escape($param);
- my($value);
- for $value ($self->param($param)) {
- print $filehandle "$escaped_param=",escape("$value"),"\n";
- }
- }
- for (keys %{$self->{'.fieldnames'}}) {
- print $filehandle ".cgifields=",escape("$_"),"\n";
- }
- print $filehandle "=\n"; # end of record
-}
-END_OF_FUNC
-
-
-#### Method: save_parameters
-# An alias for save() that is a better name for exportation.
-# Only intended to be used with the function (non-OO) interface.
-####
-'save_parameters' => <<'END_OF_FUNC',
-sub save_parameters {
- my $fh = shift;
- return save(to_filehandle($fh));
-}
-END_OF_FUNC
-
-#### Method: restore_parameters
-# A way to restore CGI parameters from an initializer.
-# Only intended to be used with the function (non-OO) interface.
-####
-'restore_parameters' => <<'END_OF_FUNC',
-sub restore_parameters {
- $Q = $CGI::DefaultClass->new(@_);
-}
-END_OF_FUNC
-
-#### Method: multipart_init
-# Return a Content-Type: style header for server-push
-# This has to be NPH on most web servers, and it is advisable to set $| = 1
-#
-# Many thanks to Ed Jordan <ed at fidalgo.net> for this
-# contribution, updated by Andrew Benham (adsb at bigfoot.com)
-####
-'multipart_init' => <<'END_OF_FUNC',
-sub multipart_init {
- my($self, at p) = self_or_default(@_);
- my($boundary, at other) = rearrange_header([BOUNDARY], at p);
- $boundary = $boundary || '------- =_aaaaaaaaaa0';
- $self->{'separator'} = "$CRLF--$boundary$CRLF";
- $self->{'final_separator'} = "$CRLF--$boundary--$CRLF";
- $type = SERVER_PUSH($boundary);
- return $self->header(
- -nph => 0,
- -type => $type,
- (map { split "=", $_, 2 } @other),
- ) . "WARNING: YOUR BROWSER DOESN'T SUPPORT THIS SERVER-PUSH TECHNOLOGY." . $self->multipart_end;
-}
-END_OF_FUNC
-
-
-#### Method: multipart_start
-# Return a Content-Type: style header for server-push, start of section
-#
-# Many thanks to Ed Jordan <ed at fidalgo.net> for this
-# contribution, updated by Andrew Benham (adsb at bigfoot.com)
-####
-'multipart_start' => <<'END_OF_FUNC',
-sub multipart_start {
- my(@header);
- my($self, at p) = self_or_default(@_);
- my($type, at other) = rearrange([TYPE], at p);
- $type = $type || 'text/html';
- push(@header,"Content-Type: $type");
-
- # rearrange() was designed for the HTML portion, so we
- # need to fix it up a little.
- for (@other) {
- # Don't use \s because of perl bug 21951
- next unless my($header,$value) = /([^ \r\n\t=]+)=\"?(.+?)\"?$/;
- ($_ = $header) =~ s/^(\w)(.*)/$1 . lc ($2) . ': '.$self->unescapeHTML($value)/e;
- }
- push(@header, at other);
- my $header = join($CRLF, at header)."${CRLF}${CRLF}";
- return $header;
-}
-END_OF_FUNC
-
-
-#### Method: multipart_end
-# Return a MIME boundary separator for server-push, end of section
-#
-# Many thanks to Ed Jordan <ed at fidalgo.net> for this
-# contribution
-####
-'multipart_end' => <<'END_OF_FUNC',
-sub multipart_end {
- my($self, at p) = self_or_default(@_);
- return $self->{'separator'};
-}
-END_OF_FUNC
-
-
-#### Method: multipart_final
-# Return a MIME boundary separator for server-push, end of all sections
-#
-# Contributed by Andrew Benham (adsb at bigfoot.com)
-####
-'multipart_final' => <<'END_OF_FUNC',
-sub multipart_final {
- my($self, at p) = self_or_default(@_);
- return $self->{'final_separator'} . "WARNING: YOUR BROWSER DOESN'T SUPPORT THIS SERVER-PUSH TECHNOLOGY." . $CRLF;
-}
-END_OF_FUNC
-
-
-#### Method: header
-# Return a Content-Type: style header
-#
-####
-'header' => <<'END_OF_FUNC',
-sub header {
- my($self, at p) = self_or_default(@_);
- my(@header);
-
- return "" if $self->{'.header_printed'}++ and $HEADERS_ONCE;
-
- my($type,$status,$cookie,$target,$expires,$nph,$charset,$attachment,$p3p, at other) =
- rearrange([['TYPE','CONTENT_TYPE','CONTENT-TYPE'],
- 'STATUS',['COOKIE','COOKIES'],'TARGET',
- 'EXPIRES','NPH','CHARSET',
- 'ATTACHMENT','P3P'], at p);
-
- $nph ||= $NPH;
-
- $type ||= 'text/html' unless defined($type);
-
- if (defined $charset) {
- $self->charset($charset);
- } else {
- $charset = $self->charset if $type =~ /^text\//;
- }
- $charset ||= '';
-
- # rearrange() was designed for the HTML portion, so we
- # need to fix it up a little.
- for (@other) {
- # Don't use \s because of perl bug 21951
- next unless my($header,$value) = /([^ \r\n\t=]+)=\"?(.+?)\"?$/;
- ($_ = $header) =~ s/^(\w)(.*)/"\u$1\L$2" . ': '.$self->unescapeHTML($value)/e;
- }
-
- $type .= "; charset=$charset"
- if $type ne ''
- and $type !~ /\bcharset\b/
- and defined $charset
- and $charset ne '';
-
- # Maybe future compatibility. Maybe not.
- my $protocol = $ENV{SERVER_PROTOCOL} || 'HTTP/1.0';
- push(@header,$protocol . ' ' . ($status || '200 OK')) if $nph;
- push(@header,"Server: " . &server_software()) if $nph;
-
- push(@header,"Status: $status") if $status;
- push(@header,"Window-Target: $target") if $target;
- if ($p3p) {
- $p3p = join ' ',@$p3p if ref($p3p) eq 'ARRAY';
- push(@header,qq(P3P: policyref="/w3c/p3p.xml", CP="$p3p"));
- }
- # push all the cookies -- there may be several
- if ($cookie) {
- my(@cookie) = ref($cookie) && ref($cookie) eq 'ARRAY' ? @{$cookie} : $cookie;
- for (@cookie) {
- my $cs = UNIVERSAL::isa($_,'CGI::Cookie') ? $_->as_string : $_;
- push(@header,"Set-Cookie: $cs") if $cs ne '';
- }
- }
- # if the user indicates an expiration time, then we need
- # both an Expires and a Date header (so that the browser is
- # uses OUR clock)
- push(@header,"Expires: " . expires($expires,'http'))
- if $expires;
- push(@header,"Date: " . expires(0,'http')) if $expires || $cookie || $nph;
- push(@header,"Pragma: no-cache") if $self->cache();
- push(@header,"Content-Disposition: attachment; filename=\"$attachment\"") if $attachment;
- push(@header,map {ucfirst $_} @other);
- push(@header,"Content-Type: $type") if $type ne '';
- my $header = join($CRLF, at header)."${CRLF}${CRLF}";
- if (($MOD_PERL >= 1) && !$nph) {
- $self->r->send_cgi_header($header);
- return '';
- }
- return $header;
-}
-END_OF_FUNC
-
-
-#### Method: cache
-# Control whether header() will produce the no-cache
-# Pragma directive.
-####
-'cache' => <<'END_OF_FUNC',
-sub cache {
- my($self,$new_value) = self_or_default(@_);
- $new_value = '' unless $new_value;
- if ($new_value ne '') {
- $self->{'cache'} = $new_value;
- }
- return $self->{'cache'};
-}
-END_OF_FUNC
-
-
-#### Method: redirect
-# Return a Location: style header
-#
-####
-'redirect' => <<'END_OF_FUNC',
-sub redirect {
- my($self, at p) = self_or_default(@_);
- my($url,$target,$status,$cookie,$nph, at other) =
- rearrange([[LOCATION,URI,URL],TARGET,STATUS,['COOKIE','COOKIES'],NPH], at p);
- $status = '302 Found' unless defined $status;
- $url ||= $self->self_url;
- my(@o);
- for (@other) { tr/\"//d; push(@o,split("=",$_,2)); }
- unshift(@o,
- '-Status' => $status,
- '-Location'=> $url,
- '-nph' => $nph);
- unshift(@o,'-Target'=>$target) if $target;
- unshift(@o,'-Type'=>'');
- my @unescaped;
- unshift(@unescaped,'-Cookie'=>$cookie) if $cookie;
- return $self->header((map {$self->unescapeHTML($_)} @o), at unescaped);
-}
-END_OF_FUNC
-
-
-#### Method: start_html
-# Canned HTML header
-#
-# Parameters:
-# $title -> (optional) The title for this HTML document (-title)
-# $author -> (optional) e-mail address of the author (-author)
-# $base -> (optional) if set to true, will enter the BASE address of this document
-# for resolving relative references (-base)
-# $xbase -> (optional) alternative base at some remote location (-xbase)
-# $target -> (optional) target window to load all links into (-target)
-# $script -> (option) Javascript code (-script)
-# $no_script -> (option) Javascript <noscript> tag (-noscript)
-# $meta -> (optional) Meta information tags
-# $head -> (optional) any other elements you'd like to incorporate into the <head> tag
-# (a scalar or array ref)
-# $style -> (optional) reference to an external style sheet
-# @other -> (optional) any other named parameters you'd like to incorporate into
-# the <body> tag.
-####
-'start_html' => <<'END_OF_FUNC',
-sub start_html {
- my($self, at p) = &self_or_default(@_);
- my($title,$author,$base,$xbase,$script,$noscript,
- $target,$meta,$head,$style,$dtd,$lang,$encoding,$declare_xml, at other) =
- rearrange([TITLE,AUTHOR,BASE,XBASE,SCRIPT,NOSCRIPT,TARGET,
- META,HEAD,STYLE,DTD,LANG,ENCODING,DECLARE_XML], at p);
-
- $self->element_id(0);
- $self->element_tab(0);
-
- $encoding = lc($self->charset) unless defined $encoding;
-
- # Need to sort out the DTD before it's okay to call escapeHTML().
- my(@result,$xml_dtd);
- if ($dtd) {
- if (defined(ref($dtd)) and (ref($dtd) eq 'ARRAY')) {
- $dtd = $DEFAULT_DTD unless $dtd->[0] =~ m|^-//|;
- } else {
- $dtd = $DEFAULT_DTD unless $dtd =~ m|^-//|;
- }
- } else {
- $dtd = $XHTML ? XHTML_DTD : $DEFAULT_DTD;
- }
-
- $xml_dtd++ if ref($dtd) eq 'ARRAY' && $dtd->[0] =~ /\bXHTML\b/i;
- $xml_dtd++ if ref($dtd) eq '' && $dtd =~ /\bXHTML\b/i;
- push @result,qq(<?xml version="1.0" encoding="$encoding"?>) if $xml_dtd && $declare_xml;
-
- if (ref($dtd) && ref($dtd) eq 'ARRAY') {
- push(@result,qq(<!DOCTYPE html\n\tPUBLIC "$dtd->[0]"\n\t "$dtd->[1]">));
- $DTD_PUBLIC_IDENTIFIER = $dtd->[0];
- } else {
- push(@result,qq(<!DOCTYPE html\n\tPUBLIC "$dtd">));
- $DTD_PUBLIC_IDENTIFIER = $dtd;
- }
-
- # Now that we know whether we're using the HTML 3.2 DTD or not, it's okay to
- # call escapeHTML(). Strangely enough, the title needs to be escaped as
- # HTML while the author needs to be escaped as a URL.
- $title = $self->escapeHTML($title || 'Untitled Document');
- $author = $self->escape($author);
-
- if ($DTD_PUBLIC_IDENTIFIER =~ /[^X]HTML (2\.0|3\.2)/i) {
- $lang = "" unless defined $lang;
- $XHTML = 0;
- }
- else {
- $lang = 'en-US' unless defined $lang;
- }
-
- my $lang_bits = $lang ne '' ? qq( lang="$lang" xml:lang="$lang") : '';
- my $meta_bits = qq(<meta http-equiv="Content-Type" content="text/html; charset=$encoding" />)
- if $XHTML && $encoding && !$declare_xml;
-
- push(@result,$XHTML ? qq(<html xmlns="http://www.w3.org/1999/xhtml"$lang_bits>\n<head>\n<title>$title</title>)
- : ($lang ? qq(<html lang="$lang">) : "<html>")
- . "<head><title>$title</title>");
- if (defined $author) {
- push(@result,$XHTML ? "<link rev=\"made\" href=\"mailto:$author\" />"
- : "<link rev=\"made\" href=\"mailto:$author\">");
- }
-
- if ($base || $xbase || $target) {
- my $href = $xbase || $self->url('-path'=>1);
- my $t = $target ? qq/ target="$target"/ : '';
- push(@result,$XHTML ? qq(<base href="$href"$t />) : qq(<base href="$href"$t>));
- }
-
- if ($meta && ref($meta) && (ref($meta) eq 'HASH')) {
- for (keys %$meta) { push(@result,$XHTML ? qq(<meta name="$_" content="$meta->{$_}" />)
- : qq(<meta name="$_" content="$meta->{$_}">)); }
- }
-
- my $meta_bits_set = 0;
- if( $head ) {
- if( ref $head ) {
- push @result, @$head;
- $meta_bits_set = 1 if grep { /http-equiv=["']Content-Type/i }@$head;
- }
- else {
- push @result, $head;
- $meta_bits_set = 1 if $head =~ /http-equiv=["']Content-Type/i;
- }
- }
-
- # handle the infrequently-used -style and -script parameters
- push(@result,$self->_style($style)) if defined $style;
- push(@result,$self->_script($script)) if defined $script;
- push(@result,$meta_bits) if defined $meta_bits and !$meta_bits_set;
-
- # handle -noscript parameter
- push(@result,<<END) if $noscript;
-<noscript>
-$noscript
-</noscript>
-END
- ;
- my($other) = @other ? " @other" : '';
- push(@result,"</head>\n<body$other>\n");
- return join("\n", at result);
-}
-END_OF_FUNC
-
-### Method: _style
-# internal method for generating a CSS style section
-####
-'_style' => <<'END_OF_FUNC',
-sub _style {
- my ($self,$style) = @_;
- my (@result);
-
- my $type = 'text/css';
- my $rel = 'stylesheet';
-
-
- my $cdata_start = $XHTML ? "\n<!--/* <![CDATA[ */" : "\n<!-- ";
- my $cdata_end = $XHTML ? "\n/* ]]> */-->\n" : " -->\n";
-
- my @s = ref($style) eq 'ARRAY' ? @$style : $style;
- my $other = '';
-
- for my $s (@s) {
- if (ref($s)) {
- my($src,$code,$verbatim,$stype,$alternate,$foo, at other) =
- rearrange([qw(SRC CODE VERBATIM TYPE ALTERNATE FOO)],
- ('-foo'=>'bar',
- ref($s) eq 'ARRAY' ? @$s : %$s));
- my $type = defined $stype ? $stype : 'text/css';
- my $rel = $alternate ? 'alternate stylesheet' : 'stylesheet';
- $other = "@other" if @other;
-
- if (ref($src) eq "ARRAY") # Check to see if the $src variable is an array reference
- { # If it is, push a LINK tag for each one
- for $src (@$src)
- {
- push(@result,$XHTML ? qq(<link rel="$rel" type="$type" href="$src" $other/>)
- : qq(<link rel="$rel" type="$type" href="$src"$other>)) if $src;
- }
- }
- else
- { # Otherwise, push the single -src, if it exists.
- push(@result,$XHTML ? qq(<link rel="$rel" type="$type" href="$src" $other/>)
- : qq(<link rel="$rel" type="$type" href="$src"$other>)
- ) if $src;
- }
- if ($verbatim) {
- my @v = ref($verbatim) eq 'ARRAY' ? @$verbatim : $verbatim;
- push(@result, "<style type=\"text/css\">\n$_\n</style>") for @v;
- }
- my @c = ref($code) eq 'ARRAY' ? @$code : $code if $code;
- push(@result,style({'type'=>$type},"$cdata_start\n$_\n$cdata_end")) for @c;
-
- } else {
- my $src = $s;
- push(@result,$XHTML ? qq(<link rel="$rel" type="$type" href="$src" $other/>)
- : qq(<link rel="$rel" type="$type" href="$src"$other>));
- }
- }
- @result;
-}
-END_OF_FUNC
-
-'_script' => <<'END_OF_FUNC',
-sub _script {
- my ($self,$script) = @_;
- my (@result);
-
- my (@scripts) = ref($script) eq 'ARRAY' ? @$script : ($script);
- for $script (@scripts) {
- my($src,$code,$language);
- if (ref($script)) { # script is a hash
- ($src,$code,$type) =
- rearrange(['SRC','CODE',['LANGUAGE','TYPE']],
- '-foo'=>'bar', # a trick to allow the '-' to be omitted
- ref($script) eq 'ARRAY' ? @$script : %$script);
- $type ||= 'text/javascript';
- unless ($type =~ m!\w+/\w+!) {
- $type =~ s/[\d.]+$//;
- $type = "text/$type";
- }
- } else {
- ($src,$code,$type) = ('',$script, 'text/javascript');
- }
-
- my $comment = '//'; # javascript by default
- $comment = '#' if $type=~/perl|tcl/i;
- $comment = "'" if $type=~/vbscript/i;
-
- my ($cdata_start,$cdata_end);
- if ($XHTML) {
- $cdata_start = "$comment<![CDATA[\n";
- $cdata_end .= "\n$comment]]>";
- } else {
- $cdata_start = "\n<!-- Hide script\n";
- $cdata_end = $comment;
- $cdata_end .= " End script hiding -->\n";
- }
- my(@satts);
- push(@satts,'src'=>$src) if $src;
- push(@satts,'type'=>$type);
- $code = $cdata_start . $code . $cdata_end if defined $code;
- push(@result,$self->script({@satts},$code || ''));
- }
- @result;
-}
-END_OF_FUNC
-
-#### Method: end_html
-# End an HTML document.
-# Trivial method for completeness. Just returns "</body>"
-####
-'end_html' => <<'END_OF_FUNC',
-sub end_html {
- return "\n</body>\n</html>";
-}
-END_OF_FUNC
-
-
-################################
-# METHODS USED IN BUILDING FORMS
-################################
-
-#### Method: isindex
-# Just prints out the isindex tag.
-# Parameters:
-# $action -> optional URL of script to run
-# Returns:
-# A string containing a <isindex> tag
-'isindex' => <<'END_OF_FUNC',
-sub isindex {
- my($self, at p) = self_or_default(@_);
- my($action, at other) = rearrange([ACTION], at p);
- $action = qq/ action="$action"/ if $action;
- my($other) = @other ? " @other" : '';
- return $XHTML ? "<isindex$action$other />" : "<isindex$action$other>";
-}
-END_OF_FUNC
-
-
-#### Method: startform
-# Start a form
-# Parameters:
-# $method -> optional submission method to use (GET or POST)
-# $action -> optional URL of script to run
-# $enctype ->encoding to use (URL_ENCODED or MULTIPART)
-'startform' => <<'END_OF_FUNC',
-sub startform {
- my($self, at p) = self_or_default(@_);
-
- my($method,$action,$enctype, at other) =
- rearrange([METHOD,ACTION,ENCTYPE], at p);
-
- $method = $self->escapeHTML(lc($method || 'post'));
- $enctype = $self->escapeHTML($enctype || &URL_ENCODED);
- if (defined $action) {
- $action = $self->escapeHTML($action);
- }
- else {
- $action = $self->escapeHTML($self->request_uri || $self->self_url);
- }
- $action = qq(action="$action");
- my($other) = @other ? " @other" : '';
- $self->{'.parametersToAdd'}={};
- return qq/<form method="$method" $action enctype="$enctype"$other>\n/;
-}
-END_OF_FUNC
-
-
-#### Method: start_form
-# synonym for startform
-'start_form' => <<'END_OF_FUNC',
-sub start_form {
- $XHTML ? &start_multipart_form : &startform;
-}
-END_OF_FUNC
-
-'end_multipart_form' => <<'END_OF_FUNC',
-sub end_multipart_form {
- &endform;
-}
-END_OF_FUNC
-
-#### Method: start_multipart_form
-# synonym for startform
-'start_multipart_form' => <<'END_OF_FUNC',
-sub start_multipart_form {
- my($self, at p) = self_or_default(@_);
- if (defined($p[0]) && substr($p[0],0,1) eq '-') {
- return $self->startform(-enctype=>&MULTIPART, at p);
- } else {
- my($method,$action, at other) =
- rearrange([METHOD,ACTION], at p);
- return $self->startform($method,$action,&MULTIPART, at other);
- }
-}
-END_OF_FUNC
-
-
-#### Method: endform
-# End a form
-'endform' => <<'END_OF_FUNC',
-sub endform {
- my($self, at p) = self_or_default(@_);
- if ( $NOSTICKY ) {
- return wantarray ? ("</form>") : "\n</form>";
- } else {
- if (my @fields = $self->get_fields) {
- return wantarray ? ("<div>", at fields,"</div>","</form>")
- : "<div>".(join '', at fields)."</div>\n</form>";
- } else {
- return "</form>";
- }
- }
-}
-END_OF_FUNC
-
-
-'_textfield' => <<'END_OF_FUNC',
-sub _textfield {
- my($self,$tag, at p) = self_or_default(@_);
- my($name,$default,$size,$maxlength,$override,$tabindex, at other) =
- rearrange([NAME,[DEFAULT,VALUE,VALUES],SIZE,MAXLENGTH,[OVERRIDE,FORCE],TABINDEX], at p);
-
- my $current = $override ? $default :
- (defined($self->param($name)) ? $self->param($name) : $default);
-
- $current = defined($current) ? $self->escapeHTML($current,1) : '';
- $name = defined($name) ? $self->escapeHTML($name) : '';
- my($s) = defined($size) ? qq/ size="$size"/ : '';
- my($m) = defined($maxlength) ? qq/ maxlength="$maxlength"/ : '';
- my($other) = @other ? " @other" : '';
- # this entered at cristy's request to fix problems with file upload fields
- # and WebTV -- not sure it won't break stuff
- my($value) = $current ne '' ? qq(value="$current") : '';
- $tabindex = $self->element_tab($tabindex);
- return $XHTML ? qq(<input type="$tag" name="$name" $tabindex$value$s$m$other />)
- : qq(<input type="$tag" name="$name" $value$s$m$other>);
-}
-END_OF_FUNC
-
-#### Method: textfield
-# Parameters:
-# $name -> Name of the text field
-# $default -> Optional default value of the field if not
-# already defined.
-# $size -> Optional width of field in characaters.
-# $maxlength -> Optional maximum number of characters.
-# Returns:
-# A string containing a <input type="text"> field
-#
-'textfield' => <<'END_OF_FUNC',
-sub textfield {
- my($self, at p) = self_or_default(@_);
- $self->_textfield('text', at p);
-}
-END_OF_FUNC
-
-
-#### Method: filefield
-# Parameters:
-# $name -> Name of the file upload field
-# $size -> Optional width of field in characaters.
-# $maxlength -> Optional maximum number of characters.
-# Returns:
-# A string containing a <input type="file"> field
-#
-'filefield' => <<'END_OF_FUNC',
-sub filefield {
- my($self, at p) = self_or_default(@_);
- $self->_textfield('file', at p);
-}
-END_OF_FUNC
-
-
-#### Method: password
-# Create a "secret password" entry field
-# Parameters:
-# $name -> Name of the field
-# $default -> Optional default value of the field if not
-# already defined.
-# $size -> Optional width of field in characters.
-# $maxlength -> Optional maximum characters that can be entered.
-# Returns:
-# A string containing a <input type="password"> field
-#
-'password_field' => <<'END_OF_FUNC',
-sub password_field {
- my ($self, at p) = self_or_default(@_);
- $self->_textfield('password', at p);
-}
-END_OF_FUNC
-
-#### Method: textarea
-# Parameters:
-# $name -> Name of the text field
-# $default -> Optional default value of the field if not
-# already defined.
-# $rows -> Optional number of rows in text area
-# $columns -> Optional number of columns in text area
-# Returns:
-# A string containing a <textarea></textarea> tag
-#
-'textarea' => <<'END_OF_FUNC',
-sub textarea {
- my($self, at p) = self_or_default(@_);
- my($name,$default,$rows,$cols,$override,$tabindex, at other) =
- rearrange([NAME,[DEFAULT,VALUE],ROWS,[COLS,COLUMNS],[OVERRIDE,FORCE],TABINDEX], at p);
-
- my($current)= $override ? $default :
- (defined($self->param($name)) ? $self->param($name) : $default);
-
- $name = defined($name) ? $self->escapeHTML($name) : '';
- $current = defined($current) ? $self->escapeHTML($current) : '';
- my($r) = $rows ? qq/ rows="$rows"/ : '';
- my($c) = $cols ? qq/ cols="$cols"/ : '';
- my($other) = @other ? " @other" : '';
- $tabindex = $self->element_tab($tabindex);
- return qq{<textarea name="$name" $tabindex$r$c$other>$current</textarea>};
-}
-END_OF_FUNC
-
-
-#### Method: button
-# Create a javascript button.
-# Parameters:
-# $name -> (optional) Name for the button. (-name)
-# $value -> (optional) Value of the button when selected (and visible name) (-value)
-# $onclick -> (optional) Text of the JavaScript to run when the button is
-# clicked.
-# Returns:
-# A string containing a <input type="button"> tag
-####
-'button' => <<'END_OF_FUNC',
-sub button {
- my($self, at p) = self_or_default(@_);
-
- my($label,$value,$script,$tabindex, at other) = rearrange([NAME,[VALUE,LABEL],
- [ONCLICK,SCRIPT],TABINDEX], at p);
-
- $label=$self->escapeHTML($label);
- $value=$self->escapeHTML($value,1);
- $script=$self->escapeHTML($script);
-
- my($name) = '';
- $name = qq/ name="$label"/ if $label;
- $value = $value || $label;
- my($val) = '';
- $val = qq/ value="$value"/ if $value;
- $script = qq/ onclick="$script"/ if $script;
- my($other) = @other ? " @other" : '';
- $tabindex = $self->element_tab($tabindex);
- return $XHTML ? qq(<input type="button" $tabindex$name$val$script$other />)
- : qq(<input type="button"$name$val$script$other>);
-}
-END_OF_FUNC
-
-
-#### Method: submit
-# Create a "submit query" button.
-# Parameters:
-# $name -> (optional) Name for the button.
-# $value -> (optional) Value of the button when selected (also doubles as label).
-# $label -> (optional) Label printed on the button(also doubles as the value).
-# Returns:
-# A string containing a <input type="submit"> tag
-####
-'submit' => <<'END_OF_FUNC',
-sub submit {
- my($self, at p) = self_or_default(@_);
-
- my($label,$value,$tabindex, at other) = rearrange([NAME,[VALUE,LABEL],TABINDEX], at p);
-
- $label=$self->escapeHTML($label);
- $value=$self->escapeHTML($value,1);
-
- my $name = $NOSTICKY ? '' : 'name=".submit" ';
- $name = qq/name="$label" / if defined($label);
- $value = defined($value) ? $value : $label;
- my $val = '';
- $val = qq/value="$value" / if defined($value);
- $tabindex = $self->element_tab($tabindex);
- my($other) = @other ? "@other " : '';
- return $XHTML ? qq(<input type="submit" $tabindex$name$val$other/>)
- : qq(<input type="submit" $name$val$other>);
-}
-END_OF_FUNC
-
-
-#### Method: reset
-# Create a "reset" button.
-# Parameters:
-# $name -> (optional) Name for the button.
-# Returns:
-# A string containing a <input type="reset"> tag
-####
-'reset' => <<'END_OF_FUNC',
-sub reset {
- my($self, at p) = self_or_default(@_);
- my($label,$value,$tabindex, at other) = rearrange(['NAME',['VALUE','LABEL'],TABINDEX], at p);
- $label=$self->escapeHTML($label);
- $value=$self->escapeHTML($value,1);
- my ($name) = ' name=".reset"';
- $name = qq/ name="$label"/ if defined($label);
- $value = defined($value) ? $value : $label;
- my($val) = '';
- $val = qq/ value="$value"/ if defined($value);
- my($other) = @other ? " @other" : '';
- $tabindex = $self->element_tab($tabindex);
- return $XHTML ? qq(<input type="reset" $tabindex$name$val$other />)
- : qq(<input type="reset"$name$val$other>);
-}
-END_OF_FUNC
-
-
-#### Method: defaults
-# Create a "defaults" button.
-# Parameters:
-# $name -> (optional) Name for the button.
-# Returns:
-# A string containing a <input type="submit" name=".defaults"> tag
-#
-# Note: this button has a special meaning to the initialization script,
-# and tells it to ERASE the current query string so that your defaults
-# are used again!
-####
-'defaults' => <<'END_OF_FUNC',
-sub defaults {
- my($self, at p) = self_or_default(@_);
-
- my($label,$tabindex, at other) = rearrange([[NAME,VALUE],TABINDEX], at p);
-
- $label=$self->escapeHTML($label,1);
- $label = $label || "Defaults";
- my($value) = qq/ value="$label"/;
- my($other) = @other ? " @other" : '';
- $tabindex = $self->element_tab($tabindex);
- return $XHTML ? qq(<input type="submit" name=".defaults" $tabindex$value$other />)
- : qq/<input type="submit" NAME=".defaults"$value$other>/;
-}
-END_OF_FUNC
-
-
-#### Method: comment
-# Create an HTML <!-- comment -->
-# Parameters: a string
-'comment' => <<'END_OF_FUNC',
-sub comment {
- my($self, at p) = self_or_CGI(@_);
- return "<!-- @p -->";
-}
-END_OF_FUNC
-
-#### Method: checkbox
-# Create a checkbox that is not logically linked to any others.
-# The field value is "on" when the button is checked.
-# Parameters:
-# $name -> Name of the checkbox
-# $checked -> (optional) turned on by default if true
-# $value -> (optional) value of the checkbox, 'on' by default
-# $label -> (optional) a user-readable label printed next to the box.
-# Otherwise the checkbox name is used.
-# Returns:
-# A string containing a <input type="checkbox"> field
-####
-'checkbox' => <<'END_OF_FUNC',
-sub checkbox {
- my($self, at p) = self_or_default(@_);
-
- my($name,$checked,$value,$label,$labelattributes,$override,$tabindex, at other) =
- rearrange([NAME,[CHECKED,SELECTED,ON],VALUE,LABEL,LABELATTRIBUTES,
- [OVERRIDE,FORCE],TABINDEX], at p);
-
- $value = defined $value ? $value : 'on';
-
- if (!$override && ($self->{'.fieldnames'}->{$name} ||
- defined $self->param($name))) {
- $checked = grep($_ eq $value,$self->param($name)) ? $self->_checked(1) : '';
- } else {
- $checked = $self->_checked($checked);
- }
- my($the_label) = defined $label ? $label : $name;
- $name = $self->escapeHTML($name);
- $value = $self->escapeHTML($value,1);
- $the_label = $self->escapeHTML($the_label);
- my($other) = @other ? "@other " : '';
- $tabindex = $self->element_tab($tabindex);
- $self->register_parameter($name);
- return $XHTML ? CGI::label($labelattributes,
- qq{<input type="checkbox" name="$name" value="$value" $tabindex$checked$other/>$the_label})
- : qq{<input type="checkbox" name="$name" value="$value"$checked$other>$the_label};
-}
-END_OF_FUNC
-
-
-
-# Escape HTML -- used internally
-'escapeHTML' => <<'END_OF_FUNC',
-sub escapeHTML {
- # hack to work around earlier hacks
- push @_,$_[0] if @_==1 && $_[0] eq 'CGI';
- my ($self,$toencode,$newlinestoo) = CGI::self_or_default(@_);
- return undef unless defined($toencode);
- return $toencode if ref($self) && !$self->{'escape'};
- $toencode =~ s{&}{&}gso;
- $toencode =~ s{<}{<}gso;
- $toencode =~ s{>}{>}gso;
- if ($DTD_PUBLIC_IDENTIFIER =~ /[^X]HTML 3\.2/i) {
- # $quot; was accidentally omitted from the HTML 3.2 DTD -- see
- # <http://validator.w3.org/docs/errors.html#bad-entity> /
- # <http://lists.w3.org/Archives/Public/www-html/1997Mar/0003.html>.
- $toencode =~ s{"}{"}gso;
- }
- else {
- $toencode =~ s{"}{"}gso;
- }
- # Handle bug in some browsers with Latin charsets
- if ($self->{'.charset'} &&
- (uc($self->{'.charset'}) eq 'ISO-8859-1' ||
- uc($self->{'.charset'}) eq 'WINDOWS-1252'))
- {
- $toencode =~ s{'}{'}gso;
- $toencode =~ s{\x8b}{‹}gso;
- $toencode =~ s{\x9b}{›}gso;
- if (defined $newlinestoo && $newlinestoo) {
- $toencode =~ s{\012}{
}gso;
- $toencode =~ s{\015}{
}gso;
- }
- }
- return $toencode;
-}
-END_OF_FUNC
-
-# unescape HTML -- used internally
-'unescapeHTML' => <<'END_OF_FUNC',
-sub unescapeHTML {
- # hack to work around earlier hacks
- push @_,$_[0] if @_==1 && $_[0] eq 'CGI';
- my ($self,$string) = CGI::self_or_default(@_);
- return undef unless defined($string);
- my $latin = defined $self->{'.charset'} ? $self->{'.charset'} =~ /^(ISO-8859-1|WINDOWS-1252)$/i
- : 1;
- # thanks to Randal Schwartz for the correct solution to this one
- $string=~ s[&(.*?);]{
- local $_ = $1;
- /^amp$/i ? "&" :
- /^quot$/i ? '"' :
- /^gt$/i ? ">" :
- /^lt$/i ? "<" :
- /^#(\d+)$/ && $latin ? chr($1) :
- /^#x([0-9a-f]+)$/i && $latin ? chr(hex($1)) :
- $_
- }gex;
- return $string;
-}
-END_OF_FUNC
-
-# Internal procedure - don't use
-'_tableize' => <<'END_OF_FUNC',
-sub _tableize {
- my($rows,$columns,$rowheaders,$colheaders, at elements) = @_;
- my @rowheaders = $rowheaders ? @$rowheaders : ();
- my @colheaders = $colheaders ? @$colheaders : ();
- my($result);
-
- if (defined($columns)) {
- $rows = int(0.99 + @elements/$columns) unless defined($rows);
- }
- if (defined($rows)) {
- $columns = int(0.99 + @elements/$rows) unless defined($columns);
- }
-
- # rearrange into a pretty table
- $result = "<table>";
- my($row,$column);
- unshift(@colheaders,'') if @colheaders && @rowheaders;
- $result .= "<tr>" if @colheaders;
- for (@colheaders) {
- $result .= "<th>$_</th>";
- }
- for ($row=0;$row<$rows;$row++) {
- $result .= "<tr>";
- $result .= "<th>$rowheaders[$row]</th>" if @rowheaders;
- for ($column=0;$column<$columns;$column++) {
- $result .= "<td>" . $elements[$column*$rows + $row] . "</td>"
- if defined($elements[$column*$rows + $row]);
- }
- $result .= "</tr>";
- }
- $result .= "</table>";
- return $result;
-}
-END_OF_FUNC
-
-
-#### Method: radio_group
-# Create a list of logically-linked radio buttons.
-# Parameters:
-# $name -> Common name for all the buttons.
-# $values -> A pointer to a regular array containing the
-# values for each button in the group.
-# $default -> (optional) Value of the button to turn on by default. Pass '-'
-# to turn _nothing_ on.
-# $linebreak -> (optional) Set to true to place linebreaks
-# between the buttons.
-# $labels -> (optional)
-# A pointer to a hash of labels to print next to each checkbox
-# in the form $label{'value'}="Long explanatory label".
-# Otherwise the provided values are used as the labels.
-# Returns:
-# An ARRAY containing a series of <input type="radio"> fields
-####
-'radio_group' => <<'END_OF_FUNC',
-sub radio_group {
- my($self, at p) = self_or_default(@_);
- $self->_box_group('radio', at p);
-}
-END_OF_FUNC
-
-#### Method: checkbox_group
-# Create a list of logically-linked checkboxes.
-# Parameters:
-# $name -> Common name for all the check boxes
-# $values -> A pointer to a regular array containing the
-# values for each checkbox in the group.
-# $defaults -> (optional)
-# 1. If a pointer to a regular array of checkbox values,
-# then this will be used to decide which
-# checkboxes to turn on by default.
-# 2. If a scalar, will be assumed to hold the
-# value of a single checkbox in the group to turn on.
-# $linebreak -> (optional) Set to true to place linebreaks
-# between the buttons.
-# $labels -> (optional)
-# A pointer to a hash of labels to print next to each checkbox
-# in the form $label{'value'}="Long explanatory label".
-# Otherwise the provided values are used as the labels.
-# Returns:
-# An ARRAY containing a series of <input type="checkbox"> fields
-####
-
-'checkbox_group' => <<'END_OF_FUNC',
-sub checkbox_group {
- my($self, at p) = self_or_default(@_);
- $self->_box_group('checkbox', at p);
-}
-END_OF_FUNC
-
-'_box_group' => <<'END_OF_FUNC',
-sub _box_group {
- my $self = shift;
- my $box_type = shift;
-
- my($name,$values,$defaults,$linebreak,$labels,$labelattributes,
- $attributes,$rows,$columns,$rowheaders,$colheaders,
- $override,$nolabels,$tabindex,$disabled, at other) =
- rearrange([NAME,[VALUES,VALUE],[DEFAULT,DEFAULTS],LINEBREAK,LABELS,LABELATTRIBUTES,
- ATTRIBUTES,ROWS,[COLUMNS,COLS],[ROWHEADERS,ROWHEADER],[COLHEADERS,COLHEADER],
- [OVERRIDE,FORCE],NOLABELS,TABINDEX,DISABLED
- ], at _);
-
-
- my($result,$checked, at elements, at values);
-
- @values = $self->_set_values_and_labels($values,\$labels,$name);
- my %checked = $self->previous_or_default($name,$defaults,$override);
-
- # If no check array is specified, check the first by default
- $checked{$values[0]}++ if $box_type eq 'radio' && !%checked;
-
- $name=$self->escapeHTML($name);
-
- my %tabs = ();
- if ($TABINDEX && $tabindex) {
- if (!ref $tabindex) {
- $self->element_tab($tabindex);
- } elsif (ref $tabindex eq 'ARRAY') {
- %tabs = map {$_=>$self->element_tab} @$tabindex;
- } elsif (ref $tabindex eq 'HASH') {
- %tabs = %$tabindex;
- }
- }
- %tabs = map {$_=>$self->element_tab} @values unless %tabs;
- my $other = @other ? "@other " : '';
- my $radio_checked;
-
- # for disabling groups of radio/checkbox buttons
- my %disabled;
- for (@{$disabled}) {
- $disabled{$_}=1;
- }
-
- for (@values) {
- my $disable="";
- if ($disabled{$_}) {
- $disable="disabled='1'";
- }
-
- my $checkit = $self->_checked($box_type eq 'radio' ? ($checked{$_} && !$radio_checked++)
- : $checked{$_});
- my($break);
- if ($linebreak) {
- $break = $XHTML ? "<br />" : "<br>";
- }
- else {
- $break = '';
- }
- my($label)='';
- unless (defined($nolabels) && $nolabels) {
- $label = $_;
- $label = $labels->{$_} if defined($labels) && defined($labels->{$_});
- $label = $self->escapeHTML($label,1);
- $label = "<span style=\"color:gray\">$label</span>" if $disabled{$_};
- }
- my $attribs = $self->_set_attributes($_, $attributes);
- my $tab = $tabs{$_};
- $_=$self->escapeHTML($_);
-
- if ($XHTML) {
- push @elements,
- CGI::label($labelattributes,
- qq(<input type="$box_type" name="$name" value="$_" $checkit$other$tab$attribs$disable/>$label)).${break};
- } else {
- push(@elements,qq/<input type="$box_type" name="$name" value="$_"$checkit$other$tab$attribs$disable>${label}${break}/);
- }
- }
- $self->register_parameter($name);
- return wantarray ? @elements : "@elements"
- unless defined($columns) || defined($rows);
- return _tableize($rows,$columns,$rowheaders,$colheaders, at elements);
-}
-END_OF_FUNC
-
-
-#### Method: popup_menu
-# Create a popup menu.
-# Parameters:
-# $name -> Name for all the menu
-# $values -> A pointer to a regular array containing the
-# text of each menu item.
-# $default -> (optional) Default item to display
-# $labels -> (optional)
-# A pointer to a hash of labels to print next to each checkbox
-# in the form $label{'value'}="Long explanatory label".
-# Otherwise the provided values are used as the labels.
-# Returns:
-# A string containing the definition of a popup menu.
-####
-'popup_menu' => <<'END_OF_FUNC',
-sub popup_menu {
- my($self, at p) = self_or_default(@_);
-
- my($name,$values,$default,$labels,$attributes,$override,$tabindex, at other) =
- rearrange([NAME,[VALUES,VALUE],[DEFAULT,DEFAULTS],LABELS,
- ATTRIBUTES,[OVERRIDE,FORCE],TABINDEX], at p);
- my($result,%selected);
-
- if (!$override && defined($self->param($name))) {
- $selected{$self->param($name)}++;
- } elsif (defined $default) {
- %selected = map {$_=>1} ref($default) eq 'ARRAY'
- ? @$default
- : $default;
- }
- $name=$self->escapeHTML($name);
- my($other) = @other ? " @other" : '';
-
- my(@values);
- @values = $self->_set_values_and_labels($values,\$labels,$name);
- $tabindex = $self->element_tab($tabindex);
- $result = qq/<select name="$name" $tabindex$other>\n/;
- for (@values) {
- if (/<optgroup/) {
- for my $v (split(/\n/)) {
- my $selectit = $XHTML ? 'selected="selected"' : 'selected';
- for my $selected (keys %selected) {
- $v =~ s/(value="$selected")/$selectit $1/;
- }
- $result .= "$v\n";
- }
- }
- else {
- my $attribs = $self->_set_attributes($_, $attributes);
- my($selectit) = $self->_selected($selected{$_});
- my($label) = $_;
- $label = $labels->{$_} if defined($labels) && defined($labels->{$_});
- my($value) = $self->escapeHTML($_);
- $label = $self->escapeHTML($label,1);
- $result .= "<option${attribs} ${selectit}value=\"$value\">$label</option>\n";
- }
- }
-
- $result .= "</select>";
- return $result;
-}
-END_OF_FUNC
-
-
-#### Method: optgroup
-# Create a optgroup.
-# Parameters:
-# $name -> Label for the group
-# $values -> A pointer to a regular array containing the
-# values for each option line in the group.
-# $labels -> (optional)
-# A pointer to a hash of labels to print next to each item
-# in the form $label{'value'}="Long explanatory label".
-# Otherwise the provided values are used as the labels.
-# $labeled -> (optional)
-# A true value indicates the value should be used as the label attribute
-# in the option elements.
-# The label attribute specifies the option label presented to the user.
-# This defaults to the content of the <option> element, but the label
-# attribute allows authors to more easily use optgroup without sacrificing
-# compatibility with browsers that do not support option groups.
-# $novals -> (optional)
-# A true value indicates to suppress the val attribute in the option elements
-# Returns:
-# A string containing the definition of an option group.
-####
-'optgroup' => <<'END_OF_FUNC',
-sub optgroup {
- my($self, at p) = self_or_default(@_);
- my($name,$values,$attributes,$labeled,$noval,$labels, at other)
- = rearrange([NAME,[VALUES,VALUE],ATTRIBUTES,LABELED,NOVALS,LABELS], at p);
-
- my($result, at values);
- @values = $self->_set_values_and_labels($values,\$labels,$name,$labeled,$novals);
- my($other) = @other ? " @other" : '';
-
- $name=$self->escapeHTML($name);
- $result = qq/<optgroup label="$name"$other>\n/;
- for (@values) {
- if (/<optgroup/) {
- for (split(/\n/)) {
- my $selectit = $XHTML ? 'selected="selected"' : 'selected';
- s/(value="$selected")/$selectit $1/ if defined $selected;
- $result .= "$_\n";
- }
- }
- else {
- my $attribs = $self->_set_attributes($_, $attributes);
- my($label) = $_;
- $label = $labels->{$_} if defined($labels) && defined($labels->{$_});
- $label=$self->escapeHTML($label);
- my($value)=$self->escapeHTML($_,1);
- $result .= $labeled ? $novals ? "<option$attribs label=\"$value\">$label</option>\n"
- : "<option$attribs label=\"$value\" value=\"$value\">$label</option>\n"
- : $novals ? "<option$attribs>$label</option>\n"
- : "<option$attribs value=\"$value\">$label</option>\n";
- }
- }
- $result .= "</optgroup>";
- return $result;
-}
-END_OF_FUNC
-
-
-#### Method: scrolling_list
-# Create a scrolling list.
-# Parameters:
-# $name -> name for the list
-# $values -> A pointer to a regular array containing the
-# values for each option line in the list.
-# $defaults -> (optional)
-# 1. If a pointer to a regular array of options,
-# then this will be used to decide which
-# lines to turn on by default.
-# 2. Otherwise holds the value of the single line to turn on.
-# $size -> (optional) Size of the list.
-# $multiple -> (optional) If set, allow multiple selections.
-# $labels -> (optional)
-# A pointer to a hash of labels to print next to each checkbox
-# in the form $label{'value'}="Long explanatory label".
-# Otherwise the provided values are used as the labels.
-# Returns:
-# A string containing the definition of a scrolling list.
-####
-'scrolling_list' => <<'END_OF_FUNC',
-sub scrolling_list {
- my($self, at p) = self_or_default(@_);
- my($name,$values,$defaults,$size,$multiple,$labels,$attributes,$override,$tabindex, at other)
- = rearrange([NAME,[VALUES,VALUE],[DEFAULTS,DEFAULT],
- SIZE,MULTIPLE,LABELS,ATTRIBUTES,[OVERRIDE,FORCE],TABINDEX], at p);
-
- my($result, at values);
- @values = $self->_set_values_and_labels($values,\$labels,$name);
-
- $size = $size || scalar(@values);
-
- my(%selected) = $self->previous_or_default($name,$defaults,$override);
-
- my($is_multiple) = $multiple ? qq/ multiple="multiple"/ : '';
- my($has_size) = $size ? qq/ size="$size"/: '';
- my($other) = @other ? " @other" : '';
-
- $name=$self->escapeHTML($name);
- $tabindex = $self->element_tab($tabindex);
- $result = qq/<select name="$name" $tabindex$has_size$is_multiple$other>\n/;
- for (@values) {
- my($selectit) = $self->_selected($selected{$_});
- my($label) = $_;
- $label = $labels->{$_} if defined($labels) && defined($labels->{$_});
- $label=$self->escapeHTML($label);
- my($value)=$self->escapeHTML($_,1);
- my $attribs = $self->_set_attributes($_, $attributes);
- $result .= "<option ${selectit}${attribs}value=\"$value\">$label</option>\n";
- }
- $result .= "</select>";
- $self->register_parameter($name);
- return $result;
-}
-END_OF_FUNC
-
-
-#### Method: hidden
-# Parameters:
-# $name -> Name of the hidden field
-# @default -> (optional) Initial values of field (may be an array)
-# or
-# $default->[initial values of field]
-# Returns:
-# A string containing a <input type="hidden" name="name" value="value">
-####
-'hidden' => <<'END_OF_FUNC',
-sub hidden {
- my($self, at p) = self_or_default(@_);
-
- # this is the one place where we departed from our standard
- # calling scheme, so we have to special-case (darn)
- my(@result, at value);
- my($name,$default,$override, at other) =
- rearrange([NAME,[DEFAULT,VALUE,VALUES],[OVERRIDE,FORCE]], at p);
-
- my $do_override = 0;
- if ( ref($p[0]) || substr($p[0],0,1) eq '-') {
- @value = ref($default) ? @{$default} : $default;
- $do_override = $override;
- } else {
- for ($default,$override, at other) {
- push(@value,$_) if defined($_);
- }
- }
-
- # use previous values if override is not set
- my @prev = $self->param($name);
- @value = @prev if !$do_override && @prev;
-
- $name=$self->escapeHTML($name);
- for (@value) {
- $_ = defined($_) ? $self->escapeHTML($_,1) : '';
- push @result,$XHTML ? qq(<input type="hidden" name="$name" value="$_" @other />)
- : qq(<input type="hidden" name="$name" value="$_" @other>);
- }
- return wantarray ? @result : join('', at result);
-}
-END_OF_FUNC
-
-
-#### Method: image_button
-# Parameters:
-# $name -> Name of the button
-# $src -> URL of the image source
-# $align -> Alignment style (TOP, BOTTOM or MIDDLE)
-# Returns:
-# A string containing a <input type="image" name="name" src="url" align="alignment">
-####
-'image_button' => <<'END_OF_FUNC',
-sub image_button {
- my($self, at p) = self_or_default(@_);
-
- my($name,$src,$alignment, at other) =
- rearrange([NAME,SRC,ALIGN], at p);
-
- my($align) = $alignment ? " align=\L\"$alignment\"" : '';
- my($other) = @other ? " @other" : '';
- $name=$self->escapeHTML($name);
- return $XHTML ? qq(<input type="image" name="$name" src="$src"$align$other />)
- : qq/<input type="image" name="$name" src="$src"$align$other>/;
-}
-END_OF_FUNC
-
-
-#### Method: self_url
-# Returns a URL containing the current script and all its
-# param/value pairs arranged as a query. You can use this
-# to create a link that, when selected, will reinvoke the
-# script with all its state information preserved.
-####
-'self_url' => <<'END_OF_FUNC',
-sub self_url {
- my($self, at p) = self_or_default(@_);
- return $self->url('-path_info'=>1,'-query'=>1,'-full'=>1, at p);
-}
-END_OF_FUNC
-
-
-# This is provided as a synonym to self_url() for people unfortunate
-# enough to have incorporated it into their programs already!
-'state' => <<'END_OF_FUNC',
-sub state {
- &self_url;
-}
-END_OF_FUNC
-
-
-#### Method: url
-# Like self_url, but doesn't return the query string part of
-# the URL.
-####
-'url' => <<'END_OF_FUNC',
-sub url {
- my($self, at p) = self_or_default(@_);
- my ($relative,$absolute,$full,$path_info,$query,$base,$rewrite) =
- rearrange(['RELATIVE','ABSOLUTE','FULL',['PATH','PATH_INFO'],['QUERY','QUERY_STRING'],'BASE','REWRITE'], at p);
- my $url = '';
- $full++ if $base || !($relative || $absolute);
- $rewrite++ unless defined $rewrite;
-
- my $path = $self->path_info;
- my $script_name = $self->script_name;
- my $request_uri = unescape($self->request_uri) || '';
- my $query_str = $self->query_string;
-
- my $rewrite_in_use = $request_uri && $request_uri !~ /^\Q$script_name/;
- undef $path if $rewrite_in_use && $rewrite; # path not valid when rewriting active
-
- my $uri = $rewrite && $request_uri ? $request_uri : $script_name;
- $uri =~ s/\?.*$//s; # remove query string
- $uri =~ s/\Q$ENV{PATH_INFO}\E$// if defined $ENV{PATH_INFO};
-# $uri =~ s/\Q$path\E$// if defined $path; # remove path
-
- if ($full) {
- my $protocol = $self->protocol();
- $url = "$protocol://";
- my $vh = http('x_forwarded_host') || http('host') || '';
- $vh =~ s/\:\d+$//; # some clients add the port number (incorrectly). Get rid of it.
- if ($vh) {
- $url .= $vh;
- } else {
- $url .= server_name();
- }
- my $port = $self->server_port;
- $url .= ":" . $port
- unless (lc($protocol) eq 'http' && $port == 80)
- || (lc($protocol) eq 'https' && $port == 443);
- return $url if $base;
- $url .= $uri;
- } elsif ($relative) {
- ($url) = $uri =~ m!([^/]+)$!;
- } elsif ($absolute) {
- $url = $uri;
- }
-
- $url .= $path if $path_info and defined $path;
- $url .= "?$query_str" if $query and $query_str ne '';
- $url ||= '';
- $url =~ s/([^a-zA-Z0-9_.%;&?\/\\:+=~-])/sprintf("%%%02X",ord($1))/eg;
- return $url;
-}
-
-END_OF_FUNC
-
-#### Method: cookie
-# Set or read a cookie from the specified name.
-# Cookie can then be passed to header().
-# Usual rules apply to the stickiness of -value.
-# Parameters:
-# -name -> name for this cookie (optional)
-# -value -> value of this cookie (scalar, array or hash)
-# -path -> paths for which this cookie is valid (optional)
-# -domain -> internet domain in which this cookie is valid (optional)
-# -secure -> if true, cookie only passed through secure channel (optional)
-# -expires -> expiry date in format Wdy, DD-Mon-YYYY HH:MM:SS GMT (optional)
-####
-'cookie' => <<'END_OF_FUNC',
-sub cookie {
- my($self, at p) = self_or_default(@_);
- my($name,$value,$path,$domain,$secure,$expires,$httponly) =
- rearrange([NAME,[VALUE,VALUES],PATH,DOMAIN,SECURE,EXPIRES,HTTPONLY], at p);
-
- require CGI::Cookie;
-
- # if no value is supplied, then we retrieve the
- # value of the cookie, if any. For efficiency, we cache the parsed
- # cookies in our state variables.
- unless ( defined($value) ) {
- $self->{'.cookies'} = CGI::Cookie->fetch
- unless $self->{'.cookies'};
-
- # If no name is supplied, then retrieve the names of all our cookies.
- return () unless $self->{'.cookies'};
- return keys %{$self->{'.cookies'}} unless $name;
- return () unless $self->{'.cookies'}->{$name};
- return $self->{'.cookies'}->{$name}->value if defined($name) && $name ne '';
- }
-
- # If we get here, we're creating a new cookie
- return undef unless defined($name) && $name ne ''; # this is an error
-
- my @param;
- push(@param,'-name'=>$name);
- push(@param,'-value'=>$value);
- push(@param,'-domain'=>$domain) if $domain;
- push(@param,'-path'=>$path) if $path;
- push(@param,'-expires'=>$expires) if $expires;
- push(@param,'-secure'=>$secure) if $secure;
- push(@param,'-httponly'=>$httponly) if $httponly;
-
- return new CGI::Cookie(@param);
-}
-END_OF_FUNC
-
-'parse_keywordlist' => <<'END_OF_FUNC',
-sub parse_keywordlist {
- my($self,$tosplit) = @_;
- $tosplit = unescape($tosplit); # unescape the keywords
- $tosplit=~tr/+/ /; # pluses to spaces
- my(@keywords) = split(/\s+/,$tosplit);
- return @keywords;
-}
-END_OF_FUNC
-
-'param_fetch' => <<'END_OF_FUNC',
-sub param_fetch {
- my($self, at p) = self_or_default(@_);
- my($name) = rearrange([NAME], at p);
- unless (exists($self->{param}{$name})) {
- $self->add_parameter($name);
- $self->{param}{$name} = [];
- }
-
- return $self->{param}{$name};
-}
-END_OF_FUNC
-
-###############################################
-# OTHER INFORMATION PROVIDED BY THE ENVIRONMENT
-###############################################
-
-#### Method: path_info
-# Return the extra virtual path information provided
-# after the URL (if any)
-####
-'path_info' => <<'END_OF_FUNC',
-sub path_info {
- my ($self,$info) = self_or_default(@_);
- if (defined($info)) {
- $info = "/$info" if $info ne '' && substr($info,0,1) ne '/';
- $self->{'.path_info'} = $info;
- } elsif (! defined($self->{'.path_info'}) ) {
- my (undef,$path_info) = $self->_name_and_path_from_env;
- $self->{'.path_info'} = $path_info || '';
- }
- return $self->{'.path_info'};
-}
-END_OF_FUNC
-
-# This function returns a potentially modified version of SCRIPT_NAME
-# and PATH_INFO. Some HTTP servers do sanitise the paths in those
-# variables. It is the case of at least Apache 2. If for instance the
-# user requests: /path/./to/script.cgi/x//y/z/../x?y, Apache will set:
-# REQUEST_URI=/path/./to/script.cgi/x//y/z/../x?y
-# SCRIPT_NAME=/path/to/env.cgi
-# PATH_INFO=/x/y/x
-#
-# This is all fine except that some bogus CGI scripts expect
-# PATH_INFO=/http://foo when the user requests
-# http://xxx/script.cgi/http://foo
-#
-# Old versions of this module used to accomodate with those scripts, so
-# this is why we do this here to keep those scripts backward compatible.
-# Basically, we accomodate with those scripts but within limits, that is
-# we only try to preserve the number of / that were provided by the user
-# if $REQUEST_URI and "$SCRIPT_NAME$PATH_INFO" only differ by the number
-# of consecutive /.
-#
-# So for instance, in: http://foo/x//y/script.cgi/a//b, we'll return a
-# script_name of /x//y/script.cgi and a path_info of /a//b, but in:
-# http://foo/./x//z/script.cgi/a/../b//c, we'll return the versions
-# possibly sanitised by the HTTP server, so in the case of Apache 2:
-# script_name == /foo/x/z/script.cgi and path_info == /b/c.
-#
-# Future versions of this module may no longer do that, so one should
-# avoid relying on the browser, proxy, server, and CGI.pm preserving the
-# number of consecutive slashes as no guarantee can be made there.
-'_name_and_path_from_env' => <<'END_OF_FUNC',
-sub _name_and_path_from_env {
- my $self = shift;
- my $script_name = $ENV{SCRIPT_NAME} || '';
- my $path_info = $ENV{PATH_INFO} || '';
- my $uri = $self->request_uri || '';
-
- $uri =~ s/\?.*//s;
- $uri = unescape($uri);
-
- if ($uri ne "$script_name$path_info") {
- my $script_name_pattern = quotemeta($script_name);
- my $path_info_pattern = quotemeta($path_info);
- $script_name_pattern =~ s{(?:\\/)+}{/+}g;
- $path_info_pattern =~ s{(?:\\/)+}{/+}g;
-
- if ($uri =~ /^($script_name_pattern)($path_info_pattern)$/s) {
- # REQUEST_URI and SCRIPT_NAME . PATH_INFO only differ by the
- # numer of consecutive slashes, so we can extract the info from
- # REQUEST_URI:
- ($script_name, $path_info) = ($1, $2);
- }
- }
- return ($script_name,$path_info);
-}
-END_OF_FUNC
-
-
-#### Method: request_method
-# Returns 'POST', 'GET', 'PUT' or 'HEAD'
-####
-'request_method' => <<'END_OF_FUNC',
-sub request_method {
- return $ENV{'REQUEST_METHOD'};
-}
-END_OF_FUNC
-
-#### Method: content_type
-# Returns the content_type string
-####
-'content_type' => <<'END_OF_FUNC',
-sub content_type {
- return $ENV{'CONTENT_TYPE'};
-}
-END_OF_FUNC
-
-#### Method: path_translated
-# Return the physical path information provided
-# by the URL (if any)
-####
-'path_translated' => <<'END_OF_FUNC',
-sub path_translated {
- return $ENV{'PATH_TRANSLATED'};
-}
-END_OF_FUNC
-
-
-#### Method: request_uri
-# Return the literal request URI
-####
-'request_uri' => <<'END_OF_FUNC',
-sub request_uri {
- return $ENV{'REQUEST_URI'};
-}
-END_OF_FUNC
-
-
-#### Method: query_string
-# Synthesize a query string from our current
-# parameters
-####
-'query_string' => <<'END_OF_FUNC',
-sub query_string {
- my($self) = self_or_default(@_);
- my($param,$value, at pairs);
- for $param ($self->param) {
- my($eparam) = escape($param);
- for $value ($self->param($param)) {
- $value = escape($value);
- next unless defined $value;
- push(@pairs,"$eparam=$value");
- }
- }
- for (keys %{$self->{'.fieldnames'}}) {
- push(@pairs,".cgifields=".escape("$_"));
- }
- return join($USE_PARAM_SEMICOLONS ? ';' : '&', at pairs);
-}
-END_OF_FUNC
-
-
-#### Method: accept
-# Without parameters, returns an array of the
-# MIME types the browser accepts.
-# With a single parameter equal to a MIME
-# type, will return undef if the browser won't
-# accept it, 1 if the browser accepts it but
-# doesn't give a preference, or a floating point
-# value between 0.0 and 1.0 if the browser
-# declares a quantitative score for it.
-# This handles MIME type globs correctly.
-####
-'Accept' => <<'END_OF_FUNC',
-sub Accept {
- my($self,$search) = self_or_CGI(@_);
- my(%prefs,$type,$pref,$pat);
-
- my(@accept) = defined $self->http('accept')
- ? split(',',$self->http('accept'))
- : ();
-
- for (@accept) {
- ($pref) = /q=(\d\.\d+|\d+)/;
- ($type) = m#(\S+/[^;]+)#;
- next unless $type;
- $prefs{$type}=$pref || 1;
- }
-
- return keys %prefs unless $search;
-
- # if a search type is provided, we may need to
- # perform a pattern matching operation.
- # The MIME types use a glob mechanism, which
- # is easily translated into a perl pattern match
-
- # First return the preference for directly supported
- # types:
- return $prefs{$search} if $prefs{$search};
-
- # Didn't get it, so try pattern matching.
- for (keys %prefs) {
- next unless /\*/; # not a pattern match
- ($pat = $_) =~ s/([^\w*])/\\$1/g; # escape meta characters
- $pat =~ s/\*/.*/g; # turn it into a pattern
- return $prefs{$_} if $search=~/$pat/;
- }
-}
-END_OF_FUNC
-
-
-#### Method: user_agent
-# If called with no parameters, returns the user agent.
-# If called with one parameter, does a pattern match (case
-# insensitive) on the user agent.
-####
-'user_agent' => <<'END_OF_FUNC',
-sub user_agent {
- my($self,$match)=self_or_CGI(@_);
- return $self->http('user_agent') unless $match;
- return $self->http('user_agent') =~ /$match/i;
-}
-END_OF_FUNC
-
-
-#### Method: raw_cookie
-# Returns the magic cookies for the session.
-# The cookies are not parsed or altered in any way, i.e.
-# cookies are returned exactly as given in the HTTP
-# headers. If a cookie name is given, only that cookie's
-# value is returned, otherwise the entire raw cookie
-# is returned.
-####
-'raw_cookie' => <<'END_OF_FUNC',
-sub raw_cookie {
- my($self,$key) = self_or_CGI(@_);
-
- require CGI::Cookie;
-
- if (defined($key)) {
- $self->{'.raw_cookies'} = CGI::Cookie->raw_fetch
- unless $self->{'.raw_cookies'};
-
- return () unless $self->{'.raw_cookies'};
- return () unless $self->{'.raw_cookies'}->{$key};
- return $self->{'.raw_cookies'}->{$key};
- }
- return $self->http('cookie') || $ENV{'COOKIE'} || '';
-}
-END_OF_FUNC
-
-#### Method: virtual_host
-# Return the name of the virtual_host, which
-# is not always the same as the server
-######
-'virtual_host' => <<'END_OF_FUNC',
-sub virtual_host {
- my $vh = http('x_forwarded_host') || http('host') || server_name();
- $vh =~ s/:\d+$//; # get rid of port number
- return $vh;
-}
-END_OF_FUNC
-
-#### Method: remote_host
-# Return the name of the remote host, or its IP
-# address if unavailable. If this variable isn't
-# defined, it returns "localhost" for debugging
-# purposes.
-####
-'remote_host' => <<'END_OF_FUNC',
-sub remote_host {
- return $ENV{'REMOTE_HOST'} || $ENV{'REMOTE_ADDR'}
- || 'localhost';
-}
-END_OF_FUNC
-
-
-#### Method: remote_addr
-# Return the IP addr of the remote host.
-####
-'remote_addr' => <<'END_OF_FUNC',
-sub remote_addr {
- return $ENV{'REMOTE_ADDR'} || '127.0.0.1';
-}
-END_OF_FUNC
-
-
-#### Method: script_name
-# Return the partial URL to this script for
-# self-referencing scripts. Also see
-# self_url(), which returns a URL with all state information
-# preserved.
-####
-'script_name' => <<'END_OF_FUNC',
-sub script_name {
- my ($self, at p) = self_or_default(@_);
- if (@p) {
- $self->{'.script_name'} = shift @p;
- } elsif (!exists $self->{'.script_name'}) {
- my ($script_name,$path_info) = $self->_name_and_path_from_env();
- $self->{'.script_name'} = $script_name;
- }
- return $self->{'.script_name'};
-}
-END_OF_FUNC
-
-
-#### Method: referer
-# Return the HTTP_REFERER: useful for generating
-# a GO BACK button.
-####
-'referer' => <<'END_OF_FUNC',
-sub referer {
- my($self) = self_or_CGI(@_);
- return $self->http('referer');
-}
-END_OF_FUNC
-
-
-#### Method: server_name
-# Return the name of the server
-####
-'server_name' => <<'END_OF_FUNC',
-sub server_name {
- return $ENV{'SERVER_NAME'} || 'localhost';
-}
-END_OF_FUNC
-
-#### Method: server_software
-# Return the name of the server software
-####
-'server_software' => <<'END_OF_FUNC',
-sub server_software {
- return $ENV{'SERVER_SOFTWARE'} || 'cmdline';
-}
-END_OF_FUNC
-
-#### Method: virtual_port
-# Return the server port, taking virtual hosts into account
-####
-'virtual_port' => <<'END_OF_FUNC',
-sub virtual_port {
- my($self) = self_or_default(@_);
- my $vh = $self->http('x_forwarded_host') || $self->http('host');
- my $protocol = $self->protocol;
- if ($vh) {
- return ($vh =~ /:(\d+)$/)[0] || ($protocol eq 'https' ? 443 : 80);
- } else {
- return $self->server_port();
- }
-}
-END_OF_FUNC
-
-#### Method: server_port
-# Return the tcp/ip port the server is running on
-####
-'server_port' => <<'END_OF_FUNC',
-sub server_port {
- return $ENV{'SERVER_PORT'} || 80; # for debugging
-}
-END_OF_FUNC
-
-#### Method: server_protocol
-# Return the protocol (usually HTTP/1.0)
-####
-'server_protocol' => <<'END_OF_FUNC',
-sub server_protocol {
- return $ENV{'SERVER_PROTOCOL'} || 'HTTP/1.0'; # for debugging
-}
-END_OF_FUNC
-
-#### Method: http
-# Return the value of an HTTP variable, or
-# the list of variables if none provided
-####
-'http' => <<'END_OF_FUNC',
-sub http {
- my ($self,$parameter) = self_or_CGI(@_);
- return $ENV{$parameter} if $parameter=~/^HTTP/;
- $parameter =~ tr/-/_/;
- return $ENV{"HTTP_\U$parameter\E"} if $parameter;
- my(@p);
- for (keys %ENV) {
- push(@p,$_) if /^HTTP/;
- }
- return @p;
-}
-END_OF_FUNC
-
-#### Method: https
-# Return the value of HTTPS
-####
-'https' => <<'END_OF_FUNC',
-sub https {
- local($^W)=0;
- my ($self,$parameter) = self_or_CGI(@_);
- return $ENV{HTTPS} unless $parameter;
- return $ENV{$parameter} if $parameter=~/^HTTPS/;
- $parameter =~ tr/-/_/;
- return $ENV{"HTTPS_\U$parameter\E"} if $parameter;
- my(@p);
- for (keys %ENV) {
- push(@p,$_) if /^HTTPS/;
- }
- return @p;
-}
-END_OF_FUNC
-
-#### Method: protocol
-# Return the protocol (http or https currently)
-####
-'protocol' => <<'END_OF_FUNC',
-sub protocol {
- local($^W)=0;
- my $self = shift;
- return 'https' if uc($self->https()) eq 'ON';
- return 'https' if $self->server_port == 443;
- my $prot = $self->server_protocol;
- my($protocol,$version) = split('/',$prot);
- return "\L$protocol\E";
-}
-END_OF_FUNC
-
-#### Method: remote_ident
-# Return the identity of the remote user
-# (but only if his host is running identd)
-####
-'remote_ident' => <<'END_OF_FUNC',
-sub remote_ident {
- return $ENV{'REMOTE_IDENT'};
-}
-END_OF_FUNC
-
-
-#### Method: auth_type
-# Return the type of use verification/authorization in use, if any.
-####
-'auth_type' => <<'END_OF_FUNC',
-sub auth_type {
- return $ENV{'AUTH_TYPE'};
-}
-END_OF_FUNC
-
-
-#### Method: remote_user
-# Return the authorization name used for user
-# verification.
-####
-'remote_user' => <<'END_OF_FUNC',
-sub remote_user {
- return $ENV{'REMOTE_USER'};
-}
-END_OF_FUNC
-
-
-#### Method: user_name
-# Try to return the remote user's name by hook or by
-# crook
-####
-'user_name' => <<'END_OF_FUNC',
-sub user_name {
- my ($self) = self_or_CGI(@_);
- return $self->http('from') || $ENV{'REMOTE_IDENT'} || $ENV{'REMOTE_USER'};
-}
-END_OF_FUNC
-
-#### Method: nosticky
-# Set or return the NOSTICKY global flag
-####
-'nosticky' => <<'END_OF_FUNC',
-sub nosticky {
- my ($self,$param) = self_or_CGI(@_);
- $CGI::NOSTICKY = $param if defined($param);
- return $CGI::NOSTICKY;
-}
-END_OF_FUNC
-
-#### Method: nph
-# Set or return the NPH global flag
-####
-'nph' => <<'END_OF_FUNC',
-sub nph {
- my ($self,$param) = self_or_CGI(@_);
- $CGI::NPH = $param if defined($param);
- return $CGI::NPH;
-}
-END_OF_FUNC
-
-#### Method: private_tempfiles
-# Set or return the private_tempfiles global flag
-####
-'private_tempfiles' => <<'END_OF_FUNC',
-sub private_tempfiles {
- my ($self,$param) = self_or_CGI(@_);
- $CGI::PRIVATE_TEMPFILES = $param if defined($param);
- return $CGI::PRIVATE_TEMPFILES;
-}
-END_OF_FUNC
-#### Method: close_upload_files
-# Set or return the close_upload_files global flag
-####
-'close_upload_files' => <<'END_OF_FUNC',
-sub close_upload_files {
- my ($self,$param) = self_or_CGI(@_);
- $CGI::CLOSE_UPLOAD_FILES = $param if defined($param);
- return $CGI::CLOSE_UPLOAD_FILES;
-}
-END_OF_FUNC
-
-
-#### Method: default_dtd
-# Set or return the default_dtd global
-####
-'default_dtd' => <<'END_OF_FUNC',
-sub default_dtd {
- my ($self,$param,$param2) = self_or_CGI(@_);
- if (defined $param2 && defined $param) {
- $CGI::DEFAULT_DTD = [ $param, $param2 ];
- } elsif (defined $param) {
- $CGI::DEFAULT_DTD = $param;
- }
- return $CGI::DEFAULT_DTD;
-}
-END_OF_FUNC
-
-# -------------- really private subroutines -----------------
-'previous_or_default' => <<'END_OF_FUNC',
-sub previous_or_default {
- my($self,$name,$defaults,$override) = @_;
- my(%selected);
-
- if (!$override && ($self->{'.fieldnames'}->{$name} ||
- defined($self->param($name)) ) ) {
- $selected{$_}++ for $self->param($name);
- } elsif (defined($defaults) && ref($defaults) &&
- (ref($defaults) eq 'ARRAY')) {
- $selected{$_}++ for @{$defaults};
- } else {
- $selected{$defaults}++ if defined($defaults);
- }
-
- return %selected;
-}
-END_OF_FUNC
-
-'register_parameter' => <<'END_OF_FUNC',
-sub register_parameter {
- my($self,$param) = @_;
- $self->{'.parametersToAdd'}->{$param}++;
-}
-END_OF_FUNC
-
-'get_fields' => <<'END_OF_FUNC',
-sub get_fields {
- my($self) = @_;
- return $self->CGI::hidden('-name'=>'.cgifields',
- '-values'=>[keys %{$self->{'.parametersToAdd'}}],
- '-override'=>1);
-}
-END_OF_FUNC
-
-'read_from_cmdline' => <<'END_OF_FUNC',
-sub read_from_cmdline {
- my($input, at words);
- my($query_string);
- my($subpath);
- if ($DEBUG && @ARGV) {
- @words = @ARGV;
- } elsif ($DEBUG > 1) {
- require "shellwords.pl";
- print STDERR "(offline mode: enter name=value pairs on standard input; press ^D or ^Z when done)\n";
- chomp(@lines = <STDIN>); # remove newlines
- $input = join(" ", at lines);
- @words = &shellwords($input);
- }
- for (@words) {
- s/\\=/%3D/g;
- s/\\&/%26/g;
- }
-
- if ("@words"=~/=/) {
- $query_string = join('&', at words);
- } else {
- $query_string = join('+', at words);
- }
- if ($query_string =~ /^(.*?)\?(.*)$/)
- {
- $query_string = $2;
- $subpath = $1;
- }
- return { 'query_string' => $query_string, 'subpath' => $subpath };
-}
-END_OF_FUNC
-
-#####
-# subroutine: read_multipart
-#
-# Read multipart data and store it into our parameters.
-# An interesting feature is that if any of the parts is a file, we
-# create a temporary file and open up a filehandle on it so that the
-# caller can read from it if necessary.
-#####
-'read_multipart' => <<'END_OF_FUNC',
-sub read_multipart {
- my($self,$boundary,$length) = @_;
- my($buffer) = $self->new_MultipartBuffer($boundary,$length);
- return unless $buffer;
- my(%header,$body);
- my $filenumber = 0;
- while (!$buffer->eof) {
- %header = $buffer->readHeader;
-
- unless (%header) {
- $self->cgi_error("400 Bad request (malformed multipart POST)");
- return;
- }
-
- $header{'Content-Disposition'} ||= ''; # quench uninit variable warning
-
- my($param)= $header{'Content-Disposition'}=~/ name="([^"]*)"/;
- $param .= $TAINTED;
-
- # See RFC 1867, 2183, 2045
- # NB: File content will be loaded into memory should
- # content-disposition parsing fail.
- my ($filename) = $header{'Content-Disposition'}
- =~/ filename=(("[^"]*")|([a-z\d!\#'\*\+,\.^_\`\{\}\|\~]*))/i;
-
- $filename ||= ''; # quench uninit variable warning
-
- $filename =~ s/^"([^"]*)"$/$1/;
- # Test for Opera's multiple upload feature
- my($multipart) = ( defined( $header{'Content-Type'} ) &&
- $header{'Content-Type'} =~ /multipart\/mixed/ ) ?
- 1 : 0;
-
- # add this parameter to our list
- $self->add_parameter($param);
-
- # If no filename specified, then just read the data and assign it
- # to our parameter list.
- if ( ( !defined($filename) || $filename eq '' ) && !$multipart ) {
- my($value) = $buffer->readBody;
- $value .= $TAINTED;
- push(@{$self->{param}{$param}},$value);
- next;
- }
-
- my ($tmpfile,$tmp,$filehandle);
- UPLOADS: {
- # If we get here, then we are dealing with a potentially large
- # uploaded form. Save the data to a temporary file, then open
- # the file for reading.
-
- # skip the file if uploads disabled
- if ($DISABLE_UPLOADS) {
- while (defined($data = $buffer->read)) { }
- last UPLOADS;
- }
-
- # set the filename to some recognizable value
- if ( ( !defined($filename) || $filename eq '' ) && $multipart ) {
- $filename = "multipart/mixed";
- }
-
- # choose a relatively unpredictable tmpfile sequence number
- my $seqno = unpack("%16C*",join('',localtime,grep {defined $_} values %ENV));
- for (my $cnt=10;$cnt>0;$cnt--) {
- next unless $tmpfile = new CGITempFile($seqno);
- $tmp = $tmpfile->as_string;
- last if defined($filehandle = Fh->new($filename,$tmp,$PRIVATE_TEMPFILES));
- $seqno += int rand(100);
- }
- die "CGI open of tmpfile: $!\n" unless defined $filehandle;
- $CGI::DefaultClass->binmode($filehandle) if $CGI::needs_binmode
- && defined fileno($filehandle);
-
- # if this is an multipart/mixed attachment, save the header
- # together with the body for later parsing with an external
- # MIME parser module
- if ( $multipart ) {
- for ( keys %header ) {
- print $filehandle "$_: $header{$_}${CRLF}";
- }
- print $filehandle "${CRLF}";
- }
-
- my ($data);
- local($\) = '';
- my $totalbytes = 0;
- while (defined($data = $buffer->read)) {
- if (defined $self->{'.upload_hook'})
- {
- $totalbytes += length($data);
- &{$self->{'.upload_hook'}}($filename ,$data, $totalbytes, $self->{'.upload_data'});
- }
- print $filehandle $data if ($self->{'use_tempfile'});
- }
-
- # back up to beginning of file
- seek($filehandle,0,0);
-
- ## Close the filehandle if requested this allows a multipart MIME
- ## upload to contain many files, and we won't die due to too many
- ## open file handles. The user can access the files using the hash
- ## below.
- close $filehandle if $CLOSE_UPLOAD_FILES;
- $CGI::DefaultClass->binmode($filehandle) if $CGI::needs_binmode;
-
- # Save some information about the uploaded file where we can get
- # at it later.
- # Use the typeglob as the key, as this is guaranteed to be
- # unique for each filehandle. Don't use the file descriptor as
- # this will be re-used for each filehandle if the
- # close_upload_files feature is used.
- $self->{'.tmpfiles'}->{$$filehandle}= {
- hndl => $filehandle,
- name => $tmpfile,
- info => {%header},
- };
- push(@{$self->{param}{$param}},$filehandle);
- }
- }
-}
-END_OF_FUNC
-
-#####
-# subroutine: read_multipart_related
-#
-# Read multipart/related data and store it into our parameters. The
-# first parameter sets the start of the data. The part identified by
-# this Content-ID will not be stored as a file upload, but will be
-# returned by this method. All other parts will be available as file
-# uploads accessible by their Content-ID
-#####
-'read_multipart_related' => <<'END_OF_FUNC',
-sub read_multipart_related {
- my($self,$start,$boundary,$length) = @_;
- my($buffer) = $self->new_MultipartBuffer($boundary,$length);
- return unless $buffer;
- my(%header,$body);
- my $filenumber = 0;
- my $returnvalue;
- while (!$buffer->eof) {
- %header = $buffer->readHeader;
-
- unless (%header) {
- $self->cgi_error("400 Bad request (malformed multipart POST)");
- return;
- }
-
- my($param) = $header{'Content-ID'}=~/\<([^\>]*)\>/;
- $param .= $TAINTED;
-
- # If this is the start part, then just read the data and assign it
- # to our return variable.
- if ( $param eq $start ) {
- $returnvalue = $buffer->readBody;
- $returnvalue .= $TAINTED;
- next;
- }
-
- # add this parameter to our list
- $self->add_parameter($param);
-
- my ($tmpfile,$tmp,$filehandle);
- UPLOADS: {
- # If we get here, then we are dealing with a potentially large
- # uploaded form. Save the data to a temporary file, then open
- # the file for reading.
-
- # skip the file if uploads disabled
- if ($DISABLE_UPLOADS) {
- while (defined($data = $buffer->read)) { }
- last UPLOADS;
- }
-
- # choose a relatively unpredictable tmpfile sequence number
- my $seqno = unpack("%16C*",join('',localtime,grep {defined $_} values %ENV));
- for (my $cnt=10;$cnt>0;$cnt--) {
- next unless $tmpfile = new CGITempFile($seqno);
- $tmp = $tmpfile->as_string;
- last if defined($filehandle = Fh->new($param,$tmp,$PRIVATE_TEMPFILES));
- $seqno += int rand(100);
- }
- die "CGI open of tmpfile: $!\n" unless defined $filehandle;
- $CGI::DefaultClass->binmode($filehandle) if $CGI::needs_binmode
- && defined fileno($filehandle);
-
- my ($data);
- local($\) = '';
- my $totalbytes;
- while (defined($data = $buffer->read)) {
- if (defined $self->{'.upload_hook'})
- {
- $totalbytes += length($data);
- &{$self->{'.upload_hook'}}($param ,$data, $totalbytes, $self->{'.upload_data'});
- }
- print $filehandle $data if ($self->{'use_tempfile'});
- }
-
- # back up to beginning of file
- seek($filehandle,0,0);
-
- ## Close the filehandle if requested this allows a multipart MIME
- ## upload to contain many files, and we won't die due to too many
- ## open file handles. The user can access the files using the hash
- ## below.
- close $filehandle if $CLOSE_UPLOAD_FILES;
- $CGI::DefaultClass->binmode($filehandle) if $CGI::needs_binmode;
-
- # Save some information about the uploaded file where we can get
- # at it later.
- # Use the typeglob as the key, as this is guaranteed to be
- # unique for each filehandle. Don't use the file descriptor as
- # this will be re-used for each filehandle if the
- # close_upload_files feature is used.
- $self->{'.tmpfiles'}->{$$filehandle}= {
- hndl => $filehandle,
- name => $tmpfile,
- info => {%header},
- };
- push(@{$self->{param}{$param}},$filehandle);
- }
- }
- return $returnvalue;
-}
-END_OF_FUNC
-
-
-'upload' =><<'END_OF_FUNC',
-sub upload {
- my($self,$param_name) = self_or_default(@_);
- my @param = grep {ref($_) && defined(fileno($_))} $self->param($param_name);
- return unless @param;
- return wantarray ? @param : $param[0];
-}
-END_OF_FUNC
-
-'tmpFileName' => <<'END_OF_FUNC',
-sub tmpFileName {
- my($self,$filename) = self_or_default(@_);
- return $self->{'.tmpfiles'}->{$$filename}->{name} ?
- $self->{'.tmpfiles'}->{$$filename}->{name}->as_string
- : '';
-}
-END_OF_FUNC
-
-'uploadInfo' => <<'END_OF_FUNC',
-sub uploadInfo {
- my($self,$filename) = self_or_default(@_);
- return $self->{'.tmpfiles'}->{$$filename}->{info};
-}
-END_OF_FUNC
-
-# internal routine, don't use
-'_set_values_and_labels' => <<'END_OF_FUNC',
-sub _set_values_and_labels {
- my $self = shift;
- my ($v,$l,$n) = @_;
- $$l = $v if ref($v) eq 'HASH' && !ref($$l);
- return $self->param($n) if !defined($v);
- return $v if !ref($v);
- return ref($v) eq 'HASH' ? keys %$v : @$v;
-}
-END_OF_FUNC
-
-# internal routine, don't use
-'_set_attributes' => <<'END_OF_FUNC',
-sub _set_attributes {
- my $self = shift;
- my($element, $attributes) = @_;
- return '' unless defined($attributes->{$element});
- $attribs = ' ';
- for my $attrib (keys %{$attributes->{$element}}) {
- (my $clean_attrib = $attrib) =~ s/^-//;
- $attribs .= "@{[lc($clean_attrib)]}=\"$attributes->{$element}{$attrib}\" ";
- }
- $attribs =~ s/ $//;
- return $attribs;
-}
-END_OF_FUNC
-
-'_compile_all' => <<'END_OF_FUNC',
-sub _compile_all {
- for (@_) {
- next if defined(&$_);
- $AUTOLOAD = "CGI::$_";
- _compile();
- }
-}
-END_OF_FUNC
-
-);
-END_OF_AUTOLOAD
-;
-
-#########################################################
-# Globals and stubs for other packages that we use.
-#########################################################
-
-################### Fh -- lightweight filehandle ###############
-package Fh;
-
-use overload
- '""' => \&asString,
- 'cmp' => \&compare,
- 'fallback'=>1;
-
-$FH='fh00000';
-
-*Fh::AUTOLOAD = \&CGI::AUTOLOAD;
-
-sub DESTROY {
- my $self = shift;
- close $self;
-}
-
-$AUTOLOADED_ROUTINES = ''; # prevent -w error
-$AUTOLOADED_ROUTINES=<<'END_OF_AUTOLOAD';
-%SUBS = (
-'asString' => <<'END_OF_FUNC',
-sub asString {
- my $self = shift;
- # get rid of package name
- (my $i = $$self) =~ s/^\*(\w+::fh\d{5})+//;
- $i =~ s/%(..)/ chr(hex($1)) /eg;
- return $i.$CGI::TAINTED;
-# BEGIN DEAD CODE
-# This was an extremely clever patch that allowed "use strict refs".
-# Unfortunately it relied on another bug that caused leaky file descriptors.
-# The underlying bug has been fixed, so this no longer works. However
-# "strict refs" still works for some reason.
-# my $self = shift;
-# return ${*{$self}{SCALAR}};
-# END DEAD CODE
-}
-END_OF_FUNC
-
-'compare' => <<'END_OF_FUNC',
-sub compare {
- my $self = shift;
- my $value = shift;
- return "$self" cmp $value;
-}
-END_OF_FUNC
-
-'new' => <<'END_OF_FUNC',
-sub new {
- my($pack,$name,$file,$delete) = @_;
- _setup_symbols(@SAVED_SYMBOLS) if @SAVED_SYMBOLS;
- require Fcntl unless defined &Fcntl::O_RDWR;
- (my $safename = $name) =~ s/([':%])/ sprintf '%%%02X', ord $1 /eg;
- my $fv = ++$FH . $safename;
- my $ref = \*{"Fh::$fv"};
- $file =~ m!^([a-zA-Z0-9_\+ \'\":/.\$\\~-]+)$! || return;
- my $safe = $1;
- sysopen($ref,$safe,Fcntl::O_RDWR()|Fcntl::O_CREAT()|Fcntl::O_EXCL(),0600) || return;
- unlink($safe) if $delete;
- CORE::delete $Fh::{$fv};
- return bless $ref,$pack;
-}
-END_OF_FUNC
-
-'handle' => <<'END_OF_FUNC',
-sub handle {
- my $self = shift;
- eval "require IO::Handle" unless IO::Handle->can('new_from_fd');
- return IO::Handle->new_from_fd(fileno $self,"<");
-}
-END_OF_FUNC
-
-);
-END_OF_AUTOLOAD
-
-######################## MultipartBuffer ####################
-package MultipartBuffer;
-
-use constant DEBUG => 0;
-
-# how many bytes to read at a time. We use
-# a 4K buffer by default.
-$INITIAL_FILLUNIT = 1024 * 4;
-$TIMEOUT = 240*60; # 4 hour timeout for big files
-$SPIN_LOOP_MAX = 2000; # bug fix for some Netscape servers
-$CRLF=$CGI::CRLF;
-
-#reuse the autoload function
-*MultipartBuffer::AUTOLOAD = \&CGI::AUTOLOAD;
-
-# avoid autoloader warnings
-sub DESTROY {}
-
-###############################################################################
-################# THESE FUNCTIONS ARE AUTOLOADED ON DEMAND ####################
-###############################################################################
-$AUTOLOADED_ROUTINES = ''; # prevent -w error
-$AUTOLOADED_ROUTINES=<<'END_OF_AUTOLOAD';
-%SUBS = (
-
-'new' => <<'END_OF_FUNC',
-sub new {
- my($package,$interface,$boundary,$length) = @_;
- $FILLUNIT = $INITIAL_FILLUNIT;
- $CGI::DefaultClass->binmode($IN); # if $CGI::needs_binmode; # just do it always
-
- # If the user types garbage into the file upload field,
- # then Netscape passes NOTHING to the server (not good).
- # We may hang on this read in that case. So we implement
- # a read timeout. If nothing is ready to read
- # by then, we return.
-
- # Netscape seems to be a little bit unreliable
- # about providing boundary strings.
- my $boundary_read = 0;
- if ($boundary) {
-
- # Under the MIME spec, the boundary consists of the
- # characters "--" PLUS the Boundary string
-
- # BUG: IE 3.01 on the Macintosh uses just the boundary -- not
- # the two extra hyphens. We do a special case here on the user-agent!!!!
- $boundary = "--$boundary" unless CGI::user_agent('MSIE\s+3\.0[12];\s*Mac|DreamPassport');
-
- } else { # otherwise we find it ourselves
- my($old);
- ($old,$/) = ($/,$CRLF); # read a CRLF-delimited line
- $boundary = <STDIN>; # BUG: This won't work correctly under mod_perl
- $length -= length($boundary);
- chomp($boundary); # remove the CRLF
- $/ = $old; # restore old line separator
- $boundary_read++;
- }
-
- my $self = {LENGTH=>$length,
- CHUNKED=>!$length,
- BOUNDARY=>$boundary,
- INTERFACE=>$interface,
- BUFFER=>'',
- };
-
- $FILLUNIT = length($boundary)
- if length($boundary) > $FILLUNIT;
-
- my $retval = bless $self,ref $package || $package;
-
- # Read the preamble and the topmost (boundary) line plus the CRLF.
- unless ($boundary_read) {
- while ($self->read(0)) { }
- }
- die "Malformed multipart POST: data truncated\n" if $self->eof;
-
- return $retval;
-}
-END_OF_FUNC
-
-'readHeader' => <<'END_OF_FUNC',
-sub readHeader {
- my($self) = @_;
- my($end);
- my($ok) = 0;
- my($bad) = 0;
-
- local($CRLF) = "\015\012" if $CGI::OS eq 'VMS' || $CGI::EBCDIC;
-
- do {
- $self->fillBuffer($FILLUNIT);
- $ok++ if ($end = index($self->{BUFFER},"${CRLF}${CRLF}")) >= 0;
- $ok++ if $self->{BUFFER} eq '';
- $bad++ if !$ok && $self->{LENGTH} <= 0;
- # this was a bad idea
- # $FILLUNIT *= 2 if length($self->{BUFFER}) >= $FILLUNIT;
- } until $ok || $bad;
- return () if $bad;
-
- #EBCDIC NOTE: translate header into EBCDIC, but watch out for continuation lines!
-
- my($header) = substr($self->{BUFFER},0,$end+2);
- substr($self->{BUFFER},0,$end+4) = '';
- my %return;
-
- if ($CGI::EBCDIC) {
- warn "untranslated header=$header\n" if DEBUG;
- $header = CGI::Util::ascii2ebcdic($header);
- warn "translated header=$header\n" if DEBUG;
- }
-
- # See RFC 2045 Appendix A and RFC 822 sections 3.4.8
- # (Folding Long Header Fields), 3.4.3 (Comments)
- # and 3.4.5 (Quoted-Strings).
-
- my $token = '[-\w!\#$%&\'*+.^_\`|{}~]';
- $header=~s/$CRLF\s+/ /og; # merge continuation lines
-
- while ($header=~/($token+):\s+([^$CRLF]*)/mgox) {
- my ($field_name,$field_value) = ($1,$2);
- $field_name =~ s/\b(\w)/uc($1)/eg; #canonicalize
- $return{$field_name}=$field_value;
- }
- return %return;
-}
-END_OF_FUNC
-
-# This reads and returns the body as a single scalar value.
-'readBody' => <<'END_OF_FUNC',
-sub readBody {
- my($self) = @_;
- my($data);
- my($returnval)='';
-
- #EBCDIC NOTE: want to translate returnval into EBCDIC HERE
-
- while (defined($data = $self->read)) {
- $returnval .= $data;
- }
-
- if ($CGI::EBCDIC) {
- warn "untranslated body=$returnval\n" if DEBUG;
- $returnval = CGI::Util::ascii2ebcdic($returnval);
- warn "translated body=$returnval\n" if DEBUG;
- }
- return $returnval;
-}
-END_OF_FUNC
-
-# This will read $bytes or until the boundary is hit, whichever happens
-# first. After the boundary is hit, we return undef. The next read will
-# skip over the boundary and begin reading again;
-'read' => <<'END_OF_FUNC',
-sub read {
- my($self,$bytes) = @_;
-
- # default number of bytes to read
- $bytes = $bytes || $FILLUNIT;
-
- # Fill up our internal buffer in such a way that the boundary
- # is never split between reads.
- $self->fillBuffer($bytes);
-
- my $boundary_start = $CGI::EBCDIC ? CGI::Util::ebcdic2ascii($self->{BOUNDARY}) : $self->{BOUNDARY};
- my $boundary_end = $CGI::EBCDIC ? CGI::Util::ebcdic2ascii($self->{BOUNDARY}.'--') : $self->{BOUNDARY}.'--';
-
- # Find the boundary in the buffer (it may not be there).
- my $start = index($self->{BUFFER},$boundary_start);
-
- warn "boundary=$self->{BOUNDARY} length=$self->{LENGTH} start=$start\n" if DEBUG;
-
- # protect against malformed multipart POST operations
- die "Malformed multipart POST\n" unless $self->{CHUNKED} || ($start >= 0 || $self->{LENGTH} > 0);
-
- #EBCDIC NOTE: want to translate boundary search into ASCII here.
-
- # If the boundary begins the data, then skip past it
- # and return undef.
- if ($start == 0) {
-
- # clear us out completely if we've hit the last boundary.
- if (index($self->{BUFFER},$boundary_end)==0) {
- $self->{BUFFER}='';
- $self->{LENGTH}=0;
- return undef;
- }
-
- # just remove the boundary.
- substr($self->{BUFFER},0,length($boundary_start))='';
- $self->{BUFFER} =~ s/^\012\015?//;
- return undef;
- }
-
- my $bytesToReturn;
- if ($start > 0) { # read up to the boundary
- $bytesToReturn = $start-2 > $bytes ? $bytes : $start;
- } else { # read the requested number of bytes
- # leave enough bytes in the buffer to allow us to read
- # the boundary. Thanks to Kevin Hendrick for finding
- # this one.
- $bytesToReturn = $bytes - (length($boundary_start)+1);
- }
-
- my $returnval=substr($self->{BUFFER},0,$bytesToReturn);
- substr($self->{BUFFER},0,$bytesToReturn)='';
-
- # If we hit the boundary, remove the CRLF from the end.
- return ($bytesToReturn==$start)
- ? substr($returnval,0,-2) : $returnval;
-}
-END_OF_FUNC
-
-
-# This fills up our internal buffer in such a way that the
-# boundary is never split between reads
-'fillBuffer' => <<'END_OF_FUNC',
-sub fillBuffer {
- my($self,$bytes) = @_;
- return unless $self->{CHUNKED} || $self->{LENGTH};
-
- my($boundaryLength) = length($self->{BOUNDARY});
- my($bufferLength) = length($self->{BUFFER});
- my($bytesToRead) = $bytes - $bufferLength + $boundaryLength + 2;
- $bytesToRead = $self->{LENGTH} if !$self->{CHUNKED} && $self->{LENGTH} < $bytesToRead;
-
- # Try to read some data. We may hang here if the browser is screwed up.
- my $bytesRead = $self->{INTERFACE}->read_from_client(\$self->{BUFFER},
- $bytesToRead,
- $bufferLength);
- warn "bytesToRead=$bytesToRead, bufferLength=$bufferLength, buffer=$self->{BUFFER}\n" if DEBUG;
- $self->{BUFFER} = '' unless defined $self->{BUFFER};
-
- # An apparent bug in the Apache server causes the read()
- # to return zero bytes repeatedly without blocking if the
- # remote user aborts during a file transfer. I don't know how
- # they manage this, but the workaround is to abort if we get
- # more than SPIN_LOOP_MAX consecutive zero reads.
- if ($bytesRead <= 0) {
- die "CGI.pm: Server closed socket during multipart read (client aborted?).\n"
- if ($self->{ZERO_LOOP_COUNTER}++ >= $SPIN_LOOP_MAX);
- } else {
- $self->{ZERO_LOOP_COUNTER}=0;
- }
-
- $self->{LENGTH} -= $bytesRead if !$self->{CHUNKED} && $bytesRead;
-}
-END_OF_FUNC
-
-
-# Return true when we've finished reading
-'eof' => <<'END_OF_FUNC'
-sub eof {
- my($self) = @_;
- return 1 if (length($self->{BUFFER}) == 0)
- && ($self->{LENGTH} <= 0);
- undef;
-}
-END_OF_FUNC
-
-);
-END_OF_AUTOLOAD
-
-####################################################################################
-################################## TEMPORARY FILES #################################
-####################################################################################
-package CGITempFile;
-
-sub find_tempdir {
- $SL = $CGI::SL;
- $MAC = $CGI::OS eq 'MACINTOSH';
- my ($vol) = $MAC ? MacPerl::Volumes() =~ /:(.*)/ : "";
- unless (defined $TMPDIRECTORY) {
- @TEMP=("${SL}usr${SL}tmp","${SL}var${SL}tmp",
- "C:${SL}temp","${SL}tmp","${SL}temp",
- "${vol}${SL}Temporary Items",
- "${SL}WWW_ROOT", "${SL}SYS\$SCRATCH",
- "C:${SL}system${SL}temp");
-
- if( $CGI::OS eq 'WINDOWS' ){
- unshift @TEMP,
- $ENV{TEMP},
- $ENV{TMP},
- $ENV{WINDIR} . $SL . 'TEMP';
- }
-
- unshift(@TEMP,$ENV{'TMPDIR'}) if defined $ENV{'TMPDIR'};
-
- # this feature was supposed to provide per-user tmpfiles, but
- # it is problematic.
- # unshift(@TEMP,(getpwuid($<))[7].'/tmp') if $CGI::OS eq 'UNIX';
- # Rob: getpwuid() is unfortunately UNIX specific. On brain dead OS'es this
- # : can generate a 'getpwuid() not implemented' exception, even though
- # : it's never called. Found under DOS/Win with the DJGPP perl port.
- # : Refer to getpwuid() only at run-time if we're fortunate and have UNIX.
- # unshift(@TEMP,(eval {(getpwuid($>))[7]}).'/tmp') if $CGI::OS eq 'UNIX' and $> != 0;
-
- for (@TEMP) {
- do {$TMPDIRECTORY = $_; last} if -d $_ && -w _;
- }
- }
- $TMPDIRECTORY = $MAC ? "" : "." unless $TMPDIRECTORY;
-}
-
-find_tempdir();
-
-$MAXTRIES = 5000;
-
-# cute feature, but overload implementation broke it
-# %OVERLOAD = ('""'=>'as_string');
-*CGITempFile::AUTOLOAD = \&CGI::AUTOLOAD;
-
-sub DESTROY {
- my($self) = @_;
- $$self =~ m!^([a-zA-Z0-9_ \'\":/.\$\\~-]+)$! || return;
- my $safe = $1; # untaint operation
- unlink $safe; # get rid of the file
-}
-
-###############################################################################
-################# THESE FUNCTIONS ARE AUTOLOADED ON DEMAND ####################
-###############################################################################
-$AUTOLOADED_ROUTINES = ''; # prevent -w error
-$AUTOLOADED_ROUTINES=<<'END_OF_AUTOLOAD';
-%SUBS = (
-
-'new' => <<'END_OF_FUNC',
-sub new {
- my($package,$sequence) = @_;
- my $filename;
- find_tempdir() unless -w $TMPDIRECTORY;
- for (my $i = 0; $i < $MAXTRIES; $i++) {
- last if ! -f ($filename = sprintf("\%s${SL}CGItemp%d", $TMPDIRECTORY, $sequence++));
- }
- # check that it is a more-or-less valid filename
- return unless $filename =~ m!^([a-zA-Z0-9_\+ \'\":/.\$\\~-]+)$!;
- # this used to untaint, now it doesn't
- # $filename = $1;
- return bless \$filename;
-}
-END_OF_FUNC
-
-'as_string' => <<'END_OF_FUNC'
-sub as_string {
- my($self) = @_;
- return $$self;
-}
-END_OF_FUNC
-
-);
-END_OF_AUTOLOAD
-
-package CGI;
-
-# We get a whole bunch of warnings about "possibly uninitialized variables"
-# when running with the -w switch. Touch them all once to get rid of the
-# warnings. This is ugly and I hate it.
-if ($^W) {
- $CGI::CGI = '';
- $CGI::CGI=<<EOF;
- $CGI::VERSION;
- $MultipartBuffer::SPIN_LOOP_MAX;
- $MultipartBuffer::CRLF;
- $MultipartBuffer::TIMEOUT;
- $MultipartBuffer::INITIAL_FILLUNIT;
-EOF
- ;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-CGI - Handle Common Gateway Interface requests and responses
-
-=head1 SYNOPSIS
-
- use CGI;
-
- my $q = CGI->new;
-
- # Process an HTTP request
- @values = $q->param('form_field');
-
- $fh = $q->upload('file_field');
-
- $riddle = $query->cookie('riddle_name');
- %answers = $query->cookie('answers');
-
- # Prepare various HTTP responses
- print $q->header();
- print $q->header('application/json');
-
- $cookie1 = $q->cookie(-name=>'riddle_name', -value=>"The Sphynx's Question");
- $cookie2 = $q->cookie(-name=>'answers', -value=>\%answers);
- print $q->header(
- -type => 'image/gif',
- -expires => '+3d',
- -cookie => [$cookie1,$cookie2]
- );
-
- print $q->redirect('http://somewhere.else/in/movie/land');
-
-=head1 DESCRIPTION
-
-CGI.pm is a stable, complete and mature solution for processing and preparing
-HTTP requests and responses. Major features including processing form
-submissions, file uploads, reading and writing cookies, query string generation
-and manipulation, and processing and preparing HTTP headers. Some HTML
-generation utilities are included as well.
-
-CGI.pm performs very well in in a vanilla CGI.pm environment and also comes
-with built-in support for mod_perl and mod_perl2 as well as FastCGI.
-
-It has the benefit of having developed and refined over 10 years with input
-from dozens of contributors and being deployed on thousands of websites.
-CGI.pm has been included in the Perl distribution since Perl 5.4, and has
-become a de-facto standard.
-
-=head2 PROGRAMMING STYLE
-
-There are two styles of programming with CGI.pm, an object-oriented
-style and a function-oriented style. In the object-oriented style you
-create one or more CGI objects and then use object methods to create
-the various elements of the page. Each CGI object starts out with the
-list of named parameters that were passed to your CGI script by the
-server. You can modify the objects, save them to a file or database
-and recreate them. Because each object corresponds to the "state" of
-the CGI script, and because each object's parameter list is
-independent of the others, this allows you to save the state of the
-script and restore it later.
-
-For example, using the object oriented style, here is how you create
-a simple "Hello World" HTML page:
-
- #!/usr/local/bin/perl -w
- use CGI; # load CGI routines
- $q = new CGI; # create new CGI object
- print $q->header, # create the HTTP header
- $q->start_html('hello world'), # start the HTML
- $q->h1('hello world'), # level 1 header
- $q->end_html; # end the HTML
-
-In the function-oriented style, there is one default CGI object that
-you rarely deal with directly. Instead you just call functions to
-retrieve CGI parameters, create HTML tags, manage cookies, and so
-on. This provides you with a cleaner programming interface, but
-limits you to using one CGI object at a time. The following example
-prints the same page, but uses the function-oriented interface.
-The main differences are that we now need to import a set of functions
-into our name space (usually the "standard" functions), and we don't
-need to create the CGI object.
-
- #!/usr/local/bin/perl
- use CGI qw/:standard/; # load standard CGI routines
- print header, # create the HTTP header
- start_html('hello world'), # start the HTML
- h1('hello world'), # level 1 header
- end_html; # end the HTML
-
-The examples in this document mainly use the object-oriented style.
-See HOW TO IMPORT FUNCTIONS for important information on
-function-oriented programming in CGI.pm
-
-=head2 CALLING CGI.PM ROUTINES
-
-Most CGI.pm routines accept several arguments, sometimes as many as 20
-optional ones! To simplify this interface, all routines use a named
-argument calling style that looks like this:
-
- print $q->header(-type=>'image/gif',-expires=>'+3d');
-
-Each argument name is preceded by a dash. Neither case nor order
-matters in the argument list. -type, -Type, and -TYPE are all
-acceptable. In fact, only the first argument needs to begin with a
-dash. If a dash is present in the first argument, CGI.pm assumes
-dashes for the subsequent ones.
-
-Several routines are commonly called with just one argument. In the
-case of these routines you can provide the single argument without an
-argument name. header() happens to be one of these routines. In this
-case, the single argument is the document type.
-
- print $q->header('text/html');
-
-Other such routines are documented below.
-
-Sometimes named arguments expect a scalar, sometimes a reference to an
-array, and sometimes a reference to a hash. Often, you can pass any
-type of argument and the routine will do whatever is most appropriate.
-For example, the param() routine is used to set a CGI parameter to a
-single or a multi-valued value. The two cases are shown below:
-
- $q->param(-name=>'veggie',-value=>'tomato');
- $q->param(-name=>'veggie',-value=>['tomato','tomahto','potato','potahto']);
-
-A large number of routines in CGI.pm actually aren't specifically
-defined in the module, but are generated automatically as needed.
-These are the "HTML shortcuts," routines that generate HTML tags for
-use in dynamically-generated pages. HTML tags have both attributes
-(the attribute="value" pairs within the tag itself) and contents (the
-part between the opening and closing pairs.) To distinguish between
-attributes and contents, CGI.pm uses the convention of passing HTML
-attributes as a hash reference as the first argument, and the
-contents, if any, as any subsequent arguments. It works out like
-this:
-
- Code Generated HTML
- ---- --------------
- h1() <h1>
- h1('some','contents'); <h1>some contents</h1>
- h1({-align=>left}); <h1 align="LEFT">
- h1({-align=>left},'contents'); <h1 align="LEFT">contents</h1>
-
-HTML tags are described in more detail later.
-
-Many newcomers to CGI.pm are puzzled by the difference between the
-calling conventions for the HTML shortcuts, which require curly braces
-around the HTML tag attributes, and the calling conventions for other
-routines, which manage to generate attributes without the curly
-brackets. Don't be confused. As a convenience the curly braces are
-optional in all but the HTML shortcuts. If you like, you can use
-curly braces when calling any routine that takes named arguments. For
-example:
-
- print $q->header( {-type=>'image/gif',-expires=>'+3d'} );
-
-If you use the B<-w> switch, you will be warned that some CGI.pm argument
-names conflict with built-in Perl functions. The most frequent of
-these is the -values argument, used to create multi-valued menus,
-radio button clusters and the like. To get around this warning, you
-have several choices:
-
-=over 4
-
-=item 1.
-
-Use another name for the argument, if one is available.
-For example, -value is an alias for -values.
-
-=item 2.
-
-Change the capitalization, e.g. -Values
-
-=item 3.
-
-Put quotes around the argument name, e.g. '-values'
-
-=back
-
-Many routines will do something useful with a named argument that it
-doesn't recognize. For example, you can produce non-standard HTTP
-header fields by providing them as named arguments:
-
- print $q->header(-type => 'text/html',
- -cost => 'Three smackers',
- -annoyance_level => 'high',
- -complaints_to => 'bit bucket');
-
-This will produce the following nonstandard HTTP header:
-
- HTTP/1.0 200 OK
- Cost: Three smackers
- Annoyance-level: high
- Complaints-to: bit bucket
- Content-type: text/html
-
-Notice the way that underscores are translated automatically into
-hyphens. HTML-generating routines perform a different type of
-translation.
-
-This feature allows you to keep up with the rapidly changing HTTP and
-HTML "standards".
-
-=head2 CREATING A NEW QUERY OBJECT (OBJECT-ORIENTED STYLE):
-
- $query = new CGI;
-
-This will parse the input (from both POST and GET methods) and store
-it into a perl5 object called $query.
-
-Any filehandles from file uploads will have their position reset to
-the beginning of the file.
-
-=head2 CREATING A NEW QUERY OBJECT FROM AN INPUT FILE
-
- $query = new CGI(INPUTFILE);
-
-If you provide a file handle to the new() method, it will read
-parameters from the file (or STDIN, or whatever). The file can be in
-any of the forms describing below under debugging (i.e. a series of
-newline delimited TAG=VALUE pairs will work). Conveniently, this type
-of file is created by the save() method (see below). Multiple records
-can be saved and restored.
-
-Perl purists will be pleased to know that this syntax accepts
-references to file handles, or even references to filehandle globs,
-which is the "official" way to pass a filehandle:
-
- $query = new CGI(\*STDIN);
-
-You can also initialize the CGI object with a FileHandle or IO::File
-object.
-
-If you are using the function-oriented interface and want to
-initialize CGI state from a file handle, the way to do this is with
-B<restore_parameters()>. This will (re)initialize the
-default CGI object from the indicated file handle.
-
- open (IN,"test.in") || die;
- restore_parameters(IN);
- close IN;
-
-You can also initialize the query object from a hash
-reference:
-
- $query = new CGI( {'dinosaur'=>'barney',
- 'song'=>'I love you',
- 'friends'=>[qw/Jessica George Nancy/]}
- );
-
-or from a properly formatted, URL-escaped query string:
-
- $query = new CGI('dinosaur=barney&color=purple');
-
-or from a previously existing CGI object (currently this clones the
-parameter list, but none of the other object-specific fields, such as
-autoescaping):
-
- $old_query = new CGI;
- $new_query = new CGI($old_query);
-
-To create an empty query, initialize it from an empty string or hash:
-
- $empty_query = new CGI("");
-
- -or-
-
- $empty_query = new CGI({});
-
-=head2 FETCHING A LIST OF KEYWORDS FROM THE QUERY:
-
- @keywords = $query->keywords
-
-If the script was invoked as the result of an <ISINDEX> search, the
-parsed keywords can be obtained as an array using the keywords() method.
-
-=head2 FETCHING THE NAMES OF ALL THE PARAMETERS PASSED TO YOUR SCRIPT:
-
- @names = $query->param
-
-If the script was invoked with a parameter list
-(e.g. "name1=value1&name2=value2&name3=value3"), the param() method
-will return the parameter names as a list. If the script was invoked
-as an <ISINDEX> script and contains a string without ampersands
-(e.g. "value1+value2+value3") , there will be a single parameter named
-"keywords" containing the "+"-delimited keywords.
-
-NOTE: As of version 1.5, the array of parameter names returned will
-be in the same order as they were submitted by the browser.
-Usually this order is the same as the order in which the
-parameters are defined in the form (however, this isn't part
-of the spec, and so isn't guaranteed).
-
-=head2 FETCHING THE VALUE OR VALUES OF A SINGLE NAMED PARAMETER:
-
- @values = $query->param('foo');
-
- -or-
-
- $value = $query->param('foo');
-
-Pass the param() method a single argument to fetch the value of the
-named parameter. If the parameter is multivalued (e.g. from multiple
-selections in a scrolling list), you can ask to receive an array. Otherwise
-the method will return a single value.
-
-If a value is not given in the query string, as in the queries
-"name1=&name2=", it will be returned as an empty string.
-
-
-If the parameter does not exist at all, then param() will return undef
-in a scalar context, and the empty list in a list context.
-
-
-=head2 SETTING THE VALUE(S) OF A NAMED PARAMETER:
-
- $query->param('foo','an','array','of','values');
-
-This sets the value for the named parameter 'foo' to an array of
-values. This is one way to change the value of a field AFTER
-the script has been invoked once before. (Another way is with
-the -override parameter accepted by all methods that generate
-form elements.)
-
-param() also recognizes a named parameter style of calling described
-in more detail later:
-
- $query->param(-name=>'foo',-values=>['an','array','of','values']);
-
- -or-
-
- $query->param(-name=>'foo',-value=>'the value');
-
-=head2 APPENDING ADDITIONAL VALUES TO A NAMED PARAMETER:
-
- $query->append(-name=>'foo',-values=>['yet','more','values']);
-
-This adds a value or list of values to the named parameter. The
-values are appended to the end of the parameter if it already exists.
-Otherwise the parameter is created. Note that this method only
-recognizes the named argument calling syntax.
-
-=head2 IMPORTING ALL PARAMETERS INTO A NAMESPACE:
-
- $query->import_names('R');
-
-This creates a series of variables in the 'R' namespace. For example,
-$R::foo, @R:foo. For keyword lists, a variable @R::keywords will appear.
-If no namespace is given, this method will assume 'Q'.
-WARNING: don't import anything into 'main'; this is a major security
-risk!!!!
-
-NOTE 1: Variable names are transformed as necessary into legal Perl
-variable names. All non-legal characters are transformed into
-underscores. If you need to keep the original names, you should use
-the param() method instead to access CGI variables by name.
-
-NOTE 2: In older versions, this method was called B<import()>. As of version 2.20,
-this name has been removed completely to avoid conflict with the built-in
-Perl module B<import> operator.
-
-=head2 DELETING A PARAMETER COMPLETELY:
-
- $query->delete('foo','bar','baz');
-
-This completely clears a list of parameters. It sometimes useful for
-resetting parameters that you don't want passed down between script
-invocations.
-
-If you are using the function call interface, use "Delete()" instead
-to avoid conflicts with Perl's built-in delete operator.
-
-=head2 DELETING ALL PARAMETERS:
-
- $query->delete_all();
-
-This clears the CGI object completely. It might be useful to ensure
-that all the defaults are taken when you create a fill-out form.
-
-Use Delete_all() instead if you are using the function call interface.
-
-=head2 HANDLING NON-URLENCODED ARGUMENTS
-
-
-If POSTed data is not of type application/x-www-form-urlencoded or
-multipart/form-data, then the POSTed data will not be processed, but
-instead be returned as-is in a parameter named POSTDATA. To retrieve
-it, use code like this:
-
- my $data = $query->param('POSTDATA');
-
-Likewise if PUTed data can be retrieved with code like this:
-
- my $data = $query->param('PUTDATA');
-
-(If you don't know what the preceding means, don't worry about it. It
-only affects people trying to use CGI for XML processing and other
-specialized tasks.)
-
-
-=head2 DIRECT ACCESS TO THE PARAMETER LIST:
-
- $q->param_fetch('address')->[1] = '1313 Mockingbird Lane';
- unshift @{$q->param_fetch(-name=>'address')},'George Munster';
-
-If you need access to the parameter list in a way that isn't covered
-by the methods above, you can obtain a direct reference to it by
-calling the B<param_fetch()> method with the name of the . This
-will return an array reference to the named parameters, which you then
-can manipulate in any way you like.
-
-You can also use a named argument style using the B<-name> argument.
-
-=head2 FETCHING THE PARAMETER LIST AS A HASH:
-
- $params = $q->Vars;
- print $params->{'address'};
- @foo = split("\0",$params->{'foo'});
- %params = $q->Vars;
-
- use CGI ':cgi-lib';
- $params = Vars;
-
-Many people want to fetch the entire parameter list as a hash in which
-the keys are the names of the CGI parameters, and the values are the
-parameters' values. The Vars() method does this. Called in a scalar
-context, it returns the parameter list as a tied hash reference.
-Changing a key changes the value of the parameter in the underlying
-CGI parameter list. Called in a list context, it returns the
-parameter list as an ordinary hash. This allows you to read the
-contents of the parameter list, but not to change it.
-
-When using this, the thing you must watch out for are multivalued CGI
-parameters. Because a hash cannot distinguish between scalar and
-list context, multivalued parameters will be returned as a packed
-string, separated by the "\0" (null) character. You must split this
-packed string in order to get at the individual values. This is the
-convention introduced long ago by Steve Brenner in his cgi-lib.pl
-module for Perl version 4.
-
-If you wish to use Vars() as a function, import the I<:cgi-lib> set of
-function calls (also see the section on CGI-LIB compatibility).
-
-=head2 SAVING THE STATE OF THE SCRIPT TO A FILE:
-
- $query->save(\*FILEHANDLE)
-
-This will write the current state of the form to the provided
-filehandle. You can read it back in by providing a filehandle
-to the new() method. Note that the filehandle can be a file, a pipe,
-or whatever!
-
-The format of the saved file is:
-
- NAME1=VALUE1
- NAME1=VALUE1'
- NAME2=VALUE2
- NAME3=VALUE3
- =
-
-Both name and value are URL escaped. Multi-valued CGI parameters are
-represented as repeated names. A session record is delimited by a
-single = symbol. You can write out multiple records and read them
-back in with several calls to B<new>. You can do this across several
-sessions by opening the file in append mode, allowing you to create
-primitive guest books, or to keep a history of users' queries. Here's
-a short example of creating multiple session records:
-
- use CGI;
-
- open (OUT,">>test.out") || die;
- $records = 5;
- for (0..$records) {
- my $q = new CGI;
- $q->param(-name=>'counter',-value=>$_);
- $q->save(\*OUT);
- }
- close OUT;
-
- # reopen for reading
- open (IN,"test.out") || die;
- while (!eof(IN)) {
- my $q = new CGI(\*IN);
- print $q->param('counter'),"\n";
- }
-
-The file format used for save/restore is identical to that used by the
-Whitehead Genome Center's data exchange format "Boulderio", and can be
-manipulated and even databased using Boulderio utilities. See
-
- http://stein.cshl.org/boulder/
-
-for further details.
-
-If you wish to use this method from the function-oriented (non-OO)
-interface, the exported name for this method is B<save_parameters()>.
-
-=head2 RETRIEVING CGI ERRORS
-
-Errors can occur while processing user input, particularly when
-processing uploaded files. When these errors occur, CGI will stop
-processing and return an empty parameter list. You can test for
-the existence and nature of errors using the I<cgi_error()> function.
-The error messages are formatted as HTTP status codes. You can either
-incorporate the error text into an HTML page, or use it as the value
-of the HTTP status:
-
- my $error = $q->cgi_error;
- if ($error) {
- print $q->header(-status=>$error),
- $q->start_html('Problems'),
- $q->h2('Request not processed'),
- $q->strong($error);
- exit 0;
- }
-
-When using the function-oriented interface (see the next section),
-errors may only occur the first time you call I<param()>. Be ready
-for this!
-
-=head2 USING THE FUNCTION-ORIENTED INTERFACE
-
-To use the function-oriented interface, you must specify which CGI.pm
-routines or sets of routines to import into your script's namespace.
-There is a small overhead associated with this importation, but it
-isn't much.
-
- use CGI <list of methods>;
-
-The listed methods will be imported into the current package; you can
-call them directly without creating a CGI object first. This example
-shows how to import the B<param()> and B<header()>
-methods, and then use them directly:
-
- use CGI 'param','header';
- print header('text/plain');
- $zipcode = param('zipcode');
-
-More frequently, you'll import common sets of functions by referring
-to the groups by name. All function sets are preceded with a ":"
-character as in ":html3" (for tags defined in the HTML 3 standard).
-
-Here is a list of the function sets you can import:
-
-=over 4
-
-=item B<:cgi>
-
-Import all CGI-handling methods, such as B<param()>, B<path_info()>
-and the like.
-
-=item B<:form>
-
-Import all fill-out form generating methods, such as B<textfield()>.
-
-=item B<:html2>
-
-Import all methods that generate HTML 2.0 standard elements.
-
-=item B<:html3>
-
-Import all methods that generate HTML 3.0 elements (such as
-<table>, <super> and <sub>).
-
-=item B<:html4>
-
-Import all methods that generate HTML 4 elements (such as
-<abbrev>, <acronym> and <thead>).
-
-=item B<:netscape>
-
-Import all methods that generate Netscape-specific HTML extensions.
-
-=item B<:html>
-
-Import all HTML-generating shortcuts (i.e. 'html2' + 'html3' +
-'netscape')...
-
-=item B<:standard>
-
-Import "standard" features, 'html2', 'html3', 'html4', 'form' and 'cgi'.
-
-=item B<:all>
-
-Import all the available methods. For the full list, see the CGI.pm
-code, where the variable %EXPORT_TAGS is defined.
-
-=back
-
-If you import a function name that is not part of CGI.pm, the module
-will treat it as a new HTML tag and generate the appropriate
-subroutine. You can then use it like any other HTML tag. This is to
-provide for the rapidly-evolving HTML "standard." For example, say
-Microsoft comes out with a new tag called <gradient> (which causes the
-user's desktop to be flooded with a rotating gradient fill until his
-machine reboots). You don't need to wait for a new version of CGI.pm
-to start using it immediately:
-
- use CGI qw/:standard :html3 gradient/;
- print gradient({-start=>'red',-end=>'blue'});
-
-Note that in the interests of execution speed CGI.pm does B<not> use
-the standard L<Exporter> syntax for specifying load symbols. This may
-change in the future.
-
-If you import any of the state-maintaining CGI or form-generating
-methods, a default CGI object will be created and initialized
-automatically the first time you use any of the methods that require
-one to be present. This includes B<param()>, B<textfield()>,
-B<submit()> and the like. (If you need direct access to the CGI
-object, you can find it in the global variable B<$CGI::Q>). By
-importing CGI.pm methods, you can create visually elegant scripts:
-
- use CGI qw/:standard/;
- print
- header,
- start_html('Simple Script'),
- h1('Simple Script'),
- start_form,
- "What's your name? ",textfield('name'),p,
- "What's the combination?",
- checkbox_group(-name=>'words',
- -values=>['eenie','meenie','minie','moe'],
- -defaults=>['eenie','moe']),p,
- "What's your favorite color?",
- popup_menu(-name=>'color',
- -values=>['red','green','blue','chartreuse']),p,
- submit,
- end_form,
- hr,"\n";
-
- if (param) {
- print
- "Your name is ",em(param('name')),p,
- "The keywords are: ",em(join(", ",param('words'))),p,
- "Your favorite color is ",em(param('color')),".\n";
- }
- print end_html;
-
-=head2 PRAGMAS
-
-In addition to the function sets, there are a number of pragmas that
-you can import. Pragmas, which are always preceded by a hyphen,
-change the way that CGI.pm functions in various ways. Pragmas,
-function sets, and individual functions can all be imported in the
-same use() line. For example, the following use statement imports the
-standard set of functions and enables debugging mode (pragma
--debug):
-
- use CGI qw/:standard -debug/;
-
-The current list of pragmas is as follows:
-
-=over 4
-
-=item -any
-
-When you I<use CGI -any>, then any method that the query object
-doesn't recognize will be interpreted as a new HTML tag. This allows
-you to support the next I<ad hoc> Netscape or Microsoft HTML
-extension. This lets you go wild with new and unsupported tags:
-
- use CGI qw(-any);
- $q=new CGI;
- print $q->gradient({speed=>'fast',start=>'red',end=>'blue'});
-
-Since using <cite>any</cite> causes any mistyped method name
-to be interpreted as an HTML tag, use it with care or not at
-all.
-
-=item -compile
-
-This causes the indicated autoloaded methods to be compiled up front,
-rather than deferred to later. This is useful for scripts that run
-for an extended period of time under FastCGI or mod_perl, and for
-those destined to be crunched by Malcolm Beattie's Perl compiler. Use
-it in conjunction with the methods or method families you plan to use.
-
- use CGI qw(-compile :standard :html3);
-
-or even
-
- use CGI qw(-compile :all);
-
-Note that using the -compile pragma in this way will always have
-the effect of importing the compiled functions into the current
-namespace. If you want to compile without importing use the
-compile() method instead:
-
- use CGI();
- CGI->compile();
-
-This is particularly useful in a mod_perl environment, in which you
-might want to precompile all CGI routines in a startup script, and
-then import the functions individually in each mod_perl script.
-
-=item -nosticky
-
-By default the CGI module implements a state-preserving behavior
-called "sticky" fields. The way this works is that if you are
-regenerating a form, the methods that generate the form field values
-will interrogate param() to see if similarly-named parameters are
-present in the query string. If they find a like-named parameter, they
-will use it to set their default values.
-
-Sometimes this isn't what you want. The B<-nosticky> pragma prevents
-this behavior. You can also selectively change the sticky behavior in
-each element that you generate.
-
-=item -tabindex
-
-Automatically add tab index attributes to each form field. With this
-option turned off, you can still add tab indexes manually by passing a
--tabindex option to each field-generating method.
-
-=item -no_undef_params
-
-This keeps CGI.pm from including undef params in the parameter list.
-
-=item -no_xhtml
-
-By default, CGI.pm versions 2.69 and higher emit XHTML
-(http://www.w3.org/TR/xhtml1/). The -no_xhtml pragma disables this
-feature. Thanks to Michalis Kabrianis <kabrianis at hellug.gr> for this
-feature.
-
-If start_html()'s -dtd parameter specifies an HTML 2.0 or 3.2 DTD,
-XHTML will automatically be disabled without needing to use this
-pragma.
-
-=item -utf8
-
-This makes CGI.pm treat all parameters as UTF-8 strings. Use this with
-care, as it will interfere with the processing of binary uploads. It
-is better to manually select which fields are expected to return utf-8
-strings and convert them using code like this:
-
- use Encode;
- my $arg = decode utf8=>param('foo');
-
-=item -nph
-
-This makes CGI.pm produce a header appropriate for an NPH (no
-parsed header) script. You may need to do other things as well
-to tell the server that the script is NPH. See the discussion
-of NPH scripts below.
-
-=item -newstyle_urls
-
-Separate the name=value pairs in CGI parameter query strings with
-semicolons rather than ampersands. For example:
-
- ?name=fred;age=24;favorite_color=3
-
-Semicolon-delimited query strings are always accepted, but will not be
-emitted by self_url() and query_string() unless the -newstyle_urls
-pragma is specified.
-
-This became the default in version 2.64.
-
-=item -oldstyle_urls
-
-Separate the name=value pairs in CGI parameter query strings with
-ampersands rather than semicolons. This is no longer the default.
-
-=item -autoload
-
-This overrides the autoloader so that any function in your program
-that is not recognized is referred to CGI.pm for possible evaluation.
-This allows you to use all the CGI.pm functions without adding them to
-your symbol table, which is of concern for mod_perl users who are
-worried about memory consumption. I<Warning:> when
-I<-autoload> is in effect, you cannot use "poetry mode"
-(functions without the parenthesis). Use I<hr()> rather
-than I<hr>, or add something like I<use subs qw/hr p header/>
-to the top of your script.
-
-=item -no_debug
-
-This turns off the command-line processing features. If you want to
-run a CGI.pm script from the command line to produce HTML, and you
-don't want it to read CGI parameters from the command line or STDIN,
-then use this pragma:
-
- use CGI qw(-no_debug :standard);
-
-=item -debug
-
-This turns on full debugging. In addition to reading CGI arguments
-from the command-line processing, CGI.pm will pause and try to read
-arguments from STDIN, producing the message "(offline mode: enter
-name=value pairs on standard input)" features.
-
-See the section on debugging for more details.
-
-=item -private_tempfiles
-
-CGI.pm can process uploaded file. Ordinarily it spools the uploaded
-file to a temporary directory, then deletes the file when done.
-However, this opens the risk of eavesdropping as described in the file
-upload section. Another CGI script author could peek at this data
-during the upload, even if it is confidential information. On Unix
-systems, the -private_tempfiles pragma will cause the temporary file
-to be unlinked as soon as it is opened and before any data is written
-into it, reducing, but not eliminating the risk of eavesdropping
-(there is still a potential race condition). To make life harder for
-the attacker, the program chooses tempfile names by calculating a 32
-bit checksum of the incoming HTTP headers.
-
-To ensure that the temporary file cannot be read by other CGI scripts,
-use suEXEC or a CGI wrapper program to run your script. The temporary
-file is created with mode 0600 (neither world nor group readable).
-
-The temporary directory is selected using the following algorithm:
-
- 1. if the current user (e.g. "nobody") has a directory named
- "tmp" in its home directory, use that (Unix systems only).
-
- 2. if the environment variable TMPDIR exists, use the location
- indicated.
-
- 3. Otherwise try the locations /usr/tmp, /var/tmp, C:\temp,
- /tmp, /temp, ::Temporary Items, and \WWW_ROOT.
-
-Each of these locations is checked that it is a directory and is
-writable. If not, the algorithm tries the next choice.
-
-=back
-
-=head2 SPECIAL FORMS FOR IMPORTING HTML-TAG FUNCTIONS
-
-Many of the methods generate HTML tags. As described below, tag
-functions automatically generate both the opening and closing tags.
-For example:
-
- print h1('Level 1 Header');
-
-produces
-
- <h1>Level 1 Header</h1>
-
-There will be some times when you want to produce the start and end
-tags yourself. In this case, you can use the form start_I<tag_name>
-and end_I<tag_name>, as in:
-
- print start_h1,'Level 1 Header',end_h1;
-
-With a few exceptions (described below), start_I<tag_name> and
-end_I<tag_name> functions are not generated automatically when you
-I<use CGI>. However, you can specify the tags you want to generate
-I<start/end> functions for by putting an asterisk in front of their
-name, or, alternatively, requesting either "start_I<tag_name>" or
-"end_I<tag_name>" in the import list.
-
-Example:
-
- use CGI qw/:standard *table start_ul/;
-
-In this example, the following functions are generated in addition to
-the standard ones:
-
-=over 4
-
-=item 1. start_table() (generates a <table> tag)
-
-=item 2. end_table() (generates a </table> tag)
-
-=item 3. start_ul() (generates a <ul> tag)
-
-=item 4. end_ul() (generates a </ul> tag)
-
-=back
-
-=head1 GENERATING DYNAMIC DOCUMENTS
-
-Most of CGI.pm's functions deal with creating documents on the fly.
-Generally you will produce the HTTP header first, followed by the
-document itself. CGI.pm provides functions for generating HTTP
-headers of various types as well as for generating HTML. For creating
-GIF images, see the GD.pm module.
-
-Each of these functions produces a fragment of HTML or HTTP which you
-can print out directly so that it displays in the browser window,
-append to a string, or save to a file for later use.
-
-=head2 CREATING A STANDARD HTTP HEADER:
-
-Normally the first thing you will do in any CGI script is print out an
-HTTP header. This tells the browser what type of document to expect,
-and gives other optional information, such as the language, expiration
-date, and whether to cache the document. The header can also be
-manipulated for special purposes, such as server push and pay per view
-pages.
-
- print header;
-
- -or-
-
- print header('image/gif');
-
- -or-
-
- print header('text/html','204 No response');
-
- -or-
-
- print header(-type=>'image/gif',
- -nph=>1,
- -status=>'402 Payment required',
- -expires=>'+3d',
- -cookie=>$cookie,
- -charset=>'utf-7',
- -attachment=>'foo.gif',
- -Cost=>'$2.00');
-
-header() returns the Content-type: header. You can provide your own
-MIME type if you choose, otherwise it defaults to text/html. An
-optional second parameter specifies the status code and a human-readable
-message. For example, you can specify 204, "No response" to create a
-script that tells the browser to do nothing at all.
-
-The last example shows the named argument style for passing arguments
-to the CGI methods using named parameters. Recognized parameters are
-B<-type>, B<-status>, B<-expires>, and B<-cookie>. Any other named
-parameters will be stripped of their initial hyphens and turned into
-header fields, allowing you to specify any HTTP header you desire.
-Internal underscores will be turned into hyphens:
-
- print header(-Content_length=>3002);
-
-Most browsers will not cache the output from CGI scripts. Every time
-the browser reloads the page, the script is invoked anew. You can
-change this behavior with the B<-expires> parameter. When you specify
-an absolute or relative expiration interval with this parameter, some
-browsers and proxy servers will cache the script's output until the
-indicated expiration date. The following forms are all valid for the
--expires field:
-
- +30s 30 seconds from now
- +10m ten minutes from now
- +1h one hour from now
- -1d yesterday (i.e. "ASAP!")
- now immediately
- +3M in three months
- +10y in ten years time
- Thursday, 25-Apr-1999 00:40:33 GMT at the indicated time & date
-
-The B<-cookie> parameter generates a header that tells the browser to provide
-a "magic cookie" during all subsequent transactions with your script.
-Netscape cookies have a special format that includes interesting attributes
-such as expiration time. Use the cookie() method to create and retrieve
-session cookies.
-
-The B<-nph> parameter, if set to a true value, will issue the correct
-headers to work with a NPH (no-parse-header) script. This is important
-to use with certain servers that expect all their scripts to be NPH.
-
-The B<-charset> parameter can be used to control the character set
-sent to the browser. If not provided, defaults to ISO-8859-1. As a
-side effect, this sets the charset() method as well.
-
-The B<-attachment> parameter can be used to turn the page into an
-attachment. Instead of displaying the page, some browsers will prompt
-the user to save it to disk. The value of the argument is the
-suggested name for the saved file. In order for this to work, you may
-have to set the B<-type> to "application/octet-stream".
-
-The B<-p3p> parameter will add a P3P tag to the outgoing header. The
-parameter can be an arrayref or a space-delimited string of P3P tags.
-For example:
-
- print header(-p3p=>[qw(CAO DSP LAW CURa)]);
- print header(-p3p=>'CAO DSP LAW CURa');
-
-In either case, the outgoing header will be formatted as:
-
- P3P: policyref="/w3c/p3p.xml" cp="CAO DSP LAW CURa"
-
-=head2 GENERATING A REDIRECTION HEADER
-
- print redirect('http://somewhere.else/in/movie/land');
-
-Sometimes you don't want to produce a document yourself, but simply
-redirect the browser elsewhere, perhaps choosing a URL based on the
-time of day or the identity of the user.
-
-The redirect() function redirects the browser to a different URL. If
-you use redirection like this, you should B<not> print out a header as
-well.
-
-You should always use full URLs (including the http: or ftp: part) in
-redirection requests. Relative URLs will not work correctly.
-
-You can also use named arguments:
-
- print redirect(-uri=>'http://somewhere.else/in/movie/land',
- -nph=>1,
- -status=>301);
-
-The B<-nph> parameter, if set to a true value, will issue the correct
-headers to work with a NPH (no-parse-header) script. This is important
-to use with certain servers, such as Microsoft IIS, which
-expect all their scripts to be NPH.
-
-The B<-status> parameter will set the status of the redirect. HTTP
-defines three different possible redirection status codes:
-
- 301 Moved Permanently
- 302 Found
- 303 See Other
-
-The default if not specified is 302, which means "moved temporarily."
-You may change the status to another status code if you wish. Be
-advised that changing the status to anything other than 301, 302 or
-303 will probably break redirection.
-
-=head2 CREATING THE HTML DOCUMENT HEADER
-
- print start_html(-title=>'Secrets of the Pyramids',
- -author=>'fred at capricorn.org',
- -base=>'true',
- -target=>'_blank',
- -meta=>{'keywords'=>'pharaoh secret mummy',
- 'copyright'=>'copyright 1996 King Tut'},
- -style=>{'src'=>'/styles/style1.css'},
- -BGCOLOR=>'blue');
-
-After creating the HTTP header, most CGI scripts will start writing
-out an HTML document. The start_html() routine creates the top of the
-page, along with a lot of optional information that controls the
-page's appearance and behavior.
-
-This method returns a canned HTML header and the opening <body> tag.
-All parameters are optional. In the named parameter form, recognized
-parameters are -title, -author, -base, -xbase, -dtd, -lang and -target
-(see below for the explanation). Any additional parameters you
-provide, such as the Netscape unofficial BGCOLOR attribute, are added
-to the <body> tag. Additional parameters must be proceeded by a
-hyphen.
-
-The argument B<-xbase> allows you to provide an HREF for the <base> tag
-different from the current location, as in
-
- -xbase=>"http://home.mcom.com/"
-
-All relative links will be interpreted relative to this tag.
-
-The argument B<-target> allows you to provide a default target frame
-for all the links and fill-out forms on the page. B<This is a
-non-standard HTTP feature which only works with Netscape browsers!>
-See the Netscape documentation on frames for details of how to
-manipulate this.
-
- -target=>"answer_window"
-
-All relative links will be interpreted relative to this tag.
-You add arbitrary meta information to the header with the B<-meta>
-argument. This argument expects a reference to a hash
-containing name/value pairs of meta information. These will be turned
-into a series of header <meta> tags that look something like this:
-
- <meta name="keywords" content="pharaoh secret mummy">
- <meta name="description" content="copyright 1996 King Tut">
-
-To create an HTTP-EQUIV type of <meta> tag, use B<-head>, described
-below.
-
-The B<-style> argument is used to incorporate cascading stylesheets
-into your code. See the section on CASCADING STYLESHEETS for more
-information.
-
-The B<-lang> argument is used to incorporate a language attribute into
-the <html> tag. For example:
-
- print $q->start_html(-lang=>'fr-CA');
-
-The default if not specified is "en-US" for US English, unless the
--dtd parameter specifies an HTML 2.0 or 3.2 DTD, in which case the
-lang attribute is left off. You can force the lang attribute to left
-off in other cases by passing an empty string (-lang=>'').
-
-The B<-encoding> argument can be used to specify the character set for
-XHTML. It defaults to iso-8859-1 if not specified.
-
-The B<-declare_xml> argument, when used in conjunction with XHTML,
-will put a <?xml> declaration at the top of the HTML header. The sole
-purpose of this declaration is to declare the character set
-encoding. In the absence of -declare_xml, the output HTML will contain
-a <meta> tag that specifies the encoding, allowing the HTML to pass
-most validators. The default for -declare_xml is false.
-
-You can place other arbitrary HTML elements to the <head> section with the
-B<-head> tag. For example, to place the rarely-used <link> element in the
-head section, use this:
-
- print start_html(-head=>Link({-rel=>'next',
- -href=>'http://www.capricorn.com/s2.html'}));
-
-To incorporate multiple HTML elements into the <head> section, just pass an
-array reference:
-
- print start_html(-head=>[
- Link({-rel=>'next',
- -href=>'http://www.capricorn.com/s2.html'}),
- Link({-rel=>'previous',
- -href=>'http://www.capricorn.com/s1.html'})
- ]
- );
-
-And here's how to create an HTTP-EQUIV <meta> tag:
-
- print start_html(-head=>meta({-http_equiv => 'Content-Type',
- -content => 'text/html'}))
-
-
-JAVASCRIPTING: The B<-script>, B<-noScript>, B<-onLoad>,
-B<-onMouseOver>, B<-onMouseOut> and B<-onUnload> parameters are used
-to add Netscape JavaScript calls to your pages. B<-script> should
-point to a block of text containing JavaScript function definitions.
-This block will be placed within a <script> block inside the HTML (not
-HTTP) header. The block is placed in the header in order to give your
-page a fighting chance of having all its JavaScript functions in place
-even if the user presses the stop button before the page has loaded
-completely. CGI.pm attempts to format the script in such a way that
-JavaScript-naive browsers will not choke on the code: unfortunately
-there are some browsers, such as Chimera for Unix, that get confused
-by it nevertheless.
-
-The B<-onLoad> and B<-onUnload> parameters point to fragments of JavaScript
-code to execute when the page is respectively opened and closed by the
-browser. Usually these parameters are calls to functions defined in the
-B<-script> field:
-
- $query = new CGI;
- print header;
- $JSCRIPT=<<END;
- // Ask a silly question
- function riddle_me_this() {
- var r = prompt("What walks on four legs in the morning, " +
- "two legs in the afternoon, " +
- "and three legs in the evening?");
- response(r);
- }
- // Get a silly answer
- function response(answer) {
- if (answer == "man")
- alert("Right you are!");
- else
- alert("Wrong! Guess again.");
- }
- END
- print start_html(-title=>'The Riddle of the Sphinx',
- -script=>$JSCRIPT);
-
-Use the B<-noScript> parameter to pass some HTML text that will be displayed on
-browsers that do not have JavaScript (or browsers where JavaScript is turned
-off).
-
-The <script> tag, has several attributes including "type" and src.
-The latter is particularly interesting, as it allows you to keep the
-JavaScript code in a file or CGI script rather than cluttering up each
-page with the source. To use these attributes pass a HASH reference
-in the B<-script> parameter containing one or more of -type, -src, or
--code:
-
- print $q->start_html(-title=>'The Riddle of the Sphinx',
- -script=>{-type=>'JAVASCRIPT',
- -src=>'/javascript/sphinx.js'}
- );
-
- print $q->(-title=>'The Riddle of the Sphinx',
- -script=>{-type=>'PERLSCRIPT',
- -code=>'print "hello world!\n;"'}
- );
-
-
-A final feature allows you to incorporate multiple <script> sections into the
-header. Just pass the list of script sections as an array reference.
-this allows you to specify different source files for different dialects
-of JavaScript. Example:
-
- print $q->start_html(-title=>'The Riddle of the Sphinx',
- -script=>[
- { -type => 'text/javascript',
- -src => '/javascript/utilities10.js'
- },
- { -type => 'text/javascript',
- -src => '/javascript/utilities11.js'
- },
- { -type => 'text/jscript',
- -src => '/javascript/utilities12.js'
- },
- { -type => 'text/ecmascript',
- -src => '/javascript/utilities219.js'
- }
- ]
- );
-
-The option "-language" is a synonym for -type, and is supported for
-backwad compatibility.
-
-The old-style positional parameters are as follows:
-
-=over 4
-
-=item B<Parameters:>
-
-=item 1.
-
-The title
-
-=item 2.
-
-The author's e-mail address (will create a <link rev="MADE"> tag if present
-
-=item 3.
-
-A 'true' flag if you want to include a <base> tag in the header. This
-helps resolve relative addresses to absolute ones when the document is moved,
-but makes the document hierarchy non-portable. Use with care!
-
-=item 4, 5, 6...
-
-Any other parameters you want to include in the <body> tag. This is a good
-place to put Netscape extensions, such as colors and wallpaper patterns.
-
-=back
-
-=head2 ENDING THE HTML DOCUMENT:
-
- print end_html
-
-This ends an HTML document by printing the </body></html> tags.
-
-=head2 CREATING A SELF-REFERENCING URL THAT PRESERVES STATE INFORMATION:
-
- $myself = self_url;
- print q(<a href="$myself">I'm talking to myself.</a>);
-
-self_url() will return a URL, that, when selected, will reinvoke
-this script with all its state information intact. This is most
-useful when you want to jump around within the document using
-internal anchors but you don't want to disrupt the current contents
-of the form(s). Something like this will do the trick.
-
- $myself = self_url;
- print "<a href=\"$myself#table1\">See table 1</a>";
- print "<a href=\"$myself#table2\">See table 2</a>";
- print "<a href=\"$myself#yourself\">See for yourself</a>";
-
-If you want more control over what's returned, using the B<url()>
-method instead.
-
-You can also retrieve the unprocessed query string with query_string():
-
- $the_string = query_string;
-
-=head2 OBTAINING THE SCRIPT'S URL
-
- $full_url = url();
- $full_url = url(-full=>1); #alternative syntax
- $relative_url = url(-relative=>1);
- $absolute_url = url(-absolute=>1);
- $url_with_path = url(-path_info=>1);
- $url_with_path_and_query = url(-path_info=>1,-query=>1);
- $netloc = url(-base => 1);
-
-B<url()> returns the script's URL in a variety of formats. Called
-without any arguments, it returns the full form of the URL, including
-host name and port number
-
- http://your.host.com/path/to/script.cgi
-
-You can modify this format with the following named arguments:
-
-=over 4
-
-=item B<-absolute>
-
-If true, produce an absolute URL, e.g.
-
- /path/to/script.cgi
-
-=item B<-relative>
-
-Produce a relative URL. This is useful if you want to reinvoke your
-script with different parameters. For example:
-
- script.cgi
-
-=item B<-full>
-
-Produce the full URL, exactly as if called without any arguments.
-This overrides the -relative and -absolute arguments.
-
-=item B<-path> (B<-path_info>)
-
-Append the additional path information to the URL. This can be
-combined with B<-full>, B<-absolute> or B<-relative>. B<-path_info>
-is provided as a synonym.
-
-=item B<-query> (B<-query_string>)
-
-Append the query string to the URL. This can be combined with
-B<-full>, B<-absolute> or B<-relative>. B<-query_string> is provided
-as a synonym.
-
-=item B<-base>
-
-Generate just the protocol and net location, as in http://www.foo.com:8000
-
-=item B<-rewrite>
-
-If Apache's mod_rewrite is turned on, then the script name and path
-info probably won't match the request that the user sent. Set
--rewrite=>1 (default) to return URLs that match what the user sent
-(the original request URI). Set -rewrite=>0 to return URLs that match
-the URL after mod_rewrite's rules have run. Because the additional
-path information only makes sense in the context of the rewritten URL,
--rewrite is set to false when you request path info in the URL.
-
-=back
-
-=head2 MIXING POST AND URL PARAMETERS
-
- $color = url_param('color');
-
-It is possible for a script to receive CGI parameters in the URL as
-well as in the fill-out form by creating a form that POSTs to a URL
-containing a query string (a "?" mark followed by arguments). The
-B<param()> method will always return the contents of the POSTed
-fill-out form, ignoring the URL's query string. To retrieve URL
-parameters, call the B<url_param()> method. Use it in the same way as
-B<param()>. The main difference is that it allows you to read the
-parameters, but not set them.
-
-
-Under no circumstances will the contents of the URL query string
-interfere with similarly-named CGI parameters in POSTed forms. If you
-try to mix a URL query string with a form submitted with the GET
-method, the results will not be what you expect.
-
-=head1 CREATING STANDARD HTML ELEMENTS:
-
-CGI.pm defines general HTML shortcut methods for most, if not all of
-the HTML 3 and HTML 4 tags. HTML shortcuts are named after a single
-HTML element and return a fragment of HTML text that you can then
-print or manipulate as you like. Each shortcut returns a fragment of
-HTML code that you can append to a string, save to a file, or, most
-commonly, print out so that it displays in the browser window.
-
-This example shows how to use the HTML methods:
-
- print $q->blockquote(
- "Many years ago on the island of",
- $q->a({href=>"http://crete.org/"},"Crete"),
- "there lived a Minotaur named",
- $q->strong("Fred."),
- ),
- $q->hr;
-
-This results in the following HTML code (extra newlines have been
-added for readability):
-
- <blockquote>
- Many years ago on the island of
- <a href="http://crete.org/">Crete</a> there lived
- a minotaur named <strong>Fred.</strong>
- </blockquote>
- <hr>
-
-If you find the syntax for calling the HTML shortcuts awkward, you can
-import them into your namespace and dispense with the object syntax
-completely (see the next section for more details):
-
- use CGI ':standard';
- print blockquote(
- "Many years ago on the island of",
- a({href=>"http://crete.org/"},"Crete"),
- "there lived a minotaur named",
- strong("Fred."),
- ),
- hr;
-
-=head2 PROVIDING ARGUMENTS TO HTML SHORTCUTS
-
-The HTML methods will accept zero, one or multiple arguments. If you
-provide no arguments, you get a single tag:
-
- print hr; # <hr>
-
-If you provide one or more string arguments, they are concatenated
-together with spaces and placed between opening and closing tags:
-
- print h1("Chapter","1"); # <h1>Chapter 1</h1>"
-
-If the first argument is a hash reference, then the keys
-and values of the hash become the HTML tag's attributes:
-
- print a({-href=>'fred.html',-target=>'_new'},
- "Open a new frame");
-
- <a href="fred.html",target="_new">Open a new frame</a>
-
-You may dispense with the dashes in front of the attribute names if
-you prefer:
-
- print img {src=>'fred.gif',align=>'LEFT'};
-
- <img align="LEFT" src="fred.gif">
-
-Sometimes an HTML tag attribute has no argument. For example, ordered
-lists can be marked as COMPACT. The syntax for this is an argument that
-that points to an undef string:
-
- print ol({compact=>undef},li('one'),li('two'),li('three'));
-
-Prior to CGI.pm version 2.41, providing an empty ('') string as an
-attribute argument was the same as providing undef. However, this has
-changed in order to accommodate those who want to create tags of the form
-<img alt="">. The difference is shown in these two pieces of code:
-
- CODE RESULT
- img({alt=>undef}) <img alt>
- img({alt=>''}) <img alt="">
-
-=head2 THE DISTRIBUTIVE PROPERTY OF HTML SHORTCUTS
-
-One of the cool features of the HTML shortcuts is that they are
-distributive. If you give them an argument consisting of a
-B<reference> to a list, the tag will be distributed across each
-element of the list. For example, here's one way to make an ordered
-list:
-
- print ul(
- li({-type=>'disc'},['Sneezy','Doc','Sleepy','Happy'])
- );
-
-This example will result in HTML output that looks like this:
-
- <ul>
- <li type="disc">Sneezy</li>
- <li type="disc">Doc</li>
- <li type="disc">Sleepy</li>
- <li type="disc">Happy</li>
- </ul>
-
-This is extremely useful for creating tables. For example:
-
- print table({-border=>undef},
- caption('When Should You Eat Your Vegetables?'),
- Tr({-align=>CENTER,-valign=>TOP},
- [
- th(['Vegetable', 'Breakfast','Lunch','Dinner']),
- td(['Tomatoes' , 'no', 'yes', 'yes']),
- td(['Broccoli' , 'no', 'no', 'yes']),
- td(['Onions' , 'yes','yes', 'yes'])
- ]
- )
- );
-
-=head2 HTML SHORTCUTS AND LIST INTERPOLATION
-
-Consider this bit of code:
-
- print blockquote(em('Hi'),'mom!'));
-
-It will ordinarily return the string that you probably expect, namely:
-
- <blockquote><em>Hi</em> mom!</blockquote>
-
-Note the space between the element "Hi" and the element "mom!".
-CGI.pm puts the extra space there using array interpolation, which is
-controlled by the magic $" variable. Sometimes this extra space is
-not what you want, for example, when you are trying to align a series
-of images. In this case, you can simply change the value of $" to an
-empty string.
-
- {
- local($") = '';
- print blockquote(em('Hi'),'mom!'));
- }
-
-I suggest you put the code in a block as shown here. Otherwise the
-change to $" will affect all subsequent code until you explicitly
-reset it.
-
-=head2 NON-STANDARD HTML SHORTCUTS
-
-A few HTML tags don't follow the standard pattern for various
-reasons.
-
-B<comment()> generates an HTML comment (<!-- comment -->). Call it
-like
-
- print comment('here is my comment');
-
-Because of conflicts with built-in Perl functions, the following functions
-begin with initial caps:
-
- Select
- Tr
- Link
- Delete
- Accept
- Sub
-
-In addition, start_html(), end_html(), start_form(), end_form(),
-start_multipart_form() and all the fill-out form tags are special.
-See their respective sections.
-
-=head2 AUTOESCAPING HTML
-
-By default, all HTML that is emitted by the form-generating functions
-is passed through a function called escapeHTML():
-
-=over 4
-
-=item $escaped_string = escapeHTML("unescaped string");
-
-Escape HTML formatting characters in a string.
-
-=back
-
-Provided that you have specified a character set of ISO-8859-1 (the
-default), the standard HTML escaping rules will be used. The "<"
-character becomes "<", ">" becomes ">", "&" becomes "&", and
-the quote character becomes """. In addition, the hexadecimal
-0x8b and 0x9b characters, which some browsers incorrectly interpret
-as the left and right angle-bracket characters, are replaced by their
-numeric character entities ("‹" and "›"). If you manually change
-the charset, either by calling the charset() method explicitly or by
-passing a -charset argument to header(), then B<all> characters will
-be replaced by their numeric entities, since CGI.pm has no lookup
-table for all the possible encodings.
-
-The automatic escaping does not apply to other shortcuts, such as
-h1(). You should call escapeHTML() yourself on untrusted data in
-order to protect your pages against nasty tricks that people may enter
-into guestbooks, etc.. To change the character set, use charset().
-To turn autoescaping off completely, use autoEscape(0):
-
-=over 4
-
-=item $charset = charset([$charset]);
-
-Get or set the current character set.
-
-=item $flag = autoEscape([$flag]);
-
-Get or set the value of the autoescape flag.
-
-=back
-
-=head2 PRETTY-PRINTING HTML
-
-By default, all the HTML produced by these functions comes out as one
-long line without carriage returns or indentation. This is yuck, but
-it does reduce the size of the documents by 10-20%. To get
-pretty-printed output, please use L<CGI::Pretty>, a subclass
-contributed by Brian Paulsen.
-
-=head1 CREATING FILL-OUT FORMS:
-
-I<General note> The various form-creating methods all return strings
-to the caller, containing the tag or tags that will create the requested
-form element. You are responsible for actually printing out these strings.
-It's set up this way so that you can place formatting tags
-around the form elements.
-
-I<Another note> The default values that you specify for the forms are only
-used the B<first> time the script is invoked (when there is no query
-string). On subsequent invocations of the script (when there is a query
-string), the former values are used even if they are blank.
-
-If you want to change the value of a field from its previous value, you have two
-choices:
-
-(1) call the param() method to set it.
-
-(2) use the -override (alias -force) parameter (a new feature in version 2.15).
-This forces the default value to be used, regardless of the previous value:
-
- print textfield(-name=>'field_name',
- -default=>'starting value',
- -override=>1,
- -size=>50,
- -maxlength=>80);
-
-I<Yet another note> By default, the text and labels of form elements are
-escaped according to HTML rules. This means that you can safely use
-"<CLICK ME>" as the label for a button. However, it also interferes with
-your ability to incorporate special HTML character sequences, such as Á,
-into your fields. If you wish to turn off automatic escaping, call the
-autoEscape() method with a false value immediately after creating the CGI object:
-
- $query = new CGI;
- autoEscape(undef);
-
-I<A Lurking Trap!> Some of the form-element generating methods return
-multiple tags. In a scalar context, the tags will be concatenated
-together with spaces, or whatever is the current value of the $"
-global. In a list context, the methods will return a list of
-elements, allowing you to modify them if you wish. Usually you will
-not notice this behavior, but beware of this:
-
- printf("%s\n",end_form())
-
-end_form() produces several tags, and only the first of them will be
-printed because the format only expects one value.
-
-<p>
-
-
-=head2 CREATING AN ISINDEX TAG
-
- print isindex(-action=>$action);
-
- -or-
-
- print isindex($action);
-
-Prints out an <isindex> tag. Not very exciting. The parameter
--action specifies the URL of the script to process the query. The
-default is to process the query with the current script.
-
-=head2 STARTING AND ENDING A FORM
-
- print start_form(-method=>$method,
- -action=>$action,
- -enctype=>$encoding);
- <... various form stuff ...>
- print endform;
-
- -or-
-
- print start_form($method,$action,$encoding);
- <... various form stuff ...>
- print endform;
-
-start_form() will return a <form> tag with the optional method,
-action and form encoding that you specify. The defaults are:
-
- method: POST
- action: this script
- enctype: application/x-www-form-urlencoded
-
-endform() returns the closing </form> tag.
-
-Start_form()'s enctype argument tells the browser how to package the various
-fields of the form before sending the form to the server. Two
-values are possible:
-
-B<Note:> This method was previously named startform(), and startform()
-is still recognized as an alias.
-
-=over 4
-
-=item B<application/x-www-form-urlencoded>
-
-This is the older type of encoding used by all browsers prior to
-Netscape 2.0. It is compatible with many CGI scripts and is
-suitable for short fields containing text data. For your
-convenience, CGI.pm stores the name of this encoding
-type in B<&CGI::URL_ENCODED>.
-
-=item B<multipart/form-data>
-
-This is the newer type of encoding introduced by Netscape 2.0.
-It is suitable for forms that contain very large fields or that
-are intended for transferring binary data. Most importantly,
-it enables the "file upload" feature of Netscape 2.0 forms. For
-your convenience, CGI.pm stores the name of this encoding type
-in B<&CGI::MULTIPART>
-
-Forms that use this type of encoding are not easily interpreted
-by CGI scripts unless they use CGI.pm or another library designed
-to handle them.
-
-If XHTML is activated (the default), then forms will be automatically
-created using this type of encoding.
-
-=back
-
-For compatibility, the start_form() method uses the older form of
-encoding by default. If you want to use the newer form of encoding
-by default, you can call B<start_multipart_form()> instead of
-B<start_form()>.
-
-JAVASCRIPTING: The B<-name> and B<-onSubmit> parameters are provided
-for use with JavaScript. The -name parameter gives the
-form a name so that it can be identified and manipulated by
-JavaScript functions. -onSubmit should point to a JavaScript
-function that will be executed just before the form is submitted to your
-server. You can use this opportunity to check the contents of the form
-for consistency and completeness. If you find something wrong, you
-can put up an alert box or maybe fix things up yourself. You can
-abort the submission by returning false from this function.
-
-Usually the bulk of JavaScript functions are defined in a <script>
-block in the HTML header and -onSubmit points to one of these function
-call. See start_html() for details.
-
-=head2 FORM ELEMENTS
-
-After starting a form, you will typically create one or more
-textfields, popup menus, radio groups and other form elements. Each
-of these elements takes a standard set of named arguments. Some
-elements also have optional arguments. The standard arguments are as
-follows:
-
-=over 4
-
-=item B<-name>
-
-The name of the field. After submission this name can be used to
-retrieve the field's value using the param() method.
-
-=item B<-value>, B<-values>
-
-The initial value of the field which will be returned to the script
-after form submission. Some form elements, such as text fields, take
-a single scalar -value argument. Others, such as popup menus, take a
-reference to an array of values. The two arguments are synonyms.
-
-=item B<-tabindex>
-
-A numeric value that sets the order in which the form element receives
-focus when the user presses the tab key. Elements with lower values
-receive focus first.
-
-=item B<-id>
-
-A string identifier that can be used to identify this element to
-JavaScript and DHTML.
-
-=item B<-override>
-
-A boolean, which, if true, forces the element to take on the value
-specified by B<-value>, overriding the sticky behavior described
-earlier for the B<-no_sticky> pragma.
-
-=item B<-onChange>, B<-onFocus>, B<-onBlur>, B<-onMouseOver>, B<-onMouseOut>, B<-onSelect>
-
-These are used to assign JavaScript event handlers. See the
-JavaScripting section for more details.
-
-=back
-
-Other common arguments are described in the next section. In addition
-to these, all attributes described in the HTML specifications are
-supported.
-
-=head2 CREATING A TEXT FIELD
-
- print textfield(-name=>'field_name',
- -value=>'starting value',
- -size=>50,
- -maxlength=>80);
- -or-
-
- print textfield('field_name','starting value',50,80);
-
-textfield() will return a text input field.
-
-=over 4
-
-=item B<Parameters>
-
-=item 1.
-
-The first parameter is the required name for the field (-name).
-
-=item 2.
-
-The optional second parameter is the default starting value for the field
-contents (-value, formerly known as -default).
-
-=item 3.
-
-The optional third parameter is the size of the field in
- characters (-size).
-
-=item 4.
-
-The optional fourth parameter is the maximum number of characters the
- field will accept (-maxlength).
-
-=back
-
-As with all these methods, the field will be initialized with its
-previous contents from earlier invocations of the script.
-When the form is processed, the value of the text field can be
-retrieved with:
-
- $value = param('foo');
-
-If you want to reset it from its initial value after the script has been
-called once, you can do so like this:
-
- param('foo',"I'm taking over this value!");
-
-=head2 CREATING A BIG TEXT FIELD
-
- print textarea(-name=>'foo',
- -default=>'starting value',
- -rows=>10,
- -columns=>50);
-
- -or
-
- print textarea('foo','starting value',10,50);
-
-textarea() is just like textfield, but it allows you to specify
-rows and columns for a multiline text entry box. You can provide
-a starting value for the field, which can be long and contain
-multiple lines.
-
-=head2 CREATING A PASSWORD FIELD
-
- print password_field(-name=>'secret',
- -value=>'starting value',
- -size=>50,
- -maxlength=>80);
- -or-
-
- print password_field('secret','starting value',50,80);
-
-password_field() is identical to textfield(), except that its contents
-will be starred out on the web page.
-
-=head2 CREATING A FILE UPLOAD FIELD
-
- print filefield(-name=>'uploaded_file',
- -default=>'starting value',
- -size=>50,
- -maxlength=>80);
- -or-
-
- print filefield('uploaded_file','starting value',50,80);
-
-filefield() will return a file upload field for Netscape 2.0 browsers.
-In order to take full advantage of this I<you must use the new
-multipart encoding scheme> for the form. You can do this either
-by calling B<start_form()> with an encoding type of B<&CGI::MULTIPART>,
-or by calling the new method B<start_multipart_form()> instead of
-vanilla B<start_form()>.
-
-=over 4
-
-=item B<Parameters>
-
-=item 1.
-
-The first parameter is the required name for the field (-name).
-
-=item 2.
-
-The optional second parameter is the starting value for the field contents
-to be used as the default file name (-default).
-
-For security reasons, browsers don't pay any attention to this field,
-and so the starting value will always be blank. Worse, the field
-loses its "sticky" behavior and forgets its previous contents. The
-starting value field is called for in the HTML specification, however,
-and possibly some browser will eventually provide support for it.
-
-=item 3.
-
-The optional third parameter is the size of the field in
-characters (-size).
-
-=item 4.
-
-The optional fourth parameter is the maximum number of characters the
-field will accept (-maxlength).
-
-=back
-
-When the form is processed, you can retrieve the entered filename
-by calling param():
-
- $filename = param('uploaded_file');
-
-Different browsers will return slightly different things for the
-name. Some browsers return the filename only. Others return the full
-path to the file, using the path conventions of the user's machine.
-Regardless, the name returned is always the name of the file on the
-I<user's> machine, and is unrelated to the name of the temporary file
-that CGI.pm creates during upload spooling (see below).
-
-The filename returned is also a file handle. You can read the contents
-of the file using standard Perl file reading calls:
-
- # Read a text file and print it out
- while (<$filename>) {
- print;
- }
-
- # Copy a binary file to somewhere safe
- open (OUTFILE,">>/usr/local/web/users/feedback");
- while ($bytesread=read($filename,$buffer,1024)) {
- print OUTFILE $buffer;
- }
-
-However, there are problems with the dual nature of the upload fields.
-If you C<use strict>, then Perl will complain when you try to use a
-string as a filehandle. You can get around this by placing the file
-reading code in a block containing the C<no strict> pragma. More
-seriously, it is possible for the remote user to type garbage into the
-upload field, in which case what you get from param() is not a
-filehandle at all, but a string.
-
-To be safe, use the I<upload()> function (new in version 2.47). When
-called with the name of an upload field, I<upload()> returns a
-filehandle-like object, or undef if the parameter is not a valid
-filehandle.
-
- $fh = upload('uploaded_file');
- while (<$fh>) {
- print;
- }
-
-In a list context, upload() will return an array of filehandles.
-This makes it possible to create forms that use the same name for
-multiple upload fields.
-
-This is the recommended idiom.
-
-The lightweight filehandle returned by CGI.pm is not compatible with
-IO::Handle; for example, it does not have read() or getline()
-functions, but instead must be manipulated using read($fh) or
-<$fh>. To get a compatible IO::Handle object, call the handle's
-handle() method:
-
- my $real_io_handle = upload('uploaded_file')->handle;
-
-When a file is uploaded the browser usually sends along some
-information along with it in the format of headers. The information
-usually includes the MIME content type. Future browsers may send
-other information as well (such as modification date and size). To
-retrieve this information, call uploadInfo(). It returns a reference to
-a hash containing all the document headers.
-
- $filename = param('uploaded_file');
- $type = uploadInfo($filename)->{'Content-Type'};
- unless ($type eq 'text/html') {
- die "HTML FILES ONLY!";
- }
-
-If you are using a machine that recognizes "text" and "binary" data
-modes, be sure to understand when and how to use them (see the Camel book).
-Otherwise you may find that binary files are corrupted during file
-uploads.
-
-There are occasionally problems involving parsing the uploaded file.
-This usually happens when the user presses "Stop" before the upload is
-finished. In this case, CGI.pm will return undef for the name of the
-uploaded file and set I<cgi_error()> to the string "400 Bad request
-(malformed multipart POST)". This error message is designed so that
-you can incorporate it into a status code to be sent to the browser.
-Example:
-
- $file = upload('uploaded_file');
- if (!$file && cgi_error) {
- print header(-status=>cgi_error);
- exit 0;
- }
-
-You are free to create a custom HTML page to complain about the error,
-if you wish.
-
-You can set up a callback that will be called whenever a file upload
-is being read during the form processing. This is much like the
-UPLOAD_HOOK facility available in Apache::Request, with the exception
-that the first argument to the callback is an Apache::Upload object,
-here it's the remote filename.
-
- $q = CGI->new(\&hook [,$data [,$use_tempfile]]);
-
- sub hook
- {
- my ($filename, $buffer, $bytes_read, $data) = @_;
- print "Read $bytes_read bytes of $filename\n";
- }
-
-The $data field is optional; it lets you pass configuration
-information (e.g. a database handle) to your hook callback.
-
-The $use_tempfile field is a flag that lets you turn on and off
-CGI.pm's use of a temporary disk-based file during file upload. If you
-set this to a FALSE value (default true) then param('uploaded_file')
-will no longer work, and the only way to get at the uploaded data is
-via the hook you provide.
-
-If using the function-oriented interface, call the CGI::upload_hook()
-method before calling param() or any other CGI functions:
-
- CGI::upload_hook(\&hook [,$data [,$use_tempfile]]);
-
-This method is not exported by default. You will have to import it
-explicitly if you wish to use it without the CGI:: prefix.
-
-If you are using CGI.pm on a Windows platform and find that binary
-files get slightly larger when uploaded but that text files remain the
-same, then you have forgotten to activate binary mode on the output
-filehandle. Be sure to call binmode() on any handle that you create
-to write the uploaded file to disk.
-
-JAVASCRIPTING: The B<-onChange>, B<-onFocus>, B<-onBlur>,
-B<-onMouseOver>, B<-onMouseOut> and B<-onSelect> parameters are
-recognized. See textfield() for details.
-
-=head2 CREATING A POPUP MENU
-
- print popup_menu('menu_name',
- ['eenie','meenie','minie'],
- 'meenie');
-
- -or-
-
- %labels = ('eenie'=>'your first choice',
- 'meenie'=>'your second choice',
- 'minie'=>'your third choice');
- %attributes = ('eenie'=>{'class'=>'class of first choice'});
- print popup_menu('menu_name',
- ['eenie','meenie','minie'],
- 'meenie',\%labels,\%attributes);
-
- -or (named parameter style)-
-
- print popup_menu(-name=>'menu_name',
- -values=>['eenie','meenie','minie'],
- -default=>['meenie','minie'],
- -labels=>\%labels,
- -attributes=>\%attributes);
-
-popup_menu() creates a menu.
-
-=over 4
-
-=item 1.
-
-The required first argument is the menu's name (-name).
-
-=item 2.
-
-The required second argument (-values) is an array B<reference>
-containing the list of menu items in the menu. You can pass the
-method an anonymous array, as shown in the example, or a reference to
-a named array, such as "\@foo".
-
-=item 3.
-
-The optional third parameter (-default) is the name of the default
-menu choice. If not specified, the first item will be the default.
-The values of the previous choice will be maintained across
-queries. Pass an array reference to select multiple defaults.
-
-=item 4.
-
-The optional fourth parameter (-labels) is provided for people who
-want to use different values for the user-visible label inside the
-popup menu and the value returned to your script. It's a pointer to an
-hash relating menu values to user-visible labels. If you
-leave this parameter blank, the menu values will be displayed by
-default. (You can also leave a label undefined if you want to).
-
-=item 5.
-
-The optional fifth parameter (-attributes) is provided to assign
-any of the common HTML attributes to an individual menu item. It's
-a pointer to a hash relating menu values to another
-hash with the attribute's name as the key and the
-attribute's value as the value.
-
-=back
-
-When the form is processed, the selected value of the popup menu can
-be retrieved using:
-
- $popup_menu_value = param('menu_name');
-
-=head2 CREATING AN OPTION GROUP
-
-Named parameter style
-
- print popup_menu(-name=>'menu_name',
- -values=>[qw/eenie meenie minie/,
- optgroup(-name=>'optgroup_name',
- -values => ['moe','catch'],
- -attributes=>{'catch'=>{'class'=>'red'}})],
- -labels=>{'eenie'=>'one',
- 'meenie'=>'two',
- 'minie'=>'three'},
- -default=>'meenie');
-
- Old style
- print popup_menu('menu_name',
- ['eenie','meenie','minie',
- optgroup('optgroup_name', ['moe', 'catch'],
- {'catch'=>{'class'=>'red'}})],'meenie',
- {'eenie'=>'one','meenie'=>'two','minie'=>'three'});
-
-optgroup() creates an option group within a popup menu.
-
-=over 4
-
-=item 1.
-
-The required first argument (B<-name>) is the label attribute of the
-optgroup and is B<not> inserted in the parameter list of the query.
-
-=item 2.
-
-The required second argument (B<-values>) is an array reference
-containing the list of menu items in the menu. You can pass the
-method an anonymous array, as shown in the example, or a reference
-to a named array, such as \@foo. If you pass a HASH reference,
-the keys will be used for the menu values, and the values will be
-used for the menu labels (see -labels below).
-
-=item 3.
-
-The optional third parameter (B<-labels>) allows you to pass a reference
-to a hash containing user-visible labels for one or more
-of the menu items. You can use this when you want the user to see one
-menu string, but have the browser return your program a different one.
-If you don't specify this, the value string will be used instead
-("eenie", "meenie" and "minie" in this example). This is equivalent
-to using a hash reference for the -values parameter.
-
-=item 4.
-
-An optional fourth parameter (B<-labeled>) can be set to a true value
-and indicates that the values should be used as the label attribute
-for each option element within the optgroup.
-
-=item 5.
-
-An optional fifth parameter (-novals) can be set to a true value and
-indicates to suppress the val attribute in each option element within
-the optgroup.
-
-See the discussion on optgroup at W3C
-(http://www.w3.org/TR/REC-html40/interact/forms.html#edef-OPTGROUP)
-for details.
-
-=item 6.
-
-An optional sixth parameter (-attributes) is provided to assign
-any of the common HTML attributes to an individual menu item. It's
-a pointer to a hash relating menu values to another
-hash with the attribute's name as the key and the
-attribute's value as the value.
-
-=back
-
-=head2 CREATING A SCROLLING LIST
-
- print scrolling_list('list_name',
- ['eenie','meenie','minie','moe'],
- ['eenie','moe'],5,'true',{'moe'=>{'class'=>'red'}});
- -or-
-
- print scrolling_list('list_name',
- ['eenie','meenie','minie','moe'],
- ['eenie','moe'],5,'true',
- \%labels,%attributes);
-
- -or-
-
- print scrolling_list(-name=>'list_name',
- -values=>['eenie','meenie','minie','moe'],
- -default=>['eenie','moe'],
- -size=>5,
- -multiple=>'true',
- -labels=>\%labels,
- -attributes=>\%attributes);
-
-scrolling_list() creates a scrolling list.
-
-=over 4
-
-=item B<Parameters:>
-
-=item 1.
-
-The first and second arguments are the list name (-name) and values
-(-values). As in the popup menu, the second argument should be an
-array reference.
-
-=item 2.
-
-The optional third argument (-default) can be either a reference to a
-list containing the values to be selected by default, or can be a
-single value to select. If this argument is missing or undefined,
-then nothing is selected when the list first appears. In the named
-parameter version, you can use the synonym "-defaults" for this
-parameter.
-
-=item 3.
-
-The optional fourth argument is the size of the list (-size).
-
-=item 4.
-
-The optional fifth argument can be set to true to allow multiple
-simultaneous selections (-multiple). Otherwise only one selection
-will be allowed at a time.
-
-=item 5.
-
-The optional sixth argument is a pointer to a hash
-containing long user-visible labels for the list items (-labels).
-If not provided, the values will be displayed.
-
-=item 6.
-
-The optional sixth parameter (-attributes) is provided to assign
-any of the common HTML attributes to an individual menu item. It's
-a pointer to a hash relating menu values to another
-hash with the attribute's name as the key and the
-attribute's value as the value.
-
-When this form is processed, all selected list items will be returned as
-a list under the parameter name 'list_name'. The values of the
-selected items can be retrieved with:
-
- @selected = param('list_name');
-
-=back
-
-=head2 CREATING A GROUP OF RELATED CHECKBOXES
-
- print checkbox_group(-name=>'group_name',
- -values=>['eenie','meenie','minie','moe'],
- -default=>['eenie','moe'],
- -linebreak=>'true',
- -disabled => ['moe'],
- -labels=>\%labels,
- -attributes=>\%attributes);
-
- print checkbox_group('group_name',
- ['eenie','meenie','minie','moe'],
- ['eenie','moe'],'true',\%labels,
- {'moe'=>{'class'=>'red'}});
-
- HTML3-COMPATIBLE BROWSERS ONLY:
-
- print checkbox_group(-name=>'group_name',
- -values=>['eenie','meenie','minie','moe'],
- -rows=2,-columns=>2);
-
-
-checkbox_group() creates a list of checkboxes that are related
-by the same name.
-
-=over 4
-
-=item B<Parameters:>
-
-=item 1.
-
-The first and second arguments are the checkbox name and values,
-respectively (-name and -values). As in the popup menu, the second
-argument should be an array reference. These values are used for the
-user-readable labels printed next to the checkboxes as well as for the
-values passed to your script in the query string.
-
-=item 2.
-
-The optional third argument (-default) can be either a reference to a
-list containing the values to be checked by default, or can be a
-single value to checked. If this argument is missing or undefined,
-then nothing is selected when the list first appears.
-
-=item 3.
-
-The optional fourth argument (-linebreak) can be set to true to place
-line breaks between the checkboxes so that they appear as a vertical
-list. Otherwise, they will be strung together on a horizontal line.
-
-=back
-
-
-The optional B<-labels> argument is a pointer to a hash
-relating the checkbox values to the user-visible labels that will be
-printed next to them. If not provided, the values will be used as the
-default.
-
-
-The optional parameters B<-rows>, and B<-columns> cause
-checkbox_group() to return an HTML3 compatible table containing the
-checkbox group formatted with the specified number of rows and
-columns. You can provide just the -columns parameter if you wish;
-checkbox_group will calculate the correct number of rows for you.
-
-The option B<-disabled> takes an array of checkbox values and disables
-them by greying them out (this may not be supported by all browsers).
-
-The optional B<-attributes> argument is provided to assign any of the
-common HTML attributes to an individual menu item. It's a pointer to
-a hash relating menu values to another hash
-with the attribute's name as the key and the attribute's value as the
-value.
-
-The optional B<-tabindex> argument can be used to control the order in which
-radio buttons receive focus when the user presses the tab button. If
-passed a scalar numeric value, the first element in the group will
-receive this tab index and subsequent elements will be incremented by
-one. If given a reference to an array of radio button values, then
-the indexes will be jiggered so that the order specified in the array
-will correspond to the tab order. You can also pass a reference to a
-hash in which the hash keys are the radio button values and the values
-are the tab indexes of each button. Examples:
-
- -tabindex => 100 # this group starts at index 100 and counts up
- -tabindex => ['moe','minie','eenie','meenie'] # tab in this order
- -tabindex => {meenie=>100,moe=>101,minie=>102,eenie=>200} # tab in this order
-
-The optional B<-labelattributes> argument will contain attributes
-attached to the <label> element that surrounds each button.
-
-When the form is processed, all checked boxes will be returned as
-a list under the parameter name 'group_name'. The values of the
-"on" checkboxes can be retrieved with:
-
- @turned_on = param('group_name');
-
-The value returned by checkbox_group() is actually an array of button
-elements. You can capture them and use them within tables, lists,
-or in other creative ways:
-
- @h = checkbox_group(-name=>'group_name',-values=>\@values);
- &use_in_creative_way(@h);
-
-=head2 CREATING A STANDALONE CHECKBOX
-
- print checkbox(-name=>'checkbox_name',
- -checked=>1,
- -value=>'ON',
- -label=>'CLICK ME');
-
- -or-
-
- print checkbox('checkbox_name','checked','ON','CLICK ME');
-
-checkbox() is used to create an isolated checkbox that isn't logically
-related to any others.
-
-=over 4
-
-=item B<Parameters:>
-
-=item 1.
-
-The first parameter is the required name for the checkbox (-name). It
-will also be used for the user-readable label printed next to the
-checkbox.
-
-=item 2.
-
-The optional second parameter (-checked) specifies that the checkbox
-is turned on by default. Synonyms are -selected and -on.
-
-=item 3.
-
-The optional third parameter (-value) specifies the value of the
-checkbox when it is checked. If not provided, the word "on" is
-assumed.
-
-=item 4.
-
-The optional fourth parameter (-label) is the user-readable label to
-be attached to the checkbox. If not provided, the checkbox name is
-used.
-
-=back
-
-The value of the checkbox can be retrieved using:
-
- $turned_on = param('checkbox_name');
-
-=head2 CREATING A RADIO BUTTON GROUP
-
- print radio_group(-name=>'group_name',
- -values=>['eenie','meenie','minie'],
- -default=>'meenie',
- -linebreak=>'true',
- -labels=>\%labels,
- -attributes=>\%attributes);
-
- -or-
-
- print radio_group('group_name',['eenie','meenie','minie'],
- 'meenie','true',\%labels,\%attributes);
-
-
- HTML3-COMPATIBLE BROWSERS ONLY:
-
- print radio_group(-name=>'group_name',
- -values=>['eenie','meenie','minie','moe'],
- -rows=2,-columns=>2);
-
-radio_group() creates a set of logically-related radio buttons
-(turning one member of the group on turns the others off)
-
-=over 4
-
-=item B<Parameters:>
-
-=item 1.
-
-The first argument is the name of the group and is required (-name).
-
-=item 2.
-
-The second argument (-values) is the list of values for the radio
-buttons. The values and the labels that appear on the page are
-identical. Pass an array I<reference> in the second argument, either
-using an anonymous array, as shown, or by referencing a named array as
-in "\@foo".
-
-=item 3.
-
-The optional third parameter (-default) is the name of the default
-button to turn on. If not specified, the first item will be the
-default. You can provide a nonexistent button name, such as "-" to
-start up with no buttons selected.
-
-=item 4.
-
-The optional fourth parameter (-linebreak) can be set to 'true' to put
-line breaks between the buttons, creating a vertical list.
-
-=item 5.
-
-The optional fifth parameter (-labels) is a pointer to an associative
-array relating the radio button values to user-visible labels to be
-used in the display. If not provided, the values themselves are
-displayed.
-
-=back
-
-
-All modern browsers can take advantage of the optional parameters
-B<-rows>, and B<-columns>. These parameters cause radio_group() to
-return an HTML3 compatible table containing the radio group formatted
-with the specified number of rows and columns. You can provide just
-the -columns parameter if you wish; radio_group will calculate the
-correct number of rows for you.
-
-To include row and column headings in the returned table, you
-can use the B<-rowheaders> and B<-colheaders> parameters. Both
-of these accept a pointer to an array of headings to use.
-The headings are just decorative. They don't reorganize the
-interpretation of the radio buttons -- they're still a single named
-unit.
-
-The optional B<-tabindex> argument can be used to control the order in which
-radio buttons receive focus when the user presses the tab button. If
-passed a scalar numeric value, the first element in the group will
-receive this tab index and subsequent elements will be incremented by
-one. If given a reference to an array of radio button values, then
-the indexes will be jiggered so that the order specified in the array
-will correspond to the tab order. You can also pass a reference to a
-hash in which the hash keys are the radio button values and the values
-are the tab indexes of each button. Examples:
-
- -tabindex => 100 # this group starts at index 100 and counts up
- -tabindex => ['moe','minie','eenie','meenie'] # tab in this order
- -tabindex => {meenie=>100,moe=>101,minie=>102,eenie=>200} # tab in this order
-
-
-The optional B<-attributes> argument is provided to assign any of the
-common HTML attributes to an individual menu item. It's a pointer to
-a hash relating menu values to another hash
-with the attribute's name as the key and the attribute's value as the
-value.
-
-The optional B<-labelattributes> argument will contain attributes
-attached to the <label> element that surrounds each button.
-
-When the form is processed, the selected radio button can
-be retrieved using:
-
- $which_radio_button = param('group_name');
-
-The value returned by radio_group() is actually an array of button
-elements. You can capture them and use them within tables, lists,
-or in other creative ways:
-
- @h = radio_group(-name=>'group_name',-values=>\@values);
- &use_in_creative_way(@h);
-
-=head2 CREATING A SUBMIT BUTTON
-
- print submit(-name=>'button_name',
- -value=>'value');
-
- -or-
-
- print submit('button_name','value');
-
-submit() will create the query submission button. Every form
-should have one of these.
-
-=over 4
-
-=item B<Parameters:>
-
-=item 1.
-
-The first argument (-name) is optional. You can give the button a
-name if you have several submission buttons in your form and you want
-to distinguish between them.
-
-=item 2.
-
-The second argument (-value) is also optional. This gives the button
-a value that will be passed to your script in the query string. The
-name will also be used as the user-visible label.
-
-=item 3.
-
-You can use -label as an alias for -value. I always get confused
-about which of -name and -value changes the user-visible label on the
-button.
-
-=back
-
-You can figure out which button was pressed by using different
-values for each one:
-
- $which_one = param('button_name');
-
-=head2 CREATING A RESET BUTTON
-
- print reset
-
-reset() creates the "reset" button. Note that it restores the
-form to its value from the last time the script was called,
-NOT necessarily to the defaults.
-
-Note that this conflicts with the Perl reset() built-in. Use
-CORE::reset() to get the original reset function.
-
-=head2 CREATING A DEFAULT BUTTON
-
- print defaults('button_label')
-
-defaults() creates a button that, when invoked, will cause the
-form to be completely reset to its defaults, wiping out all the
-changes the user ever made.
-
-=head2 CREATING A HIDDEN FIELD
-
- print hidden(-name=>'hidden_name',
- -default=>['value1','value2'...]);
-
- -or-
-
- print hidden('hidden_name','value1','value2'...);
-
-hidden() produces a text field that can't be seen by the user. It
-is useful for passing state variable information from one invocation
-of the script to the next.
-
-=over 4
-
-=item B<Parameters:>
-
-=item 1.
-
-The first argument is required and specifies the name of this
-field (-name).
-
-=item 2.
-
-The second argument is also required and specifies its value
-(-default). In the named parameter style of calling, you can provide
-a single value here or a reference to a whole list
-
-=back
-
-Fetch the value of a hidden field this way:
-
- $hidden_value = param('hidden_name');
-
-Note, that just like all the other form elements, the value of a
-hidden field is "sticky". If you want to replace a hidden field with
-some other values after the script has been called once you'll have to
-do it manually:
-
- param('hidden_name','new','values','here');
-
-=head2 CREATING A CLICKABLE IMAGE BUTTON
-
- print image_button(-name=>'button_name',
- -src=>'/source/URL',
- -align=>'MIDDLE');
-
- -or-
-
- print image_button('button_name','/source/URL','MIDDLE');
-
-image_button() produces a clickable image. When it's clicked on the
-position of the click is returned to your script as "button_name.x"
-and "button_name.y", where "button_name" is the name you've assigned
-to it.
-
-=over 4
-
-=item B<Parameters:>
-
-=item 1.
-
-The first argument (-name) is required and specifies the name of this
-field.
-
-=item 2.
-
-The second argument (-src) is also required and specifies the URL
-
-=item 3.
-The third option (-align, optional) is an alignment type, and may be
-TOP, BOTTOM or MIDDLE
-
-=back
-
-Fetch the value of the button this way:
- $x = param('button_name.x');
- $y = param('button_name.y');
-
-=head2 CREATING A JAVASCRIPT ACTION BUTTON
-
- print button(-name=>'button_name',
- -value=>'user visible label',
- -onClick=>"do_something()");
-
- -or-
-
- print button('button_name',"do_something()");
-
-button() produces a button that is compatible with Netscape 2.0's
-JavaScript. When it's pressed the fragment of JavaScript code
-pointed to by the B<-onClick> parameter will be executed.
-
-=head1 HTTP COOKIES
-
-Browsers support a so-called "cookie" designed to help maintain state
-within a browser session. CGI.pm has several methods that support
-cookies.
-
-A cookie is a name=value pair much like the named parameters in a CGI
-query string. CGI scripts create one or more cookies and send
-them to the browser in the HTTP header. The browser maintains a list
-of cookies that belong to a particular Web server, and returns them
-to the CGI script during subsequent interactions.
-
-In addition to the required name=value pair, each cookie has several
-optional attributes:
-
-=over 4
-
-=item 1. an expiration time
-
-This is a time/date string (in a special GMT format) that indicates
-when a cookie expires. The cookie will be saved and returned to your
-script until this expiration date is reached if the user exits
-the browser and restarts it. If an expiration date isn't specified, the cookie
-will remain active until the user quits the browser.
-
-=item 2. a domain
-
-This is a partial or complete domain name for which the cookie is
-valid. The browser will return the cookie to any host that matches
-the partial domain name. For example, if you specify a domain name
-of ".capricorn.com", then the browser will return the cookie to
-Web servers running on any of the machines "www.capricorn.com",
-"www2.capricorn.com", "feckless.capricorn.com", etc. Domain names
-must contain at least two periods to prevent attempts to match
-on top level domains like ".edu". If no domain is specified, then
-the browser will only return the cookie to servers on the host the
-cookie originated from.
-
-=item 3. a path
-
-If you provide a cookie path attribute, the browser will check it
-against your script's URL before returning the cookie. For example,
-if you specify the path "/cgi-bin", then the cookie will be returned
-to each of the scripts "/cgi-bin/tally.pl", "/cgi-bin/order.pl",
-and "/cgi-bin/customer_service/complain.pl", but not to the script
-"/cgi-private/site_admin.pl". By default, path is set to "/", which
-causes the cookie to be sent to any CGI script on your site.
-
-=item 4. a "secure" flag
-
-If the "secure" attribute is set, the cookie will only be sent to your
-script if the CGI request is occurring on a secure channel, such as SSL.
-
-=back
-
-The interface to HTTP cookies is the B<cookie()> method:
-
- $cookie = cookie(-name=>'sessionID',
- -value=>'xyzzy',
- -expires=>'+1h',
- -path=>'/cgi-bin/database',
- -domain=>'.capricorn.org',
- -secure=>1);
- print header(-cookie=>$cookie);
-
-B<cookie()> creates a new cookie. Its parameters include:
-
-=over 4
-
-=item B<-name>
-
-The name of the cookie (required). This can be any string at all.
-Although browsers limit their cookie names to non-whitespace
-alphanumeric characters, CGI.pm removes this restriction by escaping
-and unescaping cookies behind the scenes.
-
-=item B<-value>
-
-The value of the cookie. This can be any scalar value,
-array reference, or even hash reference. For example,
-you can store an entire hash into a cookie this way:
-
- $cookie=cookie(-name=>'family information',
- -value=>\%childrens_ages);
-
-=item B<-path>
-
-The optional partial path for which this cookie will be valid, as described
-above.
-
-=item B<-domain>
-
-The optional partial domain for which this cookie will be valid, as described
-above.
-
-=item B<-expires>
-
-The optional expiration date for this cookie. The format is as described
-in the section on the B<header()> method:
-
- "+1h" one hour from now
-
-=item B<-secure>
-
-If set to true, this cookie will only be used within a secure
-SSL session.
-
-=back
-
-The cookie created by cookie() must be incorporated into the HTTP
-header within the string returned by the header() method:
-
- use CGI ':standard';
- print header(-cookie=>$my_cookie);
-
-To create multiple cookies, give header() an array reference:
-
- $cookie1 = cookie(-name=>'riddle_name',
- -value=>"The Sphynx's Question");
- $cookie2 = cookie(-name=>'answers',
- -value=>\%answers);
- print header(-cookie=>[$cookie1,$cookie2]);
-
-To retrieve a cookie, request it by name by calling cookie() method
-without the B<-value> parameter. This example uses the object-oriented
-form:
-
- use CGI;
- $query = new CGI;
- $riddle = $query->cookie('riddle_name');
- %answers = $query->cookie('answers');
-
-Cookies created with a single scalar value, such as the "riddle_name"
-cookie, will be returned in that form. Cookies with array and hash
-values can also be retrieved.
-
-The cookie and CGI namespaces are separate. If you have a parameter
-named 'answers' and a cookie named 'answers', the values retrieved by
-param() and cookie() are independent of each other. However, it's
-simple to turn a CGI parameter into a cookie, and vice-versa:
-
- # turn a CGI parameter into a cookie
- $c=cookie(-name=>'answers',-value=>[param('answers')]);
- # vice-versa
- param(-name=>'answers',-value=>[cookie('answers')]);
-
-If you call cookie() without any parameters, it will return a list of
-the names of all cookies passed to your script:
-
- @cookies = cookie();
-
-See the B<cookie.cgi> example script for some ideas on how to use
-cookies effectively.
-
-=head1 WORKING WITH FRAMES
-
-It's possible for CGI.pm scripts to write into several browser panels
-and windows using the HTML 4 frame mechanism. There are three
-techniques for defining new frames programmatically:
-
-=over 4
-
-=item 1. Create a <Frameset> document
-
-After writing out the HTTP header, instead of creating a standard
-HTML document using the start_html() call, create a <frameset>
-document that defines the frames on the page. Specify your script(s)
-(with appropriate parameters) as the SRC for each of the frames.
-
-There is no specific support for creating <frameset> sections
-in CGI.pm, but the HTML is very simple to write. See the frame
-documentation in Netscape's home pages for details
-
- http://wp.netscape.com/assist/net_sites/frames.html
-
-=item 2. Specify the destination for the document in the HTTP header
-
-You may provide a B<-target> parameter to the header() method:
-
- print header(-target=>'ResultsWindow');
-
-This will tell the browser to load the output of your script into the
-frame named "ResultsWindow". If a frame of that name doesn't already
-exist, the browser will pop up a new window and load your script's
-document into that. There are a number of magic names that you can
-use for targets. See the frame documents on Netscape's home pages for
-details.
-
-=item 3. Specify the destination for the document in the <form> tag
-
-You can specify the frame to load in the FORM tag itself. With
-CGI.pm it looks like this:
-
- print start_form(-target=>'ResultsWindow');
-
-When your script is reinvoked by the form, its output will be loaded
-into the frame named "ResultsWindow". If one doesn't already exist
-a new window will be created.
-
-=back
-
-The script "frameset.cgi" in the examples directory shows one way to
-create pages in which the fill-out form and the response live in
-side-by-side frames.
-
-=head1 SUPPORT FOR JAVASCRIPT
-
-The usual way to use JavaScript is to define a set of functions in a
-<SCRIPT> block inside the HTML header and then to register event
-handlers in the various elements of the page. Events include such
-things as the mouse passing over a form element, a button being
-clicked, the contents of a text field changing, or a form being
-submitted. When an event occurs that involves an element that has
-registered an event handler, its associated JavaScript code gets
-called.
-
-The elements that can register event handlers include the <BODY> of an
-HTML document, hypertext links, all the various elements of a fill-out
-form, and the form itself. There are a large number of events, and
-each applies only to the elements for which it is relevant. Here is a
-partial list:
-
-=over 4
-
-=item B<onLoad>
-
-The browser is loading the current document. Valid in:
-
- + The HTML <BODY> section only.
-
-=item B<onUnload>
-
-The browser is closing the current page or frame. Valid for:
-
- + The HTML <BODY> section only.
-
-=item B<onSubmit>
-
-The user has pressed the submit button of a form. This event happens
-just before the form is submitted, and your function can return a
-value of false in order to abort the submission. Valid for:
-
- + Forms only.
-
-=item B<onClick>
-
-The mouse has clicked on an item in a fill-out form. Valid for:
-
- + Buttons (including submit, reset, and image buttons)
- + Checkboxes
- + Radio buttons
-
-=item B<onChange>
-
-The user has changed the contents of a field. Valid for:
-
- + Text fields
- + Text areas
- + Password fields
- + File fields
- + Popup Menus
- + Scrolling lists
-
-=item B<onFocus>
-
-The user has selected a field to work with. Valid for:
-
- + Text fields
- + Text areas
- + Password fields
- + File fields
- + Popup Menus
- + Scrolling lists
-
-=item B<onBlur>
-
-The user has deselected a field (gone to work somewhere else). Valid
-for:
-
- + Text fields
- + Text areas
- + Password fields
- + File fields
- + Popup Menus
- + Scrolling lists
-
-=item B<onSelect>
-
-The user has changed the part of a text field that is selected. Valid
-for:
-
- + Text fields
- + Text areas
- + Password fields
- + File fields
-
-=item B<onMouseOver>
-
-The mouse has moved over an element.
-
- + Text fields
- + Text areas
- + Password fields
- + File fields
- + Popup Menus
- + Scrolling lists
-
-=item B<onMouseOut>
-
-The mouse has moved off an element.
-
- + Text fields
- + Text areas
- + Password fields
- + File fields
- + Popup Menus
- + Scrolling lists
-
-=back
-
-In order to register a JavaScript event handler with an HTML element,
-just use the event name as a parameter when you call the corresponding
-CGI method. For example, to have your validateAge() JavaScript code
-executed every time the textfield named "age" changes, generate the
-field like this:
-
- print textfield(-name=>'age',-onChange=>"validateAge(this)");
-
-This example assumes that you've already declared the validateAge()
-function by incorporating it into a <SCRIPT> block. The CGI.pm
-start_html() method provides a convenient way to create this section.
-
-Similarly, you can create a form that checks itself over for
-consistency and alerts the user if some essential value is missing by
-creating it this way:
- print startform(-onSubmit=>"validateMe(this)");
-
-See the javascript.cgi script for a demonstration of how this all
-works.
-
-
-=head1 LIMITED SUPPORT FOR CASCADING STYLE SHEETS
-
-CGI.pm has limited support for HTML3's cascading style sheets (css).
-To incorporate a stylesheet into your document, pass the
-start_html() method a B<-style> parameter. The value of this
-parameter may be a scalar, in which case it is treated as the source
-URL for the stylesheet, or it may be a hash reference. In the latter
-case you should provide the hash with one or more of B<-src> or
-B<-code>. B<-src> points to a URL where an externally-defined
-stylesheet can be found. B<-code> points to a scalar value to be
-incorporated into a <style> section. Style definitions in B<-code>
-override similarly-named ones in B<-src>, hence the name "cascading."
-
-You may also specify the type of the stylesheet by adding the optional
-B<-type> parameter to the hash pointed to by B<-style>. If not
-specified, the style defaults to 'text/css'.
-
-To refer to a style within the body of your document, add the
-B<-class> parameter to any HTML element:
-
- print h1({-class=>'Fancy'},'Welcome to the Party');
-
-Or define styles on the fly with the B<-style> parameter:
-
- print h1({-style=>'Color: red;'},'Welcome to Hell');
-
-You may also use the new B<span()> element to apply a style to a
-section of text:
-
- print span({-style=>'Color: red;'},
- h1('Welcome to Hell'),
- "Where did that handbasket get to?"
- );
-
-Note that you must import the ":html3" definitions to have the
-B<span()> method available. Here's a quick and dirty example of using
-CSS's. See the CSS specification at
-http://www.w3.org/pub/WWW/TR/Wd-css-1.html for more information.
-
- use CGI qw/:standard :html3/;
-
- #here's a stylesheet incorporated directly into the page
- $newStyle=<<END;
- <!--
- P.Tip {
- margin-right: 50pt;
- margin-left: 50pt;
- color: red;
- }
- P.Alert {
- font-size: 30pt;
- font-family: sans-serif;
- color: red;
- }
- -->
- END
- print header();
- print start_html( -title=>'CGI with Style',
- -style=>{-src=>'http://www.capricorn.com/style/st1.css',
- -code=>$newStyle}
- );
- print h1('CGI with Style'),
- p({-class=>'Tip'},
- "Better read the cascading style sheet spec before playing with this!"),
- span({-style=>'color: magenta'},
- "Look Mom, no hands!",
- p(),
- "Whooo wee!"
- );
- print end_html;
-
-Pass an array reference to B<-code> or B<-src> in order to incorporate
-multiple stylesheets into your document.
-
-Should you wish to incorporate a verbatim stylesheet that includes
-arbitrary formatting in the header, you may pass a -verbatim tag to
-the -style hash, as follows:
-
-print start_html (-style => {-verbatim => '@import url("/server-common/css/'.$cssFile.'");',
- -src => '/server-common/css/core.css'});
-
-
-This will generate an HTML header that contains this:
-
- <link rel="stylesheet" type="text/css" href="/server-common/css/core.css">
- <style type="text/css">
- @import url("/server-common/css/main.css");
- </style>
-
-Any additional arguments passed in the -style value will be
-incorporated into the <link> tag. For example:
-
- start_html(-style=>{-src=>['/styles/print.css','/styles/layout.css'],
- -media => 'all'});
-
-This will give:
-
- <link rel="stylesheet" type="text/css" href="/styles/print.css" media="all"/>
- <link rel="stylesheet" type="text/css" href="/styles/layout.css" media="all"/>
-
-<p>
-
-To make more complicated <link> tags, use the Link() function
-and pass it to start_html() in the -head argument, as in:
-
- @h = (Link({-rel=>'stylesheet',-type=>'text/css',-src=>'/ss/ss.css',-media=>'all'}),
- Link({-rel=>'stylesheet',-type=>'text/css',-src=>'/ss/fred.css',-media=>'paper'}));
- print start_html({-head=>\@h})
-
-To create primary and "alternate" stylesheet, use the B<-alternate> option:
-
- start_html(-style=>{-src=>[
- {-src=>'/styles/print.css'},
- {-src=>'/styles/alt.css',-alternate=>1}
- ]
- });
-
-=head1 DEBUGGING
-
-If you are running the script from the command line or in the perl
-debugger, you can pass the script a list of keywords or
-parameter=value pairs on the command line or from standard input (you
-don't have to worry about tricking your script into reading from
-environment variables). You can pass keywords like this:
-
- your_script.pl keyword1 keyword2 keyword3
-
-or this:
-
- your_script.pl keyword1+keyword2+keyword3
-
-or this:
-
- your_script.pl name1=value1 name2=value2
-
-or this:
-
- your_script.pl name1=value1&name2=value2
-
-To turn off this feature, use the -no_debug pragma.
-
-To test the POST method, you may enable full debugging with the -debug
-pragma. This will allow you to feed newline-delimited name=value
-pairs to the script on standard input.
-
-When debugging, you can use quotes and backslashes to escape
-characters in the familiar shell manner, letting you place
-spaces and other funny characters in your parameter=value
-pairs:
-
- your_script.pl "name1='I am a long value'" "name2=two\ words"
-
-Finally, you can set the path info for the script by prefixing the first
-name/value parameter with the path followed by a question mark (?):
-
- your_script.pl /your/path/here?name1=value1&name2=value2
-
-=head2 DUMPING OUT ALL THE NAME/VALUE PAIRS
-
-The Dump() method produces a string consisting of all the query's
-name/value pairs formatted nicely as a nested list. This is useful
-for debugging purposes:
-
- print Dump
-
-
-Produces something that looks like:
-
- <ul>
- <li>name1
- <ul>
- <li>value1
- <li>value2
- </ul>
- <li>name2
- <ul>
- <li>value1
- </ul>
- </ul>
-
-As a shortcut, you can interpolate the entire CGI object into a string
-and it will be replaced with the a nice HTML dump shown above:
-
- $query=new CGI;
- print "<h2>Current Values</h2> $query\n";
-
-=head1 FETCHING ENVIRONMENT VARIABLES
-
-Some of the more useful environment variables can be fetched
-through this interface. The methods are as follows:
-
-=over 4
-
-=item B<Accept()>
-
-Return a list of MIME types that the remote browser accepts. If you
-give this method a single argument corresponding to a MIME type, as in
-Accept('text/html'), it will return a floating point value
-corresponding to the browser's preference for this type from 0.0
-(don't want) to 1.0. Glob types (e.g. text/*) in the browser's accept
-list are handled correctly.
-
-Note that the capitalization changed between version 2.43 and 2.44 in
-order to avoid conflict with Perl's accept() function.
-
-=item B<raw_cookie()>
-
-Returns the HTTP_COOKIE variable. Cookies have a special format, and
-this method call just returns the raw form (?cookie dough). See
-cookie() for ways of setting and retrieving cooked cookies.
-
-Called with no parameters, raw_cookie() returns the packed cookie
-structure. You can separate it into individual cookies by splitting
-on the character sequence "; ". Called with the name of a cookie,
-retrieves the B<unescaped> form of the cookie. You can use the
-regular cookie() method to get the names, or use the raw_fetch()
-method from the CGI::Cookie module.
-
-=item B<user_agent()>
-
-Returns the HTTP_USER_AGENT variable. If you give
-this method a single argument, it will attempt to
-pattern match on it, allowing you to do something
-like user_agent(Mozilla);
-
-=item B<path_info()>
-
-Returns additional path information from the script URL.
-E.G. fetching /cgi-bin/your_script/additional/stuff will result in
-path_info() returning "/additional/stuff".
-
-NOTE: The Microsoft Internet Information Server
-is broken with respect to additional path information. If
-you use the Perl DLL library, the IIS server will attempt to
-execute the additional path information as a Perl script.
-If you use the ordinary file associations mapping, the
-path information will be present in the environment,
-but incorrect. The best thing to do is to avoid using additional
-path information in CGI scripts destined for use with IIS.
-
-=item B<path_translated()>
-
-As per path_info() but returns the additional
-path information translated into a physical path, e.g.
-"/usr/local/etc/httpd/htdocs/additional/stuff".
-
-The Microsoft IIS is broken with respect to the translated
-path as well.
-
-=item B<remote_host()>
-
-Returns either the remote host name or IP address.
-if the former is unavailable.
-
-=item B<script_name()>
-Return the script name as a partial URL, for self-refering
-scripts.
-
-=item B<referer()>
-
-Return the URL of the page the browser was viewing
-prior to fetching your script. Not available for all
-browsers.
-
-=item B<auth_type ()>
-
-Return the authorization/verification method in use for this
-script, if any.
-
-=item B<server_name ()>
-
-Returns the name of the server, usually the machine's host
-name.
-
-=item B<virtual_host ()>
-
-When using virtual hosts, returns the name of the host that
-the browser attempted to contact
-
-=item B<server_port ()>
-
-Return the port that the server is listening on.
-
-=item B<virtual_port ()>
-
-Like server_port() except that it takes virtual hosts into account.
-Use this when running with virtual hosts.
-
-=item B<server_software ()>
-
-Returns the server software and version number.
-
-=item B<remote_user ()>
-
-Return the authorization/verification name used for user
-verification, if this script is protected.
-
-=item B<user_name ()>
-
-Attempt to obtain the remote user's name, using a variety of different
-techniques. This only works with older browsers such as Mosaic.
-Newer browsers do not report the user name for privacy reasons!
-
-=item B<request_method()>
-
-Returns the method used to access your script, usually
-one of 'POST', 'GET' or 'HEAD'.
-
-=item B<content_type()>
-
-Returns the content_type of data submitted in a POST, generally
-multipart/form-data or application/x-www-form-urlencoded
-
-=item B<http()>
-
-Called with no arguments returns the list of HTTP environment
-variables, including such things as HTTP_USER_AGENT,
-HTTP_ACCEPT_LANGUAGE, and HTTP_ACCEPT_CHARSET, corresponding to the
-like-named HTTP header fields in the request. Called with the name of
-an HTTP header field, returns its value. Capitalization and the use
-of hyphens versus underscores are not significant.
-
-For example, all three of these examples are equivalent:
-
- $requested_language = http('Accept-language');
- $requested_language = http('Accept_language');
- $requested_language = http('HTTP_ACCEPT_LANGUAGE');
-
-=item B<https()>
-
-The same as I<http()>, but operates on the HTTPS environment variables
-present when the SSL protocol is in effect. Can be used to determine
-whether SSL is turned on.
-
-=back
-
-=head1 USING NPH SCRIPTS
-
-NPH, or "no-parsed-header", scripts bypass the server completely by
-sending the complete HTTP header directly to the browser. This has
-slight performance benefits, but is of most use for taking advantage
-of HTTP extensions that are not directly supported by your server,
-such as server push and PICS headers.
-
-Servers use a variety of conventions for designating CGI scripts as
-NPH. Many Unix servers look at the beginning of the script's name for
-the prefix "nph-". The Macintosh WebSTAR server and Microsoft's
-Internet Information Server, in contrast, try to decide whether a
-program is an NPH script by examining the first line of script output.
-
-
-CGI.pm supports NPH scripts with a special NPH mode. When in this
-mode, CGI.pm will output the necessary extra header information when
-the header() and redirect() methods are
-called.
-
-The Microsoft Internet Information Server requires NPH mode. As of
-version 2.30, CGI.pm will automatically detect when the script is
-running under IIS and put itself into this mode. You do not need to
-do this manually, although it won't hurt anything if you do. However,
-note that if you have applied Service Pack 6, much of the
-functionality of NPH scripts, including the ability to redirect while
-setting a cookie, B<do not work at all> on IIS without a special patch
-from Microsoft. See
-http://support.microsoft.com/support/kb/articles/Q280/3/41.ASP:
-Non-Parsed Headers Stripped From CGI Applications That Have nph-
-Prefix in Name.
-
-=over 4
-
-=item In the B<use> statement
-
-Simply add the "-nph" pragmato the list of symbols to be imported into
-your script:
-
- use CGI qw(:standard -nph)
-
-=item By calling the B<nph()> method:
-
-Call B<nph()> with a non-zero parameter at any point after using CGI.pm in your program.
-
- CGI->nph(1)
-
-=item By using B<-nph> parameters
-
-in the B<header()> and B<redirect()> statements:
-
- print header(-nph=>1);
-
-=back
-
-=head1 Server Push
-
-CGI.pm provides four simple functions for producing multipart
-documents of the type needed to implement server push. These
-functions were graciously provided by Ed Jordan <ed at fidalgo.net>. To
-import these into your namespace, you must import the ":push" set.
-You are also advised to put the script into NPH mode and to set $| to
-1 to avoid buffering problems.
-
-Here is a simple script that demonstrates server push:
-
- #!/usr/local/bin/perl
- use CGI qw/:push -nph/;
- $| = 1;
- print multipart_init(-boundary=>'----here we go!');
- for (0 .. 4) {
- print multipart_start(-type=>'text/plain'),
- "The current time is ",scalar(localtime),"\n";
- if ($_ < 4) {
- print multipart_end;
- } else {
- print multipart_final;
- }
- sleep 1;
- }
-
-This script initializes server push by calling B<multipart_init()>.
-It then enters a loop in which it begins a new multipart section by
-calling B<multipart_start()>, prints the current local time,
-and ends a multipart section with B<multipart_end()>. It then sleeps
-a second, and begins again. On the final iteration, it ends the
-multipart section with B<multipart_final()> rather than with
-B<multipart_end()>.
-
-=over 4
-
-=item multipart_init()
-
- multipart_init(-boundary=>$boundary);
-
-Initialize the multipart system. The -boundary argument specifies
-what MIME boundary string to use to separate parts of the document.
-If not provided, CGI.pm chooses a reasonable boundary for you.
-
-=item multipart_start()
-
- multipart_start(-type=>$type)
-
-Start a new part of the multipart document using the specified MIME
-type. If not specified, text/html is assumed.
-
-=item multipart_end()
-
- multipart_end()
-
-End a part. You must remember to call multipart_end() once for each
-multipart_start(), except at the end of the last part of the multipart
-document when multipart_final() should be called instead of multipart_end().
-
-=item multipart_final()
-
- multipart_final()
-
-End all parts. You should call multipart_final() rather than
-multipart_end() at the end of the last part of the multipart document.
-
-=back
-
-Users interested in server push applications should also have a look
-at the CGI::Push module.
-
-=head1 Avoiding Denial of Service Attacks
-
-A potential problem with CGI.pm is that, by default, it attempts to
-process form POSTings no matter how large they are. A wily hacker
-could attack your site by sending a CGI script a huge POST of many
-megabytes. CGI.pm will attempt to read the entire POST into a
-variable, growing hugely in size until it runs out of memory. While
-the script attempts to allocate the memory the system may slow down
-dramatically. This is a form of denial of service attack.
-
-Another possible attack is for the remote user to force CGI.pm to
-accept a huge file upload. CGI.pm will accept the upload and store it
-in a temporary directory even if your script doesn't expect to receive
-an uploaded file. CGI.pm will delete the file automatically when it
-terminates, but in the meantime the remote user may have filled up the
-server's disk space, causing problems for other programs.
-
-The best way to avoid denial of service attacks is to limit the amount
-of memory, CPU time and disk space that CGI scripts can use. Some Web
-servers come with built-in facilities to accomplish this. In other
-cases, you can use the shell I<limit> or I<ulimit>
-commands to put ceilings on CGI resource usage.
-
-
-CGI.pm also has some simple built-in protections against denial of
-service attacks, but you must activate them before you can use them.
-These take the form of two global variables in the CGI name space:
-
-=over 4
-
-=item B<$CGI::POST_MAX>
-
-If set to a non-negative integer, this variable puts a ceiling
-on the size of POSTings, in bytes. If CGI.pm detects a POST
-that is greater than the ceiling, it will immediately exit with an error
-message. This value will affect both ordinary POSTs and
-multipart POSTs, meaning that it limits the maximum size of file
-uploads as well. You should set this to a reasonably high
-value, such as 1 megabyte.
-
-=item B<$CGI::DISABLE_UPLOADS>
-
-If set to a non-zero value, this will disable file uploads
-completely. Other fill-out form values will work as usual.
-
-=back
-
-You can use these variables in either of two ways.
-
-=over 4
-
-=item B<1. On a script-by-script basis>
-
-Set the variable at the top of the script, right after the "use" statement:
-
- use CGI qw/:standard/;
- use CGI::Carp 'fatalsToBrowser';
- $CGI::POST_MAX=1024 * 100; # max 100K posts
- $CGI::DISABLE_UPLOADS = 1; # no uploads
-
-=item B<2. Globally for all scripts>
-
-Open up CGI.pm, find the definitions for $POST_MAX and
-$DISABLE_UPLOADS, and set them to the desired values. You'll
-find them towards the top of the file in a subroutine named
-initialize_globals().
-
-=back
-
-An attempt to send a POST larger than $POST_MAX bytes will cause
-I<param()> to return an empty CGI parameter list. You can test for
-this event by checking I<cgi_error()>, either after you create the CGI
-object or, if you are using the function-oriented interface, call
-<param()> for the first time. If the POST was intercepted, then
-cgi_error() will return the message "413 POST too large".
-
-This error message is actually defined by the HTTP protocol, and is
-designed to be returned to the browser as the CGI script's status
- code. For example:
-
- $uploaded_file = param('upload');
- if (!$uploaded_file && cgi_error()) {
- print header(-status=>cgi_error());
- exit 0;
- }
-
-However it isn't clear that any browser currently knows what to do
-with this status code. It might be better just to create an
-HTML page that warns the user of the problem.
-
-=head1 COMPATIBILITY WITH CGI-LIB.PL
-
-To make it easier to port existing programs that use cgi-lib.pl the
-compatibility routine "ReadParse" is provided. Porting is simple:
-
-OLD VERSION
- require "cgi-lib.pl";
- &ReadParse;
- print "The value of the antique is $in{antique}.\n";
-
-NEW VERSION
- use CGI;
- CGI::ReadParse();
- print "The value of the antique is $in{antique}.\n";
-
-CGI.pm's ReadParse() routine creates a tied variable named %in,
-which can be accessed to obtain the query variables. Like
-ReadParse, you can also provide your own variable. Infrequently
-used features of ReadParse, such as the creation of @in and $in
-variables, are not supported.
-
-Once you use ReadParse, you can retrieve the query object itself
-this way:
-
- $q = $in{CGI};
- print textfield(-name=>'wow',
- -value=>'does this really work?');
-
-This allows you to start using the more interesting features
-of CGI.pm without rewriting your old scripts from scratch.
-
-=head1 AUTHOR INFORMATION
-
-The GD.pm interface is copyright 1995-2007, Lincoln D. Stein. It is
-distributed under GPL and the Artistic License 2.0.
-
-Address bug reports and comments to: lstein at cshl.org. When sending
-bug reports, please provide the version of CGI.pm, the version of
-Perl, the name and version of your Web server, and the name and
-version of the operating system you are using. If the problem is even
-remotely browser dependent, please provide information about the
-affected browers as well.
-
-=head1 CREDITS
-
-Thanks very much to:
-
-=over 4
-
-=item Matt Heffron (heffron at falstaff.css.beckman.com)
-
-=item James Taylor (james.taylor at srs.gov)
-
-=item Scott Anguish <sanguish at digifix.com>
-
-=item Mike Jewell (mlj3u at virginia.edu)
-
-=item Timothy Shimmin (tes at kbs.citri.edu.au)
-
-=item Joergen Haegg (jh at axis.se)
-
-=item Laurent Delfosse (delfosse at delfosse.com)
-
-=item Richard Resnick (applepi1 at aol.com)
-
-=item Craig Bishop (csb at barwonwater.vic.gov.au)
-
-=item Tony Curtis (tc at vcpc.univie.ac.at)
-
-=item Tim Bunce (Tim.Bunce at ig.co.uk)
-
-=item Tom Christiansen (tchrist at convex.com)
-
-=item Andreas Koenig (k at franz.ww.TU-Berlin.DE)
-
-=item Tim MacKenzie (Tim.MacKenzie at fulcrum.com.au)
-
-=item Kevin B. Hendricks (kbhend at dogwood.tyler.wm.edu)
-
-=item Stephen Dahmen (joyfire at inxpress.net)
-
-=item Ed Jordan (ed at fidalgo.net)
-
-=item David Alan Pisoni (david at cnation.com)
-
-=item Doug MacEachern (dougm at opengroup.org)
-
-=item Robin Houston (robin at oneworld.org)
-
-=item ...and many many more...
-
-for suggestions and bug fixes.
-
-=back
-
-=head1 A COMPLETE EXAMPLE OF A SIMPLE FORM-BASED SCRIPT
-
-
- #!/usr/local/bin/perl
-
- use CGI ':standard';
-
- print header;
- print start_html("Example CGI.pm Form");
- print "<h1> Example CGI.pm Form</h1>\n";
- print_prompt();
- do_work();
- print_tail();
- print end_html;
-
- sub print_prompt {
- print start_form;
- print "<em>What's your name?</em><br>";
- print textfield('name');
- print checkbox('Not my real name');
-
- print "<p><em>Where can you find English Sparrows?</em><br>";
- print checkbox_group(
- -name=>'Sparrow locations',
- -values=>[England,France,Spain,Asia,Hoboken],
- -linebreak=>'yes',
- -defaults=>[England,Asia]);
-
- print "<p><em>How far can they fly?</em><br>",
- radio_group(
- -name=>'how far',
- -values=>['10 ft','1 mile','10 miles','real far'],
- -default=>'1 mile');
-
- print "<p><em>What's your favorite color?</em> ";
- print popup_menu(-name=>'Color',
- -values=>['black','brown','red','yellow'],
- -default=>'red');
-
- print hidden('Reference','Monty Python and the Holy Grail');
-
- print "<p><em>What have you got there?</em><br>";
- print scrolling_list(
- -name=>'possessions',
- -values=>['A Coconut','A Grail','An Icon',
- 'A Sword','A Ticket'],
- -size=>5,
- -multiple=>'true');
-
- print "<p><em>Any parting comments?</em><br>";
- print textarea(-name=>'Comments',
- -rows=>10,
- -columns=>50);
-
- print "<p>",reset;
- print submit('Action','Shout');
- print submit('Action','Scream');
- print endform;
- print "<hr>\n";
- }
-
- sub do_work {
- my(@values,$key);
-
- print "<h2>Here are the current settings in this form</h2>";
-
- for $key (param) {
- print "<strong>$key</strong> -> ";
- @values = param($key);
- print join(", ", at values),"<br>\n";
- }
- }
-
- sub print_tail {
- print <<END;
- <hr>
- <address>Lincoln D. Stein</address><br>
- <a href="/">Home Page</a>
- END
- }
-
-=head1 BUGS
-
-Please report them.
-
-=head1 SEE ALSO
-
-L<CGI::Carp>, L<CGI::Fast>, L<CGI::Pretty>
-
-=cut
-
Deleted: vendor/perl/dist/lib/CPAN.pm
===================================================================
--- vendor/perl/dist/lib/CPAN.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/CPAN.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,3717 +0,0 @@
-# -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
-# vim: ts=4 sts=4 sw=4:
-use strict;
-package CPAN;
-$CPAN::VERSION = '1.9402';
-$CPAN::VERSION =~ s/_//;
-
-# we need to run chdir all over and we would get at wrong libraries
-# there
-use File::Spec ();
-BEGIN {
- if (File::Spec->can("rel2abs")) {
- for my $inc (@INC) {
- $inc = File::Spec->rel2abs($inc) unless ref $inc;
- }
- }
-}
-use CPAN::Author;
-use CPAN::HandleConfig;
-use CPAN::Version;
-use CPAN::Bundle;
-use CPAN::CacheMgr;
-use CPAN::Complete;
-use CPAN::Debug;
-use CPAN::Distribution;
-use CPAN::Distrostatus;
-use CPAN::FTP;
-use CPAN::Index 1.93; # https://rt.cpan.org/Ticket/Display.html?id=43349
-use CPAN::InfoObj;
-use CPAN::Module;
-use CPAN::Prompt;
-use CPAN::URL;
-use CPAN::Queue;
-use CPAN::Tarzip;
-use CPAN::DeferredCode;
-use CPAN::Shell;
-use CPAN::LWP::UserAgent;
-use CPAN::Exception::RecursiveDependency;
-use CPAN::Exception::yaml_not_installed;
-
-use Carp ();
-use Config ();
-use Cwd qw(chdir);
-use DirHandle ();
-use Exporter ();
-use ExtUtils::MakeMaker qw(prompt); # for some unknown reason,
- # 5.005_04 does not work without
- # this
-use File::Basename ();
-use File::Copy ();
-use File::Find;
-use File::Path ();
-use FileHandle ();
-use Fcntl qw(:flock);
-use Safe ();
-use Sys::Hostname qw(hostname);
-use Text::ParseWords ();
-use Text::Wrap ();
-
-# protect against "called too early"
-sub find_perl ();
-sub anycwd ();
-sub _uniq;
-
-no lib ".";
-
-require Mac::BuildTools if $^O eq 'MacOS';
-if ($ENV{PERL5_CPAN_IS_RUNNING} && $$ != $ENV{PERL5_CPAN_IS_RUNNING}) {
- $ENV{PERL5_CPAN_IS_RUNNING_IN_RECURSION} ||= $ENV{PERL5_CPAN_IS_RUNNING};
- my @rec = _uniq split(/,/, $ENV{PERL5_CPAN_IS_RUNNING_IN_RECURSION}), $$;
- $ENV{PERL5_CPAN_IS_RUNNING_IN_RECURSION} = join ",", @rec;
- # warn "# Note: Recursive call of CPAN.pm detected\n";
- my $w = sprintf "# Note: CPAN.pm is running in process %d now", pop @rec;
- my %sleep = (
- 5 => 30,
- 6 => 60,
- 7 => 120,
- );
- my $sleep = @rec > 7 ? 300 : ($sleep{scalar @rec}||0);
- my $verbose = @rec >= 4;
- while (@rec) {
- $w .= sprintf " which has been called by process %d", pop @rec;
- }
- if ($sleep) {
- $w .= ".\n\n# Sleeping $sleep seconds to protect other processes\n";
- }
- if ($verbose) {
- warn $w;
- }
- local $| = 1;
- while ($sleep > 0) {
- printf "\r#%5d", --$sleep;
- sleep 1;
- }
- print "\n";
-}
-$ENV{PERL5_CPAN_IS_RUNNING}=$$;
-$ENV{PERL5_CPANPLUS_IS_RUNNING}=$$; # https://rt.cpan.org/Ticket/Display.html?id=23735
-
-END { $CPAN::End++; &cleanup; }
-
-$CPAN::Signal ||= 0;
-$CPAN::Frontend ||= "CPAN::Shell";
-unless (@CPAN::Defaultsites) {
- @CPAN::Defaultsites = map {
- CPAN::URL->new(TEXT => $_, FROM => "DEF")
- }
- "http://www.perl.org/CPAN/",
- "ftp://ftp.perl.org/pub/CPAN/";
-}
-# $CPAN::iCwd (i for initial)
-$CPAN::iCwd ||= CPAN::anycwd();
-$CPAN::Perl ||= CPAN::find_perl();
-$CPAN::Defaultdocs ||= "http://search.cpan.org/perldoc?";
-$CPAN::Defaultrecent ||= "http://search.cpan.org/uploads.rdf";
-$CPAN::Defaultrecent ||= "http://cpan.uwinnipeg.ca/htdocs/cpan.xml";
-
-# our globals are getting a mess
-use vars qw(
- $AUTOLOAD
- $Be_Silent
- $CONFIG_DIRTY
- $Defaultdocs
- $Echo_readline
- $Frontend
- $GOTOSHELL
- $HAS_USABLE
- $Have_warned
- $MAX_RECURSION
- $META
- $RUN_DEGRADED
- $Signal
- $SQLite
- $Suppress_readline
- $VERSION
- $autoload_recursion
- $term
- @Defaultsites
- @EXPORT
- );
-
-$MAX_RECURSION = 32;
-
- at CPAN::ISA = qw(CPAN::Debug Exporter);
-
-# note that these functions live in CPAN::Shell and get executed via
-# AUTOLOAD when called directly
- at EXPORT = qw(
- autobundle
- bundle
- clean
- cvs_import
- expand
- force
- fforce
- get
- install
- install_tested
- is_tested
- make
- mkmyconfig
- notest
- perldoc
- readme
- recent
- recompile
- report
- shell
- smoke
- test
- upgrade
- );
-
-sub soft_chdir_with_alternatives ($);
-
-{
- $autoload_recursion ||= 0;
-
- #-> sub CPAN::AUTOLOAD ;
- sub AUTOLOAD { ## no critic
- $autoload_recursion++;
- my($l) = $AUTOLOAD;
- $l =~ s/.*:://;
- if ($CPAN::Signal) {
- warn "Refusing to autoload '$l' while signal pending";
- $autoload_recursion--;
- return;
- }
- if ($autoload_recursion > 1) {
- my $fullcommand = join " ", map { "'$_'" } $l, @_;
- warn "Refusing to autoload $fullcommand in recursion\n";
- $autoload_recursion--;
- return;
- }
- my(%export);
- @export{@EXPORT} = '';
- CPAN::HandleConfig->load unless $CPAN::Config_loaded++;
- if (exists $export{$l}) {
- CPAN::Shell->$l(@_);
- } else {
- die(qq{Unknown CPAN command "$AUTOLOAD". }.
- qq{Type ? for help.\n});
- }
- $autoload_recursion--;
- }
-}
-
-{
- my $x = *SAVEOUT; # avoid warning
- open($x,">&STDOUT") or die "dup failed";
- my $redir = 0;
- sub _redirect(@) {
- #die if $redir;
- local $_;
- push(@_,undef);
- while(defined($_=shift)) {
- if (s/^\s*>//){
- my ($m) = s/^>// ? ">" : "";
- s/\s+//;
- $_=shift unless length;
- die "no dest" unless defined;
- open(STDOUT,">$m$_") or die "open:$_:$!\n";
- $redir=1;
- } elsif ( s/^\s*\|\s*// ) {
- my $pipe="| $_";
- while(defined($_[0])){
- $pipe .= ' ' . shift;
- }
- open(STDOUT,$pipe) or die "open:$pipe:$!\n";
- $redir=1;
- } else {
- push(@_,$_);
- }
- }
- return @_;
- }
- sub _unredirect {
- return unless $redir;
- $redir = 0;
- ## redirect: unredirect and propagate errors. explicit close to wait for pipe.
- close(STDOUT);
- open(STDOUT,">&SAVEOUT");
- die "$@" if "$@";
- ## redirect: done
- }
-}
-
-sub _uniq {
- my(@list) = @_;
- my %seen;
- return grep { !$seen{$_}++ } @list;
-}
-
-#-> sub CPAN::shell ;
-sub shell {
- my($self) = @_;
- $Suppress_readline = ! -t STDIN unless defined $Suppress_readline;
- CPAN::HandleConfig->load unless $CPAN::Config_loaded++;
-
- my $oprompt = shift || CPAN::Prompt->new;
- my $prompt = $oprompt;
- my $commandline = shift || "";
- $CPAN::CurrentCommandId ||= 1;
-
- local($^W) = 1;
- unless ($Suppress_readline) {
- require Term::ReadLine;
- if (! $term
- or
- $term->ReadLine eq "Term::ReadLine::Stub"
- ) {
- $term = Term::ReadLine->new('CPAN Monitor');
- }
- if ($term->ReadLine eq "Term::ReadLine::Gnu") {
- my $attribs = $term->Attribs;
- $attribs->{attempted_completion_function} = sub {
- &CPAN::Complete::gnu_cpl;
- }
- } else {
- $readline::rl_completion_function =
- $readline::rl_completion_function = 'CPAN::Complete::cpl';
- }
- if (my $histfile = $CPAN::Config->{'histfile'}) {{
- unless ($term->can("AddHistory")) {
- $CPAN::Frontend->mywarn("Terminal does not support AddHistory.\n");
- last;
- }
- $META->readhist($term,$histfile);
- }}
- for ($CPAN::Config->{term_ornaments}) { # alias
- local $Term::ReadLine::termcap_nowarn = 1;
- $term->ornaments($_) if defined;
- }
- # $term->OUT is autoflushed anyway
- my $odef = select STDERR;
- $| = 1;
- select STDOUT;
- $| = 1;
- select $odef;
- }
-
- $META->checklock();
- my @cwd = grep { defined $_ and length $_ }
- CPAN::anycwd(),
- File::Spec->can("tmpdir") ? File::Spec->tmpdir() : (),
- File::Spec->rootdir();
- my $try_detect_readline;
- $try_detect_readline = $term->ReadLine eq "Term::ReadLine::Stub" if $term;
- unless ($CPAN::Config->{inhibit_startup_message}) {
- my $rl_avail = $Suppress_readline ? "suppressed" :
- ($term->ReadLine ne "Term::ReadLine::Stub") ? "enabled" :
- "available (maybe install Bundle::CPAN or Bundle::CPANxxl?)";
- $CPAN::Frontend->myprint(
- sprintf qq{
-cpan shell -- CPAN exploration and modules installation (v%s)
-Enter 'h' for help.
-
-},
- $CPAN::VERSION,
- $rl_avail
- )
- }
- my($continuation) = "";
- my $last_term_ornaments;
- SHELLCOMMAND: while () {
- if ($Suppress_readline) {
- if ($Echo_readline) {
- $|=1;
- }
- print $prompt;
- last SHELLCOMMAND unless defined ($_ = <> );
- if ($Echo_readline) {
- # backdoor: I could not find a way to record sessions
- print $_;
- }
- chomp;
- } else {
- last SHELLCOMMAND unless
- defined ($_ = $term->readline($prompt, $commandline));
- }
- $_ = "$continuation$_" if $continuation;
- s/^\s+//;
- next SHELLCOMMAND if /^$/;
- s/^\s*\?\s*/help /;
- if (/^(?:q(?:uit)?|bye|exit)$/i) {
- last SHELLCOMMAND;
- } elsif (s/\\$//s) {
- chomp;
- $continuation = $_;
- $prompt = " > ";
- } elsif (/^\!/) {
- s/^\!//;
- my($eval) = $_;
- package
- CPAN::Eval; # hide from the indexer
- use strict;
- use vars qw($import_done);
- CPAN->import(':DEFAULT') unless $import_done++;
- CPAN->debug("eval[$eval]") if $CPAN::DEBUG;
- eval($eval);
- warn $@ if $@;
- $continuation = "";
- $prompt = $oprompt;
- } elsif (/./) {
- my(@line);
- eval { @line = Text::ParseWords::shellwords($_) };
- warn($@), next SHELLCOMMAND if $@;
- warn("Text::Parsewords could not parse the line [$_]"),
- next SHELLCOMMAND unless @line;
- $CPAN::META->debug("line[".join("|", at line)."]") if $CPAN::DEBUG;
- my $command = shift @line;
- eval {
- local (*STDOUT)=*STDOUT;
- @line = _redirect(@line);
- CPAN::Shell->$command(@line)
- };
- my $command_error = $@;
- _unredirect;
- my $reported_error;
- if ($command_error) {
- my $err = $command_error;
- if (ref $err and $err->isa('CPAN::Exception::blocked_urllist')) {
- $CPAN::Frontend->mywarn("Client not fully configured, please proceed with configuring.$err");
- $reported_error = ref $err;
- } else {
- # I'd prefer never to arrive here and make all errors exception objects
- if ($err =~ /\S/) {
- require Carp;
- require Dumpvalue;
- my $dv = Dumpvalue->new(tick => '"');
- Carp::cluck(sprintf "Catching error: %s", $dv->stringify($err));
- }
- }
- }
- if ($command =~ /^(
- # classic commands
- make
- |test
- |install
- |clean
-
- # pragmas for classic commands
- |ff?orce
- |notest
-
- # compounds
- |report
- |smoke
- |upgrade
- )$/x) {
- # only commands that tell us something about failed distros
- # eval necessary for people without an urllist
- eval {CPAN::Shell->failed($CPAN::CurrentCommandId,1);};
- if (my $err = $@) {
- unless (ref $err and $reported_error eq ref $err) {
- die $@;
- }
- }
- }
- soft_chdir_with_alternatives(\@cwd);
- $CPAN::Frontend->myprint("\n");
- $continuation = "";
- $CPAN::CurrentCommandId++;
- $prompt = $oprompt;
- }
- } continue {
- $commandline = ""; # I do want to be able to pass a default to
- # shell, but on the second command I see no
- # use in that
- $Signal=0;
- CPAN::Queue->nullify_queue;
- if ($try_detect_readline) {
- if ($CPAN::META->has_inst("Term::ReadLine::Gnu")
- ||
- $CPAN::META->has_inst("Term::ReadLine::Perl")
- ) {
- delete $INC{"Term/ReadLine.pm"};
- my $redef = 0;
- local($SIG{__WARN__}) = CPAN::Shell::paintdots_onreload(\$redef);
- require Term::ReadLine;
- $CPAN::Frontend->myprint("\n$redef subroutines in ".
- "Term::ReadLine redefined\n");
- $GOTOSHELL = 1;
- }
- }
- if ($term and $term->can("ornaments")) {
- for ($CPAN::Config->{term_ornaments}) { # alias
- if (defined $_) {
- if (not defined $last_term_ornaments
- or $_ != $last_term_ornaments
- ) {
- local $Term::ReadLine::termcap_nowarn = 1;
- $term->ornaments($_);
- $last_term_ornaments = $_;
- }
- } else {
- undef $last_term_ornaments;
- }
- }
- }
- for my $class (qw(Module Distribution)) {
- # again unsafe meta access?
- for my $dm (keys %{$CPAN::META->{readwrite}{"CPAN::$class"}}) {
- next unless $CPAN::META->{readwrite}{"CPAN::$class"}{$dm}{incommandcolor};
- CPAN->debug("BUG: $class '$dm' was in command state, resetting");
- delete $CPAN::META->{readwrite}{"CPAN::$class"}{$dm}{incommandcolor};
- }
- }
- if ($GOTOSHELL) {
- $GOTOSHELL = 0; # not too often
- $META->savehist if $CPAN::term && $CPAN::term->can("GetHistory");
- @_ = ($oprompt,"");
- goto &shell;
- }
- }
- soft_chdir_with_alternatives(\@cwd);
-}
-
-#-> CPAN::soft_chdir_with_alternatives ;
-sub soft_chdir_with_alternatives ($) {
- my($cwd) = @_;
- unless (@$cwd) {
- my $root = File::Spec->rootdir();
- $CPAN::Frontend->mywarn(qq{Warning: no good directory to chdir to!
-Trying '$root' as temporary haven.
-});
- push @$cwd, $root;
- }
- while () {
- if (chdir $cwd->[0]) {
- return;
- } else {
- if (@$cwd>1) {
- $CPAN::Frontend->mywarn(qq{Could not chdir to "$cwd->[0]": $!
-Trying to chdir to "$cwd->[1]" instead.
-});
- shift @$cwd;
- } else {
- $CPAN::Frontend->mydie(qq{Could not chdir to "$cwd->[0]": $!});
- }
- }
- }
-}
-
-sub _flock {
- my($fh,$mode) = @_;
- if ( $Config::Config{d_flock} || $Config::Config{d_fcntl_can_lock} ) {
- return flock $fh, $mode;
- } elsif (!$Have_warned->{"d_flock"}++) {
- $CPAN::Frontend->mywarn("Your OS does not seem to support locking; continuing and ignoring all locking issues\n");
- $CPAN::Frontend->mysleep(5);
- return 1;
- } else {
- return 1;
- }
-}
-
-sub _yaml_module () {
- my $yaml_module = $CPAN::Config->{yaml_module} || "YAML";
- if (
- $yaml_module ne "YAML"
- &&
- !$CPAN::META->has_inst($yaml_module)
- ) {
- # $CPAN::Frontend->mywarn("'$yaml_module' not installed, falling back to 'YAML'\n");
- $yaml_module = "YAML";
- }
- if ($yaml_module eq "YAML"
- &&
- $CPAN::META->has_inst($yaml_module)
- &&
- $YAML::VERSION < 0.60
- &&
- !$Have_warned->{"YAML"}++
- ) {
- $CPAN::Frontend->mywarn("Warning: YAML version '$YAML::VERSION' is too low, please upgrade!\n".
- "I'll continue but problems are *very* likely to happen.\n"
- );
- $CPAN::Frontend->mysleep(5);
- }
- return $yaml_module;
-}
-
-# CPAN::_yaml_loadfile
-sub _yaml_loadfile {
- my($self,$local_file) = @_;
- return +[] unless -s $local_file;
- my $yaml_module = _yaml_module;
- if ($CPAN::META->has_inst($yaml_module)) {
- # temporarly enable yaml code deserialisation
- no strict 'refs';
- # 5.6.2 could not do the local() with the reference
- # so we do it manually instead
- my $old_loadcode = ${"$yaml_module\::LoadCode"};
- ${ "$yaml_module\::LoadCode" } = $CPAN::Config->{yaml_load_code} || 0;
-
- my ($code, @yaml);
- if ($code = UNIVERSAL::can($yaml_module, "LoadFile")) {
- eval { @yaml = $code->($local_file); };
- if ($@) {
- # this shall not be done by the frontend
- die CPAN::Exception::yaml_process_error->new($yaml_module,$local_file,"parse",$@);
- }
- } elsif ($code = UNIVERSAL::can($yaml_module, "Load")) {
- local *FH;
- open FH, $local_file or die "Could not open '$local_file': $!";
- local $/;
- my $ystream = <FH>;
- eval { @yaml = $code->($ystream); };
- if ($@) {
- # this shall not be done by the frontend
- die CPAN::Exception::yaml_process_error->new($yaml_module,$local_file,"parse",$@);
- }
- }
- ${"$yaml_module\::LoadCode"} = $old_loadcode;
- return \@yaml;
- } else {
- # this shall not be done by the frontend
- die CPAN::Exception::yaml_not_installed->new($yaml_module, $local_file, "parse");
- }
- return +[];
-}
-
-# CPAN::_yaml_dumpfile
-sub _yaml_dumpfile {
- my($self,$local_file, at what) = @_;
- my $yaml_module = _yaml_module;
- if ($CPAN::META->has_inst($yaml_module)) {
- my $code;
- if (UNIVERSAL::isa($local_file, "FileHandle")) {
- $code = UNIVERSAL::can($yaml_module, "Dump");
- eval { print $local_file $code->(@what) };
- } elsif ($code = UNIVERSAL::can($yaml_module, "DumpFile")) {
- eval { $code->($local_file, at what); };
- } elsif ($code = UNIVERSAL::can($yaml_module, "Dump")) {
- local *FH;
- open FH, ">$local_file" or die "Could not open '$local_file': $!";
- print FH $code->(@what);
- }
- if ($@) {
- die CPAN::Exception::yaml_process_error->new($yaml_module,$local_file,"dump",$@);
- }
- } else {
- if (UNIVERSAL::isa($local_file, "FileHandle")) {
- # I think this case does not justify a warning at all
- } else {
- die CPAN::Exception::yaml_not_installed->new($yaml_module, $local_file, "dump");
- }
- }
-}
-
-sub _init_sqlite () {
- unless ($CPAN::META->has_inst("CPAN::SQLite")) {
- $CPAN::Frontend->mywarn(qq{CPAN::SQLite not installed, trying to work without\n})
- unless $Have_warned->{"CPAN::SQLite"}++;
- return;
- }
- require CPAN::SQLite::META; # not needed since CVS version of 2006-12-17
- $CPAN::SQLite ||= CPAN::SQLite::META->new($CPAN::META);
-}
-
-{
- my $negative_cache = {};
- sub _sqlite_running {
- if ($negative_cache->{time} && time < $negative_cache->{time} + 60) {
- # need to cache the result, otherwise too slow
- return $negative_cache->{fact};
- } else {
- $negative_cache = {}; # reset
- }
- my $ret = $CPAN::Config->{use_sqlite} && ($CPAN::SQLite || _init_sqlite());
- return $ret if $ret; # fast anyway
- $negative_cache->{time} = time;
- return $negative_cache->{fact} = $ret;
- }
-}
-
-$META ||= CPAN->new; # In case we re-eval ourselves we need the ||
-
-# from here on only subs.
-################################################################################
-
-sub _perl_fingerprint {
- my($self,$other_fingerprint) = @_;
- my $dll = eval {OS2::DLLname()};
- my $mtime_dll = 0;
- if (defined $dll) {
- $mtime_dll = (-f $dll ? (stat(_))[9] : '-1');
- }
- my $mtime_perl = (-f CPAN::find_perl ? (stat(_))[9] : '-1');
- my $this_fingerprint = {
- '$^X' => CPAN::find_perl,
- sitearchexp => $Config::Config{sitearchexp},
- 'mtime_$^X' => $mtime_perl,
- 'mtime_dll' => $mtime_dll,
- };
- if ($other_fingerprint) {
- if (exists $other_fingerprint->{'stat($^X)'}) { # repair fp from rev. 1.88_57
- $other_fingerprint->{'mtime_$^X'} = $other_fingerprint->{'stat($^X)'}[9];
- }
- # mandatory keys since 1.88_57
- for my $key (qw($^X sitearchexp mtime_dll mtime_$^X)) {
- return unless $other_fingerprint->{$key} eq $this_fingerprint->{$key};
- }
- return 1;
- } else {
- return $this_fingerprint;
- }
-}
-
-sub suggest_myconfig () {
- SUGGEST_MYCONFIG: if(!$INC{'CPAN/MyConfig.pm'}) {
- $CPAN::Frontend->myprint("You don't seem to have a user ".
- "configuration (MyConfig.pm) yet.\n");
- my $new = CPAN::Shell::colorable_makemaker_prompt("Do you want to create a ".
- "user configuration now? (Y/n)",
- "yes");
- if($new =~ m{^y}i) {
- CPAN::Shell->mkmyconfig();
- return &checklock;
- } else {
- $CPAN::Frontend->mydie("OK, giving up.");
- }
- }
-}
-
-#-> sub CPAN::all_objects ;
-sub all_objects {
- my($mgr,$class) = @_;
- CPAN::HandleConfig->load unless $CPAN::Config_loaded++;
- CPAN->debug("mgr[$mgr] class[$class]") if $CPAN::DEBUG;
- CPAN::Index->reload;
- values %{ $META->{readwrite}{$class} }; # unsafe meta access, ok
-}
-
-# Called by shell, not in batch mode. In batch mode I see no risk in
-# having many processes updating something as installations are
-# continually checked at runtime. In shell mode I suspect it is
-# unintentional to open more than one shell at a time
-
-#-> sub CPAN::checklock ;
-sub checklock {
- my($self) = @_;
- my $lockfile = File::Spec->catfile($CPAN::Config->{cpan_home},".lock");
- if (-f $lockfile && -M _ > 0) {
- my $fh = FileHandle->new($lockfile) or
- $CPAN::Frontend->mydie("Could not open lockfile '$lockfile': $!");
- my $otherpid = <$fh>;
- my $otherhost = <$fh>;
- $fh->close;
- if (defined $otherpid && $otherpid) {
- chomp $otherpid;
- }
- if (defined $otherhost && $otherhost) {
- chomp $otherhost;
- }
- my $thishost = hostname();
- if (defined $otherhost && defined $thishost &&
- $otherhost ne '' && $thishost ne '' &&
- $otherhost ne $thishost) {
- $CPAN::Frontend->mydie(sprintf("CPAN.pm panic: Lockfile '$lockfile'\n".
- "reports other host $otherhost and other ".
- "process $otherpid.\n".
- "Cannot proceed.\n"));
- } elsif ($RUN_DEGRADED) {
- $CPAN::Frontend->mywarn("Running in downgraded mode (experimental)\n");
- } elsif (defined $otherpid && $otherpid) {
- return if $$ == $otherpid; # should never happen
- $CPAN::Frontend->mywarn(
- qq{
-There seems to be running another CPAN process (pid $otherpid). Contacting...
-});
- if (kill 0, $otherpid or $!{EPERM}) {
- $CPAN::Frontend->mywarn(qq{Other job is running.\n});
- my($ans) =
- CPAN::Shell::colorable_makemaker_prompt
- (qq{Shall I try to run in downgraded }.
- qq{mode? (Y/n)},"y");
- if ($ans =~ /^y/i) {
- $CPAN::Frontend->mywarn("Running in downgraded mode (experimental).
-Please report if something unexpected happens\n");
- $RUN_DEGRADED = 1;
- for ($CPAN::Config) {
- # XXX
- # $_->{build_dir_reuse} = 0; # 2006-11-17 akoenig Why was that?
- $_->{commandnumber_in_prompt} = 0; # visibility
- $_->{histfile} = ""; # who should win otherwise?
- $_->{cache_metadata} = 0; # better would be a lock?
- $_->{use_sqlite} = 0; # better would be a write lock!
- $_->{auto_commit} = 0; # we are violent, do not persist
- $_->{test_report} = 0; # Oliver Paukstadt had sent wrong reports in degraded mode
- }
- } else {
- $CPAN::Frontend->mydie("
-You may want to kill the other job and delete the lockfile. On UNIX try:
- kill $otherpid
- rm $lockfile
-");
- }
- } elsif (-w $lockfile) {
- my($ans) =
- CPAN::Shell::colorable_makemaker_prompt
- (qq{Other job not responding. Shall I overwrite }.
- qq{the lockfile '$lockfile'? (Y/n)},"y");
- $CPAN::Frontend->myexit("Ok, bye\n")
- unless $ans =~ /^y/i;
- } else {
- Carp::croak(
- qq{Lockfile '$lockfile' not writable by you. }.
- qq{Cannot proceed.\n}.
- qq{ On UNIX try:\n}.
- qq{ rm '$lockfile'\n}.
- qq{ and then rerun us.\n}
- );
- }
- } else {
- $CPAN::Frontend->mydie(sprintf("CPAN.pm panic: Found invalid lockfile ".
- "'$lockfile', please remove. Cannot proceed.\n"));
- }
- }
- my $dotcpan = $CPAN::Config->{cpan_home};
- eval { File::Path::mkpath($dotcpan);};
- if ($@) {
- # A special case at least for Jarkko.
- my $firsterror = $@;
- my $seconderror;
- my $symlinkcpan;
- if (-l $dotcpan) {
- $symlinkcpan = readlink $dotcpan;
- die "readlink $dotcpan failed: $!" unless defined $symlinkcpan;
- eval { File::Path::mkpath($symlinkcpan); };
- if ($@) {
- $seconderror = $@;
- } else {
- $CPAN::Frontend->mywarn(qq{
-Working directory $symlinkcpan created.
-});
- }
- }
- unless (-d $dotcpan) {
- my $mess = qq{
-Your configuration suggests "$dotcpan" as your
-CPAN.pm working directory. I could not create this directory due
-to this error: $firsterror\n};
- $mess .= qq{
-As "$dotcpan" is a symlink to "$symlinkcpan",
-I tried to create that, but I failed with this error: $seconderror
-} if $seconderror;
- $mess .= qq{
-Please make sure the directory exists and is writable.
-};
- $CPAN::Frontend->mywarn($mess);
- return suggest_myconfig;
- }
- } # $@ after eval mkpath $dotcpan
- if (0) { # to test what happens when a race condition occurs
- for (reverse 1..10) {
- print $_, "\n";
- sleep 1;
- }
- }
- # locking
- if (!$RUN_DEGRADED && !$self->{LOCKFH}) {
- my $fh;
- unless ($fh = FileHandle->new("+>>$lockfile")) {
- if ($! =~ /Permission/) {
- $CPAN::Frontend->mywarn(qq{
-
-Your configuration suggests that CPAN.pm should use a working
-directory of
- $CPAN::Config->{cpan_home}
-Unfortunately we could not create the lock file
- $lockfile
-due to permission problems.
-
-Please make sure that the configuration variable
- \$CPAN::Config->{cpan_home}
-points to a directory where you can write a .lock file. You can set
-this variable in either a CPAN/MyConfig.pm or a CPAN/Config.pm in your
-\@INC path;
-});
- return suggest_myconfig;
- }
- }
- my $sleep = 1;
- while (!CPAN::_flock($fh, LOCK_EX|LOCK_NB)) {
- if ($sleep>10) {
- $CPAN::Frontend->mydie("Giving up\n");
- }
- $CPAN::Frontend->mysleep($sleep++);
- $CPAN::Frontend->mywarn("Could not lock lockfile with flock: $!; retrying\n");
- }
-
- seek $fh, 0, 0;
- truncate $fh, 0;
- $fh->autoflush(1);
- $fh->print($$, "\n");
- $fh->print(hostname(), "\n");
- $self->{LOCK} = $lockfile;
- $self->{LOCKFH} = $fh;
- }
- $SIG{TERM} = sub {
- my $sig = shift;
- &cleanup;
- $CPAN::Frontend->mydie("Got SIG$sig, leaving");
- };
- $SIG{INT} = sub {
- # no blocks!!!
- my $sig = shift;
- &cleanup if $Signal;
- die "Got yet another signal" if $Signal > 1;
- $CPAN::Frontend->mydie("Got another SIG$sig") if $Signal;
- $CPAN::Frontend->mywarn("Caught SIG$sig, trying to continue\n");
- $Signal++;
- };
-
-# From: Larry Wall <larry at wall.org>
-# Subject: Re: deprecating SIGDIE
-# To: perl5-porters at perl.org
-# Date: Thu, 30 Sep 1999 14:58:40 -0700 (PDT)
-#
-# The original intent of __DIE__ was only to allow you to substitute one
-# kind of death for another on an application-wide basis without respect
-# to whether you were in an eval or not. As a global backstop, it should
-# not be used any more lightly (or any more heavily :-) than class
-# UNIVERSAL. Any attempt to build a general exception model on it should
-# be politely squashed. Any bug that causes every eval {} to have to be
-# modified should be not so politely squashed.
-#
-# Those are my current opinions. It is also my optinion that polite
-# arguments degenerate to personal arguments far too frequently, and that
-# when they do, it's because both people wanted it to, or at least didn't
-# sufficiently want it not to.
-#
-# Larry
-
- # global backstop to cleanup if we should really die
- $SIG{__DIE__} = \&cleanup;
- $self->debug("Signal handler set.") if $CPAN::DEBUG;
-}
-
-#-> sub CPAN::DESTROY ;
-sub DESTROY {
- &cleanup; # need an eval?
-}
-
-#-> sub CPAN::anycwd ;
-sub anycwd () {
- my $getcwd;
- $getcwd = $CPAN::Config->{'getcwd'} || 'cwd';
- CPAN->$getcwd();
-}
-
-#-> sub CPAN::cwd ;
-sub cwd {Cwd::cwd();}
-
-#-> sub CPAN::getcwd ;
-sub getcwd {Cwd::getcwd();}
-
-#-> sub CPAN::fastcwd ;
-sub fastcwd {Cwd::fastcwd();}
-
-#-> sub CPAN::backtickcwd ;
-sub backtickcwd {my $cwd = `cwd`; chomp $cwd; $cwd}
-
-#-> sub CPAN::find_perl ;
-sub find_perl () {
- my($perl) = File::Spec->file_name_is_absolute($^X) ? $^X : "";
- unless ($perl) {
- my $candidate = File::Spec->catfile($CPAN::iCwd,$^X);
- $^X = $perl = $candidate if MM->maybe_command($candidate);
- }
- unless ($perl) {
- my ($component,$perl_name);
- DIST_PERLNAME: foreach $perl_name ($^X, 'perl', 'perl5', "perl$]") {
- PATH_COMPONENT: foreach $component (File::Spec->path(),
- $Config::Config{'binexp'}) {
- next unless defined($component) && $component;
- my($abs) = File::Spec->catfile($component,$perl_name);
- if (MM->maybe_command($abs)) {
- $^X = $perl = $abs;
- last DIST_PERLNAME;
- }
- }
- }
- }
- return $perl;
-}
-
-
-#-> sub CPAN::exists ;
-sub exists {
- my($mgr,$class,$id) = @_;
- CPAN::HandleConfig->load unless $CPAN::Config_loaded++;
- CPAN::Index->reload;
- ### Carp::croak "exists called without class argument" unless $class;
- $id ||= "";
- $id =~ s/:+/::/g if $class eq "CPAN::Module";
- my $exists;
- if (CPAN::_sqlite_running) {
- $exists = (exists $META->{readonly}{$class}{$id} or
- $CPAN::SQLite->set($class, $id));
- } else {
- $exists = exists $META->{readonly}{$class}{$id};
- }
- $exists ||= exists $META->{readwrite}{$class}{$id}; # unsafe meta access, ok
-}
-
-#-> sub CPAN::delete ;
-sub delete {
- my($mgr,$class,$id) = @_;
- delete $META->{readonly}{$class}{$id}; # unsafe meta access, ok
- delete $META->{readwrite}{$class}{$id}; # unsafe meta access, ok
-}
-
-#-> sub CPAN::has_usable
-# has_inst is sometimes too optimistic, we should replace it with this
-# has_usable whenever a case is given
-sub has_usable {
- my($self,$mod,$message) = @_;
- return 1 if $HAS_USABLE->{$mod};
- my $has_inst = $self->has_inst($mod,$message);
- return unless $has_inst;
- my $usable;
- $usable = {
- LWP => [ # we frequently had "Can't locate object
- # method "new" via package "LWP::UserAgent" at
- # (eval 69) line 2006
- sub {require LWP},
- sub {require LWP::UserAgent},
- sub {require HTTP::Request},
- sub {require URI::URL},
- ],
- 'Net::FTP' => [
- sub {require Net::FTP},
- sub {require Net::Config},
- ],
- 'File::HomeDir' => [
- sub {require File::HomeDir;
- unless (CPAN::Version->vge(File::HomeDir::->VERSION, 0.52)) {
- for ("Will not use File::HomeDir, need 0.52\n") {
- $CPAN::Frontend->mywarn($_);
- die $_;
- }
- }
- },
- ],
- 'Archive::Tar' => [
- sub {require Archive::Tar;
- unless (CPAN::Version->vge(Archive::Tar::->VERSION, 1.50)) {
- for ("Will not use Archive::Tar, need 1.00\n") {
- $CPAN::Frontend->mywarn($_);
- die $_;
- }
- }
- unless (CPAN::Version->vge(Archive::Tar::->VERSION, 1.50)) {
- my $atv = Archive::Tar->VERSION;
- $CPAN::Frontend->mywarn("You have Archive::Tar $atv, but 1.50 or later is recommended. Please upgrade.\n");
- }
- },
- ],
- 'File::Temp' => [
- # XXX we should probably delete from
- # %INC too so we can load after we
- # installed a new enough version --
- # I'm not sure.
- sub {require File::Temp;
- unless (CPAN::Version->vge(File::Temp::->VERSION,0.16)) {
- for ("Will not use File::Temp, need 0.16\n") {
- $CPAN::Frontend->mywarn($_);
- die $_;
- }
- }
- },
- ]
- };
- if ($usable->{$mod}) {
- for my $c (0..$#{$usable->{$mod}}) {
- my $code = $usable->{$mod}[$c];
- my $ret = eval { &$code() };
- $ret = "" unless defined $ret;
- if ($@) {
- # warn "DEBUG: c[$c]\$\@[$@]ret[$ret]";
- return;
- }
- }
- }
- return $HAS_USABLE->{$mod} = 1;
-}
-
-#-> sub CPAN::has_inst
-sub has_inst {
- my($self,$mod,$message) = @_;
- Carp::croak("CPAN->has_inst() called without an argument")
- unless defined $mod;
- my %dont = map { $_ => 1 } keys %{$CPAN::META->{dontload_hash}||{}},
- keys %{$CPAN::Config->{dontload_hash}||{}},
- @{$CPAN::Config->{dontload_list}||[]};
- if (defined $message && $message eq "no" # afair only used by Nox
- ||
- $dont{$mod}
- ) {
- $CPAN::META->{dontload_hash}{$mod}||=1; # unsafe meta access, ok
- return 0;
- }
- my $file = $mod;
- my $obj;
- $file =~ s|::|/|g;
- $file .= ".pm";
- if ($INC{$file}) {
- # checking %INC is wrong, because $INC{LWP} may be true
- # although $INC{"URI/URL.pm"} may have failed. But as
- # I really want to say "bla loaded OK", I have to somehow
- # cache results.
- ### warn "$file in %INC"; #debug
- return 1;
- } elsif (eval { require $file }) {
- # eval is good: if we haven't yet read the database it's
- # perfect and if we have installed the module in the meantime,
- # it tries again. The second require is only a NOOP returning
- # 1 if we had success, otherwise it's retrying
-
- my $mtime = (stat $INC{$file})[9];
- # privileged files loaded by has_inst; Note: we use $mtime
- # as a proxy for a checksum.
- $CPAN::Shell::reload->{$file} = $mtime;
- my $v = eval "\$$mod\::VERSION";
- $v = $v ? " (v$v)" : "";
- CPAN::Shell->optprint("load_module","CPAN: $mod loaded ok$v\n");
- if ($mod eq "CPAN::WAIT") {
- push @CPAN::Shell::ISA, 'CPAN::WAIT';
- }
- return 1;
- } elsif ($mod eq "Net::FTP") {
- $CPAN::Frontend->mywarn(qq{
- Please, install Net::FTP as soon as possible. CPAN.pm installs it for you
- if you just type
- install Bundle::libnet
-
-}) unless $Have_warned->{"Net::FTP"}++;
- $CPAN::Frontend->mysleep(3);
- } elsif ($mod eq "Digest::SHA") {
- if ($Have_warned->{"Digest::SHA"}++) {
- $CPAN::Frontend->mywarn(qq{CPAN: checksum security checks disabled }.
- qq{because Digest::SHA not installed.\n});
- } else {
- $CPAN::Frontend->mywarn(qq{
- CPAN: checksum security checks disabled because Digest::SHA not installed.
- Please consider installing the Digest::SHA module.
-
-});
- $CPAN::Frontend->mysleep(2);
- }
- } elsif ($mod eq "Module::Signature") {
- # NOT prefs_lookup, we are not a distro
- my $check_sigs = $CPAN::Config->{check_sigs};
- if (not $check_sigs) {
- # they do not want us:-(
- } elsif (not $Have_warned->{"Module::Signature"}++) {
- # No point in complaining unless the user can
- # reasonably install and use it.
- if (eval { require Crypt::OpenPGP; 1 } ||
- (
- defined $CPAN::Config->{'gpg'}
- &&
- $CPAN::Config->{'gpg'} =~ /\S/
- )
- ) {
- $CPAN::Frontend->mywarn(qq{
- CPAN: Module::Signature security checks disabled because Module::Signature
- not installed. Please consider installing the Module::Signature module.
- You may also need to be able to connect over the Internet to the public
- keyservers like pgp.mit.edu (port 11371).
-
-});
- $CPAN::Frontend->mysleep(2);
- }
- }
- } else {
- delete $INC{$file}; # if it inc'd LWP but failed during, say, URI
- }
- return 0;
-}
-
-#-> sub CPAN::instance ;
-sub instance {
- my($mgr,$class,$id) = @_;
- CPAN::Index->reload;
- $id ||= "";
- # unsafe meta access, ok?
- return $META->{readwrite}{$class}{$id} if exists $META->{readwrite}{$class}{$id};
- $META->{readwrite}{$class}{$id} ||= $class->new(ID => $id);
-}
-
-#-> sub CPAN::new ;
-sub new {
- bless {}, shift;
-}
-
-#-> sub CPAN::cleanup ;
-sub cleanup {
- # warn "cleanup called with arg[@_] End[$CPAN::End] Signal[$Signal]";
- local $SIG{__DIE__} = '';
- my($message) = @_;
- my $i = 0;
- my $ineval = 0;
- my($subroutine);
- while ((undef,undef,undef,$subroutine) = caller(++$i)) {
- $ineval = 1, last if
- $subroutine eq '(eval)';
- }
- return if $ineval && !$CPAN::End;
- return unless defined $META->{LOCK};
- return unless -f $META->{LOCK};
- $META->savehist;
- close $META->{LOCKFH};
- unlink $META->{LOCK};
- # require Carp;
- # Carp::cluck("DEBUGGING");
- if ( $CPAN::CONFIG_DIRTY ) {
- $CPAN::Frontend->mywarn("Warning: Configuration not saved.\n");
- }
- $CPAN::Frontend->myprint("Lockfile removed.\n");
-}
-
-#-> sub CPAN::readhist
-sub readhist {
- my($self,$term,$histfile) = @_;
- my $histsize = $CPAN::Config->{'histsize'} || 100;
- $term->Attribs->{'MaxHistorySize'} = $histsize if (defined($term->Attribs->{'MaxHistorySize'}));
- my($fh) = FileHandle->new;
- open $fh, "<$histfile" or return;
- local $/ = "\n";
- while (<$fh>) {
- chomp;
- $term->AddHistory($_);
- }
- close $fh;
-}
-
-#-> sub CPAN::savehist
-sub savehist {
- my($self) = @_;
- my($histfile,$histsize);
- unless ($histfile = $CPAN::Config->{'histfile'}) {
- $CPAN::Frontend->mywarn("No history written (no histfile specified).\n");
- return;
- }
- $histsize = $CPAN::Config->{'histsize'} || 100;
- if ($CPAN::term) {
- unless ($CPAN::term->can("GetHistory")) {
- $CPAN::Frontend->mywarn("Terminal does not support GetHistory.\n");
- return;
- }
- } else {
- return;
- }
- my @h = $CPAN::term->GetHistory;
- splice @h, 0, @h-$histsize if @h>$histsize;
- my($fh) = FileHandle->new;
- open $fh, ">$histfile" or $CPAN::Frontend->mydie("Couldn't open >$histfile: $!");
- local $\ = local $, = "\n";
- print $fh @h;
- close $fh;
-}
-
-#-> sub CPAN::is_tested
-sub is_tested {
- my($self,$what,$when) = @_;
- unless ($what) {
- Carp::cluck("DEBUG: empty what");
- return;
- }
- $self->{is_tested}{$what} = $when;
-}
-
-#-> sub CPAN::reset_tested
-# forget all distributions tested -- resets what gets included in PERL5LIB
-sub reset_tested {
- my ($self) = @_;
- $self->{is_tested} = {};
-}
-
-#-> sub CPAN::is_installed
-# unsets the is_tested flag: as soon as the thing is installed, it is
-# not needed in set_perl5lib anymore
-sub is_installed {
- my($self,$what) = @_;
- delete $self->{is_tested}{$what};
-}
-
-sub _list_sorted_descending_is_tested {
- my($self) = @_;
- sort
- { ($self->{is_tested}{$b}||0) <=> ($self->{is_tested}{$a}||0) }
- keys %{$self->{is_tested}}
-}
-
-#-> sub CPAN::set_perl5lib
-# Notes on max environment variable length:
-# - Win32 : XP or later, 8191; Win2000 or NT4, 2047
-{
-my $fh;
-sub set_perl5lib {
- my($self,$for) = @_;
- unless ($for) {
- (undef,undef,undef,$for) = caller(1);
- $for =~ s/.*://;
- }
- $self->{is_tested} ||= {};
- return unless %{$self->{is_tested}};
- my $env = $ENV{PERL5LIB};
- $env = $ENV{PERLLIB} unless defined $env;
- my @env;
- push @env, split /\Q$Config::Config{path_sep}\E/, $env if defined $env and length $env;
- #my @dirs = map {("$_/blib/arch", "$_/blib/lib")} keys %{$self->{is_tested}};
- #$CPAN::Frontend->myprint("Prepending @dirs to PERL5LIB.\n");
-
- my @dirs = map {("$_/blib/arch", "$_/blib/lib")} $self->_list_sorted_descending_is_tested;
- return if !@dirs;
-
- if (@dirs < 12) {
- $CPAN::Frontend->optprint('perl5lib', "Prepending @dirs to PERL5LIB for '$for'\n");
- $ENV{PERL5LIB} = join $Config::Config{path_sep}, @dirs, @env;
- } elsif (@dirs < 24 ) {
- my @d = map {my $cp = $_;
- $cp =~ s/^\Q$CPAN::Config->{build_dir}\E/%BUILDDIR%/;
- $cp
- } @dirs;
- $CPAN::Frontend->optprint('perl5lib', "Prepending @d to PERL5LIB; ".
- "%BUILDDIR%=$CPAN::Config->{build_dir} ".
- "for '$for'\n"
- );
- $ENV{PERL5LIB} = join $Config::Config{path_sep}, @dirs, @env;
- } else {
- my $cnt = keys %{$self->{is_tested}};
- $CPAN::Frontend->optprint('perl5lib', "Prepending blib/arch and blib/lib of ".
- "$cnt build dirs to PERL5LIB; ".
- "for '$for'\n"
- );
- $ENV{PERL5LIB} = join $Config::Config{path_sep}, @dirs, @env;
- }
-}}
-
-
-1;
-
-
-__END__
-
-=head1 NAME
-
-CPAN - query, download and build perl modules from CPAN sites
-
-=head1 SYNOPSIS
-
-Interactive mode:
-
- perl -MCPAN -e shell
-
---or--
-
- cpan
-
-Basic commands:
-
- # Modules:
-
- cpan> install Acme::Meta # in the shell
-
- CPAN::Shell->install("Acme::Meta"); # in perl
-
- # Distributions:
-
- cpan> install NWCLARK/Acme-Meta-0.02.tar.gz # in the shell
-
- CPAN::Shell->
- install("NWCLARK/Acme-Meta-0.02.tar.gz"); # in perl
-
- # module objects:
-
- $mo = CPAN::Shell->expandany($mod);
- $mo = CPAN::Shell->expand("Module",$mod); # same thing
-
- # distribution objects:
-
- $do = CPAN::Shell->expand("Module",$mod)->distribution;
- $do = CPAN::Shell->expandany($distro); # same thing
- $do = CPAN::Shell->expand("Distribution",
- $distro); # same thing
-
-=head1 DESCRIPTION
-
-The CPAN module automates or at least simplifies the make and install
-of perl modules and extensions. It includes some primitive searching
-capabilities and knows how to use Net::FTP, LWP, and certain external
-download clients to fetch distributions from the net.
-
-These are fetched from one or more mirrored CPAN (Comprehensive
-Perl Archive Network) sites and unpacked in a dedicated directory.
-
-The CPAN module also supports named and versioned
-I<bundles> of modules. Bundles simplify handling of sets of
-related modules. See Bundles below.
-
-The package contains a session manager and a cache manager. The
-session manager keeps track of what has been fetched, built, and
-installed in the current session. The cache manager keeps track of the
-disk space occupied by the make processes and deletes excess space
-using a simple FIFO mechanism.
-
-All methods provided are accessible in a programmer style and in an
-interactive shell style.
-
-=head2 CPAN::shell([$prompt, $command]) Starting Interactive Mode
-
-Enter interactive mode by running
-
- perl -MCPAN -e shell
-
-or
-
- cpan
-
-which puts you into a readline interface. If C<Term::ReadKey> and
-either of C<Term::ReadLine::Perl> or C<Term::ReadLine::Gnu> are installed,
-history and command completion are supported.
-
-Once at the command line, type C<h> for one-page help
-screen; the rest should be self-explanatory.
-
-The function call C<shell> takes two optional arguments: one the
-prompt, the second the default initial command line (the latter
-only works if a real ReadLine interface module is installed).
-
-The most common uses of the interactive modes are
-
-=over 2
-
-=item Searching for authors, bundles, distribution files and modules
-
-There are corresponding one-letter commands C<a>, C<b>, C<d>, and C<m>
-for each of the four categories and another, C<i> for any of the
-mentioned four. Each of the four entities is implemented as a class
-with slightly differing methods for displaying an object.
-
-Arguments to these commands are either strings exactly matching
-the identification string of an object, or regular expressions
-matched case-insensitively against various attributes of the
-objects. The parser only recognizes a regular expression when you
-enclose it with slashes.
-
-The principle is that the number of objects found influences how an
-item is displayed. If the search finds one item, the result is
-displayed with the rather verbose method C<as_string>, but if
-more than one is found, each object is displayed with the terse method
-C<as_glimpse>.
-
-Examples:
-
- cpan> m Acme::MetaSyntactic
- Module id = Acme::MetaSyntactic
- CPAN_USERID BOOK (Philippe Bruhat (BooK) <[...]>)
- CPAN_VERSION 0.99
- CPAN_FILE B/BO/BOOK/Acme-MetaSyntactic-0.99.tar.gz
- UPLOAD_DATE 2006-11-06
- MANPAGE Acme::MetaSyntactic - Themed metasyntactic variables names
- INST_FILE /usr/local/lib/perl/5.10.0/Acme/MetaSyntactic.pm
- INST_VERSION 0.99
- cpan> a BOOK
- Author id = BOOK
- EMAIL [...]
- FULLNAME Philippe Bruhat (BooK)
- cpan> d BOOK/Acme-MetaSyntactic-0.99.tar.gz
- Distribution id = B/BO/BOOK/Acme-MetaSyntactic-0.99.tar.gz
- CPAN_USERID BOOK (Philippe Bruhat (BooK) <[...]>)
- CONTAINSMODS Acme::MetaSyntactic Acme::MetaSyntactic::Alias [...]
- UPLOAD_DATE 2006-11-06
- cpan> m /lorem/
- Module = Acme::MetaSyntactic::loremipsum (BOOK/Acme-MetaSyntactic-0.99.tar.gz)
- Module Text::Lorem (ADEOLA/Text-Lorem-0.3.tar.gz)
- Module Text::Lorem::More (RKRIMEN/Text-Lorem-More-0.12.tar.gz)
- Module Text::Lorem::More::Source (RKRIMEN/Text-Lorem-More-0.12.tar.gz)
- cpan> i /berlin/
- Distribution BEATNIK/Filter-NumberLines-0.02.tar.gz
- Module = DateTime::TimeZone::Europe::Berlin (DROLSKY/DateTime-TimeZone-0.7904.tar.gz)
- Module Filter::NumberLines (BEATNIK/Filter-NumberLines-0.02.tar.gz)
- Author [...]
-
-The examples illustrate several aspects: the first three queries
-target modules, authors, or distros directly and yield exactly one
-result. The last two use regular expressions and yield several
-results. The last one targets all of bundles, modules, authors, and
-distros simultaneously. When more than one result is available, they
-are printed in one-line format.
-
-=item C<get>, C<make>, C<test>, C<install>, C<clean> modules or distributions
-
-These commands take any number of arguments and investigate what is
-necessary to perform the action. If the argument is a distribution
-file name (recognized by embedded slashes), it is processed. If it is
-a module, CPAN determines the distribution file in which this module
-is included and processes that, following any dependencies named in
-the module's META.yml or Makefile.PL (this behavior is controlled by
-the configuration parameter C<prerequisites_policy>.)
-
-C<get> downloads a distribution file and untars or unzips it, C<make>
-builds it, C<test> runs the test suite, and C<install> installs it.
-
-Any C<make> or C<test> is run unconditionally. An
-
- install <distribution_file>
-
-is also run unconditionally. But for
-
- install <module>
-
-CPAN checks whether an install is needed and prints
-I<module up to date> if the distribution file containing
-the module doesn't need updating.
-
-CPAN also keeps track of what it has done within the current session
-and doesn't try to build a package a second time regardless of whether it
-succeeded or not. It does not repeat a test run if the test
-has been run successfully before. Same for install runs.
-
-The C<force> pragma may precede another command (currently: C<get>,
-C<make>, C<test>, or C<install>) to execute the command from scratch
-and attempt to continue past certain errors. See the section below on
-the C<force> and the C<fforce> pragma.
-
-The C<notest> pragma skips the test part in the build
-process.
-
-Example:
-
- cpan> notest install Tk
-
-A C<clean> command results in a
-
- make clean
-
-being executed within the distribution file's working directory.
-
-=item C<readme>, C<perldoc>, C<look> module or distribution
-
-C<readme> displays the README file of the associated distribution.
-C<Look> gets and untars (if not yet done) the distribution file,
-changes to the appropriate directory and opens a subshell process in
-that directory. C<perldoc> displays the module's pod documentation
-in html or plain text format.
-
-=item C<ls> author
-
-=item C<ls> globbing_expression
-
-The first form lists all distribution files in and below an author's
-CPAN directory as stored in the CHECKUMS files distributed on
-CPAN. The listing recurses into subdirectories.
-
-The second form limits or expands the output with shell
-globbing as in the following examples:
-
- ls JV/make*
- ls GSAR/*make*
- ls */*make*
-
-The last example is very slow and outputs extra progress indicators
-that break the alignment of the result.
-
-Note that globbing only lists directories explicitly asked for, for
-example FOO/* will not list FOO/bar/Acme-Sthg-n.nn.tar.gz. This may be
-regarded as a bug that may be changed in some future version.
-
-=item C<failed>
-
-The C<failed> command reports all distributions that failed on one of
-C<make>, C<test> or C<install> for some reason in the currently
-running shell session.
-
-=item Persistence between sessions
-
-If the C<YAML> or the C<YAML::Syck> module is installed a record of
-the internal state of all modules is written to disk after each step.
-The files contain a signature of the currently running perl version
-for later perusal.
-
-If the configurations variable C<build_dir_reuse> is set to a true
-value, then CPAN.pm reads the collected YAML files. If the stored
-signature matches the currently running perl, the stored state is
-loaded into memory such that persistence between sessions
-is effectively established.
-
-=item The C<force> and the C<fforce> pragma
-
-To speed things up in complex installation scenarios, CPAN.pm keeps
-track of what it has already done and refuses to do some things a
-second time. A C<get>, a C<make>, and an C<install> are not repeated.
-A C<test> is repeated only if the previous test was unsuccessful. The
-diagnostic message when CPAN.pm refuses to do something a second time
-is one of I<Has already been >C<unwrapped|made|tested successfully> or
-something similar. Another situation where CPAN refuses to act is an
-C<install> if the corresponding C<test> was not successful.
-
-In all these cases, the user can override this stubborn behaviour by
-prepending the command with the word force, for example:
-
- cpan> force get Foo
- cpan> force make AUTHOR/Bar-3.14.tar.gz
- cpan> force test Baz
- cpan> force install Acme::Meta
-
-Each I<forced> command is executed with the corresponding part of its
-memory erased.
-
-The C<fforce> pragma is a variant that emulates a C<force get> which
-erases the entire memory followed by the action specified, effectively
-restarting the whole get/make/test/install procedure from scratch.
-
-=item Lockfile
-
-Interactive sessions maintain a lockfile, by default C<~/.cpan/.lock>.
-Batch jobs can run without a lockfile and not disturb each other.
-
-The shell offers to run in I<downgraded mode> when another process is
-holding the lockfile. This is an experimental feature that is not yet
-tested very well. This second shell then does not write the history
-file, does not use the metadata file, and has a different prompt.
-
-=item Signals
-
-CPAN.pm installs signal handlers for SIGINT and SIGTERM. While you are
-in the cpan-shell, it is intended that you can press C<^C> anytime and
-return to the cpan-shell prompt. A SIGTERM will cause the cpan-shell
-to clean up and leave the shell loop. You can emulate the effect of a
-SIGTERM by sending two consecutive SIGINTs, which usually means by
-pressing C<^C> twice.
-
-CPAN.pm ignores SIGPIPE. If the user sets C<inactivity_timeout>, a
-SIGALRM is used during the run of the C<perl Makefile.PL> or C<perl
-Build.PL> subprocess.
-
-=back
-
-=head2 CPAN::Shell
-
-The commands available in the shell interface are methods in
-the package CPAN::Shell. If you enter the shell command, your
-input is split by the Text::ParseWords::shellwords() routine, which
-acts like most shells do. The first word is interpreted as the
-method to be invoked, and the rest of the words are treated as the method's arguments.
-Continuation lines are supported by ending a line with a
-literal backslash.
-
-=head2 autobundle
-
-C<autobundle> writes a bundle file into the
-C<$CPAN::Config-E<gt>{cpan_home}/Bundle> directory. The file contains
-a list of all modules that are both available from CPAN and currently
-installed within @INC. The name of the bundle file is based on the
-current date and a counter.
-
-=head2 hosts
-
-Note: this feature is still in alpha state and may change in future
-versions of CPAN.pm
-
-This commands provides a statistical overview over recent download
-activities. The data for this is collected in the YAML file
-C<FTPstats.yml> in your C<cpan_home> directory. If no YAML module is
-configured or YAML not installed, no stats are provided.
-
-=head2 mkmyconfig
-
-mkmyconfig() writes your own CPAN::MyConfig file into your C<~/.cpan/>
-directory so that you can save your own preferences instead of the
-system-wide ones.
-
-=head2 recent ***EXPERIMENTAL COMMAND***
-
-The C<recent> command downloads a list of recent uploads to CPAN and
-displays them I<slowly>. While the command is running, a $SIG{INT}
-exits the loop after displaying the current item.
-
-B<Note>: This command requires XML::LibXML installed.
-
-B<Note>: This whole command currently is just a hack and will
-probably change in future versions of CPAN.pm, but the general
-approach will likely remain.
-
-B<Note>: See also L<smoke>
-
-=head2 recompile
-
-recompile() is a special command that takes no argument and
-runs the make/test/install cycle with brute force over all installed
-dynamically loadable extensions (aka XS modules) with 'force' in
-effect. The primary purpose of this command is to finish a network
-installation. Imagine you have a common source tree for two different
-architectures. You decide to do a completely independent fresh
-installation. You start on one architecture with the help of a Bundle
-file produced earlier. CPAN installs the whole Bundle for you, but
-when you try to repeat the job on the second architecture, CPAN
-responds with a C<"Foo up to date"> message for all modules. So you
-invoke CPAN's recompile on the second architecture and you're done.
-
-Another popular use for C<recompile> is to act as a rescue in case your
-perl breaks binary compatibility. If one of the modules that CPAN uses
-is in turn depending on binary compatibility (so you cannot run CPAN
-commands), then you should try the CPAN::Nox module for recovery.
-
-=head2 report Bundle|Distribution|Module
-
-The C<report> command temporarily turns on the C<test_report> config
-variable, then runs the C<force test> command with the given
-arguments. The C<force> pragma reruns the tests and repeats
-every step that might have failed before.
-
-=head2 smoke ***EXPERIMENTAL COMMAND***
-
-B<*** WARNING: this command downloads and executes software from CPAN to
-your computer of completely unknown status. You should never do
-this with your normal account and better have a dedicated well
-separated and secured machine to do this. ***>
-
-The C<smoke> command takes the list of recent uploads to CPAN as
-provided by the C<recent> command and tests them all. While the
-command is running $SIG{INT} is defined to mean that the current item
-shall be skipped.
-
-B<Note>: This whole command currently is just a hack and will
-probably change in future versions of CPAN.pm, but the general
-approach will likely remain.
-
-B<Note>: See also L<recent>
-
-=head2 upgrade [Module|/Regex/]...
-
-The C<upgrade> command first runs an C<r> command with the given
-arguments and then installs the newest versions of all modules that
-were listed by that.
-
-=head2 The four C<CPAN::*> Classes: Author, Bundle, Module, Distribution
-
-Although it may be considered internal, the class hierarchy does matter
-for both users and programmer. CPAN.pm deals with the four
-classes mentioned above, and those classes all share a set of methods. Classical
-single polymorphism is in effect. A metaclass object registers all
-objects of all kinds and indexes them with a string. The strings
-referencing objects have a separated namespace (well, not completely
-separated):
-
- Namespace Class
-
- words containing a "/" (slash) Distribution
- words starting with Bundle:: Bundle
- everything else Module or Author
-
-Modules know their associated Distribution objects. They always refer
-to the most recent official release. Developers may mark their releases
-as unstable development versions (by inserting an underbar into the
-module version number which will also be reflected in the distribution
-name when you run 'make dist'), so the really hottest and newest
-distribution is not always the default. If a module Foo circulates
-on CPAN in both version 1.23 and 1.23_90, CPAN.pm offers a convenient
-way to install version 1.23 by saying
-
- install Foo
-
-This would install the complete distribution file (say
-BAR/Foo-1.23.tar.gz) with all accompanying material. But if you would
-like to install version 1.23_90, you need to know where the
-distribution file resides on CPAN relative to the authors/id/
-directory. If the author is BAR, this might be BAR/Foo-1.23_90.tar.gz;
-so you would have to say
-
- install BAR/Foo-1.23_90.tar.gz
-
-The first example will be driven by an object of the class
-CPAN::Module, the second by an object of class CPAN::Distribution.
-
-=head2 Integrating local directories
-
-Note: this feature is still in alpha state and may change in future
-versions of CPAN.pm
-
-Distribution objects are normally distributions from the CPAN, but
-there is a slightly degenerate case for Distribution objects, too, of
-projects held on the local disk. These distribution objects have the
-same name as the local directory and end with a dot. A dot by itself
-is also allowed for the current directory at the time CPAN.pm was
-used. All actions such as C<make>, C<test>, and C<install> are applied
-directly to that directory. This gives the command C<cpan .> an
-interesting touch: while the normal mantra of installing a CPAN module
-without CPAN.pm is one of
-
- perl Makefile.PL perl Build.PL
- ( go and get prerequisites )
- make ./Build
- make test ./Build test
- make install ./Build install
-
-the command C<cpan .> does all of this at once. It figures out which
-of the two mantras is appropriate, fetches and installs all
-prerequisites, takes care of them recursively, and finally finishes the
-installation of the module in the current directory, be it a CPAN
-module or not.
-
-The typical usage case is for private modules or working copies of
-projects from remote repositories on the local disk.
-
-=head2 Redirection
-
-The usual shell redirection symbols C< | > and C<< > >> are recognized
-by the cpan shell B<only when surrounded by whitespace>. So piping to
-pager or redirecting output into a file works somewhat as in a normal
-shell, with the stipulation that you must type extra spaces.
-
-=head1 CONFIGURATION
-
-When the CPAN module is used for the first time, a configuration
-dialogue tries to determine a couple of site specific options. The
-result of the dialog is stored in a hash reference C< $CPAN::Config >
-in a file CPAN/Config.pm.
-
-Default values defined in the CPAN/Config.pm file can be
-overridden in a user specific file: CPAN/MyConfig.pm. Such a file is
-best placed in C<$HOME/.cpan/CPAN/MyConfig.pm>, because C<$HOME/.cpan> is
-added to the search path of the CPAN module before the use() or
-require() statements. The mkmyconfig command writes this file for you.
-
-The C<o conf> command has various bells and whistles:
-
-=over
-
-=item completion support
-
-If you have a ReadLine module installed, you can hit TAB at any point
-of the commandline and C<o conf> will offer you completion for the
-built-in subcommands and/or config variable names.
-
-=item displaying some help: o conf help
-
-Displays a short help
-
-=item displaying current values: o conf [KEY]
-
-Displays the current value(s) for this config variable. Without KEY,
-displays all subcommands and config variables.
-
-Example:
-
- o conf shell
-
-If KEY starts and ends with a slash, the string in between is
-treated as a regular expression and only keys matching this regex
-are displayed
-
-Example:
-
- o conf /color/
-
-=item changing of scalar values: o conf KEY VALUE
-
-Sets the config variable KEY to VALUE. The empty string can be
-specified as usual in shells, with C<''> or C<"">
-
-Example:
-
- o conf wget /usr/bin/wget
-
-=item changing of list values: o conf KEY SHIFT|UNSHIFT|PUSH|POP|SPLICE|LIST
-
-If a config variable name ends with C<list>, it is a list. C<o conf
-KEY shift> removes the first element of the list, C<o conf KEY pop>
-removes the last element of the list. C<o conf KEYS unshift LIST>
-prepends a list of values to the list, C<o conf KEYS push LIST>
-appends a list of valued to the list.
-
-Likewise, C<o conf KEY splice LIST> passes the LIST to the corresponding
-splice command.
-
-Finally, any other list of arguments is taken as a new list value for
-the KEY variable discarding the previous value.
-
-Examples:
-
- o conf urllist unshift http://cpan.dev.local/CPAN
- o conf urllist splice 3 1
- o conf urllist http://cpan1.local http://cpan2.local ftp://ftp.perl.org
-
-=item reverting to saved: o conf defaults
-
-Reverts all config variables to the state in the saved config file.
-
-=item saving the config: o conf commit
-
-Saves all config variables to the current config file (CPAN/Config.pm
-or CPAN/MyConfig.pm that was loaded at start).
-
-=back
-
-The configuration dialog can be started any time later again by
-issuing the command C< o conf init > in the CPAN shell. A subset of
-the configuration dialog can be run by issuing C<o conf init WORD>
-where WORD is any valid config variable or a regular expression.
-
-=head2 Config Variables
-
-The following keys in the hash reference $CPAN::Config are
-currently defined:
-
- applypatch path to external prg
- auto_commit commit all changes to config variables to disk
- build_cache size of cache for directories to build modules
- build_dir locally accessible directory to build modules
- build_dir_reuse boolean if distros in build_dir are persistent
- build_requires_install_policy
- to install or not to install when a module is
- only needed for building. yes|no|ask/yes|ask/no
- bzip2 path to external prg
- cache_metadata use serializer to cache metadata
- check_sigs if signatures should be verified
- colorize_debug Term::ANSIColor attributes for debugging output
- colorize_output boolean if Term::ANSIColor should colorize output
- colorize_print Term::ANSIColor attributes for normal output
- colorize_warn Term::ANSIColor attributes for warnings
- commandnumber_in_prompt
- boolean if you want to see current command number
- commands_quote preferred character to use for quoting external
- commands when running them. Defaults to double
- quote on Windows, single tick everywhere else;
- can be set to space to disable quoting
- connect_to_internet_ok
- whether to ask if opening a connection is ok before
- urllist is specified
- cpan_home local directory reserved for this package
- curl path to external prg
- dontload_hash DEPRECATED
- dontload_list arrayref: modules in the list will not be
- loaded by the CPAN::has_inst() routine
- ftp path to external prg
- ftp_passive if set, the envariable FTP_PASSIVE is set for downloads
- ftp_proxy proxy host for ftp requests
- ftpstats_period max number of days to keep download statistics
- ftpstats_size max number of items to keep in the download statistics
- getcwd see below
- gpg path to external prg
- gzip location of external program gzip
- halt_on_failure stop processing after the first failure of queued
- items or dependencies
- histfile file to maintain history between sessions
- histsize maximum number of lines to keep in histfile
- http_proxy proxy host for http requests
- inactivity_timeout breaks interactive Makefile.PLs or Build.PLs
- after this many seconds inactivity. Set to 0 to
- disable timeouts.
- index_expire refetch index files after this many days
- inhibit_startup_message
- if true, suppress the startup message
- keep_source_where directory in which to keep the source (if we do)
- load_module_verbosity
- report loading of optional modules used by CPAN.pm
- lynx path to external prg
- make location of external make program
- make_arg arguments that should always be passed to 'make'
- make_install_make_command
- the make command for running 'make install', for
- example 'sudo make'
- make_install_arg same as make_arg for 'make install'
- makepl_arg arguments passed to 'perl Makefile.PL'
- mbuild_arg arguments passed to './Build'
- mbuild_install_arg arguments passed to './Build install'
- mbuild_install_build_command
- command to use instead of './Build' when we are
- in the install stage, for example 'sudo ./Build'
- mbuildpl_arg arguments passed to 'perl Build.PL'
- ncftp path to external prg
- ncftpget path to external prg
- no_proxy don't proxy to these hosts/domains (comma separated list)
- pager location of external program more (or any pager)
- password your password if you CPAN server wants one
- patch path to external prg
- patches_dir local directory containing patch files
- perl5lib_verbosity verbosity level for PERL5LIB additions
- prefer_installer legal values are MB and EUMM: if a module comes
- with both a Makefile.PL and a Build.PL, use the
- former (EUMM) or the latter (MB); if the module
- comes with only one of the two, that one will be
- used no matter the setting
- prerequisites_policy
- what to do if you are missing module prerequisites
- ('follow' automatically, 'ask' me, or 'ignore')
- prefs_dir local directory to store per-distro build options
- proxy_user username for accessing an authenticating proxy
- proxy_pass password for accessing an authenticating proxy
- randomize_urllist add some randomness to the sequence of the urllist
- scan_cache controls scanning of cache ('atstart' or 'never')
- shell your favorite shell
- show_unparsable_versions
- boolean if r command tells which modules are versionless
- show_upload_date boolean if commands should try to determine upload date
- show_zero_versions boolean if r command tells for which modules $version==0
- tar location of external program tar
- tar_verbosity verbosity level for the tar command
- term_is_latin deprecated: if true Unicode is translated to ISO-8859-1
- (and nonsense for characters outside latin range)
- term_ornaments boolean to turn ReadLine ornamenting on/off
- test_report email test reports (if CPAN::Reporter is installed)
- trust_test_report_history
- skip testing when previously tested ok (according to
- CPAN::Reporter history)
- unzip location of external program unzip
- urllist arrayref to nearby CPAN sites (or equivalent locations)
- use_sqlite use CPAN::SQLite for metadata storage (fast and lean)
- username your username if you CPAN server wants one
- wait_list arrayref to a wait server to try (See CPAN::WAIT)
- wget path to external prg
- yaml_load_code enable YAML code deserialisation via CPAN::DeferredCode
- yaml_module which module to use to read/write YAML files
-
-You can set and query each of these options interactively in the cpan
-shell with the C<o conf> or the C<o conf init> command as specified below.
-
-=over 2
-
-=item C<o conf E<lt>scalar optionE<gt>>
-
-prints the current value of the I<scalar option>
-
-=item C<o conf E<lt>scalar optionE<gt> E<lt>valueE<gt>>
-
-Sets the value of the I<scalar option> to I<value>
-
-=item C<o conf E<lt>list optionE<gt>>
-
-prints the current value of the I<list option> in MakeMaker's
-neatvalue format.
-
-=item C<o conf E<lt>list optionE<gt> [shift|pop]>
-
-shifts or pops the array in the I<list option> variable
-
-=item C<o conf E<lt>list optionE<gt> [unshift|push|splice] E<lt>listE<gt>>
-
-works like the corresponding perl commands.
-
-=item interactive editing: o conf init [MATCH|LIST]
-
-Runs an interactive configuration dialog for matching variables.
-Without argument runs the dialog over all supported config variables.
-To specify a MATCH the argument must be enclosed by slashes.
-
-Examples:
-
- o conf init ftp_passive ftp_proxy
- o conf init /color/
-
-Note: this method of setting config variables often provides more
-explanation about the functioning of a variable than the manpage.
-
-=back
-
-=head2 CPAN::anycwd($path): Note on config variable getcwd
-
-CPAN.pm changes the current working directory often and needs to
-determine its own current working directory. By default it uses
-Cwd::cwd, but if for some reason this doesn't work on your system,
-configure alternatives according to the following table:
-
-=over 4
-
-=item cwd
-
-Calls Cwd::cwd
-
-=item getcwd
-
-Calls Cwd::getcwd
-
-=item fastcwd
-
-Calls Cwd::fastcwd
-
-=item backtickcwd
-
-Calls the external command cwd.
-
-=back
-
-=head2 Note on the format of the urllist parameter
-
-urllist parameters are URLs according to RFC 1738. We do a little
-guessing if your URL is not compliant, but if you have problems with
-C<file> URLs, please try the correct format. Either:
-
- file://localhost/whatever/ftp/pub/CPAN/
-
-or
-
- file:///home/ftp/pub/CPAN/
-
-=head2 The urllist parameter has CD-ROM support
-
-The C<urllist> parameter of the configuration table contains a list of
-URLs used for downloading. If the list contains any
-C<file> URLs, CPAN always tries there first. This
-feature is disabled for index files. So the recommendation for the
-owner of a CD-ROM with CPAN contents is: include your local, possibly
-outdated CD-ROM as a C<file> URL at the end of urllist, e.g.
-
- o conf urllist push file://localhost/CDROM/CPAN
-
-CPAN.pm will then fetch the index files from one of the CPAN sites
-that come at the beginning of urllist. It will later check for each
-module to see whether there is a local copy of the most recent version.
-
-Another peculiarity of urllist is that the site that we could
-successfully fetch the last file from automatically gets a preference
-token and is tried as the first site for the next request. So if you
-add a new site at runtime it may happen that the previously preferred
-site will be tried another time. This means that if you want to disallow
-a site for the next transfer, it must be explicitly removed from
-urllist.
-
-=head2 Maintaining the urllist parameter
-
-If you have YAML.pm (or some other YAML module configured in
-C<yaml_module>) installed, CPAN.pm collects a few statistical data
-about recent downloads. You can view the statistics with the C<hosts>
-command or inspect them directly by looking into the C<FTPstats.yml>
-file in your C<cpan_home> directory.
-
-To get some interesting statistics, it is recommended that
-C<randomize_urllist> be set; this introduces some amount of
-randomness into the URL selection.
-
-=head2 The C<requires> and C<build_requires> dependency declarations
-
-Since CPAN.pm version 1.88_51 modules declared as C<build_requires> by
-a distribution are treated differently depending on the config
-variable C<build_requires_install_policy>. By setting
-C<build_requires_install_policy> to C<no>, such a module is not
-installed. It is only built and tested, and then kept in the list of
-tested but uninstalled modules. As such, it is available during the
-build of the dependent module by integrating the path to the
-C<blib/arch> and C<blib/lib> directories in the environment variable
-PERL5LIB. If C<build_requires_install_policy> is set ti C<yes>, then
-both modules declared as C<requires> and those declared as
-C<build_requires> are treated alike. By setting to C<ask/yes> or
-C<ask/no>, CPAN.pm asks the user and sets the default accordingly.
-
-=head2 Configuration for individual distributions (I<Distroprefs>)
-
-(B<Note:> This feature has been introduced in CPAN.pm 1.8854 and is
-still considered beta quality)
-
-Distributions on CPAN usually behave according to what we call the
-CPAN mantra. Or since the advent of Module::Build we should talk about
-two mantras:
-
- perl Makefile.PL perl Build.PL
- make ./Build
- make test ./Build test
- make install ./Build install
-
-But some modules cannot be built with this mantra. They try to get
-some extra data from the user via the environment, extra arguments, or
-interactively--thus disturbing the installation of large bundles like
-Phalanx100 or modules with many dependencies like Plagger.
-
-The distroprefs system of C<CPAN.pm> addresses this problem by
-allowing the user to specify extra informations and recipes in YAML
-files to either
-
-=over
-
-=item
-
-pass additional arguments to one of the four commands,
-
-=item
-
-set environment variables
-
-=item
-
-instantiate an Expect object that reads from the console, waits for
-some regular expressions and enters some answers
-
-=item
-
-temporarily override assorted C<CPAN.pm> configuration variables
-
-=item
-
-specify dependencies the original maintainer forgot
-
-=item
-
-disable the installation of an object altogether
-
-=back
-
-See the YAML and Data::Dumper files that come with the C<CPAN.pm>
-distribution in the C<distroprefs/> directory for examples.
-
-=head2 Filenames
-
-The YAML files themselves must have the C<.yml> extension; all other
-files are ignored (for two exceptions see I<Fallback Data::Dumper and
-Storable> below). The containing directory can be specified in
-C<CPAN.pm> in the C<prefs_dir> config variable. Try C<o conf init
-prefs_dir> in the CPAN shell to set and activate the distroprefs
-system.
-
-Every YAML file may contain arbitrary documents according to the YAML
-specification, and every document is treated as an entity that
-can specify the treatment of a single distribution.
-
-Filenames can be picked arbitrarily; C<CPAN.pm> always reads
-all files (in alphabetical order) and takes the key C<match> (see
-below in I<Language Specs>) as a hashref containing match criteria
-that determine if the current distribution matches the YAML document
-or not.
-
-=head2 Fallback Data::Dumper and Storable
-
-If neither your configured C<yaml_module> nor YAML.pm is installed,
-CPAN.pm falls back to using Data::Dumper and Storable and looks for
-files with the extensions C<.dd> or C<.st> in the C<prefs_dir>
-directory. These files are expected to contain one or more hashrefs.
-For Data::Dumper generated files, this is expected to be done with by
-defining C<$VAR1>, C<$VAR2>, etc. The YAML shell would produce these
-with the command
-
- ysh < somefile.yml > somefile.dd
-
-For Storable files the rule is that they must be constructed such that
-C<Storable::retrieve(file)> returns an array reference and the array
-elements represent one distropref object each. The conversion from
-YAML would look like so:
-
- perl -MYAML=LoadFile -MStorable=nstore -e '
- @y=LoadFile(shift);
- nstore(\@y, shift)' somefile.yml somefile.st
-
-In bootstrapping situations it is usually sufficient to translate only
-a few YAML files to Data::Dumper for crucial modules like
-C<YAML::Syck>, C<YAML.pm> and C<Expect.pm>. If you prefer Storable
-over Data::Dumper, remember to pull out a Storable version that writes
-an older format than all the other Storable versions that will need to
-read them.
-
-=head2 Blueprint
-
-The following example contains all supported keywords and structures
-with the exception of C<eexpect> which can be used instead of
-C<expect>.
-
- ---
- comment: "Demo"
- match:
- module: "Dancing::Queen"
- distribution: "^CHACHACHA/Dancing-"
- not_distribution: "\.zip$"
- perl: "/usr/local/cariba-perl/bin/perl"
- perlconfig:
- archname: "freebsd"
- not_cc: "gcc"
- env:
- DANCING_FLOOR: "Shubiduh"
- disabled: 1
- cpanconfig:
- make: gmake
- pl:
- args:
- - "--somearg=specialcase"
-
- env: {}
-
- expect:
- - "Which is your favorite fruit"
- - "apple\n"
-
- make:
- args:
- - all
- - extra-all
-
- env: {}
-
- expect: []
-
- commendline: "echo SKIPPING make"
-
- test:
- args: []
-
- env: {}
-
- expect: []
-
- install:
- args: []
-
- env:
- WANT_TO_INSTALL: YES
-
- expect:
- - "Do you really want to install"
- - "y\n"
-
- patches:
- - "ABCDE/Fedcba-3.14-ABCDE-01.patch"
-
- depends:
- configure_requires:
- LWP: 5.8
- build_requires:
- Test::Exception: 0.25
- requires:
- Spiffy: 0.30
-
-
-=head2 Language Specs
-
-Every YAML document represents a single hash reference. The valid keys
-in this hash are as follows:
-
-=over
-
-=item comment [scalar]
-
-A comment
-
-=item cpanconfig [hash]
-
-Temporarily override assorted C<CPAN.pm> configuration variables.
-
-Supported are: C<build_requires_install_policy>, C<check_sigs>,
-C<make>, C<make_install_make_command>, C<prefer_installer>,
-C<test_report>. Please report as a bug when you need another one
-supported.
-
-=item depends [hash] *** EXPERIMENTAL FEATURE ***
-
-All three types, namely C<configure_requires>, C<build_requires>, and
-C<requires> are supported in the way specified in the META.yml
-specification. The current implementation I<merges> the specified
-dependencies with those declared by the package maintainer. In a
-future implementation this may be changed to override the original
-declaration.
-
-=item disabled [boolean]
-
-Specifies that this distribution shall not be processed at all.
-
-=item features [array] *** EXPERIMENTAL FEATURE ***
-
-Experimental implementation to deal with optional_features from
-META.yml. Still needs coordination with installer software and
-currently works only for META.yml declaring C<dynamic_config=0>. Use
-with caution.
-
-=item goto [string]
-
-The canonical name of a delegate distribution to install
-instead. Useful when a new version, although it tests OK itself,
-breaks something else or a developer release or a fork is already
-uploaded that is better than the last released version.
-
-=item install [hash]
-
-Processing instructions for the C<make install> or C<./Build install>
-phase of the CPAN mantra. See below under I<Processing Instructions>.
-
-=item make [hash]
-
-Processing instructions for the C<make> or C<./Build> phase of the
-CPAN mantra. See below under I<Processing Instructions>.
-
-=item match [hash]
-
-A hashref with one or more of the keys C<distribution>, C<modules>,
-C<perl>, C<perlconfig>, and C<env> that specify whether a document is
-targeted at a specific CPAN distribution or installation.
-Keys prefixed with C<not_> negates the corresponding match.
-
-The corresponding values are interpreted as regular expressions. The
-C<distribution> related one will be matched against the canonical
-distribution name, e.g. "AUTHOR/Foo-Bar-3.14.tar.gz".
-
-The C<module> related one will be matched against I<all> modules
-contained in the distribution until one module matches.
-
-The C<perl> related one will be matched against C<$^X> (but with the
-absolute path).
-
-The value associated with C<perlconfig> is itself a hashref that is
-matched against corresponding values in the C<%Config::Config> hash
-living in the C<Config.pm> module.
-Keys prefixed with C<not_> negates the corresponding match.
-
-The value associated with C<env> is itself a hashref that is
-matched against corresponding values in the C<%ENV> hash.
-Keys prefixed with C<not_> negates the corresponding match.
-
-If more than one restriction of C<module>, C<distribution>, etc. is
-specified, the results of the separately computed match values must
-all match. If so, the hashref represented by the
-YAML document is returned as the preference structure for the current
-distribution.
-
-=item patches [array]
-
-An array of patches on CPAN or on the local disk to be applied in
-order via an external patch program. If the value for the C<-p>
-parameter is C<0> or C<1> is determined by reading the patch
-beforehand. The path to each patch is either an absolute path on the
-local filesystem or relative to a patch directory specified in the
-C<patches_dir> configuration variable or in the format of a canonical
-distroname. For examples please consult the distroprefs/ directory in
-the CPAN.pm distribution (these examples are not installed by
-default).
-
-Note: if the C<applypatch> program is installed and C<CPAN::Config>
-knows about it B<and> a patch is written by the C<makepatch> program,
-then C<CPAN.pm> lets C<applypatch> apply the patch. Both C<makepatch>
-and C<applypatch> are available from CPAN in the C<JV/makepatch-*>
-distribution.
-
-=item pl [hash]
-
-Processing instructions for the C<perl Makefile.PL> or C<perl
-Build.PL> phase of the CPAN mantra. See below under I<Processing
-Instructions>.
-
-=item test [hash]
-
-Processing instructions for the C<make test> or C<./Build test> phase
-of the CPAN mantra. See below under I<Processing Instructions>.
-
-=back
-
-=head2 Processing Instructions
-
-=over
-
-=item args [array]
-
-Arguments to be added to the command line
-
-=item commandline
-
-A full commandline to run via C<system()>.
-During execution, the environment variable PERL is set
-to $^X (but with an absolute path). If C<commandline> is specified,
-C<args> is not used.
-
-=item eexpect [hash]
-
-Extended C<expect>. This is a hash reference with four allowed keys,
-C<mode>, C<timeout>, C<reuse>, and C<talk>.
-
-C<mode> may have the values C<deterministic> for the case where all
-questions come in the order written down and C<anyorder> for the case
-where the questions may come in any order. The default mode is
-C<deterministic>.
-
-C<timeout> denotes a timeout in seconds. Floating-point timeouts are
-OK. With C<mode=deterministic>, the timeout denotes the
-timeout per question; with C<mode=anyorder> it denotes the
-timeout per byte received from the stream or questions.
-
-C<talk> is a reference to an array that contains alternating questions
-and answers. Questions are regular expressions and answers are literal
-strings. The Expect module watches the stream from the
-execution of the external program (C<perl Makefile.PL>, C<perl
-Build.PL>, C<make>, etc.).
-
-For C<mode=deterministic>, the CPAN.pm injects the
-corresponding answer as soon as the stream matches the regular expression.
-
-For C<mode=anyorder> CPAN.pm answers a question as soon
-as the timeout is reached for the next byte in the input stream. In
-this mode you can use the C<reuse> parameter to decide what will
-happen with a question-answer pair after it has been used. In the
-default case (reuse=0) it is removed from the array, avoiding being
-used again accidentally. If you want to answer the
-question C<Do you really want to do that> several times, then it must
-be included in the array at least as often as you want this answer to
-be given. Setting the parameter C<reuse> to 1 makes this repetition
-unnecessary.
-
-=item env [hash]
-
-Environment variables to be set during the command
-
-=item expect [array]
-
-C<< expect: <array> >> is a short notation for
-
-eexpect:
- mode: deterministic
- timeout: 15
- talk: <array>
-
-=back
-
-=head2 Schema verification with C<Kwalify>
-
-If you have the C<Kwalify> module installed (which is part of the
-Bundle::CPANxxl), then all your distroprefs files are checked for
-syntactic correctness.
-
-=head2 Example Distroprefs Files
-
-C<CPAN.pm> comes with a collection of example YAML files. Note that these
-are really just examples and should not be used without care because
-they cannot fit everybody's purpose. After all, the authors of the
-packages that ask questions had a need to ask, so you should watch
-their questions and adjust the examples to your environment and your
-needs. You have been warned:-)
-
-=head1 PROGRAMMER'S INTERFACE
-
-If you do not enter the shell, shell commands are
-available both as methods (C<CPAN::Shell-E<gt>install(...)>) and as
-functions in the calling package (C<install(...)>). Before calling low-level
-commands, it makes sense to initialize components of CPAN you need, e.g.:
-
- CPAN::HandleConfig->load;
- CPAN::Shell::setup_output;
- CPAN::Index->reload;
-
-High-level commands do such initializations automatically.
-
-There's currently only one class that has a stable interface -
-CPAN::Shell. All commands that are available in the CPAN shell are
-methods of the class CPAN::Shell. Each of the commands that produce
-listings of modules (C<r>, C<autobundle>, C<u>) also return a list of
-the IDs of all modules within the list.
-
-=over 2
-
-=item expand($type, at things)
-
-The IDs of all objects available within a program are strings that can
-be expanded to the corresponding real objects with the
-C<CPAN::Shell-E<gt>expand("Module", at things)> method. Expand returns a
-list of CPAN::Module objects according to the C<@things> arguments
-given. In scalar context, it returns only the first element of the
-list.
-
-=item expandany(@things)
-
-Like expand, but returns objects of the appropriate type, i.e.
-CPAN::Bundle objects for bundles, CPAN::Module objects for modules, and
-CPAN::Distribution objects for distributions. Note: it does not expand
-to CPAN::Author objects.
-
-=item Programming Examples
-
-This enables the programmer to do operations that combine
-functionalities that are available in the shell.
-
- # install everything that is outdated on my disk:
- perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)'
-
- # install my favorite programs if necessary:
- for $mod (qw(Net::FTP Digest::SHA Data::Dumper)) {
- CPAN::Shell->install($mod);
- }
-
- # list all modules on my disk that have no VERSION number
- for $mod (CPAN::Shell->expand("Module","/./")) {
- next unless $mod->inst_file;
- # MakeMaker convention for undefined $VERSION:
- next unless $mod->inst_version eq "undef";
- print "No VERSION in ", $mod->id, "\n";
- }
-
- # find out which distribution on CPAN contains a module:
- print CPAN::Shell->expand("Module","Apache::Constants")->cpan_file
-
-Or if you want to schedule a I<cron> job to watch CPAN, you could list
-all modules that need updating. First a quick and dirty way:
-
- perl -e 'use CPAN; CPAN::Shell->r;'
-
-If you don't want any output should all modules be
-up to date, parse the output of above command for the regular
-expression C</modules are up to date/> and decide to mail the output
-only if it doesn't match.
-
-If you prefer to do it more in a programmerish style in one single
-process, something like this may better suit you:
-
- # list all modules on my disk that have newer versions on CPAN
- for $mod (CPAN::Shell->expand("Module","/./")) {
- next unless $mod->inst_file;
- next if $mod->uptodate;
- printf "Module %s is installed as %s, could be updated to %s from CPAN\n",
- $mod->id, $mod->inst_version, $mod->cpan_version;
- }
-
-If that gives too much output every day, you may want to
-watch only for three modules. You can write
-
- for $mod (CPAN::Shell->expand("Module","/Apache|LWP|CGI/")) {
-
-as the first line instead. Or you can combine some of the above
-tricks:
-
- # watch only for a new mod_perl module
- $mod = CPAN::Shell->expand("Module","mod_perl");
- exit if $mod->uptodate;
- # new mod_perl arrived, let me know all update recommendations
- CPAN::Shell->r;
-
-=back
-
-=head2 Methods in the other Classes
-
-=over 4
-
-=item CPAN::Author::as_glimpse()
-
-Returns a one-line description of the author
-
-=item CPAN::Author::as_string()
-
-Returns a multi-line description of the author
-
-=item CPAN::Author::email()
-
-Returns the author's email address
-
-=item CPAN::Author::fullname()
-
-Returns the author's name
-
-=item CPAN::Author::name()
-
-An alias for fullname
-
-=item CPAN::Bundle::as_glimpse()
-
-Returns a one-line description of the bundle
-
-=item CPAN::Bundle::as_string()
-
-Returns a multi-line description of the bundle
-
-=item CPAN::Bundle::clean()
-
-Recursively runs the C<clean> method on all items contained in the bundle.
-
-=item CPAN::Bundle::contains()
-
-Returns a list of objects' IDs contained in a bundle. The associated
-objects may be bundles, modules or distributions.
-
-=item CPAN::Bundle::force($method, at args)
-
-Forces CPAN to perform a task that it normally would have refused to
-do. Force takes as arguments a method name to be called and any number
-of additional arguments that should be passed to the called method.
-The internals of the object get the needed changes so that CPAN.pm
-does not refuse to take the action. The C<force> is passed recursively
-to all contained objects. See also the section above on the C<force>
-and the C<fforce> pragma.
-
-=item CPAN::Bundle::get()
-
-Recursively runs the C<get> method on all items contained in the bundle
-
-=item CPAN::Bundle::inst_file()
-
-Returns the highest installed version of the bundle in either @INC or
-C<$CPAN::Config->{cpan_home}>. Note that this is different from
-CPAN::Module::inst_file.
-
-=item CPAN::Bundle::inst_version()
-
-Like CPAN::Bundle::inst_file, but returns the $VERSION
-
-=item CPAN::Bundle::uptodate()
-
-Returns 1 if the bundle itself and all its members are uptodate.
-
-=item CPAN::Bundle::install()
-
-Recursively runs the C<install> method on all items contained in the bundle
-
-=item CPAN::Bundle::make()
-
-Recursively runs the C<make> method on all items contained in the bundle
-
-=item CPAN::Bundle::readme()
-
-Recursively runs the C<readme> method on all items contained in the bundle
-
-=item CPAN::Bundle::test()
-
-Recursively runs the C<test> method on all items contained in the bundle
-
-=item CPAN::Distribution::as_glimpse()
-
-Returns a one-line description of the distribution
-
-=item CPAN::Distribution::as_string()
-
-Returns a multi-line description of the distribution
-
-=item CPAN::Distribution::author
-
-Returns the CPAN::Author object of the maintainer who uploaded this
-distribution
-
-=item CPAN::Distribution::pretty_id()
-
-Returns a string of the form "AUTHORID/TARBALL", where AUTHORID is the
-author's PAUSE ID and TARBALL is the distribution filename.
-
-=item CPAN::Distribution::base_id()
-
-Returns the distribution filename without any archive suffix. E.g
-"Foo-Bar-0.01"
-
-=item CPAN::Distribution::clean()
-
-Changes to the directory where the distribution has been unpacked and
-runs C<make clean> there.
-
-=item CPAN::Distribution::containsmods()
-
-Returns a list of IDs of modules contained in a distribution file.
-Works only for distributions listed in the 02packages.details.txt.gz
-file. This typically means that just most recent version of a
-distribution is covered.
-
-=item CPAN::Distribution::cvs_import()
-
-Changes to the directory where the distribution has been unpacked and
-runs something like
-
- cvs -d $cvs_root import -m $cvs_log $cvs_dir $userid v$version
-
-there.
-
-=item CPAN::Distribution::dir()
-
-Returns the directory into which this distribution has been unpacked.
-
-=item CPAN::Distribution::force($method, at args)
-
-Forces CPAN to perform a task that it normally would have refused to
-do. Force takes as arguments a method name to be called and any number
-of additional arguments that should be passed to the called method.
-The internals of the object get the needed changes so that CPAN.pm
-does not refuse to take the action. See also the section above on the
-C<force> and the C<fforce> pragma.
-
-=item CPAN::Distribution::get()
-
-Downloads the distribution from CPAN and unpacks it. Does nothing if
-the distribution has already been downloaded and unpacked within the
-current session.
-
-=item CPAN::Distribution::install()
-
-Changes to the directory where the distribution has been unpacked and
-runs the external command C<make install> there. If C<make> has not
-yet been run, it will be run first. A C<make test> is issued in
-any case and if this fails, the install is cancelled. The
-cancellation can be avoided by letting C<force> run the C<install> for
-you.
-
-This install method only has the power to install the distribution if
-there are no dependencies in the way. To install an object along with all
-its dependencies, use CPAN::Shell->install.
-
-Note that install() gives no meaningful return value. See uptodate().
-
-=item CPAN::Distribution::install_tested()
-
-Install all distributions that have tested sucessfully but
-not yet installed. See also C<is_tested>.
-
-=item CPAN::Distribution::isa_perl()
-
-Returns 1 if this distribution file seems to be a perl distribution.
-Normally this is derived from the file name only, but the index from
-CPAN can contain a hint to achieve a return value of true for other
-filenames too.
-
-=item CPAN::Distribution::look()
-
-Changes to the directory where the distribution has been unpacked and
-opens a subshell there. Exiting the subshell returns.
-
-=item CPAN::Distribution::make()
-
-First runs the C<get> method to make sure the distribution is
-downloaded and unpacked. Changes to the directory where the
-distribution has been unpacked and runs the external commands C<perl
-Makefile.PL> or C<perl Build.PL> and C<make> there.
-
-=item CPAN::Distribution::perldoc()
-
-Downloads the pod documentation of the file associated with a
-distribution (in HTML format) and runs it through the external
-command I<lynx> specified in C<$CPAN::Config->{lynx}>. If I<lynx>
-isn't available, it converts it to plain text with the external
-command I<html2text> and runs it through the pager specified
-in C<$CPAN::Config->{pager}>
-
-=item CPAN::Distribution::prefs()
-
-Returns the hash reference from the first matching YAML file that the
-user has deposited in the C<prefs_dir/> directory. The first
-succeeding match wins. The files in the C<prefs_dir/> are processed
-alphabetically, and the canonical distroname (e.g.
-AUTHOR/Foo-Bar-3.14.tar.gz) is matched against the regular expressions
-stored in the $root->{match}{distribution} attribute value.
-Additionally all module names contained in a distribution are matched
-against the regular expressions in the $root->{match}{module} attribute
-value. The two match values are ANDed together. Each of the two
-attributes are optional.
-
-=item CPAN::Distribution::prereq_pm()
-
-Returns the hash reference that has been announced by a distribution
-as the C<requires> and C<build_requires> elements. These can be
-declared either by the C<META.yml> (if authoritative) or can be
-deposited after the run of C<Build.PL> in the file C<./_build/prereqs>
-or after the run of C<Makfile.PL> written as the C<PREREQ_PM> hash in
-a comment in the produced C<Makefile>. I<Note>: this method only works
-after an attempt has been made to C<make> the distribution. Returns
-undef otherwise.
-
-=item CPAN::Distribution::readme()
-
-Downloads the README file associated with a distribution and runs it
-through the pager specified in C<$CPAN::Config->{pager}>.
-
-=item CPAN::Distribution::reports()
-
-Downloads report data for this distribution from www.cpantesters.org
-and displays a subset of them.
-
-=item CPAN::Distribution::read_yaml()
-
-Returns the content of the META.yml of this distro as a hashref. Note:
-works only after an attempt has been made to C<make> the distribution.
-Returns undef otherwise. Also returns undef if the content of META.yml
-is not authoritative. (The rules about what exactly makes the content
-authoritative are still in flux.)
-
-=item CPAN::Distribution::test()
-
-Changes to the directory where the distribution has been unpacked and
-runs C<make test> there.
-
-=item CPAN::Distribution::uptodate()
-
-Returns 1 if all the modules contained in the distribution are
-uptodate. Relies on containsmods.
-
-=item CPAN::Index::force_reload()
-
-Forces a reload of all indices.
-
-=item CPAN::Index::reload()
-
-Reloads all indices if they have not been read for more than
-C<$CPAN::Config->{index_expire}> days.
-
-=item CPAN::InfoObj::dump()
-
-CPAN::Author, CPAN::Bundle, CPAN::Module, and CPAN::Distribution
-inherit this method. It prints the data structure associated with an
-object. Useful for debugging. Note: the data structure is considered
-internal and thus subject to change without notice.
-
-=item CPAN::Module::as_glimpse()
-
-Returns a one-line description of the module in four columns: The
-first column contains the word C<Module>, the second column consists
-of one character: an equals sign if this module is already installed
-and uptodate, a less-than sign if this module is installed but can be
-upgraded, and a space if the module is not installed. The third column
-is the name of the module and the fourth column gives maintainer or
-distribution information.
-
-=item CPAN::Module::as_string()
-
-Returns a multi-line description of the module
-
-=item CPAN::Module::clean()
-
-Runs a clean on the distribution associated with this module.
-
-=item CPAN::Module::cpan_file()
-
-Returns the filename on CPAN that is associated with the module.
-
-=item CPAN::Module::cpan_version()
-
-Returns the latest version of this module available on CPAN.
-
-=item CPAN::Module::cvs_import()
-
-Runs a cvs_import on the distribution associated with this module.
-
-=item CPAN::Module::description()
-
-Returns a 44 character description of this module. Only available for
-modules listed in The Module List (CPAN/modules/00modlist.long.html
-or 00modlist.long.txt.gz)
-
-=item CPAN::Module::distribution()
-
-Returns the CPAN::Distribution object that contains the current
-version of this module.
-
-=item CPAN::Module::dslip_status()
-
-Returns a hash reference. The keys of the hash are the letters C<D>,
-C<S>, C<L>, C<I>, and <P>, for development status, support level,
-language, interface and public licence respectively. The data for the
-DSLIP status are collected by pause.perl.org when authors register
-their namespaces. The values of the 5 hash elements are one-character
-words whose meaning is described in the table below. There are also 5
-hash elements C<DV>, C<SV>, C<LV>, C<IV>, and <PV> that carry a more
-verbose value of the 5 status variables.
-
-Where the 'DSLIP' characters have the following meanings:
-
- D - Development Stage (Note: *NO IMPLIED TIMESCALES*):
- i - Idea, listed to gain consensus or as a placeholder
- c - under construction but pre-alpha (not yet released)
- a/b - Alpha/Beta testing
- R - Released
- M - Mature (no rigorous definition)
- S - Standard, supplied with Perl 5
-
- S - Support Level:
- m - Mailing-list
- d - Developer
- u - Usenet newsgroup comp.lang.perl.modules
- n - None known, try comp.lang.perl.modules
- a - abandoned; volunteers welcome to take over maintainance
-
- L - Language Used:
- p - Perl-only, no compiler needed, should be platform independent
- c - C and perl, a C compiler will be needed
- h - Hybrid, written in perl with optional C code, no compiler needed
- + - C++ and perl, a C++ compiler will be needed
- o - perl and another language other than C or C++
-
- I - Interface Style
- f - plain Functions, no references used
- h - hybrid, object and function interfaces available
- n - no interface at all (huh?)
- r - some use of unblessed References or ties
- O - Object oriented using blessed references and/or inheritance
-
- P - Public License
- p - Standard-Perl: user may choose between GPL and Artistic
- g - GPL: GNU General Public License
- l - LGPL: "GNU Lesser General Public License" (previously known as
- "GNU Library General Public License")
- b - BSD: The BSD License
- a - Artistic license alone
- 2 - Artistic license 2.0 or later
- o - open source: appoved by www.opensource.org
- d - allows distribution without restrictions
- r - restricted distribtion
- n - no license at all
-
-=item CPAN::Module::force($method, at args)
-
-Forces CPAN to perform a task it would normally refuse to
-do. Force takes as arguments a method name to be invoked and any number
-of additional arguments to pass that method.
-The internals of the object get the needed changes so that CPAN.pm
-does not refuse to take the action. See also the section above on the
-C<force> and the C<fforce> pragma.
-
-=item CPAN::Module::get()
-
-Runs a get on the distribution associated with this module.
-
-=item CPAN::Module::inst_file()
-
-Returns the filename of the module found in @INC. The first file found
-is reported, just as perl itself stops searching @INC once it finds a
-module.
-
-=item CPAN::Module::available_file()
-
-Returns the filename of the module found in PERL5LIB or @INC. The
-first file found is reported. The advantage of this method over
-C<inst_file> is that modules that have been tested but not yet
-installed are included because PERL5LIB keeps track of tested modules.
-
-=item CPAN::Module::inst_version()
-
-Returns the version number of the installed module in readable format.
-
-=item CPAN::Module::available_version()
-
-Returns the version number of the available module in readable format.
-
-=item CPAN::Module::install()
-
-Runs an C<install> on the distribution associated with this module.
-
-=item CPAN::Module::look()
-
-Changes to the directory where the distribution associated with this
-module has been unpacked and opens a subshell there. Exiting the
-subshell returns.
-
-=item CPAN::Module::make()
-
-Runs a C<make> on the distribution associated with this module.
-
-=item CPAN::Module::manpage_headline()
-
-If module is installed, peeks into the module's manpage, reads the
-headline, and returns it. Moreover, if the module has been downloaded
-within this session, does the equivalent on the downloaded module even
-if it hasn't been installed yet.
-
-=item CPAN::Module::perldoc()
-
-Runs a C<perldoc> on this module.
-
-=item CPAN::Module::readme()
-
-Runs a C<readme> on the distribution associated with this module.
-
-=item CPAN::Module::reports()
-
-Calls the reports() method on the associated distribution object.
-
-=item CPAN::Module::test()
-
-Runs a C<test> on the distribution associated with this module.
-
-=item CPAN::Module::uptodate()
-
-Returns 1 if the module is installed and up-to-date.
-
-=item CPAN::Module::userid()
-
-Returns the author's ID of the module.
-
-=back
-
-=head2 Cache Manager
-
-Currently the cache manager only keeps track of the build directory
-($CPAN::Config->{build_dir}). It is a simple FIFO mechanism that
-deletes complete directories below C<build_dir> as soon as the size of
-all directories there gets bigger than $CPAN::Config->{build_cache}
-(in MB). The contents of this cache may be used for later
-re-installations that you intend to do manually, but will never be
-trusted by CPAN itself. This is due to the fact that the user might
-use these directories for building modules on different architectures.
-
-There is another directory ($CPAN::Config->{keep_source_where}) where
-the original distribution files are kept. This directory is not
-covered by the cache manager and must be controlled by the user. If
-you choose to have the same directory as build_dir and as
-keep_source_where directory, then your sources will be deleted with
-the same fifo mechanism.
-
-=head2 Bundles
-
-A bundle is just a perl module in the namespace Bundle:: that does not
-define any functions or methods. It usually only contains documentation.
-
-It starts like a perl module with a package declaration and a $VERSION
-variable. After that the pod section looks like any other pod with the
-only difference being that I<one special pod section> exists starting with
-(verbatim):
-
- =head1 CONTENTS
-
-In this pod section each line obeys the format
-
- Module_Name [Version_String] [- optional text]
-
-The only required part is the first field, the name of a module
-(e.g. Foo::Bar, ie. I<not> the name of the distribution file). The rest
-of the line is optional. The comment part is delimited by a dash just
-as in the man page header.
-
-The distribution of a bundle should follow the same convention as
-other distributions.
-
-Bundles are treated specially in the CPAN package. If you say 'install
-Bundle::Tkkit' (assuming such a bundle exists), CPAN will install all
-the modules in the CONTENTS section of the pod. You can install your
-own Bundles locally by placing a conformant Bundle file somewhere into
-your @INC path. The autobundle() command which is available in the
-shell interface does that for you by including all currently installed
-modules in a snapshot bundle file.
-
-=head1 PREREQUISITES
-
-If you have a local mirror of CPAN and can access all files with
-"file:" URLs, then you only need a perl later than perl5.003 to run
-this module. Otherwise Net::FTP is strongly recommended. LWP may be
-required for non-UNIX systems, or if your nearest CPAN site is
-associated with a URL that is not C<ftp:>.
-
-If you have neither Net::FTP nor LWP, there is a fallback mechanism
-implemented for an external ftp command or for an external lynx
-command.
-
-=head1 UTILITIES
-
-=head2 Finding packages and VERSION
-
-This module presumes that all packages on CPAN
-
-=over 2
-
-=item *
-
-declare their $VERSION variable in an easy to parse manner. This
-prerequisite can hardly be relaxed because it consumes far too much
-memory to load all packages into the running program just to determine
-the $VERSION variable. Currently all programs that are dealing with
-version use something like this
-
- perl -MExtUtils::MakeMaker -le \
- 'print MM->parse_version(shift)' filename
-
-If you are author of a package and wonder if your $VERSION can be
-parsed, please try the above method.
-
-=item *
-
-come as compressed or gzipped tarfiles or as zip files and contain a
-C<Makefile.PL> or C<Build.PL> (well, we try to handle a bit more, but
-with little enthusiasm).
-
-=back
-
-=head2 Debugging
-
-Debugging this module is more than a bit complex due to interference from
-the software producing the indices on CPAN, the mirroring process on CPAN,
-packaging, configuration, synchronicity, and even (gasp!) due to bugs
-within the CPAN.pm module itself.
-
-For debugging the code of CPAN.pm itself in interactive mode, some
-debugging aid can be turned on for most packages within
-CPAN.pm with one of
-
-=over 2
-
-=item o debug package...
-
-sets debug mode for packages.
-
-=item o debug -package...
-
-unsets debug mode for packages.
-
-=item o debug all
-
-turns debugging on for all packages.
-
-=item o debug number
-
-=back
-
-which sets the debugging packages directly. Note that C<o debug 0>
-turns debugging off.
-
-What seems a successful strategy is the combination of C<reload
-cpan> and the debugging switches. Add a new debug statement while
-running in the shell and then issue a C<reload cpan> and see the new
-debugging messages immediately without losing the current context.
-
-C<o debug> without an argument lists the valid package names and the
-current set of packages in debugging mode. C<o debug> has built-in
-completion support.
-
-For debugging of CPAN data there is the C<dump> command which takes
-the same arguments as make/test/install and outputs each object's
-Data::Dumper dump. If an argument looks like a perl variable and
-contains one of C<$>, C<@> or C<%>, it is eval()ed and fed to
-Data::Dumper directly.
-
-=head2 Floppy, Zip, Offline Mode
-
-CPAN.pm works nicely without network access, too. If you maintain machines
-that are not networked at all, you should consider working with C<file:>
-URLs. You'll have to collect your modules somewhere first. So
-you might use CPAN.pm to put together all you need on a networked
-machine. Then copy the $CPAN::Config->{keep_source_where} (but not
-$CPAN::Config->{build_dir}) directory on a floppy. This floppy is kind
-of a personal CPAN. CPAN.pm on the non-networked machines works nicely
-with this floppy. See also below the paragraph about CD-ROM support.
-
-=head2 Basic Utilities for Programmers
-
-=over 2
-
-=item has_inst($module)
-
-Returns true if the module is installed. Used to load all modules into
-the running CPAN.pm that are considered optional. The config variable
-C<dontload_list> intercepts the C<has_inst()> call such
-that an optional module is not loaded despite being available. For
-example, the following command will prevent C<YAML.pm> from being
-loaded:
-
- cpan> o conf dontload_list push YAML
-
-See the source for details.
-
-=item has_usable($module)
-
-Returns true if the module is installed and in a usable state. Only
-useful for a handful of modules that are used internally. See the
-source for details.
-
-=item instance($module)
-
-The constructor for all the singletons used to represent modules,
-distributions, authors, and bundles. If the object already exists, this
-method returns the object; otherwise, it calls the constructor.
-
-=back
-
-=head1 SECURITY
-
-There's no strong security layer in CPAN.pm. CPAN.pm helps you to
-install foreign, unmasked, unsigned code on your machine. We compare
-to a checksum that comes from the net just as the distribution file
-itself. But we try to make it easy to add security on demand:
-
-=head2 Cryptographically signed modules
-
-Since release 1.77, CPAN.pm has been able to verify cryptographically
-signed module distributions using Module::Signature. The CPAN modules
-can be signed by their authors, thus giving more security. The simple
-unsigned MD5 checksums that were used before by CPAN protect mainly
-against accidental file corruption.
-
-You will need to have Module::Signature installed, which in turn
-requires that you have at least one of Crypt::OpenPGP module or the
-command-line F<gpg> tool installed.
-
-You will also need to be able to connect over the Internet to the public
-keyservers, like pgp.mit.edu, and their port 11731 (the HKP protocol).
-
-The configuration parameter check_sigs is there to turn signature
-checking on or off.
-
-=head1 EXPORT
-
-Most functions in package CPAN are exported by default. The reason
-for this is that the primary use is intended for the cpan shell or for
-one-liners.
-
-=head1 ENVIRONMENT
-
-When the CPAN shell enters a subshell via the look command, it sets
-the environment CPAN_SHELL_LEVEL to 1, or increments that variable if it is
-already set.
-
-When CPAN runs, it sets the environment variable PERL5_CPAN_IS_RUNNING
-to the ID of the running process. It also sets
-PERL5_CPANPLUS_IS_RUNNING to prevent runaway processes which could
-happen with older versions of Module::Install.
-
-When running C<perl Makefile.PL>, the environment variable
-C<PERL5_CPAN_IS_EXECUTING> is set to the full path of the
-C<Makefile.PL> that is being executed. This prevents runaway processes
-with newer versions of Module::Install.
-
-When the config variable ftp_passive is set, all downloads will be run
-with the environment variable FTP_PASSIVE set to this value. This is
-in general a good idea as it influences both Net::FTP and LWP based
-connections. The same effect can be achieved by starting the cpan
-shell with this environment variable set. For Net::FTP alone, one can
-also always set passive mode by running libnetcfg.
-
-=head1 POPULATE AN INSTALLATION WITH LOTS OF MODULES
-
-Populating a freshly installed perl with one's favorite modules is pretty
-easy if you maintain a private bundle definition file. To get a useful
-blueprint of a bundle definition file, the command autobundle can be used
-on the CPAN shell command line. This command writes a bundle definition
-file for all modules installed for the current perl
-interpreter. It's recommended to run this command once only, and from then
-on maintain the file manually under a private name, say
-Bundle/my_bundle.pm. With a clever bundle file you can then simply say
-
- cpan> install Bundle::my_bundle
-
-then answer a few questions and go out for coffee (possibly
-even in a different city).
-
-Maintaining a bundle definition file means keeping track of two
-things: dependencies and interactivity. CPAN.pm sometimes fails on
-calculating dependencies because not all modules define all MakeMaker
-attributes correctly, so a bundle definition file should specify
-prerequisites as early as possible. On the other hand, it's
-annoying that so many distributions need some interactive configuring. So
-what you can try to accomplish in your private bundle file is to have the
-packages that need to be configured early in the file and the gentle
-ones later, so you can go out for cofeee after a few minutes and leave CPAN.pm
-to churn away untended.
-
-=head1 WORKING WITH CPAN.pm BEHIND FIREWALLS
-
-Thanks to Graham Barr for contributing the following paragraphs about
-the interaction between perl, and various firewall configurations. For
-further information on firewalls, it is recommended to consult the
-documentation that comes with the I<ncftp> program. If you are unable to
-go through the firewall with a simple Perl setup, it is likely
-that you can configure I<ncftp> so that it works through your firewall.
-
-=head2 Three basic types of firewalls
-
-Firewalls can be categorized into three basic types.
-
-=over 4
-
-=item http firewall
-
-This is when the firewall machine runs a web server, and to access the
-outside world, you must do so via that web server. If you set environment
-variables like http_proxy or ftp_proxy to values beginning with http://,
-or in your web browser you've proxy information set, then you know
-you are running behind an http firewall.
-
-To access servers outside these types of firewalls with perl (even for
-ftp), you need LWP.
-
-=item ftp firewall
-
-This where the firewall machine runs an ftp server. This kind of
-firewall will only let you access ftp servers outside the firewall.
-This is usually done by connecting to the firewall with ftp, then
-entering a username like "user at outside.host.com".
-
-To access servers outside these type of firewalls with perl, you
-need Net::FTP.
-
-=item One-way visibility
-
-One-way visibility means these firewalls try to make themselves
-invisible to users inside the firewall. An FTP data connection is
-normally created by sending your IP address to the remote server and then
-listening for the return connection. But the remote server will not be able to
-connect to you because of the firewall. For these types of firewall,
-FTP connections need to be done in a passive mode.
-
-There are two that I can think off.
-
-=over 4
-
-=item SOCKS
-
-If you are using a SOCKS firewall, you will need to compile perl and link
-it with the SOCKS library. This is what is normally called a 'socksified'
-perl. With this executable you will be able to connect to servers outside
-the firewall as if it were not there.
-
-=item IP Masquerade
-
-This is when the firewall implemented in the kernel (via NAT, or networking
-address translation), it allows you to hide a complete network behind one
-IP address. With this firewall no special compiling is needed as you can
-access hosts directly.
-
-For accessing ftp servers behind such firewalls you usually need to
-set the environment variable C<FTP_PASSIVE> or the config variable
-ftp_passive to a true value.
-
-=back
-
-=back
-
-=head2 Configuring lynx or ncftp for going through a firewall
-
-If you can go through your firewall with e.g. lynx, presumably with a
-command such as
-
- /usr/local/bin/lynx -pscott:tiger
-
-then you would configure CPAN.pm with the command
-
- o conf lynx "/usr/local/bin/lynx -pscott:tiger"
-
-That's all. Similarly for ncftp or ftp, you would configure something
-like
-
- o conf ncftp "/usr/bin/ncftp -f /home/scott/ncftplogin.cfg"
-
-Your mileage may vary...
-
-=head1 FAQ
-
-=over 4
-
-=item 1)
-
-I installed a new version of module X but CPAN keeps saying,
-I have the old version installed
-
-Probably you B<do> have the old version installed. This can
-happen if a module installs itself into a different directory in the
- at INC path than it was previously installed. This is not really a
-CPAN.pm problem, you would have the same problem when installing the
-module manually. The easiest way to prevent this behaviour is to add
-the argument C<UNINST=1> to the C<make install> call, and that is why
-many people add this argument permanently by configuring
-
- o conf make_install_arg UNINST=1
-
-=item 2)
-
-So why is UNINST=1 not the default?
-
-Because there are people who have their precise expectations about who
-may install where in the @INC path and who uses which @INC array. In
-fine tuned environments C<UNINST=1> can cause damage.
-
-=item 3)
-
-I want to clean up my mess, and install a new perl along with
-all modules I have. How do I go about it?
-
-Run the autobundle command for your old perl and optionally rename the
-resulting bundle file (e.g. Bundle/mybundle.pm), install the new perl
-with the Configure option prefix, e.g.
-
- ./Configure -Dprefix=/usr/local/perl-5.6.78.9
-
-Install the bundle file you produced in the first step with something like
-
- cpan> install Bundle::mybundle
-
-and you're done.
-
-=item 4)
-
-When I install bundles or multiple modules with one command
-there is too much output to keep track of.
-
-You may want to configure something like
-
- o conf make_arg "| tee -ai /root/.cpan/logs/make.out"
- o conf make_install_arg "| tee -ai /root/.cpan/logs/make_install.out"
-
-so that STDOUT is captured in a file for later inspection.
-
-
-=item 5)
-
-I am not root, how can I install a module in a personal directory?
-
-First of all, you will want to use your own configuration, not the one
-that your root user installed. If you do not have permission to write
-in the cpan directory that root has configured, you will be asked if
-you want to create your own config. Answering "yes" will bring you into
-CPAN's configuration stage, using the system config for all defaults except
-things that have to do with CPAN's work directory, saving your choices to
-your MyConfig.pm file.
-
-You can also manually initiate this process with the following command:
-
- % perl -MCPAN -e 'mkmyconfig'
-
-or by running
-
- mkmyconfig
-
-from the CPAN shell.
-
-You will most probably also want to configure something like this:
-
- o conf makepl_arg "LIB=~/myperl/lib \
- INSTALLMAN1DIR=~/myperl/man/man1 \
- INSTALLMAN3DIR=~/myperl/man/man3 \
- INSTALLSCRIPT=~/myperl/bin \
- INSTALLBIN=~/myperl/bin"
-
-and then the equivalent command for Module::Build, which is
-
- o conf mbuildpl_arg "--lib=~/myperl/lib \
- --installman1dir=~/myperl/man/man1 \
- --installman3dir=~/myperl/man/man3 \
- --installscript=~/myperl/bin \
- --installbin=~/myperl/bin"
-
-You can make this setting permanent like all C<o conf> settings with
-C<o conf commit> or by setting C<auto_commit> beforehand.
-
-You will have to add ~/myperl/man to the MANPATH environment variable
-and also tell your perl programs to look into ~/myperl/lib, e.g. by
-including
-
- use lib "$ENV{HOME}/myperl/lib";
-
-or setting the PERL5LIB environment variable.
-
-While we're speaking about $ENV{HOME}, it might be worth mentioning,
-that for Windows we use the File::HomeDir module that provides an
-equivalent to the concept of the home directory on Unix.
-
-Another thing you should bear in mind is that the UNINST parameter can
-be dangerous when you are installing into a private area because you
-might accidentally remove modules that other people depend on that are
-not using the private area.
-
-=item 6)
-
-How to get a package, unwrap it, and make a change before building it?
-
-Have a look at the C<look> (!) command.
-
-=item 7)
-
-I installed a Bundle and had a couple of fails. When I
-retried, everything resolved nicely. Can this be fixed to work
-on first try?
-
-The reason for this is that CPAN does not know the dependencies of all
-modules when it starts out. To decide about the additional items to
-install, it just uses data found in the META.yml file or the generated
-Makefile. An undetected missing piece breaks the process. But it may
-well be that your Bundle installs some prerequisite later than some
-depending item and thus your second try is able to resolve everything.
-Please note, CPAN.pm does not know the dependency tree in advance and
-cannot sort the queue of things to install in a topologically correct
-order. It resolves perfectly well B<if> all modules declare the
-prerequisites correctly with the PREREQ_PM attribute to MakeMaker or
-the C<requires> stanza of Module::Build. For bundles which fail and
-you need to install often, it is recommended to sort the Bundle
-definition file manually.
-
-=item 8)
-
-In our intranet, we have many modules for internal use. How
-can I integrate these modules with CPAN.pm but without uploading
-the modules to CPAN?
-
-Have a look at the CPAN::Site module.
-
-=item 9)
-
-When I run CPAN's shell, I get an error message about things in my
-C</etc/inputrc> (or C<~/.inputrc>) file.
-
-These are readline issues and can only be fixed by studying readline
-configuration on your architecture and adjusting the referenced file
-accordingly. Please make a backup of the C</etc/inputrc> or C<~/.inputrc>
-and edit them. Quite often harmless changes like uppercasing or
-lowercasing some arguments solves the problem.
-
-=item 10)
-
-Some authors have strange characters in their names.
-
-Internally CPAN.pm uses the UTF-8 charset. If your terminal is
-expecting ISO-8859-1 charset, a converter can be activated by setting
-term_is_latin to a true value in your config file. One way of doing so
-would be
-
- cpan> o conf term_is_latin 1
-
-If other charset support is needed, please file a bugreport against
-CPAN.pm at rt.cpan.org and describe your needs. Maybe we can extend
-the support or maybe UTF-8 terminals become widely available.
-
-Note: this config variable is deprecated and will be removed in a
-future version of CPAN.pm. It will be replaced with the conventions
-around the family of $LANG and $LC_* environment variables.
-
-=item 11)
-
-When an install fails for some reason and then I correct the error
-condition and retry, CPAN.pm refuses to install the module, saying
-C<Already tried without success>.
-
-Use the force pragma like so
-
- force install Foo::Bar
-
-Or you can use
-
- look Foo::Bar
-
-and then C<make install> directly in the subshell.
-
-=item 12)
-
-How do I install a "DEVELOPER RELEASE" of a module?
-
-By default, CPAN will install the latest non-developer release of a
-module. If you want to install a dev release, you have to specify the
-partial path starting with the author id to the tarball you wish to
-install, like so:
-
- cpan> install KWILLIAMS/Module-Build-0.27_07.tar.gz
-
-Note that you can use the C<ls> command to get this path listed.
-
-=item 13)
-
-How do I install a module and all its dependencies from the commandline,
-without being prompted for anything, despite my CPAN configuration
-(or lack thereof)?
-
-CPAN uses ExtUtils::MakeMaker's prompt() function to ask its questions, so
-if you set the PERL_MM_USE_DEFAULT environment variable, you shouldn't be
-asked any questions at all (assuming the modules you are installing are
-nice about obeying that variable as well):
-
- % PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'install My::Module'
-
-=item 14)
-
-How do I create a Module::Build based Build.PL derived from an
-ExtUtils::MakeMaker focused Makefile.PL?
-
-http://search.cpan.org/search?query=Module::Build::Convert
-
-http://www.refcnt.org/papers/module-build-convert
-
-=item 15)
-
-I'm frequently irritated with the CPAN shell's inability to help me
-select a good mirror.
-
-The urllist config parameter is yours. You can add and remove sites at
-will. You should find out which sites have the best uptodateness,
-bandwidth, reliability, etc. and are topologically close to you. Some
-people prefer fast downloads, others uptodateness, others reliability.
-You decide which to try in which order.
-
-Henk P. Penning maintains a site that collects data about CPAN sites:
-
- http://www.cs.uu.nl/people/henkp/mirmon/cpan.html
-
-Also, feel free to play with experimental features. Run
-
- o conf init randomize_urllist ftpstats_period ftpstats_size
-
-and choose your favorite parameters. After a few downloads running the
-C<hosts> command will probably assist you in choosing the best mirror
-sites.
-
-=item 16)
-
-Why do I get asked the same questions every time I start the shell?
-
-You can make your configuration changes permanent by calling the
-command C<o conf commit>. Alternatively set the C<auto_commit>
-variable to true by running C<o conf init auto_commit> and answering
-the following question with yes.
-
-=item 17)
-
-Older versions of CPAN.pm had the original root directory of all
-tarballs in the build directory. Now there are always random
-characters appended to these directory names. Why was this done?
-
-The random characters are provided by File::Temp and ensure that each
-module's individual build directory is unique. This makes running
-CPAN.pm in concurrent processes simultaneously safe.
-
-=item 18)
-
-Speaking of the build directory. Do I have to clean it up myself?
-
-You have the choice to set the config variable C<scan_cache> to
-C<never>. Then you must clean it up yourself. The other possible
-value, C<atstart> only cleans up the build directory when you start
-the CPAN shell. If you never start up the CPAN shell, you probably
-also have to clean up the build directory yourself.
-
-=back
-
-=head1 COMPATIBILITY
-
-=head2 OLD PERL VERSIONS
-
-CPAN.pm is regularly tested to run under 5.004, 5.005, and assorted
-newer versions. It is getting more and more difficult to get the
-minimal prerequisites working on older perls. It is close to
-impossible to get the whole Bundle::CPAN working there. If you're in
-the position to have only these old versions, be advised that CPAN is
-designed to work fine without the Bundle::CPAN installed.
-
-To get things going, note that GBARR/Scalar-List-Utils-1.18.tar.gz is
-compatible with ancient perls and that File::Temp is listed as a
-prerequisite but CPAN has reasonable workarounds if it is missing.
-
-=head2 CPANPLUS
-
-This module and its competitor, the CPANPLUS module, are both much
-cooler than the other. CPAN.pm is older. CPANPLUS was designed to be
-more modular, but it was never intended to be compatible with CPAN.pm.
-
-=head1 SECURITY ADVICE
-
-This software enables you to upgrade software on your computer and so
-is inherently dangerous because the newly installed software may
-contain bugs and may alter the way your computer works or even make it
-unusable. Please consider backing up your data before every upgrade.
-
-=head1 BUGS
-
-Please report bugs via L<http://rt.cpan.org/>
-
-Before submitting a bug, please make sure that the traditional method
-of building a Perl module package from a shell by following the
-installation instructions of that package still works in your
-environment.
-
-=head1 AUTHOR
-
-Andreas Koenig C<< <andk at cpan.org> >>
-
-=head1 LICENSE
-
-This program is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
-
-See L<http://www.perl.com/perl/misc/Artistic.html>
-
-=head1 TRANSLATIONS
-
-Kawai,Takanori provides a Japanese translation of this manpage at
-L<http://homepage3.nifty.com/hippo2000/perltips/CPAN.htm>
-
-=head1 SEE ALSO
-
-L<cpan>, L<CPAN::Nox>, L<CPAN::Version>
-
-=cut
Deleted: vendor/perl/dist/lib/CPANPLUS.pm
===================================================================
--- vendor/perl/dist/lib/CPANPLUS.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/CPANPLUS.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,271 +0,0 @@
-package CPANPLUS;
-
-use strict;
-use Carp;
-
-use CPANPLUS::Error;
-use CPANPLUS::Backend;
-
-use Locale::Maketext::Simple Class => 'CPANPLUS', Style => 'gettext';
-
-BEGIN {
- use Exporter ();
- use vars qw( @EXPORT @ISA $VERSION );
- @EXPORT = qw( shell fetch get install );
- @ISA = qw( Exporter );
- $VERSION = "0.88"; #have to hardcode or cpan.org gets unhappy
-}
-
-### purely for backward compatibility, so we can call it from the commandline:
-### perl -MCPANPLUS -e 'install Net::SMTP'
-sub install {
- my $cpan = CPANPLUS::Backend->new;
- my $mod = shift or (
- error(loc("No module specified!")), return
- );
-
- if ( ref $mod ) {
- error( loc( "You passed an object. Use %1 for OO style interaction",
- 'CPANPLUS::Backend' ));
- return;
-
- } else {
- my $obj = $cpan->module_tree($mod) or (
- error(loc("No such module '%1'", $mod)),
- return
- );
-
- my $ok = $obj->install;
-
- $ok
- ? msg(loc("Installing of %1 successful", $mod),1)
- : msg(loc("Installing of %1 failed", $mod),1);
-
- return $ok;
- }
-}
-
-### simply downloads a module and stores it
-sub fetch {
- my $cpan = CPANPLUS::Backend->new;
-
- my $mod = shift or (
- error(loc("No module specified!")), return
- );
-
- if ( ref $mod ) {
- error( loc( "You passed an object. Use %1 for OO style interaction",
- 'CPANPLUS::Backend' ));
- return;
-
- } else {
- my $obj = $cpan->module_tree($mod) or (
- error(loc("No such module '%1'", $mod)),
- return
- );
-
- my $ok = $obj->fetch( fetchdir => '.' );
-
- $ok
- ? msg(loc("Fetching of %1 successful", $mod),1)
- : msg(loc("Fetching of %1 failed", $mod),1);
-
- return $ok;
- }
-}
-
-### alias to fetch() due to compatibility with cpan.pm ###
-sub get { fetch(@_) }
-
-
-### purely for backwards compatibility, so we can call it from the commandline:
-### perl -MCPANPLUS -e 'shell'
-sub shell {
- my $option = shift;
-
- ### since the user can specify the type of shell they wish to start
- ### when they call the shell() function, we have to eval the usage
- ### of CPANPLUS::Shell so we can set up all the checks properly
- eval { require CPANPLUS::Shell; CPANPLUS::Shell->import($option) };
- die $@ if $@;
-
- my $cpan = CPANPLUS::Shell->new();
-
- $cpan->shell();
-}
-
-1;
-
-__END__
-
-=pod
-
-=head1 NAME
-
-CPANPLUS - API & CLI access to the CPAN mirrors
-
-=head1 SYNOPSIS
-
- ### standard invocation from the command line
- $ cpanp
- $ cpanp -i Some::Module
-
- $ perl -MCPANPLUS -eshell
- $ perl -MCPANPLUS -e'fetch Some::Module'
-
-
-=head1 DESCRIPTION
-
-The C<CPANPLUS> library is an API to the C<CPAN> mirrors and a
-collection of interactive shells, commandline programs, etc,
-that use this API.
-
-=head1 GUIDE TO DOCUMENTATION
-
-=head2 GENERAL USAGE
-
-This is the document you are currently reading. It describes
-basic usage and background information. Its main purpose is to
-assist the user who wants to learn how to invoke CPANPLUS
-and install modules from the commandline and to point you
-to more indepth reading if required.
-
-=head2 API REFERENCE
-
-The C<CPANPLUS> API is meant to let you programmatically
-interact with the C<CPAN> mirrors. The documentation in
-L<CPANPLUS::Backend> shows you how to create an object
-capable of interacting with those mirrors, letting you
-create & retrieve module objects.
-L<CPANPLUS::Module> shows you how you can use these module
-objects to perform actions like installing and testing.
-
-The default shell, documented in L<CPANPLUS::Shell::Default>
-is also scriptable. You can use its API to dispatch calls
-from your script to the CPANPLUS Shell.
-
-=cut
-
-=head1 COMMANDLINE TOOLS
-
-=head2 STARTING AN INTERACTIVE SHELL
-
-You can start an interactive shell by running either of
-the two following commands:
-
- $ cpanp
-
- $ perl -MCPANPLUS -eshell
-
-All commans available are listed in the interactive shells
-help menu. See C<cpanp -h> or L<CPANPLUS::Shell::Default>
-for instructions on using the default shell.
-
-=head2 CHOOSE A SHELL
-
-By running C<cpanp> without arguments, you will start up
-the shell specified in your config, which defaults to
-L<CPANPLUS::Shell::Default>. There are more shells available.
-C<CPANPLUS> itself ships with an emulation shell called
-L<CPANPLUS::Shell::Classic> that looks and feels just like
-the old C<CPAN.pm> shell.
-
-You can start this shell by typing:
-
- $ perl -MCPANPLUS -e'shell Classic'
-
-Even more shells may be available from C<CPAN>.
-
-Note that if you have changed your default shell in your
-configuration, that shell will be used instead. If for
-some reason there was an error with your specified shell,
-you will be given the default shell.
-
-=head2 BUILDING PACKAGES
-
-C<cpan2dist> is a commandline tool to convert any distribution
-from C<CPAN> into a package in the format of your choice, like
-for example C<.deb> or C<FreeBSD ports>.
-
-See C<cpan2dist -h> for details.
-
-
-=head1 FUNCTIONS
-
-For quick access to common commands, you may use this module,
-C<CPANPLUS> rather than the full programmatic API situated in
-C<CPANPLUS::Backend>. This module offers the following functions:
-
-=head2 $bool = install( Module::Name | /A/AU/AUTHOR/Module-Name-1.tgz )
-
-This function requires the full name of the module, which is case
-sensitive. The module name can also be provided as a fully
-qualified file name, beginning with a I</>, relative to
-the /authors/id directory on a CPAN mirror.
-
-It will download, extract and install the module.
-
-=head2 $where = fetch( Module::Name | /A/AU/AUTHOR/Module-Name-1.tgz )
-
-Like install, fetch needs the full name of a module or the fully
-qualified file name, and is case sensitive.
-
-It will download the specified module to the current directory.
-
-=head2 $where = get( Module::Name | /A/AU/AUTHOR/Module-Name-1.tgz )
-
-Get is provided as an alias for fetch for compatibility with
-CPAN.pm.
-
-=head2 shell()
-
-Shell starts the default CPAN shell. You can also start the shell
-by using the C<cpanp> command, which will be installed in your
-perl bin.
-
-=head1 FAQ
-
-For frequently asked questions and answers, please consult the
-C<CPANPLUS::FAQ> manual.
-
-=head1 BUG REPORTS
-
-Please report bugs or other issues to E<lt>bug-cpanplus at rt.cpan.org<gt>.
-
-=head1 AUTHOR
-
-This module by Jos Boumans E<lt>kane at cpan.orgE<gt>.
-
-=head1 COPYRIGHT
-
-The CPAN++ interface (of which this module is a part of) is copyright (c)
-2001 - 2007, Jos Boumans E<lt>kane at cpan.orgE<gt>. All rights reserved.
-
-This library is free software; you may redistribute and/or modify it
-under the same terms as Perl itself.
-
-=head1 SEE ALSO
-
-L<CPANPLUS::Shell::Default>, L<CPANPLUS::FAQ>, L<CPANPLUS::Backend>, L<CPANPLUS::Module>, L<cpanp>, L<cpan2dist>
-
-=head1 CONTACT INFORMATION
-
-=over 4
-
-=item * Bug reporting:
-I<bug-cpanplus at rt.cpan.org>
-
-=item * Questions & suggestions:
-I<cpanplus-devel at lists.sourceforge.net>
-
-=back
-
-
-=cut
-
-# Local variables:
-# c-indentation-style: bsd
-# c-basic-offset: 4
-# indent-tabs-mode: nil
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: vendor/perl/dist/lib/Carp.pm
===================================================================
--- vendor/perl/dist/lib/Carp.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Carp.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,578 +0,0 @@
-package Carp;
-
-use strict;
-use warnings;
-
-our $VERSION = '1.20';
-
-our $MaxEvalLen = 0;
-our $Verbose = 0;
-our $CarpLevel = 0;
-our $MaxArgLen = 64; # How much of each argument to print. 0 = all.
-our $MaxArgNums = 8; # How many arguments to print. 0 = all.
-
-require Exporter;
-our @ISA = ('Exporter');
-our @EXPORT = qw(confess croak carp);
-our @EXPORT_OK = qw(cluck verbose longmess shortmess);
-our @EXPORT_FAIL = qw(verbose); # hook to enable verbose mode
-
-# The members of %Internal are packages that are internal to perl.
-# Carp will not report errors from within these packages if it
-# can. The members of %CarpInternal are internal to Perl's warning
-# system. Carp will not report errors from within these packages
-# either, and will not report calls *to* these packages for carp and
-# croak. They replace $CarpLevel, which is deprecated. The
-# $Max(EvalLen|(Arg(Len|Nums)) variables are used to specify how the eval
-# text and function arguments should be formatted when printed.
-
-our %CarpInternal;
-our %Internal;
-
-# disable these by default, so they can live w/o require Carp
-$CarpInternal{Carp}++;
-$CarpInternal{warnings}++;
-$Internal{Exporter}++;
-$Internal{'Exporter::Heavy'}++;
-
-# if the caller specifies verbose usage ("perl -MCarp=verbose script.pl")
-# then the following method will be called by the Exporter which knows
-# to do this thanks to @EXPORT_FAIL, above. $_[1] will contain the word
-# 'verbose'.
-
-sub export_fail { shift; $Verbose = shift if $_[0] eq 'verbose'; @_ }
-
-sub _cgc {
- no strict 'refs';
- return \&{"CORE::GLOBAL::caller"} if defined &{"CORE::GLOBAL::caller"};
- return;
-}
-
-sub longmess {
- # Icky backwards compatibility wrapper. :-(
- #
- # The story is that the original implementation hard-coded the
- # number of call levels to go back, so calls to longmess were off
- # by one. Other code began calling longmess and expecting this
- # behaviour, so the replacement has to emulate that behaviour.
- my $cgc = _cgc();
- my $call_pack = $cgc ? $cgc->() : caller();
- if ( $Internal{$call_pack} or $CarpInternal{$call_pack} ) {
- return longmess_heavy(@_);
- }
- else {
- local $CarpLevel = $CarpLevel + 1;
- return longmess_heavy(@_);
- }
-}
-
-our @CARP_NOT;
-
-sub shortmess {
- my $cgc = _cgc();
-
- # Icky backwards compatibility wrapper. :-(
- local @CARP_NOT = $cgc ? $cgc->() : caller();
- shortmess_heavy(@_);
-}
-
-sub croak { die shortmess @_ }
-sub confess { die longmess @_ }
-sub carp { warn shortmess @_ }
-sub cluck { warn longmess @_ }
-
-sub caller_info {
- my $i = shift(@_) + 1;
- my %call_info;
- my $cgc = _cgc();
- {
- package DB;
- @DB::args = \$i; # A sentinel, which no-one else has the address of
- @call_info{
- qw(pack file line sub has_args wantarray evaltext is_require) }
- = $cgc ? $cgc->($i) : caller($i);
- }
-
- unless ( defined $call_info{pack} ) {
- return ();
- }
-
- my $sub_name = Carp::get_subname( \%call_info );
- if ( $call_info{has_args} ) {
- my @args;
- if ( @DB::args == 1
- && ref $DB::args[0] eq ref \$i
- && $DB::args[0] == \$i ) {
- @DB::args = (); # Don't let anyone see the address of $i
- local $@;
- my $where = eval {
- my $func = $cgc or return '';
- my $gv = B::svref_2object($func)->GV;
- my $package = $gv->STASH->NAME;
- my $subname = $gv->NAME;
- return unless defined $package && defined $subname;
-
- # returning CORE::GLOBAL::caller isn't useful for tracing the cause:
- return if $package eq 'CORE::GLOBAL' && $subname eq 'caller';
- " in &${package}::$subname";
- } // '';
- @args
- = "** Incomplete caller override detected$where; \@DB::args were not set **";
- }
- else {
- @args = map { Carp::format_arg($_) } @DB::args;
- }
- if ( $MaxArgNums and @args > $MaxArgNums )
- { # More than we want to show?
- $#args = $MaxArgNums;
- push @args, '...';
- }
-
- # Push the args onto the subroutine
- $sub_name .= '(' . join( ', ', @args ) . ')';
- }
- $call_info{sub_name} = $sub_name;
- return wantarray() ? %call_info : \%call_info;
-}
-
-# Transform an argument to a function into a string.
-sub format_arg {
- my $arg = shift;
- if ( ref($arg) ) {
- $arg = defined($overload::VERSION) ? overload::StrVal($arg) : "$arg";
- }
- if ( defined($arg) ) {
- $arg =~ s/'/\\'/g;
- $arg = str_len_trim( $arg, $MaxArgLen );
-
- # Quote it?
- $arg = "'$arg'" unless $arg =~ /^-?[0-9.]+\z/;
- } # 0-9, not \d, as \d will try to
- else { # load Unicode tables
- $arg = 'undef';
- }
-
- # The following handling of "control chars" is direct from
- # the original code - it is broken on Unicode though.
- # Suggestions?
- utf8::is_utf8($arg)
- or $arg =~ s/([[:cntrl:]]|[[:^ascii:]])/sprintf("\\x{%x}",ord($1))/eg;
- return $arg;
-}
-
-# Takes an inheritance cache and a package and returns
-# an anon hash of known inheritances and anon array of
-# inheritances which consequences have not been figured
-# for.
-sub get_status {
- my $cache = shift;
- my $pkg = shift;
- $cache->{$pkg} ||= [ { $pkg => $pkg }, [ trusts_directly($pkg) ] ];
- return @{ $cache->{$pkg} };
-}
-
-# Takes the info from caller() and figures out the name of
-# the sub/require/eval
-sub get_subname {
- my $info = shift;
- if ( defined( $info->{evaltext} ) ) {
- my $eval = $info->{evaltext};
- if ( $info->{is_require} ) {
- return "require $eval";
- }
- else {
- $eval =~ s/([\\\'])/\\$1/g;
- return "eval '" . str_len_trim( $eval, $MaxEvalLen ) . "'";
- }
- }
-
- return ( $info->{sub} eq '(eval)' ) ? 'eval {...}' : $info->{sub};
-}
-
-# Figures out what call (from the point of view of the caller)
-# the long error backtrace should start at.
-sub long_error_loc {
- my $i;
- my $lvl = $CarpLevel;
- {
- ++$i;
- my $cgc = _cgc();
- my $pkg = $cgc ? $cgc->($i) : caller($i);
- unless ( defined($pkg) ) {
-
- # This *shouldn't* happen.
- if (%Internal) {
- local %Internal;
- $i = long_error_loc();
- last;
- }
- else {
-
- # OK, now I am irritated.
- return 2;
- }
- }
- redo if $CarpInternal{$pkg};
- redo unless 0 > --$lvl;
- redo if $Internal{$pkg};
- }
- return $i - 1;
-}
-
-sub longmess_heavy {
- return @_ if ref( $_[0] ); # don't break references as exceptions
- my $i = long_error_loc();
- return ret_backtrace( $i, @_ );
-}
-
-# Returns a full stack backtrace starting from where it is
-# told.
-sub ret_backtrace {
- my ( $i, @error ) = @_;
- my $mess;
- my $err = join '', @error;
- $i++;
-
- my $tid_msg = '';
- if ( defined &threads::tid ) {
- my $tid = threads->tid;
- $tid_msg = " thread $tid" if $tid;
- }
-
- my %i = caller_info($i);
- $mess = "$err at $i{file} line $i{line}$tid_msg\n";
-
- while ( my %i = caller_info( ++$i ) ) {
- $mess .= "\t$i{sub_name} called at $i{file} line $i{line}$tid_msg\n";
- }
-
- return $mess;
-}
-
-sub ret_summary {
- my ( $i, @error ) = @_;
- my $err = join '', @error;
- $i++;
-
- my $tid_msg = '';
- if ( defined &threads::tid ) {
- my $tid = threads->tid;
- $tid_msg = " thread $tid" if $tid;
- }
-
- my %i = caller_info($i);
- return "$err at $i{file} line $i{line}$tid_msg\n";
-}
-
-sub short_error_loc {
- # You have to create your (hash)ref out here, rather than defaulting it
- # inside trusts *on a lexical*, as you want it to persist across calls.
- # (You can default it on $_[2], but that gets messy)
- my $cache = {};
- my $i = 1;
- my $lvl = $CarpLevel;
- {
- my $cgc = _cgc();
- my $called = $cgc ? $cgc->($i) : caller($i);
- $i++;
- my $caller = $cgc ? $cgc->($i) : caller($i);
-
- return 0 unless defined($caller); # What happened?
- redo if $Internal{$caller};
- redo if $CarpInternal{$caller};
- redo if $CarpInternal{$called};
- redo if trusts( $called, $caller, $cache );
- redo if trusts( $caller, $called, $cache );
- redo unless 0 > --$lvl;
- }
- return $i - 1;
-}
-
-sub shortmess_heavy {
- return longmess_heavy(@_) if $Verbose;
- return @_ if ref( $_[0] ); # don't break references as exceptions
- my $i = short_error_loc();
- if ($i) {
- ret_summary( $i, @_ );
- }
- else {
- longmess_heavy(@_);
- }
-}
-
-# If a string is too long, trims it with ...
-sub str_len_trim {
- my $str = shift;
- my $max = shift || 0;
- if ( 2 < $max and $max < length($str) ) {
- substr( $str, $max - 3 ) = '...';
- }
- return $str;
-}
-
-# Takes two packages and an optional cache. Says whether the
-# first inherits from the second.
-#
-# Recursive versions of this have to work to avoid certain
-# possible endless loops, and when following long chains of
-# inheritance are less efficient.
-sub trusts {
- my $child = shift;
- my $parent = shift;
- my $cache = shift;
- my ( $known, $partial ) = get_status( $cache, $child );
-
- # Figure out consequences until we have an answer
- while ( @$partial and not exists $known->{$parent} ) {
- my $anc = shift @$partial;
- next if exists $known->{$anc};
- $known->{$anc}++;
- my ( $anc_knows, $anc_partial ) = get_status( $cache, $anc );
- my @found = keys %$anc_knows;
- @$known{@found} = ();
- push @$partial, @$anc_partial;
- }
- return exists $known->{$parent};
-}
-
-# Takes a package and gives a list of those trusted directly
-sub trusts_directly {
- my $class = shift;
- no strict 'refs';
- no warnings 'once';
- return @{"$class\::CARP_NOT"}
- ? @{"$class\::CARP_NOT"}
- : @{"$class\::ISA"};
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Carp - alternative warn and die for modules
-
-=head1 SYNOPSIS
-
- use Carp;
-
- # warn user (from perspective of caller)
- carp "string trimmed to 80 chars";
-
- # die of errors (from perspective of caller)
- croak "We're outta here!";
-
- # die of errors with stack backtrace
- confess "not implemented";
-
- # cluck not exported by default
- use Carp qw(cluck);
- cluck "This is how we got here!";
-
-=head1 DESCRIPTION
-
-The Carp routines are useful in your own modules because
-they act like die() or warn(), but with a message which is more
-likely to be useful to a user of your module. In the case of
-cluck, confess, and longmess that context is a summary of every
-call in the call-stack. For a shorter message you can use C<carp>
-or C<croak> which report the error as being from where your module
-was called. There is no guarantee that that is where the error
-was, but it is a good educated guess.
-
-You can also alter the way the output and logic of C<Carp> works, by
-changing some global variables in the C<Carp> namespace. See the
-section on C<GLOBAL VARIABLES> below.
-
-Here is a more complete description of how C<carp> and C<croak> work.
-What they do is search the call-stack for a function call stack where
-they have not been told that there shouldn't be an error. If every
-call is marked safe, they give up and give a full stack backtrace
-instead. In other words they presume that the first likely looking
-potential suspect is guilty. Their rules for telling whether
-a call shouldn't generate errors work as follows:
-
-=over 4
-
-=item 1.
-
-Any call from a package to itself is safe.
-
-=item 2.
-
-Packages claim that there won't be errors on calls to or from
-packages explicitly marked as safe by inclusion in C<@CARP_NOT>, or
-(if that array is empty) C<@ISA>. The ability to override what
- at ISA says is new in 5.8.
-
-=item 3.
-
-The trust in item 2 is transitive. If A trusts B, and B
-trusts C, then A trusts C. So if you do not override C<@ISA>
-with C<@CARP_NOT>, then this trust relationship is identical to,
-"inherits from".
-
-=item 4.
-
-Any call from an internal Perl module is safe. (Nothing keeps
-user modules from marking themselves as internal to Perl, but
-this practice is discouraged.)
-
-=item 5.
-
-Any call to Perl's warning system (eg Carp itself) is safe.
-(This rule is what keeps it from reporting the error at the
-point where you call C<carp> or C<croak>.)
-
-=item 6.
-
-C<$Carp::CarpLevel> can be set to skip a fixed number of additional
-call levels. Using this is not recommended because it is very
-difficult to get it to behave correctly.
-
-=back
-
-=head2 Forcing a Stack Trace
-
-As a debugging aid, you can force Carp to treat a croak as a confess
-and a carp as a cluck across I<all> modules. In other words, force a
-detailed stack trace to be given. This can be very helpful when trying
-to understand why, or from where, a warning or error is being generated.
-
-This feature is enabled by 'importing' the non-existent symbol
-'verbose'. You would typically enable it by saying
-
- perl -MCarp=verbose script.pl
-
-or by including the string C<-MCarp=verbose> in the PERL5OPT
-environment variable.
-
-Alternately, you can set the global variable C<$Carp::Verbose> to true.
-See the C<GLOBAL VARIABLES> section below.
-
-=head1 GLOBAL VARIABLES
-
-=head2 $Carp::MaxEvalLen
-
-This variable determines how many characters of a string-eval are to
-be shown in the output. Use a value of C<0> to show all text.
-
-Defaults to C<0>.
-
-=head2 $Carp::MaxArgLen
-
-This variable determines how many characters of each argument to a
-function to print. Use a value of C<0> to show the full length of the
-argument.
-
-Defaults to C<64>.
-
-=head2 $Carp::MaxArgNums
-
-This variable determines how many arguments to each function to show.
-Use a value of C<0> to show all arguments to a function call.
-
-Defaults to C<8>.
-
-=head2 $Carp::Verbose
-
-This variable makes C<carp> and C<croak> generate stack backtraces
-just like C<cluck> and C<confess>. This is how C<use Carp 'verbose'>
-is implemented internally.
-
-Defaults to C<0>.
-
-=head2 @CARP_NOT
-
-This variable, I<in your package>, says which packages are I<not> to be
-considered as the location of an error. The C<carp()> and C<cluck()>
-functions will skip over callers when reporting where an error occurred.
-
-NB: This variable must be in the package's symbol table, thus:
-
- # These work
- our @CARP_NOT; # file scope
- use vars qw(@CARP_NOT); # package scope
- @My::Package::CARP_NOT = ... ; # explicit package variable
-
- # These don't work
- sub xyz { ... @CARP_NOT = ... } # w/o declarations above
- my @CARP_NOT; # even at top-level
-
-Example of use:
-
- package My::Carping::Package;
- use Carp;
- our @CARP_NOT;
- sub bar { .... or _error('Wrong input') }
- sub _error {
- # temporary control of where'ness, __PACKAGE__ is implicit
- local @CARP_NOT = qw(My::Friendly::Caller);
- carp(@_)
- }
-
-This would make C<Carp> report the error as coming from a caller not
-in C<My::Carping::Package>, nor from C<My::Friendly::Caller>.
-
-Also read the L</DESCRIPTION> section above, about how C<Carp> decides
-where the error is reported from.
-
-Use C<@CARP_NOT>, instead of C<$Carp::CarpLevel>.
-
-Overrides C<Carp>'s use of C<@ISA>.
-
-=head2 %Carp::Internal
-
-This says what packages are internal to Perl. C<Carp> will never
-report an error as being from a line in a package that is internal to
-Perl. For example:
-
- $Carp::Internal{ (__PACKAGE__) }++;
- # time passes...
- sub foo { ... or confess("whatever") };
-
-would give a full stack backtrace starting from the first caller
-outside of __PACKAGE__. (Unless that package was also internal to
-Perl.)
-
-=head2 %Carp::CarpInternal
-
-This says which packages are internal to Perl's warning system. For
-generating a full stack backtrace this is the same as being internal
-to Perl, the stack backtrace will not start inside packages that are
-listed in C<%Carp::CarpInternal>. But it is slightly different for
-the summary message generated by C<carp> or C<croak>. There errors
-will not be reported on any lines that are calling packages in
-C<%Carp::CarpInternal>.
-
-For example C<Carp> itself is listed in C<%Carp::CarpInternal>.
-Therefore the full stack backtrace from C<confess> will not start
-inside of C<Carp>, and the short message from calling C<croak> is
-not placed on the line where C<croak> was called.
-
-=head2 $Carp::CarpLevel
-
-This variable determines how many additional call frames are to be
-skipped that would not otherwise be when reporting where an error
-occurred on a call to one of C<Carp>'s functions. It is fairly easy
-to count these call frames on calls that generate a full stack
-backtrace. However it is much harder to do this accounting for calls
-that generate a short message. Usually people skip too many call
-frames. If they are lucky they skip enough that C<Carp> goes all of
-the way through the call stack, realizes that something is wrong, and
-then generates a full stack backtrace. If they are unlucky then the
-error is reported from somewhere misleading very high in the call
-stack.
-
-Therefore it is best to avoid C<$Carp::CarpLevel>. Instead use
-C<@CARP_NOT>, C<%Carp::Internal> and C<%Carp::CarpInternal>.
-
-Defaults to C<0>.
-
-=head1 BUGS
-
-The Carp routines don't handle exception objects currently.
-If called with a first argument that is a reference, they simply
-call die() or warn(), as appropriate.
-
Deleted: vendor/perl/dist/lib/Carp.t
===================================================================
--- vendor/perl/dist/lib/Carp.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Carp.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,442 +0,0 @@
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require './test.pl';
-}
-
-use warnings;
-no warnings "once";
-
-my $Is_VMS = $^O eq 'VMS';
-
-use Carp qw(carp cluck croak confess);
-
-BEGIN {
- plan tests => 57;
-
- # This test must be run at BEGIN time, because code later in this file
- # sets CORE::GLOBAL::caller
- ok !exists $CORE::GLOBAL::{caller},
- "Loading doesn't create CORE::GLOBAL::caller";
-}
-
-{
- local $SIG{__WARN__} = sub {
- like $_[0], qr/ok (\d+)\n at.+\b(?i:carp\.t) line \d+$/, 'ok 2\n';
- };
-
- carp "ok 2\n";
-}
-
-{
- local $SIG{__WARN__} = sub {
- like $_[0], qr/(\d+) at.+\b(?i:carp\.t) line \d+$/, 'carp 3';
- };
-
- carp 3;
-}
-
-sub sub_4 {
- local $SIG{__WARN__} = sub {
- like $_[0],
- qr/^(\d+) at.+\b(?i:carp\.t) line \d+\n\tmain::sub_4\(\) called at.+\b(?i:carp\.t) line \d+$/,
- 'cluck 4';
- };
-
- cluck 4;
-}
-
-sub_4;
-
-{
- local $SIG{__DIE__} = sub {
- like $_[0],
- qr/^(\d+) at.+\b(?i:carp\.t) line \d+\n\teval \Q{...}\E called at.+\b(?i:carp\.t) line \d+$/,
- 'croak 5';
- };
-
- eval { croak 5 };
-}
-
-sub sub_6 {
- local $SIG{__DIE__} = sub {
- like $_[0],
- qr/^(\d+) at.+\b(?i:carp\.t) line \d+\n\teval \Q{...}\E called at.+\b(?i:carp\.t) line \d+\n\tmain::sub_6\(\) called at.+\b(?i:carp\.t) line \d+$/,
- 'confess 6';
- };
-
- eval { confess 6 };
-}
-
-sub_6;
-
-ok(1);
-
-# test for caller_info API
-my $eval = "use Carp; return Carp::caller_info(0);";
-my %info = eval($eval);
-is( $info{sub_name}, "eval '$eval'", 'caller_info API' );
-
-# test for '...::CARP_NOT used only once' warning from Carp
-my $warning;
-eval {
- BEGIN {
- local $SIG{__WARN__} = sub {
- if ( defined $^S ) { warn $_[0] }
- else { $warning = $_[0] }
- }
- }
-
- package Z;
-
- BEGIN {
- eval { Carp::croak() };
- }
-};
-ok !$warning, q/'...::CARP_NOT used only once' warning from Carp/;
-
-# Test the location of error messages.
-like( A::short(), qr/^Error at C/, "Short messages skip carped package" );
-
-{
- local @C::ISA = "D";
- like( A::short(), qr/^Error at B/, "Short messages skip inheritance" );
-}
-
-{
- local @D::ISA = "C";
- like( A::short(), qr/^Error at B/, "Short messages skip inheritance" );
-}
-
-{
- local @D::ISA = "B";
- local @B::ISA = "C";
- like( A::short(), qr/^Error at A/, "Inheritance is transitive" );
-}
-
-{
- local @B::ISA = "D";
- local @C::ISA = "B";
- like( A::short(), qr/^Error at A/, "Inheritance is transitive" );
-}
-
-{
- local @C::CARP_NOT = "D";
- like( A::short(), qr/^Error at B/, "Short messages see \@CARP_NOT" );
-}
-
-{
- local @D::CARP_NOT = "C";
- like( A::short(), qr/^Error at B/, "Short messages see \@CARP_NOT" );
-}
-
-{
- local @D::CARP_NOT = "B";
- local @B::CARP_NOT = "C";
- like( A::short(), qr/^Error at A/, "\@CARP_NOT is transitive" );
-}
-
-{
- local @B::CARP_NOT = "D";
- local @C::CARP_NOT = "B";
- like( A::short(), qr/^Error at A/, "\@CARP_NOT is transitive" );
-}
-
-{
- local @D::ISA = "C";
- local @D::CARP_NOT = "B";
- like( A::short(), qr/^Error at C/, "\@CARP_NOT overrides inheritance" );
-}
-
-{
- local @D::ISA = "B";
- local @D::CARP_NOT = "C";
- like( A::short(), qr/^Error at B/, "\@CARP_NOT overrides inheritance" );
-}
-
-# %Carp::Internal
-{
- local $Carp::Internal{C} = 1;
- like( A::short(), qr/^Error at B/, "Short doesn't report Internal" );
-}
-
-{
- local $Carp::Internal{D} = 1;
- like( A::long(), qr/^Error at C/, "Long doesn't report Internal" );
-}
-
-# %Carp::CarpInternal
-{
- local $Carp::CarpInternal{D} = 1;
- like(
- A::short(), qr/^Error at B/,
- "Short doesn't report calls to CarpInternal"
- );
-}
-
-{
- local $Carp::CarpInternal{D} = 1;
- like( A::long(), qr/^Error at C/, "Long doesn't report CarpInternal" );
-}
-
-# tests for global variables
-sub x { carp @_ }
-sub w { cluck @_ }
-
-# $Carp::Verbose;
-{
- my $aref = [
- qr/t at \S*(?i:carp.t) line \d+/,
- qr/t at \S*(?i:carp.t) line \d+\n\s*main::x\('t'\) called at \S*(?i:carp.t) line \d+/
- ];
- my $i = 0;
-
- for my $re (@$aref) {
- local $Carp::Verbose = $i++;
- local $SIG{__WARN__} = sub {
- like $_[0], $re, 'Verbose';
- };
-
- package Z;
- main::x('t');
- }
-}
-
-# $Carp::MaxEvalLen
-{
- my $test_num = 1;
- for ( 0, 4 ) {
- my $txt = "Carp::cluck($test_num)";
- local $Carp::MaxEvalLen = $_;
- local $SIG{__WARN__} = sub {
- "@_" =~ /'(.+?)(?:\n|')/s;
- is length($1),
- length( $_ ? substr( $txt, 0, $_ ) : substr( $txt, 0 ) ),
- 'MaxEvalLen';
- };
- eval "$txt";
- $test_num++;
- }
-}
-
-# $Carp::MaxArgLen
-{
- for ( 0, 4 ) {
- my $arg = 'testtest';
- local $Carp::MaxArgLen = $_;
- local $SIG{__WARN__} = sub {
- "@_" =~ /'(.+?)'/;
- is length($1),
- length( $_ ? substr( $arg, 0, $_ ) : substr( $arg, 0 ) ),
- 'MaxArgLen';
- };
-
- package Z;
- main::w($arg);
- }
-}
-
-# $Carp::MaxArgNums
-{
- my $i = 0;
- my $aref = [
- qr/1234 at \S*(?i:carp.t) line \d+\n\s*main::w\(1, 2, 3, 4\) called at \S*(?i:carp.t) line \d+/,
- qr/1234 at \S*(?i:carp.t) line \d+\n\s*main::w\(1, 2, \.\.\.\) called at \S*(?i:carp.t) line \d+/,
- ];
-
- for (@$aref) {
- local $Carp::MaxArgNums = $i++;
- local $SIG{__WARN__} = sub {
- like "@_", $_, 'MaxArgNums';
- };
-
- package Z;
- main::w( 1 .. 4 );
- }
-}
-
-# $Carp::CarpLevel
-{
- my $i = 0;
- my $aref = [
- qr/1 at \S*(?i:carp.t) line \d+\n\s*main::w\(1\) called at \S*(?i:carp.t) line \d+/,
- qr/1 at \S*(?i:carp.t) line \d+$/,
- ];
-
- for (@$aref) {
- local $Carp::CarpLevel = $i++;
- local $SIG{__WARN__} = sub {
- like "@_", $_, 'CarpLevel';
- };
-
- package Z;
- main::w(1);
- }
-}
-
-{
- local $TODO = "VMS exit status semantics don't work this way" if $Is_VMS;
-
- # Check that croak() and confess() don't clobber $!
- runperl(
- prog => 'use Carp; $@=q{Phooey}; $!=42; croak(q{Dead})',
- stderr => 1
- );
-
- is( $? >> 8, 42, 'croak() doesn\'t clobber $!' );
-
- runperl(
- prog => 'use Carp; $@=q{Phooey}; $!=42; confess(q{Dead})',
- stderr => 1
- );
-
- is( $? >> 8, 42, 'confess() doesn\'t clobber $!' );
-}
-
-# undef used to be incorrectly reported as the string "undef"
-sub cluck_undef {
-
- local $SIG{__WARN__} = sub {
- like $_[0],
- qr/^Bang! at.+\b(?i:carp\.t) line \d+\n\tmain::cluck_undef\(0, 'undef', 2, undef, 4\) called at.+\b(?i:carp\.t) line \d+$/,
- "cluck doesn't quote undef";
- };
-
- cluck "Bang!"
-
-}
-
-cluck_undef( 0, "undef", 2, undef, 4 );
-
-# check that Carp respects CORE::GLOBAL::caller override after Carp
-# has been compiled
-for my $bodge_job ( 2, 1, 0 ) {
- print '# ', ( $bodge_job ? 'Not ' : '' ),
- "setting \@DB::args in caller override\n";
- if ( $bodge_job == 1 ) {
- require B;
- print "# required B\n";
- }
- my $accum = '';
- local *CORE::GLOBAL::caller = sub {
- local *__ANON__ = "fakecaller";
- my @c = CORE::caller(@_);
- $c[0] ||= 'undef';
- $accum .= "@c[0..3]\n";
- if ( !$bodge_job && CORE::caller() eq 'DB' ) {
-
- package DB;
- return CORE::caller( ( $_[0] || 0 ) + 1 );
- }
- else {
- return CORE::caller( ( $_[0] || 0 ) + 1 );
- }
- };
- eval "scalar caller()";
- like( $accum, qr/main::fakecaller/,
- "test CORE::GLOBAL::caller override in eval" );
- $accum = '';
- my $got = A::long(42);
- like( $accum, qr/main::fakecaller/,
- "test CORE::GLOBAL::caller override in Carp" );
- my $package = 'A';
- my $where = $bodge_job == 1 ? ' in &main::__ANON__' : '';
- my $warning
- = $bodge_job
- ? "\Q** Incomplete caller override detected$where; \@DB::args were not set **\E"
- : '';
-
- for ( 0 .. 2 ) {
- my $previous_package = $package;
- ++$package;
- like( $got,
- qr/${package}::long\($warning\) called at $previous_package line \d+/,
- "Correct arguments for $package" );
- }
- my $arg = $bodge_job ? $warning : 42;
- like(
- $got, qr!A::long\($arg\) called at.+\b(?i:carp\.t) line \d+!,
- 'Correct arguments for A'
- );
-}
-
-eval <<'EOT';
-no warnings 'redefine';
-sub CORE::GLOBAL::caller {
- my $height = $_[0];
- $height++;
- return CORE::caller($height);
-}
-EOT
-
-my $got = A::long(42);
-
-like(
- $got,
- qr!A::long\(\Q** Incomplete caller override detected; \E\@DB::args\Q were not set **\E\) called at.+\b(?i:carp\.t) line \d+!,
- 'Correct arguments for A'
-);
-
-# UTF8-flagged strings should not cause Carp to try to load modules (even
-# implicitly via utf8_heavy.pl) after a syntax error [perl #82854].
-fresh_perl_like(
- q<
- use utf8; use strict; use Carp;
- BEGIN { $SIG{__DIE__} = sub { Carp::croak "aaaaa$_[0]" } }
- $c
- >,
- qr/aaaaa/,
- {stderr=>1},
- 'Carp can handle UTF8-flagged strings after a syntax error',
-);
-
-# New tests go here
-
-# line 1 "A"
-package A;
-
-sub short {
- B::short();
-}
-
-sub long {
- B::long();
-}
-
-# line 1 "B"
-package B;
-
-sub short {
- C::short();
-}
-
-sub long {
- C::long();
-}
-
-# line 1 "C"
-package C;
-
-sub short {
- D::short();
-}
-
-sub long {
- D::long();
-}
-
-# line 1 "D"
-package D;
-
-sub short {
- eval { Carp::croak("Error") };
- return $@;
-}
-
-sub long {
- eval { Carp::confess("Error") };
- return $@;
-}
-
-# Put new tests at "new tests go here"
-__END__
Deleted: vendor/perl/dist/lib/Class/ISA.pm
===================================================================
--- vendor/perl/dist/lib/Class/ISA.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Class/ISA.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,214 +0,0 @@
-#!/usr/local/bin/perl
-# Time-stamp: "2004-12-29 20:01:02 AST" -*-Perl-*-
-
-package Class::ISA;
-require 5;
-use strict;
-use vars qw($Debug $VERSION);
-$VERSION = '0.33';
-$Debug = 0 unless defined $Debug;
-
-=head1 NAME
-
-Class::ISA -- report the search path for a class's ISA tree
-
-=head1 SYNOPSIS
-
- # Suppose you go: use Food::Fishstick, and that uses and
- # inherits from other things, which in turn use and inherit
- # from other things. And suppose, for sake of brevity of
- # example, that their ISA tree is the same as:
-
- @Food::Fishstick::ISA = qw(Food::Fish Life::Fungus Chemicals);
- @Food::Fish::ISA = qw(Food);
- @Food::ISA = qw(Matter);
- @Life::Fungus::ISA = qw(Life);
- @Chemicals::ISA = qw(Matter);
- @Life::ISA = qw(Matter);
- @Matter::ISA = qw();
-
- use Class::ISA;
- print "Food::Fishstick path is:\n ",
- join(", ", Class::ISA::super_path('Food::Fishstick')),
- "\n";
-
-That prints:
-
- Food::Fishstick path is:
- Food::Fish, Food, Matter, Life::Fungus, Life, Chemicals
-
-=head1 DESCRIPTION
-
-Suppose you have a class (like Food::Fish::Fishstick) that is derived,
-via its @ISA, from one or more superclasses (as Food::Fish::Fishstick
-is from Food::Fish, Life::Fungus, and Chemicals), and some of those
-superclasses may themselves each be derived, via its @ISA, from one or
-more superclasses (as above).
-
-When, then, you call a method in that class ($fishstick->calories),
-Perl first searches there for that method, but if it's not there, it
-goes searching in its superclasses, and so on, in a depth-first (or
-maybe "height-first" is the word) search. In the above example, it'd
-first look in Food::Fish, then Food, then Matter, then Life::Fungus,
-then Life, then Chemicals.
-
-This library, Class::ISA, provides functions that return that list --
-the list (in order) of names of classes Perl would search to find a
-method, with no duplicates.
-
-=head1 FUNCTIONS
-
-=over
-
-=item the function Class::ISA::super_path($CLASS)
-
-This returns the ordered list of names of classes that Perl would
-search thru in order to find a method, with no duplicates in the list.
-$CLASS is not included in the list. UNIVERSAL is not included -- if
-you need to consider it, add it to the end.
-
-
-=item the function Class::ISA::self_and_super_path($CLASS)
-
-Just like C<super_path>, except that $CLASS is included as the first
-element.
-
-=item the function Class::ISA::self_and_super_versions($CLASS)
-
-This returns a hash whose keys are $CLASS and its
-(super-)superclasses, and whose values are the contents of each
-class's $VERSION (or undef, for classes with no $VERSION).
-
-The code for self_and_super_versions is meant to serve as an example
-for precisely the kind of tasks I anticipate that self_and_super_path
-and super_path will be used for. You are strongly advised to read the
-source for self_and_super_versions, and the comments there.
-
-=back
-
-=head1 CAUTIONARY NOTES
-
-* Class::ISA doesn't export anything. You have to address the
-functions with a "Class::ISA::" on the front.
-
-* Contrary to its name, Class::ISA isn't a class; it's just a package.
-Strange, isn't it?
-
-* Say you have a loop in the ISA tree of the class you're calling one
-of the Class::ISA functions on: say that Food inherits from Matter,
-but Matter inherits from Food (for sake of argument). If Perl, while
-searching for a method, actually discovers this cyclicity, it will
-throw a fatal error. The functions in Class::ISA effectively ignore
-this cyclicity; the Class::ISA algorithm is "never go down the same
-path twice", and cyclicities are just a special case of that.
-
-* The Class::ISA functions just look at @ISAs. But theoretically, I
-suppose, AUTOLOADs could bypass Perl's ISA-based search mechanism and
-do whatever they please. That would be bad behavior, tho; and I try
-not to think about that.
-
-* If Perl can't find a method anywhere in the ISA tree, it then looks
-in the magical class UNIVERSAL. This is rarely relevant to the tasks
-that I expect Class::ISA functions to be put to, but if it matters to
-you, then instead of this:
-
- @supers = Class::Tree::super_path($class);
-
-do this:
-
- @supers = (Class::Tree::super_path($class), 'UNIVERSAL');
-
-And don't say no-one ever told ya!
-
-* When you call them, the Class::ISA functions look at @ISAs anew --
-that is, there is no memoization, and so if ISAs change during
-runtime, you get the current ISA tree's path, not anything memoized.
-However, changing ISAs at runtime is probably a sign that you're out
-of your mind!
-
-=head1 COPYRIGHT
-
-Copyright (c) 1999, 2000 Sean M. Burke. All rights reserved.
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=head1 AUTHOR
-
-Sean M. Burke C<sburke at cpan.org>
-
-=cut
-
-###########################################################################
-
-sub self_and_super_versions {
- no strict 'refs';
- map {
- $_ => (defined(${"$_\::VERSION"}) ? ${"$_\::VERSION"} : undef)
- } self_and_super_path($_[0])
-}
-
-# Also consider magic like:
-# no strict 'refs';
-# my %class2SomeHashr =
-# map { defined(%{"$_\::SomeHash"}) ? ($_ => \%{"$_\::SomeHash"}) : () }
-# Class::ISA::self_and_super_path($class);
-# to get a hash of refs to all the defined (and non-empty) hashes in
-# $class and its superclasses.
-#
-# Or even consider this incantation for doing something like hash-data
-# inheritance:
-# no strict 'refs';
-# %union_hash =
-# map { defined(%{"$_\::SomeHash"}) ? %{"$_\::SomeHash"}) : () }
-# reverse(Class::ISA::self_and_super_path($class));
-# Consider that reverse() is necessary because with
-# %foo = ('a', 'wun', 'b', 'tiw', 'a', 'foist');
-# $foo{'a'} is 'foist', not 'wun'.
-
-###########################################################################
-sub super_path {
- my @ret = &self_and_super_path(@_);
- shift @ret if @ret;
- return @ret;
-}
-
-#--------------------------------------------------------------------------
-sub self_and_super_path {
- # Assumption: searching is depth-first.
- # Assumption: '' (empty string) can't be a class package name.
- # Note: 'UNIVERSAL' is not given any special treatment.
- return () unless @_;
-
- my @out = ();
-
- my @in_stack = ($_[0]);
- my %seen = ($_[0] => 1);
-
- my $current;
- while(@in_stack) {
- next unless defined($current = shift @in_stack) && length($current);
- print "At $current\n" if $Debug;
- push @out, $current;
- no strict 'refs';
- unshift @in_stack,
- map
- { my $c = $_; # copy, to avoid being destructive
- substr($c,0,2) = "main::" if substr($c,0,2) eq '::';
- # Canonize the :: -> main::, ::foo -> main::foo thing.
- # Should I ever canonize the Foo'Bar = Foo::Bar thing?
- $seen{$c}++ ? () : $c;
- }
- @{"$current\::ISA"}
- ;
- # I.e., if this class has any parents (at least, ones I've never seen
- # before), push them, in order, onto the stack of classes I need to
- # explore.
- }
-
- return @out;
-}
-#--------------------------------------------------------------------------
-1;
-
-__END__
Deleted: vendor/perl/dist/lib/Cwd.pm
===================================================================
--- vendor/perl/dist/lib/Cwd.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Cwd.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,824 +0,0 @@
-package Cwd;
-
-=head1 NAME
-
-Cwd - get pathname of current working directory
-
-=head1 SYNOPSIS
-
- use Cwd;
- my $dir = getcwd;
-
- use Cwd 'abs_path';
- my $abs_path = abs_path($file);
-
-=head1 DESCRIPTION
-
-This module provides functions for determining the pathname of the
-current working directory. It is recommended that getcwd (or another
-*cwd() function) be used in I<all> code to ensure portability.
-
-By default, it exports the functions cwd(), getcwd(), fastcwd(), and
-fastgetcwd() (and, on Win32, getdcwd()) into the caller's namespace.
-
-
-=head2 getcwd and friends
-
-Each of these functions are called without arguments and return the
-absolute path of the current working directory.
-
-=over 4
-
-=item getcwd
-
- my $cwd = getcwd();
-
-Returns the current working directory.
-
-Exposes the POSIX function getcwd(3) or re-implements it if it's not
-available.
-
-=item cwd
-
- my $cwd = cwd();
-
-The cwd() is the most natural form for the current architecture. For
-most systems it is identical to `pwd` (but without the trailing line
-terminator).
-
-=item fastcwd
-
- my $cwd = fastcwd();
-
-A more dangerous version of getcwd(), but potentially faster.
-
-It might conceivably chdir() you out of a directory that it can't
-chdir() you back into. If fastcwd encounters a problem it will return
-undef but will probably leave you in a different directory. For a
-measure of extra security, if everything appears to have worked, the
-fastcwd() function will check that it leaves you in the same directory
-that it started in. If it has changed it will C<die> with the message
-"Unstable directory path, current directory changed
-unexpectedly". That should never happen.
-
-=item fastgetcwd
-
- my $cwd = fastgetcwd();
-
-The fastgetcwd() function is provided as a synonym for cwd().
-
-=item getdcwd
-
- my $cwd = getdcwd();
- my $cwd = getdcwd('C:');
-
-The getdcwd() function is also provided on Win32 to get the current working
-directory on the specified drive, since Windows maintains a separate current
-working directory for each drive. If no drive is specified then the current
-drive is assumed.
-
-This function simply calls the Microsoft C library _getdcwd() function.
-
-=back
-
-
-=head2 abs_path and friends
-
-These functions are exported only on request. They each take a single
-argument and return the absolute pathname for it. If no argument is
-given they'll use the current working directory.
-
-=over 4
-
-=item abs_path
-
- my $abs_path = abs_path($file);
-
-Uses the same algorithm as getcwd(). Symbolic links and relative-path
-components ("." and "..") are resolved to return the canonical
-pathname, just like realpath(3).
-
-=item realpath
-
- my $abs_path = realpath($file);
-
-A synonym for abs_path().
-
-=item fast_abs_path
-
- my $abs_path = fast_abs_path($file);
-
-A more dangerous, but potentially faster version of abs_path.
-
-=back
-
-=head2 $ENV{PWD}
-
-If you ask to override your chdir() built-in function,
-
- use Cwd qw(chdir);
-
-then your PWD environment variable will be kept up to date. Note that
-it will only be kept up to date if all packages which use chdir import
-it from Cwd.
-
-
-=head1 NOTES
-
-=over 4
-
-=item *
-
-Since the path seperators are different on some operating systems ('/'
-on Unix, ':' on MacPerl, etc...) we recommend you use the File::Spec
-modules wherever portability is a concern.
-
-=item *
-
-Actually, on Mac OS, the C<getcwd()>, C<fastgetcwd()> and C<fastcwd()>
-functions are all aliases for the C<cwd()> function, which, on Mac OS,
-calls `pwd`. Likewise, the C<abs_path()> function is an alias for
-C<fast_abs_path()>.
-
-=back
-
-=head1 AUTHOR
-
-Originally by the perl5-porters.
-
-Maintained by Ken Williams <KWILLIAMS at cpan.org>
-
-=head1 COPYRIGHT
-
-Copyright (c) 2004 by the Perl 5 Porters. All rights reserved.
-
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-Portions of the C code in this library are copyright (c) 1994 by the
-Regents of the University of California. All rights reserved. The
-license on this code is compatible with the licensing of the rest of
-the distribution - please see the source code in F<Cwd.xs> for the
-details.
-
-=head1 SEE ALSO
-
-L<File::chdir>
-
-=cut
-
-use strict;
-use Exporter;
-use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
-
-$VERSION = '3.30';
-my $xs_version = $VERSION;
-$VERSION = eval $VERSION;
-
- at ISA = qw/ Exporter /;
- at EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
-push @EXPORT, qw(getdcwd) if $^O eq 'MSWin32';
- at EXPORT_OK = qw(chdir abs_path fast_abs_path realpath fast_realpath);
-
-# sys_cwd may keep the builtin command
-
-# All the functionality of this module may provided by builtins,
-# there is no sense to process the rest of the file.
-# The best choice may be to have this in BEGIN, but how to return from BEGIN?
-
-if ($^O eq 'os2') {
- local $^W = 0;
-
- *cwd = defined &sys_cwd ? \&sys_cwd : \&_os2_cwd;
- *getcwd = \&cwd;
- *fastgetcwd = \&cwd;
- *fastcwd = \&cwd;
-
- *fast_abs_path = \&sys_abspath if defined &sys_abspath;
- *abs_path = \&fast_abs_path;
- *realpath = \&fast_abs_path;
- *fast_realpath = \&fast_abs_path;
-
- return 1;
-}
-
-# Need to look up the feature settings on VMS. The preferred way is to use the
-# VMS::Feature module, but that may not be available to dual life modules.
-
-my $use_vms_feature;
-BEGIN {
- if ($^O eq 'VMS') {
- if (eval { local $SIG{__DIE__}; require VMS::Feature; }) {
- $use_vms_feature = 1;
- }
- }
-}
-
-# Need to look up the UNIX report mode. This may become a dynamic mode
-# in the future.
-sub _vms_unix_rpt {
- my $unix_rpt;
- if ($use_vms_feature) {
- $unix_rpt = VMS::Feature::current("filename_unix_report");
- } else {
- my $env_unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || '';
- $unix_rpt = $env_unix_rpt =~ /^[ET1]/i;
- }
- return $unix_rpt;
-}
-
-# Need to look up the EFS character set mode. This may become a dynamic
-# mode in the future.
-sub _vms_efs {
- my $efs;
- if ($use_vms_feature) {
- $efs = VMS::Feature::current("efs_charset");
- } else {
- my $env_efs = $ENV{'DECC$EFS_CHARSET'} || '';
- $efs = $env_efs =~ /^[ET1]/i;
- }
- return $efs;
-}
-
-
-# If loading the XS stuff doesn't work, we can fall back to pure perl
-eval {
- if ( $] >= 5.006 ) {
- require XSLoader;
- XSLoader::load( __PACKAGE__, $xs_version);
- } else {
- require DynaLoader;
- push @ISA, 'DynaLoader';
- __PACKAGE__->bootstrap( $xs_version );
- }
-};
-
-# Must be after the DynaLoader stuff:
-$VERSION = eval $VERSION;
-
-# Big nasty table of function aliases
-my %METHOD_MAP =
- (
- VMS =>
- {
- cwd => '_vms_cwd',
- getcwd => '_vms_cwd',
- fastcwd => '_vms_cwd',
- fastgetcwd => '_vms_cwd',
- abs_path => '_vms_abs_path',
- fast_abs_path => '_vms_abs_path',
- },
-
- MSWin32 =>
- {
- # We assume that &_NT_cwd is defined as an XSUB or in the core.
- cwd => '_NT_cwd',
- getcwd => '_NT_cwd',
- fastcwd => '_NT_cwd',
- fastgetcwd => '_NT_cwd',
- abs_path => 'fast_abs_path',
- realpath => 'fast_abs_path',
- },
-
- dos =>
- {
- cwd => '_dos_cwd',
- getcwd => '_dos_cwd',
- fastgetcwd => '_dos_cwd',
- fastcwd => '_dos_cwd',
- abs_path => 'fast_abs_path',
- },
-
- # QNX4. QNX6 has a $os of 'nto'.
- qnx =>
- {
- cwd => '_qnx_cwd',
- getcwd => '_qnx_cwd',
- fastgetcwd => '_qnx_cwd',
- fastcwd => '_qnx_cwd',
- abs_path => '_qnx_abs_path',
- fast_abs_path => '_qnx_abs_path',
- },
-
- cygwin =>
- {
- getcwd => 'cwd',
- fastgetcwd => 'cwd',
- fastcwd => 'cwd',
- abs_path => 'fast_abs_path',
- realpath => 'fast_abs_path',
- },
-
- epoc =>
- {
- cwd => '_epoc_cwd',
- getcwd => '_epoc_cwd',
- fastgetcwd => '_epoc_cwd',
- fastcwd => '_epoc_cwd',
- abs_path => 'fast_abs_path',
- },
-
- MacOS =>
- {
- getcwd => 'cwd',
- fastgetcwd => 'cwd',
- fastcwd => 'cwd',
- abs_path => 'fast_abs_path',
- },
- );
-
-$METHOD_MAP{NT} = $METHOD_MAP{MSWin32};
-
-
-# Find the pwd command in the expected locations. We assume these
-# are safe. This prevents _backtick_pwd() consulting $ENV{PATH}
-# so everything works under taint mode.
-my $pwd_cmd;
-foreach my $try ('/bin/pwd',
- '/usr/bin/pwd',
- '/QOpenSys/bin/pwd', # OS/400 PASE.
- ) {
-
- if( -x $try ) {
- $pwd_cmd = $try;
- last;
- }
-}
-my $found_pwd_cmd = defined($pwd_cmd);
-unless ($pwd_cmd) {
- # Isn't this wrong? _backtick_pwd() will fail if somenone has
- # pwd in their path but it is not /bin/pwd or /usr/bin/pwd?
- # See [perl #16774]. --jhi
- $pwd_cmd = 'pwd';
-}
-
-# Lazy-load Carp
-sub _carp { require Carp; Carp::carp(@_) }
-sub _croak { require Carp; Carp::croak(@_) }
-
-# The 'natural and safe form' for UNIX (pwd may be setuid root)
-sub _backtick_pwd {
- # Localize %ENV entries in a way that won't create new hash keys
- my @localize = grep exists $ENV{$_}, qw(PATH IFS CDPATH ENV BASH_ENV);
- local @ENV{@localize};
-
- my $cwd = `$pwd_cmd`;
- # Belt-and-suspenders in case someone said "undef $/".
- local $/ = "\n";
- # `pwd` may fail e.g. if the disk is full
- chomp($cwd) if defined $cwd;
- $cwd;
-}
-
-# Since some ports may predefine cwd internally (e.g., NT)
-# we take care not to override an existing definition for cwd().
-
-unless ($METHOD_MAP{$^O}{cwd} or defined &cwd) {
- # The pwd command is not available in some chroot(2)'ed environments
- my $sep = $Config::Config{path_sep} || ':';
- my $os = $^O; # Protect $^O from tainting
-
-
- # Try again to find a pwd, this time searching the whole PATH.
- if (defined $ENV{PATH} and $os ne 'MSWin32') { # no pwd on Windows
- my @candidates = split($sep, $ENV{PATH});
- while (!$found_pwd_cmd and @candidates) {
- my $candidate = shift @candidates;
- $found_pwd_cmd = 1 if -x "$candidate/pwd";
- }
- }
-
- # MacOS has some special magic to make `pwd` work.
- if( $os eq 'MacOS' || $found_pwd_cmd )
- {
- *cwd = \&_backtick_pwd;
- }
- else {
- *cwd = \&getcwd;
- }
-}
-
-if ($^O eq 'cygwin') {
- # We need to make sure cwd() is called with no args, because it's
- # got an arg-less prototype and will die if args are present.
- local $^W = 0;
- my $orig_cwd = \&cwd;
- *cwd = sub { &$orig_cwd() }
-}
-
-
-# set a reasonable (and very safe) default for fastgetcwd, in case it
-# isn't redefined later (20001212 rspier)
-*fastgetcwd = \&cwd;
-
-# A non-XS version of getcwd() - also used to bootstrap the perl build
-# process, when miniperl is running and no XS loading happens.
-sub _perl_getcwd
-{
- abs_path('.');
-}
-
-# By John Bazik
-#
-# Usage: $cwd = &fastcwd;
-#
-# This is a faster version of getcwd. It's also more dangerous because
-# you might chdir out of a directory that you can't chdir back into.
-
-sub fastcwd_ {
- my($odev, $oino, $cdev, $cino, $tdev, $tino);
- my(@path, $path);
- local(*DIR);
-
- my($orig_cdev, $orig_cino) = stat('.');
- ($cdev, $cino) = ($orig_cdev, $orig_cino);
- for (;;) {
- my $direntry;
- ($odev, $oino) = ($cdev, $cino);
- CORE::chdir('..') || return undef;
- ($cdev, $cino) = stat('.');
- last if $odev == $cdev && $oino == $cino;
- opendir(DIR, '.') || return undef;
- for (;;) {
- $direntry = readdir(DIR);
- last unless defined $direntry;
- next if $direntry eq '.';
- next if $direntry eq '..';
-
- ($tdev, $tino) = lstat($direntry);
- last unless $tdev != $odev || $tino != $oino;
- }
- closedir(DIR);
- return undef unless defined $direntry; # should never happen
- unshift(@path, $direntry);
- }
- $path = '/' . join('/', @path);
- if ($^O eq 'apollo') { $path = "/".$path; }
- # At this point $path may be tainted (if tainting) and chdir would fail.
- # Untaint it then check that we landed where we started.
- $path =~ /^(.*)\z/s # untaint
- && CORE::chdir($1) or return undef;
- ($cdev, $cino) = stat('.');
- die "Unstable directory path, current directory changed unexpectedly"
- if $cdev != $orig_cdev || $cino != $orig_cino;
- $path;
-}
-if (not defined &fastcwd) { *fastcwd = \&fastcwd_ }
-
-
-# Keeps track of current working directory in PWD environment var
-# Usage:
-# use Cwd 'chdir';
-# chdir $newdir;
-
-my $chdir_init = 0;
-
-sub chdir_init {
- if ($ENV{'PWD'} and $^O ne 'os2' and $^O ne 'dos' and $^O ne 'MSWin32') {
- my($dd,$di) = stat('.');
- my($pd,$pi) = stat($ENV{'PWD'});
- if (!defined $dd or !defined $pd or $di != $pi or $dd != $pd) {
- $ENV{'PWD'} = cwd();
- }
- }
- else {
- my $wd = cwd();
- $wd = Win32::GetFullPathName($wd) if $^O eq 'MSWin32';
- $ENV{'PWD'} = $wd;
- }
- # Strip an automounter prefix (where /tmp_mnt/foo/bar == /foo/bar)
- if ($^O ne 'MSWin32' and $ENV{'PWD'} =~ m|(/[^/]+(/[^/]+/[^/]+))(.*)|s) {
- my($pd,$pi) = stat($2);
- my($dd,$di) = stat($1);
- if (defined $pd and defined $dd and $di == $pi and $dd == $pd) {
- $ENV{'PWD'}="$2$3";
- }
- }
- $chdir_init = 1;
-}
-
-sub chdir {
- my $newdir = @_ ? shift : ''; # allow for no arg (chdir to HOME dir)
- $newdir =~ s|///*|/|g unless $^O eq 'MSWin32';
- chdir_init() unless $chdir_init;
- my $newpwd;
- if ($^O eq 'MSWin32') {
- # get the full path name *before* the chdir()
- $newpwd = Win32::GetFullPathName($newdir);
- }
-
- return 0 unless CORE::chdir $newdir;
-
- if ($^O eq 'VMS') {
- return $ENV{'PWD'} = $ENV{'DEFAULT'}
- }
- elsif ($^O eq 'MacOS') {
- return $ENV{'PWD'} = cwd();
- }
- elsif ($^O eq 'MSWin32') {
- $ENV{'PWD'} = $newpwd;
- return 1;
- }
-
- if (ref $newdir eq 'GLOB') { # in case a file/dir handle is passed in
- $ENV{'PWD'} = cwd();
- } elsif ($newdir =~ m#^/#s) {
- $ENV{'PWD'} = $newdir;
- } else {
- my @curdir = split(m#/#,$ENV{'PWD'});
- @curdir = ('') unless @curdir;
- my $component;
- foreach $component (split(m#/#, $newdir)) {
- next if $component eq '.';
- pop(@curdir),next if $component eq '..';
- push(@curdir,$component);
- }
- $ENV{'PWD'} = join('/', at curdir) || '/';
- }
- 1;
-}
-
-
-sub _perl_abs_path
-{
- my $start = @_ ? shift : '.';
- my($dotdots, $cwd, @pst, @cst, $dir, @tst);
-
- unless (@cst = stat( $start ))
- {
- _carp("stat($start): $!");
- return '';
- }
-
- unless (-d _) {
- # Make sure we can be invoked on plain files, not just directories.
- # NOTE that this routine assumes that '/' is the only directory separator.
-
- my ($dir, $file) = $start =~ m{^(.*)/(.+)$}
- or return cwd() . '/' . $start;
-
- # Can't use "-l _" here, because the previous stat was a stat(), not an lstat().
- if (-l $start) {
- my $link_target = readlink($start);
- die "Can't resolve link $start: $!" unless defined $link_target;
-
- require File::Spec;
- $link_target = $dir . '/' . $link_target
- unless File::Spec->file_name_is_absolute($link_target);
-
- return abs_path($link_target);
- }
-
- return $dir ? abs_path($dir) . "/$file" : "/$file";
- }
-
- $cwd = '';
- $dotdots = $start;
- do
- {
- $dotdots .= '/..';
- @pst = @cst;
- local *PARENT;
- unless (opendir(PARENT, $dotdots))
- {
- # probably a permissions issue. Try the native command.
- return File::Spec->rel2abs( $start, _backtick_pwd() );
- }
- unless (@cst = stat($dotdots))
- {
- _carp("stat($dotdots): $!");
- closedir(PARENT);
- return '';
- }
- if ($pst[0] == $cst[0] && $pst[1] == $cst[1])
- {
- $dir = undef;
- }
- else
- {
- do
- {
- unless (defined ($dir = readdir(PARENT)))
- {
- _carp("readdir($dotdots): $!");
- closedir(PARENT);
- return '';
- }
- $tst[0] = $pst[0]+1 unless (@tst = lstat("$dotdots/$dir"))
- }
- while ($dir eq '.' || $dir eq '..' || $tst[0] != $pst[0] ||
- $tst[1] != $pst[1]);
- }
- $cwd = (defined $dir ? "$dir" : "" ) . "/$cwd" ;
- closedir(PARENT);
- } while (defined $dir);
- chop($cwd) unless $cwd eq '/'; # drop the trailing /
- $cwd;
-}
-
-
-my $Curdir;
-sub fast_abs_path {
- local $ENV{PWD} = $ENV{PWD} || ''; # Guard against clobberage
- my $cwd = getcwd();
- require File::Spec;
- my $path = @_ ? shift : ($Curdir ||= File::Spec->curdir);
-
- # Detaint else we'll explode in taint mode. This is safe because
- # we're not doing anything dangerous with it.
- ($path) = $path =~ /(.*)/;
- ($cwd) = $cwd =~ /(.*)/;
-
- unless (-e $path) {
- _croak("$path: No such file or directory");
- }
-
- unless (-d _) {
- # Make sure we can be invoked on plain files, not just directories.
-
- my ($vol, $dir, $file) = File::Spec->splitpath($path);
- return File::Spec->catfile($cwd, $path) unless length $dir;
-
- if (-l $path) {
- my $link_target = readlink($path);
- die "Can't resolve link $path: $!" unless defined $link_target;
-
- $link_target = File::Spec->catpath($vol, $dir, $link_target)
- unless File::Spec->file_name_is_absolute($link_target);
-
- return fast_abs_path($link_target);
- }
-
- return $dir eq File::Spec->rootdir
- ? File::Spec->catpath($vol, $dir, $file)
- : fast_abs_path(File::Spec->catpath($vol, $dir, '')) . '/' . $file;
- }
-
- if (!CORE::chdir($path)) {
- _croak("Cannot chdir to $path: $!");
- }
- my $realpath = getcwd();
- if (! ((-d $cwd) && (CORE::chdir($cwd)))) {
- _croak("Cannot chdir back to $cwd: $!");
- }
- $realpath;
-}
-
-# added function alias to follow principle of least surprise
-# based on previous aliasing. --tchrist 27-Jan-00
-*fast_realpath = \&fast_abs_path;
-
-
-# --- PORTING SECTION ---
-
-# VMS: $ENV{'DEFAULT'} points to default directory at all times
-# 06-Mar-1996 Charles Bailey bailey at newman.upenn.edu
-# Note: Use of Cwd::chdir() causes the logical name PWD to be defined
-# in the process logical name table as the default device and directory
-# seen by Perl. This may not be the same as the default device
-# and directory seen by DCL after Perl exits, since the effects
-# the CRTL chdir() function persist only until Perl exits.
-
-sub _vms_cwd {
- return $ENV{'DEFAULT'};
-}
-
-sub _vms_abs_path {
- return $ENV{'DEFAULT'} unless @_;
- my $path = shift;
-
- my $efs = _vms_efs;
- my $unix_rpt = _vms_unix_rpt;
-
- if (defined &VMS::Filespec::vmsrealpath) {
- my $path_unix = 0;
- my $path_vms = 0;
-
- $path_unix = 1 if ($path =~ m#(?<=\^)/#);
- $path_unix = 1 if ($path =~ /^\.\.?$/);
- $path_vms = 1 if ($path =~ m#[\[<\]]#);
- $path_vms = 1 if ($path =~ /^--?$/);
-
- my $unix_mode = $path_unix;
- if ($efs) {
- # In case of a tie, the Unix report mode decides.
- if ($path_vms == $path_unix) {
- $unix_mode = $unix_rpt;
- } else {
- $unix_mode = 0 if $path_vms;
- }
- }
-
- if ($unix_mode) {
- # Unix format
- return VMS::Filespec::unixrealpath($path);
- }
-
- # VMS format
-
- my $new_path = VMS::Filespec::vmsrealpath($path);
-
- # Perl expects directories to be in directory format
- $new_path = VMS::Filespec::pathify($new_path) if -d $path;
- return $new_path;
- }
-
- # Fallback to older algorithm if correct ones are not
- # available.
-
- if (-l $path) {
- my $link_target = readlink($path);
- die "Can't resolve link $path: $!" unless defined $link_target;
-
- return _vms_abs_path($link_target);
- }
-
- # may need to turn foo.dir into [.foo]
- my $pathified = VMS::Filespec::pathify($path);
- $path = $pathified if defined $pathified;
-
- return VMS::Filespec::rmsexpand($path);
-}
-
-sub _os2_cwd {
- $ENV{'PWD'} = `cmd /c cd`;
- chomp $ENV{'PWD'};
- $ENV{'PWD'} =~ s:\\:/:g ;
- return $ENV{'PWD'};
-}
-
-sub _win32_cwd {
- if (defined &DynaLoader::boot_DynaLoader) {
- $ENV{'PWD'} = Win32::GetCwd();
- }
- else { # miniperl
- chomp($ENV{'PWD'} = `cd`);
- }
- $ENV{'PWD'} =~ s:\\:/:g ;
- return $ENV{'PWD'};
-}
-
-*_NT_cwd = defined &Win32::GetCwd ? \&_win32_cwd : \&_os2_cwd;
-
-sub _dos_cwd {
- if (!defined &Dos::GetCwd) {
- $ENV{'PWD'} = `command /c cd`;
- chomp $ENV{'PWD'};
- $ENV{'PWD'} =~ s:\\:/:g ;
- } else {
- $ENV{'PWD'} = Dos::GetCwd();
- }
- return $ENV{'PWD'};
-}
-
-sub _qnx_cwd {
- local $ENV{PATH} = '';
- local $ENV{CDPATH} = '';
- local $ENV{ENV} = '';
- $ENV{'PWD'} = `/usr/bin/fullpath -t`;
- chomp $ENV{'PWD'};
- return $ENV{'PWD'};
-}
-
-sub _qnx_abs_path {
- local $ENV{PATH} = '';
- local $ENV{CDPATH} = '';
- local $ENV{ENV} = '';
- my $path = @_ ? shift : '.';
- local *REALPATH;
-
- defined( open(REALPATH, '-|') || exec '/usr/bin/fullpath', '-t', $path ) or
- die "Can't open /usr/bin/fullpath: $!";
- my $realpath = <REALPATH>;
- close REALPATH;
- chomp $realpath;
- return $realpath;
-}
-
-sub _epoc_cwd {
- $ENV{'PWD'} = EPOC::getcwd();
- return $ENV{'PWD'};
-}
-
-
-# Now that all the base-level functions are set up, alias the
-# user-level functions to the right places
-
-if (exists $METHOD_MAP{$^O}) {
- my $map = $METHOD_MAP{$^O};
- foreach my $name (keys %$map) {
- local $^W = 0; # assignments trigger 'subroutine redefined' warning
- no strict 'refs';
- *{$name} = \&{$map->{$name}};
- }
-}
-
-# In case the XS version doesn't load.
-*abs_path = \&_perl_abs_path unless defined &abs_path;
-*getcwd = \&_perl_getcwd unless defined &getcwd;
-
-# added function alias for those of us more
-# used to the libc function. --tchrist 27-Jan-00
-*realpath = \&abs_path;
-
-1;
Deleted: vendor/perl/dist/lib/Digest.pm
===================================================================
--- vendor/perl/dist/lib/Digest.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Digest.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,316 +0,0 @@
-package Digest;
-
-use strict;
-use vars qw($VERSION %MMAP $AUTOLOAD);
-
-$VERSION = "1.16";
-
-%MMAP = (
- "SHA-1" => [["Digest::SHA", 1], "Digest::SHA1", ["Digest::SHA2", 1]],
- "SHA-224" => [["Digest::SHA", 224]],
- "SHA-256" => [["Digest::SHA", 256], ["Digest::SHA2", 256]],
- "SHA-384" => [["Digest::SHA", 384], ["Digest::SHA2", 384]],
- "SHA-512" => [["Digest::SHA", 512], ["Digest::SHA2", 512]],
- "HMAC-MD5" => "Digest::HMAC_MD5",
- "HMAC-SHA-1" => "Digest::HMAC_SHA1",
- "CRC-16" => [["Digest::CRC", type => "crc16"]],
- "CRC-32" => [["Digest::CRC", type => "crc32"]],
- "CRC-CCITT" => [["Digest::CRC", type => "crcccitt"]],
- "RIPEMD-160" => "Crypt::PIPEMD160",
-);
-
-sub new
-{
- shift; # class ignored
- my $algorithm = shift;
- my $impl = $MMAP{$algorithm} || do {
- $algorithm =~ s/\W+//;
- "Digest::$algorithm";
- };
- $impl = [$impl] unless ref($impl);
- my $err;
- for (@$impl) {
- my $class = $_;
- my @args;
- ($class, @args) = @$class if ref($class);
- no strict 'refs';
- unless (exists ${"$class\::"}{"VERSION"}) {
- eval "require $class";
- if ($@) {
- $err ||= $@;
- next;
- }
- }
- return $class->new(@args, @_);
- }
- die $err;
-}
-
-sub AUTOLOAD
-{
- my $class = shift;
- my $algorithm = substr($AUTOLOAD, rindex($AUTOLOAD, '::')+2);
- $class->new($algorithm, @_);
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Digest - Modules that calculate message digests
-
-=head1 SYNOPSIS
-
- $md5 = Digest->new("MD5");
- $sha1 = Digest->new("SHA-1");
- $sha256 = Digest->new("SHA-256");
- $sha384 = Digest->new("SHA-384");
- $sha512 = Digest->new("SHA-512");
-
- $hmac = Digest->HMAC_MD5($key);
-
-=head1 DESCRIPTION
-
-The C<Digest::> modules calculate digests, also called "fingerprints"
-or "hashes", of some data, called a message. The digest is (usually)
-some small/fixed size string. The actual size of the digest depend of
-the algorithm used. The message is simply a sequence of arbitrary
-bytes or bits.
-
-An important property of the digest algorithms is that the digest is
-I<likely> to change if the message change in some way. Another
-property is that digest functions are one-way functions, that is it
-should be I<hard> to find a message that correspond to some given
-digest. Algorithms differ in how "likely" and how "hard", as well as
-how efficient they are to compute.
-
-Note that the properties of the algorithms change over time, as the
-algorithms are analyzed and machines grow faster. If your application
-for instance depends on it being "impossible" to generate the same
-digest for a different message it is wise to make it easy to plug in
-stronger algorithms as the one used grow weaker. Using the interface
-documented here should make it easy to change algorithms later.
-
-All C<Digest::> modules provide the same programming interface. A
-functional interface for simple use, as well as an object oriented
-interface that can handle messages of arbitrary length and which can
-read files directly.
-
-The digest can be delivered in three formats:
-
-=over 8
-
-=item I<binary>
-
-This is the most compact form, but it is not well suited for printing
-or embedding in places that can't handle arbitrary data.
-
-=item I<hex>
-
-A twice as long string of lowercase hexadecimal digits.
-
-=item I<base64>
-
-A string of portable printable characters. This is the base64 encoded
-representation of the digest with any trailing padding removed. The
-string will be about 30% longer than the binary version.
-L<MIME::Base64> tells you more about this encoding.
-
-=back
-
-
-The functional interface is simply importable functions with the same
-name as the algorithm. The functions take the message as argument and
-return the digest. Example:
-
- use Digest::MD5 qw(md5);
- $digest = md5($message);
-
-There are also versions of the functions with "_hex" or "_base64"
-appended to the name, which returns the digest in the indicated form.
-
-=head1 OO INTERFACE
-
-The following methods are available for all C<Digest::> modules:
-
-=over 4
-
-=item $ctx = Digest->XXX($arg,...)
-
-=item $ctx = Digest->new(XXX => $arg,...)
-
-=item $ctx = Digest::XXX->new($arg,...)
-
-The constructor returns some object that encapsulate the state of the
-message-digest algorithm. You can add data to the object and finally
-ask for the digest. The "XXX" should of course be replaced by the proper
-name of the digest algorithm you want to use.
-
-The two first forms are simply syntactic sugar which automatically
-load the right module on first use. The second form allow you to use
-algorithm names which contains letters which are not legal perl
-identifiers, e.g. "SHA-1". If no implementation for the given algorithm
-can be found, then an exception is raised.
-
-If new() is called as an instance method (i.e. $ctx->new) it will just
-reset the state the object to the state of a newly created object. No
-new object is created in this case, and the return value is the
-reference to the object (i.e. $ctx).
-
-=item $other_ctx = $ctx->clone
-
-The clone method creates a copy of the digest state object and returns
-a reference to the copy.
-
-=item $ctx->reset
-
-This is just an alias for $ctx->new.
-
-=item $ctx->add( $data )
-
-=item $ctx->add( $chunk1, $chunk2, ... )
-
-The string value of the $data provided as argument is appended to the
-message we calculate the digest for. The return value is the $ctx
-object itself.
-
-If more arguments are provided then they are all appended to the
-message, thus all these lines will have the same effect on the state
-of the $ctx object:
-
- $ctx->add("a"); $ctx->add("b"); $ctx->add("c");
- $ctx->add("a")->add("b")->add("c");
- $ctx->add("a", "b", "c");
- $ctx->add("abc");
-
-Most algorithms are only defined for strings of bytes and this method
-might therefore croak if the provided arguments contain chars with
-ordinal number above 255.
-
-=item $ctx->addfile( $io_handle )
-
-The $io_handle is read until EOF and the content is appended to the
-message we calculate the digest for. The return value is the $ctx
-object itself.
-
-The addfile() method will croak() if it fails reading data for some
-reason. If it croaks it is unpredictable what the state of the $ctx
-object will be in. The addfile() method might have been able to read
-the file partially before it failed. It is probably wise to discard
-or reset the $ctx object if this occurs.
-
-In most cases you want to make sure that the $io_handle is in
-"binmode" before you pass it as argument to the addfile() method.
-
-=item $ctx->add_bits( $data, $nbits )
-
-=item $ctx->add_bits( $bitstring )
-
-The add_bits() method is an alternative to add() that allow partial
-bytes to be appended to the message. Most users should just ignore
-this method as partial bytes is very unlikely to be of any practical
-use.
-
-The two argument form of add_bits() will add the first $nbits bits
-from $data. For the last potentially partial byte only the high order
-C<< $nbits % 8 >> bits are used. If $nbits is greater than C<<
-length($data) * 8 >>, then this method would do the same as C<<
-$ctx->add($data) >>.
-
-The one argument form of add_bits() takes a $bitstring of "1" and "0"
-chars as argument. It's a shorthand for C<< $ctx->add_bits(pack("B*",
-$bitstring), length($bitstring)) >>.
-
-The return value is the $ctx object itself.
-
-This example shows two calls that should have the same effect:
-
- $ctx->add_bits("111100001010");
- $ctx->add_bits("\xF0\xA0", 12);
-
-Most digest algorithms are byte based and for these it is not possible
-to add bits that are not a multiple of 8, and the add_bits() method
-will croak if you try.
-
-=item $ctx->digest
-
-Return the binary digest for the message.
-
-Note that the C<digest> operation is effectively a destructive,
-read-once operation. Once it has been performed, the $ctx object is
-automatically C<reset> and can be used to calculate another digest
-value. Call $ctx->clone->digest if you want to calculate the digest
-without resetting the digest state.
-
-=item $ctx->hexdigest
-
-Same as $ctx->digest, but will return the digest in hexadecimal form.
-
-=item $ctx->b64digest
-
-Same as $ctx->digest, but will return the digest as a base64 encoded
-string.
-
-=back
-
-=head1 Digest speed
-
-This table should give some indication on the relative speed of
-different algorithms. It is sorted by throughput based on a benchmark
-done with of some implementations of this API:
-
- Algorithm Size Implementation MB/s
-
- MD4 128 Digest::MD4 v1.3 165.0
- MD5 128 Digest::MD5 v2.33 98.8
- SHA-256 256 Digest::SHA2 v1.1.0 66.7
- SHA-1 160 Digest::SHA v4.3.1 58.9
- SHA-1 160 Digest::SHA1 v2.10 48.8
- SHA-256 256 Digest::SHA v4.3.1 41.3
- Haval-256 256 Digest::Haval256 v1.0.4 39.8
- SHA-384 384 Digest::SHA2 v1.1.0 19.6
- SHA-512 512 Digest::SHA2 v1.1.0 19.3
- SHA-384 384 Digest::SHA v4.3.1 19.2
- SHA-512 512 Digest::SHA v4.3.1 19.2
- Whirlpool 512 Digest::Whirlpool v1.0.2 13.0
- MD2 128 Digest::MD2 v2.03 9.5
-
- Adler-32 32 Digest::Adler32 v0.03 1.3
- CRC-16 16 Digest::CRC v0.05 1.1
- CRC-32 32 Digest::CRC v0.05 1.1
- MD5 128 Digest::Perl::MD5 v1.5 1.0
- CRC-CCITT 16 Digest::CRC v0.05 0.8
-
-These numbers was achieved Apr 2004 with ActivePerl-5.8.3 running
-under Linux on a P4 2.8 GHz CPU. The last 5 entries differ by being
-pure perl implementations of the algorithms, which explains why they
-are so slow.
-
-=head1 SEE ALSO
-
-L<Digest::Adler32>, L<Digest::CRC>, L<Digest::Haval256>,
-L<Digest::HMAC>, L<Digest::MD2>, L<Digest::MD4>, L<Digest::MD5>,
-L<Digest::SHA>, L<Digest::SHA1>, L<Digest::SHA2>, L<Digest::Whirlpool>
-
-New digest implementations should consider subclassing from L<Digest::base>.
-
-L<MIME::Base64>
-
-http://en.wikipedia.org/wiki/Cryptographic_hash_function
-
-=head1 AUTHOR
-
-Gisle Aas <gisle at aas.no>
-
-The C<Digest::> interface is based on the interface originally
-developed by Neil Winton for his C<MD5> module.
-
-This library is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
-
- Copyright 1998-2006 Gisle Aas.
- Copyright 1995,1996 Neil Winton.
-
-=cut
Deleted: vendor/perl/dist/lib/Dumpvalue.pm
===================================================================
--- vendor/perl/dist/lib/Dumpvalue.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Dumpvalue.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,648 +0,0 @@
-use 5.006_001; # for (defined ref) and $#$v and our
-package Dumpvalue;
-use strict;
-our $VERSION = '1.13';
-our(%address, $stab, @stab, %stab, %subs);
-
-# documentation nits, handle complex data structures better by chromatic
-# translate control chars to ^X - Randal Schwartz
-# Modifications to print types by Peter Gordon v1.0
-
-# Ilya Zakharevich -- patches after 5.001 (and some before ;-)
-
-# Won't dump symbol tables and contents of debugged files by default
-
-# (IZ) changes for objectification:
-# c) quote() renamed to method set_quote();
-# d) unctrlSet() renamed to method set_unctrl();
-# f) Compiles with `use strict', but in two places no strict refs is needed:
-# maybe more problems are waiting...
-
-my %defaults = (
- globPrint => 0,
- printUndef => 1,
- tick => "auto",
- unctrl => 'quote',
- subdump => 1,
- dumpReused => 0,
- bareStringify => 1,
- hashDepth => '',
- arrayDepth => '',
- dumpDBFiles => '',
- dumpPackages => '',
- quoteHighBit => '',
- usageOnly => '',
- compactDump => '',
- veryCompact => '',
- stopDbSignal => '',
- );
-
-sub new {
- my $class = shift;
- my %opt = (%defaults, @_);
- bless \%opt, $class;
-}
-
-sub set {
- my $self = shift;
- my %opt = @_;
- @$self{keys %opt} = values %opt;
-}
-
-sub get {
- my $self = shift;
- wantarray ? @$self{@_} : $$self{pop @_};
-}
-
-sub dumpValue {
- my $self = shift;
- die "usage: \$dumper->dumpValue(value)" unless @_ == 1;
- local %address;
- local $^W=0;
- (print "undef\n"), return unless defined $_[0];
- (print $self->stringify($_[0]), "\n"), return unless ref $_[0];
- $self->unwrap($_[0],0);
-}
-
-sub dumpValues {
- my $self = shift;
- local %address;
- local $^W=0;
- (print "undef\n"), return unless defined $_[0];
- $self->unwrap(\@_,0);
-}
-
-# This one is good for variable names:
-
-sub unctrl {
- local($_) = @_;
-
- return \$_ if ref \$_ eq "GLOB";
- s/([\001-\037\177])/'^'.pack('c',ord($1)^64)/eg;
- $_;
-}
-
-sub stringify {
- my $self = shift;
- local $_ = shift;
- my $noticks = shift;
- my $tick = $self->{tick};
-
- return 'undef' unless defined $_ or not $self->{printUndef};
- return $_ . "" if ref \$_ eq 'GLOB';
- { no strict 'refs';
- $_ = &{'overload::StrVal'}($_)
- if $self->{bareStringify} and ref $_
- and %overload:: and defined &{'overload::StrVal'};
- }
-
- if ($tick eq 'auto') {
- if (/[\000-\011\013-\037\177]/) {
- $tick = '"';
- } else {
- $tick = "'";
- }
- }
- if ($tick eq "'") {
- s/([\'\\])/\\$1/g;
- } elsif ($self->{unctrl} eq 'unctrl') {
- s/([\"\\])/\\$1/g ;
- s/([\000-\037\177])/'^'.pack('c',ord($1)^64)/eg;
- s/([\200-\377])/'\\0x'.sprintf('%2X',ord($1))/eg
- if $self->{quoteHighBit};
- } elsif ($self->{unctrl} eq 'quote') {
- s/([\"\\\$\@])/\\$1/g if $tick eq '"';
- s/\033/\\e/g;
- s/([\000-\037\177])/'\\c'.chr(ord($1)^64)/eg;
- }
- s/([\200-\377])/'\\'.sprintf('%3o',ord($1))/eg if $self->{quoteHighBit};
- ($noticks || /^\d+(\.\d*)?\Z/)
- ? $_
- : $tick . $_ . $tick;
-}
-
-sub DumpElem {
- my ($self, $v) = (shift, shift);
- my $short = $self->stringify($v, ref $v);
- my $shortmore = '';
- if ($self->{veryCompact} && ref $v
- && (ref $v eq 'ARRAY' and !grep(ref $_, @$v) )) {
- my $depth = $#$v;
- ($shortmore, $depth) = (' ...', $self->{arrayDepth} - 1)
- if $self->{arrayDepth} and $depth >= $self->{arrayDepth};
- my @a = map $self->stringify($_), @$v[0..$depth];
- print "0..$#{$v} @a$shortmore\n";
- } elsif ($self->{veryCompact} && ref $v
- && (ref $v eq 'HASH') and !grep(ref $_, values %$v)) {
- my @a = sort keys %$v;
- my $depth = $#a;
- ($shortmore, $depth) = (' ...', $self->{hashDepth} - 1)
- if $self->{hashDepth} and $depth >= $self->{hashDepth};
- my @b = map {$self->stringify($_) . " => " . $self->stringify($$v{$_})}
- @a[0..$depth];
- local $" = ', ';
- print "@b$shortmore\n";
- } else {
- print "$short\n";
- $self->unwrap($v,shift);
- }
-}
-
-sub unwrap {
- my $self = shift;
- return if $DB::signal and $self->{stopDbSignal};
- my ($v) = shift ;
- my ($s) = shift ; # extra no of spaces
- my $sp;
- my (%v, at v,$address,$short,$fileno);
-
- $sp = " " x $s ;
- $s += 3 ;
-
- # Check for reused addresses
- if (ref $v) {
- my $val = $v;
- { no strict 'refs';
- $val = &{'overload::StrVal'}($v)
- if %overload:: and defined &{'overload::StrVal'};
- }
- ($address) = $val =~ /(0x[0-9a-f]+)\)$/ ;
- if (!$self->{dumpReused} && defined $address) {
- $address{$address}++ ;
- if ( $address{$address} > 1 ) {
- print "${sp}-> REUSED_ADDRESS\n" ;
- return ;
- }
- }
- } elsif (ref \$v eq 'GLOB') {
- $address = "$v" . ""; # To avoid a bug with globs
- $address{$address}++ ;
- if ( $address{$address} > 1 ) {
- print "${sp}*DUMPED_GLOB*\n" ;
- return ;
- }
- }
-
- if (ref $v eq 'Regexp') {
- my $re = "$v";
- $re =~ s,/,\\/,g;
- print "$sp-> qr/$re/\n";
- return;
- }
-
- if ( UNIVERSAL::isa($v, 'HASH') ) {
- my @sortKeys = sort keys(%$v) ;
- my $more;
- my $tHashDepth = $#sortKeys ;
- $tHashDepth = $#sortKeys < $self->{hashDepth}-1 ? $#sortKeys : $self->{hashDepth}-1
- unless $self->{hashDepth} eq '' ;
- $more = "....\n" if $tHashDepth < $#sortKeys ;
- my $shortmore = "";
- $shortmore = ", ..." if $tHashDepth < $#sortKeys ;
- $#sortKeys = $tHashDepth ;
- if ($self->{compactDump} && !grep(ref $_, values %{$v})) {
- $short = $sp;
- my @keys;
- for (@sortKeys) {
- push @keys, $self->stringify($_) . " => " . $self->stringify($v->{$_});
- }
- $short .= join ', ', @keys;
- $short .= $shortmore;
- (print "$short\n"), return if length $short <= $self->{compactDump};
- }
- for my $key (@sortKeys) {
- return if $DB::signal and $self->{stopDbSignal};
- my $value = $ {$v}{$key} ;
- print $sp, $self->stringify($key), " => ";
- $self->DumpElem($value, $s);
- }
- print "$sp empty hash\n" unless @sortKeys;
- print "$sp$more" if defined $more ;
- } elsif ( UNIVERSAL::isa($v, 'ARRAY') ) {
- my $tArrayDepth = $#{$v} ;
- my $more ;
- $tArrayDepth = $#$v < $self->{arrayDepth}-1 ? $#$v : $self->{arrayDepth}-1
- unless $self->{arrayDepth} eq '' ;
- $more = "....\n" if $tArrayDepth < $#{$v} ;
- my $shortmore = "";
- $shortmore = " ..." if $tArrayDepth < $#{$v} ;
- if ($self->{compactDump} && !grep(ref $_, @{$v})) {
- if ($#$v >= 0) {
- $short = $sp . "0..$#{$v} " .
- join(" ",
- map {exists $v->[$_] ? $self->stringify($v->[$_]) : "empty"} ($[..$tArrayDepth)
- ) . "$shortmore";
- } else {
- $short = $sp . "empty array";
- }
- (print "$short\n"), return if length $short <= $self->{compactDump};
- }
- for my $num ($[ .. $tArrayDepth) {
- return if $DB::signal and $self->{stopDbSignal};
- print "$sp$num ";
- if (exists $v->[$num]) {
- $self->DumpElem($v->[$num], $s);
- } else {
- print "empty slot\n";
- }
- }
- print "$sp empty array\n" unless @$v;
- print "$sp$more" if defined $more ;
- } elsif ( UNIVERSAL::isa($v, 'SCALAR') or ref $v eq 'REF' ) {
- print "$sp-> ";
- $self->DumpElem($$v, $s);
- } elsif ( UNIVERSAL::isa($v, 'CODE') ) {
- print "$sp-> ";
- $self->dumpsub(0, $v);
- } elsif ( UNIVERSAL::isa($v, 'GLOB') ) {
- print "$sp-> ",$self->stringify($$v,1),"\n";
- if ($self->{globPrint}) {
- $s += 3;
- $self->dumpglob('', $s, "{$$v}", $$v, 1);
- } elsif (defined ($fileno = fileno($v))) {
- print( (' ' x ($s+3)) . "FileHandle({$$v}) => fileno($fileno)\n" );
- }
- } elsif (ref \$v eq 'GLOB') {
- if ($self->{globPrint}) {
- $self->dumpglob('', $s, "{$v}", $v, 1);
- } elsif (defined ($fileno = fileno(\$v))) {
- print( (' ' x $s) . "FileHandle({$v}) => fileno($fileno)\n" );
- }
- }
-}
-
-sub matchvar {
- $_[0] eq $_[1] or
- ($_[1] =~ /^([!~])(.)([\x00-\xff]*)/) and
- ($1 eq '!') ^ (eval {($_[2] . "::" . $_[0]) =~ /$2$3/});
-}
-
-sub compactDump {
- my $self = shift;
- $self->{compactDump} = shift if @_;
- $self->{compactDump} = 6*80-1
- if $self->{compactDump} and $self->{compactDump} < 2;
- $self->{compactDump};
-}
-
-sub veryCompact {
- my $self = shift;
- $self->{veryCompact} = shift if @_;
- $self->compactDump(1) if !$self->{compactDump} and $self->{veryCompact};
- $self->{veryCompact};
-}
-
-sub set_unctrl {
- my $self = shift;
- if (@_) {
- my $in = shift;
- if ($in eq 'unctrl' or $in eq 'quote') {
- $self->{unctrl} = $in;
- } else {
- print "Unknown value for `unctrl'.\n";
- }
- }
- $self->{unctrl};
-}
-
-sub set_quote {
- my $self = shift;
- if (@_ and $_[0] eq '"') {
- $self->{tick} = '"';
- $self->{unctrl} = 'quote';
- } elsif (@_ and $_[0] eq 'auto') {
- $self->{tick} = 'auto';
- $self->{unctrl} = 'quote';
- } elsif (@_) { # Need to set
- $self->{tick} = "'";
- $self->{unctrl} = 'unctrl';
- }
- $self->{tick};
-}
-
-sub dumpglob {
- my $self = shift;
- return if $DB::signal and $self->{stopDbSignal};
- my ($package, $off, $key, $val, $all) = @_;
- local(*stab) = $val;
- my $fileno;
- if (($key !~ /^_</ or $self->{dumpDBFiles}) and defined $stab) {
- print( (' ' x $off) . "\$", &unctrl($key), " = " );
- $self->DumpElem($stab, 3+$off);
- }
- if (($key !~ /^_</ or $self->{dumpDBFiles}) and @stab) {
- print( (' ' x $off) . "\@$key = (\n" );
- $self->unwrap(\@stab,3+$off) ;
- print( (' ' x $off) . ")\n" );
- }
- if ($key ne "main::" && $key ne "DB::" && %stab
- && ($self->{dumpPackages} or $key !~ /::$/)
- && ($key !~ /^_</ or $self->{dumpDBFiles})
- && !($package eq "Dumpvalue" and $key eq "stab")) {
- print( (' ' x $off) . "\%$key = (\n" );
- $self->unwrap(\%stab,3+$off) ;
- print( (' ' x $off) . ")\n" );
- }
- if (defined ($fileno = fileno(*stab))) {
- print( (' ' x $off) . "FileHandle($key) => fileno($fileno)\n" );
- }
- if ($all) {
- if (defined &stab) {
- $self->dumpsub($off, $key);
- }
- }
-}
-
-sub CvGV_name {
- my $self = shift;
- my $in = shift;
- return if $self->{skipCvGV}; # Backdoor to avoid problems if XS broken...
- $in = \&$in; # Hard reference...
- eval {require Devel::Peek; 1} or return;
- my $gv = Devel::Peek::CvGV($in) or return;
- *$gv{PACKAGE} . '::' . *$gv{NAME};
-}
-
-sub dumpsub {
- my $self = shift;
- my ($off,$sub) = @_;
- my $ini = $sub;
- my $s;
- $sub = $1 if $sub =~ /^\{\*(.*)\}$/;
- my $subref = defined $1 ? \&$sub : \&$ini;
- my $place = $DB::sub{$sub} || (($s = $subs{"$subref"}) && $DB::sub{$s})
- || (($s = $self->CvGV_name($subref)) && $DB::sub{$s})
- || ($self->{subdump} && ($s = $self->findsubs("$subref"))
- && $DB::sub{$s});
- $s = $sub unless defined $s;
- $place = '???' unless defined $place;
- print( (' ' x $off) . "&$s in $place\n" );
-}
-
-sub findsubs {
- my $self = shift;
- return undef unless %DB::sub;
- my ($addr, $name, $loc);
- while (($name, $loc) = each %DB::sub) {
- $addr = \&$name;
- $subs{"$addr"} = $name;
- }
- $self->{subdump} = 0;
- $subs{ shift() };
-}
-
-sub dumpvars {
- my $self = shift;
- my ($package, at vars) = @_;
- local(%address,$^W);
- my ($key,$val);
- $package .= "::" unless $package =~ /::$/;
- *stab = *main::;
-
- while ($package =~ /(\w+?::)/g) {
- *stab = $ {stab}{$1};
- }
- $self->{TotalStrings} = 0;
- $self->{Strings} = 0;
- $self->{CompleteTotal} = 0;
- while (($key,$val) = each(%stab)) {
- return if $DB::signal and $self->{stopDbSignal};
- next if @vars && !grep( matchvar($key, $_), @vars );
- if ($self->{usageOnly}) {
- $self->globUsage(\$val, $key)
- if ($package ne 'Dumpvalue' or $key ne 'stab')
- and ref(\$val) eq 'GLOB';
- } else {
- $self->dumpglob($package, 0,$key, $val);
- }
- }
- if ($self->{usageOnly}) {
- print <<EOP;
-String space: $self->{TotalStrings} bytes in $self->{Strings} strings.
-EOP
- $self->{CompleteTotal} += $self->{TotalStrings};
- print <<EOP;
-Grand total = $self->{CompleteTotal} bytes (1 level deep) + overhead.
-EOP
- }
-}
-
-sub scalarUsage {
- my $self = shift;
- my $size;
- if (UNIVERSAL::isa($_[0], 'ARRAY')) {
- $size = $self->arrayUsage($_[0]);
- } elsif (UNIVERSAL::isa($_[0], 'HASH')) {
- $size = $self->hashUsage($_[0]);
- } elsif (!ref($_[0])) {
- $size = length($_[0]);
- }
- $self->{TotalStrings} += $size;
- $self->{Strings}++;
- $size;
-}
-
-sub arrayUsage { # array ref, name
- my $self = shift;
- my $size = 0;
- map {$size += $self->scalarUsage($_)} @{$_[0]};
- my $len = @{$_[0]};
- print "\@$_[1] = $len item", ($len > 1 ? "s" : ""), " (data: $size bytes)\n"
- if defined $_[1];
- $self->{CompleteTotal} += $size;
- $size;
-}
-
-sub hashUsage { # hash ref, name
- my $self = shift;
- my @keys = keys %{$_[0]};
- my @values = values %{$_[0]};
- my $keys = $self->arrayUsage(\@keys);
- my $values = $self->arrayUsage(\@values);
- my $len = @keys;
- my $total = $keys + $values;
- print "\%$_[1] = $len item", ($len > 1 ? "s" : ""),
- " (keys: $keys; values: $values; total: $total bytes)\n"
- if defined $_[1];
- $total;
-}
-
-sub globUsage { # glob ref, name
- my $self = shift;
- local *stab = *{$_[0]};
- my $total = 0;
- $total += $self->scalarUsage($stab) if defined $stab;
- $total += $self->arrayUsage(\@stab, $_[1]) if @stab;
- $total += $self->hashUsage(\%stab, $_[1])
- if %stab and $_[1] ne "main::" and $_[1] ne "DB::";
- #and !($package eq "Dumpvalue" and $key eq "stab"));
- $total;
-}
-
-1;
-
-=head1 NAME
-
-Dumpvalue - provides screen dump of Perl data.
-
-=head1 SYNOPSIS
-
- use Dumpvalue;
- my $dumper = Dumpvalue->new;
- $dumper->set(globPrint => 1);
- $dumper->dumpValue(\*::);
- $dumper->dumpvars('main');
- my $dump = $dumper->stringify($some_value);
-
-=head1 DESCRIPTION
-
-=head2 Creation
-
-A new dumper is created by a call
-
- $d = Dumpvalue->new(option1 => value1, option2 => value2)
-
-Recognized options:
-
-=over 4
-
-=item C<arrayDepth>, C<hashDepth>
-
-Print only first N elements of arrays and hashes. If false, prints all the
-elements.
-
-=item C<compactDump>, C<veryCompact>
-
-Change style of array and hash dump. If true, short array
-may be printed on one line.
-
-=item C<globPrint>
-
-Whether to print contents of globs.
-
-=item C<dumpDBFiles>
-
-Dump arrays holding contents of debugged files.
-
-=item C<dumpPackages>
-
-Dump symbol tables of packages.
-
-=item C<dumpReused>
-
-Dump contents of "reused" addresses.
-
-=item C<tick>, C<quoteHighBit>, C<printUndef>
-
-Change style of string dump. Default value of C<tick> is C<auto>, one
-can enable either double-quotish dump, or single-quotish by setting it
-to C<"> or C<'>. By default, characters with high bit set are printed
-I<as is>. If C<quoteHighBit> is set, they will be quoted.
-
-=item C<usageOnly>
-
-rudimentally per-package memory usage dump. If set,
-C<dumpvars> calculates total size of strings in variables in the package.
-
-=item unctrl
-
-Changes the style of printout of strings. Possible values are
-C<unctrl> and C<quote>.
-
-=item subdump
-
-Whether to try to find the subroutine name given the reference.
-
-=item bareStringify
-
-Whether to write the non-overloaded form of the stringify-overloaded objects.
-
-=item quoteHighBit
-
-Whether to print chars with high bit set in binary or "as is".
-
-=item stopDbSignal
-
-Whether to abort printing if debugger signal flag is raised.
-
-=back
-
-Later in the life of the object the methods may be queries with get()
-method and set() method (which accept multiple arguments).
-
-=head2 Methods
-
-=over 4
-
-=item dumpValue
-
- $dumper->dumpValue($value);
- $dumper->dumpValue([$value1, $value2]);
-
-Prints a dump to the currently selected filehandle.
-
-=item dumpValues
-
- $dumper->dumpValues($value1, $value2);
-
-Same as C< $dumper->dumpValue([$value1, $value2]); >.
-
-=item stringify
-
- my $dump = $dumper->stringify($value [,$noticks] );
-
-Returns the dump of a single scalar without printing. If the second
-argument is true, the return value does not contain enclosing ticks.
-Does not handle data structures.
-
-=item dumpvars
-
- $dumper->dumpvars('my_package');
- $dumper->dumpvars('my_package', 'foo', '~bar$', '!......');
-
-The optional arguments are considered as literal strings unless they
-start with C<~> or C<!>, in which case they are interpreted as regular
-expressions (possibly negated).
-
-The second example prints entries with names C<foo>, and also entries
-with names which ends on C<bar>, or are shorter than 5 chars.
-
-=item set_quote
-
- $d->set_quote('"');
-
-Sets C<tick> and C<unctrl> options to suitable values for printout with the
-given quote char. Possible values are C<auto>, C<'> and C<">.
-
-=item set_unctrl
-
- $d->set_unctrl('unctrl');
-
-Sets C<unctrl> option with checking for an invalid argument.
-Possible values are C<unctrl> and C<quote>.
-
-=item compactDump
-
- $d->compactDump(1);
-
-Sets C<compactDump> option. If the value is 1, sets to a reasonable
-big number.
-
-=item veryCompact
-
- $d->veryCompact(1);
-
-Sets C<compactDump> and C<veryCompact> options simultaneously.
-
-=item set
-
- $d->set(option1 => value1, option2 => value2);
-
-=item get
-
- @values = $d->get('option1', 'option2');
-
-=back
-
-=cut
-
Deleted: vendor/perl/dist/lib/Dumpvalue.t
===================================================================
--- vendor/perl/dist/lib/Dumpvalue.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Dumpvalue.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,295 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- if (ord('A') == 193) {
- print "1..0 # skip: EBCDIC\n";
- exit 0;
- }
- require Config;
- if (($Config::Config{'extensions'} !~ m!\bList/Util\b!) ){
- print "1..0 # Skip -- Perl configured without List::Util module\n";
- exit 0;
- }
-}
-
-use vars qw( $foo @bar %baz );
-
-use Test::More tests => 88;
-
-use_ok( 'Dumpvalue' );
-
-my $d;
-ok( $d = Dumpvalue->new(), 'create a new Dumpvalue object' );
-
-$d->set( globPrint => 1, dumpReused => 1 );
-is( $d->{globPrint}, 1, 'set an option correctly' );
-is( $d->get('globPrint'), 1, 'get an option correctly' );
-is( $d->get('globPrint', 'dumpReused'), qw( 1 1 ), 'get multiple options' );
-
-# check to see if unctrl works
-is( ref( Dumpvalue::unctrl(*FOO) ), 'GLOB', 'unctrl should not modify GLOB' );
-is( Dumpvalue::unctrl('donotchange'), 'donotchange', "unctrl shouldn't modify");
-like( Dumpvalue::unctrl("bo\007nd"), qr/bo\^.nd/, 'unctrl should escape' );
-
-# check to see if stringify works
-is( $d->stringify(), 'undef', 'stringify handles undef okay' );
-
-# the default is 1, but we want two single quotes
-$d->{printUndef} = 0;
-is( $d->stringify(), "''", 'stringify skips undef when asked nicely' );
-
-is( $d->stringify(*FOO), *FOO . "", 'stringify stringifies globs alright' );
-
-# check for double-quotes if there's an unprintable character
-$d->{tick} = 'auto';
-like( $d->stringify("hi\005"), qr/^"hi/, 'added double-quotes when necessary' );
-
-# if no unprintable character, escape ticks or backslashes
-is( $d->stringify('hi'), "'hi'", 'used single-quotes when appropriate' );
-
-# if 'unctrl' is set
-$d->{unctrl} = 'unctrl';
-like( $d->stringify('double and whack:\ "'), qr!\\ \"!, 'escaped with unctrl' );
-like( $d->stringify("a\005"), qr/^"a\^/, 'escaped ASCII value in unctrl' );
-like( $d->stringify("b\205"), qr!^'b.'$!, 'no high-bit escape value in unctrl');
-
-$d->{quoteHighBit} = 1;
-like( $d->stringify("b\205"), qr!^'b\\205!, 'high-bit now escaped in unctrl');
-
-# if 'quote' is set
-$d->{unctrl} = 'quote';
-is( $d->stringify('5@ $1'), "'5\@ \$1'", 'quoted $ and @ fine' );
-is( $d->stringify("5@\033\$1"), '"5\@\e\$1"', 'quoted $ and @ and \033 fine' );
-like( $d->stringify("\037"), qr/^"\\c/, 'escaped ASCII value okay' );
-
-# add ticks, if necessary
-is( $d->stringify("no ticks", 1), 'no ticks', 'avoid ticks if asked' );
-
-my $out = tie *OUT, 'TieOut';
-select(OUT);
-
-# test DumpElem, it does its magic with veryCompact set
-$d->{veryCompact} = 1;
-$d->DumpElem([1, 2, 3]);
-is( $out->read, "0..2 1 2 3\n", 'DumpElem worked on array ref');
-$d->DumpElem({ one => 1, two => 2 });
-is( $out->read, "'one' => 1, 'two' => 2\n", 'DumpElem worked on hash ref' );
-$d->DumpElem('hi');
-is( $out->read, "'hi'\n", 'DumpElem worked on simple scalar' );
-$d->{veryCompact} = 0;
-$d->DumpElem([]);
-like( $out->read, qr/ARRAY/, 'DumpElem okay with reference and no veryCompact');
-
-# should compact simple arrays just fine
-$d->{veryCompact} = 1;
-$d->DumpElem([1, 2, 3]);
-is( $out->read, "0..2 1 2 3\n", 'dumped array fine' );
-$d->{arrayDepth} = 2;
-$d->DumpElem([1, 2, 3]);
-is( $out->read, "0..2 1 2 ...\n", 'dumped limited array fine' );
-
-# should compact simple hashes just fine
-$d->DumpElem({ a => 1, b => 2, c => 3 });
-is( $out->read, "'a' => 1, 'b' => 2, 'c' => 3\n", 'dumped hash fine' );
-$d->{hashDepth} = 2;
-$d->DumpElem({ a => 1, b => 2, c => 3 });
-is( $out->read, "'a' => 1, 'b' => 2 ...\n", 'dumped limited hash fine' );
-
-# should just stringify what it is
-$d->{veryCompact} = 0;
-$d->DumpElem([]);
-like( $out->read, qr/ARRAY.+empty array/s, 'stringified empty array ref' );
-$d->DumpElem({});
-like( $out->read, qr/HASH.+empty hash/s, 'stringified empty hash ref' );
-$d->DumpElem(1);
-is( $out->read, "1\n", 'stringified simple scalar' );
-
-# test unwrap
-$DB::signal = $d->{stopDbSignal} = 1;
-is( $d->unwrap(), undef, 'unwrap returns if DB signal is set' );
-undef $DB::signal;
-
-my $foo = 7;
-$d->{dumpReused} = 0;
-$d->unwrap(\$foo);
-is( $out->read, "-> 7\n", 'unwrap worked on scalar' );
-$d->unwrap(\$foo);
-is( $out->read, "-> REUSED_ADDRESS\n", 'unwrap worked on scalar' );
-$d->unwrap({ one => 1 });
-
-# leaving this at zero may cause some subsequent tests to fail
-# if they reuse an address creating an anonymous variable
-$d->{dumpReused} = 1;
-is( $out->read, "'one' => 1\n", 'unwrap worked on hash' );
-$d->unwrap([ 2, 3 ]);
-is( $out->read, "0 2\n1 3\n", 'unwrap worked on array' );
-$d->unwrap(*FOO);
-is( $out->read, '', 'unwrap ignored glob on first try');
-$d->unwrap(*FOO);
-is( $out->read, "*DUMPED_GLOB*\n", 'unwrap worked on glob');
-$d->unwrap(qr/foo(.+)/);
-is( $out->read, "-> qr/(?-xism:foo(.+))/\n", 'unwrap worked on Regexp' );
-$d->unwrap( sub {} );
-like( $out->read, qr/^-> &CODE/, 'unwrap worked on sub ref' );
-
-# test matchvar
-# test to see if first arg 'eq' second
-ok( Dumpvalue::matchvar(1, 1), 'matchvar matched numbers fine' );
-ok( Dumpvalue::matchvar('hi', 'hi'), 'matchvar matched strings fine' );
-ok( !Dumpvalue::matchvar('hello', 1), 'matchvar caught failed match fine' );
-
-# test compactDump, which doesn't do much
-is( $d->compactDump(3), 3, 'set compactDump to 3' );
-is( $d->compactDump(1), 479, 'compactDump reset to 6*80-1 when less than 2' );
-
-# test veryCompact, which does slightly more, setting compactDump sometimes
-$d->{compactDump} = 0;
-is( $d->veryCompact(1), 1, 'set veryCompact successfully' );
-ok( $d->compactDump(), 'and it set compactDump as well' );
-
-# test set_unctrl
-$d->set_unctrl('impossible value');
-like( $out->read, qr/^Unknown value/, 'set_unctrl caught bad value' );
-is( $d->set_unctrl('quote'), 'quote', 'set quote fine' );
-is( $d->set_unctrl(), 'quote', 'retrieved quote fine' );
-
-# test set_quote
-$d->set_quote('"');
-is( $d->{tick}, '"', 'set_quote set tick right' );
-is( $d->{unctrl}, 'quote', 'set unctrl right too' );
-$d->set_quote('auto');
-is( $d->{tick}, 'auto', 'set_quote set auto right' );
-$d->set_quote('foo');
-is( $d->{tick}, "'", 'default value set to " correctly' );
-
-# test dumpglob
-# should do nothing if debugger signal flag is raised
-$d->{stopDbSignal} = $DB::signal = 1;
-is( $d->dumpglob(*DB::signal), undef, 'returned early with DB signal set' );
-undef $DB::signal;
-
-# test dumping "normal" variables, this is a nasty glob trick
-$foo = 1;
-$d->dumpglob( '', 2, 'foo', local *foo = \$foo );
-is( $out->read, " \$foo = 1\n", 'dumped glob for $foo correctly' );
- at bar = (1, 2);
-
-# the key name is a little different here
-$d->dumpglob( '', 0, 'boo', *bar );
-is( $out->read, "\@boo = (\n 0..1 1 2\n)\n", 'dumped glob for @bar fine' );
-
-%baz = ( one => 1, two => 2 );
-$d->dumpglob( '', 0, 'baz', *baz );
-is( $out->read, "\%baz = (\n 'one' => 1, 'two' => 2\n)\n",
- 'dumped glob for %baz fine' );
-
-SKIP: {
- skip( "Couldn't open $0 for reading", 1 ) unless open(FILE, $0);
- my $fileno = fileno(FILE);
- $d->dumpglob( '', 0, 'FILE', *FILE );
- is( $out->read, "FileHandle(FILE) => fileno($fileno)\n",
- 'dumped filehandle from glob fine' );
-}
-
-$d->dumpglob( '', 0, 'read', *TieOut::read );
-is( $out->read, '', 'no sub dumped without $all set' );
-$d->dumpglob( '', 0, 'read', \&TieOut::read, 1 );
-is( $out->read, "&read in ???\n", 'sub dumped when requested' );
-
-# see if it dumps DB-like values correctly
-$d->{dumpDBFiles} = 1;
-$d->dumpglob( '', 0, '_<foo', *foo );
-is( $out->read, "\$_<foo = 1\n", 'dumped glob for $_<foo correctly (DB)' );
-
-# test CvGV name
-SKIP: {
- if (" $Config::Config{'extensions'} " !~ m[ Devel/Peek ]) {
- skip( 'no Devel::Peek', 2 );
- }
- use_ok( 'Devel::Peek' );
- is( $d->CvGV_name(\&TieOut::read), 'TieOut::read', 'CvGV_name found sub' );
-}
-
-# test dumpsub
-$d->dumpsub( '', 'TieOut::read' );
-like( $out->read, qr/&TieOut::read in/, 'dumpsub found sub fine' );
-
-# test findsubs
-is( $d->findsubs(), undef, 'findsubs returns nothing without %DB::sub' );
-$DB::sub{'TieOut::read'} = 'TieOut';
-is( $d->findsubs( \&TieOut::read ), 'TieOut::read', 'findsubs reported sub' );
-
-# now that it's capable of finding the package...
-$d->dumpsub( '', 'TieOut::read' );
-is( $out->read, "&TieOut::read in TieOut\n", 'dumpsub found sub fine again' );
-
-# this should print just a usage message
-$d->{usageOnly} = 1;
-$d->dumpvars( 'Fake', 'veryfake' );
-like( $out->read, qr/^String space:/, 'printed usage message fine' );
-delete $d->{usageOnly};
-
-# this should report @INC and %INC
-$d->dumpvars( 'main', 'INC' );
-like( $out->read, qr/\@INC =/, 'dumped variables from a package' );
-
-# this should report nothing
-$DB::signal = 1;
-$d->dumpvars( 'main', 'INC' );
-is( $out->read, '', 'no dump when $DB::signal is set' );
-undef $DB::signal;
-
-is( $d->scalarUsage('12345'), 5, 'scalarUsage reports length correctly' );
-is( $d->arrayUsage( [1, 2, 3], 'a' ), 3, 'arrayUsage reports correct lengths' );
-is( $out->read, "\@a = 3 items (data: 3 bytes)\n", 'arrayUsage message okay' );
-is( $d->hashUsage({ one => 1 }, 'b'), 4, 'hashUsage reports correct lengths' );
-is( $out->read, "\%b = 1 item (keys: 3; values: 1; total: 4 bytes)\n",
- 'hashUsage message okay' );
-is( $d->hashUsage({ one => [ 1, 2, 3 ]}, 'c'), 6, 'complex hash okay' );
-is( $out->read, "\%c = 1 item (keys: 3; values: 3; total: 6 bytes)\n",
- 'hashUsage complex message okay' );
-
-$foo = 'one';
- at foo = ('two');
-%foo = ( three => '123' );
-is( $d->globUsage(\*foo, 'foo'), 14, 'globUsage reports length correctly' );
-like( $out->read, qr/\@foo =.+\%foo =/s, 'globValue message okay' );
-
-# and now, the real show
-$d->dumpValue(undef);
-is( $out->read, "undef\n", 'dumpValue caught undef value okay' );
-$d->dumpValue($foo);
-is( $out->read, "'one'\n", 'dumpValue worked' );
-$d->dumpValue(@foo);
-is( $out->read, "'two'\n", 'dumpValue worked on array' );
-$d->dumpValue(\$foo);
-is( $out->read, "-> 'one'\n", 'dumpValue worked on scalar ref' );
-
-# dumpValues (the rest of these should be caught by unwrap)
-$d->dumpValues(undef);
-is( $out->read, "undef\n", 'dumpValues caught undef value fine' );
-$d->dumpValues(\@foo);
-is( $out->read, "0 0..0 'two'\n", 'dumpValues worked on array ref' );
-$d->dumpValues('one', 'two');
-is( $out->read, "0..1 'one' 'two'\n", 'dumpValues worked on multiple values' );
-
-
-package TieOut;
-use overload '"' => sub { "overloaded!" };
-
-sub TIEHANDLE {
- my $class = shift;
- bless(\( my $ref), $class);
-}
-
-sub PRINT {
- my $self = shift;
- $$self .= join('', @_);
-}
-
-sub read {
- my $self = shift;
- return substr($$self, 0, length($$self), '');
-}
Modified: vendor/perl/dist/lib/English.pm
===================================================================
--- vendor/perl/dist/lib/English.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/English.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,6 +1,6 @@
package English;
-our $VERSION = '1.06';
+our $VERSION = '1.06_01';
require Exporter;
@ISA = qw(Exporter);
@@ -33,9 +33,9 @@
=head1 PERFORMANCE
-NOTE: This was fixed in perl 5.18. Mentioning these three variables no
+NOTE: This was fixed in perl 5.20. Mentioning these three variables no
longer makes a speed difference. This section still applies if your code
-is to run on perl 5.16 or earlier.
+is to run on perl 5.18 or earlier.
This module can provoke sizeable inefficiencies for regular expressions,
due to unfortunate implementation details. If performance matters in
Deleted: vendor/perl/dist/lib/Env.pm
===================================================================
--- vendor/perl/dist/lib/Env.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Env.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,235 +0,0 @@
-package Env;
-
-our $VERSION = '1.00';
-
-=head1 NAME
-
-Env - perl module that imports environment variables as scalars or arrays
-
-=head1 SYNOPSIS
-
- use Env;
- use Env qw(PATH HOME TERM);
- use Env qw($SHELL @LD_LIBRARY_PATH);
-
-=head1 DESCRIPTION
-
-Perl maintains environment variables in a special hash named C<%ENV>. For
-when this access method is inconvenient, the Perl module C<Env> allows
-environment variables to be treated as scalar or array variables.
-
-The C<Env::import()> function ties environment variables with suitable
-names to global Perl variables with the same names. By default it
-ties all existing environment variables (C<keys %ENV>) to scalars. If
-the C<import> function receives arguments, it takes them to be a list of
-variables to tie; it's okay if they don't yet exist. The scalar type
-prefix '$' is inferred for any element of this list not prefixed by '$'
-or '@'. Arrays are implemented in terms of C<split> and C<join>, using
-C<$Config::Config{path_sep}> as the delimiter.
-
-After an environment variable is tied, merely use it like a normal variable.
-You may access its value
-
- @path = split(/:/, $PATH);
- print join("\n", @LD_LIBRARY_PATH), "\n";
-
-or modify it
-
- $PATH .= ":.";
- push @LD_LIBRARY_PATH, $dir;
-
-however you'd like. Bear in mind, however, that each access to a tied array
-variable requires splitting the environment variable's string anew.
-
-The code:
-
- use Env qw(@PATH);
- push @PATH, '.';
-
-is equivalent to:
-
- use Env qw(PATH);
- $PATH .= ":.";
-
-except that if C<$ENV{PATH}> started out empty, the second approach leaves
-it with the (odd) value "C<:.>", but the first approach leaves it with "C<.>".
-
-To remove a tied environment variable from
-the environment, assign it the undefined value
-
- undef $PATH;
- undef @LD_LIBRARY_PATH;
-
-=head1 LIMITATIONS
-
-On VMS systems, arrays tied to environment variables are read-only. Attempting
-to change anything will cause a warning.
-
-=head1 AUTHOR
-
-Chip Salzenberg E<lt>F<chip at fin.uucp>E<gt>
-and
-Gregor N. Purdy E<lt>F<gregor at focusresearch.com>E<gt>
-
-=cut
-
-sub import {
- my ($callpack) = caller(0);
- my $pack = shift;
- my @vars = grep /^[\$\@]?[A-Za-z_]\w*$/, (@_ ? @_ : keys(%ENV));
- return unless @vars;
-
- @vars = map { m/^[\$\@]/ ? $_ : '$'.$_ } @vars;
-
- eval "package $callpack; use vars qw(" . join(' ', @vars) . ")";
- die $@ if $@;
- foreach (@vars) {
- my ($type, $name) = m/^([\$\@])(.*)$/;
- if ($type eq '$') {
- tie ${"${callpack}::$name"}, Env, $name;
- } else {
- if ($^O eq 'VMS') {
- tie @{"${callpack}::$name"}, Env::Array::VMS, $name;
- } else {
- tie @{"${callpack}::$name"}, Env::Array, $name;
- }
- }
- }
-}
-
-sub TIESCALAR {
- bless \($_[1]);
-}
-
-sub FETCH {
- my ($self) = @_;
- $ENV{$$self};
-}
-
-sub STORE {
- my ($self, $value) = @_;
- if (defined($value)) {
- $ENV{$$self} = $value;
- } else {
- delete $ENV{$$self};
- }
-}
-
-######################################################################
-
-package Env::Array;
-
-use Config;
-use Tie::Array;
-
- at ISA = qw(Tie::Array);
-
-my $sep = $Config::Config{path_sep};
-
-sub TIEARRAY {
- bless \($_[1]);
-}
-
-sub FETCHSIZE {
- my ($self) = @_;
- my @temp = split($sep, $ENV{$$self});
- return scalar(@temp);
-}
-
-sub STORESIZE {
- my ($self, $size) = @_;
- my @temp = split($sep, $ENV{$$self});
- $#temp = $size - 1;
- $ENV{$$self} = join($sep, @temp);
-}
-
-sub CLEAR {
- my ($self) = @_;
- $ENV{$$self} = '';
-}
-
-sub FETCH {
- my ($self, $index) = @_;
- return (split($sep, $ENV{$$self}))[$index];
-}
-
-sub STORE {
- my ($self, $index, $value) = @_;
- my @temp = split($sep, $ENV{$$self});
- $temp[$index] = $value;
- $ENV{$$self} = join($sep, @temp);
- return $value;
-}
-
-sub PUSH {
- my $self = shift;
- my @temp = split($sep, $ENV{$$self});
- push @temp, @_;
- $ENV{$$self} = join($sep, @temp);
- return scalar(@temp);
-}
-
-sub POP {
- my ($self) = @_;
- my @temp = split($sep, $ENV{$$self});
- my $result = pop @temp;
- $ENV{$$self} = join($sep, @temp);
- return $result;
-}
-
-sub UNSHIFT {
- my $self = shift;
- my @temp = split($sep, $ENV{$$self});
- my $result = unshift @temp, @_;
- $ENV{$$self} = join($sep, @temp);
- return $result;
-}
-
-sub SHIFT {
- my ($self) = @_;
- my @temp = split($sep, $ENV{$$self});
- my $result = shift @temp;
- $ENV{$$self} = join($sep, @temp);
- return $result;
-}
-
-sub SPLICE {
- my $self = shift;
- my $offset = shift;
- my $length = shift;
- my @temp = split($sep, $ENV{$$self});
- if (wantarray) {
- my @result = splice @temp, $self, $offset, $length, @_;
- $ENV{$$self} = join($sep, @temp);
- return @result;
- } else {
- my $result = scalar splice @temp, $offset, $length, @_;
- $ENV{$$self} = join($sep, @temp);
- return $result;
- }
-}
-
-######################################################################
-
-package Env::Array::VMS;
-use Tie::Array;
-
- at ISA = qw(Tie::Array);
-
-sub TIEARRAY {
- bless \($_[1]);
-}
-
-sub FETCHSIZE {
- my ($self) = @_;
- my $i = 0;
- while ($i < 127 and defined $ENV{$$self . ';' . $i}) { $i++; };
- return $i;
-}
-
-sub FETCH {
- my ($self, $index) = @_;
- return $ENV{$$self . ';' . $index};
-}
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/CBuilder.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/CBuilder.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/CBuilder.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,322 +0,0 @@
-package ExtUtils::CBuilder;
-
-use File::Spec ();
-use File::Path ();
-use File::Basename ();
-
-use vars qw($VERSION @ISA);
-$VERSION = '0.2602';
-$VERSION = eval $VERSION;
-
-# Okay, this is the brute-force method of finding out what kind of
-# platform we're on. I don't know of a systematic way. These values
-# came from the latest (bleadperl) perlport.pod.
-
-my %OSTYPES = qw(
- aix Unix
- bsdos Unix
- dgux Unix
- dynixptx Unix
- freebsd Unix
- linux Unix
- hpux Unix
- irix Unix
- darwin Unix
- machten Unix
- next Unix
- openbsd Unix
- netbsd Unix
- dec_osf Unix
- svr4 Unix
- svr5 Unix
- sco_sv Unix
- unicos Unix
- unicosmk Unix
- solaris Unix
- sunos Unix
- cygwin Unix
- os2 Unix
- gnu Unix
- gnukfreebsd Unix
- haiku Unix
-
- dos Windows
- MSWin32 Windows
-
- os390 EBCDIC
- os400 EBCDIC
- posix-bc EBCDIC
- vmesa EBCDIC
-
- MacOS MacOS
- VMS VMS
- VOS VOS
- riscos RiscOS
- amigaos Amiga
- mpeix MPEiX
- );
-
-# We only use this once - don't waste a symbol table entry on it.
-# More importantly, don't make it an inheritable method.
-my $load = sub {
- my $mod = shift;
- eval "use $mod";
- die $@ if $@;
- @ISA = ($mod);
-};
-
-{
- my @package = split /::/, __PACKAGE__;
-
- if (grep {-e File::Spec->catfile($_, @package, 'Platform', $^O) . '.pm'} @INC) {
- $load->(__PACKAGE__ . "::Platform::$^O");
-
- } elsif (exists $OSTYPES{$^O} and
- grep {-e File::Spec->catfile($_, @package, 'Platform', $OSTYPES{$^O}) . '.pm'} @INC) {
- $load->(__PACKAGE__ . "::Platform::$OSTYPES{$^O}");
-
- } else {
- $load->(__PACKAGE__ . "::Base");
- }
-}
-
-sub os_type { $OSTYPES{$^O} }
-
-1;
-__END__
-
-=head1 NAME
-
-ExtUtils::CBuilder - Compile and link C code for Perl modules
-
-=head1 SYNOPSIS
-
- use ExtUtils::CBuilder;
-
- my $b = ExtUtils::CBuilder->new(%options);
- $obj_file = $b->compile(source => 'MyModule.c');
- $lib_file = $b->link(objects => $obj_file);
-
-=head1 DESCRIPTION
-
-This module can build the C portions of Perl modules by invoking the
-appropriate compilers and linkers in a cross-platform manner. It was
-motivated by the C<Module::Build> project, but may be useful for other
-purposes as well. However, it is I<not> intended as a general
-cross-platform interface to all your C building needs. That would
-have been a much more ambitious goal!
-
-=head1 METHODS
-
-=over 4
-
-=item new
-
-Returns a new C<ExtUtils::CBuilder> object. A C<config> parameter
-lets you override C<Config.pm> settings for all operations performed
-by the object, as in the following example:
-
- # Use a different compiler than Config.pm says
- my $b = ExtUtils::CBuilder->new( config =>
- { ld => 'gcc' } );
-
-A C<quiet> parameter tells C<CBuilder> to not print its C<system()>
-commands before executing them:
-
- # Be quieter than normal
- my $b = ExtUtils::CBuilder->new( quiet => 1 );
-
-=item have_compiler
-
-Returns true if the current system has a working C compiler and
-linker, false otherwise. To determine this, we actually compile and
-link a sample C library. The sample will be compiled in the system
-tempdir or, if that fails for some reason, in the current directory.
-
-=item compile
-
-Compiles a C source file and produces an object file. The name of the
-object file is returned. The source file is specified in a C<source>
-parameter, which is required; the other parameters listed below are
-optional.
-
-=over 4
-
-=item C<object_file>
-
-Specifies the name of the output file to create. Otherwise the
-C<object_file()> method will be consulted, passing it the name of the
-C<source> file.
-
-=item C<include_dirs>
-
-Specifies any additional directories in which to search for header
-files. May be given as a string indicating a single directory, or as
-a list reference indicating multiple directories.
-
-=item C<extra_compiler_flags>
-
-Specifies any additional arguments to pass to the compiler. Should be
-given as a list reference containing the arguments individually, or if
-this is not possible, as a string containing all the arguments
-together.
-
-=back
-
-The operation of this method is also affected by the
-C<archlibexp>, C<cccdlflags>, C<ccflags>, C<optimize>, and C<cc>
-entries in C<Config.pm>.
-
-=item link
-
-Invokes the linker to produce a library file from object files. In
-scalar context, the name of the library file is returned. In list
-context, the library file and any temporary files created are
-returned. A required C<objects> parameter contains the name of the
-object files to process, either in a string (for one object file) or
-list reference (for one or more files). The following parameters are
-optional:
-
-
-=over 4
-
-=item lib_file
-
-Specifies the name of the output library file to create. Otherwise
-the C<lib_file()> method will be consulted, passing it the name of
-the first entry in C<objects>.
-
-=item module_name
-
-Specifies the name of the Perl module that will be created by linking.
-On platforms that need to do prelinking (Win32, OS/2, etc.) this is a
-required parameter.
-
-=item extra_linker_flags
-
-Any additional flags you wish to pass to the linker.
-
-=back
-
-On platforms where C<need_prelink()> returns true, C<prelink()>
-will be called automatically.
-
-The operation of this method is also affected by the C<lddlflags>,
-C<shrpenv>, and C<ld> entries in C<Config.pm>.
-
-=item link_executable
-
-Invokes the linker to produce an executable file from object files. In
-scalar context, the name of the executable file is returned. In list
-context, the executable file and any temporary files created are
-returned. A required C<objects> parameter contains the name of the
-object files to process, either in a string (for one object file) or
-list reference (for one or more files). The optional parameters are
-the same as C<link> with exception for
-
-
-=over 4
-
-=item exe_file
-
-Specifies the name of the output executable file to create. Otherwise
-the C<exe_file()> method will be consulted, passing it the name of the
-first entry in C<objects>.
-
-=back
-
-=item object_file
-
- my $object_file = $b->object_file($source_file);
-
-Converts the name of a C source file to the most natural name of an
-output object file to create from it. For instance, on Unix the
-source file F<foo.c> would result in the object file F<foo.o>.
-
-=item lib_file
-
- my $lib_file = $b->lib_file($object_file);
-
-Converts the name of an object file to the most natural name of a
-output library file to create from it. For instance, on Mac OS X the
-object file F<foo.o> would result in the library file F<foo.bundle>.
-
-=item exe_file
-
- my $exe_file = $b->exe_file($object_file);
-
-Converts the name of an object file to the most natural name of an
-executable file to create from it. For instance, on Mac OS X the
-object file F<foo.o> would result in the executable file F<foo>, and
-on Windows it would result in F<foo.exe>.
-
-
-=item prelink
-
-On certain platforms like Win32, OS/2, VMS, and AIX, it is necessary
-to perform some actions before invoking the linker. The
-C<ExtUtils::Mksymlists> module does this, writing files used by the
-linker during the creation of shared libraries for dynamic extensions.
-The names of any files written will be returned as a list.
-
-Several parameters correspond to C<ExtUtils::Mksymlists::Mksymlists()>
-options, as follows:
-
- Mksymlists() prelink() type
- -------------|-------------------|-------------------
- NAME | dl_name | string (required)
- DLBASE | dl_base | string
- FILE | dl_file | string
- DL_VARS | dl_vars | array reference
- DL_FUNCS | dl_funcs | hash reference
- FUNCLIST | dl_func_list | array reference
- IMPORTS | dl_imports | hash reference
- VERSION | dl_version | string
-
-Please see the documentation for C<ExtUtils::Mksymlists> for the
-details of what these parameters do.
-
-=item need_prelink
-
-Returns true on platforms where C<prelink()> should be called
-during linking, and false otherwise.
-
-=item extra_link_args_after_prelink
-
-Returns list of extra arguments to give to the link command; the arguments
-are the same as for prelink(), with addition of array reference to the
-results of prelink(); this reference is indexed by key C<prelink_res>.
-
-=back
-
-=head1 TO DO
-
-Currently this has only been tested on Unix and doesn't contain any of
-the Windows-specific code from the C<Module::Build> project. I'll do
-that next.
-
-=head1 HISTORY
-
-This module is an outgrowth of the C<Module::Build> project, to which
-there have been many contributors. Notably, Randy W. Sims submitted
-lots of code to support 3 compilers on Windows and helped with various
-other platform-specific issues. Ilya Zakharevich has contributed
-fixes for OS/2; John E. Malmberg and Peter Prymmer have done likewise
-for VMS.
-
-=head1 AUTHOR
-
-Ken Williams, kwilliams at cpan.org
-
-=head1 COPYRIGHT
-
-Copyright (c) 2003-2005 Ken Williams. All rights reserved.
-
-This library is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
-
-=head1 SEE ALSO
-
-perl(1), Module::Build(3)
-
-=cut
Deleted: vendor/perl/dist/lib/ExtUtils/Command.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/Command.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/Command.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,369 +0,0 @@
-package ExtUtils::Command;
-
-use 5.00503;
-use strict;
-use Carp;
-use File::Copy;
-use File::Compare;
-use File::Basename;
-use File::Path qw(rmtree);
-require Exporter;
-use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
- at ISA = qw(Exporter);
- at EXPORT = qw(cp rm_f rm_rf mv cat eqtime mkpath touch test_f test_d chmod
- dos2unix);
-$VERSION = '1.16';
-
-my $Is_VMS = $^O eq 'VMS';
-my $Is_VMS_mode = $Is_VMS;
-my $Is_VMS_noefs = $Is_VMS;
-my $Is_Win32 = $^O eq 'MSWin32';
-
-if( $Is_VMS ) {
- my $vms_unix_rpt;
- my $vms_efs;
- my $vms_case;
-
- if (eval { local $SIG{__DIE__}; require VMS::Feature; }) {
- $vms_unix_rpt = VMS::Feature::current("filename_unix_report");
- $vms_efs = VMS::Feature::current("efs_charset");
- $vms_case = VMS::Feature::current("efs_case_preserve");
- } else {
- my $unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || '';
- my $efs_charset = $ENV{'DECC$EFS_CHARSET'} || '';
- my $efs_case = $ENV{'DECC$EFS_CASE_PRESERVE'} || '';
- $vms_unix_rpt = $unix_rpt =~ /^[ET1]/i;
- $vms_efs = $efs_charset =~ /^[ET1]/i;
- $vms_case = $efs_case =~ /^[ET1]/i;
- }
- $Is_VMS_mode = 0 if $vms_unix_rpt;
- $Is_VMS_noefs = 0 if ($vms_efs);
-}
-
-
-=head1 NAME
-
-ExtUtils::Command - utilities to replace common UNIX commands in Makefiles etc.
-
-=head1 SYNOPSIS
-
- perl -MExtUtils::Command -e cat files... > destination
- perl -MExtUtils::Command -e mv source... destination
- perl -MExtUtils::Command -e cp source... destination
- perl -MExtUtils::Command -e touch files...
- perl -MExtUtils::Command -e rm_f files...
- perl -MExtUtils::Command -e rm_rf directories...
- perl -MExtUtils::Command -e mkpath directories...
- perl -MExtUtils::Command -e eqtime source destination
- perl -MExtUtils::Command -e test_f file
- perl -MExtUtils::Command -e test_d directory
- perl -MExtUtils::Command -e chmod mode files...
- ...
-
-=head1 DESCRIPTION
-
-The module is used to replace common UNIX commands. In all cases the
-functions work from @ARGV rather than taking arguments. This makes
-them easier to deal with in Makefiles. Call them like this:
-
- perl -MExtUtils::Command -e some_command some files to work on
-
-and I<NOT> like this:
-
- perl -MExtUtils::Command -e 'some_command qw(some files to work on)'
-
-For that use L<Shell::Command>.
-
-Filenames with * and ? will be glob expanded.
-
-
-=head2 FUNCTIONS
-
-=over 4
-
-=cut
-
-# VMS uses % instead of ? to mean "one character"
-my $wild_regex = $Is_VMS ? '*%' : '*?';
-sub expand_wildcards
-{
- @ARGV = map(/[$wild_regex]/o ? glob($_) : $_, at ARGV);
-}
-
-
-=item cat
-
- cat file ...
-
-Concatenates all files mentioned on command line to STDOUT.
-
-=cut
-
-sub cat ()
-{
- expand_wildcards();
- print while (<>);
-}
-
-=item eqtime
-
- eqtime source destination
-
-Sets modified time of destination to that of source.
-
-=cut
-
-sub eqtime
-{
- my ($src,$dst) = @ARGV;
- local @ARGV = ($dst); touch(); # in case $dst doesn't exist
- utime((stat($src))[8,9],$dst);
-}
-
-=item rm_rf
-
- rm_rf files or directories ...
-
-Removes files and directories - recursively (even if readonly)
-
-=cut
-
-sub rm_rf
-{
- expand_wildcards();
- rmtree([grep -e $_, at ARGV],0,0);
-}
-
-=item rm_f
-
- rm_f file ...
-
-Removes files (even if readonly)
-
-=cut
-
-sub rm_f {
- expand_wildcards();
-
- foreach my $file (@ARGV) {
- next unless -f $file;
-
- next if _unlink($file);
-
- chmod(0777, $file);
-
- next if _unlink($file);
-
- carp "Cannot delete $file: $!";
- }
-}
-
-sub _unlink {
- my $files_unlinked = 0;
- foreach my $file (@_) {
- my $delete_count = 0;
- $delete_count++ while unlink $file;
- $files_unlinked++ if $delete_count;
- }
- return $files_unlinked;
-}
-
-
-=item touch
-
- touch file ...
-
-Makes files exist, with current timestamp
-
-=cut
-
-sub touch {
- my $t = time;
- expand_wildcards();
- foreach my $file (@ARGV) {
- open(FILE,">>$file") || die "Cannot write $file:$!";
- close(FILE);
- utime($t,$t,$file);
- }
-}
-
-=item mv
-
- mv source_file destination_file
- mv source_file source_file destination_dir
-
-Moves source to destination. Multiple sources are allowed if
-destination is an existing directory.
-
-Returns true if all moves succeeded, false otherwise.
-
-=cut
-
-sub mv {
- expand_wildcards();
- my @src = @ARGV;
- my $dst = pop @src;
-
- croak("Too many arguments") if (@src > 1 && ! -d $dst);
-
- my $nok = 0;
- foreach my $src (@src) {
- $nok ||= !move($src,$dst);
- }
- return !$nok;
-}
-
-=item cp
-
- cp source_file destination_file
- cp source_file source_file destination_dir
-
-Copies sources to the destination. Multiple sources are allowed if
-destination is an existing directory.
-
-Returns true if all copies succeeded, false otherwise.
-
-=cut
-
-sub cp {
- expand_wildcards();
- my @src = @ARGV;
- my $dst = pop @src;
-
- croak("Too many arguments") if (@src > 1 && ! -d $dst);
-
- my $nok = 0;
- foreach my $src (@src) {
- $nok ||= !copy($src,$dst);
-
- # Win32 does not update the mod time of a copied file, just the
- # created time which make does not look at.
- utime(time, time, $dst) if $Is_Win32;
- }
- return $nok;
-}
-
-=item chmod
-
- chmod mode files ...
-
-Sets UNIX like permissions 'mode' on all the files. e.g. 0666
-
-=cut
-
-sub chmod {
- local @ARGV = @ARGV;
- my $mode = shift(@ARGV);
- expand_wildcards();
-
- if( $Is_VMS_mode && $Is_VMS_noefs) {
- foreach my $idx (0..$#ARGV) {
- my $path = $ARGV[$idx];
- next unless -d $path;
-
- # chmod 0777, [.foo.bar] doesn't work on VMS, you have to do
- # chmod 0777, [.foo]bar.dir
- my @dirs = File::Spec->splitdir( $path );
- $dirs[-1] .= '.dir';
- $path = File::Spec->catfile(@dirs);
-
- $ARGV[$idx] = $path;
- }
- }
-
- chmod(oct $mode, at ARGV) || die "Cannot chmod ".join(' ',$mode, at ARGV).":$!";
-}
-
-=item mkpath
-
- mkpath directory ...
-
-Creates directories, including any parent directories.
-
-=cut
-
-sub mkpath
-{
- expand_wildcards();
- File::Path::mkpath([@ARGV],0,0777);
-}
-
-=item test_f
-
- test_f file
-
-Tests if a file exists. I<Exits> with 0 if it does, 1 if it does not (ie.
-shell's idea of true and false).
-
-=cut
-
-sub test_f
-{
- exit(-f $ARGV[0] ? 0 : 1);
-}
-
-=item test_d
-
- test_d directory
-
-Tests if a directory exists. I<Exits> with 0 if it does, 1 if it does
-not (ie. shell's idea of true and false).
-
-=cut
-
-sub test_d
-{
- exit(-d $ARGV[0] ? 0 : 1);
-}
-
-=item dos2unix
-
- dos2unix files or dirs ...
-
-Converts DOS and OS/2 linefeeds to Unix style recursively.
-
-=cut
-
-sub dos2unix {
- require File::Find;
- File::Find::find(sub {
- return if -d;
- return unless -w _;
- return unless -r _;
- return if -B _;
-
- local $\;
-
- my $orig = $_;
- my $temp = '.dos2unix_tmp';
- open ORIG, $_ or do { warn "dos2unix can't open $_: $!"; return };
- open TEMP, ">$temp" or
- do { warn "dos2unix can't create .dos2unix_tmp: $!"; return };
- while (my $line = <ORIG>) {
- $line =~ s/\015\012/\012/g;
- print TEMP $line;
- }
- close ORIG;
- close TEMP;
- rename $temp, $orig;
-
- }, @ARGV);
-}
-
-=back
-
-=head1 SEE ALSO
-
-Shell::Command which is these same functions but take arguments normally.
-
-
-=head1 AUTHOR
-
-Nick Ing-Simmons C<ni-s at cpan.org>
-
-Maintained by Michael G Schwern C<schwern at pobox.com> within the
-ExtUtils-MakeMaker package and, as a separate CPAN package, by
-Randy Kobes C<r.kobes at uwinnipeg.ca>.
-
-=cut
-
Deleted: vendor/perl/dist/lib/ExtUtils/Constant.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/Constant.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/Constant.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,565 +0,0 @@
-package ExtUtils::Constant;
-use vars qw (@ISA $VERSION @EXPORT_OK %EXPORT_TAGS);
-$VERSION = 0.22;
-
-=head1 NAME
-
-ExtUtils::Constant - generate XS code to import C header constants
-
-=head1 SYNOPSIS
-
- use ExtUtils::Constant qw (WriteConstants);
- WriteConstants(
- NAME => 'Foo',
- NAMES => [qw(FOO BAR BAZ)],
- );
- # Generates wrapper code to make the values of the constants FOO BAR BAZ
- # available to perl
-
-=head1 DESCRIPTION
-
-ExtUtils::Constant facilitates generating C and XS wrapper code to allow
-perl modules to AUTOLOAD constants defined in C library header files.
-It is principally used by the C<h2xs> utility, on which this code is based.
-It doesn't contain the routines to scan header files to extract these
-constants.
-
-=head1 USAGE
-
-Generally one only needs to call the C<WriteConstants> function, and then
-
- #include "const-c.inc"
-
-in the C section of C<Foo.xs>
-
- INCLUDE: const-xs.inc
-
-in the XS section of C<Foo.xs>.
-
-For greater flexibility use C<constant_types()>, C<C_constant> and
-C<XS_constant>, with which C<WriteConstants> is implemented.
-
-Currently this module understands the following types. h2xs may only know
-a subset. The sizes of the numeric types are chosen by the C<Configure>
-script at compile time.
-
-=over 4
-
-=item IV
-
-signed integer, at least 32 bits.
-
-=item UV
-
-unsigned integer, the same size as I<IV>
-
-=item NV
-
-floating point type, probably C<double>, possibly C<long double>
-
-=item PV
-
-NUL terminated string, length will be determined with C<strlen>
-
-=item PVN
-
-A fixed length thing, given as a [pointer, length] pair. If you know the
-length of a string at compile time you may use this instead of I<PV>
-
-=item SV
-
-A B<mortal> SV.
-
-=item YES
-
-Truth. (C<PL_sv_yes>) The value is not needed (and ignored).
-
-=item NO
-
-Defined Falsehood. (C<PL_sv_no>) The value is not needed (and ignored).
-
-=item UNDEF
-
-C<undef>. The value of the macro is not needed.
-
-=back
-
-=head1 FUNCTIONS
-
-=over 4
-
-=cut
-
-if ($] >= 5.006) {
- eval "use warnings; 1" or die $@;
-}
-use strict;
-use Carp qw(croak cluck);
-
-use Exporter;
-use ExtUtils::Constant::Utils qw(C_stringify);
-use ExtUtils::Constant::XS qw(%XS_Constant %XS_TypeSet);
-
- at ISA = 'Exporter';
-
-%EXPORT_TAGS = ( 'all' => [ qw(
- XS_constant constant_types return_clause memEQ_clause C_stringify
- C_constant autoload WriteConstants WriteMakefileSnippet
-) ] );
-
- at EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
-
-=item constant_types
-
-A function returning a single scalar with C<#define> definitions for the
-constants used internally between the generated C and XS functions.
-
-=cut
-
-sub constant_types {
- ExtUtils::Constant::XS->header();
-}
-
-sub memEQ_clause {
- cluck "ExtUtils::Constant::memEQ_clause is deprecated";
- ExtUtils::Constant::XS->memEQ_clause({name=>$_[0], checked_at=>$_[1],
- indent=>$_[2]});
-}
-
-sub return_clause ($$) {
- cluck "ExtUtils::Constant::return_clause is deprecated";
- my $indent = shift;
- ExtUtils::Constant::XS->return_clause({indent=>$indent}, @_);
-}
-
-sub switch_clause {
- cluck "ExtUtils::Constant::switch_clause is deprecated";
- my $indent = shift;
- my $comment = shift;
- ExtUtils::Constant::XS->switch_clause({indent=>$indent, comment=>$comment},
- @_);
-}
-
-sub C_constant {
- my ($package, $subname, $default_type, $what, $indent, $breakout, @items)
- = @_;
- ExtUtils::Constant::XS->C_constant({package => $package, subname => $subname,
- default_type => $default_type,
- types => $what, indent => $indent,
- breakout => $breakout}, @items);
-}
-
-=item XS_constant PACKAGE, TYPES, XS_SUBNAME, C_SUBNAME
-
-A function to generate the XS code to implement the perl subroutine
-I<PACKAGE>::constant used by I<PACKAGE>::AUTOLOAD to load constants.
-This XS code is a wrapper around a C subroutine usually generated by
-C<C_constant>, and usually named C<constant>.
-
-I<TYPES> should be given either as a comma separated list of types that the
-C subroutine C<constant> will generate or as a reference to a hash. It should
-be the same list of types as C<C_constant> was given.
-[Otherwise C<XS_constant> and C<C_constant> may have different ideas about
-the number of parameters passed to the C function C<constant>]
-
-You can call the perl visible subroutine something other than C<constant> if
-you give the parameter I<XS_SUBNAME>. The C subroutine it calls defaults to
-the name of the perl visible subroutine, unless you give the parameter
-I<C_SUBNAME>.
-
-=cut
-
-sub XS_constant {
- my $package = shift;
- my $what = shift;
- my $XS_subname = shift;
- my $C_subname = shift;
- $XS_subname ||= 'constant';
- $C_subname ||= $XS_subname;
-
- if (!ref $what) {
- # Convert line of the form IV,UV,NV to hash
- $what = {map {$_ => 1} split /,\s*/, ($what)};
- }
- my $params = ExtUtils::Constant::XS->params ($what);
- my $type;
-
- my $xs = <<"EOT";
-void
-$XS_subname(sv)
- PREINIT:
-#ifdef dXSTARG
- dXSTARG; /* Faster if we have it. */
-#else
- dTARGET;
-#endif
- STRLEN len;
- int type;
-EOT
-
- if ($params->{IV}) {
- $xs .= " IV iv;\n";
- } else {
- $xs .= " /* IV\t\tiv;\tUncomment this if you need to return IVs */\n";
- }
- if ($params->{NV}) {
- $xs .= " NV nv;\n";
- } else {
- $xs .= " /* NV\t\tnv;\tUncomment this if you need to return NVs */\n";
- }
- if ($params->{PV}) {
- $xs .= " const char *pv;\n";
- } else {
- $xs .=
- " /* const char\t*pv;\tUncomment this if you need to return PVs */\n";
- }
-
- $xs .= << 'EOT';
- INPUT:
- SV * sv;
- const char * s = SvPV(sv, len);
-EOT
- if ($params->{''}) {
- $xs .= << 'EOT';
- INPUT:
- int utf8 = SvUTF8(sv);
-EOT
- }
- $xs .= << 'EOT';
- PPCODE:
-EOT
-
- if ($params->{IV} xor $params->{NV}) {
- $xs .= << "EOT";
- /* Change this to $C_subname(aTHX_ s, len, &iv, &nv);
- if you need to return both NVs and IVs */
-EOT
- }
- $xs .= " type = $C_subname(aTHX_ s, len";
- $xs .= ', utf8' if $params->{''};
- $xs .= ', &iv' if $params->{IV};
- $xs .= ', &nv' if $params->{NV};
- $xs .= ', &pv' if $params->{PV};
- $xs .= ', &sv' if $params->{SV};
- $xs .= ");\n";
-
- # If anyone is insane enough to suggest a package name containing %
- my $package_sprintf_safe = $package;
- $package_sprintf_safe =~ s/%/%%/g;
-
- $xs .= << "EOT";
- /* Return 1 or 2 items. First is error message, or undef if no error.
- Second, if present, is found value */
- switch (type) {
- case PERL_constant_NOTFOUND:
- sv =
- sv_2mortal(newSVpvf("%s is not a valid $package_sprintf_safe macro", s));
- PUSHs(sv);
- break;
- case PERL_constant_NOTDEF:
- sv = sv_2mortal(newSVpvf(
- "Your vendor has not defined $package_sprintf_safe macro %s, used",
- s));
- PUSHs(sv);
- break;
-EOT
-
- foreach $type (sort keys %XS_Constant) {
- # '' marks utf8 flag needed.
- next if $type eq '';
- $xs .= "\t/* Uncomment this if you need to return ${type}s\n"
- unless $what->{$type};
- $xs .= " case PERL_constant_IS$type:\n";
- if (length $XS_Constant{$type}) {
- $xs .= << "EOT";
- EXTEND(SP, 1);
- PUSHs(&PL_sv_undef);
- $XS_Constant{$type};
-EOT
- } else {
- # Do nothing. return (), which will be correctly interpreted as
- # (undef, undef)
- }
- $xs .= " break;\n";
- unless ($what->{$type}) {
- chop $xs; # Yes, another need for chop not chomp.
- $xs .= " */\n";
- }
- }
- $xs .= << "EOT";
- default:
- sv = sv_2mortal(newSVpvf(
- "Unexpected return type %d while processing $package_sprintf_safe macro %s, used",
- type, s));
- PUSHs(sv);
- }
-EOT
-
- return $xs;
-}
-
-
-=item autoload PACKAGE, VERSION, AUTOLOADER
-
-A function to generate the AUTOLOAD subroutine for the module I<PACKAGE>
-I<VERSION> is the perl version the code should be backwards compatible with.
-It defaults to the version of perl running the subroutine. If I<AUTOLOADER>
-is true, the AUTOLOAD subroutine falls back on AutoLoader::AUTOLOAD for all
-names that the constant() routine doesn't recognise.
-
-=cut
-
-# ' # Grr. syntax highlighters that don't grok pod.
-
-sub autoload {
- my ($module, $compat_version, $autoloader) = @_;
- $compat_version ||= $];
- croak "Can't maintain compatibility back as far as version $compat_version"
- if $compat_version < 5;
- my $func = "sub AUTOLOAD {\n"
- . " # This AUTOLOAD is used to 'autoload' constants from the constant()\n"
- . " # XS function.";
- $func .= " If a constant is not found then control is passed\n"
- . " # to the AUTOLOAD in AutoLoader." if $autoloader;
-
-
- $func .= "\n\n"
- . " my \$constname;\n";
- $func .=
- " our \$AUTOLOAD;\n" if ($compat_version >= 5.006);
-
- $func .= <<"EOT";
- (\$constname = \$AUTOLOAD) =~ s/.*:://;
- croak "&${module}::constant not defined" if \$constname eq 'constant';
- my (\$error, \$val) = constant(\$constname);
-EOT
-
- if ($autoloader) {
- $func .= <<'EOT';
- if ($error) {
- if ($error =~ /is not a valid/) {
- $AutoLoader::AUTOLOAD = $AUTOLOAD;
- goto &AutoLoader::AUTOLOAD;
- } else {
- croak $error;
- }
- }
-EOT
- } else {
- $func .=
- " if (\$error) { croak \$error; }\n";
- }
-
- $func .= <<'END';
- {
- no strict 'refs';
- # Fixed between 5.005_53 and 5.005_61
-#XXX if ($] >= 5.00561) {
-#XXX *$AUTOLOAD = sub () { $val };
-#XXX }
-#XXX else {
- *$AUTOLOAD = sub { $val };
-#XXX }
- }
- goto &$AUTOLOAD;
-}
-
-END
-
- return $func;
-}
-
-
-=item WriteMakefileSnippet
-
-WriteMakefileSnippet ATTRIBUTE =E<gt> VALUE [, ...]
-
-A function to generate perl code for Makefile.PL that will regenerate
-the constant subroutines. Parameters are named as passed to C<WriteConstants>,
-with the addition of C<INDENT> to specify the number of leading spaces
-(default 2).
-
-Currently only C<INDENT>, C<NAME>, C<DEFAULT_TYPE>, C<NAMES>, C<C_FILE> and
-C<XS_FILE> are recognised.
-
-=cut
-
-sub WriteMakefileSnippet {
- my %args = @_;
- my $indent = $args{INDENT} || 2;
-
- my $result = <<"EOT";
-ExtUtils::Constant::WriteConstants(
- NAME => '$args{NAME}',
- NAMES => \\\@names,
- DEFAULT_TYPE => '$args{DEFAULT_TYPE}',
-EOT
- foreach (qw (C_FILE XS_FILE)) {
- next unless exists $args{$_};
- $result .= sprintf " %-12s => '%s',\n",
- $_, $args{$_};
- }
- $result .= <<'EOT';
- );
-EOT
-
- $result =~ s/^/' 'x$indent/gem;
- return ExtUtils::Constant::XS->dump_names({default_type=>$args{DEFAULT_TYPE},
- indent=>$indent,},
- @{$args{NAMES}})
- . $result;
-}
-
-=item WriteConstants ATTRIBUTE =E<gt> VALUE [, ...]
-
-Writes a file of C code and a file of XS code which you should C<#include>
-and C<INCLUDE> in the C and XS sections respectively of your module's XS
-code. You probably want to do this in your C<Makefile.PL>, so that you can
-easily edit the list of constants without touching the rest of your module.
-The attributes supported are
-
-=over 4
-
-=item NAME
-
-Name of the module. This must be specified
-
-=item DEFAULT_TYPE
-
-The default type for the constants. If not specified C<IV> is assumed.
-
-=item BREAKOUT_AT
-
-The names of the constants are grouped by length. Generate child subroutines
-for each group with this number or more names in.
-
-=item NAMES
-
-An array of constants' names, either scalars containing names, or hashrefs
-as detailed in L<"C_constant">.
-
-=item PROXYSUBS
-
-If true, uses proxy subs. See L<ExtUtils::Constant::ProxySubs>.
-
-=item C_FH
-
-A filehandle to write the C code to. If not given, then I<C_FILE> is opened
-for writing.
-
-=item C_FILE
-
-The name of the file to write containing the C code. The default is
-C<const-c.inc>. The C<-> in the name ensures that the file can't be
-mistaken for anything related to a legitimate perl package name, and
-not naming the file C<.c> avoids having to override Makefile.PL's
-C<.xs> to C<.c> rules.
-
-=item XS_FH
-
-A filehandle to write the XS code to. If not given, then I<XS_FILE> is opened
-for writing.
-
-=item XS_FILE
-
-The name of the file to write containing the XS code. The default is
-C<const-xs.inc>.
-
-=item XS_SUBNAME
-
-The perl visible name of the XS subroutine generated which will return the
-constants. The default is C<constant>.
-
-=item C_SUBNAME
-
-The name of the C subroutine generated which will return the constants.
-The default is I<XS_SUBNAME>. Child subroutines have C<_> and the name
-length appended, so constants with 10 character names would be in
-C<constant_10> with the default I<XS_SUBNAME>.
-
-=back
-
-=cut
-
-sub WriteConstants {
- my %ARGS =
- ( # defaults
- C_FILE => 'const-c.inc',
- XS_FILE => 'const-xs.inc',
- XS_SUBNAME => 'constant',
- DEFAULT_TYPE => 'IV',
- @_);
-
- $ARGS{C_SUBNAME} ||= $ARGS{XS_SUBNAME}; # No-one sane will have C_SUBNAME eq '0'
-
- croak "Module name not specified" unless length $ARGS{NAME};
-
- my $c_fh = $ARGS{C_FH};
- if (!$c_fh) {
- if ($] <= 5.008) {
- # We need these little games, rather than doing things
- # unconditionally, because we're used in core Makefile.PLs before
- # IO is available (needed by filehandle), but also we want to work on
- # older perls where undefined scalars do not automatically turn into
- # anonymous file handles.
- require FileHandle;
- $c_fh = FileHandle->new();
- }
- open $c_fh, ">$ARGS{C_FILE}" or die "Can't open $ARGS{C_FILE}: $!";
- }
-
- my $xs_fh = $ARGS{XS_FH};
- if (!$xs_fh) {
- if ($] <= 5.008) {
- require FileHandle;
- $xs_fh = FileHandle->new();
- }
- open $xs_fh, ">$ARGS{XS_FILE}" or die "Can't open $ARGS{XS_FILE}: $!";
- }
-
- # As this subroutine is intended to make code that isn't edited, there's no
- # need for the user to specify any types that aren't found in the list of
- # names.
-
- if ($ARGS{PROXYSUBS}) {
- require ExtUtils::Constant::ProxySubs;
- $ARGS{C_FH} = $c_fh;
- $ARGS{XS_FH} = $xs_fh;
- ExtUtils::Constant::ProxySubs->WriteConstants(%ARGS);
- } else {
- my $types = {};
-
- print $c_fh constant_types(); # macro defs
- print $c_fh "\n";
-
- # indent is still undef. Until anyone implements indent style rules with
- # it.
- foreach (ExtUtils::Constant::XS->C_constant({package => $ARGS{NAME},
- subname => $ARGS{C_SUBNAME},
- default_type =>
- $ARGS{DEFAULT_TYPE},
- types => $types,
- breakout =>
- $ARGS{BREAKOUT_AT}},
- @{$ARGS{NAMES}})) {
- print $c_fh $_, "\n"; # C constant subs
- }
- print $xs_fh XS_constant ($ARGS{NAME}, $types, $ARGS{XS_SUBNAME},
- $ARGS{C_SUBNAME});
- }
-
- close $c_fh or warn "Error closing $ARGS{C_FILE}: $!" unless $ARGS{C_FH};
- close $xs_fh or warn "Error closing $ARGS{XS_FILE}: $!" unless $ARGS{XS_FH};
-}
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Nicholas Clark <nick at ccl4.org> based on the code in C<h2xs> by Larry Wall and
-others
-
-=cut
Deleted: vendor/perl/dist/lib/ExtUtils/Install.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/Install.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/Install.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1356 +0,0 @@
-package ExtUtils::Install;
-use strict;
-
-use vars qw(@ISA @EXPORT $VERSION $MUST_REBOOT %Config);
-
-use AutoSplit;
-use Carp ();
-use Config qw(%Config);
-use Cwd qw(cwd);
-use Exporter;
-use ExtUtils::Packlist;
-use File::Basename qw(dirname);
-use File::Compare qw(compare);
-use File::Copy;
-use File::Find qw(find);
-use File::Path;
-use File::Spec;
-
-
- at ISA = ('Exporter');
- at EXPORT = ('install','uninstall','pm_to_blib', 'install_default');
-
-=pod
-
-=head1 NAME
-
-ExtUtils::Install - install files from here to there
-
-=head1 SYNOPSIS
-
- use ExtUtils::Install;
-
- install({ 'blib/lib' => 'some/install/dir' } );
-
- uninstall($packlist);
-
- pm_to_blib({ 'lib/Foo/Bar.pm' => 'blib/lib/Foo/Bar.pm' });
-
-=head1 VERSION
-
-1.54
-
-=cut
-
-$VERSION = '1.54'; # <---- dont forget to update the POD section just above this line!
-$VERSION = eval $VERSION;
-
-=pod
-
-=head1 DESCRIPTION
-
-Handles the installing and uninstalling of perl modules, scripts, man
-pages, etc...
-
-Both install() and uninstall() are specific to the way
-ExtUtils::MakeMaker handles the installation and deinstallation of
-perl modules. They are not designed as general purpose tools.
-
-On some operating systems such as Win32 installation may not be possible
-until after a reboot has occured. This can have varying consequences:
-removing an old DLL does not impact programs using the new one, but if
-a new DLL cannot be installed properly until reboot then anything
-depending on it must wait. The package variable
-
- $ExtUtils::Install::MUST_REBOOT
-
-is used to store this status.
-
-If this variable is true then such an operation has occured and
-anything depending on this module cannot proceed until a reboot
-has occured.
-
-If this value is defined but false then such an operation has
-ocurred, but should not impact later operations.
-
-=begin _private
-
-=item _chmod($$;$)
-
-Wrapper to chmod() for debugging and error trapping.
-
-=item _warnonce(@)
-
-Warns about something only once.
-
-=item _choke(@)
-
-Dies with a special message.
-
-=end _private
-
-=cut
-
-my $Is_VMS = $^O eq 'VMS';
-my $Is_VMS_noefs = $Is_VMS;
-my $Is_MacPerl = $^O eq 'MacOS';
-my $Is_Win32 = $^O eq 'MSWin32';
-my $Is_cygwin = $^O eq 'cygwin';
-my $CanMoveAtBoot = ($Is_Win32 || $Is_cygwin);
-
- if( $Is_VMS ) {
- my $vms_unix_rpt;
- my $vms_efs;
- my $vms_case;
-
- if (eval { local $SIG{__DIE__}; require VMS::Feature; }) {
- $vms_unix_rpt = VMS::Feature::current("filename_unix_report");
- $vms_efs = VMS::Feature::current("efs_charset");
- $vms_case = VMS::Feature::current("efs_case_preserve");
- } else {
- my $unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || '';
- my $efs_charset = $ENV{'DECC$EFS_CHARSET'} || '';
- my $efs_case = $ENV{'DECC$EFS_CASE_PRESERVE'} || '';
- $vms_unix_rpt = $unix_rpt =~ /^[ET1]/i;
- $vms_efs = $efs_charset =~ /^[ET1]/i;
- $vms_case = $efs_case =~ /^[ET1]/i;
- }
- $Is_VMS_noefs = 0 if ($vms_efs);
- }
-
-
-
-# *note* CanMoveAtBoot is only incidentally the same condition as below
-# this needs not hold true in the future.
-my $Has_Win32API_File = ($Is_Win32 || $Is_cygwin)
- ? (eval {require Win32API::File; 1} || 0)
- : 0;
-
-
-my $Inc_uninstall_warn_handler;
-
-# install relative to here
-
-my $INSTALL_ROOT = $ENV{PERL_INSTALL_ROOT};
-
-my $Curdir = File::Spec->curdir;
-my $Updir = File::Spec->updir;
-
-sub _estr(@) {
- return join "\n",'!' x 72, at _,'!' x 72,'';
-}
-
-{my %warned;
-sub _warnonce(@) {
- my $first=shift;
- my $msg=_estr "WARNING: $first", at _;
- warn $msg unless $warned{$msg}++;
-}}
-
-sub _choke(@) {
- my $first=shift;
- my $msg=_estr "ERROR: $first", at _;
- Carp::croak($msg);
-}
-
-
-sub _chmod($$;$) {
- my ( $mode, $item, $verbose )=@_;
- $verbose ||= 0;
- if (chmod $mode, $item) {
- printf "chmod(0%o, %s)\n",$mode, $item if $verbose > 1;
- } else {
- my $err="$!";
- _warnonce sprintf "WARNING: Failed chmod(0%o, %s): %s\n",
- $mode, $item, $err
- if -e $item;
- }
-}
-
-=begin _private
-
-=item _move_file_at_boot( $file, $target, $moan )
-
-OS-Specific, Win32/Cygwin
-
-Schedules a file to be moved/renamed/deleted at next boot.
-$file should be a filespec of an existing file
-$target should be a ref to an array if the file is to be deleted
-otherwise it should be a filespec for a rename. If the file is existing
-it will be replaced.
-
-Sets $MUST_REBOOT to 0 to indicate a deletion operation has occured
-and sets it to 1 to indicate that a move operation has been requested.
-
-returns 1 on success, on failure if $moan is false errors are fatal.
-If $moan is true then returns 0 on error and warns instead of dies.
-
-=end _private
-
-=cut
-
-
-
-sub _move_file_at_boot { #XXX OS-SPECIFIC
- my ( $file, $target, $moan )= @_;
- Carp::confess("Panic: Can't _move_file_at_boot on this platform!")
- unless $CanMoveAtBoot;
-
- my $descr= ref $target
- ? "'$file' for deletion"
- : "'$file' for installation as '$target'";
-
- if ( ! $Has_Win32API_File ) {
-
- my @msg=(
- "Cannot schedule $descr at reboot.",
- "Try installing Win32API::File to allow operations on locked files",
- "to be scheduled during reboot. Or try to perform the operation by",
- "hand yourself. (You may need to close other perl processes first)"
- );
- if ( $moan ) { _warnonce(@msg) } else { _choke(@msg) }
- return 0;
- }
- my $opts= Win32API::File::MOVEFILE_DELAY_UNTIL_REBOOT();
- $opts= $opts | Win32API::File::MOVEFILE_REPLACE_EXISTING()
- unless ref $target;
-
- _chmod( 0666, $file );
- _chmod( 0666, $target ) unless ref $target;
-
- if (Win32API::File::MoveFileEx( $file, $target, $opts )) {
- $MUST_REBOOT ||= ref $target ? 0 : 1;
- return 1;
- } else {
- my @msg=(
- "MoveFileEx $descr at reboot failed: $^E",
- "You may try to perform the operation by hand yourself. ",
- "(You may need to close other perl processes first).",
- );
- if ( $moan ) { _warnonce(@msg) } else { _choke(@msg) }
- }
- return 0;
-}
-
-
-=begin _private
-
-=item _unlink_or_rename( $file, $tryhard, $installing )
-
-OS-Specific, Win32/Cygwin
-
-Tries to get a file out of the way by unlinking it or renaming it. On
-some OS'es (Win32 based) DLL files can end up locked such that they can
-be renamed but not deleted. Likewise sometimes a file can be locked such
-that it cant even be renamed or changed except at reboot. To handle
-these cases this routine finds a tempfile name that it can either rename
-the file out of the way or use as a proxy for the install so that the
-rename can happen later (at reboot).
-
- $file : the file to remove.
- $tryhard : should advanced tricks be used for deletion
- $installing : we are not merely deleting but we want to overwrite
-
-When $tryhard is not true if the unlink fails its fatal. When $tryhard
-is true then the file is attempted to be renamed. The renamed file is
-then scheduled for deletion. If the rename fails then $installing
-governs what happens. If it is false the failure is fatal. If it is true
-then an attempt is made to schedule installation at boot using a
-temporary file to hold the new file. If this fails then a fatal error is
-thrown, if it succeeds it returns the temporary file name (which will be
-a derivative of the original in the same directory) so that the caller can
-use it to install under. In all other cases of success returns $file.
-On failure throws a fatal error.
-
-=end _private
-
-=cut
-
-
-
-sub _unlink_or_rename { #XXX OS-SPECIFIC
- my ( $file, $tryhard, $installing )= @_;
-
- _chmod( 0666, $file );
- my $unlink_count = 0;
- while (unlink $file) { $unlink_count++; }
- return $file if $unlink_count > 0;
- my $error="$!";
-
- _choke("Cannot unlink '$file': $!")
- unless $CanMoveAtBoot && $tryhard;
-
- my $tmp= "AAA";
- ++$tmp while -e "$file.$tmp";
- $tmp= "$file.$tmp";
-
- warn "WARNING: Unable to unlink '$file': $error\n",
- "Going to try to rename it to '$tmp'.\n";
-
- if ( rename $file, $tmp ) {
- warn "Rename succesful. Scheduling '$tmp'\nfor deletion at reboot.\n";
- # when $installing we can set $moan to true.
- # IOW, if we cant delete the renamed file at reboot its
- # not the end of the world. The other cases are more serious
- # and need to be fatal.
- _move_file_at_boot( $tmp, [], $installing );
- return $file;
- } elsif ( $installing ) {
- _warnonce("Rename failed: $!. Scheduling '$tmp'\nfor".
- " installation as '$file' at reboot.\n");
- _move_file_at_boot( $tmp, $file );
- return $tmp;
- } else {
- _choke("Rename failed:$!", "Cannot procede.");
- }
-
-}
-
-
-=pod
-
-=head2 Functions
-
-=begin _private
-
-=item _get_install_skip
-
-Handles loading the INSTALL.SKIP file. Returns an array of patterns to use.
-
-=cut
-
-
-
-sub _get_install_skip {
- my ( $skip, $verbose )= @_;
- if ($ENV{EU_INSTALL_IGNORE_SKIP}) {
- print "EU_INSTALL_IGNORE_SKIP is set, ignore skipfile settings\n"
- if $verbose>2;
- return [];
- }
- if ( ! defined $skip ) {
- print "Looking for install skip list\n"
- if $verbose>2;
- for my $file ( 'INSTALL.SKIP', $ENV{EU_INSTALL_SITE_SKIPFILE} ) {
- next unless $file;
- print "\tChecking for $file\n"
- if $verbose>2;
- if (-e $file) {
- $skip= $file;
- last;
- }
- }
- }
- if ($skip && !ref $skip) {
- print "Reading skip patterns from '$skip'.\n"
- if $verbose;
- if (open my $fh,$skip ) {
- my @patterns;
- while (<$fh>) {
- chomp;
- next if /^\s*(?:#|$)/;
- print "\tSkip pattern: $_\n" if $verbose>3;
- push @patterns, $_;
- }
- $skip= \@patterns;
- } else {
- warn "Can't read skip file:'$skip':$!\n";
- $skip=[];
- }
- } elsif ( UNIVERSAL::isa($skip,'ARRAY') ) {
- print "Using array for skip list\n"
- if $verbose>2;
- } elsif ($verbose) {
- print "No skip list found.\n"
- if $verbose>1;
- $skip= [];
- }
- warn "Got @{[0+@$skip]} skip patterns.\n"
- if $verbose>3;
- return $skip
-}
-
-=pod
-
-=item _have_write_access
-
-Abstract a -w check that tries to use POSIX::access() if possible.
-
-=cut
-
-{
- my $has_posix;
- sub _have_write_access {
- my $dir=shift;
- unless (defined $has_posix) {
- $has_posix= (!$Is_cygwin && !$Is_Win32
- && eval 'local $^W; require POSIX; 1') || 0;
- }
- if ($has_posix) {
- return POSIX::access($dir, POSIX::W_OK());
- } else {
- return -w $dir;
- }
- }
-}
-
-=pod
-
-=item _can_write_dir(C<$dir>)
-
-Checks whether a given directory is writable, taking account
-the possibility that the directory might not exist and would have to
-be created first.
-
-Returns a list, containing: C<($writable, $determined_by, @create)>
-
-C<$writable> says whether whether the directory is (hypothetically) writable
-
-C<$determined_by> is the directory the status was determined from. It will be
-either the C<$dir>, or one of its parents.
-
-C<@create> is a list of directories that would probably have to be created
-to make the requested directory. It may not actually be correct on
-relative paths with C<..> in them. But for our purposes it should work ok
-
-=cut
-
-
-sub _can_write_dir {
- my $dir=shift;
- return
- unless defined $dir and length $dir;
-
- my ($vol, $dirs, $file) = File::Spec->splitpath($dir,1);
- my @dirs = File::Spec->splitdir($dirs);
- unshift @dirs, File::Spec->curdir
- unless File::Spec->file_name_is_absolute($dir);
-
- my $path='';
- my @make;
- while (@dirs) {
- if ($Is_VMS_noefs) {
- # There is a bug in catdir that is fixed when the EFS character
- # set is enabled, which requires this VMS specific code.
- $dir = File::Spec->catdir($vol, at dirs);
- }
- else {
- $dir = File::Spec->catdir(@dirs);
- $dir = File::Spec->catpath($vol,$dir,'')
- if defined $vol and length $vol;
- }
- next if ( $dir eq $path );
- if ( ! -e $dir ) {
- unshift @make,$dir;
- next;
- }
- if ( _have_write_access($dir) ) {
- return 1,$dir, at make
- } else {
- return 0,$dir, at make
- }
- } continue {
- pop @dirs;
- }
- return 0;
-}
-
-=pod
-
-=item _mkpath($dir,$show,$mode,$verbose,$dry_run)
-
-Wrapper around File::Path::mkpath() to handle errors.
-
-If $verbose is true and >1 then additional diagnostics will be produced, also
-this will force $show to true.
-
-If $dry_run is true then the directory will not be created but a check will be
-made to see whether it would be possible to write to the directory, or that
-it would be possible to create the directory.
-
-If $dry_run is not true dies if the directory can not be created or is not
-writable.
-
-=cut
-
-sub _mkpath {
- my ($dir,$show,$mode,$verbose,$dry_run)=@_;
- if ( $verbose && $verbose > 1 && ! -d $dir) {
- $show= 1;
- printf "mkpath(%s,%d,%#o)\n", $dir, $show, $mode;
- }
- if (!$dry_run) {
- if ( ! eval { File::Path::mkpath($dir,$show,$mode); 1 } ) {
- _choke("Can't create '$dir'","$@");
- }
-
- }
- my ($can,$root, at make)=_can_write_dir($dir);
- if (!$can) {
- my @msg=(
- "Can't create '$dir'",
- $root ? "Do not have write permissions on '$root'"
- : "Unknown Error"
- );
- if ($dry_run) {
- _warnonce @msg;
- } else {
- _choke @msg;
- }
- } elsif ($show and $dry_run) {
- print "$_\n" for @make;
- }
-
-}
-
-=pod
-
-=item _copy($from,$to,$verbose,$dry_run)
-
-Wrapper around File::Copy::copy to handle errors.
-
-If $verbose is true and >1 then additional dignostics will be emitted.
-
-If $dry_run is true then the copy will not actually occur.
-
-Dies if the copy fails.
-
-=cut
-
-
-sub _copy {
- my ( $from, $to, $verbose, $dry_run)=@_;
- if ($verbose && $verbose>1) {
- printf "copy(%s,%s)\n", $from, $to;
- }
- if (!$dry_run) {
- File::Copy::copy($from,$to)
- or Carp::croak( _estr "ERROR: Cannot copy '$from' to '$to': $!" );
- }
-}
-
-=pod
-
-=item _chdir($from)
-
-Wrapper around chdir to catch errors.
-
-If not called in void context returns the cwd from before the chdir.
-
-dies on error.
-
-=cut
-
-sub _chdir {
- my ($dir)= @_;
- my $ret;
- if (defined wantarray) {
- $ret= cwd;
- }
- chdir $dir
- or _choke("Couldn't chdir to '$dir': $!");
- return $ret;
-}
-
-=pod
-
-=end _private
-
-=over 4
-
-=item B<install>
-
- # deprecated forms
- install(\%from_to);
- install(\%from_to, $verbose, $dry_run, $uninstall_shadows,
- $skip, $always_copy, \%result);
-
- # recommended form as of 1.47
- install([
- from_to => \%from_to,
- verbose => 1,
- dry_run => 0,
- uninstall_shadows => 1,
- skip => undef,
- always_copy => 1,
- result => \%install_results,
- ]);
-
-
-Copies each directory tree of %from_to to its corresponding value
-preserving timestamps and permissions.
-
-There are two keys with a special meaning in the hash: "read" and
-"write". These contain packlist files. After the copying is done,
-install() will write the list of target files to $from_to{write}. If
-$from_to{read} is given the contents of this file will be merged into
-the written file. The read and the written file may be identical, but
-on AFS it is quite likely that people are installing to a different
-directory than the one where the files later appear.
-
-If $verbose is true, will print out each file removed. Default is
-false. This is "make install VERBINST=1". $verbose values going
-up to 5 show increasingly more diagnostics output.
-
-If $dry_run is true it will only print what it was going to do
-without actually doing it. Default is false.
-
-If $uninstall_shadows is true any differing versions throughout @INC
-will be uninstalled. This is "make install UNINST=1"
-
-As of 1.37_02 install() supports the use of a list of patterns to filter out
-files that shouldn't be installed. If $skip is omitted or undefined then
-install will try to read the list from INSTALL.SKIP in the CWD. This file is
-a list of regular expressions and is just like the MANIFEST.SKIP file used
-by L<ExtUtils::Manifest>.
-
-A default site INSTALL.SKIP may be provided by setting then environment
-variable EU_INSTALL_SITE_SKIPFILE, this will only be used when there isn't a
-distribution specific INSTALL.SKIP. If the environment variable
-EU_INSTALL_IGNORE_SKIP is true then no install file filtering will be
-performed.
-
-If $skip is undefined then the skip file will be autodetected and used if it
-is found. If $skip is a reference to an array then it is assumed the array
-contains the list of patterns, if $skip is a true non reference it is
-assumed to be the filename holding the list of patterns, any other value of
-$skip is taken to mean that no install filtering should occur.
-
-B<Changes As of Version 1.47>
-
-As of version 1.47 the following additions were made to the install interface.
-Note that the new argument style and use of the %result hash is recommended.
-
-The $always_copy parameter which when true causes files to be updated
-regardles as to whether they have changed, if it is defined but false then
-copies are made only if the files have changed, if it is undefined then the
-value of the environment variable EU_INSTALL_ALWAYS_COPY is used as default.
-
-The %result hash will be populated with the various keys/subhashes reflecting
-the install. Currently these keys and their structure are:
-
- install => { $target => $source },
- install_fail => { $target => $source },
- install_unchanged => { $target => $source },
-
- install_filtered => { $source => $pattern },
-
- uninstall => { $uninstalled => $source },
- uninstall_fail => { $uninstalled => $source },
-
-where C<$source> is the filespec of the file being installed. C<$target> is where
-it is being installed to, and C<$uninstalled> is any shadow file that is in C<@INC>
-or C<$ENV{PERL5LIB}> or other standard locations, and C<$pattern> is the pattern that
-caused a source file to be skipped. In future more keys will be added, such as to
-show created directories, however this requires changes in other modules and must
-therefore wait.
-
-These keys will be populated before any exceptions are thrown should there be an
-error.
-
-Note that all updates of the %result are additive, the hash will not be
-cleared before use, thus allowing status results of many installs to be easily
-aggregated.
-
-B<NEW ARGUMENT STYLE>
-
-If there is only one argument and it is a reference to an array then
-the array is assumed to contain a list of key-value pairs specifying
-the options. In this case the option "from_to" is mandatory. This style
-means that you dont have to supply a cryptic list of arguments and can
-use a self documenting argument list that is easier to understand.
-
-This is now the recommended interface to install().
-
-B<RETURN>
-
-If all actions were successful install will return a hashref of the results
-as described above for the $result parameter. If any action is a failure
-then install will die, therefore it is recommended to pass in the $result
-parameter instead of using the return value. If the result parameter is
-provided then the returned hashref will be the passed in hashref.
-
-=cut
-
-sub install { #XXX OS-SPECIFIC
- my($from_to,$verbose,$dry_run,$uninstall_shadows,$skip,$always_copy,$result) = @_;
- if (@_==1 and eval { 1+@$from_to }) {
- my %opts = @$from_to;
- $from_to = $opts{from_to}
- or Carp::confess("from_to is a mandatory parameter");
- $verbose = $opts{verbose};
- $dry_run = $opts{dry_run};
- $uninstall_shadows = $opts{uninstall_shadows};
- $skip = $opts{skip};
- $always_copy = $opts{always_copy};
- $result = $opts{result};
- }
-
- $result ||= {};
- $verbose ||= 0;
- $dry_run ||= 0;
-
- $skip= _get_install_skip($skip,$verbose);
- $always_copy = $ENV{EU_INSTALL_ALWAYS_COPY}
- || $ENV{EU_ALWAYS_COPY}
- || 0
- unless defined $always_copy;
-
- my(%from_to) = %$from_to;
- my(%pack, $dir, %warned);
- my($packlist) = ExtUtils::Packlist->new();
-
- local(*DIR);
- for (qw/read write/) {
- $pack{$_}=$from_to{$_};
- delete $from_to{$_};
- }
- my $tmpfile = install_rooted_file($pack{"read"});
- $packlist->read($tmpfile) if (-f $tmpfile);
- my $cwd = cwd();
- my @found_files;
- my %check_dirs;
-
- MOD_INSTALL: foreach my $source (sort keys %from_to) {
- #copy the tree to the target directory without altering
- #timestamp and permission and remember for the .packlist
- #file. The packlist file contains the absolute paths of the
- #install locations. AFS users may call this a bug. We'll have
- #to reconsider how to add the means to satisfy AFS users also.
-
- #October 1997: we want to install .pm files into archlib if
- #there are any files in arch. So we depend on having ./blib/arch
- #hardcoded here.
-
- my $targetroot = install_rooted_dir($from_to{$source});
-
- my $blib_lib = File::Spec->catdir('blib', 'lib');
- my $blib_arch = File::Spec->catdir('blib', 'arch');
- if ($source eq $blib_lib and
- exists $from_to{$blib_arch} and
- directory_not_empty($blib_arch)
- ){
- $targetroot = install_rooted_dir($from_to{$blib_arch});
- print "Files found in $blib_arch: installing files in $blib_lib into architecture dependent library tree\n";
- }
-
- next unless -d $source;
- _chdir($source);
- # 5.5.3's File::Find missing no_chdir option
- # XXX OS-SPECIFIC
- # File::Find seems to always be Unixy except on MacPerl :(
- my $current_directory= $Is_MacPerl ? $Curdir : '.';
- find(sub {
- my ($mode,$size,$atime,$mtime) = (stat)[2,7,8,9];
-
- return if !-f _;
- my $origfile = $_;
-
- return if $origfile eq ".exists";
- my $targetdir = File::Spec->catdir($targetroot, $File::Find::dir);
- my $targetfile = File::Spec->catfile($targetdir, $origfile);
- my $sourcedir = File::Spec->catdir($source, $File::Find::dir);
- my $sourcefile = File::Spec->catfile($sourcedir, $origfile);
-
- for my $pat (@$skip) {
- if ( $sourcefile=~/$pat/ ) {
- print "Skipping $targetfile (filtered)\n"
- if $verbose>1;
- $result->{install_filtered}{$sourcefile} = $pat;
- return;
- }
- }
- # we have to do this for back compat with old File::Finds
- # and because the target is relative
- my $save_cwd = _chdir($cwd);
- my $diff = 0;
- # XXX: I wonder how useful this logic is actually -- demerphq
- if ( $always_copy or !-f $targetfile or -s $targetfile != $size) {
- $diff++;
- } else {
- # we might not need to copy this file
- $diff = compare($sourcefile, $targetfile);
- }
- $check_dirs{$targetdir}++
- unless -w $targetfile;
-
- push @found_files,
- [ $diff, $File::Find::dir, $origfile,
- $mode, $size, $atime, $mtime,
- $targetdir, $targetfile, $sourcedir, $sourcefile,
-
- ];
- #restore the original directory we were in when File::Find
- #called us so that it doesnt get horribly confused.
- _chdir($save_cwd);
- }, $current_directory );
- _chdir($cwd);
- }
- foreach my $targetdir (sort keys %check_dirs) {
- _mkpath( $targetdir, 0, 0755, $verbose, $dry_run );
- }
- foreach my $found (@found_files) {
- my ($diff, $ffd, $origfile, $mode, $size, $atime, $mtime,
- $targetdir, $targetfile, $sourcedir, $sourcefile)= @$found;
-
- my $realtarget= $targetfile;
- if ($diff) {
- eval {
- if (-f $targetfile) {
- print "_unlink_or_rename($targetfile)\n" if $verbose>1;
- $targetfile= _unlink_or_rename( $targetfile, 'tryhard', 'install' )
- unless $dry_run;
- } elsif ( ! -d $targetdir ) {
- _mkpath( $targetdir, 0, 0755, $verbose, $dry_run );
- }
- print "Installing $targetfile\n";
-
- _copy( $sourcefile, $targetfile, $verbose, $dry_run, );
-
-
- #XXX OS-SPECIFIC
- print "utime($atime,$mtime,$targetfile)\n" if $verbose>1;
- utime($atime,$mtime + $Is_VMS,$targetfile) unless $dry_run>1;
-
-
- $mode = 0444 | ( $mode & 0111 ? 0111 : 0 );
- $mode = $mode | 0222
- if $realtarget ne $targetfile;
- _chmod( $mode, $targetfile, $verbose );
- $result->{install}{$targetfile} = $sourcefile;
- 1
- } or do {
- $result->{install_fail}{$targetfile} = $sourcefile;
- die $@;
- };
- } else {
- $result->{install_unchanged}{$targetfile} = $sourcefile;
- print "Skipping $targetfile (unchanged)\n" if $verbose;
- }
-
- if ( $uninstall_shadows ) {
- inc_uninstall($sourcefile,$ffd, $verbose,
- $dry_run,
- $realtarget ne $targetfile ? $realtarget : "",
- $result);
- }
-
- # Record the full pathname.
- $packlist->{$targetfile}++;
- }
-
- if ($pack{'write'}) {
- $dir = install_rooted_dir(dirname($pack{'write'}));
- _mkpath( $dir, 0, 0755, $verbose, $dry_run );
- print "Writing $pack{'write'}\n" if $verbose;
- $packlist->write(install_rooted_file($pack{'write'})) unless $dry_run;
- }
-
- _do_cleanup($verbose);
- return $result;
-}
-
-=begin _private
-
-=item _do_cleanup
-
-Standardize finish event for after another instruction has occured.
-Handles converting $MUST_REBOOT to a die for instance.
-
-=end _private
-
-=cut
-
-sub _do_cleanup {
- my ($verbose) = @_;
- if ($MUST_REBOOT) {
- die _estr "Operation not completed! ",
- "You must reboot to complete the installation.",
- "Sorry.";
- } elsif (defined $MUST_REBOOT & $verbose) {
- warn _estr "Installation will be completed at the next reboot.\n",
- "However it is not necessary to reboot immediately.\n";
- }
-}
-
-=begin _undocumented
-
-=item install_rooted_file( $file )
-
-Returns $file, or catfile($INSTALL_ROOT,$file) if $INSTALL_ROOT
-is defined.
-
-=item install_rooted_dir( $dir )
-
-Returns $dir, or catdir($INSTALL_ROOT,$dir) if $INSTALL_ROOT
-is defined.
-
-=end _undocumented
-
-=cut
-
-
-sub install_rooted_file {
- if (defined $INSTALL_ROOT) {
- File::Spec->catfile($INSTALL_ROOT, $_[0]);
- } else {
- $_[0];
- }
-}
-
-
-sub install_rooted_dir {
- if (defined $INSTALL_ROOT) {
- File::Spec->catdir($INSTALL_ROOT, $_[0]);
- } else {
- $_[0];
- }
-}
-
-=begin _undocumented
-
-=item forceunlink( $file, $tryhard )
-
-Tries to delete a file. If $tryhard is true then we will use whatever
-devious tricks we can to delete the file. Currently this only applies to
-Win32 in that it will try to use Win32API::File to schedule a delete at
-reboot. A wrapper for _unlink_or_rename().
-
-=end _undocumented
-
-=cut
-
-
-sub forceunlink {
- my ( $file, $tryhard )= @_; #XXX OS-SPECIFIC
- _unlink_or_rename( $file, $tryhard, not("installing") );
-}
-
-=begin _undocumented
-
-=item directory_not_empty( $dir )
-
-Returns 1 if there is an .exists file somewhere in a directory tree.
-Returns 0 if there is not.
-
-=end _undocumented
-
-=cut
-
-sub directory_not_empty ($) {
- my($dir) = @_;
- my $files = 0;
- find(sub {
- return if $_ eq ".exists";
- if (-f) {
- $File::Find::prune++;
- $files = 1;
- }
- }, $dir);
- return $files;
-}
-
-=pod
-
-=item B<install_default> I<DISCOURAGED>
-
- install_default();
- install_default($fullext);
-
-Calls install() with arguments to copy a module from blib/ to the
-default site installation location.
-
-$fullext is the name of the module converted to a directory
-(ie. Foo::Bar would be Foo/Bar). If $fullext is not specified, it
-will attempt to read it from @ARGV.
-
-This is primarily useful for install scripts.
-
-B<NOTE> This function is not really useful because of the hard-coded
-install location with no way to control site vs core vs vendor
-directories and the strange way in which the module name is given.
-Consider its use discouraged.
-
-=cut
-
-sub install_default {
- @_ < 2 or Carp::croak("install_default should be called with 0 or 1 argument");
- my $FULLEXT = @_ ? shift : $ARGV[0];
- defined $FULLEXT or die "Do not know to where to write install log";
- my $INST_LIB = File::Spec->catdir($Curdir,"blib","lib");
- my $INST_ARCHLIB = File::Spec->catdir($Curdir,"blib","arch");
- my $INST_BIN = File::Spec->catdir($Curdir,'blib','bin');
- my $INST_SCRIPT = File::Spec->catdir($Curdir,'blib','script');
- my $INST_MAN1DIR = File::Spec->catdir($Curdir,'blib','man1');
- my $INST_MAN3DIR = File::Spec->catdir($Curdir,'blib','man3');
-
- my @INST_HTML;
- if($Config{installhtmldir}) {
- my $INST_HTMLDIR = File::Spec->catdir($Curdir,'blib','html');
- @INST_HTML = ($INST_HTMLDIR => $Config{installhtmldir});
- }
-
- install({
- read => "$Config{sitearchexp}/auto/$FULLEXT/.packlist",
- write => "$Config{installsitearch}/auto/$FULLEXT/.packlist",
- $INST_LIB => (directory_not_empty($INST_ARCHLIB)) ?
- $Config{installsitearch} :
- $Config{installsitelib},
- $INST_ARCHLIB => $Config{installsitearch},
- $INST_BIN => $Config{installbin} ,
- $INST_SCRIPT => $Config{installscript},
- $INST_MAN1DIR => $Config{installman1dir},
- $INST_MAN3DIR => $Config{installman3dir},
- @INST_HTML,
- },1,0,0);
-}
-
-
-=item B<uninstall>
-
- uninstall($packlist_file);
- uninstall($packlist_file, $verbose, $dont_execute);
-
-Removes the files listed in a $packlist_file.
-
-If $verbose is true, will print out each file removed. Default is
-false.
-
-If $dont_execute is true it will only print what it was going to do
-without actually doing it. Default is false.
-
-=cut
-
-sub uninstall {
- my($fil,$verbose,$dry_run) = @_;
- $verbose ||= 0;
- $dry_run ||= 0;
-
- die _estr "ERROR: no packlist file found: '$fil'"
- unless -f $fil;
- # my $my_req = $self->catfile(qw(auto ExtUtils Install forceunlink.al));
- # require $my_req; # Hairy, but for the first
- my ($packlist) = ExtUtils::Packlist->new($fil);
- foreach (sort(keys(%$packlist))) {
- chomp;
- print "unlink $_\n" if $verbose;
- forceunlink($_,'tryhard') unless $dry_run;
- }
- print "unlink $fil\n" if $verbose;
- forceunlink($fil, 'tryhard') unless $dry_run;
- _do_cleanup($verbose);
-}
-
-=begin _undocumented
-
-=item inc_uninstall($filepath,$libdir,$verbose,$dry_run,$ignore,$results)
-
-Remove shadowed files. If $ignore is true then it is assumed to hold
-a filename to ignore. This is used to prevent spurious warnings from
-occuring when doing an install at reboot.
-
-We now only die when failing to remove a file that has precedence over
-our own, when our install has precedence we only warn.
-
-$results is assumed to contain a hashref which will have the keys
-'uninstall' and 'uninstall_fail' populated with keys for the files
-removed and values of the source files they would shadow.
-
-=end _undocumented
-
-=cut
-
-sub inc_uninstall {
- my($filepath,$libdir,$verbose,$dry_run,$ignore,$results) = @_;
- my($dir);
- $ignore||="";
- my $file = (File::Spec->splitpath($filepath))[2];
- my %seen_dir = ();
-
- my @PERL_ENV_LIB = split $Config{path_sep}, defined $ENV{'PERL5LIB'}
- ? $ENV{'PERL5LIB'} : $ENV{'PERLLIB'} || '';
-
- my @dirs=( @PERL_ENV_LIB,
- @INC,
- @Config{qw(archlibexp
- privlibexp
- sitearchexp
- sitelibexp)});
-
- #warn join "\n","---", at dirs,"---";
- my $seen_ours;
- foreach $dir ( @dirs ) {
- my $canonpath = $Is_VMS ? $dir : File::Spec->canonpath($dir);
- next if $canonpath eq $Curdir;
- next if $seen_dir{$canonpath}++;
- my $targetfile = File::Spec->catfile($canonpath,$libdir,$file);
- next unless -f $targetfile;
-
- # The reason why we compare file's contents is, that we cannot
- # know, which is the file we just installed (AFS). So we leave
- # an identical file in place
- my $diff = 0;
- if ( -f $targetfile && -s _ == -s $filepath) {
- # We have a good chance, we can skip this one
- $diff = compare($filepath,$targetfile);
- } else {
- $diff++;
- }
- print "#$file and $targetfile differ\n" if $diff && $verbose > 1;
-
- if (!$diff or $targetfile eq $ignore) {
- $seen_ours = 1;
- next;
- }
- if ($dry_run) {
- $results->{uninstall}{$targetfile} = $filepath;
- if ($verbose) {
- $Inc_uninstall_warn_handler ||= ExtUtils::Install::Warn->new();
- $libdir =~ s|^\./||s ; # That's just cosmetics, no need to port. It looks prettier.
- $Inc_uninstall_warn_handler->add(
- File::Spec->catfile($libdir, $file),
- $targetfile
- );
- }
- # if not verbose, we just say nothing
- } else {
- print "Unlinking $targetfile (shadowing?)\n" if $verbose;
- eval {
- die "Fake die for testing"
- if $ExtUtils::Install::Testing and
- ucase(File::Spec->canonpath($ExtUtils::Install::Testing)) eq ucase($targetfile);
- forceunlink($targetfile,'tryhard');
- $results->{uninstall}{$targetfile} = $filepath;
- 1;
- } or do {
- $results->{fail_uninstall}{$targetfile} = $filepath;
- if ($seen_ours) {
- warn "Failed to remove probably harmless shadow file '$targetfile'\n";
- } else {
- die "$@\n";
- }
- };
- }
- }
-}
-
-=begin _undocumented
-
-=item run_filter($cmd,$src,$dest)
-
-Filter $src using $cmd into $dest.
-
-=end _undocumented
-
-=cut
-
-sub run_filter {
- my ($cmd, $src, $dest) = @_;
- local(*CMD, *SRC);
- open(CMD, "|$cmd >$dest") || die "Cannot fork: $!";
- open(SRC, $src) || die "Cannot open $src: $!";
- my $buf;
- my $sz = 1024;
- while (my $len = sysread(SRC, $buf, $sz)) {
- syswrite(CMD, $buf, $len);
- }
- close SRC;
- close CMD or die "Filter command '$cmd' failed for $src";
-}
-
-=pod
-
-=item B<pm_to_blib>
-
- pm_to_blib(\%from_to, $autosplit_dir);
- pm_to_blib(\%from_to, $autosplit_dir, $filter_cmd);
-
-Copies each key of %from_to to its corresponding value efficiently.
-Filenames with the extension .pm are autosplit into the $autosplit_dir.
-Any destination directories are created.
-
-$filter_cmd is an optional shell command to run each .pm file through
-prior to splitting and copying. Input is the contents of the module,
-output the new module contents.
-
-You can have an environment variable PERL_INSTALL_ROOT set which will
-be prepended as a directory to each installed file (and directory).
-
-=cut
-
-sub pm_to_blib {
- my($fromto,$autodir,$pm_filter) = @_;
-
- _mkpath($autodir,0,0755);
- while(my($from, $to) = each %$fromto) {
- if( -f $to && -s $from == -s $to && -M $to < -M $from ) {
- print "Skip $to (unchanged)\n";
- next;
- }
-
- # When a pm_filter is defined, we need to pre-process the source first
- # to determine whether it has changed or not. Therefore, only perform
- # the comparison check when there's no filter to be ran.
- # -- RAM, 03/01/2001
-
- my $need_filtering = defined $pm_filter && length $pm_filter &&
- $from =~ /\.pm$/;
-
- if (!$need_filtering && 0 == compare($from,$to)) {
- print "Skip $to (unchanged)\n";
- next;
- }
- if (-f $to){
- # we wont try hard here. its too likely to mess things up.
- forceunlink($to);
- } else {
- _mkpath(dirname($to),0,0755);
- }
- if ($need_filtering) {
- run_filter($pm_filter, $from, $to);
- print "$pm_filter <$from >$to\n";
- } else {
- _copy( $from, $to );
- print "cp $from $to\n";
- }
- my($mode,$atime,$mtime) = (stat $from)[2,8,9];
- utime($atime,$mtime+$Is_VMS,$to);
- _chmod(0444 | ( $mode & 0111 ? 0111 : 0 ),$to);
- next unless $from =~ /\.pm$/;
- _autosplit($to,$autodir);
- }
-}
-
-
-=begin _private
-
-=item _autosplit
-
-From 1.0307 back, AutoSplit will sometimes leave an open filehandle to
-the file being split. This causes problems on systems with mandatory
-locking (ie. Windows). So we wrap it and close the filehandle.
-
-=end _private
-
-=cut
-
-sub _autosplit { #XXX OS-SPECIFIC
- my $retval = autosplit(@_);
- close *AutoSplit::IN if defined *AutoSplit::IN{IO};
-
- return $retval;
-}
-
-
-package ExtUtils::Install::Warn;
-
-sub new { bless {}, shift }
-
-sub add {
- my($self,$file,$targetfile) = @_;
- push @{$self->{$file}}, $targetfile;
-}
-
-sub DESTROY {
- unless(defined $INSTALL_ROOT) {
- my $self = shift;
- my($file,$i,$plural);
- foreach $file (sort keys %$self) {
- $plural = @{$self->{$file}} > 1 ? "s" : "";
- print "## Differing version$plural of $file found. You might like to\n";
- for (0..$#{$self->{$file}}) {
- print "rm ", $self->{$file}[$_], "\n";
- $i++;
- }
- }
- $plural = $i>1 ? "all those files" : "this file";
- my $inst = (_invokant() eq 'ExtUtils::MakeMaker')
- ? ( $Config::Config{make} || 'make' ).' install'
- . ( $Is_VMS ? '/MACRO="UNINST"=1' : ' UNINST=1' )
- : './Build install uninst=1';
- print "## Running '$inst' will unlink $plural for you.\n";
- }
-}
-
-=begin _private
-
-=item _invokant
-
-Does a heuristic on the stack to see who called us for more intelligent
-error messages. Currently assumes we will be called only by Module::Build
-or by ExtUtils::MakeMaker.
-
-=end _private
-
-=cut
-
-sub _invokant {
- my @stack;
- my $frame = 0;
- while (my $file = (caller($frame++))[1]) {
- push @stack, (File::Spec->splitpath($file))[2];
- }
-
- my $builder;
- my $top = pop @stack;
- if ($top =~ /^Build/i || exists($INC{'Module/Build.pm'})) {
- $builder = 'Module::Build';
- } else {
- $builder = 'ExtUtils::MakeMaker';
- }
- return $builder;
-}
-
-=pod
-
-=back
-
-=head1 ENVIRONMENT
-
-=over 4
-
-=item B<PERL_INSTALL_ROOT>
-
-Will be prepended to each install path.
-
-=item B<EU_INSTALL_IGNORE_SKIP>
-
-Will prevent the automatic use of INSTALL.SKIP as the install skip file.
-
-=item B<EU_INSTALL_SITE_SKIPFILE>
-
-If there is no INSTALL.SKIP file in the make directory then this value
-can be used to provide a default.
-
-=item B<EU_INSTALL_ALWAYS_COPY>
-
-If this environment variable is true then normal install processes will
-always overwrite older identical files during the install process.
-
-Note that the alias EU_ALWAYS_COPY will be supported if EU_INSTALL_ALWAYS_COPY
-is not defined until at least the 1.50 release. Please ensure you use the
-correct EU_INSTALL_ALWAYS_COPY.
-
-=back
-
-=head1 AUTHOR
-
-Original author lost in the mists of time. Probably the same as Makemaker.
-
-Production release currently maintained by demerphq C<yves at cpan.org>,
-extensive changes by Michael G. Schwern.
-
-Send bug reports via http://rt.cpan.org/. Please send your
-generated Makefile along with your report.
-
-=head1 LICENSE
-
-This program is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
-
-See L<http://www.perl.com/perl/misc/Artistic.html>
-
-
-=cut
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/Installed.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/Installed.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/Installed.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,462 +0,0 @@
-package ExtUtils::Installed;
-
-use 5.00503;
-use strict;
-#use warnings; # XXX requires 5.6
-use Carp qw();
-use ExtUtils::Packlist;
-use ExtUtils::MakeMaker;
-use Config;
-use File::Find;
-use File::Basename;
-use File::Spec;
-
-my $Is_VMS = $^O eq 'VMS';
-my $DOSISH = ($^O =~ /^(MSWin\d\d|os2|dos|mint)$/);
-
-require VMS::Filespec if $Is_VMS;
-
-use vars qw($VERSION);
-$VERSION = '1.999_001';
-$VERSION = eval $VERSION;
-
-sub _is_prefix {
- my ($self, $path, $prefix) = @_;
- return unless defined $prefix && defined $path;
-
- if( $Is_VMS ) {
- $prefix = VMS::Filespec::unixify($prefix);
- $path = VMS::Filespec::unixify($path);
- }
-
- # Unix path normalization.
- $prefix = File::Spec->canonpath($prefix);
-
- return 1 if substr($path, 0, length($prefix)) eq $prefix;
-
- if ($DOSISH) {
- $path =~ s|\\|/|g;
- $prefix =~ s|\\|/|g;
- return 1 if $path =~ m{^\Q$prefix\E}i;
- }
- return(0);
-}
-
-sub _is_doc {
- my ($self, $path) = @_;
-
- my $man1dir = $self->{':private:'}{Config}{man1direxp};
- my $man3dir = $self->{':private:'}{Config}{man3direxp};
- return(($man1dir && $self->_is_prefix($path, $man1dir))
- ||
- ($man3dir && $self->_is_prefix($path, $man3dir))
- ? 1 : 0)
-}
-
-sub _is_type {
- my ($self, $path, $type) = @_;
- return 1 if $type eq "all";
-
- return($self->_is_doc($path)) if $type eq "doc";
- my $conf= $self->{':private:'}{Config};
- if ($type eq "prog") {
- return($self->_is_prefix($path, $conf->{prefix} || $conf->{prefixexp})
- && !($self->_is_doc($path)) ? 1 : 0);
- }
- return(0);
-}
-
-sub _is_under {
- my ($self, $path, @under) = @_;
- $under[0] = "" if (! @under);
- foreach my $dir (@under) {
- return(1) if ($self->_is_prefix($path, $dir));
- }
-
- return(0);
-}
-
-sub _fix_dirs {
- my ($self, @dirs)= @_;
- # File::Find does not know how to deal with VMS filepaths.
- if( $Is_VMS ) {
- $_ = VMS::Filespec::unixify($_)
- for @dirs;
- }
-
- if ($DOSISH) {
- s|\\|/|g for @dirs;
- }
- return wantarray ? @dirs : $dirs[0];
-}
-
-sub _make_entry {
- my ($self, $module, $packlist_file, $modfile)= @_;
-
- my $data= {
- module => $module,
- packlist => scalar(ExtUtils::Packlist->new($packlist_file)),
- packlist_file => $packlist_file,
- };
-
- if (!$modfile) {
- $data->{version} = $self->{':private:'}{Config}{version};
- } else {
- $data->{modfile} = $modfile;
- # Find the top-level module file in @INC
- $data->{version} = '';
- foreach my $dir (@{$self->{':private:'}{INC}}) {
- my $p = File::Spec->catfile($dir, $modfile);
- if (-r $p) {
- $module = _module_name($p, $module) if $Is_VMS;
-
- $data->{version} = MM->parse_version($p);
- $data->{version_from} = $p;
- $data->{packlist_valid} = exists $data->{packlist}{$p};
- last;
- }
- }
- }
- $self->{$module}= $data;
-}
-
-our $INSTALLED;
-sub new {
- my ($class) = shift(@_);
- $class = ref($class) || $class;
-
- my %args = @_;
-
- return $INSTALLED if $INSTALLED and ($args{default_get} || $args{default});
-
- my $self = bless {}, $class;
-
- $INSTALLED= $self if $args{default_set} || $args{default};
-
-
- if ($args{config_override}) {
- eval {
- $self->{':private:'}{Config} = { %{$args{config_override}} };
- } or Carp::croak(
- "The 'config_override' parameter must be a hash reference."
- );
- }
- else {
- $self->{':private:'}{Config} = \%Config;
- }
-
- for my $tuple ([inc_override => INC => [ @INC ] ],
- [ extra_libs => EXTRA => [] ])
- {
- my ($arg,$key,$val)=@$tuple;
- if ( $args{$arg} ) {
- eval {
- $self->{':private:'}{$key} = [ @{$args{$arg}} ];
- } or Carp::croak(
- "The '$arg' parameter must be an array reference."
- );
- }
- elsif ($val) {
- $self->{':private:'}{$key} = $val;
- }
- }
- {
- my %dupe;
- @{$self->{':private:'}{LIBDIRS}} = grep { -e $_ && !$dupe{$_}++ }
- @{$self->{':private:'}{EXTRA}}, @{$self->{':private:'}{INC}};
- }
-
- my @dirs= $self->_fix_dirs(@{$self->{':private:'}{LIBDIRS}});
-
- # Read the core packlist
- my $archlib = $self->_fix_dirs($self->{':private:'}{Config}{archlibexp});
- $self->_make_entry("Perl",File::Spec->catfile($archlib, '.packlist'));
-
- my $root;
- # Read the module packlists
- my $sub = sub {
- # Only process module .packlists
- return if $_ ne ".packlist" || $File::Find::dir eq $archlib;
-
- # Hack of the leading bits of the paths & convert to a module name
- my $module = $File::Find::name;
- my $found = $module =~ s!^.*?/auto/(.*)/.packlist!$1!s
- or do {
- # warn "Woah! \$_=$_\n\$module=$module\n\$File::Find::dir=$File::Find::dir\n",
- # join ("\n", at dirs);
- return;
- };
-
- my $modfile = "$module.pm";
- $module =~ s!/!::!g;
-
- return if $self->{$module}; #shadowing?
- $self->_make_entry($module,$File::Find::name,$modfile);
- };
- while (@dirs) {
- $root= shift @dirs;
- next if !-d $root;
- find($sub,$root);
- }
-
- return $self;
-}
-
-# VMS's non-case preserving file-system means the package name can't
-# be reconstructed from the filename.
-sub _module_name {
- my($file, $orig_module) = @_;
-
- my $module = '';
- if (open PACKFH, $file) {
- while (<PACKFH>) {
- if (/package\s+(\S+)\s*;/) {
- my $pack = $1;
- # Make a sanity check, that lower case $module
- # is identical to lowercase $pack before
- # accepting it
- if (lc($pack) eq lc($orig_module)) {
- $module = $pack;
- last;
- }
- }
- }
- close PACKFH;
- }
-
- print STDERR "Couldn't figure out the package name for $file\n"
- unless $module;
-
- return $module;
-}
-
-sub modules {
- my ($self) = @_;
- $self= $self->new(default=>1) if !ref $self;
-
- # Bug/feature of sort in scalar context requires this.
- return wantarray
- ? sort grep { not /^:private:$/ } keys %$self
- : grep { not /^:private:$/ } keys %$self;
-}
-
-sub files {
- my ($self, $module, $type, @under) = @_;
- $self= $self->new(default=>1) if !ref $self;
-
- # Validate arguments
- Carp::croak("$module is not installed") if (! exists($self->{$module}));
- $type = "all" if (! defined($type));
- Carp::croak('type must be "all", "prog" or "doc"')
- if ($type ne "all" && $type ne "prog" && $type ne "doc");
-
- my (@files);
- foreach my $file (keys(%{$self->{$module}{packlist}})) {
- push(@files, $file)
- if ($self->_is_type($file, $type) &&
- $self->_is_under($file, @under));
- }
- return(@files);
-}
-
-sub directories {
- my ($self, $module, $type, @under) = @_;
- $self= $self->new(default=>1) if !ref $self;
- my (%dirs);
- foreach my $file ($self->files($module, $type, @under)) {
- $dirs{dirname($file)}++;
- }
- return sort keys %dirs;
-}
-
-sub directory_tree {
- my ($self, $module, $type, @under) = @_;
- $self= $self->new(default=>1) if !ref $self;
- my (%dirs);
- foreach my $dir ($self->directories($module, $type, @under)) {
- $dirs{$dir}++;
- my ($last) = ("");
- while ($last ne $dir) {
- $last = $dir;
- $dir = dirname($dir);
- last if !$self->_is_under($dir, @under);
- $dirs{$dir}++;
- }
- }
- return(sort(keys(%dirs)));
-}
-
-sub validate {
- my ($self, $module, $remove) = @_;
- $self= $self->new(default=>1) if !ref $self;
- Carp::croak("$module is not installed") if (! exists($self->{$module}));
- return($self->{$module}{packlist}->validate($remove));
-}
-
-sub packlist {
- my ($self, $module) = @_;
- $self= $self->new(default=>1) if !ref $self;
- Carp::croak("$module is not installed") if (! exists($self->{$module}));
- return($self->{$module}{packlist});
-}
-
-sub version {
- my ($self, $module) = @_;
- $self= $self->new(default=>1) if !ref $self;
- Carp::croak("$module is not installed") if (! exists($self->{$module}));
- return($self->{$module}{version});
-}
-
-sub debug_dump {
- my ($self, $module) = @_;
- $self= $self->new(default=>1) if !ref $self;
- local $self->{":private:"}{Config};
- require Data::Dumper;
- print Data::Dumper->new([$self])->Sortkeys(1)->Indent(1)->Dump();
-}
-
-
-1;
-
-__END__
-
-=head1 NAME
-
-ExtUtils::Installed - Inventory management of installed modules
-
-=head1 SYNOPSIS
-
- use ExtUtils::Installed;
- my ($inst) = ExtUtils::Installed->new();
- my (@modules) = $inst->modules();
- my (@missing) = $inst->validate("DBI");
- my $all_files = $inst->files("DBI");
- my $files_below_usr_local = $inst->files("DBI", "all", "/usr/local");
- my $all_dirs = $inst->directories("DBI");
- my $dirs_below_usr_local = $inst->directory_tree("DBI", "prog");
- my $packlist = $inst->packlist("DBI");
-
-=head1 DESCRIPTION
-
-ExtUtils::Installed provides a standard way to find out what core and module
-files have been installed. It uses the information stored in .packlist files
-created during installation to provide this information. In addition it
-provides facilities to classify the installed files and to extract directory
-information from the .packlist files.
-
-=head1 USAGE
-
-The new() function searches for all the installed .packlists on the system, and
-stores their contents. The .packlists can be queried with the functions
-described below. Where it searches by default is determined by the settings found
-in C<%Config::Config>, and what the value is of the PERL5LIB environment variable.
-
-=head1 METHODS
-
-Unless specified otherwise all method can be called as class methods, or as object
-methods. If called as class methods then the "default" object will be used, and if
-necessary created using the current processes %Config and @INC. See the
-'default' option to new() for details.
-
-
-=over 4
-
-=item new()
-
-This takes optional named parameters. Without parameters, this
-searches for all the installed .packlists on the system using
-information from C<%Config::Config> and the default module search
-paths C<@INC>. The packlists are read using the
-L<ExtUtils::Packlist> module.
-
-If the named parameter C<config_override> is specified,
-it should be a reference to a hash which contains all information
-usually found in C<%Config::Config>. For example, you can obtain
-the configuration information for a separate perl installation and
-pass that in.
-
- my $yoda_cfg = get_fake_config('yoda');
- my $yoda_inst = ExtUtils::Installed->new(config_override=>$yoda_cfg);
-
-Similarly, the parameter C<inc_override> may be a reference to an
-array which is used in place of the default module search paths
-from C<@INC>.
-
- use Config;
- my @dirs = split(/\Q$Config{path_sep}\E/, $ENV{PERL5LIB});
- my $p5libs = ExtUtils::Installed->new(inc_override=>\@dirs);
-
-B<Note>: You probably do not want to use these options alone, almost always
-you will want to set both together.
-
-The parameter c<extra_libs> can be used to specify B<additional> paths to
-search for installed modules. For instance
-
- my $installed = ExtUtils::Installed->new(extra_libs=>["/my/lib/path"]);
-
-This should only be necessary if C</my/lib/path> is not in PERL5LIB.
-
-Finally there is the 'default', and the related 'default_get' and 'default_set'
-options. These options control the "default" object which is provided by the
-class interface to the methods. Setting C<default_get> to true tells the constructor
-to return the default object if it is defined. Setting C<default_set> to true tells
-the constructor to make the default object the constructed object. Setting the
-C<default> option is like setting both to true. This is used primarily internally
-and probably isn't interesting to any real user.
-
-=item modules()
-
-This returns a list of the names of all the installed modules. The perl 'core'
-is given the special name 'Perl'.
-
-=item files()
-
-This takes one mandatory parameter, the name of a module. It returns a list of
-all the filenames from the package. To obtain a list of core perl files, use
-the module name 'Perl'. Additional parameters are allowed. The first is one
-of the strings "prog", "doc" or "all", to select either just program files,
-just manual files or all files. The remaining parameters are a list of
-directories. The filenames returned will be restricted to those under the
-specified directories.
-
-=item directories()
-
-This takes one mandatory parameter, the name of a module. It returns a list of
-all the directories from the package. Additional parameters are allowed. The
-first is one of the strings "prog", "doc" or "all", to select either just
-program directories, just manual directories or all directories. The remaining
-parameters are a list of directories. The directories returned will be
-restricted to those under the specified directories. This method returns only
-the leaf directories that contain files from the specified module.
-
-=item directory_tree()
-
-This is identical in operation to directories(), except that it includes all the
-intermediate directories back up to the specified directories.
-
-=item validate()
-
-This takes one mandatory parameter, the name of a module. It checks that all
-the files listed in the modules .packlist actually exist, and returns a list of
-any missing files. If an optional second argument which evaluates to true is
-given any missing files will be removed from the .packlist
-
-=item packlist()
-
-This returns the ExtUtils::Packlist object for the specified module.
-
-=item version()
-
-This returns the version number for the specified module.
-
-=back
-
-=head1 EXAMPLE
-
-See the example in L<ExtUtils::Packlist>.
-
-=head1 AUTHOR
-
-Alan Burlison <Alan.Burlison at uk.sun.com>
-
-=cut
Deleted: vendor/perl/dist/lib/ExtUtils/Liblist.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/Liblist.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/Liblist.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,286 +0,0 @@
-package ExtUtils::Liblist;
-
-use strict;
-
-our $VERSION = '6.55_02';
-
-use File::Spec;
-require ExtUtils::Liblist::Kid;
-our @ISA = qw(ExtUtils::Liblist::Kid File::Spec);
-
-# Backwards compatibility with old interface.
-sub ext {
- goto &ExtUtils::Liblist::Kid::ext;
-}
-
-sub lsdir {
- shift;
- my $rex = qr/$_[1]/;
- opendir DIR, $_[0];
- my @out = grep /$rex/, readdir DIR;
- closedir DIR;
- return @out;
-}
-
-__END__
-
-=head1 NAME
-
-ExtUtils::Liblist - determine libraries to use and how to use them
-
-=head1 SYNOPSIS
-
- require ExtUtils::Liblist;
-
- $MM->ext($potential_libs, $verbose, $need_names);
-
- # Usually you can get away with:
- ExtUtils::Liblist->ext($potential_libs, $verbose, $need_names)
-
-=head1 DESCRIPTION
-
-This utility takes a list of libraries in the form C<-llib1 -llib2
--llib3> and returns lines suitable for inclusion in an extension
-Makefile. Extra library paths may be included with the form
-C<-L/another/path> this will affect the searches for all subsequent
-libraries.
-
-It returns an array of four or five scalar values: EXTRALIBS,
-BSLOADLIBS, LDLOADLIBS, LD_RUN_PATH, and, optionally, a reference to
-the array of the filenames of actual libraries. Some of these don't
-mean anything unless on Unix. See the details about those platform
-specifics below. The list of the filenames is returned only if
-$need_names argument is true.
-
-Dependent libraries can be linked in one of three ways:
-
-=over 2
-
-=item * For static extensions
-
-by the ld command when the perl binary is linked with the extension
-library. See EXTRALIBS below.
-
-=item * For dynamic extensions at build/link time
-
-by the ld command when the shared object is built/linked. See
-LDLOADLIBS below.
-
-=item * For dynamic extensions at load time
-
-by the DynaLoader when the shared object is loaded. See BSLOADLIBS
-below.
-
-=back
-
-=head2 EXTRALIBS
-
-List of libraries that need to be linked with when linking a perl
-binary which includes this extension. Only those libraries that
-actually exist are included. These are written to a file and used
-when linking perl.
-
-=head2 LDLOADLIBS and LD_RUN_PATH
-
-List of those libraries which can or must be linked into the shared
-library when created using ld. These may be static or dynamic
-libraries. LD_RUN_PATH is a colon separated list of the directories
-in LDLOADLIBS. It is passed as an environment variable to the process
-that links the shared library.
-
-=head2 BSLOADLIBS
-
-List of those libraries that are needed but can be linked in
-dynamically at run time on this platform. SunOS/Solaris does not need
-this because ld records the information (from LDLOADLIBS) into the
-object file. This list is used to create a .bs (bootstrap) file.
-
-=head1 PORTABILITY
-
-This module deals with a lot of system dependencies and has quite a
-few architecture specific C<if>s in the code.
-
-=head2 VMS implementation
-
-The version of ext() which is executed under VMS differs from the
-Unix-OS/2 version in several respects:
-
-=over 2
-
-=item *
-
-Input library and path specifications are accepted with or without the
-C<-l> and C<-L> prefixes used by Unix linkers. If neither prefix is
-present, a token is considered a directory to search if it is in fact
-a directory, and a library to search for otherwise. Authors who wish
-their extensions to be portable to Unix or OS/2 should use the Unix
-prefixes, since the Unix-OS/2 version of ext() requires them.
-
-=item *
-
-Wherever possible, shareable images are preferred to object libraries,
-and object libraries to plain object files. In accordance with VMS
-naming conventions, ext() looks for files named I<lib>shr and I<lib>rtl;
-it also looks for I<lib>lib and libI<lib> to accommodate Unix conventions
-used in some ported software.
-
-=item *
-
-For each library that is found, an appropriate directive for a linker options
-file is generated. The return values are space-separated strings of
-these directives, rather than elements used on the linker command line.
-
-=item *
-
-LDLOADLIBS contains both the libraries found based on C<$potential_libs> and
-the CRTLs, if any, specified in Config.pm. EXTRALIBS contains just those
-libraries found based on C<$potential_libs>. BSLOADLIBS and LD_RUN_PATH
-are always empty.
-
-=back
-
-In addition, an attempt is made to recognize several common Unix library
-names, and filter them out or convert them to their VMS equivalents, as
-appropriate.
-
-In general, the VMS version of ext() should properly handle input from
-extensions originally designed for a Unix or VMS environment. If you
-encounter problems, or discover cases where the search could be improved,
-please let us know.
-
-=head2 Win32 implementation
-
-The version of ext() which is executed under Win32 differs from the
-Unix-OS/2 version in several respects:
-
-=over 2
-
-=item *
-
-If C<$potential_libs> is empty, the return value will be empty.
-Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
-will be appended to the list of C<$potential_libs>. The libraries
-will be searched for in the directories specified in C<$potential_libs>,
-C<$Config{libpth}>, and in C<$Config{installarchlib}/CORE>.
-For each library that is found, a space-separated list of fully qualified
-library pathnames is generated.
-
-=item *
-
-Input library and path specifications are accepted with or without the
-C<-l> and C<-L> prefixes used by Unix linkers.
-
-An entry of the form C<-La:\foo> specifies the C<a:\foo> directory to look
-for the libraries that follow.
-
-An entry of the form C<-lfoo> specifies the library C<foo>, which may be
-spelled differently depending on what kind of compiler you are using. If
-you are using GCC, it gets translated to C<libfoo.a>, but for other win32
-compilers, it becomes C<foo.lib>. If no files are found by those translated
-names, one more attempt is made to find them using either C<foo.a> or
-C<libfoo.lib>, depending on whether GCC or some other win32 compiler is
-being used, respectively.
-
-If neither the C<-L> or C<-l> prefix is present in an entry, the entry is
-considered a directory to search if it is in fact a directory, and a
-library to search for otherwise. The C<$Config{lib_ext}> suffix will
-be appended to any entries that are not directories and don't already have
-the suffix.
-
-Note that the C<-L> and C<-l> prefixes are B<not required>, but authors
-who wish their extensions to be portable to Unix or OS/2 should use the
-prefixes, since the Unix-OS/2 version of ext() requires them.
-
-=item *
-
-Entries cannot be plain object files, as many Win32 compilers will
-not handle object files in the place of libraries.
-
-=item *
-
-Entries in C<$potential_libs> beginning with a colon and followed by
-alphanumeric characters are treated as flags. Unknown flags will be ignored.
-
-An entry that matches C</:nodefault/i> disables the appending of default
-libraries found in C<$Config{perllibs}> (this should be only needed very rarely).
-
-An entry that matches C</:nosearch/i> disables all searching for
-the libraries specified after it. Translation of C<-Lfoo> and
-C<-lfoo> still happens as appropriate (depending on compiler being used,
-as reflected by C<$Config{cc}>), but the entries are not verified to be
-valid files or directories.
-
-An entry that matches C</:search/i> reenables searching for
-the libraries specified after it. You can put it at the end to
-enable searching for default libraries specified by C<$Config{perllibs}>.
-
-=item *
-
-The libraries specified may be a mixture of static libraries and
-import libraries (to link with DLLs). Since both kinds are used
-pretty transparently on the Win32 platform, we do not attempt to
-distinguish between them.
-
-=item *
-
-LDLOADLIBS and EXTRALIBS are always identical under Win32, and BSLOADLIBS
-and LD_RUN_PATH are always empty (this may change in future).
-
-=item *
-
-You must make sure that any paths and path components are properly
-surrounded with double-quotes if they contain spaces. For example,
-C<$potential_libs> could be (literally):
-
- "-Lc:\Program Files\vc\lib" msvcrt.lib "la test\foo bar.lib"
-
-Note how the first and last entries are protected by quotes in order
-to protect the spaces.
-
-=item *
-
-Since this module is most often used only indirectly from extension
-C<Makefile.PL> files, here is an example C<Makefile.PL> entry to add
-a library to the build process for an extension:
-
- LIBS => ['-lgl']
-
-When using GCC, that entry specifies that MakeMaker should first look
-for C<libgl.a> (followed by C<gl.a>) in all the locations specified by
-C<$Config{libpth}>.
-
-When using a compiler other than GCC, the above entry will search for
-C<gl.lib> (followed by C<libgl.lib>).
-
-If the library happens to be in a location not in C<$Config{libpth}>,
-you need:
-
- LIBS => ['-Lc:\gllibs -lgl']
-
-Here is a less often used example:
-
- LIBS => ['-lgl', ':nosearch -Ld:\mesalibs -lmesa -luser32']
-
-This specifies a search for library C<gl> as before. If that search
-fails to find the library, it looks at the next item in the list. The
-C<:nosearch> flag will prevent searching for the libraries that follow,
-so it simply returns the value as C<-Ld:\mesalibs -lmesa -luser32>,
-since GCC can use that value as is with its linker.
-
-When using the Visual C compiler, the second item is returned as
-C<-libpath:d:\mesalibs mesa.lib user32.lib>.
-
-When using the Borland compiler, the second item is returned as
-C<-Ld:\mesalibs mesa.lib user32.lib>, and MakeMaker takes care of
-moving the C<-Ld:\mesalibs> to the correct place in the linker
-command line.
-
-=back
-
-
-=head1 SEE ALSO
-
-L<ExtUtils::MakeMaker>
-
-=cut
-
Deleted: vendor/perl/dist/lib/ExtUtils/MANIFEST.SKIP
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MANIFEST.SKIP 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MANIFEST.SKIP 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,32 +0,0 @@
-# Avoid version control files.
-\bRCS\b
-\bCVS\b
-\bSCCS\b
-,v$
-\B\.svn\b
-\B\.git\b
-\B\.gitignore\b
-\b_darcs\b
-
-# Avoid Makemaker generated and utility files.
-\bMANIFEST\.bak
-\bMakefile$
-\bblib/
-\bMakeMaker-\d
-\bpm_to_blib\.ts$
-\bpm_to_blib$
-\bblibdirs\.ts$ # 6.18 through 6.25 generated this
-
-# Avoid Module::Build generated and utility files.
-\bBuild$
-\b_build/
-
-# Avoid temp and backup files.
-~$
-\.old$
-\#$
-\b\.#
-\.bak$
-
-# Avoid Devel::Cover files.
-\bcover_db\b
Deleted: vendor/perl/dist/lib/ExtUtils/MM.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,90 +0,0 @@
-package ExtUtils::MM;
-
-use strict;
-use ExtUtils::MakeMaker::Config;
-
-our $VERSION = '6.55_02';
-
-require ExtUtils::Liblist;
-require ExtUtils::MakeMaker;
-our @ISA = qw(ExtUtils::Liblist ExtUtils::MakeMaker);
-
-=head1 NAME
-
-ExtUtils::MM - OS adjusted ExtUtils::MakeMaker subclass
-
-=head1 SYNOPSIS
-
- require ExtUtils::MM;
- my $mm = MM->new(...);
-
-=head1 DESCRIPTION
-
-B<FOR INTERNAL USE ONLY>
-
-ExtUtils::MM is a subclass of ExtUtils::MakeMaker which automatically
-chooses the appropriate OS specific subclass for you
-(ie. ExtUils::MM_Unix, etc...).
-
-It also provides a convenient alias via the MM class (I didn't want
-MakeMaker modules outside of ExtUtils/).
-
-This class might turn out to be a temporary solution, but MM won't go
-away.
-
-=cut
-
-{
- # Convenient alias.
- package MM;
- our @ISA = qw(ExtUtils::MM);
- sub DESTROY {}
-}
-
-sub _is_win95 {
- # miniperl might not have the Win32 functions available and we need
- # to run in miniperl.
- my $have_win32 = eval { require Win32 };
- return $have_win32 && defined &Win32::IsWin95 ? Win32::IsWin95()
- : ! defined $ENV{SYSTEMROOT};
-}
-
-my %Is = ();
-$Is{VMS} = $^O eq 'VMS';
-$Is{OS2} = $^O eq 'os2';
-$Is{MacOS} = $^O eq 'MacOS';
-if( $^O eq 'MSWin32' ) {
- _is_win95() ? $Is{Win95} = 1 : $Is{Win32} = 1;
-}
-$Is{UWIN} = $^O =~ /^uwin(-nt)?$/;
-$Is{Cygwin} = $^O eq 'cygwin';
-$Is{NW5} = $Config{osname} eq 'NetWare'; # intentional
-$Is{BeOS} = ($^O =~ /beos/i or $^O eq 'haiku');
-$Is{DOS} = $^O eq 'dos';
-if( $Is{NW5} ) {
- $^O = 'NetWare';
- delete $Is{Win32};
-}
-$Is{VOS} = $^O eq 'vos';
-$Is{QNX} = $^O eq 'qnx';
-$Is{AIX} = $^O eq 'aix';
-$Is{Darwin} = $^O eq 'darwin';
-
-$Is{Unix} = !grep { $_ } values %Is;
-
-map { delete $Is{$_} unless $Is{$_} } keys %Is;
-_assert( keys %Is == 1 );
-my($OS) = keys %Is;
-
-
-my $class = "ExtUtils::MM_$OS";
-eval "require $class" unless $INC{"ExtUtils/MM_$OS.pm"}; ## no critic
-die $@ if $@;
-unshift @ISA, $class;
-
-
-sub _assert {
- my $sanity = shift;
- die sprintf "Assert failed at %s line %d\n", (caller)[1,2] unless $sanity;
- return;
-}
Deleted: vendor/perl/dist/lib/ExtUtils/MM_AIX.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_AIX.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_AIX.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,79 +0,0 @@
-package ExtUtils::MM_AIX;
-
-use strict;
-our $VERSION = '6.55_02';
-
-require ExtUtils::MM_Unix;
-our @ISA = qw(ExtUtils::MM_Unix);
-
-use ExtUtils::MakeMaker qw(neatvalue);
-
-
-=head1 NAME
-
-ExtUtils::MM_AIX - AIX specific subclass of ExtUtils::MM_Unix
-
-=head1 SYNOPSIS
-
- Don't use this module directly.
- Use ExtUtils::MM and let it choose.
-
-=head1 DESCRIPTION
-
-This is a subclass of ExtUtils::MM_Unix which contains functionality for
-AIX.
-
-Unless otherwise stated it works just like ExtUtils::MM_Unix
-
-=head2 Overridden methods
-
-=head3 dlsyms
-
-Define DL_FUNCS and DL_VARS and write the *.exp files.
-
-=cut
-
-sub dlsyms {
- my($self,%attribs) = @_;
-
- return '' unless $self->needs_linking();
-
- my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
- my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
- my($funclist) = $attribs{FUNCLIST} || $self->{FUNCLIST} || [];
- my(@m);
-
- push(@m,"
-dynamic :: $self->{BASEEXT}.exp
-
-") unless $self->{SKIPHASH}{'dynamic'}; # dynamic and static are subs, so...
-
- push(@m,"
-static :: $self->{BASEEXT}.exp
-
-") unless $self->{SKIPHASH}{'static'}; # we avoid a warning if we tick them
-
- push(@m,"
-$self->{BASEEXT}.exp: Makefile.PL
-",' $(PERLRUN) -e \'use ExtUtils::Mksymlists; \\
- Mksymlists("NAME" => "',$self->{NAME},'", "DL_FUNCS" => ',
- neatvalue($funcs), ', "FUNCLIST" => ', neatvalue($funclist),
- ', "DL_VARS" => ', neatvalue($vars), ');\'
-');
-
- join('', at m);
-}
-
-
-=head1 AUTHOR
-
-Michael G Schwern <schwern at pobox.com> with code from ExtUtils::MM_Unix
-
-=head1 SEE ALSO
-
-L<ExtUtils::MakeMaker>
-
-=cut
-
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/MM_Any.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_Any.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_Any.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,2332 +0,0 @@
-package ExtUtils::MM_Any;
-
-use strict;
-our $VERSION = '6.55_02';
-
-use Carp;
-use File::Spec;
-use File::Basename;
-BEGIN { our @ISA = qw(File::Spec); }
-
-# We need $Verbose
-use ExtUtils::MakeMaker qw($Verbose);
-
-use ExtUtils::MakeMaker::Config;
-
-
-# So we don't have to keep calling the methods over and over again,
-# we have these globals to cache the values. Faster and shrtr.
-my $Curdir = __PACKAGE__->curdir;
-my $Rootdir = __PACKAGE__->rootdir;
-my $Updir = __PACKAGE__->updir;
-
-
-=head1 NAME
-
-ExtUtils::MM_Any - Platform-agnostic MM methods
-
-=head1 SYNOPSIS
-
- FOR INTERNAL USE ONLY!
-
- package ExtUtils::MM_SomeOS;
-
- # Temporarily, you have to subclass both. Put MM_Any first.
- require ExtUtils::MM_Any;
- require ExtUtils::MM_Unix;
- @ISA = qw(ExtUtils::MM_Any ExtUtils::Unix);
-
-=head1 DESCRIPTION
-
-B<FOR INTERNAL USE ONLY!>
-
-ExtUtils::MM_Any is a superclass for the ExtUtils::MM_* set of
-modules. It contains methods which are either inherently
-cross-platform or are written in a cross-platform manner.
-
-Subclass off of ExtUtils::MM_Any I<and> ExtUtils::MM_Unix. This is a
-temporary solution.
-
-B<THIS MAY BE TEMPORARY!>
-
-
-=head1 METHODS
-
-Any methods marked I<Abstract> must be implemented by subclasses.
-
-
-=head2 Cross-platform helper methods
-
-These are methods which help writing cross-platform code.
-
-
-
-=head3 os_flavor I<Abstract>
-
- my @os_flavor = $mm->os_flavor;
-
- at os_flavor is the style of operating system this is, usually
-corresponding to the MM_*.pm file we're using.
-
-The first element of @os_flavor is the major family (ie. Unix,
-Windows, VMS, OS/2, etc...) and the rest are sub families.
-
-Some examples:
-
- Cygwin98 ('Unix', 'Cygwin', 'Cygwin9x')
- Windows ('Win32')
- Win98 ('Win32', 'Win9x')
- Linux ('Unix', 'Linux')
- MacOS X ('Unix', 'Darwin', 'MacOS', 'MacOS X')
- OS/2 ('OS/2')
-
-This is used to write code for styles of operating system.
-See os_flavor_is() for use.
-
-
-=head3 os_flavor_is
-
- my $is_this_flavor = $mm->os_flavor_is($this_flavor);
- my $is_this_flavor = $mm->os_flavor_is(@one_of_these_flavors);
-
-Checks to see if the current operating system is one of the given flavors.
-
-This is useful for code like:
-
- if( $mm->os_flavor_is('Unix') ) {
- $out = `foo 2>&1`;
- }
- else {
- $out = `foo`;
- }
-
-=cut
-
-sub os_flavor_is {
- my $self = shift;
- my %flavors = map { ($_ => 1) } $self->os_flavor;
- return (grep { $flavors{$_} } @_) ? 1 : 0;
-}
-
-
-=head3 can_load_xs
-
- my $can_load_xs = $self->can_load_xs;
-
-Returns true if we have the ability to load XS.
-
-This is important because miniperl, used to build XS modules in the
-core, can not load XS.
-
-=cut
-
-sub can_load_xs {
- return defined &DynaLoader::boot_DynaLoader ? 1 : 0;
-}
-
-
-=head3 split_command
-
- my @cmds = $MM->split_command($cmd, @args);
-
-Most OS have a maximum command length they can execute at once. Large
-modules can easily generate commands well past that limit. Its
-necessary to split long commands up into a series of shorter commands.
-
-C<split_command> will return a series of @cmds each processing part of
-the args. Collectively they will process all the arguments. Each
-individual line in @cmds will not be longer than the
-$self->max_exec_len being careful to take into account macro expansion.
-
-$cmd should include any switches and repeated initial arguments.
-
-If no @args are given, no @cmds will be returned.
-
-Pairs of arguments will always be preserved in a single command, this
-is a heuristic for things like pm_to_blib and pod2man which work on
-pairs of arguments. This makes things like this safe:
-
- $self->split_command($cmd, %pod2man);
-
-
-=cut
-
-sub split_command {
- my($self, $cmd, @args) = @_;
-
- my @cmds = ();
- return(@cmds) unless @args;
-
- # If the command was given as a here-doc, there's probably a trailing
- # newline.
- chomp $cmd;
-
- # set aside 30% for macro expansion.
- my $len_left = int($self->max_exec_len * 0.70);
- $len_left -= length $self->_expand_macros($cmd);
-
- do {
- my $arg_str = '';
- my @next_args;
- while( @next_args = splice(@args, 0, 2) ) {
- # Two at a time to preserve pairs.
- my $next_arg_str = "\t ". join ' ', @next_args, "\n";
-
- if( !length $arg_str ) {
- $arg_str .= $next_arg_str
- }
- elsif( length($arg_str) + length($next_arg_str) > $len_left ) {
- unshift @args, @next_args;
- last;
- }
- else {
- $arg_str .= $next_arg_str;
- }
- }
- chop $arg_str;
-
- push @cmds, $self->escape_newlines("$cmd \n$arg_str");
- } while @args;
-
- return @cmds;
-}
-
-
-sub _expand_macros {
- my($self, $cmd) = @_;
-
- $cmd =~ s{\$\((\w+)\)}{
- defined $self->{$1} ? $self->{$1} : "\$($1)"
- }e;
- return $cmd;
-}
-
-
-=head3 echo
-
- my @commands = $MM->echo($text);
- my @commands = $MM->echo($text, $file);
- my @commands = $MM->echo($text, $file, $appending);
-
-Generates a set of @commands which print the $text to a $file.
-
-If $file is not given, output goes to STDOUT.
-
-If $appending is true the $file will be appended to rather than
-overwritten.
-
-=cut
-
-sub echo {
- my($self, $text, $file, $appending) = @_;
- $appending ||= 0;
-
- my @cmds = map { '$(NOECHO) $(ECHO) '.$self->quote_literal($_) }
- split /\n/, $text;
- if( $file ) {
- my $redirect = $appending ? '>>' : '>';
- $cmds[0] .= " $redirect $file";
- $_ .= " >> $file" foreach @cmds[1..$#cmds];
- }
-
- return @cmds;
-}
-
-
-=head3 wraplist
-
- my $args = $mm->wraplist(@list);
-
-Takes an array of items and turns them into a well-formatted list of
-arguments. In most cases this is simply something like:
-
- FOO \
- BAR \
- BAZ
-
-=cut
-
-sub wraplist {
- my $self = shift;
- return join " \\\n\t", @_;
-}
-
-
-=head3 maketext_filter
-
- my $filter_make_text = $mm->maketext_filter($make_text);
-
-The text of the Makefile is run through this method before writing to
-disk. It allows systems a chance to make portability fixes to the
-Makefile.
-
-By default it does nothing.
-
-This method is protected and not intended to be called outside of
-MakeMaker.
-
-=cut
-
-sub maketext_filter { return $_[1] }
-
-
-=head3 cd I<Abstract>
-
- my $subdir_cmd = $MM->cd($subdir, @cmds);
-
-This will generate a make fragment which runs the @cmds in the given
-$dir. The rough equivalent to this, except cross platform.
-
- cd $subdir && $cmd
-
-Currently $dir can only go down one level. "foo" is fine. "foo/bar" is
-not. "../foo" is right out.
-
-The resulting $subdir_cmd has no leading tab nor trailing newline. This
-makes it easier to embed in a make string. For example.
-
- my $make = sprintf <<'CODE', $subdir_cmd;
- foo :
- $(ECHO) what
- %s
- $(ECHO) mouche
- CODE
-
-
-=head3 oneliner I<Abstract>
-
- my $oneliner = $MM->oneliner($perl_code);
- my $oneliner = $MM->oneliner($perl_code, \@switches);
-
-This will generate a perl one-liner safe for the particular platform
-you're on based on the given $perl_code and @switches (a -e is
-assumed) suitable for using in a make target. It will use the proper
-shell quoting and escapes.
-
-$(PERLRUN) will be used as perl.
-
-Any newlines in $perl_code will be escaped. Leading and trailing
-newlines will be stripped. Makes this idiom much easier:
-
- my $code = $MM->oneliner(<<'CODE', [...switches...]);
-some code here
-another line here
-CODE
-
-Usage might be something like:
-
- # an echo emulation
- $oneliner = $MM->oneliner('print "Foo\n"');
- $make = '$oneliner > somefile';
-
-All dollar signs must be doubled in the $perl_code if you expect them
-to be interpreted normally, otherwise it will be considered a make
-macro. Also remember to quote make macros else it might be used as a
-bareword. For example:
-
- # Assign the value of the $(VERSION_FROM) make macro to $vf.
- $oneliner = $MM->oneliner('$$vf = "$(VERSION_FROM)"');
-
-Its currently very simple and may be expanded sometime in the figure
-to include more flexible code and switches.
-
-
-=head3 quote_literal I<Abstract>
-
- my $safe_text = $MM->quote_literal($text);
-
-This will quote $text so it is interpreted literally in the shell.
-
-For example, on Unix this would escape any single-quotes in $text and
-put single-quotes around the whole thing.
-
-
-=head3 escape_newlines I<Abstract>
-
- my $escaped_text = $MM->escape_newlines($text);
-
-Shell escapes newlines in $text.
-
-
-=head3 max_exec_len I<Abstract>
-
- my $max_exec_len = $MM->max_exec_len;
-
-Calculates the maximum command size the OS can exec. Effectively,
-this is the max size of a shell command line.
-
-=for _private
-$self->{_MAX_EXEC_LEN} is set by this method, but only for testing purposes.
-
-
-=head3 make
-
- my $make = $MM->make;
-
-Returns the make variant we're generating the Makefile for. This attempts
-to do some normalization on the information from %Config or the user.
-
-=cut
-
-sub make {
- my $self = shift;
-
- my $make = lc $self->{MAKE};
-
- # Truncate anything like foomake6 to just foomake.
- $make =~ s/^(\w+make).*/$1/;
-
- # Turn gnumake into gmake.
- $make =~ s/^gnu/g/;
-
- return $make;
-}
-
-
-=head2 Targets
-
-These are methods which produce make targets.
-
-
-=head3 all_target
-
-Generate the default target 'all'.
-
-=cut
-
-sub all_target {
- my $self = shift;
-
- return <<'MAKE_EXT';
-all :: pure_all
- $(NOECHO) $(NOOP)
-MAKE_EXT
-
-}
-
-
-=head3 blibdirs_target
-
- my $make_frag = $mm->blibdirs_target;
-
-Creates the blibdirs target which creates all the directories we use
-in blib/.
-
-The blibdirs.ts target is deprecated. Depend on blibdirs instead.
-
-
-=cut
-
-sub blibdirs_target {
- my $self = shift;
-
- my @dirs = map { uc "\$(INST_$_)" } qw(libdir archlib
- autodir archautodir
- bin script
- man1dir man3dir
- );
-
- my @exists = map { $_.'$(DFSEP).exists' } @dirs;
-
- my $make = sprintf <<'MAKE', join(' ', @exists);
-blibdirs : %s
- $(NOECHO) $(NOOP)
-
-# Backwards compat with 6.18 through 6.25
-blibdirs.ts : blibdirs
- $(NOECHO) $(NOOP)
-
-MAKE
-
- $make .= $self->dir_target(@dirs);
-
- return $make;
-}
-
-
-=head3 clean (o)
-
-Defines the clean target.
-
-=cut
-
-sub clean {
-# --- Cleanup and Distribution Sections ---
-
- my($self, %attribs) = @_;
- my @m;
- push(@m, '
-# Delete temporary files but do not touch installed files. We don\'t delete
-# the Makefile here so a later make realclean still has a makefile to use.
-
-clean :: clean_subdirs
-');
-
- my @files = values %{$self->{XS}}; # .c files from *.xs files
- my @dirs = qw(blib);
-
- # Normally these are all under blib but they might have been
- # redefined.
- # XXX normally this would be a good idea, but the Perl core sets
- # INST_LIB = ../../lib rather than actually installing the files.
- # So a "make clean" in an ext/ directory would blow away lib.
- # Until the core is adjusted let's leave this out.
-# push @dirs, qw($(INST_ARCHLIB) $(INST_LIB)
-# $(INST_BIN) $(INST_SCRIPT)
-# $(INST_MAN1DIR) $(INST_MAN3DIR)
-# $(INST_LIBDIR) $(INST_ARCHLIBDIR) $(INST_AUTODIR)
-# $(INST_STATIC) $(INST_DYNAMIC) $(INST_BOOT)
-# );
-
-
- if( $attribs{FILES} ) {
- # Use @dirs because we don't know what's in here.
- push @dirs, ref $attribs{FILES} ?
- @{$attribs{FILES}} :
- split /\s+/, $attribs{FILES} ;
- }
-
- push(@files, qw[$(MAKE_APERL_FILE)
- perlmain.c tmon.out mon.out so_locations
- blibdirs.ts pm_to_blib pm_to_blib.ts
- *$(OBJ_EXT) *$(LIB_EXT) perl.exe perl perl$(EXE_EXT)
- $(BOOTSTRAP) $(BASEEXT).bso
- $(BASEEXT).def lib$(BASEEXT).def
- $(BASEEXT).exp $(BASEEXT).x
- ]);
-
- push(@files, $self->catfile('$(INST_ARCHAUTODIR)','extralibs.all'));
- push(@files, $self->catfile('$(INST_ARCHAUTODIR)','extralibs.ld'));
-
- # core files
- push(@files, qw[core core.*perl.*.? *perl.core]);
- push(@files, map { "core." . "[0-9]"x$_ } (1..5));
-
- # OS specific things to clean up. Use @dirs since we don't know
- # what might be in here.
- push @dirs, $self->extra_clean_files;
-
- # Occasionally files are repeated several times from different sources
- { my(%f) = map { ($_ => 1) } @files; @files = keys %f; }
- { my(%d) = map { ($_ => 1) } @dirs; @dirs = keys %d; }
-
- push @m, map "\t$_\n", $self->split_command('- $(RM_F)', @files);
- push @m, map "\t$_\n", $self->split_command('- $(RM_RF)', @dirs);
-
- # Leave Makefile.old around for realclean
- push @m, <<'MAKE';
- - $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
-MAKE
-
- push(@m, "\t$attribs{POSTOP}\n") if $attribs{POSTOP};
-
- join("", @m);
-}
-
-
-=head3 clean_subdirs_target
-
- my $make_frag = $MM->clean_subdirs_target;
-
-Returns the clean_subdirs target. This is used by the clean target to
-call clean on any subdirectories which contain Makefiles.
-
-=cut
-
-sub clean_subdirs_target {
- my($self) = shift;
-
- # No subdirectories, no cleaning.
- return <<'NOOP_FRAG' unless @{$self->{DIR}};
-clean_subdirs :
- $(NOECHO) $(NOOP)
-NOOP_FRAG
-
-
- my $clean = "clean_subdirs :\n";
-
- for my $dir (@{$self->{DIR}}) {
- my $subclean = $self->oneliner(sprintf <<'CODE', $dir);
-chdir '%s'; system '$(MAKE) clean' if -f '$(FIRST_MAKEFILE)';
-CODE
-
- $clean .= "\t$subclean\n";
- }
-
- return $clean;
-}
-
-
-=head3 dir_target
-
- my $make_frag = $mm->dir_target(@directories);
-
-Generates targets to create the specified directories and set its
-permission to PERM_DIR.
-
-Because depending on a directory to just ensure it exists doesn't work
-too well (the modified time changes too often) dir_target() creates a
-.exists file in the created directory. It is this you should depend on.
-For portability purposes you should use the $(DIRFILESEP) macro rather
-than a '/' to seperate the directory from the file.
-
- yourdirectory$(DIRFILESEP).exists
-
-=cut
-
-sub dir_target {
- my($self, @dirs) = @_;
-
- my $make = '';
- foreach my $dir (@dirs) {
- $make .= sprintf <<'MAKE', ($dir) x 7;
-%s$(DFSEP).exists :: Makefile.PL
- $(NOECHO) $(MKPATH) %s
- $(NOECHO) $(CHMOD) $(PERM_DIR) %s
- $(NOECHO) $(TOUCH) %s$(DFSEP).exists
-
-MAKE
-
- }
-
- return $make;
-}
-
-
-=head3 distdir
-
-Defines the scratch directory target that will hold the distribution
-before tar-ing (or shar-ing).
-
-=cut
-
-# For backwards compatibility.
-*dist_dir = *distdir;
-
-sub distdir {
- my($self) = shift;
-
- my $meta_target = $self->{NO_META} ? '' : 'distmeta';
- my $sign_target = !$self->{SIGN} ? '' : 'distsignature';
-
- return sprintf <<'MAKE_FRAG', $meta_target, $sign_target;
-create_distdir :
- $(RM_RF) $(DISTVNAME)
- $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
- -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
-
-distdir : create_distdir %s %s
- $(NOECHO) $(NOOP)
-
-MAKE_FRAG
-
-}
-
-
-=head3 dist_test
-
-Defines a target that produces the distribution in the
-scratchdirectory, and runs 'perl Makefile.PL; make ;make test' in that
-subdirectory.
-
-=cut
-
-sub dist_test {
- my($self) = shift;
-
- my $mpl_args = join " ", map qq["$_"], @ARGV;
-
- my $test = $self->cd('$(DISTVNAME)',
- '$(ABSPERLRUN) Makefile.PL '.$mpl_args,
- '$(MAKE) $(PASTHRU)',
- '$(MAKE) test $(PASTHRU)'
- );
-
- return sprintf <<'MAKE_FRAG', $test;
-disttest : distdir
- %s
-
-MAKE_FRAG
-
-
-}
-
-
-=head3 dynamic (o)
-
-Defines the dynamic target.
-
-=cut
-
-sub dynamic {
-# --- Dynamic Loading Sections ---
-
- my($self) = shift;
- '
-dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
- $(NOECHO) $(NOOP)
-';
-}
-
-
-=head3 makemakerdflt_target
-
- my $make_frag = $mm->makemakerdflt_target
-
-Returns a make fragment with the makemakerdeflt_target specified.
-This target is the first target in the Makefile, is the default target
-and simply points off to 'all' just in case any make variant gets
-confused or something gets snuck in before the real 'all' target.
-
-=cut
-
-sub makemakerdflt_target {
- return <<'MAKE_FRAG';
-makemakerdflt : all
- $(NOECHO) $(NOOP)
-MAKE_FRAG
-
-}
-
-
-=head3 manifypods_target
-
- my $manifypods_target = $self->manifypods_target;
-
-Generates the manifypods target. This target generates man pages from
-all POD files in MAN1PODS and MAN3PODS.
-
-=cut
-
-sub manifypods_target {
- my($self) = shift;
-
- my $man1pods = '';
- my $man3pods = '';
- my $dependencies = '';
-
- # populate manXpods & dependencies:
- foreach my $name (keys %{$self->{MAN1PODS}}, keys %{$self->{MAN3PODS}}) {
- $dependencies .= " \\\n\t$name";
- }
-
- my $manify = <<END;
-manifypods : pure_all $dependencies
-END
-
- my @man_cmds;
- foreach my $section (qw(1 3)) {
- my $pods = $self->{"MAN${section}PODS"};
- push @man_cmds, $self->split_command(<<CMD, %$pods);
- \$(NOECHO) \$(POD2MAN) --section=$section --perm_rw=\$(PERM_RW)
-CMD
- }
-
- $manify .= "\t\$(NOECHO) \$(NOOP)\n" unless @man_cmds;
- $manify .= join '', map { "$_\n" } @man_cmds;
-
- return $manify;
-}
-
-
-=head3 metafile_target
-
- my $target = $mm->metafile_target;
-
-Generate the metafile target.
-
-Writes the file META.yml YAML encoded meta-data about the module in
-the distdir. The format follows Module::Build's as closely as
-possible.
-
-=cut
-
-sub metafile_target {
- my $self = shift;
-
- return <<'MAKE_FRAG' if $self->{NO_META};
-metafile :
- $(NOECHO) $(NOOP)
-MAKE_FRAG
-
- my @metadata = $self->metafile_data(
- $self->{META_ADD} || {},
- $self->{META_MERGE} || {},
- );
- my $meta = $self->metafile_file(@metadata);
- my @write_meta = $self->echo($meta, 'META_new.yml');
-
- return sprintf <<'MAKE_FRAG', join("\n\t", @write_meta);
-metafile : create_distdir
- $(NOECHO) $(ECHO) Generating META.yml
- %s
- -$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml
-MAKE_FRAG
-
-}
-
-
-=begin private
-
-=head3 _sort_pairs
-
- my @pairs = _sort_pairs($sort_sub, \%hash);
-
-Sorts the pairs of a hash based on keys ordered according
-to C<$sort_sub>.
-
-=end private
-
-=cut
-
-sub _sort_pairs {
- my $sort = shift;
- my $pairs = shift;
- return map { $_ => $pairs->{$_} }
- sort $sort
- keys %$pairs;
-}
-
-
-# Taken from Module::Build::Base
-sub _hash_merge {
- my ($self, $h, $k, $v) = @_;
- if (ref $h->{$k} eq 'ARRAY') {
- push @{$h->{$k}}, ref $v ? @$v : $v;
- } elsif (ref $h->{$k} eq 'HASH') {
- $self->_hash_merge($h->{$k}, $_, $v->{$_}) foreach keys %$v;
- } else {
- $h->{$k} = $v;
- }
-}
-
-
-=head3 metafile_data
-
- my @metadata_pairs = $mm->metafile_data(\%meta_add, \%meta_merge);
-
-Returns the data which MakeMaker turns into the META.yml file.
-
-Values of %meta_add will overwrite any existing metadata in those
-keys. %meta_merge will be merged with them.
-
-=cut
-
-sub metafile_data {
- my $self = shift;
- my($meta_add, $meta_merge) = @_;
-
- # The order in which standard meta keys should be written.
- my @meta_order = qw(
- name
- version
- abstract
- author
- license
- distribution_type
-
- configure_requires
- build_requires
- requires
-
- resources
-
- provides
- no_index
-
- generated_by
- meta-spec
- );
-
- # Check the original args so we can tell between the user setting it
- # to an empty hash and it just being initialized.
- my $configure_requires;
- if( $self->{ARGS}{CONFIGURE_REQUIRES} ) {
- $configure_requires = $self->{CONFIGURE_REQUIRES};
- } else {
- $configure_requires = {
- 'ExtUtils::MakeMaker' => 0,
- };
- }
- my $build_requires;
- if( $self->{ARGS}{BUILD_REQUIRES} ) {
- $build_requires = $self->{BUILD_REQUIRES};
- } else {
- $build_requires = {
- 'ExtUtils::MakeMaker' => 0,
- };
- }
-
- my %meta = (
- name => $self->{DISTNAME},
- version => $self->{VERSION},
- abstract => $self->{ABSTRACT},
- license => $self->{LICENSE} || 'unknown',
- distribution_type => $self->{PM} ? 'module' : 'script',
-
- configure_requires => $configure_requires,
-
- build_requires => $build_requires,
-
- no_index => {
- directory => [qw(t inc)]
- },
-
- generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
- 'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
- version => 1.4
- },
- );
-
- # The author key is required and it takes a list.
- $meta{author} = defined $self->{AUTHOR} ? [$self->{AUTHOR}] : [];
-
- $meta{requires} = $self->{PREREQ_PM} if defined $self->{PREREQ_PM};
- $meta{requires}{perl} = $self->{MIN_PERL_VERSION} if $self->{MIN_PERL_VERSION};
-
- while( my($key, $val) = each %$meta_add ) {
- $meta{$key} = $val;
- }
-
- while( my($key, $val) = each %$meta_merge ) {
- $self->_hash_merge(\%meta, $key, $val);
- }
-
- my @meta_pairs;
-
- # Put the standard keys first in the proper order.
- for my $key (@meta_order) {
- next unless exists $meta{$key};
-
- push @meta_pairs, $key, delete $meta{$key};
- }
-
- # Then tack everything else onto the end, alpha sorted.
- for my $key (sort {lc $a cmp lc $b} keys %meta) {
- push @meta_pairs, $key, $meta{$key};
- }
-
- return @meta_pairs
-}
-
-=begin private
-
-=head3 _dump_hash
-
- $yaml = _dump_hash(\%options, %hash);
-
-Implements a fake YAML dumper for a hash given
-as a list of pairs. No quoting/escaping is done. Keys
-are supposed to be strings. Values are undef, strings,
-hash refs or array refs of strings.
-
-Supported options are:
-
- delta => STR - indentation delta
- use_header => BOOL - whether to include a YAML header
- indent => STR - a string of spaces
- default: ''
-
- max_key_length => INT - maximum key length used to align
- keys and values of the same hash
- default: 20
- key_sort => CODE - a sort sub
- It may be undef, which means no sorting by keys
- default: sub { lc $a cmp lc $b }
-
- customs => HASH - special options for certain keys
- (whose values are hashes themselves)
- may contain: max_key_length, key_sort, customs
-
-=end private
-
-=cut
-
-sub _dump_hash {
- croak "first argument should be a hash ref" unless ref $_[0] eq 'HASH';
- my $options = shift;
- my %hash = @_;
-
- # Use a list to preserve order.
- my @pairs;
-
- my $k_sort
- = exists $options->{key_sort} ? $options->{key_sort}
- : sub { lc $a cmp lc $b };
- if ($k_sort) {
- croak "'key_sort' should be a coderef" unless ref $k_sort eq 'CODE';
- @pairs = _sort_pairs($k_sort, \%hash);
- } else { # list of pairs, no sorting
- @pairs = @_;
- }
-
- my $yaml = $options->{use_header} ? "--- #YAML:1.0\n" : '';
- my $indent = $options->{indent} || '';
- my $k_length = min(
- ($options->{max_key_length} || 20),
- max(map { length($_) + 1 } grep { !ref $hash{$_} } keys %hash)
- );
- my $customs = $options->{customs} || {};
-
- # printf format for key
- my $k_format = "%-${k_length}s";
-
- while( @pairs ) {
- my($key, $val) = splice @pairs, 0, 2;
- $val = '~' unless defined $val;
- if(ref $val eq 'HASH') {
- if ( keys %$val ) {
- my %k_options = ( # options for recursive call
- delta => $options->{delta},
- use_header => 0,
- indent => $indent . $options->{delta},
- );
- if (exists $customs->{$key}) {
- my %k_custom = %{$customs->{$key}};
- foreach my $k qw(key_sort max_key_length customs) {
- $k_options{$k} = $k_custom{$k} if exists $k_custom{$k};
- }
- }
- $yaml .= $indent . "$key:\n"
- . _dump_hash(\%k_options, %$val);
- }
- else {
- $yaml .= $indent . "$key: {}\n";
- }
- }
- elsif (ref $val eq 'ARRAY') {
- if( @$val ) {
- $yaml .= $indent . "$key:\n";
-
- for (@$val) {
- croak "only nested arrays of non-refs are supported" if ref $_;
- $yaml .= $indent . $options->{delta} . "- $_\n";
- }
- }
- else {
- $yaml .= $indent . "$key: []\n";
- }
- }
- elsif( ref $val and !blessed($val) ) {
- croak "only nested hashes, arrays and objects are supported";
- }
- else { # if it's an object, just stringify it
- $yaml .= $indent . sprintf "$k_format %s\n", "$key:", $val;
- }
- };
-
- return $yaml;
-
-}
-
-sub blessed {
- return eval { $_[0]->isa("UNIVERSAL"); };
-}
-
-sub max {
- return (sort { $b <=> $a } @_)[0];
-}
-
-sub min {
- return (sort { $a <=> $b } @_)[0];
-}
-
-=head3 metafile_file
-
- my $meta_yml = $mm->metafile_file(@metadata_pairs);
-
-Turns the @metadata_pairs into YAML.
-
-This method does not implement a complete YAML dumper, being limited
-to dump a hash with values which are strings, undef's or nested hashes
-and arrays of strings. No quoting/escaping is done.
-
-=cut
-
-sub metafile_file {
- my $self = shift;
-
- my %dump_options = (
- use_header => 1,
- delta => ' ' x 4,
- key_sort => undef,
- );
- return _dump_hash(\%dump_options, @_);
-
-}
-
-
-=head3 distmeta_target
-
- my $make_frag = $mm->distmeta_target;
-
-Generates the distmeta target to add META.yml to the MANIFEST in the
-distdir.
-
-=cut
-
-sub distmeta_target {
- my $self = shift;
-
- my $add_meta = $self->oneliner(<<'CODE', ['-MExtUtils::Manifest=maniadd']);
-eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) }
- or print "Could not add META.yml to MANIFEST: $${'@'}\n"
-CODE
-
- my $add_meta_to_distdir = $self->cd('$(DISTVNAME)', $add_meta);
-
- return sprintf <<'MAKE', $add_meta_to_distdir;
-distmeta : create_distdir metafile
- $(NOECHO) %s
-
-MAKE
-
-}
-
-
-=head3 realclean (o)
-
-Defines the realclean target.
-
-=cut
-
-sub realclean {
- my($self, %attribs) = @_;
-
- my @dirs = qw($(DISTVNAME));
- my @files = qw($(FIRST_MAKEFILE) $(MAKEFILE_OLD));
-
- # Special exception for the perl core where INST_* is not in blib.
- # This cleans up the files built from the ext/ directory (all XS).
- if( $self->{PERL_CORE} ) {
- push @dirs, qw($(INST_AUTODIR) $(INST_ARCHAUTODIR));
- push @files, values %{$self->{PM}};
- }
-
- if( $self->has_link_code ){
- push @files, qw($(OBJECT));
- }
-
- if( $attribs{FILES} ) {
- if( ref $attribs{FILES} ) {
- push @dirs, @{ $attribs{FILES} };
- }
- else {
- push @dirs, split /\s+/, $attribs{FILES};
- }
- }
-
- # Occasionally files are repeated several times from different sources
- { my(%f) = map { ($_ => 1) } @files; @files = keys %f; }
- { my(%d) = map { ($_ => 1) } @dirs; @dirs = keys %d; }
-
- my $rm_cmd = join "\n\t", map { "$_" }
- $self->split_command('- $(RM_F)', @files);
- my $rmf_cmd = join "\n\t", map { "$_" }
- $self->split_command('- $(RM_RF)', @dirs);
-
- my $m = sprintf <<'MAKE', $rm_cmd, $rmf_cmd;
-# Delete temporary files (via clean) and also delete dist files
-realclean purge :: clean realclean_subdirs
- %s
- %s
-MAKE
-
- $m .= "\t$attribs{POSTOP}\n" if $attribs{POSTOP};
-
- return $m;
-}
-
-
-=head3 realclean_subdirs_target
-
- my $make_frag = $MM->realclean_subdirs_target;
-
-Returns the realclean_subdirs target. This is used by the realclean
-target to call realclean on any subdirectories which contain Makefiles.
-
-=cut
-
-sub realclean_subdirs_target {
- my $self = shift;
-
- return <<'NOOP_FRAG' unless @{$self->{DIR}};
-realclean_subdirs :
- $(NOECHO) $(NOOP)
-NOOP_FRAG
-
- my $rclean = "realclean_subdirs :\n";
-
- foreach my $dir (@{$self->{DIR}}) {
- foreach my $makefile ('$(MAKEFILE_OLD)', '$(FIRST_MAKEFILE)' ) {
- my $subrclean .= $self->oneliner(sprintf <<'CODE', $dir, ($makefile) x 2);
-chdir '%s'; system '$(MAKE) $(USEMAKEFILE) %s realclean' if -f '%s';
-CODE
-
- $rclean .= sprintf <<'RCLEAN', $subrclean;
- - %s
-RCLEAN
-
- }
- }
-
- return $rclean;
-}
-
-
-=head3 signature_target
-
- my $target = $mm->signature_target;
-
-Generate the signature target.
-
-Writes the file SIGNATURE with "cpansign -s".
-
-=cut
-
-sub signature_target {
- my $self = shift;
-
- return <<'MAKE_FRAG';
-signature :
- cpansign -s
-MAKE_FRAG
-
-}
-
-
-=head3 distsignature_target
-
- my $make_frag = $mm->distsignature_target;
-
-Generates the distsignature target to add SIGNATURE to the MANIFEST in the
-distdir.
-
-=cut
-
-sub distsignature_target {
- my $self = shift;
-
- my $add_sign = $self->oneliner(<<'CODE', ['-MExtUtils::Manifest=maniadd']);
-eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) }
- or print "Could not add SIGNATURE to MANIFEST: $${'@'}\n"
-CODE
-
- my $sign_dist = $self->cd('$(DISTVNAME)' => 'cpansign -s');
-
- # cpansign -s complains if SIGNATURE is in the MANIFEST yet does not
- # exist
- my $touch_sig = $self->cd('$(DISTVNAME)' => '$(TOUCH) SIGNATURE');
- my $add_sign_to_dist = $self->cd('$(DISTVNAME)' => $add_sign );
-
- return sprintf <<'MAKE', $add_sign_to_dist, $touch_sig, $sign_dist
-distsignature : create_distdir
- $(NOECHO) %s
- $(NOECHO) %s
- %s
-
-MAKE
-
-}
-
-
-=head3 special_targets
-
- my $make_frag = $mm->special_targets
-
-Returns a make fragment containing any targets which have special
-meaning to make. For example, .SUFFIXES and .PHONY.
-
-=cut
-
-sub special_targets {
- my $make_frag = <<'MAKE_FRAG';
-.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
-
-.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
-
-MAKE_FRAG
-
- $make_frag .= <<'MAKE_FRAG' if $ENV{CLEARCASE_ROOT};
-.NO_CONFIG_REC: Makefile
-
-MAKE_FRAG
-
- return $make_frag;
-}
-
-
-
-
-=head2 Init methods
-
-Methods which help initialize the MakeMaker object and macros.
-
-
-=head3 init_ABSTRACT
-
- $mm->init_ABSTRACT
-
-=cut
-
-sub init_ABSTRACT {
- my $self = shift;
-
- if( $self->{ABSTRACT_FROM} and $self->{ABSTRACT} ) {
- warn "Both ABSTRACT_FROM and ABSTRACT are set. ".
- "Ignoring ABSTRACT_FROM.\n";
- return;
- }
-
- if ($self->{ABSTRACT_FROM}){
- $self->{ABSTRACT} = $self->parse_abstract($self->{ABSTRACT_FROM}) or
- carp "WARNING: Setting ABSTRACT via file ".
- "'$self->{ABSTRACT_FROM}' failed\n";
- }
-}
-
-=head3 init_INST
-
- $mm->init_INST;
-
-Called by init_main. Sets up all INST_* variables except those related
-to XS code. Those are handled in init_xs.
-
-=cut
-
-sub init_INST {
- my($self) = shift;
-
- $self->{INST_ARCHLIB} ||= $self->catdir($Curdir,"blib","arch");
- $self->{INST_BIN} ||= $self->catdir($Curdir,'blib','bin');
-
- # INST_LIB typically pre-set if building an extension after
- # perl has been built and installed. Setting INST_LIB allows
- # you to build directly into, say $Config{privlibexp}.
- unless ($self->{INST_LIB}){
- if ($self->{PERL_CORE}) {
- if (defined $Cross::platform) {
- $self->{INST_LIB} = $self->{INST_ARCHLIB} =
- $self->catdir($self->{PERL_LIB},"..","xlib",
- $Cross::platform);
- }
- else {
- $self->{INST_LIB} = $self->{INST_ARCHLIB} = $self->{PERL_LIB};
- }
- } else {
- $self->{INST_LIB} = $self->catdir($Curdir,"blib","lib");
- }
- }
-
- my @parentdir = split(/::/, $self->{PARENT_NAME});
- $self->{INST_LIBDIR} = $self->catdir('$(INST_LIB)', @parentdir);
- $self->{INST_ARCHLIBDIR} = $self->catdir('$(INST_ARCHLIB)', @parentdir);
- $self->{INST_AUTODIR} = $self->catdir('$(INST_LIB)', 'auto',
- '$(FULLEXT)');
- $self->{INST_ARCHAUTODIR} = $self->catdir('$(INST_ARCHLIB)', 'auto',
- '$(FULLEXT)');
-
- $self->{INST_SCRIPT} ||= $self->catdir($Curdir,'blib','script');
-
- $self->{INST_MAN1DIR} ||= $self->catdir($Curdir,'blib','man1');
- $self->{INST_MAN3DIR} ||= $self->catdir($Curdir,'blib','man3');
-
- return 1;
-}
-
-
-=head3 init_INSTALL
-
- $mm->init_INSTALL;
-
-Called by init_main. Sets up all INSTALL_* variables (except
-INSTALLDIRS) and *PREFIX.
-
-=cut
-
-sub init_INSTALL {
- my($self) = shift;
-
- if( $self->{ARGS}{INSTALL_BASE} and $self->{ARGS}{PREFIX} ) {
- die "Only one of PREFIX or INSTALL_BASE can be given. Not both.\n";
- }
-
- if( $self->{ARGS}{INSTALL_BASE} ) {
- $self->init_INSTALL_from_INSTALL_BASE;
- }
- else {
- $self->init_INSTALL_from_PREFIX;
- }
-}
-
-
-=head3 init_INSTALL_from_PREFIX
-
- $mm->init_INSTALL_from_PREFIX;
-
-=cut
-
-sub init_INSTALL_from_PREFIX {
- my $self = shift;
-
- $self->init_lib2arch;
-
- # There are often no Config.pm defaults for these new man variables so
- # we fall back to the old behavior which is to use installman*dir
- foreach my $num (1, 3) {
- my $k = 'installsiteman'.$num.'dir';
-
- $self->{uc $k} ||= uc "\$(installman${num}dir)"
- unless $Config{$k};
- }
-
- foreach my $num (1, 3) {
- my $k = 'installvendorman'.$num.'dir';
-
- unless( $Config{$k} ) {
- $self->{uc $k} ||= $Config{usevendorprefix}
- ? uc "\$(installman${num}dir)"
- : '';
- }
- }
-
- $self->{INSTALLSITEBIN} ||= '$(INSTALLBIN)'
- unless $Config{installsitebin};
- $self->{INSTALLSITESCRIPT} ||= '$(INSTALLSCRIPT)'
- unless $Config{installsitescript};
-
- unless( $Config{installvendorbin} ) {
- $self->{INSTALLVENDORBIN} ||= $Config{usevendorprefix}
- ? $Config{installbin}
- : '';
- }
- unless( $Config{installvendorscript} ) {
- $self->{INSTALLVENDORSCRIPT} ||= $Config{usevendorprefix}
- ? $Config{installscript}
- : '';
- }
-
-
- my $iprefix = $Config{installprefixexp} || $Config{installprefix} ||
- $Config{prefixexp} || $Config{prefix} || '';
- my $vprefix = $Config{usevendorprefix} ? $Config{vendorprefixexp} : '';
- my $sprefix = $Config{siteprefixexp} || '';
-
- # 5.005_03 doesn't have a siteprefix.
- $sprefix = $iprefix unless $sprefix;
-
-
- $self->{PREFIX} ||= '';
-
- if( $self->{PREFIX} ) {
- @{$self}{qw(PERLPREFIX SITEPREFIX VENDORPREFIX)} =
- ('$(PREFIX)') x 3;
- }
- else {
- $self->{PERLPREFIX} ||= $iprefix;
- $self->{SITEPREFIX} ||= $sprefix;
- $self->{VENDORPREFIX} ||= $vprefix;
-
- # Lots of MM extension authors like to use $(PREFIX) so we
- # put something sensible in there no matter what.
- $self->{PREFIX} = '$('.uc $self->{INSTALLDIRS}.'PREFIX)';
- }
-
- my $arch = $Config{archname};
- my $version = $Config{version};
-
- # default style
- my $libstyle = $Config{installstyle} || 'lib/perl5';
- my $manstyle = '';
-
- if( $self->{LIBSTYLE} ) {
- $libstyle = $self->{LIBSTYLE};
- $manstyle = $self->{LIBSTYLE} eq 'lib/perl5' ? 'lib/perl5' : '';
- }
-
- # Some systems, like VOS, set installman*dir to '' if they can't
- # read man pages.
- for my $num (1, 3) {
- $self->{'INSTALLMAN'.$num.'DIR'} ||= 'none'
- unless $Config{'installman'.$num.'dir'};
- }
-
- my %bin_layouts =
- (
- bin => { s => $iprefix,
- t => 'perl',
- d => 'bin' },
- vendorbin => { s => $vprefix,
- t => 'vendor',
- d => 'bin' },
- sitebin => { s => $sprefix,
- t => 'site',
- d => 'bin' },
- script => { s => $iprefix,
- t => 'perl',
- d => 'bin' },
- vendorscript=> { s => $vprefix,
- t => 'vendor',
- d => 'bin' },
- sitescript => { s => $sprefix,
- t => 'site',
- d => 'bin' },
- );
-
- my %man_layouts =
- (
- man1dir => { s => $iprefix,
- t => 'perl',
- d => 'man/man1',
- style => $manstyle, },
- siteman1dir => { s => $sprefix,
- t => 'site',
- d => 'man/man1',
- style => $manstyle, },
- vendorman1dir => { s => $vprefix,
- t => 'vendor',
- d => 'man/man1',
- style => $manstyle, },
-
- man3dir => { s => $iprefix,
- t => 'perl',
- d => 'man/man3',
- style => $manstyle, },
- siteman3dir => { s => $sprefix,
- t => 'site',
- d => 'man/man3',
- style => $manstyle, },
- vendorman3dir => { s => $vprefix,
- t => 'vendor',
- d => 'man/man3',
- style => $manstyle, },
- );
-
- my %lib_layouts =
- (
- privlib => { s => $iprefix,
- t => 'perl',
- d => '',
- style => $libstyle, },
- vendorlib => { s => $vprefix,
- t => 'vendor',
- d => '',
- style => $libstyle, },
- sitelib => { s => $sprefix,
- t => 'site',
- d => 'site_perl',
- style => $libstyle, },
-
- archlib => { s => $iprefix,
- t => 'perl',
- d => "$version/$arch",
- style => $libstyle },
- vendorarch => { s => $vprefix,
- t => 'vendor',
- d => "$version/$arch",
- style => $libstyle },
- sitearch => { s => $sprefix,
- t => 'site',
- d => "site_perl/$version/$arch",
- style => $libstyle },
- );
-
-
- # Special case for LIB.
- if( $self->{LIB} ) {
- foreach my $var (keys %lib_layouts) {
- my $Installvar = uc "install$var";
-
- if( $var =~ /arch/ ) {
- $self->{$Installvar} ||=
- $self->catdir($self->{LIB}, $Config{archname});
- }
- else {
- $self->{$Installvar} ||= $self->{LIB};
- }
- }
- }
-
- my %type2prefix = ( perl => 'PERLPREFIX',
- site => 'SITEPREFIX',
- vendor => 'VENDORPREFIX'
- );
-
- my %layouts = (%bin_layouts, %man_layouts, %lib_layouts);
- while( my($var, $layout) = each(%layouts) ) {
- my($s, $t, $d, $style) = @{$layout}{qw(s t d style)};
- my $r = '$('.$type2prefix{$t}.')';
-
- print STDERR "Prefixing $var\n" if $Verbose >= 2;
-
- my $installvar = "install$var";
- my $Installvar = uc $installvar;
- next if $self->{$Installvar};
-
- $d = "$style/$d" if $style;
- $self->prefixify($installvar, $s, $r, $d);
-
- print STDERR " $Installvar == $self->{$Installvar}\n"
- if $Verbose >= 2;
- }
-
- # Generate these if they weren't figured out.
- $self->{VENDORARCHEXP} ||= $self->{INSTALLVENDORARCH};
- $self->{VENDORLIBEXP} ||= $self->{INSTALLVENDORLIB};
-
- return 1;
-}
-
-
-=head3 init_from_INSTALL_BASE
-
- $mm->init_from_INSTALL_BASE
-
-=cut
-
-my %map = (
- lib => [qw(lib perl5)],
- arch => [('lib', 'perl5', $Config{archname})],
- bin => [qw(bin)],
- man1dir => [qw(man man1)],
- man3dir => [qw(man man3)]
- );
-$map{script} = $map{bin};
-
-sub init_INSTALL_from_INSTALL_BASE {
- my $self = shift;
-
- @{$self}{qw(PREFIX VENDORPREFIX SITEPREFIX PERLPREFIX)} =
- '$(INSTALL_BASE)';
-
- my %install;
- foreach my $thing (keys %map) {
- foreach my $dir (('', 'SITE', 'VENDOR')) {
- my $uc_thing = uc $thing;
- my $key = "INSTALL".$dir.$uc_thing;
-
- $install{$key} ||=
- $self->catdir('$(INSTALL_BASE)', @{$map{$thing}});
- }
- }
-
- # Adjust for variable quirks.
- $install{INSTALLARCHLIB} ||= delete $install{INSTALLARCH};
- $install{INSTALLPRIVLIB} ||= delete $install{INSTALLLIB};
-
- foreach my $key (keys %install) {
- $self->{$key} ||= $install{$key};
- }
-
- return 1;
-}
-
-
-=head3 init_VERSION I<Abstract>
-
- $mm->init_VERSION
-
-Initialize macros representing versions of MakeMaker and other tools
-
-MAKEMAKER: path to the MakeMaker module.
-
-MM_VERSION: ExtUtils::MakeMaker Version
-
-MM_REVISION: ExtUtils::MakeMaker version control revision (for backwards
- compat)
-
-VERSION: version of your module
-
-VERSION_MACRO: which macro represents the version (usually 'VERSION')
-
-VERSION_SYM: like version but safe for use as an RCS revision number
-
-DEFINE_VERSION: -D line to set the module version when compiling
-
-XS_VERSION: version in your .xs file. Defaults to $(VERSION)
-
-XS_VERSION_MACRO: which macro represents the XS version.
-
-XS_DEFINE_VERSION: -D line to set the xs version when compiling.
-
-Called by init_main.
-
-=cut
-
-sub init_VERSION {
- my($self) = shift;
-
- $self->{MAKEMAKER} = $ExtUtils::MakeMaker::Filename;
- $self->{MM_VERSION} = $ExtUtils::MakeMaker::VERSION;
- $self->{MM_REVISION}= $ExtUtils::MakeMaker::Revision;
- $self->{VERSION_FROM} ||= '';
-
- if ($self->{VERSION_FROM}){
- $self->{VERSION} = $self->parse_version($self->{VERSION_FROM});
- if( $self->{VERSION} eq 'undef' ) {
- carp("WARNING: Setting VERSION via file ".
- "'$self->{VERSION_FROM}' failed\n");
- }
- }
-
- # strip blanks
- if (defined $self->{VERSION}) {
- $self->{VERSION} =~ s/^\s+//;
- $self->{VERSION} =~ s/\s+$//;
- }
- else {
- $self->{VERSION} = '';
- }
-
-
- $self->{VERSION_MACRO} = 'VERSION';
- ($self->{VERSION_SYM} = $self->{VERSION}) =~ s/\W/_/g;
- $self->{DEFINE_VERSION} = '-D$(VERSION_MACRO)=\"$(VERSION)\"';
-
-
- # Graham Barr and Paul Marquess had some ideas how to ensure
- # version compatibility between the *.pm file and the
- # corresponding *.xs file. The bottomline was, that we need an
- # XS_VERSION macro that defaults to VERSION:
- $self->{XS_VERSION} ||= $self->{VERSION};
-
- $self->{XS_VERSION_MACRO} = 'XS_VERSION';
- $self->{XS_DEFINE_VERSION} = '-D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"';
-
-}
-
-
-=head3 init_others
-
- $MM->init_others();
-
-Initializes the macro definitions used by tools_other() and places them
-in the $MM object.
-
-If there is no description, its the same as the parameter to
-WriteMakefile() documented in ExtUtils::MakeMaker.
-
-Defines at least these macros.
-
- Macro Description
-
- NOOP Do nothing
- NOECHO Tell make not to display the command itself
-
- MAKEFILE
- FIRST_MAKEFILE
- MAKEFILE_OLD
- MAKE_APERL_FILE File used by MAKE_APERL
-
- SHELL Program used to run shell commands
-
- ECHO Print text adding a newline on the end
- RM_F Remove a file
- RM_RF Remove a directory
- TOUCH Update a file's timestamp
- TEST_F Test for a file's existence
- CP Copy a file
- MV Move a file
- CHMOD Change permissions on a file
- FALSE Exit with non-zero
- TRUE Exit with zero
-
- UMASK_NULL Nullify umask
- DEV_NULL Suppress all command output
-
-=cut
-
-sub init_others {
- my $self = shift;
-
- $self->{ECHO} ||= $self->oneliner('print qq{@ARGV}', ['-l']);
- $self->{ECHO_N} ||= $self->oneliner('print qq{@ARGV}');
-
- $self->{TOUCH} ||= $self->oneliner('touch', ["-MExtUtils::Command"]);
- $self->{CHMOD} ||= $self->oneliner('chmod', ["-MExtUtils::Command"]);
- $self->{RM_F} ||= $self->oneliner('rm_f', ["-MExtUtils::Command"]);
- $self->{RM_RF} ||= $self->oneliner('rm_rf', ["-MExtUtils::Command"]);
- $self->{TEST_F} ||= $self->oneliner('test_f', ["-MExtUtils::Command"]);
- $self->{FALSE} ||= $self->oneliner('exit 1');
- $self->{TRUE} ||= $self->oneliner('exit 0');
-
- $self->{MKPATH} ||= $self->oneliner('mkpath', ["-MExtUtils::Command"]);
-
- $self->{CP} ||= $self->oneliner('cp', ["-MExtUtils::Command"]);
- $self->{MV} ||= $self->oneliner('mv', ["-MExtUtils::Command"]);
-
- $self->{MOD_INSTALL} ||=
- $self->oneliner(<<'CODE', ['-MExtUtils::Install']);
-install([ from_to => {@ARGV}, verbose => '$(VERBINST)', uninstall_shadows => '$(UNINST)', dir_mode => '$(PERM_DIR)' ]);
-CODE
- $self->{DOC_INSTALL} ||= $self->oneliner('perllocal_install', ["-MExtUtils::Command::MM"]);
- $self->{UNINSTALL} ||= $self->oneliner('uninstall', ["-MExtUtils::Command::MM"]);
- $self->{WARN_IF_OLD_PACKLIST} ||=
- $self->oneliner('warn_if_old_packlist', ["-MExtUtils::Command::MM"]);
- $self->{FIXIN} ||= $self->oneliner('MY->fixin(shift)', ["-MExtUtils::MY"]);
- $self->{EQUALIZE_TIMESTAMP} ||= $self->oneliner('eqtime', ["-MExtUtils::Command"]);
-
- $self->{UNINST} ||= 0;
- $self->{VERBINST} ||= 0;
-
- $self->{FIRST_MAKEFILE} ||= $self->{MAKEFILE} || 'Makefile';
- $self->{MAKEFILE} ||= $self->{FIRST_MAKEFILE};
- $self->{MAKEFILE_OLD} ||= $self->{MAKEFILE}.'.old';
- $self->{MAKE_APERL_FILE} ||= $self->{MAKEFILE}.'.aperl';
-
- # Not everybody uses -f to indicate "use this Makefile instead"
- $self->{USEMAKEFILE} ||= '-f';
-
- # Some makes require a wrapper around macros passed in on the command
- # line.
- $self->{MACROSTART} ||= '';
- $self->{MACROEND} ||= '';
-
- $self->{SHELL} ||= $Config{sh};
-
- # UMASK_NULL is not used by MakeMaker but some CPAN modules
- # make use of it.
- $self->{UMASK_NULL} ||= "umask 0";
-
- # Not the greatest default, but its something.
- $self->{DEV_NULL} ||= "> /dev/null 2>&1";
-
- $self->{NOOP} ||= '$(TRUE)';
- $self->{NOECHO} = '@' unless defined $self->{NOECHO};
-
- $self->{LD_RUN_PATH} = "";
-
- $self->{LIBS} = $self->_fix_libs($self->{LIBS});
-
- # Compute EXTRALIBS, BSLOADLIBS and LDLOADLIBS from $self->{LIBS}
- foreach my $libs ( @{$self->{LIBS}} ){
- $libs =~ s/^\s*(.*\S)\s*$/$1/; # remove leading and trailing whitespace
- my(@libs) = $self->extliblist($libs);
- if ($libs[0] or $libs[1] or $libs[2]){
- # LD_RUN_PATH now computed by ExtUtils::Liblist
- ($self->{EXTRALIBS}, $self->{BSLOADLIBS},
- $self->{LDLOADLIBS}, $self->{LD_RUN_PATH}) = @libs;
- last;
- }
- }
-
- if ( $self->{OBJECT} ) {
- $self->{OBJECT} =~ s!\.o(bj)?\b!\$(OBJ_EXT)!g;
- } else {
- # init_dirscan should have found out, if we have C files
- $self->{OBJECT} = "";
- $self->{OBJECT} = '$(BASEEXT)$(OBJ_EXT)' if @{$self->{C}||[]};
- }
- $self->{OBJECT} =~ s/\n+/ \\\n\t/g;
-
- $self->{BOOTDEP} = (-f "$self->{BASEEXT}_BS") ? "$self->{BASEEXT}_BS" : "";
- $self->{PERLMAINCC} ||= '$(CC)';
- $self->{LDFROM} = '$(OBJECT)' unless $self->{LDFROM};
-
- # Sanity check: don't define LINKTYPE = dynamic if we're skipping
- # the 'dynamic' section of MM. We don't have this problem with
- # 'static', since we either must use it (%Config says we can't
- # use dynamic loading) or the caller asked for it explicitly.
- if (!$self->{LINKTYPE}) {
- $self->{LINKTYPE} = $self->{SKIPHASH}{'dynamic'}
- ? 'static'
- : ($Config{usedl} ? 'dynamic' : 'static');
- }
-
- return 1;
-}
-
-
-# Lets look at $self->{LIBS} carefully: It may be an anon array, a string or
-# undefined. In any case we turn it into an anon array
-sub _fix_libs {
- my($self, $libs) = @_;
-
- return !defined $libs ? [''] :
- !ref $libs ? [$libs] :
- !defined $libs->[0] ? [''] :
- $libs ;
-}
-
-
-=head3 tools_other
-
- my $make_frag = $MM->tools_other;
-
-Returns a make fragment containing definitions for the macros init_others()
-initializes.
-
-=cut
-
-sub tools_other {
- my($self) = shift;
- my @m;
-
- # We set PM_FILTER as late as possible so it can see all the earlier
- # on macro-order sensitive makes such as nmake.
- for my $tool (qw{ SHELL CHMOD CP MV NOOP NOECHO RM_F RM_RF TEST_F TOUCH
- UMASK_NULL DEV_NULL MKPATH EQUALIZE_TIMESTAMP
- FALSE TRUE
- ECHO ECHO_N
- UNINST VERBINST
- MOD_INSTALL DOC_INSTALL UNINSTALL
- WARN_IF_OLD_PACKLIST
- MACROSTART MACROEND
- USEMAKEFILE
- PM_FILTER
- FIXIN
- } )
- {
- next unless defined $self->{$tool};
- push @m, "$tool = $self->{$tool}\n";
- }
-
- return join "", @m;
-}
-
-
-=head3 init_DIRFILESEP I<Abstract>
-
- $MM->init_DIRFILESEP;
- my $dirfilesep = $MM->{DIRFILESEP};
-
-Initializes the DIRFILESEP macro which is the seperator between the
-directory and filename in a filepath. ie. / on Unix, \ on Win32 and
-nothing on VMS.
-
-For example:
-
- # instead of $(INST_ARCHAUTODIR)/extralibs.ld
- $(INST_ARCHAUTODIR)$(DIRFILESEP)extralibs.ld
-
-Something of a hack but it prevents a lot of code duplication between
-MM_* variants.
-
-Do not use this as a seperator between directories. Some operating
-systems use different seperators between subdirectories as between
-directories and filenames (for example: VOLUME:[dir1.dir2]file on VMS).
-
-=head3 init_linker I<Abstract>
-
- $mm->init_linker;
-
-Initialize macros which have to do with linking.
-
-PERL_ARCHIVE: path to libperl.a equivalent to be linked to dynamic
-extensions.
-
-PERL_ARCHIVE_AFTER: path to a library which should be put on the
-linker command line I<after> the external libraries to be linked to
-dynamic extensions. This may be needed if the linker is one-pass, and
-Perl includes some overrides for C RTL functions, such as malloc().
-
-EXPORT_LIST: name of a file that is passed to linker to define symbols
-to be exported.
-
-Some OSes do not need these in which case leave it blank.
-
-
-=head3 init_platform
-
- $mm->init_platform
-
-Initialize any macros which are for platform specific use only.
-
-A typical one is the version number of your OS specific mocule.
-(ie. MM_Unix_VERSION or MM_VMS_VERSION).
-
-=cut
-
-sub init_platform {
- return '';
-}
-
-
-=head3 init_MAKE
-
- $mm->init_MAKE
-
-Initialize MAKE from either a MAKE environment variable or $Config{make}.
-
-=cut
-
-sub init_MAKE {
- my $self = shift;
-
- $self->{MAKE} ||= $ENV{MAKE} || $Config{make};
-}
-
-
-=head2 Tools
-
-A grab bag of methods to generate specific macros and commands.
-
-
-
-=head3 manifypods
-
-Defines targets and routines to translate the pods into manpages and
-put them into the INST_* directories.
-
-=cut
-
-sub manifypods {
- my $self = shift;
-
- my $POD2MAN_macro = $self->POD2MAN_macro();
- my $manifypods_target = $self->manifypods_target();
-
- return <<END_OF_TARGET;
-
-$POD2MAN_macro
-
-$manifypods_target
-
-END_OF_TARGET
-
-}
-
-
-=head3 POD2MAN_macro
-
- my $pod2man_macro = $self->POD2MAN_macro
-
-Returns a definition for the POD2MAN macro. This is a program
-which emulates the pod2man utility. You can add more switches to the
-command by simply appending them on the macro.
-
-Typical usage:
-
- $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) podfile1 man_page1 ...
-
-=cut
-
-sub POD2MAN_macro {
- my $self = shift;
-
-# Need the trailing '--' so perl stops gobbling arguments and - happens
-# to be an alternative end of line seperator on VMS so we quote it
- return <<'END_OF_DEF';
-POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
-POD2MAN = $(POD2MAN_EXE)
-END_OF_DEF
-}
-
-
-=head3 test_via_harness
-
- my $command = $mm->test_via_harness($perl, $tests);
-
-Returns a $command line which runs the given set of $tests with
-Test::Harness and the given $perl.
-
-Used on the t/*.t files.
-
-=cut
-
-sub test_via_harness {
- my($self, $perl, $tests) = @_;
-
- return qq{\t$perl "-MExtUtils::Command::MM" }.
- qq{"-e" "test_harness(\$(TEST_VERBOSE), '\$(INST_LIB)', '\$(INST_ARCHLIB)')" $tests\n};
-}
-
-=head3 test_via_script
-
- my $command = $mm->test_via_script($perl, $script);
-
-Returns a $command line which just runs a single test without
-Test::Harness. No checks are done on the results, they're just
-printed.
-
-Used for test.pl, since they don't always follow Test::Harness
-formatting.
-
-=cut
-
-sub test_via_script {
- my($self, $perl, $script) = @_;
- return qq{\t$perl "-I\$(INST_LIB)" "-I\$(INST_ARCHLIB)" $script\n};
-}
-
-
-=head3 tool_autosplit
-
-Defines a simple perl call that runs autosplit. May be deprecated by
-pm_to_blib soon.
-
-=cut
-
-sub tool_autosplit {
- my($self, %attribs) = @_;
-
- my $maxlen = $attribs{MAXLEN} ? '$$AutoSplit::Maxlen=$attribs{MAXLEN};'
- : '';
-
- my $asplit = $self->oneliner(sprintf <<'PERL_CODE', $maxlen);
-use AutoSplit; %s autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)
-PERL_CODE
-
- return sprintf <<'MAKE_FRAG', $asplit;
-# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
-AUTOSPLITFILE = %s
-
-MAKE_FRAG
-
-}
-
-
-=head3 arch_check
-
- my $arch_ok = $mm->arch_check(
- $INC{"Config.pm"},
- File::Spec->catfile($Config{archlibexp}, "Config.pm")
- );
-
-A sanity check that what Perl thinks the architecture is and what
-Config thinks the architecture is are the same. If they're not it
-will return false and show a diagnostic message.
-
-When building Perl it will always return true, as nothing is installed
-yet.
-
-The interface is a bit odd because this is the result of a
-quick refactoring. Don't rely on it.
-
-=cut
-
-sub arch_check {
- my $self = shift;
- my($pconfig, $cconfig) = @_;
-
- return 1 if $self->{PERL_SRC};
-
- my($pvol, $pthinks) = $self->splitpath($pconfig);
- my($cvol, $cthinks) = $self->splitpath($cconfig);
-
- $pthinks = $self->canonpath($pthinks);
- $cthinks = $self->canonpath($cthinks);
-
- my $ret = 1;
- if ($pthinks ne $cthinks) {
- print "Have $pthinks\n";
- print "Want $cthinks\n";
-
- $ret = 0;
-
- my $arch = (grep length, $self->splitdir($pthinks))[-1];
-
- print STDOUT <<END unless $self->{UNINSTALLED_PERL};
-Your perl and your Config.pm seem to have different ideas about the
-architecture they are running on.
-Perl thinks: [$arch]
-Config says: [$Config{archname}]
-This may or may not cause problems. Please check your installation of perl
-if you have problems building this extension.
-END
- }
-
- return $ret;
-}
-
-
-
-=head2 File::Spec wrappers
-
-ExtUtils::MM_Any is a subclass of File::Spec. The methods noted here
-override File::Spec.
-
-
-
-=head3 catfile
-
-File::Spec <= 0.83 has a bug where the file part of catfile is not
-canonicalized. This override fixes that bug.
-
-=cut
-
-sub catfile {
- my $self = shift;
- return $self->canonpath($self->SUPER::catfile(@_));
-}
-
-
-
-=head2 Misc
-
-Methods I can't really figure out where they should go yet.
-
-
-=head3 find_tests
-
- my $test = $mm->find_tests;
-
-Returns a string suitable for feeding to the shell to return all
-tests in t/*.t.
-
-=cut
-
-sub find_tests {
- my($self) = shift;
- return -d 't' ? 't/*.t' : '';
-}
-
-
-=head3 extra_clean_files
-
- my @files_to_clean = $MM->extra_clean_files;
-
-Returns a list of OS specific files to be removed in the clean target in
-addition to the usual set.
-
-=cut
-
-# An empty method here tickled a perl 5.8.1 bug and would return its object.
-sub extra_clean_files {
- return;
-}
-
-
-=head3 installvars
-
- my @installvars = $mm->installvars;
-
-A list of all the INSTALL* variables without the INSTALL prefix. Useful
-for iteration or building related variable sets.
-
-=cut
-
-sub installvars {
- return qw(PRIVLIB SITELIB VENDORLIB
- ARCHLIB SITEARCH VENDORARCH
- BIN SITEBIN VENDORBIN
- SCRIPT SITESCRIPT VENDORSCRIPT
- MAN1DIR SITEMAN1DIR VENDORMAN1DIR
- MAN3DIR SITEMAN3DIR VENDORMAN3DIR
- );
-}
-
-
-=head3 libscan
-
- my $wanted = $self->libscan($path);
-
-Takes a path to a file or dir and returns an empty string if we don't
-want to include this file in the library. Otherwise it returns the
-the $path unchanged.
-
-Mainly used to exclude version control administrative directories from
-installation.
-
-=cut
-
-sub libscan {
- my($self,$path) = @_;
- my($dirs,$file) = ($self->splitpath($path))[1,2];
- return '' if grep /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/,
- $self->splitdir($dirs), $file;
-
- return $path;
-}
-
-
-=head3 platform_constants
-
- my $make_frag = $mm->platform_constants
-
-Returns a make fragment defining all the macros initialized in
-init_platform() rather than put them in constants().
-
-=cut
-
-sub platform_constants {
- return '';
-}
-
-=begin private
-
-=head3 _PREREQ_PRINT
-
- $self->_PREREQ_PRINT;
-
-Implements PREREQ_PRINT.
-
-Refactored out of MakeMaker->new().
-
-=end private
-
-=cut
-
-sub _PREREQ_PRINT {
- my $self = shift;
-
- require Data::Dumper;
- my @what = ('PREREQ_PM');
- push @what, 'MIN_PERL_VERSION' if $self->{MIN_PERL_VERSION};
- push @what, 'BUILD_REQUIRES' if $self->{BUILD_REQUIRES};
- print Data::Dumper->Dump([@{$self}{@what}], \@what);
- exit 0;
-}
-
-
-=begin private
-
-=head3 _PRINT_PREREQ
-
- $mm->_PRINT_PREREQ;
-
-Implements PRINT_PREREQ, a slightly different version of PREREQ_PRINT
-added by Redhat to, I think, support generating RPMs from Perl modules.
-
-Refactored out of MakeMaker->new().
-
-=end private
-
-=cut
-
-sub _PRINT_PREREQ {
- my $self = shift;
-
- my $prereqs= $self->_all_prereqs;
- my @prereq = map { [$_, $prereqs->{$_}] } keys %$prereqs;
-
- if ( $self->{MIN_PERL_VERSION} ) {
- push @prereq, ['perl' => $self->{MIN_PERL_VERSION}];
- }
-
- print join(" ", map { "perl($_->[0])>=$_->[1] " }
- sort { $a->[0] cmp $b->[0] } @prereq), "\n";
- exit 0;
-}
-
-
-=begin private
-
-=head3 _all_prereqs
-
- my $prereqs = $self->_all_prereqs;
-
-Returns a hash ref of both PREREQ_PM and BUILD_REQUIRES.
-
-=end private
-
-=cut
-
-sub _all_prereqs {
- my $self = shift;
-
- return { %{$self->{PREREQ_PM}}, %{$self->{BUILD_REQUIRES}} };
-}
-
-
-=head1 AUTHOR
-
-Michael G Schwern <schwern at pobox.com> and the denizens of
-makemaker at perl.org with code from ExtUtils::MM_Unix and
-ExtUtils::MM_Win32.
-
-
-=cut
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/MM_BeOS.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_BeOS.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_BeOS.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,61 +0,0 @@
-package ExtUtils::MM_BeOS;
-
-use strict;
-
-=head1 NAME
-
-ExtUtils::MM_BeOS - methods to override UN*X behaviour in ExtUtils::MakeMaker
-
-=head1 SYNOPSIS
-
- use ExtUtils::MM_BeOS; # Done internally by ExtUtils::MakeMaker if needed
-
-=head1 DESCRIPTION
-
-See ExtUtils::MM_Unix for a documentation of the methods provided
-there. This package overrides the implementation of these methods, not
-the semantics.
-
-=over 4
-
-=cut
-
-use ExtUtils::MakeMaker::Config;
-use File::Spec;
-require ExtUtils::MM_Any;
-require ExtUtils::MM_Unix;
-
-our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '6.55_02';
-
-
-=item os_flavor
-
-BeOS is BeOS.
-
-=cut
-
-sub os_flavor {
- return('BeOS');
-}
-
-=item init_linker
-
-libperl.a equivalent to be linked to dynamic extensions.
-
-=cut
-
-sub init_linker {
- my($self) = shift;
-
- $self->{PERL_ARCHIVE} ||=
- File::Spec->catdir('$(PERL_INC)',$Config{libperl});
- $self->{PERL_ARCHIVE_AFTER} ||= '';
- $self->{EXPORT_LIST} ||= '';
-}
-
-=back
-
-1;
-__END__
-
Deleted: vendor/perl/dist/lib/ExtUtils/MM_Cygwin.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_Cygwin.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_Cygwin.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,123 +0,0 @@
-package ExtUtils::MM_Cygwin;
-
-use strict;
-
-use ExtUtils::MakeMaker::Config;
-use File::Spec;
-
-require ExtUtils::MM_Unix;
-require ExtUtils::MM_Win32;
-our @ISA = qw( ExtUtils::MM_Unix );
-
-our $VERSION = '6.55_02';
-
-
-=head1 NAME
-
-ExtUtils::MM_Cygwin - methods to override UN*X behaviour in ExtUtils::MakeMaker
-
-=head1 SYNOPSIS
-
- use ExtUtils::MM_Cygwin; # Done internally by ExtUtils::MakeMaker if needed
-
-=head1 DESCRIPTION
-
-See ExtUtils::MM_Unix for a documentation of the methods provided there.
-
-=over 4
-
-=item os_flavor
-
-We're Unix and Cygwin.
-
-=cut
-
-sub os_flavor {
- return('Unix', 'Cygwin');
-}
-
-=item cflags
-
-if configured for dynamic loading, triggers #define EXT in EXTERN.h
-
-=cut
-
-sub cflags {
- my($self,$libperl)=@_;
- return $self->{CFLAGS} if $self->{CFLAGS};
- return '' unless $self->needs_linking();
-
- my $base = $self->SUPER::cflags($libperl);
- foreach (split /\n/, $base) {
- /^(\S*)\s*=\s*(\S*)$/ and $self->{$1} = $2;
- };
- $self->{CCFLAGS} .= " -DUSEIMPORTLIB" if ($Config{useshrplib} eq 'true');
-
- return $self->{CFLAGS} = qq{
-CCFLAGS = $self->{CCFLAGS}
-OPTIMIZE = $self->{OPTIMIZE}
-PERLTYPE = $self->{PERLTYPE}
-};
-
-}
-
-
-=item replace_manpage_separator
-
-replaces strings '::' with '.' in MAN*POD man page names
-
-=cut
-
-sub replace_manpage_separator {
- my($self, $man) = @_;
- $man =~ s{/+}{.}g;
- return $man;
-}
-
-=item init_linker
-
-points to libperl.a
-
-=cut
-
-sub init_linker {
- my $self = shift;
-
- if ($Config{useshrplib} eq 'true') {
- my $libperl = '$(PERL_INC)' .'/'. "$Config{libperl}";
- if( $] >= 5.006002 ) {
- $libperl =~ s/a$/dll.a/;
- }
- $self->{PERL_ARCHIVE} = $libperl;
- } else {
- $self->{PERL_ARCHIVE} =
- '$(PERL_INC)' .'/'. ("$Config{libperl}" or "libperl.a");
- }
-
- $self->{PERL_ARCHIVE_AFTER} ||= '';
- $self->{EXPORT_LIST} ||= '';
-}
-
-=item maybe_command
-
-If our path begins with F</cygdrive/> then we use C<ExtUtils::MM_Win32>
-to determine if it may be a command. Otherwise we use the tests
-from C<ExtUtils::MM_Unix>.
-
-=cut
-
-sub maybe_command {
- my ($self, $file) = @_;
-
- if ($file =~ m{^/cygdrive/}i) {
- return ExtUtils::MM_Win32->maybe_command($file);
- }
-
- return $self->SUPER::maybe_command($file);
-}
-
-=back
-
-=cut
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/MM_DOS.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_DOS.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_DOS.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,65 +0,0 @@
-package ExtUtils::MM_DOS;
-
-use strict;
-
-our $VERSION = 6.55_02;
-
-require ExtUtils::MM_Any;
-require ExtUtils::MM_Unix;
-our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-
-
-=head1 NAME
-
-ExtUtils::MM_DOS - DOS specific subclass of ExtUtils::MM_Unix
-
-=head1 SYNOPSIS
-
- Don't use this module directly.
- Use ExtUtils::MM and let it choose.
-
-=head1 DESCRIPTION
-
-This is a subclass of ExtUtils::MM_Unix which contains functionality
-for DOS.
-
-Unless otherwise stated, it works just like ExtUtils::MM_Unix
-
-=head2 Overridden methods
-
-=over 4
-
-=item os_flavor
-
-=cut
-
-sub os_flavor {
- return('DOS');
-}
-
-=item B<replace_manpage_separator>
-
-Generates Foo__Bar.3 style man page names
-
-=cut
-
-sub replace_manpage_separator {
- my($self, $man) = @_;
-
- $man =~ s,/+,__,g;
- return $man;
-}
-
-=back
-
-=head1 AUTHOR
-
-Michael G Schwern <schwern at pobox.com> with code from ExtUtils::MM_Unix
-
-=head1 SEE ALSO
-
-L<ExtUtils::MM_Unix>, L<ExtUtils::MakeMaker>
-
-=cut
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/MM_Darwin.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_Darwin.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_Darwin.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,47 +0,0 @@
-package ExtUtils::MM_Darwin;
-
-use strict;
-
-BEGIN {
- require ExtUtils::MM_Unix;
- our @ISA = qw( ExtUtils::MM_Unix );
-}
-
-our $VERSION = '6.55_02';
-
-
-=head1 NAME
-
-ExtUtils::MM_Darwin - special behaviors for OS X
-
-=head1 SYNOPSIS
-
- For internal MakeMaker use only
-
-=head1 DESCRIPTION
-
-See L<ExtUtils::MM_Unix> for L<ExtUtils::MM_Any> for documention on the
-methods overridden here.
-
-=head2 Overriden Methods
-
-=head3 init_dist
-
-Turn off Apple tar's tendency to copy resource forks as "._foo" files.
-
-=cut
-
-sub init_dist {
- my $self = shift;
-
- # Thank you, Apple, for breaking tar and then breaking the work around.
- # 10.4 wants COPY_EXTENDED_ATTRIBUTES_DISABLE while 10.5 wants
- # COPYFILE_DISABLE. I'm not going to push my luck and instead just
- # set both.
- $self->{TAR} ||=
- 'COPY_EXTENDED_ATTRIBUTES_DISABLE=1 COPYFILE_DISABLE=1 tar';
-
- $self->SUPER::init_dist(@_);
-}
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/MM_MacOS.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_MacOS.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_MacOS.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,40 +0,0 @@
-package ExtUtils::MM_MacOS;
-
-use strict;
-
-our $VERSION = 6.55_02;
-
-sub new {
- die <<'UNSUPPORTED';
-MacOS Classic (MacPerl) is no longer supported by MakeMaker.
-Please use Module::Build instead.
-UNSUPPORTED
-}
-
-=head1 NAME
-
-ExtUtils::MM_MacOS - once produced Makefiles for MacOS Classic
-
-=head1 SYNOPSIS
-
- # MM_MacOS no longer contains any code. This is just a stub.
-
-=head1 DESCRIPTION
-
-Once upon a time, MakeMaker could produce an approximation of a correct
-Makefile on MacOS Classic (MacPerl). Due to a lack of maintainers, this
-fell out of sync with the rest of MakeMaker and hadn't worked in years.
-Since there's little chance of it being repaired, MacOS Classic is fading
-away, and the code was icky to begin with, the code has been deleted to
-make maintenance easier.
-
-Those interested in writing modules for MacPerl should use Module::Build
-which works better than MakeMaker ever did.
-
-Anyone interested in resurrecting this file should pull the old version
-from the MakeMaker CVS repository and contact makemaker at perl.org, but we
-really encourage you to work on Module::Build instead.
-
-=cut
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/MM_NW5.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_NW5.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_NW5.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,269 +0,0 @@
-package ExtUtils::MM_NW5;
-
-=head1 NAME
-
-ExtUtils::MM_NW5 - methods to override UN*X behaviour in ExtUtils::MakeMaker
-
-=head1 SYNOPSIS
-
- use ExtUtils::MM_NW5; # Done internally by ExtUtils::MakeMaker if needed
-
-=head1 DESCRIPTION
-
-See ExtUtils::MM_Unix for a documentation of the methods provided
-there. This package overrides the implementation of these methods, not
-the semantics.
-
-=over
-
-=cut
-
-use strict;
-use ExtUtils::MakeMaker::Config;
-use File::Basename;
-
-our $VERSION = '6.55_02';
-
-require ExtUtils::MM_Win32;
-our @ISA = qw(ExtUtils::MM_Win32);
-
-use ExtUtils::MakeMaker qw( &neatvalue );
-
-$ENV{EMXSHELL} = 'sh'; # to run `commands`
-
-my $BORLAND = $Config{'cc'} =~ /^bcc/i;
-my $GCC = $Config{'cc'} =~ /^gcc/i;
-
-
-=item os_flavor
-
-We're Netware in addition to being Windows.
-
-=cut
-
-sub os_flavor {
- my $self = shift;
- return ($self->SUPER::os_flavor, 'Netware');
-}
-
-=item init_platform
-
-Add Netware macros.
-
-LIBPTH, BASE_IMPORT, NLM_VERSION, MPKTOOL, TOOLPATH, BOOT_SYMBOL,
-NLM_SHORT_NAME, INCLUDE, PATH, MM_NW5_REVISION
-
-
-=item platform_constants
-
-Add Netware macros initialized above to the Makefile.
-
-=cut
-
-sub init_platform {
- my($self) = shift;
-
- # To get Win32's setup.
- $self->SUPER::init_platform;
-
- # incpath is copied to makefile var INCLUDE in constants sub, here just
- # make it empty
- my $libpth = $Config{'libpth'};
- $libpth =~ s( )(;);
- $self->{'LIBPTH'} = $libpth;
-
- $self->{'BASE_IMPORT'} = $Config{'base_import'};
-
- # Additional import file specified from Makefile.pl
- if($self->{'base_import'}) {
- $self->{'BASE_IMPORT'} .= ', ' . $self->{'base_import'};
- }
-
- $self->{'NLM_VERSION'} = $Config{'nlm_version'};
- $self->{'MPKTOOL'} = $Config{'mpktool'};
- $self->{'TOOLPATH'} = $Config{'toolpath'};
-
- (my $boot = $self->{'NAME'}) =~ s/:/_/g;
- $self->{'BOOT_SYMBOL'}=$boot;
-
- # If the final binary name is greater than 8 chars,
- # truncate it here.
- if(length($self->{'BASEEXT'}) > 8) {
- $self->{'NLM_SHORT_NAME'} = substr($self->{'BASEEXT'},0,8);
- }
-
- # Get the include path and replace the spaces with ;
- # Copy this to makefile as INCLUDE = d:\...;d:\;
- ($self->{INCLUDE} = $Config{'incpath'}) =~ s/([ ]*)-I/;/g;
-
- # Set the path to CodeWarrior binaries which might not have been set in
- # any other place
- $self->{PATH} = '$(PATH);$(TOOLPATH)';
-
- $self->{MM_NW5_VERSION} = $VERSION;
-}
-
-sub platform_constants {
- my($self) = shift;
- my $make_frag = '';
-
- # Setup Win32's constants.
- $make_frag .= $self->SUPER::platform_constants;
-
- foreach my $macro (qw(LIBPTH BASE_IMPORT NLM_VERSION MPKTOOL
- TOOLPATH BOOT_SYMBOL NLM_SHORT_NAME INCLUDE PATH
- MM_NW5_VERSION
- ))
- {
- next unless defined $self->{$macro};
- $make_frag .= "$macro = $self->{$macro}\n";
- }
-
- return $make_frag;
-}
-
-
-=item const_cccmd
-
-=cut
-
-sub const_cccmd {
- my($self,$libperl)=@_;
- return $self->{CONST_CCCMD} if $self->{CONST_CCCMD};
- return '' unless $self->needs_linking();
- return $self->{CONST_CCCMD} = <<'MAKE_FRAG';
-CCCMD = $(CC) $(CCFLAGS) $(INC) $(OPTIMIZE) \
- $(PERLTYPE) $(MPOLLUTE) -o $@ \
- -DVERSION=\"$(VERSION)\" -DXS_VERSION=\"$(XS_VERSION)\"
-MAKE_FRAG
-
-}
-
-
-=item static_lib
-
-=cut
-
-sub static_lib {
- my($self) = @_;
-
- return '' unless $self->has_link_code;
-
- my $m = <<'END';
-$(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists
- $(RM_RF) $@
-END
-
- # If this extension has it's own library (eg SDBM_File)
- # then copy that to $(INST_STATIC) and add $(OBJECT) into it.
- $m .= <<'END' if $self->{MYEXTLIB};
- $self->{CP} $(MYEXTLIB) $@
-END
-
- my $ar_arg;
- if( $BORLAND ) {
- $ar_arg = '$@ $(OBJECT:^"+")';
- }
- elsif( $GCC ) {
- $ar_arg = '-ru $@ $(OBJECT)';
- }
- else {
- $ar_arg = '-type library -o $@ $(OBJECT)';
- }
-
- $m .= sprintf <<'END', $ar_arg;
- $(AR) %s
- $(NOECHO) $(ECHO) "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)\extralibs.ld
- $(CHMOD) 755 $@
-END
-
- $m .= <<'END' if $self->{PERL_SRC};
- $(NOECHO) $(ECHO) "$(EXTRALIBS)" >> $(PERL_SRC)\ext.libs
-
-
-END
- return $m;
-}
-
-=item dynamic_lib
-
-Defines how to produce the *.so (or equivalent) files.
-
-=cut
-
-sub dynamic_lib {
- my($self, %attribs) = @_;
- return '' unless $self->needs_linking(); #might be because of a subdir
-
- return '' unless $self->has_link_code;
-
- my($otherldflags) = $attribs{OTHERLDFLAGS} || ($BORLAND ? 'c0d32.obj': '');
- my($inst_dynamic_dep) = $attribs{INST_DYNAMIC_DEP} || "";
- my($ldfrom) = '$(LDFROM)';
-
- (my $boot = $self->{NAME}) =~ s/:/_/g;
-
- my $m = <<'MAKE_FRAG';
-# This section creates the dynamically loadable $(INST_DYNAMIC)
-# from $(OBJECT) and possibly $(MYEXTLIB).
-OTHERLDFLAGS = '.$otherldflags.'
-INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
-
-# Create xdc data for an MT safe NLM in case of mpk build
-$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).exists
- $(NOECHO) $(ECHO) Export boot_$(BOOT_SYMBOL) > $(BASEEXT).def
- $(NOECHO) $(ECHO) $(BASE_IMPORT) >> $(BASEEXT).def
- $(NOECHO) $(ECHO) Import @$(PERL_INC)\perl.imp >> $(BASEEXT).def
-MAKE_FRAG
-
-
- if ( $self->{CCFLAGS} =~ m/ -DMPK_ON /) {
- $m .= <<'MAKE_FRAG';
- $(MPKTOOL) $(XDCFLAGS) $(BASEEXT).xdc
- $(NOECHO) $(ECHO) xdcdata $(BASEEXT).xdc >> $(BASEEXT).def
-MAKE_FRAG
- }
-
- # Reconstruct the X.Y.Z version.
- my $version = join '.', map { sprintf "%d", $_ }
- $] =~ /(\d)\.(\d{3})(\d{2})/;
- $m .= sprintf ' $(LD) $(LDFLAGS) $(OBJECT:.obj=.obj) -desc "Perl %s Extension ($(BASEEXT)) XS_VERSION: $(XS_VERSION)" -nlmversion $(NLM_VERSION)', $version;
-
- # Taking care of long names like FileHandle, ByteLoader, SDBM_File etc
- if($self->{NLM_SHORT_NAME}) {
- # In case of nlms with names exceeding 8 chars, build nlm in the
- # current dir, rename and move to auto\lib.
- $m .= q{ -o $(NLM_SHORT_NAME).$(DLEXT)}
- } else {
- $m .= q{ -o $(INST_AUTODIR)\\$(BASEEXT).$(DLEXT)}
- }
-
- # Add additional lib files if any (SDBM_File)
- $m .= q{ $(MYEXTLIB) } if $self->{MYEXTLIB};
-
- $m .= q{ $(PERL_INC)\Main.lib -commandfile $(BASEEXT).def}."\n";
-
- if($self->{NLM_SHORT_NAME}) {
- $m .= <<'MAKE_FRAG';
- if exist $(INST_AUTODIR)\$(NLM_SHORT_NAME).$(DLEXT) del $(INST_AUTODIR)\$(NLM_SHORT_NAME).$(DLEXT)
- move $(NLM_SHORT_NAME).$(DLEXT) $(INST_AUTODIR)
-MAKE_FRAG
- }
-
- $m .= <<'MAKE_FRAG';
-
- $(CHMOD) 755 $@
-MAKE_FRAG
-
- return $m;
-}
-
-
-1;
-__END__
-
-=back
-
-=cut
-
-
Deleted: vendor/perl/dist/lib/ExtUtils/MM_OS2.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_OS2.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_OS2.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,151 +0,0 @@
-package ExtUtils::MM_OS2;
-
-use strict;
-
-use ExtUtils::MakeMaker qw(neatvalue);
-use File::Spec;
-
-our $VERSION = '6.55_02';
-
-require ExtUtils::MM_Any;
-require ExtUtils::MM_Unix;
-our @ISA = qw(ExtUtils::MM_Any ExtUtils::MM_Unix);
-
-=pod
-
-=head1 NAME
-
-ExtUtils::MM_OS2 - methods to override UN*X behaviour in ExtUtils::MakeMaker
-
-=head1 SYNOPSIS
-
- use ExtUtils::MM_OS2; # Done internally by ExtUtils::MakeMaker if needed
-
-=head1 DESCRIPTION
-
-See ExtUtils::MM_Unix for a documentation of the methods provided
-there. This package overrides the implementation of these methods, not
-the semantics.
-
-=head1 METHODS
-
-=over 4
-
-=item init_dist
-
-Define TO_UNIX to convert OS2 linefeeds to Unix style.
-
-=cut
-
-sub init_dist {
- my($self) = @_;
-
- $self->{TO_UNIX} ||= <<'MAKE_TEXT';
-$(NOECHO) $(TEST_F) tmp.zip && $(RM_F) tmp.zip; $(ZIP) -ll -mr tmp.zip $(DISTVNAME) && unzip -o tmp.zip && $(RM_F) tmp.zip
-MAKE_TEXT
-
- $self->SUPER::init_dist;
-}
-
-sub dlsyms {
- my($self,%attribs) = @_;
-
- my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
- my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
- my($funclist) = $attribs{FUNCLIST} || $self->{FUNCLIST} || [];
- my($imports) = $attribs{IMPORTS} || $self->{IMPORTS} || {};
- my(@m);
- (my $boot = $self->{NAME}) =~ s/:/_/g;
-
- if (not $self->{SKIPHASH}{'dynamic'}) {
- push(@m,"
-$self->{BASEEXT}.def: Makefile.PL
-",
- ' $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e \'use ExtUtils::Mksymlists; \\
- Mksymlists("NAME" => "$(NAME)", "DLBASE" => "$(DLBASE)", ',
- '"VERSION" => "$(VERSION)", "DISTNAME" => "$(DISTNAME)", ',
- '"INSTALLDIRS" => "$(INSTALLDIRS)", ',
- '"DL_FUNCS" => ',neatvalue($funcs),
- ', "FUNCLIST" => ',neatvalue($funclist),
- ', "IMPORTS" => ',neatvalue($imports),
- ', "DL_VARS" => ', neatvalue($vars), ');\'
-');
- }
- if ($self->{IMPORTS} && %{$self->{IMPORTS}}) {
- # Make import files (needed for static build)
- -d 'tmp_imp' or mkdir 'tmp_imp', 0777 or die "Can't mkdir tmp_imp";
- open my $imp, '>', 'tmpimp.imp' or die "Can't open tmpimp.imp";
- while (my($name, $exp) = each %{$self->{IMPORTS}}) {
- my ($lib, $id) = ($exp =~ /(.*)\.(.*)/) or die "Malformed IMPORT `$exp'";
- print $imp "$name $lib $id ?\n";
- }
- close $imp or die "Can't close tmpimp.imp";
- # print "emximp -o tmpimp$Config::Config{lib_ext} tmpimp.imp\n";
- system "emximp -o tmpimp$Config::Config{lib_ext} tmpimp.imp"
- and die "Cannot make import library: $!, \$?=$?";
- unlink <tmp_imp/*>;
- system "cd tmp_imp; $Config::Config{ar} x ../tmpimp$Config::Config{lib_ext}"
- and die "Cannot extract import objects: $!, \$?=$?";
- }
- join('', at m);
-}
-
-sub static_lib {
- my($self) = @_;
- my $old = $self->ExtUtils::MM_Unix::static_lib();
- return $old unless $self->{IMPORTS} && %{$self->{IMPORTS}};
-
- my @chunks = split /\n{2,}/, $old;
- shift @chunks unless length $chunks[0]; # Empty lines at the start
- $chunks[0] .= <<'EOC';
-
- $(AR) $(AR_STATIC_ARGS) $@ tmp_imp/* && $(RANLIB) $@
-EOC
- return join "\n\n". '', @chunks;
-}
-
-sub replace_manpage_separator {
- my($self,$man) = @_;
- $man =~ s,/+,.,g;
- $man;
-}
-
-sub maybe_command {
- my($self,$file) = @_;
- $file =~ s,[/\\]+,/,g;
- return $file if -x $file && ! -d _;
- return "$file.exe" if -x "$file.exe" && ! -d _;
- return "$file.cmd" if -x "$file.cmd" && ! -d _;
- return;
-}
-
-=item init_linker
-
-=cut
-
-sub init_linker {
- my $self = shift;
-
- $self->{PERL_ARCHIVE} = "\$(PERL_INC)/libperl\$(LIB_EXT)";
-
- $self->{PERL_ARCHIVE_AFTER} = $OS2::is_aout
- ? ''
- : '$(PERL_INC)/libperl_override$(LIB_EXT)';
- $self->{EXPORT_LIST} = '$(BASEEXT).def';
-}
-
-=item os_flavor
-
-OS/2 is OS/2
-
-=cut
-
-sub os_flavor {
- return('OS/2');
-}
-
-=back
-
-=cut
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/MM_QNX.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_QNX.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_QNX.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,57 +0,0 @@
-package ExtUtils::MM_QNX;
-
-use strict;
-our $VERSION = '6.55_02';
-
-require ExtUtils::MM_Unix;
-our @ISA = qw(ExtUtils::MM_Unix);
-
-
-=head1 NAME
-
-ExtUtils::MM_QNX - QNX specific subclass of ExtUtils::MM_Unix
-
-=head1 SYNOPSIS
-
- Don't use this module directly.
- Use ExtUtils::MM and let it choose.
-
-=head1 DESCRIPTION
-
-This is a subclass of ExtUtils::MM_Unix which contains functionality for
-QNX.
-
-Unless otherwise stated it works just like ExtUtils::MM_Unix
-
-=head2 Overridden methods
-
-=head3 extra_clean_files
-
-Add .err files corresponding to each .c file.
-
-=cut
-
-sub extra_clean_files {
- my $self = shift;
-
- my @errfiles = @{$self->{C}};
- for ( @errfiles ) {
- s/.c$/.err/;
- }
-
- return( @errfiles, 'perlmain.err' );
-}
-
-
-=head1 AUTHOR
-
-Michael G Schwern <schwern at pobox.com> with code from ExtUtils::MM_Unix
-
-=head1 SEE ALSO
-
-L<ExtUtils::MakeMaker>
-
-=cut
-
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/MM_UWIN.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_UWIN.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_UWIN.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,64 +0,0 @@
-package ExtUtils::MM_UWIN;
-
-use strict;
-our $VERSION = 6.55_02;
-
-require ExtUtils::MM_Unix;
-our @ISA = qw(ExtUtils::MM_Unix);
-
-
-=head1 NAME
-
-ExtUtils::MM_UWIN - U/WIN specific subclass of ExtUtils::MM_Unix
-
-=head1 SYNOPSIS
-
- Don't use this module directly.
- Use ExtUtils::MM and let it choose.
-
-=head1 DESCRIPTION
-
-This is a subclass of ExtUtils::MM_Unix which contains functionality for
-the AT&T U/WIN UNIX on Windows environment.
-
-Unless otherwise stated it works just like ExtUtils::MM_Unix
-
-=head2 Overridden methods
-
-=over 4
-
-=item os_flavor
-
-In addition to being Unix, we're U/WIN.
-
-=cut
-
-sub os_flavor {
- return('Unix', 'U/WIN');
-}
-
-
-=item B<replace_manpage_separator>
-
-=cut
-
-sub replace_manpage_separator {
- my($self, $man) = @_;
-
- $man =~ s,/+,.,g;
- return $man;
-}
-
-=back
-
-=head1 AUTHOR
-
-Michael G Schwern <schwern at pobox.com> with code from ExtUtils::MM_Unix
-
-=head1 SEE ALSO
-
-L<ExtUtils::MM_Win32>, L<ExtUtils::MakeMaker>
-
-=cut
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/MM_Unix.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_Unix.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_Unix.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,3622 +0,0 @@
-package ExtUtils::MM_Unix;
-
-require 5.006;
-
-use strict;
-
-use Carp;
-use ExtUtils::MakeMaker::Config;
-use File::Basename qw(basename dirname);
-use DirHandle;
-
-our %Config_Override;
-
-use ExtUtils::MakeMaker qw($Verbose neatvalue);
-
-# If we make $VERSION an our variable parse_version() breaks
-use vars qw($VERSION);
-$VERSION = '6.55_02';
-
-require ExtUtils::MM_Any;
-our @ISA = qw(ExtUtils::MM_Any);
-
-my %Is;
-BEGIN {
- $Is{OS2} = $^O eq 'os2';
- $Is{Win32} = $^O eq 'MSWin32' || $Config{osname} eq 'NetWare';
- $Is{Dos} = $^O eq 'dos';
- $Is{VMS} = $^O eq 'VMS';
- $Is{OSF} = $^O eq 'dec_osf';
- $Is{IRIX} = $^O eq 'irix';
- $Is{NetBSD} = $^O eq 'netbsd';
- $Is{Interix} = $^O eq 'interix';
- $Is{SunOS4} = $^O eq 'sunos';
- $Is{Solaris} = $^O eq 'solaris';
- $Is{SunOS} = $Is{SunOS4} || $Is{Solaris};
- $Is{BSD} = ($^O =~ /^(?:free|net|open)bsd$/ or
- grep( $^O eq $_, qw(bsdos interix dragonfly) )
- );
-}
-
-BEGIN {
- if( $Is{VMS} ) {
- # For things like vmsify()
- require VMS::Filespec;
- VMS::Filespec->import;
- }
-}
-
-
-=head1 NAME
-
-ExtUtils::MM_Unix - methods used by ExtUtils::MakeMaker
-
-=head1 SYNOPSIS
-
-C<require ExtUtils::MM_Unix;>
-
-=head1 DESCRIPTION
-
-The methods provided by this package are designed to be used in
-conjunction with ExtUtils::MakeMaker. When MakeMaker writes a
-Makefile, it creates one or more objects that inherit their methods
-from a package C<MM>. MM itself doesn't provide any methods, but it
-ISA ExtUtils::MM_Unix class. The inheritance tree of MM lets operating
-specific packages take the responsibility for all the methods provided
-by MM_Unix. We are trying to reduce the number of the necessary
-overrides by defining rather primitive operations within
-ExtUtils::MM_Unix.
-
-If you are going to write a platform specific MM package, please try
-to limit the necessary overrides to primitive methods, and if it is not
-possible to do so, let's work out how to achieve that gain.
-
-If you are overriding any of these methods in your Makefile.PL (in the
-MY class), please report that to the makemaker mailing list. We are
-trying to minimize the necessary method overrides and switch to data
-driven Makefile.PLs wherever possible. In the long run less methods
-will be overridable via the MY class.
-
-=head1 METHODS
-
-The following description of methods is still under
-development. Please refer to the code for not suitably documented
-sections and complain loudly to the makemaker at perl.org mailing list.
-Better yet, provide a patch.
-
-Not all of the methods below are overridable in a
-Makefile.PL. Overridable methods are marked as (o). All methods are
-overridable by a platform specific MM_*.pm file.
-
-Cross-platform methods are being moved into MM_Any. If you can't find
-something that used to be in here, look in MM_Any.
-
-=cut
-
-# So we don't have to keep calling the methods over and over again,
-# we have these globals to cache the values. Faster and shrtr.
-my $Curdir = __PACKAGE__->curdir;
-my $Rootdir = __PACKAGE__->rootdir;
-my $Updir = __PACKAGE__->updir;
-
-
-=head2 Methods
-
-=over 4
-
-=item os_flavor
-
-Simply says that we're Unix.
-
-=cut
-
-sub os_flavor {
- return('Unix');
-}
-
-
-=item c_o (o)
-
-Defines the suffix rules to compile different flavors of C files to
-object files.
-
-=cut
-
-sub c_o {
-# --- Translation Sections ---
-
- my($self) = shift;
- return '' unless $self->needs_linking();
- my(@m);
-
- my $command = '$(CCCMD)';
- my $flags = '$(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE)';
-
- if (my $cpp = $Config{cpprun}) {
- my $cpp_cmd = $self->const_cccmd;
- $cpp_cmd =~ s/^CCCMD\s*=\s*\$\(CC\)/$cpp/;
- push @m, qq{
-.c.i:
- $cpp_cmd $flags \$*.c > \$*.i
-};
- }
-
- push @m, qq{
-.c.s:
- $command -S $flags \$*.c
-
-.c\$(OBJ_EXT):
- $command $flags \$*.c
-
-.cpp\$(OBJ_EXT):
- $command $flags \$*.cpp
-
-.cxx\$(OBJ_EXT):
- $command $flags \$*.cxx
-
-.cc\$(OBJ_EXT):
- $command $flags \$*.cc
-};
-
- push @m, qq{
-.C\$(OBJ_EXT):
- $command $flags \$*.C
-} if !$Is{OS2} and !$Is{Win32} and !$Is{Dos}; #Case-specific
-
- return join "", @m;
-}
-
-=item cflags (o)
-
-Does very much the same as the cflags script in the perl
-distribution. It doesn't return the whole compiler command line, but
-initializes all of its parts. The const_cccmd method then actually
-returns the definition of the CCCMD macro which uses these parts.
-
-=cut
-
-#'
-
-sub cflags {
- my($self,$libperl)=@_;
- return $self->{CFLAGS} if $self->{CFLAGS};
- return '' unless $self->needs_linking();
-
- my($prog, $uc, $perltype, %cflags);
- $libperl ||= $self->{LIBPERL_A} || "libperl$self->{LIB_EXT}" ;
- $libperl =~ s/\.\$\(A\)$/$self->{LIB_EXT}/;
-
- @cflags{qw(cc ccflags optimize shellflags)}
- = @Config{qw(cc ccflags optimize shellflags)};
- my($optdebug) = "";
-
- $cflags{shellflags} ||= '';
-
- my(%map) = (
- D => '-DDEBUGGING',
- E => '-DEMBED',
- DE => '-DDEBUGGING -DEMBED',
- M => '-DEMBED -DMULTIPLICITY',
- DM => '-DDEBUGGING -DEMBED -DMULTIPLICITY',
- );
-
- if ($libperl =~ /libperl(\w*)\Q$self->{LIB_EXT}/){
- $uc = uc($1);
- } else {
- $uc = ""; # avoid warning
- }
- $perltype = $map{$uc} ? $map{$uc} : "";
-
- if ($uc =~ /^D/) {
- $optdebug = "-g";
- }
-
-
- my($name);
- ( $name = $self->{NAME} . "_cflags" ) =~ s/:/_/g ;
- if ($prog = $Config{$name}) {
- # Expand hints for this extension via the shell
- print STDOUT "Processing $name hint:\n" if $Verbose;
- my(@o)=`cc=\"$cflags{cc}\"
- ccflags=\"$cflags{ccflags}\"
- optimize=\"$cflags{optimize}\"
- perltype=\"$cflags{perltype}\"
- optdebug=\"$cflags{optdebug}\"
- eval '$prog'
- echo cc=\$cc
- echo ccflags=\$ccflags
- echo optimize=\$optimize
- echo perltype=\$perltype
- echo optdebug=\$optdebug
- `;
- foreach my $line (@o){
- chomp $line;
- if ($line =~ /(.*?)=\s*(.*)\s*$/){
- $cflags{$1} = $2;
- print STDOUT " $1 = $2\n" if $Verbose;
- } else {
- print STDOUT "Unrecognised result from hint: '$line'\n";
- }
- }
- }
-
- if ($optdebug) {
- $cflags{optimize} = $optdebug;
- }
-
- for (qw(ccflags optimize perltype)) {
- $cflags{$_} ||= '';
- $cflags{$_} =~ s/^\s+//;
- $cflags{$_} =~ s/\s+/ /g;
- $cflags{$_} =~ s/\s+$//;
- $self->{uc $_} ||= $cflags{$_};
- }
-
- if ($self->{POLLUTE}) {
- $self->{CCFLAGS} .= ' -DPERL_POLLUTE ';
- }
-
- my $pollute = '';
- if ($Config{usemymalloc} and not $Config{bincompat5005}
- and not $Config{ccflags} =~ /-DPERL_POLLUTE_MALLOC\b/
- and $self->{PERL_MALLOC_OK}) {
- $pollute = '$(PERL_MALLOC_DEF)';
- }
-
- $self->{CCFLAGS} = quote_paren($self->{CCFLAGS});
- $self->{OPTIMIZE} = quote_paren($self->{OPTIMIZE});
-
- return $self->{CFLAGS} = qq{
-CCFLAGS = $self->{CCFLAGS}
-OPTIMIZE = $self->{OPTIMIZE}
-PERLTYPE = $self->{PERLTYPE}
-MPOLLUTE = $pollute
-};
-
-}
-
-
-=item const_cccmd (o)
-
-Returns the full compiler call for C programs and stores the
-definition in CONST_CCCMD.
-
-=cut
-
-sub const_cccmd {
- my($self,$libperl)=@_;
- return $self->{CONST_CCCMD} if $self->{CONST_CCCMD};
- return '' unless $self->needs_linking();
- return $self->{CONST_CCCMD} =
- q{CCCMD = $(CC) -c $(PASTHRU_INC) $(INC) \\
- $(CCFLAGS) $(OPTIMIZE) \\
- $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \\
- $(XS_DEFINE_VERSION)};
-}
-
-=item const_config (o)
-
-Defines a couple of constants in the Makefile that are imported from
-%Config.
-
-=cut
-
-sub const_config {
-# --- Constants Sections ---
-
- my($self) = shift;
- my @m = <<"END";
-
-# These definitions are from config.sh (via $INC{'Config.pm'}).
-# They may have been overridden via Makefile.PL or on the command line.
-END
-
- my(%once_only);
- foreach my $key (@{$self->{CONFIG}}){
- # SITE*EXP macros are defined in &constants; avoid duplicates here
- next if $once_only{$key};
- $self->{uc $key} = quote_paren($self->{uc $key});
- push @m, uc($key) , ' = ' , $self->{uc $key}, "\n";
- $once_only{$key} = 1;
- }
- join('', @m);
-}
-
-=item const_loadlibs (o)
-
-Defines EXTRALIBS, LDLOADLIBS, BSLOADLIBS, LD_RUN_PATH. See
-L<ExtUtils::Liblist> for details.
-
-=cut
-
-sub const_loadlibs {
- my($self) = shift;
- return "" unless $self->needs_linking;
- my @m;
- push @m, qq{
-# $self->{NAME} might depend on some other libraries:
-# See ExtUtils::Liblist for details
-#
-};
- for my $tmp (qw/
- EXTRALIBS LDLOADLIBS BSLOADLIBS
- /) {
- next unless defined $self->{$tmp};
- push @m, "$tmp = $self->{$tmp}\n";
- }
- # don't set LD_RUN_PATH if empty
- for my $tmp (qw/
- LD_RUN_PATH
- /) {
- next unless $self->{$tmp};
- push @m, "$tmp = $self->{$tmp}\n";
- }
- return join "", @m;
-}
-
-=item constants (o)
-
- my $make_frag = $mm->constants;
-
-Prints out macros for lots of constants.
-
-=cut
-
-sub constants {
- my($self) = @_;
- my @m = ();
-
- $self->{DFSEP} = '$(DIRFILESEP)'; # alias for internal use
-
- for my $macro (qw(
-
- AR_STATIC_ARGS DIRFILESEP DFSEP
- NAME NAME_SYM
- VERSION VERSION_MACRO VERSION_SYM DEFINE_VERSION
- XS_VERSION XS_VERSION_MACRO XS_DEFINE_VERSION
- INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB
- INST_MAN1DIR INST_MAN3DIR
- MAN1EXT MAN3EXT
- INSTALLDIRS INSTALL_BASE DESTDIR PREFIX
- PERLPREFIX SITEPREFIX VENDORPREFIX
- ),
- (map { ("INSTALL".$_,
- "DESTINSTALL".$_)
- } $self->installvars),
- qw(
- PERL_LIB
- PERL_ARCHLIB
- LIBPERL_A MYEXTLIB
- FIRST_MAKEFILE MAKEFILE_OLD MAKE_APERL_FILE
- PERLMAINCC PERL_SRC PERL_INC
- PERL FULLPERL ABSPERL
- PERLRUN FULLPERLRUN ABSPERLRUN
- PERLRUNINST FULLPERLRUNINST ABSPERLRUNINST
- PERL_CORE
- PERM_DIR PERM_RW PERM_RWX
-
- ) )
- {
- next unless defined $self->{$macro};
-
- # pathnames can have sharp signs in them; escape them so
- # make doesn't think it is a comment-start character.
- $self->{$macro} =~ s/#/\\#/g;
- push @m, "$macro = $self->{$macro}\n";
- }
-
- push @m, qq{
-MAKEMAKER = $self->{MAKEMAKER}
-MM_VERSION = $self->{MM_VERSION}
-MM_REVISION = $self->{MM_REVISION}
-};
-
- push @m, q{
-# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
-# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
-# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
-# DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
-};
-
- for my $macro (qw/
- MAKE
- FULLEXT BASEEXT PARENT_NAME DLBASE VERSION_FROM INC DEFINE OBJECT
- LDFROM LINKTYPE BOOTDEP
- / )
- {
- next unless defined $self->{$macro};
- push @m, "$macro = $self->{$macro}\n";
- }
-
- push @m, "
-# Handy lists of source code files:
-XS_FILES = ".$self->wraplist(sort keys %{$self->{XS}})."
-C_FILES = ".$self->wraplist(@{$self->{C}})."
-O_FILES = ".$self->wraplist(@{$self->{O_FILES}})."
-H_FILES = ".$self->wraplist(@{$self->{H}})."
-MAN1PODS = ".$self->wraplist(sort keys %{$self->{MAN1PODS}})."
-MAN3PODS = ".$self->wraplist(sort keys %{$self->{MAN3PODS}})."
-";
-
-
- push @m, q{
-# Where is the Config information that we are using/depend on
-CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
-};
-
-
- push @m, qq{
-# Where to build things
-INST_LIBDIR = $self->{INST_LIBDIR}
-INST_ARCHLIBDIR = $self->{INST_ARCHLIBDIR}
-
-INST_AUTODIR = $self->{INST_AUTODIR}
-INST_ARCHAUTODIR = $self->{INST_ARCHAUTODIR}
-
-INST_STATIC = $self->{INST_STATIC}
-INST_DYNAMIC = $self->{INST_DYNAMIC}
-INST_BOOT = $self->{INST_BOOT}
-};
-
-
- push @m, qq{
-# Extra linker info
-EXPORT_LIST = $self->{EXPORT_LIST}
-PERL_ARCHIVE = $self->{PERL_ARCHIVE}
-PERL_ARCHIVE_AFTER = $self->{PERL_ARCHIVE_AFTER}
-};
-
- push @m, "
-
-TO_INST_PM = ".$self->wraplist(sort keys %{$self->{PM}})."
-
-PM_TO_BLIB = ".$self->wraplist(%{$self->{PM}})."
-";
-
- join('', at m);
-}
-
-
-=item depend (o)
-
-Same as macro for the depend attribute.
-
-=cut
-
-sub depend {
- my($self,%attribs) = @_;
- my(@m,$key,$val);
- while (($key,$val) = each %attribs){
- last unless defined $key;
- push @m, "$key : $val\n";
- }
- join "", @m;
-}
-
-
-=item init_DEST
-
- $mm->init_DEST
-
-Defines the DESTDIR and DEST* variables paralleling the INSTALL*.
-
-=cut
-
-sub init_DEST {
- my $self = shift;
-
- # Initialize DESTDIR
- $self->{DESTDIR} ||= '';
-
- # Make DEST variables.
- foreach my $var ($self->installvars) {
- my $destvar = 'DESTINSTALL'.$var;
- $self->{$destvar} ||= '$(DESTDIR)$(INSTALL'.$var.')';
- }
-}
-
-
-=item init_dist
-
- $mm->init_dist;
-
-Defines a lot of macros for distribution support.
-
- macro description default
-
- TAR tar command to use tar
- TARFLAGS flags to pass to TAR cvf
-
- ZIP zip command to use zip
- ZIPFLAGS flags to pass to ZIP -r
-
- COMPRESS compression command to gzip --best
- use for tarfiles
- SUFFIX suffix to put on .gz
- compressed files
-
- SHAR shar command to use shar
-
- PREOP extra commands to run before
- making the archive
- POSTOP extra commands to run after
- making the archive
-
- TO_UNIX a command to convert linefeeds
- to Unix style in your archive
-
- CI command to checkin your ci -u
- sources to version control
- RCS_LABEL command to label your sources rcs -Nv$(VERSION_SYM): -q
- just after CI is run
-
- DIST_CP $how argument to manicopy() best
- when the distdir is created
-
- DIST_DEFAULT default target to use to tardist
- create a distribution
-
- DISTVNAME name of the resulting archive $(DISTNAME)-$(VERSION)
- (minus suffixes)
-
-=cut
-
-sub init_dist {
- my $self = shift;
-
- $self->{TAR} ||= 'tar';
- $self->{TARFLAGS} ||= 'cvf';
- $self->{ZIP} ||= 'zip';
- $self->{ZIPFLAGS} ||= '-r';
- $self->{COMPRESS} ||= 'gzip --best';
- $self->{SUFFIX} ||= '.gz';
- $self->{SHAR} ||= 'shar';
- $self->{PREOP} ||= '$(NOECHO) $(NOOP)'; # eg update MANIFEST
- $self->{POSTOP} ||= '$(NOECHO) $(NOOP)'; # eg remove the distdir
- $self->{TO_UNIX} ||= '$(NOECHO) $(NOOP)';
-
- $self->{CI} ||= 'ci -u';
- $self->{RCS_LABEL}||= 'rcs -Nv$(VERSION_SYM): -q';
- $self->{DIST_CP} ||= 'best';
- $self->{DIST_DEFAULT} ||= 'tardist';
-
- ($self->{DISTNAME} = $self->{NAME}) =~ s{::}{-}g unless $self->{DISTNAME};
- $self->{DISTVNAME} ||= $self->{DISTNAME}.'-'.$self->{VERSION};
-
-}
-
-=item dist (o)
-
- my $dist_macros = $mm->dist(%overrides);
-
-Generates a make fragment defining all the macros initialized in
-init_dist.
-
-%overrides can be used to override any of the above.
-
-=cut
-
-sub dist {
- my($self, %attribs) = @_;
-
- my $make = '';
- foreach my $key (qw(
- TAR TARFLAGS ZIP ZIPFLAGS COMPRESS SUFFIX SHAR
- PREOP POSTOP TO_UNIX
- CI RCS_LABEL DIST_CP DIST_DEFAULT
- DISTNAME DISTVNAME
- ))
- {
- my $value = $attribs{$key} || $self->{$key};
- $make .= "$key = $value\n";
- }
-
- return $make;
-}
-
-=item dist_basics (o)
-
-Defines the targets distclean, distcheck, skipcheck, manifest, veryclean.
-
-=cut
-
-sub dist_basics {
- my($self) = shift;
-
- return <<'MAKE_FRAG';
-distclean :: realclean distcheck
- $(NOECHO) $(NOOP)
-
-distcheck :
- $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck
-
-skipcheck :
- $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck
-
-manifest :
- $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
-
-veryclean : realclean
- $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old
-
-MAKE_FRAG
-
-}
-
-=item dist_ci (o)
-
-Defines a check in target for RCS.
-
-=cut
-
-sub dist_ci {
- my($self) = shift;
- return q{
-ci :
- $(PERLRUN) "-MExtUtils::Manifest=maniread" \\
- -e "@all = keys %{ maniread() };" \\
- -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \\
- -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
-};
-}
-
-=item dist_core (o)
-
- my $dist_make_fragment = $MM->dist_core;
-
-Puts the targets necessary for 'make dist' together into one make
-fragment.
-
-=cut
-
-sub dist_core {
- my($self) = shift;
-
- my $make_frag = '';
- foreach my $target (qw(dist tardist uutardist tarfile zipdist zipfile
- shdist))
- {
- my $method = $target.'_target';
- $make_frag .= "\n";
- $make_frag .= $self->$method();
- }
-
- return $make_frag;
-}
-
-
-=item B<dist_target>
-
- my $make_frag = $MM->dist_target;
-
-Returns the 'dist' target to make an archive for distribution. This
-target simply checks to make sure the Makefile is up-to-date and
-depends on $(DIST_DEFAULT).
-
-=cut
-
-sub dist_target {
- my($self) = shift;
-
- my $date_check = $self->oneliner(<<'CODE', ['-l']);
-print 'Warning: Makefile possibly out of date with $(VERSION_FROM)'
- if -e '$(VERSION_FROM)' and -M '$(VERSION_FROM)' < -M '$(FIRST_MAKEFILE)';
-CODE
-
- return sprintf <<'MAKE_FRAG', $date_check;
-dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
- $(NOECHO) %s
-MAKE_FRAG
-}
-
-=item B<tardist_target>
-
- my $make_frag = $MM->tardist_target;
-
-Returns the 'tardist' target which is simply so 'make tardist' works.
-The real work is done by the dynamically named tardistfile_target()
-method, tardist should have that as a dependency.
-
-=cut
-
-sub tardist_target {
- my($self) = shift;
-
- return <<'MAKE_FRAG';
-tardist : $(DISTVNAME).tar$(SUFFIX)
- $(NOECHO) $(NOOP)
-MAKE_FRAG
-}
-
-=item B<zipdist_target>
-
- my $make_frag = $MM->zipdist_target;
-
-Returns the 'zipdist' target which is simply so 'make zipdist' works.
-The real work is done by the dynamically named zipdistfile_target()
-method, zipdist should have that as a dependency.
-
-=cut
-
-sub zipdist_target {
- my($self) = shift;
-
- return <<'MAKE_FRAG';
-zipdist : $(DISTVNAME).zip
- $(NOECHO) $(NOOP)
-MAKE_FRAG
-}
-
-=item B<tarfile_target>
-
- my $make_frag = $MM->tarfile_target;
-
-The name of this target is the name of the tarball generated by
-tardist. This target does the actual work of turning the distdir into
-a tarball.
-
-=cut
-
-sub tarfile_target {
- my($self) = shift;
-
- return <<'MAKE_FRAG';
-$(DISTVNAME).tar$(SUFFIX) : distdir
- $(PREOP)
- $(TO_UNIX)
- $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
- $(RM_RF) $(DISTVNAME)
- $(COMPRESS) $(DISTVNAME).tar
- $(POSTOP)
-MAKE_FRAG
-}
-
-=item zipfile_target
-
- my $make_frag = $MM->zipfile_target;
-
-The name of this target is the name of the zip file generated by
-zipdist. This target does the actual work of turning the distdir into
-a zip file.
-
-=cut
-
-sub zipfile_target {
- my($self) = shift;
-
- return <<'MAKE_FRAG';
-$(DISTVNAME).zip : distdir
- $(PREOP)
- $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
- $(RM_RF) $(DISTVNAME)
- $(POSTOP)
-MAKE_FRAG
-}
-
-=item uutardist_target
-
- my $make_frag = $MM->uutardist_target;
-
-Converts the tarfile into a uuencoded file
-
-=cut
-
-sub uutardist_target {
- my($self) = shift;
-
- return <<'MAKE_FRAG';
-uutardist : $(DISTVNAME).tar$(SUFFIX)
- uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
-MAKE_FRAG
-}
-
-
-=item shdist_target
-
- my $make_frag = $MM->shdist_target;
-
-Converts the distdir into a shell archive.
-
-=cut
-
-sub shdist_target {
- my($self) = shift;
-
- return <<'MAKE_FRAG';
-shdist : distdir
- $(PREOP)
- $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
- $(RM_RF) $(DISTVNAME)
- $(POSTOP)
-MAKE_FRAG
-}
-
-
-=item dlsyms (o)
-
-Used by some OS' to define DL_FUNCS and DL_VARS and write the *.exp files.
-
-Normally just returns an empty string.
-
-=cut
-
-sub dlsyms {
- return '';
-}
-
-
-=item dynamic_bs (o)
-
-Defines targets for bootstrap files.
-
-=cut
-
-sub dynamic_bs {
- my($self, %attribs) = @_;
- return '
-BOOTSTRAP =
-' unless $self->has_link_code();
-
- my $target = $Is{VMS} ? '$(MMS$TARGET)' : '$@';
-
- return sprintf <<'MAKE_FRAG', ($target) x 5;
-BOOTSTRAP = $(BASEEXT).bs
-
-# As Mkbootstrap might not write a file (if none is required)
-# we use touch to prevent make continually trying to remake it.
-# The DynaLoader only reads a non-empty file.
-$(BOOTSTRAP) : $(FIRST_MAKEFILE) $(BOOTDEP) $(INST_ARCHAUTODIR)$(DFSEP).exists
- $(NOECHO) $(ECHO) "Running Mkbootstrap for $(NAME) ($(BSLOADLIBS))"
- $(NOECHO) $(PERLRUN) \
- "-MExtUtils::Mkbootstrap" \
- -e "Mkbootstrap('$(BASEEXT)','$(BSLOADLIBS)');"
- $(NOECHO) $(TOUCH) %s
- $(CHMOD) $(PERM_RW) %s
-
-$(INST_BOOT) : $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).exists
- $(NOECHO) $(RM_RF) %s
- - $(CP) $(BOOTSTRAP) %s
- $(CHMOD) $(PERM_RW) %s
-MAKE_FRAG
-}
-
-=item dynamic_lib (o)
-
-Defines how to produce the *.so (or equivalent) files.
-
-=cut
-
-sub dynamic_lib {
- my($self, %attribs) = @_;
- return '' unless $self->needs_linking(); #might be because of a subdir
-
- return '' unless $self->has_link_code;
-
- my($otherldflags) = $attribs{OTHERLDFLAGS} || "";
- my($inst_dynamic_dep) = $attribs{INST_DYNAMIC_DEP} || "";
- my($armaybe) = $attribs{ARMAYBE} || $self->{ARMAYBE} || ":";
- my($ldfrom) = '$(LDFROM)';
- $armaybe = 'ar' if ($Is{OSF} and $armaybe eq ':');
- my(@m);
- my $ld_opt = $Is{OS2} ? '$(OPTIMIZE) ' : ''; # Useful on other systems too?
- my $ld_fix = $Is{OS2} ? '|| ( $(RM_F) $@ && sh -c false )' : '';
- push(@m,'
-# This section creates the dynamically loadable $(INST_DYNAMIC)
-# from $(OBJECT) and possibly $(MYEXTLIB).
-ARMAYBE = '.$armaybe.'
-OTHERLDFLAGS = '.$ld_opt.$otherldflags.'
-INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
-INST_DYNAMIC_FIX = '.$ld_fix.'
-
-$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
-');
- if ($armaybe ne ':'){
- $ldfrom = 'tmp$(LIB_EXT)';
- push(@m,' $(ARMAYBE) cr '.$ldfrom.' $(OBJECT)'."\n");
- push(@m,' $(RANLIB) '."$ldfrom\n");
- }
- $ldfrom = "-all $ldfrom -none" if $Is{OSF};
-
- # The IRIX linker doesn't use LD_RUN_PATH
- my $ldrun = $Is{IRIX} && $self->{LD_RUN_PATH} ?
- qq{-rpath "$self->{LD_RUN_PATH}"} : '';
-
- # For example in AIX the shared objects/libraries from previous builds
- # linger quite a while in the shared dynalinker cache even when nobody
- # is using them. This is painful if one for instance tries to restart
- # a failed build because the link command will fail unnecessarily 'cos
- # the shared object/library is 'busy'.
- push(@m,' $(RM_F) $@
-');
-
- my $libs = '$(LDLOADLIBS)';
-
- if (($Is{NetBSD} || $Is{Interix}) && $Config{'useshrplib'} eq 'true') {
- # Use nothing on static perl platforms, and to the flags needed
- # to link against the shared libperl library on shared perl
- # platforms. We peek at lddlflags to see if we need -Wl,-R
- # or -R to add paths to the run-time library search path.
- if ($Config{'lddlflags'} =~ /-Wl,-R/) {
- $libs .= ' -L$(PERL_INC) -Wl,-R$(INSTALLARCHLIB)/CORE -Wl,-R$(PERL_ARCHLIB)/CORE -lperl';
- } elsif ($Config{'lddlflags'} =~ /-R/) {
- $libs .= ' -L$(PERL_INC) -R$(INSTALLARCHLIB)/CORE -R$(PERL_ARCHLIB)/CORE -lperl';
- }
- }
-
- my $ld_run_path_shell = "";
- if ($self->{LD_RUN_PATH} ne "") {
- $ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
- }
-
- push @m, sprintf <<'MAKE', $ld_run_path_shell, $ldrun, $ldfrom, $libs;
- %s$(LD) %s $(LDDLFLAGS) %s $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) \
- $(PERL_ARCHIVE) %s $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST) \
- $(INST_DYNAMIC_FIX)
-MAKE
-
- push @m, <<'MAKE';
- $(CHMOD) $(PERM_RWX) $@
-MAKE
-
- return join('', at m);
-}
-
-=item exescan
-
-Deprecated method. Use libscan instead.
-
-=cut
-
-sub exescan {
- my($self,$path) = @_;
- $path;
-}
-
-=item extliblist
-
-Called by init_others, and calls ext ExtUtils::Liblist. See
-L<ExtUtils::Liblist> for details.
-
-=cut
-
-sub extliblist {
- my($self,$libs) = @_;
- require ExtUtils::Liblist;
- $self->ext($libs, $Verbose);
-}
-
-=item find_perl
-
-Finds the executables PERL and FULLPERL
-
-=cut
-
-sub find_perl {
- my($self, $ver, $names, $dirs, $trace) = @_;
-
- if ($trace >= 2){
- print "Looking for perl $ver by these names:
-@$names
-in these dirs:
-@$dirs
-";
- }
-
- my $stderr_duped = 0;
- local *STDERR_COPY;
-
- unless ($Is{BSD}) {
- # >& and lexical filehandles together give 5.6.2 indigestion
- if( open(STDERR_COPY, '>&STDERR') ) { ## no critic
- $stderr_duped = 1;
- }
- else {
- warn <<WARNING;
-find_perl() can't dup STDERR: $!
-You might see some garbage while we search for Perl
-WARNING
- }
- }
-
- foreach my $name (@$names){
- foreach my $dir (@$dirs){
- next unless defined $dir; # $self->{PERL_SRC} may be undefined
- my ($abs, $val);
- if ($self->file_name_is_absolute($name)) { # /foo/bar
- $abs = $name;
- } elsif ($self->canonpath($name) eq
- $self->canonpath(basename($name))) { # foo
- $abs = $self->catfile($dir, $name);
- } else { # foo/bar
- $abs = $self->catfile($Curdir, $name);
- }
- print "Checking $abs\n" if ($trace >= 2);
- next unless $self->maybe_command($abs);
- print "Executing $abs\n" if ($trace >= 2);
-
- my $version_check = qq{$abs -le "require $ver; print qq{VER_OK}"};
- $version_check = "$Config{run} $version_check"
- if defined $Config{run} and length $Config{run};
-
- # To avoid using the unportable 2>&1 to suppress STDERR,
- # we close it before running the command.
- # However, thanks to a thread library bug in many BSDs
- # ( http://www.freebsd.org/cgi/query-pr.cgi?pr=51535 )
- # we cannot use the fancier more portable way in here
- # but instead need to use the traditional 2>&1 construct.
- if ($Is{BSD}) {
- $val = `$version_check 2>&1`;
- } else {
- close STDERR if $stderr_duped;
- $val = `$version_check`;
-
- # 5.6.2's 3-arg open doesn't work with >&
- open STDERR, ">&STDERR_COPY" ## no critic
- if $stderr_duped;
- }
-
- if ($val =~ /^VER_OK/m) {
- print "Using PERL=$abs\n" if $trace;
- return $abs;
- } elsif ($trace >= 2) {
- print "Result: '$val' ".($? >> 8)."\n";
- }
- }
- }
- print STDOUT "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
- 0; # false and not empty
-}
-
-
-=item fixin
-
- $mm->fixin(@files);
-
-Inserts the sharpbang or equivalent magic number to a set of @files.
-
-=cut
-
-sub fixin { # stolen from the pink Camel book, more or less
- my ( $self, @files ) = @_;
-
- my ($does_shbang) = $Config{'sharpbang'} =~ /^\s*\#\!/;
- for my $file (@files) {
- my $file_new = "$file.new";
- my $file_bak = "$file.bak";
-
- open( my $fixin, '<', $file ) or croak "Can't process '$file': $!";
- local $/ = "\n";
- chomp( my $line = <$fixin> );
- next unless $line =~ s/^\s*\#!\s*//; # Not a shbang file.
- # Now figure out the interpreter name.
- my ( $cmd, $arg ) = split ' ', $line, 2;
- $cmd =~ s!^.*/!!;
-
- # Now look (in reverse) for interpreter in absolute PATH (unless perl).
- my $interpreter;
- if ( $cmd =~ m{^perl(?:\z|[^a-z])} ) {
- if ( $Config{startperl} =~ m,^\#!.*/perl, ) {
- $interpreter = $Config{startperl};
- $interpreter =~ s,^\#!,,;
- }
- else {
- $interpreter = $Config{perlpath};
- }
- }
- else {
- my (@absdirs)
- = reverse grep { $self->file_name_is_absolute($_) } $self->path;
- $interpreter = '';
-
- foreach my $dir (@absdirs) {
- if ( $self->maybe_command($cmd) ) {
- warn "Ignoring $interpreter in $file\n"
- if $Verbose && $interpreter;
- $interpreter = $self->catfile( $dir, $cmd );
- }
- }
- }
-
- # Figure out how to invoke interpreter on this machine.
-
- my ($shb) = "";
- if ($interpreter) {
- print STDOUT "Changing sharpbang in $file to $interpreter"
- if $Verbose;
-
- # this is probably value-free on DOSISH platforms
- if ($does_shbang) {
- $shb .= "$Config{'sharpbang'}$interpreter";
- $shb .= ' ' . $arg if defined $arg;
- $shb .= "\n";
- }
- $shb .= qq{
-eval 'exec $interpreter $arg -S \$0 \${1+"\$\@"}'
- if 0; # not running under some shell
-} unless $Is{Win32}; # this won't work on win32, so don't
- }
- else {
- warn "Can't find $cmd in PATH, $file unchanged"
- if $Verbose;
- next;
- }
-
- open( my $fixout, ">", "$file_new" ) or do {
- warn "Can't create new $file: $!\n";
- next;
- };
-
- # Print out the new #! line (or equivalent).
- local $\;
- local $/;
- print $fixout $shb, <$fixin>;
- close $fixin;
- close $fixout;
-
- chmod 0666, $file_bak;
- unlink $file_bak;
- unless ( _rename( $file, $file_bak ) ) {
- warn "Can't rename $file to $file_bak: $!";
- next;
- }
- unless ( _rename( $file_new, $file ) ) {
- warn "Can't rename $file_new to $file: $!";
- unless ( _rename( $file_bak, $file ) ) {
- warn "Can't rename $file_bak back to $file either: $!";
- warn "Leaving $file renamed as $file_bak\n";
- }
- next;
- }
- unlink $file_bak;
- }
- continue {
- system("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
- }
-}
-
-
-sub _rename {
- my($old, $new) = @_;
-
- foreach my $file ($old, $new) {
- if( $Is{VMS} and basename($file) !~ /\./ ) {
- # rename() in 5.8.0 on VMS will not rename a file if it
- # does not contain a dot yet it returns success.
- $file = "$file.";
- }
- }
-
- return rename($old, $new);
-}
-
-
-=item force (o)
-
-Writes an empty FORCE: target.
-
-=cut
-
-sub force {
- my($self) = shift;
- '# Phony target to force checking subdirectories.
-FORCE :
- $(NOECHO) $(NOOP)
-';
-}
-
-=item guess_name
-
-Guess the name of this package by examining the working directory's
-name. MakeMaker calls this only if the developer has not supplied a
-NAME attribute.
-
-=cut
-
-# ';
-
-sub guess_name {
- my($self) = @_;
- use Cwd 'cwd';
- my $name = basename(cwd());
- $name =~ s|[\-_][\d\.\-]+\z||; # this is new with MM 5.00, we
- # strip minus or underline
- # followed by a float or some such
- print "Warning: Guessing NAME [$name] from current directory name.\n";
- $name;
-}
-
-=item has_link_code
-
-Returns true if C, XS, MYEXTLIB or similar objects exist within this
-object that need a compiler. Does not descend into subdirectories as
-needs_linking() does.
-
-=cut
-
-sub has_link_code {
- my($self) = shift;
- return $self->{HAS_LINK_CODE} if defined $self->{HAS_LINK_CODE};
- if ($self->{OBJECT} or @{$self->{C} || []} or $self->{MYEXTLIB}){
- $self->{HAS_LINK_CODE} = 1;
- return 1;
- }
- return $self->{HAS_LINK_CODE} = 0;
-}
-
-
-=item init_dirscan
-
-Scans the directory structure and initializes DIR, XS, XS_FILES,
-C, C_FILES, O_FILES, H, H_FILES, PL_FILES, EXE_FILES.
-
-Called by init_main.
-
-=cut
-
-sub init_dirscan { # --- File and Directory Lists (.xs .pm .pod etc)
- my($self) = @_;
- my(%dir, %xs, %c, %h, %pl_files, %pm);
-
- my %ignore = map {( $_ => 1 )} qw(Makefile.PL Build.PL test.pl t);
-
- # ignore the distdir
- $Is{VMS} ? $ignore{"$self->{DISTVNAME}.dir"} = 1
- : $ignore{$self->{DISTVNAME}} = 1;
-
- @ignore{map lc, keys %ignore} = values %ignore if $Is{VMS};
-
- foreach my $name ($self->lsdir($Curdir)){
- next if $name =~ /\#/;
- next if $name eq $Curdir or $name eq $Updir or $ignore{$name};
- next unless $self->libscan($name);
- if (-d $name){
- next if -l $name; # We do not support symlinks at all
- next if $self->{NORECURS};
- $dir{$name} = $name if (-f $self->catfile($name,"Makefile.PL"));
- } elsif ($name =~ /\.xs\z/){
- my($c); ($c = $name) =~ s/\.xs\z/.c/;
- $xs{$name} = $c;
- $c{$c} = 1;
- } elsif ($name =~ /\.c(pp|xx|c)?\z/i){ # .c .C .cpp .cxx .cc
- $c{$name} = 1
- unless $name =~ m/perlmain\.c/; # See MAP_TARGET
- } elsif ($name =~ /\.h\z/i){
- $h{$name} = 1;
- } elsif ($name =~ /\.PL\z/) {
- ($pl_files{$name} = $name) =~ s/\.PL\z// ;
- } elsif (($Is{VMS} || $Is{Dos}) && $name =~ /[._]pl$/i) {
- # case-insensitive filesystem, one dot per name, so foo.h.PL
- # under Unix appears as foo.h_pl under VMS or fooh.pl on Dos
- local($/); open(my $pl, '<', $name); my $txt = <$pl>; close $pl;
- if ($txt =~ /Extracting \S+ \(with variable substitutions/) {
- ($pl_files{$name} = $name) =~ s/[._]pl\z//i ;
- }
- else {
- $pm{$name} = $self->catfile($self->{INST_LIBDIR},$name);
- }
- } elsif ($name =~ /\.(p[ml]|pod)\z/){
- $pm{$name} = $self->catfile($self->{INST_LIBDIR},$name);
- }
- }
-
- $self->{PL_FILES} ||= \%pl_files;
- $self->{DIR} ||= [sort keys %dir];
- $self->{XS} ||= \%xs;
- $self->{C} ||= [sort keys %c];
- $self->{H} ||= [sort keys %h];
- $self->{PM} ||= \%pm;
-
- my @o_files = @{$self->{C}};
- $self->{O_FILES} = [grep s/\.c(pp|xx|c)?\z/$self->{OBJ_EXT}/i, @o_files];
-}
-
-
-=item init_MANPODS
-
-Determines if man pages should be generated and initializes MAN1PODS
-and MAN3PODS as appropriate.
-
-=cut
-
-sub init_MANPODS {
- my $self = shift;
-
- # Set up names of manual pages to generate from pods
- foreach my $man (qw(MAN1 MAN3)) {
- if ( $self->{"${man}PODS"}
- or $self->{"INSTALL${man}DIR"} =~ /^(none|\s*)$/
- ) {
- $self->{"${man}PODS"} ||= {};
- }
- else {
- my $init_method = "init_${man}PODS";
- $self->$init_method();
- }
- }
-}
-
-
-sub _has_pod {
- my($self, $file) = @_;
-
- my($ispod)=0;
- if (open( my $fh, '<', $file )) {
- while (<$fh>) {
- if (/^=(?:head\d+|item|pod)\b/) {
- $ispod=1;
- last;
- }
- }
- close $fh;
- } else {
- # If it doesn't exist yet, we assume, it has pods in it
- $ispod = 1;
- }
-
- return $ispod;
-}
-
-
-=item init_MAN1PODS
-
-Initializes MAN1PODS from the list of EXE_FILES.
-
-=cut
-
-sub init_MAN1PODS {
- my($self) = @_;
-
- if ( exists $self->{EXE_FILES} ) {
- foreach my $name (@{$self->{EXE_FILES}}) {
- next unless $self->_has_pod($name);
-
- $self->{MAN1PODS}->{$name} =
- $self->catfile("\$(INST_MAN1DIR)",
- basename($name).".\$(MAN1EXT)");
- }
- }
-}
-
-
-=item init_MAN3PODS
-
-Initializes MAN3PODS from the list of PM files.
-
-=cut
-
-sub init_MAN3PODS {
- my $self = shift;
-
- my %manifypods = (); # we collect the keys first, i.e. the files
- # we have to convert to pod
-
- foreach my $name (keys %{$self->{PM}}) {
- if ($name =~ /\.pod\z/ ) {
- $manifypods{$name} = $self->{PM}{$name};
- } elsif ($name =~ /\.p[ml]\z/ ) {
- if( $self->_has_pod($name) ) {
- $manifypods{$name} = $self->{PM}{$name};
- }
- }
- }
-
- my $parentlibs_re = join '|', @{$self->{PMLIBPARENTDIRS}};
-
- # Remove "Configure.pm" and similar, if it's not the only pod listed
- # To force inclusion, just name it "Configure.pod", or override
- # MAN3PODS
- foreach my $name (keys %manifypods) {
- if ($self->{PERL_CORE} and $name =~ /(config|setup).*\.pm/is) {
- delete $manifypods{$name};
- next;
- }
- my($manpagename) = $name;
- $manpagename =~ s/\.p(od|m|l)\z//;
- # everything below lib is ok
- unless($manpagename =~ s!^\W*($parentlibs_re)\W+!!s) {
- $manpagename = $self->catfile(
- split(/::/,$self->{PARENT_NAME}),$manpagename
- );
- }
- $manpagename = $self->replace_manpage_separator($manpagename);
- $self->{MAN3PODS}->{$name} =
- $self->catfile("\$(INST_MAN3DIR)", "$manpagename.\$(MAN3EXT)");
- }
-}
-
-
-=item init_PM
-
-Initializes PMLIBDIRS and PM from PMLIBDIRS.
-
-=cut
-
-sub init_PM {
- my $self = shift;
-
- # Some larger extensions often wish to install a number of *.pm/pl
- # files into the library in various locations.
-
- # The attribute PMLIBDIRS holds an array reference which lists
- # subdirectories which we should search for library files to
- # install. PMLIBDIRS defaults to [ 'lib', $self->{BASEEXT} ]. We
- # recursively search through the named directories (skipping any
- # which don't exist or contain Makefile.PL files).
-
- # For each *.pm or *.pl file found $self->libscan() is called with
- # the default installation path in $_[1]. The return value of
- # libscan defines the actual installation location. The default
- # libscan function simply returns the path. The file is skipped
- # if libscan returns false.
-
- # The default installation location passed to libscan in $_[1] is:
- #
- # ./*.pm => $(INST_LIBDIR)/*.pm
- # ./xyz/... => $(INST_LIBDIR)/xyz/...
- # ./lib/... => $(INST_LIB)/...
- #
- # In this way the 'lib' directory is seen as the root of the actual
- # perl library whereas the others are relative to INST_LIBDIR
- # (which includes PARENT_NAME). This is a subtle distinction but one
- # that's important for nested modules.
-
- unless( $self->{PMLIBDIRS} ) {
- if( $Is{VMS} ) {
- # Avoid logical name vs directory collisions
- $self->{PMLIBDIRS} = ['./lib', "./$self->{BASEEXT}"];
- }
- else {
- $self->{PMLIBDIRS} = ['lib', $self->{BASEEXT}];
- }
- }
-
- #only existing directories that aren't in $dir are allowed
-
- # Avoid $_ wherever possible:
- # @{$self->{PMLIBDIRS}} = grep -d && !$dir{$_}, @{$self->{PMLIBDIRS}};
- my (@pmlibdirs) = @{$self->{PMLIBDIRS}};
- @{$self->{PMLIBDIRS}} = ();
- my %dir = map { ($_ => $_) } @{$self->{DIR}};
- foreach my $pmlibdir (@pmlibdirs) {
- -d $pmlibdir && !$dir{$pmlibdir} && push @{$self->{PMLIBDIRS}}, $pmlibdir;
- }
-
- unless( $self->{PMLIBPARENTDIRS} ) {
- @{$self->{PMLIBPARENTDIRS}} = ('lib');
- }
-
- return if $self->{PM} and $self->{ARGS}{PM};
-
- if (@{$self->{PMLIBDIRS}}){
- print "Searching PMLIBDIRS: @{$self->{PMLIBDIRS}}\n"
- if ($Verbose >= 2);
- require File::Find;
- File::Find::find(sub {
- if (-d $_){
- unless ($self->libscan($_)){
- $File::Find::prune = 1;
- }
- return;
- }
- return if /\#/;
- return if /~$/; # emacs temp files
- return if /,v$/; # RCS files
- return if m{\.swp$}; # vim swap files
-
- my $path = $File::Find::name;
- my $prefix = $self->{INST_LIBDIR};
- my $striplibpath;
-
- my $parentlibs_re = join '|', @{$self->{PMLIBPARENTDIRS}};
- $prefix = $self->{INST_LIB}
- if ($striplibpath = $path) =~ s{^(\W*)($parentlibs_re)\W}
- {$1}i;
-
- my($inst) = $self->catfile($prefix,$striplibpath);
- local($_) = $inst; # for backwards compatibility
- $inst = $self->libscan($inst);
- print "libscan($path) => '$inst'\n" if ($Verbose >= 2);
- return unless $inst;
- $self->{PM}{$path} = $inst;
- }, @{$self->{PMLIBDIRS}});
- }
-}
-
-
-=item init_DIRFILESEP
-
-Using / for Unix. Called by init_main.
-
-=cut
-
-sub init_DIRFILESEP {
- my($self) = shift;
-
- $self->{DIRFILESEP} = '/';
-}
-
-
-=item init_main
-
-Initializes AR, AR_STATIC_ARGS, BASEEXT, CONFIG, DISTNAME, DLBASE,
-EXE_EXT, FULLEXT, FULLPERL, FULLPERLRUN, FULLPERLRUNINST, INST_*,
-INSTALL*, INSTALLDIRS, LIB_EXT, LIBPERL_A, MAP_TARGET, NAME,
-OBJ_EXT, PARENT_NAME, PERL, PERL_ARCHLIB, PERL_INC, PERL_LIB,
-PERL_SRC, PERLRUN, PERLRUNINST, PREFIX, VERSION,
-VERSION_SYM, XS_VERSION.
-
-=cut
-
-sub init_main {
- my($self) = @_;
-
- # --- Initialize Module Name and Paths
-
- # NAME = Foo::Bar::Oracle
- # FULLEXT = Foo/Bar/Oracle
- # BASEEXT = Oracle
- # PARENT_NAME = Foo::Bar
-### Only UNIX:
-### ($self->{FULLEXT} =
-### $self->{NAME}) =~ s!::!/!g ; #eg. BSD/Foo/Socket
- $self->{FULLEXT} = $self->catdir(split /::/, $self->{NAME});
-
-
- # Copied from DynaLoader:
-
- my(@modparts) = split(/::/,$self->{NAME});
- my($modfname) = $modparts[-1];
-
- # Some systems have restrictions on files names for DLL's etc.
- # mod2fname returns appropriate file base name (typically truncated)
- # It may also edit @modparts if required.
- if (defined &DynaLoader::mod2fname) {
- $modfname = &DynaLoader::mod2fname(\@modparts);
- }
-
- ($self->{PARENT_NAME}, $self->{BASEEXT}) = $self->{NAME} =~ m!(?:([\w:]+)::)?(\w+)\z! ;
- $self->{PARENT_NAME} ||= '';
-
- if (defined &DynaLoader::mod2fname) {
- # As of 5.001m, dl_os2 appends '_'
- $self->{DLBASE} = $modfname;
- } else {
- $self->{DLBASE} = '$(BASEEXT)';
- }
-
-
- # --- Initialize PERL_LIB, PERL_SRC
-
- # *Real* information: where did we get these two from? ...
- my $inc_config_dir = dirname($INC{'Config.pm'});
- my $inc_carp_dir = dirname($INC{'Carp.pm'});
-
- unless ($self->{PERL_SRC}){
- foreach my $dir_count (1..8) { # 8 is the VMS limit for nesting
- my $dir = $self->catdir(($Updir) x $dir_count);
-
- if (-f $self->catfile($dir,"config_h.SH") &&
- -f $self->catfile($dir,"perl.h") &&
- -f $self->catfile($dir,"lib","strict.pm")
- ) {
- $self->{PERL_SRC}=$dir ;
- last;
- }
- }
- }
-
- warn "PERL_CORE is set but I can't find your PERL_SRC!\n" if
- $self->{PERL_CORE} and !$self->{PERL_SRC};
-
- if ($self->{PERL_SRC}){
- $self->{PERL_LIB} ||= $self->catdir("$self->{PERL_SRC}","lib");
-
- if (defined $Cross::platform) {
- $self->{PERL_ARCHLIB} =
- $self->catdir("$self->{PERL_SRC}","xlib",$Cross::platform);
- $self->{PERL_INC} =
- $self->catdir("$self->{PERL_SRC}","xlib",$Cross::platform,
- $Is{Win32}?("CORE"):());
- }
- else {
- $self->{PERL_ARCHLIB} = $self->{PERL_LIB};
- $self->{PERL_INC} = ($Is{Win32}) ?
- $self->catdir($self->{PERL_LIB},"CORE") : $self->{PERL_SRC};
- }
-
- # catch a situation that has occurred a few times in the past:
- unless (
- -s $self->catfile($self->{PERL_SRC},'cflags')
- or
- $Is{VMS}
- &&
- -s $self->catfile($self->{PERL_SRC},'perlshr_attr.opt')
- or
- $Is{Win32}
- ){
- warn qq{
-You cannot build extensions below the perl source tree after executing
-a 'make clean' in the perl source tree.
-
-To rebuild extensions distributed with the perl source you should
-simply Configure (to include those extensions) and then build perl as
-normal. After installing perl the source tree can be deleted. It is
-not needed for building extensions by running 'perl Makefile.PL'
-usually without extra arguments.
-
-It is recommended that you unpack and build additional extensions away
-from the perl source tree.
-};
- }
- } else {
- # we should also consider $ENV{PERL5LIB} here
- my $old = $self->{PERL_LIB} || $self->{PERL_ARCHLIB} || $self->{PERL_INC};
- $self->{PERL_LIB} ||= $Config{privlibexp};
- $self->{PERL_ARCHLIB} ||= $Config{archlibexp};
- $self->{PERL_INC} = $self->catdir("$self->{PERL_ARCHLIB}","CORE"); # wild guess for now
- my $perl_h;
-
- if (not -f ($perl_h = $self->catfile($self->{PERL_INC},"perl.h"))
- and not $old){
- # Maybe somebody tries to build an extension with an
- # uninstalled Perl outside of Perl build tree
- my $lib;
- for my $dir (@INC) {
- $lib = $dir, last if -e $self->catfile($dir, "Config.pm");
- }
- if ($lib) {
- # Win32 puts its header files in /perl/src/lib/CORE.
- # Unix leaves them in /perl/src.
- my $inc = $Is{Win32} ? $self->catdir($lib, "CORE" )
- : dirname $lib;
- if (-e $self->catfile($inc, "perl.h")) {
- $self->{PERL_LIB} = $lib;
- $self->{PERL_ARCHLIB} = $lib;
- $self->{PERL_INC} = $inc;
- $self->{UNINSTALLED_PERL} = 1;
- print STDOUT <<EOP;
-... Detected uninstalled Perl. Trying to continue.
-EOP
- }
- }
- }
- }
-
- # We get SITELIBEXP and SITEARCHEXP directly via
- # Get_from_Config. When we are running standard modules, these
- # won't matter, we will set INSTALLDIRS to "perl". Otherwise we
- # set it to "site". I prefer that INSTALLDIRS be set from outside
- # MakeMaker.
- $self->{INSTALLDIRS} ||= "site";
-
- $self->{MAN1EXT} ||= $Config{man1ext};
- $self->{MAN3EXT} ||= $Config{man3ext};
-
- # Get some stuff out of %Config if we haven't yet done so
- print STDOUT "CONFIG must be an array ref\n"
- if ($self->{CONFIG} and ref $self->{CONFIG} ne 'ARRAY');
- $self->{CONFIG} = [] unless (ref $self->{CONFIG});
- push(@{$self->{CONFIG}}, @ExtUtils::MakeMaker::Get_from_Config);
- push(@{$self->{CONFIG}}, 'shellflags') if $Config{shellflags};
- my(%once_only);
- foreach my $m (@{$self->{CONFIG}}){
- next if $once_only{$m};
- print STDOUT "CONFIG key '$m' does not exist in Config.pm\n"
- unless exists $Config{$m};
- $self->{uc $m} ||= $Config{$m};
- $once_only{$m} = 1;
- }
-
-# This is too dangerous:
-# if ($^O eq "next") {
-# $self->{AR} = "libtool";
-# $self->{AR_STATIC_ARGS} = "-o";
-# }
-# But I leave it as a placeholder
-
- $self->{AR_STATIC_ARGS} ||= "cr";
-
- # These should never be needed
- $self->{OBJ_EXT} ||= '.o';
- $self->{LIB_EXT} ||= '.a';
-
- $self->{MAP_TARGET} ||= "perl";
-
- $self->{LIBPERL_A} ||= "libperl$self->{LIB_EXT}";
-
- # make a simple check if we find strict
- warn "Warning: PERL_LIB ($self->{PERL_LIB}) seems not to be a perl library directory
- (strict.pm not found)"
- unless -f $self->catfile("$self->{PERL_LIB}","strict.pm") ||
- $self->{NAME} eq "ExtUtils::MakeMaker";
-}
-
-=item init_others
-
-Initializes EXTRALIBS, BSLOADLIBS, LDLOADLIBS, LIBS, LD_RUN_PATH, LD,
-OBJECT, BOOTDEP, PERLMAINCC, LDFROM, LINKTYPE, SHELL, NOOP,
-FIRST_MAKEFILE, MAKEFILE_OLD, NOECHO, RM_F, RM_RF, TEST_F,
-TOUCH, CP, MV, CHMOD, UMASK_NULL, ECHO, ECHO_N
-
-=cut
-
-sub init_others { # --- Initialize Other Attributes
- my($self) = shift;
-
- $self->{ECHO} ||= 'echo';
- $self->{ECHO_N} ||= 'echo -n';
- $self->{RM_F} ||= "rm -f";
- $self->{RM_RF} ||= "rm -rf";
- $self->{TOUCH} ||= "touch";
- $self->{TEST_F} ||= "test -f";
- $self->{CP} ||= "cp";
- $self->{MV} ||= "mv";
- $self->{CHMOD} ||= "chmod";
- $self->{FALSE} ||= 'false';
- $self->{TRUE} ||= 'true';
-
- $self->{LD} ||= 'ld';
-
- $self->SUPER::init_others(@_);
-
- # After SUPER::init_others so $Config{shell} has a
- # chance to get set.
- $self->{SHELL} ||= '/bin/sh';
-
- return 1;
-}
-
-
-=item init_linker
-
-Unix has no need of special linker flags.
-
-=cut
-
-sub init_linker {
- my($self) = shift;
- $self->{PERL_ARCHIVE} ||= '';
- $self->{PERL_ARCHIVE_AFTER} ||= '';
- $self->{EXPORT_LIST} ||= '';
-}
-
-
-=begin _protected
-
-=item init_lib2arch
-
- $mm->init_lib2arch
-
-=end _protected
-
-=cut
-
-sub init_lib2arch {
- my($self) = shift;
-
- # The user who requests an installation directory explicitly
- # should not have to tell us an architecture installation directory
- # as well. We look if a directory exists that is named after the
- # architecture. If not we take it as a sign that it should be the
- # same as the requested installation directory. Otherwise we take
- # the found one.
- for my $libpair ({l=>"privlib", a=>"archlib"},
- {l=>"sitelib", a=>"sitearch"},
- {l=>"vendorlib", a=>"vendorarch"},
- )
- {
- my $lib = "install$libpair->{l}";
- my $Lib = uc $lib;
- my $Arch = uc "install$libpair->{a}";
- if( $self->{$Lib} && ! $self->{$Arch} ){
- my($ilib) = $Config{$lib};
-
- $self->prefixify($Arch,$ilib,$self->{$Lib});
-
- unless (-d $self->{$Arch}) {
- print STDOUT "Directory $self->{$Arch} not found\n"
- if $Verbose;
- $self->{$Arch} = $self->{$Lib};
- }
- print STDOUT "Defaulting $Arch to $self->{$Arch}\n" if $Verbose;
- }
- }
-}
-
-
-=item init_PERL
-
- $mm->init_PERL;
-
-Called by init_main. Sets up ABSPERL, PERL, FULLPERL and all the
-*PERLRUN* permutations.
-
- PERL is allowed to be miniperl
- FULLPERL must be a complete perl
-
- ABSPERL is PERL converted to an absolute path
-
- *PERLRUN contains everything necessary to run perl, find it's
- libraries, etc...
-
- *PERLRUNINST is *PERLRUN + everything necessary to find the
- modules being built.
-
-=cut
-
-sub init_PERL {
- my($self) = shift;
-
- my @defpath = ();
- foreach my $component ($self->{PERL_SRC}, $self->path(),
- $Config{binexp})
- {
- push @defpath, $component if defined $component;
- }
-
- # Build up a set of file names (not command names).
- my $thisperl = $self->canonpath($^X);
- $thisperl .= $Config{exe_ext} unless
- # VMS might have a file version # at the end
- $Is{VMS} ? $thisperl =~ m/$Config{exe_ext}(;\d+)?$/i
- : $thisperl =~ m/$Config{exe_ext}$/i;
-
- # We need a relative path to perl when in the core.
- $thisperl = $self->abs2rel($thisperl) if $self->{PERL_CORE};
-
- my @perls = ($thisperl);
- push @perls, map { "$_$Config{exe_ext}" }
- ('perl', 'perl5', "perl$Config{version}");
-
- # miniperl has priority over all but the cannonical perl when in the
- # core. Otherwise its a last resort.
- my $miniperl = "miniperl$Config{exe_ext}";
- if( $self->{PERL_CORE} ) {
- splice @perls, 1, 0, $miniperl;
- }
- else {
- push @perls, $miniperl;
- }
-
- $self->{PERL} ||=
- $self->find_perl(5.0, \@perls, \@defpath, $Verbose );
- # don't check if perl is executable, maybe they have decided to
- # supply switches with perl
-
- # When built for debugging, VMS doesn't create perl.exe but ndbgperl.exe.
- my $perl_name = 'perl';
- $perl_name = 'ndbgperl' if $Is{VMS} &&
- defined $Config{usevmsdebug} && $Config{usevmsdebug} eq 'define';
-
- # XXX This logic is flawed. If "miniperl" is anywhere in the path
- # it will get confused. It should be fixed to work only on the filename.
- # Define 'FULLPERL' to be a non-miniperl (used in test: target)
- ($self->{FULLPERL} = $self->{PERL}) =~ s/miniperl/$perl_name/i
- unless $self->{FULLPERL};
-
- # Little hack to get around VMS's find_perl putting "MCR" in front
- # sometimes.
- $self->{ABSPERL} = $self->{PERL};
- my $has_mcr = $self->{ABSPERL} =~ s/^MCR\s*//;
- if( $self->file_name_is_absolute($self->{ABSPERL}) ) {
- $self->{ABSPERL} = '$(PERL)';
- }
- else {
- $self->{ABSPERL} = $self->rel2abs($self->{ABSPERL});
-
- # Quote the perl command if it contains whitespace
- $self->{ABSPERL} = $self->quote_literal($self->{ABSPERL})
- if $self->{ABSPERL} =~ /\s/;
-
- $self->{ABSPERL} = 'MCR '.$self->{ABSPERL} if $has_mcr;
- }
-
- # Are we building the core?
- $self->{PERL_CORE} = $ENV{PERL_CORE} unless exists $self->{PERL_CORE};
- $self->{PERL_CORE} = 0 unless defined $self->{PERL_CORE};
-
- # How do we run perl?
- foreach my $perl (qw(PERL FULLPERL ABSPERL)) {
- my $run = $perl.'RUN';
-
- $self->{$run} = "\$($perl)";
-
- # Make sure perl can find itself before it's installed.
- $self->{$run} .= q{ "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)"}
- if $self->{UNINSTALLED_PERL} || $self->{PERL_CORE};
-
- $self->{$perl.'RUNINST'} =
- sprintf q{$(%sRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"}, $perl;
- }
-
- return 1;
-}
-
-
-=item init_platform
-
-=item platform_constants
-
-Add MM_Unix_VERSION.
-
-=cut
-
-sub init_platform {
- my($self) = shift;
-
- $self->{MM_Unix_VERSION} = $VERSION;
- $self->{PERL_MALLOC_DEF} = '-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc '.
- '-Dfree=Perl_mfree -Drealloc=Perl_realloc '.
- '-Dcalloc=Perl_calloc';
-
-}
-
-sub platform_constants {
- my($self) = shift;
- my $make_frag = '';
-
- foreach my $macro (qw(MM_Unix_VERSION PERL_MALLOC_DEF))
- {
- next unless defined $self->{$macro};
- $make_frag .= "$macro = $self->{$macro}\n";
- }
-
- return $make_frag;
-}
-
-
-=item init_PERM
-
- $mm->init_PERM
-
-Called by init_main. Initializes PERL_*
-
-=cut
-
-sub init_PERM {
- my($self) = shift;
-
- $self->{PERM_DIR} = 755 unless defined $self->{PERM_DIR};
- $self->{PERM_RW} = 644 unless defined $self->{PERM_RW};
- $self->{PERM_RWX} = 755 unless defined $self->{PERM_RWX};
-
- return 1;
-}
-
-
-=item init_xs
-
- $mm->init_xs
-
-Sets up macros having to do with XS code. Currently just INST_STATIC,
-INST_DYNAMIC and INST_BOOT.
-
-=cut
-
-sub init_xs {
- my $self = shift;
-
- if ($self->has_link_code()) {
- $self->{INST_STATIC} =
- $self->catfile('$(INST_ARCHAUTODIR)', '$(BASEEXT)$(LIB_EXT)');
- $self->{INST_DYNAMIC} =
- $self->catfile('$(INST_ARCHAUTODIR)', '$(DLBASE).$(DLEXT)');
- $self->{INST_BOOT} =
- $self->catfile('$(INST_ARCHAUTODIR)', '$(BASEEXT).bs');
- } else {
- $self->{INST_STATIC} = '';
- $self->{INST_DYNAMIC} = '';
- $self->{INST_BOOT} = '';
- }
-}
-
-=item install (o)
-
-Defines the install target.
-
-=cut
-
-sub install {
- my($self, %attribs) = @_;
- my(@m);
-
- push @m, q{
-install :: pure_install doc_install
- $(NOECHO) $(NOOP)
-
-install_perl :: pure_perl_install doc_perl_install
- $(NOECHO) $(NOOP)
-
-install_site :: pure_site_install doc_site_install
- $(NOECHO) $(NOOP)
-
-install_vendor :: pure_vendor_install doc_vendor_install
- $(NOECHO) $(NOOP)
-
-pure_install :: pure_$(INSTALLDIRS)_install
- $(NOECHO) $(NOOP)
-
-doc_install :: doc_$(INSTALLDIRS)_install
- $(NOECHO) $(NOOP)
-
-pure__install : pure_site_install
- $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
-
-doc__install : doc_site_install
- $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
-
-pure_perl_install :: all
- $(NOECHO) $(MOD_INSTALL) \
- read }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
- write }.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
- $(INST_LIB) $(DESTINSTALLPRIVLIB) \
- $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
- $(INST_BIN) $(DESTINSTALLBIN) \
- $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
- $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \
- $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR)
- $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
- }.$self->catdir('$(SITEARCHEXP)','auto','$(FULLEXT)').q{
-
-
-pure_site_install :: all
- $(NOECHO) $(MOD_INSTALL) \
- read }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
- write }.$self->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').q{ \
- $(INST_LIB) $(DESTINSTALLSITELIB) \
- $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \
- $(INST_BIN) $(DESTINSTALLSITEBIN) \
- $(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \
- $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \
- $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR)
- $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
- }.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{
-
-pure_vendor_install :: all
- $(NOECHO) $(MOD_INSTALL) \
- read }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
- write }.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{ \
- $(INST_LIB) $(DESTINSTALLVENDORLIB) \
- $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
- $(INST_BIN) $(DESTINSTALLVENDORBIN) \
- $(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \
- $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
- $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
-
-doc_perl_install :: all
- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- -$(NOECHO) $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" "$(INSTALLPRIVLIB)" \
- LINKTYPE "$(LINKTYPE)" \
- VERSION "$(VERSION)" \
- EXE_FILES "$(EXE_FILES)" \
- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
-
-doc_site_install :: all
- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- -$(NOECHO) $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" "$(INSTALLSITELIB)" \
- LINKTYPE "$(LINKTYPE)" \
- VERSION "$(VERSION)" \
- EXE_FILES "$(EXE_FILES)" \
- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
-
-doc_vendor_install :: all
- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- -$(NOECHO) $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" "$(INSTALLVENDORLIB)" \
- LINKTYPE "$(LINKTYPE)" \
- VERSION "$(VERSION)" \
- EXE_FILES "$(EXE_FILES)" \
- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
-
-};
-
- push @m, q{
-uninstall :: uninstall_from_$(INSTALLDIRS)dirs
- $(NOECHO) $(NOOP)
-
-uninstall_from_perldirs ::
- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{
-
-uninstall_from_sitedirs ::
- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{
-
-uninstall_from_vendordirs ::
- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{
-};
-
- join("", at m);
-}
-
-=item installbin (o)
-
-Defines targets to make and to install EXE_FILES.
-
-=cut
-
-sub installbin {
- my($self) = shift;
-
- return "" unless $self->{EXE_FILES} && ref $self->{EXE_FILES} eq "ARRAY";
- my @exefiles = @{$self->{EXE_FILES}};
- return "" unless @exefiles;
-
- @exefiles = map vmsify($_), @exefiles if $Is{VMS};
-
- my %fromto;
- for my $from (@exefiles) {
- my($path)= $self->catfile('$(INST_SCRIPT)', basename($from));
-
- local($_) = $path; # for backwards compatibility
- my $to = $self->libscan($path);
- print "libscan($from) => '$to'\n" if ($Verbose >=2);
-
- $to = vmsify($to) if $Is{VMS};
- $fromto{$from} = $to;
- }
- my @to = values %fromto;
-
- my @m;
- push(@m, qq{
-EXE_FILES = @exefiles
-
-pure_all :: @to
- \$(NOECHO) \$(NOOP)
-
-realclean ::
-});
-
- # realclean can get rather large.
- push @m, map "\t$_\n", $self->split_command('$(RM_F)', @to);
- push @m, "\n";
-
-
- # A target for each exe file.
- while (my($from,$to) = each %fromto) {
- last unless defined $from;
-
- push @m, sprintf <<'MAKE', $to, $from, $to, $from, $to, $to, $to;
-%s : %s $(FIRST_MAKEFILE) $(INST_SCRIPT)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists
- $(NOECHO) $(RM_F) %s
- $(CP) %s %s
- $(FIXIN) %s
- -$(NOECHO) $(CHMOD) $(PERM_RWX) %s
-
-MAKE
-
- }
-
- join "", @m;
-}
-
-
-=item linkext (o)
-
-Defines the linkext target which in turn defines the LINKTYPE.
-
-=cut
-
-sub linkext {
- my($self, %attribs) = @_;
- # LINKTYPE => static or dynamic or ''
- my($linktype) = defined $attribs{LINKTYPE} ?
- $attribs{LINKTYPE} : '$(LINKTYPE)';
- "
-linkext :: $linktype
- \$(NOECHO) \$(NOOP)
-";
-}
-
-=item lsdir
-
-Takes as arguments a directory name and a regular expression. Returns
-all entries in the directory that match the regular expression.
-
-=cut
-
-sub lsdir {
- my($self) = shift;
- my($dir, $regex) = @_;
- my(@ls);
- my $dh = new DirHandle;
- $dh->open($dir || ".") or return ();
- @ls = $dh->read;
- $dh->close;
- @ls = grep(/$regex/, @ls) if $regex;
- @ls;
-}
-
-=item macro (o)
-
-Simple subroutine to insert the macros defined by the macro attribute
-into the Makefile.
-
-=cut
-
-sub macro {
- my($self,%attribs) = @_;
- my(@m,$key,$val);
- while (($key,$val) = each %attribs){
- last unless defined $key;
- push @m, "$key = $val\n";
- }
- join "", @m;
-}
-
-=item makeaperl (o)
-
-Called by staticmake. Defines how to write the Makefile to produce a
-static new perl.
-
-By default the Makefile produced includes all the static extensions in
-the perl library. (Purified versions of library files, e.g.,
-DynaLoader_pure_p1_c0_032.a are automatically ignored to avoid link errors.)
-
-=cut
-
-sub makeaperl {
- my($self, %attribs) = @_;
- my($makefilename, $searchdirs, $static, $extra, $perlinc, $target, $tmp, $libperl) =
- @attribs{qw(MAKE DIRS STAT EXTRA INCL TARGET TMP LIBPERL)};
- my(@m);
- push @m, "
-# --- MakeMaker makeaperl section ---
-MAP_TARGET = $target
-FULLPERL = $self->{FULLPERL}
-";
- return join '', @m if $self->{PARENT};
-
- my($dir) = join ":", @{$self->{DIR}};
-
- unless ($self->{MAKEAPERL}) {
- push @m, q{
-$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
- $(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@
-
-$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
- $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
- $(NOECHO) $(PERLRUNINST) \
- Makefile.PL DIR=}, $dir, q{ \
- MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
- MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=};
-
- foreach (@ARGV){
- if( /\s/ ){
- s/=(.*)/='$1'/;
- }
- push @m, " \\\n\t\t$_";
- }
-# push @m, map( " \\\n\t\t$_", @ARGV );
- push @m, "\n";
-
- return join '', @m;
- }
-
-
-
- my($cccmd, $linkcmd, $lperl);
-
-
- $cccmd = $self->const_cccmd($libperl);
- $cccmd =~ s/^CCCMD\s*=\s*//;
- $cccmd =~ s/\$\(INC\)/ "-I$self->{PERL_INC}" /;
- $cccmd .= " $Config{cccdlflags}"
- if ($Config{useshrplib} eq 'true');
- $cccmd =~ s/\(CC\)/\(PERLMAINCC\)/;
-
- # The front matter of the linkcommand...
- $linkcmd = join ' ', "\$(CC)",
- grep($_, @Config{qw(ldflags ccdlflags)});
- $linkcmd =~ s/\s+/ /g;
- $linkcmd =~ s,(perl\.exp),\$(PERL_INC)/$1,;
-
- # Which *.a files could we make use of...
- my %static;
- require File::Find;
- File::Find::find(sub {
- return unless m/\Q$self->{LIB_EXT}\E$/;
-
- # Skip perl's libraries.
- return if m/^libperl/ or m/^perl\Q$self->{LIB_EXT}\E$/;
-
- # Skip purified versions of libraries
- # (e.g., DynaLoader_pure_p1_c0_032.a)
- return if m/_pure_\w+_\w+_\w+\.\w+$/ and -f "$File::Find::dir/.pure";
-
- if( exists $self->{INCLUDE_EXT} ){
- my $found = 0;
-
- (my $xx = $File::Find::name) =~ s,.*?/auto/,,s;
- $xx =~ s,/?$_,,;
- $xx =~ s,/,::,g;
-
- # Throw away anything not explicitly marked for inclusion.
- # DynaLoader is implied.
- foreach my $incl ((@{$self->{INCLUDE_EXT}},'DynaLoader')){
- if( $xx eq $incl ){
- $found++;
- last;
- }
- }
- return unless $found;
- }
- elsif( exists $self->{EXCLUDE_EXT} ){
- (my $xx = $File::Find::name) =~ s,.*?/auto/,,s;
- $xx =~ s,/?$_,,;
- $xx =~ s,/,::,g;
-
- # Throw away anything explicitly marked for exclusion
- foreach my $excl (@{$self->{EXCLUDE_EXT}}){
- return if( $xx eq $excl );
- }
- }
-
- # don't include the installed version of this extension. I
- # leave this line here, although it is not necessary anymore:
- # I patched minimod.PL instead, so that Miniperl.pm won't
- # enclude duplicates
-
- # Once the patch to minimod.PL is in the distribution, I can
- # drop it
- return if $File::Find::name =~ m:auto/$self->{FULLEXT}/$self->{BASEEXT}$self->{LIB_EXT}\z:;
- use Cwd 'cwd';
- $static{cwd() . "/" . $_}++;
- }, grep( -d $_, @{$searchdirs || []}) );
-
- # We trust that what has been handed in as argument, will be buildable
- $static = [] unless $static;
- @static{@{$static}} = (1) x @{$static};
-
- $extra = [] unless $extra && ref $extra eq 'ARRAY';
- for (sort keys %static) {
- next unless /\Q$self->{LIB_EXT}\E\z/;
- $_ = dirname($_) . "/extralibs.ld";
- push @$extra, $_;
- }
-
- s/^(.*)/"-I$1"/ for @{$perlinc || []};
-
- $target ||= "perl";
- $tmp ||= ".";
-
-# MAP_STATIC doesn't look into subdirs yet. Once "all" is made and we
-# regenerate the Makefiles, MAP_STATIC and the dependencies for
-# extralibs.all are computed correctly
- push @m, "
-MAP_LINKCMD = $linkcmd
-MAP_PERLINC = @{$perlinc || []}
-MAP_STATIC = ",
-join(" \\\n\t", reverse sort keys %static), "
-
-MAP_PRELIBS = $Config{perllibs} $Config{cryptlib}
-";
-
- if (defined $libperl) {
- ($lperl = $libperl) =~ s/\$\(A\)/$self->{LIB_EXT}/;
- }
- unless ($libperl && -f $lperl) { # Ilya's code...
- my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/CORE";
- $dir = "$self->{PERL_ARCHLIB}/.." if $self->{UNINSTALLED_PERL};
- $libperl ||= "libperl$self->{LIB_EXT}";
- $libperl = "$dir/$libperl";
- $lperl ||= "libperl$self->{LIB_EXT}";
- $lperl = "$dir/$lperl";
-
- if (! -f $libperl and ! -f $lperl) {
- # We did not find a static libperl. Maybe there is a shared one?
- if ($Is{SunOS}) {
- $lperl = $libperl = "$dir/$Config{libperl}";
- # SUNOS ld does not take the full path to a shared library
- $libperl = '' if $Is{SunOS4};
- }
- }
-
- print STDOUT "Warning: $libperl not found
- If you're going to build a static perl binary, make sure perl is installed
- otherwise ignore this warning\n"
- unless (-f $lperl || defined($self->{PERL_SRC}));
- }
-
- # SUNOS ld does not take the full path to a shared library
- my $llibperl = $libperl ? '$(MAP_LIBPERL)' : '-lperl';
-
- push @m, "
-MAP_LIBPERL = $libperl
-LLIBPERL = $llibperl
-";
-
- push @m, '
-$(INST_ARCHAUTODIR)/extralibs.all : $(INST_ARCHAUTODIR)$(DFSEP).exists '.join(" \\\n\t", @$extra).'
- $(NOECHO) $(RM_F) $@
- $(NOECHO) $(TOUCH) $@
-';
-
- foreach my $catfile (@$extra){
- push @m, "\tcat $catfile >> \$\@\n";
- }
-
-push @m, "
-\$(MAP_TARGET) :: $tmp/perlmain\$(OBJ_EXT) \$(MAP_LIBPERL) \$(MAP_STATIC) \$(INST_ARCHAUTODIR)/extralibs.all
- \$(MAP_LINKCMD) -o \$\@ \$(OPTIMIZE) $tmp/perlmain\$(OBJ_EXT) \$(LDFROM) \$(MAP_STATIC) \$(LLIBPERL) `cat \$(INST_ARCHAUTODIR)/extralibs.all` \$(MAP_PRELIBS)
- \$(NOECHO) \$(ECHO) 'To install the new \"\$(MAP_TARGET)\" binary, call'
- \$(NOECHO) \$(ECHO) ' \$(MAKE) \$(USEMAKEFILE) $makefilename inst_perl MAP_TARGET=\$(MAP_TARGET)'
- \$(NOECHO) \$(ECHO) 'To remove the intermediate files say'
- \$(NOECHO) \$(ECHO) ' \$(MAKE) \$(USEMAKEFILE) $makefilename map_clean'
-
-$tmp/perlmain\$(OBJ_EXT): $tmp/perlmain.c
-";
- push @m, "\t".$self->cd($tmp, qq[$cccmd "-I\$(PERL_INC)" perlmain.c])."\n";
-
- push @m, qq{
-$tmp/perlmain.c: $makefilename}, q{
- $(NOECHO) $(ECHO) Writing $@
- $(NOECHO) $(PERL) $(MAP_PERLINC) "-MExtUtils::Miniperl" \\
- -e "writemain(grep s#.*/auto/##s, split(q| |, q|$(MAP_STATIC)|))" > $@t && $(MV) $@t $@
-
-};
- push @m, "\t", q{$(NOECHO) $(PERL) $(INSTALLSCRIPT)/fixpmain
-} if (defined (&Dos::UseLFN) && Dos::UseLFN()==0);
-
-
- push @m, q{
-doc_inst_perl :
- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- -$(NOECHO) $(DOC_INSTALL) \
- "Perl binary" "$(MAP_TARGET)" \
- MAP_STATIC "$(MAP_STATIC)" \
- MAP_EXTRA "`cat $(INST_ARCHAUTODIR)/extralibs.all`" \
- MAP_LIBPERL "$(MAP_LIBPERL)" \
- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
-
-};
-
- push @m, q{
-inst_perl : pure_inst_perl doc_inst_perl
-
-pure_inst_perl : $(MAP_TARGET)
- }.$self->{CP}.q{ $(MAP_TARGET) }.$self->catfile('$(DESTINSTALLBIN)','$(MAP_TARGET)').q{
-
-clean :: map_clean
-
-map_clean :
- }.$self->{RM_F}.qq{ $tmp/perlmain\$(OBJ_EXT) $tmp/perlmain.c \$(MAP_TARGET) $makefilename \$(INST_ARCHAUTODIR)/extralibs.all
-};
-
- join '', @m;
-}
-
-=item makefile (o)
-
-Defines how to rewrite the Makefile.
-
-=cut
-
-sub makefile {
- my($self) = shift;
- my $m;
- # We do not know what target was originally specified so we
- # must force a manual rerun to be sure. But as it should only
- # happen very rarely it is not a significant problem.
- $m = '
-$(OBJECT) : $(FIRST_MAKEFILE)
-
-' if $self->{OBJECT};
-
- my $newer_than_target = $Is{VMS} ? '$(MMS$SOURCE_LIST)' : '$?';
- my $mpl_args = join " ", map qq["$_"], @ARGV;
-
- $m .= sprintf <<'MAKE_FRAG', $newer_than_target, $mpl_args;
-# We take a very conservative approach here, but it's worth it.
-# We move Makefile to Makefile.old here to avoid gnu make looping.
-$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
- $(NOECHO) $(ECHO) "Makefile out-of-date with respect to %s"
- $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
- -$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
- -$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
- - $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
- $(PERLRUN) Makefile.PL %s
- $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
- $(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
- $(FALSE)
-
-MAKE_FRAG
-
- return $m;
-}
-
-
-=item maybe_command
-
-Returns true, if the argument is likely to be a command.
-
-=cut
-
-sub maybe_command {
- my($self,$file) = @_;
- return $file if -x $file && ! -d $file;
- return;
-}
-
-
-=item needs_linking (o)
-
-Does this module need linking? Looks into subdirectory objects (see
-also has_link_code())
-
-=cut
-
-sub needs_linking {
- my($self) = shift;
-
- my $caller = (caller(0))[3];
- confess("needs_linking called too early") if
- $caller =~ /^ExtUtils::MakeMaker::/;
- return $self->{NEEDS_LINKING} if defined $self->{NEEDS_LINKING};
- if ($self->has_link_code or $self->{MAKEAPERL}){
- $self->{NEEDS_LINKING} = 1;
- return 1;
- }
- foreach my $child (keys %{$self->{CHILDREN}}) {
- if ($self->{CHILDREN}->{$child}->needs_linking) {
- $self->{NEEDS_LINKING} = 1;
- return 1;
- }
- }
- return $self->{NEEDS_LINKING} = 0;
-}
-
-
-=item parse_abstract
-
-parse a file and return what you think is the ABSTRACT
-
-=cut
-
-sub parse_abstract {
- my($self,$parsefile) = @_;
- my $result;
-
- local $/ = "\n";
- open(my $fh, '<', $parsefile) or die "Could not open '$parsefile': $!";
- my $inpod = 0;
- my $package = $self->{DISTNAME};
- $package =~ s/-/::/g;
- while (<$fh>) {
- $inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod;
- next if !$inpod;
- chop;
- next unless /^($package\s-\s)(.*)/;
- $result = $2;
- last;
- }
- close $fh;
-
- return $result;
-}
-
-=item parse_version
-
- my $version = MM->parse_version($file);
-
-Parse a $file and return what $VERSION is set to by the first assignment.
-It will return the string "undef" if it can't figure out what $VERSION
-is. $VERSION should be for all to see, so C<our $VERSION> or plain $VERSION
-are okay, but C<my $VERSION> is not.
-
-parse_version() will try to C<use version> before checking for
-C<$VERSION> so the following will work.
-
- $VERSION = qv(1.2.3);
-
-=cut
-
-sub parse_version {
- my($self,$parsefile) = @_;
- my $result;
-
- local $/ = "\n";
- local $_;
- open(my $fh, '<', $parsefile) or die "Could not open '$parsefile': $!";
- my $inpod = 0;
- while (<$fh>) {
- $inpod = /^=(?!cut)/ ? 1 : /^=cut/ ? 0 : $inpod;
- next if $inpod || /^\s*#/;
- chop;
- next if /^\s*(if|unless)/;
- next unless m{(?<!\\) ([\$*]) (([\w\:\']*) \bVERSION)\b .* =}x;
- my $eval = qq{
- package ExtUtils::MakeMaker::_version;
- no strict;
- BEGIN { eval {
- # Ensure any version() routine which might have leaked
- # into this package has been deleted. Interferes with
- # version->import()
- undef *version;
- require version;
- "version"->import;
- } }
-
- local $1$2;
- \$$2=undef;
- do {
- $_
- };
- \$$2;
- };
- local $^W = 0;
- $result = eval($eval); ## no critic
- warn "Could not eval '$eval' in $parsefile: $@" if $@;
- last if defined $result;
- }
- close $fh;
-
- $result = "undef" unless defined $result;
- return $result;
-}
-
-
-=item pasthru (o)
-
-Defines the string that is passed to recursive make calls in
-subdirectories.
-
-=cut
-
-sub pasthru {
- my($self) = shift;
- my(@m);
-
- my(@pasthru);
- my($sep) = $Is{VMS} ? ',' : '';
- $sep .= "\\\n\t";
-
- foreach my $key (qw(LIB LIBPERL_A LINKTYPE OPTIMIZE
- PREFIX INSTALL_BASE)
- )
- {
- next unless defined $self->{$key};
- push @pasthru, "$key=\"\$($key)\"";
- }
-
- foreach my $key (qw(DEFINE INC)) {
- next unless defined $self->{$key};
- push @pasthru, "PASTHRU_$key=\"\$(PASTHRU_$key)\"";
- }
-
- push @m, "\nPASTHRU = ", join ($sep, @pasthru), "\n";
- join "", @m;
-}
-
-=item perl_script
-
-Takes one argument, a file name, and returns the file name, if the
-argument is likely to be a perl script. On MM_Unix this is true for
-any ordinary, readable file.
-
-=cut
-
-sub perl_script {
- my($self,$file) = @_;
- return $file if -r $file && -f _;
- return;
-}
-
-=item perldepend (o)
-
-Defines the dependency from all *.h files that come with the perl
-distribution.
-
-=cut
-
-sub perldepend {
- my($self) = shift;
- my(@m);
-
- my $make_config = $self->cd('$(PERL_SRC)', '$(MAKE) lib/Config.pm');
-
- push @m, sprintf <<'MAKE_FRAG', $make_config if $self->{PERL_SRC};
-# Check for unpropogated config.sh changes. Should never happen.
-# We do NOT just update config.h because that is not sufficient.
-# An out of date config.h is not fatal but complains loudly!
-$(PERL_INC)/config.h: $(PERL_SRC)/config.sh
- -$(NOECHO) $(ECHO) "Warning: $(PERL_INC)/config.h out of date with $(PERL_SRC)/config.sh"; $(FALSE)
-
-$(PERL_ARCHLIB)/Config.pm: $(PERL_SRC)/config.sh
- $(NOECHO) $(ECHO) "Warning: $(PERL_ARCHLIB)/Config.pm may be out of date with $(PERL_SRC)/config.sh"
- %s
-MAKE_FRAG
-
- return join "", @m unless $self->needs_linking;
-
- push @m, q{
-PERL_HDRS = \
- $(PERL_INC)/EXTERN.h \
- $(PERL_INC)/INTERN.h \
- $(PERL_INC)/XSUB.h \
- $(PERL_INC)/av.h \
- $(PERL_INC)/cc_runtime.h \
- $(PERL_INC)/config.h \
- $(PERL_INC)/cop.h \
- $(PERL_INC)/cv.h \
- $(PERL_INC)/dosish.h \
- $(PERL_INC)/embed.h \
- $(PERL_INC)/embedvar.h \
- $(PERL_INC)/fakethr.h \
- $(PERL_INC)/form.h \
- $(PERL_INC)/gv.h \
- $(PERL_INC)/handy.h \
- $(PERL_INC)/hv.h \
- $(PERL_INC)/intrpvar.h \
- $(PERL_INC)/iperlsys.h \
- $(PERL_INC)/keywords.h \
- $(PERL_INC)/mg.h \
- $(PERL_INC)/nostdio.h \
- $(PERL_INC)/op.h \
- $(PERL_INC)/opcode.h \
- $(PERL_INC)/patchlevel.h \
- $(PERL_INC)/perl.h \
- $(PERL_INC)/perlio.h \
- $(PERL_INC)/perlsdio.h \
- $(PERL_INC)/perlsfio.h \
- $(PERL_INC)/perlvars.h \
- $(PERL_INC)/perly.h \
- $(PERL_INC)/pp.h \
- $(PERL_INC)/pp_proto.h \
- $(PERL_INC)/proto.h \
- $(PERL_INC)/regcomp.h \
- $(PERL_INC)/regexp.h \
- $(PERL_INC)/regnodes.h \
- $(PERL_INC)/scope.h \
- $(PERL_INC)/sv.h \
- $(PERL_INC)/thread.h \
- $(PERL_INC)/unixish.h \
- $(PERL_INC)/util.h
-
-$(OBJECT) : $(PERL_HDRS)
-} if $self->{OBJECT};
-
- push @m, join(" ", values %{$self->{XS}})." : \$(XSUBPPDEPS)\n" if %{$self->{XS}};
-
- join "\n", @m;
-}
-
-
-=item pm_to_blib
-
-Defines target that copies all files in the hash PM to their
-destination and autosplits them. See L<ExtUtils::Install/DESCRIPTION>
-
-=cut
-
-sub pm_to_blib {
- my $self = shift;
- my($autodir) = $self->catdir('$(INST_LIB)','auto');
- my $r = q{
-pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
-};
-
- # VMS will swallow '' and PM_FILTER is often empty. So use q[]
- my $pm_to_blib = $self->oneliner(<<CODE, ['-MExtUtils::Install']);
-pm_to_blib({\@ARGV}, '$autodir', q[\$(PM_FILTER)], '\$(PERM_DIR)')
-CODE
-
- my @cmds = $self->split_command($pm_to_blib, %{$self->{PM}});
-
- $r .= join '', map { "\t\$(NOECHO) $_\n" } @cmds;
- $r .= qq{\t\$(NOECHO) \$(TOUCH) pm_to_blib\n};
-
- return $r;
-}
-
-=item post_constants (o)
-
-Returns an empty string per default. Dedicated to overrides from
-within Makefile.PL after all constants have been defined.
-
-=cut
-
-sub post_constants{
- "";
-}
-
-=item post_initialize (o)
-
-Returns an empty string per default. Used in Makefile.PLs to add some
-chunk of text to the Makefile after the object is initialized.
-
-=cut
-
-sub post_initialize {
- "";
-}
-
-=item postamble (o)
-
-Returns an empty string. Can be used in Makefile.PLs to write some
-text to the Makefile at the end.
-
-=cut
-
-sub postamble {
- "";
-}
-
-# transform dot-separated version string into comma-separated quadruple
-# examples: '1.2.3.4.5' => '1,2,3,4'
-# '1.2.3' => '1,2,3,0'
-sub _ppd_version {
- my ($self, $string) = @_;
- return join ',', ((split /\./, $string), (0) x 4)[0..3];
-}
-
-=item ppd
-
-Defines target that creates a PPD (Perl Package Description) file
-for a binary distribution.
-
-=cut
-
-sub ppd {
- my($self) = @_;
-
- my $abstract = $self->{ABSTRACT} || '';
- $abstract =~ s/\n/\\n/sg;
- $abstract =~ s/</</g;
- $abstract =~ s/>/>/g;
-
- my $author = $self->{AUTHOR} || '';
- $author =~ s/</</g;
- $author =~ s/>/>/g;
-
- my $ppd_xml = sprintf <<'PPD_HTML', $self->{VERSION}, $abstract, $author;
-<SOFTPKG NAME="$(DISTNAME)" VERSION="%s">
- <ABSTRACT>%s</ABSTRACT>
- <AUTHOR>%s</AUTHOR>
-PPD_HTML
-
- $ppd_xml .= " <IMPLEMENTATION>\n";
- if ( $self->{MIN_PERL_VERSION} ) {
- my $min_perl_version = $self->_ppd_version($self->{MIN_PERL_VERSION});
- $ppd_xml .= sprintf <<'PPD_PERLVERS', $min_perl_version;
- <PERLCORE VERSION="%s" />
-PPD_PERLVERS
-
- }
-
- # Don't add "perl" to requires. perl dependencies are
- # handles by ARCHITECTURE.
- my %prereqs = %{$self->{PREREQ_PM}};
- delete $prereqs{perl};
-
- # Build up REQUIRE
- foreach my $prereq (sort keys %prereqs) {
- my $name = $prereq;
- $name .= '::' unless $name =~ /::/;
- my $version = $prereqs{$prereq}+0; # force numification
-
- my %attrs = ( NAME => $name );
- $attrs{VERSION} = $version if $version;
- my $attrs = join " ", map { qq[$_="$attrs{$_}"] } keys %attrs;
- $ppd_xml .= qq( <REQUIRE $attrs />\n);
- }
-
- my $archname = $Config{archname};
- if ($] >= 5.008) {
- # archname did not change from 5.6 to 5.8, but those versions may
- # not be not binary compatible so now we append the part of the
- # version that changes when binary compatibility may change
- $archname .= "-$Config{PERL_REVISION}.$Config{PERL_VERSION}";
- }
- $ppd_xml .= sprintf <<'PPD_OUT', $archname;
- <ARCHITECTURE NAME="%s" />
-PPD_OUT
-
- if ($self->{PPM_INSTALL_SCRIPT}) {
- if ($self->{PPM_INSTALL_EXEC}) {
- $ppd_xml .= sprintf qq{ <INSTALL EXEC="%s">%s</INSTALL>\n},
- $self->{PPM_INSTALL_EXEC}, $self->{PPM_INSTALL_SCRIPT};
- }
- else {
- $ppd_xml .= sprintf qq{ <INSTALL>%s</INSTALL>\n},
- $self->{PPM_INSTALL_SCRIPT};
- }
- }
-
- my ($bin_location) = $self->{BINARY_LOCATION} || '';
- $bin_location =~ s/\\/\\\\/g;
-
- $ppd_xml .= sprintf <<'PPD_XML', $bin_location;
- <CODEBASE HREF="%s" />
- </IMPLEMENTATION>
-</SOFTPKG>
-PPD_XML
-
- my @ppd_cmds = $self->echo($ppd_xml, '$(DISTNAME).ppd');
-
- return sprintf <<'PPD_OUT', join "\n\t", @ppd_cmds;
-# Creates a PPD (Perl Package Description) for a binary distribution.
-ppd :
- %s
-PPD_OUT
-
-}
-
-=item prefixify
-
- $MM->prefixify($var, $prefix, $new_prefix, $default);
-
-Using either $MM->{uc $var} || $Config{lc $var}, it will attempt to
-replace it's $prefix with a $new_prefix.
-
-Should the $prefix fail to match I<AND> a PREFIX was given as an
-argument to WriteMakefile() it will set it to the $new_prefix +
-$default. This is for systems whose file layouts don't neatly fit into
-our ideas of prefixes.
-
-This is for heuristics which attempt to create directory structures
-that mirror those of the installed perl.
-
-For example:
-
- $MM->prefixify('installman1dir', '/usr', '/home/foo', 'man/man1');
-
-this will attempt to remove '/usr' from the front of the
-$MM->{INSTALLMAN1DIR} path (initializing it to $Config{installman1dir}
-if necessary) and replace it with '/home/foo'. If this fails it will
-simply use '/home/foo/man/man1'.
-
-=cut
-
-sub prefixify {
- my($self,$var,$sprefix,$rprefix,$default) = @_;
-
- my $path = $self->{uc $var} ||
- $Config_Override{lc $var} || $Config{lc $var} || '';
-
- $rprefix .= '/' if $sprefix =~ m|/$|;
-
- print STDERR " prefixify $var => $path\n" if $Verbose >= 2;
- print STDERR " from $sprefix to $rprefix\n" if $Verbose >= 2;
-
- if( $self->{ARGS}{PREFIX} &&
- $path !~ s{^\Q$sprefix\E\b}{$rprefix}s )
- {
-
- print STDERR " cannot prefix, using default.\n" if $Verbose >= 2;
- print STDERR " no default!\n" if !$default && $Verbose >= 2;
-
- $path = $self->catdir($rprefix, $default) if $default;
- }
-
- print " now $path\n" if $Verbose >= 2;
- return $self->{uc $var} = $path;
-}
-
-
-=item processPL (o)
-
-Defines targets to run *.PL files.
-
-=cut
-
-sub processPL {
- my $self = shift;
- my $pl_files = $self->{PL_FILES};
-
- return "" unless $pl_files;
-
- my $m = '';
- foreach my $plfile (sort keys %$pl_files) {
- my $list = ref($pl_files->{$plfile})
- ? $pl_files->{$plfile}
- : [$pl_files->{$plfile}];
-
- foreach my $target (@$list) {
- if( $Is{VMS} ) {
- $plfile = vmsify($self->eliminate_macros($plfile));
- $target = vmsify($self->eliminate_macros($target));
- }
-
- # Normally a .PL file runs AFTER pm_to_blib so it can have
- # blib in its @INC and load the just built modules. BUT if
- # the generated module is something in $(TO_INST_PM) which
- # pm_to_blib depends on then it can't depend on pm_to_blib
- # else we have a dependency loop.
- my $pm_dep;
- my $perlrun;
- if( defined $self->{PM}{$target} ) {
- $pm_dep = '';
- $perlrun = 'PERLRUN';
- }
- else {
- $pm_dep = 'pm_to_blib';
- $perlrun = 'PERLRUNINST';
- }
-
- $m .= <<MAKE_FRAG;
-
-all :: $target
- \$(NOECHO) \$(NOOP)
-
-$target :: $plfile $pm_dep
- \$($perlrun) $plfile $target
-MAKE_FRAG
-
- }
- }
-
- return $m;
-}
-
-=item quote_paren
-
-Backslashes parentheses C<()> in command line arguments.
-Doesn't handle recursive Makefile C<$(...)> constructs,
-but handles simple ones.
-
-=cut
-
-sub quote_paren {
- my $arg = shift;
- $arg =~ s{\$\((.+?)\)}{\$\\\\($1\\\\)}g; # protect $(...)
- $arg =~ s{(?<!\\)([()])}{\\$1}g; # quote unprotected
- $arg =~ s{\$\\\\\((.+?)\\\\\)}{\$($1)}g; # unprotect $(...)
- return $arg;
-}
-
-=item replace_manpage_separator
-
- my $man_name = $MM->replace_manpage_separator($file_path);
-
-Takes the name of a package, which may be a nested package, in the
-form 'Foo/Bar.pm' and replaces the slash with C<::> or something else
-safe for a man page file name. Returns the replacement.
-
-=cut
-
-sub replace_manpage_separator {
- my($self,$man) = @_;
-
- $man =~ s,/+,::,g;
- return $man;
-}
-
-
-=item cd
-
-=cut
-
-sub cd {
- my($self, $dir, @cmds) = @_;
-
- # No leading tab and no trailing newline makes for easier embedding
- my $make_frag = join "\n\t", map { "cd $dir && $_" } @cmds;
-
- return $make_frag;
-}
-
-=item oneliner
-
-=cut
-
-sub oneliner {
- my($self, $cmd, $switches) = @_;
- $switches = [] unless defined $switches;
-
- # Strip leading and trailing newlines
- $cmd =~ s{^\n+}{};
- $cmd =~ s{\n+$}{};
-
- my @cmds = split /\n/, $cmd;
- $cmd = join " \n\t -e ", map $self->quote_literal($_), @cmds;
- $cmd = $self->escape_newlines($cmd);
-
- $switches = join ' ', @$switches;
-
- return qq{\$(ABSPERLRUN) $switches -e $cmd --};
-}
-
-
-=item quote_literal
-
-=cut
-
-sub quote_literal {
- my($self, $text) = @_;
-
- # I think all we have to quote is single quotes and I think
- # this is a safe way to do it.
- $text =~ s{'}{'\\''}g;
-
- return "'$text'";
-}
-
-
-=item escape_newlines
-
-=cut
-
-sub escape_newlines {
- my($self, $text) = @_;
-
- $text =~ s{\n}{\\\n}g;
-
- return $text;
-}
-
-
-=item max_exec_len
-
-Using POSIX::ARG_MAX. Otherwise falling back to 4096.
-
-=cut
-
-sub max_exec_len {
- my $self = shift;
-
- if (!defined $self->{_MAX_EXEC_LEN}) {
- if (my $arg_max = eval { require POSIX; &POSIX::ARG_MAX }) {
- $self->{_MAX_EXEC_LEN} = $arg_max;
- }
- else { # POSIX minimum exec size
- $self->{_MAX_EXEC_LEN} = 4096;
- }
- }
-
- return $self->{_MAX_EXEC_LEN};
-}
-
-
-=item static (o)
-
-Defines the static target.
-
-=cut
-
-sub static {
-# --- Static Loading Sections ---
-
- my($self) = shift;
- '
-## $(INST_PM) has been moved to the all: target.
-## It remains here for awhile to allow for old usage: "make static"
-static :: $(FIRST_MAKEFILE) $(INST_STATIC)
- $(NOECHO) $(NOOP)
-';
-}
-
-=item static_lib (o)
-
-Defines how to produce the *.a (or equivalent) files.
-
-=cut
-
-sub static_lib {
- my($self) = @_;
- return '' unless $self->has_link_code;
-
- my(@m);
- push(@m, <<'END');
-
-$(INST_STATIC) : $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists
- $(RM_RF) $@
-END
-
- # If this extension has its own library (eg SDBM_File)
- # then copy that to $(INST_STATIC) and add $(OBJECT) into it.
- push(@m, <<'MAKE_FRAG') if $self->{MYEXTLIB};
- $(CP) $(MYEXTLIB) $@
-MAKE_FRAG
-
- my $ar;
- if (exists $self->{FULL_AR} && -x $self->{FULL_AR}) {
- # Prefer the absolute pathed ar if available so that PATH
- # doesn't confuse us. Perl itself is built with the full_ar.
- $ar = 'FULL_AR';
- } else {
- $ar = 'AR';
- }
- push @m, sprintf <<'MAKE_FRAG', $ar;
- $(%s) $(AR_STATIC_ARGS) $@ $(OBJECT) && $(RANLIB) $@
- $(CHMOD) $(PERM_RWX) $@
- $(NOECHO) $(ECHO) "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)/extralibs.ld
-MAKE_FRAG
-
- # Old mechanism - still available:
- push @m, <<'MAKE_FRAG' if $self->{PERL_SRC} && $self->{EXTRALIBS};
- $(NOECHO) $(ECHO) "$(EXTRALIBS)" >> $(PERL_SRC)/ext.libs
-MAKE_FRAG
-
- join('', @m);
-}
-
-=item staticmake (o)
-
-Calls makeaperl.
-
-=cut
-
-sub staticmake {
- my($self, %attribs) = @_;
- my(@static);
-
- my(@searchdirs)=($self->{PERL_ARCHLIB}, $self->{SITEARCHEXP}, $self->{INST_ARCHLIB});
-
- # And as it's not yet built, we add the current extension
- # but only if it has some C code (or XS code, which implies C code)
- if (@{$self->{C}}) {
- @static = $self->catfile($self->{INST_ARCHLIB},
- "auto",
- $self->{FULLEXT},
- "$self->{BASEEXT}$self->{LIB_EXT}"
- );
- }
-
- # Either we determine now, which libraries we will produce in the
- # subdirectories or we do it at runtime of the make.
-
- # We could ask all subdir objects, but I cannot imagine, why it
- # would be necessary.
-
- # Instead we determine all libraries for the new perl at
- # runtime.
- my(@perlinc) = ($self->{INST_ARCHLIB}, $self->{INST_LIB}, $self->{PERL_ARCHLIB}, $self->{PERL_LIB});
-
- $self->makeaperl(MAKE => $self->{MAKEFILE},
- DIRS => \@searchdirs,
- STAT => \@static,
- INCL => \@perlinc,
- TARGET => $self->{MAP_TARGET},
- TMP => "",
- LIBPERL => $self->{LIBPERL_A}
- );
-}
-
-=item subdir_x (o)
-
-Helper subroutine for subdirs
-
-=cut
-
-sub subdir_x {
- my($self, $subdir) = @_;
-
- my $subdir_cmd = $self->cd($subdir,
- '$(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) all $(PASTHRU)'
- );
- return sprintf <<'EOT', $subdir_cmd;
-
-subdirs ::
- $(NOECHO) %s
-EOT
-
-}
-
-=item subdirs (o)
-
-Defines targets to process subdirectories.
-
-=cut
-
-sub subdirs {
-# --- Sub-directory Sections ---
- my($self) = shift;
- my(@m);
- # This method provides a mechanism to automatically deal with
- # subdirectories containing further Makefile.PL scripts.
- # It calls the subdir_x() method for each subdirectory.
- foreach my $dir (@{$self->{DIR}}){
- push(@m, $self->subdir_x($dir));
-#### print "Including $dir subdirectory\n";
- }
- if (@m){
- unshift(@m, "
-# The default clean, realclean and test targets in this Makefile
-# have automatically been given entries for each subdir.
-
-");
- } else {
- push(@m, "\n# none")
- }
- join('', at m);
-}
-
-=item test (o)
-
-Defines the test targets.
-
-=cut
-
-sub test {
-# --- Test and Installation Sections ---
-
- my($self, %attribs) = @_;
- my $tests = $attribs{TESTS} || '';
- if (!$tests && -d 't') {
- $tests = $self->find_tests;
- }
- # note: 'test.pl' name is also hardcoded in init_dirscan()
- my(@m);
- push(@m,"
-TEST_VERBOSE=0
-TEST_TYPE=test_\$(LINKTYPE)
-TEST_FILE = test.pl
-TEST_FILES = $tests
-TESTDB_SW = -d
-
-testdb :: testdb_\$(LINKTYPE)
-
-test :: \$(TEST_TYPE) subdirs-test
-
-subdirs-test ::
- \$(NOECHO) \$(NOOP)
-
-");
-
- foreach my $dir (@{ $self->{DIR} }) {
- my $test = $self->cd($dir, '$(MAKE) test $(PASTHRU)');
-
- push @m, <<END
-subdirs-test ::
- \$(NOECHO) $test
-
-END
- }
-
- push(@m, "\t\$(NOECHO) \$(ECHO) 'No tests defined for \$(NAME) extension.'\n")
- unless $tests or -f "test.pl" or @{$self->{DIR}};
- push(@m, "\n");
-
- push(@m, "test_dynamic :: pure_all\n");
- push(@m, $self->test_via_harness('$(FULLPERLRUN)', '$(TEST_FILES)'))
- if $tests;
- push(@m, $self->test_via_script('$(FULLPERLRUN)', '$(TEST_FILE)'))
- if -f "test.pl";
- push(@m, "\n");
-
- push(@m, "testdb_dynamic :: pure_all\n");
- push(@m, $self->test_via_script('$(FULLPERLRUN) $(TESTDB_SW)',
- '$(TEST_FILE)'));
- push(@m, "\n");
-
- # Occasionally we may face this degenerate target:
- push @m, "test_ : test_dynamic\n\n";
-
- if ($self->needs_linking()) {
- push(@m, "test_static :: pure_all \$(MAP_TARGET)\n");
- push(@m, $self->test_via_harness('./$(MAP_TARGET)', '$(TEST_FILES)')) if $tests;
- push(@m, $self->test_via_script('./$(MAP_TARGET)', '$(TEST_FILE)')) if -f "test.pl";
- push(@m, "\n");
- push(@m, "testdb_static :: pure_all \$(MAP_TARGET)\n");
- push(@m, $self->test_via_script('./$(MAP_TARGET) $(TESTDB_SW)', '$(TEST_FILE)'));
- push(@m, "\n");
- } else {
- push @m, "test_static :: test_dynamic\n";
- push @m, "testdb_static :: testdb_dynamic\n";
- }
- join("", @m);
-}
-
-=item test_via_harness (override)
-
-For some reason which I forget, Unix machines like to have
-PERL_DL_NONLAZY set for tests.
-
-=cut
-
-sub test_via_harness {
- my($self, $perl, $tests) = @_;
- return $self->SUPER::test_via_harness("PERL_DL_NONLAZY=1 $perl", $tests);
-}
-
-=item test_via_script (override)
-
-Again, the PERL_DL_NONLAZY thing.
-
-=cut
-
-sub test_via_script {
- my($self, $perl, $script) = @_;
- return $self->SUPER::test_via_script("PERL_DL_NONLAZY=1 $perl", $script);
-}
-
-
-=item tool_xsubpp (o)
-
-Determines typemaps, xsubpp version, prototype behaviour.
-
-=cut
-
-sub tool_xsubpp {
- my($self) = shift;
- return "" unless $self->needs_linking;
-
- my $xsdir;
- my @xsubpp_dirs = @INC;
-
- # Make sure we pick up the new xsubpp if we're building perl.
- unshift @xsubpp_dirs, $self->{PERL_LIB} if $self->{PERL_CORE};
-
- foreach my $dir (@xsubpp_dirs) {
- $xsdir = $self->catdir($dir, 'ExtUtils');
- if( -r $self->catfile($xsdir, "xsubpp") ) {
- last;
- }
- }
-
- my $tmdir = File::Spec->catdir($self->{PERL_LIB},"ExtUtils");
- my(@tmdeps) = $self->catfile($tmdir,'typemap');
- if( $self->{TYPEMAPS} ){
- foreach my $typemap (@{$self->{TYPEMAPS}}){
- if( ! -f $typemap ) {
- warn "Typemap $typemap not found.\n";
- }
- else {
- push(@tmdeps, $typemap);
- }
- }
- }
- push(@tmdeps, "typemap") if -f "typemap";
- my(@tmargs) = map("-typemap $_", @tmdeps);
- if( exists $self->{XSOPT} ){
- unshift( @tmargs, $self->{XSOPT} );
- }
-
- if ($Is{VMS} &&
- $Config{'ldflags'} &&
- $Config{'ldflags'} =~ m!/Debug!i &&
- (!exists($self->{XSOPT}) || $self->{XSOPT} !~ /linenumbers/)
- )
- {
- unshift(@tmargs,'-nolinenumbers');
- }
-
-
- $self->{XSPROTOARG} = "" unless defined $self->{XSPROTOARG};
-
- return qq{
-XSUBPPDIR = $xsdir
-XSUBPP = \$(XSUBPPDIR)\$(DFSEP)xsubpp
-XSUBPPRUN = \$(PERLRUN) \$(XSUBPP)
-XSPROTOARG = $self->{XSPROTOARG}
-XSUBPPDEPS = @tmdeps \$(XSUBPP)
-XSUBPPARGS = @tmargs
-XSUBPP_EXTRA_ARGS =
-};
-};
-
-
-=item all_target
-
-Build man pages, too
-
-=cut
-
-sub all_target {
- my $self = shift;
-
- return <<'MAKE_EXT';
-all :: pure_all manifypods
- $(NOECHO) $(NOOP)
-MAKE_EXT
-}
-
-=item top_targets (o)
-
-Defines the targets all, subdirs, config, and O_FILES
-
-=cut
-
-sub top_targets {
-# --- Target Sections ---
-
- my($self) = shift;
- my(@m);
-
- push @m, $self->all_target, "\n" unless $self->{SKIPHASH}{'all'};
-
- push @m, '
-pure_all :: config pm_to_blib subdirs linkext
- $(NOECHO) $(NOOP)
-
-subdirs :: $(MYEXTLIB)
- $(NOECHO) $(NOOP)
-
-config :: $(FIRST_MAKEFILE) blibdirs
- $(NOECHO) $(NOOP)
-';
-
- push @m, '
-$(O_FILES): $(H_FILES)
-' if @{$self->{O_FILES} || []} && @{$self->{H} || []};
-
- push @m, q{
-help :
- perldoc ExtUtils::MakeMaker
-};
-
- join('', at m);
-}
-
-=item writedoc
-
-Obsolete, deprecated method. Not used since Version 5.21.
-
-=cut
-
-sub writedoc {
-# --- perllocal.pod section ---
- my($self,$what,$name, at attribs)=@_;
- my $time = localtime;
- print "=head2 $time: $what C<$name>\n\n=over 4\n\n=item *\n\n";
- print join "\n\n=item *\n\n", map("C<$_>", at attribs);
- print "\n\n=back\n\n";
-}
-
-=item xs_c (o)
-
-Defines the suffix rules to compile XS files to C.
-
-=cut
-
-sub xs_c {
- my($self) = shift;
- return '' unless $self->needs_linking();
- '
-.xs.c:
- $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $(XSUBPP_EXTRA_ARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
-';
-}
-
-=item xs_cpp (o)
-
-Defines the suffix rules to compile XS files to C++.
-
-=cut
-
-sub xs_cpp {
- my($self) = shift;
- return '' unless $self->needs_linking();
- '
-.xs.cpp:
- $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.cpp
-';
-}
-
-=item xs_o (o)
-
-Defines suffix rules to go from XS to object files directly. This is
-only intended for broken make implementations.
-
-=cut
-
-sub xs_o { # many makes are too dumb to use xs_c then c_o
- my($self) = shift;
- return '' unless $self->needs_linking();
- '
-.xs$(OBJ_EXT):
- $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
- $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
-';
-}
-
-
-1;
-
-=back
-
-=head1 SEE ALSO
-
-L<ExtUtils::MakeMaker>
-
-=cut
-
-__END__
Deleted: vendor/perl/dist/lib/ExtUtils/MM_VMS.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_VMS.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_VMS.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1994 +0,0 @@
-package ExtUtils::MM_VMS;
-
-use strict;
-
-use ExtUtils::MakeMaker::Config;
-require Exporter;
-
-BEGIN {
- # so we can compile the thing on non-VMS platforms.
- if( $^O eq 'VMS' ) {
- require VMS::Filespec;
- VMS::Filespec->import;
- }
-}
-
-use File::Basename;
-
-our $VERSION = '6.55_02';
-
-require ExtUtils::MM_Any;
-require ExtUtils::MM_Unix;
-our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-
-use ExtUtils::MakeMaker qw($Verbose neatvalue);
-our $Revision = $ExtUtils::MakeMaker::Revision;
-
-
-=head1 NAME
-
-ExtUtils::MM_VMS - methods to override UN*X behaviour in ExtUtils::MakeMaker
-
-=head1 SYNOPSIS
-
- Do not use this directly.
- Instead, use ExtUtils::MM and it will figure out which MM_*
- class to use for you.
-
-=head1 DESCRIPTION
-
-See ExtUtils::MM_Unix for a documentation of the methods provided
-there. This package overrides the implementation of these methods, not
-the semantics.
-
-=head2 Methods always loaded
-
-=over 4
-
-=item wraplist
-
-Converts a list into a string wrapped at approximately 80 columns.
-
-=cut
-
-sub wraplist {
- my($self) = shift;
- my($line,$hlen) = ('',0);
-
- foreach my $word (@_) {
- # Perl bug -- seems to occasionally insert extra elements when
- # traversing array (scalar(@array) doesn't show them, but
- # foreach(@array) does) (5.00307)
- next unless $word =~ /\w/;
- $line .= ' ' if length($line);
- if ($hlen > 80) { $line .= "\\\n\t"; $hlen = 0; }
- $line .= $word;
- $hlen += length($word) + 2;
- }
- $line;
-}
-
-
-# This isn't really an override. It's just here because ExtUtils::MM_VMS
-# appears in @MM::ISA before ExtUtils::Liblist::Kid, so if there isn't an ext()
-# in MM_VMS, then AUTOLOAD is called, and bad things happen. So, we just
-# mimic inheritance here and hand off to ExtUtils::Liblist::Kid.
-# XXX This hackery will die soon. --Schwern
-sub ext {
- require ExtUtils::Liblist::Kid;
- goto &ExtUtils::Liblist::Kid::ext;
-}
-
-=back
-
-=head2 Methods
-
-Those methods which override default MM_Unix methods are marked
-"(override)", while methods unique to MM_VMS are marked "(specific)".
-For overridden methods, documentation is limited to an explanation
-of why this method overrides the MM_Unix method; see the ExtUtils::MM_Unix
-documentation for more details.
-
-=over 4
-
-=item guess_name (override)
-
-Try to determine name of extension being built. We begin with the name
-of the current directory. Since VMS filenames are case-insensitive,
-however, we look for a F<.pm> file whose name matches that of the current
-directory (presumably the 'main' F<.pm> file for this extension), and try
-to find a C<package> statement from which to obtain the Mixed::Case
-package name.
-
-=cut
-
-sub guess_name {
- my($self) = @_;
- my($defname,$defpm, at pm,%xs);
- local *PM;
-
- $defname = basename(fileify($ENV{'DEFAULT'}));
- $defname =~ s![\d\-_]*\.dir.*$!!; # Clip off .dir;1 suffix, and package version
- $defpm = $defname;
- # Fallback in case for some reason a user has copied the files for an
- # extension into a working directory whose name doesn't reflect the
- # extension's name. We'll use the name of a unique .pm file, or the
- # first .pm file with a matching .xs file.
- if (not -e "${defpm}.pm") {
- @pm = glob('*.pm');
- s/.pm$// for @pm;
- if (@pm == 1) { ($defpm = $pm[0]) =~ s/.pm$//; }
- elsif (@pm) {
- %xs = map { s/.xs$//; ($_,1) } glob('*.xs'); ## no critic
- if (keys %xs) {
- foreach my $pm (@pm) {
- $defpm = $pm, last if exists $xs{$pm};
- }
- }
- }
- }
- if (open(my $pm, '<', "${defpm}.pm")){
- while (<$pm>) {
- if (/^\s*package\s+([^;]+)/i) {
- $defname = $1;
- last;
- }
- }
- print STDOUT "Warning (non-fatal): Couldn't find package name in ${defpm}.pm;\n\t",
- "defaulting package name to $defname\n"
- if eof($pm);
- close $pm;
- }
- else {
- print STDOUT "Warning (non-fatal): Couldn't find ${defpm}.pm;\n\t",
- "defaulting package name to $defname\n";
- }
- $defname =~ s#[\d.\-_]+$##;
- $defname;
-}
-
-=item find_perl (override)
-
-Use VMS file specification syntax and CLI commands to find and
-invoke Perl images.
-
-=cut
-
-sub find_perl {
- my($self, $ver, $names, $dirs, $trace) = @_;
- my($vmsfile, at sdirs, at snames, at cand);
- my($rslt);
- my($inabs) = 0;
- local *TCF;
-
- if( $self->{PERL_CORE} ) {
- # Check in relative directories first, so we pick up the current
- # version of Perl if we're running MakeMaker as part of the main build.
- @sdirs = sort { my($absa) = $self->file_name_is_absolute($a);
- my($absb) = $self->file_name_is_absolute($b);
- if ($absa && $absb) { return $a cmp $b }
- else { return $absa ? 1 : ($absb ? -1 : ($a cmp $b)); }
- } @$dirs;
- # Check miniperl before perl, and check names likely to contain
- # version numbers before "generic" names, so we pick up an
- # executable that's less likely to be from an old installation.
- @snames = sort { my($ba) = $a =~ m!([^:>\]/]+)$!; # basename
- my($bb) = $b =~ m!([^:>\]/]+)$!;
- my($ahasdir) = (length($a) - length($ba) > 0);
- my($bhasdir) = (length($b) - length($bb) > 0);
- if ($ahasdir and not $bhasdir) { return 1; }
- elsif ($bhasdir and not $ahasdir) { return -1; }
- else { $bb =~ /\d/ <=> $ba =~ /\d/
- or substr($ba,0,1) cmp substr($bb,0,1)
- or length($bb) <=> length($ba) } } @$names;
- }
- else {
- @sdirs = @$dirs;
- @snames = @$names;
- }
-
- # Image names containing Perl version use '_' instead of '.' under VMS
- s/\.(\d+)$/_$1/ for @snames;
- if ($trace >= 2){
- print "Looking for perl $ver by these names:\n";
- print "\t at snames,\n";
- print "in these dirs:\n";
- print "\t at sdirs\n";
- }
- foreach my $dir (@sdirs){
- next unless defined $dir; # $self->{PERL_SRC} may be undefined
- $inabs++ if $self->file_name_is_absolute($dir);
- if ($inabs == 1) {
- # We've covered relative dirs; everything else is an absolute
- # dir (probably an installed location). First, we'll try
- # potential command names, to see whether we can avoid a long
- # MCR expression.
- foreach my $name (@snames) {
- push(@cand,$name) if $name =~ /^[\w\-\$]+$/;
- }
- $inabs++; # Should happen above in next $dir, but just in case...
- }
- foreach my $name (@snames){
- push @cand, ($name !~ m![/:>\]]!) ? $self->catfile($dir,$name)
- : $self->fixpath($name,0);
- }
- }
- foreach my $name (@cand) {
- print "Checking $name\n" if $trace >= 2;
- # If it looks like a potential command, try it without the MCR
- if ($name =~ /^[\w\-\$]+$/) {
- open(my $tcf, ">", "temp_mmvms.com")
- or die('unable to open temp file');
- print $tcf "\$ set message/nofacil/nosever/noident/notext\n";
- print $tcf "\$ $name -e \"require $ver; print \"\"VER_OK\\n\"\"\"\n";
- close $tcf;
- $rslt = `\@temp_mmvms.com` ;
- unlink('temp_mmvms.com');
- if ($rslt =~ /VER_OK/) {
- print "Using PERL=$name\n" if $trace;
- return $name;
- }
- }
- next unless $vmsfile = $self->maybe_command($name);
- $vmsfile =~ s/;[\d\-]*$//; # Clip off version number; we can use a newer version as well
- print "Executing $vmsfile\n" if ($trace >= 2);
- open(my $tcf, '>', "temp_mmvms.com")
- or die('unable to open temp file');
- print $tcf "\$ set message/nofacil/nosever/noident/notext\n";
- print $tcf "\$ mcr $vmsfile -e \"require $ver; print \"\"VER_OK\\n\"\"\" \n";
- close $tcf;
- $rslt = `\@temp_mmvms.com`;
- unlink('temp_mmvms.com');
- if ($rslt =~ /VER_OK/) {
- print "Using PERL=MCR $vmsfile\n" if $trace;
- return "MCR $vmsfile";
- }
- }
- print STDOUT "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
- 0; # false and not empty
-}
-
-=item maybe_command (override)
-
-Follows VMS naming conventions for executable files.
-If the name passed in doesn't exactly match an executable file,
-appends F<.Exe> (or equivalent) to check for executable image, and F<.Com>
-to check for DCL procedure. If this fails, checks directories in DCL$PATH
-and finally F<Sys$System:> for an executable file having the name specified,
-with or without the F<.Exe>-equivalent suffix.
-
-=cut
-
-sub maybe_command {
- my($self,$file) = @_;
- return $file if -x $file && ! -d _;
- my(@dirs) = ('');
- my(@exts) = ('',$Config{'exe_ext'},'.exe','.com');
-
- if ($file !~ m![/:>\]]!) {
- for (my $i = 0; defined $ENV{"DCL\$PATH;$i"}; $i++) {
- my $dir = $ENV{"DCL\$PATH;$i"};
- $dir .= ':' unless $dir =~ m%[\]:]$%;
- push(@dirs,$dir);
- }
- push(@dirs,'Sys$System:');
- foreach my $dir (@dirs) {
- my $sysfile = "$dir$file";
- foreach my $ext (@exts) {
- return $file if -x "$sysfile$ext" && ! -d _;
- }
- }
- }
- return 0;
-}
-
-
-=item pasthru (override)
-
-VMS has $(MMSQUALIFIERS) which is a listing of all the original command line
-options. This is used in every invocation of make in the VMS Makefile so
-PASTHRU should not be necessary. Using PASTHRU tends to blow commands past
-the 256 character limit.
-
-=cut
-
-sub pasthru {
- return "PASTHRU=\n";
-}
-
-
-=item pm_to_blib (override)
-
-VMS wants a dot in every file so we can't have one called 'pm_to_blib',
-it becomes 'pm_to_blib.' and MMS/K isn't smart enough to know that when
-you have a target called 'pm_to_blib' it should look for 'pm_to_blib.'.
-
-So in VMS its pm_to_blib.ts.
-
-=cut
-
-sub pm_to_blib {
- my $self = shift;
-
- my $make = $self->SUPER::pm_to_blib;
-
- $make =~ s{^pm_to_blib :}{pm_to_blib.ts :}m;
- $make =~ s{\$\(TOUCH\) pm_to_blib}{\$(TOUCH) pm_to_blib.ts};
-
- $make = <<'MAKE' . $make;
-# Dummy target to match Unix target name; we use pm_to_blib.ts as
-# timestamp file to avoid repeated invocations under VMS
-pm_to_blib : pm_to_blib.ts
- $(NOECHO) $(NOOP)
-
-MAKE
-
- return $make;
-}
-
-
-=item perl_script (override)
-
-If name passed in doesn't specify a readable file, appends F<.com> or
-F<.pl> and tries again, since it's customary to have file types on all files
-under VMS.
-
-=cut
-
-sub perl_script {
- my($self,$file) = @_;
- return $file if -r $file && ! -d _;
- return "$file.com" if -r "$file.com";
- return "$file.pl" if -r "$file.pl";
- return '';
-}
-
-
-=item replace_manpage_separator
-
-Use as separator a character which is legal in a VMS-syntax file name.
-
-=cut
-
-sub replace_manpage_separator {
- my($self,$man) = @_;
- $man = unixify($man);
- $man =~ s#/+#__#g;
- $man;
-}
-
-=item init_DEST
-
-(override) Because of the difficulty concatenating VMS filepaths we
-must pre-expand the DEST* variables.
-
-=cut
-
-sub init_DEST {
- my $self = shift;
-
- $self->SUPER::init_DEST;
-
- # Expand DEST variables.
- foreach my $var ($self->installvars) {
- my $destvar = 'DESTINSTALL'.$var;
- $self->{$destvar} = $self->eliminate_macros($self->{$destvar});
- }
-}
-
-
-=item init_DIRFILESEP
-
-No seperator between a directory path and a filename on VMS.
-
-=cut
-
-sub init_DIRFILESEP {
- my($self) = shift;
-
- $self->{DIRFILESEP} = '';
- return 1;
-}
-
-
-=item init_main (override)
-
-
-=cut
-
-sub init_main {
- my($self) = shift;
-
- $self->SUPER::init_main;
-
- $self->{DEFINE} ||= '';
- if ($self->{DEFINE} ne '') {
- my(@terms) = split(/\s+/,$self->{DEFINE});
- my(@defs, at udefs);
- foreach my $def (@terms) {
- next unless $def;
- my $targ = \@defs;
- if ($def =~ s/^-([DU])//) { # If it was a Unix-style definition
- $targ = \@udefs if $1 eq 'U';
- $def =~ s/='(.*)'$/=$1/; # then remove shell-protection ''
- $def =~ s/^'(.*)'$/$1/; # from entire term or argument
- }
- if ($def =~ /=/) {
- $def =~ s/"/""/g; # Protect existing " from DCL
- $def = qq["$def"]; # and quote to prevent parsing of =
- }
- push @$targ, $def;
- }
-
- $self->{DEFINE} = '';
- if (@defs) {
- $self->{DEFINE} = '/Define=(' . join(',', at defs) . ')';
- }
- if (@udefs) {
- $self->{DEFINE} .= '/Undef=(' . join(',', at udefs) . ')';
- }
- }
-}
-
-=item init_others (override)
-
-Provide VMS-specific forms of various utility commands, then hand
-off to the default MM_Unix method.
-
-DEV_NULL should probably be overriden with something.
-
-Also changes EQUALIZE_TIMESTAMP to set revision date of target file to
-one second later than source file, since MMK interprets precisely
-equal revision dates for a source and target file as a sign that the
-target needs to be updated.
-
-=cut
-
-sub init_others {
- my($self) = @_;
-
- $self->{NOOP} = 'Continue';
- $self->{NOECHO} ||= '@ ';
-
- $self->{MAKEFILE} ||= $self->{FIRST_MAKEFILE} || 'Descrip.MMS';
- $self->{FIRST_MAKEFILE} ||= $self->{MAKEFILE};
- $self->{MAKE_APERL_FILE} ||= 'Makeaperl.MMS';
- $self->{MAKEFILE_OLD} ||= $self->eliminate_macros('$(FIRST_MAKEFILE)_old');
-#
-# If an extension is not specified, then MMS/MMK assumes an
-# an extension of .MMS. If there really is no extension,
-# then a trailing "." needs to be appended to specify a
-# a null extension.
-#
- $self->{MAKEFILE} .= '.' unless $self->{MAKEFILE} =~ m/\./;
- $self->{FIRST_MAKEFILE} .= '.' unless $self->{FIRST_MAKEFILE} =~ m/\./;
- $self->{MAKE_APERL_FILE} .= '.' unless $self->{MAKE_APERL_FILE} =~ m/\./;
- $self->{MAKEFILE_OLD} .= '.' unless $self->{MAKEFILE_OLD} =~ m/\./;
-
- $self->{MACROSTART} ||= '/Macro=(';
- $self->{MACROEND} ||= ')';
- $self->{USEMAKEFILE} ||= '/Descrip=';
-
- $self->{EQUALIZE_TIMESTAMP} ||= '$(ABSPERLRUN) -we "open F,qq{>>$ARGV[1]};close F;utime(0,(stat($ARGV[0]))[9]+1,$ARGV[1])"';
-
- $self->{MOD_INSTALL} ||=
- $self->oneliner(<<'CODE', ['-MExtUtils::Install']);
-install([ from_to => {split(' ', <STDIN>)}, verbose => '$(VERBINST)', uninstall_shadows => '$(UNINST)', dir_mode => '$(PERM_DIR)' ]);
-CODE
-
- $self->SUPER::init_others;
-
- $self->{SHELL} ||= 'Posix';
-
- $self->{UMASK_NULL} = '! ';
-
- # Redirection on VMS goes before the command, not after as on Unix.
- # $(DEV_NULL) is used once and its not worth going nuts over making
- # it work. However, Unix's DEV_NULL is quite wrong for VMS.
- $self->{DEV_NULL} = '';
-
- if ($self->{OBJECT} =~ /\s/) {
- $self->{OBJECT} =~ s/(\\)?\n+\s+/ /g;
- $self->{OBJECT} = $self->wraplist(
- map $self->fixpath($_,0), split /,?\s+/, $self->{OBJECT}
- );
- }
-
- $self->{LDFROM} = $self->wraplist(
- map $self->fixpath($_,0), split /,?\s+/, $self->{LDFROM}
- );
-}
-
-
-=item init_platform (override)
-
-Add PERL_VMS, MM_VMS_REVISION and MM_VMS_VERSION.
-
-MM_VMS_REVISION is for backwards compatibility before MM_VMS had a
-$VERSION.
-
-=cut
-
-sub init_platform {
- my($self) = shift;
-
- $self->{MM_VMS_REVISION} = $Revision;
- $self->{MM_VMS_VERSION} = $VERSION;
- $self->{PERL_VMS} = $self->catdir($self->{PERL_SRC}, 'VMS')
- if $self->{PERL_SRC};
-}
-
-
-=item platform_constants
-
-=cut
-
-sub platform_constants {
- my($self) = shift;
- my $make_frag = '';
-
- foreach my $macro (qw(PERL_VMS MM_VMS_REVISION MM_VMS_VERSION))
- {
- next unless defined $self->{$macro};
- $make_frag .= "$macro = $self->{$macro}\n";
- }
-
- return $make_frag;
-}
-
-
-=item init_VERSION (override)
-
-Override the *DEFINE_VERSION macros with VMS semantics. Translate the
-MAKEMAKER filepath to VMS style.
-
-=cut
-
-sub init_VERSION {
- my $self = shift;
-
- $self->SUPER::init_VERSION;
-
- $self->{DEFINE_VERSION} = '"$(VERSION_MACRO)=""$(VERSION)"""';
- $self->{XS_DEFINE_VERSION} = '"$(XS_VERSION_MACRO)=""$(XS_VERSION)"""';
- $self->{MAKEMAKER} = vmsify($INC{'ExtUtils/MakeMaker.pm'});
-}
-
-
-=item constants (override)
-
-Fixes up numerous file and directory macros to insure VMS syntax
-regardless of input syntax. Also makes lists of files
-comma-separated.
-
-=cut
-
-sub constants {
- my($self) = @_;
-
- # Be kind about case for pollution
- for (@ARGV) { $_ = uc($_) if /POLLUTE/i; }
-
- # Cleanup paths for directories in MMS macros.
- foreach my $macro ( qw [
- INST_BIN INST_SCRIPT INST_LIB INST_ARCHLIB
- PERL_LIB PERL_ARCHLIB
- PERL_INC PERL_SRC ],
- (map { 'INSTALL'.$_ } $self->installvars)
- )
- {
- next unless defined $self->{$macro};
- next if $macro =~ /MAN/ && $self->{$macro} eq 'none';
- $self->{$macro} = $self->fixpath($self->{$macro},1);
- }
-
- # Cleanup paths for files in MMS macros.
- foreach my $macro ( qw[LIBPERL_A FIRST_MAKEFILE MAKEFILE_OLD
- MAKE_APERL_FILE MYEXTLIB] )
- {
- next unless defined $self->{$macro};
- $self->{$macro} = $self->fixpath($self->{$macro},0);
- }
-
- # Fixup files for MMS macros
- # XXX is this list complete?
- for my $macro (qw/
- FULLEXT VERSION_FROM OBJECT LDFROM
- / ) {
- next unless defined $self->{$macro};
- $self->{$macro} = $self->fixpath($self->{$macro},0);
- }
-
-
- for my $macro (qw/ XS MAN1PODS MAN3PODS PM /) {
- # Where is the space coming from? --jhi
- next unless $self ne " " && defined $self->{$macro};
- my %tmp = ();
- for my $key (keys %{$self->{$macro}}) {
- $tmp{$self->fixpath($key,0)} =
- $self->fixpath($self->{$macro}{$key},0);
- }
- $self->{$macro} = \%tmp;
- }
-
- for my $macro (qw/ C O_FILES H /) {
- next unless defined $self->{$macro};
- my @tmp = ();
- for my $val (@{$self->{$macro}}) {
- push(@tmp,$self->fixpath($val,0));
- }
- $self->{$macro} = \@tmp;
- }
-
- # mms/k does not define a $(MAKE) macro.
- $self->{MAKE} = '$(MMS)$(MMSQUALIFIERS)';
-
- return $self->SUPER::constants;
-}
-
-
-=item special_targets
-
-Clear the default .SUFFIXES and put in our own list.
-
-=cut
-
-sub special_targets {
- my $self = shift;
-
- my $make_frag .= <<'MAKE_FRAG';
-.SUFFIXES :
-.SUFFIXES : $(OBJ_EXT) .c .cpp .cxx .xs
-
-MAKE_FRAG
-
- return $make_frag;
-}
-
-=item cflags (override)
-
-Bypass shell script and produce qualifiers for CC directly (but warn
-user if a shell script for this extension exists). Fold multiple
-/Defines into one, since some C compilers pay attention to only one
-instance of this qualifier on the command line.
-
-=cut
-
-sub cflags {
- my($self,$libperl) = @_;
- my($quals) = $self->{CCFLAGS} || $Config{'ccflags'};
- my($definestr,$undefstr,$flagoptstr) = ('','','');
- my($incstr) = '/Include=($(PERL_INC)';
- my($name,$sys, at m);
-
- ( $name = $self->{NAME} . "_cflags" ) =~ s/:/_/g ;
- print STDOUT "Unix shell script ".$Config{"$self->{'BASEEXT'}_cflags"}.
- " required to modify CC command for $self->{'BASEEXT'}\n"
- if ($Config{$name});
-
- if ($quals =~ / -[DIUOg]/) {
- while ($quals =~ / -([Og])(\d*)\b/) {
- my($type,$lvl) = ($1,$2);
- $quals =~ s/ -$type$lvl\b\s*//;
- if ($type eq 'g') { $flagoptstr = '/NoOptimize'; }
- else { $flagoptstr = '/Optimize' . (defined($lvl) ? "=$lvl" : ''); }
- }
- while ($quals =~ / -([DIU])(\S+)/) {
- my($type,$def) = ($1,$2);
- $quals =~ s/ -$type$def\s*//;
- $def =~ s/"/""/g;
- if ($type eq 'D') { $definestr .= qq["$def",]; }
- elsif ($type eq 'I') { $incstr .= ',' . $self->fixpath($def,1); }
- else { $undefstr .= qq["$def",]; }
- }
- }
- if (length $quals and $quals !~ m!/!) {
- warn "MM_VMS: Ignoring unrecognized CCFLAGS elements \"$quals\"\n";
- $quals = '';
- }
- $definestr .= q["PERL_POLLUTE",] if $self->{POLLUTE};
- if (length $definestr) { chop($definestr); $quals .= "/Define=($definestr)"; }
- if (length $undefstr) { chop($undefstr); $quals .= "/Undef=($undefstr)"; }
- # Deal with $self->{DEFINE} here since some C compilers pay attention
- # to only one /Define clause on command line, so we have to
- # conflate the ones from $Config{'ccflags'} and $self->{DEFINE}
- # ($self->{DEFINE} has already been VMSified in constants() above)
- if ($self->{DEFINE}) { $quals .= $self->{DEFINE}; }
- for my $type (qw(Def Undef)) {
- my(@terms);
- while ($quals =~ m:/${type}i?n?e?=([^/]+):ig) {
- my $term = $1;
- $term =~ s:^\((.+)\)$:$1:;
- push @terms, $term;
- }
- if ($type eq 'Def') {
- push @terms, qw[ $(DEFINE_VERSION) $(XS_DEFINE_VERSION) ];
- }
- if (@terms) {
- $quals =~ s:/${type}i?n?e?=[^/]+::ig;
- $quals .= "/${type}ine=(" . join(',', at terms) . ')';
- }
- }
-
- $libperl or $libperl = $self->{LIBPERL_A} || "libperl.olb";
-
- # Likewise with $self->{INC} and /Include
- if ($self->{'INC'}) {
- my(@includes) = split(/\s+/,$self->{INC});
- foreach (@includes) {
- s/^-I//;
- $incstr .= ','.$self->fixpath($_,1);
- }
- }
- $quals .= "$incstr)";
-# $quals =~ s/,,/,/g; $quals =~ s/\(,/(/g;
- $self->{CCFLAGS} = $quals;
-
- $self->{PERLTYPE} ||= '';
-
- $self->{OPTIMIZE} ||= $flagoptstr || $Config{'optimize'};
- if ($self->{OPTIMIZE} !~ m!/!) {
- if ($self->{OPTIMIZE} =~ m!-g!) { $self->{OPTIMIZE} = '/Debug/NoOptimize' }
- elsif ($self->{OPTIMIZE} =~ /-O(\d*)/) {
- $self->{OPTIMIZE} = '/Optimize' . (defined($1) ? "=$1" : '');
- }
- else {
- warn "MM_VMS: Can't parse OPTIMIZE \"$self->{OPTIMIZE}\"; using default\n" if length $self->{OPTIMIZE};
- $self->{OPTIMIZE} = '/Optimize';
- }
- }
-
- return $self->{CFLAGS} = qq{
-CCFLAGS = $self->{CCFLAGS}
-OPTIMIZE = $self->{OPTIMIZE}
-PERLTYPE = $self->{PERLTYPE}
-};
-}
-
-=item const_cccmd (override)
-
-Adds directives to point C preprocessor to the right place when
-handling #include E<lt>sys/foo.hE<gt> directives. Also constructs CC
-command line a bit differently than MM_Unix method.
-
-=cut
-
-sub const_cccmd {
- my($self,$libperl) = @_;
- my(@m);
-
- return $self->{CONST_CCCMD} if $self->{CONST_CCCMD};
- return '' unless $self->needs_linking();
- if ($Config{'vms_cc_type'} eq 'gcc') {
- push @m,'
-.FIRST
- ',$self->{NOECHO},'If F$TrnLnm("Sys").eqs."" Then Define/NoLog SYS GNU_CC_Include:[VMS]';
- }
- elsif ($Config{'vms_cc_type'} eq 'vaxc') {
- push @m,'
-.FIRST
- ',$self->{NOECHO},'If F$TrnLnm("Sys").eqs."" .and. F$TrnLnm("VAXC$Include").eqs."" Then Define/NoLog SYS Sys$Library
- ',$self->{NOECHO},'If F$TrnLnm("Sys").eqs."" .and. F$TrnLnm("VAXC$Include").nes."" Then Define/NoLog SYS VAXC$Include';
- }
- else {
- push @m,'
-.FIRST
- ',$self->{NOECHO},'If F$TrnLnm("Sys").eqs."" .and. F$TrnLnm("DECC$System_Include").eqs."" Then Define/NoLog SYS ',
- ($Config{'archname'} eq 'VMS_AXP' ? 'Sys$Library' : 'DECC$Library_Include'),'
- ',$self->{NOECHO},'If F$TrnLnm("Sys").eqs."" .and. F$TrnLnm("DECC$System_Include").nes."" Then Define/NoLog SYS DECC$System_Include';
- }
-
- push(@m, "\n\nCCCMD = $Config{'cc'} \$(CCFLAGS)\$(OPTIMIZE)\n");
-
- $self->{CONST_CCCMD} = join('', at m);
-}
-
-
-=item tools_other (override)
-
-Throw in some dubious extra macros for Makefile args.
-
-Also keep around the old $(SAY) macro in case somebody's using it.
-
-=cut
-
-sub tools_other {
- my($self) = @_;
-
- # XXX Are these necessary? Does anyone override them? They're longer
- # than just typing the literal string.
- my $extra_tools = <<'EXTRA_TOOLS';
-
-# Just in case anyone is using the old macro.
-USEMACROS = $(MACROSTART)
-SAY = $(ECHO)
-
-EXTRA_TOOLS
-
- return $self->SUPER::tools_other . $extra_tools;
-}
-
-=item init_dist (override)
-
-VMSish defaults for some values.
-
- macro description default
-
- ZIPFLAGS flags to pass to ZIP -Vu
-
- COMPRESS compression command to gzip
- use for tarfiles
- SUFFIX suffix to put on -gz
- compressed files
-
- SHAR shar command to use vms_share
-
- DIST_DEFAULT default target to use to tardist
- create a distribution
-
- DISTVNAME Use VERSION_SYM instead of $(DISTNAME)-$(VERSION_SYM)
- VERSION for the name
-
-=cut
-
-sub init_dist {
- my($self) = @_;
- $self->{ZIPFLAGS} ||= '-Vu';
- $self->{COMPRESS} ||= 'gzip';
- $self->{SUFFIX} ||= '-gz';
- $self->{SHAR} ||= 'vms_share';
- $self->{DIST_DEFAULT} ||= 'zipdist';
-
- $self->SUPER::init_dist;
-
- $self->{DISTVNAME} = "$self->{DISTNAME}-$self->{VERSION_SYM}"
- unless $self->{ARGS}{DISTVNAME};
-
- return;
-}
-
-=item c_o (override)
-
-Use VMS syntax on command line. In particular, $(DEFINE) and
-$(PERL_INC) have been pulled into $(CCCMD). Also use MM[SK] macros.
-
-=cut
-
-sub c_o {
- my($self) = @_;
- return '' unless $self->needs_linking();
- '
-.c$(OBJ_EXT) :
- $(CCCMD) $(CCCDLFLAGS) $(MMS$TARGET_NAME).c
-
-.cpp$(OBJ_EXT) :
- $(CCCMD) $(CCCDLFLAGS) $(MMS$TARGET_NAME).cpp
-
-.cxx$(OBJ_EXT) :
- $(CCCMD) $(CCCDLFLAGS) $(MMS$TARGET_NAME).cxx
-
-';
-}
-
-=item xs_c (override)
-
-Use MM[SK] macros.
-
-=cut
-
-sub xs_c {
- my($self) = @_;
- return '' unless $self->needs_linking();
- '
-.xs.c :
- $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $(MMS$TARGET_NAME).xs >$(MMS$TARGET)
-';
-}
-
-=item xs_o (override)
-
-Use MM[SK] macros, and VMS command line for C compiler.
-
-=cut
-
-sub xs_o { # many makes are too dumb to use xs_c then c_o
- my($self) = @_;
- return '' unless $self->needs_linking();
- '
-.xs$(OBJ_EXT) :
- $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $(MMS$TARGET_NAME).xs >$(MMS$TARGET_NAME).c
- $(CCCMD) $(CCCDLFLAGS) $(MMS$TARGET_NAME).c
-';
-}
-
-
-=item dlsyms (override)
-
-Create VMS linker options files specifying universal symbols for this
-extension's shareable image, and listing other shareable images or
-libraries to which it should be linked.
-
-=cut
-
-sub dlsyms {
- my($self,%attribs) = @_;
-
- return '' unless $self->needs_linking();
-
- my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
- my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
- my($funclist) = $attribs{FUNCLIST} || $self->{FUNCLIST} || [];
- my(@m);
-
- unless ($self->{SKIPHASH}{'dynamic'}) {
- push(@m,'
-dynamic :: $(INST_ARCHAUTODIR)$(BASEEXT).opt
- $(NOECHO) $(NOOP)
-');
- }
-
- push(@m,'
-static :: $(INST_ARCHAUTODIR)$(BASEEXT).opt
- $(NOECHO) $(NOOP)
-') unless $self->{SKIPHASH}{'static'};
-
- push @m,'
-$(INST_ARCHAUTODIR)$(BASEEXT).opt : $(BASEEXT).opt
- $(CP) $(MMS$SOURCE) $(MMS$TARGET)
-
-$(BASEEXT).opt : Makefile.PL
- $(PERLRUN) -e "use ExtUtils::Mksymlists;" -
- ',qq[-e "Mksymlists('NAME' => '$self->{NAME}', 'DL_FUNCS' => ],
- neatvalue($funcs),q[, 'DL_VARS' => ],neatvalue($vars),
- q[, 'FUNCLIST' => ],neatvalue($funclist),qq[)"\n];
-
- push @m, ' $(PERL) -e "print ""$(INST_STATIC)/Include=';
- if ($self->{OBJECT} =~ /\bBASEEXT\b/ or
- $self->{OBJECT} =~ /\b$self->{BASEEXT}\b/i) {
- push @m, ($Config{d_vms_case_sensitive_symbols}
- ? uc($self->{BASEEXT}) :'$(BASEEXT)');
- }
- else { # We don't have a "main" object file, so pull 'em all in
- # Upcase module names if linker is being case-sensitive
- my($upcase) = $Config{d_vms_case_sensitive_symbols};
- my(@omods) = split ' ', $self->eliminate_macros($self->{OBJECT});
- for (@omods) {
- s/\.[^.]*$//; # Trim off file type
- s[\$\(\w+_EXT\)][]; # even as a macro
- s/.*[:>\/\]]//; # Trim off dir spec
- $_ = uc if $upcase;
- };
-
- my(@lines);
- my $tmp = shift @omods;
- foreach my $elt (@omods) {
- $tmp .= ",$elt";
- if (length($tmp) > 80) { push @lines, $tmp; $tmp = ''; }
- }
- push @lines, $tmp;
- push @m, '(', join( qq[, -\\n\\t"";" >>\$(MMS\$TARGET)\n\t\$(PERL) -e "print ""], @lines),')';
- }
- push @m, '\n$(INST_STATIC)/Library\n"";" >>$(MMS$TARGET)',"\n";
-
- if (length $self->{LDLOADLIBS}) {
- my($line) = '';
- foreach my $lib (split ' ', $self->{LDLOADLIBS}) {
- $lib =~ s%\$%\\\$%g; # Escape '$' in VMS filespecs
- if (length($line) + length($lib) > 160) {
- push @m, "\t\$(PERL) -e \"print qq{$line}\" >>\$(MMS\$TARGET)\n";
- $line = $lib . '\n';
- }
- else { $line .= $lib . '\n'; }
- }
- push @m, "\t\$(PERL) -e \"print qq{$line}\" >>\$(MMS\$TARGET)\n" if $line;
- }
-
- join('', at m);
-
-}
-
-=item dynamic_lib (override)
-
-Use VMS Link command.
-
-=cut
-
-sub dynamic_lib {
- my($self, %attribs) = @_;
- return '' unless $self->needs_linking(); #might be because of a subdir
-
- return '' unless $self->has_link_code();
-
- my($otherldflags) = $attribs{OTHERLDFLAGS} || "";
- my($inst_dynamic_dep) = $attribs{INST_DYNAMIC_DEP} || "";
- my $shr = $Config{'dbgprefix'} . 'PerlShr';
- my(@m);
- push @m,"
-
-OTHERLDFLAGS = $otherldflags
-INST_DYNAMIC_DEP = $inst_dynamic_dep
-
-";
- push @m, '
-$(INST_DYNAMIC) : $(INST_STATIC) $(PERL_INC)perlshr_attr.opt $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
- If F$TrnLNm("',$shr,'").eqs."" Then Define/NoLog/User ',"$shr Sys\$Share:$shr.$Config{'dlext'}",'
- Link $(LDFLAGS) /Shareable=$(MMS$TARGET)$(OTHERLDFLAGS) $(BASEEXT).opt/Option,$(PERL_INC)perlshr_attr.opt/Option
-';
-
- join('', at m);
-}
-
-
-=item static_lib (override)
-
-Use VMS commands to manipulate object library.
-
-=cut
-
-sub static_lib {
- my($self) = @_;
- return '' unless $self->needs_linking();
-
- return '
-$(INST_STATIC) :
- $(NOECHO) $(NOOP)
-' unless ($self->{OBJECT} or @{$self->{C} || []} or $self->{MYEXTLIB});
-
- my(@m);
- push @m,'
-# Rely on suffix rule for update action
-$(OBJECT) : $(INST_ARCHAUTODIR)$(DFSEP).exists
-
-$(INST_STATIC) : $(OBJECT) $(MYEXTLIB)
-';
- # If this extension has its own library (eg SDBM_File)
- # then copy that to $(INST_STATIC) and add $(OBJECT) into it.
- push(@m, "\t",'$(CP) $(MYEXTLIB) $(MMS$TARGET)',"\n") if $self->{MYEXTLIB};
-
- push(@m,"\t",'If F$Search("$(MMS$TARGET)").eqs."" Then Library/Object/Create $(MMS$TARGET)',"\n");
-
- # if there was a library to copy, then we can't use MMS$SOURCE_LIST,
- # 'cause it's a library and you can't stick them in other libraries.
- # In that case, we use $OBJECT instead and hope for the best
- if ($self->{MYEXTLIB}) {
- push(@m,"\t",'Library/Object/Replace $(MMS$TARGET) $(OBJECT)',"\n");
- } else {
- push(@m,"\t",'Library/Object/Replace $(MMS$TARGET) $(MMS$SOURCE_LIST)',"\n");
- }
-
- push @m, "\t\$(NOECHO) \$(PERL) -e 1 >\$(INST_ARCHAUTODIR)extralibs.ld\n";
- foreach my $lib (split ' ', $self->{EXTRALIBS}) {
- push(@m,"\t",'$(NOECHO) $(PERL) -e "print qq{',$lib,'\n}" >>$(INST_ARCHAUTODIR)extralibs.ld',"\n");
- }
- join('', at m);
-}
-
-
-=item extra_clean_files
-
-Clean up some OS specific files. Plus the temp file used to shorten
-a lot of commands.
-
-=cut
-
-sub extra_clean_files {
- return qw(
- *.Map *.Dmp *.Lis *.cpp *.$(DLEXT) *.Opt $(BASEEXT).bso
- .MM_Tmp
- );
-}
-
-
-=item zipfile_target
-
-=item tarfile_target
-
-=item shdist_target
-
-Syntax for invoking shar, tar and zip differs from that for Unix.
-
-=cut
-
-sub zipfile_target {
- my($self) = shift;
-
- return <<'MAKE_FRAG';
-$(DISTVNAME).zip : distdir
- $(PREOP)
- $(ZIP) "$(ZIPFLAGS)" $(MMS$TARGET) [.$(DISTVNAME)...]*.*;
- $(RM_RF) $(DISTVNAME)
- $(POSTOP)
-MAKE_FRAG
-}
-
-sub tarfile_target {
- my($self) = shift;
-
- return <<'MAKE_FRAG';
-$(DISTVNAME).tar$(SUFFIX) : distdir
- $(PREOP)
- $(TO_UNIX)
- $(TAR) "$(TARFLAGS)" $(DISTVNAME).tar [.$(DISTVNAME)...]
- $(RM_RF) $(DISTVNAME)
- $(COMPRESS) $(DISTVNAME).tar
- $(POSTOP)
-MAKE_FRAG
-}
-
-sub shdist_target {
- my($self) = shift;
-
- return <<'MAKE_FRAG';
-shdist : distdir
- $(PREOP)
- $(SHAR) [.$(DISTVNAME)...]*.*; $(DISTVNAME).share
- $(RM_RF) $(DISTVNAME)
- $(POSTOP)
-MAKE_FRAG
-}
-
-
-# --- Test and Installation Sections ---
-
-=item install (override)
-
-Work around DCL's 255 character limit several times,and use
-VMS-style command line quoting in a few cases.
-
-=cut
-
-sub install {
- my($self, %attribs) = @_;
- my(@m);
-
- push @m, q[
-install :: all pure_install doc_install
- $(NOECHO) $(NOOP)
-
-install_perl :: all pure_perl_install doc_perl_install
- $(NOECHO) $(NOOP)
-
-install_site :: all pure_site_install doc_site_install
- $(NOECHO) $(NOOP)
-
-pure_install :: pure_$(INSTALLDIRS)_install
- $(NOECHO) $(NOOP)
-
-doc_install :: doc_$(INSTALLDIRS)_install
- $(NOECHO) $(NOOP)
-
-pure__install : pure_site_install
- $(NOECHO) $(ECHO) "INSTALLDIRS not defined, defaulting to INSTALLDIRS=site"
-
-doc__install : doc_site_install
- $(NOECHO) $(ECHO) "INSTALLDIRS not defined, defaulting to INSTALLDIRS=site"
-
-# This hack brought to you by DCL's 255-character command line limit
-pure_perl_install ::
- $(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'read '.File::Spec->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').' '" >.MM_tmp
- $(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'write '.File::Spec->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').' '" >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_LIB) $(DESTINSTALLPRIVLIB) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_ARCHLIB) $(DESTINSTALLARCHLIB) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_BIN) $(DESTINSTALLBIN) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_SCRIPT) $(DESTINSTALLSCRIPT) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_MAN3DIR) $(DESTINSTALLMAN3DIR) " >>.MM_tmp
- $(NOECHO) $(MOD_INSTALL) <.MM_tmp
- $(NOECHO) $(RM_F) .MM_tmp
- $(NOECHO) $(WARN_IF_OLD_PACKLIST) ].$self->catfile($self->{SITEARCHEXP},'auto',$self->{FULLEXT},'.packlist').q[
-
-# Likewise
-pure_site_install ::
- $(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'read '.File::Spec->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').' '" >.MM_tmp
- $(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'write '.File::Spec->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').' '" >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_LIB) $(DESTINSTALLSITELIB) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_ARCHLIB) $(DESTINSTALLSITEARCH) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_BIN) $(DESTINSTALLSITEBIN) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_SCRIPT) $(DESTINSTALLSCRIPT) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR) " >>.MM_tmp
- $(NOECHO) $(MOD_INSTALL) <.MM_tmp
- $(NOECHO) $(RM_F) .MM_tmp
- $(NOECHO) $(WARN_IF_OLD_PACKLIST) ].$self->catfile($self->{PERL_ARCHLIB},'auto',$self->{FULLEXT},'.packlist').q[
-
-pure_vendor_install ::
- $(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'read '.File::Spec->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').' '" >.MM_tmp
- $(NOECHO) $(PERLRUN) "-MFile::Spec" -e "print 'write '.File::Spec->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').' '" >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_LIB) $(DESTINSTALLVENDORLIB) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_BIN) $(DESTINSTALLVENDORBIN) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_SCRIPT) $(DESTINSTALLSCRIPT) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) " >>.MM_tmp
- $(NOECHO) $(ECHO_N) "$(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) " >>.MM_tmp
- $(NOECHO) $(MOD_INSTALL) <.MM_tmp
- $(NOECHO) $(RM_F) .MM_tmp
-
-# Ditto
-doc_perl_install ::
- $(NOECHO) $(ECHO) "Appending installation info to ].$self->catfile($self->{DESTINSTALLARCHLIB}, 'perllocal.pod').q["
- $(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- $(NOECHO) $(ECHO_N) "installed into|$(INSTALLPRIVLIB)|" >.MM_tmp
- $(NOECHO) $(ECHO_N) "LINKTYPE|$(LINKTYPE)|VERSION|$(VERSION)|EXE_FILES|$(EXE_FILES) " >>.MM_tmp
- $(NOECHO) $(DOC_INSTALL) "Module" "$(NAME)" <.MM_tmp >>].$self->catfile($self->{DESTINSTALLARCHLIB},'perllocal.pod').q[
- $(NOECHO) $(RM_F) .MM_tmp
-
-# And again
-doc_site_install ::
- $(NOECHO) $(ECHO) "Appending installation info to ].$self->catfile($self->{DESTINSTALLARCHLIB}, 'perllocal.pod').q["
- $(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- $(NOECHO) $(ECHO_N) "installed into|$(INSTALLSITELIB)|" >.MM_tmp
- $(NOECHO) $(ECHO_N) "LINKTYPE|$(LINKTYPE)|VERSION|$(VERSION)|EXE_FILES|$(EXE_FILES) " >>.MM_tmp
- $(NOECHO) $(DOC_INSTALL) "Module" "$(NAME)" <.MM_tmp >>].$self->catfile($self->{DESTINSTALLARCHLIB},'perllocal.pod').q[
- $(NOECHO) $(RM_F) .MM_tmp
-
-doc_vendor_install ::
- $(NOECHO) $(ECHO) "Appending installation info to ].$self->catfile($self->{DESTINSTALLARCHLIB}, 'perllocal.pod').q["
- $(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- $(NOECHO) $(ECHO_N) "installed into|$(INSTALLVENDORLIB)|" >.MM_tmp
- $(NOECHO) $(ECHO_N) "LINKTYPE|$(LINKTYPE)|VERSION|$(VERSION)|EXE_FILES|$(EXE_FILES) " >>.MM_tmp
- $(NOECHO) $(DOC_INSTALL) "Module" "$(NAME)" <.MM_tmp >>].$self->catfile($self->{DESTINSTALLARCHLIB},'perllocal.pod').q[
- $(NOECHO) $(RM_F) .MM_tmp
-
-];
-
- push @m, q[
-uninstall :: uninstall_from_$(INSTALLDIRS)dirs
- $(NOECHO) $(NOOP)
-
-uninstall_from_perldirs ::
- $(NOECHO) $(UNINSTALL) ].$self->catfile($self->{PERL_ARCHLIB},'auto',$self->{FULLEXT},'.packlist').q[
- $(NOECHO) $(ECHO) "Uninstall is now deprecated and makes no actual changes."
- $(NOECHO) $(ECHO) "Please check the list above carefully for errors, and manually remove"
- $(NOECHO) $(ECHO) "the appropriate files. Sorry for the inconvenience."
-
-uninstall_from_sitedirs ::
- $(NOECHO) $(UNINSTALL) ].$self->catfile($self->{SITEARCHEXP},'auto',$self->{FULLEXT},'.packlist').q[
- $(NOECHO) $(ECHO) "Uninstall is now deprecated and makes no actual changes."
- $(NOECHO) $(ECHO) "Please check the list above carefully for errors, and manually remove"
- $(NOECHO) $(ECHO) "the appropriate files. Sorry for the inconvenience."
-];
-
- join('', at m);
-}
-
-=item perldepend (override)
-
-Use VMS-style syntax for files; it's cheaper to just do it directly here
-than to have the MM_Unix method call C<catfile> repeatedly. Also, if
-we have to rebuild Config.pm, use MM[SK] to do it.
-
-=cut
-
-sub perldepend {
- my($self) = @_;
- my(@m);
-
- push @m, '
-$(OBJECT) : $(PERL_INC)EXTERN.h, $(PERL_INC)INTERN.h, $(PERL_INC)XSUB.h
-$(OBJECT) : $(PERL_INC)av.h, $(PERL_INC)cc_runtime.h, $(PERL_INC)config.h
-$(OBJECT) : $(PERL_INC)cop.h, $(PERL_INC)cv.h, $(PERL_INC)embed.h
-$(OBJECT) : $(PERL_INC)embedvar.h, $(PERL_INC)form.h
-$(OBJECT) : $(PERL_INC)gv.h, $(PERL_INC)handy.h, $(PERL_INC)hv.h
-$(OBJECT) : $(PERL_INC)intrpvar.h, $(PERL_INC)iperlsys.h, $(PERL_INC)keywords.h
-$(OBJECT) : $(PERL_INC)mg.h, $(PERL_INC)nostdio.h, $(PERL_INC)op.h
-$(OBJECT) : $(PERL_INC)opcode.h, $(PERL_INC)patchlevel.h
-$(OBJECT) : $(PERL_INC)perl.h, $(PERL_INC)perlio.h
-$(OBJECT) : $(PERL_INC)perlsdio.h, $(PERL_INC)perlvars.h
-$(OBJECT) : $(PERL_INC)perly.h, $(PERL_INC)pp.h, $(PERL_INC)pp_proto.h
-$(OBJECT) : $(PERL_INC)proto.h, $(PERL_INC)regcomp.h, $(PERL_INC)regexp.h
-$(OBJECT) : $(PERL_INC)regnodes.h, $(PERL_INC)scope.h, $(PERL_INC)sv.h
-$(OBJECT) : $(PERL_INC)thread.h, $(PERL_INC)util.h, $(PERL_INC)vmsish.h
-
-' if $self->{OBJECT};
-
- if ($self->{PERL_SRC}) {
- my(@macros);
- my($mmsquals) = '$(USEMAKEFILE)[.vms]$(FIRST_MAKEFILE)';
- push(@macros,'__AXP__=1') if $Config{'archname'} eq 'VMS_AXP';
- push(@macros,'DECC=1') if $Config{'vms_cc_type'} eq 'decc';
- push(@macros,'GNUC=1') if $Config{'vms_cc_type'} eq 'gcc';
- push(@macros,'SOCKET=1') if $Config{'d_has_sockets'};
- push(@macros,qq["CC=$Config{'cc'}"]) if $Config{'cc'} =~ m!/!;
- $mmsquals .= '$(USEMACROS)' . join(',', at macros) . '$(MACROEND)' if @macros;
- push(@m,q[
-# Check for unpropagated config.sh changes. Should never happen.
-# We do NOT just update config.h because that is not sufficient.
-# An out of date config.h is not fatal but complains loudly!
-$(PERL_INC)config.h : $(PERL_SRC)config.sh
- $(NOOP)
-
-$(PERL_ARCHLIB)Config.pm : $(PERL_SRC)config.sh
- $(NOECHO) Write Sys$Error "$(PERL_ARCHLIB)Config.pm may be out of date with config.h or genconfig.pl"
- olddef = F$Environment("Default")
- Set Default $(PERL_SRC)
- $(MMS)],$mmsquals,);
- if ($self->{PERL_ARCHLIB} =~ m|\[-| && $self->{PERL_SRC} =~ m|(\[-+)|) {
- my($prefix,$target) = ($1,$self->fixpath('$(PERL_ARCHLIB)Config.pm',0));
- $target =~ s/\Q$prefix/[/;
- push(@m," $target");
- }
- else { push(@m,' $(MMS$TARGET)'); }
- push(@m,q[
- Set Default 'olddef'
-]);
- }
-
- push(@m, join(" ", map($self->fixpath($_,0),values %{$self->{XS}}))." : \$(XSUBPPDEPS)\n")
- if %{$self->{XS}};
-
- join('', at m);
-}
-
-
-=item makeaperl (override)
-
-Undertake to build a new set of Perl images using VMS commands. Since
-VMS does dynamic loading, it's not necessary to statically link each
-extension into the Perl image, so this isn't the normal build path.
-Consequently, it hasn't really been tested, and may well be incomplete.
-
-=cut
-
-our %olbs; # needs to be localized
-
-sub makeaperl {
- my($self, %attribs) = @_;
- my($makefilename, $searchdirs, $static, $extra, $perlinc, $target, $tmpdir, $libperl) =
- @attribs{qw(MAKE DIRS STAT EXTRA INCL TARGET TMP LIBPERL)};
- my(@m);
- push @m, "
-# --- MakeMaker makeaperl section ---
-MAP_TARGET = $target
-";
- return join '', @m if $self->{PARENT};
-
- my($dir) = join ":", @{$self->{DIR}};
-
- unless ($self->{MAKEAPERL}) {
- push @m, q{
-$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
- $(NOECHO) $(ECHO) "Writing ""$(MMS$TARGET)"" for this $(MAP_TARGET)"
- $(NOECHO) $(PERLRUNINST) \
- Makefile.PL DIR=}, $dir, q{ \
- FIRST_MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
- MAKEAPERL=1 NORECURS=1 };
-
- push @m, map(q[ \\\n\t\t"$_"], @ARGV),q{
-
-$(MAP_TARGET) :: $(MAKE_APERL_FILE)
- $(MAKE)$(USEMAKEFILE)$(MAKE_APERL_FILE) static $(MMS$TARGET)
-};
- push @m, "\n";
-
- return join '', @m;
- }
-
-
- my($linkcmd, at optlibs, at staticpkgs,$extralist,$targdir,$libperldir,%libseen);
- local($_);
-
- # The front matter of the linkcommand...
- $linkcmd = join ' ', $Config{'ld'},
- grep($_, @Config{qw(large split ldflags ccdlflags)});
- $linkcmd =~ s/\s+/ /g;
-
- # Which *.olb files could we make use of...
- local(%olbs); # XXX can this be lexical?
- $olbs{$self->{INST_ARCHAUTODIR}} = "$self->{BASEEXT}\$(LIB_EXT)";
- require File::Find;
- File::Find::find(sub {
- return unless m/\Q$self->{LIB_EXT}\E$/;
- return if m/^libperl/;
-
- if( exists $self->{INCLUDE_EXT} ){
- my $found = 0;
-
- (my $xx = $File::Find::name) =~ s,.*?/auto/,,;
- $xx =~ s,/?$_,,;
- $xx =~ s,/,::,g;
-
- # Throw away anything not explicitly marked for inclusion.
- # DynaLoader is implied.
- foreach my $incl ((@{$self->{INCLUDE_EXT}},'DynaLoader')){
- if( $xx eq $incl ){
- $found++;
- last;
- }
- }
- return unless $found;
- }
- elsif( exists $self->{EXCLUDE_EXT} ){
- (my $xx = $File::Find::name) =~ s,.*?/auto/,,;
- $xx =~ s,/?$_,,;
- $xx =~ s,/,::,g;
-
- # Throw away anything explicitly marked for exclusion
- foreach my $excl (@{$self->{EXCLUDE_EXT}}){
- return if( $xx eq $excl );
- }
- }
-
- $olbs{$ENV{DEFAULT}} = $_;
- }, grep( -d $_, @{$searchdirs || []}));
-
- # We trust that what has been handed in as argument will be buildable
- $static = [] unless $static;
- @olbs{@{$static}} = (1) x @{$static};
-
- $extra = [] unless $extra && ref $extra eq 'ARRAY';
- # Sort the object libraries in inverse order of
- # filespec length to try to insure that dependent extensions
- # will appear before their parents, so the linker will
- # search the parent library to resolve references.
- # (e.g. Intuit::DWIM will precede Intuit, so unresolved
- # references from [.intuit.dwim]dwim.obj can be found
- # in [.intuit]intuit.olb).
- for (sort { length($a) <=> length($b) } keys %olbs) {
- next unless $olbs{$_} =~ /\Q$self->{LIB_EXT}\E$/;
- my($dir) = $self->fixpath($_,1);
- my($extralibs) = $dir . "extralibs.ld";
- my($extopt) = $dir . $olbs{$_};
- $extopt =~ s/$self->{LIB_EXT}$/.opt/;
- push @optlibs, "$dir$olbs{$_}";
- # Get external libraries this extension will need
- if (-f $extralibs ) {
- my %seenthis;
- open my $list, "<", $extralibs or warn $!,next;
- while (<$list>) {
- chomp;
- # Include a library in the link only once, unless it's mentioned
- # multiple times within a single extension's options file, in which
- # case we assume the builder needed to search it again later in the
- # link.
- my $skip = exists($libseen{$_}) && !exists($seenthis{$_});
- $libseen{$_}++; $seenthis{$_}++;
- next if $skip;
- push @$extra,$_;
- }
- }
- # Get full name of extension for ExtUtils::Miniperl
- if (-f $extopt) {
- open my $opt, '<', $extopt or die $!;
- while (<$opt>) {
- next unless /(?:UNIVERSAL|VECTOR)=boot_([\w_]+)/;
- my $pkg = $1;
- $pkg =~ s#__*#::#g;
- push @staticpkgs,$pkg;
- }
- }
- }
- # Place all of the external libraries after all of the Perl extension
- # libraries in the final link, in order to maximize the opportunity
- # for XS code from multiple extensions to resolve symbols against the
- # same external library while only including that library once.
- push @optlibs, @$extra;
-
- $target = "Perl$Config{'exe_ext'}" unless $target;
- my $shrtarget;
- ($shrtarget,$targdir) = fileparse($target);
- $shrtarget =~ s/^([^.]*)/$1Shr/;
- $shrtarget = $targdir . $shrtarget;
- $target = "Perlshr.$Config{'dlext'}" unless $target;
- $tmpdir = "[]" unless $tmpdir;
- $tmpdir = $self->fixpath($tmpdir,1);
- if (@optlibs) { $extralist = join(' ', at optlibs); }
- else { $extralist = ''; }
- # Let ExtUtils::Liblist find the necessary libs for us (but skip PerlShr)
- # that's what we're building here).
- push @optlibs, grep { !/PerlShr/i } split ' ', +($self->ext())[2];
- if ($libperl) {
- unless (-f $libperl || -f ($libperl = $self->catfile($Config{'installarchlib'},'CORE',$libperl))) {
- print STDOUT "Warning: $libperl not found\n";
- undef $libperl;
- }
- }
- unless ($libperl) {
- if (defined $self->{PERL_SRC}) {
- $libperl = $self->catfile($self->{PERL_SRC},"libperl$self->{LIB_EXT}");
- } elsif (-f ($libperl = $self->catfile($Config{'installarchlib'},'CORE',"libperl$self->{LIB_EXT}")) ) {
- } else {
- print STDOUT "Warning: $libperl not found
- If you're going to build a static perl binary, make sure perl is installed
- otherwise ignore this warning\n";
- }
- }
- $libperldir = $self->fixpath((fileparse($libperl))[1],1);
-
- push @m, '
-# Fill in the target you want to produce if it\'s not perl
-MAP_TARGET = ',$self->fixpath($target,0),'
-MAP_SHRTARGET = ',$self->fixpath($shrtarget,0),"
-MAP_LINKCMD = $linkcmd
-MAP_PERLINC = ", $perlinc ? map('"$_" ',@{$perlinc}) : '',"
-MAP_EXTRA = $extralist
-MAP_LIBPERL = ",$self->fixpath($libperl,0),'
-';
-
-
- push @m,"\n${tmpdir}Makeaperl.Opt : \$(MAP_EXTRA)\n";
- foreach (@optlibs) {
- push @m,' $(NOECHO) $(PERL) -e "print q{',$_,'}" >>$(MMS$TARGET)',"\n";
- }
- push @m,"\n${tmpdir}PerlShr.Opt :\n\t";
- push @m,'$(NOECHO) $(PERL) -e "print q{$(MAP_SHRTARGET)}" >$(MMS$TARGET)',"\n";
-
- push @m,'
-$(MAP_SHRTARGET) : $(MAP_LIBPERL) Makeaperl.Opt ',"${libperldir}Perlshr_Attr.Opt",'
- $(MAP_LINKCMD)/Shareable=$(MMS$TARGET) $(MAP_LIBPERL), Makeaperl.Opt/Option ',"${libperldir}Perlshr_Attr.Opt/Option",'
-$(MAP_TARGET) : $(MAP_SHRTARGET) ',"${tmpdir}perlmain\$(OBJ_EXT) ${tmpdir}PerlShr.Opt",'
- $(MAP_LINKCMD) ',"${tmpdir}perlmain\$(OBJ_EXT)",', PerlShr.Opt/Option
- $(NOECHO) $(ECHO) "To install the new ""$(MAP_TARGET)"" binary, say"
- $(NOECHO) $(ECHO) " $(MAKE)$(USEMAKEFILE)$(FIRST_MAKEFILE) inst_perl $(USEMACROS)MAP_TARGET=$(MAP_TARGET)$(ENDMACRO)"
- $(NOECHO) $(ECHO) "To remove the intermediate files, say
- $(NOECHO) $(ECHO) " $(MAKE)$(USEMAKEFILE)$(FIRST_MAKEFILE) map_clean"
-';
- push @m,"\n${tmpdir}perlmain.c : \$(FIRST_MAKEFILE)\n\t\$(NOECHO) \$(PERL) -e 1 >${tmpdir}Writemain.tmp\n";
- push @m, "# More from the 255-char line length limit\n";
- foreach (@staticpkgs) {
- push @m,' $(NOECHO) $(PERL) -e "print q{',$_,qq[}" >>${tmpdir}Writemain.tmp\n];
- }
-
- push @m, sprintf <<'MAKE_FRAG', $tmpdir, $tmpdir;
- $(NOECHO) $(PERL) $(MAP_PERLINC) -ane "use ExtUtils::Miniperl; writemain(@F)" %sWritemain.tmp >$(MMS$TARGET)
- $(NOECHO) $(RM_F) %sWritemain.tmp
-MAKE_FRAG
-
- push @m, q[
-# Still more from the 255-char line length limit
-doc_inst_perl :
- $(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- $(NOECHO) $(ECHO) "Perl binary $(MAP_TARGET)|" >.MM_tmp
- $(NOECHO) $(ECHO) "MAP_STATIC|$(MAP_STATIC)|" >>.MM_tmp
- $(NOECHO) $(PERL) -pl040 -e " " ].$self->catfile('$(INST_ARCHAUTODIR)','extralibs.all'),q[ >>.MM_tmp
- $(NOECHO) $(ECHO) -e "MAP_LIBPERL|$(MAP_LIBPERL)|" >>.MM_tmp
- $(NOECHO) $(DOC_INSTALL) <.MM_tmp >>].$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q[
- $(NOECHO) $(RM_F) .MM_tmp
-];
-
- push @m, "
-inst_perl : pure_inst_perl doc_inst_perl
- \$(NOECHO) \$(NOOP)
-
-pure_inst_perl : \$(MAP_TARGET)
- $self->{CP} \$(MAP_SHRTARGET) ",$self->fixpath($Config{'installbin'},1),"
- $self->{CP} \$(MAP_TARGET) ",$self->fixpath($Config{'installbin'},1),"
-
-clean :: map_clean
- \$(NOECHO) \$(NOOP)
-
-map_clean :
- \$(RM_F) ${tmpdir}perlmain\$(OBJ_EXT) ${tmpdir}perlmain.c \$(FIRST_MAKEFILE)
- \$(RM_F) ${tmpdir}Makeaperl.Opt ${tmpdir}PerlShr.Opt \$(MAP_TARGET)
-";
-
- join '', @m;
-}
-
-
-# --- Output postprocessing section ---
-
-=item maketext_filter (override)
-
-Insure that colons marking targets are preceded by space, in order
-to distinguish the target delimiter from a colon appearing as
-part of a filespec.
-
-=cut
-
-sub maketext_filter {
- my($self, $text) = @_;
-
- $text =~ s/^([^\s:=]+)(:+\s)/$1 $2/mg;
- return $text;
-}
-
-=item prefixify (override)
-
-prefixifying on VMS is simple. Each should simply be:
-
- perl_root:[some.dir]
-
-which can just be converted to:
-
- volume:[your.prefix.some.dir]
-
-otherwise you get the default layout.
-
-In effect, your search prefix is ignored and $Config{vms_prefix} is
-used instead.
-
-=cut
-
-sub prefixify {
- my($self, $var, $sprefix, $rprefix, $default) = @_;
-
- # Translate $(PERLPREFIX) to a real path.
- $rprefix = $self->eliminate_macros($rprefix);
- $rprefix = vmspath($rprefix) if $rprefix;
- $sprefix = vmspath($sprefix) if $sprefix;
-
- $default = vmsify($default)
- unless $default =~ /\[.*\]/;
-
- (my $var_no_install = $var) =~ s/^install//;
- my $path = $self->{uc $var} ||
- $ExtUtils::MM_Unix::Config_Override{lc $var} ||
- $Config{lc $var} || $Config{lc $var_no_install};
-
- if( !$path ) {
- print STDERR " no Config found for $var.\n" if $Verbose >= 2;
- $path = $self->_prefixify_default($rprefix, $default);
- }
- elsif( !$self->{ARGS}{PREFIX} || !$self->file_name_is_absolute($path) ) {
- # do nothing if there's no prefix or if its relative
- }
- elsif( $sprefix eq $rprefix ) {
- print STDERR " no new prefix.\n" if $Verbose >= 2;
- }
- else {
-
- print STDERR " prefixify $var => $path\n" if $Verbose >= 2;
- print STDERR " from $sprefix to $rprefix\n" if $Verbose >= 2;
-
- my($path_vol, $path_dirs) = $self->splitpath( $path );
- if( $path_vol eq $Config{vms_prefix}.':' ) {
- print STDERR " $Config{vms_prefix}: seen\n" if $Verbose >= 2;
-
- $path_dirs =~ s{^\[}{\[.} unless $path_dirs =~ m{^\[\.};
- $path = $self->_catprefix($rprefix, $path_dirs);
- }
- else {
- $path = $self->_prefixify_default($rprefix, $default);
- }
- }
-
- print " now $path\n" if $Verbose >= 2;
- return $self->{uc $var} = $path;
-}
-
-
-sub _prefixify_default {
- my($self, $rprefix, $default) = @_;
-
- print STDERR " cannot prefix, using default.\n" if $Verbose >= 2;
-
- if( !$default ) {
- print STDERR "No default!\n" if $Verbose >= 1;
- return;
- }
- if( !$rprefix ) {
- print STDERR "No replacement prefix!\n" if $Verbose >= 1;
- return '';
- }
-
- return $self->_catprefix($rprefix, $default);
-}
-
-sub _catprefix {
- my($self, $rprefix, $default) = @_;
-
- my($rvol, $rdirs) = $self->splitpath($rprefix);
- if( $rvol ) {
- return $self->catpath($rvol,
- $self->catdir($rdirs, $default),
- ''
- )
- }
- else {
- return $self->catdir($rdirs, $default);
- }
-}
-
-
-=item cd
-
-=cut
-
-sub cd {
- my($self, $dir, @cmds) = @_;
-
- $dir = vmspath($dir);
-
- my $cmd = join "\n\t", map "$_", @cmds;
-
- # No leading tab makes it look right when embedded
- my $make_frag = sprintf <<'MAKE_FRAG', $dir, $cmd;
-startdir = F$Environment("Default")
- Set Default %s
- %s
- Set Default 'startdir'
-MAKE_FRAG
-
- # No trailing newline makes this easier to embed
- chomp $make_frag;
-
- return $make_frag;
-}
-
-
-=item oneliner
-
-=cut
-
-sub oneliner {
- my($self, $cmd, $switches) = @_;
- $switches = [] unless defined $switches;
-
- # Strip leading and trailing newlines
- $cmd =~ s{^\n+}{};
- $cmd =~ s{\n+$}{};
-
- $cmd = $self->quote_literal($cmd);
- $cmd = $self->escape_newlines($cmd);
-
- # Switches must be quoted else they will be lowercased.
- $switches = join ' ', map { qq{"$_"} } @$switches;
-
- return qq{\$(ABSPERLRUN) $switches -e $cmd "--"};
-}
-
-
-=item B<echo>
-
-perl trips up on "<foo>" thinking it's an input redirect. So we use the
-native Write command instead. Besides, its faster.
-
-=cut
-
-sub echo {
- my($self, $text, $file, $appending) = @_;
- $appending ||= 0;
-
- my $opencmd = $appending ? 'Open/Append' : 'Open/Write';
-
- my @cmds = ("\$(NOECHO) $opencmd MMECHOFILE $file ");
- push @cmds, map { '$(NOECHO) Write MMECHOFILE '.$self->quote_literal($_) }
- split /\n/, $text;
- push @cmds, '$(NOECHO) Close MMECHOFILE';
- return @cmds;
-}
-
-
-=item quote_literal
-
-=cut
-
-sub quote_literal {
- my($self, $text) = @_;
-
- # I believe this is all we should need.
- $text =~ s{"}{""}g;
-
- return qq{"$text"};
-}
-
-=item escape_newlines
-
-=cut
-
-sub escape_newlines {
- my($self, $text) = @_;
-
- $text =~ s{\n}{-\n}g;
-
- return $text;
-}
-
-=item max_exec_len
-
-256 characters.
-
-=cut
-
-sub max_exec_len {
- my $self = shift;
-
- return $self->{_MAX_EXEC_LEN} ||= 256;
-}
-
-=item init_linker
-
-=cut
-
-sub init_linker {
- my $self = shift;
- $self->{EXPORT_LIST} ||= '$(BASEEXT).opt';
-
- my $shr = $Config{dbgprefix} . 'PERLSHR';
- if ($self->{PERL_SRC}) {
- $self->{PERL_ARCHIVE} ||=
- $self->catfile($self->{PERL_SRC}, "$shr.$Config{'dlext'}");
- }
- else {
- $self->{PERL_ARCHIVE} ||=
- $ENV{$shr} ? $ENV{$shr} : "Sys\$Share:$shr.$Config{'dlext'}";
- }
-
- $self->{PERL_ARCHIVE_AFTER} ||= '';
-}
-
-
-=item catdir (override)
-
-=item catfile (override)
-
-Eliminate the macros in the output to the MMS/MMK file.
-
-(File::Spec::VMS used to do this for us, but it's being removed)
-
-=cut
-
-sub catdir {
- my $self = shift;
-
- # Process the macros on VMS MMS/MMK
- my @args = map { m{\$\(} ? $self->eliminate_macros($_) : $_ } @_;
-
- my $dir = $self->SUPER::catdir(@args);
-
- # Fix up the directory and force it to VMS format.
- $dir = $self->fixpath($dir, 1);
-
- return $dir;
-}
-
-sub catfile {
- my $self = shift;
-
- # Process the macros on VMS MMS/MMK
- my @args = map { m{\$\(} ? $self->eliminate_macros($_) : $_ } @_;
-
- my $file = $self->SUPER::catfile(@args);
-
- $file = vmsify($file);
-
- return $file
-}
-
-
-=item eliminate_macros
-
-Expands MM[KS]/Make macros in a text string, using the contents of
-identically named elements of C<%$self>, and returns the result
-as a file specification in Unix syntax.
-
-NOTE: This is the canonical version of the method. The version in
-File::Spec::VMS is deprecated.
-
-=cut
-
-sub eliminate_macros {
- my($self,$path) = @_;
- return '' unless $path;
- $self = {} unless ref $self;
-
- if ($path =~ /\s/) {
- return join ' ', map { $self->eliminate_macros($_) } split /\s+/, $path;
- }
-
- my($npath) = unixify($path);
- # sometimes unixify will return a string with an off-by-one trailing null
- $npath =~ s{\0$}{};
-
- my($complex) = 0;
- my($head,$macro,$tail);
-
- # perform m##g in scalar context so it acts as an iterator
- while ($npath =~ m#(.*?)\$\((\S+?)\)(.*)#gs) {
- if (defined $self->{$2}) {
- ($head,$macro,$tail) = ($1,$2,$3);
- if (ref $self->{$macro}) {
- if (ref $self->{$macro} eq 'ARRAY') {
- $macro = join ' ', @{$self->{$macro}};
- }
- else {
- print "Note: can't expand macro \$($macro) containing ",ref($self->{$macro}),
- "\n\t(using MMK-specific deferred substitutuon; MMS will break)\n";
- $macro = "\cB$macro\cB";
- $complex = 1;
- }
- }
- else { ($macro = unixify($self->{$macro})) =~ s#/\Z(?!\n)##; }
- $npath = "$head$macro$tail";
- }
- }
- if ($complex) { $npath =~ s#\cB(.*?)\cB#\${$1}#gs; }
- $npath;
-}
-
-=item fixpath
-
- my $path = $mm->fixpath($path);
- my $path = $mm->fixpath($path, $is_dir);
-
-Catchall routine to clean up problem MM[SK]/Make macros. Expands macros
-in any directory specification, in order to avoid juxtaposing two
-VMS-syntax directories when MM[SK] is run. Also expands expressions which
-are all macro, so that we can tell how long the expansion is, and avoid
-overrunning DCL's command buffer when MM[KS] is running.
-
-fixpath() checks to see whether the result matches the name of a
-directory in the current default directory and returns a directory or
-file specification accordingly. C<$is_dir> can be set to true to
-force fixpath() to consider the path to be a directory or false to force
-it to be a file.
-
-NOTE: This is the canonical version of the method. The version in
-File::Spec::VMS is deprecated.
-
-=cut
-
-sub fixpath {
- my($self,$path,$force_path) = @_;
- return '' unless $path;
- $self = bless {}, $self unless ref $self;
- my($fixedpath,$prefix,$name);
-
- if ($path =~ /[ \t]/) {
- return join ' ',
- map { $self->fixpath($_,$force_path) }
- split /[ \t]+/, $path;
- }
-
- if ($path =~ m#^\$\([^\)]+\)\Z(?!\n)#s || $path =~ m#[/:>\]]#) {
- if ($force_path or $path =~ /(?:DIR\)|\])\Z(?!\n)/) {
- $fixedpath = vmspath($self->eliminate_macros($path));
- }
- else {
- $fixedpath = vmsify($self->eliminate_macros($path));
- }
- }
- elsif ((($prefix,$name) = ($path =~ m#^\$\(([^\)]+)\)(.+)#s)) && $self->{$prefix}) {
- my($vmspre) = $self->eliminate_macros("\$($prefix)");
- # is it a dir or just a name?
- $vmspre = ($vmspre =~ m|/| or $prefix =~ /DIR\Z(?!\n)/) ? vmspath($vmspre) : '';
- $fixedpath = ($vmspre ? $vmspre : $self->{$prefix}) . $name;
- $fixedpath = vmspath($fixedpath) if $force_path;
- }
- else {
- $fixedpath = $path;
- $fixedpath = vmspath($fixedpath) if $force_path;
- }
- # No hints, so we try to guess
- if (!defined($force_path) and $fixedpath !~ /[:>(.\]]/) {
- $fixedpath = vmspath($fixedpath) if -d $fixedpath;
- }
-
- # Trim off root dirname if it's had other dirs inserted in front of it.
- $fixedpath =~ s/\.000000([\]>])/$1/;
- # Special case for VMS absolute directory specs: these will have had device
- # prepended during trip through Unix syntax in eliminate_macros(), since
- # Unix syntax has no way to express "absolute from the top of this device's
- # directory tree".
- if ($path =~ /^[\[>][^.\-]/) { $fixedpath =~ s/^[^\[<]+//; }
-
- return $fixedpath;
-}
-
-
-=item os_flavor
-
-VMS is VMS.
-
-=cut
-
-sub os_flavor {
- return('VMS');
-}
-
-=back
-
-
-=head1 AUTHOR
-
-Original author Charles Bailey F<bailey at newman.upenn.edu>
-
-Maintained by Michael G Schwern F<schwern at pobox.com>
-
-See L<ExtUtils::MakeMaker> for patching and contact information.
-
-
-=cut
-
-1;
-
Deleted: vendor/perl/dist/lib/ExtUtils/MM_VOS.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_VOS.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_VOS.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,50 +0,0 @@
-package ExtUtils::MM_VOS;
-
-use strict;
-our $VERSION = '6.55_02';
-
-require ExtUtils::MM_Unix;
-our @ISA = qw(ExtUtils::MM_Unix);
-
-
-=head1 NAME
-
-ExtUtils::MM_VOS - VOS specific subclass of ExtUtils::MM_Unix
-
-=head1 SYNOPSIS
-
- Don't use this module directly.
- Use ExtUtils::MM and let it choose.
-
-=head1 DESCRIPTION
-
-This is a subclass of ExtUtils::MM_Unix which contains functionality for
-VOS.
-
-Unless otherwise stated it works just like ExtUtils::MM_Unix
-
-=head2 Overridden methods
-
-=head3 extra_clean_files
-
-Cleanup VOS core files
-
-=cut
-
-sub extra_clean_files {
- return qw(*.kp);
-}
-
-
-=head1 AUTHOR
-
-Michael G Schwern <schwern at pobox.com> with code from ExtUtils::MM_Unix
-
-=head1 SEE ALSO
-
-L<ExtUtils::MakeMaker>
-
-=cut
-
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/MM_Win32.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_Win32.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_Win32.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,584 +0,0 @@
-package ExtUtils::MM_Win32;
-
-use strict;
-
-
-=head1 NAME
-
-ExtUtils::MM_Win32 - methods to override UN*X behaviour in ExtUtils::MakeMaker
-
-=head1 SYNOPSIS
-
- use ExtUtils::MM_Win32; # Done internally by ExtUtils::MakeMaker if needed
-
-=head1 DESCRIPTION
-
-See ExtUtils::MM_Unix for a documentation of the methods provided
-there. This package overrides the implementation of these methods, not
-the semantics.
-
-=cut
-
-use ExtUtils::MakeMaker::Config;
-use File::Basename;
-use File::Spec;
-use ExtUtils::MakeMaker qw( neatvalue );
-
-require ExtUtils::MM_Any;
-require ExtUtils::MM_Unix;
-our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
-our $VERSION = '6.55_02';
-
-$ENV{EMXSHELL} = 'sh'; # to run `commands`
-
-my $BORLAND = $Config{'cc'} =~ /^bcc/i ? 1 : 0;
-my $GCC = $Config{'cc'} =~ /^gcc/i ? 1 : 0;
-
-
-=head2 Overridden methods
-
-=over 4
-
-=item B<dlsyms>
-
-=cut
-
-sub dlsyms {
- my($self,%attribs) = @_;
-
- my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
- my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
- my($funclist) = $attribs{FUNCLIST} || $self->{FUNCLIST} || [];
- my($imports) = $attribs{IMPORTS} || $self->{IMPORTS} || {};
- my(@m);
-
- if (not $self->{SKIPHASH}{'dynamic'}) {
- push(@m,"
-$self->{BASEEXT}.def: Makefile.PL
-",
- q! $(PERLRUN) -MExtUtils::Mksymlists \\
- -e "Mksymlists('NAME'=>\"!, $self->{NAME},
- q!\", 'DLBASE' => '!,$self->{DLBASE},
- # The above two lines quoted differently to work around
- # a bug in the 4DOS/4NT command line interpreter. The visible
- # result of the bug was files named q('extension_name',) *with the
- # single quotes and the comma* in the extension build directories.
- q!', 'DL_FUNCS' => !,neatvalue($funcs),
- q!, 'FUNCLIST' => !,neatvalue($funclist),
- q!, 'IMPORTS' => !,neatvalue($imports),
- q!, 'DL_VARS' => !, neatvalue($vars), q!);"
-!);
- }
- join('', at m);
-}
-
-=item replace_manpage_separator
-
-Changes the path separator with .
-
-=cut
-
-sub replace_manpage_separator {
- my($self,$man) = @_;
- $man =~ s,/+,.,g;
- $man;
-}
-
-
-=item B<maybe_command>
-
-Since Windows has nothing as simple as an executable bit, we check the
-file extension.
-
-The PATHEXT env variable will be used to get a list of extensions that
-might indicate a command, otherwise .com, .exe, .bat and .cmd will be
-used by default.
-
-=cut
-
-sub maybe_command {
- my($self,$file) = @_;
- my @e = exists($ENV{'PATHEXT'})
- ? split(/;/, $ENV{PATHEXT})
- : qw(.com .exe .bat .cmd);
- my $e = '';
- for (@e) { $e .= "\Q$_\E|" }
- chop $e;
- # see if file ends in one of the known extensions
- if ($file =~ /($e)$/i) {
- return $file if -e $file;
- }
- else {
- for (@e) {
- return "$file$_" if -e "$file$_";
- }
- }
- return;
-}
-
-
-=item B<init_DIRFILESEP>
-
-Using \ for Windows.
-
-=cut
-
-sub init_DIRFILESEP {
- my($self) = shift;
-
- # The ^ makes sure its not interpreted as an escape in nmake
- $self->{DIRFILESEP} = $self->is_make_type('nmake') ? '^\\' :
- $self->is_make_type('dmake') ? '\\\\'
- : '\\';
-}
-
-=item B<init_others>
-
-Override some of the Unix specific commands with portable
-ExtUtils::Command ones.
-
-Also provide defaults for LD and AR in case the %Config values aren't
-set.
-
-LDLOADLIBS's default is changed to $Config{libs}.
-
-Adjustments are made for Borland's quirks needing -L to come first.
-
-=cut
-
-sub init_others {
- my ($self) = @_;
-
- $self->{NOOP} ||= 'rem';
- $self->{DEV_NULL} ||= '> NUL';
-
- $self->{FIXIN} ||= $self->{PERL_CORE} ?
- "\$(PERLRUN) $self->{PERL_SRC}/win32/bin/pl2bat.pl" :
- 'pl2bat.bat';
-
- $self->{LD} ||= 'link';
- $self->{AR} ||= 'lib';
-
- $self->SUPER::init_others;
-
- # Setting SHELL from $Config{sh} can break dmake. Its ok without it.
- delete $self->{SHELL};
-
- $self->{LDLOADLIBS} ||= $Config{libs};
- # -Lfoo must come first for Borland, so we put it in LDDLFLAGS
- if ($BORLAND) {
- my $libs = $self->{LDLOADLIBS};
- my $libpath = '';
- while ($libs =~ s/(?:^|\s)(("?)-L.+?\2)(?:\s|$)/ /) {
- $libpath .= ' ' if length $libpath;
- $libpath .= $1;
- }
- $self->{LDLOADLIBS} = $libs;
- $self->{LDDLFLAGS} ||= $Config{lddlflags};
- $self->{LDDLFLAGS} .= " $libpath";
- }
-
- return 1;
-}
-
-
-=item init_platform
-
-Add MM_Win32_VERSION.
-
-=item platform_constants
-
-=cut
-
-sub init_platform {
- my($self) = shift;
-
- $self->{MM_Win32_VERSION} = $VERSION;
-}
-
-sub platform_constants {
- my($self) = shift;
- my $make_frag = '';
-
- foreach my $macro (qw(MM_Win32_VERSION))
- {
- next unless defined $self->{$macro};
- $make_frag .= "$macro = $self->{$macro}\n";
- }
-
- return $make_frag;
-}
-
-
-=item special_targets
-
-Add .USESHELL target for dmake.
-
-=cut
-
-sub special_targets {
- my($self) = @_;
-
- my $make_frag = $self->SUPER::special_targets;
-
- $make_frag .= <<'MAKE_FRAG' if $self->is_make_type('dmake');
-.USESHELL :
-MAKE_FRAG
-
- return $make_frag;
-}
-
-
-=item static_lib
-
-Changes how to run the linker.
-
-The rest is duplicate code from MM_Unix. Should move the linker code
-to its own method.
-
-=cut
-
-sub static_lib {
- my($self) = @_;
- return '' unless $self->has_link_code;
-
- my(@m);
- push(@m, <<'END');
-$(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists
- $(RM_RF) $@
-END
-
- # If this extension has its own library (eg SDBM_File)
- # then copy that to $(INST_STATIC) and add $(OBJECT) into it.
- push @m, <<'MAKE_FRAG' if $self->{MYEXTLIB};
- $(CP) $(MYEXTLIB) $@
-MAKE_FRAG
-
- push @m,
-q{ $(AR) }.($BORLAND ? '$@ $(OBJECT:^"+")'
- : ($GCC ? '-ru $@ $(OBJECT)'
- : '-out:$@ $(OBJECT)')).q{
- $(CHMOD) $(PERM_RWX) $@
- $(NOECHO) $(ECHO) "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)\extralibs.ld
-};
-
- # Old mechanism - still available:
- push @m, <<'MAKE_FRAG' if $self->{PERL_SRC} && $self->{EXTRALIBS};
- $(NOECHO) $(ECHO) "$(EXTRALIBS)" >> $(PERL_SRC)\ext.libs
-MAKE_FRAG
-
- join('', @m);
-}
-
-
-=item dynamic_lib
-
-Complicated stuff for Win32 that I don't understand. :(
-
-=cut
-
-sub dynamic_lib {
- my($self, %attribs) = @_;
- return '' unless $self->needs_linking(); #might be because of a subdir
-
- return '' unless $self->has_link_code;
-
- my($otherldflags) = $attribs{OTHERLDFLAGS} || ($BORLAND ? 'c0d32.obj': '');
- my($inst_dynamic_dep) = $attribs{INST_DYNAMIC_DEP} || "";
- my($ldfrom) = '$(LDFROM)';
- my(@m);
-
-# one thing for GCC/Mingw32:
-# we try to overcome non-relocateable-DLL problems by generating
-# a (hopefully unique) image-base from the dll's name
-# -- BKS, 10-19-1999
- if ($GCC) {
- my $dllname = $self->{BASEEXT} . "." . $self->{DLEXT};
- $dllname =~ /(....)(.{0,4})/;
- my $baseaddr = unpack("n", $1 ^ $2);
- $otherldflags .= sprintf("-Wl,--image-base,0x%x0000 ", $baseaddr);
- }
-
- push(@m,'
-# This section creates the dynamically loadable $(INST_DYNAMIC)
-# from $(OBJECT) and possibly $(MYEXTLIB).
-OTHERLDFLAGS = '.$otherldflags.'
-INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
-
-$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
-');
- if ($GCC) {
- push(@m,
- q{ dlltool --def $(EXPORT_LIST) --output-exp dll.exp
- $(LD) -o $@ -Wl,--base-file -Wl,dll.base $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) dll.exp
- dlltool --def $(EXPORT_LIST) --base-file dll.base --output-exp dll.exp
- $(LD) -o $@ $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) dll.exp });
- } elsif ($BORLAND) {
- push(@m,
- q{ $(LD) $(LDDLFLAGS) $(OTHERLDFLAGS) }.$ldfrom.q{,$@,,}
- .($self->is_make_type('dmake')
- ? q{$(PERL_ARCHIVE:s,/,\,) $(LDLOADLIBS:s,/,\,) }
- .q{$(MYEXTLIB:s,/,\,),$(EXPORT_LIST:s,/,\,)}
- : q{$(subst /,\,$(PERL_ARCHIVE)) $(subst /,\,$(LDLOADLIBS)) }
- .q{$(subst /,\,$(MYEXTLIB)),$(subst /,\,$(EXPORT_LIST))})
- .q{,$(RESFILES)});
- } else { # VC
- push(@m,
- q{ $(LD) -out:$@ $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) }
- .q{$(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) -def:$(EXPORT_LIST)});
-
- # Embed the manifest file if it exists
- push(@m, q{
- if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2
- if exist $@.manifest del $@.manifest});
- }
- push @m, '
- $(CHMOD) $(PERM_RWX) $@
-';
-
- join('', at m);
-}
-
-=item extra_clean_files
-
-Clean out some extra dll.{base,exp} files which might be generated by
-gcc. Otherwise, take out all *.pdb files.
-
-=cut
-
-sub extra_clean_files {
- my $self = shift;
-
- return $GCC ? (qw(dll.base dll.exp)) : ('*.pdb');
-}
-
-=item init_linker
-
-=cut
-
-sub init_linker {
- my $self = shift;
-
- $self->{PERL_ARCHIVE} = "\$(PERL_INC)\\$Config{libperl}";
- $self->{PERL_ARCHIVE_AFTER} = '';
- $self->{EXPORT_LIST} = '$(BASEEXT).def';
-}
-
-
-=item perl_script
-
-Checks for the perl program under several common perl extensions.
-
-=cut
-
-sub perl_script {
- my($self,$file) = @_;
- return $file if -r $file && -f _;
- return "$file.pl" if -r "$file.pl" && -f _;
- return "$file.plx" if -r "$file.plx" && -f _;
- return "$file.bat" if -r "$file.bat" && -f _;
- return;
-}
-
-
-=item xs_o
-
-This target is stubbed out. Not sure why.
-
-=cut
-
-sub xs_o {
- return ''
-}
-
-
-=item pasthru
-
-All we send is -nologo to nmake to prevent it from printing its damned
-banner.
-
-=cut
-
-sub pasthru {
- my($self) = shift;
- return "PASTHRU = " . ($self->is_make_type('nmake') ? "-nologo" : "");
-}
-
-
-=item arch_check (override)
-
-Normalize all arguments for consistency of comparison.
-
-=cut
-
-sub arch_check {
- my $self = shift;
-
- # Win32 is an XS module, minperl won't have it.
- # arch_check() is not critical, so just fake it.
- return 1 unless $self->can_load_xs;
- return $self->SUPER::arch_check( map { $self->_normalize_path_name($_) } @_);
-}
-
-sub _normalize_path_name {
- my $self = shift;
- my $file = shift;
-
- require Win32;
- my $short = Win32::GetShortPathName($file);
- return defined $short ? lc $short : lc $file;
-}
-
-
-=item oneliner
-
-These are based on what command.com does on Win98. They may be wrong
-for other Windows shells, I don't know.
-
-=cut
-
-sub oneliner {
- my($self, $cmd, $switches) = @_;
- $switches = [] unless defined $switches;
-
- # Strip leading and trailing newlines
- $cmd =~ s{^\n+}{};
- $cmd =~ s{\n+$}{};
-
- $cmd = $self->quote_literal($cmd);
- $cmd = $self->escape_newlines($cmd);
-
- $switches = join ' ', @$switches;
-
- return qq{\$(ABSPERLRUN) $switches -e $cmd --};
-}
-
-
-sub quote_literal {
- my($self, $text) = @_;
-
- # I don't know if this is correct, but it seems to work on
- # Win98's command.com
- $text =~ s{"}{\\"}g;
-
- # dmake eats '{' inside double quotes and leaves alone { outside double
- # quotes; however it transforms {{ into { either inside and outside double
- # quotes. It also translates }} into }. The escaping below is not
- # 100% correct.
- if( $self->is_make_type('dmake') ) {
- $text =~ s/{/{{/g;
- $text =~ s/}}/}}}/g;
- }
-
- return qq{"$text"};
-}
-
-
-sub escape_newlines {
- my($self, $text) = @_;
-
- # Escape newlines
- $text =~ s{\n}{\\\n}g;
-
- return $text;
-}
-
-
-=item cd
-
-dmake can handle Unix style cd'ing but nmake (at least 1.5) cannot. It
-wants:
-
- cd dir1\dir2
- command
- another_command
- cd ..\..
-
-=cut
-
-sub cd {
- my($self, $dir, @cmds) = @_;
-
- return $self->SUPER::cd($dir, @cmds) unless $self->is_make_type('nmake');
-
- my $cmd = join "\n\t", map "$_", @cmds;
-
- my $updirs = $self->catdir(map { $self->updir } $self->splitdir($dir));
-
- # No leading tab and no trailing newline makes for easier embedding.
- my $make_frag = sprintf <<'MAKE_FRAG', $dir, $cmd, $updirs;
-cd %s
- %s
- cd %s
-MAKE_FRAG
-
- chomp $make_frag;
-
- return $make_frag;
-}
-
-
-=item max_exec_len
-
-nmake 1.50 limits command length to 2048 characters.
-
-=cut
-
-sub max_exec_len {
- my $self = shift;
-
- return $self->{_MAX_EXEC_LEN} ||= 2 * 1024;
-}
-
-
-=item os_flavor
-
-Windows is Win32.
-
-=cut
-
-sub os_flavor {
- return('Win32');
-}
-
-
-=item cflags
-
-Defines the PERLDLL symbol if we are configured for static building since all
-code destined for the perl5xx.dll must be compiled with the PERLDLL symbol
-defined.
-
-=cut
-
-sub cflags {
- my($self,$libperl)=@_;
- return $self->{CFLAGS} if $self->{CFLAGS};
- return '' unless $self->needs_linking();
-
- my $base = $self->SUPER::cflags($libperl);
- foreach (split /\n/, $base) {
- /^(\S*)\s*=\s*(\S*)$/ and $self->{$1} = $2;
- };
- $self->{CCFLAGS} .= " -DPERLDLL" if ($self->{LINKTYPE} eq 'static');
-
- return $self->{CFLAGS} = qq{
-CCFLAGS = $self->{CCFLAGS}
-OPTIMIZE = $self->{OPTIMIZE}
-PERLTYPE = $self->{PERLTYPE}
-};
-
-}
-
-sub is_make_type {
- my($self, $type) = @_;
- return !! ($self->make =~ /\b$type(?:\.exe)?$/);
-}
-
-1;
-__END__
-
-=back
-
-=cut
-
-
Deleted: vendor/perl/dist/lib/ExtUtils/MM_Win95.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MM_Win95.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MM_Win95.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,124 +0,0 @@
-package ExtUtils::MM_Win95;
-
-use strict;
-
-our $VERSION = '6.55_02';
-
-require ExtUtils::MM_Win32;
-our @ISA = qw(ExtUtils::MM_Win32);
-
-use ExtUtils::MakeMaker::Config;
-
-
-=head1 NAME
-
-ExtUtils::MM_Win95 - method to customize MakeMaker for Win9X
-
-=head1 SYNOPSIS
-
- You should not be using this module directly.
-
-=head1 DESCRIPTION
-
-This is a subclass of ExtUtils::MM_Win32 containing changes necessary
-to get MakeMaker playing nice with command.com and other Win9Xisms.
-
-=head2 Overridden methods
-
-Most of these make up for limitations in the Win9x/nmake command shell.
-Mostly its lack of &&.
-
-=over 4
-
-
-=item xs_c
-
-The && problem.
-
-=cut
-
-sub xs_c {
- my($self) = shift;
- return '' unless $self->needs_linking();
- '
-.xs.c:
- $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.c
- '
-}
-
-
-=item xs_cpp
-
-The && problem
-
-=cut
-
-sub xs_cpp {
- my($self) = shift;
- return '' unless $self->needs_linking();
- '
-.xs.cpp:
- $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.cpp
- ';
-}
-
-=item xs_o
-
-The && problem.
-
-=cut
-
-sub xs_o {
- my($self) = shift;
- return '' unless $self->needs_linking();
- '
-.xs$(OBJ_EXT):
- $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.c
- $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c
- ';
-}
-
-
-=item max_exec_len
-
-Win98 chokes on things like Encode if we set the max length to nmake's max
-of 2K. So we go for a more conservative value of 1K.
-
-=cut
-
-sub max_exec_len {
- my $self = shift;
-
- return $self->{_MAX_EXEC_LEN} ||= 1024;
-}
-
-
-=item os_flavor
-
-Win95 and Win98 and WinME are collectively Win9x and Win32
-
-=cut
-
-sub os_flavor {
- my $self = shift;
- return ($self->SUPER::os_flavor, 'Win9x');
-}
-
-
-=back
-
-
-=head1 AUTHOR
-
-Code originally inside MM_Win32. Original author unknown.
-
-Currently maintained by Michael G Schwern C<schwern at pobox.com>.
-
-Send patches and ideas to C<makemaker at perl.org>.
-
-See http://www.makemaker.org.
-
-=cut
-
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/MY.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MY.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MY.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,40 +0,0 @@
-package ExtUtils::MY;
-
-use strict;
-require ExtUtils::MM;
-
-our $VERSION = 6.55_02;
-our @ISA = qw(ExtUtils::MM);
-
-{
- package MY;
- our @ISA = qw(ExtUtils::MY);
-}
-
-sub DESTROY {}
-
-
-=head1 NAME
-
-ExtUtils::MY - ExtUtils::MakeMaker subclass for customization
-
-=head1 SYNOPSIS
-
- # in your Makefile.PL
- sub MY::whatever {
- ...
- }
-
-=head1 DESCRIPTION
-
-B<FOR INTERNAL USE ONLY>
-
-ExtUtils::MY is a subclass of ExtUtils::MM. Its provided in your
-Makefile.PL for you to add and override MakeMaker functionality.
-
-It also provides a convenient alias via the MY class.
-
-ExtUtils::MY might turn out to be a temporary solution, but MY won't
-go away.
-
-=cut
Deleted: vendor/perl/dist/lib/ExtUtils/MakeMaker.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/MakeMaker.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/MakeMaker.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,2809 +0,0 @@
-# $Id: MakeMaker.pm,v 1.1.1.2 2011-02-17 12:49:38 laffer1 Exp $
-package ExtUtils::MakeMaker;
-
-use strict;
-
-BEGIN {require 5.006;}
-
-require Exporter;
-use ExtUtils::MakeMaker::Config;
-use Carp ();
-use File::Path;
-
-our $Verbose = 0; # exported
-our @Parent; # needs to be localized
-our @Get_from_Config; # referenced by MM_Unix
-our @MM_Sections;
-our @Overridable;
-my @Prepend_parent;
-my %Recognized_Att_Keys;
-
-our $VERSION = '6.55_02';
-
-# Emulate something resembling CVS $Revision: 1.1.1.2 $
-(our $Revision = $VERSION) =~ s{_}{};
-$Revision = int $Revision * 10000;
-
-our $Filename = __FILE__; # referenced outside MakeMaker
-
-our @ISA = qw(Exporter);
-our @EXPORT = qw(&WriteMakefile &writeMakefile $Verbose &prompt);
-our @EXPORT_OK = qw($VERSION &neatvalue &mkbootstrap &mksymlists
- &WriteEmptyMakefile);
-
-# These will go away once the last of the Win32 & VMS specific code is
-# purged.
-my $Is_VMS = $^O eq 'VMS';
-my $Is_Win32 = $^O eq 'MSWin32';
-
-full_setup();
-
-require ExtUtils::MM; # Things like CPAN assume loading ExtUtils::MakeMaker
- # will give them MM.
-
-require ExtUtils::MY; # XXX pre-5.8 versions of ExtUtils::Embed expect
- # loading ExtUtils::MakeMaker will give them MY.
- # This will go when Embed is its own CPAN module.
-
-
-sub WriteMakefile {
- Carp::croak "WriteMakefile: Need even number of args" if @_ % 2;
-
- require ExtUtils::MY;
- my %att = @_;
-
- _verify_att(\%att);
-
- my $mm = MM->new(\%att);
- $mm->flush;
-
- return $mm;
-}
-
-
-# Basic signatures of the attributes WriteMakefile takes. Each is the
-# reference type. Empty value indicate it takes a non-reference
-# scalar.
-my %Att_Sigs;
-my %Special_Sigs = (
- C => 'ARRAY',
- CONFIG => 'ARRAY',
- CONFIGURE => 'CODE',
- DIR => 'ARRAY',
- DL_FUNCS => 'HASH',
- DL_VARS => 'ARRAY',
- EXCLUDE_EXT => 'ARRAY',
- EXE_FILES => 'ARRAY',
- FUNCLIST => 'ARRAY',
- H => 'ARRAY',
- IMPORTS => 'HASH',
- INCLUDE_EXT => 'ARRAY',
- LIBS => ['ARRAY',''],
- MAN1PODS => 'HASH',
- MAN3PODS => 'HASH',
- META_ADD => 'HASH',
- META_MERGE => 'HASH',
- PL_FILES => 'HASH',
- PM => 'HASH',
- PMLIBDIRS => 'ARRAY',
- PMLIBPARENTDIRS => 'ARRAY',
- PREREQ_PM => 'HASH',
- BUILD_REQUIRES => 'HASH',
- CONFIGURE_REQUIRES => 'HASH',
- SKIP => 'ARRAY',
- TYPEMAPS => 'ARRAY',
- XS => 'HASH',
- VERSION => ['version',''],
- _KEEP_AFTER_FLUSH => '',
-
- clean => 'HASH',
- depend => 'HASH',
- dist => 'HASH',
- dynamic_lib=> 'HASH',
- linkext => 'HASH',
- macro => 'HASH',
- postamble => 'HASH',
- realclean => 'HASH',
- test => 'HASH',
- tool_autosplit => 'HASH',
-);
-
- at Att_Sigs{keys %Recognized_Att_Keys} = ('') x keys %Recognized_Att_Keys;
- at Att_Sigs{keys %Special_Sigs} = values %Special_Sigs;
-
-
-sub _verify_att {
- my($att) = @_;
-
- while( my($key, $val) = each %$att ) {
- my $sig = $Att_Sigs{$key};
- unless( defined $sig ) {
- warn "WARNING: $key is not a known parameter.\n";
- next;
- }
-
- my @sigs = ref $sig ? @$sig : $sig;
- my $given = ref $val;
- unless( grep { _is_of_type($val, $_) } @sigs ) {
- my $takes = join " or ", map { _format_att($_) } @sigs;
-
- my $has = _format_att($given);
- warn "WARNING: $key takes a $takes not a $has.\n".
- " Please inform the author.\n";
- }
- }
-}
-
-
-# Check if a given thing is a reference or instance of $type
-sub _is_of_type {
- my($thing, $type) = @_;
-
- return 1 if ref $thing eq $type;
-
- local $SIG{__DIE__};
- return 1 if eval{ $thing->isa($type) };
-
- return 0;
-}
-
-
-sub _format_att {
- my $given = shift;
-
- return $given eq '' ? "string/number"
- : uc $given eq $given ? "$given reference"
- : "$given object"
- ;
-}
-
-
-sub prompt ($;$) { ## no critic
- my($mess, $def) = @_;
- Carp::confess("prompt function called without an argument")
- unless defined $mess;
-
- my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) ;
-
- my $dispdef = defined $def ? "[$def] " : " ";
- $def = defined $def ? $def : "";
-
- local $|=1;
- local $\;
- print "$mess $dispdef";
-
- my $ans;
- if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) {
- print "$def\n";
- }
- else {
- $ans = <STDIN>;
- if( defined $ans ) {
- chomp $ans;
- }
- else { # user hit ctrl-D
- print "\n";
- }
- }
-
- return (!defined $ans || $ans eq '') ? $def : $ans;
-}
-
-sub eval_in_subdirs {
- my($self) = @_;
- use Cwd qw(cwd abs_path);
- my $pwd = cwd() || die "Can't figure out your cwd!";
-
- local @INC = map eval {abs_path($_) if -e} || $_, @INC;
- push @INC, '.'; # '.' has to always be at the end of @INC
-
- foreach my $dir (@{$self->{DIR}}){
- my($abs) = $self->catdir($pwd,$dir);
- eval { $self->eval_in_x($abs); };
- last if $@;
- }
- chdir $pwd;
- die $@ if $@;
-}
-
-sub eval_in_x {
- my($self,$dir) = @_;
- chdir $dir or Carp::carp("Couldn't change to directory $dir: $!");
-
- {
- package main;
- do './Makefile.PL';
- };
- if ($@) {
-# if ($@ =~ /prerequisites/) {
-# die "MakeMaker WARNING: $@";
-# } else {
-# warn "WARNING from evaluation of $dir/Makefile.PL: $@";
-# }
- die "ERROR from evaluation of $dir/Makefile.PL: $@";
- }
-}
-
-
-# package name for the classes into which the first object will be blessed
-my $PACKNAME = 'PACK000';
-
-sub full_setup {
- $Verbose ||= 0;
-
- my @attrib_help = qw/
-
- AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION
- C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DISTVNAME
- DL_FUNCS DL_VARS
- EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE
- FULLPERL FULLPERLRUN FULLPERLRUNINST
- FUNCLIST H IMPORTS
-
- INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR
- INSTALLDIRS
- DESTDIR PREFIX INSTALL_BASE
- PERLPREFIX SITEPREFIX VENDORPREFIX
- INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB
- INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH
- INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN
- INSTALLMAN1DIR INSTALLMAN3DIR
- INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR
- INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR
- INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT
- PERL_LIB PERL_ARCHLIB
- SITELIBEXP SITEARCHEXP
-
- INC INCLUDE_EXT LDFROM LIB LIBPERL_A LIBS LICENSE
- LINKTYPE MAKE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET
- META_ADD META_MERGE MIN_PERL_VERSION BUILD_REQUIRES CONFIGURE_REQUIRES
- MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NORECURS NO_VC OBJECT OPTIMIZE
- PERL_MALLOC_OK PERL PERLMAINCC PERLRUN PERLRUNINST PERL_CORE
- PERL_SRC PERM_DIR PERM_RW PERM_RWX
- PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE PPM_INSTALL_EXEC
- PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
- SIGN SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
- XS_VERSION clean depend dist dynamic_lib linkext macro realclean
- tool_autosplit
-
- MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC
- MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED
- /;
-
- # IMPORTS is used under OS/2 and Win32
-
- # @Overridable is close to @MM_Sections but not identical. The
- # order is important. Many subroutines declare macros. These
- # depend on each other. Let's try to collect the macros up front,
- # then pasthru, then the rules.
-
- # MM_Sections are the sections we have to call explicitly
- # in Overridable we have subroutines that are used indirectly
-
-
- @MM_Sections =
- qw(
-
- post_initialize const_config constants platform_constants
- tool_autosplit tool_xsubpp tools_other
-
- makemakerdflt
-
- dist macro depend cflags const_loadlibs const_cccmd
- post_constants
-
- pasthru
-
- special_targets
- c_o xs_c xs_o
- top_targets blibdirs linkext dlsyms dynamic dynamic_bs
- dynamic_lib static static_lib manifypods processPL
- installbin subdirs
- clean_subdirs clean realclean_subdirs realclean
- metafile signature
- dist_basics dist_core distdir dist_test dist_ci distmeta distsignature
- install force perldepend makefile staticmake test ppd
-
- ); # loses section ordering
-
- @Overridable = @MM_Sections;
- push @Overridable, qw[
-
- libscan makeaperl needs_linking
- subdir_x test_via_harness test_via_script
-
- init_VERSION init_dist init_INST init_INSTALL init_DEST init_dirscan
- init_PM init_MANPODS init_xs init_PERL init_DIRFILESEP init_linker
- ];
-
- push @MM_Sections, qw[
-
- pm_to_blib selfdocument
-
- ];
-
- # Postamble needs to be the last that was always the case
- push @MM_Sections, "postamble";
- push @Overridable, "postamble";
-
- # All sections are valid keys.
- @Recognized_Att_Keys{@MM_Sections} = (1) x @MM_Sections;
-
- # we will use all these variables in the Makefile
- @Get_from_Config =
- qw(
- ar cc cccdlflags ccdlflags dlext dlsrc exe_ext full_ar ld
- lddlflags ldflags libc lib_ext obj_ext osname osvers ranlib
- sitelibexp sitearchexp so
- );
-
- # 5.5.3 doesn't have any concept of vendor libs
- push @Get_from_Config, qw( vendorarchexp vendorlibexp ) if $] >= 5.006;
-
- foreach my $item (@attrib_help){
- $Recognized_Att_Keys{$item} = 1;
- }
- foreach my $item (@Get_from_Config) {
- $Recognized_Att_Keys{uc $item} = $Config{$item};
- print "Attribute '\U$item\E' => '$Config{$item}'\n"
- if ($Verbose >= 2);
- }
-
- #
- # When we eval a Makefile.PL in a subdirectory, that one will ask
- # us (the parent) for the values and will prepend "..", so that
- # all files to be installed end up below OUR ./blib
- #
- @Prepend_parent = qw(
- INST_BIN INST_LIB INST_ARCHLIB INST_SCRIPT
- MAP_TARGET INST_MAN1DIR INST_MAN3DIR PERL_SRC
- PERL FULLPERL
- );
-}
-
-sub writeMakefile {
- die <<END;
-
-The extension you are trying to build apparently is rather old and
-most probably outdated. We detect that from the fact, that a
-subroutine "writeMakefile" is called, and this subroutine is not
-supported anymore since about October 1994.
-
-Please contact the author or look into CPAN (details about CPAN can be
-found in the FAQ and at http:/www.perl.com) for a more recent version
-of the extension. If you're really desperate, you can try to change
-the subroutine name from writeMakefile to WriteMakefile and rerun
-'perl Makefile.PL', but you're most probably left alone, when you do
-so.
-
-The MakeMaker team
-
-END
-}
-
-sub new {
- my($class,$self) = @_;
- my($key);
-
- # Store the original args passed to WriteMakefile()
- foreach my $k (keys %$self) {
- $self->{ARGS}{$k} = $self->{$k};
- }
-
- $self = {} unless defined $self;
-
- $self->{PREREQ_PM} ||= {};
- $self->{BUILD_REQUIRES} ||= {};
-
- # Temporarily bless it into MM so it can be used as an
- # object. It will be blessed into a temp package later.
- bless $self, "MM";
-
- if ("@ARGV" =~ /\bPREREQ_PRINT\b/) {
- $self->_PREREQ_PRINT;
- }
-
- # PRINT_PREREQ is RedHatism.
- if ("@ARGV" =~ /\bPRINT_PREREQ\b/) {
- $self->_PRINT_PREREQ;
- }
-
- print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose;
- if (-f "MANIFEST" && ! -f "Makefile"){
- check_manifest();
- }
-
- check_hints($self);
-
- # Translate X.Y.Z to X.00Y00Z
- if( defined $self->{MIN_PERL_VERSION} ) {
- $self->{MIN_PERL_VERSION} =~ s{ ^ (\d+) \. (\d+) \. (\d+) $ }
- {sprintf "%d.%03d%03d", $1, $2, $3}ex;
- }
-
- my $perl_version_ok = eval {
- local $SIG{__WARN__} = sub {
- # simulate "use warnings FATAL => 'all'" for vintage perls
- die @_;
- };
- !$self->{MIN_PERL_VERSION} or $self->{MIN_PERL_VERSION} <= $]
- };
- if (!$perl_version_ok) {
- if (!defined $perl_version_ok) {
- warn <<'END';
-Warning: MIN_PERL_VERSION is not in a recognized format.
-Recommended is a quoted numerical value like '5.005' or '5.008001'.
-END
- }
- elsif ($self->{PREREQ_FATAL}) {
- die sprintf <<"END", $self->{MIN_PERL_VERSION}, $];
-MakeMaker FATAL: perl version too low for this distribution.
-Required is %s. We run %s.
-END
- }
- else {
- warn sprintf
- "Warning: Perl version %s or higher required. We run %s.\n",
- $self->{MIN_PERL_VERSION}, $];
- }
- }
-
- my %configure_att; # record &{$self->{CONFIGURE}} attributes
- my(%initial_att) = %$self; # record initial attributes
-
- my(%unsatisfied) = ();
- my $prereqs = $self->_all_prereqs;
- foreach my $prereq (sort keys %$prereqs) {
- my $required_version = $prereqs->{$prereq};
-
- my $installed_file = MM->_installed_file_for_module($prereq);
- my $pr_version = 0;
- $pr_version = MM->parse_version($installed_file) if $installed_file;
- $pr_version = 0 if $pr_version eq 'undef';
-
- # convert X.Y_Z alpha version #s to X.YZ for easier comparisons
- $pr_version =~ s/(\d+)\.(\d+)_(\d+)/$1.$2$3/;
-
- if (!$installed_file) {
- warn sprintf "Warning: prerequisite %s %s not found.\n",
- $prereq, $required_version
- unless $self->{PREREQ_FATAL};
-
- $unsatisfied{$prereq} = 'not installed';
- }
- elsif ($pr_version < $required_version ){
- warn sprintf "Warning: prerequisite %s %s not found. We have %s.\n",
- $prereq, $required_version, ($pr_version || 'unknown version')
- unless $self->{PREREQ_FATAL};
-
- $unsatisfied{$prereq} = $required_version ? $required_version : 'unknown version' ;
- }
- }
-
- if (%unsatisfied && $self->{PREREQ_FATAL}){
- my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"}
- sort { $a cmp $b } keys %unsatisfied;
- die <<"END";
-MakeMaker FATAL: prerequisites not found.
-$failedprereqs
-
-Please install these modules first and rerun 'perl Makefile.PL'.
-END
- }
-
- if (defined $self->{CONFIGURE}) {
- if (ref $self->{CONFIGURE} eq 'CODE') {
- %configure_att = %{&{$self->{CONFIGURE}}};
- $self = { %$self, %configure_att };
- } else {
- Carp::croak "Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n";
- }
- }
-
- # This is for old Makefiles written pre 5.00, will go away
- if ( Carp::longmess("") =~ /runsubdirpl/s ){
- Carp::carp("WARNING: Please rerun 'perl Makefile.PL' to regenerate your Makefiles\n");
- }
-
- my $newclass = ++$PACKNAME;
- local @Parent = @Parent; # Protect against non-local exits
- {
- print "Blessing Object into class [$newclass]\n" if $Verbose>=2;
- mv_all_methods("MY",$newclass);
- bless $self, $newclass;
- push @Parent, $self;
- require ExtUtils::MY;
-
- no strict 'refs'; ## no critic;
- @{"$newclass\:\:ISA"} = 'MM';
- }
-
- if (defined $Parent[-2]){
- $self->{PARENT} = $Parent[-2];
- for my $key (@Prepend_parent) {
- next unless defined $self->{PARENT}{$key};
-
- # Don't stomp on WriteMakefile() args.
- next if defined $self->{ARGS}{$key} and
- $self->{ARGS}{$key} eq $self->{$key};
-
- $self->{$key} = $self->{PARENT}{$key};
-
- unless ($Is_VMS && $key =~ /PERL$/) {
- $self->{$key} = $self->catdir("..",$self->{$key})
- unless $self->file_name_is_absolute($self->{$key});
- } else {
- # PERL or FULLPERL will be a command verb or even a
- # command with an argument instead of a full file
- # specification under VMS. So, don't turn the command
- # into a filespec, but do add a level to the path of
- # the argument if not already absolute.
- my @cmd = split /\s+/, $self->{$key};
- $cmd[1] = $self->catfile('[-]',$cmd[1])
- unless (@cmd < 2) || $self->file_name_is_absolute($cmd[1]);
- $self->{$key} = join(' ', @cmd);
- }
- }
- if ($self->{PARENT}) {
- $self->{PARENT}->{CHILDREN}->{$newclass} = $self;
- foreach my $opt (qw(POLLUTE PERL_CORE LINKTYPE)) {
- if (exists $self->{PARENT}->{$opt}
- and not exists $self->{$opt})
- {
- # inherit, but only if already unspecified
- $self->{$opt} = $self->{PARENT}->{$opt};
- }
- }
- }
- my @fm = grep /^FIRST_MAKEFILE=/, @ARGV;
- parse_args($self, at fm) if @fm;
- } else {
- parse_args($self,split(' ', $ENV{PERL_MM_OPT} || ''), at ARGV);
- }
-
-
- $self->{NAME} ||= $self->guess_name;
-
- ($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g;
-
- $self->init_MAKE;
- $self->init_main;
- $self->init_VERSION;
- $self->init_dist;
- $self->init_INST;
- $self->init_INSTALL;
- $self->init_DEST;
- $self->init_dirscan;
- $self->init_PM;
- $self->init_MANPODS;
- $self->init_xs;
- $self->init_PERL;
- $self->init_DIRFILESEP;
- $self->init_linker;
- $self->init_ABSTRACT;
-
- $self->arch_check(
- $INC{'Config.pm'},
- $self->catfile($Config{'archlibexp'}, "Config.pm")
- );
-
- $self->init_others();
- $self->init_platform();
- $self->init_PERM();
- my($argv) = neatvalue(\@ARGV);
- $argv =~ s/^\[/(/;
- $argv =~ s/\]$/)/;
-
- push @{$self->{RESULT}}, <<END;
-# This Makefile is for the $self->{NAME} extension to perl.
-#
-# It was generated automatically by MakeMaker version
-# $VERSION (Revision: $Revision) from the contents of
-# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
-#
-# ANY CHANGES MADE HERE WILL BE LOST!
-#
-# MakeMaker ARGV: $argv
-#
-END
-
- push @{$self->{RESULT}}, $self->_MakeMaker_Parameters_section(\%initial_att);
-
- if (defined $self->{CONFIGURE}) {
- push @{$self->{RESULT}}, <<END;
-
-# MakeMaker 'CONFIGURE' Parameters:
-END
- if (scalar(keys %configure_att) > 0) {
- foreach my $key (sort keys %configure_att){
- next if $key eq 'ARGS';
- my($v) = neatvalue($configure_att{$key});
- $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
- $v =~ tr/\n/ /s;
- push @{$self->{RESULT}}, "# $key => $v";
- }
- }
- else
- {
- push @{$self->{RESULT}}, "# no values returned";
- }
- undef %configure_att; # free memory
- }
-
- # turn the SKIP array into a SKIPHASH hash
- for my $skip (@{$self->{SKIP} || []}) {
- $self->{SKIPHASH}{$skip} = 1;
- }
- delete $self->{SKIP}; # free memory
-
- if ($self->{PARENT}) {
- for (qw/install dist dist_basics dist_core distdir dist_test dist_ci/) {
- $self->{SKIPHASH}{$_} = 1;
- }
- }
-
- # We run all the subdirectories now. They don't have much to query
- # from the parent, but the parent has to query them: if they need linking!
- unless ($self->{NORECURS}) {
- $self->eval_in_subdirs if @{$self->{DIR}};
- }
-
- foreach my $section ( @MM_Sections ){
- # Support for new foo_target() methods.
- my $method = $section;
- $method .= '_target' unless $self->can($method);
-
- print "Processing Makefile '$section' section\n" if ($Verbose >= 2);
- my($skipit) = $self->skipcheck($section);
- if ($skipit){
- push @{$self->{RESULT}}, "\n# --- MakeMaker $section section $skipit.";
- } else {
- my(%a) = %{$self->{$section} || {}};
- push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:";
- push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a;
- push @{$self->{RESULT}}, $self->maketext_filter(
- $self->$method( %a )
- );
- }
- }
-
- push @{$self->{RESULT}}, "\n# End.";
-
- $self;
-}
-
-sub WriteEmptyMakefile {
- Carp::croak "WriteEmptyMakefile: Need an even number of args" if @_ % 2;
-
- my %att = @_;
- my $self = MM->new(\%att);
-
- my $new = $self->{MAKEFILE};
- my $old = $self->{MAKEFILE_OLD};
- if (-f $old) {
- _unlink($old) or warn "unlink $old: $!";
- }
- if ( -f $new ) {
- _rename($new, $old) or warn "rename $new => $old: $!"
- }
- open my $mfh, '>', $new or die "open $new for write: $!";
- print $mfh <<'EOP';
-all :
-
-clean :
-
-install :
-
-makemakerdflt :
-
-test :
-
-EOP
- close $mfh or die "close $new for write: $!";
-}
-
-
-=begin private
-
-=head3 _installed_file_for_module
-
- my $file = MM->_installed_file_for_module($module);
-
-Return the first installed .pm $file associated with the $module. The
-one which will show up when you C<use $module>.
-
-$module is something like "strict" or "Test::More".
-
-=end private
-
-=cut
-
-sub _installed_file_for_module {
- my $class = shift;
- my $prereq = shift;
-
- my $file = "$prereq.pm";
- $file =~ s{::}{/}g;
-
- my $path;
- for my $dir (@INC) {
- my $tmp = File::Spec->catfile($dir, $file);
- if ( -r $tmp ) {
- $path = $tmp;
- last;
- }
- }
-
- return $path;
-}
-
-
-# Extracted from MakeMaker->new so we can test it
-sub _MakeMaker_Parameters_section {
- my $self = shift;
- my $att = shift;
-
- my @result = <<'END';
-# MakeMaker Parameters:
-END
-
- # CPAN.pm takes prereqs from this field in 'Makefile'
- # and does not know about BUILD_REQUIRES
- if( $att->{PREREQ_PM} || $att->{BUILD_REQUIRES} ) {
- %{$att->{'PREREQ_PM'}} = (%{$att->{'PREREQ_PM'}||{}}, %{$att->{'BUILD_REQUIRES'}||{}});
- }
-
- foreach my $key (sort keys %$att){
- next if $key eq 'ARGS';
-
- my($v) = neatvalue($att->{$key});
- $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
- $v =~ tr/\n/ /s;
- push @result, "# $key => $v";
- }
-
- return @result;
-}
-
-
-sub check_manifest {
- print STDOUT "Checking if your kit is complete...\n";
- require ExtUtils::Manifest;
- # avoid warning
- $ExtUtils::Manifest::Quiet = $ExtUtils::Manifest::Quiet = 1;
- my(@missed) = ExtUtils::Manifest::manicheck();
- if (@missed) {
- print STDOUT "Warning: the following files are missing in your kit:\n";
- print "\t", join "\n\t", @missed;
- print STDOUT "\n";
- print STDOUT "Please inform the author.\n";
- } else {
- print STDOUT "Looks good\n";
- }
-}
-
-sub parse_args{
- my($self, @args) = @_;
- foreach (@args) {
- unless (m/(.*?)=(.*)/) {
- ++$Verbose if m/^verb/;
- next;
- }
- my($name, $value) = ($1, $2);
- if ($value =~ m/^~(\w+)?/) { # tilde with optional username
- $value =~ s [^~(\w*)]
- [$1 ?
- ((getpwnam($1))[7] || "~$1") :
- (getpwuid($>))[7]
- ]ex;
- }
-
- # Remember the original args passed it. It will be useful later.
- $self->{ARGS}{uc $name} = $self->{uc $name} = $value;
- }
-
- # catch old-style 'potential_libs' and inform user how to 'upgrade'
- if (defined $self->{potential_libs}){
- my($msg)="'potential_libs' => '$self->{potential_libs}' should be";
- if ($self->{potential_libs}){
- print STDOUT "$msg changed to:\n\t'LIBS' => ['$self->{potential_libs}']\n";
- } else {
- print STDOUT "$msg deleted.\n";
- }
- $self->{LIBS} = [$self->{potential_libs}];
- delete $self->{potential_libs};
- }
- # catch old-style 'ARMAYBE' and inform user how to 'upgrade'
- if (defined $self->{ARMAYBE}){
- my($armaybe) = $self->{ARMAYBE};
- print STDOUT "ARMAYBE => '$armaybe' should be changed to:\n",
- "\t'dynamic_lib' => {ARMAYBE => '$armaybe'}\n";
- my(%dl) = %{$self->{dynamic_lib} || {}};
- $self->{dynamic_lib} = { %dl, ARMAYBE => $armaybe};
- delete $self->{ARMAYBE};
- }
- if (defined $self->{LDTARGET}){
- print STDOUT "LDTARGET should be changed to LDFROM\n";
- $self->{LDFROM} = $self->{LDTARGET};
- delete $self->{LDTARGET};
- }
- # Turn a DIR argument on the command line into an array
- if (defined $self->{DIR} && ref \$self->{DIR} eq 'SCALAR') {
- # So they can choose from the command line, which extensions they want
- # the grep enables them to have some colons too much in case they
- # have to build a list with the shell
- $self->{DIR} = [grep $_, split ":", $self->{DIR}];
- }
- # Turn a INCLUDE_EXT argument on the command line into an array
- if (defined $self->{INCLUDE_EXT} && ref \$self->{INCLUDE_EXT} eq 'SCALAR') {
- $self->{INCLUDE_EXT} = [grep $_, split '\s+', $self->{INCLUDE_EXT}];
- }
- # Turn a EXCLUDE_EXT argument on the command line into an array
- if (defined $self->{EXCLUDE_EXT} && ref \$self->{EXCLUDE_EXT} eq 'SCALAR') {
- $self->{EXCLUDE_EXT} = [grep $_, split '\s+', $self->{EXCLUDE_EXT}];
- }
-
- foreach my $mmkey (sort keys %$self){
- next if $mmkey eq 'ARGS';
- print STDOUT " $mmkey => ", neatvalue($self->{$mmkey}), "\n" if $Verbose;
- print STDOUT "'$mmkey' is not a known MakeMaker parameter name.\n"
- unless exists $Recognized_Att_Keys{$mmkey};
- }
- $| = 1 if $Verbose;
-}
-
-sub check_hints {
- my($self) = @_;
- # We allow extension-specific hints files.
-
- require File::Spec;
- my $curdir = File::Spec->curdir;
-
- my $hint_dir = File::Spec->catdir($curdir, "hints");
- return unless -d $hint_dir;
-
- # First we look for the best hintsfile we have
- my($hint)="${^O}_$Config{osvers}";
- $hint =~ s/\./_/g;
- $hint =~ s/_$//;
- return unless $hint;
-
- # Also try without trailing minor version numbers.
- while (1) {
- last if -f File::Spec->catfile($hint_dir, "$hint.pl"); # found
- } continue {
- last unless $hint =~ s/_[^_]*$//; # nothing to cut off
- }
- my $hint_file = File::Spec->catfile($hint_dir, "$hint.pl");
-
- return unless -f $hint_file; # really there
-
- _run_hintfile($self, $hint_file);
-}
-
-sub _run_hintfile {
- our $self;
- local($self) = shift; # make $self available to the hint file.
- my($hint_file) = shift;
-
- local($@, $!);
- print STDERR "Processing hints file $hint_file\n";
-
- # Just in case the ./ isn't on the hint file, which File::Spec can
- # often strip off, we bung the curdir into @INC
- local @INC = (File::Spec->curdir, @INC);
- my $ret = do $hint_file;
- if( !defined $ret ) {
- my $error = $@ || $!;
- print STDERR $error;
- }
-}
-
-sub mv_all_methods {
- my($from,$to) = @_;
-
- # Here you see the *current* list of methods that are overridable
- # from Makefile.PL via MY:: subroutines. As of VERSION 5.07 I'm
- # still trying to reduce the list to some reasonable minimum --
- # because I want to make it easier for the user. A.K.
-
- local $SIG{__WARN__} = sub {
- # can't use 'no warnings redefined', 5.6 only
- warn @_ unless $_[0] =~ /^Subroutine .* redefined/
- };
- foreach my $method (@Overridable) {
-
- # We cannot say "next" here. Nick might call MY->makeaperl
- # which isn't defined right now
-
- # Above statement was written at 4.23 time when Tk-b8 was
- # around. As Tk-b9 only builds with 5.002something and MM 5 is
- # standard, we try to enable the next line again. It was
- # commented out until MM 5.23
-
- next unless defined &{"${from}::$method"};
-
- {
- no strict 'refs'; ## no critic
- *{"${to}::$method"} = \&{"${from}::$method"};
-
- # If we delete a method, then it will be undefined and cannot
- # be called. But as long as we have Makefile.PLs that rely on
- # %MY:: being intact, we have to fill the hole with an
- # inheriting method:
-
- {
- package MY;
- my $super = "SUPER::".$method;
- *{$method} = sub {
- shift->$super(@_);
- };
- }
- }
- }
-
- # We have to clean out %INC also, because the current directory is
- # changed frequently and Graham Barr prefers to get his version
- # out of a History.pl file which is "required" so woudn't get
- # loaded again in another extension requiring a History.pl
-
- # With perl5.002_01 the deletion of entries in %INC caused Tk-b11
- # to core dump in the middle of a require statement. The required
- # file was Tk/MMutil.pm. The consequence is, we have to be
- # extremely careful when we try to give perl a reason to reload a
- # library with same name. The workaround prefers to drop nothing
- # from %INC and teach the writers not to use such libraries.
-
-# my $inc;
-# foreach $inc (keys %INC) {
-# #warn "***$inc*** deleted";
-# delete $INC{$inc};
-# }
-}
-
-sub skipcheck {
- my($self) = shift;
- my($section) = @_;
- if ($section eq 'dynamic') {
- print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ",
- "in skipped section 'dynamic_bs'\n"
- if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
- print STDOUT "Warning (non-fatal): Target 'dynamic' depends on targets ",
- "in skipped section 'dynamic_lib'\n"
- if $self->{SKIPHASH}{dynamic_lib} && $Verbose;
- }
- if ($section eq 'dynamic_lib') {
- print STDOUT "Warning (non-fatal): Target '\$(INST_DYNAMIC)' depends on ",
- "targets in skipped section 'dynamic_bs'\n"
- if $self->{SKIPHASH}{dynamic_bs} && $Verbose;
- }
- if ($section eq 'static') {
- print STDOUT "Warning (non-fatal): Target 'static' depends on targets ",
- "in skipped section 'static_lib'\n"
- if $self->{SKIPHASH}{static_lib} && $Verbose;
- }
- return 'skipped' if $self->{SKIPHASH}{$section};
- return '';
-}
-
-sub flush {
- my $self = shift;
-
- my $finalname = $self->{MAKEFILE};
- print STDOUT "Writing $finalname for $self->{NAME}\n";
-
- unlink($finalname, "MakeMaker.tmp", $Is_VMS ? 'Descrip.MMS' : ());
- open(my $fh,">", "MakeMaker.tmp")
- or die "Unable to open MakeMaker.tmp: $!";
-
- for my $chunk (@{$self->{RESULT}}) {
- print $fh "$chunk\n";
- }
-
- close $fh;
- _rename("MakeMaker.tmp", $finalname) or
- warn "rename MakeMaker.tmp => $finalname: $!";
- chmod 0644, $finalname unless $Is_VMS;
-
- my %keep = map { ($_ => 1) } qw(NEEDS_LINKING HAS_LINK_CODE);
-
- if ($self->{PARENT} && !$self->{_KEEP_AFTER_FLUSH}) {
- foreach (keys %$self) { # safe memory
- delete $self->{$_} unless $keep{$_};
- }
- }
-
- system("$Config::Config{eunicefix} $finalname") unless $Config::Config{eunicefix} eq ":";
-}
-
-
-# This is a rename for OS's where the target must be unlinked first.
-sub _rename {
- my($src, $dest) = @_;
- chmod 0666, $dest;
- unlink $dest;
- return rename $src, $dest;
-}
-
-# This is an unlink for OS's where the target must be writable first.
-sub _unlink {
- my @files = @_;
- chmod 0666, @files;
- return unlink @files;
-}
-
-
-# The following mkbootstrap() is only for installations that are calling
-# the pre-4.1 mkbootstrap() from their old Makefiles. This MakeMaker
-# writes Makefiles, that use ExtUtils::Mkbootstrap directly.
-sub mkbootstrap {
- die <<END;
-!!! Your Makefile has been built such a long time ago, !!!
-!!! that is unlikely to work with current MakeMaker. !!!
-!!! Please rebuild your Makefile !!!
-END
-}
-
-# Ditto for mksymlists() as of MakeMaker 5.17
-sub mksymlists {
- die <<END;
-!!! Your Makefile has been built such a long time ago, !!!
-!!! that is unlikely to work with current MakeMaker. !!!
-!!! Please rebuild your Makefile !!!
-END
-}
-
-sub neatvalue {
- my($v) = @_;
- return "undef" unless defined $v;
- my($t) = ref $v;
- return "q[$v]" unless $t;
- if ($t eq 'ARRAY') {
- my(@m, @neat);
- push @m, "[";
- foreach my $elem (@$v) {
- push @neat, "q[$elem]";
- }
- push @m, join ", ", @neat;
- push @m, "]";
- return join "", @m;
- }
- return "$v" unless $t eq 'HASH';
- my(@m, $key, $val);
- while (($key,$val) = each %$v){
- last unless defined $key; # cautious programming in case (undef,undef) is true
- push(@m,"$key=>".neatvalue($val)) ;
- }
- return "{ ".join(', ', at m)." }";
-}
-
-sub selfdocument {
- my($self) = @_;
- my(@m);
- if ($Verbose){
- push @m, "\n# Full list of MakeMaker attribute values:";
- foreach my $key (sort keys %$self){
- next if $key eq 'RESULT' || $key =~ /^[A-Z][a-z]/;
- my($v) = neatvalue($self->{$key});
- $v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
- $v =~ tr/\n/ /s;
- push @m, "# $key => $v";
- }
- }
- join "\n", @m;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-ExtUtils::MakeMaker - Create a module Makefile
-
-=head1 SYNOPSIS
-
- use ExtUtils::MakeMaker;
-
- WriteMakefile( ATTRIBUTE => VALUE [, ...] );
-
-=head1 DESCRIPTION
-
-This utility is designed to write a Makefile for an extension module
-from a Makefile.PL. It is based on the Makefile.SH model provided by
-Andy Dougherty and the perl5-porters.
-
-It splits the task of generating the Makefile into several subroutines
-that can be individually overridden. Each subroutine returns the text
-it wishes to have written to the Makefile.
-
-MakeMaker is object oriented. Each directory below the current
-directory that contains a Makefile.PL is treated as a separate
-object. This makes it possible to write an unlimited number of
-Makefiles with a single invocation of WriteMakefile().
-
-=head2 How To Write A Makefile.PL
-
-See ExtUtils::MakeMaker::Tutorial.
-
-The long answer is the rest of the manpage :-)
-
-=head2 Default Makefile Behaviour
-
-The generated Makefile enables the user of the extension to invoke
-
- perl Makefile.PL # optionally "perl Makefile.PL verbose"
- make
- make test # optionally set TEST_VERBOSE=1
- make install # See below
-
-The Makefile to be produced may be altered by adding arguments of the
-form C<KEY=VALUE>. E.g.
-
- perl Makefile.PL INSTALL_BASE=~
-
-Other interesting targets in the generated Makefile are
-
- make config # to check if the Makefile is up-to-date
- make clean # delete local temp files (Makefile gets renamed)
- make realclean # delete derived files (including ./blib)
- make ci # check in all the files in the MANIFEST file
- make dist # see below the Distribution Support section
-
-=head2 make test
-
-MakeMaker checks for the existence of a file named F<test.pl> in the
-current directory and if it exists it execute the script with the
-proper set of perl C<-I> options.
-
-MakeMaker also checks for any files matching glob("t/*.t"). It will
-execute all matching files in alphabetical order via the
-L<Test::Harness> module with the C<-I> switches set correctly.
-
-If you'd like to see the raw output of your tests, set the
-C<TEST_VERBOSE> variable to true.
-
- make test TEST_VERBOSE=1
-
-=head2 make testdb
-
-A useful variation of the above is the target C<testdb>. It runs the
-test under the Perl debugger (see L<perldebug>). If the file
-F<test.pl> exists in the current directory, it is used for the test.
-
-If you want to debug some other testfile, set the C<TEST_FILE> variable
-thusly:
-
- make testdb TEST_FILE=t/mytest.t
-
-By default the debugger is called using C<-d> option to perl. If you
-want to specify some other option, set the C<TESTDB_SW> variable:
-
- make testdb TESTDB_SW=-Dx
-
-=head2 make install
-
-make alone puts all relevant files into directories that are named by
-the macros INST_LIB, INST_ARCHLIB, INST_SCRIPT, INST_MAN1DIR and
-INST_MAN3DIR. All these default to something below ./blib if you are
-I<not> building below the perl source directory. If you I<are>
-building below the perl source, INST_LIB and INST_ARCHLIB default to
-../../lib, and INST_SCRIPT is not defined.
-
-The I<install> target of the generated Makefile copies the files found
-below each of the INST_* directories to their INSTALL*
-counterparts. Which counterparts are chosen depends on the setting of
-INSTALLDIRS according to the following table:
-
- INSTALLDIRS set to
- perl site vendor
-
- PERLPREFIX SITEPREFIX VENDORPREFIX
- INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH
- INST_LIB INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB
- INST_BIN INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN
- INST_SCRIPT INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT
- INST_MAN1DIR INSTALLMAN1DIR INSTALLSITEMAN1DIR INSTALLVENDORMAN1DIR
- INST_MAN3DIR INSTALLMAN3DIR INSTALLSITEMAN3DIR INSTALLVENDORMAN3DIR
-
-The INSTALL... macros in turn default to their %Config
-($Config{installprivlib}, $Config{installarchlib}, etc.) counterparts.
-
-You can check the values of these variables on your system with
-
- perl '-V:install.*'
-
-And to check the sequence in which the library directories are
-searched by perl, run
-
- perl -le 'print join $/, @INC'
-
-Sometimes older versions of the module you're installing live in other
-directories in @INC. Because Perl loads the first version of a module it
-finds, not the newest, you might accidentally get one of these older
-versions even after installing a brand new version. To delete I<all other
-versions of the module you're installing> (not simply older ones) set the
-C<UNINST> variable.
-
- make install UNINST=1
-
-
-=head2 INSTALL_BASE
-
-INSTALL_BASE can be passed into Makefile.PL to change where your
-module will be installed. INSTALL_BASE is more like what everyone
-else calls "prefix" than PREFIX is.
-
-To have everything installed in your home directory, do the following.
-
- # Unix users, INSTALL_BASE=~ works fine
- perl Makefile.PL INSTALL_BASE=/path/to/your/home/dir
-
-Like PREFIX, it sets several INSTALL* attributes at once. Unlike
-PREFIX it is easy to predict where the module will end up. The
-installation pattern looks like this:
-
- INSTALLARCHLIB INSTALL_BASE/lib/perl5/$Config{archname}
- INSTALLPRIVLIB INSTALL_BASE/lib/perl5
- INSTALLBIN INSTALL_BASE/bin
- INSTALLSCRIPT INSTALL_BASE/bin
- INSTALLMAN1DIR INSTALL_BASE/man/man1
- INSTALLMAN3DIR INSTALL_BASE/man/man3
-
-INSTALL_BASE in MakeMaker and C<--install_base> in Module::Build (as
-of 0.28) install to the same location. If you want MakeMaker and
-Module::Build to install to the same location simply set INSTALL_BASE
-and C<--install_base> to the same location.
-
-INSTALL_BASE was added in 6.31.
-
-
-=head2 PREFIX and LIB attribute
-
-PREFIX and LIB can be used to set several INSTALL* attributes in one
-go. Here's an example for installing into your home directory.
-
- # Unix users, PREFIX=~ works fine
- perl Makefile.PL PREFIX=/path/to/your/home/dir
-
-This will install all files in the module under your home directory,
-with man pages and libraries going into an appropriate place (usually
-~/man and ~/lib). How the exact location is determined is complicated
-and depends on how your Perl was configured. INSTALL_BASE works more
-like what other build systems call "prefix" than PREFIX and we
-recommend you use that instead.
-
-Another way to specify many INSTALL directories with a single
-parameter is LIB.
-
- perl Makefile.PL LIB=~/lib
-
-This will install the module's architecture-independent files into
-~/lib, the architecture-dependent files into ~/lib/$archname.
-
-Note, that in both cases the tilde expansion is done by MakeMaker, not
-by perl by default, nor by make.
-
-Conflicts between parameters LIB, PREFIX and the various INSTALL*
-arguments are resolved so that:
-
-=over 4
-
-=item *
-
-setting LIB overrides any setting of INSTALLPRIVLIB, INSTALLARCHLIB,
-INSTALLSITELIB, INSTALLSITEARCH (and they are not affected by PREFIX);
-
-=item *
-
-without LIB, setting PREFIX replaces the initial C<$Config{prefix}>
-part of those INSTALL* arguments, even if the latter are explicitly
-set (but are set to still start with C<$Config{prefix}>).
-
-=back
-
-If the user has superuser privileges, and is not working on AFS or
-relatives, then the defaults for INSTALLPRIVLIB, INSTALLARCHLIB,
-INSTALLSCRIPT, etc. will be appropriate, and this incantation will be
-the best:
-
- perl Makefile.PL;
- make;
- make test
- make install
-
-make install per default writes some documentation of what has been
-done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This feature
-can be bypassed by calling make pure_install.
-
-=head2 AFS users
-
-will have to specify the installation directories as these most
-probably have changed since perl itself has been installed. They will
-have to do this by calling
-
- perl Makefile.PL INSTALLSITELIB=/afs/here/today \
- INSTALLSCRIPT=/afs/there/now INSTALLMAN3DIR=/afs/for/manpages
- make
-
-Be careful to repeat this procedure every time you recompile an
-extension, unless you are sure the AFS installation directories are
-still valid.
-
-=head2 Static Linking of a new Perl Binary
-
-An extension that is built with the above steps is ready to use on
-systems supporting dynamic loading. On systems that do not support
-dynamic loading, any newly created extension has to be linked together
-with the available resources. MakeMaker supports the linking process
-by creating appropriate targets in the Makefile whenever an extension
-is built. You can invoke the corresponding section of the makefile with
-
- make perl
-
-That produces a new perl binary in the current directory with all
-extensions linked in that can be found in INST_ARCHLIB, SITELIBEXP,
-and PERL_ARCHLIB. To do that, MakeMaker writes a new Makefile, on
-UNIX, this is called Makefile.aperl (may be system dependent). If you
-want to force the creation of a new perl, it is recommended, that you
-delete this Makefile.aperl, so the directories are searched-through
-for linkable libraries again.
-
-The binary can be installed into the directory where perl normally
-resides on your machine with
-
- make inst_perl
-
-To produce a perl binary with a different name than C<perl>, either say
-
- perl Makefile.PL MAP_TARGET=myperl
- make myperl
- make inst_perl
-
-or say
-
- perl Makefile.PL
- make myperl MAP_TARGET=myperl
- make inst_perl MAP_TARGET=myperl
-
-In any case you will be prompted with the correct invocation of the
-C<inst_perl> target that installs the new binary into INSTALLBIN.
-
-make inst_perl per default writes some documentation of what has been
-done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This
-can be bypassed by calling make pure_inst_perl.
-
-Warning: the inst_perl: target will most probably overwrite your
-existing perl binary. Use with care!
-
-Sometimes you might want to build a statically linked perl although
-your system supports dynamic loading. In this case you may explicitly
-set the linktype with the invocation of the Makefile.PL or make:
-
- perl Makefile.PL LINKTYPE=static # recommended
-
-or
-
- make LINKTYPE=static # works on most systems
-
-=head2 Determination of Perl Library and Installation Locations
-
-MakeMaker needs to know, or to guess, where certain things are
-located. Especially INST_LIB and INST_ARCHLIB (where to put the files
-during the make(1) run), PERL_LIB and PERL_ARCHLIB (where to read
-existing modules from), and PERL_INC (header files and C<libperl*.*>).
-
-Extensions may be built either using the contents of the perl source
-directory tree or from the installed perl library. The recommended way
-is to build extensions after you have run 'make install' on perl
-itself. You can do that in any directory on your hard disk that is not
-below the perl source tree. The support for extensions below the ext
-directory of the perl distribution is only good for the standard
-extensions that come with perl.
-
-If an extension is being built below the C<ext/> directory of the perl
-source then MakeMaker will set PERL_SRC automatically (e.g.,
-C<../..>). If PERL_SRC is defined and the extension is recognized as
-a standard extension, then other variables default to the following:
-
- PERL_INC = PERL_SRC
- PERL_LIB = PERL_SRC/lib
- PERL_ARCHLIB = PERL_SRC/lib
- INST_LIB = PERL_LIB
- INST_ARCHLIB = PERL_ARCHLIB
-
-If an extension is being built away from the perl source then MakeMaker
-will leave PERL_SRC undefined and default to using the installed copy
-of the perl library. The other variables default to the following:
-
- PERL_INC = $archlibexp/CORE
- PERL_LIB = $privlibexp
- PERL_ARCHLIB = $archlibexp
- INST_LIB = ./blib/lib
- INST_ARCHLIB = ./blib/arch
-
-If perl has not yet been installed then PERL_SRC can be defined on the
-command line as shown in the previous section.
-
-
-=head2 Which architecture dependent directory?
-
-If you don't want to keep the defaults for the INSTALL* macros,
-MakeMaker helps you to minimize the typing needed: the usual
-relationship between INSTALLPRIVLIB and INSTALLARCHLIB is determined
-by Configure at perl compilation time. MakeMaker supports the user who
-sets INSTALLPRIVLIB. If INSTALLPRIVLIB is set, but INSTALLARCHLIB not,
-then MakeMaker defaults the latter to be the same subdirectory of
-INSTALLPRIVLIB as Configure decided for the counterparts in %Config ,
-otherwise it defaults to INSTALLPRIVLIB. The same relationship holds
-for INSTALLSITELIB and INSTALLSITEARCH.
-
-MakeMaker gives you much more freedom than needed to configure
-internal variables and get different results. It is worth to mention,
-that make(1) also lets you configure most of the variables that are
-used in the Makefile. But in the majority of situations this will not
-be necessary, and should only be done if the author of a package
-recommends it (or you know what you're doing).
-
-=head2 Using Attributes and Parameters
-
-The following attributes may be specified as arguments to WriteMakefile()
-or as NAME=VALUE pairs on the command line.
-
-=over 2
-
-=item ABSTRACT
-
-One line description of the module. Will be included in PPD file.
-
-=item ABSTRACT_FROM
-
-Name of the file that contains the package description. MakeMaker looks
-for a line in the POD matching /^($package\s-\s)(.*)/. This is typically
-the first line in the "=head1 NAME" section. $2 becomes the abstract.
-
-=item AUTHOR
-
-String containing name (and email address) of package author(s). Is used
-in PPD (Perl Package Description) files for PPM (Perl Package Manager).
-
-=item BINARY_LOCATION
-
-Used when creating PPD files for binary packages. It can be set to a
-full or relative path or URL to the binary archive for a particular
-architecture. For example:
-
- perl Makefile.PL BINARY_LOCATION=x86/Agent.tar.gz
-
-builds a PPD package that references a binary of the C<Agent> package,
-located in the C<x86> directory relative to the PPD itself.
-
-=item BUILD_REQUIRES
-
-A hash of modules that are needed to build your module but not run it.
-
-This will go into the C<build_requires> field of your F<META.yml>.
-
-The format is the same as PREREQ_PM.
-
-=item C
-
-Ref to array of *.c file names. Initialised from a directory scan
-and the values portion of the XS attribute hash. This is not
-currently used by MakeMaker but may be handy in Makefile.PLs.
-
-=item CCFLAGS
-
-String that will be included in the compiler call command line between
-the arguments INC and OPTIMIZE.
-
-=item CONFIG
-
-Arrayref. E.g. [qw(archname manext)] defines ARCHNAME & MANEXT from
-config.sh. MakeMaker will add to CONFIG the following values anyway:
-ar
-cc
-cccdlflags
-ccdlflags
-dlext
-dlsrc
-ld
-lddlflags
-ldflags
-libc
-lib_ext
-obj_ext
-ranlib
-sitelibexp
-sitearchexp
-so
-
-=item CONFIGURE
-
-CODE reference. The subroutine should return a hash reference. The
-hash may contain further attributes, e.g. {LIBS =E<gt> ...}, that have to
-be determined by some evaluation method.
-
-=item CONFIGURE_REQUIRES
-
-A hash of modules that are required to run Makefile.PL itself, but not
-to run your distribution.
-
-This will go into the C<configure_requires> field of your F<META.yml>.
-
-Defaults to C<{ "ExtUtils::MakeMaker" => 0 }>
-
-The format is the same as PREREQ_PM.
-
-=item DEFINE
-
-Something like C<"-DHAVE_UNISTD_H">
-
-=item DESTDIR
-
-This is the root directory into which the code will be installed. It
-I<prepends itself to the normal prefix>. For example, if your code
-would normally go into F</usr/local/lib/perl> you could set DESTDIR=~/tmp/
-and installation would go into F<~/tmp/usr/local/lib/perl>.
-
-This is primarily of use for people who repackage Perl modules.
-
-NOTE: Due to the nature of make, it is important that you put the trailing
-slash on your DESTDIR. F<~/tmp/> not F<~/tmp>.
-
-=item DIR
-
-Ref to array of subdirectories containing Makefile.PLs e.g. ['sdbm']
-in ext/SDBM_File
-
-=item DISTNAME
-
-A safe filename for the package.
-
-Defaults to NAME above but with :: replaced with -.
-
-For example, Foo::Bar becomes Foo-Bar.
-
-=item DISTVNAME
-
-Your name for distributing the package with the version number
-included. This is used by 'make dist' to name the resulting archive
-file.
-
-Defaults to DISTNAME-VERSION.
-
-For example, version 1.04 of Foo::Bar becomes Foo-Bar-1.04.
-
-On some OS's where . has special meaning VERSION_SYM may be used in
-place of VERSION.
-
-=item DL_FUNCS
-
-Hashref of symbol names for routines to be made available as universal
-symbols. Each key/value pair consists of the package name and an
-array of routine names in that package. Used only under AIX, OS/2,
-VMS and Win32 at present. The routine names supplied will be expanded
-in the same way as XSUB names are expanded by the XS() macro.
-Defaults to
-
- {"$(NAME)" => ["boot_$(NAME)" ] }
-
-e.g.
-
- {"RPC" => [qw( boot_rpcb rpcb_gettime getnetconfigent )],
- "NetconfigPtr" => [ 'DESTROY'] }
-
-Please see the L<ExtUtils::Mksymlists> documentation for more information
-about the DL_FUNCS, DL_VARS and FUNCLIST attributes.
-
-=item DL_VARS
-
-Array of symbol names for variables to be made available as universal symbols.
-Used only under AIX, OS/2, VMS and Win32 at present. Defaults to [].
-(e.g. [ qw(Foo_version Foo_numstreams Foo_tree ) ])
-
-=item EXCLUDE_EXT
-
-Array of extension names to exclude when doing a static build. This
-is ignored if INCLUDE_EXT is present. Consult INCLUDE_EXT for more
-details. (e.g. [ qw( Socket POSIX ) ] )
-
-This attribute may be most useful when specified as a string on the
-command line: perl Makefile.PL EXCLUDE_EXT='Socket Safe'
-
-=item EXE_FILES
-
-Ref to array of executable files. The files will be copied to the
-INST_SCRIPT directory. Make realclean will delete them from there
-again.
-
-If your executables start with something like #!perl or
-#!/usr/bin/perl MakeMaker will change this to the path of the perl
-'Makefile.PL' was invoked with so the programs will be sure to run
-properly even if perl is not in /usr/bin/perl.
-
-=item FIRST_MAKEFILE
-
-The name of the Makefile to be produced. This is used for the second
-Makefile that will be produced for the MAP_TARGET.
-
-Defaults to 'Makefile' or 'Descrip.MMS' on VMS.
-
-(Note: we couldn't use MAKEFILE because dmake uses this for something
-else).
-
-=item FULLPERL
-
-Perl binary able to run this extension, load XS modules, etc...
-
-=item FULLPERLRUN
-
-Like PERLRUN, except it uses FULLPERL.
-
-=item FULLPERLRUNINST
-
-Like PERLRUNINST, except it uses FULLPERL.
-
-=item FUNCLIST
-
-This provides an alternate means to specify function names to be
-exported from the extension. Its value is a reference to an
-array of function names to be exported by the extension. These
-names are passed through unaltered to the linker options file.
-
-=item H
-
-Ref to array of *.h file names. Similar to C.
-
-=item IMPORTS
-
-This attribute is used to specify names to be imported into the
-extension. Takes a hash ref.
-
-It is only used on OS/2 and Win32.
-
-=item INC
-
-Include file dirs eg: C<"-I/usr/5include -I/path/to/inc">
-
-=item INCLUDE_EXT
-
-Array of extension names to be included when doing a static build.
-MakeMaker will normally build with all of the installed extensions when
-doing a static build, and that is usually the desired behavior. If
-INCLUDE_EXT is present then MakeMaker will build only with those extensions
-which are explicitly mentioned. (e.g. [ qw( Socket POSIX ) ])
-
-It is not necessary to mention DynaLoader or the current extension when
-filling in INCLUDE_EXT. If the INCLUDE_EXT is mentioned but is empty then
-only DynaLoader and the current extension will be included in the build.
-
-This attribute may be most useful when specified as a string on the
-command line: perl Makefile.PL INCLUDE_EXT='POSIX Socket Devel::Peek'
-
-=item INSTALLARCHLIB
-
-Used by 'make install', which copies files from INST_ARCHLIB to this
-directory if INSTALLDIRS is set to perl.
-
-=item INSTALLBIN
-
-Directory to install binary files (e.g. tkperl) into if
-INSTALLDIRS=perl.
-
-=item INSTALLDIRS
-
-Determines which of the sets of installation directories to choose:
-perl, site or vendor. Defaults to site.
-
-=item INSTALLMAN1DIR
-
-=item INSTALLMAN3DIR
-
-These directories get the man pages at 'make install' time if
-INSTALLDIRS=perl. Defaults to $Config{installman*dir}.
-
-If set to 'none', no man pages will be installed.
-
-=item INSTALLPRIVLIB
-
-Used by 'make install', which copies files from INST_LIB to this
-directory if INSTALLDIRS is set to perl.
-
-Defaults to $Config{installprivlib}.
-
-=item INSTALLSCRIPT
-
-Used by 'make install' which copies files from INST_SCRIPT to this
-directory if INSTALLDIRS=perl.
-
-=item INSTALLSITEARCH
-
-Used by 'make install', which copies files from INST_ARCHLIB to this
-directory if INSTALLDIRS is set to site (default).
-
-=item INSTALLSITEBIN
-
-Used by 'make install', which copies files from INST_BIN to this
-directory if INSTALLDIRS is set to site (default).
-
-=item INSTALLSITELIB
-
-Used by 'make install', which copies files from INST_LIB to this
-directory if INSTALLDIRS is set to site (default).
-
-=item INSTALLSITEMAN1DIR
-
-=item INSTALLSITEMAN3DIR
-
-These directories get the man pages at 'make install' time if
-INSTALLDIRS=site (default). Defaults to
-$(SITEPREFIX)/man/man$(MAN*EXT).
-
-If set to 'none', no man pages will be installed.
-
-=item INSTALLSITESCRIPT
-
-Used by 'make install' which copies files from INST_SCRIPT to this
-directory if INSTALLDIRS is set to site (default).
-
-=item INSTALLVENDORARCH
-
-Used by 'make install', which copies files from INST_ARCHLIB to this
-directory if INSTALLDIRS is set to vendor.
-
-=item INSTALLVENDORBIN
-
-Used by 'make install', which copies files from INST_BIN to this
-directory if INSTALLDIRS is set to vendor.
-
-=item INSTALLVENDORLIB
-
-Used by 'make install', which copies files from INST_LIB to this
-directory if INSTALLDIRS is set to vendor.
-
-=item INSTALLVENDORMAN1DIR
-
-=item INSTALLVENDORMAN3DIR
-
-These directories get the man pages at 'make install' time if
-INSTALLDIRS=vendor. Defaults to $(VENDORPREFIX)/man/man$(MAN*EXT).
-
-If set to 'none', no man pages will be installed.
-
-=item INSTALLVENDORSCRIPT
-
-Used by 'make install' which copies files from INST_SCRIPT to this
-directory if INSTALLDIRS is set to vendor.
-
-=item INST_ARCHLIB
-
-Same as INST_LIB for architecture dependent files.
-
-=item INST_BIN
-
-Directory to put real binary files during 'make'. These will be copied
-to INSTALLBIN during 'make install'
-
-=item INST_LIB
-
-Directory where we put library files of this extension while building
-it.
-
-=item INST_MAN1DIR
-
-Directory to hold the man pages at 'make' time
-
-=item INST_MAN3DIR
-
-Directory to hold the man pages at 'make' time
-
-=item INST_SCRIPT
-
-Directory, where executable files should be installed during
-'make'. Defaults to "./blib/script", just to have a dummy location during
-testing. make install will copy the files in INST_SCRIPT to
-INSTALLSCRIPT.
-
-=item LD
-
-Program to be used to link libraries for dynamic loading.
-
-Defaults to $Config{ld}.
-
-=item LDDLFLAGS
-
-Any special flags that might need to be passed to ld to create a
-shared library suitable for dynamic loading. It is up to the makefile
-to use it. (See L<Config/lddlflags>)
-
-Defaults to $Config{lddlflags}.
-
-=item LDFROM
-
-Defaults to "$(OBJECT)" and is used in the ld command to specify
-what files to link/load from (also see dynamic_lib below for how to
-specify ld flags)
-
-=item LIB
-
-LIB should only be set at C<perl Makefile.PL> time but is allowed as a
-MakeMaker argument. It has the effect of setting both INSTALLPRIVLIB
-and INSTALLSITELIB to that value regardless any explicit setting of
-those arguments (or of PREFIX). INSTALLARCHLIB and INSTALLSITEARCH
-are set to the corresponding architecture subdirectory.
-
-=item LIBPERL_A
-
-The filename of the perllibrary that will be used together with this
-extension. Defaults to libperl.a.
-
-=item LIBS
-
-An anonymous array of alternative library
-specifications to be searched for (in order) until
-at least one library is found. E.g.
-
- 'LIBS' => ["-lgdbm", "-ldbm -lfoo", "-L/path -ldbm.nfs"]
-
-Mind, that any element of the array
-contains a complete set of arguments for the ld
-command. So do not specify
-
- 'LIBS' => ["-ltcl", "-ltk", "-lX11"]
-
-See ODBM_File/Makefile.PL for an example, where an array is needed. If
-you specify a scalar as in
-
- 'LIBS' => "-ltcl -ltk -lX11"
-
-MakeMaker will turn it into an array with one element.
-
-=item LICENSE
-
-The licensing terms of your distribution. Generally its "perl" for the
-same license as Perl itself.
-
-See L<Module::Build::API> for the list of options.
-
-Defaults to "unknown".
-
-=item LINKTYPE
-
-'static' or 'dynamic' (default unless usedl=undef in
-config.sh). Should only be used to force static linking (also see
-linkext below).
-
-=item MAKE
-
-Variant of make you intend to run the generated Makefile with. This
-parameter lets Makefile.PL know what make quirks to account for when
-generating the Makefile.
-
-MakeMaker also honors the MAKE environment variable. This parameter
-takes precedent.
-
-Currently the only significant values are 'dmake' and 'nmake' for Windows
-users.
-
-Defaults to $Config{make}.
-
-=item MAKEAPERL
-
-Boolean which tells MakeMaker, that it should include the rules to
-make a perl. This is handled automatically as a switch by
-MakeMaker. The user normally does not need it.
-
-=item MAKEFILE_OLD
-
-When 'make clean' or similar is run, the $(FIRST_MAKEFILE) will be
-backed up at this location.
-
-Defaults to $(FIRST_MAKEFILE).old or $(FIRST_MAKEFILE)_old on VMS.
-
-=item MAN1PODS
-
-Hashref of pod-containing files. MakeMaker will default this to all
-EXE_FILES files that include POD directives. The files listed
-here will be converted to man pages and installed as was requested
-at Configure time.
-
-This hash should map POD files (or scripts containing POD) to the
-man file names under the C<blib/man1/> directory, as in the following
-example:
-
- MAN1PODS => {
- 'doc/command.pod' => 'blib/man1/command.1',
- 'scripts/script.pl' => 'blib/man1/script.1',
- }
-
-=item MAN3PODS
-
-Hashref that assigns to *.pm and *.pod files the files into which the
-manpages are to be written. MakeMaker parses all *.pod and *.pm files
-for POD directives. Files that contain POD will be the default keys of
-the MAN3PODS hashref. These will then be converted to man pages during
-C<make> and will be installed during C<make install>.
-
-Example similar to MAN1PODS.
-
-=item MAP_TARGET
-
-If it is intended, that a new perl binary be produced, this variable
-may hold a name for that binary. Defaults to perl
-
-=item META_ADD
-
-=item META_MERGE
-
-A hashrefs of items to add to the F<META.yml>.
-
-They differ in how they behave if they have the same key as the
-default metadata. META_ADD will override the default value with it's
-own. META_MERGE will merge its value with the default.
-
-Unless you want to override the defaults, prefer META_MERGE so as to
-get the advantage of any future defaults.
-
-=item MIN_PERL_VERSION
-
-The minimum required version of Perl for this distribution.
-
-Either 5.006001 or 5.6.1 format is acceptable.
-
-=item MYEXTLIB
-
-If the extension links to a library that it builds set this to the
-name of the library (see SDBM_File)
-
-=item NAME
-
-Perl module name for this extension (DBD::Oracle). This will default
-to the directory name but should be explicitly defined in the
-Makefile.PL.
-
-=item NEEDS_LINKING
-
-MakeMaker will figure out if an extension contains linkable code
-anywhere down the directory tree, and will set this variable
-accordingly, but you can speed it up a very little bit if you define
-this boolean variable yourself.
-
-=item NOECHO
-
-Command so make does not print the literal commands its running.
-
-By setting it to an empty string you can generate a Makefile that
-prints all commands. Mainly used in debugging MakeMaker itself.
-
-Defaults to C<@>.
-
-=item NORECURS
-
-Boolean. Attribute to inhibit descending into subdirectories.
-
-=item NO_META
-
-When true, suppresses the generation and addition to the MANIFEST of
-the META.yml module meta-data file during 'make distdir'.
-
-Defaults to false.
-
-=item NO_VC
-
-In general, any generated Makefile checks for the current version of
-MakeMaker and the version the Makefile was built under. If NO_VC is
-set, the version check is neglected. Do not write this into your
-Makefile.PL, use it interactively instead.
-
-=item OBJECT
-
-List of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be a long
-string containing all object files, e.g. "tkpBind.o
-tkpButton.o tkpCanvas.o"
-
-(Where BASEEXT is the last component of NAME, and OBJ_EXT is $Config{obj_ext}.)
-
-=item OPTIMIZE
-
-Defaults to C<-O>. Set it to C<-g> to turn debugging on. The flag is
-passed to subdirectory makes.
-
-=item PERL
-
-Perl binary for tasks that can be done by miniperl
-
-=item PERL_CORE
-
-Set only when MakeMaker is building the extensions of the Perl core
-distribution.
-
-=item PERLMAINCC
-
-The call to the program that is able to compile perlmain.c. Defaults
-to $(CC).
-
-=item PERL_ARCHLIB
-
-Same as for PERL_LIB, but for architecture dependent files.
-
-Used only when MakeMaker is building the extensions of the Perl core
-distribution (because normally $(PERL_ARCHLIB) is automatically in @INC,
-and adding it would get in the way of PERL5LIB).
-
-=item PERL_LIB
-
-Directory containing the Perl library to use.
-
-Used only when MakeMaker is building the extensions of the Perl core
-distribution (because normally $(PERL_LIB) is automatically in @INC,
-and adding it would get in the way of PERL5LIB).
-
-=item PERL_MALLOC_OK
-
-defaults to 0. Should be set to TRUE if the extension can work with
-the memory allocation routines substituted by the Perl malloc() subsystem.
-This should be applicable to most extensions with exceptions of those
-
-=over 4
-
-=item *
-
-with bugs in memory allocations which are caught by Perl's malloc();
-
-=item *
-
-which interact with the memory allocator in other ways than via
-malloc(), realloc(), free(), calloc(), sbrk() and brk();
-
-=item *
-
-which rely on special alignment which is not provided by Perl's malloc().
-
-=back
-
-B<NOTE.> Negligence to set this flag in I<any one> of loaded extension
-nullifies many advantages of Perl's malloc(), such as better usage of
-system resources, error detection, memory usage reporting, catchable failure
-of memory allocations, etc.
-
-=item PERLPREFIX
-
-Directory under which core modules are to be installed.
-
-Defaults to $Config{installprefixexp} falling back to
-$Config{installprefix}, $Config{prefixexp} or $Config{prefix} should
-$Config{installprefixexp} not exist.
-
-Overridden by PREFIX.
-
-=item PERLRUN
-
-Use this instead of $(PERL) when you wish to run perl. It will set up
-extra necessary flags for you.
-
-=item PERLRUNINST
-
-Use this instead of $(PERL) when you wish to run perl to work with
-modules. It will add things like -I$(INST_ARCH) and other necessary
-flags so perl can see the modules you're about to install.
-
-=item PERL_SRC
-
-Directory containing the Perl source code (use of this should be
-avoided, it may be undefined)
-
-=item PERM_DIR
-
-Desired permission for directories. Defaults to C<755>.
-
-=item PERM_RW
-
-Desired permission for read/writable files. Defaults to C<644>.
-
-=item PERM_RWX
-
-Desired permission for executable files. Defaults to C<755>.
-
-=item PL_FILES
-
-MakeMaker can run programs to generate files for you at build time.
-By default any file named *.PL (except Makefile.PL and Build.PL) in
-the top level directory will be assumed to be a Perl program and run
-passing its own basename in as an argument. For example...
-
- perl foo.PL foo
-
-This behavior can be overridden by supplying your own set of files to
-search. PL_FILES accepts a hash ref, the key being the file to run
-and the value is passed in as the first argument when the PL file is run.
-
- PL_FILES => {'bin/foobar.PL' => 'bin/foobar'}
-
-Would run bin/foobar.PL like this:
-
- perl bin/foobar.PL bin/foobar
-
-If multiple files from one program are desired an array ref can be used.
-
- PL_FILES => {'bin/foobar.PL' => [qw(bin/foobar1 bin/foobar2)]}
-
-In this case the program will be run multiple times using each target file.
-
- perl bin/foobar.PL bin/foobar1
- perl bin/foobar.PL bin/foobar2
-
-PL files are normally run B<after> pm_to_blib and include INST_LIB and
-INST_ARCH in its C<@INC> so the just built modules can be
-accessed... unless the PL file is making a module (or anything else in
-PM) in which case it is run B<before> pm_to_blib and does not include
-INST_LIB and INST_ARCH in its C<@INC>. This apparently odd behavior
-is there for backwards compatibility (and its somewhat DWIM).
-
-
-=item PM
-
-Hashref of .pm files and *.pl files to be installed. e.g.
-
- {'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm'}
-
-By default this will include *.pm and *.pl and the files found in
-the PMLIBDIRS directories. Defining PM in the
-Makefile.PL will override PMLIBDIRS.
-
-=item PMLIBDIRS
-
-Ref to array of subdirectories containing library files. Defaults to
-[ 'lib', $(BASEEXT) ]. The directories will be scanned and I<any> files
-they contain will be installed in the corresponding location in the
-library. A libscan() method can be used to alter the behaviour.
-Defining PM in the Makefile.PL will override PMLIBDIRS.
-
-(Where BASEEXT is the last component of NAME.)
-
-=item PM_FILTER
-
-A filter program, in the traditional Unix sense (input from stdin, output
-to stdout) that is passed on each .pm file during the build (in the
-pm_to_blib() phase). It is empty by default, meaning no filtering is done.
-
-Great care is necessary when defining the command if quoting needs to be
-done. For instance, you would need to say:
-
- {'PM_FILTER' => 'grep -v \\"^\\#\\"'}
-
-to remove all the leading comments on the fly during the build. The
-extra \\ are necessary, unfortunately, because this variable is interpolated
-within the context of a Perl program built on the command line, and double
-quotes are what is used with the -e switch to build that command line. The
-# is escaped for the Makefile, since what is going to be generated will then
-be:
-
- PM_FILTER = grep -v \"^\#\"
-
-Without the \\ before the #, we'd have the start of a Makefile comment,
-and the macro would be incorrectly defined.
-
-=item POLLUTE
-
-Release 5.005 grandfathered old global symbol names by providing preprocessor
-macros for extension source compatibility. As of release 5.6, these
-preprocessor definitions are not available by default. The POLLUTE flag
-specifies that the old names should still be defined:
-
- perl Makefile.PL POLLUTE=1
-
-Please inform the module author if this is necessary to successfully install
-a module under 5.6 or later.
-
-=item PPM_INSTALL_EXEC
-
-Name of the executable used to run C<PPM_INSTALL_SCRIPT> below. (e.g. perl)
-
-=item PPM_INSTALL_SCRIPT
-
-Name of the script that gets executed by the Perl Package Manager after
-the installation of a package.
-
-=item PREFIX
-
-This overrides all the default install locations. Man pages,
-libraries, scripts, etc... MakeMaker will try to make an educated
-guess about where to place things under the new PREFIX based on your
-Config defaults. Failing that, it will fall back to a structure
-which should be sensible for your platform.
-
-If you specify LIB or any INSTALL* variables they will not be effected
-by the PREFIX.
-
-=item PREREQ_FATAL
-
-Bool. If this parameter is true, failing to have the required modules
-(or the right versions thereof) will be fatal. C<perl Makefile.PL>
-will C<die> instead of simply informing the user of the missing dependencies.
-
-It is I<extremely> rare to have to use C<PREREQ_FATAL>. Its use by module
-authors is I<strongly discouraged> and should never be used lightly.
-Module installation tools have ways of resolving umet dependencies but
-to do that they need a F<Makefile>. Using C<PREREQ_FATAL> breaks this.
-That's bad.
-
-The only situation where it is appropriate is when you have
-dependencies that are indispensible to actually I<write> a
-F<Makefile>. For example, MakeMaker's F<Makefile.PL> needs L<File::Spec>.
-If its not available it cannot write the F<Makefile>.
-
-Note: see L<Test::Harness> for a shortcut for stopping tests early
-if you are missing dependencies and are afraid that users might
-use your module with an incomplete environment.
-
-=item PREREQ_PM
-
-A hash of modules that are needed to run your module. The keys are
-the module names ie. Test::More, and the minimum version is the
-value. If the required version number is 0 any version will do.
-
-This will go into the C<requires> field of your F<META.yml>.
-
- PREREQ_PM => {
- # Require Test::More at least 0.47
- "Test::More" => "0.47",
-
- # Require any version of Acme::Buffy
- "Acme::Buffy" => 0,
- }
-
-=item PREREQ_PRINT
-
-Bool. If this parameter is true, the prerequisites will be printed to
-stdout and MakeMaker will exit. The output format is an evalable hash
-ref.
-
- $PREREQ_PM = {
- 'A::B' => Vers1,
- 'C::D' => Vers2,
- ...
- };
-
-If a distribution defines a minimal required perl version, this is
-added to the output as an additional line of the form:
-
- $MIN_PERL_VERSION = '5.008001';
-
-If BUILD_REQUIRES is not empty, it will be dumped as $BUILD_REQUIRES hasref.
-
-=item PRINT_PREREQ
-
-RedHatism for C<PREREQ_PRINT>. The output format is different, though:
-
- perl(A::B)>=Vers1 perl(C::D)>=Vers2 ...
-
-A minimal required perl version, if present, will look like this:
-
- perl(perl)>=5.008001
-
-=item SITEPREFIX
-
-Like PERLPREFIX, but only for the site install locations.
-
-Defaults to $Config{siteprefixexp}. Perls prior to 5.6.0 didn't have
-an explicit siteprefix in the Config. In those cases
-$Config{installprefix} will be used.
-
-Overridable by PREFIX
-
-=item SIGN
-
-When true, perform the generation and addition to the MANIFEST of the
-SIGNATURE file in the distdir during 'make distdir', via 'cpansign
--s'.
-
-Note that you need to install the Module::Signature module to
-perform this operation.
-
-Defaults to false.
-
-=item SKIP
-
-Arrayref. E.g. [qw(name1 name2)] skip (do not write) sections of the
-Makefile. Caution! Do not use the SKIP attribute for the negligible
-speedup. It may seriously damage the resulting Makefile. Only use it
-if you really need it.
-
-=item TYPEMAPS
-
-Ref to array of typemap file names. Use this when the typemaps are
-in some directory other than the current directory or when they are
-not named B<typemap>. The last typemap in the list takes
-precedence. A typemap in the current directory has highest
-precedence, even if it isn't listed in TYPEMAPS. The default system
-typemap has lowest precedence.
-
-=item VENDORPREFIX
-
-Like PERLPREFIX, but only for the vendor install locations.
-
-Defaults to $Config{vendorprefixexp}.
-
-Overridable by PREFIX
-
-=item VERBINST
-
-If true, make install will be verbose
-
-=item VERSION
-
-Your version number for distributing the package. This defaults to
-0.1.
-
-=item VERSION_FROM
-
-Instead of specifying the VERSION in the Makefile.PL you can let
-MakeMaker parse a file to determine the version number. The parsing
-routine requires that the file named by VERSION_FROM contains one
-single line to compute the version number. The first line in the file
-that contains the regular expression
-
- /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/
-
-will be evaluated with eval() and the value of the named variable
-B<after> the eval() will be assigned to the VERSION attribute of the
-MakeMaker object. The following lines will be parsed o.k.:
-
- $VERSION = '1.00';
- *VERSION = \'1.01';
- ($VERSION) = q$Revision: 1.1.1.2 $ =~ /(\d+)/g;
- $FOO::VERSION = '1.10';
- *FOO::VERSION = \'1.11';
-
-but these will fail:
-
- # Bad
- my $VERSION = '1.01';
- local $VERSION = '1.02';
- local $FOO::VERSION = '1.30';
-
-"Version strings" are incompatible should not be used.
-
- # Bad
- $VERSION = 1.2.3;
- $VERSION = v1.2.3;
-
-L<version> objects are fine. As of MakeMaker 6.35 version.pm will be
-automatically loaded, but you must declare the dependency on version.pm.
-For compatibility with older MakeMaker you should load on the same line
-as $VERSION is declared.
-
- # All on one line
- use version; our $VERSION = qv(1.2.3);
-
-(Putting C<my> or C<local> on the preceding line will work o.k.)
-
-The file named in VERSION_FROM is not added as a dependency to
-Makefile. This is not really correct, but it would be a major pain
-during development to have to rewrite the Makefile for any smallish
-change in that file. If you want to make sure that the Makefile
-contains the correct VERSION macro after any change of the file, you
-would have to do something like
-
- depend => { Makefile => '$(VERSION_FROM)' }
-
-See attribute C<depend> below.
-
-=item VERSION_SYM
-
-A sanitized VERSION with . replaced by _. For places where . has
-special meaning (some filesystems, RCS labels, etc...)
-
-=item XS
-
-Hashref of .xs files. MakeMaker will default this. e.g.
-
- {'name_of_file.xs' => 'name_of_file.c'}
-
-The .c files will automatically be included in the list of files
-deleted by a make clean.
-
-=item XSOPT
-
-String of options to pass to xsubpp. This might include C<-C++> or
-C<-extern>. Do not include typemaps here; the TYPEMAP parameter exists for
-that purpose.
-
-=item XSPROTOARG
-
-May be set to an empty string, which is identical to C<-prototypes>, or
-C<-noprototypes>. See the xsubpp documentation for details. MakeMaker
-defaults to the empty string.
-
-=item XS_VERSION
-
-Your version number for the .xs file of this package. This defaults
-to the value of the VERSION attribute.
-
-=back
-
-=head2 Additional lowercase attributes
-
-can be used to pass parameters to the methods which implement that
-part of the Makefile. Parameters are specified as a hash ref but are
-passed to the method as a hash.
-
-=over 2
-
-=item clean
-
- {FILES => "*.xyz foo"}
-
-=item depend
-
- {ANY_TARGET => ANY_DEPENDENCY, ...}
-
-(ANY_TARGET must not be given a double-colon rule by MakeMaker.)
-
-=item dist
-
- {TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => '.gz',
- SHAR => 'shar -m', DIST_CP => 'ln', ZIP => '/bin/zip',
- ZIPFLAGS => '-rl', DIST_DEFAULT => 'private tardist' }
-
-If you specify COMPRESS, then SUFFIX should also be altered, as it is
-needed to tell make the target file of the compression. Setting
-DIST_CP to ln can be useful, if you need to preserve the timestamps on
-your files. DIST_CP can take the values 'cp', which copies the file,
-'ln', which links the file, and 'best' which copies symbolic links and
-links the rest. Default is 'best'.
-
-=item dynamic_lib
-
- {ARMAYBE => 'ar', OTHERLDFLAGS => '...', INST_DYNAMIC_DEP => '...'}
-
-=item linkext
-
- {LINKTYPE => 'static', 'dynamic' or ''}
-
-NB: Extensions that have nothing but *.pm files had to say
-
- {LINKTYPE => ''}
-
-with Pre-5.0 MakeMakers. Since version 5.00 of MakeMaker such a line
-can be deleted safely. MakeMaker recognizes when there's nothing to
-be linked.
-
-=item macro
-
- {ANY_MACRO => ANY_VALUE, ...}
-
-=item postamble
-
-Anything put here will be passed to MY::postamble() if you have one.
-
-=item realclean
-
- {FILES => '$(INST_ARCHAUTODIR)/*.xyz'}
-
-=item test
-
- {TESTS => 't/*.t'}
-
-=item tool_autosplit
-
- {MAXLEN => 8}
-
-=back
-
-=head2 Overriding MakeMaker Methods
-
-If you cannot achieve the desired Makefile behaviour by specifying
-attributes you may define private subroutines in the Makefile.PL.
-Each subroutine returns the text it wishes to have written to
-the Makefile. To override a section of the Makefile you can
-either say:
-
- sub MY::c_o { "new literal text" }
-
-or you can edit the default by saying something like:
-
- package MY; # so that "SUPER" works right
- sub c_o {
- my $inherited = shift->SUPER::c_o(@_);
- $inherited =~ s/old text/new text/;
- $inherited;
- }
-
-If you are running experiments with embedding perl as a library into
-other applications, you might find MakeMaker is not sufficient. You'd
-better have a look at ExtUtils::Embed which is a collection of utilities
-for embedding.
-
-If you still need a different solution, try to develop another
-subroutine that fits your needs and submit the diffs to
-C<makemaker at perl.org>
-
-For a complete description of all MakeMaker methods see
-L<ExtUtils::MM_Unix>.
-
-Here is a simple example of how to add a new target to the generated
-Makefile:
-
- sub MY::postamble {
- return <<'MAKE_FRAG';
- $(MYEXTLIB): sdbm/Makefile
- cd sdbm && $(MAKE) all
-
- MAKE_FRAG
- }
-
-=head2 The End Of Cargo Cult Programming
-
-WriteMakefile() now does some basic sanity checks on its parameters to
-protect against typos and malformatted values. This means some things
-which happened to work in the past will now throw warnings and
-possibly produce internal errors.
-
-Some of the most common mistakes:
-
-=over 2
-
-=item C<< MAN3PODS => ' ' >>
-
-This is commonly used to suppress the creation of man pages. MAN3PODS
-takes a hash ref not a string, but the above worked by accident in old
-versions of MakeMaker.
-
-The correct code is C<< MAN3PODS => { } >>.
-
-=back
-
-
-=head2 Hintsfile support
-
-MakeMaker.pm uses the architecture specific information from
-Config.pm. In addition it evaluates architecture specific hints files
-in a C<hints/> directory. The hints files are expected to be named
-like their counterparts in C<PERL_SRC/hints>, but with an C<.pl> file
-name extension (eg. C<next_3_2.pl>). They are simply C<eval>ed by
-MakeMaker within the WriteMakefile() subroutine, and can be used to
-execute commands as well as to include special variables. The rules
-which hintsfile is chosen are the same as in Configure.
-
-The hintsfile is eval()ed immediately after the arguments given to
-WriteMakefile are stuffed into a hash reference $self but before this
-reference becomes blessed. So if you want to do the equivalent to
-override or create an attribute you would say something like
-
- $self->{LIBS} = ['-ldbm -lucb -lc'];
-
-=head2 Distribution Support
-
-For authors of extensions MakeMaker provides several Makefile
-targets. Most of the support comes from the ExtUtils::Manifest module,
-where additional documentation can be found.
-
-=over 4
-
-=item make distcheck
-
-reports which files are below the build directory but not in the
-MANIFEST file and vice versa. (See ExtUtils::Manifest::fullcheck() for
-details)
-
-=item make skipcheck
-
-reports which files are skipped due to the entries in the
-C<MANIFEST.SKIP> file (See ExtUtils::Manifest::skipcheck() for
-details)
-
-=item make distclean
-
-does a realclean first and then the distcheck. Note that this is not
-needed to build a new distribution as long as you are sure that the
-MANIFEST file is ok.
-
-=item make manifest
-
-rewrites the MANIFEST file, adding all remaining files found (See
-ExtUtils::Manifest::mkmanifest() for details)
-
-=item make distdir
-
-Copies all the files that are in the MANIFEST file to a newly created
-directory with the name C<$(DISTNAME)-$(VERSION)>. If that directory
-exists, it will be removed first.
-
-Additionally, it will create a META.yml module meta-data file in the
-distdir and add this to the distdir's MANIFEST. You can shut this
-behavior off with the NO_META flag.
-
-=item make disttest
-
-Makes a distdir first, and runs a C<perl Makefile.PL>, a make, and
-a make test in that directory.
-
-=item make tardist
-
-First does a distdir. Then a command $(PREOP) which defaults to a null
-command, followed by $(TO_UNIX), which defaults to a null command under
-UNIX, and will convert files in distribution directory to UNIX format
-otherwise. Next it runs C<tar> on that directory into a tarfile and
-deletes the directory. Finishes with a command $(POSTOP) which
-defaults to a null command.
-
-=item make dist
-
-Defaults to $(DIST_DEFAULT) which in turn defaults to tardist.
-
-=item make uutardist
-
-Runs a tardist first and uuencodes the tarfile.
-
-=item make shdist
-
-First does a distdir. Then a command $(PREOP) which defaults to a null
-command. Next it runs C<shar> on that directory into a sharfile and
-deletes the intermediate directory again. Finishes with a command
-$(POSTOP) which defaults to a null command. Note: For shdist to work
-properly a C<shar> program that can handle directories is mandatory.
-
-=item make zipdist
-
-First does a distdir. Then a command $(PREOP) which defaults to a null
-command. Runs C<$(ZIP) $(ZIPFLAGS)> on that directory into a
-zipfile. Then deletes that directory. Finishes with a command
-$(POSTOP) which defaults to a null command.
-
-=item make ci
-
-Does a $(CI) and a $(RCS_LABEL) on all files in the MANIFEST file.
-
-=back
-
-Customization of the dist targets can be done by specifying a hash
-reference to the dist attribute of the WriteMakefile call. The
-following parameters are recognized:
-
- CI ('ci -u')
- COMPRESS ('gzip --best')
- POSTOP ('@ :')
- PREOP ('@ :')
- TO_UNIX (depends on the system)
- RCS_LABEL ('rcs -q -Nv$(VERSION_SYM):')
- SHAR ('shar')
- SUFFIX ('.gz')
- TAR ('tar')
- TARFLAGS ('cvf')
- ZIP ('zip')
- ZIPFLAGS ('-r')
-
-An example:
-
- WriteMakefile(
- ...other options...
- dist => {
- COMPRESS => "bzip2",
- SUFFIX => ".bz2"
- }
- );
-
-
-=head2 Module Meta-Data
-
-Long plaguing users of MakeMaker based modules has been the problem of
-getting basic information about the module out of the sources
-I<without> running the F<Makefile.PL> and doing a bunch of messy
-heuristics on the resulting F<Makefile>. To this end a simple module
-meta-data file has been introduced, F<META.yml>.
-
-F<META.yml> is a YAML document (see http://www.yaml.org) containing
-basic information about the module (name, version, prerequisites...)
-in an easy to read format. The format is developed and defined by the
-Module::Build developers (see
-http://module-build.sourceforge.net/META-spec.html)
-
-MakeMaker will automatically generate a F<META.yml> file for you and
-add it to your F<MANIFEST> as part of the 'distdir' target (and thus
-the 'dist' target). This is intended to seamlessly and rapidly
-populate CPAN with module meta-data. If you wish to shut this feature
-off, set the C<NO_META> C<WriteMakefile()> flag to true.
-
-
-=head2 Disabling an extension
-
-If some events detected in F<Makefile.PL> imply that there is no way
-to create the Module, but this is a normal state of things, then you
-can create a F<Makefile> which does nothing, but succeeds on all the
-"usual" build targets. To do so, use
-
- use ExtUtils::MakeMaker qw(WriteEmptyMakefile);
- WriteEmptyMakefile();
-
-instead of WriteMakefile().
-
-This may be useful if other modules expect this module to be I<built>
-OK, as opposed to I<work> OK (say, this system-dependent module builds
-in a subdirectory of some other distribution, or is listed as a
-dependency in a CPAN::Bundle, but the functionality is supported by
-different means on the current architecture).
-
-=head2 Other Handy Functions
-
-=over 4
-
-=item prompt
-
- my $value = prompt($message);
- my $value = prompt($message, $default);
-
-The C<prompt()> function provides an easy way to request user input
-used to write a makefile. It displays the $message as a prompt for
-input. If a $default is provided it will be used as a default. The
-function returns the $value selected by the user.
-
-If C<prompt()> detects that it is not running interactively and there
-is nothing on STDIN or if the PERL_MM_USE_DEFAULT environment variable
-is set to true, the $default will be used without prompting. This
-prevents automated processes from blocking on user input.
-
-If no $default is provided an empty string will be used instead.
-
-=back
-
-
-=head1 ENVIRONMENT
-
-=over 4
-
-=item PERL_MM_OPT
-
-Command line options used by C<MakeMaker-E<gt>new()>, and thus by
-C<WriteMakefile()>. The string is split on whitespace, and the result
-is processed before any actual command line arguments are processed.
-
-=item PERL_MM_USE_DEFAULT
-
-If set to a true value then MakeMaker's prompt function will
-always return the default without waiting for user input.
-
-=item PERL_CORE
-
-Same as the PERL_CORE parameter. The parameter overrides this.
-
-=back
-
-=head1 SEE ALSO
-
-L<Module::Build> is a pure-Perl alternative to MakeMaker which does
-not rely on make or any other external utility. It is easier to
-extend to suit your needs.
-
-L<Module::Install> is a wrapper around MakeMaker which adds features
-not normally available.
-
-L<ExtUtils::ModuleMaker> and L<Module::Starter> are both modules to
-help you setup your distribution.
-
-=head1 AUTHORS
-
-Andy Dougherty C<doughera at lafayette.edu>, Andreas KE<ouml>nig
-C<andreas.koenig at mind.de>, Tim Bunce C<timb at cpan.org>. VMS
-support by Charles Bailey C<bailey at newman.upenn.edu>. OS/2 support
-by Ilya Zakharevich C<ilya at math.ohio-state.edu>.
-
-Currently maintained by Michael G Schwern C<schwern at pobox.com>
-
-Send patches and ideas to C<makemaker at perl.org>.
-
-Send bug reports via http://rt.cpan.org/. Please send your
-generated Makefile along with your report.
-
-For more up-to-date information, see L<http://www.makemaker.org>.
-
-=head1 LICENSE
-
-This program is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
-
-See L<http://www.perl.com/perl/misc/Artistic.html>
-
-
-=cut
Deleted: vendor/perl/dist/lib/ExtUtils/Manifest.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/Manifest.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/Manifest.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,877 +0,0 @@
-package ExtUtils::Manifest;
-
-require Exporter;
-use Config;
-use File::Basename;
-use File::Copy 'copy';
-use File::Find;
-use File::Spec;
-use Carp;
-use strict;
-
-use vars qw($VERSION @ISA @EXPORT_OK
- $Is_MacOS $Is_VMS $Is_VMS_mode $Is_VMS_lc $Is_VMS_nodot
- $Debug $Verbose $Quiet $MANIFEST $DEFAULT_MSKIP);
-
-$VERSION = '1.56';
- at ISA=('Exporter');
- at EXPORT_OK = qw(mkmanifest
- manicheck filecheck fullcheck skipcheck
- manifind maniread manicopy maniadd
- maniskip
- );
-
-$Is_MacOS = $^O eq 'MacOS';
-$Is_VMS = $^O eq 'VMS';
-$Is_VMS_mode = 0;
-$Is_VMS_lc = 0;
-$Is_VMS_nodot = 0; # No dots in dir names or double dots in files
-
-if ($Is_VMS) {
- require VMS::Filespec if $Is_VMS;
- my $vms_unix_rpt;
- my $vms_efs;
- my $vms_case;
-
- $Is_VMS_mode = 1;
- $Is_VMS_lc = 1;
- $Is_VMS_nodot = 1;
- if (eval { local $SIG{__DIE__}; require VMS::Feature; }) {
- $vms_unix_rpt = VMS::Feature::current("filename_unix_report");
- $vms_efs = VMS::Feature::current("efs_charset");
- $vms_case = VMS::Feature::current("efs_case_preserve");
- } else {
- my $unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || '';
- my $efs_charset = $ENV{'DECC$EFS_CHARSET'} || '';
- my $efs_case = $ENV{'DECC$EFS_CASE_PRESERVE'} || '';
- $vms_unix_rpt = $unix_rpt =~ /^[ET1]/i;
- $vms_efs = $efs_charset =~ /^[ET1]/i;
- $vms_case = $efs_case =~ /^[ET1]/i;
- }
- $Is_VMS_lc = 0 if ($vms_case);
- $Is_VMS_mode = 0 if ($vms_unix_rpt);
- $Is_VMS_nodot = 0 if ($vms_efs);
-}
-
-$Debug = $ENV{PERL_MM_MANIFEST_DEBUG} || 0;
-$Verbose = defined $ENV{PERL_MM_MANIFEST_VERBOSE} ?
- $ENV{PERL_MM_MANIFEST_VERBOSE} : 1;
-$Quiet = 0;
-$MANIFEST = 'MANIFEST';
-
-$DEFAULT_MSKIP = File::Spec->catfile( dirname(__FILE__), "$MANIFEST.SKIP" );
-
-
-=head1 NAME
-
-ExtUtils::Manifest - utilities to write and check a MANIFEST file
-
-=head1 SYNOPSIS
-
- use ExtUtils::Manifest qw(...funcs to import...);
-
- mkmanifest();
-
- my @missing_files = manicheck;
- my @skipped = skipcheck;
- my @extra_files = filecheck;
- my($missing, $extra) = fullcheck;
-
- my $found = manifind();
-
- my $manifest = maniread();
-
- manicopy($read,$target);
-
- maniadd({$file => $comment, ...});
-
-
-=head1 DESCRIPTION
-
-=head2 Functions
-
-ExtUtils::Manifest exports no functions by default. The following are
-exported on request
-
-=over 4
-
-=item mkmanifest
-
- mkmanifest();
-
-Writes all files in and below the current directory to your F<MANIFEST>.
-It works similar to the result of the Unix command
-
- find . > MANIFEST
-
-All files that match any regular expression in a file F<MANIFEST.SKIP>
-(if it exists) are ignored.
-
-Any existing F<MANIFEST> file will be saved as F<MANIFEST.bak>.
-
-=cut
-
-sub _sort {
- return sort { lc $a cmp lc $b } @_;
-}
-
-sub mkmanifest {
- my $manimiss = 0;
- my $read = (-r 'MANIFEST' && maniread()) or $manimiss++;
- $read = {} if $manimiss;
- local *M;
- my $bakbase = $MANIFEST;
- $bakbase =~ s/\./_/g if $Is_VMS_nodot; # avoid double dots
- rename $MANIFEST, "$bakbase.bak" unless $manimiss;
- open M, "> $MANIFEST" or die "Could not open $MANIFEST: $!";
- my $skip = maniskip();
- my $found = manifind();
- my($key,$val,$file,%all);
- %all = (%$found, %$read);
- $all{$MANIFEST} = ($Is_VMS_mode ? "$MANIFEST\t\t" : '') .
- 'This list of files'
- if $manimiss; # add new MANIFEST to known file list
- foreach $file (_sort keys %all) {
- if ($skip->($file)) {
- # Policy: only remove files if they're listed in MANIFEST.SKIP.
- # Don't remove files just because they don't exist.
- warn "Removed from $MANIFEST: $file\n" if $Verbose and exists $read->{$file};
- next;
- }
- if ($Verbose){
- warn "Added to $MANIFEST: $file\n" unless exists $read->{$file};
- }
- my $text = $all{$file};
- $file = _unmacify($file);
- my $tabs = (5 - (length($file)+1)/8);
- $tabs = 1 if $tabs < 1;
- $tabs = 0 unless $text;
- if ($file =~ /\s/) {
- $file =~ s/([\\'])/\\$1/g;
- $file = "'$file'";
- }
- print M $file, "\t" x $tabs, $text, "\n";
- }
- close M;
-}
-
-# Geez, shouldn't this use File::Spec or File::Basename or something?
-# Why so careful about dependencies?
-sub clean_up_filename {
- my $filename = shift;
- $filename =~ s|^\./||;
- $filename =~ s/^:([^:]+)$/$1/ if $Is_MacOS;
- return $filename;
-}
-
-
-=item manifind
-
- my $found = manifind();
-
-returns a hash reference. The keys of the hash are the files found
-below the current directory.
-
-=cut
-
-sub manifind {
- my $p = shift || {};
- my $found = {};
-
- my $wanted = sub {
- my $name = clean_up_filename($File::Find::name);
- warn "Debug: diskfile $name\n" if $Debug;
- return if -d $_;
-
- if( $Is_VMS_lc ) {
- $name =~ s#(.*)\.$#\L$1#;
- $name = uc($name) if $name =~ /^MANIFEST(\.SKIP)?$/i;
- }
- $found->{$name} = "";
- };
-
- # We have to use "$File::Find::dir/$_" in preprocess, because
- # $File::Find::name is unavailable.
- # Also, it's okay to use / here, because MANIFEST files use Unix-style
- # paths.
- find({wanted => $wanted},
- $Is_MacOS ? ":" : ".");
-
- return $found;
-}
-
-
-=item manicheck
-
- my @missing_files = manicheck();
-
-checks if all the files within a C<MANIFEST> in the current directory
-really do exist. If C<MANIFEST> and the tree below the current
-directory are in sync it silently returns an empty list.
-Otherwise it returns a list of files which are listed in the
-C<MANIFEST> but missing from the directory, and by default also
-outputs these names to STDERR.
-
-=cut
-
-sub manicheck {
- return _check_files();
-}
-
-
-=item filecheck
-
- my @extra_files = filecheck();
-
-finds files below the current directory that are not mentioned in the
-C<MANIFEST> file. An optional file C<MANIFEST.SKIP> will be
-consulted. Any file matching a regular expression in such a file will
-not be reported as missing in the C<MANIFEST> file. The list of any
-extraneous files found is returned, and by default also reported to
-STDERR.
-
-=cut
-
-sub filecheck {
- return _check_manifest();
-}
-
-
-=item fullcheck
-
- my($missing, $extra) = fullcheck();
-
-does both a manicheck() and a filecheck(), returning then as two array
-refs.
-
-=cut
-
-sub fullcheck {
- return [_check_files()], [_check_manifest()];
-}
-
-
-=item skipcheck
-
- my @skipped = skipcheck();
-
-lists all the files that are skipped due to your C<MANIFEST.SKIP>
-file.
-
-=cut
-
-sub skipcheck {
- my($p) = @_;
- my $found = manifind();
- my $matches = maniskip();
-
- my @skipped = ();
- foreach my $file (_sort keys %$found){
- if (&$matches($file)){
- warn "Skipping $file\n";
- push @skipped, $file;
- next;
- }
- }
-
- return @skipped;
-}
-
-
-sub _check_files {
- my $p = shift;
- my $dosnames=(defined(&Dos::UseLFN) && Dos::UseLFN()==0);
- my $read = maniread() || {};
- my $found = manifind($p);
-
- my(@missfile) = ();
- foreach my $file (_sort keys %$read){
- warn "Debug: manicheck checking from $MANIFEST $file\n" if $Debug;
- if ($dosnames){
- $file = lc $file;
- $file =~ s=(\.(\w|-)+)=substr ($1,0,4)=ge;
- $file =~ s=((\w|-)+)=substr ($1,0,8)=ge;
- }
- unless ( exists $found->{$file} ) {
- warn "No such file: $file\n" unless $Quiet;
- push @missfile, $file;
- }
- }
-
- return @missfile;
-}
-
-
-sub _check_manifest {
- my($p) = @_;
- my $read = maniread() || {};
- my $found = manifind($p);
- my $skip = maniskip();
-
- my @missentry = ();
- foreach my $file (_sort keys %$found){
- next if $skip->($file);
- warn "Debug: manicheck checking from disk $file\n" if $Debug;
- unless ( exists $read->{$file} ) {
- my $canon = $Is_MacOS ? "\t" . _unmacify($file) : '';
- warn "Not in $MANIFEST: $file$canon\n" unless $Quiet;
- push @missentry, $file;
- }
- }
-
- return @missentry;
-}
-
-
-=item maniread
-
- my $manifest = maniread();
- my $manifest = maniread($manifest_file);
-
-reads a named C<MANIFEST> file (defaults to C<MANIFEST> in the current
-directory) and returns a HASH reference with files being the keys and
-comments being the values of the HASH. Blank lines and lines which
-start with C<#> in the C<MANIFEST> file are discarded.
-
-=cut
-
-sub maniread {
- my ($mfile) = @_;
- $mfile ||= $MANIFEST;
- my $read = {};
- local *M;
- unless (open M, "< $mfile"){
- warn "Problem opening $mfile: $!";
- return $read;
- }
- local $_;
- while (<M>){
- chomp;
- next if /^\s*#/;
-
- my($file, $comment);
-
- # filename may contain spaces if enclosed in ''
- # (in which case, \\ and \' are escapes)
- if (($file, $comment) = /^'(\\[\\']|.+)+'\s*(.*)/) {
- $file =~ s/\\([\\'])/$1/g;
- }
- else {
- ($file, $comment) = /^(\S+)\s*(.*)/;
- }
- next unless $file;
-
- if ($Is_MacOS) {
- $file = _macify($file);
- $file =~ s/\\([0-3][0-7][0-7])/sprintf("%c", oct($1))/ge;
- }
- elsif ($Is_VMS_mode) {
- require File::Basename;
- my($base,$dir) = File::Basename::fileparse($file);
- # Resolve illegal file specifications in the same way as tar
- if ($Is_VMS_nodot) {
- $dir =~ tr/./_/;
- my(@pieces) = split(/\./,$base);
- if (@pieces > 2)
- { $base = shift(@pieces) . '.' . join('_', at pieces); }
- my $okfile = "$dir$base";
- warn "Debug: Illegal name $file changed to $okfile\n" if $Debug;
- $file = $okfile;
- }
- $file = lc($file)
- unless $Is_VMS_lc &&($file =~ /^MANIFEST(\.SKIP)?$/);
- }
-
- $read->{$file} = $comment;
- }
- close M;
- $read;
-}
-
-=item maniskip
-
- my $skipchk = maniskip();
- my $skipchk = maniskip($manifest_skip_file);
-
- if ($skipchk->($file)) { .. }
-
-reads a named C<MANIFEST.SKIP> file (defaults to C<MANIFEST.SKIP> in
-the current directory) and returns a CODE reference that tests whether
-a given filename should be skipped.
-
-=cut
-
-# returns an anonymous sub that decides if an argument matches
-sub maniskip {
- my @skip ;
- my $mfile = shift || "$MANIFEST.SKIP";
- _check_mskip_directives($mfile) if -f $mfile;
- local(*M, $_);
- open M, "< $mfile" or open M, "< $DEFAULT_MSKIP" or return sub {0};
- while (<M>){
- chomp;
- s/\r//;
- next if /^#/;
- next if /^\s*$/;
- s/^'//;
- s/'$//;
- push @skip, _macify($_);
- }
- close M;
- return sub {0} unless (scalar @skip > 0);
-
- my $opts = $Is_VMS_mode ? '(?i)' : '';
-
- # Make sure each entry is isolated in its own parentheses, in case
- # any of them contain alternations
- my $regex = join '|', map "(?:$_)", @skip;
-
- return sub { $_[0] =~ qr{$opts$regex} };
-}
-
-# checks for the special directives
-# #!include_default
-# #!include /path/to/some/manifest.skip
-# in a custom MANIFEST.SKIP for, for including
-# the content of, respectively, the default MANIFEST.SKIP
-# and an external manifest.skip file
-sub _check_mskip_directives {
- my $mfile = shift;
- local (*M, $_);
- my @lines = ();
- my $flag = 0;
- unless (open M, "< $mfile") {
- warn "Problem opening $mfile: $!";
- return;
- }
- while (<M>) {
- if (/^#!include_default\s*$/) {
- if (my @default = _include_mskip_file()) {
- push @lines, @default;
- warn "Debug: Including default MANIFEST.SKIP\n" if $Debug;
- $flag++;
- }
- next;
- }
- if (/^#!include\s+(.*)\s*$/) {
- my $external_file = $1;
- if (my @external = _include_mskip_file($external_file)) {
- push @lines, @external;
- warn "Debug: Including external $external_file\n" if $Debug;
- $flag++;
- }
- next;
- }
- push @lines, $_;
- }
- close M;
- return unless $flag;
- my $bakbase = $mfile;
- $bakbase =~ s/\./_/g if $Is_VMS_nodot; # avoid double dots
- rename $mfile, "$bakbase.bak";
- warn "Debug: Saving original $mfile as $bakbase.bak\n" if $Debug;
- unless (open M, "> $mfile") {
- warn "Problem opening $mfile: $!";
- return;
- }
- print M $_ for (@lines);
- close M;
- return;
-}
-
-# returns an array containing the lines of an external
-# manifest.skip file, if given, or $DEFAULT_MSKIP
-sub _include_mskip_file {
- my $mskip = shift || $DEFAULT_MSKIP;
- unless (-f $mskip) {
- warn qq{Included file "$mskip" not found - skipping};
- return;
- }
- local (*M, $_);
- unless (open M, "< $mskip") {
- warn "Problem opening $mskip: $!";
- return;
- }
- my @lines = ();
- push @lines, "\n#!start included $mskip\n";
- push @lines, $_ while <M>;
- close M;
- push @lines, "#!end included $mskip\n\n";
- return @lines;
-}
-
-=item manicopy
-
- manicopy(\%src, $dest_dir);
- manicopy(\%src, $dest_dir, $how);
-
-Copies the files that are the keys in %src to the $dest_dir. %src is
-typically returned by the maniread() function.
-
- manicopy( maniread(), $dest_dir );
-
-This function is useful for producing a directory tree identical to the
-intended distribution tree.
-
-$how can be used to specify a different methods of "copying". Valid
-values are C<cp>, which actually copies the files, C<ln> which creates
-hard links, and C<best> which mostly links the files but copies any
-symbolic link to make a tree without any symbolic link. C<cp> is the
-default.
-
-=cut
-
-sub manicopy {
- my($read,$target,$how)=@_;
- croak "manicopy() called without target argument" unless defined $target;
- $how ||= 'cp';
- require File::Path;
- require File::Basename;
-
- $target = VMS::Filespec::unixify($target) if $Is_VMS_mode;
- File::Path::mkpath([ $target ],! $Quiet,$Is_VMS ? undef : 0755);
- foreach my $file (keys %$read){
- if ($Is_MacOS) {
- if ($file =~ m!:!) {
- my $dir = _maccat($target, $file);
- $dir =~ s/[^:]+$//;
- File::Path::mkpath($dir,1,0755);
- }
- cp_if_diff($file, _maccat($target, $file), $how);
- } else {
- $file = VMS::Filespec::unixify($file) if $Is_VMS_mode;
- if ($file =~ m!/!) { # Ilya, that hurts, I fear, or maybe not?
- my $dir = File::Basename::dirname($file);
- $dir = VMS::Filespec::unixify($dir) if $Is_VMS_mode;
- File::Path::mkpath(["$target/$dir"],! $Quiet,$Is_VMS ? undef : 0755);
- }
- cp_if_diff($file, "$target/$file", $how);
- }
- }
-}
-
-sub cp_if_diff {
- my($from, $to, $how)=@_;
- if (! -f $from) {
- carp "$from not found";
- return;
- }
- my($diff) = 0;
- local(*F,*T);
- open(F,"< $from\0") or die "Can't read $from: $!\n";
- if (open(T,"< $to\0")) {
- local $_;
- while (<F>) { $diff++,last if $_ ne <T>; }
- $diff++ unless eof(T);
- close T;
- }
- else { $diff++; }
- close F;
- if ($diff) {
- if (-e $to) {
- unlink($to) or confess "unlink $to: $!";
- }
- STRICT_SWITCH: {
- best($from,$to), last STRICT_SWITCH if $how eq 'best';
- cp($from,$to), last STRICT_SWITCH if $how eq 'cp';
- ln($from,$to), last STRICT_SWITCH if $how eq 'ln';
- croak("ExtUtils::Manifest::cp_if_diff " .
- "called with illegal how argument [$how]. " .
- "Legal values are 'best', 'cp', and 'ln'.");
- }
- }
-}
-
-sub cp {
- my ($srcFile, $dstFile) = @_;
- my ($access,$mod) = (stat $srcFile)[8,9];
-
- copy($srcFile,$dstFile);
- utime $access, $mod + ($Is_VMS ? 1 : 0), $dstFile;
- _manicopy_chmod($srcFile, $dstFile);
-}
-
-
-sub ln {
- my ($srcFile, $dstFile) = @_;
- # Fix-me - VMS can support links.
- return &cp if $Is_VMS or ($^O eq 'MSWin32' and Win32::IsWin95());
- link($srcFile, $dstFile);
-
- unless( _manicopy_chmod($srcFile, $dstFile) ) {
- unlink $dstFile;
- return;
- }
- 1;
-}
-
-# 1) Strip off all group and world permissions.
-# 2) Let everyone read it.
-# 3) If the owner can execute it, everyone can.
-sub _manicopy_chmod {
- my($srcFile, $dstFile) = @_;
-
- my $perm = 0444 | (stat $srcFile)[2] & 0700;
- chmod( $perm | ( $perm & 0100 ? 0111 : 0 ), $dstFile );
-}
-
-# Files that are often modified in the distdir. Don't hard link them.
-my @Exceptions = qw(MANIFEST META.yml SIGNATURE);
-sub best {
- my ($srcFile, $dstFile) = @_;
-
- my $is_exception = grep $srcFile =~ /$_/, @Exceptions;
- if ($is_exception or !$Config{d_link} or -l $srcFile) {
- cp($srcFile, $dstFile);
- } else {
- ln($srcFile, $dstFile) or cp($srcFile, $dstFile);
- }
-}
-
-sub _macify {
- my($file) = @_;
-
- return $file unless $Is_MacOS;
-
- $file =~ s|^\./||;
- if ($file =~ m|/|) {
- $file =~ s|/+|:|g;
- $file = ":$file";
- }
-
- $file;
-}
-
-sub _maccat {
- my($f1, $f2) = @_;
-
- return "$f1/$f2" unless $Is_MacOS;
-
- $f1 .= ":$f2";
- $f1 =~ s/([^:]:):/$1/g;
- return $f1;
-}
-
-sub _unmacify {
- my($file) = @_;
-
- return $file unless $Is_MacOS;
-
- $file =~ s|^:||;
- $file =~ s|([/ \n])|sprintf("\\%03o", unpack("c", $1))|ge;
- $file =~ y|:|/|;
-
- $file;
-}
-
-
-=item maniadd
-
- maniadd({ $file => $comment, ...});
-
-Adds an entry to an existing F<MANIFEST> unless its already there.
-
-$file will be normalized (ie. Unixified). B<UNIMPLEMENTED>
-
-=cut
-
-sub maniadd {
- my($additions) = shift;
-
- _normalize($additions);
- _fix_manifest($MANIFEST);
-
- my $manifest = maniread();
- my @needed = grep { !exists $manifest->{$_} } keys %$additions;
- return 1 unless @needed;
-
- open(MANIFEST, ">>$MANIFEST") or
- die "maniadd() could not open $MANIFEST: $!";
-
- foreach my $file (_sort @needed) {
- my $comment = $additions->{$file} || '';
- if ($file =~ /\s/) {
- $file =~ s/([\\'])/\\$1/g;
- $file = "'$file'";
- }
- printf MANIFEST "%-40s %s\n", $file, $comment;
- }
- close MANIFEST or die "Error closing $MANIFEST: $!";
-
- return 1;
-}
-
-
-# Sometimes MANIFESTs are missing a trailing newline. Fix this.
-sub _fix_manifest {
- my $manifest_file = shift;
-
- open MANIFEST, $MANIFEST or die "Could not open $MANIFEST: $!";
-
- # Yes, we should be using seek(), but I'd like to avoid loading POSIX
- # to get SEEK_*
- my @manifest = <MANIFEST>;
- close MANIFEST;
-
- unless( $manifest[-1] =~ /\n\z/ ) {
- open MANIFEST, ">>$MANIFEST" or die "Could not open $MANIFEST: $!";
- print MANIFEST "\n";
- close MANIFEST;
- }
-}
-
-
-# UNIMPLEMENTED
-sub _normalize {
- return;
-}
-
-
-=back
-
-=head2 MANIFEST
-
-A list of files in the distribution, one file per line. The MANIFEST
-always uses Unix filepath conventions even if you're not on Unix. This
-means F<foo/bar> style not F<foo\bar>.
-
-Anything between white space and an end of line within a C<MANIFEST>
-file is considered to be a comment. Any line beginning with # is also
-a comment. Beginning with ExtUtils::Manifest 1.52, a filename may
-contain whitespace characters if it is enclosed in single quotes; single
-quotes or backslashes in that filename must be backslash-escaped.
-
- # this a comment
- some/file
- some/other/file comment about some/file
- 'some/third file' comment
-
-
-=head2 MANIFEST.SKIP
-
-The file MANIFEST.SKIP may contain regular expressions of files that
-should be ignored by mkmanifest() and filecheck(). The regular
-expressions should appear one on each line. Blank lines and lines
-which start with C<#> are skipped. Use C<\#> if you need a regular
-expression to start with a C<#>.
-
-For example:
-
- # Version control files and dirs.
- \bRCS\b
- \bCVS\b
- ,v$
- \B\.svn\b
-
- # Makemaker generated files and dirs.
- ^MANIFEST\.
- ^Makefile$
- ^blib/
- ^MakeMaker-\d
-
- # Temp, old and emacs backup files.
- ~$
- \.old$
- ^#.*#$
- ^\.#
-
-If no MANIFEST.SKIP file is found, a default set of skips will be
-used, similar to the example above. If you want nothing skipped,
-simply make an empty MANIFEST.SKIP file.
-
-In one's own MANIFEST.SKIP file, certain directives
-can be used to include the contents of other MANIFEST.SKIP
-files. At present two such directives are recognized.
-
-=over 4
-
-=item #!include_default
-
-This inserts the contents of the default MANIFEST.SKIP file
-
-=item #!include /Path/to/another/manifest.skip
-
-This inserts the contents of the specified external file
-
-=back
-
-The included contents will be inserted into the MANIFEST.SKIP
-file in between I<#!start included /path/to/manifest.skip>
-and I<#!end included /path/to/manifest.skip> markers.
-The original MANIFEST.SKIP is saved as MANIFEST.SKIP.bak.
-
-=head2 EXPORT_OK
-
-C<&mkmanifest>, C<&manicheck>, C<&filecheck>, C<&fullcheck>,
-C<&maniread>, and C<&manicopy> are exportable.
-
-=head2 GLOBAL VARIABLES
-
-C<$ExtUtils::Manifest::MANIFEST> defaults to C<MANIFEST>. Changing it
-results in both a different C<MANIFEST> and a different
-C<MANIFEST.SKIP> file. This is useful if you want to maintain
-different distributions for different audiences (say a user version
-and a developer version including RCS).
-
-C<$ExtUtils::Manifest::Quiet> defaults to 0. If set to a true value,
-all functions act silently.
-
-C<$ExtUtils::Manifest::Debug> defaults to 0. If set to a true value,
-or if PERL_MM_MANIFEST_DEBUG is true, debugging output will be
-produced.
-
-=head1 DIAGNOSTICS
-
-All diagnostic output is sent to C<STDERR>.
-
-=over 4
-
-=item C<Not in MANIFEST:> I<file>
-
-is reported if a file is found which is not in C<MANIFEST>.
-
-=item C<Skipping> I<file>
-
-is reported if a file is skipped due to an entry in C<MANIFEST.SKIP>.
-
-=item C<No such file:> I<file>
-
-is reported if a file mentioned in a C<MANIFEST> file does not
-exist.
-
-=item C<MANIFEST:> I<$!>
-
-is reported if C<MANIFEST> could not be opened.
-
-=item C<Added to MANIFEST:> I<file>
-
-is reported by mkmanifest() if $Verbose is set and a file is added
-to MANIFEST. $Verbose is set to 1 by default.
-
-=back
-
-=head1 ENVIRONMENT
-
-=over 4
-
-=item B<PERL_MM_MANIFEST_DEBUG>
-
-Turns on debugging
-
-=back
-
-=head1 SEE ALSO
-
-L<ExtUtils::MakeMaker> which has handy targets for most of the functionality.
-
-=head1 AUTHOR
-
-Andreas Koenig C<andreas.koenig at anima.de>
-
-Maintained by Michael G Schwern C<schwern at pobox.com> within the
-ExtUtils-MakeMaker package and, as a separate CPAN package, by
-Randy Kobes C<r.kobes at uwinnipeg.ca>.
-
-=cut
-
-1;
Deleted: vendor/perl/dist/lib/ExtUtils/Mkbootstrap.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/Mkbootstrap.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/Mkbootstrap.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,109 +0,0 @@
-package ExtUtils::Mkbootstrap;
-
-# There's just too much Dynaloader incest here to turn on strict vars.
-use strict 'refs';
-
-our $VERSION = '6.55_02';
-
-require Exporter;
-our @ISA = ('Exporter');
-our @EXPORT = ('&Mkbootstrap');
-
-use Config;
-
-our $Verbose = 0;
-
-
-sub Mkbootstrap {
- my($baseext, @bsloadlibs)=@_;
- @bsloadlibs = grep($_, @bsloadlibs); # strip empty libs
-
- print STDOUT " bsloadlibs=@bsloadlibs\n" if $Verbose;
-
- # We need DynaLoader here because we and/or the *_BS file may
- # call dl_findfile(). We don't say `use' here because when
- # first building perl extensions the DynaLoader will not have
- # been built when MakeMaker gets first used.
- require DynaLoader;
-
- rename "$baseext.bs", "$baseext.bso"
- if -s "$baseext.bs";
-
- if (-f "${baseext}_BS"){
- $_ = "${baseext}_BS";
- package DynaLoader; # execute code as if in DynaLoader
- local($osname, $dlsrc) = (); # avoid warnings
- ($osname, $dlsrc) = @Config::Config{qw(osname dlsrc)};
- $bscode = "";
- unshift @INC, ".";
- require $_;
- shift @INC;
- }
-
- if ($Config{'dlsrc'} =~ /^dl_dld/){
- package DynaLoader;
- push(@dl_resolve_using, dl_findfile('-lc'));
- }
-
- my(@all) = (@bsloadlibs, @DynaLoader::dl_resolve_using);
- my($method) = '';
- if (@all){
- open my $bs, ">", "$baseext.bs"
- or die "Unable to open $baseext.bs: $!";
- print STDOUT "Writing $baseext.bs\n";
- print STDOUT " containing: @all" if $Verbose;
- print $bs "# $baseext DynaLoader bootstrap file for $^O architecture.\n";
- print $bs "# Do not edit this file, changes will be lost.\n";
- print $bs "# This file was automatically generated by the\n";
- print $bs "# Mkbootstrap routine in ExtUtils::Mkbootstrap (v$VERSION).\n";
- print $bs "\@DynaLoader::dl_resolve_using = ";
- # If @all contains names in the form -lxxx or -Lxxx then it's asking for
- # runtime library location so we automatically add a call to dl_findfile()
- if (" @all" =~ m/ -[lLR]/){
- print $bs " dl_findfile(qw(\n @all\n ));\n";
- }else{
- print $bs " qw(@all);\n";
- }
- # write extra code if *_BS says so
- print $bs $DynaLoader::bscode if $DynaLoader::bscode;
- print $bs "\n1;\n";
- close $bs;
- }
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-ExtUtils::Mkbootstrap - make a bootstrap file for use by DynaLoader
-
-=head1 SYNOPSIS
-
-C<Mkbootstrap>
-
-=head1 DESCRIPTION
-
-Mkbootstrap typically gets called from an extension Makefile.
-
-There is no C<*.bs> file supplied with the extension. Instead, there may
-be a C<*_BS> file which has code for the special cases, like posix for
-berkeley db on the NeXT.
-
-This file will get parsed, and produce a maybe empty
-C<@DynaLoader::dl_resolve_using> array for the current architecture.
-That will be extended by $BSLOADLIBS, which was computed by
-ExtUtils::Liblist::ext(). If this array still is empty, we do nothing,
-else we write a .bs file with an C<@DynaLoader::dl_resolve_using>
-array.
-
-The C<*_BS> file can put some code into the generated C<*.bs> file by
-placing it in C<$bscode>. This is a handy 'escape' mechanism that may
-prove useful in complex situations.
-
-If @DynaLoader::dl_resolve_using contains C<-L*> or C<-l*> entries then
-Mkbootstrap will automatically add a dl_findfile() call to the
-generated C<*.bs> file.
-
-=cut
Deleted: vendor/perl/dist/lib/ExtUtils/Mksymlists.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/Mksymlists.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/Mksymlists.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,312 +0,0 @@
-package ExtUtils::Mksymlists;
-
-use 5.006;
-use strict qw[ subs refs ];
-# no strict 'vars'; # until filehandles are exempted
-
-use Carp;
-use Exporter;
-use Config;
-
-our @ISA = qw(Exporter);
-our @EXPORT = qw(&Mksymlists);
-our $VERSION = '6.55_02';
-
-sub Mksymlists {
- my(%spec) = @_;
- my($osname) = $^O;
-
- croak("Insufficient information specified to Mksymlists")
- unless ( $spec{NAME} or
- ($spec{FILE} and ($spec{DL_FUNCS} or $spec{FUNCLIST})) );
-
- $spec{DL_VARS} = [] unless $spec{DL_VARS};
- ($spec{FILE} = $spec{NAME}) =~ s/.*::// unless $spec{FILE};
- $spec{FUNCLIST} = [] unless $spec{FUNCLIST};
- $spec{DL_FUNCS} = { $spec{NAME} => [] }
- unless ( ($spec{DL_FUNCS} and keys %{$spec{DL_FUNCS}}) or
- @{$spec{FUNCLIST}});
- if (defined $spec{DL_FUNCS}) {
- foreach my $package (keys %{$spec{DL_FUNCS}}) {
- my($packprefix,$bootseen);
- ($packprefix = $package) =~ s/\W/_/g;
- foreach my $sym (@{$spec{DL_FUNCS}->{$package}}) {
- if ($sym =~ /^boot_/) {
- push(@{$spec{FUNCLIST}},$sym);
- $bootseen++;
- }
- else {
- push(@{$spec{FUNCLIST}},"XS_${packprefix}_$sym");
- }
- }
- push(@{$spec{FUNCLIST}},"boot_$packprefix") unless $bootseen;
- }
- }
-
-# We'll need this if we ever add any OS which uses mod2fname
-# not as pseudo-builtin.
-# require DynaLoader;
- if (defined &DynaLoader::mod2fname and not $spec{DLBASE}) {
- $spec{DLBASE} = DynaLoader::mod2fname([ split(/::/,$spec{NAME}) ]);
- }
-
- if ($osname eq 'aix') { _write_aix(\%spec); }
- elsif ($osname eq 'MacOS'){ _write_aix(\%spec) }
- elsif ($osname eq 'VMS') { _write_vms(\%spec) }
- elsif ($osname eq 'os2') { _write_os2(\%spec) }
- elsif ($osname eq 'MSWin32') { _write_win32(\%spec) }
- else {
- croak("Don't know how to create linker option file for $osname\n");
- }
-}
-
-
-sub _write_aix {
- my($data) = @_;
-
- rename "$data->{FILE}.exp", "$data->{FILE}.exp_old";
-
- open( my $exp, ">", "$data->{FILE}.exp")
- or croak("Can't create $data->{FILE}.exp: $!\n");
- print $exp join("\n",@{$data->{DL_VARS}}, "\n") if @{$data->{DL_VARS}};
- print $exp join("\n",@{$data->{FUNCLIST}}, "\n") if @{$data->{FUNCLIST}};
- close $exp;
-}
-
-
-sub _write_os2 {
- my($data) = @_;
- require Config;
- my $threaded = ($Config::Config{archname} =~ /-thread/ ? " threaded" : "");
-
- if (not $data->{DLBASE}) {
- ($data->{DLBASE} = $data->{NAME}) =~ s/.*:://;
- $data->{DLBASE} = substr($data->{DLBASE},0,7) . '_';
- }
- my $distname = $data->{DISTNAME} || $data->{NAME};
- $distname = "Distribution $distname";
- my $patchlevel = " pl$Config{perl_patchlevel}" || '';
- my $comment = sprintf "Perl (v%s%s%s) module %s",
- $Config::Config{version}, $threaded, $patchlevel, $data->{NAME};
- chomp $comment;
- if ($data->{INSTALLDIRS} and $data->{INSTALLDIRS} eq 'perl') {
- $distname = 'perl5-porters at perl.org';
- $comment = "Core $comment";
- }
- $comment = "$comment (Perl-config: $Config{config_args})";
- $comment = substr($comment, 0, 200) . "...)" if length $comment > 203;
- rename "$data->{FILE}.def", "$data->{FILE}_def.old";
-
- open(my $def, ">", "$data->{FILE}.def")
- or croak("Can't create $data->{FILE}.def: $!\n");
- print $def "LIBRARY '$data->{DLBASE}' INITINSTANCE TERMINSTANCE\n";
- print $def "DESCRIPTION '\@#$distname:$data->{VERSION}#\@ $comment'\n";
- print $def "CODE LOADONCALL\n";
- print $def "DATA LOADONCALL NONSHARED MULTIPLE\n";
- print $def "EXPORTS\n ";
- print $def join("\n ",@{$data->{DL_VARS}}, "\n") if @{$data->{DL_VARS}};
- print $def join("\n ",@{$data->{FUNCLIST}}, "\n") if @{$data->{FUNCLIST}};
- if (%{$data->{IMPORTS}}) {
- print $def "IMPORTS\n";
- my ($name, $exp);
- while (($name, $exp)= each %{$data->{IMPORTS}}) {
- print $def " $name=$exp\n";
- }
- }
- close $def;
-}
-
-sub _write_win32 {
- my($data) = @_;
-
- require Config;
- if (not $data->{DLBASE}) {
- ($data->{DLBASE} = $data->{NAME}) =~ s/.*:://;
- $data->{DLBASE} = substr($data->{DLBASE},0,7) . '_';
- }
- rename "$data->{FILE}.def", "$data->{FILE}_def.old";
-
- open( my $def, ">", "$data->{FILE}.def" )
- or croak("Can't create $data->{FILE}.def: $!\n");
- # put library name in quotes (it could be a keyword, like 'Alias')
- if ($Config::Config{'cc'} !~ /^gcc/i) {
- print $def "LIBRARY \"$data->{DLBASE}\"\n";
- }
- print $def "EXPORTS\n ";
- my @syms;
- # Export public symbols both with and without underscores to
- # ensure compatibility between DLLs from different compilers
- # NOTE: DynaLoader itself only uses the names without underscores,
- # so this is only to cover the case when the extension DLL may be
- # linked to directly from C. GSAR 97-07-10
- if ($Config::Config{'cc'} =~ /^bcc/i) {
- for (@{$data->{DL_VARS}}, @{$data->{FUNCLIST}}) {
- push @syms, "_$_", "$_ = _$_";
- }
- }
- else {
- for (@{$data->{DL_VARS}}, @{$data->{FUNCLIST}}) {
- push @syms, "$_", "_$_ = $_";
- }
- }
- print $def join("\n ", at syms, "\n") if @syms;
- if (%{$data->{IMPORTS}}) {
- print $def "IMPORTS\n";
- my ($name, $exp);
- while (($name, $exp)= each %{$data->{IMPORTS}}) {
- print $def " $name=$exp\n";
- }
- }
- close $def;
-}
-
-
-sub _write_vms {
- my($data) = @_;
-
- require Config; # a reminder for once we do $^O
- require ExtUtils::XSSymSet;
-
- my($isvax) = $Config::Config{'archname'} =~ /VAX/i;
- my($set) = new ExtUtils::XSSymSet;
-
- rename "$data->{FILE}.opt", "$data->{FILE}.opt_old";
-
- open(my $opt,">", "$data->{FILE}.opt")
- or croak("Can't create $data->{FILE}.opt: $!\n");
-
- # Options file declaring universal symbols
- # Used when linking shareable image for dynamic extension,
- # or when linking PerlShr into which we've added this package
- # as a static extension
- # We don't do anything to preserve order, so we won't relax
- # the GSMATCH criteria for a dynamic extension
-
- print $opt "case_sensitive=yes\n"
- if $Config::Config{d_vms_case_sensitive_symbols};
-
- foreach my $sym (@{$data->{FUNCLIST}}) {
- my $safe = $set->addsym($sym);
- if ($isvax) { print $opt "UNIVERSAL=$safe\n" }
- else { print $opt "SYMBOL_VECTOR=($safe=PROCEDURE)\n"; }
- }
-
- foreach my $sym (@{$data->{DL_VARS}}) {
- my $safe = $set->addsym($sym);
- print $opt "PSECT_ATTR=${sym},PIC,OVR,RD,NOEXE,WRT,NOSHR\n";
- if ($isvax) { print $opt "UNIVERSAL=$safe\n" }
- else { print $opt "SYMBOL_VECTOR=($safe=DATA)\n"; }
- }
-
- close $opt;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-ExtUtils::Mksymlists - write linker options files for dynamic extension
-
-=head1 SYNOPSIS
-
- use ExtUtils::Mksymlists;
- Mksymlists({ NAME => $name ,
- DL_VARS => [ $var1, $var2, $var3 ],
- DL_FUNCS => { $pkg1 => [ $func1, $func2 ],
- $pkg2 => [ $func3 ] });
-
-=head1 DESCRIPTION
-
-C<ExtUtils::Mksymlists> produces files used by the linker under some OSs
-during the creation of shared libraries for dynamic extensions. It is
-normally called from a MakeMaker-generated Makefile when the extension
-is built. The linker option file is generated by calling the function
-C<Mksymlists>, which is exported by default from C<ExtUtils::Mksymlists>.
-It takes one argument, a list of key-value pairs, in which the following
-keys are recognized:
-
-=over 4
-
-=item DLBASE
-
-This item specifies the name by which the linker knows the
-extension, which may be different from the name of the
-extension itself (for instance, some linkers add an '_' to the
-name of the extension). If it is not specified, it is derived
-from the NAME attribute. It is presently used only by OS2 and Win32.
-
-=item DL_FUNCS
-
-This is identical to the DL_FUNCS attribute available via MakeMaker,
-from which it is usually taken. Its value is a reference to an
-associative array, in which each key is the name of a package, and
-each value is an a reference to an array of function names which
-should be exported by the extension. For instance, one might say
-C<DL_FUNCS =E<gt> { Homer::Iliad =E<gt> [ qw(trojans greeks) ],
-Homer::Odyssey =E<gt> [ qw(travellers family suitors) ] }>. The
-function names should be identical to those in the XSUB code;
-C<Mksymlists> will alter the names written to the linker option
-file to match the changes made by F<xsubpp>. In addition, if
-none of the functions in a list begin with the string B<boot_>,
-C<Mksymlists> will add a bootstrap function for that package,
-just as xsubpp does. (If a B<boot_E<lt>pkgE<gt>> function is
-present in the list, it is passed through unchanged.) If
-DL_FUNCS is not specified, it defaults to the bootstrap
-function for the extension specified in NAME.
-
-=item DL_VARS
-
-This is identical to the DL_VARS attribute available via MakeMaker,
-and, like DL_FUNCS, it is usually specified via MakeMaker. Its
-value is a reference to an array of variable names which should
-be exported by the extension.
-
-=item FILE
-
-This key can be used to specify the name of the linker option file
-(minus the OS-specific extension), if for some reason you do not
-want to use the default value, which is the last word of the NAME
-attribute (I<e.g.> for C<Tk::Canvas>, FILE defaults to C<Canvas>).
-
-=item FUNCLIST
-
-This provides an alternate means to specify function names to be
-exported from the extension. Its value is a reference to an
-array of function names to be exported by the extension. These
-names are passed through unaltered to the linker options file.
-Specifying a value for the FUNCLIST attribute suppresses automatic
-generation of the bootstrap function for the package. To still create
-the bootstrap name you have to specify the package name in the
-DL_FUNCS hash:
-
- Mksymlists({ NAME => $name ,
- FUNCLIST => [ $func1, $func2 ],
- DL_FUNCS => { $pkg => [] } });
-
-
-=item IMPORTS
-
-This attribute is used to specify names to be imported into the
-extension. It is currently only used by OS/2 and Win32.
-
-=item NAME
-
-This gives the name of the extension (I<e.g.> C<Tk::Canvas>) for which
-the linker option file will be produced.
-
-=back
-
-When calling C<Mksymlists>, one should always specify the NAME
-attribute. In most cases, this is all that's necessary. In
-the case of unusual extensions, however, the other attributes
-can be used to provide additional information to the linker.
-
-=head1 AUTHOR
-
-Charles Bailey I<E<lt>bailey at newman.upenn.eduE<gt>>
-
-=head1 REVISION
-
-Last revised 14-Feb-1996, for Perl 5.002.
Deleted: vendor/perl/dist/lib/ExtUtils/NOTES
===================================================================
--- vendor/perl/dist/lib/ExtUtils/NOTES 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/NOTES 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,96 +0,0 @@
-The Simplified MakeMaker class hierarchy
-****************************************
-
-What most people need to know.
-
-(Subclasses on top.)
-
- MY
- |
- ExtUtils::MakeMaker
- |
- ExtUtils::MM_{Current OS}
- |
- ExtUtils::MM_Unix
- |
- ExtUtils::MM_Any
-
-The object actually used is of the class MY which allows you to
-override bits of MakeMaker inside your Makefile.PL by declaring
-MY::foo() methods.
-
-
-The Real MakeMaker class hierarchy
-**********************************
-
-You wish it was that simple.
-
-Here's how it really works.
-
- PACK### (created each call to ExtUtils::MakeMaker->new)
- . |
- (mixin) |
- . |
- MY (created by ExtUtils::MY) |
- | |
- ExtUtils::MY MM (created by ExtUtils::MM)
- | |
- ExtUtils::MM
- | | |-----------------------
- | | |
- ExtUtils::Liblist ExtUtils::MakeMaker |
- | |
- ExtUtils::Liblist::Kid |
- |
- |
- |
- ExtUtils::MM_{Current OS} (if necessary)
- |
- ExtUtils::MM_Unix
- |
- ExtUtils::MM_Any
-
-
-NOTE: Yes, this is a mess. See
-http://archive.develooper.com/makemaker@perl.org/msg00134.html
-for some history.
-
-NOTE: When ExtUtils::MM is loaded it chooses a superclass for MM from
-amongst the ExtUtils::MM_* modules based on the current operating
-system.
-
-NOTE: ExtUtils::MM_{Current OS} represents one of the ExtUtils::MM_*
-modules except ExtUtils::MM_Any chosen based on your operating system.
-
-NOTE: The main object used by MakeMaker is a PACK### object, *not*
-ExtUtils::MakeMaker. It is, effectively, a subclass of MY,
-ExtUtils::Makemaker, ExtUtils::Liblist and ExtUtils::MM_{Current OS}
-
-NOTE: The methods in MY are simply copied into PACK### rather than
-MY being a superclass of PACK###. I don't remember the rationale.
-
-NOTE: ExtUtils::Liblist should be removed from the inheritence hiearchy
-and simply be called as functions.
-
-NOTE: Modules like File::Spec and Exporter have been omitted for clarity.
-
-
-The MM_* hierarchy
-******************
-
- MM_Win95 MM_NW5
- \ /
-MM_BeOS MM_Cygwin MM_OS2 MM_VMS MM_Win32 MM_DOS MM_UWIN
- \ | | | / / /
- ------------------------------------------------
- | |
- MM_Unix |
- | |
- MM_Any
-
-NOTE: Each direct MM_Unix subclass is also an MM_Any subclass. This
-is a temporary hack because MM_Unix overrides some MM_Any methods with
-Unix specific code. It allows the non-Unix modules to see the
-original MM_Any implementations.
-
-NOTE: Modules like File::Spec and Exporter have been omitted for clarity.
Deleted: vendor/perl/dist/lib/ExtUtils/PATCHING
===================================================================
--- vendor/perl/dist/lib/ExtUtils/PATCHING 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/PATCHING 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,212 +0,0 @@
-"The easy way is always mined.
- The important things are always simple.
- The simple things are always hard."
- -- Some of Murphy's Laws of Combat
-
-This is a short set of guidelines for those patching
-ExtUtils::MakeMaker. Its not an iron-clad set of rules, but just
-things which make life easier when reading and integrating a patch.
-
-Lots of information can be found in makemaker.org.
-
-MakerMaker is being maintained until something else can replace it.
-Bugs will be fixed and compatibility improved, but I would like to
-avoid new features. If you want to add something to MakeMaker,
-consider instead working on Module::Build, MakeMaker's heir apparent.
-
-
-Reporting bugs
-
-- Often the only information we have for fixing a bug is contained in your
- report. So...
-
-- Please report your bugs via http://rt.cpan.org or by mailing to
- makemaker at perl.org. RT is preferred.
-
-- Please report your bug immediately upon encountering it. Do not wait
- until you have a patch to fix the bug. Patches are good, but not at
- the expense of timely bug reports.
-
-- Please be as verbose as possible. Include the complete output of
- your 'make test' or even 'make test TEST_VERBOSE=1' and a copy of the
- generated Makefile. Err on the side of verbosity. The more data we
- have to work with, the faster we can diagnose the problem.
-
-- If you find an undocumented feature, or if a feature has changed/been
- added which causes a problem, report it. Do not assume it was done
- deliberately. Even if it was done deliberately, we still want to hear
- if it caused problems.
-
-- If you're testing MakeMaker against a development version of Perl,
- please also check it against the latest stable version. This makes it
- easier to figure out if its MakeMaker or Perl at fault.
-
-
-Patching details
-
-- Please use unified diffs. (diff -u)
-
-- Patches against the latest development snapshot from makemaker.org are
- preferred. Patches against the latest CPAN version are ok, too.
-
-- Post your patch to makemaker at perl.org.
-
-
-Code formatting
-
-- No literal tabs (except where necessary inside Makefile code, obviously).
-
-- 4 character indentation.
-
-- this_style is prefered instead of studlyCaps.
-
-- Private subroutine names (ie. those used only in the same package
- they're declared in) should start with an underscore (_sekret_method).
-
-- Protected subroutines (ie. ones intended to be used by other modules in
- ExtUtils::*) should be named normally (no leading underscore) but
- documented as protected (see Documentation below).
-
-- Do not use indirect object syntax (ie. new Foo::Bar (@args))
-
-- make variables use dollar signs like Perl scalars. This causes problems
- when you have to mix them both in a string. If you find yourself
- backwacking lots of dollar signs because you have one interpolated
- perl variable, like this:
-
- return <<EOT;
-subdirs ::
- \$(NOECHO)cd $subdir && \$(MAKE) -f \$(FIRST_MAKEFILE) all \$(PASTHRU)
-
-EOT
-
- or are switching quoting contexts:
-
- return q{
-subdirs ::
- $(NOECHO)cd }.$subdir.q{ && $(MAKE) -f $(FIRST_MAKEFILE) all $(PASTHRU)
-
-};
-
- consider using sprintf instead.
-
- return sprintf <<'EOT', $subdir;
-subdirs ::
- $(NOECHO)cd %s && $(MAKE) -f $(FIRST_MAKEFILE) all $(PASTHRU)
-
-EOT
-
-
-Refactoring and Cleanup
-
-- MakeMaker is a mess. We like patches which clean things up.
-
-
-Backwards Compatibility
-
-- MakeMaker must be backwards compatible to 5.5.4 (5.005_04). Avoid any
- obvious 5.6-isms (threads, warnings.pm, Unicode, our, v1.2.3, attributes
- open my $fh, lvalue subroutines, qr//, any new core modules, etc...).
-
-- MakeMaker should avoid having module dependencies. Avoid using modules
- which didn't come with 5.5.4 and avoid using features from newer
- versions. Sometimes this is unavoidable.
-
-
-Cross-Platform Compatibility
-
-- With the exception of MacOS Classic, MakeMaker must work on all
- architectures Perl works on (see perlport.pod). This means all Unixen
- (including Cygwin and MacOS X), Windows (including Win9x and DOS), and VMS.
-
-- Use the available macros rather than shell commands $(MV), $(CP),
- $(TOUCH), etc...
-
-- MakeMaker must work on many makes. GNU, BSD, Solaris, nmake, dmake, MMS
- and MMK to name the most common. Keep your make code as simple as
- possible.
-
-- Avoid special make variables (even $@).
-
-- Format targets as "target : dependency", the spacing is important.
-
-- Use $(NOECHO) instead of @.
-
-- Use - to tell make to ignore the exit code of a command. (Unfortunately,
- some make variants don't honor an $(IGNORE) macro).
-
-- Always put a space between $(NOECHO) and the command.
-
-- Always put a space between - (ignore) and the command.
-
-- Always put $(NOECHO) and - together, no space between them.
-
- # Right
- -$(NOECHO) command
- $(NOECHO) command
- - command
-
-- Often when you patch ExtUtils::MM_Unix, similar patches must be done
- to the other MM_* modules. If you can, please do this extra work
- otherwise I have to. If you can't, that's ok. We can help.
-
-- If possible, please test your patch on two Very Different architectures.
- Unix, Windows and VMS being Very Different. Note: Cygwin and OS X are
- Unixen for our purposes.
-
-- If nothing else, at least try it on two different Unixen or Windows
- machines (ie. Linux and IRIX or WinNT and Win95).
-
-- HP's TestDrive (www.testdrive.compaq.com) and SourceForge's
- compile farm (www.sourceforge.net) are good sources of testing
- machines of many different architectures and platforms. Accounts are
- free.
-
-- If you find yourself writing "do_this if $^O eq 'That'" (ie. checks on
- the OS type) perhaps your code belongs in one of the non-Unix MM_*
- modules (ie. MM_Win32, MM_VMS, etc...). If one does not exist, consider
- creating one. Its ok to have an MM_* module with only one method.
-
-- Some shells have very small buffers. This means command lines must
- be as small as possible. If your command is just too long, consider
- making it an ExtUtils::Command::MM function. If your command might
- receive many arguments (such as pod2man or pm_to_blib) consider
- using split_command() to split it into several, shorter calls.
-
-- Most shells quote differently. If you need to put a perl one-liner
- in the Makefile, please use oneliner() to generate it.
-
-
-Tests
-
-- Tests would be nice, but I'm not going to pretend testing MakeMaker
- is easy. If nothing else, let us know how you tested your patch by
- hand.
-
-
-Documentation
-
-- Documentation would be nice.
-
-- If the new feature/method is private, please document it with POD
- wrapped in "=begin/end private" tags. That way it will be documented,
- but won't be displayed (future versions of perldoc may have options
- to display).
-
- =begin private
-
- =head3 _foo_bar
-
- $mm->_foo_bar
-
- Blah blah blah
-
- =end private
-
- =cut
-
- sub _foo_bar {
- ...
-
-- If you're overriding a method, document that its an override and
- *why* its being overridden. Don't repeat the original documentation.
Deleted: vendor/perl/dist/lib/ExtUtils/Packlist.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/Packlist.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/Packlist.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,348 +0,0 @@
-package ExtUtils::Packlist;
-
-use 5.00503;
-use strict;
-use Carp qw();
-use Config;
-use vars qw($VERSION $Relocations);
-$VERSION = '1.43';
-$VERSION = eval $VERSION;
-
-# Used for generating filehandle globs. IO::File might not be available!
-my $fhname = "FH1";
-
-=begin _undocumented
-
-=item mkfh()
-
-Make a filehandle. Same kind of idea as Symbol::gensym().
-
-=cut
-
-sub mkfh()
-{
-no strict;
-my $fh = \*{$fhname++};
-use strict;
-return($fh);
-}
-
-=item __find_relocations
-
-Works out what absolute paths in the configuration have been located at run
-time relative to $^X, and generates a regexp that matches them
-
-=end _undocumented
-
-=cut
-
-sub __find_relocations
-{
- my %paths;
- while (my ($raw_key, $raw_val) = each %Config) {
- my $exp_key = $raw_key . "exp";
- next unless exists $Config{$exp_key};
- next unless $raw_val =~ m!\.\.\./!;
- $paths{$Config{$exp_key}}++;
- }
- # Longest prefixes go first in the alternatives
- my $alternations = join "|", map {quotemeta $_}
- sort {length $b <=> length $a} keys %paths;
- qr/^($alternations)/o;
-}
-
-sub new($$)
-{
-my ($class, $packfile) = @_;
-$class = ref($class) || $class;
-my %self;
-tie(%self, $class, $packfile);
-return(bless(\%self, $class));
-}
-
-sub TIEHASH
-{
-my ($class, $packfile) = @_;
-my $self = { packfile => $packfile };
-bless($self, $class);
-$self->read($packfile) if (defined($packfile) && -f $packfile);
-return($self);
-}
-
-sub STORE
-{
-$_[0]->{data}->{$_[1]} = $_[2];
-}
-
-sub FETCH
-{
-return($_[0]->{data}->{$_[1]});
-}
-
-sub FIRSTKEY
-{
-my $reset = scalar(keys(%{$_[0]->{data}}));
-return(each(%{$_[0]->{data}}));
-}
-
-sub NEXTKEY
-{
-return(each(%{$_[0]->{data}}));
-}
-
-sub EXISTS
-{
-return(exists($_[0]->{data}->{$_[1]}));
-}
-
-sub DELETE
-{
-return(delete($_[0]->{data}->{$_[1]}));
-}
-
-sub CLEAR
-{
-%{$_[0]->{data}} = ();
-}
-
-sub DESTROY
-{
-}
-
-sub read($;$)
-{
-my ($self, $packfile) = @_;
-$self = tied(%$self) || $self;
-
-if (defined($packfile)) { $self->{packfile} = $packfile; }
-else { $packfile = $self->{packfile}; }
-Carp::croak("No packlist filename specified") if (! defined($packfile));
-my $fh = mkfh();
-open($fh, "<$packfile") || Carp::croak("Can't open file $packfile: $!");
-$self->{data} = {};
-my ($line);
-while (defined($line = <$fh>))
- {
- chomp $line;
- my ($key, $data) = $line;
- if ($key =~ /^(.*?)( \w+=.*)$/)
- {
- $key = $1;
- $data = { map { split('=', $_) } split(' ', $2)};
-
- if ($Config{userelocatableinc} && $data->{relocate_as})
- {
- require File::Spec;
- require Cwd;
- my ($vol, $dir) = File::Spec->splitpath($packfile);
- my $newpath = File::Spec->catpath($vol, $dir, $data->{relocate_as});
- $key = Cwd::realpath($newpath);
- }
- }
- $key =~ s!/\./!/!g; # Some .packlists have spurious '/./' bits in the paths
- $self->{data}->{$key} = $data;
- }
-close($fh);
-}
-
-sub write($;$)
-{
-my ($self, $packfile) = @_;
-$self = tied(%$self) || $self;
-if (defined($packfile)) { $self->{packfile} = $packfile; }
-else { $packfile = $self->{packfile}; }
-Carp::croak("No packlist filename specified") if (! defined($packfile));
-my $fh = mkfh();
-open($fh, ">$packfile") || Carp::croak("Can't open file $packfile: $!");
-foreach my $key (sort(keys(%{$self->{data}})))
- {
- my $data = $self->{data}->{$key};
- if ($Config{userelocatableinc}) {
- $Relocations ||= __find_relocations();
- if ($packfile =~ $Relocations) {
- # We are writing into a subdirectory of a run-time relocated
- # path. Figure out if the this file is also within a subdir.
- my $prefix = $1;
- if (File::Spec->no_upwards(File::Spec->abs2rel($key, $prefix)))
- {
- # The relocated path is within the found prefix
- my $packfile_prefix;
- (undef, $packfile_prefix)
- = File::Spec->splitpath($packfile);
-
- my $relocate_as
- = File::Spec->abs2rel($key, $packfile_prefix);
-
- if (!ref $data) {
- $data = {};
- }
- $data->{relocate_as} = $relocate_as;
- }
- }
- }
- print $fh ("$key");
- if (ref($data))
- {
- foreach my $k (sort(keys(%$data)))
- {
- print $fh (" $k=$data->{$k}");
- }
- }
- print $fh ("\n");
- }
-close($fh);
-}
-
-sub validate($;$)
-{
-my ($self, $remove) = @_;
-$self = tied(%$self) || $self;
-my @missing;
-foreach my $key (sort(keys(%{$self->{data}})))
- {
- if (! -e $key)
- {
- push(@missing, $key);
- delete($self->{data}{$key}) if ($remove);
- }
- }
-return(@missing);
-}
-
-sub packlist_file($)
-{
-my ($self) = @_;
-$self = tied(%$self) || $self;
-return($self->{packfile});
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-ExtUtils::Packlist - manage .packlist files
-
-=head1 SYNOPSIS
-
- use ExtUtils::Packlist;
- my ($pl) = ExtUtils::Packlist->new('.packlist');
- $pl->read('/an/old/.packlist');
- my @missing_files = $pl->validate();
- $pl->write('/a/new/.packlist');
-
- $pl->{'/some/file/name'}++;
- or
- $pl->{'/some/other/file/name'} = { type => 'file',
- from => '/some/file' };
-
-=head1 DESCRIPTION
-
-ExtUtils::Packlist provides a standard way to manage .packlist files.
-Functions are provided to read and write .packlist files. The original
-.packlist format is a simple list of absolute pathnames, one per line. In
-addition, this package supports an extended format, where as well as a filename
-each line may contain a list of attributes in the form of a space separated
-list of key=value pairs. This is used by the installperl script to
-differentiate between files and links, for example.
-
-=head1 USAGE
-
-The hash reference returned by the new() function can be used to examine and
-modify the contents of the .packlist. Items may be added/deleted from the
-.packlist by modifying the hash. If the value associated with a hash key is a
-scalar, the entry written to the .packlist by any subsequent write() will be a
-simple filename. If the value is a hash, the entry written will be the
-filename followed by the key=value pairs from the hash. Reading back the
-.packlist will recreate the original entries.
-
-=head1 FUNCTIONS
-
-=over 4
-
-=item new()
-
-This takes an optional parameter, the name of a .packlist. If the file exists,
-it will be opened and the contents of the file will be read. The new() method
-returns a reference to a hash. This hash holds an entry for each line in the
-.packlist. In the case of old-style .packlists, the value associated with each
-key is undef. In the case of new-style .packlists, the value associated with
-each key is a hash containing the key=value pairs following the filename in the
-.packlist.
-
-=item read()
-
-This takes an optional parameter, the name of the .packlist to be read. If
-no file is specified, the .packlist specified to new() will be read. If the
-.packlist does not exist, Carp::croak will be called.
-
-=item write()
-
-This takes an optional parameter, the name of the .packlist to be written. If
-no file is specified, the .packlist specified to new() will be overwritten.
-
-=item validate()
-
-This checks that every file listed in the .packlist actually exists. If an
-argument which evaluates to true is given, any missing files will be removed
-from the internal hash. The return value is a list of the missing files, which
-will be empty if they all exist.
-
-=item packlist_file()
-
-This returns the name of the associated .packlist file
-
-=back
-
-=head1 EXAMPLE
-
-Here's C<modrm>, a little utility to cleanly remove an installed module.
-
- #!/usr/local/bin/perl -w
-
- use strict;
- use IO::Dir;
- use ExtUtils::Packlist;
- use ExtUtils::Installed;
-
- sub emptydir($) {
- my ($dir) = @_;
- my $dh = IO::Dir->new($dir) || return(0);
- my @count = $dh->read();
- $dh->close();
- return(@count == 2 ? 1 : 0);
- }
-
- # Find all the installed packages
- print("Finding all installed modules...\n");
- my $installed = ExtUtils::Installed->new();
-
- foreach my $module (grep(!/^Perl$/, $installed->modules())) {
- my $version = $installed->version($module) || "???";
- print("Found module $module Version $version\n");
- print("Do you want to delete $module? [n] ");
- my $r = <STDIN>; chomp($r);
- if ($r && $r =~ /^y/i) {
- # Remove all the files
- foreach my $file (sort($installed->files($module))) {
- print("rm $file\n");
- unlink($file);
- }
- my $pf = $installed->packlist($module)->packlist_file();
- print("rm $pf\n");
- unlink($pf);
- foreach my $dir (sort($installed->directory_tree($module))) {
- if (emptydir($dir)) {
- print("rmdir $dir\n");
- rmdir($dir);
- }
- }
- }
- }
-
-=head1 AUTHOR
-
-Alan Burlison <Alan.Burlison at uk.sun.com>
-
-=cut
Deleted: vendor/perl/dist/lib/ExtUtils/ParseXS.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/ParseXS.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/ParseXS.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,2091 +0,0 @@
-package ExtUtils::ParseXS;
-
-use 5.006; # We use /??{}/ in regexes
-use Cwd;
-use Config;
-use File::Basename;
-use File::Spec;
-use Symbol;
-
-require Exporter;
-
- at ISA = qw(Exporter);
- at EXPORT_OK = qw(process_file);
-
-# use strict; # One of these days...
-
-my(@XSStack); # Stack of conditionals and INCLUDEs
-my($XSS_work_idx, $cpp_next_tmp);
-
-use vars qw($VERSION);
-$VERSION = '2.2002';
-
-use vars qw(%input_expr %output_expr $ProtoUsed @InitFileCode $FH $proto_re $Overload $errors $Fallback
- $cplusplus $hiertype $WantPrototypes $WantVersionChk $except $WantLineNumbers
- $WantOptimize $process_inout $process_argtypes @tm
- $dir $filename $filepathname %IncludedFiles
- %type_kind %proto_letter
- %targetable $BLOCK_re $lastline $lastline_no
- $Package $Prefix @line @BootCode %args_match %defaults %var_types %arg_list @proto_arg
- $processing_arg_with_types %argtype_seen @outlist %in_out %lengthof
- $proto_in_this_xsub $scope_in_this_xsub $interface $prepush_done $interface_macro $interface_macro_set
- $ProtoThisXSUB $ScopeThisXSUB $xsreturn
- @line_no $ret_type $func_header $orig_args
- ); # Add these just to get compilation to happen.
-
-
-sub process_file {
-
- # Allow for $package->process_file(%hash) in the future
- my ($pkg, %args) = @_ % 2 ? @_ : (__PACKAGE__, @_);
-
- $ProtoUsed = exists $args{prototypes};
-
- # Set defaults.
- %args = (
- # 'C++' => 0, # Doesn't seem to *do* anything...
- hiertype => 0,
- except => 0,
- prototypes => 0,
- versioncheck => 1,
- linenumbers => 1,
- optimize => 1,
- prototypes => 0,
- inout => 1,
- argtypes => 1,
- typemap => [],
- output => \*STDOUT,
- csuffix => '.c',
- %args,
- );
-
- # Global Constants
-
- my ($Is_VMS, $SymSet);
- if ($^O eq 'VMS') {
- $Is_VMS = 1;
- # Establish set of global symbols with max length 28, since xsubpp
- # will later add the 'XS_' prefix.
- require ExtUtils::XSSymSet;
- $SymSet = new ExtUtils::XSSymSet 28;
- }
- @XSStack = ({type => 'none'});
- ($XSS_work_idx, $cpp_next_tmp) = (0, "XSubPPtmpAAAA");
- @InitFileCode = ();
- $FH = Symbol::gensym();
- $proto_re = "[" . quotemeta('\$%&*@;[]') . "]" ;
- $Overload = 0;
- $errors = 0;
- $Fallback = '&PL_sv_undef';
-
- # Most of the 1500 lines below uses these globals. We'll have to
- # clean this up sometime, probably. For now, we just pull them out
- # of %args. -Ken
-
- $cplusplus = $args{'C++'};
- $hiertype = $args{hiertype};
- $WantPrototypes = $args{prototypes};
- $WantVersionChk = $args{versioncheck};
- $except = $args{except} ? ' TRY' : '';
- $WantLineNumbers = $args{linenumbers};
- $WantOptimize = $args{optimize};
- $process_inout = $args{inout};
- $process_argtypes = $args{argtypes};
- @tm = ref $args{typemap} ? @{$args{typemap}} : ($args{typemap});
-
- for ($args{filename}) {
- die "Missing required parameter 'filename'" unless $_;
- $filepathname = $_;
- ($dir, $filename) = (dirname($_), basename($_));
- $filepathname =~ s/\\/\\\\/g;
- $IncludedFiles{$_}++;
- }
-
- # Open the input file
- open($FH, $args{filename}) or die "cannot open $args{filename}: $!\n";
-
- # Open the output file if given as a string. If they provide some
- # other kind of reference, trust them that we can print to it.
- if (not ref $args{output}) {
- open my($fh), "> $args{output}" or die "Can't create $args{output}: $!";
- $args{outfile} = $args{output};
- $args{output} = $fh;
- }
-
- # Really, we shouldn't have to chdir() or select() in the first
- # place. For now, just save & restore.
- my $orig_cwd = cwd();
- my $orig_fh = select();
-
- chdir($dir);
- my $pwd = cwd();
- my $csuffix = $args{csuffix};
-
- if ($WantLineNumbers) {
- my $cfile;
- if ( $args{outfile} ) {
- $cfile = $args{outfile};
- } else {
- $cfile = $args{filename};
- $cfile =~ s/\.xs$/$csuffix/i or $cfile .= $csuffix;
- }
- tie(*PSEUDO_STDOUT, 'ExtUtils::ParseXS::CountLines', $cfile, $args{output});
- select PSEUDO_STDOUT;
- } else {
- select $args{output};
- }
-
- foreach my $typemap (@tm) {
- die "Can't find $typemap in $pwd\n" unless -r $typemap;
- }
-
- push @tm, standard_typemap_locations();
-
- foreach my $typemap (@tm) {
- next unless -f $typemap ;
- # skip directories, binary files etc.
- warn("Warning: ignoring non-text typemap file '$typemap'\n"), next
- unless -T $typemap ;
- open(TYPEMAP, $typemap)
- or warn ("Warning: could not open typemap file '$typemap': $!\n"), next;
- my $mode = 'Typemap';
- my $junk = "" ;
- my $current = \$junk;
- while (<TYPEMAP>) {
- next if /^\s* #/;
- my $line_no = $. + 1;
- if (/^INPUT\s*$/) {
- $mode = 'Input'; $current = \$junk; next;
- }
- if (/^OUTPUT\s*$/) {
- $mode = 'Output'; $current = \$junk; next;
- }
- if (/^TYPEMAP\s*$/) {
- $mode = 'Typemap'; $current = \$junk; next;
- }
- if ($mode eq 'Typemap') {
- chomp;
- my $line = $_ ;
- TrimWhitespace($_) ;
- # skip blank lines and comment lines
- next if /^$/ or /^#/ ;
- my($type,$kind, $proto) = /^\s*(.*?\S)\s+(\S+)\s*($proto_re*)\s*$/ or
- warn("Warning: File '$typemap' Line $. '$line' TYPEMAP entry needs 2 or 3 columns\n"), next;
- $type = TidyType($type) ;
- $type_kind{$type} = $kind ;
- # prototype defaults to '$'
- $proto = "\$" unless $proto ;
- warn("Warning: File '$typemap' Line $. '$line' Invalid prototype '$proto'\n")
- unless ValidProtoString($proto) ;
- $proto_letter{$type} = C_string($proto) ;
- } elsif (/^\s/) {
- $$current .= $_;
- } elsif ($mode eq 'Input') {
- s/\s+$//;
- $input_expr{$_} = '';
- $current = \$input_expr{$_};
- } else {
- s/\s+$//;
- $output_expr{$_} = '';
- $current = \$output_expr{$_};
- }
- }
- close(TYPEMAP);
- }
-
- foreach my $value (values %input_expr) {
- $value =~ s/;*\s+\z//;
- # Move C pre-processor instructions to column 1 to be strictly ANSI
- # conformant. Some pre-processors are fussy about this.
- $value =~ s/^\s+#/#/mg;
- }
- foreach my $value (values %output_expr) {
- # And again.
- $value =~ s/^\s+#/#/mg;
- }
-
- my ($cast, $size);
- our $bal = qr[(?:(?>[^()]+)|\((??{ $bal })\))*]; # ()-balanced
- $cast = qr[(?:\(\s*SV\s*\*\s*\)\s*)?]; # Optional (SV*) cast
- $size = qr[,\s* (??{ $bal }) ]x; # Third arg (to setpvn)
-
- foreach my $key (keys %output_expr) {
- BEGIN { $^H |= 0x00200000 }; # Equivalent to: use re 'eval', but hardcoded so we can compile re.xs
-
- my ($t, $with_size, $arg, $sarg) =
- ($output_expr{$key} =~
- m[^ \s+ sv_set ( [iunp] ) v (n)? # Type, is_setpvn
- \s* \( \s* $cast \$arg \s* ,
- \s* ( (??{ $bal }) ) # Set from
- ( (??{ $size }) )? # Possible sizeof set-from
- \) \s* ; \s* $
- ]x);
- $targetable{$key} = [$t, $with_size, $arg, $sarg] if $t;
- }
-
- my $END = "!End!\n\n"; # "impossible" keyword (multiple newline)
-
- # Match an XS keyword
- $BLOCK_re= '\s*(' . join('|', qw(
- REQUIRE BOOT CASE PREINIT INPUT INIT CODE PPCODE OUTPUT
- CLEANUP ALIAS ATTRS PROTOTYPES PROTOTYPE VERSIONCHECK INCLUDE
- SCOPE INTERFACE INTERFACE_MACRO C_ARGS POSTCALL OVERLOAD FALLBACK
- )) . "|$END)\\s*:";
-
-
- our ($C_group_rex, $C_arg);
- # Group in C (no support for comments or literals)
- $C_group_rex = qr/ [({\[]
- (?: (?> [^()\[\]{}]+ ) | (??{ $C_group_rex }) )*
- [)}\]] /x ;
- # Chunk in C without comma at toplevel (no comments):
- $C_arg = qr/ (?: (?> [^()\[\]{},"']+ )
- | (??{ $C_group_rex })
- | " (?: (?> [^\\"]+ )
- | \\.
- )* " # String literal
- | ' (?: (?> [^\\']+ ) | \\. )* ' # Char literal
- )* /xs;
-
- # Identify the version of xsubpp used
- print <<EOM ;
-/*
- * This file was generated automatically by ExtUtils::ParseXS version $VERSION from the
- * contents of $filename. Do not edit this file, edit $filename instead.
- *
- * ANY CHANGES MADE HERE WILL BE LOST!
- *
- */
-
-EOM
-
-
- print("#line 1 \"$filepathname\"\n")
- if $WantLineNumbers;
-
- firstmodule:
- while (<$FH>) {
- if (/^=/) {
- my $podstartline = $.;
- do {
- if (/^=cut\s*$/) {
- # We can't just write out a /* */ comment, as our embedded
- # POD might itself be in a comment. We can't put a /**/
- # comment inside #if 0, as the C standard says that the source
- # file is decomposed into preprocessing characters in the stage
- # before preprocessing commands are executed.
- # I don't want to leave the text as barewords, because the spec
- # isn't clear whether macros are expanded before or after
- # preprocessing commands are executed, and someone pathological
- # may just have defined one of the 3 words as a macro that does
- # something strange. Multiline strings are illegal in C, so
- # the "" we write must be a string literal. And they aren't
- # concatenated until 2 steps later, so we are safe.
- # - Nicholas Clark
- print("#if 0\n \"Skipped embedded POD.\"\n#endif\n");
- printf("#line %d \"$filepathname\"\n", $. + 1)
- if $WantLineNumbers;
- next firstmodule
- }
-
- } while (<$FH>);
- # At this point $. is at end of file so die won't state the start
- # of the problem, and as we haven't yet read any lines &death won't
- # show the correct line in the message either.
- die ("Error: Unterminated pod in $filename, line $podstartline\n")
- unless $lastline;
- }
- last if ($Package, $Prefix) =
- /^MODULE\s*=\s*[\w:]+(?:\s+PACKAGE\s*=\s*([\w:]+))?(?:\s+PREFIX\s*=\s*(\S+))?\s*$/;
-
- print $_;
- }
- unless (defined $_) {
- warn "Didn't find a 'MODULE ... PACKAGE ... PREFIX' line\n";
- exit 0; # Not a fatal error for the caller process
- }
-
- print 'ExtUtils::ParseXS::CountLines'->end_marker, "\n" if $WantLineNumbers;
-
- print <<"EOF";
-#ifndef PERL_UNUSED_VAR
-# define PERL_UNUSED_VAR(var) if (0) var = var
-#endif
-
-EOF
-
- print <<"EOF";
-#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
-#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
-
-/* prototype to pass -Wmissing-prototypes */
-STATIC void
-S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);
-
-STATIC void
-S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
-{
- const GV *const gv = CvGV(cv);
-
- PERL_ARGS_ASSERT_CROAK_XS_USAGE;
-
- if (gv) {
- const char *const gvname = GvNAME(gv);
- const HV *const stash = GvSTASH(gv);
- const char *const hvname = stash ? HvNAME(stash) : NULL;
-
- if (hvname)
- Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
- else
- Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
- } else {
- /* Pants. I don't think that it should be possible to get here. */
- Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
- }
-}
-#undef PERL_ARGS_ASSERT_CROAK_XS_USAGE
-
-#ifdef PERL_IMPLICIT_CONTEXT
-#define croak_xs_usage(a,b) S_croak_xs_usage(aTHX_ a,b)
-#else
-#define croak_xs_usage S_croak_xs_usage
-#endif
-
-#endif
-
-EOF
-
- print 'ExtUtils::ParseXS::CountLines'->end_marker, "\n" if $WantLineNumbers;
-
- $lastline = $_;
- $lastline_no = $.;
-
- PARAGRAPH:
- while (fetch_para()) {
- # Print initial preprocessor statements and blank lines
- while (@line && $line[0] !~ /^[^\#]/) {
- my $line = shift(@line);
- print $line, "\n";
- next unless $line =~ /^\#\s*((if)(?:n?def)?|elsif|else|endif)\b/;
- my $statement = $+;
- if ($statement eq 'if') {
- $XSS_work_idx = @XSStack;
- push(@XSStack, {type => 'if'});
- } else {
- death ("Error: `$statement' with no matching `if'")
- if $XSStack[-1]{type} ne 'if';
- if ($XSStack[-1]{varname}) {
- push(@InitFileCode, "#endif\n");
- push(@BootCode, "#endif");
- }
-
- my(@fns) = keys %{$XSStack[-1]{functions}};
- if ($statement ne 'endif') {
- # Hide the functions defined in other #if branches, and reset.
- @{$XSStack[-1]{other_functions}}{@fns} = (1) x @fns;
- @{$XSStack[-1]}{qw(varname functions)} = ('', {});
- } else {
- my($tmp) = pop(@XSStack);
- 0 while (--$XSS_work_idx
- && $XSStack[$XSS_work_idx]{type} ne 'if');
- # Keep all new defined functions
- push(@fns, keys %{$tmp->{other_functions}});
- @{$XSStack[$XSS_work_idx]{functions}}{@fns} = (1) x @fns;
- }
- }
- }
-
- next PARAGRAPH unless @line;
-
- if ($XSS_work_idx && !$XSStack[$XSS_work_idx]{varname}) {
- # We are inside an #if, but have not yet #defined its xsubpp variable.
- print "#define $cpp_next_tmp 1\n\n";
- push(@InitFileCode, "#if $cpp_next_tmp\n");
- push(@BootCode, "#if $cpp_next_tmp");
- $XSStack[$XSS_work_idx]{varname} = $cpp_next_tmp++;
- }
-
- death ("Code is not inside a function"
- ." (maybe last function was ended by a blank line "
- ." followed by a statement on column one?)")
- if $line[0] =~ /^\s/;
-
- my ($class, $externC, $static, $ellipsis, $wantRETVAL, $RETVAL_no_return);
- my (@fake_INPUT_pre); # For length(s) generated variables
- my (@fake_INPUT);
-
- # initialize info arrays
- undef(%args_match);
- undef(%var_types);
- undef(%defaults);
- undef(%arg_list) ;
- undef(@proto_arg) ;
- undef($processing_arg_with_types) ;
- undef(%argtype_seen) ;
- undef(@outlist) ;
- undef(%in_out) ;
- undef(%lengthof) ;
- undef($proto_in_this_xsub) ;
- undef($scope_in_this_xsub) ;
- undef($interface);
- undef($prepush_done);
- $interface_macro = 'XSINTERFACE_FUNC' ;
- $interface_macro_set = 'XSINTERFACE_FUNC_SET' ;
- $ProtoThisXSUB = $WantPrototypes ;
- $ScopeThisXSUB = 0;
- $xsreturn = 0;
-
- $_ = shift(@line);
- while (my $kwd = check_keyword("REQUIRE|PROTOTYPES|FALLBACK|VERSIONCHECK|INCLUDE")) {
- &{"${kwd}_handler"}() ;
- next PARAGRAPH unless @line ;
- $_ = shift(@line);
- }
-
- if (check_keyword("BOOT")) {
- &check_cpp;
- push (@BootCode, "#line $line_no[@line_no - @line] \"$filepathname\"")
- if $WantLineNumbers && $line[0] !~ /^\s*#\s*line\b/;
- push (@BootCode, @line, "") ;
- next PARAGRAPH ;
- }
-
-
- # extract return type, function name and arguments
- ($ret_type) = TidyType($_);
- $RETVAL_no_return = 1 if $ret_type =~ s/^NO_OUTPUT\s+//;
-
- # Allow one-line ANSI-like declaration
- unshift @line, $2
- if $process_argtypes
- and $ret_type =~ s/^(.*?\w.*?)\s*\b(\w+\s*\(.*)/$1/s;
-
- # a function definition needs at least 2 lines
- blurt ("Error: Function definition too short '$ret_type'"), next PARAGRAPH
- unless @line ;
-
- $externC = 1 if $ret_type =~ s/^extern "C"\s+//;
- $static = 1 if $ret_type =~ s/^static\s+//;
-
- $func_header = shift(@line);
- blurt ("Error: Cannot parse function definition from '$func_header'"), next PARAGRAPH
- unless $func_header =~ /^(?:([\w:]*)::)?(\w+)\s*\(\s*(.*?)\s*\)\s*(const)?\s*(;\s*)?$/s;
-
- ($class, $func_name, $orig_args) = ($1, $2, $3) ;
- $class = "$4 $class" if $4;
- ($pname = $func_name) =~ s/^($Prefix)?/$Packprefix/;
- ($clean_func_name = $func_name) =~ s/^$Prefix//;
- $Full_func_name = "${Packid}_$clean_func_name";
- if ($Is_VMS) {
- $Full_func_name = $SymSet->addsym($Full_func_name);
- }
-
- # Check for duplicate function definition
- for my $tmp (@XSStack) {
- next unless defined $tmp->{functions}{$Full_func_name};
- Warn("Warning: duplicate function definition '$clean_func_name' detected");
- last;
- }
- $XSStack[$XSS_work_idx]{functions}{$Full_func_name} ++ ;
- %XsubAliases = %XsubAliasValues = %Interfaces = @Attributes = ();
- $DoSetMagic = 1;
-
- $orig_args =~ s/\\\s*/ /g; # process line continuations
- my @args;
-
- my %only_C_inlist; # Not in the signature of Perl function
- if ($process_argtypes and $orig_args =~ /\S/) {
- my $args = "$orig_args ,";
- if ($args =~ /^( (??{ $C_arg }) , )* $ /x) {
- @args = ($args =~ /\G ( (??{ $C_arg }) ) , /xg);
- for ( @args ) {
- s/^\s+//;
- s/\s+$//;
- my ($arg, $default) = / ( [^=]* ) ( (?: = .* )? ) /x;
- my ($pre, $name) = ($arg =~ /(.*?) \s*
- \b ( \w+ | length\( \s*\w+\s* \) )
- \s* $ /x);
- next unless defined($pre) && length($pre);
- my $out_type = '';
- my $inout_var;
- if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\s+//) {
- my $type = $1;
- $out_type = $type if $type ne 'IN';
- $arg =~ s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\s+//;
- $pre =~ s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\s+//;
- }
- my $islength;
- if ($name =~ /^length\( \s* (\w+) \s* \)\z/x) {
- $name = "XSauto_length_of_$1";
- $islength = 1;
- die "Default value on length() argument: `$_'"
- if length $default;
- }
- if (length $pre or $islength) { # Has a type
- if ($islength) {
- push @fake_INPUT_pre, $arg;
- } else {
- push @fake_INPUT, $arg;
- }
- # warn "pushing '$arg'\n";
- $argtype_seen{$name}++;
- $_ = "$name$default"; # Assigns to @args
- }
- $only_C_inlist{$_} = 1 if $out_type eq "OUTLIST" or $islength;
- push @outlist, $name if $out_type =~ /OUTLIST$/;
- $in_out{$name} = $out_type if $out_type;
- }
- } else {
- @args = split(/\s*,\s*/, $orig_args);
- Warn("Warning: cannot parse argument list '$orig_args', fallback to split");
- }
- } else {
- @args = split(/\s*,\s*/, $orig_args);
- for (@args) {
- if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST|IN_OUT|OUT)\s+//) {
- my $out_type = $1;
- next if $out_type eq 'IN';
- $only_C_inlist{$_} = 1 if $out_type eq "OUTLIST";
- push @outlist, $name if $out_type =~ /OUTLIST$/;
- $in_out{$_} = $out_type;
- }
- }
- }
- if (defined($class)) {
- my $arg0 = ((defined($static) or $func_name eq 'new')
- ? "CLASS" : "THIS");
- unshift(@args, $arg0);
- ($report_args = "$arg0, $report_args") =~ s/^\w+, $/$arg0/;
- }
- my $extra_args = 0;
- @args_num = ();
- $num_args = 0;
- my $report_args = '';
- foreach my $i (0 .. $#args) {
- if ($args[$i] =~ s/\.\.\.//) {
- $ellipsis = 1;
- if ($args[$i] eq '' && $i == $#args) {
- $report_args .= ", ...";
- pop(@args);
- last;
- }
- }
- if ($only_C_inlist{$args[$i]}) {
- push @args_num, undef;
- } else {
- push @args_num, ++$num_args;
- $report_args .= ", $args[$i]";
- }
- if ($args[$i] =~ /^([^=]*[^\s=])\s*=\s*(.*)/s) {
- $extra_args++;
- $args[$i] = $1;
- $defaults{$args[$i]} = $2;
- $defaults{$args[$i]} =~ s/"/\\"/g;
- }
- $proto_arg[$i+1] = '$' ;
- }
- $min_args = $num_args - $extra_args;
- $report_args =~ s/"/\\"/g;
- $report_args =~ s/^,\s+//;
- my @func_args = @args;
- shift @func_args if defined($class);
-
- for (@func_args) {
- s/^/&/ if $in_out{$_};
- }
- $func_args = join(", ", @func_args);
- @args_match{@args} = @args_num;
-
- $PPCODE = grep(/^\s*PPCODE\s*:/, @line);
- $CODE = grep(/^\s*CODE\s*:/, @line);
- # Detect CODE: blocks which use ST(n)= or XST_m*(n,v)
- # to set explicit return values.
- $EXPLICIT_RETURN = ($CODE &&
- ("@line" =~ /(\bST\s*\([^;]*=) | (\bXST_m\w+\s*\()/x ));
- $ALIAS = grep(/^\s*ALIAS\s*:/, @line);
- $INTERFACE = grep(/^\s*INTERFACE\s*:/, @line);
-
- $xsreturn = 1 if $EXPLICIT_RETURN;
-
- $externC = $externC ? qq[extern "C"] : "";
-
- # print function header
- print Q(<<"EOF");
-#$externC
-#XS(XS_${Full_func_name}); /* prototype to pass -Wmissing-prototypes */
-#XS(XS_${Full_func_name})
-#[[
-##ifdef dVAR
-# dVAR; dXSARGS;
-##else
-# dXSARGS;
-##endif
-EOF
- print Q(<<"EOF") if $ALIAS ;
-# dXSI32;
-EOF
- print Q(<<"EOF") if $INTERFACE ;
-# dXSFUNCTION($ret_type);
-EOF
- if ($ellipsis) {
- $cond = ($min_args ? qq(items < $min_args) : 0);
- } elsif ($min_args == $num_args) {
- $cond = qq(items != $min_args);
- } else {
- $cond = qq(items < $min_args || items > $num_args);
- }
-
- print Q(<<"EOF") if $except;
-# char errbuf[1024];
-# *errbuf = '\0';
-EOF
-
- if($cond) {
- print Q(<<"EOF");
-# if ($cond)
-# croak_xs_usage(cv, "$report_args");
-EOF
- } else {
- # cv likely to be unused
- print Q(<<"EOF");
-# PERL_UNUSED_VAR(cv); /* -W */
-EOF
- }
-
- #gcc -Wall: if an xsub has PPCODE is used
- #it is possible none of ST, XSRETURN or XSprePUSH macros are used
- #hence `ax' (setup by dXSARGS) is unused
- #XXX: could breakup the dXSARGS; into dSP;dMARK;dITEMS
- #but such a move could break third-party extensions
- print Q(<<"EOF") if $PPCODE;
-# PERL_UNUSED_VAR(ax); /* -Wall */
-EOF
-
- print Q(<<"EOF") if $PPCODE;
-# SP -= items;
-EOF
-
- # Now do a block of some sort.
-
- $condnum = 0;
- $cond = ''; # last CASE: condidional
- push(@line, "$END:");
- push(@line_no, $line_no[-1]);
- $_ = '';
- &check_cpp;
- while (@line) {
- &CASE_handler if check_keyword("CASE");
- print Q(<<"EOF");
-# $except [[
-EOF
-
- # do initialization of input variables
- $thisdone = 0;
- $retvaldone = 0;
- $deferred = "";
- %arg_list = () ;
- $gotRETVAL = 0;
-
- INPUT_handler() ;
- process_keyword("INPUT|PREINIT|INTERFACE_MACRO|C_ARGS|ALIAS|ATTRS|PROTOTYPE|SCOPE|OVERLOAD") ;
-
- print Q(<<"EOF") if $ScopeThisXSUB;
-# ENTER;
-# [[
-EOF
-
- if (!$thisdone && defined($class)) {
- if (defined($static) or $func_name eq 'new') {
- print "\tchar *";
- $var_types{"CLASS"} = "char *";
- &generate_init("char *", 1, "CLASS");
- }
- else {
- print "\t$class *";
- $var_types{"THIS"} = "$class *";
- &generate_init("$class *", 1, "THIS");
- }
- }
-
- # do code
- if (/^\s*NOT_IMPLEMENTED_YET/) {
- print "\n\tPerl_croak(aTHX_ \"$pname: not implemented yet\");\n";
- $_ = '' ;
- } else {
- if ($ret_type ne "void") {
- print "\t" . &map_type($ret_type, 'RETVAL') . ";\n"
- if !$retvaldone;
- $args_match{"RETVAL"} = 0;
- $var_types{"RETVAL"} = $ret_type;
- print "\tdXSTARG;\n"
- if $WantOptimize and $targetable{$type_kind{$ret_type}};
- }
-
- if (@fake_INPUT or @fake_INPUT_pre) {
- unshift @line, @fake_INPUT_pre, @fake_INPUT, $_;
- $_ = "";
- $processing_arg_with_types = 1;
- INPUT_handler() ;
- }
- print $deferred;
-
- process_keyword("INIT|ALIAS|ATTRS|PROTOTYPE|INTERFACE_MACRO|INTERFACE|C_ARGS|OVERLOAD") ;
-
- if (check_keyword("PPCODE")) {
- print_section();
- death ("PPCODE must be last thing") if @line;
- print "\tLEAVE;\n" if $ScopeThisXSUB;
- print "\tPUTBACK;\n\treturn;\n";
- } elsif (check_keyword("CODE")) {
- print_section() ;
- } elsif (defined($class) and $func_name eq "DESTROY") {
- print "\n\t";
- print "delete THIS;\n";
- } else {
- print "\n\t";
- if ($ret_type ne "void") {
- print "RETVAL = ";
- $wantRETVAL = 1;
- }
- if (defined($static)) {
- if ($func_name eq 'new') {
- $func_name = "$class";
- } else {
- print "${class}::";
- }
- } elsif (defined($class)) {
- if ($func_name eq 'new') {
- $func_name .= " $class";
- } else {
- print "THIS->";
- }
- }
- $func_name =~ s/^\Q$args{'s'}//
- if exists $args{'s'};
- $func_name = 'XSFUNCTION' if $interface;
- print "$func_name($func_args);\n";
- }
- }
-
- # do output variables
- $gotRETVAL = 0; # 1 if RETVAL seen in OUTPUT section;
- undef $RETVAL_code ; # code to set RETVAL (from OUTPUT section);
- # $wantRETVAL set if 'RETVAL =' autogenerated
- ($wantRETVAL, $ret_type) = (0, 'void') if $RETVAL_no_return;
- undef %outargs ;
- process_keyword("POSTCALL|OUTPUT|ALIAS|ATTRS|PROTOTYPE|OVERLOAD");
-
- &generate_output($var_types{$_}, $args_match{$_}, $_, $DoSetMagic)
- for grep $in_out{$_} =~ /OUT$/, keys %in_out;
-
- # all OUTPUT done, so now push the return value on the stack
- if ($gotRETVAL && $RETVAL_code) {
- print "\t$RETVAL_code\n";
- } elsif ($gotRETVAL || $wantRETVAL) {
- my $t = $WantOptimize && $targetable{$type_kind{$ret_type}};
- my $var = 'RETVAL';
- my $type = $ret_type;
-
- # 0: type, 1: with_size, 2: how, 3: how_size
- if ($t and not $t->[1] and $t->[0] eq 'p') {
- # PUSHp corresponds to setpvn. Treate setpv directly
- my $what = eval qq("$t->[2]");
- warn $@ if $@;
-
- print "\tsv_setpv(TARG, $what); XSprePUSH; PUSHTARG;\n";
- $prepush_done = 1;
- }
- elsif ($t) {
- my $what = eval qq("$t->[2]");
- warn $@ if $@;
-
- my $size = $t->[3];
- $size = '' unless defined $size;
- $size = eval qq("$size");
- warn $@ if $@;
- print "\tXSprePUSH; PUSH$t->[0]($what$size);\n";
- $prepush_done = 1;
- }
- else {
- # RETVAL almost never needs SvSETMAGIC()
- &generate_output($ret_type, 0, 'RETVAL', 0);
- }
- }
-
- $xsreturn = 1 if $ret_type ne "void";
- my $num = $xsreturn;
- my $c = @outlist;
- print "\tXSprePUSH;" if $c and not $prepush_done;
- print "\tEXTEND(SP,$c);\n" if $c;
- $xsreturn += $c;
- generate_output($var_types{$_}, $num++, $_, 0, 1) for @outlist;
-
- # do cleanup
- process_keyword("CLEANUP|ALIAS|ATTRS|PROTOTYPE|OVERLOAD") ;
-
- print Q(<<"EOF") if $ScopeThisXSUB;
-# ]]
-EOF
- print Q(<<"EOF") if $ScopeThisXSUB and not $PPCODE;
-# LEAVE;
-EOF
-
- # print function trailer
- print Q(<<"EOF");
-# ]]
-EOF
- print Q(<<"EOF") if $except;
-# BEGHANDLERS
-# CATCHALL
-# sprintf(errbuf, "%s: %s\\tpropagated", Xname, Xreason);
-# ENDHANDLERS
-EOF
- if (check_keyword("CASE")) {
- blurt ("Error: No `CASE:' at top of function")
- unless $condnum;
- $_ = "CASE: $_"; # Restore CASE: label
- next;
- }
- last if $_ eq "$END:";
- death(/^$BLOCK_re/o ? "Misplaced `$1:'" : "Junk at end of function");
- }
-
- print Q(<<"EOF") if $except;
-# if (errbuf[0])
-# Perl_croak(aTHX_ errbuf);
-EOF
-
- if ($xsreturn) {
- print Q(<<"EOF") unless $PPCODE;
-# XSRETURN($xsreturn);
-EOF
- } else {
- print Q(<<"EOF") unless $PPCODE;
-# XSRETURN_EMPTY;
-EOF
- }
-
- print Q(<<"EOF");
-#]]
-#
-EOF
-
- my $newXS = "newXS" ;
- my $proto = "" ;
-
- # Build the prototype string for the xsub
- if ($ProtoThisXSUB) {
- $newXS = "newXSproto";
-
- if ($ProtoThisXSUB eq 2) {
- # User has specified empty prototype
- }
- elsif ($ProtoThisXSUB eq 1) {
- my $s = ';';
- if ($min_args < $num_args) {
- $s = '';
- $proto_arg[$min_args] .= ";" ;
- }
- push @proto_arg, "$s\@"
- if $ellipsis ;
-
- $proto = join ("", grep defined, @proto_arg);
- }
- else {
- # User has specified a prototype
- $proto = $ProtoThisXSUB;
- }
- $proto = qq{, "$proto"};
- }
-
- if (%XsubAliases) {
- $XsubAliases{$pname} = 0
- unless defined $XsubAliases{$pname} ;
- while ( ($name, $value) = each %XsubAliases) {
- push(@InitFileCode, Q(<<"EOF"));
-# cv = newXS(\"$name\", XS_$Full_func_name, file);
-# XSANY.any_i32 = $value ;
-EOF
- push(@InitFileCode, Q(<<"EOF")) if $proto;
-# sv_setpv((SV*)cv$proto) ;
-EOF
- }
- }
- elsif (@Attributes) {
- push(@InitFileCode, Q(<<"EOF"));
-# cv = newXS(\"$pname\", XS_$Full_func_name, file);
-# apply_attrs_string("$Package", cv, "@Attributes", 0);
-EOF
- }
- elsif ($interface) {
- while ( ($name, $value) = each %Interfaces) {
- $name = "$Package\::$name" unless $name =~ /::/;
- push(@InitFileCode, Q(<<"EOF"));
-# cv = newXS(\"$name\", XS_$Full_func_name, file);
-# $interface_macro_set(cv,$value) ;
-EOF
- push(@InitFileCode, Q(<<"EOF")) if $proto;
-# sv_setpv((SV*)cv$proto) ;
-EOF
- }
- }
- else {
- push(@InitFileCode,
- " ${newXS}(\"$pname\", XS_$Full_func_name, file$proto);\n");
- }
- }
-
- if ($Overload) # make it findable with fetchmethod
- {
- print Q(<<"EOF");
-#XS(XS_${Packid}_nil); /* prototype to pass -Wmissing-prototypes */
-#XS(XS_${Packid}_nil)
-#{
-# dXSARGS;
-# XSRETURN_EMPTY;
-#}
-#
-EOF
- unshift(@InitFileCode, <<"MAKE_FETCHMETHOD_WORK");
- /* Making a sub named "${Package}::()" allows the package */
- /* to be findable via fetchmethod(), and causes */
- /* overload::Overloaded("${Package}") to return true. */
- newXS("${Package}::()", XS_${Packid}_nil, file$proto);
-MAKE_FETCHMETHOD_WORK
- }
-
- # print initialization routine
-
- print Q(<<"EOF");
-##ifdef __cplusplus
-#extern "C"
-##endif
-EOF
-
- print Q(<<"EOF");
-#XS(boot_$Module_cname); /* prototype to pass -Wmissing-prototypes */
-#XS(boot_$Module_cname)
-EOF
-
- print Q(<<"EOF");
-#[[
-##ifdef dVAR
-# dVAR; dXSARGS;
-##else
-# dXSARGS;
-##endif
-EOF
-
- #-Wall: if there is no $Full_func_name there are no xsubs in this .xs
- #so `file' is unused
- print Q(<<"EOF") if $Full_func_name;
-# const char* file = __FILE__;
-EOF
-
- print Q("#\n");
-
- print Q(<<"EOF");
-# PERL_UNUSED_VAR(cv); /* -W */
-# PERL_UNUSED_VAR(items); /* -W */
-EOF
-
- print Q(<<"EOF") if $WantVersionChk ;
-# XS_VERSION_BOOTCHECK ;
-#
-EOF
-
- print Q(<<"EOF") if defined $XsubAliases or defined $Interfaces ;
-# {
-# CV * cv ;
-#
-EOF
-
- print Q(<<"EOF") if ($Overload);
-# /* register the overloading (type 'A') magic */
-# PL_amagic_generation++;
-# /* The magic for overload gets a GV* via gv_fetchmeth as */
-# /* mentioned above, and looks in the SV* slot of it for */
-# /* the "fallback" status. */
-# sv_setsv(
-# get_sv( "${Package}::()", TRUE ),
-# $Fallback
-# );
-EOF
-
- print @InitFileCode;
-
- print Q(<<"EOF") if defined $XsubAliases or defined $Interfaces ;
-# }
-EOF
-
- if (@BootCode)
- {
- print "\n /* Initialisation Section */\n\n" ;
- @line = @BootCode;
- print_section();
- print "\n /* End of Initialisation Section */\n\n" ;
- }
-
- if ($] >= 5.009) {
- print <<'EOF';
- if (PL_unitcheckav)
- call_list(PL_scopestack_ix, PL_unitcheckav);
-EOF
- }
-
- print Q(<<"EOF");
-# XSRETURN_YES;
-#]]
-#
-EOF
-
- warn("Please specify prototyping behavior for $filename (see perlxs manual)\n")
- unless $ProtoUsed ;
-
- chdir($orig_cwd);
- select($orig_fh);
- untie *PSEUDO_STDOUT if tied *PSEUDO_STDOUT;
- close $FH;
-
- return 1;
-}
-
-sub errors { $errors }
-
-sub standard_typemap_locations {
- # Add all the default typemap locations to the search path
- my @tm = qw(typemap);
-
- my $updir = File::Spec->updir;
- foreach my $dir (File::Spec->catdir(($updir) x 1), File::Spec->catdir(($updir) x 2),
- File::Spec->catdir(($updir) x 3), File::Spec->catdir(($updir) x 4)) {
-
- unshift @tm, File::Spec->catfile($dir, 'typemap');
- unshift @tm, File::Spec->catfile($dir, lib => ExtUtils => 'typemap');
- }
- foreach my $dir (@INC) {
- my $file = File::Spec->catfile($dir, ExtUtils => 'typemap');
- unshift @tm, $file if -e $file;
- }
- return @tm;
-}
-
-sub TrimWhitespace
-{
- $_[0] =~ s/^\s+|\s+$//go ;
-}
-
-sub TidyType
- {
- local ($_) = @_ ;
-
- # rationalise any '*' by joining them into bunches and removing whitespace
- s#\s*(\*+)\s*#$1#g;
- s#(\*+)# $1 #g ;
-
- # change multiple whitespace into a single space
- s/\s+/ /g ;
-
- # trim leading & trailing whitespace
- TrimWhitespace($_) ;
-
- $_ ;
-}
-
-# Input: ($_, @line) == unparsed input.
-# Output: ($_, @line) == (rest of line, following lines).
-# Return: the matched keyword if found, otherwise 0
-sub check_keyword {
- $_ = shift(@line) while !/\S/ && @line;
- s/^(\s*)($_[0])\s*:\s*(?:#.*)?/$1/s && $2;
-}
-
-sub print_section {
- # the "do" is required for right semantics
- do { $_ = shift(@line) } while !/\S/ && @line;
-
- print("#line ", $line_no[@line_no - @line -1], " \"$filepathname\"\n")
- if $WantLineNumbers && !/^\s*#\s*line\b/ && !/^#if XSubPPtmp/;
- for (; defined($_) && !/^$BLOCK_re/o; $_ = shift(@line)) {
- print "$_\n";
- }
- print 'ExtUtils::ParseXS::CountLines'->end_marker, "\n" if $WantLineNumbers;
-}
-
-sub merge_section {
- my $in = '';
-
- while (!/\S/ && @line) {
- $_ = shift(@line);
- }
-
- for (; defined($_) && !/^$BLOCK_re/o; $_ = shift(@line)) {
- $in .= "$_\n";
- }
- chomp $in;
- return $in;
- }
-
-sub process_keyword($)
- {
- my($pattern) = @_ ;
- my $kwd ;
-
- &{"${kwd}_handler"}()
- while $kwd = check_keyword($pattern) ;
- }
-
-sub CASE_handler {
- blurt ("Error: `CASE:' after unconditional `CASE:'")
- if $condnum && $cond eq '';
- $cond = $_;
- TrimWhitespace($cond);
- print " ", ($condnum++ ? " else" : ""), ($cond ? " if ($cond)\n" : "\n");
- $_ = '' ;
-}
-
-sub INPUT_handler {
- for (; !/^$BLOCK_re/o; $_ = shift(@line)) {
- last if /^\s*NOT_IMPLEMENTED_YET/;
- next unless /\S/; # skip blank lines
-
- TrimWhitespace($_) ;
- my $line = $_ ;
-
- # remove trailing semicolon if no initialisation
- s/\s*;$//g unless /[=;+].*\S/ ;
-
- # Process the length(foo) declarations
- if (s/^([^=]*)\blength\(\s*(\w+)\s*\)\s*$/$1 XSauto_length_of_$2=NO_INIT/x) {
- print "\tSTRLEN\tSTRLEN_length_of_$2;\n";
- $lengthof{$2} = $name;
- # $islengthof{$name} = $1;
- $deferred .= "\n\tXSauto_length_of_$2 = STRLEN_length_of_$2;";
- }
-
- # check for optional initialisation code
- my $var_init = '' ;
- $var_init = $1 if s/\s*([=;+].*)$//s ;
- $var_init =~ s/"/\\"/g;
-
- s/\s+/ /g;
- my ($var_type, $var_addr, $var_name) = /^(.*?[^&\s])\s*(\&?)\s*\b(\w+)$/s
- or blurt("Error: invalid argument declaration '$line'"), next;
-
- # Check for duplicate definitions
- blurt ("Error: duplicate definition of argument '$var_name' ignored"), next
- if $arg_list{$var_name}++
- or defined $argtype_seen{$var_name} and not $processing_arg_with_types;
-
- $thisdone |= $var_name eq "THIS";
- $retvaldone |= $var_name eq "RETVAL";
- $var_types{$var_name} = $var_type;
- # XXXX This check is a safeguard against the unfinished conversion of
- # generate_init(). When generate_init() is fixed,
- # one can use 2-args map_type() unconditionally.
- if ($var_type =~ / \( \s* \* \s* \) /x) {
- # Function pointers are not yet supported with &output_init!
- print "\t" . &map_type($var_type, $var_name);
- $name_printed = 1;
- } else {
- print "\t" . &map_type($var_type);
- $name_printed = 0;
- }
- $var_num = $args_match{$var_name};
-
- $proto_arg[$var_num] = ProtoString($var_type)
- if $var_num ;
- $func_args =~ s/\b($var_name)\b/&$1/ if $var_addr;
- if ($var_init =~ /^[=;]\s*NO_INIT\s*;?\s*$/
- or $in_out{$var_name} and $in_out{$var_name} =~ /^OUT/
- and $var_init !~ /\S/) {
- if ($name_printed) {
- print ";\n";
- } else {
- print "\t$var_name;\n";
- }
- } elsif ($var_init =~ /\S/) {
- &output_init($var_type, $var_num, $var_name, $var_init, $name_printed);
- } elsif ($var_num) {
- # generate initialization code
- &generate_init($var_type, $var_num, $var_name, $name_printed);
- } else {
- print ";\n";
- }
- }
-}
-
-sub OUTPUT_handler {
- for (; !/^$BLOCK_re/o; $_ = shift(@line)) {
- next unless /\S/;
- if (/^\s*SETMAGIC\s*:\s*(ENABLE|DISABLE)\s*/) {
- $DoSetMagic = ($1 eq "ENABLE" ? 1 : 0);
- next;
- }
- my ($outarg, $outcode) = /^\s*(\S+)\s*(.*?)\s*$/s ;
- blurt ("Error: duplicate OUTPUT argument '$outarg' ignored"), next
- if $outargs{$outarg} ++ ;
- if (!$gotRETVAL and $outarg eq 'RETVAL') {
- # deal with RETVAL last
- $RETVAL_code = $outcode ;
- $gotRETVAL = 1 ;
- next ;
- }
- blurt ("Error: OUTPUT $outarg not an argument"), next
- unless defined($args_match{$outarg});
- blurt("Error: No input definition for OUTPUT argument '$outarg' - ignored"), next
- unless defined $var_types{$outarg} ;
- $var_num = $args_match{$outarg};
- if ($outcode) {
- print "\t$outcode\n";
- print "\tSvSETMAGIC(ST(" , $var_num-1 , "));\n" if $DoSetMagic;
- } else {
- &generate_output($var_types{$outarg}, $var_num, $outarg, $DoSetMagic);
- }
- delete $in_out{$outarg} # No need to auto-OUTPUT
- if exists $in_out{$outarg} and $in_out{$outarg} =~ /OUT$/;
- }
-}
-
-sub C_ARGS_handler() {
- my $in = merge_section();
-
- TrimWhitespace($in);
- $func_args = $in;
-}
-
-sub INTERFACE_MACRO_handler() {
- my $in = merge_section();
-
- TrimWhitespace($in);
- if ($in =~ /\s/) { # two
- ($interface_macro, $interface_macro_set) = split ' ', $in;
- } else {
- $interface_macro = $in;
- $interface_macro_set = 'UNKNOWN_CVT'; # catch later
- }
- $interface = 1; # local
- $Interfaces = 1; # global
-}
-
-sub INTERFACE_handler() {
- my $in = merge_section();
-
- TrimWhitespace($in);
-
- foreach (split /[\s,]+/, $in) {
- my $name = $_;
- $name =~ s/^$Prefix//;
- $Interfaces{$name} = $_;
- }
- print Q(<<"EOF");
-# XSFUNCTION = $interface_macro($ret_type,cv,XSANY.any_dptr);
-EOF
- $interface = 1; # local
- $Interfaces = 1; # global
-}
-
-sub CLEANUP_handler() { print_section() }
-sub PREINIT_handler() { print_section() }
-sub POSTCALL_handler() { print_section() }
-sub INIT_handler() { print_section() }
-
-sub GetAliases
- {
- my ($line) = @_ ;
- my ($orig) = $line ;
- my ($alias) ;
- my ($value) ;
-
- # Parse alias definitions
- # format is
- # alias = value alias = value ...
-
- while ($line =~ s/^\s*([\w:]+)\s*=\s*(\w+)\s*//) {
- $alias = $1 ;
- $orig_alias = $alias ;
- $value = $2 ;
-
- # check for optional package definition in the alias
- $alias = $Packprefix . $alias if $alias !~ /::/ ;
-
- # check for duplicate alias name & duplicate value
- Warn("Warning: Ignoring duplicate alias '$orig_alias'")
- if defined $XsubAliases{$alias} ;
-
- Warn("Warning: Aliases '$orig_alias' and '$XsubAliasValues{$value}' have identical values")
- if $XsubAliasValues{$value} ;
-
- $XsubAliases = 1;
- $XsubAliases{$alias} = $value ;
- $XsubAliasValues{$value} = $orig_alias ;
- }
-
- blurt("Error: Cannot parse ALIAS definitions from '$orig'")
- if $line ;
- }
-
-sub ATTRS_handler ()
- {
- for (; !/^$BLOCK_re/o; $_ = shift(@line)) {
- next unless /\S/;
- TrimWhitespace($_) ;
- push @Attributes, $_;
- }
- }
-
-sub ALIAS_handler ()
- {
- for (; !/^$BLOCK_re/o; $_ = shift(@line)) {
- next unless /\S/;
- TrimWhitespace($_) ;
- GetAliases($_) if $_ ;
- }
- }
-
-sub OVERLOAD_handler()
-{
- for (; !/^$BLOCK_re/o; $_ = shift(@line)) {
- next unless /\S/;
- TrimWhitespace($_) ;
- while ( s/^\s*([\w:"\\)\+\-\*\/\%\<\>\.\&\|\^\!\~\{\}\=]+)\s*//) {
- $Overload = 1 unless $Overload;
- my $overload = "$Package\::(".$1 ;
- push(@InitFileCode,
- " newXS(\"$overload\", XS_$Full_func_name, file$proto);\n");
- }
- }
-}
-
-sub FALLBACK_handler()
-{
- # the rest of the current line should contain either TRUE,
- # FALSE or UNDEF
-
- TrimWhitespace($_) ;
- my %map = (
- TRUE => "&PL_sv_yes", 1 => "&PL_sv_yes",
- FALSE => "&PL_sv_no", 0 => "&PL_sv_no",
- UNDEF => "&PL_sv_undef",
- ) ;
-
- # check for valid FALLBACK value
- death ("Error: FALLBACK: TRUE/FALSE/UNDEF") unless exists $map{uc $_} ;
-
- $Fallback = $map{uc $_} ;
-}
-
-
-sub REQUIRE_handler ()
- {
- # the rest of the current line should contain a version number
- my ($Ver) = $_ ;
-
- TrimWhitespace($Ver) ;
-
- death ("Error: REQUIRE expects a version number")
- unless $Ver ;
-
- # check that the version number is of the form n.n
- death ("Error: REQUIRE: expected a number, got '$Ver'")
- unless $Ver =~ /^\d+(\.\d*)?/ ;
-
- death ("Error: xsubpp $Ver (or better) required--this is only $VERSION.")
- unless $VERSION >= $Ver ;
- }
-
-sub VERSIONCHECK_handler ()
- {
- # the rest of the current line should contain either ENABLE or
- # DISABLE
-
- TrimWhitespace($_) ;
-
- # check for ENABLE/DISABLE
- death ("Error: VERSIONCHECK: ENABLE/DISABLE")
- unless /^(ENABLE|DISABLE)/i ;
-
- $WantVersionChk = 1 if $1 eq 'ENABLE' ;
- $WantVersionChk = 0 if $1 eq 'DISABLE' ;
-
- }
-
-sub PROTOTYPE_handler ()
- {
- my $specified ;
-
- death("Error: Only 1 PROTOTYPE definition allowed per xsub")
- if $proto_in_this_xsub ++ ;
-
- for (; !/^$BLOCK_re/o; $_ = shift(@line)) {
- next unless /\S/;
- $specified = 1 ;
- TrimWhitespace($_) ;
- if ($_ eq 'DISABLE') {
- $ProtoThisXSUB = 0
- } elsif ($_ eq 'ENABLE') {
- $ProtoThisXSUB = 1
- } else {
- # remove any whitespace
- s/\s+//g ;
- death("Error: Invalid prototype '$_'")
- unless ValidProtoString($_) ;
- $ProtoThisXSUB = C_string($_) ;
- }
- }
-
- # If no prototype specified, then assume empty prototype ""
- $ProtoThisXSUB = 2 unless $specified ;
-
- $ProtoUsed = 1 ;
-
- }
-
-sub SCOPE_handler ()
- {
- death("Error: Only 1 SCOPE declaration allowed per xsub")
- if $scope_in_this_xsub ++ ;
-
- for (; !/^$BLOCK_re/o; $_ = shift(@line)) {
- next unless /\S/;
- TrimWhitespace($_) ;
- if ($_ =~ /^DISABLE/i) {
- $ScopeThisXSUB = 0
- } elsif ($_ =~ /^ENABLE/i) {
- $ScopeThisXSUB = 1
- }
- }
-
- }
-
-sub PROTOTYPES_handler ()
- {
- # the rest of the current line should contain either ENABLE or
- # DISABLE
-
- TrimWhitespace($_) ;
-
- # check for ENABLE/DISABLE
- death ("Error: PROTOTYPES: ENABLE/DISABLE")
- unless /^(ENABLE|DISABLE)/i ;
-
- $WantPrototypes = 1 if $1 eq 'ENABLE' ;
- $WantPrototypes = 0 if $1 eq 'DISABLE' ;
- $ProtoUsed = 1 ;
-
- }
-
-sub INCLUDE_handler ()
- {
- # the rest of the current line should contain a valid filename
-
- TrimWhitespace($_) ;
-
- death("INCLUDE: filename missing")
- unless $_ ;
-
- death("INCLUDE: output pipe is illegal")
- if /^\s*\|/ ;
-
- # simple minded recursion detector
- death("INCLUDE loop detected")
- if $IncludedFiles{$_} ;
-
- ++ $IncludedFiles{$_} unless /\|\s*$/ ;
-
- # Save the current file context.
- push(@XSStack, {
- type => 'file',
- LastLine => $lastline,
- LastLineNo => $lastline_no,
- Line => \@line,
- LineNo => \@line_no,
- Filename => $filename,
- Filepathname => $filepathname,
- Handle => $FH,
- }) ;
-
- $FH = Symbol::gensym();
-
- # open the new file
- open ($FH, "$_") or death("Cannot open '$_': $!") ;
-
- print Q(<<"EOF");
-#
-#/* INCLUDE: Including '$_' from '$filename' */
-#
-EOF
-
- $filepathname = $filename = $_ ;
-
- # Prime the pump by reading the first
- # non-blank line
-
- # skip leading blank lines
- while (<$FH>) {
- last unless /^\s*$/ ;
- }
-
- $lastline = $_ ;
- $lastline_no = $. ;
-
- }
-
-sub PopFile()
- {
- return 0 unless $XSStack[-1]{type} eq 'file' ;
-
- my $data = pop @XSStack ;
- my $ThisFile = $filename ;
- my $isPipe = ($filename =~ /\|\s*$/) ;
-
- -- $IncludedFiles{$filename}
- unless $isPipe ;
-
- close $FH ;
-
- $FH = $data->{Handle} ;
- # $filename is the leafname, which for some reason isused for diagnostic
- # messages, whereas $filepathname is the full pathname, and is used for
- # #line directives.
- $filename = $data->{Filename} ;
- $filepathname = $data->{Filepathname} ;
- $lastline = $data->{LastLine} ;
- $lastline_no = $data->{LastLineNo} ;
- @line = @{ $data->{Line} } ;
- @line_no = @{ $data->{LineNo} } ;
-
- if ($isPipe and $? ) {
- -- $lastline_no ;
- print STDERR "Error reading from pipe '$ThisFile': $! in $filename, line $lastline_no\n" ;
- exit 1 ;
- }
-
- print Q(<<"EOF");
-#
-#/* INCLUDE: Returning to '$filename' from '$ThisFile' */
-#
-EOF
-
- return 1 ;
- }
-
-sub ValidProtoString ($)
- {
- my($string) = @_ ;
-
- if ( $string =~ /^$proto_re+$/ ) {
- return $string ;
- }
-
- return 0 ;
- }
-
-sub C_string ($)
- {
- my($string) = @_ ;
-
- $string =~ s[\\][\\\\]g ;
- $string ;
- }
-
-sub ProtoString ($)
- {
- my ($type) = @_ ;
-
- $proto_letter{$type} or "\$" ;
- }
-
-sub check_cpp {
- my @cpp = grep(/^\#\s*(?:if|e\w+)/, @line);
- if (@cpp) {
- my ($cpp, $cpplevel);
- for $cpp (@cpp) {
- if ($cpp =~ /^\#\s*if/) {
- $cpplevel++;
- } elsif (!$cpplevel) {
- Warn("Warning: #else/elif/endif without #if in this function");
- print STDERR " (precede it with a blank line if the matching #if is outside the function)\n"
- if $XSStack[-1]{type} eq 'if';
- return;
- } elsif ($cpp =~ /^\#\s*endif/) {
- $cpplevel--;
- }
- }
- Warn("Warning: #if without #endif in this function") if $cpplevel;
- }
-}
-
-
-sub Q {
- my($text) = @_;
- $text =~ s/^#//gm;
- $text =~ s/\[\[/{/g;
- $text =~ s/\]\]/}/g;
- $text;
-}
-
-# Read next xsub into @line from ($lastline, <$FH>).
-sub fetch_para {
- # parse paragraph
- death ("Error: Unterminated `#if/#ifdef/#ifndef'")
- if !defined $lastline && $XSStack[-1]{type} eq 'if';
- @line = ();
- @line_no = () ;
- return PopFile() if !defined $lastline;
-
- if ($lastline =~
- /^MODULE\s*=\s*([\w:]+)(?:\s+PACKAGE\s*=\s*([\w:]+))?(?:\s+PREFIX\s*=\s*(\S+))?\s*$/) {
- $Module = $1;
- $Package = defined($2) ? $2 : ''; # keep -w happy
- $Prefix = defined($3) ? $3 : ''; # keep -w happy
- $Prefix = quotemeta $Prefix ;
- ($Module_cname = $Module) =~ s/\W/_/g;
- ($Packid = $Package) =~ tr/:/_/;
- $Packprefix = $Package;
- $Packprefix .= "::" if $Packprefix ne "";
- $lastline = "";
- }
-
- for (;;) {
- # Skip embedded PODs
- while ($lastline =~ /^=/) {
- while ($lastline = <$FH>) {
- last if ($lastline =~ /^=cut\s*$/);
- }
- death ("Error: Unterminated pod") unless $lastline;
- $lastline = <$FH>;
- chomp $lastline;
- $lastline =~ s/^\s+$//;
- }
- if ($lastline !~ /^\s*#/ ||
- # CPP directives:
- # ANSI: if ifdef ifndef elif else endif define undef
- # line error pragma
- # gcc: warning include_next
- # obj-c: import
- # others: ident (gcc notes that some cpps have this one)
- $lastline =~ /^#[ \t]*(?:(?:if|ifn?def|elif|else|endif|define|undef|pragma|error|warning|line\s+\d+|ident)\b|(?:include(?:_next)?|import)\s*["<].*[>"])/) {
- last if $lastline =~ /^\S/ && @line && $line[-1] eq "";
- push(@line, $lastline);
- push(@line_no, $lastline_no) ;
- }
-
- # Read next line and continuation lines
- last unless defined($lastline = <$FH>);
- $lastline_no = $.;
- my $tmp_line;
- $lastline .= $tmp_line
- while ($lastline =~ /\\$/ && defined($tmp_line = <$FH>));
-
- chomp $lastline;
- $lastline =~ s/^\s+$//;
- }
- pop(@line), pop(@line_no) while @line && $line[-1] eq "";
- 1;
-}
-
-sub output_init {
- local($type, $num, $var, $init, $name_printed) = @_;
- local($arg) = "ST(" . ($num - 1) . ")";
-
- if ( $init =~ /^=/ ) {
- if ($name_printed) {
- eval qq/print " $init\\n"/;
- } else {
- eval qq/print "\\t$var $init\\n"/;
- }
- warn $@ if $@;
- } else {
- if ( $init =~ s/^\+// && $num ) {
- &generate_init($type, $num, $var, $name_printed);
- } elsif ($name_printed) {
- print ";\n";
- $init =~ s/^;//;
- } else {
- eval qq/print "\\t$var;\\n"/;
- warn $@ if $@;
- $init =~ s/^;//;
- }
- $deferred .= eval qq/"\\n\\t$init\\n"/;
- warn $@ if $@;
- }
-}
-
-sub Warn
- {
- # work out the line number
- my $line_no = $line_no[@line_no - @line -1] ;
-
- print STDERR "@_ in $filename, line $line_no\n" ;
- }
-
-sub blurt
- {
- Warn @_ ;
- $errors ++
- }
-
-sub death
- {
- Warn @_ ;
- exit 1 ;
- }
-
-sub generate_init {
- local($type, $num, $var) = @_;
- local($arg) = "ST(" . ($num - 1) . ")";
- local($argoff) = $num - 1;
- local($ntype);
- local($tk);
-
- $type = TidyType($type) ;
- blurt("Error: '$type' not in typemap"), return
- unless defined($type_kind{$type});
-
- ($ntype = $type) =~ s/\s*\*/Ptr/g;
- ($subtype = $ntype) =~ s/(?:Array)?(?:Ptr)?$//;
- $tk = $type_kind{$type};
- $tk =~ s/OBJ$/REF/ if $func_name =~ /DESTROY$/;
- if ($tk eq 'T_PV' and exists $lengthof{$var}) {
- print "\t$var" unless $name_printed;
- print " = ($type)SvPV($arg, STRLEN_length_of_$var);\n";
- die "default value not supported with length(NAME) supplied"
- if defined $defaults{$var};
- return;
- }
- $type =~ tr/:/_/ unless $hiertype;
- blurt("Error: No INPUT definition for type '$type', typekind '$type_kind{$type}' found"), return
- unless defined $input_expr{$tk} ;
- $expr = $input_expr{$tk};
- if ($expr =~ /DO_ARRAY_ELEM/) {
- blurt("Error: '$subtype' not in typemap"), return
- unless defined($type_kind{$subtype});
- blurt("Error: No INPUT definition for type '$subtype', typekind '$type_kind{$subtype}' found"), return
- unless defined $input_expr{$type_kind{$subtype}} ;
- $subexpr = $input_expr{$type_kind{$subtype}};
- $subexpr =~ s/\$type/\$subtype/g;
- $subexpr =~ s/ntype/subtype/g;
- $subexpr =~ s/\$arg/ST(ix_$var)/g;
- $subexpr =~ s/\n\t/\n\t\t/g;
- $subexpr =~ s/is not of (.*\")/[arg %d] is not of $1, ix_$var + 1/g;
- $subexpr =~ s/\$var/${var}[ix_$var - $argoff]/;
- $expr =~ s/DO_ARRAY_ELEM/$subexpr/;
- }
- if ($expr =~ m#/\*.*scope.*\*/#i) { # "scope" in C comments
- $ScopeThisXSUB = 1;
- }
- if (defined($defaults{$var})) {
- $expr =~ s/(\t+)/$1 /g;
- $expr =~ s/ /\t/g;
- if ($name_printed) {
- print ";\n";
- } else {
- eval qq/print "\\t$var;\\n"/;
- warn $@ if $@;
- }
- if ($defaults{$var} eq 'NO_INIT') {
- $deferred .= eval qq/"\\n\\tif (items >= $num) {\\n$expr;\\n\\t}\\n"/;
- } else {
- $deferred .= eval qq/"\\n\\tif (items < $num)\\n\\t $var = $defaults{$var};\\n\\telse {\\n$expr;\\n\\t}\\n"/;
- }
- warn $@ if $@;
- } elsif ($ScopeThisXSUB or $expr !~ /^\s*\$var =/) {
- if ($name_printed) {
- print ";\n";
- } else {
- eval qq/print "\\t$var;\\n"/;
- warn $@ if $@;
- }
- $deferred .= eval qq/"\\n$expr;\\n"/;
- warn $@ if $@;
- } else {
- die "panic: do not know how to handle this branch for function pointers"
- if $name_printed;
- eval qq/print "$expr;\\n"/;
- warn $@ if $@;
- }
-}
-
-sub generate_output {
- local($type, $num, $var, $do_setmagic, $do_push) = @_;
- local($arg) = "ST(" . ($num - ($num != 0)) . ")";
- local($argoff) = $num - 1;
- local($ntype);
-
- $type = TidyType($type) ;
- if ($type =~ /^array\(([^,]*),(.*)\)/) {
- print "\t$arg = sv_newmortal();\n";
- print "\tsv_setpvn($arg, (char *)$var, $2 * sizeof($1));\n";
- print "\tSvSETMAGIC($arg);\n" if $do_setmagic;
- } else {
- blurt("Error: '$type' not in typemap"), return
- unless defined($type_kind{$type});
- blurt("Error: No OUTPUT definition for type '$type', typekind '$type_kind{$type}' found"), return
- unless defined $output_expr{$type_kind{$type}} ;
- ($ntype = $type) =~ s/\s*\*/Ptr/g;
- $ntype =~ s/\(\)//g;
- ($subtype = $ntype) =~ s/(?:Array)?(?:Ptr)?$//;
- $expr = $output_expr{$type_kind{$type}};
- if ($expr =~ /DO_ARRAY_ELEM/) {
- blurt("Error: '$subtype' not in typemap"), return
- unless defined($type_kind{$subtype});
- blurt("Error: No OUTPUT definition for type '$subtype', typekind '$type_kind{$subtype}' found"), return
- unless defined $output_expr{$type_kind{$subtype}} ;
- $subexpr = $output_expr{$type_kind{$subtype}};
- $subexpr =~ s/ntype/subtype/g;
- $subexpr =~ s/\$arg/ST(ix_$var)/g;
- $subexpr =~ s/\$var/${var}[ix_$var]/g;
- $subexpr =~ s/\n\t/\n\t\t/g;
- $expr =~ s/DO_ARRAY_ELEM\n/$subexpr/;
- eval "print qq\a$expr\a";
- warn $@ if $@;
- print "\t\tSvSETMAGIC(ST(ix_$var));\n" if $do_setmagic;
- } elsif ($var eq 'RETVAL') {
- if ($expr =~ /^\t\$arg = new/) {
- # We expect that $arg has refcnt 1, so we need to
- # mortalize it.
- eval "print qq\a$expr\a";
- warn $@ if $@;
- print "\tsv_2mortal(ST($num));\n";
- print "\tSvSETMAGIC(ST($num));\n" if $do_setmagic;
- } elsif ($expr =~ /^\s*\$arg\s*=/) {
- # We expect that $arg has refcnt >=1, so we need
- # to mortalize it!
- eval "print qq\a$expr\a";
- warn $@ if $@;
- print "\tsv_2mortal(ST(0));\n";
- print "\tSvSETMAGIC(ST(0));\n" if $do_setmagic;
- } else {
- # Just hope that the entry would safely write it
- # over an already mortalized value. By
- # coincidence, something like $arg = &sv_undef
- # works too.
- print "\tST(0) = sv_newmortal();\n";
- eval "print qq\a$expr\a";
- warn $@ if $@;
- # new mortals don't have set magic
- }
- } elsif ($do_push) {
- print "\tPUSHs(sv_newmortal());\n";
- $arg = "ST($num)";
- eval "print qq\a$expr\a";
- warn $@ if $@;
- print "\tSvSETMAGIC($arg);\n" if $do_setmagic;
- } elsif ($arg =~ /^ST\(\d+\)$/) {
- eval "print qq\a$expr\a";
- warn $@ if $@;
- print "\tSvSETMAGIC($arg);\n" if $do_setmagic;
- }
- }
-}
-
-sub map_type {
- my($type, $varname) = @_;
-
- # C++ has :: in types too so skip this
- $type =~ tr/:/_/ unless $hiertype;
- $type =~ s/^array\(([^,]*),(.*)\).*/$1 */s;
- if ($varname) {
- if ($varname && $type =~ / \( \s* \* (?= \s* \) ) /xg) {
- (substr $type, pos $type, 0) = " $varname ";
- } else {
- $type .= "\t$varname";
- }
- }
- $type;
-}
-
-
-#########################################################
-package
- ExtUtils::ParseXS::CountLines;
-use strict;
-use vars qw($SECTION_END_MARKER);
-
-sub TIEHANDLE {
- my ($class, $cfile, $fh) = @_;
- $cfile =~ s/\\/\\\\/g;
- $SECTION_END_MARKER = qq{#line --- "$cfile"};
-
- return bless {buffer => '',
- fh => $fh,
- line_no => 1,
- }, $class;
-}
-
-sub PRINT {
- my $self = shift;
- for (@_) {
- $self->{buffer} .= $_;
- while ($self->{buffer} =~ s/^([^\n]*\n)//) {
- my $line = $1;
- ++ $self->{line_no};
- $line =~ s|^\#line\s+---(?=\s)|#line $self->{line_no}|;
- print {$self->{fh}} $line;
- }
- }
-}
-
-sub PRINTF {
- my $self = shift;
- my $fmt = shift;
- $self->PRINT(sprintf($fmt, @_));
-}
-
-sub DESTROY {
- # Not necessary if we're careful to end with a "\n"
- my $self = shift;
- print {$self->{fh}} $self->{buffer};
-}
-
-sub UNTIE {
- # This sub does nothing, but is neccessary for references to be released.
-}
-
-sub end_marker {
- return $SECTION_END_MARKER;
-}
-
-
-1;
-__END__
-
-=head1 NAME
-
-ExtUtils::ParseXS - converts Perl XS code into C code
-
-=head1 SYNOPSIS
-
- use ExtUtils::ParseXS qw(process_file);
-
- process_file( filename => 'foo.xs' );
-
- process_file( filename => 'foo.xs',
- output => 'bar.c',
- 'C++' => 1,
- typemap => 'path/to/typemap',
- hiertype => 1,
- except => 1,
- prototypes => 1,
- versioncheck => 1,
- linenumbers => 1,
- optimize => 1,
- prototypes => 1,
- );
-=head1 DESCRIPTION
-
-C<ExtUtils::ParseXS> will compile XS code into C code by embedding the constructs
-necessary to let C functions manipulate Perl values and creates the glue
-necessary to let Perl access those functions. The compiler uses typemaps to
-determine how to map C function parameters and variables to Perl values.
-
-The compiler will search for typemap files called I<typemap>. It will use
-the following search path to find default typemaps, with the rightmost
-typemap taking precedence.
-
- ../../../typemap:../../typemap:../typemap:typemap
-
-=head1 EXPORT
-
-None by default. C<process_file()> may be exported upon request.
-
-
-=head1 FUNCTIONS
-
-=over 4
-
-=item process_xs()
-
-This function processes an XS file and sends output to a C file.
-Named parameters control how the processing is done. The following
-parameters are accepted:
-
-=over 4
-
-=item B<C++>
-
-Adds C<extern "C"> to the C code. Default is false.
-
-=item B<hiertype>
-
-Retains C<::> in type names so that C++ hierachical types can be
-mapped. Default is false.
-
-=item B<except>
-
-Adds exception handling stubs to the C code. Default is false.
-
-=item B<typemap>
-
-Indicates that a user-supplied typemap should take precedence over the
-default typemaps. A single typemap may be specified as a string, or
-multiple typemaps can be specified in an array reference, with the
-last typemap having the highest precedence.
-
-=item B<prototypes>
-
-Generates prototype code for all xsubs. Default is false.
-
-=item B<versioncheck>
-
-Makes sure at run time that the object file (derived from the C<.xs>
-file) and the C<.pm> files have the same version number. Default is
-true.
-
-=item B<linenumbers>
-
-Adds C<#line> directives to the C output so error messages will look
-like they came from the original XS file. Default is true.
-
-=item B<optimize>
-
-Enables certain optimizations. The only optimization that is currently
-affected is the use of I<target>s by the output C code (see L<perlguts>).
-Not optimizing may significantly slow down the generated code, but this is the way
-B<xsubpp> of 5.005 and earlier operated. Default is to optimize.
-
-=item B<inout>
-
-Enable recognition of C<IN>, C<OUT_LIST> and C<INOUT_LIST>
-declarations. Default is true.
-
-=item B<argtypes>
-
-Enable recognition of ANSI-like descriptions of function signature.
-Default is true.
-
-=item B<s>
-
-I have no clue what this does. Strips function prefixes?
-
-=back
-
-=item errors()
-
-This function returns the number of [a certain kind of] errors
-encountered during processing of the XS file.
-
-=back
-
-=head1 AUTHOR
-
-Based on xsubpp code, written by Larry Wall.
-
-Maintained by Ken Williams, <ken at mathforum.org>
-
-=head1 COPYRIGHT
-
-Copyright 2002-2003 Ken Williams. All rights reserved.
-
-This library is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
-
-Based on the ExtUtils::xsubpp code by Larry Wall and the Perl 5
-Porters, which was released under the same license terms.
-
-=head1 SEE ALSO
-
-L<perl>, ExtUtils::xsubpp, ExtUtils::MakeMaker, L<perlxs>, L<perlxstut>.
-
-=cut
Deleted: vendor/perl/dist/lib/ExtUtils/README
===================================================================
--- vendor/perl/dist/lib/ExtUtils/README 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/README 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,57 +0,0 @@
-This is a CPAN distribution of the venerable MakeMaker module. It has been
-backported to work with Perl 5.005_03 and up.
-
-If you do not have a make program, several can be found...
-
-Most Unixen: The make utility which comes with your operating system
-should work fine. If you don't have one, GNU make is recommended,
-most others (Sun, BSD, etc...) will work fine as well.
-http://www.gnu.org/software/make/make.html GNU make
-
-Windows: nmake or dmake will work. GNU make will *not*.
-ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe nmake
-http://search.cpan.org/dist/dmake/ dmake
-
-VMS: MMS or the free MadGoat MaKe utility (MMK) will work.
-http://www.madgoat.com/mmk.html MMK
-
-If all else fails there is a pure Perl version of make available on
-CPAN which should work on most Unixen.
-http://search.cpan.org/author/NI-S/Make-1.00/ pmake
-
-
-PLEASE NOTE: This distribution does not include the xsubpp or typemap
-programs. They are extremely specific to your version or Perl, so
-MakeMaker will simply use the one which came with your copy of Perl.
-Do not delete your old ExtUtils/ directory. An upgraded version of xsubpp
-can be found in the ExtUtils::ParseXS module.
-
-Known Good Systems:
-
-Every stable MakeMaker release is tested at least on:
-
-MacOS X
-Linux/x86
-ActivePerl on Windows
-Cygwin
-OpenVMS
-
-Covering the major portability flavors MakeMaker has to cover.
-(I'm always on the lookout for DJGPP, Solaris, *BSD and OS/2 users)
-
-
-Known Problems:
-
-(See http://rt.cpan.org for a full list of open problems.)
-
-Windows will likely be broken if Perl is installed in C:\Program Files or
-other prefix with a space in the name.
-
-Using the MMS utility on VMS causes lots of extra newlines. Unknown
-why this is so, might be a bug in MMS. Problem not seen with MMK.
-
-GNU make does not work with MakeMaker on Windows.
-
-
-Please report any bugs via http://rt.cpan.org.
-Send questions and discussion to makemaker at perl.org
Deleted: vendor/perl/dist/lib/ExtUtils/TODO
===================================================================
--- vendor/perl/dist/lib/ExtUtils/TODO 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/TODO 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,78 +0,0 @@
-This TODO list is out of date. See http://rt.cpan.org for the real list.
-
-
-Rethink MM_Win32 tests.
-
-Investigate one method per make target.
-
-Test MM_Any and pull some redundant tests out of MM_*.t
-
-Create a way to init MM objects. (XXX What's wrong with MakeMaker->new?)
-
-Move instmodsh to utils/ in the core.
-
-Handle config files (ie. /etc) and their special PREFIX needs
-(ie. PREFIX=/usr, INSTALLCONFIGDIR=/etc).
-
-Make sure PDL builds
-
-Fix find_perl on Amiga trg at privat.utfors.se
-
-Fix appending of .. when DIRS contains directories not immediately
-below the cwd.
-
-Fill in the IMPORTS docs.
-
-Remove tar -I Sun-ism from instmodsh.
-
-Consider adding a timeout option to prompt() and env variable.
-
-Unify VMS->find_perl
-
-Consider if VMS->find_perl needs to have pieces put into maybe_command()
-
-Add a MM_Any->init_others() using ExtUtils::Command.
-
-Figure out and document the 4th arg to ExtUtils::Install::install()
-
-Consider if adding a nativize() routine to replace macify() and
-fixpath() is useful.
-
-Eliminate eliminate_macros() from inside FS::VMS->catfile and catdir.
-Make into MM_VMS wrappers.
-
-Test ExtUtils::Command::MM
-
-Finish ExtUtils::MakeMaker::Tutorial
-
-Add 'how to install additional files' to ExtUtils::MakeMaker::FAQ.
-
-Give typemap location its own macro.
-
-Merge MM_VMS->tool_xsubpp
-
-Initialize PERL_SRC to '' instead of leaving undef when outside the source
-tree
-
-Reinstate HTMLification to use the new HTML Config info.
-
-split manifypods target into more generic docifypods target which depends on
-manifypods
-
-Add target to generate native Win32 help files (or whatever Win32 likes
-to use for help files these days)
-
-Add target to generate native VMS help files.
-
-On VMS, write PM_FILTERs to a temp file and run from there avoiding command
-line lengths. Worth the trouble given the Unixy nature of PM_FILTER?
-
-Move oneliner() and friends into a seperate module for general consumption.
-
-Make out of date check on 'make dist' more useful
-http://archive.develooper.com/makemaker@perl.org/msg01075.html
-
-Make maniadd() return a tied, case-insensitive hash on VMS.
-
-
-TER
\ No newline at end of file
Deleted: vendor/perl/dist/lib/ExtUtils/instmodsh
===================================================================
--- vendor/perl/dist/lib/ExtUtils/instmodsh 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/instmodsh 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,192 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use IO::File;
-use ExtUtils::Packlist;
-use ExtUtils::Installed;
-
-use vars qw($Inst @Modules);
-
-
-=head1 NAME
-
-instmodsh - A shell to examine installed modules
-
-=head1 SYNOPSIS
-
- instmodsh
-
-=head1 DESCRIPTION
-
-A little interface to ExtUtils::Installed to examine installed modules,
-validate your packlists and even create a tarball from an installed module.
-
-=head1 SEE ALSO
-
-ExtUtils::Installed
-
-=cut
-
-
-my $Module_Help = <<EOF;
-Available commands are:
- f [all|prog|doc] - List installed files of a given type
- d [all|prog|doc] - List the directories used by a module
- v - Validate the .packlist - check for missing files
- t <tarfile> - Create a tar archive of the module
- h - Display module help
- q - Quit the module
-EOF
-
-my %Module_Commands = (
- f => \&list_installed,
- d => \&list_directories,
- v => \&validate_packlist,
- t => \&create_archive,
- h => \&module_help,
- );
-
-sub do_module($) {
- my ($module) = @_;
-
- print($Module_Help);
- MODULE_CMD: while (1) {
- print("$module cmd? ");
-
- my $reply = <STDIN>; chomp($reply);
- my($cmd) = $reply =~ /^(\w)\b/;
-
- last if $cmd eq 'q';
-
- if( $Module_Commands{$cmd} ) {
- $Module_Commands{$cmd}->($reply, $module);
- }
- elsif( $cmd eq 'q' ) {
- last MODULE_CMD;
- }
- else {
- module_help();
- }
- }
-}
-
-
-sub list_installed {
- my($reply, $module) = @_;
-
- my $class = (split(' ', $reply))[1];
- $class = 'all' unless $class;
-
- my @files;
- if (eval { @files = $Inst->files($module, $class); }) {
- print("$class files in $module are:\n ",
- join("\n ", @files), "\n");
- }
- else {
- print($@);
- }
-};
-
-
-sub list_directories {
- my($reply, $module) = @_;
-
- my $class = (split(' ', $reply))[1];
- $class = 'all' unless $class;
-
- my @dirs;
- if (eval { @dirs = $Inst->directories($module, $class); }) {
- print("$class directories in $module are:\n ",
- join("\n ", @dirs), "\n");
- }
- else {
- print($@);
- }
-}
-
-
-sub create_archive {
- my($reply, $module) = @_;
-
- my $file = (split(' ', $reply))[1];
-
- if( !(defined $file and length $file) ) {
- print "No tar file specified\n";
- }
- elsif( eval { require Archive::Tar } ) {
- Archive::Tar->create_archive($file, 0, $Inst->files($module));
- }
- else {
- my($first, @rest) = $Inst->files($module);
- system('tar', 'cvf', $file, $first);
- for my $f (@rest) {
- system('tar', 'rvf', $file, $f);
- }
- print "Can't use tar\n" if $?;
- }
-}
-
-
-sub validate_packlist {
- my($reply, $module) = @_;
-
- if (my @missing = $Inst->validate($module)) {
- print("Files missing from $module are:\n ",
- join("\n ", @missing), "\n");
- }
- else {
- print("$module has no missing files\n");
- }
-}
-
-sub module_help {
- print $Module_Help;
-}
-
-
-
-##############################################################################
-
-sub toplevel()
-{
-my $help = <<EOF;
-Available commands are:
- l - List all installed modules
- m <module> - Select a module
- q - Quit the program
-EOF
-print($help);
-while (1)
- {
- print("cmd? ");
- my $reply = <STDIN>; chomp($reply);
- CASE:
- {
- $reply eq 'l' and do
- {
- print("Installed modules are:\n ", join("\n ", @Modules), "\n");
- last CASE;
- };
- $reply =~ /^m\s+/ and do
- {
- do_module((split(' ', $reply))[1]);
- last CASE;
- };
- $reply eq 'q' and do
- {
- exit(0);
- };
- # Default
- print($help);
- }
- }
-}
-
-
-###############################################################################
-
-$Inst = ExtUtils::Installed->new();
- at Modules = $Inst->modules();
-toplevel();
-
-###############################################################################
Deleted: vendor/perl/dist/lib/ExtUtils/t/00compile.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/00compile.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/00compile.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,42 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use Test::More;
-
-my $Has_Test_Pod;
-BEGIN {
- $Has_Test_Pod = eval 'use Test::Pod 0.95; 1';
-}
-
-chdir "..";
-my $manifest = "MANIFEST";
-open(my $manifest_fh, "<", $manifest) or die "Can't open $manifest: $!";
-my @modules = map { m{^lib/(\S+)}; $1 }
- grep { m{^lib/ExtUtils/\S*\.pm} }
- grep { !m{/t/} } <$manifest_fh>;
-chomp @modules;
-close $manifest_fh;
-
-chdir 'lib';
-plan tests => scalar @modules * 2;
-foreach my $file (@modules) {
- # Make sure we look at the local files and do not reload them if
- # they're already loaded. This avoids recompilation warnings.
- local @INC = @INC;
- unshift @INC, ".";
- ok eval { require($file); 1 } or diag "require $file failed.\n$@";
-
- SKIP: {
- skip "Test::Pod not installed", 1 unless $Has_Test_Pod;
- pod_file_ok($file);
- }
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/Constant.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/Constant.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/Constant.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1056 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- use Config;
- unless ($Config{usedl}) {
- print "1..0 # no usedl, skipping\n";
- exit 0;
- }
-}
-
-# use warnings;
-use strict;
-use ExtUtils::MakeMaker;
-use ExtUtils::Constant qw (C_constant autoload);
-use File::Spec;
-use Cwd;
-
-my $do_utf_tests = $] > 5.006;
-my $better_than_56 = $] > 5.007;
-# For debugging set this to 1.
-my $keep_files = 0;
-$| = 1;
-
-# Because were are going to be changing directory before running Makefile.PL
-my $perl = $^X;
-# 5.005 doesn't have new enough File::Spec to have rel2abs. But actually we
-# only need it when $^X isn't absolute, which is going to be 5.8.0 or later
-# (where ExtUtils::Constant is in the core, and tests against the uninstalled
-# perl)
-$perl = File::Spec->rel2abs ($perl) unless $] < 5.006;
-# ExtUtils::Constant::C_constant uses $^X inside a comment, and we want to
-# compare output to ensure that it is the same. We were probably run as ./perl
-# whereas we will run the child with the full path in $perl. So make $^X for
-# us the same as our child will see.
-$^X = $perl;
-my $lib = $ENV{PERL_CORE} ? '../../../lib' : '../../blib/lib';
-my $runperl = "$perl \"-I$lib\"";
-print "# perl=$perl\n";
-
-my $make = $Config{make};
-$make = $ENV{MAKE} if exists $ENV{MAKE};
-if ($^O eq 'MSWin32' && $make eq 'nmake') { $make .= " -nologo"; }
-
-# VMS may be using something other than MMS/MMK
-my $mms_or_mmk = 0;
-my $vms_lc = 0;
-my $vms_nodot = 0;
-if ($^O eq 'VMS') {
- $mms_or_mmk = 1 if (($make eq 'MMK') || ($make eq 'MMS'));
- $vms_lc = 1;
- $vms_nodot = 1;
- my $vms_unix_rpt = 0;
- my $vms_efs = 0;
- my $vms_efs_case = 0;
- if (eval 'require VMS::Feature') {
- $vms_unix_rpt = VMS::Feature::current("filename_unix_report");
- $vms_efs = VMS::Feature::current("efs_case_preserve");
- $vms_efs_case = VMS::Feature::current("efs_charset");
- } else {
- my $unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || '';
- my $efs_charset = $ENV{'DECC$EFS_CHARSET'} || '';
- my $efs_case = $ENV{'DECC$EFS_CASE_PRESERVE'} || '';
- $vms_unix_rpt = $unix_rpt =~ /^[ET1]/i;
- $vms_efs = $efs_charset =~ /^[ET1]/i;
- $vms_efs_case = $efs_case =~ /^[ET1]/i;
- }
- $vms_lc = 0 if $vms_efs_case;
- $vms_nodot = 0 if $vms_unix_rpt;
-}
-
-# Renamed by make clean
-my $makefile = ($mms_or_mmk ? 'descrip' : 'Makefile');
-my $makefile_ext = ($mms_or_mmk ? '.mms' : '');
-my $makefile_rename = $makefile . ($mms_or_mmk ? '.mms_old' : '.old');
-
-my $output = "output";
-my $package = "ExtTest";
-my $dir = "ext-$$";
-my $subdir = 0;
-# The real test counter.
-my $realtest = 1;
-
-my $orig_cwd = cwd;
-my $updir = File::Spec->updir;
-die "Can't get current directory: $!" unless defined $orig_cwd;
-
-print "# $dir being created...\n";
-mkdir $dir, 0777 or die "mkdir: $!\n";
-
-END {
- if (defined $orig_cwd and length $orig_cwd) {
- chdir $orig_cwd or die "Can't chdir back to '$orig_cwd': $!";
- use File::Path;
- print "# $dir being removed...\n";
- rmtree($dir) unless $keep_files;
- } else {
- # Can't get here.
- die "cwd at start was empty, but directory '$dir' was created" if $dir;
- }
-}
-
-chdir $dir or die $!;
-push @INC, '../../lib', '../../../lib';
-
-package TieOut;
-
-sub TIEHANDLE {
- my $class = shift;
- bless(\( my $ref = ''), $class);
-}
-
-sub PRINT {
- my $self = shift;
- $$self .= join('', @_);
-}
-
-sub PRINTF {
- my $self = shift;
- $$self .= sprintf shift, @_;
-}
-
-sub read {
- my $self = shift;
- return substr($$self, 0, length($$self), '');
-}
-
-package main;
-
-sub check_for_bonus_files {
- my $dir = shift;
- my %expect = map {($vms_lc ? lc($_) : $_), 1} @_;
-
- my $fail;
- opendir DIR, $dir or die "opendir '$dir': $!";
- while (defined (my $entry = readdir DIR)) {
- $entry =~ s/\.$// if $vms_nodot; # delete trailing dot that indicates no extension
- next if $expect{$entry};
- print "# Extra file '$entry'\n";
- $fail = 1;
- }
-
- closedir DIR or warn "closedir '.': $!";
- if ($fail) {
- print "not ok $realtest\n";
- } else {
- print "ok $realtest\n";
- }
- $realtest++;
-}
-
-sub build_and_run {
- my ($tests, $expect, $files) = @_;
- my $core = $ENV{PERL_CORE} ? ' PERL_CORE=1' : '';
- my @perlout = `$runperl Makefile.PL $core`;
- if ($?) {
- print "not ok $realtest # $runperl Makefile.PL failed: $?\n";
- print "# $_" foreach @perlout;
- exit($?);
- } else {
- print "ok $realtest\n";
- }
- $realtest++;
-
- if (-f "$makefile$makefile_ext") {
- print "ok $realtest\n";
- } else {
- print "not ok $realtest\n";
- }
- $realtest++;
-
- my @makeout;
-
- if ($^O eq 'VMS') { $make .= ' all'; }
-
- # Sometimes it seems that timestamps can get confused
-
- # make failed: 256
- # Makefile out-of-date with respect to Makefile.PL
- # Cleaning current config before rebuilding Makefile...
- # make -f Makefile.old clean > /dev/null 2>&1 || /bin/sh -c true
- # ../../perl "-I../../../lib" "-I../../../lib" Makefile.PL "PERL_CORE=1"
- # Checking if your kit is complete...
- # Looks good
- # Writing Makefile for ExtTest
- # ==> Your Makefile has been rebuilt. <==
- # ==> Please rerun the make command. <==
- # false
-
- my $timewarp = (-M "Makefile.PL") - (-M "$makefile$makefile_ext");
- # Convert from days to seconds
- $timewarp *= 86400;
- print "# Makefile.PL is $timewarp second(s) older than $makefile$makefile_ext\n";
- if ($timewarp < 0) {
- # Sleep for a while to catch up.
- $timewarp = -$timewarp;
- $timewarp+=2;
- $timewarp = 10 if $timewarp > 10;
- print "# Sleeping for $timewarp second(s) to try to resolve this\n";
- sleep $timewarp;
- }
-
- print "# make = '$make'\n";
- @makeout = `$make`;
- if ($?) {
- print "not ok $realtest # $make failed: $?\n";
- print "# $_" foreach @makeout;
- exit($?);
- } else {
- print "ok $realtest\n";
- }
- $realtest++;
-
- if ($^O eq 'VMS') { $make =~ s{ all}{}; }
-
- if ($Config{usedl}) {
- print "ok $realtest # This is dynamic linking, so no need to make perl\n";
- } else {
- my $makeperl = "$make perl";
- print "# make = '$makeperl'\n";
- @makeout = `$makeperl`;
- if ($?) {
- print "not ok $realtest # $makeperl failed: $?\n";
- print "# $_" foreach @makeout;
- exit($?);
- } else {
- print "ok $realtest\n";
- }
- }
- $realtest++;
-
- my $maketest = "$make test";
- print "# make = '$maketest'\n";
-
- @makeout = `$maketest`;
-
- if (open OUTPUT, "<$output") {
- local $/; # Slurp it - faster.
- print <OUTPUT>;
- close OUTPUT or print "# Close $output failed: $!\n";
- } else {
- # Harness will report missing test results at this point.
- print "# Open <$output failed: $!\n";
- }
-
- $realtest += $tests;
- if ($?) {
- print "not ok $realtest # $maketest failed: $?\n";
- print "# $_" foreach @makeout;
- } else {
- print "ok $realtest - maketest\n";
- }
- $realtest++;
-
- if (defined $expect) {
- # -x is busted on Win32 < 5.6.1, so we emulate it.
- my $regen;
- if( $^O eq 'MSWin32' && $] <= 5.006001 ) {
- open(REGENTMP, ">regentmp") or die $!;
- open(XS, "$package.xs") or die $!;
- my $saw_shebang;
- while(<XS>) {
- $saw_shebang++ if /^#!.*/i ;
- print REGENTMP $_ if $saw_shebang;
- }
- close XS; close REGENTMP;
- $regen = `$runperl regentmp`;
- unlink 'regentmp';
- }
- else {
- $regen = `$runperl -x $package.xs`;
- }
- if ($?) {
- print "not ok $realtest # $runperl -x $package.xs failed: $?\n";
- } else {
- print "ok $realtest - regen\n";
- }
- $realtest++;
-
- if ($expect eq $regen) {
- print "ok $realtest - regen worked\n";
- } else {
- print "not ok $realtest - regen worked\n";
- # open FOO, ">expect"; print FOO $expect;
- # open FOO, ">regen"; print FOO $regen; close FOO;
- }
- $realtest++;
- } else {
- for (0..1) {
- print "ok $realtest # skip no regen or expect for this set of tests\n";
- $realtest++;
- }
- }
-
- my $makeclean = "$make clean";
- print "# make = '$makeclean'\n";
- @makeout = `$makeclean`;
- if ($?) {
- print "not ok $realtest # $make failed: $?\n";
- print "# $_" foreach @makeout;
- } else {
- print "ok $realtest\n";
- }
- $realtest++;
-
- check_for_bonus_files ('.', @$files, $output, $makefile_rename, '.', '..');
-
- rename $makefile_rename, $makefile . $makefile_ext
- or die "Can't rename '$makefile_rename' to '$makefile$makefile_ext': $!";
-
- unlink $output or warn "Can't unlink '$output': $!";
-
- # Need to make distclean to remove ../../lib/ExtTest.pm
- my $makedistclean = "$make distclean";
- print "# make = '$makedistclean'\n";
- @makeout = `$makedistclean`;
- if ($?) {
- print "not ok $realtest # $make failed: $?\n";
- print "# $_" foreach @makeout;
- } else {
- print "ok $realtest\n";
- }
- $realtest++;
-
- check_for_bonus_files ('.', @$files, '.', '..');
-
- unless ($keep_files) {
- foreach (@$files) {
- unlink $_ or warn "unlink $_: $!";
- }
- }
-
- check_for_bonus_files ('.', '.', '..');
-}
-
-sub Makefile_PL {
- my $package = shift;
- ################ Makefile.PL
- # We really need a Makefile.PL because make test for a no dynamic linking perl
- # will run Makefile.PL again as part of the "make perl" target.
- my $makefilePL = "Makefile.PL";
- open FH, ">$makefilePL" or die "open >$makefilePL: $!\n";
- print FH <<"EOT";
-#!$perl -w
-use ExtUtils::MakeMaker;
-WriteMakefile(
- 'NAME' => "$package",
- 'VERSION_FROM' => "$package.pm", # finds \$VERSION
- (\$] >= 5.005 ?
- (#ABSTRACT_FROM => "$package.pm", # XXX add this
- AUTHOR => "$0") : ())
- );
-EOT
-
- close FH or die "close $makefilePL: $!\n";
- return $makefilePL;
-}
-
-sub MANIFEST {
- my (@files) = @_;
- ################ MANIFEST
- # We really need a MANIFEST because make distclean checks it.
- my $manifest = "MANIFEST";
- push @files, $manifest;
- open FH, ">$manifest" or die "open >$manifest: $!\n";
- print FH "$_\n" foreach @files;
- close FH or die "close $manifest: $!\n";
- return @files;
-}
-
-sub write_and_run_extension {
- my ($name, $items, $export_names, $package, $header, $testfile, $num_tests,
- $wc_args) = @_;
-
- my $c = tie *C, 'TieOut';
- my $xs = tie *XS, 'TieOut';
-
- ExtUtils::Constant::WriteConstants(C_FH => \*C,
- XS_FH => \*XS,
- NAME => $package,
- NAMES => $items,
- @$wc_args,
- );
-
- my $C_code = $c->read();
- my $XS_code = $xs->read();
-
- undef $c;
- undef $xs;
-
- untie *C;
- untie *XS;
-
- # Don't check the regeneration code if we specify extra arguments to
- # WriteConstants. (Fix this to give finer grained control if needed)
- my $expect;
- $expect = $C_code . "\n#### XS Section:\n" . $XS_code unless $wc_args;
-
- print "# $name\n# $dir/$subdir being created...\n";
- mkdir $subdir, 0777 or die "mkdir: $!\n";
- chdir $subdir or die $!;
-
- my @files;
-
- ################ Header
- my $header_name = "test.h";
- push @files, $header_name;
- open FH, ">$header_name" or die "open >$header_name: $!\n";
- print FH $header or die $!;
- close FH or die "close $header_name: $!\n";
-
- ################ XS
- my $xs_name = "$package.xs";
- push @files, $xs_name;
- open FH, ">$xs_name" or die "open >$xs_name: $!\n";
-
- print FH <<"EOT";
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
-#include "$header_name"
-
-
-$C_code
-MODULE = $package PACKAGE = $package
-PROTOTYPES: ENABLE
-$XS_code;
-EOT
-
- close FH or die "close $xs: $!\n";
-
- ################ PM
- my $pm = "$package.pm";
- push @files, $pm;
- open FH, ">$pm" or die "open >$pm: $!\n";
- print FH "package $package;\n";
- print FH "use $];\n";
-
- print FH <<'EOT';
-
-use strict;
-EOT
- printf FH "use warnings;\n" unless $] < 5.006;
- print FH <<'EOT';
-use Carp;
-
-require Exporter;
-require DynaLoader;
-use vars qw ($VERSION @ISA @EXPORT_OK $AUTOLOAD);
-
-$VERSION = '0.01';
- at ISA = qw(Exporter DynaLoader);
-EOT
- # Having this qw( in the here doc confuses cperl mode far too much to be
- # helpful. And I'm using cperl mode to edit this, even if you're not :-)
- print FH "\@EXPORT_OK = qw(\n";
-
- # Print the names of all our autoloaded constants
- print FH "\t$_\n" foreach (@$export_names);
- print FH ");\n";
- # Print the AUTOLOAD subroutine ExtUtils::Constant generated for us
- print FH autoload ($package, $]);
- print FH "bootstrap $package \$VERSION;\n1;\n__END__\n";
- close FH or die "close $pm: $!\n";
-
- ################ test.pl
- my $testpl = "test.pl";
- push @files, $testpl;
- open FH, ">$testpl" or die "open >$testpl: $!\n";
- # Standard test header (need an option to suppress this?)
- print FH <<"EOT" or die $!;
-use strict;
-use $package qw(@$export_names);
-
-print "1..2\n";
-if (open OUTPUT, ">$output") {
- print "ok 1\n";
- select OUTPUT;
-} else {
- print "not ok 1 # Failed to open '$output': \$!\n";
- exit 1;
-}
-EOT
- print FH $testfile or die $!;
- print FH <<"EOT" or die $!;
-select STDOUT;
-if (close OUTPUT) {
- print "ok 2\n";
-} else {
- print "not ok 2 # Failed to close '$output': \$!\n";
-}
-EOT
- close FH or die "close $testpl: $!\n";
-
- push @files, Makefile_PL($package);
- @files = MANIFEST (@files);
-
- build_and_run ($num_tests, $expect, \@files);
-
- chdir $updir or die "chdir '$updir': $!";
- ++$subdir;
-}
-
-# Tests are arrayrefs of the form
-# $name, [items], [export_names], $package, $header, $testfile, $num_tests
-my @tests;
-my $before_tests = 4; # Number of "ok"s emitted to build extension
-my $after_tests = 8; # Number of "ok"s emitted after make test run
-my $dummytest = 1;
-
-my $here;
-sub start_tests {
- $dummytest += $before_tests;
- $here = $dummytest;
-}
-sub end_tests {
- my ($name, $items, $export_names, $header, $testfile, $args) = @_;
- push @tests, [$name, $items, $export_names, $package, $header, $testfile,
- $dummytest - $here, $args];
- $dummytest += $after_tests;
-}
-
-my $pound;
-if (ord('A') == 193) { # EBCDIC platform
- $pound = chr 177; # A pound sign. (Currency)
-} else { # ASCII platform
- $pound = chr 163; # A pound sign. (Currency)
-}
-my @common_items = (
- {name=>"perl", type=>"PV",},
- {name=>"*/", type=>"PV", value=>'"CLOSE"', macro=>1},
- {name=>"/*", type=>"PV", value=>'"OPEN"', macro=>1},
- {name=>$pound, type=>"PV", value=>'"Sterling"', macro=>1},
- );
-
-my @args = undef;
-push @args, [PROXYSUBS => 1] if $] > 5.009002;
-foreach my $args (@args)
-{
- # Simple tests
- start_tests();
- my $parent_rfc1149 =
- 'A Standard for the Transmission of IP Datagrams on Avian Carriers';
- # Test the code that generates 1 and 2 letter name comparisons.
- my %compass = (
- N => 0, 'NE' => 45, E => 90, SE => 135,
- S => 180, SW => 225, W => 270, NW => 315
- );
-
- my $header = << "EOT";
-#define FIVE 5
-#define OK6 "ok 6\\n"
-#define OK7 1
-#define FARTHING 0.25
-#define NOT_ZERO 1
-#define Yes 0
-#define No 1
-#define Undef 1
-#define RFC1149 "$parent_rfc1149"
-#undef NOTDEF
-#define perl "rules"
-EOT
-
- while (my ($point, $bearing) = each %compass) {
- $header .= "#define $point $bearing\n"
- }
-
- my @items = ("FIVE", {name=>"OK6", type=>"PV",},
- {name=>"OK7", type=>"PVN",
- value=>['"not ok 7\\n\\0ok 7\\n"', 15]},
- {name => "FARTHING", type=>"NV"},
- {name => "NOT_ZERO", type=>"UV", value=>"~(UV)0"},
- {name => "OPEN", type=>"PV", value=>'"/*"', macro=>1},
- {name => "CLOSE", type=>"PV", value=>'"*/"',
- macro=>["#if 1\n", "#endif\n"]},
- {name => "ANSWER", default=>["UV", 42]}, "NOTDEF",
- {name => "Yes", type=>"YES"},
- {name => "No", type=>"NO"},
- {name => "Undef", type=>"UNDEF"},
- # OK. It wasn't really designed to allow the creation of dual valued
- # constants.
- # It was more for INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_NONE
- {name=>"RFC1149", type=>"SV", value=>"sv_2mortal(temp_sv)",
- pre=>"SV *temp_sv = newSVpv(RFC1149, 0); "
- . "(void) SvUPGRADE(temp_sv,SVt_PVIV); SvIOK_on(temp_sv); "
- . "SvIV_set(temp_sv, 1149);"},
- );
-
- push @items, $_ foreach keys %compass;
-
- # Automatically compile the list of all the macro names, and make them
- # exported constants.
- my @export_names = map {(ref $_) ? $_->{name} : $_} @items;
-
- # Exporter::Heavy (currently) isn't able to export the last 3 of these:
- push @items, @common_items;
-
- my $test_body = <<"EOT";
-
-my \$test = $dummytest;
-
-EOT
-
- $test_body .= <<'EOT';
-# What follows goes to the temporary file.
-# IV
-my $five = FIVE;
-if ($five == 5) {
- print "ok $test\n";
-} else {
- print "not ok $test # \$five\n";
-}
-$test++;
-
-# PV
-if (OK6 eq "ok 6\n") {
- print "ok $test\n";
-} else {
- print "not ok $test # \$five\n";
-}
-$test++;
-
-# PVN containing embedded \0s
-$_ = OK7;
-s/.*\0//s;
-s/7/$test/;
-$test++;
-print;
-
-# NV
-my $farthing = FARTHING;
-if ($farthing == 0.25) {
- print "ok $test\n";
-} else {
- print "not ok $test # $farthing\n";
-}
-$test++;
-
-# UV
-my $not_zero = NOT_ZERO;
-if ($not_zero > 0 && $not_zero == ~0) {
- print "ok $test\n";
-} else {
- print "not ok $test # \$not_zero=$not_zero ~0=" . (~0) . "\n";
-}
-$test++;
-
-# Value includes a "*/" in an attempt to bust out of a C comment.
-# Also tests custom cpp #if clauses
-my $close = CLOSE;
-if ($close eq '*/') {
- print "ok $test\n";
-} else {
- print "not ok $test # \$close='$close'\n";
-}
-$test++;
-
-# Default values if macro not defined.
-my $answer = ANSWER;
-if ($answer == 42) {
- print "ok $test\n";
-} else {
- print "not ok $test # What do you get if you multiply six by nine? '$answer'\n";
-}
-$test++;
-
-# not defined macro
-my $notdef = eval { NOTDEF; };
-if (defined $notdef) {
- print "not ok $test # \$notdef='$notdef'\n";
-} elsif ($@ !~ /Your vendor has not defined ExtTest macro NOTDEF/) {
- print "not ok $test # \$@='$@'\n";
-} else {
- print "ok $test\n";
-}
-$test++;
-
-# not a macro
-my $notthere = eval { &ExtTest::NOTTHERE; };
-if (defined $notthere) {
- print "not ok $test # \$notthere='$notthere'\n";
-} elsif ($@ !~ /NOTTHERE is not a valid ExtTest macro/) {
- chomp $@;
- print "not ok $test # \$@='$@'\n";
-} else {
- print "ok $test\n";
-}
-$test++;
-
-# Truth
-my $yes = Yes;
-if ($yes) {
- print "ok $test\n";
-} else {
- print "not ok $test # $yes='\$yes'\n";
-}
-$test++;
-
-# Falsehood
-my $no = No;
-if (defined $no and !$no) {
- print "ok $test\n";
-} else {
- print "not ok $test # \$no=" . defined ($no) ? "'$no'\n" : "undef\n";
-}
-$test++;
-
-# Undef
-my $undef = Undef;
-unless (defined $undef) {
- print "ok $test\n";
-} else {
- print "not ok $test # \$undef='$undef'\n";
-}
-$test++;
-
-# invalid macro (chosen to look like a mix up between No and SW)
-$notdef = eval { &ExtTest::So };
-if (defined $notdef) {
- print "not ok $test # \$notdef='$notdef'\n";
-} elsif ($@ !~ /^So is not a valid ExtTest macro/) {
- print "not ok $test # \$@='$@'\n";
-} else {
- print "ok $test\n";
-}
-$test++;
-
-# invalid defined macro
-$notdef = eval { &ExtTest::EW };
-if (defined $notdef) {
- print "not ok $test # \$notdef='$notdef'\n";
-} elsif ($@ !~ /^EW is not a valid ExtTest macro/) {
- print "not ok $test # \$@='$@'\n";
-} else {
- print "ok $test\n";
-}
-$test++;
-
-my %compass = (
-EOT
-
-while (my ($point, $bearing) = each %compass) {
- $test_body .= "'$point' => $bearing, "
-}
-
-$test_body .= <<'EOT';
-
-);
-
-my $fail;
-while (my ($point, $bearing) = each %compass) {
- my $val = eval $point;
- if ($@) {
- print "# $point: \$@='$@'\n";
- $fail = 1;
- } elsif (!defined $bearing) {
- print "# $point: \$val=undef\n";
- $fail = 1;
- } elsif ($val != $bearing) {
- print "# $point: \$val=$val, not $bearing\n";
- $fail = 1;
- }
-}
-if ($fail) {
- print "not ok $test\n";
-} else {
- print "ok $test\n";
-}
-$test++;
-
-EOT
-
-$test_body .= <<"EOT";
-my \$rfc1149 = RFC1149;
-if (\$rfc1149 ne "$parent_rfc1149") {
- print "not ok \$test # '\$rfc1149' ne '$parent_rfc1149'\n";
-} else {
- print "ok \$test\n";
-}
-\$test++;
-
-if (\$rfc1149 != 1149) {
- printf "not ok \$test # %d != 1149\n", \$rfc1149;
-} else {
- print "ok \$test\n";
-}
-\$test++;
-
-EOT
-
-$test_body .= <<'EOT';
-# test macro=>1
-my $open = OPEN;
-if ($open eq '/*') {
- print "ok $test\n";
-} else {
- print "not ok $test # \$open='$open'\n";
-}
-$test++;
-EOT
-$dummytest+=18;
-
- end_tests("Simple tests", \@items, \@export_names, $header, $test_body,
- $args);
-}
-
-if ($do_utf_tests) {
- # utf8 tests
- start_tests();
- my ($inf, $pound_bytes, $pound_utf8);
-
- $inf = chr 0x221E;
- # Check that we can distiguish the pathological case of a string, and the
- # utf8 representation of that string.
- $pound_utf8 = $pound . '1';
- if ($better_than_56) {
- $pound_bytes = $pound_utf8;
- utf8::encode ($pound_bytes);
- } else {
- # Must have that "U*" to generate a zero length UTF string that forces
- # top bit set chars (such as the pound sign) into UTF8, so that the
- # unpack 'C*' then gets the byte form of the UTF8.
- $pound_bytes = pack 'C*', unpack 'C*', $pound_utf8 . pack "U*";
- }
-
- my @items = (@common_items,
- {name=>$inf, type=>"PV", value=>'"Infinity"', macro=>1},
- {name=>$pound_utf8, type=>"PV", value=>'"1 Pound"', macro=>1},
- {name=>$pound_bytes, type=>"PV", value=>'"1 Pound (as bytes)"',
- macro=>1},
- );
-
-=pod
-
-The above set of names seems to produce a suitably bad set of compile
-problems on a Unicode naive version of ExtUtils::Constant (ie 0.11):
-
-nick at thinking-cap 15439-32-utf$ PERL_CORE=1 ./perl lib/ExtUtils/t/Constant.t
-1..33
-# perl=/stuff/perl5/15439-32-utf/perl
-# ext-30370 being created...
-Wide character in print at lib/ExtUtils/t/Constant.t line 140.
-ok 1
-ok 2
-# make = 'make'
-ExtTest.xs: In function `constant_1':
-ExtTest.xs:80: warning: multi-character character constant
-ExtTest.xs:80: warning: case value out of range
-ok 3
-
-=cut
-
-# Grr `
-
- # Do this in 7 bit in case someone is testing with some settings that cause
- # 8 bit files incapable of storing this character.
- my @values
- = map {"'" . join (",", unpack "U*", $_ . pack "U*") . "'"}
- ($pound, $inf, $pound_bytes, $pound_utf8);
- # Values is a list of strings, such as ('194,163,49', '163,49')
-
- my $test_body .= "my \$test = $dummytest;\n";
- $dummytest += 7 * 3; # 3 tests for each of the 7 things:
-
- $test_body .= << 'EOT';
-
-use utf8;
-my $better_than_56 = $] > 5.007;
-
-my ($pound, $inf, $pound_bytes, $pound_utf8) = map {eval "pack 'U*', $_"}
-EOT
-
- $test_body .= join ",", @values;
-
- $test_body .= << 'EOT';
-;
-
-foreach (["perl", "rules", "rules"],
- ["/*", "OPEN", "OPEN"],
- ["*/", "CLOSE", "CLOSE"],
- [$pound, 'Sterling', []],
- [$inf, 'Infinity', []],
- [$pound_utf8, '1 Pound', '1 Pound (as bytes)'],
- [$pound_bytes, '1 Pound (as bytes)', []],
- ) {
- # Flag an expected error with a reference for the expect string.
- my ($string, $expect, $expect_bytes) = @$_;
- (my $name = $string) =~ s/([^ !"#\$%&'()*+,\-.\/0-9:;<=>?\@A-Z[\\\]^_`a-z{|}~])/sprintf '\x{%X}', ord $1/ges;
- print "# \"$name\" => \'$expect\'\n";
- # Try to force this to be bytes if possible.
- if ($better_than_56) {
- utf8::downgrade ($string, 1);
- } else {
- if ($string =~ tr/0-\377// == length $string) {
- # No chars outside range 0-255
- $string = pack 'C*', unpack 'U*', ($string . pack 'U*');
- }
- }
-EOT
-
- $test_body .= "my (\$error, \$got) = ${package}::constant (\$string);\n";
-
- $test_body .= <<'EOT';
- if ($error or $got ne $expect) {
- print "not ok $test # error '$error', got '$got'\n";
- } else {
- print "ok $test\n";
- }
- $test++;
- print "# Now upgrade '$name' to utf8\n";
- if ($better_than_56) {
- utf8::upgrade ($string);
- } else {
- $string = pack ('U*') . $string;
- }
-EOT
-
- $test_body .= "my (\$error, \$got) = ${package}::constant (\$string);\n";
-
- $test_body .= <<'EOT';
- if ($error or $got ne $expect) {
- print "not ok $test # error '$error', got '$got'\n";
- } else {
- print "ok $test\n";
- }
- $test++;
- if (defined $expect_bytes) {
- print "# And now with the utf8 byte sequence for name\n";
- # Try the encoded bytes.
- if ($better_than_56) {
- utf8::encode ($string);
- } else {
- $string = pack 'C*', unpack 'C*', $string . pack "U*";
- }
-EOT
-
- $test_body .= "my (\$error, \$got) = ${package}::constant (\$string);\n";
-
- $test_body .= <<'EOT';
- if (ref $expect_bytes) {
- # Error expected.
- if ($error) {
- print "ok $test # error='$error' (as expected)\n";
- } else {
- print "not ok $test # expected error, got no error and '$got'\n";
- }
- } elsif ($got ne $expect_bytes) {
- print "not ok $test # error '$error', expect '$expect_bytes', got '$got'\n";
- } else {
- print "ok $test\n";
- }
- $test++;
- }
-}
-EOT
-
- end_tests("utf8 tests", \@items, [], "#define perl \"rules\"\n", $test_body);
-}
-
-# XXX I think that I should merge this into the utf8 test above.
-sub explict_call_constant {
- my ($string, $expect) = @_;
- # This does assume simple strings suitable for ''
- my $test_body = <<"EOT";
-{
- my (\$error, \$got) = ${package}::constant ('$string');\n;
-EOT
-
- if (defined $expect) {
- # No error expected
- $test_body .= <<"EOT";
- if (\$error or \$got ne "$expect") {
- print "not ok $dummytest # error '\$error', expect '$expect', got '\$got'\n";
- } else {
- print "ok $dummytest\n";
- }
- }
-EOT
- } else {
- # Error expected.
- $test_body .= <<"EOT";
- if (\$error) {
- print "ok $dummytest # error='\$error' (as expected)\n";
- } else {
- print "not ok $dummytest # expected error, got no error and '\$got'\n";
- }
-EOT
- }
- $dummytest++;
- return $test_body . <<'EOT';
-}
-EOT
-}
-
-# Simple tests to verify bits of the switch generation system work.
-sub simple {
- start_tests();
- # Deliberately leave $name in @_, so that it is indexed from 1.
- my ($name, @items) = @_;
- my $test_header;
- my $test_body = "my \$value;\n";
- foreach my $counter (1 .. $#_) {
- my $thisname = $_[$counter];
- $test_header .= "#define $thisname $counter\n";
- $test_body .= <<"EOT";
-\$value = $thisname;
-if (\$value == $counter) {
- print "ok $dummytest\n";
-} else {
- print "not ok $dummytest # $thisname gave \$value\n";
-}
-EOT
- ++$dummytest;
- # Yes, the last time round the loop appends a z to the string.
- for my $i (0 .. length $thisname) {
- my $copyname = $thisname;
- substr ($copyname, $i, 1) = 'z';
- $test_body .= explict_call_constant ($copyname,
- $copyname eq $thisname
- ? $thisname : undef);
- }
- }
- # Ho. This seems to be buggy in 5.005_03:
- # # Now remove $name from @_:
- # shift @_;
- end_tests($name, \@items, \@items, $test_header, $test_body);
-}
-
-# Check that the memeq clauses work correctly when there isn't a switch
-# statement to bump off a character
-simple ("Singletons", "A", "AB", "ABC", "ABCD", "ABCDE");
-# Check the three code.
-simple ("Three start", qw(Bea kea Lea lea nea pea rea sea tea Wea yea Zea));
-# There were 162 2 letter words in /usr/share/dict/words on FreeBSD 4.6, which
-# I felt was rather too many. So I used words with 2 vowels.
-simple ("Twos and three middle", qw(aa ae ai ea eu ie io oe era eta));
-# Given the choice go for the end, else the earliest point
-simple ("Three end and four symetry", qw(ean ear eat barb marm tart));
-
-
-# Need this if the single test below is rolled into @tests :
-# --$dummytest;
-print "1..$dummytest\n";
-
-write_and_run_extension @$_ foreach @tests;
-
-# This was causing an assertion failure (a C<confess>ion)
-# Any single byte > 128 should do it.
-C_constant ($package, undef, undef, undef, undef, undef, chr 255);
-print "ok $realtest\n"; $realtest++;
-
-print STDERR "# You were running with \$keep_files set to $keep_files\n"
- if $keep_files;
Deleted: vendor/perl/dist/lib/ExtUtils/t/FIRST_MAKEFILE.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/FIRST_MAKEFILE.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/FIRST_MAKEFILE.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,40 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use strict;
-use Test::More tests => 7;
-
-use MakeMaker::Test::Setup::BFD;
-use MakeMaker::Test::Utils;
-
-my $perl = which_perl();
-my $make = make_run();
-perl_lib();
-
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-
-my @mpl_out = run(qq{$perl Makefile.PL FIRST_MAKEFILE=jakefile});
-cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag @mpl_out;
-
-ok( -e 'jakefile', 'FIRST_MAKEFILE honored' );
-
-ok( grep(/^Writing jakefile(?:\.)? for Big::Dummy/, @mpl_out) == 1,
- 'Makefile.PL output looks right' );
Deleted: vendor/perl/dist/lib/ExtUtils/t/INST.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/INST.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/INST.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,148 +0,0 @@
-#!/usr/bin/perl -w
-
-# Wherein we ensure the INST_* and INSTALL* variables are set correctly
-# in a default Makefile.PL run
-#
-# Essentially, this test is a Makefile.PL.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 26;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-use ExtUtils::MakeMaker;
-use File::Spec;
-use TieOut;
-use Config;
-
-chdir 't';
-
-perl_lib;
-
-$| = 1;
-
-my $Makefile = makefile_name;
-my $Curdir = File::Spec->curdir;
-my $Updir = File::Spec->updir;
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-
-my $stdout = tie *STDOUT, 'TieOut' or die;
-my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- PREREQ_PM => {},
- PERL_CORE => $ENV{PERL_CORE},
-);
-like( $stdout->read, qr{
- Writing\ $Makefile\ for\ Big::Liar\n
- Big::Liar's\ vars\n
- INST_LIB\ =\ \S+\n
- INST_ARCHLIB\ =\ \S+\n
- Writing\ $Makefile\ for\ Big::Dummy\n
-}x );
-undef $stdout;
-untie *STDOUT;
-
-isa_ok( $mm, 'ExtUtils::MakeMaker' );
-
-is( $mm->{NAME}, 'Big::Dummy', 'NAME' );
-is( $mm->{VERSION}, 0.01, 'VERSION' );
-
-my $config_prefix = $Config{installprefixexp} || $Config{installprefix} ||
- $Config{prefixexp} || $Config{prefix};
-is( $mm->{PERLPREFIX}, $config_prefix, 'PERLPREFIX' );
-
-is( !!$mm->{PERL_CORE}, !!$ENV{PERL_CORE}, 'PERL_CORE' );
-
-my($perl_src, $mm_perl_src);
-if( $ENV{PERL_CORE} ) {
- $perl_src = File::Spec->catdir($Updir, $Updir);
- $perl_src = File::Spec->canonpath($perl_src);
- $mm_perl_src = File::Spec->canonpath($mm->{PERL_SRC});
-}
-else {
- $mm_perl_src = $mm->{PERL_SRC};
-}
-
-is( $mm_perl_src, $perl_src, 'PERL_SRC' );
-
-
-# PERM_*
-is( $mm->{PERM_RW}, 644, 'PERM_RW' );
-is( $mm->{PERM_RWX}, 755, 'PERM_RWX' );
-
-
-# INST_*
-is( $mm->{INST_ARCHLIB},
- $mm->{PERL_CORE} ? $mm->{PERL_ARCHLIB}
- : File::Spec->catdir($Curdir, 'blib', 'arch'),
- 'INST_ARCHLIB');
-is( $mm->{INST_BIN}, File::Spec->catdir($Curdir, 'blib', 'bin'),
- 'INST_BIN' );
-
-is( keys %{$mm->{CHILDREN}}, 1 );
-my($child_pack) = keys %{$mm->{CHILDREN}};
-my $c_mm = $mm->{CHILDREN}{$child_pack};
-is( $c_mm->{INST_ARCHLIB},
- $c_mm->{PERL_CORE} ? $c_mm->{PERL_ARCHLIB}
- : File::Spec->catdir($Updir, 'blib', 'arch'),
- 'CHILD INST_ARCHLIB');
-is( $c_mm->{INST_BIN}, File::Spec->catdir($Updir, 'blib', 'bin'),
- 'CHILD INST_BIN' );
-
-
-my $inst_lib = File::Spec->catdir($Curdir, 'blib', 'lib');
-is( $mm->{INST_LIB},
- $mm->{PERL_CORE} ? $mm->{PERL_LIB} : $inst_lib, 'INST_LIB' );
-
-
-# INSTALL*
-is( $mm->{INSTALLDIRS}, 'site', 'INSTALLDIRS' );
-
-
-
-# Make sure the INSTALL*MAN*DIR variables work. We forgot them
-# at one point.
-$stdout = tie *STDOUT, 'TieOut' or die;
-$mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- PERL_CORE => $ENV{PERL_CORE},
- INSTALLMAN1DIR => 'none',
- INSTALLSITEMAN3DIR => 'none',
- INSTALLVENDORMAN1DIR => 'none',
- INST_MAN1DIR => 'none',
-);
-like( $stdout->read, qr{
- Writing\ $Makefile\ for\ Big::Liar\n
- Big::Liar's\ vars\n
- INST_LIB\ =\ \S+\n
- INST_ARCHLIB\ =\ \S+\n
- Writing\ $Makefile\ for\ Big::Dummy\n
-}x );
-undef $stdout;
-untie *STDOUT;
-
-isa_ok( $mm, 'ExtUtils::MakeMaker' );
-
-is ( $mm->{INSTALLMAN1DIR}, 'none' );
-is ( $mm->{INSTALLSITEMAN3DIR}, 'none' );
-is ( $mm->{INSTALLVENDORMAN1DIR}, 'none' );
-is ( $mm->{INST_MAN1DIR}, 'none' );
Deleted: vendor/perl/dist/lib/ExtUtils/t/INSTALL_BASE.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/INSTALL_BASE.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/INSTALL_BASE.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,80 +0,0 @@
-#!/usr/bin/perl -w
-
-# Tests INSTALL_BASE
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use File::Path;
-use Config;
-
-use Test::More tests => 20;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-
-my $Is_VMS = $^O eq 'VMS';
-
-my $perl = which_perl();
-
-chdir 't';
-perl_lib;
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy") || diag("chdir failed; $!");
-
-my @mpl_out = run(qq{$perl Makefile.PL "INSTALL_BASE=../dummy-install"});
-END { rmtree '../dummy-install'; }
-
-cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) ||
- diag(@mpl_out);
-
-my $makefile = makefile_name();
-ok( grep(/^Writing $makefile for Big::Dummy/,
- @mpl_out) == 1,
- 'Makefile.PL output looks right');
-
-my $make = make_run();
-run("$make"); # this is necessary due to a dmake bug.
-my $install_out = run("$make install");
-is( $?, 0, ' make install exited normally' ) || diag $install_out;
-like( $install_out, qr/^Installing /m );
-
-ok( -r '../dummy-install', ' install dir created' );
-
-my @installed_files =
- ('../dummy-install/lib/perl5/Big/Dummy.pm',
- '../dummy-install/lib/perl5/Big/Liar.pm',
- '../dummy-install/bin/program',
- "../dummy-install/lib/perl5/$Config{archname}/perllocal.pod",
- "../dummy-install/lib/perl5/$Config{archname}/auto/Big/Dummy/.packlist"
- );
-
-foreach my $file (@installed_files) {
- ok( -e $file, " $file installed" );
- ok( -r $file, " $file readable" );
-}
-
-
-# nmake outputs its damned logo
-# Send STDERR off to oblivion.
-open(SAVERR, ">&STDERR") or die $!;
-open(STDERR, ">".File::Spec->devnull) or die $!;
-
-my $realclean_out = run("$make realclean");
-is( $?, 0, 'realclean' ) || diag($realclean_out);
-
-open(STDERR, ">&SAVERR") or die $!;
-close SAVERR;
Deleted: vendor/perl/dist/lib/ExtUtils/t/INST_PREFIX.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/INST_PREFIX.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/INST_PREFIX.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,270 +0,0 @@
-#!/usr/bin/perl -w
-
-# Wherein we ensure the INST_* and INSTALL* variables are set correctly
-# when various PREFIX variables are set.
-#
-# Essentially, this test is a Makefile.PL.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 52;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-use ExtUtils::MakeMaker;
-use File::Spec;
-use TieOut;
-use ExtUtils::MakeMaker::Config;
-
-my $Is_VMS = $^O eq 'VMS';
-
-chdir 't';
-
-perl_lib;
-
-$| = 1;
-
-my $Makefile = makefile_name;
-my $Curdir = File::Spec->curdir;
-my $Updir = File::Spec->updir;
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-
-my $stdout = tie *STDOUT, 'TieOut' or die;
-
-my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- PREREQ_PM => {},
- PERL_CORE => $ENV{PERL_CORE},
-);
-
-like( $stdout->read, qr{
- Writing\ $Makefile\ for\ Big::Liar\n
- Big::Liar's\ vars\n
- INST_LIB\ =\ \S+\n
- INST_ARCHLIB\ =\ \S+\n
- Writing\ $Makefile\ for\ Big::Dummy\n
-}x );
-
-is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
-
-isa_ok( $mm, 'ExtUtils::MakeMaker' );
-
-is( $mm->{NAME}, 'Big::Dummy', 'NAME' );
-is( $mm->{VERSION}, 0.01, 'VERSION' );
-
-foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) {
- unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ );
-}
-
-
-my $PREFIX = File::Spec->catdir('foo', 'bar');
-$mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- PREREQ_PM => {},
- PERL_CORE => $ENV{PERL_CORE},
- PREFIX => $PREFIX,
-);
-like( $stdout->read, qr{
- Writing\ $Makefile\ for\ Big::Liar\n
- Big::Liar's\ vars\n
- INST_LIB\ =\ \S+\n
- INST_ARCHLIB\ =\ \S+\n
- Writing\ $Makefile\ for\ Big::Dummy\n
-}x );
-undef $stdout;
-untie *STDOUT;
-
-is( $mm->{PREFIX}, $PREFIX, 'PREFIX' );
-
-foreach my $prefix (qw(PERLPREFIX SITEPREFIX VENDORPREFIX)) {
- is( $mm->{$prefix}, '$(PREFIX)', "\$(PREFIX) overrides $prefix" );
-}
-
-is( !!$mm->{PERL_CORE}, !!$ENV{PERL_CORE}, 'PERL_CORE' );
-
-my($perl_src, $mm_perl_src);
-if( $ENV{PERL_CORE} ) {
- $perl_src = File::Spec->catdir($Updir, $Updir);
- $perl_src = File::Spec->canonpath($perl_src);
- $mm_perl_src = File::Spec->canonpath($mm->{PERL_SRC});
-}
-else {
- $mm_perl_src = $mm->{PERL_SRC};
-}
-
-is( $mm_perl_src, $perl_src, 'PERL_SRC' );
-
-
-# Every INSTALL* variable must start with some PREFIX.
-my %Install_Vars = (
- PERL => [qw(archlib privlib bin man1dir man3dir script)],
- SITE => [qw(sitearch sitelib sitebin siteman1dir siteman3dir)],
- VENDOR => [qw(vendorarch vendorlib vendorbin vendorman1dir vendorman3dir)]
-);
-
-while( my($type, $vars) = each %Install_Vars) {
- SKIP: {
- skip "VMS must expand macros in INSTALL* vars", scalar @$vars
- if $Is_VMS;
- skip '$Config{usevendorprefix} not set', scalar @$vars
- if $type eq 'VENDOR' and !$Config{usevendorprefix};
-
- foreach my $var (@$vars) {
- my $installvar = "install$var";
- my $prefix = '$('.$type.'PREFIX)';
-
- SKIP: {
- skip uc($installvar).' set to another INSTALL variable', 1
- if $mm->{uc $installvar} =~ /^\$\(INSTALL.*\)$/;
-
- # support for man page skipping
- $prefix = 'none' if $type eq 'PERL' &&
- $var =~ /man/ &&
- !$Config{$installvar};
- like( $mm->{uc $installvar}, qr/^\Q$prefix\E/,
- "$prefix + $var" );
- }
- }
- }
-}
-
-# Check that when installman*dir isn't set in Config no man pages
-# are generated.
-{
- _set_config(installman1dir => '');
- _set_config(installman3dir => '');
-
- my $wibble = File::Spec->catdir(qw(wibble and such));
- my $stdout = tie *STDOUT, 'TieOut' or die;
- my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- PREREQ_PM => {},
- PERL_CORE => $ENV{PERL_CORE},
- PREFIX => $PREFIX,
- INSTALLMAN1DIR=> $wibble,
- );
-
- is( $mm->{INSTALLMAN1DIR}, $wibble );
- is( $mm->{INSTALLMAN3DIR}, 'none' );
-}
-
-# Check that when installvendorman*dir is set in Config it is honored
-# [rt.cpan.org 2949]
-{
- _set_config(installvendorman1dir => File::Spec->catdir('foo','bar') );
- _set_config(installvendorman3dir => '' );
- _set_config(usevendorprefix => 1 );
- _set_config(vendorprefixexp => 'something' );
-
- my $stdout = tie *STDOUT, 'TieOut' or die;
- my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- PREREQ_PM => {},
- PERL_CORE => $ENV{PERL_CORE},
-
- # In case the local installation doesn't have man pages.
- INSTALLMAN1DIR=> 'foo/bar/baz',
- INSTALLMAN3DIR=> 'foo/bar/baz',
- );
-
- is( $mm->{INSTALLVENDORMAN1DIR}, File::Spec->catdir('foo','bar'),
- 'installvendorman1dir (in %Config) not modified' );
- isnt( $mm->{INSTALLVENDORMAN3DIR}, '',
- 'installvendorman3dir (not in %Config) set' );
-}
-
-# Check that when installsiteman*dir isn't set in Config it falls back
-# to installman*dir
-{
- _set_config(installman1dir => File::Spec->catdir('foo', 'bar') );
- _set_config(installman3dir => File::Spec->catdir('foo', 'baz') );
- _set_config(installsiteman1dir => '' );
- _set_config(installsiteman3dir => '' );
- _set_config(installvendorman1dir => '' );
- _set_config(installvendorman3dir => '' );
- _set_config(usevendorprefix => 'define' );
- _set_config(vendorprefixexp => 'something' );
-
- my $wibble = File::Spec->catdir(qw(wibble and such));
- my $stdout = tie *STDOUT, 'TieOut' or die;
- my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- PERL_CORE => $ENV{PERL_CORE},
- );
-
- is( $mm->{INSTALLMAN1DIR}, File::Spec->catdir('foo', 'bar') );
- is( $mm->{INSTALLMAN3DIR}, File::Spec->catdir('foo', 'baz') );
- SKIP: {
- skip "VMS must expand macros in INSTALL* vars", 4 if $Is_VMS;
-
- is( $mm->{INSTALLSITEMAN1DIR}, '$(INSTALLMAN1DIR)' );
- is( $mm->{INSTALLSITEMAN3DIR}, '$(INSTALLMAN3DIR)' );
- is( $mm->{INSTALLVENDORMAN1DIR}, '$(INSTALLMAN1DIR)' );
- is( $mm->{INSTALLVENDORMAN3DIR}, '$(INSTALLMAN3DIR)' );
- }
-}
-
-
-# Check that when usevendoprefix and installvendorman*dir aren't set in
-# Config it leaves them unset.
-{
- _set_config(installman1dir => File::Spec->catdir('foo', 'bar') );
- _set_config(installman3dir => File::Spec->catdir('foo', 'baz') );
- _set_config(installsiteman1dir => '' );
- _set_config(installsiteman3dir => '' );
- _set_config(installvendorman1dir => '' );
- _set_config(installvendorman3dir => '' );
- _set_config(usevendorprefix => '' );
- _set_config(vendorprefixexp => '' );
-
- my $wibble = File::Spec->catdir(qw(wibble and such));
- my $stdout = tie *STDOUT, 'TieOut' or die;
- my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- PERL_CORE => $ENV{PERL_CORE},
- );
-
- is( $mm->{INSTALLMAN1DIR}, File::Spec->catdir('foo', 'bar') );
- is( $mm->{INSTALLMAN3DIR}, File::Spec->catdir('foo', 'baz') );
- SKIP: {
- skip "VMS must expand macros in INSTALL* vars", 2 if $Is_VMS;
- is( $mm->{INSTALLSITEMAN1DIR}, '$(INSTALLMAN1DIR)' );
- is( $mm->{INSTALLSITEMAN3DIR}, '$(INSTALLMAN3DIR)' );
- }
- is( $mm->{INSTALLVENDORMAN1DIR}, '' );
- is( $mm->{INSTALLVENDORMAN3DIR}, '' );
-}
-
-
-sub _set_config {
- my($k,$v) = @_;
- (my $k_no_install = $k) =~ s/^install//i;
- $Config{$k} = $v;
-
- # Because VMS's config has traditionally been underpopulated, it will
- # fall back to the install-less versions in desperation.
- $Config{$k_no_install} = $v if $Is_VMS;
- return;
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/Install.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/Install.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/Install.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,194 +0,0 @@
-#!/usr/bin/perl -w
-
-# Test ExtUtils::Install.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- @INC = ('../../lib', '../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use strict;
-use TieOut;
-use File::Path;
-use File::Spec;
-
-use Test::More tests => 52;
-
-use MakeMaker::Test::Setup::BFD;
-
-BEGIN { use_ok('ExtUtils::Install') }
-# ensure the env doesnt pollute our tests
-local $ENV{EU_INSTALL_ALWAYS_COPY};
-local $ENV{EU_ALWAYS_COPY};
-
-# Check exports.
-foreach my $func (qw(install uninstall pm_to_blib install_default)) {
- can_ok(__PACKAGE__, $func);
-}
-
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-chdir 'Big-Dummy';
-
-my $stdout = tie *STDOUT, 'TieOut';
-pm_to_blib( { 'lib/Big/Dummy.pm' => 'blib/lib/Big/Dummy.pm' },
- 'blib/lib/auto'
- );
-END { rmtree 'blib' }
-
-ok( -d 'blib/lib', 'pm_to_blib created blib dir' );
-ok( -r 'blib/lib/Big/Dummy.pm', ' copied .pm file' );
-ok( -r 'blib/lib/auto', ' created autosplit dir' );
-is( $stdout->read, "cp lib/Big/Dummy.pm blib/lib/Big/Dummy.pm\n" );
-
-pm_to_blib( { 'lib/Big/Dummy.pm' => 'blib/lib/Big/Dummy.pm' },
- 'blib/lib/auto'
- );
-ok( -d 'blib/lib', 'second run, blib dir still there' );
-ok( -r 'blib/lib/Big/Dummy.pm', ' .pm file still there' );
-ok( -r 'blib/lib/auto', ' autosplit still there' );
-is( $stdout->read, "Skip blib/lib/Big/Dummy.pm (unchanged)\n" );
-
-install( { 'blib/lib' => 'install-test/lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },
- 0, 1);
-ok( ! -d 'install-test/lib/perl', 'install made dir (dry run)');
-ok( ! -r 'install-test/lib/perl/Big/Dummy.pm',
- ' .pm file installed (dry run)');
-ok( ! -r 'install-test/packlist', ' packlist exists (dry run)');
-
-install( { 'blib/lib' => 'install-test/lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- } );
-ok( -d 'install-test/lib/perl', 'install made dir' );
-ok( -r 'install-test/lib/perl/Big/Dummy.pm', ' .pm file installed' );
-ok(!-r 'install-test/lib/perl/Big/Dummy.SKIP', ' ignored .SKIP file' );
-ok( -r 'install-test/packlist', ' packlist exists' );
-
-open(PACKLIST, 'install-test/packlist' );
-my %packlist = map { chomp; ($_ => 1) } <PACKLIST>;
-close PACKLIST;
-
-# On case-insensitive filesystems (ie. VMS), the keys of the packlist might
-# be lowercase. :(
-my $native_dummy = File::Spec->catfile(qw(install-test lib perl Big Dummy.pm));
-is( keys %packlist, 1 );
-is( lc((keys %packlist)[0]), lc $native_dummy, 'packlist written' );
-
-
-# Test UNINST=1 preserving same versions in other dirs.
-install( { 'blib/lib' => 'install-test/other_lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },
- 0, 0, 1);
-ok( -d 'install-test/other_lib/perl', 'install made other dir' );
-ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
-ok( -r 'install-test/packlist', ' packlist exists' );
-ok( -r 'install-test/lib/perl/Big/Dummy.pm', ' UNINST=1 preserved same' );
-
-
-chmod 0644, 'blib/lib/Big/Dummy.pm' or die $!;
-open(DUMMY, ">>blib/lib/Big/Dummy.pm") or die $!;
-print DUMMY "Extra stuff\n";
-close DUMMY;
-
-
-# Test UNINST=0 does not remove other versions in other dirs.
-{
- ok( -r 'install-test/lib/perl/Big/Dummy.pm', 'different install exists' );
-
- local @INC = ('install-test/lib/perl');
- local $ENV{PERL5LIB} = '';
- install( { 'blib/lib' => 'install-test/other_lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },
- 0, 0, 0);
- ok( -d 'install-test/other_lib/perl', 'install made other dir' );
- ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
- ok( -r 'install-test/packlist', ' packlist exists' );
- ok( -r 'install-test/lib/perl/Big/Dummy.pm',
- ' UNINST=0 left different' );
-}
-
-# Test UNINST=1 only warning when failing to remove an irrelevent shadow file
-{
- my $tfile='install-test/lib/perl/Big/Dummy.pm';
- local $ExtUtils::Install::Testing = $tfile;
- local @INC = ('install-test/other_lib/perl','install-test/lib/perl');
- local $ENV{PERL5LIB} = '';
- ok( -r $tfile, 'different install exists' );
- my @warn;
- local $SIG{__WARN__}=sub { push @warn, @_; return };
- my $ok=eval {
- install( { 'blib/lib' => 'install-test/other_lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },
- 0, 0, 1);
- 1
- };
- ok($ok,' we didnt die');
- ok(0+ at warn," we did warn");
- ok( -d 'install-test/other_lib/perl', 'install made other dir' );
- ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
- ok( -r 'install-test/packlist', ' packlist exists' );
- ok( -r $tfile, ' UNINST=1 failed to remove different' );
-
-}
-
-# Test UNINST=1 dieing when failing to remove an relevent shadow file
-{
- my $tfile='install-test/lib/perl/Big/Dummy.pm';
- local $ExtUtils::Install::Testing = $tfile;
- local @INC = ('install-test/lib/perl','install-test/other_lib/perl');
- local $ENV{PERL5LIB} = '';
- ok( -r $tfile, 'different install exists' );
- my @warn;
- local $SIG{__WARN__}=sub { push @warn, at _; return };
- my $ok=eval {
- install( { 'blib/lib' => 'install-test/other_lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },
- 0, 0, 1);
- 1
- };
- ok(!$ok,' we did die');
- ok(!@warn," we didnt warn");
- ok( -d 'install-test/other_lib/perl', 'install made other dir' );
- ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
- ok( -r 'install-test/packlist', ' packlist exists' );
- ok( -r $tfile,' UNINST=1 failed to remove different' );
-}
-
-# Test UNINST=1 removing other versions in other dirs.
-{
- local @INC = ('install-test/lib/perl');
- local $ENV{PERL5LIB} = '';
- install( { 'blib/lib' => 'install-test/other_lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },
- 0, 0, 1);
- ok( -d 'install-test/other_lib/perl', 'install made other dir' );
- ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
- ok( -r 'install-test/packlist', ' packlist exists' );
- ok( !-r 'install-test/lib/perl/Big/Dummy.pm',
- ' UNINST=1 removed different' );
-}
-
Deleted: vendor/perl/dist/lib/ExtUtils/t/InstallWithMM.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/InstallWithMM.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/InstallWithMM.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,95 +0,0 @@
-#!/usr/bin/perl -w
-
-# Make sure EUI works with MakeMaker
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Config;
-use ExtUtils::MakeMaker;
-
-use Test::More tests => 15;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-use File::Find;
-use File::Spec;
-use File::Path;
-
-my $make = make_run();
-
-# Environment variables which interfere with our testing.
-delete @ENV{qw(PREFIX LIB MAKEFLAGS)};
-
-# Run Makefile.PL
-{
- my $perl = which_perl();
- my $Is_VMS = $^O eq 'VMS';
-
- chdir 't';
-
- perl_lib;
-
- my $Touch_Time = calibrate_mtime();
-
- $| = 1;
-
- ok( setup_recurs(), 'setup' );
- END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
- }
-
- ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-
- my @mpl_out = run(qq{$perl Makefile.PL "PREFIX=../dummy-install"});
- END { rmtree '../dummy-install'; }
-
- cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) ||
- diag(@mpl_out);
-
- END { unlink makefile_name(), makefile_backup() }
-}
-
-
-# make
-{
- my $make_out = run($make);
- is( $?, 0, 'make ran ok' ) ||
- diag($make_out);
-}
-
-
-# Test 'make install VERBINST=1'
-{
- my $make_install_verbinst = make_macro($make, 'install', VERBINST => 1);
- my $install_out = run($make_install_verbinst);
- is( $?, 0, 'install' ) || diag $install_out;
- like( $install_out, qr/^Installing /m );
- like( $install_out, qr/^Writing /m );
-
- ok( -r '../dummy-install', ' install dir created' );
- my %files = ();
- find( sub {
- # do it case-insensitive for non-case preserving OSs
- my $file = lc $_;
-
- # VMS likes to put dots on the end of things that don't have them.
- $file =~ s/\.$// if $Is_VMS;
-
- $files{$file} = $File::Find::name;
- }, '../dummy-install' );
- ok( $files{'dummy.pm'}, ' Dummy.pm installed' );
- ok( $files{'liar.pm'}, ' Liar.pm installed' );
- ok( $files{'program'}, ' program installed' );
- ok( $files{'.packlist'}, ' packlist created' );
- ok( $files{'perllocal.pod'},' perllocal.pod created' );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/Installapi2.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/Installapi2.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/Installapi2.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,238 +0,0 @@
-#!/usr/bin/perl -w
-
-# Test ExtUtils::Install.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- @INC = ('../../lib', '../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use strict;
-use TieOut;
-use File::Path;
-use File::Spec;
-
-use Test::More tests => 70;
-
-use MakeMaker::Test::Setup::BFD;
-
-BEGIN { use_ok('ExtUtils::Install') }
-
-# Check exports.
-foreach my $func (qw(install uninstall pm_to_blib install_default)) {
- can_ok(__PACKAGE__, $func);
-}
-
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-# ensure the env doesnt pollute our tests
-local $ENV{EU_INSTALL_ALWAYS_COPY};
-local $ENV{EU_ALWAYS_COPY};
-
-chdir 'Big-Dummy';
-
-my $stdout = tie *STDOUT, 'TieOut';
-pm_to_blib( { 'lib/Big/Dummy.pm' => 'blib/lib/Big/Dummy.pm' },
- 'blib/lib/auto'
- );
-END { rmtree 'blib' }
-
-ok( -d 'blib/lib', 'pm_to_blib created blib dir' );
-ok( -r 'blib/lib/Big/Dummy.pm', ' copied .pm file' );
-ok( -r 'blib/lib/auto', ' created autosplit dir' );
-is( $stdout->read, "cp lib/Big/Dummy.pm blib/lib/Big/Dummy.pm\n" );
-
-pm_to_blib( { 'lib/Big/Dummy.pm' => 'blib/lib/Big/Dummy.pm' },
- 'blib/lib/auto'
- );
-ok( -d 'blib/lib', 'second run, blib dir still there' );
-ok( -r 'blib/lib/Big/Dummy.pm', ' .pm file still there' );
-ok( -r 'blib/lib/auto', ' autosplit still there' );
-is( $stdout->read, "Skip blib/lib/Big/Dummy.pm (unchanged)\n" );
-
-install( [
- from_to=>{ 'blib/lib' => 'install-test/lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },
- dry_run=>1]);
-ok( ! -d 'install-test/lib/perl', 'install made dir (dry run)');
-ok( ! -r 'install-test/lib/perl/Big/Dummy.pm',
- ' .pm file installed (dry run)');
-ok( ! -r 'install-test/packlist', ' packlist exists (dry run)');
-
-install([ from_to=> { 'blib/lib' => 'install-test/lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- } ]);
-ok( -d 'install-test/lib/perl', 'install made dir' );
-ok( -r 'install-test/lib/perl/Big/Dummy.pm', ' .pm file installed' );
-ok(!-r 'install-test/lib/perl/Big/Dummy.SKIP', ' ignored .SKIP file' );
-ok( -r 'install-test/packlist', ' packlist exists' );
-
-open(PACKLIST, 'install-test/packlist' );
-my %packlist = map { chomp; ($_ => 1) } <PACKLIST>;
-close PACKLIST;
-
-# On case-insensitive filesystems (ie. VMS), the keys of the packlist might
-# be lowercase. :(
-my $native_dummy = File::Spec->catfile(qw(install-test lib perl Big Dummy.pm));
-is( keys %packlist, 1 );
-is( lc((keys %packlist)[0]), lc $native_dummy, 'packlist written' );
-
-
-# Test UNINST=1 preserving same versions in other dirs.
-install([from_to=> { 'blib/lib' => 'install-test/other_lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },uninstall_shadows=>1]);
-ok( -d 'install-test/other_lib/perl', 'install made other dir' );
-ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
-ok( -r 'install-test/packlist', ' packlist exists' );
-ok( -r 'install-test/lib/perl/Big/Dummy.pm', ' UNINST=1 preserved same' );
-
-
-chmod 0644, 'blib/lib/Big/Dummy.pm' or die $!;
-open(DUMMY, ">>blib/lib/Big/Dummy.pm") or die $!;
-print DUMMY "Extra stuff\n";
-close DUMMY;
-
-
-# Test UNINST=0 does not remove other versions in other dirs.
-{
- ok( -r 'install-test/lib/perl/Big/Dummy.pm', 'different install exists' );
-
- local @INC = ('install-test/lib/perl');
- local $ENV{PERL5LIB} = '';
- install([from_to=> { 'blib/lib' => 'install-test/other_lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- }]);
- ok( -d 'install-test/other_lib/perl', 'install made other dir' );
- ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
- ok( -r 'install-test/packlist', ' packlist exists' );
- ok( -r 'install-test/lib/perl/Big/Dummy.pm',
- ' UNINST=0 left different' );
-}
-
-# Test UNINST=1 only warning when failing to remove an irrelevent shadow file
-{
- my $tfile='install-test/lib/perl/Big/Dummy.pm';
- local $ExtUtils::Install::Testing = $tfile;
- local @INC = ('install-test/other_lib/perl','install-test/lib/perl');
- local $ENV{PERL5LIB} = '';
- ok( -r $tfile, 'different install exists' );
- my @warn;
- local $SIG{__WARN__}=sub { push @warn, @_; return };
- my $ok=eval {
- install([from_to=> { 'blib/lib' => 'install-test/other_lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },
- uninstall_shadows=>1]);
- 1
- };
- ok($ok,' we didnt die');
- ok(0+ at warn," we did warn");
- ok( -d 'install-test/other_lib/perl', 'install made other dir' );
- ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
- ok( -r 'install-test/packlist', ' packlist exists' );
- ok( -r $tfile, ' UNINST=1 failed to remove different' );
-
-}
-
-# Test UNINST=1 dieing when failing to remove an relevent shadow file
-{
- my $tfile='install-test/lib/perl/Big/Dummy.pm';
- local $ExtUtils::Install::Testing = $tfile;
- local @INC = ('install-test/lib/perl','install-test/other_lib/perl');
- local $ENV{PERL5LIB} = '';
- ok( -r $tfile, 'different install exists' );
- my @warn;
- local $SIG{__WARN__}=sub { push @warn, at _; return };
- my $ok=eval {
- install([from_to=> { 'blib/lib' => 'install-test/other_lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },uninstall_shadows=>1]);
- 1
- };
- ok(!$ok,' we did die');
- ok(!@warn," we didnt warn");
- ok( -d 'install-test/other_lib/perl', 'install made other dir' );
- ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
- ok( -r 'install-test/packlist', ' packlist exists' );
- ok( -r $tfile,' UNINST=1 failed to remove different' );
-}
-
-# Test UNINST=1 removing other versions in other dirs.
-{
- local @INC = ('install-test/lib/perl');
- local $ENV{PERL5LIB} = '';
- ok( -r 'install-test/lib/perl/Big/Dummy.pm','different install exists' );
- install([from_to=>{ 'blib/lib' => 'install-test/other_lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },uninstall_shadows=>1]);
- ok( -d 'install-test/other_lib/perl', 'install made other dir' );
- ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
- ok( -r 'install-test/packlist', ' packlist exists' );
- ok( !-r 'install-test/lib/perl/Big/Dummy.pm',
- ' UNINST=1 removed different' );
-}
-
-# Test EU_ALWAYS_COPY triggers copy.
-{
- local @INC = ('install-test/lib/perl');
- local $ENV{PERL5LIB} = '';
- local $ENV{EU_INSTALL_ALWAYS_COPY}=1;
- my $tfile='install-test/other_lib/perl/Big/Dummy.pm';
- my $sfile='blib/lib/Big/Dummy.pm';
- ok(-r $tfile,"install file already exists");
- ok(-r $sfile,"source file already exists");
- utime time-600, time-600, $sfile or die "utime '$sfile' failed:$!";
- ok( (stat $tfile)[9]!=(stat $sfile)[9],' Times are different');
- install([from_to=>{ 'blib/lib' => 'install-test/other_lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },result=>\my %result]);
- ok( -d 'install-test/other_lib/perl', 'install made other dir' );
- ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
- ok( -r 'install-test/packlist', ' packlist exists' );
-SKIP: {
- skip "Times not preserved during copy by default", 1 if $^O eq 'VMS';
- ok( (stat $tfile)[9]==(stat $sfile)[9],' Times are same');
-}
- ok( !$result{install_unchanged},' $result{install_unchanged} should be empty');
-}
-# Test nothing is copied.
-{
- local @INC = ('install-test/lib/perl');
- local $ENV{PERL5LIB} = '';
- local $ENV{EU_INSTALL_ALWAYS_COPY}=0;
- my $tfile='install-test/other_lib/perl/Big/Dummy.pm';
- my $sfile='blib/lib/Big/Dummy.pm';
- ok(-r $tfile,"install file already exists");
- ok(-r $sfile,"source file already exists");
- utime time-1200, time-1200, $sfile or die "utime '$sfile' failed:$!";
- ok( (stat $tfile)[9]!=(stat $sfile)[9],' Times are different');
- install([from_to=>{ 'blib/lib' => 'install-test/other_lib/perl',
- read => 'install-test/packlist',
- write => 'install-test/packlist'
- },result=>\my %result]);
- ok( -d 'install-test/other_lib/perl', 'install made other dir' );
- ok( -r 'install-test/other_lib/perl/Big/Dummy.pm', ' .pm file installed' );
- ok( -r 'install-test/packlist', ' packlist exists' );
- ok( (stat $tfile)[9]!=(stat$sfile)[9],' Times are different');
- ok( !$result{install},' nothing should have been installed');
- ok( $result{install_unchanged},' install_unchanged should be populated');
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/Installed.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/Installed.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/Installed.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,313 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib/';
- }
-}
-chdir 't';
-
-my $Is_VMS = $^O eq 'VMS';
-
-use strict;
-
-use Config;
-use Cwd;
-use File::Path;
-use File::Basename;
-use File::Spec;
-
-use Test::More tests => 63;
-
-BEGIN { use_ok( 'ExtUtils::Installed' ) }
-
-my $mandirs = !!$Config{man1direxp} + !!$Config{man3direxp};
-
-# saves having to qualify package name for class methods
-my $ei = bless( {}, 'ExtUtils::Installed' );
-
-# Make sure meta info is available
-$ei->{':private:'}{Config} = \%Config;
-$ei->{':private:'}{INC} = \@INC;
-
-# _is_prefix
-ok( $ei->_is_prefix('foo/bar', 'foo'),
- '_is_prefix() should match valid path prefix' );
-ok( !$ei->_is_prefix('\foo\bar', '\bar'),
- '... should not match wrong prefix' );
-
-# _is_type
-ok( $ei->_is_type(0, 'all'), '_is_type() should be true for type of "all"' );
-
-foreach my $path (qw( man1dir man3dir )) {
- SKIP: {
- my $dir = File::Spec->canonpath($Config{$path.'exp'});
- skip("no man directory $path on this system", 2 ) unless $dir;
-
- my $file = $dir . '/foo';
- ok( $ei->_is_type($file, 'doc'), "... should find doc file in $path" );
- ok( !$ei->_is_type($file, 'prog'), "... but not prog file in $path" );
- }
-}
-
-# VMS 5.6.1 doesn't seem to have $Config{prefixexp}
-my $prefix = $Config{prefix} || $Config{prefixexp};
-
-# You can concatenate /foo but not foo:, which defaults in the current
-# directory
-$prefix = VMS::Filespec::unixify($prefix) if $Is_VMS;
-
-# ActivePerl 5.6.1/631 has $Config{prefixexp} as 'p:' for some reason
-$prefix = $Config{prefix} if $prefix eq 'p:' && $^O eq 'MSWin32';
-
-ok( $ei->_is_type( File::Spec->catfile($prefix, 'bar'), 'prog'),
- "... should find prog file under $prefix" );
-
-SKIP: {
- skip('no man directories on this system', 1) unless $mandirs;
- is( $ei->_is_type('bar', 'doc'), 0,
- '... should not find doc file outside path' );
-}
-
-ok( !$ei->_is_type('bar', 'prog'),
- '... nor prog file outside path' );
-ok( !$ei->_is_type('whocares', 'someother'), '... nor other type anywhere' );
-
-# _is_under
-ok( $ei->_is_under('foo'), '_is_under() should return true with no dirs' );
-
-my @under = qw( boo bar baz );
-ok( !$ei->_is_under('foo', @under), '... should find no file not under dirs');
-ok( $ei->_is_under('baz', @under), '... should find file under dir' );
-
-
-rmtree 'auto/FakeMod';
-ok( mkpath('auto/FakeMod') );
-END { rmtree 'auto' }
-
-ok(open(PACKLIST, '>auto/FakeMod/.packlist'));
-print PACKLIST 'list';
-close PACKLIST;
-
-ok(open(FAKEMOD, '>auto/FakeMod/FakeMod.pm'));
-
-print FAKEMOD <<'FAKE';
-package FakeMod;
-use vars qw( $VERSION );
-$VERSION = '1.1.1';
-1;
-FAKE
-
-close FAKEMOD;
-
-my $fake_mod_dir = File::Spec->catdir(cwd(), 'auto', 'FakeMod');
-{
- # avoid warning and death by localizing glob
- local *ExtUtils::Installed::Config;
- %ExtUtils::Installed::Config = (
- %Config,
- archlibexp => cwd(),
- sitearchexp => $fake_mod_dir,
- );
-
- # necessary to fool new()
- push @INC, $fake_mod_dir;
-
- my $realei = ExtUtils::Installed->new();
- isa_ok( $realei, 'ExtUtils::Installed' );
- isa_ok( $realei->{Perl}{packlist}, 'ExtUtils::Packlist' );
- is( $realei->{Perl}{version}, $Config{version},
- 'new() should set Perl version from %Config' );
-
- ok( exists $realei->{FakeMod}, 'new() should find modules with .packlists');
- isa_ok( $realei->{FakeMod}{packlist}, 'ExtUtils::Packlist' );
- is( $realei->{FakeMod}{version}, '1.1.1',
- '... should find version in modules' );
-}
-
-# Now try this using PERL5LIB
-{
- local $ENV{PERL5LIB} = join $Config{path_sep}, $fake_mod_dir;
- local *ExtUtils::Installed::Config;
- %ExtUtils::Installed::Config = (
- %Config,
- archlibexp => cwd(),
- sitearchexp => cwd(),
- );
-
- my $realei = ExtUtils::Installed->new();
- isa_ok( $realei, 'ExtUtils::Installed' );
- isa_ok( $realei->{Perl}{packlist}, 'ExtUtils::Packlist' );
- is( $realei->{Perl}{version}, $Config{version},
- 'new() should set Perl version from %Config' );
-
- ok( exists $realei->{FakeMod},
- 'new() should find modules with .packlists using PERL5LIB'
- );
- isa_ok( $realei->{FakeMod}{packlist}, 'ExtUtils::Packlist' );
- is( $realei->{FakeMod}{version}, '1.1.1',
- '... should find version in modules' );
-}
-
-# Do the same thing as the last block, but with overrides for
-# %Config and @INC.
-{
- my $config_override = { %Config::Config };
- $config_override->{archlibexp} = cwd();
- $config_override->{sitearchexp} = $fake_mod_dir;
- $config_override->{version} = 'fake_test_version';
-
- my @inc_override = (@INC, $fake_mod_dir);
-
- my $realei = ExtUtils::Installed->new(
- 'config_override' => $config_override,
- 'inc_override' => \@inc_override,
- );
- isa_ok( $realei, 'ExtUtils::Installed' );
- isa_ok( $realei->{Perl}{packlist}, 'ExtUtils::Packlist' );
- is( $realei->{Perl}{version}, 'fake_test_version',
- 'new(config_override => HASH) overrides %Config' );
-
- ok( exists $realei->{FakeMod}, 'new() with overrides should find modules with .packlists');
- isa_ok( $realei->{FakeMod}{packlist}, 'ExtUtils::Packlist' );
- is( $realei->{FakeMod}{version}, '1.1.1',
- '... should find version in modules' );
-}
-
-# Check if extra_libs works.
-{
- my $realei = ExtUtils::Installed->new(
- 'extra_libs' => [ cwd() ],
- );
- isa_ok( $realei, 'ExtUtils::Installed' );
- isa_ok( $realei->{Perl}{packlist}, 'ExtUtils::Packlist' );
- ok( exists $realei->{FakeMod},
- 'new() with extra_libs should find modules with .packlists');
-
- #{ use Data::Dumper; local $realei->{':private:'}{Config};
- # warn Dumper($realei); }
-
- isa_ok( $realei->{FakeMod}{packlist}, 'ExtUtils::Packlist' );
- is( $realei->{FakeMod}{version}, '1.1.1',
- '... should find version in modules' );
-}
-
-# modules
-$ei->{$_} = 1 for qw( abc def ghi );
-is( join(' ', $ei->modules()), 'abc def ghi',
- 'modules() should return sorted keys' );
-
-# This didn't work for a long time due to a sort in scalar context oddity.
-is( $ei->modules, 3, 'modules() in scalar context' );
-
-# files
-$ei->{goodmod} = {
- packlist => {
- ($Config{man1direxp} ?
- (File::Spec->catdir($Config{man1direxp}, 'foo') => 1) :
- ()),
- ($Config{man3direxp} ?
- (File::Spec->catdir($Config{man3direxp}, 'bar') => 1) :
- ()),
- File::Spec->catdir($prefix, 'foobar') => 1,
- foobaz => 1,
- },
-};
-
-eval { $ei->files('badmod') };
-like( $@, qr/badmod is not installed/,'files() should croak given bad modname');
-eval { $ei->files('goodmod', 'badtype' ) };
-like( $@, qr/type must be/,'files() should croak given bad type' );
-
-my @files;
-SKIP: {
- skip('no man directory man1dir on this system', 2)
- unless $Config{man1direxp};
- @files = $ei->files('goodmod', 'doc', $Config{man1direxp});
- is( scalar @files, 1, '... should find doc file under given dir' );
- is( (grep { /foo$/ } @files), 1, '... checking file name' );
-}
-SKIP: {
- skip('no man directories on this system', 1) unless $mandirs;
- @files = $ei->files('goodmod', 'doc');
- is( scalar @files, $mandirs, '... should find all doc files with no dir' );
-}
-
- at files = $ei->files('goodmod', 'prog', 'fake', 'fake2');
-is( scalar @files, 0, '... should find no doc files given wrong dirs' );
- at files = $ei->files('goodmod', 'prog');
-is( scalar @files, 1, '... should find doc file in correct dir' );
-like( $files[0], qr/foobar[>\]]?$/, '... checking file name' );
- at files = $ei->files('goodmod');
-is( scalar @files, 2 + $mandirs, '... should find all files with no type specified' );
-my %dirnames = map { lc($_) => dirname($_) } @files;
-
-# directories
-my @dirs = $ei->directories('goodmod', 'prog', 'fake');
-is( scalar @dirs, 0, 'directories() should return no dirs if no files found' );
-
-SKIP: {
- skip('no man directories on this system', 1) unless $mandirs;
- @dirs = $ei->directories('goodmod', 'doc');
- is( scalar @dirs, $mandirs, '... should find all files files() would' );
-}
- at dirs = $ei->directories('goodmod');
-is( scalar @dirs, 2 + $mandirs, '... should find all files files() would, again' );
- at files = sort map { exists $dirnames{lc($_)} ? $dirnames{lc($_)} : '' } @files;
-is( join(' ', @files), join(' ', @dirs), '... should sort output' );
-
-# directory_tree
-my $expectdirs =
- ($mandirs == 2) &&
- (dirname($Config{man1direxp}) eq dirname($Config{man3direxp}))
- ? 3 : 2;
-
-SKIP: {
- skip('no man directories on this system', 1) unless $mandirs;
- @dirs = $ei->directory_tree('goodmod', 'doc', $Config{man1direxp} ?
- dirname($Config{man1direxp}) : dirname($Config{man3direxp}));
- is( scalar @dirs, $expectdirs,
- 'directory_tree() should report intermediate dirs to those requested' );
-}
-
-my $fakepak = Fakepak->new(102);
-
-$ei->{yesmod} = {
- version => 101,
- packlist => $fakepak,
-};
-
-# these should all croak
-foreach my $sub (qw( validate packlist version )) {
- eval { $ei->$sub('nomod') };
- like( $@, qr/nomod is not installed/,
- "$sub() should croak when asked about uninstalled module" );
-}
-
-# validate
-is( $ei->validate('yesmod'), 'validated',
- 'validate() should return results of packlist validate() call' );
-
-# packlist
-is( ${ $ei->packlist('yesmod') }, 102,
- 'packlist() should report installed mod packlist' );
-
-# version
-is( $ei->version('yesmod'), 101,
- 'version() should report installed mod version' );
-
-
-package Fakepak;
-
-sub new {
- my $class = shift;
- bless(\(my $scalar = shift), $class);
-}
-
-sub validate {
- return 'validated'
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/Liblist.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/Liblist.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/Liblist.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,36 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- unshift @INC, '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use strict;
-use Test::More tests => 6;
-
-
-BEGIN {
- use_ok( 'ExtUtils::Liblist' );
-}
-
-ok( defined &ExtUtils::Liblist::ext,
- 'ExtUtils::Liblist::ext() defined for backwards compat' );
-
-{
- my @warn;
- local $SIG{__WARN__} = sub {push @warn, [@_]};
-
- my $ll = bless {}, 'ExtUtils::Liblist';
- my @out = $ll->ext('-ln0tt43r3_perl');
- is( @out, 4, 'enough output' );
- unlike( $out[2], qr/-ln0tt43r3_perl/, 'bogus library not added' );
- ok( @warn, 'had warning');
-
- is( grep(/\QNote (probably harmless): No library found for \E(-l)?n0tt43r3_perl/, map { @$_ } @warn), 1 ) || diag join "\n", @warn;
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/MM_Any.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/MM_Any.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/MM_Any.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,33 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use Test::More tests => 7;
-BEGIN { use_ok('ExtUtils::MM') }
-
-
-### OS Flavor methods
-
-can_ok( 'MM', 'os_flavor', 'os_flavor_is' );
-
-# Can't really know what the flavors are going to be, so we just
-# make sure it returns something.
-my @flavors = MM->os_flavor;
-ok( @flavors, 'os_flavor() returned something' );
-
-ok( MM->os_flavor_is($flavors[rand @flavors]),
- 'os_flavor_is() one flavor' );
-ok( MM->os_flavor_is($flavors[rand @flavors], 'BogusOS'),
- ' many flavors' );
-ok( !MM->os_flavor_is('BogusOS'), ' wrong flavor' );
-ok( !MM->os_flavor_is(), ' no flavor' );
-
Deleted: vendor/perl/dist/lib/ExtUtils/t/MM_BeOS.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/MM_BeOS.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/MM_BeOS.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,56 +0,0 @@
-#!/usr/bin/perl
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use Test::More;
-
-BEGIN {
- if ($^O =~ /beos/i or $^O eq 'haiku') {
- plan tests => 4;
- } else {
- plan skip_all => 'This is not BeOS';
- }
-}
-
-use Config;
-use File::Spec;
-use File::Basename;
-
-# tels - Taken from MM_Win32.t - I must not understand why this works, right?
-# Does this mimic ExtUtils::MakeMaker ok?
-{
- @MM::ISA = qw(
- ExtUtils::MM_Unix
- ExtUtils::Liblist::Kid
- ExtUtils::MakeMaker
- );
- # MM package faked up by messy MI entanglement
- package MM;
- sub DESTROY {}
-}
-
-require_ok( 'ExtUtils::MM_BeOS' );
-
-my $MM = bless { NAME => "Foo" }, 'MM';
-
-# init_linker
-{
- my $libperl = File::Spec->catfile('$(PERL_INC)',
- $Config{libperl} || 'libperl.a' );
- my $export = '';
- my $after = '';
- $MM->init_linker;
-
- is( $MM->{PERL_ARCHIVE}, $libperl, 'PERL_ARCHIVE' );
- is( $MM->{PERL_ARCHIVE_AFTER}, $after, 'PERL_ARCHIVE_AFTER' );
- is( $MM->{EXPORT_LIST}, $export, 'EXPORT_LIST' );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/MM_Cygwin.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/MM_Cygwin.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/MM_Cygwin.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,136 +0,0 @@
-#!/usr/bin/perl
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use strict;
-use Test::More;
-
-BEGIN {
- if ($^O =~ /cygwin/i) {
- plan tests => 14;
- } else {
- plan skip_all => "This is not cygwin";
- }
-}
-
-use Config;
-use File::Spec;
-use ExtUtils::MM;
-use Config;
-
-use_ok( 'ExtUtils::MM_Cygwin' );
-
-# test canonpath
-my $path = File::Spec->canonpath('/a/../../c');
-is( MM->canonpath('/a/../../c'), $path,
- 'canonpath() method should work just like the one in File::Spec' );
-
-# test cflags, with the fake package below
-my $MM = bless({
- CFLAGS => 'fakeflags',
- CCFLAGS => '',
-}, 'MM');
-
-# with CFLAGS set, it should be returned
-is( $MM->cflags(), 'fakeflags',
- 'cflags() should return CFLAGS member data, if set' );
-
-delete $MM->{CFLAGS};
-
-# ExtUtils::MM_Cygwin::cflags() calls this, fake the output
-{
- local $SIG{__WARN__} = sub {
- warn @_ unless $_[0] =~ /^Subroutine .* redefined/;
- };
- *ExtUtils::MM_Unix::cflags = sub { return $_[1] };
-}
-
-# respects the config setting, should ignore whitespace around equal sign
-my $ccflags = $Config{useshrplib} eq 'true' ? ' -DUSEIMPORTLIB' : '';
-{
- local $MM->{NEEDS_LINKING} = 1;
- $MM->cflags(<<FLAGS);
-OPTIMIZE = opt
-PERLTYPE =pt
-FLAGS
-}
-
-like( $MM->{CFLAGS}, qr/OPTIMIZE = opt/, '... should set OPTIMIZE' );
-like( $MM->{CFLAGS}, qr/PERLTYPE = pt/, '... should set PERLTYPE' );
-like( $MM->{CFLAGS}, qr/CCFLAGS = $ccflags/, '... should set CCFLAGS' );
-
-# test manifypods
-$MM = bless({
- NOECHO => 'noecho',
- MAN3PODS => {},
- MAN1PODS => {},
- MAKEFILE => 'Makefile',
-}, 'MM');
-unlike( $MM->manifypods(), qr/foo/,
- 'manifypods() should return without PODS values set' );
-
-$MM->{MAN3PODS} = { foo => 'foo.1' };
-my $res = $MM->manifypods();
-like( $res, qr/pure_all.*foo.*foo.1/s, '... should add MAN3PODS targets' );
-
-
-# init_linker
-{
- my $libperl = $Config{libperl} || 'libperl.a';
- $libperl =~ s/\.a/.dll.a/ if $] >= 5.006002;
- $libperl = "\$(PERL_INC)/$libperl";
-
- my $export = '';
- my $after = '';
- $MM->init_linker;
-
- is( $MM->{PERL_ARCHIVE}, $libperl, 'PERL_ARCHIVE' );
- is( $MM->{PERL_ARCHIVE_AFTER}, $after, 'PERL_ARCHIVE_AFTER' );
- is( $MM->{EXPORT_LIST}, $export, 'EXPORT_LIST' );
-}
-
-# Tests for correct handling of maybe_command in /cygdrive/*
-# and c:/*. $ENV{COMSPEC}, if it exists, should always be executable.
-SKIP: {
- skip "Needs Cygwin::win_to_posix_path()", 2 unless defined &Cygwin::win_to_posix_path;
-
- SKIP: {
- my $comspec = $ENV{COMSPEC};
- skip(q[$ENV{COMSPEC} does not exist], 1) unless $comspec;
-
- $comspec = Cygwin::win_to_posix_path($comspec);
-
- ok(MM->maybe_command($comspec), qq{'$comspec' should be executable"});
- }
-
- # 'C:/' should *never* be executable, it's a directory.
- {
- my $cdrive = Cygwin::win_to_posix_path("C:/");
-
- ok(!MM->maybe_command($cdrive), qq{'$cdrive' should never be executable});
- }
-}
-
-# Our copy of Perl (with a unix-path) should always be executable.
-ok(MM->maybe_command($Config{perlpath}), qq{'$Config{perlpath}' should be executable});
-
-
-package FakeOut;
-
-sub TIEHANDLE {
- bless(\(my $scalar), $_[0]);
-}
-
-sub PRINT {
- my $self = shift;
- $$self .= shift;
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/MM_NW5.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/MM_NW5.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/MM_NW5.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,302 +0,0 @@
-#!/usr/bin/perl
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- unshift @INC, '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-
-use Test::More;
-
-BEGIN {
- if ($^O =~ /NetWare/i) {
- plan tests => 39;
- } else {
- plan skip_all => 'This is not NW5';
- }
-}
-
-use Config;
-use File::Spec;
-use File::Basename;
-use ExtUtils::MM;
-
-require_ok( 'ExtUtils::MM_NW5' );
-
-# Dummy MM object until we have a real MM init method.
-my $MM = bless {
- DIR => [],
- NOECHO => '@',
- XS => {},
- MAKEFILE => 'Makefile',
- RM_RF => 'rm -rf',
- MV => 'mv',
- }, 'MM';
-
-
-# replace_manpage_separator() => tr|/|.|s ?
-{
- my $man = 'a/path/to//something';
- ( my $replaced = $man ) =~ tr|/|.|s;
- is( $MM->replace_manpage_separator( $man ),
- $replaced, 'replace_manpage_separator()' );
-}
-
-# maybe_command()
-SKIP: {
- skip( '$ENV{COMSPEC} not set', 2 )
- unless $ENV{COMSPEC} =~ m!((?:[a-z]:)?[^|<>]+)!i;
- my $comspec = $1;
- is( $MM->maybe_command( $comspec ),
- $comspec, 'COMSPEC is a maybe_command()' );
- ( my $comspec2 = $comspec ) =~ s|\..{3}$||;
- like( $MM->maybe_command( $comspec2 ),
- qr/\Q$comspec/i,
- 'maybe_command() without extension' );
-}
-
-my $had_pathext = exists $ENV{PATHEXT};
-{
- local $ENV{PATHEXT} = '.exe';
- ok( ! $MM->maybe_command( 'not_a_command.com' ),
- 'not a maybe_command()' );
-}
-# Bug in Perl. local $ENV{FOO} won't delete the key afterward.
-delete $ENV{PATHEXT} unless $had_pathext;
-
-# file_name_is_absolute() [Does not support UNC-paths]
-{
- ok( $MM->file_name_is_absolute( 'SYS:/' ),
- 'file_name_is_absolute()' );
- ok( ! $MM->file_name_is_absolute( 'some/path/' ),
- 'not file_name_is_absolute()' );
-
-}
-
-# find_perl()
-# Should be able to find running perl... $^X is OK on NW5
-{
- my $my_perl = $1 if $^X =~ /(.*)/; # are we in -T or -t?
- my( $perl, $path ) = fileparse( $my_perl );
- like( $MM->find_perl( $], [ $perl ], [ $path ] ),
- qr/^\Q$my_perl\E$/i, 'find_perl() finds this perl' );
-}
-
-# catdir() (calls MM_NW5->canonpath)
-{
- my @path_eg = qw( SYS trick dir/now_OK );
-
- is( $MM->catdir( @path_eg ),
- 'SYS\\trick\\dir\\now_OK', 'catdir()' );
- is( $MM->catdir( @path_eg ),
- File::Spec->catdir( @path_eg ),
- 'catdir() eq File::Spec->catdir()' );
-
-# catfile() (calls MM_NW5->catdir)
- push @path_eg, 'file.ext';
-
- is( $MM->catfile( @path_eg ),
- 'SYS\\trick\\dir\\now_OK\\file.ext', 'catfile()' );
-
- is( $MM->catfile( @path_eg ),
- File::Spec->catfile( @path_eg ),
- 'catfile() eq File::Spec->catfile()' );
-}
-
-# init_others(): check if all keys are created and set?
-# qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP TEST_F LD AR LDLOADLIBS DEV_NUL )
-{
- my $mm_w32 = bless( {}, 'MM' );
- $mm_w32->init_others();
- my @keys = qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP
- TEST_F LD AR LDLOADLIBS DEV_NULL );
- for my $key ( @keys ) {
- ok( $mm_w32->{ $key }, "init_others: $key" );
- }
-}
-
-# constants()
-{
- my $mm_w32 = bless {
- NAME => 'TestMM_NW5',
- VERSION => '1.00',
- VERSION_FROM => 'TestMM_NW5',
- PM => { 'MM_NW5.pm' => 1 },
- }, 'MM';
-
- # XXX Hack until we have a proper init method.
- # Flesh out some necessary keys in the MM object.
- foreach my $key (qw(XS C O_FILES H HTMLLIBPODS HTMLSCRIPTPODS
- MAN1PODS MAN3PODS PARENT_NAME)) {
- $mm_w32->{$key} = '';
- }
- my $s_PM = join( " \\\n\t", sort keys %{$mm_w32->{PM}} );
- my $k_PM = join( " \\\n\t", %{$mm_w32->{PM}} );
-
- like( $mm_w32->constants(),
- qr|^NAME\ =\ TestMM_NW5\s+VERSION\ =\ 1\.00.+
- MAKEMAKER\ =\ \Q$INC{'ExtUtils/MakeMaker.pm'}\E\s+
- MM_VERSION\ =\ \Q$ExtUtils::MakeMaker::VERSION\E.+
- VERSION_FROM\ =\ TestMM_NW5.+
- TO_INST_PM\ =\ \Q$s_PM\E\s+
- PM_TO_BLIB\ =\ \Q$k_PM\E
- |xs, 'constants()' );
-
-}
-
-# path()
-my $had_path = exists $ENV{PATH};
-{
- my @path_eg = ( qw( . .. ), 'SYS:\\Program Files' );
- local $ENV{PATH} = join ';', @path_eg;
- ok( eq_array( [ $MM->path() ], [ @path_eg ] ),
- 'path() [preset]' );
-}
-# Bug in Perl. local $ENV{FOO} will not delete key afterwards.
-delete $ENV{PATH} unless $had_path;
-
-# static_lib() should look into that
-# dynamic_bs() should look into that
-# dynamic_lib() should look into that
-
-# clean()
-{
- my $clean = $Config{cc} =~ /^gcc/i ? 'dll.base dll.exp' : '*.pdb';
- like( $MM->clean(), qr/^clean ::\s+\Q-$(RM_F) $clean\E\s+$/m,
- 'clean() Makefile target' );
-}
-
-
-# init_linker
-{
- my $libperl = $Config{libperl} || 'libperl.a';
- my $export = '$(BASEEXT).def';
- my $after = '';
- $MM->init_linker;
-
- is( $MM->{PERL_ARCHIVE}, $libperl, 'PERL_ARCHIVE' );
- is( $MM->{PERL_ARCHIVE_AFTER}, $after, 'PERL_ARCHIVE_AFTER' );
- is( $MM->{EXPORT_LIST}, $export, 'EXPORT_LIST' );
-}
-
-
-# canonpath()
-{
- my $path = 'SYS:/TEMP';
- is( $MM->canonpath( $path ), File::Spec->canonpath( $path ),
- 'canonpath() eq File::Spec->canonpath' );
-}
-
-# perl_script()
-my $script_ext = '';
-my $script_name = 'mm_w32tmp';
-SKIP: {
- local *SCRIPT;
- skip( "Can't create temp file: $!", 4 )
- unless open SCRIPT, "> $script_name";
- print SCRIPT <<'EOSCRIPT';
-#! perl
-__END__
-EOSCRIPT
- skip( "Can't write to temp file: $!", 4 )
- unless close SCRIPT;
- # now start tests:
- is( $MM->perl_script( $script_name ),
- "${script_name}$script_ext", "perl_script ($script_ext)" );
-
- skip( "Can't rename temp file: $!", 3 )
- unless rename $script_name, "${script_name}.pl";
- $script_ext = '.pl';
- is( $MM->perl_script( $script_name ),
- "${script_name}$script_ext", "perl_script ($script_ext)" );
-
- skip( "Can't rename temp file: $!", 2 )
- unless rename "${script_name}$script_ext", "${script_name}.bat";
- $script_ext = '.bat';
- is( $MM->perl_script( $script_name ),
- "${script_name}$script_ext", "perl_script ($script_ext)" );
-
- skip( "Can't rename temp file: $!", 1 )
- unless rename "${script_name}$script_ext", "${script_name}.noscript";
- $script_ext = '.noscript';
-
- isnt( $MM->perl_script( $script_name ),
- "${script_name}$script_ext",
- "not a perl_script anymore ($script_ext)" );
- is( $MM->perl_script( $script_name ), undef,
- "perl_script ($script_ext) returns empty" );
-}
-unlink "${script_name}$script_ext" if -f "${script_name}$script_ext";
-
-
-# pm_to_blib()
-{
- like( $MM->pm_to_blib(),
- qr/^pm_to_blib: \Q$(TO_INST_PM)\E.+\Q$(TOUCH) \E\$@\s+$/ms,
- 'pm_to_blib' );
-}
-
-# tool_autosplit()
-{
- my %attribs = ( MAXLEN => 255 );
- like( $MM->tool_autosplit( %attribs ),
- qr/^\#\ Usage:\ \$\(AUTOSPLITFILE\)
- \ FileToSplit\ AutoDirToSplitInto.+
- AUTOSPLITFILE\ =\ \$\(PERLRUN\)\ .+
- \$AutoSplit::Maxlen=$attribs{MAXLEN};
- /xms,
- 'tool_autosplit()' );
-}
-
-
-# xs_o() should look into that
-# top_targets() should look into that
-
-# dist_ci() should look into that
-# dist_core() should look into that
-
-# pasthru()
-{
- my $pastru = "PASTHRU = " . ($Config{make} =~ /^nmake/i ? "-nologo" : "");
- is( $MM->pasthru(), $pastru, 'pasthru()' );
-}
-
-package FakeOut;
-
-sub TIEHANDLE {
- bless(\(my $scalar), $_[0]);
-}
-
-sub PRINT {
- my $self = shift;
- $$self .= shift;
-}
-
-__END__
-
-=head1 NAME
-
-MM_NW5.t - Tests for ExtUtils::MM_NW5
-
-=head1 TODO
-
- - Methods to still be checked:
- # static_lib() should look into that
- # dynamic_bs() should look into that
- # dynamic_lib() should look into that
- # xs_o() should look into that
- # top_targets() should look into that
- # dist_ci() should look into that
- # dist_core() should look into that
-
-=head1 AUTHOR
-
-20011228 Abe Timmerman <abe at ztreet.demon.nl>
-
-=cut
Deleted: vendor/perl/dist/lib/ExtUtils/t/MM_OS2.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/MM_OS2.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/MM_OS2.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,279 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use strict;
-use Test::More;
-if ($^O =~ /os2/i) {
- plan( tests => 32 );
-} else {
- plan( skip_all => "This is not OS/2" );
-}
-
-# for dlsyms, overridden in tests
-BEGIN {
- package ExtUtils::MM_OS2;
- use subs 'system', 'unlink';
-}
-
-# for maybe_command
-use File::Spec;
-
-use_ok( 'ExtUtils::MM_OS2' );
-ok( grep( 'ExtUtils::MM_OS2', @MM::ISA),
- 'ExtUtils::MM_OS2 should be parent of MM' );
-
-# dlsyms
-my $mm = bless({
- SKIPHASH => {
- dynamic => 1
- },
- NAME => 'foo:bar::',
-}, 'ExtUtils::MM_OS2');
-
-is( $mm->dlsyms(), '',
- 'dlsyms() should return nothing with dynamic flag set' );
-
-$mm->{BASEEXT} = 'baseext';
-delete $mm->{SKIPHASH};
-my $res = $mm->dlsyms();
-like( $res, qr/baseext\.def: Makefile/,
- '... without flag, should return make targets' );
-like( $res, qr/"DL_FUNCS" => { }/,
- '... should provide empty hash refs where necessary' );
-like( $res, qr/"DL_VARS" => \[]/, '... and empty array refs too' );
-
-$mm->{FUNCLIST} = 'funclist';
-$res = $mm->dlsyms( IMPORTS => 'imports' );
-like( $res, qr/"FUNCLIST" => .+funclist/,
- '... should pick up values from object' );
-like( $res, qr/"IMPORTS" => .+imports/, '... and allow parameter options too' );
-
-my $can_write;
-{
- local *OUT;
- $can_write = open(OUT, '>tmp_imp');
-}
-
-SKIP: {
- skip("Cannot write test files: $!", 7) unless $can_write;
-
- $mm->{IMPORTS} = { foo => 'bar' };
-
- local $@;
- eval { $mm->dlsyms() };
- like( $@, qr/Can.t mkdir tmp_imp/,
- '... should die if directory cannot be made' );
-
- unlink('tmp_imp') or skip("Cannot remove test file: $!", 9);
- eval { $mm->dlsyms() };
- like( $@, qr/Malformed IMPORT/, 'should die from malformed import symbols');
-
- $mm->{IMPORTS} = { foo => 'bar.baz' };
-
- my @sysfail = ( 1, 0, 1 );
- my ($sysargs, $unlinked);
-
- *ExtUtils::MM_OS2::system = sub {
- $sysargs = shift;
- return shift @sysfail;
- };
-
- *ExtUtils::MM_OS2::unlink = sub {
- $unlinked++;
- };
-
- eval { $mm->dlsyms() };
-
- like( $sysargs, qr/^emximp/, '... should try to call system() though' );
- like( $@, qr/Cannot make import library/,
- '... should die if emximp syscall fails' );
-
- # sysfail is 0 now, call emximp call should succeed
- eval { $mm->dlsyms() };
- is( $unlinked, 1, '... should attempt to unlink temp files' );
- like( $@, qr/Cannot extract import/,
- '... should die if other syscall fails' );
-
- # make both syscalls succeed
- @sysfail = (0, 0);
- local $@;
- eval { $mm->dlsyms() };
- is( $@, '', '... should not die if both syscalls succeed' );
-}
-
-# static_lib
-{
- my $called = 0;
-
- # avoid "used only once"
- local *ExtUtils::MM_Unix::static_lib;
- *ExtUtils::MM_Unix::static_lib = sub {
- $called++;
- return "\n\ncalled static_lib\n\nline2\nline3\n\nline4";
- };
-
- my $args = bless({ IMPORTS => {}, }, 'MM');
-
- # without IMPORTS as a populated hash, there will be no extra data
- my $ret = ExtUtils::MM_OS2::static_lib( $args );
- is( $called, 1, 'static_lib() should call parent method' );
- like( $ret, qr/^called static_lib/m,
- '... should return parent data unless IMPORTS exists' );
-
- $args->{IMPORTS} = { foo => 1};
- $ret = ExtUtils::MM_OS2::static_lib( $args );
- is( $called, 2, '... should call parent method if extra imports passed' );
- like( $ret, qr/^called static_lib\n\t\$\(AR\) \$\(AR_STATIC_ARGS\)/m,
- '... should append make tags to first line from parent method' );
- like( $ret, qr/\$@\n\n\nline2\nline3\n\nline4/m,
- '... should include remaining data from parent method' );
-
-}
-
-# replace_manpage_separator
-my $sep = '//a///b//c/de';
-is( ExtUtils::MM_OS2->replace_manpage_separator($sep), '.a.b.c.de',
- 'replace_manpage_separator() should turn multiple slashes into periods' );
-
-# maybe_command
-{
- local *DIR;
- my ($dir, $noext, $exe, $cmd);
- my $found = 0;
-
- my ($curdir, $updir) = (File::Spec->curdir, File::Spec->updir);
-
- # we need:
- # 1) a directory
- # 2) an executable file with no extension
- # 3) an executable file with the .exe extension
- # 4) an executable file with the .cmd extension
- # we assume there will be one somewhere in the path
- # in addition, we need them to be unique enough they do not trip
- # an earlier file test in maybe_command(). Portability.
-
- foreach my $path (split(/:/, $ENV{PATH})) {
- opendir(DIR, $path) or next;
- while (defined(my $file = readdir(DIR))) {
- next if $file eq $curdir or $file eq $updir;
- $file = File::Spec->catfile($path, $file);
- unless (defined $dir) {
- if (-d $file) {
- next if ( -x $file . '.exe' or -x $file . '.cmd' );
-
- $dir = $file;
- $found++;
- }
- }
- if (-x $file) {
- my $ext;
- if ($file =~ s/\.(exe|cmd)\z//) {
- $ext = $1;
-
- # skip executable files with names too similar
- next if -x $file;
- $file .= '.' . $ext;
-
- } else {
- unless (defined $noext) {
- $noext = $file;
- $found++;
- }
- next;
- }
-
- unless (defined $exe) {
- if ($ext eq 'exe') {
- $exe = $file;
- $found++;
- next;
- }
- }
- unless (defined $cmd) {
- if ($ext eq 'cmd') {
- $cmd = $file;
- $found++;
- next;
- }
- }
- }
- last if $found == 4;
- }
- last if $found == 4;
- }
-
- SKIP: {
- skip('No appropriate directory found', 1) unless defined $dir;
- is( ExtUtils::MM_OS2->maybe_command( $dir ), undef,
- 'maybe_command() should ignore directories' );
- }
-
- SKIP: {
- skip('No non-exension command found', 1) unless defined $noext;
- is( ExtUtils::MM_OS2->maybe_command( $noext ), $noext,
- 'maybe_command() should find executable lacking file extension' );
- }
-
- SKIP: {
- skip('No .exe command found', 1) unless defined $exe;
- (my $noexe = $exe) =~ s/\.exe\z//;
- is( ExtUtils::MM_OS2->maybe_command( $noexe ), $exe,
- 'maybe_command() should find .exe file lacking extension' );
- }
-
- SKIP: {
- skip('No .cmd command found', 1) unless defined $cmd;
- (my $nocmd = $cmd) =~ s/\.cmd\z//;
- is( ExtUtils::MM_OS2->maybe_command( $nocmd ), $cmd,
- 'maybe_command() should find .cmd file lacking extension' );
- }
-}
-
-# file_name_is_absolute
-ok( ExtUtils::MM_OS2->file_name_is_absolute( 's:/' ),
- 'file_name_is_absolute() should be true for paths with volume and slash' );
-ok( ExtUtils::MM_OS2->file_name_is_absolute( '\foo' ),
- '... and for paths with leading slash but no volume' );
-ok( ! ExtUtils::MM_OS2->file_name_is_absolute( 'arduk' ),
- '... but not for paths with no leading slash or volume' );
-
-
-$mm->init_linker;
-
-# PERL_ARCHIVE
-is( $mm->{PERL_ARCHIVE}, '$(PERL_INC)/libperl$(LIB_EXT)', 'PERL_ARCHIVE' );
-
-# PERL_ARCHIVE_AFTER
-{
- my $aout = 0;
- local *OS2::is_aout;
- *OS2::is_aout = \$aout;
-
- $mm->init_linker;
- isnt( $mm->{PERL_ARCHIVE_AFTER}, '',
- 'PERL_ARCHIVE_AFTER should be empty without $is_aout set' );
- $aout = 1;
- is( $mm->{PERL_ARCHIVE_AFTER},
- '$(PERL_INC)/libperl_override$(LIB_EXT)',
- '... and has libperl_override if it is set' );
-}
-
-# EXPORT_LIST
-is( $mm->{EXPORT_LIST}, '$(BASEEXT).def',
- 'EXPORT_LIST should add .def to BASEEXT member' );
-
-END {
- use File::Path;
- rmtree('tmp_imp');
- unlink 'tmpimp.imp';
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/MM_Unix.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/MM_Unix.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/MM_Unix.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,232 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-BEGIN {
- use Test::More;
-
- if( $^O =~ /^VMS|os2|MacOS|MSWin32|cygwin|beos|netware$/i ) {
- plan skip_all => 'Non-Unix platform';
- }
- else {
- plan tests => 110;
- }
-}
-
-BEGIN { use_ok( 'ExtUtils::MM_Unix' ); }
-
-use strict;
-use File::Spec;
-
-my $class = 'ExtUtils::MM_Unix';
-
-# only one of the following can be true
-# test should be removed if MM_Unix ever stops handling other OS than Unix
-my $os = ($ExtUtils::MM_Unix::Is{OS2} || 0)
- + ($ExtUtils::MM_Unix::Is{Win32} || 0)
- + ($ExtUtils::MM_Unix::Is{Dos} || 0)
- + ($ExtUtils::MM_Unix::Is{VMS} || 0);
-cmp_ok ( $os, '<=', 1, 'There can be only one (or none)');
-
-is($ExtUtils::MM_Unix::VERSION, $ExtUtils::MakeMaker::VERSION, 'MM_Unix has a $VERSION');
-
-# when the following calls like canonpath, catdir etc are replaced by
-# File::Spec calls, the test's become a bit pointless
-
-foreach ( qw( xx/ ./xx/ xx/././xx xx///xx) ) {
- is ($class->canonpath($_), File::Spec->canonpath($_), "canonpath $_");
-}
-
-is ($class->catdir('xx','xx'), File::Spec->catdir('xx','xx'),
- 'catdir(xx, xx) => xx/xx');
-is ($class->catfile('xx','xx','yy'), File::Spec->catfile('xx','xx','yy'),
- 'catfile(xx, xx) => xx/xx');
-
-is ($class->file_name_is_absolute('Bombdadil'),
- File::Spec->file_name_is_absolute('Bombdadil'),
- 'file_name_is_absolute()');
-
-is ($class->path(), File::Spec->path(), 'path() same as File::Spec->path()');
-
-foreach (qw/updir curdir rootdir/)
- {
- is ($class->$_(), File::Spec->$_(), $_ );
- }
-
-foreach ( qw /
- c_o
- clean
- const_cccmd
- const_config
- const_loadlibs
- constants
- depend
- dist
- dist_basics
- dist_ci
- dist_core
- distdir
- dist_test
- dlsyms
- dynamic
- dynamic_bs
- dynamic_lib
- exescan
- extliblist
- find_perl
- fixin
- force
- guess_name
- init_dirscan
- init_main
- init_others
- install
- installbin
- linkext
- lsdir
- macro
- makeaperl
- makefile
- manifypods
- needs_linking
- pasthru
- perldepend
- pm_to_blib
- ppd
- prefixify
- processPL
- quote_paren
- realclean
- static
- static_lib
- staticmake
- subdir_x
- subdirs
- test
- test_via_harness
- test_via_script
- tool_autosplit
- tool_xsubpp
- tools_other
- top_targets
- writedoc
- xs_c
- xs_cpp
- xs_o
- / )
- {
- can_ok($class, $_);
- }
-
-###############################################################################
-# some more detailed tests for the methods above
-
-ok ( join (' ', $class->dist_basics()), 'distclean :: realclean distcheck');
-
-###############################################################################
-# has_link_code tests
-
-my $t = bless { NAME => "Foo" }, $class;
-$t->{HAS_LINK_CODE} = 1;
-is ($t->has_link_code(),1,'has_link_code'); is ($t->{HAS_LINK_CODE},1);
-
-$t->{HAS_LINK_CODE} = 0;
-is ($t->has_link_code(),0); is ($t->{HAS_LINK_CODE},0);
-
-delete $t->{HAS_LINK_CODE}; delete $t->{OBJECT};
-is ($t->has_link_code(),0); is ($t->{HAS_LINK_CODE},0);
-
-delete $t->{HAS_LINK_CODE}; $t->{OBJECT} = 1;
-is ($t->has_link_code(),1); is ($t->{HAS_LINK_CODE},1);
-
-delete $t->{HAS_LINK_CODE}; delete $t->{OBJECT}; $t->{MYEXTLIB} = 1;
-is ($t->has_link_code(),1); is ($t->{HAS_LINK_CODE},1);
-
-delete $t->{HAS_LINK_CODE}; delete $t->{MYEXTLIB}; $t->{C} = [ 'Gloin' ];
-is ($t->has_link_code(),1); is ($t->{HAS_LINK_CODE},1);
-
-###############################################################################
-# libscan
-
-is ($t->libscan('foo/RCS/bar'), '', 'libscan on RCS');
-is ($t->libscan('CVS/bar/car'), '', 'libscan on CVS');
-is ($t->libscan('SCCS'), '', 'libscan on SCCS');
-is ($t->libscan('.svn/something'), '', 'libscan on Subversion');
-is ($t->libscan('foo/b~r'), 'foo/b~r', 'libscan on file with ~');
-is ($t->libscan('foo/RCS.pm'), 'foo/RCS.pm', 'libscan on file with RCS');
-
-is ($t->libscan('Fatty'), 'Fatty', 'libscan on something not a VC file' );
-
-###############################################################################
-# maybe_command
-
-open(FILE, ">command"); print FILE "foo"; close FILE;
-SKIP: {
- skip("no separate execute mode on VOS", 2) if $^O eq "vos";
-
- ok !$t->maybe_command('command') ,"non executable file isn't a command";
-
- chmod 0755, "command";
- ok ($t->maybe_command('command'), "executable file is a command");
-}
-unlink "command";
-
-
-###############################################################################
-# perl_script (on unix any ordinary, readable file)
-
-my $self_name = $ENV{PERL_CORE} ? '../lib/ExtUtils/t/MM_Unix.t'
- : 'MM_Unix.t';
-is ($t->perl_script($self_name),$self_name, 'we pass as a perl_script()');
-
-###############################################################################
-# PERM_RW and PERM_RWX
-
-$t->init_PERM;
-is ($t->{PERM_RW},'644', 'PERM_RW is 644');
-is ($t->{PERM_RWX},'755', 'PERM_RWX is 755');
-is ($t->{PERM_DIR},'755', 'PERM_DIR is 755');
-
-
-###############################################################################
-# post_constants, postamble, post_initialize
-
-foreach (qw/ post_constants postamble post_initialize/) {
- is ($t->$_(),'', "$_() is an empty string");
-}
-
-###############################################################################
-# replace_manpage_separator
-
-is ($t->replace_manpage_separator('Foo/Bar'),'Foo::Bar','manpage_separator');
-
-###############################################################################
-
-$t->init_linker;
-foreach (qw/ EXPORT_LIST PERL_ARCHIVE PERL_ARCHIVE_AFTER /)
-{
- ok( exists $t->{$_}, "$_ was defined" );
- is( $t->{$_}, '', "$_ is empty on Unix");
-}
-
-
-{
- $t->{CCFLAGS} = '-DMY_THING';
- $t->{LIBPERL_A} = 'libperl.a';
- $t->{LIB_EXT} = '.a';
- local $t->{NEEDS_LINKING} = 1;
- $t->cflags();
-
- # Brief bug where CCFLAGS was being blown away
- is( $t->{CCFLAGS}, '-DMY_THING', 'cflags retains CCFLAGS' );
-}
-
Deleted: vendor/perl/dist/lib/ExtUtils/t/MM_VMS.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/MM_VMS.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/MM_VMS.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,76 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-BEGIN {
- @Methods = (qw(wraplist
- rootdir
- ext
- guess_name
- find_perl
- path
- maybe_command
- perl_script
- file_name_is_absolute
- replace_manpage_separator
- init_others
- constants
- cflags
- const_cccmd
- pm_to_blib
- tool_autosplit
- tool_xsubpp
- tools_other
- dist
- c_o
- xs_c
- xs_o
- top_targets
- dlsyms
- dynamic_lib
- dynamic_bs
- static_lib
- manifypods
- processPL
- installbin
- subdir_x
- clean
- realclean
- dist_basics
- dist_core
- distdir
- dist_test
- install
- perldepend
- makefile
- test
- test_via_harness
- test_via_script
- makeaperl
- ));
-}
-
-BEGIN {
- use Test::More;
- if ($^O eq 'VMS') {
- plan( tests => @Methods + 1 );
- }
- else {
- plan( skip_all => "This is not VMS" );
- }
-}
-
-use_ok( 'ExtUtils::MM_VMS' );
-
-foreach my $meth (@Methods) {
- can_ok( 'ExtUtils::MM_VMS', $meth);
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/MM_Win32.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/MM_Win32.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/MM_Win32.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,313 +0,0 @@
-#!/usr/bin/perl
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use strict;
-use Test::More;
-
-BEGIN {
- if ($^O =~ /MSWin32/i) {
- plan tests => 49;
- } else {
- plan skip_all => 'This is not Win32';
- }
-}
-
-use Config;
-use File::Spec;
-use File::Basename;
-use ExtUtils::MM;
-
-require_ok( 'ExtUtils::MM_Win32' );
-
-# Dummy MM object until we have a real MM init method.
-my $MM = bless {
- DIR => [],
- NOECHO => '@',
- XS => {},
- MAKEFILE => 'Makefile',
- RM_RF => 'rm -rf',
- MV => 'mv',
- MAKE => $Config{make}
- }, 'MM';
-
-
-# replace_manpage_separator() => tr|/|.|s ?
-{
- my $man = 'a/path/to//something';
- ( my $replaced = $man ) =~ tr|/|.|s;
- is( $MM->replace_manpage_separator( $man ),
- $replaced, 'replace_manpage_separator()' );
-}
-
-# maybe_command()
-SKIP: {
- skip( '$ENV{COMSPEC} not set', 2 )
- unless $ENV{COMSPEC} =~ m!((?:[a-z]:)?[^|<>]+)!i;
- my $comspec = $1;
- is( $MM->maybe_command( $comspec ),
- $comspec, 'COMSPEC is a maybe_command()' );
- ( my $comspec2 = $comspec ) =~ s|\..{3}$||;
- like( $MM->maybe_command( $comspec2 ),
- qr/\Q$comspec/i,
- 'maybe_command() without extension' );
-}
-
-my $had_pathext = exists $ENV{PATHEXT};
-{
- local $ENV{PATHEXT} = '.exe';
- ok( ! $MM->maybe_command( 'not_a_command.com' ),
- 'not a maybe_command()' );
-}
-# Bug in Perl. local $ENV{FOO} won't delete the key afterward.
-delete $ENV{PATHEXT} unless $had_pathext;
-
-# file_name_is_absolute() [Does not support UNC-paths]
-{
- ok( $MM->file_name_is_absolute( 'C:/' ),
- 'file_name_is_absolute()' );
- ok( ! $MM->file_name_is_absolute( 'some/path/' ),
- 'not file_name_is_absolute()' );
-
-}
-
-# find_perl()
-# Should be able to find running perl... $^X is OK on Win32
-{
- my $my_perl = $1 if $^X =~ /(.*)/; # are we in -T or -t?
- my( $perl, $path ) = fileparse( $my_perl );
- like( $MM->find_perl( $], [ $perl ], [ $path ], 0 ),
- qr/^\Q$my_perl\E$/i, 'find_perl() finds this perl' );
-}
-
-# catdir() (calls MM_Win32->canonpath)
-{
- my @path_eg = qw( c: trick dir/now_OK );
-
- is( $MM->catdir( @path_eg ),
- 'C:\\trick\\dir\\now_OK', 'catdir()' );
- is( $MM->catdir( @path_eg ),
- File::Spec->catdir( @path_eg ),
- 'catdir() eq File::Spec->catdir()' );
-
-# catfile() (calls MM_Win32->catdir)
- push @path_eg, 'file.ext';
-
- is( $MM->catfile( @path_eg ),
- 'C:\\trick\\dir\\now_OK\\file.ext', 'catfile()' );
-
- is( $MM->catfile( @path_eg ),
- File::Spec->catfile( @path_eg ),
- 'catfile() eq File::Spec->catfile()' );
-}
-
-# init_others(): check if all keys are created and set?
-# qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP TEST_F LD AR LDLOADLIBS DEV_NUL )
-{
- my $mm_w32 = bless( { BASEEXT => 'Foo' }, 'MM' );
- $mm_w32->init_others();
- my @keys = qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP
- TEST_F LD AR LDLOADLIBS DEV_NULL );
- for my $key ( @keys ) {
- ok( $mm_w32->{ $key }, "init_others: $key" );
- }
-}
-
-# constants()
-# XXX this test is probably useless now that we can call individual
-# init_* methods and check the keys in $mm_w32 directly
-{
- my $mm_w32 = bless {
- NAME => 'TestMM_Win32',
- VERSION => '1.00',
- PM => { 'MM_Win32.pm' => 1 },
- }, 'MM';
-
- # XXX Hack until we have a proper init method.
- # Flesh out some necessary keys in the MM object.
- @{$mm_w32}{qw(XS MAN1PODS MAN3PODS)} = ({}) x 3;
- @{$mm_w32}{qw(C O_FILES H)} = ([]) x 3;
- @{$mm_w32}{qw(PARENT_NAME)} = ('') x 3;
- $mm_w32->{FULLEXT} = 'TestMM_Win32';
- $mm_w32->{BASEEXT} = 'TestMM_Win32';
-
- $mm_w32->init_VERSION;
- $mm_w32->init_linker;
- $mm_w32->init_INST;
- $mm_w32->init_xs;
-
- my $s_PM = join( " \\\n\t", sort keys %{$mm_w32->{PM}} );
- my $k_PM = join( " \\\n\t", %{$mm_w32->{PM}} );
-
- my $constants = $mm_w32->constants;
-
- foreach my $regex (
- qr|^NAME \s* = \s* TestMM_Win32 \s* $|xms,
- qr|^VERSION \s* = \s* 1\.00 \s* $|xms,
- qr|^MAKEMAKER \s* = \s* \Q$INC{'ExtUtils/MakeMaker.pm'}\E \s* $|xms,
- qr|^MM_VERSION \s* = \s* \Q$ExtUtils::MakeMaker::VERSION\E \s* $|xms,
- qr|^TO_INST_PM \s* = \s* \Q$s_PM\E \s* $|xms,
- qr|^PM_TO_BLIB \s* = \s* \Q$k_PM\E \s* $|xms,
- )
- {
- like( $constants, $regex, 'constants() check' );
- }
-}
-
-# path()
-{
- ok( eq_array( [ $MM->path() ], [ File::Spec->path ] ),
- 'path() [preset]' );
-}
-
-# static_lib() should look into that
-# dynamic_bs() should look into that
-# dynamic_lib() should look into that
-
-# init_linker
-{
- my $libperl = File::Spec->catfile('$(PERL_INC)',
- $Config{libperl} || 'libperl.a');
- my $export = '$(BASEEXT).def';
- my $after = '';
- $MM->init_linker;
-
- is( $MM->{PERL_ARCHIVE}, $libperl, 'PERL_ARCHIVE' );
- is( $MM->{PERL_ARCHIVE_AFTER}, $after, 'PERL_ARCHIVE_AFTER' );
- is( $MM->{EXPORT_LIST}, $export, 'EXPORT_LIST' );
-}
-
-# canonpath()
-{
- my $path = 'c:\\Program Files/SomeApp\\Progje.exe';
- is( $MM->canonpath( $path ), File::Spec->canonpath( $path ),
- 'canonpath() eq File::Spec->canonpath' );
-}
-
-# perl_script()
-my $script_ext = '';
-my $script_name = 'mm_w32tmp';
-SKIP: {
- local *SCRIPT;
- skip( "Can't create temp file: $!", 4 )
- unless open SCRIPT, "> $script_name";
- print SCRIPT <<'EOSCRIPT';
-#! perl
-__END__
-EOSCRIPT
- skip( "Can't write to temp file: $!", 4 )
- unless close SCRIPT;
- # now start tests:
- is( $MM->perl_script( $script_name ),
- "${script_name}$script_ext", "perl_script ($script_ext)" );
-
- skip( "Can't rename temp file: $!", 3 )
- unless rename $script_name, "${script_name}.pl";
- $script_ext = '.pl';
- is( $MM->perl_script( $script_name ),
- "${script_name}$script_ext", "perl_script ($script_ext)" );
-
- skip( "Can't rename temp file: $!", 2 )
- unless rename "${script_name}$script_ext", "${script_name}.bat";
- $script_ext = '.bat';
- is( $MM->perl_script( $script_name ),
- "${script_name}$script_ext", "perl_script ($script_ext)" );
-
- skip( "Can't rename temp file: $!", 1 )
- unless rename "${script_name}$script_ext", "${script_name}.noscript";
- $script_ext = '.noscript';
-
- isnt( $MM->perl_script( $script_name ),
- "${script_name}$script_ext",
- "not a perl_script anymore ($script_ext)" );
- is( $MM->perl_script( $script_name ), undef,
- "perl_script ($script_ext) returns empty" );
-}
-unlink "${script_name}$script_ext" if -f "${script_name}$script_ext";
-
-# is_make_type()
-{
- # Check for literal nmake
- SKIP: {
- skip("Not using 'nmake'", 2) unless $Config{make} eq 'nmake';
- ok( $MM->is_make_type('nmake'), '->is_make_type(nmake) true' );
- ok( ! $MM->is_make_type('dmake'), '->is_make_type(dmake) false' );
- }
-
- # Check for literal nmake
- SKIP: {
- skip("Not using /nmake/", 2) unless $Config{make} =~ /nmake/;
- ok( $MM->is_make_type('nmake'), '->is_make_type(nmake) true' );
- ok( ! $MM->is_make_type('dmake'), '->is_make_type(dmake) false' );
- }
-
- # Check for literal dmake
- SKIP: {
- skip("Not using 'dmake'", 2) unless $Config{make} eq 'dmake';
- ok( $MM->is_make_type('dmake'), '->is_make_type(dmake) true' );
- ok( ! $MM->is_make_type('nmake'), '->is_make_type(nmake) false' );
- }
-
- # Check for literal dmake
- SKIP: {
- skip("Not using /dmake/", 2) unless $Config{make} =~ /dmake/;
- ok( $MM->is_make_type('dmake'), '->is_make_type(dmake) true' );
- ok( ! $MM->is_make_type('nmake'), '->is_make_type(nmake) false' );
- }
-
-}
-
-# xs_o() should look into that
-# top_targets() should look into that
-
-# dist_ci() should look into that
-# dist_core() should look into that
-
-# pasthru()
-{
- my $pastru = "PASTHRU = " . ($Config{make} =~ /^nmake/i ? "-nologo" : "");
- is( $MM->pasthru(), $pastru, 'pasthru()' );
-}
-
-package FakeOut;
-
-sub TIEHANDLE {
- bless(\(my $scalar), $_[0]);
-}
-
-sub PRINT {
- my $self = shift;
- $$self .= shift;
-}
-
-__END__
-
-=head1 NAME
-
-MM_Win32.t - Tests for ExtUtils::MM_Win32
-
-=head1 TODO
-
- - Methods to still be checked:
- # static_lib() should look into that
- # dynamic_bs() should look into that
- # dynamic_lib() should look into that
- # xs_o() should look into that
- # top_targets() should look into that
- # dist_ci() should look into that
- # dist_core() should look into that
-
-=head1 AUTHOR
-
-20011228 Abe Timmerman <abe at ztreet.demon.nl>
-
-=cut
Deleted: vendor/perl/dist/lib/ExtUtils/t/MakeMaker_Parameters.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/MakeMaker_Parameters.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/MakeMaker_Parameters.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,74 +0,0 @@
-#!/usr/bin/perl -w
-
-# Things like the CPAN shell rely on the "MakeMaker Parameters" section of the
-# Makefile to learn a module's dependencies so we'd damn well better test it.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use warnings;
-
-use ExtUtils::MakeMaker;
-use Test::More;
-
-my $mm = bless {}, "MM";
-
-sub extract_params {
- my $text = join "\n", @_;
-
- $text =~ s{^\s* \# \s+ MakeMaker\ Parameters: \s*\n}{}x;
- $text =~ s{^#}{}gms;
- $text =~ s{\n}{,\n}g;
-
- no strict 'subs';
- return { eval "$text" };
-}
-
-sub test_round_trip {
- my $args = shift;
- my $want = @_ ? shift : $args;
-
- my $have = extract_params($mm->_MakeMaker_Parameters_section($args));
-
- local $Test::Builder::Level = $Test::Builder::Level + 1;
- is_deeply $have, $want or diag explain $have, "\n", $want;
-}
-
-is join("", $mm->_MakeMaker_Parameters_section()), <<'EXPECT', "nothing";
-# MakeMaker Parameters:
-EXPECT
-
-test_round_trip({ NAME => "Foo" });
-test_round_trip({ NAME => "Foo", PREREQ_PM => { "Foo::Bar" => 0 } });
-test_round_trip({ NAME => "Foo", PREREQ_PM => { "Foo::Bar" => 1.23 } });
-
-# Test the special case for BUILD_REQUIRES
-{
- my $have = {
- NAME => "Foo",
- PREREQ_PM => { "Foo::Bar" => 1.23 },
- BUILD_REQUIRES => { "Baz" => 0.12 },
- };
-
- my $want = {
- NAME => "Foo",
- PREREQ_PM => {
- "Foo::Bar" => 1.23,
- "Baz" => 0.12,
- },
- BUILD_REQUIRES => { "Baz" => 0.12 },
- };
-
- test_round_trip( $have, $want );
-}
-
-done_testing();
-
Deleted: vendor/perl/dist/lib/ExtUtils/t/Manifest.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/Manifest.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/Manifest.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,417 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- unshift @INC, '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use strict;
-
-use Test::More tests => 94;
-use Cwd;
-
-use File::Spec;
-use File::Path;
-use File::Find;
-use Config;
-
-my $Is_VMS = $^O eq 'VMS';
-my $Is_VMS_noefs = $Is_VMS;
-if ($Is_VMS) {
- my $vms_efs = 0;
- if (eval 'require VMS::Feature') {
- $vms_efs = VMS::Feature::current("efs_charset");
- } else {
- my $efs_charset = $ENV{'DECC$EFS_CHARSET'} || '';
- $vms_efs = $efs_charset =~ /^[ET1]/i;
- }
- $Is_VMS_noefs = 0 if $vms_efs;
-}
-
-
-# We're going to be chdir'ing and modules are sometimes loaded on the
-# fly in this test, so we need an absolute @INC.
- at INC = map { File::Spec->rel2abs($_) } @INC;
-
-# keep track of everything added so it can all be deleted
-my %Files;
-sub add_file {
- my ($file, $data) = @_;
- $data ||= 'foo';
- 1 while unlink $file; # or else we'll get multiple versions on VMS
- open( T, '> '.$file) or return;
- print T $data;
- close T;
- return 0 unless -e $file; # exists under the name we gave it ?
- ++$Files{$file};
-}
-
-sub read_manifest {
- open( M, 'MANIFEST' ) or return;
- chomp( my @files = <M> );
- close M;
- return @files;
-}
-
-sub catch_warning {
- my $warn = '';
- local $SIG{__WARN__} = sub { $warn .= $_[0] };
- return join('', $_[0]->() ), $warn;
-}
-
-sub remove_dir {
- ok( rmdir( $_ ), "remove $_ directory" ) for @_;
-}
-
-# use module, import functions
-BEGIN {
- use_ok( 'ExtUtils::Manifest',
- qw( mkmanifest manicheck filecheck fullcheck
- maniread manicopy skipcheck maniadd maniskip) );
-}
-
-my $cwd = Cwd::getcwd();
-
-# Just in case any old files were lying around.
-rmtree('mantest');
-
-ok( mkdir( 'mantest', 0777 ), 'make mantest directory' );
-ok( chdir( 'mantest' ), 'chdir() to mantest' );
-ok( add_file('foo'), 'add a temporary file' );
-
-# This ensures the -x check for manicopy means something
-# Some platforms don't have chmod or an executable bit, in which case
-# this call will do nothing or fail, but on the platforms where chmod()
-# works, we test the executable bit is copied
-chmod( 0744, 'foo') if $Config{'chmod'};
-
-# there shouldn't be a MANIFEST there
-my ($res, $warn) = catch_warning( \&mkmanifest );
-# Canonize the order.
-$warn = join("", map { "$_|" }
- sort { lc($a) cmp lc($b) } split /\r?\n/, $warn);
-is( $warn, "Added to MANIFEST: foo|Added to MANIFEST: MANIFEST|",
- "mkmanifest() displayed its additions" );
-
-# and now you see it
-ok( -e 'MANIFEST', 'create MANIFEST file' );
-
-my @list = read_manifest();
-is( @list, 2, 'check files in MANIFEST' );
-ok( ! ExtUtils::Manifest::filecheck(), 'no additional files in directory' );
-
-# after adding bar, the MANIFEST is out of date
-ok( add_file( 'bar' ), 'add another file' );
-ok( ! manicheck(), 'MANIFEST now out of sync' );
-
-# it reports that bar has been added and throws a warning
-($res, $warn) = catch_warning( \&filecheck );
-
-like( $warn, qr/^Not in MANIFEST: bar/, 'warning that bar has been added' );
-is( $res, 'bar', 'bar reported as new' );
-
-# now quiet the warning that bar was added and test again
-($res, $warn) = do { local $ExtUtils::Manifest::Quiet = 1;
- catch_warning( \&skipcheck )
- };
-is( $warn, '', 'disabled warnings' );
-
-# add a skip file with a rule to skip itself (and the nonexistent glob '*baz*')
-add_file( 'MANIFEST.SKIP', "baz\n.SKIP" );
-
-# this'll skip the new file
-($res, $warn) = catch_warning( \&skipcheck );
-like( $warn, qr/^Skipping MANIFEST\.SKIP/i, 'got skipping warning' );
-
-my @skipped;
-catch_warning( sub {
- @skipped = skipcheck()
-});
-
-is( join( ' ', @skipped ), 'MANIFEST.SKIP', 'listed skipped files' );
-
-{
- local $ExtUtils::Manifest::Quiet = 1;
- is( join(' ', filecheck() ), 'bar', 'listing skipped with filecheck()' );
-}
-
-# add a subdirectory and a file there that should be found
-ok( mkdir( 'moretest', 0777 ), 'created moretest directory' );
-add_file( File::Spec->catfile('moretest', 'quux'), 'quux' );
-ok( exists( ExtUtils::Manifest::manifind()->{'moretest/quux'} ),
- "manifind found moretest/quux" );
-
-# only MANIFEST and foo are in the manifest
-$_ = 'foo';
-my $files = maniread();
-is( keys %$files, 2, 'two files found' );
-is( join(' ', sort { lc($a) cmp lc($b) } keys %$files), 'foo MANIFEST',
- 'both files found' );
-is( $_, 'foo', q{maniread() doesn't clobber $_} );
-
-ok( mkdir( 'copy', 0777 ), 'made copy directory' );
-
-# Check that manicopy copies files.
-manicopy( $files, 'copy', 'cp' );
-my @copies = ();
-find( sub { push @copies, $_ if -f }, 'copy' );
- at copies = map { s/\.$//; $_ } @copies if $Is_VMS; # VMS likes to put dots on
- # the end of files.
-# Have to compare insensitively for non-case preserving VMS
-is_deeply( [sort map { lc } @copies], [sort map { lc } keys %$files] );
-
-# cp would leave files readonly, so check permissions.
-foreach my $orig (@copies) {
- my $copy = "copy/$orig";
- ok( -r $copy, "$copy: must be readable" );
- is( -w $copy, -w $orig, " writable if original was" );
- is( -x $copy, -x $orig, " executable if original was" );
-}
-rmtree('copy');
-
-
-# poison the manifest, and add a comment that should be reported
-add_file( 'MANIFEST', 'none #none' );
-is( ExtUtils::Manifest::maniread()->{none}, '#none',
- 'maniread found comment' );
-
-ok( mkdir( 'copy', 0777 ), 'made copy directory' );
-$files = maniread();
-eval { (undef, $warn) = catch_warning( sub {
- manicopy( $files, 'copy', 'cp' ) })
-};
-
-# a newline comes through, so get rid of it
-chomp($warn);
-# the copy should have given a warning
-like($warn, qr/^none not found/, 'carped about none' );
-($res, $warn) = catch_warning( \&skipcheck );
-like($warn, qr/^Skipping MANIFEST.SKIP/i, 'warned about MANIFEST.SKIP' );
-
-# tell ExtUtils::Manifest to use a different file
-{
- local $ExtUtils::Manifest::MANIFEST = 'albatross';
- ($res, $warn) = catch_warning( \&mkmanifest );
- like( $warn, qr/Added to albatross: /, 'using a new manifest file' );
-
- # add the new file to the list of files to be deleted
- $Files{'albatross'}++;
-}
-
-
-# Make sure MANIFEST.SKIP is using complete relative paths
-add_file( 'MANIFEST.SKIP' => "^moretest/q\n" );
-
-# This'll skip moretest/quux
-($res, $warn) = catch_warning( \&skipcheck );
-like( $warn, qr{^Skipping moretest/quux$}i, 'got skipping warning again' );
-
-
-# There was a bug where entries in MANIFEST would be blotted out
-# by MANIFEST.SKIP rules.
-add_file( 'MANIFEST.SKIP' => 'foo' );
-add_file( 'MANIFEST' => "foobar\n" );
-add_file( 'foobar' => '123' );
-($res, $warn) = catch_warning( \&manicheck );
-is( $res, '', 'MANIFEST overrides MANIFEST.SKIP' );
-is( $warn, '', 'MANIFEST overrides MANIFEST.SKIP, no warnings' );
-
-$files = maniread;
-ok( !$files->{wibble}, 'MANIFEST in good state' );
-maniadd({ wibble => undef });
-maniadd({ yarrow => "hock" });
-$files = maniread;
-is( $files->{wibble}, '', 'maniadd() with undef comment' );
-is( $files->{yarrow}, 'hock',' with comment' );
-is( $files->{foobar}, '', ' preserved old entries' );
-
-my %funky_files;
-# test including a filename with a space
-SKIP: {
- add_file( 'foo bar' => "space" )
- or skip "couldn't create spaced test file", 2;
- local $ExtUtils::Manifest::MANIFEST = "albatross";
- maniadd({ 'foo bar' => "contains space"});
- is( maniread()->{'foo bar'}, "contains space",
- 'spaced manifest filename' );
- add_file( 'albatross.bak', '' );
- ($res, $warn) = catch_warning( \&mkmanifest );
- like( $warn, qr/\A(Added to.*\n)+\z/m,
- 'no warnings about funky filename' );
- $funky_files{'space'} = 'foo bar';
-}
-
-# test including a filename with a space and a quote
-SKIP: {
- add_file( 'foo\' baz\'quux' => "quote" )
- or skip "couldn't create quoted test file", 1;
- local $ExtUtils::Manifest::MANIFEST = "albatross";
- maniadd({ 'foo\' baz\'quux' => "contains quote"});
- is( maniread()->{'foo\' baz\'quux'}, "contains quote",
- 'quoted manifest filename' );
- $funky_files{'space_quote'} = 'foo\' baz\'quux';
-}
-
-# test including a filename with a space and a backslash
-SKIP: {
- add_file( 'foo bar\\baz' => "backslash" )
- or skip "couldn't create backslash test file", 1;
- local $ExtUtils::Manifest::MANIFEST = "albatross";
- maniadd({ 'foo bar\\baz' => "contains backslash"});
- is( maniread()->{'foo bar\\baz'}, "contains backslash",
- 'backslashed manifest filename' );
- $funky_files{'space_backslash'} = 'foo bar\\baz';
-}
-
-# test including a filename with a space, quote, and a backslash
-SKIP: {
- add_file( 'foo bar\\baz\'quux' => "backslash/quote" )
- or skip "couldn't create backslash/quote test file", 1;
- local $ExtUtils::Manifest::MANIFEST = "albatross";
- maniadd({ 'foo bar\\baz\'quux' => "backslash and quote"});
- is( maniread()->{'foo bar\\baz\'quux'}, "backslash and quote",
- 'backslashed and quoted manifest filename' );
- $funky_files{'space_quote_backslash'} = 'foo bar\\baz\'quux';
-}
-
-my @funky_keys = qw(space space_quote space_backslash space_quote_backslash);
-# test including an external manifest.skip file in MANIFEST.SKIP
-{
- maniadd({ foo => undef , albatross => undef,
- 'mymanifest.skip' => undef, 'mydefault.skip' => undef});
- for (@funky_keys) {
- maniadd( {$funky_files{$_} => $_} ) if defined $funky_files{$_};
- }
-
- add_file('mymanifest.skip' => "^foo\n");
- add_file('mydefault.skip' => "^my\n");
- local $ExtUtils::Manifest::DEFAULT_MSKIP =
- File::Spec->catfile($cwd, qw(mantest mydefault.skip));
- my $skip = File::Spec->catfile($cwd, qw(mantest mymanifest.skip));
- add_file('MANIFEST.SKIP' =>
- "albatross\n#!include $skip\n#!include_default");
- my ($res, $warn) = catch_warning( \&skipcheck );
- for (qw(albatross foo foobar mymanifest.skip mydefault.skip)) {
- like( $warn, qr/Skipping \b$_\b/,
- "Skipping $_" );
- }
- for my $funky_key (@funky_keys) {
- SKIP: {
- my $funky_file = $funky_files{$funky_key};
- skip "'$funky_key' not created", 1 unless $funky_file;
- like( $warn, qr/Skipping \b\Q$funky_file\E\b/,
- "Skipping $funky_file");
- }
- }
- ($res, $warn) = catch_warning( \&mkmanifest );
- for (qw(albatross foo foobar mymanifest.skip mydefault.skip)) {
- like( $warn, qr/Removed from MANIFEST: \b$_\b/,
- "Removed $_ from MANIFEST" );
- }
- for my $funky_key (@funky_keys) {
- SKIP: {
- my $funky_file = $funky_files{$funky_key};
- skip "'$funky_key' not created", 1 unless $funky_file;
- like( $warn, qr/Removed from MANIFEST: \b\Q$funky_file\E\b/,
- "Removed $funky_file from MANIFEST");
- }
- }
- my $files = maniread;
- ok( ! exists $files->{albatross}, 'albatross excluded via MANIFEST.SKIP' );
- ok( exists $files->{yarrow}, 'yarrow included in MANIFEST' );
- ok( exists $files->{bar}, 'bar included in MANIFEST' );
- ok( ! exists $files->{foobar}, 'foobar excluded via mymanifest.skip' );
- ok( ! exists $files->{foo}, 'foo excluded via mymanifest.skip' );
- ok( ! exists $files->{'mymanifest.skip'},
- 'mymanifest.skip excluded via mydefault.skip' );
- ok( ! exists $files->{'mydefault.skip'},
- 'mydefault.skip excluded via mydefault.skip' );
-
- # test exclusion of funky files
- for my $funky_key (@funky_keys) {
- SKIP: {
- my $funky_file = $funky_files{$funky_key};
- skip "'$funky_key' not created", 1 unless $funky_file;
- ok( ! exists $files->{$funky_file},
- "'$funky_file' excluded via mymanifest.skip" );
- }
- }
-
- # tests for maniskip
- my $skipchk = maniskip();
- is ( $skipchk->('albatross'), 1,
- 'albatross excluded via MANIFEST.SKIP' );
- is( $skipchk->('yarrow'), '',
- 'yarrow included in MANIFEST' );
- is( $skipchk->('bar'), '',
- 'bar included in MANIFEST' );
- $skipchk = maniskip('mymanifest.skip');
- is( $skipchk->('foobar'), 1,
- 'foobar excluded via mymanifest.skip' );
- is( $skipchk->('foo'), 1,
- 'foo excluded via mymanifest.skip' );
- is( $skipchk->('mymanifest.skip'), '',
- 'mymanifest.skip included via mydefault.skip' );
- is( $skipchk->('mydefault.skip'), '',
- 'mydefault.skip included via mydefault.skip' );
- $skipchk = maniskip('mydefault.skip');
- is( $skipchk->('foobar'), '',
- 'foobar included via mydefault.skip' );
- is( $skipchk->('foo'), '',
- 'foo included via mydefault.skip' );
- is( $skipchk->('mymanifest.skip'), 1,
- 'mymanifest.skip excluded via mydefault.skip' );
- is( $skipchk->('mydefault.skip'), 1,
- 'mydefault.skip excluded via mydefault.skip' );
-
- my $extsep = $Is_VMS_noefs ? '_' : '.';
- $Files{"$_.bak"}++ for ('MANIFEST', "MANIFEST${extsep}SKIP");
-}
-
-add_file('MANIFEST' => 'Makefile.PL');
-maniadd({ foo => 'bar' });
-$files = maniread;
-# VMS downcases the MANIFEST. We normalize it here to match.
-%$files = map { (lc $_ => $files->{$_}) } keys %$files;
-my %expect = ( 'makefile.pl' => '',
- 'foo' => 'bar'
- );
-is_deeply( $files, \%expect, 'maniadd() vs MANIFEST without trailing newline');
-
-#add_file('MANIFEST' => 'Makefile.PL');
-#maniadd({ foo => 'bar' });
-
-SKIP: {
- chmod( 0400, 'MANIFEST' );
- skip "Can't make MANIFEST read-only", 2 if -w 'MANIFEST';
-
- eval {
- maniadd({ 'foo' => 'bar' });
- };
- is( $@, '', "maniadd() won't open MANIFEST if it doesn't need to" );
-
- eval {
- maniadd({ 'grrrwoof' => 'yippie' });
- };
- like( $@, qr/^\Qmaniadd() could not open MANIFEST:\E/,
- "maniadd() dies if it can't open the MANIFEST" );
-
- chmod( 0600, 'MANIFEST' );
-}
-
-
-END {
- is( unlink( keys %Files ), keys %Files, 'remove all added files' );
- remove_dir( 'moretest', 'copy' );
-
- # now get rid of the parent directory
- ok( chdir( $cwd ), 'return to parent directory' );
- remove_dir( 'mantest' );
-}
-
Deleted: vendor/perl/dist/lib/ExtUtils/t/Mkbootstrap.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/Mkbootstrap.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/Mkbootstrap.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,155 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ('../lib', 'lib/');
- }
- else {
- unshift @INC, 't/lib/';
- }
-}
-chdir 't';
-
-use vars qw( $required );
-use Test::More tests => 18;
-
-BEGIN { use_ok( 'ExtUtils::Mkbootstrap' ) }
-
-# Mkbootstrap makes a backup copy of "$_[0].bs" if it exists and is non-zero
-my $file_is_ready;
-local *OUT;
-if (open(OUT, '>mkboot.bs')) {
- $file_is_ready = 1;
- print OUT 'meaningless text';
- close OUT;
-}
-
-SKIP: {
- skip("could not make dummy .bs file: $!", 2) unless $file_is_ready;
-
- Mkbootstrap('mkboot');
- ok( -s 'mkboot.bso', 'Mkbootstrap should backup the .bs file' );
- local *IN;
- if (open(IN, 'mkboot.bso')) {
- chomp ($file_is_ready = <IN>);
- close IN;
- }
-
- is( $file_is_ready, 'meaningless text', 'backup should be a perfect copy' );
-}
-
-
-# if it doesn't exist or is zero bytes in size, it won't be backed up
-Mkbootstrap('fakeboot');
-ok( !( -f 'fakeboot.bso' ), 'Mkbootstrap should not backup an empty file' );
-
-use TieOut;
-my $out = tie *STDOUT, 'TieOut';
-
-# with $Verbose set, it should print status messages about libraries
-$ExtUtils::Mkbootstrap::Verbose = 1;
-Mkbootstrap('');
-is( $out->read, "\tbsloadlibs=\n", 'should report libraries in Verbose mode' );
-
-Mkbootstrap('', 'foo');
-like( $out->read, qr/bsloadlibs=foo/, 'should still report libraries' );
-
-
-# if ${_[0]}_BS exists, require it
-$file_is_ready = open(OUT, '>boot_BS');
-
-SKIP: {
- skip("cannot open boot_BS for writing: $!", 1) unless $file_is_ready;
-
- print OUT '$main::required = 1';
- close OUT;
- Mkbootstrap('boot');
-
- ok( $required, 'baseext_BS file should be require()d' );
-}
-
-
-# if there are any arguments, open a file named baseext.bs
-$file_is_ready = open(OUT, '>dasboot.bs');
-
-SKIP: {
- skip("cannot make dasboot.bs: $!", 5) unless $file_is_ready;
-
- # if it can't be opened for writing, we want to prove that it'll die
- close OUT;
- chmod 0444, 'dasboot.bs';
-
- SKIP: {
- skip("cannot write readonly files", 1) if -w 'dasboot.bs';
-
- eval{ Mkbootstrap('dasboot', 1) };
- like( $@, qr/Unable to open dasboot\.bs/, 'should die given bad filename' );
- }
-
- # now put it back like it was
- chmod 0777, 'dasboot.bs';
- eval{ Mkbootstrap('dasboot', 'myarg') };
- is( $@, '', 'should not die, given good filename' );
-
- # red and reed (a visual pun makes tests worth reading)
- my $read = $out->read();
- like( $read, qr/Writing dasboot.bs/, 'should print status' );
- like( $read, qr/containing: my/, 'should print verbose status on request' );
-
- # now be tricky, and set the status for the next skip block
- $file_is_ready = open(IN, 'dasboot.bs');
- ok( $file_is_ready, 'should have written a new .bs file' );
-}
-
-
-SKIP: {
- skip("cannot read .bs file: $!", 2) unless $file_is_ready;
-
- my $file = do { local $/ = <IN> };
-
- # filename should be in header
- like( $file, qr/# dasboot DynaLoader/, 'file should have boilerplate' );
-
- # should print arguments within this array
- like( $file, qr/qw\(myarg\);/, 'should have written array to file' );
-}
-
-
-# overwrite this file (may whack portability, but the name's too good to waste)
-$file_is_ready = open(OUT, '>dasboot.bs');
-
-SKIP: {
- skip("cannot make dasboot.bs again: $!", 1) unless $file_is_ready;
- close OUT;
-
- # if $DynaLoader::bscode is set, write its contents to the file
- local $DynaLoader::bscode;
- $DynaLoader::bscode = 'Wall';
- $ExtUtils::Mkbootstrap::Verbose = 0;
-
- # if arguments contain '-l' or '-L' or '-R' print dl_findfile message
- eval{ Mkbootstrap('dasboot', '-Larry') };
- is( $@, '', 'should be able to open a file again');
-
- $file_is_ready = open(IN, 'dasboot.bs');
-}
-
-SKIP: {
- skip("cannot open dasboot.bs for reading: $!", 3) unless $file_is_ready;
-
- my $file = do { local $/ = <IN> };
- is( $out->read, "Writing dasboot.bs\n", 'should hush without Verbose set' );
-
- # and find our hidden tribute to a fine example
- like( $file, qr/dl_findfile.+Larry/s, 'should load libraries if needed' );
- like( $file, qr/Wall\n1;\n/ms, 'should write $DynaLoader::bscode if set' );
-}
-
-close IN;
-close OUT;
-
-END {
- # clean things up, even on VMS
- 1 while unlink(qw( mkboot.bso boot_BS dasboot.bs .bs ));
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/PL_FILES.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/PL_FILES.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/PL_FILES.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,42 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use strict;
-use Test::More tests => 9;
-
-use File::Spec;
-use MakeMaker::Test::Setup::PL_FILES;
-use MakeMaker::Test::Utils;
-
-my $perl = which_perl();
-my $make = make_run();
-perl_lib();
-
-setup;
-
-END {
- ok( chdir File::Spec->updir );
- ok( teardown );
-}
-
-ok chdir('PL_FILES-Module');
-
-run(qq{$perl Makefile.PL});
-cmp_ok( $?, '==', 0 );
-
-my $make_out = run("$make");
-is( $?, 0 ) || diag $make_out;
-
-foreach my $file (qw(single.out 1.out 2.out blib/lib/PL/Bar.pm)) {
- ok( -e $file, "$file was created" );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/Packlist.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/Packlist.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/Packlist.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,174 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use Test::More tests => 34;
-
-use_ok( 'ExtUtils::Packlist' );
-
-is( ref(ExtUtils::Packlist::mkfh()), 'GLOB', 'mkfh() should return a FH' );
-
-# new calls tie()
-my $pl = ExtUtils::Packlist->new();
-isa_ok( $pl, 'ExtUtils::Packlist' );
-is( ref tied %$pl, 'ExtUtils::Packlist', 'obj should be tied underneath' );
-
-
-$pl = ExtUtils::Packlist::TIEHASH( 'tieclass', 'packfile' );
-is( ref($pl), 'tieclass', 'TIEHASH() should bless into class' );
-is( $pl->{packfile}, 'packfile', 'TIEHASH() should store packfile name' );
-
-
-ExtUtils::Packlist::STORE($pl, 'key', 'value');
-is( $pl->{data}{key}, 'value', 'STORE() should stuff stuff in data member' );
-
-
-$pl->{data}{foo} = 'bar';
-is( ExtUtils::Packlist::FETCH($pl, 'foo'), 'bar', 'check FETCH()' );
-
-
-# test FIRSTKEY and NEXTKEY
-SKIP: {
- $pl->{data}{bar} = 'baz';
- skip('not enough keys to test FIRSTKEY', 2)
- unless keys %{ $pl->{data} } > 2;
-
- # get the first and second key
- my ($first, $second) = keys %{ $pl->{data} };
-
- # now get a couple of extra keys, to mess with the hash iterator
- my $i = 0;
- for (keys %{ $pl->{data} } ) {
- last if $i++;
- }
-
- # finally, see if it really can get the first key again
- is( ExtUtils::Packlist::FIRSTKEY($pl), $first,
- 'FIRSTKEY() should be consistent' );
-
- is( ExtUtils::Packlist::NEXTKEY($pl), $second,
- 'and NEXTKEY() should also be consistent' );
-}
-
-
-ok( ExtUtils::Packlist::EXISTS($pl, 'bar'), 'EXISTS() should find keys' );
-
-
-ExtUtils::Packlist::DELETE($pl, 'bar');
-ok( !(exists $pl->{data}{bar}), 'DELETE() should delete cleanly' );
-
-
-ExtUtils::Packlist::CLEAR($pl);
-is( keys %{ $pl->{data} }, 0, 'CLEAR() should wipe out data' );
-
-
-# DESTROY does nothing...
-can_ok( 'ExtUtils::Packlist', 'DESTROY' );
-
-
-# write is a little more complicated
-eval { ExtUtils::Packlist::write({}) };
-like( $@, qr/No packlist filename/, 'write() should croak without packfile' );
-
-eval { ExtUtils::Packlist::write({}, 'eplist') };
-my $file_is_ready = $@ ? 0 : 1;
-ok( $file_is_ready, 'write() can write a file' );
-
-local *IN;
-
-SKIP: {
- skip('cannot write files, some tests difficult', 3) unless $file_is_ready;
-
- # set this file to read-only
- chmod 0444, 'eplist';
-
- SKIP: {
- skip("cannot write readonly files", 1) if -w 'eplist';
-
- eval { ExtUtils::Packlist::write({}, 'eplist') };
- like( $@, qr/Can't open file/, 'write() should croak on open failure' );
- }
-
- #'now set it back (tick here fixes vim syntax highlighting ;)
- chmod 0777, 'eplist';
-
- # and some test data to be read
- $pl->{data} = {
- single => 1,
- hash => {
- foo => 'bar',
- baz => 'bup',
- },
- '/./abc' => '',
- };
- eval { ExtUtils::Packlist::write($pl, 'eplist') };
- is( $@, '', 'write() should normally succeed' );
- is( $pl->{packfile}, 'eplist', 'write() should set packfile name' );
-
- $file_is_ready = open(IN, 'eplist');
-}
-
-
-eval { ExtUtils::Packlist::read({}) };
-like( $@, qr/^No packlist filename/, 'read() should croak without packfile' );
-
-
-eval { ExtUtils::Packlist::read({}, 'abadfilename') };
-like( $@, qr/^Can't open file/, 'read() should croak with bad packfile name' );
-#'open packfile for reading
-
-
-# and more read() tests
-SKIP: {
- skip("cannot open file for reading: $!", 5) unless $file_is_ready;
- my $file = do { local $/ = <IN> };
-
- like( $file, qr/single\n/, 'key with value should be available' );
- like( $file, qr!/\./abc\n!, 'key with no value should also be present' );
- like( $file, qr/hash.+baz=bup/, 'key with hash value should be present' );
- like( $file, qr/hash.+foo=bar/, 'second embedded hash value should appear');
- close IN;
-
- eval{ ExtUtils::Packlist::read($pl, 'eplist') };
- is( $@, '', 'read() should normally succeed' );
- is( $pl->{data}{single}, undef, 'single keys should have undef value' );
- is( ref($pl->{data}{hash}), 'HASH', 'multivalue keys should become hashes');
-
- is( $pl->{data}{hash}{foo}, 'bar', 'hash values should be set' );
- ok( exists $pl->{data}{'/abc'}, 'read() should resolve /./ to / in keys' );
-
- # give validate a valid and an invalid file to find
- $pl->{data} = {
- eplist => 1,
- fake => undef,
- };
-
- is( ExtUtils::Packlist::validate($pl), 1,
- 'validate() should find missing files' );
- ExtUtils::Packlist::validate($pl, 1);
- ok( !exists $pl->{data}{fake},
- 'validate() should remove missing files when prompted' );
-
- # one more new() test, to see if it calls read() successfully
- $pl = ExtUtils::Packlist->new('eplist');
-}
-
-
-# packlist_file, $pl should be set from write test
-is( ExtUtils::Packlist::packlist_file({ packfile => 'pl' }), 'pl',
- 'packlist_file() should fetch packlist from passed hash' );
-is( ExtUtils::Packlist::packlist_file($pl), 'eplist',
- 'packlist_file() should fetch packlist from ExtUtils::Packlist object' );
-
-END {
- 1 while unlink qw( eplist );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/VERSION_FROM.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/VERSION_FROM.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/VERSION_FROM.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,39 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-chdir 't';
-
-use strict;
-use Test::More tests => 1;
-use MakeMaker::Test::Utils;
-use ExtUtils::MakeMaker;
-use TieOut;
-use File::Path;
-
-perl_lib();
-
-mkdir('Odd-Version', 0777);
-END { chdir File::Spec->updir; rmtree 'Odd-Version' }
-chdir 'Odd-Version';
-
-open(MPL, ">Version") || die $!;
-print MPL "\$VERSION = 0\n";
-close MPL;
-END { unlink 'Version' }
-
-my $stdout = tie *STDOUT, 'TieOut' or die;
-my $mm = WriteMakefile(
- NAME => 'Version',
- VERSION_FROM => 'Version'
-);
-
-is( $mm->{VERSION}, 0, 'VERSION_FROM when $VERSION = 0' );
Deleted: vendor/perl/dist/lib/ExtUtils/t/WriteEmptyMakefile.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/WriteEmptyMakefile.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/WriteEmptyMakefile.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,40 +0,0 @@
-#!/usr/bin/perl -w
-
-# This is a test of WriteEmptyMakefile.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-chdir 't';
-
-use strict;
-use Test::More tests => 5;
-
-use ExtUtils::MakeMaker qw(WriteEmptyMakefile);
-use TieOut;
-
-can_ok __PACKAGE__, 'WriteEmptyMakefile';
-
-eval { WriteEmptyMakefile("something"); };
-like $@, qr/Need an even number of args/;
-
-
-{
- ok( my $stdout = tie *STDOUT, 'TieOut' );
-
- ok !-e 'wibble';
- END { 1 while unlink 'wibble' }
-
- WriteEmptyMakefile(
- NAME => "Foo",
- FIRST_MAKEFILE => "wibble",
- );
- ok -e 'wibble';
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/arch_check.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/arch_check.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/arch_check.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,89 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't' if -d 't';
- @INC = qw(../lib lib);
- }
-}
-
-use strict;
-use lib 't/lib';
-
-use TieOut;
-use Test::More 'no_plan';
-
-use Config;
-use ExtUtils::MakeMaker;
-
-ok( my $stdout = tie *STDOUT, 'TieOut' );
-
-# Create a normalized MM object to test with
-my $mm = bless {}, "MM";
-$mm->{PERL_SRC} = 0;
-$mm->{UNINSTALLED_PERL} = 0;
-
-my $rel2abs = sub { $mm->rel2abs($mm->catfile(@_)) };
-
-ok $mm->arch_check(
- $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
- $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
-);
-
-
-# Different architecures.
-{
- ok !$mm->arch_check(
- $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
- $rel2abs->(qw(. t testdata reallylongdirectoryname arch2 Config.pm)),
- );
-
- like $stdout->read, qr{\Q
-Your perl and your Config.pm seem to have different ideas about the
-architecture they are running on.
-Perl thinks: [arch1]
-Config says: [$Config{archname}]
-This may or may not cause problems. Please check your installation of perl
-if you have problems building this extension.
-};
-
-}
-
-
-# Different file path separators [rt.cpan.org 46416]
-SKIP: {
- require File::Spec;
- skip "Win32 test", 1 unless File::Spec->isa("File::Spec::Win32");
-
- ok $mm->arch_check(
- "/_64/perl1004/lib/Config.pm",
- '\\_64\\perl1004\\lib\\Config.pm',
- );
-}
-
-
-# PERL_SRC is set, no check is done
-{
- # Clear our log
- $stdout->read;
-
- local $mm->{PERL_SRC} = 1;
- ok $mm->arch_check(
- $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
- $rel2abs->(qw(. t testdata reallylongdirectoryname arch2 Config.pm)),
- );
-
- is $stdout->read, '';
-}
-
-
-# UNINSTALLED_PERL is set, no message is sent
-{
- local $mm->{UNINSTALLED_PERL} = 1;
- ok !$mm->arch_check(
- $rel2abs->(qw(. t testdata reallylongdirectoryname arch1 Config.pm)),
- $rel2abs->(qw(. t testdata reallylongdirectoryname arch2 Config.pm)),
- );
-
- like $stdout->read, qr{^Have .*\nWant .*$};
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/backwards.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/backwards.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/backwards.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,25 +0,0 @@
-#!/usr/bin/perl -w
-
-# This is a test for all the odd little backwards compatible things
-# MakeMaker has to support. And we do mean backwards.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 2;
-
-require ExtUtils::MakeMaker;
-
-# CPAN.pm wants MM.
-can_ok('MM', 'new');
-
-# Pre 5.8 ExtUtils::Embed wants MY.
-can_ok('MY', 'catdir');
Deleted: vendor/perl/dist/lib/ExtUtils/t/basic.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/basic.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/basic.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,325 +0,0 @@
-#!/usr/bin/perl -w
-
-# This test puts MakeMaker through the paces of a basic perl module
-# build, test and installation of the Big::Fat::Dummy module.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Config;
-use ExtUtils::MakeMaker;
-
-use Test::More tests => 79;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-use File::Find;
-use File::Spec;
-use File::Path;
-
-my $perl = which_perl();
-my $Is_VMS = $^O eq 'VMS';
-
-chdir 't';
-
-perl_lib;
-
-my $Touch_Time = calibrate_mtime();
-
-$| = 1;
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-
-my @mpl_out = run(qq{$perl Makefile.PL "PREFIX=../dummy-install"});
-END { rmtree '../dummy-install'; }
-
-cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) ||
- diag(@mpl_out);
-
-my $makefile = makefile_name();
-ok( grep(/^Writing $makefile for Big::Dummy/,
- @mpl_out) == 1,
- 'Makefile.PL output looks right');
-
-ok( grep(/^Current package is: main$/,
- @mpl_out) == 1,
- 'Makefile.PL run in package main');
-
-ok( -e $makefile, 'Makefile exists' );
-
-# -M is flakey on VMS
-my $mtime = (stat($makefile))[9];
-cmp_ok( $Touch_Time, '<=', $mtime, ' its been touched' );
-
-END { unlink makefile_name(), makefile_backup() }
-
-my $make = make_run();
-
-{
- # Supress 'make manifest' noise
- local $ENV{PERL_MM_MANIFEST_VERBOSE} = 0;
- my $manifest_out = run("$make manifest");
- ok( -e 'MANIFEST', 'make manifest created a MANIFEST' );
- ok( -s 'MANIFEST', ' its not empty' );
-}
-
-END { unlink 'MANIFEST'; }
-
-
-my $ppd_out = run("$make ppd");
-is( $?, 0, ' exited normally' ) || diag $ppd_out;
-ok( open(PPD, 'Big-Dummy.ppd'), ' .ppd file generated' );
-my $ppd_html;
-{ local $/; $ppd_html = <PPD> }
-close PPD;
-like( $ppd_html, qr{^<SOFTPKG NAME="Big-Dummy" VERSION="0.01">}m,
- ' <SOFTPKG>' );
-like( $ppd_html, qr{^\s*<ABSTRACT>Try "our" hot dog's</ABSTRACT>}m,
- ' <ABSTRACT>');
-like( $ppd_html,
- qr{^\s*<AUTHOR>Michael G Schwern <schwern\@pobox.com></AUTHOR>}m,
- ' <AUTHOR>' );
-like( $ppd_html, qr{^\s*<IMPLEMENTATION>}m, ' <IMPLEMENTATION>');
-like( $ppd_html, qr{^\s*<REQUIRE NAME="strict::" />}m, ' <REQUIRE>' );
-
-my $archname = $Config{archname};
-if( $] >= 5.008 ) {
- # XXX This is a copy of the internal logic, so it's not a great test
- $archname .= "-$Config{PERL_REVISION}.$Config{PERL_VERSION}";
-}
-like( $ppd_html, qr{^\s*<ARCHITECTURE NAME="$archname" />}m,
- ' <ARCHITECTURE>');
-like( $ppd_html, qr{^\s*<CODEBASE HREF="" />}m, ' <CODEBASE>');
-like( $ppd_html, qr{^\s*</IMPLEMENTATION>}m, ' </IMPLEMENTATION>');
-like( $ppd_html, qr{^\s*</SOFTPKG>}m, ' </SOFTPKG>');
-END { unlink 'Big-Dummy.ppd' }
-
-
-my $test_out = run("$make test");
-like( $test_out, qr/All tests successful/, 'make test' );
-is( $?, 0, ' exited normally' ) ||
- diag $test_out;
-
-# Test 'make test TEST_VERBOSE=1'
-my $make_test_verbose = make_macro($make, 'test', TEST_VERBOSE => 1);
-$test_out = run("$make_test_verbose");
-like( $test_out, qr/ok \d+ - TEST_VERBOSE/, 'TEST_VERBOSE' );
-like( $test_out, qr/All tests successful/, ' successful' );
-is( $?, 0, ' exited normally' ) ||
- diag $test_out;
-
-
-my $install_out = run("$make install");
-is( $?, 0, 'install' ) || diag $install_out;
-like( $install_out, qr/^Installing /m );
-
-ok( -r '../dummy-install', ' install dir created' );
-my %files = ();
-find( sub {
- # do it case-insensitive for non-case preserving OSs
- my $file = lc $_;
-
- # VMS likes to put dots on the end of things that don't have them.
- $file =~ s/\.$// if $Is_VMS;
-
- $files{$file} = $File::Find::name;
-}, '../dummy-install' );
-ok( $files{'dummy.pm'}, ' Dummy.pm installed' );
-ok( $files{'liar.pm'}, ' Liar.pm installed' );
-ok( $files{'program'}, ' program installed' );
-ok( $files{'.packlist'}, ' packlist created' );
-ok( $files{'perllocal.pod'},' perllocal.pod created' );
-
-
-SKIP: {
- skip 'VMS install targets do not preserve $(PREFIX)', 8 if $Is_VMS;
-
- $install_out = run("$make install PREFIX=elsewhere");
- is( $?, 0, 'install with PREFIX override' ) || diag $install_out;
- like( $install_out, qr/^Installing /m );
-
- ok( -r 'elsewhere', ' install dir created' );
- %files = ();
- find( sub { $files{$_} = $File::Find::name; }, 'elsewhere' );
- ok( $files{'Dummy.pm'}, ' Dummy.pm installed' );
- ok( $files{'Liar.pm'}, ' Liar.pm installed' );
- ok( $files{'program'}, ' program installed' );
- ok( $files{'.packlist'}, ' packlist created' );
- ok( $files{'perllocal.pod'},' perllocal.pod created' );
- rmtree('elsewhere');
-}
-
-
-SKIP: {
- skip 'VMS install targets do not preserve $(DESTDIR)', 10 if $Is_VMS;
-
- $install_out = run("$make install PREFIX= DESTDIR=other");
- is( $?, 0, 'install with DESTDIR' ) ||
- diag $install_out;
- like( $install_out, qr/^Installing /m );
-
- ok( -d 'other', ' destdir created' );
- %files = ();
- my $perllocal;
- find( sub {
- $files{$_} = $File::Find::name;
- }, 'other' );
- ok( $files{'Dummy.pm'}, ' Dummy.pm installed' );
- ok( $files{'Liar.pm'}, ' Liar.pm installed' );
- ok( $files{'program'}, ' program installed' );
- ok( $files{'.packlist'}, ' packlist created' );
- ok( $files{'perllocal.pod'},' perllocal.pod created' );
-
- ok( open(PERLLOCAL, $files{'perllocal.pod'} ) ) ||
- diag("Can't open $files{'perllocal.pod'}: $!");
- { local $/;
- unlike(<PERLLOCAL>, qr/other/, 'DESTDIR should not appear in perllocal');
- }
- close PERLLOCAL;
-
-# TODO not available in the min version of Test::Harness we require
-# ok( open(PACKLIST, $files{'.packlist'} ) ) ||
-# diag("Can't open $files{'.packlist'}: $!");
-# { local $/;
-# local $TODO = 'DESTDIR still in .packlist';
-# unlike(<PACKLIST>, qr/other/, 'DESTDIR should not appear in .packlist');
-# }
-# close PACKLIST;
-
- rmtree('other');
-}
-
-
-SKIP: {
- skip 'VMS install targets do not preserve $(PREFIX)', 9 if $Is_VMS;
-
- $install_out = run("$make install PREFIX=elsewhere DESTDIR=other/");
- is( $?, 0, 'install with PREFIX override and DESTDIR' ) ||
- diag $install_out;
- like( $install_out, qr/^Installing /m );
-
- ok( !-d 'elsewhere', ' install dir not created' );
- ok( -d 'other/elsewhere', ' destdir created' );
- %files = ();
- find( sub { $files{$_} = $File::Find::name; }, 'other/elsewhere' );
- ok( $files{'Dummy.pm'}, ' Dummy.pm installed' );
- ok( $files{'Liar.pm'}, ' Liar.pm installed' );
- ok( $files{'program'}, ' program installed' );
- ok( $files{'.packlist'}, ' packlist created' );
- ok( $files{'perllocal.pod'},' perllocal.pod created' );
- rmtree('other');
-}
-
-
-my $dist_test_out = run("$make disttest");
-is( $?, 0, 'disttest' ) || diag($dist_test_out);
-
-# Test META.yml generation
-use ExtUtils::Manifest qw(maniread);
-
-my $distdir = 'Big-Dummy-0.01';
-$distdir =~ s/\./_/g if $Is_VMS;
-my $meta_yml = "$distdir/META.yml";
-
-ok( !-f 'META.yml', 'META.yml not written to source dir' );
-ok( -f $meta_yml, 'META.yml written to dist dir' );
-ok( !-e "META_new.yml", 'temp META.yml file not left around' );
-
-SKIP: {
- # META.yml spec 1.4 was added in 0.11
- skip "Test::YAML::Meta >= 0.11 required", 2
- unless eval { require Test::YAML::Meta } and
- Test::YAML::Meta->VERSION >= 0.11;
-
- Test::YAML::Meta::meta_spec_ok($meta_yml);
-}
-
-ok open META, $meta_yml or diag $!;
-my $meta = join '', <META>;
-ok close META;
-
-is $meta, <<"END";
---- #YAML:1.0
-name: Big-Dummy
-version: 0.01
-abstract: Try "our" hot dog's
-author:
- - Michael G Schwern <schwern\@pobox.com>
-license: unknown
-distribution_type: module
-configure_requires:
- ExtUtils::MakeMaker: 0
-build_requires:
- ExtUtils::MakeMaker: 0
-requires:
- strict: 0
-no_index:
- directory:
- - t
- - inc
-generated_by: ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
-END
-
-my $manifest = maniread("$distdir/MANIFEST");
-# VMS is non-case preserving, so we can't know what the MANIFEST will
-# look like. :(
-_normalize($manifest);
-is( $manifest->{'meta.yml'}, 'Module meta-data (added by MakeMaker)' );
-
-
-# Test NO_META META.yml suppression
-unlink $meta_yml;
-ok( !-f $meta_yml, 'META.yml deleted' );
- at mpl_out = run(qq{$perl Makefile.PL "NO_META=1"});
-cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag(@mpl_out);
-my $distdir_out = run("$make distdir");
-is( $?, 0, 'distdir' ) || diag($distdir_out);
-ok( !-f $meta_yml, 'META.yml generation suppressed by NO_META' );
-
-
-# Make sure init_dirscan doesn't go into the distdir
- at mpl_out = run(qq{$perl Makefile.PL "PREFIX=../dummy-install"});
-
-cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag(@mpl_out);
-
-ok( grep(/^Writing $makefile for Big::Dummy/, @mpl_out) == 1,
- 'init_dirscan skipped distdir') ||
- diag(@mpl_out);
-
-# I know we'll get ignored errors from make here, that's ok.
-# Send STDERR off to oblivion.
-open(SAVERR, ">&STDERR") or die $!;
-open(STDERR, ">",File::Spec->devnull) or die $!;
-
-my $realclean_out = run("$make realclean");
-is( $?, 0, 'realclean' ) || diag($realclean_out);
-
-open(STDERR, ">&SAVERR") or die $!;
-close SAVERR;
-
-
-sub _normalize {
- my $hash = shift;
-
- while(my($k,$v) = each %$hash) {
- delete $hash->{$k};
- $hash->{lc $k} = $v;
- }
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/build_man.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/build_man.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/build_man.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,86 +0,0 @@
-#!/usr/bin/perl -w
-
-# Test if MakeMaker declines to build man pages under the right conditions.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 9;
-
-use File::Spec;
-use TieOut;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-
-use ExtUtils::MakeMaker;
-use ExtUtils::MakeMaker::Config;
-
-# Simulate an installation which has man page generation turned off to
-# ensure these tests will still work.
-$Config{installman3dir} = 'none';
-
-chdir 't';
-
-perl_lib();
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-
-ok( my $stdout = tie *STDOUT, 'TieOut' );
-
-{
- local $Config{installman3dir} = File::Spec->catdir(qw(t lib));
-
- my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- );
-
- ok( keys %{ $mm->{MAN3PODS} } );
-}
-
-{
- my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- INSTALLMAN3DIR => 'none'
- );
-
- is_deeply( $mm->{MAN3PODS}, {} );
-}
-
-
-{
- my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- MAN3PODS => {}
- );
-
- is_deeply( $mm->{MAN3PODS}, { } );
-}
-
-
-{
- my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- MAN3PODS => { "Foo.pm" => "Foo.1" }
- );
-
- is_deeply( $mm->{MAN3PODS}, { "Foo.pm" => "Foo.1" } );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/bytes.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/bytes.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/bytes.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,30 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 4;
-
-use_ok('ExtUtils::MakeMaker::bytes');
-
-SKIP: {
- skip "bytes.pm appeared in 5.6", 3 if $] < 5.006;
-
- my $chr = chr(400);
- is( length $chr, 1 );
-
- {
- use ExtUtils::MakeMaker::bytes;
- is( length $chr, 2, 'byte.pm in effect' );
- }
-
- is( length $chr, 1, ' score is lexical' );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/can_write_dir.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/can_write_dir.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/can_write_dir.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,61 +0,0 @@
-#!/usr/bin/perl -w
-
-# Test the private _can_write_dir() function.
-
-use strict;
-use ExtUtils::Install;
-use File::Spec;
-{ package FS; our @ISA = qw(File::Spec); }
-
-# Alias it for easier access
-*can_write_dir = \&ExtUtils::Install::_can_write_dir;
-
-use Test::More 'no_plan';
-
-
-my $dne = FS->catdir(qw(does not exist));
-ok ! -e $dne;
-is_deeply [can_write_dir($dne)],
- [1,
- FS->curdir,
- FS->catdir('does'),
- FS->catdir('does', 'not'),
- FS->catdir('does', 'not', 'exist')
- ];
-
-
-my $abs_dne = FS->rel2abs($dne);
-ok ! -e $abs_dne;
-is_deeply [can_write_dir($abs_dne)],
- [1,
- FS->rel2abs(FS->curdir),
- FS->rel2abs(FS->catdir('does')),
- FS->rel2abs(FS->catdir('does', 'not')),
- FS->rel2abs(FS->catdir('does', 'not', 'exist')),
- ];
-
-SKIP: {
- my $exists = FS->catdir(qw(exists));
- my $subdir = FS->catdir(qw(exists subdir));
-
-
- ok mkdir $exists;
- END { rmdir $exists }
-
- ok chmod 0555, $exists, 'make read only';
-
- skip "Current user or OS cannot create directories that they cannot read", 6
- if -w $exists; # these tests require a directory we cant read
-
- is_deeply [can_write_dir($exists)], [0, $exists];
- is_deeply [can_write_dir($subdir)], [0, $exists, $subdir];
-
- ok chmod 0777, $exists, 'make writable';
- ok -w $exists;
- is_deeply [can_write_dir($exists)], [1, $exists];
- is_deeply [can_write_dir($subdir)],
- [1,
- $exists,
- $subdir
- ];
-}
\ No newline at end of file
Deleted: vendor/perl/dist/lib/ExtUtils/t/cd.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/cd.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/cd.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,68 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ('../lib', 'lib/');
- }
- else {
- unshift @INC, 't/lib/';
- }
-}
-chdir 't';
-
-my $Is_VMS = $^O eq 'VMS';
-
-use File::Spec;
-
-use Test::More tests => 4;
-
-my $dir = File::Spec->catdir("some", "dir");
-my @cd_args = ($dir, "command1", "command2");
-
-{
- package Test::MM_Win32;
- use ExtUtils::MM_Win32;
- @ISA = qw(ExtUtils::MM_Win32);
-
- my $mm = bless {}, 'Test::MM_Win32';
-
- {
- local *make = sub { "nmake" };
-
- my @dirs = (File::Spec->updir) x 2;
- my $expected_updir = File::Spec->catdir(@dirs);
-
- ::is $mm->cd(@cd_args),
-qq{cd $dir
- command1
- command2
- cd $expected_updir};
- }
-
- {
- local *make = sub { "dmake" };
-
- ::is $mm->cd(@cd_args),
-qq{cd $dir && command1
- cd $dir && command2};
- }
-}
-
-{
- is +ExtUtils::MM_Unix->cd(@cd_args),
-qq{cd $dir && command1
- cd $dir && command2};
-}
-
-SKIP: {
- skip("VMS' cd requires vmspath which is only on VMS", 1) unless $Is_VMS;
-
- use ExtUtils::MM_VMS;
- is +ExtUtils::MM_VMS->cd(@cd_args),
-q{startdir = F$Environment("Default")
- Set Default [.some.dir]
- command1
- command2
- Set Default 'startdir'};
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/config.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/config.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/config.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,23 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ('../lib', 'lib/');
- }
- else {
- unshift @INC, 't/lib/';
- }
-}
-
-use Test::More tests => 3;
-use Config ();
-
-BEGIN { use_ok 'ExtUtils::MakeMaker::Config'; }
-
-is $Config{path_sep}, $Config::Config{path_sep};
-
-eval {
- $Config{wibble} = 42;
-};
-is $Config{wibble}, 42;
Deleted: vendor/perl/dist/lib/ExtUtils/t/cp.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/cp.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/cp.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,33 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ('../lib', 'lib/');
- }
- else {
- unshift @INC, 't/lib/';
- }
-}
-chdir 't';
-
-use ExtUtils::Command;
-use Test::More tests => 1;
-
-open FILE, ">source" or die $!;
-print FILE "stuff\n";
-close FILE;
-
-# Instead of sleeping to make the file time older
-utime time - 900, time - 900, "source";
-
-END { 1 while unlink "source", "dest"; }
-
-# Win32 bug, cp wouldn't update mtime.
-{
- local @ARGV = qw(source dest);
- cp();
- my $mtime = (stat("dest"))[9];
- my $now = time;
- cmp_ok( abs($mtime - $now), '<=', 1, 'cp updated mtime' );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/dir_target.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/dir_target.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/dir_target.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,18 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ('../lib', 'lib/');
- }
- else {
- unshift @INC, 't/lib/';
- }
-}
-chdir 't';
-
-use Test::More tests => 1;
-use ExtUtils::MakeMaker;
-
-# dir_target() was typo'd as dir_targets()
-can_ok('MM', 'dir_target');
Deleted: vendor/perl/dist/lib/ExtUtils/t/eu_command.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/eu_command.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/eu_command.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,290 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ('../lib', 'lib/');
- }
- else {
- unshift @INC, 't/lib/';
- }
-}
-chdir 't';
-
-BEGIN {
- $Testfile = 'testfile.foo';
-}
-
-BEGIN {
- 1 while unlink $Testfile, 'newfile';
- # forcibly remove ecmddir/temp2, but don't import mkpath
- use File::Path ();
- File::Path::rmtree( 'ecmddir' );
-}
-
-use Test::More tests => 40;
-use File::Spec;
-
-BEGIN {
- # bad neighbor, but test_f() uses exit()
- *CORE::GLOBAL::exit = ''; # quiet 'only once' warning.
- *CORE::GLOBAL::exit = sub (;$) { return $_[0] };
- use_ok( 'ExtUtils::Command' );
-}
-
-{
- # concatenate this file with itself
- # be extra careful the regex doesn't match itself
- use TieOut;
- my $out = tie *STDOUT, 'TieOut';
- my $self = $0;
- unless (-f $self) {
- my ($vol, $dirs, $file) = File::Spec->splitpath($self);
- my @dirs = File::Spec->splitdir($dirs);
- unshift(@dirs, File::Spec->updir);
- $dirs = File::Spec->catdir(@dirs);
- $self = File::Spec->catpath($vol, $dirs, $file);
- }
- @ARGV = ($self, $self);
-
- cat();
- is( scalar( $$out =~ s/use_ok\( 'ExtUtils::Command'//g), 2,
- 'concatenation worked' );
-
- # the truth value here is reversed -- Perl true is shell false
- @ARGV = ( $Testfile );
- is( test_f(), 1, 'testing non-existent file' );
-
- # these are destructive, have to keep setting @ARGV
- @ARGV = ( $Testfile );
- touch();
-
- @ARGV = ( $Testfile );
- is( test_f(), 0, 'testing touch() and test_f()' );
- is_deeply( \@ARGV, [$Testfile], 'test_f preserves @ARGV' );
-
- @ARGV = ( $Testfile );
- ok( -e $ARGV[0], 'created!' );
-
- my ($now) = time;
- utime ($now, $now, $ARGV[0]);
- sleep 2;
-
- # Just checking modify time stamp, access time stamp is set
- # to the beginning of the day in Win95.
- # There's a small chance of a 1 second flutter here.
- my $stamp = (stat($ARGV[0]))[9];
- cmp_ok( abs($now - $stamp), '<=', 1, 'checking modify time stamp' ) ||
- diag "mtime == $stamp, should be $now";
-
- @ARGV = qw(newfile);
- touch();
-
- my $new_stamp = (stat('newfile'))[9];
- cmp_ok( abs($new_stamp - $stamp), '>=', 2, 'newer file created' );
-
- @ARGV = ('newfile', $Testfile);
- eqtime();
-
- $stamp = (stat($Testfile))[9];
- cmp_ok( abs($new_stamp - $stamp), '<=', 1, 'eqtime' );
-
- # eqtime use to clear the contents of the file being equalized!
- open(FILE, ">>$Testfile") || die $!;
- print FILE "Foo";
- close FILE;
-
- @ARGV = ('newfile', $Testfile);
- eqtime();
- ok( -s $Testfile, "eqtime doesn't clear the file being equalized" );
-
- SKIP: {
- if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' ||
- $^O eq 'NetWare' || $^O eq 'dos' || $^O eq 'cygwin' ||
- $^O eq 'MacOS'
- ) {
- skip( "different file permission semantics on $^O", 3);
- }
-
- # change a file to execute-only
- @ARGV = ( '0100', $Testfile );
- ExtUtils::Command::chmod();
-
- is( ((stat($Testfile))[2] & 07777) & 0700,
- 0100, 'change a file to execute-only' );
-
- # change a file to read-only
- @ARGV = ( '0400', $Testfile );
- ExtUtils::Command::chmod();
-
- is( ((stat($Testfile))[2] & 07777) & 0700,
- ($^O eq 'vos' ? 0500 : 0400), 'change a file to read-only' );
-
- # change a file to write-only
- @ARGV = ( '0200', $Testfile );
- ExtUtils::Command::chmod();
-
- is( ((stat($Testfile))[2] & 07777) & 0700,
- ($^O eq 'vos' ? 0700 : 0200), 'change a file to write-only' );
- }
-
- # change a file to read-write
- @ARGV = ( '0600', $Testfile );
- my @orig_argv = @ARGV;
- ExtUtils::Command::chmod();
- is_deeply( \@ARGV, \@orig_argv, 'chmod preserves @ARGV' );
-
- is( ((stat($Testfile))[2] & 07777) & 0700,
- ($^O eq 'vos' ? 0700 : 0600), 'change a file to read-write' );
-
-
- SKIP: {
- if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' ||
- $^O eq 'NetWare' || $^O eq 'dos' || $^O eq 'cygwin' ||
- $^O eq 'MacOS'
- ) {
- skip( "different file permission semantics on $^O", 5);
- }
-
- @ARGV = ('testdir');
- mkpath;
- ok( -e 'testdir' );
-
- # change a dir to execute-only
- @ARGV = ( '0100', 'testdir' );
- ExtUtils::Command::chmod();
-
- is( ((stat('testdir'))[2] & 07777) & 0700,
- 0100, 'change a dir to execute-only' );
-
- # change a dir to read-only
- @ARGV = ( '0400', 'testdir' );
- ExtUtils::Command::chmod();
-
- is( ((stat('testdir'))[2] & 07777) & 0700,
- ($^O eq 'vos' ? 0500 : 0400), 'change a dir to read-only' );
-
- # change a dir to write-only
- @ARGV = ( '0200', 'testdir' );
- ExtUtils::Command::chmod();
-
- is( ((stat('testdir'))[2] & 07777) & 0700,
- ($^O eq 'vos' ? 0700 : 0200), 'change a dir to write-only' );
-
- @ARGV = ('testdir');
- rm_rf;
- ok( ! -e 'testdir', 'rm_rf can delete a read-only dir' );
- }
-
-
- # mkpath
- my $test_dir = File::Spec->join( 'ecmddir', 'temp2' );
- @ARGV = ( $test_dir );
- ok( ! -e $ARGV[0], 'temp directory not there yet' );
- is( test_d(), 1, 'testing non-existent directory' );
-
- @ARGV = ( $test_dir );
- mkpath();
- ok( -e $ARGV[0], 'temp directory created' );
- is( test_d(), 0, 'testing existing dir' );
-
- @ARGV = ( $test_dir );
- # copy a file to a nested subdirectory
- unshift @ARGV, $Testfile;
- @orig_argv = @ARGV;
- cp();
- is_deeply( \@ARGV, \@orig_argv, 'cp preserves @ARGV' );
-
- ok( -e File::Spec->join( 'ecmddir', 'temp2', $Testfile ), 'copied okay' );
-
- # cp should croak if destination isn't directory (not a great warning)
- @ARGV = ( $Testfile ) x 3;
- eval { cp() };
-
- like( $@, qr/Too many arguments/, 'cp croaks on error' );
-
- # move a file to a subdirectory
- @ARGV = ( $Testfile, 'ecmddir' );
- @orig_argv = @ARGV;
- ok( mv() );
- is_deeply( \@ARGV, \@orig_argv, 'mv preserves @ARGV' );
-
- ok( ! -e $Testfile, 'moved file away' );
- ok( -e File::Spec->join( 'ecmddir', $Testfile ), 'file in new location' );
-
- # mv should also croak with the same wacky warning
- @ARGV = ( $Testfile ) x 3;
-
- eval { mv() };
- like( $@, qr/Too many arguments/, 'mv croaks on error' );
-
- # Test expand_wildcards()
- {
- my $file = $Testfile;
- @ARGV = ();
- chdir 'ecmddir';
-
- # % means 'match one character' on VMS. Everything else is ?
- my $match_char = $^O eq 'VMS' ? '%' : '?';
- ($ARGV[0] = $file) =~ s/.\z/$match_char/;
-
- # this should find the file
- ExtUtils::Command::expand_wildcards();
-
- is_deeply( \@ARGV, [$file], 'expanded wildcard ? successfully' );
-
- # try it with the asterisk now
- ($ARGV[0] = $file) =~ s/.{3}\z/\*/;
- ExtUtils::Command::expand_wildcards();
-
- is_deeply( \@ARGV, [$file], 'expanded wildcard * successfully' );
-
- chdir File::Spec->updir;
- }
-
- # remove some files
- my @files = @ARGV = ( File::Spec->catfile( 'ecmddir', $Testfile ),
- File::Spec->catfile( 'ecmddir', 'temp2', $Testfile ) );
- rm_f();
-
- ok( ! -e $_, "removed $_ successfully" ) for (@ARGV);
-
- # rm_f dir
- @ARGV = my $dir = File::Spec->catfile( 'ecmddir' );
- rm_rf();
- ok( ! -e $dir, "removed $dir successfully" );
-}
-
-{
- { local @ARGV = 'd2utest'; mkpath; }
- open(FILE, '>d2utest/foo');
- binmode(FILE);
- print FILE "stuff\015\012and thing\015\012";
- close FILE;
-
- open(FILE, '>d2utest/bar');
- binmode(FILE);
- my $bin = "\c@\c@\c@\c@\c@\c@\cA\c@\c@\c@\015\012".
- "\@\c@\cA\c@\c@\c at 8__LIN\015\012";
- print FILE $bin;
- close FILE;
-
- local @ARGV = 'd2utest';
- ExtUtils::Command::dos2unix();
-
- open(FILE, 'd2utest/foo');
- is( join('', <FILE>), "stuff\012and thing\012", 'dos2unix' );
- close FILE;
-
- open(FILE, 'd2utest/bar');
- binmode(FILE);
- ok( -B 'd2utest/bar' );
- is( join('', <FILE>), $bin, 'dos2unix preserves binaries');
- close FILE;
-}
-
-END {
- 1 while unlink $Testfile, 'newfile';
- File::Path::rmtree( 'ecmddir' );
- File::Path::rmtree( 'd2utest' );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/fix_libs.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/fix_libs.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/fix_libs.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,36 +0,0 @@
-#!/usr/bin/perl -w
-
-# Unit test the code which fixes up $self->{LIBS}
-
-BEGIN {
- chdir 't' if -d 't';
-
- if( $ENV{PERL_CORE} ) {
- @INC = '../lib';
- }
-}
-
-use strict;
-use lib './lib';
-use Test::More 'no_plan';
-
-use ExtUtils::MakeMaker;
-
-my @tests = (
- # arg # want
- [ undef, [''] ],
- [ "foo", ['foo'] ],
- [ [], [''] ],
- [ ["foo"], ['foo'] ],
- [ [1, 2, 3], [1, 2, 3] ],
- [ [0], [0] ],
- [ [''], [''] ],
- [ " ", [' '] ],
-);
-
-for my $test (@tests) {
- my($arg, $want) = @$test;
-
- my $display = defined $arg ? $arg : "undef";
- is_deeply( MM->_fix_libs($arg), $want, "fix_libs($display)" );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/fixin.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/fixin.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/fixin.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,123 +0,0 @@
-#!/usr/bin/perl -w
-
-# Try to test fixin. I say "try" because what fixin will actually do
-# is highly variable from system to system.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ('../lib', 'lib/');
- }
- else {
- unshift @INC, 't/lib/';
- }
-}
-chdir 't';
-
-use File::Spec;
-
-use Test::More tests => 22;
-
-use Config;
-use TieOut;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-
-use ExtUtils::MakeMaker;
-
-chdir 't';
-
-perl_lib();
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-
-# [rt.cpan.org 26234]
-{
- local $/ = "foo";
- local $\ = "bar";
- MY->fixin("bin/program");
- is $/, "foo", '$/ not clobbered';
- is $\, "bar", '$\ not clobbered';
-}
-
-
-sub test_fixin {
- my($code, $test) = @_;
-
- my $file = "fixin_test";
- ok(open(my $fh, ">", $file), "write $file") or diag "Can't write $file: $!";
- print $fh $code;
- close $fh;
-
- MY->fixin($file);
-
- ok(open($fh, "<", $file), "read $file") or diag "Can't read $file: $!";
- my @lines = <$fh>;
- close $fh;
-
- $test->(@lines);
-
- 1 while unlink $file;
- ok !-e $file, "cleaned up $file";
-}
-
-
-# A simple test of fixin
-test_fixin(<<END,
-#!/foo/bar/perl -w
-
-blah blah blah
-END
- sub {
- my @lines = @_;
- unlike $lines[0], qr[/foo/bar/perl], "#! replaced";
- like $lines[0], qr[ -w\b], "switch retained";
-
- # In between might be that "not running under some shell" madness.
-
- is $lines[-1], "blah blah blah\n", "Program text retained";
- }
-);
-
-
-# [rt.cpan.org 29442]
-test_fixin(<<END,
-#!/foo/bar/perl5.8.8 -w
-
-blah blah blah
-END
-
- sub {
- my @lines = @_;
- unlike $lines[0], qr[/foo/bar/perl5.8.8], "#! replaced";
- like $lines[0], qr[ -w\b], "switch retained";
-
- # In between might be that "not running under some shell" madness.
-
- is $lines[-1], "blah blah blah\n", "Program text retained";
- }
-);
-
-
-# fixin shouldn't pick this up.
-test_fixin(<<END,
-#!/foo/bar/perly -w
-
-blah blah blah
-END
-
- sub {
- is join("", @_), <<END;
-#!/foo/bar/perly -w
-
-blah blah blah
-END
- }
-);
Deleted: vendor/perl/dist/lib/ExtUtils/t/hints.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/hints.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/hints.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,56 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ('../lib', 'lib/');
- }
- else {
- unshift @INC, 't/lib/';
- }
-}
-chdir 't';
-
-use File::Spec;
-
-use Test::More tests => 3;
-
-# Having the CWD in @INC masked a bug in finding hint files
-my $curdir = File::Spec->curdir;
- at INC = grep { $_ ne $curdir && $_ ne '.' } @INC;
-
-mkdir('hints', 0777);
-(my $os = $^O) =~ s/\./_/g;
-my $hint_file = File::Spec->catfile('hints', "$os.pl");
-
-open(HINT, ">$hint_file") || die "Can't write dummy hints file $hint_file: $!";
-print HINT <<'CLOO';
-$self->{CCFLAGS} = 'basset hounds got long ears';
-CLOO
-close HINT;
-
-use TieOut;
-use ExtUtils::MakeMaker;
-
-my $out = tie *STDERR, 'TieOut';
-my $mm = bless {}, 'ExtUtils::MakeMaker';
-$mm->check_hints;
-is( $mm->{CCFLAGS}, 'basset hounds got long ears' );
-is( $out->read, "Processing hints file $hint_file\n" );
-
-open(HINT, ">$hint_file") || die "Can't write dummy hints file $hint_file: $!";
-print HINT <<'CLOO';
-die "Argh!\n";
-CLOO
-close HINT;
-
-$mm->check_hints;
-is( $out->read, <<OUT, 'hint files produce errors' );
-Processing hints file $hint_file
-Argh!
-OUT
-
-END {
- use File::Path;
- rmtree ['hints'];
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/installed_file.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/installed_file.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/installed_file.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,51 +0,0 @@
-#!/usr/bin/perl -w
-
-# Test MM->_installed_file_for_module()
-
-BEGIN {
- chdir 't' if -d 't';
-
- if( $ENV{PERL_CORE} ) {
- @INC = '../lib';
- }
-}
-
-use strict;
-use warnings;
-
-use lib './lib';
-use ExtUtils::MakeMaker;
-use Test::More;
-use File::Spec;
-
-
-sub path_is {
- my($have, $want, $name) = @_;
-
- $have = File::Spec->canonpath($have);
- $want = File::Spec->canonpath($want);
-
- my $builder = Test::More->builder;
- return $builder->is_eq( $have, $want, $name );
-}
-
-# Test when a module is not installed
-{
- ok !MM->_installed_file_for_module("aaldkfjaldj"), "Module not installed";
- ok !MM->_installed_file_for_module("aaldkfjaldj::dlajldkj");
-}
-
-# Try a single name module
-{
- my $want = $INC{'strict.pm'};
- path_is( MM->_installed_file_for_module("strict"), $want, "single name module" );
-}
-
-# And a tuple
-{
- my $want = $INC{"Test/More.pm"};
- path_is( MM->_installed_file_for_module("Test::More"), $want, "Foo::Bar style" );
-}
-
-
-done_testing(4);
Deleted: vendor/perl/dist/lib/ExtUtils/t/is_of_type.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/is_of_type.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/is_of_type.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,40 +0,0 @@
-#!/usr/bin/perl -w
-
-# Test _is_of_type()
-
-BEGIN {
- chdir 't' if -d 't';
-
- if( $ENV{PERL_CORE} ) {
- @INC = '../lib';
- }
-}
-
-use lib './lib';
-use strict;
-use ExtUtils::MakeMaker;
-
-use Test::More "no_plan";
-
-my $is_of_type = \&ExtUtils::MakeMaker::_is_of_type;
-
-my @tests = (
- [23, "", 1],
- [[], "", 0],
- [{}, "", 0],
- [[], "HASH", 0],
- [{}, "HASH", 1],
- [bless({}, "Foo"), "Foo", 1],
- [bless({}, "Bar"), "Foo", 0],
- [bless([], "Foo"), "", 0],
- [bless([], "Foo"), "HASH", 0],
- [bless([], "Foo"), "ARRAY", 1],
-);
-
-for my $test (@tests) {
- my($thing, $type, $want) = @$test;
-
- # [rt.cpan.org 41060]
- local $SIG{__DIE__} = sub { fail("sigdie should be ignored") };
- is !!$is_of_type->($thing, $type), !!$want, qq[_is_of_type($thing, '$type'): $want];
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/make.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/make.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/make.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,24 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ('../lib', 'lib/');
- }
- else {
- unshift @INC, 't/lib/';
- }
-}
-
-use Test::More tests => 3;
-
-use ExtUtils::MakeMaker;
-
-my $MM = bless { MAKE => "nmake6" }, "MM";
-is $MM->make, 'nmake';
-
-$MM->{MAKE} = 'GNUmake';
-is $MM->make, 'gmake';
-
-$MM->{MAKE} = 'MMS';
-is $MM->make, 'mms';
Deleted: vendor/perl/dist/lib/ExtUtils/t/maketext_filter.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/maketext_filter.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/maketext_filter.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,65 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use Test::More tests => 6;
-
-use ExtUtils::MakeMaker;
-use ExtUtils::MM_VMS;
-
-sub test_filter {
- my($text, $vms_text) = @_;
-
- local $Test::Builder::Level = $Test::Builder::Level + 1;
- is( ExtUtils::MM_Any->maketext_filter($text), $text, 'default filter' );
- is( ExtUtils::MM_VMS->maketext_filter($text), $vms_text, 'VMS filter' );
-}
-
-
-# VMS filter puts a space after the target
-test_filter(<<'END', <<'VMS');
-foo: bar
- thing: splat
-END
-foo : bar
- thing: splat
-VMS
-
-
-# And it does it for all targets
-test_filter(<<'END', <<'VMS');
-foo: bar
- thing: splat
-
-up: down
- yes
-END
-foo : bar
- thing: splat
-
-up : down
- yes
-VMS
-
-
-# And it doesn't mess with macros
-test_filter(<<'END', <<'VMS');
-CLASS=Foo: Bar
-
-target: stuff
- $(PROGRAM) And::Stuff
-END
-CLASS=Foo: Bar
-
-target : stuff
- $(PROGRAM) And::Stuff
-VMS
Deleted: vendor/perl/dist/lib/ExtUtils/t/metafile_data.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/metafile_data.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/metafile_data.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,315 +0,0 @@
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 7;
-
-use Data::Dumper;
-
-require ExtUtils::MM_Any;
-
-my $new_mm = sub {
- return bless { ARGS => {@_}, @_ }, 'ExtUtils::MM_Any';
-};
-
-{
- my $mm = $new_mm->(
- DISTNAME => 'Foo-Bar',
- VERSION => 1.23,
- PM => {
- "Foo::Bar" => 'lib/Foo/Bar.pm',
- },
- );
-
- is_deeply [$mm->metafile_data], [
- name => 'Foo-Bar',
- version => 1.23,
- abstract => undef,
- author => [],
- license => 'unknown',
- distribution_type => 'module',
-
- configure_requires => {
- 'ExtUtils::MakeMaker' => 0,
- },
- build_requires => {
- 'ExtUtils::MakeMaker' => 0,
- },
-
- no_index => {
- directory => [qw(t inc)],
- },
-
- generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
- 'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
- version => 1.4
- },
- ];
-
-
- is_deeply [$mm->metafile_data({}, { no_index => { directory => [qw(foo)] } })], [
- name => 'Foo-Bar',
- version => 1.23,
- abstract => undef,
- author => [],
- license => 'unknown',
- distribution_type => 'module',
-
- configure_requires => {
- 'ExtUtils::MakeMaker' => 0,
- },
- build_requires => {
- 'ExtUtils::MakeMaker' => 0,
- },
-
- no_index => {
- directory => [qw(t inc foo)],
- },
-
- generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
- 'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
- version => 1.4
- },
- ], 'rt.cpan.org 39348';
-}
-
-
-{
- my $mm = $new_mm->(
- DISTNAME => 'Foo-Bar',
- VERSION => 1.23,
- AUTHOR => 'Some Guy',
- PREREQ_PM => {
- Foo => 2.34,
- Bar => 4.56,
- },
- );
-
- is_deeply [$mm->metafile_data(
- {
- configure_requires => {
- Stuff => 2.34
- },
- wobble => 42
- },
- {
- no_index => {
- package => "Thing"
- },
- wibble => 23
- },
- )],
- [
- name => 'Foo-Bar',
- version => 1.23,
- abstract => undef,
- author => ['Some Guy'],
- license => 'unknown',
- distribution_type => 'script',
-
- configure_requires => {
- Stuff => 2.34,
- },
- build_requires => {
- 'ExtUtils::MakeMaker' => 0,
- },
-
- requires => {
- Foo => 2.34,
- Bar => 4.56,
- },
-
- no_index => {
- directory => [qw(t inc)],
- package => 'Thing',
- },
-
- generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
- 'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
- version => 1.4
- },
-
- wibble => 23,
- wobble => 42,
- ];
-}
-
-
-# Test MIN_PERL_VERSION
-{
- my $mm = $new_mm->(
- DISTNAME => 'Foo-Bar',
- VERSION => 1.23,
- PM => {
- "Foo::Bar" => 'lib/Foo/Bar.pm',
- },
- MIN_PERL_VERSION => 5.006,
- );
-
- is_deeply [$mm->metafile_data], [
- name => 'Foo-Bar',
- version => 1.23,
- abstract => undef,
- author => [],
- license => 'unknown',
- distribution_type => 'module',
-
- configure_requires => {
- 'ExtUtils::MakeMaker' => 0,
- },
- build_requires => {
- 'ExtUtils::MakeMaker' => 0,
- },
-
- requires => {
- perl => '5.006',
- },
-
- no_index => {
- directory => [qw(t inc)],
- },
-
- generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
- 'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
- version => 1.4
- },
- ];
-}
-
-
-# Test MIN_PERL_VERSION
-{
- my $mm = $new_mm->(
- DISTNAME => 'Foo-Bar',
- VERSION => 1.23,
- PM => {
- "Foo::Bar" => 'lib/Foo/Bar.pm',
- },
- MIN_PERL_VERSION => 5.006,
- PREREQ_PM => {
- 'Foo::Bar' => 1.23,
- },
- );
-
- is_deeply [$mm->metafile_data], [
- name => 'Foo-Bar',
- version => 1.23,
- abstract => undef,
- author => [],
- license => 'unknown',
- distribution_type => 'module',
-
- configure_requires => {
- 'ExtUtils::MakeMaker' => 0,
- },
- build_requires => {
- 'ExtUtils::MakeMaker' => 0,
- },
-
- requires => {
- perl => '5.006',
- 'Foo::Bar' => 1.23,
- },
-
- no_index => {
- directory => [qw(t inc)],
- },
-
- generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
- 'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
- version => 1.4
- },
- ];
-}
-
-# Test CONFIGURE_REQUIRES
-{
- my $mm = $new_mm->(
- DISTNAME => 'Foo-Bar',
- VERSION => 1.23,
- CONFIGURE_REQUIRES => {
- "Fake::Module1" => 1.01,
- },
- PM => {
- "Foo::Bar" => 'lib/Foo/Bar.pm',
- },
- );
-
- is_deeply [$mm->metafile_data], [
- name => 'Foo-Bar',
- version => 1.23,
- abstract => undef,
- author => [],
- license => 'unknown',
- distribution_type => 'module',
-
- configure_requires => {
- 'Fake::Module1' => 1.01,
- },
- build_requires => {
- 'ExtUtils::MakeMaker' => 0,
- },
-
- no_index => {
- directory => [qw(t inc)],
- },
-
- generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
- 'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
- version => 1.4
- },
- ],'CONFIGURE_REQUIRES';
-}
-
-# Test BUILD_REQUIRES
-{
- my $mm = $new_mm->(
- DISTNAME => 'Foo-Bar',
- VERSION => 1.23,
- BUILD_REQUIRES => {
- "Fake::Module1" => 1.01,
- },
- PM => {
- "Foo::Bar" => 'lib/Foo/Bar.pm',
- },
- );
-
- is_deeply [$mm->metafile_data], [
- name => 'Foo-Bar',
- version => 1.23,
- abstract => undef,
- author => [],
- license => 'unknown',
- distribution_type => 'module',
-
- configure_requires => {
- 'ExtUtils::MakeMaker' => 0,
- },
- build_requires => {
- 'Fake::Module1' => 1.01,
- },
-
- no_index => {
- directory => [qw(t inc)],
- },
-
- generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION",
- 'meta-spec' => {
- url => 'http://module-build.sourceforge.net/META-spec-v1.4.html',
- version => 1.4
- },
- ],'CONFIGURE_REQUIRES';
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/metafile_file.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/metafile_file.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/metafile_file.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,314 +0,0 @@
-#!/usr/bin/perl -w
-
-# This is a test of the fake YAML dumper implemented by EUMM:
-# ExtUtils::MM_Any::metafile_file
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 16;
-
-require ExtUtils::MM_Any;
-
-my $mm = bless {}, 'ExtUtils::MM_Any';
-
-{
- my @meta = ( a => 1, b => 2 );
- my $expected = <<YAML;
---- #YAML:1.0
-a: 1
-b: 2
-YAML
-
- is($mm->metafile_file(@meta), $expected, "dump for flat hashes works ok");
-}
-
-{
- my @meta = ( k1 => 'some key and value', k2 => undef, k3 => 1 );
- my $expected = <<YAML;
---- #YAML:1.0
-k1: some key and value
-k2: ~
-k3: 1
-YAML
-
- is($mm->metafile_file(@meta), $expected, "dumping strings and undefs is ok");
-}
-
-{
- my @meta = ( a => 1, b => 2, h => { hh => 1 } );
- my $expected = <<YAML;
---- #YAML:1.0
-a: 1
-b: 2
-h:
- hh: 1
-YAML
-
- is($mm->metafile_file(@meta), $expected, "dump for nested hashes works ok");
-}
-
-{
- my @meta = ( a => 1, b => 2, h => { h1 => 'x', h2 => 'z' } );
- my $expected = <<YAML;
---- #YAML:1.0
-a: 1
-b: 2
-h:
- h1: x
- h2: z
-YAML
-
- is($mm->metafile_file(@meta), $expected, "nested hashes sort ascii-betically");
- # to tell the truth, they sort case-insensitively
- # that's hard to test for Perl with unstable sort's
-}
-
-{
- my @meta = ( a => 1, b => 2, h => { hh => { hhh => 1 } } );
- my $expected = <<YAML;
---- #YAML:1.0
-a: 1
-b: 2
-h:
- hh:
- hhh: 1
-YAML
-
- is($mm->metafile_file(@meta), $expected, "dump for hashes (with more nesting) works ok");
-}
-
-{
- my @meta = ( a => 1, k => [ qw(w y z) ] );
- my $expected = <<YAML;
---- #YAML:1.0
-a: 1
-k:
- - w
- - y
- - z
-YAML
-
- is($mm->metafile_file(@meta), $expected, "array of strings are handled ok");
-}
-
-is($mm->metafile_file( a => {}, b => [], c => undef ), <<'YAML', 'empty hashes and arrays');
---- #YAML:1.0
-a: {}
-b: []
-c: ~
-YAML
-
-
-{
- my @meta = (
- name => 'My-Module',
- version => '0.1',
- version_from => 'lib/My/Module.pm',
- installdirs => 'site',
- abstract => 'A does-it-all module',
- license => 'perl',
- generated_by => 'myself',
- author => 'John Doe <doe at doeland.org>',
- distribution_type => 'module',
- requires => {
- 'My::Module::Helper' => 0,
- 'Your::Module' => '1.5',
- },
- 'meta-spec' => {
- version => '1.1',
- url => 'http://module-build.sourceforge.net/META-spec-new.html',
- },
- );
- my $expected = <<'YAML';
---- #YAML:1.0
-name: My-Module
-version: 0.1
-version_from: lib/My/Module.pm
-installdirs: site
-abstract: A does-it-all module
-license: perl
-generated_by: myself
-author: John Doe <doe at doeland.org>
-distribution_type: module
-requires:
- My::Module::Helper: 0
- Your::Module: 1.5
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-new.html
- version: 1.1
-YAML
-
- is($mm->metafile_file(@meta), $expected, "dump for something like META.yml works");
-}
-
-{
- my @meta = (
- name => 'My-Module',
- version => '0.1',
- version_from => 'lib/My/Module.pm',
- installdirs => 'site',
- abstract => 'A does-it-all module',
- license => 'perl',
- generated_by => 'myself',
- author => 'John Doe <doe at doeland.org>',
- distribution_type => 'module',
- requires => {
- 'My::Module::Helper' => 0,
- 'Your::Module' => '1.5',
- },
- recommends => {
- 'Test::More' => 0,
- 'Test::Pod' => 1.18,
- 'Test::Pod::Coverage' => 1
- },
- 'meta-spec' => {
- version => '1.1',
- url => 'http://module-build.sourceforge.net/META-spec-new.html',
- },
- );
- my $expected = <<'YAML';
---- #YAML:1.0
-name: My-Module
-version: 0.1
-version_from: lib/My/Module.pm
-installdirs: site
-abstract: A does-it-all module
-license: perl
-generated_by: myself
-author: John Doe <doe at doeland.org>
-distribution_type: module
-requires:
- My::Module::Helper: 0
- Your::Module: 1.5
-recommends:
- Test::More: 0
- Test::Pod: 1.18
- Test::Pod::Coverage: 1
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-new.html
- version: 1.1
-YAML
-
- is($mm->metafile_file(@meta), $expected, "META.yml with extra 'recommends' works");
-}
-
-{
- my @meta = (
- name => 'My-Module',
- version => '0.1',
- version_from => 'lib/My/Module.pm',
- installdirs => 'site',
- abstract => 'A does-it-all module',
- license => 'perl',
- generated_by => 'myself',
- author => 'John Doe <doe at doeland.org>',
- distribution_type => 'module',
- requires => {
- 'My::Module::Helper' => 0,
- 'Your::Module' => '1.5',
- },
- recommends => {
- 'Test::More' => 0,
- 'Test::Pod' => 1.18,
- 'Test::Pod::Coverage' => 1
- },
- no_index => {
- dir => [ qw(inc) ],
- file => [ qw(TODO NOTES) ],
- },
- 'meta-spec' => {
- version => '1.1',
- url => 'http://module-build.sourceforge.net/META-spec-new.html',
- },
- );
- my $expected = <<'YAML';
---- #YAML:1.0
-name: My-Module
-version: 0.1
-version_from: lib/My/Module.pm
-installdirs: site
-abstract: A does-it-all module
-license: perl
-generated_by: myself
-author: John Doe <doe at doeland.org>
-distribution_type: module
-requires:
- My::Module::Helper: 0
- Your::Module: 1.5
-recommends:
- Test::More: 0
- Test::Pod: 1.18
- Test::Pod::Coverage: 1
-no_index:
- dir:
- - inc
- file:
- - TODO
- - NOTES
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-new.html
- version: 1.1
-YAML
-
- is($mm->metafile_file(@meta), $expected, "META.yml with extra 'no_index' works");
-
-
- # Make sure YAML.pm can ready our output
- SKIP: {
- skip "Need YAML.pm to test if it can load META.yml", 1
- unless eval { require YAML };
-
- my $yaml_load = YAML::Load($mm->metafile_file(@meta));
- is_deeply( $yaml_load, {@meta}, "META.yml can be read by YAML.pm" );
- }
-
-
- SKIP: {
- skip "Need YAML::Tiny to test if it can load META.yml", 2
- unless eval { require YAML::Tiny };
-
- my @yaml_load = YAML::Tiny::Load($mm->metafile_file(@meta));
- is @yaml_load, 1, "YAML::Tiny saw one document in META.yml";
- is_deeply( $yaml_load[0], {@meta}, "META.yml can be read by YAML::Tiny" );
- }
-}
-
-
-{
- my @meta = ( k => 'a : b', 'x : y' => 1 );
- my $expected = <<YAML;
---- #YAML:1.0
-k: a : b
-x : y: 1
-YAML
- # NOTE: the output is not YAML-equivalent to the input
-
- is($mm->metafile_file(@meta), $expected, "no quoting is done");
-}
-
-{
- my @meta = ( k => \*STDOUT );
- eval { $mm->metafile_file(@meta) };
-
- like($@, qr/^only nested hashes, arrays and objects are supported/,
- "we don't like but hash/array refs");
-}
-
-{
- my @meta = ( k => [ [] ] );
- eval { $mm->metafile_file(@meta) };
-
- like($@, qr/^only nested arrays of non-refs are supported/,
- "we also don't like but array of strings");
-}
-
-# recursive data structures: don't even think about it - endless recursion
Deleted: vendor/perl/dist/lib/ExtUtils/t/min_perl_version.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/min_perl_version.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/min_perl_version.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,201 +0,0 @@
-#!/usr/bin/perl -w
-
-# This is a test checking various aspects of the optional argument
-# MIN_PERL_VERSION to WriteMakefile.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 33;
-
-use TieOut;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::MPV;
-use File::Path;
-
-use ExtUtils::MakeMaker;
-
-# avoid environment variables interfering with our make runs
-delete @ENV{qw(LIB MAKEFLAGS)};
-
-my $perl = which_perl();
-my $make = make_run();
-my $makefile = makefile_name();
-
-chdir 't';
-
-perl_lib();
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir(File::Spec->updir), 'leaving dir' );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir 'Min-PerlVers', 'entering dir Min-PerlVers' ) ||
- diag("chdir failed: $!");
-
-{
- # ----- argument verification -----
-
- my $stdout = tie *STDOUT, 'TieOut';
- ok( $stdout, 'capturing stdout' );
- my $warnings = '';
- local $SIG{__WARN__} = sub {
- $warnings .= join '', @_;
- };
-
- eval {
- WriteMakefile(
- NAME => 'Min::PerlVers',
- MIN_PERL_VERSION => '5',
- );
- };
- is( $warnings, '', 'MIN_PERL_VERSION=5 does not trigger a warning' );
- is( $@, '', ' nor a hard failure' );
-
-
- $warnings = '';
- eval {
- WriteMakefile(
- NAME => 'Min::PerlVers',
- MIN_PERL_VERSION => '5.4.4',
- );
- };
- is( $warnings, '', 'MIN_PERL_VERSION=X.Y.Z does not trigger a warning' );
- is( $@, '', ' nor a hard failure' );
-
-
- $warnings = '';
- eval {
- WriteMakefile(
- NAME => 'Min::PerlVers',
- MIN_PERL_VERSION => '999999',
- );
- };
- ok( '' ne $warnings, 'MIN_PERL_VERSION=999999 triggers a warning' );
- is( $warnings,
- "Warning: Perl version 999999 or higher required. We run $].\n",
- ' with expected message text' );
- is( $@, '', ' and without a hard failure' );
-
- $warnings = '';
- eval {
- WriteMakefile(
- NAME => 'Min::PerlVers',
- MIN_PERL_VERSION => '999999',
- PREREQ_FATAL => 1,
- );
- };
- is( $warnings, '', 'MIN_PERL_VERSION=999999 and PREREQ_FATAL: no warning' );
- is( $@, <<"END", ' correct exception' );
-MakeMaker FATAL: perl version too low for this distribution.
-Required is 999999. We run $].
-END
-
- $warnings = '';
- eval {
- WriteMakefile(
- NAME => 'Min::PerlVers',
- MIN_PERL_VERSION => 'foobar',
- );
- };
- ok( '' ne $warnings, 'MIN_PERL_VERSION=foobar triggers a warning' );
- is( $warnings, <<'END', ' with expected message text' );
-Warning: MIN_PERL_VERSION is not in a recognized format.
-Recommended is a quoted numerical value like '5.005' or '5.008001'.
-END
-
- is( $@, '', ' and without a hard failure' );
-}
-
-
-# ----- PREREQ_PRINT output -----
-{
- my $prereq_out = run(qq{$perl Makefile.PL "PREREQ_PRINT=1"});
- is( $?, 0, 'PREREQ_PRINT exiting normally' );
- my $prereq_out_sane = $prereq_out =~ /^\s*\$PREREQ_PM\s*=/;
- ok( $prereq_out_sane, ' and talking like we expect' ) ||
- diag($prereq_out);
-
- SKIP: {
- skip 'not going to evaluate rubbish', 3 if !$prereq_out_sane;
-
- package _Prereq::Print::WithMPV; ## no critic
- our($PREREQ_PM, $BUILD_REQUIRES, $MIN_PERL_VERSION, $ERR);
- $ERR = '';
- eval {
- eval $prereq_out; ## no critic
- $ERR = $@;
- };
- ::is( $@ . $ERR, '', 'prereqs evaluable' );
- ::is_deeply( $PREREQ_PM, { strict => 0 }, ' and looking correct' );
- ::is( $MIN_PERL_VERSION, '5.005', 'min version also correct' );
- }
-}
-
-
-# ----- PRINT_PREREQ output -----
-{
- my $prereq_out = run(qq{$perl Makefile.PL "PRINT_PREREQ=1"});
- is( $?, 0, 'PRINT_PREREQ exiting normally' );
- ok( $prereq_out !~ /^warning/i, ' and not complaining loudly' );
- like( $prereq_out,
- qr/^perl\(perl\) \s* >= 5\.005 \s+ perl\(strict\) \s* >= \s* 0 \s*$/x,
- 'dump has prereqs and perl version' );
-}
-
-
-# ----- generated files verification -----
-{
- unlink $makefile;
- my @mpl_out = run(qq{$perl Makefile.PL});
- END { unlink $makefile, makefile_backup() }
-
- cmp_ok( $?, '==', 0, 'Makefile.PL exiting normally' ) || diag(@mpl_out);
- ok( -e $makefile, 'Makefile present' );
-}
-
-
-# ----- ppd output -----
-{
- my $ppd_file = 'Min-PerlVers.ppd';
- my @make_out = run(qq{$make ppd});
- END { unlink $ppd_file }
-
- cmp_ok( $?, '==', 0, 'Make ppd exiting normally' ) || diag(@make_out);
-
- my $ppd_html = slurp($ppd_file);
- ok( defined($ppd_html), ' .ppd file present' );
-
- like( $ppd_html, qr{^\s*<PERLCORE VERSION="5,005,0,0" />}m,
- ' .ppd file content good' );
-}
-
-
-# ----- META.yml output -----
-{
- my $distdir = 'Min-PerlVers-0.05';
- $distdir =~ s{\.}{_}g if $Is_VMS;
-
- my $meta_yml = "$distdir/META.yml";
- my @make_out = run(qq{$make metafile});
- END { rmtree $distdir }
-
- cmp_ok( $?, '==', 0, 'Make metafile exiting normally' ) || diag(@make_out);
- my $meta = slurp($meta_yml);
- ok( defined($meta), ' META.yml present' );
-
- like( $meta, qr{\nrequires:[^\S\n]*\n\s+perl:\s+5\.005\n\s+strict:\s+0\n},
- ' META.yml content good');
-}
-
-__END__
Deleted: vendor/perl/dist/lib/ExtUtils/t/miniperl.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/miniperl.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/miniperl.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,57 +0,0 @@
-#!/usr/bin/perl -w
-
-# Test that we can build modules as miniperl.
-# This mostly means no XS modules.
-
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't' if -d 't';
- @INC = qw(../lib lib);
- }
-}
-
-use strict;
-use lib 't/lib';
-
-use Test::More 'no_plan';
-
-BEGIN {
- ok !$INC{"ExtUtils/MakeMaker.pm"}, "MakeMaker is not yet loaded";
-}
-
-# Disable all XS from here on
-use MakeMaker::Test::NoXS;
-
-use ExtUtils::MakeMaker;
-
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-
-
-my $perl = which_perl();
-my $makefile = makefile_name();
-my $make = make_run();
-
-
-# Setup our test environment
-{
- chdir 't';
-
- perl_lib;
-
- ok( setup_recurs(), 'setup' );
- END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
- }
-
- ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-}
-
-
-# Run make once
-{
- run_ok(qq{$perl Makefile.PL});
- run_ok($make);
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/oneliner.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/oneliner.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/oneliner.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,51 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-chdir 't';
-
-use MakeMaker::Test::Utils;
-use Test::More tests => 6;
-use File::Spec;
-
-my $TB = Test::More->builder;
-
-BEGIN { use_ok('ExtUtils::MM') }
-
-my $mm = bless { NAME => "Foo" }, 'MM';
-isa_ok($mm, 'ExtUtils::MakeMaker');
-isa_ok($mm, 'ExtUtils::MM_Any');
-
-
-sub try_oneliner {
- my($code, $switches, $expect, $name) = @_;
- my $cmd = $mm->oneliner($code, $switches);
- $cmd =~ s{\$\(ABSPERLRUN\)}{$^X};
-
- # VMS likes to put newlines at the end of commands if there isn't
- # one already.
- $expect =~ s/([^\n])\z/$1\n/ if $^O eq 'VMS';
-
- $TB->is_eq(scalar `$cmd`, $expect, $name) || $TB->diag("oneliner:\n$cmd");
-}
-
-# Lets see how it deals with quotes.
-try_oneliner(q{print "foo'o", ' bar"ar'}, [], q{foo'o bar"ar}, 'quotes');
-
-# How about dollar signs?
-try_oneliner(q{$PATH = 'foo'; print $PATH},[], q{foo}, 'dollar signs' );
-
-# switches?
-try_oneliner(q{print 'foo'}, ['-l'], "foo\n", 'switches' );
-
-# XXX gotta rethink the newline test. The Makefile does newline
-# escaping, then the shell.
-
Deleted: vendor/perl/dist/lib/ExtUtils/t/parse_version.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/parse_version.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/parse_version.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,85 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = '../lib';
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use Test::More;
-use ExtUtils::MakeMaker;
-
-my $Has_Version = eval 'require version; "version"->import; 1';
-
-my %versions = (q[$VERSION = '1.00'] => '1.00',
- q[*VERSION = \'1.01'] => '1.01',
- q[($VERSION) = q$Revision: 1.1.1.2 $ =~ /(\d+)/g;] => 32208,
- q[$FOO::VERSION = '1.10';] => '1.10',
- q[*FOO::VERSION = \'1.11';] => '1.11',
- '$VERSION = 0.02' => 0.02,
- '$VERSION = 0.0' => 0.0,
- '$VERSION = -1.0' => -1.0,
- '$VERSION = undef' => 'undef',
- '$wibble = 1.0' => 'undef',
- q[my $VERSION = '1.01'] => 'undef',
- q[local $VERISON = '1.02'] => 'undef',
- q[local $FOO::VERSION = '1.30'] => 'undef',
- q[if( $Foo::VERSION >= 3.00 ) {]=> 'undef',
- q[our $VERSION = '1.23';] => '1.23',
-
- '$Something::VERSION == 1.0' => 'undef',
- '$Something::VERSION <= 1.0' => 'undef',
- '$Something::VERSION >= 1.0' => 'undef',
- '$Something::VERSION != 1.0' => 'undef',
-
- qq[\$Something::VERSION == 1.0\n\$VERSION = 2.3\n] => '2.3',
- qq[\$Something::VERSION == 1.0\n\$VERSION = 2.3\n\$VERSION = 4.5\n] => '2.3',
-
- '$VERSION = sprintf("%d.%03d", q$Revision: 1.1.1.2 $ =~ /(\d+)\.(\d+)/);' => '3.074',
- '$VERSION = substr(q$Revision: 1.1.1.2 $, 10) + 2 . "";' => '4.8',
- );
-
-if( $Has_Version ) {
- $versions{q[use version; $VERSION = qv("1.2.3");]} = qv("1.2.3");
- $versions{q[$VERSION = qv("1.2.3")]} = qv("1.2.3");
-}
-
-plan tests => (2 * keys %versions) + 4;
-
-while( my($code, $expect) = each %versions ) {
- is( parse_version_string($code), $expect, $code );
-}
-
-
-sub parse_version_string {
- my $code = shift;
-
- open(FILE, ">VERSION.tmp") || die $!;
- print FILE "$code\n";
- close FILE;
-
- $_ = 'foo';
- my $version = MM->parse_version('VERSION.tmp');
- is( $_, 'foo', '$_ not leaked by parse_version' );
-
- unlink "VERSION.tmp";
-
- return $version;
-}
-
-
-# This is a specific test to see if a version subroutine in the $VERSION
-# declaration confuses later calls to the version class.
-# [rt.cpan.org 30747]
-SKIP: {
- skip "need version.pm", 4 unless $Has_Version;
- is parse_version_string(q[ $VERSION = '1.00'; sub version { $VERSION } ]),
- '1.00';
- is parse_version_string(q[ use version; $VERSION = version->new("1.2.3") ]),
- qv("1.2.3");
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/pm.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/pm.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/pm.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,47 +0,0 @@
-#!/usr/bin/perl -w
-
-# Test that MakeMaker honors user's PM override.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 6;
-
-use TieOut;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-
-use ExtUtils::MakeMaker;
-
-chdir 't';
-
-perl_lib();
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-
-ok( my $stdout = tie *STDOUT, 'TieOut' );
-
-{
- my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- PM => { 'wibble' => 'woof' }
- );
-
- is_deeply( $mm->{PM}, { wibble => 'woof' } );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/pm_to_blib.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/pm_to_blib.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/pm_to_blib.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,77 +0,0 @@
-#!/usr/bin/perl -w
-
-# Ensure pm_to_blib runs at the right times.
-
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't' if -d 't';
- @INC = qw(../lib lib);
- }
-}
-
-use strict;
-use lib 't/lib';
-
-use Test::More 'no_plan';
-
-use ExtUtils::MakeMaker;
-
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-
-
-my $perl = which_perl();
-my $makefile = makefile_name();
-my $make = make_run();
-
-
-# Setup our test environment
-{
- chdir 't';
-
- perl_lib;
-
- ok( setup_recurs(), 'setup' );
- END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
- }
-
- ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-}
-
-
-# Run make once
-{
- run_ok(qq{$perl Makefile.PL});
- run_ok($make);
-
- ok( -e "blib/lib/Big/Dummy.pm", "blib copied pm file" );
-}
-
-
-# Change a pm file, it should be copied.
-{
- # Wait a couple seconds else our changed file will have the same timestamp
- # as the blib file
- sleep 2;
-
- ok( open my $fh, ">>", "lib/Big/Dummy.pm" ) or die $!;
- print $fh "Something else\n";
- close $fh;
-
- run_ok($make);
- like slurp("blib/lib/Big/Dummy.pm"), qr/Something else\n$/;
-}
-
-
-# Rerun the Makefile.PL, pm_to_blib should rerun
-{
- run_ok(qq{$perl Makefile.PL});
-
- # XXX This is a fragile way to check that it reran.
- like run_ok($make), qr/^Skip /ms;
-
- ok( -e "blib/lib/Big/Dummy.pm", "blib copied pm file" );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/pod2man.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/pod2man.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/pod2man.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,54 +0,0 @@
-#!/usr/bin/perl -w
-
-# Test our simulation of pod2man
-
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't' if -d 't';
- @INC = qw(../lib lib);
- }
-}
-
-use strict;
-use lib 't/lib';
-
-use ExtUtils::Command::MM;
-
-use Test::More tests => 3;
-
-# The argument to perm_rw was optional.
-# [rt.cpan.org 35190]
-{
- my $warnings;
- local $SIG{__WARN__} = sub {
- $warnings .= join '', @_;
- };
-
- pod2man("--perm_rw");
-
- like $warnings, qr/^Option perm_rw requires an argument/;
-};
-
-
-# Simulate the failure of Pod::Man loading.
-# pod2man() should react gracefully.
-{
- local @INC = @INC;
- unshift @INC, sub {
- die "Simulated Pod::Man failure\n" if $_[1] eq 'Pod/Man.pm';
- };
- local %INC = %INC;
- delete $INC{"Pod/Man.pm"};
-
- my $warnings;
- local $SIG{__WARN__} = sub {
- $warnings .= join '', @_;
- };
-
- is pod2man(), undef;
- is $warnings, <<'END'
-Pod::Man is not available: Simulated Pod::Man failure
-Man pages will not be generated during this install.
-END
-
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/postamble.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/postamble.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/postamble.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,73 +0,0 @@
-#!/usr/bin/perl -w
-
-# Wherein we ensure that postamble works ok.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 8;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-use ExtUtils::MakeMaker;
-use TieOut;
-
-chdir 't';
-perl_lib;
-$| = 1;
-
-my $Makefile = makefile_name;
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir 'Big-Dummy', q{chdir'd to Big-Dummy} ) ||
- diag("chdir failed: $!");
-
-{
- my $warnings = '';
- local $SIG{__WARN__} = sub {
- $warnings = join '', @_;
- };
-
- my $stdout = tie *STDOUT, 'TieOut' or die;
- my $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- postamble => {
- FOO => 1,
- BAR => "fugawazads"
- }
- );
- is( $warnings, '', 'postamble argument not warned about' );
-}
-
-sub MY::postamble {
- my($self, %extra) = @_;
-
- is_deeply( \%extra, { FOO => 1, BAR => 'fugawazads' },
- 'postamble args passed' );
-
- return <<OUT;
-# This makes sure the postamble gets written
-OUT
-
-}
-
-
-ok( open(MAKEFILE, $Makefile) ) or diag "Can't open $Makefile: $!";
-{ local $/;
- like( <MAKEFILE>, qr/^\# This makes sure the postamble gets written\n/m,
- 'postamble added to the Makefile' );
-}
-close MAKEFILE;
Deleted: vendor/perl/dist/lib/ExtUtils/t/prefixify.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/prefixify.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/prefixify.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,52 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More;
-
-if( $^O eq 'VMS' ) {
- plan skip_all => 'prefixify works differently on VMS';
-}
-else {
- plan tests => 4;
-}
-use ExtUtils::MakeMaker::Config;
-use File::Spec;
-use ExtUtils::MM;
-
-my $Is_Dosish = $^O =~ /^(dos|MSWin32)$/;
-
-my $mm = bless {}, 'MM';
-
-my $default = File::Spec->catdir(qw(this that));
-
-$mm->prefixify('installbin', 'wibble', 'something', $default);
-is( $mm->{INSTALLBIN}, $Config{installbin},
- 'prefixify w/defaults');
-
-$mm->{ARGS}{PREFIX} = 'foo';
-$mm->prefixify('installbin', 'wibble', 'something', $default);
-is( $mm->{INSTALLBIN}, File::Spec->catdir('something', $default),
- 'prefixify w/defaults and PREFIX');
-
-$mm->prefixify('installbin', '../wibble', 'something', $default);
-is( $mm->{INSTALLBIN}, File::Spec->catdir('something', $default),
- 'relative paths + PREFIX');
-
-SKIP: {
- skip "Test for DOSish prefixification", 1 unless $Is_Dosish;
-
- $Config{wibble} = 'C:\opt\perl\wibble';
- $mm->prefixify('wibble', 'C:\opt\perl', 'C:\yarrow');
-
- is( $mm->{WIBBLE}, 'C:\yarrow\wibble', 'prefixify Win32 paths' );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/prereq.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/prereq.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/prereq.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,133 +0,0 @@
-#!/usr/bin/perl -w
-
-# This is a test of the verification of the arguments to
-# WriteMakefile.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 13;
-
-use TieOut;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-
-use ExtUtils::MakeMaker;
-
-chdir 't';
-
-perl_lib();
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-
-{
- ok( my $stdout = tie *STDOUT, 'TieOut' );
- my $warnings = '';
- local $SIG{__WARN__} = sub {
- $warnings .= join '', @_;
- };
-
- WriteMakefile(
- NAME => 'Big::Dummy',
- PREREQ_PM => {
- strict => 0
- }
- );
- is $warnings, '';
-
- $warnings = '';
- WriteMakefile(
- NAME => 'Big::Dummy',
- PREREQ_PM => {
- strict => 99999
- }
- );
- is $warnings,
- sprintf("Warning: prerequisite strict 99999 not found. We have %s.\n",
- $strict::VERSION);
-
- $warnings = '';
- WriteMakefile(
- NAME => 'Big::Dummy',
- PREREQ_PM => {
- "I::Do::Not::Exist" => 0,
- }
- );
- is $warnings,
- "Warning: prerequisite I::Do::Not::Exist 0 not found.\n";
-
- $warnings = '';
- WriteMakefile(
- NAME => 'Big::Dummy',
- PREREQ_PM => {
- "I::Do::Not::Exist" => 0,
- "strict" => 99999,
- }
- );
- is $warnings,
- "Warning: prerequisite I::Do::Not::Exist 0 not found.\n".
- sprintf("Warning: prerequisite strict 99999 not found. We have %s.\n",
- $strict::VERSION);
-
- $warnings = '';
- eval {
- WriteMakefile(
- NAME => 'Big::Dummy',
- PREREQ_PM => {
- "I::Do::Not::Exist" => 0,
- "Nor::Do::I" => 0,
- "strict" => 99999,
- },
- PREREQ_FATAL => 1,
- );
- };
-
- is $warnings, '';
- is $@, <<'END', "PREREQ_FATAL";
-MakeMaker FATAL: prerequisites not found.
- I::Do::Not::Exist not installed
- Nor::Do::I not installed
- strict 99999
-
-Please install these modules first and rerun 'perl Makefile.PL'.
-END
-
-
- $warnings = '';
- eval {
- WriteMakefile(
- NAME => 'Big::Dummy',
- PREREQ_PM => {
- "I::Do::Not::Exist" => 0,
- },
- CONFIGURE => sub {
- require I::Do::Not::Exist;
- },
- PREREQ_FATAL => 1,
- );
- };
-
- is $warnings, '';
- is $@, <<'END', "PREREQ_FATAL happens before CONFIGURE";
-MakeMaker FATAL: prerequisites not found.
- I::Do::Not::Exist not installed
-
-Please install these modules first and rerun 'perl Makefile.PL'.
-END
-
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/prereq_print.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/prereq_print.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/prereq_print.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,81 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Config;
-
-use Test::More;
-
-unless( eval { require Data::Dumper } ) {
- plan skip_all => 'Data::Dumper not available';
-}
-
-plan tests => 11;
-
-
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-
-# 'make disttest' sets a bunch of environment variables which interfere
-# with our testing.
-delete @ENV{qw(PREFIX LIB MAKEFLAGS)};
-
-my $Perl = which_perl();
-my $Makefile = makefile_name();
-my $Is_VMS = $^O eq 'VMS';
-
-chdir 't';
-perl_lib;
-
-$| = 1;
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-
-unlink $Makefile;
-my $prereq_out = run(qq{$Perl Makefile.PL "PREREQ_PRINT=1"});
-ok( !-r $Makefile, "PREREQ_PRINT produces no $Makefile" );
-is( $?, 0, ' exited normally' );
-{
- package _Prereq::Print;
- no strict;
- $PREREQ_PM = undef; # shut up "used only once" warning.
- eval $prereq_out;
- ::is_deeply( $PREREQ_PM, { strict => 0 }, 'prereqs dumped' );
- ::is( $@, '', ' without error' );
-}
-
-
-$prereq_out = run(qq{$Perl Makefile.PL "PRINT_PREREQ=1"});
-ok( !-r $Makefile, "PRINT_PREREQ produces no $Makefile" );
-is( $?, 0, ' exited normally' );
-::like( $prereq_out, qr/^perl\(strict\) \s* >= \s* 0 \s*$/x,
- 'prereqs dumped' );
-
-
-# Currently a bug.
-#my $prereq_out = run(qq{$Perl Makefile.PL "PREREQ_PRINT=0"});
-#ok( -r $Makefile, "PREREQ_PRINT=0 produces a $Makefile" );
-#is( $?, 0, ' exited normally' );
-#unlink $Makefile;
-
-# Currently a bug.
-#my $prereq_out = run(qq{$Perl Makefile.PL "PRINT_PREREQ=1"});
-#ok( -r $Makefile, "PRINT_PREREQ=0 produces a $Makefile" );
-#is( $?, 0, ' exited normally' );
-#unlink $Makefile;
Deleted: vendor/perl/dist/lib/ExtUtils/t/problems.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/problems.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/problems.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,47 +0,0 @@
-# Test problems in Makefile.PL's and hint files.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-chdir 't';
-
-use strict;
-use Test::More tests => 6;
-use ExtUtils::MM;
-use MakeMaker::Test::Setup::Problem;
-use TieOut;
-
-my $MM = bless { DIR => ['subdir'] }, 'MM';
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir 'Problem-Module', "chdir'd to Problem-Module" ) ||
- diag("chdir failed: $!");
-
-
-# Make sure when Makefile.PL's break, they issue a warning.
-# Also make sure Makefile.PL's in subdirs still have '.' in @INC.
-{
- my $stdout = tie *STDOUT, 'TieOut' or die;
-
- my $warning = '';
- local $SIG{__WARN__} = sub { $warning = join '', @_ };
- eval { $MM->eval_in_subdirs; };
-
- is( $stdout->read, qq{\@INC has .\n}, 'cwd in @INC' );
- like( $@,
- qr{^ERROR from evaluation of .*subdir.*Makefile.PL: YYYAaaaakkk},
- 'Makefile.PL death in subdir warns' );
-
- untie *STDOUT;
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/prompt.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/prompt.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/prompt.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,56 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 11;
-use ExtUtils::MakeMaker;
-use TieOut;
-use TieIn;
-
-eval q{
- prompt();
-};
-like( $@, qr/^Not enough arguments for ExtUtils::MakeMaker::prompt/,
- 'no args' );
-
-eval {
- prompt(undef);
-};
-like( $@, qr/^prompt function called without an argument/,
- 'undef message' );
-
-my $stdout = tie *STDOUT, 'TieOut' or die;
-
-
-$ENV{PERL_MM_USE_DEFAULT} = 1;
-is( prompt("Foo?"), '', 'no default' );
-like( $stdout->read, qr/^Foo\?\s*\n$/, ' question' );
-
-is( prompt("Foo?", undef), '', 'undef default' );
-like( $stdout->read, qr/^Foo\?\s*\n$/, ' question' );
-
-is( prompt("Foo?", 'Bar!'), 'Bar!', 'default' );
-like( $stdout->read, qr/^Foo\? \[Bar!\]\s+Bar!\n$/, ' question' );
-
-
-SKIP: {
- skip "eof() doesn't honor ties in 5.5.3", 3 if $] < 5.006;
-
- $ENV{PERL_MM_USE_DEFAULT} = 0;
- close STDIN;
- my $stdin = tie *STDIN, 'TieIn' or die;
- $stdin->write("From STDIN");
- ok( !-t STDIN, 'STDIN not a tty' );
-
- is( prompt("Foo?", 'Bar!'), 'From STDIN', 'from STDIN' );
- like( $stdout->read, qr/^Foo\? \[Bar!\]\s*$/, ' question' );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/recurs.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/recurs.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/recurs.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,122 +0,0 @@
-#!/usr/bin/perl -w
-
-# This tests MakeMaker against recursive builds
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Config;
-
-use Test::More tests => 26;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::Recurs;
-
-# 'make disttest' sets a bunch of environment variables which interfere
-# with our testing.
-delete @ENV{qw(PREFIX LIB MAKEFLAGS)};
-
-my $perl = which_perl();
-my $Is_VMS = $^O eq 'VMS';
-
-chdir('t');
-
-perl_lib;
-
-my $Touch_Time = calibrate_mtime();
-
-$| = 1;
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir('Recurs'), q{chdir'd to Recurs} ) ||
- diag("chdir failed: $!");
-
-
-# Check recursive Makefile building.
-my @mpl_out = run(qq{$perl Makefile.PL});
-
-cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) ||
- diag(@mpl_out);
-
-my $makefile = makefile_name();
-
-ok( -e $makefile, 'Makefile written' );
-ok( -e File::Spec->catfile('prj2',$makefile), 'sub Makefile written' );
-
-my $make = make_run();
-
-my $make_out = run("$make");
-is( $?, 0, 'recursive make exited normally' ) || diag $make_out;
-
-ok( chdir File::Spec->updir );
-ok( teardown_recurs(), 'cleaning out recurs' );
-ok( setup_recurs(), ' setting up fresh copy' );
-ok( chdir('Recurs'), q{chdir'd to Recurs} ) ||
- diag("chdir failed: $!");
-
-
-# Check NORECURS
- at mpl_out = run(qq{$perl Makefile.PL "NORECURS=1"});
-
-cmp_ok( $?, '==', 0, 'Makefile.PL NORECURS=1 exited with zero' ) ||
- diag(@mpl_out);
-
-$makefile = makefile_name();
-
-ok( -e $makefile, 'Makefile written' );
-ok( !-e File::Spec->catfile('prj2',$makefile), 'sub Makefile not written' );
-
-$make = make_run();
-
-run("$make");
-is( $?, 0, 'recursive make exited normally' );
-
-
-ok( chdir File::Spec->updir );
-ok( teardown_recurs(), 'cleaning out recurs' );
-ok( setup_recurs(), ' setting up fresh copy' );
-ok( chdir('Recurs'), q{chdir'd to Recurs} ) ||
- diag("chdir failed: $!");
-
-
-# Check that arguments aren't stomped when they have .. prepended
-# [rt.perl.org 4345]
- at mpl_out = run(qq{$perl Makefile.PL "INST_SCRIPT=cgi"});
-
-cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) ||
- diag(@mpl_out);
-
-$makefile = makefile_name();
-my $submakefile = File::Spec->catfile('prj2',$makefile);
-
-ok( -e $makefile, 'Makefile written' );
-ok( -e $submakefile, 'sub Makefile written' );
-
-my $inst_script = File::Spec->catdir(File::Spec->updir, 'cgi');
-ok( open(MAKEFILE, $submakefile) ) || diag("Can't open $submakefile: $!");
-{ local $/;
- like( <MAKEFILE>, qr/^\s*INST_SCRIPT\s*=\s*\Q$inst_script\E/m,
- 'prepend .. not stomping WriteMakefile args' )
-}
-close MAKEFILE;
-
-
-{
- # Quiet "make test" failure noise
- close *STDERR;
-
- my $test_out = run("$make test");
- isnt $?, 0, 'test failure in a subdir causes make to fail';
-}
\ No newline at end of file
Deleted: vendor/perl/dist/lib/ExtUtils/t/revision.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/revision.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/revision.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,23 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use Test::More tests => 4;
-
-BEGIN {
- use_ok 'ExtUtils::MakeMaker';
- use_ok 'ExtUtils::MM_VMS';
-}
-
-# Why 1? Because a common mistake is for the regex to run in scalar context
-# thus getting the count of captured elements (1) rather than the value of $1
-cmp_ok $ExtUtils::MakeMaker::Revision, '>', 1;
-cmp_ok $ExtUtils::MM_VMS::Revision, '>', 1;
Deleted: vendor/perl/dist/lib/ExtUtils/t/split_command.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/split_command.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/split_command.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,66 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-chdir 't';
-
-use ExtUtils::MM;
-use MakeMaker::Test::Utils;
-
-my $Is_VMS = $^O eq 'VMS';
-my $Is_Win32 = $^O eq 'MSWin32';
-
-use Test::More tests => 7;
-
-my $perl = which_perl;
-my $mm = bless { NAME => "Foo" }, "MM";
-
-# I don't expect anything to have a length shorter than 256 chars.
-cmp_ok( $mm->max_exec_len, '>=', 256, 'max_exec_len' );
-
-my $echo = $mm->oneliner(q{print @ARGV}, ['-l']);
-
-# Force a short command length to make testing split_command easier.
-$mm->{_MAX_EXEC_LEN} = length($echo) + 15;
-is( $mm->max_exec_len, $mm->{_MAX_EXEC_LEN}, ' forced a short max_exec_len' );
-
-my @test_args = qw(foo bar baz yar car har ackapicklerootyjamboree);
-my @cmds = $mm->split_command($echo, @test_args);
-isnt( @cmds, 0 );
-
- at results = _run(@cmds);
-is( join('', @results), join('', @test_args));
-
-
-my %test_args = ( foo => 42, bar => 23, car => 'har' );
-$even_args = $mm->oneliner(q{print !(@ARGV % 2)});
- at cmds = $mm->split_command($even_args, %test_args);
-isnt( @cmds, 0 );
-
- at results = _run(@cmds);
-like( join('', @results ), qr/^1+$/, 'pairs preserved' );
-
-is( $mm->split_command($echo), 0, 'no args means no commands' );
-
-
-sub _run {
- my @cmds = @_;
-
- s{\$\(ABSPERLRUN\)}{$perl} foreach @cmds;
- if( $Is_VMS ) {
- s{-\n}{} foreach @cmds
- }
- elsif( $Is_Win32 ) {
- s{\\\n}{} foreach @cmds;
- }
-
- return map { s/\n+$//; $_ } map { `$_` } @cmds
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/test_boilerplate.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/test_boilerplate.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/test_boilerplate.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,26 +0,0 @@
-#!/usr/bin/perl -w
-
-# <<<Fill in with what this test does.>>>
-# Copy this when writing new tests to avoid forgetting the core boilerplate
-
-# Magic for core
-BEGIN {
- # Always run in t to unify behavor with core
- chdir 't' if -d 't';
-
- # Only use the about to be installed modules
- if( $ENV{PERL_CORE} ) {
- @INC = '../lib';
- }
-}
-
-# Use things from t/lib/
-use lib './lib';
-use strict;
-use ExtUtils::MakeMaker;
-
-use Test::More;
-
-pass("Your test code goes here");
-
-done_testing();
Deleted: vendor/perl/dist/lib/ExtUtils/t/testlib.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/testlib.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/testlib.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,37 +0,0 @@
-#!/usr/bin/perl -Tw
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
- else {
- # ./lib is there so t/lib can be seen even after we chdir.
- unshift @INC, 't/lib', './lib';
- }
-}
-chdir 't';
-
-use Test::More tests => 5;
-
-BEGIN {
- # non-core tests will have blib in their path. We remove it
- # and just use the one in lib/.
- unless( $ENV{PERL_CORE} ) {
- @INC = grep !/blib/, @INC;
- unshift @INC, '../lib';
- }
-}
-
-my @blib_paths = grep /blib/, @INC;
-is( @blib_paths, 0, 'No blib dirs yet in @INC' );
-
-use_ok( 'ExtUtils::testlib' );
-
- at blib_paths = grep { /blib/ } @INC;
-is( @blib_paths, 2, 'ExtUtils::testlib added two @INC dirs!' );
-ok( !(grep !File::Spec->file_name_is_absolute($_), @blib_paths),
- ' and theyre absolute');
-
-eval { eval "# @INC"; };
-is( $@, '', '@INC is not tainted' );
Deleted: vendor/perl/dist/lib/ExtUtils/t/writemakefile_args.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/writemakefile_args.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/writemakefile_args.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,221 +0,0 @@
-#!/usr/bin/perl -w
-
-# This is a test of the verification of the arguments to
-# WriteMakefile.
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = ('../lib', 'lib');
- }
- else {
- unshift @INC, 't/lib';
- }
-}
-
-use strict;
-use Test::More tests => 35;
-
-use TieOut;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::BFD;
-
-use ExtUtils::MakeMaker;
-
-chdir 't';
-
-perl_lib();
-
-ok( setup_recurs(), 'setup' );
-END {
- ok( chdir File::Spec->updir );
- ok( teardown_recurs(), 'teardown' );
-}
-
-ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
- diag("chdir failed: $!");
-
-{
- ok( my $stdout = tie *STDOUT, 'TieOut' );
- my $warnings = '';
- local $SIG{__WARN__} = sub {
- $warnings .= join '', @_;
- };
-
- my $mm;
-
- eval {
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- MAN3PODS => ' ', # common mistake
- );
- };
-
- is( $warnings, <<VERIFY );
-WARNING: MAN3PODS takes a HASH reference not a string/number.
- Please inform the author.
-VERIFY
-
- $warnings = '';
- eval {
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- AUTHOR => sub {},
- );
- };
-
- is( $warnings, <<VERIFY );
-WARNING: AUTHOR takes a string/number not a CODE reference.
- Please inform the author.
-VERIFY
-
- # LIBS accepts *both* a string or an array ref. The first cut of
- # our verification did not take this into account.
- $warnings = '';
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- LIBS => '-lwibble -lwobble',
- );
-
- # We'll get warnings about the bogus libs, that's ok.
- unlike( $warnings, qr/WARNING: .* takes/ );
- is_deeply( $mm->{LIBS}, ['-lwibble -lwobble'] );
-
- $warnings = '';
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- LIBS => ['-lwibble', '-lwobble'],
- );
-
- # We'll get warnings about the bogus libs, that's ok.
- unlike( $warnings, qr/WARNING: .* takes/ );
- is_deeply( $mm->{LIBS}, ['-lwibble', '-lwobble'] );
-
- $warnings = '';
- eval {
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION_FROM => 'lib/Big/Dummy.pm',
- LIBS => { wibble => "wobble" },
- );
- };
-
- # We'll get warnings about the bogus libs, that's ok.
- like( $warnings, qr{^WARNING: LIBS takes a ARRAY reference or string/number not a HASH reference}m );
-
-
- $warnings = '';
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- WIBBLE => 'something',
- wump => { foo => 42 },
- );
-
- like( $warnings, qr{^WARNING: WIBBLE is not a known parameter.\n}m );
- like( $warnings, qr{^WARNING: wump is not a known parameter.\n}m );
-
- is( $mm->{WIBBLE}, 'something' );
- is_deeply( $mm->{wump}, { foo => 42 } );
-
-
- # Test VERSION
- $warnings = '';
- eval {
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION => [1,2,3],
- );
- };
- like( $warnings, qr{^WARNING: VERSION takes a version object or string/number} );
-
- $warnings = '';
- eval {
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION => 1.002_003,
- );
- };
- is( $warnings, '' );
- is( $mm->{VERSION}, '1.002003' );
-
- $warnings = '';
- eval {
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION => '1.002_003',
- );
- };
- is( $warnings, '' );
- is( $mm->{VERSION}, '1.002_003' );
-
-
- $warnings = '';
- eval {
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION => bless {}, "Some::Class",
- );
- };
- like( $warnings, '/^WARNING: VERSION takes a version object or string/number not a Some::Class object/' );
-
-
- SKIP: {
- skip("Can't test version objects", 8) unless eval { require version };
- version->import;
-
- my $version = version->new("1.2.3");
- $warnings = '';
- ok eval {
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION => $version,
- );
- } || diag $@;
- is( $warnings, '' );
- isa_ok( $mm->{VERSION}, 'version' );
- is( $mm->{VERSION}, $version );
-
- $warnings = '';
- $version = qv('1.2.3');
- ok eval {
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION => $version,
- );
- } || diag $@;
- is( $warnings, '' );
- isa_ok( $mm->{VERSION}, 'version' );
- is( $mm->{VERSION}, $version );
- }
-
-
- # DISTNAME
- $warnings = '';
- eval {
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION => '1.00',
- DISTNAME => "Hooballa",
- );
- };
- is( $warnings, '' );
- is( $mm->{DISTNAME}, "Hooballa" );
- is( $mm->{DISTVNAME}, $Is_VMS ? "Hooballa-1_00" : "Hooballa-1.00" );
-
-
- # DISTVNAME (rt.cpan.org 43217)
- $warnings = '';
- eval {
- $mm = WriteMakefile(
- NAME => 'Big::Dummy',
- VERSION => 1.00,
- DISTVNAME => "Hooballoo",
- );
- };
- is( $warnings, '' );
- is( $mm->{DISTVNAME}, 'Hooballoo' );
-}
Deleted: vendor/perl/dist/lib/ExtUtils/t/xs.t
===================================================================
--- vendor/perl/dist/lib/ExtUtils/t/xs.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/t/xs.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,64 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = ('../lib', 'lib/');
- }
- else {
- unshift @INC, 't/lib/';
- }
-}
-chdir 't';
-
-use strict;
-
-use Test::More;
-use MakeMaker::Test::Utils;
-use MakeMaker::Test::Setup::XS;
-use File::Find;
-use File::Spec;
-use File::Path;
-
-my $Skipped = 0;
-if( have_compiler() ) {
- plan tests => 5;
-}
-else {
- $Skipped = 1;
- plan skip_all => "ExtUtils::CBuilder not installed or couldn't find a compiler";
-}
-
-my $Is_VMS = $^O eq 'VMS';
-my $perl = which_perl();
-
-chdir 't';
-
-perl_lib;
-
-$| = 1;
-
-ok( setup_xs(), 'setup' );
-END {
- unless( $Skipped ) {
- chdir File::Spec->updir or die;
- teardown_xs(), 'teardown' or die;
- }
-}
-
-ok( chdir('XS-Test'), "chdir'd to XS-Test" ) ||
- diag("chdir failed: $!");
-
-my @mpl_out = run(qq{$perl Makefile.PL});
-
-cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) ||
- diag(@mpl_out);
-
-my $make = make_run();
-my $make_out = run("$make");
-is( $?, 0, ' make exited normally' ) ||
- diag $make_out;
-
-my $test_out = run("$make");
-is( $?, 0, ' make test exited normally' ) ||
- diag $test_out;
Deleted: vendor/perl/dist/lib/ExtUtils/testlib.pm
===================================================================
--- vendor/perl/dist/lib/ExtUtils/testlib.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/testlib.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,41 +0,0 @@
-package ExtUtils::testlib;
-
-use strict;
-use warnings;
-
-our $VERSION = 6.55_02;
-
-use Cwd;
-use File::Spec;
-
-# So the tests can chdir around and not break @INC.
-# We use getcwd() because otherwise rel2abs will blow up under taint
-# mode pre-5.8. We detaint is so @INC won't be tainted. This is
-# no worse, and probably better, than just shoving an untainted,
-# relative "blib/lib" onto @INC.
-my $cwd;
-BEGIN {
- ($cwd) = getcwd() =~ /(.*)/;
-}
-use lib map { File::Spec->rel2abs($_, $cwd) } qw(blib/arch blib/lib);
-1;
-__END__
-
-=head1 NAME
-
-ExtUtils::testlib - add blib/* directories to @INC
-
-=head1 SYNOPSIS
-
- use ExtUtils::testlib;
-
-=head1 DESCRIPTION
-
-After an extension has been built and before it is installed it may be
-desirable to test it bypassing C<make test>. By adding
-
- use ExtUtils::testlib;
-
-to a test program the intermediate directories used by C<make> are
-added to @INC.
-
Deleted: vendor/perl/dist/lib/ExtUtils/xsubpp
===================================================================
--- vendor/perl/dist/lib/ExtUtils/xsubpp 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ExtUtils/xsubpp 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,156 +0,0 @@
-#!./miniperl
-
-require 5.002;
-use ExtUtils::ParseXS qw(process_file);
-use Getopt::Long;
-
-my %args = ();
-
-my $usage = "Usage: xsubpp [-v] [-csuffix csuffix] [-except] [-prototypes] [-noversioncheck] [-nolinenumbers] [-nooptimize] [-noinout] [-noargtypes] [-s pattern] [-typemap typemap]... file.xs\n";
-
-Getopt::Long::Configure qw(no_auto_abbrev no_ignore_case);
-
- at ARGV = grep {$_ ne '-C++'} @ARGV; # Allow -C++ for backward compatibility
-GetOptions(\%args, qw(hiertype!
- prototypes!
- versioncheck!
- linenumbers!
- optimize!
- inout!
- argtypes!
- object_capi!
- except!
- v
- typemap=s@
- output=s
- s=s
- csuffix=s
- ))
- or die $usage;
-
-if ($args{v}) {
- print "xsubpp version $ExtUtils::ParseXS::VERSION\n";
- exit;
-}
-
- at ARGV == 1 or die $usage;
-
-$args{filename} = shift @ARGV;
-
-process_file(%args);
-exit( ExtUtils::ParseXS::errors() ? 1 : 0 );
-
-__END__
-
-=head1 NAME
-
-xsubpp - compiler to convert Perl XS code into C code
-
-=head1 SYNOPSIS
-
-B<xsubpp> [B<-v>] [B<-except>] [B<-s pattern>] [B<-prototypes>] [B<-noversioncheck>] [B<-nolinenumbers>] [B<-nooptimize>] [B<-typemap typemap>] [B<-output filename>]... file.xs
-
-=head1 DESCRIPTION
-
-This compiler is typically run by the makefiles created by L<ExtUtils::MakeMaker>.
-
-I<xsubpp> will compile XS code into C code by embedding the constructs
-necessary to let C functions manipulate Perl values and creates the glue
-necessary to let Perl access those functions. The compiler uses typemaps to
-determine how to map C function parameters and variables to Perl values.
-
-The compiler will search for typemap files called I<typemap>. It will use
-the following search path to find default typemaps, with the rightmost
-typemap taking precedence.
-
- ../../../typemap:../../typemap:../typemap:typemap
-
-It will also use a default typemap installed as C<ExtUtils::typemap>.
-
-=head1 OPTIONS
-
-Note that the C<XSOPT> MakeMaker option may be used to add these options to
-any makefiles generated by MakeMaker.
-
-=over 5
-
-=item B<-hiertype>
-
-Retains '::' in type names so that C++ hierarchical types can be mapped.
-
-=item B<-except>
-
-Adds exception handling stubs to the C code.
-
-=item B<-typemap typemap>
-
-Indicates that a user-supplied typemap should take precedence over the
-default typemaps. This option may be used multiple times, with the last
-typemap having the highest precedence.
-
-=item B<-output filename>
-
-Specifies the name of the output file to generate. If no file is
-specified, output will be written to standard output.
-
-=item B<-v>
-
-Prints the I<xsubpp> version number to standard output, then exits.
-
-=item B<-prototypes>
-
-By default I<xsubpp> will not automatically generate prototype code for
-all xsubs. This flag will enable prototypes.
-
-=item B<-noversioncheck>
-
-Disables the run time test that determines if the object file (derived
-from the C<.xs> file) and the C<.pm> files have the same version
-number.
-
-=item B<-nolinenumbers>
-
-Prevents the inclusion of `#line' directives in the output.
-
-=item B<-nooptimize>
-
-Disables certain optimizations. The only optimization that is currently
-affected is the use of I<target>s by the output C code (see L<perlguts>).
-This may significantly slow down the generated code, but this is the way
-B<xsubpp> of 5.005 and earlier operated.
-
-=item B<-noinout>
-
-Disable recognition of C<IN>, C<OUT_LIST> and C<INOUT_LIST> declarations.
-
-=item B<-noargtypes>
-
-Disable recognition of ANSI-like descriptions of function signature.
-
-=item B<-C++>
-
-Currently doesn't do anything at all. This flag has been a no-op for
-many versions of perl, at least as far back as perl5.003_07. It's
-allowed here for backwards compatibility.
-
-=back
-
-=head1 ENVIRONMENT
-
-No environment variables are used.
-
-=head1 AUTHOR
-
-Originally by Larry Wall. Turned into the C<ExtUtils::ParseXS> module
-by Ken Williams.
-
-=head1 MODIFICATION HISTORY
-
-See the file F<Changes>.
-
-=head1 SEE ALSO
-
-perl(1), perlxs(1), perlxstut(1), ExtUtils::ParseXS
-
-=cut
-
Deleted: vendor/perl/dist/lib/Fatal.pm
===================================================================
--- vendor/perl/dist/lib/Fatal.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Fatal.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1374 +0,0 @@
-package Fatal;
-
-use 5.008; # 5.8.x needed for autodie
-use Carp;
-use strict;
-use warnings;
-use Tie::RefHash; # To cache subroutine refs
-
-use constant PERL510 => ( $] >= 5.010 );
-
-use constant LEXICAL_TAG => q{:lexical};
-use constant VOID_TAG => q{:void};
-use constant INSIST_TAG => q{!};
-
-use constant ERROR_NOARGS => 'Cannot use lexical %s with no arguments';
-use constant ERROR_VOID_LEX => VOID_TAG.' cannot be used with lexical scope';
-use constant ERROR_LEX_FIRST => LEXICAL_TAG.' must be used as first argument';
-use constant ERROR_NO_LEX => "no %s can only start with ".LEXICAL_TAG;
-use constant ERROR_BADNAME => "Bad subroutine name for %s: %s";
-use constant ERROR_NOTSUB => "%s is not a Perl subroutine";
-use constant ERROR_NOT_BUILT => "%s is neither a builtin, nor a Perl subroutine";
-use constant ERROR_NOHINTS => "No user hints defined for %s";
-
-use constant ERROR_CANT_OVERRIDE => "Cannot make the non-overridable builtin %s fatal";
-
-use constant ERROR_NO_IPC_SYS_SIMPLE => "IPC::System::Simple required for Fatalised/autodying system()";
-
-use constant ERROR_IPC_SYS_SIMPLE_OLD => "IPC::System::Simple version %f required for Fatalised/autodying system(). We only have version %f";
-
-use constant ERROR_AUTODIE_CONFLICT => q{"no autodie '%s'" is not allowed while "use Fatal '%s'" is in effect};
-
-use constant ERROR_FATAL_CONFLICT => q{"use Fatal '%s'" is not allowed while "no autodie '%s'" is in effect};
-
-use constant ERROR_58_HINTS => q{Non-subroutine %s hints for %s are not supported under Perl 5.8.x};
-
-# Older versions of IPC::System::Simple don't support all the
-# features we need.
-
-use constant MIN_IPC_SYS_SIMPLE_VER => 0.12;
-
-# All the Fatal/autodie modules share the same version number.
-our $VERSION = '2.06_01';
-
-our $Debug ||= 0;
-
-# EWOULDBLOCK values for systems that don't supply their own.
-# Even though this is defined with our, that's to help our
-# test code. Please don't rely upon this variable existing in
-# the future.
-
-our %_EWOULDBLOCK = (
- MSWin32 => 33,
-);
-
-# We have some tags that can be passed in for use with import.
-# These are all assumed to be CORE::
-
-my %TAGS = (
- ':io' => [qw(:dbm :file :filesys :ipc :socket
- read seek sysread syswrite sysseek )],
- ':dbm' => [qw(dbmopen dbmclose)],
- ':file' => [qw(open close flock sysopen fcntl fileno binmode
- ioctl truncate)],
- ':filesys' => [qw(opendir closedir chdir link unlink rename mkdir
- symlink rmdir readlink umask)],
- ':ipc' => [qw(:msg :semaphore :shm pipe)],
- ':msg' => [qw(msgctl msgget msgrcv msgsnd)],
- ':threads' => [qw(fork)],
- ':semaphore'=>[qw(semctl semget semop)],
- ':shm' => [qw(shmctl shmget shmread)],
- ':system' => [qw(system exec)],
-
- # Can we use qw(getpeername getsockname)? What do they do on failure?
- # TODO - Can socket return false?
- ':socket' => [qw(accept bind connect getsockopt listen recv send
- setsockopt shutdown socketpair)],
-
- # Our defaults don't include system(), because it depends upon
- # an optional module, and it breaks the exotic form.
- #
- # This *may* change in the future. I'd love IPC::System::Simple
- # to be a dependency rather than a recommendation, and hence for
- # system() to be autodying by default.
-
- ':default' => [qw(:io :threads)],
-
- # Version specific tags. These allow someone to specify
- # use autodie qw(:1.994) and know exactly what they'll get.
-
- ':1.994' => [qw(:default)],
- ':1.995' => [qw(:default)],
- ':1.996' => [qw(:default)],
- ':1.997' => [qw(:default)],
- ':1.998' => [qw(:default)],
- ':1.999' => [qw(:default)],
- ':1.999_01' => [qw(:default)],
- ':2.00' => [qw(:default)],
- ':2.01' => [qw(:default)],
- ':2.02' => [qw(:default)],
- ':2.03' => [qw(:default)],
- ':2.04' => [qw(:default)],
- ':2.05' => [qw(:default)],
- ':2.06' => [qw(:default)],
- ':2.06_01' => [qw(:default)],
-);
-
-$TAGS{':all'} = [ keys %TAGS ];
-
-# This hash contains subroutines for which we should
-# subroutine() // die() rather than subroutine() || die()
-
-my %Use_defined_or;
-
-# CORE::open returns undef on failure. It can legitimately return
-# 0 on success, eg: open(my $fh, '-|') || exec(...);
-
- at Use_defined_or{qw(
- CORE::fork
- CORE::recv
- CORE::send
- CORE::open
- CORE::fileno
- CORE::read
- CORE::readlink
- CORE::sysread
- CORE::syswrite
- CORE::sysseek
- CORE::umask
-)} = ();
-
-# Cached_fatalised_sub caches the various versions of our
-# fatalised subs as they're produced. This means we don't
-# have to build our own replacement of CORE::open and friends
-# for every single package that wants to use them.
-
-my %Cached_fatalised_sub = ();
-
-# Every time we're called with package scope, we record the subroutine
-# (including package or CORE::) in %Package_Fatal. This allows us
-# to detect illegal combinations of autodie and Fatal, and makes sure
-# we don't accidently make a Fatal function autodying (which isn't
-# very useful).
-
-my %Package_Fatal = ();
-
-# The first time we're called with a user-sub, we cache it here.
-# In the case of a "no autodie ..." we put back the cached copy.
-
-my %Original_user_sub = ();
-
-# Is_fatalised_sub simply records a big map of fatalised subroutine
-# refs. It means we can avoid repeating work, or fatalising something
-# we've already processed.
-
-my %Is_fatalised_sub = ();
-tie %Is_fatalised_sub, 'Tie::RefHash';
-
-# We use our package in a few hash-keys. Having it in a scalar is
-# convenient. The "guard $PACKAGE" string is used as a key when
-# setting up lexical guards.
-
-my $PACKAGE = __PACKAGE__;
-my $PACKAGE_GUARD = "guard $PACKAGE";
-my $NO_PACKAGE = "no $PACKAGE"; # Used to detect 'no autodie'
-
-# Here's where all the magic happens when someone write 'use Fatal'
-# or 'use autodie'.
-
-sub import {
- my $class = shift(@_);
- my $void = 0;
- my $lexical = 0;
- my $insist_hints = 0;
-
- my ($pkg, $filename) = caller();
-
- @_ or return; # 'use Fatal' is a no-op.
-
- # If we see the :lexical flag, then _all_ arguments are
- # changed lexically
-
- if ($_[0] eq LEXICAL_TAG) {
- $lexical = 1;
- shift @_;
-
- # If we see no arguments and :lexical, we assume they
- # wanted ':default'.
-
- if (@_ == 0) {
- push(@_, ':default');
- }
-
- # Don't allow :lexical with :void, it's needlessly confusing.
- if ( grep { $_ eq VOID_TAG } @_ ) {
- croak(ERROR_VOID_LEX);
- }
- }
-
- if ( grep { $_ eq LEXICAL_TAG } @_ ) {
- # If we see the lexical tag as the non-first argument, complain.
- croak(ERROR_LEX_FIRST);
- }
-
- my @fatalise_these = @_;
-
- # Thiese subs will get unloaded at the end of lexical scope.
- my %unload_later;
-
- # This hash helps us track if we've alredy done work.
- my %done_this;
-
- # NB: we're using while/shift rather than foreach, since
- # we'll be modifying the array as we walk through it.
-
- while (my $func = shift @fatalise_these) {
-
- if ($func eq VOID_TAG) {
-
- # When we see :void, set the void flag.
- $void = 1;
-
- } elsif ($func eq INSIST_TAG) {
-
- $insist_hints = 1;
-
- } elsif (exists $TAGS{$func}) {
-
- # When it's a tag, expand it.
- push(@fatalise_these, @{ $TAGS{$func} });
-
- } else {
-
- # Otherwise, fatalise it.
-
- # Check to see if there's an insist flag at the front.
- # If so, remove it, and insist we have hints for this sub.
- my $insist_this;
-
- if ($func =~ s/^!//) {
- $insist_this = 1;
- }
-
- # TODO: Even if we've already fatalised, we should
- # check we've done it with hints (if $insist_hints).
-
- # If we've already made something fatal this call,
- # then don't do it twice.
-
- next if $done_this{$func};
-
- # We're going to make a subroutine fatalistic.
- # However if we're being invoked with 'use Fatal qw(x)'
- # and we've already been called with 'no autodie qw(x)'
- # in the same scope, we consider this to be an error.
- # Mixing Fatal and autodie effects was considered to be
- # needlessly confusing on p5p.
-
- my $sub = $func;
- $sub = "${pkg}::$sub" unless $sub =~ /::/;
-
- # If we're being called as Fatal, and we've previously
- # had a 'no X' in scope for the subroutine, then complain
- # bitterly.
-
- if (! $lexical and $^H{$NO_PACKAGE}{$sub}) {
- croak(sprintf(ERROR_FATAL_CONFLICT, $func, $func));
- }
-
- # We're not being used in a confusing way, so make
- # the sub fatal. Note that _make_fatal returns the
- # old (original) version of the sub, or undef for
- # built-ins.
-
- my $sub_ref = $class->_make_fatal(
- $func, $pkg, $void, $lexical, $filename,
- ( $insist_this || $insist_hints )
- );
-
- $done_this{$func}++;
-
- $Original_user_sub{$sub} ||= $sub_ref;
-
- # If we're making lexical changes, we need to arrange
- # for them to be cleaned at the end of our scope, so
- # record them here.
-
- $unload_later{$func} = $sub_ref if $lexical;
- }
- }
-
- if ($lexical) {
-
- # Dark magic to have autodie work under 5.8
- # Copied from namespace::clean, that copied it from
- # autobox, that found it on an ancient scroll written
- # in blood.
-
- # This magic bit causes %^H to be lexically scoped.
-
- $^H |= 0x020000;
-
- # Our package guard gets invoked when we leave our lexical
- # scope.
-
- push(@ { $^H{$PACKAGE_GUARD} }, autodie::Scope::Guard->new(sub {
- $class->_install_subs($pkg, \%unload_later);
- }));
-
- }
-
- return;
-
-}
-
-# The code here is originally lifted from namespace::clean,
-# by Robert "phaylon" Sedlacek.
-#
-# It's been redesigned after feedback from ikegami on perlmonks.
-# See http://perlmonks.org/?node_id=693338 . Ikegami rocks.
-#
-# Given a package, and hash of (subname => subref) pairs,
-# we install the given subroutines into the package. If
-# a subref is undef, the subroutine is removed. Otherwise
-# it replaces any existing subs which were already there.
-
-sub _install_subs {
- my ($class, $pkg, $subs_to_reinstate) = @_;
-
- my $pkg_sym = "${pkg}::";
-
- while(my ($sub_name, $sub_ref) = each %$subs_to_reinstate) {
-
- my $full_path = $pkg_sym.$sub_name;
-
- # Copy symbols across to temp area.
-
- no strict 'refs'; ## no critic
-
- local *__tmp = *{ $full_path };
-
- # Nuke the old glob.
- { no strict; delete $pkg_sym->{$sub_name}; } ## no critic
-
- # Copy innocent bystanders back. Note that we lose
- # formats; it seems that Perl versions up to 5.10.0
- # have a bug which causes copying formats to end up in
- # the scalar slot. Thanks to Ben Morrow for spotting this.
-
- foreach my $slot (qw( SCALAR ARRAY HASH IO ) ) {
- next unless defined *__tmp{ $slot };
- *{ $full_path } = *__tmp{ $slot };
- }
-
- # Put back the old sub (if there was one).
-
- if ($sub_ref) {
-
- no strict; ## no critic
- *{ $pkg_sym . $sub_name } = $sub_ref;
- }
- }
-
- return;
-}
-
-sub unimport {
- my $class = shift;
-
- # Calling "no Fatal" must start with ":lexical"
- if ($_[0] ne LEXICAL_TAG) {
- croak(sprintf(ERROR_NO_LEX,$class));
- }
-
- shift @_; # Remove :lexical
-
- my $pkg = (caller)[0];
-
- # If we've been called with arguments, then the developer
- # has explicitly stated 'no autodie qw(blah)',
- # in which case, we disable Fatalistic behaviour for 'blah'.
-
- my @unimport_these = @_ ? @_ : ':all';
-
- while (my $symbol = shift @unimport_these) {
-
- if ($symbol =~ /^:/) {
-
- # Looks like a tag! Expand it!
- push(@unimport_these, @{ $TAGS{$symbol} });
-
- next;
- }
-
- my $sub = $symbol;
- $sub = "${pkg}::$sub" unless $sub =~ /::/;
-
- # If 'blah' was already enabled with Fatal (which has package
- # scope) then, this is considered an error.
-
- if (exists $Package_Fatal{$sub}) {
- croak(sprintf(ERROR_AUTODIE_CONFLICT,$symbol,$symbol));
- }
-
- # Record 'no autodie qw($sub)' as being in effect.
- # This is to catch conflicting semantics elsewhere
- # (eg, mixing Fatal with no autodie)
-
- $^H{$NO_PACKAGE}{$sub} = 1;
-
- if (my $original_sub = $Original_user_sub{$sub}) {
- # Hey, we've got an original one of these, put it back.
- $class->_install_subs($pkg, { $symbol => $original_sub });
- next;
- }
-
- # We don't have an original copy of the sub, on the assumption
- # it's core (or doesn't exist), we'll just nuke it.
-
- $class->_install_subs($pkg,{ $symbol => undef });
-
- }
-
- return;
-
-}
-
-# TODO - This is rather terribly inefficient right now.
-
-# NB: Perl::Critic's dump-autodie-tag-contents depends upon this
-# continuing to work.
-
-{
- my %tag_cache;
-
- sub _expand_tag {
- my ($class, $tag) = @_;
-
- if (my $cached = $tag_cache{$tag}) {
- return $cached;
- }
-
- if (not exists $TAGS{$tag}) {
- croak "Invalid exception class $tag";
- }
-
- my @to_process = @{$TAGS{$tag}};
-
- my @taglist = ();
-
- while (my $item = shift @to_process) {
- if ($item =~ /^:/) {
- push(@to_process, @{$TAGS{$item}} );
- } else {
- push(@taglist, "CORE::$item");
- }
- }
-
- $tag_cache{$tag} = \@taglist;
-
- return \@taglist;
-
- }
-
-}
-
-# This code is from the original Fatal. It scares me.
-# It is 100% compatible with the 5.10.0 Fatal module, right down
-# to the scary 'XXXX' comment. ;)
-
-sub fill_protos {
- my $proto = shift;
- my ($n, $isref, @out, @out1, $seen_semi) = -1;
- while ($proto =~ /\S/) {
- $n++;
- push(@out1,[$n, at out]) if $seen_semi;
- push(@out, $1 . "{\$_[$n]}"), next if $proto =~ s/^\s*\\([\@%\$\&])//;
- push(@out, "\$_[$n]"), next if $proto =~ s/^\s*([_*\$&])//;
- push(@out, "\@_[$n..\$#_]"), last if $proto =~ s/^\s*(;\s*)?\@//;
- $seen_semi = 1, $n--, next if $proto =~ s/^\s*;//; # XXXX ????
- die "Internal error: Unknown prototype letters: \"$proto\"";
- }
- push(@out1,[$n+1, at out]);
- return @out1;
-}
-
-# This is a backwards compatible version of _write_invocation. It's
-# recommended you don't use it.
-
-sub write_invocation {
- my ($core, $call, $name, $void, @args) = @_;
-
- return Fatal->_write_invocation(
- $core, $call, $name, $void,
- 0, # Lexical flag
- undef, # Sub, unused in legacy mode
- undef, # Subref, unused in legacy mode.
- @args
- );
-}
-
-# This version of _write_invocation is used internally. It's not
-# recommended you call it from external code, as the interface WILL
-# change in the future.
-
-sub _write_invocation {
-
- my ($class, $core, $call, $name, $void, $lexical, $sub, $sref, @argvs) = @_;
-
- if (@argvs == 1) { # No optional arguments
-
- my @argv = @{$argvs[0]};
- shift @argv;
-
- return $class->_one_invocation($core,$call,$name,$void,$sub,! $lexical, $sref, @argv);
-
- } else {
- my $else = "\t";
- my (@out, @argv, $n);
- while (@argvs) {
- @argv = @{shift @argvs};
- $n = shift @argv;
-
- push @out, "${else}if (\@_ == $n) {\n";
- $else = "\t} els";
-
- push @out, $class->_one_invocation($core,$call,$name,$void,$sub,! $lexical, $sref, @argv);
- }
- push @out, qq[
- }
- die "Internal error: $name(\@_): Do not expect to get ", scalar(\@_), " arguments";
- ];
-
- return join '', @out;
- }
-}
-
-
-# This is a slim interface to ensure backward compatibility with
-# anyone doing very foolish things with old versions of Fatal.
-
-sub one_invocation {
- my ($core, $call, $name, $void, @argv) = @_;
-
- return Fatal->_one_invocation(
- $core, $call, $name, $void,
- undef, # Sub. Unused in back-compat mode.
- 1, # Back-compat flag
- undef, # Subref, unused in back-compat mode.
- @argv
- );
-
-}
-
-# This is the internal interface that generates code.
-# NOTE: This interface WILL change in the future. Please do not
-# call this subroutine directly.
-
-# TODO: Whatever's calling this code has already looked up hints. Pass
-# them in, rather than look them up a second time.
-
-sub _one_invocation {
- my ($class, $core, $call, $name, $void, $sub, $back_compat, $sref, @argv) = @_;
-
-
- # If someone is calling us directly (a child class perhaps?) then
- # they could try to mix void without enabling backwards
- # compatibility. We just don't support this at all, so we gripe
- # about it rather than doing something unwise.
-
- if ($void and not $back_compat) {
- Carp::confess("Internal error: :void mode not supported with $class");
- }
-
- # @argv only contains the results of the in-built prototype
- # function, and is therefore safe to interpolate in the
- # code generators below.
-
- # TODO - The following clobbers context, but that's what the
- # old Fatal did. Do we care?
-
- if ($back_compat) {
-
- # Use Fatal qw(system) will never be supported. It generated
- # a compile-time error with legacy Fatal, and there's no reason
- # to support it when autodie does a better job.
-
- if ($call eq 'CORE::system') {
- return q{
- croak("UNIMPLEMENTED: use Fatal qw(system) not supported.");
- };
- }
-
- local $" = ', ';
-
- if ($void) {
- return qq/return (defined wantarray)?$call(@argv):
- $call(@argv) || croak "Can't $name(\@_)/ .
- ($core ? ': $!' : ', \$! is \"$!\"') . '"'
- } else {
- return qq{return $call(@argv) || croak "Can't $name(\@_)} .
- ($core ? ': $!' : ', \$! is \"$!\"') . '"';
- }
- }
-
- # The name of our original function is:
- # $call if the function is CORE
- # $sub if our function is non-CORE
-
- # The reason for this is that $call is what we're actualling
- # calling. For our core functions, this is always
- # CORE::something. However for user-defined subs, we're about to
- # replace whatever it is that we're calling; as such, we actually
- # calling a subroutine ref.
-
- my $human_sub_name = $core ? $call : $sub;
-
- # Should we be testing to see if our result is defined, or
- # just true?
-
- my $use_defined_or;
-
- my $hints; # All user-sub hints, including list hints.
-
- if ( $core ) {
-
- # Core hints are built into autodie.
-
- $use_defined_or = exists ( $Use_defined_or{$call} );
-
- }
- else {
-
- # User sub hints are looked up using autodie::hints,
- # since users may wish to add their own hints.
-
- require autodie::hints;
-
- $hints = autodie::hints->get_hints_for( $sref );
-
- # We'll look up the sub's fullname. This means we
- # get better reports of where it came from in our
- # error messages, rather than what imported it.
-
- $human_sub_name = autodie::hints->sub_fullname( $sref );
-
- }
-
- # Checks for special core subs.
-
- if ($call eq 'CORE::system') {
-
- # Leverage IPC::System::Simple if we're making an autodying
- # system.
-
- local $" = ", ";
-
- # We need to stash $@ into $E, rather than using
- # local $@ for the whole sub. If we don't then
- # any exceptions from internal errors in autodie/Fatal
- # will mysteriously disappear before propogating
- # upwards.
-
- return qq{
- my \$retval;
- my \$E;
-
-
- {
- local \$@;
-
- eval {
- \$retval = IPC::System::Simple::system(@argv);
- };
-
- \$E = \$@;
- }
-
- if (\$E) {
-
- # TODO - This can't be overridden in child
- # classes!
-
- die autodie::exception::system->new(
- function => q{CORE::system}, args => [ @argv ],
- message => "\$E", errno => \$!,
- );
- }
-
- return \$retval;
- };
-
- }
-
- local $" = ', ';
-
- # If we're going to throw an exception, here's the code to use.
- my $die = qq{
- die $class->throw(
- function => q{$human_sub_name}, args => [ @argv ],
- pragma => q{$class}, errno => \$!,
- context => \$context, return => \$retval,
- eval_error => \$@
- )
- };
-
- if ($call eq 'CORE::flock') {
-
- # flock needs special treatment. When it fails with
- # LOCK_UN and EWOULDBLOCK, then it's not really fatal, it just
- # means we couldn't get the lock right now.
-
- require POSIX; # For POSIX::EWOULDBLOCK
-
- local $@; # Don't blat anyone else's $@.
-
- # Ensure that our vendor supports EWOULDBLOCK. If they
- # don't (eg, Windows), then we use known values for its
- # equivalent on other systems.
-
- my $EWOULDBLOCK = eval { POSIX::EWOULDBLOCK(); }
- || $_EWOULDBLOCK{$^O}
- || _autocroak("Internal error - can't overload flock - EWOULDBLOCK not defined on this system.");
-
- require Fcntl; # For Fcntl::LOCK_NB
-
- return qq{
-
- my \$context = wantarray() ? "list" : "scalar";
-
- # Try to flock. If successful, return it immediately.
-
- my \$retval = $call(@argv);
- return \$retval if \$retval;
-
- # If we failed, but we're using LOCK_NB and
- # returned EWOULDBLOCK, it's not a real error.
-
- if (\$_[1] & Fcntl::LOCK_NB() and \$! == $EWOULDBLOCK ) {
- return \$retval;
- }
-
- # Otherwise, we failed. Die noisily.
-
- $die;
-
- };
- }
-
- # AFAIK everything that can be given an unopned filehandle
- # will fail if it tries to use it, so we don't really need
- # the 'unopened' warning class here. Especially since they
- # then report the wrong line number.
-
- # Other warnings are disabled because they produce excessive
- # complaints from smart-match hints under 5.10.1.
-
- my $code = qq[
- no warnings qw(unopened uninitialized numeric);
-
- if (wantarray) {
- my \@results = $call(@argv);
- my \$retval = \\\@results;
- my \$context = "list";
-
- ];
-
- if ( $hints and ( ref($hints->{list} ) || "" ) eq 'CODE' ) {
-
- # NB: Subroutine hints are passed as a full list.
- # This differs from the 5.10.0 smart-match behaviour,
- # but means that context unaware subroutines can use
- # the same hints in both list and scalar context.
-
- $code .= qq{
- if ( \$hints->{list}->(\@results) ) { $die };
- };
- }
- elsif ( PERL510 and $hints ) {
- $code .= qq{
- if ( \@results ~~ \$hints->{list} ) { $die };
- };
- }
- elsif ( $hints ) {
- croak sprintf(ERROR_58_HINTS, 'list', $sub);
- }
- else {
- $code .= qq{
- # An empty list, or a single undef is failure
- if (! \@results or (\@results == 1 and ! defined \$results[0])) {
- $die;
- }
- }
- }
-
- # Tidy up the end of our wantarray call.
-
- $code .= qq[
- return \@results;
- }
- ];
-
-
- # Otherwise, we're in scalar context.
- # We're never in a void context, since we have to look
- # at the result.
-
- $code .= qq{
- my \$retval = $call(@argv);
- my \$context = "scalar";
- };
-
- if ( $hints and ( ref($hints->{scalar} ) || "" ) eq 'CODE' ) {
-
- # We always call code refs directly, since that always
- # works in 5.8.x, and always works in 5.10.1
-
- return $code .= qq{
- if ( \$hints->{scalar}->(\$retval) ) { $die };
- return \$retval;
- };
-
- }
- elsif (PERL510 and $hints) {
- return $code . qq{
-
- if ( \$retval ~~ \$hints->{scalar} ) { $die };
-
- return \$retval;
- };
- }
- elsif ( $hints ) {
- croak sprintf(ERROR_58_HINTS, 'scalar', $sub);
- }
-
- return $code .
- ( $use_defined_or ? qq{
-
- $die if not defined \$retval;
-
- return \$retval;
-
- } : qq{
-
- return \$retval || $die;
-
- } ) ;
-
-}
-
-# This returns the old copy of the sub, so we can
-# put it back at end of scope.
-
-# TODO : Check to make sure prototypes are restored correctly.
-
-# TODO: Taking a huge list of arguments is awful. Rewriting to
-# take a hash would be lovely.
-
-# TODO - BACKCOMPAT - This is not yet compatible with 5.10.0
-
-sub _make_fatal {
- my($class, $sub, $pkg, $void, $lexical, $filename, $insist) = @_;
- my($name, $code, $sref, $real_proto, $proto, $core, $call, $hints);
- my $ini = $sub;
-
- $sub = "${pkg}::$sub" unless $sub =~ /::/;
-
- # Figure if we're using lexical or package semantics and
- # twiddle the appropriate bits.
-
- if (not $lexical) {
- $Package_Fatal{$sub} = 1;
- }
-
- # TODO - We *should* be able to do skipping, since we know when
- # we've lexicalised / unlexicalised a subroutine.
-
- $name = $sub;
- $name =~ s/.*::// or $name =~ s/^&//;
-
- warn "# _make_fatal: sub=$sub pkg=$pkg name=$name void=$void\n" if $Debug;
- croak(sprintf(ERROR_BADNAME, $class, $name)) unless $name =~ /^\w+$/;
-
- if (defined(&$sub)) { # user subroutine
-
- # NOTE: Previously we would localise $@ at this point, so
- # the following calls to eval {} wouldn't interfere with anything
- # that's already in $@. Unfortunately, it would also stop
- # any of our croaks from triggering(!), which is even worse.
-
- # This could be something that we've fatalised that
- # was in core.
-
- if ( $Package_Fatal{$sub} and do { local $@; eval { prototype "CORE::$name" } } ) {
-
- # Something we previously made Fatal that was core.
- # This is safe to replace with an autodying to core
- # version.
-
- $core = 1;
- $call = "CORE::$name";
- $proto = prototype $call;
-
- # We return our $sref from this subroutine later
- # on, indicating this subroutine should be placed
- # back when we're finished.
-
- $sref = \&$sub;
-
- } else {
-
- # If this is something we've already fatalised or played with,
- # then look-up the name of the original sub for the rest of
- # our processing.
-
- $sub = $Is_fatalised_sub{\&$sub} || $sub;
-
- # A regular user sub, or a user sub wrapping a
- # core sub.
-
- $sref = \&$sub;
- $proto = prototype $sref;
- $call = '&$sref';
- require autodie::hints;
-
- $hints = autodie::hints->get_hints_for( $sref );
-
- # If we've insisted on hints, but don't have them, then
- # bail out!
-
- if ($insist and not $hints) {
- croak(sprintf(ERROR_NOHINTS, $name));
- }
-
- # Otherwise, use the default hints if we don't have
- # any.
-
- $hints ||= autodie::hints::DEFAULT_HINTS();
-
- }
-
- } elsif ($sub eq $ini && $sub !~ /^CORE::GLOBAL::/) {
- # Stray user subroutine
- croak(sprintf(ERROR_NOTSUB,$sub));
-
- } elsif ($name eq 'system') {
-
- # If we're fatalising system, then we need to load
- # helper code.
-
- # The business with $E is to avoid clobbering our caller's
- # $@, and to avoid $@ being localised when we croak.
-
- my $E;
-
- {
- local $@;
-
- eval {
- require IPC::System::Simple; # Only load it if we need it.
- require autodie::exception::system;
- };
- $E = $@;
- }
-
- if ($E) { croak ERROR_NO_IPC_SYS_SIMPLE; }
-
- # Make sure we're using a recent version of ISS that actually
- # support fatalised system.
- if ($IPC::System::Simple::VERSION < MIN_IPC_SYS_SIMPLE_VER) {
- croak sprintf(
- ERROR_IPC_SYS_SIMPLE_OLD, MIN_IPC_SYS_SIMPLE_VER,
- $IPC::System::Simple::VERSION
- );
- }
-
- $call = 'CORE::system';
- $name = 'system';
- $core = 1;
-
- } elsif ($name eq 'exec') {
- # Exec doesn't have a prototype. We don't care. This
- # breaks the exotic form with lexical scope, and gives
- # the regular form a "do or die" beaviour as expected.
-
- $call = 'CORE::exec';
- $name = 'exec';
- $core = 1;
-
- } else { # CORE subroutine
- my $E;
- {
- local $@;
- $proto = eval { prototype "CORE::$name" };
- $E = $@;
- }
- croak(sprintf(ERROR_NOT_BUILT,$name)) if $E;
- croak(sprintf(ERROR_CANT_OVERRIDE,$name)) if not defined $proto;
- $core = 1;
- $call = "CORE::$name";
- }
-
- if (defined $proto) {
- $real_proto = " ($proto)";
- } else {
- $real_proto = '';
- $proto = '@';
- }
-
- my $true_name = $core ? $call : $sub;
-
- # TODO: This caching works, but I don't like using $void and
- # $lexical as keys. In particular, I suspect our code may end up
- # wrapping already wrapped code when autodie and Fatal are used
- # together.
-
- # NB: We must use '$sub' (the name plus package) and not
- # just '$name' (the short name) here. Failing to do so
- # results code that's in the wrong package, and hence has
- # access to the wrong package filehandles.
-
- if (my $subref = $Cached_fatalised_sub{$class}{$sub}{$void}{$lexical}) {
- $class->_install_subs($pkg, { $name => $subref });
- return $sref;
- }
-
- $code = qq[
- sub$real_proto {
- local(\$", \$!) = (', ', 0); # TODO - Why do we do this?
- ];
-
- # Don't have perl whine if exec fails, since we'll be handling
- # the exception now.
- $code .= "no warnings qw(exec);\n" if $call eq "CORE::exec";
-
- my @protos = fill_protos($proto);
- $code .= $class->_write_invocation($core, $call, $name, $void, $lexical, $sub, $sref, @protos);
- $code .= "}\n";
- warn $code if $Debug;
-
- # I thought that changing package was a monumental waste of
- # time for CORE subs, since they'll always be the same. However
- # that's not the case, since they may refer to package-based
- # filehandles (eg, with open).
- #
- # There is potential to more aggressively cache core subs
- # that we know will never want to interact with package variables
- # and filehandles.
-
- {
- no strict 'refs'; ## no critic # to avoid: Can't use string (...) as a symbol ref ...
-
- my $E;
-
- {
- local $@;
- $code = eval("package $pkg; use Carp; $code"); ## no critic
- $E = $@;
- }
-
- if (not $code) {
- croak("Internal error in autodie/Fatal processing $true_name: $E");
-
- }
- }
-
- # Now we need to wrap our fatalised sub inside an itty bitty
- # closure, which can detect if we've leaked into another file.
- # Luckily, we only need to do this for lexical (autodie)
- # subs. Fatal subs can leak all they want, it's considered
- # a "feature" (or at least backwards compatible).
-
- # TODO: Cache our leak guards!
-
- # TODO: This is pretty hairy code. A lot more tests would
- # be really nice for this.
-
- my $leak_guard;
-
- if ($lexical) {
-
- $leak_guard = qq<
- package $pkg;
-
- sub$real_proto {
-
- # If we're inside a string eval, we can end up with a
- # whacky filename. The following code allows autodie
- # to propagate correctly into string evals.
-
- my \$caller_level = 0;
-
- my \$caller;
-
- while ( (\$caller = (caller \$caller_level)[1]) =~ m{^\\(eval \\d+\\)\$} ) {
-
- # If our filename is actually an eval, and we
- # reach it, then go to our autodying code immediatately.
-
- goto &\$code if (\$caller eq \$filename);
- \$caller_level++;
- }
-
- # We're now out of the eval stack.
-
- # If we're called from the correct file, then use the
- # autodying code.
- goto &\$code if ((caller \$caller_level)[1] eq \$filename);
-
- # Oh bother, we've leaked into another file. Call the
- # original code. Note that \$sref may actually be a
- # reference to a Fatalised version of a core built-in.
- # That's okay, because Fatal *always* leaks between files.
-
- goto &\$sref if \$sref;
- >;
-
-
- # If we're here, it must have been a core subroutine called.
- # Warning: The following code may disturb some viewers.
-
- # TODO: It should be possible to combine this with
- # write_invocation().
-
- foreach my $proto (@protos) {
- local $" = ", "; # So @args is formatted correctly.
- my ($count, @args) = @$proto;
- $leak_guard .= qq<
- if (\@_ == $count) {
- return $call(@args);
- }
- >;
- }
-
- $leak_guard .= qq< croak "Internal error in Fatal/autodie. Leak-guard failure"; } >;
-
- # warn "$leak_guard\n";
-
- my $E;
- {
- local $@;
-
- $leak_guard = eval $leak_guard; ## no critic
-
- $E = $@;
- }
-
- die "Internal error in $class: Leak-guard installation failure: $E" if $E;
- }
-
- my $installed_sub = $leak_guard || $code;
-
- $class->_install_subs($pkg, { $name => $installed_sub });
-
- $Cached_fatalised_sub{$class}{$sub}{$void}{$lexical} = $installed_sub;
-
- # Cache that we've now overriddent this sub. If we get called
- # again, we may need to find that find subroutine again (eg, for hints).
-
- $Is_fatalised_sub{$installed_sub} = $sref;
-
- return $sref;
-
-}
-
-# This subroutine exists primarily so that child classes can override
-# it to point to their own exception class. Doing this is significantly
-# less complex than overriding throw()
-
-sub exception_class { return "autodie::exception" };
-
-{
- my %exception_class_for;
- my %class_loaded;
-
- sub throw {
- my ($class, @args) = @_;
-
- # Find our exception class if we need it.
- my $exception_class =
- $exception_class_for{$class} ||= $class->exception_class;
-
- if (not $class_loaded{$exception_class}) {
- if ($exception_class =~ /[^\w:']/) {
- confess "Bad exception class '$exception_class'.\nThe '$class->exception_class' method wants to use $exception_class\nfor exceptions, but it contains characters which are not word-characters or colons.";
- }
-
- # Alas, Perl does turn barewords into modules unless they're
- # actually barewords. As such, we're left doing a string eval
- # to make sure we load our file correctly.
-
- my $E;
-
- {
- local $@; # We can't clobber $@, it's wrong!
- eval "require $exception_class"; ## no critic
- $E = $@; # Save $E despite ending our local.
- }
-
- # We need quotes around $@ to make sure it's stringified
- # while still in scope. Without them, we run the risk of
- # $@ having been cleared by us exiting the local() block.
-
- confess "Failed to load '$exception_class'.\nThis may be a typo in the '$class->exception_class' method,\nor the '$exception_class' module may not exist.\n\n $E" if $E;
-
- $class_loaded{$exception_class}++;
-
- }
-
- return $exception_class->new(@args);
- }
-}
-
-# For some reason, dying while replacing our subs doesn't
-# kill our calling program. It simply stops the loading of
-# autodie and keeps going with everything else. The _autocroak
-# sub allows us to die with a vegence. It should *only* ever be
-# used for serious internal errors, since the results of it can't
-# be captured.
-
-sub _autocroak {
- warn Carp::longmess(@_);
- exit(255); # Ugh!
-}
-
-package autodie::Scope::Guard;
-
-# This code schedules the cleanup of subroutines at the end of
-# scope. It's directly inspired by chocolateboy's excellent
-# Scope::Guard module.
-
-sub new {
- my ($class, $handler) = @_;
-
- return bless $handler, $class;
-}
-
-sub DESTROY {
- my ($self) = @_;
-
- $self->();
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Fatal - Replace functions with equivalents which succeed or die
-
-=head1 SYNOPSIS
-
- use Fatal qw(open close);
-
- open(my $fh, "<", $filename); # No need to check errors!
-
- use File::Copy qw(move);
- use Fatal qw(move);
-
- move($file1, $file2); # No need to check errors!
-
- sub juggle { . . . }
- Fatal->import('juggle');
-
-=head1 BEST PRACTICE
-
-B<Fatal has been obsoleted by the new L<autodie> pragma.> Please use
-L<autodie> in preference to C<Fatal>. L<autodie> supports lexical scoping,
-throws real exception objects, and provides much nicer error messages.
-
-The use of C<:void> with Fatal is discouraged.
-
-=head1 DESCRIPTION
-
-C<Fatal> provides a way to conveniently replace
-functions which normally return a false value when they fail with
-equivalents which raise exceptions if they are not successful. This
-lets you use these functions without having to test their return
-values explicitly on each call. Exceptions can be caught using
-C<eval{}>. See L<perlfunc> and L<perlvar> for details.
-
-The do-or-die equivalents are set up simply by calling Fatal's
-C<import> routine, passing it the names of the functions to be
-replaced. You may wrap both user-defined functions and overridable
-CORE operators (except C<exec>, C<system>, C<print>, or any other
-built-in that cannot be expressed via prototypes) in this way.
-
-If the symbol C<:void> appears in the import list, then functions
-named later in that import list raise an exception only when
-these are called in void context--that is, when their return
-values are ignored. For example
-
- use Fatal qw/:void open close/;
-
- # properly checked, so no exception raised on error
- if (not open(my $fh, '<', '/bogotic') {
- warn "Can't open /bogotic: $!";
- }
-
- # not checked, so error raises an exception
- close FH;
-
-The use of C<:void> is discouraged, as it can result in exceptions
-not being thrown if you I<accidentally> call a method without
-void context. Use L<autodie> instead if you need to be able to
-disable autodying/Fatal behaviour for a small block of code.
-
-=head1 DIAGNOSTICS
-
-=over 4
-
-=item Bad subroutine name for Fatal: %s
-
-You've called C<Fatal> with an argument that doesn't look like
-a subroutine name, nor a switch that this version of Fatal
-understands.
-
-=item %s is not a Perl subroutine
-
-You've asked C<Fatal> to try and replace a subroutine which does not
-exist, or has not yet been defined.
-
-=item %s is neither a builtin, nor a Perl subroutine
-
-You've asked C<Fatal> to replace a subroutine, but it's not a Perl
-built-in, and C<Fatal> couldn't find it as a regular subroutine.
-It either doesn't exist or has not yet been defined.
-
-=item Cannot make the non-overridable %s fatal
-
-You've tried to use C<Fatal> on a Perl built-in that can't be
-overridden, such as C<print> or C<system>, which means that
-C<Fatal> can't help you, although some other modules might.
-See the L</"SEE ALSO"> section of this documentation.
-
-=item Internal error: %s
-
-You've found a bug in C<Fatal>. Please report it using
-the C<perlbug> command.
-
-=back
-
-=head1 BUGS
-
-C<Fatal> clobbers the context in which a function is called and always
-makes it a scalar context, except when the C<:void> tag is used.
-This problem does not exist in L<autodie>.
-
-"Used only once" warnings can be generated when C<autodie> or C<Fatal>
-is used with package filehandles (eg, C<FILE>). It's strongly recommended
-you use scalar filehandles instead.
-
-=head1 AUTHOR
-
-Original module by Lionel Cons (CERN).
-
-Prototype updates by Ilya Zakharevich <ilya at math.ohio-state.edu>.
-
-L<autodie> support, bugfixes, extended diagnostics, C<system>
-support, and major overhauling by Paul Fenwick <pjf at perltraining.com.au>
-
-=head1 LICENSE
-
-This module is free software, you may distribute it under the
-same terms as Perl itself.
-
-=head1 SEE ALSO
-
-L<autodie> for a nicer way to use lexical Fatal.
-
-L<IPC::System::Simple> for a similar idea for calls to C<system()>
-and backticks.
-
-=cut
Deleted: vendor/perl/dist/lib/Fatal.t
===================================================================
--- vendor/perl/dist/lib/Fatal.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Fatal.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,36 +0,0 @@
-#!./perl -w
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- print "1..15\n";
-}
-
-use strict;
-use Fatal qw(open close :void opendir sin);
-
-my $i = 1;
-eval { open FOO, '<lkjqweriuapofukndajsdlfjnvcvn' };
-print "not " unless $@ =~ /^Can't open/;
-print "ok $i\n"; ++$i;
-
-my $foo = 'FOO';
-for ('$foo', "'$foo'", "*$foo", "\\*$foo") {
- eval qq{ open $_, '<$0' };
- print "not " if $@;
- print "ok $i\n"; ++$i;
-
- print "not " if $@ or scalar(<$foo>) !~ m|^#!./perl|;
- print "ok $i\n"; ++$i;
- eval qq{ close FOO };
- print "not " if $@;
- print "ok $i\n"; ++$i;
-}
-
-eval { opendir FOO, 'lkjqweriuapofukndajsdlfjnvcvn' };
-print "not " unless $@ =~ /^Can't open/;
-print "ok $i\n"; ++$i;
-
-eval { my $a = opendir FOO, 'lkjqweriuapofukndajsdlfjnvcvn' };
-print "not " if $@ =~ /^Can't open/;
-print "ok $i\n"; ++$i;
Deleted: vendor/perl/dist/lib/File/CheckTree.pm
===================================================================
--- vendor/perl/dist/lib/File/CheckTree.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/File/CheckTree.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,238 +0,0 @@
-package File::CheckTree;
-
-use 5.006;
-use Cwd;
-use Exporter;
-use File::Spec;
-use warnings;
-use strict;
-
-our $VERSION = '4.4';
-our @ISA = qw(Exporter);
-our @EXPORT = qw(validate);
-
-=head1 NAME
-
-File::CheckTree - run many filetest checks on a tree
-
-=head1 SYNOPSIS
-
- use File::CheckTree;
-
- $num_warnings = validate( q{
- /vmunix -e || die
- /boot -e || die
- /bin cd
- csh -ex
- csh !-ug
- sh -ex
- sh !-ug
- /usr -d || warn "What happened to $file?\n"
- });
-
-=head1 DESCRIPTION
-
-The validate() routine takes a single multiline string consisting of
-directives, each containing a filename plus a file test to try on it.
-(The file test may also be a "cd", causing subsequent relative filenames
-to be interpreted relative to that directory.) After the file test
-you may put C<|| die> to make it a fatal error if the file test fails.
-The default is C<|| warn>. The file test may optionally have a "!' prepended
-to test for the opposite condition. If you do a cd and then list some
-relative filenames, you may want to indent them slightly for readability.
-If you supply your own die() or warn() message, you can use $file to
-interpolate the filename.
-
-Filetests may be bunched: "-rwx" tests for all of C<-r>, C<-w>, and C<-x>.
-Only the first failed test of the bunch will produce a warning.
-
-The routine returns the number of warnings issued.
-
-=head1 AUTHOR
-
-File::CheckTree was derived from lib/validate.pl which was
-written by Larry Wall.
-Revised by Paul Grassie <F<grassie at perl.com>> in 2002.
-
-=head1 HISTORY
-
-File::CheckTree used to not display fatal error messages.
-It used to count only those warnings produced by a generic C<|| warn>
-(and not those in which the user supplied the message). In addition,
-the validate() routine would leave the user program in whatever
-directory was last entered through the use of "cd" directives.
-These bugs were fixed during the development of perl 5.8.
-The first fixed version of File::CheckTree was 4.2.
-
-=cut
-
-my $Warnings;
-
-sub validate {
- my ($starting_dir, $file, $test, $cwd, $oldwarnings);
-
- $starting_dir = cwd;
-
- $cwd = "";
- $Warnings = 0;
-
- foreach my $check (split /\n/, $_[0]) {
- my ($testlist, @testlist);
-
- # skip blanks/comments
- next if $check =~ /^\s*#/ || $check =~ /^\s*$/;
-
- # Todo:
- # should probably check for invalid directives and die
- # but earlier versions of File::CheckTree did not do this either
-
- # split a line like "/foo -r || die"
- # so that $file is "/foo", $test is "-r || die"
- # (making special allowance for quoted filenames).
- if ($check =~ m/^\s*"([^"]+)"\s+(.*?)\s*$/ or
- $check =~ m/^\s*'([^']+)'\s+(.*?)\s*$/ or
- $check =~ m/^\s*(\S+?)\s+(\S.*?)\s*$/)
- {
- ($file, $test) = ($1,$2);
- }
- else {
- die "Malformed line: '$check'";
- };
-
- # change a $test like "!-ug || die" to "!-Z || die",
- # capturing the bundled tests (e.g. "ug") in $2
- if ($test =~ s/ ^ (!?-) (\w{2,}) \b /$1Z/x) {
- $testlist = $2;
- # split bundled tests, e.g. "ug" to 'u', 'g'
- @testlist = split(//, $testlist);
- }
- else {
- # put in placeholder Z for stand-alone test
- @testlist = ('Z');
- }
-
- # will compare these two later to stop on 1st warning w/in a bundle
- $oldwarnings = $Warnings;
-
- foreach my $one (@testlist) {
- # examples of $test: "!-Z || die" or "-w || warn"
- my $this = $test;
-
- # expand relative $file to full pathname if preceded by cd directive
- $file = File::Spec->catfile($cwd, $file)
- if $cwd && !File::Spec->file_name_is_absolute($file);
-
- # put filename in after the test operator
- $this =~ s/(-\w\b)/$1 "\$file"/g;
-
- # change the "-Z" representing a bundle with the $one test
- $this =~ s/-Z/-$one/;
-
- # if it's a "cd" directive...
- if ($this =~ /^cd\b/) {
- # add "|| die ..."
- $this .= ' || die "cannot cd to $file\n"';
- # expand "cd" directive with directory name
- $this =~ s/\bcd\b/chdir(\$cwd = '$file')/;
- }
- else {
- # add "|| warn" as a default disposition
- $this .= ' || warn' unless $this =~ /\|\|/;
-
- # change a generic ".. || die" or ".. || warn"
- # to call valmess instead of die/warn directly
- # valmess will look up the error message from %Val_Message
- $this =~ s/ ^ ( (\S+) \s+ \S+ ) \s* \|\| \s* (die|warn) \s* $
- /$1 || valmess('$3', '$2', \$file)/x;
- }
-
- {
- # count warnings, either from valmess or '-r || warn "my msg"'
- # also, call any pre-existing signal handler for __WARN__
- my $orig_sigwarn = $SIG{__WARN__};
- local $SIG{__WARN__} = sub {
- ++$Warnings;
- if ( $orig_sigwarn ) {
- $orig_sigwarn->(@_);
- }
- else {
- warn "@_";
- }
- };
-
- # do the test
- eval $this;
-
- # re-raise an exception caused by a "... || die" test
- if (my $err = $@) {
- # in case of any cd directives, return from whence we came
- if ($starting_dir ne cwd) {
- chdir($starting_dir) || die "$starting_dir: $!";
- }
- die $err;
- }
- }
-
- # stop on 1st warning within a bundle of tests
- last if $Warnings > $oldwarnings;
- }
- }
-
- # in case of any cd directives, return from whence we came
- if ($starting_dir ne cwd) {
- chdir($starting_dir) || die "chdir $starting_dir: $!";
- }
-
- return $Warnings;
-}
-
-my %Val_Message = (
- 'r' => "is not readable by uid $>.",
- 'w' => "is not writable by uid $>.",
- 'x' => "is not executable by uid $>.",
- 'o' => "is not owned by uid $>.",
- 'R' => "is not readable by you.",
- 'W' => "is not writable by you.",
- 'X' => "is not executable by you.",
- 'O' => "is not owned by you.",
- 'e' => "does not exist.",
- 'z' => "does not have zero size.",
- 's' => "does not have non-zero size.",
- 'f' => "is not a plain file.",
- 'd' => "is not a directory.",
- 'l' => "is not a symbolic link.",
- 'p' => "is not a named pipe (FIFO).",
- 'S' => "is not a socket.",
- 'b' => "is not a block special file.",
- 'c' => "is not a character special file.",
- 'u' => "does not have the setuid bit set.",
- 'g' => "does not have the setgid bit set.",
- 'k' => "does not have the sticky bit set.",
- 'T' => "is not a text file.",
- 'B' => "is not a binary file."
-);
-
-sub valmess {
- my ($disposition, $test, $file) = @_;
- my $ferror;
-
- if ($test =~ / ^ (!?) -(\w) \s* $ /x) {
- my ($neg, $ftype) = ($1, $2);
-
- $ferror = "$file $Val_Message{$ftype}";
-
- if ($neg eq '!') {
- $ferror =~ s/ is not / should not be / ||
- $ferror =~ s/ does not / should not / ||
- $ferror =~ s/ not / /;
- }
- }
- else {
- $ferror = "Can't do $test $file.\n";
- }
-
- die "$ferror\n" if $disposition eq 'die';
- warn "$ferror\n";
-}
-
-1;
Deleted: vendor/perl/dist/lib/File/CheckTree.t
===================================================================
--- vendor/perl/dist/lib/File/CheckTree.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/File/CheckTree.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,241 +0,0 @@
-#!./perl -w
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-use Test;
-
-BEGIN { plan tests => 8 }
-
-use strict;
-
-BEGIN {
-# Cwd::cwd does an implicit "require Win32", but
-# the ../lib directory in @INC will no longer work once
-# we chdir() out of the "t" directory.
- if ($^O eq 'MSWin32') {
- require Win32;
- Win32->import();
- }
-}
-
-use File::CheckTree;
-use File::Spec; # used to get absolute paths
-
-# We assume that we start from the perl "t" directory.
-# Will move up one level to make it easier to generate
-# reliable pathnames for testing File::CheckTree
-
-chdir(File::Spec->updir) or die "cannot change to parent of t/ directory: $!";
-
-
-#### TEST 1 -- No warnings ####
-# usings both relative and full paths, indented comments
-
-{
- my ($num_warnings, $path_to_README);
- $path_to_README = File::Spec->rel2abs('README');
-
- my @warnings;
- local $SIG{__WARN__} = sub { push @warnings, "@_" };
-
- eval {
- $num_warnings = validate qq{
- lib -d
-# comment, followed "blank" line (w/ whitespace):
-
- # indented comment, followed blank line (w/o whitespace):
-
- README -f
- '$path_to_README' -e || warn
- };
- };
-
- print STDERR $_ for @warnings;
- if ( !$@ && !@warnings && defined($num_warnings) && $num_warnings == 0 ) {
- ok(1);
- }
- else {
- ok(0);
- }
-}
-
-
-#### TEST 2 -- One warning ####
-
-{
- my ($num_warnings, @warnings);
-
- local $SIG{__WARN__} = sub { push @warnings, "@_" };
-
- eval {
- $num_warnings = validate qq{
- lib -f
- README -f
- };
- };
-
- if ( !$@ && @warnings == 1
- && $warnings[0] =~ /lib is not a plain file/
- && defined($num_warnings)
- && $num_warnings == 1 )
- {
- ok(1);
- }
- else {
- ok(0);
- }
-}
-
-
-#### TEST 3 -- Multiple warnings ####
-# including first warning only from a bundle of tests,
-# generic "|| warn", default "|| warn" and "|| warn '...' "
-
-{
- my ($num_warnings, @warnings);
-
- local $SIG{__WARN__} = sub { push @warnings, "@_" };
-
- eval {
- $num_warnings = validate q{
- lib -effd
- README -f || die
- README -d || warn
- lib -f || warn "my warning: $file\n"
- };
- };
-
- if ( !$@ && @warnings == 3
- && $warnings[0] =~ /lib is not a plain file/
- && $warnings[1] =~ /README is not a directory/
- && $warnings[2] =~ /my warning: lib/
- && defined($num_warnings)
- && $num_warnings == 3 )
- {
- ok(1);
- }
- else {
- ok(0);
- }
-}
-
-
-#### TEST 4 -- cd directive ####
-# cd directive followed by relative paths, followed by full paths
-{
- my ($num_warnings, @warnings, $path_to_libFile, $path_to_dist);
- $path_to_libFile = File::Spec->rel2abs(File::Spec->catdir('lib','File'));
- $path_to_dist = File::Spec->rel2abs(File::Spec->curdir);
-
- local $SIG{__WARN__} = sub { push @warnings, "@_" };
-
- eval {
- $num_warnings = validate qq{
- lib -d || die
- '$path_to_libFile' cd
- Spec -e
- Spec -f
- '$path_to_dist' cd
- README -ef
- INSTALL -d || warn
- '$path_to_libFile' -d || die
- };
- };
-
- if ( !$@ && @warnings == 2
- && $warnings[0] =~ /Spec is not a plain file/
- && $warnings[1] =~ /INSTALL is not a directory/
- && defined($num_warnings)
- && $num_warnings == 2 )
- {
- ok(1);
- }
- else {
- ok(0);
- }
-}
-
-
-#### TEST 5 -- Exception ####
-# test with generic "|| die"
-{
- my $num_warnings;
-
- eval {
- $num_warnings = validate q{
- lib -ef || die
- README -d
- };
- };
-
- if ( $@ && $@ =~ /lib is not a plain file/
- && not defined $num_warnings )
- {
- ok(1);
- }
- else {
- ok(0);
- }
-}
-
-
-#### TEST 6 -- Exception ####
-# test with "|| die 'my error message'"
-{
- my $num_warnings;
-
- eval {
- $num_warnings = validate q{
- lib -ef || die "yadda $file yadda...\n"
- README -d
- };
- };
-
- if ( $@ && $@ =~ /yadda lib yadda/
- && not defined $num_warnings )
- {
- ok(1);
- }
- else {
- ok(0);
- }
-}
-
-#### TEST 7 -- Quoted file names ####
-{
- my $num_warnings;
- eval {
- $num_warnings = validate q{
- "a file with whitespace" !-ef
- 'a file with whitespace' !-ef
- };
- };
-
- if ( !$@ ) {
- # No errors mean we compile correctly
- ok(1);
- } else {
- ok(0);
- print STDERR $@;
- };
-}
-
-#### TEST 8 -- Malformed query ####
-{
- my $num_warnings;
- eval {
- $num_warnings = validate q{
- a file with whitespace !-ef
- };
- };
-
- if ( $@ =~ /syntax error/) {
- # We got a syntax error for a malformed file query
- ok(1);
- } else {
- ok(0);
- };
-}
Deleted: vendor/perl/dist/lib/File/DosGlob.pm
===================================================================
--- vendor/perl/dist/lib/File/DosGlob.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/File/DosGlob.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,312 +0,0 @@
-#!perl -w
-
-# use strict fails
-#Can't use string ("main::glob") as a symbol ref while "strict refs" in use at /usr/lib/perl5/5.005/File/DosGlob.pm line 191.
-
-#
-# Documentation at the __END__
-#
-
-package File::DosGlob;
-
-our $VERSION = '1.04';
-use strict;
-use warnings;
-
-sub doglob {
- my $cond = shift;
- my @retval = ();
- my $fix_drive_relative_paths;
- #print "doglob: ", join('|', @_), "\n";
- OUTER:
- for my $pat (@_) {
- my @matched = ();
- my @globdirs = ();
- my $head = '.';
- my $sepchr = '/';
- my $tail;
- next OUTER unless defined $pat and $pat ne '';
- # if arg is within quotes strip em and do no globbing
- if ($pat =~ /^"(.*)"\z/s) {
- $pat = $1;
- if ($cond eq 'd') { push(@retval, $pat) if -d $pat }
- else { push(@retval, $pat) if -e $pat }
- next OUTER;
- }
- # wildcards with a drive prefix such as h:*.pm must be changed
- # to h:./*.pm to expand correctly
- if ($pat =~ m|^([A-Za-z]:)[^/\\]|s) {
- substr($pat,0,2) = $1 . "./";
- $fix_drive_relative_paths = 1;
- }
- if ($pat =~ m|^(.*)([\\/])([^\\/]*)\z|s) {
- ($head, $sepchr, $tail) = ($1,$2,$3);
- #print "div: |$head|$sepchr|$tail|\n";
- push (@retval, $pat), next OUTER if $tail eq '';
- if ($head =~ /[*?]/) {
- @globdirs = doglob('d', $head);
- push(@retval, doglob($cond, map {"$_$sepchr$tail"} @globdirs)),
- next OUTER if @globdirs;
- }
- $head .= $sepchr if $head eq '' or $head =~ /^[A-Za-z]:\z/s;
- $pat = $tail;
- }
- #
- # If file component has no wildcards, we can avoid opendir
- unless ($pat =~ /[*?]/) {
- $head = '' if $head eq '.';
- $head .= $sepchr unless $head eq '' or substr($head,-1) eq $sepchr;
- $head .= $pat;
- if ($cond eq 'd') { push(@retval,$head) if -d $head }
- else { push(@retval,$head) if -e $head }
- next OUTER;
- }
- opendir(D, $head) or next OUTER;
- my @leaves = readdir D;
- closedir D;
- $head = '' if $head eq '.';
- $head .= $sepchr unless $head eq '' or substr($head,-1) eq $sepchr;
-
- # escape regex metachars but not glob chars
- $pat =~ s:([].+^\-\${}()[|]):\\$1:g;
- # and convert DOS-style wildcards to regex
- $pat =~ s/\*/.*/g;
- $pat =~ s/\?/.?/g;
-
- #print "regex: '$pat', head: '$head'\n";
- my $matchsub = sub { $_[0] =~ m|^$pat\z|is };
- INNER:
- for my $e (@leaves) {
- next INNER if $e eq '.' or $e eq '..';
- next INNER if $cond eq 'd' and ! -d "$head$e";
- push(@matched, "$head$e"), next INNER if &$matchsub($e);
- #
- # [DOS compatibility special case]
- # Failed, add a trailing dot and try again, but only
- # if name does not have a dot in it *and* pattern
- # has a dot *and* name is shorter than 9 chars.
- #
- if (index($e,'.') == -1 and length($e) < 9
- and index($pat,'\\.') != -1) {
- push(@matched, "$head$e"), next INNER if &$matchsub("$e.");
- }
- }
- push @retval, @matched if @matched;
- }
- if ($fix_drive_relative_paths) {
- s|^([A-Za-z]:)\./|$1| for @retval;
- }
- return @retval;
-}
-
-#
-# this can be used to override CORE::glob in a specific
-# package by saying C<use File::DosGlob 'glob';> in that
-# namespace.
-#
-
-# context (keyed by second cxix arg provided by core)
-my %iter;
-my %entries;
-
-sub glob {
- my($pat,$cxix) = @_;
- my @pat;
-
- # glob without args defaults to $_
- $pat = $_ unless defined $pat;
-
- # extract patterns
- if ($pat =~ /\s/) {
- require Text::ParseWords;
- @pat = Text::ParseWords::parse_line('\s+',0,$pat);
- }
- else {
- push @pat, $pat;
- }
-
- # Mike Mestnik: made to do abc{1,2,3} == abc1 abc2 abc3.
- # abc3 will be the original {3} (and drop the {}).
- # abc1 abc2 will be put in @appendpat.
- # This was just the esiest way, not nearly the best.
- REHASH: {
- my @appendpat = ();
- for (@pat) {
- # There must be a "," I.E. abc{efg} is not what we want.
- while ( /^(.*)(?<!\\)\{(.*?)(?<!\\)\,.*?(?<!\\)\}(.*)$/ ) {
- my ($start, $match, $end) = ($1, $2, $3);
- #print "Got: \n\t$start\n\t$match\n\t$end\n";
- my $tmp = "$start$match$end";
- while ( $tmp =~ s/^(.*?)(?<!\\)\{(?:.*(?<!\\)\,)?(.*\Q$match\E.*?)(?:(?<!\\)\,.*)?(?<!\\)\}(.*)$/$1$2$3/ ) {
- #print "Striped: $tmp\n";
- # these expansions will be preformed by the original,
- # when we call REHASH.
- }
- push @appendpat, ("$tmp");
- s/^\Q$start\E(?<!\\)\{\Q$match\E(?<!\\)\,/$start\{/;
- if ( /^\Q$start\E(?<!\\)\{(?!.*?(?<!\\)\,.*?\Q$end\E$)(.*)(?<!\\)\}\Q$end\E$/ ) {
- $match = $1;
- #print "GOT: \n\t$start\n\t$match\n\t$end\n\n";
- $_ = "$start$match$end";
- }
- }
- #print "Sould have "GOT" vs "Got"!\n";
- #FIXME: There should be checking for this.
- # How or what should be done about failure is beond me.
- }
- if ( $#appendpat != -1
- ) {
- #print "LOOP\n";
- #FIXME: Max loop, no way! :")
- for ( @appendpat ) {
- push @pat, $_;
- }
- goto REHASH;
- }
- }
- for ( @pat ) {
- s/\\{/{/g;
- s/\\}/}/g;
- s/\\,/,/g;
- }
- #print join ("\n", @pat). "\n";
-
- # assume global context if not provided one
- $cxix = '_G_' unless defined $cxix;
- $iter{$cxix} = 0 unless exists $iter{$cxix};
-
- # if we're just beginning, do it all first
- if ($iter{$cxix} == 0) {
- $entries{$cxix} = [doglob(1, at pat)];
- }
-
- # chuck it all out, quick or slow
- if (wantarray) {
- delete $iter{$cxix};
- return @{delete $entries{$cxix}};
- }
- else {
- if ($iter{$cxix} = scalar @{$entries{$cxix}}) {
- return shift @{$entries{$cxix}};
- }
- else {
- # return undef for EOL
- delete $iter{$cxix};
- delete $entries{$cxix};
- return undef;
- }
- }
-}
-
-{
- no strict 'refs';
-
- sub import {
- my $pkg = shift;
- return unless @_;
- my $sym = shift;
- my $callpkg = ($sym =~ s/^GLOBAL_//s ? 'CORE::GLOBAL' : caller(0));
- *{$callpkg.'::'.$sym} = \&{$pkg.'::'.$sym} if $sym eq 'glob';
- }
-}
-1;
-
-__END__
-
-=head1 NAME
-
-File::DosGlob - DOS like globbing and then some
-
-=head1 SYNOPSIS
-
- require 5.004;
-
- # override CORE::glob in current package
- use File::DosGlob 'glob';
-
- # override CORE::glob in ALL packages (use with extreme caution!)
- use File::DosGlob 'GLOBAL_glob';
-
- @perlfiles = glob "..\\pe?l/*.p?";
- print <..\\pe?l/*.p?>;
-
- # from the command line (overrides only in main::)
- > perl -MFile::DosGlob=glob -e "print <../pe*/*p?>"
-
-=head1 DESCRIPTION
-
-A module that implements DOS-like globbing with a few enhancements.
-It is largely compatible with perlglob.exe (the M$ setargv.obj
-version) in all but one respect--it understands wildcards in
-directory components.
-
-For example, C<<..\\l*b\\file/*glob.p?>> will work as expected (in
-that it will find something like '..\lib\File/DosGlob.pm' alright).
-Note that all path components are case-insensitive, and that
-backslashes and forward slashes are both accepted, and preserved.
-You may have to double the backslashes if you are putting them in
-literally, due to double-quotish parsing of the pattern by perl.
-
-Spaces in the argument delimit distinct patterns, so
-C<glob('*.exe *.dll')> globs all filenames that end in C<.exe>
-or C<.dll>. If you want to put in literal spaces in the glob
-pattern, you can escape them with either double quotes, or backslashes.
-e.g. C<glob('c:/"Program Files"/*/*.dll')>, or
-C<glob('c:/Program\ Files/*/*.dll')>. The argument is tokenized using
-C<Text::ParseWords::parse_line()>, so see L<Text::ParseWords> for details
-of the quoting rules used.
-
-Extending it to csh patterns is left as an exercise to the reader.
-
-=head1 EXPORTS (by request only)
-
-glob()
-
-=head1 BUGS
-
-Should probably be built into the core, and needs to stop
-pandering to DOS habits. Needs a dose of optimizium too.
-
-=head1 AUTHOR
-
-Gurusamy Sarathy <gsar at activestate.com>
-
-=head1 HISTORY
-
-=over 4
-
-=item *
-
-Support for globally overriding glob() (GSAR 3-JUN-98)
-
-=item *
-
-Scalar context, independent iterator context fixes (GSAR 15-SEP-97)
-
-=item *
-
-A few dir-vs-file optimizations result in glob importation being
-10 times faster than using perlglob.exe, and using perlglob.bat is
-only twice as slow as perlglob.exe (GSAR 28-MAY-97)
-
-=item *
-
-Several cleanups prompted by lack of compatible perlglob.exe
-under Borland (GSAR 27-MAY-97)
-
-=item *
-
-Initial version (GSAR 20-FEB-97)
-
-=back
-
-=head1 SEE ALSO
-
-perl
-
-perlglob.bat
-
-Text::ParseWords
-
-=cut
-
Deleted: vendor/perl/dist/lib/File/DosGlob.t
===================================================================
--- vendor/perl/dist/lib/File/DosGlob.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/File/DosGlob.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,132 +0,0 @@
-#!./perl
-
-#
-# test glob() in File::DosGlob
-#
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-use Test::More tests => 20;
-
-# override it in main::
-use File::DosGlob 'glob';
-
-require Cwd;
-
-my $expected;
-$expected = $_ = "op/a*.t";
-my @r = glob;
-is ($_, $expected, 'test if $_ takes as the default');
-cmp_ok(@r, '>=', 9) or diag("|@r|");
-
- at r = <*/a*.t>;
-# atleast {argv,abbrev,anydbm,autoloader,append,arith,array,assignwarn,auto}.t
-cmp_ok(@r, '>=', 9, 'check <*/*>') or diag("|@r|");
-my $r = scalar @r;
-
- at r = ();
-while (defined($_ = <*/a*.t>)) {
- print "# $_\n";
- push @r, $_;
-}
-is(scalar @r, $r, 'check scalar context');
-
- at r = ();
-for (<*/a*.t>) {
- print "# $_\n";
- push @r, $_;
-}
-is(scalar @r, $r, 'check list context');
-
- at r = ();
-while (<*/a*.t>) {
- print "# $_\n";
- push @r, $_;
-}
-is(scalar @r, $r, 'implicit assign to $_ in while()');
-
-my @s = ();
-my $pat = '*/a*.t';
-while (glob ($pat)) {
- print "# $_\n";
- push @s, $_;
-}
-is("@r", "@s", 'explicit glob() gets assign magic too');
-
-package Foo;
-use File::DosGlob 'glob';
-use Test::More;
- at s = ();
-$pat = '*/a*.t';
-while (glob($pat)) {
- print "# $_\n";
- push @s, $_;
-}
-is("@r", "@s", 'in a different package');
-
- at s = ();
-while (<*/a*.t>) {
- my $i = 0;
- print "# $_ <";
- push @s, $_;
- while (<*/b*.t>) {
- print " $_";
- $i++;
- }
- print " >\n";
-}
-is("@r", "@s", 'different glob ops maintain independent contexts');
-
- at s = ();
-eval <<'EOT';
-use File::DosGlob 'GLOBAL_glob';
-package Bar;
-while (<*/a*.t>) {
- my $i = 0;
- print "# $_ <";
- push @s, $_;
- while (glob '*/b*.t') {
- print " $_";
- $i++;
- }
- print " >\n";
-}
-EOT
-is("@r", "@s", 'global override');
-
-# Test that a glob pattern containing ()'s works.
-# NB. The spaces in the glob patterns need to be backslash escaped.
-my $filename_containing_parens = "foo (123) bar";
-SKIP: {
- skip("can't create '$filename_containing_parens': $!", 9)
- unless open my $touch, ">", $filename_containing_parens;
- close $touch;
-
- foreach my $pattern ("foo\\ (*", "*)\\ bar", "foo\\ (1*3)\\ bar") {
- @r = ();
- eval { @r = File::DosGlob::glob($pattern) };
- is($@, "", "eval for glob($pattern)");
- is(scalar @r, 1);
- is($r[0], $filename_containing_parens);
- }
-
- 1 while unlink $filename_containing_parens;
-}
-
-# Test the globbing of a drive relative pattern such as "c:*.pl".
-# NB. previous versions of DosGlob inserted "./ after the drive letter to
-# make the expansion process work correctly. However, while it is harmless,
-# there is no reason for it to be in the result.
-my $cwd = Cwd::cwd();
-if ($cwd =~ /^([a-zA-Z]:)/) {
- my $drive = $1;
- @r = ();
- # This assumes we're in the "t" directory.
- eval { @r = File::DosGlob::glob("${drive}io/*.t") };
- ok(@r and !grep !m|^${drive}io/[^/]*\.t$|, @r);
-} else {
- pass();
-}
Deleted: vendor/perl/dist/lib/File/Fetch.pm
===================================================================
--- vendor/perl/dist/lib/File/Fetch.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/File/Fetch.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1382 +0,0 @@
-package File::Fetch;
-
-use strict;
-use FileHandle;
-use File::Temp;
-use File::Copy;
-use File::Spec;
-use File::Spec::Unix;
-use File::Basename qw[dirname];
-
-use Cwd qw[cwd];
-use Carp qw[carp];
-use IPC::Cmd qw[can_run run QUOTE];
-use File::Path qw[mkpath];
-use File::Temp qw[tempdir];
-use Params::Check qw[check];
-use Module::Load::Conditional qw[can_load];
-use Locale::Maketext::Simple Style => 'gettext';
-
-use vars qw[ $VERBOSE $PREFER_BIN $FROM_EMAIL $USER_AGENT
- $BLACKLIST $METHOD_FAIL $VERSION $METHODS
- $FTP_PASSIVE $TIMEOUT $DEBUG $WARN
- ];
-
-$VERSION = '0.20';
-$VERSION = eval $VERSION; # avoid warnings with development releases
-$PREFER_BIN = 0; # XXX TODO implement
-$FROM_EMAIL = 'File-Fetch at example.com';
-$USER_AGENT = "File::Fetch/$VERSION";
-$BLACKLIST = [qw|ftp|];
-$METHOD_FAIL = { };
-$FTP_PASSIVE = 1;
-$TIMEOUT = 0;
-$DEBUG = 0;
-$WARN = 1;
-
-### methods available to fetch the file depending on the scheme
-$METHODS = {
- http => [ qw|lwp wget curl lftp lynx| ],
- ftp => [ qw|lwp netftp wget curl lftp ncftp ftp| ],
- file => [ qw|lwp lftp file| ],
- rsync => [ qw|rsync| ]
-};
-
-### silly warnings ###
-local $Params::Check::VERBOSE = 1;
-local $Params::Check::VERBOSE = 1;
-local $Module::Load::Conditional::VERBOSE = 0;
-local $Module::Load::Conditional::VERBOSE = 0;
-
-### see what OS we are on, important for file:// uris ###
-use constant ON_WIN => ($^O eq 'MSWin32');
-use constant ON_VMS => ($^O eq 'VMS');
-use constant ON_UNIX => (!ON_WIN);
-use constant HAS_VOL => (ON_WIN);
-use constant HAS_SHARE => (ON_WIN);
-
-
-=pod
-
-=head1 NAME
-
-File::Fetch - A generic file fetching mechanism
-
-=head1 SYNOPSIS
-
- use File::Fetch;
-
- ### build a File::Fetch object ###
- my $ff = File::Fetch->new(uri => 'http://some.where.com/dir/a.txt');
-
- ### fetch the uri to cwd() ###
- my $where = $ff->fetch() or die $ff->error;
-
- ### fetch the uri to /tmp ###
- my $where = $ff->fetch( to => '/tmp' );
-
- ### parsed bits from the uri ###
- $ff->uri;
- $ff->scheme;
- $ff->host;
- $ff->path;
- $ff->file;
-
-=head1 DESCRIPTION
-
-File::Fetch is a generic file fetching mechanism.
-
-It allows you to fetch any file pointed to by a C<ftp>, C<http>,
-C<file>, or C<rsync> uri by a number of different means.
-
-See the C<HOW IT WORKS> section further down for details.
-
-=head1 ACCESSORS
-
-A C<File::Fetch> object has the following accessors
-
-=over 4
-
-=item $ff->uri
-
-The uri you passed to the constructor
-
-=item $ff->scheme
-
-The scheme from the uri (like 'file', 'http', etc)
-
-=item $ff->host
-
-The hostname in the uri. Will be empty if host was originally
-'localhost' for a 'file://' url.
-
-=item $ff->vol
-
-On operating systems with the concept of a volume the second element
-of a file:// is considered to the be volume specification for the file.
-Thus on Win32 this routine returns the volume, on other operating
-systems this returns nothing.
-
-On Windows this value may be empty if the uri is to a network share, in
-which case the 'share' property will be defined. Additionally, volume
-specifications that use '|' as ':' will be converted on read to use ':'.
-
-On VMS, which has a volume concept, this field will be empty because VMS
-file specifications are converted to absolute UNIX format and the volume
-information is transparently included.
-
-=item $ff->share
-
-On systems with the concept of a network share (currently only Windows) returns
-the sharename from a file://// url. On other operating systems returns empty.
-
-=item $ff->path
-
-The path from the uri, will be at least a single '/'.
-
-=item $ff->file
-
-The name of the remote file. For the local file name, the
-result of $ff->output_file will be used.
-
-=cut
-
-
-##########################
-### Object & Accessors ###
-##########################
-
-{
- ### template for autogenerated accessors ###
- my $Tmpl = {
- scheme => { default => 'http' },
- host => { default => 'localhost' },
- path => { default => '/' },
- file => { required => 1 },
- uri => { required => 1 },
- vol => { default => '' }, # windows for file:// uris
- share => { default => '' }, # windows for file:// uris
- _error_msg => { no_override => 1 },
- _error_msg_long => { no_override => 1 },
- };
-
- for my $method ( keys %$Tmpl ) {
- no strict 'refs';
- *$method = sub {
- my $self = shift;
- $self->{$method} = $_[0] if @_;
- return $self->{$method};
- }
- }
-
- sub _create {
- my $class = shift;
- my %hash = @_;
-
- my $args = check( $Tmpl, \%hash ) or return;
-
- bless $args, $class;
-
- if( lc($args->scheme) ne 'file' and not $args->host ) {
- return File::Fetch->_error(loc(
- "Hostname required when fetching from '%1'",$args->scheme));
- }
-
- for (qw[path file]) {
- unless( $args->$_() ) { # 5.5.x needs the ()
- return File::Fetch->_error(loc("No '%1' specified",$_));
- }
- }
-
- return $args;
- }
-}
-
-=item $ff->output_file
-
-The name of the output file. This is the same as $ff->file,
-but any query parameters are stripped off. For example:
-
- http://example.com/index.html?x=y
-
-would make the output file be C<index.html> rather than
-C<index.html?x=y>.
-
-=back
-
-=cut
-
-sub output_file {
- my $self = shift;
- my $file = $self->file;
-
- $file =~ s/\?.*$//g;
-
- return $file;
-}
-
-### XXX do this or just point to URI::Escape?
-# =head2 $esc_uri = $ff->escaped_uri
-#
-# =cut
-#
-# ### most of this is stolen straight from URI::escape
-# { ### Build a char->hex map
-# my %escapes = map { chr($_) => sprintf("%%%02X", $_) } 0..255;
-#
-# sub escaped_uri {
-# my $self = shift;
-# my $uri = $self->uri;
-#
-# ### Default unsafe characters. RFC 2732 ^(uric - reserved)
-# $uri =~ s/([^A-Za-z0-9\-_.!~*'()])/
-# $escapes{$1} || $self->_fail_hi($1)/ge;
-#
-# return $uri;
-# }
-#
-# sub _fail_hi {
-# my $self = shift;
-# my $char = shift;
-#
-# $self->_error(loc(
-# "Can't escape '%1', try using the '%2' module instead",
-# sprintf("\\x{%04X}", ord($char)), 'URI::Escape'
-# ));
-# }
-#
-# sub output_file {
-#
-# }
-#
-#
-# }
-
-=head1 METHODS
-
-=head2 $ff = File::Fetch->new( uri => 'http://some.where.com/dir/file.txt' );
-
-Parses the uri and creates a corresponding File::Fetch::Item object,
-that is ready to be C<fetch>ed and returns it.
-
-Returns false on failure.
-
-=cut
-
-sub new {
- my $class = shift;
- my %hash = @_;
-
- my ($uri);
- my $tmpl = {
- uri => { required => 1, store => \$uri },
- };
-
- check( $tmpl, \%hash ) or return;
-
- ### parse the uri to usable parts ###
- my $href = __PACKAGE__->_parse_uri( $uri ) or return;
-
- ### make it into a FFI object ###
- my $ff = File::Fetch->_create( %$href ) or return;
-
-
- ### return the object ###
- return $ff;
-}
-
-### parses an uri to a hash structure:
-###
-### $class->_parse_uri( 'ftp://ftp.cpan.org/pub/mirror/index.txt' )
-###
-### becomes:
-###
-### $href = {
-### scheme => 'ftp',
-### host => 'ftp.cpan.org',
-### path => '/pub/mirror',
-### file => 'index.html'
-### };
-###
-### In the case of file:// urls there maybe be additional fields
-###
-### For systems with volume specifications such as Win32 there will be
-### a volume specifier provided in the 'vol' field.
-###
-### 'vol' => 'volumename'
-###
-### For windows file shares there may be a 'share' key specified
-###
-### 'share' => 'sharename'
-###
-### Note that the rules of what a file:// url means vary by the operating system
-### of the host being addressed. Thus file:///d|/foo/bar.txt means the obvious
-### 'D:\foo\bar.txt' on windows, but on unix it means '/d|/foo/bar.txt' and
-### not '/foo/bar.txt'
-###
-### Similarly if the host interpreting the url is VMS then
-### file:///disk$user/my/notes/note12345.txt' means
-### 'DISK$USER:[MY.NOTES]NOTE123456.TXT' but will be returned the same as
-### if it is unix where it means /disk$user/my/notes/note12345.txt'.
-### Except for some cases in the File::Spec methods, Perl on VMS will generally
-### handle UNIX format file specifications.
-###
-### This means it is impossible to serve certain file:// urls on certain systems.
-###
-### Thus are the problems with a protocol-less specification. :-(
-###
-
-sub _parse_uri {
- my $self = shift;
- my $uri = shift or return;
-
- my $href = { uri => $uri };
-
- ### find the scheme ###
- $uri =~ s|^(\w+)://||;
- $href->{scheme} = $1;
-
- ### See rfc 1738 section 3.10
- ### http://www.faqs.org/rfcs/rfc1738.html
- ### And wikipedia for more on windows file:// urls
- ### http://en.wikipedia.org/wiki/File://
- if( $href->{scheme} eq 'file' ) {
-
- my @parts = split '/',$uri;
-
- ### file://hostname/...
- ### file://hostname/...
- ### normalize file://localhost with file:///
- $href->{host} = $parts[0] || '';
-
- ### index in @parts where the path components begin;
- my $index = 1;
-
- ### file:////hostname/sharename/blah.txt
- if ( HAS_SHARE and not length $parts[0] and not length $parts[1] ) {
-
- $href->{host} = $parts[2] || ''; # avoid warnings
- $href->{share} = $parts[3] || ''; # avoid warnings
-
- $index = 4 # index after the share
-
- ### file:///D|/blah.txt
- ### file:///D:/blah.txt
- } elsif (HAS_VOL) {
-
- ### this code comes from dmq's patch, but:
- ### XXX if volume is empty, wouldn't that be an error? --kane
- ### if so, our file://localhost test needs to be fixed as wel
- $href->{vol} = $parts[1] || '';
-
- ### correct D| style colume descriptors
- $href->{vol} =~ s/\A([A-Z])\|\z/$1:/i if ON_WIN;
-
- $index = 2; # index after the volume
- }
-
- ### rebuild the path from the leftover parts;
- $href->{path} = join '/', '', splice( @parts, $index, $#parts );
-
- } else {
- ### using anything but qw() in hash slices may produce warnings
- ### in older perls :-(
- @{$href}{ qw(host path) } = $uri =~ m|([^/]*)(/.*)$|s;
- }
-
- ### split the path into file + dir ###
- { my @parts = File::Spec::Unix->splitpath( delete $href->{path} );
- $href->{path} = $parts[1];
- $href->{file} = $parts[2];
- }
-
- ### host will be empty if the target was 'localhost' and the
- ### scheme was 'file'
- $href->{host} = '' if ($href->{host} eq 'localhost') and
- ($href->{scheme} eq 'file');
-
- return $href;
-}
-
-=head2 $where = $ff->fetch( [to => /my/output/dir/ | \$scalar] )
-
-Fetches the file you requested and returns the full path to the file.
-
-By default it writes to C<cwd()>, but you can override that by specifying
-the C<to> argument:
-
- ### file fetch to /tmp, full path to the file in $where
- $where = $ff->fetch( to => '/tmp' );
-
- ### file slurped into $scalar, full path to the file in $where
- ### file is downloaded to a temp directory and cleaned up at exit time
- $where = $ff->fetch( to => \$scalar );
-
-Returns the full path to the downloaded file on success, and false
-on failure.
-
-=cut
-
-sub fetch {
- my $self = shift or return;
- my %hash = @_;
-
- my $target;
- my $tmpl = {
- to => { default => cwd(), store => \$target },
- };
-
- check( $tmpl, \%hash ) or return;
-
- my ($to, $fh);
- ### you want us to slurp the contents
- if( ref $target and UNIVERSAL::isa( $target, 'SCALAR' ) ) {
- $to = tempdir( 'FileFetch.XXXXXX', CLEANUP => 1 );
-
- ### plain old fetch
- } else {
- $to = $target;
-
- ### On VMS force to VMS format so File::Spec will work.
- $to = VMS::Filespec::vmspath($to) if ON_VMS;
-
- ### create the path if it doesn't exist yet ###
- unless( -d $to ) {
- eval { mkpath( $to ) };
-
- return $self->_error(loc("Could not create path '%1'",$to)) if $@;
- }
- }
-
- ### set passive ftp if required ###
- local $ENV{FTP_PASSIVE} = $FTP_PASSIVE;
-
- ### we dont use catfile on win32 because if we are using a cygwin tool
- ### under cmd.exe they wont understand windows style separators.
- my $out_to = ON_WIN ? $to.'/'.$self->output_file
- : File::Spec->catfile( $to, $self->output_file );
-
- for my $method ( @{ $METHODS->{$self->scheme} } ) {
- my $sub = '_'.$method.'_fetch';
-
- unless( __PACKAGE__->can($sub) ) {
- $self->_error(loc("Cannot call method for '%1' -- WEIRD!",
- $method));
- next;
- }
-
- ### method is blacklisted ###
- next if grep { lc $_ eq $method } @$BLACKLIST;
-
- ### method is known to fail ###
- next if $METHOD_FAIL->{$method};
-
- ### there's serious issues with IPC::Run and quoting of command
- ### line arguments. using quotes in the wrong place breaks things,
- ### and in the case of say,
- ### C:\cygwin\bin\wget.EXE --quiet --passive-ftp --output-document
- ### "index.html" "http://www.cpan.org/index.html?q=1&y=2"
- ### it doesn't matter how you quote, it always fails.
- local $IPC::Cmd::USE_IPC_RUN = 0;
-
- if( my $file = $self->$sub(
- to => $out_to
- )){
-
- unless( -e $file && -s _ ) {
- $self->_error(loc("'%1' said it fetched '%2', ".
- "but it was not created",$method,$file));
-
- ### mark the failure ###
- $METHOD_FAIL->{$method} = 1;
-
- next;
-
- } else {
-
- ### slurp mode?
- if( ref $target and UNIVERSAL::isa( $target, 'SCALAR' ) ) {
-
- ### open the file
- open my $fh, $file or do {
- $self->_error(
- loc("Could not open '%1': %2", $file, $!));
- return;
- };
-
- ### slurp
- $$target = do { local $/; <$fh> };
-
- }
-
- my $abs = File::Spec->rel2abs( $file );
- return $abs;
-
- }
- }
- }
-
-
- ### if we got here, we looped over all methods, but we weren't able
- ### to fetch it.
- return;
-}
-
-########################
-### _*_fetch methods ###
-########################
-
-### LWP fetching ###
-sub _lwp_fetch {
- my $self = shift;
- my %hash = @_;
-
- my ($to);
- my $tmpl = {
- to => { required => 1, store => \$to }
- };
- check( $tmpl, \%hash ) or return;
-
- ### modules required to download with lwp ###
- my $use_list = {
- LWP => '0.0',
- 'LWP::UserAgent' => '0.0',
- 'HTTP::Request' => '0.0',
- 'HTTP::Status' => '0.0',
- URI => '0.0',
-
- };
-
- if( can_load(modules => $use_list) ) {
-
- ### setup the uri object
- my $uri = URI->new( File::Spec::Unix->catfile(
- $self->path, $self->file
- ) );
-
- ### special rules apply for file:// uris ###
- $uri->scheme( $self->scheme );
- $uri->host( $self->scheme eq 'file' ? '' : $self->host );
- $uri->userinfo("anonymous:$FROM_EMAIL") if $self->scheme ne 'file';
-
- ### set up the useragent object
- my $ua = LWP::UserAgent->new();
- $ua->timeout( $TIMEOUT ) if $TIMEOUT;
- $ua->agent( $USER_AGENT );
- $ua->from( $FROM_EMAIL );
- $ua->env_proxy;
-
- my $res = $ua->mirror($uri, $to) or return;
-
- ### uptodate or fetched ok ###
- if ( $res->code == 304 or $res->code == 200 ) {
- return $to;
-
- } else {
- return $self->_error(loc("Fetch failed! HTTP response: %1 %2 [%3]",
- $res->code, HTTP::Status::status_message($res->code),
- $res->status_line));
- }
-
- } else {
- $METHOD_FAIL->{'lwp'} = 1;
- return;
- }
-}
-
-### Net::FTP fetching
-sub _netftp_fetch {
- my $self = shift;
- my %hash = @_;
-
- my ($to);
- my $tmpl = {
- to => { required => 1, store => \$to }
- };
- check( $tmpl, \%hash ) or return;
-
- ### required modules ###
- my $use_list = { 'Net::FTP' => 0 };
-
- if( can_load( modules => $use_list ) ) {
-
- ### make connection ###
- my $ftp;
- my @options = ($self->host);
- push(@options, Timeout => $TIMEOUT) if $TIMEOUT;
- unless( $ftp = Net::FTP->new( @options ) ) {
- return $self->_error(loc("Ftp creation failed: %1",$@));
- }
-
- ### login ###
- unless( $ftp->login( anonymous => $FROM_EMAIL ) ) {
- return $self->_error(loc("Could not login to '%1'",$self->host));
- }
-
- ### set binary mode, just in case ###
- $ftp->binary;
-
- ### create the remote path
- ### remember remote paths are unix paths! [#11483]
- my $remote = File::Spec::Unix->catfile( $self->path, $self->file );
-
- ### fetch the file ###
- my $target;
- unless( $target = $ftp->get( $remote, $to ) ) {
- return $self->_error(loc("Could not fetch '%1' from '%2'",
- $remote, $self->host));
- }
-
- ### log out ###
- $ftp->quit;
-
- return $target;
-
- } else {
- $METHOD_FAIL->{'netftp'} = 1;
- return;
- }
-}
-
-### /bin/wget fetch ###
-sub _wget_fetch {
- my $self = shift;
- my %hash = @_;
-
- my ($to);
- my $tmpl = {
- to => { required => 1, store => \$to }
- };
- check( $tmpl, \%hash ) or return;
-
- ### see if we have a wget binary ###
- if( my $wget = can_run('wget') ) {
-
- ### no verboseness, thanks ###
- my $cmd = [ $wget, '--quiet' ];
-
- ### if a timeout is set, add it ###
- push(@$cmd, '--timeout=' . $TIMEOUT) if $TIMEOUT;
-
- ### run passive if specified ###
- push @$cmd, '--passive-ftp' if $FTP_PASSIVE;
-
- ### set the output document, add the uri ###
- push @$cmd, '--output-document', $to, $self->uri;
-
- ### with IPC::Cmd > 0.41, this is fixed in teh library,
- ### and there's no need for special casing any more.
- ### DO NOT quote things for IPC::Run, it breaks stuff.
- # $IPC::Cmd::USE_IPC_RUN
- # ? ($to, $self->uri)
- # : (QUOTE. $to .QUOTE, QUOTE. $self->uri .QUOTE);
-
- ### shell out ###
- my $captured;
- unless(run( command => $cmd,
- buffer => \$captured,
- verbose => $DEBUG
- )) {
- ### wget creates the output document always, even if the fetch
- ### fails.. so unlink it in that case
- 1 while unlink $to;
-
- return $self->_error(loc( "Command failed: %1", $captured || '' ));
- }
-
- return $to;
-
- } else {
- $METHOD_FAIL->{'wget'} = 1;
- return;
- }
-}
-
-### /bin/lftp fetch ###
-sub _lftp_fetch {
- my $self = shift;
- my %hash = @_;
-
- my ($to);
- my $tmpl = {
- to => { required => 1, store => \$to }
- };
- check( $tmpl, \%hash ) or return;
-
- ### see if we have a wget binary ###
- if( my $lftp = can_run('lftp') ) {
-
- ### no verboseness, thanks ###
- my $cmd = [ $lftp, '-f' ];
-
- my $fh = File::Temp->new;
-
- my $str;
-
- ### if a timeout is set, add it ###
- $str .= "set net:timeout $TIMEOUT;\n" if $TIMEOUT;
-
- ### run passive if specified ###
- $str .= "set ftp:passive-mode 1;\n" if $FTP_PASSIVE;
-
- ### set the output document, add the uri ###
- ### quote the URI, because lftp supports certain shell
- ### expansions, most notably & for backgrounding.
- ### ' quote does nto work, must be "
- $str .= q[get ']. $self->uri .q[' -o ]. $to . $/;
-
- if( $DEBUG ) {
- my $pp_str = join ' ', split $/, $str;
- print "# lftp command: $pp_str\n";
- }
-
- ### write straight to the file.
- $fh->autoflush(1);
- print $fh $str;
-
- ### the command needs to be 1 string to be executed
- push @$cmd, $fh->filename;
-
- ### with IPC::Cmd > 0.41, this is fixed in teh library,
- ### and there's no need for special casing any more.
- ### DO NOT quote things for IPC::Run, it breaks stuff.
- # $IPC::Cmd::USE_IPC_RUN
- # ? ($to, $self->uri)
- # : (QUOTE. $to .QUOTE, QUOTE. $self->uri .QUOTE);
-
-
- ### shell out ###
- my $captured;
- unless(run( command => $cmd,
- buffer => \$captured,
- verbose => $DEBUG
- )) {
- ### wget creates the output document always, even if the fetch
- ### fails.. so unlink it in that case
- 1 while unlink $to;
-
- return $self->_error(loc( "Command failed: %1", $captured || '' ));
- }
-
- return $to;
-
- } else {
- $METHOD_FAIL->{'lftp'} = 1;
- return;
- }
-}
-
-
-
-### /bin/ftp fetch ###
-sub _ftp_fetch {
- my $self = shift;
- my %hash = @_;
-
- my ($to);
- my $tmpl = {
- to => { required => 1, store => \$to }
- };
- check( $tmpl, \%hash ) or return;
-
- ### see if we have a ftp binary ###
- if( my $ftp = can_run('ftp') ) {
-
- my $fh = FileHandle->new;
-
- local $SIG{CHLD} = 'IGNORE';
-
- unless ($fh->open("|$ftp -n")) {
- return $self->_error(loc("%1 creation failed: %2", $ftp, $!));
- }
-
- my @dialog = (
- "lcd " . dirname($to),
- "open " . $self->host,
- "user anonymous $FROM_EMAIL",
- "cd /",
- "cd " . $self->path,
- "binary",
- "get " . $self->file . " " . $self->output_file,
- "quit",
- );
-
- foreach (@dialog) { $fh->print($_, "\n") }
- $fh->close or return;
-
- return $to;
- }
-}
-
-### lynx is stupid - it decompresses any .gz file it finds to be text
-### use /bin/lynx to fetch files
-sub _lynx_fetch {
- my $self = shift;
- my %hash = @_;
-
- my ($to);
- my $tmpl = {
- to => { required => 1, store => \$to }
- };
- check( $tmpl, \%hash ) or return;
-
- ### see if we have a lynx binary ###
- if( my $lynx = can_run('lynx') ) {
-
- unless( IPC::Cmd->can_capture_buffer ) {
- $METHOD_FAIL->{'lynx'} = 1;
-
- return $self->_error(loc(
- "Can not capture buffers. Can not use '%1' to fetch files",
- 'lynx' ));
- }
-
- ### check if the HTTP resource exists ###
- if ($self->uri =~ /^https?:\/\//i) {
- my $cmd = [
- $lynx,
- '-head',
- '-source',
- "-auth=anonymous:$FROM_EMAIL",
- ];
-
- push @$cmd, "-connect_timeout=$TIMEOUT" if $TIMEOUT;
-
- push @$cmd, $self->uri;
-
- ### shell out ###
- my $head;
- unless(run( command => $cmd,
- buffer => \$head,
- verbose => $DEBUG )
- ) {
- return $self->_error(loc("Command failed: %1", $head || ''));
- }
-
- unless($head =~ /^HTTP\/\d+\.\d+ 200\b/) {
- return $self->_error(loc("Command failed: %1", $head || ''));
- }
- }
-
- ### write to the output file ourselves, since lynx ass_u_mes to much
- my $local = FileHandle->new(">$to")
- or return $self->_error(loc(
- "Could not open '%1' for writing: %2",$to,$!));
-
- ### dump to stdout ###
- my $cmd = [
- $lynx,
- '-source',
- "-auth=anonymous:$FROM_EMAIL",
- ];
-
- push @$cmd, "-connect_timeout=$TIMEOUT" if $TIMEOUT;
-
- ### DO NOT quote things for IPC::Run, it breaks stuff.
- push @$cmd, $self->uri;
-
- ### with IPC::Cmd > 0.41, this is fixed in teh library,
- ### and there's no need for special casing any more.
- ### DO NOT quote things for IPC::Run, it breaks stuff.
- # $IPC::Cmd::USE_IPC_RUN
- # ? $self->uri
- # : QUOTE. $self->uri .QUOTE;
-
-
- ### shell out ###
- my $captured;
- unless(run( command => $cmd,
- buffer => \$captured,
- verbose => $DEBUG )
- ) {
- return $self->_error(loc("Command failed: %1", $captured || ''));
- }
-
- ### print to local file ###
- ### XXX on a 404 with a special error page, $captured will actually
- ### hold the contents of that page, and make it *appear* like the
- ### request was a success, when really it wasn't :(
- ### there doesn't seem to be an option for lynx to change the exit
- ### code based on a 4XX status or so.
- ### the closest we can come is using --error_file and parsing that,
- ### which is very unreliable ;(
- $local->print( $captured );
- $local->close or return;
-
- return $to;
-
- } else {
- $METHOD_FAIL->{'lynx'} = 1;
- return;
- }
-}
-
-### use /bin/ncftp to fetch files
-sub _ncftp_fetch {
- my $self = shift;
- my %hash = @_;
-
- my ($to);
- my $tmpl = {
- to => { required => 1, store => \$to }
- };
- check( $tmpl, \%hash ) or return;
-
- ### we can only set passive mode in interactive sesssions, so bail out
- ### if $FTP_PASSIVE is set
- return if $FTP_PASSIVE;
-
- ### see if we have a ncftp binary ###
- if( my $ncftp = can_run('ncftp') ) {
-
- my $cmd = [
- $ncftp,
- '-V', # do not be verbose
- '-p', $FROM_EMAIL, # email as password
- $self->host, # hostname
- dirname($to), # local dir for the file
- # remote path to the file
- ### DO NOT quote things for IPC::Run, it breaks stuff.
- $IPC::Cmd::USE_IPC_RUN
- ? File::Spec::Unix->catdir( $self->path, $self->file )
- : QUOTE. File::Spec::Unix->catdir(
- $self->path, $self->file ) .QUOTE
-
- ];
-
- ### shell out ###
- my $captured;
- unless(run( command => $cmd,
- buffer => \$captured,
- verbose => $DEBUG )
- ) {
- return $self->_error(loc("Command failed: %1", $captured || ''));
- }
-
- return $to;
-
- } else {
- $METHOD_FAIL->{'ncftp'} = 1;
- return;
- }
-}
-
-### use /bin/curl to fetch files
-sub _curl_fetch {
- my $self = shift;
- my %hash = @_;
-
- my ($to);
- my $tmpl = {
- to => { required => 1, store => \$to }
- };
- check( $tmpl, \%hash ) or return;
-
- if (my $curl = can_run('curl')) {
-
- ### these long opts are self explanatory - I like that -jmb
- my $cmd = [ $curl, '-q' ];
-
- push(@$cmd, '--connect-timeout', $TIMEOUT) if $TIMEOUT;
-
- push(@$cmd, '--silent') unless $DEBUG;
-
- ### curl does the right thing with passive, regardless ###
- if ($self->scheme eq 'ftp') {
- push(@$cmd, '--user', "anonymous:$FROM_EMAIL");
- }
-
- ### curl doesn't follow 302 (temporarily moved) etc automatically
- ### so we add --location to enable that.
- push @$cmd, '--fail', '--location', '--output', $to, $self->uri;
-
- ### with IPC::Cmd > 0.41, this is fixed in teh library,
- ### and there's no need for special casing any more.
- ### DO NOT quote things for IPC::Run, it breaks stuff.
- # $IPC::Cmd::USE_IPC_RUN
- # ? ($to, $self->uri)
- # : (QUOTE. $to .QUOTE, QUOTE. $self->uri .QUOTE);
-
-
- my $captured;
- unless(run( command => $cmd,
- buffer => \$captured,
- verbose => $DEBUG )
- ) {
-
- return $self->_error(loc("Command failed: %1", $captured || ''));
- }
-
- return $to;
-
- } else {
- $METHOD_FAIL->{'curl'} = 1;
- return;
- }
-}
-
-
-### use File::Copy for fetching file:// urls ###
-###
-### See section 3.10 of RFC 1738 (http://www.faqs.org/rfcs/rfc1738.html)
-### Also see wikipedia on file:// (http://en.wikipedia.org/wiki/File://)
-###
-
-sub _file_fetch {
- my $self = shift;
- my %hash = @_;
-
- my ($to);
- my $tmpl = {
- to => { required => 1, store => \$to }
- };
- check( $tmpl, \%hash ) or return;
-
-
-
- ### prefix a / on unix systems with a file uri, since it would
- ### look somewhat like this:
- ### file:///home/kane/file
- ### wheras windows file uris for 'c:\some\dir\file' might look like:
- ### file:///C:/some/dir/file
- ### file:///C|/some/dir/file
- ### or for a network share '\\host\share\some\dir\file':
- ### file:////host/share/some/dir/file
- ###
- ### VMS file uri's for 'DISK$USER:[MY.NOTES]NOTE123456.TXT' might look like:
- ### file://vms.host.edu/disk$user/my/notes/note12345.txt
- ###
-
- my $path = $self->path;
- my $vol = $self->vol;
- my $share = $self->share;
-
- my $remote;
- if (!$share and $self->host) {
- return $self->_error(loc(
- "Currently %1 cannot handle hosts in %2 urls",
- 'File::Fetch', 'file://'
- ));
- }
-
- if( $vol ) {
- $path = File::Spec->catdir( split /\//, $path );
- $remote = File::Spec->catpath( $vol, $path, $self->file);
-
- } elsif( $share ) {
- ### win32 specific, and a share name, so we wont bother with File::Spec
- $path =~ s|/+|\\|g;
- $remote = "\\\\".$self->host."\\$share\\$path";
-
- } else {
- ### File::Spec on VMS can not currently handle UNIX syntax.
- my $file_class = ON_VMS
- ? 'File::Spec::Unix'
- : 'File::Spec';
-
- $remote = $file_class->catfile( $path, $self->file );
- }
-
- ### File::Copy is littered with 'die' statements :( ###
- my $rv = eval { File::Copy::copy( $remote, $to ) };
-
- ### something went wrong ###
- if( !$rv or $@ ) {
- return $self->_error(loc("Could not copy '%1' to '%2': %3 %4",
- $remote, $to, $!, $@));
- }
-
- return $to;
-}
-
-### use /usr/bin/rsync to fetch files
-sub _rsync_fetch {
- my $self = shift;
- my %hash = @_;
-
- my ($to);
- my $tmpl = {
- to => { required => 1, store => \$to }
- };
- check( $tmpl, \%hash ) or return;
-
- if (my $rsync = can_run('rsync')) {
-
- my $cmd = [ $rsync ];
-
- ### XXX: rsync has no I/O timeouts at all, by default
- push(@$cmd, '--timeout=' . $TIMEOUT) if $TIMEOUT;
-
- push(@$cmd, '--quiet') unless $DEBUG;
-
- ### DO NOT quote things for IPC::Run, it breaks stuff.
- push @$cmd, $self->uri, $to;
-
- ### with IPC::Cmd > 0.41, this is fixed in teh library,
- ### and there's no need for special casing any more.
- ### DO NOT quote things for IPC::Run, it breaks stuff.
- # $IPC::Cmd::USE_IPC_RUN
- # ? ($to, $self->uri)
- # : (QUOTE. $to .QUOTE, QUOTE. $self->uri .QUOTE);
-
- my $captured;
- unless(run( command => $cmd,
- buffer => \$captured,
- verbose => $DEBUG )
- ) {
-
- return $self->_error(loc("Command %1 failed: %2",
- "@$cmd" || '', $captured || ''));
- }
-
- return $to;
-
- } else {
- $METHOD_FAIL->{'rsync'} = 1;
- return;
- }
-}
-
-#################################
-#
-# Error code
-#
-#################################
-
-=pod
-
-=head2 $ff->error([BOOL])
-
-Returns the last encountered error as string.
-Pass it a true value to get the C<Carp::longmess()> output instead.
-
-=cut
-
-### error handling the way Archive::Extract does it
-sub _error {
- my $self = shift;
- my $error = shift;
-
- $self->_error_msg( $error );
- $self->_error_msg_long( Carp::longmess($error) );
-
- if( $WARN ) {
- carp $DEBUG ? $self->_error_msg_long : $self->_error_msg;
- }
-
- return;
-}
-
-sub error {
- my $self = shift;
- return shift() ? $self->_error_msg_long : $self->_error_msg;
-}
-
-
-1;
-
-=pod
-
-=head1 HOW IT WORKS
-
-File::Fetch is able to fetch a variety of uris, by using several
-external programs and modules.
-
-Below is a mapping of what utilities will be used in what order
-for what schemes, if available:
-
- file => LWP, lftp, file
- http => LWP, wget, curl, lftp, lynx
- ftp => LWP, Net::FTP, wget, curl, lftp, ncftp, ftp
- rsync => rsync
-
-If you'd like to disable the use of one or more of these utilities
-and/or modules, see the C<$BLACKLIST> variable further down.
-
-If a utility or module isn't available, it will be marked in a cache
-(see the C<$METHOD_FAIL> variable further down), so it will not be
-tried again. The C<fetch> method will only fail when all options are
-exhausted, and it was not able to retrieve the file.
-
-A special note about fetching files from an ftp uri:
-
-By default, all ftp connections are done in passive mode. To change
-that, see the C<$FTP_PASSIVE> variable further down.
-
-Furthermore, ftp uris only support anonymous connections, so no
-named user/password pair can be passed along.
-
-C</bin/ftp> is blacklisted by default; see the C<$BLACKLIST> variable
-further down.
-
-=head1 GLOBAL VARIABLES
-
-The behaviour of File::Fetch can be altered by changing the following
-global variables:
-
-=head2 $File::Fetch::FROM_EMAIL
-
-This is the email address that will be sent as your anonymous ftp
-password.
-
-Default is C<File-Fetch at example.com>.
-
-=head2 $File::Fetch::USER_AGENT
-
-This is the useragent as C<LWP> will report it.
-
-Default is C<File::Fetch/$VERSION>.
-
-=head2 $File::Fetch::FTP_PASSIVE
-
-This variable controls whether the environment variable C<FTP_PASSIVE>
-and any passive switches to commandline tools will be set to true.
-
-Default value is 1.
-
-Note: When $FTP_PASSIVE is true, C<ncftp> will not be used to fetch
-files, since passive mode can only be set interactively for this binary
-
-=head2 $File::Fetch::TIMEOUT
-
-When set, controls the network timeout (counted in seconds).
-
-Default value is 0.
-
-=head2 $File::Fetch::WARN
-
-This variable controls whether errors encountered internally by
-C<File::Fetch> should be C<carp>'d or not.
-
-Set to false to silence warnings. Inspect the output of the C<error()>
-method manually to see what went wrong.
-
-Defaults to C<true>.
-
-=head2 $File::Fetch::DEBUG
-
-This enables debugging output when calling commandline utilities to
-fetch files.
-This also enables C<Carp::longmess> errors, instead of the regular
-C<carp> errors.
-
-Good for tracking down why things don't work with your particular
-setup.
-
-Default is 0.
-
-=head2 $File::Fetch::BLACKLIST
-
-This is an array ref holding blacklisted modules/utilities for fetching
-files with.
-
-To disallow the use of, for example, C<LWP> and C<Net::FTP>, you could
-set $File::Fetch::BLACKLIST to:
-
- $File::Fetch::BLACKLIST = [qw|lwp netftp|]
-
-The default blacklist is [qw|ftp|], as C</bin/ftp> is rather unreliable.
-
-See the note on C<MAPPING> below.
-
-=head2 $File::Fetch::METHOD_FAIL
-
-This is a hashref registering what modules/utilities were known to fail
-for fetching files (mostly because they weren't installed).
-
-You can reset this cache by assigning an empty hashref to it, or
-individually remove keys.
-
-See the note on C<MAPPING> below.
-
-=head1 MAPPING
-
-
-Here's a quick mapping for the utilities/modules, and their names for
-the $BLACKLIST, $METHOD_FAIL and other internal functions.
-
- LWP => lwp
- Net::FTP => netftp
- wget => wget
- lynx => lynx
- ncftp => ncftp
- ftp => ftp
- curl => curl
- rsync => rsync
- lftp => lftp
-
-=head1 FREQUENTLY ASKED QUESTIONS
-
-=head2 So how do I use a proxy with File::Fetch?
-
-C<File::Fetch> currently only supports proxies with LWP::UserAgent.
-You will need to set your environment variables accordingly. For
-example, to use an ftp proxy:
-
- $ENV{ftp_proxy} = 'foo.com';
-
-Refer to the LWP::UserAgent manpage for more details.
-
-=head2 I used 'lynx' to fetch a file, but its contents is all wrong!
-
-C<lynx> can only fetch remote files by dumping its contents to C<STDOUT>,
-which we in turn capture. If that content is a 'custom' error file
-(like, say, a C<404 handler>), you will get that contents instead.
-
-Sadly, C<lynx> doesn't support any options to return a different exit
-code on non-C<200 OK> status, giving us no way to tell the difference
-between a 'successfull' fetch and a custom error page.
-
-Therefor, we recommend to only use C<lynx> as a last resort. This is
-why it is at the back of our list of methods to try as well.
-
-=head2 Files I'm trying to fetch have reserved characters or non-ASCII characters in them. What do I do?
-
-C<File::Fetch> is relatively smart about things. When trying to write
-a file to disk, it removes the C<query parameters> (see the
-C<output_file> method for details) from the file name before creating
-it. In most cases this suffices.
-
-If you have any other characters you need to escape, please install
-the C<URI::Escape> module from CPAN, and pre-encode your URI before
-passing it to C<File::Fetch>. You can read about the details of URIs
-and URI encoding here:
-
- http://www.faqs.org/rfcs/rfc2396.html
-
-=head1 TODO
-
-=over 4
-
-=item Implement $PREFER_BIN
-
-To indicate to rather use commandline tools than modules
-
-=back
-
-=head1 BUG REPORTS
-
-Please report bugs or other issues to E<lt>bug-file-fetch at rt.cpan.org<gt>.
-
-=head1 AUTHOR
-
-This module by Jos Boumans E<lt>kane at cpan.orgE<gt>.
-
-=head1 COPYRIGHT
-
-This library is free software; you may redistribute and/or modify it
-under the same terms as Perl itself.
-
-
-=cut
-
-# Local variables:
-# c-indentation-style: bsd
-# c-basic-offset: 4
-# indent-tabs-mode: nil
-# End:
-# vim: expandtab shiftwidth=4:
-
-
-
-
Deleted: vendor/perl/dist/lib/File/Path.pm
===================================================================
--- vendor/perl/dist/lib/File/Path.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/File/Path.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,895 +0,0 @@
-package File::Path;
-
-use 5.005_04;
-use strict;
-
-use Cwd 'getcwd';
-use File::Basename ();
-use File::Spec ();
-
-BEGIN {
- if ($] < 5.006) {
- # can't say 'opendir my $dh, $dirname'
- # need to initialise $dh
- eval "use Symbol";
- }
-}
-
-use Exporter ();
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = '2.07_03';
- at ISA = qw(Exporter);
- at EXPORT = qw(mkpath rmtree);
- at EXPORT_OK = qw(make_path remove_tree);
-
-my $Is_VMS = $^O eq 'VMS';
-my $Is_MacOS = $^O eq 'MacOS';
-
-# These OSes complain if you want to remove a file that you have no
-# write permission to:
-my $Force_Writeable = grep {$^O eq $_} qw(amigaos dos epoc MSWin32 MacOS os2);
-
-# Unix-like systems need to stat each directory in order to detect
-# race condition. MS-Windows is immune to this particular attack.
-my $Need_Stat_Check = !($^O eq 'MSWin32');
-
-sub _carp {
- require Carp;
- goto &Carp::carp;
-}
-
-sub _croak {
- require Carp;
- goto &Carp::croak;
-}
-
-sub _error {
- my $arg = shift;
- my $message = shift;
- my $object = shift;
-
- if ($arg->{error}) {
- $object = '' unless defined $object;
- $message .= ": $!" if $!;
- push @{${$arg->{error}}}, {$object => $message};
- }
- else {
- _carp(defined($object) ? "$message for $object: $!" : "$message: $!");
- }
-}
-
-sub make_path {
- push @_, {} unless @_ and UNIVERSAL::isa($_[-1],'HASH');
- goto &mkpath;
-}
-
-sub mkpath {
- my $old_style = !(@_ and UNIVERSAL::isa($_[-1],'HASH'));
-
- my $arg;
- my $paths;
-
- if ($old_style) {
- my ($verbose, $mode);
- ($paths, $verbose, $mode) = @_;
- $paths = [$paths] unless UNIVERSAL::isa($paths,'ARRAY');
- $arg->{verbose} = $verbose;
- $arg->{mode} = defined $mode ? $mode : 0777;
- }
- else {
- $arg = pop @_;
- $arg->{mode} = delete $arg->{mask} if exists $arg->{mask};
- $arg->{mode} = 0777 unless exists $arg->{mode};
- ${$arg->{error}} = [] if exists $arg->{error};
- $paths = [@_];
- }
- return _mkpath($arg, $paths);
-}
-
-sub _mkpath {
- my $arg = shift;
- my $paths = shift;
-
- my(@created,$path);
- foreach $path (@$paths) {
- next unless defined($path) and length($path);
- $path .= '/' if $^O eq 'os2' and $path =~ /^\w:\z/s; # feature of CRT
- # Logic wants Unix paths, so go with the flow.
- if ($Is_VMS) {
- next if $path eq '/';
- $path = VMS::Filespec::unixify($path);
- }
- next if -d $path;
- my $parent = File::Basename::dirname($path);
- unless (-d $parent or $path eq $parent) {
- push(@created,_mkpath($arg, [$parent]));
- }
- print "mkdir $path\n" if $arg->{verbose};
- if (mkdir($path,$arg->{mode})) {
- push(@created, $path);
- }
- else {
- my $save_bang = $!;
- my ($e, $e1) = ($save_bang, $^E);
- $e .= "; $e1" if $e ne $e1;
- # allow for another process to have created it meanwhile
- if (!-d $path) {
- $! = $save_bang;
- if ($arg->{error}) {
- push @{${$arg->{error}}}, {$path => $e};
- }
- else {
- _croak("mkdir $path: $e");
- }
- }
- }
- }
- return @created;
-}
-
-sub remove_tree {
- push @_, {} unless @_ and UNIVERSAL::isa($_[-1],'HASH');
- goto &rmtree;
-}
-
-sub _is_subdir {
- my($dir, $test) = @_;
-
- my($dv, $dd) = File::Spec->splitpath($dir, 1);
- my($tv, $td) = File::Spec->splitpath($test, 1);
-
- # not on same volume
- return 0 if $dv ne $tv;
-
- my @d = File::Spec->splitdir($dd);
- my @t = File::Spec->splitdir($td);
-
- # @t can't be a subdir if it's shorter than @d
- return 0 if @t < @d;
-
- return join('/', @d) eq join('/', splice @t, 0, + at d);
-}
-
-sub rmtree {
- my $old_style = !(@_ and UNIVERSAL::isa($_[-1],'HASH'));
-
- my $arg;
- my $paths;
-
- if ($old_style) {
- my ($verbose, $safe);
- ($paths, $verbose, $safe) = @_;
- $arg->{verbose} = $verbose;
- $arg->{safe} = defined $safe ? $safe : 0;
-
- if (defined($paths) and length($paths)) {
- $paths = [$paths] unless UNIVERSAL::isa($paths,'ARRAY');
- }
- else {
- _carp ("No root path(s) specified\n");
- return 0;
- }
- }
- else {
- $arg = pop @_;
- ${$arg->{error}} = [] if exists $arg->{error};
- ${$arg->{result}} = [] if exists $arg->{result};
- $paths = [@_];
- }
-
- $arg->{prefix} = '';
- $arg->{depth} = 0;
-
- my @clean_path;
- $arg->{cwd} = getcwd() or do {
- _error($arg, "cannot fetch initial working directory");
- return 0;
- };
- for ($arg->{cwd}) { /\A(.*)\Z/; $_ = $1 } # untaint
-
- for my $p (@$paths) {
- # need to fixup case and map \ to / on Windows
- my $ortho_root = $^O eq 'MSWin32' ? _slash_lc($p) : $p;
- my $ortho_cwd = $^O eq 'MSWin32' ? _slash_lc($arg->{cwd}) : $arg->{cwd};
- my $ortho_root_length = length($ortho_root);
- $ortho_root_length-- if $^O eq 'VMS'; # don't compare '.' with ']'
- if ($ortho_root_length && _is_subdir($ortho_root, $ortho_cwd)) {
- local $! = 0;
- _error($arg, "cannot remove path when cwd is $arg->{cwd}", $p);
- next;
- }
-
- if ($Is_MacOS) {
- $p = ":$p" unless $p =~ /:/;
- $p .= ":" unless $p =~ /:\z/;
- }
- elsif ($^O eq 'MSWin32') {
- $p =~ s{[/\\]\z}{};
- }
- else {
- $p =~ s{/\z}{};
- }
- push @clean_path, $p;
- }
-
- @{$arg}{qw(device inode perm)} = (lstat $arg->{cwd})[0,1] or do {
- _error($arg, "cannot stat initial working directory", $arg->{cwd});
- return 0;
- };
-
- return _rmtree($arg, \@clean_path);
-}
-
-sub _rmtree {
- my $arg = shift;
- my $paths = shift;
-
- my $count = 0;
- my $curdir = File::Spec->curdir();
- my $updir = File::Spec->updir();
-
- my (@files, $root);
- ROOT_DIR:
- foreach $root (@$paths) {
- # since we chdir into each directory, it may not be obvious
- # to figure out where we are if we generate a message about
- # a file name. We therefore construct a semi-canonical
- # filename, anchored from the directory being unlinked (as
- # opposed to being truly canonical, anchored from the root (/).
-
- my $canon = $arg->{prefix}
- ? File::Spec->catfile($arg->{prefix}, $root)
- : $root
- ;
-
- my ($ldev, $lino, $perm) = (lstat $root)[0,1,2] or next ROOT_DIR;
-
- if ( -d _ ) {
- $root = VMS::Filespec::pathify($root) if $Is_VMS;
-
- if (!chdir($root)) {
- # see if we can escalate privileges to get in
- # (e.g. funny protection mask such as -w- instead of rwx)
- $perm &= 07777;
- my $nperm = $perm | 0700;
- if (!($arg->{safe} or $nperm == $perm or chmod($nperm, $root))) {
- _error($arg, "cannot make child directory read-write-exec", $canon);
- next ROOT_DIR;
- }
- elsif (!chdir($root)) {
- _error($arg, "cannot chdir to child", $canon);
- next ROOT_DIR;
- }
- }
-
- my ($cur_dev, $cur_inode, $perm) = (stat $curdir)[0,1,2] or do {
- _error($arg, "cannot stat current working directory", $canon);
- next ROOT_DIR;
- };
-
- if ($Need_Stat_Check) {
- ($ldev eq $cur_dev and $lino eq $cur_inode)
- or _croak("directory $canon changed before chdir, expected dev=$ldev ino=$lino, actual dev=$cur_dev ino=$cur_inode, aborting.");
- }
-
- $perm &= 07777; # don't forget setuid, setgid, sticky bits
- my $nperm = $perm | 0700;
-
- # notabene: 0700 is for making readable in the first place,
- # it's also intended to change it to writable in case we have
- # to recurse in which case we are better than rm -rf for
- # subtrees with strange permissions
-
- if (!($arg->{safe} or $nperm == $perm or chmod($nperm, $curdir))) {
- _error($arg, "cannot make directory read+writeable", $canon);
- $nperm = $perm;
- }
-
- my $d;
- $d = gensym() if $] < 5.006;
- if (!opendir $d, $curdir) {
- _error($arg, "cannot opendir", $canon);
- @files = ();
- }
- else {
- no strict 'refs';
- if (!defined ${"\cTAINT"} or ${"\cTAINT"}) {
- # Blindly untaint dir names if taint mode is
- # active, or any perl < 5.006
- @files = map { /\A(.*)\z/s; $1 } readdir $d;
- }
- else {
- @files = readdir $d;
- }
- closedir $d;
- }
-
- if ($Is_VMS) {
- # Deleting large numbers of files from VMS Files-11
- # filesystems is faster if done in reverse ASCIIbetical order.
- # include '.' to '.;' from blead patch #31775
- @files = map {$_ eq '.' ? '.;' : $_} reverse @files;
- ($root = VMS::Filespec::unixify($root)) =~ s/\.dir\z//;
- }
-
- @files = grep {$_ ne $updir and $_ ne $curdir} @files;
-
- if (@files) {
- # remove the contained files before the directory itself
- my $narg = {%$arg};
- @{$narg}{qw(device inode cwd prefix depth)}
- = ($cur_dev, $cur_inode, $updir, $canon, $arg->{depth}+1);
- $count += _rmtree($narg, \@files);
- }
-
- # restore directory permissions of required now (in case the rmdir
- # below fails), while we are still in the directory and may do so
- # without a race via '.'
- if ($nperm != $perm and not chmod($perm, $curdir)) {
- _error($arg, "cannot reset chmod", $canon);
- }
-
- # don't leave the client code in an unexpected directory
- chdir($arg->{cwd})
- or _croak("cannot chdir to $arg->{cwd} from $canon: $!, aborting.");
-
- # ensure that a chdir upwards didn't take us somewhere other
- # than we expected (see CVE-2002-0435)
- ($cur_dev, $cur_inode) = (stat $curdir)[0,1]
- or _croak("cannot stat prior working directory $arg->{cwd}: $!, aborting.");
-
- if ($Need_Stat_Check) {
- ($arg->{device} eq $cur_dev and $arg->{inode} eq $cur_inode)
- or _croak("previous directory $arg->{cwd} changed before entering $canon, expected dev=$ldev ino=$lino, actual dev=$cur_dev ino=$cur_inode, aborting.");
- }
-
- if ($arg->{depth} or !$arg->{keep_root}) {
- if ($arg->{safe} &&
- ($Is_VMS ? !&VMS::Filespec::candelete($root) : !-w $root)) {
- print "skipped $root\n" if $arg->{verbose};
- next ROOT_DIR;
- }
- if ($Force_Writeable and !chmod $perm | 0700, $root) {
- _error($arg, "cannot make directory writeable", $canon);
- }
- print "rmdir $root\n" if $arg->{verbose};
- if (rmdir $root) {
- push @{${$arg->{result}}}, $root if $arg->{result};
- ++$count;
- }
- else {
- _error($arg, "cannot remove directory", $canon);
- if ($Force_Writeable && !chmod($perm, ($Is_VMS ? VMS::Filespec::fileify($root) : $root))
- ) {
- _error($arg, sprintf("cannot restore permissions to 0%o",$perm), $canon);
- }
- }
- }
- }
- else {
- # not a directory
- $root = VMS::Filespec::vmsify("./$root")
- if $Is_VMS
- && !File::Spec->file_name_is_absolute($root)
- && ($root !~ m/(?<!\^)[\]>]+/); # not already in VMS syntax
-
- if ($arg->{safe} &&
- ($Is_VMS ? !&VMS::Filespec::candelete($root)
- : !(-l $root || -w $root)))
- {
- print "skipped $root\n" if $arg->{verbose};
- next ROOT_DIR;
- }
-
- my $nperm = $perm & 07777 | 0600;
- if ($Force_Writeable and $nperm != $perm and not chmod $nperm, $root) {
- _error($arg, "cannot make file writeable", $canon);
- }
- print "unlink $canon\n" if $arg->{verbose};
- # delete all versions under VMS
- for (;;) {
- if (unlink $root) {
- push @{${$arg->{result}}}, $root if $arg->{result};
- }
- else {
- _error($arg, "cannot unlink file", $canon);
- $Force_Writeable and chmod($perm, $root) or
- _error($arg, sprintf("cannot restore permissions to 0%o",$perm), $canon);
- last;
- }
- ++$count;
- last unless $Is_VMS && lstat $root;
- }
- }
- }
- return $count;
-}
-
-sub _slash_lc {
- # fix up slashes and case on MSWin32 so that we can determine that
- # c:\path\to\dir is underneath C:/Path/To
- my $path = shift;
- $path =~ tr{\\}{/};
- return lc($path);
-}
-
-1;
-__END__
-
-=head1 NAME
-
-File::Path - Create or remove directory trees
-
-=head1 VERSION
-
-This document describes version 2.07 of File::Path, released
-2008-11-09.
-
-=head1 SYNOPSIS
-
- use File::Path qw(make_path remove_tree);
-
- make_path('foo/bar/baz', '/zug/zwang');
- make_path('foo/bar/baz', '/zug/zwang', {
- verbose => 1,
- mode => 0711,
- });
-
- remove_tree('foo/bar/baz', '/zug/zwang');
- remove_tree('foo/bar/baz', '/zug/zwang', {
- verbose => 1,
- error => \my $err_list,
- });
-
- # legacy (interface promoted before v2.00)
- mkpath('/foo/bar/baz');
- mkpath('/foo/bar/baz', 1, 0711);
- mkpath(['/foo/bar/baz', 'blurfl/quux'], 1, 0711);
- rmtree('foo/bar/baz', 1, 1);
- rmtree(['foo/bar/baz', 'blurfl/quux'], 1, 1);
-
- # legacy (interface promoted before v2.06)
- mkpath('foo/bar/baz', '/zug/zwang', { verbose => 1, mode => 0711 });
- rmtree('foo/bar/baz', '/zug/zwang', { verbose => 1, mode => 0711 });
-
-=head1 DESCRIPTION
-
-This module provide a convenient way to create directories of
-arbitrary depth and to delete an entire directory subtree from the
-filesystem.
-
-The following functions are provided:
-
-=over
-
-=item make_path( $dir1, $dir2, .... )
-
-=item make_path( $dir1, $dir2, ...., \%opts )
-
-The C<make_path> function creates the given directories if they don't
-exists before, much like the Unix command C<mkdir -p>.
-
-The function accepts a list of directories to be created. Its
-behaviour may be tuned by an optional hashref appearing as the last
-parameter on the call.
-
-The function returns the list of directories actually created during
-the call; in scalar context the number of directories created.
-
-The following keys are recognised in the option hash:
-
-=over
-
-=item mode => $num
-
-The numeric permissions mode to apply to each created directory
-(defaults to 0777), to be modified by the current C<umask>. If the
-directory already exists (and thus does not need to be created),
-the permissions will not be modified.
-
-C<mask> is recognised as an alias for this parameter.
-
-=item verbose => $bool
-
-If present, will cause C<make_path> to print the name of each directory
-as it is created. By default nothing is printed.
-
-=item error => \$err
-
-If present, it should be a reference to a scalar.
-This scalar will be made to reference an array, which will
-be used to store any errors that are encountered. See the L</"ERROR
-HANDLING"> section for more information.
-
-If this parameter is not used, certain error conditions may raise
-a fatal error that will cause the program will halt, unless trapped
-in an C<eval> block.
-
-=back
-
-=item mkpath( $dir )
-
-=item mkpath( $dir, $verbose, $mode )
-
-=item mkpath( [$dir1, $dir2,...], $verbose, $mode )
-
-=item mkpath( $dir1, $dir2,..., \%opt )
-
-The mkpath() function provide the legacy interface of make_path() with
-a different interpretation of the arguments passed. The behaviour and
-return value of the function is otherwise identical to make_path().
-
-=item remove_tree( $dir1, $dir2, .... )
-
-=item remove_tree( $dir1, $dir2, ...., \%opts )
-
-The C<remove_tree> function deletes the given directories and any
-files and subdirectories they might contain, much like the Unix
-command C<rm -r> or C<del /s> on Windows.
-
-The function accepts a list of directories to be
-removed. Its behaviour may be tuned by an optional hashref
-appearing as the last parameter on the call.
-
-The functions returns the number of files successfully deleted.
-
-The following keys are recognised in the option hash:
-
-=over
-
-=item verbose => $bool
-
-If present, will cause C<remove_tree> to print the name of each file as
-it is unlinked. By default nothing is printed.
-
-=item safe => $bool
-
-When set to a true value, will cause C<remove_tree> to skip the files
-for which the process lacks the required privileges needed to delete
-files, such as delete privileges on VMS. In other words, the code
-will make no attempt to alter file permissions. Thus, if the process
-is interrupted, no filesystem object will be left in a more
-permissive mode.
-
-=item keep_root => $bool
-
-When set to a true value, will cause all files and subdirectories
-to be removed, except the initially specified directories. This comes
-in handy when cleaning out an application's scratch directory.
-
- remove_tree( '/tmp', {keep_root => 1} );
-
-=item result => \$res
-
-If present, it should be a reference to a scalar.
-This scalar will be made to reference an array, which will
-be used to store all files and directories unlinked
-during the call. If nothing is unlinked, the array will be empty.
-
- remove_tree( '/tmp', {result => \my $list} );
- print "unlinked $_\n" for @$list;
-
-This is a useful alternative to the C<verbose> key.
-
-=item error => \$err
-
-If present, it should be a reference to a scalar.
-This scalar will be made to reference an array, which will
-be used to store any errors that are encountered. See the L</"ERROR
-HANDLING"> section for more information.
-
-Removing things is a much more dangerous proposition than
-creating things. As such, there are certain conditions that
-C<remove_tree> may encounter that are so dangerous that the only
-sane action left is to kill the program.
-
-Use C<error> to trap all that is reasonable (problems with
-permissions and the like), and let it die if things get out
-of hand. This is the safest course of action.
-
-=back
-
-=item rmtree( $dir )
-
-=item rmtree( $dir, $verbose, $safe )
-
-=item rmtree( [$dir1, $dir2,...], $verbose, $safe )
-
-=item rmtree( $dir1, $dir2,..., \%opt )
-
-The rmtree() function provide the legacy interface of remove_tree()
-with a different interpretation of the arguments passed. The behaviour
-and return value of the function is otherwise identical to
-remove_tree().
-
-=back
-
-=head2 ERROR HANDLING
-
-=over 4
-
-=item B<NOTE:>
-
-The following error handling mechanism is considered
-experimental and is subject to change pending feedback from
-users.
-
-=back
-
-If C<make_path> or C<remove_tree> encounter an error, a diagnostic
-message will be printed to C<STDERR> via C<carp> (for non-fatal
-errors), or via C<croak> (for fatal errors).
-
-If this behaviour is not desirable, the C<error> attribute may be
-used to hold a reference to a variable, which will be used to store
-the diagnostics. The variable is made a reference to an array of hash
-references. Each hash contain a single key/value pair where the key
-is the name of the file, and the value is the error message (including
-the contents of C<$!> when appropriate). If a general error is
-encountered the diagnostic key will be empty.
-
-An example usage looks like:
-
- remove_tree( 'foo/bar', 'bar/rat', {error => \my $err} );
- if (@$err) {
- for my $diag (@$err) {
- my ($file, $message) = %$diag;
- if ($file eq '') {
- print "general error: $message\n";
- }
- else {
- print "problem unlinking $file: $message\n";
- }
- }
- }
- else {
- print "No error encountered\n";
- }
-
-Note that if no errors are encountered, C<$err> will reference an
-empty array. This means that C<$err> will always end up TRUE; so you
-need to test C<@$err> to determine if errors occured.
-
-=head2 NOTES
-
-C<File::Path> blindly exports C<mkpath> and C<rmtree> into the
-current namespace. These days, this is considered bad style, but
-to change it now would break too much code. Nonetheless, you are
-invited to specify what it is you are expecting to use:
-
- use File::Path 'rmtree';
-
-The routines C<make_path> and C<remove_tree> are B<not> exported
-by default. You must specify which ones you want to use.
-
- use File::Path 'remove_tree';
-
-Note that a side-effect of the above is that C<mkpath> and C<rmtree>
-are no longer exported at all. This is due to the way the C<Exporter>
-module works. If you are migrating a codebase to use the new
-interface, you will have to list everything explicitly. But that's
-just good practice anyway.
-
- use File::Path qw(remove_tree rmtree);
-
-=head3 SECURITY CONSIDERATIONS
-
-There were race conditions 1.x implementations of File::Path's
-C<rmtree> function (although sometimes patched depending on the OS
-distribution or platform). The 2.0 version contains code to avoid the
-problem mentioned in CVE-2002-0435.
-
-See the following pages for more information:
-
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286905
- http://www.nntp.perl.org/group/perl.perl5.porters/2005/01/msg97623.html
- http://www.debian.org/security/2005/dsa-696
-
-Additionally, unless the C<safe> parameter is set (or the
-third parameter in the traditional interface is TRUE), should a
-C<remove_tree> be interrupted, files that were originally in read-only
-mode may now have their permissions set to a read-write (or "delete
-OK") mode.
-
-=head1 DIAGNOSTICS
-
-FATAL errors will cause the program to halt (C<croak>), since the
-problem is so severe that it would be dangerous to continue. (This
-can always be trapped with C<eval>, but it's not a good idea. Under
-the circumstances, dying is the best thing to do).
-
-SEVERE errors may be trapped using the modern interface. If the
-they are not trapped, or the old interface is used, such an error
-will cause the program will halt.
-
-All other errors may be trapped using the modern interface, otherwise
-they will be C<carp>ed about. Program execution will not be halted.
-
-=over 4
-
-=item mkdir [path]: [errmsg] (SEVERE)
-
-C<make_path> was unable to create the path. Probably some sort of
-permissions error at the point of departure, or insufficient resources
-(such as free inodes on Unix).
-
-=item No root path(s) specified
-
-C<make_path> was not given any paths to create. This message is only
-emitted if the routine is called with the traditional interface.
-The modern interface will remain silent if given nothing to do.
-
-=item No such file or directory
-
-On Windows, if C<make_path> gives you this warning, it may mean that
-you have exceeded your filesystem's maximum path length.
-
-=item cannot fetch initial working directory: [errmsg]
-
-C<remove_tree> attempted to determine the initial directory by calling
-C<Cwd::getcwd>, but the call failed for some reason. No attempt
-will be made to delete anything.
-
-=item cannot stat initial working directory: [errmsg]
-
-C<remove_tree> attempted to stat the initial directory (after having
-successfully obtained its name via C<getcwd>), however, the call
-failed for some reason. No attempt will be made to delete anything.
-
-=item cannot chdir to [dir]: [errmsg]
-
-C<remove_tree> attempted to set the working directory in order to
-begin deleting the objects therein, but was unsuccessful. This is
-usually a permissions issue. The routine will continue to delete
-other things, but this directory will be left intact.
-
-=item directory [dir] changed before chdir, expected dev=[n] ino=[n], actual dev=[n] ino=[n], aborting. (FATAL)
-
-C<remove_tree> recorded the device and inode of a directory, and then
-moved into it. It then performed a C<stat> on the current directory
-and detected that the device and inode were no longer the same. As
-this is at the heart of the race condition problem, the program
-will die at this point.
-
-=item cannot make directory [dir] read+writeable: [errmsg]
-
-C<remove_tree> attempted to change the permissions on the current directory
-to ensure that subsequent unlinkings would not run into problems,
-but was unable to do so. The permissions remain as they were, and
-the program will carry on, doing the best it can.
-
-=item cannot read [dir]: [errmsg]
-
-C<remove_tree> tried to read the contents of the directory in order
-to acquire the names of the directory entries to be unlinked, but
-was unsuccessful. This is usually a permissions issue. The
-program will continue, but the files in this directory will remain
-after the call.
-
-=item cannot reset chmod [dir]: [errmsg]
-
-C<remove_tree>, after having deleted everything in a directory, attempted
-to restore its permissions to the original state but failed. The
-directory may wind up being left behind.
-
-=item cannot remove [dir] when cwd is [dir]
-
-The current working directory of the program is F</some/path/to/here>
-and you are attempting to remove an ancestor, such as F</some/path>.
-The directory tree is left untouched.
-
-The solution is to C<chdir> out of the child directory to a place
-outside the directory tree to be removed.
-
-=item cannot chdir to [parent-dir] from [child-dir]: [errmsg], aborting. (FATAL)
-
-C<remove_tree>, after having deleted everything and restored the permissions
-of a directory, was unable to chdir back to the parent. The program
-halts to avoid a race condition from occurring.
-
-=item cannot stat prior working directory [dir]: [errmsg], aborting. (FATAL)
-
-C<remove_tree> was unable to stat the parent directory after have returned
-from the child. Since there is no way of knowing if we returned to
-where we think we should be (by comparing device and inode) the only
-way out is to C<croak>.
-
-=item previous directory [parent-dir] changed before entering [child-dir], expected dev=[n] ino=[n], actual dev=[n] ino=[n], aborting. (FATAL)
-
-When C<remove_tree> returned from deleting files in a child directory, a
-check revealed that the parent directory it returned to wasn't the one
-it started out from. This is considered a sign of malicious activity.
-
-=item cannot make directory [dir] writeable: [errmsg]
-
-Just before removing a directory (after having successfully removed
-everything it contained), C<remove_tree> attempted to set the permissions
-on the directory to ensure it could be removed and failed. Program
-execution continues, but the directory may possibly not be deleted.
-
-=item cannot remove directory [dir]: [errmsg]
-
-C<remove_tree> attempted to remove a directory, but failed. This may because
-some objects that were unable to be removed remain in the directory, or
-a permissions issue. The directory will be left behind.
-
-=item cannot restore permissions of [dir] to [0nnn]: [errmsg]
-
-After having failed to remove a directory, C<remove_tree> was unable to
-restore its permissions from a permissive state back to a possibly
-more restrictive setting. (Permissions given in octal).
-
-=item cannot make file [file] writeable: [errmsg]
-
-C<remove_tree> attempted to force the permissions of a file to ensure it
-could be deleted, but failed to do so. It will, however, still attempt
-to unlink the file.
-
-=item cannot unlink file [file]: [errmsg]
-
-C<remove_tree> failed to remove a file. Probably a permissions issue.
-
-=item cannot restore permissions of [file] to [0nnn]: [errmsg]
-
-After having failed to remove a file, C<remove_tree> was also unable
-to restore the permissions on the file to a possibly less permissive
-setting. (Permissions given in octal).
-
-=back
-
-=head1 SEE ALSO
-
-=over 4
-
-=item *
-
-L<File::Remove>
-
-Allows files and directories to be moved to the Trashcan/Recycle
-Bin (where they may later be restored if necessary) if the operating
-system supports such functionality. This feature may one day be
-made available directly in C<File::Path>.
-
-=item *
-
-L<File::Find::Rule>
-
-When removing directory trees, if you want to examine each file to
-decide whether to delete it (and possibly leaving large swathes
-alone), F<File::Find::Rule> offers a convenient and flexible approach
-to examining directory trees.
-
-=back
-
-=head1 BUGS
-
-Please report all bugs on the RT queue:
-
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-Path>
-
-=head1 ACKNOWLEDGEMENTS
-
-Paul Szabo identified the race condition originally, and Brendan
-O'Dea wrote an implementation for Debian that addressed the problem.
-That code was used as a basis for the current code. Their efforts
-are greatly appreciated.
-
-Gisle Aas made a number of improvements to the documentation for
-2.07 and his advice and assistance is also greatly appreciated.
-
-=head1 AUTHORS
-
-Tim Bunce and Charles Bailey. Currently maintained by David Landgren
-<F<david at landgren.net>>.
-
-=head1 COPYRIGHT
-
-This module is copyright (C) Charles Bailey, Tim Bunce and
-David Landgren 1995-2008. All rights reserved.
-
-=head1 LICENSE
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/File/Path.t
===================================================================
--- vendor/perl/dist/lib/File/Path.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/File/Path.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,588 +0,0 @@
-# Path.t -- tests for module File::Path
-
-use strict;
-
-use Test::More tests => 121;
-use Config;
-
-BEGIN {
- use_ok('Cwd');
- use_ok('File::Path', qw(rmtree mkpath make_path remove_tree));
- use_ok('File::Spec::Functions');
-}
-
-eval "use Test::Output";
-my $has_Test_Output = $@ ? 0 : 1;
-
-my $Is_VMS = $^O eq 'VMS';
-
-# first check for stupid permissions second for full, so we clean up
-# behind ourselves
-for my $perm (0111,0777) {
- my $path = catdir(curdir(), "mhx", "bar");
- mkpath($path);
- chmod $perm, "mhx", $path;
-
- my $oct = sprintf('0%o', $perm);
- ok(-d "mhx", "mkdir parent dir $oct");
- ok(-d $path, "mkdir child dir $oct");
-
- rmtree("mhx");
- ok(! -e "mhx", "mhx does not exist $oct");
-}
-
-# find a place to work
-my ($error, $list, $file, $message);
-my $tmp_base = catdir(
- curdir(),
- sprintf( 'test-%x-%x-%x', time, $$, rand(99999) ),
-);
-
-# invent some names
-my @dir = (
- catdir($tmp_base, qw(a b)),
- catdir($tmp_base, qw(a c)),
- catdir($tmp_base, qw(z b)),
- catdir($tmp_base, qw(z c)),
-);
-
-# create them
-my @created = mkpath([@dir]);
-
-is(scalar(@created), 7, "created list of directories");
-
-# pray for no race conditions blowing them out from under us
- at created = mkpath([$tmp_base]);
-is(scalar(@created), 0, "skipped making existing directory")
- or diag("unexpectedly recreated @created");
-
-# create a file
-my $file_name = catfile( $tmp_base, 'a', 'delete.me' );
-my $file_count = 0;
-if (open OUT, "> $file_name") {
- print OUT "this file may be deleted\n";
- close OUT;
- ++$file_count;
-}
-else {
- diag( "Failed to create file $file_name: $!" );
-}
-
-SKIP: {
- skip "cannot remove a file we failed to create", 1
- unless $file_count == 1;
- my $count = rmtree($file_name);
- is($count, 1, "rmtree'ed a file");
-}
-
- at created = mkpath('');
-is(scalar(@created), 0, "Can't create a directory named ''");
-
-my $dir;
-my $dir2;
-
-sub gisle {
- # background info: @_ = 1; !shift # gives '' not 0
- # Message-Id: <3C820CE6-4400-4E91-AF43-A3D19B356E68 at activestate.com>
- # http://www.nntp.perl.org/group/perl.perl5.porters/2008/05/msg136625.html
- mkpath(shift, !shift, 0755);
-}
-
-sub count {
- opendir D, shift or return -1;
- my $count = () = readdir D;
- closedir D or return -1;
- return $count;
-}
-
-{
- mkdir 'solo', 0755;
- chdir 'solo';
- open my $f, '>', 'foo.dat';
- close $f;
- my $before = count(curdir());
- cmp_ok($before, '>', 0, "baseline $before");
-
- gisle('1st', 1);
- is(count(curdir()), $before + 1, "first after $before");
-
- $before = count(curdir());
- gisle('2nd', 1);
- is(count(curdir()), $before + 1, "second after $before");
-
- chdir updir();
- rmtree 'solo';
-}
-
-{
- mkdir 'solo', 0755;
- chdir 'solo';
- open my $f, '>', 'foo.dat';
- close $f;
- my $before = count(curdir());
- cmp_ok($before, '>', 0, "ARGV $before");
- {
- local @ARGV = (1);
- mkpath('3rd', !shift, 0755);
- }
- is(count(curdir()), $before + 1, "third after $before");
-
- $before = count(curdir());
- {
- local @ARGV = (1);
- mkpath('4th', !shift, 0755);
- }
- is(count(curdir()), $before + 1, "fourth after $before");
-
- chdir updir();
- rmtree 'solo';
-}
-
-SKIP: {
- # tests for rmtree() of ancestor directory
- my $nr_tests = 6;
- my $cwd = getcwd() or skip "failed to getcwd: $!", $nr_tests;
- my $dir = catdir($cwd, 'remove');
- my $dir2 = catdir($cwd, 'remove', 'this', 'dir');
-
- skip "failed to mkpath '$dir2': $!", $nr_tests
- unless mkpath($dir2, {verbose => 0});
- skip "failed to chdir dir '$dir2': $!", $nr_tests
- unless chdir($dir2);
-
- rmtree($dir, {error => \$error});
- my $nr_err = @$error;
- is($nr_err, 1, "ancestor error");
-
- if ($nr_err) {
- my ($file, $message) = each %{$error->[0]};
- is($file, $dir, "ancestor named");
- my $ortho_dir = $^O eq 'MSWin32' ? File::Path::_slash_lc($dir2) : $dir2;
- $^O eq 'MSWin32' and $message
- =~ s/\A(cannot remove path when cwd is )(.*)\Z/$1 . File::Path::_slash_lc($2)/e;
- is($message, "cannot remove path when cwd is $ortho_dir", "ancestor reason");
- ok(-d $dir2, "child not removed");
- ok(-d $dir, "ancestor not removed");
- }
- else {
- fail( "ancestor 1");
- fail( "ancestor 2");
- fail( "ancestor 3");
- fail( "ancestor 4");
- }
- chdir $cwd;
- rmtree($dir);
- ok(!(-d $dir), "ancestor now removed");
-};
-
-my $count = rmtree({error => \$error});
-is( $count, 0, 'rmtree of nothing, count of zero' );
-is( scalar(@$error), 0, 'no diagnostic captured' );
-
- at created = mkpath($tmp_base, 0);
-is(scalar(@created), 0, "skipped making existing directories (old style 1)")
- or diag("unexpectedly recreated @created");
-
-$dir = catdir($tmp_base,'C');
-# mkpath returns unix syntax filespecs on VMS
-$dir = VMS::Filespec::unixify($dir) if $Is_VMS;
- at created = make_path($tmp_base, $dir);
-is(scalar(@created), 1, "created directory (new style 1)");
-is($created[0], $dir, "created directory (new style 1) cross-check");
-
- at created = mkpath($tmp_base, 0, 0700);
-is(scalar(@created), 0, "skipped making existing directories (old style 2)")
- or diag("unexpectedly recreated @created");
-
-$dir2 = catdir($tmp_base,'D');
-# mkpath returns unix syntax filespecs on VMS
-$dir2 = VMS::Filespec::unixify($dir2) if $Is_VMS;
- at created = make_path($tmp_base, $dir, $dir2);
-is(scalar(@created), 1, "created directory (new style 2)");
-is($created[0], $dir2, "created directory (new style 2) cross-check");
-
-$count = rmtree($dir, 0);
-is($count, 1, "removed directory unsafe mode");
-
-$count = rmtree($dir2, 0, 1);
-my $removed = $Is_VMS ? 0 : 1;
-is($count, $removed, "removed directory safe mode");
-
-# mkdir foo ./E/../Y
-# Y should exist
-# existence of E is neither here nor there
-$dir = catdir($tmp_base, 'E', updir(), 'Y');
- at created =mkpath($dir);
-cmp_ok(scalar(@created), '>=', 1, "made one or more dirs because of ..");
-cmp_ok(scalar(@created), '<=', 2, "made less than two dirs because of ..");
-ok( -d catdir($tmp_base, 'Y'), "directory after parent" );
-
- at created = make_path(catdir(curdir(), $tmp_base));
-is(scalar(@created), 0, "nothing created")
- or diag(@created);
-
-$dir = catdir($tmp_base, 'a');
-$dir2 = catdir($tmp_base, 'z');
-
-rmtree( $dir, $dir2,
- {
- error => \$error,
- result => \$list,
- keep_root => 1,
- }
-);
-
-is(scalar(@$error), 0, "no errors unlinking a and z");
-is(scalar(@$list), 4, "list contains 4 elements")
- or diag("@$list");
-
-ok(-d $dir, "dir a still exists");
-ok(-d $dir2, "dir z still exists");
-
-$dir = catdir($tmp_base,'F');
-# mkpath returns unix syntax filespecs on VMS
-$dir = VMS::Filespec::unixify($dir) if $Is_VMS;
-
- at created = mkpath($dir, undef, 0770);
-is(scalar(@created), 1, "created directory (old style 2 verbose undef)");
-is($created[0], $dir, "created directory (old style 2 verbose undef) cross-check");
-is(rmtree($dir, undef, 0), 1, "removed directory 2 verbose undef");
-
- at created = mkpath($dir, undef);
-is(scalar(@created), 1, "created directory (old style 2a verbose undef)");
-is($created[0], $dir, "created directory (old style 2a verbose undef) cross-check");
-is(rmtree($dir, undef), 1, "removed directory 2a verbose undef");
-
- at created = mkpath($dir, 0, undef);
-is(scalar(@created), 1, "created directory (old style 3 mode undef)");
-is($created[0], $dir, "created directory (old style 3 mode undef) cross-check");
-is(rmtree($dir, 0, undef), 1, "removed directory 3 verbose undef");
-
-$dir = catdir($tmp_base,'G');
-$dir = VMS::Filespec::unixify($dir) if $Is_VMS;
-
- at created = mkpath($dir, undef, 0200);
-is(scalar(@created), 1, "created write-only dir");
-is($created[0], $dir, "created write-only directory cross-check");
-is(rmtree($dir), 1, "removed write-only dir");
-
-# borderline new-style heuristics
-if (chdir $tmp_base) {
- pass("chdir to temp dir");
-}
-else {
- fail("chdir to temp dir: $!");
-}
-
-$dir = catdir('a', 'd1');
-$dir2 = catdir('a', 'd2');
-
- at created = make_path( $dir, 0, $dir2 );
-is(scalar @created, 3, 'new-style 3 dirs created');
-
-$count = remove_tree( $dir, 0, $dir2, );
-is($count, 3, 'new-style 3 dirs removed');
-
- at created = make_path( $dir, $dir2, 1 );
-is(scalar @created, 3, 'new-style 3 dirs created (redux)');
-
-$count = remove_tree( $dir, $dir2, 1 );
-is($count, 3, 'new-style 3 dirs removed (redux)');
-
- at created = make_path( $dir, $dir2 );
-is(scalar @created, 2, 'new-style 2 dirs created');
-
-$count = remove_tree( $dir, $dir2 );
-is($count, 2, 'new-style 2 dirs removed');
-
-if (chdir updir()) {
- pass("chdir parent");
-}
-else {
- fail("chdir parent: $!");
-}
-
-SKIP: {
- skip "This is not a MSWin32 platform", 1
- unless $^O eq 'MSWin32';
-
- my $UNC_path_taint = $ENV{PERL_FILE_PATH_UNC_TESTDIR};
- skip "PERL_FILE_PATH_UNC_TESTDIR environment variable not set", 1
- unless defined($UNC_path_taint);
-
- my ($UNC_path) = ($UNC_path_taint =~ m{^([/\\]{2}\w+[/\\]\w+[/\\]\w+)$});
-
- skip "PERL_FILE_PATH_UNC_TESTDIR environment variable does not point to a directory", 1
- unless -d $UNC_path;
-
- my $removed = rmtree($UNC_path);
- cmp_ok($removed, '>', 0, "removed $removed entries from $UNC_path");
-}
-
-SKIP: {
- # test bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487319
- skip "Don't need Force_Writeable semantics on $^O", 4
- if grep {$^O eq $_} qw(amigaos dos epoc MSWin32 MacOS os2);
- skip "Symlinks not available", 4 unless $Config{'d_symlink'};
- $dir = 'bug487319';
- $dir2 = 'bug487319-symlink';
- @created = make_path($dir, {mask => 0700});
- is(scalar @created, 1, 'bug 487319 setup');
- symlink($dir, $dir2);
- ok(-e $dir2, "debian bug 487319 setup symlink") or diag($dir2);
-
- chmod 0500, $dir;
- my $mask_initial = (stat $dir)[2];
- remove_tree($dir2);
-
- my $mask = (stat $dir)[2];
- is( $mask, $mask_initial, 'mask of symlink target dir unchanged (debian bug 487319)');
-
- # now try a file
- my $file = catfile($dir, 'file');
- open my $out, '>', $file;
- close $out;
-
- chmod 0500, $file;
- $mask_initial = (stat $file)[2];
-
- my $file2 = catfile($dir, 'symlink');
- symlink($file, $file2);
- remove_tree($file2);
-
- $mask = (stat $file)[2];
- is( $mask, $mask_initial, 'mask of symlink target file unchanged (debian bug 487319)');
-
- remove_tree($dir);
-}
-
-# see what happens if a file exists where we want a directory
-SKIP: {
- my $entry = catdir($tmp_base, "file");
- skip "Cannot create $entry", 4 unless open OUT, "> $entry";
- print OUT "test file, safe to delete\n", scalar(localtime), "\n";
- close OUT;
- ok(-e $entry, "file exists in place of directory");
-
- mkpath( $entry, {error => \$error} );
- is( scalar(@$error), 1, "caught error condition" );
- ($file, $message) = each %{$error->[0]};
- is( $entry, $file, "and the message is: $message");
-
- eval {@created = mkpath($entry, 0, 0700)};
- $error = $@;
- chomp $error; # just to remove silly # in TAP output
- cmp_ok( $error, 'ne', "", "no directory created (old-style) err=$error" )
- or diag(@created);
-}
-
-my $extra = catdir(curdir(), qw(EXTRA 1 a));
-
-SKIP: {
- skip "extra scenarios not set up, see eg/setup-extra-tests", 14
- unless -e $extra;
- skip "Symlinks not available", 14 unless $Config{'d_symlink'};
-
- my ($list, $err);
- $dir = catdir( 'EXTRA', '1' );
- rmtree( $dir, {result => \$list, error => \$err} );
- is(scalar(@$list), 2, "extra dir $dir removed");
- is(scalar(@$err), 1, "one error encountered");
-
- $dir = catdir( 'EXTRA', '3', 'N' );
- rmtree( $dir, {result => \$list, error => \$err} );
- is( @$list, 1, q{remove a symlinked dir} );
- is( @$err, 0, q{with no errors} );
-
- $dir = catdir('EXTRA', '3', 'S');
- rmtree($dir, {error => \$error});
- is( scalar(@$error), 1, 'one error for an unreadable dir' );
- eval { ($file, $message) = each %{$error->[0]}};
- is( $file, $dir, 'unreadable dir reported in error' )
- or diag($message);
-
- $dir = catdir('EXTRA', '3', 'T');
- rmtree($dir, {error => \$error});
- is( scalar(@$error), 1, 'one error for an unreadable dir T' );
- eval { ($file, $message) = each %{$error->[0]}};
- is( $file, $dir, 'unreadable dir reported in error T' );
-
- $dir = catdir( 'EXTRA', '4' );
- rmtree($dir, {result => \$list, error => \$err} );
- is( scalar(@$list), 0, q{don't follow a symlinked dir} );
- is( scalar(@$err), 2, q{two errors when removing a symlink in r/o dir} );
- eval { ($file, $message) = each %{$err->[0]} };
- is( $file, $dir, 'symlink reported in error' );
-
- $dir = catdir('EXTRA', '3', 'U');
- $dir2 = catdir('EXTRA', '3', 'V');
- rmtree($dir, $dir2, {verbose => 0, error => \$err, result => \$list});
- is( scalar(@$list), 1, q{deleted 1 out of 2 directories} );
- is( scalar(@$error), 1, q{left behind 1 out of 2 directories} );
- eval { ($file, $message) = each %{$err->[0]} };
- is( $file, $dir, 'first dir reported in error' );
-}
-
-{
- $dir = catdir($tmp_base, 'ZZ');
- @created = mkpath($dir);
- is(scalar(@created), 1, "create a ZZ directory");
-
- local @ARGV = ($dir);
- rmtree( [grep -e $_, @ARGV], 0, 0 );
- ok(!-e $dir, "blow it away via \@ARGV");
-}
-
-SKIP: {
- skip 'Test::Output not available', 14
- unless $has_Test_Output;
-
- SKIP: {
- $dir = catdir('EXTRA', '3');
- skip "extra scenarios not set up, see eg/setup-extra-tests", 3
- unless -e $dir;
-
- $dir = catdir('EXTRA', '3', 'U');
- stderr_like(
- sub {rmtree($dir, {verbose => 0})},
- qr{\Acannot make child directory read-write-exec for [^:]+: .* at \S+ line \d+},
- q(rmtree can't chdir into root dir)
- );
-
- $dir = catdir('EXTRA', '3');
- stderr_like(
- sub {rmtree($dir, {})},
- qr{\Acannot make child directory read-write-exec for [^:]+: .* at (\S+) line (\d+)
-cannot make child directory read-write-exec for [^:]+: .* at \1 line \2
-cannot make child directory read-write-exec for [^:]+: .* at \1 line \2
-cannot remove directory for [^:]+: .* at \1 line \2},
- 'rmtree with file owned by root'
- );
-
- stderr_like(
- sub {rmtree('EXTRA', {})},
- qr{\Acannot remove directory for [^:]+: .* at (\S+) line (\d+)
-cannot remove directory for [^:]+: .* at \1 line \2
-cannot make child directory read-write-exec for [^:]+: .* at \1 line \2
-cannot make child directory read-write-exec for [^:]+: .* at \1 line \2
-cannot make child directory read-write-exec for [^:]+: .* at \1 line \2
-cannot remove directory for [^:]+: .* at \1 line \2
-cannot unlink file for [^:]+: .* at \1 line \2
-cannot restore permissions to \d+ for [^:]+: .* at \1 line \2
-cannot make child directory read-write-exec for [^:]+: .* at \1 line \2
-cannot remove directory for [^:]+: .* at \1 line \2},
- 'rmtree with insufficient privileges'
- );
- }
-
- my $base = catdir($tmp_base,'output');
- $dir = catdir($base,'A');
- $dir2 = catdir($base,'B');
-
- stderr_like(
- sub { rmtree( undef, 1 ) },
- qr/\ANo root path\(s\) specified\b/,
- "rmtree of nothing carps sensibly"
- );
-
- stderr_like(
- sub { rmtree( '', 1 ) },
- qr/\ANo root path\(s\) specified\b/,
- "rmtree of empty dir carps sensibly"
- );
-
- stderr_is( sub { make_path() }, '', "make_path no args does not carp" );
- stderr_is( sub { remove_tree() }, '', "remove_tree no args does not carp" );
-
- stdout_is(
- sub {@created = mkpath($dir, 1)},
- "mkdir $base\nmkdir $dir\n",
- 'mkpath verbose (old style 1)'
- );
-
- stdout_is(
- sub {@created = mkpath([$dir2], 1)},
- "mkdir $dir2\n",
- 'mkpath verbose (old style 2)'
- );
-
- stdout_is(
- sub {$count = rmtree([$dir, $dir2], 1, 1)},
- "rmdir $dir\nrmdir $dir2\n",
- 'rmtree verbose (old style)'
- );
-
- stdout_is(
- sub {@created = mkpath($dir, {verbose => 1, mask => 0750})},
- "mkdir $dir\n",
- 'mkpath verbose (new style 1)'
- );
-
- stdout_is(
- sub {@created = mkpath($dir2, 1, 0771)},
- "mkdir $dir2\n",
- 'mkpath verbose (new style 2)'
- );
-
- SKIP: {
- $file = catdir($dir2, "file");
- skip "Cannot create $file", 2 unless open OUT, "> $file";
- print OUT "test file, safe to delete\n", scalar(localtime), "\n";
- close OUT;
-
- ok(-e $file, "file created in directory");
-
- stdout_is(
- sub {$count = rmtree($dir, $dir2, {verbose => 1, safe => 1})},
- "rmdir $dir\nunlink $file\nrmdir $dir2\n",
- 'rmtree safe verbose (new style)'
- );
- }
-}
-
-SKIP: {
- skip "extra scenarios not set up, see eg/setup-extra-tests", 11
- unless -d catdir(qw(EXTRA 1));
-
- rmtree 'EXTRA', {safe => 0, error => \$error};
- is( scalar(@$error), 10, 'seven deadly sins' ); # well there used to be 7
-
- rmtree 'EXTRA', {safe => 1, error => \$error};
- is( scalar(@$error), 9, 'safe is better' );
- for (@$error) {
- ($file, $message) = each %$_;
- if ($file =~ /[123]\z/) {
- is(index($message, 'cannot remove directory: '), 0, "failed to remove $file with rmdir")
- or diag($message);
- }
- else {
- like($message, qr(\Acannot (?:restore permissions to \d+|chdir to child|unlink file): ), "failed to remove $file with unlink")
- or diag($message)
- }
- }
-}
-
-SKIP: {
- my $nr_tests = 6;
- my $cwd = getcwd() or skip "failed to getcwd: $!", $nr_tests;
- rmtree($tmp_base, {result => \$list} );
- is(ref($list), 'ARRAY', "received a final list of results");
- ok( !(-d $tmp_base), "test base directory gone" );
-
- my $p = getcwd();
- my $x = "x$$";
- my $xx = $x . "x";
-
- # setup
- ok(mkpath($xx));
- ok(chdir($xx));
- END {
- ok(chdir($p));
- ok(rmtree($xx));
- }
-
- # create and delete directory
- my $px = catdir($p, $x);
- ok(mkpath($px));
- ok(rmtree($px), "rmtree"); # fails in File-Path-2.07
-}
Deleted: vendor/perl/dist/lib/File/Spec.pm
===================================================================
--- vendor/perl/dist/lib/File/Spec.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/File/Spec.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,336 +0,0 @@
-package File::Spec;
-
-use strict;
-use vars qw(@ISA $VERSION);
-
-$VERSION = '3.30';
-$VERSION = eval $VERSION;
-
-my %module = (MacOS => 'Mac',
- MSWin32 => 'Win32',
- os2 => 'OS2',
- VMS => 'VMS',
- epoc => 'Epoc',
- NetWare => 'Win32', # Yes, File::Spec::Win32 works on NetWare.
- symbian => 'Win32', # Yes, File::Spec::Win32 works on symbian.
- dos => 'OS2', # Yes, File::Spec::OS2 works on DJGPP.
- cygwin => 'Cygwin');
-
-
-my $module = $module{$^O} || 'Unix';
-
-require "File/Spec/$module.pm";
- at ISA = ("File::Spec::$module");
-
-1;
-
-__END__
-
-=head1 NAME
-
-File::Spec - portably perform operations on file names
-
-=head1 SYNOPSIS
-
- use File::Spec;
-
- $x=File::Spec->catfile('a', 'b', 'c');
-
-which returns 'a/b/c' under Unix. Or:
-
- use File::Spec::Functions;
-
- $x = catfile('a', 'b', 'c');
-
-=head1 DESCRIPTION
-
-This module is designed to support operations commonly performed on file
-specifications (usually called "file names", but not to be confused with the
-contents of a file, or Perl's file handles), such as concatenating several
-directory and file names into a single path, or determining whether a path
-is rooted. It is based on code directly taken from MakeMaker 5.17, code
-written by Andreas KE<ouml>nig, Andy Dougherty, Charles Bailey, Ilya
-Zakharevich, Paul Schinder, and others.
-
-Since these functions are different for most operating systems, each set of
-OS specific routines is available in a separate module, including:
-
- File::Spec::Unix
- File::Spec::Mac
- File::Spec::OS2
- File::Spec::Win32
- File::Spec::VMS
-
-The module appropriate for the current OS is automatically loaded by
-File::Spec. Since some modules (like VMS) make use of facilities available
-only under that OS, it may not be possible to load all modules under all
-operating systems.
-
-Since File::Spec is object oriented, subroutines should not be called directly,
-as in:
-
- File::Spec::catfile('a','b');
-
-but rather as class methods:
-
- File::Spec->catfile('a','b');
-
-For simple uses, L<File::Spec::Functions> provides convenient functional
-forms of these methods.
-
-=head1 METHODS
-
-=over 2
-
-=item canonpath
-X<canonpath>
-
-No physical check on the filesystem, but a logical cleanup of a
-path.
-
- $cpath = File::Spec->canonpath( $path ) ;
-
-Note that this does *not* collapse F<x/../y> sections into F<y>. This
-is by design. If F</foo> on your system is a symlink to F</bar/baz>,
-then F</foo/../quux> is actually F</bar/quux>, not F</quux> as a naive
-F<../>-removal would give you. If you want to do this kind of
-processing, you probably want C<Cwd>'s C<realpath()> function to
-actually traverse the filesystem cleaning up paths like this.
-
-=item catdir
-X<catdir>
-
-Concatenate two or more directory names to form a complete path ending
-with a directory. But remove the trailing slash from the resulting
-string, because it doesn't look good, isn't necessary and confuses
-OS/2. Of course, if this is the root directory, don't cut off the
-trailing slash :-)
-
- $path = File::Spec->catdir( @directories );
-
-=item catfile
-X<catfile>
-
-Concatenate one or more directory names and a filename to form a
-complete path ending with a filename
-
- $path = File::Spec->catfile( @directories, $filename );
-
-=item curdir
-X<curdir>
-
-Returns a string representation of the current directory.
-
- $curdir = File::Spec->curdir();
-
-=item devnull
-X<devnull>
-
-Returns a string representation of the null device.
-
- $devnull = File::Spec->devnull();
-
-=item rootdir
-X<rootdir>
-
-Returns a string representation of the root directory.
-
- $rootdir = File::Spec->rootdir();
-
-=item tmpdir
-X<tmpdir>
-
-Returns a string representation of the first writable directory from a
-list of possible temporary directories. Returns the current directory
-if no writable temporary directories are found. The list of directories
-checked depends on the platform; e.g. File::Spec::Unix checks C<$ENV{TMPDIR}>
-(unless taint is on) and F</tmp>.
-
- $tmpdir = File::Spec->tmpdir();
-
-=item updir
-X<updir>
-
-Returns a string representation of the parent directory.
-
- $updir = File::Spec->updir();
-
-=item no_upwards
-
-Given a list of file names, strip out those that refer to a parent
-directory. (Does not strip symlinks, only '.', '..', and equivalents.)
-
- @paths = File::Spec->no_upwards( @paths );
-
-=item case_tolerant
-
-Returns a true or false value indicating, respectively, that alphabetic
-case is not or is significant when comparing file specifications.
-
- $is_case_tolerant = File::Spec->case_tolerant();
-
-=item file_name_is_absolute
-
-Takes as its argument a path, and returns true if it is an absolute path.
-
- $is_absolute = File::Spec->file_name_is_absolute( $path );
-
-This does not consult the local filesystem on Unix, Win32, OS/2, or
-Mac OS (Classic). It does consult the working environment for VMS
-(see L<File::Spec::VMS/file_name_is_absolute>).
-
-=item path
-X<path>
-
-Takes no argument. Returns the environment variable C<PATH> (or the local
-platform's equivalent) as a list.
-
- @PATH = File::Spec->path();
-
-=item join
-X<join, path>
-
-join is the same as catfile.
-
-=item splitpath
-X<splitpath> X<split, path>
-
-Splits a path in to volume, directory, and filename portions. On systems
-with no concept of volume, returns '' for volume.
-
- ($volume,$directories,$file) = File::Spec->splitpath( $path );
- ($volume,$directories,$file) = File::Spec->splitpath( $path, $no_file );
-
-For systems with no syntax differentiating filenames from directories,
-assumes that the last file is a path unless C<$no_file> is true or a
-trailing separator or F</.> or F</..> is present. On Unix, this means that C<$no_file>
-true makes this return ( '', $path, '' ).
-
-The directory portion may or may not be returned with a trailing '/'.
-
-The results can be passed to L</catpath()> to get back a path equivalent to
-(usually identical to) the original path.
-
-=item splitdir
-X<splitdir> X<split, dir>
-
-The opposite of L</catdir()>.
-
- @dirs = File::Spec->splitdir( $directories );
-
-C<$directories> must be only the directory portion of the path on systems
-that have the concept of a volume or that have path syntax that differentiates
-files from directories.
-
-Unlike just splitting the directories on the separator, empty
-directory names (C<''>) can be returned, because these are significant
-on some OSes.
-
-=item catpath()
-
-Takes volume, directory and file portions and returns an entire path. Under
-Unix, C<$volume> is ignored, and directory and file are concatenated. A '/' is
-inserted if need be. On other OSes, C<$volume> is significant.
-
- $full_path = File::Spec->catpath( $volume, $directory, $file );
-
-=item abs2rel
-X<abs2rel> X<absolute, path> X<relative, path>
-
-Takes a destination path and an optional base path returns a relative path
-from the base path to the destination path:
-
- $rel_path = File::Spec->abs2rel( $path ) ;
- $rel_path = File::Spec->abs2rel( $path, $base ) ;
-
-If C<$base> is not present or '', then L<Cwd::cwd()|Cwd> is used. If C<$base> is
-relative, then it is converted to absolute form using
-L</rel2abs()>. This means that it is taken to be relative to
-L<Cwd::cwd()|Cwd>.
-
-On systems with the concept of volume, if C<$path> and C<$base> appear to be
-on two different volumes, we will not attempt to resolve the two
-paths, and we will instead simply return C<$path>. Note that previous
-versions of this module ignored the volume of C<$base>, which resulted in
-garbage results part of the time.
-
-On systems that have a grammar that indicates filenames, this ignores the
-C<$base> filename as well. Otherwise all path components are assumed to be
-directories.
-
-If C<$path> is relative, it is converted to absolute form using L</rel2abs()>.
-This means that it is taken to be relative to L<Cwd::cwd()|Cwd>.
-
-No checks against the filesystem are made. On VMS, there is
-interaction with the working environment, as logicals and
-macros are expanded.
-
-Based on code written by Shigio Yamaguchi.
-
-=item rel2abs()
-X<rel2abs> X<absolute, path> X<relative, path>
-
-Converts a relative path to an absolute path.
-
- $abs_path = File::Spec->rel2abs( $path ) ;
- $abs_path = File::Spec->rel2abs( $path, $base ) ;
-
-If C<$base> is not present or '', then L<Cwd::cwd()|Cwd> is used. If C<$base> is relative,
-then it is converted to absolute form using L</rel2abs()>. This means that it
-is taken to be relative to L<Cwd::cwd()|Cwd>.
-
-On systems with the concept of volume, if C<$path> and C<$base> appear to be
-on two different volumes, we will not attempt to resolve the two
-paths, and we will instead simply return C<$path>. Note that previous
-versions of this module ignored the volume of C<$base>, which resulted in
-garbage results part of the time.
-
-On systems that have a grammar that indicates filenames, this ignores the
-C<$base> filename as well. Otherwise all path components are assumed to be
-directories.
-
-If C<$path> is absolute, it is cleaned up and returned using L</canonpath()>.
-
-No checks against the filesystem are made. On VMS, there is
-interaction with the working environment, as logicals and
-macros are expanded.
-
-Based on code written by Shigio Yamaguchi.
-
-=back
-
-For further information, please see L<File::Spec::Unix>,
-L<File::Spec::Mac>, L<File::Spec::OS2>, L<File::Spec::Win32>, or
-L<File::Spec::VMS>.
-
-=head1 SEE ALSO
-
-L<File::Spec::Unix>, L<File::Spec::Mac>, L<File::Spec::OS2>,
-L<File::Spec::Win32>, L<File::Spec::VMS>, L<File::Spec::Functions>,
-L<ExtUtils::MakeMaker>
-
-=head1 AUTHOR
-
-Currently maintained by Ken Williams C<< <KWILLIAMS at cpan.org> >>.
-
-The vast majority of the code was written by
-Kenneth Albanowski C<< <kjahds at kjahds.com> >>,
-Andy Dougherty C<< <doughera at lafayette.edu> >>,
-Andreas KE<ouml>nig C<< <A.Koenig at franz.ww.TU-Berlin.DE> >>,
-Tim Bunce C<< <Tim.Bunce at ig.co.uk> >>.
-VMS support by Charles Bailey C<< <bailey at newman.upenn.edu> >>.
-OS/2 support by Ilya Zakharevich C<< <ilya at math.ohio-state.edu> >>.
-Mac support by Paul Schinder C<< <schinder at pobox.com> >>, and
-Thomas Wegner C<< <wegner_thomas at yahoo.com> >>.
-abs2rel() and rel2abs() written by Shigio Yamaguchi C<< <shigio at tamacom.com> >>,
-modified by Barrie Slaymaker C<< <barries at slaysys.com> >>.
-splitpath(), splitdir(), catpath() and catdir() by Barrie Slaymaker.
-
-=head1 COPYRIGHT
-
-Copyright (c) 2004 by the Perl 5 Porters. All rights reserved.
-
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/File/Temp.pm
===================================================================
--- vendor/perl/dist/lib/File/Temp.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/File/Temp.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,2452 +0,0 @@
-package File::Temp;
-
-=head1 NAME
-
-File::Temp - return name and handle of a temporary file safely
-
-=begin __INTERNALS
-
-=head1 PORTABILITY
-
-This section is at the top in order to provide easier access to
-porters. It is not expected to be rendered by a standard pod
-formatting tool. Please skip straight to the SYNOPSIS section if you
-are not trying to port this module to a new platform.
-
-This module is designed to be portable across operating systems and it
-currently supports Unix, VMS, DOS, OS/2, Windows and Mac OS
-(Classic). When porting to a new OS there are generally three main
-issues that have to be solved:
-
-=over 4
-
-=item *
-
-Can the OS unlink an open file? If it can not then the
-C<_can_unlink_opened_file> method should be modified.
-
-=item *
-
-Are the return values from C<stat> reliable? By default all the
-return values from C<stat> are compared when unlinking a temporary
-file using the filename and the handle. Operating systems other than
-unix do not always have valid entries in all fields. If C<unlink0> fails
-then the C<stat> comparison should be modified accordingly.
-
-=item *
-
-Security. Systems that can not support a test for the sticky bit
-on a directory can not use the MEDIUM and HIGH security tests.
-The C<_can_do_level> method should be modified accordingly.
-
-=back
-
-=end __INTERNALS
-
-=head1 SYNOPSIS
-
- use File::Temp qw/ tempfile tempdir /;
-
- $fh = tempfile();
- ($fh, $filename) = tempfile();
-
- ($fh, $filename) = tempfile( $template, DIR => $dir);
- ($fh, $filename) = tempfile( $template, SUFFIX => '.dat');
- ($fh, $filename) = tempfile( $template, TMPDIR => 1 );
-
- binmode( $fh, ":utf8" );
-
- $dir = tempdir( CLEANUP => 1 );
- ($fh, $filename) = tempfile( DIR => $dir );
-
-Object interface:
-
- require File::Temp;
- use File::Temp ();
- use File::Temp qw/ :seekable /;
-
- $fh = File::Temp->new();
- $fname = $fh->filename;
-
- $fh = File::Temp->new(TEMPLATE => $template);
- $fname = $fh->filename;
-
- $tmp = File::Temp->new( UNLINK => 0, SUFFIX => '.dat' );
- print $tmp "Some data\n";
- print "Filename is $tmp\n";
- $tmp->seek( 0, SEEK_END );
-
-The following interfaces are provided for compatibility with
-existing APIs. They should not be used in new code.
-
-MkTemp family:
-
- use File::Temp qw/ :mktemp /;
-
- ($fh, $file) = mkstemp( "tmpfileXXXXX" );
- ($fh, $file) = mkstemps( "tmpfileXXXXXX", $suffix);
-
- $tmpdir = mkdtemp( $template );
-
- $unopened_file = mktemp( $template );
-
-POSIX functions:
-
- use File::Temp qw/ :POSIX /;
-
- $file = tmpnam();
- $fh = tmpfile();
-
- ($fh, $file) = tmpnam();
-
-Compatibility functions:
-
- $unopened_file = File::Temp::tempnam( $dir, $pfx );
-
-=head1 DESCRIPTION
-
-C<File::Temp> can be used to create and open temporary files in a safe
-way. There is both a function interface and an object-oriented
-interface. The File::Temp constructor or the tempfile() function can
-be used to return the name and the open filehandle of a temporary
-file. The tempdir() function can be used to create a temporary
-directory.
-
-The security aspect of temporary file creation is emphasized such that
-a filehandle and filename are returned together. This helps guarantee
-that a race condition can not occur where the temporary file is
-created by another process between checking for the existence of the
-file and its opening. Additional security levels are provided to
-check, for example, that the sticky bit is set on world writable
-directories. See L<"safe_level"> for more information.
-
-For compatibility with popular C library functions, Perl implementations of
-the mkstemp() family of functions are provided. These are, mkstemp(),
-mkstemps(), mkdtemp() and mktemp().
-
-Additionally, implementations of the standard L<POSIX|POSIX>
-tmpnam() and tmpfile() functions are provided if required.
-
-Implementations of mktemp(), tmpnam(), and tempnam() are provided,
-but should be used with caution since they return only a filename
-that was valid when function was called, so cannot guarantee
-that the file will not exist by the time the caller opens the filename.
-
-Filehandles returned by these functions support the seekable methods.
-
-=cut
-
-# 5.6.0 gives us S_IWOTH, S_IWGRP, our and auto-vivifying filehandls
-# People would like a version on 5.004 so give them what they want :-)
-use 5.004;
-use strict;
-use Carp;
-use File::Spec 0.8;
-use File::Path qw/ rmtree /;
-use Fcntl 1.03;
-use IO::Seekable; # For SEEK_*
-use Errno;
-require VMS::Stdio if $^O eq 'VMS';
-
-# pre-emptively load Carp::Heavy. If we don't when we run out of file
-# handles and attempt to call croak() we get an error message telling
-# us that Carp::Heavy won't load rather than an error telling us we
-# have run out of file handles. We either preload croak() or we
-# switch the calls to croak from _gettemp() to use die.
-eval { require Carp::Heavy; };
-
-# Need the Symbol package if we are running older perl
-require Symbol if $] < 5.006;
-
-### For the OO interface
-use base qw/ IO::Handle IO::Seekable /;
-use overload '""' => "STRINGIFY", fallback => 1;
-
-# use 'our' on v5.6.0
-use vars qw($VERSION @EXPORT_OK %EXPORT_TAGS $DEBUG $KEEP_ALL);
-
-$DEBUG = 0;
-$KEEP_ALL = 0;
-
-# We are exporting functions
-
-use base qw/Exporter/;
-
-# Export list - to allow fine tuning of export table
-
- at EXPORT_OK = qw{
- tempfile
- tempdir
- tmpnam
- tmpfile
- mktemp
- mkstemp
- mkstemps
- mkdtemp
- unlink0
- cleanup
- SEEK_SET
- SEEK_CUR
- SEEK_END
- };
-
-# Groups of functions for export
-
-%EXPORT_TAGS = (
- 'POSIX' => [qw/ tmpnam tmpfile /],
- 'mktemp' => [qw/ mktemp mkstemp mkstemps mkdtemp/],
- 'seekable' => [qw/ SEEK_SET SEEK_CUR SEEK_END /],
- );
-
-# add contents of these tags to @EXPORT
-Exporter::export_tags('POSIX','mktemp','seekable');
-
-# Version number
-
-$VERSION = '0.22';
-
-# This is a list of characters that can be used in random filenames
-
-my @CHARS = (qw/ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
- a b c d e f g h i j k l m n o p q r s t u v w x y z
- 0 1 2 3 4 5 6 7 8 9 _
- /);
-
-# Maximum number of tries to make a temp file before failing
-
-use constant MAX_TRIES => 1000;
-
-# Minimum number of X characters that should be in a template
-use constant MINX => 4;
-
-# Default template when no template supplied
-
-use constant TEMPXXX => 'X' x 10;
-
-# Constants for the security level
-
-use constant STANDARD => 0;
-use constant MEDIUM => 1;
-use constant HIGH => 2;
-
-# OPENFLAGS. If we defined the flag to use with Sysopen here this gives
-# us an optimisation when many temporary files are requested
-
-my $OPENFLAGS = O_CREAT | O_EXCL | O_RDWR;
-my $LOCKFLAG;
-
-unless ($^O eq 'MacOS') {
- for my $oflag (qw/ NOFOLLOW BINARY LARGEFILE NOINHERIT /) {
- my ($bit, $func) = (0, "Fcntl::O_" . $oflag);
- no strict 'refs';
- $OPENFLAGS |= $bit if eval {
- # Make sure that redefined die handlers do not cause problems
- # e.g. CGI::Carp
- local $SIG{__DIE__} = sub {};
- local $SIG{__WARN__} = sub {};
- $bit = &$func();
- 1;
- };
- }
- # Special case O_EXLOCK
- $LOCKFLAG = eval {
- local $SIG{__DIE__} = sub {};
- local $SIG{__WARN__} = sub {};
- &Fcntl::O_EXLOCK();
- };
-}
-
-# On some systems the O_TEMPORARY flag can be used to tell the OS
-# to automatically remove the file when it is closed. This is fine
-# in most cases but not if tempfile is called with UNLINK=>0 and
-# the filename is requested -- in the case where the filename is to
-# be passed to another routine. This happens on windows. We overcome
-# this by using a second open flags variable
-
-my $OPENTEMPFLAGS = $OPENFLAGS;
-unless ($^O eq 'MacOS') {
- for my $oflag (qw/ TEMPORARY /) {
- my ($bit, $func) = (0, "Fcntl::O_" . $oflag);
- local($@);
- no strict 'refs';
- $OPENTEMPFLAGS |= $bit if eval {
- # Make sure that redefined die handlers do not cause problems
- # e.g. CGI::Carp
- local $SIG{__DIE__} = sub {};
- local $SIG{__WARN__} = sub {};
- $bit = &$func();
- 1;
- };
- }
-}
-
-# Private hash tracking which files have been created by each process id via the OO interface
-my %FILES_CREATED_BY_OBJECT;
-
-# INTERNAL ROUTINES - not to be used outside of package
-
-# Generic routine for getting a temporary filename
-# modelled on OpenBSD _gettemp() in mktemp.c
-
-# The template must contain X's that are to be replaced
-# with the random values
-
-# Arguments:
-
-# TEMPLATE - string containing the XXXXX's that is converted
-# to a random filename and opened if required
-
-# Optionally, a hash can also be supplied containing specific options
-# "open" => if true open the temp file, else just return the name
-# default is 0
-# "mkdir"=> if true, we are creating a temp directory rather than tempfile
-# default is 0
-# "suffixlen" => number of characters at end of PATH to be ignored.
-# default is 0.
-# "unlink_on_close" => indicates that, if possible, the OS should remove
-# the file as soon as it is closed. Usually indicates
-# use of the O_TEMPORARY flag to sysopen.
-# Usually irrelevant on unix
-# "use_exlock" => Indicates that O_EXLOCK should be used. Default is true.
-
-# Optionally a reference to a scalar can be passed into the function
-# On error this will be used to store the reason for the error
-# "ErrStr" => \$errstr
-
-# "open" and "mkdir" can not both be true
-# "unlink_on_close" is not used when "mkdir" is true.
-
-# The default options are equivalent to mktemp().
-
-# Returns:
-# filehandle - open file handle (if called with doopen=1, else undef)
-# temp name - name of the temp file or directory
-
-# For example:
-# ($fh, $name) = _gettemp($template, "open" => 1);
-
-# for the current version, failures are associated with
-# stored in an error string and returned to give the reason whilst debugging
-# This routine is not called by any external function
-sub _gettemp {
-
- croak 'Usage: ($fh, $name) = _gettemp($template, OPTIONS);'
- unless scalar(@_) >= 1;
-
- # the internal error string - expect it to be overridden
- # Need this in case the caller decides not to supply us a value
- # need an anonymous scalar
- my $tempErrStr;
-
- # Default options
- my %options = (
- "open" => 0,
- "mkdir" => 0,
- "suffixlen" => 0,
- "unlink_on_close" => 0,
- "use_exlock" => 1,
- "ErrStr" => \$tempErrStr,
- );
-
- # Read the template
- my $template = shift;
- if (ref($template)) {
- # Use a warning here since we have not yet merged ErrStr
- carp "File::Temp::_gettemp: template must not be a reference";
- return ();
- }
-
- # Check that the number of entries on stack are even
- if (scalar(@_) % 2 != 0) {
- # Use a warning here since we have not yet merged ErrStr
- carp "File::Temp::_gettemp: Must have even number of options";
- return ();
- }
-
- # Read the options and merge with defaults
- %options = (%options, @_) if @_;
-
- # Make sure the error string is set to undef
- ${$options{ErrStr}} = undef;
-
- # Can not open the file and make a directory in a single call
- if ($options{"open"} && $options{"mkdir"}) {
- ${$options{ErrStr}} = "doopen and domkdir can not both be true\n";
- return ();
- }
-
- # Find the start of the end of the Xs (position of last X)
- # Substr starts from 0
- my $start = length($template) - 1 - $options{"suffixlen"};
-
- # Check that we have at least MINX x X (e.g. 'XXXX") at the end of the string
- # (taking suffixlen into account). Any fewer is insecure.
-
- # Do it using substr - no reason to use a pattern match since
- # we know where we are looking and what we are looking for
-
- if (substr($template, $start - MINX + 1, MINX) ne 'X' x MINX) {
- ${$options{ErrStr}} = "The template must end with at least ".
- MINX . " 'X' characters\n";
- return ();
- }
-
- # Replace all the X at the end of the substring with a
- # random character or just all the XX at the end of a full string.
- # Do it as an if, since the suffix adjusts which section to replace
- # and suffixlen=0 returns nothing if used in the substr directly
- # and generate a full path from the template
-
- my $path = _replace_XX($template, $options{"suffixlen"});
-
-
- # Split the path into constituent parts - eventually we need to check
- # whether the directory exists
- # We need to know whether we are making a temp directory
- # or a tempfile
-
- my ($volume, $directories, $file);
- my $parent; # parent directory
- if ($options{"mkdir"}) {
- # There is no filename at the end
- ($volume, $directories, $file) = File::Spec->splitpath( $path, 1);
-
- # The parent is then $directories without the last directory
- # Split the directory and put it back together again
- my @dirs = File::Spec->splitdir($directories);
-
- # If @dirs only has one entry (i.e. the directory template) that means
- # we are in the current directory
- if ($#dirs == 0) {
- $parent = File::Spec->curdir;
- } else {
-
- if ($^O eq 'VMS') { # need volume to avoid relative dir spec
- $parent = File::Spec->catdir($volume, @dirs[0..$#dirs-1]);
- $parent = 'sys$disk:[]' if $parent eq '';
- } else {
-
- # Put it back together without the last one
- $parent = File::Spec->catdir(@dirs[0..$#dirs-1]);
-
- # ...and attach the volume (no filename)
- $parent = File::Spec->catpath($volume, $parent, '');
- }
-
- }
-
- } else {
-
- # Get rid of the last filename (use File::Basename for this?)
- ($volume, $directories, $file) = File::Spec->splitpath( $path );
-
- # Join up without the file part
- $parent = File::Spec->catpath($volume,$directories,'');
-
- # If $parent is empty replace with curdir
- $parent = File::Spec->curdir
- unless $directories ne '';
-
- }
-
- # Check that the parent directories exist
- # Do this even for the case where we are simply returning a name
- # not a file -- no point returning a name that includes a directory
- # that does not exist or is not writable
-
- unless (-e $parent) {
- ${$options{ErrStr}} = "Parent directory ($parent) does not exist";
- return ();
- }
- unless (-d $parent) {
- ${$options{ErrStr}} = "Parent directory ($parent) is not a directory";
- return ();
- }
-
- # Check the stickiness of the directory and chown giveaway if required
- # If the directory is world writable the sticky bit
- # must be set
-
- if (File::Temp->safe_level == MEDIUM) {
- my $safeerr;
- unless (_is_safe($parent,\$safeerr)) {
- ${$options{ErrStr}} = "Parent directory ($parent) is not safe ($safeerr)";
- return ();
- }
- } elsif (File::Temp->safe_level == HIGH) {
- my $safeerr;
- unless (_is_verysafe($parent, \$safeerr)) {
- ${$options{ErrStr}} = "Parent directory ($parent) is not safe ($safeerr)";
- return ();
- }
- }
-
-
- # Now try MAX_TRIES time to open the file
- for (my $i = 0; $i < MAX_TRIES; $i++) {
-
- # Try to open the file if requested
- if ($options{"open"}) {
- my $fh;
-
- # If we are running before perl5.6.0 we can not auto-vivify
- if ($] < 5.006) {
- $fh = &Symbol::gensym;
- }
-
- # Try to make sure this will be marked close-on-exec
- # XXX: Win32 doesn't respect this, nor the proper fcntl,
- # but may have O_NOINHERIT. This may or may not be in Fcntl.
- local $^F = 2;
-
- # Attempt to open the file
- my $open_success = undef;
- if ( $^O eq 'VMS' and $options{"unlink_on_close"} && !$KEEP_ALL) {
- # make it auto delete on close by setting FAB$V_DLT bit
- $fh = VMS::Stdio::vmssysopen($path, $OPENFLAGS, 0600, 'fop=dlt');
- $open_success = $fh;
- } else {
- my $flags = ( ($options{"unlink_on_close"} && !$KEEP_ALL) ?
- $OPENTEMPFLAGS :
- $OPENFLAGS );
- $flags |= $LOCKFLAG if (defined $LOCKFLAG && $options{use_exlock});
- $open_success = sysopen($fh, $path, $flags, 0600);
- }
- if ( $open_success ) {
-
- # in case of odd umask force rw
- chmod(0600, $path);
-
- # Opened successfully - return file handle and name
- return ($fh, $path);
-
- } else {
-
- # Error opening file - abort with error
- # if the reason was anything but EEXIST
- unless ($!{EEXIST}) {
- ${$options{ErrStr}} = "Could not create temp file $path: $!";
- return ();
- }
-
- # Loop round for another try
-
- }
- } elsif ($options{"mkdir"}) {
-
- # Open the temp directory
- if (mkdir( $path, 0700)) {
- # in case of odd umask
- chmod(0700, $path);
-
- return undef, $path;
- } else {
-
- # Abort with error if the reason for failure was anything
- # except EEXIST
- unless ($!{EEXIST}) {
- ${$options{ErrStr}} = "Could not create directory $path: $!";
- return ();
- }
-
- # Loop round for another try
-
- }
-
- } else {
-
- # Return true if the file can not be found
- # Directory has been checked previously
-
- return (undef, $path) unless -e $path;
-
- # Try again until MAX_TRIES
-
- }
-
- # Did not successfully open the tempfile/dir
- # so try again with a different set of random letters
- # No point in trying to increment unless we have only
- # 1 X say and the randomness could come up with the same
- # file MAX_TRIES in a row.
-
- # Store current attempt - in principal this implies that the
- # 3rd time around the open attempt that the first temp file
- # name could be generated again. Probably should store each
- # attempt and make sure that none are repeated
-
- my $original = $path;
- my $counter = 0; # Stop infinite loop
- my $MAX_GUESS = 50;
-
- do {
-
- # Generate new name from original template
- $path = _replace_XX($template, $options{"suffixlen"});
-
- $counter++;
-
- } until ($path ne $original || $counter > $MAX_GUESS);
-
- # Check for out of control looping
- if ($counter > $MAX_GUESS) {
- ${$options{ErrStr}} = "Tried to get a new temp name different to the previous value $MAX_GUESS times.\nSomething wrong with template?? ($template)";
- return ();
- }
-
- }
-
- # If we get here, we have run out of tries
- ${ $options{ErrStr} } = "Have exceeded the maximum number of attempts ("
- . MAX_TRIES . ") to open temp file/dir";
-
- return ();
-
-}
-
-# Internal routine to replace the XXXX... with random characters
-# This has to be done by _gettemp() every time it fails to
-# open a temp file/dir
-
-# Arguments: $template (the template with XXX),
-# $ignore (number of characters at end to ignore)
-
-# Returns: modified template
-
-sub _replace_XX {
-
- croak 'Usage: _replace_XX($template, $ignore)'
- unless scalar(@_) == 2;
-
- my ($path, $ignore) = @_;
-
- # Do it as an if, since the suffix adjusts which section to replace
- # and suffixlen=0 returns nothing if used in the substr directly
- # Alternatively, could simply set $ignore to length($path)-1
- # Don't want to always use substr when not required though.
- my $end = ( $] >= 5.006 ? "\\z" : "\\Z" );
-
- if ($ignore) {
- substr($path, 0, - $ignore) =~ s/X(?=X*$end)/$CHARS[ int( rand( @CHARS ) ) ]/ge;
- } else {
- $path =~ s/X(?=X*$end)/$CHARS[ int( rand( @CHARS ) ) ]/ge;
- }
- return $path;
-}
-
-# Internal routine to force a temp file to be writable after
-# it is created so that we can unlink it. Windows seems to occassionally
-# force a file to be readonly when written to certain temp locations
-sub _force_writable {
- my $file = shift;
- chmod 0600, $file;
-}
-
-
-# internal routine to check to see if the directory is safe
-# First checks to see if the directory is not owned by the
-# current user or root. Then checks to see if anyone else
-# can write to the directory and if so, checks to see if
-# it has the sticky bit set
-
-# Will not work on systems that do not support sticky bit
-
-#Args: directory path to check
-# Optionally: reference to scalar to contain error message
-# Returns true if the path is safe and false otherwise.
-# Returns undef if can not even run stat() on the path
-
-# This routine based on version written by Tom Christiansen
-
-# Presumably, by the time we actually attempt to create the
-# file or directory in this directory, it may not be safe
-# anymore... Have to run _is_safe directly after the open.
-
-sub _is_safe {
-
- my $path = shift;
- my $err_ref = shift;
-
- # Stat path
- my @info = stat($path);
- unless (scalar(@info)) {
- $$err_ref = "stat(path) returned no values";
- return 0;
- }
- ;
- return 1 if $^O eq 'VMS'; # owner delete control at file level
-
- # Check to see whether owner is neither superuser (or a system uid) nor me
- # Use the effective uid from the $> variable
- # UID is in [4]
- if ($info[4] > File::Temp->top_system_uid() && $info[4] != $>) {
-
- Carp::cluck(sprintf "uid=$info[4] topuid=%s euid=$> path='$path'",
- File::Temp->top_system_uid());
-
- $$err_ref = "Directory owned neither by root nor the current user"
- if ref($err_ref);
- return 0;
- }
-
- # check whether group or other can write file
- # use 066 to detect either reading or writing
- # use 022 to check writability
- # Do it with S_IWOTH and S_IWGRP for portability (maybe)
- # mode is in info[2]
- if (($info[2] & &Fcntl::S_IWGRP) || # Is group writable?
- ($info[2] & &Fcntl::S_IWOTH) ) { # Is world writable?
- # Must be a directory
- unless (-d $path) {
- $$err_ref = "Path ($path) is not a directory"
- if ref($err_ref);
- return 0;
- }
- # Must have sticky bit set
- unless (-k $path) {
- $$err_ref = "Sticky bit not set on $path when dir is group|world writable"
- if ref($err_ref);
- return 0;
- }
- }
-
- return 1;
-}
-
-# Internal routine to check whether a directory is safe
-# for temp files. Safer than _is_safe since it checks for
-# the possibility of chown giveaway and if that is a possibility
-# checks each directory in the path to see if it is safe (with _is_safe)
-
-# If _PC_CHOWN_RESTRICTED is not set, does the full test of each
-# directory anyway.
-
-# Takes optional second arg as scalar ref to error reason
-
-sub _is_verysafe {
-
- # Need POSIX - but only want to bother if really necessary due to overhead
- require POSIX;
-
- my $path = shift;
- print "_is_verysafe testing $path\n" if $DEBUG;
- return 1 if $^O eq 'VMS'; # owner delete control at file level
-
- my $err_ref = shift;
-
- # Should Get the value of _PC_CHOWN_RESTRICTED if it is defined
- # and If it is not there do the extensive test
- local($@);
- my $chown_restricted;
- $chown_restricted = &POSIX::_PC_CHOWN_RESTRICTED()
- if eval { &POSIX::_PC_CHOWN_RESTRICTED(); 1};
-
- # If chown_resticted is set to some value we should test it
- if (defined $chown_restricted) {
-
- # Return if the current directory is safe
- return _is_safe($path,$err_ref) if POSIX::sysconf( $chown_restricted );
-
- }
-
- # To reach this point either, the _PC_CHOWN_RESTRICTED symbol
- # was not avialable or the symbol was there but chown giveaway
- # is allowed. Either way, we now have to test the entire tree for
- # safety.
-
- # Convert path to an absolute directory if required
- unless (File::Spec->file_name_is_absolute($path)) {
- $path = File::Spec->rel2abs($path);
- }
-
- # Split directory into components - assume no file
- my ($volume, $directories, undef) = File::Spec->splitpath( $path, 1);
-
- # Slightly less efficient than having a function in File::Spec
- # to chop off the end of a directory or even a function that
- # can handle ../ in a directory tree
- # Sometimes splitdir() returns a blank at the end
- # so we will probably check the bottom directory twice in some cases
- my @dirs = File::Spec->splitdir($directories);
-
- # Concatenate one less directory each time around
- foreach my $pos (0.. $#dirs) {
- # Get a directory name
- my $dir = File::Spec->catpath($volume,
- File::Spec->catdir(@dirs[0.. $#dirs - $pos]),
- ''
- );
-
- print "TESTING DIR $dir\n" if $DEBUG;
-
- # Check the directory
- return 0 unless _is_safe($dir,$err_ref);
-
- }
-
- return 1;
-}
-
-
-
-# internal routine to determine whether unlink works on this
-# platform for files that are currently open.
-# Returns true if we can, false otherwise.
-
-# Currently WinNT, OS/2 and VMS can not unlink an opened file
-# On VMS this is because the O_EXCL flag is used to open the
-# temporary file. Currently I do not know enough about the issues
-# on VMS to decide whether O_EXCL is a requirement.
-
-sub _can_unlink_opened_file {
-
- if ($^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'VMS' || $^O eq 'dos' || $^O eq 'MacOS') {
- return 0;
- } else {
- return 1;
- }
-
-}
-
-# internal routine to decide which security levels are allowed
-# see safe_level() for more information on this
-
-# Controls whether the supplied security level is allowed
-
-# $cando = _can_do_level( $level )
-
-sub _can_do_level {
-
- # Get security level
- my $level = shift;
-
- # Always have to be able to do STANDARD
- return 1 if $level == STANDARD;
-
- # Currently, the systems that can do HIGH or MEDIUM are identical
- if ( $^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'cygwin' || $^O eq 'dos' || $^O eq 'MacOS' || $^O eq 'mpeix') {
- return 0;
- } else {
- return 1;
- }
-
-}
-
-# This routine sets up a deferred unlinking of a specified
-# filename and filehandle. It is used in the following cases:
-# - Called by unlink0 if an opened file can not be unlinked
-# - Called by tempfile() if files are to be removed on shutdown
-# - Called by tempdir() if directories are to be removed on shutdown
-
-# Arguments:
-# _deferred_unlink( $fh, $fname, $isdir );
-#
-# - filehandle (so that it can be expclicitly closed if open
-# - filename (the thing we want to remove)
-# - isdir (flag to indicate that we are being given a directory)
-# [and hence no filehandle]
-
-# Status is not referred to since all the magic is done with an END block
-
-{
- # Will set up two lexical variables to contain all the files to be
- # removed. One array for files, another for directories They will
- # only exist in this block.
-
- # This means we only have to set up a single END block to remove
- # all files.
-
- # in order to prevent child processes inadvertently deleting the parent
- # temp files we use a hash to store the temp files and directories
- # created by a particular process id.
-
- # %files_to_unlink contains values that are references to an array of
- # array references containing the filehandle and filename associated with
- # the temp file.
- my (%files_to_unlink, %dirs_to_unlink);
-
- # Set up an end block to use these arrays
- END {
- local($., $@, $!, $^E, $?);
- cleanup();
- }
-
- # Cleanup function. Always triggered on END but can be invoked
- # manually.
- sub cleanup {
- if (!$KEEP_ALL) {
- # Files
- my @files = (exists $files_to_unlink{$$} ?
- @{ $files_to_unlink{$$} } : () );
- foreach my $file (@files) {
- # close the filehandle without checking its state
- # in order to make real sure that this is closed
- # if its already closed then I dont care about the answer
- # probably a better way to do this
- close($file->[0]); # file handle is [0]
-
- if (-f $file->[1]) { # file name is [1]
- _force_writable( $file->[1] ); # for windows
- unlink $file->[1] or warn "Error removing ".$file->[1];
- }
- }
- # Dirs
- my @dirs = (exists $dirs_to_unlink{$$} ?
- @{ $dirs_to_unlink{$$} } : () );
- foreach my $dir (@dirs) {
- if (-d $dir) {
- # Some versions of rmtree will abort if you attempt to remove
- # the directory you are sitting in. We protect that and turn it
- # into a warning. We do this because this occurs during
- # cleanup and so can not be caught by the user.
- eval { rmtree($dir, $DEBUG, 0); };
- warn $@ if ($@ && $^W);
- }
- }
-
- # clear the arrays
- @{ $files_to_unlink{$$} } = ()
- if exists $files_to_unlink{$$};
- @{ $dirs_to_unlink{$$} } = ()
- if exists $dirs_to_unlink{$$};
- }
- }
-
-
- # This is the sub called to register a file for deferred unlinking
- # This could simply store the input parameters and defer everything
- # until the END block. For now we do a bit of checking at this
- # point in order to make sure that (1) we have a file/dir to delete
- # and (2) we have been called with the correct arguments.
- sub _deferred_unlink {
-
- croak 'Usage: _deferred_unlink($fh, $fname, $isdir)'
- unless scalar(@_) == 3;
-
- my ($fh, $fname, $isdir) = @_;
-
- warn "Setting up deferred removal of $fname\n"
- if $DEBUG;
-
- # If we have a directory, check that it is a directory
- if ($isdir) {
-
- if (-d $fname) {
-
- # Directory exists so store it
- # first on VMS turn []foo into [.foo] for rmtree
- $fname = VMS::Filespec::vmspath($fname) if $^O eq 'VMS';
- $dirs_to_unlink{$$} = []
- unless exists $dirs_to_unlink{$$};
- push (@{ $dirs_to_unlink{$$} }, $fname);
-
- } else {
- carp "Request to remove directory $fname could not be completed since it does not exist!\n" if $^W;
- }
-
- } else {
-
- if (-f $fname) {
-
- # file exists so store handle and name for later removal
- $files_to_unlink{$$} = []
- unless exists $files_to_unlink{$$};
- push(@{ $files_to_unlink{$$} }, [$fh, $fname]);
-
- } else {
- carp "Request to remove file $fname could not be completed since it is not there!\n" if $^W;
- }
-
- }
-
- }
-
-
-}
-
-=head1 OBJECT-ORIENTED INTERFACE
-
-This is the primary interface for interacting with
-C<File::Temp>. Using the OO interface a temporary file can be created
-when the object is constructed and the file can be removed when the
-object is no longer required.
-
-Note that there is no method to obtain the filehandle from the
-C<File::Temp> object. The object itself acts as a filehandle. Also,
-the object is configured such that it stringifies to the name of the
-temporary file, and can be compared to a filename directly. The object
-isa C<IO::Handle> and isa C<IO::Seekable> so all those methods are
-available.
-
-=over 4
-
-=item B<new>
-
-Create a temporary file object.
-
- my $tmp = File::Temp->new();
-
-by default the object is constructed as if C<tempfile>
-was called without options, but with the additional behaviour
-that the temporary file is removed by the object destructor
-if UNLINK is set to true (the default).
-
-Supported arguments are the same as for C<tempfile>: UNLINK
-(defaulting to true), DIR, EXLOCK and SUFFIX. Additionally, the filename
-template is specified using the TEMPLATE option. The OPEN option
-is not supported (the file is always opened).
-
- $tmp = File::Temp->new( TEMPLATE => 'tempXXXXX',
- DIR => 'mydir',
- SUFFIX => '.dat');
-
-Arguments are case insensitive.
-
-Can call croak() if an error occurs.
-
-=cut
-
-sub new {
- my $proto = shift;
- my $class = ref($proto) || $proto;
-
- # read arguments and convert keys to upper case
- my %args = @_;
- %args = map { uc($_), $args{$_} } keys %args;
-
- # see if they are unlinking (defaulting to yes)
- my $unlink = (exists $args{UNLINK} ? $args{UNLINK} : 1 );
- delete $args{UNLINK};
-
- # template (store it in an array so that it will
- # disappear from the arg list of tempfile)
- my @template = ( exists $args{TEMPLATE} ? $args{TEMPLATE} : () );
- delete $args{TEMPLATE};
-
- # Protect OPEN
- delete $args{OPEN};
-
- # Open the file and retain file handle and file name
- my ($fh, $path) = tempfile( @template, %args );
-
- print "Tmp: $fh - $path\n" if $DEBUG;
-
- # Store the filename in the scalar slot
- ${*$fh} = $path;
-
- # Cache the filename by pid so that the destructor can decide whether to remove it
- $FILES_CREATED_BY_OBJECT{$$}{$path} = 1;
-
- # Store unlink information in hash slot (plus other constructor info)
- %{*$fh} = %args;
-
- # create the object
- bless $fh, $class;
-
- # final method-based configuration
- $fh->unlink_on_destroy( $unlink );
-
- return $fh;
-}
-
-=item B<newdir>
-
-Create a temporary directory using an object oriented interface.
-
- $dir = File::Temp->newdir();
-
-By default the directory is deleted when the object goes out of scope.
-
-Supports the same options as the C<tempdir> function. Note that directories
-created with this method default to CLEANUP => 1.
-
- $dir = File::Temp->newdir( $template, %options );
-
-=cut
-
-sub newdir {
- my $self = shift;
-
- # need to handle args as in tempdir because we have to force CLEANUP
- # default without passing CLEANUP to tempdir
- my $template = (scalar(@_) % 2 == 1 ? shift(@_) : undef );
- my %options = @_;
- my $cleanup = (exists $options{CLEANUP} ? $options{CLEANUP} : 1 );
-
- delete $options{CLEANUP};
-
- my $tempdir;
- if (defined $template) {
- $tempdir = tempdir( $template, %options );
- } else {
- $tempdir = tempdir( %options );
- }
- return bless { DIRNAME => $tempdir,
- CLEANUP => $cleanup,
- LAUNCHPID => $$,
- }, "File::Temp::Dir";
-}
-
-=item B<filename>
-
-Return the name of the temporary file associated with this object
-(if the object was created using the "new" constructor).
-
- $filename = $tmp->filename;
-
-This method is called automatically when the object is used as
-a string.
-
-=cut
-
-sub filename {
- my $self = shift;
- return ${*$self};
-}
-
-sub STRINGIFY {
- my $self = shift;
- return $self->filename;
-}
-
-=item B<dirname>
-
-Return the name of the temporary directory associated with this
-object (if the object was created using the "newdir" constructor).
-
- $dirname = $tmpdir->dirname;
-
-This method is called automatically when the object is used in string context.
-
-=item B<unlink_on_destroy>
-
-Control whether the file is unlinked when the object goes out of scope.
-The file is removed if this value is true and $KEEP_ALL is not.
-
- $fh->unlink_on_destroy( 1 );
-
-Default is for the file to be removed.
-
-=cut
-
-sub unlink_on_destroy {
- my $self = shift;
- if (@_) {
- ${*$self}{UNLINK} = shift;
- }
- return ${*$self}{UNLINK};
-}
-
-=item B<DESTROY>
-
-When the object goes out of scope, the destructor is called. This
-destructor will attempt to unlink the file (using C<unlink1>)
-if the constructor was called with UNLINK set to 1 (the default state
-if UNLINK is not specified).
-
-No error is given if the unlink fails.
-
-If the object has been passed to a child process during a fork, the
-file will be deleted when the object goes out of scope in the parent.
-
-For a temporary directory object the directory will be removed
-unless the CLEANUP argument was used in the constructor (and set to
-false) or C<unlink_on_destroy> was modified after creation.
-
-If the global variable $KEEP_ALL is true, the file or directory
-will not be removed.
-
-=cut
-
-sub DESTROY {
- local($., $@, $!, $^E, $?);
- my $self = shift;
-
- # Make sure we always remove the file from the global hash
- # on destruction. This prevents the hash from growing uncontrollably
- # and post-destruction there is no reason to know about the file.
- my $file = $self->filename;
- my $was_created_by_proc;
- if (exists $FILES_CREATED_BY_OBJECT{$$}{$file}) {
- $was_created_by_proc = 1;
- delete $FILES_CREATED_BY_OBJECT{$$}{$file};
- }
-
- if (${*$self}{UNLINK} && !$KEEP_ALL) {
- print "# ---------> Unlinking $self\n" if $DEBUG;
-
- # only delete if this process created it
- return unless $was_created_by_proc;
-
- # The unlink1 may fail if the file has been closed
- # by the caller. This leaves us with the decision
- # of whether to refuse to remove the file or simply
- # do an unlink without test. Seems to be silly
- # to do this when we are trying to be careful
- # about security
- _force_writable( $file ); # for windows
- unlink1( $self, $file )
- or unlink($file);
- }
-}
-
-=back
-
-=head1 FUNCTIONS
-
-This section describes the recommended interface for generating
-temporary files and directories.
-
-=over 4
-
-=item B<tempfile>
-
-This is the basic function to generate temporary files.
-The behaviour of the file can be changed using various options:
-
- $fh = tempfile();
- ($fh, $filename) = tempfile();
-
-Create a temporary file in the directory specified for temporary
-files, as specified by the tmpdir() function in L<File::Spec>.
-
- ($fh, $filename) = tempfile($template);
-
-Create a temporary file in the current directory using the supplied
-template. Trailing `X' characters are replaced with random letters to
-generate the filename. At least four `X' characters must be present
-at the end of the template.
-
- ($fh, $filename) = tempfile($template, SUFFIX => $suffix)
-
-Same as previously, except that a suffix is added to the template
-after the `X' translation. Useful for ensuring that a temporary
-filename has a particular extension when needed by other applications.
-But see the WARNING at the end.
-
- ($fh, $filename) = tempfile($template, DIR => $dir);
-
-Translates the template as before except that a directory name
-is specified.
-
- ($fh, $filename) = tempfile($template, TMPDIR => 1);
-
-Equivalent to specifying a DIR of "File::Spec->tmpdir", writing the file
-into the same temporary directory as would be used if no template was
-specified at all.
-
- ($fh, $filename) = tempfile($template, UNLINK => 1);
-
-Return the filename and filehandle as before except that the file is
-automatically removed when the program exits (dependent on
-$KEEP_ALL). Default is for the file to be removed if a file handle is
-requested and to be kept if the filename is requested. In a scalar
-context (where no filename is returned) the file is always deleted
-either (depending on the operating system) on exit or when it is
-closed (unless $KEEP_ALL is true when the temp file is created).
-
-Use the object-oriented interface if fine-grained control of when
-a file is removed is required.
-
-If the template is not specified, a template is always
-automatically generated. This temporary file is placed in tmpdir()
-(L<File::Spec>) unless a directory is specified explicitly with the
-DIR option.
-
- $fh = tempfile( DIR => $dir );
-
-If called in scalar context, only the filehandle is returned and the
-file will automatically be deleted when closed on operating systems
-that support this (see the description of tmpfile() elsewhere in this
-document). This is the preferred mode of operation, as if you only
-have a filehandle, you can never create a race condition by fumbling
-with the filename. On systems that can not unlink an open file or can
-not mark a file as temporary when it is opened (for example, Windows
-NT uses the C<O_TEMPORARY> flag) the file is marked for deletion when
-the program ends (equivalent to setting UNLINK to 1). The C<UNLINK>
-flag is ignored if present.
-
- (undef, $filename) = tempfile($template, OPEN => 0);
-
-This will return the filename based on the template but
-will not open this file. Cannot be used in conjunction with
-UNLINK set to true. Default is to always open the file
-to protect from possible race conditions. A warning is issued
-if warnings are turned on. Consider using the tmpnam()
-and mktemp() functions described elsewhere in this document
-if opening the file is not required.
-
-If the operating system supports it (for example BSD derived systems), the
-filehandle will be opened with O_EXLOCK (open with exclusive file lock).
-This can sometimes cause problems if the intention is to pass the filename
-to another system that expects to take an exclusive lock itself (such as
-DBD::SQLite) whilst ensuring that the tempfile is not reused. In this
-situation the "EXLOCK" option can be passed to tempfile. By default EXLOCK
-will be true (this retains compatibility with earlier releases).
-
- ($fh, $filename) = tempfile($template, EXLOCK => 0);
-
-Options can be combined as required.
-
-Will croak() if there is an error.
-
-=cut
-
-sub tempfile {
-
- # Can not check for argument count since we can have any
- # number of args
-
- # Default options
- my %options = (
- "DIR" => undef, # Directory prefix
- "SUFFIX" => '', # Template suffix
- "UNLINK" => 0, # Do not unlink file on exit
- "OPEN" => 1, # Open file
- "TMPDIR" => 0, # Place tempfile in tempdir if template specified
- "EXLOCK" => 1, # Open file with O_EXLOCK
- );
-
- # Check to see whether we have an odd or even number of arguments
- my $template = (scalar(@_) % 2 == 1 ? shift(@_) : undef);
-
- # Read the options and merge with defaults
- %options = (%options, @_) if @_;
-
- # First decision is whether or not to open the file
- if (! $options{"OPEN"}) {
-
- warn "tempfile(): temporary filename requested but not opened.\nPossibly unsafe, consider using tempfile() with OPEN set to true\n"
- if $^W;
-
- }
-
- if ($options{"DIR"} and $^O eq 'VMS') {
-
- # on VMS turn []foo into [.foo] for concatenation
- $options{"DIR"} = VMS::Filespec::vmspath($options{"DIR"});
- }
-
- # Construct the template
-
- # Have a choice of trying to work around the mkstemp/mktemp/tmpnam etc
- # functions or simply constructing a template and using _gettemp()
- # explicitly. Go for the latter
-
- # First generate a template if not defined and prefix the directory
- # If no template must prefix the temp directory
- if (defined $template) {
- # End up with current directory if neither DIR not TMPDIR are set
- if ($options{"DIR"}) {
-
- $template = File::Spec->catfile($options{"DIR"}, $template);
-
- } elsif ($options{TMPDIR}) {
-
- $template = File::Spec->catfile(File::Spec->tmpdir, $template );
-
- }
-
- } else {
-
- if ($options{"DIR"}) {
-
- $template = File::Spec->catfile($options{"DIR"}, TEMPXXX);
-
- } else {
-
- $template = File::Spec->catfile(File::Spec->tmpdir, TEMPXXX);
-
- }
-
- }
-
- # Now add a suffix
- $template .= $options{"SUFFIX"};
-
- # Determine whether we should tell _gettemp to unlink the file
- # On unix this is irrelevant and can be worked out after the file is
- # opened (simply by unlinking the open filehandle). On Windows or VMS
- # we have to indicate temporary-ness when we open the file. In general
- # we only want a true temporary file if we are returning just the
- # filehandle - if the user wants the filename they probably do not
- # want the file to disappear as soon as they close it (which may be
- # important if they want a child process to use the file)
- # For this reason, tie unlink_on_close to the return context regardless
- # of OS.
- my $unlink_on_close = ( wantarray ? 0 : 1);
-
- # Create the file
- my ($fh, $path, $errstr);
- croak "Error in tempfile() using $template: $errstr"
- unless (($fh, $path) = _gettemp($template,
- "open" => $options{'OPEN'},
- "mkdir"=> 0 ,
- "unlink_on_close" => $unlink_on_close,
- "suffixlen" => length($options{'SUFFIX'}),
- "ErrStr" => \$errstr,
- "use_exlock" => $options{EXLOCK},
- ) );
-
- # Set up an exit handler that can do whatever is right for the
- # system. This removes files at exit when requested explicitly or when
- # system is asked to unlink_on_close but is unable to do so because
- # of OS limitations.
- # The latter should be achieved by using a tied filehandle.
- # Do not check return status since this is all done with END blocks.
- _deferred_unlink($fh, $path, 0) if $options{"UNLINK"};
-
- # Return
- if (wantarray()) {
-
- if ($options{'OPEN'}) {
- return ($fh, $path);
- } else {
- return (undef, $path);
- }
-
- } else {
-
- # Unlink the file. It is up to unlink0 to decide what to do with
- # this (whether to unlink now or to defer until later)
- unlink0($fh, $path) or croak "Error unlinking file $path using unlink0";
-
- # Return just the filehandle.
- return $fh;
- }
-
-
-}
-
-=item B<tempdir>
-
-This is the recommended interface for creation of temporary
-directories. By default the directory will not be removed on exit
-(that is, it won't be temporary; this behaviour can not be changed
-because of issues with backwards compatibility). To enable removal
-either use the CLEANUP option which will trigger removal on program
-exit, or consider using the "newdir" method in the object interface which
-will allow the directory to be cleaned up when the object goes out of
-scope.
-
-The behaviour of the function depends on the arguments:
-
- $tempdir = tempdir();
-
-Create a directory in tmpdir() (see L<File::Spec|File::Spec>).
-
- $tempdir = tempdir( $template );
-
-Create a directory from the supplied template. This template is
-similar to that described for tempfile(). `X' characters at the end
-of the template are replaced with random letters to construct the
-directory name. At least four `X' characters must be in the template.
-
- $tempdir = tempdir ( DIR => $dir );
-
-Specifies the directory to use for the temporary directory.
-The temporary directory name is derived from an internal template.
-
- $tempdir = tempdir ( $template, DIR => $dir );
-
-Prepend the supplied directory name to the template. The template
-should not include parent directory specifications itself. Any parent
-directory specifications are removed from the template before
-prepending the supplied directory.
-
- $tempdir = tempdir ( $template, TMPDIR => 1 );
-
-Using the supplied template, create the temporary directory in
-a standard location for temporary files. Equivalent to doing
-
- $tempdir = tempdir ( $template, DIR => File::Spec->tmpdir);
-
-but shorter. Parent directory specifications are stripped from the
-template itself. The C<TMPDIR> option is ignored if C<DIR> is set
-explicitly. Additionally, C<TMPDIR> is implied if neither a template
-nor a directory are supplied.
-
- $tempdir = tempdir( $template, CLEANUP => 1);
-
-Create a temporary directory using the supplied template, but
-attempt to remove it (and all files inside it) when the program
-exits. Note that an attempt will be made to remove all files from
-the directory even if they were not created by this module (otherwise
-why ask to clean it up?). The directory removal is made with
-the rmtree() function from the L<File::Path|File::Path> module.
-Of course, if the template is not specified, the temporary directory
-will be created in tmpdir() and will also be removed at program exit.
-
-Will croak() if there is an error.
-
-=cut
-
-# '
-
-sub tempdir {
-
- # Can not check for argument count since we can have any
- # number of args
-
- # Default options
- my %options = (
- "CLEANUP" => 0, # Remove directory on exit
- "DIR" => '', # Root directory
- "TMPDIR" => 0, # Use tempdir with template
- );
-
- # Check to see whether we have an odd or even number of arguments
- my $template = (scalar(@_) % 2 == 1 ? shift(@_) : undef );
-
- # Read the options and merge with defaults
- %options = (%options, @_) if @_;
-
- # Modify or generate the template
-
- # Deal with the DIR and TMPDIR options
- if (defined $template) {
-
- # Need to strip directory path if using DIR or TMPDIR
- if ($options{'TMPDIR'} || $options{'DIR'}) {
-
- # Strip parent directory from the filename
- #
- # There is no filename at the end
- $template = VMS::Filespec::vmspath($template) if $^O eq 'VMS';
- my ($volume, $directories, undef) = File::Spec->splitpath( $template, 1);
-
- # Last directory is then our template
- $template = (File::Spec->splitdir($directories))[-1];
-
- # Prepend the supplied directory or temp dir
- if ($options{"DIR"}) {
-
- $template = File::Spec->catdir($options{"DIR"}, $template);
-
- } elsif ($options{TMPDIR}) {
-
- # Prepend tmpdir
- $template = File::Spec->catdir(File::Spec->tmpdir, $template);
-
- }
-
- }
-
- } else {
-
- if ($options{"DIR"}) {
-
- $template = File::Spec->catdir($options{"DIR"}, TEMPXXX);
-
- } else {
-
- $template = File::Spec->catdir(File::Spec->tmpdir, TEMPXXX);
-
- }
-
- }
-
- # Create the directory
- my $tempdir;
- my $suffixlen = 0;
- if ($^O eq 'VMS') { # dir names can end in delimiters
- $template =~ m/([\.\]:>]+)$/;
- $suffixlen = length($1);
- }
- if ( ($^O eq 'MacOS') && (substr($template, -1) eq ':') ) {
- # dir name has a trailing ':'
- ++$suffixlen;
- }
-
- my $errstr;
- croak "Error in tempdir() using $template: $errstr"
- unless ((undef, $tempdir) = _gettemp($template,
- "open" => 0,
- "mkdir"=> 1 ,
- "suffixlen" => $suffixlen,
- "ErrStr" => \$errstr,
- ) );
-
- # Install exit handler; must be dynamic to get lexical
- if ( $options{'CLEANUP'} && -d $tempdir) {
- _deferred_unlink(undef, $tempdir, 1);
- }
-
- # Return the dir name
- return $tempdir;
-
-}
-
-=back
-
-=head1 MKTEMP FUNCTIONS
-
-The following functions are Perl implementations of the
-mktemp() family of temp file generation system calls.
-
-=over 4
-
-=item B<mkstemp>
-
-Given a template, returns a filehandle to the temporary file and the name
-of the file.
-
- ($fh, $name) = mkstemp( $template );
-
-In scalar context, just the filehandle is returned.
-
-The template may be any filename with some number of X's appended
-to it, for example F</tmp/temp.XXXX>. The trailing X's are replaced
-with unique alphanumeric combinations.
-
-Will croak() if there is an error.
-
-=cut
-
-
-
-sub mkstemp {
-
- croak "Usage: mkstemp(template)"
- if scalar(@_) != 1;
-
- my $template = shift;
-
- my ($fh, $path, $errstr);
- croak "Error in mkstemp using $template: $errstr"
- unless (($fh, $path) = _gettemp($template,
- "open" => 1,
- "mkdir"=> 0 ,
- "suffixlen" => 0,
- "ErrStr" => \$errstr,
- ) );
-
- if (wantarray()) {
- return ($fh, $path);
- } else {
- return $fh;
- }
-
-}
-
-
-=item B<mkstemps>
-
-Similar to mkstemp(), except that an extra argument can be supplied
-with a suffix to be appended to the template.
-
- ($fh, $name) = mkstemps( $template, $suffix );
-
-For example a template of C<testXXXXXX> and suffix of C<.dat>
-would generate a file similar to F<testhGji_w.dat>.
-
-Returns just the filehandle alone when called in scalar context.
-
-Will croak() if there is an error.
-
-=cut
-
-sub mkstemps {
-
- croak "Usage: mkstemps(template, suffix)"
- if scalar(@_) != 2;
-
-
- my $template = shift;
- my $suffix = shift;
-
- $template .= $suffix;
-
- my ($fh, $path, $errstr);
- croak "Error in mkstemps using $template: $errstr"
- unless (($fh, $path) = _gettemp($template,
- "open" => 1,
- "mkdir"=> 0 ,
- "suffixlen" => length($suffix),
- "ErrStr" => \$errstr,
- ) );
-
- if (wantarray()) {
- return ($fh, $path);
- } else {
- return $fh;
- }
-
-}
-
-=item B<mkdtemp>
-
-Create a directory from a template. The template must end in
-X's that are replaced by the routine.
-
- $tmpdir_name = mkdtemp($template);
-
-Returns the name of the temporary directory created.
-
-Directory must be removed by the caller.
-
-Will croak() if there is an error.
-
-=cut
-
-#' # for emacs
-
-sub mkdtemp {
-
- croak "Usage: mkdtemp(template)"
- if scalar(@_) != 1;
-
- my $template = shift;
- my $suffixlen = 0;
- if ($^O eq 'VMS') { # dir names can end in delimiters
- $template =~ m/([\.\]:>]+)$/;
- $suffixlen = length($1);
- }
- if ( ($^O eq 'MacOS') && (substr($template, -1) eq ':') ) {
- # dir name has a trailing ':'
- ++$suffixlen;
- }
- my ($junk, $tmpdir, $errstr);
- croak "Error creating temp directory from template $template\: $errstr"
- unless (($junk, $tmpdir) = _gettemp($template,
- "open" => 0,
- "mkdir"=> 1 ,
- "suffixlen" => $suffixlen,
- "ErrStr" => \$errstr,
- ) );
-
- return $tmpdir;
-
-}
-
-=item B<mktemp>
-
-Returns a valid temporary filename but does not guarantee
-that the file will not be opened by someone else.
-
- $unopened_file = mktemp($template);
-
-Template is the same as that required by mkstemp().
-
-Will croak() if there is an error.
-
-=cut
-
-sub mktemp {
-
- croak "Usage: mktemp(template)"
- if scalar(@_) != 1;
-
- my $template = shift;
-
- my ($tmpname, $junk, $errstr);
- croak "Error getting name to temp file from template $template: $errstr"
- unless (($junk, $tmpname) = _gettemp($template,
- "open" => 0,
- "mkdir"=> 0 ,
- "suffixlen" => 0,
- "ErrStr" => \$errstr,
- ) );
-
- return $tmpname;
-}
-
-=back
-
-=head1 POSIX FUNCTIONS
-
-This section describes the re-implementation of the tmpnam()
-and tmpfile() functions described in L<POSIX>
-using the mkstemp() from this module.
-
-Unlike the L<POSIX|POSIX> implementations, the directory used
-for the temporary file is not specified in a system include
-file (C<P_tmpdir>) but simply depends on the choice of tmpdir()
-returned by L<File::Spec|File::Spec>. On some implementations this
-location can be set using the C<TMPDIR> environment variable, which
-may not be secure.
-If this is a problem, simply use mkstemp() and specify a template.
-
-=over 4
-
-=item B<tmpnam>
-
-When called in scalar context, returns the full name (including path)
-of a temporary file (uses mktemp()). The only check is that the file does
-not already exist, but there is no guarantee that that condition will
-continue to apply.
-
- $file = tmpnam();
-
-When called in list context, a filehandle to the open file and
-a filename are returned. This is achieved by calling mkstemp()
-after constructing a suitable template.
-
- ($fh, $file) = tmpnam();
-
-If possible, this form should be used to prevent possible
-race conditions.
-
-See L<File::Spec/tmpdir> for information on the choice of temporary
-directory for a particular operating system.
-
-Will croak() if there is an error.
-
-=cut
-
-sub tmpnam {
-
- # Retrieve the temporary directory name
- my $tmpdir = File::Spec->tmpdir;
-
- croak "Error temporary directory is not writable"
- if $tmpdir eq '';
-
- # Use a ten character template and append to tmpdir
- my $template = File::Spec->catfile($tmpdir, TEMPXXX);
-
- if (wantarray() ) {
- return mkstemp($template);
- } else {
- return mktemp($template);
- }
-
-}
-
-=item B<tmpfile>
-
-Returns the filehandle of a temporary file.
-
- $fh = tmpfile();
-
-The file is removed when the filehandle is closed or when the program
-exits. No access to the filename is provided.
-
-If the temporary file can not be created undef is returned.
-Currently this command will probably not work when the temporary
-directory is on an NFS file system.
-
-Will croak() if there is an error.
-
-=cut
-
-sub tmpfile {
-
- # Simply call tmpnam() in a list context
- my ($fh, $file) = tmpnam();
-
- # Make sure file is removed when filehandle is closed
- # This will fail on NFS
- unlink0($fh, $file)
- or return undef;
-
- return $fh;
-
-}
-
-=back
-
-=head1 ADDITIONAL FUNCTIONS
-
-These functions are provided for backwards compatibility
-with common tempfile generation C library functions.
-
-They are not exported and must be addressed using the full package
-name.
-
-=over 4
-
-=item B<tempnam>
-
-Return the name of a temporary file in the specified directory
-using a prefix. The file is guaranteed not to exist at the time
-the function was called, but such guarantees are good for one
-clock tick only. Always use the proper form of C<sysopen>
-with C<O_CREAT | O_EXCL> if you must open such a filename.
-
- $filename = File::Temp::tempnam( $dir, $prefix );
-
-Equivalent to running mktemp() with $dir/$prefixXXXXXXXX
-(using unix file convention as an example)
-
-Because this function uses mktemp(), it can suffer from race conditions.
-
-Will croak() if there is an error.
-
-=cut
-
-sub tempnam {
-
- croak 'Usage tempnam($dir, $prefix)' unless scalar(@_) == 2;
-
- my ($dir, $prefix) = @_;
-
- # Add a string to the prefix
- $prefix .= 'XXXXXXXX';
-
- # Concatenate the directory to the file
- my $template = File::Spec->catfile($dir, $prefix);
-
- return mktemp($template);
-
-}
-
-=back
-
-=head1 UTILITY FUNCTIONS
-
-Useful functions for dealing with the filehandle and filename.
-
-=over 4
-
-=item B<unlink0>
-
-Given an open filehandle and the associated filename, make a safe
-unlink. This is achieved by first checking that the filename and
-filehandle initially point to the same file and that the number of
-links to the file is 1 (all fields returned by stat() are compared).
-Then the filename is unlinked and the filehandle checked once again to
-verify that the number of links on that file is now 0. This is the
-closest you can come to making sure that the filename unlinked was the
-same as the file whose descriptor you hold.
-
- unlink0($fh, $path)
- or die "Error unlinking file $path safely";
-
-Returns false on error but croaks() if there is a security
-anomaly. The filehandle is not closed since on some occasions this is
-not required.
-
-On some platforms, for example Windows NT, it is not possible to
-unlink an open file (the file must be closed first). On those
-platforms, the actual unlinking is deferred until the program ends and
-good status is returned. A check is still performed to make sure that
-the filehandle and filename are pointing to the same thing (but not at
-the time the end block is executed since the deferred removal may not
-have access to the filehandle).
-
-Additionally, on Windows NT not all the fields returned by stat() can
-be compared. For example, the C<dev> and C<rdev> fields seem to be
-different. Also, it seems that the size of the file returned by stat()
-does not always agree, with C<stat(FH)> being more accurate than
-C<stat(filename)>, presumably because of caching issues even when
-using autoflush (this is usually overcome by waiting a while after
-writing to the tempfile before attempting to C<unlink0> it).
-
-Finally, on NFS file systems the link count of the file handle does
-not always go to zero immediately after unlinking. Currently, this
-command is expected to fail on NFS disks.
-
-This function is disabled if the global variable $KEEP_ALL is true
-and an unlink on open file is supported. If the unlink is to be deferred
-to the END block, the file is still registered for removal.
-
-This function should not be called if you are using the object oriented
-interface since the it will interfere with the object destructor deleting
-the file.
-
-=cut
-
-sub unlink0 {
-
- croak 'Usage: unlink0(filehandle, filename)'
- unless scalar(@_) == 2;
-
- # Read args
- my ($fh, $path) = @_;
-
- cmpstat($fh, $path) or return 0;
-
- # attempt remove the file (does not work on some platforms)
- if (_can_unlink_opened_file()) {
-
- # return early (Without unlink) if we have been instructed to retain files.
- return 1 if $KEEP_ALL;
-
- # XXX: do *not* call this on a directory; possible race
- # resulting in recursive removal
- croak "unlink0: $path has become a directory!" if -d $path;
- unlink($path) or return 0;
-
- # Stat the filehandle
- my @fh = stat $fh;
-
- print "Link count = $fh[3] \n" if $DEBUG;
-
- # Make sure that the link count is zero
- # - Cygwin provides deferred unlinking, however,
- # on Win9x the link count remains 1
- # On NFS the link count may still be 1 but we cant know that
- # we are on NFS
- return ( $fh[3] == 0 or $^O eq 'cygwin' ? 1 : 0);
-
- } else {
- _deferred_unlink($fh, $path, 0);
- return 1;
- }
-
-}
-
-=item B<cmpstat>
-
-Compare C<stat> of filehandle with C<stat> of provided filename. This
-can be used to check that the filename and filehandle initially point
-to the same file and that the number of links to the file is 1 (all
-fields returned by stat() are compared).
-
- cmpstat($fh, $path)
- or die "Error comparing handle with file";
-
-Returns false if the stat information differs or if the link count is
-greater than 1. Calls croak if there is a security anomaly.
-
-On certain platforms, for example Windows, not all the fields returned by stat()
-can be compared. For example, the C<dev> and C<rdev> fields seem to be
-different in Windows. Also, it seems that the size of the file
-returned by stat() does not always agree, with C<stat(FH)> being more
-accurate than C<stat(filename)>, presumably because of caching issues
-even when using autoflush (this is usually overcome by waiting a while
-after writing to the tempfile before attempting to C<unlink0> it).
-
-Not exported by default.
-
-=cut
-
-sub cmpstat {
-
- croak 'Usage: cmpstat(filehandle, filename)'
- unless scalar(@_) == 2;
-
- # Read args
- my ($fh, $path) = @_;
-
- warn "Comparing stat\n"
- if $DEBUG;
-
- # Stat the filehandle - which may be closed if someone has manually
- # closed the file. Can not turn off warnings without using $^W
- # unless we upgrade to 5.006 minimum requirement
- my @fh;
- {
- local ($^W) = 0;
- @fh = stat $fh;
- }
- return unless @fh;
-
- if ($fh[3] > 1 && $^W) {
- carp "unlink0: fstat found too many links; SB=@fh" if $^W;
- }
-
- # Stat the path
- my @path = stat $path;
-
- unless (@path) {
- carp "unlink0: $path is gone already" if $^W;
- return;
- }
-
- # this is no longer a file, but may be a directory, or worse
- unless (-f $path) {
- confess "panic: $path is no longer a file: SB=@fh";
- }
-
- # Do comparison of each member of the array
- # On WinNT dev and rdev seem to be different
- # depending on whether it is a file or a handle.
- # Cannot simply compare all members of the stat return
- # Select the ones we can use
- my @okstat = (0..$#fh); # Use all by default
- if ($^O eq 'MSWin32') {
- @okstat = (1,2,3,4,5,7,8,9,10);
- } elsif ($^O eq 'os2') {
- @okstat = (0, 2..$#fh);
- } elsif ($^O eq 'VMS') { # device and file ID are sufficient
- @okstat = (0, 1);
- } elsif ($^O eq 'dos') {
- @okstat = (0,2..7,11..$#fh);
- } elsif ($^O eq 'mpeix') {
- @okstat = (0..4,8..10);
- }
-
- # Now compare each entry explicitly by number
- for (@okstat) {
- print "Comparing: $_ : $fh[$_] and $path[$_]\n" if $DEBUG;
- # Use eq rather than == since rdev, blksize, and blocks (6, 11,
- # and 12) will be '' on platforms that do not support them. This
- # is fine since we are only comparing integers.
- unless ($fh[$_] eq $path[$_]) {
- warn "Did not match $_ element of stat\n" if $DEBUG;
- return 0;
- }
- }
-
- return 1;
-}
-
-=item B<unlink1>
-
-Similar to C<unlink0> except after file comparison using cmpstat, the
-filehandle is closed prior to attempting to unlink the file. This
-allows the file to be removed without using an END block, but does
-mean that the post-unlink comparison of the filehandle state provided
-by C<unlink0> is not available.
-
- unlink1($fh, $path)
- or die "Error closing and unlinking file";
-
-Usually called from the object destructor when using the OO interface.
-
-Not exported by default.
-
-This function is disabled if the global variable $KEEP_ALL is true.
-
-Can call croak() if there is a security anomaly during the stat()
-comparison.
-
-=cut
-
-sub unlink1 {
- croak 'Usage: unlink1(filehandle, filename)'
- unless scalar(@_) == 2;
-
- # Read args
- my ($fh, $path) = @_;
-
- cmpstat($fh, $path) or return 0;
-
- # Close the file
- close( $fh ) or return 0;
-
- # Make sure the file is writable (for windows)
- _force_writable( $path );
-
- # return early (without unlink) if we have been instructed to retain files.
- return 1 if $KEEP_ALL;
-
- # remove the file
- return unlink($path);
-}
-
-=item B<cleanup>
-
-Calling this function will cause any temp files or temp directories
-that are registered for removal to be removed. This happens automatically
-when the process exits but can be triggered manually if the caller is sure
-that none of the temp files are required. This method can be registered as
-an Apache callback.
-
-On OSes where temp files are automatically removed when the temp file
-is closed, calling this function will have no effect other than to remove
-temporary directories (which may include temporary files).
-
- File::Temp::cleanup();
-
-Not exported by default.
-
-=back
-
-=head1 PACKAGE VARIABLES
-
-These functions control the global state of the package.
-
-=over 4
-
-=item B<safe_level>
-
-Controls the lengths to which the module will go to check the safety of the
-temporary file or directory before proceeding.
-Options are:
-
-=over 8
-
-=item STANDARD
-
-Do the basic security measures to ensure the directory exists and is
-writable, that temporary files are opened only if they do not already
-exist, and that possible race conditions are avoided. Finally the
-L<unlink0|"unlink0"> function is used to remove files safely.
-
-=item MEDIUM
-
-In addition to the STANDARD security, the output directory is checked
-to make sure that it is owned either by root or the user running the
-program. If the directory is writable by group or by other, it is then
-checked to make sure that the sticky bit is set.
-
-Will not work on platforms that do not support the C<-k> test
-for sticky bit.
-
-=item HIGH
-
-In addition to the MEDIUM security checks, also check for the
-possibility of ``chown() giveaway'' using the L<POSIX|POSIX>
-sysconf() function. If this is a possibility, each directory in the
-path is checked in turn for safeness, recursively walking back to the
-root directory.
-
-For platforms that do not support the L<POSIX|POSIX>
-C<_PC_CHOWN_RESTRICTED> symbol (for example, Windows NT) it is
-assumed that ``chown() giveaway'' is possible and the recursive test
-is performed.
-
-=back
-
-The level can be changed as follows:
-
- File::Temp->safe_level( File::Temp::HIGH );
-
-The level constants are not exported by the module.
-
-Currently, you must be running at least perl v5.6.0 in order to
-run with MEDIUM or HIGH security. This is simply because the
-safety tests use functions from L<Fcntl|Fcntl> that are not
-available in older versions of perl. The problem is that the version
-number for Fcntl is the same in perl 5.6.0 and in 5.005_03 even though
-they are different versions.
-
-On systems that do not support the HIGH or MEDIUM safety levels
-(for example Win NT or OS/2) any attempt to change the level will
-be ignored. The decision to ignore rather than raise an exception
-allows portable programs to be written with high security in mind
-for the systems that can support this without those programs failing
-on systems where the extra tests are irrelevant.
-
-If you really need to see whether the change has been accepted
-simply examine the return value of C<safe_level>.
-
- $newlevel = File::Temp->safe_level( File::Temp::HIGH );
- die "Could not change to high security"
- if $newlevel != File::Temp::HIGH;
-
-=cut
-
-{
- # protect from using the variable itself
- my $LEVEL = STANDARD;
- sub safe_level {
- my $self = shift;
- if (@_) {
- my $level = shift;
- if (($level != STANDARD) && ($level != MEDIUM) && ($level != HIGH)) {
- carp "safe_level: Specified level ($level) not STANDARD, MEDIUM or HIGH - ignoring\n" if $^W;
- } else {
- # Dont allow this on perl 5.005 or earlier
- if ($] < 5.006 && $level != STANDARD) {
- # Cant do MEDIUM or HIGH checks
- croak "Currently requires perl 5.006 or newer to do the safe checks";
- }
- # Check that we are allowed to change level
- # Silently ignore if we can not.
- $LEVEL = $level if _can_do_level($level);
- }
- }
- return $LEVEL;
- }
-}
-
-=item TopSystemUID
-
-This is the highest UID on the current system that refers to a root
-UID. This is used to make sure that the temporary directory is
-owned by a system UID (C<root>, C<bin>, C<sys> etc) rather than
-simply by root.
-
-This is required since on many unix systems C</tmp> is not owned
-by root.
-
-Default is to assume that any UID less than or equal to 10 is a root
-UID.
-
- File::Temp->top_system_uid(10);
- my $topid = File::Temp->top_system_uid;
-
-This value can be adjusted to reduce security checking if required.
-The value is only relevant when C<safe_level> is set to MEDIUM or higher.
-
-=cut
-
-{
- my $TopSystemUID = 10;
- $TopSystemUID = 197108 if $^O eq 'interix'; # "Administrator"
- sub top_system_uid {
- my $self = shift;
- if (@_) {
- my $newuid = shift;
- croak "top_system_uid: UIDs should be numeric"
- unless $newuid =~ /^\d+$/s;
- $TopSystemUID = $newuid;
- }
- return $TopSystemUID;
- }
-}
-
-=item B<$KEEP_ALL>
-
-Controls whether temporary files and directories should be retained
-regardless of any instructions in the program to remove them
-automatically. This is useful for debugging but should not be used in
-production code.
-
- $File::Temp::KEEP_ALL = 1;
-
-Default is for files to be removed as requested by the caller.
-
-In some cases, files will only be retained if this variable is true
-when the file is created. This means that you can not create a temporary
-file, set this variable and expect the temp file to still be around
-when the program exits.
-
-=item B<$DEBUG>
-
-Controls whether debugging messages should be enabled.
-
- $File::Temp::DEBUG = 1;
-
-Default is for debugging mode to be disabled.
-
-=back
-
-=head1 WARNING
-
-For maximum security, endeavour always to avoid ever looking at,
-touching, or even imputing the existence of the filename. You do not
-know that that filename is connected to the same file as the handle
-you have, and attempts to check this can only trigger more race
-conditions. It's far more secure to use the filehandle alone and
-dispense with the filename altogether.
-
-If you need to pass the handle to something that expects a filename
-then, on a unix system, use C<"/dev/fd/" . fileno($fh)> for arbitrary
-programs, or more generally C<< "+<=&" . fileno($fh) >> for Perl
-programs. You will have to clear the close-on-exec bit on that file
-descriptor before passing it to another process.
-
- use Fcntl qw/F_SETFD F_GETFD/;
- fcntl($tmpfh, F_SETFD, 0)
- or die "Can't clear close-on-exec flag on temp fh: $!\n";
-
-=head2 Temporary files and NFS
-
-Some problems are associated with using temporary files that reside
-on NFS file systems and it is recommended that a local filesystem
-is used whenever possible. Some of the security tests will most probably
-fail when the temp file is not local. Additionally, be aware that
-the performance of I/O operations over NFS will not be as good as for
-a local disk.
-
-=head2 Forking
-
-In some cases files created by File::Temp are removed from within an
-END block. Since END blocks are triggered when a child process exits
-(unless C<POSIX::_exit()> is used by the child) File::Temp takes care
-to only remove those temp files created by a particular process ID. This
-means that a child will not attempt to remove temp files created by the
-parent process.
-
-If you are forking many processes in parallel that are all creating
-temporary files, you may need to reset the random number seed using
-srand(EXPR) in each child else all the children will attempt to walk
-through the same set of random file names and may well cause
-themselves to give up if they exceed the number of retry attempts.
-
-=head2 Directory removal
-
-Note that if you have chdir'ed into the temporary directory and it is
-subsequently cleaned up (either in the END block or as part of object
-destruction), then you will get a warning from File::Path::rmtree().
-
-=head2 BINMODE
-
-The file returned by File::Temp will have been opened in binary mode
-if such a mode is available. If that is not correct, use the C<binmode()>
-function to change the mode of the filehandle.
-
-Note that you can modify the encoding of a file opened by File::Temp
-also by using C<binmode()>.
-
-=head1 HISTORY
-
-Originally began life in May 1999 as an XS interface to the system
-mkstemp() function. In March 2000, the OpenBSD mkstemp() code was
-translated to Perl for total control of the code's
-security checking, to ensure the presence of the function regardless of
-operating system and to help with portability. The module was shipped
-as a standard part of perl from v5.6.1.
-
-=head1 SEE ALSO
-
-L<POSIX/tmpnam>, L<POSIX/tmpfile>, L<File::Spec>, L<File::Path>
-
-See L<IO::File> and L<File::MkTemp>, L<Apache::TempFile> for
-different implementations of temporary file handling.
-
-See L<File::Tempdir> for an alternative object-oriented wrapper for
-the C<tempdir> function.
-
-=head1 AUTHOR
-
-Tim Jenness E<lt>tjenness at cpan.orgE<gt>
-
-Copyright (C) 2007-2009 Tim Jenness.
-Copyright (C) 1999-2007 Tim Jenness and the UK Particle Physics and
-Astronomy Research Council. All Rights Reserved. This program is free
-software; you can redistribute it and/or modify it under the same
-terms as Perl itself.
-
-Original Perl implementation loosely based on the OpenBSD C code for
-mkstemp(). Thanks to Tom Christiansen for suggesting that this module
-should be written and providing ideas for code improvements and
-security enhancements.
-
-=cut
-
-package File::Temp::Dir;
-
-use File::Path qw/ rmtree /;
-use strict;
-use overload '""' => "STRINGIFY", fallback => 1;
-
-# private class specifically to support tempdir objects
-# created by File::Temp->newdir
-
-# ostensibly the same method interface as File::Temp but without
-# inheriting all the IO::Seekable methods and other cruft
-
-# Read-only - returns the name of the temp directory
-
-sub dirname {
- my $self = shift;
- return $self->{DIRNAME};
-}
-
-sub STRINGIFY {
- my $self = shift;
- return $self->dirname;
-}
-
-sub unlink_on_destroy {
- my $self = shift;
- if (@_) {
- $self->{CLEANUP} = shift;
- }
- return $self->{CLEANUP};
-}
-
-sub DESTROY {
- my $self = shift;
- local($., $@, $!, $^E, $?);
- if ($self->unlink_on_destroy &&
- $$ == $self->{LAUNCHPID} && !$File::Temp::KEEP_ALL) {
- if (-d $self->{DIRNAME}) {
- # Some versions of rmtree will abort if you attempt to remove
- # the directory you are sitting in. We protect that and turn it
- # into a warning. We do this because this occurs during object
- # destruction and so can not be caught by the user.
- eval { rmtree($self->{DIRNAME}, $File::Temp::DEBUG, 0); };
- warn $@ if ($@ && $^W);
- }
- }
-}
-
-
-1;
Deleted: vendor/perl/dist/lib/FileCache.pm
===================================================================
--- vendor/perl/dist/lib/FileCache.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/FileCache.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,188 +0,0 @@
-package FileCache;
-
-our $VERSION = '1.08';
-
-=head1 NAME
-
-FileCache - keep more files open than the system permits
-
-=head1 SYNOPSIS
-
- no strict 'refs';
-
- use FileCache;
- # or
- use FileCache maxopen => 16;
-
- cacheout $mode, $path;
- # or
- cacheout $path;
- print $path @data;
-
- $fh = cacheout $mode, $path;
- # or
- $fh = cacheout $path;
- print $fh @data;
-
-=head1 DESCRIPTION
-
-The C<cacheout> function will make sure that there's a filehandle open
-for reading or writing available as the pathname you give it. It
-automatically closes and re-opens files if you exceed your system's
-maximum number of file descriptors, or the suggested maximum I<maxopen>.
-
-=over
-
-=item cacheout EXPR
-
-The 1-argument form of cacheout will open a file for writing (C<< '>' >>)
-on it's first use, and appending (C<<< '>>' >>>) thereafter.
-
-Returns EXPR on success for convenience. You may neglect the
-return value and manipulate EXPR as the filehandle directly if you prefer.
-
-=item cacheout MODE, EXPR
-
-The 2-argument form of cacheout will use the supplied mode for the initial
-and subsequent openings. Most valid modes for 3-argument C<open> are supported
-namely; C<< '>' >>, C<< '+>' >>, C<< '<' >>, C<< '<+' >>, C<<< '>>' >>>,
-C< '|-' > and C< '-|' >
-
-To pass supplemental arguments to a program opened with C< '|-' > or C< '-|' >
-append them to the command string as you would system EXPR.
-
-Returns EXPR on success for convenience. You may neglect the
-return value and manipulate EXPR as the filehandle directly if you prefer.
-
-=back
-
-=head1 CAVEATS
-
-While it is permissible to C<close> a FileCache managed file,
-do not do so if you are calling C<FileCache::cacheout> from a package other
-than which it was imported, or with another module which overrides C<close>.
-If you must, use C<FileCache::cacheout_close>.
-
-Although FileCache can be used with piped opens ('-|' or '|-') doing so is
-strongly discouraged. If FileCache finds it necessary to close and then reopen
-a pipe, the command at the far end of the pipe will be reexecuted - the results
-of performing IO on FileCache'd pipes is unlikely to be what you expect. The
-ability to use FileCache on pipes may be removed in a future release.
-
-FileCache does not store the current file offset if it finds it necessary to
-close a file. When the file is reopened, the offset will be as specified by the
-original C<open> file mode. This could be construed to be a bug.
-
-The module functionality relies on symbolic references, so things will break
-under 'use strict' unless 'no strict "refs"' is also specified.
-
-=head1 BUGS
-
-F<sys/param.h> lies with its C<NOFILE> define on some systems,
-so you may have to set I<maxopen> yourself.
-
-=cut
-
-require 5.006;
-use Carp;
-use strict;
-no strict 'refs';
-
-# These are not C<my> for legacy reasons.
-# Previous versions requested the user set $cacheout_maxopen by hand.
-# Some authors fiddled with %saw to overcome the clobber on initial open.
-use vars qw(%saw $cacheout_maxopen);
-$cacheout_maxopen = 16;
-
-use base 'Exporter';
-our @EXPORT = qw[cacheout cacheout_close];
-
-
-my %isopen;
-my $cacheout_seq = 0;
-
-sub import {
- my ($pkg,%args) = @_;
-
- # Use Exporter. %args are for us, not Exporter.
- # Make sure to up export_to_level, or we will import into ourselves,
- # rather than our calling package;
-
- __PACKAGE__->export_to_level(1);
- Exporter::import( $pkg );
-
- # Truth is okay here because setting maxopen to 0 would be bad
- return $cacheout_maxopen = $args{maxopen} if $args{maxopen};
-
- # XXX This code is crazy. Why is it a one element foreach loop?
- # Why is it using $param both as a filename and filehandle?
- foreach my $param ( '/usr/include/sys/param.h' ){
- if (open($param, '<', $param)) {
- local ($_, $.);
- while (<$param>) {
- if( /^\s*#\s*define\s+NOFILE\s+(\d+)/ ){
- $cacheout_maxopen = $1 - 4;
- close($param);
- last;
- }
- }
- close $param;
- }
- }
- $cacheout_maxopen ||= 16;
-}
-
-# Open in their package.
-sub cacheout_open {
- return open(*{caller(1) . '::' . $_[1]}, $_[0], $_[1]) && $_[1];
-}
-
-# Close in their package.
-sub cacheout_close {
- # Short-circuit in case the filehandle disappeared
- my $pkg = caller($_[1]||0);
- defined fileno(*{$pkg . '::' . $_[0]}) &&
- CORE::close(*{$pkg . '::' . $_[0]});
- delete $isopen{$_[0]};
-}
-
-# But only this sub name is visible to them.
-sub cacheout {
- my($mode, $file, $class, $ret, $ref, $narg);
- croak "Not enough arguments for cacheout" unless $narg = scalar @_;
- croak "Too many arguments for cacheout" if $narg > 2;
-
- ($mode, $file) = @_;
- ($file, $mode) = ($mode, $file) if $narg == 1;
- croak "Invalid mode for cacheout" if $mode &&
- ( $mode !~ /^\s*(?:>>|\+?>|\+?<|\|\-|)|\-\|\s*$/ );
-
- # Mode changed?
- if( $isopen{$file} && ($mode||'>') ne $isopen{$file}->[1] ){
- &cacheout_close($file, 1);
- }
-
- if( $isopen{$file}) {
- $ret = $file;
- $isopen{$file}->[0]++;
- }
- else{
- if( scalar keys(%isopen) > $cacheout_maxopen -1 ) {
- my @lru = sort{ $isopen{$a}->[0] <=> $isopen{$b}->[0] } keys(%isopen);
- $cacheout_seq = 0;
- $isopen{$_}->[0] = $cacheout_seq++ for
- splice(@lru, int($cacheout_maxopen / 3)||$cacheout_maxopen);
- &cacheout_close($_, 1) for @lru;
- }
-
- unless( $ref ){
- $mode ||= $saw{$file} ? '>>' : ($saw{$file}=1, '>');
- }
- #XXX should we just return the value from cacheout_open, no croak?
- $ret = cacheout_open($mode, $file) or croak("Can't create $file: $!");
-
- $isopen{$file} = [++$cacheout_seq, $mode];
- }
- return $ret;
-}
-1;
Deleted: vendor/perl/dist/lib/Getopt/Long.pm
===================================================================
--- vendor/perl/dist/lib/Getopt/Long.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Getopt/Long.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,2649 +0,0 @@
-# Getopt::Long.pm -- Universal options parsing
-
-package Getopt::Long;
-
-# RCS Status : $Id: Long.pm,v 1.1.1.2 2011-02-17 12:49:39 laffer1 Exp $
-# Author : Johan Vromans
-# Created On : Tue Sep 11 15:00:12 1990
-# Last Modified By: Johan Vromans
-# Last Modified On: Mon Mar 30 22:51:17 2009
-# Update Count : 1601
-# Status : Released
-
-################ Module Preamble ################
-
-use 5.004;
-
-use strict;
-
-use vars qw($VERSION);
-$VERSION = 2.38;
-# For testing versions only.
-#use vars qw($VERSION_STRING);
-#$VERSION_STRING = "2.38";
-
-use Exporter;
-use vars qw(@ISA @EXPORT @EXPORT_OK);
- at ISA = qw(Exporter);
-
-# Exported subroutines.
-sub GetOptions(@); # always
-sub GetOptionsFromArray(@); # on demand
-sub GetOptionsFromString(@); # on demand
-sub Configure(@); # on demand
-sub HelpMessage(@); # on demand
-sub VersionMessage(@); # in demand
-
-BEGIN {
- # Init immediately so their contents can be used in the 'use vars' below.
- @EXPORT = qw(&GetOptions $REQUIRE_ORDER $PERMUTE $RETURN_IN_ORDER);
- @EXPORT_OK = qw(&HelpMessage &VersionMessage &Configure
- &GetOptionsFromArray &GetOptionsFromString);
-}
-
-# User visible variables.
-use vars @EXPORT, @EXPORT_OK;
-use vars qw($error $debug $major_version $minor_version);
-# Deprecated visible variables.
-use vars qw($autoabbrev $getopt_compat $ignorecase $bundling $order
- $passthrough);
-# Official invisible variables.
-use vars qw($genprefix $caller $gnu_compat $auto_help $auto_version $longprefix);
-
-# Public subroutines.
-sub config(@); # deprecated name
-
-# Private subroutines.
-sub ConfigDefaults();
-sub ParseOptionSpec($$);
-sub OptCtl($);
-sub FindOption($$$$$);
-sub ValidValue ($$$$$);
-
-################ Local Variables ################
-
-# $requested_version holds the version that was mentioned in the 'use'
-# or 'require', if any. It can be used to enable or disable specific
-# features.
-my $requested_version = 0;
-
-################ Resident subroutines ################
-
-sub ConfigDefaults() {
- # Handle POSIX compliancy.
- if ( defined $ENV{"POSIXLY_CORRECT"} ) {
- $genprefix = "(--|-)";
- $autoabbrev = 0; # no automatic abbrev of options
- $bundling = 0; # no bundling of single letter switches
- $getopt_compat = 0; # disallow '+' to start options
- $order = $REQUIRE_ORDER;
- }
- else {
- $genprefix = "(--|-|\\+)";
- $autoabbrev = 1; # automatic abbrev of options
- $bundling = 0; # bundling off by default
- $getopt_compat = 1; # allow '+' to start options
- $order = $PERMUTE;
- }
- # Other configurable settings.
- $debug = 0; # for debugging
- $error = 0; # error tally
- $ignorecase = 1; # ignore case when matching options
- $passthrough = 0; # leave unrecognized options alone
- $gnu_compat = 0; # require --opt=val if value is optional
- $longprefix = "(--)"; # what does a long prefix look like
-}
-
-# Override import.
-sub import {
- my $pkg = shift; # package
- my @syms = (); # symbols to import
- my @config = (); # configuration
- my $dest = \@syms; # symbols first
- for ( @_ ) {
- if ( $_ eq ':config' ) {
- $dest = \@config; # config next
- next;
- }
- push(@$dest, $_); # push
- }
- # Hide one level and call super.
- local $Exporter::ExportLevel = 1;
- push(@syms, qw(&GetOptions)) if @syms; # always export GetOptions
- $pkg->SUPER::import(@syms);
- # And configure.
- Configure(@config) if @config;
-}
-
-################ Initialization ################
-
-# Values for $order. See GNU getopt.c for details.
-($REQUIRE_ORDER, $PERMUTE, $RETURN_IN_ORDER) = (0..2);
-# Version major/minor numbers.
-($major_version, $minor_version) = $VERSION =~ /^(\d+)\.(\d+)/;
-
-ConfigDefaults();
-
-################ OO Interface ################
-
-package Getopt::Long::Parser;
-
-# Store a copy of the default configuration. Since ConfigDefaults has
-# just been called, what we get from Configure is the default.
-my $default_config = do {
- Getopt::Long::Configure ()
-};
-
-sub new {
- my $that = shift;
- my $class = ref($that) || $that;
- my %atts = @_;
-
- # Register the callers package.
- my $self = { caller_pkg => (caller)[0] };
-
- bless ($self, $class);
-
- # Process config attributes.
- if ( defined $atts{config} ) {
- my $save = Getopt::Long::Configure ($default_config, @{$atts{config}});
- $self->{settings} = Getopt::Long::Configure ($save);
- delete ($atts{config});
- }
- # Else use default config.
- else {
- $self->{settings} = $default_config;
- }
-
- if ( %atts ) { # Oops
- die(__PACKAGE__.": unhandled attributes: ".
- join(" ", sort(keys(%atts)))."\n");
- }
-
- $self;
-}
-
-sub configure {
- my ($self) = shift;
-
- # Restore settings, merge new settings in.
- my $save = Getopt::Long::Configure ($self->{settings}, @_);
-
- # Restore orig config and save the new config.
- $self->{settings} = Getopt::Long::Configure ($save);
-}
-
-sub getoptions {
- my ($self) = shift;
-
- # Restore config settings.
- my $save = Getopt::Long::Configure ($self->{settings});
-
- # Call main routine.
- my $ret = 0;
- $Getopt::Long::caller = $self->{caller_pkg};
-
- eval {
- # Locally set exception handler to default, otherwise it will
- # be called implicitly here, and again explicitly when we try
- # to deliver the messages.
- local ($SIG{__DIE__}) = 'DEFAULT';
- $ret = Getopt::Long::GetOptions (@_);
- };
-
- # Restore saved settings.
- Getopt::Long::Configure ($save);
-
- # Handle errors and return value.
- die ($@) if $@;
- return $ret;
-}
-
-package Getopt::Long;
-
-################ Back to Normal ################
-
-# Indices in option control info.
-# Note that ParseOptions uses the fields directly. Search for 'hard-wired'.
-use constant CTL_TYPE => 0;
-#use constant CTL_TYPE_FLAG => '';
-#use constant CTL_TYPE_NEG => '!';
-#use constant CTL_TYPE_INCR => '+';
-#use constant CTL_TYPE_INT => 'i';
-#use constant CTL_TYPE_INTINC => 'I';
-#use constant CTL_TYPE_XINT => 'o';
-#use constant CTL_TYPE_FLOAT => 'f';
-#use constant CTL_TYPE_STRING => 's';
-
-use constant CTL_CNAME => 1;
-
-use constant CTL_DEFAULT => 2;
-
-use constant CTL_DEST => 3;
- use constant CTL_DEST_SCALAR => 0;
- use constant CTL_DEST_ARRAY => 1;
- use constant CTL_DEST_HASH => 2;
- use constant CTL_DEST_CODE => 3;
-
-use constant CTL_AMIN => 4;
-use constant CTL_AMAX => 5;
-
-# FFU.
-#use constant CTL_RANGE => ;
-#use constant CTL_REPEAT => ;
-
-# Rather liberal patterns to match numbers.
-use constant PAT_INT => "[-+]?_*[0-9][0-9_]*";
-use constant PAT_XINT =>
- "(?:".
- "[-+]?_*[1-9][0-9_]*".
- "|".
- "0x_*[0-9a-f][0-9a-f_]*".
- "|".
- "0b_*[01][01_]*".
- "|".
- "0[0-7_]*".
- ")";
-use constant PAT_FLOAT => "[-+]?[0-9._]+(\.[0-9_]+)?([eE][-+]?[0-9_]+)?";
-
-sub GetOptions(@) {
- # Shift in default array.
- unshift(@_, \@ARGV);
- # Try to keep caller() and Carp consitent.
- goto &GetOptionsFromArray;
-}
-
-sub GetOptionsFromString(@) {
- my ($string) = shift;
- require Text::ParseWords;
- my $args = [ Text::ParseWords::shellwords($string) ];
- $caller ||= (caller)[0]; # current context
- my $ret = GetOptionsFromArray($args, @_);
- return ( $ret, $args ) if wantarray;
- if ( @$args ) {
- $ret = 0;
- warn("GetOptionsFromString: Excess data \"@$args\" in string \"$string\"\n");
- }
- $ret;
-}
-
-sub GetOptionsFromArray(@) {
-
- my ($argv, @optionlist) = @_; # local copy of the option descriptions
- my $argend = '--'; # option list terminator
- my %opctl = (); # table of option specs
- my $pkg = $caller || (caller)[0]; # current context
- # Needed if linkage is omitted.
- my @ret = (); # accum for non-options
- my %linkage; # linkage
- my $userlinkage; # user supplied HASH
- my $opt; # current option
- my $prefix = $genprefix; # current prefix
-
- $error = '';
-
- if ( $debug ) {
- # Avoid some warnings if debugging.
- local ($^W) = 0;
- print STDERR
- ("Getopt::Long $Getopt::Long::VERSION (",
- '$Revision: 1.1.1.2 $', ") ",
- "called from package \"$pkg\".",
- "\n ",
- "argv: (@$argv)",
- "\n ",
- "autoabbrev=$autoabbrev,".
- "bundling=$bundling,",
- "getopt_compat=$getopt_compat,",
- "gnu_compat=$gnu_compat,",
- "order=$order,",
- "\n ",
- "ignorecase=$ignorecase,",
- "requested_version=$requested_version,",
- "passthrough=$passthrough,",
- "genprefix=\"$genprefix\",",
- "longprefix=\"$longprefix\".",
- "\n");
- }
-
- # Check for ref HASH as first argument.
- # First argument may be an object. It's OK to use this as long
- # as it is really a hash underneath.
- $userlinkage = undef;
- if ( @optionlist && ref($optionlist[0]) and
- UNIVERSAL::isa($optionlist[0],'HASH') ) {
- $userlinkage = shift (@optionlist);
- print STDERR ("=> user linkage: $userlinkage\n") if $debug;
- }
-
- # See if the first element of the optionlist contains option
- # starter characters.
- # Be careful not to interpret '<>' as option starters.
- if ( @optionlist && $optionlist[0] =~ /^\W+$/
- && !($optionlist[0] eq '<>'
- && @optionlist > 0
- && ref($optionlist[1])) ) {
- $prefix = shift (@optionlist);
- # Turn into regexp. Needs to be parenthesized!
- $prefix =~ s/(\W)/\\$1/g;
- $prefix = "([" . $prefix . "])";
- print STDERR ("=> prefix=\"$prefix\"\n") if $debug;
- }
-
- # Verify correctness of optionlist.
- %opctl = ();
- while ( @optionlist ) {
- my $opt = shift (@optionlist);
-
- unless ( defined($opt) ) {
- $error .= "Undefined argument in option spec\n";
- next;
- }
-
- # Strip leading prefix so people can specify "--foo=i" if they like.
- $opt = $+ if $opt =~ /^$prefix+(.*)$/s;
-
- if ( $opt eq '<>' ) {
- if ( (defined $userlinkage)
- && !(@optionlist > 0 && ref($optionlist[0]))
- && (exists $userlinkage->{$opt})
- && ref($userlinkage->{$opt}) ) {
- unshift (@optionlist, $userlinkage->{$opt});
- }
- unless ( @optionlist > 0
- && ref($optionlist[0]) && ref($optionlist[0]) eq 'CODE' ) {
- $error .= "Option spec <> requires a reference to a subroutine\n";
- # Kill the linkage (to avoid another error).
- shift (@optionlist)
- if @optionlist && ref($optionlist[0]);
- next;
- }
- $linkage{'<>'} = shift (@optionlist);
- next;
- }
-
- # Parse option spec.
- my ($name, $orig) = ParseOptionSpec ($opt, \%opctl);
- unless ( defined $name ) {
- # Failed. $orig contains the error message. Sorry for the abuse.
- $error .= $orig;
- # Kill the linkage (to avoid another error).
- shift (@optionlist)
- if @optionlist && ref($optionlist[0]);
- next;
- }
-
- # If no linkage is supplied in the @optionlist, copy it from
- # the userlinkage if available.
- if ( defined $userlinkage ) {
- unless ( @optionlist > 0 && ref($optionlist[0]) ) {
- if ( exists $userlinkage->{$orig} &&
- ref($userlinkage->{$orig}) ) {
- print STDERR ("=> found userlinkage for \"$orig\": ",
- "$userlinkage->{$orig}\n")
- if $debug;
- unshift (@optionlist, $userlinkage->{$orig});
- }
- else {
- # Do nothing. Being undefined will be handled later.
- next;
- }
- }
- }
-
- # Copy the linkage. If omitted, link to global variable.
- if ( @optionlist > 0 && ref($optionlist[0]) ) {
- print STDERR ("=> link \"$orig\" to $optionlist[0]\n")
- if $debug;
- my $rl = ref($linkage{$orig} = shift (@optionlist));
-
- if ( $rl eq "ARRAY" ) {
- $opctl{$name}[CTL_DEST] = CTL_DEST_ARRAY;
- }
- elsif ( $rl eq "HASH" ) {
- $opctl{$name}[CTL_DEST] = CTL_DEST_HASH;
- }
- elsif ( $rl eq "SCALAR" || $rl eq "REF" ) {
-# if ( $opctl{$name}[CTL_DEST] == CTL_DEST_ARRAY ) {
-# my $t = $linkage{$orig};
-# $$t = $linkage{$orig} = [];
-# }
-# elsif ( $opctl{$name}[CTL_DEST] == CTL_DEST_HASH ) {
-# }
-# else {
- # Ok.
-# }
- }
- elsif ( $rl eq "CODE" ) {
- # Ok.
- }
- else {
- $error .= "Invalid option linkage for \"$opt\"\n";
- }
- }
- else {
- # Link to global $opt_XXX variable.
- # Make sure a valid perl identifier results.
- my $ov = $orig;
- $ov =~ s/\W/_/g;
- if ( $opctl{$name}[CTL_DEST] == CTL_DEST_ARRAY ) {
- print STDERR ("=> link \"$orig\" to \@$pkg","::opt_$ov\n")
- if $debug;
- eval ("\$linkage{\$orig} = \\\@".$pkg."::opt_$ov;");
- }
- elsif ( $opctl{$name}[CTL_DEST] == CTL_DEST_HASH ) {
- print STDERR ("=> link \"$orig\" to \%$pkg","::opt_$ov\n")
- if $debug;
- eval ("\$linkage{\$orig} = \\\%".$pkg."::opt_$ov;");
- }
- else {
- print STDERR ("=> link \"$orig\" to \$$pkg","::opt_$ov\n")
- if $debug;
- eval ("\$linkage{\$orig} = \\\$".$pkg."::opt_$ov;");
- }
- }
-
- if ( $opctl{$name}[CTL_TYPE] eq 'I'
- && ( $opctl{$name}[CTL_DEST] == CTL_DEST_ARRAY
- || $opctl{$name}[CTL_DEST] == CTL_DEST_HASH )
- ) {
- $error .= "Invalid option linkage for \"$opt\"\n";
- }
-
- }
-
- # Bail out if errors found.
- die ($error) if $error;
- $error = 0;
-
- # Supply --version and --help support, if needed and allowed.
- if ( defined($auto_version) ? $auto_version : ($requested_version >= 2.3203) ) {
- if ( !defined($opctl{version}) ) {
- $opctl{version} = ['','version',0,CTL_DEST_CODE,undef];
- $linkage{version} = \&VersionMessage;
- }
- $auto_version = 1;
- }
- if ( defined($auto_help) ? $auto_help : ($requested_version >= 2.3203) ) {
- if ( !defined($opctl{help}) && !defined($opctl{'?'}) ) {
- $opctl{help} = $opctl{'?'} = ['','help',0,CTL_DEST_CODE,undef];
- $linkage{help} = \&HelpMessage;
- }
- $auto_help = 1;
- }
-
- # Show the options tables if debugging.
- if ( $debug ) {
- my ($arrow, $k, $v);
- $arrow = "=> ";
- while ( ($k,$v) = each(%opctl) ) {
- print STDERR ($arrow, "\$opctl{$k} = $v ", OptCtl($v), "\n");
- $arrow = " ";
- }
- }
-
- # Process argument list
- my $goon = 1;
- while ( $goon && @$argv > 0 ) {
-
- # Get next argument.
- $opt = shift (@$argv);
- print STDERR ("=> arg \"", $opt, "\"\n") if $debug;
-
- # Double dash is option list terminator.
- if ( $opt eq $argend ) {
- push (@ret, $argend) if $passthrough;
- last;
- }
-
- # Look it up.
- my $tryopt = $opt;
- my $found; # success status
- my $key; # key (if hash type)
- my $arg; # option argument
- my $ctl; # the opctl entry
-
- ($found, $opt, $ctl, $arg, $key) =
- FindOption ($argv, $prefix, $argend, $opt, \%opctl);
-
- if ( $found ) {
-
- # FindOption undefines $opt in case of errors.
- next unless defined $opt;
-
- my $argcnt = 0;
- while ( defined $arg ) {
-
- # Get the canonical name.
- print STDERR ("=> cname for \"$opt\" is ") if $debug;
- $opt = $ctl->[CTL_CNAME];
- print STDERR ("\"$ctl->[CTL_CNAME]\"\n") if $debug;
-
- if ( defined $linkage{$opt} ) {
- print STDERR ("=> ref(\$L{$opt}) -> ",
- ref($linkage{$opt}), "\n") if $debug;
-
- if ( ref($linkage{$opt}) eq 'SCALAR'
- || ref($linkage{$opt}) eq 'REF' ) {
- if ( $ctl->[CTL_TYPE] eq '+' ) {
- print STDERR ("=> \$\$L{$opt} += \"$arg\"\n")
- if $debug;
- if ( defined ${$linkage{$opt}} ) {
- ${$linkage{$opt}} += $arg;
- }
- else {
- ${$linkage{$opt}} = $arg;
- }
- }
- elsif ( $ctl->[CTL_DEST] == CTL_DEST_ARRAY ) {
- print STDERR ("=> ref(\$L{$opt}) auto-vivified",
- " to ARRAY\n")
- if $debug;
- my $t = $linkage{$opt};
- $$t = $linkage{$opt} = [];
- print STDERR ("=> push(\@{\$L{$opt}, \"$arg\")\n")
- if $debug;
- push (@{$linkage{$opt}}, $arg);
- }
- elsif ( $ctl->[CTL_DEST] == CTL_DEST_HASH ) {
- print STDERR ("=> ref(\$L{$opt}) auto-vivified",
- " to HASH\n")
- if $debug;
- my $t = $linkage{$opt};
- $$t = $linkage{$opt} = {};
- print STDERR ("=> \$\$L{$opt}->{$key} = \"$arg\"\n")
- if $debug;
- $linkage{$opt}->{$key} = $arg;
- }
- else {
- print STDERR ("=> \$\$L{$opt} = \"$arg\"\n")
- if $debug;
- ${$linkage{$opt}} = $arg;
- }
- }
- elsif ( ref($linkage{$opt}) eq 'ARRAY' ) {
- print STDERR ("=> push(\@{\$L{$opt}, \"$arg\")\n")
- if $debug;
- push (@{$linkage{$opt}}, $arg);
- }
- elsif ( ref($linkage{$opt}) eq 'HASH' ) {
- print STDERR ("=> \$\$L{$opt}->{$key} = \"$arg\"\n")
- if $debug;
- $linkage{$opt}->{$key} = $arg;
- }
- elsif ( ref($linkage{$opt}) eq 'CODE' ) {
- print STDERR ("=> &L{$opt}(\"$opt\"",
- $ctl->[CTL_DEST] == CTL_DEST_HASH ? ", \"$key\"" : "",
- ", \"$arg\")\n")
- if $debug;
- my $eval_error = do {
- local $@;
- local $SIG{__DIE__} = 'DEFAULT';
- eval {
- &{$linkage{$opt}}
- (Getopt::Long::CallBack->new
- (name => $opt,
- ctl => $ctl,
- opctl => \%opctl,
- linkage => \%linkage,
- prefix => $prefix,
- ),
- $ctl->[CTL_DEST] == CTL_DEST_HASH ? ($key) : (),
- $arg);
- };
- $@;
- };
- print STDERR ("=> die($eval_error)\n")
- if $debug && $eval_error ne '';
- if ( $eval_error =~ /^!/ ) {
- if ( $eval_error =~ /^!FINISH\b/ ) {
- $goon = 0;
- }
- }
- elsif ( $eval_error ne '' ) {
- warn ($eval_error);
- $error++;
- }
- }
- else {
- print STDERR ("Invalid REF type \"", ref($linkage{$opt}),
- "\" in linkage\n");
- die("Getopt::Long -- internal error!\n");
- }
- }
- # No entry in linkage means entry in userlinkage.
- elsif ( $ctl->[CTL_DEST] == CTL_DEST_ARRAY ) {
- if ( defined $userlinkage->{$opt} ) {
- print STDERR ("=> push(\@{\$L{$opt}}, \"$arg\")\n")
- if $debug;
- push (@{$userlinkage->{$opt}}, $arg);
- }
- else {
- print STDERR ("=>\$L{$opt} = [\"$arg\"]\n")
- if $debug;
- $userlinkage->{$opt} = [$arg];
- }
- }
- elsif ( $ctl->[CTL_DEST] == CTL_DEST_HASH ) {
- if ( defined $userlinkage->{$opt} ) {
- print STDERR ("=> \$L{$opt}->{$key} = \"$arg\"\n")
- if $debug;
- $userlinkage->{$opt}->{$key} = $arg;
- }
- else {
- print STDERR ("=>\$L{$opt} = {$key => \"$arg\"}\n")
- if $debug;
- $userlinkage->{$opt} = {$key => $arg};
- }
- }
- else {
- if ( $ctl->[CTL_TYPE] eq '+' ) {
- print STDERR ("=> \$L{$opt} += \"$arg\"\n")
- if $debug;
- if ( defined $userlinkage->{$opt} ) {
- $userlinkage->{$opt} += $arg;
- }
- else {
- $userlinkage->{$opt} = $arg;
- }
- }
- else {
- print STDERR ("=>\$L{$opt} = \"$arg\"\n") if $debug;
- $userlinkage->{$opt} = $arg;
- }
- }
-
- $argcnt++;
- last if $argcnt >= $ctl->[CTL_AMAX] && $ctl->[CTL_AMAX] != -1;
- undef($arg);
-
- # Need more args?
- if ( $argcnt < $ctl->[CTL_AMIN] ) {
- if ( @$argv ) {
- if ( ValidValue($ctl, $argv->[0], 1, $argend, $prefix) ) {
- $arg = shift(@$argv);
- $arg =~ tr/_//d if $ctl->[CTL_TYPE] =~ /^[iIo]$/;
- ($key,$arg) = $arg =~ /^([^=]+)=(.*)/
- if $ctl->[CTL_DEST] == CTL_DEST_HASH;
- next;
- }
- warn("Value \"$$argv[0]\" invalid for option $opt\n");
- $error++;
- }
- else {
- warn("Insufficient arguments for option $opt\n");
- $error++;
- }
- }
-
- # Any more args?
- if ( @$argv && ValidValue($ctl, $argv->[0], 0, $argend, $prefix) ) {
- $arg = shift(@$argv);
- $arg =~ tr/_//d if $ctl->[CTL_TYPE] =~ /^[iIo]$/;
- ($key,$arg) = $arg =~ /^([^=]+)=(.*)/
- if $ctl->[CTL_DEST] == CTL_DEST_HASH;
- next;
- }
- }
- }
-
- # Not an option. Save it if we $PERMUTE and don't have a <>.
- elsif ( $order == $PERMUTE ) {
- # Try non-options call-back.
- my $cb;
- if ( (defined ($cb = $linkage{'<>'})) ) {
- print STDERR ("=> &L{$tryopt}(\"$tryopt\")\n")
- if $debug;
- my $eval_error = do {
- local $@;
- local $SIG{__DIE__} = 'DEFAULT';
- eval {
- &$cb
- (Getopt::Long::CallBack->new
- (name => $tryopt,
- ctl => $ctl,
- opctl => \%opctl,
- linkage => \%linkage,
- prefix => $prefix,
- ));
- };
- $@;
- };
- print STDERR ("=> die($eval_error)\n")
- if $debug && $eval_error ne '';
- if ( $eval_error =~ /^!/ ) {
- if ( $eval_error =~ /^!FINISH\b/ ) {
- $goon = 0;
- }
- }
- elsif ( $eval_error ne '' ) {
- warn ($eval_error);
- $error++;
- }
- }
- else {
- print STDERR ("=> saving \"$tryopt\" ",
- "(not an option, may permute)\n") if $debug;
- push (@ret, $tryopt);
- }
- next;
- }
-
- # ...otherwise, terminate.
- else {
- # Push this one back and exit.
- unshift (@$argv, $tryopt);
- return ($error == 0);
- }
-
- }
-
- # Finish.
- if ( @ret && $order == $PERMUTE ) {
- # Push back accumulated arguments
- print STDERR ("=> restoring \"", join('" "', @ret), "\"\n")
- if $debug;
- unshift (@$argv, @ret);
- }
-
- return ($error == 0);
-}
-
-# A readable representation of what's in an optbl.
-sub OptCtl ($) {
- my ($v) = @_;
- my @v = map { defined($_) ? ($_) : ("<undef>") } @$v;
- "[".
- join(",",
- "\"$v[CTL_TYPE]\"",
- "\"$v[CTL_CNAME]\"",
- "\"$v[CTL_DEFAULT]\"",
- ("\$","\@","\%","\&")[$v[CTL_DEST] || 0],
- $v[CTL_AMIN] || '',
- $v[CTL_AMAX] || '',
-# $v[CTL_RANGE] || '',
-# $v[CTL_REPEAT] || '',
- ). "]";
-}
-
-# Parse an option specification and fill the tables.
-sub ParseOptionSpec ($$) {
- my ($opt, $opctl) = @_;
-
- # Match option spec.
- if ( $opt !~ m;^
- (
- # Option name
- (?: \w+[-\w]* )
- # Alias names, or "?"
- (?: \| (?: \? | \w[-\w]* ) )*
- )?
- (
- # Either modifiers ...
- [!+]
- |
- # ... or a value/dest/repeat specification
- [=:] [ionfs] [@%]? (?: \{\d*,?\d*\} )?
- |
- # ... or an optional-with-default spec
- : (?: -?\d+ | \+ ) [@%]?
- )?
- $;x ) {
- return (undef, "Error in option spec: \"$opt\"\n");
- }
-
- my ($names, $spec) = ($1, $2);
- $spec = '' unless defined $spec;
-
- # $orig keeps track of the primary name the user specified.
- # This name will be used for the internal or external linkage.
- # In other words, if the user specifies "FoO|BaR", it will
- # match any case combinations of 'foo' and 'bar', but if a global
- # variable needs to be set, it will be $opt_FoO in the exact case
- # as specified.
- my $orig;
-
- my @names;
- if ( defined $names ) {
- @names = split (/\|/, $names);
- $orig = $names[0];
- }
- else {
- @names = ('');
- $orig = '';
- }
-
- # Construct the opctl entries.
- my $entry;
- if ( $spec eq '' || $spec eq '+' || $spec eq '!' ) {
- # Fields are hard-wired here.
- $entry = [$spec,$orig,undef,CTL_DEST_SCALAR,0,0];
- }
- elsif ( $spec =~ /^:(-?\d+|\+)([@%])?$/ ) {
- my $def = $1;
- my $dest = $2;
- my $type = $def eq '+' ? 'I' : 'i';
- $dest ||= '$';
- $dest = $dest eq '@' ? CTL_DEST_ARRAY
- : $dest eq '%' ? CTL_DEST_HASH : CTL_DEST_SCALAR;
- # Fields are hard-wired here.
- $entry = [$type,$orig,$def eq '+' ? undef : $def,
- $dest,0,1];
- }
- else {
- my ($mand, $type, $dest) =
- $spec =~ /^([=:])([ionfs])([@%])?(\{(\d+)?(,)?(\d+)?\})?$/;
- return (undef, "Cannot repeat while bundling: \"$opt\"\n")
- if $bundling && defined($4);
- my ($mi, $cm, $ma) = ($5, $6, $7);
- return (undef, "{0} is useless in option spec: \"$opt\"\n")
- if defined($mi) && !$mi && !defined($ma) && !defined($cm);
-
- $type = 'i' if $type eq 'n';
- $dest ||= '$';
- $dest = $dest eq '@' ? CTL_DEST_ARRAY
- : $dest eq '%' ? CTL_DEST_HASH : CTL_DEST_SCALAR;
- # Default minargs to 1/0 depending on mand status.
- $mi = $mand eq '=' ? 1 : 0 unless defined $mi;
- # Adjust mand status according to minargs.
- $mand = $mi ? '=' : ':';
- # Adjust maxargs.
- $ma = $mi ? $mi : 1 unless defined $ma || defined $cm;
- return (undef, "Max must be greater than zero in option spec: \"$opt\"\n")
- if defined($ma) && !$ma;
- return (undef, "Max less than min in option spec: \"$opt\"\n")
- if defined($ma) && $ma < $mi;
-
- # Fields are hard-wired here.
- $entry = [$type,$orig,undef,$dest,$mi,$ma||-1];
- }
-
- # Process all names. First is canonical, the rest are aliases.
- my $dups = '';
- foreach ( @names ) {
-
- $_ = lc ($_)
- if $ignorecase > (($bundling && length($_) == 1) ? 1 : 0);
-
- if ( exists $opctl->{$_} ) {
- $dups .= "Duplicate specification \"$opt\" for option \"$_\"\n";
- }
-
- if ( $spec eq '!' ) {
- $opctl->{"no$_"} = $entry;
- $opctl->{"no-$_"} = $entry;
- $opctl->{$_} = [@$entry];
- $opctl->{$_}->[CTL_TYPE] = '';
- }
- else {
- $opctl->{$_} = $entry;
- }
- }
-
- if ( $dups && $^W ) {
- foreach ( split(/\n+/, $dups) ) {
- warn($_."\n");
- }
- }
- ($names[0], $orig);
-}
-
-# Option lookup.
-sub FindOption ($$$$$) {
-
- # returns (1, $opt, $ctl, $arg, $key) if okay,
- # returns (1, undef) if option in error,
- # returns (0) otherwise.
-
- my ($argv, $prefix, $argend, $opt, $opctl) = @_;
-
- print STDERR ("=> find \"$opt\"\n") if $debug;
-
- return (0) unless $opt =~ /^$prefix(.*)$/s;
- return (0) if $opt eq "-" && !defined $opctl->{''};
-
- $opt = $+;
- my $starter = $1;
-
- print STDERR ("=> split \"$starter\"+\"$opt\"\n") if $debug;
-
- my $optarg; # value supplied with --opt=value
- my $rest; # remainder from unbundling
-
- # If it is a long option, it may include the value.
- # With getopt_compat, only if not bundling.
- if ( ($starter=~/^$longprefix$/
- || ($getopt_compat && ($bundling == 0 || $bundling == 2)))
- && $opt =~ /^([^=]+)=(.*)$/s ) {
- $opt = $1;
- $optarg = $2;
- print STDERR ("=> option \"", $opt,
- "\", optarg = \"$optarg\"\n") if $debug;
- }
-
- #### Look it up ###
-
- my $tryopt = $opt; # option to try
-
- if ( $bundling && $starter eq '-' ) {
-
- # To try overrides, obey case ignore.
- $tryopt = $ignorecase ? lc($opt) : $opt;
-
- # If bundling == 2, long options can override bundles.
- if ( $bundling == 2 && length($tryopt) > 1
- && defined ($opctl->{$tryopt}) ) {
- print STDERR ("=> $starter$tryopt overrides unbundling\n")
- if $debug;
- }
- else {
- $tryopt = $opt;
- # Unbundle single letter option.
- $rest = length ($tryopt) > 0 ? substr ($tryopt, 1) : '';
- $tryopt = substr ($tryopt, 0, 1);
- $tryopt = lc ($tryopt) if $ignorecase > 1;
- print STDERR ("=> $starter$tryopt unbundled from ",
- "$starter$tryopt$rest\n") if $debug;
- $rest = undef unless $rest ne '';
- }
- }
-
- # Try auto-abbreviation.
- elsif ( $autoabbrev && $opt ne "" ) {
- # Sort the possible long option names.
- my @names = sort(keys (%$opctl));
- # Downcase if allowed.
- $opt = lc ($opt) if $ignorecase;
- $tryopt = $opt;
- # Turn option name into pattern.
- my $pat = quotemeta ($opt);
- # Look up in option names.
- my @hits = grep (/^$pat/, @names);
- print STDERR ("=> ", scalar(@hits), " hits (@hits) with \"$pat\" ",
- "out of ", scalar(@names), "\n") if $debug;
-
- # Check for ambiguous results.
- unless ( (@hits <= 1) || (grep ($_ eq $opt, @hits) == 1) ) {
- # See if all matches are for the same option.
- my %hit;
- foreach ( @hits ) {
- my $hit = $_;
- $hit = $opctl->{$hit}->[CTL_CNAME]
- if defined $opctl->{$hit}->[CTL_CNAME];
- $hit{$hit} = 1;
- }
- # Remove auto-supplied options (version, help).
- if ( keys(%hit) == 2 ) {
- if ( $auto_version && exists($hit{version}) ) {
- delete $hit{version};
- }
- elsif ( $auto_help && exists($hit{help}) ) {
- delete $hit{help};
- }
- }
- # Now see if it really is ambiguous.
- unless ( keys(%hit) == 1 ) {
- return (0) if $passthrough;
- warn ("Option ", $opt, " is ambiguous (",
- join(", ", @hits), ")\n");
- $error++;
- return (1, undef);
- }
- @hits = keys(%hit);
- }
-
- # Complete the option name, if appropriate.
- if ( @hits == 1 && $hits[0] ne $opt ) {
- $tryopt = $hits[0];
- $tryopt = lc ($tryopt) if $ignorecase;
- print STDERR ("=> option \"$opt\" -> \"$tryopt\"\n")
- if $debug;
- }
- }
-
- # Map to all lowercase if ignoring case.
- elsif ( $ignorecase ) {
- $tryopt = lc ($opt);
- }
-
- # Check validity by fetching the info.
- my $ctl = $opctl->{$tryopt};
- unless ( defined $ctl ) {
- return (0) if $passthrough;
- # Pretend one char when bundling.
- if ( $bundling == 1 && length($starter) == 1 ) {
- $opt = substr($opt,0,1);
- unshift (@$argv, $starter.$rest) if defined $rest;
- }
- if ( $opt eq "" ) {
- warn ("Missing option after ", $starter, "\n");
- }
- else {
- warn ("Unknown option: ", $opt, "\n");
- }
- $error++;
- return (1, undef);
- }
- # Apparently valid.
- $opt = $tryopt;
- print STDERR ("=> found ", OptCtl($ctl),
- " for \"", $opt, "\"\n") if $debug;
-
- #### Determine argument status ####
-
- # If it is an option w/o argument, we're almost finished with it.
- my $type = $ctl->[CTL_TYPE];
- my $arg;
-
- if ( $type eq '' || $type eq '!' || $type eq '+' ) {
- if ( defined $optarg ) {
- return (0) if $passthrough;
- warn ("Option ", $opt, " does not take an argument\n");
- $error++;
- undef $opt;
- }
- elsif ( $type eq '' || $type eq '+' ) {
- # Supply explicit value.
- $arg = 1;
- }
- else {
- $opt =~ s/^no-?//i; # strip NO prefix
- $arg = 0; # supply explicit value
- }
- unshift (@$argv, $starter.$rest) if defined $rest;
- return (1, $opt, $ctl, $arg);
- }
-
- # Get mandatory status and type info.
- my $mand = $ctl->[CTL_AMIN];
-
- # Check if there is an option argument available.
- if ( $gnu_compat && defined $optarg && $optarg eq '' ) {
- return (1, $opt, $ctl, $type eq 's' ? '' : 0) ;#unless $mand;
- $optarg = 0 unless $type eq 's';
- }
-
- # Check if there is an option argument available.
- if ( defined $optarg
- ? ($optarg eq '')
- : !(defined $rest || @$argv > 0) ) {
- # Complain if this option needs an argument.
-# if ( $mand && !($type eq 's' ? defined($optarg) : 0) ) {
- if ( $mand ) {
- return (0) if $passthrough;
- warn ("Option ", $opt, " requires an argument\n");
- $error++;
- return (1, undef);
- }
- if ( $type eq 'I' ) {
- # Fake incremental type.
- my @c = @$ctl;
- $c[CTL_TYPE] = '+';
- return (1, $opt, \@c, 1);
- }
- return (1, $opt, $ctl,
- defined($ctl->[CTL_DEFAULT]) ? $ctl->[CTL_DEFAULT] :
- $type eq 's' ? '' : 0);
- }
-
- # Get (possibly optional) argument.
- $arg = (defined $rest ? $rest
- : (defined $optarg ? $optarg : shift (@$argv)));
-
- # Get key if this is a "name=value" pair for a hash option.
- my $key;
- if ($ctl->[CTL_DEST] == CTL_DEST_HASH && defined $arg) {
- ($key, $arg) = ($arg =~ /^([^=]*)=(.*)$/s) ? ($1, $2)
- : ($arg, defined($ctl->[CTL_DEFAULT]) ? $ctl->[CTL_DEFAULT] :
- ($mand ? undef : ($type eq 's' ? "" : 1)));
- if (! defined $arg) {
- warn ("Option $opt, key \"$key\", requires a value\n");
- $error++;
- # Push back.
- unshift (@$argv, $starter.$rest) if defined $rest;
- return (1, undef);
- }
- }
-
- #### Check if the argument is valid for this option ####
-
- my $key_valid = $ctl->[CTL_DEST] == CTL_DEST_HASH ? "[^=]+=" : "";
-
- if ( $type eq 's' ) { # string
- # A mandatory string takes anything.
- return (1, $opt, $ctl, $arg, $key) if $mand;
-
- # Same for optional string as a hash value
- return (1, $opt, $ctl, $arg, $key)
- if $ctl->[CTL_DEST] == CTL_DEST_HASH;
-
- # An optional string takes almost anything.
- return (1, $opt, $ctl, $arg, $key)
- if defined $optarg || defined $rest;
- return (1, $opt, $ctl, $arg, $key) if $arg eq "-"; # ??
-
- # Check for option or option list terminator.
- if ($arg eq $argend ||
- $arg =~ /^$prefix.+/) {
- # Push back.
- unshift (@$argv, $arg);
- # Supply empty value.
- $arg = '';
- }
- }
-
- elsif ( $type eq 'i' # numeric/integer
- || $type eq 'I' # numeric/integer w/ incr default
- || $type eq 'o' ) { # dec/oct/hex/bin value
-
- my $o_valid = $type eq 'o' ? PAT_XINT : PAT_INT;
-
- if ( $bundling && defined $rest
- && $rest =~ /^($key_valid)($o_valid)(.*)$/si ) {
- ($key, $arg, $rest) = ($1, $2, $+);
- chop($key) if $key;
- $arg = ($type eq 'o' && $arg =~ /^0/) ? oct($arg) : 0+$arg;
- unshift (@$argv, $starter.$rest) if defined $rest && $rest ne '';
- }
- elsif ( $arg =~ /^$o_valid$/si ) {
- $arg =~ tr/_//d;
- $arg = ($type eq 'o' && $arg =~ /^0/) ? oct($arg) : 0+$arg;
- }
- else {
- if ( defined $optarg || $mand ) {
- if ( $passthrough ) {
- unshift (@$argv, defined $rest ? $starter.$rest : $arg)
- unless defined $optarg;
- return (0);
- }
- warn ("Value \"", $arg, "\" invalid for option ",
- $opt, " (",
- $type eq 'o' ? "extended " : '',
- "number expected)\n");
- $error++;
- # Push back.
- unshift (@$argv, $starter.$rest) if defined $rest;
- return (1, undef);
- }
- else {
- # Push back.
- unshift (@$argv, defined $rest ? $starter.$rest : $arg);
- if ( $type eq 'I' ) {
- # Fake incremental type.
- my @c = @$ctl;
- $c[CTL_TYPE] = '+';
- return (1, $opt, \@c, 1);
- }
- # Supply default value.
- $arg = defined($ctl->[CTL_DEFAULT]) ? $ctl->[CTL_DEFAULT] : 0;
- }
- }
- }
-
- elsif ( $type eq 'f' ) { # real number, int is also ok
- # We require at least one digit before a point or 'e',
- # and at least one digit following the point and 'e'.
- # [-]NN[.NN][eNN]
- my $o_valid = PAT_FLOAT;
- if ( $bundling && defined $rest &&
- $rest =~ /^($key_valid)($o_valid)(.*)$/s ) {
- $arg =~ tr/_//d;
- ($key, $arg, $rest) = ($1, $2, $+);
- chop($key) if $key;
- unshift (@$argv, $starter.$rest) if defined $rest && $rest ne '';
- }
- elsif ( $arg =~ /^$o_valid$/ ) {
- $arg =~ tr/_//d;
- }
- else {
- if ( defined $optarg || $mand ) {
- if ( $passthrough ) {
- unshift (@$argv, defined $rest ? $starter.$rest : $arg)
- unless defined $optarg;
- return (0);
- }
- warn ("Value \"", $arg, "\" invalid for option ",
- $opt, " (real number expected)\n");
- $error++;
- # Push back.
- unshift (@$argv, $starter.$rest) if defined $rest;
- return (1, undef);
- }
- else {
- # Push back.
- unshift (@$argv, defined $rest ? $starter.$rest : $arg);
- # Supply default value.
- $arg = 0.0;
- }
- }
- }
- else {
- die("Getopt::Long internal error (Can't happen)\n");
- }
- return (1, $opt, $ctl, $arg, $key);
-}
-
-sub ValidValue ($$$$$) {
- my ($ctl, $arg, $mand, $argend, $prefix) = @_;
-
- if ( $ctl->[CTL_DEST] == CTL_DEST_HASH ) {
- return 0 unless $arg =~ /[^=]+=(.*)/;
- $arg = $1;
- }
-
- my $type = $ctl->[CTL_TYPE];
-
- if ( $type eq 's' ) { # string
- # A mandatory string takes anything.
- return (1) if $mand;
-
- return (1) if $arg eq "-";
-
- # Check for option or option list terminator.
- return 0 if $arg eq $argend || $arg =~ /^$prefix.+/;
- return 1;
- }
-
- elsif ( $type eq 'i' # numeric/integer
- || $type eq 'I' # numeric/integer w/ incr default
- || $type eq 'o' ) { # dec/oct/hex/bin value
-
- my $o_valid = $type eq 'o' ? PAT_XINT : PAT_INT;
- return $arg =~ /^$o_valid$/si;
- }
-
- elsif ( $type eq 'f' ) { # real number, int is also ok
- # We require at least one digit before a point or 'e',
- # and at least one digit following the point and 'e'.
- # [-]NN[.NN][eNN]
- my $o_valid = PAT_FLOAT;
- return $arg =~ /^$o_valid$/;
- }
- die("ValidValue: Cannot happen\n");
-}
-
-# Getopt::Long Configuration.
-sub Configure (@) {
- my (@options) = @_;
-
- my $prevconfig =
- [ $error, $debug, $major_version, $minor_version,
- $autoabbrev, $getopt_compat, $ignorecase, $bundling, $order,
- $gnu_compat, $passthrough, $genprefix, $auto_version, $auto_help,
- $longprefix ];
-
- if ( ref($options[0]) eq 'ARRAY' ) {
- ( $error, $debug, $major_version, $minor_version,
- $autoabbrev, $getopt_compat, $ignorecase, $bundling, $order,
- $gnu_compat, $passthrough, $genprefix, $auto_version, $auto_help,
- $longprefix ) = @{shift(@options)};
- }
-
- my $opt;
- foreach $opt ( @options ) {
- my $try = lc ($opt);
- my $action = 1;
- if ( $try =~ /^no_?(.*)$/s ) {
- $action = 0;
- $try = $+;
- }
- if ( ($try eq 'default' or $try eq 'defaults') && $action ) {
- ConfigDefaults ();
- }
- elsif ( ($try eq 'posix_default' or $try eq 'posix_defaults') ) {
- local $ENV{POSIXLY_CORRECT};
- $ENV{POSIXLY_CORRECT} = 1 if $action;
- ConfigDefaults ();
- }
- elsif ( $try eq 'auto_abbrev' or $try eq 'autoabbrev' ) {
- $autoabbrev = $action;
- }
- elsif ( $try eq 'getopt_compat' ) {
- $getopt_compat = $action;
- $genprefix = $action ? "(--|-|\\+)" : "(--|-)";
- }
- elsif ( $try eq 'gnu_getopt' ) {
- if ( $action ) {
- $gnu_compat = 1;
- $bundling = 1;
- $getopt_compat = 0;
- $genprefix = "(--|-)";
- $order = $PERMUTE;
- }
- }
- elsif ( $try eq 'gnu_compat' ) {
- $gnu_compat = $action;
- }
- elsif ( $try =~ /^(auto_?)?version$/ ) {
- $auto_version = $action;
- }
- elsif ( $try =~ /^(auto_?)?help$/ ) {
- $auto_help = $action;
- }
- elsif ( $try eq 'ignorecase' or $try eq 'ignore_case' ) {
- $ignorecase = $action;
- }
- elsif ( $try eq 'ignorecase_always' or $try eq 'ignore_case_always' ) {
- $ignorecase = $action ? 2 : 0;
- }
- elsif ( $try eq 'bundling' ) {
- $bundling = $action;
- }
- elsif ( $try eq 'bundling_override' ) {
- $bundling = $action ? 2 : 0;
- }
- elsif ( $try eq 'require_order' ) {
- $order = $action ? $REQUIRE_ORDER : $PERMUTE;
- }
- elsif ( $try eq 'permute' ) {
- $order = $action ? $PERMUTE : $REQUIRE_ORDER;
- }
- elsif ( $try eq 'pass_through' or $try eq 'passthrough' ) {
- $passthrough = $action;
- }
- elsif ( $try =~ /^prefix=(.+)$/ && $action ) {
- $genprefix = $1;
- # Turn into regexp. Needs to be parenthesized!
- $genprefix = "(" . quotemeta($genprefix) . ")";
- eval { '' =~ /$genprefix/; };
- die("Getopt::Long: invalid pattern \"$genprefix\"") if $@;
- }
- elsif ( $try =~ /^prefix_pattern=(.+)$/ && $action ) {
- $genprefix = $1;
- # Parenthesize if needed.
- $genprefix = "(" . $genprefix . ")"
- unless $genprefix =~ /^\(.*\)$/;
- eval { '' =~ m"$genprefix"; };
- die("Getopt::Long: invalid pattern \"$genprefix\"") if $@;
- }
- elsif ( $try =~ /^long_prefix_pattern=(.+)$/ && $action ) {
- $longprefix = $1;
- # Parenthesize if needed.
- $longprefix = "(" . $longprefix . ")"
- unless $longprefix =~ /^\(.*\)$/;
- eval { '' =~ m"$longprefix"; };
- die("Getopt::Long: invalid long prefix pattern \"$longprefix\"") if $@;
- }
- elsif ( $try eq 'debug' ) {
- $debug = $action;
- }
- else {
- die("Getopt::Long: unknown config parameter \"$opt\"")
- }
- }
- $prevconfig;
-}
-
-# Deprecated name.
-sub config (@) {
- Configure (@_);
-}
-
-# Issue a standard message for --version.
-#
-# The arguments are mostly the same as for Pod::Usage::pod2usage:
-#
-# - a number (exit value)
-# - a string (lead in message)
-# - a hash with options. See Pod::Usage for details.
-#
-sub VersionMessage(@) {
- # Massage args.
- my $pa = setup_pa_args("version", @_);
-
- my $v = $main::VERSION;
- my $fh = $pa->{-output} ||
- ($pa->{-exitval} eq "NOEXIT" || $pa->{-exitval} < 2) ? \*STDOUT : \*STDERR;
-
- print $fh (defined($pa->{-message}) ? $pa->{-message} : (),
- $0, defined $v ? " version $v" : (),
- "\n",
- "(", __PACKAGE__, "::", "GetOptions",
- " version ",
- defined($Getopt::Long::VERSION_STRING)
- ? $Getopt::Long::VERSION_STRING : $VERSION, ";",
- " Perl version ",
- $] >= 5.006 ? sprintf("%vd", $^V) : $],
- ")\n");
- exit($pa->{-exitval}) unless $pa->{-exitval} eq "NOEXIT";
-}
-
-# Issue a standard message for --help.
-#
-# The arguments are the same as for Pod::Usage::pod2usage:
-#
-# - a number (exit value)
-# - a string (lead in message)
-# - a hash with options. See Pod::Usage for details.
-#
-sub HelpMessage(@) {
- eval {
- require Pod::Usage;
- import Pod::Usage;
- 1;
- } || die("Cannot provide help: cannot load Pod::Usage\n");
-
- # Note that pod2usage will issue a warning if -exitval => NOEXIT.
- pod2usage(setup_pa_args("help", @_));
-
-}
-
-# Helper routine to set up a normalized hash ref to be used as
-# argument to pod2usage.
-sub setup_pa_args($@) {
- my $tag = shift; # who's calling
-
- # If called by direct binding to an option, it will get the option
- # name and value as arguments. Remove these, if so.
- @_ = () if @_ == 2 && $_[0] eq $tag;
-
- my $pa;
- if ( @_ > 1 ) {
- $pa = { @_ };
- }
- else {
- $pa = shift || {};
- }
-
- # At this point, $pa can be a number (exit value), string
- # (message) or hash with options.
-
- if ( UNIVERSAL::isa($pa, 'HASH') ) {
- # Get rid of -msg vs. -message ambiguity.
- $pa->{-message} = $pa->{-msg};
- delete($pa->{-msg});
- }
- elsif ( $pa =~ /^-?\d+$/ ) {
- $pa = { -exitval => $pa };
- }
- else {
- $pa = { -message => $pa };
- }
-
- # These are _our_ defaults.
- $pa->{-verbose} = 0 unless exists($pa->{-verbose});
- $pa->{-exitval} = 0 unless exists($pa->{-exitval});
- $pa;
-}
-
-# Sneak way to know what version the user requested.
-sub VERSION {
- $requested_version = $_[1];
- shift->SUPER::VERSION(@_);
-}
-
-package Getopt::Long::CallBack;
-
-sub new {
- my ($pkg, %atts) = @_;
- bless { %atts }, $pkg;
-}
-
-sub name {
- my $self = shift;
- ''.$self->{name};
-}
-
-use overload
- # Treat this object as an ordinary string for legacy API.
- '""' => \&name,
- fallback => 1;
-
-1;
-
-################ Documentation ################
-
-=head1 NAME
-
-Getopt::Long - Extended processing of command line options
-
-=head1 SYNOPSIS
-
- use Getopt::Long;
- my $data = "file.dat";
- my $length = 24;
- my $verbose;
- $result = GetOptions ("length=i" => \$length, # numeric
- "file=s" => \$data, # string
- "verbose" => \$verbose); # flag
-
-=head1 DESCRIPTION
-
-The Getopt::Long module implements an extended getopt function called
-GetOptions(). This function adheres to the POSIX syntax for command
-line options, with GNU extensions. In general, this means that options
-have long names instead of single letters, and are introduced with a
-double dash "--". Support for bundling of command line options, as was
-the case with the more traditional single-letter approach, is provided
-but not enabled by default.
-
-=head1 Command Line Options, an Introduction
-
-Command line operated programs traditionally take their arguments from
-the command line, for example filenames or other information that the
-program needs to know. Besides arguments, these programs often take
-command line I<options> as well. Options are not necessary for the
-program to work, hence the name 'option', but are used to modify its
-default behaviour. For example, a program could do its job quietly,
-but with a suitable option it could provide verbose information about
-what it did.
-
-Command line options come in several flavours. Historically, they are
-preceded by a single dash C<->, and consist of a single letter.
-
- -l -a -c
-
-Usually, these single-character options can be bundled:
-
- -lac
-
-Options can have values, the value is placed after the option
-character. Sometimes with whitespace in between, sometimes not:
-
- -s 24 -s24
-
-Due to the very cryptic nature of these options, another style was
-developed that used long names. So instead of a cryptic C<-l> one
-could use the more descriptive C<--long>. To distinguish between a
-bundle of single-character options and a long one, two dashes are used
-to precede the option name. Early implementations of long options used
-a plus C<+> instead. Also, option values could be specified either
-like
-
- --size=24
-
-or
-
- --size 24
-
-The C<+> form is now obsolete and strongly deprecated.
-
-=head1 Getting Started with Getopt::Long
-
-Getopt::Long is the Perl5 successor of C<newgetopt.pl>. This was the
-first Perl module that provided support for handling the new style of
-command line options, hence the name Getopt::Long. This module also
-supports single-character options and bundling. Single character
-options may be any alphabetic character, a question mark, and a dash.
-Long options may consist of a series of letters, digits, and dashes.
-Although this is currently not enforced by Getopt::Long, multiple
-consecutive dashes are not allowed, and the option name must not end
-with a dash.
-
-To use Getopt::Long from a Perl program, you must include the
-following line in your Perl program:
-
- use Getopt::Long;
-
-This will load the core of the Getopt::Long module and prepare your
-program for using it. Most of the actual Getopt::Long code is not
-loaded until you really call one of its functions.
-
-In the default configuration, options names may be abbreviated to
-uniqueness, case does not matter, and a single dash is sufficient,
-even for long option names. Also, options may be placed between
-non-option arguments. See L<Configuring Getopt::Long> for more
-details on how to configure Getopt::Long.
-
-=head2 Simple options
-
-The most simple options are the ones that take no values. Their mere
-presence on the command line enables the option. Popular examples are:
-
- --all --verbose --quiet --debug
-
-Handling simple options is straightforward:
-
- my $verbose = ''; # option variable with default value (false)
- my $all = ''; # option variable with default value (false)
- GetOptions ('verbose' => \$verbose, 'all' => \$all);
-
-The call to GetOptions() parses the command line arguments that are
-present in C<@ARGV> and sets the option variable to the value C<1> if
-the option did occur on the command line. Otherwise, the option
-variable is not touched. Setting the option value to true is often
-called I<enabling> the option.
-
-The option name as specified to the GetOptions() function is called
-the option I<specification>. Later we'll see that this specification
-can contain more than just the option name. The reference to the
-variable is called the option I<destination>.
-
-GetOptions() will return a true value if the command line could be
-processed successfully. Otherwise, it will write error messages to
-STDERR, and return a false result.
-
-=head2 A little bit less simple options
-
-Getopt::Long supports two useful variants of simple options:
-I<negatable> options and I<incremental> options.
-
-A negatable option is specified with an exclamation mark C<!> after the
-option name:
-
- my $verbose = ''; # option variable with default value (false)
- GetOptions ('verbose!' => \$verbose);
-
-Now, using C<--verbose> on the command line will enable C<$verbose>,
-as expected. But it is also allowed to use C<--noverbose>, which will
-disable C<$verbose> by setting its value to C<0>. Using a suitable
-default value, the program can find out whether C<$verbose> is false
-by default, or disabled by using C<--noverbose>.
-
-An incremental option is specified with a plus C<+> after the
-option name:
-
- my $verbose = ''; # option variable with default value (false)
- GetOptions ('verbose+' => \$verbose);
-
-Using C<--verbose> on the command line will increment the value of
-C<$verbose>. This way the program can keep track of how many times the
-option occurred on the command line. For example, each occurrence of
-C<--verbose> could increase the verbosity level of the program.
-
-=head2 Mixing command line option with other arguments
-
-Usually programs take command line options as well as other arguments,
-for example, file names. It is good practice to always specify the
-options first, and the other arguments last. Getopt::Long will,
-however, allow the options and arguments to be mixed and 'filter out'
-all the options before passing the rest of the arguments to the
-program. To stop Getopt::Long from processing further arguments,
-insert a double dash C<--> on the command line:
-
- --size 24 -- --all
-
-In this example, C<--all> will I<not> be treated as an option, but
-passed to the program unharmed, in C<@ARGV>.
-
-=head2 Options with values
-
-For options that take values it must be specified whether the option
-value is required or not, and what kind of value the option expects.
-
-Three kinds of values are supported: integer numbers, floating point
-numbers, and strings.
-
-If the option value is required, Getopt::Long will take the
-command line argument that follows the option and assign this to the
-option variable. If, however, the option value is specified as
-optional, this will only be done if that value does not look like a
-valid command line option itself.
-
- my $tag = ''; # option variable with default value
- GetOptions ('tag=s' => \$tag);
-
-In the option specification, the option name is followed by an equals
-sign C<=> and the letter C<s>. The equals sign indicates that this
-option requires a value. The letter C<s> indicates that this value is
-an arbitrary string. Other possible value types are C<i> for integer
-values, and C<f> for floating point values. Using a colon C<:> instead
-of the equals sign indicates that the option value is optional. In
-this case, if no suitable value is supplied, string valued options get
-an empty string C<''> assigned, while numeric options are set to C<0>.
-
-=head2 Options with multiple values
-
-Options sometimes take several values. For example, a program could
-use multiple directories to search for library files:
-
- --library lib/stdlib --library lib/extlib
-
-To accomplish this behaviour, simply specify an array reference as the
-destination for the option:
-
- GetOptions ("library=s" => \@libfiles);
-
-Alternatively, you can specify that the option can have multiple
-values by adding a "@", and pass a scalar reference as the
-destination:
-
- GetOptions ("library=s@" => \$libfiles);
-
-Used with the example above, C<@libfiles> (or C<@$libfiles>) would
-contain two strings upon completion: C<"lib/srdlib"> and
-C<"lib/extlib">, in that order. It is also possible to specify that
-only integer or floating point numbers are acceptable values.
-
-Often it is useful to allow comma-separated lists of values as well as
-multiple occurrences of the options. This is easy using Perl's split()
-and join() operators:
-
- GetOptions ("library=s" => \@libfiles);
- @libfiles = split(/,/,join(',', at libfiles));
-
-Of course, it is important to choose the right separator string for
-each purpose.
-
-Warning: What follows is an experimental feature.
-
-Options can take multiple values at once, for example
-
- --coordinates 52.2 16.4 --rgbcolor 255 255 149
-
-This can be accomplished by adding a repeat specifier to the option
-specification. Repeat specifiers are very similar to the C<{...}>
-repeat specifiers that can be used with regular expression patterns.
-For example, the above command line would be handled as follows:
-
- GetOptions('coordinates=f{2}' => \@coor, 'rgbcolor=i{3}' => \@color);
-
-The destination for the option must be an array or array reference.
-
-It is also possible to specify the minimal and maximal number of
-arguments an option takes. C<foo=s{2,4}> indicates an option that
-takes at least two and at most 4 arguments. C<foo=s{,}> indicates one
-or more values; C<foo:s{,}> indicates zero or more option values.
-
-=head2 Options with hash values
-
-If the option destination is a reference to a hash, the option will
-take, as value, strings of the form I<key>C<=>I<value>. The value will
-be stored with the specified key in the hash.
-
- GetOptions ("define=s" => \%defines);
-
-Alternatively you can use:
-
- GetOptions ("define=s%" => \$defines);
-
-When used with command line options:
-
- --define os=linux --define vendor=redhat
-
-the hash C<%defines> (or C<%$defines>) will contain two keys, C<"os">
-with value C<"linux"> and C<"vendor"> with value C<"redhat">. It is
-also possible to specify that only integer or floating point numbers
-are acceptable values. The keys are always taken to be strings.
-
-=head2 User-defined subroutines to handle options
-
-Ultimate control over what should be done when (actually: each time)
-an option is encountered on the command line can be achieved by
-designating a reference to a subroutine (or an anonymous subroutine)
-as the option destination. When GetOptions() encounters the option, it
-will call the subroutine with two or three arguments. The first
-argument is the name of the option. (Actually, it is an object that
-stringifies to the name of the option.) For a scalar or array destination,
-the second argument is the value to be stored. For a hash destination,
-the second arguments is the key to the hash, and the third argument
-the value to be stored. It is up to the subroutine to store the value,
-or do whatever it thinks is appropriate.
-
-A trivial application of this mechanism is to implement options that
-are related to each other. For example:
-
- my $verbose = ''; # option variable with default value (false)
- GetOptions ('verbose' => \$verbose,
- 'quiet' => sub { $verbose = 0 });
-
-Here C<--verbose> and C<--quiet> control the same variable
-C<$verbose>, but with opposite values.
-
-If the subroutine needs to signal an error, it should call die() with
-the desired error message as its argument. GetOptions() will catch the
-die(), issue the error message, and record that an error result must
-be returned upon completion.
-
-If the text of the error message starts with an exclamation mark C<!>
-it is interpreted specially by GetOptions(). There is currently one
-special command implemented: C<die("!FINISH")> will cause GetOptions()
-to stop processing options, as if it encountered a double dash C<-->.
-
-In version 2.37 the first argument to the callback function was
-changed from string to object. This was done to make room for
-extensions and more detailed control. The object stringifies to the
-option name so this change should not introduce compatibility
-problems.
-
-=head2 Options with multiple names
-
-Often it is user friendly to supply alternate mnemonic names for
-options. For example C<--height> could be an alternate name for
-C<--length>. Alternate names can be included in the option
-specification, separated by vertical bar C<|> characters. To implement
-the above example:
-
- GetOptions ('length|height=f' => \$length);
-
-The first name is called the I<primary> name, the other names are
-called I<aliases>. When using a hash to store options, the key will
-always be the primary name.
-
-Multiple alternate names are possible.
-
-=head2 Case and abbreviations
-
-Without additional configuration, GetOptions() will ignore the case of
-option names, and allow the options to be abbreviated to uniqueness.
-
- GetOptions ('length|height=f' => \$length, "head" => \$head);
-
-This call will allow C<--l> and C<--L> for the length option, but
-requires a least C<--hea> and C<--hei> for the head and height options.
-
-=head2 Summary of Option Specifications
-
-Each option specifier consists of two parts: the name specification
-and the argument specification.
-
-The name specification contains the name of the option, optionally
-followed by a list of alternative names separated by vertical bar
-characters.
-
- length option name is "length"
- length|size|l name is "length", aliases are "size" and "l"
-
-The argument specification is optional. If omitted, the option is
-considered boolean, a value of 1 will be assigned when the option is
-used on the command line.
-
-The argument specification can be
-
-=over 4
-
-=item !
-
-The option does not take an argument and may be negated by prefixing
-it with "no" or "no-". E.g. C<"foo!"> will allow C<--foo> (a value of
-1 will be assigned) as well as C<--nofoo> and C<--no-foo> (a value of
-0 will be assigned). If the option has aliases, this applies to the
-aliases as well.
-
-Using negation on a single letter option when bundling is in effect is
-pointless and will result in a warning.
-
-=item +
-
-The option does not take an argument and will be incremented by 1
-every time it appears on the command line. E.g. C<"more+">, when used
-with C<--more --more --more>, will increment the value three times,
-resulting in a value of 3 (provided it was 0 or undefined at first).
-
-The C<+> specifier is ignored if the option destination is not a scalar.
-
-=item = I<type> [ I<desttype> ] [ I<repeat> ]
-
-The option requires an argument of the given type. Supported types
-are:
-
-=over 4
-
-=item s
-
-String. An arbitrary sequence of characters. It is valid for the
-argument to start with C<-> or C<-->.
-
-=item i
-
-Integer. An optional leading plus or minus sign, followed by a
-sequence of digits.
-
-=item o
-
-Extended integer, Perl style. This can be either an optional leading
-plus or minus sign, followed by a sequence of digits, or an octal
-string (a zero, optionally followed by '0', '1', .. '7'), or a
-hexadecimal string (C<0x> followed by '0' .. '9', 'a' .. 'f', case
-insensitive), or a binary string (C<0b> followed by a series of '0'
-and '1').
-
-=item f
-
-Real number. For example C<3.14>, C<-6.23E24> and so on.
-
-=back
-
-The I<desttype> can be C<@> or C<%> to specify that the option is
-list or a hash valued. This is only needed when the destination for
-the option value is not otherwise specified. It should be omitted when
-not needed.
-
-The I<repeat> specifies the number of values this option takes per
-occurrence on the command line. It has the format C<{> [ I<min> ] [ C<,> [ I<max> ] ] C<}>.
-
-I<min> denotes the minimal number of arguments. It defaults to 1 for
-options with C<=> and to 0 for options with C<:>, see below. Note that
-I<min> overrules the C<=> / C<:> semantics.
-
-I<max> denotes the maximum number of arguments. It must be at least
-I<min>. If I<max> is omitted, I<but the comma is not>, there is no
-upper bound to the number of argument values taken.
-
-=item : I<type> [ I<desttype> ]
-
-Like C<=>, but designates the argument as optional.
-If omitted, an empty string will be assigned to string values options,
-and the value zero to numeric options.
-
-Note that if a string argument starts with C<-> or C<-->, it will be
-considered an option on itself.
-
-=item : I<number> [ I<desttype> ]
-
-Like C<:i>, but if the value is omitted, the I<number> will be assigned.
-
-=item : + [ I<desttype> ]
-
-Like C<:i>, but if the value is omitted, the current value for the
-option will be incremented.
-
-=back
-
-=head1 Advanced Possibilities
-
-=head2 Object oriented interface
-
-Getopt::Long can be used in an object oriented way as well:
-
- use Getopt::Long;
- $p = new Getopt::Long::Parser;
- $p->configure(...configuration options...);
- if ($p->getoptions(...options descriptions...)) ...
-
-Configuration options can be passed to the constructor:
-
- $p = new Getopt::Long::Parser
- config => [...configuration options...];
-
-=head2 Thread Safety
-
-Getopt::Long is thread safe when using ithreads as of Perl 5.8. It is
-I<not> thread safe when using the older (experimental and now
-obsolete) threads implementation that was added to Perl 5.005.
-
-=head2 Documentation and help texts
-
-Getopt::Long encourages the use of Pod::Usage to produce help
-messages. For example:
-
- use Getopt::Long;
- use Pod::Usage;
-
- my $man = 0;
- my $help = 0;
-
- GetOptions('help|?' => \$help, man => \$man) or pod2usage(2);
- pod2usage(1) if $help;
- pod2usage(-exitstatus => 0, -verbose => 2) if $man;
-
- __END__
-
- =head1 NAME
-
- sample - Using Getopt::Long and Pod::Usage
-
- =head1 SYNOPSIS
-
- sample [options] [file ...]
-
- Options:
- -help brief help message
- -man full documentation
-
- =head1 OPTIONS
-
- =over 8
-
- =item B<-help>
-
- Print a brief help message and exits.
-
- =item B<-man>
-
- Prints the manual page and exits.
-
- =back
-
- =head1 DESCRIPTION
-
- B<This program> will read the given input file(s) and do something
- useful with the contents thereof.
-
- =cut
-
-See L<Pod::Usage> for details.
-
-=head2 Parsing options from an arbitrary array
-
-By default, GetOptions parses the options that are present in the
-global array C<@ARGV>. A special entry C<GetOptionsFromArray> can be
-used to parse options from an arbitrary array.
-
- use Getopt::Long qw(GetOptionsFromArray);
- $ret = GetOptionsFromArray(\@myopts, ...);
-
-When used like this, the global C<@ARGV> is not touched at all.
-
-The following two calls behave identically:
-
- $ret = GetOptions( ... );
- $ret = GetOptionsFromArray(\@ARGV, ... );
-
-=head2 Parsing options from an arbitrary string
-
-A special entry C<GetOptionsFromString> can be used to parse options
-from an arbitrary string.
-
- use Getopt::Long qw(GetOptionsFromString);
- $ret = GetOptionsFromString($string, ...);
-
-The contents of the string are split into arguments using a call to
-C<Text::ParseWords::shellwords>. As with C<GetOptionsFromArray>, the
-global C<@ARGV> is not touched.
-
-It is possible that, upon completion, not all arguments in the string
-have been processed. C<GetOptionsFromString> will, when called in list
-context, return both the return status and an array reference to any
-remaining arguments:
-
- ($ret, $args) = GetOptionsFromString($string, ... );
-
-If any arguments remain, and C<GetOptionsFromString> was not called in
-list context, a message will be given and C<GetOptionsFromString> will
-return failure.
-
-=head2 Storing options values in a hash
-
-Sometimes, for example when there are a lot of options, having a
-separate variable for each of them can be cumbersome. GetOptions()
-supports, as an alternative mechanism, storing options values in a
-hash.
-
-To obtain this, a reference to a hash must be passed I<as the first
-argument> to GetOptions(). For each option that is specified on the
-command line, the option value will be stored in the hash with the
-option name as key. Options that are not actually used on the command
-line will not be put in the hash, on other words,
-C<exists($h{option})> (or defined()) can be used to test if an option
-was used. The drawback is that warnings will be issued if the program
-runs under C<use strict> and uses C<$h{option}> without testing with
-exists() or defined() first.
-
- my %h = ();
- GetOptions (\%h, 'length=i'); # will store in $h{length}
-
-For options that take list or hash values, it is necessary to indicate
-this by appending an C<@> or C<%> sign after the type:
-
- GetOptions (\%h, 'colours=s@'); # will push to @{$h{colours}}
-
-To make things more complicated, the hash may contain references to
-the actual destinations, for example:
-
- my $len = 0;
- my %h = ('length' => \$len);
- GetOptions (\%h, 'length=i'); # will store in $len
-
-This example is fully equivalent with:
-
- my $len = 0;
- GetOptions ('length=i' => \$len); # will store in $len
-
-Any mixture is possible. For example, the most frequently used options
-could be stored in variables while all other options get stored in the
-hash:
-
- my $verbose = 0; # frequently referred
- my $debug = 0; # frequently referred
- my %h = ('verbose' => \$verbose, 'debug' => \$debug);
- GetOptions (\%h, 'verbose', 'debug', 'filter', 'size=i');
- if ( $verbose ) { ... }
- if ( exists $h{filter} ) { ... option 'filter' was specified ... }
-
-=head2 Bundling
-
-With bundling it is possible to set several single-character options
-at once. For example if C<a>, C<v> and C<x> are all valid options,
-
- -vax
-
-would set all three.
-
-Getopt::Long supports two levels of bundling. To enable bundling, a
-call to Getopt::Long::Configure is required.
-
-The first level of bundling can be enabled with:
-
- Getopt::Long::Configure ("bundling");
-
-Configured this way, single-character options can be bundled but long
-options B<must> always start with a double dash C<--> to avoid
-ambiguity. For example, when C<vax>, C<a>, C<v> and C<x> are all valid
-options,
-
- -vax
-
-would set C<a>, C<v> and C<x>, but
-
- --vax
-
-would set C<vax>.
-
-The second level of bundling lifts this restriction. It can be enabled
-with:
-
- Getopt::Long::Configure ("bundling_override");
-
-Now, C<-vax> would set the option C<vax>.
-
-When any level of bundling is enabled, option values may be inserted
-in the bundle. For example:
-
- -h24w80
-
-is equivalent to
-
- -h 24 -w 80
-
-When configured for bundling, single-character options are matched
-case sensitive while long options are matched case insensitive. To
-have the single-character options matched case insensitive as well,
-use:
-
- Getopt::Long::Configure ("bundling", "ignorecase_always");
-
-It goes without saying that bundling can be quite confusing.
-
-=head2 The lonesome dash
-
-Normally, a lone dash C<-> on the command line will not be considered
-an option. Option processing will terminate (unless "permute" is
-configured) and the dash will be left in C<@ARGV>.
-
-It is possible to get special treatment for a lone dash. This can be
-achieved by adding an option specification with an empty name, for
-example:
-
- GetOptions ('' => \$stdio);
-
-A lone dash on the command line will now be a legal option, and using
-it will set variable C<$stdio>.
-
-=head2 Argument callback
-
-A special option 'name' C<< <> >> can be used to designate a subroutine
-to handle non-option arguments. When GetOptions() encounters an
-argument that does not look like an option, it will immediately call this
-subroutine and passes it one parameter: the argument name. Well, actually
-it is an object that stringifies to the argument name.
-
-For example:
-
- my $width = 80;
- sub process { ... }
- GetOptions ('width=i' => \$width, '<>' => \&process);
-
-When applied to the following command line:
-
- arg1 --width=72 arg2 --width=60 arg3
-
-This will call
-C<process("arg1")> while C<$width> is C<80>,
-C<process("arg2")> while C<$width> is C<72>, and
-C<process("arg3")> while C<$width> is C<60>.
-
-This feature requires configuration option B<permute>, see section
-L<Configuring Getopt::Long>.
-
-=head1 Configuring Getopt::Long
-
-Getopt::Long can be configured by calling subroutine
-Getopt::Long::Configure(). This subroutine takes a list of quoted
-strings, each specifying a configuration option to be enabled, e.g.
-C<ignore_case>, or disabled, e.g. C<no_ignore_case>. Case does not
-matter. Multiple calls to Configure() are possible.
-
-Alternatively, as of version 2.24, the configuration options may be
-passed together with the C<use> statement:
-
- use Getopt::Long qw(:config no_ignore_case bundling);
-
-The following options are available:
-
-=over 12
-
-=item default
-
-This option causes all configuration options to be reset to their
-default values.
-
-=item posix_default
-
-This option causes all configuration options to be reset to their
-default values as if the environment variable POSIXLY_CORRECT had
-been set.
-
-=item auto_abbrev
-
-Allow option names to be abbreviated to uniqueness.
-Default is enabled unless environment variable
-POSIXLY_CORRECT has been set, in which case C<auto_abbrev> is disabled.
-
-=item getopt_compat
-
-Allow C<+> to start options.
-Default is enabled unless environment variable
-POSIXLY_CORRECT has been set, in which case C<getopt_compat> is disabled.
-
-=item gnu_compat
-
-C<gnu_compat> controls whether C<--opt=> is allowed, and what it should
-do. Without C<gnu_compat>, C<--opt=> gives an error. With C<gnu_compat>,
-C<--opt=> will give option C<opt> and empty value.
-This is the way GNU getopt_long() does it.
-
-=item gnu_getopt
-
-This is a short way of setting C<gnu_compat> C<bundling> C<permute>
-C<no_getopt_compat>. With C<gnu_getopt>, command line handling should be
-fully compatible with GNU getopt_long().
-
-=item require_order
-
-Whether command line arguments are allowed to be mixed with options.
-Default is disabled unless environment variable
-POSIXLY_CORRECT has been set, in which case C<require_order> is enabled.
-
-See also C<permute>, which is the opposite of C<require_order>.
-
-=item permute
-
-Whether command line arguments are allowed to be mixed with options.
-Default is enabled unless environment variable
-POSIXLY_CORRECT has been set, in which case C<permute> is disabled.
-Note that C<permute> is the opposite of C<require_order>.
-
-If C<permute> is enabled, this means that
-
- --foo arg1 --bar arg2 arg3
-
-is equivalent to
-
- --foo --bar arg1 arg2 arg3
-
-If an argument callback routine is specified, C<@ARGV> will always be
-empty upon successful return of GetOptions() since all options have been
-processed. The only exception is when C<--> is used:
-
- --foo arg1 --bar arg2 -- arg3
-
-This will call the callback routine for arg1 and arg2, and then
-terminate GetOptions() leaving C<"arg3"> in C<@ARGV>.
-
-If C<require_order> is enabled, options processing
-terminates when the first non-option is encountered.
-
- --foo arg1 --bar arg2 arg3
-
-is equivalent to
-
- --foo -- arg1 --bar arg2 arg3
-
-If C<pass_through> is also enabled, options processing will terminate
-at the first unrecognized option, or non-option, whichever comes
-first.
-
-=item bundling (default: disabled)
-
-Enabling this option will allow single-character options to be
-bundled. To distinguish bundles from long option names, long options
-I<must> be introduced with C<--> and bundles with C<->.
-
-Note that, if you have options C<a>, C<l> and C<all>, and
-auto_abbrev enabled, possible arguments and option settings are:
-
- using argument sets option(s)
- ------------------------------------------
- -a, --a a
- -l, --l l
- -al, -la, -ala, -all,... a, l
- --al, --all all
-
-The surprising part is that C<--a> sets option C<a> (due to auto
-completion), not C<all>.
-
-Note: disabling C<bundling> also disables C<bundling_override>.
-
-=item bundling_override (default: disabled)
-
-If C<bundling_override> is enabled, bundling is enabled as with
-C<bundling> but now long option names override option bundles.
-
-Note: disabling C<bundling_override> also disables C<bundling>.
-
-B<Note:> Using option bundling can easily lead to unexpected results,
-especially when mixing long options and bundles. Caveat emptor.
-
-=item ignore_case (default: enabled)
-
-If enabled, case is ignored when matching long option names. If,
-however, bundling is enabled as well, single character options will be
-treated case-sensitive.
-
-With C<ignore_case>, option specifications for options that only
-differ in case, e.g., C<"foo"> and C<"Foo">, will be flagged as
-duplicates.
-
-Note: disabling C<ignore_case> also disables C<ignore_case_always>.
-
-=item ignore_case_always (default: disabled)
-
-When bundling is in effect, case is ignored on single-character
-options also.
-
-Note: disabling C<ignore_case_always> also disables C<ignore_case>.
-
-=item auto_version (default:disabled)
-
-Automatically provide support for the B<--version> option if
-the application did not specify a handler for this option itself.
-
-Getopt::Long will provide a standard version message that includes the
-program name, its version (if $main::VERSION is defined), and the
-versions of Getopt::Long and Perl. The message will be written to
-standard output and processing will terminate.
-
-C<auto_version> will be enabled if the calling program explicitly
-specified a version number higher than 2.32 in the C<use> or
-C<require> statement.
-
-=item auto_help (default:disabled)
-
-Automatically provide support for the B<--help> and B<-?> options if
-the application did not specify a handler for this option itself.
-
-Getopt::Long will provide a help message using module L<Pod::Usage>. The
-message, derived from the SYNOPSIS POD section, will be written to
-standard output and processing will terminate.
-
-C<auto_help> will be enabled if the calling program explicitly
-specified a version number higher than 2.32 in the C<use> or
-C<require> statement.
-
-=item pass_through (default: disabled)
-
-Options that are unknown, ambiguous or supplied with an invalid option
-value are passed through in C<@ARGV> instead of being flagged as
-errors. This makes it possible to write wrapper scripts that process
-only part of the user supplied command line arguments, and pass the
-remaining options to some other program.
-
-If C<require_order> is enabled, options processing will terminate at
-the first unrecognized option, or non-option, whichever comes first.
-However, if C<permute> is enabled instead, results can become confusing.
-
-Note that the options terminator (default C<-->), if present, will
-also be passed through in C<@ARGV>.
-
-=item prefix
-
-The string that starts options. If a constant string is not
-sufficient, see C<prefix_pattern>.
-
-=item prefix_pattern
-
-A Perl pattern that identifies the strings that introduce options.
-Default is C<--|-|\+> unless environment variable
-POSIXLY_CORRECT has been set, in which case it is C<--|->.
-
-=item long_prefix_pattern
-
-A Perl pattern that allows the disambiguation of long and short
-prefixes. Default is C<-->.
-
-Typically you only need to set this if you are using nonstandard
-prefixes and want some or all of them to have the same semantics as
-'--' does under normal circumstances.
-
-For example, setting prefix_pattern to C<--|-|\+|\/> and
-long_prefix_pattern to C<--|\/> would add Win32 style argument
-handling.
-
-=item debug (default: disabled)
-
-Enable debugging output.
-
-=back
-
-=head1 Exportable Methods
-
-=over
-
-=item VersionMessage
-
-This subroutine provides a standard version message. Its argument can be:
-
-=over 4
-
-=item *
-
-A string containing the text of a message to print I<before> printing
-the standard message.
-
-=item *
-
-A numeric value corresponding to the desired exit status.
-
-=item *
-
-A reference to a hash.
-
-=back
-
-If more than one argument is given then the entire argument list is
-assumed to be a hash. If a hash is supplied (either as a reference or
-as a list) it should contain one or more elements with the following
-keys:
-
-=over 4
-
-=item C<-message>
-
-=item C<-msg>
-
-The text of a message to print immediately prior to printing the
-program's usage message.
-
-=item C<-exitval>
-
-The desired exit status to pass to the B<exit()> function.
-This should be an integer, or else the string "NOEXIT" to
-indicate that control should simply be returned without
-terminating the invoking process.
-
-=item C<-output>
-
-A reference to a filehandle, or the pathname of a file to which the
-usage message should be written. The default is C<\*STDERR> unless the
-exit value is less than 2 (in which case the default is C<\*STDOUT>).
-
-=back
-
-You cannot tie this routine directly to an option, e.g.:
-
- GetOptions("version" => \&VersionMessage);
-
-Use this instead:
-
- GetOptions("version" => sub { VersionMessage() });
-
-=item HelpMessage
-
-This subroutine produces a standard help message, derived from the
-program's POD section SYNOPSIS using L<Pod::Usage>. It takes the same
-arguments as VersionMessage(). In particular, you cannot tie it
-directly to an option, e.g.:
-
- GetOptions("help" => \&HelpMessage);
-
-Use this instead:
-
- GetOptions("help" => sub { HelpMessage() });
-
-=back
-
-=head1 Return values and Errors
-
-Configuration errors and errors in the option definitions are
-signalled using die() and will terminate the calling program unless
-the call to Getopt::Long::GetOptions() was embedded in C<eval { ...
-}>, or die() was trapped using C<$SIG{__DIE__}>.
-
-GetOptions returns true to indicate success.
-It returns false when the function detected one or more errors during
-option parsing. These errors are signalled using warn() and can be
-trapped with C<$SIG{__WARN__}>.
-
-=head1 Legacy
-
-The earliest development of C<newgetopt.pl> started in 1990, with Perl
-version 4. As a result, its development, and the development of
-Getopt::Long, has gone through several stages. Since backward
-compatibility has always been extremely important, the current version
-of Getopt::Long still supports a lot of constructs that nowadays are
-no longer necessary or otherwise unwanted. This section describes
-briefly some of these 'features'.
-
-=head2 Default destinations
-
-When no destination is specified for an option, GetOptions will store
-the resultant value in a global variable named C<opt_>I<XXX>, where
-I<XXX> is the primary name of this option. When a progam executes
-under C<use strict> (recommended), these variables must be
-pre-declared with our() or C<use vars>.
-
- our $opt_length = 0;
- GetOptions ('length=i'); # will store in $opt_length
-
-To yield a usable Perl variable, characters that are not part of the
-syntax for variables are translated to underscores. For example,
-C<--fpp-struct-return> will set the variable
-C<$opt_fpp_struct_return>. Note that this variable resides in the
-namespace of the calling program, not necessarily C<main>. For
-example:
-
- GetOptions ("size=i", "sizes=i@");
-
-with command line "-size 10 -sizes 24 -sizes 48" will perform the
-equivalent of the assignments
-
- $opt_size = 10;
- @opt_sizes = (24, 48);
-
-=head2 Alternative option starters
-
-A string of alternative option starter characters may be passed as the
-first argument (or the first argument after a leading hash reference
-argument).
-
- my $len = 0;
- GetOptions ('/', 'length=i' => $len);
-
-Now the command line may look like:
-
- /length 24 -- arg
-
-Note that to terminate options processing still requires a double dash
-C<-->.
-
-GetOptions() will not interpret a leading C<< "<>" >> as option starters
-if the next argument is a reference. To force C<< "<" >> and C<< ">" >> as
-option starters, use C<< "><" >>. Confusing? Well, B<using a starter
-argument is strongly deprecated> anyway.
-
-=head2 Configuration variables
-
-Previous versions of Getopt::Long used variables for the purpose of
-configuring. Although manipulating these variables still work, it is
-strongly encouraged to use the C<Configure> routine that was introduced
-in version 2.17. Besides, it is much easier.
-
-=head1 Tips and Techniques
-
-=head2 Pushing multiple values in a hash option
-
-Sometimes you want to combine the best of hashes and arrays. For
-example, the command line:
-
- --list add=first --list add=second --list add=third
-
-where each successive 'list add' option will push the value of add
-into array ref $list->{'add'}. The result would be like
-
- $list->{add} = [qw(first second third)];
-
-This can be accomplished with a destination routine:
-
- GetOptions('list=s%' =>
- sub { push(@{$list{$_[1]}}, $_[2]) });
-
-=head1 Troubleshooting
-
-=head2 GetOptions does not return a false result when an option is not supplied
-
-That's why they're called 'options'.
-
-=head2 GetOptions does not split the command line correctly
-
-The command line is not split by GetOptions, but by the command line
-interpreter (CLI). On Unix, this is the shell. On Windows, it is
-COMMAND.COM or CMD.EXE. Other operating systems have other CLIs.
-
-It is important to know that these CLIs may behave different when the
-command line contains special characters, in particular quotes or
-backslashes. For example, with Unix shells you can use single quotes
-(C<'>) and double quotes (C<">) to group words together. The following
-alternatives are equivalent on Unix:
-
- "two words"
- 'two words'
- two\ words
-
-In case of doubt, insert the following statement in front of your Perl
-program:
-
- print STDERR (join("|", at ARGV),"\n");
-
-to verify how your CLI passes the arguments to the program.
-
-=head2 Undefined subroutine &main::GetOptions called
-
-Are you running Windows, and did you write
-
- use GetOpt::Long;
-
-(note the capital 'O')?
-
-=head2 How do I put a "-?" option into a Getopt::Long?
-
-You can only obtain this using an alias, and Getopt::Long of at least
-version 2.13.
-
- use Getopt::Long;
- GetOptions ("help|?"); # -help and -? will both set $opt_help
-
-=head1 AUTHOR
-
-Johan Vromans <jvromans at squirrel.nl>
-
-=head1 COPYRIGHT AND DISCLAIMER
-
-This program is Copyright 1990,2009 by Johan Vromans.
-This program is free software; you can redistribute it and/or
-modify it under the terms of the Perl Artistic License or the
-GNU General Public License as published by the Free Software
-Foundation; either version 2 of the License, or (at your option) any
-later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-If you do not have a copy of the GNU General Public License write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
-MA 02139, USA.
-
-=cut
-
Deleted: vendor/perl/dist/lib/Memoize.pm
===================================================================
--- vendor/perl/dist/lib/Memoize.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Memoize.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1047 +0,0 @@
-# -*- mode: perl; perl-indent-level: 2; -*-
-# Memoize.pm
-#
-# Transparent memoization of idempotent functions
-#
-# Copyright 1998, 1999, 2000, 2001 M-J. Dominus.
-# You may copy and distribute this program under the
-# same terms as Perl itself. If in doubt,
-# write to mjd-perl-memoize+ at plover.com for a license.
-#
-# Version 1.01 $Revision: 1.1.1.2 $ $Date: 2011-02-17 12:49:38 $
-
-package Memoize;
-$VERSION = '1.01_03';
-
-# Compile-time constants
-sub SCALAR () { 0 }
-sub LIST () { 1 }
-
-
-#
-# Usage memoize(functionname/ref,
-# { NORMALIZER => coderef, INSTALL => name,
-# LIST_CACHE => descriptor, SCALAR_CACHE => descriptor }
-#
-
-use Carp;
-use Exporter;
-use vars qw($DEBUG);
-use Config; # Dammit.
- at ISA = qw(Exporter);
- at EXPORT = qw(memoize);
- at EXPORT_OK = qw(unmemoize flush_cache);
-use strict;
-
-my %memotable;
-my %revmemotable;
-my @CONTEXT_TAGS = qw(MERGE TIE MEMORY FAULT HASH);
-my %IS_CACHE_TAG = map {($_ => 1)} @CONTEXT_TAGS;
-
-# Raise an error if the user tries to specify one of thesepackage as a
-# tie for LIST_CACHE
-
-my %scalar_only = map {($_ => 1)} qw(DB_File GDBM_File SDBM_File ODBM_File NDBM_File);
-
-sub memoize {
- my $fn = shift;
- my %options = @_;
- my $options = \%options;
-
- unless (defined($fn) &&
- (ref $fn eq 'CODE' || ref $fn eq '')) {
- croak "Usage: memoize 'functionname'|coderef {OPTIONS}";
- }
-
- my $uppack = caller; # TCL me Elmo!
- my $cref; # Code reference to original function
- my $name = (ref $fn ? undef : $fn);
-
- # Convert function names to code references
- $cref = &_make_cref($fn, $uppack);
-
- # Locate function prototype, if any
- my $proto = prototype $cref;
- if (defined $proto) { $proto = "($proto)" }
- else { $proto = "" }
-
- # I would like to get rid of the eval, but there seems not to be any
- # other way to set the prototype properly. The switch here for
- # 'usethreads' works around a bug in threadperl having to do with
- # magic goto. It would be better to fix the bug and use the magic
- # goto version everywhere.
- my $wrapper =
- $Config{usethreads}
- ? eval "sub $proto { &_memoizer(\$cref, \@_); }"
- : eval "sub $proto { unshift \@_, \$cref; goto &_memoizer; }";
-
- my $normalizer = $options{NORMALIZER};
- if (defined $normalizer && ! ref $normalizer) {
- $normalizer = _make_cref($normalizer, $uppack);
- }
-
- my $install_name;
- if (defined $options->{INSTALL}) {
- # INSTALL => name
- $install_name = $options->{INSTALL};
- } elsif (! exists $options->{INSTALL}) {
- # No INSTALL option provided; use original name if possible
- $install_name = $name;
- } else {
- # INSTALL => undef means don't install
- }
-
- if (defined $install_name) {
- $install_name = $uppack . '::' . $install_name
- unless $install_name =~ /::/;
- no strict;
- local($^W) = 0; # ``Subroutine $install_name redefined at ...''
- *{$install_name} = $wrapper; # Install memoized version
- }
-
- $revmemotable{$wrapper} = "" . $cref; # Turn code ref into hash key
-
- # These will be the caches
- my %caches;
- for my $context (qw(SCALAR LIST)) {
- # suppress subsequent 'uninitialized value' warnings
- $options{"${context}_CACHE"} ||= '';
-
- my $cache_opt = $options{"${context}_CACHE"};
- my @cache_opt_args;
- if (ref $cache_opt) {
- @cache_opt_args = @$cache_opt;
- $cache_opt = shift @cache_opt_args;
- }
- if ($cache_opt eq 'FAULT') { # no cache
- $caches{$context} = undef;
- } elsif ($cache_opt eq 'HASH') { # user-supplied hash
- my $cache = $cache_opt_args[0];
- my $package = ref(tied %$cache);
- if ($context eq 'LIST' && $scalar_only{$package}) {
- croak("You can't use $package for LIST_CACHE because it can only store scalars");
- }
- $caches{$context} = $cache;
- } elsif ($cache_opt eq '' || $IS_CACHE_TAG{$cache_opt}) {
- # default is that we make up an in-memory hash
- $caches{$context} = {};
- # (this might get tied later, or MERGEd away)
- } else {
- croak "Unrecognized option to `${context}_CACHE': `$cache_opt' should be one of (@CONTEXT_TAGS); aborting";
- }
- }
-
- # Perhaps I should check here that you didn't supply *both* merge
- # options. But if you did, it does do something reasonable: They
- # both get merged to the same in-memory hash.
- if ($options{SCALAR_CACHE} eq 'MERGE') {
- $caches{SCALAR} = $caches{LIST};
- } elsif ($options{LIST_CACHE} eq 'MERGE') {
- $caches{LIST} = $caches{SCALAR};
- }
-
- # Now deal with the TIE options
- {
- my $context;
- foreach $context (qw(SCALAR LIST)) {
- # If the relevant option wasn't `TIE', this call does nothing.
- _my_tie($context, $caches{$context}, $options); # Croaks on failure
- }
- }
-
- # We should put some more stuff in here eventually.
- # We've been saying that for serveral versions now.
- # And you know what? More stuff keeps going in!
- $memotable{$cref} =
- {
- O => $options, # Short keys here for things we need to access frequently
- N => $normalizer,
- U => $cref,
- MEMOIZED => $wrapper,
- PACKAGE => $uppack,
- NAME => $install_name,
- S => $caches{SCALAR},
- L => $caches{LIST},
- };
-
- $wrapper # Return just memoized version
-}
-
-# This function tries to load a tied hash class and tie the hash to it.
-sub _my_tie {
- my ($context, $hash, $options) = @_;
- my $fullopt = $options->{"${context}_CACHE"};
-
- # We already checked to make sure that this works.
- my $shortopt = (ref $fullopt) ? $fullopt->[0] : $fullopt;
-
- return unless defined $shortopt && $shortopt eq 'TIE';
- carp("TIE option to memoize() is deprecated; use HASH instead")
- if $^W;
-
- my @args = ref $fullopt ? @$fullopt : ();
- shift @args;
- my $module = shift @args;
- if ($context eq 'LIST' && $scalar_only{$module}) {
- croak("You can't use $module for LIST_CACHE because it can only store scalars");
- }
- my $modulefile = $module . '.pm';
- $modulefile =~ s{::}{/}g;
- eval { require $modulefile };
- if ($@) {
- croak "Memoize: Couldn't load hash tie module `$module': $@; aborting";
- }
- my $rc = (tie %$hash => $module, @args);
- unless ($rc) {
- croak "Memoize: Couldn't tie hash to `$module': $!; aborting";
- }
- 1;
-}
-
-sub flush_cache {
- my $func = _make_cref($_[0], scalar caller);
- my $info = $memotable{$revmemotable{$func}};
- die "$func not memoized" unless defined $info;
- for my $context (qw(S L)) {
- my $cache = $info->{$context};
- if (tied %$cache && ! (tied %$cache)->can('CLEAR')) {
- my $funcname = defined($info->{NAME}) ?
- "function $info->{NAME}" : "anonymous function $func";
- my $context = {S => 'scalar', L => 'list'}->{$context};
- croak "Tied cache hash for $context-context $funcname does not support flushing";
- } else {
- %$cache = ();
- }
- }
-}
-
-# This is the function that manages the memo tables.
-sub _memoizer {
- my $orig = shift; # stringized version of ref to original func.
- my $info = $memotable{$orig};
- my $normalizer = $info->{N};
-
- my $argstr;
- my $context = (wantarray() ? LIST : SCALAR);
-
- if (defined $normalizer) {
- no strict;
- if ($context == SCALAR) {
- $argstr = &{$normalizer}(@_);
- } elsif ($context == LIST) {
- ($argstr) = &{$normalizer}(@_);
- } else {
- croak "Internal error \#41; context was neither LIST nor SCALAR\n";
- }
- } else { # Default normalizer
- local $^W = 0;
- $argstr = join chr(28), at _;
- }
-
- if ($context == SCALAR) {
- my $cache = $info->{S};
- _crap_out($info->{NAME}, 'scalar') unless $cache;
- if (exists $cache->{$argstr}) {
- return $cache->{$argstr};
- } else {
- my $val = &{$info->{U}}(@_);
- # Scalars are considered to be lists; store appropriately
- if ($info->{O}{SCALAR_CACHE} eq 'MERGE') {
- $cache->{$argstr} = [$val];
- } else {
- $cache->{$argstr} = $val;
- }
- $val;
- }
- } elsif ($context == LIST) {
- my $cache = $info->{L};
- _crap_out($info->{NAME}, 'list') unless $cache;
- if (exists $cache->{$argstr}) {
- my $val = $cache->{$argstr};
- # If LISTCONTEXT=>MERGE, then the function never returns lists,
- # so we have a scalar value cached, so just return it straightaway:
- return ($val) if $info->{O}{LIST_CACHE} eq 'MERGE';
- # Maybe in a later version we can use a faster test.
-
- # Otherwise, we cached an array containing the returned list:
- return @$val;
- } else {
- my @q = &{$info->{U}}(@_);
- $cache->{$argstr} = $info->{O}{LIST_CACHE} eq 'MERGE' ? $q [0] : \@q;
- @q;
- }
- } else {
- croak "Internal error \#42; context was neither LIST nor SCALAR\n";
- }
-}
-
-sub unmemoize {
- my $f = shift;
- my $uppack = caller;
- my $cref = _make_cref($f, $uppack);
-
- unless (exists $revmemotable{$cref}) {
- croak "Could not unmemoize function `$f', because it was not memoized to begin with";
- }
-
- my $tabent = $memotable{$revmemotable{$cref}};
- unless (defined $tabent) {
- croak "Could not figure out how to unmemoize function `$f'";
- }
- my $name = $tabent->{NAME};
- if (defined $name) {
- no strict;
- local($^W) = 0; # ``Subroutine $install_name redefined at ...''
- *{$name} = $tabent->{U}; # Replace with original function
- }
- undef $memotable{$revmemotable{$cref}};
- undef $revmemotable{$cref};
-
- # This removes the last reference to the (possibly tied) memo tables
- # my ($old_function, $memotabs) = @{$tabent}{'U','S','L'};
- # undef $tabent;
-
-# # Untie the memo tables if they were tied.
-# my $i;
-# for $i (0,1) {
-# if (tied %{$memotabs->[$i]}) {
-# warn "Untying hash #$i\n";
-# untie %{$memotabs->[$i]};
-# }
-# }
-
- $tabent->{U};
-}
-
-sub _make_cref {
- my $fn = shift;
- my $uppack = shift;
- my $cref;
- my $name;
-
- if (ref $fn eq 'CODE') {
- $cref = $fn;
- } elsif (! ref $fn) {
- if ($fn =~ /::/) {
- $name = $fn;
- } else {
- $name = $uppack . '::' . $fn;
- }
- no strict;
- if (defined $name and !defined(&$name)) {
- croak "Cannot operate on nonexistent function `$fn'";
- }
-# $cref = \&$name;
- $cref = *{$name}{CODE};
- } else {
- my $parent = (caller(1))[3]; # Function that called _make_cref
- croak "Usage: argument 1 to `$parent' must be a function name or reference.\n";
- }
- $DEBUG and warn "${name}($fn) => $cref in _make_cref\n";
- $cref;
-}
-
-sub _crap_out {
- my ($funcname, $context) = @_;
- if (defined $funcname) {
- croak "Function `$funcname' called in forbidden $context context; faulting";
- } else {
- croak "Anonymous function called in forbidden $context context; faulting";
- }
-}
-
-1;
-
-
-
-
-
-=head1 NAME
-
-Memoize - Make functions faster by trading space for time
-
-=head1 SYNOPSIS
-
- # This is the documentation for Memoize 1.01
- use Memoize;
- memoize('slow_function');
- slow_function(arguments); # Is faster than it was before
-
-
-This is normally all you need to know. However, many options are available:
-
- memoize(function, options...);
-
-Options include:
-
- NORMALIZER => function
- INSTALL => new_name
-
- SCALAR_CACHE => 'MEMORY'
- SCALAR_CACHE => ['HASH', \%cache_hash ]
- SCALAR_CACHE => 'FAULT'
- SCALAR_CACHE => 'MERGE'
-
- LIST_CACHE => 'MEMORY'
- LIST_CACHE => ['HASH', \%cache_hash ]
- LIST_CACHE => 'FAULT'
- LIST_CACHE => 'MERGE'
-
-=head1 DESCRIPTION
-
-`Memoizing' a function makes it faster by trading space for time. It
-does this by caching the return values of the function in a table.
-If you call the function again with the same arguments, C<memoize>
-jumps in and gives you the value out of the table, instead of letting
-the function compute the value all over again.
-
-Here is an extreme example. Consider the Fibonacci sequence, defined
-by the following function:
-
- # Compute Fibonacci numbers
- sub fib {
- my $n = shift;
- return $n if $n < 2;
- fib($n-1) + fib($n-2);
- }
-
-This function is very slow. Why? To compute fib(14), it first wants
-to compute fib(13) and fib(12), and add the results. But to compute
-fib(13), it first has to compute fib(12) and fib(11), and then it
-comes back and computes fib(12) all over again even though the answer
-is the same. And both of the times that it wants to compute fib(12),
-it has to compute fib(11) from scratch, and then it has to do it
-again each time it wants to compute fib(13). This function does so
-much recomputing of old results that it takes a really long time to
-run---fib(14) makes 1,200 extra recursive calls to itself, to compute
-and recompute things that it already computed.
-
-This function is a good candidate for memoization. If you memoize the
-`fib' function above, it will compute fib(14) exactly once, the first
-time it needs to, and then save the result in a table. Then if you
-ask for fib(14) again, it gives you the result out of the table.
-While computing fib(14), instead of computing fib(12) twice, it does
-it once; the second time it needs the value it gets it from the table.
-It doesn't compute fib(11) four times; it computes it once, getting it
-from the table the next three times. Instead of making 1,200
-recursive calls to `fib', it makes 15. This makes the function about
-150 times faster.
-
-You could do the memoization yourself, by rewriting the function, like
-this:
-
- # Compute Fibonacci numbers, memoized version
- { my @fib;
- sub fib {
- my $n = shift;
- return $fib[$n] if defined $fib[$n];
- return $fib[$n] = $n if $n < 2;
- $fib[$n] = fib($n-1) + fib($n-2);
- }
- }
-
-Or you could use this module, like this:
-
- use Memoize;
- memoize('fib');
-
- # Rest of the fib function just like the original version.
-
-This makes it easy to turn memoizing on and off.
-
-Here's an even simpler example: I wrote a simple ray tracer; the
-program would look in a certain direction, figure out what it was
-looking at, and then convert the `color' value (typically a string
-like `red') of that object to a red, green, and blue pixel value, like
-this:
-
- for ($direction = 0; $direction < 300; $direction++) {
- # Figure out which object is in direction $direction
- $color = $object->{color};
- ($r, $g, $b) = @{&ColorToRGB($color)};
- ...
- }
-
-Since there are relatively few objects in a picture, there are only a
-few colors, which get looked up over and over again. Memoizing
-C<ColorToRGB> sped up the program by several percent.
-
-=head1 DETAILS
-
-This module exports exactly one function, C<memoize>. The rest of the
-functions in this package are None of Your Business.
-
-You should say
-
- memoize(function)
-
-where C<function> is the name of the function you want to memoize, or
-a reference to it. C<memoize> returns a reference to the new,
-memoized version of the function, or C<undef> on a non-fatal error.
-At present, there are no non-fatal errors, but there might be some in
-the future.
-
-If C<function> was the name of a function, then C<memoize> hides the
-old version and installs the new memoized version under the old name,
-so that C<&function(...)> actually invokes the memoized version.
-
-=head1 OPTIONS
-
-There are some optional options you can pass to C<memoize> to change
-the way it behaves a little. To supply options, invoke C<memoize>
-like this:
-
- memoize(function, NORMALIZER => function,
- INSTALL => newname,
- SCALAR_CACHE => option,
- LIST_CACHE => option
- );
-
-Each of these options is optional; you can include some, all, or none
-of them.
-
-=head2 INSTALL
-
-If you supply a function name with C<INSTALL>, memoize will install
-the new, memoized version of the function under the name you give.
-For example,
-
- memoize('fib', INSTALL => 'fastfib')
-
-installs the memoized version of C<fib> as C<fastfib>; without the
-C<INSTALL> option it would have replaced the old C<fib> with the
-memoized version.
-
-To prevent C<memoize> from installing the memoized version anywhere, use
-C<INSTALL =E<gt> undef>.
-
-=head2 NORMALIZER
-
-Suppose your function looks like this:
-
- # Typical call: f('aha!', A => 11, B => 12);
- sub f {
- my $a = shift;
- my %hash = @_;
- $hash{B} ||= 2; # B defaults to 2
- $hash{C} ||= 7; # C defaults to 7
-
- # Do something with $a, %hash
- }
-
-Now, the following calls to your function are all completely equivalent:
-
- f(OUCH);
- f(OUCH, B => 2);
- f(OUCH, C => 7);
- f(OUCH, B => 2, C => 7);
- f(OUCH, C => 7, B => 2);
- (etc.)
-
-However, unless you tell C<Memoize> that these calls are equivalent,
-it will not know that, and it will compute the values for these
-invocations of your function separately, and store them separately.
-
-To prevent this, supply a C<NORMALIZER> function that turns the
-program arguments into a string in a way that equivalent arguments
-turn into the same string. A C<NORMALIZER> function for C<f> above
-might look like this:
-
- sub normalize_f {
- my $a = shift;
- my %hash = @_;
- $hash{B} ||= 2;
- $hash{C} ||= 7;
-
- join(',', $a, map ($_ => $hash{$_}) sort keys %hash);
- }
-
-Each of the argument lists above comes out of the C<normalize_f>
-function looking exactly the same, like this:
-
- OUCH,B,2,C,7
-
-You would tell C<Memoize> to use this normalizer this way:
-
- memoize('f', NORMALIZER => 'normalize_f');
-
-C<memoize> knows that if the normalized version of the arguments is
-the same for two argument lists, then it can safely look up the value
-that it computed for one argument list and return it as the result of
-calling the function with the other argument list, even if the
-argument lists look different.
-
-The default normalizer just concatenates the arguments with character
-28 in between. (In ASCII, this is called FS or control-\.) This
-always works correctly for functions with only one string argument,
-and also when the arguments never contain character 28. However, it
-can confuse certain argument lists:
-
- normalizer("a\034", "b")
- normalizer("a", "\034b")
- normalizer("a\034\034b")
-
-for example.
-
-Since hash keys are strings, the default normalizer will not
-distinguish between C<undef> and the empty string. It also won't work
-when the function's arguments are references. For example, consider a
-function C<g> which gets two arguments: A number, and a reference to
-an array of numbers:
-
- g(13, [1,2,3,4,5,6,7]);
-
-The default normalizer will turn this into something like
-C<"13\034ARRAY(0x436c1f)">. That would be all right, except that a
-subsequent array of numbers might be stored at a different location
-even though it contains the same data. If this happens, C<Memoize>
-will think that the arguments are different, even though they are
-equivalent. In this case, a normalizer like this is appropriate:
-
- sub normalize { join ' ', $_[0], @{$_[1]} }
-
-For the example above, this produces the key "13 1 2 3 4 5 6 7".
-
-Another use for normalizers is when the function depends on data other
-than those in its arguments. Suppose you have a function which
-returns a value which depends on the current hour of the day:
-
- sub on_duty {
- my ($problem_type) = @_;
- my $hour = (localtime)[2];
- open my $fh, "$DIR/$problem_type" or die...;
- my $line;
- while ($hour-- > 0)
- $line = <$fh>;
- }
- return $line;
- }
-
-At 10:23, this function generates the 10th line of a data file; at
-3:45 PM it generates the 15th line instead. By default, C<Memoize>
-will only see the $problem_type argument. To fix this, include the
-current hour in the normalizer:
-
- sub normalize { join ' ', (localtime)[2], @_ }
-
-The calling context of the function (scalar or list context) is
-propagated to the normalizer. This means that if the memoized
-function will treat its arguments differently in list context than it
-would in scalar context, you can have the normalizer function select
-its behavior based on the results of C<wantarray>. Even if called in
-a list context, a normalizer should still return a single string.
-
-=head2 C<SCALAR_CACHE>, C<LIST_CACHE>
-
-Normally, C<Memoize> caches your function's return values into an
-ordinary Perl hash variable. However, you might like to have the
-values cached on the disk, so that they persist from one run of your
-program to the next, or you might like to associate some other
-interesting semantics with the cached values.
-
-There's a slight complication under the hood of C<Memoize>: There are
-actually I<two> caches, one for scalar values and one for list values.
-When your function is called in scalar context, its return value is
-cached in one hash, and when your function is called in list context,
-its value is cached in the other hash. You can control the caching
-behavior of both contexts independently with these options.
-
-The argument to C<LIST_CACHE> or C<SCALAR_CACHE> must either be one of
-the following four strings:
-
- MEMORY
- FAULT
- MERGE
- HASH
-
-or else it must be a reference to a list whose first element is one of
-these four strings, such as C<[HASH, arguments...]>.
-
-=over 4
-
-=item C<MEMORY>
-
-C<MEMORY> means that return values from the function will be cached in
-an ordinary Perl hash variable. The hash variable will not persist
-after the program exits. This is the default.
-
-=item C<HASH>
-
-C<HASH> allows you to specify that a particular hash that you supply
-will be used as the cache. You can tie this hash beforehand to give
-it any behavior you want.
-
-A tied hash can have any semantics at all. It is typically tied to an
-on-disk database, so that cached values are stored in the database and
-retrieved from it again when needed, and the disk file typically
-persists after your program has exited. See C<perltie> for more
-complete details about C<tie>.
-
-A typical example is:
-
- use DB_File;
- tie my %cache => 'DB_File', $filename, O_RDWR|O_CREAT, 0666;
- memoize 'function', SCALAR_CACHE => [HASH => \%cache];
-
-This has the effect of storing the cache in a C<DB_File> database
-whose name is in C<$filename>. The cache will persist after the
-program has exited. Next time the program runs, it will find the
-cache already populated from the previous run of the program. Or you
-can forcibly populate the cache by constructing a batch program that
-runs in the background and populates the cache file. Then when you
-come to run your real program the memoized function will be fast
-because all its results have been precomputed.
-
-=item C<TIE>
-
-This option is no longer supported. It is still documented only to
-aid in the debugging of old programs that use it. Old programs should
-be converted to use the C<HASH> option instead.
-
- memoize ... [TIE, PACKAGE, ARGS...]
-
-is merely a shortcut for
-
- require PACKAGE;
- { my %cache;
- tie %cache, PACKAGE, ARGS...;
- }
- memoize ... [HASH => \%cache];
-
-=item C<FAULT>
-
-C<FAULT> means that you never expect to call the function in scalar
-(or list) context, and that if C<Memoize> detects such a call, it
-should abort the program. The error message is one of
-
- `foo' function called in forbidden list context at line ...
- `foo' function called in forbidden scalar context at line ...
-
-=item C<MERGE>
-
-C<MERGE> normally means the function does not distinguish between list
-and sclar context, and that return values in both contexts should be
-stored together. C<LIST_CACHE =E<gt> MERGE> means that list context
-return values should be stored in the same hash that is used for
-scalar context returns, and C<SCALAR_CACHE =E<gt> MERGE> means the
-same, mutatis mutandis. It is an error to specify C<MERGE> for both,
-but it probably does something useful.
-
-Consider this function:
-
- sub pi { 3; }
-
-Normally, the following code will result in two calls to C<pi>:
-
- $x = pi();
- ($y) = pi();
- $z = pi();
-
-The first call caches the value C<3> in the scalar cache; the second
-caches the list C<(3)> in the list cache. The third call doesn't call
-the real C<pi> function; it gets the value from the scalar cache.
-
-Obviously, the second call to C<pi> is a waste of time, and storing
-its return value is a waste of space. Specifying C<LIST_CACHE =E<gt>
-MERGE> will make C<memoize> use the same cache for scalar and list
-context return values, so that the second call uses the scalar cache
-that was populated by the first call. C<pi> ends up being called only
-once, and both subsequent calls return C<3> from the cache, regardless
-of the calling context.
-
-Another use for C<MERGE> is when you want both kinds of return values
-stored in the same disk file; this saves you from having to deal with
-two disk files instead of one. You can use a normalizer function to
-keep the two sets of return values separate. For example:
-
- tie my %cache => 'MLDBM', 'DB_File', $filename, ...;
-
- memoize 'myfunc',
- NORMALIZER => 'n',
- SCALAR_CACHE => [HASH => \%cache],
- LIST_CACHE => MERGE,
- ;
-
- sub n {
- my $context = wantarray() ? 'L' : 'S';
- # ... now compute the hash key from the arguments ...
- $hashkey = "$context:$hashkey";
- }
-
-This normalizer function will store scalar context return values in
-the disk file under keys that begin with C<S:>, and list context
-return values under keys that begin with C<L:>.
-
-=back
-
-=head1 OTHER FACILITIES
-
-=head2 C<unmemoize>
-
-There's an C<unmemoize> function that you can import if you want to.
-Why would you want to? Here's an example: Suppose you have your cache
-tied to a DBM file, and you want to make sure that the cache is
-written out to disk if someone interrupts the program. If the program
-exits normally, this will happen anyway, but if someone types
-control-C or something then the program will terminate immediately
-without synchronizing the database. So what you can do instead is
-
- $SIG{INT} = sub { unmemoize 'function' };
-
-C<unmemoize> accepts a reference to, or the name of a previously
-memoized function, and undoes whatever it did to provide the memoized
-version in the first place, including making the name refer to the
-unmemoized version if appropriate. It returns a reference to the
-unmemoized version of the function.
-
-If you ask it to unmemoize a function that was never memoized, it
-croaks.
-
-=head2 C<flush_cache>
-
-C<flush_cache(function)> will flush out the caches, discarding I<all>
-the cached data. The argument may be a function name or a reference
-to a function. For finer control over when data is discarded or
-expired, see the documentation for C<Memoize::Expire>, included in
-this package.
-
-Note that if the cache is a tied hash, C<flush_cache> will attempt to
-invoke the C<CLEAR> method on the hash. If there is no C<CLEAR>
-method, this will cause a run-time error.
-
-An alternative approach to cache flushing is to use the C<HASH> option
-(see above) to request that C<Memoize> use a particular hash variable
-as its cache. Then you can examine or modify the hash at any time in
-any way you desire. You may flush the cache by using C<%hash = ()>.
-
-=head1 CAVEATS
-
-Memoization is not a cure-all:
-
-=over 4
-
-=item *
-
-Do not memoize a function whose behavior depends on program
-state other than its own arguments, such as global variables, the time
-of day, or file input. These functions will not produce correct
-results when memoized. For a particularly easy example:
-
- sub f {
- time;
- }
-
-This function takes no arguments, and as far as C<Memoize> is
-concerned, it always returns the same result. C<Memoize> is wrong, of
-course, and the memoized version of this function will call C<time> once
-to get the current time, and it will return that same time
-every time you call it after that.
-
-=item *
-
-Do not memoize a function with side effects.
-
- sub f {
- my ($a, $b) = @_;
- my $s = $a + $b;
- print "$a + $b = $s.\n";
- }
-
-This function accepts two arguments, adds them, and prints their sum.
-Its return value is the numuber of characters it printed, but you
-probably didn't care about that. But C<Memoize> doesn't understand
-that. If you memoize this function, you will get the result you
-expect the first time you ask it to print the sum of 2 and 3, but
-subsequent calls will return 1 (the return value of
-C<print>) without actually printing anything.
-
-=item *
-
-Do not memoize a function that returns a data structure that is
-modified by its caller.
-
-Consider these functions: C<getusers> returns a list of users somehow,
-and then C<main> throws away the first user on the list and prints the
-rest:
-
- sub main {
- my $userlist = getusers();
- shift @$userlist;
- foreach $u (@$userlist) {
- print "User $u\n";
- }
- }
-
- sub getusers {
- my @users;
- # Do something to get a list of users;
- \@users; # Return reference to list.
- }
-
-If you memoize C<getusers> here, it will work right exactly once. The
-reference to the users list will be stored in the memo table. C<main>
-will discard the first element from the referenced list. The next
-time you invoke C<main>, C<Memoize> will not call C<getusers>; it will
-just return the same reference to the same list it got last time. But
-this time the list has already had its head removed; C<main> will
-erroneously remove another element from it. The list will get shorter
-and shorter every time you call C<main>.
-
-Similarly, this:
-
- $u1 = getusers();
- $u2 = getusers();
- pop @$u1;
-
-will modify $u2 as well as $u1, because both variables are references
-to the same array. Had C<getusers> not been memoized, $u1 and $u2
-would have referred to different arrays.
-
-=item *
-
-Do not memoize a very simple function.
-
-Recently someone mentioned to me that the Memoize module made his
-program run slower instead of faster. It turned out that he was
-memoizing the following function:
-
- sub square {
- $_[0] * $_[0];
- }
-
-I pointed out that C<Memoize> uses a hash, and that looking up a
-number in the hash is necessarily going to take a lot longer than a
-single multiplication. There really is no way to speed up the
-C<square> function.
-
-Memoization is not magical.
-
-=back
-
-=head1 PERSISTENT CACHE SUPPORT
-
-You can tie the cache tables to any sort of tied hash that you want
-to, as long as it supports C<TIEHASH>, C<FETCH>, C<STORE>, and
-C<EXISTS>. For example,
-
- tie my %cache => 'GDBM_File', $filename, O_RDWR|O_CREAT, 0666;
- memoize 'function', SCALAR_CACHE => [HASH => \%cache];
-
-works just fine. For some storage methods, you need a little glue.
-
-C<SDBM_File> doesn't supply an C<EXISTS> method, so included in this
-package is a glue module called C<Memoize::SDBM_File> which does
-provide one. Use this instead of plain C<SDBM_File> to store your
-cache table on disk in an C<SDBM_File> database:
-
- tie my %cache => 'Memoize::SDBM_File', $filename, O_RDWR|O_CREAT, 0666;
- memoize 'function', SCALAR_CACHE => [HASH => \%cache];
-
-C<NDBM_File> has the same problem and the same solution. (Use
-C<Memoize::NDBM_File instead of plain NDBM_File.>)
-
-C<Storable> isn't a tied hash class at all. You can use it to store a
-hash to disk and retrieve it again, but you can't modify the hash while
-it's on the disk. So if you want to store your cache table in a
-C<Storable> database, use C<Memoize::Storable>, which puts a hashlike
-front-end onto C<Storable>. The hash table is actually kept in
-memory, and is loaded from your C<Storable> file at the time you
-memoize the function, and stored back at the time you unmemoize the
-function (or when your program exits):
-
- tie my %cache => 'Memoize::Storable', $filename;
- memoize 'function', SCALAR_CACHE => [HASH => \%cache];
-
- tie my %cache => 'Memoize::Storable', $filename, 'nstore';
- memoize 'function', SCALAR_CACHE => [HASH => \%cache];
-
-Include the `nstore' option to have the C<Storable> database written
-in `network order'. (See L<Storable> for more details about this.)
-
-The C<flush_cache()> function will raise a run-time error unless the
-tied package provides a C<CLEAR> method.
-
-=head1 EXPIRATION SUPPORT
-
-See Memoize::Expire, which is a plug-in module that adds expiration
-functionality to Memoize. If you don't like the kinds of policies
-that Memoize::Expire implements, it is easy to write your own plug-in
-module to implement whatever policy you desire. Memoize comes with
-several examples. An expiration manager that implements a LRU policy
-is available on CPAN as Memoize::ExpireLRU.
-
-=head1 BUGS
-
-The test suite is much better, but always needs improvement.
-
-There is some problem with the way C<goto &f> works under threaded
-Perl, perhaps because of the lexical scoping of C<@_>. This is a bug
-in Perl, and until it is resolved, memoized functions will see a
-slightly different C<caller()> and will perform a little more slowly
-on threaded perls than unthreaded perls.
-
-Some versions of C<DB_File> won't let you store data under a key of
-length 0. That means that if you have a function C<f> which you
-memoized and the cache is in a C<DB_File> database, then the value of
-C<f()> (C<f> called with no arguments) will not be memoized. If this
-is a big problem, you can supply a normalizer function that prepends
-C<"x"> to every key.
-
-=head1 MAILING LIST
-
-To join a very low-traffic mailing list for announcements about
-C<Memoize>, send an empty note to C<mjd-perl-memoize-request at plover.com>.
-
-=head1 AUTHOR
-
-Mark-Jason Dominus (C<mjd-perl-memoize+ at plover.com>), Plover Systems co.
-
-See the C<Memoize.pm> Page at http://www.plover.com/~mjd/perl/Memoize/
-for news and upgrades. Near this page, at
-http://www.plover.com/~mjd/perl/MiniMemoize/ there is an article about
-memoization and about the internals of Memoize that appeared in The
-Perl Journal, issue #13. (This article is also included in the
-Memoize distribution as `article.html'.)
-
-The author's book I<Higher Order Perl> (2005, ISBN 1558607013, published
-by Morgan Kaufmann) discusses memoization (and many other fascinating
-topics) in tremendous detail. It will also be available on-line for free.
-For more information, visit http://perl.plover.com/book/ .
-
-To join a mailing list for announcements about C<Memoize>, send an
-empty message to C<mjd-perl-memoize-request at plover.com>. This mailing
-list is for announcements only and has extremely low traffic---about
-two messages per year.
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 1998, 1999, 2000, 2001 by Mark Jason Dominus
-
-This library is free software; you may redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=head1 THANK YOU
-
-Many thanks to Jonathan Roy for bug reports and suggestions, to
-Michael Schwern for other bug reports and patches, to Mike Cariaso for
-helping me to figure out the Right Thing to Do About Expiration, to
-Joshua Gerth, Joshua Chamas, Jonathan Roy (again), Mark D. Anderson,
-and Andrew Johnson for more suggestions about expiration, to Brent
-Powers for the Memoize::ExpireLRU module, to Ariel Scolnicov for
-delightful messages about the Fibonacci function, to Dion Almaer for
-thought-provoking suggestions about the default normalizer, to Walt
-Mankowski and Kurt Starsinic for much help investigating problems
-under threaded Perl, to Alex Dudkevich for reporting the bug in
-prototyped functions and for checking my patch, to Tony Bass for many
-helpful suggestions, to Jonathan Roy (again) for finding a use for
-C<unmemoize()>, to Philippe Verdret for enlightening discussion of
-C<Hook::PrePostCall>, to Nat Torkington for advice I ignored, to Chris
-Nandor for portability advice, to Randal Schwartz for suggesting the
-'C<flush_cache> function, and to Jenda Krynicky for being a light in
-the world.
-
-Special thanks to Jarkko Hietaniemi, the 5.8.0 pumpking, for including
-this module in the core and for his patient and helpful guidance
-during the integration process.
-
-=cut
Deleted: vendor/perl/dist/lib/NEXT.pm
===================================================================
--- vendor/perl/dist/lib/NEXT.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/NEXT.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,563 +0,0 @@
-package NEXT;
-$VERSION = '0.64';
-use Carp;
-use strict;
-use overload ();
-
-sub NEXT::ELSEWHERE::ancestors
-{
- my @inlist = shift;
- my @outlist = ();
- while (my $next = shift @inlist) {
- push @outlist, $next;
- no strict 'refs';
- unshift @inlist, @{"$outlist[-1]::ISA"};
- }
- return @outlist;
-}
-
-sub NEXT::ELSEWHERE::ordered_ancestors
-{
- my @inlist = shift;
- my @outlist = ();
- while (my $next = shift @inlist) {
- push @outlist, $next;
- no strict 'refs';
- push @inlist, @{"$outlist[-1]::ISA"};
- }
- return sort { $a->isa($b) ? -1
- : $b->isa($a) ? +1
- : 0 } @outlist;
-}
-
-sub NEXT::ELSEWHERE::buildAUTOLOAD
-{
- my $autoload_name = caller() . '::AUTOLOAD';
-
- no strict 'refs';
- *{$autoload_name} = sub {
- my ($self) = @_;
- my $depth = 1;
- until (((caller($depth))[3]||q{}) !~ /^\(eval\)$/) { $depth++ }
- my $caller = (caller($depth))[3];
- my $wanted = $NEXT::AUTOLOAD || $autoload_name;
- undef $NEXT::AUTOLOAD;
- my ($caller_class, $caller_method) = do { $caller =~ m{(.*)::(.*)}g };
- my ($wanted_class, $wanted_method) = do { $wanted =~ m{(.*)::(.*)}g };
- croak "Can't call $wanted from $caller"
- unless $caller_method eq $wanted_method;
-
- my $key = ref $self && overload::Overloaded($self)
- ? overload::StrVal($self) : $self;
-
- local ($NEXT::NEXT{$key,$wanted_method}, $NEXT::SEEN) =
- ($NEXT::NEXT{$key,$wanted_method}, $NEXT::SEEN);
-
- unless ($NEXT::NEXT{$key,$wanted_method}) {
- my @forebears =
- NEXT::ELSEWHERE::ancestors ref $self || $self,
- $wanted_class;
- while (@forebears) {
- last if shift @forebears eq $caller_class
- }
- no strict 'refs';
- @{$NEXT::NEXT{$key,$wanted_method}} =
- map {
- my $stash = \%{"${_}::"};
- ($stash->{$caller_method} && (*{$stash->{$caller_method}}{CODE}))
- ? *{$stash->{$caller_method}}{CODE}
- : () } @forebears
- unless $wanted_method eq 'AUTOLOAD';
- @{$NEXT::NEXT{$key,$wanted_method}} =
- map {
- my $stash = \%{"${_}::"};
- ($stash->{AUTOLOAD} && (*{$stash->{AUTOLOAD}}{CODE}))
- ? "${_}::AUTOLOAD"
- : () } @forebears
- unless @{$NEXT::NEXT{$key,$wanted_method}||[]};
- $NEXT::SEEN->{$key,*{$caller}{CODE}}++;
- }
- my $call_method = shift @{$NEXT::NEXT{$key,$wanted_method}};
- while (do { $wanted_class =~ /^NEXT\b.*\b(UNSEEN|DISTINCT)\b/ }
- && defined $call_method
- && $NEXT::SEEN->{$key,$call_method}++) {
- $call_method = shift @{$NEXT::NEXT{$key,$wanted_method}};
- }
- unless (defined $call_method) {
- return unless do { $wanted_class =~ /^NEXT:.*:ACTUAL/ };
- (local $Carp::CarpLevel)++;
- croak qq(Can't locate object method "$wanted_method" ),
- qq(via package "$caller_class");
- };
- return $self->$call_method(@_[1..$#_]) if ref $call_method eq 'CODE';
- no strict 'refs';
- do { ($wanted_method=${$caller_class."::AUTOLOAD"}) =~ s/.*::// }
- if $wanted_method eq 'AUTOLOAD';
- $$call_method = $caller_class."::NEXT::".$wanted_method;
- return $call_method->(@_);
- };
-}
-
-no strict 'vars';
-package NEXT; NEXT::ELSEWHERE::buildAUTOLOAD();
-package NEXT::UNSEEN; @ISA = 'NEXT'; NEXT::ELSEWHERE::buildAUTOLOAD();
-package NEXT::DISTINCT; @ISA = 'NEXT'; NEXT::ELSEWHERE::buildAUTOLOAD();
-package NEXT::ACTUAL; @ISA = 'NEXT'; NEXT::ELSEWHERE::buildAUTOLOAD();
-package NEXT::ACTUAL::UNSEEN; @ISA = 'NEXT'; NEXT::ELSEWHERE::buildAUTOLOAD();
-package NEXT::ACTUAL::DISTINCT; @ISA = 'NEXT'; NEXT::ELSEWHERE::buildAUTOLOAD();
-package NEXT::UNSEEN::ACTUAL; @ISA = 'NEXT'; NEXT::ELSEWHERE::buildAUTOLOAD();
-package NEXT::DISTINCT::ACTUAL; @ISA = 'NEXT'; NEXT::ELSEWHERE::buildAUTOLOAD();
-
-package EVERY;
-
-sub EVERY::ELSEWHERE::buildAUTOLOAD {
- my $autoload_name = caller() . '::AUTOLOAD';
-
- no strict 'refs';
- *{$autoload_name} = sub {
- my ($self) = @_;
- my $depth = 1;
- until (((caller($depth))[3]||q{}) !~ /^\(eval\)$/) { $depth++ }
- my $caller = (caller($depth))[3];
- my $wanted = $EVERY::AUTOLOAD || $autoload_name;
- undef $EVERY::AUTOLOAD;
- my ($wanted_class, $wanted_method) = do { $wanted =~ m{(.*)::(.*)}g };
-
- my $key = ref($self) && overload::Overloaded($self)
- ? overload::StrVal($self) : $self;
-
- local $NEXT::ALREADY_IN_EVERY{$key,$wanted_method} =
- $NEXT::ALREADY_IN_EVERY{$key,$wanted_method};
-
- return if $NEXT::ALREADY_IN_EVERY{$key,$wanted_method}++;
-
- my @forebears = NEXT::ELSEWHERE::ordered_ancestors ref $self || $self,
- $wanted_class;
- @forebears = reverse @forebears if do { $wanted_class =~ /\bLAST\b/ };
- no strict 'refs';
- my %seen;
- my @every = map { my $sub = "${_}::$wanted_method";
- !*{$sub}{CODE} || $seen{$sub}++ ? () : $sub
- } @forebears
- unless $wanted_method eq 'AUTOLOAD';
-
- my $want = wantarray;
- if (@every) {
- if ($want) {
- return map {($_, [$self->$_(@_[1..$#_])])} @every;
- }
- elsif (defined $want) {
- return { map {($_, scalar($self->$_(@_[1..$#_])))}
- @every
- };
- }
- else {
- $self->$_(@_[1..$#_]) for @every;
- return;
- }
- }
-
- @every = map { my $sub = "${_}::AUTOLOAD";
- !*{$sub}{CODE} || $seen{$sub}++ ? () : "${_}::AUTOLOAD"
- } @forebears;
- if ($want) {
- return map { $$_ = ref($self)."::EVERY::".$wanted_method;
- ($_, [$self->$_(@_[1..$#_])]);
- } @every;
- }
- elsif (defined $want) {
- return { map { $$_ = ref($self)."::EVERY::".$wanted_method;
- ($_, scalar($self->$_(@_[1..$#_])))
- } @every
- };
- }
- else {
- for (@every) {
- $$_ = ref($self)."::EVERY::".$wanted_method;
- $self->$_(@_[1..$#_]);
- }
- return;
- }
- };
-}
-
-package EVERY::LAST; @ISA = 'EVERY'; EVERY::ELSEWHERE::buildAUTOLOAD();
-package EVERY; @ISA = 'NEXT'; EVERY::ELSEWHERE::buildAUTOLOAD();
-
-1;
-
-__END__
-
-=head1 NAME
-
-NEXT.pm - Provide a pseudo-class NEXT (et al) that allows method redispatch
-
-
-=head1 SYNOPSIS
-
- use NEXT;
-
- package A;
- sub A::method { print "$_[0]: A method\n"; $_[0]->NEXT::method() }
- sub A::DESTROY { print "$_[0]: A dtor\n"; $_[0]->NEXT::DESTROY() }
-
- package B;
- use base qw( A );
- sub B::AUTOLOAD { print "$_[0]: B AUTOLOAD\n"; $_[0]->NEXT::AUTOLOAD() }
- sub B::DESTROY { print "$_[0]: B dtor\n"; $_[0]->NEXT::DESTROY() }
-
- package C;
- sub C::method { print "$_[0]: C method\n"; $_[0]->NEXT::method() }
- sub C::AUTOLOAD { print "$_[0]: C AUTOLOAD\n"; $_[0]->NEXT::AUTOLOAD() }
- sub C::DESTROY { print "$_[0]: C dtor\n"; $_[0]->NEXT::DESTROY() }
-
- package D;
- use base qw( B C );
- sub D::method { print "$_[0]: D method\n"; $_[0]->NEXT::method() }
- sub D::AUTOLOAD { print "$_[0]: D AUTOLOAD\n"; $_[0]->NEXT::AUTOLOAD() }
- sub D::DESTROY { print "$_[0]: D dtor\n"; $_[0]->NEXT::DESTROY() }
-
- package main;
-
- my $obj = bless {}, "D";
-
- $obj->method(); # Calls D::method, A::method, C::method
- $obj->missing_method(); # Calls D::AUTOLOAD, B::AUTOLOAD, C::AUTOLOAD
-
- # Clean-up calls D::DESTROY, B::DESTROY, A::DESTROY, C::DESTROY
-
-
-
-=head1 DESCRIPTION
-
-NEXT.pm adds a pseudoclass named C<NEXT> to any program
-that uses it. If a method C<m> calls C<$self-E<gt>NEXT::m()>, the call to
-C<m> is redispatched as if the calling method had not originally been found.
-
-In other words, a call to C<$self-E<gt>NEXT::m()> resumes the depth-first,
-left-to-right search of C<$self>'s class hierarchy that resulted in the
-original call to C<m>.
-
-Note that this is not the same thing as C<$self-E<gt>SUPER::m()>, which
-begins a new dispatch that is restricted to searching the ancestors
-of the current class. C<$self-E<gt>NEXT::m()> can backtrack
-past the current class -- to look for a suitable method in other
-ancestors of C<$self> -- whereas C<$self-E<gt>SUPER::m()> cannot.
-
-A typical use would be in the destructors of a class hierarchy,
-as illustrated in the synopsis above. Each class in the hierarchy
-has a DESTROY method that performs some class-specific action
-and then redispatches the call up the hierarchy. As a result,
-when an object of class D is destroyed, the destructors of I<all>
-its parent classes are called (in depth-first, left-to-right order).
-
-Another typical use of redispatch would be in C<AUTOLOAD>'ed methods.
-If such a method determined that it was not able to handle a
-particular call, it might choose to redispatch that call, in the
-hope that some other C<AUTOLOAD> (above it, or to its left) might
-do better.
-
-By default, if a redispatch attempt fails to find another method
-elsewhere in the objects class hierarchy, it quietly gives up and does
-nothing (but see L<"Enforcing redispatch">). This gracious acquiescence
-is also unlike the (generally annoying) behaviour of C<SUPER>, which
-throws an exception if it cannot redispatch.
-
-Note that it is a fatal error for any method (including C<AUTOLOAD>)
-to attempt to redispatch any method that does not have the
-same name. For example:
-
- sub D::oops { print "oops!\n"; $_[0]->NEXT::other_method() }
-
-
-=head2 Enforcing redispatch
-
-It is possible to make C<NEXT> redispatch more demandingly (i.e. like
-C<SUPER> does), so that the redispatch throws an exception if it cannot
-find a "next" method to call.
-
-To do this, simple invoke the redispatch as:
-
- $self->NEXT::ACTUAL::method();
-
-rather than:
-
- $self->NEXT::method();
-
-The C<ACTUAL> tells C<NEXT> that there must actually be a next method to call,
-or it should throw an exception.
-
-C<NEXT::ACTUAL> is most commonly used in C<AUTOLOAD> methods, as a means to
-decline an C<AUTOLOAD> request, but preserve the normal exception-on-failure
-semantics:
-
- sub AUTOLOAD {
- if ($AUTOLOAD =~ /foo|bar/) {
- # handle here
- }
- else { # try elsewhere
- shift()->NEXT::ACTUAL::AUTOLOAD(@_);
- }
- }
-
-By using C<NEXT::ACTUAL>, if there is no other C<AUTOLOAD> to handle the
-method call, an exception will be thrown (as usually happens in the absence of
-a suitable C<AUTOLOAD>).
-
-
-=head2 Avoiding repetitions
-
-If C<NEXT> redispatching is used in the methods of a "diamond" class hierarchy:
-
- # A B
- # / \ /
- # C D
- # \ /
- # E
-
- use NEXT;
-
- package A;
- sub foo { print "called A::foo\n"; shift->NEXT::foo() }
-
- package B;
- sub foo { print "called B::foo\n"; shift->NEXT::foo() }
-
- package C; @ISA = qw( A );
- sub foo { print "called C::foo\n"; shift->NEXT::foo() }
-
- package D; @ISA = qw(A B);
- sub foo { print "called D::foo\n"; shift->NEXT::foo() }
-
- package E; @ISA = qw(C D);
- sub foo { print "called E::foo\n"; shift->NEXT::foo() }
-
- E->foo();
-
-then derived classes may (re-)inherit base-class methods through two or
-more distinct paths (e.g. in the way C<E> inherits C<A::foo> twice --
-through C<C> and C<D>). In such cases, a sequence of C<NEXT> redispatches
-will invoke the multiply inherited method as many times as it is
-inherited. For example, the above code prints:
-
- called E::foo
- called C::foo
- called A::foo
- called D::foo
- called A::foo
- called B::foo
-
-(i.e. C<A::foo> is called twice).
-
-In some cases this I<may> be the desired effect within a diamond hierarchy,
-but in others (e.g. for destructors) it may be more appropriate to
-call each method only once during a sequence of redispatches.
-
-To cover such cases, you can redispatch methods via:
-
- $self->NEXT::DISTINCT::method();
-
-rather than:
-
- $self->NEXT::method();
-
-This causes the redispatcher to only visit each distinct C<method> method
-once. That is, to skip any classes in the hierarchy that it has
-already visited during redispatch. So, for example, if the
-previous example were rewritten:
-
- package A;
- sub foo { print "called A::foo\n"; shift->NEXT::DISTINCT::foo() }
-
- package B;
- sub foo { print "called B::foo\n"; shift->NEXT::DISTINCT::foo() }
-
- package C; @ISA = qw( A );
- sub foo { print "called C::foo\n"; shift->NEXT::DISTINCT::foo() }
-
- package D; @ISA = qw(A B);
- sub foo { print "called D::foo\n"; shift->NEXT::DISTINCT::foo() }
-
- package E; @ISA = qw(C D);
- sub foo { print "called E::foo\n"; shift->NEXT::DISTINCT::foo() }
-
- E->foo();
-
-then it would print:
-
- called E::foo
- called C::foo
- called A::foo
- called D::foo
- called B::foo
-
-and omit the second call to C<A::foo> (since it would not be distinct
-from the first call to C<A::foo>).
-
-Note that you can also use:
-
- $self->NEXT::DISTINCT::ACTUAL::method();
-
-or:
-
- $self->NEXT::ACTUAL::DISTINCT::method();
-
-to get both unique invocation I<and> exception-on-failure.
-
-Note that, for historical compatibility, you can also use
-C<NEXT::UNSEEN> instead of C<NEXT::DISTINCT>.
-
-
-=head2 Invoking all versions of a method with a single call
-
-Yet another pseudo-class that NEXT.pm provides is C<EVERY>.
-Its behaviour is considerably simpler than that of the C<NEXT> family.
-A call to:
-
- $obj->EVERY::foo();
-
-calls I<every> method named C<foo> that the object in C<$obj> has inherited.
-That is:
-
- use NEXT;
-
- package A; @ISA = qw(B D X);
- sub foo { print "A::foo " }
-
- package B; @ISA = qw(D X);
- sub foo { print "B::foo " }
-
- package X; @ISA = qw(D);
- sub foo { print "X::foo " }
-
- package D;
- sub foo { print "D::foo " }
-
- package main;
-
- my $obj = bless {}, 'A';
- $obj->EVERY::foo(); # prints" A::foo B::foo X::foo D::foo
-
-Prefixing a method call with C<EVERY::> causes every method in the
-object's hierarchy with that name to be invoked. As the above example
-illustrates, they are not called in Perl's usual "left-most-depth-first"
-order. Instead, they are called "breadth-first-dependency-wise".
-
-That means that the inheritance tree of the object is traversed breadth-first
-and the resulting order of classes is used as the sequence in which methods
-are called. However, that sequence is modified by imposing a rule that the
-appropriate method of a derived class must be called before the same method of
-any ancestral class. That's why, in the above example, C<X::foo> is called
-before C<D::foo>, even though C<D> comes before C<X> in C<@B::ISA>.
-
-In general, there's no need to worry about the order of calls. They will be
-left-to-right, breadth-first, most-derived-first. This works perfectly for
-most inherited methods (including destructors), but is inappropriate for
-some kinds of methods (such as constructors, cloners, debuggers, and
-initializers) where it's more appropriate that the least-derived methods be
-called first (as more-derived methods may rely on the behaviour of their
-"ancestors"). In that case, instead of using the C<EVERY> pseudo-class:
-
- $obj->EVERY::foo(); # prints" A::foo B::foo X::foo D::foo
-
-you can use the C<EVERY::LAST> pseudo-class:
-
- $obj->EVERY::LAST::foo(); # prints" D::foo X::foo B::foo A::foo
-
-which reverses the order of method call.
-
-Whichever version is used, the actual methods are called in the same
-context (list, scalar, or void) as the original call via C<EVERY>, and return:
-
-=over
-
-=item *
-
-A hash of array references in list context. Each entry of the hash has the
-fully qualified method name as its key and a reference to an array containing
-the method's list-context return values as its value.
-
-=item *
-
-A reference to a hash of scalar values in scalar context. Each entry of the hash has the
-fully qualified method name as its key and the method's scalar-context return values as its value.
-
-=item *
-
-Nothing in void context (obviously).
-
-=back
-
-=head2 Using C<EVERY> methods
-
-The typical way to use an C<EVERY> call is to wrap it in another base
-method, that all classes inherit. For example, to ensure that every
-destructor an object inherits is actually called (as opposed to just the
-left-most-depth-first-est one):
-
- package Base;
- sub DESTROY { $_[0]->EVERY::Destroy }
-
- package Derived1;
- use base 'Base';
- sub Destroy {...}
-
- package Derived2;
- use base 'Base', 'Derived1';
- sub Destroy {...}
-
-et cetera. Every derived class than needs its own clean-up
-behaviour simply adds its own C<Destroy> method (I<not> a C<DESTROY> method),
-which the call to C<EVERY::LAST::Destroy> in the inherited destructor
-then correctly picks up.
-
-Likewise, to create a class hierarchy in which every initializer inherited by
-a new object is invoked:
-
- package Base;
- sub new {
- my ($class, %args) = @_;
- my $obj = bless {}, $class;
- $obj->EVERY::LAST::Init(\%args);
- }
-
- package Derived1;
- use base 'Base';
- sub Init {
- my ($argsref) = @_;
- ...
- }
-
- package Derived2;
- use base 'Base', 'Derived1';
- sub Init {
- my ($argsref) = @_;
- ...
- }
-
-et cetera. Every derived class than needs some additional initialization
-behaviour simply adds its own C<Init> method (I<not> a C<new> method),
-which the call to C<EVERY::LAST::Init> in the inherited constructor
-then correctly picks up.
-
-
-=head1 AUTHOR
-
-Damian Conway (damian at conway.org)
-
-=head1 BUGS AND IRRITATIONS
-
-Because it's a module, not an integral part of the interpreter, NEXT.pm
-has to guess where the surrounding call was found in the method
-look-up sequence. In the presence of diamond inheritance patterns
-it occasionally guesses wrong.
-
-It's also too slow (despite caching).
-
-Comment, suggestions, and patches welcome.
-
-=head1 COPYRIGHT
-
- Copyright (c) 2000-2001, Damian Conway. All Rights Reserved.
- This module is free software. It may be used, redistributed
- and/or modified under the same terms as Perl itself.
Deleted: vendor/perl/dist/lib/Net/Cmd.pm
===================================================================
--- vendor/perl/dist/lib/Net/Cmd.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/Cmd.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,783 +0,0 @@
-# Net::Cmd.pm
-#
-# Copyright (c) 1995-2006 Graham Barr <gbarr at pobox.com>. All rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-
-package Net::Cmd;
-
-require 5.001;
-require Exporter;
-
-use strict;
-use vars qw(@ISA @EXPORT $VERSION);
-use Carp;
-use Symbol 'gensym';
-
-BEGIN {
- if ($^O eq 'os390') {
- require Convert::EBCDIC;
-
- # Convert::EBCDIC->import;
- }
-}
-
-BEGIN {
- if (!eval { require utf8 }) {
- *is_utf8 = sub { 0 };
- }
- elsif (eval { utf8::is_utf8(undef); 1 }) {
- *is_utf8 = \&utf8::is_utf8;
- }
- elsif (eval { require Encode; Encode::is_utf8(undef); 1 }) {
- *is_utf8 = \&Encode::is_utf8;
- }
- else {
- *is_utf8 = sub { $_[0] =~ /[^\x00-\xff]/ };
- }
-}
-
-$VERSION = "2.29";
- at ISA = qw(Exporter);
- at EXPORT = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING);
-
-
-sub CMD_INFO {1}
-sub CMD_OK {2}
-sub CMD_MORE {3}
-sub CMD_REJECT {4}
-sub CMD_ERROR {5}
-sub CMD_PENDING {0}
-
-my %debug = ();
-
-my $tr = $^O eq 'os390' ? Convert::EBCDIC->new() : undef;
-
-
-sub toebcdic {
- my $cmd = shift;
-
- unless (exists ${*$cmd}{'net_cmd_asciipeer'}) {
- my $string = $_[0];
- my $ebcdicstr = $tr->toebcdic($string);
- ${*$cmd}{'net_cmd_asciipeer'} = $string !~ /^\d+/ && $ebcdicstr =~ /^\d+/;
- }
-
- ${*$cmd}{'net_cmd_asciipeer'}
- ? $tr->toebcdic($_[0])
- : $_[0];
-}
-
-
-sub toascii {
- my $cmd = shift;
- ${*$cmd}{'net_cmd_asciipeer'}
- ? $tr->toascii($_[0])
- : $_[0];
-}
-
-
-sub _print_isa {
- no strict qw(refs);
-
- my $pkg = shift;
- my $cmd = $pkg;
-
- $debug{$pkg} ||= 0;
-
- my %done = ();
- my @do = ($pkg);
- my %spc = ($pkg, "");
-
- while ($pkg = shift @do) {
- next if defined $done{$pkg};
-
- $done{$pkg} = 1;
-
- my $v =
- defined ${"${pkg}::VERSION"}
- ? "(" . ${"${pkg}::VERSION"} . ")"
- : "";
-
- my $spc = $spc{$pkg};
- $cmd->debug_print(1, "${spc}${pkg}${v}\n");
-
- if (@{"${pkg}::ISA"}) {
- @spc{@{"${pkg}::ISA"}} = (" " . $spc{$pkg}) x @{"${pkg}::ISA"};
- unshift(@do, @{"${pkg}::ISA"});
- }
- }
-}
-
-
-sub debug {
- @_ == 1 or @_ == 2 or croak 'usage: $obj->debug([LEVEL])';
-
- my ($cmd, $level) = @_;
- my $pkg = ref($cmd) || $cmd;
- my $oldval = 0;
-
- if (ref($cmd)) {
- $oldval = ${*$cmd}{'net_cmd_debug'} || 0;
- }
- else {
- $oldval = $debug{$pkg} || 0;
- }
-
- return $oldval
- unless @_ == 2;
-
- $level = $debug{$pkg} || 0
- unless defined $level;
-
- _print_isa($pkg)
- if ($level && !exists $debug{$pkg});
-
- if (ref($cmd)) {
- ${*$cmd}{'net_cmd_debug'} = $level;
- }
- else {
- $debug{$pkg} = $level;
- }
-
- $oldval;
-}
-
-
-sub message {
- @_ == 1 or croak 'usage: $obj->message()';
-
- my $cmd = shift;
-
- wantarray
- ? @{${*$cmd}{'net_cmd_resp'}}
- : join("", @{${*$cmd}{'net_cmd_resp'}});
-}
-
-
-sub debug_text { $_[2] }
-
-
-sub debug_print {
- my ($cmd, $out, $text) = @_;
- print STDERR $cmd, ($out ? '>>> ' : '<<< '), $cmd->debug_text($out, $text);
-}
-
-
-sub code {
- @_ == 1 or croak 'usage: $obj->code()';
-
- my $cmd = shift;
-
- ${*$cmd}{'net_cmd_code'} = "000"
- unless exists ${*$cmd}{'net_cmd_code'};
-
- ${*$cmd}{'net_cmd_code'};
-}
-
-
-sub status {
- @_ == 1 or croak 'usage: $obj->status()';
-
- my $cmd = shift;
-
- substr(${*$cmd}{'net_cmd_code'}, 0, 1);
-}
-
-
-sub set_status {
- @_ == 3 or croak 'usage: $obj->set_status(CODE, MESSAGE)';
-
- my $cmd = shift;
- my ($code, $resp) = @_;
-
- $resp = [$resp]
- unless ref($resp);
-
- (${*$cmd}{'net_cmd_code'}, ${*$cmd}{'net_cmd_resp'}) = ($code, $resp);
-
- 1;
-}
-
-
-sub command {
- my $cmd = shift;
-
- unless (defined fileno($cmd)) {
- $cmd->set_status("599", "Connection closed");
- return $cmd;
- }
-
-
- $cmd->dataend()
- if (exists ${*$cmd}{'net_cmd_last_ch'});
-
- if (scalar(@_)) {
- local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';
-
- my $str = join(
- " ",
- map {
- /\n/
- ? do { my $n = $_; $n =~ tr/\n/ /; $n }
- : $_;
- } @_
- );
- $str = $cmd->toascii($str) if $tr;
- $str .= "\015\012";
-
- my $len = length $str;
- my $swlen;
-
- $cmd->close
- unless (defined($swlen = syswrite($cmd, $str, $len)) && $swlen == $len);
-
- $cmd->debug_print(1, $str)
- if ($cmd->debug);
-
- ${*$cmd}{'net_cmd_resp'} = []; # the response
- ${*$cmd}{'net_cmd_code'} = "000"; # Made this one up :-)
- }
-
- $cmd;
-}
-
-
-sub ok {
- @_ == 1 or croak 'usage: $obj->ok()';
-
- my $code = $_[0]->code;
- 0 < $code && $code < 400;
-}
-
-
-sub unsupported {
- my $cmd = shift;
-
- ${*$cmd}{'net_cmd_resp'} = ['Unsupported command'];
- ${*$cmd}{'net_cmd_code'} = 580;
- 0;
-}
-
-
-sub getline {
- my $cmd = shift;
-
- ${*$cmd}{'net_cmd_lines'} ||= [];
-
- return shift @{${*$cmd}{'net_cmd_lines'}}
- if scalar(@{${*$cmd}{'net_cmd_lines'}});
-
- my $partial = defined(${*$cmd}{'net_cmd_partial'}) ? ${*$cmd}{'net_cmd_partial'} : "";
- my $fd = fileno($cmd);
-
- return undef
- unless defined $fd;
-
- my $rin = "";
- vec($rin, $fd, 1) = 1;
-
- my $buf;
-
- until (scalar(@{${*$cmd}{'net_cmd_lines'}})) {
- my $timeout = $cmd->timeout || undef;
- my $rout;
-
- my $select_ret = select($rout = $rin, undef, undef, $timeout);
- if ($select_ret > 0) {
- unless (sysread($cmd, $buf = "", 1024)) {
- carp(ref($cmd) . ": Unexpected EOF on command channel")
- if $cmd->debug;
- $cmd->close;
- return undef;
- }
-
- substr($buf, 0, 0) = $partial; ## prepend from last sysread
-
- my @buf = split(/\015?\012/, $buf, -1); ## break into lines
-
- $partial = pop @buf;
-
- push(@{${*$cmd}{'net_cmd_lines'}}, map {"$_\n"} @buf);
-
- }
- else {
- my $msg = $select_ret ? "Error or Interrupted: $!" : "Timeout";
- carp("$cmd: $msg") if ($cmd->debug);
- return undef;
- }
- }
-
- ${*$cmd}{'net_cmd_partial'} = $partial;
-
- if ($tr) {
- foreach my $ln (@{${*$cmd}{'net_cmd_lines'}}) {
- $ln = $cmd->toebcdic($ln);
- }
- }
-
- shift @{${*$cmd}{'net_cmd_lines'}};
-}
-
-
-sub ungetline {
- my ($cmd, $str) = @_;
-
- ${*$cmd}{'net_cmd_lines'} ||= [];
- unshift(@{${*$cmd}{'net_cmd_lines'}}, $str);
-}
-
-
-sub parse_response {
- return ()
- unless $_[1] =~ s/^(\d\d\d)(.?)//o;
- ($1, $2 eq "-");
-}
-
-
-sub response {
- my $cmd = shift;
- my ($code, $more) = (undef) x 2;
-
- ${*$cmd}{'net_cmd_resp'} ||= [];
-
- while (1) {
- my $str = $cmd->getline();
-
- return CMD_ERROR
- unless defined($str);
-
- $cmd->debug_print(0, $str)
- if ($cmd->debug);
-
- ($code, $more) = $cmd->parse_response($str);
- unless (defined $code) {
- $cmd->ungetline($str);
- last;
- }
-
- ${*$cmd}{'net_cmd_code'} = $code;
-
- push(@{${*$cmd}{'net_cmd_resp'}}, $str);
-
- last unless ($more);
- }
-
- substr($code, 0, 1);
-}
-
-
-sub read_until_dot {
- my $cmd = shift;
- my $fh = shift;
- my $arr = [];
-
- while (1) {
- my $str = $cmd->getline() or return undef;
-
- $cmd->debug_print(0, $str)
- if ($cmd->debug & 4);
-
- last if ($str =~ /^\.\r?\n/o);
-
- $str =~ s/^\.\././o;
-
- if (defined $fh) {
- print $fh $str;
- }
- else {
- push(@$arr, $str);
- }
- }
-
- $arr;
-}
-
-
-sub datasend {
- my $cmd = shift;
- my $arr = @_ == 1 && ref($_[0]) ? $_[0] : \@_;
- my $line = join("", @$arr);
-
- # encode to individual utf8 bytes if
- # $line is a string (in internal UTF-8)
- utf8::encode($line) if is_utf8($line);
-
- return 0 unless defined(fileno($cmd));
-
- my $last_ch = ${*$cmd}{'net_cmd_last_ch'};
- $last_ch = ${*$cmd}{'net_cmd_last_ch'} = "\012" unless defined $last_ch;
-
- return 1 unless length $line;
-
- if ($cmd->debug) {
- foreach my $b (split(/\n/, $line)) {
- $cmd->debug_print(1, "$b\n");
- }
- }
-
- $line =~ tr/\r\n/\015\012/ unless "\r" eq "\015";
-
- my $first_ch = '';
-
- if ($last_ch eq "\015") {
- $first_ch = "\012" if $line =~ s/^\012//;
- }
- elsif ($last_ch eq "\012") {
- $first_ch = "." if $line =~ /^\./;
- }
-
- $line =~ s/\015?\012(\.?)/\015\012$1$1/sg;
-
- substr($line, 0, 0) = $first_ch;
-
- ${*$cmd}{'net_cmd_last_ch'} = substr($line, -1, 1);
-
- my $len = length($line);
- my $offset = 0;
- my $win = "";
- vec($win, fileno($cmd), 1) = 1;
- my $timeout = $cmd->timeout || undef;
-
- local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';
-
- while ($len) {
- my $wout;
- my $s = select(undef, $wout = $win, undef, $timeout);
- if ((defined $s and $s > 0) or -f $cmd) # -f for testing on win32
- {
- my $w = syswrite($cmd, $line, $len, $offset);
- unless (defined($w)) {
- carp("$cmd: $!") if $cmd->debug;
- return undef;
- }
- $len -= $w;
- $offset += $w;
- }
- else {
- carp("$cmd: Timeout") if ($cmd->debug);
- return undef;
- }
- }
-
- 1;
-}
-
-
-sub rawdatasend {
- my $cmd = shift;
- my $arr = @_ == 1 && ref($_[0]) ? $_[0] : \@_;
- my $line = join("", @$arr);
-
- return 0 unless defined(fileno($cmd));
-
- return 1
- unless length($line);
-
- if ($cmd->debug) {
- my $b = "$cmd>>> ";
- print STDERR $b, join("\n$b", split(/\n/, $line)), "\n";
- }
-
- my $len = length($line);
- my $offset = 0;
- my $win = "";
- vec($win, fileno($cmd), 1) = 1;
- my $timeout = $cmd->timeout || undef;
-
- local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';
- while ($len) {
- my $wout;
- if (select(undef, $wout = $win, undef, $timeout) > 0) {
- my $w = syswrite($cmd, $line, $len, $offset);
- unless (defined($w)) {
- carp("$cmd: $!") if $cmd->debug;
- return undef;
- }
- $len -= $w;
- $offset += $w;
- }
- else {
- carp("$cmd: Timeout") if ($cmd->debug);
- return undef;
- }
- }
-
- 1;
-}
-
-
-sub dataend {
- my $cmd = shift;
-
- return 0 unless defined(fileno($cmd));
-
- my $ch = ${*$cmd}{'net_cmd_last_ch'};
- my $tosend;
-
- if (!defined $ch) {
- return 1;
- }
- elsif ($ch ne "\012") {
- $tosend = "\015\012";
- }
-
- $tosend .= ".\015\012";
-
- local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';
-
- $cmd->debug_print(1, ".\n")
- if ($cmd->debug);
-
- syswrite($cmd, $tosend, length $tosend);
-
- delete ${*$cmd}{'net_cmd_last_ch'};
-
- $cmd->response() == CMD_OK;
-}
-
-# read and write to tied filehandle
-sub tied_fh {
- my $cmd = shift;
- ${*$cmd}{'net_cmd_readbuf'} = '';
- my $fh = gensym();
- tie *$fh, ref($cmd), $cmd;
- return $fh;
-}
-
-# tie to myself
-sub TIEHANDLE {
- my $class = shift;
- my $cmd = shift;
- return $cmd;
-}
-
-# Tied filehandle read. Reads requested data length, returning
-# end-of-file when the dot is encountered.
-sub READ {
- my $cmd = shift;
- my ($len, $offset) = @_[1, 2];
- return unless exists ${*$cmd}{'net_cmd_readbuf'};
- my $done = 0;
- while (!$done and length(${*$cmd}{'net_cmd_readbuf'}) < $len) {
- ${*$cmd}{'net_cmd_readbuf'} .= $cmd->getline() or return;
- $done++ if ${*$cmd}{'net_cmd_readbuf'} =~ s/^\.\r?\n\Z//m;
- }
-
- $_[0] = '';
- substr($_[0], $offset + 0) = substr(${*$cmd}{'net_cmd_readbuf'}, 0, $len);
- substr(${*$cmd}{'net_cmd_readbuf'}, 0, $len) = '';
- delete ${*$cmd}{'net_cmd_readbuf'} if $done;
-
- return length $_[0];
-}
-
-
-sub READLINE {
- my $cmd = shift;
-
- # in this context, we use the presence of readbuf to
- # indicate that we have not yet reached the eof
- return unless exists ${*$cmd}{'net_cmd_readbuf'};
- my $line = $cmd->getline;
- return if $line =~ /^\.\r?\n/;
- $line;
-}
-
-
-sub PRINT {
- my $cmd = shift;
- my ($buf, $len, $offset) = @_;
- $len ||= length($buf);
- $offset += 0;
- return unless $cmd->datasend(substr($buf, $offset, $len));
- ${*$cmd}{'net_cmd_sending'}++; # flag that we should call dataend()
- return $len;
-}
-
-
-sub CLOSE {
- my $cmd = shift;
- my $r = exists(${*$cmd}{'net_cmd_sending'}) ? $cmd->dataend : 1;
- delete ${*$cmd}{'net_cmd_readbuf'};
- delete ${*$cmd}{'net_cmd_sending'};
- $r;
-}
-
-1;
-
-__END__
-
-
-=head1 NAME
-
-Net::Cmd - Network Command class (as used by FTP, SMTP etc)
-
-=head1 SYNOPSIS
-
- use Net::Cmd;
-
- @ISA = qw(Net::Cmd);
-
-=head1 DESCRIPTION
-
-C<Net::Cmd> is a collection of methods that can be inherited by a sub class
-of C<IO::Handle>. These methods implement the functionality required for a
-command based protocol, for example FTP and SMTP.
-
-=head1 USER METHODS
-
-These methods provide a user interface to the C<Net::Cmd> object.
-
-=over 4
-
-=item debug ( VALUE )
-
-Set the level of debug information for this object. If C<VALUE> is not given
-then the current state is returned. Otherwise the state is changed to
-C<VALUE> and the previous state returned.
-
-Different packages
-may implement different levels of debug but a non-zero value results in
-copies of all commands and responses also being sent to STDERR.
-
-If C<VALUE> is C<undef> then the debug level will be set to the default
-debug level for the class.
-
-This method can also be called as a I<static> method to set/get the default
-debug level for a given class.
-
-=item message ()
-
-Returns the text message returned from the last command
-
-=item code ()
-
-Returns the 3-digit code from the last command. If a command is pending
-then the value 0 is returned
-
-=item ok ()
-
-Returns non-zero if the last code value was greater than zero and
-less than 400. This holds true for most command servers. Servers
-where this does not hold may override this method.
-
-=item status ()
-
-Returns the most significant digit of the current status code. If a command
-is pending then C<CMD_PENDING> is returned.
-
-=item datasend ( DATA )
-
-Send data to the remote server, converting LF to CRLF. Any line starting
-with a '.' will be prefixed with another '.'.
-C<DATA> may be an array or a reference to an array.
-
-=item dataend ()
-
-End the sending of data to the remote server. This is done by ensuring that
-the data already sent ends with CRLF then sending '.CRLF' to end the
-transmission. Once this data has been sent C<dataend> calls C<response> and
-returns true if C<response> returns CMD_OK.
-
-=back
-
-=head1 CLASS METHODS
-
-These methods are not intended to be called by the user, but used or
-over-ridden by a sub-class of C<Net::Cmd>
-
-=over 4
-
-=item debug_print ( DIR, TEXT )
-
-Print debugging information. C<DIR> denotes the direction I<true> being
-data being sent to the server. Calls C<debug_text> before printing to
-STDERR.
-
-=item debug_text ( TEXT )
-
-This method is called to print debugging information. TEXT is
-the text being sent. The method should return the text to be printed
-
-This is primarily meant for the use of modules such as FTP where passwords
-are sent, but we do not want to display them in the debugging information.
-
-=item command ( CMD [, ARGS, ... ])
-
-Send a command to the command server. All arguments a first joined with
-a space character and CRLF is appended, this string is then sent to the
-command server.
-
-Returns undef upon failure
-
-=item unsupported ()
-
-Sets the status code to 580 and the response text to 'Unsupported command'.
-Returns zero.
-
-=item response ()
-
-Obtain a response from the server. Upon success the most significant digit
-of the status code is returned. Upon failure, timeout etc., I<undef> is
-returned.
-
-=item parse_response ( TEXT )
-
-This method is called by C<response> as a method with one argument. It should
-return an array of 2 values, the 3-digit status code and a flag which is true
-when this is part of a multi-line response and this line is not the list.
-
-=item getline ()
-
-Retrieve one line, delimited by CRLF, from the remote server. Returns I<undef>
-upon failure.
-
-B<NOTE>: If you do use this method for any reason, please remember to add
-some C<debug_print> calls into your method.
-
-=item ungetline ( TEXT )
-
-Unget a line of text from the server.
-
-=item rawdatasend ( DATA )
-
-Send data to the remote server without performing any conversions. C<DATA>
-is a scalar.
-
-=item read_until_dot ()
-
-Read data from the remote server until a line consisting of a single '.'.
-Any lines starting with '..' will have one of the '.'s removed.
-
-Returns a reference to a list containing the lines, or I<undef> upon failure.
-
-=item tied_fh ()
-
-Returns a filehandle tied to the Net::Cmd object. After issuing a
-command, you may read from this filehandle using read() or <>. The
-filehandle will return EOF when the final dot is encountered.
-Similarly, you may write to the filehandle in order to send data to
-the server after issuing a command that expects data to be written.
-
-See the Net::POP3 and Net::SMTP modules for examples of this.
-
-=back
-
-=head1 EXPORTS
-
-C<Net::Cmd> exports six subroutines, five of these, C<CMD_INFO>, C<CMD_OK>,
-C<CMD_MORE>, C<CMD_REJECT> and C<CMD_ERROR>, correspond to possible results
-of C<response> and C<status>. The sixth is C<CMD_PENDING>.
-
-=head1 AUTHOR
-
-Graham Barr <gbarr at pobox.com>
-
-=head1 COPYRIGHT
-
-Copyright (c) 1995-2006 Graham Barr. All rights reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/Net/Config.eg
===================================================================
--- vendor/perl/dist/lib/Net/Config.eg 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/Config.eg 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,49 +0,0 @@
-package Net::Config;
-
-require Exporter;
-use vars qw(@ISA @EXPORT %NetConfig);
-use strict;
-
- at EXPORT = qw(%NetConfig);
- at ISA = qw(Exporter);
-
-# WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-# WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-#
-# Below this line is auto-generated, *ANY* changes will be lost
-
-%NetConfig = (
- # the followinf parameters are all lists of hosts for the
- # respective protocols.
- nntp_hosts => [],
- snpp_hosts => [],
- pop3_hosts => [],
- smtp_hosts => [],
- ph_hosts => [],
- daytime_hosts => [],
- time_hosts => [],
-
- # your internet domain
- inet_domain => undef,
-
- # If you have an ftp proxy firewall (not an http firewall)
- # then set this to the name of the firewall
- ftp_firewall => undef,
-
- # set if all connections done via the firewall should use
- # passive data connections
- ftp_ext_passive => 0,
-
- # set if all connections not done via the firewall should use
- # passive data connections
- ftp_int_passive => 0,
-
- # If set the make test will attempt to connect to the hosts above
- test_hosts => 0,
-
- # Used during Configure (which you are not using) to do
- # DNS lookups to ensure hosts exist
- test_exist => 0,
-
-);
-1;
Deleted: vendor/perl/dist/lib/Net/Config.pm
===================================================================
--- vendor/perl/dist/lib/Net/Config.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/Config.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,312 +0,0 @@
-# Net::Config.pm
-#
-# Copyright (c) 2000 Graham Barr <gbarr at pobox.com>. All rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-
-package Net::Config;
-
-require Exporter;
-use vars qw(@ISA @EXPORT %NetConfig $VERSION $CONFIGURE $LIBNET_CFG);
-use Socket qw(inet_aton inet_ntoa);
-use strict;
-
- at EXPORT = qw(%NetConfig);
- at ISA = qw(Net::LocalCfg Exporter);
-$VERSION = "1.11";
-
-eval { local $SIG{__DIE__}; require Net::LocalCfg };
-
-%NetConfig = (
- nntp_hosts => [],
- snpp_hosts => [],
- pop3_hosts => [],
- smtp_hosts => [],
- ph_hosts => [],
- daytime_hosts => [],
- time_hosts => [],
- inet_domain => undef,
- ftp_firewall => undef,
- ftp_ext_passive => 1,
- ftp_int_passive => 1,
- test_hosts => 1,
- test_exist => 1,
-);
-
-#
-# Try to get as much configuration info as possible from InternetConfig
-#
-$^O eq 'MacOS' and eval <<TRY_INTERNET_CONFIG;
-use Mac::InternetConfig;
-
-{
-my %nc = (
- nntp_hosts => [ \$InternetConfig{ kICNNTPHost() } ],
- pop3_hosts => [ \$InternetConfig{ kICMailAccount() } =~ /\@(.*)/ ],
- smtp_hosts => [ \$InternetConfig{ kICSMTPHost() } ],
- ftp_testhost => \$InternetConfig{ kICFTPHost() } ? \$InternetConfig{ kICFTPHost()} : undef,
- ph_hosts => [ \$InternetConfig{ kICPhHost() } ],
- ftp_ext_passive => \$InternetConfig{"646F676F\xA5UsePassiveMode"} || 0,
- ftp_int_passive => \$InternetConfig{"646F676F\xA5UsePassiveMode"} || 0,
- socks_hosts =>
- \$InternetConfig{ kICUseSocks() } ? [ \$InternetConfig{ kICSocksHost() } ] : [],
- ftp_firewall =>
- \$InternetConfig{ kICUseFTPProxy() } ? [ \$InternetConfig{ kICFTPProxyHost() } ] : [],
-);
-\@NetConfig{keys %nc} = values %nc;
-}
-TRY_INTERNET_CONFIG
-
-my $file = __FILE__;
-my $ref;
-$file =~ s/Config.pm/libnet.cfg/;
-if (-f $file) {
- $ref = eval { local $SIG{__DIE__}; do $file };
- if (ref($ref) eq 'HASH') {
- %NetConfig = (%NetConfig, %{$ref});
- $LIBNET_CFG = $file;
- }
-}
-if ($< == $> and !$CONFIGURE) {
- my $home = eval { local $SIG{__DIE__}; (getpwuid($>))[7] } || $ENV{HOME};
- $home ||= $ENV{HOMEDRIVE} . ($ENV{HOMEPATH} || '') if defined $ENV{HOMEDRIVE};
- if (defined $home) {
- $file = $home . "/.libnetrc";
- $ref = eval { local $SIG{__DIE__}; do $file } if -f $file;
- %NetConfig = (%NetConfig, %{$ref})
- if ref($ref) eq 'HASH';
- }
-}
-my ($k, $v);
-while (($k, $v) = each %NetConfig) {
- $NetConfig{$k} = [$v]
- if ($k =~ /_hosts$/ and $k ne "test_hosts" and defined($v) and !ref($v));
-}
-
-# Take a hostname and determine if it is inside the firewall
-
-
-sub requires_firewall {
- shift; # ignore package
- my $host = shift;
-
- return 0 unless defined $NetConfig{'ftp_firewall'};
-
- $host = inet_aton($host) or return -1;
- $host = inet_ntoa($host);
-
- if (exists $NetConfig{'local_netmask'}) {
- my $quad = unpack("N", pack("C*", split(/\./, $host)));
- my $list = $NetConfig{'local_netmask'};
- $list = [$list] unless ref($list);
- foreach (@$list) {
- my ($net, $bits) = (m#^(\d+\.\d+\.\d+\.\d+)/(\d+)$#) or next;
- my $mask = ~0 << (32 - $bits);
- my $addr = unpack("N", pack("C*", split(/\./, $net)));
-
- return 0 if (($addr & $mask) == ($quad & $mask));
- }
- return 1;
- }
-
- return 0;
-}
-
-use vars qw(*is_external);
-*is_external = \&requires_firewall;
-
-1;
-
-__END__
-
-=head1 NAME
-
-Net::Config - Local configuration data for libnet
-
-=head1 SYNOPSYS
-
- use Net::Config qw(%NetConfig);
-
-=head1 DESCRIPTION
-
-C<Net::Config> holds configuration data for the modules in the libnet
-distribution. During installation you will be asked for these values.
-
-The configuration data is held globally in a file in the perl installation
-tree, but a user may override any of these values by providing their own. This
-can be done by having a C<.libnetrc> file in their home directory. This file
-should return a reference to a HASH containing the keys described below.
-For example
-
- # .libnetrc
- {
- nntp_hosts => [ "my_preferred_host" ],
- ph_hosts => [ "my_ph_server" ],
- }
- __END__
-
-=head1 METHODS
-
-C<Net::Config> defines the following methods. They are methods as they are
-invoked as class methods. This is because C<Net::Config> inherits from
-C<Net::LocalCfg> so you can override these methods if you want.
-
-=over 4
-
-=item requires_firewall HOST
-
-Attempts to determine if a given host is outside your firewall. Possible
-return values are.
-
- -1 Cannot lookup hostname
- 0 Host is inside firewall (or there is no ftp_firewall entry)
- 1 Host is outside the firewall
-
-This is done by using hostname lookup and the C<local_netmask> entry in
-the configuration data.
-
-=back
-
-=head1 NetConfig VALUES
-
-=over 4
-
-=item nntp_hosts
-
-=item snpp_hosts
-
-=item pop3_hosts
-
-=item smtp_hosts
-
-=item ph_hosts
-
-=item daytime_hosts
-
-=item time_hosts
-
-Each is a reference to an array of hostnames (in order of preference),
-which should be used for the given protocol
-
-=item inet_domain
-
-Your internet domain name
-
-=item ftp_firewall
-
-If you have an FTP proxy firewall (B<NOT> an HTTP or SOCKS firewall)
-then this value should be set to the firewall hostname. If your firewall
-does not listen to port 21, then this value should be set to
-C<"hostname:port"> (eg C<"hostname:99">)
-
-=item ftp_firewall_type
-
-There are many different ftp firewall products available. But unfortunately
-there is no standard for how to traverse a firewall. The list below shows the
-sequence of commands that Net::FTP will use
-
- user Username for remote host
- pass Password for remote host
- fwuser Username for firewall
- fwpass Password for firewall
- remote.host The hostname of the remote ftp server
-
-=over 4
-
-=item 0
-
-There is no firewall
-
-=item 1
-
- USER user at remote.host
- PASS pass
-
-=item 2
-
- USER fwuser
- PASS fwpass
- USER user at remote.host
- PASS pass
-
-=item 3
-
- USER fwuser
- PASS fwpass
- SITE remote.site
- USER user
- PASS pass
-
-=item 4
-
- USER fwuser
- PASS fwpass
- OPEN remote.site
- USER user
- PASS pass
-
-=item 5
-
- USER user at fwuser@remote.site
- PASS pass at fwpass
-
-=item 6
-
- USER fwuser at remote.site
- PASS fwpass
- USER user
- PASS pass
-
-=item 7
-
- USER user at remote.host
- PASS pass
- AUTH fwuser
- RESP fwpass
-
-=back
-
-=item ftp_ext_passive
-
-=item ftp_int_passive
-
-FTP servers can work in passive or active mode. Active mode is when
-you want to transfer data you have to tell the server the address and
-port to connect to. Passive mode is when the server provide the
-address and port and you establish the connection.
-
-With some firewalls active mode does not work as the server cannot
-connect to your machine (because you are behind a firewall) and the firewall
-does not re-write the command. In this case you should set C<ftp_ext_passive>
-to a I<true> value.
-
-Some servers are configured to only work in passive mode. If you have
-one of these you can force C<Net::FTP> to always transfer in passive
-mode; when not going via a firewall, by setting C<ftp_int_passive> to
-a I<true> value.
-
-=item local_netmask
-
-A reference to a list of netmask strings in the form C<"134.99.4.0/24">.
-These are used by the C<requires_firewall> function to determine if a given
-host is inside or outside your firewall.
-
-=back
-
-The following entries are used during installation & testing on the
-libnet package
-
-=over 4
-
-=item test_hosts
-
-If true then C<make test> may attempt to connect to hosts given in the
-configuration.
-
-=item test_exists
-
-If true then C<Configure> will check each hostname given that it exists
-
-=back
-
-=cut
Deleted: vendor/perl/dist/lib/Net/Domain.pm
===================================================================
--- vendor/perl/dist/lib/Net/Domain.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/Domain.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,347 +0,0 @@
-# Net::Domain.pm
-#
-# Copyright (c) 1995-1998 Graham Barr <gbarr at pobox.com>. All rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-
-package Net::Domain;
-
-require Exporter;
-
-use Carp;
-use strict;
-use vars qw($VERSION @ISA @EXPORT_OK);
-use Net::Config;
-
- at ISA = qw(Exporter);
- at EXPORT_OK = qw(hostname hostdomain hostfqdn domainname);
-
-$VERSION = "2.20";
-
-my ($host, $domain, $fqdn) = (undef, undef, undef);
-
-# Try every conceivable way to get hostname.
-
-
-sub _hostname {
-
- # we already know it
- return $host
- if (defined $host);
-
- if ($^O eq 'MSWin32') {
- require Socket;
- my ($name, $alias, $type, $len, @addr) = gethostbyname($ENV{'COMPUTERNAME'} || 'localhost');
- while (@addr) {
- my $a = shift(@addr);
- $host = gethostbyaddr($a, Socket::AF_INET());
- last if defined $host;
- }
- if (defined($host) && index($host, '.') > 0) {
- $fqdn = $host;
- ($host, $domain) = $fqdn =~ /^([^\.]+)\.(.*)$/;
- }
- return $host;
- }
- elsif ($^O eq 'MacOS') {
- chomp($host = `hostname`);
- }
- elsif ($^O eq 'VMS') { ## multiple varieties of net s/w makes this hard
- $host = $ENV{'UCX$INET_HOST'} if defined($ENV{'UCX$INET_HOST'});
- $host = $ENV{'MULTINET_HOST_NAME'} if defined($ENV{'MULTINET_HOST_NAME'});
- if (index($host, '.') > 0) {
- $fqdn = $host;
- ($host, $domain) = $fqdn =~ /^([^\.]+)\.(.*)$/;
- }
- return $host;
- }
- else {
- local $SIG{'__DIE__'};
-
- # syscall is preferred since it avoids tainting problems
- eval {
- my $tmp = "\0" x 256; ## preload scalar
- eval {
- package main;
- require "syscall.ph";
- defined(&main::SYS_gethostname);
- }
- || eval {
- package main;
- require "sys/syscall.ph";
- defined(&main::SYS_gethostname);
- }
- and $host =
- (syscall(&main::SYS_gethostname, $tmp, 256) == 0)
- ? $tmp
- : undef;
- }
-
- # POSIX
- || eval {
- require POSIX;
- $host = (POSIX::uname())[1];
- }
-
- # trusty old hostname command
- || eval {
- chop($host = `(hostname) 2>/dev/null`); # BSD'ish
- }
-
- # sysV/POSIX uname command (may truncate)
- || eval {
- chop($host = `uname -n 2>/dev/null`); ## SYSV'ish && POSIX'ish
- }
-
- # Apollo pre-SR10
- || eval { $host = (split(/[:\. ]/, `/com/host`, 6))[0]; }
-
- || eval { $host = ""; };
- }
-
- # remove garbage
- $host =~ s/[\0\r\n]+//go;
- $host =~ s/(\A\.+|\.+\Z)//go;
- $host =~ s/\.\.+/\./go;
-
- $host;
-}
-
-
-sub _hostdomain {
-
- # we already know it
- return $domain
- if (defined $domain);
-
- local $SIG{'__DIE__'};
-
- return $domain = $NetConfig{'inet_domain'}
- if defined $NetConfig{'inet_domain'};
-
- # try looking in /etc/resolv.conf
- # putting this here and assuming that it is correct, eliminates
- # calls to gethostbyname, and therefore DNS lookups. This helps
- # those on dialup systems.
-
- local *RES;
- local ($_);
-
- if (open(RES, "/etc/resolv.conf")) {
- while (<RES>) {
- $domain = $1
- if (/\A\s*(?:domain|search)\s+(\S+)/);
- }
- close(RES);
-
- return $domain
- if (defined $domain);
- }
-
- # just try hostname and system calls
-
- my $host = _hostname();
- my (@hosts);
-
- @hosts = ($host, "localhost");
-
- unless (defined($host) && $host =~ /\./) {
- my $dom = undef;
- eval {
- my $tmp = "\0" x 256; ## preload scalar
- eval {
- package main;
- require "syscall.ph";
- }
- || eval {
- package main;
- require "sys/syscall.ph";
- }
- and $dom =
- (syscall(&main::SYS_getdomainname, $tmp, 256) == 0)
- ? $tmp
- : undef;
- };
-
- if ($^O eq 'VMS') {
- $dom ||= $ENV{'TCPIP$INET_DOMAIN'}
- || $ENV{'UCX$INET_DOMAIN'};
- }
-
- chop($dom = `domainname 2>/dev/null`)
- unless (defined $dom || $^O =~ /^(?:cygwin|MSWin32)/);
-
- if (defined $dom) {
- my @h = ();
- $dom =~ s/^\.+//;
- while (length($dom)) {
- push(@h, "$host.$dom");
- $dom =~ s/^[^.]+.+// or last;
- }
- unshift(@hosts, @h);
- }
- }
-
- # Attempt to locate FQDN
-
- foreach (grep { defined $_ } @hosts) {
- my @info = gethostbyname($_);
-
- next unless @info;
-
- # look at real name & aliases
- my $site;
- foreach $site ($info[0], split(/ /, $info[1])) {
- if (rindex($site, ".") > 0) {
-
- # Extract domain from FQDN
-
- ($domain = $site) =~ s/\A[^\.]+\.//;
- return $domain;
- }
- }
- }
-
- # Look for environment variable
-
- $domain ||= $ENV{LOCALDOMAIN} || $ENV{DOMAIN};
-
- if (defined $domain) {
- $domain =~ s/[\r\n\0]+//g;
- $domain =~ s/(\A\.+|\.+\Z)//g;
- $domain =~ s/\.\.+/\./g;
- }
-
- $domain;
-}
-
-
-sub domainname {
-
- return $fqdn
- if (defined $fqdn);
-
- _hostname();
- _hostdomain();
-
- # Assumption: If the host name does not contain a period
- # and the domain name does, then assume that they are correct
- # this helps to eliminate calls to gethostbyname, and therefore
- # eleminate DNS lookups
-
- return $fqdn = $host . "." . $domain
- if (defined $host
- and defined $domain
- and $host !~ /\./
- and $domain =~ /\./);
-
- # For hosts that have no name, just an IP address
- return $fqdn = $host if defined $host and $host =~ /^\d+(\.\d+){3}$/;
-
- my @host = defined $host ? split(/\./, $host) : ('localhost');
- my @domain = defined $domain ? split(/\./, $domain) : ();
- my @fqdn = ();
-
- # Determine from @host & @domain the FQDN
-
- my @d = @domain;
-
-LOOP:
- while (1) {
- my @h = @host;
- while (@h) {
- my $tmp = join(".", @h, @d);
- if ((gethostbyname($tmp))[0]) {
- @fqdn = (@h, @d);
- $fqdn = $tmp;
- last LOOP;
- }
- pop @h;
- }
- last unless shift @d;
- }
-
- if (@fqdn) {
- $host = shift @fqdn;
- until ((gethostbyname($host))[0]) {
- $host .= "." . shift @fqdn;
- }
- $domain = join(".", @fqdn);
- }
- else {
- undef $host;
- undef $domain;
- undef $fqdn;
- }
-
- $fqdn;
-}
-
-
-sub hostfqdn { domainname() }
-
-
-sub hostname {
- domainname()
- unless (defined $host);
- return $host;
-}
-
-
-sub hostdomain {
- domainname()
- unless (defined $domain);
- return $domain;
-}
-
-1; # Keep require happy
-
-__END__
-
-=head1 NAME
-
-Net::Domain - Attempt to evaluate the current host's internet name and domain
-
-=head1 SYNOPSIS
-
- use Net::Domain qw(hostname hostfqdn hostdomain domainname);
-
-=head1 DESCRIPTION
-
-Using various methods B<attempt> to find the Fully Qualified Domain Name (FQDN)
-of the current host. From this determine the host-name and the host-domain.
-
-Each of the functions will return I<undef> if the FQDN cannot be determined.
-
-=over 4
-
-=item hostfqdn ()
-
-Identify and return the FQDN of the current host.
-
-=item domainname ()
-
-An alias for hostfqdn ().
-
-=item hostname ()
-
-Returns the smallest part of the FQDN which can be used to identify the host.
-
-=item hostdomain ()
-
-Returns the remainder of the FQDN after the I<hostname> has been removed.
-
-=back
-
-=head1 AUTHOR
-
-Graham Barr <gbarr at pobox.com>.
-Adapted from Sys::Hostname by David Sundstrom <sunds at asictest.sc.ti.com>
-
-=head1 COPYRIGHT
-
-Copyright (c) 1995-1998 Graham Barr. All rights reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/Net/FTP.pm
===================================================================
--- vendor/perl/dist/lib/Net/FTP.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/FTP.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1829 +0,0 @@
-# Net::FTP.pm
-#
-# Copyright (c) 1995-2004 Graham Barr <gbarr at pobox.com>. All rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-#
-# Documentation (at end) improved 1996 by Nathan Torkington <gnat at frii.com>.
-
-package Net::FTP;
-
-require 5.001;
-
-use strict;
-use vars qw(@ISA $VERSION);
-use Carp;
-
-use Socket 1.3;
-use IO::Socket;
-use Time::Local;
-use Net::Cmd;
-use Net::Config;
-use Fcntl qw(O_WRONLY O_RDONLY O_APPEND O_CREAT O_TRUNC);
-
-$VERSION = '2.77';
- at ISA = qw(Exporter Net::Cmd IO::Socket::INET);
-
-# Someday I will "use constant", when I am not bothered to much about
-# compatability with older releases of perl
-
-use vars qw($TELNET_IAC $TELNET_IP $TELNET_DM);
-($TELNET_IAC, $TELNET_IP, $TELNET_DM) = (255, 244, 242);
-
-
-BEGIN {
-
- # make a constant so code is fast'ish
- my $is_os390 = $^O eq 'os390';
- *trEBCDIC = sub () {$is_os390}
-}
-
-
-sub new {
- my $pkg = shift;
- my ($peer, %arg);
- if (@_ % 2) {
- $peer = shift;
- %arg = @_;
- }
- else {
- %arg = @_;
- $peer = delete $arg{Host};
- }
-
- my $host = $peer;
- my $fire = undef;
- my $fire_type = undef;
-
- if (exists($arg{Firewall}) || Net::Config->requires_firewall($peer)) {
- $fire = $arg{Firewall}
- || $ENV{FTP_FIREWALL}
- || $NetConfig{ftp_firewall}
- || undef;
-
- if (defined $fire) {
- $peer = $fire;
- delete $arg{Port};
- $fire_type = $arg{FirewallType}
- || $ENV{FTP_FIREWALL_TYPE}
- || $NetConfig{firewall_type}
- || undef;
- }
- }
-
- my $ftp = $pkg->SUPER::new(
- PeerAddr => $peer,
- PeerPort => $arg{Port} || 'ftp(21)',
- LocalAddr => $arg{'LocalAddr'},
- Proto => 'tcp',
- Timeout => defined $arg{Timeout}
- ? $arg{Timeout}
- : 120
- )
- or return undef;
-
- ${*$ftp}{'net_ftp_host'} = $host; # Remote hostname
- ${*$ftp}{'net_ftp_type'} = 'A'; # ASCII/binary/etc mode
- ${*$ftp}{'net_ftp_blksize'} = abs($arg{'BlockSize'} || 10240);
-
- ${*$ftp}{'net_ftp_localaddr'} = $arg{'LocalAddr'};
-
- ${*$ftp}{'net_ftp_firewall'} = $fire
- if (defined $fire);
- ${*$ftp}{'net_ftp_firewall_type'} = $fire_type
- if (defined $fire_type);
-
- ${*$ftp}{'net_ftp_passive'} =
- int exists $arg{Passive} ? $arg{Passive}
- : exists $ENV{FTP_PASSIVE} ? $ENV{FTP_PASSIVE}
- : defined $fire ? $NetConfig{ftp_ext_passive}
- : $NetConfig{ftp_int_passive}; # Whew! :-)
-
- $ftp->hash(exists $arg{Hash} ? $arg{Hash} : 0, 1024);
-
- $ftp->autoflush(1);
-
- $ftp->debug(exists $arg{Debug} ? $arg{Debug} : undef);
-
- unless ($ftp->response() == CMD_OK) {
- $ftp->close();
- $@ = $ftp->message;
- undef $ftp;
- }
-
- $ftp;
-}
-
-##
-## User interface methods
-##
-
-
-sub host {
- my $me = shift;
- ${*$me}{'net_ftp_host'};
-}
-
-
-sub hash {
- my $ftp = shift; # self
-
- my ($h, $b) = @_;
- unless ($h) {
- delete ${*$ftp}{'net_ftp_hash'};
- return [\*STDERR, 0];
- }
- ($h, $b) = (ref($h) ? $h : \*STDERR, $b || 1024);
- select((select($h), $| = 1)[0]);
- $b = 512 if $b < 512;
- ${*$ftp}{'net_ftp_hash'} = [$h, $b];
-}
-
-
-sub quit {
- my $ftp = shift;
-
- $ftp->_QUIT;
- $ftp->close;
-}
-
-
-sub DESTROY { }
-
-
-sub ascii { shift->type('A', @_); }
-sub binary { shift->type('I', @_); }
-
-
-sub ebcdic {
- carp "TYPE E is unsupported, shall default to I";
- shift->type('E', @_);
-}
-
-
-sub byte {
- carp "TYPE L is unsupported, shall default to I";
- shift->type('L', @_);
-}
-
-# Allow the user to send a command directly, BE CAREFUL !!
-
-
-sub quot {
- my $ftp = shift;
- my $cmd = shift;
-
- $ftp->command(uc $cmd, @_);
- $ftp->response();
-}
-
-
-sub site {
- my $ftp = shift;
-
- $ftp->command("SITE", @_);
- $ftp->response();
-}
-
-
-sub mdtm {
- my $ftp = shift;
- my $file = shift;
-
- # Server Y2K bug workaround
- #
- # sigh; some idiotic FTP servers use ("19%d",tm.tm_year) instead of
- # ("%d",tm.tm_year+1900). This results in an extra digit in the
- # string returned. To account for this we allow an optional extra
- # digit in the year. Then if the first two digits are 19 we use the
- # remainder, otherwise we subtract 1900 from the whole year.
-
- $ftp->_MDTM($file)
- && $ftp->message =~ /((\d\d)(\d\d\d?))(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/
- ? timegm($8, $7, $6, $5, $4 - 1, $2 eq '19' ? $3 : ($1 - 1900))
- : undef;
-}
-
-
-sub size {
- my $ftp = shift;
- my $file = shift;
- my $io;
- if ($ftp->supported("SIZE")) {
- return $ftp->_SIZE($file)
- ? ($ftp->message =~ /(\d+)\s*(bytes?\s*)?$/)[0]
- : undef;
- }
- elsif ($ftp->supported("STAT")) {
- my @msg;
- return undef
- unless $ftp->_STAT($file) && (@msg = $ftp->message) == 3;
- my $line;
- foreach $line (@msg) {
- return (split(/\s+/, $line))[4]
- if $line =~ /^[-rwxSsTt]{10}/;
- }
- }
- else {
- my @files = $ftp->dir($file);
- if (@files) {
- return (split(/\s+/, $1))[4]
- if $files[0] =~ /^([-rwxSsTt]{10}.*)$/;
- }
- }
- undef;
-}
-
-
-sub login {
- my ($ftp, $user, $pass, $acct) = @_;
- my ($ok, $ruser, $fwtype);
-
- unless (defined $user) {
- require Net::Netrc;
-
- my $rc = Net::Netrc->lookup(${*$ftp}{'net_ftp_host'});
-
- ($user, $pass, $acct) = $rc->lpa()
- if ($rc);
- }
-
- $user ||= "anonymous";
- $ruser = $user;
-
- $fwtype = ${*$ftp}{'net_ftp_firewall_type'}
- || $NetConfig{'ftp_firewall_type'}
- || 0;
-
- if ($fwtype && defined ${*$ftp}{'net_ftp_firewall'}) {
- if ($fwtype == 1 || $fwtype == 7) {
- $user .= '@' . ${*$ftp}{'net_ftp_host'};
- }
- else {
- require Net::Netrc;
-
- my $rc = Net::Netrc->lookup(${*$ftp}{'net_ftp_firewall'});
-
- my ($fwuser, $fwpass, $fwacct) = $rc ? $rc->lpa() : ();
-
- if ($fwtype == 5) {
- $user = join('@', $user, $fwuser, ${*$ftp}{'net_ftp_host'});
- $pass = $pass . '@' . $fwpass;
- }
- else {
- if ($fwtype == 2) {
- $user .= '@' . ${*$ftp}{'net_ftp_host'};
- }
- elsif ($fwtype == 6) {
- $fwuser .= '@' . ${*$ftp}{'net_ftp_host'};
- }
-
- $ok = $ftp->_USER($fwuser);
-
- return 0 unless $ok == CMD_OK || $ok == CMD_MORE;
-
- $ok = $ftp->_PASS($fwpass || "");
-
- return 0 unless $ok == CMD_OK || $ok == CMD_MORE;
-
- $ok = $ftp->_ACCT($fwacct)
- if defined($fwacct);
-
- if ($fwtype == 3) {
- $ok = $ftp->command("SITE", ${*$ftp}{'net_ftp_host'})->response;
- }
- elsif ($fwtype == 4) {
- $ok = $ftp->command("OPEN", ${*$ftp}{'net_ftp_host'})->response;
- }
-
- return 0 unless $ok == CMD_OK || $ok == CMD_MORE;
- }
- }
- }
-
- $ok = $ftp->_USER($user);
-
- # Some dumb firewalls don't prefix the connection messages
- $ok = $ftp->response()
- if ($ok == CMD_OK && $ftp->code == 220 && $user =~ /\@/);
-
- if ($ok == CMD_MORE) {
- unless (defined $pass) {
- require Net::Netrc;
-
- my $rc = Net::Netrc->lookup(${*$ftp}{'net_ftp_host'}, $ruser);
-
- ($ruser, $pass, $acct) = $rc->lpa()
- if ($rc);
-
- $pass = '-anonymous@'
- if (!defined $pass && (!defined($ruser) || $ruser =~ /^anonymous/o));
- }
-
- $ok = $ftp->_PASS($pass || "");
- }
-
- $ok = $ftp->_ACCT($acct)
- if (defined($acct) && ($ok == CMD_MORE || $ok == CMD_OK));
-
- if ($fwtype == 7 && $ok == CMD_OK && defined ${*$ftp}{'net_ftp_firewall'}) {
- my ($f, $auth, $resp) = _auth_id($ftp);
- $ftp->authorize($auth, $resp) if defined($resp);
- }
-
- $ok == CMD_OK;
-}
-
-
-sub account {
- @_ == 2 or croak 'usage: $ftp->account( ACCT )';
- my $ftp = shift;
- my $acct = shift;
- $ftp->_ACCT($acct) == CMD_OK;
-}
-
-
-sub _auth_id {
- my ($ftp, $auth, $resp) = @_;
-
- unless (defined $resp) {
- require Net::Netrc;
-
- $auth ||= eval { (getpwuid($>))[0] } || $ENV{NAME};
-
- my $rc = Net::Netrc->lookup(${*$ftp}{'net_ftp_firewall'}, $auth)
- || Net::Netrc->lookup(${*$ftp}{'net_ftp_firewall'});
-
- ($auth, $resp) = $rc->lpa()
- if ($rc);
- }
- ($ftp, $auth, $resp);
-}
-
-
-sub authorize {
- @_ >= 1 || @_ <= 3 or croak 'usage: $ftp->authorize( [AUTH [, RESP]])';
-
- my ($ftp, $auth, $resp) = &_auth_id;
-
- my $ok = $ftp->_AUTH($auth || "");
-
- $ok = $ftp->_RESP($resp || "")
- if ($ok == CMD_MORE);
-
- $ok == CMD_OK;
-}
-
-
-sub rename {
- @_ == 3 or croak 'usage: $ftp->rename(FROM, TO)';
-
- my ($ftp, $from, $to) = @_;
-
- $ftp->_RNFR($from)
- && $ftp->_RNTO($to);
-}
-
-
-sub type {
- my $ftp = shift;
- my $type = shift;
- my $oldval = ${*$ftp}{'net_ftp_type'};
-
- return $oldval
- unless (defined $type);
-
- return undef
- unless ($ftp->_TYPE($type, @_));
-
- ${*$ftp}{'net_ftp_type'} = join(" ", $type, @_);
-
- $oldval;
-}
-
-
-sub alloc {
- my $ftp = shift;
- my $size = shift;
- my $oldval = ${*$ftp}{'net_ftp_allo'};
-
- return $oldval
- unless (defined $size);
-
- return undef
- unless ($ftp->_ALLO($size, @_));
-
- ${*$ftp}{'net_ftp_allo'} = join(" ", $size, @_);
-
- $oldval;
-}
-
-
-sub abort {
- my $ftp = shift;
-
- send($ftp, pack("CCC", $TELNET_IAC, $TELNET_IP, $TELNET_IAC), MSG_OOB);
-
- $ftp->command(pack("C", $TELNET_DM) . "ABOR");
-
- ${*$ftp}{'net_ftp_dataconn'}->close()
- if defined ${*$ftp}{'net_ftp_dataconn'};
-
- $ftp->response();
-
- $ftp->status == CMD_OK;
-}
-
-
-sub get {
- my ($ftp, $remote, $local, $where) = @_;
-
- my ($loc, $len, $buf, $resp, $data);
- local *FD;
-
- my $localfd = ref($local) || ref(\$local) eq "GLOB";
-
- ($local = $remote) =~ s#^.*/##
- unless (defined $local);
-
- croak("Bad remote filename '$remote'\n")
- if $remote =~ /[\r\n]/s;
-
- ${*$ftp}{'net_ftp_rest'} = $where if defined $where;
- my $rest = ${*$ftp}{'net_ftp_rest'};
-
- delete ${*$ftp}{'net_ftp_port'};
- delete ${*$ftp}{'net_ftp_pasv'};
-
- $data = $ftp->retr($remote)
- or return undef;
-
- if ($localfd) {
- $loc = $local;
- }
- else {
- $loc = \*FD;
-
- unless (sysopen($loc, $local, O_CREAT | O_WRONLY | ($rest ? O_APPEND: O_TRUNC))) {
- carp "Cannot open Local file $local: $!\n";
- $data->abort;
- return undef;
- }
- }
-
- if ($ftp->type eq 'I' && !binmode($loc)) {
- carp "Cannot binmode Local file $local: $!\n";
- $data->abort;
- close($loc) unless $localfd;
- return undef;
- }
-
- $buf = '';
- my ($count, $hashh, $hashb, $ref) = (0);
-
- ($hashh, $hashb) = @$ref
- if ($ref = ${*$ftp}{'net_ftp_hash'});
-
- my $blksize = ${*$ftp}{'net_ftp_blksize'};
- local $\; # Just in case
-
- while (1) {
- last unless $len = $data->read($buf, $blksize);
-
- if (trEBCDIC && $ftp->type ne 'I') {
- $buf = $ftp->toebcdic($buf);
- $len = length($buf);
- }
-
- if ($hashh) {
- $count += $len;
- print $hashh "#" x (int($count / $hashb));
- $count %= $hashb;
- }
- unless (print $loc $buf) {
- carp "Cannot write to Local file $local: $!\n";
- $data->abort;
- close($loc)
- unless $localfd;
- return undef;
- }
- }
-
- print $hashh "\n" if $hashh;
-
- unless ($localfd) {
- unless (close($loc)) {
- carp "Cannot close file $local (perhaps disk space) $!\n";
- return undef;
- }
- }
-
- unless ($data->close()) # implied $ftp->response
- {
- carp "Unable to close datastream";
- return undef;
- }
-
- return $local;
-}
-
-
-sub cwd {
- @_ == 1 || @_ == 2 or croak 'usage: $ftp->cwd( [ DIR ] )';
-
- my ($ftp, $dir) = @_;
-
- $dir = "/" unless defined($dir) && $dir =~ /\S/;
-
- $dir eq ".."
- ? $ftp->_CDUP()
- : $ftp->_CWD($dir);
-}
-
-
-sub cdup {
- @_ == 1 or croak 'usage: $ftp->cdup()';
- $_[0]->_CDUP;
-}
-
-
-sub pwd {
- @_ == 1 || croak 'usage: $ftp->pwd()';
- my $ftp = shift;
-
- $ftp->_PWD();
- $ftp->_extract_path;
-}
-
-# rmdir( $ftp, $dir, [ $recurse ] )
-#
-# Removes $dir on remote host via FTP.
-# $ftp is handle for remote host
-#
-# If $recurse is TRUE, the directory and deleted recursively.
-# This means all of its contents and subdirectories.
-#
-# Initial version contributed by Dinkum Software
-#
-sub rmdir {
- @_ == 2 || @_ == 3 or croak('usage: $ftp->rmdir( DIR [, RECURSE ] )');
-
- # Pick off the args
- my ($ftp, $dir, $recurse) = @_;
- my $ok;
-
- return $ok
- if $ok = $ftp->_RMD($dir)
- or !$recurse;
-
- # Try to delete the contents
- # Get a list of all the files in the directory
- my @filelist = grep { !/^\.{1,2}$/ } $ftp->ls($dir);
-
- return undef
- unless @filelist; # failed, it is probably not a directory
-
- # Go thru and delete each file or the directory
- my $file;
- foreach $file (map { m,/, ? $_ : "$dir/$_" } @filelist) {
- next # successfully deleted the file
- if $ftp->delete($file);
-
- # Failed to delete it, assume its a directory
- # Recurse and ignore errors, the final rmdir() will
- # fail on any errors here
- return $ok
- unless $ok = $ftp->rmdir($file, 1);
- }
-
- # Directory should be empty
- # Try to remove the directory again
- # Pass results directly to caller
- # If any of the prior deletes failed, this
- # rmdir() will fail because directory is not empty
- return $ftp->_RMD($dir);
-}
-
-
-sub restart {
- @_ == 2 || croak 'usage: $ftp->restart( BYTE_OFFSET )';
-
- my ($ftp, $where) = @_;
-
- ${*$ftp}{'net_ftp_rest'} = $where;
-
- return undef;
-}
-
-
-sub mkdir {
- @_ == 2 || @_ == 3 or croak 'usage: $ftp->mkdir( DIR [, RECURSE ] )';
-
- my ($ftp, $dir, $recurse) = @_;
-
- $ftp->_MKD($dir) || $recurse
- or return undef;
-
- my $path = $dir;
-
- unless ($ftp->ok) {
- my @path = split(m#(?=/+)#, $dir);
-
- $path = "";
-
- while (@path) {
- $path .= shift @path;
-
- $ftp->_MKD($path);
-
- $path = $ftp->_extract_path($path);
- }
-
- # If the creation of the last element was not successful, see if we
- # can cd to it, if so then return path
-
- unless ($ftp->ok) {
- my ($status, $message) = ($ftp->status, $ftp->message);
- my $pwd = $ftp->pwd;
-
- if ($pwd && $ftp->cwd($dir)) {
- $path = $dir;
- $ftp->cwd($pwd);
- }
- else {
- undef $path;
- }
- $ftp->set_status($status, $message);
- }
- }
-
- $path;
-}
-
-
-sub delete {
- @_ == 2 || croak 'usage: $ftp->delete( FILENAME )';
-
- $_[0]->_DELE($_[1]);
-}
-
-
-sub put { shift->_store_cmd("stor", @_) }
-sub put_unique { shift->_store_cmd("stou", @_) }
-sub append { shift->_store_cmd("appe", @_) }
-
-
-sub nlst { shift->_data_cmd("NLST", @_) }
-sub list { shift->_data_cmd("LIST", @_) }
-sub retr { shift->_data_cmd("RETR", @_) }
-sub stor { shift->_data_cmd("STOR", @_) }
-sub stou { shift->_data_cmd("STOU", @_) }
-sub appe { shift->_data_cmd("APPE", @_) }
-
-
-sub _store_cmd {
- my ($ftp, $cmd, $local, $remote) = @_;
- my ($loc, $sock, $len, $buf);
- local *FD;
-
- my $localfd = ref($local) || ref(\$local) eq "GLOB";
-
- unless (defined $remote) {
- croak 'Must specify remote filename with stream input'
- if $localfd;
-
- require File::Basename;
- $remote = File::Basename::basename($local);
- }
- if (defined ${*$ftp}{'net_ftp_allo'}) {
- delete ${*$ftp}{'net_ftp_allo'};
- }
- else {
-
- # if the user hasn't already invoked the alloc method since the last
- # _store_cmd call, figure out if the local file is a regular file(not
- # a pipe, or device) and if so get the file size from stat, and send
- # an ALLO command before sending the STOR, STOU, or APPE command.
- my $size = do { local $^W; -f $local && -s _ }; # no ALLO if sending data from a pipe
- $ftp->_ALLO($size) if $size;
- }
- croak("Bad remote filename '$remote'\n")
- if $remote =~ /[\r\n]/s;
-
- if ($localfd) {
- $loc = $local;
- }
- else {
- $loc = \*FD;
-
- unless (sysopen($loc, $local, O_RDONLY)) {
- carp "Cannot open Local file $local: $!\n";
- return undef;
- }
- }
-
- if ($ftp->type eq 'I' && !binmode($loc)) {
- carp "Cannot binmode Local file $local: $!\n";
- return undef;
- }
-
- delete ${*$ftp}{'net_ftp_port'};
- delete ${*$ftp}{'net_ftp_pasv'};
-
- $sock = $ftp->_data_cmd($cmd, $remote)
- or return undef;
-
- $remote = ($ftp->message =~ /FILE:\s*(.*)/)[0]
- if 'STOU' eq uc $cmd;
-
- my $blksize = ${*$ftp}{'net_ftp_blksize'};
-
- my ($count, $hashh, $hashb, $ref) = (0);
-
- ($hashh, $hashb) = @$ref
- if ($ref = ${*$ftp}{'net_ftp_hash'});
-
- while (1) {
- last unless $len = read($loc, $buf = "", $blksize);
-
- if (trEBCDIC && $ftp->type ne 'I') {
- $buf = $ftp->toascii($buf);
- $len = length($buf);
- }
-
- if ($hashh) {
- $count += $len;
- print $hashh "#" x (int($count / $hashb));
- $count %= $hashb;
- }
-
- my $wlen;
- unless (defined($wlen = $sock->write($buf, $len)) && $wlen == $len) {
- $sock->abort;
- close($loc)
- unless $localfd;
- print $hashh "\n" if $hashh;
- return undef;
- }
- }
-
- print $hashh "\n" if $hashh;
-
- close($loc)
- unless $localfd;
-
- $sock->close()
- or return undef;
-
- if ('STOU' eq uc $cmd and $ftp->message =~ m/unique\s+file\s*name\s*:\s*(.*)\)|"(.*)"/) {
- require File::Basename;
- $remote = File::Basename::basename($+);
- }
-
- return $remote;
-}
-
-
-sub port {
- @_ == 1 || @_ == 2 or croak 'usage: $ftp->port([PORT])';
-
- my ($ftp, $port) = @_;
- my $ok;
-
- delete ${*$ftp}{'net_ftp_intern_port'};
-
- unless (defined $port) {
-
- # create a Listen socket at same address as the command socket
-
- ${*$ftp}{'net_ftp_listen'} ||= IO::Socket::INET->new(
- Listen => 5,
- Proto => 'tcp',
- Timeout => $ftp->timeout,
- LocalAddr => $ftp->sockhost,
- );
-
- my $listen = ${*$ftp}{'net_ftp_listen'};
-
- my ($myport, @myaddr) = ($listen->sockport, split(/\./, $listen->sockhost));
-
- $port = join(',', @myaddr, $myport >> 8, $myport & 0xff);
-
- ${*$ftp}{'net_ftp_intern_port'} = 1;
- }
-
- $ok = $ftp->_PORT($port);
-
- ${*$ftp}{'net_ftp_port'} = $port;
-
- $ok;
-}
-
-
-sub ls { shift->_list_cmd("NLST", @_); }
-sub dir { shift->_list_cmd("LIST", @_); }
-
-
-sub pasv {
- @_ == 1 or croak 'usage: $ftp->pasv()';
-
- my $ftp = shift;
-
- delete ${*$ftp}{'net_ftp_intern_port'};
-
- $ftp->_PASV && $ftp->message =~ /(\d+(,\d+)+)/
- ? ${*$ftp}{'net_ftp_pasv'} = $1
- : undef;
-}
-
-
-sub unique_name {
- my $ftp = shift;
- ${*$ftp}{'net_ftp_unique'} || undef;
-}
-
-
-sub supported {
- @_ == 2 or croak 'usage: $ftp->supported( CMD )';
- my $ftp = shift;
- my $cmd = uc shift;
- my $hash = ${*$ftp}{'net_ftp_supported'} ||= {};
-
- return $hash->{$cmd}
- if exists $hash->{$cmd};
-
- return $hash->{$cmd} = 0
- unless $ftp->_HELP($cmd);
-
- my $text = $ftp->message;
- if ($text =~ /following\s+commands/i) {
- $text =~ s/^.*\n//;
- while ($text =~ /(\*?)(\w+)(\*?)/sg) {
- $hash->{"\U$2"} = !length("$1$3");
- }
- }
- else {
- $hash->{$cmd} = $text !~ /unimplemented/i;
- }
-
- $hash->{$cmd} ||= 0;
-}
-
-##
-## Deprecated methods
-##
-
-
-sub lsl {
- carp "Use of Net::FTP::lsl deprecated, use 'dir'"
- if $^W;
- goto &dir;
-}
-
-
-sub authorise {
- carp "Use of Net::FTP::authorise deprecated, use 'authorize'"
- if $^W;
- goto &authorize;
-}
-
-
-##
-## Private methods
-##
-
-
-sub _extract_path {
- my ($ftp, $path) = @_;
-
- # This tries to work both with and without the quote doubling
- # convention (RFC 959 requires it, but the first 3 servers I checked
- # didn't implement it). It will fail on a server which uses a quote in
- # the message which isn't a part of or surrounding the path.
- $ftp->ok
- && $ftp->message =~ /(?:^|\s)\"(.*)\"(?:$|\s)/
- && ($path = $1) =~ s/\"\"/\"/g;
-
- $path;
-}
-
-##
-## Communication methods
-##
-
-
-sub _dataconn {
- my $ftp = shift;
- my $data = undef;
- my $pkg = "Net::FTP::" . $ftp->type;
-
- eval "require " . $pkg;
-
- $pkg =~ s/ /_/g;
-
- delete ${*$ftp}{'net_ftp_dataconn'};
-
- if (defined ${*$ftp}{'net_ftp_pasv'}) {
- my @port = map { 0 + $_ } split(/,/, ${*$ftp}{'net_ftp_pasv'});
-
- $data = $pkg->new(
- PeerAddr => join(".", @port[0 .. 3]),
- PeerPort => $port[4] * 256 + $port[5],
- LocalAddr => ${*$ftp}{'net_ftp_localaddr'},
- Proto => 'tcp'
- );
- }
- elsif (defined ${*$ftp}{'net_ftp_listen'}) {
- $data = ${*$ftp}{'net_ftp_listen'}->accept($pkg);
- close(delete ${*$ftp}{'net_ftp_listen'});
- }
-
- if ($data) {
- ${*$data} = "";
- $data->timeout($ftp->timeout);
- ${*$ftp}{'net_ftp_dataconn'} = $data;
- ${*$data}{'net_ftp_cmd'} = $ftp;
- ${*$data}{'net_ftp_blksize'} = ${*$ftp}{'net_ftp_blksize'};
- }
-
- $data;
-}
-
-
-sub _list_cmd {
- my $ftp = shift;
- my $cmd = uc shift;
-
- delete ${*$ftp}{'net_ftp_port'};
- delete ${*$ftp}{'net_ftp_pasv'};
-
- my $data = $ftp->_data_cmd($cmd, @_);
-
- return
- unless (defined $data);
-
- require Net::FTP::A;
- bless $data, "Net::FTP::A"; # Force ASCII mode
-
- my $databuf = '';
- my $buf = '';
- my $blksize = ${*$ftp}{'net_ftp_blksize'};
-
- while ($data->read($databuf, $blksize)) {
- $buf .= $databuf;
- }
-
- my $list = [split(/\n/, $buf)];
-
- $data->close();
-
- if (trEBCDIC) {
- for (@$list) { $_ = $ftp->toebcdic($_) }
- }
-
- wantarray
- ? @{$list}
- : $list;
-}
-
-
-sub _data_cmd {
- my $ftp = shift;
- my $cmd = uc shift;
- my $ok = 1;
- my $where = delete ${*$ftp}{'net_ftp_rest'} || 0;
- my $arg;
-
- for $arg (@_) {
- croak("Bad argument '$arg'\n")
- if $arg =~ /[\r\n]/s;
- }
-
- if ( ${*$ftp}{'net_ftp_passive'}
- && !defined ${*$ftp}{'net_ftp_pasv'}
- && !defined ${*$ftp}{'net_ftp_port'})
- {
- my $data = undef;
-
- $ok = defined $ftp->pasv;
- $ok = $ftp->_REST($where)
- if $ok && $where;
-
- if ($ok) {
- $ftp->command($cmd, @_);
- $data = $ftp->_dataconn();
- $ok = CMD_INFO == $ftp->response();
- if ($ok) {
- $data->reading
- if $data && $cmd =~ /RETR|LIST|NLST/;
- return $data;
- }
- $data->_close
- if $data;
- }
- return undef;
- }
-
- $ok = $ftp->port
- unless (defined ${*$ftp}{'net_ftp_port'}
- || defined ${*$ftp}{'net_ftp_pasv'});
-
- $ok = $ftp->_REST($where)
- if $ok && $where;
-
- return undef
- unless $ok;
-
- $ftp->command($cmd, @_);
-
- return 1
- if (defined ${*$ftp}{'net_ftp_pasv'});
-
- $ok = CMD_INFO == $ftp->response();
-
- return $ok
- unless exists ${*$ftp}{'net_ftp_intern_port'};
-
- if ($ok) {
- my $data = $ftp->_dataconn();
-
- $data->reading
- if $data && $cmd =~ /RETR|LIST|NLST/;
-
- return $data;
- }
-
-
- close(delete ${*$ftp}{'net_ftp_listen'});
-
- return undef;
-}
-
-##
-## Over-ride methods (Net::Cmd)
-##
-
-
-sub debug_text { $_[2] =~ /^(pass|resp|acct)/i ? "$1 ....\n" : $_[2]; }
-
-
-sub command {
- my $ftp = shift;
-
- delete ${*$ftp}{'net_ftp_port'};
- $ftp->SUPER::command(@_);
-}
-
-
-sub response {
- my $ftp = shift;
- my $code = $ftp->SUPER::response();
-
- delete ${*$ftp}{'net_ftp_pasv'}
- if ($code != CMD_MORE && $code != CMD_INFO);
-
- $code;
-}
-
-
-sub parse_response {
- return ($1, $2 eq "-")
- if $_[1] =~ s/^(\d\d\d)([- ]?)//o;
-
- my $ftp = shift;
-
- # Darn MS FTP server is a load of CRAP !!!!
- return ()
- unless ${*$ftp}{'net_cmd_code'} + 0;
-
- (${*$ftp}{'net_cmd_code'}, 1);
-}
-
-##
-## Allow 2 servers to talk directly
-##
-
-
-sub pasv_xfer_unique {
- my ($sftp, $sfile, $dftp, $dfile) = @_;
- $sftp->pasv_xfer($sfile, $dftp, $dfile, 1);
-}
-
-
-sub pasv_xfer {
- my ($sftp, $sfile, $dftp, $dfile, $unique) = @_;
-
- ($dfile = $sfile) =~ s#.*/##
- unless (defined $dfile);
-
- my $port = $sftp->pasv
- or return undef;
-
- $dftp->port($port)
- or return undef;
-
- return undef
- unless ($unique ? $dftp->stou($dfile) : $dftp->stor($dfile));
-
- unless ($sftp->retr($sfile) && $sftp->response == CMD_INFO) {
- $sftp->retr($sfile);
- $dftp->abort;
- $dftp->response();
- return undef;
- }
-
- $dftp->pasv_wait($sftp);
-}
-
-
-sub pasv_wait {
- @_ == 2 or croak 'usage: $ftp->pasv_wait(NON_PASV_FTP)';
-
- my ($ftp, $non_pasv) = @_;
- my ($file, $rin, $rout);
-
- vec($rin = '', fileno($ftp), 1) = 1;
- select($rout = $rin, undef, undef, undef);
-
- $ftp->response();
- $non_pasv->response();
-
- return undef
- unless $ftp->ok() && $non_pasv->ok();
-
- return $1
- if $ftp->message =~ /unique file name:\s*(\S*)\s*\)/;
-
- return $1
- if $non_pasv->message =~ /unique file name:\s*(\S*)\s*\)/;
-
- return 1;
-}
-
-
-sub feature {
- @_ == 2 or croak 'usage: $ftp->feature( NAME )';
- my ($ftp, $feat) = @_;
-
- my $feature = ${*$ftp}{net_ftp_feature} ||= do {
- my @feat;
-
- # Example response
- # 211-Features:
- # MDTM
- # REST STREAM
- # SIZE
- # 211 End
-
- @feat = map { /^\s+(.*\S)/ } $ftp->message
- if $ftp->_FEAT;
-
- \@feat;
- };
-
- return grep { /^\Q$feat\E\b/i } @$feature;
-}
-
-
-sub cmd { shift->command(@_)->response() }
-
-########################################
-#
-# RFC959 commands
-#
-
-
-sub _ABOR { shift->command("ABOR")->response() == CMD_OK }
-sub _ALLO { shift->command("ALLO", @_)->response() == CMD_OK }
-sub _CDUP { shift->command("CDUP")->response() == CMD_OK }
-sub _NOOP { shift->command("NOOP")->response() == CMD_OK }
-sub _PASV { shift->command("PASV")->response() == CMD_OK }
-sub _QUIT { shift->command("QUIT")->response() == CMD_OK }
-sub _DELE { shift->command("DELE", @_)->response() == CMD_OK }
-sub _CWD { shift->command("CWD", @_)->response() == CMD_OK }
-sub _PORT { shift->command("PORT", @_)->response() == CMD_OK }
-sub _RMD { shift->command("RMD", @_)->response() == CMD_OK }
-sub _MKD { shift->command("MKD", @_)->response() == CMD_OK }
-sub _PWD { shift->command("PWD", @_)->response() == CMD_OK }
-sub _TYPE { shift->command("TYPE", @_)->response() == CMD_OK }
-sub _RNTO { shift->command("RNTO", @_)->response() == CMD_OK }
-sub _RESP { shift->command("RESP", @_)->response() == CMD_OK }
-sub _MDTM { shift->command("MDTM", @_)->response() == CMD_OK }
-sub _SIZE { shift->command("SIZE", @_)->response() == CMD_OK }
-sub _HELP { shift->command("HELP", @_)->response() == CMD_OK }
-sub _STAT { shift->command("STAT", @_)->response() == CMD_OK }
-sub _FEAT { shift->command("FEAT", @_)->response() == CMD_OK }
-sub _APPE { shift->command("APPE", @_)->response() == CMD_INFO }
-sub _LIST { shift->command("LIST", @_)->response() == CMD_INFO }
-sub _NLST { shift->command("NLST", @_)->response() == CMD_INFO }
-sub _RETR { shift->command("RETR", @_)->response() == CMD_INFO }
-sub _STOR { shift->command("STOR", @_)->response() == CMD_INFO }
-sub _STOU { shift->command("STOU", @_)->response() == CMD_INFO }
-sub _RNFR { shift->command("RNFR", @_)->response() == CMD_MORE }
-sub _REST { shift->command("REST", @_)->response() == CMD_MORE }
-sub _PASS { shift->command("PASS", @_)->response() }
-sub _ACCT { shift->command("ACCT", @_)->response() }
-sub _AUTH { shift->command("AUTH", @_)->response() }
-
-
-sub _USER {
- my $ftp = shift;
- my $ok = $ftp->command("USER", @_)->response();
-
- # A certain brain dead firewall :-)
- $ok = $ftp->command("user", @_)->response()
- unless $ok == CMD_MORE or $ok == CMD_OK;
-
- $ok;
-}
-
-
-sub _SMNT { shift->unsupported(@_) }
-sub _MODE { shift->unsupported(@_) }
-sub _SYST { shift->unsupported(@_) }
-sub _STRU { shift->unsupported(@_) }
-sub _REIN { shift->unsupported(@_) }
-
-1;
-
-__END__
-
-=head1 NAME
-
-Net::FTP - FTP Client class
-
-=head1 SYNOPSIS
-
- use Net::FTP;
-
- $ftp = Net::FTP->new("some.host.name", Debug => 0)
- or die "Cannot connect to some.host.name: $@";
-
- $ftp->login("anonymous",'-anonymous@')
- or die "Cannot login ", $ftp->message;
-
- $ftp->cwd("/pub")
- or die "Cannot change working directory ", $ftp->message;
-
- $ftp->get("that.file")
- or die "get failed ", $ftp->message;
-
- $ftp->quit;
-
-=head1 DESCRIPTION
-
-C<Net::FTP> is a class implementing a simple FTP client in Perl as
-described in RFC959. It provides wrappers for a subset of the RFC959
-commands.
-
-=head1 OVERVIEW
-
-FTP stands for File Transfer Protocol. It is a way of transferring
-files between networked machines. The protocol defines a client
-(whose commands are provided by this module) and a server (not
-implemented in this module). Communication is always initiated by the
-client, and the server responds with a message and a status code (and
-sometimes with data).
-
-The FTP protocol allows files to be sent to or fetched from the
-server. Each transfer involves a B<local file> (on the client) and a
-B<remote file> (on the server). In this module, the same file name
-will be used for both local and remote if only one is specified. This
-means that transferring remote file C</path/to/file> will try to put
-that file in C</path/to/file> locally, unless you specify a local file
-name.
-
-The protocol also defines several standard B<translations> which the
-file can undergo during transfer. These are ASCII, EBCDIC, binary,
-and byte. ASCII is the default type, and indicates that the sender of
-files will translate the ends of lines to a standard representation
-which the receiver will then translate back into their local
-representation. EBCDIC indicates the file being transferred is in
-EBCDIC format. Binary (also known as image) format sends the data as
-a contiguous bit stream. Byte format transfers the data as bytes, the
-values of which remain the same regardless of differences in byte size
-between the two machines (in theory - in practice you should only use
-this if you really know what you're doing).
-
-=head1 CONSTRUCTOR
-
-=over 4
-
-=item new ([ HOST ] [, OPTIONS ])
-
-This is the constructor for a new Net::FTP object. C<HOST> is the
-name of the remote host to which an FTP connection is required.
-
-C<HOST> is optional. If C<HOST> is not given then it may instead be
-passed as the C<Host> option described below.
-
-C<OPTIONS> are passed in a hash like fashion, using key and value pairs.
-Possible options are:
-
-B<Host> - FTP host to connect to. It may be a single scalar, as defined for
-the C<PeerAddr> option in L<IO::Socket::INET>, or a reference to
-an array with hosts to try in turn. The L</host> method will return the value
-which was used to connect to the host.
-
-
-B<Firewall> - The name of a machine which acts as an FTP firewall. This can be
-overridden by an environment variable C<FTP_FIREWALL>. If specified, and the
-given host cannot be directly connected to, then the
-connection is made to the firewall machine and the string C<@hostname> is
-appended to the login identifier. This kind of setup is also referred to
-as an ftp proxy.
-
-B<FirewallType> - The type of firewall running on the machine indicated by
-B<Firewall>. This can be overridden by an environment variable
-C<FTP_FIREWALL_TYPE>. For a list of permissible types, see the description of
-ftp_firewall_type in L<Net::Config>.
-
-B<BlockSize> - This is the block size that Net::FTP will use when doing
-transfers. (defaults to 10240)
-
-B<Port> - The port number to connect to on the remote machine for the
-FTP connection
-
-B<Timeout> - Set a timeout value (defaults to 120)
-
-B<Debug> - debug level (see the debug method in L<Net::Cmd>)
-
-B<Passive> - If set to a non-zero value then all data transfers will
-be done using passive mode. If set to zero then data transfers will be
-done using active mode. If the machine is connected to the Internet
-directly, both passive and active mode should work equally well.
-Behind most firewall and NAT configurations passive mode has a better
-chance of working. However, in some rare firewall configurations,
-active mode actually works when passive mode doesn't. Some really old
-FTP servers might not implement passive transfers. If not specified,
-then the transfer mode is set by the environment variable
-C<FTP_PASSIVE> or if that one is not set by the settings done by the
-F<libnetcfg> utility. If none of these apply then passive mode is
-used.
-
-B<Hash> - If given a reference to a file handle (e.g., C<\*STDERR>),
-print hash marks (#) on that filehandle every 1024 bytes. This
-simply invokes the C<hash()> method for you, so that hash marks
-are displayed for all transfers. You can, of course, call C<hash()>
-explicitly whenever you'd like.
-
-B<LocalAddr> - Local address to use for all socket connections, this
-argument will be passed to L<IO::Socket::INET>
-
-If the constructor fails undef will be returned and an error message will
-be in $@
-
-=back
-
-=head1 METHODS
-
-Unless otherwise stated all methods return either a I<true> or I<false>
-value, with I<true> meaning that the operation was a success. When a method
-states that it returns a value, failure will be returned as I<undef> or an
-empty list.
-
-=over 4
-
-=item login ([LOGIN [,PASSWORD [, ACCOUNT] ] ])
-
-Log into the remote FTP server with the given login information. If
-no arguments are given then the C<Net::FTP> uses the C<Net::Netrc>
-package to lookup the login information for the connected host.
-If no information is found then a login of I<anonymous> is used.
-If no password is given and the login is I<anonymous> then I<anonymous@>
-will be used for password.
-
-If the connection is via a firewall then the C<authorize> method will
-be called with no arguments.
-
-=item authorize ( [AUTH [, RESP]])
-
-This is a protocol used by some firewall ftp proxies. It is used
-to authorise the user to send data out. If both arguments are not specified
-then C<authorize> uses C<Net::Netrc> to do a lookup.
-
-=item site (ARGS)
-
-Send a SITE command to the remote server and wait for a response.
-
-Returns most significant digit of the response code.
-
-=item ascii
-
-Transfer file in ASCII. CRLF translation will be done if required
-
-=item binary
-
-Transfer file in binary mode. No transformation will be done.
-
-B<Hint>: If both server and client machines use the same line ending for
-text files, then it will be faster to transfer all files in binary mode.
-
-=item rename ( OLDNAME, NEWNAME )
-
-Rename a file on the remote FTP server from C<OLDNAME> to C<NEWNAME>. This
-is done by sending the RNFR and RNTO commands.
-
-=item delete ( FILENAME )
-
-Send a request to the server to delete C<FILENAME>.
-
-=item cwd ( [ DIR ] )
-
-Attempt to change directory to the directory given in C<$dir>. If
-C<$dir> is C<"..">, the FTP C<CDUP> command is used to attempt to
-move up one directory. If no directory is given then an attempt is made
-to change the directory to the root directory.
-
-=item cdup ()
-
-Change directory to the parent of the current directory.
-
-=item pwd ()
-
-Returns the full pathname of the current directory.
-
-=item restart ( WHERE )
-
-Set the byte offset at which to begin the next data transfer. Net::FTP simply
-records this value and uses it when during the next data transfer. For this
-reason this method will not return an error, but setting it may cause
-a subsequent data transfer to fail.
-
-=item rmdir ( DIR [, RECURSE ])
-
-Remove the directory with the name C<DIR>. If C<RECURSE> is I<true> then
-C<rmdir> will attempt to delete everything inside the directory.
-
-=item mkdir ( DIR [, RECURSE ])
-
-Create a new directory with the name C<DIR>. If C<RECURSE> is I<true> then
-C<mkdir> will attempt to create all the directories in the given path.
-
-Returns the full pathname to the new directory.
-
-=item alloc ( SIZE [, RECORD_SIZE] )
-
-The alloc command allows you to give the ftp server a hint about the size
-of the file about to be transferred using the ALLO ftp command. Some storage
-systems use this to make intelligent decisions about how to store the file.
-The C<SIZE> argument represents the size of the file in bytes. The
-C<RECORD_SIZE> argument indicates a maximum record or page size for files
-sent with a record or page structure.
-
-The size of the file will be determined, and sent to the server
-automatically for normal files so that this method need only be called if
-you are transferring data from a socket, named pipe, or other stream not
-associated with a normal file.
-
-=item ls ( [ DIR ] )
-
-Get a directory listing of C<DIR>, or the current directory.
-
-In an array context, returns a list of lines returned from the server. In
-a scalar context, returns a reference to a list.
-
-=item dir ( [ DIR ] )
-
-Get a directory listing of C<DIR>, or the current directory in long format.
-
-In an array context, returns a list of lines returned from the server. In
-a scalar context, returns a reference to a list.
-
-=item get ( REMOTE_FILE [, LOCAL_FILE [, WHERE]] )
-
-Get C<REMOTE_FILE> from the server and store locally. C<LOCAL_FILE> may be
-a filename or a filehandle. If not specified, the file will be stored in
-the current directory with the same leafname as the remote file.
-
-If C<WHERE> is given then the first C<WHERE> bytes of the file will
-not be transferred, and the remaining bytes will be appended to
-the local file if it already exists.
-
-Returns C<LOCAL_FILE>, or the generated local file name if C<LOCAL_FILE>
-is not given. If an error was encountered undef is returned.
-
-=item put ( LOCAL_FILE [, REMOTE_FILE ] )
-
-Put a file on the remote server. C<LOCAL_FILE> may be a name or a filehandle.
-If C<LOCAL_FILE> is a filehandle then C<REMOTE_FILE> must be specified. If
-C<REMOTE_FILE> is not specified then the file will be stored in the current
-directory with the same leafname as C<LOCAL_FILE>.
-
-Returns C<REMOTE_FILE>, or the generated remote filename if C<REMOTE_FILE>
-is not given.
-
-B<NOTE>: If for some reason the transfer does not complete and an error is
-returned then the contents that had been transferred will not be remove
-automatically.
-
-=item put_unique ( LOCAL_FILE [, REMOTE_FILE ] )
-
-Same as put but uses the C<STOU> command.
-
-Returns the name of the file on the server.
-
-=item append ( LOCAL_FILE [, REMOTE_FILE ] )
-
-Same as put but appends to the file on the remote server.
-
-Returns C<REMOTE_FILE>, or the generated remote filename if C<REMOTE_FILE>
-is not given.
-
-=item unique_name ()
-
-Returns the name of the last file stored on the server using the
-C<STOU> command.
-
-=item mdtm ( FILE )
-
-Returns the I<modification time> of the given file
-
-=item size ( FILE )
-
-Returns the size in bytes for the given file as stored on the remote server.
-
-B<NOTE>: The size reported is the size of the stored file on the remote server.
-If the file is subsequently transferred from the server in ASCII mode
-and the remote server and local machine have different ideas about
-"End Of Line" then the size of file on the local machine after transfer
-may be different.
-
-=item supported ( CMD )
-
-Returns TRUE if the remote server supports the given command.
-
-=item hash ( [FILEHANDLE_GLOB_REF],[ BYTES_PER_HASH_MARK] )
-
-Called without parameters, or with the first argument false, hash marks
-are suppressed. If the first argument is true but not a reference to a
-file handle glob, then \*STDERR is used. The second argument is the number
-of bytes per hash mark printed, and defaults to 1024. In all cases the
-return value is a reference to an array of two: the filehandle glob reference
-and the bytes per hash mark.
-
-=item feature ( NAME )
-
-Determine if the server supports the specified feature. The return
-value is a list of lines the server responded with to describe the
-options that it supports for the given feature. If the feature is
-unsupported then the empty list is returned.
-
- if ($ftp->feature( 'MDTM' )) {
- # Do something
- }
-
- if (grep { /\bTLS\b/ } $ftp->feature('AUTH')) {
- # Server supports TLS
- }
-
-=back
-
-The following methods can return different results depending on
-how they are called. If the user explicitly calls either
-of the C<pasv> or C<port> methods then these methods will
-return a I<true> or I<false> value. If the user does not
-call either of these methods then the result will be a
-reference to a C<Net::FTP::dataconn> based object.
-
-=over 4
-
-=item nlst ( [ DIR ] )
-
-Send an C<NLST> command to the server, with an optional parameter.
-
-=item list ( [ DIR ] )
-
-Same as C<nlst> but using the C<LIST> command
-
-=item retr ( FILE )
-
-Begin the retrieval of a file called C<FILE> from the remote server.
-
-=item stor ( FILE )
-
-Tell the server that you wish to store a file. C<FILE> is the
-name of the new file that should be created.
-
-=item stou ( FILE )
-
-Same as C<stor> but using the C<STOU> command. The name of the unique
-file which was created on the server will be available via the C<unique_name>
-method after the data connection has been closed.
-
-=item appe ( FILE )
-
-Tell the server that we want to append some data to the end of a file
-called C<FILE>. If this file does not exist then create it.
-
-=back
-
-If for some reason you want to have complete control over the data connection,
-this includes generating it and calling the C<response> method when required,
-then the user can use these methods to do so.
-
-However calling these methods only affects the use of the methods above that
-can return a data connection. They have no effect on methods C<get>, C<put>,
-C<put_unique> and those that do not require data connections.
-
-=over 4
-
-=item port ( [ PORT ] )
-
-Send a C<PORT> command to the server. If C<PORT> is specified then it is sent
-to the server. If not, then a listen socket is created and the correct information
-sent to the server.
-
-=item pasv ()
-
-Tell the server to go into passive mode. Returns the text that represents the
-port on which the server is listening, this text is in a suitable form to
-sent to another ftp server using the C<port> method.
-
-=back
-
-The following methods can be used to transfer files between two remote
-servers, providing that these two servers can connect directly to each other.
-
-=over 4
-
-=item pasv_xfer ( SRC_FILE, DEST_SERVER [, DEST_FILE ] )
-
-This method will do a file transfer between two remote ftp servers. If
-C<DEST_FILE> is omitted then the leaf name of C<SRC_FILE> will be used.
-
-=item pasv_xfer_unique ( SRC_FILE, DEST_SERVER [, DEST_FILE ] )
-
-Like C<pasv_xfer> but the file is stored on the remote server using
-the STOU command.
-
-=item pasv_wait ( NON_PASV_SERVER )
-
-This method can be used to wait for a transfer to complete between a passive
-server and a non-passive server. The method should be called on the passive
-server with the C<Net::FTP> object for the non-passive server passed as an
-argument.
-
-=item abort ()
-
-Abort the current data transfer.
-
-=item quit ()
-
-Send the QUIT command to the remote FTP server and close the socket connection.
-
-=back
-
-=head2 Methods for the adventurous
-
-C<Net::FTP> inherits from C<Net::Cmd> so methods defined in C<Net::Cmd> may
-be used to send commands to the remote FTP server.
-
-=over 4
-
-=item quot (CMD [,ARGS])
-
-Send a command, that Net::FTP does not directly support, to the remote
-server and wait for a response.
-
-Returns most significant digit of the response code.
-
-B<WARNING> This call should only be used on commands that do not require
-data connections. Misuse of this method can hang the connection.
-
-=back
-
-=head1 THE dataconn CLASS
-
-Some of the methods defined in C<Net::FTP> return an object which will
-be derived from this class.The dataconn class itself is derived from
-the C<IO::Socket::INET> class, so any normal IO operations can be performed.
-However the following methods are defined in the dataconn class and IO should
-be performed using these.
-
-=over 4
-
-=item read ( BUFFER, SIZE [, TIMEOUT ] )
-
-Read C<SIZE> bytes of data from the server and place it into C<BUFFER>, also
-performing any <CRLF> translation necessary. C<TIMEOUT> is optional, if not
-given, the timeout value from the command connection will be used.
-
-Returns the number of bytes read before any <CRLF> translation.
-
-=item write ( BUFFER, SIZE [, TIMEOUT ] )
-
-Write C<SIZE> bytes of data from C<BUFFER> to the server, also
-performing any <CRLF> translation necessary. C<TIMEOUT> is optional, if not
-given, the timeout value from the command connection will be used.
-
-Returns the number of bytes written before any <CRLF> translation.
-
-=item bytes_read ()
-
-Returns the number of bytes read so far.
-
-=item abort ()
-
-Abort the current data transfer.
-
-=item close ()
-
-Close the data connection and get a response from the FTP server. Returns
-I<true> if the connection was closed successfully and the first digit of
-the response from the server was a '2'.
-
-=back
-
-=head1 UNIMPLEMENTED
-
-The following RFC959 commands have not been implemented:
-
-=over 4
-
-=item B<SMNT>
-
-Mount a different file system structure without changing login or
-accounting information.
-
-=item B<HELP>
-
-Ask the server for "helpful information" (that's what the RFC says) on
-the commands it accepts.
-
-=item B<MODE>
-
-Specifies transfer mode (stream, block or compressed) for file to be
-transferred.
-
-=item B<SYST>
-
-Request remote server system identification.
-
-=item B<STAT>
-
-Request remote server status.
-
-=item B<STRU>
-
-Specifies file structure for file to be transferred.
-
-=item B<REIN>
-
-Reinitialize the connection, flushing all I/O and account information.
-
-=back
-
-=head1 REPORTING BUGS
-
-When reporting bugs/problems please include as much information as possible.
-It may be difficult for me to reproduce the problem as almost every setup
-is different.
-
-A small script which yields the problem will probably be of help. It would
-also be useful if this script was run with the extra options C<Debug => 1>
-passed to the constructor, and the output sent with the bug report. If you
-cannot include a small script then please include a Debug trace from a
-run of your program which does yield the problem.
-
-=head1 AUTHOR
-
-Graham Barr <gbarr at pobox.com>
-
-=head1 SEE ALSO
-
-L<Net::Netrc>
-L<Net::Cmd>
-
-ftp(1), ftpd(8), RFC 959
-http://www.cis.ohio-state.edu/htbin/rfc/rfc959.html
-
-=head1 USE EXAMPLES
-
-For an example of the use of Net::FTP see
-
-=over 4
-
-=item http://www.csh.rit.edu/~adam/Progs/
-
-C<autoftp> is a program that can retrieve, send, or list files via
-the FTP protocol in a non-interactive manner.
-
-=back
-
-=head1 CREDITS
-
-Henry Gabryjelski <henryg at WPI.EDU> - for the suggestion of creating directories
-recursively.
-
-Nathan Torkington <gnat at frii.com> - for some input on the documentation.
-
-Roderick Schertler <roderick at gate.net> - for various inputs
-
-=head1 COPYRIGHT
-
-Copyright (c) 1995-2004 Graham Barr. All rights reserved.
-This program is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/Net/Hostname.pm.eg
===================================================================
--- vendor/perl/dist/lib/Net/Hostname.pm.eg 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/Hostname.pm.eg 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,14 +0,0 @@
-#
-
-package Sys::Hostname;
-
-use Net::Domain qw(hostname);
-use Carp;
-
-require Exporter;
- at ISA = qw(Exporter);
- at EXPORT = qw(hostname);
-
-carp "deprecated package 'Sys::Hostname', use Net::Domain" if $^W;
-
-1;
Deleted: vendor/perl/dist/lib/Net/NNTP.pm
===================================================================
--- vendor/perl/dist/lib/Net/NNTP.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/NNTP.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1140 +0,0 @@
-# Net::NNTP.pm
-#
-# Copyright (c) 1995-1997 Graham Barr <gbarr at pobox.com>. All rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-
-package Net::NNTP;
-
-use strict;
-use vars qw(@ISA $VERSION $debug);
-use IO::Socket;
-use Net::Cmd;
-use Carp;
-use Time::Local;
-use Net::Config;
-
-$VERSION = "2.24";
- at ISA = qw(Net::Cmd IO::Socket::INET);
-
-
-sub new {
- my $self = shift;
- my $type = ref($self) || $self;
- my ($host, %arg);
- if (@_ % 2) {
- $host = shift;
- %arg = @_;
- }
- else {
- %arg = @_;
- $host = delete $arg{Host};
- }
- my $obj;
-
- $host ||= $ENV{NNTPSERVER} || $ENV{NEWSHOST};
-
- my $hosts = defined $host ? [$host] : $NetConfig{nntp_hosts};
-
- @{$hosts} = qw(news)
- unless @{$hosts};
-
- my $h;
- foreach $h (@{$hosts}) {
- $obj = $type->SUPER::new(
- PeerAddr => ($host = $h),
- PeerPort => $arg{Port} || 'nntp(119)',
- Proto => 'tcp',
- Timeout => defined $arg{Timeout}
- ? $arg{Timeout}
- : 120
- )
- and last;
- }
-
- return undef
- unless defined $obj;
-
- ${*$obj}{'net_nntp_host'} = $host;
-
- $obj->autoflush(1);
- $obj->debug(exists $arg{Debug} ? $arg{Debug} : undef);
-
- unless ($obj->response() == CMD_OK) {
- $obj->close;
- return undef;
- }
-
- my $c = $obj->code;
- my @m = $obj->message;
-
- unless (exists $arg{Reader} && $arg{Reader} == 0) {
-
- # if server is INN and we have transfer rights the we are currently
- # talking to innd not nnrpd
- if ($obj->reader) {
-
- # If reader suceeds the we need to consider this code to determine postok
- $c = $obj->code;
- }
- else {
-
- # I want to ignore this failure, so restore the previous status.
- $obj->set_status($c, \@m);
- }
- }
-
- ${*$obj}{'net_nntp_post'} = $c == 200 ? 1 : 0;
-
- $obj;
-}
-
-
-sub host {
- my $me = shift;
- ${*$me}{'net_nntp_host'};
-}
-
-
-sub debug_text {
- my $nntp = shift;
- my $inout = shift;
- my $text = shift;
-
- if ( (ref($nntp) and $nntp->code == 350 and $text =~ /^(\S+)/)
- || ($text =~ /^(authinfo\s+pass)/io))
- {
- $text = "$1 ....\n";
- }
-
- $text;
-}
-
-
-sub postok {
- @_ == 1 or croak 'usage: $nntp->postok()';
- my $nntp = shift;
- ${*$nntp}{'net_nntp_post'} || 0;
-}
-
-
-sub article {
- @_ >= 1 && @_ <= 3 or croak 'usage: $nntp->article( [ MSGID ], [ FH ] )';
- my $nntp = shift;
- my @fh;
-
- @fh = (pop) if @_ == 2 || (@_ && (ref($_[0]) || ref(\$_[0]) eq 'GLOB'));
-
- $nntp->_ARTICLE(@_)
- ? $nntp->read_until_dot(@fh)
- : undef;
-}
-
-
-sub articlefh {
- @_ >= 1 && @_ <= 2 or croak 'usage: $nntp->articlefh( [ MSGID ] )';
- my $nntp = shift;
-
- return unless $nntp->_ARTICLE(@_);
- return $nntp->tied_fh;
-}
-
-
-sub authinfo {
- @_ == 3 or croak 'usage: $nntp->authinfo( USER, PASS )';
- my ($nntp, $user, $pass) = @_;
-
- $nntp->_AUTHINFO("USER", $user) == CMD_MORE
- && $nntp->_AUTHINFO("PASS", $pass) == CMD_OK;
-}
-
-
-sub authinfo_simple {
- @_ == 3 or croak 'usage: $nntp->authinfo( USER, PASS )';
- my ($nntp, $user, $pass) = @_;
-
- $nntp->_AUTHINFO('SIMPLE') == CMD_MORE
- && $nntp->command($user, $pass)->response == CMD_OK;
-}
-
-
-sub body {
- @_ >= 1 && @_ <= 3 or croak 'usage: $nntp->body( [ MSGID ], [ FH ] )';
- my $nntp = shift;
- my @fh;
-
- @fh = (pop) if @_ == 2 || (@_ && ref($_[0]) || ref(\$_[0]) eq 'GLOB');
-
- $nntp->_BODY(@_)
- ? $nntp->read_until_dot(@fh)
- : undef;
-}
-
-
-sub bodyfh {
- @_ >= 1 && @_ <= 2 or croak 'usage: $nntp->bodyfh( [ MSGID ] )';
- my $nntp = shift;
- return unless $nntp->_BODY(@_);
- return $nntp->tied_fh;
-}
-
-
-sub head {
- @_ >= 1 && @_ <= 3 or croak 'usage: $nntp->head( [ MSGID ], [ FH ] )';
- my $nntp = shift;
- my @fh;
-
- @fh = (pop) if @_ == 2 || (@_ && ref($_[0]) || ref(\$_[0]) eq 'GLOB');
-
- $nntp->_HEAD(@_)
- ? $nntp->read_until_dot(@fh)
- : undef;
-}
-
-
-sub headfh {
- @_ >= 1 && @_ <= 2 or croak 'usage: $nntp->headfh( [ MSGID ] )';
- my $nntp = shift;
- return unless $nntp->_HEAD(@_);
- return $nntp->tied_fh;
-}
-
-
-sub nntpstat {
- @_ == 1 || @_ == 2 or croak 'usage: $nntp->nntpstat( [ MSGID ] )';
- my $nntp = shift;
-
- $nntp->_STAT(@_) && $nntp->message =~ /(<[^>]+>)/o
- ? $1
- : undef;
-}
-
-
-sub group {
- @_ == 1 || @_ == 2 or croak 'usage: $nntp->group( [ GROUP ] )';
- my $nntp = shift;
- my $grp = ${*$nntp}{'net_nntp_group'} || undef;
-
- return $grp
- unless (@_ || wantarray);
-
- my $newgrp = shift;
-
- return wantarray ? () : undef
- unless $nntp->_GROUP($newgrp || $grp || "")
- && $nntp->message =~ /(\d+)\s+(\d+)\s+(\d+)\s+(\S+)/;
-
- my ($count, $first, $last, $group) = ($1, $2, $3, $4);
-
- # group may be replied as '(current group)'
- $group = ${*$nntp}{'net_nntp_group'}
- if $group =~ /\(/;
-
- ${*$nntp}{'net_nntp_group'} = $group;
-
- wantarray
- ? ($count, $first, $last, $group)
- : $group;
-}
-
-
-sub help {
- @_ == 1 or croak 'usage: $nntp->help()';
- my $nntp = shift;
-
- $nntp->_HELP
- ? $nntp->read_until_dot
- : undef;
-}
-
-
-sub ihave {
- @_ >= 2 or croak 'usage: $nntp->ihave( MESSAGE-ID [, MESSAGE ])';
- my $nntp = shift;
- my $mid = shift;
-
- $nntp->_IHAVE($mid) && $nntp->datasend(@_)
- ? @_ == 0 || $nntp->dataend
- : undef;
-}
-
-
-sub last {
- @_ == 1 or croak 'usage: $nntp->last()';
- my $nntp = shift;
-
- $nntp->_LAST && $nntp->message =~ /(<[^>]+>)/o
- ? $1
- : undef;
-}
-
-
-sub list {
- @_ == 1 or croak 'usage: $nntp->list()';
- my $nntp = shift;
-
- $nntp->_LIST
- ? $nntp->_grouplist
- : undef;
-}
-
-
-sub newgroups {
- @_ >= 2 or croak 'usage: $nntp->newgroups( SINCE [, DISTRIBUTIONS ])';
- my $nntp = shift;
- my $time = _timestr(shift);
- my $dist = shift || "";
-
- $dist = join(",", @{$dist})
- if ref($dist);
-
- $nntp->_NEWGROUPS($time, $dist)
- ? $nntp->_grouplist
- : undef;
-}
-
-
-sub newnews {
- @_ >= 2 && @_ <= 4
- or croak 'usage: $nntp->newnews( SINCE [, GROUPS [, DISTRIBUTIONS ]])';
- my $nntp = shift;
- my $time = _timestr(shift);
- my $grp = @_ ? shift: $nntp->group;
- my $dist = shift || "";
-
- $grp ||= "*";
- $grp = join(",", @{$grp})
- if ref($grp);
-
- $dist = join(",", @{$dist})
- if ref($dist);
-
- $nntp->_NEWNEWS($grp, $time, $dist)
- ? $nntp->_articlelist
- : undef;
-}
-
-
-sub next {
- @_ == 1 or croak 'usage: $nntp->next()';
- my $nntp = shift;
-
- $nntp->_NEXT && $nntp->message =~ /(<[^>]+>)/o
- ? $1
- : undef;
-}
-
-
-sub post {
- @_ >= 1 or croak 'usage: $nntp->post( [ MESSAGE ] )';
- my $nntp = shift;
-
- $nntp->_POST() && $nntp->datasend(@_)
- ? @_ == 0 || $nntp->dataend
- : undef;
-}
-
-
-sub postfh {
- my $nntp = shift;
- return unless $nntp->_POST();
- return $nntp->tied_fh;
-}
-
-
-sub quit {
- @_ == 1 or croak 'usage: $nntp->quit()';
- my $nntp = shift;
-
- $nntp->_QUIT;
- $nntp->close;
-}
-
-
-sub slave {
- @_ == 1 or croak 'usage: $nntp->slave()';
- my $nntp = shift;
-
- $nntp->_SLAVE;
-}
-
-##
-## The following methods are not implemented by all servers
-##
-
-
-sub active {
- @_ == 1 || @_ == 2 or croak 'usage: $nntp->active( [ PATTERN ] )';
- my $nntp = shift;
-
- $nntp->_LIST('ACTIVE', @_)
- ? $nntp->_grouplist
- : undef;
-}
-
-
-sub active_times {
- @_ == 1 or croak 'usage: $nntp->active_times()';
- my $nntp = shift;
-
- $nntp->_LIST('ACTIVE.TIMES')
- ? $nntp->_grouplist
- : undef;
-}
-
-
-sub distributions {
- @_ == 1 or croak 'usage: $nntp->distributions()';
- my $nntp = shift;
-
- $nntp->_LIST('DISTRIBUTIONS')
- ? $nntp->_description
- : undef;
-}
-
-
-sub distribution_patterns {
- @_ == 1 or croak 'usage: $nntp->distributions()';
- my $nntp = shift;
-
- my $arr;
- local $_;
-
- $nntp->_LIST('DISTRIB.PATS')
- && ($arr = $nntp->read_until_dot)
- ? [grep { /^\d/ && (chomp, $_ = [split /:/]) } @$arr]
- : undef;
-}
-
-
-sub newsgroups {
- @_ == 1 || @_ == 2 or croak 'usage: $nntp->newsgroups( [ PATTERN ] )';
- my $nntp = shift;
-
- $nntp->_LIST('NEWSGROUPS', @_)
- ? $nntp->_description
- : undef;
-}
-
-
-sub overview_fmt {
- @_ == 1 or croak 'usage: $nntp->overview_fmt()';
- my $nntp = shift;
-
- $nntp->_LIST('OVERVIEW.FMT')
- ? $nntp->_articlelist
- : undef;
-}
-
-
-sub subscriptions {
- @_ == 1 or croak 'usage: $nntp->subscriptions()';
- my $nntp = shift;
-
- $nntp->_LIST('SUBSCRIPTIONS')
- ? $nntp->_articlelist
- : undef;
-}
-
-
-sub listgroup {
- @_ == 1 || @_ == 2 or croak 'usage: $nntp->listgroup( [ GROUP ] )';
- my $nntp = shift;
-
- $nntp->_LISTGROUP(@_)
- ? $nntp->_articlelist
- : undef;
-}
-
-
-sub reader {
- @_ == 1 or croak 'usage: $nntp->reader()';
- my $nntp = shift;
-
- $nntp->_MODE('READER');
-}
-
-
-sub xgtitle {
- @_ == 1 || @_ == 2 or croak 'usage: $nntp->xgtitle( [ PATTERN ] )';
- my $nntp = shift;
-
- $nntp->_XGTITLE(@_)
- ? $nntp->_description
- : undef;
-}
-
-
-sub xhdr {
- @_ >= 2 && @_ <= 4 or croak 'usage: $nntp->xhdr( HEADER, [ MESSAGE-SPEC ] )';
- my $nntp = shift;
- my $hdr = shift;
- my $arg = _msg_arg(@_);
-
- $nntp->_XHDR($hdr, $arg)
- ? $nntp->_description
- : undef;
-}
-
-
-sub xover {
- @_ == 2 || @_ == 3 or croak 'usage: $nntp->xover( MESSAGE-SPEC )';
- my $nntp = shift;
- my $arg = _msg_arg(@_);
-
- $nntp->_XOVER($arg)
- ? $nntp->_fieldlist
- : undef;
-}
-
-
-sub xpat {
- @_ == 4 || @_ == 5 or croak '$nntp->xpat( HEADER, PATTERN, MESSAGE-SPEC )';
- my $nntp = shift;
- my $hdr = shift;
- my $pat = shift;
- my $arg = _msg_arg(@_);
-
- $pat = join(" ", @$pat)
- if ref($pat);
-
- $nntp->_XPAT($hdr, $arg, $pat)
- ? $nntp->_description
- : undef;
-}
-
-
-sub xpath {
- @_ == 2 or croak 'usage: $nntp->xpath( MESSAGE-ID )';
- my ($nntp, $mid) = @_;
-
- return undef
- unless $nntp->_XPATH($mid);
-
- my $m;
- ($m = $nntp->message) =~ s/^\d+\s+//o;
- my @p = split /\s+/, $m;
-
- wantarray ? @p : $p[0];
-}
-
-
-sub xrover {
- @_ == 2 || @_ == 3 or croak 'usage: $nntp->xrover( MESSAGE-SPEC )';
- my $nntp = shift;
- my $arg = _msg_arg(@_);
-
- $nntp->_XROVER($arg)
- ? $nntp->_description
- : undef;
-}
-
-
-sub date {
- @_ == 1 or croak 'usage: $nntp->date()';
- my $nntp = shift;
-
- $nntp->_DATE
- && $nntp->message =~ /(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/
- ? timegm($6, $5, $4, $3, $2 - 1, $1 - 1900)
- : undef;
-}
-
-
-##
-## Private subroutines
-##
-
-
-sub _msg_arg {
- my $spec = shift;
- my $arg = "";
-
- if (@_) {
- carp "Depriciated passing of two message numbers, " . "pass a reference"
- if $^W;
- $spec = [$spec, $_[0]];
- }
-
- if (defined $spec) {
- if (ref($spec)) {
- $arg = $spec->[0];
- if (defined $spec->[1]) {
- $arg .= "-"
- if $spec->[1] != $spec->[0];
- $arg .= $spec->[1]
- if $spec->[1] > $spec->[0];
- }
- }
- else {
- $arg = $spec;
- }
- }
-
- $arg;
-}
-
-
-sub _timestr {
- my $time = shift;
- my @g = reverse((gmtime($time))[0 .. 5]);
- $g[1] += 1;
- $g[0] %= 100;
- sprintf "%02d%02d%02d %02d%02d%02d GMT", @g;
-}
-
-
-sub _grouplist {
- my $nntp = shift;
- my $arr = $nntp->read_until_dot
- or return undef;
-
- my $hash = {};
- my $ln;
-
- foreach $ln (@$arr) {
- my @a = split(/[\s\n]+/, $ln);
- $hash->{$a[0]} = [@a[1, 2, 3]];
- }
-
- $hash;
-}
-
-
-sub _fieldlist {
- my $nntp = shift;
- my $arr = $nntp->read_until_dot
- or return undef;
-
- my $hash = {};
- my $ln;
-
- foreach $ln (@$arr) {
- my @a = split(/[\t\n]/, $ln);
- my $m = shift @a;
- $hash->{$m} = [@a];
- }
-
- $hash;
-}
-
-
-sub _articlelist {
- my $nntp = shift;
- my $arr = $nntp->read_until_dot;
-
- chomp(@$arr)
- if $arr;
-
- $arr;
-}
-
-
-sub _description {
- my $nntp = shift;
- my $arr = $nntp->read_until_dot
- or return undef;
-
- my $hash = {};
- my $ln;
-
- foreach $ln (@$arr) {
- chomp($ln);
-
- $hash->{$1} = $ln
- if $ln =~ s/^\s*(\S+)\s*//o;
- }
-
- $hash;
-
-}
-
-##
-## The commands
-##
-
-
-sub _ARTICLE { shift->command('ARTICLE', @_)->response == CMD_OK }
-sub _AUTHINFO { shift->command('AUTHINFO', @_)->response }
-sub _BODY { shift->command('BODY', @_)->response == CMD_OK }
-sub _DATE { shift->command('DATE')->response == CMD_INFO }
-sub _GROUP { shift->command('GROUP', @_)->response == CMD_OK }
-sub _HEAD { shift->command('HEAD', @_)->response == CMD_OK }
-sub _HELP { shift->command('HELP', @_)->response == CMD_INFO }
-sub _IHAVE { shift->command('IHAVE', @_)->response == CMD_MORE }
-sub _LAST { shift->command('LAST')->response == CMD_OK }
-sub _LIST { shift->command('LIST', @_)->response == CMD_OK }
-sub _LISTGROUP { shift->command('LISTGROUP', @_)->response == CMD_OK }
-sub _NEWGROUPS { shift->command('NEWGROUPS', @_)->response == CMD_OK }
-sub _NEWNEWS { shift->command('NEWNEWS', @_)->response == CMD_OK }
-sub _NEXT { shift->command('NEXT')->response == CMD_OK }
-sub _POST { shift->command('POST', @_)->response == CMD_MORE }
-sub _QUIT { shift->command('QUIT', @_)->response == CMD_OK }
-sub _SLAVE { shift->command('SLAVE', @_)->response == CMD_OK }
-sub _STAT { shift->command('STAT', @_)->response == CMD_OK }
-sub _MODE { shift->command('MODE', @_)->response == CMD_OK }
-sub _XGTITLE { shift->command('XGTITLE', @_)->response == CMD_OK }
-sub _XHDR { shift->command('XHDR', @_)->response == CMD_OK }
-sub _XPAT { shift->command('XPAT', @_)->response == CMD_OK }
-sub _XPATH { shift->command('XPATH', @_)->response == CMD_OK }
-sub _XOVER { shift->command('XOVER', @_)->response == CMD_OK }
-sub _XROVER { shift->command('XROVER', @_)->response == CMD_OK }
-sub _XTHREAD { shift->unsupported }
-sub _XSEARCH { shift->unsupported }
-sub _XINDEX { shift->unsupported }
-
-##
-## IO/perl methods
-##
-
-
-sub DESTROY {
- my $nntp = shift;
- defined(fileno($nntp)) && $nntp->quit;
-}
-
-
-1;
-
-__END__
-
-=head1 NAME
-
-Net::NNTP - NNTP Client class
-
-=head1 SYNOPSIS
-
- use Net::NNTP;
-
- $nntp = Net::NNTP->new("some.host.name");
- $nntp->quit;
-
-=head1 DESCRIPTION
-
-C<Net::NNTP> is a class implementing a simple NNTP client in Perl as described
-in RFC977. C<Net::NNTP> inherits its communication methods from C<Net::Cmd>
-
-=head1 CONSTRUCTOR
-
-=over 4
-
-=item new ( [ HOST ] [, OPTIONS ])
-
-This is the constructor for a new Net::NNTP object. C<HOST> is the
-name of the remote host to which a NNTP connection is required. If not
-given then it may be passed as the C<Host> option described below. If no host is passed
-then two environment variables are checked, first C<NNTPSERVER> then
-C<NEWSHOST>, then C<Net::Config> is checked, and if a host is not found
-then C<news> is used.
-
-C<OPTIONS> are passed in a hash like fashion, using key and value pairs.
-Possible options are:
-
-B<Host> - NNTP host to connect to. It may be a single scalar, as defined for
-the C<PeerAddr> option in L<IO::Socket::INET>, or a reference to
-an array with hosts to try in turn. The L</host> method will return the value
-which was used to connect to the host.
-
-B<Timeout> - Maximum time, in seconds, to wait for a response from the
-NNTP server, a value of zero will cause all IO operations to block.
-(default: 120)
-
-B<Debug> - Enable the printing of debugging information to STDERR
-
-B<Reader> - If the remote server is INN then initially the connection
-will be to nnrpd, by default C<Net::NNTP> will issue a C<MODE READER> command
-so that the remote server becomes innd. If the C<Reader> option is given
-with a value of zero, then this command will not be sent and the
-connection will be left talking to nnrpd.
-
-=back
-
-=head1 METHODS
-
-Unless otherwise stated all methods return either a I<true> or I<false>
-value, with I<true> meaning that the operation was a success. When a method
-states that it returns a value, failure will be returned as I<undef> or an
-empty list.
-
-=over 4
-
-=item article ( [ MSGID|MSGNUM ], [FH] )
-
-Retrieve the header, a blank line, then the body (text) of the
-specified article.
-
-If C<FH> is specified then it is expected to be a valid filehandle
-and the result will be printed to it, on success a true value will be
-returned. If C<FH> is not specified then the return value, on success,
-will be a reference to an array containing the article requested, each
-entry in the array will contain one line of the article.
-
-If no arguments are passed then the current article in the currently
-selected newsgroup is fetched.
-
-C<MSGNUM> is a numeric id of an article in the current newsgroup, and
-will change the current article pointer. C<MSGID> is the message id of
-an article as shown in that article's header. It is anticipated that the
-client will obtain the C<MSGID> from a list provided by the C<newnews>
-command, from references contained within another article, or from the
-message-id provided in the response to some other commands.
-
-If there is an error then C<undef> will be returned.
-
-=item body ( [ MSGID|MSGNUM ], [FH] )
-
-Like C<article> but only fetches the body of the article.
-
-=item head ( [ MSGID|MSGNUM ], [FH] )
-
-Like C<article> but only fetches the headers for the article.
-
-=item articlefh ( [ MSGID|MSGNUM ] )
-
-=item bodyfh ( [ MSGID|MSGNUM ] )
-
-=item headfh ( [ MSGID|MSGNUM ] )
-
-These are similar to article(), body() and head(), but rather than
-returning the requested data directly, they return a tied filehandle
-from which to read the article.
-
-=item nntpstat ( [ MSGID|MSGNUM ] )
-
-The C<nntpstat> command is similar to the C<article> command except that no
-text is returned. When selecting by message number within a group,
-the C<nntpstat> command serves to set the "current article pointer" without
-sending text.
-
-Using the C<nntpstat> command to
-select by message-id is valid but of questionable value, since a
-selection by message-id does B<not> alter the "current article pointer".
-
-Returns the message-id of the "current article".
-
-=item group ( [ GROUP ] )
-
-Set and/or get the current group. If C<GROUP> is not given then information
-is returned on the current group.
-
-In a scalar context it returns the group name.
-
-In an array context the return value is a list containing, the number
-of articles in the group, the number of the first article, the number
-of the last article and the group name.
-
-=item ihave ( MSGID [, MESSAGE ])
-
-The C<ihave> command informs the server that the client has an article
-whose id is C<MSGID>. If the server desires a copy of that
-article, and C<MESSAGE> has been given the it will be sent.
-
-Returns I<true> if the server desires the article and C<MESSAGE> was
-successfully sent,if specified.
-
-If C<MESSAGE> is not specified then the message must be sent using the
-C<datasend> and C<dataend> methods from L<Net::Cmd>
-
-C<MESSAGE> can be either an array of lines or a reference to an array.
-
-=item last ()
-
-Set the "current article pointer" to the previous article in the current
-newsgroup.
-
-Returns the message-id of the article.
-
-=item date ()
-
-Returns the date on the remote server. This date will be in a UNIX time
-format (seconds since 1970)
-
-=item postok ()
-
-C<postok> will return I<true> if the servers initial response indicated
-that it will allow posting.
-
-=item authinfo ( USER, PASS )
-
-Authenticates to the server (using AUTHINFO USER / AUTHINFO PASS)
-using the supplied username and password. Please note that the
-password is sent in clear text to the server. This command should not
-be used with valuable passwords unless the connection to the server is
-somehow protected.
-
-=item list ()
-
-Obtain information about all the active newsgroups. The results is a reference
-to a hash where the key is a group name and each value is a reference to an
-array. The elements in this array are:- the last article number in the group,
-the first article number in the group and any information flags about the group.
-
-=item newgroups ( SINCE [, DISTRIBUTIONS ])
-
-C<SINCE> is a time value and C<DISTRIBUTIONS> is either a distribution
-pattern or a reference to a list of distribution patterns.
-The result is the same as C<list>, but the
-groups return will be limited to those created after C<SINCE> and, if
-specified, in one of the distribution areas in C<DISTRIBUTIONS>.
-
-=item newnews ( SINCE [, GROUPS [, DISTRIBUTIONS ]])
-
-C<SINCE> is a time value. C<GROUPS> is either a group pattern or a reference
-to a list of group patterns. C<DISTRIBUTIONS> is either a distribution
-pattern or a reference to a list of distribution patterns.
-
-Returns a reference to a list which contains the message-ids of all news posted
-after C<SINCE>, that are in a groups which matched C<GROUPS> and a
-distribution which matches C<DISTRIBUTIONS>.
-
-=item next ()
-
-Set the "current article pointer" to the next article in the current
-newsgroup.
-
-Returns the message-id of the article.
-
-=item post ( [ MESSAGE ] )
-
-Post a new article to the news server. If C<MESSAGE> is specified and posting
-is allowed then the message will be sent.
-
-If C<MESSAGE> is not specified then the message must be sent using the
-C<datasend> and C<dataend> methods from L<Net::Cmd>
-
-C<MESSAGE> can be either an array of lines or a reference to an array.
-
-The message, either sent via C<datasend> or as the C<MESSAGE>
-parameter, must be in the format as described by RFC822 and must
-contain From:, Newsgroups: and Subject: headers.
-
-=item postfh ()
-
-Post a new article to the news server using a tied filehandle. If
-posting is allowed, this method will return a tied filehandle that you
-can print() the contents of the article to be posted. You must
-explicitly close() the filehandle when you are finished posting the
-article, and the return value from the close() call will indicate
-whether the message was successfully posted.
-
-=item slave ()
-
-Tell the remote server that I am not a user client, but probably another
-news server.
-
-=item quit ()
-
-Quit the remote server and close the socket connection.
-
-=back
-
-=head2 Extension methods
-
-These methods use commands that are not part of the RFC977 documentation. Some
-servers may not support all of them.
-
-=over 4
-
-=item newsgroups ( [ PATTERN ] )
-
-Returns a reference to a hash where the keys are all the group names which
-match C<PATTERN>, or all of the groups if no pattern is specified, and
-each value contains the description text for the group.
-
-=item distributions ()
-
-Returns a reference to a hash where the keys are all the possible
-distribution names and the values are the distribution descriptions.
-
-=item subscriptions ()
-
-Returns a reference to a list which contains a list of groups which
-are recommended for a new user to subscribe to.
-
-=item overview_fmt ()
-
-Returns a reference to an array which contain the names of the fields returned
-by C<xover>.
-
-=item active_times ()
-
-Returns a reference to a hash where the keys are the group names and each
-value is a reference to an array containing the time the groups was created
-and an identifier, possibly an Email address, of the creator.
-
-=item active ( [ PATTERN ] )
-
-Similar to C<list> but only active groups that match the pattern are returned.
-C<PATTERN> can be a group pattern.
-
-=item xgtitle ( PATTERN )
-
-Returns a reference to a hash where the keys are all the group names which
-match C<PATTERN> and each value is the description text for the group.
-
-=item xhdr ( HEADER, MESSAGE-SPEC )
-
-Obtain the header field C<HEADER> for all the messages specified.
-
-The return value will be a reference
-to a hash where the keys are the message numbers and each value contains
-the text of the requested header for that message.
-
-=item xover ( MESSAGE-SPEC )
-
-The return value will be a reference
-to a hash where the keys are the message numbers and each value contains
-a reference to an array which contains the overview fields for that
-message.
-
-The names of the fields can be obtained by calling C<overview_fmt>.
-
-=item xpath ( MESSAGE-ID )
-
-Returns the path name to the file on the server which contains the specified
-message.
-
-=item xpat ( HEADER, PATTERN, MESSAGE-SPEC)
-
-The result is the same as C<xhdr> except the is will be restricted to
-headers where the text of the header matches C<PATTERN>
-
-=item xrover
-
-The XROVER command returns reference information for the article(s)
-specified.
-
-Returns a reference to a HASH where the keys are the message numbers and the
-values are the References: lines from the articles
-
-=item listgroup ( [ GROUP ] )
-
-Returns a reference to a list of all the active messages in C<GROUP>, or
-the current group if C<GROUP> is not specified.
-
-=item reader
-
-Tell the server that you are a reader and not another server.
-
-This is required by some servers. For example if you are connecting to
-an INN server and you have transfer permission your connection will
-be connected to the transfer daemon, not the NNTP daemon. Issuing
-this command will cause the transfer daemon to hand over control
-to the NNTP daemon.
-
-Some servers do not understand this command, but issuing it and ignoring
-the response is harmless.
-
-=back
-
-=head1 UNSUPPORTED
-
-The following NNTP command are unsupported by the package, and there are
-no plans to do so.
-
- AUTHINFO GENERIC
- XTHREAD
- XSEARCH
- XINDEX
-
-=head1 DEFINITIONS
-
-=over 4
-
-=item MESSAGE-SPEC
-
-C<MESSAGE-SPEC> is either a single message-id, a single message number, or
-a reference to a list of two message numbers.
-
-If C<MESSAGE-SPEC> is a reference to a list of two message numbers and the
-second number in a range is less than or equal to the first then the range
-represents all messages in the group after the first message number.
-
-B<NOTE> For compatibility reasons only with earlier versions of Net::NNTP
-a message spec can be passed as a list of two numbers, this is deprecated
-and a reference to the list should now be passed
-
-=item PATTERN
-
-The C<NNTP> protocol uses the C<WILDMAT> format for patterns.
-The WILDMAT format was first developed by Rich Salz based on
-the format used in the UNIX "find" command to articulate
-file names. It was developed to provide a uniform mechanism
-for matching patterns in the same manner that the UNIX shell
-matches filenames.
-
-Patterns are implicitly anchored at the
-beginning and end of each string when testing for a match.
-
-There are five pattern matching operations other than a strict
-one-to-one match between the pattern and the source to be
-checked for a match.
-
-The first is an asterisk C<*> to match any sequence of zero or more
-characters.
-
-The second is a question mark C<?> to match any single character. The
-third specifies a specific set of characters.
-
-The set is specified as a list of characters, or as a range of characters
-where the beginning and end of the range are separated by a minus (or dash)
-character, or as any combination of lists and ranges. The dash can
-also be included in the set as a character it if is the beginning
-or end of the set. This set is enclosed in square brackets. The
-close square bracket C<]> may be used in a set if it is the first
-character in the set.
-
-The fourth operation is the same as the
-logical not of the third operation and is specified the same
-way as the third with the addition of a caret character C<^> at
-the beginning of the test string just inside the open square
-bracket.
-
-The final operation uses the backslash character to
-invalidate the special meaning of an open square bracket C<[>,
-the asterisk, backslash or the question mark. Two backslashes in
-sequence will result in the evaluation of the backslash as a
-character with no special meaning.
-
-=over 4
-
-=item Examples
-
-=item C<[^]-]>
-
-matches any single character other than a close square
-bracket or a minus sign/dash.
-
-=item C<*bdc>
-
-matches any string that ends with the string "bdc"
-including the string "bdc" (without quotes).
-
-=item C<[0-9a-zA-Z]>
-
-matches any single printable alphanumeric ASCII character.
-
-=item C<a??d>
-
-matches any four character string which begins
-with a and ends with d.
-
-=back
-
-=back
-
-=head1 SEE ALSO
-
-L<Net::Cmd>
-
-=head1 AUTHOR
-
-Graham Barr <gbarr at pobox.com>
-
-=head1 COPYRIGHT
-
-Copyright (c) 1995-1997 Graham Barr. All rights reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/Net/Netrc.pm
===================================================================
--- vendor/perl/dist/lib/Net/Netrc.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/Netrc.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,325 +0,0 @@
-# Net::Netrc.pm
-#
-# Copyright (c) 1995-1998 Graham Barr <gbarr at pobox.com>. All rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-
-package Net::Netrc;
-
-use Carp;
-use strict;
-use FileHandle;
-use vars qw($VERSION);
-
-$VERSION = "2.12";
-
-my %netrc = ();
-
-
-sub _readrc {
- my $host = shift;
- my ($home, $file);
-
- if ($^O eq "MacOS") {
- $home = $ENV{HOME} || `pwd`;
- chomp($home);
- $file = ($home =~ /:$/ ? $home . "netrc" : $home . ":netrc");
- }
- else {
-
- # Some OS's don't have `getpwuid', so we default to $ENV{HOME}
- $home = eval { (getpwuid($>))[7] } || $ENV{HOME};
- $home ||= $ENV{HOMEDRIVE} . ($ENV{HOMEPATH} || '') if defined $ENV{HOMEDRIVE};
- $file = $home . "/.netrc";
- }
-
- my ($login, $pass, $acct) = (undef, undef, undef);
- my $fh;
- local $_;
-
- $netrc{default} = undef;
-
- # OS/2 and Win32 do not handle stat in a way compatable with this check :-(
- unless ($^O eq 'os2'
- || $^O eq 'MSWin32'
- || $^O eq 'MacOS'
- || $^O =~ /^cygwin/)
- {
- my @stat = stat($file);
-
- if (@stat) {
- if ($stat[2] & 077) {
- carp "Bad permissions: $file";
- return;
- }
- if ($stat[4] != $<) {
- carp "Not owner: $file";
- return;
- }
- }
- }
-
- if ($fh = FileHandle->new($file, "r")) {
- my ($mach, $macdef, $tok, @tok) = (0, 0);
-
- while (<$fh>) {
- undef $macdef if /\A\n\Z/;
-
- if ($macdef) {
- push(@$macdef, $_);
- next;
- }
-
- s/^\s*//;
- chomp;
-
- while (length && s/^("((?:[^"]+|\\.)*)"|((?:[^\\\s]+|\\.)*))\s*//) {
- (my $tok = $+) =~ s/\\(.)/$1/g;
- push(@tok, $tok);
- }
-
- TOKEN:
- while (@tok) {
- if ($tok[0] eq "default") {
- shift(@tok);
- $mach = bless {};
- $netrc{default} = [$mach];
-
- next TOKEN;
- }
-
- last TOKEN
- unless @tok > 1;
-
- $tok = shift(@tok);
-
- if ($tok eq "machine") {
- my $host = shift @tok;
- $mach = bless {machine => $host};
-
- $netrc{$host} = []
- unless exists($netrc{$host});
- push(@{$netrc{$host}}, $mach);
- }
- elsif ($tok =~ /^(login|password|account)$/) {
- next TOKEN unless $mach;
- my $value = shift @tok;
-
- # Following line added by rmerrell to remove '/' escape char in .netrc
- $value =~ s/\/\\/\\/g;
- $mach->{$1} = $value;
- }
- elsif ($tok eq "macdef") {
- next TOKEN unless $mach;
- my $value = shift @tok;
- $mach->{macdef} = {}
- unless exists $mach->{macdef};
- $macdef = $mach->{machdef}{$value} = [];
- }
- }
- }
- $fh->close();
- }
-}
-
-
-sub lookup {
- my ($pkg, $mach, $login) = @_;
-
- _readrc()
- unless exists $netrc{default};
-
- $mach ||= 'default';
- undef $login
- if $mach eq 'default';
-
- if (exists $netrc{$mach}) {
- if (defined $login) {
- my $m;
- foreach $m (@{$netrc{$mach}}) {
- return $m
- if (exists $m->{login} && $m->{login} eq $login);
- }
- return undef;
- }
- return $netrc{$mach}->[0];
- }
-
- return $netrc{default}->[0]
- if defined $netrc{default};
-
- return undef;
-}
-
-
-sub login {
- my $me = shift;
-
- exists $me->{login}
- ? $me->{login}
- : undef;
-}
-
-
-sub account {
- my $me = shift;
-
- exists $me->{account}
- ? $me->{account}
- : undef;
-}
-
-
-sub password {
- my $me = shift;
-
- exists $me->{password}
- ? $me->{password}
- : undef;
-}
-
-
-sub lpa {
- my $me = shift;
- ($me->login, $me->password, $me->account);
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Net::Netrc - OO interface to users netrc file
-
-=head1 SYNOPSIS
-
- use Net::Netrc;
-
- $mach = Net::Netrc->lookup('some.machine');
- $login = $mach->login;
- ($login, $password, $account) = $mach->lpa;
-
-=head1 DESCRIPTION
-
-C<Net::Netrc> is a class implementing a simple interface to the .netrc file
-used as by the ftp program.
-
-C<Net::Netrc> also implements security checks just like the ftp program,
-these checks are, first that the .netrc file must be owned by the user and
-second the ownership permissions should be such that only the owner has
-read and write access. If these conditions are not met then a warning is
-output and the .netrc file is not read.
-
-=head1 THE .netrc FILE
-
-The .netrc file contains login and initialization information used by the
-auto-login process. It resides in the user's home directory. The following
-tokens are recognized; they may be separated by spaces, tabs, or new-lines:
-
-=over 4
-
-=item machine name
-
-Identify a remote machine name. The auto-login process searches
-the .netrc file for a machine token that matches the remote machine
-specified. Once a match is made, the subsequent .netrc tokens
-are processed, stopping when the end of file is reached or an-
-other machine or a default token is encountered.
-
-=item default
-
-This is the same as machine name except that default matches
-any name. There can be only one default token, and it must be
-after all machine tokens. This is normally used as:
-
- default login anonymous password user at site
-
-thereby giving the user automatic anonymous login to machines
-not specified in .netrc.
-
-=item login name
-
-Identify a user on the remote machine. If this token is present,
-the auto-login process will initiate a login using the
-specified name.
-
-=item password string
-
-Supply a password. If this token is present, the auto-login
-process will supply the specified string if the remote server
-requires a password as part of the login process.
-
-=item account string
-
-Supply an additional account password. If this token is present,
-the auto-login process will supply the specified string
-if the remote server requires an additional account password.
-
-=item macdef name
-
-Define a macro. C<Net::Netrc> only parses this field to be compatible
-with I<ftp>.
-
-=back
-
-=head1 CONSTRUCTOR
-
-The constructor for a C<Net::Netrc> object is not called new as it does not
-really create a new object. But instead is called C<lookup> as this is
-essentially what it does.
-
-=over 4
-
-=item lookup ( MACHINE [, LOGIN ])
-
-Lookup and return a reference to the entry for C<MACHINE>. If C<LOGIN> is given
-then the entry returned will have the given login. If C<LOGIN> is not given then
-the first entry in the .netrc file for C<MACHINE> will be returned.
-
-If a matching entry cannot be found, and a default entry exists, then a
-reference to the default entry is returned.
-
-If there is no matching entry found and there is no default defined, or
-no .netrc file is found, then C<undef> is returned.
-
-=back
-
-=head1 METHODS
-
-=over 4
-
-=item login ()
-
-Return the login id for the netrc entry
-
-=item password ()
-
-Return the password for the netrc entry
-
-=item account ()
-
-Return the account information for the netrc entry
-
-=item lpa ()
-
-Return a list of login, password and account information fir the netrc entry
-
-=back
-
-=head1 AUTHOR
-
-Graham Barr <gbarr at pobox.com>
-
-=head1 SEE ALSO
-
-L<Net::Netrc>
-L<Net::Cmd>
-
-=head1 COPYRIGHT
-
-Copyright (c) 1995-1998 Graham Barr. All rights reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/Net/POP3.pm
===================================================================
--- vendor/perl/dist/lib/Net/POP3.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/POP3.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,742 +0,0 @@
-# Net::POP3.pm
-#
-# Copyright (c) 1995-2004 Graham Barr <gbarr at pobox.com>. All rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-
-package Net::POP3;
-
-use strict;
-use IO::Socket;
-use vars qw(@ISA $VERSION $debug);
-use Net::Cmd;
-use Carp;
-use Net::Config;
-
-$VERSION = "2.29";
-
- at ISA = qw(Net::Cmd IO::Socket::INET);
-
-
-sub new {
- my $self = shift;
- my $type = ref($self) || $self;
- my ($host, %arg);
- if (@_ % 2) {
- $host = shift;
- %arg = @_;
- }
- else {
- %arg = @_;
- $host = delete $arg{Host};
- }
- my $hosts = defined $host ? [$host] : $NetConfig{pop3_hosts};
- my $obj;
- my @localport = exists $arg{ResvPort} ? (LocalPort => $arg{ResvPort}) : ();
-
- my $h;
- foreach $h (@{$hosts}) {
- $obj = $type->SUPER::new(
- PeerAddr => ($host = $h),
- PeerPort => $arg{Port} || 'pop3(110)',
- Proto => 'tcp',
- @localport,
- Timeout => defined $arg{Timeout}
- ? $arg{Timeout}
- : 120
- )
- and last;
- }
-
- return undef
- unless defined $obj;
-
- ${*$obj}{'net_pop3_host'} = $host;
-
- $obj->autoflush(1);
- $obj->debug(exists $arg{Debug} ? $arg{Debug} : undef);
-
- unless ($obj->response() == CMD_OK) {
- $obj->close();
- return undef;
- }
-
- ${*$obj}{'net_pop3_banner'} = $obj->message;
-
- $obj;
-}
-
-
-sub host {
- my $me = shift;
- ${*$me}{'net_pop3_host'};
-}
-
-##
-## We don't want people sending me their passwords when they report problems
-## now do we :-)
-##
-
-
-sub debug_text { $_[2] =~ /^(pass|rpop)/i ? "$1 ....\n" : $_[2]; }
-
-
-sub login {
- @_ >= 1 && @_ <= 3 or croak 'usage: $pop3->login( USER, PASS )';
- my ($me, $user, $pass) = @_;
-
- if (@_ <= 2) {
- ($user, $pass) = $me->_lookup_credentials($user);
- }
-
- $me->user($user)
- and $me->pass($pass);
-}
-
-
-sub apop {
- @_ >= 1 && @_ <= 3 or croak 'usage: $pop3->apop( USER, PASS )';
- my ($me, $user, $pass) = @_;
- my $banner;
- my $md;
-
- if (eval { local $SIG{__DIE__}; require Digest::MD5 }) {
- $md = Digest::MD5->new();
- }
- elsif (eval { local $SIG{__DIE__}; require MD5 }) {
- $md = MD5->new();
- }
- else {
- carp "You need to install Digest::MD5 or MD5 to use the APOP command";
- return undef;
- }
-
- return undef
- unless ($banner = (${*$me}{'net_pop3_banner'} =~ /(<.*>)/)[0]);
-
- if (@_ <= 2) {
- ($user, $pass) = $me->_lookup_credentials($user);
- }
-
- $md->add($banner, $pass);
-
- return undef
- unless ($me->_APOP($user, $md->hexdigest));
-
- $me->_get_mailbox_count();
-}
-
-
-sub user {
- @_ == 2 or croak 'usage: $pop3->user( USER )';
- $_[0]->_USER($_[1]) ? 1 : undef;
-}
-
-
-sub pass {
- @_ == 2 or croak 'usage: $pop3->pass( PASS )';
-
- my ($me, $pass) = @_;
-
- return undef
- unless ($me->_PASS($pass));
-
- $me->_get_mailbox_count();
-}
-
-
-sub reset {
- @_ == 1 or croak 'usage: $obj->reset()';
-
- my $me = shift;
-
- return 0
- unless ($me->_RSET);
-
- if (defined ${*$me}{'net_pop3_mail'}) {
- local $_;
- foreach (@{${*$me}{'net_pop3_mail'}}) {
- delete $_->{'net_pop3_deleted'};
- }
- }
-}
-
-
-sub last {
- @_ == 1 or croak 'usage: $obj->last()';
-
- return undef
- unless $_[0]->_LAST && $_[0]->message =~ /(\d+)/;
-
- return $1;
-}
-
-
-sub top {
- @_ == 2 || @_ == 3 or croak 'usage: $pop3->top( MSGNUM [, NUMLINES ])';
- my $me = shift;
-
- return undef
- unless $me->_TOP($_[0], $_[1] || 0);
-
- $me->read_until_dot;
-}
-
-
-sub popstat {
- @_ == 1 or croak 'usage: $pop3->popstat()';
- my $me = shift;
-
- return ()
- unless $me->_STAT && $me->message =~ /(\d+)\D+(\d+)/;
-
- ($1 || 0, $2 || 0);
-}
-
-
-sub list {
- @_ == 1 || @_ == 2 or croak 'usage: $pop3->list( [ MSGNUM ] )';
- my $me = shift;
-
- return undef
- unless $me->_LIST(@_);
-
- if (@_) {
- $me->message =~ /\d+\D+(\d+)/;
- return $1 || undef;
- }
-
- my $info = $me->read_until_dot
- or return undef;
-
- my %hash = map { (/(\d+)\D+(\d+)/) } @$info;
-
- return \%hash;
-}
-
-
-sub get {
- @_ == 2 or @_ == 3 or croak 'usage: $pop3->get( MSGNUM [, FH ])';
- my $me = shift;
-
- return undef
- unless $me->_RETR(shift);
-
- $me->read_until_dot(@_);
-}
-
-
-sub getfh {
- @_ == 2 or croak 'usage: $pop3->getfh( MSGNUM )';
- my $me = shift;
-
- return unless $me->_RETR(shift);
- return $me->tied_fh;
-}
-
-
-sub delete {
- @_ == 2 or croak 'usage: $pop3->delete( MSGNUM )';
- my $me = shift;
- return 0 unless $me->_DELE(@_);
- ${*$me}{'net_pop3_deleted'} = 1;
-}
-
-
-sub uidl {
- @_ == 1 || @_ == 2 or croak 'usage: $pop3->uidl( [ MSGNUM ] )';
- my $me = shift;
- my $uidl;
-
- $me->_UIDL(@_)
- or return undef;
- if (@_) {
- $uidl = ($me->message =~ /\d+\s+([\041-\176]+)/)[0];
- }
- else {
- my $ref = $me->read_until_dot
- or return undef;
- my $ln;
- $uidl = {};
- foreach $ln (@$ref) {
- my ($msg, $uid) = $ln =~ /^\s*(\d+)\s+([\041-\176]+)/;
- $uidl->{$msg} = $uid;
- }
- }
- return $uidl;
-}
-
-
-sub ping {
- @_ == 2 or croak 'usage: $pop3->ping( USER )';
- my $me = shift;
-
- return () unless $me->_PING(@_) && $me->message =~ /(\d+)\D+(\d+)/;
-
- ($1 || 0, $2 || 0);
-}
-
-
-sub _lookup_credentials {
- my ($me, $user) = @_;
-
- require Net::Netrc;
-
- $user ||= eval { local $SIG{__DIE__}; (getpwuid($>))[0] }
- || $ENV{NAME}
- || $ENV{USER}
- || $ENV{LOGNAME};
-
- my $m = Net::Netrc->lookup(${*$me}{'net_pop3_host'}, $user);
- $m ||= Net::Netrc->lookup(${*$me}{'net_pop3_host'});
-
- my $pass = $m
- ? $m->password || ""
- : "";
-
- ($user, $pass);
-}
-
-
-sub _get_mailbox_count {
- my ($me) = @_;
- my $ret = ${*$me}{'net_pop3_count'} =
- ($me->message =~ /(\d+)\s+message/io) ? $1 : ($me->popstat)[0];
-
- $ret ? $ret : "0E0";
-}
-
-
-sub _STAT { shift->command('STAT')->response() == CMD_OK }
-sub _LIST { shift->command('LIST', @_)->response() == CMD_OK }
-sub _RETR { shift->command('RETR', $_[0])->response() == CMD_OK }
-sub _DELE { shift->command('DELE', $_[0])->response() == CMD_OK }
-sub _NOOP { shift->command('NOOP')->response() == CMD_OK }
-sub _RSET { shift->command('RSET')->response() == CMD_OK }
-sub _QUIT { shift->command('QUIT')->response() == CMD_OK }
-sub _TOP { shift->command('TOP', @_)->response() == CMD_OK }
-sub _UIDL { shift->command('UIDL', @_)->response() == CMD_OK }
-sub _USER { shift->command('USER', $_[0])->response() == CMD_OK }
-sub _PASS { shift->command('PASS', $_[0])->response() == CMD_OK }
-sub _APOP { shift->command('APOP', @_)->response() == CMD_OK }
-sub _PING { shift->command('PING', $_[0])->response() == CMD_OK }
-
-
-sub _RPOP { shift->command('RPOP', $_[0])->response() == CMD_OK }
-sub _LAST { shift->command('LAST')->response() == CMD_OK }
-
-
-sub _CAPA { shift->command('CAPA')->response() == CMD_OK }
-
-
-sub quit {
- my $me = shift;
-
- $me->_QUIT;
- $me->close;
-}
-
-
-sub DESTROY {
- my $me = shift;
-
- if (defined fileno($me) and ${*$me}{'net_pop3_deleted'}) {
- $me->reset;
- $me->quit;
- }
-}
-
-##
-## POP3 has weird responses, so we emulate them to look the same :-)
-##
-
-
-sub response {
- my $cmd = shift;
- my $str = $cmd->getline() or return undef;
- my $code = "500";
-
- $cmd->debug_print(0, $str)
- if ($cmd->debug);
-
- if ($str =~ s/^\+OK\s*//io) {
- $code = "200";
- }
- elsif ($str =~ s/^\+\s*//io) {
- $code = "300";
- }
- else {
- $str =~ s/^-ERR\s*//io;
- }
-
- ${*$cmd}{'net_cmd_resp'} = [$str];
- ${*$cmd}{'net_cmd_code'} = $code;
-
- substr($code, 0, 1);
-}
-
-
-sub capa {
- my $this = shift;
- my ($capa, %capabilities);
-
- # Fake a capability here
- $capabilities{APOP} = '' if ($this->banner() =~ /<.*>/);
-
- if ($this->_CAPA()) {
- $capabilities{CAPA} = 1;
- $capa = $this->read_until_dot();
- %capabilities = (%capabilities, map {/^\s*(\S+)\s*(.*)/} @$capa);
- }
- else {
-
- # Check AUTH for SASL capabilities
- if ($this->command('AUTH')->response() == CMD_OK) {
- my $mechanism = $this->read_until_dot();
- $capabilities{SASL} = join " ", map {m/([A-Z0-9_-]+)/} @{$mechanism};
- }
- }
-
- return ${*$this}{'net_pop3e_capabilities'} = \%capabilities;
-}
-
-
-sub capabilities {
- my $this = shift;
-
- ${*$this}{'net_pop3e_capabilities'} || $this->capa;
-}
-
-
-sub auth {
- my ($self, $username, $password) = @_;
-
- eval {
- require MIME::Base64;
- require Authen::SASL;
- } or $self->set_status(500, ["Need MIME::Base64 and Authen::SASL todo auth"]), return 0;
-
- my $capa = $self->capa;
- my $mechanisms = $capa->{SASL} || 'CRAM-MD5';
-
- my $sasl;
-
- if (ref($username) and UNIVERSAL::isa($username, 'Authen::SASL')) {
- $sasl = $username;
- my $user_mech = $sasl->mechanism || '';
- my @user_mech = split(/\s+/, $user_mech);
- my %user_mech;
- @user_mech{@user_mech} = ();
-
- my @server_mech = split(/\s+/, $mechanisms);
- my @mech = @user_mech
- ? grep { exists $user_mech{$_} } @server_mech
- : @server_mech;
- unless (@mech) {
- $self->set_status(
- 500,
- [ 'Client SASL mechanisms (',
- join(', ', @user_mech),
- ') do not match the SASL mechnism the server announces (',
- join(', ', @server_mech), ')',
- ]
- );
- return 0;
- }
-
- $sasl->mechanism(join(" ", @mech));
- }
- else {
- die "auth(username, password)" if not length $username;
- $sasl = Authen::SASL->new(
- mechanism => $mechanisms,
- callback => {
- user => $username,
- pass => $password,
- authname => $username,
- }
- );
- }
-
- # We should probably allow the user to pass the host, but I don't
- # currently know and SASL mechanisms that are used by smtp that need it
- my ($hostname) = split /:/, ${*$self}{'net_pop3_host'};
- my $client = eval { $sasl->client_new('pop', $hostname, 0) };
-
- unless ($client) {
- my $mech = $sasl->mechanism;
- $self->set_status(
- 500,
- [ " Authen::SASL failure: $@",
- '(please check if your local Authen::SASL installation',
- "supports mechanism '$mech'"
- ]
- );
- return 0;
- }
-
- my ($token) = $client->client_start
- or do {
- my $mech = $client->mechanism;
- $self->set_status(
- 500,
- [ ' Authen::SASL failure: $client->client_start ',
- "mechanism '$mech' hostname #$hostname#",
- $client->error
- ]
- );
- return 0;
- };
-
- # We dont support sasl mechanisms that encrypt the socket traffic.
- # todo that we would really need to change the ISA hierarchy
- # so we dont inherit from IO::Socket, but instead hold it in an attribute
-
- my @cmd = ("AUTH", $client->mechanism);
- my $code;
-
- push @cmd, MIME::Base64::encode_base64($token, '')
- if defined $token and length $token;
-
- while (($code = $self->command(@cmd)->response()) == CMD_MORE) {
-
- my ($token) = $client->client_step(MIME::Base64::decode_base64(($self->message)[0])) or do {
- $self->set_status(
- 500,
- [ ' Authen::SASL failure: $client->client_step ',
- "mechanism '", $client->mechanism, " hostname #$hostname#, ",
- $client->error
- ]
- );
- return 0;
- };
-
- @cmd = (MIME::Base64::encode_base64(defined $token ? $token : '', ''));
- }
-
- $code == CMD_OK;
-}
-
-
-sub banner {
- my $this = shift;
-
- return ${*$this}{'net_pop3_banner'};
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Net::POP3 - Post Office Protocol 3 Client class (RFC1939)
-
-=head1 SYNOPSIS
-
- use Net::POP3;
-
- # Constructors
- $pop = Net::POP3->new('pop3host');
- $pop = Net::POP3->new('pop3host', Timeout => 60);
-
- if ($pop->login($username, $password) > 0) {
- my $msgnums = $pop->list; # hashref of msgnum => size
- foreach my $msgnum (keys %$msgnums) {
- my $msg = $pop->get($msgnum);
- print @$msg;
- $pop->delete($msgnum);
- }
- }
-
- $pop->quit;
-
-=head1 DESCRIPTION
-
-This module implements a client interface to the POP3 protocol, enabling
-a perl5 application to talk to POP3 servers. This documentation assumes
-that you are familiar with the POP3 protocol described in RFC1939.
-
-A new Net::POP3 object must be created with the I<new> method. Once
-this has been done, all POP3 commands are accessed via method calls
-on the object.
-
-=head1 CONSTRUCTOR
-
-=over 4
-
-=item new ( [ HOST ] [, OPTIONS ] 0
-
-This is the constructor for a new Net::POP3 object. C<HOST> is the
-name of the remote host to which an POP3 connection is required.
-
-C<HOST> is optional. If C<HOST> is not given then it may instead be
-passed as the C<Host> option described below. If neither is given then
-the C<POP3_Hosts> specified in C<Net::Config> will be used.
-
-C<OPTIONS> are passed in a hash like fashion, using key and value pairs.
-Possible options are:
-
-B<Host> - POP3 host to connect to. It may be a single scalar, as defined for
-the C<PeerAddr> option in L<IO::Socket::INET>, or a reference to
-an array with hosts to try in turn. The L</host> method will return the value
-which was used to connect to the host.
-
-B<ResvPort> - If given then the socket for the C<Net::POP3> object
-will be bound to the local port given using C<bind> when the socket is
-created.
-
-B<Timeout> - Maximum time, in seconds, to wait for a response from the
-POP3 server (default: 120)
-
-B<Debug> - Enable debugging information
-
-=back
-
-=head1 METHODS
-
-Unless otherwise stated all methods return either a I<true> or I<false>
-value, with I<true> meaning that the operation was a success. When a method
-states that it returns a value, failure will be returned as I<undef> or an
-empty list.
-
-=over 4
-
-=item auth ( USERNAME, PASSWORD )
-
-Attempt SASL authentication.
-
-=item user ( USER )
-
-Send the USER command.
-
-=item pass ( PASS )
-
-Send the PASS command. Returns the number of messages in the mailbox.
-
-=item login ( [ USER [, PASS ]] )
-
-Send both the USER and PASS commands. If C<PASS> is not given the
-C<Net::POP3> uses C<Net::Netrc> to lookup the password using the host
-and username. If the username is not specified then the current user name
-will be used.
-
-Returns the number of messages in the mailbox. However if there are no
-messages on the server the string C<"0E0"> will be returned. This is
-will give a true value in a boolean context, but zero in a numeric context.
-
-If there was an error authenticating the user then I<undef> will be returned.
-
-=item apop ( [ USER [, PASS ]] )
-
-Authenticate with the server identifying as C<USER> with password C<PASS>.
-Similar to L</login>, but the password is not sent in clear text.
-
-To use this method you must have the Digest::MD5 or the MD5 module installed,
-otherwise this method will return I<undef>.
-
-=item banner ()
-
-Return the sever's connection banner
-
-=item capa ()
-
-Return a reference to a hash of the capabilities of the server. APOP
-is added as a pseudo capability. Note that I've been unable to
-find a list of the standard capability values, and some appear to
-be multi-word and some are not. We make an attempt at intelligently
-parsing them, but it may not be correct.
-
-=item capabilities ()
-
-Just like capa, but only uses a cache from the last time we asked
-the server, so as to avoid asking more than once.
-
-=item top ( MSGNUM [, NUMLINES ] )
-
-Get the header and the first C<NUMLINES> of the body for the message
-C<MSGNUM>. Returns a reference to an array which contains the lines of text
-read from the server.
-
-=item list ( [ MSGNUM ] )
-
-If called with an argument the C<list> returns the size of the message
-in octets.
-
-If called without arguments a reference to a hash is returned. The
-keys will be the C<MSGNUM>'s of all undeleted messages and the values will
-be their size in octets.
-
-=item get ( MSGNUM [, FH ] )
-
-Get the message C<MSGNUM> from the remote mailbox. If C<FH> is not given
-then get returns a reference to an array which contains the lines of
-text read from the server. If C<FH> is given then the lines returned
-from the server are printed to the filehandle C<FH>.
-
-=item getfh ( MSGNUM )
-
-As per get(), but returns a tied filehandle. Reading from this
-filehandle returns the requested message. The filehandle will return
-EOF at the end of the message and should not be reused.
-
-=item last ()
-
-Returns the highest C<MSGNUM> of all the messages accessed.
-
-=item popstat ()
-
-Returns a list of two elements. These are the number of undeleted
-elements and the size of the mbox in octets.
-
-=item ping ( USER )
-
-Returns a list of two elements. These are the number of new messages
-and the total number of messages for C<USER>.
-
-=item uidl ( [ MSGNUM ] )
-
-Returns a unique identifier for C<MSGNUM> if given. If C<MSGNUM> is not
-given C<uidl> returns a reference to a hash where the keys are the
-message numbers and the values are the unique identifiers.
-
-=item delete ( MSGNUM )
-
-Mark message C<MSGNUM> to be deleted from the remote mailbox. All messages
-that are marked to be deleted will be removed from the remote mailbox
-when the server connection closed.
-
-=item reset ()
-
-Reset the status of the remote POP3 server. This includes resetting the
-status of all messages to not be deleted.
-
-=item quit ()
-
-Quit and close the connection to the remote POP3 server. Any messages marked
-as deleted will be deleted from the remote mailbox.
-
-=back
-
-=head1 NOTES
-
-If a C<Net::POP3> object goes out of scope before C<quit> method is called
-then the C<reset> method will called before the connection is closed. This
-means that any messages marked to be deleted will not be.
-
-=head1 SEE ALSO
-
-L<Net::Netrc>,
-L<Net::Cmd>
-
-=head1 AUTHOR
-
-Graham Barr <gbarr at pobox.com>
-
-=head1 COPYRIGHT
-
-Copyright (c) 1995-2003 Graham Barr. All rights reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/Net/Ping.pm
===================================================================
--- vendor/perl/dist/lib/Net/Ping.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/Ping.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1777 +0,0 @@
-package Net::Ping;
-
-require 5.002;
-require Exporter;
-
-use strict;
-use vars qw(@ISA @EXPORT $VERSION
- $def_timeout $def_proto $def_factor
- $max_datasize $pingstring $hires $source_verify $syn_forking);
-use Fcntl qw( F_GETFL F_SETFL O_NONBLOCK );
-use Socket qw( SOCK_DGRAM SOCK_STREAM SOCK_RAW PF_INET SOL_SOCKET SO_ERROR
- inet_aton inet_ntoa sockaddr_in );
-use POSIX qw( ENOTCONN ECONNREFUSED ECONNRESET EINPROGRESS EWOULDBLOCK EAGAIN WNOHANG );
-use FileHandle;
-use Carp;
-
- at ISA = qw(Exporter);
- at EXPORT = qw(pingecho);
-$VERSION = "2.36";
-
-sub SOL_IP { 0; };
-sub IP_TOS { 1; };
-
-# Constants
-
-$def_timeout = 5; # Default timeout to wait for a reply
-$def_proto = "tcp"; # Default protocol to use for pinging
-$def_factor = 1.2; # Default exponential backoff rate.
-$max_datasize = 1024; # Maximum data bytes in a packet
-# The data we exchange with the server for the stream protocol
-$pingstring = "pingschwingping!\n";
-$source_verify = 1; # Default is to verify source endpoint
-$syn_forking = 0;
-
-if ($^O =~ /Win32/i) {
- # Hack to avoid this Win32 spewage:
- # Your vendor has not defined POSIX macro ECONNREFUSED
- my @pairs = (ECONNREFUSED => 10061, # "Unknown Error" Special Win32 Response?
- ENOTCONN => 10057,
- ECONNRESET => 10054,
- EINPROGRESS => 10036,
- EWOULDBLOCK => 10035,
- );
- while (my $name = shift @pairs) {
- my $value = shift @pairs;
- # When defined, these all are non-zero
- unless (eval $name) {
- no strict 'refs';
- *{$name} = defined prototype \&{$name} ? sub () {$value} : sub {$value};
- }
- }
-# $syn_forking = 1; # XXX possibly useful in < Win2K ?
-};
-
-# h2ph "asm/socket.h"
-# require "asm/socket.ph";
-sub SO_BINDTODEVICE {25;}
-
-# Description: The pingecho() subroutine is provided for backward
-# compatibility with the original Net::Ping. It accepts a host
-# name/IP and an optional timeout in seconds. Create a tcp ping
-# object and try pinging the host. The result of the ping is returned.
-
-sub pingecho
-{
- my ($host, # Name or IP number of host to ping
- $timeout # Optional timeout in seconds
- ) = @_;
- my ($p); # A ping object
-
- $p = Net::Ping->new("tcp", $timeout);
- $p->ping($host); # Going out of scope closes the connection
-}
-
-# Description: The new() method creates a new ping object. Optional
-# parameters may be specified for the protocol to use, the timeout in
-# seconds and the size in bytes of additional data which should be
-# included in the packet.
-# After the optional parameters are checked, the data is constructed
-# and a socket is opened if appropriate. The object is returned.
-
-sub new
-{
- my ($this,
- $proto, # Optional protocol to use for pinging
- $timeout, # Optional timeout in seconds
- $data_size, # Optional additional bytes of data
- $device, # Optional device to use
- $tos, # Optional ToS to set
- ) = @_;
- my $class = ref($this) || $this;
- my $self = {};
- my ($cnt, # Count through data bytes
- $min_datasize # Minimum data bytes required
- );
-
- bless($self, $class);
-
- $proto = $def_proto unless $proto; # Determine the protocol
- croak('Protocol for ping must be "icmp", "udp", "tcp", "syn", "stream", or "external"')
- unless $proto =~ m/^(icmp|udp|tcp|syn|stream|external)$/;
- $self->{"proto"} = $proto;
-
- $timeout = $def_timeout unless $timeout; # Determine the timeout
- croak("Default timeout for ping must be greater than 0 seconds")
- if $timeout <= 0;
- $self->{"timeout"} = $timeout;
-
- $self->{"device"} = $device;
-
- $self->{"tos"} = $tos;
-
- $min_datasize = ($proto eq "udp") ? 1 : 0; # Determine data size
- $data_size = $min_datasize unless defined($data_size) && $proto ne "tcp";
- croak("Data for ping must be from $min_datasize to $max_datasize bytes")
- if ($data_size < $min_datasize) || ($data_size > $max_datasize);
- $data_size-- if $self->{"proto"} eq "udp"; # We provide the first byte
- $self->{"data_size"} = $data_size;
-
- $self->{"data"} = ""; # Construct data bytes
- for ($cnt = 0; $cnt < $self->{"data_size"}; $cnt++)
- {
- $self->{"data"} .= chr($cnt % 256);
- }
-
- $self->{"local_addr"} = undef; # Don't bind by default
- $self->{"retrans"} = $def_factor; # Default exponential backoff rate
- $self->{"econnrefused"} = undef; # Default Connection refused behavior
-
- $self->{"seq"} = 0; # For counting packets
- if ($self->{"proto"} eq "udp") # Open a socket
- {
- $self->{"proto_num"} = (getprotobyname('udp'))[2] ||
- croak("Can't udp protocol by name");
- $self->{"port_num"} = (getservbyname('echo', 'udp'))[2] ||
- croak("Can't get udp echo port by name");
- $self->{"fh"} = FileHandle->new();
- socket($self->{"fh"}, PF_INET, SOCK_DGRAM,
- $self->{"proto_num"}) ||
- croak("udp socket error - $!");
- if ($self->{'device'}) {
- setsockopt($self->{"fh"}, SOL_SOCKET, SO_BINDTODEVICE(), pack("Z*", $self->{'device'}))
- or croak "error binding to device $self->{'device'} $!";
- }
- if ($self->{'tos'}) {
- setsockopt($self->{"fh"}, SOL_IP, IP_TOS(), pack("I*", $self->{'tos'}))
- or croak "error configuring tos to $self->{'tos'} $!";
- }
- }
- elsif ($self->{"proto"} eq "icmp")
- {
- croak("icmp ping requires root privilege") if ($> and $^O ne 'VMS' and $^O ne 'cygwin');
- $self->{"proto_num"} = (getprotobyname('icmp'))[2] ||
- croak("Can't get icmp protocol by name");
- $self->{"pid"} = $$ & 0xffff; # Save lower 16 bits of pid
- $self->{"fh"} = FileHandle->new();
- socket($self->{"fh"}, PF_INET, SOCK_RAW, $self->{"proto_num"}) ||
- croak("icmp socket error - $!");
- if ($self->{'device'}) {
- setsockopt($self->{"fh"}, SOL_SOCKET, SO_BINDTODEVICE(), pack("Z*", $self->{'device'}))
- or croak "error binding to device $self->{'device'} $!";
- }
- if ($self->{'tos'}) {
- setsockopt($self->{"fh"}, SOL_IP, IP_TOS(), pack("I*", $self->{'tos'}))
- or croak "error configuring tos to $self->{'tos'} $!";
- }
- }
- elsif ($self->{"proto"} eq "tcp" || $self->{"proto"} eq "stream")
- {
- $self->{"proto_num"} = (getprotobyname('tcp'))[2] ||
- croak("Can't get tcp protocol by name");
- $self->{"port_num"} = (getservbyname('echo', 'tcp'))[2] ||
- croak("Can't get tcp echo port by name");
- $self->{"fh"} = FileHandle->new();
- }
- elsif ($self->{"proto"} eq "syn")
- {
- $self->{"proto_num"} = (getprotobyname('tcp'))[2] ||
- croak("Can't get tcp protocol by name");
- $self->{"port_num"} = (getservbyname('echo', 'tcp'))[2] ||
- croak("Can't get tcp echo port by name");
- if ($syn_forking) {
- $self->{"fork_rd"} = FileHandle->new();
- $self->{"fork_wr"} = FileHandle->new();
- pipe($self->{"fork_rd"}, $self->{"fork_wr"});
- $self->{"fh"} = FileHandle->new();
- $self->{"good"} = {};
- $self->{"bad"} = {};
- } else {
- $self->{"wbits"} = "";
- $self->{"bad"} = {};
- }
- $self->{"syn"} = {};
- $self->{"stop_time"} = 0;
- }
- elsif ($self->{"proto"} eq "external")
- {
- # No preliminary work needs to be done.
- }
-
- return($self);
-}
-
-# Description: Set the local IP address from which pings will be sent.
-# For ICMP and UDP pings, this calls bind() on the already-opened socket;
-# for TCP pings, just saves the address to be used when the socket is
-# opened. Returns non-zero if successful; croaks on error.
-sub bind
-{
- my ($self,
- $local_addr # Name or IP number of local interface
- ) = @_;
- my ($ip # Packed IP number of $local_addr
- );
-
- croak("Usage: \$p->bind(\$local_addr)") unless @_ == 2;
- croak("already bound") if defined($self->{"local_addr"}) &&
- ($self->{"proto"} eq "udp" || $self->{"proto"} eq "icmp");
-
- $ip = inet_aton($local_addr);
- croak("nonexistent local address $local_addr") unless defined($ip);
- $self->{"local_addr"} = $ip; # Only used if proto is tcp
-
- if ($self->{"proto"} eq "udp" || $self->{"proto"} eq "icmp")
- {
- CORE::bind($self->{"fh"}, sockaddr_in(0, $ip)) ||
- croak("$self->{'proto'} bind error - $!");
- }
- elsif (($self->{"proto"} ne "tcp") && ($self->{"proto"} ne "syn"))
- {
- croak("Unknown protocol \"$self->{proto}\" in bind()");
- }
-
- return 1;
-}
-
-# Description: A select() wrapper that compensates for platform
-# peculiarities.
-sub mselect
-{
- if ($_[3] > 0 and $^O eq 'MSWin32') {
- # On windows, select() doesn't process the message loop,
- # but sleep() will, allowing alarm() to interrupt the latter.
- # So we chop up the timeout into smaller pieces and interleave
- # select() and sleep() calls.
- my $t = $_[3];
- my $gran = 0.5; # polling granularity in seconds
- my @args = @_;
- while (1) {
- $gran = $t if $gran > $t;
- my $nfound = select($_[0], $_[1], $_[2], $gran);
- undef $nfound if $nfound == -1;
- $t -= $gran;
- return $nfound if $nfound or !defined($nfound) or $t <= 0;
-
- sleep(0);
- ($_[0], $_[1], $_[2]) = @args;
- }
- }
- else {
- my $nfound = select($_[0], $_[1], $_[2], $_[3]);
- undef $nfound if $nfound == -1;
- return $nfound;
- }
-}
-
-# Description: Allow UDP source endpoint comparison to be
-# skipped for those remote interfaces that do
-# not response from the same endpoint.
-
-sub source_verify
-{
- my $self = shift;
- $source_verify = 1 unless defined
- ($source_verify = ((defined $self) && (ref $self)) ? shift() : $self);
-}
-
-# Description: Set whether or not the connect
-# behavior should enforce remote service
-# availability as well as reachability.
-
-sub service_check
-{
- my $self = shift;
- $self->{"econnrefused"} = 1 unless defined
- ($self->{"econnrefused"} = shift());
-}
-
-sub tcp_service_check
-{
- service_check(@_);
-}
-
-# Description: Set exponential backoff for retransmission.
-# Should be > 1 to retain exponential properties.
-# If set to 0, retransmissions are disabled.
-
-sub retrans
-{
- my $self = shift;
- $self->{"retrans"} = shift;
-}
-
-# Description: allows the module to use milliseconds as returned by
-# the Time::HiRes module
-
-$hires = 0;
-sub hires
-{
- my $self = shift;
- $hires = 1 unless defined
- ($hires = ((defined $self) && (ref $self)) ? shift() : $self);
- require Time::HiRes if $hires;
-}
-
-sub time
-{
- return $hires ? Time::HiRes::time() : CORE::time();
-}
-
-# Description: Sets or clears the O_NONBLOCK flag on a file handle.
-sub socket_blocking_mode
-{
- my ($self,
- $fh, # the file handle whose flags are to be modified
- $block) = @_; # if true then set the blocking
- # mode (clear O_NONBLOCK), otherwise
- # set the non-blocking mode (set O_NONBLOCK)
-
- my $flags;
- if ($^O eq 'MSWin32' || $^O eq 'VMS') {
- # FIONBIO enables non-blocking sockets on windows and vms.
- # FIONBIO is (0x80000000|(4<<16)|(ord('f')<<8)|126), as per winsock.h, ioctl.h
- my $f = 0x8004667e;
- my $v = pack("L", $block ? 0 : 1);
- ioctl($fh, $f, $v) or croak("ioctl failed: $!");
- return;
- }
- if ($flags = fcntl($fh, F_GETFL, 0)) {
- $flags = $block ? ($flags & ~O_NONBLOCK) : ($flags | O_NONBLOCK);
- if (!fcntl($fh, F_SETFL, $flags)) {
- croak("fcntl F_SETFL: $!");
- }
- } else {
- croak("fcntl F_GETFL: $!");
- }
-}
-
-# Description: Ping a host name or IP number with an optional timeout.
-# First lookup the host, and return undef if it is not found. Otherwise
-# perform the specific ping method based on the protocol. Return the
-# result of the ping.
-
-sub ping
-{
- my ($self,
- $host, # Name or IP number of host to ping
- $timeout, # Seconds after which ping times out
- ) = @_;
- my ($ip, # Packed IP number of $host
- $ret, # The return value
- $ping_time, # When ping began
- );
-
- croak("Usage: \$p->ping(\$host [, \$timeout])") unless @_ == 2 || @_ == 3;
- $timeout = $self->{"timeout"} unless $timeout;
- croak("Timeout must be greater than 0 seconds") if $timeout <= 0;
-
- $ip = inet_aton($host);
- return () unless defined($ip); # Does host exist?
-
- # Dispatch to the appropriate routine.
- $ping_time = &time();
- if ($self->{"proto"} eq "external") {
- $ret = $self->ping_external($ip, $timeout);
- }
- elsif ($self->{"proto"} eq "udp") {
- $ret = $self->ping_udp($ip, $timeout);
- }
- elsif ($self->{"proto"} eq "icmp") {
- $ret = $self->ping_icmp($ip, $timeout);
- }
- elsif ($self->{"proto"} eq "tcp") {
- $ret = $self->ping_tcp($ip, $timeout);
- }
- elsif ($self->{"proto"} eq "stream") {
- $ret = $self->ping_stream($ip, $timeout);
- }
- elsif ($self->{"proto"} eq "syn") {
- $ret = $self->ping_syn($host, $ip, $ping_time, $ping_time+$timeout);
- } else {
- croak("Unknown protocol \"$self->{proto}\" in ping()");
- }
-
- return wantarray ? ($ret, &time() - $ping_time, inet_ntoa($ip)) : $ret;
-}
-
-# Uses Net::Ping::External to do an external ping.
-sub ping_external {
- my ($self,
- $ip, # Packed IP number of the host
- $timeout # Seconds after which ping times out
- ) = @_;
-
- eval { require Net::Ping::External; }
- or croak('Protocol "external" not supported on your system: Net::Ping::External not found');
- return Net::Ping::External::ping(ip => $ip, timeout => $timeout);
-}
-
-use constant ICMP_ECHOREPLY => 0; # ICMP packet types
-use constant ICMP_UNREACHABLE => 3; # ICMP packet types
-use constant ICMP_ECHO => 8;
-use constant ICMP_STRUCT => "C2 n3 A"; # Structure of a minimal ICMP packet
-use constant SUBCODE => 0; # No ICMP subcode for ECHO and ECHOREPLY
-use constant ICMP_FLAGS => 0; # No special flags for send or recv
-use constant ICMP_PORT => 0; # No port with ICMP
-
-sub ping_icmp
-{
- my ($self,
- $ip, # Packed IP number of the host
- $timeout # Seconds after which ping times out
- ) = @_;
-
- my ($saddr, # sockaddr_in with port and ip
- $checksum, # Checksum of ICMP packet
- $msg, # ICMP packet to send
- $len_msg, # Length of $msg
- $rbits, # Read bits, filehandles for reading
- $nfound, # Number of ready filehandles found
- $finish_time, # Time ping should be finished
- $done, # set to 1 when we are done
- $ret, # Return value
- $recv_msg, # Received message including IP header
- $from_saddr, # sockaddr_in of sender
- $from_port, # Port packet was sent from
- $from_ip, # Packed IP of sender
- $from_type, # ICMP type
- $from_subcode, # ICMP subcode
- $from_chk, # ICMP packet checksum
- $from_pid, # ICMP packet id
- $from_seq, # ICMP packet sequence
- $from_msg # ICMP message
- );
-
- $self->{"seq"} = ($self->{"seq"} + 1) % 65536; # Increment sequence
- $checksum = 0; # No checksum for starters
- $msg = pack(ICMP_STRUCT . $self->{"data_size"}, ICMP_ECHO, SUBCODE,
- $checksum, $self->{"pid"}, $self->{"seq"}, $self->{"data"});
- $checksum = Net::Ping->checksum($msg);
- $msg = pack(ICMP_STRUCT . $self->{"data_size"}, ICMP_ECHO, SUBCODE,
- $checksum, $self->{"pid"}, $self->{"seq"}, $self->{"data"});
- $len_msg = length($msg);
- $saddr = sockaddr_in(ICMP_PORT, $ip);
- $self->{"from_ip"} = undef;
- $self->{"from_type"} = undef;
- $self->{"from_subcode"} = undef;
- send($self->{"fh"}, $msg, ICMP_FLAGS, $saddr); # Send the message
-
- $rbits = "";
- vec($rbits, $self->{"fh"}->fileno(), 1) = 1;
- $ret = 0;
- $done = 0;
- $finish_time = &time() + $timeout; # Must be done by this time
- while (!$done && $timeout > 0) # Keep trying if we have time
- {
- $nfound = mselect((my $rout=$rbits), undef, undef, $timeout); # Wait for packet
- $timeout = $finish_time - &time(); # Get remaining time
- if (!defined($nfound)) # Hmm, a strange error
- {
- $ret = undef;
- $done = 1;
- }
- elsif ($nfound) # Got a packet from somewhere
- {
- $recv_msg = "";
- $from_pid = -1;
- $from_seq = -1;
- $from_saddr = recv($self->{"fh"}, $recv_msg, 1500, ICMP_FLAGS);
- ($from_port, $from_ip) = sockaddr_in($from_saddr);
- ($from_type, $from_subcode) = unpack("C2", substr($recv_msg, 20, 2));
- if ($from_type == ICMP_ECHOREPLY) {
- ($from_pid, $from_seq) = unpack("n3", substr($recv_msg, 24, 4))
- if length $recv_msg >= 28;
- } else {
- ($from_pid, $from_seq) = unpack("n3", substr($recv_msg, 52, 4))
- if length $recv_msg >= 56;
- }
- $self->{"from_ip"} = $from_ip;
- $self->{"from_type"} = $from_type;
- $self->{"from_subcode"} = $from_subcode;
- if (($from_pid == $self->{"pid"}) && # Does the packet check out?
- (! $source_verify || (inet_ntoa($from_ip) eq inet_ntoa($ip))) &&
- ($from_seq == $self->{"seq"})) {
- if ($from_type == ICMP_ECHOREPLY) {
- $ret = 1;
- $done = 1;
- } elsif ($from_type == ICMP_UNREACHABLE) {
- $done = 1;
- }
- }
- } else { # Oops, timed out
- $done = 1;
- }
- }
- return $ret;
-}
-
-sub icmp_result {
- my ($self) = @_;
- my $ip = $self->{"from_ip"} || "";
- $ip = "\0\0\0\0" unless 4 == length $ip;
- return (inet_ntoa($ip),($self->{"from_type"} || 0), ($self->{"from_subcode"} || 0));
-}
-
-# Description: Do a checksum on the message. Basically sum all of
-# the short words and fold the high order bits into the low order bits.
-
-sub checksum
-{
- my ($class,
- $msg # The message to checksum
- ) = @_;
- my ($len_msg, # Length of the message
- $num_short, # The number of short words in the message
- $short, # One short word
- $chk # The checksum
- );
-
- $len_msg = length($msg);
- $num_short = int($len_msg / 2);
- $chk = 0;
- foreach $short (unpack("n$num_short", $msg))
- {
- $chk += $short;
- } # Add the odd byte in
- $chk += (unpack("C", substr($msg, $len_msg - 1, 1)) << 8) if $len_msg % 2;
- $chk = ($chk >> 16) + ($chk & 0xffff); # Fold high into low
- return(~(($chk >> 16) + $chk) & 0xffff); # Again and complement
-}
-
-
-# Description: Perform a tcp echo ping. Since a tcp connection is
-# host specific, we have to open and close each connection here. We
-# can't just leave a socket open. Because of the robust nature of
-# tcp, it will take a while before it gives up trying to establish a
-# connection. Therefore, we use select() on a non-blocking socket to
-# check against our timeout. No data bytes are actually
-# sent since the successful establishment of a connection is proof
-# enough of the reachability of the remote host. Also, tcp is
-# expensive and doesn't need our help to add to the overhead.
-
-sub ping_tcp
-{
- my ($self,
- $ip, # Packed IP number of the host
- $timeout # Seconds after which ping times out
- ) = @_;
- my ($ret # The return value
- );
-
- $! = 0;
- $ret = $self -> tcp_connect( $ip, $timeout);
- if (!$self->{"econnrefused"} &&
- $! == ECONNREFUSED) {
- $ret = 1; # "Connection refused" means reachable
- }
- $self->{"fh"}->close();
- return $ret;
-}
-
-sub tcp_connect
-{
- my ($self,
- $ip, # Packed IP number of the host
- $timeout # Seconds after which connect times out
- ) = @_;
- my ($saddr); # Packed IP and Port
-
- $saddr = sockaddr_in($self->{"port_num"}, $ip);
-
- my $ret = 0; # Default to unreachable
-
- my $do_socket = sub {
- socket($self->{"fh"}, PF_INET, SOCK_STREAM, $self->{"proto_num"}) ||
- croak("tcp socket error - $!");
- if (defined $self->{"local_addr"} &&
- !CORE::bind($self->{"fh"}, sockaddr_in(0, $self->{"local_addr"}))) {
- croak("tcp bind error - $!");
- }
- if ($self->{'device'}) {
- setsockopt($self->{"fh"}, SOL_SOCKET, SO_BINDTODEVICE(), pack("Z*", $self->{'device'}))
- or croak("error binding to device $self->{'device'} $!");
- }
- if ($self->{'tos'}) {
- setsockopt($self->{"fh"}, SOL_IP, IP_TOS(), pack("I*", $self->{'tos'}))
- or croak "error configuring tos to $self->{'tos'} $!";
- }
- };
- my $do_connect = sub {
- $self->{"ip"} = $ip;
- # ECONNREFUSED is 10061 on MSWin32. If we pass it as child error through $?,
- # we'll get (10061 & 255) = 77, so we cannot check it in the parent process.
- return ($ret = connect($self->{"fh"}, $saddr) || ($! == ECONNREFUSED && !$self->{"econnrefused"}));
- };
- my $do_connect_nb = sub {
- # Set O_NONBLOCK property on filehandle
- $self->socket_blocking_mode($self->{"fh"}, 0);
-
- # start the connection attempt
- if (!connect($self->{"fh"}, $saddr)) {
- if ($! == ECONNREFUSED) {
- $ret = 1 unless $self->{"econnrefused"};
- } elsif ($! != EINPROGRESS && ($^O ne 'MSWin32' || $! != EWOULDBLOCK)) {
- # EINPROGRESS is the expected error code after a connect()
- # on a non-blocking socket. But if the kernel immediately
- # determined that this connect() will never work,
- # Simply respond with "unreachable" status.
- # (This can occur on some platforms with errno
- # EHOSTUNREACH or ENETUNREACH.)
- return 0;
- } else {
- # Got the expected EINPROGRESS.
- # Just wait for connection completion...
- my ($wbits, $wout, $wexc);
- $wout = $wexc = $wbits = "";
- vec($wbits, $self->{"fh"}->fileno, 1) = 1;
-
- my $nfound = mselect(undef,
- ($wout = $wbits),
- ($^O eq 'MSWin32' ? ($wexc = $wbits) : undef),
- $timeout);
- warn("select: $!") unless defined $nfound;
-
- if ($nfound && vec($wout, $self->{"fh"}->fileno, 1)) {
- # the socket is ready for writing so the connection
- # attempt completed. test whether the connection
- # attempt was successful or not
-
- if (getpeername($self->{"fh"})) {
- # Connection established to remote host
- $ret = 1;
- } else {
- # TCP ACK will never come from this host
- # because there was an error connecting.
-
- # This should set $! to the correct error.
- my $char;
- sysread($self->{"fh"},$char,1);
- $! = ECONNREFUSED if ($! == EAGAIN && $^O =~ /cygwin/i);
-
- $ret = 1 if (!$self->{"econnrefused"}
- && $! == ECONNREFUSED);
- }
- } else {
- # the connection attempt timed out (or there were connect
- # errors on Windows)
- if ($^O =~ 'MSWin32') {
- # If the connect will fail on a non-blocking socket,
- # winsock reports ECONNREFUSED as an exception, and we
- # need to fetch the socket-level error code via getsockopt()
- # instead of using the thread-level error code that is in $!.
- if ($nfound && vec($wexc, $self->{"fh"}->fileno, 1)) {
- $! = unpack("i", getsockopt($self->{"fh"}, SOL_SOCKET,
- SO_ERROR));
- }
- }
- }
- }
- } else {
- # Connection established to remote host
- $ret = 1;
- }
-
- # Unset O_NONBLOCK property on filehandle
- $self->socket_blocking_mode($self->{"fh"}, 1);
- $self->{"ip"} = $ip;
- return $ret;
- };
-
- if ($syn_forking) {
- # Buggy Winsock API doesn't allow nonblocking connect.
- # Hence, if our OS is Windows, we need to create a separate
- # process to do the blocking connect attempt.
- # XXX Above comments are not true at least for Win2K, where
- # nonblocking connect works.
-
- $| = 1; # Clear buffer prior to fork to prevent duplicate flushing.
- $self->{'tcp_chld'} = fork;
- if (!$self->{'tcp_chld'}) {
- if (!defined $self->{'tcp_chld'}) {
- # Fork did not work
- warn "Fork error: $!";
- return 0;
- }
- &{ $do_socket }();
-
- # Try a slow blocking connect() call
- # and report the status to the parent.
- if ( &{ $do_connect }() ) {
- $self->{"fh"}->close();
- # No error
- exit 0;
- } else {
- # Pass the error status to the parent
- # Make sure that $! <= 255
- exit($! <= 255 ? $! : 255);
- }
- }
-
- &{ $do_socket }();
-
- my $patience = &time() + $timeout;
-
- my ($child, $child_errno);
- $? = 0; $child_errno = 0;
- # Wait up to the timeout
- # And clean off the zombie
- do {
- $child = waitpid($self->{'tcp_chld'}, &WNOHANG());
- $child_errno = $? >> 8;
- select(undef, undef, undef, 0.1);
- } while &time() < $patience && $child != $self->{'tcp_chld'};
-
- if ($child == $self->{'tcp_chld'}) {
- if ($self->{"proto"} eq "stream") {
- # We need the socket connected here, in parent
- # Should be safe to connect because the child finished
- # within the timeout
- &{ $do_connect }();
- }
- # $ret cannot be set by the child process
- $ret = !$child_errno;
- } else {
- # Time must have run out.
- # Put that choking client out of its misery
- kill "KILL", $self->{'tcp_chld'};
- # Clean off the zombie
- waitpid($self->{'tcp_chld'}, 0);
- $ret = 0;
- }
- delete $self->{'tcp_chld'};
- $! = $child_errno;
- } else {
- # Otherwise don't waste the resources to fork
-
- &{ $do_socket }();
-
- &{ $do_connect_nb }();
- }
-
- return $ret;
-}
-
-sub DESTROY {
- my $self = shift;
- if ($self->{'proto'} eq 'tcp' &&
- $self->{'tcp_chld'}) {
- # Put that choking client out of its misery
- kill "KILL", $self->{'tcp_chld'};
- # Clean off the zombie
- waitpid($self->{'tcp_chld'}, 0);
- }
-}
-
-# This writes the given string to the socket and then reads it
-# back. It returns 1 on success, 0 on failure.
-sub tcp_echo
-{
- my $self = shift;
- my $timeout = shift;
- my $pingstring = shift;
-
- my $ret = undef;
- my $time = &time();
- my $wrstr = $pingstring;
- my $rdstr = "";
-
- eval <<'EOM';
- do {
- my $rin = "";
- vec($rin, $self->{"fh"}->fileno(), 1) = 1;
-
- my $rout = undef;
- if($wrstr) {
- $rout = "";
- vec($rout, $self->{"fh"}->fileno(), 1) = 1;
- }
-
- if(mselect($rin, $rout, undef, ($time + $timeout) - &time())) {
-
- if($rout && vec($rout,$self->{"fh"}->fileno(),1)) {
- my $num = syswrite($self->{"fh"}, $wrstr, length $wrstr);
- if($num) {
- # If it was a partial write, update and try again.
- $wrstr = substr($wrstr,$num);
- } else {
- # There was an error.
- $ret = 0;
- }
- }
-
- if(vec($rin,$self->{"fh"}->fileno(),1)) {
- my $reply;
- if(sysread($self->{"fh"},$reply,length($pingstring)-length($rdstr))) {
- $rdstr .= $reply;
- $ret = 1 if $rdstr eq $pingstring;
- } else {
- # There was an error.
- $ret = 0;
- }
- }
-
- }
- } until &time() > ($time + $timeout) || defined($ret);
-EOM
-
- return $ret;
-}
-
-
-
-
-# Description: Perform a stream ping. If the tcp connection isn't
-# already open, it opens it. It then sends some data and waits for
-# a reply. It leaves the stream open on exit.
-
-sub ping_stream
-{
- my ($self,
- $ip, # Packed IP number of the host
- $timeout # Seconds after which ping times out
- ) = @_;
-
- # Open the stream if it's not already open
- if(!defined $self->{"fh"}->fileno()) {
- $self->tcp_connect($ip, $timeout) or return 0;
- }
-
- croak "tried to switch servers while stream pinging"
- if $self->{"ip"} ne $ip;
-
- return $self->tcp_echo($timeout, $pingstring);
-}
-
-# Description: opens the stream. You would do this if you want to
-# separate the overhead of opening the stream from the first ping.
-
-sub open
-{
- my ($self,
- $host, # Host or IP address
- $timeout # Seconds after which open times out
- ) = @_;
-
- my ($ip); # Packed IP number of the host
- $ip = inet_aton($host);
- $timeout = $self->{"timeout"} unless $timeout;
-
- if($self->{"proto"} eq "stream") {
- if(defined($self->{"fh"}->fileno())) {
- croak("socket is already open");
- } else {
- $self->tcp_connect($ip, $timeout);
- }
- }
-}
-
-
-# Description: Perform a udp echo ping. Construct a message of
-# at least the one-byte sequence number and any additional data bytes.
-# Send the message out and wait for a message to come back. If we
-# get a message, make sure all of its parts match. If they do, we are
-# done. Otherwise go back and wait for the message until we run out
-# of time. Return the result of our efforts.
-
-use constant UDP_FLAGS => 0; # Nothing special on send or recv
-sub ping_udp
-{
- my ($self,
- $ip, # Packed IP number of the host
- $timeout # Seconds after which ping times out
- ) = @_;
-
- my ($saddr, # sockaddr_in with port and ip
- $ret, # The return value
- $msg, # Message to be echoed
- $finish_time, # Time ping should be finished
- $flush, # Whether socket needs to be disconnected
- $connect, # Whether socket needs to be connected
- $done, # Set to 1 when we are done pinging
- $rbits, # Read bits, filehandles for reading
- $nfound, # Number of ready filehandles found
- $from_saddr, # sockaddr_in of sender
- $from_msg, # Characters echoed by $host
- $from_port, # Port message was echoed from
- $from_ip # Packed IP number of sender
- );
-
- $saddr = sockaddr_in($self->{"port_num"}, $ip);
- $self->{"seq"} = ($self->{"seq"} + 1) % 256; # Increment sequence
- $msg = chr($self->{"seq"}) . $self->{"data"}; # Add data if any
-
- if ($self->{"connected"}) {
- if ($self->{"connected"} ne $saddr) {
- # Still connected to wrong destination.
- # Need to flush out the old one.
- $flush = 1;
- }
- } else {
- # Not connected yet.
- # Need to connect() before send()
- $connect = 1;
- }
-
- # Have to connect() and send() instead of sendto()
- # in order to pick up on the ECONNREFUSED setting
- # from recv() or double send() errno as utilized in
- # the concept by rdw @ perlmonks. See:
- # http://perlmonks.thepen.com/42898.html
- if ($flush) {
- # Need to socket() again to flush the descriptor
- # This will disconnect from the old saddr.
- socket($self->{"fh"}, PF_INET, SOCK_DGRAM,
- $self->{"proto_num"});
- }
- # Connect the socket if it isn't already connected
- # to the right destination.
- if ($flush || $connect) {
- connect($self->{"fh"}, $saddr); # Tie destination to socket
- $self->{"connected"} = $saddr;
- }
- send($self->{"fh"}, $msg, UDP_FLAGS); # Send it
-
- $rbits = "";
- vec($rbits, $self->{"fh"}->fileno(), 1) = 1;
- $ret = 0; # Default to unreachable
- $done = 0;
- my $retrans = 0.01;
- my $factor = $self->{"retrans"};
- $finish_time = &time() + $timeout; # Ping needs to be done by then
- while (!$done && $timeout > 0)
- {
- if ($factor > 1)
- {
- $timeout = $retrans if $timeout > $retrans;
- $retrans*= $factor; # Exponential backoff
- }
- $nfound = mselect((my $rout=$rbits), undef, undef, $timeout); # Wait for response
- my $why = $!;
- $timeout = $finish_time - &time(); # Get remaining time
-
- if (!defined($nfound)) # Hmm, a strange error
- {
- $ret = undef;
- $done = 1;
- }
- elsif ($nfound) # A packet is waiting
- {
- $from_msg = "";
- $from_saddr = recv($self->{"fh"}, $from_msg, 1500, UDP_FLAGS);
- if (!$from_saddr) {
- # For example an unreachable host will make recv() fail.
- if (!$self->{"econnrefused"} &&
- ($! == ECONNREFUSED ||
- $! == ECONNRESET)) {
- # "Connection refused" means reachable
- # Good, continue
- $ret = 1;
- }
- $done = 1;
- } else {
- ($from_port, $from_ip) = sockaddr_in($from_saddr);
- if (!$source_verify ||
- (($from_ip eq $ip) && # Does the packet check out?
- ($from_port == $self->{"port_num"}) &&
- ($from_msg eq $msg)))
- {
- $ret = 1; # It's a winner
- $done = 1;
- }
- }
- }
- elsif ($timeout <= 0) # Oops, timed out
- {
- $done = 1;
- }
- else
- {
- # Send another in case the last one dropped
- if (send($self->{"fh"}, $msg, UDP_FLAGS)) {
- # Another send worked? The previous udp packet
- # must have gotten lost or is still in transit.
- # Hopefully this new packet will arrive safely.
- } else {
- if (!$self->{"econnrefused"} &&
- $! == ECONNREFUSED) {
- # "Connection refused" means reachable
- # Good, continue
- $ret = 1;
- }
- $done = 1;
- }
- }
- }
- return $ret;
-}
-
-# Description: Send a TCP SYN packet to host specified.
-sub ping_syn
-{
- my $self = shift;
- my $host = shift;
- my $ip = shift;
- my $start_time = shift;
- my $stop_time = shift;
-
- if ($syn_forking) {
- return $self->ping_syn_fork($host, $ip, $start_time, $stop_time);
- }
-
- my $fh = FileHandle->new();
- my $saddr = sockaddr_in($self->{"port_num"}, $ip);
-
- # Create TCP socket
- if (!socket ($fh, PF_INET, SOCK_STREAM, $self->{"proto_num"})) {
- croak("tcp socket error - $!");
- }
-
- if (defined $self->{"local_addr"} &&
- !CORE::bind($fh, sockaddr_in(0, $self->{"local_addr"}))) {
- croak("tcp bind error - $!");
- }
-
- if ($self->{'device'}) {
- setsockopt($fh, SOL_SOCKET, SO_BINDTODEVICE(), pack("Z*", $self->{'device'}))
- or croak("error binding to device $self->{'device'} $!");
- }
- if ($self->{'tos'}) {
- setsockopt($fh, SOL_IP, IP_TOS(), pack("I*", $self->{'tos'}))
- or croak "error configuring tos to $self->{'tos'} $!";
- }
- # Set O_NONBLOCK property on filehandle
- $self->socket_blocking_mode($fh, 0);
-
- # Attempt the non-blocking connect
- # by just sending the TCP SYN packet
- if (connect($fh, $saddr)) {
- # Non-blocking, yet still connected?
- # Must have connected very quickly,
- # or else it wasn't very non-blocking.
- #warn "WARNING: Nonblocking connect connected anyway? ($^O)";
- } else {
- # Error occurred connecting.
- if ($! == EINPROGRESS || ($^O eq 'MSWin32' && $! == EWOULDBLOCK)) {
- # The connection is just still in progress.
- # This is the expected condition.
- } else {
- # Just save the error and continue on.
- # The ack() can check the status later.
- $self->{"bad"}->{$host} = $!;
- }
- }
-
- my $entry = [ $host, $ip, $fh, $start_time, $stop_time ];
- $self->{"syn"}->{$fh->fileno} = $entry;
- if ($self->{"stop_time"} < $stop_time) {
- $self->{"stop_time"} = $stop_time;
- }
- vec($self->{"wbits"}, $fh->fileno, 1) = 1;
-
- return 1;
-}
-
-sub ping_syn_fork {
- my ($self, $host, $ip, $start_time, $stop_time) = @_;
-
- # Buggy Winsock API doesn't allow nonblocking connect.
- # Hence, if our OS is Windows, we need to create a separate
- # process to do the blocking connect attempt.
- my $pid = fork();
- if (defined $pid) {
- if ($pid) {
- # Parent process
- my $entry = [ $host, $ip, $pid, $start_time, $stop_time ];
- $self->{"syn"}->{$pid} = $entry;
- if ($self->{"stop_time"} < $stop_time) {
- $self->{"stop_time"} = $stop_time;
- }
- } else {
- # Child process
- my $saddr = sockaddr_in($self->{"port_num"}, $ip);
-
- # Create TCP socket
- if (!socket ($self->{"fh"}, PF_INET, SOCK_STREAM, $self->{"proto_num"})) {
- croak("tcp socket error - $!");
- }
-
- if (defined $self->{"local_addr"} &&
- !CORE::bind($self->{"fh"}, sockaddr_in(0, $self->{"local_addr"}))) {
- croak("tcp bind error - $!");
- }
-
- if ($self->{'device'}) {
- setsockopt($self->{"fh"}, SOL_SOCKET, SO_BINDTODEVICE(), pack("Z*", $self->{'device'}))
- or croak("error binding to device $self->{'device'} $!");
- }
- if ($self->{'tos'}) {
- setsockopt($self->{"fh"}, SOL_IP, IP_TOS(), pack("I*", $self->{'tos'}))
- or croak "error configuring tos to $self->{'tos'} $!";
- }
-
- $!=0;
- # Try to connect (could take a long time)
- connect($self->{"fh"}, $saddr);
- # Notify parent of connect error status
- my $err = $!+0;
- my $wrstr = "$$ $err";
- # Force to 16 chars including \n
- $wrstr .= " "x(15 - length $wrstr). "\n";
- syswrite($self->{"fork_wr"}, $wrstr, length $wrstr);
- exit;
- }
- } else {
- # fork() failed?
- die "fork: $!";
- }
- return 1;
-}
-
-# Description: Wait for TCP ACK from host specified
-# from ping_syn above. If no host is specified, wait
-# for TCP ACK from any of the hosts in the SYN queue.
-sub ack
-{
- my $self = shift;
-
- if ($self->{"proto"} eq "syn") {
- if ($syn_forking) {
- my @answer = $self->ack_unfork(shift);
- return wantarray ? @answer : $answer[0];
- }
- my $wbits = "";
- my $stop_time = 0;
- if (my $host = shift) {
- # Host passed as arg
- if (exists $self->{"bad"}->{$host}) {
- if (!$self->{"econnrefused"} &&
- $self->{"bad"}->{ $host } &&
- (($! = ECONNREFUSED)>0) &&
- $self->{"bad"}->{ $host } eq "$!") {
- # "Connection refused" means reachable
- # Good, continue
- } else {
- # ECONNREFUSED means no good
- return ();
- }
- }
- my $host_fd = undef;
- foreach my $fd (keys %{ $self->{"syn"} }) {
- my $entry = $self->{"syn"}->{$fd};
- if ($entry->[0] eq $host) {
- $host_fd = $fd;
- $stop_time = $entry->[4]
- || croak("Corrupted SYN entry for [$host]");
- last;
- }
- }
- croak("ack called on [$host] without calling ping first!")
- unless defined $host_fd;
- vec($wbits, $host_fd, 1) = 1;
- } else {
- # No $host passed so scan all hosts
- # Use the latest stop_time
- $stop_time = $self->{"stop_time"};
- # Use all the bits
- $wbits = $self->{"wbits"};
- }
-
- while ($wbits !~ /^\0*\z/) {
- my $timeout = $stop_time - &time();
- # Force a minimum of 10 ms timeout.
- $timeout = 0.01 if $timeout <= 0.01;
-
- my $winner_fd = undef;
- my $wout = $wbits;
- my $fd = 0;
- # Do "bad" fds from $wbits first
- while ($wout !~ /^\0*\z/) {
- if (vec($wout, $fd, 1)) {
- # Wipe it from future scanning.
- vec($wout, $fd, 1) = 0;
- if (my $entry = $self->{"syn"}->{$fd}) {
- if ($self->{"bad"}->{ $entry->[0] }) {
- $winner_fd = $fd;
- last;
- }
- }
- }
- $fd++;
- }
-
- if (defined($winner_fd) or my $nfound = mselect(undef, ($wout=$wbits), undef, $timeout)) {
- if (defined $winner_fd) {
- $fd = $winner_fd;
- } else {
- # Done waiting for one of the ACKs
- $fd = 0;
- # Determine which one
- while ($wout !~ /^\0*\z/ &&
- !vec($wout, $fd, 1)) {
- $fd++;
- }
- }
- if (my $entry = $self->{"syn"}->{$fd}) {
- # Wipe it from future scanning.
- delete $self->{"syn"}->{$fd};
- vec($self->{"wbits"}, $fd, 1) = 0;
- vec($wbits, $fd, 1) = 0;
- if (!$self->{"econnrefused"} &&
- $self->{"bad"}->{ $entry->[0] } &&
- (($! = ECONNREFUSED)>0) &&
- $self->{"bad"}->{ $entry->[0] } eq "$!") {
- # "Connection refused" means reachable
- # Good, continue
- } elsif (getpeername($entry->[2])) {
- # Connection established to remote host
- # Good, continue
- } else {
- # TCP ACK will never come from this host
- # because there was an error connecting.
-
- # This should set $! to the correct error.
- my $char;
- sysread($entry->[2],$char,1);
- # Store the excuse why the connection failed.
- $self->{"bad"}->{$entry->[0]} = $!;
- if (!$self->{"econnrefused"} &&
- (($! == ECONNREFUSED) ||
- ($! == EAGAIN && $^O =~ /cygwin/i))) {
- # "Connection refused" means reachable
- # Good, continue
- } else {
- # No good, try the next socket...
- next;
- }
- }
- # Everything passed okay, return the answer
- return wantarray ?
- ($entry->[0], &time() - $entry->[3], inet_ntoa($entry->[1]))
- : $entry->[0];
- } else {
- warn "Corrupted SYN entry: unknown fd [$fd] ready!";
- vec($wbits, $fd, 1) = 0;
- vec($self->{"wbits"}, $fd, 1) = 0;
- }
- } elsif (defined $nfound) {
- # Timed out waiting for ACK
- foreach my $fd (keys %{ $self->{"syn"} }) {
- if (vec($wbits, $fd, 1)) {
- my $entry = $self->{"syn"}->{$fd};
- $self->{"bad"}->{$entry->[0]} = "Timed out";
- vec($wbits, $fd, 1) = 0;
- vec($self->{"wbits"}, $fd, 1) = 0;
- delete $self->{"syn"}->{$fd};
- }
- }
- } else {
- # Weird error occurred with select()
- warn("select: $!");
- $self->{"syn"} = {};
- $wbits = "";
- }
- }
- }
- return ();
-}
-
-sub ack_unfork {
- my ($self,$host) = @_;
- my $stop_time = $self->{"stop_time"};
- if ($host) {
- # Host passed as arg
- if (my $entry = $self->{"good"}->{$host}) {
- delete $self->{"good"}->{$host};
- return ($entry->[0], &time() - $entry->[3], inet_ntoa($entry->[1]));
- }
- }
-
- my $rbits = "";
- my $timeout;
-
- if (keys %{ $self->{"syn"} }) {
- # Scan all hosts that are left
- vec($rbits, fileno($self->{"fork_rd"}), 1) = 1;
- $timeout = $stop_time - &time();
- # Force a minimum of 10 ms timeout.
- $timeout = 0.01 if $timeout < 0.01;
- } else {
- # No hosts left to wait for
- $timeout = 0;
- }
-
- if ($timeout > 0) {
- my $nfound;
- while ( keys %{ $self->{"syn"} } and
- $nfound = mselect((my $rout=$rbits), undef, undef, $timeout)) {
- # Done waiting for one of the ACKs
- if (!sysread($self->{"fork_rd"}, $_, 16)) {
- # Socket closed, which means all children are done.
- return ();
- }
- my ($pid, $how) = split;
- if ($pid) {
- # Flush the zombie
- waitpid($pid, 0);
- if (my $entry = $self->{"syn"}->{$pid}) {
- # Connection attempt to remote host is done
- delete $self->{"syn"}->{$pid};
- if (!$how || # If there was no error connecting
- (!$self->{"econnrefused"} &&
- $how == ECONNREFUSED)) { # "Connection refused" means reachable
- if ($host && $entry->[0] ne $host) {
- # A good connection, but not the host we need.
- # Move it from the "syn" hash to the "good" hash.
- $self->{"good"}->{$entry->[0]} = $entry;
- # And wait for the next winner
- next;
- }
- return ($entry->[0], &time() - $entry->[3], inet_ntoa($entry->[1]));
- }
- } else {
- # Should never happen
- die "Unknown ping from pid [$pid]";
- }
- } else {
- die "Empty response from status socket?";
- }
- }
- if (defined $nfound) {
- # Timed out waiting for ACK status
- } else {
- # Weird error occurred with select()
- warn("select: $!");
- }
- }
- if (my @synners = keys %{ $self->{"syn"} }) {
- # Kill all the synners
- kill 9, @synners;
- foreach my $pid (@synners) {
- # Wait for the deaths to finish
- # Then flush off the zombie
- waitpid($pid, 0);
- }
- }
- $self->{"syn"} = {};
- return ();
-}
-
-# Description: Tell why the ack() failed
-sub nack {
- my $self = shift;
- my $host = shift || croak('Usage> nack($failed_ack_host)');
- return $self->{"bad"}->{$host} || undef;
-}
-
-# Description: Close the connection.
-
-sub close
-{
- my ($self) = @_;
-
- if ($self->{"proto"} eq "syn") {
- delete $self->{"syn"};
- } elsif ($self->{"proto"} eq "tcp") {
- # The connection will already be closed
- } else {
- $self->{"fh"}->close();
- }
-}
-
-sub port_number {
- my $self = shift;
- if(@_) {
- $self->{port_num} = shift @_;
- $self->service_check(1);
- }
- return $self->{port_num};
-}
-
-
-1;
-__END__
-
-=head1 NAME
-
-Net::Ping - check a remote host for reachability
-
-=head1 SYNOPSIS
-
- use Net::Ping;
-
- $p = Net::Ping->new();
- print "$host is alive.\n" if $p->ping($host);
- $p->close();
-
- $p = Net::Ping->new("icmp");
- $p->bind($my_addr); # Specify source interface of pings
- foreach $host (@host_array)
- {
- print "$host is ";
- print "NOT " unless $p->ping($host, 2);
- print "reachable.\n";
- sleep(1);
- }
- $p->close();
-
- $p = Net::Ping->new("tcp", 2);
- # Try connecting to the www port instead of the echo port
- $p->port_number(getservbyname("http", "tcp"));
- while ($stop_time > time())
- {
- print "$host not reachable ", scalar(localtime()), "\n"
- unless $p->ping($host);
- sleep(300);
- }
- undef($p);
-
- # Like tcp protocol, but with many hosts
- $p = Net::Ping->new("syn");
- $p->port_number(getservbyname("http", "tcp"));
- foreach $host (@host_array) {
- $p->ping($host);
- }
- while (($host,$rtt,$ip) = $p->ack) {
- print "HOST: $host [$ip] ACKed in $rtt seconds.\n";
- }
-
- # High precision syntax (requires Time::HiRes)
- $p = Net::Ping->new();
- $p->hires();
- ($ret, $duration, $ip) = $p->ping($host, 5.5);
- printf("$host [ip: $ip] is alive (packet return time: %.2f ms)\n", 1000 * $duration)
- if $ret;
- $p->close();
-
- # For backward compatibility
- print "$host is alive.\n" if pingecho($host);
-
-=head1 DESCRIPTION
-
-This module contains methods to test the reachability of remote
-hosts on a network. A ping object is first created with optional
-parameters, a variable number of hosts may be pinged multiple
-times and then the connection is closed.
-
-You may choose one of six different protocols to use for the
-ping. The "tcp" protocol is the default. Note that a live remote host
-may still fail to be pingable by one or more of these protocols. For
-example, www.microsoft.com is generally alive but not "icmp" pingable.
-
-With the "tcp" protocol the ping() method attempts to establish a
-connection to the remote host's echo port. If the connection is
-successfully established, the remote host is considered reachable. No
-data is actually echoed. This protocol does not require any special
-privileges but has higher overhead than the "udp" and "icmp" protocols.
-
-Specifying the "udp" protocol causes the ping() method to send a udp
-packet to the remote host's echo port. If the echoed packet is
-received from the remote host and the received packet contains the
-same data as the packet that was sent, the remote host is considered
-reachable. This protocol does not require any special privileges.
-It should be borne in mind that, for a udp ping, a host
-will be reported as unreachable if it is not running the
-appropriate echo service. For Unix-like systems see L<inetd(8)>
-for more information.
-
-If the "icmp" protocol is specified, the ping() method sends an icmp
-echo message to the remote host, which is what the UNIX ping program
-does. If the echoed message is received from the remote host and
-the echoed information is correct, the remote host is considered
-reachable. Specifying the "icmp" protocol requires that the program
-be run as root or that the program be setuid to root.
-
-If the "external" protocol is specified, the ping() method attempts to
-use the C<Net::Ping::External> module to ping the remote host.
-C<Net::Ping::External> interfaces with your system's default C<ping>
-utility to perform the ping, and generally produces relatively
-accurate results. If C<Net::Ping::External> if not installed on your
-system, specifying the "external" protocol will result in an error.
-
-If the "syn" protocol is specified, the ping() method will only
-send a TCP SYN packet to the remote host then immediately return.
-If the syn packet was sent successfully, it will return a true value,
-otherwise it will return false. NOTE: Unlike the other protocols,
-the return value does NOT determine if the remote host is alive or
-not since the full TCP three-way handshake may not have completed
-yet. The remote host is only considered reachable if it receives
-a TCP ACK within the timeout specified. To begin waiting for the
-ACK packets, use the ack() method as explained below. Use the
-"syn" protocol instead the "tcp" protocol to determine reachability
-of multiple destinations simultaneously by sending parallel TCP
-SYN packets. It will not block while testing each remote host.
-demo/fping is provided in this distribution to demonstrate the
-"syn" protocol as an example.
-This protocol does not require any special privileges.
-
-=head2 Functions
-
-=over 4
-
-=item Net::Ping->new([$proto [, $def_timeout [, $bytes [, $device [, $tos ]]]]]);
-
-Create a new ping object. All of the parameters are optional. $proto
-specifies the protocol to use when doing a ping. The current choices
-are "tcp", "udp", "icmp", "stream", "syn", or "external".
-The default is "tcp".
-
-If a default timeout ($def_timeout) in seconds is provided, it is used
-when a timeout is not given to the ping() method (below). The timeout
-must be greater than 0 and the default, if not specified, is 5 seconds.
-
-If the number of data bytes ($bytes) is given, that many data bytes
-are included in the ping packet sent to the remote host. The number of
-data bytes is ignored if the protocol is "tcp". The minimum (and
-default) number of data bytes is 1 if the protocol is "udp" and 0
-otherwise. The maximum number of data bytes that can be specified is
-1024.
-
-If $device is given, this device is used to bind the source endpoint
-before sending the ping packet. I believe this only works with
-superuser privileges and with udp and icmp protocols at this time.
-
-If $tos is given, this ToS is configured into the socket.
-
-=item $p->ping($host [, $timeout]);
-
-Ping the remote host and wait for a response. $host can be either the
-hostname or the IP number of the remote host. The optional timeout
-must be greater than 0 seconds and defaults to whatever was specified
-when the ping object was created. Returns a success flag. If the
-hostname cannot be found or there is a problem with the IP number, the
-success flag returned will be undef. Otherwise, the success flag will
-be 1 if the host is reachable and 0 if it is not. For most practical
-purposes, undef and 0 and can be treated as the same case. In array
-context, the elapsed time as well as the string form of the ip the
-host resolved to are also returned. The elapsed time value will
-be a float, as retuned by the Time::HiRes::time() function, if hires()
-has been previously called, otherwise it is returned as an integer.
-
-=item $p->source_verify( { 0 | 1 } );
-
-Allows source endpoint verification to be enabled or disabled.
-This is useful for those remote destinations with multiples
-interfaces where the response may not originate from the same
-endpoint that the original destination endpoint was sent to.
-This only affects udp and icmp protocol pings.
-
-This is enabled by default.
-
-=item $p->service_check( { 0 | 1 } );
-
-Set whether or not the connect behavior should enforce
-remote service availability as well as reachability. Normally,
-if the remote server reported ECONNREFUSED, it must have been
-reachable because of the status packet that it reported.
-With this option enabled, the full three-way tcp handshake
-must have been established successfully before it will
-claim it is reachable. NOTE: It still does nothing more
-than connect and disconnect. It does not speak any protocol
-(i.e., HTTP or FTP) to ensure the remote server is sane in
-any way. The remote server CPU could be grinding to a halt
-and unresponsive to any clients connecting, but if the kernel
-throws the ACK packet, it is considered alive anyway. To
-really determine if the server is responding well would be
-application specific and is beyond the scope of Net::Ping.
-For udp protocol, enabling this option demands that the
-remote server replies with the same udp data that it was sent
-as defined by the udp echo service.
-
-This affects the "udp", "tcp", and "syn" protocols.
-
-This is disabled by default.
-
-=item $p->tcp_service_check( { 0 | 1 } );
-
-Deprecated method, but does the same as service_check() method.
-
-=item $p->hires( { 0 | 1 } );
-
-Causes this module to use Time::HiRes module, allowing milliseconds
-to be returned by subsequent calls to ping().
-
-This is disabled by default.
-
-=item $p->bind($local_addr);
-
-Sets the source address from which pings will be sent. This must be
-the address of one of the interfaces on the local host. $local_addr
-may be specified as a hostname or as a text IP address such as
-"192.168.1.1".
-
-If the protocol is set to "tcp", this method may be called any
-number of times, and each call to the ping() method (below) will use
-the most recent $local_addr. If the protocol is "icmp" or "udp",
-then bind() must be called at most once per object, and (if it is
-called at all) must be called before the first call to ping() for that
-object.
-
-=item $p->open($host);
-
-When you are using the "stream" protocol, this call pre-opens the
-tcp socket. It's only necessary to do this if you want to
-provide a different timeout when creating the connection, or
-remove the overhead of establishing the connection from the
-first ping. If you don't call C<open()>, the connection is
-automatically opened the first time C<ping()> is called.
-This call simply does nothing if you are using any protocol other
-than stream.
-
-=item $p->ack( [ $host ] );
-
-When using the "syn" protocol, use this method to determine
-the reachability of the remote host. This method is meant
-to be called up to as many times as ping() was called. Each
-call returns the host (as passed to ping()) that came back
-with the TCP ACK. The order in which the hosts are returned
-may not necessarily be the same order in which they were
-SYN queued using the ping() method. If the timeout is
-reached before the TCP ACK is received, or if the remote
-host is not listening on the port attempted, then the TCP
-connection will not be established and ack() will return
-undef. In list context, the host, the ack time, and the
-dotted ip string will be returned instead of just the host.
-If the optional $host argument is specified, the return
-value will be pertaining to that host only.
-This call simply does nothing if you are using any protocol
-other than syn.
-
-=item $p->nack( $failed_ack_host );
-
-The reason that host $failed_ack_host did not receive a
-valid ACK. Useful to find out why when ack( $fail_ack_host )
-returns a false value.
-
-=item $p->close();
-
-Close the network connection for this ping object. The network
-connection is also closed by "undef $p". The network connection is
-automatically closed if the ping object goes out of scope (e.g. $p is
-local to a subroutine and you leave the subroutine).
-
-=item $p->port_number([$port_number])
-
-When called with a port number, the port number used to ping is set to
-$port_number rather than using the echo port. It also has the effect
-of calling C<$p-E<gt>service_check(1)> causing a ping to return a successful
-response only if that specific port is accessible. This function returns
-the value of the port that C<ping()> will connect to.
-
-=item pingecho($host [, $timeout]);
-
-To provide backward compatibility with the previous version of
-Net::Ping, a pingecho() subroutine is available with the same
-functionality as before. pingecho() uses the tcp protocol. The
-return values and parameters are the same as described for the ping()
-method. This subroutine is obsolete and may be removed in a future
-version of Net::Ping.
-
-=back
-
-=head1 NOTES
-
-There will be less network overhead (and some efficiency in your
-program) if you specify either the udp or the icmp protocol. The tcp
-protocol will generate 2.5 times or more traffic for each ping than
-either udp or icmp. If many hosts are pinged frequently, you may wish
-to implement a small wait (e.g. 25ms or more) between each ping to
-avoid flooding your network with packets.
-
-The icmp protocol requires that the program be run as root or that it
-be setuid to root. The other protocols do not require special
-privileges, but not all network devices implement tcp or udp echo.
-
-Local hosts should normally respond to pings within milliseconds.
-However, on a very congested network it may take up to 3 seconds or
-longer to receive an echo packet from the remote host. If the timeout
-is set too low under these conditions, it will appear that the remote
-host is not reachable (which is almost the truth).
-
-Reachability doesn't necessarily mean that the remote host is actually
-functioning beyond its ability to echo packets. tcp is slightly better
-at indicating the health of a system than icmp because it uses more
-of the networking stack to respond.
-
-Because of a lack of anything better, this module uses its own
-routines to pack and unpack ICMP packets. It would be better for a
-separate module to be written which understands all of the different
-kinds of ICMP packets.
-
-=head1 INSTALL
-
-The latest source tree is available via cvs:
-
- cvs -z3 -q -d :pserver:anonymous at cvs.roobik.com.:/usr/local/cvsroot/freeware checkout Net-Ping
- cd Net-Ping
-
-The tarball can be created as follows:
-
- perl Makefile.PL ; make ; make dist
-
-The latest Net::Ping release can be found at CPAN:
-
- $CPAN/modules/by-module/Net/
-
-1) Extract the tarball
-
- gtar -zxvf Net-Ping-xxxx.tar.gz
- cd Net-Ping-xxxx
-
-2) Build:
-
- make realclean
- perl Makefile.PL
- make
- make test
-
-3) Install
-
- make install
-
-Or install it RPM Style:
-
- rpm -ta SOURCES/Net-Ping-xxxx.tar.gz
-
- rpm -ih RPMS/noarch/perl-Net-Ping-xxxx.rpm
-
-=head1 BUGS
-
-For a list of known issues, visit:
-
-https://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Ping
-
-To report a new bug, visit:
-
-https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Ping
-
-=head1 AUTHORS
-
- Current maintainer:
- bbb at cpan.org (Rob Brown)
-
- External protocol:
- colinm at cpan.org (Colin McMillen)
-
- Stream protocol:
- bronson at trestle.com (Scott Bronson)
-
- Original pingecho():
- karrer at bernina.ethz.ch (Andreas Karrer)
- pmarquess at bfsec.bt.co.uk (Paul Marquess)
-
- Original Net::Ping author:
- mose at ns.ccsn.edu (Russell Mosemann)
-
-=head1 COPYRIGHT
-
-Copyright (c) 2002-2003, Rob Brown. All rights reserved.
-
-Copyright (c) 2001, Colin McMillen. All rights reserved.
-
-This program is free software; you may redistribute it and/or
-modify it under the same terms as Perl itself.
-
-$Id: Ping.pm,v 1.1.1.2 2011-02-17 12:49:38 laffer1 Exp $
-
-=cut
Deleted: vendor/perl/dist/lib/Net/README
===================================================================
--- vendor/perl/dist/lib/Net/README 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/README 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,109 +0,0 @@
-libnet is a collection of Perl modules which provides a simple
-and consistent programming interface (API) to the client side
-of various protocols used in the internet community.
-
-For details of each protocol please refer to the RFC. RFC's
-can be found a various places on the WEB, for a starting
-point look at:
-
- http://www.yahoo.com/Computers_and_Internet/Standards/RFCs/
-
-The RFC implemented in this distribution are
-
-Net::FTP RFC959 File Transfer Protocol
-Net::SMTP RFC821 Simple Mail Transfer Protocol
-Net::Time RFC867 Daytime Protocol
-Net::Time RFC868 Time Protocol
-Net::NNTP RFC977 Network News Transfer Protocol
-Net::POP3 RFC1939 Post Office Protocol 3
-
-AVAILABILITY
-
-The latest version of libnet is available from the Comprehensive Perl
-Archive Network (CPAN). To find a CPAN site near you see:
-
- http://search.cpan.org/~gbarr/libnet/
-
-The subversion source repository can be browsed at
-
- http://svn.goingon.net/viewvc/libnet/
-
-If you have a subversion client, then you can checkout the latest code with
-
- svn co http://svn.goingon.net/repos/libnet/trunk libnet
-
-INSTALLATION
-
-In order to use this package you will need Perl version 5.002 or
-better. You install libnet, as you would install any perl module
-library, by running these commands:
-
- perl Makefile.PL
- make
- make test
- make install
-
-If you want to install a private copy of libnet in your home
-directory, then you should try to produce the initial Makefile with
-something like this command:
-
- perl Makefile.PL PREFIX=~/perl
-
-
-The Makefile.PL program will start out by checking your perl
-installation for a few packages that are recommended to be installed
-together with libnet. These packages should be available on CPAN
-(described above).
-
-CONFIGURE
-
-Normally when perl Makefile.PL is run it will run Configure which will
-ask some questions about your system. The results of these questions
-will be stored in a file called libnet.cfg which will be installed
-alongside the other perl modules in this distribution. The Makefile.PL
-will run Configure in an interactive mode unless these exists a file
-called libnet.cfg in the build directory.
-
-If you are on a system which cannot run this script you can create an
-empty file to make Makefile.PL skip running Configure. If you want to
-keep your existing settings and not run interactivly the simple run
-
- Configure -d
-
-before running the Makefile.PL.
-
-DOCUMENTATION
-
-See ChangeLog for recent changes. POD style documentation is included
-in all modules and scripts. These are normally converted to manual
-pages and installed as part of the "make install" process. You should
-also be able to use the 'perldoc' utility to extract documentation from
-the module files directly.
-
-DEMOS
-
-The demos directory does contain a few demo scripts. These should be
-run from the top directory like
-
- demos/smtp.self -user my-email-address -debug
-
-However I do not guarantee these scripts to work.
-
-SUPPORT
-
-Questions about how to use this library should be directed to the
-comp.lang.perl.modules USENET Newsgroup. Bug reports and suggestions
-for improvements can be sent to me at <gbarr at pobox.com>.
-
-Most of the modules in this library have an option to output a debug
-transcript to STDERR. When reporting bugs/problems please, if possible,
-include a transcript of a run.
-
-COPYRIGHT
-
- (C) 1996-2007 Graham Barr. All rights reserved.
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-Share and Enjoy!
Deleted: vendor/perl/dist/lib/Net/SMTP.pm
===================================================================
--- vendor/perl/dist/lib/Net/SMTP.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/SMTP.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,867 +0,0 @@
-# Net::SMTP.pm
-#
-# Copyright (c) 1995-2004 Graham Barr <gbarr at pobox.com>. All rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-
-package Net::SMTP;
-
-require 5.001;
-
-use strict;
-use vars qw($VERSION @ISA);
-use Socket 1.3;
-use Carp;
-use IO::Socket;
-use Net::Cmd;
-use Net::Config;
-
-$VERSION = "2.31";
-
- at ISA = qw(Net::Cmd IO::Socket::INET);
-
-
-sub new {
- my $self = shift;
- my $type = ref($self) || $self;
- my ($host, %arg);
- if (@_ % 2) {
- $host = shift;
- %arg = @_;
- }
- else {
- %arg = @_;
- $host = delete $arg{Host};
- }
- my $hosts = defined $host ? $host : $NetConfig{smtp_hosts};
- my $obj;
-
- my $h;
- foreach $h (@{ref($hosts) ? $hosts : [$hosts]}) {
- $obj = $type->SUPER::new(
- PeerAddr => ($host = $h),
- PeerPort => $arg{Port} || 'smtp(25)',
- LocalAddr => $arg{LocalAddr},
- LocalPort => $arg{LocalPort},
- Proto => 'tcp',
- Timeout => defined $arg{Timeout}
- ? $arg{Timeout}
- : 120
- )
- and last;
- }
-
- return undef
- unless defined $obj;
-
- $obj->autoflush(1);
-
- $obj->debug(exists $arg{Debug} ? $arg{Debug} : undef);
-
- unless ($obj->response() == CMD_OK) {
- $obj->close();
- return undef;
- }
-
- ${*$obj}{'net_smtp_exact_addr'} = $arg{ExactAddresses};
- ${*$obj}{'net_smtp_host'} = $host;
-
- (${*$obj}{'net_smtp_banner'}) = $obj->message;
- (${*$obj}{'net_smtp_domain'}) = $obj->message =~ /\A\s*(\S+)/;
-
- unless ($obj->hello($arg{Hello} || "")) {
- $obj->close();
- return undef;
- }
-
- $obj;
-}
-
-
-sub host {
- my $me = shift;
- ${*$me}{'net_smtp_host'};
-}
-
-##
-## User interface methods
-##
-
-
-sub banner {
- my $me = shift;
-
- return ${*$me}{'net_smtp_banner'} || undef;
-}
-
-
-sub domain {
- my $me = shift;
-
- return ${*$me}{'net_smtp_domain'} || undef;
-}
-
-
-sub etrn {
- my $self = shift;
- defined($self->supports('ETRN', 500, ["Command unknown: 'ETRN'"]))
- && $self->_ETRN(@_);
-}
-
-
-sub auth {
- my ($self, $username, $password) = @_;
-
- eval {
- require MIME::Base64;
- require Authen::SASL;
- } or $self->set_status(500, ["Need MIME::Base64 and Authen::SASL todo auth"]), return 0;
-
- my $mechanisms = $self->supports('AUTH', 500, ["Command unknown: 'AUTH'"]);
- return unless defined $mechanisms;
-
- my $sasl;
-
- if (ref($username) and UNIVERSAL::isa($username, 'Authen::SASL')) {
- $sasl = $username;
- $sasl->mechanism($mechanisms);
- }
- else {
- die "auth(username, password)" if not length $username;
- $sasl = Authen::SASL->new(
- mechanism => $mechanisms,
- callback => {
- user => $username,
- pass => $password,
- authname => $username,
- }
- );
- }
-
- # We should probably allow the user to pass the host, but I don't
- # currently know and SASL mechanisms that are used by smtp that need it
- my $client = $sasl->client_new('smtp', ${*$self}{'net_smtp_host'}, 0);
- my $str = $client->client_start;
-
- # We dont support sasl mechanisms that encrypt the socket traffic.
- # todo that we would really need to change the ISA hierarchy
- # so we dont inherit from IO::Socket, but instead hold it in an attribute
-
- my @cmd = ("AUTH", $client->mechanism);
- my $code;
-
- push @cmd, MIME::Base64::encode_base64($str, '')
- if defined $str and length $str;
-
- while (($code = $self->command(@cmd)->response()) == CMD_MORE) {
- @cmd = (
- MIME::Base64::encode_base64(
- $client->client_step(MIME::Base64::decode_base64(($self->message)[0])), ''
- )
- );
- }
-
- $code == CMD_OK;
-}
-
-
-sub hello {
- my $me = shift;
- my $domain = shift || "localhost.localdomain";
- my $ok = $me->_EHLO($domain);
- my @msg = $me->message;
-
- if ($ok) {
- my $h = ${*$me}{'net_smtp_esmtp'} = {};
- my $ln;
- foreach $ln (@msg) {
- $h->{uc $1} = $2
- if $ln =~ /(\w+)\b[= \t]*([^\n]*)/;
- }
- }
- elsif ($me->status == CMD_ERROR) {
- @msg = $me->message
- if $ok = $me->_HELO($domain);
- }
-
- return undef unless $ok;
-
- $msg[0] =~ /\A\s*(\S+)/;
- return ($1 || " ");
-}
-
-
-sub supports {
- my $self = shift;
- my $cmd = uc shift;
- return ${*$self}{'net_smtp_esmtp'}->{$cmd}
- if exists ${*$self}{'net_smtp_esmtp'}->{$cmd};
- $self->set_status(@_)
- if @_;
- return;
-}
-
-
-sub _addr {
- my $self = shift;
- my $addr = shift;
- $addr = "" unless defined $addr;
-
- if (${*$self}{'net_smtp_exact_addr'}) {
- return $1 if $addr =~ /^\s*(<.*>)\s*$/s;
- }
- else {
- return $1 if $addr =~ /(<[^>]*>)/;
- $addr =~ s/^\s+|\s+$//sg;
- }
-
- "<$addr>";
-}
-
-
-sub mail {
- my $me = shift;
- my $addr = _addr($me, shift);
- my $opts = "";
-
- if (@_) {
- my %opt = @_;
- my ($k, $v);
-
- if (exists ${*$me}{'net_smtp_esmtp'}) {
- my $esmtp = ${*$me}{'net_smtp_esmtp'};
-
- if (defined($v = delete $opt{Size})) {
- if (exists $esmtp->{SIZE}) {
- $opts .= sprintf " SIZE=%d", $v + 0;
- }
- else {
- carp 'Net::SMTP::mail: SIZE option not supported by host';
- }
- }
-
- if (defined($v = delete $opt{Return})) {
- if (exists $esmtp->{DSN}) {
- $opts .= " RET=" . ((uc($v) eq "FULL") ? "FULL" : "HDRS");
- }
- else {
- carp 'Net::SMTP::mail: DSN option not supported by host';
- }
- }
-
- if (defined($v = delete $opt{Bits})) {
- if ($v eq "8") {
- if (exists $esmtp->{'8BITMIME'}) {
- $opts .= " BODY=8BITMIME";
- }
- else {
- carp 'Net::SMTP::mail: 8BITMIME option not supported by host';
- }
- }
- elsif ($v eq "binary") {
- if (exists $esmtp->{'BINARYMIME'} && exists $esmtp->{'CHUNKING'}) {
- $opts .= " BODY=BINARYMIME";
- ${*$me}{'net_smtp_chunking'} = 1;
- }
- else {
- carp 'Net::SMTP::mail: BINARYMIME option not supported by host';
- }
- }
- elsif (exists $esmtp->{'8BITMIME'} or exists $esmtp->{'BINARYMIME'}) {
- $opts .= " BODY=7BIT";
- }
- else {
- carp 'Net::SMTP::mail: 8BITMIME and BINARYMIME options not supported by host';
- }
- }
-
- if (defined($v = delete $opt{Transaction})) {
- if (exists $esmtp->{CHECKPOINT}) {
- $opts .= " TRANSID=" . _addr($me, $v);
- }
- else {
- carp 'Net::SMTP::mail: CHECKPOINT option not supported by host';
- }
- }
-
- if (defined($v = delete $opt{Envelope})) {
- if (exists $esmtp->{DSN}) {
- $v =~ s/([^\041-\176]|=|\+)/sprintf "+%02x", ord($1)/sge;
- $opts .= " ENVID=$v";
- }
- else {
- carp 'Net::SMTP::mail: DSN option not supported by host';
- }
- }
-
- if (defined($v = delete $opt{ENVID})) {
-
- # expected to be in a format as required by RFC 3461, xtext-encoded
- if (exists $esmtp->{DSN}) {
- $opts .= " ENVID=$v";
- }
- else {
- carp 'Net::SMTP::mail: DSN option not supported by host';
- }
- }
-
- if (defined($v = delete $opt{AUTH})) {
-
- # expected to be in a format as required by RFC 2554,
- # rfc2821-quoted and xtext-encoded, or <>
- if (exists $esmtp->{AUTH}) {
- $v = '<>' if !defined($v) || $v eq '';
- $opts .= " AUTH=$v";
- }
- else {
- carp 'Net::SMTP::mail: AUTH option not supported by host';
- }
- }
-
- if (defined($v = delete $opt{XVERP})) {
- if (exists $esmtp->{'XVERP'}) {
- $opts .= " XVERP";
- }
- else {
- carp 'Net::SMTP::mail: XVERP option not supported by host';
- }
- }
-
- carp 'Net::SMTP::recipient: unknown option(s) ' . join(" ", keys %opt) . ' - ignored'
- if scalar keys %opt;
- }
- else {
- carp 'Net::SMTP::mail: ESMTP not supported by host - options discarded :-(';
- }
- }
-
- $me->_MAIL("FROM:" . $addr . $opts);
-}
-
-
-sub send { my $me = shift; $me->_SEND("FROM:" . _addr($me, $_[0])) }
-sub send_or_mail { my $me = shift; $me->_SOML("FROM:" . _addr($me, $_[0])) }
-sub send_and_mail { my $me = shift; $me->_SAML("FROM:" . _addr($me, $_[0])) }
-
-
-sub reset {
- my $me = shift;
-
- $me->dataend()
- if (exists ${*$me}{'net_smtp_lastch'});
-
- $me->_RSET();
-}
-
-
-sub recipient {
- my $smtp = shift;
- my $opts = "";
- my $skip_bad = 0;
-
- if (@_ && ref($_[-1])) {
- my %opt = %{pop(@_)};
- my $v;
-
- $skip_bad = delete $opt{'SkipBad'};
-
- if (exists ${*$smtp}{'net_smtp_esmtp'}) {
- my $esmtp = ${*$smtp}{'net_smtp_esmtp'};
-
- if (defined($v = delete $opt{Notify})) {
- if (exists $esmtp->{DSN}) {
- $opts .= " NOTIFY=" . join(",", map { uc $_ } @$v);
- }
- else {
- carp 'Net::SMTP::recipient: DSN option not supported by host';
- }
- }
-
- if (defined($v = delete $opt{ORcpt})) {
- if (exists $esmtp->{DSN}) {
- $opts .= " ORCPT=" . $v;
- }
- else {
- carp 'Net::SMTP::recipient: DSN option not supported by host';
- }
- }
-
- carp 'Net::SMTP::recipient: unknown option(s) ' . join(" ", keys %opt) . ' - ignored'
- if scalar keys %opt;
- }
- elsif (%opt) {
- carp 'Net::SMTP::recipient: ESMTP not supported by host - options discarded :-(';
- }
- }
-
- my @ok;
- my $addr;
- foreach $addr (@_) {
- if ($smtp->_RCPT("TO:" . _addr($smtp, $addr) . $opts)) {
- push(@ok, $addr) if $skip_bad;
- }
- elsif (!$skip_bad) {
- return 0;
- }
- }
-
- return $skip_bad ? @ok : 1;
-}
-
-BEGIN {
- *to = \&recipient;
- *cc = \&recipient;
- *bcc = \&recipient;
-}
-
-
-sub data {
- my $me = shift;
-
- if (exists ${*$me}{'net_smtp_chunking'}) {
- carp 'Net::SMTP::data: CHUNKING extension in use, must call bdat instead';
- }
- else {
- my $ok = $me->_DATA() && $me->datasend(@_);
-
- $ok && @_
- ? $me->dataend
- : $ok;
- }
-}
-
-
-sub bdat {
- my $me = shift;
-
- if (exists ${*$me}{'net_smtp_chunking'}) {
- my $data = shift;
-
- $me->_BDAT(length $data)
- && $me->rawdatasend($data)
- && $me->response() == CMD_OK;
- }
- else {
- carp 'Net::SMTP::bdat: CHUNKING extension is not in use, call data instead';
- }
-}
-
-
-sub bdatlast {
- my $me = shift;
-
- if (exists ${*$me}{'net_smtp_chunking'}) {
- my $data = shift;
-
- $me->_BDAT(length $data, "LAST")
- && $me->rawdatasend($data)
- && $me->response() == CMD_OK;
- }
- else {
- carp 'Net::SMTP::bdat: CHUNKING extension is not in use, call data instead';
- }
-}
-
-
-sub datafh {
- my $me = shift;
- return unless $me->_DATA();
- return $me->tied_fh;
-}
-
-
-sub expand {
- my $me = shift;
-
- $me->_EXPN(@_)
- ? ($me->message)
- : ();
-}
-
-
-sub verify { shift->_VRFY(@_) }
-
-
-sub help {
- my $me = shift;
-
- $me->_HELP(@_)
- ? scalar $me->message
- : undef;
-}
-
-
-sub quit {
- my $me = shift;
-
- $me->_QUIT;
- $me->close;
-}
-
-
-sub DESTROY {
-
- # ignore
-}
-
-##
-## RFC821 commands
-##
-
-
-sub _EHLO { shift->command("EHLO", @_)->response() == CMD_OK }
-sub _HELO { shift->command("HELO", @_)->response() == CMD_OK }
-sub _MAIL { shift->command("MAIL", @_)->response() == CMD_OK }
-sub _RCPT { shift->command("RCPT", @_)->response() == CMD_OK }
-sub _SEND { shift->command("SEND", @_)->response() == CMD_OK }
-sub _SAML { shift->command("SAML", @_)->response() == CMD_OK }
-sub _SOML { shift->command("SOML", @_)->response() == CMD_OK }
-sub _VRFY { shift->command("VRFY", @_)->response() == CMD_OK }
-sub _EXPN { shift->command("EXPN", @_)->response() == CMD_OK }
-sub _HELP { shift->command("HELP", @_)->response() == CMD_OK }
-sub _RSET { shift->command("RSET")->response() == CMD_OK }
-sub _NOOP { shift->command("NOOP")->response() == CMD_OK }
-sub _QUIT { shift->command("QUIT")->response() == CMD_OK }
-sub _DATA { shift->command("DATA")->response() == CMD_MORE }
-sub _BDAT { shift->command("BDAT", @_) }
-sub _TURN { shift->unsupported(@_); }
-sub _ETRN { shift->command("ETRN", @_)->response() == CMD_OK }
-sub _AUTH { shift->command("AUTH", @_)->response() == CMD_OK }
-
-1;
-
-__END__
-
-=head1 NAME
-
-Net::SMTP - Simple Mail Transfer Protocol Client
-
-=head1 SYNOPSIS
-
- use Net::SMTP;
-
- # Constructors
- $smtp = Net::SMTP->new('mailhost');
- $smtp = Net::SMTP->new('mailhost', Timeout => 60);
-
-=head1 DESCRIPTION
-
-This module implements a client interface to the SMTP and ESMTP
-protocol, enabling a perl5 application to talk to SMTP servers. This
-documentation assumes that you are familiar with the concepts of the
-SMTP protocol described in RFC821.
-
-A new Net::SMTP object must be created with the I<new> method. Once
-this has been done, all SMTP commands are accessed through this object.
-
-The Net::SMTP class is a subclass of Net::Cmd and IO::Socket::INET.
-
-=head1 EXAMPLES
-
-This example prints the mail domain name of the SMTP server known as mailhost:
-
- #!/usr/local/bin/perl -w
-
- use Net::SMTP;
-
- $smtp = Net::SMTP->new('mailhost');
- print $smtp->domain,"\n";
- $smtp->quit;
-
-This example sends a small message to the postmaster at the SMTP server
-known as mailhost:
-
- #!/usr/local/bin/perl -w
-
- use Net::SMTP;
-
- $smtp = Net::SMTP->new('mailhost');
-
- $smtp->mail($ENV{USER});
- $smtp->to('postmaster');
-
- $smtp->data();
- $smtp->datasend("To: postmaster\n");
- $smtp->datasend("\n");
- $smtp->datasend("A simple test message\n");
- $smtp->dataend();
-
- $smtp->quit;
-
-=head1 CONSTRUCTOR
-
-=over 4
-
-=item new ( [ HOST ] [, OPTIONS ] )
-
-This is the constructor for a new Net::SMTP object. C<HOST> is the
-name of the remote host to which an SMTP connection is required.
-
-C<HOST> is optional. If C<HOST> is not given then it may instead be
-passed as the C<Host> option described below. If neither is given then
-the C<SMTP_Hosts> specified in C<Net::Config> will be used.
-
-C<OPTIONS> are passed in a hash like fashion, using key and value pairs.
-Possible options are:
-
-B<Hello> - SMTP requires that you identify yourself. This option
-specifies a string to pass as your mail domain. If not given localhost.localdomain
-will be used.
-
-B<Host> - SMTP host to connect to. It may be a single scalar, as defined for
-the C<PeerAddr> option in L<IO::Socket::INET>, or a reference to
-an array with hosts to try in turn. The L</host> method will return the value
-which was used to connect to the host.
-
-B<LocalAddr> and B<LocalPort> - These parameters are passed directly
-to IO::Socket to allow binding the socket to a local port.
-
-B<Timeout> - Maximum time, in seconds, to wait for a response from the
-SMTP server (default: 120)
-
-B<ExactAddresses> - If true the all ADDRESS arguments must be as
-defined by C<addr-spec> in RFC2822. If not given, or false, then
-Net::SMTP will attempt to extract the address from the value passed.
-
-B<Debug> - Enable debugging information
-
-
-Example:
-
-
- $smtp = Net::SMTP->new('mailhost',
- Hello => 'my.mail.domain',
- Timeout => 30,
- Debug => 1,
- );
-
- # the same
- $smtp = Net::SMTP->new(
- Host => 'mailhost',
- Hello => 'my.mail.domain',
- Timeout => 30,
- Debug => 1,
- );
-
- # Connect to the default server from Net::config
- $smtp = Net::SMTP->new(
- Hello => 'my.mail.domain',
- Timeout => 30,
- );
-
-=back
-
-=head1 METHODS
-
-Unless otherwise stated all methods return either a I<true> or I<false>
-value, with I<true> meaning that the operation was a success. When a method
-states that it returns a value, failure will be returned as I<undef> or an
-empty list.
-
-=over 4
-
-=item banner ()
-
-Returns the banner message which the server replied with when the
-initial connection was made.
-
-=item domain ()
-
-Returns the domain that the remote SMTP server identified itself as during
-connection.
-
-=item hello ( DOMAIN )
-
-Tell the remote server the mail domain which you are in using the EHLO
-command (or HELO if EHLO fails). Since this method is invoked
-automatically when the Net::SMTP object is constructed the user should
-normally not have to call it manually.
-
-=item host ()
-
-Returns the value used by the constructor, and passed to IO::Socket::INET,
-to connect to the host.
-
-=item etrn ( DOMAIN )
-
-Request a queue run for the DOMAIN given.
-
-=item auth ( USERNAME, PASSWORD )
-
-Attempt SASL authentication.
-
-=item mail ( ADDRESS [, OPTIONS] )
-
-=item send ( ADDRESS )
-
-=item send_or_mail ( ADDRESS )
-
-=item send_and_mail ( ADDRESS )
-
-Send the appropriate command to the server MAIL, SEND, SOML or SAML. C<ADDRESS>
-is the address of the sender. This initiates the sending of a message. The
-method C<recipient> should be called for each address that the message is to
-be sent to.
-
-The C<mail> method can some additional ESMTP OPTIONS which is passed
-in hash like fashion, using key and value pairs. Possible options are:
-
- Size => <bytes>
- Return => "FULL" | "HDRS"
- Bits => "7" | "8" | "binary"
- Transaction => <ADDRESS>
- Envelope => <ENVID> # xtext-encodes its argument
- ENVID => <ENVID> # similar to Envelope, but expects argument encoded
- XVERP => 1
- AUTH => <submitter> # encoded address according to RFC 2554
-
-The C<Return> and C<Envelope> parameters are used for DSN (Delivery
-Status Notification).
-
-The submitter address in C<AUTH> option is expected to be in a format as
-required by RFC 2554, in an RFC2821-quoted form and xtext-encoded, or <> .
-
-=item reset ()
-
-Reset the status of the server. This may be called after a message has been
-initiated, but before any data has been sent, to cancel the sending of the
-message.
-
-=item recipient ( ADDRESS [, ADDRESS, [...]] [, OPTIONS ] )
-
-Notify the server that the current message should be sent to all of the
-addresses given. Each address is sent as a separate command to the server.
-Should the sending of any address result in a failure then the process is
-aborted and a I<false> value is returned. It is up to the user to call
-C<reset> if they so desire.
-
-The C<recipient> method can also pass additional case-sensitive OPTIONS as an
-anonymous hash using key and value pairs. Possible options are:
-
- Notify => ['NEVER'] or ['SUCCESS','FAILURE','DELAY'] (see below)
- ORcpt => <ORCPT>
- SkipBad => 1 (to ignore bad addresses)
-
-If C<SkipBad> is true the C<recipient> will not return an error when a bad
-address is encountered and it will return an array of addresses that did
-succeed.
-
- $smtp->recipient($recipient1,$recipient2); # Good
- $smtp->recipient($recipient1,$recipient2, { SkipBad => 1 }); # Good
- $smtp->recipient($recipient1,$recipient2, { Notify => ['FAILURE','DELAY'], SkipBad => 1 }); # Good
- @goodrecips=$smtp->recipient(@recipients, { Notify => ['FAILURE'], SkipBad => 1 }); # Good
- $smtp->recipient("$recipient,$recipient2"); # BAD
-
-Notify is used to request Delivery Status Notifications (DSNs), but your
-SMTP/ESMTP service may not respect this request depending upon its version and
-your site's SMTP configuration.
-
-Leaving out the Notify option usually defaults an SMTP service to its default
-behavior equivalent to ['FAILURE'] notifications only, but again this may be
-dependent upon your site's SMTP configuration.
-
-The NEVER keyword must appear by itself if used within the Notify option and "requests
-that a DSN not be returned to the sender under any conditions."
-
- {Notify => ['NEVER']}
-
- $smtp->recipient(@recipients, { Notify => ['NEVER'], SkipBad => 1 }); # Good
-
-You may use any combination of these three values 'SUCCESS','FAILURE','DELAY' in
-the anonymous array reference as defined by RFC3461 (see http://rfc.net/rfc3461.html
-for more information. Note: quotations in this topic from same.).
-
-A Notify parameter of 'SUCCESS' or 'FAILURE' "requests that a DSN be issued on
-successful delivery or delivery failure, respectively."
-
-A Notify parameter of 'DELAY' "indicates the sender's willingness to receive
-delayed DSNs. Delayed DSNs may be issued if delivery of a message has been
-delayed for an unusual amount of time (as determined by the Message Transfer
-Agent (MTA) at which the message is delayed), but the final delivery status
-(whether successful or failure) cannot be determined. The absence of the DELAY
-keyword in a NOTIFY parameter requests that a "delayed" DSN NOT be issued under
-any conditions."
-
- {Notify => ['SUCCESS','FAILURE','DELAY']}
-
- $smtp->recipient(@recipients, { Notify => ['FAILURE','DELAY'], SkipBad => 1 }); # Good
-
-ORcpt is also part of the SMTP DSN extension according to RFC3461.
-It is used to pass along the original recipient that the mail was first
-sent to. The machine that generates a DSN will use this address to inform
-the sender, because he can't know if recipients get rewritten by mail servers.
-It is expected to be in a format as required by RFC3461, xtext-encoded.
-
-=item to ( ADDRESS [, ADDRESS [...]] )
-
-=item cc ( ADDRESS [, ADDRESS [...]] )
-
-=item bcc ( ADDRESS [, ADDRESS [...]] )
-
-Synonyms for C<recipient>.
-
-=item data ( [ DATA ] )
-
-Initiate the sending of the data from the current message.
-
-C<DATA> may be a reference to a list or a list. If specified the contents
-of C<DATA> and a termination string C<".\r\n"> is sent to the server. And the
-result will be true if the data was accepted.
-
-If C<DATA> is not specified then the result will indicate that the server
-wishes the data to be sent. The data must then be sent using the C<datasend>
-and C<dataend> methods described in L<Net::Cmd>.
-
-=item expand ( ADDRESS )
-
-Request the server to expand the given address Returns an array
-which contains the text read from the server.
-
-=item verify ( ADDRESS )
-
-Verify that C<ADDRESS> is a legitimate mailing address.
-
-Most sites usually disable this feature in their SMTP service configuration.
-Use "Debug => 1" option under new() to see if disabled.
-
-=item help ( [ $subject ] )
-
-Request help text from the server. Returns the text or undef upon failure
-
-=item quit ()
-
-Send the QUIT command to the remote SMTP server and close the socket connection.
-
-=back
-
-=head1 ADDRESSES
-
-Net::SMTP attempts to DWIM with addresses that are passed. For
-example an application might extract The From: line from an email
-and pass that to mail(). While this may work, it is not recommended.
-The application should really use a module like L<Mail::Address>
-to extract the mail address and pass that.
-
-If C<ExactAddresses> is passed to the constructor, then addresses
-should be a valid rfc2821-quoted address, although Net::SMTP will
-accept accept the address surrounded by angle brackets.
-
- funny user at domain WRONG
- "funny user"@domain RIGHT, recommended
- <"funny user"@domain> OK
-
-=head1 SEE ALSO
-
-L<Net::Cmd>
-
-=head1 AUTHOR
-
-Graham Barr <gbarr at pobox.com>
-
-=head1 COPYRIGHT
-
-Copyright (c) 1995-2004 Graham Barr. All rights reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/Net/Time.pm
===================================================================
--- vendor/perl/dist/lib/Net/Time.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/Time.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,151 +0,0 @@
-# Net::Time.pm
-#
-# Copyright (c) 1995-2004 Graham Barr <gbarr at pobox.com>. All rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-
-package Net::Time;
-
-use strict;
-use vars qw($VERSION @ISA @EXPORT_OK $TIMEOUT);
-use Carp;
-use IO::Socket;
-require Exporter;
-use Net::Config;
-use IO::Select;
-
- at ISA = qw(Exporter);
- at EXPORT_OK = qw(inet_time inet_daytime);
-
-$VERSION = "2.10";
-
-$TIMEOUT = 120;
-
-
-sub _socket {
- my ($pname, $pnum, $host, $proto, $timeout) = @_;
-
- $proto ||= 'udp';
-
- my $port = (getservbyname($pname, $proto))[2] || $pnum;
-
- my $hosts = defined $host ? [$host] : $NetConfig{$pname . '_hosts'};
-
- my $me;
-
- foreach $host (@$hosts) {
- $me = IO::Socket::INET->new(
- PeerAddr => $host,
- PeerPort => $port,
- Proto => $proto
- )
- and last;
- }
-
- return unless $me;
-
- $me->send("\n")
- if $proto eq 'udp';
-
- $timeout = $TIMEOUT
- unless defined $timeout;
-
- IO::Select->new($me)->can_read($timeout)
- ? $me
- : undef;
-}
-
-
-sub inet_time {
- my $s = _socket('time', 37, @_) || return undef;
- my $buf = '';
- my $offset = 0 | 0;
-
- return undef
- unless defined $s->recv($buf, length(pack("N", 0)));
-
- # unpack, we | 0 to ensure we have an unsigned
- my $time = (unpack("N", $buf))[0] | 0;
-
- # the time protocol return time in seconds since 1900, convert
- # it to a the required format
-
- if ($^O eq "MacOS") {
-
- # MacOS return seconds since 1904, 1900 was not a leap year.
- $offset = (4 * 31536000) | 0;
- }
- else {
-
- # otherwise return seconds since 1972, there were 17 leap years between
- # 1900 and 1972
- $offset = (70 * 31536000 + 17 * 86400) | 0;
- }
-
- $time - $offset;
-}
-
-
-sub inet_daytime {
- my $s = _socket('daytime', 13, @_) || return undef;
- my $buf = '';
-
- defined($s->recv($buf, 1024))
- ? $buf
- : undef;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Net::Time - time and daytime network client interface
-
-=head1 SYNOPSIS
-
- use Net::Time qw(inet_time inet_daytime);
-
- print inet_time(); # use default host from Net::Config
- print inet_time('localhost');
- print inet_time('localhost', 'tcp');
-
- print inet_daytime(); # use default host from Net::Config
- print inet_daytime('localhost');
- print inet_daytime('localhost', 'tcp');
-
-=head1 DESCRIPTION
-
-C<Net::Time> provides subroutines that obtain the time on a remote machine.
-
-=over 4
-
-=item inet_time ( [HOST [, PROTOCOL [, TIMEOUT]]])
-
-Obtain the time on C<HOST>, or some default host if C<HOST> is not given
-or not defined, using the protocol as defined in RFC868. The optional
-argument C<PROTOCOL> should define the protocol to use, either C<tcp> or
-C<udp>. The result will be a time value in the same units as returned
-by time() or I<undef> upon failure.
-
-=item inet_daytime ( [HOST [, PROTOCOL [, TIMEOUT]]])
-
-Obtain the time on C<HOST>, or some default host if C<HOST> is not given
-or not defined, using the protocol as defined in RFC867. The optional
-argument C<PROTOCOL> should define the protocol to use, either C<tcp> or
-C<udp>. The result will be an ASCII string or I<undef> upon failure.
-
-=back
-
-=head1 AUTHOR
-
-Graham Barr <gbarr at pobox.com>
-
-=head1 COPYRIGHT
-
-Copyright (c) 1995-2004 Graham Barr. All rights reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/Net/libnetFAQ.pod
===================================================================
--- vendor/perl/dist/lib/Net/libnetFAQ.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Net/libnetFAQ.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,303 +0,0 @@
-=head1 NAME
-
-libnetFAQ - libnet Frequently Asked Questions
-
-=head1 DESCRIPTION
-
-=head2 Where to get this document
-
-This document is distributed with the libnet distribution, and is also
-available on the libnet web page at
-
- http://search.cpan.org/~gbarr/libnet/
-
-=head2 How to contribute to this document
-
-You may mail corrections, additions, and suggestions to me
-gbarr at pobox.com.
-
-=head1 Author and Copyright Information
-
-Copyright (c) 1997-1998 Graham Barr. All rights reserved.
-This document is free; you can redistribute it and/or modify it
-under the terms of the Artistic License.
-
-=head2 Disclaimer
-
-This information is offered in good faith and in the hope that it may
-be of use, but is not guaranteed to be correct, up to date, or suitable
-for any particular purpose whatsoever. The authors accept no liability
-in respect of this information or its use.
-
-
-=head1 Obtaining and installing libnet
-
-=head2 What is libnet ?
-
-libnet is a collection of perl5 modules which all related to network
-programming. The majority of the modules available provided the
-client side of popular server-client protocols that are used in
-the internet community.
-
-=head2 Which version of perl do I need ?
-
-libnet has been know to work with versions of perl from 5.002 onwards. However
-if your release of perl is prior to perl5.004 then you will need to
-obtain and install the IO distribution from CPAN. If you have perl5.004
-or later then you will have the IO modules in your installation already,
-but CPAN may contain updates.
-
-=head2 What other modules do I need ?
-
-The only modules you will need installed are the modules from the IO
-distribution. If you have perl5.004 or later you will already have
-these modules.
-
-=head2 What machines support libnet ?
-
-libnet itself is an entirely perl-code distribution so it should work
-on any machine that perl runs on. However IO may not work
-with some machines and earlier releases of perl. But this
-should not be the case with perl version 5.004 or later.
-
-=head2 Where can I get the latest libnet release
-
-The latest libnet release is always on CPAN, you will find it
-in
-
- http://www.cpan.org/modules/by-module/Net/
-
-The latest release and information is also available on the libnet web page
-at
-
- http://search.cpan.org/~gbarr/libnet/
-
-=head1 Using Net::FTP
-
-=head2 How do I download files from an FTP server ?
-
-An example taken from an article posted to comp.lang.perl.misc
-
- #!/your/path/to/perl
-
- # a module making life easier
-
- use Net::FTP;
-
- # for debugging: $ftp = Net::FTP->new('site','Debug',10);
- # open a connection and log in!
-
- $ftp = Net::FTP->new('target_site.somewhere.xxx');
- $ftp->login('username','password');
-
- # set transfer mode to binary
-
- $ftp->binary();
-
- # change the directory on the ftp site
-
- $ftp->cwd('/some/path/to/somewhere/');
-
- foreach $name ('file1', 'file2', 'file3') {
-
- # get's arguments are in the following order:
- # ftp server's filename
- # filename to save the transfer to on the local machine
- # can be simply used as get($name) if you want the same name
-
- $ftp->get($name,$name);
- }
-
- # ftp done!
-
- $ftp->quit;
-
-=head2 How do I transfer files in binary mode ?
-
-To transfer files without <LF><CR> translation Net::FTP provides
-the C<binary> method
-
- $ftp->binary;
-
-=head2 How can I get the size of a file on a remote FTP server ?
-
-=head2 How can I get the modification time of a file on a remote FTP server ?
-
-=head2 How can I change the permissions of a file on a remote server ?
-
-The FTP protocol does not have a command for changing the permissions
-of a file on the remote server. But some ftp servers may allow a chmod
-command to be issued via a SITE command, eg
-
- $ftp->quot('site chmod 0777',$filename);
-
-But this is not guaranteed to work.
-
-=head2 Can I do a reget operation like the ftp command ?
-
-=head2 How do I get a directory listing from an FTP server ?
-
-=head2 Changing directory to "" does not fail ?
-
-Passing an argument of "" to ->cwd() has the same affect of calling ->cwd()
-without any arguments. Turn on Debug (I<See below>) and you will see what is
-happening
-
- $ftp = Net::FTP->new($host, Debug => 1);
- $ftp->login;
- $ftp->cwd("");
-
-gives
-
- Net::FTP=GLOB(0x82196d8)>>> CWD /
- Net::FTP=GLOB(0x82196d8)<<< 250 CWD command successful.
-
-=head2 I am behind a SOCKS firewall, but the Firewall option does not work ?
-
-The Firewall option is only for support of one type of firewall. The type
-supported is an ftp proxy.
-
-To use Net::FTP, or any other module in the libnet distribution,
-through a SOCKS firewall you must create a socks-ified perl executable
-by compiling perl with the socks library.
-
-=head2 I am behind an FTP proxy firewall, but cannot access machines outside ?
-
-Net::FTP implements the most popular ftp proxy firewall approach. The scheme
-implemented is that where you log in to the firewall with C<user at hostname>
-
-I have heard of one other type of firewall which requires a login to the
-firewall with an account, then a second login with C<user at hostname>. You can
-still use Net::FTP to traverse these firewalls, but a more manual approach
-must be taken, eg
-
- $ftp = Net::FTP->new($firewall) or die $@;
- $ftp->login($firewall_user, $firewall_passwd) or die $ftp->message;
- $ftp->login($ext_user . '@' . $ext_host, $ext_passwd) or die $ftp->message.
-
-=head2 My ftp proxy firewall does not listen on port 21
-
-FTP servers usually listen on the same port number, port 21, as any other
-FTP server. But there is no reason why this has to be the case.
-
-If you pass a port number to Net::FTP then it assumes this is the port
-number of the final destination. By default Net::FTP will always try
-to connect to the firewall on port 21.
-
-Net::FTP uses IO::Socket to open the connection and IO::Socket allows
-the port number to be specified as part of the hostname. So this problem
-can be resolved by either passing a Firewall option like C<"hostname:1234">
-or by setting the C<ftp_firewall> option in Net::Config to be a string
-in in the same form.
-
-=head2 Is it possible to change the file permissions of a file on an FTP server ?
-
-The answer to this is "maybe". The FTP protocol does not specify a command to change
-file permissions on a remote host. However many servers do allow you to run the
-chmod command via the C<SITE> command. This can be done with
-
- $ftp->site('chmod','0775',$file);
-
-=head2 I have seen scripts call a method message, but cannot find it documented ?
-
-Net::FTP, like several other packages in libnet, inherits from Net::Cmd, so
-all the methods described in Net::Cmd are also available on Net::FTP
-objects.
-
-=head2 Why does Net::FTP not implement mput and mget methods
-
-The quick answer is because they are easy to implement yourself. The long
-answer is that to write these in such a way that multiple platforms are
-supported correctly would just require too much code. Below are
-some examples how you can implement these yourself.
-
-sub mput {
- my($ftp,$pattern) = @_;
- foreach my $file (glob($pattern)) {
- $ftp->put($file) or warn $ftp->message;
- }
-}
-
-sub mget {
- my($ftp,$pattern) = @_;
- foreach my $file ($ftp->ls($pattern)) {
- $ftp->get($file) or warn $ftp->message;
- }
-}
-
-
-=head1 Using Net::SMTP
-
-=head2 Why can't the part of an Email address after the @ be used as the hostname ?
-
-The part of an Email address which follows the @ is not necessarily a hostname,
-it is a mail domain. To find the name of a host to connect for a mail domain
-you need to do a DNS MX lookup
-
-=head2 Why does Net::SMTP not do DNS MX lookups ?
-
-Net::SMTP implements the SMTP protocol. The DNS MX lookup is not part
-of this protocol.
-
-=head2 The verify method always returns true ?
-
-Well it may seem that way, but it does not. The verify method returns true
-if the command succeeded. If you pass verify an address which the
-server would normally have to forward to another machine, the command
-will succeed with something like
-
- 252 Couldn't verify <someone at there> but will attempt delivery anyway
-
-This command will fail only if you pass it an address in a domain
-the server directly delivers for, and that address does not exist.
-
-=head1 Debugging scripts
-
-=head2 How can I debug my scripts that use Net::* modules ?
-
-Most of the libnet client classes allow options to be passed to the
-constructor, in most cases one option is called C<Debug>. Passing
-this option with a non-zero value will turn on a protocol trace, which
-will be sent to STDERR. This trace can be useful to see what commands
-are being sent to the remote server and what responses are being
-received back.
-
- #!/your/path/to/perl
-
- use Net::FTP;
-
- my $ftp = new Net::FTP($host, Debug => 1);
- $ftp->login('gbarr','password');
- $ftp->quit;
-
-this script would output something like
-
- Net::FTP: Net::FTP(2.22)
- Net::FTP: Exporter
- Net::FTP: Net::Cmd(2.0801)
- Net::FTP: IO::Socket::INET
- Net::FTP: IO::Socket(1.1603)
- Net::FTP: IO::Handle(1.1504)
-
- Net::FTP=GLOB(0x8152974)<<< 220 imagine FTP server (Version wu-2.4(5) Tue Jul 29 11:17:18 CDT 1997) ready.
- Net::FTP=GLOB(0x8152974)>>> user gbarr
- Net::FTP=GLOB(0x8152974)<<< 331 Password required for gbarr.
- Net::FTP=GLOB(0x8152974)>>> PASS ....
- Net::FTP=GLOB(0x8152974)<<< 230 User gbarr logged in. Access restrictions apply.
- Net::FTP=GLOB(0x8152974)>>> QUIT
- Net::FTP=GLOB(0x8152974)<<< 221 Goodbye.
-
-The first few lines tell you the modules that Net::FTP uses and their versions,
-this is useful data to me when a user reports a bug. The last seven lines
-show the communication with the server. Each line has three parts. The first
-part is the object itself, this is useful for separating the output
-if you are using multiple objects. The second part is either C<<<<<> to
-show data coming from the server or C<>>>>> to show data
-going to the server. The remainder of the line is the command
-being sent or response being received.
-
-=head1 AUTHOR AND COPYRIGHT
-
-Copyright (c) 1997 Graham Barr.
-All rights reserved.
-
Deleted: vendor/perl/dist/lib/Pod/Checker.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Checker.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Checker.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1268 +0,0 @@
-#############################################################################
-# Pod/Checker.pm -- check pod documents for syntax errors
-#
-# Copyright (C) 1994-2000 by Bradford Appleton. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-package Pod::Checker;
-use strict;
-
-use vars qw($VERSION @ISA @EXPORT %VALID_COMMANDS %VALID_SEQUENCES);
-$VERSION = '1.45'; ## Current version of this package
-require 5.005; ## requires this Perl version or later
-
-use Pod::ParseUtils; ## for hyperlinks and lists
-
-=head1 NAME
-
-Pod::Checker, podchecker() - check pod documents for syntax errors
-
-=head1 SYNOPSIS
-
- use Pod::Checker;
-
- $syntax_okay = podchecker($filepath, $outputpath, %options);
-
- my $checker = new Pod::Checker %options;
- $checker->parse_from_file($filepath, \*STDERR);
-
-=head1 OPTIONS/ARGUMENTS
-
-C<$filepath> is the input POD to read and C<$outputpath> is
-where to write POD syntax error messages. Either argument may be a scalar
-indicating a file-path, or else a reference to an open filehandle.
-If unspecified, the input-file it defaults to C<\*STDIN>, and
-the output-file defaults to C<\*STDERR>.
-
-=head2 podchecker()
-
-This function can take a hash of options:
-
-=over 4
-
-=item B<-warnings> =E<gt> I<val>
-
-Turn warnings on/off. I<val> is usually 1 for on, but higher values
-trigger additional warnings. See L<"Warnings">.
-
-=back
-
-=head1 DESCRIPTION
-
-B<podchecker> will perform syntax checking of Perl5 POD format documentation.
-
-Curious/ambitious users are welcome to propose additional features they wish
-to see in B<Pod::Checker> and B<podchecker> and verify that the checks are
-consistent with L<perlpod>.
-
-The following checks are currently performed:
-
-=over 4
-
-=item *
-
-Unknown '=xxxx' commands, unknown 'XE<lt>...E<gt>' interior-sequences,
-and unterminated interior sequences.
-
-=item *
-
-Check for proper balancing of C<=begin> and C<=end>. The contents of such
-a block are generally ignored, i.e. no syntax checks are performed.
-
-=item *
-
-Check for proper nesting and balancing of C<=over>, C<=item> and C<=back>.
-
-=item *
-
-Check for same nested interior-sequences (e.g.
-C<LE<lt>...LE<lt>...E<gt>...E<gt>>).
-
-=item *
-
-Check for malformed or non-existing entities C<EE<lt>...E<gt>>.
-
-=item *
-
-Check for correct syntax of hyperlinks C<LE<lt>...E<gt>>. See L<perlpod>
-for details.
-
-=item *
-
-Check for unresolved document-internal links. This check may also reveal
-misspelled links that seem to be internal links but should be links
-to something else.
-
-=back
-
-=head1 DIAGNOSTICS
-
-=head2 Errors
-
-=over 4
-
-=item * empty =headn
-
-A heading (C<=head1> or C<=head2>) without any text? That ain't no
-heading!
-
-=item * =over on line I<N> without closing =back
-
-The C<=over> command does not have a corresponding C<=back> before the
-next heading (C<=head1> or C<=head2>) or the end of the file.
-
-=item * =item without previous =over
-
-=item * =back without previous =over
-
-An C<=item> or C<=back> command has been found outside a
-C<=over>/C<=back> block.
-
-=item * No argument for =begin
-
-A C<=begin> command was found that is not followed by the formatter
-specification.
-
-=item * =end without =begin
-
-A standalone C<=end> command was found.
-
-=item * Nested =begin's
-
-There were at least two consecutive C<=begin> commands without
-the corresponding C<=end>. Only one C<=begin> may be active at
-a time.
-
-=item * =for without formatter specification
-
-There is no specification of the formatter after the C<=for> command.
-
-=item * unresolved internal link I<NAME>
-
-The given link to I<NAME> does not have a matching node in the current
-POD. This also happened when a single word node name is not enclosed in
-C<"">.
-
-=item * Unknown command "I<CMD>"
-
-An invalid POD command has been found. Valid are C<=head1>, C<=head2>,
-C<=head3>, C<=head4>, C<=over>, C<=item>, C<=back>, C<=begin>, C<=end>,
-C<=for>, C<=pod>, C<=cut>
-
-=item * Unknown interior-sequence "I<SEQ>"
-
-An invalid markup command has been encountered. Valid are:
-C<BE<lt>E<gt>>, C<CE<lt>E<gt>>, C<EE<lt>E<gt>>, C<FE<lt>E<gt>>,
-C<IE<lt>E<gt>>, C<LE<lt>E<gt>>, C<SE<lt>E<gt>>, C<XE<lt>E<gt>>,
-C<ZE<lt>E<gt>>
-
-=item * nested commands I<CMD>E<lt>...I<CMD>E<lt>...E<gt>...E<gt>
-
-Two nested identical markup commands have been found. Generally this
-does not make sense.
-
-=item * garbled entity I<STRING>
-
-The I<STRING> found cannot be interpreted as a character entity.
-
-=item * Entity number out of range
-
-An entity specified by number (dec, hex, oct) is out of range (1-255).
-
-=item * malformed link LE<lt>E<gt>
-
-The link found cannot be parsed because it does not conform to the
-syntax described in L<perlpod>.
-
-=item * nonempty ZE<lt>E<gt>
-
-The C<ZE<lt>E<gt>> sequence is supposed to be empty.
-
-=item * empty XE<lt>E<gt>
-
-The index entry specified contains nothing but whitespace.
-
-=item * Spurious text after =pod / =cut
-
-The commands C<=pod> and C<=cut> do not take any arguments.
-
-=item * Spurious character(s) after =back
-
-The C<=back> command does not take any arguments.
-
-=back
-
-=head2 Warnings
-
-These may not necessarily cause trouble, but indicate mediocre style.
-
-=over 4
-
-=item * multiple occurrence of link target I<name>
-
-The POD file has some C<=item> and/or C<=head> commands that have
-the same text. Potential hyperlinks to such a text cannot be unique then.
-This warning is printed only with warning level greater than one.
-
-=item * line containing nothing but whitespace in paragraph
-
-There is some whitespace on a seemingly empty line. POD is very sensitive
-to such things, so this is flagged. B<vi> users switch on the B<list>
-option to avoid this problem.
-
-=begin _disabled_
-
-=item * file does not start with =head
-
-The file starts with a different POD directive than head.
-This is most probably something you do not want.
-
-=end _disabled_
-
-=item * previous =item has no contents
-
-There is a list C<=item> right above the flagged line that has no
-text contents. You probably want to delete empty items.
-
-=item * preceding non-item paragraph(s)
-
-A list introduced by C<=over> starts with a text or verbatim paragraph,
-but continues with C<=item>s. Move the non-item paragraph out of the
-C<=over>/C<=back> block.
-
-=item * =item type mismatch (I<one> vs. I<two>)
-
-A list started with e.g. a bullet-like C<=item> and continued with a
-numbered one. This is obviously inconsistent. For most translators the
-type of the I<first> C<=item> determines the type of the list.
-
-=item * I<N> unescaped C<E<lt>E<gt>> in paragraph
-
-Angle brackets not written as C<E<lt>ltE<gt>> and C<E<lt>gtE<gt>>
-can potentially cause errors as they could be misinterpreted as
-markup commands. This is only printed when the -warnings level is
-greater than 1.
-
-=item * Unknown entity
-
-A character entity was found that does not belong to the standard
-ISO set or the POD specials C<verbar> and C<sol>.
-
-=item * No items in =over
-
-The list opened with C<=over> does not contain any items.
-
-=item * No argument for =item
-
-C<=item> without any parameters is deprecated. It should either be followed
-by C<*> to indicate an unordered list, by a number (optionally followed
-by a dot) to indicate an ordered (numbered) list or simple text for a
-definition list.
-
-=item * empty section in previous paragraph
-
-The previous section (introduced by a C<=head> command) does not contain
-any text. This usually indicates that something is missing. Note: A
-C<=head1> followed immediately by C<=head2> does not trigger this warning.
-
-=item * Verbatim paragraph in NAME section
-
-The NAME section (C<=head1 NAME>) should consist of a single paragraph
-with the script/module name, followed by a dash `-' and a very short
-description of what the thing is good for.
-
-=item * =headI<n> without preceding higher level
-
-For example if there is a C<=head2> in the POD file prior to a
-C<=head1>.
-
-=back
-
-=head2 Hyperlinks
-
-There are some warnings with respect to malformed hyperlinks:
-
-=over 4
-
-=item * ignoring leading/trailing whitespace in link
-
-There is whitespace at the beginning or the end of the contents of
-LE<lt>...E<gt>.
-
-=item * (section) in '$page' deprecated
-
-There is a section detected in the page name of LE<lt>...E<gt>, e.g.
-C<LE<lt>passwd(2)E<gt>>. POD hyperlinks may point to POD documents only.
-Please write C<CE<lt>passwd(2)E<gt>> instead. Some formatters are able
-to expand this to appropriate code. For links to (builtin) functions,
-please say C<LE<lt>perlfunc/mkdirE<gt>>, without ().
-
-=item * alternative text/node '%s' contains non-escaped | or /
-
-The characters C<|> and C</> are special in the LE<lt>...E<gt> context.
-Although the hyperlink parser does its best to determine which "/" is
-text and which is a delimiter in case of doubt, one ought to escape
-these literal characters like this:
-
- / E<sol>
- | E<verbar>
-
-=back
-
-=head1 RETURN VALUE
-
-B<podchecker> returns the number of POD syntax errors found or -1 if
-there were no POD commands at all found in the file.
-
-=head1 EXAMPLES
-
-See L</SYNOPSIS>
-
-=head1 INTERFACE
-
-While checking, this module collects document properties, e.g. the nodes
-for hyperlinks (C<=headX>, C<=item>) and index entries (C<XE<lt>E<gt>>).
-POD translators can use this feature to syntax-check and get the nodes in
-a first pass before actually starting to convert. This is expensive in terms
-of execution time, but allows for very robust conversions.
-
-Since PodParser-1.24 the B<Pod::Checker> module uses only the B<poderror>
-method to print errors and warnings. The summary output (e.g.
-"Pod syntax OK") has been dropped from the module and has been included in
-B<podchecker> (the script). This allows users of B<Pod::Checker> to
-control completely the output behavior. Users of B<podchecker> (the script)
-get the well-known behavior.
-
-=cut
-
-#############################################################################
-
-#use diagnostics;
-use Carp qw(croak);
-use Exporter;
-use Pod::Parser;
-
- at ISA = qw(Pod::Parser);
- at EXPORT = qw(&podchecker);
-
-my %VALID_COMMANDS = (
- 'pod' => 1,
- 'cut' => 1,
- 'head1' => 1,
- 'head2' => 1,
- 'head3' => 1,
- 'head4' => 1,
- 'over' => 1,
- 'back' => 1,
- 'item' => 1,
- 'for' => 1,
- 'begin' => 1,
- 'end' => 1,
- 'encoding' => 1,
-);
-
-my %VALID_SEQUENCES = (
- 'I' => 1,
- 'B' => 1,
- 'S' => 1,
- 'C' => 1,
- 'L' => 1,
- 'F' => 1,
- 'X' => 1,
- 'Z' => 1,
- 'E' => 1,
-);
-
-# stolen from HTML::Entities
-my %ENTITIES = (
- # Some normal chars that have special meaning in SGML context
- amp => '&', # ampersand
-'gt' => '>', # greater than
-'lt' => '<', # less than
- quot => '"', # double quote
-
- # PUBLIC ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML
- AElig => '\xC6', # capital AE diphthong (ligature)
- Aacute => '\xC1', # capital A, acute accent
- Acirc => '\xC2', # capital A, circumflex accent
- Agrave => '\xC0', # capital A, grave accent
- Aring => '\xC5', # capital A, ring
- Atilde => '\xC3', # capital A, tilde
- Auml => '\xC4', # capital A, dieresis or umlaut mark
- Ccedil => '\xC7', # capital C, cedilla
- ETH => '\xD0', # capital Eth, Icelandic
- Eacute => '\xC9', # capital E, acute accent
- Ecirc => '\xCA', # capital E, circumflex accent
- Egrave => '\xC8', # capital E, grave accent
- Euml => '\xCB', # capital E, dieresis or umlaut mark
- Iacute => '\xCD', # capital I, acute accent
- Icirc => '\xCE', # capital I, circumflex accent
- Igrave => '\xCC', # capital I, grave accent
- Iuml => '\xCF', # capital I, dieresis or umlaut mark
- Ntilde => '\xD1', # capital N, tilde
- Oacute => '\xD3', # capital O, acute accent
- Ocirc => '\xD4', # capital O, circumflex accent
- Ograve => '\xD2', # capital O, grave accent
- Oslash => '\xD8', # capital O, slash
- Otilde => '\xD5', # capital O, tilde
- Ouml => '\xD6', # capital O, dieresis or umlaut mark
- THORN => '\xDE', # capital THORN, Icelandic
- Uacute => '\xDA', # capital U, acute accent
- Ucirc => '\xDB', # capital U, circumflex accent
- Ugrave => '\xD9', # capital U, grave accent
- Uuml => '\xDC', # capital U, dieresis or umlaut mark
- Yacute => '\xDD', # capital Y, acute accent
- aacute => '\xE1', # small a, acute accent
- acirc => '\xE2', # small a, circumflex accent
- aelig => '\xE6', # small ae diphthong (ligature)
- agrave => '\xE0', # small a, grave accent
- aring => '\xE5', # small a, ring
- atilde => '\xE3', # small a, tilde
- auml => '\xE4', # small a, dieresis or umlaut mark
- ccedil => '\xE7', # small c, cedilla
- eacute => '\xE9', # small e, acute accent
- ecirc => '\xEA', # small e, circumflex accent
- egrave => '\xE8', # small e, grave accent
- eth => '\xF0', # small eth, Icelandic
- euml => '\xEB', # small e, dieresis or umlaut mark
- iacute => '\xED', # small i, acute accent
- icirc => '\xEE', # small i, circumflex accent
- igrave => '\xEC', # small i, grave accent
- iuml => '\xEF', # small i, dieresis or umlaut mark
- ntilde => '\xF1', # small n, tilde
- oacute => '\xF3', # small o, acute accent
- ocirc => '\xF4', # small o, circumflex accent
- ograve => '\xF2', # small o, grave accent
- oslash => '\xF8', # small o, slash
- otilde => '\xF5', # small o, tilde
- ouml => '\xF6', # small o, dieresis or umlaut mark
- szlig => '\xDF', # small sharp s, German (sz ligature)
- thorn => '\xFE', # small thorn, Icelandic
- uacute => '\xFA', # small u, acute accent
- ucirc => '\xFB', # small u, circumflex accent
- ugrave => '\xF9', # small u, grave accent
- uuml => '\xFC', # small u, dieresis or umlaut mark
- yacute => '\xFD', # small y, acute accent
- yuml => '\xFF', # small y, dieresis or umlaut mark
-
- # Some extra Latin 1 chars that are listed in the HTML3.2 draft (21-May-96)
- copy => '\xA9', # copyright sign
- reg => '\xAE', # registered sign
- nbsp => "\240", # non breaking space
-
- # Additional ISO-8859/1 entities listed in rfc1866 (section 14)
- iexcl => '\xA1',
- cent => '\xA2',
- pound => '\xA3',
- curren => '\xA4',
- yen => '\xA5',
- brvbar => '\xA6',
- sect => '\xA7',
- uml => '\xA8',
- ordf => '\xAA',
- laquo => '\xAB',
-'not' => '\xAC', # not is a keyword in perl
- shy => '\xAD',
- macr => '\xAF',
- deg => '\xB0',
- plusmn => '\xB1',
- sup1 => '\xB9',
- sup2 => '\xB2',
- sup3 => '\xB3',
- acute => '\xB4',
- micro => '\xB5',
- para => '\xB6',
- middot => '\xB7',
- cedil => '\xB8',
- ordm => '\xBA',
- raquo => '\xBB',
- frac14 => '\xBC',
- frac12 => '\xBD',
- frac34 => '\xBE',
- iquest => '\xBF',
-'times' => '\xD7', # times is a keyword in perl
- divide => '\xF7',
-
-# some POD special entities
- verbar => '|',
- sol => '/'
-);
-
-##---------------------------------------------------------------------------
-
-##---------------------------------
-## Function definitions begin here
-##---------------------------------
-
-sub podchecker {
- my ($infile, $outfile, %options) = @_;
- local $_;
-
- ## Set defaults
- $infile ||= \*STDIN;
- $outfile ||= \*STDERR;
-
- ## Now create a pod checker
- my $checker = new Pod::Checker(%options);
-
- ## Now check the pod document for errors
- $checker->parse_from_file($infile, $outfile);
-
- ## Return the number of errors found
- return $checker->num_errors();
-}
-
-##---------------------------------------------------------------------------
-
-##-------------------------------
-## Method definitions begin here
-##-------------------------------
-
-##################################
-
-=over 4
-
-=item C<Pod::Checker-E<gt>new( %options )>
-
-Return a reference to a new Pod::Checker object that inherits from
-Pod::Parser and is used for calling the required methods later. The
-following options are recognized:
-
-C<-warnings =E<gt> num>
- Print warnings if C<num> is true. The higher the value of C<num>,
-the more warnings are printed. Currently there are only levels 1 and 2.
-
-C<-quiet =E<gt> num>
- If C<num> is true, do not print any errors/warnings. This is useful
-when Pod::Checker is used to munge POD code into plain text from within
-POD formatters.
-
-=cut
-
-## sub new {
-## my $this = shift;
-## my $class = ref($this) || $this;
-## my %params = @_;
-## my $self = {%params};
-## bless $self, $class;
-## $self->initialize();
-## return $self;
-## }
-
-sub initialize {
- my $self = shift;
- ## Initialize number of errors, and setup an error function to
- ## increment this number and then print to the designated output.
- $self->{_NUM_ERRORS} = 0;
- $self->{_NUM_WARNINGS} = 0;
- $self->{-quiet} ||= 0;
- # set the error handling subroutine
- $self->errorsub($self->{-quiet} ? sub { 1; } : 'poderror');
- $self->{_commands} = 0; # total number of POD commands encountered
- $self->{_list_stack} = []; # stack for nested lists
- $self->{_have_begin} = ''; # stores =begin
- $self->{_links} = []; # stack for internal hyperlinks
- $self->{_nodes} = []; # stack for =head/=item nodes
- $self->{_index} = []; # text in X<>
- # print warnings?
- $self->{-warnings} = 1 unless(defined $self->{-warnings});
- $self->{_current_head1} = ''; # the current =head1 block
- $self->parseopts(-process_cut_cmd => 1, -warnings => $self->{-warnings});
-}
-
-##################################
-
-=item C<$checker-E<gt>poderror( @args )>
-
-=item C<$checker-E<gt>poderror( {%opts}, @args )>
-
-Internal method for printing errors and warnings. If no options are
-given, simply prints "@_". The following options are recognized and used
-to form the output:
-
- -msg
-
-A message to print prior to C<@args>.
-
- -line
-
-The line number the error occurred in.
-
- -file
-
-The file (name) the error occurred in.
-
- -severity
-
-The error level, should be 'WARNING' or 'ERROR'.
-
-=cut
-
-# Invoked as $self->poderror( @args ), or $self->poderror( {%opts}, @args )
-sub poderror {
- my $self = shift;
- my %opts = (ref $_[0]) ? %{shift()} : ();
-
- ## Retrieve options
- chomp( my $msg = ($opts{-msg} || '')."@_" );
- my $line = (exists $opts{-line}) ? " at line $opts{-line}" : '';
- my $file = (exists $opts{-file}) ? " in file $opts{-file}" : '';
- unless (exists $opts{-severity}) {
- ## See if can find severity in message prefix
- $opts{-severity} = $1 if ( $msg =~ s/^\**\s*([A-Z]{3,}):\s+// );
- }
- my $severity = (exists $opts{-severity}) ? "*** $opts{-severity}: " : '';
-
- ## Increment error count and print message "
- ++($self->{_NUM_ERRORS})
- if(!%opts || ($opts{-severity} && $opts{-severity} eq 'ERROR'));
- ++($self->{_NUM_WARNINGS})
- if(!%opts || ($opts{-severity} && $opts{-severity} eq 'WARNING'));
- unless($self->{-quiet}) {
- my $out_fh = $self->output_handle() || \*STDERR;
- print $out_fh ($severity, $msg, $line, $file, "\n")
- if($self->{-warnings} || !%opts || $opts{-severity} ne 'WARNING');
- }
-}
-
-##################################
-
-=item C<$checker-E<gt>num_errors()>
-
-Set (if argument specified) and retrieve the number of errors found.
-
-=cut
-
-sub num_errors {
- return (@_ > 1) ? ($_[0]->{_NUM_ERRORS} = $_[1]) : $_[0]->{_NUM_ERRORS};
-}
-
-##################################
-
-=item C<$checker-E<gt>num_warnings()>
-
-Set (if argument specified) and retrieve the number of warnings found.
-
-=cut
-
-sub num_warnings {
- return (@_ > 1) ? ($_[0]->{_NUM_WARNINGS} = $_[1]) : $_[0]->{_NUM_WARNINGS};
-}
-
-##################################
-
-=item C<$checker-E<gt>name()>
-
-Set (if argument specified) and retrieve the canonical name of POD as
-found in the C<=head1 NAME> section.
-
-=cut
-
-sub name {
- return (@_ > 1 && $_[1]) ?
- ($_[0]->{-name} = $_[1]) : $_[0]->{-name};
-}
-
-##################################
-
-=item C<$checker-E<gt>node()>
-
-Add (if argument specified) and retrieve the nodes (as defined by C<=headX>
-and C<=item>) of the current POD. The nodes are returned in the order of
-their occurrence. They consist of plain text, each piece of whitespace is
-collapsed to a single blank.
-
-=cut
-
-sub node {
- my ($self,$text) = @_;
- if(defined $text) {
- $text =~ s/\s+$//s; # strip trailing whitespace
- $text =~ s/\s+/ /gs; # collapse whitespace
- # add node, order important!
- push(@{$self->{_nodes}}, $text);
- # keep also a uniqueness counter
- $self->{_unique_nodes}->{$text}++ if($text !~ /^\s*$/s);
- return $text;
- }
- @{$self->{_nodes}};
-}
-
-##################################
-
-=item C<$checker-E<gt>idx()>
-
-Add (if argument specified) and retrieve the index entries (as defined by
-C<XE<lt>E<gt>>) of the current POD. They consist of plain text, each piece
-of whitespace is collapsed to a single blank.
-
-=cut
-
-# set/return index entries of current POD
-sub idx {
- my ($self,$text) = @_;
- if(defined $text) {
- $text =~ s/\s+$//s; # strip trailing whitespace
- $text =~ s/\s+/ /gs; # collapse whitespace
- # add node, order important!
- push(@{$self->{_index}}, $text);
- # keep also a uniqueness counter
- $self->{_unique_nodes}->{$text}++ if($text !~ /^\s*$/s);
- return $text;
- }
- @{$self->{_index}};
-}
-
-##################################
-
-=item C<$checker-E<gt>hyperlink()>
-
-Add (if argument specified) and retrieve the hyperlinks (as defined by
-C<LE<lt>E<gt>>) of the current POD. They consist of a 2-item array: line
-number and C<Pod::Hyperlink> object.
-
-=back
-
-=cut
-
-# set/return hyperlinks of the current POD
-sub hyperlink {
- my $self = shift;
- if($_[0]) {
- push(@{$self->{_links}}, $_[0]);
- return $_[0];
- }
- @{$self->{_links}};
-}
-
-## overrides for Pod::Parser
-
-sub end_pod {
- ## Do some final checks and
- ## print the number of errors found
- my $self = shift;
- my $infile = $self->input_file();
-
- if(@{$self->{_list_stack}}) {
- my $list;
- while(($list = $self->_close_list('EOF',$infile)) &&
- $list->indent() ne 'auto') {
- $self->poderror({ -line => 'EOF', -file => $infile,
- -severity => 'ERROR', -msg => '=over on line ' .
- $list->start() . ' without closing =back' });
- }
- }
-
- # check validity of document internal hyperlinks
- # first build the node names from the paragraph text
- my %nodes;
- foreach($self->node()) {
- $nodes{$_} = 1;
- if(/^(\S+)\s+\S/) {
- # we have more than one word. Use the first as a node, too.
- # This is used heavily in perlfunc.pod
- $nodes{$1} ||= 2; # derived node
- }
- }
- foreach($self->idx()) {
- $nodes{$_} = 3; # index node
- }
- foreach($self->hyperlink()) {
- my ($line,$link) = @$_;
- # _TODO_ what if there is a link to the page itself by the name,
- # e.g. in Tk::Pod : L<Tk::Pod/"DESCRIPTION">
- if($link->node() && !$link->page() && $link->type() ne 'hyperlink') {
- my $node = $self->_check_ptree($self->parse_text($link->node(),
- $line), $line, $infile, 'L');
- if($node && !$nodes{$node}) {
- $self->poderror({ -line => $line || '', -file => $infile,
- -severity => 'ERROR',
- -msg => "unresolved internal link '$node'"});
- }
- }
- }
-
- # check the internal nodes for uniqueness. This pertains to
- # =headX, =item and X<...>
- if($self->{-warnings} && $self->{-warnings}>1) {
- foreach(grep($self->{_unique_nodes}->{$_} > 1,
- keys %{$self->{_unique_nodes}})) {
- $self->poderror({ -line => '-', -file => $infile,
- -severity => 'WARNING',
- -msg => "multiple occurrence of link target '$_'"});
- }
- }
-
- # no POD found here
- $self->num_errors(-1) if($self->{_commands} == 0);
-}
-
-# check a POD command directive
-sub command {
- my ($self, $cmd, $paragraph, $line_num, $pod_para) = @_;
- my ($file, $line) = $pod_para->file_line;
- ## Check the command syntax
- my $arg; # this will hold the command argument
- if (! $VALID_COMMANDS{$cmd}) {
- $self->poderror({ -line => $line, -file => $file, -severity => 'ERROR',
- -msg => "Unknown command '$cmd'" });
- }
- else { # found a valid command
- $self->{_commands}++; # delete this line if below is enabled again
-
- ##### following check disabled due to strong request
- #if(!$self->{_commands}++ && $cmd !~ /^head/) {
- # $self->poderror({ -line => $line, -file => $file,
- # -severity => 'WARNING',
- # -msg => "file does not start with =head" });
- #}
-
- # check syntax of particular command
- if($cmd eq 'over') {
- # check for argument
- $arg = $self->interpolate_and_check($paragraph, $line,$file);
- my $indent = 4; # default
- if($arg && $arg =~ /^\s*(\d+)\s*$/) {
- $indent = $1;
- }
- # start a new list
- $self->_open_list($indent,$line,$file);
- }
- elsif($cmd eq 'item') {
- # are we in a list?
- unless(@{$self->{_list_stack}}) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => '=item without previous =over' });
- # auto-open in case we encounter many more
- $self->_open_list('auto',$line,$file);
- }
- my $list = $self->{_list_stack}->[0];
- # check whether the previous item had some contents
- if(defined $self->{_list_item_contents} &&
- $self->{_list_item_contents} == 0) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'previous =item has no contents' });
- }
- if($list->{_has_par}) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'preceding non-item paragraph(s)' });
- delete $list->{_has_par};
- }
- # check for argument
- $arg = $self->interpolate_and_check($paragraph, $line, $file);
- if($arg && $arg =~ /(\S+)/) {
- $arg =~ s/[\s\n]+$//;
- my $type;
- if($arg =~ /^[*]\s*(\S*.*)/) {
- $type = 'bullet';
- $self->{_list_item_contents} = $1 ? 1 : 0;
- $arg = $1;
- }
- elsif($arg =~ /^\d+\.?\s+(\S*)/) {
- $type = 'number';
- $self->{_list_item_contents} = $1 ? 1 : 0;
- $arg = $1;
- }
- else {
- $type = 'definition';
- $self->{_list_item_contents} = 1;
- }
- my $first = $list->type();
- if($first && $first ne $type) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => "=item type mismatch ('$first' vs. '$type')"});
- }
- else { # first item
- $list->type($type);
- }
- }
- else {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'No argument for =item' });
- $arg = ' '; # empty
- $self->{_list_item_contents} = 0;
- }
- # add this item
- $list->item($arg);
- # remember this node
- $self->node($arg);
- }
- elsif($cmd eq 'back') {
- # check if we have an open list
- unless(@{$self->{_list_stack}}) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => '=back without previous =over' });
- }
- else {
- # check for spurious characters
- $arg = $self->interpolate_and_check($paragraph, $line,$file);
- if($arg && $arg =~ /\S/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'Spurious character(s) after =back' });
- }
- # close list
- my $list = $self->_close_list($line,$file);
- # check for empty lists
- if(!$list->item() && $self->{-warnings}) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'No items in =over (at line ' .
- $list->start() . ') / =back list'});
- }
- }
- }
- elsif($cmd =~ /^head(\d+)/) {
- my $hnum = $1;
- $self->{"_have_head_$hnum"}++; # count head types
- if($hnum > 1 && !$self->{'_have_head_'.($hnum -1)}) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => "=head$hnum without preceding higher level"});
- }
- # check whether the previous =head section had some contents
- if(defined $self->{_commands_in_head} &&
- $self->{_commands_in_head} == 0 &&
- defined $self->{_last_head} &&
- $self->{_last_head} >= $hnum) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'empty section in previous paragraph'});
- }
- $self->{_commands_in_head} = -1;
- $self->{_last_head} = $hnum;
- # check if there is an open list
- if(@{$self->{_list_stack}}) {
- my $list;
- while(($list = $self->_close_list($line,$file)) &&
- $list->indent() ne 'auto') {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => '=over on line '. $list->start() .
- " without closing =back (at $cmd)" });
- }
- }
- # remember this node
- $arg = $self->interpolate_and_check($paragraph, $line,$file);
- $arg =~ s/[\s\n]+$//s;
- $self->node($arg);
- unless(length($arg)) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => "empty =$cmd"});
- }
- if($cmd eq 'head1') {
- $self->{_current_head1} = $arg;
- } else {
- $self->{_current_head1} = '';
- }
- }
- elsif($cmd eq 'begin') {
- if($self->{_have_begin}) {
- # already have a begin
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => q{Nested =begin's (first at line } .
- $self->{_have_begin} . ')'});
- }
- else {
- # check for argument
- $arg = $self->interpolate_and_check($paragraph, $line,$file);
- unless($arg && $arg =~ /(\S+)/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'No argument for =begin'});
- }
- # remember the =begin
- $self->{_have_begin} = "$line:$1";
- }
- }
- elsif($cmd eq 'end') {
- if($self->{_have_begin}) {
- # close the existing =begin
- $self->{_have_begin} = '';
- # check for spurious characters
- $arg = $self->interpolate_and_check($paragraph, $line,$file);
- # the closing argument is optional
- #if($arg && $arg =~ /\S/) {
- # $self->poderror({ -line => $line, -file => $file,
- # -severity => 'WARNING',
- # -msg => "Spurious character(s) after =end" });
- #}
- }
- else {
- # don't have a matching =begin
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => '=end without =begin' });
- }
- }
- elsif($cmd eq 'for') {
- unless($paragraph =~ /\s*(\S+)\s*/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => '=for without formatter specification' });
- }
- $arg = ''; # do not expand paragraph below
- }
- elsif($cmd =~ /^(pod|cut)$/) {
- # check for argument
- $arg = $self->interpolate_and_check($paragraph, $line,$file);
- if($arg && $arg =~ /(\S+)/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => "Spurious text after =$cmd"});
- }
- }
- $self->{_commands_in_head}++;
- ## Check the interior sequences in the command-text
- $self->interpolate_and_check($paragraph, $line,$file)
- unless(defined $arg);
- }
-}
-
-sub _open_list
-{
- my ($self,$indent,$line,$file) = @_;
- my $list = Pod::List->new(
- -indent => $indent,
- -start => $line,
- -file => $file);
- unshift(@{$self->{_list_stack}}, $list);
- undef $self->{_list_item_contents};
- $list;
-}
-
-sub _close_list
-{
- my ($self,$line,$file) = @_;
- my $list = shift(@{$self->{_list_stack}});
- if(defined $self->{_list_item_contents} &&
- $self->{_list_item_contents} == 0) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'previous =item has no contents' });
- }
- undef $self->{_list_item_contents};
- $list;
-}
-
-# process a block of some text
-sub interpolate_and_check {
- my ($self, $paragraph, $line, $file) = @_;
- ## Check the interior sequences in the command-text
- # and return the text
- $self->_check_ptree(
- $self->parse_text($paragraph,$line), $line, $file, '');
-}
-
-sub _check_ptree {
- my ($self,$ptree,$line,$file,$nestlist) = @_;
- local($_);
- my $text = '';
- # process each node in the parse tree
- foreach(@$ptree) {
- # regular text chunk
- unless(ref) {
- # count the unescaped angle brackets
- # complain only when warning level is greater than 1
- if($self->{-warnings} && $self->{-warnings}>1) {
- my $count;
- if($count = tr/<>/<>/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => "$count unescaped <> in paragraph" });
- }
- }
- $text .= $_;
- next;
- }
- # have an interior sequence
- my $cmd = $_->cmd_name();
- my $contents = $_->parse_tree();
- ($file,$line) = $_->file_line();
- # check for valid tag
- if (! $VALID_SEQUENCES{$cmd}) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => qq(Unknown interior-sequence '$cmd')});
- # expand it anyway
- $text .= $self->_check_ptree($contents, $line, $file, "$nestlist$cmd");
- next;
- }
- if($nestlist =~ /$cmd/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => "nested commands $cmd<...$cmd<...>...>"});
- # _TODO_ should we add the contents anyway?
- # expand it anyway, see below
- }
- if($cmd eq 'E') {
- # preserve entities
- if(@$contents > 1 || ref $$contents[0] || $$contents[0] !~ /^\w+$/) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'garbled entity ' . $_->raw_text()});
- next;
- }
- my $ent = $$contents[0];
- my $val;
- if($ent =~ /^0x[0-9a-f]+$/i) {
- # hexadec entity
- $val = hex($ent);
- }
- elsif($ent =~ /^0\d+$/) {
- # octal
- $val = oct($ent);
- }
- elsif($ent =~ /^\d+$/) {
- # numeric entity
- $val = $ent;
- }
- if(defined $val) {
- if($val>0 && $val<256) {
- $text .= chr($val);
- }
- else {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'Entity number out of range ' . $_->raw_text()});
- }
- }
- elsif($ENTITIES{$ent}) {
- # known ISO entity
- $text .= $ENTITIES{$ent};
- }
- else {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'Unknown entity ' . $_->raw_text()});
- $text .= "E<$ent>";
- }
- }
- elsif($cmd eq 'L') {
- # try to parse the hyperlink
- my $link = Pod::Hyperlink->new($contents->raw_text());
- unless(defined $link) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'malformed link ' . $_->raw_text() ." : $@"});
- next;
- }
- $link->line($line); # remember line
- if($self->{-warnings}) {
- foreach my $w ($link->warning()) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => $w });
- }
- }
- # check the link text
- $text .= $self->_check_ptree($self->parse_text($link->text(),
- $line), $line, $file, "$nestlist$cmd");
- # remember link
- $self->hyperlink([$line,$link]);
- }
- elsif($cmd =~ /[BCFIS]/) {
- # add the guts
- $text .= $self->_check_ptree($contents, $line, $file, "$nestlist$cmd");
- }
- elsif($cmd eq 'Z') {
- if(length($contents->raw_text())) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'Nonempty Z<>'});
- }
- }
- elsif($cmd eq 'X') {
- my $idx = $self->_check_ptree($contents, $line, $file, "$nestlist$cmd");
- if($idx =~ /^\s*$/s) {
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'ERROR',
- -msg => 'Empty X<>'});
- }
- else {
- # remember this node
- $self->idx($idx);
- }
- }
- else {
- # not reached
- croak 'internal error';
- }
- }
- $text;
-}
-
-# process a block of verbatim text
-sub verbatim {
- ## Nothing particular to check
- my ($self, $paragraph, $line_num, $pod_para) = @_;
-
- $self->_preproc_par($paragraph);
-
- if($self->{_current_head1} eq 'NAME') {
- my ($file, $line) = $pod_para->file_line;
- $self->poderror({ -line => $line, -file => $file,
- -severity => 'WARNING',
- -msg => 'Verbatim paragraph in NAME section' });
- }
-}
-
-# process a block of regular text
-sub textblock {
- my ($self, $paragraph, $line_num, $pod_para) = @_;
- my ($file, $line) = $pod_para->file_line;
-
- $self->_preproc_par($paragraph);
-
- # skip this paragraph if in a =begin block
- unless($self->{_have_begin}) {
- my $block = $self->interpolate_and_check($paragraph, $line,$file);
- if($self->{_current_head1} eq 'NAME') {
- if($block =~ /^\s*(\S+?)\s*[,-]/) {
- # this is the canonical name
- $self->{-name} = $1 unless(defined $self->{-name});
- }
- }
- }
-}
-
-sub _preproc_par
-{
- my $self = shift;
- $_[0] =~ s/[\s\n]+$//;
- if($_[0]) {
- $self->{_commands_in_head}++;
- $self->{_list_item_contents}++ if(defined $self->{_list_item_contents});
- if(@{$self->{_list_stack}} && !$self->{_list_stack}->[0]->item()) {
- $self->{_list_stack}->[0]->{_has_par} = 1;
- }
- }
-}
-
-1;
-
-__END__
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Brad Appleton E<lt>bradapp at enteract.comE<gt> (initial version),
-Marek Rouchal E<lt>marekr at cpan.orgE<gt>
-
-Based on code for B<Pod::Text::pod2text()> written by
-Tom Christiansen E<lt>tchrist at mox.perl.comE<gt>
-
-=cut
-
Deleted: vendor/perl/dist/lib/Pod/Escapes.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Escapes.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Escapes.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,721 +0,0 @@
-
-require 5;
-# The documentation is at the end.
-# Time-stamp: "2004-05-07 15:31:25 ADT"
-package Pod::Escapes;
-require Exporter;
- at ISA = ('Exporter');
-$VERSION = '1.04';
- at EXPORT_OK = qw(
- %Code2USASCII
- %Name2character
- %Name2character_number
- %Latin1Code_to_fallback
- %Latin1Char_to_fallback
- e2char
- e2charnum
-);
-%EXPORT_TAGS = ('ALL' => \@EXPORT_OK);
-
-#==========================================================================
-
-use strict;
-use vars qw(
- %Code2USASCII
- %Name2character
- %Name2character_number
- %Latin1Code_to_fallback
- %Latin1Char_to_fallback
- $FAR_CHAR
- $FAR_CHAR_NUMBER
- $NOT_ASCII
-);
-
-$FAR_CHAR = "?" unless defined $FAR_CHAR;
-$FAR_CHAR_NUMBER = ord($FAR_CHAR) unless defined $FAR_CHAR_NUMBER;
-
-$NOT_ASCII = 'A' ne chr(65) unless defined $NOT_ASCII;
-
-#--------------------------------------------------------------------------
-sub e2char {
- my $in = $_[0];
- return undef unless defined $in and length $in;
-
- # Convert to decimal:
- if($in =~ m/^(0[0-7]*)$/s ) {
- $in = oct $in;
- } elsif($in =~ m/^0?x([0-9a-fA-F]+)$/s ) {
- $in = hex $1;
- } # else it's decimal, or named
-
- if($NOT_ASCII) {
- # We're in bizarro world of not-ASCII!
- # Cope with US-ASCII codes, use fallbacks for Latin-1, or use FAR_CHAR.
- unless($in =~ m/^\d+$/s) {
- # It's a named character reference. Get its numeric Unicode value.
- $in = $Name2character{$in};
- return undef unless defined $in; # (if there's no such name)
- $in = ord $in; # (All ents must be one character long.)
- # ...So $in holds the char's US-ASCII numeric value, which we'll
- # now go get the local equivalent for.
- }
-
- # It's numeric, whether by origin or by mutation from a known name
- return $Code2USASCII{$in} # so "65" => "A" everywhere
- || $Latin1Code_to_fallback{$in} # Fallback.
- || $FAR_CHAR; # Fall further back
- }
-
- # Normal handling:
- if($in =~ m/^\d+$/s) {
- if($] < 5.007 and $in > 255) { # can't be trusted with Unicode
- return $FAR_CHAR;
- } else {
- return chr($in);
- }
- } else {
- return $Name2character{$in}; # returns undef if unknown
- }
-}
-
-#--------------------------------------------------------------------------
-sub e2charnum {
- my $in = $_[0];
- return undef unless defined $in and length $in;
-
- # Convert to decimal:
- if($in =~ m/^(0[0-7]*)$/s ) {
- $in = oct $in;
- } elsif($in =~ m/^0?x([0-9a-fA-F]+)$/s ) {
- $in = hex $1;
- } # else it's decimal, or named
-
- if($in =~ m/^\d+$/s) {
- return 0 + $in;
- } else {
- return $Name2character_number{$in}; # returns undef if unknown
- }
-}
-
-#--------------------------------------------------------------------------
-
-%Name2character_number = (
- # General XML/XHTML:
- 'lt' => 60,
- 'gt' => 62,
- 'quot' => 34,
- 'amp' => 38,
- 'apos' => 39,
-
- # POD-specific:
- 'sol' => 47,
- 'verbar' => 124,
-
- 'lchevron' => 171, # legacy for laquo
- 'rchevron' => 187, # legacy for raquo
-
- # Remember, grave looks like \ (as in virtu\)
- # acute looks like / (as in re/sume/)
- # circumflex looks like ^ (as in papier ma^che/)
- # umlaut/dieresis looks like " (as in nai"ve, Chloe")
-
- # From the XHTML 1 .ent files:
- 'nbsp' , 160,
- 'iexcl' , 161,
- 'cent' , 162,
- 'pound' , 163,
- 'curren' , 164,
- 'yen' , 165,
- 'brvbar' , 166,
- 'sect' , 167,
- 'uml' , 168,
- 'copy' , 169,
- 'ordf' , 170,
- 'laquo' , 171,
- 'not' , 172,
- 'shy' , 173,
- 'reg' , 174,
- 'macr' , 175,
- 'deg' , 176,
- 'plusmn' , 177,
- 'sup2' , 178,
- 'sup3' , 179,
- 'acute' , 180,
- 'micro' , 181,
- 'para' , 182,
- 'middot' , 183,
- 'cedil' , 184,
- 'sup1' , 185,
- 'ordm' , 186,
- 'raquo' , 187,
- 'frac14' , 188,
- 'frac12' , 189,
- 'frac34' , 190,
- 'iquest' , 191,
- 'Agrave' , 192,
- 'Aacute' , 193,
- 'Acirc' , 194,
- 'Atilde' , 195,
- 'Auml' , 196,
- 'Aring' , 197,
- 'AElig' , 198,
- 'Ccedil' , 199,
- 'Egrave' , 200,
- 'Eacute' , 201,
- 'Ecirc' , 202,
- 'Euml' , 203,
- 'Igrave' , 204,
- 'Iacute' , 205,
- 'Icirc' , 206,
- 'Iuml' , 207,
- 'ETH' , 208,
- 'Ntilde' , 209,
- 'Ograve' , 210,
- 'Oacute' , 211,
- 'Ocirc' , 212,
- 'Otilde' , 213,
- 'Ouml' , 214,
- 'times' , 215,
- 'Oslash' , 216,
- 'Ugrave' , 217,
- 'Uacute' , 218,
- 'Ucirc' , 219,
- 'Uuml' , 220,
- 'Yacute' , 221,
- 'THORN' , 222,
- 'szlig' , 223,
- 'agrave' , 224,
- 'aacute' , 225,
- 'acirc' , 226,
- 'atilde' , 227,
- 'auml' , 228,
- 'aring' , 229,
- 'aelig' , 230,
- 'ccedil' , 231,
- 'egrave' , 232,
- 'eacute' , 233,
- 'ecirc' , 234,
- 'euml' , 235,
- 'igrave' , 236,
- 'iacute' , 237,
- 'icirc' , 238,
- 'iuml' , 239,
- 'eth' , 240,
- 'ntilde' , 241,
- 'ograve' , 242,
- 'oacute' , 243,
- 'ocirc' , 244,
- 'otilde' , 245,
- 'ouml' , 246,
- 'divide' , 247,
- 'oslash' , 248,
- 'ugrave' , 249,
- 'uacute' , 250,
- 'ucirc' , 251,
- 'uuml' , 252,
- 'yacute' , 253,
- 'thorn' , 254,
- 'yuml' , 255,
-
- 'fnof' , 402,
- 'Alpha' , 913,
- 'Beta' , 914,
- 'Gamma' , 915,
- 'Delta' , 916,
- 'Epsilon' , 917,
- 'Zeta' , 918,
- 'Eta' , 919,
- 'Theta' , 920,
- 'Iota' , 921,
- 'Kappa' , 922,
- 'Lambda' , 923,
- 'Mu' , 924,
- 'Nu' , 925,
- 'Xi' , 926,
- 'Omicron' , 927,
- 'Pi' , 928,
- 'Rho' , 929,
- 'Sigma' , 931,
- 'Tau' , 932,
- 'Upsilon' , 933,
- 'Phi' , 934,
- 'Chi' , 935,
- 'Psi' , 936,
- 'Omega' , 937,
- 'alpha' , 945,
- 'beta' , 946,
- 'gamma' , 947,
- 'delta' , 948,
- 'epsilon' , 949,
- 'zeta' , 950,
- 'eta' , 951,
- 'theta' , 952,
- 'iota' , 953,
- 'kappa' , 954,
- 'lambda' , 955,
- 'mu' , 956,
- 'nu' , 957,
- 'xi' , 958,
- 'omicron' , 959,
- 'pi' , 960,
- 'rho' , 961,
- 'sigmaf' , 962,
- 'sigma' , 963,
- 'tau' , 964,
- 'upsilon' , 965,
- 'phi' , 966,
- 'chi' , 967,
- 'psi' , 968,
- 'omega' , 969,
- 'thetasym' , 977,
- 'upsih' , 978,
- 'piv' , 982,
- 'bull' , 8226,
- 'hellip' , 8230,
- 'prime' , 8242,
- 'Prime' , 8243,
- 'oline' , 8254,
- 'frasl' , 8260,
- 'weierp' , 8472,
- 'image' , 8465,
- 'real' , 8476,
- 'trade' , 8482,
- 'alefsym' , 8501,
- 'larr' , 8592,
- 'uarr' , 8593,
- 'rarr' , 8594,
- 'darr' , 8595,
- 'harr' , 8596,
- 'crarr' , 8629,
- 'lArr' , 8656,
- 'uArr' , 8657,
- 'rArr' , 8658,
- 'dArr' , 8659,
- 'hArr' , 8660,
- 'forall' , 8704,
- 'part' , 8706,
- 'exist' , 8707,
- 'empty' , 8709,
- 'nabla' , 8711,
- 'isin' , 8712,
- 'notin' , 8713,
- 'ni' , 8715,
- 'prod' , 8719,
- 'sum' , 8721,
- 'minus' , 8722,
- 'lowast' , 8727,
- 'radic' , 8730,
- 'prop' , 8733,
- 'infin' , 8734,
- 'ang' , 8736,
- 'and' , 8743,
- 'or' , 8744,
- 'cap' , 8745,
- 'cup' , 8746,
- 'int' , 8747,
- 'there4' , 8756,
- 'sim' , 8764,
- 'cong' , 8773,
- 'asymp' , 8776,
- 'ne' , 8800,
- 'equiv' , 8801,
- 'le' , 8804,
- 'ge' , 8805,
- 'sub' , 8834,
- 'sup' , 8835,
- 'nsub' , 8836,
- 'sube' , 8838,
- 'supe' , 8839,
- 'oplus' , 8853,
- 'otimes' , 8855,
- 'perp' , 8869,
- 'sdot' , 8901,
- 'lceil' , 8968,
- 'rceil' , 8969,
- 'lfloor' , 8970,
- 'rfloor' , 8971,
- 'lang' , 9001,
- 'rang' , 9002,
- 'loz' , 9674,
- 'spades' , 9824,
- 'clubs' , 9827,
- 'hearts' , 9829,
- 'diams' , 9830,
- 'OElig' , 338,
- 'oelig' , 339,
- 'Scaron' , 352,
- 'scaron' , 353,
- 'Yuml' , 376,
- 'circ' , 710,
- 'tilde' , 732,
- 'ensp' , 8194,
- 'emsp' , 8195,
- 'thinsp' , 8201,
- 'zwnj' , 8204,
- 'zwj' , 8205,
- 'lrm' , 8206,
- 'rlm' , 8207,
- 'ndash' , 8211,
- 'mdash' , 8212,
- 'lsquo' , 8216,
- 'rsquo' , 8217,
- 'sbquo' , 8218,
- 'ldquo' , 8220,
- 'rdquo' , 8221,
- 'bdquo' , 8222,
- 'dagger' , 8224,
- 'Dagger' , 8225,
- 'permil' , 8240,
- 'lsaquo' , 8249,
- 'rsaquo' , 8250,
- 'euro' , 8364,
-);
-
-
-# Fill out %Name2character...
-{
- %Name2character = ();
- my($name, $number);
- while( ($name, $number) = each %Name2character_number) {
- if($] < 5.007 and $number > 255) {
- $Name2character{$name} = $FAR_CHAR;
- # substitute for Unicode characters, for perls
- # that can't reliable handle them
- } else {
- $Name2character{$name} = chr $number;
- # normal case
- }
- }
- # So they resolve 'right' even in EBCDIC-land
- $Name2character{'lt' } = '<';
- $Name2character{'gt' } = '>';
- $Name2character{'quot'} = '"';
- $Name2character{'amp' } = '&';
- $Name2character{'apos'} = "'";
- $Name2character{'sol' } = '/';
- $Name2character{'verbar'} = '|';
-}
-
-#--------------------------------------------------------------------------
-
-%Code2USASCII = (
-# mostly generated by
-# perl -e "printf qq{ \x25 3s, '\x25s',\n}, $_, chr($_) foreach (32 .. 126)"
- 32, ' ',
- 33, '!',
- 34, '"',
- 35, '#',
- 36, '$',
- 37, '%',
- 38, '&',
- 39, "'", #!
- 40, '(',
- 41, ')',
- 42, '*',
- 43, '+',
- 44, ',',
- 45, '-',
- 46, '.',
- 47, '/',
- 48, '0',
- 49, '1',
- 50, '2',
- 51, '3',
- 52, '4',
- 53, '5',
- 54, '6',
- 55, '7',
- 56, '8',
- 57, '9',
- 58, ':',
- 59, ';',
- 60, '<',
- 61, '=',
- 62, '>',
- 63, '?',
- 64, '@',
- 65, 'A',
- 66, 'B',
- 67, 'C',
- 68, 'D',
- 69, 'E',
- 70, 'F',
- 71, 'G',
- 72, 'H',
- 73, 'I',
- 74, 'J',
- 75, 'K',
- 76, 'L',
- 77, 'M',
- 78, 'N',
- 79, 'O',
- 80, 'P',
- 81, 'Q',
- 82, 'R',
- 83, 'S',
- 84, 'T',
- 85, 'U',
- 86, 'V',
- 87, 'W',
- 88, 'X',
- 89, 'Y',
- 90, 'Z',
- 91, '[',
- 92, "\\", #!
- 93, ']',
- 94, '^',
- 95, '_',
- 96, '`',
- 97, 'a',
- 98, 'b',
- 99, 'c',
- 100, 'd',
- 101, 'e',
- 102, 'f',
- 103, 'g',
- 104, 'h',
- 105, 'i',
- 106, 'j',
- 107, 'k',
- 108, 'l',
- 109, 'm',
- 110, 'n',
- 111, 'o',
- 112, 'p',
- 113, 'q',
- 114, 'r',
- 115, 's',
- 116, 't',
- 117, 'u',
- 118, 'v',
- 119, 'w',
- 120, 'x',
- 121, 'y',
- 122, 'z',
- 123, '{',
- 124, '|',
- 125, '}',
- 126, '~',
-);
-
-#--------------------------------------------------------------------------
-
-%Latin1Code_to_fallback = ();
- at Latin1Code_to_fallback{0xA0 .. 0xFF} = (
-# Copied from Text/Unidecode/x00.pm:
-
-' ', qq{!}, qq{C/}, 'PS', qq{\$?}, qq{Y=}, qq{|}, 'SS', qq{"}, qq{(c)}, 'a', qq{<<}, qq{!}, "", qq{(r)}, qq{-},
-'deg', qq{+-}, '2', '3', qq{'}, 'u', 'P', qq{*}, qq{,}, '1', 'o', qq{>>}, qq{1/4}, qq{1/2}, qq{3/4}, qq{?},
-'A', 'A', 'A', 'A', 'A', 'A', 'AE', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I',
-'D', 'N', 'O', 'O', 'O', 'O', 'O', 'x', 'O', 'U', 'U', 'U', 'U', 'U', 'Th', 'ss',
-'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i',
-'d', 'n', 'o', 'o', 'o', 'o', 'o', qq{/}, 'o', 'u', 'u', 'u', 'u', 'y', 'th', 'y',
-
-);
-
-{
- # Now stuff %Latin1Char_to_fallback:
- %Latin1Char_to_fallback = ();
- my($k,$v);
- while( ($k,$v) = each %Latin1Code_to_fallback) {
- $Latin1Char_to_fallback{chr $k} = $v;
- #print chr($k), ' => ', $v, "\n";
- }
-}
-
-#--------------------------------------------------------------------------
-1;
-__END__
-
-=head1 NAME
-
-Pod::Escapes -- for resolving Pod EE<lt>...E<gt> sequences
-
-=head1 SYNOPSIS
-
- use Pod::Escapes qw(e2char);
- ...la la la, parsing POD, la la la...
- $text = e2char($e_node->label);
- unless(defined $text) {
- print "Unknown E sequence \"", $e_node->label, "\"!";
- }
- ...else print/interpolate $text...
-
-=head1 DESCRIPTION
-
-This module provides things that are useful in decoding
-Pod EE<lt>...E<gt> sequences. Presumably, it should be used
-only by Pod parsers and/or formatters.
-
-By default, Pod::Escapes exports none of its symbols. But
-you can request any of them to be exported.
-Either request them individually, as with
-C<use Pod::Escapes qw(symbolname symbolname2...);>,
-or you can do C<use Pod::Escapes qw(:ALL);> to get all
-exportable symbols.
-
-=head1 GOODIES
-
-=over
-
-=item e2char($e_content)
-
-Given a name or number that could appear in a
-C<EE<lt>name_or_numE<gt>> sequence, this returns the string that
-it stands for. For example, C<e2char('sol')>, C<e2char('47')>,
-C<e2char('0x2F')>, and C<e2char('057')> all return "/",
-because C<EE<lt>solE<gt>>, C<EE<lt>47E<gt>>, C<EE<lt>0x2fE<gt>>,
-and C<EE<lt>057E<gt>>, all mean "/". If
-the name has no known value (as with a name of "qacute") or is
-syntactally invalid (as with a name of "1/4"), this returns undef.
-
-=item e2charnum($e_content)
-
-Given a name or number that could appear in a
-C<EE<lt>name_or_numE<gt>> sequence, this returns the number of
-the Unicode character that this stands for. For example,
-C<e2char('sol')>, C<e2char('47')>,
-C<e2char('0x2F')>, and C<e2char('057')> all return 47,
-because C<EE<lt>solE<gt>>, C<EE<lt>47E<gt>>, C<EE<lt>0x2fE<gt>>,
-and C<EE<lt>057E<gt>>, all mean "/", whose Unicode number is 47. If
-the name has no known value (as with a name of "qacute") or is
-syntactally invalid (as with a name of "1/4"), this returns undef.
-
-=item $Name2character{I<name>}
-
-Maps from names (as in C<EE<lt>I<name>E<gt>>) like "eacute" or "sol"
-to the string that each stands for. Note that this does not
-include numerics (like "64" or "x981c"). Under old Perl versions
-(before 5.7) you get a "?" in place of characters whose Unicode
-value is over 255.
-
-=item $Name2character_number{I<name>}
-
-Maps from names (as in C<EE<lt>I<name>E<gt>>) like "eacute" or "sol"
-to the Unicode value that each stands for. For example,
-C<$Name2character_number{'eacute'}> is 201, and
-C<$Name2character_number{'eacute'}> is 8364. You get the correct
-Unicode value, regardless of the version of Perl you're using --
-which differs from C<%Name2character>'s behavior under pre-5.7 Perls.
-
-Note that this hash does not
-include numerics (like "64" or "x981c").
-
-=item $Latin1Code_to_fallback{I<integer>}
-
-For numbers in the range 160 (0x00A0) to 255 (0x00FF), this maps
-from the character code for a Latin-1 character (like 233 for
-lowercase e-acute) to the US-ASCII character that best aproximates
-it (like "e"). You may find this useful if you are rendering
-POD in a format that you think deals well only with US-ASCII
-characters.
-
-=item $Latin1Char_to_fallback{I<character>}
-
-Just as above, but maps from characters (like "\xE9",
-lowercase e-acute) to characters (like "e").
-
-=item $Code2USASCII{I<integer>}
-
-This maps from US-ASCII codes (like 32) to the corresponding
-character (like space, for 32). Only characters 32 to 126 are
-defined. This is meant for use by C<e2char($x)> when it senses
-that it's running on a non-ASCII platform (where chr(32) doesn't
-get you a space -- but $Code2USASCII{32} will). It's
-documented here just in case you might find it useful.
-
-=back
-
-=head1 CAVEATS
-
-On Perl versions before 5.7, Unicode characters with a value
-over 255 (like lambda or emdash) can't be conveyed. This
-module does work under such early Perl versions, but in the
-place of each such character, you get a "?". Latin-1
-characters (characters 160-255) are unaffected.
-
-Under EBCDIC platforms, C<e2char($n)> may not always be the
-same as C<chr(e2charnum($n))>, and ditto for
-C<$Name2character{$name}> and
-C<chr($Name2character_number{$name})>.
-
-=head1 SEE ALSO
-
-L<perlpod|perlpod>
-
-L<perlpodspec|perlpodspec>
-
-L<Text::Unidecode|Text::Unidecode>
-
-=head1 COPYRIGHT AND DISCLAIMERS
-
-Copyright (c) 2001-2004 Sean M. Burke. All rights reserved.
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-This program is distributed in the hope that it will be useful, but
-without any warranty; without even the implied warranty of
-merchantability or fitness for a particular purpose.
-
-Portions of the data tables in this module are derived from the
-entity declarations in the W3C XHTML specification.
-
-Currently (October 2001), that's these three:
-
- http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent
- http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent
- http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent
-
-=head1 AUTHOR
-
-Sean M. Burke C<sburke at cpan.org>
-
-=cut
-
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-# What I used for reading the XHTML .ent files:
-
-use strict;
-my(@norms, @good, @bad);
-my $dir = 'c:/sgml/docbook/';
-my %escapes;
-foreach my $file (qw(
- xhtml-symbol.ent
- xhtml-lat1.ent
- xhtml-special.ent
-)) {
- open(IN, "<$dir$file") or die "can't read-open $dir$file: $!";
- print "Reading $file...\n";
- while(<IN>) {
- if(m/<!ENTITY\s+(\S+)\s+"&#([^;]+);">/) {
- my($name, $value) = ($1,$2);
- next if $name eq 'quot' or $name eq 'apos' or $name eq 'gt';
-
- $value = hex $1 if $value =~ m/^x([a-fA-F0-9]+)$/s;
- print "ILLEGAL VALUE $value" unless $value =~ m/^\d+$/s;
- if($value > 255) {
- push @good , sprintf " %-10s , chr(%s),\n", "'$name'", $value;
- push @bad , sprintf " %-10s , \$bad,\n", "'$name'", $value;
- } else {
- push @norms, sprintf " %-10s , chr(%s),\n", "'$name'", $value;
- }
- } elsif(m/<!ENT/) {
- print "# Skipping $_";
- }
-
- }
- close(IN);
-}
-
-print @norms;
-print "\n ( \$] .= 5.006001 ? (\n";
-print @good;
-print " ) : (\n";
-print @bad;
-print " )\n);\n";
-
-__END__
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
Deleted: vendor/perl/dist/lib/Pod/Find.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Find.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Find.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,535 +0,0 @@
-#############################################################################
-# Pod/Find.pm -- finds files containing POD documentation
-#
-# Author: Marek Rouchal <marekr at cpan.org>
-#
-# Copyright (C) 1999-2000 by Marek Rouchal (and borrowing code
-# from Nick Ing-Simmon's PodToHtml). All rights reserved.
-# This file is part of "PodParser". Pod::Find is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-package Pod::Find;
-use strict;
-
-use vars qw($VERSION);
-$VERSION = '1.35'; ## Current version of this package
-require 5.005; ## requires this Perl version or later
-use Carp;
-
-BEGIN {
- if ($] < 5.006) {
- require Symbol;
- import Symbol;
- }
-}
-
-#############################################################################
-
-=head1 NAME
-
-Pod::Find - find POD documents in directory trees
-
-=head1 SYNOPSIS
-
- use Pod::Find qw(pod_find simplify_name);
- my %pods = pod_find({ -verbose => 1, -inc => 1 });
- foreach(keys %pods) {
- print "found library POD `$pods{$_}' in $_\n";
- }
-
- print "podname=",simplify_name('a/b/c/mymodule.pod'),"\n";
-
- $location = pod_where( { -inc => 1 }, "Pod::Find" );
-
-=head1 DESCRIPTION
-
-B<Pod::Find> provides a set of functions to locate POD files. Note that
-no function is exported by default to avoid pollution of your namespace,
-so be sure to specify them in the B<use> statement if you need them:
-
- use Pod::Find qw(pod_find);
-
-From this version on the typical SCM (software configuration management)
-files/directories like RCS, CVS, SCCS, .svn are ignored.
-
-=cut
-
-#use diagnostics;
-use Exporter;
-use File::Spec;
-use File::Find;
-use Cwd;
-
-use vars qw(@ISA @EXPORT_OK $VERSION);
- at ISA = qw(Exporter);
- at EXPORT_OK = qw(&pod_find &simplify_name &pod_where &contains_pod);
-
-# package global variables
-my $SIMPLIFY_RX;
-
-=head2 C<pod_find( { %opts } , @directories )>
-
-The function B<pod_find> searches for POD documents in a given set of
-files and/or directories. It returns a hash with the file names as keys
-and the POD name as value. The POD name is derived from the file name
-and its position in the directory tree.
-
-E.g. when searching in F<$HOME/perl5lib>, the file
-F<$HOME/perl5lib/MyModule.pm> would get the POD name I<MyModule>,
-whereas F<$HOME/perl5lib/Myclass/Subclass.pm> would be
-I<Myclass::Subclass>. The name information can be used for POD
-translators.
-
-Only text files containing at least one valid POD command are found.
-
-A warning is printed if more than one POD file with the same POD name
-is found, e.g. F<CPAN.pm> in different directories. This usually
-indicates duplicate occurrences of modules in the I<@INC> search path.
-
-B<OPTIONS> The first argument for B<pod_find> may be a hash reference
-with options. The rest are either directories that are searched
-recursively or files. The POD names of files are the plain basenames
-with any Perl-like extension (.pm, .pl, .pod) stripped.
-
-=over 4
-
-=item C<-verbose =E<gt> 1>
-
-Print progress information while scanning.
-
-=item C<-perl =E<gt> 1>
-
-Apply Perl-specific heuristics to find the correct PODs. This includes
-stripping Perl-like extensions, omitting subdirectories that are numeric
-but do I<not> match the current Perl interpreter's version id, suppressing
-F<site_perl> as a module hierarchy name etc.
-
-=item C<-script =E<gt> 1>
-
-Search for PODs in the current Perl interpreter's installation
-B<scriptdir>. This is taken from the local L<Config|Config> module.
-
-=item C<-inc =E<gt> 1>
-
-Search for PODs in the current Perl interpreter's I<@INC> paths. This
-automatically considers paths specified in the C<PERL5LIB> environment
-as this is included in I<@INC> by the Perl interpreter itself.
-
-=back
-
-=cut
-
-# return a hash of the POD files found
-# first argument may be a hashref (options),
-# rest is a list of directories to search recursively
-sub pod_find
-{
- my %opts;
- if(ref $_[0]) {
- %opts = %{shift()};
- }
-
- $opts{-verbose} ||= 0;
- $opts{-perl} ||= 0;
-
- my (@search) = @_;
-
- if($opts{-script}) {
- require Config;
- push(@search, $Config::Config{scriptdir})
- if -d $Config::Config{scriptdir};
- $opts{-perl} = 1;
- }
-
- if($opts{-inc}) {
- if ($^O eq 'MacOS') {
- # tolerate '.', './some_dir' and '(../)+some_dir' on Mac OS
- my @new_INC = @INC;
- for (@new_INC) {
- if ( $_ eq '.' ) {
- $_ = ':';
- } elsif ( $_ =~ s{^((?:\.\./)+)}{':' x (length($1)/3)}e ) {
- $_ = ':'. $_;
- } else {
- $_ =~ s{^\./}{:};
- }
- }
- push(@search, grep($_ ne File::Spec->curdir, @new_INC));
- } else {
- push(@search, grep($_ ne File::Spec->curdir, @INC));
- }
-
- $opts{-perl} = 1;
- }
-
- if($opts{-perl}) {
- require Config;
- # this code simplifies the POD name for Perl modules:
- # * remove "site_perl"
- # * remove e.g. "i586-linux" (from 'archname')
- # * remove e.g. 5.00503
- # * remove pod/ if followed by *.pod (e.g. in pod/perlfunc.pod)
-
- # Mac OS:
- # * remove ":?site_perl:"
- # * remove :?pod: if followed by *.pod (e.g. in :pod:perlfunc.pod)
-
- if ($^O eq 'MacOS') {
- $SIMPLIFY_RX =
- qq!^(?i:\:?site_perl\:|\:?pod\:(?=.*?\\.pod\\z))*!;
- } else {
- $SIMPLIFY_RX =
- qq!^(?i:site(_perl)?/|\Q$Config::Config{archname}\E/|\\d+\\.\\d+([_.]?\\d+)?/|pod/(?=.*?\\.pod\\z))*!;
- }
- }
-
- my %dirs_visited;
- my %pods;
- my %names;
- my $pwd = cwd();
-
- foreach my $try (@search) {
- unless(File::Spec->file_name_is_absolute($try)) {
- # make path absolute
- $try = File::Spec->catfile($pwd,$try);
- }
- # simplify path
- # on VMS canonpath will vmsify:[the.path], but File::Find::find
- # wants /unixy/paths
- $try = File::Spec->canonpath($try) if ($^O ne 'VMS');
- $try = VMS::Filespec::unixify($try) if ($^O eq 'VMS');
- my $name;
- if(-f $try) {
- if($name = _check_and_extract_name($try, $opts{-verbose})) {
- _check_for_duplicates($try, $name, \%names, \%pods);
- }
- next;
- }
- my $root_rx = $^O eq 'MacOS' ? qq!^\Q$try\E! : qq!^\Q$try\E/!;
- File::Find::find( sub {
- my $item = $File::Find::name;
- if(-d) {
- if($item =~ m{/(?:RCS|CVS|SCCS|\.svn)$}) {
- $File::Find::prune = 1;
- return;
- }
- elsif($dirs_visited{$item}) {
- warn "Directory '$item' already seen, skipping.\n"
- if($opts{-verbose});
- $File::Find::prune = 1;
- return;
- }
- else {
- $dirs_visited{$item} = 1;
- }
- if($opts{-perl} && /^(\d+\.[\d_]+)\z/s && eval "$1" != $]) {
- $File::Find::prune = 1;
- warn "Perl $] version mismatch on $_, skipping.\n"
- if($opts{-verbose});
- }
- return;
- }
- if($name = _check_and_extract_name($item, $opts{-verbose}, $root_rx)) {
- _check_for_duplicates($item, $name, \%names, \%pods);
- }
- }, $try); # end of File::Find::find
- }
- chdir $pwd;
- return %pods;
-}
-
-sub _check_for_duplicates {
- my ($file, $name, $names_ref, $pods_ref) = @_;
- if($$names_ref{$name}) {
- warn "Duplicate POD found (shadowing?): $name ($file)\n";
- warn ' Already seen in ',
- join(' ', grep($$pods_ref{$_} eq $name, keys %$pods_ref)),"\n";
- }
- else {
- $$names_ref{$name} = 1;
- }
- return $$pods_ref{$file} = $name;
-}
-
-sub _check_and_extract_name {
- my ($file, $verbose, $root_rx) = @_;
-
- # check extension or executable flag
- # this involves testing the .bat extension on Win32!
- unless(-f $file && -T $file && ($file =~ /\.(pod|pm|plx?)\z/i || -x $file )) {
- return;
- }
-
- return unless contains_pod($file,$verbose);
-
- # strip non-significant path components
- # TODO what happens on e.g. Win32?
- my $name = $file;
- if(defined $root_rx) {
- $name =~ s/$root_rx//s;
- $name =~ s/$SIMPLIFY_RX//s if(defined $SIMPLIFY_RX);
- }
- else {
- if ($^O eq 'MacOS') {
- $name =~ s/^.*://s;
- } else {
- $name =~ s{^.*/}{}s;
- }
- }
- _simplify($name);
- $name =~ s{/+}{::}g;
- if ($^O eq 'MacOS') {
- $name =~ s{:+}{::}g; # : -> ::
- } else {
- $name =~ s{/+}{::}g; # / -> ::
- }
- return $name;
-}
-
-=head2 C<simplify_name( $str )>
-
-The function B<simplify_name> is equivalent to B<basename>, but also
-strips Perl-like extensions (.pm, .pl, .pod) and extensions like
-F<.bat>, F<.cmd> on Win32 and OS/2, or F<.com> on VMS, respectively.
-
-=cut
-
-# basic simplification of the POD name:
-# basename & strip extension
-sub simplify_name {
- my ($str) = @_;
- # remove all path components
- if ($^O eq 'MacOS') {
- $str =~ s/^.*://s;
- } else {
- $str =~ s{^.*/}{}s;
- }
- _simplify($str);
- return $str;
-}
-
-# internal sub only
-sub _simplify {
- # strip Perl's own extensions
- $_[0] =~ s/\.(pod|pm|plx?)\z//i;
- # strip meaningless extensions on Win32 and OS/2
- $_[0] =~ s/\.(bat|exe|cmd)\z//i if($^O =~ /mswin|os2/i);
- # strip meaningless extensions on VMS
- $_[0] =~ s/\.(com)\z//i if($^O eq 'VMS');
-}
-
-# contribution from Tim Jenness <t.jenness at jach.hawaii.edu>
-
-=head2 C<pod_where( { %opts }, $pod )>
-
-Returns the location of a pod document given a search directory
-and a module (e.g. C<File::Find>) or script (e.g. C<perldoc>) name.
-
-Options:
-
-=over 4
-
-=item C<-inc =E<gt> 1>
-
-Search @INC for the pod and also the C<scriptdir> defined in the
-L<Config|Config> module.
-
-=item C<-dirs =E<gt> [ $dir1, $dir2, ... ]>
-
-Reference to an array of search directories. These are searched in order
-before looking in C<@INC> (if B<-inc>). Current directory is used if
-none are specified.
-
-=item C<-verbose =E<gt> 1>
-
-List directories as they are searched
-
-=back
-
-Returns the full path of the first occurrence to the file.
-Package names (eg 'A::B') are automatically converted to directory
-names in the selected directory. (eg on unix 'A::B' is converted to
-'A/B'). Additionally, '.pm', '.pl' and '.pod' are appended to the
-search automatically if required.
-
-A subdirectory F<pod/> is also checked if it exists in any of the given
-search directories. This ensures that e.g. L<perlfunc|perlfunc> is
-found.
-
-It is assumed that if a module name is supplied, that that name
-matches the file name. Pods are not opened to check for the 'NAME'
-entry.
-
-A check is made to make sure that the file that is found does
-contain some pod documentation.
-
-=cut
-
-sub pod_where {
-
- # default options
- my %options = (
- '-inc' => 0,
- '-verbose' => 0,
- '-dirs' => [ File::Spec->curdir ],
- );
-
- # Check for an options hash as first argument
- if (defined $_[0] && ref($_[0]) eq 'HASH') {
- my $opt = shift;
-
- # Merge default options with supplied options
- %options = (%options, %$opt);
- }
-
- # Check usage
- carp 'Usage: pod_where({options}, $pod)' unless (scalar(@_));
-
- # Read argument
- my $pod = shift;
-
- # Split on :: and then join the name together using File::Spec
- my @parts = split (/::/, $pod);
-
- # Get full directory list
- my @search_dirs = @{ $options{'-dirs'} };
-
- if ($options{'-inc'}) {
-
- require Config;
-
- # Add @INC
- if ($^O eq 'MacOS' && $options{'-inc'}) {
- # tolerate '.', './some_dir' and '(../)+some_dir' on Mac OS
- my @new_INC = @INC;
- for (@new_INC) {
- if ( $_ eq '.' ) {
- $_ = ':';
- } elsif ( $_ =~ s{^((?:\.\./)+)}{':' x (length($1)/3)}e ) {
- $_ = ':'. $_;
- } else {
- $_ =~ s{^\./}{:};
- }
- }
- push (@search_dirs, @new_INC);
- } elsif ($options{'-inc'}) {
- push (@search_dirs, @INC);
- }
-
- # Add location of pod documentation for perl man pages (eg perlfunc)
- # This is a pod directory in the private install tree
- #my $perlpoddir = File::Spec->catdir($Config::Config{'installprivlib'},
- # 'pod');
- #push (@search_dirs, $perlpoddir)
- # if -d $perlpoddir;
-
- # Add location of binaries such as pod2text
- push (@search_dirs, $Config::Config{'scriptdir'})
- if -d $Config::Config{'scriptdir'};
- }
-
- warn 'Search path is: '.join(' ', @search_dirs)."\n"
- if $options{'-verbose'};
-
- # Loop over directories
- Dir: foreach my $dir ( @search_dirs ) {
-
- # Don't bother if can't find the directory
- if (-d $dir) {
- warn "Looking in directory $dir\n"
- if $options{'-verbose'};
-
- # Now concatenate this directory with the pod we are searching for
- my $fullname = File::Spec->catfile($dir, @parts);
- warn "Filename is now $fullname\n"
- if $options{'-verbose'};
-
- # Loop over possible extensions
- foreach my $ext ('', '.pod', '.pm', '.pl') {
- my $fullext = $fullname . $ext;
- if (-f $fullext &&
- contains_pod($fullext, $options{'-verbose'}) ) {
- warn "FOUND: $fullext\n" if $options{'-verbose'};
- return $fullext;
- }
- }
- } else {
- warn "Directory $dir does not exist\n"
- if $options{'-verbose'};
- next Dir;
- }
- # for some strange reason the path on MacOS/darwin/cygwin is
- # 'pods' not 'pod'
- # this could be the case also for other systems that
- # have a case-tolerant file system, but File::Spec
- # does not recognize 'darwin' yet. And cygwin also has "pods",
- # but is not case tolerant. Oh well...
- if((File::Spec->case_tolerant || $^O =~ /macos|darwin|cygwin/i)
- && -d File::Spec->catdir($dir,'pods')) {
- $dir = File::Spec->catdir($dir,'pods');
- redo Dir;
- }
- if(-d File::Spec->catdir($dir,'pod')) {
- $dir = File::Spec->catdir($dir,'pod');
- redo Dir;
- }
- }
- # No match;
- return;
-}
-
-=head2 C<contains_pod( $file , $verbose )>
-
-Returns true if the supplied filename (not POD module) contains some pod
-information.
-
-=cut
-
-sub contains_pod {
- my $file = shift;
- my $verbose = 0;
- $verbose = shift if @_;
-
- # check for one line of POD
- my $podfh;
- if ($] < 5.006) {
- $podfh = gensym();
- }
-
- unless(open($podfh,"<$file")) {
- warn "Error: $file is unreadable: $!\n";
- return;
- }
-
- local $/ = undef;
- my $pod = <$podfh>;
- close($podfh) || die "Error closing $file: $!\n";
- unless($pod =~ /^=(head\d|pod|over|item|cut)\b/m) {
- warn "No POD in $file, skipping.\n"
- if($verbose);
- return 0;
- }
-
- return 1;
-}
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Marek Rouchal E<lt>marekr at cpan.orgE<gt>,
-heavily borrowing code from Nick Ing-Simmons' PodToHtml.
-
-Tim Jenness E<lt>t.jenness at jach.hawaii.eduE<gt> provided
-C<pod_where> and C<contains_pod>.
-
-=head1 SEE ALSO
-
-L<Pod::Parser>, L<Pod::Checker>, L<perldoc>
-
-=cut
-
-1;
-
Deleted: vendor/perl/dist/lib/Pod/Functions.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Functions.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Functions.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,376 +0,0 @@
-package Pod::Functions;
-use strict;
-
-=head1 NAME
-
-Pod::Functions - Group Perl's functions a la perlfunc.pod
-
-=head1 SYNOPSIS
-
- use Pod::Functions;
-
- my @misc_ops = @{ $Kinds{ 'Misc' } };
- my $misc_dsc = $Type_Description{ 'Misc' };
-
-or
-
- perl /path/to/lib/Pod/Functions.pm
-
-This will print a grouped list of Perl's functions, like the
-L<perlfunc/"Perl Functions by Category"> section.
-
-=head1 DESCRIPTION
-
-It exports the following variables:
-
-=over 4
-
-=item %Kinds
-
-This holds a hash-of-lists. Each list contains the functions in the category
-the key denotes.
-
-=item %Type
-
-In this hash each key represents a function and the value is the category.
-The category can be a comma separated list.
-
-=item %Flavor
-
-In this hash each key represents a function and the value is a short
-description of that function.
-
-=item %Type_Description
-
-In this hash each key represents a category of functions and the value is
-a short description of that category.
-
-=item @Type_Order
-
-This list of categories is used to produce the same order as the
-L<perlfunc/"Perl Functions by Category"> section.
-
-=back
-
-=head1 CHANGES
-
-1.02 20020813 <abe at ztreet.demon.nl>
- de-typo in the SYNOPSIS section (thanks Mike Castle for noticing)
-
-1.01 20011229 <abe at ztreet.demon.nl>
- fixed some bugs that slipped in after 5.6.1
- added the pod
- finished making it strict safe
-
-1.00 ??
- first numbered version
-
-=cut
-
-our $VERSION = '1.04';
-
-require Exporter;
-
-our @ISA = qw(Exporter);
-our @EXPORT = qw(%Kinds %Type %Flavor %Type_Description @Type_Order);
-
-our(%Kinds, %Type, %Flavor);
-
-our %Type_Description = (
- 'ARRAY' => 'Functions for real @ARRAYs',
- 'Binary' => 'Functions for fixed length data or records',
- 'File' => 'Functions for filehandles, files, or directories',
- 'Flow' => 'Keywords related to control flow of your perl program',
- 'HASH' => 'Functions for real %HASHes',
- 'I/O' => 'Input and output functions',
- 'LIST' => 'Functions for list data',
- 'Math' => 'Numeric functions',
- 'Misc' => 'Miscellaneous functions',
- 'Modules' => 'Keywords related to perl modules',
- 'Network' => 'Fetching network info',
- 'Objects' => 'Keywords related to classes and object-orientedness',
- 'Process' => 'Functions for processes and process groups',
- 'Regexp' => 'Regular expressions and pattern matching',
- 'Socket' => 'Low-level socket functions',
- 'String' => 'Functions for SCALARs or strings',
- 'SysV' => 'System V interprocess communication functions',
- 'Time' => 'Time-related functions',
- 'User' => 'Fetching user and group info',
- 'Namespace' => 'Keywords altering or affecting scoping of identifiers',
-);
-
-our @Type_Order = qw{
- String
- Regexp
- Math
- ARRAY
- LIST
- HASH
- I/O
- Binary
- File
- Flow
- Namespace
- Misc
- Process
- Modules
- Objects
- Socket
- SysV
- User
- Network
- Time
-};
-
-while (<DATA>) {
- chomp;
- s/#.*//;
- next unless $_;
- my($name, $type, $text) = split " ", $_, 3;
- $Type{$name} = $type;
- $Flavor{$name} = $text;
- for my $t ( split /[,\s]+/, $type ) {
- push @{$Kinds{$t}}, $name;
- }
-}
-
-close DATA;
-
-my( $typedesc, $list );
-unless (caller) {
- foreach my $type ( @Type_Order ) {
- $list = join(", ", sort @{$Kinds{$type}});
- $typedesc = $Type_Description{$type} . ":";
- write;
- }
-}
-
-format =
-
-^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- $typedesc
-~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- $typedesc
- ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- $list
-.
-
-1;
-
-__DATA__
--X File a file test (-r, -x, etc)
-abs Math absolute value function
-accept Socket accept an incoming socket connect
-alarm Process schedule a SIGALRM
-atan2 Math arctangent of Y/X in the range -PI to PI
-bind Socket binds an address to a socket
-binmode I/O prepare binary files for I/O
-bless Objects create an object
-caller Flow,Namespace get context of the current subroutine call
-chdir File change your current working directory
-chmod File changes the permissions on a list of files
-chomp String remove a trailing record separator from a string
-chop String remove the last character from a string
-chown File change the ownership on a list of files
-chr String get character this number represents
-chroot File make directory new root for path lookups
-close I/O close file (or pipe or socket) handle
-closedir I/O close directory handle
-connect Socket connect to a remote socket
-continue Flow optional trailing block in a while or foreach
-cos Math cosine function
-crypt String one-way passwd-style encryption
-dbmclose Objects,I/O breaks binding on a tied dbm file
-dbmopen Objects,I/O create binding on a tied dbm file
-defined Misc test whether a value, variable, or function is defined
-delete HASH deletes a value from a hash
-die I/O,Flow raise an exception or bail out
-do Flow,Modules turn a BLOCK into a TERM
-dump Misc,Flow create an immediate core dump
-each HASH retrieve the next key/value pair from a hash
-endgrent User be done using group file
-endhostent User be done using hosts file
-endnetent User be done using networks file
-endprotoent Network be done using protocols file
-endpwent User be done using passwd file
-endservent Network be done using services file
-eof I/O test a filehandle for its end
-eval Flow,Misc catch exceptions or compile and run code
-exec Process abandon this program to run another
-exists HASH test whether a hash key is present
-exit Flow terminate this program
-exp Math raise I<e> to a power
-fcntl File file control system call
-fileno I/O return file descriptor from filehandle
-flock I/O lock an entire file with an advisory lock
-fork Process create a new process just like this one
-format I/O declare a picture format with use by the write() function
-formline Misc internal function used for formats
-getc I/O get the next character from the filehandle
-getgrent User get next group record
-getgrgid User get group record given group user ID
-getgrnam User get group record given group name
-gethostbyaddr Network get host record given its address
-gethostbyname Network get host record given name
-gethostent Network get next hosts record
-getlogin User return who logged in at this tty
-getnetbyaddr Network get network record given its address
-getnetbyname Network get networks record given name
-getnetent Network get next networks record
-getpeername Socket find the other end of a socket connection
-getpgrp Process get process group
-getppid Process get parent process ID
-getpriority Process get current nice value
-getprotobyname Network get protocol record given name
-getprotobynumber Network get protocol record numeric protocol
-getprotoent Network get next protocols record
-getpwent User get next passwd record
-getpwnam User get passwd record given user login name
-getpwuid User get passwd record given user ID
-getservbyname Network get services record given its name
-getservbyport Network get services record given numeric port
-getservent Network get next services record
-getsockname Socket retrieve the sockaddr for a given socket
-getsockopt Socket get socket options on a given socket
-glob File expand filenames using wildcards
-gmtime Time convert UNIX time into record or string using Greenwich time
-goto Flow create spaghetti code
-grep LIST locate elements in a list test true against a given criterion
-hex Math,String convert a string to a hexadecimal number
-import Modules,Namespace patch a module's namespace into your own
-index String find a substring within a string
-int Math get the integer portion of a number
-ioctl File system-dependent device control system call
-join LIST join a list into a string using a separator
-keys HASH retrieve list of indices from a hash
-kill Process send a signal to a process or process group
-last Flow exit a block prematurely
-lc String return lower-case version of a string
-lcfirst String return a string with just the next letter in lower case
-length String return the number of bytes in a string
-link File create a hard link in the filesystem
-listen Socket register your socket as a server
-local Misc,Namespace create a temporary value for a global variable (dynamic scoping)
-localtime Time convert UNIX time into record or string using local time
-lock Threads get a thread lock on a variable, subroutine, or method
-log Math retrieve the natural logarithm for a number
-lstat File stat a symbolic link
-m// Regexp match a string with a regular expression pattern
-map LIST apply a change to a list to get back a new list with the changes
-mkdir File create a directory
-msgctl SysV SysV IPC message control operations
-msgget SysV get SysV IPC message queue
-msgrcv SysV receive a SysV IPC message from a message queue
-msgsnd SysV send a SysV IPC message to a message queue
-my Misc,Namespace declare and assign a local variable (lexical scoping)
-next Flow iterate a block prematurely
-no Modules unimport some module symbols or semantics at compile time
-package Modules,Objects,Namespace declare a separate global namespace
-prototype Flow,Misc get the prototype (if any) of a subroutine
-oct String,Math convert a string to an octal number
-open File open a file, pipe, or descriptor
-opendir File open a directory
-ord String find a character's numeric representation
-our Misc,Namespace declare and assign a package variable (lexical scoping)
-pack Binary,String convert a list into a binary representation
-pipe Process open a pair of connected filehandles
-pop ARRAY remove the last element from an array and return it
-pos Regexp find or set the offset for the last/next m//g search
-print I/O output a list to a filehandle
-printf I/O output a formatted list to a filehandle
-push ARRAY append one or more elements to an array
-q/STRING/ String singly quote a string
-qq/STRING/ String doubly quote a string
-quotemeta Regexp quote regular expression magic characters
-qw/STRING/ LIST quote a list of words
-qx/STRING/ Process backquote quote a string
-qr/STRING/ Regexp Compile pattern
-rand Math retrieve the next pseudorandom number
-read I/O,Binary fixed-length buffered input from a filehandle
-readdir I/O get a directory from a directory handle
-readline I/O fetch a record from a file
-readlink File determine where a symbolic link is pointing
-readpipe Process execute a system command and collect standard output
-recv Socket receive a message over a Socket
-redo Flow start this loop iteration over again
-ref Objects find out the type of thing being referenced
-rename File change a filename
-require Modules load in external functions from a library at runtime
-reset Misc clear all variables of a given name
-return Flow get out of a function early
-reverse String,LIST flip a string or a list
-rewinddir I/O reset directory handle
-rindex String right-to-left substring search
-rmdir File remove a directory
-s/// Regexp replace a pattern with a string
-scalar Misc force a scalar context
-seek I/O reposition file pointer for random-access I/O
-seekdir I/O reposition directory pointer
-select I/O reset default output or do I/O multiplexing
-semctl SysV SysV semaphore control operations
-semget SysV get set of SysV semaphores
-semop SysV SysV semaphore operations
-send Socket send a message over a socket
-setgrent User prepare group file for use
-sethostent Network prepare hosts file for use
-setnetent Network prepare networks file for use
-setpgrp Process set the process group of a process
-setpriority Process set a process's nice value
-setprotoent Network prepare protocols file for use
-setpwent User prepare passwd file for use
-setservent Network prepare services file for use
-setsockopt Socket set some socket options
-shift ARRAY remove the first element of an array, and return it
-shmctl SysV SysV shared memory operations
-shmget SysV get SysV shared memory segment identifier
-shmread SysV read SysV shared memory
-shmwrite SysV write SysV shared memory
-shutdown Socket close down just half of a socket connection
-sin Math return the sine of a number
-sleep Process block for some number of seconds
-socket Socket create a socket
-socketpair Socket create a pair of sockets
-sort LIST sort a list of values
-splice ARRAY add or remove elements anywhere in an array
-split Regexp split up a string using a regexp delimiter
-sprintf String formatted print into a string
-sqrt Math square root function
-srand Math seed the random number generator
-stat File get a file's status information
-study Regexp optimize input data for repeated searches
-sub Flow declare a subroutine, possibly anonymously
-substr String get or alter a portion of a string
-symlink File create a symbolic link to a file
-syscall I/O,Binary execute an arbitrary system call
-sysopen File open a file, pipe, or descriptor
-sysread I/O,Binary fixed-length unbuffered input from a filehandle
-sysseek I/O,Binary position I/O pointer on handle used with sysread and syswrite
-system Process run a separate program
-syswrite I/O,Binary fixed-length unbuffered output to a filehandle
-tell I/O get current seekpointer on a filehandle
-telldir I/O get current seekpointer on a directory handle
-tie Objects bind a variable to an object class
-tied Objects get a reference to the object underlying a tied variable
-time Time return number of seconds since 1970
-times Process,Time return elapsed time for self and child processes
-tr/// String transliterate a string
-truncate I/O shorten a file
-uc String return upper-case version of a string
-ucfirst String return a string with just the next letter in upper case
-umask File set file creation mode mask
-undef Misc remove a variable or function definition
-unlink File remove one link to a file
-unpack Binary,LIST convert binary structure into normal perl variables
-unshift ARRAY prepend more elements to the beginning of a list
-untie Objects break a tie binding to a variable
-use Modules,Namespace load a module and import its namespace
-use Objects load in a module at compile time
-utime File set a file's last access and modify times
-values HASH return a list of the values in a hash
-vec Binary test or set particular bits in a string
-wait Process wait for any child process to die
-waitpid Process wait for a particular child process to die
-wantarray Misc,Flow get void vs scalar vs list context of current subroutine call
-warn I/O print debugging info
-write I/O print a picture record
-y/// String transliterate a string
Deleted: vendor/perl/dist/lib/Pod/Html.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Html.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Html.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,2233 +0,0 @@
-package Pod::Html;
-use strict;
-require Exporter;
-
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = 1.09;
- at ISA = qw(Exporter);
- at EXPORT = qw(pod2html htmlify);
- at EXPORT_OK = qw(anchorify);
-
-use Carp;
-use Config;
-use Cwd;
-use File::Spec;
-use File::Spec::Unix;
-use Getopt::Long;
-
-use locale; # make \w work right in non-ASCII lands
-
-=head1 NAME
-
-Pod::Html - module to convert pod files to HTML
-
-=head1 SYNOPSIS
-
- use Pod::Html;
- pod2html([options]);
-
-=head1 DESCRIPTION
-
-Converts files from pod format (see L<perlpod>) to HTML format. It
-can automatically generate indexes and cross-references, and it keeps
-a cache of things it knows how to cross-reference.
-
-=head1 FUNCTIONS
-
-=head2 pod2html
-
- pod2html("pod2html",
- "--podpath=lib:ext:pod:vms",
- "--podroot=/usr/src/perl",
- "--htmlroot=/perl/nmanual",
- "--libpods=perlfunc:perlguts:perlvar:perlrun:perlop",
- "--recurse",
- "--infile=foo.pod",
- "--outfile=/perl/nmanual/foo.html");
-
-pod2html takes the following arguments:
-
-=over 4
-
-=item backlink
-
- --backlink="Back to Top"
-
-Adds "Back to Top" links in front of every C<head1> heading (except for
-the first). By default, no backlinks are generated.
-
-=item cachedir
-
- --cachedir=name
-
-Creates the item and directory caches in the given directory.
-
-=item css
-
- --css=stylesheet
-
-Specify the URL of a cascading style sheet. Also disables all HTML/CSS
-C<style> attributes that are output by default (to avoid conflicts).
-
-=item flush
-
- --flush
-
-Flushes the item and directory caches.
-
-=item header
-
- --header
- --noheader
-
-Creates header and footer blocks containing the text of the C<NAME>
-section. By default, no headers are generated.
-
-=item help
-
- --help
-
-Displays the usage message.
-
-=item hiddendirs
-
- --hiddendirs
- --nohiddendirs
-
-Include hidden directories in the search for POD's in podpath if recurse
-is set.
-The default is not to traverse any directory whose name begins with C<.>.
-See L</"podpath"> and L</"recurse">.
-
-[This option is for backward compatibility only.
-It's hard to imagine that one would usefully create a module with a
-name component beginning with C<.>.]
-
-=item htmldir
-
- --htmldir=name
-
-Sets the directory in which the resulting HTML file is placed. This
-is used to generate relative links to other files. Not passing this
-causes all links to be absolute, since this is the value that tells
-Pod::Html the root of the documentation tree.
-
-=item htmlroot
-
- --htmlroot=name
-
-Sets the base URL for the HTML files. When cross-references are made,
-the HTML root is prepended to the URL.
-
-=item index
-
- --index
- --noindex
-
-Generate an index at the top of the HTML file. This is the default
-behaviour.
-
-=item infile
-
- --infile=name
-
-Specify the pod file to convert. Input is taken from STDIN if no
-infile is specified.
-
-=item libpods
-
- --libpods=name:...:name
-
-List of page names (eg, "perlfunc") which contain linkable C<=item>s.
-
-=item netscape
-
- --netscape
- --nonetscape
-
-B<Deprecated>, has no effect. For backwards compatibility only.
-
-=item outfile
-
- --outfile=name
-
-Specify the HTML file to create. Output goes to STDOUT if no outfile
-is specified.
-
-=item podpath
-
- --podpath=name:...:name
-
-Specify which subdirectories of the podroot contain pod files whose
-HTML converted forms can be linked to in cross references.
-
-=item podroot
-
- --podroot=name
-
-Specify the base directory for finding library pods.
-
-=item quiet
-
- --quiet
- --noquiet
-
-Don't display I<mostly harmless> warning messages. These messages
-will be displayed by default. But this is not the same as C<verbose>
-mode.
-
-=item recurse
-
- --recurse
- --norecurse
-
-Recurse into subdirectories specified in podpath (default behaviour).
-
-=item title
-
- --title=title
-
-Specify the title of the resulting HTML file.
-
-=item verbose
-
- --verbose
- --noverbose
-
-Display progress messages. By default, they won't be displayed.
-
-=back
-
-=head2 htmlify
-
- htmlify($heading);
-
-Converts a pod section specification to a suitable section specification
-for HTML. Note that we keep spaces and special characters except
-C<", ?> (Netscape problem) and the hyphen (writer's problem...).
-
-=head2 anchorify
-
- anchorify(@heading);
-
-Similar to C<htmlify()>, but turns non-alphanumerics into underscores. Note
-that C<anchorify()> is not exported by default.
-
-=head1 ENVIRONMENT
-
-Uses C<$Config{pod2html}> to setup default options.
-
-=head1 AUTHOR
-
-Tom Christiansen, E<lt>tchrist at perl.comE<gt>.
-
-=head1 SEE ALSO
-
-L<perlpod>
-
-=head1 COPYRIGHT
-
-This program is distributed under the Artistic License.
-
-=cut
-
-my($Cachedir);
-my($Dircache, $Itemcache);
-my @Begin_Stack;
-my @Libpods;
-my($Htmlroot, $Htmldir, $Htmlfile, $Htmlfileurl);
-my($Podfile, @Podpath, $Podroot);
-my $Css;
-
-my $Recurse;
-my $Quiet;
-my $HiddenDirs;
-my $Verbose;
-my $Doindex;
-
-my $Backlink;
-my($Listlevel, @Listtype);
-my $ListNewTerm;
-use vars qw($Ignore); # need to localize it later.
-
-my(%Items_Named, @Items_Seen);
-my($Title, $Header);
-
-my $Top;
-my $Paragraph;
-
-my %Sections;
-
-# Caches
-my %Pages = (); # associative array used to find the location
- # of pages referenced by L<> links.
-my %Items = (); # associative array used to find the location
- # of =item directives referenced by C<> links
-
-my %Local_Items;
-my $Is83;
-
-my $Curdir = File::Spec->curdir;
-
-init_globals();
-
-sub init_globals {
- $Cachedir = "."; # The directory to which item and directory
- # caches will be written.
-
- $Dircache = "pod2htmd.tmp";
- $Itemcache = "pod2htmi.tmp";
-
- @Begin_Stack = (); # begin/end stack
-
- @Libpods = (); # files to search for links from C<> directives
- $Htmlroot = "/"; # http-server base directory from which all
- # relative paths in $podpath stem.
- $Htmldir = ""; # The directory to which the html pages
- # will (eventually) be written.
- $Htmlfile = ""; # write to stdout by default
- $Htmlfileurl = ""; # The url that other files would use to
- # refer to this file. This is only used
- # to make relative urls that point to
- # other files.
-
- $Podfile = ""; # read from stdin by default
- @Podpath = (); # list of directories containing library pods.
- $Podroot = $Curdir; # filesystem base directory from which all
- # relative paths in $podpath stem.
- $Css = ''; # Cascading style sheet
- $Recurse = 1; # recurse on subdirectories in $podpath.
- $Quiet = 0; # not quiet by default
- $Verbose = 0; # not verbose by default
- $Doindex = 1; # non-zero if we should generate an index
- $Backlink = ''; # text for "back to top" links
- $Listlevel = 0; # current list depth
- @Listtype = (); # list types for open lists
- $ListNewTerm = 0; # indicates new term in definition list; used
- # to correctly open/close <dd> tags
- $Ignore = 1; # whether or not to format text. we don't
- # format text until we hit our first pod
- # directive.
-
- @Items_Seen = (); # for multiples of the same item in perlfunc
- %Items_Named = ();
- $Header = 0; # produce block header/footer
- $Title = ''; # title to give the pod(s)
- $Top = 1; # true if we are at the top of the doc. used
- # to prevent the first <hr /> directive.
- $Paragraph = ''; # which paragraph we're processing (used
- # for error messages)
- %Sections = (); # sections within this page
-
- %Local_Items = ();
- $Is83 = $^O eq 'dos'; # Is it an 8.3 filesystem?
-}
-
-#
-# clean_data: global clean-up of pod data
-#
-sub clean_data($){
- my( $dataref ) = @_;
- for my $i ( 0..$#{$dataref} ) {
- ${$dataref}[$i] =~ s/\s+\Z//;
-
- # have a look for all-space lines
- if( ${$dataref}[$i] =~ /^\s+$/m and $dataref->[$i] !~ /^\s/ ){
- my @chunks = split( /^\s+$/m, ${$dataref}[$i] );
- splice( @$dataref, $i, 1, @chunks );
- }
- }
-}
-
-
-sub pod2html {
- local(@ARGV) = @_;
- local($/);
- local $_;
-
- init_globals();
-
- $Is83 = 0 if (defined (&Dos::UseLFN) && Dos::UseLFN());
-
- # cache of %Pages and %Items from last time we ran pod2html
-
- #undef $opt_help if defined $opt_help;
-
- # parse the command-line parameters
- parse_command_line();
-
- # escape the backlink argument (same goes for title but is done later...)
- $Backlink = html_escape($Backlink) if defined $Backlink;
-
- # set some variables to their default values if necessary
- local *POD;
- unless (@ARGV && $ARGV[0]) {
- $Podfile = "-" unless $Podfile; # stdin
- open(POD, "<$Podfile")
- || die "$0: cannot open $Podfile file for input: $!\n";
- } else {
- $Podfile = $ARGV[0]; # XXX: might be more filenames
- *POD = *ARGV;
- }
- $Htmlfile = "-" unless $Htmlfile; # stdout
- $Htmlroot = "" if $Htmlroot eq "/"; # so we don't get a //
- $Htmldir =~ s#/\z## ; # so we don't get a //
- if ( $Htmlroot eq ''
- && defined( $Htmldir )
- && $Htmldir ne ''
- && substr( $Htmlfile, 0, length( $Htmldir ) ) eq $Htmldir
- )
- {
- # Set the 'base' url for this file, so that we can use it
- # as the location from which to calculate relative links
- # to other files. If this is '', then absolute links will
- # be used throughout.
- $Htmlfileurl= "$Htmldir/" . substr( $Htmlfile, length( $Htmldir ) + 1);
- }
-
- # read the pod a paragraph at a time
- warn "Scanning for sections in input file(s)\n" if $Verbose;
- $/ = "";
- my @poddata = <POD>;
- close(POD);
-
- # be eol agnostic
- for (@poddata) {
- if (/\r/) {
- if (/\r\n/) {
- @poddata = map { s/\r\n/\n/g;
- /\n\n/ ?
- map { "$_\n\n" } split /\n\n/ :
- $_ } @poddata;
- } else {
- @poddata = map { s/\r/\n/g;
- /\n\n/ ?
- map { "$_\n\n" } split /\n\n/ :
- $_ } @poddata;
- }
- last;
- }
- }
-
- clean_data( \@poddata );
-
- # scan the pod for =head[1-6] directives and build an index
- my $index = scan_headings(\%Sections, @poddata);
-
- unless($index) {
- warn "No headings in $Podfile\n" if $Verbose;
- }
-
- # open the output file
- open(HTML, ">$Htmlfile")
- || die "$0: cannot open $Htmlfile file for output: $!\n";
-
- # put a title in the HTML file if one wasn't specified
- if ($Title eq '') {
- TITLE_SEARCH: {
- for (my $i = 0; $i < @poddata; $i++) {
- if ($poddata[$i] =~ /^=head1\s*NAME\b/m) {
- for my $para ( @poddata[$i, $i+1] ) {
- last TITLE_SEARCH
- if ($Title) = $para =~ /(\S+\s+-+.*\S)/s;
- }
- }
-
- }
- }
- }
- if (!$Title and $Podfile =~ /\.pod\z/) {
- # probably a split pod so take first =head[12] as title
- for (my $i = 0; $i < @poddata; $i++) {
- last if ($Title) = $poddata[$i] =~ /^=head[12]\s*(.*)/;
- }
- warn "adopted '$Title' as title for $Podfile\n"
- if $Verbose and $Title;
- }
- if ($Title) {
- $Title =~ s/\s*\(.*\)//;
- } else {
- warn "$0: no title for $Podfile.\n" unless $Quiet;
- $Podfile =~ /^(.*)(\.[^.\/]+)?\z/s;
- $Title = ($Podfile eq "-" ? 'No Title' : $1);
- warn "using $Title" if $Verbose;
- }
- $Title = html_escape($Title);
-
- my $csslink = '';
- my $bodystyle = ' style="background-color: white"';
- my $tdstyle = ' style="background-color: #cccccc"';
-
- if ($Css) {
- $csslink = qq(\n<link rel="stylesheet" href="$Css" type="text/css" />);
- $csslink =~ s,\\,/,g;
- $csslink =~ s,(/.):,$1|,;
- $bodystyle = '';
- $tdstyle = '';
- }
-
- my $block = $Header ? <<END_OF_BLOCK : '';
-<table border="0" width="100%" cellspacing="0" cellpadding="3">
-<tr><td class="block"$tdstyle valign="middle">
-<big><strong><span class="block"> $Title</span></strong></big>
-</td></tr>
-</table>
-END_OF_BLOCK
-
- print HTML <<END_OF_HEAD;
-<?xml version="1.0" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>$Title</title>$csslink
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rev="made" href="mailto:$Config{perladmin}" />
-</head>
-
-<body$bodystyle>
-$block
-END_OF_HEAD
-
- # load/reload/validate/cache %Pages and %Items
- get_cache($Dircache, $Itemcache, \@Podpath, $Podroot, $Recurse);
-
- # scan the pod for =item directives
- scan_items( \%Local_Items, "", @poddata);
-
- # put an index at the top of the file. note, if $Doindex is 0 we
- # still generate an index, but surround it with an html comment.
- # that way some other program can extract it if desired.
- $index =~ s/--+/-/g;
-
- my $hr = ($Doindex and $index) ? qq(<hr name="index" />) : "";
-
- unless ($Doindex)
- {
- $index = qq(<!--\n$index\n-->\n);
- }
-
- print HTML << "END_OF_INDEX";
-
-<!-- INDEX BEGIN -->
-<div name="index">
-<p><a name=\"__index__\"></a></p>
-$index
-$hr
-</div>
-<!-- INDEX END -->
-
-END_OF_INDEX
-
- # now convert this file
- my $after_item; # set to true after an =item
- warn "Converting input file $Podfile\n" if $Verbose;
- foreach my $i (0..$#poddata){
- $_ = $poddata[$i];
- $Paragraph = $i+1;
- if (/^(=.*)/s) { # is it a pod directive?
- $Ignore = 0;
- $after_item = 0;
- $_ = $1;
- if (/^=begin\s+(\S+)\s*(.*)/si) {# =begin
- process_begin($1, $2);
- } elsif (/^=end\s+(\S+)\s*(.*)/si) {# =end
- process_end($1, $2);
- } elsif (/^=cut/) { # =cut
- process_cut();
- } elsif (/^=pod/) { # =pod
- process_pod();
- } else {
- next if @Begin_Stack && $Begin_Stack[-1] ne 'html';
-
- if (/^=(head[1-6])\s+(.*\S)/s) { # =head[1-6] heading
- process_head( $1, $2, $Doindex && $index );
- } elsif (/^=item\s*(.*\S)?/sm) { # =item text
- process_item( $1 );
- $after_item = 1;
- } elsif (/^=over\s*(.*)/) { # =over N
- process_over();
- } elsif (/^=back/) { # =back
- process_back();
- } elsif (/^=for\s+(\S+)\s*(.*)/si) {# =for
- process_for($1,$2);
- } else {
- /^=(\S*)\s*/;
- warn "$0: $Podfile: unknown pod directive '$1' in "
- . "paragraph $Paragraph. ignoring.\n" unless $Quiet;
- }
- }
- $Top = 0;
- }
- else {
- next if $Ignore;
- next if @Begin_Stack && $Begin_Stack[-1] ne 'html';
- print HTML and next if @Begin_Stack && $Begin_Stack[-1] eq 'html';
- my $text = $_;
-
- # Open tag for definition list as we have something to put in it
- if( $ListNewTerm ){
- print HTML "<dd>\n";
- $ListNewTerm = 0;
- }
-
- if( $text =~ /\A\s+/ ){
- process_pre( \$text );
- print HTML "<pre>\n$text</pre>\n";
-
- } else {
- process_text( \$text );
-
- # experimental: check for a paragraph where all lines
- # have some ...\t...\t...\n pattern
- if( $text =~ /\t/ ){
- my @lines = split( "\n", $text );
- if( @lines > 1 ){
- my $all = 2;
- foreach my $line ( @lines ){
- if( $line =~ /\S/ && $line !~ /\t/ ){
- $all--;
- last if $all == 0;
- }
- }
- if( $all > 0 ){
- $text =~ s/\t+/<td>/g;
- $text =~ s/^/<tr><td>/gm;
- $text = '<table cellspacing="0" cellpadding="0">' .
- $text . '</table>';
- }
- }
- }
- ## end of experimental
-
- print HTML "<p>$text</p>\n";
- }
- $after_item = 0;
- }
- }
-
- # finish off any pending directives
- finish_list();
-
- # link to page index
- print HTML "<p><a href=\"#__index__\"><small>$Backlink</small></a></p>\n"
- if $Doindex and $index and $Backlink;
-
- print HTML <<END_OF_TAIL;
-$block
-</body>
-
-</html>
-END_OF_TAIL
-
- # close the html file
- close(HTML);
-
- warn "Finished\n" if $Verbose;
-}
-
-##############################################################################
-
-sub usage {
- my $podfile = shift;
- warn "$0: $podfile: @_\n" if @_;
- die <<END_OF_USAGE;
-Usage: $0 --help --htmlroot=<name> --infile=<name> --outfile=<name>
- --podpath=<name>:...:<name> --podroot=<name>
- --libpods=<name>:...:<name> --recurse --verbose --index
- --netscape --norecurse --noindex --cachedir=<name>
-
- --backlink - set text for "back to top" links (default: none).
- --cachedir - directory for the item and directory cache files.
- --css - stylesheet URL
- --flush - flushes the item and directory caches.
- --[no]header - produce block header/footer (default is no headers).
- --help - prints this message.
- --hiddendirs - search hidden directories in podpath
- --htmldir - directory for resulting HTML files.
- --htmlroot - http-server base directory from which all relative paths
- in podpath stem (default is /).
- --[no]index - generate an index at the top of the resulting html
- (default behaviour).
- --infile - filename for the pod to convert (input taken from stdin
- by default).
- --libpods - colon-separated list of pages to search for =item pod
- directives in as targets of C<> and implicit links (empty
- by default). note, these are not filenames, but rather
- page names like those that appear in L<> links.
- --outfile - filename for the resulting html file (output sent to
- stdout by default).
- --podpath - colon-separated list of directories containing library
- pods (empty by default).
- --podroot - filesystem base directory from which all relative paths
- in podpath stem (default is .).
- --[no]quiet - suppress some benign warning messages (default is off).
- --[no]recurse - recurse on those subdirectories listed in podpath
- (default behaviour).
- --title - title that will appear in resulting html file.
- --[no]verbose - self-explanatory (off by default).
- --[no]netscape - deprecated, has no effect. for backwards compatibility only.
-
-END_OF_USAGE
-
-}
-
-sub parse_command_line {
- my ($opt_backlink,$opt_cachedir,$opt_css,$opt_flush,$opt_header,$opt_help,
- $opt_htmldir,$opt_htmlroot,$opt_index,$opt_infile,$opt_libpods,
- $opt_netscape,$opt_outfile,$opt_podpath,$opt_podroot,$opt_quiet,
- $opt_recurse,$opt_title,$opt_verbose,$opt_hiddendirs);
-
- unshift @ARGV, split ' ', $Config{pod2html} if $Config{pod2html};
- my $result = GetOptions(
- 'backlink=s' => \$opt_backlink,
- 'cachedir=s' => \$opt_cachedir,
- 'css=s' => \$opt_css,
- 'flush' => \$opt_flush,
- 'header!' => \$opt_header,
- 'help' => \$opt_help,
- 'hiddendirs!'=> \$opt_hiddendirs,
- 'htmldir=s' => \$opt_htmldir,
- 'htmlroot=s' => \$opt_htmlroot,
- 'index!' => \$opt_index,
- 'infile=s' => \$opt_infile,
- 'libpods=s' => \$opt_libpods,
- 'netscape!' => \$opt_netscape,
- 'outfile=s' => \$opt_outfile,
- 'podpath=s' => \$opt_podpath,
- 'podroot=s' => \$opt_podroot,
- 'quiet!' => \$opt_quiet,
- 'recurse!' => \$opt_recurse,
- 'title=s' => \$opt_title,
- 'verbose!' => \$opt_verbose,
- );
- usage("-", "invalid parameters") if not $result;
-
- usage("-") if defined $opt_help; # see if the user asked for help
- $opt_help = ""; # just to make -w shut-up.
-
- @Podpath = split(":", $opt_podpath) if defined $opt_podpath;
- @Libpods = split(":", $opt_libpods) if defined $opt_libpods;
-
- $Backlink = $opt_backlink if defined $opt_backlink;
- $Cachedir = $opt_cachedir if defined $opt_cachedir;
- $Css = $opt_css if defined $opt_css;
- $Header = $opt_header if defined $opt_header;
- $Htmldir = $opt_htmldir if defined $opt_htmldir;
- $Htmlroot = $opt_htmlroot if defined $opt_htmlroot;
- $Doindex = $opt_index if defined $opt_index;
- $Podfile = $opt_infile if defined $opt_infile;
- $HiddenDirs = $opt_hiddendirs if defined $opt_hiddendirs;
- $Htmlfile = $opt_outfile if defined $opt_outfile;
- $Podroot = $opt_podroot if defined $opt_podroot;
- $Quiet = $opt_quiet if defined $opt_quiet;
- $Recurse = $opt_recurse if defined $opt_recurse;
- $Title = $opt_title if defined $opt_title;
- $Verbose = $opt_verbose if defined $opt_verbose;
-
- warn "Flushing item and directory caches\n"
- if $opt_verbose && defined $opt_flush;
- $Dircache = "$Cachedir/pod2htmd.tmp";
- $Itemcache = "$Cachedir/pod2htmi.tmp";
- if (defined $opt_flush) {
- 1 while unlink($Dircache, $Itemcache);
- }
-}
-
-
-my $Saved_Cache_Key;
-
-sub get_cache {
- my($dircache, $itemcache, $podpath, $podroot, $recurse) = @_;
- my @cache_key_args = @_;
-
- # A first-level cache:
- # Don't bother reading the cache files if they still apply
- # and haven't changed since we last read them.
-
- my $this_cache_key = cache_key(@cache_key_args);
-
- return if $Saved_Cache_Key and $this_cache_key eq $Saved_Cache_Key;
-
- # load the cache of %Pages and %Items if possible. $tests will be
- # non-zero if successful.
- my $tests = 0;
- if (-f $dircache && -f $itemcache) {
- warn "scanning for item cache\n" if $Verbose;
- $tests = load_cache($dircache, $itemcache, $podpath, $podroot);
- }
-
- # if we didn't succeed in loading the cache then we must (re)build
- # %Pages and %Items.
- if (!$tests) {
- warn "scanning directories in pod-path\n" if $Verbose;
- scan_podpath($podroot, $recurse, 0);
- }
- $Saved_Cache_Key = cache_key(@cache_key_args);
-}
-
-sub cache_key {
- my($dircache, $itemcache, $podpath, $podroot, $recurse) = @_;
- return join('!', $dircache, $itemcache, $recurse,
- @$podpath, $podroot, stat($dircache), stat($itemcache));
-}
-
-#
-# load_cache - tries to find if the caches stored in $dircache and $itemcache
-# are valid caches of %Pages and %Items. if they are valid then it loads
-# them and returns a non-zero value.
-#
-sub load_cache {
- my($dircache, $itemcache, $podpath, $podroot) = @_;
- my($tests);
- local $_;
-
- $tests = 0;
-
- open(CACHE, "<$itemcache") ||
- die "$0: error opening $itemcache for reading: $!\n";
- $/ = "\n";
-
- # is it the same podpath?
- $_ = <CACHE>;
- chomp($_);
- $tests++ if (join(":", @$podpath) eq $_);
-
- # is it the same podroot?
- $_ = <CACHE>;
- chomp($_);
- $tests++ if ($podroot eq $_);
-
- # load the cache if its good
- if ($tests != 2) {
- close(CACHE);
- return 0;
- }
-
- warn "loading item cache\n" if $Verbose;
- while (<CACHE>) {
- /(.*?) (.*)$/;
- $Items{$1} = $2;
- }
- close(CACHE);
-
- warn "scanning for directory cache\n" if $Verbose;
- open(CACHE, "<$dircache") ||
- die "$0: error opening $dircache for reading: $!\n";
- $/ = "\n";
- $tests = 0;
-
- # is it the same podpath?
- $_ = <CACHE>;
- chomp($_);
- $tests++ if (join(":", @$podpath) eq $_);
-
- # is it the same podroot?
- $_ = <CACHE>;
- chomp($_);
- $tests++ if ($podroot eq $_);
-
- # load the cache if its good
- if ($tests != 2) {
- close(CACHE);
- return 0;
- }
-
- warn "loading directory cache\n" if $Verbose;
- while (<CACHE>) {
- /(.*?) (.*)$/;
- $Pages{$1} = $2;
- }
-
- close(CACHE);
-
- return 1;
-}
-
-#
-# scan_podpath - scans the directories specified in @podpath for directories,
-# .pod files, and .pm files. it also scans the pod files specified in
-# @Libpods for =item directives.
-#
-sub scan_podpath {
- my($podroot, $recurse, $append) = @_;
- my($pwd, $dir);
- my($libpod, $dirname, $pod, @files, @poddata);
-
- unless($append) {
- %Items = ();
- %Pages = ();
- }
-
- # scan each directory listed in @Podpath
- $pwd = getcwd();
- chdir($podroot)
- || die "$0: error changing to directory $podroot: $!\n";
- foreach $dir (@Podpath) {
- scan_dir($dir, $recurse);
- }
-
- # scan the pods listed in @Libpods for =item directives
- foreach $libpod (@Libpods) {
- # if the page isn't defined then we won't know where to find it
- # on the system.
- next unless defined $Pages{$libpod} && $Pages{$libpod};
-
- # if there is a directory then use the .pod and .pm files within it.
- # NOTE: Only finds the first so-named directory in the tree.
-# if ($Pages{$libpod} =~ /([^:]*[^(\.pod|\.pm)]):/) {
- if ($Pages{$libpod} =~ /([^:]*(?<!\.pod)(?<!\.pm)):/) {
- # find all the .pod and .pm files within the directory
- $dirname = $1;
- opendir(DIR, $dirname) ||
- die "$0: error opening directory $dirname: $!\n";
- @files = grep(/(\.pod|\.pm)\z/ && ! -d $_, readdir(DIR));
- closedir(DIR);
-
- # scan each .pod and .pm file for =item directives
- foreach $pod (@files) {
- open(POD, "<$dirname/$pod") ||
- die "$0: error opening $dirname/$pod for input: $!\n";
- @poddata = <POD>;
- close(POD);
- clean_data( \@poddata );
-
- scan_items( \%Items, "$dirname/$pod", @poddata);
- }
-
- # use the names of files as =item directives too.
-### Don't think this should be done this way - confuses issues.(WL)
-### foreach $pod (@files) {
-### $pod =~ /^(.*)(\.pod|\.pm)$/;
-### $Items{$1} = "$dirname/$1.html" if $1;
-### }
- } elsif ($Pages{$libpod} =~ /([^:]*\.pod):/ ||
- $Pages{$libpod} =~ /([^:]*\.pm):/) {
- # scan the .pod or .pm file for =item directives
- $pod = $1;
- open(POD, "<$pod") ||
- die "$0: error opening $pod for input: $!\n";
- @poddata = <POD>;
- close(POD);
- clean_data( \@poddata );
-
- scan_items( \%Items, "$pod", @poddata);
- } else {
- warn "$0: shouldn't be here (line ".__LINE__."\n" unless $Quiet;
- }
- }
- @poddata = (); # clean-up a bit
-
- chdir($pwd)
- || die "$0: error changing to directory $pwd: $!\n";
-
- # cache the item list for later use
- warn "caching items for later use\n" if $Verbose;
- open(CACHE, ">$Itemcache") ||
- die "$0: error open $Itemcache for writing: $!\n";
-
- print CACHE join(":", @Podpath) . "\n$podroot\n";
- foreach my $key (keys %Items) {
- print CACHE "$key $Items{$key}\n";
- }
-
- close(CACHE);
-
- # cache the directory list for later use
- warn "caching directories for later use\n" if $Verbose;
- open(CACHE, ">$Dircache") ||
- die "$0: error open $Dircache for writing: $!\n";
-
- print CACHE join(":", @Podpath) . "\n$podroot\n";
- foreach my $key (keys %Pages) {
- print CACHE "$key $Pages{$key}\n";
- }
-
- close(CACHE);
-}
-
-#
-# scan_dir - scans the directory specified in $dir for subdirectories, .pod
-# files, and .pm files. notes those that it finds. this information will
-# be used later in order to figure out where the pages specified in L<>
-# links are on the filesystem.
-#
-sub scan_dir {
- my($dir, $recurse) = @_;
- my($t, @subdirs, @pods, $pod, $dirname, @dirs);
- local $_;
-
- @subdirs = ();
- @pods = ();
-
- opendir(DIR, $dir) ||
- die "$0: error opening directory $dir: $!\n";
- while (defined($_ = readdir(DIR))) {
- if (-d "$dir/$_" && $_ ne "." && $_ ne ".."
- && ($HiddenDirs || !/^\./)
- ) { # directory
- $Pages{$_} = "" unless defined $Pages{$_};
- $Pages{$_} .= "$dir/$_:";
- push(@subdirs, $_);
- } elsif (/\.pod\z/) { # .pod
- s/\.pod\z//;
- $Pages{$_} = "" unless defined $Pages{$_};
- $Pages{$_} .= "$dir/$_.pod:";
- push(@pods, "$dir/$_.pod");
- } elsif (/\.html\z/) { # .html
- s/\.html\z//;
- $Pages{$_} = "" unless defined $Pages{$_};
- $Pages{$_} .= "$dir/$_.pod:";
- } elsif (/\.pm\z/) { # .pm
- s/\.pm\z//;
- $Pages{$_} = "" unless defined $Pages{$_};
- $Pages{$_} .= "$dir/$_.pm:";
- push(@pods, "$dir/$_.pm");
- } elsif (-T "$dir/$_") { # script(?)
- local *F;
- if (open(F, "$dir/$_")) {
- my $line;
- while (defined($line = <F>)) {
- if ($line =~ /^=(?:pod|head1)/) {
- $Pages{$_} = "" unless defined $Pages{$_};
- $Pages{$_} .= "$dir/$_.pod:";
- last;
- }
- }
- close(F);
- }
- }
- }
- closedir(DIR);
-
- # recurse on the subdirectories if necessary
- if ($recurse) {
- foreach my $subdir (@subdirs) {
- scan_dir("$dir/$subdir", $recurse);
- }
- }
-}
-
-#
-# scan_headings - scan a pod file for head[1-6] tags, note the tags, and
-# build an index.
-#
-sub scan_headings {
- my($sections, @data) = @_;
- my($tag, $which_head, $otitle, $listdepth, $index);
-
- local $Ignore = 0;
-
- $listdepth = 0;
- $index = "";
-
- # scan for =head directives, note their name, and build an index
- # pointing to each of them.
- foreach my $line (@data) {
- if ($line =~ /^=(head)([1-6])\s+(.*)/) {
- ($tag, $which_head, $otitle) = ($1,$2,$3);
-
- my $title = depod( $otitle );
- my $name = anchorify( $title );
- $$sections{$name} = 1;
- $title = process_text( \$otitle );
-
- while ($which_head != $listdepth) {
- if ($which_head > $listdepth) {
- $index .= "\n" . ("\t" x $listdepth) . "<ul>\n";
- $listdepth++;
- } elsif ($which_head < $listdepth) {
- $listdepth--;
- $index .= "\n" . ("\t" x $listdepth) . "</ul>\n";
- }
- }
-
- $index .= "\n" . ("\t" x $listdepth) . "<li>" .
- "<a href=\"#" . $name . "\">" .
- $title . "</a></li>";
- }
- }
-
- # finish off the lists
- while ($listdepth--) {
- $index .= "\n" . ("\t" x $listdepth) . "</ul>\n";
- }
-
- # get rid of bogus lists
- $index =~ s,\t*<ul>\s*</ul>\n,,g;
-
- return $index;
-}
-
-#
-# scan_items - scans the pod specified by $pod for =item directives. we
-# will use this information later on in resolving C<> links.
-#
-sub scan_items {
- my( $itemref, $pod, @poddata ) = @_;
- my($i, $item);
- local $_;
-
- $pod =~ s/\.pod\z//;
- $pod .= ".html" if $pod;
-
- foreach $i (0..$#poddata) {
- my $txt = depod( $poddata[$i] );
-
- # figure out what kind of item it is.
- # Build string for referencing this item.
- if ( $txt =~ /\A=item\s+\*\s*(.*)\Z/s ) { # bulleted list
- next unless $1;
- $item = $1;
- } elsif( $txt =~ /\A=item\s+(?>\d+\.?)\s*(.*)\Z/s ) { # numbered list
- $item = $1;
- } elsif( $txt =~ /\A=item\s+(.*)\Z/s ) { # definition list
- $item = $1;
- } else {
- next;
- }
- my $fid = fragment_id( $item );
- $$itemref{$fid} = "$pod" if $fid;
- }
-}
-
-#
-# process_head - convert a pod head[1-6] tag and convert it to HTML format.
-#
-sub process_head {
- my($tag, $heading, $hasindex) = @_;
-
- # figure out the level of the =head
- $tag =~ /head([1-6])/;
- my $level = $1;
-
- finish_list();
-
- print HTML "<p>\n";
- if( $level == 1 && ! $Top ){
- print HTML "<a href=\"#__index__\"><small>$Backlink</small></a>\n"
- if $hasindex and $Backlink;
- print HTML "</p>\n<hr />\n"
- } else {
- print HTML "</p>\n";
- }
-
- my $name = anchorify( depod( $heading ) );
- my $convert = process_text( \$heading );
- print HTML "<h$level><a name=\"$name\">$convert</a></h$level>\n";
-}
-
-
-#
-# emit_item_tag - print an =item's text
-# Note: The global $EmittedItem is used for inhibiting self-references.
-#
-my $EmittedItem;
-
-sub emit_item_tag($$$){
- my( $otext, $text, $compact ) = @_;
- my $item = fragment_id( depod($text) , -generate);
- Carp::confess("Undefined fragment '$text' (".depod($text).") from fragment_id() in emit_item_tag() in $Podfile")
- if !defined $item;
- $EmittedItem = $item;
- ### print STDERR "emit_item_tag=$item ($text)\n";
-
- print HTML '<strong>';
- if ($Items_Named{$item}++) {
- print HTML process_text( \$otext );
- } else {
- my $name = $item;
- $name = anchorify($name);
- print HTML qq{<a name="$name" class="item">}, process_text( \$otext ), '</a>';
- }
- print HTML "</strong>";
- undef( $EmittedItem );
-}
-
-sub new_listitem {
- my( $tag ) = @_;
- # Open tag for definition list as we have something to put in it
- if( ($tag ne 'dl') && ($ListNewTerm) ){
- print HTML "<dd>\n";
- $ListNewTerm = 0;
- }
-
- if( $Items_Seen[$Listlevel]++ == 0 ){
- # start of new list
- push( @Listtype, "$tag" );
- print HTML "<$tag>\n";
- } else {
- # if this is not the first item, close the previous one
- if ( $tag eq 'dl' ){
- print HTML "</dd>\n" unless $ListNewTerm;
- } else {
- print HTML "</li>\n";
- }
- }
- my $opentag = $tag eq 'dl' ? 'dt' : 'li';
- print HTML "<$opentag>";
-}
-
-#
-# process_item - convert a pod item tag and convert it to HTML format.
-#
-sub process_item {
- my( $otext ) = @_;
-
- # lots of documents start a list without doing an =over. this is
- # bad! but, the proper thing to do seems to be to just assume
- # they did do an =over. so warn them once and then continue.
- if( $Listlevel == 0 ){
- warn "$0: $Podfile: unexpected =item directive in paragraph $Paragraph. ignoring.\n" unless $Quiet;
- process_over();
- }
-
- # remove formatting instructions from the text
- my $text = depod( $otext );
-
- # all the list variants:
- if( $text =~ /\A\*/ ){ # bullet
- new_listitem( 'ul' );
- if ($text =~ /\A\*\s+(\S.*)\Z/s ) { # with additional text
- my $tag = $1;
- $otext =~ s/\A\*\s+//;
- emit_item_tag( $otext, $tag, 1 );
- print HTML "\n";
- }
-
- } elsif( $text =~ /\A\d+/ ){ # numbered list
- new_listitem( 'ol' );
- if ($text =~ /\A(?>\d+\.?)\s*(\S.*)\Z/s ) { # with additional text
- my $tag = $1;
- $otext =~ s/\A\d+\.?\s*//;
- emit_item_tag( $otext, $tag, 1 );
- print HTML "\n";
- }
-
- } else { # definition list
- # new_listitem takes care of opening the <dt> tag
- new_listitem( 'dl' );
- if ($text =~ /\A(.+)\Z/s ){ # should have text
- emit_item_tag( $otext, $text, 1 );
- # write the definition term and close <dt> tag
- print HTML "</dt>\n";
- }
- # trigger opening a <dd> tag for the actual definition; will not
- # happen if next paragraph is also a definition term (=item)
- $ListNewTerm = 1;
- }
- print HTML "\n";
-}
-
-#
-# process_over - process a pod over tag and start a corresponding HTML list.
-#
-sub process_over {
- # start a new list
- $Listlevel++;
- push( @Items_Seen, 0 );
-}
-
-#
-# process_back - process a pod back tag and convert it to HTML format.
-#
-sub process_back {
- if( $Listlevel == 0 ){
- warn "$0: $Podfile: unexpected =back directive in paragraph $Paragraph. ignoring.\n" unless $Quiet;
- return;
- }
-
- # close off the list. note, I check to see if $Listtype[$Listlevel] is
- # defined because an =item directive may have never appeared and thus
- # $Listtype[$Listlevel] may have never been initialized.
- $Listlevel--;
- if( defined $Listtype[$Listlevel] ){
- if ( $Listtype[$Listlevel] eq 'dl' ){
- print HTML "</dd>\n" unless $ListNewTerm;
- } else {
- print HTML "</li>\n";
- }
- print HTML "</$Listtype[$Listlevel]>\n";
- pop( @Listtype );
- $ListNewTerm = 0;
- }
-
- # clean up item count
- pop( @Items_Seen );
-}
-
-#
-# process_cut - process a pod cut tag, thus start ignoring pod directives.
-#
-sub process_cut {
- $Ignore = 1;
-}
-
-#
-# process_pod - process a pod tag, thus stop ignoring pod directives
-# until we see a corresponding cut.
-#
-sub process_pod {
- # no need to set $Ignore to 0 cause the main loop did it
-}
-
-#
-# process_for - process a =for pod tag. if it's for html, spit
-# it out verbatim, if illustration, center it, otherwise ignore it.
-#
-sub process_for {
- my($whom, $text) = @_;
- if ( $whom =~ /^(pod2)?html$/i) {
- print HTML $text;
- } elsif ($whom =~ /^illustration$/i) {
- 1 while chomp $text;
- for my $ext (qw[.png .gif .jpeg .jpg .tga .pcl .bmp]) {
- $text .= $ext, last if -r "$text$ext";
- }
- print HTML qq{<p align="center"><img src="$text" alt="$text illustration" /></p>};
- }
-}
-
-#
-# process_begin - process a =begin pod tag. this pushes
-# whom we're beginning on the begin stack. if there's a
-# begin stack, we only print if it us.
-#
-sub process_begin {
- my($whom, $text) = @_;
- $whom = lc($whom);
- push (@Begin_Stack, $whom);
- if ( $whom =~ /^(pod2)?html$/) {
- print HTML $text if $text;
- }
-}
-
-#
-# process_end - process a =end pod tag. pop the
-# begin stack. die if we're mismatched.
-#
-sub process_end {
- my($whom, $text) = @_;
- $whom = lc($whom);
- if (!defined $Begin_Stack[-1] or $Begin_Stack[-1] ne $whom ) {
- Carp::confess("Unmatched begin/end at chunk $Paragraph in pod $Podfile\n")
- }
- pop( @Begin_Stack );
-}
-
-#
-# process_pre - indented paragraph, made into <pre></pre>
-#
-sub process_pre {
- my( $text ) = @_;
- my( $rest );
- return if $Ignore;
-
- $rest = $$text;
-
- # insert spaces in place of tabs
- $rest =~ s#(.+)#
- my $line = $1;
- 1 while $line =~ s/(\t+)/' ' x ((length($1) * 8) - $-[0] % 8)/e;
- $line;
- #eg;
-
- # convert some special chars to HTML escapes
- $rest = html_escape($rest);
-
- # try and create links for all occurrences of perl.* within
- # the preformatted text.
- $rest =~ s{
- (\s*)(perl\w+)
- }{
- if ( defined $Pages{$2} ){ # is a link
- qq($1<a href="$Htmlroot/$Pages{$2}">$2</a>);
- } elsif (defined $Pages{dosify($2)}) { # is a link
- qq($1<a href="$Htmlroot/$Pages{dosify($2)}">$2</a>);
- } else {
- "$1$2";
- }
- }xeg;
- $rest =~ s{
- (<a\ href="?) ([^>:]*:)? ([^>:]*) \.pod: ([^>:]*:)?
- }{
- my $url ;
- if ( $Htmlfileurl ne '' ){
- # Here, we take advantage of the knowledge
- # that $Htmlfileurl ne '' implies $Htmlroot eq ''.
- # Since $Htmlroot eq '', we need to prepend $Htmldir
- # on the fron of the link to get the absolute path
- # of the link's target. We check for a leading '/'
- # to avoid corrupting links that are #, file:, etc.
- my $old_url = $3 ;
- $old_url = "$Htmldir$old_url" if $old_url =~ m{^\/};
- $url = relativize_url( "$old_url.html", $Htmlfileurl );
- } else {
- $url = "$3.html" ;
- }
- "$1$url" ;
- }xeg;
-
- # Look for embedded URLs and make them into links. We don't
- # relativize them since they are best left as the author intended.
-
- my $urls = '(' . join ('|', qw{
- http
- telnet
- mailto
- news
- gopher
- file
- wais
- ftp
- } )
- . ')';
-
- my $ltrs = '\w';
- my $gunk = '/#~:.?+=&%@!\-';
- my $punc = '.:!?\-;';
- my $any = "${ltrs}${gunk}${punc}";
-
- $rest =~ s{
- \b # start at word boundary
- ( # begin $1 {
- $urls : # need resource and a colon
- (?!:) # Ignore File::, among others.
- [$any] +? # followed by one or more of any valid
- # character, but be conservative and
- # take only what you need to....
- ) # end $1 }
- (?=
- " > # maybe pre-quoted '<a href="...">'
- | # or:
- [$punc]* # 0 or more punctuation
- (?: # followed
- [^$any] # by a non-url char
- | # or
- $ # end of the string
- ) #
- | # or else
- $ # then end of the string
- )
- }{<a href="$1">$1</a>}igox;
-
- # text should be as it is (verbatim)
- $$text = $rest;
-}
-
-
-#
-# pure text processing
-#
-# pure_text/inIS_text: differ with respect to automatic C<> recognition.
-# we don't want this to happen within IS
-#
-sub pure_text($){
- my $text = shift();
- process_puretext( $text, 1 );
-}
-
-sub inIS_text($){
- my $text = shift();
- process_puretext( $text, 0 );
-}
-
-#
-# process_puretext - process pure text (without pod-escapes) converting
-# double-quotes and handling implicit C<> links.
-#
-sub process_puretext {
- my($text, $notinIS) = @_;
-
- ## Guessing at func() or [\$\@%&]*var references in plain text is destined
- ## to produce some strange looking ref's. uncomment to disable:
- ## $notinIS = 0;
-
- my(@words, $lead, $trail);
-
- # keep track of leading and trailing white-space
- $lead = ($text =~ s/\A(\s+)//s ? $1 : "");
- $trail = ($text =~ s/(\s+)\Z//s ? $1 : "");
-
- # split at space/non-space boundaries
- @words = split( /(?<=\s)(?=\S)|(?<=\S)(?=\s)/, $text );
-
- # process each word individually
- foreach my $word (@words) {
- # skip space runs
- next if $word =~ /^\s*$/;
- # see if we can infer a link or a function call
- #
- # NOTE: This is a word based search, it won't automatically
- # mark "substr($var, 1, 2)" because the 1st word would be "substr($var"
- # User has to enclose those with proper C<>
-
- if( $notinIS && $word =~
- m/
- ^([a-z_]{2,}) # The function name
- \(
- ([0-9][a-z]* # Manual page(1) or page(1M)
- |[^)]*[\$\@\%][^)]+ # ($foo), (1, @foo), (%hash)
- | # ()
- )
- \)
- ([.,;]?)$ # a possible punctuation follows
- /xi
- ) {
- # has parenthesis so should have been a C<> ref
- ## try for a pagename (perlXXX(1))?
- my( $func, $args, $rest ) = ( $1, $2, $3 || '' );
- if( $args =~ /^\d+$/ ){
- my $url = page_sect( $word, '' );
- if( defined $url ){
- $word = qq(<a href="$url" class="man">the $word manpage</a>$rest);
- next;
- }
- }
- ## try function name for a link, append tt'ed argument list
- $word = emit_C( $func, '', "($args)") . $rest;
-
-#### disabled. either all (including $\W, $\w+{.*} etc.) or nothing.
-## } elsif( $notinIS && $word =~ /^[\$\@%&*]+\w+$/) {
-## # perl variables, should be a C<> ref
-## $word = emit_C( $word );
-
- } elsif ($word =~ m,^\w+://\w,) {
- # looks like a URL
- # Don't relativize it: leave it as the author intended
- $word = qq(<a href="$word">$word</a>);
- } elsif ($word =~ /[\w.-]+\@[\w-]+\.\w/) {
- # looks like an e-mail address
- my ($w1, $w2, $w3) = ("", $word, "");
- ($w1, $w2, $w3) = ("(", $1, ")$2") if $word =~ /^\((.*?)\)(,?)/;
- ($w1, $w2, $w3) = ("<", $1, ">$2") if $word =~ /^<(.*?)>(,?)/;
- $word = qq($w1<a href="mailto:$w2">$w2</a>$w3);
- } else {
- $word = html_escape($word) if $word =~ /["&<>]/;
- }
- }
-
- # put everything back together
- return $lead . join( '', @words ) . $trail;
-}
-
-
-#
-# process_text - handles plaintext that appears in the input pod file.
-# there may be pod commands embedded within the text so those must be
-# converted to html commands.
-#
-
-sub process_text1($$;$$);
-sub pattern ($) { $_[0] ? '\s+'.('>' x ($_[0] + 1)) : '>' }
-sub closing ($) { local($_) = shift; (defined && s/\s+\z//) ? length : 0 }
-
-sub process_text {
- return if $Ignore;
- my( $tref ) = @_;
- my $res = process_text1( 0, $tref );
- $res =~ s/\s+$//s;
- $$tref = $res;
-}
-
-sub process_text_rfc_links {
- my $text = shift;
-
- # For every "RFCnnnn" or "RFC nnn", link it to the authoritative
- # ource. Do not use the /i modifier here. Require "RFC" to be written in
- # in capital letters.
-
- $text =~ s{
- (?<=[^<>[:alpha:]]) # Make sure this is not an URL already
- (RFC\s*([0-9]{1,5}))(?![0-9]) # max 5 digits
- }
- {<a href="http://www.ietf.org/rfc/rfc$2.txt" class="rfc">$1</a>}gx;
-
- $text;
-}
-
-sub process_text1($$;$$){
- my( $lev, $rstr, $func, $closing ) = @_;
- my $res = '';
-
- unless (defined $func) {
- $func = '';
- $lev++;
- }
-
- if( $func eq 'B' ){
- # B<text> - boldface
- $res = '<strong>' . process_text1( $lev, $rstr ) . '</strong>';
-
- } elsif( $func eq 'C' ){
- # C<code> - can be a ref or <code></code>
- # need to extract text
- my $par = go_ahead( $rstr, 'C', $closing );
-
- ## clean-up of the link target
- my $text = depod( $par );
-
- ### my $x = $par =~ /[BI]</ ? 'yes' : 'no' ;
- ### print STDERR "-->call emit_C($par) lev=$lev, par with BI=$x\n";
-
- $res = emit_C( $text, $lev > 1 || ($par =~ /[BI]</) );
-
- } elsif( $func eq 'E' ){
- # E<x> - convert to character
- $$rstr =~ s/^([^>]*)>//;
- my $escape = $1;
- $escape =~ s/^(\d+|X[\dA-F]+)$/#$1/i;
- $res = "&$escape;";
-
- } elsif( $func eq 'F' ){
- # F<filename> - italicize
- $res = '<em class="file">' . process_text1( $lev, $rstr ) . '</em>';
-
- } elsif( $func eq 'I' ){
- # I<text> - italicize
- $res = '<em>' . process_text1( $lev, $rstr ) . '</em>';
-
- } elsif( $func eq 'L' ){
- # L<link> - link
- ## L<text|cross-ref> => produce text, use cross-ref for linking
- ## L<cross-ref> => make text from cross-ref
- ## need to extract text
- my $par = go_ahead( $rstr, 'L', $closing );
-
- # some L<>'s that shouldn't be:
- # a) full-blown URL's are emitted as-is
- if( $par =~ m{^\w+://}s ){
- return make_URL_href( $par );
- }
- # b) C<...> is stripped and treated as C<>
- if( $par =~ /^C<(.*)>$/ ){
- my $text = depod( $1 );
- return emit_C( $text, $lev > 1 || ($par =~ /[BI]</) );
- }
-
- # analyze the contents
- $par =~ s/\n/ /g; # undo word-wrapped tags
- my $opar = $par;
- my $linktext;
- if( $par =~ s{^([^|]+)\|}{} ){
- $linktext = $1;
- }
-
- # make sure sections start with a /
- $par =~ s{^"}{/"};
-
- my( $page, $section, $ident );
-
- # check for link patterns
- if( $par =~ m{^([^/]+?)/(?!")(.*?)$} ){ # name/ident
- # we've got a name/ident (no quotes)
- if (length $2) {
- ( $page, $ident ) = ( $1, $2 );
- } else {
- ( $page, $section ) = ( $1, $2 );
- }
- ### print STDERR "--> L<$par> to page $page, ident $ident\n";
-
- } elsif( $par =~ m{^(.*?)/"?(.*?)"?$} ){ # [name]/"section"
- # even though this should be a "section", we go for ident first
- ( $page, $ident ) = ( $1, $2 );
- ### print STDERR "--> L<$par> to page $page, section $section\n";
-
- } elsif( $par =~ /\s/ ){ # this must be a section with missing quotes
- ( $page, $section ) = ( '', $par );
- ### print STDERR "--> L<$par> to void page, section $section\n";
-
- } else {
- ( $page, $section ) = ( $par, '' );
- ### print STDERR "--> L<$par> to page $par, void section\n";
- }
-
- # now, either $section or $ident is defined. the convoluted logic
- # below tries to resolve L<> according to what the user specified.
- # failing this, we try to find the next best thing...
- my( $url, $ltext, $fid );
-
- RESOLVE: {
- if( defined $ident ){
- ## try to resolve $ident as an item
- ( $url, $fid ) = coderef( $page, $ident );
- if( $url ){
- if( ! defined( $linktext ) ){
- $linktext = $ident;
- $linktext .= " in " if $ident && $page;
- $linktext .= "the $page manpage" if $page;
- }
- ### print STDERR "got coderef url=$url\n";
- last RESOLVE;
- }
- ## no luck: go for a section (auto-quoting!)
- $section = $ident;
- }
- ## now go for a section
- my $htmlsection = htmlify( $section );
- $url = page_sect( $page, $htmlsection );
- if( $url ){
- if( ! defined( $linktext ) ){
- $linktext = $section;
- $linktext .= " in " if $section && $page;
- $linktext .= "the $page manpage" if $page;
- }
- ### print STDERR "got page/section url=$url\n";
- last RESOLVE;
- }
- ## no luck: go for an ident
- if( $section ){
- $ident = $section;
- } else {
- $ident = $page;
- $page = undef();
- }
- ( $url, $fid ) = coderef( $page, $ident );
- if( $url ){
- if( ! defined( $linktext ) ){
- $linktext = $ident;
- $linktext .= " in " if $ident && $page;
- $linktext .= "the $page manpage" if $page;
- }
- ### print STDERR "got section=>coderef url=$url\n";
- last RESOLVE;
- }
-
- # warning; show some text.
- $linktext = $opar unless defined $linktext;
- warn "$0: $Podfile: cannot resolve L<$opar> in paragraph $Paragraph.\n" unless $Quiet;
- }
-
- # now we have a URL or just plain code
- $$rstr = $linktext . '>' . $$rstr;
- if( defined( $url ) ){
- $res = "<a href=\"$url\">" . process_text1( $lev, $rstr ) . '</a>';
- } else {
- $res = '<em>' . process_text1( $lev, $rstr ) . '</em>';
- }
-
- } elsif( $func eq 'S' ){
- # S<text> - non-breaking spaces
- $res = process_text1( $lev, $rstr );
- $res =~ s/ / /g;
-
- } elsif( $func eq 'X' ){
- # X<> - ignore
- warn "$0: $Podfile: invalid X<> in paragraph $Paragraph.\n"
- unless $$rstr =~ s/^[^>]*>// or $Quiet;
- } elsif( $func eq 'Z' ){
- # Z<> - empty
- warn "$0: $Podfile: invalid Z<> in paragraph $Paragraph.\n"
- unless $$rstr =~ s/^>// or $Quiet;
-
- } else {
- my $term = pattern $closing;
- while( $$rstr =~ s/\A(.*?)(([BCEFILSXZ])<(<+[^\S\n]+)?|$term)//s ){
- # all others: either recurse into new function or
- # terminate at closing angle bracket(s)
- my $pt = $1;
- $pt .= $2 if !$3 && $lev == 1;
- $res .= $lev == 1 ? pure_text( $pt ) : inIS_text( $pt );
- return $res if !$3 && $lev > 1;
- if( $3 ){
- $res .= process_text1( $lev, $rstr, $3, closing $4 );
- }
- }
- if( $lev == 1 ){
- $res .= pure_text( $$rstr );
- } elsif( ! $Quiet ) {
- my $snippet = substr($$rstr,0,60);
- warn "$0: $Podfile: undelimited $func<> in paragraph $Paragraph: '$snippet'.\n"
-
- }
- $res = process_text_rfc_links($res);
- }
- return $res;
-}
-
-#
-# go_ahead: extract text of an IS (can be nested)
-#
-sub go_ahead($$$){
- my( $rstr, $func, $closing ) = @_;
- my $res = '';
- my @closing = ($closing);
- while( $$rstr =~
- s/\A(.*?)(([BCEFILSXZ])<(<+\s+)?|@{[pattern $closing[0]]})//s ){
- $res .= $1;
- unless( $3 ){
- shift @closing;
- return $res unless @closing;
- } else {
- unshift @closing, closing $4;
- }
- $res .= $2;
- }
- unless ($Quiet) {
- my $snippet = substr($$rstr,0,60);
- warn "$0: $Podfile: undelimited $func<> in paragraph $Paragraph (go_ahead): '$snippet'.\n"
- }
- return $res;
-}
-
-#
-# emit_C - output result of C<text>
-# $text is the depod-ed text
-#
-sub emit_C($;$$){
- my( $text, $nocode, $args ) = @_;
- $args = '' unless defined $args;
- my $res;
- my( $url, $fid ) = coderef( undef(), $text );
-
- # need HTML-safe text
- my $linktext = html_escape( "$text$args" );
-
- if( defined( $url ) &&
- (!defined( $EmittedItem ) || $EmittedItem ne $fid ) ){
- $res = "<a href=\"$url\"><code>$linktext</code></a>";
- } elsif( 0 && $nocode ){
- $res = $linktext;
- } else {
- $res = "<code>$linktext</code>";
- }
- return $res;
-}
-
-#
-# html_escape: make text safe for HTML
-#
-sub html_escape {
- my $rest = $_[0];
- $rest =~ s/&/&/g;
- $rest =~ s/</</g;
- $rest =~ s/>/>/g;
- $rest =~ s/"/"/g;
- # ' is only in XHTML, not HTML4. Be conservative
- #$rest =~ s/'/'/g;
- return $rest;
-}
-
-
-#
-# dosify - convert filenames to 8.3
-#
-sub dosify {
- my($str) = @_;
- return lc($str) if $^O eq 'VMS'; # VMS just needs casing
- if ($Is83) {
- $str = lc $str;
- $str =~ s/(\.\w+)/substr ($1,0,4)/ge;
- $str =~ s/(\w+)/substr ($1,0,8)/ge;
- }
- return $str;
-}
-
-#
-# page_sect - make a URL from the text of a L<>
-#
-sub page_sect($$) {
- my( $page, $section ) = @_;
- my( $linktext, $page83, $link); # work strings
-
- # check if we know that this is a section in this page
- if (!defined $Pages{$page} && defined $Sections{$page}) {
- $section = $page;
- $page = "";
- ### print STDERR "reset page='', section=$section\n";
- }
-
- $page83=dosify($page);
- $page=$page83 if (defined $Pages{$page83});
- if ($page eq "") {
- $link = "#" . anchorify( $section );
- } elsif ( $page =~ /::/ ) {
- $page =~ s,::,/,g;
- # Search page cache for an entry keyed under the html page name,
- # then look to see what directory that page might be in. NOTE:
- # this will only find one page. A better solution might be to produce
- # an intermediate page that is an index to all such pages.
- my $page_name = $page ;
- $page_name =~ s,^.*/,,s ;
- if ( defined( $Pages{ $page_name } ) &&
- $Pages{ $page_name } =~ /([^:]*$page)\.(?:pod|pm):/
- ) {
- $page = $1 ;
- }
- else {
- # NOTE: This branch assumes that all A::B pages are located in
- # $Htmlroot/A/B.html . This is often incorrect, since they are
- # often in $Htmlroot/lib/A/B.html or such like. Perhaps we could
- # analyze the contents of %Pages and figure out where any
- # cousins of A::B are, then assume that. So, if A::B isn't found,
- # but A::C is found in lib/A/C.pm, then A::B is assumed to be in
- # lib/A/B.pm. This is also limited, but it's an improvement.
- # Maybe a hints file so that the links point to the correct places
- # nonetheless?
-
- }
- $link = "$Htmlroot/$page.html";
- $link .= "#" . anchorify( $section ) if ($section);
- } elsif (!defined $Pages{$page}) {
- $link = "";
- } else {
- $section = anchorify( $section ) if $section ne "";
- ### print STDERR "...section=$section\n";
-
- # if there is a directory by the name of the page, then assume that an
- # appropriate section will exist in the subdirectory
-# if ($section ne "" && $Pages{$page} =~ /([^:]*[^(\.pod|\.pm)]):/) {
- if ($section ne "" && $Pages{$page} =~ /([^:]*(?<!\.pod)(?<!\.pm)):/) {
- $link = "$Htmlroot/$1/$section.html";
- ### print STDERR "...link=$link\n";
-
- # since there is no directory by the name of the page, the section will
- # have to exist within a .html of the same name. thus, make sure there
- # is a .pod or .pm that might become that .html
- } else {
- $section = "#$section" if $section;
- ### print STDERR "...section=$section\n";
-
- # check if there is a .pod with the page name.
- # for L<Foo>, Foo.(pod|pm) is preferred to A/Foo.(pod|pm)
- if ($Pages{$page} =~ /([^:]*)\.(?:pod|pm):/) {
- $link = "$Htmlroot/$1.html$section";
- } else {
- $link = "";
- }
- }
- }
-
- if ($link) {
- # Here, we take advantage of the knowledge that $Htmlfileurl ne ''
- # implies $Htmlroot eq ''. This means that the link in question
- # needs a prefix of $Htmldir if it begins with '/'. The test for
- # the initial '/' is done to avoid '#'-only links, and to allow
- # for other kinds of links, like file:, ftp:, etc.
- my $url ;
- if ( $Htmlfileurl ne '' ) {
- $link = "$Htmldir$link" if $link =~ m{^/}s;
- $url = relativize_url( $link, $Htmlfileurl );
-# print( " b: [$link,$Htmlfileurl,$url]\n" );
- }
- else {
- $url = $link ;
- }
- return $url;
-
- } else {
- return undef();
- }
-}
-
-#
-# relativize_url - convert an absolute URL to one relative to a base URL.
-# Assumes both end in a filename.
-#
-sub relativize_url {
- my ($dest,$source) = @_ ;
-
- my ($dest_volume,$dest_directory,$dest_file) =
- File::Spec::Unix->splitpath( $dest ) ;
- $dest = File::Spec::Unix->catpath( $dest_volume, $dest_directory, '' ) ;
-
- my ($source_volume,$source_directory,$source_file) =
- File::Spec::Unix->splitpath( $source ) ;
- $source = File::Spec::Unix->catpath( $source_volume, $source_directory, '' ) ;
-
- my $rel_path = '' ;
- if ( $dest ne '' ) {
- $rel_path = File::Spec::Unix->abs2rel( $dest, $source ) ;
- }
-
- if ( $rel_path ne '' &&
- substr( $rel_path, -1 ) ne '/' &&
- substr( $dest_file, 0, 1 ) ne '#'
- ) {
- $rel_path .= "/$dest_file" ;
- }
- else {
- $rel_path .= "$dest_file" ;
- }
-
- return $rel_path ;
-}
-
-
-#
-# coderef - make URL from the text of a C<>
-#
-sub coderef($$){
- my( $page, $item ) = @_;
- my( $url );
-
- my $fid = fragment_id( $item );
-
- if( defined( $page ) && $page ne "" ){
- # we have been given a $page...
- $page =~ s{::}{/}g;
-
- Carp::confess("Undefined fragment '$item' from fragment_id() in coderef() in $Podfile")
- if !defined $fid;
- # Do we take it? Item could be a section!
- my $base = $Items{$fid} || "";
- $base =~ s{[^/]*/}{};
- if( $base ne "$page.html" ){
- ### print STDERR "coderef( $page, $item ): items{$fid} = $Items{$fid} = $base => discard page!\n";
- $page = undef();
- }
-
- } else {
- # no page - local items precede cached items
- if( defined( $fid ) ){
- if( exists $Local_Items{$fid} ){
- $page = $Local_Items{$fid};
- } else {
- $page = $Items{$fid};
- }
- }
- }
-
- # if there was a pod file that we found earlier with an appropriate
- # =item directive, then create a link to that page.
- if( defined $page ){
- if( $page ){
- if( exists $Pages{$page} and $Pages{$page} =~ /([^:.]*)\.[^:]*:/){
- $page = $1 . '.html';
- }
- my $link = "$Htmlroot/$page#" . anchorify($fid);
-
- # Here, we take advantage of the knowledge that $Htmlfileurl
- # ne '' implies $Htmlroot eq ''.
- if ( $Htmlfileurl ne '' ) {
- $link = "$Htmldir$link" ;
- $url = relativize_url( $link, $Htmlfileurl ) ;
- } else {
- $url = $link ;
- }
- } else {
- $url = "#" . anchorify($fid);
- }
-
- confess "url has space: $url" if $url =~ /"[^"]*\s[^"]*"/;
- }
- return( $url, $fid );
-}
-
-
-
-#
-# Adapted from Nick Ing-Simmons' PodToHtml package.
-sub relative_url {
- my $source_file = shift ;
- my $destination_file = shift;
-
- my $source = URI::file->new_abs($source_file);
- my $uo = URI::file->new($destination_file,$source)->abs;
- return $uo->rel->as_string;
-}
-
-
-#
-# finish_list - finish off any pending HTML lists. this should be called
-# after the entire pod file has been read and converted.
-#
-sub finish_list {
- if( $Listlevel ){
- warn "$0: $Podfile: unterminated list(s) at =head in paragraph $Paragraph. ignoring.\n" unless $Quiet;
- while( $Listlevel ){
- process_back();
- }
- }
-}
-
-#
-# htmlify - converts a pod section specification to a suitable section
-# specification for HTML. Note that we keep spaces and special characters
-# except ", ? (Netscape problem) and the hyphen (writer's problem...).
-#
-sub htmlify {
- my( $heading) = @_;
- $heading =~ s/(\s+)/ /g;
- $heading =~ s/\s+\Z//;
- $heading =~ s/\A\s+//;
- # The hyphen is a disgrace to the English language.
- # $heading =~ s/[-"?]//g;
- $heading =~ s/["?]//g;
- $heading = lc( $heading );
- return $heading;
-}
-
-#
-# similar to htmlify, but turns non-alphanumerics into underscores
-#
-sub anchorify {
- my ($anchor) = @_;
- $anchor = htmlify($anchor);
- $anchor =~ s/\W/_/g;
- return $anchor;
-}
-
-#
-# depod - convert text by eliminating all interior sequences
-# Note: can be called with copy or modify semantics
-#
-my %E2c;
-$E2c{lt} = '<';
-$E2c{gt} = '>';
-$E2c{sol} = '/';
-$E2c{verbar} = '|';
-$E2c{amp} = '&'; # in Tk's pods
-
-sub depod1($;$$);
-
-sub depod($){
- my $string;
- if( ref( $_[0] ) ){
- $string = ${$_[0]};
- ${$_[0]} = depod1( \$string );
- } else {
- $string = $_[0];
- depod1( \$string );
- }
-}
-
-sub depod1($;$$){
- my( $rstr, $func, $closing ) = @_;
- my $res = '';
- return $res unless defined $$rstr;
- if( ! defined( $func ) ){
- # skip to next begin of an interior sequence
- while( $$rstr =~ s/\A(.*?)([BCEFILSXZ])<(<+[^\S\n]+)?//s ){
- # recurse into its text
- $res .= $1 . depod1( $rstr, $2, closing $3);
- }
- $res .= $$rstr;
- } elsif( $func eq 'E' ){
- # E<x> - convert to character
- $$rstr =~ s/^([^>]*)>//;
- $res .= $E2c{$1} || "";
- } elsif( $func eq 'X' ){
- # X<> - ignore
- $$rstr =~ s/^[^>]*>//;
- } elsif( $func eq 'Z' ){
- # Z<> - empty
- $$rstr =~ s/^>//;
- } else {
- # all others: either recurse into new function or
- # terminate at closing angle bracket
- my $term = pattern $closing;
- while( $$rstr =~ s/\A(.*?)(([BCEFILSXZ])<(<+[^\S\n]+)?|$term)//s ){
- $res .= $1;
- last unless $3;
- $res .= depod1( $rstr, $3, closing $4 );
- }
- ## If we're here and $2 ne '>': undelimited interior sequence.
- ## Ignored, as this is called without proper indication of where we are.
- ## Rely on process_text to produce diagnostics.
- }
- return $res;
-}
-
-{
- my %seen; # static fragment record hash
-
-sub fragment_id_readable {
- my $text = shift;
- my $generate = shift; # optional flag
-
- my $orig = $text;
-
- # leave the words for the fragment identifier,
- # change everything else to underbars.
- $text =~ s/[^A-Za-z0-9_]+/_/g; # do not use \W to avoid locale dependency.
- $text =~ s/_{2,}/_/g;
- $text =~ s/\A_//;
- $text =~ s/_\Z//;
-
- unless ($text)
- {
- # Nothing left after removing punctuation, so leave it as is
- # E.g. if option is named: "=item -#"
-
- $text = $orig;
- }
-
- if ($generate) {
- if ( exists $seen{$text} ) {
- # This already exists, make it unique
- $seen{$text}++;
- $text = $text . $seen{$text};
- } else {
- $seen{$text} = 1; # first time seen this fragment
- }
- }
-
- $text;
-}}
-
-my @HC;
-sub fragment_id_obfuscated { # This was the old "_2d_2d__"
- my $text = shift;
- my $generate = shift; # optional flag
-
- # text? Normalize by obfuscating the fragment id to make it unique
- $text =~ s/\s+/_/sg;
-
- $text =~ s{(\W)}{
- defined( $HC[ord($1)] ) ? $HC[ord($1)]
- : ( $HC[ord($1)] = sprintf( "%%%02X", ord($1) ) ) }gxe;
- $text = substr( $text, 0, 50 );
-
- $text;
-}
-
-#
-# fragment_id - construct a fragment identifier from:
-# a) =item text
-# b) contents of C<...>
-#
-
-sub fragment_id {
- my $text = shift;
- my $generate = shift; # optional flag
-
- $text =~ s/\s+\Z//s;
- if( $text ){
- # a method or function?
- return $1 if $text =~ /(\w+)\s*\(/;
- return $1 if $text =~ /->\s*(\w+)\s*\(?/;
-
- # a variable name?
- return $1 if $text =~ /^([\$\@%*]\S+)/;
-
- # some pattern matching operator?
- return $1 if $text =~ m|^(\w+/).*/\w*$|;
-
- # fancy stuff... like "do { }"
- return $1 if $text =~ m|^(\w+)\s*{.*}$|;
-
- # honour the perlfunc manpage: func [PAR[,[ ]PAR]...]
- # and some funnies with ... Module ...
- return $1 if $text =~ m{^([a-z\d_]+)(\s+[A-Z,/& ][A-Z\d,/& ]*)?$};
- return $1 if $text =~ m{^([a-z\d]+)\s+Module(\s+[A-Z\d,/& ]+)?$};
-
- return fragment_id_readable($text, $generate);
- } else {
- return;
- }
-}
-
-#
-# make_URL_href - generate HTML href from URL
-# Special treatment for CGI queries.
-#
-sub make_URL_href($){
- my( $url ) = @_;
- if( $url !~
- s{^(http:[-\w/#~:.+=&%@!]+)(\?.*)$}{<a href="$1$2">$1</a>}i ){
- $url = "<a href=\"$url\">$url</a>";
- }
- return $url;
-}
-
-1;
Deleted: vendor/perl/dist/lib/Pod/InputObjects.pm
===================================================================
--- vendor/perl/dist/lib/Pod/InputObjects.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/InputObjects.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,936 +0,0 @@
-#############################################################################
-# Pod/InputObjects.pm -- package which defines objects for input streams
-# and paragraphs and commands when parsing POD docs.
-#
-# Copyright (C) 1996-2000 by Bradford Appleton. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-package Pod::InputObjects;
-use strict;
-
-use vars qw($VERSION);
-$VERSION = '1.31'; ## Current version of this package
-require 5.005; ## requires this Perl version or later
-
-#############################################################################
-
-=head1 NAME
-
-Pod::InputObjects - objects representing POD input paragraphs, commands, etc.
-
-=head1 SYNOPSIS
-
- use Pod::InputObjects;
-
-=head1 REQUIRES
-
-perl5.004, Carp
-
-=head1 EXPORTS
-
-Nothing.
-
-=head1 DESCRIPTION
-
-This module defines some basic input objects used by B<Pod::Parser> when
-reading and parsing POD text from an input source. The following objects
-are defined:
-
-=over 4
-
-=begin __PRIVATE__
-
-=item package B<Pod::InputSource>
-
-An object corresponding to a source of POD input text. It is mostly a
-wrapper around a filehandle or C<IO::Handle>-type object (or anything
-that implements the C<getline()> method) which keeps track of some
-additional information relevant to the parsing of PODs.
-
-=end __PRIVATE__
-
-=item package B<Pod::Paragraph>
-
-An object corresponding to a paragraph of POD input text. It may be a
-plain paragraph, a verbatim paragraph, or a command paragraph (see
-L<perlpod>).
-
-=item package B<Pod::InteriorSequence>
-
-An object corresponding to an interior sequence command from the POD
-input text (see L<perlpod>).
-
-=item package B<Pod::ParseTree>
-
-An object corresponding to a tree of parsed POD text. Each "node" in
-a parse-tree (or I<ptree>) is either a text-string or a reference to
-a B<Pod::InteriorSequence> object. The nodes appear in the parse-tree
-in the order in which they were parsed from left-to-right.
-
-=back
-
-Each of these input objects are described in further detail in the
-sections which follow.
-
-=cut
-
-#############################################################################
-
-package Pod::InputSource;
-
-##---------------------------------------------------------------------------
-
-=begin __PRIVATE__
-
-=head1 B<Pod::InputSource>
-
-This object corresponds to an input source or stream of POD
-documentation. When parsing PODs, it is necessary to associate and store
-certain context information with each input source. All of this
-information is kept together with the stream itself in one of these
-C<Pod::InputSource> objects. Each such object is merely a wrapper around
-an C<IO::Handle> object of some kind (or at least something that
-implements the C<getline()> method). They have the following
-methods/attributes:
-
-=end __PRIVATE__
-
-=cut
-
-##---------------------------------------------------------------------------
-
-=begin __PRIVATE__
-
-=head2 B<new()>
-
- my $pod_input1 = Pod::InputSource->new(-handle => $filehandle);
- my $pod_input2 = new Pod::InputSource(-handle => $filehandle,
- -name => $name);
- my $pod_input3 = new Pod::InputSource(-handle => \*STDIN);
- my $pod_input4 = Pod::InputSource->new(-handle => \*STDIN,
- -name => "(STDIN)");
-
-This is a class method that constructs a C<Pod::InputSource> object and
-returns a reference to the new input source object. It takes one or more
-keyword arguments in the form of a hash. The keyword C<-handle> is
-required and designates the corresponding input handle. The keyword
-C<-name> is optional and specifies the name associated with the input
-handle (typically a file name).
-
-=end __PRIVATE__
-
-=cut
-
-sub new {
- ## Determine if we were called via an object-ref or a classname
- my $this = shift;
- my $class = ref($this) || $this;
-
- ## Any remaining arguments are treated as initial values for the
- ## hash that is used to represent this object. Note that we default
- ## certain values by specifying them *before* the arguments passed.
- ## If they are in the argument list, they will override the defaults.
- my $self = { -name => '(unknown)',
- -handle => undef,
- -was_cutting => 0,
- @_ };
-
- ## Bless ourselves into the desired class and perform any initialization
- bless $self, $class;
- return $self;
-}
-
-##---------------------------------------------------------------------------
-
-=begin __PRIVATE__
-
-=head2 B<name()>
-
- my $filename = $pod_input->name();
- $pod_input->name($new_filename_to_use);
-
-This method gets/sets the name of the input source (usually a filename).
-If no argument is given, it returns a string containing the name of
-the input source; otherwise it sets the name of the input source to the
-contents of the given argument.
-
-=end __PRIVATE__
-
-=cut
-
-sub name {
- (@_ > 1) and $_[0]->{'-name'} = $_[1];
- return $_[0]->{'-name'};
-}
-
-## allow 'filename' as an alias for 'name'
-*filename = \&name;
-
-##---------------------------------------------------------------------------
-
-=begin __PRIVATE__
-
-=head2 B<handle()>
-
- my $handle = $pod_input->handle();
-
-Returns a reference to the handle object from which input is read (the
-one used to contructed this input source object).
-
-=end __PRIVATE__
-
-=cut
-
-sub handle {
- return $_[0]->{'-handle'};
-}
-
-##---------------------------------------------------------------------------
-
-=begin __PRIVATE__
-
-=head2 B<was_cutting()>
-
- print "Yes.\n" if ($pod_input->was_cutting());
-
-The value of the C<cutting> state (that the B<cutting()> method would
-have returned) immediately before any input was read from this input
-stream. After all input from this stream has been read, the C<cutting>
-state is restored to this value.
-
-=end __PRIVATE__
-
-=cut
-
-sub was_cutting {
- (@_ > 1) and $_[0]->{-was_cutting} = $_[1];
- return $_[0]->{-was_cutting};
-}
-
-##---------------------------------------------------------------------------
-
-#############################################################################
-
-package Pod::Paragraph;
-
-##---------------------------------------------------------------------------
-
-=head1 B<Pod::Paragraph>
-
-An object representing a paragraph of POD input text.
-It has the following methods/attributes:
-
-=cut
-
-##---------------------------------------------------------------------------
-
-=head2 Pod::Paragraph-E<gt>B<new()>
-
- my $pod_para1 = Pod::Paragraph->new(-text => $text);
- my $pod_para2 = Pod::Paragraph->new(-name => $cmd,
- -text => $text);
- my $pod_para3 = new Pod::Paragraph(-text => $text);
- my $pod_para4 = new Pod::Paragraph(-name => $cmd,
- -text => $text);
- my $pod_para5 = Pod::Paragraph->new(-name => $cmd,
- -text => $text,
- -file => $filename,
- -line => $line_number);
-
-This is a class method that constructs a C<Pod::Paragraph> object and
-returns a reference to the new paragraph object. It may be given one or
-two keyword arguments. The C<-text> keyword indicates the corresponding
-text of the POD paragraph. The C<-name> keyword indicates the name of
-the corresponding POD command, such as C<head1> or C<item> (it should
-I<not> contain the C<=> prefix); this is needed only if the POD
-paragraph corresponds to a command paragraph. The C<-file> and C<-line>
-keywords indicate the filename and line number corresponding to the
-beginning of the paragraph
-
-=cut
-
-sub new {
- ## Determine if we were called via an object-ref or a classname
- my $this = shift;
- my $class = ref($this) || $this;
-
- ## Any remaining arguments are treated as initial values for the
- ## hash that is used to represent this object. Note that we default
- ## certain values by specifying them *before* the arguments passed.
- ## If they are in the argument list, they will override the defaults.
- my $self = {
- -name => undef,
- -text => (@_ == 1) ? shift : undef,
- -file => '<unknown-file>',
- -line => 0,
- -prefix => '=',
- -separator => ' ',
- -ptree => [],
- @_
- };
-
- ## Bless ourselves into the desired class and perform any initialization
- bless $self, $class;
- return $self;
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_para-E<gt>B<cmd_name()>
-
- my $para_cmd = $pod_para->cmd_name();
-
-If this paragraph is a command paragraph, then this method will return
-the name of the command (I<without> any leading C<=> prefix).
-
-=cut
-
-sub cmd_name {
- (@_ > 1) and $_[0]->{'-name'} = $_[1];
- return $_[0]->{'-name'};
-}
-
-## let name() be an alias for cmd_name()
-*name = \&cmd_name;
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_para-E<gt>B<text()>
-
- my $para_text = $pod_para->text();
-
-This method will return the corresponding text of the paragraph.
-
-=cut
-
-sub text {
- (@_ > 1) and $_[0]->{'-text'} = $_[1];
- return $_[0]->{'-text'};
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_para-E<gt>B<raw_text()>
-
- my $raw_pod_para = $pod_para->raw_text();
-
-This method will return the I<raw> text of the POD paragraph, exactly
-as it appeared in the input.
-
-=cut
-
-sub raw_text {
- return $_[0]->{'-text'} unless (defined $_[0]->{'-name'});
- return $_[0]->{'-prefix'} . $_[0]->{'-name'} .
- $_[0]->{'-separator'} . $_[0]->{'-text'};
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_para-E<gt>B<cmd_prefix()>
-
- my $prefix = $pod_para->cmd_prefix();
-
-If this paragraph is a command paragraph, then this method will return
-the prefix used to denote the command (which should be the string "="
-or "==").
-
-=cut
-
-sub cmd_prefix {
- return $_[0]->{'-prefix'};
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_para-E<gt>B<cmd_separator()>
-
- my $separator = $pod_para->cmd_separator();
-
-If this paragraph is a command paragraph, then this method will return
-the text used to separate the command name from the rest of the
-paragraph (if any).
-
-=cut
-
-sub cmd_separator {
- return $_[0]->{'-separator'};
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_para-E<gt>B<parse_tree()>
-
- my $ptree = $pod_parser->parse_text( $pod_para->text() );
- $pod_para->parse_tree( $ptree );
- $ptree = $pod_para->parse_tree();
-
-This method will get/set the corresponding parse-tree of the paragraph's text.
-
-=cut
-
-sub parse_tree {
- (@_ > 1) and $_[0]->{'-ptree'} = $_[1];
- return $_[0]->{'-ptree'};
-}
-
-## let ptree() be an alias for parse_tree()
-*ptree = \&parse_tree;
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_para-E<gt>B<file_line()>
-
- my ($filename, $line_number) = $pod_para->file_line();
- my $position = $pod_para->file_line();
-
-Returns the current filename and line number for the paragraph
-object. If called in a list context, it returns a list of two
-elements: first the filename, then the line number. If called in
-a scalar context, it returns a string containing the filename, followed
-by a colon (':'), followed by the line number.
-
-=cut
-
-sub file_line {
- my @loc = ($_[0]->{'-file'} || '<unknown-file>',
- $_[0]->{'-line'} || 0);
- return (wantarray) ? @loc : join(':', @loc);
-}
-
-##---------------------------------------------------------------------------
-
-#############################################################################
-
-package Pod::InteriorSequence;
-
-##---------------------------------------------------------------------------
-
-=head1 B<Pod::InteriorSequence>
-
-An object representing a POD interior sequence command.
-It has the following methods/attributes:
-
-=cut
-
-##---------------------------------------------------------------------------
-
-=head2 Pod::InteriorSequence-E<gt>B<new()>
-
- my $pod_seq1 = Pod::InteriorSequence->new(-name => $cmd
- -ldelim => $delimiter);
- my $pod_seq2 = new Pod::InteriorSequence(-name => $cmd,
- -ldelim => $delimiter);
- my $pod_seq3 = new Pod::InteriorSequence(-name => $cmd,
- -ldelim => $delimiter,
- -file => $filename,
- -line => $line_number);
-
- my $pod_seq4 = new Pod::InteriorSequence(-name => $cmd, $ptree);
- my $pod_seq5 = new Pod::InteriorSequence($cmd, $ptree);
-
-This is a class method that constructs a C<Pod::InteriorSequence> object
-and returns a reference to the new interior sequence object. It should
-be given two keyword arguments. The C<-ldelim> keyword indicates the
-corresponding left-delimiter of the interior sequence (e.g. 'E<lt>').
-The C<-name> keyword indicates the name of the corresponding interior
-sequence command, such as C<I> or C<B> or C<C>. The C<-file> and
-C<-line> keywords indicate the filename and line number corresponding
-to the beginning of the interior sequence. If the C<$ptree> argument is
-given, it must be the last argument, and it must be either string, or
-else an array-ref suitable for passing to B<Pod::ParseTree::new> (or
-it may be a reference to a Pod::ParseTree object).
-
-=cut
-
-sub new {
- ## Determine if we were called via an object-ref or a classname
- my $this = shift;
- my $class = ref($this) || $this;
-
- ## See if first argument has no keyword
- if (((@_ <= 2) or (@_ % 2)) and $_[0] !~ /^-\w/) {
- ## Yup - need an implicit '-name' before first parameter
- unshift @_, '-name';
- }
-
- ## See if odd number of args
- if ((@_ % 2) != 0) {
- ## Yup - need an implicit '-ptree' before the last parameter
- splice @_, $#_, 0, '-ptree';
- }
-
- ## Any remaining arguments are treated as initial values for the
- ## hash that is used to represent this object. Note that we default
- ## certain values by specifying them *before* the arguments passed.
- ## If they are in the argument list, they will override the defaults.
- my $self = {
- -name => (@_ == 1) ? $_[0] : undef,
- -file => '<unknown-file>',
- -line => 0,
- -ldelim => '<',
- -rdelim => '>',
- @_
- };
-
- ## Initialize contents if they havent been already
- my $ptree = $self->{'-ptree'} || new Pod::ParseTree();
- if ( ref $ptree =~ /^(ARRAY)?$/ ) {
- ## We have an array-ref, or a normal scalar. Pass it as an
- ## an argument to the ptree-constructor
- $ptree = new Pod::ParseTree($1 ? [$ptree] : $ptree);
- }
- $self->{'-ptree'} = $ptree;
-
- ## Bless ourselves into the desired class and perform any initialization
- bless $self, $class;
- return $self;
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_seq-E<gt>B<cmd_name()>
-
- my $seq_cmd = $pod_seq->cmd_name();
-
-The name of the interior sequence command.
-
-=cut
-
-sub cmd_name {
- (@_ > 1) and $_[0]->{'-name'} = $_[1];
- return $_[0]->{'-name'};
-}
-
-## let name() be an alias for cmd_name()
-*name = \&cmd_name;
-
-##---------------------------------------------------------------------------
-
-## Private subroutine to set the parent pointer of all the given
-## children that are interior-sequences to be $self
-
-sub _set_child2parent_links {
- my ($self, @children) = @_;
- ## Make sure any sequences know who their parent is
- for (@children) {
- next unless (length and ref and ref ne 'SCALAR');
- if (UNIVERSAL::isa($_, 'Pod::InteriorSequence') or
- UNIVERSAL::can($_, 'nested'))
- {
- $_->nested($self);
- }
- }
-}
-
-## Private subroutine to unset child->parent links
-
-sub _unset_child2parent_links {
- my $self = shift;
- $self->{'-parent_sequence'} = undef;
- my $ptree = $self->{'-ptree'};
- for (@$ptree) {
- next unless (length and ref and ref ne 'SCALAR');
- $_->_unset_child2parent_links()
- if UNIVERSAL::isa($_, 'Pod::InteriorSequence');
- }
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_seq-E<gt>B<prepend()>
-
- $pod_seq->prepend($text);
- $pod_seq1->prepend($pod_seq2);
-
-Prepends the given string or parse-tree or sequence object to the parse-tree
-of this interior sequence.
-
-=cut
-
-sub prepend {
- my $self = shift;
- $self->{'-ptree'}->prepend(@_);
- _set_child2parent_links($self, @_);
- return $self;
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_seq-E<gt>B<append()>
-
- $pod_seq->append($text);
- $pod_seq1->append($pod_seq2);
-
-Appends the given string or parse-tree or sequence object to the parse-tree
-of this interior sequence.
-
-=cut
-
-sub append {
- my $self = shift;
- $self->{'-ptree'}->append(@_);
- _set_child2parent_links($self, @_);
- return $self;
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_seq-E<gt>B<nested()>
-
- $outer_seq = $pod_seq->nested || print "not nested";
-
-If this interior sequence is nested inside of another interior
-sequence, then the outer/parent sequence that contains it is
-returned. Otherwise C<undef> is returned.
-
-=cut
-
-sub nested {
- my $self = shift;
- (@_ == 1) and $self->{'-parent_sequence'} = shift;
- return $self->{'-parent_sequence'} || undef;
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_seq-E<gt>B<raw_text()>
-
- my $seq_raw_text = $pod_seq->raw_text();
-
-This method will return the I<raw> text of the POD interior sequence,
-exactly as it appeared in the input.
-
-=cut
-
-sub raw_text {
- my $self = shift;
- my $text = $self->{'-name'} . $self->{'-ldelim'};
- for ( $self->{'-ptree'}->children ) {
- $text .= (ref $_) ? $_->raw_text : $_;
- }
- $text .= $self->{'-rdelim'};
- return $text;
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_seq-E<gt>B<left_delimiter()>
-
- my $ldelim = $pod_seq->left_delimiter();
-
-The leftmost delimiter beginning the argument text to the interior
-sequence (should be "<").
-
-=cut
-
-sub left_delimiter {
- (@_ > 1) and $_[0]->{'-ldelim'} = $_[1];
- return $_[0]->{'-ldelim'};
-}
-
-## let ldelim() be an alias for left_delimiter()
-*ldelim = \&left_delimiter;
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_seq-E<gt>B<right_delimiter()>
-
-The rightmost delimiter beginning the argument text to the interior
-sequence (should be ">").
-
-=cut
-
-sub right_delimiter {
- (@_ > 1) and $_[0]->{'-rdelim'} = $_[1];
- return $_[0]->{'-rdelim'};
-}
-
-## let rdelim() be an alias for right_delimiter()
-*rdelim = \&right_delimiter;
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_seq-E<gt>B<parse_tree()>
-
- my $ptree = $pod_parser->parse_text($paragraph_text);
- $pod_seq->parse_tree( $ptree );
- $ptree = $pod_seq->parse_tree();
-
-This method will get/set the corresponding parse-tree of the interior
-sequence's text.
-
-=cut
-
-sub parse_tree {
- (@_ > 1) and $_[0]->{'-ptree'} = $_[1];
- return $_[0]->{'-ptree'};
-}
-
-## let ptree() be an alias for parse_tree()
-*ptree = \&parse_tree;
-
-##---------------------------------------------------------------------------
-
-=head2 $pod_seq-E<gt>B<file_line()>
-
- my ($filename, $line_number) = $pod_seq->file_line();
- my $position = $pod_seq->file_line();
-
-Returns the current filename and line number for the interior sequence
-object. If called in a list context, it returns a list of two
-elements: first the filename, then the line number. If called in
-a scalar context, it returns a string containing the filename, followed
-by a colon (':'), followed by the line number.
-
-=cut
-
-sub file_line {
- my @loc = ($_[0]->{'-file'} || '<unknown-file>',
- $_[0]->{'-line'} || 0);
- return (wantarray) ? @loc : join(':', @loc);
-}
-
-##---------------------------------------------------------------------------
-
-=head2 Pod::InteriorSequence::B<DESTROY()>
-
-This method performs any necessary cleanup for the interior-sequence.
-If you override this method then it is B<imperative> that you invoke
-the parent method from within your own method, otherwise
-I<interior-sequence storage will not be reclaimed upon destruction!>
-
-=cut
-
-sub DESTROY {
- ## We need to get rid of all child->parent pointers throughout the
- ## tree so their reference counts will go to zero and they can be
- ## garbage-collected
- _unset_child2parent_links(@_);
-}
-
-##---------------------------------------------------------------------------
-
-#############################################################################
-
-package Pod::ParseTree;
-
-##---------------------------------------------------------------------------
-
-=head1 B<Pod::ParseTree>
-
-This object corresponds to a tree of parsed POD text. As POD text is
-scanned from left to right, it is parsed into an ordered list of
-text-strings and B<Pod::InteriorSequence> objects (in order of
-appearance). A B<Pod::ParseTree> object corresponds to this list of
-strings and sequences. Each interior sequence in the parse-tree may
-itself contain a parse-tree (since interior sequences may be nested).
-
-=cut
-
-##---------------------------------------------------------------------------
-
-=head2 Pod::ParseTree-E<gt>B<new()>
-
- my $ptree1 = Pod::ParseTree->new;
- my $ptree2 = new Pod::ParseTree;
- my $ptree4 = Pod::ParseTree->new($array_ref);
- my $ptree3 = new Pod::ParseTree($array_ref);
-
-This is a class method that constructs a C<Pod::Parse_tree> object and
-returns a reference to the new parse-tree. If a single-argument is given,
-it must be a reference to an array, and is used to initialize the root
-(top) of the parse tree.
-
-=cut
-
-sub new {
- ## Determine if we were called via an object-ref or a classname
- my $this = shift;
- my $class = ref($this) || $this;
-
- my $self = (@_ == 1 and ref $_[0]) ? $_[0] : [];
-
- ## Bless ourselves into the desired class and perform any initialization
- bless $self, $class;
- return $self;
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $ptree-E<gt>B<top()>
-
- my $top_node = $ptree->top();
- $ptree->top( $top_node );
- $ptree->top( @children );
-
-This method gets/sets the top node of the parse-tree. If no arguments are
-given, it returns the topmost node in the tree (the root), which is also
-a B<Pod::ParseTree>. If it is given a single argument that is a reference,
-then the reference is assumed to a parse-tree and becomes the new top node.
-Otherwise, if arguments are given, they are treated as the new list of
-children for the top node.
-
-=cut
-
-sub top {
- my $self = shift;
- if (@_ > 0) {
- @{ $self } = (@_ == 1 and ref $_[0]) ? ${ @_ } : @_;
- }
- return $self;
-}
-
-## let parse_tree() & ptree() be aliases for the 'top' method
-*parse_tree = *ptree = \⊤
-
-##---------------------------------------------------------------------------
-
-=head2 $ptree-E<gt>B<children()>
-
-This method gets/sets the children of the top node in the parse-tree.
-If no arguments are given, it returns the list (array) of children
-(each of which should be either a string or a B<Pod::InteriorSequence>.
-Otherwise, if arguments are given, they are treated as the new list of
-children for the top node.
-
-=cut
-
-sub children {
- my $self = shift;
- if (@_ > 0) {
- @{ $self } = (@_ == 1 and ref $_[0]) ? ${ @_ } : @_;
- }
- return @{ $self };
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $ptree-E<gt>B<prepend()>
-
-This method prepends the given text or parse-tree to the current parse-tree.
-If the first item on the parse-tree is text and the argument is also text,
-then the text is prepended to the first item (not added as a separate string).
-Otherwise the argument is added as a new string or parse-tree I<before>
-the current one.
-
-=cut
-
-use vars qw(@ptree); ## an alias used for performance reasons
-
-sub prepend {
- my $self = shift;
- local *ptree = $self;
- for (@_) {
- next unless length;
- if (@ptree && !(ref $ptree[0]) && !(ref $_)) {
- $ptree[0] = $_ . $ptree[0];
- }
- else {
- unshift @ptree, $_;
- }
- }
-}
-
-##---------------------------------------------------------------------------
-
-=head2 $ptree-E<gt>B<append()>
-
-This method appends the given text or parse-tree to the current parse-tree.
-If the last item on the parse-tree is text and the argument is also text,
-then the text is appended to the last item (not added as a separate string).
-Otherwise the argument is added as a new string or parse-tree I<after>
-the current one.
-
-=cut
-
-sub append {
- my $self = shift;
- local *ptree = $self;
- my $can_append = @ptree && !(ref $ptree[-1]);
- for (@_) {
- if (ref) {
- push @ptree, $_;
- }
- elsif(!length) {
- next;
- }
- elsif ($can_append) {
- $ptree[-1] .= $_;
- }
- else {
- push @ptree, $_;
- }
- }
-}
-
-=head2 $ptree-E<gt>B<raw_text()>
-
- my $ptree_raw_text = $ptree->raw_text();
-
-This method will return the I<raw> text of the POD parse-tree
-exactly as it appeared in the input.
-
-=cut
-
-sub raw_text {
- my $self = shift;
- my $text = '';
- for ( @$self ) {
- $text .= (ref $_) ? $_->raw_text : $_;
- }
- return $text;
-}
-
-##---------------------------------------------------------------------------
-
-## Private routines to set/unset child->parent links
-
-sub _unset_child2parent_links {
- my $self = shift;
- local *ptree = $self;
- for (@ptree) {
- next unless (defined and length and ref and ref ne 'SCALAR');
- $_->_unset_child2parent_links()
- if UNIVERSAL::isa($_, 'Pod::InteriorSequence');
- }
-}
-
-sub _set_child2parent_links {
- ## nothing to do, Pod::ParseTrees cant have parent pointers
-}
-
-=head2 Pod::ParseTree::B<DESTROY()>
-
-This method performs any necessary cleanup for the parse-tree.
-If you override this method then it is B<imperative>
-that you invoke the parent method from within your own method,
-otherwise I<parse-tree storage will not be reclaimed upon destruction!>
-
-=cut
-
-sub DESTROY {
- ## We need to get rid of all child->parent pointers throughout the
- ## tree so their reference counts will go to zero and they can be
- ## garbage-collected
- _unset_child2parent_links(@_);
-}
-
-#############################################################################
-
-=head1 SEE ALSO
-
-See L<Pod::Parser>, L<Pod::Select>
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Brad Appleton E<lt>bradapp at enteract.comE<gt>
-
-=cut
-
-1;
Deleted: vendor/perl/dist/lib/Pod/LaTeX.pm
===================================================================
--- vendor/perl/dist/lib/Pod/LaTeX.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/LaTeX.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1876 +0,0 @@
-package Pod::LaTeX;
-
-=head1 NAME
-
-Pod::LaTeX - Convert Pod data to formatted Latex
-
-=head1 SYNOPSIS
-
- use Pod::LaTeX;
- my $parser = Pod::LaTeX->new ( );
-
- $parser->parse_from_filehandle;
-
- $parser->parse_from_file ('file.pod', 'file.tex');
-
-=head1 DESCRIPTION
-
-C<Pod::LaTeX> is a module to convert documentation in the Pod format
-into Latex. The L<B<pod2latex>|pod2latex> X<pod2latex> command uses
-this module for translation.
-
-C<Pod::LaTeX> is a derived class from L<Pod::Select|Pod::Select>.
-
-=cut
-
-
-use strict;
-require Pod::ParseUtils;
-use base qw/ Pod::Select /;
-
-# use Data::Dumper; # for debugging
-use Carp;
-
-use vars qw/ $VERSION %HTML_Escapes @LatexSections /;
-
-$VERSION = '0.58';
-
-# Definitions of =headN -> latex mapping
- at LatexSections = (qw/
- chapter
- section
- subsection
- subsubsection
- paragraph
- subparagraph
- /);
-
-# Standard escape sequences converted to Latex.
-# The Unicode name of each character is given in the comments.
-# Complete LaTeX set added by Peter Acklam.
-
-%HTML_Escapes = (
- 'sol' => '\textfractionsolidus{}', # xxx - or should it be just '/'
- 'verbar' => '|',
-
- # The stuff below is based on the information available at
- # http://www.w3.org/TR/html401/sgml/entities.html
-
- # All characters in the range 0xA0-0xFF of the ISO 8859-1 character set.
- # Several of these characters require the `textcomp' LaTeX package.
- 'nbsp' => q|~|, # 0xA0 - no-break space = non-breaking space
- 'iexcl' => q|\textexclamdown{}|, # 0xA1 - inverted exclamation mark
- 'cent' => q|\textcent{}|, # 0xA2 - cent sign
- 'pound' => q|\textsterling{}|, # 0xA3 - pound sign
- 'curren' => q|\textcurrency{}|, # 0xA4 - currency sign
- 'yen' => q|\textyen{}|, # 0xA5 - yen sign = yuan sign
- 'brvbar' => q|\textbrokenbar{}|, # 0xA6 - broken bar = broken vertical bar
- 'sect' => q|\textsection{}|, # 0xA7 - section sign
- 'uml' => q|\textasciidieresis{}|, # 0xA8 - diaeresis = spacing diaeresis
- 'copy' => q|\textcopyright{}|, # 0xA9 - copyright sign
- 'ordf' => q|\textordfeminine{}|, # 0xAA - feminine ordinal indicator
- 'laquo' => q|\guillemotleft{}|, # 0xAB - left-pointing double angle quotation mark = left pointing guillemet
- 'not' => q|\textlnot{}|, # 0xAC - not sign
- 'shy' => q|\-|, # 0xAD - soft hyphen = discretionary hyphen
- 'reg' => q|\textregistered{}|, # 0xAE - registered sign = registered trade mark sign
- 'macr' => q|\textasciimacron{}|, # 0xAF - macron = spacing macron = overline = APL overbar
- 'deg' => q|\textdegree{}|, # 0xB0 - degree sign
- 'plusmn' => q|\textpm{}|, # 0xB1 - plus-minus sign = plus-or-minus sign
- 'sup2' => q|\texttwosuperior{}|, # 0xB2 - superscript two = superscript digit two = squared
- 'sup3' => q|\textthreesuperior{}|, # 0xB3 - superscript three = superscript digit three = cubed
- 'acute' => q|\textasciiacute{}|, # 0xB4 - acute accent = spacing acute
- 'micro' => q|\textmu{}|, # 0xB5 - micro sign
- 'para' => q|\textparagraph{}|, # 0xB6 - pilcrow sign = paragraph sign
- 'middot' => q|\textperiodcentered{}|, # 0xB7 - middle dot = Georgian comma = Greek middle dot
- 'cedil' => q|\c{}|, # 0xB8 - cedilla = spacing cedilla
- 'sup1' => q|\textonesuperior{}|, # 0xB9 - superscript one = superscript digit one
- 'ordm' => q|\textordmasculine{}|, # 0xBA - masculine ordinal indicator
- 'raquo' => q|\guillemotright{}|, # 0xBB - right-pointing double angle quotation mark = right pointing guillemet
- 'frac14' => q|\textonequarter{}|, # 0xBC - vulgar fraction one quarter = fraction one quarter
- 'frac12' => q|\textonehalf{}|, # 0xBD - vulgar fraction one half = fraction one half
- 'frac34' => q|\textthreequarters{}|, # 0xBE - vulgar fraction three quarters = fraction three quarters
- 'iquest' => q|\textquestiondown{}|, # 0xBF - inverted question mark = turned question mark
- 'Agrave' => q|\`A|, # 0xC0 - latin capital letter A with grave = latin capital letter A grave
- 'Aacute' => q|\'A|, # 0xC1 - latin capital letter A with acute
- 'Acirc' => q|\^A|, # 0xC2 - latin capital letter A with circumflex
- 'Atilde' => q|\~A|, # 0xC3 - latin capital letter A with tilde
- 'Auml' => q|\"A|, # 0xC4 - latin capital letter A with diaeresis
- 'Aring' => q|\AA{}|, # 0xC5 - latin capital letter A with ring above = latin capital letter A ring
- 'AElig' => q|\AE{}|, # 0xC6 - latin capital letter AE = latin capital ligature AE
- 'Ccedil' => q|\c{C}|, # 0xC7 - latin capital letter C with cedilla
- 'Egrave' => q|\`E|, # 0xC8 - latin capital letter E with grave
- 'Eacute' => q|\'E|, # 0xC9 - latin capital letter E with acute
- 'Ecirc' => q|\^E|, # 0xCA - latin capital letter E with circumflex
- 'Euml' => q|\"E|, # 0xCB - latin capital letter E with diaeresis
- 'Igrave' => q|\`I|, # 0xCC - latin capital letter I with grave
- 'Iacute' => q|\'I|, # 0xCD - latin capital letter I with acute
- 'Icirc' => q|\^I|, # 0xCE - latin capital letter I with circumflex
- 'Iuml' => q|\"I|, # 0xCF - latin capital letter I with diaeresis
- 'ETH' => q|\DH{}|, # 0xD0 - latin capital letter ETH
- 'Ntilde' => q|\~N|, # 0xD1 - latin capital letter N with tilde
- 'Ograve' => q|\`O|, # 0xD2 - latin capital letter O with grave
- 'Oacute' => q|\'O|, # 0xD3 - latin capital letter O with acute
- 'Ocirc' => q|\^O|, # 0xD4 - latin capital letter O with circumflex
- 'Otilde' => q|\~O|, # 0xD5 - latin capital letter O with tilde
- 'Ouml' => q|\"O|, # 0xD6 - latin capital letter O with diaeresis
- 'times' => q|\texttimes{}|, # 0xD7 - multiplication sign
- 'Oslash' => q|\O{}|, # 0xD8 - latin capital letter O with stroke = latin capital letter O slash
- 'Ugrave' => q|\`U|, # 0xD9 - latin capital letter U with grave
- 'Uacute' => q|\'U|, # 0xDA - latin capital letter U with acute
- 'Ucirc' => q|\^U|, # 0xDB - latin capital letter U with circumflex
- 'Uuml' => q|\"U|, # 0xDC - latin capital letter U with diaeresis
- 'Yacute' => q|\'Y|, # 0xDD - latin capital letter Y with acute
- 'THORN' => q|\TH{}|, # 0xDE - latin capital letter THORN
- 'szlig' => q|\ss{}|, # 0xDF - latin small letter sharp s = ess-zed
- 'agrave' => q|\`a|, # 0xE0 - latin small letter a with grave = latin small letter a grave
- 'aacute' => q|\'a|, # 0xE1 - latin small letter a with acute
- 'acirc' => q|\^a|, # 0xE2 - latin small letter a with circumflex
- 'atilde' => q|\~a|, # 0xE3 - latin small letter a with tilde
- 'auml' => q|\"a|, # 0xE4 - latin small letter a with diaeresis
- 'aring' => q|\aa{}|, # 0xE5 - latin small letter a with ring above = latin small letter a ring
- 'aelig' => q|\ae{}|, # 0xE6 - latin small letter ae = latin small ligature ae
- 'ccedil' => q|\c{c}|, # 0xE7 - latin small letter c with cedilla
- 'egrave' => q|\`e|, # 0xE8 - latin small letter e with grave
- 'eacute' => q|\'e|, # 0xE9 - latin small letter e with acute
- 'ecirc' => q|\^e|, # 0xEA - latin small letter e with circumflex
- 'euml' => q|\"e|, # 0xEB - latin small letter e with diaeresis
- 'igrave' => q|\`i|, # 0xEC - latin small letter i with grave
- 'iacute' => q|\'i|, # 0xED - latin small letter i with acute
- 'icirc' => q|\^i|, # 0xEE - latin small letter i with circumflex
- 'iuml' => q|\"i|, # 0xEF - latin small letter i with diaeresis
- 'eth' => q|\dh{}|, # 0xF0 - latin small letter eth
- 'ntilde' => q|\~n|, # 0xF1 - latin small letter n with tilde
- 'ograve' => q|\`o|, # 0xF2 - latin small letter o with grave
- 'oacute' => q|\'o|, # 0xF3 - latin small letter o with acute
- 'ocirc' => q|\^o|, # 0xF4 - latin small letter o with circumflex
- 'otilde' => q|\~o|, # 0xF5 - latin small letter o with tilde
- 'ouml' => q|\"o|, # 0xF6 - latin small letter o with diaeresis
- 'divide' => q|\textdiv{}|, # 0xF7 - division sign
- 'oslash' => q|\o{}|, # 0xF8 - latin small letter o with stroke, = latin small letter o slash
- 'ugrave' => q|\`u|, # 0xF9 - latin small letter u with grave
- 'uacute' => q|\'u|, # 0xFA - latin small letter u with acute
- 'ucirc' => q|\^u|, # 0xFB - latin small letter u with circumflex
- 'uuml' => q|\"u|, # 0xFC - latin small letter u with diaeresis
- 'yacute' => q|\'y|, # 0xFD - latin small letter y with acute
- 'thorn' => q|\th{}|, # 0xFE - latin small letter thorn
- 'yuml' => q|\"y|, # 0xFF - latin small letter y with diaeresis
-
- # Latin Extended-B
- 'fnof' => q|\textflorin{}|, # latin small f with hook = function = florin
-
- # Greek
- 'Alpha' => q|$\mathrm{A}$|, # greek capital letter alpha
- 'Beta' => q|$\mathrm{B}$|, # greek capital letter beta
- 'Gamma' => q|$\Gamma$|, # greek capital letter gamma
- 'Delta' => q|$\Delta$|, # greek capital letter delta
- 'Epsilon' => q|$\mathrm{E}$|, # greek capital letter epsilon
- 'Zeta' => q|$\mathrm{Z}$|, # greek capital letter zeta
- 'Eta' => q|$\mathrm{H}$|, # greek capital letter eta
- 'Theta' => q|$\Theta$|, # greek capital letter theta
- 'Iota' => q|$\mathrm{I}$|, # greek capital letter iota
- 'Kappa' => q|$\mathrm{K}$|, # greek capital letter kappa
- 'Lambda' => q|$\Lambda$|, # greek capital letter lambda
- 'Mu' => q|$\mathrm{M}$|, # greek capital letter mu
- 'Nu' => q|$\mathrm{N}$|, # greek capital letter nu
- 'Xi' => q|$\Xi$|, # greek capital letter xi
- 'Omicron' => q|$\mathrm{O}$|, # greek capital letter omicron
- 'Pi' => q|$\Pi$|, # greek capital letter pi
- 'Rho' => q|$\mathrm{R}$|, # greek capital letter rho
- 'Sigma' => q|$\Sigma$|, # greek capital letter sigma
- 'Tau' => q|$\mathrm{T}$|, # greek capital letter tau
- 'Upsilon' => q|$\Upsilon$|, # greek capital letter upsilon
- 'Phi' => q|$\Phi$|, # greek capital letter phi
- 'Chi' => q|$\mathrm{X}$|, # greek capital letter chi
- 'Psi' => q|$\Psi$|, # greek capital letter psi
- 'Omega' => q|$\Omega$|, # greek capital letter omega
-
- 'alpha' => q|$\alpha$|, # greek small letter alpha
- 'beta' => q|$\beta$|, # greek small letter beta
- 'gamma' => q|$\gamma$|, # greek small letter gamma
- 'delta' => q|$\delta$|, # greek small letter delta
- 'epsilon' => q|$\epsilon$|, # greek small letter epsilon
- 'zeta' => q|$\zeta$|, # greek small letter zeta
- 'eta' => q|$\eta$|, # greek small letter eta
- 'theta' => q|$\theta$|, # greek small letter theta
- 'iota' => q|$\iota$|, # greek small letter iota
- 'kappa' => q|$\kappa$|, # greek small letter kappa
- 'lambda' => q|$\lambda$|, # greek small letter lambda
- 'mu' => q|$\mu$|, # greek small letter mu
- 'nu' => q|$\nu$|, # greek small letter nu
- 'xi' => q|$\xi$|, # greek small letter xi
- 'omicron' => q|$o$|, # greek small letter omicron
- 'pi' => q|$\pi$|, # greek small letter pi
- 'rho' => q|$\rho$|, # greek small letter rho
-# 'sigmaf' => q||, # greek small letter final sigma
- 'sigma' => q|$\sigma$|, # greek small letter sigma
- 'tau' => q|$\tau$|, # greek small letter tau
- 'upsilon' => q|$\upsilon$|, # greek small letter upsilon
- 'phi' => q|$\phi$|, # greek small letter phi
- 'chi' => q|$\chi$|, # greek small letter chi
- 'psi' => q|$\psi$|, # greek small letter psi
- 'omega' => q|$\omega$|, # greek small letter omega
-# 'thetasym' => q||, # greek small letter theta symbol
-# 'upsih' => q||, # greek upsilon with hook symbol
-# 'piv' => q||, # greek pi symbol
-
- # General Punctuation
- 'bull' => q|\textbullet{}|, # bullet = black small circle
- # bullet is NOT the same as bullet operator
- 'hellip' => q|\textellipsis{}|, # horizontal ellipsis = three dot leader
- 'prime' => q|\textquotesingle{}|, # prime = minutes = feet
- 'Prime' => q|\textquotedbl{}|, # double prime = seconds = inches
- 'oline' => q|\textasciimacron{}|, # overline = spacing overscore
- 'frasl' => q|\textfractionsolidus{}|, # fraction slash
-
- # Letterlike Symbols
- 'weierp' => q|$\wp$|, # script capital P = power set = Weierstrass p
- 'image' => q|$\Re$|, # blackletter capital I = imaginary part
- 'real' => q|$\Im$|, # blackletter capital R = real part symbol
- 'trade' => q|\texttrademark{}|, # trade mark sign
-# 'alefsym' => q||, # alef symbol = first transfinite cardinal
- # alef symbol is NOT the same as hebrew letter alef, although the same
- # glyph could be used to depict both characters
-
- # Arrows
- 'larr' => q|\textleftarrow{}|, # leftwards arrow
- 'uarr' => q|\textuparrow{}|, # upwards arrow
- 'rarr' => q|\textrightarrow{}|, # rightwards arrow
- 'darr' => q|\textdownarrow{}|, # downwards arrow
- 'harr' => q|$\leftrightarrow$|, # left right arrow
-# 'crarr' => q||, # downwards arrow with corner leftwards = carriage return
- 'lArr' => q|$\Leftarrow$|, # leftwards double arrow
- # ISO 10646 does not say that lArr is the same as the 'is implied by'
- # arrow but also does not have any other character for that function. So
- # lArr can be used for 'is implied by' as ISOtech suggests
- 'uArr' => q|$\Uparrow$|, # upwards double arrow
- 'rArr' => q|$\Rightarrow$|, # rightwards double arrow
- # ISO 10646 does not say this is the 'implies' character but does not
- # have another character with this function so ? rArr can be used for
- # 'implies' as ISOtech suggests
- 'dArr' => q|$\Downarrow$|, # downwards double arrow
- 'hArr' => q|$\Leftrightarrow$|, # left right double arrow
-
- # Mathematical Operators.
- # Some of these require the `amssymb' package.
- 'forall' => q|$\forall$|, # for all
- 'part' => q|$\partial$|, # partial differential
- 'exist' => q|$\exists$|, # there exists
- 'empty' => q|$\emptyset$|, # empty set = null set = diameter
- 'nabla' => q|$\nabla$|, # nabla = backward difference
- 'isin' => q|$\in$|, # element of
- 'notin' => q|$\notin$|, # not an element of
- 'ni' => q|$\ni$|, # contains as member
- 'prod' => q|$\prod$|, # n-ary product = product sign
- # prod is NOT the same character as 'greek capital letter pi' though the
- # same glyph might be used for both
- 'sum' => q|$\sum$|, # n-ary sumation
- # sum is NOT the same character as 'greek capital letter sigma' though
- # the same glyph might be used for both
- 'minus' => q|$-$|, # minus sign
- 'lowast' => q|$\ast$|, # asterisk operator
- 'radic' => q|$\surd$|, # square root = radical sign
- 'prop' => q|$\propto$|, # proportional to
- 'infin' => q|$\infty$|, # infinity
- 'ang' => q|$\angle$|, # angle
- 'and' => q|$\wedge$|, # logical and = wedge
- 'or' => q|$\vee$|, # logical or = vee
- 'cap' => q|$\cap$|, # intersection = cap
- 'cup' => q|$\cup$|, # union = cup
- 'int' => q|$\int$|, # integral
- 'there4' => q|$\therefore$|, # therefore
- 'sim' => q|$\sim$|, # tilde operator = varies with = similar to
- # tilde operator is NOT the same character as the tilde
- 'cong' => q|$\cong$|, # approximately equal to
- 'asymp' => q|$\asymp$|, # almost equal to = asymptotic to
- 'ne' => q|$\neq$|, # not equal to
- 'equiv' => q|$\equiv$|, # identical to
- 'le' => q|$\leq$|, # less-than or equal to
- 'ge' => q|$\geq$|, # greater-than or equal to
- 'sub' => q|$\subset$|, # subset of
- 'sup' => q|$\supset$|, # superset of
- # note that nsup, 'not a superset of' is not covered by the Symbol font
- # encoding and is not included.
- 'nsub' => q|$\not\subset$|, # not a subset of
- 'sube' => q|$\subseteq$|, # subset of or equal to
- 'supe' => q|$\supseteq$|, # superset of or equal to
- 'oplus' => q|$\oplus$|, # circled plus = direct sum
- 'otimes' => q|$\otimes$|, # circled times = vector product
- 'perp' => q|$\perp$|, # up tack = orthogonal to = perpendicular
- 'sdot' => q|$\cdot$|, # dot operator
- # dot operator is NOT the same character as middle dot
-
- # Miscellaneous Technical
- 'lceil' => q|$\lceil$|, # left ceiling = apl upstile
- 'rceil' => q|$\rceil$|, # right ceiling
- 'lfloor' => q|$\lfloor$|, # left floor = apl downstile
- 'rfloor' => q|$\rfloor$|, # right floor
- 'lang' => q|$\langle$|, # left-pointing angle bracket = bra
- # lang is NOT the same character as 'less than' or 'single left-pointing
- # angle quotation mark'
- 'rang' => q|$\rangle$|, # right-pointing angle bracket = ket
- # rang is NOT the same character as 'greater than' or 'single
- # right-pointing angle quotation mark'
-
- # Geometric Shapes
- 'loz' => q|$\lozenge$|, # lozenge
-
- # Miscellaneous Symbols
- 'spades' => q|$\spadesuit$|, # black spade suit
- 'clubs' => q|$\clubsuit$|, # black club suit = shamrock
- 'hearts' => q|$\heartsuit$|, # black heart suit = valentine
- 'diams' => q|$\diamondsuit$|, # black diamond suit
-
- # C0 Controls and Basic Latin
- 'quot' => q|"|, # quotation mark = APL quote ["]
- 'amp' => q|\&|, # ampersand
- 'lt' => q|<|, # less-than sign
- 'gt' => q|>|, # greater-than sign
- 'OElig' => q|\OE{}|, # latin capital ligature OE
- 'oelig' => q|\oe{}|, # latin small ligature oe
- 'Scaron' => q|\v{S}|, # latin capital letter S with caron
- 'scaron' => q|\v{s}|, # latin small letter s with caron
- 'Yuml' => q|\"Y|, # latin capital letter Y with diaeresis
- 'circ' => q|\textasciicircum{}|, # modifier letter circumflex accent
- 'tilde' => q|\textasciitilde{}|, # small tilde
- 'ensp' => q|\phantom{n}|, # en space
- 'emsp' => q|\hspace{1em}|, # em space
- 'thinsp' => q|\,|, # thin space
- 'zwnj' => q|{}|, # zero width non-joiner
-# 'zwj' => q||, # zero width joiner
-# 'lrm' => q||, # left-to-right mark
-# 'rlm' => q||, # right-to-left mark
- 'ndash' => q|--|, # en dash
- 'mdash' => q|---|, # em dash
- 'lsquo' => q|\textquoteleft{}|, # left single quotation mark
- 'rsquo' => q|\textquoteright{}|, # right single quotation mark
- 'sbquo' => q|\quotesinglbase{}|, # single low-9 quotation mark
- 'ldquo' => q|\textquotedblleft{}|, # left double quotation mark
- 'rdquo' => q|\textquotedblright{}|, # right double quotation mark
- 'bdquo' => q|\quotedblbase{}|, # double low-9 quotation mark
- 'dagger' => q|\textdagger{}|, # dagger
- 'Dagger' => q|\textdaggerdbl{}|, # double dagger
- 'permil' => q|\textperthousand{}|, # per mille sign
- 'lsaquo' => q|\guilsinglleft{}|, # single left-pointing angle quotation mark
- 'rsaquo' => q|\guilsinglright{}|, # single right-pointing angle quotation mark
- 'euro' => q|\texteuro{}|, # euro sign
-);
-
-=head1 OBJECT METHODS
-
-The following methods are provided in this module. Methods inherited
-from C<Pod::Select> are not described in the public interface.
-
-=over 4
-
-=begin __PRIVATE__
-
-=item C<initialize>
-
-Initialise the object. This method is subclassed from C<Pod::Parser>.
-The base class method is invoked. This method defines the default
-behaviour of the object unless overridden by supplying arguments to
-the constructor.
-
-Internal settings are defaulted as well as the public instance data.
-Internal hash values are accessed directly (rather than through
-a method) and start with an underscore.
-
-This method should not be invoked by the user directly.
-
-=end __PRIVATE__
-
-=cut
-
-
-
-# - An array for nested lists
-
-# Arguments have already been read by this point
-
-sub initialize {
- my $self = shift;
-
- # print Dumper($self);
-
- # Internals
- $self->{_Lists} = []; # For nested lists
- $self->{_suppress_all_para} = 0; # For =begin blocks
- $self->{_dont_modify_any_para}=0; # For =begin blocks
- $self->{_CURRENT_HEAD1} = ''; # Name of current HEAD1 section
-
- # Options - only initialise if not already set
-
- # Cause the '=head1 NAME' field to be treated specially
- # The contents of the NAME paragraph will be converted
- # to a section title. All subsequent =head1 will be converted
- # to =head2 and down. Will not affect =head1's prior to NAME
- # Assumes: 'Module - purpose' format
- # Also creates a purpose field
- # The name is used for Labeling of the subsequent subsections
- $self->{ReplaceNAMEwithSection} = 0
- unless exists $self->{ReplaceNAMEwithSection};
- $self->{AddPreamble} = 1 # make full latex document
- unless exists $self->{AddPreamble};
- $self->{StartWithNewPage} = 0 # Start new page for pod section
- unless exists $self->{StartWithNewPage};
- $self->{TableOfContents} = 0 # Add table of contents
- unless exists $self->{TableOfContents}; # only relevent if AddPreamble=1
- $self->{AddPostamble} = 1 # Add closing latex code at end
- unless exists $self->{AddPostamble}; # effectively end{document} and index
- $self->{MakeIndex} = 1 # Add index (only relevant AddPostamble
- unless exists $self->{MakeIndex}; # and AddPreamble)
-
- $self->{UniqueLabels} = 1 # Use label unique for each pod
- unless exists $self->{UniqueLabels}; # either based on the filename
- # or supplied
-
- # Control the level of =head1. default is \section
- #
- $self->{Head1Level} = 1 # Offset in latex sections
- unless exists $self->{Head1Level}; # 0 is chapter, 2 is subsection
-
- # Control at which level numbering of sections is turned off
- # ie subsection becomes subsection*
- # The numbering is relative to the latex sectioning commands
- # and is independent of Pod heading level
- # default is to number \section but not \subsection
- $self->{LevelNoNum} = 2
- unless exists $self->{LevelNoNum};
-
- # Label to be used as prefix to all internal section names
- # If not defined will attempt to derive it from the filename
- # This can not happen when running parse_from_filehandle though
- # hence the ability to set the label externally
- # The label could then be Pod::Parser_DESCRIPTION or somesuch
-
- $self->{Label} = undef # label to be used as prefix
- unless exists $self->{Label}; # to all internal section names
-
- # These allow the caller to add arbritrary latex code to
- # start and end of document. AddPreamble and AddPostamble are ignored
- # if these are set.
- # Also MakeIndex and TableOfContents are also ignored.
- $self->{UserPreamble} = undef # User supplied start (AddPreamble =1)
- unless exists $self->{Label};
- $self->{UserPostamble} = undef # Use supplied end (AddPostamble=1)
- unless exists $self->{Label};
-
- # Run base initialize
- $self->SUPER::initialize;
-
-}
-
-=back
-
-=head2 Data Accessors
-
-The following methods are provided for accessing instance data. These
-methods should be used for accessing configuration parameters rather
-than assuming the object is a hash.
-
-Default values can be supplied by using these names as keys to a hash
-of arguments when using the C<new()> constructor.
-
-=over 4
-
-=item B<AddPreamble>
-
-Logical to control whether a C<latex> preamble is to be written.
-If true, a valid C<latex> preamble is written before the pod data is written.
-This is similar to:
-
- \documentclass{article}
- \usepackage[T1]{fontenc}
- \usepackage{textcomp}
- \begin{document}
-
-but will be more complicated if table of contents and indexing are required.
-Can be used to set or retrieve the current value.
-
- $add = $parser->AddPreamble();
- $parser->AddPreamble(1);
-
-If used in conjunction with C<AddPostamble> a full latex document will
-be written that could be immediately processed by C<latex>.
-
-For some pod escapes it may be necessary to include the amsmath
-package. This is not yet added to the preamble automaatically.
-
-=cut
-
-sub AddPreamble {
- my $self = shift;
- if (@_) {
- $self->{AddPreamble} = shift;
- }
- return $self->{AddPreamble};
-}
-
-=item B<AddPostamble>
-
-Logical to control whether a standard C<latex> ending is written to the output
-file after the document has been processed.
-In its simplest form this is simply:
-
- \end{document}
-
-but can be more complicated if a index is required.
-Can be used to set or retrieve the current value.
-
- $add = $parser->AddPostamble();
- $parser->AddPostamble(1);
-
-If used in conjunction with C<AddPreaamble> a full latex document will
-be written that could be immediately processed by C<latex>.
-
-=cut
-
-sub AddPostamble {
- my $self = shift;
- if (@_) {
- $self->{AddPostamble} = shift;
- }
- return $self->{AddPostamble};
-}
-
-=item B<Head1Level>
-
-The C<latex> sectioning level that should be used to correspond to
-a pod C<=head1> directive. This can be used, for example, to turn
-a C<=head1> into a C<latex> C<subsection>. This should hold a number
-corresponding to the required position in an array containing the
-following elements:
-
- [0] chapter
- [1] section
- [2] subsection
- [3] subsubsection
- [4] paragraph
- [5] subparagraph
-
-Can be used to set or retrieve the current value:
-
- $parser->Head1Level(2);
- $sect = $parser->Head1Level;
-
-Setting this number too high can result in sections that may not be reproducible
-in the expected way. For example, setting this to 4 would imply that C<=head3>
-do not have a corresponding C<latex> section (C<=head1> would correspond to
-a C<paragraph>).
-
-A check is made to ensure that the supplied value is an integer in the
-range 0 to 5.
-
-Default is for a value of 1 (i.e. a C<section>).
-
-=cut
-
-sub Head1Level {
- my $self = shift;
- if (@_) {
- my $arg = shift;
- if ($arg =~ /^\d$/ && $arg <= $#LatexSections) {
- $self->{Head1Level} = $arg;
- } else {
- carp "Head1Level supplied ($arg) must be integer in range 0 to ".$#LatexSections . "- Ignoring\n";
- }
- }
- return $self->{Head1Level};
-}
-
-=item B<Label>
-
-This is the label that is prefixed to all C<latex> label and index
-entries to make them unique. In general, pods have similarly titled
-sections (NAME, DESCRIPTION etc) and a C<latex> label will be multiply
-defined if more than one pod document is to be included in a single
-C<latex> file. To overcome this, this label is prefixed to a label
-whenever a label is required (joined with an underscore) or to an
-index entry (joined by an exclamation mark which is the normal index
-separator). For example, C<\label{text}> becomes C<\label{Label_text}>.
-
-Can be used to set or retrieve the current value:
-
- $label = $parser->Label;
- $parser->Label($label);
-
-This label is only used if C<UniqueLabels> is true.
-Its value is set automatically from the C<NAME> field
-if C<ReplaceNAMEwithSection> is true. If this is not the case
-it must be set manually before starting the parse.
-
-Default value is C<undef>.
-
-=cut
-
-sub Label {
- my $self = shift;
- if (@_) {
- $self->{Label} = shift;
- }
- return $self->{Label};
-}
-
-=item B<LevelNoNum>
-
-Control the point at which C<latex> section numbering is turned off.
-For example, this can be used to make sure that C<latex> sections
-are numbered but subsections are not.
-
-Can be used to set or retrieve the current value:
-
- $lev = $parser->LevelNoNum;
- $parser->LevelNoNum(2);
-
-The argument must be an integer between 0 and 5 and is the same as the
-number described in C<Head1Level> method description. The number has
-nothing to do with the pod heading number, only the C<latex> sectioning.
-
-Default is 2. (i.e. C<latex> subsections are written as C<subsection*>
-but sections are numbered).
-
-=cut
-
-sub LevelNoNum {
- my $self = shift;
- if (@_) {
- $self->{LevelNoNum} = shift;
- }
- return $self->{LevelNoNum};
-}
-
-=item B<MakeIndex>
-
-Controls whether C<latex> commands for creating an index are to be inserted
-into the preamble and postamble
-
- $makeindex = $parser->MakeIndex;
- $parser->MakeIndex(0);
-
-Irrelevant if both C<AddPreamble> and C<AddPostamble> are false (or equivalently,
-C<UserPreamble> and C<UserPostamble> are set).
-
-Default is for an index to be created.
-
-=cut
-
-sub MakeIndex {
- my $self = shift;
- if (@_) {
- $self->{MakeIndex} = shift;
- }
- return $self->{MakeIndex};
-}
-
-=item B<ReplaceNAMEwithSection>
-
-This controls whether the C<NAME> section in the pod is to be translated
-literally or converted to a slightly modified output where the section
-name is the pod name rather than "NAME".
-
-If true, the pod segment
-
- =head1 NAME
-
- pod::name - purpose
-
- =head1 SYNOPSIS
-
-is converted to the C<latex>
-
- \section{pod::name\label{pod_name}\index{pod::name}}
-
- Purpose
-
- \subsection*{SYNOPSIS\label{pod_name_SYNOPSIS}%
- \index{pod::name!SYNOPSIS}}
-
-(dependent on the value of C<Head1Level> and C<LevelNoNum>). Note that
-subsequent C<head1> directives translate to subsections rather than
-sections and that the labels and index now include the pod name (dependent
-on the value of C<UniqueLabels>).
-
-The C<Label> is set from the pod name regardless of any current value
-of C<Label>.
-
- $mod = $parser->ReplaceNAMEwithSection;
- $parser->ReplaceNAMEwithSection(0);
-
-Default is to translate the pod literally.
-
-=cut
-
-sub ReplaceNAMEwithSection {
- my $self = shift;
- if (@_) {
- $self->{ReplaceNAMEwithSection} = shift;
- }
- return $self->{ReplaceNAMEwithSection};
-}
-
-=item B<StartWithNewPage>
-
-If true, each pod translation will begin with a C<latex>
-C<\clearpage>.
-
- $parser->StartWithNewPage(1);
- $newpage = $parser->StartWithNewPage;
-
-Default is false.
-
-=cut
-
-sub StartWithNewPage {
- my $self = shift;
- if (@_) {
- $self->{StartWithNewPage} = shift;
- }
- return $self->{StartWithNewPage};
-}
-
-=item B<TableOfContents>
-
-If true, a table of contents will be created.
-Irrelevant if C<AddPreamble> is false or C<UserPreamble>
-is set.
-
- $toc = $parser->TableOfContents;
- $parser->TableOfContents(1);
-
-Default is false.
-
-=cut
-
-sub TableOfContents {
- my $self = shift;
- if (@_) {
- $self->{TableOfContents} = shift;
- }
- return $self->{TableOfContents};
-}
-
-=item B<UniqueLabels>
-
-If true, the translator will attempt to make sure that
-each C<latex> label or index entry will be uniquely identified
-by prefixing the contents of C<Label>. This allows
-multiple documents to be combined without clashing
-common labels such as C<DESCRIPTION> and C<SYNOPSIS>
-
- $parser->UniqueLabels(1);
- $unq = $parser->UniqueLabels;
-
-Default is true.
-
-=cut
-
-sub UniqueLabels {
- my $self = shift;
- if (@_) {
- $self->{UniqueLabels} = shift;
- }
- return $self->{UniqueLabels};
-}
-
-=item B<UserPreamble>
-
-User supplied C<latex> preamble. Added before the pod translation
-data.
-
-If set, the contents will be prepended to the output file before the translated
-data regardless of the value of C<AddPreamble>.
-C<MakeIndex> and C<TableOfContents> will also be ignored.
-
-=cut
-
-sub UserPreamble {
- my $self = shift;
- if (@_) {
- $self->{UserPreamble} = shift;
- }
- return $self->{UserPreamble};
-}
-
-=item B<UserPostamble>
-
-User supplied C<latex> postamble. Added after the pod translation
-data.
-
-If set, the contents will be prepended to the output file after the translated
-data regardless of the value of C<AddPostamble>.
-C<MakeIndex> will also be ignored.
-
-=cut
-
-sub UserPostamble {
- my $self = shift;
- if (@_) {
- $self->{UserPostamble} = shift;
- }
- return $self->{UserPostamble};
-}
-
-=begin __PRIVATE__
-
-=item B<Lists>
-
-Contains details of the currently active lists.
- The array contains C<Pod::List> objects. A new C<Pod::List>
-object is created each time a list is encountered and it is
-pushed onto this stack. When the list context ends, it
-is popped from the stack. The array will be empty if no
-lists are active.
-
-Returns array of list information in list context
-Returns array ref in scalar context
-
-=cut
-
-
-
-sub lists {
- my $self = shift;
- return @{ $self->{_Lists} } if wantarray();
- return $self->{_Lists};
-}
-
-=end __PRIVATE__
-
-=back
-
-=begin __PRIVATE__
-
-=head2 Subclassed methods
-
-The following methods override methods provided in the C<Pod::Select>
-base class. See C<Pod::Parser> and C<Pod::Select> for more information
-on what these methods require.
-
-=over 4
-
-=cut
-
-######### END ACCESSORS ###################
-
-# Opening pod
-
-=item B<begin_pod>
-
-Writes the C<latex> preamble if requested. Only writes something
-if AddPreamble is true. Writes a standard header unless a UserPreamble
-is defined.
-
-=cut
-
-sub begin_pod {
- my $self = shift;
-
- # Get the pod identification
- # This should really come from the '=head1 NAME' paragraph
-
- my $infile = $self->input_file;
- my $class = ref($self);
- my $date = gmtime(time);
-
- # Comment message to say where this came from
- my $comment = << "__TEX_COMMENT__";
-%% Latex generated from POD in document $infile
-%% Using the perl module $class
-%% Converted on $date
-__TEX_COMMENT__
-
- # Write the preamble
- # If the caller has supplied one then we just use that
-
- my $preamble = '';
-
- if ($self->AddPreamble) {
-
- if (defined $self->UserPreamble) {
-
- $preamble = $self->UserPreamble;
-
- # Add the description of where this came from
- $preamble .= "\n$comment\n%% Preamble supplied by user.\n\n";
-
- } else {
-
- # Write our own preamble
-
- # Code to initialise index making
- # Use an array so that we can prepend comment if required
- my @makeidx = (
- '\usepackage{makeidx}',
- '\makeindex',
- );
-
- unless ($self->MakeIndex) {
- foreach (@makeidx) {
- $_ = '%% ' . $_;
- }
- }
- my $makeindex = join("\n", at makeidx) . "\n";
-
- # Table of contents
- my $tableofcontents = '\tableofcontents';
-
- $tableofcontents = '%% ' . $tableofcontents
- unless $self->TableOfContents;
-
- # Roll our own
- $preamble = << "__TEX_HEADER__";
-\\documentclass{article}
-\\usepackage[T1]{fontenc}
-\\usepackage{textcomp}
-
-$comment
-
-$makeindex
-
-\\begin{document}
-
-$tableofcontents
-
-__TEX_HEADER__
-
- }
- }
-
- # Write the header (blank if none)
- $self->_output($preamble);
-
- # Start on new page if requested
- $self->_output("\\clearpage\n") if $self->StartWithNewPage;
-
-}
-
-
-=item B<end_pod>
-
-Write the closing C<latex> code. Only writes something if AddPostamble
-is true. Writes a standard header unless a UserPostamble is defined.
-
-=cut
-
-sub end_pod {
- my $self = shift;
-
- # End string
- my $end = '';
-
- # Use the user version of the postamble if defined
- if ($self->AddPostamble) {
-
- if (defined $self->UserPostamble) {
- $end = $self->UserPostamble;
-
- } else {
-
- # Check for index
- my $makeindex = '\printindex';
-
- $makeindex = '%% '. $makeindex unless $self->MakeIndex;
-
- $end = "$makeindex\n\n\\end{document}\n";
- }
- }
-
- $self->_output($end);
-
-}
-
-=item B<command>
-
-Process basic pod commands.
-
-=cut
-
-sub command {
- my $self = shift;
- my ($command, $paragraph, $line_num, $parobj) = @_;
-
- # return if we dont care
- return if $command eq 'pod';
-
- # Store a copy of the raw text in case we are in a =for
- # block and need to preserve the existing latex
- my $rawpara = $paragraph;
-
- # Do the latex escapes
- $paragraph = $self->_replace_special_chars($paragraph);
-
- # Interpolate pod sequences in paragraph
- $paragraph = $self->interpolate($paragraph, $line_num);
- $paragraph =~ s/\s+$//;
-
- # Replace characters that can only be done after
- # interpolation of interior sequences
- $paragraph = $self->_replace_special_chars_late($paragraph);
-
- # Now run the command
- if ($command eq 'over') {
-
- $self->begin_list($paragraph, $line_num);
-
- } elsif ($command eq 'item') {
-
- $self->add_item($paragraph, $line_num);
-
- } elsif ($command eq 'back') {
-
- $self->end_list($line_num);
-
- } elsif ($command eq 'head1') {
-
- # Store the name of the section
- $self->{_CURRENT_HEAD1} = $paragraph;
-
- # Print it
- $self->head(1, $paragraph, $parobj);
-
- } elsif ($command eq 'head2') {
-
- $self->head(2, $paragraph, $parobj);
-
- } elsif ($command eq 'head3') {
-
- $self->head(3, $paragraph, $parobj);
-
- } elsif ($command eq 'head4') {
-
- $self->head(4, $paragraph, $parobj);
-
- } elsif ($command eq 'head5') {
-
- $self->head(5, $paragraph, $parobj);
-
- } elsif ($command eq 'head6') {
-
- $self->head(6, $paragraph, $parobj);
-
- } elsif ($command eq 'begin') {
-
- # pass through if latex
- if ($paragraph =~ /^latex/i) {
- # Make sure that subsequent paragraphs are not modfied before printing
- $self->{_dont_modify_any_para} = 1;
-
- } else {
- # Suppress all subsequent paragraphs unless
- # it is explcitly intended for latex
- $self->{_suppress_all_para} = 1;
- }
-
- } elsif ($command eq 'for') {
-
- # =for latex
- # some latex
-
- # With =for we will get the text for the full paragraph
- # as well as the format name.
- # We do not get an additional paragraph later on. The next
- # paragraph is not governed by the =for
-
- # The first line contains the format and the rest is the
- # raw code.
- my ($format, $chunk) = split(/\n/, $rawpara, 2);
-
- # If we have got some latex code print it out immediately
- # unmodified. Else do nothing.
- if ($format =~ /^latex/i) {
- # Make sure that next paragraph is not modfied before printing
- $self->_output( $chunk );
-
- }
-
- } elsif ($command eq 'end') {
-
- # Reset suppression
- $self->{_suppress_all_para} = 0;
- $self->{_dont_modify_any_para} = 0;
-
- } elsif ($command eq 'pod') {
-
- # Do nothing
-
- } else {
- carp "Command $command not recognised at line $line_num\n";
- }
-
-}
-
-=item B<verbatim>
-
-Verbatim text
-
-=cut
-
-sub verbatim {
- my $self = shift;
- my ($paragraph, $line_num, $parobj) = @_;
-
- # Expand paragraph unless in =begin block
- if ($self->{_dont_modify_any_para}) {
- # Just print as is
- $self->_output($paragraph);
-
- } else {
-
- return if $paragraph =~ /^\s+$/;
-
- # Clean trailing space
- $paragraph =~ s/\s+$//;
-
- # Clean tabs. Routine taken from Tabs.pm
- # by David Muir Sharnoff muir at idiom.com,
- # slightly modified by hsmyers at sdragons.com 10/22/01
- my @l = split("\n",$paragraph);
- foreach (@l) {
- 1 while s/(^|\n)([^\t\n]*)(\t+)/
- $1. $2 . (" " x
- (8 * length($3)
- - (length($2) % 8)))
- /sex;
- }
- $paragraph = join("\n", at l);
- # End of change.
-
-
-
- $self->_output('\begin{verbatim}' . "\n$paragraph\n". '\end{verbatim}'."\n");
- }
-}
-
-=item B<textblock>
-
-Plain text paragraph.
-
-=cut
-
-sub textblock {
- my $self = shift;
- my ($paragraph, $line_num, $parobj) = @_;
-
- # print Dumper($self);
-
- # Expand paragraph unless in =begin block
- if ($self->{_dont_modify_any_para}) {
- # Just print as is
- $self->_output($paragraph);
-
- return;
- }
-
-
- # Escape latex special characters
- $paragraph = $self->_replace_special_chars($paragraph);
-
- # Interpolate interior sequences
- my $expansion = $self->interpolate($paragraph, $line_num);
- $expansion =~ s/\s+$//;
-
- # Escape special characters that can not be done earlier
- $expansion = $self->_replace_special_chars_late($expansion);
-
- # If we are replacing 'head1 NAME' with a section
- # we need to look in the paragraph and rewrite things
- # Need to make sure this is called only on the first paragraph
- # following 'head1 NAME' and not on subsequent paragraphs that may be
- # present.
- if ($self->{_CURRENT_HEAD1} =~ /^NAME/i && $self->ReplaceNAMEwithSection()) {
-
- # Strip white space from start and end
- $paragraph =~ s/^\s+//;
- $paragraph =~ s/\s$//;
-
- # Split the string into 2 parts
- my ($name, $purpose) = split(/\s+-\s+/, $expansion,2);
-
- # Now prevent this from triggering until a new head1 NAME is set
- $self->{_CURRENT_HEAD1} = '_NAME';
-
- # Might want to clear the Label() before doing this (CHECK)
-
- # Print the heading
- $self->head(1, $name, $parobj);
-
- # Set the labeling in case we want unique names later
- $self->Label( $self->_create_label( $name, 1 ) );
-
- # Raise the Head1Level by one so that subsequent =head1 appear
- # as subsections of the main name section unless we are already
- # at maximum [Head1Level() could check this itself - CHECK]
- $self->Head1Level( $self->Head1Level() + 1)
- unless $self->Head1Level == $#LatexSections;
-
- # Now write out the new latex paragraph
- $purpose = ucfirst($purpose);
- $self->_output("\n\n$purpose\n\n");
-
- } else {
- # Just write the output
- $self->_output("\n\n$expansion\n\n");
- }
-
-}
-
-=item B<interior_sequence>
-
-Interior sequence expansion
-
-=cut
-
-sub interior_sequence {
- my $self = shift;
-
- my ($seq_command, $seq_argument, $pod_seq) = @_;
-
- if ($seq_command eq 'B') {
- return "\\textbf{$seq_argument}";
-
- } elsif ($seq_command eq 'I') {
- return "\\textit{$seq_argument}";
-
- } elsif ($seq_command eq 'E') {
-
- # If it is simply a number
- if ($seq_argument =~ /^\d+$/) {
- return chr($seq_argument);
- # Look up escape in hash table
- } elsif (exists $HTML_Escapes{$seq_argument}) {
- return $HTML_Escapes{$seq_argument};
-
- } else {
- my ($file, $line) = $pod_seq->file_line();
- warn "Escape sequence $seq_argument not recognised at line $line of file $file\n";
- return;
- }
-
- } elsif ($seq_command eq 'Z') {
-
- # Zero width space
- return '{}';
-
- } elsif ($seq_command eq 'C') {
- return "\\texttt{$seq_argument}";
-
- } elsif ($seq_command eq 'F') {
- return "\\emph{$seq_argument}";
-
- } elsif ($seq_command eq 'S') {
- # non breakable spaces
- my $nbsp = '~';
-
- $seq_argument =~ s/\s/$nbsp/g;
- return $seq_argument;
-
- } elsif ($seq_command eq 'L') {
- my $link = new Pod::Hyperlink($seq_argument);
-
- # undef on failure
- unless (defined $link) {
- carp $@;
- return;
- }
-
- # Handle internal links differently
- my $type = $link->type;
- my $page = $link->page;
-
- if ($type eq 'section' && $page eq '') {
- # Use internal latex reference
- my $node = $link->node;
-
- # Convert to a label
- $node = $self->_create_label($node);
-
- return "\\S\\ref{$node}";
-
- } else {
- # Use default markup for external references
- # (although Starlink would use \xlabel)
- my $markup = $link->markup;
- my ($file, $line) = $pod_seq->file_line();
-
- return $self->interpolate($link->markup, $line);
- }
-
-
-
- } elsif ($seq_command eq 'P') {
- # Special markup for Pod::Hyperlink
- # Replace :: with / - but not sure if I want to do this
- # any more.
- my $link = $seq_argument;
- $link =~ s|::|/|g;
-
- my $ref = "\\emph{$seq_argument}";
- return $ref;
-
- } elsif ($seq_command eq 'Q') {
- # Special markup for Pod::Hyperlink
- return "\\textsf{$seq_argument}";
-
- } elsif ($seq_command eq 'X') {
- # Index entries
-
- # use \index command
- # I will let '!' go through for now
- # not sure how sub categories are handled in X<>
- my $index = $self->_create_index($seq_argument);
- return "\\index{$index}\n";
-
- } else {
- carp "Unknown sequence $seq_command<$seq_argument>";
- }
-
-}
-
-=back
-
-=head2 List Methods
-
-Methods used to handle lists.
-
-=over 4
-
-=item B<begin_list>
-
-Called when a new list is found (via the C<over> directive).
-Creates a new C<Pod::List> object and stores it on the
-list stack.
-
- $parser->begin_list($indent, $line_num);
-
-=cut
-
-sub begin_list {
- my $self = shift;
- my $indent = shift;
- my $line_num = shift;
-
- # Indicate that a list should be started for the next item
- # need to do this to work out the type of list
- push ( @{$self->lists}, new Pod::List(-indent => $indent,
- -start => $line_num,
- -file => $self->input_file,
- )
- );
-
-}
-
-=item B<end_list>
-
-Called when the end of a list is found (the C<back> directive).
-Pops the C<Pod::List> object off the stack of lists and writes
-the C<latex> code required to close a list.
-
- $parser->end_list($line_num);
-
-=cut
-
-sub end_list {
- my $self = shift;
- my $line_num = shift;
-
- unless (defined $self->lists->[-1]) {
- my $file = $self->input_file;
- warn "No list is active at line $line_num (file=$file). Missing =over?\n";
- return;
- }
-
- # What to write depends on list type
- my $type = $self->lists->[-1]->type;
-
- # Dont write anything if the list type is not set
- # iomplying that a list was created but no entries were
- # placed in it (eg because of a =begin/=end combination)
- $self->_output("\\end{$type}\n")
- if (defined $type && length($type) > 0);
-
- # Clear list
- pop(@{ $self->lists});
-
-}
-
-=item B<add_item>
-
-Add items to the list. The first time an item is encountered
-(determined from the state of the current C<Pod::List> object)
-the type of list is determined (ordered, unnumbered or description)
-and the relevant latex code issued.
-
- $parser->add_item($paragraph, $line_num);
-
-=cut
-
-sub add_item {
- my $self = shift;
- my $paragraph = shift;
- my $line_num = shift;
-
- unless (defined $self->lists->[-1]) {
- my $file = $self->input_file;
- warn "List has already ended by line $line_num of file $file. Missing =over?\n";
- # Replace special chars
-# $paragraph = $self->_replace_special_chars($paragraph);
- $self->_output("$paragraph\n\n");
- return;
- }
-
- # If paragraphs printing is turned off via =begin/=end or whatver
- # simply return immediately
- return if $self->{_suppress_all_para};
-
- # Check to see whether we are starting a new lists
- if (scalar($self->lists->[-1]->item) == 0) {
-
- # Examine the paragraph to determine what type of list
- # we have
- $paragraph =~ s/\s+$//;
- $paragraph =~ s/^\s+//;
-
- my $type;
- if (substr($paragraph, 0,1) eq '*') {
- $type = 'itemize';
- } elsif ($paragraph =~ /^\d/) {
- $type = 'enumerate';
- } else {
- $type = 'description';
- }
- $self->lists->[-1]->type($type);
-
- $self->_output("\\begin{$type}\n");
-
- }
-
- my $type = $self->lists->[-1]->type;
-
- if ($type eq 'description') {
- # Handle long items - long items do not wrap
- # If the string is longer than 40 characters we split
- # it into a real item header and some bold text.
- my $maxlen = 40;
- my ($hunk1, $hunk2) = $self->_split_delimited( $paragraph, $maxlen );
-
- # Print the first hunk
- $self->_output("\n\\item[{$hunk1}] ");
-
- # and the second hunk if it is defined
- if ($hunk2) {
- $self->_output("\\textbf{$hunk2}");
- } else {
- # Not there so make sure we have a new line
- $self->_output("\\mbox{}");
- }
-
- } else {
- # If the item was '* Something' or '\d+ something' we still need to write
- # out the something. Also allow 1) and 1.
- my $extra_info = $paragraph;
- $extra_info =~ s/^(\*|\d+[\.\)]?)\s*//;
- $self->_output("\n\\item $extra_info");
- }
-
- # Store the item name in the object. Required so that
- # we can tell if the list is new or not
- $self->lists->[-1]->item($paragraph);
-
-}
-
-=back
-
-=head2 Methods for headings
-
-=over 4
-
-=item B<head>
-
-Print a heading of the required level.
-
- $parser->head($level, $paragraph, $parobj);
-
-The first argument is the pod heading level. The second argument
-is the contents of the heading. The 3rd argument is a Pod::Paragraph
-object so that the line number can be extracted.
-
-=cut
-
-sub head {
- my $self = shift;
- my $num = shift;
- my $paragraph = shift;
- my $parobj = shift;
-
- # If we are replace 'head1 NAME' with a section
- # we return immediately if we get it
- return
- if ($self->{_CURRENT_HEAD1} =~ /^NAME/i && $self->ReplaceNAMEwithSection());
-
- # Create a label
- my $label = $self->_create_label($paragraph);
-
- # Create an index entry
- my $index = $self->_create_index($paragraph);
-
- # Work out position in the above array taking into account
- # that =head1 is equivalent to $self->Head1Level
-
- my $level = $self->Head1Level() - 1 + $num;
-
- # Warn if heading to large
- if ($num > $#LatexSections) {
- my $line = $parobj->file_line;
- my $file = $self->input_file;
- warn "Heading level too large ($level) for LaTeX at line $line of file $file\n";
- $level = $#LatexSections;
- }
-
- # Check to see whether section should be unnumbered
- my $star = ($level >= $self->LevelNoNum ? '*' : '');
-
- # Section
- $self->_output("\\" .$LatexSections[$level] .$star ."{$paragraph\\label{".$label ."}\\index{".$index."}}\n");
-
-}
-
-
-=back
-
-=end __PRIVATE__
-
-=begin __PRIVATE__
-
-=head2 Internal methods
-
-Internal routines are described in this section. They do not form part of the
-public interface. All private methods start with an underscore.
-
-=over 4
-
-=item B<_output>
-
-Output text to the output filehandle. This method must be always be called
-to output parsed text.
-
- $parser->_output($text);
-
-Does not write anything if a =begin is active that should be
-ignored.
-
-=cut
-
-sub _output {
- my $self = shift;
- my $text = shift;
-
- print { $self->output_handle } $text
- unless $self->{_suppress_all_para};
-
-}
-
-
-=item B<_replace_special_chars>
-
-Subroutine to replace characters that are special in C<latex>
-with the escaped forms
-
- $escaped = $parser->_replace_special_chars($paragraph);
-
-Need to call this routine before interior_sequences are munged but not
-if verbatim. It must be called before interpolation of interior
-sequences so that curly brackets and special latex characters inserted
-during interpolation are not themselves escaped. This means that < and
-> can not be modified here since the text still contains interior
-sequences.
-
-Special characters and the C<latex> equivalents are:
-
- } \}
- { \{
- _ \_
- $ \$
- % \%
- & \&
- \ $\backslash$
- ^ \^{}
- ~ \~{}
- # \#
-
-=cut
-
-sub _replace_special_chars {
- my $self = shift;
- my $paragraph = shift;
-
- # Replace a \ with $\backslash$
- # This is made more complicated because the dollars will be escaped
- # by the subsequent replacement. Easiest to add \backslash
- # now and then add the dollars
- $paragraph =~ s/\\/\\backslash/g;
-
- # Must be done after escape of \ since this command adds latex escapes
- # Replace characters that can be escaped
- $paragraph =~ s/([\$\#&%_{}])/\\$1/g;
-
- # Replace ^ characters with \^{} so that $^F works okay
- $paragraph =~ s/(\^)/\\$1\{\}/g;
-
- # Replace tilde (~) with \texttt{\~{}}
- $paragraph =~ s/~/\\texttt\{\\~\{\}\}/g;
-
- # Now add the dollars around each \backslash
- $paragraph =~ s/(\\backslash)/\$$1\$/g;
- return $paragraph;
-}
-
-=item B<_replace_special_chars_late>
-
-Replace special characters that can not be replaced before interior
-sequence interpolation. See C<_replace_special_chars> for a routine
-to replace special characters prior to interpolation of interior
-sequences.
-
-Does the following transformation:
-
- < $<$
- > $>$
- | $|$
-
-
-=cut
-
-sub _replace_special_chars_late {
- my $self = shift;
- my $paragraph = shift;
-
- # < and >
- $paragraph =~ s/(<|>)/\$$1\$/g;
-
- # Replace | with $|$
- $paragraph =~ s'\|'$|$'g;
-
-
- return $paragraph;
-}
-
-
-=item B<_create_label>
-
-Return a string that can be used as an internal reference
-in a C<latex> document (i.e. accepted by the C<\label> command)
-
- $label = $parser->_create_label($string)
-
-If UniqueLabels is true returns a label prefixed by Label()
-This can be suppressed with an optional second argument.
-
- $label = $parser->_create_label($string, $suppress);
-
-If a second argument is supplied (of any value including undef)
-the Label() is never prefixed. This means that this routine can
-be called to create a Label() without prefixing a previous setting.
-
-=cut
-
-sub _create_label {
- my $self = shift;
- my $paragraph = shift;
- my $suppress = (@_ ? 1 : 0 );
-
- # Remove latex commands
- $paragraph = $self->_clean_latex_commands($paragraph);
-
- # Remove non alphanumerics from the label and replace with underscores
- # want to protect '-' though so use negated character classes
- $paragraph =~ s/[^-:\w]/_/g;
-
- # Multiple underscores will look unsightly so remove repeats
- # This will also have the advantage of tidying up the end and
- # start of string
- $paragraph =~ s/_+/_/g;
-
- # If required need to make sure that the label is unique
- # since it is possible to have multiple pods in a single
- # document
- if (!$suppress && $self->UniqueLabels() && defined $self->Label) {
- $paragraph = $self->Label() .'_'. $paragraph;
- }
-
- return $paragraph;
-}
-
-
-=item B<_create_index>
-
-Similar to C<_create_label> except an index entry is created.
-If C<UniqueLabels> is true, the index entry is prefixed by
-the current C<Label> and an exclamation mark.
-
- $ind = $parser->_create_index($paragraph);
-
-An exclamation mark is used by C<makeindex> to generate
-sub-entries in an index.
-
-=cut
-
-sub _create_index {
- my $self = shift;
- my $paragraph = shift;
- my $suppress = (@_ ? 1 : 0 );
-
- # Remove latex commands
- $paragraph = $self->_clean_latex_commands($paragraph);
-
- # If required need to make sure that the index entry is unique
- # since it is possible to have multiple pods in a single
- # document
- if (!$suppress && $self->UniqueLabels() && defined $self->Label) {
- $paragraph = $self->Label() .'!'. $paragraph;
- }
-
- # Need to replace _ with space
- $paragraph =~ s/_/ /g;
-
- return $paragraph;
-
-}
-
-=item B<_clean_latex_commands>
-
-Removes latex commands from text. The latex command is assumed to be of the
-form C<\command{ text }>. "C<text>" is retained
-
- $clean = $parser->_clean_latex_commands($text);
-
-=cut
-
-sub _clean_latex_commands {
- my $self = shift;
- my $paragraph = shift;
-
- # Remove latex commands of the form \text{ }
- # and replace with the contents of the { }
- # need to make this non-greedy so that it can handle
- # "\text{a} and \text2{b}"
- # without converting it to
- # "a} and \text2{b"
- # This match will still get into trouble if \} is present
- # This is not vital since the subsequent replacement of non-alphanumeric
- # characters will tidy it up anyway
- $paragraph =~ s/\\\w+{(.*?)}/$1/g;
-
- return $paragraph
-}
-
-=item B<_split_delimited>
-
-Split the supplied string into two parts at approximately the
-specified word boundary. Special care is made to make sure that it
-does not split in the middle of some curly brackets.
-
-e.g. "this text is \textbf{very bold}" would not be split into
-"this text is \textbf{very" and " bold".
-
- ($hunk1, $hunk2) = $self->_split_delimited( $para, $length);
-
-The length indicates the maximum length of hunk1.
-
-=cut
-
-# initially Supplied by hsmyers at sdragons.com
-# 10/25/01, utility to split \hbox
-# busting lines. Reformatted by TimJ to match module style.
-sub _split_delimited {
- my $self = shift;
- my $input = shift;
- my $limit = shift;
-
- # Return immediately if already small
- return ($input, '') if length($input) < $limit;
-
- my @output;
- my $s = '';
- my $t = '';
- my $depth = 0;
- my $token;
-
- $input =~ s/\n/ /gm;
- $input .= ' ';
- foreach ( split ( //, $input ) ) {
- $token .= $_;
- if (/\{/) {
- $depth++;
- } elsif ( /}/ ) {
- $depth--;
- } elsif ( / / and $depth == 0) {
- push @output, $token if ( $token and $token ne ' ' );
- $token = '';
- }
- }
-
- foreach (@output) {
- if (length($s) < $limit) {
- $s .= $_;
- } else {
- $t .= $_;
- }
- }
-
- # Tidy up
- $s =~ s/\s+$//;
- $t =~ s/\s+$//;
- return ($s,$t);
-}
-
-=back
-
-=end __PRIVATE__
-
-=head1 NOTES
-
-Compatible with C<latex2e> only. Can not be used with C<latex> v2.09
-or earlier.
-
-A subclass of C<Pod::Select> so that specific pod sections can be
-converted to C<latex> by using the C<select> method.
-
-Some HTML escapes are missing and many have not been tested.
-
-=head1 SEE ALSO
-
-L<Pod::Parser>, L<Pod::Select>, L<pod2latex>
-
-=head1 AUTHORS
-
-Tim Jenness E<lt>tjenness at cpan.orgE<gt>
-
-Bug fixes and improvements have been received from: Simon Cozens
-E<lt>simon at cozens.netE<gt>, Mark A. Hershberger
-E<lt>mah at everybody.orgE<gt>, Marcel Grunauer
-E<lt>marcel at codewerk.comE<gt>, Hugh S Myers
-E<lt>hsmyers at sdragons.comE<gt>, Peter J Acklam
-E<lt>jacklam at math.uio.noE<gt>, Sudhi Herle E<lt>sudhi at herle.netE<gt>,
-Ariel Scolnicov E<lt>ariels at compugen.co.ilE<gt>,
-Adriano Rodrigues Ferreira E<lt>ferreira at triang.com.brE<gt> and
-R. de Vries E<lt>r.de.vries at dutchspace.nlE<gt>.
-
-
-=head1 COPYRIGHT
-
-Copyright (C) 2000-2004 Tim Jenness. All Rights Reserved.
-
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=begin __PRIVATE__
-
-=head1 REVISION
-
-$Id: LaTeX.pm,v 1.1.1.2 2011-02-17 12:49:41 laffer1 Exp $
-
-=end __PRIVATE__
-
-=cut
-
-1;
Deleted: vendor/perl/dist/lib/Pod/Man.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Man.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Man.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1747 +0,0 @@
-# Pod::Man -- Convert POD data to formatted *roff input.
-#
-# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-# Russ Allbery <rra at stanford.edu>
-# Substantial contributions by Sean Burke <sburke at cpan.org>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-#
-# This module translates POD documentation into *roff markup using the man
-# macro set, and is intended for converting POD documents written as Unix
-# manual pages to manual pages that can be read by the man(1) command. It is
-# a replacement for the pod2man command distributed with versions of Perl
-# prior to 5.6.
-#
-# Perl core hackers, please note that this module is also separately
-# maintained outside of the Perl core as part of the podlators. Please send
-# me any patches at the address above in addition to sending them to the
-# standard Perl mailing lists.
-
-##############################################################################
-# Modules and declarations
-##############################################################################
-
-package Pod::Man;
-
-require 5.005;
-
-use strict;
-use subs qw(makespace);
-use vars qw(@ISA %ESCAPES $PREAMBLE $VERSION);
-
-use Carp qw(croak);
-use Pod::Simple ();
-use POSIX qw(strftime);
-
- at ISA = qw(Pod::Simple);
-
-$VERSION = '2.22';
-
-# Set the debugging level. If someone has inserted a debug function into this
-# class already, use that. Otherwise, use any Pod::Simple debug function
-# that's defined, and failing that, define a debug level of 10.
-BEGIN {
- my $parent = defined (&Pod::Simple::DEBUG) ? \&Pod::Simple::DEBUG : undef;
- unless (defined &DEBUG) {
- *DEBUG = $parent || sub () { 10 };
- }
-}
-
-# Import the ASCII constant from Pod::Simple. This is true iff we're in an
-# ASCII-based universe (including such things as ISO 8859-1 and UTF-8), and is
-# generally only false for EBCDIC.
-BEGIN { *ASCII = \&Pod::Simple::ASCII }
-
-# Pretty-print a data structure. Only used for debugging.
-BEGIN { *pretty = \&Pod::Simple::pretty }
-
-##############################################################################
-# Object initialization
-##############################################################################
-
-# Initialize the object and set various Pod::Simple options that we need.
-# Here, we also process any additional options passed to the constructor or
-# set up defaults if none were given. Note that all internal object keys are
-# in all-caps, reserving all lower-case object keys for Pod::Simple and user
-# arguments.
-sub new {
- my $class = shift;
- my $self = $class->SUPER::new;
-
- # Tell Pod::Simple not to handle S<> by automatically inserting .
- $self->nbsp_for_S (1);
-
- # Tell Pod::Simple to keep whitespace whenever possible.
- if ($self->can ('preserve_whitespace')) {
- $self->preserve_whitespace (1);
- } else {
- $self->fullstop_space_harden (1);
- }
-
- # The =for and =begin targets that we accept.
- $self->accept_targets (qw/man MAN roff ROFF/);
-
- # Ensure that contiguous blocks of code are merged together. Otherwise,
- # some of the guesswork heuristics don't work right.
- $self->merge_text (1);
-
- # Pod::Simple doesn't do anything useful with our arguments, but we want
- # to put them in our object as hash keys and values. This could cause
- # problems if we ever clash with Pod::Simple's own internal class
- # variables.
- %$self = (%$self, @_);
-
- # Send errors to stderr if requested.
- if ($$self{stderr}) {
- $self->no_errata_section (1);
- $self->complain_stderr (1);
- delete $$self{stderr};
- }
-
- # Initialize various other internal constants based on our arguments.
- $self->init_fonts;
- $self->init_quotes;
- $self->init_page;
-
- # For right now, default to turning on all of the magic.
- $$self{MAGIC_CPP} = 1;
- $$self{MAGIC_EMDASH} = 1;
- $$self{MAGIC_FUNC} = 1;
- $$self{MAGIC_MANREF} = 1;
- $$self{MAGIC_SMALLCAPS} = 1;
- $$self{MAGIC_VARS} = 1;
-
- return $self;
-}
-
-# Translate a font string into an escape.
-sub toescape { (length ($_[0]) > 1 ? '\f(' : '\f') . $_[0] }
-
-# Determine which fonts the user wishes to use and store them in the object.
-# Regular, italic, bold, and bold-italic are constants, but the fixed width
-# fonts may be set by the user. Sets the internal hash key FONTS which is
-# used to map our internal font escapes to actual *roff sequences later.
-sub init_fonts {
- my ($self) = @_;
-
- # Figure out the fixed-width font. If user-supplied, make sure that they
- # are the right length.
- for (qw/fixed fixedbold fixeditalic fixedbolditalic/) {
- my $font = $$self{$_};
- if (defined ($font) && (length ($font) < 1 || length ($font) > 2)) {
- croak qq(roff font should be 1 or 2 chars, not "$font");
- }
- }
-
- # Set the default fonts. We can't be sure portably across different
- # implementations what fixed bold-italic may be called (if it's even
- # available), so default to just bold.
- $$self{fixed} ||= 'CW';
- $$self{fixedbold} ||= 'CB';
- $$self{fixeditalic} ||= 'CI';
- $$self{fixedbolditalic} ||= 'CB';
-
- # Set up a table of font escapes. First number is fixed-width, second is
- # bold, third is italic.
- $$self{FONTS} = { '000' => '\fR', '001' => '\fI',
- '010' => '\fB', '011' => '\f(BI',
- '100' => toescape ($$self{fixed}),
- '101' => toescape ($$self{fixeditalic}),
- '110' => toescape ($$self{fixedbold}),
- '111' => toescape ($$self{fixedbolditalic}) };
-}
-
-# Initialize the quotes that we'll be using for C<> text. This requires some
-# special handling, both to parse the user parameter if given and to make sure
-# that the quotes will be safe against *roff. Sets the internal hash keys
-# LQUOTE and RQUOTE.
-sub init_quotes {
- my ($self) = (@_);
-
- $$self{quotes} ||= '"';
- if ($$self{quotes} eq 'none') {
- $$self{LQUOTE} = $$self{RQUOTE} = '';
- } elsif (length ($$self{quotes}) == 1) {
- $$self{LQUOTE} = $$self{RQUOTE} = $$self{quotes};
- } elsif ($$self{quotes} =~ /^(.)(.)$/
- || $$self{quotes} =~ /^(..)(..)$/) {
- $$self{LQUOTE} = $1;
- $$self{RQUOTE} = $2;
- } else {
- croak(qq(Invalid quote specification "$$self{quotes}"))
- }
-
- # Double the first quote; note that this should not be s///g as two double
- # quotes is represented in *roff as three double quotes, not four. Weird,
- # I know.
- $$self{LQUOTE} =~ s/\"/\"\"/;
- $$self{RQUOTE} =~ s/\"/\"\"/;
-}
-
-# Initialize the page title information and indentation from our arguments.
-sub init_page {
- my ($self) = @_;
-
- # We used to try first to get the version number from a local binary, but
- # we shouldn't need that any more. Get the version from the running Perl.
- # Work a little magic to handle subversions correctly under both the
- # pre-5.6 and the post-5.6 version numbering schemes.
- my @version = ($] =~ /^(\d+)\.(\d{3})(\d{0,3})$/);
- $version[2] ||= 0;
- $version[2] *= 10 ** (3 - length $version[2]);
- for (@version) { $_ += 0 }
- my $version = join ('.', @version);
-
- # Set the defaults for page titles and indentation if the user didn't
- # override anything.
- $$self{center} = 'User Contributed Perl Documentation'
- unless defined $$self{center};
- $$self{release} = 'perl v' . $version
- unless defined $$self{release};
- $$self{indent} = 4
- unless defined $$self{indent};
-
- # Double quotes in things that will be quoted.
- for (qw/center release/) {
- $$self{$_} =~ s/\"/\"\"/g if $$self{$_};
- }
-}
-
-##############################################################################
-# Core parsing
-##############################################################################
-
-# This is the glue that connects the code below with Pod::Simple itself. The
-# goal is to convert the event stream coming from the POD parser into method
-# calls to handlers once the complete content of a tag has been seen. Each
-# paragraph or POD command will have textual content associated with it, and
-# as soon as all of a paragraph or POD command has been seen, that content
-# will be passed in to the corresponding method for handling that type of
-# object. The exceptions are handlers for lists, which have opening tag
-# handlers and closing tag handlers that will be called right away.
-#
-# The internal hash key PENDING is used to store the contents of a tag until
-# all of it has been seen. It holds a stack of open tags, each one
-# represented by a tuple of the attributes hash for the tag, formatting
-# options for the tag (which are inherited), and the contents of the tag.
-
-# Add a block of text to the contents of the current node, formatting it
-# according to the current formatting instructions as we do.
-sub _handle_text {
- my ($self, $text) = @_;
- DEBUG > 3 and print "== $text\n";
- my $tag = $$self{PENDING}[-1];
- $$tag[2] .= $self->format_text ($$tag[1], $text);
-}
-
-# Given an element name, get the corresponding method name.
-sub method_for_element {
- my ($self, $element) = @_;
- $element =~ tr/-/_/;
- $element =~ tr/A-Z/a-z/;
- $element =~ tr/_a-z0-9//cd;
- return $element;
-}
-
-# Handle the start of a new element. If cmd_element is defined, assume that
-# we need to collect the entire tree for this element before passing it to the
-# element method, and create a new tree into which we'll collect blocks of
-# text and nested elements. Otherwise, if start_element is defined, call it.
-sub _handle_element_start {
- my ($self, $element, $attrs) = @_;
- DEBUG > 3 and print "++ $element (<", join ('> <', %$attrs), ">)\n";
- my $method = $self->method_for_element ($element);
-
- # If we have a command handler, we need to accumulate the contents of the
- # tag before calling it. Turn off IN_NAME for any command other than
- # <Para> so that IN_NAME isn't still set for the first heading after the
- # NAME heading.
- if ($self->can ("cmd_$method")) {
- DEBUG > 2 and print "<$element> starts saving a tag\n";
- $$self{IN_NAME} = 0 if ($element ne 'Para');
-
- # How we're going to format embedded text blocks depends on the tag
- # and also depends on our parent tags. Thankfully, inside tags that
- # turn off guesswork and reformatting, nothing else can turn it back
- # on, so this can be strictly inherited.
- my $formatting = $$self{PENDING}[-1][1];
- $formatting = $self->formatting ($formatting, $element);
- push (@{ $$self{PENDING} }, [ $attrs, $formatting, '' ]);
- DEBUG > 4 and print "Pending: [", pretty ($$self{PENDING}), "]\n";
- } elsif ($self->can ("start_$method")) {
- my $method = 'start_' . $method;
- $self->$method ($attrs, '');
- } else {
- DEBUG > 2 and print "No $method start method, skipping\n";
- }
-}
-
-# Handle the end of an element. If we had a cmd_ method for this element,
-# this is where we pass along the tree that we built. Otherwise, if we have
-# an end_ method for the element, call that.
-sub _handle_element_end {
- my ($self, $element) = @_;
- DEBUG > 3 and print "-- $element\n";
- my $method = $self->method_for_element ($element);
-
- # If we have a command handler, pull off the pending text and pass it to
- # the handler along with the saved attribute hash.
- if ($self->can ("cmd_$method")) {
- DEBUG > 2 and print "</$element> stops saving a tag\n";
- my $tag = pop @{ $$self{PENDING} };
- DEBUG > 4 and print "Popped: [", pretty ($tag), "]\n";
- DEBUG > 4 and print "Pending: [", pretty ($$self{PENDING}), "]\n";
- my $method = 'cmd_' . $method;
- my $text = $self->$method ($$tag[0], $$tag[2]);
- if (defined $text) {
- if (@{ $$self{PENDING} } > 1) {
- $$self{PENDING}[-1][2] .= $text;
- } else {
- $self->output ($text);
- }
- }
- } elsif ($self->can ("end_$method")) {
- my $method = 'end_' . $method;
- $self->$method ();
- } else {
- DEBUG > 2 and print "No $method end method, skipping\n";
- }
-}
-
-##############################################################################
-# General formatting
-##############################################################################
-
-# Return formatting instructions for a new block. Takes the current
-# formatting and the new element. Formatting inherits negatively, in the
-# sense that if the parent has turned off guesswork, all child elements should
-# leave it off. We therefore return a copy of the same formatting
-# instructions but possibly with more things turned off depending on the
-# element.
-sub formatting {
- my ($self, $current, $element) = @_;
- my %options;
- if ($current) {
- %options = %$current;
- } else {
- %options = (guesswork => 1, cleanup => 1, convert => 1);
- }
- if ($element eq 'Data') {
- $options{guesswork} = 0;
- $options{cleanup} = 0;
- $options{convert} = 0;
- } elsif ($element eq 'X') {
- $options{guesswork} = 0;
- $options{cleanup} = 0;
- } elsif ($element eq 'Verbatim' || $element eq 'C') {
- $options{guesswork} = 0;
- $options{literal} = 1;
- }
- return \%options;
-}
-
-# Format a text block. Takes a hash of formatting options and the text to
-# format. Currently, the only formatting options are guesswork, cleanup, and
-# convert, all of which are boolean.
-sub format_text {
- my ($self, $options, $text) = @_;
- my $guesswork = $$options{guesswork} && !$$self{IN_NAME};
- my $cleanup = $$options{cleanup};
- my $convert = $$options{convert};
- my $literal = $$options{literal};
-
- # Cleanup just tidies up a few things, telling *roff that the hyphens are
- # hard, putting a bit of space between consecutive underscores, and
- # escaping backslashes. Be careful not to mangle our character
- # translations by doing this before processing character translation.
- if ($cleanup) {
- $text =~ s/\\/\\e/g;
- $text =~ s/-/\\-/g;
- $text =~ s/_(?=_)/_\\|/g;
- }
-
- # Normally we do character translation, but we won't even do that in
- # <Data> blocks or if UTF-8 output is desired.
- if ($convert && !$$self{utf8} && ASCII) {
- $text =~ s/([^\x00-\x7F])/$ESCAPES{ord ($1)} || "X"/eg;
- }
-
- # Ensure that *roff doesn't convert literal quotes to UTF-8 single quotes,
- # but don't mess up our accept escapes.
- if ($literal) {
- $text =~ s/(?<!\\\*)\'/\\*\(Aq/g;
- $text =~ s/(?<!\\\*)\`/\\\`/g;
- }
-
- # If guesswork is asked for, do that. This involves more substantial
- # formatting based on various heuristics that may only be appropriate for
- # particular documents.
- if ($guesswork) {
- $text = $self->guesswork ($text);
- }
-
- return $text;
-}
-
-# Handles C<> text, deciding whether to put \*C` around it or not. This is a
-# whole bunch of messy heuristics to try to avoid overquoting, originally from
-# Barrie Slaymaker. This largely duplicates similar code in Pod::Text.
-sub quote_literal {
- my $self = shift;
- local $_ = shift;
-
- # A regex that matches the portion of a variable reference that's the
- # array or hash index, separated out just because we want to use it in
- # several places in the following regex.
- my $index = '(?: \[.*\] | \{.*\} )?';
-
- # Check for things that we don't want to quote, and if we find any of
- # them, return the string with just a font change and no quoting.
- m{
- ^\s*
- (?:
- ( [\'\`\"] ) .* \1 # already quoted
- | \\\*\(Aq .* \\\*\(Aq # quoted and escaped
- | \\?\` .* ( \' | \\\*\(Aq ) # `quoted'
- | \$+ [\#^]? \S $index # special ($^Foo, $")
- | [\$\@%&*]+ \#? [:\'\w]+ $index # plain var or func
- | [\$\@%&*]* [:\'\w]+ (?: -> )? \(\s*[^\s,]\s*\) # 0/1-arg func call
- | [-+]? ( \d[\d.]* | \.\d+ ) (?: [eE][-+]?\d+ )? # a number
- | 0x [a-fA-F\d]+ # a hex constant
- )
- \s*\z
- }xso and return '\f(FS' . $_ . '\f(FE';
-
- # If we didn't return, go ahead and quote the text.
- return '\f(FS\*(C`' . $_ . "\\*(C'\\f(FE";
-}
-
-# Takes a text block to perform guesswork on. Returns the text block with
-# formatting codes added. This is the code that marks up various Perl
-# constructs and things commonly used in man pages without requiring the user
-# to add any explicit markup, and is applied to all non-literal text. We're
-# guaranteed that the text we're applying guesswork to does not contain any
-# *roff formatting codes. Note that the inserted font sequences must be
-# treated later with mapfonts or textmapfonts.
-#
-# This method is very fragile, both in the regular expressions it uses and in
-# the ordering of those modifications. Care and testing is required when
-# modifying it.
-sub guesswork {
- my $self = shift;
- local $_ = shift;
- DEBUG > 5 and print " Guesswork called on [$_]\n";
-
- # By the time we reach this point, all hypens will be escaped by adding a
- # backslash. We want to undo that escaping if they're part of regular
- # words and there's only a single dash, since that's a real hyphen that
- # *roff gets to consider a possible break point. Make sure that a dash
- # after the first character of a word stays non-breaking, however.
- #
- # Note that this is not user-controllable; we pretty much have to do this
- # transformation or *roff will mangle the output in unacceptable ways.
- s{
- ( (?:\G|^|\s) [\(\"]* [a-zA-Z] ) ( \\- )?
- ( (?: [a-zA-Z\']+ \\-)+ )
- ( [a-zA-Z\']+ ) (?= [\)\".?!,;:]* (?:\s|\Z|\\\ ) )
- \b
- } {
- my ($prefix, $hyphen, $main, $suffix) = ($1, $2, $3, $4);
- $hyphen ||= '';
- $main =~ s/\\-/-/g;
- $prefix . $hyphen . $main . $suffix;
- }egx;
-
- # Translate "--" into a real em-dash if it's used like one. This means
- # that it's either surrounded by whitespace, it follows a regular word, or
- # it occurs between two regular words.
- if ($$self{MAGIC_EMDASH}) {
- s{ (\s) \\-\\- (\s) } { $1 . '\*(--' . $2 }egx;
- s{ (\b[a-zA-Z]+) \\-\\- (\s|\Z|[a-zA-Z]+\b) } { $1 . '\*(--' . $2 }egx;
- }
-
- # Make words in all-caps a little bit smaller; they look better that way.
- # However, we don't want to change Perl code (like @ARGV), nor do we want
- # to fix the MIME in MIME-Version since it looks weird with the
- # full-height V.
- #
- # We change only a string of all caps (2) either at the beginning of the
- # line or following regular punctuation (like quotes) or whitespace (1),
- # and followed by either similar punctuation, an em-dash, or the end of
- # the line (3).
- if ($$self{MAGIC_SMALLCAPS}) {
- s{
- ( ^ | [\s\(\"\'\`\[\{<>] | \\\ ) # (1)
- ( [A-Z] [A-Z] (?: [/A-Z+:\d_\$&] | \\- )* ) # (2)
- (?= [\s>\}\]\(\)\'\".?!,;] | \\*\(-- | \\\ | $ ) # (3)
- } {
- $1 . '\s-1' . $2 . '\s0'
- }egx;
- }
-
- # Note that from this point forward, we have to adjust for \s-1 and \s-0
- # strings inserted around things that we've made small-caps if later
- # transforms should work on those strings.
-
- # Italize functions in the form func(), including functions that are in
- # all capitals, but don't italize if there's anything between the parens.
- # The function must start with an alphabetic character or underscore and
- # then consist of word characters or colons.
- if ($$self{MAGIC_FUNC}) {
- s{
- ( \b | \\s-1 )
- ( [A-Za-z_] ([:\w] | \\s-?[01])+ \(\) )
- } {
- $1 . '\f(IS' . $2 . '\f(IE'
- }egx;
- }
-
- # Change references to manual pages to put the page name in italics but
- # the number in the regular font, with a thin space between the name and
- # the number. Only recognize func(n) where func starts with an alphabetic
- # character or underscore and contains only word characters, periods (for
- # configuration file man pages), or colons, and n is a single digit,
- # optionally followed by some number of lowercase letters. Note that this
- # does not recognize man page references like perl(l) or socket(3SOCKET).
- if ($$self{MAGIC_MANREF}) {
- s{
- ( \b | \\s-1 )
- ( [A-Za-z_] (?:[.:\w] | \\- | \\s-?[01])+ )
- ( \( \d [a-z]* \) )
- } {
- $1 . '\f(IS' . $2 . '\f(IE\|' . $3
- }egx;
- }
-
- # Convert simple Perl variable references to a fixed-width font. Be
- # careful not to convert functions, though; there are too many subtleties
- # with them to want to perform this transformation.
- if ($$self{MAGIC_VARS}) {
- s{
- ( ^ | \s+ )
- ( [\$\@%] [\w:]+ )
- (?! \( )
- } {
- $1 . '\f(FS' . $2 . '\f(FE'
- }egx;
- }
-
- # Fix up double quotes. Unfortunately, we miss this transformation if the
- # quoted text contains any code with formatting codes and there's not much
- # we can effectively do about that, which makes it somewhat unclear if
- # this is really a good idea.
- s{ \" ([^\"]+) \" } { '\*(L"' . $1 . '\*(R"' }egx;
-
- # Make C++ into \*(C+, which is a squinched version.
- if ($$self{MAGIC_CPP}) {
- s{ \b C\+\+ } {\\*\(C+}gx;
- }
-
- # Done.
- DEBUG > 5 and print " Guesswork returning [$_]\n";
- return $_;
-}
-
-##############################################################################
-# Output
-##############################################################################
-
-# When building up the *roff code, we don't use real *roff fonts. Instead, we
-# embed font codes of the form \f(<font>[SE] where <font> is one of B, I, or
-# F, S stands for start, and E stands for end. This method turns these into
-# the right start and end codes.
-#
-# We add this level of complexity because the old pod2man didn't get code like
-# B<someI<thing> else> right; after I<> it switched back to normal text rather
-# than bold. We take care of this by using variables that state whether bold,
-# italic, or fixed are turned on as a combined pointer to our current font
-# sequence, and set each to the number of current nestings of start tags for
-# that font.
-#
-# \fP changes to the previous font, but only one previous font is kept. We
-# don't know what the outside level font is; normally it's R, but if we're
-# inside a heading it could be something else. So arrange things so that the
-# outside font is always the "previous" font and end with \fP instead of \fR.
-# Idea from Zack Weinberg.
-sub mapfonts {
- my ($self, $text) = @_;
- my ($fixed, $bold, $italic) = (0, 0, 0);
- my %magic = (F => \$fixed, B => \$bold, I => \$italic);
- my $last = '\fR';
- $text =~ s<
- \\f\((.)(.)
- > <
- my $sequence = '';
- my $f;
- if ($last ne '\fR') { $sequence = '\fP' }
- ${ $magic{$1} } += ($2 eq 'S') ? 1 : -1;
- $f = $$self{FONTS}{ ($fixed && 1) . ($bold && 1) . ($italic && 1) };
- if ($f eq $last) {
- '';
- } else {
- if ($f ne '\fR') { $sequence .= $f }
- $last = $f;
- $sequence;
- }
- >gxe;
- return $text;
-}
-
-# Unfortunately, there is a bug in Solaris 2.6 nroff (not present in GNU
-# groff) where the sequence \fB\fP\f(CW\fP leaves the font set to B rather
-# than R, presumably because \f(CW doesn't actually do a font change. To work
-# around this, use a separate textmapfonts for text blocks where the default
-# font is always R and only use the smart mapfonts for headings.
-sub textmapfonts {
- my ($self, $text) = @_;
- my ($fixed, $bold, $italic) = (0, 0, 0);
- my %magic = (F => \$fixed, B => \$bold, I => \$italic);
- $text =~ s<
- \\f\((.)(.)
- > <
- ${ $magic{$1} } += ($2 eq 'S') ? 1 : -1;
- $$self{FONTS}{ ($fixed && 1) . ($bold && 1) . ($italic && 1) };
- >gxe;
- return $text;
-}
-
-# Given a command and a single argument that may or may not contain double
-# quotes, handle double-quote formatting for it. If there are no double
-# quotes, just return the command followed by the argument in double quotes.
-# If there are double quotes, use an if statement to test for nroff, and for
-# nroff output the command followed by the argument in double quotes with
-# embedded double quotes doubled. For other formatters, remap paired double
-# quotes to LQUOTE and RQUOTE.
-sub switchquotes {
- my ($self, $command, $text, $extra) = @_;
- $text =~ s/\\\*\([LR]\"/\"/g;
-
- # We also have to deal with \*C` and \*C', which are used to add the
- # quotes around C<> text, since they may expand to " and if they do this
- # confuses the .SH macros and the like no end. Expand them ourselves.
- # Also separate troff from nroff if there are any fixed-width fonts in use
- # to work around problems with Solaris nroff.
- my $c_is_quote = ($$self{LQUOTE} =~ /\"/) || ($$self{RQUOTE} =~ /\"/);
- my $fixedpat = join '|', @{ $$self{FONTS} }{'100', '101', '110', '111'};
- $fixedpat =~ s/\\/\\\\/g;
- $fixedpat =~ s/\(/\\\(/g;
- if ($text =~ m/\"/ || $text =~ m/$fixedpat/) {
- $text =~ s/\"/\"\"/g;
- my $nroff = $text;
- my $troff = $text;
- $troff =~ s/\"\"([^\"]*)\"\"/\`\`$1\'\'/g;
- if ($c_is_quote and $text =~ m/\\\*\(C[\'\`]/) {
- $nroff =~ s/\\\*\(C\`/$$self{LQUOTE}/g;
- $nroff =~ s/\\\*\(C\'/$$self{RQUOTE}/g;
- $troff =~ s/\\\*\(C[\'\`]//g;
- }
- $nroff = qq("$nroff") . ($extra ? " $extra" : '');
- $troff = qq("$troff") . ($extra ? " $extra" : '');
-
- # Work around the Solaris nroff bug where \f(CW\fP leaves the font set
- # to Roman rather than the actual previous font when used in headings.
- # troff output may still be broken, but at least we can fix nroff by
- # just switching the font changes to the non-fixed versions.
- $nroff =~ s/\Q$$self{FONTS}{100}\E(.*?)\\f[PR]/$1/g;
- $nroff =~ s/\Q$$self{FONTS}{101}\E(.*?)\\f([PR])/\\fI$1\\f$2/g;
- $nroff =~ s/\Q$$self{FONTS}{110}\E(.*?)\\f([PR])/\\fB$1\\f$2/g;
- $nroff =~ s/\Q$$self{FONTS}{111}\E(.*?)\\f([PR])/\\f\(BI$1\\f$2/g;
-
- # Now finally output the command. Bother with .ie only if the nroff
- # and troff output aren't the same.
- if ($nroff ne $troff) {
- return ".ie n $command $nroff\n.el $command $troff\n";
- } else {
- return "$command $nroff\n";
- }
- } else {
- $text = qq("$text") . ($extra ? " $extra" : '');
- return "$command $text\n";
- }
-}
-
-# Protect leading quotes and periods against interpretation as commands. Also
-# protect anything starting with a backslash, since it could expand or hide
-# something that *roff would interpret as a command. This is overkill, but
-# it's much simpler than trying to parse *roff here.
-sub protect {
- my ($self, $text) = @_;
- $text =~ s/^([.\'\\])/\\&$1/mg;
- return $text;
-}
-
-# Make vertical whitespace if NEEDSPACE is set, appropriate to the indentation
-# level the situation. This function is needed since in *roff one has to
-# create vertical whitespace after paragraphs and between some things, but
-# other macros create their own whitespace. Also close out a sequence of
-# repeated =items, since calling makespace means we're about to begin the item
-# body.
-sub makespace {
- my ($self) = @_;
- $self->output (".PD\n") if $$self{ITEMS} > 1;
- $$self{ITEMS} = 0;
- $self->output ($$self{INDENT} > 0 ? ".Sp\n" : ".PP\n")
- if $$self{NEEDSPACE};
-}
-
-# Output any pending index entries, and optionally an index entry given as an
-# argument. Support multiple index entries in X<> separated by slashes, and
-# strip special escapes from index entries.
-sub outindex {
- my ($self, $section, $index) = @_;
- my @entries = map { split m%\s*/\s*% } @{ $$self{INDEX} };
- return unless ($section || @entries);
-
- # We're about to output all pending entries, so clear our pending queue.
- $$self{INDEX} = [];
-
- # Build the output. Regular index entries are marked Xref, and headings
- # pass in their own section. Undo some *roff formatting on headings.
- my @output;
- if (@entries) {
- push @output, [ 'Xref', join (' ', @entries) ];
- }
- if ($section) {
- $index =~ s/\\-/-/g;
- $index =~ s/\\(?:s-?\d|.\(..|.)//g;
- push @output, [ $section, $index ];
- }
-
- # Print out the .IX commands.
- for (@output) {
- my ($type, $entry) = @$_;
- $entry =~ s/\"/\"\"/g;
- $self->output (".IX $type " . '"' . $entry . '"' . "\n");
- }
-}
-
-# Output some text, without any additional changes.
-sub output {
- my ($self, @text) = @_;
- print { $$self{output_fh} } @text;
-}
-
-##############################################################################
-# Document initialization
-##############################################################################
-
-# Handle the start of the document. Here we handle empty documents, as well
-# as setting up our basic macros in a preamble and building the page title.
-sub start_document {
- my ($self, $attrs) = @_;
- if ($$attrs{contentless} && !$$self{ALWAYS_EMIT_SOMETHING}) {
- DEBUG and print "Document is contentless\n";
- $$self{CONTENTLESS} = 1;
- return;
- }
-
- # If we were given the utf8 option, set an output encoding on our file
- # handle. Wrap in an eval in case we're using a version of Perl too old
- # to understand this.
- #
- # This is evil because it changes the global state of a file handle that
- # we may not own. However, we can't just blindly encode all output, since
- # there may be a pre-applied output encoding (such as from PERL_UNICODE)
- # and then we would double-encode. This seems to be the least bad
- # approach.
- if ($$self{utf8}) {
- eval { binmode ($$self{output_fh}, ':encoding(UTF-8)') };
- }
-
- # Determine information for the preamble and then output it.
- my ($name, $section);
- if (defined $$self{name}) {
- $name = $$self{name};
- $section = $$self{section} || 1;
- } else {
- ($name, $section) = $self->devise_title;
- }
- my $date = $$self{date} || $self->devise_date;
- $self->preamble ($name, $section, $date)
- unless $self->bare_output or DEBUG > 9;
-
- # Initialize a few per-document variables.
- $$self{INDENT} = 0; # Current indentation level.
- $$self{INDENTS} = []; # Stack of indentations.
- $$self{INDEX} = []; # Index keys waiting to be printed.
- $$self{IN_NAME} = 0; # Whether processing the NAME section.
- $$self{ITEMS} = 0; # The number of consecutive =items.
- $$self{ITEMTYPES} = []; # Stack of =item types, one per list.
- $$self{SHIFTWAIT} = 0; # Whether there is a shift waiting.
- $$self{SHIFTS} = []; # Stack of .RS shifts.
- $$self{PENDING} = [[]]; # Pending output.
-}
-
-# Handle the end of the document. This does nothing but print out a final
-# comment at the end of the document under debugging.
-sub end_document {
- my ($self) = @_;
- return if $self->bare_output;
- return if ($$self{CONTENTLESS} && !$$self{ALWAYS_EMIT_SOMETHING});
- $self->output (q(.\" [End document]) . "\n") if DEBUG;
-}
-
-# Try to figure out the name and section from the file name and return them as
-# a list, returning an empty name and section 1 if we can't find any better
-# information. Uses File::Basename and File::Spec as necessary.
-sub devise_title {
- my ($self) = @_;
- my $name = $self->source_filename || '';
- my $section = $$self{section} || 1;
- $section = 3 if (!$$self{section} && $name =~ /\.pm\z/i);
- $name =~ s/\.p(od|[lm])\z//i;
-
- # If the section isn't 3, then the name defaults to just the basename of
- # the file. Otherwise, assume we're dealing with a module. We want to
- # figure out the full module name from the path to the file, but we don't
- # want to include too much of the path into the module name. Lose
- # anything up to the first off:
- #
- # */lib/*perl*/ standard or site_perl module
- # */*perl*/lib/ from -Dprefix=/opt/perl
- # */*perl*/ random module hierarchy
- #
- # which works. Also strip off a leading site, site_perl, or vendor_perl
- # component, any OS-specific component, and any version number component,
- # and strip off an initial component of "lib" or "blib/lib" since that's
- # what ExtUtils::MakeMaker creates. splitdir requires at least File::Spec
- # 0.8.
- if ($section !~ /^3/) {
- require File::Basename;
- $name = uc File::Basename::basename ($name);
- } else {
- require File::Spec;
- my ($volume, $dirs, $file) = File::Spec->splitpath ($name);
- my @dirs = File::Spec->splitdir ($dirs);
- my $cut = 0;
- my $i;
- for ($i = 0; $i < @dirs; $i++) {
- if ($dirs[$i] =~ /perl/) {
- $cut = $i + 1;
- $cut++ if ($dirs[$i + 1] && $dirs[$i + 1] eq 'lib');
- last;
- }
- }
- if ($cut > 0) {
- splice (@dirs, 0, $cut);
- shift @dirs if ($dirs[0] =~ /^(site|vendor)(_perl)?$/);
- shift @dirs if ($dirs[0] =~ /^[\d.]+$/);
- shift @dirs if ($dirs[0] =~ /^(.*-$^O|$^O-.*|$^O)$/);
- }
- shift @dirs if $dirs[0] eq 'lib';
- splice (@dirs, 0, 2) if ($dirs[0] eq 'blib' && $dirs[1] eq 'lib');
-
- # Remove empty directories when building the module name; they
- # occur too easily on Unix by doubling slashes.
- $name = join ('::', (grep { $_ ? $_ : () } @dirs), $file);
- }
- return ($name, $section);
-}
-
-# Determine the modification date and return that, properly formatted in ISO
-# format. If we can't get the modification date of the input, instead use the
-# current time. Pod::Simple returns a completely unuseful stringified file
-# handle as the source_filename for input from a file handle, so we have to
-# deal with that as well.
-sub devise_date {
- my ($self) = @_;
- my $input = $self->source_filename;
- my $time;
- if ($input) {
- $time = (stat $input)[9] || time;
- } else {
- $time = time;
- }
- return strftime ('%Y-%m-%d', localtime $time);
-}
-
-# Print out the preamble and the title. The meaning of the arguments to .TH
-# unfortunately vary by system; some systems consider the fourth argument to
-# be a "source" and others use it as a version number. Generally it's just
-# presented as the left-side footer, though, so it doesn't matter too much if
-# a particular system gives it another interpretation.
-#
-# The order of date and release used to be reversed in older versions of this
-# module, but this order is correct for both Solaris and Linux.
-sub preamble {
- my ($self, $name, $section, $date) = @_;
- my $preamble = $self->preamble_template (!$$self{utf8});
-
- # Build the index line and make sure that it will be syntactically valid.
- my $index = "$name $section";
- $index =~ s/\"/\"\"/g;
-
- # If name or section contain spaces, quote them (section really never
- # should, but we may as well be cautious).
- for ($name, $section) {
- if (/\s/) {
- s/\"/\"\"/g;
- $_ = '"' . $_ . '"';
- }
- }
-
- # Double quotes in date, since it will be quoted.
- $date =~ s/\"/\"\"/g;
-
- # Substitute into the preamble the configuration options.
- $preamble =~ s/\@CFONT\@/$$self{fixed}/;
- $preamble =~ s/\@LQUOTE\@/$$self{LQUOTE}/;
- $preamble =~ s/\@RQUOTE\@/$$self{RQUOTE}/;
- chomp $preamble;
-
- # Get the version information.
- my $version = $self->version_report;
-
- # Finally output everything.
- $self->output (<<"----END OF HEADER----");
-.\\" Automatically generated by $version
-.\\"
-.\\" Standard preamble:
-.\\" ========================================================================
-$preamble
-.\\" ========================================================================
-.\\"
-.IX Title "$index"
-.TH $name $section "$date" "$$self{release}" "$$self{center}"
-.\\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
-----END OF HEADER----
- $self->output (".\\\" [End of preamble]\n") if DEBUG;
-}
-
-##############################################################################
-# Text blocks
-##############################################################################
-
-# Handle a basic block of text. The only tricky part of this is if this is
-# the first paragraph of text after an =over, in which case we have to change
-# indentations for *roff.
-sub cmd_para {
- my ($self, $attrs, $text) = @_;
- my $line = $$attrs{start_line};
-
- # Output the paragraph. We also have to handle =over without =item. If
- # there's an =over without =item, SHIFTWAIT will be set, and we need to
- # handle creation of the indent here. Add the shift to SHIFTS so that it
- # will be cleaned up on =back.
- $self->makespace;
- if ($$self{SHIFTWAIT}) {
- $self->output (".RS $$self{INDENT}\n");
- push (@{ $$self{SHIFTS} }, $$self{INDENT});
- $$self{SHIFTWAIT} = 0;
- }
-
- # Add the line number for debugging, but not in the NAME section just in
- # case the comment would confuse apropos.
- $self->output (".\\\" [At source line $line]\n")
- if defined ($line) && DEBUG && !$$self{IN_NAME};
-
- # Force exactly one newline at the end and strip unwanted trailing
- # whitespace at the end.
- $text =~ s/\s*$/\n/;
-
- # Output the paragraph.
- $self->output ($self->protect ($self->textmapfonts ($text)));
- $self->outindex;
- $$self{NEEDSPACE} = 1;
- return '';
-}
-
-# Handle a verbatim paragraph. Put a null token at the beginning of each line
-# to protect against commands and wrap in .Vb/.Ve (which we define in our
-# prelude).
-sub cmd_verbatim {
- my ($self, $attrs, $text) = @_;
-
- # Ignore an empty verbatim paragraph.
- return unless $text =~ /\S/;
-
- # Force exactly one newline at the end and strip unwanted trailing
- # whitespace at the end.
- $text =~ s/\s*$/\n/;
-
- # Get a count of the number of lines before the first blank line, which
- # we'll pass to .Vb as its parameter. This tells *roff to keep that many
- # lines together. We don't want to tell *roff to keep huge blocks
- # together.
- my @lines = split (/\n/, $text);
- my $unbroken = 0;
- for (@lines) {
- last if /^\s*$/;
- $unbroken++;
- }
- $unbroken = 10 if ($unbroken > 12 && !$$self{MAGIC_VNOPAGEBREAK_LIMIT});
-
- # Prepend a null token to each line.
- $text =~ s/^/\\&/gm;
-
- # Output the results.
- $self->makespace;
- $self->output (".Vb $unbroken\n$text.Ve\n");
- $$self{NEEDSPACE} = 1;
- return '';
-}
-
-# Handle literal text (produced by =for and similar constructs). Just output
-# it with the minimum of changes.
-sub cmd_data {
- my ($self, $attrs, $text) = @_;
- $text =~ s/^\n+//;
- $text =~ s/\n{0,2}$/\n/;
- $self->output ($text);
- return '';
-}
-
-##############################################################################
-# Headings
-##############################################################################
-
-# Common code for all headings. This is called before the actual heading is
-# output. It returns the cleaned up heading text (putting the heading all on
-# one line) and may do other things, like closing bad =item blocks.
-sub heading_common {
- my ($self, $text, $line) = @_;
- $text =~ s/\s+$//;
- $text =~ s/\s*\n\s*/ /g;
-
- # This should never happen; it means that we have a heading after =item
- # without an intervening =back. But just in case, handle it anyway.
- if ($$self{ITEMS} > 1) {
- $$self{ITEMS} = 0;
- $self->output (".PD\n");
- }
-
- # Output the current source line.
- $self->output ( ".\\\" [At source line $line]\n" )
- if defined ($line) && DEBUG;
- return $text;
-}
-
-# First level heading. We can't output .IX in the NAME section due to a bug
-# in some versions of catman, so don't output a .IX for that section. .SH
-# already uses small caps, so remove \s0 and \s-1. Maintain IN_NAME as
-# appropriate.
-sub cmd_head1 {
- my ($self, $attrs, $text) = @_;
- $text =~ s/\\s-?\d//g;
- $text = $self->heading_common ($text, $$attrs{start_line});
- my $isname = ($text eq 'NAME' || $text =~ /\(NAME\)/);
- $self->output ($self->switchquotes ('.SH', $self->mapfonts ($text)));
- $self->outindex ('Header', $text) unless $isname;
- $$self{NEEDSPACE} = 0;
- $$self{IN_NAME} = $isname;
- return '';
-}
-
-# Second level heading.
-sub cmd_head2 {
- my ($self, $attrs, $text) = @_;
- $text = $self->heading_common ($text, $$attrs{start_line});
- $self->output ($self->switchquotes ('.SS', $self->mapfonts ($text)));
- $self->outindex ('Subsection', $text);
- $$self{NEEDSPACE} = 0;
- return '';
-}
-
-# Third level heading. *roff doesn't have this concept, so just put the
-# heading in italics as a normal paragraph.
-sub cmd_head3 {
- my ($self, $attrs, $text) = @_;
- $text = $self->heading_common ($text, $$attrs{start_line});
- $self->makespace;
- $self->output ($self->textmapfonts ('\f(IS' . $text . '\f(IE') . "\n");
- $self->outindex ('Subsection', $text);
- $$self{NEEDSPACE} = 1;
- return '';
-}
-
-# Fourth level heading. *roff doesn't have this concept, so just put the
-# heading as a normal paragraph.
-sub cmd_head4 {
- my ($self, $attrs, $text) = @_;
- $text = $self->heading_common ($text, $$attrs{start_line});
- $self->makespace;
- $self->output ($self->textmapfonts ($text) . "\n");
- $self->outindex ('Subsection', $text);
- $$self{NEEDSPACE} = 1;
- return '';
-}
-
-##############################################################################
-# Formatting codes
-##############################################################################
-
-# All of the formatting codes that aren't handled internally by the parser,
-# other than L<> and X<>.
-sub cmd_b { return '\f(BS' . $_[2] . '\f(BE' }
-sub cmd_i { return '\f(IS' . $_[2] . '\f(IE' }
-sub cmd_f { return '\f(IS' . $_[2] . '\f(IE' }
-sub cmd_c { return $_[0]->quote_literal ($_[2]) }
-
-# Index entries are just added to the pending entries.
-sub cmd_x {
- my ($self, $attrs, $text) = @_;
- push (@{ $$self{INDEX} }, $text);
- return '';
-}
-
-# Links reduce to the text that we're given, wrapped in angle brackets if it's
-# a URL.
-sub cmd_l {
- my ($self, $attrs, $text) = @_;
- return $$attrs{type} eq 'url' ? "<$text>" : $text;
-}
-
-##############################################################################
-# List handling
-##############################################################################
-
-# Handle the beginning of an =over block. Takes the type of the block as the
-# first argument, and then the attr hash. This is called by the handlers for
-# the four different types of lists (bullet, number, text, and block).
-sub over_common_start {
- my ($self, $type, $attrs) = @_;
- my $line = $$attrs{start_line};
- my $indent = $$attrs{indent};
- DEBUG > 3 and print " Starting =over $type (line $line, indent ",
- ($indent || '?'), "\n";
-
- # Find the indentation level.
- unless (defined ($indent) && $indent =~ /^[-+]?\d{1,4}\s*$/) {
- $indent = $$self{indent};
- }
-
- # If we've gotten multiple indentations in a row, we need to emit the
- # pending indentation for the last level that we saw and haven't acted on
- # yet. SHIFTS is the stack of indentations that we've actually emitted
- # code for.
- if (@{ $$self{SHIFTS} } < @{ $$self{INDENTS} }) {
- $self->output (".RS $$self{INDENT}\n");
- push (@{ $$self{SHIFTS} }, $$self{INDENT});
- }
-
- # Now, do record-keeping. INDENTS is a stack of indentations that we've
- # seen so far, and INDENT is the current level of indentation. ITEMTYPES
- # is a stack of list types that we've seen.
- push (@{ $$self{INDENTS} }, $$self{INDENT});
- push (@{ $$self{ITEMTYPES} }, $type);
- $$self{INDENT} = $indent + 0;
- $$self{SHIFTWAIT} = 1;
-}
-
-# End an =over block. Takes no options other than the class pointer.
-# Normally, once we close a block and therefore remove something from INDENTS,
-# INDENTS will now be longer than SHIFTS, indicating that we also need to emit
-# *roff code to close the indent. This isn't *always* true, depending on the
-# circumstance. If we're still inside an indentation, we need to emit another
-# .RE and then a new .RS to unconfuse *roff.
-sub over_common_end {
- my ($self) = @_;
- DEBUG > 3 and print " Ending =over\n";
- $$self{INDENT} = pop @{ $$self{INDENTS} };
- pop @{ $$self{ITEMTYPES} };
-
- # If we emitted code for that indentation, end it.
- if (@{ $$self{SHIFTS} } > @{ $$self{INDENTS} }) {
- $self->output (".RE\n");
- pop @{ $$self{SHIFTS} };
- }
-
- # If we're still in an indentation, *roff will have now lost track of the
- # right depth of that indentation, so fix that.
- if (@{ $$self{INDENTS} } > 0) {
- $self->output (".RE\n");
- $self->output (".RS $$self{INDENT}\n");
- }
- $$self{NEEDSPACE} = 1;
- $$self{SHIFTWAIT} = 0;
-}
-
-# Dispatch the start and end calls as appropriate.
-sub start_over_bullet { my $s = shift; $s->over_common_start ('bullet', @_) }
-sub start_over_number { my $s = shift; $s->over_common_start ('number', @_) }
-sub start_over_text { my $s = shift; $s->over_common_start ('text', @_) }
-sub start_over_block { my $s = shift; $s->over_common_start ('block', @_) }
-sub end_over_bullet { $_[0]->over_common_end }
-sub end_over_number { $_[0]->over_common_end }
-sub end_over_text { $_[0]->over_common_end }
-sub end_over_block { $_[0]->over_common_end }
-
-# The common handler for all item commands. Takes the type of the item, the
-# attributes, and then the text of the item.
-#
-# Emit an index entry for anything that's interesting, but don't emit index
-# entries for things like bullets and numbers. Newlines in an item title are
-# turned into spaces since *roff can't handle them embedded.
-sub item_common {
- my ($self, $type, $attrs, $text) = @_;
- my $line = $$attrs{start_line};
- DEBUG > 3 and print " $type item (line $line): $text\n";
-
- # Clean up the text. We want to end up with two variables, one ($text)
- # which contains any body text after taking out the item portion, and
- # another ($item) which contains the actual item text.
- $text =~ s/\s+$//;
- my ($item, $index);
- if ($type eq 'bullet') {
- $item = "\\\(bu";
- $text =~ s/\n*$/\n/;
- } elsif ($type eq 'number') {
- $item = $$attrs{number} . '.';
- } else {
- $item = $text;
- $item =~ s/\s*\n\s*/ /g;
- $text = '';
- $index = $item if ($item =~ /\w/);
- }
-
- # Take care of the indentation. If shifts and indents are equal, close
- # the top shift, since we're about to create an indentation with .IP.
- # Also output .PD 0 to turn off spacing between items if this item is
- # directly following another one. We only have to do that once for a
- # whole chain of items so do it for the second item in the change. Note
- # that makespace is what undoes this.
- if (@{ $$self{SHIFTS} } == @{ $$self{INDENTS} }) {
- $self->output (".RE\n");
- pop @{ $$self{SHIFTS} };
- }
- $self->output (".PD 0\n") if ($$self{ITEMS} == 1);
-
- # Now, output the item tag itself.
- $item = $self->textmapfonts ($item);
- $self->output ($self->switchquotes ('.IP', $item, $$self{INDENT}));
- $$self{NEEDSPACE} = 0;
- $$self{ITEMS}++;
- $$self{SHIFTWAIT} = 0;
-
- # If body text for this item was included, go ahead and output that now.
- if ($text) {
- $text =~ s/\s*$/\n/;
- $self->makespace;
- $self->output ($self->protect ($self->textmapfonts ($text)));
- $$self{NEEDSPACE} = 1;
- }
- $self->outindex ($index ? ('Item', $index) : ());
-}
-
-# Dispatch the item commands to the appropriate place.
-sub cmd_item_bullet { my $self = shift; $self->item_common ('bullet', @_) }
-sub cmd_item_number { my $self = shift; $self->item_common ('number', @_) }
-sub cmd_item_text { my $self = shift; $self->item_common ('text', @_) }
-sub cmd_item_block { my $self = shift; $self->item_common ('block', @_) }
-
-##############################################################################
-# Backward compatibility
-##############################################################################
-
-# Reset the underlying Pod::Simple object between calls to parse_from_file so
-# that the same object can be reused to convert multiple pages.
-sub parse_from_file {
- my $self = shift;
- $self->reinit;
-
- # Fake the old cutting option to Pod::Parser. This fiddings with internal
- # Pod::Simple state and is quite ugly; we need a better approach.
- if (ref ($_[0]) eq 'HASH') {
- my $opts = shift @_;
- if (defined ($$opts{-cutting}) && !$$opts{-cutting}) {
- $$self{in_pod} = 1;
- $$self{last_was_blank} = 1;
- }
- }
-
- # Do the work.
- my $retval = $self->SUPER::parse_from_file (@_);
-
- # Flush output, since Pod::Simple doesn't do this. Ideally we should also
- # close the file descriptor if we had to open one, but we can't easily
- # figure this out.
- my $fh = $self->output_fh ();
- my $oldfh = select $fh;
- my $oldflush = $|;
- $| = 1;
- print $fh '';
- $| = $oldflush;
- select $oldfh;
- return $retval;
-}
-
-# Pod::Simple failed to provide this backward compatibility function, so
-# implement it ourselves. File handles are one of the inputs that
-# parse_from_file supports.
-sub parse_from_filehandle {
- my $self = shift;
- $self->parse_from_file (@_);
-}
-
-##############################################################################
-# Translation tables
-##############################################################################
-
-# The following table is adapted from Tom Christiansen's pod2man. It assumes
-# that the standard preamble has already been printed, since that's what
-# defines all of the accent marks. We really want to do something better than
-# this when *roff actually supports other character sets itself, since these
-# results are pretty poor.
-#
-# This only works in an ASCII world. What to do in a non-ASCII world is very
-# unclear -- hopefully we can assume UTF-8 and just leave well enough alone.
- at ESCAPES{0xA0 .. 0xFF} = (
- "\\ ", undef, undef, undef, undef, undef, undef, undef,
- undef, undef, undef, undef, undef, "\\%", undef, undef,
-
- undef, undef, undef, undef, undef, undef, undef, undef,
- undef, undef, undef, undef, undef, undef, undef, undef,
-
- "A\\*`", "A\\*'", "A\\*^", "A\\*~", "A\\*:", "A\\*o", "\\*(AE", "C\\*,",
- "E\\*`", "E\\*'", "E\\*^", "E\\*:", "I\\*`", "I\\*'", "I\\*^", "I\\*:",
-
- "\\*(D-", "N\\*~", "O\\*`", "O\\*'", "O\\*^", "O\\*~", "O\\*:", undef,
- "O\\*/", "U\\*`", "U\\*'", "U\\*^", "U\\*:", "Y\\*'", "\\*(Th", "\\*8",
-
- "a\\*`", "a\\*'", "a\\*^", "a\\*~", "a\\*:", "a\\*o", "\\*(ae", "c\\*,",
- "e\\*`", "e\\*'", "e\\*^", "e\\*:", "i\\*`", "i\\*'", "i\\*^", "i\\*:",
-
- "\\*(d-", "n\\*~", "o\\*`", "o\\*'", "o\\*^", "o\\*~", "o\\*:", undef,
- "o\\*/" , "u\\*`", "u\\*'", "u\\*^", "u\\*:", "y\\*'", "\\*(th", "y\\*:",
-) if ASCII;
-
-##############################################################################
-# Premable
-##############################################################################
-
-# The following is the static preamble which starts all *roff output we
-# generate. Most is static except for the font to use as a fixed-width font,
-# which is designed by @CFONT@, and the left and right quotes to use for C<>
-# text, designated by @LQOUTE@ and @RQUOTE at . However, the second part, which
-# defines the accent marks, is only used if $escapes is set to true.
-sub preamble_template {
- my ($self, $accents) = @_;
- my $preamble = <<'----END OF PREAMBLE----';
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft @CFONT@
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` @LQUOTE@
-. ds C' @RQUOTE@
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.ie \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.el \{\
-. de IX
-..
-.\}
-----END OF PREAMBLE----
-
- if ($accents) {
- $preamble .= <<'----END OF PREAMBLE----'
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-----END OF PREAMBLE----
-#`# for cperl-mode
- }
- return $preamble;
-}
-
-##############################################################################
-# Module return value and documentation
-##############################################################################
-
-1;
-__END__
-
-=head1 NAME
-
-Pod::Man - Convert POD data to formatted *roff input
-
-=for stopwords
-en em ALLCAPS teeny fixedbold fixeditalic fixedbolditalic stderr utf8
-UTF-8 Allbery Sean Burke Ossanna Solaris formatters troff uppercased
-Christiansen
-
-=head1 SYNOPSIS
-
- use Pod::Man;
- my $parser = Pod::Man->new (release => $VERSION, section => 8);
-
- # Read POD from STDIN and write to STDOUT.
- $parser->parse_file (\*STDIN);
-
- # Read POD from file.pod and write to file.1.
- $parser->parse_from_file ('file.pod', 'file.1');
-
-=head1 DESCRIPTION
-
-Pod::Man is a module to convert documentation in the POD format (the
-preferred language for documenting Perl) into *roff input using the man
-macro set. The resulting *roff code is suitable for display on a terminal
-using L<nroff(1)>, normally via L<man(1)>, or printing using L<troff(1)>.
-It is conventionally invoked using the driver script B<pod2man>, but it can
-also be used directly.
-
-As a derived class from Pod::Simple, Pod::Man supports the same methods and
-interfaces. See L<Pod::Simple> for all the details.
-
-new() can take options, in the form of key/value pairs that control the
-behavior of the parser. See below for details.
-
-If no options are given, Pod::Man uses the name of the input file with any
-trailing C<.pod>, C<.pm>, or C<.pl> stripped as the man page title, to
-section 1 unless the file ended in C<.pm> in which case it defaults to
-section 3, to a centered title of "User Contributed Perl Documentation", to
-a centered footer of the Perl version it is run with, and to a left-hand
-footer of the modification date of its input (or the current date if given
-C<STDIN> for input).
-
-Pod::Man assumes that your *roff formatters have a fixed-width font named
-C<CW>. If yours is called something else (like C<CR>), use the C<fixed>
-option to specify it. This generally only matters for troff output for
-printing. Similarly, you can set the fonts used for bold, italic, and
-bold italic fixed-width output.
-
-Besides the obvious pod conversions, Pod::Man also takes care of
-formatting func(), func(3), and simple variable references like $foo or
- at bar so you don't have to use code escapes for them; complex expressions
-like C<$fred{'stuff'}> will still need to be escaped, though. It also
-translates dashes that aren't used as hyphens into en dashes, makes long
-dashes--like this--into proper em dashes, fixes "paired quotes," makes C++
-look right, puts a little space between double underscores, makes ALLCAPS
-a teeny bit smaller in B<troff>, and escapes stuff that *roff treats as
-special so that you don't have to.
-
-The recognized options to new() are as follows. All options take a single
-argument.
-
-=over 4
-
-=item center
-
-Sets the centered page header to use instead of "User Contributed Perl
-Documentation".
-
-=item date
-
-Sets the left-hand footer. By default, the modification date of the input
-file will be used, or the current date if stat() can't find that file (the
-case if the input is from C<STDIN>), and the date will be formatted as
-C<YYYY-MM-DD>.
-
-=item fixed
-
-The fixed-width font to use for verbatim text and code. Defaults to
-C<CW>. Some systems may want C<CR> instead. Only matters for B<troff>
-output.
-
-=item fixedbold
-
-Bold version of the fixed-width font. Defaults to C<CB>. Only matters
-for B<troff> output.
-
-=item fixeditalic
-
-Italic version of the fixed-width font (actually, something of a misnomer,
-since most fixed-width fonts only have an oblique version, not an italic
-version). Defaults to C<CI>. Only matters for B<troff> output.
-
-=item fixedbolditalic
-
-Bold italic (probably actually oblique) version of the fixed-width font.
-Pod::Man doesn't assume you have this, and defaults to C<CB>. Some
-systems (such as Solaris) have this font available as C<CX>. Only matters
-for B<troff> output.
-
-=item name
-
-Set the name of the manual page. Without this option, the manual name is
-set to the uppercased base name of the file being converted unless the
-manual section is 3, in which case the path is parsed to see if it is a Perl
-module path. If it is, a path like C<.../lib/Pod/Man.pm> is converted into
-a name like C<Pod::Man>. This option, if given, overrides any automatic
-determination of the name.
-
-=item quotes
-
-Sets the quote marks used to surround CE<lt>> text. If the value is a
-single character, it is used as both the left and right quote; if it is two
-characters, the first character is used as the left quote and the second as
-the right quoted; and if it is four characters, the first two are used as
-the left quote and the second two as the right quote.
-
-This may also be set to the special value C<none>, in which case no quote
-marks are added around CE<lt>> text (but the font is still changed for troff
-output).
-
-=item release
-
-Set the centered footer. By default, this is the version of Perl you run
-Pod::Man under. Note that some system an macro sets assume that the
-centered footer will be a modification date and will prepend something like
-"Last modified: "; if this is the case, you may want to set C<release> to
-the last modified date and C<date> to the version number.
-
-=item section
-
-Set the section for the C<.TH> macro. The standard section numbering
-convention is to use 1 for user commands, 2 for system calls, 3 for
-functions, 4 for devices, 5 for file formats, 6 for games, 7 for
-miscellaneous information, and 8 for administrator commands. There is a lot
-of variation here, however; some systems (like Solaris) use 4 for file
-formats, 5 for miscellaneous information, and 7 for devices. Still others
-use 1m instead of 8, or some mix of both. About the only section numbers
-that are reliably consistent are 1, 2, and 3.
-
-By default, section 1 will be used unless the file ends in C<.pm> in which
-case section 3 will be selected.
-
-=item stderr
-
-Send error messages about invalid POD to standard error instead of
-appending a POD ERRORS section to the generated *roff output.
-
-=item utf8
-
-By default, Pod::Man produces the most conservative possible *roff output
-to try to ensure that it will work with as many different *roff
-implementations as possible. Many *roff implementations cannot handle
-non-ASCII characters, so this means all non-ASCII characters are converted
-either to a *roff escape sequence that tries to create a properly accented
-character (at least for troff output) or to C<X>.
-
-If this option is set, Pod::Man will instead output UTF-8. If your *roff
-implementation can handle it, this is the best output format to use and
-avoids corruption of documents containing non-ASCII characters. However,
-be warned that *roff source with literal UTF-8 characters is not supported
-by many implementations and may even result in segfaults and other bad
-behavior.
-
-Be aware that, when using this option, the input encoding of your POD
-source must be properly declared unless it is US-ASCII or Latin-1. POD
-input without an C<=encoding> command will be assumed to be in Latin-1,
-and if it's actually in UTF-8, the output will be double-encoded. See
-L<perlpod(1)> for more information on the C<=encoding> command.
-
-=back
-
-The standard Pod::Simple method parse_file() takes one argument naming the
-POD file to read from. By default, the output is sent to C<STDOUT>, but
-this can be changed with the output_fd() method.
-
-The standard Pod::Simple method parse_from_file() takes up to two
-arguments, the first being the input file to read POD from and the second
-being the file to write the formatted output to.
-
-You can also call parse_lines() to parse an array of lines or
-parse_string_document() to parse a document already in memory. To put the
-output into a string instead of a file handle, call the output_string()
-method. See L<Pod::Simple> for the specific details.
-
-=head1 DIAGNOSTICS
-
-=over 4
-
-=item roff font should be 1 or 2 chars, not "%s"
-
-(F) You specified a *roff font (using C<fixed>, C<fixedbold>, etc.) that
-wasn't either one or two characters. Pod::Man doesn't support *roff fonts
-longer than two characters, although some *roff extensions do (the canonical
-versions of B<nroff> and B<troff> don't either).
-
-=item Invalid quote specification "%s"
-
-(F) The quote specification given (the quotes option to the constructor) was
-invalid. A quote specification must be one, two, or four characters long.
-
-=back
-
-=head1 BUGS
-
-Encoding handling assumes that PerlIO is available and does not work
-properly if it isn't. The C<utf8> option is therefore not supported
-unless Perl is built with PerlIO support.
-
-There is currently no way to turn off the guesswork that tries to format
-unmarked text appropriately, and sometimes it isn't wanted (particularly
-when using POD to document something other than Perl). Most of the work
-toward fixing this has now been done, however, and all that's still needed
-is a user interface.
-
-The NAME section should be recognized specially and index entries emitted
-for everything in that section. This would have to be deferred until the
-next section, since extraneous things in NAME tends to confuse various man
-page processors. Currently, no index entries are emitted for anything in
-NAME.
-
-Pod::Man doesn't handle font names longer than two characters. Neither do
-most B<troff> implementations, but GNU troff does as an extension. It would
-be nice to support as an option for those who want to use it.
-
-The preamble added to each output file is rather verbose, and most of it
-is only necessary in the presence of non-ASCII characters. It would
-ideally be nice if all of those definitions were only output if needed,
-perhaps on the fly as the characters are used.
-
-Pod::Man is excessively slow.
-
-=head1 CAVEATS
-
-If Pod::Man is given the C<utf8> option, the encoding of its output file
-handle will be forced to UTF-8 if possible, overriding any existing
-encoding. This will be done even if the file handle is not created by
-Pod::Man and was passed in from outside. This maintains consistency
-regardless of PERL_UNICODE and other settings.
-
-The handling of hyphens and em dashes is somewhat fragile, and one may get
-the wrong one under some circumstances. This should only matter for
-B<troff> output.
-
-When and whether to use small caps is somewhat tricky, and Pod::Man doesn't
-necessarily get it right.
-
-Converting neutral double quotes to properly matched double quotes doesn't
-work unless there are no formatting codes between the quote marks. This
-only matters for troff output.
-
-=head1 AUTHOR
-
-Russ Allbery <rra at stanford.edu>, based I<very> heavily on the original
-B<pod2man> by Tom Christiansen <tchrist at mox.perl.com>. The modifications to
-work with Pod::Simple instead of Pod::Parser were originally contributed by
-Sean Burke (but I've since hacked them beyond recognition and all bugs are
-mine).
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-Russ Allbery <rra at stanford.edu>.
-
-This program is free software; you may redistribute it and/or modify it
-under the same terms as Perl itself.
-
-=head1 SEE ALSO
-
-L<Pod::Simple>, L<perlpod(1)>, L<pod2man(1)>, L<nroff(1)>, L<troff(1)>,
-L<man(1)>, L<man(7)>
-
-Ossanna, Joseph F., and Brian W. Kernighan. "Troff User's Manual,"
-Computing Science Technical Report No. 54, AT&T Bell Laboratories. This is
-the best documentation of standard B<nroff> and B<troff>. At the time of
-this writing, it's available at
-L<http://www.cs.bell-labs.com/cm/cs/cstr.html>.
-
-The man page documenting the man macro set may be L<man(5)> instead of
-L<man(7)> on your system. Also, please see L<pod2man(1)> for extensive
-documentation on writing manual pages if you've not done it before and
-aren't familiar with the conventions.
-
-The current version of this module is always available from its web site at
-L<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
-Perl core distribution as of 5.6.0.
-
-=cut
Deleted: vendor/perl/dist/lib/Pod/ParseLink.pm
===================================================================
--- vendor/perl/dist/lib/Pod/ParseLink.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/ParseLink.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,182 +0,0 @@
-# Pod::ParseLink -- Parse an L<> formatting code in POD text.
-#
-# Copyright 2001, 2008 by Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-#
-# This module implements parsing of the text of an L<> formatting code as
-# defined in perlpodspec. It should be suitable for any POD formatter. It
-# exports only one function, parselink(), which returns the five-item parse
-# defined in perlpodspec.
-#
-# Perl core hackers, please note that this module is also separately
-# maintained outside of the Perl core as part of the podlators. Please send
-# me any patches at the address above in addition to sending them to the
-# standard Perl mailing lists.
-
-##############################################################################
-# Modules and declarations
-##############################################################################
-
-package Pod::ParseLink;
-
-require 5.004;
-
-use strict;
-use vars qw(@EXPORT @ISA $VERSION);
-
-use Exporter;
- at ISA = qw(Exporter);
- at EXPORT = qw(parselink);
-
-$VERSION = '1.09';
-
-##############################################################################
-# Implementation
-##############################################################################
-
-# Parse the name and section portion of a link into a name and section.
-sub _parse_section {
- my ($link) = @_;
- $link =~ s/^\s+//;
- $link =~ s/\s+$//;
-
- # If the whole link is enclosed in quotes, interpret it all as a section
- # even if it contains a slash.
- return (undef, $1) if ($link =~ /^"\s*(.*?)\s*"$/);
-
- # Split into page and section on slash, and then clean up quoting in the
- # section. If there is no section and the name contains spaces, also
- # guess that it's an old section link.
- my ($page, $section) = split (/\s*\/\s*/, $link, 2);
- $section =~ s/^"\s*(.*?)\s*"$/$1/ if $section;
- if ($page && $page =~ / / && !defined ($section)) {
- $section = $page;
- $page = undef;
- } else {
- $page = undef unless $page;
- $section = undef unless $section;
- }
- return ($page, $section);
-}
-
-# Infer link text from the page and section.
-sub _infer_text {
- my ($page, $section) = @_;
- my $inferred;
- if ($page && !$section) {
- $inferred = $page;
- } elsif (!$page && $section) {
- $inferred = '"' . $section . '"';
- } elsif ($page && $section) {
- $inferred = '"' . $section . '" in ' . $page;
- }
- return $inferred;
-}
-
-# Given the contents of an L<> formatting code, parse it into the link text,
-# the possibly inferred link text, the name or URL, the section, and the type
-# of link (pod, man, or url).
-sub parselink {
- my ($link) = @_;
- $link =~ s/\s+/ /g;
- if ($link =~ /\A\w+:[^:\s]\S*\Z/) {
- return (undef, $link, $link, undef, 'url');
- } else {
- my $text;
- if ($link =~ /\|/) {
- ($text, $link) = split (/\|/, $link, 2);
- }
- my ($name, $section) = _parse_section ($link);
- my $inferred = $text || _infer_text ($name, $section);
- my $type = ($name && $name =~ /\(\S*\)/) ? 'man' : 'pod';
- return ($text, $inferred, $name, $section, $type);
- }
-}
-
-##############################################################################
-# Module return value and documentation
-##############################################################################
-
-# Ensure we evaluate to true.
-1;
-__END__
-
-=head1 NAME
-
-Pod::ParseLink - Parse an LE<lt>E<gt> formatting code in POD text
-
-=for stopwords
-markup Allbery URL
-
-=head1 SYNOPSIS
-
- use Pod::ParseLink;
- my ($text, $inferred, $name, $section, $type) = parselink ($link);
-
-=head1 DESCRIPTION
-
-This module only provides a single function, parselink(), which takes the
-text of an LE<lt>E<gt> formatting code and parses it. It returns the
-anchor text for the link (if any was given), the anchor text possibly
-inferred from the name and section, the name or URL, the section if any,
-and the type of link. The type will be one of C<url>, C<pod>, or C<man>,
-indicating a URL, a link to a POD page, or a link to a Unix manual page.
-
-Parsing is implemented per L<perlpodspec>. For backward compatibility,
-links where there is no section and name contains spaces, or links where the
-entirety of the link (except for the anchor text if given) is enclosed in
-double-quotes are interpreted as links to a section (LE<lt>/sectionE<gt>).
-
-The inferred anchor text is implemented per L<perlpodspec>:
-
- L<name> => L<name|name>
- L</section> => L<"section"|/section>
- L<name/section> => L<"section" in name|name/section>
-
-The name may contain embedded EE<lt>E<gt> and ZE<lt>E<gt> formatting codes,
-and the section, anchor text, and inferred anchor text may contain any
-formatting codes. Any double quotes around the section are removed as part
-of the parsing, as is any leading or trailing whitespace.
-
-If the text of the LE<lt>E<gt> escape is entirely enclosed in double
-quotes, it's interpreted as a link to a section for backward
-compatibility.
-
-No attempt is made to resolve formatting codes. This must be done after
-calling parselink() (since EE<lt>E<gt> formatting codes can be used to
-escape characters that would otherwise be significant to the parser and
-resolving them before parsing would result in an incorrect parse of a
-formatting code like:
-
- L<verticalE<verbar>barE<sol>slash>
-
-which should be interpreted as a link to the C<vertical|bar/slash> POD page
-and not as a link to the C<slash> section of the C<bar> POD page with an
-anchor text of C<vertical>. Note that not only the anchor text will need to
-have formatting codes expanded, but so will the target of the link (to deal
-with EE<lt>E<gt> and ZE<lt>E<gt> formatting codes), and special handling of
-the section may be necessary depending on whether the translator wants to
-consider markup in sections to be significant when resolving links. See
-L<perlpodspec> for more information.
-
-=head1 SEE ALSO
-
-L<Pod::Parser>
-
-The current version of this module is always available from its web site at
-L<http://www.eyrie.org/~eagle/software/podlators/>.
-
-=head1 AUTHOR
-
-Russ Allbery <rra at stanford.edu>.
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2001, 2008 Russ Allbery <rra at stanford.edu>.
-
-This program is free software; you may redistribute it and/or modify it
-under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/Pod/ParseUtils.pm
===================================================================
--- vendor/perl/dist/lib/Pod/ParseUtils.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/ParseUtils.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,855 +0,0 @@
-#############################################################################
-# Pod/ParseUtils.pm -- helpers for POD parsing and conversion
-#
-# Copyright (C) 1999-2000 by Marek Rouchal. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-package Pod::ParseUtils;
-use strict;
-
-use vars qw($VERSION);
-$VERSION = '1.36'; ## Current version of this package
-require 5.005; ## requires this Perl version or later
-
-=head1 NAME
-
-Pod::ParseUtils - helpers for POD parsing and conversion
-
-=head1 SYNOPSIS
-
- use Pod::ParseUtils;
-
- my $list = new Pod::List;
- my $link = Pod::Hyperlink->new('Pod::Parser');
-
-=head1 DESCRIPTION
-
-B<Pod::ParseUtils> contains a few object-oriented helper packages for
-POD parsing and processing (i.e. in POD formatters and translators).
-
-=cut
-
-#-----------------------------------------------------------------------------
-# Pod::List
-#
-# class to hold POD list info (=over, =item, =back)
-#-----------------------------------------------------------------------------
-
-package Pod::List;
-
-use Carp;
-
-=head2 Pod::List
-
-B<Pod::List> can be used to hold information about POD lists
-(written as =over ... =item ... =back) for further processing.
-The following methods are available:
-
-=over 4
-
-=item Pod::List-E<gt>new()
-
-Create a new list object. Properties may be specified through a hash
-reference like this:
-
- my $list = Pod::List->new({ -start => $., -indent => 4 });
-
-See the individual methods/properties for details.
-
-=cut
-
-sub new {
- my $this = shift;
- my $class = ref($this) || $this;
- my %params = @_;
- my $self = {%params};
- bless $self, $class;
- $self->initialize();
- return $self;
-}
-
-sub initialize {
- my $self = shift;
- $self->{-file} ||= 'unknown';
- $self->{-start} ||= 'unknown';
- $self->{-indent} ||= 4; # perlpod: "should be the default"
- $self->{_items} = [];
- $self->{-type} ||= '';
-}
-
-=item $list-E<gt>file()
-
-Without argument, retrieves the file name the list is in. This must
-have been set before by either specifying B<-file> in the B<new()>
-method or by calling the B<file()> method with a scalar argument.
-
-=cut
-
-# The POD file name the list appears in
-sub file {
- return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file};
-}
-
-=item $list-E<gt>start()
-
-Without argument, retrieves the line number where the list started.
-This must have been set before by either specifying B<-start> in the
-B<new()> method or by calling the B<start()> method with a scalar
-argument.
-
-=cut
-
-# The line in the file the node appears
-sub start {
- return (@_ > 1) ? ($_[0]->{-start} = $_[1]) : $_[0]->{-start};
-}
-
-=item $list-E<gt>indent()
-
-Without argument, retrieves the indent level of the list as specified
-in C<=over n>. This must have been set before by either specifying
-B<-indent> in the B<new()> method or by calling the B<indent()> method
-with a scalar argument.
-
-=cut
-
-# indent level
-sub indent {
- return (@_ > 1) ? ($_[0]->{-indent} = $_[1]) : $_[0]->{-indent};
-}
-
-=item $list-E<gt>type()
-
-Without argument, retrieves the list type, which can be an arbitrary value,
-e.g. C<OL>, C<UL>, ... when thinking the HTML way.
-This must have been set before by either specifying
-B<-type> in the B<new()> method or by calling the B<type()> method
-with a scalar argument.
-
-=cut
-
-# The type of the list (UL, OL, ...)
-sub type {
- return (@_ > 1) ? ($_[0]->{-type} = $_[1]) : $_[0]->{-type};
-}
-
-=item $list-E<gt>rx()
-
-Without argument, retrieves a regular expression for simplifying the
-individual item strings once the list type has been determined. Usage:
-E.g. when converting to HTML, one might strip the leading number in
-an ordered list as C<E<lt>OLE<gt>> already prints numbers itself.
-This must have been set before by either specifying
-B<-rx> in the B<new()> method or by calling the B<rx()> method
-with a scalar argument.
-
-=cut
-
-# The regular expression to simplify the items
-sub rx {
- return (@_ > 1) ? ($_[0]->{-rx} = $_[1]) : $_[0]->{-rx};
-}
-
-=item $list-E<gt>item()
-
-Without argument, retrieves the array of the items in this list.
-The items may be represented by any scalar.
-If an argument has been given, it is pushed on the list of items.
-
-=cut
-
-# The individual =items of this list
-sub item {
- my ($self,$item) = @_;
- if(defined $item) {
- push(@{$self->{_items}}, $item);
- return $item;
- }
- else {
- return @{$self->{_items}};
- }
-}
-
-=item $list-E<gt>parent()
-
-Without argument, retrieves information about the parent holding this
-list, which is represented as an arbitrary scalar.
-This must have been set before by either specifying
-B<-parent> in the B<new()> method or by calling the B<parent()> method
-with a scalar argument.
-
-=cut
-
-# possibility for parsers/translators to store information about the
-# lists's parent object
-sub parent {
- return (@_ > 1) ? ($_[0]->{-parent} = $_[1]) : $_[0]->{-parent};
-}
-
-=item $list-E<gt>tag()
-
-Without argument, retrieves information about the list tag, which can be
-any scalar.
-This must have been set before by either specifying
-B<-tag> in the B<new()> method or by calling the B<tag()> method
-with a scalar argument.
-
-=back
-
-=cut
-
-# possibility for parsers/translators to store information about the
-# list's object
-sub tag {
- return (@_ > 1) ? ($_[0]->{-tag} = $_[1]) : $_[0]->{-tag};
-}
-
-#-----------------------------------------------------------------------------
-# Pod::Hyperlink
-#
-# class to manipulate POD hyperlinks (L<>)
-#-----------------------------------------------------------------------------
-
-package Pod::Hyperlink;
-
-=head2 Pod::Hyperlink
-
-B<Pod::Hyperlink> is a class for manipulation of POD hyperlinks. Usage:
-
- my $link = Pod::Hyperlink->new('alternative text|page/"section in page"');
-
-The B<Pod::Hyperlink> class is mainly designed to parse the contents of the
-C<LE<lt>...E<gt>> sequence, providing a simple interface for accessing the
-different parts of a POD hyperlink for further processing. It can also be
-used to construct hyperlinks.
-
-=over 4
-
-=item Pod::Hyperlink-E<gt>new()
-
-The B<new()> method can either be passed a set of key/value pairs or a single
-scalar value, namely the contents of a C<LE<lt>...E<gt>> sequence. An object
-of the class C<Pod::Hyperlink> is returned. The value C<undef> indicates a
-failure, the error message is stored in C<$@>.
-
-=cut
-
-use Carp;
-
-sub new {
- my $this = shift;
- my $class = ref($this) || $this;
- my $self = +{};
- bless $self, $class;
- $self->initialize();
- if(defined $_[0]) {
- if(ref($_[0])) {
- # called with a list of parameters
- %$self = %{$_[0]};
- $self->_construct_text();
- }
- else {
- # called with L<> contents
- return unless($self->parse($_[0]));
- }
- }
- return $self;
-}
-
-sub initialize {
- my $self = shift;
- $self->{-line} ||= 'undef';
- $self->{-file} ||= 'undef';
- $self->{-page} ||= '';
- $self->{-node} ||= '';
- $self->{-alttext} ||= '';
- $self->{-type} ||= 'undef';
- $self->{_warnings} = [];
-}
-
-=item $link-E<gt>parse($string)
-
-This method can be used to (re)parse a (new) hyperlink, i.e. the contents
-of a C<LE<lt>...E<gt>> sequence. The result is stored in the current object.
-Warnings are stored in the B<warnings> property.
-E.g. sections like C<LE<lt>open(2)E<gt>> are deprecated, as they do not point
-to Perl documents. C<LE<lt>DBI::foo(3p)E<gt>> is wrong as well, the manpage
-section can simply be dropped.
-
-=cut
-
-sub parse {
- my $self = shift;
- local($_) = $_[0];
- # syntax check the link and extract destination
- my ($alttext,$page,$node,$type,$quoted) = (undef,'','','',0);
-
- $self->{_warnings} = [];
-
- # collapse newlines with whitespace
- s/\s*\n+\s*/ /g;
-
- # strip leading/trailing whitespace
- if(s/^[\s\n]+//) {
- $self->warning('ignoring leading whitespace in link');
- }
- if(s/[\s\n]+$//) {
- $self->warning('ignoring trailing whitespace in link');
- }
- unless(length($_)) {
- _invalid_link('empty link');
- return;
- }
-
- ## Check for different possibilities. This is tedious and error-prone
- # we match all possibilities (alttext, page, section/item)
- #warn "DEBUG: link=$_\n";
-
- # only page
- # problem: a lot of people use (), or (1) or the like to indicate
- # man page sections. But this collides with L<func()> that is supposed
- # to point to an internal funtion...
- my $page_rx = '[\w.-]+(?:::[\w.-]+)*(?:[(](?:\d\w*|)[)]|)';
- # page name only
- if(/^($page_rx)$/o) {
- $page = $1;
- $type = 'page';
- }
- # alttext, page and "section"
- elsif(m{^(.*?)\s*[|]\s*($page_rx)\s*/\s*"(.+)"$}o) {
- ($alttext, $page, $node) = ($1, $2, $3);
- $type = 'section';
- $quoted = 1; #... therefore | and / are allowed
- }
- # alttext and page
- elsif(/^(.*?)\s*[|]\s*($page_rx)$/o) {
- ($alttext, $page) = ($1, $2);
- $type = 'page';
- }
- # alttext and "section"
- elsif(m{^(.*?)\s*[|]\s*(?:/\s*|)"(.+)"$}) {
- ($alttext, $node) = ($1,$2);
- $type = 'section';
- $quoted = 1;
- }
- # page and "section"
- elsif(m{^($page_rx)\s*/\s*"(.+)"$}o) {
- ($page, $node) = ($1, $2);
- $type = 'section';
- $quoted = 1;
- }
- # page and item
- elsif(m{^($page_rx)\s*/\s*(.+)$}o) {
- ($page, $node) = ($1, $2);
- $type = 'item';
- }
- # only "section"
- elsif(m{^/?"(.+)"$}) {
- $node = $1;
- $type = 'section';
- $quoted = 1;
- }
- # only item
- elsif(m{^\s*/(.+)$}) {
- $node = $1;
- $type = 'item';
- }
-
- # non-standard: Hyperlink with alt-text - doesn't remove protocol prefix, maybe it should?
- elsif(/^ \s* (.*?) \s* [|] \s* (\w+:[^:\s] [^\s|]*?) \s* $/ix) {
- ($alttext,$node) = ($1,$2);
- $type = 'hyperlink';
- }
-
- # non-standard: Hyperlink
- elsif(/^(\w+:[^:\s]\S*)$/i) {
- $node = $1;
- $type = 'hyperlink';
- }
- # alttext, page and item
- elsif(m{^(.*?)\s*[|]\s*($page_rx)\s*/\s*(.+)$}o) {
- ($alttext, $page, $node) = ($1, $2, $3);
- $type = 'item';
- }
- # alttext and item
- elsif(m{^(.*?)\s*[|]\s*/(.+)$}) {
- ($alttext, $node) = ($1,$2);
- }
- # must be an item or a "malformed" section (without "")
- else {
- $node = $_;
- $type = 'item';
- }
- # collapse whitespace in nodes
- $node =~ s/\s+/ /gs;
-
- # empty alternative text expands to node name
- if(defined $alttext) {
- if(!length($alttext)) {
- $alttext = $node || $page;
- }
- }
- else {
- $alttext = '';
- }
-
- if($page =~ /[(]\w*[)]$/) {
- $self->warning("(section) in '$page' deprecated");
- }
- if(!$quoted && $node =~ m{[|/]} && $type ne 'hyperlink') {
- $self->warning("node '$node' contains non-escaped | or /");
- }
- if($alttext =~ m{[|/]}) {
- $self->warning("alternative text '$node' contains non-escaped | or /");
- }
- $self->{-page} = $page;
- $self->{-node} = $node;
- $self->{-alttext} = $alttext;
- #warn "DEBUG: page=$page section=$section item=$item alttext=$alttext\n";
- $self->{-type} = $type;
- $self->_construct_text();
- 1;
-}
-
-sub _construct_text {
- my $self = shift;
- my $alttext = $self->alttext();
- my $type = $self->type();
- my $section = $self->node();
- my $page = $self->page();
- my $page_ext = '';
- $page =~ s/([(]\w*[)])$// && ($page_ext = $1);
- if($alttext) {
- $self->{_text} = $alttext;
- }
- elsif($type eq 'hyperlink') {
- $self->{_text} = $section;
- }
- else {
- $self->{_text} = ($section || '') .
- (($page && $section) ? ' in ' : '') .
- "$page$page_ext";
- }
- # for being marked up later
- # use the non-standard markers P<> and Q<>, so that the resulting
- # text can be parsed by the translators. It's their job to put
- # the correct hypertext around the linktext
- if($alttext) {
- $self->{_markup} = "Q<$alttext>";
- }
- elsif($type eq 'hyperlink') {
- $self->{_markup} = "Q<$section>";
- }
- else {
- $self->{_markup} = (!$section ? '' : "Q<$section>") .
- ($page ? ($section ? ' in ':'') . "P<$page>$page_ext" : '');
- }
-}
-
-=item $link-E<gt>markup($string)
-
-Set/retrieve the textual value of the link. This string contains special
-markers C<PE<lt>E<gt>> and C<QE<lt>E<gt>> that should be expanded by the
-translator's interior sequence expansion engine to the
-formatter-specific code to highlight/activate the hyperlink. The details
-have to be implemented in the translator.
-
-=cut
-
-#' retrieve/set markuped text
-sub markup {
- return (@_ > 1) ? ($_[0]->{_markup} = $_[1]) : $_[0]->{_markup};
-}
-
-=item $link-E<gt>text()
-
-This method returns the textual representation of the hyperlink as above,
-but without markers (read only). Depending on the link type this is one of
-the following alternatives (the + and * denote the portions of the text
-that are marked up):
-
- +perl+ L<perl>
- *$|* in +perlvar+ L<perlvar/$|>
- *OPTIONS* in +perldoc+ L<perldoc/"OPTIONS">
- *DESCRIPTION* L<"DESCRIPTION">
-
-=cut
-
-# The complete link's text
-sub text {
- return $_[0]->{_text};
-}
-
-=item $link-E<gt>warning()
-
-After parsing, this method returns any warnings encountered during the
-parsing process.
-
-=cut
-
-# Set/retrieve warnings
-sub warning {
- my $self = shift;
- if(@_) {
- push(@{$self->{_warnings}}, @_);
- return @_;
- }
- return @{$self->{_warnings}};
-}
-
-=item $link-E<gt>file()
-
-=item $link-E<gt>line()
-
-Just simple slots for storing information about the line and the file
-the link was encountered in. Has to be filled in manually.
-
-=cut
-
-# The line in the file the link appears
-sub line {
- return (@_ > 1) ? ($_[0]->{-line} = $_[1]) : $_[0]->{-line};
-}
-
-# The POD file name the link appears in
-sub file {
- return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file};
-}
-
-=item $link-E<gt>page()
-
-This method sets or returns the POD page this link points to.
-
-=cut
-
-# The POD page the link appears on
-sub page {
- if (@_ > 1) {
- $_[0]->{-page} = $_[1];
- $_[0]->_construct_text();
- }
- return $_[0]->{-page};
-}
-
-=item $link-E<gt>node()
-
-As above, but the destination node text of the link.
-
-=cut
-
-# The link destination
-sub node {
- if (@_ > 1) {
- $_[0]->{-node} = $_[1];
- $_[0]->_construct_text();
- }
- return $_[0]->{-node};
-}
-
-=item $link-E<gt>alttext()
-
-Sets or returns an alternative text specified in the link.
-
-=cut
-
-# Potential alternative text
-sub alttext {
- if (@_ > 1) {
- $_[0]->{-alttext} = $_[1];
- $_[0]->_construct_text();
- }
- return $_[0]->{-alttext};
-}
-
-=item $link-E<gt>type()
-
-The node type, either C<section> or C<item>. As an unofficial type,
-there is also C<hyperlink>, derived from e.g. C<LE<lt>http://perl.comE<gt>>
-
-=cut
-
-# The type: item or headn
-sub type {
- return (@_ > 1) ? ($_[0]->{-type} = $_[1]) : $_[0]->{-type};
-}
-
-=item $link-E<gt>link()
-
-Returns the link as contents of C<LE<lt>E<gt>>. Reciprocal to B<parse()>.
-
-=back
-
-=cut
-
-# The link itself
-sub link {
- my $self = shift;
- my $link = $self->page() || '';
- if($self->node()) {
- my $node = $self->node();
- $node =~ s/\|/E<verbar>/g;
- $node =~ s{/}{E<sol>}g;
- if($self->type() eq 'section') {
- $link .= ($link ? '/' : '') . '"' . $node . '"';
- }
- elsif($self->type() eq 'hyperlink') {
- $link = $self->node();
- }
- else { # item
- $link .= '/' . $node;
- }
- }
- if($self->alttext()) {
- my $text = $self->alttext();
- $text =~ s/\|/E<verbar>/g;
- $text =~ s{/}{E<sol>}g;
- $link = "$text|$link";
- }
- return $link;
-}
-
-sub _invalid_link {
- my ($msg) = @_;
- # this sets @_
- #eval { die "$msg\n" };
- #chomp $@;
- $@ = $msg; # this seems to work, too!
- return;
-}
-
-#-----------------------------------------------------------------------------
-# Pod::Cache
-#
-# class to hold POD page details
-#-----------------------------------------------------------------------------
-
-package Pod::Cache;
-
-=head2 Pod::Cache
-
-B<Pod::Cache> holds information about a set of POD documents,
-especially the nodes for hyperlinks.
-The following methods are available:
-
-=over 4
-
-=item Pod::Cache-E<gt>new()
-
-Create a new cache object. This object can hold an arbitrary number of
-POD documents of class Pod::Cache::Item.
-
-=cut
-
-sub new {
- my $this = shift;
- my $class = ref($this) || $this;
- my $self = [];
- bless $self, $class;
- return $self;
-}
-
-=item $cache-E<gt>item()
-
-Add a new item to the cache. Without arguments, this method returns a
-list of all cache elements.
-
-=cut
-
-sub item {
- my ($self,%param) = @_;
- if(%param) {
- my $item = Pod::Cache::Item->new(%param);
- push(@$self, $item);
- return $item;
- }
- else {
- return @{$self};
- }
-}
-
-=item $cache-E<gt>find_page($name)
-
-Look for a POD document named C<$name> in the cache. Returns the
-reference to the corresponding Pod::Cache::Item object or undef if
-not found.
-
-=back
-
-=cut
-
-sub find_page {
- my ($self,$page) = @_;
- foreach(@$self) {
- if($_->page() eq $page) {
- return $_;
- }
- }
- return;
-}
-
-package Pod::Cache::Item;
-
-=head2 Pod::Cache::Item
-
-B<Pod::Cache::Item> holds information about individual POD documents,
-that can be grouped in a Pod::Cache object.
-It is intended to hold information about the hyperlink nodes of POD
-documents.
-The following methods are available:
-
-=over 4
-
-=item Pod::Cache::Item-E<gt>new()
-
-Create a new object.
-
-=cut
-
-sub new {
- my $this = shift;
- my $class = ref($this) || $this;
- my %params = @_;
- my $self = {%params};
- bless $self, $class;
- $self->initialize();
- return $self;
-}
-
-sub initialize {
- my $self = shift;
- $self->{-nodes} = [] unless(defined $self->{-nodes});
-}
-
-=item $cacheitem-E<gt>page()
-
-Set/retrieve the POD document name (e.g. "Pod::Parser").
-
-=cut
-
-# The POD page
-sub page {
- return (@_ > 1) ? ($_[0]->{-page} = $_[1]) : $_[0]->{-page};
-}
-
-=item $cacheitem-E<gt>description()
-
-Set/retrieve the POD short description as found in the C<=head1 NAME>
-section.
-
-=cut
-
-# The POD description, taken out of NAME if present
-sub description {
- return (@_ > 1) ? ($_[0]->{-description} = $_[1]) : $_[0]->{-description};
-}
-
-=item $cacheitem-E<gt>path()
-
-Set/retrieve the POD file storage path.
-
-=cut
-
-# The file path
-sub path {
- return (@_ > 1) ? ($_[0]->{-path} = $_[1]) : $_[0]->{-path};
-}
-
-=item $cacheitem-E<gt>file()
-
-Set/retrieve the POD file name.
-
-=cut
-
-# The POD file name
-sub file {
- return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file};
-}
-
-=item $cacheitem-E<gt>nodes()
-
-Add a node (or a list of nodes) to the document's node list. Note that
-the order is kept, i.e. start with the first node and end with the last.
-If no argument is given, the current list of nodes is returned in the
-same order the nodes have been added.
-A node can be any scalar, but usually is a pair of node string and
-unique id for the C<find_node> method to work correctly.
-
-=cut
-
-# The POD nodes
-sub nodes {
- my ($self, at nodes) = @_;
- if(@nodes) {
- push(@{$self->{-nodes}}, @nodes);
- return @nodes;
- }
- else {
- return @{$self->{-nodes}};
- }
-}
-
-=item $cacheitem-E<gt>find_node($name)
-
-Look for a node or index entry named C<$name> in the object.
-Returns the unique id of the node (i.e. the second element of the array
-stored in the node array) or undef if not found.
-
-=cut
-
-sub find_node {
- my ($self,$node) = @_;
- my @search;
- push(@search, @{$self->{-nodes}}) if($self->{-nodes});
- push(@search, @{$self->{-idx}}) if($self->{-idx});
- foreach(@search) {
- if($_->[0] eq $node) {
- return $_->[1]; # id
- }
- }
- return;
-}
-
-=item $cacheitem-E<gt>idx()
-
-Add an index entry (or a list of them) to the document's index list. Note that
-the order is kept, i.e. start with the first node and end with the last.
-If no argument is given, the current list of index entries is returned in the
-same order the entries have been added.
-An index entry can be any scalar, but usually is a pair of string and
-unique id.
-
-=back
-
-=cut
-
-# The POD index entries
-sub idx {
- my ($self, at idx) = @_;
- if(@idx) {
- push(@{$self->{-idx}}, @idx);
- return @idx;
- }
- else {
- return @{$self->{-idx}};
- }
-}
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Marek Rouchal E<lt>marekr at cpan.orgE<gt>, borrowing
-a lot of things from L<pod2man> and L<pod2roff> as well as other POD
-processing tools by Tom Christiansen, Brad Appleton and Russ Allbery.
-
-=head1 SEE ALSO
-
-L<pod2man>, L<pod2roff>, L<Pod::Parser>, L<Pod::Checker>,
-L<pod2html>
-
-=cut
-
-1;
Deleted: vendor/perl/dist/lib/Pod/Parser.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Parser.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Parser.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1829 +0,0 @@
-#############################################################################
-# Pod/Parser.pm -- package which defines a base class for parsing POD docs.
-#
-# Copyright (C) 1996-2000 by Bradford Appleton. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-package Pod::Parser;
-use strict;
-
-## These "variables" are used as local "glob aliases" for performance
-use vars qw($VERSION @ISA %myData %myOpts @input_stack);
-$VERSION = '1.37'; ## Current version of this package
-require 5.005; ## requires this Perl version or later
-
-#############################################################################
-
-=head1 NAME
-
-Pod::Parser - base class for creating POD filters and translators
-
-=head1 SYNOPSIS
-
- use Pod::Parser;
-
- package MyParser;
- @ISA = qw(Pod::Parser);
-
- sub command {
- my ($parser, $command, $paragraph, $line_num) = @_;
- ## Interpret the command and its text; sample actions might be:
- if ($command eq 'head1') { ... }
- elsif ($command eq 'head2') { ... }
- ## ... other commands and their actions
- my $out_fh = $parser->output_handle();
- my $expansion = $parser->interpolate($paragraph, $line_num);
- print $out_fh $expansion;
- }
-
- sub verbatim {
- my ($parser, $paragraph, $line_num) = @_;
- ## Format verbatim paragraph; sample actions might be:
- my $out_fh = $parser->output_handle();
- print $out_fh $paragraph;
- }
-
- sub textblock {
- my ($parser, $paragraph, $line_num) = @_;
- ## Translate/Format this block of text; sample actions might be:
- my $out_fh = $parser->output_handle();
- my $expansion = $parser->interpolate($paragraph, $line_num);
- print $out_fh $expansion;
- }
-
- sub interior_sequence {
- my ($parser, $seq_command, $seq_argument) = @_;
- ## Expand an interior sequence; sample actions might be:
- return "*$seq_argument*" if ($seq_command eq 'B');
- return "`$seq_argument'" if ($seq_command eq 'C');
- return "_${seq_argument}_'" if ($seq_command eq 'I');
- ## ... other sequence commands and their resulting text
- }
-
- package main;
-
- ## Create a parser object and have it parse file whose name was
- ## given on the command-line (use STDIN if no files were given).
- $parser = new MyParser();
- $parser->parse_from_filehandle(\*STDIN) if (@ARGV == 0);
- for (@ARGV) { $parser->parse_from_file($_); }
-
-=head1 REQUIRES
-
-perl5.005, Pod::InputObjects, Exporter, Symbol, Carp
-
-=head1 EXPORTS
-
-Nothing.
-
-=head1 DESCRIPTION
-
-B<Pod::Parser> is a base class for creating POD filters and translators.
-It handles most of the effort involved with parsing the POD sections
-from an input stream, leaving subclasses free to be concerned only with
-performing the actual translation of text.
-
-B<Pod::Parser> parses PODs, and makes method calls to handle the various
-components of the POD. Subclasses of B<Pod::Parser> override these methods
-to translate the POD into whatever output format they desire.
-
-=head1 QUICK OVERVIEW
-
-To create a POD filter for translating POD documentation into some other
-format, you create a subclass of B<Pod::Parser> which typically overrides
-just the base class implementation for the following methods:
-
-=over 2
-
-=item *
-
-B<command()>
-
-=item *
-
-B<verbatim()>
-
-=item *
-
-B<textblock()>
-
-=item *
-
-B<interior_sequence()>
-
-=back
-
-You may also want to override the B<begin_input()> and B<end_input()>
-methods for your subclass (to perform any needed per-file and/or
-per-document initialization or cleanup).
-
-If you need to perform any preprocessing of input before it is parsed
-you may want to override one or more of B<preprocess_line()> and/or
-B<preprocess_paragraph()>.
-
-Sometimes it may be necessary to make more than one pass over the input
-files. If this is the case you have several options. You can make the
-first pass using B<Pod::Parser> and override your methods to store the
-intermediate results in memory somewhere for the B<end_pod()> method to
-process. You could use B<Pod::Parser> for several passes with an
-appropriate state variable to control the operation for each pass. If
-your input source can't be reset to start at the beginning, you can
-store it in some other structure as a string or an array and have that
-structure implement a B<getline()> method (which is all that
-B<parse_from_filehandle()> uses to read input).
-
-Feel free to add any member data fields you need to keep track of things
-like current font, indentation, horizontal or vertical position, or
-whatever else you like. Be sure to read L<"PRIVATE METHODS AND DATA">
-to avoid name collisions.
-
-For the most part, the B<Pod::Parser> base class should be able to
-do most of the input parsing for you and leave you free to worry about
-how to interpret the commands and translate the result.
-
-Note that all we have described here in this quick overview is the
-simplest most straightforward use of B<Pod::Parser> to do stream-based
-parsing. It is also possible to use the B<Pod::Parser::parse_text> function
-to do more sophisticated tree-based parsing. See L<"TREE-BASED PARSING">.
-
-=head1 PARSING OPTIONS
-
-A I<parse-option> is simply a named option of B<Pod::Parser> with a
-value that corresponds to a certain specified behavior. These various
-behaviors of B<Pod::Parser> may be enabled/disabled by setting
-or unsetting one or more I<parse-options> using the B<parseopts()> method.
-The set of currently accepted parse-options is as follows:
-
-=over 3
-
-=item B<-want_nonPODs> (default: unset)
-
-Normally (by default) B<Pod::Parser> will only provide access to
-the POD sections of the input. Input paragraphs that are not part
-of the POD-format documentation are not made available to the caller
-(not even using B<preprocess_paragraph()>). Setting this option to a
-non-empty, non-zero value will allow B<preprocess_paragraph()> to see
-non-POD sections of the input as well as POD sections. The B<cutting()>
-method can be used to determine if the corresponding paragraph is a POD
-paragraph, or some other input paragraph.
-
-=item B<-process_cut_cmd> (default: unset)
-
-Normally (by default) B<Pod::Parser> handles the C<=cut> POD directive
-by itself and does not pass it on to the caller for processing. Setting
-this option to a non-empty, non-zero value will cause B<Pod::Parser> to
-pass the C<=cut> directive to the caller just like any other POD command
-(and hence it may be processed by the B<command()> method).
-
-B<Pod::Parser> will still interpret the C<=cut> directive to mean that
-"cutting mode" has been (re)entered, but the caller will get a chance
-to capture the actual C<=cut> paragraph itself for whatever purpose
-it desires.
-
-=item B<-warnings> (default: unset)
-
-Normally (by default) B<Pod::Parser> recognizes a bare minimum of
-pod syntax errors and warnings and issues diagnostic messages
-for errors, but not for warnings. (Use B<Pod::Checker> to do more
-thorough checking of POD syntax.) Setting this option to a non-empty,
-non-zero value will cause B<Pod::Parser> to issue diagnostics for
-the few warnings it recognizes as well as the errors.
-
-=back
-
-Please see L<"parseopts()"> for a complete description of the interface
-for the setting and unsetting of parse-options.
-
-=cut
-
-#############################################################################
-
-#use diagnostics;
-use Pod::InputObjects;
-use Carp;
-use Exporter;
-BEGIN {
- if ($] < 5.006) {
- require Symbol;
- import Symbol;
- }
-}
- at ISA = qw(Exporter);
-
-#############################################################################
-
-=head1 RECOMMENDED SUBROUTINE/METHOD OVERRIDES
-
-B<Pod::Parser> provides several methods which most subclasses will probably
-want to override. These methods are as follows:
-
-=cut
-
-##---------------------------------------------------------------------------
-
-=head1 B<command()>
-
- $parser->command($cmd,$text,$line_num,$pod_para);
-
-This method should be overridden by subclasses to take the appropriate
-action when a POD command paragraph (denoted by a line beginning with
-"=") is encountered. When such a POD directive is seen in the input,
-this method is called and is passed:
-
-=over 3
-
-=item C<$cmd>
-
-the name of the command for this POD paragraph
-
-=item C<$text>
-
-the paragraph text for the given POD paragraph command.
-
-=item C<$line_num>
-
-the line-number of the beginning of the paragraph
-
-=item C<$pod_para>
-
-a reference to a C<Pod::Paragraph> object which contains further
-information about the paragraph command (see L<Pod::InputObjects>
-for details).
-
-=back
-
-B<Note> that this method I<is> called for C<=pod> paragraphs.
-
-The base class implementation of this method simply treats the raw POD
-command as normal block of paragraph text (invoking the B<textblock()>
-method with the command paragraph).
-
-=cut
-
-sub command {
- my ($self, $cmd, $text, $line_num, $pod_para) = @_;
- ## Just treat this like a textblock
- $self->textblock($pod_para->raw_text(), $line_num, $pod_para);
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<verbatim()>
-
- $parser->verbatim($text,$line_num,$pod_para);
-
-This method may be overridden by subclasses to take the appropriate
-action when a block of verbatim text is encountered. It is passed the
-following parameters:
-
-=over 3
-
-=item C<$text>
-
-the block of text for the verbatim paragraph
-
-=item C<$line_num>
-
-the line-number of the beginning of the paragraph
-
-=item C<$pod_para>
-
-a reference to a C<Pod::Paragraph> object which contains further
-information about the paragraph (see L<Pod::InputObjects>
-for details).
-
-=back
-
-The base class implementation of this method simply prints the textblock
-(unmodified) to the output filehandle.
-
-=cut
-
-sub verbatim {
- my ($self, $text, $line_num, $pod_para) = @_;
- my $out_fh = $self->{_OUTPUT};
- print $out_fh $text;
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<textblock()>
-
- $parser->textblock($text,$line_num,$pod_para);
-
-This method may be overridden by subclasses to take the appropriate
-action when a normal block of POD text is encountered (although the base
-class method will usually do what you want). It is passed the following
-parameters:
-
-=over 3
-
-=item C<$text>
-
-the block of text for the a POD paragraph
-
-=item C<$line_num>
-
-the line-number of the beginning of the paragraph
-
-=item C<$pod_para>
-
-a reference to a C<Pod::Paragraph> object which contains further
-information about the paragraph (see L<Pod::InputObjects>
-for details).
-
-=back
-
-In order to process interior sequences, subclasses implementations of
-this method will probably want to invoke either B<interpolate()> or
-B<parse_text()>, passing it the text block C<$text>, and the corresponding
-line number in C<$line_num>, and then perform any desired processing upon
-the returned result.
-
-The base class implementation of this method simply prints the text block
-as it occurred in the input stream).
-
-=cut
-
-sub textblock {
- my ($self, $text, $line_num, $pod_para) = @_;
- my $out_fh = $self->{_OUTPUT};
- print $out_fh $self->interpolate($text, $line_num);
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<interior_sequence()>
-
- $parser->interior_sequence($seq_cmd,$seq_arg,$pod_seq);
-
-This method should be overridden by subclasses to take the appropriate
-action when an interior sequence is encountered. An interior sequence is
-an embedded command within a block of text which appears as a command
-name (usually a single uppercase character) followed immediately by a
-string of text which is enclosed in angle brackets. This method is
-passed the sequence command C<$seq_cmd> and the corresponding text
-C<$seq_arg>. It is invoked by the B<interpolate()> method for each interior
-sequence that occurs in the string that it is passed. It should return
-the desired text string to be used in place of the interior sequence.
-The C<$pod_seq> argument is a reference to a C<Pod::InteriorSequence>
-object which contains further information about the interior sequence.
-Please see L<Pod::InputObjects> for details if you need to access this
-additional information.
-
-Subclass implementations of this method may wish to invoke the
-B<nested()> method of C<$pod_seq> to see if it is nested inside
-some other interior-sequence (and if so, which kind).
-
-The base class implementation of the B<interior_sequence()> method
-simply returns the raw text of the interior sequence (as it occurred
-in the input) to the caller.
-
-=cut
-
-sub interior_sequence {
- my ($self, $seq_cmd, $seq_arg, $pod_seq) = @_;
- ## Just return the raw text of the interior sequence
- return $pod_seq->raw_text();
-}
-
-#############################################################################
-
-=head1 OPTIONAL SUBROUTINE/METHOD OVERRIDES
-
-B<Pod::Parser> provides several methods which subclasses may want to override
-to perform any special pre/post-processing. These methods do I<not> have to
-be overridden, but it may be useful for subclasses to take advantage of them.
-
-=cut
-
-##---------------------------------------------------------------------------
-
-=head1 B<new()>
-
- my $parser = Pod::Parser->new();
-
-This is the constructor for B<Pod::Parser> and its subclasses. You
-I<do not> need to override this method! It is capable of constructing
-subclass objects as well as base class objects, provided you use
-any of the following constructor invocation styles:
-
- my $parser1 = MyParser->new();
- my $parser2 = new MyParser();
- my $parser3 = $parser2->new();
-
-where C<MyParser> is some subclass of B<Pod::Parser>.
-
-Using the syntax C<MyParser::new()> to invoke the constructor is I<not>
-recommended, but if you insist on being able to do this, then the
-subclass I<will> need to override the B<new()> constructor method. If
-you do override the constructor, you I<must> be sure to invoke the
-B<initialize()> method of the newly blessed object.
-
-Using any of the above invocations, the first argument to the
-constructor is always the corresponding package name (or object
-reference). No other arguments are required, but if desired, an
-associative array (or hash-table) my be passed to the B<new()>
-constructor, as in:
-
- my $parser1 = MyParser->new( MYDATA => $value1, MOREDATA => $value2 );
- my $parser2 = new MyParser( -myflag => 1 );
-
-All arguments passed to the B<new()> constructor will be treated as
-key/value pairs in a hash-table. The newly constructed object will be
-initialized by copying the contents of the given hash-table (which may
-have been empty). The B<new()> constructor for this class and all of its
-subclasses returns a blessed reference to the initialized object (hash-table).
-
-=cut
-
-sub new {
- ## Determine if we were called via an object-ref or a classname
- my ($this,%params) = @_;
- my $class = ref($this) || $this;
- ## Any remaining arguments are treated as initial values for the
- ## hash that is used to represent this object.
- my $self = { %params };
- ## Bless ourselves into the desired class and perform any initialization
- bless $self, $class;
- $self->initialize();
- return $self;
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<initialize()>
-
- $parser->initialize();
-
-This method performs any necessary object initialization. It takes no
-arguments (other than the object instance of course, which is typically
-copied to a local variable named C<$self>). If subclasses override this
-method then they I<must> be sure to invoke C<$self-E<gt>SUPER::initialize()>.
-
-=cut
-
-sub initialize {
- #my $self = shift;
- #return;
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<begin_pod()>
-
- $parser->begin_pod();
-
-This method is invoked at the beginning of processing for each POD
-document that is encountered in the input. Subclasses should override
-this method to perform any per-document initialization.
-
-=cut
-
-sub begin_pod {
- #my $self = shift;
- #return;
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<begin_input()>
-
- $parser->begin_input();
-
-This method is invoked by B<parse_from_filehandle()> immediately I<before>
-processing input from a filehandle. The base class implementation does
-nothing, however, subclasses may override it to perform any per-file
-initializations.
-
-Note that if multiple files are parsed for a single POD document
-(perhaps the result of some future C<=include> directive) this method
-is invoked for every file that is parsed. If you wish to perform certain
-initializations once per document, then you should use B<begin_pod()>.
-
-=cut
-
-sub begin_input {
- #my $self = shift;
- #return;
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<end_input()>
-
- $parser->end_input();
-
-This method is invoked by B<parse_from_filehandle()> immediately I<after>
-processing input from a filehandle. The base class implementation does
-nothing, however, subclasses may override it to perform any per-file
-cleanup actions.
-
-Please note that if multiple files are parsed for a single POD document
-(perhaps the result of some kind of C<=include> directive) this method
-is invoked for every file that is parsed. If you wish to perform certain
-cleanup actions once per document, then you should use B<end_pod()>.
-
-=cut
-
-sub end_input {
- #my $self = shift;
- #return;
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<end_pod()>
-
- $parser->end_pod();
-
-This method is invoked at the end of processing for each POD document
-that is encountered in the input. Subclasses should override this method
-to perform any per-document finalization.
-
-=cut
-
-sub end_pod {
- #my $self = shift;
- #return;
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<preprocess_line()>
-
- $textline = $parser->preprocess_line($text, $line_num);
-
-This method should be overridden by subclasses that wish to perform
-any kind of preprocessing for each I<line> of input (I<before> it has
-been determined whether or not it is part of a POD paragraph). The
-parameter C<$text> is the input line; and the parameter C<$line_num> is
-the line number of the corresponding text line.
-
-The value returned should correspond to the new text to use in its
-place. If the empty string or an undefined value is returned then no
-further processing will be performed for this line.
-
-Please note that the B<preprocess_line()> method is invoked I<before>
-the B<preprocess_paragraph()> method. After all (possibly preprocessed)
-lines in a paragraph have been assembled together and it has been
-determined that the paragraph is part of the POD documentation from one
-of the selected sections, then B<preprocess_paragraph()> is invoked.
-
-The base class implementation of this method returns the given text.
-
-=cut
-
-sub preprocess_line {
- my ($self, $text, $line_num) = @_;
- return $text;
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<preprocess_paragraph()>
-
- $textblock = $parser->preprocess_paragraph($text, $line_num);
-
-This method should be overridden by subclasses that wish to perform any
-kind of preprocessing for each block (paragraph) of POD documentation
-that appears in the input stream. The parameter C<$text> is the POD
-paragraph from the input file; and the parameter C<$line_num> is the
-line number for the beginning of the corresponding paragraph.
-
-The value returned should correspond to the new text to use in its
-place If the empty string is returned or an undefined value is
-returned, then the given C<$text> is ignored (not processed).
-
-This method is invoked after gathering up all the lines in a paragraph
-and after determining the cutting state of the paragraph,
-but before trying to further parse or interpret them. After
-B<preprocess_paragraph()> returns, the current cutting state (which
-is returned by C<$self-E<gt>cutting()>) is examined. If it evaluates
-to true then input text (including the given C<$text>) is cut (not
-processed) until the next POD directive is encountered.
-
-Please note that the B<preprocess_line()> method is invoked I<before>
-the B<preprocess_paragraph()> method. After all (possibly preprocessed)
-lines in a paragraph have been assembled together and either it has been
-determined that the paragraph is part of the POD documentation from one
-of the selected sections or the C<-want_nonPODs> option is true,
-then B<preprocess_paragraph()> is invoked.
-
-The base class implementation of this method returns the given text.
-
-=cut
-
-sub preprocess_paragraph {
- my ($self, $text, $line_num) = @_;
- return $text;
-}
-
-#############################################################################
-
-=head1 METHODS FOR PARSING AND PROCESSING
-
-B<Pod::Parser> provides several methods to process input text. These
-methods typically won't need to be overridden (and in some cases they
-can't be overridden), but subclasses may want to invoke them to exploit
-their functionality.
-
-=cut
-
-##---------------------------------------------------------------------------
-
-=head1 B<parse_text()>
-
- $ptree1 = $parser->parse_text($text, $line_num);
- $ptree2 = $parser->parse_text({%opts}, $text, $line_num);
- $ptree3 = $parser->parse_text(\%opts, $text, $line_num);
-
-This method is useful if you need to perform your own interpolation
-of interior sequences and can't rely upon B<interpolate> to expand
-them in simple bottom-up order.
-
-The parameter C<$text> is a string or block of text to be parsed
-for interior sequences; and the parameter C<$line_num> is the
-line number corresponding to the beginning of C<$text>.
-
-B<parse_text()> will parse the given text into a parse-tree of "nodes."
-and interior-sequences. Each "node" in the parse tree is either a
-text-string, or a B<Pod::InteriorSequence>. The result returned is a
-parse-tree of type B<Pod::ParseTree>. Please see L<Pod::InputObjects>
-for more information about B<Pod::InteriorSequence> and B<Pod::ParseTree>.
-
-If desired, an optional hash-ref may be specified as the first argument
-to customize certain aspects of the parse-tree that is created and
-returned. The set of recognized option keywords are:
-
-=over 3
-
-=item B<-expand_seq> =E<gt> I<code-ref>|I<method-name>
-
-Normally, the parse-tree returned by B<parse_text()> will contain an
-unexpanded C<Pod::InteriorSequence> object for each interior-sequence
-encountered. Specifying B<-expand_seq> tells B<parse_text()> to "expand"
-every interior-sequence it sees by invoking the referenced function
-(or named method of the parser object) and using the return value as the
-expanded result.
-
-If a subroutine reference was given, it is invoked as:
-
- &$code_ref( $parser, $sequence )
-
-and if a method-name was given, it is invoked as:
-
- $parser->method_name( $sequence )
-
-where C<$parser> is a reference to the parser object, and C<$sequence>
-is a reference to the interior-sequence object.
-[I<NOTE>: If the B<interior_sequence()> method is specified, then it is
-invoked according to the interface specified in L<"interior_sequence()">].
-
-=item B<-expand_text> =E<gt> I<code-ref>|I<method-name>
-
-Normally, the parse-tree returned by B<parse_text()> will contain a
-text-string for each contiguous sequence of characters outside of an
-interior-sequence. Specifying B<-expand_text> tells B<parse_text()> to
-"preprocess" every such text-string it sees by invoking the referenced
-function (or named method of the parser object) and using the return value
-as the preprocessed (or "expanded") result. [Note that if the result is
-an interior-sequence, then it will I<not> be expanded as specified by the
-B<-expand_seq> option; Any such recursive expansion needs to be handled by
-the specified callback routine.]
-
-If a subroutine reference was given, it is invoked as:
-
- &$code_ref( $parser, $text, $ptree_node )
-
-and if a method-name was given, it is invoked as:
-
- $parser->method_name( $text, $ptree_node )
-
-where C<$parser> is a reference to the parser object, C<$text> is the
-text-string encountered, and C<$ptree_node> is a reference to the current
-node in the parse-tree (usually an interior-sequence object or else the
-top-level node of the parse-tree).
-
-=item B<-expand_ptree> =E<gt> I<code-ref>|I<method-name>
-
-Rather than returning a C<Pod::ParseTree>, pass the parse-tree as an
-argument to the referenced subroutine (or named method of the parser
-object) and return the result instead of the parse-tree object.
-
-If a subroutine reference was given, it is invoked as:
-
- &$code_ref( $parser, $ptree )
-
-and if a method-name was given, it is invoked as:
-
- $parser->method_name( $ptree )
-
-where C<$parser> is a reference to the parser object, and C<$ptree>
-is a reference to the parse-tree object.
-
-=back
-
-=cut
-
-sub parse_text {
- my $self = shift;
- local $_ = '';
-
- ## Get options and set any defaults
- my %opts = (ref $_[0]) ? %{ shift() } : ();
- my $expand_seq = $opts{'-expand_seq'} || undef;
- my $expand_text = $opts{'-expand_text'} || undef;
- my $expand_ptree = $opts{'-expand_ptree'} || undef;
-
- my $text = shift;
- my $line = shift;
- my $file = $self->input_file();
- my $cmd = "";
-
- ## Convert method calls into closures, for our convenience
- my $xseq_sub = $expand_seq;
- my $xtext_sub = $expand_text;
- my $xptree_sub = $expand_ptree;
- if (defined $expand_seq and $expand_seq eq 'interior_sequence') {
- ## If 'interior_sequence' is the method to use, we have to pass
- ## more than just the sequence object, we also need to pass the
- ## sequence name and text.
- $xseq_sub = sub {
- my ($sself, $iseq) = @_;
- my $args = join('', $iseq->parse_tree->children);
- return $sself->interior_sequence($iseq->name, $args, $iseq);
- };
- }
- ref $xseq_sub or $xseq_sub = sub { shift()->$expand_seq(@_) };
- ref $xtext_sub or $xtext_sub = sub { shift()->$expand_text(@_) };
- ref $xptree_sub or $xptree_sub = sub { shift()->$expand_ptree(@_) };
-
- ## Keep track of the "current" interior sequence, and maintain a stack
- ## of "in progress" sequences.
- ##
- ## NOTE that we push our own "accumulator" at the very beginning of the
- ## stack. It's really a parse-tree, not a sequence; but it implements
- ## the methods we need so we can use it to gather-up all the sequences
- ## and strings we parse. Thus, by the end of our parsing, it should be
- ## the only thing left on our stack and all we have to do is return it!
- ##
- my $seq = Pod::ParseTree->new();
- my @seq_stack = ($seq);
- my ($ldelim, $rdelim) = ('', '');
-
- ## Iterate over all sequence starts text (NOTE: split with
- ## capturing parens keeps the delimiters)
- $_ = $text;
- my @tokens = split /([A-Z]<(?:<+\s)?)/;
- while ( @tokens ) {
- $_ = shift @tokens;
- ## Look for the beginning of a sequence
- if ( /^([A-Z])(<(?:<+\s)?)$/ ) {
- ## Push a new sequence onto the stack of those "in-progress"
- my $ldelim_orig;
- ($cmd, $ldelim_orig) = ($1, $2);
- ($ldelim = $ldelim_orig) =~ s/\s+$//;
- ($rdelim = $ldelim) =~ tr/</>/;
- $seq = Pod::InteriorSequence->new(
- -name => $cmd,
- -ldelim => $ldelim_orig, -rdelim => $rdelim,
- -file => $file, -line => $line
- );
- (@seq_stack > 1) and $seq->nested($seq_stack[-1]);
- push @seq_stack, $seq;
- }
- ## Look for sequence ending
- elsif ( @seq_stack > 1 ) {
- ## Make sure we match the right kind of closing delimiter
- my ($seq_end, $post_seq) = ('', '');
- if ( ($ldelim eq '<' and /\A(.*?)(>)/s)
- or /\A(.*?)(\s+$rdelim)/s )
- {
- ## Found end-of-sequence, capture the interior and the
- ## closing the delimiter, and put the rest back on the
- ## token-list
- $post_seq = substr($_, length($1) + length($2));
- ($_, $seq_end) = ($1, $2);
- (length $post_seq) and unshift @tokens, $post_seq;
- }
- if (length) {
- ## In the middle of a sequence, append this text to it, and
- ## dont forget to "expand" it if that's what the caller wanted
- $seq->append($expand_text ? &$xtext_sub($self,$_,$seq) : $_);
- $_ .= $seq_end;
- }
- if (length $seq_end) {
- ## End of current sequence, record terminating delimiter
- $seq->rdelim($seq_end);
- ## Pop it off the stack of "in progress" sequences
- pop @seq_stack;
- ## Append result to its parent in current parse tree
- $seq_stack[-1]->append($expand_seq ? &$xseq_sub($self,$seq)
- : $seq);
- ## Remember the current cmd-name and left-delimiter
- if(@seq_stack > 1) {
- $cmd = $seq_stack[-1]->name;
- $ldelim = $seq_stack[-1]->ldelim;
- $rdelim = $seq_stack[-1]->rdelim;
- } else {
- $cmd = $ldelim = $rdelim = '';
- }
- }
- }
- elsif (length) {
- ## In the middle of a sequence, append this text to it, and
- ## dont forget to "expand" it if that's what the caller wanted
- $seq->append($expand_text ? &$xtext_sub($self,$_,$seq) : $_);
- }
- ## Keep track of line count
- $line += s/\r*\n//;
- ## Remember the "current" sequence
- $seq = $seq_stack[-1];
- }
-
- ## Handle unterminated sequences
- my $errorsub = (@seq_stack > 1) ? $self->errorsub() : undef;
- while (@seq_stack > 1) {
- ($cmd, $file, $line) = ($seq->name, $seq->file_line);
- $ldelim = $seq->ldelim;
- ($rdelim = $ldelim) =~ tr/</>/;
- $rdelim =~ s/^(\S+)(\s*)$/$2$1/;
- pop @seq_stack;
- my $errmsg = "*** ERROR: unterminated ${cmd}${ldelim}...${rdelim}".
- " at line $line in file $file\n";
- (ref $errorsub) and &{$errorsub}($errmsg)
- or (defined $errorsub) and $self->$errorsub($errmsg)
- or carp($errmsg);
- $seq_stack[-1]->append($expand_seq ? &$xseq_sub($self,$seq) : $seq);
- $seq = $seq_stack[-1];
- }
-
- ## Return the resulting parse-tree
- my $ptree = (pop @seq_stack)->parse_tree;
- return $expand_ptree ? &$xptree_sub($self, $ptree) : $ptree;
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<interpolate()>
-
- $textblock = $parser->interpolate($text, $line_num);
-
-This method translates all text (including any embedded interior sequences)
-in the given text string C<$text> and returns the interpolated result. The
-parameter C<$line_num> is the line number corresponding to the beginning
-of C<$text>.
-
-B<interpolate()> merely invokes a private method to recursively expand
-nested interior sequences in bottom-up order (innermost sequences are
-expanded first). If there is a need to expand nested sequences in
-some alternate order, use B<parse_text> instead.
-
-=cut
-
-sub interpolate {
- my($self, $text, $line_num) = @_;
- my %parse_opts = ( -expand_seq => 'interior_sequence' );
- my $ptree = $self->parse_text( \%parse_opts, $text, $line_num );
- return join '', $ptree->children();
-}
-
-##---------------------------------------------------------------------------
-
-=begin __PRIVATE__
-
-=head1 B<parse_paragraph()>
-
- $parser->parse_paragraph($text, $line_num);
-
-This method takes the text of a POD paragraph to be processed, along
-with its corresponding line number, and invokes the appropriate method
-(one of B<command()>, B<verbatim()>, or B<textblock()>).
-
-For performance reasons, this method is invoked directly without any
-dynamic lookup; Hence subclasses may I<not> override it!
-
-=end __PRIVATE__
-
-=cut
-
-sub parse_paragraph {
- my ($self, $text, $line_num) = @_;
- local *myData = $self; ## alias to avoid deref-ing overhead
- local *myOpts = ($myData{_PARSEOPTS} ||= {}); ## get parse-options
- local $_;
-
- ## See if we want to preprocess nonPOD paragraphs as well as POD ones.
- my $wantNonPods = $myOpts{'-want_nonPODs'};
-
- ## Update cutting status
- $myData{_CUTTING} = 0 if $text =~ /^={1,2}\S/;
-
- ## Perform any desired preprocessing if we wanted it this early
- $wantNonPods and $text = $self->preprocess_paragraph($text, $line_num);
-
- ## Ignore up until next POD directive if we are cutting
- return if $myData{_CUTTING};
-
- ## Now we know this is block of text in a POD section!
-
- ##-----------------------------------------------------------------
- ## This is a hook (hack ;-) for Pod::Select to do its thing without
- ## having to override methods, but also without Pod::Parser assuming
- ## $self is an instance of Pod::Select (if the _SELECTED_SECTIONS
- ## field exists then we assume there is an is_selected() method for
- ## us to invoke (calling $self->can('is_selected') could verify this
- ## but that is more overhead than I want to incur)
- ##-----------------------------------------------------------------
-
- ## Ignore this block if it isnt in one of the selected sections
- if (exists $myData{_SELECTED_SECTIONS}) {
- $self->is_selected($text) or return ($myData{_CUTTING} = 1);
- }
-
- ## If we havent already, perform any desired preprocessing and
- ## then re-check the "cutting" state
- unless ($wantNonPods) {
- $text = $self->preprocess_paragraph($text, $line_num);
- return 1 unless ((defined $text) and (length $text));
- return 1 if ($myData{_CUTTING});
- }
-
- ## Look for one of the three types of paragraphs
- my ($pfx, $cmd, $arg, $sep) = ('', '', '', '');
- my $pod_para = undef;
- if ($text =~ /^(={1,2})(?=\S)/) {
- ## Looks like a command paragraph. Capture the command prefix used
- ## ("=" or "=="), as well as the command-name, its paragraph text,
- ## and whatever sequence of characters was used to separate them
- $pfx = $1;
- $_ = substr($text, length $pfx);
- ($cmd, $sep, $text) = split /(\s+)/, $_, 2;
- ## If this is a "cut" directive then we dont need to do anything
- ## except return to "cutting" mode.
- if ($cmd eq 'cut') {
- $myData{_CUTTING} = 1;
- return unless $myOpts{'-process_cut_cmd'};
- }
- }
- ## Save the attributes indicating how the command was specified.
- $pod_para = new Pod::Paragraph(
- -name => $cmd,
- -text => $text,
- -prefix => $pfx,
- -separator => $sep,
- -file => $myData{_INFILE},
- -line => $line_num
- );
- # ## Invoke appropriate callbacks
- # if (exists $myData{_CALLBACKS}) {
- # ## Look through the callback list, invoke callbacks,
- # ## then see if we need to do the default actions
- # ## (invoke_callbacks will return true if we do).
- # return 1 unless $self->invoke_callbacks($cmd, $text, $line_num, $pod_para);
- # }
-
- # If the last paragraph ended in whitespace, and we're not between verbatim blocks, carp
- if ($myData{_WHITESPACE} and $myOpts{'-warnings'}
- and not ($text =~ /^\s+/ and ($myData{_PREVIOUS}||"") eq "verbatim")) {
- my $errorsub = $self->errorsub();
- my $line = $line_num - 1;
- my $errmsg = "*** WARNING: line containing nothing but whitespace".
- " in paragraph at line $line in file $myData{_INFILE}\n";
- (ref $errorsub) and &{$errorsub}($errmsg)
- or (defined $errorsub) and $self->$errorsub($errmsg)
- or carp($errmsg);
- }
-
- if (length $cmd) {
- ## A command paragraph
- $self->command($cmd, $text, $line_num, $pod_para);
- $myData{_PREVIOUS} = $cmd;
- }
- elsif ($text =~ /^\s+/) {
- ## Indented text - must be a verbatim paragraph
- $self->verbatim($text, $line_num, $pod_para);
- $myData{_PREVIOUS} = "verbatim";
- }
- else {
- ## Looks like an ordinary block of text
- $self->textblock($text, $line_num, $pod_para);
- $myData{_PREVIOUS} = "textblock";
- }
-
- # Update the whitespace for the next time around
- $myData{_WHITESPACE} = $text =~ /^[^\S\r\n]+\Z/m ? 1 : 0;
-
- return 1;
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<parse_from_filehandle()>
-
- $parser->parse_from_filehandle($in_fh,$out_fh);
-
-This method takes an input filehandle (which is assumed to already be
-opened for reading) and reads the entire input stream looking for blocks
-(paragraphs) of POD documentation to be processed. If no first argument
-is given the default input filehandle C<STDIN> is used.
-
-The C<$in_fh> parameter may be any object that provides a B<getline()>
-method to retrieve a single line of input text (hence, an appropriate
-wrapper object could be used to parse PODs from a single string or an
-array of strings).
-
-Using C<$in_fh-E<gt>getline()>, input is read line-by-line and assembled
-into paragraphs or "blocks" (which are separated by lines containing
-nothing but whitespace). For each block of POD documentation
-encountered it will invoke a method to parse the given paragraph.
-
-If a second argument is given then it should correspond to a filehandle where
-output should be sent (otherwise the default output filehandle is
-C<STDOUT> if no output filehandle is currently in use).
-
-B<NOTE:> For performance reasons, this method caches the input stream at
-the top of the stack in a local variable. Any attempts by clients to
-change the stack contents during processing when in the midst executing
-of this method I<will not affect> the input stream used by the current
-invocation of this method.
-
-This method does I<not> usually need to be overridden by subclasses.
-
-=cut
-
-sub parse_from_filehandle {
- my $self = shift;
- my %opts = (ref $_[0] eq 'HASH') ? %{ shift() } : ();
- my ($in_fh, $out_fh) = @_;
- $in_fh = \*STDIN unless ($in_fh);
- local *myData = $self; ## alias to avoid deref-ing overhead
- local *myOpts = ($myData{_PARSEOPTS} ||= {}); ## get parse-options
- local $_;
-
- ## Put this stream at the top of the stack and do beginning-of-input
- ## processing. NOTE that $in_fh might be reset during this process.
- my $topstream = $self->_push_input_stream($in_fh, $out_fh);
- (exists $opts{-cutting}) and $self->cutting( $opts{-cutting} );
-
- ## Initialize line/paragraph
- my ($textline, $paragraph) = ('', '');
- my ($nlines, $plines) = (0, 0);
-
- ## Use <$fh> instead of $fh->getline where possible (for speed)
- $_ = ref $in_fh;
- my $tied_fh = (/^(?:GLOB|FileHandle|IO::\w+)$/ or tied $in_fh);
-
- ## Read paragraphs line-by-line
- while (defined ($textline = $tied_fh ? <$in_fh> : $in_fh->getline)) {
- $textline = $self->preprocess_line($textline, ++$nlines);
- next unless ((defined $textline) && (length $textline));
-
- if ((! length $paragraph) && ($textline =~ /^==/)) {
- ## '==' denotes a one-line command paragraph
- $paragraph = $textline;
- $plines = 1;
- $textline = '';
- } else {
- ## Append this line to the current paragraph
- $paragraph .= $textline;
- ++$plines;
- }
-
- ## See if this line is blank and ends the current paragraph.
- ## If it isnt, then keep iterating until it is.
- next unless (($textline =~ /^([^\S\r\n]*)[\r\n]*$/)
- && (length $paragraph));
-
- ## Now process the paragraph
- parse_paragraph($self, $paragraph, ($nlines - $plines) + 1);
- $paragraph = '';
- $plines = 0;
- }
- ## Dont forget about the last paragraph in the file
- if (length $paragraph) {
- parse_paragraph($self, $paragraph, ($nlines - $plines) + 1)
- }
-
- ## Now pop the input stream off the top of the input stack.
- $self->_pop_input_stream();
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<parse_from_file()>
-
- $parser->parse_from_file($filename,$outfile);
-
-This method takes a filename and does the following:
-
-=over 2
-
-=item *
-
-opens the input and output files for reading
-(creating the appropriate filehandles)
-
-=item *
-
-invokes the B<parse_from_filehandle()> method passing it the
-corresponding input and output filehandles.
-
-=item *
-
-closes the input and output files.
-
-=back
-
-If the special input filename "-" or "<&STDIN" is given then the STDIN
-filehandle is used for input (and no open or close is performed). If no
-input filename is specified then "-" is implied. Filehandle references,
-or objects that support the regular IO operations (like C<E<lt>$fhE<gt>>
-or C<$fh-<Egt>getline>) are also accepted; the handles must already be
-opened.
-
-If a second argument is given then it should be the name of the desired
-output file. If the special output filename "-" or ">&STDOUT" is given
-then the STDOUT filehandle is used for output (and no open or close is
-performed). If the special output filename ">&STDERR" is given then the
-STDERR filehandle is used for output (and no open or close is
-performed). If no output filehandle is currently in use and no output
-filename is specified, then "-" is implied.
-Alternatively, filehandle references or objects that support the regular
-IO operations (like C<print>, e.g. L<IO::String>) are also accepted;
-the object must already be opened.
-
-This method does I<not> usually need to be overridden by subclasses.
-
-=cut
-
-sub parse_from_file {
- my $self = shift;
- my %opts = (ref $_[0] eq 'HASH') ? %{ shift() } : ();
- my ($infile, $outfile) = @_;
- my ($in_fh, $out_fh);
- if ($] < 5.006) {
- ($in_fh, $out_fh) = (gensym(), gensym());
- }
- my ($close_input, $close_output) = (0, 0);
- local *myData = $self;
- local *_;
-
- ## Is $infile a filename or a (possibly implied) filehandle
- if (defined $infile && ref $infile) {
- if (ref($infile) =~ /^(SCALAR|ARRAY|HASH|CODE|REF)$/) {
- croak "Input from $1 reference not supported!\n";
- }
- ## Must be a filehandle-ref (or else assume its a ref to an object
- ## that supports the common IO read operations).
- $myData{_INFILE} = ${$infile};
- $in_fh = $infile;
- }
- elsif (!defined($infile) || !length($infile) || ($infile eq '-')
- || ($infile =~ /^<&(?:STDIN|0)$/i))
- {
- ## Not a filename, just a string implying STDIN
- $infile ||= '-';
- $myData{_INFILE} = '<standard input>';
- $in_fh = \*STDIN;
- }
- else {
- ## We have a filename, open it for reading
- $myData{_INFILE} = $infile;
- open($in_fh, "< $infile") or
- croak "Can't open $infile for reading: $!\n";
- $close_input = 1;
- }
-
- ## NOTE: we need to be *very* careful when "defaulting" the output
- ## file. We only want to use a default if this is the beginning of
- ## the entire document (but *not* if this is an included file). We
- ## determine this by seeing if the input stream stack has been set-up
- ## already
-
- ## Is $outfile a filename, a (possibly implied) filehandle, maybe a ref?
- if (ref $outfile) {
- ## we need to check for ref() first, as other checks involve reading
- if (ref($outfile) =~ /^(ARRAY|HASH|CODE)$/) {
- croak "Output to $1 reference not supported!\n";
- }
- elsif (ref($outfile) eq 'SCALAR') {
-# # NOTE: IO::String isn't a part of the perl distribution,
-# # so probably we shouldn't support this case...
-# require IO::String;
-# $myData{_OUTFILE} = "$outfile";
-# $out_fh = IO::String->new($outfile);
- croak "Output to SCALAR reference not supported!\n";
- }
- else {
- ## Must be a filehandle-ref (or else assume its a ref to an
- ## object that supports the common IO write operations).
- $myData{_OUTFILE} = ${$outfile};
- $out_fh = $outfile;
- }
- }
- elsif (!defined($outfile) || !length($outfile) || ($outfile eq '-')
- || ($outfile =~ /^>&?(?:STDOUT|1)$/i))
- {
- if (defined $myData{_TOP_STREAM}) {
- $out_fh = $myData{_OUTPUT};
- }
- else {
- ## Not a filename, just a string implying STDOUT
- $outfile ||= '-';
- $myData{_OUTFILE} = '<standard output>';
- $out_fh = \*STDOUT;
- }
- }
- elsif ($outfile =~ /^>&(STDERR|2)$/i) {
- ## Not a filename, just a string implying STDERR
- $myData{_OUTFILE} = '<standard error>';
- $out_fh = \*STDERR;
- }
- else {
- ## We have a filename, open it for writing
- $myData{_OUTFILE} = $outfile;
- (-d $outfile) and croak "$outfile is a directory, not POD input!\n";
- open($out_fh, "> $outfile") or
- croak "Can't open $outfile for writing: $!\n";
- $close_output = 1;
- }
-
- ## Whew! That was a lot of work to set up reasonably/robust behavior
- ## in the case of a non-filename for reading and writing. Now we just
- ## have to parse the input and close the handles when we're finished.
- $self->parse_from_filehandle(\%opts, $in_fh, $out_fh);
-
- $close_input and
- close($in_fh) || croak "Can't close $infile after reading: $!\n";
- $close_output and
- close($out_fh) || croak "Can't close $outfile after writing: $!\n";
-}
-
-#############################################################################
-
-=head1 ACCESSOR METHODS
-
-Clients of B<Pod::Parser> should use the following methods to access
-instance data fields:
-
-=cut
-
-##---------------------------------------------------------------------------
-
-=head1 B<errorsub()>
-
- $parser->errorsub("method_name");
- $parser->errorsub(\&warn_user);
- $parser->errorsub(sub { print STDERR, @_ });
-
-Specifies the method or subroutine to use when printing error messages
-about POD syntax. The supplied method/subroutine I<must> return TRUE upon
-successful printing of the message. If C<undef> is given, then the B<carp>
-builtin is used to issue error messages (this is the default behavior).
-
- my $errorsub = $parser->errorsub()
- my $errmsg = "This is an error message!\n"
- (ref $errorsub) and &{$errorsub}($errmsg)
- or (defined $errorsub) and $parser->$errorsub($errmsg)
- or carp($errmsg);
-
-Returns a method name, or else a reference to the user-supplied subroutine
-used to print error messages. Returns C<undef> if the B<carp> builtin
-is used to issue error messages (this is the default behavior).
-
-=cut
-
-sub errorsub {
- return (@_ > 1) ? ($_[0]->{_ERRORSUB} = $_[1]) : $_[0]->{_ERRORSUB};
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<cutting()>
-
- $boolean = $parser->cutting();
-
-Returns the current C<cutting> state: a boolean-valued scalar which
-evaluates to true if text from the input file is currently being "cut"
-(meaning it is I<not> considered part of the POD document).
-
- $parser->cutting($boolean);
-
-Sets the current C<cutting> state to the given value and returns the
-result.
-
-=cut
-
-sub cutting {
- return (@_ > 1) ? ($_[0]->{_CUTTING} = $_[1]) : $_[0]->{_CUTTING};
-}
-
-##---------------------------------------------------------------------------
-
-##---------------------------------------------------------------------------
-
-=head1 B<parseopts()>
-
-When invoked with no additional arguments, B<parseopts> returns a hashtable
-of all the current parsing options.
-
- ## See if we are parsing non-POD sections as well as POD ones
- my %opts = $parser->parseopts();
- $opts{'-want_nonPODs}' and print "-want_nonPODs\n";
-
-When invoked using a single string, B<parseopts> treats the string as the
-name of a parse-option and returns its corresponding value if it exists
-(returns C<undef> if it doesn't).
-
- ## Did we ask to see '=cut' paragraphs?
- my $want_cut = $parser->parseopts('-process_cut_cmd');
- $want_cut and print "-process_cut_cmd\n";
-
-When invoked with multiple arguments, B<parseopts> treats them as
-key/value pairs and the specified parse-option names are set to the
-given values. Any unspecified parse-options are unaffected.
-
- ## Set them back to the default
- $parser->parseopts(-warnings => 0);
-
-When passed a single hash-ref, B<parseopts> uses that hash to completely
-reset the existing parse-options, all previous parse-option values
-are lost.
-
- ## Reset all options to default
- $parser->parseopts( { } );
-
-See L<"PARSING OPTIONS"> for more information on the name and meaning of each
-parse-option currently recognized.
-
-=cut
-
-sub parseopts {
- local *myData = shift;
- local *myOpts = ($myData{_PARSEOPTS} ||= {});
- return %myOpts if (@_ == 0);
- if (@_ == 1) {
- local $_ = shift;
- return ref($_) ? $myData{_PARSEOPTS} = $_ : $myOpts{$_};
- }
- my @newOpts = (%myOpts, @_);
- $myData{_PARSEOPTS} = { @newOpts };
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<output_file()>
-
- $fname = $parser->output_file();
-
-Returns the name of the output file being written.
-
-=cut
-
-sub output_file {
- return $_[0]->{_OUTFILE};
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<output_handle()>
-
- $fhandle = $parser->output_handle();
-
-Returns the output filehandle object.
-
-=cut
-
-sub output_handle {
- return $_[0]->{_OUTPUT};
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<input_file()>
-
- $fname = $parser->input_file();
-
-Returns the name of the input file being read.
-
-=cut
-
-sub input_file {
- return $_[0]->{_INFILE};
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<input_handle()>
-
- $fhandle = $parser->input_handle();
-
-Returns the current input filehandle object.
-
-=cut
-
-sub input_handle {
- return $_[0]->{_INPUT};
-}
-
-##---------------------------------------------------------------------------
-
-=begin __PRIVATE__
-
-=head1 B<input_streams()>
-
- $listref = $parser->input_streams();
-
-Returns a reference to an array which corresponds to the stack of all
-the input streams that are currently in the middle of being parsed.
-
-While parsing an input stream, it is possible to invoke
-B<parse_from_file()> or B<parse_from_filehandle()> to parse a new input
-stream and then return to parsing the previous input stream. Each input
-stream to be parsed is pushed onto the end of this input stack
-before any of its input is read. The input stream that is currently
-being parsed is always at the end (or top) of the input stack. When an
-input stream has been exhausted, it is popped off the end of the
-input stack.
-
-Each element on this input stack is a reference to C<Pod::InputSource>
-object. Please see L<Pod::InputObjects> for more details.
-
-This method might be invoked when printing diagnostic messages, for example,
-to obtain the name and line number of the all input files that are currently
-being processed.
-
-=end __PRIVATE__
-
-=cut
-
-sub input_streams {
- return $_[0]->{_INPUT_STREAMS};
-}
-
-##---------------------------------------------------------------------------
-
-=begin __PRIVATE__
-
-=head1 B<top_stream()>
-
- $hashref = $parser->top_stream();
-
-Returns a reference to the hash-table that represents the element
-that is currently at the top (end) of the input stream stack
-(see L<"input_streams()">). The return value will be the C<undef>
-if the input stack is empty.
-
-This method might be used when printing diagnostic messages, for example,
-to obtain the name and line number of the current input file.
-
-=end __PRIVATE__
-
-=cut
-
-sub top_stream {
- return $_[0]->{_TOP_STREAM} || undef;
-}
-
-#############################################################################
-
-=head1 PRIVATE METHODS AND DATA
-
-B<Pod::Parser> makes use of several internal methods and data fields
-which clients should not need to see or use. For the sake of avoiding
-name collisions for client data and methods, these methods and fields
-are briefly discussed here. Determined hackers may obtain further
-information about them by reading the B<Pod::Parser> source code.
-
-Private data fields are stored in the hash-object whose reference is
-returned by the B<new()> constructor for this class. The names of all
-private methods and data-fields used by B<Pod::Parser> begin with a
-prefix of "_" and match the regular expression C</^_\w+$/>.
-
-=cut
-
-##---------------------------------------------------------------------------
-
-=begin _PRIVATE_
-
-=head1 B<_push_input_stream()>
-
- $hashref = $parser->_push_input_stream($in_fh,$out_fh);
-
-This method will push the given input stream on the input stack and
-perform any necessary beginning-of-document or beginning-of-file
-processing. The argument C<$in_fh> is the input stream filehandle to
-push, and C<$out_fh> is the corresponding output filehandle to use (if
-it is not given or is undefined, then the current output stream is used,
-which defaults to standard output if it doesnt exist yet).
-
-The value returned will be reference to the hash-table that represents
-the new top of the input stream stack. I<Please Note> that it is
-possible for this method to use default values for the input and output
-file handles. If this happens, you will need to look at the C<INPUT>
-and C<OUTPUT> instance data members to determine their new values.
-
-=end _PRIVATE_
-
-=cut
-
-sub _push_input_stream {
- my ($self, $in_fh, $out_fh) = @_;
- local *myData = $self;
-
- ## Initialize stuff for the entire document if this is *not*
- ## an included file.
- ##
- ## NOTE: we need to be *very* careful when "defaulting" the output
- ## filehandle. We only want to use a default value if this is the
- ## beginning of the entire document (but *not* if this is an included
- ## file).
- unless (defined $myData{_TOP_STREAM}) {
- $out_fh = \*STDOUT unless (defined $out_fh);
- $myData{_CUTTING} = 1; ## current "cutting" state
- $myData{_INPUT_STREAMS} = []; ## stack of all input streams
- }
-
- ## Initialize input indicators
- $myData{_OUTFILE} = '(unknown)' unless (defined $myData{_OUTFILE});
- $myData{_OUTPUT} = $out_fh if (defined $out_fh);
- $in_fh = \*STDIN unless (defined $in_fh);
- $myData{_INFILE} = '(unknown)' unless (defined $myData{_INFILE});
- $myData{_INPUT} = $in_fh;
- my $input_top = $myData{_TOP_STREAM}
- = new Pod::InputSource(
- -name => $myData{_INFILE},
- -handle => $in_fh,
- -was_cutting => $myData{_CUTTING}
- );
- local *input_stack = $myData{_INPUT_STREAMS};
- push(@input_stack, $input_top);
-
- ## Perform beginning-of-document and/or beginning-of-input processing
- $self->begin_pod() if (@input_stack == 1);
- $self->begin_input();
-
- return $input_top;
-}
-
-##---------------------------------------------------------------------------
-
-=begin _PRIVATE_
-
-=head1 B<_pop_input_stream()>
-
- $hashref = $parser->_pop_input_stream();
-
-This takes no arguments. It will perform any necessary end-of-file or
-end-of-document processing and then pop the current input stream from
-the top of the input stack.
-
-The value returned will be reference to the hash-table that represents
-the new top of the input stream stack.
-
-=end _PRIVATE_
-
-=cut
-
-sub _pop_input_stream {
- my ($self) = @_;
- local *myData = $self;
- local *input_stack = $myData{_INPUT_STREAMS};
-
- ## Perform end-of-input and/or end-of-document processing
- $self->end_input() if (@input_stack > 0);
- $self->end_pod() if (@input_stack == 1);
-
- ## Restore cutting state to whatever it was before we started
- ## parsing this file.
- my $old_top = pop(@input_stack);
- $myData{_CUTTING} = $old_top->was_cutting();
-
- ## Dont forget to reset the input indicators
- my $input_top = undef;
- if (@input_stack > 0) {
- $input_top = $myData{_TOP_STREAM} = $input_stack[-1];
- $myData{_INFILE} = $input_top->name();
- $myData{_INPUT} = $input_top->handle();
- } else {
- delete $myData{_TOP_STREAM};
- delete $myData{_INPUT_STREAMS};
- }
-
- return $input_top;
-}
-
-#############################################################################
-
-=head1 TREE-BASED PARSING
-
-If straightforward stream-based parsing wont meet your needs (as is
-likely the case for tasks such as translating PODs into structured
-markup languages like HTML and XML) then you may need to take the
-tree-based approach. Rather than doing everything in one pass and
-calling the B<interpolate()> method to expand sequences into text, it
-may be desirable to instead create a parse-tree using the B<parse_text()>
-method to return a tree-like structure which may contain an ordered
-list of children (each of which may be a text-string, or a similar
-tree-like structure).
-
-Pay special attention to L<"METHODS FOR PARSING AND PROCESSING"> and
-to the objects described in L<Pod::InputObjects>. The former describes
-the gory details and parameters for how to customize and extend the
-parsing behavior of B<Pod::Parser>. B<Pod::InputObjects> provides
-several objects that may all be used interchangeably as parse-trees. The
-most obvious one is the B<Pod::ParseTree> object. It defines the basic
-interface and functionality that all things trying to be a POD parse-tree
-should do. A B<Pod::ParseTree> is defined such that each "node" may be a
-text-string, or a reference to another parse-tree. Each B<Pod::Paragraph>
-object and each B<Pod::InteriorSequence> object also supports the basic
-parse-tree interface.
-
-The B<parse_text()> method takes a given paragraph of text, and
-returns a parse-tree that contains one or more children, each of which
-may be a text-string, or an InteriorSequence object. There are also
-callback-options that may be passed to B<parse_text()> to customize
-the way it expands or transforms interior-sequences, as well as the
-returned result. These callbacks can be used to create a parse-tree
-with custom-made objects (which may or may not support the parse-tree
-interface, depending on how you choose to do it).
-
-If you wish to turn an entire POD document into a parse-tree, that process
-is fairly straightforward. The B<parse_text()> method is the key to doing
-this successfully. Every paragraph-callback (i.e. the polymorphic methods
-for B<command()>, B<verbatim()>, and B<textblock()> paragraphs) takes
-a B<Pod::Paragraph> object as an argument. Each paragraph object has a
-B<parse_tree()> method that can be used to get or set a corresponding
-parse-tree. So for each of those paragraph-callback methods, simply call
-B<parse_text()> with the options you desire, and then use the returned
-parse-tree to assign to the given paragraph object.
-
-That gives you a parse-tree for each paragraph - so now all you need is
-an ordered list of paragraphs. You can maintain that yourself as a data
-element in the object/hash. The most straightforward way would be simply
-to use an array-ref, with the desired set of custom "options" for each
-invocation of B<parse_text>. Let's assume the desired option-set is
-given by the hash C<%options>. Then we might do something like the
-following:
-
- package MyPodParserTree;
-
- @ISA = qw( Pod::Parser );
-
- ...
-
- sub begin_pod {
- my $self = shift;
- $self->{'-paragraphs'} = []; ## initialize paragraph list
- }
-
- sub command {
- my ($parser, $command, $paragraph, $line_num, $pod_para) = @_;
- my $ptree = $parser->parse_text({%options}, $paragraph, ...);
- $pod_para->parse_tree( $ptree );
- push @{ $self->{'-paragraphs'} }, $pod_para;
- }
-
- sub verbatim {
- my ($parser, $paragraph, $line_num, $pod_para) = @_;
- push @{ $self->{'-paragraphs'} }, $pod_para;
- }
-
- sub textblock {
- my ($parser, $paragraph, $line_num, $pod_para) = @_;
- my $ptree = $parser->parse_text({%options}, $paragraph, ...);
- $pod_para->parse_tree( $ptree );
- push @{ $self->{'-paragraphs'} }, $pod_para;
- }
-
- ...
-
- package main;
- ...
- my $parser = new MyPodParserTree(...);
- $parser->parse_from_file(...);
- my $paragraphs_ref = $parser->{'-paragraphs'};
-
-Of course, in this module-author's humble opinion, I'd be more inclined to
-use the existing B<Pod::ParseTree> object than a simple array. That way
-everything in it, paragraphs and sequences, all respond to the same core
-interface for all parse-tree nodes. The result would look something like:
-
- package MyPodParserTree2;
-
- ...
-
- sub begin_pod {
- my $self = shift;
- $self->{'-ptree'} = new Pod::ParseTree; ## initialize parse-tree
- }
-
- sub parse_tree {
- ## convenience method to get/set the parse-tree for the entire POD
- (@_ > 1) and $_[0]->{'-ptree'} = $_[1];
- return $_[0]->{'-ptree'};
- }
-
- sub command {
- my ($parser, $command, $paragraph, $line_num, $pod_para) = @_;
- my $ptree = $parser->parse_text({<<options>>}, $paragraph, ...);
- $pod_para->parse_tree( $ptree );
- $parser->parse_tree()->append( $pod_para );
- }
-
- sub verbatim {
- my ($parser, $paragraph, $line_num, $pod_para) = @_;
- $parser->parse_tree()->append( $pod_para );
- }
-
- sub textblock {
- my ($parser, $paragraph, $line_num, $pod_para) = @_;
- my $ptree = $parser->parse_text({<<options>>}, $paragraph, ...);
- $pod_para->parse_tree( $ptree );
- $parser->parse_tree()->append( $pod_para );
- }
-
- ...
-
- package main;
- ...
- my $parser = new MyPodParserTree2(...);
- $parser->parse_from_file(...);
- my $ptree = $parser->parse_tree;
- ...
-
-Now you have the entire POD document as one great big parse-tree. You
-can even use the B<-expand_seq> option to B<parse_text> to insert
-whole different kinds of objects. Just don't expect B<Pod::Parser>
-to know what to do with them after that. That will need to be in your
-code. Or, alternatively, you can insert any object you like so long as
-it conforms to the B<Pod::ParseTree> interface.
-
-One could use this to create subclasses of B<Pod::Paragraphs> and
-B<Pod::InteriorSequences> for specific commands (or to create your own
-custom node-types in the parse-tree) and add some kind of B<emit()>
-method to each custom node/subclass object in the tree. Then all you'd
-need to do is recursively walk the tree in the desired order, processing
-the children (most likely from left to right) by formatting them if
-they are text-strings, or by calling their B<emit()> method if they
-are objects/references.
-
-=head1 CAVEATS
-
-Please note that POD has the notion of "paragraphs": this is something
-starting I<after> a blank (read: empty) line, with the single exception
-of the file start, which is also starting a paragraph. That means that
-especially a command (e.g. C<=head1>) I<must> be preceded with a blank
-line; C<__END__> is I<not> a blank line.
-
-=head1 SEE ALSO
-
-L<Pod::InputObjects>, L<Pod::Select>
-
-B<Pod::InputObjects> defines POD input objects corresponding to
-command paragraphs, parse-trees, and interior-sequences.
-
-B<Pod::Select> is a subclass of B<Pod::Parser> which provides the ability
-to selectively include and/or exclude sections of a POD document from being
-translated based upon the current heading, subheading, subsubheading, etc.
-
-=for __PRIVATE__
-B<Pod::Callbacks> is a subclass of B<Pod::Parser> which gives its users
-the ability the employ I<callback functions> instead of, or in addition
-to, overriding methods of the base class.
-
-=for __PRIVATE__
-B<Pod::Select> and B<Pod::Callbacks> do not override any
-methods nor do they define any new methods with the same name. Because
-of this, they may I<both> be used (in combination) as a base class of
-the same subclass in order to combine their functionality without
-causing any namespace clashes due to multiple inheritance.
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Brad Appleton E<lt>bradapp at enteract.comE<gt>
-
-Based on code for B<Pod::Text> written by
-Tom Christiansen E<lt>tchrist at mox.perl.comE<gt>
-
-=head1 LICENSE
-
-Pod-Parser is free software; you can redistribute it and/or modify it
-under the terms of the Artistic License distributed with Perl version
-5.000 or (at your option) any later version. Please refer to the
-Artistic License that came with your Perl distribution for more
-details. If your version of Perl was not distributed under the
-terms of the Artistic License, than you may distribute PodParser
-under the same terms as Perl itself.
-
-=cut
-
-1;
-# vim: ts=4 sw=4 et
Deleted: vendor/perl/dist/lib/Pod/Perldoc.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Perldoc.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Perldoc.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1828 +0,0 @@
-
-require 5;
-use 5.006; # we use some open(X, "<", $y) syntax
-package Pod::Perldoc;
-use strict;
-use warnings;
-use Config '%Config';
-
-use Fcntl; # for sysopen
-use File::Spec::Functions qw(catfile catdir splitdir);
-
-use vars qw($VERSION @Pagers $Bindir $Pod2man
- $Temp_Files_Created $Temp_File_Lifetime
-);
-$VERSION = '3.14_04';
-#..........................................................................
-
-BEGIN { # Make a DEBUG constant very first thing...
- unless(defined &DEBUG) {
- if(($ENV{'PERLDOCDEBUG'} || '') =~ m/^(\d+)/) { # untaint
- eval("sub DEBUG () {$1}");
- die "WHAT? Couldn't eval-up a DEBUG constant!? $@" if $@;
- } else {
- *DEBUG = sub () {0};
- }
- }
-}
-
-use Pod::Perldoc::GetOptsOO; # uses the DEBUG.
-
-#..........................................................................
-
-sub TRUE () {1}
-sub FALSE () {return}
-
-BEGIN {
- *IS_VMS = $^O eq 'VMS' ? \&TRUE : \&FALSE unless defined &IS_VMS;
- *IS_MSWin32 = $^O eq 'MSWin32' ? \&TRUE : \&FALSE unless defined &IS_MSWin32;
- *IS_Dos = $^O eq 'dos' ? \&TRUE : \&FALSE unless defined &IS_Dos;
- *IS_OS2 = $^O eq 'os2' ? \&TRUE : \&FALSE unless defined &IS_OS2;
- *IS_Cygwin = $^O eq 'cygwin' ? \&TRUE : \&FALSE unless defined &IS_Cygwin;
- *IS_Linux = $^O eq 'linux' ? \&TRUE : \&FALSE unless defined &IS_Linux;
- *IS_HPUX = $^O =~ m/hpux/ ? \&TRUE : \&FALSE unless defined &IS_HPUX;
-}
-
-$Temp_File_Lifetime ||= 60 * 60 * 24 * 5;
- # If it's older than five days, it's quite unlikely
- # that anyone's still looking at it!!
- # (Currently used only by the MSWin cleanup routine)
-
-
-#..........................................................................
-{ my $pager = $Config{'pager'};
- push @Pagers, $pager if -x (split /\s+/, $pager)[0] or IS_VMS;
-}
-$Bindir = $Config{'scriptdirexp'};
-$Pod2man = "pod2man" . ( $Config{'versiononly'} ? $Config{'version'} : '' );
-
-# End of class-init stuff
-#
-###########################################################################
-#
-# Option accessors...
-
-foreach my $subname (map "opt_$_", split '', q{mhlvriFfXqnTdUL}) {
- no strict 'refs';
- *$subname = do{ use strict 'refs'; sub () { shift->_elem($subname, @_) } };
-}
-
-# And these are so that GetOptsOO knows they take options:
-sub opt_f_with { shift->_elem('opt_f', @_) }
-sub opt_q_with { shift->_elem('opt_q', @_) }
-sub opt_d_with { shift->_elem('opt_d', @_) }
-sub opt_L_with { shift->_elem('opt_L', @_) }
-
-sub opt_w_with { # Specify an option for the formatter subclass
- my($self, $value) = @_;
- if($value =~ m/^([-_a-zA-Z][-_a-zA-Z0-9]*)(?:[=\:](.*?))?$/s) {
- my $option = $1;
- my $option_value = defined($2) ? $2 : "TRUE";
- $option =~ tr/\-/_/s; # tolerate "foo-bar" for "foo_bar"
- $self->add_formatter_option( $option, $option_value );
- } else {
- warn "\"$value\" isn't a good formatter option name. I'm ignoring it!\n";
- }
- return;
-}
-
-sub opt_M_with { # specify formatter class name(s)
- my($self, $classes) = @_;
- return unless defined $classes and length $classes;
- DEBUG > 4 and print "Considering new formatter classes -M$classes\n";
- my @classes_to_add;
- foreach my $classname (split m/[,;]+/s, $classes) {
- next unless $classname =~ m/\S/;
- if( $classname =~ m/^(\w+(::\w+)+)$/s ) {
- # A mildly restrictive concept of what modulenames are valid.
- push @classes_to_add, $1; # untaint
- } else {
- warn "\"$classname\" isn't a valid classname. Ignoring.\n";
- }
- }
-
- unshift @{ $self->{'formatter_classes'} }, @classes_to_add;
-
- DEBUG > 3 and print(
- "Adding @classes_to_add to the list of formatter classes, "
- . "making them @{ $self->{'formatter_classes'} }.\n"
- );
-
- return;
-}
-
-sub opt_V { # report version and exit
- print join '',
- "Perldoc v$VERSION, under perl v$] for $^O",
-
- (defined(&Win32::BuildNumber) and defined &Win32::BuildNumber())
- ? (" (win32 build ", &Win32::BuildNumber(), ")") : (),
-
- (chr(65) eq 'A') ? () : " (non-ASCII)",
-
- "\n",
- ;
- exit;
-}
-
-sub opt_t { # choose plaintext as output format
- my $self = shift;
- $self->opt_o_with('text') if @_ and $_[0];
- return $self->_elem('opt_t', @_);
-}
-
-sub opt_u { # choose raw pod as output format
- my $self = shift;
- $self->opt_o_with('pod') if @_ and $_[0];
- return $self->_elem('opt_u', @_);
-}
-
-sub opt_n_with {
- # choose man as the output format, and specify the proggy to run
- my $self = shift;
- $self->opt_o_with('man') if @_ and $_[0];
- $self->_elem('opt_n', @_);
-}
-
-sub opt_o_with { # "o" for output format
- my($self, $rest) = @_;
- return unless defined $rest and length $rest;
- if($rest =~ m/^(\w+)$/s) {
- $rest = $1; #untaint
- } else {
- warn "\"$rest\" isn't a valid output format. Skipping.\n";
- return;
- }
-
- $self->aside("Noting \"$rest\" as desired output format...\n");
-
- # Figure out what class(es) that could actually mean...
-
- my @classes;
- foreach my $prefix ("Pod::Perldoc::To", "Pod::Simple::", "Pod::") {
- # Messy but smart:
- foreach my $stem (
- $rest, # Yes, try it first with the given capitalization
- "\L$rest", "\L\u$rest", "\U$rest" # And then try variations
-
- ) {
- push @classes, $prefix . $stem;
- #print "Considering $prefix$stem\n";
- }
-
- # Tidier, but misses too much:
- #push @classes, $prefix . ucfirst(lc($rest));
- }
- $self->opt_M_with( join ";", @classes );
- return;
-}
-
-###########################################################################
-# % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
-
-sub run { # to be called by the "perldoc" executable
- my $class = shift;
- if(DEBUG > 3) {
- print "Parameters to $class\->run:\n";
- my @x = @_;
- while(@x) {
- $x[1] = '<undef>' unless defined $x[1];
- $x[1] = "@{$x[1]}" if ref( $x[1] ) eq 'ARRAY';
- print " [$x[0]] => [$x[1]]\n";
- splice @x,0,2;
- }
- print "\n";
- }
- return $class -> new(@_) -> process() || 0;
-}
-
-# % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
-###########################################################################
-
-sub new { # yeah, nothing fancy
- my $class = shift;
- my $new = bless {@_}, (ref($class) || $class);
- DEBUG > 1 and print "New $class object $new\n";
- $new->init();
- $new;
-}
-
-#..........................................................................
-
-sub aside { # If we're in -v or DEBUG mode, say this.
- my $self = shift;
- if( DEBUG or $self->opt_v ) {
- my $out = join( '',
- DEBUG ? do {
- my $callsub = (caller(1))[3];
- my $package = quotemeta(__PACKAGE__ . '::');
- $callsub =~ s/^$package/'/os;
- # the o is justified, as $package really won't change.
- $callsub . ": ";
- } : '',
- @_,
- );
- if(DEBUG) { print $out } else { print STDERR $out }
- }
- return;
-}
-
-#..........................................................................
-
-sub usage {
- my $self = shift;
- warn "@_\n" if @_;
-
- # Erase evidence of previous errors (if any), so exit status is simple.
- $! = 0;
-
- die <<EOF;
-perldoc [options] PageName|ModuleName|ProgramName...
-perldoc [options] -f BuiltinFunction
-perldoc [options] -q FAQRegex
-
-Options:
- -h Display this help message
- -V report version
- -r Recursive search (slow)
- -i Ignore case
- -t Display pod using pod2text instead of pod2man and nroff
- (-t is the default on win32 unless -n is specified)
- -u Display unformatted pod text
- -m Display module's file in its entirety
- -n Specify replacement for nroff
- -l Display the module's file name
- -F Arguments are file names, not modules
- -v Verbosely describe what's going on
- -T Send output to STDOUT without any pager
- -d output_filename_to_send_to
- -o output_format_name
- -M FormatterModuleNameToUse
- -w formatter_option:option_value
- -L translation_code Choose doc translation (if any)
- -X use index if present (looks for pod.idx at $Config{archlib})
- -q Search the text of questions (not answers) in perlfaq[1-9]
-
-PageName|ModuleName...
- is the name of a piece of documentation that you want to look at. You
- may either give a descriptive name of the page (as in the case of
- `perlfunc') the name of a module, either like `Term::Info' or like
- `Term/Info', or the name of a program, like `perldoc'.
-
-BuiltinFunction
- is the name of a perl function. Will extract documentation from
- `perlfunc'.
-
-FAQRegex
- is a regex. Will search perlfaq[1-9] for and extract any
- questions that match.
-
-Any switches in the PERLDOC environment variable will be used before the
-command line arguments. The optional pod index file contains a list of
-filenames, one per line.
- [Perldoc v$VERSION]
-EOF
-
-}
-
-#..........................................................................
-
-sub usage_brief {
- my $me = $0; # Editing $0 is unportable
-
- $me =~ s,.*[/\\],,; # get basename
-
- die <<"EOUSAGE";
-Usage: $me [-h] [-V] [-r] [-i] [-v] [-t] [-u] [-m] [-n nroffer_program] [-l] [-T] [-d output_filename] [-o output_format] [-M FormatterModuleNameToUse] [-w formatter_option:option_value] [-L translation_code] [-F] [-X] PageName|ModuleName|ProgramName
- $me -f PerlFunc
- $me -q FAQKeywords
-
-The -h option prints more help. Also try "perldoc perldoc" to get
-acquainted with the system. [Perldoc v$VERSION]
-EOUSAGE
-
-}
-
-#..........................................................................
-
-sub pagers { @{ shift->{'pagers'} } }
-
-#..........................................................................
-
-sub _elem { # handy scalar meta-accessor: shift->_elem("foo", @_)
- if(@_ > 2) { return $_[0]{ $_[1] } = $_[2] }
- else { return $_[0]{ $_[1] } }
-}
-#..........................................................................
-###########################################################################
-#
-# Init formatter switches, and start it off with __bindir and all that
-# other stuff that ToMan.pm needs.
-#
-
-sub init {
- my $self = shift;
-
- # Make sure creat()s are neither too much nor too little
- eval { umask(0077) }; # doubtless someone has no mask
-
- $self->{'args'} ||= \@ARGV;
- $self->{'found'} ||= [];
- $self->{'temp_file_list'} ||= [];
-
-
- $self->{'target'} = undef;
-
- $self->init_formatter_class_list;
-
- $self->{'pagers' } = [@Pagers] unless exists $self->{'pagers'};
- $self->{'bindir' } = $Bindir unless exists $self->{'bindir'};
- $self->{'pod2man'} = $Pod2man unless exists $self->{'pod2man'};
-
- push @{ $self->{'formatter_switches'} = [] }, (
- # Yeah, we could use a hashref, but maybe there's some class where options
- # have to be ordered; so we'll use an arrayref.
-
- [ '__bindir' => $self->{'bindir' } ],
- [ '__pod2man' => $self->{'pod2man'} ],
- );
-
- DEBUG > 3 and printf "Formatter switches now: [%s]\n",
- join ' ', map "[@$_]", @{ $self->{'formatter_switches'} };
-
- $self->{'translators'} = [];
- $self->{'extra_search_dirs'} = [];
-
- return;
-}
-
-#..........................................................................
-
-sub init_formatter_class_list {
- my $self = shift;
- $self->{'formatter_classes'} ||= [];
-
- # Remember, no switches have been read yet, when
- # we've started this routine.
-
- $self->opt_M_with('Pod::Perldoc::ToPod'); # the always-there fallthru
- $self->opt_o_with('text');
- $self->opt_o_with('man') unless IS_MSWin32 || IS_Dos
- || !($ENV{TERM} && (
- ($ENV{TERM} || '') !~ /dumb|emacs|none|unknown/i
- ));
-
- return;
-}
-
-#..........................................................................
-
-sub process {
- # if this ever returns, its retval will be used for exit(RETVAL)
-
- my $self = shift;
- DEBUG > 1 and print " Beginning process.\n";
- DEBUG > 1 and print " Args: @{$self->{'args'}}\n\n";
- if(DEBUG > 3) {
- print "Object contents:\n";
- my @x = %$self;
- while(@x) {
- $x[1] = '<undef>' unless defined $x[1];
- $x[1] = "@{$x[1]}" if ref( $x[1] ) eq 'ARRAY';
- print " [$x[0]] => [$x[1]]\n";
- splice @x,0,2;
- }
- print "\n";
- }
-
- # TODO: make it deal with being invoked as various different things
- # such as perlfaq".
-
- return $self->usage_brief unless @{ $self->{'args'} };
- $self->pagers_guessing;
- $self->options_reading;
- $self->aside(sprintf "$0 => %s v%s\n", ref($self), $self->VERSION);
- $self->drop_privs_maybe;
- $self->options_processing;
-
- # Hm, we have @pages and @found, but we only really act on one
- # file per call, with the exception of the opt_q hack, and with
- # -l things
-
- $self->aside("\n");
-
- my @pages;
- $self->{'pages'} = \@pages;
- if( $self->opt_f) { @pages = ("perlfunc") }
- elsif( $self->opt_q) { @pages = ("perlfaq1" .. "perlfaq9") }
- else { @pages = @{$self->{'args'}};
- # @pages = __FILE__
- # if @pages == 1 and $pages[0] eq 'perldoc';
- }
-
- return $self->usage_brief unless @pages;
-
- $self->find_good_formatter_class();
- $self->formatter_sanity_check();
-
- $self->maybe_diddle_INC();
- # for when we're apparently in a module or extension directory
-
- my @found = $self->grand_search_init(\@pages);
- exit (IS_VMS ? 98962 : 1) unless @found;
-
- if ($self->opt_l) {
- DEBUG and print "We're in -l mode, so byebye after this:\n";
- print join("\n", @found), "\n";
- return;
- }
-
- $self->tweak_found_pathnames(\@found);
- $self->assert_closing_stdout;
- return $self->page_module_file(@found) if $self->opt_m;
- DEBUG > 2 and print "Found: [@found]\n";
-
- return $self->render_and_page(\@found);
-}
-
-#..........................................................................
-{
-
-my( %class_seen, %class_loaded );
-sub find_good_formatter_class {
- my $self = $_[0];
- my @class_list = @{ $self->{'formatter_classes'} || [] };
- die "WHAT? Nothing in the formatter class list!?" unless @class_list;
-
- my $good_class_found;
- foreach my $c (@class_list) {
- DEBUG > 4 and print "Trying to load $c...\n";
- if($class_loaded{$c}) {
- DEBUG > 4 and print "OK, the already-loaded $c it is!\n";
- $good_class_found = $c;
- last;
- }
-
- if($class_seen{$c}) {
- DEBUG > 4 and print
- "I've tried $c before, and it's no good. Skipping.\n";
- next;
- }
-
- $class_seen{$c} = 1;
-
- if( $c->can('parse_from_file') ) {
- DEBUG > 4 and print
- "Interesting, the formatter class $c is already loaded!\n";
-
- } elsif(
- (IS_VMS or IS_MSWin32 or IS_Dos or IS_OS2)
- # the alway case-insensitive fs's
- and $class_seen{lc("~$c")}++
- ) {
- DEBUG > 4 and print
- "We already used something quite like \"\L$c\E\", so no point using $c\n";
- # This avoids redefining the package.
- } else {
- DEBUG > 4 and print "Trying to eval 'require $c'...\n";
-
- local $^W = $^W;
- if(DEBUG() or $self->opt_v) {
- # feh, let 'em see it
- } else {
- $^W = 0;
- # The average user just has no reason to be seeing
- # $^W-suppressable warnings from the the require!
- }
-
- eval "require $c";
- if($@) {
- DEBUG > 4 and print "Couldn't load $c: $!\n";
- next;
- }
- }
-
- if( $c->can('parse_from_file') ) {
- DEBUG > 4 and print "Settling on $c\n";
- my $v = $c->VERSION;
- $v = ( defined $v and length $v ) ? " version $v" : '';
- $self->aside("Formatter class $c$v successfully loaded!\n");
- $good_class_found = $c;
- last;
- } else {
- DEBUG > 4 and print "Class $c isn't a formatter?! Skipping.\n";
- }
- }
-
- die "Can't find any loadable formatter class in @class_list?!\nAborting"
- unless $good_class_found;
-
- $self->{'formatter_class'} = $good_class_found;
- $self->aside("Will format with the class $good_class_found\n");
-
- return;
-}
-
-}
-#..........................................................................
-
-sub formatter_sanity_check {
- my $self = shift;
- my $formatter_class = $self->{'formatter_class'}
- || die "NO FORMATTER CLASS YET!?";
-
- if(!$self->opt_T # so -T can FORCE sending to STDOUT
- and $formatter_class->can('is_pageable')
- and !$formatter_class->is_pageable
- and !$formatter_class->can('page_for_perldoc')
- ) {
- my $ext =
- ($formatter_class->can('output_extension')
- && $formatter_class->output_extension
- ) || '';
- $ext = ".$ext" if length $ext;
-
- die
- "When using Perldoc to format with $formatter_class, you have to\n"
- . "specify -T or -dsomefile$ext\n"
- . "See `perldoc perldoc' for more information on those switches.\n"
- ;
- }
-}
-
-#..........................................................................
-
-sub render_and_page {
- my($self, $found_list) = @_;
-
- $self->maybe_generate_dynamic_pod($found_list);
-
- my($out, $formatter) = $self->render_findings($found_list);
-
- if($self->opt_d) {
- printf "Perldoc (%s) output saved to %s\n",
- $self->{'formatter_class'} || ref($self),
- $out;
- print "But notice that it's 0 bytes long!\n" unless -s $out;
-
-
- } elsif( # Allow the formatter to "page" itself, if it wants.
- $formatter->can('page_for_perldoc')
- and do {
- $self->aside("Going to call $formatter\->page_for_perldoc(\"$out\")\n");
- if( $formatter->page_for_perldoc($out, $self) ) {
- $self->aside("page_for_perldoc returned true, so NOT paging with $self.\n");
- 1;
- } else {
- $self->aside("page_for_perldoc returned false, so paging with $self instead.\n");
- '';
- }
- }
- ) {
- # Do nothing, since the formatter has "paged" it for itself.
-
- } else {
- # Page it normally (internally)
-
- if( -s $out ) { # Usual case:
- $self->page($out, $self->{'output_to_stdout'}, $self->pagers);
-
- } else {
- # Odd case:
- $self->aside("Skipping $out (from $$found_list[0] "
- . "via $$self{'formatter_class'}) as it is 0-length.\n");
-
- push @{ $self->{'temp_file_list'} }, $out;
- $self->unlink_if_temp_file($out);
- }
- }
-
- $self->after_rendering(); # any extra cleanup or whatever
-
- return;
-}
-
-#..........................................................................
-
-sub options_reading {
- my $self = shift;
-
- if( defined $ENV{"PERLDOC"} and length $ENV{"PERLDOC"} ) {
- require Text::ParseWords;
- $self->aside("Noting env PERLDOC setting of $ENV{'PERLDOC'}\n");
- # Yes, appends to the beginning
- unshift @{ $self->{'args'} },
- Text::ParseWords::shellwords( $ENV{"PERLDOC"} )
- ;
- DEBUG > 1 and print " Args now: @{$self->{'args'}}\n\n";
- } else {
- DEBUG > 1 and print " Okay, no PERLDOC setting in ENV.\n";
- }
-
- DEBUG > 1
- and print " Args right before switch processing: @{$self->{'args'}}\n";
-
- Pod::Perldoc::GetOptsOO::getopts( $self, $self->{'args'}, 'YES' )
- or return $self->usage;
-
- DEBUG > 1
- and print " Args after switch processing: @{$self->{'args'}}\n";
-
- return $self->usage if $self->opt_h;
-
- return;
-}
-
-#..........................................................................
-
-sub options_processing {
- my $self = shift;
-
- if ($self->opt_X) {
- my $podidx = "$Config{'archlib'}/pod.idx";
- $podidx = "" unless -f $podidx && -r _ && -M _ <= 7;
- $self->{'podidx'} = $podidx;
- }
-
- $self->{'output_to_stdout'} = 1 if $self->opt_T or ! -t STDOUT;
-
- $self->options_sanity;
-
- $self->opt_n("nroff") unless $self->opt_n;
- $self->add_formatter_option( '__nroffer' => $self->opt_n );
-
- # Adjust for using translation packages
- $self->add_translator($self->opt_L) if $self->opt_L;
-
- return;
-}
-
-#..........................................................................
-
-sub options_sanity {
- my $self = shift;
-
- # The opts-counting stuff interacts quite badly with
- # the $ENV{"PERLDOC"} stuff. I.e., if I have $ENV{"PERLDOC"}
- # set to -t, and I specify -u on the command line, I don't want
- # to be hectored at that -u and -t don't make sense together.
-
- #my $opts = grep $_ && 1, # yes, the count of the set ones
- # $self->opt_t, $self->opt_u, $self->opt_m, $self->opt_l
- #;
- #
- #$self->usage("only one of -t, -u, -m or -l") if $opts > 1;
-
-
- # Any sanity-checking need doing here?
-
- # But does not make sense to set either -f or -q in $ENV{"PERLDOC"}
- if( $self->opt_f or $self->opt_q ) {
- $self->usage("Only one of -f -or -q") if $self->opt_f and $self->opt_q;
- warn
- "Perldoc is only really meant for reading one word at a time.\n",
- "So these parameters are being ignored: ",
- join(' ', @{$self->{'args'}}),
- "\n"
- if @{$self->{'args'}}
- }
- return;
-}
-
-#..........................................................................
-
-sub grand_search_init {
- my($self, $pages, @found) = @_;
-
- foreach (@$pages) {
- if ($self->{'podidx'} && open(PODIDX, $self->{'podidx'})) {
- my $searchfor = catfile split '::', $_;
- $self->aside( "Searching for '$searchfor' in $self->{'podidx'}\n" );
- local $_;
- while (<PODIDX>) {
- chomp;
- push(@found, $_) if m,/$searchfor(?:\.(?:pod|pm))?\z,i;
- }
- close(PODIDX) or die "Can't close $$self{'podidx'}: $!";
- next;
- }
-
- $self->aside( "Searching for $_\n" );
-
- if ($self->opt_F) {
- next unless -r;
- push @found, $_ if $self->opt_m or $self->containspod($_);
- next;
- }
-
- my @searchdirs;
-
- # prepend extra search directories (including language specific)
- push @searchdirs, @{ $self->{'extra_search_dirs'} };
-
- # We must look both in @INC for library modules and in $bindir
- # for executables, like h2xs or perldoc itself.
- push @searchdirs, ($self->{'bindir'}, @INC);
- unless ($self->opt_m) {
- if (IS_VMS) {
- my($i,$trn);
- for ($i = 0; $trn = $ENV{'DCL$PATH;'.$i}; $i++) {
- push(@searchdirs,$trn);
- }
- push(@searchdirs,'perl_root:[lib.pod]') # installed pods
- }
- else {
- push(@searchdirs, grep(-d, split($Config{path_sep},
- $ENV{'PATH'})));
- }
- }
- my @files = $self->searchfor(0,$_, at searchdirs);
- if (@files) {
- $self->aside( "Found as @files\n" );
- }
- else {
- # no match, try recursive search
- @searchdirs = grep(!/^\.\z/s, at INC);
- @files= $self->searchfor(1,$_, at searchdirs) if $self->opt_r;
- if (@files) {
- $self->aside( "Loosely found as @files\n" );
- }
- else {
- print STDERR "No " .
- ($self->opt_m ? "module" : "documentation") . " found for \"$_\".\n";
- if ( @{ $self->{'found'} } ) {
- print STDERR "However, try\n";
- for my $dir (@{ $self->{'found'} }) {
- opendir(DIR, $dir) or die "opendir $dir: $!";
- while (my $file = readdir(DIR)) {
- next if ($file =~ /^\./s);
- $file =~ s/\.(pm|pod)\z//; # XXX: badfs
- print STDERR "\tperldoc $_\::$file\n";
- }
- closedir(DIR) or die "closedir $dir: $!";
- }
- }
- }
- }
- push(@found, at files);
- }
- return @found;
-}
-
-#..........................................................................
-
-sub maybe_generate_dynamic_pod {
- my($self, $found_things) = @_;
- my @dynamic_pod;
-
- $self->search_perlfunc($found_things, \@dynamic_pod) if $self->opt_f;
-
- $self->search_perlfaqs($found_things, \@dynamic_pod) if $self->opt_q;
-
- if( ! $self->opt_f and ! $self->opt_q ) {
- DEBUG > 4 and print "That's a non-dynamic pod search.\n";
- } elsif ( @dynamic_pod ) {
- $self->aside("Hm, I found some Pod from that search!\n");
- my ($buffd, $buffer) = $self->new_tempfile('pod', 'dyn');
-
- push @{ $self->{'temp_file_list'} }, $buffer;
- # I.e., it MIGHT be deleted at the end.
-
- my $in_list = $self->opt_f;
-
- print $buffd "=over 8\n\n" if $in_list;
- print $buffd @dynamic_pod or die "Can't print $buffer: $!";
- print $buffd "=back\n" if $in_list;
-
- close $buffd or die "Can't close $buffer: $!";
-
- @$found_things = $buffer;
- # Yes, so found_things never has more than one thing in
- # it, by time we leave here
-
- $self->add_formatter_option('__filter_nroff' => 1);
-
- } else {
- @$found_things = ();
- $self->aside("I found no Pod from that search!\n");
- }
-
- return;
-}
-
-#..........................................................................
-
-sub add_formatter_option { # $self->add_formatter_option('key' => 'value');
- my $self = shift;
- push @{ $self->{'formatter_switches'} }, [ @_ ] if @_;
-
- DEBUG > 3 and printf "Formatter switches now: [%s]\n",
- join ' ', map "[@$_]", @{ $self->{'formatter_switches'} };
-
- return;
-}
-
-#.........................................................................
-
-sub new_translator { # $tr = $self->new_translator($lang);
- my $self = shift;
- my $lang = shift;
-
- my $pack = 'POD2::' . uc($lang);
- eval "require $pack";
- if ( !$@ && $pack->can('new') ) {
- return $pack->new();
- }
-
- eval { require POD2::Base };
- return if $@;
-
- return POD2::Base->new({ lang => $lang });
-}
-
-#.........................................................................
-
-sub add_translator { # $self->add_translator($lang);
- my $self = shift;
- for my $lang (@_) {
- my $tr = $self->new_translator($lang);
- if ( defined $tr ) {
- push @{ $self->{'translators'} }, $tr;
- push @{ $self->{'extra_search_dirs'} }, $tr->pod_dirs;
-
- $self->aside( "translator for '$lang' loaded\n" );
- } else {
- # non-installed or bad translator package
- warn "Perldoc cannot load translator package for '$lang': ignored\n";
- }
-
- }
- return;
-}
-
-#..........................................................................
-
-sub search_perlfunc {
- my($self, $found_things, $pod) = @_;
-
- DEBUG > 2 and print "Search: @$found_things\n";
-
- my $perlfunc = shift @$found_things;
- open(PFUNC, "<", $perlfunc) # "Funk is its own reward"
- or die("Can't open $perlfunc: $!");
-
- # Functions like -r, -e, etc. are listed under `-X'.
- my $search_re = ($self->opt_f =~ /^-[rwxoRWXOeszfdlpSbctugkTBMAC]$/)
- ? '(?:I<)?-X' : quotemeta($self->opt_f) ;
-
- DEBUG > 2 and
- print "Going to perlfunc-scan for $search_re in $perlfunc\n";
-
- my $re = 'Alphabetical Listing of Perl Functions';
- if ( $self->opt_L ) {
- my $tr = $self->{'translators'}->[0];
- $re = $tr->search_perlfunc_re if $tr->can('search_perlfunc_re');
- }
-
- # Skip introduction
- local $_;
- while (<PFUNC>) {
- last if /^=head2 $re/;
- }
-
- # Look for our function
- my $found = 0;
- my $inlist = 0;
- while (<PFUNC>) { # "The Mothership Connection is here!"
- if ( m/^=item\s+$search_re\b/ ) {
- $found = 1;
- }
- elsif (/^=item/) {
- last if $found > 1 and not $inlist;
- }
- next unless $found;
- if (/^=over/) {
- ++$inlist;
- }
- elsif (/^=back/) {
- --$inlist;
- }
- push @$pod, $_;
- ++$found if /^\w/; # found descriptive text
- }
- if (!@$pod) {
- die sprintf
- "No documentation for perl function `%s' found\n",
- $self->opt_f
- ;
- }
- close PFUNC or die "Can't open $perlfunc: $!";
-
- return;
-}
-
-#..........................................................................
-
-sub search_perlfaqs {
- my( $self, $found_things, $pod) = @_;
-
- my $found = 0;
- my %found_in;
- my $search_key = $self->opt_q;
-
- my $rx = eval { qr/$search_key/ }
- or die <<EOD;
-Invalid regular expression '$search_key' given as -q pattern:
-$@
-Did you mean \\Q$search_key ?
-
-EOD
-
- local $_;
- foreach my $file (@$found_things) {
- die "invalid file spec: $!" if $file =~ /[<>|]/;
- open(INFAQ, "<", $file) # XXX 5.6ism
- or die "Can't read-open $file: $!\nAborting";
- while (<INFAQ>) {
- if ( m/^=head2\s+.*(?:$search_key)/i ) {
- $found = 1;
- push @$pod, "=head1 Found in $file\n\n" unless $found_in{$file}++;
- }
- elsif (/^=head[12]/) {
- $found = 0;
- }
- next unless $found;
- push @$pod, $_;
- }
- close(INFAQ);
- }
- die("No documentation for perl FAQ keyword `$search_key' found\n")
- unless @$pod;
-
- return;
-}
-
-
-#..........................................................................
-
-sub render_findings {
- # Return the filename to open
-
- my($self, $found_things) = @_;
-
- my $formatter_class = $self->{'formatter_class'}
- || die "No formatter class set!?";
- my $formatter = $formatter_class->can('new')
- ? $formatter_class->new
- : $formatter_class
- ;
-
- if(! @$found_things) {
- die "Nothing found?!";
- # should have been caught before here
- } elsif(@$found_things > 1) {
- warn
- "Perldoc is only really meant for reading one document at a time.\n",
- "So these parameters are being ignored: ",
- join(' ', @$found_things[1 .. $#$found_things] ),
- "\n"
- }
-
- my $file = $found_things->[0];
-
- DEBUG > 3 and printf "Formatter switches now: [%s]\n",
- join ' ', map "[@$_]", @{ $self->{'formatter_switches'} };
-
- # Set formatter options:
- if( ref $formatter ) {
- foreach my $f (@{ $self->{'formatter_switches'} || [] }) {
- my($switch, $value, $silent_fail) = @$f;
- if( $formatter->can($switch) ) {
- eval { $formatter->$switch( defined($value) ? $value : () ) };
- warn "Got an error when setting $formatter_class\->$switch:\n$@\n"
- if $@;
- } else {
- if( $silent_fail or $switch =~ m/^__/s ) {
- DEBUG > 2 and print "Formatter $formatter_class doesn't support $switch\n";
- } else {
- warn "$formatter_class doesn't recognize the $switch switch.\n";
- }
- }
- }
- }
-
- $self->{'output_is_binary'} =
- $formatter->can('write_with_binmode') && $formatter->write_with_binmode;
-
- my ($out_fh, $out) = $self->new_output_file(
- ( $formatter->can('output_extension') && $formatter->output_extension )
- || undef,
- $self->useful_filename_bit,
- );
-
- # Now, finally, do the formatting!
- {
- local $^W = $^W;
- if(DEBUG() or $self->opt_v) {
- # feh, let 'em see it
- } else {
- $^W = 0;
- # The average user just has no reason to be seeing
- # $^W-suppressable warnings from the formatting!
- }
-
- eval { $formatter->parse_from_file( $file, $out_fh ) };
- }
-
- warn "Error while formatting with $formatter_class:\n $@\n" if $@;
- DEBUG > 2 and print "Back from formatting with $formatter_class\n";
-
- close $out_fh
- or warn "Can't close $out: $!\n(Did $formatter already close it?)";
- sleep 0; sleep 0; sleep 0;
- # Give the system a few timeslices to meditate on the fact
- # that the output file does in fact exist and is closed.
-
- $self->unlink_if_temp_file($file);
-
- unless( -s $out ) {
- if( $formatter->can( 'if_zero_length' ) ) {
- # Basically this is just a hook for Pod::Simple::Checker; since
- # what other class could /happily/ format an input file with Pod
- # as a 0-length output file?
- $formatter->if_zero_length( $file, $out, $out_fh );
- } else {
- warn "Got a 0-length file from $$found_things[0] via $formatter_class!?\n"
- }
- }
-
- DEBUG and print "Finished writing to $out.\n";
- return($out, $formatter) if wantarray;
- return $out;
-}
-
-#..........................................................................
-
-sub unlink_if_temp_file {
- # Unlink the specified file IFF it's in the list of temp files.
- # Really only used in the case of -f / -q things when we can
- # throw away the dynamically generated source pod file once
- # we've formatted it.
- #
- my($self, $file) = @_;
- return unless defined $file and length $file;
-
- my $temp_file_list = $self->{'temp_file_list'} || return;
- if(grep $_ eq $file, @$temp_file_list) {
- $self->aside("Unlinking $file\n");
- unlink($file) or warn "Odd, couldn't unlink $file: $!";
- } else {
- DEBUG > 1 and print "$file isn't a temp file, so not unlinking.\n";
- }
- return;
-}
-
-#..........................................................................
-
-sub MSWin_temp_cleanup {
-
- # Nothing particularly MSWin-specific in here, but I don't know if any
- # other OS needs its temp dir policed like MSWin does!
-
- my $self = shift;
-
- my $tempdir = $ENV{'TEMP'};
- return unless defined $tempdir and length $tempdir
- and -e $tempdir and -d _ and -w _;
-
- $self->aside(
- "Considering whether any old files of mine in $tempdir need unlinking.\n"
- );
-
- opendir(TMPDIR, $tempdir) || return;
- my @to_unlink;
-
- my $limit = time() - $Temp_File_Lifetime;
-
- DEBUG > 5 and printf "Looking for things pre-dating %s (%x)\n",
- ($limit) x 2;
-
- my $filespec;
-
- while(defined($filespec = readdir(TMPDIR))) {
- if(
- $filespec =~ m{^perldoc_[a-zA-Z0-9]+_T([a-fA-F0-9]{7,})_[a-fA-F0-9]{3,}}s
- ) {
- if( hex($1) < $limit ) {
- push @to_unlink, "$tempdir/$filespec";
- $self->aside( "Will unlink my old temp file $to_unlink[-1]\n" );
- } else {
- DEBUG > 5 and
- printf " $tempdir/$filespec is too recent (after %x)\n", $limit;
- }
- } else {
- DEBUG > 5 and
- print " $tempdir/$filespec doesn't look like a perldoc temp file.\n";
- }
- }
- closedir(TMPDIR);
- $self->aside(sprintf "Unlinked %s items of mine in %s\n",
- scalar(unlink(@to_unlink)),
- $tempdir
- );
- return;
-}
-
-# . . . . . . . . . . . . . . . . . . . . . . . . .
-
-sub MSWin_perldoc_tempfile {
- my($self, $suffix, $infix) = @_;
-
- my $tempdir = $ENV{'TEMP'};
- return unless defined $tempdir and length $tempdir
- and -e $tempdir and -d _ and -w _;
-
- my $spec;
-
- do {
- $spec = sprintf "%s\\perldoc_%s_T%x_%x%02x.%s", # used also in MSWin_temp_cleanup
- # Yes, we embed the create-time in the filename!
- $tempdir,
- $infix || 'x',
- time(),
- $$,
- defined( &Win32::GetTickCount )
- ? (Win32::GetTickCount() & 0xff)
- : int(rand 256)
- # Under MSWin, $$ values get reused quickly! So if we ran
- # perldoc foo and then perldoc bar before there was time for
- # time() to increment time."_$$" would likely be the same
- # for each process! So we tack on the tick count's lower
- # bits (or, in a pinch, rand)
- ,
- $suffix || 'txt';
- ;
- } while( -e $spec );
-
- my $counter = 0;
-
- while($counter < 50) {
- my $fh;
- # If we are running before perl5.6.0, we can't autovivify
- if ($] < 5.006) {
- require Symbol;
- $fh = Symbol::gensym();
- }
- DEBUG > 3 and print "About to try making temp file $spec\n";
- return($fh, $spec) if open($fh, ">", $spec); # XXX 5.6ism
- $self->aside("Can't create temp file $spec: $!\n");
- }
-
- $self->aside("Giving up on making a temp file!\n");
- die "Can't make a tempfile!?";
-}
-
-#..........................................................................
-
-
-sub after_rendering {
- my $self = $_[0];
- $self->after_rendering_VMS if IS_VMS;
- $self->after_rendering_MSWin32 if IS_MSWin32;
- $self->after_rendering_Dos if IS_Dos;
- $self->after_rendering_OS2 if IS_OS2;
- return;
-}
-
-sub after_rendering_VMS { return }
-sub after_rendering_Dos { return }
-sub after_rendering_OS2 { return }
-
-sub after_rendering_MSWin32 {
- shift->MSWin_temp_cleanup() if $Temp_Files_Created;
-}
-
-#..........................................................................
-# : : : : : : : : :
-#..........................................................................
-
-
-sub minus_f_nocase { # i.e., do like -f, but without regard to case
-
- my($self, $dir, $file) = @_;
- my $path = catfile($dir,$file);
- return $path if -f $path and -r _;
-
- if(!$self->opt_i
- or IS_VMS or IS_MSWin32
- or IS_Dos or IS_OS2
- ) {
- # On a case-forgiving file system, or if case is important,
- # that is it, all we can do.
- warn "Ignored $path: unreadable\n" if -f _;
- return '';
- }
-
- local *DIR;
- my @p = ($dir);
- my($p,$cip);
- foreach $p (splitdir $file){
- my $try = catfile @p, $p;
- $self->aside("Scrutinizing $try...\n");
- stat $try;
- if (-d _) {
- push @p, $p;
- if ( $p eq $self->{'target'} ) {
- my $tmp_path = catfile @p;
- my $path_f = 0;
- for (@{ $self->{'found'} }) {
- $path_f = 1 if $_ eq $tmp_path;
- }
- push (@{ $self->{'found'} }, $tmp_path) unless $path_f;
- $self->aside( "Found as $tmp_path but directory\n" );
- }
- }
- elsif (-f _ && -r _) {
- return $try;
- }
- elsif (-f _) {
- warn "Ignored $try: unreadable\n";
- }
- elsif (-d catdir(@p)) { # at least we see the containing directory!
- my $found = 0;
- my $lcp = lc $p;
- my $p_dirspec = catdir(@p);
- opendir DIR, $p_dirspec or die "opendir $p_dirspec: $!";
- while(defined( $cip = readdir(DIR) )) {
- if (lc $cip eq $lcp){
- $found++;
- last; # XXX stop at the first? what if there's others?
- }
- }
- closedir DIR or die "closedir $p_dirspec: $!";
- return "" unless $found;
-
- push @p, $cip;
- my $p_filespec = catfile(@p);
- return $p_filespec if -f $p_filespec and -r _;
- warn "Ignored $p_filespec: unreadable\n" if -f _;
- }
- }
- return "";
-}
-
-#..........................................................................
-
-sub pagers_guessing {
- my $self = shift;
-
- my @pagers;
- push @pagers, $self->pagers;
- $self->{'pagers'} = \@pagers;
-
- if (IS_MSWin32) {
- push @pagers, qw( more< less notepad );
- unshift @pagers, $ENV{PAGER} if $ENV{PAGER};
- }
- elsif (IS_VMS) {
- push @pagers, qw( most more less type/page );
- }
- elsif (IS_Dos) {
- push @pagers, qw( less.exe more.com< );
- unshift @pagers, $ENV{PAGER} if $ENV{PAGER};
- }
- else {
- if (IS_OS2) {
- unshift @pagers, 'less', 'cmd /c more <';
- }
- push @pagers, qw( more less pg view cat );
- unshift @pagers, $ENV{PAGER} if $ENV{PAGER};
- }
-
- if (IS_Cygwin) {
- if (($pagers[0] eq 'less') || ($pagers[0] eq '/usr/bin/less')) {
- unshift @pagers, '/usr/bin/less -isrR';
- }
- }
-
- unshift @pagers, $ENV{PERLDOC_PAGER} if $ENV{PERLDOC_PAGER};
-
- return;
-}
-
-#..........................................................................
-
-sub page_module_file {
- my($self, @found) = @_;
-
- # Security note:
- # Don't ever just pass this off to anything like MSWin's "start.exe",
- # since we might be calling on a .pl file, and we wouldn't want that
- # to actually /execute/ the file that we just want to page thru!
- # Also a consideration if one were to use a web browser as a pager;
- # doing so could trigger the browser's MIME mapping for whatever
- # it thinks .pm/.pl/whatever is. Probably just a (useless and
- # annoying) "Save as..." dialog, but potentially executing the file
- # in question -- particularly in the case of MSIE and it's, ahem,
- # occasionally hazy distinction between OS-local extension
- # associations, and browser-specific MIME mappings.
-
- if ($self->{'output_to_stdout'}) {
- $self->aside("Sending unpaged output to STDOUT.\n");
- local $_;
- my $any_error = 0;
- foreach my $output (@found) {
- unless( open(TMP, "<", $output) ) { # XXX 5.6ism
- warn("Can't open $output: $!");
- $any_error = 1;
- next;
- }
- while (<TMP>) {
- print or die "Can't print to stdout: $!";
- }
- close TMP or die "Can't close while $output: $!";
- $self->unlink_if_temp_file($output);
- }
- return $any_error; # successful
- }
-
- foreach my $pager ( $self->pagers ) {
- $self->aside("About to try calling $pager @found\n");
- if (system($pager, @found) == 0) {
- $self->aside("Yay, it worked.\n");
- return 0;
- }
- $self->aside("That didn't work.\n");
-
- # Odd -- when it fails, under Win32, this seems to neither
- # return with a fail nor return with a success!!
- # That's discouraging!
- }
-
- $self->aside(
- sprintf "Can't manage to find a way to page [%s] via pagers [%s]\n",
- join(' ', @found),
- join(' ', $self->pagers),
- );
-
- if (IS_VMS) {
- DEBUG > 1 and print "Bailing out in a VMSish way.\n";
- eval q{
- use vmsish qw(status exit);
- exit $?;
- 1;
- } or die;
- }
-
- return 1;
- # i.e., an UNSUCCESSFUL return value!
-}
-
-#..........................................................................
-
-sub check_file {
- my($self, $dir, $file) = @_;
-
- unless( ref $self ) {
- # Should never get called:
- $Carp::Verbose = 1;
- require Carp;
- Carp::croak( join '',
- "Crazy ", __PACKAGE__, " error:\n",
- "check_file must be an object_method!\n",
- "Aborting"
- );
- }
-
- if(length $dir and not -d $dir) {
- DEBUG > 3 and print " No dir $dir -- skipping.\n";
- return "";
- }
-
- if ($self->opt_m) {
- return $self->minus_f_nocase($dir,$file);
- }
-
- else {
- my $path = $self->minus_f_nocase($dir,$file);
- if( length $path and $self->containspod($path) ) {
- DEBUG > 3 and print
- " The file $path indeed looks promising!\n";
- return $path;
- }
- }
- DEBUG > 3 and print " No good: $file in $dir\n";
-
- return "";
-}
-
-#..........................................................................
-
-sub containspod {
- my($self, $file, $readit) = @_;
- return 1 if !$readit && $file =~ /\.pod\z/i;
-
-
- # Under cygwin the /usr/bin/perl is legal executable, but
- # you cannot open a file with that name. It must be spelled
- # out as "/usr/bin/perl.exe".
- #
- # The following if-case under cygwin prevents error
- #
- # $ perldoc perl
- # Cannot open /usr/bin/perl: no such file or directory
- #
- # This would work though
- #
- # $ perldoc perl.pod
-
- if ( IS_Cygwin and -x $file and -f "$file.exe" )
- {
- warn "Cygwin $file.exe search skipped\n" if DEBUG or $self->opt_v;
- return 0;
- }
-
- local($_);
- open(TEST,"<", $file) or die "Can't open $file: $!"; # XXX 5.6ism
- while (<TEST>) {
- if (/^=head/) {
- close(TEST) or die "Can't close $file: $!";
- return 1;
- }
- }
- close(TEST) or die "Can't close $file: $!";
- return 0;
-}
-
-#..........................................................................
-
-sub maybe_diddle_INC {
- my $self = shift;
-
- # Does this look like a module or extension directory?
-
- if (-f "Makefile.PL" || -f "Build.PL") {
-
- # Add "." and "lib" to @INC (if they exist)
- eval q{ use lib qw(. lib); 1; } or die;
-
- # don't add if superuser
- if ($< && $> && -d "blib") { # don't be looking too hard now!
- eval q{ use blib; 1 };
- warn $@ if $@ && $self->opt_v;
- }
- }
-
- return;
-}
-
-#..........................................................................
-
-sub new_output_file {
- my $self = shift;
- my $outspec = $self->opt_d; # Yes, -d overrides all else!
- # So don't call this twice per format-job!
-
- return $self->new_tempfile(@_) unless defined $outspec and length $outspec;
-
- # Otherwise open a write-handle on opt_d!f
-
- my $fh;
- # If we are running before perl5.6.0, we can't autovivify
- if ($] < 5.006) {
- require Symbol;
- $fh = Symbol::gensym();
- }
- DEBUG > 3 and print "About to try writing to specified output file $outspec\n";
- die "Can't write-open $outspec: $!"
- unless open($fh, ">", $outspec); # XXX 5.6ism
-
- DEBUG > 3 and print "Successfully opened $outspec\n";
- binmode($fh) if $self->{'output_is_binary'};
- return($fh, $outspec);
-}
-
-#..........................................................................
-
-sub useful_filename_bit {
- # This tries to provide a meaningful bit of text to do with the query,
- # such as can be used in naming the file -- since if we're going to be
- # opening windows on temp files (as a "pager" may well do!) then it's
- # better if the temp file's name (which may well be used as the window
- # title) isn't ALL just random garbage!
- # In other words "perldoc_LWPSimple_2371981429" is a better temp file
- # name than "perldoc_2371981429". So this routine is what tries to
- # provide the "LWPSimple" bit.
- #
- my $self = shift;
- my $pages = $self->{'pages'} || return undef;
- return undef unless @$pages;
-
- my $chunk = $pages->[0];
- return undef unless defined $chunk;
- $chunk =~ s/:://g;
- $chunk =~ s/\.\w+$//g; # strip any extension
- if( $chunk =~ m/([^\#\\:\/\$]+)$/s ) { # get basename, if it's a file
- $chunk = $1;
- } else {
- return undef;
- }
- $chunk =~ s/[^a-zA-Z0-9]+//g; # leave ONLY a-zA-Z0-9 things!
- $chunk = substr($chunk, -10) if length($chunk) > 10;
- return $chunk;
-}
-
-#..........................................................................
-
-sub new_tempfile { # $self->new_tempfile( [$suffix, [$infix] ] )
- my $self = shift;
-
- ++$Temp_Files_Created;
-
- if( IS_MSWin32 ) {
- my @out = $self->MSWin_perldoc_tempfile(@_);
- return @out if @out;
- # otherwise fall thru to the normal stuff below...
- }
-
- require File::Temp;
- return File::Temp::tempfile(UNLINK => 1);
-}
-
-#..........................................................................
-
-sub page { # apply a pager to the output file
- my ($self, $output, $output_to_stdout, @pagers) = @_;
- if ($output_to_stdout) {
- $self->aside("Sending unpaged output to STDOUT.\n");
- open(TMP, "<", $output) or die "Can't open $output: $!"; # XXX 5.6ism
- local $_;
- while (<TMP>) {
- print or die "Can't print to stdout: $!";
- }
- close TMP or die "Can't close while $output: $!";
- $self->unlink_if_temp_file($output);
- } else {
- # On VMS, quoting prevents logical expansion, and temp files with no
- # extension get the wrong default extension (such as .LIS for TYPE)
-
- $output = VMS::Filespec::rmsexpand($output, '.') if IS_VMS;
-
- $output =~ s{/}{\\}g if IS_MSWin32 || IS_Dos;
- # Altho "/" under MSWin is in theory good as a pathsep,
- # many many corners of the OS don't like it. So we
- # have to force it to be "\" to make everyone happy.
-
- foreach my $pager (@pagers) {
- $self->aside("About to try calling $pager $output\n");
- if (IS_VMS) {
- last if system("$pager $output") == 0;
- } else {
- last if system("$pager \"$output\"") == 0;
- }
- }
- }
- return;
-}
-
-#..........................................................................
-
-sub searchfor {
- my($self, $recurse,$s, at dirs) = @_;
- $s =~ s!::!/!g;
- $s = VMS::Filespec::unixify($s) if IS_VMS;
- return $s if -f $s && $self->containspod($s);
- $self->aside( "Looking for $s in @dirs\n" );
- my $ret;
- my $i;
- my $dir;
- $self->{'target'} = (splitdir $s)[-1]; # XXX: why not use File::Basename?
- for ($i=0; $i<@dirs; $i++) {
- $dir = $dirs[$i];
- next unless -d $dir;
- ($dir = VMS::Filespec::unixpath($dir)) =~ s!/\z!! if IS_VMS;
- if ( (! $self->opt_m && ( $ret = $self->check_file($dir,"$s.pod")))
- or ( $ret = $self->check_file($dir,"$s.pm"))
- or ( $ret = $self->check_file($dir,$s))
- or ( IS_VMS and
- $ret = $self->check_file($dir,"$s.com"))
- or ( IS_OS2 and
- $ret = $self->check_file($dir,"$s.cmd"))
- or ( (IS_MSWin32 or IS_Dos or IS_OS2) and
- $ret = $self->check_file($dir,"$s.bat"))
- or ( $ret = $self->check_file("$dir/pod","$s.pod"))
- or ( $ret = $self->check_file("$dir/pod",$s))
- or ( $ret = $self->check_file("$dir/pods","$s.pod"))
- or ( $ret = $self->check_file("$dir/pods",$s))
- ) {
- DEBUG > 1 and print " Found $ret\n";
- return $ret;
- }
-
- if ($recurse) {
- opendir(D,$dir) or die "Can't opendir $dir: $!";
- my @newdirs = map catfile($dir, $_), grep {
- not /^\.\.?\z/s and
- not /^auto\z/s and # save time! don't search auto dirs
- -d catfile($dir, $_)
- } readdir D;
- closedir(D) or die "Can't closedir $dir: $!";
- next unless @newdirs;
- # what a wicked map!
- @newdirs = map((s/\.dir\z//,$_)[1], at newdirs) if IS_VMS;
- $self->aside( "Also looking in @newdirs\n" );
- push(@dirs, at newdirs);
- }
- }
- return ();
-}
-
-#..........................................................................
-{
- my $already_asserted;
- sub assert_closing_stdout {
- my $self = shift;
-
- return if $already_asserted;
-
- eval q~ END { close(STDOUT) || die "Can't close STDOUT: $!" } ~;
- # What for? to let the pager know that nothing more will come?
-
- die $@ if $@;
- $already_asserted = 1;
- return;
- }
-}
-
-#..........................................................................
-
-sub tweak_found_pathnames {
- my($self, $found) = @_;
- if (IS_MSWin32) {
- foreach (@$found) { s,/,\\,g }
- }
- return;
-}
-
-#..........................................................................
-# : : : : : : : : :
-#..........................................................................
-
-sub am_taint_checking {
- my $self = shift;
- die "NO ENVIRONMENT?!?!" unless keys %ENV; # reset iterator along the way
- my($k,$v) = each %ENV;
- return is_tainted($v);
-}
-
-#..........................................................................
-
-sub is_tainted { # just a function
- my $arg = shift;
- my $nada = substr($arg, 0, 0); # zero-length!
- local $@; # preserve the caller's version of $@
- eval { eval "# $nada" };
- return length($@) != 0;
-}
-
-#..........................................................................
-
-sub drop_privs_maybe {
- my $self = shift;
-
- # Attempt to drop privs if we should be tainting and aren't
- if (!(IS_VMS || IS_MSWin32 || IS_Dos
- || IS_OS2
- )
- && ($> == 0 || $< == 0)
- && !$self->am_taint_checking()
- ) {
- my $id = eval { getpwnam("nobody") };
- $id = eval { getpwnam("nouser") } unless defined $id;
- $id = -2 unless defined $id;
- #
- # According to Stevens' APUE and various
- # (BSD, Solaris, HP-UX) man pages, setting
- # the real uid first and effective uid second
- # is the way to go if one wants to drop privileges,
- # because if one changes into an effective uid of
- # non-zero, one cannot change the real uid any more.
- #
- # Actually, it gets even messier. There is
- # a third uid, called the saved uid, and as
- # long as that is zero, one can get back to
- # uid of zero. Setting the real-effective *twice*
- # helps in *most* systems (FreeBSD and Solaris)
- # but apparently in HP-UX even this doesn't help:
- # the saved uid stays zero (apparently the only way
- # in HP-UX to change saved uid is to call setuid()
- # when the effective uid is zero).
- #
- eval {
- $< = $id; # real uid
- $> = $id; # effective uid
- $< = $id; # real uid
- $> = $id; # effective uid
- };
- if( !$@ && $< && $> ) {
- DEBUG and print "OK, I dropped privileges.\n";
- } elsif( $self->opt_U ) {
- DEBUG and print "Couldn't drop privileges, but in -U mode, so feh."
- } else {
- DEBUG and print "Hm, couldn't drop privileges. Ah well.\n";
- # We used to die here; but that seemed pointless.
- }
- }
- return;
-}
-
-#..........................................................................
-
-1;
-
-__END__
-
-# See "perldoc perldoc" for basic details.
-#
-# Perldoc -- look up a piece of documentation in .pod format that
-# is embedded in the perl installation tree.
-#
-#~~~~~~
-#
-# See ChangeLog in CPAN dist for Pod::Perldoc for later notes.
-#
-# Version 3.01: Sun Nov 10 21:38:09 MST 2002
-# Sean M. Burke <sburke at cpan.org>
-# Massive refactoring and code-tidying.
-# Now it's a module(-family)!
-# Formatter-specific stuff pulled out into Pod::Perldoc::To(Whatever).pm
-# Added -T, -d, -o, -M, -w.
-# Added some improved MSWin funk.
-#
-#~~~~~~
-#
-# Version 2.05: Sat Oct 12 16:09:00 CEST 2002
-# Hugo van der Sanden <hv at crypt.org>
-# Made -U the default, based on patch from Simon Cozens
-# Version 2.04: Sun Aug 18 13:27:12 BST 2002
-# Randy W. Sims <RandyS at ThePierianSpring.org>
-# allow -n to enable nroff under Win32
-# Version 2.03: Sun Apr 23 16:56:34 BST 2000
-# Hugo van der Sanden <hv at crypt.org>
-# don't die when 'use blib' fails
-# Version 2.02: Mon Mar 13 18:03:04 MST 2000
-# Tom Christiansen <tchrist at perl.com>
-# Added -U insecurity option
-# Version 2.01: Sat Mar 11 15:22:33 MST 2000
-# Tom Christiansen <tchrist at perl.com>, querulously.
-# Security and correctness patches.
-# What a twisted bit of distasteful spaghetti code.
-# Version 2.0: ????
-#
-#~~~~~~
-#
-# Version 1.15: Tue Aug 24 01:50:20 EST 1999
-# Charles Wilson <cwilson at ece.gatech.edu>
-# changed /pod/ directory to /pods/ for cygwin
-# to support cygwin/win32
-# Version 1.14: Wed Jul 15 01:50:20 EST 1998
-# Robin Barker <rmb1 at cise.npl.co.uk>
-# -strict, -w cleanups
-# Version 1.13: Fri Feb 27 16:20:50 EST 1997
-# Gurusamy Sarathy <gsar at activestate.com>
-# -doc tweaks for -F and -X options
-# Version 1.12: Sat Apr 12 22:41:09 EST 1997
-# Gurusamy Sarathy <gsar at activestate.com>
-# -various fixes for win32
-# Version 1.11: Tue Dec 26 09:54:33 EST 1995
-# Kenneth Albanowski <kjahds at kjahds.com>
-# -added Charles Bailey's further VMS patches, and -u switch
-# -added -t switch, with pod2text support
-#
-# Version 1.10: Thu Nov 9 07:23:47 EST 1995
-# Kenneth Albanowski <kjahds at kjahds.com>
-# -added VMS support
-# -added better error recognition (on no found pages, just exit. On
-# missing nroff/pod2man, just display raw pod.)
-# -added recursive/case-insensitive matching (thanks, Andreas). This
-# slows things down a bit, unfortunately. Give a precise name, and
-# it'll run faster.
-#
-# Version 1.01: Tue May 30 14:47:34 EDT 1995
-# Andy Dougherty <doughera at lafcol.lafayette.edu>
-# -added pod documentation.
-# -added PATH searching.
-# -added searching pod/ subdirectory (mainly to pick up perlfunc.pod
-# and friends.
-#
-#~~~~~~~
-#
-# TODO:
-#
-# Cache the directories read during sloppy match
-# (To disk, or just in-memory?)
-#
-# Backport this to perl 5.005?
-#
-# Implement at least part of the "perlman" interface described
-# in Programming Perl 3e?
Deleted: vendor/perl/dist/lib/Pod/PlainText.pm
===================================================================
--- vendor/perl/dist/lib/Pod/PlainText.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/PlainText.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,738 +0,0 @@
-# Pod::PlainText -- Convert POD data to formatted ASCII text.
-# $Id: PlainText.pm,v 1.1.1.2 2011-02-17 12:49:41 laffer1 Exp $
-#
-# Copyright 1999-2000 by Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the same terms as Perl itself.
-#
-# This module is intended to be a replacement for Pod::Text, and attempts to
-# match its output except for some specific circumstances where other
-# decisions seemed to produce better output. It uses Pod::Parser and is
-# designed to be very easy to subclass.
-
-############################################################################
-# Modules and declarations
-############################################################################
-
-package Pod::PlainText;
-use strict;
-
-require 5.005;
-
-use Carp qw(carp croak);
-use Pod::Select ();
-
-use vars qw(@ISA %ESCAPES $VERSION);
-
-# We inherit from Pod::Select instead of Pod::Parser so that we can be used
-# by Pod::Usage.
- at ISA = qw(Pod::Select);
-
-$VERSION = '2.04';
-
-BEGIN {
- if ($] < 5.006) {
- require Symbol;
- import Symbol;
- }
-}
-
-############################################################################
-# Table of supported E<> escapes
-############################################################################
-
-# This table is taken near verbatim from Pod::PlainText in Pod::Parser,
-# which got it near verbatim from the original Pod::Text. It is therefore
-# credited to Tom Christiansen, and I'm glad I didn't have to write it. :)
-%ESCAPES = (
- 'amp' => '&', # ampersand
- 'lt' => '<', # left chevron, less-than
- 'gt' => '>', # right chevron, greater-than
- 'quot' => '"', # double quote
-
- "Aacute" => "\xC1", # capital A, acute accent
- "aacute" => "\xE1", # small a, acute accent
- "Acirc" => "\xC2", # capital A, circumflex accent
- "acirc" => "\xE2", # small a, circumflex accent
- "AElig" => "\xC6", # capital AE diphthong (ligature)
- "aelig" => "\xE6", # small ae diphthong (ligature)
- "Agrave" => "\xC0", # capital A, grave accent
- "agrave" => "\xE0", # small a, grave accent
- "Aring" => "\xC5", # capital A, ring
- "aring" => "\xE5", # small a, ring
- "Atilde" => "\xC3", # capital A, tilde
- "atilde" => "\xE3", # small a, tilde
- "Auml" => "\xC4", # capital A, dieresis or umlaut mark
- "auml" => "\xE4", # small a, dieresis or umlaut mark
- "Ccedil" => "\xC7", # capital C, cedilla
- "ccedil" => "\xE7", # small c, cedilla
- "Eacute" => "\xC9", # capital E, acute accent
- "eacute" => "\xE9", # small e, acute accent
- "Ecirc" => "\xCA", # capital E, circumflex accent
- "ecirc" => "\xEA", # small e, circumflex accent
- "Egrave" => "\xC8", # capital E, grave accent
- "egrave" => "\xE8", # small e, grave accent
- "ETH" => "\xD0", # capital Eth, Icelandic
- "eth" => "\xF0", # small eth, Icelandic
- "Euml" => "\xCB", # capital E, dieresis or umlaut mark
- "euml" => "\xEB", # small e, dieresis or umlaut mark
- "Iacute" => "\xCD", # capital I, acute accent
- "iacute" => "\xED", # small i, acute accent
- "Icirc" => "\xCE", # capital I, circumflex accent
- "icirc" => "\xEE", # small i, circumflex accent
- "Igrave" => "\xCD", # capital I, grave accent
- "igrave" => "\xED", # small i, grave accent
- "Iuml" => "\xCF", # capital I, dieresis or umlaut mark
- "iuml" => "\xEF", # small i, dieresis or umlaut mark
- "Ntilde" => "\xD1", # capital N, tilde
- "ntilde" => "\xF1", # small n, tilde
- "Oacute" => "\xD3", # capital O, acute accent
- "oacute" => "\xF3", # small o, acute accent
- "Ocirc" => "\xD4", # capital O, circumflex accent
- "ocirc" => "\xF4", # small o, circumflex accent
- "Ograve" => "\xD2", # capital O, grave accent
- "ograve" => "\xF2", # small o, grave accent
- "Oslash" => "\xD8", # capital O, slash
- "oslash" => "\xF8", # small o, slash
- "Otilde" => "\xD5", # capital O, tilde
- "otilde" => "\xF5", # small o, tilde
- "Ouml" => "\xD6", # capital O, dieresis or umlaut mark
- "ouml" => "\xF6", # small o, dieresis or umlaut mark
- "szlig" => "\xDF", # small sharp s, German (sz ligature)
- "THORN" => "\xDE", # capital THORN, Icelandic
- "thorn" => "\xFE", # small thorn, Icelandic
- "Uacute" => "\xDA", # capital U, acute accent
- "uacute" => "\xFA", # small u, acute accent
- "Ucirc" => "\xDB", # capital U, circumflex accent
- "ucirc" => "\xFB", # small u, circumflex accent
- "Ugrave" => "\xD9", # capital U, grave accent
- "ugrave" => "\xF9", # small u, grave accent
- "Uuml" => "\xDC", # capital U, dieresis or umlaut mark
- "uuml" => "\xFC", # small u, dieresis or umlaut mark
- "Yacute" => "\xDD", # capital Y, acute accent
- "yacute" => "\xFD", # small y, acute accent
- "yuml" => "\xFF", # small y, dieresis or umlaut mark
-
- "lchevron" => "\xAB", # left chevron (double less than)
- "rchevron" => "\xBB", # right chevron (double greater than)
-);
-
-
-############################################################################
-# Initialization
-############################################################################
-
-# Initialize the object. Must be sure to call our parent initializer.
-sub initialize {
- my $self = shift;
-
- $$self{alt} = 0 unless defined $$self{alt};
- $$self{indent} = 4 unless defined $$self{indent};
- $$self{loose} = 0 unless defined $$self{loose};
- $$self{sentence} = 0 unless defined $$self{sentence};
- $$self{width} = 76 unless defined $$self{width};
-
- $$self{INDENTS} = []; # Stack of indentations.
- $$self{MARGIN} = $$self{indent}; # Current left margin in spaces.
-
- return $self->SUPER::initialize;
-}
-
-
-############################################################################
-# Core overrides
-############################################################################
-
-# Called for each command paragraph. Gets the command, the associated
-# paragraph, the line number, and a Pod::Paragraph object. Just dispatches
-# the command to a method named the same as the command. =cut is handled
-# internally by Pod::Parser.
-sub command {
- my $self = shift;
- my $command = shift;
- return if $command eq 'pod';
- return if ($$self{EXCLUDE} && $command ne 'end');
- if (defined $$self{ITEM}) {
- $self->item ("\n");
- local $_ = "\n";
- $self->output($_) if($command eq 'back');
- }
- $command = 'cmd_' . $command;
- return $self->$command (@_);
-}
-
-# Called for a verbatim paragraph. Gets the paragraph, the line number, and
-# a Pod::Paragraph object. Just output it verbatim, but with tabs converted
-# to spaces.
-sub verbatim {
- my $self = shift;
- return if $$self{EXCLUDE};
- $self->item if defined $$self{ITEM};
- local $_ = shift;
- return if /^\s*$/;
- s/^(\s*\S+)/(' ' x $$self{MARGIN}) . $1/gme;
- return $self->output($_);
-}
-
-# Called for a regular text block. Gets the paragraph, the line number, and
-# a Pod::Paragraph object. Perform interpolation and output the results.
-sub textblock {
- my $self = shift;
- return if $$self{EXCLUDE};
- if($$self{VERBATIM}) {
- $self->output($_[0]);
- return;
- }
- local $_ = shift;
- my $line = shift;
-
- # Perform a little magic to collapse multiple L<> references. This is
- # here mostly for backwards-compatibility. We'll just rewrite the whole
- # thing into actual text at this part, bypassing the whole internal
- # sequence parsing thing.
- s{
- (
- L< # A link of the form L</something>.
- /
- (
- [:\w]+ # The item has to be a simple word...
- (\(\))? # ...or simple function.
- )
- >
- (
- ,?\s+(and\s+)? # Allow lots of them, conjuncted.
- L<
- /
- (
- [:\w]+
- (\(\))?
- )
- >
- )+
- )
- } {
- local $_ = $1;
- s%L</([^>]+)>%$1%g;
- my @items = split /(?:,?\s+(?:and\s+)?)/;
- my $string = "the ";
- my $i;
- for ($i = 0; $i < @items; $i++) {
- $string .= $items[$i];
- $string .= ", " if @items > 2 && $i != $#items;
- $string .= " and " if ($i == $#items - 1);
- }
- $string .= " entries elsewhere in this document";
- $string;
- }gex;
-
- # Now actually interpolate and output the paragraph.
- $_ = $self->interpolate ($_, $line);
- s/\s*$/\n/s;
- if (defined $$self{ITEM}) {
- $self->item ($_ . "\n");
- } else {
- $self->output ($self->reformat ($_ . "\n"));
- }
-}
-
-# Called for an interior sequence. Gets the command, argument, and a
-# Pod::InteriorSequence object and is expected to return the resulting text.
-# Calls code, bold, italic, file, and link to handle those types of
-# sequences, and handles S<>, E<>, X<>, and Z<> directly.
-sub interior_sequence {
- my $self = shift;
- my $command = shift;
- local $_ = shift;
- return '' if ($command eq 'X' || $command eq 'Z');
-
- # Expand escapes into the actual character now, carping if invalid.
- if ($command eq 'E') {
- return $ESCAPES{$_} if defined $ESCAPES{$_};
- carp "Unknown escape: E<$_>";
- return "E<$_>";
- }
-
- # For all the other sequences, empty content produces no output.
- return if $_ eq '';
-
- # For S<>, compress all internal whitespace and then map spaces to \01.
- # When we output the text, we'll map this back.
- if ($command eq 'S') {
- s/\s{2,}/ /g;
- tr/ /\01/;
- return $_;
- }
-
- # Anything else needs to get dispatched to another method.
- if ($command eq 'B') { return $self->seq_b ($_) }
- elsif ($command eq 'C') { return $self->seq_c ($_) }
- elsif ($command eq 'F') { return $self->seq_f ($_) }
- elsif ($command eq 'I') { return $self->seq_i ($_) }
- elsif ($command eq 'L') { return $self->seq_l ($_) }
- else { carp "Unknown sequence $command<$_>" }
-}
-
-# Called for each paragraph that's actually part of the POD. We take
-# advantage of this opportunity to untabify the input.
-sub preprocess_paragraph {
- my $self = shift;
- local $_ = shift;
- 1 while s/^(.*?)(\t+)/$1 . ' ' x (length ($2) * 8 - length ($1) % 8)/me;
- return $_;
-}
-
-
-############################################################################
-# Command paragraphs
-############################################################################
-
-# All command paragraphs take the paragraph and the line number.
-
-# First level heading.
-sub cmd_head1 {
- my $self = shift;
- local $_ = shift;
- s/\s+$//s;
- $_ = $self->interpolate ($_, shift);
- if ($$self{alt}) {
- $self->output ("\n==== $_ ====\n\n");
- } else {
- $_ .= "\n" if $$self{loose};
- $self->output ($_ . "\n");
- }
-}
-
-# Second level heading.
-sub cmd_head2 {
- my $self = shift;
- local $_ = shift;
- s/\s+$//s;
- $_ = $self->interpolate ($_, shift);
- if ($$self{alt}) {
- $self->output ("\n== $_ ==\n\n");
- } else {
- $_ .= "\n" if $$self{loose};
- $self->output (' ' x ($$self{indent} / 2) . $_ . "\n");
- }
-}
-
-# third level heading - not strictly perlpodspec compliant
-sub cmd_head3 {
- my $self = shift;
- local $_ = shift;
- s/\s+$//s;
- $_ = $self->interpolate ($_, shift);
- if ($$self{alt}) {
- $self->output ("\n= $_ =\n");
- } else {
- $_ .= "\n" if $$self{loose};
- $self->output (' ' x ($$self{indent}) . $_ . "\n");
- }
-}
-
-# fourth level heading - not strictly perlpodspec compliant
-# just like head3
-*cmd_head4 = \&cmd_head3;
-
-# Start a list.
-sub cmd_over {
- my $self = shift;
- local $_ = shift;
- unless (/^[-+]?\d+\s+$/) { $_ = $$self{indent} }
- push (@{ $$self{INDENTS} }, $$self{MARGIN});
- $$self{MARGIN} += ($_ + 0);
-}
-
-# End a list.
-sub cmd_back {
- my $self = shift;
- $$self{MARGIN} = pop @{ $$self{INDENTS} };
- unless (defined $$self{MARGIN}) {
- carp 'Unmatched =back';
- $$self{MARGIN} = $$self{indent};
- }
-}
-
-# An individual list item.
-sub cmd_item {
- my $self = shift;
- if (defined $$self{ITEM}) { $self->item }
- local $_ = shift;
- s/\s+$//s;
- $$self{ITEM} = $self->interpolate ($_);
-}
-
-# Begin a block for a particular translator. Setting VERBATIM triggers
-# special handling in textblock().
-sub cmd_begin {
- my $self = shift;
- local $_ = shift;
- my ($kind) = /^(\S+)/ or return;
- if ($kind eq 'text') {
- $$self{VERBATIM} = 1;
- } else {
- $$self{EXCLUDE} = 1;
- }
-}
-
-# End a block for a particular translator. We assume that all =begin/=end
-# pairs are properly closed.
-sub cmd_end {
- my $self = shift;
- $$self{EXCLUDE} = 0;
- $$self{VERBATIM} = 0;
-}
-
-# One paragraph for a particular translator. Ignore it unless it's intended
-# for text, in which case we treat it as a verbatim text block.
-sub cmd_for {
- my $self = shift;
- local $_ = shift;
- my $line = shift;
- return unless s/^text\b[ \t]*\n?//;
- $self->verbatim ($_, $line);
-}
-
-
-############################################################################
-# Interior sequences
-############################################################################
-
-# The simple formatting ones. These are here mostly so that subclasses can
-# override them and do more complicated things.
-sub seq_b { return $_[0]{alt} ? "``$_[1]''" : $_[1] }
-sub seq_c { return $_[0]{alt} ? "``$_[1]''" : "`$_[1]'" }
-sub seq_f { return $_[0]{alt} ? "\"$_[1]\"" : $_[1] }
-sub seq_i { return '*' . $_[1] . '*' }
-
-# The complicated one. Handle links. Since this is plain text, we can't
-# actually make any real links, so this is all to figure out what text we
-# print out.
-sub seq_l {
- my $self = shift;
- local $_ = shift;
-
- # Smash whitespace in case we were split across multiple lines.
- s/\s+/ /g;
-
- # If we were given any explicit text, just output it.
- if (/^([^|]+)\|/) { return $1 }
-
- # Okay, leading and trailing whitespace isn't important; get rid of it.
- s/^\s+//;
- s/\s+$//;
-
- # Default to using the whole content of the link entry as a section
- # name. Note that L<manpage/> forces a manpage interpretation, as does
- # something looking like L<manpage(section)>. The latter is an
- # enhancement over the original Pod::Text.
- my ($manpage, $section) = ('', $_);
- if (/^(?:https?|ftp|news):/) {
- # a URL
- return $_;
- } elsif (/^"\s*(.*?)\s*"$/) {
- $section = '"' . $1 . '"';
- } elsif (m/^[-:.\w]+(?:\(\S+\))?$/) {
- ($manpage, $section) = ($_, '');
- } elsif (m{/}) {
- ($manpage, $section) = split (/\s*\/\s*/, $_, 2);
- }
-
- my $text = '';
- # Now build the actual output text.
- if (!length $section) {
- $text = "the $manpage manpage" if length $manpage;
- } elsif ($section =~ /^[:\w]+(?:\(\))?/) {
- $text .= 'the ' . $section . ' entry';
- $text .= (length $manpage) ? " in the $manpage manpage"
- : ' elsewhere in this document';
- } else {
- $section =~ s/^\"\s*//;
- $section =~ s/\s*\"$//;
- $text .= 'the section on "' . $section . '"';
- $text .= " in the $manpage manpage" if length $manpage;
- }
- return $text;
-}
-
-
-############################################################################
-# List handling
-############################################################################
-
-# This method is called whenever an =item command is complete (in other
-# words, we've seen its associated paragraph or know for certain that it
-# doesn't have one). It gets the paragraph associated with the item as an
-# argument. If that argument is empty, just output the item tag; if it
-# contains a newline, output the item tag followed by the newline.
-# Otherwise, see if there's enough room for us to output the item tag in the
-# margin of the text or if we have to put it on a separate line.
-sub item {
- my $self = shift;
- local $_ = shift;
- my $tag = $$self{ITEM};
- unless (defined $tag) {
- carp 'item called without tag';
- return;
- }
- undef $$self{ITEM};
- my $indent = $$self{INDENTS}[-1];
- unless (defined $indent) { $indent = $$self{indent} }
- my $space = ' ' x $indent;
- $space =~ s/^ /:/ if $$self{alt};
- if (!$_ || /^\s+$/ || ($$self{MARGIN} - $indent < length ($tag) + 1)) {
- my $margin = $$self{MARGIN};
- $$self{MARGIN} = $indent;
- my $output = $self->reformat ($tag);
- $output =~ s/\n*$/\n/;
- $self->output ($output);
- $$self{MARGIN} = $margin;
- $self->output ($self->reformat ($_)) if /\S/;
- } else {
- $_ = $self->reformat ($_);
- s/^ /:/ if ($$self{alt} && $indent > 0);
- my $tagspace = ' ' x length $tag;
- s/^($space)$tagspace/$1$tag/ or carp 'Bizarre space in item';
- $self->output ($_);
- }
-}
-
-
-############################################################################
-# Output formatting
-############################################################################
-
-# Wrap a line, indenting by the current left margin. We can't use
-# Text::Wrap because it plays games with tabs. We can't use formline, even
-# though we'd really like to, because it screws up non-printing characters.
-# So we have to do the wrapping ourselves.
-sub wrap {
- my $self = shift;
- local $_ = shift;
- my $output = '';
- my $spaces = ' ' x $$self{MARGIN};
- my $width = $$self{width} - $$self{MARGIN};
- while (length > $width) {
- if (s/^([^\n]{0,$width})\s+// || s/^([^\n]{$width})//) {
- $output .= $spaces . $1 . "\n";
- } else {
- last;
- }
- }
- $output .= $spaces . $_;
- $output =~ s/\s+$/\n\n/;
- return $output;
-}
-
-# Reformat a paragraph of text for the current margin. Takes the text to
-# reformat and returns the formatted text.
-sub reformat {
- my $self = shift;
- local $_ = shift;
-
- # If we're trying to preserve two spaces after sentences, do some
- # munging to support that. Otherwise, smash all repeated whitespace.
- if ($$self{sentence}) {
- s/ +$//mg;
- s/\.\n/. \n/g;
- s/\n/ /g;
- s/ +/ /g;
- } else {
- s/\s+/ /g;
- }
- return $self->wrap($_);
-}
-
-# Output text to the output device.
-sub output { $_[1] =~ tr/\01/ /; print { $_[0]->output_handle } $_[1] }
-
-
-############################################################################
-# Backwards compatibility
-############################################################################
-
-# The old Pod::Text module did everything in a pod2text() function. This
-# tries to provide the same interface for legacy applications.
-sub pod2text {
- my @args;
-
- # This is really ugly; I hate doing option parsing in the middle of a
- # module. But the old Pod::Text module supported passing flags to its
- # entry function, so handle -a and -<number>.
- while ($_[0] =~ /^-/) {
- my $flag = shift;
- if ($flag eq '-a') { push (@args, alt => 1) }
- elsif ($flag =~ /^-(\d+)$/) { push (@args, width => $1) }
- else {
- unshift (@_, $flag);
- last;
- }
- }
-
- # Now that we know what arguments we're using, create the parser.
- my $parser = Pod::PlainText->new (@args);
-
- # If two arguments were given, the second argument is going to be a file
- # handle. That means we want to call parse_from_filehandle(), which
- # means we need to turn the first argument into a file handle. Magic
- # open will handle the <&STDIN case automagically.
- if (defined $_[1]) {
- my $infh;
- if ($] < 5.006) {
- $infh = gensym();
- }
- unless (open ($infh, $_[0])) {
- croak ("Can't open $_[0] for reading: $!\n");
- }
- $_[0] = $infh;
- return $parser->parse_from_filehandle (@_);
- } else {
- return $parser->parse_from_file (@_);
- }
-}
-
-
-############################################################################
-# Module return value and documentation
-############################################################################
-
-1;
-__END__
-
-=head1 NAME
-
-Pod::PlainText - Convert POD data to formatted ASCII text
-
-=head1 SYNOPSIS
-
- use Pod::PlainText;
- my $parser = Pod::PlainText->new (sentence => 0, width => 78);
-
- # Read POD from STDIN and write to STDOUT.
- $parser->parse_from_filehandle;
-
- # Read POD from file.pod and write to file.txt.
- $parser->parse_from_file ('file.pod', 'file.txt');
-
-=head1 DESCRIPTION
-
-Pod::PlainText is a module that can convert documentation in the POD format (the
-preferred language for documenting Perl) into formatted ASCII. It uses no
-special formatting controls or codes whatsoever, and its output is therefore
-suitable for nearly any device.
-
-As a derived class from Pod::Parser, Pod::PlainText supports the same methods and
-interfaces. See L<Pod::Parser> for all the details; briefly, one creates a
-new parser with C<Pod::PlainText-E<gt>new()> and then calls either
-parse_from_filehandle() or parse_from_file().
-
-new() can take options, in the form of key/value pairs, that control the
-behavior of the parser. The currently recognized options are:
-
-=over 4
-
-=item alt
-
-If set to a true value, selects an alternate output format that, among other
-things, uses a different heading style and marks C<=item> entries with a
-colon in the left margin. Defaults to false.
-
-=item indent
-
-The number of spaces to indent regular text, and the default indentation for
-C<=over> blocks. Defaults to 4.
-
-=item loose
-
-If set to a true value, a blank line is printed after a C<=headN> headings.
-If set to false (the default), no blank line is printed after C<=headN>.
-This is the default because it's the expected formatting for manual pages;
-if you're formatting arbitrary text documents, setting this to true may
-result in more pleasing output.
-
-=item sentence
-
-If set to a true value, Pod::PlainText will assume that each sentence ends in two
-spaces, and will try to preserve that spacing. If set to false, all
-consecutive whitespace in non-verbatim paragraphs is compressed into a
-single space. Defaults to true.
-
-=item width
-
-The column at which to wrap text on the right-hand side. Defaults to 76.
-
-=back
-
-The standard Pod::Parser method parse_from_filehandle() takes up to two
-arguments, the first being the file handle to read POD from and the second
-being the file handle to write the formatted output to. The first defaults
-to STDIN if not given, and the second defaults to STDOUT. The method
-parse_from_file() is almost identical, except that its two arguments are the
-input and output disk files instead. See L<Pod::Parser> for the specific
-details.
-
-=head1 DIAGNOSTICS
-
-=over 4
-
-=item Bizarre space in item
-
-(W) Something has gone wrong in internal C<=item> processing. This message
-indicates a bug in Pod::PlainText; you should never see it.
-
-=item Can't open %s for reading: %s
-
-(F) Pod::PlainText was invoked via the compatibility mode pod2text() interface
-and the input file it was given could not be opened.
-
-=item Unknown escape: %s
-
-(W) The POD source contained an C<EE<lt>E<gt>> escape that Pod::PlainText didn't
-know about.
-
-=item Unknown sequence: %s
-
-(W) The POD source contained a non-standard internal sequence (something of
-the form C<XE<lt>E<gt>>) that Pod::PlainText didn't know about.
-
-=item Unmatched =back
-
-(W) Pod::PlainText encountered a C<=back> command that didn't correspond to an
-C<=over> command.
-
-=back
-
-=head1 RESTRICTIONS
-
-Embedded Ctrl-As (octal 001) in the input will be mapped to spaces on
-output, due to an internal implementation detail.
-
-=head1 NOTES
-
-This is a replacement for an earlier Pod::Text module written by Tom
-Christiansen. It has a revamped interface, since it now uses Pod::Parser,
-but an interface roughly compatible with the old Pod::Text::pod2text()
-function is still available. Please change to the new calling convention,
-though.
-
-The original Pod::Text contained code to do formatting via termcap
-sequences, although it wasn't turned on by default and it was problematic to
-get it to work at all. This rewrite doesn't even try to do that, but a
-subclass of it does. Look for L<Pod::Text::Termcap|Pod::Text::Termcap>.
-
-=head1 SEE ALSO
-
-L<Pod::Parser|Pod::Parser>, L<Pod::Text::Termcap|Pod::Text::Termcap>,
-pod2text(1)
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Russ Allbery E<lt>rra at stanford.eduE<gt>, based I<very> heavily on the
-original Pod::Text by Tom Christiansen E<lt>tchrist at mox.perl.comE<gt> and
-its conversion to Pod::Parser by Brad Appleton
-E<lt>bradapp at enteract.comE<gt>.
-
-=cut
Deleted: vendor/perl/dist/lib/Pod/Plainer.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Plainer.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Plainer.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,69 +0,0 @@
-package Pod::Plainer;
-use strict;
-use Pod::Parser;
-our @ISA = qw(Pod::Parser);
-our $VERSION = '0.01';
-
-our %E = qw( < lt > gt );
-
-sub escape_ltgt {
- (undef, my $text) = @_;
- $text =~ s/([<>])/E<$E{$1}>/g;
- $text
-}
-
-sub simple_delimiters {
- (undef, my $seq) = @_;
- $seq -> left_delimiter( '<' );
- $seq -> right_delimiter( '>' );
- $seq;
-}
-
-sub textblock {
- my($parser,$text,$line) = @_;
- print {$parser->output_handle()}
- $parser->parse_text(
- { -expand_text => q(escape_ltgt),
- -expand_seq => q(simple_delimiters) },
- $text, $line ) -> raw_text();
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Pod::Plainer - Perl extension for converting Pod to old style Pod.
-
-=head1 SYNOPSIS
-
- use Pod::Plainer;
-
- my $parser = Pod::Plainer -> new ();
- $parser -> parse_from_filehandle(\*STDIN);
-
-=head1 DESCRIPTION
-
-Pod::Plainer uses Pod::Parser which takes Pod with the (new)
-'CE<lt>E<lt> .. E<gt>E<gt>' constructs
-and returns the old(er) style with just 'CE<lt>E<gt>';
-'<' and '>' are replaced by 'EE<lt>ltE<gt>' and 'EE<lt>gtE<gt>'.
-
-This can be used to pre-process Pod before using tools which do not
-recognise the new style Pods.
-
-=head2 EXPORT
-
-None by default.
-
-=head1 AUTHOR
-
-Robin Barker, rmb1 at cise.npl.co.uk
-
-=head1 SEE ALSO
-
-See L<Pod::Parser>.
-
-=cut
-
Deleted: vendor/perl/dist/lib/Pod/Select.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Select.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Select.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,746 +0,0 @@
-#############################################################################
-# Pod/Select.pm -- function to select portions of POD docs
-#
-# Copyright (C) 1996-2000 by Bradford Appleton. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-package Pod::Select;
-use strict;
-
-use vars qw($VERSION @ISA @EXPORT $MAX_HEADING_LEVEL %myData @section_headings @selected_sections);
-$VERSION = '1.36'; ## Current version of this package
-require 5.005; ## requires this Perl version or later
-
-#############################################################################
-
-=head1 NAME
-
-Pod::Select, podselect() - extract selected sections of POD from input
-
-=head1 SYNOPSIS
-
- use Pod::Select;
-
- ## Select all the POD sections for each file in @filelist
- ## and print the result on standard output.
- podselect(@filelist);
-
- ## Same as above, but write to tmp.out
- podselect({-output => "tmp.out"}, @filelist):
-
- ## Select from the given filelist, only those POD sections that are
- ## within a 1st level section named any of: NAME, SYNOPSIS, OPTIONS.
- podselect({-sections => ["NAME|SYNOPSIS", "OPTIONS"]}, @filelist):
-
- ## Select the "DESCRIPTION" section of the PODs from STDIN and write
- ## the result to STDERR.
- podselect({-output => ">&STDERR", -sections => ["DESCRIPTION"]}, \*STDIN);
-
-or
-
- use Pod::Select;
-
- ## Create a parser object for selecting POD sections from the input
- $parser = new Pod::Select();
-
- ## Select all the POD sections for each file in @filelist
- ## and print the result to tmp.out.
- $parser->parse_from_file("<&STDIN", "tmp.out");
-
- ## Select from the given filelist, only those POD sections that are
- ## within a 1st level section named any of: NAME, SYNOPSIS, OPTIONS.
- $parser->select("NAME|SYNOPSIS", "OPTIONS");
- for (@filelist) { $parser->parse_from_file($_); }
-
- ## Select the "DESCRIPTION" and "SEE ALSO" sections of the PODs from
- ## STDIN and write the result to STDERR.
- $parser->select("DESCRIPTION");
- $parser->add_selection("SEE ALSO");
- $parser->parse_from_filehandle(\*STDIN, \*STDERR);
-
-=head1 REQUIRES
-
-perl5.005, Pod::Parser, Exporter, Carp
-
-=head1 EXPORTS
-
-podselect()
-
-=head1 DESCRIPTION
-
-B<podselect()> is a function which will extract specified sections of
-pod documentation from an input stream. This ability is provided by the
-B<Pod::Select> module which is a subclass of B<Pod::Parser>.
-B<Pod::Select> provides a method named B<select()> to specify the set of
-POD sections to select for processing/printing. B<podselect()> merely
-creates a B<Pod::Select> object and then invokes the B<podselect()>
-followed by B<parse_from_file()>.
-
-=head1 SECTION SPECIFICATIONS
-
-B<podselect()> and B<Pod::Select::select()> may be given one or more
-"section specifications" to restrict the text processed to only the
-desired set of sections and their corresponding subsections. A section
-specification is a string containing one or more Perl-style regular
-expressions separated by forward slashes ("/"). If you need to use a
-forward slash literally within a section title you can escape it with a
-backslash ("\/").
-
-The formal syntax of a section specification is:
-
-=over 4
-
-=item *
-
-I<head1-title-regex>/I<head2-title-regex>/...
-
-=back
-
-Any omitted or empty regular expressions will default to ".*".
-Please note that each regular expression given is implicitly
-anchored by adding "^" and "$" to the beginning and end. Also, if a
-given regular expression starts with a "!" character, then the
-expression is I<negated> (so C<!foo> would match anything I<except>
-C<foo>).
-
-Some example section specifications follow.
-
-=over 4
-
-=item *
-
-Match the C<NAME> and C<SYNOPSIS> sections and all of their subsections:
-
-C<NAME|SYNOPSIS>
-
-=item *
-
-Match only the C<Question> and C<Answer> subsections of the C<DESCRIPTION>
-section:
-
-C<DESCRIPTION/Question|Answer>
-
-=item *
-
-Match the C<Comments> subsection of I<all> sections:
-
-C</Comments>
-
-=item *
-
-Match all subsections of C<DESCRIPTION> I<except> for C<Comments>:
-
-C<DESCRIPTION/!Comments>
-
-=item *
-
-Match the C<DESCRIPTION> section but do I<not> match any of its subsections:
-
-C<DESCRIPTION/!.+>
-
-=item *
-
-Match all top level sections but none of their subsections:
-
-C</!.+>
-
-=back
-
-=begin _NOT_IMPLEMENTED_
-
-=head1 RANGE SPECIFICATIONS
-
-B<podselect()> and B<Pod::Select::select()> may be given one or more
-"range specifications" to restrict the text processed to only the
-desired ranges of paragraphs in the desired set of sections. A range
-specification is a string containing a single Perl-style regular
-expression (a regex), or else two Perl-style regular expressions
-(regexs) separated by a ".." (Perl's "range" operator is "..").
-The regexs in a range specification are delimited by forward slashes
-("/"). If you need to use a forward slash literally within a regex you
-can escape it with a backslash ("\/").
-
-The formal syntax of a range specification is:
-
-=over 4
-
-=item *
-
-/I<start-range-regex>/[../I<end-range-regex>/]
-
-=back
-
-Where each the item inside square brackets (the ".." followed by the
-end-range-regex) is optional. Each "range-regex" is of the form:
-
- =cmd-expr text-expr
-
-Where I<cmd-expr> is intended to match the name of one or more POD
-commands, and I<text-expr> is intended to match the paragraph text for
-the command. If a range-regex is supposed to match a POD command, then
-the first character of the regex (the one after the initial '/')
-absolutely I<must> be a single '=' character; it may not be anything
-else (not even a regex meta-character) if it is supposed to match
-against the name of a POD command.
-
-If no I<=cmd-expr> is given then the text-expr will be matched against
-plain textblocks unless it is preceded by a space, in which case it is
-matched against verbatim text-blocks. If no I<text-expr> is given then
-only the command-portion of the paragraph is matched against.
-
-Note that these two expressions are each implicitly anchored. This
-means that when matching against the command-name, there will be an
-implicit '^' and '$' around the given I<=cmd-expr>; and when matching
-against the paragraph text there will be an implicit '\A' and '\Z'
-around the given I<text-expr>.
-
-Unlike with section-specs, the '!' character does I<not> have any special
-meaning (negation or otherwise) at the beginning of a range-spec!
-
-Some example range specifications follow.
-
-=over 4
-
-=item
-Match all C<=for html> paragraphs:
-
-C</=for html/>
-
-=item
-Match all paragraphs between C<=begin html> and C<=end html>
-(note that this will I<not> work correctly if such sections
-are nested):
-
-C</=begin html/../=end html/>
-
-=item
-Match all paragraphs between the given C<=item> name until the end of the
-current section:
-
-C</=item mine/../=head\d/>
-
-=item
-Match all paragraphs between the given C<=item> until the next item, or
-until the end of the itemized list (note that this will I<not> work as
-desired if the item contains an itemized list nested within it):
-
-C</=item mine/../=(item|back)/>
-
-=back
-
-=end _NOT_IMPLEMENTED_
-
-=cut
-
-#############################################################################
-
-#use diagnostics;
-use Carp;
-use Pod::Parser 1.04;
-
- at ISA = qw(Pod::Parser);
- at EXPORT = qw(&podselect);
-
-## Maximum number of heading levels supported for '=headN' directives
-*MAX_HEADING_LEVEL = \3;
-
-#############################################################################
-
-=head1 OBJECT METHODS
-
-The following methods are provided in this module. Each one takes a
-reference to the object itself as an implicit first parameter.
-
-=cut
-
-##---------------------------------------------------------------------------
-
-## =begin _PRIVATE_
-##
-## =head1 B<_init_headings()>
-##
-## Initialize the current set of active section headings.
-##
-## =cut
-##
-## =end _PRIVATE_
-
-sub _init_headings {
- my $self = shift;
- local *myData = $self;
-
- ## Initialize current section heading titles if necessary
- unless (defined $myData{_SECTION_HEADINGS}) {
- local *section_headings = $myData{_SECTION_HEADINGS} = [];
- for (my $i = 0; $i < $MAX_HEADING_LEVEL; ++$i) {
- $section_headings[$i] = '';
- }
- }
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<curr_headings()>
-
- ($head1, $head2, $head3, ...) = $parser->curr_headings();
- $head1 = $parser->curr_headings(1);
-
-This method returns a list of the currently active section headings and
-subheadings in the document being parsed. The list of headings returned
-corresponds to the most recently parsed paragraph of the input.
-
-If an argument is given, it must correspond to the desired section
-heading number, in which case only the specified section heading is
-returned. If there is no current section heading at the specified
-level, then C<undef> is returned.
-
-=cut
-
-sub curr_headings {
- my $self = shift;
- $self->_init_headings() unless (defined $self->{_SECTION_HEADINGS});
- my @headings = @{ $self->{_SECTION_HEADINGS} };
- return (@_ > 0 and $_[0] =~ /^\d+$/) ? $headings[$_[0] - 1] : @headings;
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<select()>
-
- $parser->select($section_spec1,$section_spec2,...);
-
-This method is used to select the particular sections and subsections of
-POD documentation that are to be printed and/or processed. The existing
-set of selected sections is I<replaced> with the given set of sections.
-See B<add_selection()> for adding to the current set of selected
-sections.
-
-Each of the C<$section_spec> arguments should be a section specification
-as described in L<"SECTION SPECIFICATIONS">. The section specifications
-are parsed by this method and the resulting regular expressions are
-stored in the invoking object.
-
-If no C<$section_spec> arguments are given, then the existing set of
-selected sections is cleared out (which means C<all> sections will be
-processed).
-
-This method should I<not> normally be overridden by subclasses.
-
-=cut
-
-sub select {
- my ($self, @sections) = @_;
- local *myData = $self;
- local $_;
-
-### NEED TO DISCERN A SECTION-SPEC FROM A RANGE-SPEC (look for m{^/.+/$}?)
-
- ##---------------------------------------------------------------------
- ## The following is a blatant hack for backward compatibility, and for
- ## implementing add_selection(). If the *first* *argument* is the
- ## string "+", then the remaining section specifications are *added*
- ## to the current set of selections; otherwise the given section
- ## specifications will *replace* the current set of selections.
- ##
- ## This should probably be fixed someday, but for the present time,
- ## it seems incredibly unlikely that "+" would ever correspond to
- ## a legitimate section heading
- ##---------------------------------------------------------------------
- my $add = ($sections[0] eq '+') ? shift(@sections) : '';
-
- ## Reset the set of sections to use
- unless (@sections) {
- delete $myData{_SELECTED_SECTIONS} unless ($add);
- return;
- }
- $myData{_SELECTED_SECTIONS} = []
- unless ($add && exists $myData{_SELECTED_SECTIONS});
- local *selected_sections = $myData{_SELECTED_SECTIONS};
-
- ## Compile each spec
- for my $spec (@sections) {
- if ( defined($_ = _compile_section_spec($spec)) ) {
- ## Store them in our sections array
- push(@selected_sections, $_);
- }
- else {
- carp qq{Ignoring section spec "$spec"!\n};
- }
- }
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<add_selection()>
-
- $parser->add_selection($section_spec1,$section_spec2,...);
-
-This method is used to add to the currently selected sections and
-subsections of POD documentation that are to be printed and/or
-processed. See <select()> for replacing the currently selected sections.
-
-Each of the C<$section_spec> arguments should be a section specification
-as described in L<"SECTION SPECIFICATIONS">. The section specifications
-are parsed by this method and the resulting regular expressions are
-stored in the invoking object.
-
-This method should I<not> normally be overridden by subclasses.
-
-=cut
-
-sub add_selection {
- my $self = shift;
- return $self->select('+', @_);
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<clear_selections()>
-
- $parser->clear_selections();
-
-This method takes no arguments, it has the exact same effect as invoking
-<select()> with no arguments.
-
-=cut
-
-sub clear_selections {
- my $self = shift;
- return $self->select();
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<match_section()>
-
- $boolean = $parser->match_section($heading1,$heading2,...);
-
-Returns a value of true if the given section and subsection heading
-titles match any of the currently selected section specifications in
-effect from prior calls to B<select()> and B<add_selection()> (or if
-there are no explicitly selected/deselected sections).
-
-The arguments C<$heading1>, C<$heading2>, etc. are the heading titles of
-the corresponding sections, subsections, etc. to try and match. If
-C<$headingN> is omitted then it defaults to the current corresponding
-section heading title in the input.
-
-This method should I<not> normally be overridden by subclasses.
-
-=cut
-
-sub match_section {
- my $self = shift;
- my (@headings) = @_;
- local *myData = $self;
-
- ## Return true if no restrictions were explicitly specified
- my $selections = (exists $myData{_SELECTED_SECTIONS})
- ? $myData{_SELECTED_SECTIONS} : undef;
- return 1 unless ((defined $selections) && @{$selections});
-
- ## Default any unspecified sections to the current one
- my @current_headings = $self->curr_headings();
- for (my $i = 0; $i < $MAX_HEADING_LEVEL; ++$i) {
- (defined $headings[$i]) or $headings[$i] = $current_headings[$i];
- }
-
- ## Look for a match against the specified section expressions
- for my $section_spec ( @{$selections} ) {
- ##------------------------------------------------------
- ## Each portion of this spec must match in order for
- ## the spec to be matched. So we will start with a
- ## match-value of 'true' and logically 'and' it with
- ## the results of matching a given element of the spec.
- ##------------------------------------------------------
- my $match = 1;
- for (my $i = 0; $i < $MAX_HEADING_LEVEL; ++$i) {
- my $regex = $section_spec->[$i];
- my $negated = ($regex =~ s/^\!//);
- $match &= ($negated ? ($headings[$i] !~ /${regex}/)
- : ($headings[$i] =~ /${regex}/));
- last unless ($match);
- }
- return 1 if ($match);
- }
- return 0; ## no match
-}
-
-##---------------------------------------------------------------------------
-
-=head1 B<is_selected()>
-
- $boolean = $parser->is_selected($paragraph);
-
-This method is used to determine if the block of text given in
-C<$paragraph> falls within the currently selected set of POD sections
-and subsections to be printed or processed. This method is also
-responsible for keeping track of the current input section and
-subsections. It is assumed that C<$paragraph> is the most recently read
-(but not yet processed) input paragraph.
-
-The value returned will be true if the C<$paragraph> and the rest of the
-text in the same section as C<$paragraph> should be selected (included)
-for processing; otherwise a false value is returned.
-
-=cut
-
-sub is_selected {
- my ($self, $paragraph) = @_;
- local $_;
- local *myData = $self;
-
- $self->_init_headings() unless (defined $myData{_SECTION_HEADINGS});
-
- ## Keep track of current sections levels and headings
- $_ = $paragraph;
- if (/^=((?:sub)*)(?:head(?:ing)?|sec(?:tion)?)(\d*)\s+(.*?)\s*$/)
- {
- ## This is a section heading command
- my ($level, $heading) = ($2, $3);
- $level = 1 + (length($1) / 3) if ((! length $level) || (length $1));
- ## Reset the current section heading at this level
- $myData{_SECTION_HEADINGS}->[$level - 1] = $heading;
- ## Reset subsection headings of this one to empty
- for (my $i = $level; $i < $MAX_HEADING_LEVEL; ++$i) {
- $myData{_SECTION_HEADINGS}->[$i] = '';
- }
- }
-
- return $self->match_section();
-}
-
-#############################################################################
-
-=head1 EXPORTED FUNCTIONS
-
-The following functions are exported by this module. Please note that
-these are functions (not methods) and therefore C<do not> take an
-implicit first argument.
-
-=cut
-
-##---------------------------------------------------------------------------
-
-=head1 B<podselect()>
-
- podselect(\%options, at filelist);
-
-B<podselect> will print the raw (untranslated) POD paragraphs of all
-POD sections in the given input files specified by C<@filelist>
-according to the given options.
-
-If any argument to B<podselect> is a reference to a hash
-(associative array) then the values with the following keys are
-processed as follows:
-
-=over 4
-
-=item B<-output>
-
-A string corresponding to the desired output file (or ">&STDOUT"
-or ">&STDERR"). The default is to use standard output.
-
-=item B<-sections>
-
-A reference to an array of sections specifications (as described in
-L<"SECTION SPECIFICATIONS">) which indicate the desired set of POD
-sections and subsections to be selected from input. If no section
-specifications are given, then all sections of the PODs are used.
-
-=begin _NOT_IMPLEMENTED_
-
-=item B<-ranges>
-
-A reference to an array of range specifications (as described in
-L<"RANGE SPECIFICATIONS">) which indicate the desired range of POD
-paragraphs to be selected from the desired input sections. If no range
-specifications are given, then all paragraphs of the desired sections
-are used.
-
-=end _NOT_IMPLEMENTED_
-
-=back
-
-All other arguments should correspond to the names of input files
-containing POD sections. A file name of "-" or "<&STDIN" will
-be interpreted to mean standard input (which is the default if no
-filenames are given).
-
-=cut
-
-sub podselect {
- my(@argv) = @_;
- my %defaults = ();
- my $pod_parser = new Pod::Select(%defaults);
- my $num_inputs = 0;
- my $output = '>&STDOUT';
- my %opts;
- local $_;
- for (@argv) {
- if (ref($_)) {
- next unless (ref($_) eq 'HASH');
- %opts = (%defaults, %{$_});
-
- ##-------------------------------------------------------------
- ## Need this for backward compatibility since we formerly used
- ## options that were all uppercase words rather than ones that
- ## looked like Unix command-line options.
- ## to be uppercase keywords)
- ##-------------------------------------------------------------
- %opts = map {
- my ($key, $val) = (lc $_, $opts{$_});
- $key =~ s/^(?=\w)/-/;
- $key =~ /^-se[cl]/ and $key = '-sections';
- #! $key eq '-range' and $key .= 's';
- ($key => $val);
- } (keys %opts);
-
- ## Process the options
- (exists $opts{'-output'}) and $output = $opts{'-output'};
-
- ## Select the desired sections
- $pod_parser->select(@{ $opts{'-sections'} })
- if ( (defined $opts{'-sections'})
- && ((ref $opts{'-sections'}) eq 'ARRAY') );
-
- #! ## Select the desired paragraph ranges
- #! $pod_parser->select(@{ $opts{'-ranges'} })
- #! if ( (defined $opts{'-ranges'})
- #! && ((ref $opts{'-ranges'}) eq 'ARRAY') );
- }
- else {
- $pod_parser->parse_from_file($_, $output);
- ++$num_inputs;
- }
- }
- $pod_parser->parse_from_file('-') unless ($num_inputs > 0);
-}
-
-#############################################################################
-
-=head1 PRIVATE METHODS AND DATA
-
-B<Pod::Select> makes uses a number of internal methods and data fields
-which clients should not need to see or use. For the sake of avoiding
-name collisions with client data and methods, these methods and fields
-are briefly discussed here. Determined hackers may obtain further
-information about them by reading the B<Pod::Select> source code.
-
-Private data fields are stored in the hash-object whose reference is
-returned by the B<new()> constructor for this class. The names of all
-private methods and data-fields used by B<Pod::Select> begin with a
-prefix of "_" and match the regular expression C</^_\w+$/>.
-
-=cut
-
-##---------------------------------------------------------------------------
-
-=begin _PRIVATE_
-
-=head1 B<_compile_section_spec()>
-
- $listref = $parser->_compile_section_spec($section_spec);
-
-This function (note it is a function and I<not> a method) takes a
-section specification (as described in L<"SECTION SPECIFICATIONS">)
-given in C<$section_sepc>, and compiles it into a list of regular
-expressions. If C<$section_spec> has no syntax errors, then a reference
-to the list (array) of corresponding regular expressions is returned;
-otherwise C<undef> is returned and an error message is printed (using
-B<carp>) for each invalid regex.
-
-=end _PRIVATE_
-
-=cut
-
-sub _compile_section_spec {
- my ($section_spec) = @_;
- my (@regexs, $negated);
-
- ## Compile the spec into a list of regexs
- local $_ = $section_spec;
- s{\\\\}{\001}g; ## handle escaped backward slashes
- s{\\/}{\002}g; ## handle escaped forward slashes
-
- ## Parse the regexs for the heading titles
- @regexs = split(/\//, $_, $MAX_HEADING_LEVEL);
-
- ## Set default regex for ommitted levels
- for (my $i = 0; $i < $MAX_HEADING_LEVEL; ++$i) {
- $regexs[$i] = '.*' unless ((defined $regexs[$i])
- && (length $regexs[$i]));
- }
- ## Modify the regexs as needed and validate their syntax
- my $bad_regexs = 0;
- for (@regexs) {
- $_ .= '.+' if ($_ eq '!');
- s{\001}{\\\\}g; ## restore escaped backward slashes
- s{\002}{\\/}g; ## restore escaped forward slashes
- $negated = s/^\!//; ## check for negation
- eval "m{$_}"; ## check regex syntax
- if ($@) {
- ++$bad_regexs;
- carp qq{Bad regular expression /$_/ in "$section_spec": $@\n};
- }
- else {
- ## Add the forward and rear anchors (and put the negator back)
- $_ = '^' . $_ unless (/^\^/);
- $_ = $_ . '$' unless (/\$$/);
- $_ = '!' . $_ if ($negated);
- }
- }
- return (! $bad_regexs) ? [ @regexs ] : undef;
-}
-
-##---------------------------------------------------------------------------
-
-=begin _PRIVATE_
-
-=head2 $self->{_SECTION_HEADINGS}
-
-A reference to an array of the current section heading titles for each
-heading level (note that the first heading level title is at index 0).
-
-=end _PRIVATE_
-
-=cut
-
-##---------------------------------------------------------------------------
-
-=begin _PRIVATE_
-
-=head2 $self->{_SELECTED_SECTIONS}
-
-A reference to an array of references to arrays. Each subarray is a list
-of anchored regular expressions (preceded by a "!" if the expression is to
-be negated). The index of the expression in the subarray should correspond
-to the index of the heading title in C<$self-E<gt>{_SECTION_HEADINGS}>
-that it is to be matched against.
-
-=end _PRIVATE_
-
-=cut
-
-#############################################################################
-
-=head1 SEE ALSO
-
-L<Pod::Parser>
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Brad Appleton E<lt>bradapp at enteract.comE<gt>
-
-Based on code for B<pod2text> written by
-Tom Christiansen E<lt>tchrist at mox.perl.comE<gt>
-
-=cut
-
-1;
-# vim: ts=4 sw=4 et
Deleted: vendor/perl/dist/lib/Pod/Simple.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Simple.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Simple.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1536 +0,0 @@
-
-require 5;
-package Pod::Simple;
-use strict;
-use Carp ();
-BEGIN { *DEBUG = sub () {0} unless defined &DEBUG }
-use integer;
-use Pod::Escapes 1.03 ();
-use Pod::Simple::LinkSection ();
-use Pod::Simple::BlackBox ();
-#use utf8;
-
-use vars qw(
- $VERSION @ISA
- @Known_formatting_codes @Known_directives
- %Known_formatting_codes %Known_directives
- $NL
-);
-
- at ISA = ('Pod::Simple::BlackBox');
-$VERSION = '3.07';
-
- at Known_formatting_codes = qw(I B C L E F S X Z);
-%Known_formatting_codes = map(($_=>1), @Known_formatting_codes);
- at Known_directives = qw(head1 head2 head3 head4 item over back);
-%Known_directives = map(($_=>'Plain'), @Known_directives);
-$NL = $/ unless defined $NL;
-
-#-----------------------------------------------------------------------------
-# Set up some constants:
-
-BEGIN {
- if(defined &ASCII) { }
- elsif(chr(65) eq 'A') { *ASCII = sub () {1} }
- else { *ASCII = sub () {''} }
-
- unless(defined &MANY_LINES) { *MANY_LINES = sub () {20} }
- DEBUG > 4 and print "MANY_LINES is ", MANY_LINES(), "\n";
- unless(MANY_LINES() >= 1) {
- die "MANY_LINES is too small (", MANY_LINES(), ")!\nAborting";
- }
- if(defined &UNICODE) { }
- elsif($] >= 5.008) { *UNICODE = sub() {1} }
- else { *UNICODE = sub() {''} }
-}
-if(DEBUG > 2) {
- print "# We are ", ASCII ? '' : 'not ', "in ASCII-land\n";
- print "# We are under a Unicode-safe Perl.\n";
-}
-
-# Design note:
-# This is a parser for Pod. It is not a parser for the set of Pod-like
-# languages which happens to contain Pod -- it is just for Pod, plus possibly
-# some extensions.
-
-# @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
-#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-__PACKAGE__->_accessorize(
- 'nbsp_for_S', # Whether to map S<...>'s to \xA0 characters
- 'source_filename', # Filename of the source, for use in warnings
- 'source_dead', # Whether to consider this parser's source dead
-
- 'output_fh', # The filehandle we're writing to, if applicable.
- # Used only in some derived classes.
-
- 'hide_line_numbers', # For some dumping subclasses: whether to pointedly
- # suppress the start_line attribute
-
- 'line_count', # the current line number
- 'pod_para_count', # count of pod paragraphs seen so far
-
- 'no_whining', # whether to suppress whining
- 'no_errata_section', # whether to suppress the errata section
- 'complain_stderr', # whether to complain to stderr
-
- 'doc_has_started', # whether we've fired the open-Document event yet
-
- 'bare_output', # For some subclasses: whether to prepend
- # header-code and postpend footer-code
-
- 'fullstop_space_harden', # Whether to turn ". " into ".[nbsp] ";
-
- 'nix_X_codes', # whether to ignore X<...> codes
- 'merge_text', # whether to avoid breaking a single piece of
- # text up into several events
-
- 'preserve_whitespace', # whether to try to keep whitespace as-is
-
- 'content_seen', # whether we've seen any real Pod content
- 'errors_seen', # TODO: document. whether we've seen any errors (fatal or not)
-
- 'codes_in_verbatim', # for PseudoPod extensions
-
- 'code_handler', # coderef to call when a code (non-pod) line is seen
- 'cut_handler', # coderef to call when a =cut line is seen
- #Called like:
- # $code_handler->($line, $self->{'line_count'}, $self) if $code_handler;
- # $cut_handler->($line, $self->{'line_count'}, $self) if $cut_handler;
-
-);
-
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-sub any_errata_seen { # good for using as an exit() value...
- return shift->{'errors_seen'} || 0;
-}
-
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-# Pull in some functions that, for some reason, I expect to see here too:
-BEGIN {
- *pretty = \&Pod::Simple::BlackBox::pretty;
- *stringify_lol = \&Pod::Simple::BlackBox::stringify_lol;
-}
-
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-sub version_report {
- my $class = ref($_[0]) || $_[0];
- if($class eq __PACKAGE__) {
- return "$class $VERSION";
- } else {
- my $v = $class->VERSION;
- return "$class $v (" . __PACKAGE__ . " $VERSION)";
- }
-}
-
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-#sub curr_open { # read-only list accessor
-# return @{ $_[0]{'curr_open'} || return() };
-#}
-#sub _curr_open_listref { $_[0]{'curr_open'} ||= [] }
-
-
-sub output_string {
- # Works by faking out output_fh. Simplifies our code.
- #
- my $this = shift;
- return $this->{'output_string'} unless @_; # GET.
-
- require Pod::Simple::TiedOutFH;
- my $x = (defined($_[0]) and ref($_[0])) ? $_[0] : \( $_[0] );
- $$x = '' unless defined $$x;
- DEBUG > 4 and print "# Output string set to $x ($$x)\n";
- $this->{'output_fh'} = Pod::Simple::TiedOutFH->handle_on($_[0]);
- return
- $this->{'output_string'} = $_[0];
- #${ ${ $this->{'output_fh'} } };
-}
-
-sub abandon_output_string { $_[0]->abandon_output_fh; delete $_[0]{'output_string'} }
-sub abandon_output_fh { $_[0]->output_fh(undef) }
-# These don't delete the string or close the FH -- they just delete our
-# references to it/them.
-# TODO: document these
-
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-sub new {
- # takes no parameters
- my $class = ref($_[0]) || $_[0];
- #Carp::croak(__PACKAGE__ . " is a virtual base class -- see perldoc "
- # . __PACKAGE__ );
- return bless {
- 'accept_codes' => { map( ($_=>$_), @Known_formatting_codes ) },
- 'accept_directives' => { %Known_directives },
- 'accept_targets' => {},
- }, $class;
-}
-
-
-
-# TODO: an option for whether to interpolate E<...>'s, or just resolve to codes.
-
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-sub _handle_element_start { # OVERRIDE IN DERIVED CLASS
- my($self, $element_name, $attr_hash_r) = @_;
- return;
-}
-
-sub _handle_element_end { # OVERRIDE IN DERIVED CLASS
- my($self, $element_name) = @_;
- return;
-}
-
-sub _handle_text { # OVERRIDE IN DERIVED CLASS
- my($self, $text) = @_;
- return;
-}
-
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-#
-# And now directives (not targets)
-
-sub accept_directive_as_verbatim { shift->_accept_directives('Verbatim', @_) }
-sub accept_directive_as_data { shift->_accept_directives('Data', @_) }
-sub accept_directive_as_processed { shift->_accept_directives('Plain', @_) }
-
-sub _accept_directives {
- my($this, $type) = splice @_,0,2;
- foreach my $d (@_) {
- next unless defined $d and length $d;
- Carp::croak "\"$d\" isn't a valid directive name"
- unless $d =~ m/^[a-zA-Z][a-zA-Z0-9]*$/s;
- Carp::croak "\"$d\" is already a reserved Pod directive name"
- if exists $Known_directives{$d};
- $this->{'accept_directives'}{$d} = $type;
- DEBUG > 2 and print "Learning to accept \"=$d\" as directive of type $type\n";
- }
- DEBUG > 6 and print "$this\'s accept_directives : ",
- pretty($this->{'accept_directives'}), "\n";
-
- return sort keys %{ $this->{'accept_directives'} } if wantarray;
- return;
-}
-
-#--------------------------------------------------------------------------
-# TODO: document these:
-
-sub unaccept_directive { shift->unaccept_directives(@_) };
-
-sub unaccept_directives {
- my $this = shift;
- foreach my $d (@_) {
- next unless defined $d and length $d;
- Carp::croak "\"$d\" isn't a valid directive name"
- unless $d =~ m/^[a-zA-Z][a-zA-Z0-9]*$/s;
- Carp::croak "But you must accept \"$d\" directives -- it's a builtin!"
- if exists $Known_directives{$d};
- delete $this->{'accept_directives'}{$d};
- DEBUG > 2 and print "OK, won't accept \"=$d\" as directive.\n";
- }
- return sort keys %{ $this->{'accept_directives'} } if wantarray;
- return
-}
-
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-#
-# And now targets (not directives)
-
-sub accept_target { shift->accept_targets(@_) } # alias
-sub accept_target_as_text { shift->accept_targets_as_text(@_) } # alias
-
-
-sub accept_targets { shift->_accept_targets('1', @_) }
-
-sub accept_targets_as_text { shift->_accept_targets('force_resolve', @_) }
- # forces them to be processed, even when there's no ":".
-
-sub _accept_targets {
- my($this, $type) = splice @_,0,2;
- foreach my $t (@_) {
- next unless defined $t and length $t;
- # TODO: enforce some limitations on what a target name can be?
- $this->{'accept_targets'}{$t} = $type;
- DEBUG > 2 and print "Learning to accept \"$t\" as target of type $type\n";
- }
- return sort keys %{ $this->{'accept_targets'} } if wantarray;
- return;
-}
-
-#--------------------------------------------------------------------------
-sub unaccept_target { shift->unaccept_targets(@_) }
-
-sub unaccept_targets {
- my $this = shift;
- foreach my $t (@_) {
- next unless defined $t and length $t;
- # TODO: enforce some limitations on what a target name can be?
- delete $this->{'accept_targets'}{$t};
- DEBUG > 2 and print "OK, won't accept \"$t\" as target.\n";
- }
- return sort keys %{ $this->{'accept_targets'} } if wantarray;
- return;
-}
-
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-#
-# And now codes (not targets or directives)
-
-sub accept_code { shift->accept_codes(@_) } # alias
-
-sub accept_codes { # Add some codes
- my $this = shift;
-
- foreach my $new_code (@_) {
- next unless defined $new_code and length $new_code;
- if(ASCII) {
- # A good-enough check that it's good as an XML Name symbol:
- Carp::croak "\"$new_code\" isn't a valid element name"
- if $new_code =~
- m/[\x00-\x2C\x2F\x39\x3B-\x40\x5B-\x5E\x60\x7B-\x7F]/
- # Characters under 0x80 that aren't legal in an XML Name.
- or $new_code =~ m/^[-\.0-9]/s
- or $new_code =~ m/:[-\.0-9]/s;
- # The legal under-0x80 Name characters that
- # an XML Name still can't start with.
- }
-
- $this->{'accept_codes'}{$new_code} = $new_code;
-
- # Yes, map to itself -- just so that when we
- # see "=extend W [whatever] thatelementname", we say that W maps
- # to whatever $this->{accept_codes}{thatelementname} is,
- # i.e., "thatelementname". Then when we go re-mapping,
- # a "W" in the treelet turns into "thatelementname". We only
- # remap once.
- # If we say we accept "W", then a "W" in the treelet simply turns
- # into "W".
- }
-
- return;
-}
-
-#--------------------------------------------------------------------------
-sub unaccept_code { shift->unaccept_codes(@_) }
-
-sub unaccept_codes { # remove some codes
- my $this = shift;
-
- foreach my $new_code (@_) {
- next unless defined $new_code and length $new_code;
- if(ASCII) {
- # A good-enough check that it's good as an XML Name symbol:
- Carp::croak "\"$new_code\" isn't a valid element name"
- if $new_code =~
- m/[\x00-\x2C\x2F\x39\x3B-\x40\x5B-\x5E\x60\x7B-\x7F]/
- # Characters under 0x80 that aren't legal in an XML Name.
- or $new_code =~ m/^[-\.0-9]/s
- or $new_code =~ m/:[-\.0-9]/s;
- # The legal under-0x80 Name characters that
- # an XML Name still can't start with.
- }
-
- Carp::croak "But you must accept \"$new_code\" codes -- it's a builtin!"
- if grep $new_code eq $_, @Known_formatting_codes;
-
- delete $this->{'accept_codes'}{$new_code};
-
- DEBUG > 2 and print "OK, won't accept the code $new_code<...>.\n";
- }
-
- return;
-}
-
-
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-sub parse_string_document {
- my $self = shift;
- my @lines;
- foreach my $line_group (@_) {
- next unless defined $line_group and length $line_group;
- pos($line_group) = 0;
- while($line_group =~
- m/([^\n\r]*)((?:\r?\n)?)/g
- ) {
- #print(">> $1\n"),
- $self->parse_lines($1)
- if length($1) or length($2)
- or pos($line_group) != length($line_group);
- # I.e., unless it's a zero-length "empty line" at the very
- # end of "foo\nbar\n" (i.e., between the \n and the EOS).
- }
- }
- $self->parse_lines(undef); # to signal EOF
- return $self;
-}
-
-sub _init_fh_source {
- my($self, $source) = @_;
-
- #DEBUG > 1 and print "Declaring $source as :raw for starters\n";
- #$self->_apply_binmode($source, ':raw');
- #binmode($source, ":raw");
-
- return;
-}
-
-#:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
-#
-
-sub parse_file {
- my($self, $source) = (@_);
-
- if(!defined $source) {
- Carp::croak("Can't use empty-string as a source for parse_file");
- } elsif(ref(\$source) eq 'GLOB') {
- $self->{'source_filename'} = '' . ($source);
- } elsif(ref $source) {
- $self->{'source_filename'} = '' . ($source);
- } elsif(!length $source) {
- Carp::croak("Can't use empty-string as a source for parse_file");
- } else {
- {
- local *PODSOURCE;
- open(PODSOURCE, "<$source") || Carp::croak("Can't open $source: $!");
- $self->{'source_filename'} = $source;
- $source = *PODSOURCE{IO};
- }
- $self->_init_fh_source($source);
- }
- # By here, $source is a FH.
-
- $self->{'source_fh'} = $source;
-
- my($i, @lines);
- until( $self->{'source_dead'} ) {
- splice @lines;
- for($i = MANY_LINES; $i--;) { # read those many lines at a time
- local $/ = $NL;
- push @lines, scalar(<$source>); # readline
- last unless defined $lines[-1];
- # but pass thru the undef, which will set source_dead to true
- }
- $self->parse_lines(@lines);
- }
- delete($self->{'source_fh'}); # so it can be GC'd
- return $self;
-}
-
-#:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
-
-sub parse_from_file {
- # An emulation of Pod::Parser's interface, for the sake of Perldoc.
- # Basically just a wrapper around parse_file.
-
- my($self, $source, $to) = @_;
- $self = $self->new unless ref($self); # so we tolerate being a class method
-
- if(!defined $source) { $source = *STDIN{IO}
- } elsif(ref(\$source) eq 'GLOB') { # stet
- } elsif(ref($source) ) { # stet
- } elsif(!length $source
- or $source eq '-' or $source =~ m/^<&(STDIN|0)$/i
- ) {
- $source = *STDIN{IO};
- }
-
- if(!defined $to) { $self->output_fh( *STDOUT{IO} );
- } elsif(ref(\$to) eq 'GLOB') { $self->output_fh( $to );
- } elsif(ref($to)) { $self->output_fh( $to );
- } elsif(!length $to
- or $to eq '-' or $to =~ m/^>&?(?:STDOUT|1)$/i
- ) {
- $self->output_fh( *STDOUT{IO} );
- } else {
- require Symbol;
- my $out_fh = Symbol::gensym();
- DEBUG and print "Write-opening to $to\n";
- open($out_fh, ">$to") or Carp::croak "Can't write-open $to: $!";
- binmode($out_fh)
- if $self->can('write_with_binmode') and $self->write_with_binmode;
- $self->output_fh($out_fh);
- }
-
- return $self->parse_file($source);
-}
-
-#-----------------------------------------------------------------------------
-
-sub whine {
- #my($self,$line,$complaint) = @_;
- my $self = shift(@_);
- ++$self->{'errors_seen'};
- if($self->{'no_whining'}) {
- DEBUG > 9 and print "Discarding complaint (at line $_[0]) $_[1]\n because no_whining is on.\n";
- return;
- }
- return $self->_complain_warn(@_) if $self->{'complain_stderr'};
- return $self->_complain_errata(@_);
-}
-
-sub scream { # like whine, but not suppressable
- #my($self,$line,$complaint) = @_;
- my $self = shift(@_);
- ++$self->{'errors_seen'};
- return $self->_complain_warn(@_) if $self->{'complain_stderr'};
- return $self->_complain_errata(@_);
-}
-
-sub _complain_warn {
- my($self,$line,$complaint) = @_;
- return printf STDERR "%s around line %s: %s\n",
- $self->{'source_filename'} || 'Pod input', $line, $complaint;
-}
-
-sub _complain_errata {
- my($self,$line,$complaint) = @_;
- if( $self->{'no_errata_section'} ) {
- DEBUG > 9 and print "Discarding erratum (at line $line) $complaint\n because no_errata_section is on.\n";
- } else {
- DEBUG > 9 and print "Queuing erratum (at line $line) $complaint\n";
- push @{$self->{'errata'}{$line}}, $complaint
- # for a report to be generated later!
- }
- return 1;
-}
-
-#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-sub _get_initial_item_type {
- # A hack-wrapper here for when you have like "=over\n\n=item 456\n\n"
- my($self, $para) = @_;
- return $para->[1]{'~type'} if $para->[1]{'~type'};
-
- return $para->[1]{'~type'} = 'text'
- if join("\n", @{$para}[2 .. $#$para]) =~ m/^\s*(\d+)\.?\s*$/s and $1 ne '1';
- # Else fall thru to the general case:
- return $self->_get_item_type($para);
-}
-
-
-
-sub _get_item_type { # mutates the item!!
- my($self, $para) = @_;
- return $para->[1]{'~type'} if $para->[1]{'~type'};
-
-
- # Otherwise we haven't yet been to this node. Maybe alter it...
-
- my $content = join "\n", @{$para}[2 .. $#$para];
-
- if($content =~ m/^\s*\*\s*$/s or $content =~ m/^\s*$/s) {
- # Like: "=item *", "=item * ", "=item"
- splice @$para, 2; # so it ends up just being ['=item', { attrhash } ]
- $para->[1]{'~orig_content'} = $content;
- return $para->[1]{'~type'} = 'bullet';
-
- } elsif($content =~ m/^\s*\*\s+(.+)/s) { # tolerance
-
- # Like: "=item * Foo bar baz";
- $para->[1]{'~orig_content'} = $content;
- $para->[1]{'~_freaky_para_hack'} = $1;
- DEBUG > 2 and print " Tolerating $$para[2] as =item *\\n\\n$1\n";
- splice @$para, 2; # so it ends up just being ['=item', { attrhash } ]
- return $para->[1]{'~type'} = 'bullet';
-
- } elsif($content =~ m/^\s*(\d+)\.?\s*$/s) {
- # Like: "=item 1.", "=item 123412"
-
- $para->[1]{'~orig_content'} = $content;
- $para->[1]{'number'} = $1; # Yes, stores the number there!
-
- splice @$para, 2; # so it ends up just being ['=item', { attrhash } ]
- return $para->[1]{'~type'} = 'number';
-
- } else {
- # It's anything else.
- return $para->[1]{'~type'} = 'text';
-
- }
-}
-
-#-----------------------------------------------------------------------------
-
-sub _make_treelet {
- my $self = shift; # and ($para, $start_line)
- my $treelet;
- if(!@_) {
- return [''];
- } if(ref $_[0] and ref $_[0][0] and $_[0][0][0] eq '~Top') {
- # Hack so we can pass in fake-o pre-cooked paragraphs:
- # just have the first line be a reference to a ['~Top', {}, ...]
- # We use this feechure in gen_errata and stuff.
-
- DEBUG and print "Applying precooked treelet hack to $_[0][0]\n";
- $treelet = $_[0][0];
- splice @$treelet, 0, 2; # lop the top off
- return $treelet;
- } else {
- $treelet = $self->_treelet_from_formatting_codes(@_);
- }
-
- if( $self->_remap_sequences($treelet) ) {
- $self->_treat_Zs($treelet); # Might as well nix these first
- $self->_treat_Ls($treelet); # L has to precede E and S
- $self->_treat_Es($treelet);
- $self->_treat_Ss($treelet); # S has to come after E
-
- $self->_wrap_up($treelet); # Nix X's and merge texties
-
- } else {
- DEBUG and print "Formatless treelet gets fast-tracked.\n";
- # Very common case!
- }
-
- splice @$treelet, 0, 2; # lop the top off
-
- return $treelet;
-}
-
-#:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
-
-sub _wrap_up {
- my($self, @stack) = @_;
- my $nixx = $self->{'nix_X_codes'};
- my $merge = $self->{'merge_text' };
- return unless $nixx or $merge;
-
- DEBUG > 2 and print "\nStarting _wrap_up traversal.\n",
- $merge ? (" Merge mode on\n") : (),
- $nixx ? (" Nix-X mode on\n") : (),
- ;
-
-
- my($i, $treelet);
- while($treelet = shift @stack) {
- DEBUG > 3 and print " Considering children of this $treelet->[0] node...\n";
- for($i = 2; $i < @$treelet; ++$i) { # iterate over children
- DEBUG > 3 and print " Considering child at $i ", pretty($treelet->[$i]), "\n";
- if($nixx and ref $treelet->[$i] and $treelet->[$i][0] eq 'X') {
- DEBUG > 3 and print " Nixing X node at $i\n";
- splice(@$treelet, $i, 1); # just nix this node (and its descendants)
- # no need to back-update the counter just yet
- redo;
-
- } elsif($merge and $i != 2 and # non-initial
- !ref $treelet->[$i] and !ref $treelet->[$i - 1]
- ) {
- DEBUG > 3 and print " Merging ", $i-1,
- ":[$treelet->[$i-1]] and $i\:[$treelet->[$i]]\n";
- $treelet->[$i-1] .= ( splice(@$treelet, $i, 1) )[0];
- DEBUG > 4 and print " Now: ", $i-1, ":[$treelet->[$i-1]]\n";
- --$i;
- next;
- # since we just pulled the possibly last node out from under
- # ourselves, we can't just redo()
-
- } elsif( ref $treelet->[$i] ) {
- DEBUG > 4 and print " Enqueuing ", pretty($treelet->[$i]), " for traversal.\n";
- push @stack, $treelet->[$i];
-
- if($treelet->[$i][0] eq 'L') {
- my $thing;
- foreach my $attrname ('section', 'to') {
- if(defined($thing = $treelet->[$i][1]{$attrname}) and ref $thing) {
- unshift @stack, $thing;
- DEBUG > 4 and print " +Enqueuing ",
- pretty( $treelet->[$i][1]{$attrname} ),
- " as an attribute value to tweak.\n";
- }
- }
- }
- }
- }
- }
- DEBUG > 2 and print "End of _wrap_up traversal.\n\n";
-
- return;
-}
-
-#:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
-
-sub _remap_sequences {
- my($self, at stack) = @_;
-
- if(@stack == 1 and @{ $stack[0] } == 3 and !ref $stack[0][2]) {
- # VERY common case: abort it.
- DEBUG and print "Skipping _remap_sequences: formatless treelet.\n";
- return 0;
- }
-
- my $map = ($self->{'accept_codes'} || die "NO accept_codes in $self?!?");
-
- my $start_line = $stack[0][1]{'start_line'};
- DEBUG > 2 and printf
- "\nAbout to start _remap_sequences on treelet from line %s.\n",
- $start_line || '[?]'
- ;
- DEBUG > 3 and print " Map: ",
- join('; ', map "$_=" . (
- ref($map->{$_}) ? join(",", @{$map->{$_}}) : $map->{$_}
- ),
- sort keys %$map ),
- ("B~C~E~F~I~L~S~X~Z" eq join '~', sort keys %$map)
- ? " (all normal)\n" : "\n"
- ;
-
- # A recursive algorithm implemented iteratively! Whee!
-
- my($is, $was, $i, $treelet); # scratch
- while($treelet = shift @stack) {
- DEBUG > 3 and print " Considering children of this $treelet->[0] node...\n";
- for($i = 2; $i < @$treelet; ++$i) { # iterate over children
- next unless ref $treelet->[$i]; # text nodes are uninteresting
-
- DEBUG > 4 and print " Noting child $i : $treelet->[$i][0]<...>\n";
-
- $is = $treelet->[$i][0] = $map->{ $was = $treelet->[$i][0] };
- if( DEBUG > 3 ) {
- if(!defined $is) {
- print " Code $was<> is UNKNOWN!\n";
- } elsif($is eq $was) {
- DEBUG > 4 and print " Code $was<> stays the same.\n";
- } else {
- print " Code $was<> maps to ",
- ref($is)
- ? ( "tags ", map("$_<", @$is), '...', map('>', @$is), "\n" )
- : "tag $is<...>.\n";
- }
- }
-
- if(!defined $is) {
- $self->whine($start_line, "Deleting unknown formatting code $was<>");
- $is = $treelet->[$i][0] = '1'; # But saving the children!
- # I could also insert a leading "$was<" and tailing ">" as
- # children of this node, but something about that seems icky.
- }
- if(ref $is) {
- my @dynasty = @$is;
- DEBUG > 4 and print " Renaming $was node to $dynasty[-1]\n";
- $treelet->[$i][0] = pop @dynasty;
- my $nugget;
- while(@dynasty) {
- DEBUG > 4 and printf
- " Grafting a new %s node between %s and %s\n",
- $dynasty[-1], $treelet->[0], $treelet->[$i][0],
- ;
-
- #$nugget = ;
- splice @$treelet, $i, 1, [pop(@dynasty), {}, $treelet->[$i]];
- # relace node with a new parent
- }
- } elsif($is eq '0') {
- splice(@$treelet, $i, 1); # just nix this node (and its descendants)
- --$i; # back-update the counter
- } elsif($is eq '1') {
- splice(@$treelet, $i, 1 # replace this node with its children!
- => splice @{ $treelet->[$i] },2
- # (not catching its first two (non-child) items)
- );
- --$i; # back up for new stuff
- } else {
- # otherwise it's unremarkable
- unshift @stack, $treelet->[$i]; # just recurse
- }
- }
- }
-
- DEBUG > 2 and print "End of _remap_sequences traversal.\n\n";
-
- if(@_ == 2 and @{ $_[1] } == 3 and !ref $_[1][2]) {
- DEBUG and print "Noting that the treelet is now formatless.\n";
- return 0;
- }
- return 1;
-}
-
-# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-
-sub _ponder_extend {
-
- # "Go to an extreme, move back to a more comfortable place"
- # -- /Oblique Strategies/, Brian Eno and Peter Schmidt
-
- my($self, $para) = @_;
- my $content = join ' ', splice @$para, 2;
- $content =~ s/^\s+//s;
- $content =~ s/\s+$//s;
-
- DEBUG > 2 and print "Ogling extensor: =extend $content\n";
-
- if($content =~
- m/^
- (\S+) # 1 : new item
- \s+
- (\S+) # 2 : fallback(s)
- (?:\s+(\S+))? # 3 : element name(s)
- \s*
- $
- /xs
- ) {
- my $new_letter = $1;
- my $fallbacks_one = $2;
- my $elements_one;
- $elements_one = defined($3) ? $3 : $1;
-
- DEBUG > 2 and print "Extensor has good syntax.\n";
-
- unless($new_letter =~ m/^[A-Z]$/s or $new_letter) {
- DEBUG > 2 and print " $new_letter isn't a valid thing to entend.\n";
- $self->whine(
- $para->[1]{'start_line'},
- "You can extend only formatting codes A-Z, not like \"$new_letter\""
- );
- return;
- }
-
- if(grep $new_letter eq $_, @Known_formatting_codes) {
- DEBUG > 2 and print " $new_letter isn't a good thing to extend, because known.\n";
- $self->whine(
- $para->[1]{'start_line'},
- "You can't extend an established code like \"$new_letter\""
- );
-
- #TODO: or allow if last bit is same?
-
- return;
- }
-
- unless($fallbacks_one =~ m/^[A-Z](,[A-Z])*$/s # like "B", "M,I", etc.
- or $fallbacks_one eq '0' or $fallbacks_one eq '1'
- ) {
- $self->whine(
- $para->[1]{'start_line'},
- "Format for second =extend parameter must be like"
- . " M or 1 or 0 or M,N or M,N,O but you have it like "
- . $fallbacks_one
- );
- return;
- }
-
- unless($elements_one =~ m/^[^ ,]+(,[^ ,]+)*$/s) { # like "B", "M,I", etc.
- $self->whine(
- $para->[1]{'start_line'},
- "Format for third =extend parameter: like foo or bar,Baz,qu:ux but not like "
- . $elements_one
- );
- return;
- }
-
- my @fallbacks = split ',', $fallbacks_one, -1;
- my @elements = split ',', $elements_one, -1;
-
- foreach my $f (@fallbacks) {
- next if exists $Known_formatting_codes{$f} or $f eq '0' or $f eq '1';
- DEBUG > 2 and print " Can't fall back on unknown code $f\n";
- $self->whine(
- $para->[1]{'start_line'},
- "Can't use unknown formatting code '$f' as a fallback for '$new_letter'"
- );
- return;
- }
-
- DEBUG > 3 and printf "Extensor: Fallbacks <%s> Elements <%s>.\n",
- @fallbacks, @elements;
-
- my $canonical_form;
- foreach my $e (@elements) {
- if(exists $self->{'accept_codes'}{$e}) {
- DEBUG > 1 and print " Mapping '$new_letter' to known extension '$e'\n";
- $canonical_form = $e;
- last; # first acceptable elementname wins!
- } else {
- DEBUG > 1 and print " Can't map '$new_letter' to unknown extension '$e'\n";
- }
- }
-
-
- if( defined $canonical_form ) {
- # We found a good N => elementname mapping
- $self->{'accept_codes'}{$new_letter} = $canonical_form;
- DEBUG > 2 and print
- "Extensor maps $new_letter => known element $canonical_form.\n";
- } else {
- # We have to use the fallback(s), which might be '0', or '1'.
- $self->{'accept_codes'}{$new_letter}
- = (@fallbacks == 1) ? $fallbacks[0] : \@fallbacks;
- DEBUG > 2 and print
- "Extensor maps $new_letter => fallbacks @fallbacks.\n";
- }
-
- } else {
- DEBUG > 2 and print "Extensor has bad syntax.\n";
- $self->whine(
- $para->[1]{'start_line'},
- "Unknown =extend syntax: $content"
- )
- }
- return;
-}
-
-
-#:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
-
-sub _treat_Zs { # Nix Z<...>'s
- my($self, at stack) = @_;
-
- my($i, $treelet);
- my $start_line = $stack[0][1]{'start_line'};
-
- # A recursive algorithm implemented iteratively! Whee!
-
- while($treelet = shift @stack) {
- for($i = 2; $i < @$treelet; ++$i) { # iterate over children
- next unless ref $treelet->[$i]; # text nodes are uninteresting
- unless($treelet->[$i][0] eq 'Z') {
- unshift @stack, $treelet->[$i]; # recurse
- next;
- }
-
- DEBUG > 1 and print "Nixing Z node @{$treelet->[$i]}\n";
-
- # bitch UNLESS it's empty
- unless( @{$treelet->[$i]} == 2
- or (@{$treelet->[$i]} == 3 and $treelet->[$i][2] eq '')
- ) {
- $self->whine( $start_line, "A non-empty Z<>" );
- } # but kill it anyway
-
- splice(@$treelet, $i, 1); # thereby just nix this node.
- --$i;
-
- }
- }
-
- return;
-}
-
-# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-
-# Quoting perlpodspec:
-
-# In parsing an L<...> code, Pod parsers must distinguish at least four
-# attributes:
-
-############# Not used. Expressed via the element children plus
-############# the value of the "content-implicit" flag.
-# First:
-# The link-text. If there is none, this must be undef. (E.g., in "L<Perl
-# Functions|perlfunc>", the link-text is "Perl Functions". In
-# "L<Time::HiRes>" and even "L<|Time::HiRes>", there is no link text. Note
-# that link text may contain formatting.)
-#
-
-############# The element children
-# Second:
-# The possibly inferred link-text -- i.e., if there was no real link text,
-# then this is the text that we'll infer in its place. (E.g., for
-# "L<Getopt::Std>", the inferred link text is "Getopt::Std".)
-#
-
-############# The "to" attribute (which might be text, or a treelet)
-# Third:
-# The name or URL, or undef if none. (E.g., in "L<Perl
-# Functions|perlfunc>", the name -- also sometimes called the page -- is
-# "perlfunc". In "L</CAVEATS>", the name is undef.)
-#
-
-############# The "section" attribute (which might be next, or a treelet)
-# Fourth:
-# The section (AKA "item" in older perlpods), or undef if none. E.g., in
-# Getopt::Std/DESCRIPTION, "DESCRIPTION" is the section. (Note that this
-# is not the same as a manpage section like the "5" in "man 5 crontab".
-# "Section Foo" in the Pod sense means the part of the text that's
-# introduced by the heading or item whose text is "Foo".)
-#
-# Pod parsers may also note additional attributes including:
-#
-
-############# The "type" attribute.
-# Fifth:
-# A flag for whether item 3 (if present) is a URL (like
-# "http://lists.perl.org" is), in which case there should be no section
-# attribute; a Pod name (like "perldoc" and "Getopt::Std" are); or
-# possibly a man page name (like "crontab(5)" is).
-#
-
-############# Not implemented, I guess.
-# Sixth:
-# The raw original L<...> content, before text is split on "|", "/", etc,
-# and before E<...> codes are expanded.
-
-
-# For L<...> codes without a "name|" part, only E<...> and Z<> codes may
-# occur -- no other formatting codes. That is, authors should not use
-# "L<B<Foo::Bar>>".
-#
-# Note, however, that formatting codes and Z<>'s can occur in any and all
-# parts of an L<...> (i.e., in name, section, text, and url).
-
-sub _treat_Ls { # Process our dear dear friends, the L<...> sequences
-
- # L<name>
- # L<name/"sec"> or L<name/sec>
- # L</"sec"> or L</sec> or L<"sec">
- # L<text|name>
- # L<text|name/"sec"> or L<text|name/sec>
- # L<text|/"sec"> or L<text|/sec> or L<text|"sec">
- # L<scheme:...>
- # Ltext|scheme:...>
-
- my($self, at stack) = @_;
-
- my($i, $treelet);
- my $start_line = $stack[0][1]{'start_line'};
-
- # A recursive algorithm implemented iteratively! Whee!
-
- while($treelet = shift @stack) {
- for(my $i = 2; $i < @$treelet; ++$i) {
- # iterate over children of current tree node
- next unless ref $treelet->[$i]; # text nodes are uninteresting
- unless($treelet->[$i][0] eq 'L') {
- unshift @stack, $treelet->[$i]; # recurse
- next;
- }
-
-
- # By here, $treelet->[$i] is definitely an L node
- my $ell = $treelet->[$i];
- DEBUG > 1 and print "Ogling L node $ell\n";
-
- # bitch if it's empty
- if( @{$ell} == 2
- or (@{$ell} == 3 and $ell->[2] eq '')
- ) {
- $self->whine( $start_line, "An empty L<>" );
- $treelet->[$i] = 'L<>'; # just make it a text node
- next; # and move on
- }
-
- # Catch URLs:
-
- # there are a number of possible cases:
- # 1) text node containing url: http://foo.com
- # -> [ 'http://foo.com' ]
- # 2) text node containing url and text: foo|http://foo.com
- # -> [ 'foo|http://foo.com' ]
- # 3) text node containing url start: mailto:xE<at>foo.com
- # -> [ 'mailto:x', [ E ... ], 'foo.com' ]
- # 4) text node containing url start and text: foo|mailto:xE<at>foo.com
- # -> [ 'foo|mailto:x', [ E ... ], 'foo.com' ]
- # 5) other nodes containing text and url start: OE<39>Malley|http://foo.com
- # -> [ 'O', [ E ... ], 'Malley', '|http://foo.com' ]
- # ... etc.
-
- # anything before the url is part of the text.
- # anything after it is part of the url.
- # the url text node itself may contain parts of both.
-
- if (my ($url_index, $text_part, $url_part) =
- # grep is no good here; we want to bail out immediately so that we can
- # use $1, $2, etc. without having to do the match twice.
- sub {
- for (2..$#$ell) {
- next if ref $ell->[$_];
- next unless $ell->[$_] =~ m/^(?:([^|]*)\|)?(\w+:[^:\s]\S*)$/s;
- return ($_, $1, $2);
- }
- return;
- }->()
- ) {
- $ell->[1]{'type'} = 'url';
-
- my @text = @{$ell}[2..$url_index-1];
- push @text, $text_part if defined $text_part;
-
- my @url = @{$ell}[$url_index+1..$#$ell];
- unshift @url, $url_part;
-
- unless (@text) {
- $ell->[1]{'content-implicit'} = 'yes';
- @text = @url;
- }
-
- $ell->[1]{to} = Pod::Simple::LinkSection->new(
- @url == 1
- ? $url[0]
- : [ '', {}, @url ],
- );
-
- splice @$ell, 2, $#$ell, @text;
-
- next;
- }
-
- # Catch some very simple and/or common cases
- if(@{$ell} == 3 and ! ref $ell->[2]) {
- my $it = $ell->[2];
- if($it =~ m/^[-a-zA-Z0-9]+\([-a-zA-Z0-9]+\)$/s) { # man sections
- # Hopefully neither too broad nor too restrictive a RE
- DEBUG > 1 and print "Catching \"$it\" as manpage link.\n";
- $ell->[1]{'type'} = 'man';
- # This's the only place where man links can get made.
- $ell->[1]{'content-implicit'} = 'yes';
- $ell->[1]{'to' } =
- Pod::Simple::LinkSection->new( $it ); # treelet!
-
- next;
- }
- if($it =~ m/^[^\/\|,\$\%\@\ \"\<\>\:\#\&\*\{\}\[\]\(\)]+(\:\:[^\/\|,\$\%\@\ \"\<\>\:\#\&\*\{\}\[\]\(\)]+)*$/s) {
- # Extremely forgiving idea of what constitutes a bare
- # modulename link like L<Foo::Bar> or even L<Thing::1.0::Docs::Tralala>
- DEBUG > 1 and print "Catching \"$it\" as ho-hum L<Modulename> link.\n";
- $ell->[1]{'type'} = 'pod';
- $ell->[1]{'content-implicit'} = 'yes';
- $ell->[1]{'to' } =
- Pod::Simple::LinkSection->new( $it ); # treelet!
- next;
- }
- # else fall thru...
- }
-
-
-
- # ...Uhoh, here's the real L<...> parsing stuff...
- # "With the ill behavior, with the ill behavior, with the ill behavior..."
-
- DEBUG > 1 and print "Running a real parse on this non-trivial L\n";
-
-
- my $link_text; # set to an arrayref if found
- my @ell_content = @$ell;
- splice @ell_content,0,2; # Knock off the 'L' and {} bits
-
- DEBUG > 3 and print " Ell content to start: ",
- pretty(@ell_content), "\n";
-
-
- # Look for the "|" -- only in CHILDREN (not all underlings!)
- # Like L<I like the strictness|strict>
- DEBUG > 3 and
- print " Peering at L content for a '|' ...\n";
- for(my $j = 0; $j < @ell_content; ++$j) {
- next if ref $ell_content[$j];
- DEBUG > 3 and
- print " Peering at L-content text bit \"$ell_content[$j]\" for a '|'.\n";
-
- if($ell_content[$j] =~ m/^([^\|]*)\|(.*)$/s) {
- my @link_text = ($1); # might be 0-length
- $ell_content[$j] = $2; # might be 0-length
-
- DEBUG > 3 and
- print " FOUND a '|' in it. Splitting into [$1] + [$2]\n";
-
- unshift @link_text, splice @ell_content, 0, $j;
- # leaving only things at J and after
- @ell_content = grep ref($_)||length($_), @ell_content ;
- $link_text = [grep ref($_)||length($_), @link_text ];
- DEBUG > 3 and printf
- " So link text is %s\n and remaining ell content is %s\n",
- pretty($link_text), pretty(@ell_content);
- last;
- }
- }
-
-
- # Now look for the "/" -- only in CHILDREN (not all underlings!)
- # And afterward, anything left in @ell_content will be the raw name
- # Like L<Foo::Bar/Object Methods>
- my $section_name; # set to arrayref if found
- DEBUG > 3 and print " Peering at L-content for a '/' ...\n";
- for(my $j = 0; $j < @ell_content; ++$j) {
- next if ref $ell_content[$j];
- DEBUG > 3 and
- print " Peering at L-content text bit \"$ell_content[$j]\" for a '/'.\n";
-
- if($ell_content[$j] =~ m/^([^\/]*)\/(.*)$/s) {
- my @section_name = ($2); # might be 0-length
- $ell_content[$j] = $1; # might be 0-length
-
- DEBUG > 3 and
- print " FOUND a '/' in it.",
- " Splitting to page [...$1] + section [$2...]\n";
-
- push @section_name, splice @ell_content, 1+$j;
- # leaving only things before and including J
-
- @ell_content = grep ref($_)||length($_), @ell_content ;
- @section_name = grep ref($_)||length($_), @section_name ;
-
- # Turn L<.../"foo"> into L<.../foo>
- if(@section_name
- and !ref($section_name[0]) and !ref($section_name[-1])
- and $section_name[ 0] =~ m/^\"/s
- and $section_name[-1] =~ m/\"$/s
- and !( # catch weird degenerate case of L<"> !
- @section_name == 1 and $section_name[0] eq '"'
- )
- ) {
- $section_name[ 0] =~ s/^\"//s;
- $section_name[-1] =~ s/\"$//s;
- DEBUG > 3 and
- print " Quotes removed: ", pretty(@section_name), "\n";
- } else {
- DEBUG > 3 and
- print " No need to remove quotes in ", pretty(@section_name), "\n";
- }
-
- $section_name = \@section_name;
- last;
- }
- }
-
- # Turn L<"Foo Bar"> into L</Foo Bar>
- if(!$section_name and @ell_content
- and !ref($ell_content[0]) and !ref($ell_content[-1])
- and $ell_content[ 0] =~ m/^\"/s
- and $ell_content[-1] =~ m/\"$/s
- and !( # catch weird degenerate case of L<"> !
- @ell_content == 1 and $ell_content[0] eq '"'
- )
- ) {
- $section_name = [splice @ell_content];
- $section_name->[ 0] =~ s/^\"//s;
- $section_name->[-1] =~ s/\"$//s;
- }
-
- # Turn L<Foo Bar> into L</Foo Bar>.
- if(!$section_name and !$link_text and @ell_content
- and grep !ref($_) && m/ /s, @ell_content
- ) {
- $section_name = [splice @ell_content];
- # That's support for the now-deprecated syntax.
- # (Maybe generate a warning eventually?)
- # Note that it deliberately won't work on L<...|Foo Bar>
- }
-
-
- # Now make up the link_text
- # L<Foo> -> L<Foo|Foo>
- # L</Bar> -> L<"Bar"|Bar>
- # L<Foo/Bar> -> L<"Bar" in Foo/Foo>
- unless($link_text) {
- $ell->[1]{'content-implicit'} = 'yes';
- $link_text = [];
- push @$link_text, '"', @$section_name, '"' if $section_name;
-
- if(@ell_content) {
- $link_text->[-1] .= ' in ' if $section_name;
- push @$link_text, @ell_content;
- }
- }
-
-
- # And the E resolver will have to deal with all our treeletty things:
-
- if(@ell_content == 1 and !ref($ell_content[0])
- and $ell_content[0] =~ m/^[-a-zA-Z0-9]+\([-a-zA-Z0-9]+\)$/s
- ) {
- $ell->[1]{'type'} = 'man';
- DEBUG > 3 and print "Considering this ($ell_content[0]) a man link.\n";
- } else {
- $ell->[1]{'type'} = 'pod';
- DEBUG > 3 and print "Considering this a pod link (not man or url).\n";
- }
-
- if( defined $section_name ) {
- $ell->[1]{'section'} = Pod::Simple::LinkSection->new(
- ['', {}, @$section_name]
- );
- DEBUG > 3 and print "L-section content: ", pretty($ell->[1]{'section'}), "\n";
- }
-
- if( @ell_content ) {
- $ell->[1]{'to'} = Pod::Simple::LinkSection->new(
- ['', {}, @ell_content]
- );
- DEBUG > 3 and print "L-to content: ", pretty($ell->[1]{'to'}), "\n";
- }
-
- # And update children to be the link-text:
- @$ell = (@$ell[0,1], defined($link_text) ? splice(@$link_text) : '');
-
- DEBUG > 2 and print "End of L-parsing for this node $treelet->[$i]\n";
-
- unshift @stack, $treelet->[$i]; # might as well recurse
- }
- }
-
- return;
-}
-
-# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-
-sub _treat_Es {
- my($self, at stack) = @_;
-
- my($i, $treelet, $content, $replacer, $charnum);
- my $start_line = $stack[0][1]{'start_line'};
-
- # A recursive algorithm implemented iteratively! Whee!
-
-
- # Has frightening side effects on L nodes' attributes.
-
- #my @ells_to_tweak;
-
- while($treelet = shift @stack) {
- for(my $i = 2; $i < @$treelet; ++$i) { # iterate over children
- next unless ref $treelet->[$i]; # text nodes are uninteresting
- if($treelet->[$i][0] eq 'L') {
- # SPECIAL STUFF for semi-processed L<>'s
-
- my $thing;
- foreach my $attrname ('section', 'to') {
- if(defined($thing = $treelet->[$i][1]{$attrname}) and ref $thing) {
- unshift @stack, $thing;
- DEBUG > 2 and print " Enqueuing ",
- pretty( $treelet->[$i][1]{$attrname} ),
- " as an attribute value to tweak.\n";
- }
- }
-
- unshift @stack, $treelet->[$i]; # recurse
- next;
- } elsif($treelet->[$i][0] ne 'E') {
- unshift @stack, $treelet->[$i]; # recurse
- next;
- }
-
- DEBUG > 1 and print "Ogling E node ", pretty($treelet->[$i]), "\n";
-
- # bitch if it's empty
- if( @{$treelet->[$i]} == 2
- or (@{$treelet->[$i]} == 3 and $treelet->[$i][2] eq '')
- ) {
- $self->whine( $start_line, "An empty E<>" );
- $treelet->[$i] = 'E<>'; # splice in a literal
- next;
- }
-
- # bitch if content is weird
- unless(@{$treelet->[$i]} == 3 and !ref($content = $treelet->[$i][2])) {
- $self->whine( $start_line, "An E<...> surrounding strange content" );
- $replacer = $treelet->[$i]; # scratch
- splice(@$treelet, $i, 1, # fake out a literal
- 'E<',
- splice(@$replacer,2), # promote its content
- '>'
- );
- # Don't need to do --$i, as the 'E<' we just added isn't interesting.
- next;
- }
-
- DEBUG > 1 and print "Ogling E<$content>\n";
-
- $charnum = Pod::Escapes::e2charnum($content);
- DEBUG > 1 and print " Considering E<$content> with char ",
- defined($charnum) ? $charnum : "undef", ".\n";
-
- if(!defined( $charnum )) {
- DEBUG > 1 and print "I don't know how to deal with E<$content>.\n";
- $self->whine( $start_line, "Unknown E content in E<$content>" );
- $replacer = "E<$content>"; # better than nothing
- } elsif($charnum >= 255 and !UNICODE) {
- $replacer = ASCII ? "\xA4" : "?";
- DEBUG > 1 and print "This Perl version can't handle ",
- "E<$content> (chr $charnum), so replacing with $replacer\n";
- } else {
- $replacer = Pod::Escapes::e2char($content);
- DEBUG > 1 and print " Replacing E<$content> with $replacer\n";
- }
-
- splice(@$treelet, $i, 1, $replacer); # no need to back up $i, tho
- }
- }
-
- return;
-}
-
-
-# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-
-sub _treat_Ss {
- my($self,$treelet) = @_;
-
- _change_S_to_nbsp($treelet,0) if $self->{'nbsp_for_S'};
-
- # TODO: or a change_nbsp_to_S
- # Normalizing nbsp's to S is harder: for each text node, make S content
- # out of anything matching m/([^ \xA0]*(?:\xA0+[^ \xA0]*)+)/
-
-
- return;
-}
-
-
-sub _change_S_to_nbsp { # a recursive function
- # Sanely assumes that the top node in the excursion won't be an S node.
- my($treelet, $in_s) = @_;
-
- my $is_s = ('S' eq $treelet->[0]);
- $in_s ||= $is_s; # So in_s is on either by this being an S element,
- # or by an ancestor being an S element.
-
- for(my $i = 2; $i < @$treelet; ++$i) {
- if(ref $treelet->[$i]) {
- if( _change_S_to_nbsp( $treelet->[$i], $in_s ) ) {
- my $to_pull_up = $treelet->[$i];
- splice @$to_pull_up,0,2; # ...leaving just its content
- splice @$treelet, $i, 1, @$to_pull_up; # Pull up content
- $i += @$to_pull_up - 1; # Make $i skip the pulled-up stuff
- }
- } else {
- $treelet->[$i] =~ s/\s/\xA0/g if ASCII and $in_s;
- # (If not in ASCIIland, we can't assume that \xA0 == nbsp.)
-
- # Note that if you apply nbsp_for_S to text, and so turn
- # "foo S<bar baz> quux" into "foo bar faz quux", you
- # end up with something that fails to say "and don't hyphenate
- # any part of 'bar baz'". However, hyphenation is such a vexing
- # problem anyway, that most Pod renderers just don't render it
- # at all. But if you do want to implement hyphenation, I guess
- # that you'd better have nbsp_for_S off.
- }
- }
-
- return $is_s;
-}
-
-#-----------------------------------------------------------------------------
-
-sub _accessorize { # A simple-minded method-maker
- no strict 'refs';
- foreach my $attrname (@_) {
- next if $attrname =~ m/::/; # a hack
- *{caller() . '::' . $attrname} = sub {
- use strict;
- $Carp::CarpLevel = 1, Carp::croak(
- "Accessor usage: \$obj->$attrname() or \$obj->$attrname(\$new_value)"
- ) unless (@_ == 1 or @_ == 2) and ref $_[0];
- (@_ == 1) ? $_[0]->{$attrname}
- : ($_[0]->{$attrname} = $_[1]);
- };
- }
- # Ya know, they say accessories make the ensemble!
- return;
-}
-
-# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
-#=============================================================================
-
-sub filter {
- my($class, $source) = @_;
- my $new = $class->new;
- $new->output_fh(*STDOUT{IO});
-
- if(ref($source || '') eq 'SCALAR') {
- $new->parse_string_document( $$source );
- } elsif(ref($source)) { # it's a file handle
- $new->parse_file($source);
- } else { # it's a filename
- $new->parse_file($source);
- }
-
- return $new;
-}
-
-
-#-----------------------------------------------------------------------------
-
-sub _out {
- # For use in testing: Class->_out($source)
- # returns the transformation of $source
-
- my $class = shift(@_);
-
- my $mutor = shift(@_) if @_ and ref($_[0] || '') eq 'CODE';
-
- DEBUG and print "\n\n", '#' x 76,
- "\nAbout to parse source: {{\n$_[0]\n}}\n\n";
-
-
- my $parser = ref $class && $class->isa(__PACKAGE__) ? $class : $class->new;
- $parser->hide_line_numbers(1);
-
- my $out = '';
- $parser->output_string( \$out );
- DEBUG and print " _out to ", \$out, "\n";
-
- $mutor->($parser) if $mutor;
-
- $parser->parse_string_document( $_[0] );
- # use Data::Dumper; print Dumper($parser), "\n";
- return $out;
-}
-
-
-sub _duo {
- # For use in testing: Class->_duo($source1, $source2)
- # returns the parse trees of $source1 and $source2.
- # Good in things like: &ok( Class->duo(... , ...) );
-
- my $class = shift(@_);
-
- Carp::croak "But $class->_duo is useful only in list context!"
- unless wantarray;
-
- my $mutor = shift(@_) if @_ and ref($_[0] || '') eq 'CODE';
-
- Carp::croak "But $class->_duo takes two parameters, not: @_"
- unless @_ == 2;
-
- my(@out);
-
- while( @_ ) {
- my $parser = $class->new;
-
- push @out, '';
- $parser->output_string( \( $out[-1] ) );
-
- DEBUG and print " _duo out to ", $parser->output_string(),
- " = $parser->{'output_string'}\n";
-
- $parser->hide_line_numbers(1);
- $mutor->($parser) if $mutor;
- $parser->parse_string_document( shift( @_ ) );
- # use Data::Dumper; print Dumper($parser), "\n";
- }
-
- return @out;
-}
-
-
-
-#-----------------------------------------------------------------------------
-1;
-__END__
-
-TODO:
-A start_formatting_code and end_formatting_code methods, which in the
-base class call start_L, end_L, start_C, end_C, etc., if they are
-defined.
-
-have the POD FORMATTING ERRORS section note the localtime, and the
-version of Pod::Simple.
-
-option to delete all E<shy>s?
-option to scream if under-0x20 literals are found in the input, or
-under-E<32> E codes are found in the tree. And ditto \x7f-\x9f
-
-Option to turn highbit characters into their compromised form? (applies
-to E parsing too)
-
-TODO: BOM/encoding things.
-
-TODO: ascii-compat things in the XML classes?
-
Deleted: vendor/perl/dist/lib/Pod/Simple.pod
===================================================================
--- vendor/perl/dist/lib/Pod/Simple.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Simple.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,226 +0,0 @@
-
-=head1 NAME
-
-Pod::Simple - framework for parsing Pod
-
-=head1 SYNOPSIS
-
- TODO
-
-=head1 DESCRIPTION
-
-Pod::Simple is a Perl library for parsing text in the Pod ("plain old
-documentation") markup language that is typically used for writing
-documentation for Perl and for Perl modules. The Pod format is explained
-in the L<perlpod|perlpod> man page; the most common formatter is called
-"perldoc".
-
-Pod formatters can use Pod::Simple to parse Pod documents into produce
-renderings of them in plain ASCII, in HTML, or in any number of other
-formats. Typically, such formatters will be subclasses of Pod::Simple,
-and so they will inherit its methods, like C<parse_file>.
-
-If you're reading this document just because you have a Pod-processing
-subclass that you want to use, this document (plus the documentation for
-the subclass) is probably all you'll need to read.
-
-If you're reading this document because you want to write a formatter
-subclass, continue reading this document, and then read
-L<Pod::Simple::Subclassing>, and then possibly even read L<perlpodspec>
-(some of which is for parser-writers, but much of which is notes to
-formatter-writers).
-
-
-=head1 MAIN METHODS
-
-
-
-=over
-
-=item C<< $parser = I<SomeClass>->new(); >>
-
-This returns a new parser object, where I<C<SomeClass>> is a subclass
-of Pod::Simple.
-
-=item C<< $parser->output_fh( *OUT ); >>
-
-This sets the filehandle that C<$parser>'s output will be written to.
-You can pass C<*STDOUT>, otherwise you should probably do something
-like this:
-
- my $outfile = "output.txt";
- open TXTOUT, ">$outfile" or die "Can't write to $outfile: $!";
- $parser->output_fh(*TXTOUT);
-
-...before you call one of the C<< $parser->parse_I<whatever> >> methods.
-
-=item C<< $parser->output_string( \$somestring ); >>
-
-This sets the string that C<$parser>'s output will be sent to,
-instead of any filehandle.
-
-
-=item C<< $parser->parse_file( I<$some_filename> ); >>
-
-=item C<< $parser->parse_file( *INPUT_FH ); >>
-
-This reads the Pod content of the file (or filehandle) that you specify,
-and processes it with that C<$parser> object, according to however
-C<$parser>'s class works, and according to whatever parser options you
-have set up for this C<$parser> object.
-
-=item C<< $parser->parse_string_document( I<$all_content> ); >>
-
-This works just like C<parse_file> except that it reads the Pod
-content not from a file, but from a string that you have already
-in memory.
-
-=item C<< $parser->parse_lines( I<... at lines...>, undef ); >>
-
-This processes the lines in C<@lines> (where each list item must be a
-defined value, and must contain exactly one line of content -- so no
-items like C<"foo\nbar"> are allowed). The final C<undef> is used to
-indicate the end of document being parsed.
-
-The other C<parser_I<whatever>> methods are meant to be called only once
-per C<$parser> object; but C<parse_lines> can be called as many times per
-C<$parser> object as you want, as long as the last call (and only
-the last call) ends with an C<undef> value.
-
-
-=item C<< $parser->content_seen >>
-
-This returns true only if there has been any real content seen
-for this document.
-
-
-=item C<< I<SomeClass>->filter( I<$filename> ); >>
-
-=item C<< I<SomeClass>->filter( I<*INPUT_FH> ); >>
-
-=item C<< I<SomeClass>->filter( I<\$document_content> ); >>
-
-This is a shortcut method for creating a new parser object, setting the
-output handle to STDOUT, and then processing the specified file (or
-filehandle, or in-memory document). This is handy for one-liners like
-this:
-
- perl -MPod::Simple::Text -e "Pod::Simple::Text->filter('thingy.pod')"
-
-=back
-
-
-
-=head1 SECONDARY METHODS
-
-Some of these methods might be of interest to general users, as
-well as of interest to formatter-writers.
-
-Note that the general pattern here is that the accessor-methods
-read the attribute's value with C<< $value = $parser->I<attribute> >>
-and set the attribute's value with
-C<< $parser->I<attribute>(I<newvalue>) >>. For each accessor, I typically
-only mention one syntax or another, based on which I think you are actually
-most likely to use.
-
-
-=over
-
-=item C<< $parser->no_whining( I<SOMEVALUE> ) >>
-
-If you set this attribute to a true value, you will suppress the
-parser's complaints about irregularities in the Pod coding. By default,
-this attribute's value is false, meaning that irregularities will
-be reported.
-
-Note that turning this attribute to true won't suppress one or two kinds
-of complaints about rarely occurring unrecoverable errors.
-
-
-=item C<< $parser->no_errata_section( I<SOMEVALUE> ) >>
-
-If you set this attribute to a true value, you will stop the parser from
-generating a "POD ERRORS" section at the end of the document. By
-default, this attribute's value is false, meaning that an errata section
-will be generated, as necessary.
-
-
-=item C<< $parser->complain_stderr( I<SOMEVALUE> ) >>
-
-If you set this attribute to a true value, it will send reports of
-parsing errors to STDERR. By default, this attribute's value is false,
-meaning that no output is sent to STDERR.
-
-Note that errors can be noted in an errata section, or sent to STDERR,
-or both, or neither. So don't think that turning on C<complain_stderr>
-will turn off C<no_errata_section> or vice versa -- these are
-independent attributes.
-
-
-=item C<< $parser->source_filename >>
-
-This returns the filename that this parser object was set to read from.
-
-
-=item C<< $parser->doc_has_started >>
-
-This returns true if C<$parser> has read from a source, and has seen
-Pod content in it.
-
-
-=item C<< $parser->source_dead >>
-
-This returns true if C<$parser> has read from a source, and come to the
-end of that source.
-
-=back
-
-
-=head1 CAVEATS
-
-This is just a beta release -- there are a good number of things still
-left to do. Notably, support for EBCDIC platforms is still half-done,
-an untested.
-
-
-=head1 SEE ALSO
-
-L<Pod::Simple::Subclassing>
-
-L<perlpod|perlpod>
-
-L<perlpodspec|perlpodspec>
-
-L<Pod::Escapes|Pod::Escapes>
-
-L<perldoc>
-
-
-=head1 COPYRIGHT AND DISCLAIMERS
-
-Copyright (c) 2002 Sean M. Burke. All rights reserved.
-
-This library is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-This program is distributed in the hope that it will be useful, but
-without any warranty; without even the implied warranty of
-merchantability or fitness for a particular purpose.
-
-=head1 AUTHOR
-
-Original author: Sean M. Burke C<sburke at cpan.org>
-
-Maintained by:
-
-=over
-
-=item * Allison Randal C<allison at perl.org>
-
-=item * Hans Dieter Pearcey C<hdp at cpan.org>
-
-=back
-
-=cut
-
-
Deleted: vendor/perl/dist/lib/Pod/Text.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Text.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Text.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,861 +0,0 @@
-# Pod::Text -- Convert POD data to formatted ASCII text.
-#
-# Copyright 1999, 2000, 2001, 2002, 2004, 2006, 2008
-# Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-#
-# This module converts POD to formatted text. It replaces the old Pod::Text
-# module that came with versions of Perl prior to 5.6.0 and attempts to match
-# its output except for some specific circumstances where other decisions
-# seemed to produce better output. It uses Pod::Parser and is designed to be
-# very easy to subclass.
-#
-# Perl core hackers, please note that this module is also separately
-# maintained outside of the Perl core as part of the podlators. Please send
-# me any patches at the address above in addition to sending them to the
-# standard Perl mailing lists.
-
-##############################################################################
-# Modules and declarations
-##############################################################################
-
-package Pod::Text;
-
-require 5.004;
-
-use strict;
-use vars qw(@ISA @EXPORT %ESCAPES $VERSION);
-
-use Carp qw(carp croak);
-use Exporter ();
-use Pod::Simple ();
-
- at ISA = qw(Pod::Simple Exporter);
-
-# We have to export pod2text for backward compatibility.
- at EXPORT = qw(pod2text);
-
-$VERSION = '3.13';
-
-##############################################################################
-# Initialization
-##############################################################################
-
-# This function handles code blocks. It's registered as a callback to
-# Pod::Simple and therefore doesn't work as a regular method call, but all it
-# does is call output_code with the line.
-sub handle_code {
- my ($line, $number, $parser) = @_;
- $parser->output_code ($line . "\n");
-}
-
-# Initialize the object and set various Pod::Simple options that we need.
-# Here, we also process any additional options passed to the constructor or
-# set up defaults if none were given. Note that all internal object keys are
-# in all-caps, reserving all lower-case object keys for Pod::Simple and user
-# arguments.
-sub new {
- my $class = shift;
- my $self = $class->SUPER::new;
-
- # Tell Pod::Simple to handle S<> by automatically inserting .
- $self->nbsp_for_S (1);
-
- # Tell Pod::Simple to keep whitespace whenever possible.
- if ($self->can ('preserve_whitespace')) {
- $self->preserve_whitespace (1);
- } else {
- $self->fullstop_space_harden (1);
- }
-
- # The =for and =begin targets that we accept.
- $self->accept_targets (qw/text TEXT/);
-
- # Ensure that contiguous blocks of code are merged together. Otherwise,
- # some of the guesswork heuristics don't work right.
- $self->merge_text (1);
-
- # Pod::Simple doesn't do anything useful with our arguments, but we want
- # to put them in our object as hash keys and values. This could cause
- # problems if we ever clash with Pod::Simple's own internal class
- # variables.
- my %opts = @_;
- my @opts = map { ("opt_$_", $opts{$_}) } keys %opts;
- %$self = (%$self, @opts);
-
- # Send errors to stderr if requested.
- if ($$self{opt_stderr}) {
- $self->no_errata_section (1);
- $self->complain_stderr (1);
- delete $$self{opt_stderr};
- }
-
- # Initialize various things from our parameters.
- $$self{opt_alt} = 0 unless defined $$self{opt_alt};
- $$self{opt_indent} = 4 unless defined $$self{opt_indent};
- $$self{opt_margin} = 0 unless defined $$self{opt_margin};
- $$self{opt_loose} = 0 unless defined $$self{opt_loose};
- $$self{opt_sentence} = 0 unless defined $$self{opt_sentence};
- $$self{opt_width} = 76 unless defined $$self{opt_width};
-
- # Figure out what quotes we'll be using for C<> text.
- $$self{opt_quotes} ||= '"';
- if ($$self{opt_quotes} eq 'none') {
- $$self{LQUOTE} = $$self{RQUOTE} = '';
- } elsif (length ($$self{opt_quotes}) == 1) {
- $$self{LQUOTE} = $$self{RQUOTE} = $$self{opt_quotes};
- } elsif ($$self{opt_quotes} =~ /^(.)(.)$/
- || $$self{opt_quotes} =~ /^(..)(..)$/) {
- $$self{LQUOTE} = $1;
- $$self{RQUOTE} = $2;
- } else {
- croak qq(Invalid quote specification "$$self{opt_quotes}");
- }
-
- # If requested, do something with the non-POD text.
- $self->code_handler (\&handle_code) if $$self{opt_code};
-
- # Return the created object.
- return $self;
-}
-
-##############################################################################
-# Core parsing
-##############################################################################
-
-# This is the glue that connects the code below with Pod::Simple itself. The
-# goal is to convert the event stream coming from the POD parser into method
-# calls to handlers once the complete content of a tag has been seen. Each
-# paragraph or POD command will have textual content associated with it, and
-# as soon as all of a paragraph or POD command has been seen, that content
-# will be passed in to the corresponding method for handling that type of
-# object. The exceptions are handlers for lists, which have opening tag
-# handlers and closing tag handlers that will be called right away.
-#
-# The internal hash key PENDING is used to store the contents of a tag until
-# all of it has been seen. It holds a stack of open tags, each one
-# represented by a tuple of the attributes hash for the tag and the contents
-# of the tag.
-
-# Add a block of text to the contents of the current node, formatting it
-# according to the current formatting instructions as we do.
-sub _handle_text {
- my ($self, $text) = @_;
- my $tag = $$self{PENDING}[-1];
- $$tag[1] .= $text;
-}
-
-# Given an element name, get the corresponding method name.
-sub method_for_element {
- my ($self, $element) = @_;
- $element =~ tr/-/_/;
- $element =~ tr/A-Z/a-z/;
- $element =~ tr/_a-z0-9//cd;
- return $element;
-}
-
-# Handle the start of a new element. If cmd_element is defined, assume that
-# we need to collect the entire tree for this element before passing it to the
-# element method, and create a new tree into which we'll collect blocks of
-# text and nested elements. Otherwise, if start_element is defined, call it.
-sub _handle_element_start {
- my ($self, $element, $attrs) = @_;
- my $method = $self->method_for_element ($element);
-
- # If we have a command handler, we need to accumulate the contents of the
- # tag before calling it.
- if ($self->can ("cmd_$method")) {
- push (@{ $$self{PENDING} }, [ $attrs, '' ]);
- } elsif ($self->can ("start_$method")) {
- my $method = 'start_' . $method;
- $self->$method ($attrs, '');
- }
-}
-
-# Handle the end of an element. If we had a cmd_ method for this element,
-# this is where we pass along the text that we've accumulated. Otherwise, if
-# we have an end_ method for the element, call that.
-sub _handle_element_end {
- my ($self, $element) = @_;
- my $method = $self->method_for_element ($element);
-
- # If we have a command handler, pull off the pending text and pass it to
- # the handler along with the saved attribute hash.
- if ($self->can ("cmd_$method")) {
- my $tag = pop @{ $$self{PENDING} };
- my $method = 'cmd_' . $method;
- my $text = $self->$method (@$tag);
- if (defined $text) {
- if (@{ $$self{PENDING} } > 1) {
- $$self{PENDING}[-1][1] .= $text;
- } else {
- $self->output ($text);
- }
- }
- } elsif ($self->can ("end_$method")) {
- my $method = 'end_' . $method;
- $self->$method ();
- }
-}
-
-##############################################################################
-# Output formatting
-##############################################################################
-
-# Wrap a line, indenting by the current left margin. We can't use Text::Wrap
-# because it plays games with tabs. We can't use formline, even though we'd
-# really like to, because it screws up non-printing characters. So we have to
-# do the wrapping ourselves.
-sub wrap {
- my $self = shift;
- local $_ = shift;
- my $output = '';
- my $spaces = ' ' x $$self{MARGIN};
- my $width = $$self{opt_width} - $$self{MARGIN};
- while (length > $width) {
- if (s/^([^\n]{0,$width})\s+// || s/^([^\n]{$width})//) {
- $output .= $spaces . $1 . "\n";
- } else {
- last;
- }
- }
- $output .= $spaces . $_;
- $output =~ s/\s+$/\n\n/;
- return $output;
-}
-
-# Reformat a paragraph of text for the current margin. Takes the text to
-# reformat and returns the formatted text.
-sub reformat {
- my $self = shift;
- local $_ = shift;
-
- # If we're trying to preserve two spaces after sentences, do some munging
- # to support that. Otherwise, smash all repeated whitespace.
- if ($$self{opt_sentence}) {
- s/ +$//mg;
- s/\.\n/. \n/g;
- s/\n/ /g;
- s/ +/ /g;
- } else {
- s/\s+/ /g;
- }
- return $self->wrap ($_);
-}
-
-# Output text to the output device. Replace non-breaking spaces with spaces
-# and soft hyphens with nothing, and then try to fix the output encoding if
-# necessary to match the input encoding unless UTF-8 output is forced. This
-# preserves the traditional pass-through behavior of Pod::Text.
-sub output {
- my ($self, $text) = @_;
- $text =~ tr/\240\255/ /d;
- unless ($$self{opt_utf8} || $$self{CHECKED_ENCODING}) {
- my $encoding = $$self{encoding} || '';
- if ($encoding) {
- eval { binmode ($$self{output_fh}, ":encoding($encoding)") };
- }
- $$self{CHECKED_ENCODING} = 1;
- }
- print { $$self{output_fh} } $text;
-}
-
-# Output a block of code (something that isn't part of the POD text). Called
-# by preprocess_paragraph only if we were given the code option. Exists here
-# only so that it can be overridden by subclasses.
-sub output_code { $_[0]->output ($_[1]) }
-
-##############################################################################
-# Document initialization
-##############################################################################
-
-# Set up various things that have to be initialized on a per-document basis.
-sub start_document {
- my $self = shift;
- my $margin = $$self{opt_indent} + $$self{opt_margin};
-
- # Initialize a few per-document variables.
- $$self{INDENTS} = []; # Stack of indentations.
- $$self{MARGIN} = $margin; # Default left margin.
- $$self{PENDING} = [[]]; # Pending output.
-
- # We have to redo encoding handling for each document.
- delete $$self{CHECKED_ENCODING};
-
- # If we were given the utf8 option, set an output encoding on our file
- # handle. Wrap in an eval in case we're using a version of Perl too old
- # to understand this.
- #
- # This is evil because it changes the global state of a file handle that
- # we may not own. However, we can't just blindly encode all output, since
- # there may be a pre-applied output encoding (such as from PERL_UNICODE)
- # and then we would double-encode. This seems to be the least bad
- # approach.
- if ($$self{opt_utf8}) {
- eval { binmode ($$self{output_fh}, ':encoding(UTF-8)') };
- }
-
- return '';
-}
-
-##############################################################################
-# Text blocks
-##############################################################################
-
-# This method is called whenever an =item command is complete (in other words,
-# we've seen its associated paragraph or know for certain that it doesn't have
-# one). It gets the paragraph associated with the item as an argument. If
-# that argument is empty, just output the item tag; if it contains a newline,
-# output the item tag followed by the newline. Otherwise, see if there's
-# enough room for us to output the item tag in the margin of the text or if we
-# have to put it on a separate line.
-sub item {
- my ($self, $text) = @_;
- my $tag = $$self{ITEM};
- unless (defined $tag) {
- carp "Item called without tag";
- return;
- }
- undef $$self{ITEM};
-
- # Calculate the indentation and margin. $fits is set to true if the tag
- # will fit into the margin of the paragraph given our indentation level.
- my $indent = $$self{INDENTS}[-1];
- $indent = $$self{opt_indent} unless defined $indent;
- my $margin = ' ' x $$self{opt_margin};
- my $fits = ($$self{MARGIN} - $indent >= length ($tag) + 1);
-
- # If the tag doesn't fit, or if we have no associated text, print out the
- # tag separately. Otherwise, put the tag in the margin of the paragraph.
- if (!$text || $text =~ /^\s+$/ || !$fits) {
- my $realindent = $$self{MARGIN};
- $$self{MARGIN} = $indent;
- my $output = $self->reformat ($tag);
- $output =~ s/^$margin /$margin:/ if ($$self{opt_alt} && $indent > 0);
- $output =~ s/\n*$/\n/;
-
- # If the text is just whitespace, we have an empty item paragraph;
- # this can result from =over/=item/=back without any intermixed
- # paragraphs. Insert some whitespace to keep the =item from merging
- # into the next paragraph.
- $output .= "\n" if $text && $text =~ /^\s*$/;
-
- $self->output ($output);
- $$self{MARGIN} = $realindent;
- $self->output ($self->reformat ($text)) if ($text && $text =~ /\S/);
- } else {
- my $space = ' ' x $indent;
- $space =~ s/^$margin /$margin:/ if $$self{opt_alt};
- $text = $self->reformat ($text);
- $text =~ s/^$margin /$margin:/ if ($$self{opt_alt} && $indent > 0);
- my $tagspace = ' ' x length $tag;
- $text =~ s/^($space)$tagspace/$1$tag/ or warn "Bizarre space in item";
- $self->output ($text);
- }
-}
-
-# Handle a basic block of text. The only tricky thing here is that if there
-# is a pending item tag, we need to format this as an item paragraph.
-sub cmd_para {
- my ($self, $attrs, $text) = @_;
- $text =~ s/\s+$/\n/;
- if (defined $$self{ITEM}) {
- $self->item ($text . "\n");
- } else {
- $self->output ($self->reformat ($text . "\n"));
- }
- return '';
-}
-
-# Handle a verbatim paragraph. Just print it out, but indent it according to
-# our margin.
-sub cmd_verbatim {
- my ($self, $attrs, $text) = @_;
- $self->item if defined $$self{ITEM};
- return if $text =~ /^\s*$/;
- $text =~ s/^(\n*)([ \t]*\S+)/$1 . (' ' x $$self{MARGIN}) . $2/gme;
- $text =~ s/\s*$/\n\n/;
- $self->output ($text);
- return '';
-}
-
-# Handle literal text (produced by =for and similar constructs). Just output
-# it with the minimum of changes.
-sub cmd_data {
- my ($self, $attrs, $text) = @_;
- $text =~ s/^\n+//;
- $text =~ s/\n{0,2}$/\n/;
- $self->output ($text);
- return '';
-}
-
-##############################################################################
-# Headings
-##############################################################################
-
-# The common code for handling all headers. Takes the header text, the
-# indentation, and the surrounding marker for the alt formatting method.
-sub heading {
- my ($self, $text, $indent, $marker) = @_;
- $self->item ("\n\n") if defined $$self{ITEM};
- $text =~ s/\s+$//;
- if ($$self{opt_alt}) {
- my $closemark = reverse (split (//, $marker));
- my $margin = ' ' x $$self{opt_margin};
- $self->output ("\n" . "$margin$marker $text $closemark" . "\n\n");
- } else {
- $text .= "\n" if $$self{opt_loose};
- my $margin = ' ' x ($$self{opt_margin} + $indent);
- $self->output ($margin . $text . "\n");
- }
- return '';
-}
-
-# First level heading.
-sub cmd_head1 {
- my ($self, $attrs, $text) = @_;
- $self->heading ($text, 0, '====');
-}
-
-# Second level heading.
-sub cmd_head2 {
- my ($self, $attrs, $text) = @_;
- $self->heading ($text, $$self{opt_indent} / 2, '== ');
-}
-
-# Third level heading.
-sub cmd_head3 {
- my ($self, $attrs, $text) = @_;
- $self->heading ($text, $$self{opt_indent} * 2 / 3 + 0.5, '= ');
-}
-
-# Fourth level heading.
-sub cmd_head4 {
- my ($self, $attrs, $text) = @_;
- $self->heading ($text, $$self{opt_indent} * 3 / 4 + 0.5, '- ');
-}
-
-##############################################################################
-# List handling
-##############################################################################
-
-# Handle the beginning of an =over block. Takes the type of the block as the
-# first argument, and then the attr hash. This is called by the handlers for
-# the four different types of lists (bullet, number, text, and block).
-sub over_common_start {
- my ($self, $attrs) = @_;
- $self->item ("\n\n") if defined $$self{ITEM};
-
- # Find the indentation level.
- my $indent = $$attrs{indent};
- unless (defined ($indent) && $indent =~ /^\s*[-+]?\d{1,4}\s*$/) {
- $indent = $$self{opt_indent};
- }
-
- # Add this to our stack of indents and increase our current margin.
- push (@{ $$self{INDENTS} }, $$self{MARGIN});
- $$self{MARGIN} += ($indent + 0);
- return '';
-}
-
-# End an =over block. Takes no options other than the class pointer. Output
-# any pending items and then pop one level of indentation.
-sub over_common_end {
- my ($self) = @_;
- $self->item ("\n\n") if defined $$self{ITEM};
- $$self{MARGIN} = pop @{ $$self{INDENTS} };
- return '';
-}
-
-# Dispatch the start and end calls as appropriate.
-sub start_over_bullet { $_[0]->over_common_start ($_[1]) }
-sub start_over_number { $_[0]->over_common_start ($_[1]) }
-sub start_over_text { $_[0]->over_common_start ($_[1]) }
-sub start_over_block { $_[0]->over_common_start ($_[1]) }
-sub end_over_bullet { $_[0]->over_common_end }
-sub end_over_number { $_[0]->over_common_end }
-sub end_over_text { $_[0]->over_common_end }
-sub end_over_block { $_[0]->over_common_end }
-
-# The common handler for all item commands. Takes the type of the item, the
-# attributes, and then the text of the item.
-sub item_common {
- my ($self, $type, $attrs, $text) = @_;
- $self->item if defined $$self{ITEM};
-
- # Clean up the text. We want to end up with two variables, one ($text)
- # which contains any body text after taking out the item portion, and
- # another ($item) which contains the actual item text. Note the use of
- # the internal Pod::Simple attribute here; that's a potential land mine.
- $text =~ s/\s+$//;
- my ($item, $index);
- if ($type eq 'bullet') {
- $item = '*';
- } elsif ($type eq 'number') {
- $item = $$attrs{'~orig_content'};
- } else {
- $item = $text;
- $item =~ s/\s*\n\s*/ /g;
- $text = '';
- }
- $$self{ITEM} = $item;
-
- # If body text for this item was included, go ahead and output that now.
- if ($text) {
- $text =~ s/\s*$/\n/;
- $self->item ($text);
- }
- return '';
-}
-
-# Dispatch the item commands to the appropriate place.
-sub cmd_item_bullet { my $self = shift; $self->item_common ('bullet', @_) }
-sub cmd_item_number { my $self = shift; $self->item_common ('number', @_) }
-sub cmd_item_text { my $self = shift; $self->item_common ('text', @_) }
-sub cmd_item_block { my $self = shift; $self->item_common ('block', @_) }
-
-##############################################################################
-# Formatting codes
-##############################################################################
-
-# The simple ones.
-sub cmd_b { return $_[0]{alt} ? "``$_[2]''" : $_[2] }
-sub cmd_f { return $_[0]{alt} ? "\"$_[2]\"" : $_[2] }
-sub cmd_i { return '*' . $_[2] . '*' }
-sub cmd_x { return '' }
-
-# Apply a whole bunch of messy heuristics to not quote things that don't
-# benefit from being quoted. These originally come from Barrie Slaymaker and
-# largely duplicate code in Pod::Man.
-sub cmd_c {
- my ($self, $attrs, $text) = @_;
-
- # A regex that matches the portion of a variable reference that's the
- # array or hash index, separated out just because we want to use it in
- # several places in the following regex.
- my $index = '(?: \[.*\] | \{.*\} )?';
-
- # Check for things that we don't want to quote, and if we find any of
- # them, return the string with just a font change and no quoting.
- $text =~ m{
- ^\s*
- (?:
- ( [\'\`\"] ) .* \1 # already quoted
- | \` .* \' # `quoted'
- | \$+ [\#^]? \S $index # special ($^Foo, $")
- | [\$\@%&*]+ \#? [:\'\w]+ $index # plain var or func
- | [\$\@%&*]* [:\'\w]+ (?: -> )? \(\s*[^\s,]\s*\) # 0/1-arg func call
- | [+-]? ( \d[\d.]* | \.\d+ ) (?: [eE][+-]?\d+ )? # a number
- | 0x [a-fA-F\d]+ # a hex constant
- )
- \s*\z
- }xo && return $text;
-
- # If we didn't return, go ahead and quote the text.
- return $$self{opt_alt}
- ? "``$text''"
- : "$$self{LQUOTE}$text$$self{RQUOTE}";
-}
-
-# Links reduce to the text that we're given, wrapped in angle brackets if it's
-# a URL.
-sub cmd_l {
- my ($self, $attrs, $text) = @_;
- return $$attrs{type} eq 'url' ? "<$text>" : $text;
-}
-
-##############################################################################
-# Backwards compatibility
-##############################################################################
-
-# The old Pod::Text module did everything in a pod2text() function. This
-# tries to provide the same interface for legacy applications.
-sub pod2text {
- my @args;
-
- # This is really ugly; I hate doing option parsing in the middle of a
- # module. But the old Pod::Text module supported passing flags to its
- # entry function, so handle -a and -<number>.
- while ($_[0] =~ /^-/) {
- my $flag = shift;
- if ($flag eq '-a') { push (@args, alt => 1) }
- elsif ($flag =~ /^-(\d+)$/) { push (@args, width => $1) }
- else {
- unshift (@_, $flag);
- last;
- }
- }
-
- # Now that we know what arguments we're using, create the parser.
- my $parser = Pod::Text->new (@args);
-
- # If two arguments were given, the second argument is going to be a file
- # handle. That means we want to call parse_from_filehandle(), which means
- # we need to turn the first argument into a file handle. Magic open will
- # handle the <&STDIN case automagically.
- if (defined $_[1]) {
- my @fhs = @_;
- local *IN;
- unless (open (IN, $fhs[0])) {
- croak ("Can't open $fhs[0] for reading: $!\n");
- return;
- }
- $fhs[0] = \*IN;
- $parser->output_fh ($fhs[1]);
- my $retval = $parser->parse_file ($fhs[0]);
- my $fh = $parser->output_fh ();
- close $fh;
- return $retval;
- } else {
- $parser->output_fh (\*STDOUT);
- return $parser->parse_file (@_);
- }
-}
-
-# Reset the underlying Pod::Simple object between calls to parse_from_file so
-# that the same object can be reused to convert multiple pages.
-sub parse_from_file {
- my $self = shift;
- $self->reinit;
-
- # Fake the old cutting option to Pod::Parser. This fiddings with internal
- # Pod::Simple state and is quite ugly; we need a better approach.
- if (ref ($_[0]) eq 'HASH') {
- my $opts = shift @_;
- if (defined ($$opts{-cutting}) && !$$opts{-cutting}) {
- $$self{in_pod} = 1;
- $$self{last_was_blank} = 1;
- }
- }
-
- # Do the work.
- my $retval = $self->Pod::Simple::parse_from_file (@_);
-
- # Flush output, since Pod::Simple doesn't do this. Ideally we should also
- # close the file descriptor if we had to open one, but we can't easily
- # figure this out.
- my $fh = $self->output_fh ();
- my $oldfh = select $fh;
- my $oldflush = $|;
- $| = 1;
- print $fh '';
- $| = $oldflush;
- select $oldfh;
- return $retval;
-}
-
-# Pod::Simple failed to provide this backward compatibility function, so
-# implement it ourselves. File handles are one of the inputs that
-# parse_from_file supports.
-sub parse_from_filehandle {
- my $self = shift;
- $self->parse_from_file (@_);
-}
-
-##############################################################################
-# Module return value and documentation
-##############################################################################
-
-1;
-__END__
-
-=head1 NAME
-
-Pod::Text - Convert POD data to formatted ASCII text
-
-=for stopwords
-alt stderr Allbery Sean Burke's Christiansen UTF-8 pre-Unicode utf8
-
-=head1 SYNOPSIS
-
- use Pod::Text;
- my $parser = Pod::Text->new (sentence => 0, width => 78);
-
- # Read POD from STDIN and write to STDOUT.
- $parser->parse_from_filehandle;
-
- # Read POD from file.pod and write to file.txt.
- $parser->parse_from_file ('file.pod', 'file.txt');
-
-=head1 DESCRIPTION
-
-Pod::Text is a module that can convert documentation in the POD format (the
-preferred language for documenting Perl) into formatted ASCII. It uses no
-special formatting controls or codes whatsoever, and its output is therefore
-suitable for nearly any device.
-
-As a derived class from Pod::Simple, Pod::Text supports the same methods and
-interfaces. See L<Pod::Simple> for all the details; briefly, one creates a
-new parser with C<< Pod::Text->new() >> and then normally calls parse_file().
-
-new() can take options, in the form of key/value pairs, that control the
-behavior of the parser. The currently recognized options are:
-
-=over 4
-
-=item alt
-
-If set to a true value, selects an alternate output format that, among other
-things, uses a different heading style and marks C<=item> entries with a
-colon in the left margin. Defaults to false.
-
-=item code
-
-If set to a true value, the non-POD parts of the input file will be included
-in the output. Useful for viewing code documented with POD blocks with the
-POD rendered and the code left intact.
-
-=item indent
-
-The number of spaces to indent regular text, and the default indentation for
-C<=over> blocks. Defaults to 4.
-
-=item loose
-
-If set to a true value, a blank line is printed after a C<=head1> heading.
-If set to false (the default), no blank line is printed after C<=head1>,
-although one is still printed after C<=head2>. This is the default because
-it's the expected formatting for manual pages; if you're formatting
-arbitrary text documents, setting this to true may result in more pleasing
-output.
-
-=item margin
-
-The width of the left margin in spaces. Defaults to 0. This is the margin
-for all text, including headings, not the amount by which regular text is
-indented; for the latter, see the I<indent> option. To set the right
-margin, see the I<width> option.
-
-=item quotes
-
-Sets the quote marks used to surround CE<lt>> text. If the value is a
-single character, it is used as both the left and right quote; if it is two
-characters, the first character is used as the left quote and the second as
-the right quoted; and if it is four characters, the first two are used as
-the left quote and the second two as the right quote.
-
-This may also be set to the special value C<none>, in which case no quote
-marks are added around CE<lt>> text.
-
-=item sentence
-
-If set to a true value, Pod::Text will assume that each sentence ends in two
-spaces, and will try to preserve that spacing. If set to false, all
-consecutive whitespace in non-verbatim paragraphs is compressed into a
-single space. Defaults to true.
-
-=item stderr
-
-Send error messages about invalid POD to standard error instead of
-appending a POD ERRORS section to the generated output.
-
-=item utf8
-
-By default, Pod::Text uses the same output encoding as the input encoding
-of the POD source (provided that Perl was built with PerlIO; otherwise, it
-doesn't encode its output). If this option is given, the output encoding
-is forced to UTF-8.
-
-Be aware that, when using this option, the input encoding of your POD
-source must be properly declared unless it is US-ASCII or Latin-1. POD
-input without an C<=encoding> command will be assumed to be in Latin-1,
-and if it's actually in UTF-8, the output will be double-encoded. See
-L<perlpod(1)> for more information on the C<=encoding> command.
-
-=item width
-
-The column at which to wrap text on the right-hand side. Defaults to 76.
-
-=back
-
-The standard Pod::Simple method parse_file() takes one argument, the file or
-file handle to read from, and writes output to standard output unless that
-has been changed with the output_fh() method. See L<Pod::Simple> for the
-specific details and for other alternative interfaces.
-
-=head1 DIAGNOSTICS
-
-=over 4
-
-=item Bizarre space in item
-
-=item Item called without tag
-
-(W) Something has gone wrong in internal C<=item> processing. These
-messages indicate a bug in Pod::Text; you should never see them.
-
-=item Can't open %s for reading: %s
-
-(F) Pod::Text was invoked via the compatibility mode pod2text() interface
-and the input file it was given could not be opened.
-
-=item Invalid quote specification "%s"
-
-(F) The quote specification given (the quotes option to the constructor) was
-invalid. A quote specification must be one, two, or four characters long.
-
-=back
-
-=head1 BUGS
-
-Encoding handling assumes that PerlIO is available and does not work
-properly if it isn't. The C<utf8> option is therefore not supported
-unless Perl is built with PerlIO support.
-
-=head1 CAVEATS
-
-If Pod::Text is given the C<utf8> option, the encoding of its output file
-handle will be forced to UTF-8 if possible, overriding any existing
-encoding. This will be done even if the file handle is not created by
-Pod::Text and was passed in from outside. This maintains consistency
-regardless of PERL_UNICODE and other settings.
-
-If the C<utf8> option is not given, the encoding of its output file handle
-will be forced to the detected encoding of the input POD, which preserves
-whatever the input text is. This ensures backward compatibility with
-earlier, pre-Unicode versions of this module, without large numbers of
-Perl warnings.
-
-This is not ideal, but it seems to be the best compromise. If it doesn't
-work for you, please let me know the details of how it broke.
-
-=head1 NOTES
-
-This is a replacement for an earlier Pod::Text module written by Tom
-Christiansen. It has a revamped interface, since it now uses Pod::Simple,
-but an interface roughly compatible with the old Pod::Text::pod2text()
-function is still available. Please change to the new calling convention,
-though.
-
-The original Pod::Text contained code to do formatting via termcap
-sequences, although it wasn't turned on by default and it was problematic to
-get it to work at all. This rewrite doesn't even try to do that, but a
-subclass of it does. Look for L<Pod::Text::Termcap>.
-
-=head1 SEE ALSO
-
-L<Pod::Simple>, L<Pod::Text::Termcap>, L<perlpod(1)>, L<pod2text(1)>
-
-The current version of this module is always available from its web site at
-L<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
-Perl core distribution as of 5.6.0.
-
-=head1 AUTHOR
-
-Russ Allbery <rra at stanford.edu>, based I<very> heavily on the original
-Pod::Text by Tom Christiansen <tchrist at mox.perl.com> and its conversion to
-Pod::Parser by Brad Appleton <bradapp at enteract.com>. Sean Burke's initial
-conversion of Pod::Man to use Pod::Simple provided much-needed guidance on
-how to use Pod::Simple.
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 1999, 2000, 2001, 2002, 2004, 2006, 2008 Russ Allbery
-<rra at stanford.edu>.
-
-This program is free software; you may redistribute it and/or modify it
-under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/Pod/Usage.pm
===================================================================
--- vendor/perl/dist/lib/Pod/Usage.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/Usage.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,730 +0,0 @@
-#############################################################################
-# Pod/Usage.pm -- print usage messages for the running script.
-#
-# Copyright (C) 1996-2000 by Bradford Appleton. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-package Pod::Usage;
-use strict;
-
-use vars qw($VERSION @ISA @EXPORT);
-$VERSION = '1.36'; ## Current version of this package
-require 5.005; ## requires this Perl version or later
-
-=head1 NAME
-
-Pod::Usage, pod2usage() - print a usage message from embedded pod documentation
-
-=head1 SYNOPSIS
-
- use Pod::Usage
-
- my $message_text = "This text precedes the usage message.";
- my $exit_status = 2; ## The exit status to use
- my $verbose_level = 0; ## The verbose level to use
- my $filehandle = \*STDERR; ## The filehandle to write to
-
- pod2usage($message_text);
-
- pod2usage($exit_status);
-
- pod2usage( { -message => $message_text ,
- -exitval => $exit_status ,
- -verbose => $verbose_level,
- -output => $filehandle } );
-
- pod2usage( -msg => $message_text ,
- -exitval => $exit_status ,
- -verbose => $verbose_level,
- -output => $filehandle );
-
- pod2usage( -verbose => 2,
- -noperldoc => 1 )
-
-=head1 ARGUMENTS
-
-B<pod2usage> should be given either a single argument, or a list of
-arguments corresponding to an associative array (a "hash"). When a single
-argument is given, it should correspond to exactly one of the following:
-
-=over 4
-
-=item *
-
-A string containing the text of a message to print I<before> printing
-the usage message
-
-=item *
-
-A numeric value corresponding to the desired exit status
-
-=item *
-
-A reference to a hash
-
-=back
-
-If more than one argument is given then the entire argument list is
-assumed to be a hash. If a hash is supplied (either as a reference or
-as a list) it should contain one or more elements with the following
-keys:
-
-=over 4
-
-=item C<-message>
-
-=item C<-msg>
-
-The text of a message to print immediately prior to printing the
-program's usage message.
-
-=item C<-exitval>
-
-The desired exit status to pass to the B<exit()> function.
-This should be an integer, or else the string "NOEXIT" to
-indicate that control should simply be returned without
-terminating the invoking process.
-
-=item C<-verbose>
-
-The desired level of "verboseness" to use when printing the usage
-message. If the corresponding value is 0, then only the "SYNOPSIS"
-section of the pod documentation is printed. If the corresponding value
-is 1, then the "SYNOPSIS" section, along with any section entitled
-"OPTIONS", "ARGUMENTS", or "OPTIONS AND ARGUMENTS" is printed. If the
-corresponding value is 2 or more then the entire manpage is printed.
-
-The special verbosity level 99 requires to also specify the -sections
-parameter; then these sections are extracted (see L<Pod::Select>)
-and printed.
-
-=item C<-sections>
-
-A string representing a selection list for sections to be printed
-when -verbose is set to 99, e.g. C<"NAME|SYNOPSIS|DESCRIPTION|VERSION">.
-
-Alternatively, an array reference of section specifications can be used:
-
- pod2usage(-verbose => 99,
- -sections => [ qw(fred fred/subsection) ] );
-
-=item C<-output>
-
-A reference to a filehandle, or the pathname of a file to which the
-usage message should be written. The default is C<\*STDERR> unless the
-exit value is less than 2 (in which case the default is C<\*STDOUT>).
-
-=item C<-input>
-
-A reference to a filehandle, or the pathname of a file from which the
-invoking script's pod documentation should be read. It defaults to the
-file indicated by C<$0> (C<$PROGRAM_NAME> for users of F<English.pm>).
-
-If you are calling B<pod2usage()> from a module and want to display
-that module's POD, you can use this:
-
- use Pod::Find qw(pod_where);
- pod2usage( -input => pod_where({-inc => 1}, __PACKAGE__) );
-
-=item C<-pathlist>
-
-A list of directory paths. If the input file does not exist, then it
-will be searched for in the given directory list (in the order the
-directories appear in the list). It defaults to the list of directories
-implied by C<$ENV{PATH}>. The list may be specified either by a reference
-to an array, or by a string of directory paths which use the same path
-separator as C<$ENV{PATH}> on your system (e.g., C<:> for Unix, C<;> for
-MSWin32 and DOS).
-
-=item C<-noperldoc>
-
-By default, Pod::Usage will call L<perldoc> when -verbose >= 2 is
-specified. This does not work well e.g. if the script was packed
-with L<PAR>. The -noperldoc option suppresses the external call to
-L<perldoc> and uses the simple text formatter (L<Pod::Text>) to
-output the POD.
-
-=back
-
-=head1 DESCRIPTION
-
-B<pod2usage> will print a usage message for the invoking script (using
-its embedded pod documentation) and then exit the script with the
-desired exit status. The usage message printed may have any one of three
-levels of "verboseness": If the verbose level is 0, then only a synopsis
-is printed. If the verbose level is 1, then the synopsis is printed
-along with a description (if present) of the command line options and
-arguments. If the verbose level is 2, then the entire manual page is
-printed.
-
-Unless they are explicitly specified, the default values for the exit
-status, verbose level, and output stream to use are determined as
-follows:
-
-=over 4
-
-=item *
-
-If neither the exit status nor the verbose level is specified, then the
-default is to use an exit status of 2 with a verbose level of 0.
-
-=item *
-
-If an exit status I<is> specified but the verbose level is I<not>, then the
-verbose level will default to 1 if the exit status is less than 2 and
-will default to 0 otherwise.
-
-=item *
-
-If an exit status is I<not> specified but verbose level I<is> given, then
-the exit status will default to 2 if the verbose level is 0 and will
-default to 1 otherwise.
-
-=item *
-
-If the exit status used is less than 2, then output is printed on
-C<STDOUT>. Otherwise output is printed on C<STDERR>.
-
-=back
-
-Although the above may seem a bit confusing at first, it generally does
-"the right thing" in most situations. This determination of the default
-values to use is based upon the following typical Unix conventions:
-
-=over 4
-
-=item *
-
-An exit status of 0 implies "success". For example, B<diff(1)> exits
-with a status of 0 if the two files have the same contents.
-
-=item *
-
-An exit status of 1 implies possibly abnormal, but non-defective, program
-termination. For example, B<grep(1)> exits with a status of 1 if
-it did I<not> find a matching line for the given regular expression.
-
-=item *
-
-An exit status of 2 or more implies a fatal error. For example, B<ls(1)>
-exits with a status of 2 if you specify an illegal (unknown) option on
-the command line.
-
-=item *
-
-Usage messages issued as a result of bad command-line syntax should go
-to C<STDERR>. However, usage messages issued due to an explicit request
-to print usage (like specifying B<-help> on the command line) should go
-to C<STDOUT>, just in case the user wants to pipe the output to a pager
-(such as B<more(1)>).
-
-=item *
-
-If program usage has been explicitly requested by the user, it is often
-desirable to exit with a status of 1 (as opposed to 0) after issuing
-the user-requested usage message. It is also desirable to give a
-more verbose description of program usage in this case.
-
-=back
-
-B<pod2usage> doesn't force the above conventions upon you, but it will
-use them by default if you don't expressly tell it to do otherwise. The
-ability of B<pod2usage()> to accept a single number or a string makes it
-convenient to use as an innocent looking error message handling function:
-
- use Pod::Usage;
- use Getopt::Long;
-
- ## Parse options
- GetOptions("help", "man", "flag1") || pod2usage(2);
- pod2usage(1) if ($opt_help);
- pod2usage(-verbose => 2) if ($opt_man);
-
- ## Check for too many filenames
- pod2usage("$0: Too many files given.\n") if (@ARGV > 1);
-
-Some user's however may feel that the above "economy of expression" is
-not particularly readable nor consistent and may instead choose to do
-something more like the following:
-
- use Pod::Usage;
- use Getopt::Long;
-
- ## Parse options
- GetOptions("help", "man", "flag1") || pod2usage(-verbose => 0);
- pod2usage(-verbose => 1) if ($opt_help);
- pod2usage(-verbose => 2) if ($opt_man);
-
- ## Check for too many filenames
- pod2usage(-verbose => 2, -message => "$0: Too many files given.\n")
- if (@ARGV > 1);
-
-As with all things in Perl, I<there's more than one way to do it>, and
-B<pod2usage()> adheres to this philosophy. If you are interested in
-seeing a number of different ways to invoke B<pod2usage> (although by no
-means exhaustive), please refer to L<"EXAMPLES">.
-
-=head1 EXAMPLES
-
-Each of the following invocations of C<pod2usage()> will print just the
-"SYNOPSIS" section to C<STDERR> and will exit with a status of 2:
-
- pod2usage();
-
- pod2usage(2);
-
- pod2usage(-verbose => 0);
-
- pod2usage(-exitval => 2);
-
- pod2usage({-exitval => 2, -output => \*STDERR});
-
- pod2usage({-verbose => 0, -output => \*STDERR});
-
- pod2usage(-exitval => 2, -verbose => 0);
-
- pod2usage(-exitval => 2, -verbose => 0, -output => \*STDERR);
-
-Each of the following invocations of C<pod2usage()> will print a message
-of "Syntax error." (followed by a newline) to C<STDERR>, immediately
-followed by just the "SYNOPSIS" section (also printed to C<STDERR>) and
-will exit with a status of 2:
-
- pod2usage("Syntax error.");
-
- pod2usage(-message => "Syntax error.", -verbose => 0);
-
- pod2usage(-msg => "Syntax error.", -exitval => 2);
-
- pod2usage({-msg => "Syntax error.", -exitval => 2, -output => \*STDERR});
-
- pod2usage({-msg => "Syntax error.", -verbose => 0, -output => \*STDERR});
-
- pod2usage(-msg => "Syntax error.", -exitval => 2, -verbose => 0);
-
- pod2usage(-message => "Syntax error.",
- -exitval => 2,
- -verbose => 0,
- -output => \*STDERR);
-
-Each of the following invocations of C<pod2usage()> will print the
-"SYNOPSIS" section and any "OPTIONS" and/or "ARGUMENTS" sections to
-C<STDOUT> and will exit with a status of 1:
-
- pod2usage(1);
-
- pod2usage(-verbose => 1);
-
- pod2usage(-exitval => 1);
-
- pod2usage({-exitval => 1, -output => \*STDOUT});
-
- pod2usage({-verbose => 1, -output => \*STDOUT});
-
- pod2usage(-exitval => 1, -verbose => 1);
-
- pod2usage(-exitval => 1, -verbose => 1, -output => \*STDOUT});
-
-Each of the following invocations of C<pod2usage()> will print the
-entire manual page to C<STDOUT> and will exit with a status of 1:
-
- pod2usage(-verbose => 2);
-
- pod2usage({-verbose => 2, -output => \*STDOUT});
-
- pod2usage(-exitval => 1, -verbose => 2);
-
- pod2usage({-exitval => 1, -verbose => 2, -output => \*STDOUT});
-
-=head2 Recommended Use
-
-Most scripts should print some type of usage message to C<STDERR> when a
-command line syntax error is detected. They should also provide an
-option (usually C<-H> or C<-help>) to print a (possibly more verbose)
-usage message to C<STDOUT>. Some scripts may even wish to go so far as to
-provide a means of printing their complete documentation to C<STDOUT>
-(perhaps by allowing a C<-man> option). The following complete example
-uses B<Pod::Usage> in combination with B<Getopt::Long> to do all of these
-things:
-
- use Getopt::Long;
- use Pod::Usage;
-
- my $man = 0;
- my $help = 0;
- ## Parse options and print usage if there is a syntax error,
- ## or if usage was explicitly requested.
- GetOptions('help|?' => \$help, man => \$man) or pod2usage(2);
- pod2usage(1) if $help;
- pod2usage(-verbose => 2) if $man;
-
- ## If no arguments were given, then allow STDIN to be used only
- ## if it's not connected to a terminal (otherwise print usage)
- pod2usage("$0: No files given.") if ((@ARGV == 0) && (-t STDIN));
- __END__
-
- =head1 NAME
-
- sample - Using GetOpt::Long and Pod::Usage
-
- =head1 SYNOPSIS
-
- sample [options] [file ...]
-
- Options:
- -help brief help message
- -man full documentation
-
- =head1 OPTIONS
-
- =over 8
-
- =item B<-help>
-
- Print a brief help message and exits.
-
- =item B<-man>
-
- Prints the manual page and exits.
-
- =back
-
- =head1 DESCRIPTION
-
- B<This program> will read the given input file(s) and do something
- useful with the contents thereof.
-
- =cut
-
-=head1 CAVEATS
-
-By default, B<pod2usage()> will use C<$0> as the path to the pod input
-file. Unfortunately, not all systems on which Perl runs will set C<$0>
-properly (although if C<$0> isn't found, B<pod2usage()> will search
-C<$ENV{PATH}> or else the list specified by the C<-pathlist> option).
-If this is the case for your system, you may need to explicitly specify
-the path to the pod docs for the invoking script using something
-similar to the following:
-
- pod2usage(-exitval => 2, -input => "/path/to/your/pod/docs");
-
-In the pathological case that a script is called via a relative path
-I<and> the script itself changes the current working directory
-(see L<perlfunc/chdir>) I<before> calling pod2usage, Pod::Usage will
-fail even on robust platforms. Don't do that.
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Marek Rouchal E<lt>marekr at cpan.orgE<gt>
-
-Brad Appleton E<lt>bradapp at enteract.comE<gt>
-
-Based on code for B<Pod::Text::pod2text()> written by
-Tom Christiansen E<lt>tchrist at mox.perl.comE<gt>
-
-=head1 ACKNOWLEDGMENTS
-
-Steven McDougall E<lt>swmcd at world.std.comE<gt> for his help and patience
-with re-writing this manpage.
-
-=head1 SEE ALSO
-
-L<Pod::Parser>, L<Getopt::Long>, L<Pod::Find>
-
-=cut
-
-#############################################################################
-
-#use diagnostics;
-use Carp;
-use Config;
-use Exporter;
-use File::Spec;
-
- at EXPORT = qw(&pod2usage);
-BEGIN {
- if ( $] >= 5.005_58 ) {
- require Pod::Text;
- @ISA = qw( Pod::Text );
- }
- else {
- require Pod::PlainText;
- @ISA = qw( Pod::PlainText );
- }
-}
-
-require Pod::Select;
-
-##---------------------------------------------------------------------------
-
-##---------------------------------
-## Function definitions begin here
-##---------------------------------
-
-sub pod2usage {
- local($_) = shift;
- my %opts;
- ## Collect arguments
- if (@_ > 0) {
- ## Too many arguments - assume that this is a hash and
- ## the user forgot to pass a reference to it.
- %opts = ($_, @_);
- }
- elsif (!defined $_) {
- $_ = '';
- }
- elsif (ref $_) {
- ## User passed a ref to a hash
- %opts = %{$_} if (ref($_) eq 'HASH');
- }
- elsif (/^[-+]?\d+$/) {
- ## User passed in the exit value to use
- $opts{'-exitval'} = $_;
- }
- else {
- ## User passed in a message to print before issuing usage.
- $_ and $opts{'-message'} = $_;
- }
-
- ## Need this for backward compatibility since we formerly used
- ## options that were all uppercase words rather than ones that
- ## looked like Unix command-line options.
- ## to be uppercase keywords)
- %opts = map {
- my ($key, $val) = ($_, $opts{$_});
- $key =~ s/^(?=\w)/-/;
- $key =~ /^-msg/i and $key = '-message';
- $key =~ /^-exit/i and $key = '-exitval';
- lc($key) => $val;
- } (keys %opts);
-
- ## Now determine default -exitval and -verbose values to use
- if ((! defined $opts{'-exitval'}) && (! defined $opts{'-verbose'})) {
- $opts{'-exitval'} = 2;
- $opts{'-verbose'} = 0;
- }
- elsif (! defined $opts{'-exitval'}) {
- $opts{'-exitval'} = ($opts{'-verbose'} > 0) ? 1 : 2;
- }
- elsif (! defined $opts{'-verbose'}) {
- $opts{'-verbose'} = (lc($opts{'-exitval'}) eq 'noexit' ||
- $opts{'-exitval'} < 2);
- }
-
- ## Default the output file
- $opts{'-output'} = (lc($opts{'-exitval'}) eq 'noexit' ||
- $opts{'-exitval'} < 2) ? \*STDOUT : \*STDERR
- unless (defined $opts{'-output'});
- ## Default the input file
- $opts{'-input'} = $0 unless (defined $opts{'-input'});
-
- ## Look up input file in path if it doesnt exist.
- unless ((ref $opts{'-input'}) || (-e $opts{'-input'})) {
- my $basename = $opts{'-input'};
- my $pathsep = ($^O =~ /^(?:dos|os2|MSWin32)$/i) ? ';'
- : (($^O eq 'MacOS' || $^O eq 'VMS') ? ',' : ':');
- my $pathspec = $opts{'-pathlist'} || $ENV{PATH} || $ENV{PERL5LIB};
-
- my @paths = (ref $pathspec) ? @$pathspec : split($pathsep, $pathspec);
- for my $dirname (@paths) {
- $_ = File::Spec->catfile($dirname, $basename) if length;
- last if (-e $_) && ($opts{'-input'} = $_);
- }
- }
-
- ## Now create a pod reader and constrain it to the desired sections.
- my $parser = new Pod::Usage(USAGE_OPTIONS => \%opts);
- if ($opts{'-verbose'} == 0) {
- $parser->select('(?:SYNOPSIS|USAGE)\s*');
- }
- elsif ($opts{'-verbose'} == 1) {
- my $opt_re = '(?i)' .
- '(?:OPTIONS|ARGUMENTS)' .
- '(?:\s*(?:AND|\/)\s*(?:OPTIONS|ARGUMENTS))?';
- $parser->select( '(?:SYNOPSIS|USAGE)\s*', $opt_re, "DESCRIPTION/$opt_re" );
- }
- elsif ($opts{'-verbose'} >= 2 && $opts{'-verbose'} != 99) {
- $parser->select('.*');
- }
- elsif ($opts{'-verbose'} == 99) {
- my $sections = $opts{'-sections'};
- $parser->select( (ref $sections) ? @$sections : $sections );
- $opts{'-verbose'} = 1;
- }
-
- ## Now translate the pod document and then exit with the desired status
- if ( !$opts{'-noperldoc'}
- and $opts{'-verbose'} >= 2
- and !ref($opts{'-input'})
- and $opts{'-output'} == \*STDOUT )
- {
- ## spit out the entire PODs. Might as well invoke perldoc
- my $progpath = File::Spec->catfile($Config{scriptdir}, 'perldoc');
- print { $opts{'-output'} } ($opts{'-message'}, "\n") if($opts{'-message'});
- if(defined $opts{-input} && $opts{-input} =~ /^\s*(\S.*?)\s*$/) {
- # the perldocs back to 5.005 should all have -F
- # without -F there are warnings in -T scripts
- system($progpath, '-F', $1);
- if($?) {
- # RT16091: fall back to more if perldoc failed
- system(($Config{pager} || $ENV{PAGER} || '/bin/more'), $1);
- }
- } else {
- croak "Unspecified input file or insecure argument.\n";
- }
- }
- else {
- $parser->parse_from_file($opts{'-input'}, $opts{'-output'});
- }
-
- exit($opts{'-exitval'}) unless (lc($opts{'-exitval'}) eq 'noexit');
-}
-
-##---------------------------------------------------------------------------
-
-##-------------------------------
-## Method definitions begin here
-##-------------------------------
-
-sub new {
- my $this = shift;
- my $class = ref($this) || $this;
- my %params = @_;
- my $self = {%params};
- bless $self, $class;
- if ($self->can('initialize')) {
- $self->initialize();
- } else {
- $self = $self->SUPER::new();
- %$self = (%$self, %params);
- }
- return $self;
-}
-
-sub select {
- my ($self, @sections) = @_;
- if ($ISA[0]->can('select')) {
- $self->SUPER::select(@sections);
- } else {
- # we're using Pod::Simple - need to mimic the behavior of Pod::Select
- my $add = ($sections[0] eq '+') ? shift(@sections) : '';
- ## Reset the set of sections to use
- unless (@sections) {
- delete $self->{USAGE_SELECT} unless ($add);
- return;
- }
- $self->{USAGE_SELECT} = []
- unless ($add && $self->{USAGE_SELECT});
- my $sref = $self->{USAGE_SELECT};
- ## Compile each spec
- for my $spec (@sections) {
- my $cs = Pod::Select::_compile_section_spec($spec);
- if ( defined $cs ) {
- ## Store them in our sections array
- push(@$sref, $cs);
- } else {
- carp qq{Ignoring section spec "$spec"!\n};
- }
- }
- }
-}
-
-# Override Pod::Text->seq_i to return just "arg", not "*arg*".
-sub seq_i { return $_[1] }
-
-# This overrides the Pod::Text method to do something very akin to what
-# Pod::Select did as well as the work done below by preprocess_paragraph.
-# Note that the below is very, very specific to Pod::Text.
-sub _handle_element_end {
- my ($self, $element) = @_;
- if ($element eq 'head1') {
- $self->{USAGE_HEADINGS} = [ $$self{PENDING}[-1][1] ];
- if ($self->{USAGE_OPTIONS}->{-verbose} < 2) {
- $$self{PENDING}[-1][1] =~ s/^\s*SYNOPSIS\s*$/USAGE/;
- }
- } elsif ($element =~ /^head(\d+)$/ && $1) { # avoid 0
- my $idx = $1 - 1;
- $self->{USAGE_HEADINGS} = [] unless($self->{USAGE_HEADINGS});
- $self->{USAGE_HEADINGS}->[$idx] = $$self{PENDING}[-1][1];
- }
- if ($element =~ /^head\d+$/) {
- $$self{USAGE_SKIPPING} = 1;
- if (!$$self{USAGE_SELECT} || !@{ $$self{USAGE_SELECT} }) {
- $$self{USAGE_SKIPPING} = 0;
- } else {
- my @headings = @{$$self{USAGE_HEADINGS}};
- for my $section_spec ( @{$$self{USAGE_SELECT}} ) {
- my $match = 1;
- for (my $i = 0; $i < $Pod::Select::MAX_HEADING_LEVEL; ++$i) {
- $headings[$i] = '' unless defined $headings[$i];
- my $regex = $section_spec->[$i];
- my $negated = ($regex =~ s/^\!//);
- $match &= ($negated ? ($headings[$i] !~ /${regex}/)
- : ($headings[$i] =~ /${regex}/));
- last unless ($match);
- } # end heading levels
- if ($match) {
- $$self{USAGE_SKIPPING} = 0;
- last;
- }
- } # end sections
- }
-
- # Try to do some lowercasing instead of all-caps in headings, and use
- # a colon to end all headings.
- if($self->{USAGE_OPTIONS}->{-verbose} < 2) {
- local $_ = $$self{PENDING}[-1][1];
- s{([A-Z])([A-Z]+)}{((length($2) > 2) ? $1 : lc($1)) . lc($2)}ge;
- s/\s*$/:/ unless (/:\s*$/);
- $_ .= "\n";
- $$self{PENDING}[-1][1] = $_;
- }
- }
- if ($$self{USAGE_SKIPPING} && $element !~ m/^over-/) {
- pop @{ $$self{PENDING} };
- } else {
- $self->SUPER::_handle_element_end($element);
- }
-}
-
-# required for Pod::Simple API
-sub start_document {
- my $self = shift;
- $self->SUPER::start_document();
- my $msg = $self->{USAGE_OPTIONS}->{-message} or return 1;
- my $out_fh = $self->output_fh();
- print $out_fh "$msg\n";
-}
-
-# required for old Pod::Parser API
-sub begin_pod {
- my $self = shift;
- $self->SUPER::begin_pod(); ## Have to call superclass
- my $msg = $self->{USAGE_OPTIONS}->{-message} or return 1;
- my $out_fh = $self->output_handle();
- print $out_fh "$msg\n";
-}
-
-sub preprocess_paragraph {
- my $self = shift;
- local $_ = shift;
- my $line = shift;
- ## See if this is a heading and we arent printing the entire manpage.
- if (($self->{USAGE_OPTIONS}->{-verbose} < 2) && /^=head/) {
- ## Change the title of the SYNOPSIS section to USAGE
- s/^=head1\s+SYNOPSIS\s*$/=head1 USAGE/;
- ## Try to do some lowercasing instead of all-caps in headings
- s{([A-Z])([A-Z]+)}{((length($2) > 2) ? $1 : lc($1)) . lc($2)}ge;
- ## Use a colon to end all headings
- s/\s*$/:/ unless (/:\s*$/);
- $_ .= "\n";
- }
- return $self->SUPER::preprocess_paragraph($_);
-}
-
-1; # keep require happy
Deleted: vendor/perl/dist/lib/Pod/t/Functions.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/Functions.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/Functions.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,159 +0,0 @@
-#!perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-use File::Basename;
-use File::Spec;
-
-use Test::More;
-plan tests => 9;
-
-
-use_ok( 'Pod::Functions' );
-
-# How do you test exported vars?
-my( $pkg_ref, $exp_ref ) = ( \%Pod::Functions::Kinds, \%Kinds );
-is( $pkg_ref, $exp_ref, '%Pod::Functions::Kinds exported' );
-
-( $pkg_ref, $exp_ref ) = ( \%Pod::Functions::Type, \%Type );
-is( $pkg_ref, $exp_ref, '%Pod::Functions::Type exported' );
-
-( $pkg_ref, $exp_ref ) = ( \%Pod::Functions::Flavor, \%Flavor );
-is( $pkg_ref, $exp_ref, '%Pod::Functions::Flavor exported' );
-
-( $pkg_ref, $exp_ref ) = ( \%Pod::Functions::Type_Description,
- \%Type_Description );
-is( $pkg_ref, $exp_ref, '%Pod::Functions::Type_Description exported' );
-
-( $pkg_ref, $exp_ref ) = ( \@Pod::Functions::Type_Order, \@Type_Order );
-is( $pkg_ref, $exp_ref, '@Pod::Functions::Type_Order exported' );
-
-# Check @Type_Order
-my @catagories = qw(
- String Regexp Math ARRAY LIST HASH I/O
- Binary File Flow Namespace Misc Process Modules
- Objects Socket SysV User Network Time
-);
-
-ok( eq_array( \@Type_Order, \@catagories ),
- '@Type_Order' );
-
-my @cat_keys = grep exists $Type_Description{ $_ } => @Type_Order;
-
-ok( eq_array( \@cat_keys, \@catagories ),
- 'keys() %Type_Description' );
-
-my( undef, $path ) = fileparse( $0 );
-my $pod_functions = File::Spec->catfile(
- $path, File::Spec->updir, 'Functions.pm' );
-
-SKIP: {
- my $test_out = do { local $/; <DATA> };
-
- skip( "Can't fork '$^X': $!", 1)
- unless open my $fh, qq[$^X "-I../lib" $pod_functions |];
- my $fake_out = do { local $/; <$fh> };
- skip( "Pipe error: $!", 1)
- unless close $fh;
-
- is( $fake_out, $test_out, 'run as plain program' );
-}
-
-=head1 NAME
-
-Functions.t - Test Pod::Functions
-
-=head1 AUTHOR
-
-20011229 Abe Timmerman <abe at ztreet.demon.nl>
-
-=cut
-
-__DATA__
-
-Functions for SCALARs or strings:
- chomp, chop, chr, crypt, hex, index, lc, lcfirst, length,
- oct, ord, pack, q/STRING/, qq/STRING/, reverse, rindex,
- sprintf, substr, tr///, uc, ucfirst, y///
-
-Regular expressions and pattern matching:
- m//, pos, qr/STRING/, quotemeta, s///, split, study
-
-Numeric functions:
- abs, atan2, cos, exp, hex, int, log, oct, rand, sin, sqrt,
- srand
-
-Functions for real @ARRAYs:
- pop, push, shift, splice, unshift
-
-Functions for list data:
- grep, join, map, qw/STRING/, reverse, sort, unpack
-
-Functions for real %HASHes:
- delete, each, exists, keys, values
-
-Input and output functions:
- binmode, close, closedir, dbmclose, dbmopen, die, eof,
- fileno, flock, format, getc, print, printf, read, readdir,
- readline, rewinddir, seek, seekdir, select, syscall,
- sysread, sysseek, syswrite, tell, telldir, truncate, warn,
- write
-
-Functions for fixed length data or records:
- pack, read, syscall, sysread, sysseek, syswrite, unpack,
- vec
-
-Functions for filehandles, files, or directories:
- -X, chdir, chmod, chown, chroot, fcntl, glob, ioctl, link,
- lstat, mkdir, open, opendir, readlink, rename, rmdir,
- stat, symlink, sysopen, umask, unlink, utime
-
-Keywords related to control flow of your perl program:
- caller, continue, die, do, dump, eval, exit, goto, last,
- next, prototype, redo, return, sub, wantarray
-
-Keywords altering or affecting scoping of identifiers:
- caller, import, local, my, our, package, use
-
-Miscellaneous functions:
- defined, dump, eval, formline, local, my, our, prototype,
- reset, scalar, undef, wantarray
-
-Functions for processes and process groups:
- alarm, exec, fork, getpgrp, getppid, getpriority, kill,
- pipe, qx/STRING/, readpipe, setpgrp, setpriority, sleep,
- system, times, wait, waitpid
-
-Keywords related to perl modules:
- do, import, no, package, require, use
-
-Keywords related to classes and object-orientedness:
- bless, dbmclose, dbmopen, package, ref, tie, tied, untie,
- use
-
-Low-level socket functions:
- accept, bind, connect, getpeername, getsockname,
- getsockopt, listen, recv, send, setsockopt, shutdown,
- socket, socketpair
-
-System V interprocess communication functions:
- msgctl, msgget, msgrcv, msgsnd, semctl, semget, semop,
- shmctl, shmget, shmread, shmwrite
-
-Fetching user and group info:
- endgrent, endhostent, endnetent, endpwent, getgrent,
- getgrgid, getgrnam, getlogin, getpwent, getpwnam,
- getpwuid, setgrent, setpwent
-
-Fetching network info:
- endprotoent, endservent, gethostbyaddr, gethostbyname,
- gethostent, getnetbyaddr, getnetbyname, getnetent,
- getprotobyname, getprotobynumber, getprotoent,
- getservbyname, getservbyport, getservent, sethostent,
- setnetent, setprotoent, setservent
-
-Time-related functions:
- gmtime, localtime, time, times
Deleted: vendor/perl/dist/lib/Pod/t/basic.cap
===================================================================
--- vendor/perl/dist/lib/Pod/t/basic.cap 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/basic.cap 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,268 +0,0 @@
-[1mNAME[m
- basic.pod - Test of various basic POD features in translators.
-
-[1mHEADINGS[m
- Try a few different levels of headings, with embedded formatting codes and
- other interesting bits.
-
-[1mThis "is" a "level 1" heading[m
- [1m``Level'' "2 [4mheading[m[m
- Level 3 [1mheading [4mwith "weird stuff "" (double quote)"[m[m
- Level "4 "heading"
- Now try again with [1mintermixed[m text.
-
-[1mThis "is" a "level 1" heading[m
- Text.
-
- [1m``Level'' 2 [4mheading[m[m
- Text.
-
- Level 3 [1mheading [4mwith "weird stuff"[m[m
- Text.
-
- Level "4 "heading"
- Text.
-
-[1mLINKS[m
- These are all taken from the Pod::Parser tests.
-
- Try out [4mLOTS[m of different ways of specifying references:
-
- Reference the "section" in manpage
-
- Reference the "section" in "manpage"
-
- Reference the "section" in manpage
-
- Now try it using the new "|" stuff ...
-
- Reference the thistext|
-
- Reference the thistext |
-
- Reference the thistext|
-
- Reference the thistext |
-
- Reference the thistext|
-
- Reference the thistext|
-
- And then throw in a few new ones of my own.
-
- foo
-
- foo
-
- "bar" in foo
-
- "baz boo" in foo
-
- "bar"
-
- "baz boo"
-
- "baz boo"
-
- "baz boo" in foo bar
-
- "boo var baz"
-
- "bar baz"
-
- "boo", "bar", and "baz"
-
- foobar
-
- Testing [4mitalics[m
-
- "[4mItalic[m text" in foo
-
- "Section "with" [4m[1mother[m markup[m" in foo|bar
-
- Nested <http://www.perl.org/>
-
-[1mOVER AND ITEMS[m
- Taken from Pod::Parser tests, this is a test to ensure that multiline
- =item paragraphs get indented appropriately.
-
- This is a test.
-
- There should be whitespace now before this line.
-
- Taken from Pod::Parser tests, this is a test to ensure the nested =item
- paragraphs get indented appropriately.
-
- 1 First section.
-
- a this is item a
-
- b this is item b
-
- 2 Second section.
-
- a this is item a
-
- b this is item b
-
- c
- d This is item c & d.
-
- Now some additional weirdness of our own. Make sure that multiple tags for
- one paragraph are properly compacted.
-
- "foo"
- [1mbar[m
- "baz"
- There shouldn't be any spaces between any of these item tags; this
- idiom is used in perlfunc.
-
- Some longer item text
- Just to make sure that we test paragraphs where the item text doesn't
- fit in the margin of the paragraph (and make sure that this paragraph
- fills a few lines).
-
- Let's also make it multiple paragraphs to be sure that works.
-
- Test use of =over without =item as a block "quote" or block paragraph.
-
- This should be indented four spaces but otherwise formatted the same
- as any other regular text paragraph. Make sure it's long enough to see
- the results of the formatting.....
-
- Now try the same thing nested, and make sure that the indentation is reset
- back properly.
-
- This paragraph should be doubly indented.
-
- This paragraph should only be singly indented.
-
- * This is an item in the middle of a block-quote, which should be
- allowed.
-
- * We're also testing tagless item commands.
-
- Should be back to the single level of indentation.
-
- Should be back to regular indentation.
-
- Now also check the transformation of * into real bullets for man pages.
-
- * An item. We're also testing using =over without a number, and making
- sure that item text wraps properly.
-
- * Another item.
-
- and now test the numbering of item blocks.
-
- 1. First item.
-
- 2. Second item.
-
-[1mFORMATTING CODES[m
- Another test taken from Pod::Parser.
-
- This is a test to see if I can do not only $self and "method()", but also
- "$self->method()" and "$self->{FIELDNAME}" and "$Foo <=> $Bar" without
- resorting to escape sequences. If I want to refer to the right-shift
- operator I can do something like "$x >> 3" or even "$y >> 5".
-
- Now for the grand finale of "$self->method()->{FIELDNAME} = {FOO=>BAR}".
- And I also want to make sure that newlines work like this "$self->{FOOBAR}
- >> 3 and [$b => $a]->[$a <=> $b]"
-
- Of course I should still be able to do all this [4mwith[m escape sequences too:
- "$self->method()" and "$self->{FIELDNAME}" and "{FOO=>BAR}".
-
- Dont forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
-
- And make sure that 0 works too!
-
- Now, if I use << or >> as my delimiters, then I have to use whitespace. So
- things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> wont end up
- doing what you might expect since the first > will still terminate the
- first < seen.
-
- Lets make sure these work for empty ones too, like "" and ">>" (just to be
- obnoxious)
-
- The statement: "This is dog kind's [4mfinest[m hour!" is a parody of a
- quotation from Winston Churchill.
-
- The following tests are added to those:
-
- Make sure that a few other odd [4mthings[m still work. This should be a
- vertical bar: |. Here's a test of a few more special escapes that have to
- be supported:
-
- & An ampersand.
-
- ' An apostrophe.
-
- < A less-than sign.
-
- > A greater-than sign.
-
- " A double quotation mark.
-
- / A forward slash.
-
- Try to get this bit of text over towards the edge so
- |that all of this text inside S<> won't| be wrapped. Also test the
- |same thing with non-breaking spaces.|
-
- There is a soft hyphen in hyphen at hy-phen.
-
- This is a test of an index entry.
-
-[1mVERBATIM[m
- Throw in a few verbatim paragraphs.
-
- use Term::ANSIColor;
- print color 'bold blue';
- print "This text is bold blue.\n";
- print color 'reset';
- print "This text is normal.\n";
- print colored ("Yellow on magenta.\n", 'yellow on_magenta');
- print "This text is normal.\n";
- print colored ['yellow on_magenta'], "Yellow on magenta.\n";
-
- use Term::ANSIColor qw(uncolor);
- print uncolor '01;31', "\n";
-
- But this isn't verbatim (make sure it wraps properly), and the next
- paragraph is again:
-
- use Term::ANSIColor qw(:constants);
- print BOLD, BLUE, "This text is in bold blue.\n", RESET;
-
- use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\n"; print "This text is normal.\n";
-
- (Ugh, that's obnoxiously long.) Try different spacing:
-
- Starting with a tab.
- Not
- starting
- with
- a
- tab. But this should still be verbatim.
- As should this.
-
- This isn't.
-
- This is. And this: is an internal tab. It should be:
- |--| <= lined up with that.
-
- (Tricky, but tabs should be expanded before the translator starts in on
- the text since otherwise text with mixed tabs and spaces will get messed
- up.)
-
- And now we test verbatim paragraphs right before a heading. Older
- versions of Pod::Man generated two spaces between paragraphs like this
- and the heading. (In order to properly test this, one may have to
- visually inspect the nroff output when run on the generated *roff
- text, unfortunately.)
-
-[1mCONCLUSION[m
- That's all, folks!
-
Deleted: vendor/perl/dist/lib/Pod/t/basic.clr
===================================================================
--- vendor/perl/dist/lib/Pod/t/basic.clr 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/basic.clr 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,269 +0,0 @@
-[1mNAME[0m
- basic.pod - Test of various basic POD features in translators.
-
-[1mHEADINGS[0m
- Try a few different levels of headings, with embedded formatting codes
- and other interesting bits.
-
-[1mThis "is" a "level 1" heading[0m
- [1m``Level'' "2 [33mheading[0m[0m
- Level 3 [1mheading [33mwith "weird [36mstuff "" (double quote)[0m"[0m[0m
- Level "4 "heading"
- Now try again with [1mintermixed[0m [36mtext[0m.
-
-[1mThis "is" a "level 1" heading[0m
- Text.
-
- [1m``Level'' 2 [33mheading[0m[0m
- Text.
-
- Level 3 [1mheading [33mwith "weird [36mstuff[0m"[0m[0m
- Text.
-
- Level "4 "heading"
- Text.
-
-[1mLINKS[0m
- These are all taken from the Pod::Parser tests.
-
- Try out [33mLOTS[0m of different ways of specifying references:
-
- Reference the "section" in manpage
-
- Reference the "section" in "manpage"
-
- Reference the "section" in manpage
-
- Now try it using the new "|" stuff ...
-
- Reference the thistext|
-
- Reference the thistext |
-
- Reference the thistext|
-
- Reference the thistext |
-
- Reference the thistext|
-
- Reference the thistext|
-
- And then throw in a few new ones of my own.
-
- foo
-
- foo
-
- "bar" in foo
-
- "baz boo" in foo
-
- "bar"
-
- "baz boo"
-
- "baz boo"
-
- "baz boo" in foo bar
-
- "boo var baz"
-
- "bar baz"
-
- "boo", "bar", and "baz"
-
- foobar
-
- Testing [33mitalics[0m
-
- "[33mItalic[0m text" in foo
-
- "Section "with" [33m[1mother[0m markup[0m" in foo|bar
-
- Nested <http://www.perl.org/>
-
-[1mOVER AND ITEMS[0m
- Taken from Pod::Parser tests, this is a test to ensure that multiline
- =item paragraphs get indented appropriately.
-
- This is a test.
-
- There should be whitespace now before this line.
-
- Taken from Pod::Parser tests, this is a test to ensure the nested =item
- paragraphs get indented appropriately.
-
- 1 First section.
-
- a this is item a
-
- b this is item b
-
- 2 Second section.
-
- a this is item a
-
- b this is item b
-
- c
- d This is item c & d.
-
- Now some additional weirdness of our own. Make sure that multiple tags
- for one paragraph are properly compacted.
-
- "foo"
- [1mbar[0m
- "baz"
- There shouldn't be any spaces between any of these item tags; this
- idiom is used in perlfunc.
-
- Some longer item text
- Just to make sure that we test paragraphs where the item text
- doesn't fit in the margin of the paragraph (and make sure that this
- paragraph fills a few lines).
-
- Let's also make it multiple paragraphs to be sure that works.
-
- Test use of =over without =item as a block "quote" or block paragraph.
-
- This should be indented four spaces but otherwise formatted the same
- as any other regular text paragraph. Make sure it's long enough to
- see the results of the formatting.....
-
- Now try the same thing nested, and make sure that the indentation is
- reset back properly.
-
- This paragraph should be doubly indented.
-
- This paragraph should only be singly indented.
-
- * This is an item in the middle of a block-quote, which should be
- allowed.
-
- * We're also testing tagless item commands.
-
- Should be back to the single level of indentation.
-
- Should be back to regular indentation.
-
- Now also check the transformation of * into real bullets for man pages.
-
- * An item. We're also testing using =over without a number, and making
- sure that item text wraps properly.
-
- * Another item.
-
- and now test the numbering of item blocks.
-
- 1. First item.
-
- 2. Second item.
-
-[1mFORMATTING CODES[0m
- Another test taken from Pod::Parser.
-
- This is a test to see if I can do not only $self and "method()", but
- also "$self->method()" and "$self->{FIELDNAME}" and "$Foo <=> $Bar"
- without resorting to escape sequences. If I want to refer to the
- right-shift operator I can do something like "$x >> 3" or even "$y >>
- 5".
-
- Now for the grand finale of "$self->method()->{FIELDNAME} = {FOO=>BAR}".
- And I also want to make sure that newlines work like this
- "$self->{FOOBAR} >> 3 and [$b => $a]->[$a <=> $b]"
-
- Of course I should still be able to do all this [33mwith[0m escape sequences
- too: "$self->method()" and "$self->{FIELDNAME}" and "{FOO=>BAR}".
-
- Dont forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
-
- And make sure that 0 works too!
-
- Now, if I use << or >> as my delimiters, then I have to use whitespace.
- So things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> wont end
- up doing what you might expect since the first > will still terminate
- the first < seen.
-
- Lets make sure these work for empty ones too, like "" and ">>" (just to
- be obnoxious)
-
- The statement: "This is dog kind's [33mfinest[0m hour!" is a parody of a
- quotation from Winston Churchill.
-
- The following tests are added to those:
-
- Make sure that a few other odd [33mthings[0m still work. This should be a
- vertical bar: |. Here's a test of a few more special escapes that have
- to be supported:
-
- & An ampersand.
-
- ' An apostrophe.
-
- < A less-than sign.
-
- > A greater-than sign.
-
- " A double quotation mark.
-
- / A forward slash.
-
- Try to get this bit of text over towards the edge so
- |that all of this text inside S<> won't| be wrapped. Also test the
- |same thing with non-breaking spaces.|
-
- There is a soft hyphen in hyphen at hy-phen.
-
- This is a test of an index entry.
-
-[1mVERBATIM[0m
- Throw in a few verbatim paragraphs.
-
- use Term::ANSIColor;
- print color 'bold blue';
- print "This text is bold blue.\n";
- print color 'reset';
- print "This text is normal.\n";
- print colored ("Yellow on magenta.\n", 'yellow on_magenta');
- print "This text is normal.\n";
- print colored ['yellow on_magenta'], "Yellow on magenta.\n";
-
- use Term::ANSIColor qw(uncolor);
- print uncolor '01;31', "\n";
-
- But this isn't verbatim (make sure it wraps properly), and the next
- paragraph is again:
-
- use Term::ANSIColor qw(:constants);
- print BOLD, BLUE, "This text is in bold blue.\n", RESET;
-
- use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\n"; print "This text is normal.\n";
-
- (Ugh, that's obnoxiously long.) Try different spacing:
-
- Starting with a tab.
- Not
- starting
- with
- a
- tab. But this should still be verbatim.
- As should this.
-
- This isn't.
-
- This is. And this: is an internal tab. It should be:
- |--| <= lined up with that.
-
- (Tricky, but tabs should be expanded before the translator starts in on
- the text since otherwise text with mixed tabs and spaces will get messed
- up.)
-
- And now we test verbatim paragraphs right before a heading. Older
- versions of Pod::Man generated two spaces between paragraphs like this
- and the heading. (In order to properly test this, one may have to
- visually inspect the nroff output when run on the generated *roff
- text, unfortunately.)
-
-[1mCONCLUSION[0m
- That's all, folks!
-
Deleted: vendor/perl/dist/lib/Pod/t/basic.man
===================================================================
--- vendor/perl/dist/lib/Pod/t/basic.man 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/basic.man 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,321 +0,0 @@
-.SH "NAME"
-basic.pod \- Test of various basic POD features in translators.
-.SH "HEADINGS"
-.IX Header "HEADINGS"
-Try a few different levels of headings, with embedded formatting codes and
-other interesting bits.
-.ie n .SH "This ""is"" a ""level 1"" heading"
-.el .SH "This \f(CWis\fP a ``level 1'' heading"
-.IX Header "This is a level 1 heading"
-.SS "``Level'' ""2 \fIheading\fP"
-.IX Subsection "``Level'' ""2 heading"
-\fILevel 3 \f(BIheading \f(BIwith \f(CB\*(C`weird \f(CBstuff "" (double quote)\f(CB\*(C'\f(BI\f(BI\fI\fR
-.IX Subsection "Level 3 heading with weird stuff """" (double quote)"
-.PP
-Level "4 \f(CW\*(C`heading\*(C'\fR
-.IX Subsection "Level ""4 heading"
-.PP
-Now try again with \fBintermixed\fR \fItext\fR.
-.ie n .SH "This ""is"" a ""level 1"" heading"
-.el .SH "This \f(CWis\fP a ``level 1'' heading"
-.IX Header "This is a level 1 heading"
-Text.
-.SS "``Level'' 2 \fIheading\fP"
-.IX Subsection "``Level'' 2 heading"
-Text.
-.PP
-\fILevel 3 \f(BIheading \f(BIwith \f(CB\*(C`weird \f(CBstuff\f(CB\*(C'\f(BI\f(BI\fI\fR
-.IX Subsection "Level 3 heading with weird stuff"
-.PP
-Text.
-.PP
-Level "4 \f(CW\*(C`heading\*(C'\fR
-.IX Subsection "Level ""4 heading"
-.PP
-Text.
-.SH "LINKS"
-.IX Header "LINKS"
-These are all taken from the Pod::Parser tests.
-.PP
-Try out \fI\s-1LOTS\s0\fR of different ways of specifying references:
-.PP
-Reference the \*(L"section\*(R" in manpage
-.PP
-Reference the \*(L"section\*(R" in \*(L"manpage\*(R"
-.PP
-Reference the \*(L"section\*(R" in manpage
-.PP
-Now try it using the new \*(L"|\*(R" stuff ...
-.PP
-Reference the thistext|
-.PP
-Reference the thistext |
-.PP
-Reference the thistext|
-.PP
-Reference the thistext |
-.PP
-Reference the thistext|
-.PP
-Reference the thistext|
-.PP
-And then throw in a few new ones of my own.
-.PP
-foo
-.PP
-foo
-.PP
-\&\*(L"bar\*(R" in foo
-.PP
-\&\*(L"baz boo\*(R" in foo
-.PP
-\&\*(L"bar\*(R"
-.PP
-\&\*(L"baz boo\*(R"
-.PP
-\&\*(L"baz boo\*(R"
-.PP
-\&\*(L"baz boo\*(R" in foo bar
-.PP
-\&\*(L"boo var baz\*(R"
-.PP
-\&\*(L"bar baz\*(R"
-.PP
-\&\*(L"boo\*(R", \*(L"bar\*(R", and \*(L"baz\*(R"
-.PP
-foobar
-.PP
-Testing \fIitalics\fR
-.PP
-"\fIItalic\fR text" in foo
-.PP
-"Section \f(CW\*(C`with\*(C'\fR \fI\f(BIother\fI markup\fR" in foo|bar
-.PP
-Nested <http://www.perl.org/>
-.SH "OVER AND ITEMS"
-.IX Header "OVER AND ITEMS"
-Taken from Pod::Parser tests, this is a test to ensure that multiline
-=item paragraphs get indented appropriately.
-.IP "This is a test." 4
-.IX Item "This is a test."
-.PP
-There should be whitespace now before this line.
-.PP
-Taken from Pod::Parser tests, this is a test to ensure the nested =item
-paragraphs get indented appropriately.
-.IP "1." 2
-First section.
-.RS 2
-.IP "a" 2
-.IX Item "a"
-this is item a
-.IP "b" 2
-.IX Item "b"
-this is item b
-.RE
-.RS 2
-.RE
-.IP "2." 2
-Second section.
-.RS 2
-.IP "a" 2
-.IX Item "a"
-this is item a
-.IP "b" 2
-.IX Item "b"
-this is item b
-.IP "c" 2
-.IX Item "c"
-.PD 0
-.IP "d" 2
-.IX Item "d"
-.PD
-This is item c & d.
-.RE
-.RS 2
-.RE
-.PP
-Now some additional weirdness of our own. Make sure that multiple tags
-for one paragraph are properly compacted.
-.ie n .IP """foo""" 4
-.el .IP "``foo''" 4
-.IX Item "foo"
-.PD 0
-.IP "\fBbar\fR" 4
-.IX Item "bar"
-.ie n .IP """baz""" 4
-.el .IP "\f(CWbaz\fR" 4
-.IX Item "baz"
-.PD
-There shouldn't be any spaces between any of these item tags; this idiom
-is used in perlfunc.
-.IP "Some longer item text" 4
-.IX Item "Some longer item text"
-Just to make sure that we test paragraphs where the item text doesn't fit
-in the margin of the paragraph (and make sure that this paragraph fills a
-few lines).
-.Sp
-Let's also make it multiple paragraphs to be sure that works.
-.PP
-Test use of =over without =item as a block \*(L"quote\*(R" or block paragraph.
-.Sp
-.RS 4
-This should be indented four spaces but otherwise formatted the same as
-any other regular text paragraph. Make sure it's long enough to see the
-results of the formatting.....
-.RE
-.PP
-Now try the same thing nested, and make sure that the indentation is reset
-back properly.
-.RS 4
-.Sp
-.RS 4
-This paragraph should be doubly indented.
-.RE
-.RE
-.RS 4
-.Sp
-This paragraph should only be singly indented.
-.IP "\(bu" 4
-This is an item in the middle of a block-quote, which should be allowed.
-.IP "\(bu" 4
-We're also testing tagless item commands.
-.RE
-.RS 4
-.Sp
-Should be back to the single level of indentation.
-.RE
-.PP
-Should be back to regular indentation.
-.PP
-Now also check the transformation of * into real bullets for man pages.
-.IP "\(bu" 4
-An item. We're also testing using =over without a number, and making sure
-that item text wraps properly.
-.IP "\(bu" 4
-Another item.
-.PP
-and now test the numbering of item blocks.
-.IP "1." 4
-First item.
-.IP "2." 4
-Second item.
-.SH "FORMATTING CODES"
-.IX Header "FORMATTING CODES"
-Another test taken from Pod::Parser.
-.PP
-This is a test to see if I can do not only \f(CW$self\fR and \f(CW\*(C`method()\*(C'\fR, but
-also \f(CW\*(C`$self\->method()\*(C'\fR and \f(CW\*(C`$self\->{FIELDNAME}\*(C'\fR and
-\&\f(CW\*(C`$Foo <=> $Bar\*(C'\fR without resorting to escape sequences. If
-I want to refer to the right-shift operator I can do something
-like \f(CW\*(C`$x >> 3\*(C'\fR or even \f(CW\*(C`$y >> 5\*(C'\fR.
-.PP
-Now for the grand finale of \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR.
-And I also want to make sure that newlines work like this
-\&\f(CW\*(C`$self\->{FOOBAR} >> 3 and [$b => $a]\->[$a <=> $b]\*(C'\fR
-.PP
-Of course I should still be able to do all this \fIwith\fR escape sequences
-too: \f(CW\*(C`$self\->method()\*(C'\fR and \f(CW\*(C`$self\->{FIELDNAME}\*(C'\fR and
-\&\f(CW\*(C`{FOO=>BAR}\*(C'\fR.
-.PP
-Dont forget \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR.
-.PP
-And make sure that \f(CW0\fR works too!
-.PP
-Now, if I use << or >> as my delimiters, then I have to use whitespace.
-So things like \f(CW\*(C`<$self\-\*(C'\fR\fImethod()\fR>> and \f(CW\*(C`<$self\-\*(C'\fR{\s-1FIELDNAME\s0}>> wont end
-up doing what you might expect since the first > will still terminate
-the first < seen.
-.PP
-Lets make sure these work for empty ones too, like \f(CW\*(C`\*(C'\fR and \f(CW\*(C`>>\*(C'\fR
-(just to be obnoxious)
-.PP
-The statement: \f(CW\*(C`This is dog kind\*(Aqs \f(CIfinest\f(CW hour!\*(C'\fR is a parody of a
-quotation from Winston Churchill.
-.PP
-The following tests are added to those:
-.PP
-Make sure that a few other odd \fIthings\fR still work. This should be
-a vertical bar: |. Here's a test of a few more special escapes
-that have to be supported:
-.IP "&" 3
-An ampersand.
-.IP "'" 3
-An apostrophe.
-.IP "<" 3
-A less-than sign.
-.IP ">" 3
-A greater-than sign.
-.IP """" 3
-A double quotation mark.
-.IP "/" 3
-A forward slash.
-.PP
-Try to get this bit of text over towards the edge so |that\ all\ of\ this\ text\ inside\ S<>\ won't| be wrapped. Also test the
-|same\ thing\ with\ non-breaking\ spaces.|
-.PP
-There is a soft hy\%phen in hyphen at hy-phen.
-.PP
-This is a test of an index entry.
-.IX Xref "index entry"
-.SH "VERBATIM"
-.IX Header "VERBATIM"
-Throw in a few verbatim paragraphs.
-.PP
-.Vb 8
-\& use Term::ANSIColor;
-\& print color \*(Aqbold blue\*(Aq;
-\& print "This text is bold blue.\en";
-\& print color \*(Aqreset\*(Aq;
-\& print "This text is normal.\en";
-\& print colored ("Yellow on magenta.\en", \*(Aqyellow on_magenta\*(Aq);
-\& print "This text is normal.\en";
-\& print colored [\*(Aqyellow on_magenta\*(Aq], "Yellow on magenta.\en";
-\&
-\& use Term::ANSIColor qw(uncolor);
-\& print uncolor \*(Aq01;31\*(Aq, "\en";
-.Ve
-.PP
-But this isn't verbatim (make sure it wraps properly), and the next
-paragraph is again:
-.PP
-.Vb 2
-\& use Term::ANSIColor qw(:constants);
-\& print BOLD, BLUE, "This text is in bold blue.\en", RESET;
-\&
-\& use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\en"; print "This text is normal.\en";
-.Ve
-.PP
-(Ugh, that's obnoxiously long.) Try different spacing:
-.PP
-.Vb 7
-\& Starting with a tab.
-\&Not
-\&starting
-\&with
-\&a
-\&tab. But this should still be verbatim.
-\& As should this.
-.Ve
-.PP
-This isn't.
-.PP
-.Vb 2
-\& This is. And this: is an internal tab. It should be:
-\& |\-\-| <= lined up with that.
-.Ve
-.PP
-(Tricky, but tabs should be expanded before the translator starts in on
-the text since otherwise text with mixed tabs and spaces will get messed
-up.)
-.PP
-.Vb 5
-\& And now we test verbatim paragraphs right before a heading. Older
-\& versions of Pod::Man generated two spaces between paragraphs like this
-\& and the heading. (In order to properly test this, one may have to
-\& visually inspect the nroff output when run on the generated *roff
-\& text, unfortunately.)
-.Ve
-.SH "CONCLUSION"
-.IX Header "CONCLUSION"
-That's all, folks!
Deleted: vendor/perl/dist/lib/Pod/t/basic.ovr
===================================================================
--- vendor/perl/dist/lib/Pod/t/basic.ovr 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/basic.ovr 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,269 +0,0 @@
-NNAAMMEE
- basic.pod - Test of various basic POD features in translators.
-
-HHEEAADDIINNGGSS
- Try a few different levels of headings, with embedded formatting codes
- and other interesting bits.
-
-TThhiiss ""iiss"" aa ""lleevveell 11"" hheeaaddiinngg
- ````LLeevveell'''' ""22 hheeaaddiinngg
- _L_e_v_e_l_ _3_ _h_e_a_d_i_n_g_ _w_i_t_h_ _"_w_e_i_r_d_ _s_t_u_f_f_ _"_"_ _(_d_o_u_b_l_e_ _q_u_o_t_e_)_"
- _L_e_v_e_l_ _"_4_ _"_h_e_a_d_i_n_g_"
- Now try again with iinntteerrmmiixxeedd _t_e_x_t.
-
-TThhiiss ""iiss"" aa ""lleevveell 11"" hheeaaddiinngg
- Text.
-
- ````LLeevveell'''' 22 hheeaaddiinngg
- Text.
-
- _L_e_v_e_l_ _3_ _h_e_a_d_i_n_g_ _w_i_t_h_ _"_w_e_i_r_d_ _s_t_u_f_f_"
- Text.
-
- _L_e_v_e_l_ _"_4_ _"_h_e_a_d_i_n_g_"
- Text.
-
-LLIINNKKSS
- These are all taken from the Pod::Parser tests.
-
- Try out _L_O_T_S of different ways of specifying references:
-
- Reference the "section" in manpage
-
- Reference the "section" in "manpage"
-
- Reference the "section" in manpage
-
- Now try it using the new "|" stuff ...
-
- Reference the thistext|
-
- Reference the thistext |
-
- Reference the thistext|
-
- Reference the thistext |
-
- Reference the thistext|
-
- Reference the thistext|
-
- And then throw in a few new ones of my own.
-
- foo
-
- foo
-
- "bar" in foo
-
- "baz boo" in foo
-
- "bar"
-
- "baz boo"
-
- "baz boo"
-
- "baz boo" in foo bar
-
- "boo var baz"
-
- "bar baz"
-
- "boo", "bar", and "baz"
-
- foobar
-
- Testing _i_t_a_l_i_c_s
-
- "_I_t_a_l_i_c text" in foo
-
- "Section "with" _o_t_h_e_r_ _m_a_r_k_u_p" in foo|bar
-
- Nested <http://www.perl.org/>
-
-OOVVEERR AANNDD IITTEEMMSS
- Taken from Pod::Parser tests, this is a test to ensure that multiline
- =item paragraphs get indented appropriately.
-
- This is a test.
-
- There should be whitespace now before this line.
-
- Taken from Pod::Parser tests, this is a test to ensure the nested =item
- paragraphs get indented appropriately.
-
- 1 First section.
-
- a this is item a
-
- b this is item b
-
- 2 Second section.
-
- a this is item a
-
- b this is item b
-
- c
- d This is item c & d.
-
- Now some additional weirdness of our own. Make sure that multiple tags
- for one paragraph are properly compacted.
-
- "foo"
- bbaarr
- "baz"
- There shouldn't be any spaces between any of these item tags; this
- idiom is used in perlfunc.
-
- Some longer item text
- Just to make sure that we test paragraphs where the item text
- doesn't fit in the margin of the paragraph (and make sure that this
- paragraph fills a few lines).
-
- Let's also make it multiple paragraphs to be sure that works.
-
- Test use of =over without =item as a block "quote" or block paragraph.
-
- This should be indented four spaces but otherwise formatted the same
- as any other regular text paragraph. Make sure it's long enough to
- see the results of the formatting.....
-
- Now try the same thing nested, and make sure that the indentation is
- reset back properly.
-
- This paragraph should be doubly indented.
-
- This paragraph should only be singly indented.
-
- * This is an item in the middle of a block-quote, which should be
- allowed.
-
- * We're also testing tagless item commands.
-
- Should be back to the single level of indentation.
-
- Should be back to regular indentation.
-
- Now also check the transformation of * into real bullets for man pages.
-
- * An item. We're also testing using =over without a number, and making
- sure that item text wraps properly.
-
- * Another item.
-
- and now test the numbering of item blocks.
-
- 1. First item.
-
- 2. Second item.
-
-FFOORRMMAATTTTIINNGG CCOODDEESS
- Another test taken from Pod::Parser.
-
- This is a test to see if I can do not only $self and "method()", but
- also "$self->method()" and "$self->{FIELDNAME}" and "$Foo <=> $Bar"
- without resorting to escape sequences. If I want to refer to the
- right-shift operator I can do something like "$x >> 3" or even "$y >>
- 5".
-
- Now for the grand finale of "$self->method()->{FIELDNAME} = {FOO=>BAR}".
- And I also want to make sure that newlines work like this
- "$self->{FOOBAR} >> 3 and [$b => $a]->[$a <=> $b]"
-
- Of course I should still be able to do all this _w_i_t_h escape sequences
- too: "$self->method()" and "$self->{FIELDNAME}" and "{FOO=>BAR}".
-
- Dont forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
-
- And make sure that 0 works too!
-
- Now, if I use << or >> as my delimiters, then I have to use whitespace.
- So things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> wont end
- up doing what you might expect since the first > will still terminate
- the first < seen.
-
- Lets make sure these work for empty ones too, like "" and ">>" (just to
- be obnoxious)
-
- The statement: "This is dog kind's _f_i_n_e_s_t hour!" is a parody of a
- quotation from Winston Churchill.
-
- The following tests are added to those:
-
- Make sure that a few other odd _t_h_i_n_g_s still work. This should be a
- vertical bar: |. Here's a test of a few more special escapes that have
- to be supported:
-
- & An ampersand.
-
- ' An apostrophe.
-
- < A less-than sign.
-
- > A greater-than sign.
-
- " A double quotation mark.
-
- / A forward slash.
-
- Try to get this bit of text over towards the edge so
- |that all of this text inside S<> won't| be wrapped. Also test the
- |same thing with non-breaking spaces.|
-
- There is a soft hyphen in hyphen at hy-phen.
-
- This is a test of an index entry.
-
-VVEERRBBAATTIIMM
- Throw in a few verbatim paragraphs.
-
- use Term::ANSIColor;
- print color 'bold blue';
- print "This text is bold blue.\n";
- print color 'reset';
- print "This text is normal.\n";
- print colored ("Yellow on magenta.\n", 'yellow on_magenta');
- print "This text is normal.\n";
- print colored ['yellow on_magenta'], "Yellow on magenta.\n";
-
- use Term::ANSIColor qw(uncolor);
- print uncolor '01;31', "\n";
-
- But this isn't verbatim (make sure it wraps properly), and the next
- paragraph is again:
-
- use Term::ANSIColor qw(:constants);
- print BOLD, BLUE, "This text is in bold blue.\n", RESET;
-
- use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\n"; print "This text is normal.\n";
-
- (Ugh, that's obnoxiously long.) Try different spacing:
-
- Starting with a tab.
- Not
- starting
- with
- a
- tab. But this should still be verbatim.
- As should this.
-
- This isn't.
-
- This is. And this: is an internal tab. It should be:
- |--| <= lined up with that.
-
- (Tricky, but tabs should be expanded before the translator starts in on
- the text since otherwise text with mixed tabs and spaces will get messed
- up.)
-
- And now we test verbatim paragraphs right before a heading. Older
- versions of Pod::Man generated two spaces between paragraphs like this
- and the heading. (In order to properly test this, one may have to
- visually inspect the nroff output when run on the generated *roff
- text, unfortunately.)
-
-CCOONNCCLLUUSSIIOONN
- That's all, folks!
-
Deleted: vendor/perl/dist/lib/Pod/t/basic.pod
===================================================================
--- vendor/perl/dist/lib/Pod/t/basic.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/basic.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,383 +0,0 @@
-=head1 NAME
-
-basic.pod - Test of various basic POD features in translators.
-
-=head1 HEADINGS
-
-Try a few different levels of headings, with embedded formatting codes and
-other interesting bits.
-
-=head1 This C<is> a "level 1" heading
-
-=head2 ``Level'' "2 I<heading>
-
-=head3 Level 3 B<heading I<with C<weird F<stuff "" (double quote)>>>>
-
-=head4 Level "4 C<heading>
-
-Now try again with B<intermixed> F<text>.
-
-=head1 This C<is> a "level 1" heading
-
-Text.
-
-=head2 ``Level'' 2 I<heading>
-
-Text.
-
-=head3 Level 3 B<heading I<with C<weird F<stuff>>>>
-
-Text.
-
-=head4 Level "4 C<heading>
-
-Text.
-
-=head1 LINKS
-
-These are all taken from the Pod::Parser tests.
-
-Try out I<LOTS> of different ways of specifying references:
-
-Reference the L<manpage/section>
-
-Reference the L<"manpage"/section>
-
-Reference the L<manpage/"section">
-
-Now try it using the new "|" stuff ...
-
-Reference the L<thistext|manpage/section>|
-
-Reference the L<thistext | manpage / section>|
-
-Reference the L<thistext| manpage/ section>|
-
-Reference the L<thistext |manpage /section>|
-
-Reference the L<thistext|manpage/"section">|
-
-Reference the L<thistext|
-manpage/
-section>|
-
-And then throw in a few new ones of my own.
-
-L<foo>
-
-L<foo|bar>
-
-L<foo/bar>
-
-L<foo/"baz boo">
-
-L</bar>
-
-L</"baz boo">
-
-L</baz boo>
-
-L<foo bar/baz boo>
-
-L<"boo var baz">
-
-L<bar baz>
-
-L</boo>, L</bar>, and L</baz>
-
-L<fooZ<>bar>
-
-L<Testing I<italics>|foo/bar>
-
-L<foo/I<Italic> text>
-
-L<fooE<verbar>barZ<>/Section C<with> I<B<other> markup>>
-
-L<Nested L<http://www.perl.org/>|fooE<sol>bar>
-
-=head1 OVER AND ITEMS
-
-Taken from Pod::Parser tests, this is a test to ensure that multiline
-=item paragraphs get indented appropriately.
-
-=over 4
-
-=item This
-is
-a
-test.
-
-=back
-
-There should be whitespace now before this line.
-
-Taken from Pod::Parser tests, this is a test to ensure the nested =item
-paragraphs get indented appropriately.
-
-=over 2
-
-=item 1
-
-First section.
-
-=over 2
-
-=item a
-
-this is item a
-
-=item b
-
-this is item b
-
-=back
-
-=item 2
-
-Second section.
-
-=over 2
-
-=item a
-
-this is item a
-
-=item b
-
-this is item b
-
-=item c
-
-=item d
-
-This is item c & d.
-
-=back
-
-=back
-
-Now some additional weirdness of our own. Make sure that multiple tags
-for one paragraph are properly compacted.
-
-=over 4
-
-=item "foo"
-
-=item B<bar>
-
-=item C<baz>
-
-There shouldn't be any spaces between any of these item tags; this idiom
-is used in perlfunc.
-
-=item Some longer item text
-
-Just to make sure that we test paragraphs where the item text doesn't fit
-in the margin of the paragraph (and make sure that this paragraph fills a
-few lines).
-
-Let's also make it multiple paragraphs to be sure that works.
-
-=back
-
-Test use of =over without =item as a block "quote" or block paragraph.
-
-=over 4
-
-This should be indented four spaces but otherwise formatted the same as
-any other regular text paragraph. Make sure it's long enough to see the
-results of the formatting.....
-
-=back
-
-Now try the same thing nested, and make sure that the indentation is reset
-back properly.
-
-=over 4
-
-=over 4
-
-This paragraph should be doubly indented.
-
-=back
-
-This paragraph should only be singly indented.
-
-=over 4
-
-=item
-
-This is an item in the middle of a block-quote, which should be allowed.
-
-=item
-
-We're also testing tagless item commands.
-
-=back
-
-Should be back to the single level of indentation.
-
-=back
-
-Should be back to regular indentation.
-
-Now also check the transformation of * into real bullets for man pages.
-
-=over
-
-=item *
-
-An item. We're also testing using =over without a number, and making sure
-that item text wraps properly.
-
-=item *
-
-Another item.
-
-=back
-
-and now test the numbering of item blocks.
-
-=over 4
-
-=item 1.
-
-First item.
-
-=item 2.
-
-Second item.
-
-=back
-
-=head1 FORMATTING CODES
-
-Another test taken from Pod::Parser.
-
-This is a test to see if I can do not only C<$self> and C<method()>, but
-also C<< $self->method() >> and C<< $self->{FIELDNAME} >> and
-C<< $Foo <=> $Bar >> without resorting to escape sequences. If
-I want to refer to the right-shift operator I can do something
-like C<<< $x >> 3 >>> or even C<<<< $y >> 5 >>>>.
-
-Now for the grand finale of C<< $self->method()->{FIELDNAME} = {FOO=>BAR} >>.
-And I also want to make sure that newlines work like this
-C<<<
-$self->{FOOBAR} >> 3 and [$b => $a]->[$a <=> $b]
->>>
-
-Of course I should still be able to do all this I<with> escape sequences
-too: C<$self-E<gt>method()> and C<$self-E<gt>{FIELDNAME}> and
-C<{FOO=E<gt>BAR}>.
-
-Dont forget C<$self-E<gt>method()-E<gt>{FIELDNAME} = {FOO=E<gt>BAR}>.
-
-And make sure that C<0> works too!
-
-Now, if I use << or >> as my delimiters, then I have to use whitespace.
-So things like C<<$self->method()>> and C<<$self->{FIELDNAME}>> wont end
-up doing what you might expect since the first > will still terminate
-the first < seen.
-
-Lets make sure these work for empty ones too, like C<< >> and C<< >> >>
-(just to be obnoxious)
-
-The statement: C<This is dog kind's I<finest> hour!> is a parody of a
-quotation from Winston Churchill.
-
-The following tests are added to those:
-
-Make sure that a few othZ<>er odd I<Z<>things> still work. This should be
-a vertical bar: E<verbar>. Here's a test of a few more special escapes
-that have to be supported:
-
-=over 3
-
-=item E<amp>
-
-An ampersand.
-
-=item E<apos>
-
-An apostrophe.
-
-=item E<lt>
-
-A less-than sign.
-
-=item E<gt>
-
-A greater-than sign.
-
-=item E<quot>
-
-A double quotation mark.
-
-=item E<sol>
-
-A forward slash.
-
-=back
-
-Try to get this bit of text over towards the edge so S<|that all of this
-text inside SE<lt>E<gt> won't|> be wrapped. Also test the
-|sameE<nbsp>thingE<nbsp>withE<nbsp>non-breakingS< spaces>.|
-
-There is a soft hyE<shy>phen in hyphen at hy-phen.
-
-This is a test of an X<index entry>index entry.
-
-=head1 VERBATIM
-
-Throw in a few verbatim paragraphs.
-
- use Term::ANSIColor;
- print color 'bold blue';
- print "This text is bold blue.\n";
- print color 'reset';
- print "This text is normal.\n";
- print colored ("Yellow on magenta.\n", 'yellow on_magenta');
- print "This text is normal.\n";
- print colored ['yellow on_magenta'], "Yellow on magenta.\n";
-
- use Term::ANSIColor qw(uncolor);
- print uncolor '01;31', "\n";
-
-But this isn't verbatim (make sure it wraps properly), and the next
-paragraph is again:
-
- use Term::ANSIColor qw(:constants);
- print BOLD, BLUE, "This text is in bold blue.\n", RESET;
-
- use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\n"; print "This text is normal.\n";
-
-(Ugh, that's obnoxiously long.) Try different spacing:
-
- Starting with a tab.
-Not
-starting
-with
-a
-tab. But this should still be verbatim.
- As should this.
-
-This isn't.
-
- This is. And this: is an internal tab. It should be:
- |--| <= lined up with that.
-
-(Tricky, but tabs should be expanded before the translator starts in on
-the text since otherwise text with mixed tabs and spaces will get messed
-up.)
-
- And now we test verbatim paragraphs right before a heading. Older
- versions of Pod::Man generated two spaces between paragraphs like this
- and the heading. (In order to properly test this, one may have to
- visually inspect the nroff output when run on the generated *roff
- text, unfortunately.)
-
-=head1 CONCLUSION
-
-That's all, folks!
-
-=cut
Deleted: vendor/perl/dist/lib/Pod/t/basic.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/basic.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/basic.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,127 +0,0 @@
-#!/usr/bin/perl -w
-#
-# basic.t -- Basic tests for podlators.
-#
-# Copyright 2001, 2002, 2004, 2006 by Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-BEGIN {
- chdir 't' if -d 't';
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- } else {
- unshift (@INC, '../blib/lib');
- }
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..11\n";
-}
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-use Pod::Man;
-use Pod::Text;
-use Pod::Text::Overstrike;
-use Pod::Text::Termcap;
-
-# Find the path to the test source files. This requires some fiddling when
-# these tests are run as part of Perl core.
-sub source_path {
- my $file = shift;
- if ($ENV{PERL_CORE}) {
- require File::Spec;
- my $updir = File::Spec->updir;
- my $dir = File::Spec->catdir ($updir, 'lib', 'Pod', 't');
- return File::Spec->catfile ($dir, $file);
- } else {
- return $file;
- }
-}
-
-$loaded = 1;
-print "ok 1\n";
-
-# Hard-code a few values to try to get reproducible results.
-$ENV{COLUMNS} = 80;
-$ENV{TERM} = 'xterm';
-$ENV{TERMCAP} = 'xterm:co=80:do=^J:md=\E[1m:us=\E[4m:me=\E[m';
-
-# Map of translators to file extensions to find the formatted output to
-# compare against.
-my %translators = ('Pod::Man' => 'man',
- 'Pod::Text' => 'txt',
- 'Pod::Text::Color' => 'clr',
- 'Pod::Text::Overstrike' => 'ovr',
- 'Pod::Text::Termcap' => 'cap');
-
-# Set default options to match those of pod2man and pod2text.
-%options = (sentence => 0);
-
-my $n = 2;
-for (sort keys %translators) {
- if ($_ eq 'Pod::Text::Color') {
- eval { require Term::ANSIColor };
- if ($@) {
- print "ok $n # skip\n";
- $n++;
- print "ok $n # skip\n";
- $n++;
- next;
- }
- require Pod::Text::Color;
- }
- my $parser = $_->new (%options);
- print (($parser && ref ($parser) eq $_) ? "ok $n\n" : "not ok $n\n");
- $n++;
-
- # For Pod::Man, strip out the autogenerated header up to the .TH title
- # line. That means that we don't check those things; oh well. The header
- # changes with each version change or touch of the input file.
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file (source_path ('basic.pod'), \*OUT);
- close OUT;
- if ($_ eq 'Pod::Man') {
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- open (OUTPUT, "> out.$translators{$_}")
- or die "Cannot create out.$translators{$_}: $!\n";
- local $_;
- while (<TMP>) { last if /^\.nh/ }
- print OUTPUT while <TMP>;
- close OUTPUT;
- close TMP;
- unlink 'out.tmp';
- } else {
- rename ('out.tmp', "out.$translators{$_}")
- or die "Cannot rename out.tmp: $!\n";
- }
- {
- local $/;
- open (MASTER, source_path ("basic.$translators{$_}"))
- or die "Cannot open basic.$translators{$_}: $!\n";
- open (OUTPUT, "out.$translators{$_}")
- or die "Cannot open out.$translators{$_}: $!\n";
- my $master = <MASTER>;
- my $output = <OUTPUT>;
- close MASTER;
- close OUTPUT;
-
- # OS/390 is EBCDIC, which uses a different character for ESC
- # apparently. Try to convert so that the test still works.
- if ($^O eq 'os390' && $_ eq 'Pod::Text::Termcap') {
- $output =~ tr/\033/\047/;
- }
-
- if ($master eq $output) {
- print "ok $n\n";
- unlink "out.$translators{$_}";
- } else {
- print "not ok $n\n";
- print "# Non-matching output left in out.$translators{$_}\n";
- }
- }
- $n++;
-}
Deleted: vendor/perl/dist/lib/Pod/t/basic.txt
===================================================================
--- vendor/perl/dist/lib/Pod/t/basic.txt 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/basic.txt 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,269 +0,0 @@
-NAME
- basic.pod - Test of various basic POD features in translators.
-
-HEADINGS
- Try a few different levels of headings, with embedded formatting codes
- and other interesting bits.
-
-This "is" a "level 1" heading
- ``Level'' "2 *heading*
- Level 3 heading *with "weird stuff "" (double quote)"*
- Level "4 "heading"
- Now try again with intermixed text.
-
-This "is" a "level 1" heading
- Text.
-
- ``Level'' 2 *heading*
- Text.
-
- Level 3 heading *with "weird stuff"*
- Text.
-
- Level "4 "heading"
- Text.
-
-LINKS
- These are all taken from the Pod::Parser tests.
-
- Try out *LOTS* of different ways of specifying references:
-
- Reference the "section" in manpage
-
- Reference the "section" in "manpage"
-
- Reference the "section" in manpage
-
- Now try it using the new "|" stuff ...
-
- Reference the thistext|
-
- Reference the thistext |
-
- Reference the thistext|
-
- Reference the thistext |
-
- Reference the thistext|
-
- Reference the thistext|
-
- And then throw in a few new ones of my own.
-
- foo
-
- foo
-
- "bar" in foo
-
- "baz boo" in foo
-
- "bar"
-
- "baz boo"
-
- "baz boo"
-
- "baz boo" in foo bar
-
- "boo var baz"
-
- "bar baz"
-
- "boo", "bar", and "baz"
-
- foobar
-
- Testing *italics*
-
- "*Italic* text" in foo
-
- "Section "with" *other markup*" in foo|bar
-
- Nested <http://www.perl.org/>
-
-OVER AND ITEMS
- Taken from Pod::Parser tests, this is a test to ensure that multiline
- =item paragraphs get indented appropriately.
-
- This is a test.
-
- There should be whitespace now before this line.
-
- Taken from Pod::Parser tests, this is a test to ensure the nested =item
- paragraphs get indented appropriately.
-
- 1 First section.
-
- a this is item a
-
- b this is item b
-
- 2 Second section.
-
- a this is item a
-
- b this is item b
-
- c
- d This is item c & d.
-
- Now some additional weirdness of our own. Make sure that multiple tags
- for one paragraph are properly compacted.
-
- "foo"
- bar
- "baz"
- There shouldn't be any spaces between any of these item tags; this
- idiom is used in perlfunc.
-
- Some longer item text
- Just to make sure that we test paragraphs where the item text
- doesn't fit in the margin of the paragraph (and make sure that this
- paragraph fills a few lines).
-
- Let's also make it multiple paragraphs to be sure that works.
-
- Test use of =over without =item as a block "quote" or block paragraph.
-
- This should be indented four spaces but otherwise formatted the same
- as any other regular text paragraph. Make sure it's long enough to
- see the results of the formatting.....
-
- Now try the same thing nested, and make sure that the indentation is
- reset back properly.
-
- This paragraph should be doubly indented.
-
- This paragraph should only be singly indented.
-
- * This is an item in the middle of a block-quote, which should be
- allowed.
-
- * We're also testing tagless item commands.
-
- Should be back to the single level of indentation.
-
- Should be back to regular indentation.
-
- Now also check the transformation of * into real bullets for man pages.
-
- * An item. We're also testing using =over without a number, and making
- sure that item text wraps properly.
-
- * Another item.
-
- and now test the numbering of item blocks.
-
- 1. First item.
-
- 2. Second item.
-
-FORMATTING CODES
- Another test taken from Pod::Parser.
-
- This is a test to see if I can do not only $self and "method()", but
- also "$self->method()" and "$self->{FIELDNAME}" and "$Foo <=> $Bar"
- without resorting to escape sequences. If I want to refer to the
- right-shift operator I can do something like "$x >> 3" or even "$y >>
- 5".
-
- Now for the grand finale of "$self->method()->{FIELDNAME} = {FOO=>BAR}".
- And I also want to make sure that newlines work like this
- "$self->{FOOBAR} >> 3 and [$b => $a]->[$a <=> $b]"
-
- Of course I should still be able to do all this *with* escape sequences
- too: "$self->method()" and "$self->{FIELDNAME}" and "{FOO=>BAR}".
-
- Dont forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
-
- And make sure that 0 works too!
-
- Now, if I use << or >> as my delimiters, then I have to use whitespace.
- So things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> wont end
- up doing what you might expect since the first > will still terminate
- the first < seen.
-
- Lets make sure these work for empty ones too, like "" and ">>" (just to
- be obnoxious)
-
- The statement: "This is dog kind's *finest* hour!" is a parody of a
- quotation from Winston Churchill.
-
- The following tests are added to those:
-
- Make sure that a few other odd *things* still work. This should be a
- vertical bar: |. Here's a test of a few more special escapes that have
- to be supported:
-
- & An ampersand.
-
- ' An apostrophe.
-
- < A less-than sign.
-
- > A greater-than sign.
-
- " A double quotation mark.
-
- / A forward slash.
-
- Try to get this bit of text over towards the edge so
- |that all of this text inside S<> won't| be wrapped. Also test the
- |same thing with non-breaking spaces.|
-
- There is a soft hyphen in hyphen at hy-phen.
-
- This is a test of an index entry.
-
-VERBATIM
- Throw in a few verbatim paragraphs.
-
- use Term::ANSIColor;
- print color 'bold blue';
- print "This text is bold blue.\n";
- print color 'reset';
- print "This text is normal.\n";
- print colored ("Yellow on magenta.\n", 'yellow on_magenta');
- print "This text is normal.\n";
- print colored ['yellow on_magenta'], "Yellow on magenta.\n";
-
- use Term::ANSIColor qw(uncolor);
- print uncolor '01;31', "\n";
-
- But this isn't verbatim (make sure it wraps properly), and the next
- paragraph is again:
-
- use Term::ANSIColor qw(:constants);
- print BOLD, BLUE, "This text is in bold blue.\n", RESET;
-
- use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\n"; print "This text is normal.\n";
-
- (Ugh, that's obnoxiously long.) Try different spacing:
-
- Starting with a tab.
- Not
- starting
- with
- a
- tab. But this should still be verbatim.
- As should this.
-
- This isn't.
-
- This is. And this: is an internal tab. It should be:
- |--| <= lined up with that.
-
- (Tricky, but tabs should be expanded before the translator starts in on
- the text since otherwise text with mixed tabs and spaces will get messed
- up.)
-
- And now we test verbatim paragraphs right before a heading. Older
- versions of Pod::Man generated two spaces between paragraphs like this
- and the heading. (In order to properly test this, one may have to
- visually inspect the nroff output when run on the generated *roff
- text, unfortunately.)
-
-CONCLUSION
- That's all, folks!
-
Deleted: vendor/perl/dist/lib/Pod/t/color.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/color.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/color.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,88 +0,0 @@
-#!/usr/bin/perl -w
-#
-# color.t -- Additional specialized tests for Pod::Text::Color.
-#
-# Copyright 2002, 2004, 2006 by Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-BEGIN {
- chdir 't' if -d 't';
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- } else {
- unshift (@INC, '../blib/lib');
- }
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..2\n";
-}
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-eval { require Term::ANSIColor };
-if ($@) {
- for (1..2) {
- print "ok $_ # skip\n";
- }
- $loaded = 1;
- exit;
-}
-require Pod::Text::Color;
-
-$loaded = 1;
-print "ok 1\n";
-
-my $parser = Pod::Text::Color->new or die "Cannot create parser\n";
-my $n = 2;
-while (<DATA>) {
- next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
- while (<DATA>) {
- last if $_ eq "###\n";
- print TMP $_;
- }
- close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
- close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- my $output;
- {
- local $/;
- $output = <TMP>;
- }
- close TMP;
- unlink ('tmp.pod', 'out.tmp');
- my $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($output eq $expected) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print "Expected\n========\n$expected\nOutput\n======\n$output\n";
- }
- $n++;
-}
-
-# Below the marker are bits of POD and corresponding expected output. This is
-# used to test specific features or problems with Pod::Text::Termcap. The
-# input and output are separated by lines containing only ###.
-
-__DATA__
-
-###
-=head1 WRAPPING
-
-B<I<Do>> I<B<not>> B<I<include>> B<I<formatting codes when>> B<I<wrapping>>.
-###
-[1mWRAPPING[0m
- [1m[33mDo[0m[0m [33m[1mnot[0m[0m [1m[33minclude[0m[0m [1m[33mformatting codes when[0m[0m [1m[33mwrapping[0m[0m.
-
-###
Deleted: vendor/perl/dist/lib/Pod/t/contains_pod.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/contains_pod.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/contains_pod.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,27 +0,0 @@
-#!/usr/bin/env perl
-
-# Copyright (C) 2005 Joshua Hoblitt
-#
-# $Id: contains_pod.t,v 1.1.1.2 2011-02-17 12:49:41 laffer1 Exp $
-
-use strict;
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't';
- @INC = '../lib';
- } else {
- use lib qw( ./lib );
- }
-}
-
-use Test::More tests => 2;
-
-use Pod::Find qw( contains_pod );
-
-{
- ok(contains_pod('lib/contains_pod.xr'), "contains pod");
-}
-
-{
- ok(contains_pod('lib/contains_bad_pod.xr'), "contains bad pod");
-}
Deleted: vendor/perl/dist/lib/Pod/t/eol.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/eol.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/eol.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,95 +0,0 @@
-#!./perl -w
-
-use Test::More tests => 3;
-
-open(POD, ">$$.pod") or die "$$.pod: $!";
-print POD <<__EOF__;
-=pod
-
-=head1 NAME
-
-crlf
-
-=head1 DESCRIPTION
-
-crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
-crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
-crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
-crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
-
- crlf crlf crlf crlf
- crlf crlf crlf crlf
- crlf crlf crlf crlf
-
-crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
-crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
-crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
-crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf
-
-=cut
-__EOF__
-close(POD);
-
-use Pod::Html;
-
-# --- CR ---
-
-open(POD, "<$$.pod") or die "$$.pod: $!";
-open(IN, ">$$.in") or die "$$.in: $!";
-while (<POD>) {
- s/[\r\n]+/\r/g;
- print IN $_;
-}
-close(POD);
-close(IN);
-
-pod2html("--title=eol", "--infile=$$.in", "--outfile=$$.o1");
-
-# --- LF ---
-
-open(POD, "<$$.pod") or die "$$.pod: $!";
-open(IN, ">$$.in") or die "$$.in: $!";
-while (<POD>) {
- s/[\r\n]+/\n/g;
- print IN $_;
-}
-close(POD);
-close(IN);
-
-pod2html("--title=eol", "--infile=$$.in", "--outfile=$$.o2");
-
-# --- CRLF ---
-
-open(POD, "<$$.pod") or die "$$.pod: $!";
-open(IN, ">$$.in") or die "$$.in: $!";
-while (<POD>) {
- s/[\r\n]+/\r\n/g;
- print IN $_;
-}
-close(POD);
-close(IN);
-
-pod2html("--title=eol", "--infile=$$.in", "--outfile=$$.o3");
-
-# --- now test ---
-
-local $/;
-
-open(IN, "<$$.o1") or die "$$.o1: $!";
-my $cksum1 = unpack("%32C*", <IN>);
-
-open(IN, "<$$.o2") or die "$$.o2: $!";
-my $cksum2 = unpack("%32C*", <IN>);
-
-open(IN, "<$$.o3") or die "$$.o3: $!";
-my $cksum3 = unpack("%32C*", <IN>);
-
-ok($cksum1 == $cksum2, "CR vs LF");
-ok($cksum1 == $cksum3, "CR vs CRLF");
-ok($cksum2 == $cksum3, "LF vs CRLF");
-close IN;
-
-END {
- 1 while unlink("$$.pod", "$$.in", "$$.o1", "$$.o2", "$$.o3",
- "pod2htmd.x~~", "pod2htmi.x~~");
-}
Deleted: vendor/perl/dist/lib/Pod/t/filehandle.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/filehandle.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/filehandle.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,121 +0,0 @@
-#!/usr/bin/perl -w
-#
-# filehandle.t -- Test the parse_from_filehandle interface.
-#
-# Copyright 2006 by Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-BEGIN {
- chdir 't' if -d 't';
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- } else {
- unshift (@INC, '../blib/lib');
- }
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..3\n";
-}
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-use Pod::Man;
-use Pod::Text;
-
-$loaded = 1;
-print "ok 1\n";
-
-my $man = Pod::Man->new or die "Cannot create parser\n";
-my $text = Pod::Text->new or die "Cannot create parser\n";
-my $n = 2;
-while (<DATA>) {
- next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
- while (<DATA>) {
- last if $_ eq "###\n";
- print TMP $_;
- }
- close TMP;
- open (IN, '< tmp.pod') or die "Cannot open tmp.pod: $!\n";
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $man->parse_from_filehandle (\*IN, \*OUT);
- close IN;
- close OUT;
- open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- while (<OUT>) { last if /^\.nh/ }
- my $output;
- {
- local $/;
- $output = <OUT>;
- }
- close OUT;
- my $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($output eq $expected) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print "Expected\n========\n$expected\nOutput\n======\n$output\n";
- }
- $n++;
- open (IN, '< tmp.pod') or die "Cannot open tmp.pod: $!\n";
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $text->parse_from_filehandle (\*IN, \*OUT);
- close IN;
- close OUT;
- open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- {
- local $/;
- $output = <OUT>;
- }
- close OUT;
- unlink ('tmp.pod', 'out.tmp');
- $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($output eq $expected) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print "Expected\n========\n$expected\nOutput\n======\n$output\n";
- }
- $n++;
-}
-
-# Below the marker are bits of POD, corresponding expected nroff output, and
-# corresponding expected text output. The input and output are separated by
-# lines containing only ###.
-
-__DATA__
-
-###
-=head1 NAME
-
-gcc - GNU project C and C++ compiler
-
-=head1 C++ NOTES
-
-Other mentions of C++.
-###
-.SH "NAME"
-gcc \- GNU project C and C++ compiler
-.SH "\*(C+ NOTES"
-.IX Header " NOTES"
-Other mentions of \*(C+.
-###
-NAME
- gcc - GNU project C and C++ compiler
-
-C++ NOTES
- Other mentions of C++.
-
-###
Deleted: vendor/perl/dist/lib/Pod/t/htmlescp.pod
===================================================================
--- vendor/perl/dist/lib/Pod/t/htmlescp.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/htmlescp.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,14 +0,0 @@
-=head1 NAME
-
-Escape Sequences Test
-
-=head1 DESCRIPTION
-
-I am a stupid fool who puts naked < & > characters in my POD
-instead of escaping them as E<lt> and E<gt>.
-
-Here is some B<bold> text, some I<italic> plus F</etc/fstab>
-file and something that looks like an E<lt>htmlE<gt> tag.
-This is some C<$code($arg1)>.
-
-=cut
Deleted: vendor/perl/dist/lib/Pod/t/htmlescp.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/htmlescp.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/htmlescp.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,58 +0,0 @@
-#!/usr/bin/perl -w # -*- perl -*-
-
-BEGIN {
- chdir 't' if -d 't';
- unshift @INC, '../lib';
- unshift @INC, '../lib/Pod/t';
- require "pod2html-lib.pl";
-}
-
-use strict;
-use Test::More tests => 1;
-
-convert_n_test("htmlescp", "html escape");
-
-__DATA__
-<?xml version="1.0" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>NAME</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rev="made" href="mailto:[PERLADMIN]" />
-</head>
-
-<body style="background-color: white">
-
-
-<!-- INDEX BEGIN -->
-<div name="index">
-<p><a name="__index__"></a></p>
-
-<ul>
-
- <li><a href="#name">NAME</a></li>
- <li><a href="#description">DESCRIPTION</a></li>
-</ul>
-
-<hr name="index" />
-</div>
-<!-- INDEX END -->
-
-<p>
-</p>
-<h1><a name="name">NAME</a></h1>
-<p>Escape Sequences Test</p>
-<p>
-</p>
-<hr />
-<h1><a name="description">DESCRIPTION</a></h1>
-<p>I am a stupid fool who puts naked < & > characters in my POD
-instead of escaping them as < and >.</p>
-<p>Here is some <strong>bold</strong> text, some <em>italic</em> plus <em class="file">/etc/fstab</em>
-file and something that looks like an <html> tag.
-This is some <code>$code($arg1)</code>.</p>
-
-</body>
-
-</html>
Deleted: vendor/perl/dist/lib/Pod/t/htmllink.pod
===================================================================
--- vendor/perl/dist/lib/Pod/t/htmllink.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/htmllink.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,109 +0,0 @@
-=head1 NAME
-
-htmllink - Test HTML links
-
-=head1 LINKS
-
-L</"section1">
-
-L</"section 2">
-
-L</"section three">
-
-L</"item1">
-
-L</"item 2">
-
-L</"item three">
-
-L</section1>
-
-L</section 2>
-
-L</section three>
-
-L</item1>
-
-L</item 2>
-
-L</item three>
-
-L<"section1">
-
-L<"section 2">
-
-L<"section three">
-
-L<"item1">
-
-L<"item 2">
-
-L<"item three">
-
-L<text|/"section1">
-
-L<text|/"section 2">
-
-L<text|/"section three">
-
-L<text|/"item1">
-
-L<text|/"item 2">
-
-L<text|/"item three">
-
-L<text|/section1>
-
-L<text|/section 2>
-
-L<text|/section three>
-
-L<text|/item1>
-
-L<text|/item 2>
-
-L<text|/item three>
-
-L<text|"section1">
-
-L<text|"section 2">
-
-L<text|"section three">
-
-L<text|"item1">
-
-L<text|"item 2">
-
-L<text|"item three">
-
-=head1 TARGETS
-
-=head2 section1
-
-This is section one.
-
-=head2 section 2
-
-This is section two.
-
-=head2 section three
-
-This is section three.
-
-=over 4
-
-=item item1 X<item> X<one>
-
-This is item one.
-
-=item item 2
-X<item> X<two>
-
-This is item two.
-
-=item item three X<item>
-X<three>
-
-This is item three.
-
-=back
Deleted: vendor/perl/dist/lib/Pod/t/htmllink.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/htmllink.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/htmllink.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,130 +0,0 @@
-#!/usr/bin/perl -w # -*- perl -*-
-
-BEGIN {
- chdir 't' if -d 't';
- unshift @INC, '../lib';
- unshift @INC, '../lib/Pod/t';
- require "pod2html-lib.pl";
-}
-
-use strict;
-use Test::More tests => 1;
-
-convert_n_test("htmllink", "html links");
-
-__DATA__
-<?xml version="1.0" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>htmllink - Test HTML links</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rev="made" href="mailto:[PERLADMIN]" />
-</head>
-
-<body style="background-color: white">
-
-
-<!-- INDEX BEGIN -->
-<div name="index">
-<p><a name="__index__"></a></p>
-
-<ul>
-
- <li><a href="#name">NAME</a></li>
- <li><a href="#links">LINKS</a></li>
- <li><a href="#targets">TARGETS</a></li>
- <ul>
-
- <li><a href="#section1">section1</a></li>
- <li><a href="#section_2">section 2</a></li>
- <li><a href="#section_three">section three</a></li>
- </ul>
-
-</ul>
-
-<hr name="index" />
-</div>
-<!-- INDEX END -->
-
-<p>
-</p>
-<h1><a name="name">NAME</a></h1>
-<p>htmllink - Test HTML links</p>
-<p>
-</p>
-<hr />
-<h1><a name="links">LINKS</a></h1>
-<p><a href="#section1">section1</a></p>
-<p><a href="#section_2">section 2</a></p>
-<p><a href="#section_three">section three</a></p>
-<p><a href="#item1">item1</a></p>
-<p><a href="#item_2">item 2</a></p>
-<p><a href="#item_three">item three</a></p>
-<p><a href="#section1">section1</a></p>
-<p><a href="#section_2">section 2</a></p>
-<p><a href="#section_three">section three</a></p>
-<p><a href="#item1">item1</a></p>
-<p><a href="#item_2">item 2</a></p>
-<p><a href="#item_three">item three</a></p>
-<p><a href="#section1">section1</a></p>
-<p><a href="#section_2">section 2</a></p>
-<p><a href="#section_three">section three</a></p>
-<p><a href="#item1">item1</a></p>
-<p><a href="#item_2">item 2</a></p>
-<p><a href="#item_three">item three</a></p>
-<p><a href="#section1">text</a></p>
-<p><a href="#section_2">text</a></p>
-<p><a href="#section_three">text</a></p>
-<p><a href="#item1">text</a></p>
-<p><a href="#item_2">text</a></p>
-<p><a href="#item_three">text</a></p>
-<p><a href="#section1">text</a></p>
-<p><a href="#section_2">text</a></p>
-<p><a href="#section_three">text</a></p>
-<p><a href="#item1">text</a></p>
-<p><a href="#item_2">text</a></p>
-<p><a href="#item_three">text</a></p>
-<p><a href="#section1">text</a></p>
-<p><a href="#section_2">text</a></p>
-<p><a href="#section_three">text</a></p>
-<p><a href="#item1">text</a></p>
-<p><a href="#item_2">text</a></p>
-<p><a href="#item_three">text</a></p>
-<p>
-</p>
-<hr />
-<h1><a name="targets">TARGETS</a></h1>
-<p>
-</p>
-<h2><a name="section1">section1</a></h2>
-<p>This is section one.</p>
-<p>
-</p>
-<h2><a name="section_2">section 2</a></h2>
-<p>This is section two.</p>
-<p>
-</p>
-<h2><a name="section_three">section three</a></h2>
-<p>This is section three.</p>
-<dl>
-<dt><strong><a name="item1" class="item">item1</a></strong></dt>
-
-<dd>
-<p>This is item one.</p>
-</dd>
-<dt><strong><a name="item_2" class="item">item 2</a></strong></dt>
-
-<dd>
-<p>This is item two.</p>
-</dd>
-<dt><strong><a name="item_three" class="item">item three</a></strong></dt>
-
-<dd>
-<p>This is item three.</p>
-</dd>
-</dl>
-
-</body>
-
-</html>
Deleted: vendor/perl/dist/lib/Pod/t/htmlview.pod
===================================================================
--- vendor/perl/dist/lib/Pod/t/htmlview.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/htmlview.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,146 +0,0 @@
-=head1 NAME
-
-Test HTML Rendering
-
-=head1 SYNOPSIS
-
- use My::Module;
-
- my $module = My::Module->new();
-
-=head1 DESCRIPTION
-
-This is the description.
-
- Here is a verbatim section.
-
-This is some more regular text.
-
-Here is some B<bold> text, some I<italic> and something that looks
-like an E<lt>htmlE<gt> tag. This is some C<$code($arg1)>.
-
-This C<text contains embedded B<bold> and I<italic> tags>. These can
-be nested, allowing B<bold and I<bold E<amp> italic> text>. The module also
-supports the extended B<< syntax >> and permits I<< nested tags E<amp>
-other B<<< cool >>> stuff >>
-
-=head1 METHODS =E<gt> OTHER STUFF
-
-Here is a list of methods
-
-=head2 new()
-
-Constructor method. Accepts the following config options:
-
-=over 4
-
-=item foo
-
-The foo item.
-
-=item bar
-
-The bar item.
-
-=over 4
-
-This is a list within a list
-
-=item *
-
-The wiz item.
-
-=item *
-
-The waz item.
-
-=back
-
-=item baz
-
-The baz item.
-
-=back
-
-Title on the same line as the =item + * bullets
-
-=over
-
-=item * C<Black> Cat
-
-=item * Sat S<I<on> the>
-
-=item * MatE<lt>!E<gt>
-
-=back
-
-Title on the same line as the =item + numerical bullets
-
-=over
-
-=item 1 Cat
-
-=item 2 Sat
-
-=item 3 Mat
-
-=back
-
-No bullets, no title
-
-=over
-
-=item
-
-Cat
-
-=item
-
-Sat
-
-=item
-
-Mat
-
-=back
-
-=head2 old()
-
-Destructor method
-
-=head1 TESTING FOR AND BEGIN
-
-=for html <br />
-<p>
-blah blah
-</p>
-
-intermediate text
-
-=begin html
-
-<more>
-HTML
-</more>
-
-some text
-
-=end html
-
-=head1 TESTING URLs hyperlinking
-
-This is an href link1: http://example.com
-
-This is an href link2: http://example.com/foo/bar.html
-
-This is an email link: mailto:foo at bar.com
-
- This is a link in a verbatim block <a href="http://perl.org"> Perl </a>
-
-=head1 SEE ALSO
-
-See also L<Test Page 2|htmlescp>, the L<Your::Module> and L<Their::Module>
-manpages and the other interesting file F</usr/local/my/module/rocks>
-as well.
-
-=cut
Deleted: vendor/perl/dist/lib/Pod/t/htmlview.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/htmlview.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/htmlview.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,186 +0,0 @@
-#!/usr/bin/perl -w # -*- perl -*-
-
-BEGIN {
- chdir 't' if -d 't';
- unshift @INC, '../lib';
- unshift @INC, '../lib/Pod/t';
- require "pod2html-lib.pl";
-}
-
-use strict;
-use Test::More tests => 1;
-
-convert_n_test("htmlview", "html rendering");
-
-__DATA__
-<?xml version="1.0" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>NAME</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rev="made" href="mailto:[PERLADMIN]" />
-</head>
-
-<body style="background-color: white">
-
-
-<!-- INDEX BEGIN -->
-<div name="index">
-<p><a name="__index__"></a></p>
-
-<ul>
-
- <li><a href="#name">NAME</a></li>
- <li><a href="#synopsis">SYNOPSIS</a></li>
- <li><a href="#description">DESCRIPTION</a></li>
- <li><a href="#methods____other_stuff">METHODS => OTHER STUFF</a></li>
- <ul>
-
- <li><a href="#new__"><code>new()</code></a></li>
- <li><a href="#old__"><code>old()</code></a></li>
- </ul>
-
- <li><a href="#testing_for_and_begin">TESTING FOR AND BEGIN</a></li>
- <li><a href="#testing_urls_hyperlinking">TESTING URLs hyperlinking</a></li>
- <li><a href="#see_also">SEE ALSO</a></li>
-</ul>
-
-<hr name="index" />
-</div>
-<!-- INDEX END -->
-
-<p>
-</p>
-<h1><a name="name">NAME</a></h1>
-<p>Test HTML Rendering</p>
-<p>
-</p>
-<hr />
-<h1><a name="synopsis">SYNOPSIS</a></h1>
-<pre>
- use My::Module;</pre>
-<pre>
- my $module = My::Module->new();</pre>
-<p>
-</p>
-<hr />
-<h1><a name="description">DESCRIPTION</a></h1>
-<p>This is the description.</p>
-<pre>
- Here is a verbatim section.</pre>
-<p>This is some more regular text.</p>
-<p>Here is some <strong>bold</strong> text, some <em>italic</em> and something that looks
-like an <html> tag. This is some <code>$code($arg1)</code>.</p>
-<p>This <code>text contains embedded bold and italic tags</code>. These can
-be nested, allowing <strong>bold and <em>bold & italic</em> text</strong>. The module also
-supports the extended <strong>syntax </strong>> and permits <em>nested tags &
-other <strong>cool </strong></em>> stuff >></p>
-<p>
-</p>
-<hr />
-<h1><a name="methods____other_stuff">METHODS => OTHER STUFF</a></h1>
-<p>Here is a list of methods</p>
-<p>
-</p>
-<h2><a name="new__"><code>new()</code></a></h2>
-<p>Constructor method. Accepts the following config options:</p>
-<dl>
-<dt><strong><a name="foo" class="item">foo</a></strong></dt>
-
-<dd>
-<p>The foo item.</p>
-</dd>
-<dt><strong><a name="bar" class="item">bar</a></strong></dt>
-
-<dd>
-<p>The bar item.</p>
-<p>This is a list within a list</p>
-<ul>
-<li>
-<p>The wiz item.</p>
-</li>
-<li>
-<p>The waz item.</p>
-</li>
-</ul>
-</dd>
-<dt><strong><a name="baz" class="item">baz</a></strong></dt>
-
-<dd>
-<p>The baz item.</p>
-</dd>
-</dl>
-<p>Title on the same line as the =item + * bullets</p>
-<ul>
-<li><strong><a name="black_cat" class="item"><code>Black</code> Cat</a></strong>
-
-</li>
-<li><strong><a name="sat_on_the" class="item">Sat <em>on</em> the</a></strong>
-
-</li>
-<li><strong><a name="mat" class="item">Mat<!></a></strong>
-
-</li>
-</ul>
-<p>Title on the same line as the =item + numerical bullets</p>
-<ol>
-<li><strong><a name="cat" class="item">Cat</a></strong>
-
-</li>
-<li><strong><a name="sat" class="item">Sat</a></strong>
-
-</li>
-<li><strong><a name="mat2" class="item">Mat</a></strong>
-
-</li>
-</ol>
-<p>No bullets, no title</p>
-<dl>
-<dt>
-<dd>
-<p>Cat</p>
-</dd>
-<dt>
-<dd>
-<p>Sat</p>
-</dd>
-<dt>
-<dd>
-<p>Mat</p>
-</dd>
-</dl>
-<p>
-</p>
-<h2><a name="old__"><code>old()</code></a></h2>
-<p>Destructor method</p>
-<p>
-</p>
-<hr />
-<h1><a name="testing_for_and_begin">TESTING FOR AND BEGIN</a></h1>
-<br />
-<p>
-blah blah
-</p><p>intermediate text</p>
-<more>
-HTML
-</more>some text<p>
-</p>
-<hr />
-<h1><a name="testing_urls_hyperlinking">TESTING URLs hyperlinking</a></h1>
-<p>This is an href link1: <a href="http://example.com">http://example.com</a></p>
-<p>This is an href link2: <a href="http://example.com/foo/bar.html">http://example.com/foo/bar.html</a></p>
-<p>This is an email link: <a href="mailto:mailto:foo at bar.com">mailto:foo at bar.com</a></p>
-<pre>
- This is a link in a verbatim block <a href="<a href="http://perl.org">http://perl.org</a>"> Perl </a></pre>
-<p>
-</p>
-<hr />
-<h1><a name="see_also">SEE ALSO</a></h1>
-<p>See also <a href="/t/htmlescp.html">Test Page 2</a>, the <a href="/Your/Module.html">the Your::Module manpage</a> and <a href="/Their/Module.html">the Their::Module manpage</a>
-manpages and the other interesting file <em class="file">/usr/local/my/module/rocks</em>
-as well.</p>
-
-</body>
-
-</html>
Deleted: vendor/perl/dist/lib/Pod/t/man-options.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/man-options.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/man-options.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,175 +0,0 @@
-#!/usr/bin/perl -w
-#
-# man-options.t -- Additional tests for Pod::Man options.
-#
-# Copyright 2002, 2004, 2006, 2008 Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-BEGIN {
- chdir 't' if -d 't';
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- } else {
- unshift (@INC, '../blib/lib');
- }
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..7\n";
-}
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-use Pod::Man;
-
-# Redirect stderr to a file.
-sub stderr_save {
- open (OLDERR, '>&STDERR') or die "Can't dup STDERR: $!\n";
- open (STDERR, '> out.err') or die "Can't redirect STDERR: $!\n";
-}
-
-# Restore stderr.
-sub stderr_restore {
- close STDERR;
- open (STDERR, '>&OLDERR') or die "Can't dup STDERR: $!\n";
- close OLDERR;
-}
-
-$loaded = 1;
-print "ok 1\n";
-
-my $n = 2;
-while (<DATA>) {
- my %options;
- next until $_ eq "###\n";
- while (<DATA>) {
- last if $_ eq "###\n";
- my ($option, $value) = split;
- $options{$option} = $value;
- }
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
- while (<DATA>) {
- last if $_ eq "###\n";
- print TMP $_;
- }
- close TMP;
- my $parser = Pod::Man->new (%options) or die "Cannot create parser\n";
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- stderr_save;
- $parser->parse_from_file ('tmp.pod', \*OUT);
- stderr_restore;
- close OUT;
- my $accents = 0;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- while (<TMP>) {
- last if /^\.nh/;
- }
- my $output;
- {
- local $/;
- $output = <TMP>;
- }
- close TMP;
- unlink ('tmp.pod', 'out.tmp');
- my $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($output eq $expected) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print "Expected\n========\n$expected\nOutput\n======\n$output\n";
- }
- $n++;
- open (ERR, 'out.err') or die "Cannot open out.err: $!\n";
- my $errors;
- {
- local $/;
- $errors = <ERR>;
- }
- close ERR;
- unlink ('out.err');
- $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($errors eq $expected) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print "Expected errors:\n ${expected}Errors:\n $errors";
- }
- $n++;
-}
-
-# Below the marker are bits of POD and corresponding expected text output.
-# This is used to test specific features or problems with Pod::Man. The
-# input and output are separated by lines containing only ###.
-
-__DATA__
-
-###
-fixed CR
-fixedbold CY
-fixeditalic CW
-fixedbolditalic CX
-###
-=head1 FIXED FONTS
-
-C<foo B<bar I<baz>> I<bay>>
-###
-.SH "FIXED FONTS"
-.IX Header "FIXED FONTS"
-\&\f(CR\*(C`foo \f(CYbar \f(CXbaz\f(CY\f(CR \f(CWbay\f(CR\*(C'\fR
-###
-###
-
-###
-###
-=over 4
-
-=item Foo
-
-Bar.
-
-=head1 NEXT
-###
-.IP "Foo" 4
-.IX Item "Foo"
-Bar.
-.SH "NEXT"
-.IX Header "NEXT"
-.SH "POD ERRORS"
-.IX Header "POD ERRORS"
-Hey! \fBThe above document had some coding errors, which are explained below:\fR
-.IP "Around line 7:" 4
-.IX Item "Around line 7:"
-You forgot a '=back' before '=head1'
-###
-###
-
-###
-stderr 1
-###
-=over 4
-
-=item Foo
-
-Bar.
-
-=head1 NEXT
-###
-.IP "Foo" 4
-.IX Item "Foo"
-Bar.
-.SH "NEXT"
-.IX Header "NEXT"
-###
-tmp.pod around line 7: You forgot a '=back' before '=head1'
-###
Deleted: vendor/perl/dist/lib/Pod/t/man-utf8.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/man-utf8.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/man-utf8.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,141 +0,0 @@
-#!/usr/bin/perl -w
-#
-# man-options.t -- Additional tests for Pod::Man options.
-#
-# Copyright 2002, 2004, 2006, 2008 Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-BEGIN {
- chdir 't' if -d 't';
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- } else {
- unshift (@INC, '../blib/lib');
- }
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..5\n";
-
- # UTF-8 support requires Perl 5.8 or later.
- if ($] < 5.008) {
- my $n;
- for $n (1..5) {
- print "ok $n # skip -- Perl 5.8 required for UTF-8 support\n";
- }
- exit;
- }
-}
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-use Pod::Man;
-
-$loaded = 1;
-print "ok 1\n";
-
-my $n = 2;
-eval { binmode (\*DATA, ':encoding(utf-8)') };
-eval { binmode (\*STDOUT, ':encoding(utf-8)') };
-while (<DATA>) {
- my %options;
- next until $_ eq "###\n";
- while (<DATA>) {
- last if $_ eq "###\n";
- my ($option, $value) = split;
- $options{$option} = $value;
- }
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
- eval { binmode (\*TMP, ':encoding(utf-8)') };
- print TMP "=encoding utf-8\n\n";
- while (<DATA>) {
- last if $_ eq "###\n";
- print TMP $_;
- }
- close TMP;
- my $parser = Pod::Man->new (%options) or die "Cannot create parser\n";
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
- close OUT;
- my $accents = 0;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- eval { binmode (\*TMP, ':encoding(utf-8)') };
- while (<TMP>) {
- $accents = 1 if /Accent mark definitions/;
- last if /^\.nh/;
- }
- my $output;
- {
- local $/;
- $output = <TMP>;
- }
- close TMP;
- unlink ('tmp.pod', 'out.tmp');
- if (($options{utf8} && !$accents) || (!$options{utf8} && $accents)) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print ($accents ? "Saw accents\n" : "Saw no accents\n");
- print ($options{utf8} ? "Wanted no accents\n" : "Wanted accents\n");
- }
- $n++;
- my $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($output eq $expected) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print "Expected\n========\n$expected\nOutput\n======\n$output\n";
- }
- $n++;
-}
-
-# Below the marker are bits of POD and corresponding expected text output.
-# This is used to test specific features or problems with Pod::Man. The
-# input and output are separated by lines containing only ###.
-
-__DATA__
-
-###
-utf8 1
-###
-=head1 BEYONCÉ
-
-Beyoncé! Beyoncé! Beyoncé!!
-
- Beyoncé! Beyoncé!
- Beyoncé! Beyoncé!
- Beyoncé! Beyoncé!
-
-Older versions did not convert Beyoncé in verbatim.
-###
-.SH "BEYONCÉ"
-.IX Header "BEYONCÉ"
-Beyoncé! Beyoncé! Beyoncé!!
-.PP
-.Vb 3
-\& Beyoncé! Beyoncé!
-\& Beyoncé! Beyoncé!
-\& Beyoncé! Beyoncé!
-.Ve
-.PP
-Older versions did not convert Beyoncé in verbatim.
-###
-
-###
-utf8 1
-###
-=head1 SE<lt>E<gt> output with UTF-8
-
-This is S<non-breaking output>.
-###
-.SH "S<> output with UTF\-8"
-.IX Header "S<> output with UTF-8"
-This is non-breaking output.
-###
Deleted: vendor/perl/dist/lib/Pod/t/man.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/man.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/man.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,484 +0,0 @@
-#!/usr/bin/perl -w
-#
-# man.t -- Additional specialized tests for Pod::Man.
-#
-# Copyright 2002, 2003, 2004, 2006, 2007, 2008
-# Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-BEGIN {
- chdir 't' if -d 't';
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- } else {
- unshift (@INC, '../blib/lib');
- }
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..25\n";
-}
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-use Pod::Man;
-
-$loaded = 1;
-print "ok 1\n";
-
-# Test whether we can use binmode to set encoding.
-my $have_encoding = (eval { require PerlIO::encoding; 1 } and not $@);
-
-my $parser = Pod::Man->new or die "Cannot create parser\n";
-my $n = 2;
-while (<DATA>) {
- next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
-
- # We have a test in ISO 8859-1 encoding. Make sure that nothing strange
- # happens if Perl thinks the world is Unicode. Wrap this in eval so that
- # older versions of Perl don't croak.
- eval { binmode (\*TMP, ':encoding(iso-8859-1)') if $have_encoding };
-
- while (<DATA>) {
- last if $_ eq "###\n";
- print TMP $_;
- }
- close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
- close OUT;
- open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- while (<OUT>) { last if /^\.nh/ }
- my $output;
- {
- local $/;
- $output = <OUT>;
- }
- close OUT;
- unlink ('tmp.pod', 'out.tmp');
- my $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($output eq $expected) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print "Expected\n========\n$expected\nOutput\n======\n$output\n";
- }
- $n++;
-}
-
-# Below the marker are bits of POD and corresponding expected nroff output.
-# This is used to test specific features or problems with Pod::Man. The input
-# and output are separated by lines containing only ###.
-
-__DATA__
-
-###
-=head1 NAME
-
-gcc - GNU project C and C++ compiler
-
-=head1 C++ NOTES
-
-Other mentions of C++.
-###
-.SH "NAME"
-gcc \- GNU project C and C++ compiler
-.SH "\*(C+ NOTES"
-.IX Header " NOTES"
-Other mentions of \*(C+.
-###
-
-###
-=head1 PERIODS
-
-This C<.> should be quoted.
-###
-.SH "PERIODS"
-.IX Header "PERIODS"
-This \f(CW\*(C`.\*(C'\fR should be quoted.
-###
-
-###
-=over 4
-
-=item *
-
-A bullet.
-
-=item *
-
-Another bullet.
-
-=item * Also a bullet.
-
-=back
-###
-.IP "\(bu" 4
-A bullet.
-.IP "\(bu" 4
-Another bullet.
-.IP "\(bu" 4
-Also a bullet.
-###
-
-###
-=over 4
-
-=item foo
-
-Not a bullet.
-
-=item *
-
-Also not a bullet.
-
-=back
-###
-.IP "foo" 4
-.IX Item "foo"
-Not a bullet.
-.IP "*" 4
-Also not a bullet.
-###
-
-###
-=encoding iso-8859-1
-
-=head1 ACCENTS
-
-Beyonc\xE9! Beyonc\xE9! Beyonc\xE9!!
-
- Beyonc\xE9! Beyonc\xE9!
- Beyonc\xE9! Beyonc\xE9!
- Beyonc\xE9! Beyonc\xE9!
-
-Older versions didn't convert Beyonc\xE9 in verbatim.
-###
-.SH "ACCENTS"
-.IX Header "ACCENTS"
-Beyonce\*'! Beyonce\*'! Beyonce\*'!!
-.PP
-.Vb 3
-\& Beyonce\*'! Beyonce\*'!
-\& Beyonce\*'! Beyonce\*'!
-\& Beyonce\*'! Beyonce\*'!
-.Ve
-.PP
-Older versions didn't convert Beyonce\*' in verbatim.
-###
-
-###
-=over 4
-
-=item 1. Not a number
-
-=item 2. Spaced right
-
-=back
-
-=over 2
-
-=item 1 Not a number
-
-=item 2 Spaced right
-
-=back
-###
-.IP "1. Not a number" 4
-.IX Item "1. Not a number"
-.PD 0
-.IP "2. Spaced right" 4
-.IX Item "2. Spaced right"
-.IP "1 Not a number" 2
-.IX Item "1 Not a number"
-.IP "2 Spaced right" 2
-.IX Item "2 Spaced right"
-###
-
-###
-=over 4
-
-=item Z<>*
-
-Not bullet.
-
-=back
-###
-.IP "*" 4
-Not bullet.
-###
-
-###
-=head1 SEQS
-
-"=over ... Z<>=back"
-
-"SE<lt>...E<gt>"
-
-The quotes should be converted in the above to paired quotes.
-###
-.SH "SEQS"
-.IX Header "SEQS"
-\&\*(L"=over ... =back\*(R"
-.PP
-\&\*(L"S<...>\*(R"
-.PP
-The quotes should be converted in the above to paired quotes.
-###
-
-###
-=head1 YEN
-
-It cost me E<165>12345! That should be an X.
-###
-.SH "YEN"
-.IX Header "YEN"
-It cost me X12345! That should be an X.
-###
-
-###
-=head1 agrave
-
-Open E<agrave> la shell. Previous versions mapped it wrong.
-###
-.SH "agrave"
-.IX Header "agrave"
-Open a\*` la shell. Previous versions mapped it wrong.
-###
-
-###
-=over
-
-=item First level
-
-Blah blah blah....
-
-=over
-
-=item *
-
-Should be a bullet.
-
-=back
-
-=back
-###
-.IP "First level" 4
-.IX Item "First level"
-Blah blah blah....
-.RS 4
-.IP "\(bu" 4
-Should be a bullet.
-.RE
-.RS 4
-.RE
-###
-
-###
-=over 4
-
-=item 1. Check fonts in @CARP_NOT test.
-
-=back
-###
-.ie n .IP "1. Check fonts in @CARP_NOT test." 4
-.el .IP "1. Check fonts in \f(CW at CARP_NOT\fR test." 4
-.IX Item "1. Check fonts in @CARP_NOT test."
-###
-
-###
-=head1 LINK QUOTING
-
-There should not be double quotes: L<C<< (?>pattern) >>>.
-###
-.SH "LINK QUOTING"
-.IX Header "LINK QUOTING"
-There should not be double quotes: \f(CW\*(C`(?>pattern)\*(C'\fR.
-###
-
-###
-=head1 SE<lt>E<gt> MAGIC
-
-Magic should be applied S<RISC OS> to that.
-###
-.SH "S<> MAGIC"
-.IX Header "S<> MAGIC"
-Magic should be applied \s-1RISC\s0\ \s-1OS\s0 to that.
-###
-
-###
-=head1 MAGIC MONEY
-
-These should be identical.
-
-Bippity boppity boo "The
-price is $Z<>100."
-
-Bippity boppity boo "The
-price is $100."
-###
-.SH "MAGIC MONEY"
-.IX Header "MAGIC MONEY"
-These should be identical.
-.PP
-Bippity boppity boo \*(L"The
-price is \f(CW$100\fR.\*(R"
-.PP
-Bippity boppity boo \*(L"The
-price is \f(CW$100\fR.\*(R"
-###
-
-###
-=head1 NAME
-
-"Stuff" (no guesswork)
-
-=head2 THINGS
-
-Oboy, is this C++ "fun" yet! (guesswork)
-###
-.SH "NAME"
-"Stuff" (no guesswork)
-.SS "\s-1THINGS\s0"
-.IX Subsection "THINGS"
-Oboy, is this \*(C+ \*(L"fun\*(R" yet! (guesswork)
-###
-
-###
-=head1 Newline C Quote Weirdness
-
-Blorp C<'
-''>. Yes.
-###
-.SH "Newline C Quote Weirdness"
-.IX Header "Newline C Quote Weirdness"
-Blorp \f(CW\*(Aq
-\&\*(Aq\*(Aq\fR. Yes.
-###
-
-###
-=head1 Soft Hypen Testing
-
-sigE<shy>action
-manuE<shy>script
-JarkE<shy>ko HieE<shy>taE<shy>nieE<shy>mi
-
-And again:
-
-sigE<173>action
-manuE<173>script
-JarkE<173>ko HieE<173>taE<173>nieE<173>mi
-
-And one more time:
-
-sigE<0x00AD>action
-manuE<0x00AD>script
-JarkE<0x00AD>ko HieE<0x00AD>taE<0x00AD>nieE<0x00AD>mi
-###
-.SH "Soft Hypen Testing"
-.IX Header "Soft Hypen Testing"
-sig\%action
-manu\%script
-Jark\%ko Hie\%ta\%nie\%mi
-.PP
-And again:
-.PP
-sig\%action
-manu\%script
-Jark\%ko Hie\%ta\%nie\%mi
-.PP
-And one more time:
-.PP
-sig\%action
-manu\%script
-Jark\%ko Hie\%ta\%nie\%mi
-###
-
-###
-=head1 XE<lt>E<gt> Whitespace
-
-Blorpy L<B<prok>|blap> X<bivav> wugga chachacha.
-###
-.SH "X<> Whitespace"
-.IX Header "X<> Whitespace"
-Blorpy \fBprok\fR wugga chachacha.
-.IX Xref "bivav"
-###
-
-###
-=head1 Hyphen in SE<lt>E<gt>
-
-Don't S<transform even-this hyphen>. This "one's-fine!", as well. However,
-$-0.13 should have a real hyphen.
-###
-.SH "Hyphen in S<>"
-.IX Header "Hyphen in S<>"
-Don't transform\ even-this\ hyphen. This \*(L"one's-fine!\*(R", as well. However,
-$\-0.13 should have a real hyphen.
-###
-
-###
-=head1 Quote escaping
-
-Don't escape `this' but do escape C<`this'> (and don't surround it in quotes).
-###
-.SH "Quote escaping"
-.IX Header "Quote escaping"
-Don't escape `this' but do escape \f(CW\`this\*(Aq\fR (and don't surround it in quotes).
-###
-
-###
-=pod
-
-E<eth>
-###
-.PP
-\&\*(d-
-###
-
-###
-=head1 C<one> and C<two>
-###
-.ie n .SH """one"" and ""two"""
-.el .SH "\f(CWone\fP and \f(CWtwo\fP"
-.IX Header "one and two"
-###
-
-###
-=pod
-
-Some text.
-
-=for man
-Some raw nroff.
-
-=for roff \fBBold text.\fP
-
-=for html
-Stuff that's hidden.
-
-=for MAN \fIItalic text.\fP
-
-=for ROFF
-.PP
-\&A paragraph.
-
-More text.
-###
-Some text.
-Some raw nroff.
-\fBBold text.\fP
-\fIItalic text.\fP
-.PP
-\&A paragraph.
-.PP
-More text.
-###
Deleted: vendor/perl/dist/lib/Pod/t/parselink.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/parselink.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/parselink.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,132 +0,0 @@
-#!/usr/bin/perl -w
-#
-# parselink.t -- Tests for Pod::ParseLink.
-#
-# Copyright 2001 by Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-# The format of each entry in this array is the L<> text followed by the
-# five-element parse returned by parselink. When adding a new test, also
-# increment the test count in the BEGIN block below. We don't use any of the
-# fancy test modules intentionally for backward compatibility to older
-# versions of Perl.
- at TESTS = (
- [ 'foo',
- undef, 'foo', 'foo', undef, 'pod' ],
-
- [ 'foo|bar',
- 'foo', 'foo', 'bar', undef, 'pod' ],
-
- [ 'foo/bar',
- undef, '"bar" in foo', 'foo', 'bar', 'pod' ],
-
- [ 'foo/"baz boo"',
- undef, '"baz boo" in foo', 'foo', 'baz boo', 'pod' ],
-
- [ '/bar',
- undef, '"bar"', undef, 'bar', 'pod' ],
-
- [ '/"baz boo"',
- undef, '"baz boo"', undef, 'baz boo', 'pod' ],
-
- [ '/baz boo',
- undef, '"baz boo"', undef, 'baz boo', 'pod' ],
-
- [ 'foo bar/baz boo',
- undef, '"baz boo" in foo bar', 'foo bar', 'baz boo', 'pod' ],
-
- [ 'foo bar / baz boo',
- undef, '"baz boo" in foo bar', 'foo bar', 'baz boo', 'pod' ],
-
- [ "foo\nbar\nbaz\n/\nboo",
- undef, '"boo" in foo bar baz', 'foo bar baz', 'boo', 'pod' ],
-
- [ 'anchor|name/section',
- 'anchor', 'anchor', 'name', 'section', 'pod' ],
-
- [ '"boo var baz"',
- undef, '"boo var baz"', undef, 'boo var baz', 'pod' ],
-
- [ 'bar baz',
- undef, '"bar baz"', undef, 'bar baz', 'pod' ],
-
- [ '"boo bar baz / baz boo"',
- undef, '"boo bar baz / baz boo"', undef, 'boo bar baz / baz boo',
- 'pod' ],
-
- [ 'fooZ<>bar',
- undef, 'fooZ<>bar', 'fooZ<>bar', undef, 'pod' ],
-
- [ 'Testing I<italics>|foo/bar',
- 'Testing I<italics>', 'Testing I<italics>', 'foo', 'bar', 'pod' ],
-
- [ 'foo/I<Italic> text',
- undef, '"I<Italic> text" in foo', 'foo', 'I<Italic> text', 'pod' ],
-
- [ 'fooE<verbar>barZ<>/Section C<with> I<B<other> markup',
- undef, '"Section C<with> I<B<other> markup" in fooE<verbar>barZ<>',
- 'fooE<verbar>barZ<>', 'Section C<with> I<B<other> markup', 'pod' ],
-
- [ 'Nested L<http://www.perl.org/>|fooE<sol>bar',
- 'Nested L<http://www.perl.org/>', 'Nested L<http://www.perl.org/>',
- 'fooE<sol>bar', undef, 'pod' ],
-
- [ 'ls(1)',
- undef, 'ls(1)', 'ls(1)', undef, 'man' ],
-
- [ ' perlfunc(1)/open ',
- undef, '"open" in perlfunc(1)', 'perlfunc(1)', 'open', 'man' ],
-
- [ 'some manual page|perl(1)',
- 'some manual page', 'some manual page', 'perl(1)', undef, 'man' ],
-
- [ 'http://www.perl.org/',
- undef, 'http://www.perl.org/', 'http://www.perl.org/', undef, 'url' ],
-
- [ 'news:yld72axzc8.fsf at windlord.stanford.edu',
- undef, 'news:yld72axzc8.fsf at windlord.stanford.edu',
- 'news:yld72axzc8.fsf at windlord.stanford.edu', undef, 'url' ]
-);
-
-BEGIN {
- chdir 't' if -d 't';
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..25\n";
-}
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-use Pod::ParseLink;
-$loaded = 1;
-print "ok 1\n";
-
-# Used for reporting test failures.
-my @names = qw(text inferred name section type);
-
-my $n = 2;
-for (@TESTS) {
- my @expected = @$_;
- my $link = shift @expected;
- my @results = parselink ($link);
- my $okay = 1;
- for (0..4) {
- # Make sure to check undef explicitly; we don't want undef to match
- # the empty string because they're semantically different.
- unless ((!defined ($results[$_]) && !defined ($expected[$_]))
- || (defined ($results[$_]) && defined ($expected[$_])
- && $results[$_] eq $expected[$_])) {
- print "not ok $n\n" if $okay;
- print "# Incorrect $names[$_]:\n";
- print "# expected: $expected[$_]\n";
- print "# seen: $results[$_]\n";
- $okay = 0;
- }
- }
- print "ok $n\n" if $okay;
- $n++;
-}
Deleted: vendor/perl/dist/lib/Pod/t/pod-parser.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/pod-parser.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/pod-parser.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,102 +0,0 @@
-#!/usr/bin/perl -w
-#
-# pod-parser.t -- Tests for backward compatibility with Pod::Parser.
-#
-# Copyright 2006, 2008 by Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-BEGIN {
- chdir 't' if -d 't';
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- } else {
- unshift (@INC, '../blib/lib');
- }
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..4\n";
-}
-
-my $loaded;
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-use Pod::Man;
-use Pod::Text;
-use strict;
-
-$loaded = 1;
-print "ok 1\n";
-
-my $parser = Pod::Man->new or die "Cannot create parser\n";
-open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
-print TMP "Some random B<text>.\n";
-close TMP;
-open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
-$parser->parse_from_file ({ -cutting => 0 }, 'tmp.pod', \*OUT);
-close OUT;
-open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
-while (<OUT>) { last if /^\.nh/ }
-my $output;
-{
- local $/;
- $output = <OUT>;
-}
-close OUT;
-if ($output eq "Some random \\fBtext\\fR.\n") {
- print "ok 2\n";
-} else {
- print "not ok 2\n";
- print "Expected\n========\nSome random \\fBtext\\fR.\n\n";
- print "Output\n======\n$output\n";
-}
-
-$parser = Pod::Text->new or die "Cannot create parser\n";
-open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
-$parser->parse_from_file ({ -cutting => 0 }, 'tmp.pod', \*OUT);
-close OUT;
-open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
-{
- local $/;
- $output = <OUT>;
-}
-close OUT;
-if ($output eq " Some random text.\n\n") {
- print "ok 3\n";
-} else {
- print "not ok 3\n";
- print "Expected\n========\n Some random text.\n\n\n";
- print "Output\n======\n$output\n";
-}
-
-# Test the pod2text function, particularly with only one argument.
-open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
-print TMP "=pod\n\nSome random B<text>.\n";
-close TMP;
-open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
-open (SAVE, '>&STDOUT') or die "Cannot dup stdout: $!\n";
-open (STDOUT, '>&OUT') or die "Cannot replace stdout: $!\n";
-pod2text ('tmp.pod');
-close OUT;
-open (STDOUT, '>&SAVE') or die "Cannot fix stdout: $!\n";
-close SAVE;
-open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
-{
- local $/;
- $output = <OUT>;
-}
-close OUT;
-if ($output eq " Some random text.\n\n") {
- print "ok 4\n";
-} else {
- print "not ok 4\n";
- print "Expected\n========\n Some random text.\n\n\n";
- print "Output\n======\n$output\n";
-}
-
-unlink ('tmp.pod', 'out.tmp');
-exit 0;
Deleted: vendor/perl/dist/lib/Pod/t/pod-spelling.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/pod-spelling.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/pod-spelling.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,76 +0,0 @@
-#!/usr/bin/perl
-#
-# t/pod-spelling.t -- Test POD spelling.
-#
-# Copyright 2008 Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-# Called to skip all tests with a reason.
-sub skip_all {
- print "1..0 # Skipped: @_\n";
- exit;
-}
-
-# Skip all spelling tests unless flagged to run maintainer tests.
-skip_all "Spelling tests only run for maintainer"
- unless $ENV{RRA_MAINTAINER_TESTS};
-
-# Make sure we have prerequisites. hunspell is currently not supported due to
-# lack of support for contractions.
-eval 'use Test::Pod 1.00';
-skip_all "Test::Pod 1.00 required for testing POD" if $@;
-eval 'use Pod::Spell';
-skip_all "Pod::Spell required to test POD spelling" if $@;
-my @spell;
-my %options = (aspell => [ qw(-d en_US --home-dir=./ list) ],
- ispell => [ qw(-d american -l -p /dev/null) ]);
-SEARCH: for my $program (qw/aspell ispell/) {
- for my $dir (split ':', $ENV{PATH}) {
- if (-x "$dir/$program") {
- @spell = ("$dir/$program", @{ $options{$program} });
- }
- last SEARCH if @spell;
- }
-}
-skip_all "aspell or ispell required to test POD spelling" unless @spell;
-
-# Run the test, one for each POD file.
-$| = 1;
-my @pod = all_pod_files ();
-my $count = scalar @pod;
-print "1..$count\n";
-my $n = 1;
-for my $pod (@pod) {
- my $child = open (CHILD, '-|');
- if (not defined $child) {
- die "Cannot fork: $!\n";
- } elsif ($child == 0) {
- my $pid = open (SPELL, '|-', @spell)
- or die "Cannot run @spell: $!\n";
- open (POD, '<', $pod) or die "Cannot open $pod: $!\n";
- my $parser = Pod::Spell->new;
- $parser->parse_from_filehandle (\*POD, \*SPELL);
- close POD;
- close SPELL;
- exit ($? >> 8);
- } else {
- my @words = <CHILD>;
- close CHILD;
- if ($? != 0) {
- print "ok $n # skip - @spell failed: $?\n";
- } elsif (@words) {
- for (@words) {
- s/^\s+//;
- s/\s+$//;
- }
- print "not ok $n\n";
- print " - Misspelled words found in $pod\n";
- print " @words\n";
- } else {
- print "ok $n\n";
- }
- $n++;
- }
-}
Deleted: vendor/perl/dist/lib/Pod/t/pod.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/pod.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/pod.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,11 +0,0 @@
-#!/usr/bin/perl
-#
-# t/pod.t -- Test POD formatting.
-
-eval 'use Test::Pod 1.00';
-if ($@) {
- print "1..1\n";
- print "ok 1 # skip - Test::Pod 1.00 required for testing POD\n";
- exit;
-}
-all_pod_files_ok ();
Deleted: vendor/perl/dist/lib/Pod/t/pod2html-lib.pl
===================================================================
--- vendor/perl/dist/lib/Pod/t/pod2html-lib.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/pod2html-lib.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,62 +0,0 @@
-require Cwd;
-require Pod::Html;
-require Config;
-use File::Spec::Functions;
-
-sub convert_n_test {
- my($podfile, $testname) = @_;
-
- my $cwd = Cwd::cwd();
- my $base_dir = catdir $cwd, updir(), "lib", "Pod";
- my $new_dir = catdir $base_dir, "t";
- my $infile = catfile $new_dir, "$podfile.pod";
- my $outfile = catfile $new_dir, "$podfile.html";
-
- Pod::Html::pod2html(
- "--podpath=t",
- "--podroot=$base_dir",
- "--htmlroot=/",
- "--infile=$infile",
- "--outfile=$outfile"
- );
-
-
- my ($expect, $result);
- {
- local $/;
- # expected
- $expect = <DATA>;
- $expect =~ s/\[PERLADMIN\]/$Config::Config{perladmin}/;
- if (ord("A") == 193) { # EBCDIC.
- $expect =~ s/item_mat_3c_21_3e/item_mat_4c_5a_6e/;
- }
-
- # result
- open my $in, $outfile or die "cannot open $outfile: $!";
- $result = <$in>;
- close $in;
- }
-
- ok($expect eq $result, $testname) or do {
- my $diff = '/bin/diff';
- -x $diff or $diff = '/usr/bin/diff';
- if (-x $diff) {
- my $expectfile = "pod2html-lib.tmp";
- open my $tmpfile, ">", $expectfile or die $!;
- print $tmpfile $expect;
- close $tmpfile;
- my $diffopt = $^O eq 'linux' ? 'u' : 'c';
- open my $diff, "diff -$diffopt $expectfile $outfile |" or die $!;
- print "# $_" while <$diff>;
- close $diff;
- unlink $expectfile;
- }
- };
-
- # pod2html creates these
- 1 while unlink $outfile;
- 1 while unlink "pod2htmd.tmp";
- 1 while unlink "pod2htmi.tmp";
-}
-
-1;
Deleted: vendor/perl/dist/lib/Pod/t/pod2latex.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/pod2latex.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/pod2latex.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,401 +0,0 @@
-#!perl
-# Test that Pod::LaTeX works
-# This test relies on the DATA filehandle
-# DATA contains the latex that is used for comparison
-# and the pod that was used to generate it. The two
-# are separated by '=pod'
-# Note that if the translator is adjusted the output tex
-# will probably not match what is currently there. You
-# will need to adjust it to match (assuming it is correct).
-
-use Test;
-use strict;
-
-BEGIN { plan tests => 177 }
-
-use Pod::LaTeX;
-
-# The link parsing changed between v0.22 and v0.30 of Pod::ParseUtils
-use Pod::ParseUtils;
-my $linkver = $Pod::ParseUtils::VERSION;
-
-# Set up an END block to remove the test output file
-END {
- unlink "test.tex";
-};
-
-ok(1);
-
-# First thing to do is to read the expected output from
-# the DATA filehandle and store it in a scalar.
-# Do this until we read an =pod
-my @reference;
-while (my $line = <DATA>) {
- last if $line =~ /^=pod/;
- push(@reference,$line);
-}
-
-# Create a new parser
-my $parser = Pod::LaTeX->new;
-ok($parser);
-$parser->Head1Level(1);
-# Add the preamble but remember not to compare the timestamps
-$parser->AddPreamble(1);
-$parser->AddPostamble(1);
-
-# For a laugh add a table of contents
-$parser->TableOfContents(1);
-
-# Create an output file
-open(OUTFH, "> test.tex" ) or die "Unable to open test tex file: $!\n";
-
-# Read from the DATA filehandle and write to a new output file
-# Really want to write this to a scalar
-$parser->parse_from_filehandle(\*DATA,\*OUTFH);
-
-close(OUTFH) or die "Error closing OUTFH test.tex: $!\n";
-
-# Now read in OUTFH and compare
-open(INFH, "< test.tex") or die "Unable to read test tex file: $!\n";
-my @output = <INFH>;
-
-ok(@output, @reference);
-for my $i (0..$#reference) {
- next if $reference[$i] =~ /^%%/; # skip timestamp comments
-
- # if we are running a new version of Pod::ParseUtils we need
- # to change the link text. This is a kluge until we drop support
- # for older versions of Pod::ParseUtils
- if ($linkver < 0.29 && $output[$i] =~ /manpage/) {
- # convert our expectations from new to old new format
- $reference[$i] =~ s/Standard link: \\emph\{Pod::LaTeX\}/Standard link: the \\emph\{Pod::LaTeX\} manpage/;
- $reference[$i] =~ s/\\textsf\{sec\} in \\emph\{Pod::LaTeX\}/the section on \\textsf\{sec\} in the \\emph\{Pod::LaTeX\} manpage/;
- }
- ok($output[$i], $reference[$i]);
-}
-
-close(INFH) or die "Error closing INFH test.tex: $!\n";
-
-
-__DATA__
-\documentclass{article}
-\usepackage[T1]{fontenc}
-\usepackage{textcomp}
-
-%% Latex generated from POD in document (unknown)
-%% Using the perl module Pod::LaTeX
-%% Converted on Sat Apr 5 21:16:02 2003
-
-
-\usepackage{makeidx}
-\makeindex
-
-
-\begin{document}
-
-\tableofcontents
-
-\section{Introduction\label{Introduction}\index{Introduction}}
-\begin{itemize}
-
-\item
-
-Always check the return codes of system calls. Good error messages should
-go to STDERR, include which program caused the problem, what the failed
-system call and arguments were, and (\textbf{very important}) should contain
-the standard system error message for what went wrong. Here's a simple
-but sufficient example:
-
-\begin{verbatim}
- opendir(D, $dir) or die "can't opendir $dir: $!";
-\end{verbatim}
-
-\item
-
-Line up your transliterations when it makes sense:
-
-\begin{verbatim}
- tr [abc]
- [xyz];
-\end{verbatim}
-
-
-The above should be aligned since it includes an embedded tab.
-
-
-\item
-
-Think about reusability. Why waste brainpower on a one-shot when you
-might want to do something like it again? Consider generalizing your
-code. Consider writing a module or object class. Consider making your
-code run cleanly with \texttt{use strict} and \texttt{-w} (or \texttt{use warnings} in
-Perl 5.6) in effect. Consider giving away your code. Consider changing
-your whole world view. Consider... oh, never mind.
-
-
-\item
-
-Be consistent.
-
-
-\item
-
-Be nice.
-
-\end{itemize}
-\section{Links\label{Links}\index{Links}}
-
-
-This link should just include one word: \textsf{Pod::LaTeX}
-
-
-
-This link should include the text \texttt{test} even though
-it refers to \texttt{Pod::LaTeX}: \textsf{test}.
-
-
-
-Standard link: \emph{Pod::LaTeX}.
-
-
-
-Now refer to an external section: \textsf{sec} in \emph{Pod::LaTeX}
-
-\section{Lists\label{Lists}\index{Lists}}
-
-
-Test description list with long lines
-
-\begin{description}
-
-\item[{Some short text}] \mbox{}
-
-Some additional para.
-
-\begin{itemize}
-
-\item
-
-Nested itemized list
-
-
-\item
-
-Second item
-
-\end{itemize}
-
-\item[{some longer text than that}] \mbox{}
-
-and again.
-
-
-\item[{this text is even longer and greater than}] \textbf{40 characters}
-
-Some more content for the item.
-
-
-\item[{this is some text with \textit{something across}}] \textbf{the 40 char boundary}
-
-This is item content.
-
-
-\item[{square [ bracket in item}] \mbox{}
-
-Square bracket content
-
-\end{description}
-
-
-And this should be an enumerated list without any cruft after the numbers or additional numbers at all.
-
-\begin{enumerate}
-
-\item
-
-item 1
-
-
-\item
-
-item 2
-
-\end{enumerate}
-\section{Escapes\label{Escapes}\index{Escapes}}
-
-
-Test some normal escapes such as $<$ (lt) and $>$ (gt) and $|$ (verbar) and
-\texttt{\~{}} (tilde) and \& (amp) as well as $<$ (Esc lt) and $|$ (Esc
-verbar) and \textfractionsolidus{} (Esc sol) and $>$ (Esc gt) and \& (Esc amp)
-and " (Esc quot) and even $\alpha$ (Esc alpha).
-
-\section{For blocks\label{For_blocks}\index{For blocks}}
- Some latex code \textbf{here}.
-
-
-
-Some text that should appear.
-
-
-
-Some more text that should appear
-
-Some latex in a \textsf{begin block}
-
-and some more
-
-\begin{equation}
-a = \frac{3}{2}
-\end{equation}
-
-
-
-Back to pod.
-
-\printindex
-
-\end{document}
-=pod
-
-=head1 Introduction
-
-=over 4
-
-=item *
-
-Always check the return codes of system calls. Good error messages should
-go to STDERR, include which program caused the problem, what the failed
-system call and arguments were, and (B<very important>) should contain
-the standard system error message for what went wrong. Here's a simple
-but sufficient example:
-
- opendir(D, $dir) or die "can't opendir $dir: $!";
-
-=item *
-
-Line up your transliterations when it makes sense:
-
- tr [abc]
- [xyz];
-
-The above should be aligned since it includes an embedded tab.
-
-=item *
-
-Think about reusability. Why waste brainpower on a one-shot when you
-might want to do something like it again? Consider generalizing your
-code. Consider writing a module or object class. Consider making your
-code run cleanly with C<use strict> and C<-w> (or C<use warnings> in
-Perl 5.6) in effect. Consider giving away your code. Consider changing
-your whole world view. Consider... oh, never mind.
-
-=item *
-
-Be consistent.
-
-=item *
-
-Be nice.
-
-=back
-
-=head1 Links
-
-This link should just include one word: L<Pod::LaTeX|Pod::LaTeX>
-
-This link should include the text C<test> even though
-it refers to C<Pod::LaTeX>: L<test|Pod::LaTeX>.
-
-Standard link: L<Pod::LaTeX>.
-
-Now refer to an external section: L<Pod::LaTeX/"sec">
-
-
-=head1 Lists
-
-Test description list with long lines
-
-=over 4
-
-=item Some short text
-
-Some additional para.
-
-=over 4
-
-=item *
-
-Nested itemized list
-
-=item *
-
-Second item
-
-=back
-
-=item some longer text than that
-
-and again.
-
-=item this text is even longer and greater than 40 characters
-
-Some more content for the item.
-
-=item this is some text with I<something across> the 40 char boundary
-
-This is item content.
-
-=item square [ bracket in item
-
-Square bracket content
-
-=back
-
-And this should be an enumerated list without any cruft after the numbers or additional numbers at all.
-
-=over 4
-
-=item 1)
-
-item 1
-
-=item 2.
-
-item 2
-
-=back
-
-=head1 Escapes
-
-Test some normal escapes such as < (lt) and > (gt) and | (verbar) and
-~ (tilde) and & (amp) as well as E<lt> (Esc lt) and E<verbar> (Esc
-verbar) and E<sol> (Esc sol) and E<gt> (Esc gt) and E<amp> (Esc amp)
-and E<quot> (Esc quot) and even E<alpha> (Esc alpha).
-
-=head1 For blocks
-
-=for latex
- Some latex code \textbf{here}.
-
-Some text that should appear.
-
-=for comment
- Should not print anything
-
-Some more text that should appear
-
-=begin latex
-
-Some latex in a \textsf{begin block}
-
-and some more
-
-\begin{equation}
-a = \frac{3}{2}
-\end{equation}
-
-=end latex
-
-Back to pod.
-
-=cut
Deleted: vendor/perl/dist/lib/Pod/t/termcap.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/termcap.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/termcap.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,85 +0,0 @@
-#!/usr/bin/perl -w
-#
-# termcap.t -- Additional specialized tests for Pod::Text::Termcap.
-#
-# Copyright 2002, 2004, 2006 by Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-BEGIN {
- chdir 't' if -d 't';
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- } else {
- unshift (@INC, '../blib/lib');
- }
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..2\n";
-}
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-# Hard-code a few values to try to get reproducible results.
-$ENV{COLUMNS} = 80;
-$ENV{TERM} = 'xterm';
-$ENV{TERMCAP} = 'xterm:co=80:do=^J:md=\E[1m:us=\E[4m:me=\E[m';
-
-use Pod::Text::Termcap;
-
-$loaded = 1;
-print "ok 1\n";
-
-my $parser = Pod::Text::Termcap->new or die "Cannot create parser\n";
-my $n = 2;
-while (<DATA>) {
- next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
- while (<DATA>) {
- last if $_ eq "###\n";
- print TMP $_;
- }
- close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
- close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- my $output;
- {
- local $/;
- $output = <TMP>;
- }
- close TMP;
- unlink ('tmp.pod', 'out.tmp');
- my $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($output eq $expected) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print "Expected\n========\n$expected\nOutput\n======\n$output\n";
- }
- $n++;
-}
-
-# Below the marker are bits of POD and corresponding expected output. This is
-# used to test specific features or problems with Pod::Text::Termcap. The
-# input and output are separated by lines containing only ###.
-
-__DATA__
-
-###
-=head1 WRAPPING
-
-B<I<Do>> I<B<not>> B<I<include>> B<I<formatting codes when>> B<I<wrapping>>.
-###
-[1mWRAPPING[m
- [1m[4mDo[m[m [4m[1mnot[m[m [1m[4minclude[m[m [1m[4mformatting codes when[m[m [1m[4mwrapping[m[m.
-
-###
Deleted: vendor/perl/dist/lib/Pod/t/text-encoding.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/text-encoding.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/text-encoding.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,142 +0,0 @@
-#!/usr/bin/perl -w
-#
-# text-encoding.t -- Test Pod::Text with various weird encoding combinations.
-#
-# Copyright 2002, 2004, 2006, 2007, 2008 by Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-BEGIN {
- chdir 't' if -d 't';
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- } else {
- unshift (@INC, '../blib/lib');
- }
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..4\n";
-
- # PerlIO encoding support requires Perl 5.8 or later.
- if ($] < 5.008) {
- my $n;
- for $n (1..4) {
- print "ok $n # skip -- Perl 5.8 required for UTF-8 support\n";
- }
- exit;
- }
-}
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-use Pod::Text;
-
-$loaded = 1;
-print "ok 1\n";
-
-my $n = 2;
-eval { binmode (\*DATA, ':raw') };
-eval { binmode (\*STDOUT, ':raw') };
-while (<DATA>) {
- my %opts;
- $opts{utf8} = 1 if $n == 4;
- my $parser = Pod::Text->new (%opts) or die "Cannot create parser\n";
- next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
- eval { binmode (\*TMP, ':raw') };
- while (<DATA>) {
- last if $_ eq "###\n";
- print TMP $_;
- }
- close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- eval { binmode (\*OUT, ':raw') };
- $parser->parse_from_file ('tmp.pod', \*OUT);
- close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- eval { binmode (\*TMP, ':raw') };
- my $output;
- {
- local $/;
- $output = <TMP>;
- }
- close TMP;
- unlink ('tmp.pod', 'out.tmp');
- my $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($output eq $expected) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print "Expected\n========\n$expected\nOutput\n======\n$output\n";
- }
- $n++;
-}
-
-# Below the marker are bits of POD and corresponding expected text output.
-# This is used to test specific features or problems with Pod::Text. The
-# input and output are separated by lines containing only ###.
-
-__DATA__
-
-###
-=head1 Test of SE<lt>E<gt>
-
-This is S<some whitespace>.
-###
-Test of S<>
- This is some whitespace.
-
-###
-
-###
-=encoding utf-8
-
-=head1 I can eat glass
-
-=over 4
-
-=item Esperanto
-
-Mi povas manÄi vitron, Äi ne damaÄas min.
-
-=item Braille
-
-â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â ¥â â â â â
-
-=item Hindi
-
-मà¥à¤ à¤à¤¾à¤à¤ à¤à¤¾ सà¤à¤¤à¤¾ हà¥à¤ à¤à¤° मà¥à¤à¥ à¤à¤¸à¤¸à¥ à¤à¥à¤ à¤à¥à¤ नहà¥à¤ पहà¥à¤à¤à¤¤à¥.
-
-=back
-
-See L<http://www.columbia.edu/kermit/utf8.html>
-###
-I can eat glass
- Esperanto
- Mi povas manÄi vitron, Äi ne damaÄas min.
-
- Braille
- â â â â â â â â â â â â â â â â â â â â â â â
- â â â â â â â â â ¥â â â â â
-
- Hindi
- मà¥à¤ à¤à¤¾à¤à¤ à¤à¤¾ सà¤à¤¤à¤¾ हà¥à¤ à¤à¤°
- मà¥à¤à¥ à¤à¤¸à¤¸à¥ à¤à¥à¤ à¤à¥à¤ नहà¥à¤
- पहà¥à¤à¤à¤¤à¥.
-
- See <http://www.columbia.edu/kermit/utf8.html>
-
-###
-
-###
-=head1 Beyoncé
-###
-Beyoncé
-###
Deleted: vendor/perl/dist/lib/Pod/t/text-options.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/text-options.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/text-options.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,271 +0,0 @@
-#!/usr/bin/perl -w
-#
-# text-options.t -- Additional tests for Pod::Text options.
-#
-# Copyright 2002, 2004, 2006, 2008 by Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-BEGIN {
- chdir 't' if -d 't';
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- } else {
- unshift (@INC, '../blib/lib');
- }
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..13\n";
-}
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-use Pod::Text;
-
-# Redirect stderr to a file.
-sub stderr_save {
- open (OLDERR, '>&STDERR') or die "Can't dup STDERR: $!\n";
- open (STDERR, '> out.err') or die "Can't redirect STDERR: $!\n";
-}
-
-# Restore stderr.
-sub stderr_restore {
- close STDERR;
- open (STDERR, '>&OLDERR') or die "Can't dup STDERR: $!\n";
- close OLDERR;
-}
-
-$loaded = 1;
-print "ok 1\n";
-
-my $n = 2;
-while (<DATA>) {
- my %options;
- next until $_ eq "###\n";
- while (<DATA>) {
- last if $_ eq "###\n";
- my ($option, $value) = split;
- $options{$option} = $value;
- }
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
- while (<DATA>) {
- last if $_ eq "###\n";
- print TMP $_;
- }
- close TMP;
- my $parser = Pod::Text->new (%options) or die "Cannot create parser\n";
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- stderr_save;
- $parser->parse_from_file ('tmp.pod', \*OUT);
- stderr_restore;
- close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- my $output;
- {
- local $/;
- $output = <TMP>;
- }
- close TMP;
- 1 while unlink ('tmp.pod', 'out.tmp');
- my $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($output eq $expected) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print "Expected\n========\n$expected\nOutput\n======\n$output\n";
- }
- $n++;
- open (ERR, 'out.err') or die "Cannot open out.err: $!\n";
- my $errors;
- {
- local $/;
- $errors = <ERR>;
- }
- close ERR;
- unlink ('out.err');
- $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($errors eq $expected) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print "Expected errors:\n ${expected}Errors:\n $errors";
- }
- $n++;
-}
-
-# Below the marker are bits of POD and corresponding expected text output.
-# This is used to test specific features or problems with Pod::Text. The
-# input and output are separated by lines containing only ###.
-
-__DATA__
-
-###
-alt 1
-###
-=head1 SAMPLE
-
-=over 4
-
-=item F
-
-Paragraph.
-
-=item Bar
-
-=item B
-
-Paragraph.
-
-=item Longer
-
-Paragraph.
-
-=back
-
-###
-
-==== SAMPLE ====
-
-: F Paragraph.
-
-: Bar
-: B Paragraph.
-
-: Longer
- Paragraph.
-
-###
-###
-
-###
-margin 4
-###
-=head1 SAMPLE
-
-This is some body text that is long enough to be a paragraph that wraps,
-thereby testing margins with wrapped paragraphs.
-
- This is some verbatim text.
-
-=over 6
-
-=item Test
-
-This is a test of an indented paragraph.
-
-This is another indented paragraph.
-
-=back
-###
- SAMPLE
- This is some body text that is long enough to be a paragraph that
- wraps, thereby testing margins with wrapped paragraphs.
-
- This is some verbatim text.
-
- Test This is a test of an indented paragraph.
-
- This is another indented paragraph.
-
-###
-###
-
-###
-code 1
-###
-This is some random text.
-This is more random text.
-
-This is some random text.
-This is more random text.
-
-=head1 SAMPLE
-
-This is POD.
-
-=cut
-
-This is more random text.
-###
-This is some random text.
-This is more random text.
-
-This is some random text.
-This is more random text.
-
-SAMPLE
- This is POD.
-
-
-This is more random text.
-###
-###
-
-###
-sentence 1
-###
-=head1 EXAMPLE
-
-Whitespace around C<< this. >> must be ignored per perlpodspec. >>
-needs to eat all of the space in front of it.
-
-=cut
-###
-EXAMPLE
- Whitespace around "this." must be ignored per perlpodspec. >> needs to
- eat all of the space in front of it.
-
-###
-###
-
-###
-###
-=over 4
-
-=item Foo
-
-Bar.
-
-=head1 NEXT
-###
- Foo Bar.
-
-NEXT
-POD ERRORS
- Hey! The above document had some coding errors, which are explained
- below:
-
- Around line 7:
- You forgot a '=back' before '=head1'
-
-###
-###
-
-###
-stderr 1
-###
-=over 4
-
-=item Foo
-
-Bar.
-
-=head1 NEXT
-###
- Foo Bar.
-
-NEXT
-###
-tmp.pod around line 7: You forgot a '=back' before '=head1'
-###
Deleted: vendor/perl/dist/lib/Pod/t/text-utf8.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/text-utf8.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/text-utf8.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,129 +0,0 @@
-#!/usr/bin/perl -w
-#
-# text-utf8.t -- Test Pod::Text with UTF-8 input.
-#
-# Copyright 2002, 2004, 2006, 2007, 2008 by Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-BEGIN {
- chdir 't' if -d 't';
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- } else {
- unshift (@INC, '../blib/lib');
- }
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..3\n";
-
- # UTF-8 support requires Perl 5.8 or later.
- if ($] < 5.008) {
- my $n;
- for $n (1..3) {
- print "ok $n # skip -- Perl 5.8 required for UTF-8 support\n";
- }
- exit;
- }
-}
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-use Pod::Text;
-
-$loaded = 1;
-print "ok 1\n";
-
-my $parser = Pod::Text->new or die "Cannot create parser\n";
-my $n = 2;
-eval { binmode (\*DATA, ':encoding(utf-8)') };
-eval { binmode (\*STDOUT, ':encoding(utf-8)') };
-while (<DATA>) {
- next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
- eval { binmode (\*TMP, ':encoding(utf-8)') };
- print TMP "=encoding UTF-8\n\n";
- while (<DATA>) {
- last if $_ eq "###\n";
- print TMP $_;
- }
- close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
- close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- eval { binmode (\*TMP, ':encoding(utf-8)') };
- my $output;
- {
- local $/;
- $output = <TMP>;
- }
- close TMP;
- unlink ('tmp.pod', 'out.tmp');
- my $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($output eq $expected) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print "Expected\n========\n$expected\nOutput\n======\n$output\n";
- }
- $n++;
-}
-
-# Below the marker are bits of POD and corresponding expected text output.
-# This is used to test specific features or problems with Pod::Text. The
-# input and output are separated by lines containing only ###.
-
-__DATA__
-
-###
-=head1 Test of SE<lt>E<gt>
-
-This is S<some whitespace>.
-###
-Test of S<>
- This is some whitespace.
-
-###
-
-###
-=head1 I can eat glass
-
-=over 4
-
-=item Esperanto
-
-Mi povas manĝi vitron, ĝi ne damaĝas min.
-
-=item Braille
-
-⠊⠀⠉⠁⠝⠀⠑⠁⠞⠀⠛⠇⠁⠎⠎⠀⠁⠝⠙⠀⠊⠞⠀⠙⠕⠑⠎⠝⠞⠀⠓⠥⠗⠞⠀⠍⠑
-
-=item Hindi
-
-मैं काँच खा सकता हूँ और मुझे उससे कोई चोट नहीं पहुंचती.
-
-=back
-
-See L<http://www.columbia.edu/kermit/utf8.html>
-###
-I can eat glass
- Esperanto
- Mi povas manĝi vitron, ĝi ne damaĝas min.
-
- Braille
- ⠊⠀⠉⠁⠝⠀⠑⠁⠞⠀⠛⠇⠁⠎⠎⠀⠁⠝⠙⠀⠊⠞⠀⠙⠕⠑⠎⠝⠞⠀⠓⠥⠗⠞⠀⠍⠑
-
- Hindi
- मैं काँच खा सकता हूँ और मुझे उससे कोई चोट नहीं पहुंचती.
-
- See <http://www.columbia.edu/kermit/utf8.html>
-
-###
Deleted: vendor/perl/dist/lib/Pod/t/text.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/text.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/text.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,147 +0,0 @@
-#!/usr/bin/perl -w
-#
-# text.t -- Additional specialized tests for Pod::Text.
-#
-# Copyright 2002, 2004, 2006, 2007, 2008, 2009 Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-BEGIN {
- chdir 't' if -d 't';
- if ($ENV{PERL_CORE}) {
- @INC = '../lib';
- } else {
- unshift (@INC, '../blib/lib');
- }
- unshift (@INC, '../blib/lib');
- $| = 1;
- print "1..6\n";
-}
-
-END {
- print "not ok 1\n" unless $loaded;
-}
-
-use Pod::Text;
-use Pod::Simple;
-
-$loaded = 1;
-print "ok 1\n";
-
-my $parser = Pod::Text->new or die "Cannot create parser\n";
-my $n = 2;
-while (<DATA>) {
- next until $_ eq "###\n";
- open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
- while (<DATA>) {
- last if $_ eq "###\n";
- print TMP $_;
- }
- close TMP;
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- $parser->parse_from_file ('tmp.pod', \*OUT);
- close OUT;
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- my $output;
- {
- local $/;
- $output = <TMP>;
- }
- close TMP;
- unlink ('tmp.pod', 'out.tmp');
- my $expected = '';
- while (<DATA>) {
- last if $_ eq "###\n";
- $expected .= $_;
- }
- if ($output eq $expected) {
- print "ok $n\n";
- } elsif ($n == 4 && $Pod::Simple::VERSION < 3.06) {
- print "ok $n # skip Pod::Simple S<> parsing bug\n";
- } else {
- print "not ok $n\n";
- print "Expected\n========\n$expected\nOutput\n======\n$output\n";
- }
- $n++;
-}
-
-# Below the marker are bits of POD and corresponding expected text output.
-# This is used to test specific features or problems with Pod::Text. The
-# input and output are separated by lines containing only ###.
-
-__DATA__
-
-###
-=head1 PERIODS
-
-This C<.> should be quoted.
-###
-PERIODS
- This "." should be quoted.
-
-###
-
-###
-=head1 CE<lt>E<gt> WITH SPACES
-
-What does C<< this. >> end up looking like?
-###
-C<> WITH SPACES
- What does "this." end up looking like?
-
-###
-
-###
-=head1 Test of SE<lt>E<gt>
-
-This is some S< > whitespace.
-###
-Test of S<>
- This is some whitespace.
-
-###
-
-###
-=head1 Test of =for
-
-=for comment
-This won't be seen.
-
-Yes.
-
-=for text
-This should be seen.
-
-=for TEXT As should this.
-
-=for man
-But this shouldn't.
-
-Some more text.
-###
-Test of =for
- Yes.
-
-This should be seen.
-As should this.
- Some more text.
-
-###
-
-###
-=pod
-
-text
-
- line1
-
- line3
-###
- text
-
- line1
-
- line3
-
-###
Deleted: vendor/perl/dist/lib/Pod/t/user.t
===================================================================
--- vendor/perl/dist/lib/Pod/t/user.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Pod/t/user.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,104 +0,0 @@
-#!perl
-
-# Purpose: test UserPreamble and UserPostamble
-# It's a minor variation of 'pod2latex.t',
-# subject to the same limitations.
-# Variant provided by
-# Adriano Rodrigues Ferreira <ferreira at triang.com.br>
-
-use Test;
-use strict;
-
-BEGIN { plan tests => 17 }
-
-use Pod::LaTeX;
-
-# The link parsing changed between v0.22 and v0.30 of Pod::ParseUtils
-use Pod::ParseUtils;
-my $linkver = $Pod::ParseUtils::VERSION;
-
-# Set up an END block to remove the test output file
-END {
- unlink "test.tex";
-};
-
-ok(1);
-
-# First thing to do is to read the expected output from
-# the DATA filehandle and store it in a scalar.
-# Do this until we read an =pod
-my @reference;
-while (my $line = <DATA>) {
- last if $line =~ /^=pod/;
- push(@reference,$line);
-}
-
-my $user_preamble = <<PRE;
-
-\\documentclass{article}
-
-\\begin{document}
-PRE
-
-my $user_postamble = <<POST;
-\\end{document}
-
-POST
-
-# Create a new parser
-my %params = (
- UserPreamble => $user_preamble,
- UserPostamble => $user_postamble
-);
-
-my $parser = Pod::LaTeX->new(%params);
-ok($parser);
-
-# Create an output file
-open(OUTFH, "> test.tex" ) or die "Unable to open test tex file: $!\n";
-
-# Read from the DATA filehandle and write to a new output file
-# Really want to write this to a scalar
-$parser->parse_from_filehandle(\*DATA,\*OUTFH);
-
-close(OUTFH) or die "Error closing OUTFH test.tex: $!\n";
-
-# Now read in OUTFH and compare
-open(INFH, "< test.tex") or die "Unable to read test tex file: $!\n";
-my @output = <INFH>;
-
-ok(@output, @reference);
-
-for my $i (0..$#reference) {
- next if $reference[$i] =~ /^%%/; # skip timestamp comments
- ok($output[$i], $reference[$i]);
-}
-
-close(INFH) or die "Error closing INFH test.tex: $!\n";
-
-
-__DATA__
-
-\documentclass{article}
-
-\begin{document}
-
-%% Latex generated from POD in document (unknown)
-%% Using the perl module Pod::LaTeX
-%% Converted on Wed Jan 14 19:04:22 2004
-
-%% Preamble supplied by user.
-
-\section{POD\label{POD}\index{POD}}
-
-
-This is a POD file, very simple. \textit{Bye}.
-
-\end{document}
-
-=pod
-
-=head1 POD
-
-This is a POD file, very simple. I<Bye>.
-
Deleted: vendor/perl/dist/lib/SelfLoader-buggy.t
===================================================================
--- vendor/perl/dist/lib/SelfLoader-buggy.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/SelfLoader-buggy.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,48 +0,0 @@
-#!./perl
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
-use SelfLoader;
-print "1..1\n";
-
-# this script checks that errors on self-loaded
-# subroutines that affect $@ are reported
-
-eval { buggy(); };
-unless ($@ =~ /^syntax error/) {
- print "not ";
-}
-print "ok 1 - syntax errors are reported\n";
-
-__END__
-
-sub buggy
-{
- +>*;
-}
-
-
-# RT 40216
-#
-# by Bo Lindbergh <blgl at hagernas.com>, at Aug 22, 2006 5:42 PM
-#
-# In the example below, there's a syntax error in the selfloaded
-# code for main::buggy. When the eval fails, SelfLoader::AUTOLOAD
-# tries to report this with "croak $@;". Unfortunately,
-# SelfLoader::croak does "require Carp;" without protecting $@,
-# which gets clobbered. The program then dies with the
-# uninformative message " at ./example line 3".
-#
-# #! /usr/local/bin/perl
-# use SelfLoader;
-# buggy();
-# __END__
-# sub buggy
-# {
-# +>*;
-# }
Deleted: vendor/perl/dist/lib/SelfLoader.pm
===================================================================
--- vendor/perl/dist/lib/SelfLoader.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/SelfLoader.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,435 +0,0 @@
-package SelfLoader;
-use 5.008;
-use strict;
-our $VERSION = "1.17";
-
-# The following bit of eval-magic is necessary to make this work on
-# perls < 5.009005.
-use vars qw/$AttrList/;
-BEGIN {
- if ($] > 5.009004) {
- eval <<'NEWERPERL';
-use 5.009005; # due to new regexp features
-# allow checking for valid ': attrlist' attachments
-# see also AutoSplit
-$AttrList = qr{
- \s* : \s*
- (?:
- # one attribute
- (?> # no backtrack
- (?! \d) \w+
- (?<nested> \( (?: [^()]++ | (?&nested)++ )*+ \) ) ?
- )
- (?: \s* : \s* | \s+ (?! :) )
- )*
-}x;
-
-NEWERPERL
- }
- else {
- eval <<'OLDERPERL';
-# allow checking for valid ': attrlist' attachments
-# (we use 'our' rather than 'my' here, due to the rather complex and buggy
-# behaviour of lexicals with qr// and (??{$lex}) )
-our $nested;
-$nested = qr{ \( (?: (?> [^()]+ ) | (??{ $nested }) )* \) }x;
-our $one_attr = qr{ (?> (?! \d) \w+ (?:$nested)? ) (?:\s*\:\s*|\s+(?!\:)) }x;
-$AttrList = qr{ \s* : \s* (?: $one_attr )* }x;
-OLDERPERL
- }
-}
-use Exporter;
-our @ISA = qw(Exporter);
-our @EXPORT = qw(AUTOLOAD);
-sub Version {$VERSION}
-sub DEBUG () { 0 }
-
-my %Cache; # private cache for all SelfLoader's client packages
-
-# in croak and carp, protect $@ from "require Carp;" RT #40216
-
-sub croak { { local $@; require Carp; } goto &Carp::croak }
-sub carp { { local $@; require Carp; } goto &Carp::carp }
-
-AUTOLOAD {
- our $AUTOLOAD;
- print STDERR "SelfLoader::AUTOLOAD for $AUTOLOAD\n" if DEBUG;
- my $SL_code = $Cache{$AUTOLOAD};
- my $save = $@; # evals in both AUTOLOAD and _load_stubs can corrupt $@
- unless ($SL_code) {
- # Maybe this pack had stubs before __DATA__, and never initialized.
- # Or, this maybe an automatic DESTROY method call when none exists.
- $AUTOLOAD =~ m/^(.*)::/;
- SelfLoader->_load_stubs($1) unless exists $Cache{"${1}::<DATA"};
- $SL_code = $Cache{$AUTOLOAD};
- $SL_code = "sub $AUTOLOAD { }"
- if (!$SL_code and $AUTOLOAD =~ m/::DESTROY$/);
- croak "Undefined subroutine $AUTOLOAD" unless $SL_code;
- }
- print STDERR "SelfLoader::AUTOLOAD eval: $SL_code\n" if DEBUG;
-
- {
- no strict;
- eval $SL_code;
- }
- if ($@) {
- $@ =~ s/ at .*\n//;
- croak $@;
- }
- $@ = $save;
- defined(&$AUTOLOAD) || die "SelfLoader inconsistency error";
- delete $Cache{$AUTOLOAD};
- goto &$AUTOLOAD
-}
-
-sub load_stubs { shift->_load_stubs((caller)[0]) }
-
-sub _load_stubs {
- # $endlines is used by Devel::SelfStubber to capture lines after __END__
- my($self, $callpack, $endlines) = @_;
- no strict "refs";
- my $fh = \*{"${callpack}::DATA"};
- use strict;
- my $currpack = $callpack;
- my($line,$name, at lines, @stubs, $protoype);
-
- print STDERR "SelfLoader::load_stubs($callpack)\n" if DEBUG;
- croak("$callpack doesn't contain an __DATA__ token")
- unless defined fileno($fh);
- # Protect: fork() shares the file pointer between the parent and the kid
- if(sysseek($fh, tell($fh), 0)) {
- open my $nfh, '<&', $fh or croak "reopen: $!";# dup() the fd
- close $fh or die "close: $!"; # autocloses, but be paranoid
- open $fh, '<&', $nfh or croak "reopen2: $!"; # dup() the fd "back"
- close $nfh or die "close after reopen: $!"; # autocloses, but be paranoid
- }
- $Cache{"${currpack}::<DATA"} = 1; # indicate package is cached
-
- local($/) = "\n";
- while(defined($line = <$fh>) and $line !~ m/^__END__/) {
- if ($line =~ m/^\s*sub\s+([\w:]+)\s*((?:\([\\\$\@\%\&\*\;]*\))?(?:$AttrList)?)/) {
- push(@stubs, $self->_add_to_cache($name, $currpack, \@lines, $protoype));
- $protoype = $2;
- @lines = ($line);
- if (index($1,'::') == -1) { # simple sub name
- $name = "${currpack}::$1";
- } else { # sub name with package
- $name = $1;
- $name =~ m/^(.*)::/;
- if (defined(&{"${1}::AUTOLOAD"})) {
- \&{"${1}::AUTOLOAD"} == \&SelfLoader::AUTOLOAD ||
- die 'SelfLoader Error: attempt to specify Selfloading',
- " sub $name in non-selfloading module $1";
- } else {
- $self->export($1,'AUTOLOAD');
- }
- }
- } elsif ($line =~ m/^package\s+([\w:]+)/) { # A package declared
- push(@stubs, $self->_add_to_cache($name, $currpack, \@lines, $protoype));
- $self->_package_defined($line);
- $name = '';
- @lines = ();
- $currpack = $1;
- $Cache{"${currpack}::<DATA"} = 1; # indicate package is cached
- if (defined(&{"${1}::AUTOLOAD"})) {
- \&{"${1}::AUTOLOAD"} == \&SelfLoader::AUTOLOAD ||
- die 'SelfLoader Error: attempt to specify Selfloading',
- " package $currpack which already has AUTOLOAD";
- } else {
- $self->export($currpack,'AUTOLOAD');
- }
- } else {
- push(@lines,$line);
- }
- }
- if (defined($line) && $line =~ /^__END__/) { # __END__
- unless ($line =~ /^__END__\s*DATA/) {
- if ($endlines) {
- # Devel::SelfStubber would like us to capture the lines after
- # __END__ so it can write out the entire file
- @$endlines = <$fh>;
- }
- close($fh);
- }
- }
- push(@stubs, $self->_add_to_cache($name, $currpack, \@lines, $protoype));
- no strict;
- eval join('', @stubs) if @stubs;
-}
-
-
-sub _add_to_cache {
- my($self,$fullname,$pack,$lines, $protoype) = @_;
- return () unless $fullname;
- carp("Redefining sub $fullname")
- if exists $Cache{$fullname};
- $Cache{$fullname} = join('', "\n\#line 1 \"sub $fullname\"\npackage $pack; ", @$lines);
- #$Cache{$fullname} = join('', "package $pack; ",@$lines);
- print STDERR "SelfLoader cached $fullname: $Cache{$fullname}" if DEBUG;
- # return stub to be eval'd
- defined($protoype) ? "sub $fullname $protoype;" : "sub $fullname;"
-}
-
-sub _package_defined {}
-
-1;
-__END__
-
-=head1 NAME
-
-SelfLoader - load functions only on demand
-
-=head1 SYNOPSIS
-
- package FOOBAR;
- use SelfLoader;
-
- ... (initializing code)
-
- __DATA__
- sub {....
-
-
-=head1 DESCRIPTION
-
-This module tells its users that functions in the FOOBAR package are to be
-autoloaded from after the C<__DATA__> token. See also
-L<perlsub/"Autoloading">.
-
-=head2 The __DATA__ token
-
-The C<__DATA__> token tells the perl compiler that the perl code
-for compilation is finished. Everything after the C<__DATA__> token
-is available for reading via the filehandle FOOBAR::DATA,
-where FOOBAR is the name of the current package when the C<__DATA__>
-token is reached. This works just the same as C<__END__> does in
-package 'main', but for other modules data after C<__END__> is not
-automatically retrievable, whereas data after C<__DATA__> is.
-The C<__DATA__> token is not recognized in versions of perl prior to
-5.001m.
-
-Note that it is possible to have C<__DATA__> tokens in the same package
-in multiple files, and that the last C<__DATA__> token in a given
-package that is encountered by the compiler is the one accessible
-by the filehandle. This also applies to C<__END__> and main, i.e. if
-the 'main' program has an C<__END__>, but a module 'require'd (_not_ 'use'd)
-by that program has a 'package main;' declaration followed by an 'C<__DATA__>',
-then the C<DATA> filehandle is set to access the data after the C<__DATA__>
-in the module, _not_ the data after the C<__END__> token in the 'main'
-program, since the compiler encounters the 'require'd file later.
-
-=head2 SelfLoader autoloading
-
-The B<SelfLoader> works by the user placing the C<__DATA__>
-token I<after> perl code which needs to be compiled and
-run at 'require' time, but I<before> subroutine declarations
-that can be loaded in later - usually because they may never
-be called.
-
-The B<SelfLoader> will read from the FOOBAR::DATA filehandle to
-load in the data after C<__DATA__>, and load in any subroutine
-when it is called. The costs are the one-time parsing of the
-data after C<__DATA__>, and a load delay for the _first_
-call of any autoloaded function. The benefits (hopefully)
-are a speeded up compilation phase, with no need to load
-functions which are never used.
-
-The B<SelfLoader> will stop reading from C<__DATA__> if
-it encounters the C<__END__> token - just as you would expect.
-If the C<__END__> token is present, and is followed by the
-token DATA, then the B<SelfLoader> leaves the FOOBAR::DATA
-filehandle open on the line after that token.
-
-The B<SelfLoader> exports the C<AUTOLOAD> subroutine to the
-package using the B<SelfLoader>, and this loads the called
-subroutine when it is first called.
-
-There is no advantage to putting subroutines which will _always_
-be called after the C<__DATA__> token.
-
-=head2 Autoloading and package lexicals
-
-A 'my $pack_lexical' statement makes the variable $pack_lexical
-local _only_ to the file up to the C<__DATA__> token. Subroutines
-declared elsewhere _cannot_ see these types of variables,
-just as if you declared subroutines in the package but in another
-file, they cannot see these variables.
-
-So specifically, autoloaded functions cannot see package
-lexicals (this applies to both the B<SelfLoader> and the Autoloader).
-The C<vars> pragma provides an alternative to defining package-level
-globals that will be visible to autoloaded routines. See the documentation
-on B<vars> in the pragma section of L<perlmod>.
-
-=head2 SelfLoader and AutoLoader
-
-The B<SelfLoader> can replace the AutoLoader - just change 'use AutoLoader'
-to 'use SelfLoader' (though note that the B<SelfLoader> exports
-the AUTOLOAD function - but if you have your own AUTOLOAD and
-are using the AutoLoader too, you probably know what you're doing),
-and the C<__END__> token to C<__DATA__>. You will need perl version 5.001m
-or later to use this (version 5.001 with all patches up to patch m).
-
-There is no need to inherit from the B<SelfLoader>.
-
-The B<SelfLoader> works similarly to the AutoLoader, but picks up the
-subs from after the C<__DATA__> instead of in the 'lib/auto' directory.
-There is a maintenance gain in not needing to run AutoSplit on the module
-at installation, and a runtime gain in not needing to keep opening and
-closing files to load subs. There is a runtime loss in needing
-to parse the code after the C<__DATA__>. Details of the B<AutoLoader> and
-another view of these distinctions can be found in that module's
-documentation.
-
-=head2 __DATA__, __END__, and the FOOBAR::DATA filehandle.
-
-This section is only relevant if you want to use
-the C<FOOBAR::DATA> together with the B<SelfLoader>.
-
-Data after the C<__DATA__> token in a module is read using the
-FOOBAR::DATA filehandle. C<__END__> can still be used to denote the end
-of the C<__DATA__> section if followed by the token DATA - this is supported
-by the B<SelfLoader>. The C<FOOBAR::DATA> filehandle is left open if an
-C<__END__> followed by a DATA is found, with the filehandle positioned at
-the start of the line after the C<__END__> token. If no C<__END__> token is
-present, or an C<__END__> token with no DATA token on the same line, then
-the filehandle is closed.
-
-The B<SelfLoader> reads from wherever the current
-position of the C<FOOBAR::DATA> filehandle is, until the
-EOF or C<__END__>. This means that if you want to use
-that filehandle (and ONLY if you want to), you should either
-
-1. Put all your subroutine declarations immediately after
-the C<__DATA__> token and put your own data after those
-declarations, using the C<__END__> token to mark the end
-of subroutine declarations. You must also ensure that the B<SelfLoader>
-reads first by calling 'SelfLoader-E<gt>load_stubs();', or by using a
-function which is selfloaded;
-
-or
-
-2. You should read the C<FOOBAR::DATA> filehandle first, leaving
-the handle open and positioned at the first line of subroutine
-declarations.
-
-You could conceivably do both.
-
-=head2 Classes and inherited methods.
-
-For modules which are not classes, this section is not relevant.
-This section is only relevant if you have methods which could
-be inherited.
-
-A subroutine stub (or forward declaration) looks like
-
- sub stub;
-
-i.e. it is a subroutine declaration without the body of the
-subroutine. For modules which are not classes, there is no real
-need for stubs as far as autoloading is concerned.
-
-For modules which ARE classes, and need to handle inherited methods,
-stubs are needed to ensure that the method inheritance mechanism works
-properly. You can load the stubs into the module at 'require' time, by
-adding the statement 'SelfLoader-E<gt>load_stubs();' to the module to do
-this.
-
-The alternative is to put the stubs in before the C<__DATA__> token BEFORE
-releasing the module, and for this purpose the C<Devel::SelfStubber>
-module is available. However this does require the extra step of ensuring
-that the stubs are in the module. If this is done I strongly recommend
-that this is done BEFORE releasing the module - it should NOT be done
-at install time in general.
-
-=head1 Multiple packages and fully qualified subroutine names
-
-Subroutines in multiple packages within the same file are supported - but you
-should note that this requires exporting the C<SelfLoader::AUTOLOAD> to
-every package which requires it. This is done automatically by the
-B<SelfLoader> when it first loads the subs into the cache, but you should
-really specify it in the initialization before the C<__DATA__> by putting
-a 'use SelfLoader' statement in each package.
-
-Fully qualified subroutine names are also supported. For example,
-
- __DATA__
- sub foo::bar {23}
- package baz;
- sub dob {32}
-
-will all be loaded correctly by the B<SelfLoader>, and the B<SelfLoader>
-will ensure that the packages 'foo' and 'baz' correctly have the
-B<SelfLoader> C<AUTOLOAD> method when the data after C<__DATA__> is first
-parsed.
-
-=head1 AUTHOR
-
-C<SelfLoader> is maintained by the perl5-porters. Please direct
-any questions to the canonical mailing list. Anything that
-is applicable to the CPAN release can be sent to its maintainer,
-though.
-
-Author and Maintainer: The Perl5-Porters <perl5-porters at perl.org>
-
-Maintainer of the CPAN release: Steffen Mueller <smueller at cpan.org>
-
-=head1 COPYRIGHT AND LICENSE
-
-This package has been part of the perl core since the first release
-of perl5. It has been released separately to CPAN so older installations
-can benefit from bug fixes.
-
-This package has the same copyright and license as the perl core:
-
- Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006 by Larry Wall and others
-
- All rights reserved.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- a) the GNU General Public License as published by the Free
- Software Foundation; either version 1, or (at your option) any
- later version, or
-
- b) the "Artistic License" which comes with this Kit.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
- the GNU General Public License or the Artistic License for more details.
-
- You should have received a copy of the Artistic License with this
- Kit, in the file named "Artistic". If not, I'll be glad to provide one.
-
- You should also have received a copy of the GNU General Public License
- along with this program in the file named "Copying". If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA or visit their web page on the internet at
- http://www.gnu.org/copyleft/gpl.html.
-
- For those of you that choose to use the GNU General Public License,
- my interpretation of the GNU General Public License is that no Perl
- script falls under the terms of the GPL unless you explicitly put
- said script under the terms of the GPL yourself. Furthermore, any
- object code linked with perl does not automatically fall under the
- terms of the GPL, provided such object code only adds definitions
- of subroutines and variables, and does not otherwise impair the
- resulting interpreter from executing any standard Perl script. I
- consider linking in C subroutines in this manner to be the moral
- equivalent of defining subroutines in the Perl language itself. You
- may sell such an object file as proprietary provided that you provide
- or offer to provide the Perl source, as specified by the GNU General
- Public License. (This is merely an alternate way of specifying input
- to the program.) You may also sell a binary produced by the dumping of
- a running Perl script that belongs to you, provided that you provide or
- offer to provide the Perl source as specified by the GPL. (The
- fact that a Perl interpreter and your code are in the same binary file
- is, in this case, a form of mere aggregation.) This is my interpretation
- of the GPL. If you still have concerns or difficulties understanding
- my intent, feel free to contact me. Of course, the Artistic License
- spells all this out for your protection, so you may prefer to use that.
-
-=cut
Deleted: vendor/perl/dist/lib/SelfLoader.t
===================================================================
--- vendor/perl/dist/lib/SelfLoader.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/SelfLoader.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,208 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- $dir = "self-$$";
- $sep = "/";
-
- if ($^O eq 'MacOS') {
- $dir = ":" . $dir;
- $sep = ":";
- }
-
- @INC = $dir;
- push @INC, '../lib';
-
- print "1..19\n";
-
- # First we must set up some selfloader files
- mkdir $dir, 0755 or die "Can't mkdir $dir: $!";
-
- open(FOO, ">$dir${sep}Foo.pm") or die;
- print FOO <<'EOT';
-package Foo;
-use SelfLoader;
-
-sub new { bless {}, shift }
-sub foo;
-sub bar;
-sub bazmarkhianish;
-sub a;
-sub never; # declared but definition should never be read
-1;
-__DATA__
-
-sub foo { shift; shift || "foo" };
-
-sub bar { shift; shift || "bar" }
-
-sub bazmarkhianish { shift; shift || "baz" }
-
-package sheep;
-sub bleat { shift; shift || "baa" }
-
-__END__
-sub never { die "D'oh" }
-EOT
-
- close(FOO);
-
- open(BAR, ">$dir${sep}Bar.pm") or die;
- print BAR <<'EOT';
-package Bar;
-use SelfLoader;
-
- at ISA = 'Baz';
-
-sub new { bless {}, shift }
-sub a;
-
-1;
-__DATA__
-
-sub a { 'a Bar'; }
-sub b { 'b Bar' }
-
-__END__ DATA
-sub never { die "D'oh" }
-EOT
-
- close(BAR);
-};
-
-
-package Baz;
-
-sub a { 'a Baz' }
-sub b { 'b Baz' }
-sub c { 'c Baz' }
-
-
-package main;
-use Foo;
-use Bar;
-
-$foo = new Foo;
-
-print "not " unless $foo->foo eq 'foo'; # selfloaded first time
-print "ok 1\n";
-
-print "not " unless $foo->foo eq 'foo'; # regular call
-print "ok 2\n";
-
-# Try an undefined method
-eval {
- $foo->will_fail;
-};
-if ($@ =~ /^Undefined subroutine/) {
- print "ok 3\n";
-} else {
- print "not ok 3 $@\n";
-}
-
-# Used to be trouble with this
-eval {
- my $foo = new Foo;
- die "oops";
-};
-if ($@ =~ /oops/) {
- print "ok 4\n";
-} else {
- print "not ok 4 $@\n";
-}
-
-# Pass regular expression variable to autoloaded function. This used
-# to go wrong in AutoLoader because it used regular expressions to generate
-# autoloaded filename.
-"foo" =~ /(\w+)/;
-print "not " unless $1 eq 'foo';
-print "ok 5\n";
-
-print "not " unless $foo->bar($1) eq 'foo';
-print "ok 6\n";
-
-print "not " unless $foo->bar($1) eq 'foo';
-print "ok 7\n";
-
-print "not " unless $foo->bazmarkhianish($1) eq 'foo';
-print "ok 8\n";
-
-print "not " unless $foo->bazmarkhianish($1) eq 'foo';
-print "ok 9\n";
-
-# Check nested packages inside __DATA__
-print "not " unless sheep::bleat() eq 'baa';
-print "ok 10\n";
-
-# Now check inheritance:
-
-$bar = new Bar;
-
-# Before anything is SelfLoaded there is no declaration of Foo::b so we should
-# get Baz::b
-print "not " unless $bar->b() eq 'b Baz';
-print "ok 11\n";
-
-# There is no Bar::c so we should get Baz::c
-print "not " unless $bar->c() eq 'c Baz';
-print "ok 12\n";
-
-# This selfloads Bar::a because it is stubbed. It also stubs Bar::b as a side
-# effect
-print "not " unless $bar->a() eq 'a Bar';
-print "ok 13\n";
-
-print "not " unless $bar->b() eq 'b Bar';
-print "ok 14\n";
-
-print "not " unless $bar->c() eq 'c Baz';
-print "ok 15\n";
-
-
-
-# Check that __END__ is honoured
-# Try an subroutine that should never be noticed by selfloader
-eval {
- $foo->never;
-};
-if ($@ =~ /^Undefined subroutine/) {
- print "ok 16\n";
-} else {
- print "not ok 16 $@\n";
-}
-
-# Try to read from the data file handle
-my $foodata = <Foo::DATA>;
-close Foo::DATA;
-if (defined $foodata) {
- print "not ok 17 # $foodata\n";
-} else {
- print "ok 17\n";
-}
-
-# Check that __END__ DATA is honoured
-# Try an subroutine that should never be noticed by selfloader
-eval {
- $bar->never;
-};
-if ($@ =~ /^Undefined subroutine/) {
- print "ok 18\n";
-} else {
- print "not ok 18 $@\n";
-}
-
-# Try to read from the data file handle
-my $bardata = <Bar::DATA>;
-close Bar::DATA;
-if ($bardata ne "sub never { die \"D'oh\" }\n") {
- print "not ok 19 # $bardata\n";
-} else {
- print "ok 19\n";
-}
-
-# cleanup
-END {
-return unless $dir && -d $dir;
-unlink "$dir${sep}Foo.pm", "$dir${sep}Bar.pm";
-rmdir "$dir";
-}
Deleted: vendor/perl/dist/lib/Shell.pm
===================================================================
--- vendor/perl/dist/lib/Shell.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Shell.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,270 +0,0 @@
-package Shell;
-use 5.006_001;
-use strict;
-use warnings;
-use File::Spec::Functions;
-
-our($capture_stderr, $raw, $VERSION, $AUTOLOAD);
-
-$VERSION = '0.72_01';
-$VERSION = eval $VERSION;
-
-sub new { bless \my $foo, shift }
-sub DESTROY { }
-
-sub import {
- my $self = shift;
- my ($callpack, $callfile, $callline) = caller;
- my @EXPORT;
- if (@_) {
- @EXPORT = @_;
- } else {
- @EXPORT = 'AUTOLOAD';
- }
- foreach my $sym (@EXPORT) {
- no strict 'refs';
- *{"${callpack}::$sym"} = \&{"Shell::$sym"};
- }
-}
-
-# NOTE: this is used to enable constant folding in
-# expressions like (OS eq 'MSWin32') and
-# (OS eq 'os2') just like it happened in 0.6 version
-# which used eval "string" to install subs on the fly.
-use constant OS => $^O;
-
-=begin private
-
-=item B<_make_cmd>
-
- $sub = _make_cmd($cmd);
- $sub = $shell->_make_cmd($cmd);
-
-Creates a closure which invokes the system command C<$cmd>.
-
-=end private
-
-=cut
-
-sub _make_cmd {
- shift if ref $_[0] && $_[0]->isa( 'Shell' );
- my $cmd = shift;
- my $null = File::Spec::Functions::devnull();
- $Shell::capture_stderr ||= 0;
- # closing over $^O, $cmd, and $null
- return sub {
- shift if ref $_[0] && $_[0]->isa( 'Shell' );
- if (@_ < 1) {
- $Shell::capture_stderr == 1 ? `$cmd 2>&1` :
- $Shell::capture_stderr == -1 ? `$cmd 2>$null` :
- `$cmd`;
- } elsif (OS eq 'os2') {
- local(*SAVEOUT, *READ, *WRITE);
-
- open SAVEOUT, '>&STDOUT' or die;
- pipe READ, WRITE or die;
- open STDOUT, '>&WRITE' or die;
- close WRITE;
-
- my $pid = system(1, $cmd, @_);
- die "Can't execute $cmd: $!\n" if $pid < 0;
-
- open STDOUT, '>&SAVEOUT' or die;
- close SAVEOUT;
-
- if (wantarray) {
- my @ret = <READ>;
- close READ;
- waitpid $pid, 0;
- @ret;
- } else {
- local($/) = undef;
- my $ret = <READ>;
- close READ;
- waitpid $pid, 0;
- $ret;
- }
- } else {
- my $a;
- my @arr = @_;
- unless( $Shell::raw ){
- if (OS eq 'MSWin32') {
- # XXX this special-casing should not be needed
- # if we do quoting right on Windows. :-(
- #
- # First, escape all quotes. Cover the case where we
- # want to pass along a quote preceded by a backslash
- # (i.e., C<"param \""" end">).
- # Ugly, yup? You know, windoze.
- # Enclose in quotes only the parameters that need it:
- # try this: c:> dir "/w"
- # and this: c:> dir /w
- for (@arr) {
- s/"/\\"/g;
- s/\\\\"/\\\\"""/g;
- $_ = qq["$_"] if /\s/;
- }
- } else {
- for (@arr) {
- s/(['\\])/\\$1/g;
- $_ = $_;
- }
- }
- }
- push @arr, '2>&1' if $Shell::capture_stderr == 1;
- push @arr, '2>$null' if $Shell::capture_stderr == -1;
- open(SUBPROC, join(' ', $cmd, @arr, '|'))
- or die "Can't exec $cmd: $!\n";
- if (wantarray) {
- my @ret = <SUBPROC>;
- close SUBPROC; # XXX Oughta use a destructor.
- @ret;
- } else {
- local($/) = undef;
- my $ret = <SUBPROC>;
- close SUBPROC;
- $ret;
- }
- }
- };
- }
-
-sub AUTOLOAD {
- shift if ref $_[0] && $_[0]->isa( 'Shell' );
- my $cmd = $AUTOLOAD;
- $cmd =~ s/^.*:://;
- no strict 'refs';
- *$AUTOLOAD = _make_cmd($cmd);
- goto &$AUTOLOAD;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Shell - run shell commands transparently within perl
-
-=head1 SYNOPSIS
-
- use Shell qw(cat ps cp);
- $passwd = cat('</etc/passwd');
- @pslines = ps('-ww'),
- cp("/etc/passwd", "/tmp/passwd");
-
- # object oriented
- my $sh = Shell->new;
- print $sh->ls('-l');
-
-=head1 DESCRIPTION
-
-=head2 Caveats
-
-This package is included as a show case, illustrating a few Perl features.
-It shouldn't be used for production programs. Although it does provide a
-simple interface for obtaining the standard output of arbitrary commands,
-there may be better ways of achieving what you need.
-
-Running shell commands while obtaining standard output can be done with the
-C<qx/STRING/> operator, or by calling C<open> with a filename expression that
-ends with C<|>, giving you the option to process one line at a time.
-If you don't need to process standard output at all, you might use C<system>
-(in preference of doing a print with the collected standard output).
-
-Since Shell.pm and all of the aforementioned techniques use your system's
-shell to call some local command, none of them is portable across different
-systems. Note, however, that there are several built in functions and
-library packages providing portable implementations of functions operating
-on files, such as: C<glob>, C<link> and C<unlink>, C<mkdir> and C<rmdir>,
-C<rename>, C<File::Compare>, C<File::Copy>, C<File::Find> etc.
-
-Using Shell.pm while importing C<foo> creates a subroutine C<foo> in the
-namespace of the importing package. Calling C<foo> with arguments C<arg1>,
-C<arg2>,... results in a shell command C<foo arg1 arg2...>, where the
-function name and the arguments are joined with a blank. (See the subsection
-on Escaping magic characters.) Since the result is essentially a command
-line to be passed to the shell, your notion of arguments to the Perl
-function is not necessarily identical to what the shell treats as a
-command line token, to be passed as an individual argument to the program.
-Furthermore, note that this implies that C<foo> is callable by file name
-only, which frequently depends on the setting of the program's environment.
-
-Creating a Shell object gives you the opportunity to call any command
-in the usual OO notation without requiring you to announce it in the
-C<use Shell> statement. Don't assume any additional semantics being
-associated with a Shell object: in no way is it similar to a shell
-process with its environment or current working directory or any
-other setting.
-
-=head2 Escaping Magic Characters
-
-It is, in general, impossible to take care of quoting the shell's
-magic characters. For some obscure reason, however, Shell.pm quotes
-apostrophes (C<'>) and backslashes (C<\>) on UNIX, and spaces and
-quotes (C<">) on Windows.
-
-=head2 Configuration
-
-If you set $Shell::capture_stderr to 1, the module will attempt to
-capture the standard error output of the process as well. This is
-done by adding C<2E<gt>&1> to the command line, so don't try this on
-a system not supporting this redirection.
-
-Setting $Shell::capture_stderr to -1 will send standard error to the
-bit bucket (i.e., the equivalent of adding C<2E<gt>/dev/null> to the
-command line). The same caveat regarding redirection applies.
-
-If you set $Shell::raw to true no quoting whatsoever is done.
-
-=head1 BUGS
-
-Quoting should be off by default.
-
-It isn't possible to call shell built in commands, but it can be
-done by using a workaround, e.g. shell( '-c', 'set' ).
-
-Capturing standard error does not work on some systems (e.g. VMS).
-
-=head1 AUTHOR
-
- Date: Thu, 22 Sep 94 16:18:16 -0700
- Message-Id: <9409222318.AA17072 at scalpel.netlabs.com>
- To: perl5-porters at isu.edu
- From: Larry Wall <lwall at scalpel.netlabs.com>
- Subject: a new module I just wrote
-
-Here's one that'll whack your mind a little out.
-
- #!/usr/bin/perl
-
- use Shell;
-
- $foo = echo("howdy", "<funny>", "world");
- print $foo;
-
- $passwd = cat("</etc/passwd");
- print $passwd;
-
- sub ps;
- print ps -ww;
-
- cp("/etc/passwd", "/etc/passwd.orig");
-
-That's maybe too gonzo. It actually exports an AUTOLOAD to the current
-package (and uncovered a bug in Beta 3, by the way). Maybe the usual
-usage should be
-
- use Shell qw(echo cat ps cp);
-
-Larry Wall
-
-Changes by Jenda at Krynicky.cz and Dave Cottle <d.cottle at csc.canterbury.ac.nz>.
-
-Changes for OO syntax and bug fixes by Casey West <casey at geeknest.com>.
-
-C<$Shell::raw> and pod rewrite by Wolfgang Laun.
-
-Rewritten to use closures rather than C<eval "string"> by Adriano Ferreira.
-
-=cut
Deleted: vendor/perl/dist/lib/Shell.t
===================================================================
--- vendor/perl/dist/lib/Shell.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Shell.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,84 +0,0 @@
-#!./perl
-
-BEGIN {
- if( $ENV{PERL_CORE} ) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
-use Test::More tests => 7;
-
-BEGIN { use_ok('Shell'); }
-
-my $so = Shell->new;
-ok($so, 'Shell->new');
-
-my $Is_VMS = $^O eq 'VMS';
-my $Is_MSWin32 = $^O eq 'MSWin32';
-my $Is_NetWare = $^O eq 'NetWare';
-
-$Shell::capture_stderr = 1;
-
-# Now test that that works ..
-
-my $tmpfile = 'sht0001';
-while ( -f $tmpfile ) {
- $tmpfile++;
-}
-END { -f $tmpfile && (open STDERR, '>&SAVERR' and unlink $tmpfile) }
-
-no warnings 'once';
-# no false warning about Name "main::SAVERR" used only once: possible typo
-
-open(SAVERR, ">&STDERR");
-open(STDERR, ">$tmpfile");
-
-xXx_not_there(); # Ok someone could have a program called this :(
-
-# On os2 the warning is on by default...
-ok(($^O eq 'os2' xor !(-s $tmpfile)), '$Shell::capture_stderr');
-
-$Shell::capture_stderr = 0;
-
-# Trying to do two repeated C<ls>s in t in core and expecting the same output
-# is a race condition when tests are running in parallel, and using it as a
-# temporary directory. So go somewhere quieter.
-if ($ENV{PERL_CORE} && -d 'uni') {
- chdir 'uni';
- $chdir++;
-}
-
-# someone will have to fill in the blanks for other platforms
-
-if ($Is_VMS) {
- ok(directory(), 'Execute command');
- my @files = directory('*.*');
- ok(@files, 'Quoted arguments');
-
- ok(eq_array(\@files, [$so->directory('*.*')]), 'object method');
- eval { $so->directory };
- ok(!$@, '2 methods calls');
-} elsif ($Is_MSWin32) {
- ok(dir(), 'Execute command');
- my @files = dir('*.*');
- ok(@files, 'Quoted arguments');
-
- ok(eq_array(\@files, [$so->dir('*.*')]), 'object method');
- eval { $so->dir };
- ok(!$@, '2 methods calls');
-} else {
- ok(ls(), 'Execute command');
- my @files = ls('*');
- ok(@files, 'Quoted arguments');
-
- ok(eq_array(\@files, [$so->ls('*')]), 'object method');
- eval { $so->ls };
- ok(!$@, '2 methods calls');
-
-}
-open(STDERR, ">&SAVERR") ;
-
-if ($chdir) {
- chdir "..";
-}
Deleted: vendor/perl/dist/lib/Switch.pm
===================================================================
--- vendor/perl/dist/lib/Switch.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Switch.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,878 +0,0 @@
-package Switch;
-
-use strict;
-use vars qw($VERSION);
-use Carp;
-
-$VERSION = '2.14';
-
-
-# LOAD FILTERING MODULE...
-use Filter::Util::Call;
-
-sub __();
-
-# CATCH ATTEMPTS TO CALL case OUTSIDE THE SCOPE OF ANY switch
-
-$::_S_W_I_T_C_H = sub { croak "case/when statement not in switch/given block" };
-
-my $offset;
-my $fallthrough;
-my ($Perl5, $Perl6) = (0,0);
-
-sub import
-{
- $fallthrough = grep /\bfallthrough\b/, @_;
- $offset = (caller)[2]+1;
- filter_add({}) unless @_>1 && $_[1] eq 'noimport';
- my $pkg = caller;
- no strict 'refs';
- for ( qw( on_defined on_exists ) )
- {
- *{"${pkg}::$_"} = \&$_;
- }
- *{"${pkg}::__"} = \&__ if grep /__/, @_;
- $Perl6 = 1 if grep(/Perl\s*6/i, @_);
- $Perl5 = 1 if grep(/Perl\s*5/i, @_) || !grep(/Perl\s*6/i, @_);
- 1;
-}
-
-sub unimport
-{
- filter_del()
-}
-
-sub filter
-{
- my($self) = @_ ;
- local $Switch::file = (caller)[1];
-
- my $status = 1;
- $status = filter_read(1_000_000);
- return $status if $status<0;
- $_ = filter_blocks($_,$offset);
- $_ = "# line $offset\n" . $_ if $offset; undef $offset;
- return $status;
-}
-
-use Text::Balanced ':ALL';
-
-sub line
-{
- my ($pretext,$offset) = @_;
- ($pretext=~tr/\n/\n/)+($offset||0);
-}
-
-sub is_block
-{
- local $SIG{__WARN__}=sub{die$@};
- local $^W=1;
- my $ishash = defined eval 'my $hr='.$_[0];
- undef $@;
- return !$ishash;
-}
-
-my $pod_or_DATA = qr/ ^=[A-Za-z] .*? ^=cut (?![A-Za-z]) .*? $
- | ^__(DATA|END)__\n.*
- /smx;
-
-my $casecounter = 1;
-sub filter_blocks
-{
- my ($source, $line) = @_;
- return $source unless $Perl5 && $source =~ /case|switch/
- || $Perl6 && $source =~ /when|given|default/;
- pos $source = 0;
- my $text = "";
- component: while (pos $source < length $source)
- {
- if ($source =~ m/(\G\s*use\s+Switch\b)/gc)
- {
- $text .= q{use Switch 'noimport'};
- next component;
- }
- my @pos = Text::Balanced::_match_quotelike(\$source,qr/\s*/,1,0);
- if (defined $pos[0])
- {
- my $pre = substr($source,$pos[0],$pos[1]); # matched prefix
- my $iEol;
- if( substr($source,$pos[4],$pos[5]) eq '/' && # 1st delimiter
- substr($source,$pos[2],$pos[3]) eq '' && # no op like 'm'
- index( substr($source,$pos[16],$pos[17]), 'x' ) == -1 && # no //x
- ($iEol = index( $source, "\n", $pos[4] )) > 0 &&
- $iEol < $pos[8] ){ # embedded newlines
- # If this is a pattern, it isn't compatible with Switch. Backup past 1st '/'.
- pos( $source ) = $pos[6];
- $text .= $pre . substr($source,$pos[2],$pos[6]-$pos[2]);
- } else {
- $text .= $pre . substr($source,$pos[2],$pos[18]-$pos[2]);
- }
- next component;
- }
- if ($source =~ m/(\G\s*$pod_or_DATA)/gc) {
- $text .= $1;
- next component;
- }
- @pos = Text::Balanced::_match_variable(\$source,qr/\s*/);
- if (defined $pos[0])
- {
- $text .= " " if $pos[0] < $pos[2];
- $text .= substr($source,$pos[0],$pos[4]-$pos[0]);
- next component;
- }
-
- if ($Perl5 && $source =~ m/\G(\n*)(\s*)(switch)\b(?=\s*[(])/gc
- || $Perl6 && $source =~ m/\G(\n*)(\s*)(given)\b(?=\s*[(])/gc
- || $Perl6 && $source =~ m/\G(\n*)(\s*)(given)\b(.*)(?=\{)/gc)
- {
- my $keyword = $3;
- my $arg = $4;
- $text .= $1.$2.'S_W_I_T_C_H: while (1) ';
- unless ($arg) {
- @pos = Text::Balanced::_match_codeblock(\$source,qr/\s*/,qr/\(/,qr/\)/,qr/[[{(<]/,qr/[]})>]/,undef)
- or do {
- die "Bad $keyword statement (problem in the parentheses?) near $Switch::file line ", line(substr($source,0,pos $source),$line), "\n";
- };
- $arg = filter_blocks(substr($source,$pos[0],$pos[4]-$pos[0]),line(substr($source,0,$pos[0]),$line));
- }
- $arg =~ s {^\s*[(]\s*%} { ( \\\%} ||
- $arg =~ s {^\s*[(]\s*m\b} { ( qr} ||
- $arg =~ s {^\s*[(]\s*/} { ( qr/} ||
- $arg =~ s {^\s*[(]\s*qw} { ( \\qw};
- @pos = Text::Balanced::_match_codeblock(\$source,qr/\s*/,qr/\{/,qr/\}/,qr/\{/,qr/\}/,undef)
- or do {
- die "Bad $keyword statement (problem in the code block?) near $Switch::file line ", line(substr($source,0, pos $source), $line), "\n";
- };
- my $code = filter_blocks(substr($source,$pos[0],$pos[4]-$pos[0]),line(substr($source,0,$pos[0]),$line));
- $code =~ s/{/{ local \$::_S_W_I_T_C_H; Switch::switch $arg;/;
- $text .= $code . 'continue {last}';
- next component;
- }
- elsif ($Perl5 && $source =~ m/\G(\s*)(case\b)(?!\s*=>)/gc
- || $Perl6 && $source =~ m/\G(\s*)(when\b)(?!\s*=>)/gc
- || $Perl6 && $source =~ m/\G(\s*)(default\b)(?=\s*\{)/gc)
- {
- my $keyword = $2;
- $text .= $1 . ($keyword eq "default"
- ? "if (1)"
- : "if (Switch::case");
-
- if ($keyword eq "default") {
- # Nothing to do
- }
- elsif (@pos = Text::Balanced::_match_codeblock(\$source,qr/\s*/,qr/\{/,qr/\}/,qr/\{/,qr/\}/,undef)) {
- my $code = substr($source,$pos[0],$pos[4]-$pos[0]);
- $text .= " " if $pos[0] < $pos[2];
- $text .= "sub " if is_block $code;
- $text .= filter_blocks($code,line(substr($source,0,$pos[0]),$line)) . ")";
- }
- elsif (@pos = Text::Balanced::_match_codeblock(\$source,qr/\s*/,qr/[[(]/,qr/[])]/,qr/[[({]/,qr/[])}]/,undef)) {
- my $code = filter_blocks(substr($source,$pos[0],$pos[4]-$pos[0]),line(substr($source,0,$pos[0]),$line));
- $code =~ s {^\s*[(]\s*%} { ( \\\%} ||
- $code =~ s {^\s*[(]\s*m\b} { ( qr} ||
- $code =~ s {^\s*[(]\s*/} { ( qr/} ||
- $code =~ s {^\s*[(]\s*qw} { ( \\qw};
- $text .= " " if $pos[0] < $pos[2];
- $text .= "$code)";
- }
- elsif ($Perl6 && do{@pos = Text::Balanced::_match_variable(\$source,qr/\s*/)}) {
- my $code = filter_blocks(substr($source,$pos[0],$pos[4]-$pos[0]),line(substr($source,0,$pos[0]),$line));
- $code =~ s {^\s*%} { \%} ||
- $code =~ s {^\s*@} { \@};
- $text .= " " if $pos[0] < $pos[2];
- $text .= "$code)";
- }
- elsif ( @pos = Text::Balanced::_match_quotelike(\$source,qr/\s*/,1,0)) {
- my $code = substr($source,$pos[2],$pos[18]-$pos[2]);
- $code = filter_blocks($code,line(substr($source,0,$pos[2]),$line));
- $code =~ s {^\s*m} { qr} ||
- $code =~ s {^\s*/} { qr/} ||
- $code =~ s {^\s*qw} { \\qw};
- $text .= " " if $pos[0] < $pos[2];
- $text .= "$code)";
- }
- elsif ($Perl5 && $source =~ m/\G\s*(([^\$\@{])[^\$\@{]*)(?=\s*{)/gc
- || $Perl6 && $source =~ m/\G\s*([^;{]*)()/gc) {
- my $code = filter_blocks($1,line(substr($source,0,pos $source),$line));
- $text .= ' \\' if $2 eq '%';
- $text .= " $code)";
- }
- else {
- die "Bad $keyword statement (invalid $keyword value?) near $Switch::file line ", line(substr($source,0,pos $source), $line), "\n";
- }
-
- die "Missing opening brace or semi-colon after 'when' value near $Switch::file line ", line(substr($source,0,pos $source), $line), "\n"
- unless !$Perl6 || $source =~ m/\G(\s*)(?=;|\{)/gc;
-
- do{@pos = Text::Balanced::_match_codeblock(\$source,qr/\s*/,qr/\{/,qr/\}/,qr/\{/,qr/\}/,undef)}
- or do {
- if ($source =~ m/\G\s*(?=([};]|\Z))/gc) {
- $casecounter++;
- next component;
- }
- die "Bad $keyword statement (problem in the code block?) near $Switch::file line ", line(substr($source,0,pos $source),$line), "\n";
- };
- my $code = filter_blocks(substr($source,$pos[0],$pos[4]-$pos[0]),line(substr($source,0,$pos[0]),$line));
- $code =~ s/}(?=\s*\Z)/;last S_W_I_T_C_H }/
- unless $fallthrough;
- $text .= "{ while (1) $code continue { goto C_A_S_E_$casecounter } last S_W_I_T_C_H; C_A_S_E_$casecounter: }";
- $casecounter++;
- next component;
- }
-
- $source =~ m/\G(\s*(-[sm]\s+|\w+|#.*\n|\W))/gc;
- $text .= $1;
- }
- $text;
-}
-
-
-
-sub in
-{
- my ($x,$y) = @_;
- my @numy;
- for my $nextx ( @$x )
- {
- my $numx = ref($nextx) || defined $nextx && (~$nextx&$nextx) eq 0;
- for my $j ( 0..$#$y )
- {
- my $nexty = $y->[$j];
- push @numy, ref($nexty) || defined $nexty && (~$nexty&$nexty) eq 0
- if @numy <= $j;
- return 1 if $numx && $numy[$j] && $nextx==$nexty
- || $nextx eq $nexty;
-
- }
- }
- return "";
-}
-
-sub on_exists
-{
- my $ref = @_==1 && ref($_[0]) eq 'HASH' ? $_[0] : { @_ };
- [ keys %$ref ]
-}
-
-sub on_defined
-{
- my $ref = @_==1 && ref($_[0]) eq 'HASH' ? $_[0] : { @_ };
- [ grep { defined $ref->{$_} } keys %$ref ]
-}
-
-sub switch(;$)
-{
- my ($s_val) = @_ ? $_[0] : $_;
- my $s_ref = ref $s_val;
-
- if ($s_ref eq 'CODE')
- {
- $::_S_W_I_T_C_H =
- sub { my $c_val = $_[0];
- return $s_val == $c_val if ref $c_val eq 'CODE';
- return $s_val->(@$c_val) if ref $c_val eq 'ARRAY';
- return $s_val->($c_val);
- };
- }
- elsif ($s_ref eq "" && defined $s_val && (~$s_val&$s_val) eq 0) # NUMERIC SCALAR
- {
- $::_S_W_I_T_C_H =
- sub { my $c_val = $_[0];
- my $c_ref = ref $c_val;
- return $s_val == $c_val if $c_ref eq ""
- && defined $c_val
- && (~$c_val&$c_val) eq 0;
- return $s_val eq $c_val if $c_ref eq "";
- return in([$s_val],$c_val) if $c_ref eq 'ARRAY';
- return $c_val->($s_val) if $c_ref eq 'CODE';
- return $c_val->call($s_val) if $c_ref eq 'Switch';
- return scalar $s_val=~/$c_val/
- if $c_ref eq 'Regexp';
- return scalar $c_val->{$s_val}
- if $c_ref eq 'HASH';
- return;
- };
- }
- elsif ($s_ref eq "") # STRING SCALAR
- {
- $::_S_W_I_T_C_H =
- sub { my $c_val = $_[0];
- my $c_ref = ref $c_val;
- return $s_val eq $c_val if $c_ref eq "";
- return in([$s_val],$c_val) if $c_ref eq 'ARRAY';
- return $c_val->($s_val) if $c_ref eq 'CODE';
- return $c_val->call($s_val) if $c_ref eq 'Switch';
- return scalar $s_val=~/$c_val/
- if $c_ref eq 'Regexp';
- return scalar $c_val->{$s_val}
- if $c_ref eq 'HASH';
- return;
- };
- }
- elsif ($s_ref eq 'ARRAY')
- {
- $::_S_W_I_T_C_H =
- sub { my $c_val = $_[0];
- my $c_ref = ref $c_val;
- return in($s_val,[$c_val]) if $c_ref eq "";
- return in($s_val,$c_val) if $c_ref eq 'ARRAY';
- return $c_val->(@$s_val) if $c_ref eq 'CODE';
- return $c_val->call(@$s_val)
- if $c_ref eq 'Switch';
- return scalar grep {$_=~/$c_val/} @$s_val
- if $c_ref eq 'Regexp';
- return scalar grep {$c_val->{$_}} @$s_val
- if $c_ref eq 'HASH';
- return;
- };
- }
- elsif ($s_ref eq 'Regexp')
- {
- $::_S_W_I_T_C_H =
- sub { my $c_val = $_[0];
- my $c_ref = ref $c_val;
- return $c_val=~/s_val/ if $c_ref eq "";
- return scalar grep {$_=~/s_val/} @$c_val
- if $c_ref eq 'ARRAY';
- return $c_val->($s_val) if $c_ref eq 'CODE';
- return $c_val->call($s_val) if $c_ref eq 'Switch';
- return $s_val eq $c_val if $c_ref eq 'Regexp';
- return grep {$_=~/$s_val/ && $c_val->{$_}} keys %$c_val
- if $c_ref eq 'HASH';
- return;
- };
- }
- elsif ($s_ref eq 'HASH')
- {
- $::_S_W_I_T_C_H =
- sub { my $c_val = $_[0];
- my $c_ref = ref $c_val;
- return $s_val->{$c_val} if $c_ref eq "";
- return scalar grep {$s_val->{$_}} @$c_val
- if $c_ref eq 'ARRAY';
- return $c_val->($s_val) if $c_ref eq 'CODE';
- return $c_val->call($s_val) if $c_ref eq 'Switch';
- return grep {$_=~/$c_val/ && $s_val->{"$_"}} keys %$s_val
- if $c_ref eq 'Regexp';
- return $s_val==$c_val if $c_ref eq 'HASH';
- return;
- };
- }
- elsif ($s_ref eq 'Switch')
- {
- $::_S_W_I_T_C_H =
- sub { my $c_val = $_[0];
- return $s_val == $c_val if ref $c_val eq 'Switch';
- return $s_val->call(@$c_val)
- if ref $c_val eq 'ARRAY';
- return $s_val->call($c_val);
- };
- }
- else
- {
- croak "Cannot switch on $s_ref";
- }
- return 1;
-}
-
-sub case($) { local $SIG{__WARN__} = \&carp;
- $::_S_W_I_T_C_H->(@_); }
-
-# IMPLEMENT __
-
-my $placeholder = bless { arity=>1, impl=>sub{$_[1+$_[0]]} };
-
-sub __() { $placeholder }
-
-sub __arg($)
-{
- my $index = $_[0]+1;
- bless { arity=>0, impl=>sub{$_[$index]} };
-}
-
-sub hosub(&@)
-{
- # WRITE THIS
-}
-
-sub call
-{
- my ($self, at args) = @_;
- return $self->{impl}->(0, at args);
-}
-
-sub meta_bop(&)
-{
- my ($op) = @_;
- sub
- {
- my ($left, $right, $reversed) = @_;
- ($right,$left) = @_ if $reversed;
-
- my $rop = ref $right eq 'Switch'
- ? $right
- : bless { arity=>0, impl=>sub{$right} };
-
- my $lop = ref $left eq 'Switch'
- ? $left
- : bless { arity=>0, impl=>sub{$left} };
-
- my $arity = $lop->{arity} + $rop->{arity};
-
- return bless {
- arity => $arity,
- impl => sub { my $start = shift;
- return $op->($lop->{impl}->($start, at _),
- $rop->{impl}->($start+$lop->{arity}, at _));
- }
- };
- };
-}
-
-sub meta_uop(&)
-{
- my ($op) = @_;
- sub
- {
- my ($left) = @_;
-
- my $lop = ref $left eq 'Switch'
- ? $left
- : bless { arity=>0, impl=>sub{$left} };
-
- my $arity = $lop->{arity};
-
- return bless {
- arity => $arity,
- impl => sub { $op->($lop->{impl}->(@_)) }
- };
- };
-}
-
-
-use overload
- "+" => meta_bop {$_[0] + $_[1]},
- "-" => meta_bop {$_[0] - $_[1]},
- "*" => meta_bop {$_[0] * $_[1]},
- "/" => meta_bop {$_[0] / $_[1]},
- "%" => meta_bop {$_[0] % $_[1]},
- "**" => meta_bop {$_[0] ** $_[1]},
- "<<" => meta_bop {$_[0] << $_[1]},
- ">>" => meta_bop {$_[0] >> $_[1]},
- "x" => meta_bop {$_[0] x $_[1]},
- "." => meta_bop {$_[0] . $_[1]},
- "<" => meta_bop {$_[0] < $_[1]},
- "<=" => meta_bop {$_[0] <= $_[1]},
- ">" => meta_bop {$_[0] > $_[1]},
- ">=" => meta_bop {$_[0] >= $_[1]},
- "==" => meta_bop {$_[0] == $_[1]},
- "!=" => meta_bop {$_[0] != $_[1]},
- "<=>" => meta_bop {$_[0] <=> $_[1]},
- "lt" => meta_bop {$_[0] lt $_[1]},
- "le" => meta_bop {$_[0] le $_[1]},
- "gt" => meta_bop {$_[0] gt $_[1]},
- "ge" => meta_bop {$_[0] ge $_[1]},
- "eq" => meta_bop {$_[0] eq $_[1]},
- "ne" => meta_bop {$_[0] ne $_[1]},
- "cmp" => meta_bop {$_[0] cmp $_[1]},
- "\&" => meta_bop {$_[0] & $_[1]},
- "^" => meta_bop {$_[0] ^ $_[1]},
- "|" => meta_bop {$_[0] | $_[1]},
- "atan2" => meta_bop {atan2 $_[0], $_[1]},
-
- "neg" => meta_uop {-$_[0]},
- "!" => meta_uop {!$_[0]},
- "~" => meta_uop {~$_[0]},
- "cos" => meta_uop {cos $_[0]},
- "sin" => meta_uop {sin $_[0]},
- "exp" => meta_uop {exp $_[0]},
- "abs" => meta_uop {abs $_[0]},
- "log" => meta_uop {log $_[0]},
- "sqrt" => meta_uop {sqrt $_[0]},
- "bool" => sub { croak "Can't use && or || in expression containing __" },
-
- # "&()" => sub { $_[0]->{impl} },
-
- # "||" => meta_bop {$_[0] || $_[1]},
- # "&&" => meta_bop {$_[0] && $_[1]},
- # fallback => 1,
- ;
-1;
-
-__END__
-
-
-=head1 NAME
-
-Switch - A switch statement for Perl
-
-=head1 VERSION
-
-This document describes version 2.14 of Switch,
-released Dec 29, 2008.
-
-=head1 SYNOPSIS
-
- use Switch;
-
- switch ($val) {
- case 1 { print "number 1" }
- case "a" { print "string a" }
- case [1..10,42] { print "number in list" }
- case (\@array) { print "number in list" }
- case /\w+/ { print "pattern" }
- case qr/\w+/ { print "pattern" }
- case (\%hash) { print "entry in hash" }
- case (\&sub) { print "arg to subroutine" }
- else { print "previous case not true" }
- }
-
-=head1 BACKGROUND
-
-[Skip ahead to L<"DESCRIPTION"> if you don't care about the whys
-and wherefores of this control structure]
-
-In seeking to devise a "Swiss Army" case mechanism suitable for Perl,
-it is useful to generalize this notion of distributed conditional
-testing as far as possible. Specifically, the concept of "matching"
-between the switch value and the various case values need not be
-restricted to numeric (or string or referential) equality, as it is in other
-languages. Indeed, as Table 1 illustrates, Perl
-offers at least eighteen different ways in which two values could
-generate a match.
-
- Table 1: Matching a switch value ($s) with a case value ($c)
-
- Switch Case Type of Match Implied Matching Code
- Value Value
- ====== ===== ===================== =============
-
- number same numeric or referential match if $s == $c;
- or ref equality
-
- object method result of method call match if $s->$c();
- ref name match if defined $s->$c();
- or ref
-
- other other string equality match if $s eq $c;
- non-ref non-ref
- scalar scalar
-
- string regexp pattern match match if $s =~ /$c/;
-
- array scalar array entry existence match if 0<=$c && $c<@$s;
- ref array entry definition match if defined $s->[$c];
- array entry truth match if $s->[$c];
-
- array array array intersection match if intersects(@$s, @$c);
- ref ref (apply this table to
- all pairs of elements
- $s->[$i] and
- $c->[$j])
-
- array regexp array grep match if grep /$c/, @$s;
- ref
-
- hash scalar hash entry existence match if exists $s->{$c};
- ref hash entry definition match if defined $s->{$c};
- hash entry truth match if $s->{$c};
-
- hash regexp hash grep match if grep /$c/, keys %$s;
- ref
-
- sub scalar return value defn match if defined $s->($c);
- ref return value truth match if $s->($c);
-
- sub array return value defn match if defined $s->(@$c);
- ref ref return value truth match if $s->(@$c);
-
-
-In reality, Table 1 covers 31 alternatives, because only the equality and
-intersection tests are commutative; in all other cases, the roles of
-the C<$s> and C<$c> variables could be reversed to produce a
-different test. For example, instead of testing a single hash for
-the existence of a series of keys (C<match if exists $s-E<gt>{$c}>),
-one could test for the existence of a single key in a series of hashes
-(C<match if exists $c-E<gt>{$s}>).
-
-=head1 DESCRIPTION
-
-The Switch.pm module implements a generalized case mechanism that covers
-most (but not all) of the numerous possible combinations of switch and case
-values described above.
-
-The module augments the standard Perl syntax with two new control
-statements: C<switch> and C<case>. The C<switch> statement takes a
-single scalar argument of any type, specified in parentheses.
-C<switch> stores this value as the
-current switch value in a (localized) control variable.
-The value is followed by a block which may contain one or more
-Perl statements (including the C<case> statement described below).
-The block is unconditionally executed once the switch value has
-been cached.
-
-A C<case> statement takes a single scalar argument (in mandatory
-parentheses if it's a variable; otherwise the parens are optional) and
-selects the appropriate type of matching between that argument and the
-current switch value. The type of matching used is determined by the
-respective types of the switch value and the C<case> argument, as
-specified in Table 1. If the match is successful, the mandatory
-block associated with the C<case> statement is executed.
-
-In most other respects, the C<case> statement is semantically identical
-to an C<if> statement. For example, it can be followed by an C<else>
-clause, and can be used as a postfix statement qualifier.
-
-However, when a C<case> block has been executed control is automatically
-transferred to the statement after the immediately enclosing C<switch>
-block, rather than to the next statement within the block. In other
-words, the success of any C<case> statement prevents other cases in the
-same scope from executing. But see L<"Allowing fall-through"> below.
-
-Together these two new statements provide a fully generalized case
-mechanism:
-
- use Switch;
-
- # AND LATER...
-
- %special = ( woohoo => 1, d'oh => 1 );
-
- while (<>) {
- chomp;
- switch ($_) {
- case (%special) { print "homer\n"; } # if $special{$_}
- case /[a-z]/i { print "alpha\n"; } # if $_ =~ /a-z/i
- case [1..9] { print "small num\n"; } # if $_ in [1..9]
- case { $_[0] >= 10 } { print "big num\n"; } # if $_ >= 10
- print "must be punctuation\n" case /\W/; # if $_ ~= /\W/
- }
- }
-
-Note that C<switch>es can be nested within C<case> (or any other) blocks,
-and a series of C<case> statements can try different types of matches
--- hash membership, pattern match, array intersection, simple equality,
-etc. -- against the same switch value.
-
-The use of intersection tests against an array reference is particularly
-useful for aggregating integral cases:
-
- sub classify_digit
- {
- switch ($_[0]) { case 0 { return 'zero' }
- case [2,4,6,8] { return 'even' }
- case [1,3,5,7,9] { return 'odd' }
- case /[A-F]/i { return 'hex' }
- }
- }
-
-
-=head2 Allowing fall-through
-
-Fall-though (trying another case after one has already succeeded)
-is usually a Bad Idea in a switch statement. However, this
-is Perl, not a police state, so there I<is> a way to do it, if you must.
-
-If a C<case> block executes an untargeted C<next>, control is
-immediately transferred to the statement I<after> the C<case> statement
-(i.e. usually another case), rather than out of the surrounding
-C<switch> block.
-
-For example:
-
- switch ($val) {
- case 1 { handle_num_1(); next } # and try next case...
- case "1" { handle_str_1(); next } # and try next case...
- case [0..9] { handle_num_any(); } # and we're done
- case /\d/ { handle_dig_any(); next } # and try next case...
- case /.*/ { handle_str_any(); next } # and try next case...
- }
-
-If $val held the number C<1>, the above C<switch> block would call the
-first three C<handle_...> subroutines, jumping to the next case test
-each time it encountered a C<next>. After the third C<case> block
-was executed, control would jump to the end of the enclosing
-C<switch> block.
-
-On the other hand, if $val held C<10>, then only the last two C<handle_...>
-subroutines would be called.
-
-Note that this mechanism allows the notion of I<conditional fall-through>.
-For example:
-
- switch ($val) {
- case [0..9] { handle_num_any(); next if $val < 7; }
- case /\d/ { handle_dig_any(); }
- }
-
-If an untargeted C<last> statement is executed in a case block, this
-immediately transfers control out of the enclosing C<switch> block
-(in other words, there is an implicit C<last> at the end of each
-normal C<case> block). Thus the previous example could also have been
-written:
-
- switch ($val) {
- case [0..9] { handle_num_any(); last if $val >= 7; next; }
- case /\d/ { handle_dig_any(); }
- }
-
-
-=head2 Automating fall-through
-
-In situations where case fall-through should be the norm, rather than an
-exception, an endless succession of terminal C<next>s is tedious and ugly.
-Hence, it is possible to reverse the default behaviour by specifying
-the string "fallthrough" when importing the module. For example, the
-following code is equivalent to the first example in L<"Allowing fall-through">:
-
- use Switch 'fallthrough';
-
- switch ($val) {
- case 1 { handle_num_1(); }
- case "1" { handle_str_1(); }
- case [0..9] { handle_num_any(); last }
- case /\d/ { handle_dig_any(); }
- case /.*/ { handle_str_any(); }
- }
-
-Note the explicit use of a C<last> to preserve the non-fall-through
-behaviour of the third case.
-
-
-
-=head2 Alternative syntax
-
-Perl 6 will provide a built-in switch statement with essentially the
-same semantics as those offered by Switch.pm, but with a different
-pair of keywords. In Perl 6 C<switch> will be spelled C<given>, and
-C<case> will be pronounced C<when>. In addition, the C<when> statement
-will not require switch or case values to be parenthesized.
-
-This future syntax is also (largely) available via the Switch.pm module, by
-importing it with the argument C<"Perl6">. For example:
-
- use Switch 'Perl6';
-
- given ($val) {
- when 1 { handle_num_1(); }
- when ($str1) { handle_str_1(); }
- when [0..9] { handle_num_any(); last }
- when /\d/ { handle_dig_any(); }
- when /.*/ { handle_str_any(); }
- default { handle anything else; }
- }
-
-Note that scalars still need to be parenthesized, since they would be
-ambiguous in Perl 5.
-
-Note too that you can mix and match both syntaxes by importing the module
-with:
-
- use Switch 'Perl5', 'Perl6';
-
-
-=head2 Higher-order Operations
-
-One situation in which C<switch> and C<case> do not provide a good
-substitute for a cascaded C<if>, is where a switch value needs to
-be tested against a series of conditions. For example:
-
- sub beverage {
- switch (shift) {
- case { $_[0] < 10 } { return 'milk' }
- case { $_[0] < 20 } { return 'coke' }
- case { $_[0] < 30 } { return 'beer' }
- case { $_[0] < 40 } { return 'wine' }
- case { $_[0] < 50 } { return 'malt' }
- case { $_[0] < 60 } { return 'Moet' }
- else { return 'milk' }
- }
- }
-
-(This is equivalent to writing C<case (sub { $_[0] < 10 })>, etc.; C<$_[0]>
-is the argument to the anonymous subroutine.)
-
-The need to specify each condition as a subroutine block is tiresome. To
-overcome this, when importing Switch.pm, a special "placeholder"
-subroutine named C<__> [sic] may also be imported. This subroutine
-converts (almost) any expression in which it appears to a reference to a
-higher-order function. That is, the expression:
-
- use Switch '__';
-
- __ < 2
-
-is equivalent to:
-
- sub { $_[0] < 2 }
-
-With C<__>, the previous ugly case statements can be rewritten:
-
- case __ < 10 { return 'milk' }
- case __ < 20 { return 'coke' }
- case __ < 30 { return 'beer' }
- case __ < 40 { return 'wine' }
- case __ < 50 { return 'malt' }
- case __ < 60 { return 'Moet' }
- else { return 'milk' }
-
-The C<__> subroutine makes extensive use of operator overloading to
-perform its magic. All operations involving __ are overloaded to
-produce an anonymous subroutine that implements a lazy version
-of the original operation.
-
-The only problem is that operator overloading does not allow the
-boolean operators C<&&> and C<||> to be overloaded. So a case statement
-like this:
-
- case 0 <= __ && __ < 10 { return 'digit' }
-
-doesn't act as expected, because when it is
-executed, it constructs two higher order subroutines
-and then treats the two resulting references as arguments to C<&&>:
-
- sub { 0 <= $_[0] } && sub { $_[0] < 10 }
-
-This boolean expression is inevitably true, since both references are
-non-false. Fortunately, the overloaded C<'bool'> operator catches this
-situation and flags it as an error.
-
-=head1 DEPENDENCIES
-
-The module is implemented using Filter::Util::Call and Text::Balanced
-and requires both these modules to be installed.
-
-=head1 AUTHOR
-
-Damian Conway (damian at conway.org). This module is now maintained by Rafael
-Garcia-Suarez (rgarciasuarez at gmail.com) and more generally by the Perl 5
-Porters (perl5-porters at perl.org), as part of the Perl core.
-
-=head1 BUGS
-
-There are undoubtedly serious bugs lurking somewhere in code this funky :-)
-Bug reports and other feedback are most welcome.
-
-=head1 LIMITATIONS
-
-Due to the heuristic nature of Switch.pm's source parsing, the presence of
-regexes with embedded newlines that are specified with raw C</.../>
-delimiters and don't have a modifier C<//x> are indistinguishable from
-code chunks beginning with the division operator C</>. As a workaround
-you must use C<m/.../> or C<m?...?> for such patterns. Also, the presence
-of regexes specified with raw C<?...?> delimiters may cause mysterious
-errors. The workaround is to use C<m?...?> instead.
-
-Due to the way source filters work in Perl, you can't use Switch inside
-an string C<eval>.
-
-If your source file is longer then 1 million characters and you have a
-switch statement that crosses the 1 million (or 2 million, etc.)
-character boundary you will get mysterious errors. The workaround is to
-use smaller source files.
-
-=head1 COPYRIGHT
-
- Copyright (c) 1997-2008, Damian Conway. All Rights Reserved.
- This module is free software. It may be used, redistributed
- and/or modified under the same terms as Perl itself.
Deleted: vendor/perl/dist/lib/Test.pm
===================================================================
--- vendor/perl/dist/lib/Test.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Test.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,954 +0,0 @@
-
-require 5.004;
-package Test;
-
-use strict;
-
-use Carp;
-use vars (qw($VERSION @ISA @EXPORT @EXPORT_OK $ntest $TestLevel), #public-ish
- qw($TESTOUT $TESTERR %Program_Lines $told_about_diff
- $ONFAIL %todo %history $planned @FAILDETAIL) #private-ish
- );
-
-# In case a test is run in a persistent environment.
-sub _reset_globals {
- %todo = ();
- %history = ();
- @FAILDETAIL = ();
- $ntest = 1;
- $TestLevel = 0; # how many extra stack frames to skip
- $planned = 0;
-}
-
-$VERSION = '1.25_02';
-require Exporter;
- at ISA=('Exporter');
-
- at EXPORT = qw(&plan &ok &skip);
- at EXPORT_OK = qw($ntest $TESTOUT $TESTERR);
-
-$|=1;
-$TESTOUT = *STDOUT{IO};
-$TESTERR = *STDERR{IO};
-
-# Use of this variable is strongly discouraged. It is set mainly to
-# help test coverage analyzers know which test is running.
-$ENV{REGRESSION_TEST} = $0;
-
-
-=head1 NAME
-
-Test - provides a simple framework for writing test scripts
-
-=head1 SYNOPSIS
-
- use strict;
- use Test;
-
- # use a BEGIN block so we print our plan before MyModule is loaded
- BEGIN { plan tests => 14, todo => [3,4] }
-
- # load your module...
- use MyModule;
-
- # Helpful notes. All note-lines must start with a "#".
- print "# I'm testing MyModule version $MyModule::VERSION\n";
-
- ok(0); # failure
- ok(1); # success
-
- ok(0); # ok, expected failure (see todo list, above)
- ok(1); # surprise success!
-
- ok(0,1); # failure: '0' ne '1'
- ok('broke','fixed'); # failure: 'broke' ne 'fixed'
- ok('fixed','fixed'); # success: 'fixed' eq 'fixed'
- ok('fixed',qr/x/); # success: 'fixed' =~ qr/x/
-
- ok(sub { 1+1 }, 2); # success: '2' eq '2'
- ok(sub { 1+1 }, 3); # failure: '2' ne '3'
-
- my @list = (0,0);
- ok @list, 3, "\@list=".join(',', at list); #extra notes
- ok 'segmentation fault', '/(?i)success/'; #regex match
-
- skip(
- $^O =~ m/MSWin/ ? "Skip if MSWin" : 0, # whether to skip
- $foo, $bar # arguments just like for ok(...)
- );
- skip(
- $^O =~ m/MSWin/ ? 0 : "Skip unless MSWin", # whether to skip
- $foo, $bar # arguments just like for ok(...)
- );
-
-=head1 DESCRIPTION
-
-This module simplifies the task of writing test files for Perl modules,
-such that their output is in the format that
-L<Test::Harness|Test::Harness> expects to see.
-
-=head1 QUICK START GUIDE
-
-To write a test for your new (and probably not even done) module, create
-a new file called F<t/test.t> (in a new F<t> directory). If you have
-multiple test files, to test the "foo", "bar", and "baz" feature sets,
-then feel free to call your files F<t/foo.t>, F<t/bar.t>, and
-F<t/baz.t>
-
-=head2 Functions
-
-This module defines three public functions, C<plan(...)>, C<ok(...)>,
-and C<skip(...)>. By default, all three are exported by
-the C<use Test;> statement.
-
-=over 4
-
-=item C<plan(...)>
-
- BEGIN { plan %theplan; }
-
-This should be the first thing you call in your test script. It
-declares your testing plan, how many there will be, if any of them
-should be allowed to fail, and so on.
-
-Typical usage is just:
-
- use Test;
- BEGIN { plan tests => 23 }
-
-These are the things that you can put in the parameters to plan:
-
-=over
-
-=item C<tests =E<gt> I<number>>
-
-The number of tests in your script.
-This means all ok() and skip() calls.
-
-=item C<todo =E<gt> [I<1,5,14>]>
-
-A reference to a list of tests which are allowed to fail.
-See L</TODO TESTS>.
-
-=item C<onfail =E<gt> sub { ... }>
-
-=item C<onfail =E<gt> \&some_sub>
-
-A subroutine reference to be run at the end of the test script, if
-any of the tests fail. See L</ONFAIL>.
-
-=back
-
-You must call C<plan(...)> once and only once. You should call it
-in a C<BEGIN {...}> block, like so:
-
- BEGIN { plan tests => 23 }
-
-=cut
-
-sub plan {
- croak "Test::plan(%args): odd number of arguments" if @_ & 1;
- croak "Test::plan(): should not be called more than once" if $planned;
-
- local($\, $,); # guard against -l and other things that screw with
- # print
-
- _reset_globals();
-
- _read_program( (caller)[1] );
-
- my $max=0;
- while (@_) {
- my ($k,$v) = splice(@_, 0, 2);
- if ($k =~ /^test(s)?$/) { $max = $v; }
- elsif ($k eq 'todo' or
- $k eq 'failok') { for (@$v) { $todo{$_}=1; }; }
- elsif ($k eq 'onfail') {
- ref $v eq 'CODE' or croak "Test::plan(onfail => $v): must be CODE";
- $ONFAIL = $v;
- }
- else { carp "Test::plan(): skipping unrecognized directive '$k'" }
- }
- my @todo = sort { $a <=> $b } keys %todo;
- if (@todo) {
- print $TESTOUT "1..$max todo ".join(' ', @todo).";\n";
- } else {
- print $TESTOUT "1..$max\n";
- }
- ++$planned;
- print $TESTOUT "# Running under perl version $] for $^O",
- (chr(65) eq 'A') ? "\n" : " in a non-ASCII world\n";
-
- print $TESTOUT "# Win32::BuildNumber ", &Win32::BuildNumber(), "\n"
- if defined(&Win32::BuildNumber) and defined &Win32::BuildNumber();
-
- print $TESTOUT "# MacPerl version $MacPerl::Version\n"
- if defined $MacPerl::Version;
-
- printf $TESTOUT
- "# Current time local: %s\n# Current time GMT: %s\n",
- scalar(localtime($^T)), scalar(gmtime($^T));
-
- print $TESTOUT "# Using Test.pm version $VERSION\n";
-
- # Retval never used:
- return undef;
-}
-
-sub _read_program {
- my($file) = shift;
- return unless defined $file and length $file
- and -e $file and -f _ and -r _;
- open(SOURCEFILE, "<$file") || return;
- $Program_Lines{$file} = [<SOURCEFILE>];
- close(SOURCEFILE);
-
- foreach my $x (@{$Program_Lines{$file}})
- { $x =~ tr/\cm\cj\n\r//d }
-
- unshift @{$Program_Lines{$file}}, '';
- return 1;
-}
-
-=begin _private
-
-=item B<_to_value>
-
- my $value = _to_value($input);
-
-Converts an C<ok> parameter to its value. Typically this just means
-running it, if it's a code reference. You should run all inputted
-values through this.
-
-=cut
-
-sub _to_value {
- my ($v) = @_;
- return ref $v eq 'CODE' ? $v->() : $v;
-}
-
-sub _quote {
- my $str = $_[0];
- return "<UNDEF>" unless defined $str;
- $str =~ s/\\/\\\\/g;
- $str =~ s/"/\\"/g;
- $str =~ s/\a/\\a/g;
- $str =~ s/[\b]/\\b/g;
- $str =~ s/\e/\\e/g;
- $str =~ s/\f/\\f/g;
- $str =~ s/\n/\\n/g;
- $str =~ s/\r/\\r/g;
- $str =~ s/\t/\\t/g;
- $str =~ s/([\0-\037])(?!\d)/sprintf('\\%o',ord($1))/eg;
- $str =~ s/([\0-\037\177-\377])/sprintf('\\x%02X',ord($1))/eg;
- $str =~ s/([^\0-\176])/sprintf('\\x{%X}',ord($1))/eg;
- #if( $_[1] ) {
- # substr( $str , 218-3 ) = "..."
- # if length($str) >= 218 and !$ENV{PERL_TEST_NO_TRUNC};
- #}
- return qq("$str");
-}
-
-
-=end _private
-
-=item C<ok(...)>
-
- ok(1 + 1 == 2);
- ok($have, $expect);
- ok($have, $expect, $diagnostics);
-
-This function is the reason for C<Test>'s existence. It's
-the basic function that
-handles printing "C<ok>" or "C<not ok>", along with the
-current test number. (That's what C<Test::Harness> wants to see.)
-
-In its most basic usage, C<ok(...)> simply takes a single scalar
-expression. If its value is true, the test passes; if false,
-the test fails. Examples:
-
- # Examples of ok(scalar)
-
- ok( 1 + 1 == 2 ); # ok if 1 + 1 == 2
- ok( $foo =~ /bar/ ); # ok if $foo contains 'bar'
- ok( baz($x + $y) eq 'Armondo' ); # ok if baz($x + $y) returns
- # 'Armondo'
- ok( @a == @b ); # ok if @a and @b are the same length
-
-The expression is evaluated in scalar context. So the following will
-work:
-
- ok( @stuff ); # ok if @stuff has any elements
- ok( !grep !defined $_, @stuff ); # ok if everything in @stuff is
- # defined.
-
-A special case is if the expression is a subroutine reference (in either
-C<sub {...}> syntax or C<\&foo> syntax). In
-that case, it is executed and its value (true or false) determines if
-the test passes or fails. For example,
-
- ok( sub { # See whether sleep works at least passably
- my $start_time = time;
- sleep 5;
- time() - $start_time >= 4
- });
-
-In its two-argument form, C<ok(I<arg1>, I<arg2>)> compares the two
-scalar values to see if they match. They match if both are undefined,
-or if I<arg2> is a regex that matches I<arg1>, or if they compare equal
-with C<eq>.
-
- # Example of ok(scalar, scalar)
-
- ok( "this", "that" ); # not ok, 'this' ne 'that'
- ok( "", undef ); # not ok, "" is defined
-
-The second argument is considered a regex if it is either a regex
-object or a string that looks like a regex. Regex objects are
-constructed with the qr// operator in recent versions of perl. A
-string is considered to look like a regex if its first and last
-characters are "/", or if the first character is "m"
-and its second and last characters are both the
-same non-alphanumeric non-whitespace character. These regexp
-
-Regex examples:
-
- ok( 'JaffO', '/Jaff/' ); # ok, 'JaffO' =~ /Jaff/
- ok( 'JaffO', 'm|Jaff|' ); # ok, 'JaffO' =~ m|Jaff|
- ok( 'JaffO', qr/Jaff/ ); # ok, 'JaffO' =~ qr/Jaff/;
- ok( 'JaffO', '/(?i)jaff/ ); # ok, 'JaffO' =~ /jaff/i;
-
-If either (or both!) is a subroutine reference, it is run and used
-as the value for comparing. For example:
-
- ok sub {
- open(OUT, ">x.dat") || die $!;
- print OUT "\x{e000}";
- close OUT;
- my $bytecount = -s 'x.dat';
- unlink 'x.dat' or warn "Can't unlink : $!";
- return $bytecount;
- },
- 4
- ;
-
-The above test passes two values to C<ok(arg1, arg2)> -- the first
-a coderef, and the second is the number 4. Before C<ok> compares them,
-it calls the coderef, and uses its return value as the real value of
-this parameter. Assuming that C<$bytecount> returns 4, C<ok> ends up
-testing C<4 eq 4>. Since that's true, this test passes.
-
-Finally, you can append an optional third argument, in
-C<ok(I<arg1>,I<arg2>, I<note>)>, where I<note> is a string value that
-will be printed if the test fails. This should be some useful
-information about the test, pertaining to why it failed, and/or
-a description of the test. For example:
-
- ok( grep($_ eq 'something unique', @stuff), 1,
- "Something that should be unique isn't!\n".
- '@stuff = '.join ', ', @stuff
- );
-
-Unfortunately, a note cannot be used with the single argument
-style of C<ok()>. That is, if you try C<ok(I<arg1>, I<note>)>, then
-C<Test> will interpret this as C<ok(I<arg1>, I<arg2>)>, and probably
-end up testing C<I<arg1> eq I<arg2>> -- and that's not what you want!
-
-All of the above special cases can occasionally cause some
-problems. See L</BUGS and CAVEATS>.
-
-=cut
-
-# A past maintainer of this module said:
-# <<ok(...)'s special handling of subroutine references is an unfortunate
-# "feature" that can't be removed due to compatibility.>>
-#
-
-sub ok ($;$$) {
- croak "ok: plan before you test!" if !$planned;
-
- local($\,$,); # guard against -l and other things that screw with
- # print
-
- my ($pkg,$file,$line) = caller($TestLevel);
- my $repetition = ++$history{"$file:$line"};
- my $context = ("$file at line $line".
- ($repetition > 1 ? " fail \#$repetition" : ''));
-
- # Are we comparing two values?
- my $compare = 0;
-
- my $ok=0;
- my $result = _to_value(shift);
- my ($expected, $isregex, $regex);
- if (@_ == 0) {
- $ok = $result;
- } else {
- $compare = 1;
- $expected = _to_value(shift);
- if (!defined $expected) {
- $ok = !defined $result;
- } elsif (!defined $result) {
- $ok = 0;
- } elsif (ref($expected) eq 'Regexp') {
- $ok = $result =~ /$expected/;
- $regex = $expected;
- } elsif (($regex) = ($expected =~ m,^ / (.+) / $,sx) or
- (undef, $regex) = ($expected =~ m,^ m([^\w\s]) (.+) \1 $,sx)) {
- $ok = $result =~ /$regex/;
- } else {
- $ok = $result eq $expected;
- }
- }
- my $todo = $todo{$ntest};
- if ($todo and $ok) {
- $context .= ' TODO?!' if $todo;
- print $TESTOUT "ok $ntest # ($context)\n";
- } else {
- # Issuing two seperate prints() causes problems on VMS.
- if (!$ok) {
- print $TESTOUT "not ok $ntest\n";
- }
- else {
- print $TESTOUT "ok $ntest\n";
- }
-
- $ok or _complain($result, $expected,
- {
- 'repetition' => $repetition, 'package' => $pkg,
- 'result' => $result, 'todo' => $todo,
- 'file' => $file, 'line' => $line,
- 'context' => $context, 'compare' => $compare,
- @_ ? ('diagnostic' => _to_value(shift)) : (),
- });
-
- }
- ++ $ntest;
- $ok;
-}
-
-
-sub _complain {
- my($result, $expected, $detail) = @_;
- $$detail{expected} = $expected if defined $expected;
-
- # Get the user's diagnostic, protecting against multi-line
- # diagnostics.
- my $diag = $$detail{diagnostic};
- $diag =~ s/\n/\n#/g if defined $diag;
-
- $$detail{context} .= ' *TODO*' if $$detail{todo};
- if (!$$detail{compare}) {
- if (!$diag) {
- print $TESTERR "# Failed test $ntest in $$detail{context}\n";
- } else {
- print $TESTERR "# Failed test $ntest in $$detail{context}: $diag\n";
- }
- } else {
- my $prefix = "Test $ntest";
-
- print $TESTERR "# $prefix got: " . _quote($result) .
- " ($$detail{context})\n";
- $prefix = ' ' x (length($prefix) - 5);
- my $expected_quoted = (defined $$detail{regex})
- ? 'qr{'.($$detail{regex}).'}' : _quote($expected);
-
- print $TESTERR "# $prefix Expected: $expected_quoted",
- $diag ? " ($diag)" : (), "\n";
-
- _diff_complain( $result, $expected, $detail, $prefix )
- if defined($expected) and 2 < ($expected =~ tr/\n//);
- }
-
- if(defined $Program_Lines{ $$detail{file} }[ $$detail{line} ]) {
- print $TESTERR
- "# $$detail{file} line $$detail{line} is: $Program_Lines{ $$detail{file} }[ $$detail{line} ]\n"
- if $Program_Lines{ $$detail{file} }[ $$detail{line} ]
- =~ m/[^\s\#\(\)\{\}\[\]\;]/; # Otherwise it's uninformative
-
- undef $Program_Lines{ $$detail{file} }[ $$detail{line} ];
- # So we won't repeat it.
- }
-
- push @FAILDETAIL, $detail;
- return;
-}
-
-
-
-sub _diff_complain {
- my($result, $expected, $detail, $prefix) = @_;
- return _diff_complain_external(@_) if $ENV{PERL_TEST_DIFF};
- return _diff_complain_algdiff(@_)
- if eval { require Algorithm::Diff; Algorithm::Diff->VERSION(1.15); 1; };
-
- $told_about_diff++ or print $TESTERR <<"EOT";
-# $prefix (Install the Algorithm::Diff module to have differences in multiline
-# $prefix output explained. You might also set the PERL_TEST_DIFF environment
-# $prefix variable to run a diff program on the output.)
-EOT
- ;
- return;
-}
-
-
-
-sub _diff_complain_external {
- my($result, $expected, $detail, $prefix) = @_;
- my $diff = $ENV{PERL_TEST_DIFF} || die "WHAAAA?";
-
- require File::Temp;
- my($got_fh, $got_filename) = File::Temp::tempfile("test-got-XXXXX");
- my($exp_fh, $exp_filename) = File::Temp::tempfile("test-exp-XXXXX");
- unless ($got_fh && $exp_fh) {
- warn "Can't get tempfiles";
- return;
- }
-
- print $got_fh $result;
- print $exp_fh $expected;
- if (close($got_fh) && close($exp_fh)) {
- my $diff_cmd = "$diff $exp_filename $got_filename";
- print $TESTERR "#\n# $prefix $diff_cmd\n";
- if (open(DIFF, "$diff_cmd |")) {
- local $_;
- while (<DIFF>) {
- print $TESTERR "# $prefix $_";
- }
- close(DIFF);
- }
- else {
- warn "Can't run diff: $!";
- }
- } else {
- warn "Can't write to tempfiles: $!";
- }
- unlink($got_filename);
- unlink($exp_filename);
- return;
-}
-
-
-
-sub _diff_complain_algdiff {
- my($result, $expected, $detail, $prefix) = @_;
-
- my @got = split(/^/, $result);
- my @exp = split(/^/, $expected);
-
- my $diff_kind;
- my @diff_lines;
-
- my $diff_flush = sub {
- return unless $diff_kind;
-
- my $count_lines = @diff_lines;
- my $s = $count_lines == 1 ? "" : "s";
- my $first_line = $diff_lines[0][0] + 1;
-
- print $TESTERR "# $prefix ";
- if ($diff_kind eq "GOT") {
- print $TESTERR "Got $count_lines extra line$s at line $first_line:\n";
- for my $i (@diff_lines) {
- print $TESTERR "# $prefix + " . _quote($got[$i->[0]]) . "\n";
- }
- } elsif ($diff_kind eq "EXP") {
- if ($count_lines > 1) {
- my $last_line = $diff_lines[-1][0] + 1;
- print $TESTERR "Lines $first_line-$last_line are";
- }
- else {
- print $TESTERR "Line $first_line is";
- }
- print $TESTERR " missing:\n";
- for my $i (@diff_lines) {
- print $TESTERR "# $prefix - " . _quote($exp[$i->[1]]) . "\n";
- }
- } elsif ($diff_kind eq "CH") {
- if ($count_lines > 1) {
- my $last_line = $diff_lines[-1][0] + 1;
- print $TESTERR "Lines $first_line-$last_line are";
- }
- else {
- print $TESTERR "Line $first_line is";
- }
- print $TESTERR " changed:\n";
- for my $i (@diff_lines) {
- print $TESTERR "# $prefix - " . _quote($exp[$i->[1]]) . "\n";
- print $TESTERR "# $prefix + " . _quote($got[$i->[0]]) . "\n";
- }
- }
-
- # reset
- $diff_kind = undef;
- @diff_lines = ();
- };
-
- my $diff_collect = sub {
- my $kind = shift;
- &$diff_flush() if $diff_kind && $diff_kind ne $kind;
- $diff_kind = $kind;
- push(@diff_lines, [@_]);
- };
-
-
- Algorithm::Diff::traverse_balanced(
- \@got, \@exp,
- {
- DISCARD_A => sub { &$diff_collect("GOT", @_) },
- DISCARD_B => sub { &$diff_collect("EXP", @_) },
- CHANGE => sub { &$diff_collect("CH", @_) },
- MATCH => sub { &$diff_flush() },
- },
- );
- &$diff_flush();
-
- return;
-}
-
-
-
-
-#~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
-
-
-=item C<skip(I<skip_if_true>, I<args...>)>
-
-This is used for tests that under some conditions can be skipped. It's
-basically equivalent to:
-
- if( $skip_if_true ) {
- ok(1);
- } else {
- ok( args... );
- }
-
-...except that the C<ok(1)> emits not just "C<ok I<testnum>>" but
-actually "C<ok I<testnum> # I<skip_if_true_value>>".
-
-The arguments after the I<skip_if_true> are what is fed to C<ok(...)> if
-this test isn't skipped.
-
-Example usage:
-
- my $if_MSWin =
- $^O =~ m/MSWin/ ? 'Skip if under MSWin' : '';
-
- # A test to be skipped if under MSWin (i.e., run except under MSWin)
- skip($if_MSWin, thing($foo), thing($bar) );
-
-Or, going the other way:
-
- my $unless_MSWin =
- $^O =~ m/MSWin/ ? '' : 'Skip unless under MSWin';
-
- # A test to be skipped unless under MSWin (i.e., run only under MSWin)
- skip($unless_MSWin, thing($foo), thing($bar) );
-
-The tricky thing to remember is that the first parameter is true if
-you want to I<skip> the test, not I<run> it; and it also doubles as a
-note about why it's being skipped. So in the first codeblock above, read
-the code as "skip if MSWin -- (otherwise) test whether C<thing($foo)> is
-C<thing($bar)>" or for the second case, "skip unless MSWin...".
-
-Also, when your I<skip_if_reason> string is true, it really should (for
-backwards compatibility with older Test.pm versions) start with the
-string "Skip", as shown in the above examples.
-
-Note that in the above cases, C<thing($foo)> and C<thing($bar)>
-I<are> evaluated -- but as long as the C<skip_if_true> is true,
-then we C<skip(...)> just tosses out their value (i.e., not
-bothering to treat them like values to C<ok(...)>. But if
-you need to I<not> eval the arguments when skipping the
-test, use
-this format:
-
- skip( $unless_MSWin,
- sub {
- # This code returns true if the test passes.
- # (But it doesn't even get called if the test is skipped.)
- thing($foo) eq thing($bar)
- }
- );
-
-or even this, which is basically equivalent:
-
- skip( $unless_MSWin,
- sub { thing($foo) }, sub { thing($bar) }
- );
-
-That is, both are like this:
-
- if( $unless_MSWin ) {
- ok(1); # but it actually appends "# $unless_MSWin"
- # so that Test::Harness can tell it's a skip
- } else {
- # Not skipping, so actually call and evaluate...
- ok( sub { thing($foo) }, sub { thing($bar) } );
- }
-
-=cut
-
-sub skip ($;$$$) {
- local($\, $,); # guard against -l and other things that screw with
- # print
-
- my $whyskip = _to_value(shift);
- if (!@_ or $whyskip) {
- $whyskip = '' if $whyskip =~ m/^\d+$/;
- $whyskip =~ s/^[Ss]kip(?:\s+|$)//; # backwards compatibility, old
- # versions required the reason
- # to start with 'skip'
- # We print in one shot for VMSy reasons.
- my $ok = "ok $ntest # skip";
- $ok .= " $whyskip" if length $whyskip;
- $ok .= "\n";
- print $TESTOUT $ok;
- ++ $ntest;
- return 1;
- } else {
- # backwards compatibility (I think). skip() used to be
- # called like ok(), which is weird. I haven't decided what to do with
- # this yet.
-# warn <<WARN if $^W;
-#This looks like a skip() using the very old interface. Please upgrade to
-#the documented interface as this has been deprecated.
-#WARN
-
- local($TestLevel) = $TestLevel+1; #to ignore this stack frame
- return &ok(@_);
- }
-}
-
-=back
-
-=cut
-
-END {
- $ONFAIL->(\@FAILDETAIL) if @FAILDETAIL && $ONFAIL;
-}
-
-1;
-__END__
-
-=head1 TEST TYPES
-
-=over 4
-
-=item * NORMAL TESTS
-
-These tests are expected to succeed. Usually, most or all of your tests
-are in this category. If a normal test doesn't succeed, then that
-means that something is I<wrong>.
-
-=item * SKIPPED TESTS
-
-The C<skip(...)> function is for tests that might or might not be
-possible to run, depending
-on the availability of platform-specific features. The first argument
-should evaluate to true (think "yes, please skip") if the required
-feature is I<not> available. After the first argument, C<skip(...)> works
-exactly the same way as C<ok(...)> does.
-
-=item * TODO TESTS
-
-TODO tests are designed for maintaining an B<executable TODO list>.
-These tests are I<expected to fail.> If a TODO test does succeed,
-then the feature in question shouldn't be on the TODO list, now
-should it?
-
-Packages should NOT be released with succeeding TODO tests. As soon
-as a TODO test starts working, it should be promoted to a normal test,
-and the newly working feature should be documented in the release
-notes or in the change log.
-
-=back
-
-=head1 ONFAIL
-
- BEGIN { plan test => 4, onfail => sub { warn "CALL 911!" } }
-
-Although test failures should be enough, extra diagnostics can be
-triggered at the end of a test run. C<onfail> is passed an array ref
-of hash refs that describe each test failure. Each hash will contain
-at least the following fields: C<package>, C<repetition>, and
-C<result>. (You shouldn't rely on any other fields being present.) If the test
-had an expected value or a diagnostic (or "note") string, these will also be
-included.
-
-The I<optional> C<onfail> hook might be used simply to print out the
-version of your package and/or how to report problems. It might also
-be used to generate extremely sophisticated diagnostics for a
-particularly bizarre test failure. However it's not a panacea. Core
-dumps or other unrecoverable errors prevent the C<onfail> hook from
-running. (It is run inside an C<END> block.) Besides, C<onfail> is
-probably over-kill in most cases. (Your test code should be simpler
-than the code it is testing, yes?)
-
-
-=head1 BUGS and CAVEATS
-
-=over
-
-=item *
-
-C<ok(...)>'s special handing of strings which look like they might be
-regexes can also cause unexpected behavior. An innocent:
-
- ok( $fileglob, '/path/to/some/*stuff/' );
-
-will fail, since Test.pm considers the second argument to be a regex!
-The best bet is to use the one-argument form:
-
- ok( $fileglob eq '/path/to/some/*stuff/' );
-
-=item *
-
-C<ok(...)>'s use of string C<eq> can sometimes cause odd problems
-when comparing
-numbers, especially if you're casting a string to a number:
-
- $foo = "1.0";
- ok( $foo, 1 ); # not ok, "1.0" ne 1
-
-Your best bet is to use the single argument form:
-
- ok( $foo == 1 ); # ok "1.0" == 1
-
-=item *
-
-As you may have inferred from the above documentation and examples,
-C<ok>'s prototype is C<($;$$)> (and, incidentally, C<skip>'s is
-C<($;$$$)>). This means, for example, that you can do C<ok @foo, @bar>
-to compare the I<size> of the two arrays. But don't be fooled into
-thinking that C<ok @foo, @bar> means a comparison of the contents of two
-arrays -- you're comparing I<just> the number of elements of each. It's
-so easy to make that mistake in reading C<ok @foo, @bar> that you might
-want to be very explicit about it, and instead write C<ok scalar(@foo),
-scalar(@bar)>.
-
-=item *
-
-This almost definitely doesn't do what you expect:
-
- ok $thingy->can('some_method');
-
-Why? Because C<can> returns a coderef to mean "yes it can (and the
-method is this...)", and then C<ok> sees a coderef and thinks you're
-passing a function that you want it to call and consider the truth of
-the result of! I.e., just like:
-
- ok $thingy->can('some_method')->();
-
-What you probably want instead is this:
-
- ok $thingy->can('some_method') && 1;
-
-If the C<can> returns false, then that is passed to C<ok>. If it
-returns true, then the larger expression S<< C<<
-$thingy->can('some_method') && 1 >> >> returns 1, which C<ok> sees as
-a simple signal of success, as you would expect.
-
-
-=item *
-
-The syntax for C<skip> is about the only way it can be, but it's still
-quite confusing. Just start with the above examples and you'll
-be okay.
-
-Moreover, users may expect this:
-
- skip $unless_mswin, foo($bar), baz($quux);
-
-to not evaluate C<foo($bar)> and C<baz($quux)> when the test is being
-skipped. But in reality, they I<are> evaluated, but C<skip> just won't
-bother comparing them if C<$unless_mswin> is true.
-
-You could do this:
-
- skip $unless_mswin, sub{foo($bar)}, sub{baz($quux)};
-
-But that's not terribly pretty. You may find it simpler or clearer in
-the long run to just do things like this:
-
- if( $^O =~ m/MSWin/ ) {
- print "# Yay, we're under $^O\n";
- ok foo($bar), baz($quux);
- ok thing($whatever), baz($stuff);
- ok blorp($quux, $whatever);
- ok foo($barzbarz), thang($quux);
- } else {
- print "# Feh, we're under $^O. Watch me skip some tests...\n";
- for(1 .. 4) { skip "Skip unless under MSWin" }
- }
-
-But be quite sure that C<ok> is called exactly as many times in the
-first block as C<skip> is called in the second block.
-
-=back
-
-
-=head1 ENVIRONMENT
-
-If C<PERL_TEST_DIFF> environment variable is set, it will be used as a
-command for comparing unexpected multiline results. If you have GNU
-diff installed, you might want to set C<PERL_TEST_DIFF> to C<diff -u>.
-If you don't have a suitable program, you might install the
-C<Text::Diff> module and then set C<PERL_TEST_DIFF> to be C<perl
--MText::Diff -e 'print diff(@ARGV)'>. If C<PERL_TEST_DIFF> isn't set
-but the C<Algorithm::Diff> module is available, then it will be used
-to show the differences in multiline results.
-
-=for comment
-If C<PERL_TEST_NO_TRUNC> is set, then the initial "Got 'something' but
-expected 'something_else'" readings for long multiline output values aren't
-truncated at about the 230th column, as they normally could be in some
-cases. Normally you won't need to use this, unless you were carefully
-parsing the output of your test programs.
-
-
-=head1 NOTE
-
-A past developer of this module once said that it was no longer being
-actively developed. However, rumors of its demise were greatly
-exaggerated. Feedback and suggestions are quite welcome.
-
-Be aware that the main value of this module is its simplicity. Note
-that there are already more ambitious modules out there, such as
-L<Test::More> and L<Test::Unit>.
-
-Some earlier versions of this module had docs with some confusing
-typos in the description of C<skip(...)>.
-
-
-=head1 SEE ALSO
-
-L<Test::Harness>
-
-L<Test::Simple>, L<Test::More>, L<Devel::Cover>
-
-L<Test::Builder> for building your own testing library.
-
-L<Test::Unit> is an interesting XUnit-style testing library.
-
-L<Test::Inline> and L<SelfTest> let you embed tests in code.
-
-
-=head1 AUTHOR
-
-Copyright (c) 1998-2000 Joshua Nathaniel Pritikin.
-
-Copyright (c) 2001-2002 Michael G. Schwern.
-
-Copyright (c) 2002-2004 Sean M. Burke.
-
-Current maintainer: Jesse Vincent. E<lt>jesse at bestpractical.comE<gt>
-
-This package is free software and is provided "as is" without express
-or implied warranty. It may be used, redistributed and/or modified
-under the same terms as Perl itself.
-
-=cut
-
-# "Your mistake was a hidden intention."
-# -- /Oblique Strategies/, Brian Eno and Peter Schmidt
Deleted: vendor/perl/dist/lib/Tie/File.pm
===================================================================
--- vendor/perl/dist/lib/Tie/File.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Tie/File.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,2632 +0,0 @@
-
-package Tie::File;
-require 5.005;
-use Carp ':DEFAULT', 'confess';
-use POSIX 'SEEK_SET';
-use Fcntl 'O_CREAT', 'O_RDWR', 'LOCK_EX', 'LOCK_SH', 'O_WRONLY', 'O_RDONLY';
-sub O_ACCMODE () { O_RDONLY | O_RDWR | O_WRONLY }
-
-
-$VERSION = "0.97_02";
-my $DEFAULT_MEMORY_SIZE = 1<<21; # 2 megabytes
-my $DEFAULT_AUTODEFER_THRESHHOLD = 3; # 3 records
-my $DEFAULT_AUTODEFER_FILELEN_THRESHHOLD = 65536; # 16 disk blocksful
-
-my %good_opt = map {$_ => 1, "-$_" => 1}
- qw(memory dw_size mode recsep discipline
- autodefer autochomp autodefer_threshhold concurrent);
-
-sub TIEARRAY {
- if (@_ % 2 != 0) {
- croak "usage: tie \@array, $_[0], filename, [option => value]...";
- }
- my ($pack, $file, %opts) = @_;
-
- # transform '-foo' keys into 'foo' keys
- for my $key (keys %opts) {
- unless ($good_opt{$key}) {
- croak("$pack: Unrecognized option '$key'\n");
- }
- my $okey = $key;
- if ($key =~ s/^-+//) {
- $opts{$key} = delete $opts{$okey};
- }
- }
-
- if ($opts{concurrent}) {
- croak("$pack: concurrent access not supported yet\n");
- }
-
- unless (defined $opts{memory}) {
- # default is the larger of the default cache size and the
- # deferred-write buffer size (if specified)
- $opts{memory} = $DEFAULT_MEMORY_SIZE;
- $opts{memory} = $opts{dw_size}
- if defined $opts{dw_size} && $opts{dw_size} > $DEFAULT_MEMORY_SIZE;
- # Dora Winifred Read
- }
- $opts{dw_size} = $opts{memory} unless defined $opts{dw_size};
- if ($opts{dw_size} > $opts{memory}) {
- croak("$pack: dw_size may not be larger than total memory allocation\n");
- }
- # are we in deferred-write mode?
- $opts{defer} = 0 unless defined $opts{defer};
- $opts{deferred} = {}; # no records are presently deferred
- $opts{deferred_s} = 0; # count of total bytes in ->{deferred}
- $opts{deferred_max} = -1; # empty
-
- # What's a good way to arrange that this class can be overridden?
- $opts{cache} = Tie::File::Cache->new($opts{memory});
-
- # autodeferment is enabled by default
- $opts{autodefer} = 1 unless defined $opts{autodefer};
- $opts{autodeferring} = 0; # but is not initially active
- $opts{ad_history} = [];
- $opts{autodefer_threshhold} = $DEFAULT_AUTODEFER_THRESHHOLD
- unless defined $opts{autodefer_threshhold};
- $opts{autodefer_filelen_threshhold} = $DEFAULT_AUTODEFER_FILELEN_THRESHHOLD
- unless defined $opts{autodefer_filelen_threshhold};
-
- $opts{offsets} = [0];
- $opts{filename} = $file;
- unless (defined $opts{recsep}) {
- $opts{recsep} = _default_recsep();
- }
- $opts{recseplen} = length($opts{recsep});
- if ($opts{recseplen} == 0) {
- croak "Empty record separator not supported by $pack";
- }
-
- $opts{autochomp} = 1 unless defined $opts{autochomp};
-
- $opts{mode} = O_CREAT|O_RDWR unless defined $opts{mode};
- $opts{rdonly} = (($opts{mode} & O_ACCMODE) == O_RDONLY);
- $opts{sawlastrec} = undef;
-
- my $fh;
-
- if (UNIVERSAL::isa($file, 'GLOB')) {
- # We use 1 here on the theory that some systems
- # may not indicate failure if we use 0.
- # MSWin32 does not indicate failure with 0, but I don't know if
- # it will indicate failure with 1 or not.
- unless (seek $file, 1, SEEK_SET) {
- croak "$pack: your filehandle does not appear to be seekable";
- }
- seek $file, 0, SEEK_SET; # put it back
- $fh = $file; # setting binmode is the user's problem
- } elsif (ref $file) {
- croak "usage: tie \@array, $pack, filename, [option => value]...";
- } else {
- # $fh = \do { local *FH }; # XXX this is buggy
- if ($] < 5.006) {
- # perl 5.005 and earlier don't autovivify filehandles
- require Symbol;
- $fh = Symbol::gensym();
- }
- sysopen $fh, $file, $opts{mode}, 0666 or return;
- binmode $fh;
- ++$opts{ourfh};
- }
- { my $ofh = select $fh; $| = 1; select $ofh } # autoflush on write
- if (defined $opts{discipline} && $] >= 5.006) {
- # This avoids a compile-time warning under 5.005
- eval 'binmode($fh, $opts{discipline})';
- croak $@ if $@ =~ /unknown discipline/i;
- die if $@;
- }
- $opts{fh} = $fh;
-
- bless \%opts => $pack;
-}
-
-sub FETCH {
- my ($self, $n) = @_;
- my $rec;
-
- # check the defer buffer
- $rec = $self->{deferred}{$n} if exists $self->{deferred}{$n};
- $rec = $self->_fetch($n) unless defined $rec;
-
- # inlined _chomp1
- substr($rec, - $self->{recseplen}) = ""
- if defined $rec && $self->{autochomp};
- $rec;
-}
-
-# Chomp many records in-place; return nothing useful
-sub _chomp {
- my $self = shift;
- return unless $self->{autochomp};
- if ($self->{autochomp}) {
- for (@_) {
- next unless defined;
- substr($_, - $self->{recseplen}) = "";
- }
- }
-}
-
-# Chomp one record in-place; return modified record
-sub _chomp1 {
- my ($self, $rec) = @_;
- return $rec unless $self->{autochomp};
- return unless defined $rec;
- substr($rec, - $self->{recseplen}) = "";
- $rec;
-}
-
-sub _fetch {
- my ($self, $n) = @_;
-
- # check the record cache
- { my $cached = $self->{cache}->lookup($n);
- return $cached if defined $cached;
- }
-
- if ($#{$self->{offsets}} < $n) {
- return if $self->{eof}; # request for record beyond end of file
- my $o = $self->_fill_offsets_to($n);
- # If it's still undefined, there is no such record, so return 'undef'
- return unless defined $o;
- }
-
- my $fh = $self->{FH};
- $self->_seek($n); # we can do this now that offsets is populated
- my $rec = $self->_read_record;
-
-# If we happen to have just read the first record, check to see if
-# the length of the record matches what 'tell' says. If not, Tie::File
-# won't work, and should drop dead.
-#
-# if ($n == 0 && defined($rec) && tell($self->{fh}) != length($rec)) {
-# if (defined $self->{discipline}) {
-# croak "I/O discipline $self->{discipline} not supported";
-# } else {
-# croak "File encoding not supported";
-# }
-# }
-
- $self->{cache}->insert($n, $rec) if defined $rec && not $self->{flushing};
- $rec;
-}
-
-sub STORE {
- my ($self, $n, $rec) = @_;
- die "STORE called from _check_integrity!" if $DIAGNOSTIC;
-
- $self->_fixrecs($rec);
-
- if ($self->{autodefer}) {
- $self->_annotate_ad_history($n);
- }
-
- return $self->_store_deferred($n, $rec) if $self->_is_deferring;
-
-
- # We need this to decide whether the new record will fit
- # It incidentally populates the offsets table
- # Note we have to do this before we alter the cache
- # 20020324 Wait, but this DOES alter the cache. TODO BUG?
- my $oldrec = $self->_fetch($n);
-
- if (not defined $oldrec) {
- # We're storing a record beyond the end of the file
- $self->_extend_file_to($n+1);
- $oldrec = $self->{recsep};
- }
-# return if $oldrec eq $rec; # don't bother
- my $len_diff = length($rec) - length($oldrec);
-
- # length($oldrec) here is not consistent with text mode TODO XXX BUG
- $self->_mtwrite($rec, $self->{offsets}[$n], length($oldrec));
- $self->_oadjust([$n, 1, $rec]);
- $self->{cache}->update($n, $rec);
-}
-
-sub _store_deferred {
- my ($self, $n, $rec) = @_;
- $self->{cache}->remove($n);
- my $old_deferred = $self->{deferred}{$n};
-
- if (defined $self->{deferred_max} && $n > $self->{deferred_max}) {
- $self->{deferred_max} = $n;
- }
- $self->{deferred}{$n} = $rec;
-
- my $len_diff = length($rec);
- $len_diff -= length($old_deferred) if defined $old_deferred;
- $self->{deferred_s} += $len_diff;
- $self->{cache}->adj_limit(-$len_diff);
- if ($self->{deferred_s} > $self->{dw_size}) {
- $self->_flush;
- } elsif ($self->_cache_too_full) {
- $self->_cache_flush;
- }
-}
-
-# Remove a single record from the deferred-write buffer without writing it
-# The record need not be present
-sub _delete_deferred {
- my ($self, $n) = @_;
- my $rec = delete $self->{deferred}{$n};
- return unless defined $rec;
-
- if (defined $self->{deferred_max}
- && $n == $self->{deferred_max}) {
- undef $self->{deferred_max};
- }
-
- $self->{deferred_s} -= length $rec;
- $self->{cache}->adj_limit(length $rec);
-}
-
-sub FETCHSIZE {
- my $self = shift;
- my $n = $self->{eof} ? $#{$self->{offsets}} : $self->_fill_offsets;
-
- my $top_deferred = $self->_defer_max;
- $n = $top_deferred+1 if defined $top_deferred && $n < $top_deferred+1;
- $n;
-}
-
-sub STORESIZE {
- my ($self, $len) = @_;
-
- if ($self->{autodefer}) {
- $self->_annotate_ad_history('STORESIZE');
- }
-
- my $olen = $self->FETCHSIZE;
- return if $len == $olen; # Woo-hoo!
-
- # file gets longer
- if ($len > $olen) {
- if ($self->_is_deferring) {
- for ($olen .. $len-1) {
- $self->_store_deferred($_, $self->{recsep});
- }
- } else {
- $self->_extend_file_to($len);
- }
- return;
- }
-
- # file gets shorter
- if ($self->_is_deferring) {
- # TODO maybe replace this with map-plus-assignment?
- for (grep $_ >= $len, keys %{$self->{deferred}}) {
- $self->_delete_deferred($_);
- }
- $self->{deferred_max} = $len-1;
- }
-
- $self->_seek($len);
- $self->_chop_file;
- $#{$self->{offsets}} = $len;
-# $self->{offsets}[0] = 0; # in case we just chopped this
-
- $self->{cache}->remove(grep $_ >= $len, $self->{cache}->ckeys);
-}
-
-### OPTIMIZE ME
-### It should not be necessary to do FETCHSIZE
-### Just seek to the end of the file.
-sub PUSH {
- my $self = shift;
- $self->SPLICE($self->FETCHSIZE, scalar(@_), @_);
-
- # No need to return:
- # $self->FETCHSIZE; # because av.c takes care of this for me
-}
-
-sub POP {
- my $self = shift;
- my $size = $self->FETCHSIZE;
- return if $size == 0;
-# print STDERR "# POPPITY POP POP POP\n";
- scalar $self->SPLICE($size-1, 1);
-}
-
-sub SHIFT {
- my $self = shift;
- scalar $self->SPLICE(0, 1);
-}
-
-sub UNSHIFT {
- my $self = shift;
- $self->SPLICE(0, 0, @_);
- # $self->FETCHSIZE; # av.c takes care of this for me
-}
-
-sub CLEAR {
- my $self = shift;
-
- if ($self->{autodefer}) {
- $self->_annotate_ad_history('CLEAR');
- }
-
- $self->_seekb(0);
- $self->_chop_file;
- $self->{cache}->set_limit($self->{memory});
- $self->{cache}->empty;
- @{$self->{offsets}} = (0);
- %{$self->{deferred}}= ();
- $self->{deferred_s} = 0;
- $self->{deferred_max} = -1;
-}
-
-sub EXTEND {
- my ($self, $n) = @_;
-
- # No need to pre-extend anything in this case
- return if $self->_is_deferring;
-
- $self->_fill_offsets_to($n);
- $self->_extend_file_to($n);
-}
-
-sub DELETE {
- my ($self, $n) = @_;
-
- if ($self->{autodefer}) {
- $self->_annotate_ad_history('DELETE');
- }
-
- my $lastrec = $self->FETCHSIZE-1;
- my $rec = $self->FETCH($n);
- $self->_delete_deferred($n) if $self->_is_deferring;
- if ($n == $lastrec) {
- $self->_seek($n);
- $self->_chop_file;
- $#{$self->{offsets}}--;
- $self->{cache}->remove($n);
- # perhaps in this case I should also remove trailing null records?
- # 20020316
- # Note that delete @a[-3..-1] deletes the records in the wrong order,
- # so we only chop the very last one out of the file. We could repair this
- # by tracking deleted records inside the object.
- } elsif ($n < $lastrec) {
- $self->STORE($n, "");
- }
- $rec;
-}
-
-sub EXISTS {
- my ($self, $n) = @_;
- return 1 if exists $self->{deferred}{$n};
- $n < $self->FETCHSIZE;
-}
-
-sub SPLICE {
- my $self = shift;
-
- if ($self->{autodefer}) {
- $self->_annotate_ad_history('SPLICE');
- }
-
- $self->_flush if $self->_is_deferring; # move this up?
- if (wantarray) {
- $self->_chomp(my @a = $self->_splice(@_));
- @a;
- } else {
- $self->_chomp1(scalar $self->_splice(@_));
- }
-}
-
-sub DESTROY {
- my $self = shift;
- $self->flush if $self->_is_deferring;
- $self->{cache}->delink if defined $self->{cache}; # break circular link
- if ($self->{fh} and $self->{ourfh}) {
- delete $self->{ourfh};
- close delete $self->{fh};
- }
-}
-
-sub _splice {
- my ($self, $pos, $nrecs, @data) = @_;
- my @result;
-
- $pos = 0 unless defined $pos;
-
- # Deal with negative and other out-of-range positions
- # Also set default for $nrecs
- {
- my $oldsize = $self->FETCHSIZE;
- $nrecs = $oldsize unless defined $nrecs;
- my $oldpos = $pos;
-
- if ($pos < 0) {
- $pos += $oldsize;
- if ($pos < 0) {
- croak "Modification of non-creatable array value attempted, subscript $oldpos";
- }
- }
-
- if ($pos > $oldsize) {
- return unless @data;
- $pos = $oldsize; # This is what perl does for normal arrays
- }
-
- # The manual is very unclear here
- if ($nrecs < 0) {
- $nrecs = $oldsize - $pos + $nrecs;
- $nrecs = 0 if $nrecs < 0;
- }
-
- # nrecs is too big---it really means "until the end"
- # 20030507
- if ($nrecs + $pos > $oldsize) {
- $nrecs = $oldsize - $pos;
- }
- }
-
- $self->_fixrecs(@data);
- my $data = join '', @data;
- my $datalen = length $data;
- my $oldlen = 0;
-
- # compute length of data being removed
- for ($pos .. $pos+$nrecs-1) {
- last unless defined $self->_fill_offsets_to($_);
- my $rec = $self->_fetch($_);
- last unless defined $rec;
- push @result, $rec;
-
- # Why don't we just use length($rec) here?
- # Because that record might have come from the cache. _splice
- # might have been called to flush out the deferred-write records,
- # and in this case length($rec) is the length of the record to be
- # *written*, not the length of the actual record in the file. But
- # the offsets are still true. 20020322
- $oldlen += $self->{offsets}[$_+1] - $self->{offsets}[$_]
- if defined $self->{offsets}[$_+1];
- }
- $self->_fill_offsets_to($pos+$nrecs);
-
- # Modify the file
- $self->_mtwrite($data, $self->{offsets}[$pos], $oldlen);
- # Adjust the offsets table
- $self->_oadjust([$pos, $nrecs, @data]);
-
- { # Take this read cache stuff out into a separate function
- # You made a half-attempt to put it into _oadjust.
- # Finish something like that up eventually.
- # STORE also needs to do something similarish
-
- # update the read cache, part 1
- # modified records
- for ($pos .. $pos+$nrecs-1) {
- my $new = $data[$_-$pos];
- if (defined $new) {
- $self->{cache}->update($_, $new);
- } else {
- $self->{cache}->remove($_);
- }
- }
-
- # update the read cache, part 2
- # moved records - records past the site of the change
- # need to be renumbered
- # Maybe merge this with the previous block?
- {
- my @oldkeys = grep $_ >= $pos + $nrecs, $self->{cache}->ckeys;
- my @newkeys = map $_-$nrecs+ at data, @oldkeys;
- $self->{cache}->rekey(\@oldkeys, \@newkeys);
- }
-
- # Now there might be too much data in the cache, if we spliced out
- # some short records and spliced in some long ones. If so, flush
- # the cache.
- $self->_cache_flush;
- }
-
- # Yes, the return value of 'splice' *is* actually this complicated
- wantarray ? @result : @result ? $result[-1] : undef;
-}
-
-
-# write data into the file
-# $data is the data to be written.
-# it should be written at position $pos, and should overwrite
-# exactly $len of the following bytes.
-# Note that if length($data) > $len, the subsequent bytes will have to
-# be moved up, and if length($data) < $len, they will have to
-# be moved down
-sub _twrite {
- my ($self, $data, $pos, $len) = @_;
-
- unless (defined $pos) {
- die "\$pos was undefined in _twrite";
- }
-
- my $len_diff = length($data) - $len;
-
- if ($len_diff == 0) { # Woo-hoo!
- my $fh = $self->{fh};
- $self->_seekb($pos);
- $self->_write_record($data);
- return; # well, that was easy.
- }
-
- # the two records are of different lengths
- # our strategy here: rewrite the tail of the file,
- # reading ahead one buffer at a time
- # $bufsize is required to be at least as large as the data we're overwriting
- my $bufsize = _bufsize($len_diff);
- my ($writepos, $readpos) = ($pos, $pos+$len);
- my $next_block;
- my $more_data;
-
- # Seems like there ought to be a way to avoid the repeated code
- # and the special case here. The read(1) is also a little weird.
- # Think about this.
- do {
- $self->_seekb($readpos);
- my $br = read $self->{fh}, $next_block, $bufsize;
- $more_data = read $self->{fh}, my($dummy), 1;
- $self->_seekb($writepos);
- $self->_write_record($data);
- $readpos += $br;
- $writepos += length $data;
- $data = $next_block;
- } while $more_data;
- $self->_seekb($writepos);
- $self->_write_record($next_block);
-
- # There might be leftover data at the end of the file
- $self->_chop_file if $len_diff < 0;
-}
-
-# _iwrite(D, S, E)
-# Insert text D at position S.
-# Let C = E-S-|D|. If C < 0; die.
-# Data in [S,S+C) is copied to [S+D,S+D+C) = [S+D,E).
-# Data in [S+C = E-D, E) is returned. Data in [E, oo) is untouched.
-#
-# In a later version, don't read the entire intervening area into
-# memory at once; do the copying block by block.
-sub _iwrite {
- my $self = shift;
- my ($D, $s, $e) = @_;
- my $d = length $D;
- my $c = $e-$s-$d;
- local *FH = $self->{fh};
- confess "Not enough space to insert $d bytes between $s and $e"
- if $c < 0;
- confess "[$s,$e) is an invalid insertion range" if $e < $s;
-
- $self->_seekb($s);
- read FH, my $buf, $e-$s;
-
- $D .= substr($buf, 0, $c, "");
-
- $self->_seekb($s);
- $self->_write_record($D);
-
- return $buf;
-}
-
-# Like _twrite, but the data-pos-len triple may be repeated; you may
-# write several chunks. All the writing will be done in
-# one pass. Chunks SHALL be in ascending order and SHALL NOT overlap.
-sub _mtwrite {
- my $self = shift;
- my $unwritten = "";
- my $delta = 0;
-
- @_ % 3 == 0
- or die "Arguments to _mtwrite did not come in groups of three";
-
- while (@_) {
- my ($data, $pos, $len) = splice @_, 0, 3;
- my $end = $pos + $len; # The OLD end of the segment to be replaced
- $data = $unwritten . $data;
- $delta -= length($unwritten);
- $unwritten = "";
- $pos += $delta; # This is where the data goes now
- my $dlen = length $data;
- $self->_seekb($pos);
- if ($len >= $dlen) { # the data will fit
- $self->_write_record($data);
- $delta += ($dlen - $len); # everything following moves down by this much
- $data = ""; # All the data in the buffer has been written
- } else { # won't fit
- my $writable = substr($data, 0, $len - $delta, "");
- $self->_write_record($writable);
- $delta += ($dlen - $len); # everything following moves down by this much
- }
-
- # At this point we've written some but maybe not all of the data.
- # There might be a gap to close up, or $data might still contain a
- # bunch of unwritten data that didn't fit.
- my $ndlen = length $data;
- if ($delta == 0) {
- $self->_write_record($data);
- } elsif ($delta < 0) {
- # upcopy (close up gap)
- if (@_) {
- $self->_upcopy($end, $end + $delta, $_[1] - $end);
- } else {
- $self->_upcopy($end, $end + $delta);
- }
- } else {
- # downcopy (insert data that didn't fit; replace this data in memory
- # with _later_ data that doesn't fit)
- if (@_) {
- $unwritten = $self->_downcopy($data, $end, $_[1] - $end);
- } else {
- # Make the file longer to accommodate the last segment that doesn'
- $unwritten = $self->_downcopy($data, $end);
- }
- }
- }
-}
-
-# Copy block of data of length $len from position $spos to position $dpos
-# $dpos must be <= $spos
-#
-# If $len is undefined, go all the way to the end of the file
-# and then truncate it ($spos - $dpos bytes will be removed)
-sub _upcopy {
- my $blocksize = 8192;
- my ($self, $spos, $dpos, $len) = @_;
- if ($dpos > $spos) {
- die "source ($spos) was upstream of destination ($dpos) in _upcopy";
- } elsif ($dpos == $spos) {
- return;
- }
-
- while (! defined ($len) || $len > 0) {
- my $readsize = ! defined($len) ? $blocksize
- : $len > $blocksize ? $blocksize
- : $len;
-
- my $fh = $self->{fh};
- $self->_seekb($spos);
- my $bytes_read = read $fh, my($data), $readsize;
- $self->_seekb($dpos);
- if ($data eq "") {
- $self->_chop_file;
- last;
- }
- $self->_write_record($data);
- $spos += $bytes_read;
- $dpos += $bytes_read;
- $len -= $bytes_read if defined $len;
- }
-}
-
-# Write $data into a block of length $len at position $pos,
-# moving everything in the block forwards to make room.
-# Instead of writing the last length($data) bytes from the block
-# (because there isn't room for them any longer) return them.
-#
-# Undefined $len means 'until the end of the file'
-sub _downcopy {
- my $blocksize = 8192;
- my ($self, $data, $pos, $len) = @_;
- my $fh = $self->{fh};
-
- while (! defined $len || $len > 0) {
- my $readsize = ! defined($len) ? $blocksize
- : $len > $blocksize? $blocksize : $len;
- $self->_seekb($pos);
- read $fh, my($old), $readsize;
- my $last_read_was_short = length($old) < $readsize;
- $data .= $old;
- my $writable;
- if ($last_read_was_short) {
- # If last read was short, then $data now contains the entire rest
- # of the file, so there's no need to write only one block of it
- $writable = $data;
- $data = "";
- } else {
- $writable = substr($data, 0, $readsize, "");
- }
- last if $writable eq "";
- $self->_seekb($pos);
- $self->_write_record($writable);
- last if $last_read_was_short && $data eq "";
- $len -= $readsize if defined $len;
- $pos += $readsize;
- }
- return $data;
-}
-
-# Adjust the object data structures following an '_mtwrite'
-# Arguments are
-# [$pos, $nrecs, @length] items
-# indicating that $nrecs records were removed at $recpos (a record offset)
-# and replaced with records of length @length...
-# Arguments guarantee that $recpos is strictly increasing.
-# No return value
-sub _oadjust {
- my $self = shift;
- my $delta = 0;
- my $delta_recs = 0;
- my $prev_end = -1;
- my %newkeys;
-
- for (@_) {
- my ($pos, $nrecs, @data) = @$_;
- $pos += $delta_recs;
-
- # Adjust the offsets of the records after the previous batch up
- # to the first new one of this batch
- for my $i ($prev_end+2 .. $pos - 1) {
- $self->{offsets}[$i] += $delta;
- $newkey{$i} = $i + $delta_recs;
- }
-
- $prev_end = $pos + @data - 1; # last record moved on this pass
-
- # Remove the offsets for the removed records;
- # replace with the offsets for the inserted records
- my @newoff = ($self->{offsets}[$pos] + $delta);
- for my $i (0 .. $#data) {
- my $newlen = length $data[$i];
- push @newoff, $newoff[$i] + $newlen;
- $delta += $newlen;
- }
-
- for my $i ($pos .. $pos+$nrecs-1) {
- last if $i+1 > $#{$self->{offsets}};
- my $oldlen = $self->{offsets}[$i+1] - $self->{offsets}[$i];
- $delta -= $oldlen;
- }
-
-# # also this data has changed, so update it in the cache
-# for (0 .. $#data) {
-# $self->{cache}->update($pos + $_, $data[$_]);
-# }
-# if ($delta_recs) {
-# my @oldkeys = grep $_ >= $pos + @data, $self->{cache}->ckeys;
-# my @newkeys = map $_ + $delta_recs, @oldkeys;
-# $self->{cache}->rekey(\@oldkeys, \@newkeys);
-# }
-
- # replace old offsets with new
- splice @{$self->{offsets}}, $pos, $nrecs+1, @newoff;
- # What if we just spliced out the end of the offsets table?
- # shouldn't we clear $self->{eof}? Test for this XXX BUG TODO
-
- $delta_recs += @data - $nrecs; # net change in total number of records
- }
-
- # The trailing records at the very end of the file
- if ($delta) {
- for my $i ($prev_end+2 .. $#{$self->{offsets}}) {
- $self->{offsets}[$i] += $delta;
- }
- }
-
- # If we scrubbed out all known offsets, regenerate the trivial table
- # that knows that the file does indeed start at 0.
- $self->{offsets}[0] = 0 unless @{$self->{offsets}};
- # If the file got longer, the offsets table is no longer complete
- # $self->{eof} = 0 if $delta_recs > 0;
-
- # Now there might be too much data in the cache, if we spliced out
- # some short records and spliced in some long ones. If so, flush
- # the cache.
- $self->_cache_flush;
-}
-
-# If a record does not already end with the appropriate terminator
-# string, append one.
-sub _fixrecs {
- my $self = shift;
- for (@_) {
- $_ = "" unless defined $_;
- $_ .= $self->{recsep}
- unless substr($_, - $self->{recseplen}) eq $self->{recsep};
- }
-}
-
-
-################################################################
-#
-# Basic read, write, and seek
-#
-
-# seek to the beginning of record #$n
-# Assumes that the offsets table is already correctly populated
-#
-# Note that $n=-1 has a special meaning here: It means the start of
-# the last known record; this may or may not be the very last record
-# in the file, depending on whether the offsets table is fully populated.
-#
-sub _seek {
- my ($self, $n) = @_;
- my $o = $self->{offsets}[$n];
- defined($o)
- or confess("logic error: undefined offset for record $n");
- seek $self->{fh}, $o, SEEK_SET
- or confess "Couldn't seek filehandle: $!"; # "Should never happen."
-}
-
-# seek to byte $b in the file
-sub _seekb {
- my ($self, $b) = @_;
- seek $self->{fh}, $b, SEEK_SET
- or die "Couldn't seek filehandle: $!"; # "Should never happen."
-}
-
-# populate the offsets table up to the beginning of record $n
-# return the offset of record $n
-sub _fill_offsets_to {
- my ($self, $n) = @_;
-
- return $self->{offsets}[$n] if $self->{eof};
-
- my $fh = $self->{fh};
- local *OFF = $self->{offsets};
- my $rec;
-
- until ($#OFF >= $n) {
- $self->_seek(-1); # tricky -- see comment at _seek
- $rec = $self->_read_record;
- if (defined $rec) {
- push @OFF, int(tell $fh); # Tels says that int() saves memory here
- } else {
- $self->{eof} = 1;
- return; # It turns out there is no such record
- }
- }
-
- # we have now read all the records up to record n-1,
- # so we can return the offset of record n
- $OFF[$n];
-}
-
-sub _fill_offsets {
- my ($self) = @_;
-
- my $fh = $self->{fh};
- local *OFF = $self->{offsets};
-
- $self->_seek(-1); # tricky -- see comment at _seek
-
- # Tels says that inlining read_record() would make this loop
- # five times faster. 20030508
- while ( defined $self->_read_record()) {
- # int() saves us memory here
- push @OFF, int(tell $fh);
- }
-
- $self->{eof} = 1;
- $#OFF;
-}
-
-# assumes that $rec is already suitably terminated
-sub _write_record {
- my ($self, $rec) = @_;
- my $fh = $self->{fh};
- local $\ = "";
- print $fh $rec
- or die "Couldn't write record: $!"; # "Should never happen."
-# $self->{_written} += length($rec);
-}
-
-sub _read_record {
- my $self = shift;
- my $rec;
- { local $/ = $self->{recsep};
- my $fh = $self->{fh};
- $rec = <$fh>;
- }
- return unless defined $rec;
- if (substr($rec, -$self->{recseplen}) ne $self->{recsep}) {
- # improperly terminated final record --- quietly fix it.
-# my $ac = substr($rec, -$self->{recseplen});
-# $ac =~ s/\n/\\n/g;
- $self->{sawlastrec} = 1;
- unless ($self->{rdonly}) {
- local $\ = "";
- my $fh = $self->{fh};
- print $fh $self->{recsep};
- }
- $rec .= $self->{recsep};
- }
-# $self->{_read} += length($rec) if defined $rec;
- $rec;
-}
-
-sub _rw_stats {
- my $self = shift;
- @{$self}{'_read', '_written'};
-}
-
-################################################################
-#
-# Read cache management
-
-sub _cache_flush {
- my ($self) = @_;
- $self->{cache}->reduce_size_to($self->{memory} - $self->{deferred_s});
-}
-
-sub _cache_too_full {
- my $self = shift;
- $self->{cache}->bytes + $self->{deferred_s} >= $self->{memory};
-}
-
-################################################################
-#
-# File custodial services
-#
-
-
-# We have read to the end of the file and have the offsets table
-# entirely populated. Now we need to write a new record beyond
-# the end of the file. We prepare for this by writing
-# empty records into the file up to the position we want
-#
-# assumes that the offsets table already contains the offset of record $n,
-# if it exists, and extends to the end of the file if not.
-sub _extend_file_to {
- my ($self, $n) = @_;
- $self->_seek(-1); # position after the end of the last record
- my $pos = $self->{offsets}[-1];
-
- # the offsets table has one entry more than the total number of records
- my $extras = $n - $#{$self->{offsets}};
-
- # Todo : just use $self->{recsep} x $extras here?
- while ($extras-- > 0) {
- $self->_write_record($self->{recsep});
- push @{$self->{offsets}}, int(tell $self->{fh});
- }
-}
-
-# Truncate the file at the current position
-sub _chop_file {
- my $self = shift;
- truncate $self->{fh}, tell($self->{fh});
-}
-
-
-# compute the size of a buffer suitable for moving
-# all the data in a file forward $n bytes
-# ($n may be negative)
-# The result should be at least $n.
-sub _bufsize {
- my $n = shift;
- return 8192 if $n <= 0;
- my $b = $n & ~8191;
- $b += 8192 if $n & 8191;
- $b;
-}
-
-################################################################
-#
-# Miscellaneous public methods
-#
-
-# Lock the file
-sub flock {
- my ($self, $op) = @_;
- unless (@_ <= 3) {
- my $pack = ref $self;
- croak "Usage: $pack\->flock([OPERATION])";
- }
- my $fh = $self->{fh};
- $op = LOCK_EX unless defined $op;
- my $locked = flock $fh, $op;
-
- if ($locked && ($op & (LOCK_EX | LOCK_SH))) {
- # If you're locking the file, then presumably it's because
- # there might have been a write access by another process.
- # In that case, the read cache contents and the offsets table
- # might be invalid, so discard them. 20030508
- $self->{offsets} = [0];
- $self->{cache}->empty;
- }
-
- $locked;
-}
-
-# Get/set autochomp option
-sub autochomp {
- my $self = shift;
- if (@_) {
- my $old = $self->{autochomp};
- $self->{autochomp} = shift;
- $old;
- } else {
- $self->{autochomp};
- }
-}
-
-# Get offset table entries; returns offset of nth record
-sub offset {
- my ($self, $n) = @_;
-
- if ($#{$self->{offsets}} < $n) {
- return if $self->{eof}; # request for record beyond the end of file
- my $o = $self->_fill_offsets_to($n);
- # If it's still undefined, there is no such record, so return 'undef'
- return unless defined $o;
- }
-
- $self->{offsets}[$n];
-}
-
-sub discard_offsets {
- my $self = shift;
- $self->{offsets} = [0];
-}
-
-################################################################
-#
-# Matters related to deferred writing
-#
-
-# Defer writes
-sub defer {
- my $self = shift;
- $self->_stop_autodeferring;
- @{$self->{ad_history}} = ();
- $self->{defer} = 1;
-}
-
-# Flush deferred writes
-#
-# This could be better optimized to write the file in one pass, instead
-# of one pass per block of records. But that will require modifications
-# to _twrite, so I should have a good _twrite test suite first.
-sub flush {
- my $self = shift;
-
- $self->_flush;
- $self->{defer} = 0;
-}
-
-sub _old_flush {
- my $self = shift;
- my @writable = sort {$a<=>$b} (keys %{$self->{deferred}});
-
- while (@writable) {
- # gather all consecutive records from the front of @writable
- my $first_rec = shift @writable;
- my $last_rec = $first_rec+1;
- ++$last_rec, shift @writable while @writable && $last_rec == $writable[0];
- --$last_rec;
- $self->_fill_offsets_to($last_rec);
- $self->_extend_file_to($last_rec);
- $self->_splice($first_rec, $last_rec-$first_rec+1,
- @{$self->{deferred}}{$first_rec .. $last_rec});
- }
-
- $self->_discard; # clear out defered-write-cache
-}
-
-sub _flush {
- my $self = shift;
- my @writable = sort {$a<=>$b} (keys %{$self->{deferred}});
- my @args;
- my @adjust;
-
- while (@writable) {
- # gather all consecutive records from the front of @writable
- my $first_rec = shift @writable;
- my $last_rec = $first_rec+1;
- ++$last_rec, shift @writable while @writable && $last_rec == $writable[0];
- --$last_rec;
- my $end = $self->_fill_offsets_to($last_rec+1);
- if (not defined $end) {
- $self->_extend_file_to($last_rec);
- $end = $self->{offsets}[$last_rec];
- }
- my ($start) = $self->{offsets}[$first_rec];
- push @args,
- join("", @{$self->{deferred}}{$first_rec .. $last_rec}), # data
- $start, # position
- $end-$start; # length
- push @adjust, [$first_rec, # starting at this position...
- $last_rec-$first_rec+1, # this many records...
- # are replaced with these...
- @{$self->{deferred}}{$first_rec .. $last_rec},
- ];
- }
-
- $self->_mtwrite(@args); # write multiple record groups
- $self->_discard; # clear out defered-write-cache
- $self->_oadjust(@adjust);
-}
-
-# Discard deferred writes and disable future deferred writes
-sub discard {
- my $self = shift;
- $self->_discard;
- $self->{defer} = 0;
-}
-
-# Discard deferred writes, but retain old deferred writing mode
-sub _discard {
- my $self = shift;
- %{$self->{deferred}} = ();
- $self->{deferred_s} = 0;
- $self->{deferred_max} = -1;
- $self->{cache}->set_limit($self->{memory});
-}
-
-# Deferred writing is enabled, either explicitly ($self->{defer})
-# or automatically ($self->{autodeferring})
-sub _is_deferring {
- my $self = shift;
- $self->{defer} || $self->{autodeferring};
-}
-
-# The largest record number of any deferred record
-sub _defer_max {
- my $self = shift;
- return $self->{deferred_max} if defined $self->{deferred_max};
- my $max = -1;
- for my $key (keys %{$self->{deferred}}) {
- $max = $key if $key > $max;
- }
- $self->{deferred_max} = $max;
- $max;
-}
-
-################################################################
-#
-# Matters related to autodeferment
-#
-
-# Get/set autodefer option
-sub autodefer {
- my $self = shift;
- if (@_) {
- my $old = $self->{autodefer};
- $self->{autodefer} = shift;
- if ($old) {
- $self->_stop_autodeferring;
- @{$self->{ad_history}} = ();
- }
- $old;
- } else {
- $self->{autodefer};
- }
-}
-
-# The user is trying to store record #$n Record that in the history,
-# and then enable (or disable) autodeferment if that seems useful.
-# Note that it's OK for $n to be a non-number, as long as the function
-# is prepared to deal with that. Nobody else looks at the ad_history.
-#
-# Now, what does the ad_history mean, and what is this function doing?
-# Essentially, the idea is to enable autodeferring when we see that the
-# user has made three consecutive STORE calls to three consecutive records.
-# ("Three" is actually ->{autodefer_threshhold}.)
-# A STORE call for record #$n inserts $n into the autodefer history,
-# and if the history contains three consecutive records, we enable
-# autodeferment. An ad_history of [X, Y] means that the most recent
-# STOREs were for records X, X+1, ..., Y, in that order.
-#
-# Inserting a nonconsecutive number erases the history and starts over.
-#
-# Performing a special operation like SPLICE erases the history.
-#
-# There's one special case: CLEAR means that CLEAR was just called.
-# In this case, we prime the history with [-2, -1] so that if the next
-# write is for record 0, autodeferring goes on immediately. This is for
-# the common special case of "@a = (...)".
-#
-sub _annotate_ad_history {
- my ($self, $n) = @_;
- return unless $self->{autodefer}; # feature is disabled
- return if $self->{defer}; # already in explicit defer mode
- return unless $self->{offsets}[-1] >= $self->{autodefer_filelen_threshhold};
-
- local *H = $self->{ad_history};
- if ($n eq 'CLEAR') {
- @H = (-2, -1); # prime the history with fake records
- $self->_stop_autodeferring;
- } elsif ($n =~ /^\d+$/) {
- if (@H == 0) {
- @H = ($n, $n);
- } else { # @H == 2
- if ($H[1] == $n-1) { # another consecutive record
- $H[1]++;
- if ($H[1] - $H[0] + 1 >= $self->{autodefer_threshhold}) {
- $self->{autodeferring} = 1;
- }
- } else { # nonconsecutive- erase and start over
- @H = ($n, $n);
- $self->_stop_autodeferring;
- }
- }
- } else { # SPLICE or STORESIZE or some such
- @H = ();
- $self->_stop_autodeferring;
- }
-}
-
-# If autodeferring was enabled, cut it out and discard the history
-sub _stop_autodeferring {
- my $self = shift;
- if ($self->{autodeferring}) {
- $self->_flush;
- }
- $self->{autodeferring} = 0;
-}
-
-################################################################
-
-
-# This is NOT a method. It is here for two reasons:
-# 1. To factor a fairly complicated block out of the constructor
-# 2. To provide access for the test suite, which need to be sure
-# files are being written properly.
-sub _default_recsep {
- my $recsep = $/;
- if ($^O eq 'MSWin32') { # Dos too?
- # Windows users expect files to be terminated with \r\n
- # But $/ is set to \n instead
- # Note that this also transforms \n\n into \r\n\r\n.
- # That is a feature.
- $recsep =~ s/\n/\r\n/g;
- }
- $recsep;
-}
-
-# Utility function for _check_integrity
-sub _ci_warn {
- my $msg = shift;
- $msg =~ s/\n/\\n/g;
- $msg =~ s/\r/\\r/g;
- print "# $msg\n";
-}
-
-# Given a file, make sure the cache is consistent with the
-# file contents and the internal data structures are consistent with
-# each other. Returns true if everything checks out, false if not
-#
-# The $file argument is no longer used. It is retained for compatibility
-# with the existing test suite.
-sub _check_integrity {
- my ($self, $file, $warn) = @_;
- my $rsl = $self->{recseplen};
- my $rs = $self->{recsep};
- my $good = 1;
- local *_; # local $_ does not work here
- local $DIAGNOSTIC = 1;
-
- if (not defined $rs) {
- _ci_warn("recsep is undef!");
- $good = 0;
- } elsif ($rs eq "") {
- _ci_warn("recsep is empty!");
- $good = 0;
- } elsif ($rsl != length $rs) {
- my $ln = length $rs;
- _ci_warn("recsep <$rs> has length $ln, should be $rsl");
- $good = 0;
- }
-
- if (not defined $self->{offsets}[0]) {
- _ci_warn("offset 0 is missing!");
- $good = 0;
-
- } elsif ($self->{offsets}[0] != 0) {
- _ci_warn("rec 0: offset <$self->{offsets}[0]> s/b 0!");
- $good = 0;
- }
-
- my $cached = 0;
- {
- local *F = $self->{fh};
- seek F, 0, SEEK_SET;
- local $. = 0;
- local $/ = $rs;
-
- while (<F>) {
- my $n = $. - 1;
- my $cached = $self->{cache}->_produce($n);
- my $offset = $self->{offsets}[$.];
- my $ao = tell F;
- if (defined $offset && $offset != $ao) {
- _ci_warn("rec $n: offset <$offset> actual <$ao>");
- $good = 0;
- }
- if (defined $cached && $_ ne $cached && ! $self->{deferred}{$n}) {
- $good = 0;
- _ci_warn("rec $n: cached <$cached> actual <$_>");
- }
- if (defined $cached && substr($cached, -$rsl) ne $rs) {
- $good = 0;
- _ci_warn("rec $n in the cache is missing the record separator");
- }
- if (! defined $offset && $self->{eof}) {
- $good = 0;
- _ci_warn("The offset table was marked complete, but it is missing element $.");
- }
- }
- if (@{$self->{offsets}} > $.+1) {
- $good = 0;
- my $n = @{$self->{offsets}};
- _ci_warn("The offset table has $n items, but the file has only $.");
- }
-
- my $deferring = $self->_is_deferring;
- for my $n ($self->{cache}->ckeys) {
- my $r = $self->{cache}->_produce($n);
- $cached += length($r);
- next if $n+1 <= $.; # checked this already
- _ci_warn("spurious caching of record $n");
- $good = 0;
- }
- my $b = $self->{cache}->bytes;
- if ($cached != $b) {
- _ci_warn("cache size is $b, should be $cached");
- $good = 0;
- }
- }
-
- # That cache has its own set of tests
- $good = 0 unless $self->{cache}->_check_integrity;
-
- # Now let's check the deferbuffer
- # Unless deferred writing is enabled, it should be empty
- if (! $self->_is_deferring && %{$self->{deferred}}) {
- _ci_warn("deferred writing disabled, but deferbuffer nonempty");
- $good = 0;
- }
-
- # Any record in the deferbuffer should *not* be present in the readcache
- my $deferred_s = 0;
- while (my ($n, $r) = each %{$self->{deferred}}) {
- $deferred_s += length($r);
- if (defined $self->{cache}->_produce($n)) {
- _ci_warn("record $n is in the deferbuffer *and* the readcache");
- $good = 0;
- }
- if (substr($r, -$rsl) ne $rs) {
- _ci_warn("rec $n in the deferbuffer is missing the record separator");
- $good = 0;
- }
- }
-
- # Total size of deferbuffer should match internal total
- if ($deferred_s != $self->{deferred_s}) {
- _ci_warn("buffer size is $self->{deferred_s}, should be $deferred_s");
- $good = 0;
- }
-
- # Total size of deferbuffer should not exceed the specified limit
- if ($deferred_s > $self->{dw_size}) {
- _ci_warn("buffer size is $self->{deferred_s} which exceeds the limit of $self->{dw_size}");
- $good = 0;
- }
-
- # Total size of cached data should not exceed the specified limit
- if ($deferred_s + $cached > $self->{memory}) {
- my $total = $deferred_s + $cached;
- _ci_warn("total stored data size is $total which exceeds the limit of $self->{memory}");
- $good = 0;
- }
-
- # Stuff related to autodeferment
- if (!$self->{autodefer} && @{$self->{ad_history}}) {
- _ci_warn("autodefer is disabled, but ad_history is nonempty");
- $good = 0;
- }
- if ($self->{autodeferring} && $self->{defer}) {
- _ci_warn("both autodeferring and explicit deferring are active");
- $good = 0;
- }
- if (@{$self->{ad_history}} == 0) {
- # That's OK, no additional tests required
- } elsif (@{$self->{ad_history}} == 2) {
- my @non_number = grep !/^-?\d+$/, @{$self->{ad_history}};
- if (@non_number) {
- my $msg;
- { local $" = ')(';
- $msg = "ad_history contains non-numbers (@{$self->{ad_history}})";
- }
- _ci_warn($msg);
- $good = 0;
- } elsif ($self->{ad_history}[1] < $self->{ad_history}[0]) {
- _ci_warn("ad_history has nonsensical values @{$self->{ad_history}}");
- $good = 0;
- }
- } else {
- _ci_warn("ad_history has bad length <@{$self->{ad_history}}>");
- $good = 0;
- }
-
- $good;
-}
-
-################################################################
-#
-# Tie::File::Cache
-#
-# Read cache
-
-package Tie::File::Cache;
-$Tie::File::Cache::VERSION = $Tie::File::VERSION;
-use Carp ':DEFAULT', 'confess';
-
-sub HEAP () { 0 }
-sub HASH () { 1 }
-sub MAX () { 2 }
-sub BYTES() { 3 }
-#sub STAT () { 4 } # Array with request statistics for each record
-#sub MISS () { 5 } # Total number of cache misses
-#sub REQ () { 6 } # Total number of cache requests
-use strict 'vars';
-
-sub new {
- my ($pack, $max) = @_;
- local *_;
- croak "missing argument to ->new" unless defined $max;
- my $self = [];
- bless $self => $pack;
- @$self = (Tie::File::Heap->new($self), {}, $max, 0);
- $self;
-}
-
-sub adj_limit {
- my ($self, $n) = @_;
- $self->[MAX] += $n;
-}
-
-sub set_limit {
- my ($self, $n) = @_;
- $self->[MAX] = $n;
-}
-
-# For internal use only
-# Will be called by the heap structure to notify us that a certain
-# piece of data has moved from one heap element to another.
-# $k is the hash key of the item
-# $n is the new index into the heap at which it is stored
-# If $n is undefined, the item has been removed from the heap.
-sub _heap_move {
- my ($self, $k, $n) = @_;
- if (defined $n) {
- $self->[HASH]{$k} = $n;
- } else {
- delete $self->[HASH]{$k};
- }
-}
-
-sub insert {
- my ($self, $key, $val) = @_;
- local *_;
- croak "missing argument to ->insert" unless defined $key;
- unless (defined $self->[MAX]) {
- confess "undefined max" ;
- }
- confess "undefined val" unless defined $val;
- return if length($val) > $self->[MAX];
-
-# if ($self->[STAT]) {
-# $self->[STAT][$key] = 1;
-# return;
-# }
-
- my $oldnode = $self->[HASH]{$key};
- if (defined $oldnode) {
- my $oldval = $self->[HEAP]->set_val($oldnode, $val);
- $self->[BYTES] -= length($oldval);
- } else {
- $self->[HEAP]->insert($key, $val);
- }
- $self->[BYTES] += length($val);
- $self->flush if $self->[BYTES] > $self->[MAX];
-}
-
-sub expire {
- my $self = shift;
- my $old_data = $self->[HEAP]->popheap;
- return unless defined $old_data;
- $self->[BYTES] -= length $old_data;
- $old_data;
-}
-
-sub remove {
- my ($self, @keys) = @_;
- my @result;
-
-# if ($self->[STAT]) {
-# for my $key (@keys) {
-# $self->[STAT][$key] = 0;
-# }
-# return;
-# }
-
- for my $key (@keys) {
- next unless exists $self->[HASH]{$key};
- my $old_data = $self->[HEAP]->remove($self->[HASH]{$key});
- $self->[BYTES] -= length $old_data;
- push @result, $old_data;
- }
- @result;
-}
-
-sub lookup {
- my ($self, $key) = @_;
- local *_;
- croak "missing argument to ->lookup" unless defined $key;
-
-# if ($self->[STAT]) {
-# $self->[MISS]++ if $self->[STAT][$key]++ == 0;
-# $self->[REQ]++;
-# my $hit_rate = 1 - $self->[MISS] / $self->[REQ];
-# # Do some testing to determine this threshhold
-# $#$self = STAT - 1 if $hit_rate > 0.20;
-# }
-
- if (exists $self->[HASH]{$key}) {
- $self->[HEAP]->lookup($self->[HASH]{$key});
- } else {
- return;
- }
-}
-
-# For internal use only
-sub _produce {
- my ($self, $key) = @_;
- my $loc = $self->[HASH]{$key};
- return unless defined $loc;
- $self->[HEAP][$loc][2];
-}
-
-# For internal use only
-sub _promote {
- my ($self, $key) = @_;
- $self->[HEAP]->promote($self->[HASH]{$key});
-}
-
-sub empty {
- my ($self) = @_;
- %{$self->[HASH]} = ();
- $self->[BYTES] = 0;
- $self->[HEAP]->empty;
-# @{$self->[STAT]} = ();
-# $self->[MISS] = 0;
-# $self->[REQ] = 0;
-}
-
-sub is_empty {
- my ($self) = @_;
- keys %{$self->[HASH]} == 0;
-}
-
-sub update {
- my ($self, $key, $val) = @_;
- local *_;
- croak "missing argument to ->update" unless defined $key;
- if (length($val) > $self->[MAX]) {
- my ($oldval) = $self->remove($key);
- $self->[BYTES] -= length($oldval) if defined $oldval;
- } elsif (exists $self->[HASH]{$key}) {
- my $oldval = $self->[HEAP]->set_val($self->[HASH]{$key}, $val);
- $self->[BYTES] += length($val);
- $self->[BYTES] -= length($oldval) if defined $oldval;
- } else {
- $self->[HEAP]->insert($key, $val);
- $self->[BYTES] += length($val);
- }
- $self->flush;
-}
-
-sub rekey {
- my ($self, $okeys, $nkeys) = @_;
- local *_;
- my %map;
- @map{@$okeys} = @$nkeys;
- croak "missing argument to ->rekey" unless defined $nkeys;
- croak "length mismatch in ->rekey arguments" unless @$nkeys == @$okeys;
- my %adjusted; # map new keys to heap indices
- # You should be able to cut this to one loop TODO XXX
- for (0 .. $#$okeys) {
- $adjusted{$nkeys->[$_]} = delete $self->[HASH]{$okeys->[$_]};
- }
- while (my ($nk, $ix) = each %adjusted) {
- # @{$self->[HASH]}{keys %adjusted} = values %adjusted;
- $self->[HEAP]->rekey($ix, $nk);
- $self->[HASH]{$nk} = $ix;
- }
-}
-
-sub ckeys {
- my $self = shift;
- my @a = keys %{$self->[HASH]};
- @a;
-}
-
-# Return total amount of cached data
-sub bytes {
- my $self = shift;
- $self->[BYTES];
-}
-
-# Expire oldest item from cache until cache size is smaller than $max
-sub reduce_size_to {
- my ($self, $max) = @_;
- until ($self->[BYTES] <= $max) {
- # Note that Tie::File::Cache::expire has been inlined here
- my $old_data = $self->[HEAP]->popheap;
- return unless defined $old_data;
- $self->[BYTES] -= length $old_data;
- }
-}
-
-# Why not just $self->reduce_size_to($self->[MAX])?
-# Try this when things stabilize TODO XXX
-# If the cache is too full, expire the oldest records
-sub flush {
- my $self = shift;
- $self->reduce_size_to($self->[MAX]) if $self->[BYTES] > $self->[MAX];
-}
-
-# For internal use only
-sub _produce_lru {
- my $self = shift;
- $self->[HEAP]->expire_order;
-}
-
-BEGIN { *_ci_warn = \&Tie::File::_ci_warn }
-
-sub _check_integrity { # For CACHE
- my $self = shift;
- my $good = 1;
-
- # Test HEAP
- $self->[HEAP]->_check_integrity or $good = 0;
-
- # Test HASH
- my $bytes = 0;
- for my $k (keys %{$self->[HASH]}) {
- if ($k ne '0' && $k !~ /^[1-9][0-9]*$/) {
- $good = 0;
- _ci_warn "Cache hash key <$k> is non-numeric";
- }
-
- my $h = $self->[HASH]{$k};
- if (! defined $h) {
- $good = 0;
- _ci_warn "Heap index number for key $k is undefined";
- } elsif ($h == 0) {
- $good = 0;
- _ci_warn "Heap index number for key $k is zero";
- } else {
- my $j = $self->[HEAP][$h];
- if (! defined $j) {
- $good = 0;
- _ci_warn "Heap contents key $k (=> $h) are undefined";
- } else {
- $bytes += length($j->[2]);
- if ($k ne $j->[1]) {
- $good = 0;
- _ci_warn "Heap contents key $k (=> $h) is $j->[1], should be $k";
- }
- }
- }
- }
-
- # Test BYTES
- if ($bytes != $self->[BYTES]) {
- $good = 0;
- _ci_warn "Total data in cache is $bytes, expected $self->[BYTES]";
- }
-
- # Test MAX
- if ($bytes > $self->[MAX]) {
- $good = 0;
- _ci_warn "Total data in cache is $bytes, exceeds maximum $self->[MAX]";
- }
-
- return $good;
-}
-
-sub delink {
- my $self = shift;
- $self->[HEAP] = undef; # Bye bye heap
-}
-
-################################################################
-#
-# Tie::File::Heap
-#
-# Heap data structure for use by cache LRU routines
-
-package Tie::File::Heap;
-use Carp ':DEFAULT', 'confess';
-$Tie::File::Heap::VERSION = $Tie::File::Cache::VERSION;
-sub SEQ () { 0 };
-sub KEY () { 1 };
-sub DAT () { 2 };
-
-sub new {
- my ($pack, $cache) = @_;
- die "$pack: Parent cache object $cache does not support _heap_move method"
- unless eval { $cache->can('_heap_move') };
- my $self = [[0,$cache,0]];
- bless $self => $pack;
-}
-
-# Allocate a new sequence number, larger than all previously allocated numbers
-sub _nseq {
- my $self = shift;
- $self->[0][0]++;
-}
-
-sub _cache {
- my $self = shift;
- $self->[0][1];
-}
-
-sub _nelts {
- my $self = shift;
- $self->[0][2];
-}
-
-sub _nelts_inc {
- my $self = shift;
- ++$self->[0][2];
-}
-
-sub _nelts_dec {
- my $self = shift;
- --$self->[0][2];
-}
-
-sub is_empty {
- my $self = shift;
- $self->_nelts == 0;
-}
-
-sub empty {
- my $self = shift;
- $#$self = 0;
- $self->[0][2] = 0;
- $self->[0][0] = 0; # might as well reset the sequence numbers
-}
-
-# notify the parent cache object that we moved something
-sub _heap_move {
- my $self = shift;
- $self->_cache->_heap_move(@_);
-}
-
-# Insert a piece of data into the heap with the indicated sequence number.
-# The item with the smallest sequence number is always at the top.
-# If no sequence number is specified, allocate a new one and insert the
-# item at the bottom.
-sub insert {
- my ($self, $key, $data, $seq) = @_;
- $seq = $self->_nseq unless defined $seq;
- $self->_insert_new([$seq, $key, $data]);
-}
-
-# Insert a new, fresh item at the bottom of the heap
-sub _insert_new {
- my ($self, $item) = @_;
- my $i = @$self;
- $i = int($i/2) until defined $self->[$i/2];
- $self->[$i] = $item;
- $self->[0][1]->_heap_move($self->[$i][KEY], $i);
- $self->_nelts_inc;
-}
-
-# Insert [$data, $seq] pair at or below item $i in the heap.
-# If $i is omitted, default to 1 (the top element.)
-sub _insert {
- my ($self, $item, $i) = @_;
-# $self->_check_loc($i) if defined $i;
- $i = 1 unless defined $i;
- until (! defined $self->[$i]) {
- if ($self->[$i][SEQ] > $item->[SEQ]) { # inserted item is older
- ($self->[$i], $item) = ($item, $self->[$i]);
- $self->[0][1]->_heap_move($self->[$i][KEY], $i);
- }
- # If either is undefined, go that way. Otherwise, choose at random
- my $dir;
- $dir = 0 if !defined $self->[2*$i];
- $dir = 1 if !defined $self->[2*$i+1];
- $dir = int(rand(2)) unless defined $dir;
- $i = 2*$i + $dir;
- }
- $self->[$i] = $item;
- $self->[0][1]->_heap_move($self->[$i][KEY], $i);
- $self->_nelts_inc;
-}
-
-# Remove the item at node $i from the heap, moving child items upwards.
-# The item with the smallest sequence number is always at the top.
-# Moving items upwards maintains this condition.
-# Return the removed item. Return undef if there was no item at node $i.
-sub remove {
- my ($self, $i) = @_;
- $i = 1 unless defined $i;
- my $top = $self->[$i];
- return unless defined $top;
- while (1) {
- my $ii;
- my ($L, $R) = (2*$i, 2*$i+1);
-
- # If either is undefined, go the other way.
- # Otherwise, go towards the smallest.
- last unless defined $self->[$L] || defined $self->[$R];
- $ii = $R if not defined $self->[$L];
- $ii = $L if not defined $self->[$R];
- unless (defined $ii) {
- $ii = $self->[$L][SEQ] < $self->[$R][SEQ] ? $L : $R;
- }
-
- $self->[$i] = $self->[$ii]; # Promote child to fill vacated spot
- $self->[0][1]->_heap_move($self->[$i][KEY], $i);
- $i = $ii; # Fill new vacated spot
- }
- $self->[0][1]->_heap_move($top->[KEY], undef);
- undef $self->[$i];
- $self->_nelts_dec;
- return $top->[DAT];
-}
-
-sub popheap {
- my $self = shift;
- $self->remove(1);
-}
-
-# set the sequence number of the indicated item to a higher number
-# than any other item in the heap, and bubble the item down to the
-# bottom.
-sub promote {
- my ($self, $n) = @_;
-# $self->_check_loc($n);
- $self->[$n][SEQ] = $self->_nseq;
- my $i = $n;
- while (1) {
- my ($L, $R) = (2*$i, 2*$i+1);
- my $dir;
- last unless defined $self->[$L] || defined $self->[$R];
- $dir = $R unless defined $self->[$L];
- $dir = $L unless defined $self->[$R];
- unless (defined $dir) {
- $dir = $self->[$L][SEQ] < $self->[$R][SEQ] ? $L : $R;
- }
- @{$self}[$i, $dir] = @{$self}[$dir, $i];
- for ($i, $dir) {
- $self->[0][1]->_heap_move($self->[$_][KEY], $_) if defined $self->[$_];
- }
- $i = $dir;
- }
-}
-
-# Return item $n from the heap, promoting its LRU status
-sub lookup {
- my ($self, $n) = @_;
-# $self->_check_loc($n);
- my $val = $self->[$n];
- $self->promote($n);
- $val->[DAT];
-}
-
-
-# Assign a new value for node $n, promoting it to the bottom of the heap
-sub set_val {
- my ($self, $n, $val) = @_;
-# $self->_check_loc($n);
- my $oval = $self->[$n][DAT];
- $self->[$n][DAT] = $val;
- $self->promote($n);
- return $oval;
-}
-
-# The hask key has changed for an item;
-# alter the heap's record of the hash key
-sub rekey {
- my ($self, $n, $new_key) = @_;
-# $self->_check_loc($n);
- $self->[$n][KEY] = $new_key;
-}
-
-sub _check_loc {
- my ($self, $n) = @_;
- unless (1 || defined $self->[$n]) {
- confess "_check_loc($n) failed";
- }
-}
-
-BEGIN { *_ci_warn = \&Tie::File::_ci_warn }
-
-sub _check_integrity {
- my $self = shift;
- my $good = 1;
- my %seq;
-
- unless (eval {$self->[0][1]->isa("Tie::File::Cache")}) {
- _ci_warn "Element 0 of heap corrupt";
- $good = 0;
- }
- $good = 0 unless $self->_satisfies_heap_condition(1);
- for my $i (2 .. $#{$self}) {
- my $p = int($i/2); # index of parent node
- if (defined $self->[$i] && ! defined $self->[$p]) {
- _ci_warn "Element $i of heap defined, but parent $p isn't";
- $good = 0;
- }
-
- if (defined $self->[$i]) {
- if ($seq{$self->[$i][SEQ]}) {
- my $seq = $self->[$i][SEQ];
- _ci_warn "Nodes $i and $seq{$seq} both have SEQ=$seq";
- $good = 0;
- } else {
- $seq{$self->[$i][SEQ]} = $i;
- }
- }
- }
-
- return $good;
-}
-
-sub _satisfies_heap_condition {
- my $self = shift;
- my $n = shift || 1;
- my $good = 1;
- for (0, 1) {
- my $c = $n*2 + $_;
- next unless defined $self->[$c];
- if ($self->[$n][SEQ] >= $self->[$c]) {
- _ci_warn "Node $n of heap does not predate node $c";
- $good = 0 ;
- }
- $good = 0 unless $self->_satisfies_heap_condition($c);
- }
- return $good;
-}
-
-# Return a list of all the values, sorted by expiration order
-sub expire_order {
- my $self = shift;
- my @nodes = sort {$a->[SEQ] <=> $b->[SEQ]} $self->_nodes;
- map { $_->[KEY] } @nodes;
-}
-
-sub _nodes {
- my $self = shift;
- my $i = shift || 1;
- return unless defined $self->[$i];
- ($self->[$i], $self->_nodes($i*2), $self->_nodes($i*2+1));
-}
-
-"Cogito, ergo sum."; # don't forget to return a true value from the file
-
-__END__
-
-=head1 NAME
-
-Tie::File - Access the lines of a disk file via a Perl array
-
-=head1 SYNOPSIS
-
- # This file documents Tie::File version 0.97
- use Tie::File;
-
- tie @array, 'Tie::File', filename or die ...;
-
- $array[13] = 'blah'; # line 13 of the file is now 'blah'
- print $array[42]; # display line 42 of the file
-
- $n_recs = @array; # how many records are in the file?
- $#array -= 2; # chop two records off the end
-
-
- for (@array) {
- s/PERL/Perl/g; # Replace PERL with Perl everywhere in the file
- }
-
- # These are just like regular push, pop, unshift, shift, and splice
- # Except that they modify the file in the way you would expect
-
- push @array, new recs...;
- my $r1 = pop @array;
- unshift @array, new recs...;
- my $r2 = shift @array;
- @old_recs = splice @array, 3, 7, new recs...;
-
- untie @array; # all finished
-
-
-=head1 DESCRIPTION
-
-C<Tie::File> represents a regular text file as a Perl array. Each
-element in the array corresponds to a record in the file. The first
-line of the file is element 0 of the array; the second line is element
-1, and so on.
-
-The file is I<not> loaded into memory, so this will work even for
-gigantic files.
-
-Changes to the array are reflected in the file immediately.
-
-Lazy people and beginners may now stop reading the manual.
-
-=head2 C<recsep>
-
-What is a 'record'? By default, the meaning is the same as for the
-C<E<lt>...E<gt>> operator: It's a string terminated by C<$/>, which is
-probably C<"\n">. (Minor exception: on DOS and Win32 systems, a
-'record' is a string terminated by C<"\r\n">.) You may change the
-definition of "record" by supplying the C<recsep> option in the C<tie>
-call:
-
- tie @array, 'Tie::File', $file, recsep => 'es';
-
-This says that records are delimited by the string C<es>. If the file
-contained the following data:
-
- Curse these pesky flies!\n
-
-then the C<@array> would appear to have four elements:
-
- "Curse th"
- "e p"
- "ky fli"
- "!\n"
-
-An undefined value is not permitted as a record separator. Perl's
-special "paragraph mode" semantics (E<agrave> la C<$/ = "">) are not
-emulated.
-
-Records read from the tied array do not have the record separator
-string on the end; this is to allow
-
- $array[17] .= "extra";
-
-to work as expected.
-
-(See L<"autochomp">, below.) Records stored into the array will have
-the record separator string appended before they are written to the
-file, if they don't have one already. For example, if the record
-separator string is C<"\n">, then the following two lines do exactly
-the same thing:
-
- $array[17] = "Cherry pie";
- $array[17] = "Cherry pie\n";
-
-The result is that the contents of line 17 of the file will be
-replaced with "Cherry pie"; a newline character will separate line 17
-from line 18. This means that this code will do nothing:
-
- chomp $array[17];
-
-Because the C<chomp>ed value will have the separator reattached when
-it is written back to the file. There is no way to create a file
-whose trailing record separator string is missing.
-
-Inserting records that I<contain> the record separator string is not
-supported by this module. It will probably produce a reasonable
-result, but what this result will be may change in a future version.
-Use 'splice' to insert records or to replace one record with several.
-
-=head2 C<autochomp>
-
-Normally, array elements have the record separator removed, so that if
-the file contains the text
-
- Gold
- Frankincense
- Myrrh
-
-the tied array will appear to contain C<("Gold", "Frankincense",
-"Myrrh")>. If you set C<autochomp> to a false value, the record
-separator will not be removed. If the file above was tied with
-
- tie @gifts, "Tie::File", $gifts, autochomp => 0;
-
-then the array C<@gifts> would appear to contain C<("Gold\n",
-"Frankincense\n", "Myrrh\n")>, or (on Win32 systems) C<("Gold\r\n",
-"Frankincense\r\n", "Myrrh\r\n")>.
-
-=head2 C<mode>
-
-Normally, the specified file will be opened for read and write access,
-and will be created if it does not exist. (That is, the flags
-C<O_RDWR | O_CREAT> are supplied in the C<open> call.) If you want to
-change this, you may supply alternative flags in the C<mode> option.
-See L<Fcntl> for a listing of available flags.
-For example:
-
- # open the file if it exists, but fail if it does not exist
- use Fcntl 'O_RDWR';
- tie @array, 'Tie::File', $file, mode => O_RDWR;
-
- # create the file if it does not exist
- use Fcntl 'O_RDWR', 'O_CREAT';
- tie @array, 'Tie::File', $file, mode => O_RDWR | O_CREAT;
-
- # open an existing file in read-only mode
- use Fcntl 'O_RDONLY';
- tie @array, 'Tie::File', $file, mode => O_RDONLY;
-
-Opening the data file in write-only or append mode is not supported.
-
-=head2 C<memory>
-
-This is an upper limit on the amount of memory that C<Tie::File> will
-consume at any time while managing the file. This is used for two
-things: managing the I<read cache> and managing the I<deferred write
-buffer>.
-
-Records read in from the file are cached, to avoid having to re-read
-them repeatedly. If you read the same record twice, the first time it
-will be stored in memory, and the second time it will be fetched from
-the I<read cache>. The amount of data in the read cache will not
-exceed the value you specified for C<memory>. If C<Tie::File> wants
-to cache a new record, but the read cache is full, it will make room
-by expiring the least-recently visited records from the read cache.
-
-The default memory limit is 2Mib. You can adjust the maximum read
-cache size by supplying the C<memory> option. The argument is the
-desired cache size, in bytes.
-
- # I have a lot of memory, so use a large cache to speed up access
- tie @array, 'Tie::File', $file, memory => 20_000_000;
-
-Setting the memory limit to 0 will inhibit caching; records will be
-fetched from disk every time you examine them.
-
-The C<memory> value is not an absolute or exact limit on the memory
-used. C<Tie::File> objects contains some structures besides the read
-cache and the deferred write buffer, whose sizes are not charged
-against C<memory>.
-
-The cache itself consumes about 310 bytes per cached record, so if
-your file has many short records, you may want to decrease the cache
-memory limit, or else the cache overhead may exceed the size of the
-cached data.
-
-
-=head2 C<dw_size>
-
-(This is an advanced feature. Skip this section on first reading.)
-
-If you use deferred writing (See L<"Deferred Writing">, below) then
-data you write into the array will not be written directly to the
-file; instead, it will be saved in the I<deferred write buffer> to be
-written out later. Data in the deferred write buffer is also charged
-against the memory limit you set with the C<memory> option.
-
-You may set the C<dw_size> option to limit the amount of data that can
-be saved in the deferred write buffer. This limit may not exceed the
-total memory limit. For example, if you set C<dw_size> to 1000 and
-C<memory> to 2500, that means that no more than 1000 bytes of deferred
-writes will be saved up. The space available for the read cache will
-vary, but it will always be at least 1500 bytes (if the deferred write
-buffer is full) and it could grow as large as 2500 bytes (if the
-deferred write buffer is empty.)
-
-If you don't specify a C<dw_size>, it defaults to the entire memory
-limit.
-
-=head2 Option Format
-
-C<-mode> is a synonym for C<mode>. C<-recsep> is a synonym for
-C<recsep>. C<-memory> is a synonym for C<memory>. You get the
-idea.
-
-=head1 Public Methods
-
-The C<tie> call returns an object, say C<$o>. You may call
-
- $rec = $o->FETCH($n);
- $o->STORE($n, $rec);
-
-to fetch or store the record at line C<$n>, respectively; similarly
-the other tied array methods. (See L<perltie> for details.) You may
-also call the following methods on this object:
-
-=head2 C<flock>
-
- $o->flock(MODE)
-
-will lock the tied file. C<MODE> has the same meaning as the second
-argument to the Perl built-in C<flock> function; for example
-C<LOCK_SH> or C<LOCK_EX | LOCK_NB>. (These constants are provided by
-the C<use Fcntl ':flock'> declaration.)
-
-C<MODE> is optional; the default is C<LOCK_EX>.
-
-C<Tie::File> maintains an internal table of the byte offset of each
-record it has seen in the file.
-
-When you use C<flock> to lock the file, C<Tie::File> assumes that the
-read cache is no longer trustworthy, because another process might
-have modified the file since the last time it was read. Therefore, a
-successful call to C<flock> discards the contents of the read cache
-and the internal record offset table.
-
-C<Tie::File> promises that the following sequence of operations will
-be safe:
-
- my $o = tie @array, "Tie::File", $filename;
- $o->flock;
-
-In particular, C<Tie::File> will I<not> read or write the file during
-the C<tie> call. (Exception: Using C<mode =E<gt> O_TRUNC> will, of
-course, erase the file during the C<tie> call. If you want to do this
-safely, then open the file without C<O_TRUNC>, lock the file, and use
-C<@array = ()>.)
-
-The best way to unlock a file is to discard the object and untie the
-array. It is probably unsafe to unlock the file without also untying
-it, because if you do, changes may remain unwritten inside the object.
-That is why there is no shortcut for unlocking. If you really want to
-unlock the file prematurely, you know what to do; if you don't know
-what to do, then don't do it.
-
-All the usual warnings about file locking apply here. In particular,
-note that file locking in Perl is B<advisory>, which means that
-holding a lock will not prevent anyone else from reading, writing, or
-erasing the file; it only prevents them from getting another lock at
-the same time. Locks are analogous to green traffic lights: If you
-have a green light, that does not prevent the idiot coming the other
-way from plowing into you sideways; it merely guarantees to you that
-the idiot does not also have a green light at the same time.
-
-=head2 C<autochomp>
-
- my $old_value = $o->autochomp(0); # disable autochomp option
- my $old_value = $o->autochomp(1); # enable autochomp option
-
- my $ac = $o->autochomp(); # recover current value
-
-See L<"autochomp">, above.
-
-=head2 C<defer>, C<flush>, C<discard>, and C<autodefer>
-
-See L<"Deferred Writing">, below.
-
-=head2 C<offset>
-
- $off = $o->offset($n);
-
-This method returns the byte offset of the start of the C<$n>th record
-in the file. If there is no such record, it returns an undefined
-value.
-
-=head1 Tying to an already-opened filehandle
-
-If C<$fh> is a filehandle, such as is returned by C<IO::File> or one
-of the other C<IO> modules, you may use:
-
- tie @array, 'Tie::File', $fh, ...;
-
-Similarly if you opened that handle C<FH> with regular C<open> or
-C<sysopen>, you may use:
-
- tie @array, 'Tie::File', \*FH, ...;
-
-Handles that were opened write-only won't work. Handles that were
-opened read-only will work as long as you don't try to modify the
-array. Handles must be attached to seekable sources of data---that
-means no pipes or sockets. If C<Tie::File> can detect that you
-supplied a non-seekable handle, the C<tie> call will throw an
-exception. (On Unix systems, it can detect this.)
-
-Note that Tie::File will only close any filehandles that it opened
-internally. If you passed it a filehandle as above, you "own" the
-filehandle, and are responsible for closing it after you have untied
-the @array.
-
-=head1 Deferred Writing
-
-(This is an advanced feature. Skip this section on first reading.)
-
-Normally, modifying a C<Tie::File> array writes to the underlying file
-immediately. Every assignment like C<$a[3] = ...> rewrites as much of
-the file as is necessary; typically, everything from line 3 through
-the end will need to be rewritten. This is the simplest and most
-transparent behavior. Performance even for large files is reasonably
-good.
-
-However, under some circumstances, this behavior may be excessively
-slow. For example, suppose you have a million-record file, and you
-want to do:
-
- for (@FILE) {
- $_ = "> $_";
- }
-
-The first time through the loop, you will rewrite the entire file,
-from line 0 through the end. The second time through the loop, you
-will rewrite the entire file from line 1 through the end. The third
-time through the loop, you will rewrite the entire file from line 2 to
-the end. And so on.
-
-If the performance in such cases is unacceptable, you may defer the
-actual writing, and then have it done all at once. The following loop
-will perform much better for large files:
-
- (tied @a)->defer;
- for (@a) {
- $_ = "> $_";
- }
- (tied @a)->flush;
-
-If C<Tie::File>'s memory limit is large enough, all the writing will
-done in memory. Then, when you call C<-E<gt>flush>, the entire file
-will be rewritten in a single pass.
-
-(Actually, the preceding discussion is something of a fib. You don't
-need to enable deferred writing to get good performance for this
-common case, because C<Tie::File> will do it for you automatically
-unless you specifically tell it not to. See L<"autodeferring">,
-below.)
-
-Calling C<-E<gt>flush> returns the array to immediate-write mode. If
-you wish to discard the deferred writes, you may call C<-E<gt>discard>
-instead of C<-E<gt>flush>. Note that in some cases, some of the data
-will have been written already, and it will be too late for
-C<-E<gt>discard> to discard all the changes. Support for
-C<-E<gt>discard> may be withdrawn in a future version of C<Tie::File>.
-
-Deferred writes are cached in memory up to the limit specified by the
-C<dw_size> option (see above). If the deferred-write buffer is full
-and you try to write still more deferred data, the buffer will be
-flushed. All buffered data will be written immediately, the buffer
-will be emptied, and the now-empty space will be used for future
-deferred writes.
-
-If the deferred-write buffer isn't yet full, but the total size of the
-buffer and the read cache would exceed the C<memory> limit, the oldest
-records will be expired from the read cache until the total size is
-under the limit.
-
-C<push>, C<pop>, C<shift>, C<unshift>, and C<splice> cannot be
-deferred. When you perform one of these operations, any deferred data
-is written to the file and the operation is performed immediately.
-This may change in a future version.
-
-If you resize the array with deferred writing enabled, the file will
-be resized immediately, but deferred records will not be written.
-This has a surprising consequence: C<@a = (...)> erases the file
-immediately, but the writing of the actual data is deferred. This
-might be a bug. If it is a bug, it will be fixed in a future version.
-
-=head2 Autodeferring
-
-C<Tie::File> tries to guess when deferred writing might be helpful,
-and to turn it on and off automatically.
-
- for (@a) {
- $_ = "> $_";
- }
-
-In this example, only the first two assignments will be done
-immediately; after this, all the changes to the file will be deferred
-up to the user-specified memory limit.
-
-You should usually be able to ignore this and just use the module
-without thinking about deferring. However, special applications may
-require fine control over which writes are deferred, or may require
-that all writes be immediate. To disable the autodeferment feature,
-use
-
- (tied @o)->autodefer(0);
-
-or
-
- tie @array, 'Tie::File', $file, autodefer => 0;
-
-
-Similarly, C<-E<gt>autodefer(1)> re-enables autodeferment, and
-C<-E<gt>autodefer()> recovers the current value of the autodefer setting.
-
-
-=head1 CONCURRENT ACCESS TO FILES
-
-Caching and deferred writing are inappropriate if you want the same
-file to be accessed simultaneously from more than one process. Other
-optimizations performed internally by this module are also
-incompatible with concurrent access. A future version of this module will
-support a C<concurrent =E<gt> 1> option that enables safe concurrent access.
-
-Previous versions of this documentation suggested using C<memory
-=E<gt> 0> for safe concurrent access. This was mistaken. Tie::File
-will not support safe concurrent access before version 0.98.
-
-=head1 CAVEATS
-
-(That's Latin for 'warnings'.)
-
-=over 4
-
-=item *
-
-Reasonable effort was made to make this module efficient. Nevertheless,
-changing the size of a record in the middle of a large file will
-always be fairly slow, because everything after the new record must be
-moved.
-
-=item *
-
-The behavior of tied arrays is not precisely the same as for regular
-arrays. For example:
-
- # This DOES print "How unusual!"
- undef $a[10]; print "How unusual!\n" if defined $a[10];
-
-C<undef>-ing a C<Tie::File> array element just blanks out the
-corresponding record in the file. When you read it back again, you'll
-get the empty string, so the supposedly-C<undef>'ed value will be
-defined. Similarly, if you have C<autochomp> disabled, then
-
- # This DOES print "How unusual!" if 'autochomp' is disabled
- undef $a[10];
- print "How unusual!\n" if $a[10];
-
-Because when C<autochomp> is disabled, C<$a[10]> will read back as
-C<"\n"> (or whatever the record separator string is.)
-
-There are other minor differences, particularly regarding C<exists>
-and C<delete>, but in general, the correspondence is extremely close.
-
-=item *
-
-I have supposed that since this module is concerned with file I/O,
-almost all normal use of it will be heavily I/O bound. This means
-that the time to maintain complicated data structures inside the
-module will be dominated by the time to actually perform the I/O.
-When there was an opportunity to spend CPU time to avoid doing I/O, I
-usually tried to take it.
-
-=item *
-
-You might be tempted to think that deferred writing is like
-transactions, with C<flush> as C<commit> and C<discard> as
-C<rollback>, but it isn't, so don't.
-
-=item *
-
-There is a large memory overhead for each record offset and for each
-cache entry: about 310 bytes per cached data record, and about 21 bytes per offset table entry.
-
-The per-record overhead will limit the maximum number of records you
-can access per file. Note that I<accessing> the length of the array
-via C<$x = scalar @tied_file> accesses B<all> records and stores their
-offsets. The same for C<foreach (@tied_file)>, even if you exit the
-loop early.
-
-=back
-
-=head1 SUBCLASSING
-
-This version promises absolutely nothing about the internals, which
-may change without notice. A future version of the module will have a
-well-defined and stable subclassing API.
-
-=head1 WHAT ABOUT C<DB_File>?
-
-People sometimes point out that L<DB_File> will do something similar,
-and ask why C<Tie::File> module is necessary.
-
-There are a number of reasons that you might prefer C<Tie::File>.
-A list is available at C<http://perl.plover.com/TieFile/why-not-DB_File>.
-
-=head1 AUTHOR
-
-Mark Jason Dominus
-
-To contact the author, send email to: C<mjd-perl-tiefile+ at plover.com>
-
-To receive an announcement whenever a new version of this module is
-released, send a blank email message to
-C<mjd-perl-tiefile-subscribe at plover.com>.
-
-The most recent version of this module, including documentation and
-any news of importance, will be available at
-
- http://perl.plover.com/TieFile/
-
-
-=head1 LICENSE
-
-C<Tie::File> version 0.97 is copyright (C) 2003 Mark Jason Dominus.
-
-This library is free software; you may redistribute it and/or modify
-it under the same terms as Perl itself.
-
-These terms are your choice of any of (1) the Perl Artistic Licence,
-or (2) version 2 of the GNU General Public License as published by the
-Free Software Foundation, or (3) any later version of the GNU General
-Public License.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this library program; it should be in the file C<COPYING>.
-If not, write to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA 02110-1301, USA
-
-For licensing inquiries, contact the author at:
-
- Mark Jason Dominus
- 255 S. Warnock St.
- Philadelphia, PA 19107
-
-=head1 WARRANTY
-
-C<Tie::File> version 0.97 comes with ABSOLUTELY NO WARRANTY.
-For details, see the license.
-
-=head1 THANKS
-
-Gigantic thanks to Jarkko Hietaniemi, for agreeing to put this in the
-core when I hadn't written it yet, and for generally being helpful,
-supportive, and competent. (Usually the rule is "choose any one.")
-Also big thanks to Abhijit Menon-Sen for all of the same things.
-
-Special thanks to Craig Berry and Peter Prymmer (for VMS portability
-help), Randy Kobes (for Win32 portability help), Clinton Pierce and
-Autrijus Tang (for heroic eleventh-hour Win32 testing above and beyond
-the call of duty), Michael G Schwern (for testing advice), and the
-rest of the CPAN testers (for testing generally).
-
-Special thanks to Tels for suggesting several speed and memory
-optimizations.
-
-Additional thanks to:
-Edward Avis /
-Mattia Barbon /
-Tom Christiansen /
-Gerrit Haase /
-Gurusamy Sarathy /
-Jarkko Hietaniemi (again) /
-Nikola Knezevic /
-John Kominetz /
-Nick Ing-Simmons /
-Tassilo von Parseval /
-H. Dieter Pearcey /
-Slaven Rezic /
-Eric Roode /
-Peter Scott /
-Peter Somu /
-Autrijus Tang (again) /
-Tels (again) /
-Juerd Waalboer
-
-=head1 TODO
-
-More tests. (Stuff I didn't think of yet.)
-
-Paragraph mode?
-
-Fixed-length mode. Leave-blanks mode.
-
-Maybe an autolocking mode?
-
-For many common uses of the module, the read cache is a liability.
-For example, a program that inserts a single record, or that scans the
-file once, will have a cache hit rate of zero. This suggests a major
-optimization: The cache should be initially disabled. Here's a hybrid
-approach: Initially, the cache is disabled, but the cache code
-maintains statistics about how high the hit rate would be *if* it were
-enabled. When it sees the hit rate get high enough, it enables
-itself. The STAT comments in this code are the beginning of an
-implementation of this.
-
-Record locking with fcntl()? Then the module might support an undo
-log and get real transactions. What a tour de force that would be.
-
-Keeping track of the highest cached record. This would allow reads-in-a-row
-to skip the cache lookup faster (if reading from 1..N with empty cache at
-start, the last cached value will be always N-1).
-
-More tests.
-
-=cut
-
Deleted: vendor/perl/dist/lib/Tie/Memoize.pm
===================================================================
--- vendor/perl/dist/lib/Tie/Memoize.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Tie/Memoize.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,128 +0,0 @@
-use strict;
-package Tie::Memoize;
-use Tie::Hash;
-our @ISA = 'Tie::ExtraHash';
-our $VERSION = '1.1';
-
-our $exists_token = \undef;
-
-sub croak {require Carp; goto &Carp::croak}
-
-# Format: [0: STORAGE, 1: EXISTS-CACHE, 2: FETCH_function;
-# 3: EXISTS_function, 4: DATA, 5: EXISTS_different ]
-
-sub FETCH {
- my ($h,$key) = ($_[0][0], $_[1]);
- my $res = $h->{$key};
- return $res if defined $res; # Shortcut if accessible
- return $res if exists $h->{$key}; # Accessible, but undef
- my $cache = $_[0][1]{$key};
- return if defined $cache and not $cache; # Known to not exist
- my @res = $_[0][2]->($key, $_[0][4]); # Autoload
- $_[0][1]{$key} = 0, return unless @res; # Cache non-existence
- delete $_[0][1]{$key}; # Clear existence cache, not needed any more
- $_[0][0]{$key} = $res[0]; # Store data and return
-}
-
-sub EXISTS {
- my ($a,$key) = (shift, shift);
- return 1 if exists $a->[0]{$key}; # Have data
- my $cache = $a->[1]{$key};
- return $cache if defined $cache; # Existence cache
- my @res = $a->[3]($key,$a->[4]);
- $a->[1]{$key} = 0, return unless @res; # Cache non-existence
- # Now we know it exists
- return ($a->[1]{$key} = 1) if $a->[5]; # Only existence reported
- # Now know the value
- $a->[0]{$key} = $res[0]; # Store data
- return 1
-}
-
-sub TIEHASH {
- croak 'syntax: tie %hash, \'Tie::AutoLoad\', \&fetch_subr' if @_ < 2;
- croak 'syntax: tie %hash, \'Tie::AutoLoad\', \&fetch_subr, $data, \&exists_subr, \%data_cache, \%existence_cache' if @_ > 6;
- push @_, undef if @_ < 3; # Data
- push @_, $_[1] if @_ < 4; # exists
- push @_, {} while @_ < 6; # initial value and caches
- bless [ @_[4,5,1,3,2], $_[1] ne $_[3]], $_[0]
-}
-
-1;
-
-=head1 NAME
-
-Tie::Memoize - add data to hash when needed
-
-=head1 SYNOPSIS
-
- require Tie::Memoize;
- tie %hash, 'Tie::Memoize',
- \&fetch, # The rest is optional
- $DATA, \&exists,
- {%ini_value}, {%ini_existence};
-
-=head1 DESCRIPTION
-
-This package allows a tied hash to autoload its values on the first access,
-and to use the cached value on the following accesses.
-
-Only read-accesses (via fetching the value or C<exists>) result in calls to
-the functions; the modify-accesses are performed as on a normal hash.
-
-The required arguments during C<tie> are the hash, the package, and
-the reference to the C<FETCH>ing function. The optional arguments are
-an arbitrary scalar $data, the reference to the C<EXISTS> function,
-and initial values of the hash and of the existence cache.
-
-Both the C<FETCH>ing function and the C<EXISTS> functions have the
-same signature: the arguments are C<$key, $data>; $data is the same
-value as given as argument during tie()ing. Both functions should
-return an empty list if the value does not exist. If C<EXISTS>
-function is different from the C<FETCH>ing function, it should return
-a TRUE value on success. The C<FETCH>ing function should return the
-intended value if the key is valid.
-
-=head1 Inheriting from B<Tie::Memoize>
-
-The structure of the tied() data is an array reference with elements
-
- 0: cache of known values
- 1: cache of known existence of keys
- 2: FETCH function
- 3: EXISTS function
- 4: $data
-
-The rest is for internal usage of this package. In particular, if
-TIEHASH is overwritten, it should call SUPER::TIEHASH.
-
-=head1 EXAMPLE
-
- sub slurp {
- my ($key, $dir) = shift;
- open my $h, '<', "$dir/$key" or return;
- local $/; <$h> # slurp it all
- }
- sub exists { my ($key, $dir) = shift; return -f "$dir/$key" }
-
- tie %hash, 'Tie::Memoize', \&slurp, $directory, \&exists,
- { fake_file1 => $content1, fake_file2 => $content2 },
- { pretend_does_not_exists => 0, known_to_exist => 1 };
-
-This example treats the slightly modified contents of $directory as a
-hash. The modifications are that the keys F<fake_file1> and
-F<fake_file2> fetch values $content1 and $content2, and
-F<pretend_does_not_exists> will never be accessed. Additionally, the
-existence of F<known_to_exist> is never checked (so if it does not
-exists when its content is needed, the user of %hash may be confused).
-
-=head1 BUGS
-
-FIRSTKEY and NEXTKEY methods go through the keys which were already read,
-not all the possible keys of the hash.
-
-=head1 AUTHOR
-
-Ilya Zakharevich L<mailto:perl-module-hash-memoize at ilyaz.org>.
-
-=cut
-
Deleted: vendor/perl/dist/lib/Tie/Memoize.t
===================================================================
--- vendor/perl/dist/lib/Tie/Memoize.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Tie/Memoize.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,61 +0,0 @@
-#!./perl -w
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-use strict;
-use Tie::Memoize;
-use Test::More tests => 28;
-use File::Spec;
-
-sub slurp {
- my ($key, $dir) = @_;
- open my $h, '<', File::Spec->catfile($dir, $key) or return;
- local $/;
- <$h> # slurp it all
-}
-sub exists { my ($key, $dir) = @_; return -f File::Spec->catfile($dir, $key) }
-
-my $directory = File::Spec->catdir(File::Spec->updir, 'lib');
-
-tie my %hash, 'Tie::Memoize', \&slurp, $directory, \&exists,
- { fake_file1 => 123, fake_file2 => 45678 },
- { 'strict.pm' => 0, known_to_exist => 1 };
-
-ok(not exists $hash{'strict.pm'});
-ok(exists $hash{known_to_exist});
-ok($hash{fake_file2} eq 45678);
-ok($hash{fake_file1} eq 123);
-ok(exists $hash{known_to_exist});
-ok(not exists $hash{'strict.pm'});
-ok(not defined $hash{fake_file3});
-ok(not defined $hash{known_to_exist});
-ok(not exists $hash{known_to_exist});
-ok(not exists $hash{'strict.pm'});
-my $c = slurp('constant.pm', $directory);
-ok($c);
-ok($hash{'constant.pm'} eq $c);
-ok($hash{'constant.pm'} eq $c);
-ok(not exists $hash{'strict.pm'});
-ok(exists $hash{'blib.pm'});
-
-untie %hash;
-
-tie %hash, 'Tie::Memoize', \&slurp, $directory;
-
-ok(exists $hash{'strict.pm'}, 'existing file');
-ok(not exists $hash{fake_file2});
-ok(not exists $hash{fake_file1});
-ok(not exists $hash{known_to_exist});
-ok(exists $hash{'strict.pm'}, 'existing file again');
-ok(not defined $hash{fake_file3});
-ok(not defined $hash{known_to_exist});
-ok(not exists $hash{known_to_exist});
-ok(exists $hash{'strict.pm'}, 'existing file again');
-ok($hash{'constant.pm'} eq $c);
-ok($hash{'constant.pm'} eq $c);
-ok(exists $hash{'strict.pm'}, 'existing file again');
-ok(exists $hash{'blib.pm'}, 'another existing file');
-
Deleted: vendor/perl/dist/lib/Tie/RefHash.pm
===================================================================
--- vendor/perl/dist/lib/Tie/RefHash.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Tie/RefHash.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,274 +0,0 @@
-package Tie::RefHash;
-
-use vars qw/$VERSION/;
-
-$VERSION = "1.38";
-
-use 5.005;
-
-=head1 NAME
-
-Tie::RefHash - use references as hash keys
-
-=head1 SYNOPSIS
-
- require 5.004;
- use Tie::RefHash;
- tie HASHVARIABLE, 'Tie::RefHash', LIST;
- tie HASHVARIABLE, 'Tie::RefHash::Nestable', LIST;
-
- untie HASHVARIABLE;
-
-=head1 DESCRIPTION
-
-This module provides the ability to use references as hash keys if you
-first C<tie> the hash variable to this module. Normally, only the
-keys of the tied hash itself are preserved as references; to use
-references as keys in hashes-of-hashes, use Tie::RefHash::Nestable,
-included as part of Tie::RefHash.
-
-It is implemented using the standard perl TIEHASH interface. Please
-see the C<tie> entry in perlfunc(1) and perltie(1) for more information.
-
-The Nestable version works by looking for hash references being stored
-and converting them to tied hashes so that they too can have
-references as keys. This will happen without warning whenever you
-store a reference to one of your own hashes in the tied hash.
-
-=head1 EXAMPLE
-
- use Tie::RefHash;
- tie %h, 'Tie::RefHash';
- $a = [];
- $b = {};
- $c = \*main;
- $d = \"gunk";
- $e = sub { 'foo' };
- %h = ($a => 1, $b => 2, $c => 3, $d => 4, $e => 5);
- $a->[0] = 'foo';
- $b->{foo} = 'bar';
- for (keys %h) {
- print ref($_), "\n";
- }
-
- tie %h, 'Tie::RefHash::Nestable';
- $h{$a}->{$b} = 1;
- for (keys %h, keys %{$h{$a}}) {
- print ref($_), "\n";
- }
-
-=head1 THREAD SUPPORT
-
-L<Tie::RefHash> fully supports threading using the C<CLONE> method.
-
-=head1 STORABLE SUPPORT
-
-L<Storable> hooks are provided for semantically correct serialization and
-cloning of tied refhashes.
-
-=head1 RELIC SUPPORT
-
-This version of Tie::RefHash seems to no longer work with 5.004. This has not
-been throughly investigated. Patches welcome ;-)
-
-=head1 MAINTAINER
-
-Yuval Kogman E<lt>nothingmuch at woobling.orgE<gt>
-
-=head1 AUTHOR
-
-Gurusamy Sarathy gsar at activestate.com
-
-'Nestable' by Ed Avis ed at membled.com
-
-=head1 SEE ALSO
-
-perl(1), perlfunc(1), perltie(1)
-
-=cut
-
-use Tie::Hash;
-use vars '@ISA';
- at ISA = qw(Tie::Hash);
-use strict;
-use Carp qw/croak/;
-
-BEGIN {
- local $@;
- # determine whether we need to take care of threads
- use Config ();
- my $usethreads = $Config::Config{usethreads}; # && exists $INC{"threads.pm"}
- *_HAS_THREADS = $usethreads ? sub () { 1 } : sub () { 0 };
- *_HAS_SCALAR_UTIL = eval { require Scalar::Util; 1 } ? sub () { 1 } : sub () { 0 };
- *_HAS_WEAKEN = defined(&Scalar::Util::weaken) ? sub () { 1 } : sub () { 0 };
-}
-
-BEGIN {
- # create a refaddr function
-
- local $@;
-
- if ( _HAS_SCALAR_UTIL ) {
- Scalar::Util->import("refaddr");
- } else {
- require overload;
-
- *refaddr = sub {
- if ( overload::StrVal($_[0]) =~ /\( 0x ([a-zA-Z0-9]+) \)$/x) {
- return $1;
- } else {
- die "couldn't parse StrVal: " . overload::StrVal($_[0]);
- }
- };
- }
-}
-
-my (@thread_object_registry, $count); # used by the CLONE method to rehash the keys after their refaddr changed
-
-sub TIEHASH {
- my $c = shift;
- my $s = [];
- bless $s, $c;
- while (@_) {
- $s->STORE(shift, shift);
- }
-
- if (_HAS_THREADS ) {
-
- if ( _HAS_WEAKEN ) {
- # remember the object so that we can rekey it on CLONE
- push @thread_object_registry, $s;
- # but make this a weak reference, so that there are no leaks
- Scalar::Util::weaken( $thread_object_registry[-1] );
-
- if ( ++$count > 1000 ) {
- # this ensures we don't fill up with a huge array dead weakrefs
- @thread_object_registry = grep { defined } @thread_object_registry;
- $count = 0;
- }
- } else {
- $count++; # used in the warning
- }
- }
-
- return $s;
-}
-
-my $storable_format_version = join("/", __PACKAGE__, "0.01");
-
-sub STORABLE_freeze {
- my ( $self, $is_cloning ) = @_;
- my ( $refs, $reg ) = @$self;
- return ( $storable_format_version, [ values %$refs ], $reg );
-}
-
-sub STORABLE_thaw {
- my ( $self, $is_cloning, $version, $refs, $reg ) = @_;
- croak "incompatible versions of Tie::RefHash between freeze and thaw"
- unless $version eq $storable_format_version;
-
- @$self = ( {}, $reg );
- $self->_reindex_keys( $refs );
-}
-
-sub CLONE {
- my $pkg = shift;
-
- if ( $count and not _HAS_WEAKEN ) {
- warn "Tie::RefHash is not threadsafe without Scalar::Util::weaken";
- }
-
- # when the thread has been cloned all the objects need to be updated.
- # dead weakrefs are undefined, so we filter them out
- @thread_object_registry = grep { defined && do { $_->_reindex_keys; 1 } } @thread_object_registry;
- $count = 0; # we just cleaned up
-}
-
-sub _reindex_keys {
- my ( $self, $extra_keys ) = @_;
- # rehash all the ref keys based on their new StrVal
- %{ $self->[0] } = map { refaddr($_->[0]) => $_ } (values(%{ $self->[0] }), @{ $extra_keys || [] });
-}
-
-sub FETCH {
- my($s, $k) = @_;
- if (ref $k) {
- my $kstr = refaddr($k);
- if (defined $s->[0]{$kstr}) {
- $s->[0]{$kstr}[1];
- }
- else {
- undef;
- }
- }
- else {
- $s->[1]{$k};
- }
-}
-
-sub STORE {
- my($s, $k, $v) = @_;
- if (ref $k) {
- $s->[0]{refaddr($k)} = [$k, $v];
- }
- else {
- $s->[1]{$k} = $v;
- }
- $v;
-}
-
-sub DELETE {
- my($s, $k) = @_;
- (ref $k)
- ? (delete($s->[0]{refaddr($k)}) || [])->[1]
- : delete($s->[1]{$k});
-}
-
-sub EXISTS {
- my($s, $k) = @_;
- (ref $k) ? exists($s->[0]{refaddr($k)}) : exists($s->[1]{$k});
-}
-
-sub FIRSTKEY {
- my $s = shift;
- keys %{$s->[0]}; # reset iterator
- keys %{$s->[1]}; # reset iterator
- $s->[2] = 0; # flag for iteration, see NEXTKEY
- $s->NEXTKEY;
-}
-
-sub NEXTKEY {
- my $s = shift;
- my ($k, $v);
- if (!$s->[2]) {
- if (($k, $v) = each %{$s->[0]}) {
- return $v->[0];
- }
- else {
- $s->[2] = 1;
- }
- }
- return each %{$s->[1]};
-}
-
-sub CLEAR {
- my $s = shift;
- $s->[2] = 0;
- %{$s->[0]} = ();
- %{$s->[1]} = ();
-}
-
-package Tie::RefHash::Nestable;
-use vars '@ISA';
- at ISA = 'Tie::RefHash';
-
-sub STORE {
- my($s, $k, $v) = @_;
- if (ref($v) eq 'HASH' and not tied %$v) {
- my @elems = %$v;
- tie %$v, ref($s), @elems;
- }
- $s->SUPER::STORE($k, $v);
-}
-
-1;
Deleted: vendor/perl/dist/lib/Time/Local.pm
===================================================================
--- vendor/perl/dist/lib/Time/Local.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Time/Local.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,371 +0,0 @@
-package Time::Local;
-
-require Exporter;
-use Carp;
-use Config;
-use strict;
-use integer;
-
-use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK );
-$VERSION = '1.1901';
-
- at ISA = qw( Exporter );
- at EXPORT = qw( timegm timelocal );
- at EXPORT_OK = qw( timegm_nocheck timelocal_nocheck );
-
-my @MonthDays = ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 );
-
-# Determine breakpoint for rolling century
-my $ThisYear = ( localtime() )[5];
-my $Breakpoint = ( $ThisYear + 50 ) % 100;
-my $NextCentury = $ThisYear - $ThisYear % 100;
-$NextCentury += 100 if $Breakpoint < 50;
-my $Century = $NextCentury - 100;
-my $SecOff = 0;
-
-my ( %Options, %Cheat );
-
-use constant SECS_PER_MINUTE => 60;
-use constant SECS_PER_HOUR => 3600;
-use constant SECS_PER_DAY => 86400;
-
-my $MaxInt;
-if ( $^O eq 'MacOS' ) {
- # time_t is unsigned...
- $MaxInt = ( 1 << ( 8 * $Config{ivsize} ) ) - 1;
-}
-else {
- $MaxInt = ( ( 1 << ( 8 * $Config{ivsize} - 2 ) ) - 1 ) * 2 + 1;
-}
-
-my $MaxDay = int( ( $MaxInt - ( SECS_PER_DAY / 2 ) ) / SECS_PER_DAY ) - 1;
-
-# Determine the EPOC day for this machine
-my $Epoc = 0;
-if ( $^O eq 'vos' ) {
- # work around posix-977 -- VOS doesn't handle dates in the range
- # 1970-1980.
- $Epoc = _daygm( 0, 0, 0, 1, 0, 70, 4, 0 );
-}
-elsif ( $^O eq 'MacOS' ) {
- $MaxDay *=2 if $^O eq 'MacOS'; # time_t unsigned ... quick hack?
- # MacOS time() is seconds since 1 Jan 1904, localtime
- # so we need to calculate an offset to apply later
- $Epoc = 693901;
- $SecOff = timelocal( localtime(0)) - timelocal( gmtime(0) ) ;
- $Epoc += _daygm( gmtime(0) );
-}
-else {
- $Epoc = _daygm( gmtime(0) );
-}
-
-%Cheat = (); # clear the cache as epoc has changed
-
-sub _daygm {
-
- # This is written in such a byzantine way in order to avoid
- # lexical variables and sub calls, for speed
- return $_[3] + (
- $Cheat{ pack( 'ss', @_[ 4, 5 ] ) } ||= do {
- my $month = ( $_[4] + 10 ) % 12;
- my $year = ( $_[5] + 1900 ) - ( $month / 10 );
-
- ( ( 365 * $year )
- + ( $year / 4 )
- - ( $year / 100 )
- + ( $year / 400 )
- + ( ( ( $month * 306 ) + 5 ) / 10 )
- )
- - $Epoc;
- }
- );
-}
-
-sub _timegm {
- my $sec =
- $SecOff + $_[0] + ( SECS_PER_MINUTE * $_[1] ) + ( SECS_PER_HOUR * $_[2] );
-
- return $sec + ( SECS_PER_DAY * &_daygm );
-}
-
-sub timegm {
- my ( $sec, $min, $hour, $mday, $month, $year ) = @_;
-
- if ( $year >= 1000 ) {
- $year -= 1900;
- }
- elsif ( $year < 100 and $year >= 0 ) {
- $year += ( $year > $Breakpoint ) ? $Century : $NextCentury;
- }
-
- unless ( $Options{no_range_check} ) {
- croak "Month '$month' out of range 0..11"
- if $month > 11
- or $month < 0;
-
- my $md = $MonthDays[$month];
- ++$md
- if $month == 1 && _is_leap_year( $year + 1900 );
-
- croak "Day '$mday' out of range 1..$md" if $mday > $md or $mday < 1;
- croak "Hour '$hour' out of range 0..23" if $hour > 23 or $hour < 0;
- croak "Minute '$min' out of range 0..59" if $min > 59 or $min < 0;
- croak "Second '$sec' out of range 0..59" if $sec > 59 or $sec < 0;
- }
-
- my $days = _daygm( undef, undef, undef, $mday, $month, $year );
-
- unless ($Options{no_range_check} or abs($days) < $MaxDay) {
- my $msg = '';
- $msg .= "Day too big - $days > $MaxDay\n" if $days > $MaxDay;
-
- $year += 1900;
- $msg .= "Cannot handle date ($sec, $min, $hour, $mday, $month, $year)";
-
- croak $msg;
- }
-
- return $sec
- + $SecOff
- + ( SECS_PER_MINUTE * $min )
- + ( SECS_PER_HOUR * $hour )
- + ( SECS_PER_DAY * $days );
-}
-
-sub _is_leap_year {
- return 0 if $_[0] % 4;
- return 1 if $_[0] % 100;
- return 0 if $_[0] % 400;
-
- return 1;
-}
-
-sub timegm_nocheck {
- local $Options{no_range_check} = 1;
- return &timegm;
-}
-
-sub timelocal {
- my $ref_t = &timegm;
- my $loc_for_ref_t = _timegm( localtime($ref_t) );
-
- my $zone_off = $loc_for_ref_t - $ref_t
- or return $loc_for_ref_t;
-
- # Adjust for timezone
- my $loc_t = $ref_t - $zone_off;
-
- # Are we close to a DST change or are we done
- my $dst_off = $ref_t - _timegm( localtime($loc_t) );
-
- # If this evaluates to true, it means that the value in $loc_t is
- # the _second_ hour after a DST change where the local time moves
- # backward.
- if ( ! $dst_off &&
- ( ( $ref_t - SECS_PER_HOUR ) - _timegm( localtime( $loc_t - SECS_PER_HOUR ) ) < 0 )
- ) {
- return $loc_t - SECS_PER_HOUR;
- }
-
- # Adjust for DST change
- $loc_t += $dst_off;
-
- return $loc_t if $dst_off > 0;
-
- # If the original date was a non-extent gap in a forward DST jump,
- # we should now have the wrong answer - undo the DST adjustment
- my ( $s, $m, $h ) = localtime($loc_t);
- $loc_t -= $dst_off if $s != $_[0] || $m != $_[1] || $h != $_[2];
-
- return $loc_t;
-}
-
-sub timelocal_nocheck {
- local $Options{no_range_check} = 1;
- return &timelocal;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Time::Local - efficiently compute time from local and GMT time
-
-=head1 SYNOPSIS
-
- $time = timelocal($sec,$min,$hour,$mday,$mon,$year);
- $time = timegm($sec,$min,$hour,$mday,$mon,$year);
-
-=head1 DESCRIPTION
-
-This module provides functions that are the inverse of built-in perl
-functions C<localtime()> and C<gmtime()>. They accept a date as a
-six-element array, and return the corresponding C<time(2)> value in
-seconds since the system epoch (Midnight, January 1, 1970 GMT on Unix,
-for example). This value can be positive or negative, though POSIX
-only requires support for positive values, so dates before the
-system's epoch may not work on all operating systems.
-
-It is worth drawing particular attention to the expected ranges for
-the values provided. The value for the day of the month is the actual
-day (ie 1..31), while the month is the number of months since January
-(0..11). This is consistent with the values returned from
-C<localtime()> and C<gmtime()>.
-
-=head1 FUNCTIONS
-
-=head2 C<timelocal()> and C<timegm()>
-
-This module exports two functions by default, C<timelocal()> and
-C<timegm()>.
-
-The C<timelocal()> and C<timegm()> functions perform range checking on
-the input $sec, $min, $hour, $mday, and $mon values by default.
-
-=head2 C<timelocal_nocheck()> and C<timegm_nocheck()>
-
-If you are working with data you know to be valid, you can speed your
-code up by using the "nocheck" variants, C<timelocal_nocheck()> and
-C<timegm_nocheck()>. These variants must be explicitly imported.
-
- use Time::Local 'timelocal_nocheck';
-
- # The 365th day of 1999
- print scalar localtime timelocal_nocheck 0,0,0,365,0,99;
-
-If you supply data which is not valid (month 27, second 1,000) the
-results will be unpredictable (so don't do that).
-
-=head2 Year Value Interpretation
-
-Strictly speaking, the year should be specified in a form consistent
-with C<localtime()>, i.e. the offset from 1900. In order to make the
-interpretation of the year easier for humans, however, who are more
-accustomed to seeing years as two-digit or four-digit values, the
-following conventions are followed:
-
-=over 4
-
-=item *
-
-Years greater than 999 are interpreted as being the actual year,
-rather than the offset from 1900. Thus, 1964 would indicate the year
-Martin Luther King won the Nobel prize, not the year 3864.
-
-=item *
-
-Years in the range 100..999 are interpreted as offset from 1900, so
-that 112 indicates 2012. This rule also applies to years less than
-zero (but see note below regarding date range).
-
-=item *
-
-Years in the range 0..99 are interpreted as shorthand for years in the
-rolling "current century," defined as 50 years on either side of the
-current year. Thus, today, in 1999, 0 would refer to 2000, and 45 to
-2045, but 55 would refer to 1955. Twenty years from now, 55 would
-instead refer to 2055. This is messy, but matches the way people
-currently think about two digit dates. Whenever possible, use an
-absolute four digit year instead.
-
-=back
-
-The scheme above allows interpretation of a wide range of dates,
-particularly if 4-digit years are used.
-
-=head2 Limits of time_t
-
-The range of dates that can be actually be handled depends on the size
-of C<time_t> (usually a signed integer) on the given
-platform. Currently, this is 32 bits for most systems, yielding an
-approximate range from Dec 1901 to Jan 2038.
-
-Both C<timelocal()> and C<timegm()> croak if given dates outside the
-supported range.
-
-=head2 Ambiguous Local Times (DST)
-
-Because of DST changes, there are many time zones where the same local
-time occurs for two different GMT times on the same day. For example,
-in the "Europe/Paris" time zone, the local time of 2001-10-28 02:30:00
-can represent either 2001-10-28 00:30:00 GMT, B<or> 2001-10-28
-01:30:00 GMT.
-
-When given an ambiguous local time, the timelocal() function should
-always return the epoch for the I<earlier> of the two possible GMT
-times.
-
-=head2 Non-Existent Local Times (DST)
-
-When a DST change causes a locale clock to skip one hour forward,
-there will be an hour's worth of local times that don't exist. Again,
-for the "Europe/Paris" time zone, the local clock jumped from
-2001-03-25 01:59:59 to 2001-03-25 03:00:00.
-
-If the C<timelocal()> function is given a non-existent local time, it
-will simply return an epoch value for the time one hour later.
-
-=head2 Negative Epoch Values
-
-Negative epoch (C<time_t>) values are not officially supported by the
-POSIX standards, so this module's tests do not test them. On some
-systems, they are known not to work. These include MacOS (pre-OSX) and
-Win32.
-
-On systems which do support negative epoch values, this module should
-be able to cope with dates before the start of the epoch, down the
-minimum value of time_t for the system.
-
-=head1 IMPLEMENTATION
-
-These routines are quite efficient and yet are always guaranteed to
-agree with C<localtime()> and C<gmtime()>. We manage this by caching
-the start times of any months we've seen before. If we know the start
-time of the month, we can always calculate any time within the month.
-The start times are calculated using a mathematical formula. Unlike
-other algorithms that do multiple calls to C<gmtime()>.
-
-The C<timelocal()> function is implemented using the same cache. We
-just assume that we're translating a GMT time, and then fudge it when
-we're done for the timezone and daylight savings arguments. Note that
-the timezone is evaluated for each date because countries occasionally
-change their official timezones. Assuming that C<localtime()> corrects
-for these changes, this routine will also be correct.
-
-=head1 BUGS
-
-The whole scheme for interpreting two-digit years can be considered a
-bug.
-
-=head1 SUPPORT
-
-Support for this module is provided via the datetime at perl.org email
-list. See http://lists.perl.org/ for more details.
-
-Please submit bugs to the CPAN RT system at
-http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Time-Local or via email
-at bug-time-local at rt.cpan.org.
-
-=head1 COPYRIGHT
-
-Copyright (c) 1997-2003 Graham Barr, 2003-2007 David Rolsky. All
-rights reserved. This program is free software; you can redistribute
-it and/or modify it under the same terms as Perl itself.
-
-The full text of the license can be found in the LICENSE file included
-with this module.
-
-=head1 AUTHOR
-
-This module is based on a Perl 4 library, timelocal.pl, that was
-included with Perl 4.036, and was most likely written by Tom
-Christiansen.
-
-The current version was written by Graham Barr.
-
-It is now being maintained separately from the Perl core by Dave
-Rolsky, <autarch at urth.org>.
-
-=cut
Deleted: vendor/perl/dist/lib/Time/Local.t
===================================================================
--- vendor/perl/dist/lib/Time/Local.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Time/Local.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,283 +0,0 @@
-#!./perl
-
-BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib');
- }
-}
-
-use strict;
-
-use Config;
-use Test::More;
-use Time::Local;
-
-# Set up time values to test
-my @time =
- (
- #year,mon,day,hour,min,sec
- [1970, 1, 2, 00, 00, 00],
- [1980, 2, 28, 12, 00, 00],
- [1980, 2, 29, 12, 00, 00],
- [1999, 12, 31, 23, 59, 59],
- [2000, 1, 1, 00, 00, 00],
- [2010, 10, 12, 14, 13, 12],
- # leap day
- [2020, 2, 29, 12, 59, 59],
- [2030, 7, 4, 17, 07, 06],
-# The following test fails on a surprising number of systems
-# so it is commented out. The end of the Epoch for a 32-bit signed
-# implementation of time_t should be Jan 19, 2038 03:14:07 UTC.
-# [2038, 1, 17, 23, 59, 59], # last full day in any tz
- );
-
-my @bad_time =
- (
- # month too large
- [1995, 13, 01, 01, 01, 01],
- # day too large
- [1995, 02, 30, 01, 01, 01],
- # hour too large
- [1995, 02, 10, 25, 01, 01],
- # minute too large
- [1995, 02, 10, 01, 60, 01],
- # second too large
- [1995, 02, 10, 01, 01, 60],
- );
-
-my @neg_time =
- (
- # test negative epochs for systems that handle it
- [ 1969, 12, 31, 16, 59, 59 ],
- [ 1950, 04, 12, 9, 30, 31 ],
- );
-
-# Leap year tests
-my @years =
- (
- [ 1900 => 0 ],
- [ 1947 => 0 ],
- [ 1996 => 1 ],
- [ 2000 => 1 ],
- [ 2100 => 0 ],
- );
-
-# Use 3 days before the start of the epoch because with Borland on
-# Win32 it will work for -3600 _if_ your time zone is +01:00 (or
-# greater).
-my $neg_epoch_ok = defined ((localtime(-259200))[0]) ? 1 : 0;
-
-# use vmsish 'time' makes for oddness around the Unix epoch
-if ($^O eq 'VMS') {
- $time[0][2]++;
- $neg_epoch_ok = 0; # time_t is unsigned
-}
-
-my $epoch_is_64 = eval { $Config{ivsize} == 8 && ( gmtime 2**40 )[5] == 34912 };
-
-my $tests = (@time * 12);
-$tests += @neg_time * 12;
-$tests += @bad_time;
-$tests += @years;
-$tests += 23;
-
-plan tests => $tests;
-
-for (@time, @neg_time) {
- my($year, $mon, $mday, $hour, $min, $sec) = @$_;
- $year -= 1900;
- $mon--;
-
- SKIP: {
- skip '1970 test on VOS fails.', 12
- if $^O eq 'vos' && $year == 70;
- skip 'this platform does not support negative epochs.', 12
- if $year < 70 && ! $neg_epoch_ok;
-
- {
- my $year_in = $year < 70 ? $year + 1900 : $year;
- my $time = timelocal($sec,$min,$hour,$mday,$mon,$year_in);
-
- my($s,$m,$h,$D,$M,$Y) = localtime($time);
-
- is($s, $sec, "timelocal second for @$_");
- is($m, $min, "timelocal minute for @$_");
- is($h, $hour, "timelocal hour for @$_");
- is($D, $mday, "timelocal day for @$_");
- is($M, $mon, "timelocal month for @$_");
- is($Y, $year, "timelocal year for @$_");
- }
-
- {
- my $year_in = $year < 70 ? $year + 1900 : $year;
- my $time = timegm($sec,$min,$hour,$mday,$mon,$year_in);
-
- my($s,$m,$h,$D,$M,$Y) = gmtime($time);
-
- is($s, $sec, "timegm second for @$_");
- is($m, $min, "timegm minute for @$_");
- is($h, $hour, "timegm hour for @$_");
- is($D, $mday, "timegm day for @$_");
- is($M, $mon, "timegm month for @$_");
- is($Y, $year, "timegm year for @$_");
- }
- }
-}
-
-for (@bad_time) {
- my($year, $mon, $mday, $hour, $min, $sec) = @$_;
- $year -= 1900;
- $mon--;
-
- eval { timegm($sec,$min,$hour,$mday,$mon,$year) };
-
- like($@, qr/.*out of range.*/, 'invalid time caused an error');
-}
-
-{
- is(timelocal(0,0,1,1,0,90) - timelocal(0,0,0,1,0,90), 3600,
- 'one hour difference between two calls to timelocal');
-
- is(timelocal(1,2,3,1,0,100) - timelocal(1,2,3,31,11,99), 24 * 3600,
- 'one day difference between two calls to timelocal');
-
- # Diff beween Jan 1, 1980 and Mar 1, 1980 = (31 + 29 = 60 days)
- is(timegm(0,0,0, 1, 2, 80) - timegm(0,0,0, 1, 0, 80), 60 * 24 * 3600,
- '60 day difference between two calls to timegm');
-}
-
-# bugid #19393
-# At a DST transition, the clock skips forward, eg from 01:59:59 to
-# 03:00:00. In this case, 02:00:00 is an invalid time, and should be
-# treated like 03:00:00 rather than 01:00:00 - negative zone offsets used
-# to do the latter
-{
- my $hour = (localtime(timelocal(0, 0, 2, 7, 3, 102)))[2];
- # testers in US/Pacific should get 3,
- # other testers should get 2
- ok($hour == 2 || $hour == 3, 'hour should be 2 or 3');
-}
-
-for my $p (@years) {
- my ( $year, $is_leap_year ) = @$p;
-
- my $string = $is_leap_year ? 'is' : 'is not';
- is( Time::Local::_is_leap_year($year), $is_leap_year,
- "$year $string a leap year" );
-}
-
-SKIP:
-{
- skip 'this platform does not support negative epochs.', 6
- unless $neg_epoch_ok;
-
- eval { timegm(0,0,0,29,1,1900) };
- like($@, qr/Day '29' out of range 1\.\.28/,
- 'does not accept leap day in 1900');
-
- eval { timegm(0,0,0,29,1,200) };
- like($@, qr/Day '29' out of range 1\.\.28/,
- 'does not accept leap day in 2100 (year passed as 200)');
-
- eval { timegm(0,0,0,29,1,0) };
- is($@, '', 'no error with leap day of 2000 (year passed as 0)');
-
- eval { timegm(0,0,0,29,1,1904) };
- is($@, '', 'no error with leap day of 1904');
-
- eval { timegm(0,0,0,29,1,4) };
- is($@, '', 'no error with leap day of 2004 (year passed as 4)');
-
- eval { timegm(0,0,0,29,1,96) };
- is($@, '', 'no error with leap day of 1996 (year passed as 96)');
-}
-
-SKIP:
-{
- skip 'These tests require a system with 64-bit time_t.', 3
- unless $epoch_is_64;
-
- is( timegm( 8, 14, 3, 19, 0, ( 1900 + 138 ) ), 2**31,
- 'can call timegm for 2**31 epoch seconds' );
- is( timegm( 16, 28, 6, 7, 1, ( 1900 + 206 ) ), 2**32,
- 'can call timegm for 2**32 epoch seconds (on a 64-bit system)' );
- is( timegm( 16, 36, 0, 20, 1, ( 34912 + 1900 ) ), 2**40,
- 'can call timegm for 2**40 epoch seconds (on a 64-bit system)' );
-}
-
-SKIP:
-{
- skip 'These tests only run for the package maintainer.', 8
- unless $ENV{MAINTAINER};
-
- require POSIX;
-
- local $ENV{TZ} = 'Europe/Vienna';
- POSIX::tzset();
-
- # 2001-10-28 02:30:00 - could be either summer or standard time,
- # prefer earlier of the two, in this case summer
- my $time = timelocal(0, 30, 2, 28, 9, 101);
- is($time, 1004229000,
- 'timelocal prefers earlier epoch in the presence of a DST change');
-
- local $ENV{TZ} = 'America/Chicago';
- POSIX::tzset();
-
- # Same local time in America/Chicago. There is a transition here
- # as well.
- $time = timelocal(0, 30, 1, 28, 9, 101);
- is($time, 1004250600,
- 'timelocal prefers earlier epoch in the presence of a DST change');
-
- $time = timelocal(0, 30, 2, 1, 3, 101);
- is($time, 986113800,
- 'timelocal for non-existent time gives you the time one hour later');
-
- local $ENV{TZ} = 'Australia/Sydney';
- POSIX::tzset();
- # 2001-03-25 02:30:00 in Australia/Sydney. This is the transition
- # _to_ summer time. The southern hemisphere transitions are
- # opposite those of the northern.
- $time = timelocal(0, 30, 2, 25, 2, 101);
- is($time, 985447800,
- 'timelocal prefers earlier epoch in the presence of a DST change');
-
- $time = timelocal(0, 30, 2, 28, 9, 101);
- is($time, 1004200200,
- 'timelocal for non-existent time gives you the time one hour later');
-
- local $ENV{TZ} = 'Europe/London';
- POSIX::tzset();
- $time = timelocal( localtime(1111917720) );
- is($time, 1111917720,
- 'timelocal for round trip bug on date of DST change for Europe/London');
-
- # There is no 1:00 AM on this date, as it leaps forward to
- # 2:00 on the DST change - this should return 2:00 per the
- # docs.
- is( ( localtime( timelocal( 0, 0, 1, 27, 2, 2005 ) ) )[2], 2,
- 'hour is 2 when given 1:00 AM on Europe/London date change' );
-
- is( ( localtime( timelocal( 0, 0, 2, 27, 2, 2005 ) ) )[2], 2,
- 'hour is 2 when given 2:00 AM on Europe/London date change' );
-}
-
-SKIP:
-{
- skip 'These tests are only run when $ENV{PERL_CORE} is true.', 2
- unless $ENV{PERL_CORE};
-
- {
- package test;
- require 'timelocal.pl';
-
- # need to get ok() from main package
- ::is(timegm(0,0,0,1,0,80), main::timegm(0,0,0,1,0,80),
- 'timegm in timelocal.pl');
-
- ::is(timelocal(1,2,3,4,5,88), main::timelocal(1,2,3,4,5,88),
- 'timelocal in timelocal.pl');
- }
-}
Deleted: vendor/perl/dist/lib/Unicode/Collate.pm
===================================================================
--- vendor/perl/dist/lib/Unicode/Collate.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/Unicode/Collate.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1877 +0,0 @@
-package Unicode::Collate;
-
-BEGIN {
- unless ("A" eq pack('U', 0x41)) {
- die "Unicode::Collate cannot stringify a Unicode code point\n";
- }
-}
-
-use 5.006;
-use strict;
-use warnings;
-use Carp;
-use File::Spec;
-
-no warnings 'utf8';
-
-our $VERSION = '0.52';
-our $PACKAGE = __PACKAGE__;
-
-my @Path = qw(Unicode Collate);
-my $KeyFile = "allkeys.txt";
-
-# Perl's boolean
-use constant TRUE => 1;
-use constant FALSE => "";
-use constant NOMATCHPOS => -1;
-
-# A coderef to get combining class imported from Unicode::Normalize
-# (i.e. \&Unicode::Normalize::getCombinClass).
-# This is also used as a HAS_UNICODE_NORMALIZE flag.
-my $CVgetCombinClass;
-
-# Supported Levels
-use constant MinLevel => 1;
-use constant MaxLevel => 4;
-
-# Minimum weights at level 2 and 3, respectively
-use constant Min2Wt => 0x20;
-use constant Min3Wt => 0x02;
-
-# Shifted weight at 4th level
-use constant Shift4Wt => 0xFFFF;
-
-# A boolean for Variable and 16-bit weights at 4 levels of Collation Element
-# PROBLEM: The Default Unicode Collation Element Table
-# has weights over 0xFFFF at the 4th level.
-# The tie-breaking in the variable weights
-# other than "shift" (as well as "shift-trimmed") is unreliable.
-use constant VCE_TEMPLATE => 'Cn4';
-
-# A sort key: 16-bit weights
-# See also the PROBLEM on VCE_TEMPLATE above.
-use constant KEY_TEMPLATE => 'n*';
-
-# Level separator in a sort key:
-# i.e. pack(KEY_TEMPLATE, 0)
-use constant LEVEL_SEP => "\0\0";
-
-# As Unicode code point separator for hash keys.
-# A joined code point string (denoted by JCPS below)
-# like "65;768" is used for internal processing
-# instead of Perl's Unicode string like "\x41\x{300}",
-# as the native code point is different from the Unicode code point
-# on EBCDIC platform.
-# This character must not be included in any stringified
-# representation of an integer.
-use constant CODE_SEP => ';';
-
-# boolean values of variable weights
-use constant NON_VAR => 0; # Non-Variable character
-use constant VAR => 1; # Variable character
-
-# specific code points
-use constant Hangul_LBase => 0x1100;
-use constant Hangul_LIni => 0x1100;
-use constant Hangul_LFin => 0x1159;
-use constant Hangul_LFill => 0x115F;
-use constant Hangul_VBase => 0x1161;
-use constant Hangul_VIni => 0x1160; # from Vowel Filler
-use constant Hangul_VFin => 0x11A2;
-use constant Hangul_TBase => 0x11A7; # from "no-final" codepoint
-use constant Hangul_TIni => 0x11A8;
-use constant Hangul_TFin => 0x11F9;
-use constant Hangul_TCount => 28;
-use constant Hangul_NCount => 588;
-use constant Hangul_SBase => 0xAC00;
-use constant Hangul_SIni => 0xAC00;
-use constant Hangul_SFin => 0xD7A3;
-use constant CJK_UidIni => 0x4E00;
-use constant CJK_UidFin => 0x9FA5;
-use constant CJK_UidF41 => 0x9FBB;
-use constant CJK_ExtAIni => 0x3400;
-use constant CJK_ExtAFin => 0x4DB5;
-use constant CJK_ExtBIni => 0x20000;
-use constant CJK_ExtBFin => 0x2A6D6;
-use constant BMP_Max => 0xFFFF;
-
-# Logical_Order_Exception in PropList.txt
-my $DefaultRearrange = [ 0x0E40..0x0E44, 0x0EC0..0x0EC4 ];
-
-sub UCA_Version { "14" }
-
-sub Base_Unicode_Version { "4.1.0" }
-
-######
-
-sub pack_U {
- return pack('U*', @_);
-}
-
-sub unpack_U {
- return unpack('U*', shift(@_).pack('U*'));
-}
-
-######
-
-my (%VariableOK);
- at VariableOK{ qw/
- blanked non-ignorable shifted shift-trimmed
- / } = (); # keys lowercased
-
-our @ChangeOK = qw/
- alternate backwards level normalization rearrange
- katakana_before_hiragana upper_before_lower
- overrideHangul overrideCJK preprocess UCA_Version
- hangul_terminator variable
- /;
-
-our @ChangeNG = qw/
- entry mapping table maxlength
- ignoreChar ignoreName undefChar undefName variableTable
- versionTable alternateTable backwardsTable forwardsTable rearrangeTable
- derivCode normCode rearrangeHash
- backwardsFlag
- /;
-# The hash key 'ignored' is deleted at v 0.21.
-# The hash key 'isShift' is deleted at v 0.23.
-# The hash key 'combining' is deleted at v 0.24.
-# The hash key 'entries' is deleted at v 0.30.
-# The hash key 'L3_ignorable' is deleted at v 0.40.
-
-sub version {
- my $self = shift;
- return $self->{versionTable} || 'unknown';
-}
-
-my (%ChangeOK, %ChangeNG);
- at ChangeOK{ @ChangeOK } = ();
- at ChangeNG{ @ChangeNG } = ();
-
-sub change {
- my $self = shift;
- my %hash = @_;
- my %old;
- if (exists $hash{variable} && exists $hash{alternate}) {
- delete $hash{alternate};
- }
- elsif (!exists $hash{variable} && exists $hash{alternate}) {
- $hash{variable} = $hash{alternate};
- }
- foreach my $k (keys %hash) {
- if (exists $ChangeOK{$k}) {
- $old{$k} = $self->{$k};
- $self->{$k} = $hash{$k};
- }
- elsif (exists $ChangeNG{$k}) {
- croak "change of $k via change() is not allowed!";
- }
- # else => ignored
- }
- $self->checkCollator();
- return wantarray ? %old : $self;
-}
-
-sub _checkLevel {
- my $level = shift;
- my $key = shift; # 'level' or 'backwards'
- MinLevel <= $level or croak sprintf
- "Illegal level %d (in value for key '%s') lower than %d.",
- $level, $key, MinLevel;
- $level <= MaxLevel or croak sprintf
- "Unsupported level %d (in value for key '%s') higher than %d.",
- $level, $key, MaxLevel;
-}
-
-my %DerivCode = (
- 8 => \&_derivCE_8,
- 9 => \&_derivCE_9,
- 11 => \&_derivCE_9, # 11 == 9
- 14 => \&_derivCE_14,
-);
-
-sub checkCollator {
- my $self = shift;
- _checkLevel($self->{level}, "level");
-
- $self->{derivCode} = $DerivCode{ $self->{UCA_Version} }
- or croak "Illegal UCA version (passed $self->{UCA_Version}).";
-
- $self->{variable} ||= $self->{alternate} || $self->{variableTable} ||
- $self->{alternateTable} || 'shifted';
- $self->{variable} = $self->{alternate} = lc($self->{variable});
- exists $VariableOK{ $self->{variable} }
- or croak "$PACKAGE unknown variable parameter name: $self->{variable}";
-
- if (! defined $self->{backwards}) {
- $self->{backwardsFlag} = 0;
- }
- elsif (! ref $self->{backwards}) {
- _checkLevel($self->{backwards}, "backwards");
- $self->{backwardsFlag} = 1 << $self->{backwards};
- }
- else {
- my %level;
- $self->{backwardsFlag} = 0;
- for my $b (@{ $self->{backwards} }) {
- _checkLevel($b, "backwards");
- $level{$b} = 1;
- }
- for my $v (sort keys %level) {
- $self->{backwardsFlag} += 1 << $v;
- }
- }
-
- defined $self->{rearrange} or $self->{rearrange} = [];
- ref $self->{rearrange}
- or croak "$PACKAGE: list for rearrangement must be store in ARRAYREF";
-
- # keys of $self->{rearrangeHash} are $self->{rearrange}.
- $self->{rearrangeHash} = undef;
-
- if (@{ $self->{rearrange} }) {
- @{ $self->{rearrangeHash} }{ @{ $self->{rearrange} } } = ();
- }
-
- $self->{normCode} = undef;
-
- if (defined $self->{normalization}) {
- eval { require Unicode::Normalize };
- $@ and croak "Unicode::Normalize is required to normalize strings";
-
- $CVgetCombinClass ||= \&Unicode::Normalize::getCombinClass;
-
- if ($self->{normalization} =~ /^(?:NF)D\z/) { # tweak for default
- $self->{normCode} = \&Unicode::Normalize::NFD;
- }
- elsif ($self->{normalization} ne 'prenormalized') {
- my $norm = $self->{normalization};
- $self->{normCode} = sub {
- Unicode::Normalize::normalize($norm, shift);
- };
- eval { $self->{normCode}->("") }; # try
- $@ and croak "$PACKAGE unknown normalization form name: $norm";
- }
- }
- return;
-}
-
-sub new
-{
- my $class = shift;
- my $self = bless { @_ }, $class;
-
- # If undef is passed explicitly, no file is read.
- $self->{table} = $KeyFile if ! exists $self->{table};
- $self->read_table() if defined $self->{table};
-
- if ($self->{entry}) {
- while ($self->{entry} =~ /([^\n]+)/g) {
- $self->parseEntry($1);
- }
- }
-
- $self->{level} ||= MaxLevel;
- $self->{UCA_Version} ||= UCA_Version();
-
- $self->{overrideHangul} = FALSE
- if ! exists $self->{overrideHangul};
- $self->{overrideCJK} = FALSE
- if ! exists $self->{overrideCJK};
- $self->{normalization} = 'NFD'
- if ! exists $self->{normalization};
- $self->{rearrange} = $self->{rearrangeTable} ||
- ($self->{UCA_Version} <= 11 ? $DefaultRearrange : [])
- if ! exists $self->{rearrange};
- $self->{backwards} = $self->{backwardsTable}
- if ! exists $self->{backwards};
-
- $self->checkCollator();
-
- return $self;
-}
-
-sub read_table {
- my $self = shift;
-
- my($f, $fh);
- foreach my $d (@INC) {
- $f = File::Spec->catfile($d, @Path, $self->{table});
- last if open($fh, $f);
- $f = undef;
- }
- if (!defined $f) {
- $f = File::Spec->catfile(@Path, $self->{table});
- croak("$PACKAGE: Can't locate $f in \@INC (\@INC contains: @INC)");
- }
-
- while (my $line = <$fh>) {
- next if $line =~ /^\s*#/;
- unless ($line =~ s/^\s*\@//) {
- $self->parseEntry($line);
- next;
- }
-
- # matched ^\s*\@
- if ($line =~ /^version\s*(\S*)/) {
- $self->{versionTable} ||= $1;
- }
- elsif ($line =~ /^variable\s+(\S*)/) { # since UTS #10-9
- $self->{variableTable} ||= $1;
- }
- elsif ($line =~ /^alternate\s+(\S*)/) { # till UTS #10-8
- $self->{alternateTable} ||= $1;
- }
- elsif ($line =~ /^backwards\s+(\S*)/) {
- push @{ $self->{backwardsTable} }, $1;
- }
- elsif ($line =~ /^forwards\s+(\S*)/) { # parhaps no use
- push @{ $self->{forwardsTable} }, $1;
- }
- elsif ($line =~ /^rearrange\s+(.*)/) { # (\S*) is NG
- push @{ $self->{rearrangeTable} }, _getHexArray($1);
- }
- }
- close $fh;
-}
-
-
-##
-## get $line, parse it, and write an entry in $self
-##
-sub parseEntry
-{
- my $self = shift;
- my $line = shift;
- my($name, $entry, @uv, @key);
-
- return if $line !~ /^\s*[0-9A-Fa-f]/;
-
- # removes comment and gets name
- $name = $1
- if $line =~ s/[#%]\s*(.*)//;
- return if defined $self->{undefName} && $name =~ /$self->{undefName}/;
-
- # gets element
- my($e, $k) = split /;/, $line;
- croak "Wrong Entry: <charList> must be separated by ';' from <collElement>"
- if ! $k;
-
- @uv = _getHexArray($e);
- return if !@uv;
-
- $entry = join(CODE_SEP, @uv); # in JCPS
-
- if (defined $self->{undefChar} || defined $self->{ignoreChar}) {
- my $ele = pack_U(@uv);
-
- # regarded as if it were not entried in the table
- return
- if defined $self->{undefChar} && $ele =~ /$self->{undefChar}/;
-
- # replaced as completely ignorable
- $k = '[.0000.0000.0000.0000]'
- if defined $self->{ignoreChar} && $ele =~ /$self->{ignoreChar}/;
- }
-
- # replaced as completely ignorable
- $k = '[.0000.0000.0000.0000]'
- if defined $self->{ignoreName} && $name =~ /$self->{ignoreName}/;
-
- my $is_L3_ignorable = TRUE;
-
- foreach my $arr ($k =~ /\[([^\[\]]+)\]/g) { # SPACEs allowed
- my $var = $arr =~ /\*/; # exactly /^\*/ but be lenient.
- my @wt = _getHexArray($arr);
- push @key, pack(VCE_TEMPLATE, $var, @wt);
- $is_L3_ignorable = FALSE
- if $wt[0] || $wt[1] || $wt[2];
- # Conformance Test for 3.1.1 and 4.0.0 shows Level 3 ignorable
- # is completely ignorable.
- # For expansion, an entry $is_L3_ignorable
- # if and only if "all" CEs are [.0000.0000.0000].
- }
-
- $self->{mapping}{$entry} = $is_L3_ignorable ? [] : \@key;
-
- if (@uv > 1) {
- (!$self->{maxlength}{$uv[0]} || $self->{maxlength}{$uv[0]} < @uv)
- and $self->{maxlength}{$uv[0]} = @uv;
- }
-}
-
-
-##
-## VCE = _varCE(variable term, VCE)
-##
-sub _varCE
-{
- my $vbl = shift;
- my $vce = shift;
- if ($vbl eq 'non-ignorable') {
- return $vce;
- }
- my ($var, @wt) = unpack VCE_TEMPLATE, $vce;
-
- if ($var) {
- return pack(VCE_TEMPLATE, $var, 0, 0, 0,
- $vbl eq 'blanked' ? $wt[3] : $wt[0]);
- }
- elsif ($vbl eq 'blanked') {
- return $vce;
- }
- else {
- return pack(VCE_TEMPLATE, $var, @wt[0..2],
- $vbl eq 'shifted' && $wt[0]+$wt[1]+$wt[2] ? Shift4Wt : 0);
- }
-}
-
-sub viewSortKey
-{
- my $self = shift;
- $self->visualizeSortKey($self->getSortKey(@_));
-}
-
-sub visualizeSortKey
-{
- my $self = shift;
- my $view = join " ", map sprintf("%04X", $_), unpack(KEY_TEMPLATE, shift);
-
- if ($self->{UCA_Version} <= 8) {
- $view =~ s/ ?0000 ?/|/g;
- } else {
- $view =~ s/\b0000\b/|/g;
- }
- return "[$view]";
-}
-
-
-##
-## arrayref of JCPS = splitEnt(string to be collated)
-## arrayref of arrayref[JCPS, ini_pos, fin_pos] = splitEnt(string, true)
-##
-sub splitEnt
-{
- my $self = shift;
- my $wLen = $_[1];
-
- my $code = $self->{preprocess};
- my $norm = $self->{normCode};
- my $map = $self->{mapping};
- my $max = $self->{maxlength};
- my $reH = $self->{rearrangeHash};
- my $ver9 = $self->{UCA_Version} >= 9 && $self->{UCA_Version} <= 11;
-
- my ($str, @buf);
-
- if ($wLen) {
- $code and croak "Preprocess breaks character positions. "
- . "Don't use with index(), match(), etc.";
- $norm and croak "Normalization breaks character positions. "
- . "Don't use with index(), match(), etc.";
- $str = $_[0];
- }
- else {
- $str = $_[0];
- $str = &$code($str) if ref $code;
- $str = &$norm($str) if ref $norm;
- }
-
- # get array of Unicode code point of string.
- my @src = unpack_U($str);
-
- # rearrangement:
- # Character positions are not kept if rearranged,
- # then neglected if $wLen is true.
- if ($reH && ! $wLen) {
- for (my $i = 0; $i < @src; $i++) {
- if (exists $reH->{ $src[$i] } && $i + 1 < @src) {
- ($src[$i], $src[$i+1]) = ($src[$i+1], $src[$i]);
- $i++;
- }
- }
- }
-
- # remove a code point marked as a completely ignorable.
- for (my $i = 0; $i < @src; $i++) {
- $src[$i] = undef
- if _isIllegal($src[$i]) || ($ver9 &&
- $map->{ $src[$i] } && @{ $map->{ $src[$i] } } == 0);
- }
-
- for (my $i = 0; $i < @src; $i++) {
- my $jcps = $src[$i];
-
- # skip removed code point
- if (! defined $jcps) {
- if ($wLen && @buf) {
- $buf[-1][2] = $i + 1;
- }
- next;
- }
-
- my $i_orig = $i;
-
- # find contraction
- if ($max->{$jcps}) {
- my $temp_jcps = $jcps;
- my $jcpsLen = 1;
- my $maxLen = $max->{$jcps};
-
- for (my $p = $i + 1; $jcpsLen < $maxLen && $p < @src; $p++) {
- next if ! defined $src[$p];
- $temp_jcps .= CODE_SEP . $src[$p];
- $jcpsLen++;
- if ($map->{$temp_jcps}) {
- $jcps = $temp_jcps;
- $i = $p;
- }
- }
-
- # not-contiguous contraction with Combining Char (cf. UTS#10, S2.1).
- # This process requires Unicode::Normalize.
- # If "normalization" is undef, here should be skipped *always*
- # (in spite of bool value of $CVgetCombinClass),
- # since canonical ordering cannot be expected.
- # Blocked combining character should not be contracted.
-
- if ($self->{normalization})
- # $self->{normCode} is false in the case of "prenormalized".
- {
- my $preCC = 0;
- my $curCC = 0;
-
- for (my $p = $i + 1; $p < @src; $p++) {
- next if ! defined $src[$p];
- $curCC = $CVgetCombinClass->($src[$p]);
- last unless $curCC;
- my $tail = CODE_SEP . $src[$p];
- if ($preCC != $curCC && $map->{$jcps.$tail}) {
- $jcps .= $tail;
- $src[$p] = undef;
- } else {
- $preCC = $curCC;
- }
- }
- }
- }
-
- # skip completely ignorable
- if ($map->{$jcps} && @{ $map->{$jcps} } == 0) {
- if ($wLen && @buf) {
- $buf[-1][2] = $i + 1;
- }
- next;
- }
-
- push @buf, $wLen ? [$jcps, $i_orig, $i + 1] : $jcps;
- }
- return \@buf;
-}
-
-
-##
-## list of VCE = getWt(JCPS)
-##
-sub getWt
-{
- my $self = shift;
- my $u = shift;
- my $vbl = $self->{variable};
- my $map = $self->{mapping};
- my $der = $self->{derivCode};
-
- return if !defined $u;
- return map(_varCE($vbl, $_), @{ $map->{$u} })
- if $map->{$u};
-
- # JCPS must not be a contraction, then it's a code point.
- if (Hangul_SIni <= $u && $u <= Hangul_SFin) {
- my $hang = $self->{overrideHangul};
- my @hangulCE;
- if ($hang) {
- @hangulCE = map(pack(VCE_TEMPLATE, NON_VAR, @$_), &$hang($u));
- }
- elsif (!defined $hang) {
- @hangulCE = $der->($u);
- }
- else {
- my $max = $self->{maxlength};
- my @decH = _decompHangul($u);
-
- if (@decH == 2) {
- my $contract = join(CODE_SEP, @decH);
- @decH = ($contract) if $map->{$contract};
- } else { # must be <@decH == 3>
- if ($max->{$decH[0]}) {
- my $contract = join(CODE_SEP, @decH);
- if ($map->{$contract}) {
- @decH = ($contract);
- } else {
- $contract = join(CODE_SEP, @decH[0,1]);
- $map->{$contract} and @decH = ($contract, $decH[2]);
- }
- # even if V's ignorable, LT contraction is not supported.
- # If such a situatution were required, NFD should be used.
- }
- if (@decH == 3 && $max->{$decH[1]}) {
- my $contract = join(CODE_SEP, @decH[1,2]);
- $map->{$contract} and @decH = ($decH[0], $contract);
- }
- }
-
- @hangulCE = map({
- $map->{$_} ? @{ $map->{$_} } : $der->($_);
- } @decH);
- }
- return map _varCE($vbl, $_), @hangulCE;
- }
- elsif (_isUIdeo($u, $self->{UCA_Version})) {
- my $cjk = $self->{overrideCJK};
- return map _varCE($vbl, $_),
- $cjk
- ? map(pack(VCE_TEMPLATE, NON_VAR, @$_), &$cjk($u))
- : defined $cjk && $self->{UCA_Version} <= 8 && $u < 0x10000
- ? _uideoCE_8($u)
- : $der->($u);
- }
- else {
- return map _varCE($vbl, $_), $der->($u);
- }
-}
-
-
-##
-## string sortkey = getSortKey(string arg)
-##
-sub getSortKey
-{
- my $self = shift;
- my $lev = $self->{level};
- my $rEnt = $self->splitEnt(shift); # get an arrayref of JCPS
- my $v2i = $self->{UCA_Version} >= 9 &&
- $self->{variable} ne 'non-ignorable';
-
- my @buf; # weight arrays
- if ($self->{hangul_terminator}) {
- my $preHST = '';
- foreach my $jcps (@$rEnt) {
- # weird things like VL, TL-contraction are not considered!
- my $curHST = '';
- foreach my $u (split /;/, $jcps) {
- $curHST .= getHST($u);
- }
- if ($preHST && !$curHST || # hangul before non-hangul
- $preHST =~ /L\z/ && $curHST =~ /^T/ ||
- $preHST =~ /V\z/ && $curHST =~ /^L/ ||
- $preHST =~ /T\z/ && $curHST =~ /^[LV]/) {
-
- push @buf, $self->getWtHangulTerm();
- }
- $preHST = $curHST;
-
- push @buf, $self->getWt($jcps);
- }
- $preHST # end at hangul
- and push @buf, $self->getWtHangulTerm();
- }
- else {
- foreach my $jcps (@$rEnt) {
- push @buf, $self->getWt($jcps);
- }
- }
-
- # make sort key
- my @ret = ([],[],[],[]);
- my $last_is_variable;
-
- foreach my $vwt (@buf) {
- my($var, @wt) = unpack(VCE_TEMPLATE, $vwt);
-
- # "Ignorable (L1, L2) after Variable" since track. v. 9
- if ($v2i) {
- if ($var) {
- $last_is_variable = TRUE;
- }
- elsif (!$wt[0]) { # ignorable
- next if $last_is_variable;
- }
- else {
- $last_is_variable = FALSE;
- }
- }
- foreach my $v (0..$lev-1) {
- 0 < $wt[$v] and push @{ $ret[$v] }, $wt[$v];
- }
- }
-
- # modification of tertiary weights
- if ($self->{upper_before_lower}) {
- foreach my $w (@{ $ret[2] }) {
- if (0x8 <= $w && $w <= 0xC) { $w -= 6 } # lower
- elsif (0x2 <= $w && $w <= 0x6) { $w += 6 } # upper
- elsif ($w == 0x1C) { $w += 1 } # square upper
- elsif ($w == 0x1D) { $w -= 1 } # square lower
- }
- }
- if ($self->{katakana_before_hiragana}) {
- foreach my $w (@{ $ret[2] }) {
- if (0x0F <= $w && $w <= 0x13) { $w -= 2 } # katakana
- elsif (0x0D <= $w && $w <= 0x0E) { $w += 5 } # hiragana
- }
- }
-
- if ($self->{backwardsFlag}) {
- for (my $v = MinLevel; $v <= MaxLevel; $v++) {
- if ($self->{backwardsFlag} & (1 << $v)) {
- @{ $ret[$v-1] } = reverse @{ $ret[$v-1] };
- }
- }
- }
-
- join LEVEL_SEP, map pack(KEY_TEMPLATE, @$_), @ret;
-}
-
-
-##
-## int compare = cmp(string a, string b)
-##
-sub cmp { $_[0]->getSortKey($_[1]) cmp $_[0]->getSortKey($_[2]) }
-sub eq { $_[0]->getSortKey($_[1]) eq $_[0]->getSortKey($_[2]) }
-sub ne { $_[0]->getSortKey($_[1]) ne $_[0]->getSortKey($_[2]) }
-sub lt { $_[0]->getSortKey($_[1]) lt $_[0]->getSortKey($_[2]) }
-sub le { $_[0]->getSortKey($_[1]) le $_[0]->getSortKey($_[2]) }
-sub gt { $_[0]->getSortKey($_[1]) gt $_[0]->getSortKey($_[2]) }
-sub ge { $_[0]->getSortKey($_[1]) ge $_[0]->getSortKey($_[2]) }
-
-##
-## list[strings] sorted = sort(list[strings] arg)
-##
-sub sort {
- my $obj = shift;
- return
- map { $_->[1] }
- sort{ $a->[0] cmp $b->[0] }
- map [ $obj->getSortKey($_), $_ ], @_;
-}
-
-
-sub _derivCE_14 {
- my $u = shift;
- my $base =
- (CJK_UidIni <= $u && $u <= CJK_UidF41)
- ? 0xFB40 : # CJK
- (CJK_ExtAIni <= $u && $u <= CJK_ExtAFin ||
- CJK_ExtBIni <= $u && $u <= CJK_ExtBFin)
- ? 0xFB80 # CJK ext.
- : 0xFBC0; # others
-
- my $aaaa = $base + ($u >> 15);
- my $bbbb = ($u & 0x7FFF) | 0x8000;
- return
- pack(VCE_TEMPLATE, NON_VAR, $aaaa, Min2Wt, Min3Wt, $u),
- pack(VCE_TEMPLATE, NON_VAR, $bbbb, 0, 0, $u);
-}
-
-sub _derivCE_9 {
- my $u = shift;
- my $base =
- (CJK_UidIni <= $u && $u <= CJK_UidFin)
- ? 0xFB40 : # CJK
- (CJK_ExtAIni <= $u && $u <= CJK_ExtAFin ||
- CJK_ExtBIni <= $u && $u <= CJK_ExtBFin)
- ? 0xFB80 # CJK ext.
- : 0xFBC0; # others
-
- my $aaaa = $base + ($u >> 15);
- my $bbbb = ($u & 0x7FFF) | 0x8000;
- return
- pack(VCE_TEMPLATE, NON_VAR, $aaaa, Min2Wt, Min3Wt, $u),
- pack(VCE_TEMPLATE, NON_VAR, $bbbb, 0, 0, $u);
-}
-
-sub _derivCE_8 {
- my $code = shift;
- my $aaaa = 0xFF80 + ($code >> 15);
- my $bbbb = ($code & 0x7FFF) | 0x8000;
- return
- pack(VCE_TEMPLATE, NON_VAR, $aaaa, 2, 1, $code),
- pack(VCE_TEMPLATE, NON_VAR, $bbbb, 0, 0, $code);
-}
-
-sub _uideoCE_8 {
- my $u = shift;
- return pack(VCE_TEMPLATE, NON_VAR, $u, Min2Wt, Min3Wt, $u);
-}
-
-sub _isUIdeo {
- my ($u, $uca_vers) = @_;
- return(
- (CJK_UidIni <= $u &&
- ($uca_vers >= 14 ? ( $u <= CJK_UidF41) : ($u <= CJK_UidFin)))
- ||
- (CJK_ExtAIni <= $u && $u <= CJK_ExtAFin)
- ||
- (CJK_ExtBIni <= $u && $u <= CJK_ExtBFin)
- );
-}
-
-
-sub getWtHangulTerm {
- my $self = shift;
- return _varCE($self->{variable},
- pack(VCE_TEMPLATE, NON_VAR, $self->{hangul_terminator}, 0,0,0));
-}
-
-
-##
-## "hhhh hhhh hhhh" to (dddd, dddd, dddd)
-##
-sub _getHexArray { map hex, $_[0] =~ /([0-9a-fA-F]+)/g }
-
-#
-# $code *must* be in Hangul syllable.
-# Check it before you enter here.
-#
-sub _decompHangul {
- my $code = shift;
- my $si = $code - Hangul_SBase;
- my $li = int( $si / Hangul_NCount);
- my $vi = int(($si % Hangul_NCount) / Hangul_TCount);
- my $ti = $si % Hangul_TCount;
- return (
- Hangul_LBase + $li,
- Hangul_VBase + $vi,
- $ti ? (Hangul_TBase + $ti) : (),
- );
-}
-
-sub _isIllegal {
- my $code = shift;
- return ! defined $code # removed
- || ($code < 0 || 0x10FFFF < $code) # out of range
- || (($code & 0xFFFE) == 0xFFFE) # ??FFF[EF] (cf. utf8.c)
- || (0xD800 <= $code && $code <= 0xDFFF) # unpaired surrogates
- || (0xFDD0 <= $code && $code <= 0xFDEF) # other non-characters
- ;
-}
-
-# Hangul Syllable Type
-sub getHST {
- my $u = shift;
- return
- Hangul_LIni <= $u && $u <= Hangul_LFin || $u == Hangul_LFill ? "L" :
- Hangul_VIni <= $u && $u <= Hangul_VFin ? "V" :
- Hangul_TIni <= $u && $u <= Hangul_TFin ? "T" :
- Hangul_SIni <= $u && $u <= Hangul_SFin ?
- ($u - Hangul_SBase) % Hangul_TCount ? "LVT" : "LV" : "";
-}
-
-
-##
-## bool _nonIgnorAtLevel(arrayref weights, int level)
-##
-sub _nonIgnorAtLevel($$)
-{
- my $wt = shift;
- return if ! defined $wt;
- my $lv = shift;
- return grep($wt->[$_-1] != 0, MinLevel..$lv) ? TRUE : FALSE;
-}
-
-##
-## bool _eqArray(
-## arrayref of arrayref[weights] source,
-## arrayref of arrayref[weights] substr,
-## int level)
-## * comparison of graphemes vs graphemes.
-## @$source >= @$substr must be true (check it before call this);
-##
-sub _eqArray($$$)
-{
- my $source = shift;
- my $substr = shift;
- my $lev = shift;
-
- for my $g (0..@$substr-1){
- # Do the $g'th graphemes have the same number of AV weigths?
- return if @{ $source->[$g] } != @{ $substr->[$g] };
-
- for my $w (0..@{ $substr->[$g] }-1) {
- for my $v (0..$lev-1) {
- return if $source->[$g][$w][$v] != $substr->[$g][$w][$v];
- }
- }
- }
- return 1;
-}
-
-##
-## (int position, int length)
-## int position = index(string, substring, position, [undoc'ed grobal])
-##
-## With "grobal" (only for the list context),
-## returns list of arrayref[position, length].
-##
-sub index
-{
- my $self = shift;
- my $str = shift;
- my $len = length($str);
- my $subE = $self->splitEnt(shift);
- my $pos = @_ ? shift : 0;
- $pos = 0 if $pos < 0;
- my $grob = shift;
-
- my $lev = $self->{level};
- my $v2i = $self->{UCA_Version} >= 9 &&
- $self->{variable} ne 'non-ignorable';
-
- if (! @$subE) {
- my $temp = $pos <= 0 ? 0 : $len <= $pos ? $len : $pos;
- return $grob
- ? map([$_, 0], $temp..$len)
- : wantarray ? ($temp,0) : $temp;
- }
- $len < $pos
- and return wantarray ? () : NOMATCHPOS;
- my $strE = $self->splitEnt($pos ? substr($str, $pos) : $str, TRUE);
- @$strE
- or return wantarray ? () : NOMATCHPOS;
-
- my(@strWt, @iniPos, @finPos, @subWt, @g_ret);
-
- my $last_is_variable;
- for my $vwt (map $self->getWt($_), @$subE) {
- my($var, @wt) = unpack(VCE_TEMPLATE, $vwt);
- my $to_be_pushed = _nonIgnorAtLevel(\@wt,$lev);
-
- # "Ignorable (L1, L2) after Variable" since track. v. 9
- if ($v2i) {
- if ($var) {
- $last_is_variable = TRUE;
- }
- elsif (!$wt[0]) { # ignorable
- $to_be_pushed = FALSE if $last_is_variable;
- }
- else {
- $last_is_variable = FALSE;
- }
- }
-
- if (@subWt && !$var && !$wt[0]) {
- push @{ $subWt[-1] }, \@wt if $to_be_pushed;
- } else {
- push @subWt, [ \@wt ];
- }
- }
-
- my $count = 0;
- my $end = @$strE - 1;
-
- $last_is_variable = FALSE; # reuse
- for (my $i = 0; $i <= $end; ) { # no $i++
- my $found_base = 0;
-
- # fetch a grapheme
- while ($i <= $end && $found_base == 0) {
- for my $vwt ($self->getWt($strE->[$i][0])) {
- my($var, @wt) = unpack(VCE_TEMPLATE, $vwt);
- my $to_be_pushed = _nonIgnorAtLevel(\@wt,$lev);
-
- # "Ignorable (L1, L2) after Variable" since track. v. 9
- if ($v2i) {
- if ($var) {
- $last_is_variable = TRUE;
- }
- elsif (!$wt[0]) { # ignorable
- $to_be_pushed = FALSE if $last_is_variable;
- }
- else {
- $last_is_variable = FALSE;
- }
- }
-
- if (@strWt && !$var && !$wt[0]) {
- push @{ $strWt[-1] }, \@wt if $to_be_pushed;
- $finPos[-1] = $strE->[$i][2];
- } elsif ($to_be_pushed) {
- push @strWt, [ \@wt ];
- push @iniPos, $found_base ? NOMATCHPOS : $strE->[$i][1];
- $finPos[-1] = NOMATCHPOS if $found_base;
- push @finPos, $strE->[$i][2];
- $found_base++;
- }
- # else ===> no-op
- }
- $i++;
- }
-
- # try to match
- while ( @strWt > @subWt || (@strWt == @subWt && $i > $end) ) {
- if ($iniPos[0] != NOMATCHPOS &&
- $finPos[$#subWt] != NOMATCHPOS &&
- _eqArray(\@strWt, \@subWt, $lev)) {
- my $temp = $iniPos[0] + $pos;
-
- if ($grob) {
- push @g_ret, [$temp, $finPos[$#subWt] - $iniPos[0]];
- splice @strWt, 0, $#subWt;
- splice @iniPos, 0, $#subWt;
- splice @finPos, 0, $#subWt;
- }
- else {
- return wantarray
- ? ($temp, $finPos[$#subWt] - $iniPos[0])
- : $temp;
- }
- }
- shift @strWt;
- shift @iniPos;
- shift @finPos;
- }
- }
-
- return $grob
- ? @g_ret
- : wantarray ? () : NOMATCHPOS;
-}
-
-##
-## scalarref to matching part = match(string, substring)
-##
-sub match
-{
- my $self = shift;
- if (my($pos,$len) = $self->index($_[0], $_[1])) {
- my $temp = substr($_[0], $pos, $len);
- return wantarray ? $temp : \$temp;
- # An lvalue ref \substr should be avoided,
- # since its value is affected by modification of its referent.
- }
- else {
- return;
- }
-}
-
-##
-## arrayref matching parts = gmatch(string, substring)
-##
-sub gmatch
-{
- my $self = shift;
- my $str = shift;
- my $sub = shift;
- return map substr($str, $_->[0], $_->[1]),
- $self->index($str, $sub, 0, 'g');
-}
-
-##
-## bool subst'ed = subst(string, substring, replace)
-##
-sub subst
-{
- my $self = shift;
- my $code = ref $_[2] eq 'CODE' ? $_[2] : FALSE;
-
- if (my($pos,$len) = $self->index($_[0], $_[1])) {
- if ($code) {
- my $mat = substr($_[0], $pos, $len);
- substr($_[0], $pos, $len, $code->($mat));
- } else {
- substr($_[0], $pos, $len, $_[2]);
- }
- return TRUE;
- }
- else {
- return FALSE;
- }
-}
-
-##
-## int count = gsubst(string, substring, replace)
-##
-sub gsubst
-{
- my $self = shift;
- my $code = ref $_[2] eq 'CODE' ? $_[2] : FALSE;
- my $cnt = 0;
-
- # Replacement is carried out from the end, then use reverse.
- for my $pos_len (reverse $self->index($_[0], $_[1], 0, 'g')) {
- if ($code) {
- my $mat = substr($_[0], $pos_len->[0], $pos_len->[1]);
- substr($_[0], $pos_len->[0], $pos_len->[1], $code->($mat));
- } else {
- substr($_[0], $pos_len->[0], $pos_len->[1], $_[2]);
- }
- $cnt++;
- }
- return $cnt;
-}
-
-1;
-__END__
-
-=head1 NAME
-
-Unicode::Collate - Unicode Collation Algorithm
-
-=head1 SYNOPSIS
-
- use Unicode::Collate;
-
- #construct
- $Collator = Unicode::Collate->new(%tailoring);
-
- #sort
- @sorted = $Collator->sort(@not_sorted);
-
- #compare
- $result = $Collator->cmp($a, $b); # returns 1, 0, or -1.
-
- # If %tailoring is false (i.e. empty),
- # $Collator should do the default collation.
-
-=head1 DESCRIPTION
-
-This module is an implementation of Unicode Technical Standard #10
-(a.k.a. UTS #10) - Unicode Collation Algorithm (a.k.a. UCA).
-
-=head2 Constructor and Tailoring
-
-The C<new> method returns a collator object.
-
- $Collator = Unicode::Collate->new(
- UCA_Version => $UCA_Version,
- alternate => $alternate, # deprecated: use of 'variable' is recommended.
- backwards => $levelNumber, # or \@levelNumbers
- entry => $element,
- hangul_terminator => $term_primary_weight,
- ignoreName => qr/$ignoreName/,
- ignoreChar => qr/$ignoreChar/,
- katakana_before_hiragana => $bool,
- level => $collationLevel,
- normalization => $normalization_form,
- overrideCJK => \&overrideCJK,
- overrideHangul => \&overrideHangul,
- preprocess => \&preprocess,
- rearrange => \@charList,
- table => $filename,
- undefName => qr/$undefName/,
- undefChar => qr/$undefChar/,
- upper_before_lower => $bool,
- variable => $variable,
- );
-
-=over 4
-
-=item UCA_Version
-
-If the tracking version number of UCA is given,
-behavior of that tracking version is emulated on collating.
-If omitted, the return value of C<UCA_Version()> is used.
-C<UCA_Version()> should return the latest tracking version supported.
-
-The supported tracking version: 8, 9, 11, or 14.
-
- UCA Unicode Standard DUCET (@version)
- ---------------------------------------------------
- 8 3.1 3.0.1 (3.0.1d9)
- 9 3.1 with Corrigendum 3 3.1.1 (3.1.1)
- 11 4.0 4.0.0 (4.0.0)
- 14 4.1.0 4.1.0 (4.1.0)
-
-Note: Recent UTS #10 renames "Tracking Version" to "Revision."
-
-=item alternate
-
--- see 3.2.2 Alternate Weighting, version 8 of UTS #10
-
-For backward compatibility, C<alternate> (old name) can be used
-as an alias for C<variable>.
-
-=item backwards
-
--- see 3.1.2 French Accents, UTS #10.
-
- backwards => $levelNumber or \@levelNumbers
-
-Weights in reverse order; ex. level 2 (diacritic ordering) in French.
-If omitted, forwards at all the levels.
-
-=item entry
-
--- see 3.1 Linguistic Features; 3.2.1 File Format, UTS #10.
-
-If the same character (or a sequence of characters) exists
-in the collation element table through C<table>,
-mapping to collation elements is overrided.
-If it does not exist, the mapping is defined additionally.
-
- entry => <<'ENTRY', # for DUCET v4.0.0 (allkeys-4.0.0.txt)
-0063 0068 ; [.0E6A.0020.0002.0063] # ch
-0043 0068 ; [.0E6A.0020.0007.0043] # Ch
-0043 0048 ; [.0E6A.0020.0008.0043] # CH
-006C 006C ; [.0F4C.0020.0002.006C] # ll
-004C 006C ; [.0F4C.0020.0007.004C] # Ll
-004C 004C ; [.0F4C.0020.0008.004C] # LL
-00F1 ; [.0F7B.0020.0002.00F1] # n-tilde
-006E 0303 ; [.0F7B.0020.0002.00F1] # n-tilde
-00D1 ; [.0F7B.0020.0008.00D1] # N-tilde
-004E 0303 ; [.0F7B.0020.0008.00D1] # N-tilde
-ENTRY
-
- entry => <<'ENTRY', # for DUCET v4.0.0 (allkeys-4.0.0.txt)
-00E6 ; [.0E33.0020.0002.00E6][.0E8B.0020.0002.00E6] # ae ligature as <a><e>
-00C6 ; [.0E33.0020.0008.00C6][.0E8B.0020.0008.00C6] # AE ligature as <A><E>
-ENTRY
-
-B<NOTE:> The code point in the UCA file format (before C<';'>)
-B<must> be a Unicode code point (defined as hexadecimal),
-but not a native code point.
-So C<0063> must always denote C<U+0063>,
-but not a character of C<"\x63">.
-
-Weighting may vary depending on collation element table.
-So ensure the weights defined in C<entry> will be consistent with
-those in the collation element table loaded via C<table>.
-
-In DUCET v4.0.0, primary weight of C<C> is C<0E60>
-and that of C<D> is C<0E6D>. So setting primary weight of C<CH> to C<0E6A>
-(as a value between C<0E60> and C<0E6D>)
-makes ordering as C<C E<lt> CH E<lt> D>.
-Exactly speaking DUCET already has some characters between C<C> and C<D>:
-C<small capital C> (C<U+1D04>) with primary weight C<0E64>,
-C<c-hook/C-hook> (C<U+0188/U+0187>) with C<0E65>,
-and C<c-curl> (C<U+0255>) with C<0E69>.
-Then primary weight C<0E6A> for C<CH> makes C<CH>
-ordered between C<c-curl> and C<D>.
-
-=item hangul_terminator
-
--- see 7.1.4 Trailing Weights, UTS #10.
-
-If a true value is given (non-zero but should be positive),
-it will be added as a terminator primary weight to the end of
-every standard Hangul syllable. Secondary and any higher weights
-for terminator are set to zero.
-If the value is false or C<hangul_terminator> key does not exist,
-insertion of terminator weights will not be performed.
-
-Boundaries of Hangul syllables are determined
-according to conjoining Jamo behavior in F<the Unicode Standard>
-and F<HangulSyllableType.txt>.
-
-B<Implementation Note:>
-(1) For expansion mapping (Unicode character mapped
-to a sequence of collation elements), a terminator will not be added
-between collation elements, even if Hangul syllable boundary exists there.
-Addition of terminator is restricted to the next position
-to the last collation element.
-
-(2) Non-conjoining Hangul letters
-(Compatibility Jamo, halfwidth Jamo, and enclosed letters) are not
-automatically terminated with a terminator primary weight.
-These characters may need terminator included in a collation element
-table beforehand.
-
-=item ignoreChar
-
-=item ignoreName
-
--- see 3.2.2 Variable Weighting, UTS #10.
-
-Makes the entry in the table completely ignorable;
-i.e. as if the weights were zero at all level.
-
-Through C<ignoreChar>, any character matching C<qr/$ignoreChar/>
-will be ignored. Through C<ignoreName>, any character whose name
-(given in the C<table> file as a comment) matches C<qr/$ignoreName/>
-will be ignored.
-
-E.g. when 'a' and 'e' are ignorable,
-'element' is equal to 'lament' (or 'lmnt').
-
-=item katakana_before_hiragana
-
--- see 7.3.1 Tertiary Weight Table, UTS #10.
-
-By default, hiragana is before katakana.
-If the parameter is made true, this is reversed.
-
-B<NOTE>: This parameter simplemindedly assumes that any hiragana/katakana
-distinctions must occur in level 3, and their weights at level 3 must be
-same as those mentioned in 7.3.1, UTS #10.
-If you define your collation elements which violate this requirement,
-this parameter does not work validly.
-
-=item level
-
--- see 4.3 Form Sort Key, UTS #10.
-
-Set the maximum level.
-Any higher levels than the specified one are ignored.
-
- Level 1: alphabetic ordering
- Level 2: diacritic ordering
- Level 3: case ordering
- Level 4: tie-breaking (e.g. in the case when variable is 'shifted')
-
- ex.level => 2,
-
-If omitted, the maximum is the 4th.
-
-=item normalization
-
--- see 4.1 Normalize, UTS #10.
-
-If specified, strings are normalized before preparation of sort keys
-(the normalization is executed after preprocess).
-
-A form name C<Unicode::Normalize::normalize()> accepts will be applied
-as C<$normalization_form>.
-Acceptable names include C<'NFD'>, C<'NFC'>, C<'NFKD'>, and C<'NFKC'>.
-See C<Unicode::Normalize::normalize()> for detail.
-If omitted, C<'NFD'> is used.
-
-C<normalization> is performed after C<preprocess> (if defined).
-
-Furthermore, special values, C<undef> and C<"prenormalized">, can be used,
-though they are not concerned with C<Unicode::Normalize::normalize()>.
-
-If C<undef> (not a string C<"undef">) is passed explicitly
-as the value for this key,
-any normalization is not carried out (this may make tailoring easier
-if any normalization is not desired). Under C<(normalization =E<gt> undef)>,
-only contiguous contractions are resolved;
-e.g. even if C<A-ring> (and C<A-ring-cedilla>) is ordered after C<Z>,
-C<A-cedilla-ring> would be primary equal to C<A>.
-In this point,
-C<(normalization =E<gt> undef, preprocess =E<gt> sub { NFD(shift) })>
-B<is not> equivalent to C<(normalization =E<gt> 'NFD')>.
-
-In the case of C<(normalization =E<gt> "prenormalized")>,
-any normalization is not performed, but
-non-contiguous contractions with combining characters are performed.
-Therefore
-C<(normalization =E<gt> 'prenormalized', preprocess =E<gt> sub { NFD(shift) })>
-B<is> equivalent to C<(normalization =E<gt> 'NFD')>.
-If source strings are finely prenormalized,
-C<(normalization =E<gt> 'prenormalized')> may save time for normalization.
-
-Except C<(normalization =E<gt> undef)>,
-B<Unicode::Normalize> is required (see also B<CAVEAT>).
-
-=item overrideCJK
-
--- see 7.1 Derived Collation Elements, UTS #10.
-
-By default, CJK Unified Ideographs are ordered in Unicode codepoint order
-but C<CJK Unified Ideographs> (if C<UCA_Version> is 8 to 11, its range is
-C<U+4E00..U+9FA5>; if C<UCA_Version> is 14, its range is C<U+4E00..U+9FBB>)
-are lesser than C<CJK Unified Ideographs Extension> (its range is
-C<U+3400..U+4DB5> and C<U+20000..U+2A6D6>).
-
-Through C<overrideCJK>, ordering of CJK Unified Ideographs can be overrided.
-
-ex. CJK Unified Ideographs in the JIS code point order.
-
- overrideCJK => sub {
- my $u = shift; # get a Unicode codepoint
- my $b = pack('n', $u); # to UTF-16BE
- my $s = your_unicode_to_sjis_converter($b); # convert
- my $n = unpack('n', $s); # convert sjis to short
- [ $n, 0x20, 0x2, $u ]; # return the collation element
- },
-
-ex. ignores all CJK Unified Ideographs.
-
- overrideCJK => sub {()}, # CODEREF returning empty list
-
- # where ->eq("Pe\x{4E00}rl", "Perl") is true
- # as U+4E00 is a CJK Unified Ideograph and to be ignorable.
-
-If C<undef> is passed explicitly as the value for this key,
-weights for CJK Unified Ideographs are treated as undefined.
-But assignment of weight for CJK Unified Ideographs
-in table or C<entry> is still valid.
-
-=item overrideHangul
-
--- see 7.1 Derived Collation Elements, UTS #10.
-
-By default, Hangul Syllables are decomposed into Hangul Jamo,
-even if C<(normalization =E<gt> undef)>.
-But the mapping of Hangul Syllables may be overrided.
-
-This parameter works like C<overrideCJK>, so see there for examples.
-
-If you want to override the mapping of Hangul Syllables,
-NFD, NFKD, and FCD are not appropriate,
-since they will decompose Hangul Syllables before overriding.
-
-If C<undef> is passed explicitly as the value for this key,
-weight for Hangul Syllables is treated as undefined
-without decomposition into Hangul Jamo.
-But definition of weight for Hangul Syllables
-in table or C<entry> is still valid.
-
-=item preprocess
-
--- see 5.1 Preprocessing, UTS #10.
-
-If specified, the coderef is used to preprocess
-before the formation of sort keys.
-
-ex. dropping English articles, such as "a" or "the".
-Then, "the pen" is before "a pencil".
-
- preprocess => sub {
- my $str = shift;
- $str =~ s/\b(?:an?|the)\s+//gi;
- return $str;
- },
-
-C<preprocess> is performed before C<normalization> (if defined).
-
-=item rearrange
-
--- see 3.1.3 Rearrangement, UTS #10.
-
-Characters that are not coded in logical order and to be rearranged.
-If C<UCA_Version> is equal to or lesser than 11, default is:
-
- rearrange => [ 0x0E40..0x0E44, 0x0EC0..0x0EC4 ],
-
-If you want to disallow any rearrangement, pass C<undef> or C<[]>
-(a reference to empty list) as the value for this key.
-
-If C<UCA_Version> is equal to 14, default is C<[]> (i.e. no rearrangement).
-
-B<According to the version 9 of UCA, this parameter shall not be used;
-but it is not warned at present.>
-
-=item table
-
--- see 3.2 Default Unicode Collation Element Table, UTS #10.
-
-You can use another collation element table if desired.
-
-The table file should locate in the F<Unicode/Collate> directory
-on C<@INC>. Say, if the filename is F<Foo.txt>,
-the table file is searched as F<Unicode/Collate/Foo.txt> in C<@INC>.
-
-By default, F<allkeys.txt> (as the filename of DUCET) is used.
-If you will prepare your own table file, any name other than F<allkeys.txt>
-may be better to avoid namespace conflict.
-
-If C<undef> is passed explicitly as the value for this key,
-no file is read (but you can define collation elements via C<entry>).
-
-A typical way to define a collation element table
-without any file of table:
-
- $onlyABC = Unicode::Collate->new(
- table => undef,
- entry => << 'ENTRIES',
-0061 ; [.0101.0020.0002.0061] # LATIN SMALL LETTER A
-0041 ; [.0101.0020.0008.0041] # LATIN CAPITAL LETTER A
-0062 ; [.0102.0020.0002.0062] # LATIN SMALL LETTER B
-0042 ; [.0102.0020.0008.0042] # LATIN CAPITAL LETTER B
-0063 ; [.0103.0020.0002.0063] # LATIN SMALL LETTER C
-0043 ; [.0103.0020.0008.0043] # LATIN CAPITAL LETTER C
-ENTRIES
- );
-
-If C<ignoreName> or C<undefName> is used, character names should be
-specified as a comment (following C<#>) on each line.
-
-=item undefChar
-
-=item undefName
-
--- see 6.3.4 Reducing the Repertoire, UTS #10.
-
-Undefines the collation element as if it were unassigned in the table.
-This reduces the size of the table.
-If an unassigned character appears in the string to be collated,
-the sort key is made from its codepoint
-as a single-character collation element,
-as it is greater than any other assigned collation elements
-(in the codepoint order among the unassigned characters).
-But, it'd be better to ignore characters
-unfamiliar to you and maybe never used.
-
-Through C<undefChar>, any character matching C<qr/$undefChar/>
-will be undefined. Through C<undefName>, any character whose name
-(given in the C<table> file as a comment) matches C<qr/$undefName/>
-will be undefined.
-
-ex. Collation weights for beyond-BMP characters are not stored in object:
-
- undefChar => qr/[^\0-\x{fffd}]/,
-
-=item upper_before_lower
-
--- see 6.6 Case Comparisons, UTS #10.
-
-By default, lowercase is before uppercase.
-If the parameter is made true, this is reversed.
-
-B<NOTE>: This parameter simplemindedly assumes that any lowercase/uppercase
-distinctions must occur in level 3, and their weights at level 3 must be
-same as those mentioned in 7.3.1, UTS #10.
-If you define your collation elements which differs from this requirement,
-this parameter doesn't work validly.
-
-=item variable
-
--- see 3.2.2 Variable Weighting, UTS #10.
-
-This key allows to variable weighting for variable collation elements,
-which are marked with an ASTERISK in the table
-(NOTE: Many punction marks and symbols are variable in F<allkeys.txt>).
-
- variable => 'blanked', 'non-ignorable', 'shifted', or 'shift-trimmed'.
-
-These names are case-insensitive.
-By default (if specification is omitted), 'shifted' is adopted.
-
- 'Blanked' Variable elements are made ignorable at levels 1 through 3;
- considered at the 4th level.
-
- 'Non-Ignorable' Variable elements are not reset to ignorable.
-
- 'Shifted' Variable elements are made ignorable at levels 1 through 3
- their level 4 weight is replaced by the old level 1 weight.
- Level 4 weight for Non-Variable elements is 0xFFFF.
-
- 'Shift-Trimmed' Same as 'shifted', but all FFFF's at the 4th level
- are trimmed.
-
-=back
-
-=head2 Methods for Collation
-
-=over 4
-
-=item C<@sorted = $Collator-E<gt>sort(@not_sorted)>
-
-Sorts a list of strings.
-
-=item C<$result = $Collator-E<gt>cmp($a, $b)>
-
-Returns 1 (when C<$a> is greater than C<$b>)
-or 0 (when C<$a> is equal to C<$b>)
-or -1 (when C<$a> is lesser than C<$b>).
-
-=item C<$result = $Collator-E<gt>eq($a, $b)>
-
-=item C<$result = $Collator-E<gt>ne($a, $b)>
-
-=item C<$result = $Collator-E<gt>lt($a, $b)>
-
-=item C<$result = $Collator-E<gt>le($a, $b)>
-
-=item C<$result = $Collator-E<gt>gt($a, $b)>
-
-=item C<$result = $Collator-E<gt>ge($a, $b)>
-
-They works like the same name operators as theirs.
-
- eq : whether $a is equal to $b.
- ne : whether $a is not equal to $b.
- lt : whether $a is lesser than $b.
- le : whether $a is lesser than $b or equal to $b.
- gt : whether $a is greater than $b.
- ge : whether $a is greater than $b or equal to $b.
-
-=item C<$sortKey = $Collator-E<gt>getSortKey($string)>
-
--- see 4.3 Form Sort Key, UTS #10.
-
-Returns a sort key.
-
-You compare the sort keys using a binary comparison
-and get the result of the comparison of the strings using UCA.
-
- $Collator->getSortKey($a) cmp $Collator->getSortKey($b)
-
- is equivalent to
-
- $Collator->cmp($a, $b)
-
-=item C<$sortKeyForm = $Collator-E<gt>viewSortKey($string)>
-
-Converts a sorting key into its representation form.
-If C<UCA_Version> is 8, the output is slightly different.
-
- use Unicode::Collate;
- my $c = Unicode::Collate->new();
- print $c->viewSortKey("Perl"),"\n";
-
- # output:
- # [0B67 0A65 0B7F 0B03 | 0020 0020 0020 0020 | 0008 0002 0002 0002 | FFFF FFFF FFFF FFFF]
- # Level 1 Level 2 Level 3 Level 4
-
-=back
-
-=head2 Methods for Searching
-
-B<DISCLAIMER:> If C<preprocess> or C<normalization> parameter is true
-for C<$Collator>, calling these methods (C<index>, C<match>, C<gmatch>,
-C<subst>, C<gsubst>) is croaked,
-as the position and the length might differ
-from those on the specified string.
-(And C<rearrange> and C<hangul_terminator> parameters are neglected.)
-
-The C<match>, C<gmatch>, C<subst>, C<gsubst> methods work
-like C<m//>, C<m//g>, C<s///>, C<s///g>, respectively,
-but they are not aware of any pattern, but only a literal substring.
-
-=over 4
-
-=item C<$position = $Collator-E<gt>index($string, $substring[, $position])>
-
-=item C<($position, $length) = $Collator-E<gt>index($string, $substring[, $position])>
-
-If C<$substring> matches a part of C<$string>, returns
-the position of the first occurrence of the matching part in scalar context;
-in list context, returns a two-element list of
-the position and the length of the matching part.
-
-If C<$substring> does not match any part of C<$string>,
-returns C<-1> in scalar context and
-an empty list in list context.
-
-e.g. you say
-
- my $Collator = Unicode::Collate->new( normalization => undef, level => 1 );
- # (normalization => undef) is REQUIRED.
- my $str = "Ich mu\xDF studieren Perl.";
- my $sub = "M\xDCSS";
- my $match;
- if (my($pos,$len) = $Collator->index($str, $sub)) {
- $match = substr($str, $pos, $len);
- }
-
-and get C<"mu\xDF"> in C<$match> since C<"mu\xDF">
-is primary equal to C<"M\xDCSS">.
-
-=item C<$match_ref = $Collator-E<gt>match($string, $substring)>
-
-=item C<($match) = $Collator-E<gt>match($string, $substring)>
-
-If C<$substring> matches a part of C<$string>, in scalar context, returns
-B<a reference to> the first occurrence of the matching part
-(C<$match_ref> is always true if matches,
-since every reference is B<true>);
-in list context, returns the first occurrence of the matching part.
-
-If C<$substring> does not match any part of C<$string>,
-returns C<undef> in scalar context and
-an empty list in list context.
-
-e.g.
-
- if ($match_ref = $Collator->match($str, $sub)) { # scalar context
- print "matches [$$match_ref].\n";
- } else {
- print "doesn't match.\n";
- }
-
- or
-
- if (($match) = $Collator->match($str, $sub)) { # list context
- print "matches [$match].\n";
- } else {
- print "doesn't match.\n";
- }
-
-=item C<@match = $Collator-E<gt>gmatch($string, $substring)>
-
-If C<$substring> matches a part of C<$string>, returns
-all the matching parts (or matching count in scalar context).
-
-If C<$substring> does not match any part of C<$string>,
-returns an empty list.
-
-=item C<$count = $Collator-E<gt>subst($string, $substring, $replacement)>
-
-If C<$substring> matches a part of C<$string>,
-the first occurrence of the matching part is replaced by C<$replacement>
-(C<$string> is modified) and return C<$count> (always equals to C<1>).
-
-C<$replacement> can be a C<CODEREF>,
-taking the matching part as an argument,
-and returning a string to replace the matching part
-(a bit similar to C<s/(..)/$coderef-E<gt>($1)/e>).
-
-=item C<$count = $Collator-E<gt>gsubst($string, $substring, $replacement)>
-
-If C<$substring> matches a part of C<$string>,
-all the occurrences of the matching part is replaced by C<$replacement>
-(C<$string> is modified) and return C<$count>.
-
-C<$replacement> can be a C<CODEREF>,
-taking the matching part as an argument,
-and returning a string to replace the matching part
-(a bit similar to C<s/(..)/$coderef-E<gt>($1)/eg>).
-
-e.g.
-
- my $Collator = Unicode::Collate->new( normalization => undef, level => 1 );
- # (normalization => undef) is REQUIRED.
- my $str = "Camel donkey zebra came\x{301}l CAMEL horse cAm\0E\0L...";
- $Collator->gsubst($str, "camel", sub { "<b>$_[0]</b>" });
-
- # now $str is "<b>Camel</b> donkey zebra <b>came\x{301}l</b> <b>CAMEL</b> horse <b>cAm\0E\0L</b>...";
- # i.e., all the camels are made bold-faced.
-
-=back
-
-=head2 Other Methods
-
-=over 4
-
-=item C<%old_tailoring = $Collator-E<gt>change(%new_tailoring)>
-
-Change the value of specified keys and returns the changed part.
-
- $Collator = Unicode::Collate->new(level => 4);
-
- $Collator->eq("perl", "PERL"); # false
-
- %old = $Collator->change(level => 2); # returns (level => 4).
-
- $Collator->eq("perl", "PERL"); # true
-
- $Collator->change(%old); # returns (level => 2).
-
- $Collator->eq("perl", "PERL"); # false
-
-Not all C<(key,value)>s are allowed to be changed.
-See also C<@Unicode::Collate::ChangeOK> and C<@Unicode::Collate::ChangeNG>.
-
-In the scalar context, returns the modified collator
-(but it is B<not> a clone from the original).
-
- $Collator->change(level => 2)->eq("perl", "PERL"); # true
-
- $Collator->eq("perl", "PERL"); # true; now max level is 2nd.
-
- $Collator->change(level => 4)->eq("perl", "PERL"); # false
-
-=item C<$version = $Collator-E<gt>version()>
-
-Returns the version number (a string) of the Unicode Standard
-which the C<table> file used by the collator object is based on.
-If the table does not include a version line (starting with C<@version>),
-returns C<"unknown">.
-
-=item C<UCA_Version()>
-
-Returns the tracking version number of UTS #10 this module consults.
-
-=item C<Base_Unicode_Version()>
-
-Returns the version number of UTS #10 this module consults.
-
-=back
-
-=head1 EXPORT
-
-No method will be exported.
-
-=head1 INSTALL
-
-Though this module can be used without any C<table> file,
-to use this module easily, it is recommended to install a table file
-in the UCA format, by copying it under the directory
-<a place in @INC>/Unicode/Collate.
-
-The most preferable one is "The Default Unicode Collation Element Table"
-(aka DUCET), available from the Unicode Consortium's website:
-
- http://www.unicode.org/Public/UCA/
-
- http://www.unicode.org/Public/UCA/latest/allkeys.txt (latest version)
-
-If DUCET is not installed, it is recommended to copy the file
-from http://www.unicode.org/Public/UCA/latest/allkeys.txt
-to <a place in @INC>/Unicode/Collate/allkeys.txt
-manually.
-
-=head1 CAVEATS
-
-=over 4
-
-=item Normalization
-
-Use of the C<normalization> parameter requires the B<Unicode::Normalize>
-module (see L<Unicode::Normalize>).
-
-If you need not it (say, in the case when you need not
-handle any combining characters),
-assign C<normalization =E<gt> undef> explicitly.
-
--- see 6.5 Avoiding Normalization, UTS #10.
-
-=item Conformance Test
-
-The Conformance Test for the UCA is available
-under L<http://www.unicode.org/Public/UCA/>.
-
-For F<CollationTest_SHIFTED.txt>,
-a collator via C<Unicode::Collate-E<gt>new( )> should be used;
-for F<CollationTest_NON_IGNORABLE.txt>, a collator via
-C<Unicode::Collate-E<gt>new(variable =E<gt> "non-ignorable", level =E<gt> 3)>.
-
-B<Unicode::Normalize is required to try The Conformance Test.>
-
-=back
-
-=head1 AUTHOR, COPYRIGHT AND LICENSE
-
-The Unicode::Collate module for perl was written by SADAHIRO Tomoyuki,
-<SADAHIRO at cpan.org>. This module is Copyright(C) 2001-2005,
-SADAHIRO Tomoyuki. Japan. All rights reserved.
-
-This module is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
-
-The file Unicode/Collate/allkeys.txt was copied directly
-from L<http://www.unicode.org/Public/UCA/4.1.0/allkeys.txt>.
-This file is Copyright (c) 1991-2005 Unicode, Inc. All rights reserved.
-Distributed under the Terms of Use in L<http://www.unicode.org/copyright.html>.
-
-=head1 SEE ALSO
-
-=over 4
-
-=item Unicode Collation Algorithm - UTS #10
-
-L<http://www.unicode.org/reports/tr10/>
-
-=item The Default Unicode Collation Element Table (DUCET)
-
-L<http://www.unicode.org/Public/UCA/latest/allkeys.txt>
-
-=item The conformance test for the UCA
-
-L<http://www.unicode.org/Public/UCA/latest/CollationTest.html>
-
-L<http://www.unicode.org/Public/UCA/latest/CollationTest.zip>
-
-=item Hangul Syllable Type
-
-L<http://www.unicode.org/Public/UNIDATA/HangulSyllableType.txt>
-
-=item Unicode Normalization Forms - UAX #15
-
-L<http://www.unicode.org/reports/tr15/>
-
-=back
-
-=cut
Deleted: vendor/perl/dist/lib/abbrev.pl
===================================================================
--- vendor/perl/dist/lib/abbrev.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/abbrev.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,46 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-;# Usage:
-;# %foo = ();
-;# &abbrev(*foo,LIST);
-;# ...
-;# $long = $foo{$short};
-
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: Text::Abbrev
-#
-
-package abbrev;
-
-sub main'abbrev {
- local(*domain) = @_;
- shift(@_);
- @cmp = @_;
- foreach $name (@_) {
- @extra = split(//,$name);
- $abbrev = shift(@extra);
- $len = 1;
- foreach $cmp (@cmp) {
- next if $cmp eq $name;
- while (@extra && substr($cmp,0,$len) eq $abbrev) {
- $abbrev .= shift(@extra);
- ++$len;
- }
- }
- $domain{$abbrev} = $name;
- while ($#extra >= 0) {
- $abbrev .= shift(@extra);
- $domain{$abbrev} = $name;
- }
- }
-}
-
-1;
Deleted: vendor/perl/dist/lib/assert.pl
===================================================================
--- vendor/perl/dist/lib/assert.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/assert.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,63 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# assert.pl
-# tchrist at convex.com (Tom Christiansen)
-#
-# Usage:
-#
-# &assert('@x > @y');
-# &assert('$var > 10', $var, $othervar, @various_info);
-#
-# That is, if the first expression evals false, we blow up. The
-# rest of the args, if any, are nice to know because they will
-# be printed out by &panic, which is just the stack-backtrace
-# routine shamelessly borrowed from the perl debugger.
-
-sub assert {
- &panic("ASSERTION BOTCHED: $_[0]",$@) unless eval $_[0];
-}
-
-sub panic {
- package DB;
-
- select(STDERR);
-
- print "\npanic: @_\n";
-
- exit 1 if $] <= 4.003; # caller broken
-
- # stack traceback gratefully borrowed from perl debugger
-
- local $_;
- my $i;
- my ($p,$f,$l,$s,$h,$a, at a, at frames);
- for ($i = 0; ($p,$f,$l,$s,$h,$w) = caller($i); $i++) {
- @a = @args;
- for (@a) {
- if (/^StB\000/ && length($_) == length($_main{'_main'})) {
- $_ = sprintf("%s",$_);
- }
- else {
- s/'/\\'/g;
- s/([^\0]*)/'$1'/ unless /^-?[\d.]+$/;
- s/([\200-\377])/sprintf("M-%c",ord($1)&0177)/eg;
- s/([\0-\37\177])/sprintf("^%c",ord($1)^64)/eg;
- }
- }
- $w = $w ? '@ = ' : '$ = ';
- $a = $h ? '(' . join(', ', @a) . ')' : '';
- push(@frames, "$w&$s$a from file $f line $l\n");
- }
- for ($i=0; $i <= $#frames; $i++) {
- print $frames[$i];
- }
- exit 1;
-}
-
-1;
Deleted: vendor/perl/dist/lib/attributes.pm
===================================================================
--- vendor/perl/dist/lib/attributes.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/attributes.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,495 +0,0 @@
-package attributes;
-
-our $VERSION = 0.09;
-
- at EXPORT_OK = qw(get reftype);
- at EXPORT = ();
-%EXPORT_TAGS = (ALL => [@EXPORT, @EXPORT_OK]);
-
-use strict;
-
-sub croak {
- require Carp;
- goto &Carp::croak;
-}
-
-sub carp {
- require Carp;
- goto &Carp::carp;
-}
-
-## forward declaration(s) rather than wrapping the bootstrap call in BEGIN{}
-#sub reftype ($) ;
-#sub _fetch_attrs ($) ;
-#sub _guess_stash ($) ;
-#sub _modify_attrs ;
-#
-# The extra trips through newATTRSUB in the interpreter wipe out any savings
-# from avoiding the BEGIN block. Just do the bootstrap now.
-BEGIN { bootstrap attributes }
-
-sub import {
- @_ > 2 && ref $_[2] or do {
- require Exporter;
- goto &Exporter::import;
- };
- my (undef,$home_stash,$svref, at attrs) = @_;
-
- my $svtype = uc reftype($svref);
- my $pkgmeth;
- $pkgmeth = UNIVERSAL::can($home_stash, "MODIFY_${svtype}_ATTRIBUTES")
- if defined $home_stash && $home_stash ne '';
- my @badattrs;
- if ($pkgmeth) {
- my @pkgattrs = _modify_attrs($svref, @attrs);
- @badattrs = $pkgmeth->($home_stash, $svref, @pkgattrs);
- if (!@badattrs && @pkgattrs) {
- require warnings;
- return unless warnings::enabled('reserved');
- @pkgattrs = grep { m/\A[[:lower:]]+(?:\z|\()/ } @pkgattrs;
- if (@pkgattrs) {
- for my $attr (@pkgattrs) {
- $attr =~ s/\(.+\z//s;
- }
- my $s = ((@pkgattrs == 1) ? '' : 's');
- carp "$svtype package attribute$s " .
- "may clash with future reserved word$s: " .
- join(' : ' , @pkgattrs);
- }
- }
- }
- else {
- @badattrs = _modify_attrs($svref, @attrs);
- }
- if (@badattrs) {
- croak "Invalid $svtype attribute" .
- (( @badattrs == 1 ) ? '' : 's') .
- ": " .
- join(' : ', @badattrs);
- }
-}
-
-sub get ($) {
- @_ == 1 && ref $_[0] or
- croak 'Usage: '.__PACKAGE__.'::get $ref';
- my $svref = shift;
- my $svtype = uc reftype $svref;
- my $stash = _guess_stash $svref;
- $stash = caller unless defined $stash;
- my $pkgmeth;
- $pkgmeth = UNIVERSAL::can($stash, "FETCH_${svtype}_ATTRIBUTES")
- if defined $stash && $stash ne '';
- return $pkgmeth ?
- (_fetch_attrs($svref), $pkgmeth->($stash, $svref)) :
- (_fetch_attrs($svref))
- ;
-}
-
-sub require_version { goto &UNIVERSAL::VERSION }
-
-1;
-__END__
-#The POD goes here
-
-=head1 NAME
-
-attributes - get/set subroutine or variable attributes
-
-=head1 SYNOPSIS
-
- sub foo : method ;
- my ($x, at y,%z) : Bent = 1;
- my $s = sub : method { ... };
-
- use attributes (); # optional, to get subroutine declarations
- my @attrlist = attributes::get(\&foo);
-
- use attributes 'get'; # import the attributes::get subroutine
- my @attrlist = get \&foo;
-
-=head1 DESCRIPTION
-
-Subroutine declarations and definitions may optionally have attribute lists
-associated with them. (Variable C<my> declarations also may, but see the
-warning below.) Perl handles these declarations by passing some information
-about the call site and the thing being declared along with the attribute
-list to this module. In particular, the first example above is equivalent to
-the following:
-
- use attributes __PACKAGE__, \&foo, 'method';
-
-The second example in the synopsis does something equivalent to this:
-
- use attributes ();
- my ($x, at y,%z);
- attributes::->import(__PACKAGE__, \$x, 'Bent');
- attributes::->import(__PACKAGE__, \@y, 'Bent');
- attributes::->import(__PACKAGE__, \%z, 'Bent');
- ($x, at y,%z) = 1;
-
-Yes, that's a lot of expansion.
-
-B<WARNING>: attribute declarations for variables are still evolving.
-The semantics and interfaces of such declarations could change in
-future versions. They are present for purposes of experimentation
-with what the semantics ought to be. Do not rely on the current
-implementation of this feature.
-
-There are only a few attributes currently handled by Perl itself (or
-directly by this module, depending on how you look at it.) However,
-package-specific attributes are allowed by an extension mechanism.
-(See L<"Package-specific Attribute Handling"> below.)
-
-The setting of subroutine attributes happens at compile time.
-Variable attributes in C<our> declarations are also applied at compile time.
-However, C<my> variables get their attributes applied at run-time.
-This means that you have to I<reach> the run-time component of the C<my>
-before those attributes will get applied. For example:
-
- my $x : Bent = 42 if 0;
-
-will neither assign 42 to $x I<nor> will it apply the C<Bent> attribute
-to the variable.
-
-An attempt to set an unrecognized attribute is a fatal error. (The
-error is trappable, but it still stops the compilation within that
-C<eval>.) Setting an attribute with a name that's all lowercase
-letters that's not a built-in attribute (such as "foo") will result in
-a warning with B<-w> or C<use warnings 'reserved'>.
-
-=head2 What C<import> does
-
-In the description it is mentioned that
-
- sub foo : method;
-
-is equivalent to
-
- use attributes __PACKAGE__, \&foo, 'method';
-
-As you might know this calls the C<import> function of C<attributes> at compile
-time with these parameters: 'attributes', the caller's package name, the reference
-to the code and 'method'.
-
- attributes->import( __PACKAGE__, \&foo, 'method' );
-
-So you want to know what C<import> actually does?
-
-First of all C<import> gets the type of the third parameter ('CODE' in this case).
-C<attributes.pm> checks if there is a subroutine called C<< MODIFY_<reftype>_ATTRIBUTES >>
-in the caller's namespace (here: 'main'). In this case a subroutine C<MODIFY_CODE_ATTRIBUTES> is
-required. Then this method is called to check if you have used a "bad attribute".
-The subroutine call in this example would look like
-
- MODIFY_CODE_ATTRIBUTES( 'main', \&foo, 'method' );
-
-C<< MODIFY_<reftype>_ATTRIBUTES >> has to return a list of all "bad attributes".
-If there are any bad attributes C<import> croaks.
-
-(See L<"Package-specific Attribute Handling"> below.)
-
-=head2 Built-in Attributes
-
-The following are the built-in attributes for subroutines:
-
-=over 4
-
-=item locked
-
-B<5.005 threads only! The use of the "locked" attribute currently
-only makes sense if you are using the deprecated "Perl 5.005 threads"
-implementation of threads.>
-
-Setting this attribute is only meaningful when the subroutine or
-method is to be called by multiple threads. When set on a method
-subroutine (i.e., one marked with the B<method> attribute below),
-Perl ensures that any invocation of it implicitly locks its first
-argument before execution. When set on a non-method subroutine,
-Perl ensures that a lock is taken on the subroutine itself before
-execution. The semantics of the lock are exactly those of one
-explicitly taken with the C<lock> operator immediately after the
-subroutine is entered.
-
-=item method
-
-Indicates that the referenced subroutine is a method.
-This has a meaning when taken together with the B<locked> attribute,
-as described there. It also means that a subroutine so marked
-will not trigger the "Ambiguous call resolved as CORE::%s" warning.
-
-=item lvalue
-
-Indicates that the referenced subroutine is a valid lvalue and can
-be assigned to. The subroutine must return a modifiable value such
-as a scalar variable, as described in L<perlsub>.
-
-=back
-
-For global variables there is C<unique> attribute: see L<perlfunc/our>.
-
-=head2 Available Subroutines
-
-The following subroutines are available for general use once this module
-has been loaded:
-
-=over 4
-
-=item get
-
-This routine expects a single parameter--a reference to a
-subroutine or variable. It returns a list of attributes, which may be
-empty. If passed invalid arguments, it uses die() (via L<Carp::croak|Carp>)
-to raise a fatal exception. If it can find an appropriate package name
-for a class method lookup, it will include the results from a
-C<FETCH_I<type>_ATTRIBUTES> call in its return list, as described in
-L<"Package-specific Attribute Handling"> below.
-Otherwise, only L<built-in attributes|"Built-in Attributes"> will be returned.
-
-=item reftype
-
-This routine expects a single parameter--a reference to a subroutine or
-variable. It returns the built-in type of the referenced variable,
-ignoring any package into which it might have been blessed.
-This can be useful for determining the I<type> value which forms part of
-the method names described in L<"Package-specific Attribute Handling"> below.
-
-=back
-
-Note that these routines are I<not> exported by default.
-
-=head2 Package-specific Attribute Handling
-
-B<WARNING>: the mechanisms described here are still experimental. Do not
-rely on the current implementation. In particular, there is no provision
-for applying package attributes to 'cloned' copies of subroutines used as
-closures. (See L<perlref/"Making References"> for information on closures.)
-Package-specific attribute handling may change incompatibly in a future
-release.
-
-When an attribute list is present in a declaration, a check is made to see
-whether an attribute 'modify' handler is present in the appropriate package
-(or its @ISA inheritance tree). Similarly, when C<attributes::get> is
-called on a valid reference, a check is made for an appropriate attribute
-'fetch' handler. See L<"EXAMPLES"> to see how the "appropriate package"
-determination works.
-
-The handler names are based on the underlying type of the variable being
-declared or of the reference passed. Because these attributes are
-associated with subroutine or variable declarations, this deliberately
-ignores any possibility of being blessed into some package. Thus, a
-subroutine declaration uses "CODE" as its I<type>, and even a blessed
-hash reference uses "HASH" as its I<type>.
-
-The class methods invoked for modifying and fetching are these:
-
-=over 4
-
-=item FETCH_I<type>_ATTRIBUTES
-
-This method is called with two arguments: the relevant package name,
-and a reference to a variable or subroutine for which package-defined
-attributes are desired. The expected return value is a list of
-associated attributes. This list may be empty.
-
-=item MODIFY_I<type>_ATTRIBUTES
-
-This method is called with two fixed arguments, followed by the list of
-attributes from the relevant declaration. The two fixed arguments are
-the relevant package name and a reference to the declared subroutine or
-variable. The expected return value is a list of attributes which were
-not recognized by this handler. Note that this allows for a derived class
-to delegate a call to its base class, and then only examine the attributes
-which the base class didn't already handle for it.
-
-The call to this method is currently made I<during> the processing of the
-declaration. In particular, this means that a subroutine reference will
-probably be for an undefined subroutine, even if this declaration is
-actually part of the definition.
-
-=back
-
-Calling C<attributes::get()> from within the scope of a null package
-declaration C<package ;> for an unblessed variable reference will
-not provide any starting package name for the 'fetch' method lookup.
-Thus, this circumstance will not result in a method call for package-defined
-attributes. A named subroutine knows to which symbol table entry it belongs
-(or originally belonged), and it will use the corresponding package.
-An anonymous subroutine knows the package name into which it was compiled
-(unless it was also compiled with a null package declaration), and so it
-will use that package name.
-
-=head2 Syntax of Attribute Lists
-
-An attribute list is a sequence of attribute specifications, separated by
-whitespace or a colon (with optional whitespace).
-Each attribute specification is a simple
-name, optionally followed by a parenthesised parameter list.
-If such a parameter list is present, it is scanned past as for the rules
-for the C<q()> operator. (See L<perlop/"Quote and Quote-like Operators">.)
-The parameter list is passed as it was found, however, and not as per C<q()>.
-
-Some examples of syntactically valid attribute lists:
-
- switch(10,foo(7,3)) : expensive
- Ugly('\(") :Bad
- _5x5
- locked method
-
-Some examples of syntactically invalid attribute lists (with annotation):
-
- switch(10,foo() # ()-string not balanced
- Ugly('(') # ()-string not balanced
- 5x5 # "5x5" not a valid identifier
- Y2::north # "Y2::north" not a simple identifier
- foo + bar # "+" neither a colon nor whitespace
-
-=head1 EXPORTS
-
-=head2 Default exports
-
-None.
-
-=head2 Available exports
-
-The routines C<get> and C<reftype> are exportable.
-
-=head2 Export tags defined
-
-The C<:ALL> tag will get all of the above exports.
-
-=head1 EXAMPLES
-
-Here are some samples of syntactically valid declarations, with annotation
-as to how they resolve internally into C<use attributes> invocations by
-perl. These examples are primarily useful to see how the "appropriate
-package" is found for the possible method lookups for package-defined
-attributes.
-
-=over 4
-
-=item 1.
-
-Code:
-
- package Canine;
- package Dog;
- my Canine $spot : Watchful ;
-
-Effect:
-
- use attributes ();
- attributes::->import(Canine => \$spot, "Watchful");
-
-=item 2.
-
-Code:
-
- package Felis;
- my $cat : Nervous;
-
-Effect:
-
- use attributes ();
- attributes::->import(Felis => \$cat, "Nervous");
-
-=item 3.
-
-Code:
-
- package X;
- sub foo : locked ;
-
-Effect:
-
- use attributes X => \&foo, "locked";
-
-=item 4.
-
-Code:
-
- package X;
- sub Y::x : locked { 1 }
-
-Effect:
-
- use attributes Y => \&Y::x, "locked";
-
-=item 5.
-
-Code:
-
- package X;
- sub foo { 1 }
-
- package Y;
- BEGIN { *bar = \&X::foo; }
-
- package Z;
- sub Y::bar : locked ;
-
-Effect:
-
- use attributes X => \&X::foo, "locked";
-
-=back
-
-This last example is purely for purposes of completeness. You should not
-be trying to mess with the attributes of something in a package that's
-not your own.
-
-=head1 MORE EXAMPLES
-
-=over 4
-
-=item 1.
-
- sub MODIFY_CODE_ATTRIBUTES {
- my ($class,$code, at attrs) = @_;
-
- my $allowed = 'MyAttribute';
- my @bad = grep { $_ ne $allowed } @attrs;
-
- return @bad;
- }
-
- sub foo : MyAttribute {
- print "foo\n";
- }
-
-This example runs. At compile time C<MODIFY_CODE_ATTRIBUTES> is called. In that
-subroutine, we check if any attribute is disallowed and we return a list of
-these "bad attributes".
-
-As we return an empty list, everything is fine.
-
-=item 2.
-
- sub MODIFY_CODE_ATTRIBUTES {
- my ($class,$code, at attrs) = @_;
-
- my $allowed = 'MyAttribute';
- my @bad = grep{ $_ ne $allowed }@attrs;
-
- return @bad;
- }
-
- sub foo : MyAttribute Test {
- print "foo\n";
- }
-
-This example is aborted at compile time as we use the attribute "Test" which
-isn't allowed. C<MODIFY_CODE_ATTRIBUTES> returns a list that contains a single
-element ('Test').
-
-=back
-
-=head1 SEE ALSO
-
-L<perlsub/"Private Variables via my()"> and
-L<perlsub/"Subroutine Attributes"> for details on the basic declarations;
-L<attrs> for the obsolescent form of subroutine attribute specification
-which this module replaces;
-L<perlfunc/use> for details on the normal invocation mechanism.
-
-=cut
-
Deleted: vendor/perl/dist/lib/autodie.pm
===================================================================
--- vendor/perl/dist/lib/autodie.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/autodie.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,424 +0,0 @@
-package autodie;
-use 5.008;
-use strict;
-use warnings;
-
-use Fatal ();
-our @ISA = qw(Fatal);
-our $VERSION;
-
-BEGIN {
- $VERSION = '2.06_01';
-}
-
-use constant ERROR_WRONG_FATAL => q{
-Incorrect version of Fatal.pm loaded by autodie.
-
-The autodie pragma uses an updated version of Fatal to do its
-heavy lifting. We seem to have loaded Fatal version %s, which is
-probably the version that came with your version of Perl. However
-autodie needs version %s, which would have come bundled with
-autodie.
-
-You may be able to solve this problem by adding the following
-line of code to your main program, before any use of Fatal or
-autodie.
-
- use lib "%s";
-
-};
-
-# We have to check we've got the right version of Fatal before we
-# try to compile the rest of our code, lest we use a constant
-# that doesn't exist.
-
-BEGIN {
-
- # If we have the wrong Fatal, then we've probably loaded the system
- # one, not our own. Complain, and give a useful hint. ;)
-
- if ($Fatal::VERSION ne $VERSION) {
- my $autodie_path = $INC{'autodie.pm'};
-
- $autodie_path =~ s/autodie\.pm//;
-
- require Carp;
-
- Carp::croak sprintf(
- ERROR_WRONG_FATAL, $Fatal::VERSION, $VERSION, $autodie_path
- );
- }
-}
-
-# When passing args to Fatal we want to keep the first arg
-# (our package) in place. Hence the splice.
-
-sub import {
- splice(@_,1,0,Fatal::LEXICAL_TAG);
- goto &Fatal::import;
-}
-
-sub unimport {
- splice(@_,1,0,Fatal::LEXICAL_TAG);
- goto &Fatal::unimport;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-autodie - Replace functions with ones that succeed or die with lexical scope
-
-=head1 SYNOPSIS
-
- use autodie; # Recommended: implies 'use autodie qw(:default)'
-
- use autodie qw(:all); # Recommended more: defaults and system/exec.
-
- use autodie qw(open close); # open/close succeed or die
-
- open(my $fh, "<", $filename); # No need to check!
-
- {
- no autodie qw(open); # open failures won't die
- open(my $fh, "<", $filename); # Could fail silently!
- no autodie; # disable all autodies
- }
-
-=head1 DESCRIPTION
-
- bIlujDI' yIchegh()Qo'; yIHegh()!
-
- It is better to die() than to return() in failure.
-
- -- Klingon programming proverb.
-
-The C<autodie> pragma provides a convenient way to replace functions
-that normally return false on failure with equivalents that throw
-an exception on failure.
-
-The C<autodie> pragma has I<lexical scope>, meaning that functions
-and subroutines altered with C<autodie> will only change their behaviour
-until the end of the enclosing block, file, or C<eval>.
-
-If C<system> is specified as an argument to C<autodie>, then it
-uses L<IPC::System::Simple> to do the heavy lifting. See the
-description of that module for more information.
-
-=head1 EXCEPTIONS
-
-Exceptions produced by the C<autodie> pragma are members of the
-L<autodie::exception> class. The preferred way to work with
-these exceptions under Perl 5.10 is as follows:
-
- use feature qw(switch);
-
- eval {
- use autodie;
-
- open(my $fh, '<', $some_file);
-
- my @records = <$fh>;
-
- # Do things with @records...
-
- close($fh);
-
- };
-
- given ($@) {
- when (undef) { say "No error"; }
- when ('open') { say "Error from open"; }
- when (':io') { say "Non-open, IO error."; }
- when (':all') { say "All other autodie errors." }
- default { say "Not an autodie error at all." }
- }
-
-Under Perl 5.8, the C<given/when> structure is not available, so the
-following structure may be used:
-
- eval {
- use autodie;
-
- open(my $fh, '<', $some_file);
-
- my @records = <$fh>;
-
- # Do things with @records...
-
- close($fh);
- };
-
- if ($@ and $@->isa('autodie::exception')) {
- if ($@->matches('open')) { print "Error from open\n"; }
- if ($@->matches(':io' )) { print "Non-open, IO error."; }
- } elsif ($@) {
- # A non-autodie exception.
- }
-
-See L<autodie::exception> for further information on interrogating
-exceptions.
-
-=head1 CATEGORIES
-
-Autodie uses a simple set of categories to group together similar
-built-ins. Requesting a category type (starting with a colon) will
-enable autodie for all built-ins beneath that category. For example,
-requesting C<:file> will enable autodie for C<close>, C<fcntl>,
-C<fileno>, C<open> and C<sysopen>.
-
-The categories are currently:
-
- :all
- :default
- :io
- read
- seek
- sysread
- sysseek
- syswrite
- :dbm
- dbmclose
- dbmopen
- :file
- binmode
- close
- fcntl
- fileno
- flock
- ioctl
- open
- sysopen
- truncate
- :filesys
- chdir
- closedir
- opendir
- link
- mkdir
- readlink
- rename
- rmdir
- symlink
- unlink
- :ipc
- pipe
- :msg
- msgctl
- msgget
- msgrcv
- msgsnd
- :semaphore
- semctl
- semget
- semop
- :shm
- shmctl
- shmget
- shmread
- :socket
- accept
- bind
- connect
- getsockopt
- listen
- recv
- send
- setsockopt
- shutdown
- socketpair
- :threads
- fork
- :system
- system
- exec
-
-
-Note that while the above category system is presently a strict
-hierarchy, this should not be assumed.
-
-A plain C<use autodie> implies C<use autodie qw(:default)>. Note that
-C<system> and C<exec> are not enabled by default. C<system> requires
-the optional L<IPC::System::Simple> module to be installed, and enabling
-C<system> or C<exec> will invalidate their exotic forms. See L</BUGS>
-below for more details.
-
-The syntax:
-
- use autodie qw(:1.994);
-
-allows the C<:default> list from a particular version to be used. This
-provides the convenience of using the default methods, but the surety
-that no behavorial changes will occur if the C<autodie> module is
-upgraded.
-
-C<autodie> can be enabled for all of Perl's built-ins, including
-C<system> and C<exec> with:
-
- use autodie qw(:all);
-
-=head1 FUNCTION SPECIFIC NOTES
-
-=head2 flock
-
-It is not considered an error for C<flock> to return false if it fails
-to an C<EWOULDBLOCK> (or equivalent) condition. This means one can
-still use the common convention of testing the return value of
-C<flock> when called with the C<LOCK_NB> option:
-
- use autodie;
-
- if ( flock($fh, LOCK_EX | LOCK_NB) ) {
- # We have a lock
- }
-
-Autodying C<flock> will generate an exception if C<flock> returns
-false with any other error.
-
-=head2 system/exec
-
-The C<system> built-in is considered to have failed in the following
-circumstances:
-
-=over 4
-
-=item *
-
-The command does not start.
-
-=item *
-
-The command is killed by a signal.
-
-=item *
-
-The command returns a non-zero exit value (but see below).
-
-=back
-
-On success, the autodying form of C<system> returns the I<exit value>
-rather than the contents of C<$?>.
-
-Additional allowable exit values can be supplied as an optional first
-argument to autodying C<system>:
-
- system( [ 0, 1, 2 ], $cmd, @args); # 0,1,2 are good exit values
-
-C<autodie> uses the L<IPC::System::Simple> module to change C<system>.
-See its documentation for further information.
-
-Applying C<autodie> to C<system> or C<exec> causes the exotic
-forms C<system { $cmd } @args > or C<exec { $cmd } @args>
-to be considered a syntax error until the end of the lexical scope.
-If you really need to use the exotic form, you can call C<CORE::system>
-or C<CORE::exec> instead, or use C<no autodie qw(system exec)> before
-calling the exotic form.
-
-=head1 GOTCHAS
-
-Functions called in list context are assumed to have failed if they
-return an empty list, or a list consisting only of a single undef
-element.
-
-=head1 DIAGNOSTICS
-
-=over 4
-
-=item :void cannot be used with lexical scope
-
-The C<:void> option is supported in L<Fatal>, but not
-C<autodie>. To workaround this, C<autodie> may be explicitly disabled until
-the end of the current block with C<no autodie>.
-To disable autodie for only a single function (eg, open)
-use C<no autodie qw(open)>.
-
-=item No user hints defined for %s
-
-You've insisted on hints for user-subroutines, either by pre-pending
-a C<!> to the subroutine name itself, or earlier in the list of arguments
-to C<autodie>. However the subroutine in question does not have
-any hints available.
-
-=back
-
-See also L<Fatal/DIAGNOSTICS>.
-
-=head1 BUGS
-
-"Used only once" warnings can be generated when C<autodie> or C<Fatal>
-is used with package filehandles (eg, C<FILE>). Scalar filehandles are
-strongly recommended instead.
-
-When using C<autodie> or C<Fatal> with user subroutines, the
-declaration of those subroutines must appear before the first use of
-C<Fatal> or C<autodie>, or have been exported from a module.
-Attempting to use C<Fatal> or C<autodie> on other user subroutines will
-result in a compile-time error.
-
-Due to a bug in Perl, C<autodie> may "lose" any format which has the
-same name as an autodying built-in or function.
-
-C<autodie> may not work correctly if used inside a file with a
-name that looks like a string eval, such as F<eval (3)>.
-
-=head2 autodie and string eval
-
-Due to the current implementation of C<autodie>, unexpected results
-may be seen when used near or with the string version of eval.
-I<None of these bugs exist when using block eval>.
-
-Under Perl 5.8 only, C<autodie> I<does not> propagate into string C<eval>
-statements, although it can be explicitly enabled inside a string
-C<eval>.
-
-Under Perl 5.10 only, using a string eval when C<autodie> is in
-effect can cause the autodie behaviour to leak into the surrounding
-scope. This can be worked around by using a C<no autodie> at the
-end of the scope to explicitly remove autodie's effects, or by
-avoiding the use of string eval.
-
-I<None of these bugs exist when using block eval>. The use of
-C<autodie> with block eval is considered good practice.
-
-=head2 REPORTING BUGS
-
-Please report bugs via the CPAN Request Tracker at
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=autodie>.
-
-=head1 FEEDBACK
-
-If you find this module useful, please consider rating it on the
-CPAN Ratings service at
-L<http://cpanratings.perl.org/rate?distribution=autodie> .
-
-The module author loves to hear how C<autodie> has made your life
-better (or worse). Feedback can be sent to
-E<lt>pjf at perltraining.com.auE<gt>.
-
-=head1 AUTHOR
-
-Copyright 2008-2009, Paul Fenwick E<lt>pjf at perltraining.com.auE<gt>
-
-=head1 LICENSE
-
-This module is free software. You may distribute it under the
-same terms as Perl itself.
-
-=head1 SEE ALSO
-
-L<Fatal>, L<autodie::exception>, L<autodie::hints>, L<IPC::System::Simple>
-
-I<Perl tips, autodie> at
-L<http://perltraining.com.au/tips/2008-08-20.html>
-
-=head1 ACKNOWLEDGEMENTS
-
-Mark Reed and Roland Giersig -- Klingon translators.
-
-See the F<AUTHORS> file for full credits. The latest version of this
-file can be found at
-L<http://github.com/pfenwick/autodie/tree/master/AUTHORS> .
-
-=cut
Deleted: vendor/perl/dist/lib/autouse.pm
===================================================================
--- vendor/perl/dist/lib/autouse.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/autouse.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,171 +0,0 @@
-package autouse;
-
-#use strict; # debugging only
-use 5.006; # use warnings
-
-$autouse::VERSION = '1.06';
-
-$autouse::DEBUG ||= 0;
-
-sub vet_import ($);
-
-sub croak {
- require Carp;
- Carp::croak(@_);
-}
-
-sub import {
- my $class = @_ ? shift : 'autouse';
- croak "usage: use $class MODULE [,SUBS...]" unless @_;
- my $module = shift;
-
- (my $pm = $module) =~ s{::}{/}g;
- $pm .= '.pm';
- if (exists $INC{$pm}) {
- vet_import $module;
- local $Exporter::ExportLevel = $Exporter::ExportLevel + 1;
- # $Exporter::Verbose = 1;
- return $module->import(map { (my $f = $_) =~ s/\(.*?\)$//; $f } @_);
- }
-
- # It is not loaded: need to do real work.
- my $callpkg = caller(0);
- print "autouse called from $callpkg\n" if $autouse::DEBUG;
-
- my $index;
- for my $f (@_) {
- my $proto;
- $proto = $1 if (my $func = $f) =~ s/\((.*)\)$//;
-
- my $closure_import_func = $func; # Full name
- my $closure_func = $func; # Name inside package
- my $index = rindex($func, '::');
- if ($index == -1) {
- $closure_import_func = "${callpkg}::$func";
- } else {
- $closure_func = substr $func, $index + 2;
- croak "autouse into different package attempted"
- unless substr($func, 0, $index) eq $module;
- }
-
- my $load_sub = sub {
- unless ($INC{$pm}) {
- require $pm;
- vet_import $module;
- }
- no warnings qw(redefine prototype);
- *$closure_import_func = \&{"${module}::$closure_func"};
- print "autousing $module; "
- ."imported $closure_func as $closure_import_func\n"
- if $autouse::DEBUG;
- goto &$closure_import_func;
- };
-
- if (defined $proto) {
- *$closure_import_func = eval "sub ($proto) { goto &\$load_sub }"
- || die;
- } else {
- *$closure_import_func = $load_sub;
- }
- }
-}
-
-sub vet_import ($) {
- my $module = shift;
- if (my $import = $module->can('import')) {
- croak "autoused module $module has unique import() method"
- unless defined(&Exporter::import)
- && ($import == \&Exporter::import ||
- $import == \&UNIVERSAL::import)
- }
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-autouse - postpone load of modules until a function is used
-
-=head1 SYNOPSIS
-
- use autouse 'Carp' => qw(carp croak);
- carp "this carp was predeclared and autoused ";
-
-=head1 DESCRIPTION
-
-If the module C<Module> is already loaded, then the declaration
-
- use autouse 'Module' => qw(func1 func2($;$));
-
-is equivalent to
-
- use Module qw(func1 func2);
-
-if C<Module> defines func2() with prototype C<($;$)>, and func1() has
-no prototypes. (At least if C<Module> uses C<Exporter>'s C<import>,
-otherwise it is a fatal error.)
-
-If the module C<Module> is not loaded yet, then the above declaration
-declares functions func1() and func2() in the current package. When
-these functions are called, they load the package C<Module> if needed,
-and substitute themselves with the correct definitions.
-
-=begin _deprecated
-
- use Module qw(Module::func3);
-
-will work and is the equivalent to:
-
- use Module qw(func3);
-
-It is not a very useful feature and has been deprecated.
-
-=end _deprecated
-
-
-=head1 WARNING
-
-Using C<autouse> will move important steps of your program's execution
-from compile time to runtime. This can
-
-=over 4
-
-=item *
-
-Break the execution of your program if the module you C<autouse>d has
-some initialization which it expects to be done early.
-
-=item *
-
-hide bugs in your code since important checks (like correctness of
-prototypes) is moved from compile time to runtime. In particular, if
-the prototype you specified on C<autouse> line is wrong, you will not
-find it out until the corresponding function is executed. This will be
-very unfortunate for functions which are not always called (note that
-for such functions C<autouse>ing gives biggest win, for a workaround
-see below).
-
-=back
-
-To alleviate the second problem (partially) it is advised to write
-your scripts like this:
-
- use Module;
- use autouse Module => qw(carp($) croak(&$));
- carp "this carp was predeclared and autoused ";
-
-The first line ensures that the errors in your argument specification
-are found early. When you ship your application you should comment
-out the first line, since it makes the second one useless.
-
-=head1 AUTHOR
-
-Ilya Zakharevich (ilya at math.ohio-state.edu)
-
-=head1 SEE ALSO
-
-perl(1).
-
-=cut
Deleted: vendor/perl/dist/lib/autouse.t
===================================================================
--- vendor/perl/dist/lib/autouse.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/autouse.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,71 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require Config;
- if (($Config::Config{'extensions'} !~ m!\bList/Util\b!) ){
- print "1..0 # Skip -- Perl configured without List::Util module\n";
- exit 0;
- }
-}
-
-use Test;
-BEGIN { plan tests => 12; }
-
-BEGIN {
- require autouse;
- eval {
- "autouse"->import('List::Util' => 'List::Util::first(&@)');
- };
- ok( !$@ );
-
- eval {
- "autouse"->import('List::Util' => 'Foo::min');
- };
- ok( $@, qr/^autouse into different package attempted/ );
-
- "autouse"->import('List::Util' => qw(max first(&@)));
-}
-
-my @a = (1,2,3,4,5.5);
-ok( max(@a), 5.5);
-
-
-# first() has a prototype of &@. Make sure that's preserved.
-ok( (first { $_ > 3 } @a), 4);
-
-
-# Example from the docs.
-use autouse 'Carp' => qw(carp croak);
-
-{
- my @warning;
- local $SIG{__WARN__} = sub { push @warning, @_ };
- carp "this carp was predeclared and autoused\n";
- ok( scalar @warning, 1 );
- ok( $warning[0], qr/^this carp was predeclared and autoused\n/ );
-
- eval { croak "It is but a scratch!" };
- ok( $@, qr/^It is but a scratch!/);
-}
-
-
-# Test that autouse's lazy module loading works.
-use autouse 'Errno' => qw(EPERM);
-
-my $mod_file = 'Errno.pm'; # just fine and portable for %INC
-ok( !exists $INC{$mod_file} );
-ok( EPERM ); # test if non-zero
-ok( exists $INC{$mod_file} );
-
-use autouse Env => "something";
-eval { something() };
-ok( $@, qr/^\Qautoused module Env has unique import() method/ );
-
-# Check that UNIVERSAL.pm doesn't interfere with modules that don't use
-# Exporter and have no import() of their own.
-require UNIVERSAL;
-autouse->import("Class::ISA" => 'self_and_super_versions');
-my %versions = self_and_super_versions("Class::ISA");
-ok( $versions{"Class::ISA"}, $Class::ISA::VERSION );
Deleted: vendor/perl/dist/lib/base.pm
===================================================================
--- vendor/perl/dist/lib/base.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/base.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,265 +0,0 @@
-package base;
-
-use strict 'vars';
-use vars qw($VERSION);
-$VERSION = '2.14';
-$VERSION = eval $VERSION;
-
-# constant.pm is slow
-sub SUCCESS () { 1 }
-
-sub PUBLIC () { 2**0 }
-sub PRIVATE () { 2**1 }
-sub INHERITED () { 2**2 }
-sub PROTECTED () { 2**3 }
-
-
-my $Fattr = \%fields::attr;
-
-sub has_fields {
- my($base) = shift;
- my $fglob = ${"$base\::"}{FIELDS};
- return( ($fglob && 'GLOB' eq ref($fglob) && *$fglob{HASH}) ? 1 : 0 );
-}
-
-sub has_version {
- my($base) = shift;
- my $vglob = ${$base.'::'}{VERSION};
- return( ($vglob && *$vglob{SCALAR}) ? 1 : 0 );
-}
-
-sub has_attr {
- my($proto) = shift;
- my($class) = ref $proto || $proto;
- return exists $Fattr->{$class};
-}
-
-sub get_attr {
- $Fattr->{$_[0]} = [1] unless $Fattr->{$_[0]};
- return $Fattr->{$_[0]};
-}
-
-if ($] < 5.009) {
- *get_fields = sub {
- # Shut up a possible typo warning.
- () = \%{$_[0].'::FIELDS'};
- my $f = \%{$_[0].'::FIELDS'};
-
- # should be centralized in fields? perhaps
- # fields::mk_FIELDS_be_OK. Peh. As long as %{ $package . '::FIELDS' }
- # is used here anyway, it doesn't matter.
- bless $f, 'pseudohash' if (ref($f) ne 'pseudohash');
-
- return $f;
- }
-}
-else {
- *get_fields = sub {
- # Shut up a possible typo warning.
- () = \%{$_[0].'::FIELDS'};
- return \%{$_[0].'::FIELDS'};
- }
-}
-
-sub import {
- my $class = shift;
-
- return SUCCESS unless @_;
-
- # List of base classes from which we will inherit %FIELDS.
- my $fields_base;
-
- my $inheritor = caller(0);
- my @isa_classes;
-
- my @bases;
- foreach my $base (@_) {
- if ( $inheritor eq $base ) {
- warn "Class '$inheritor' tried to inherit from itself\n";
- }
-
- next if grep $_->isa($base), ($inheritor, @bases);
-
- if (has_version($base)) {
- ${$base.'::VERSION'} = '-1, set by base.pm'
- unless defined ${$base.'::VERSION'};
- }
- else {
- my $sigdie;
- {
- local $SIG{__DIE__};
- eval "require $base";
- # Only ignore "Can't locate" errors from our eval require.
- # Other fatal errors (syntax etc) must be reported.
- die if $@ && $@ !~ /^Can't locate .*? at \(eval /;
- unless (%{"$base\::"}) {
- require Carp;
- local $" = " ";
- Carp::croak(<<ERROR);
-Base class package "$base" is empty.
- (Perhaps you need to 'use' the module which defines that package first,
- or make that module available in \@INC (\@INC contains: @INC).
-ERROR
- }
- $sigdie = $SIG{__DIE__} || undef;
- }
- # Make sure a global $SIG{__DIE__} makes it out of the localization.
- $SIG{__DIE__} = $sigdie if defined $sigdie;
- ${$base.'::VERSION'} = "-1, set by base.pm"
- unless defined ${$base.'::VERSION'};
- }
- push @bases, $base;
-
- if ( has_fields($base) || has_attr($base) ) {
- # No multiple fields inheritance *suck*
- if ($fields_base) {
- require Carp;
- Carp::croak("Can't multiply inherit fields");
- } else {
- $fields_base = $base;
- }
- }
- }
- # Save this until the end so it's all or nothing if the above loop croaks.
- push @{"$inheritor\::ISA"}, @isa_classes;
-
- push @{"$inheritor\::ISA"}, @bases;
-
- if( defined $fields_base ) {
- inherit_fields($inheritor, $fields_base);
- }
-}
-
-
-sub inherit_fields {
- my($derived, $base) = @_;
-
- return SUCCESS unless $base;
-
- my $battr = get_attr($base);
- my $dattr = get_attr($derived);
- my $dfields = get_fields($derived);
- my $bfields = get_fields($base);
-
- $dattr->[0] = @$battr;
-
- if( keys %$dfields ) {
- warn <<"END";
-$derived is inheriting from $base but already has its own fields!
-This will cause problems. Be sure you use base BEFORE declaring fields.
-END
-
- }
-
- # Iterate through the base's fields adding all the non-private
- # ones to the derived class. Hang on to the original attribute
- # (Public, Private, etc...) and add Inherited.
- # This is all too complicated to do efficiently with add_fields().
- while (my($k,$v) = each %$bfields) {
- my $fno;
- if ($fno = $dfields->{$k} and $fno != $v) {
- require Carp;
- Carp::croak ("Inherited fields can't override existing fields");
- }
-
- if( $battr->[$v] & PRIVATE ) {
- $dattr->[$v] = PRIVATE | INHERITED;
- }
- else {
- $dattr->[$v] = INHERITED | $battr->[$v];
- $dfields->{$k} = $v;
- }
- }
-
- foreach my $idx (1..$#{$battr}) {
- next if defined $dattr->[$idx];
- $dattr->[$idx] = $battr->[$idx] & INHERITED;
- }
-}
-
-
-1;
-
-__END__
-
-=head1 NAME
-
-base - Establish an ISA relationship with base classes at compile time
-
-=head1 SYNOPSIS
-
- package Baz;
- use base qw(Foo Bar);
-
-=head1 DESCRIPTION
-
-Unless you are using the C<fields> pragma, consider this module discouraged
-in favor of the lighter-weight C<parent>.
-
-Allows you to both load one or more modules, while setting up inheritance from
-those modules at the same time. Roughly similar in effect to
-
- package Baz;
- BEGIN {
- require Foo;
- require Bar;
- push @ISA, qw(Foo Bar);
- }
-
-C<base> employs some heuristics to determine if a module has already been
-loaded, if it has it doesn't try again. If C<base> tries to C<require> the
-module it will not die if it cannot find the module's file, but will die on any
-other error. After all this, should your base class be empty, containing no
-symbols, it will die. This is useful for inheriting from classes in the same
-file as yourself, like so:
-
- package Foo;
- sub exclaim { "I can have such a thing?!" }
-
- package Bar;
- use base "Foo";
-
-If $VERSION is not detected even after loading it, <base> will define $VERSION
-in the base package, setting it to the string C<-1, set by base.pm>.
-
-C<base> will also initialize the fields if one of the base classes has it.
-Multiple inheritance of fields is B<NOT> supported, if two or more base classes
-each have inheritable fields the 'base' pragma will croak. See L<fields>,
-L<public> and L<protected> for a description of this feature.
-
-The base class' C<import> method is B<not> called.
-
-
-=head1 DIAGNOSTICS
-
-=over 4
-
-=item Base class package "%s" is empty.
-
-base.pm was unable to require the base package, because it was not
-found in your path.
-
-=item Class 'Foo' tried to inherit from itself
-
-Attempting to inherit from yourself generates a warning.
-
- use Foo;
- use base 'Foo';
-
-=back
-
-=head1 HISTORY
-
-This module was introduced with Perl 5.004_04.
-
-=head1 CAVEATS
-
-Due to the limitations of the implementation, you must use
-base I<before> you declare any of your own fields.
-
-
-=head1 SEE ALSO
-
-L<fields>
-
-=cut
Deleted: vendor/perl/dist/lib/bigfloat.pl
===================================================================
--- vendor/perl/dist/lib/bigfloat.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/bigfloat.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,258 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-package bigfloat;
-require "bigint.pl";
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: Math::BigFloat
-
-# Arbitrary length float math package
-#
-# by Mark Biggar
-#
-# number format
-# canonical strings have the form /[+-]\d+E[+-]\d+/
-# Input values can have embedded whitespace
-# Error returns
-# 'NaN' An input parameter was "Not a Number" or
-# divide by zero or sqrt of negative number
-# Division is computed to
-# max($div_scale,length(dividend)+length(divisor))
-# digits by default.
-# Also used for default sqrt scale
-
-$div_scale = 40;
-
-# Rounding modes one of 'even', 'odd', '+inf', '-inf', 'zero' or 'trunc'.
-
-$rnd_mode = 'even';
-
-# bigfloat routines
-#
-# fadd(NSTR, NSTR) return NSTR addition
-# fsub(NSTR, NSTR) return NSTR subtraction
-# fmul(NSTR, NSTR) return NSTR multiplication
-# fdiv(NSTR, NSTR[,SCALE]) returns NSTR division to SCALE places
-# fneg(NSTR) return NSTR negation
-# fabs(NSTR) return NSTR absolute value
-# fcmp(NSTR,NSTR) return CODE compare undef,<0,=0,>0
-# fround(NSTR, SCALE) return NSTR round to SCALE digits
-# ffround(NSTR, SCALE) return NSTR round at SCALEth place
-# fnorm(NSTR) return (NSTR) normalize
-# fsqrt(NSTR[, SCALE]) return NSTR sqrt to SCALE places
-
-# Convert a number to canonical string form.
-# Takes something that looks like a number and converts it to
-# the form /^[+-]\d+E[+-]\d+$/.
-sub main'fnorm { #(string) return fnum_str
- local($_) = @_;
- s/\s+//g; # strip white space
- if (/^([+-]?)(\d*)(\.(\d*))?([Ee]([+-]?\d+))?$/
- && ($2 ne '' || defined($4))) {
- my $x = defined($4) ? $4 : '';
- &norm(($1 ? "$1$2$x" : "+$2$x"), (($x ne '') ? $6-length($x) : $6));
- } else {
- 'NaN';
- }
-}
-
-# normalize number -- for internal use
-sub norm { #(mantissa, exponent) return fnum_str
- local($_, $exp) = @_;
- if ($_ eq 'NaN') {
- 'NaN';
- } else {
- s/^([+-])0+/$1/; # strip leading zeros
- if (length($_) == 1) {
- '+0E+0';
- } else {
- $exp += length($1) if (s/(0+)$//); # strip trailing zeros
- sprintf("%sE%+ld", $_, $exp);
- }
- }
-}
-
-# negation
-sub main'fneg { #(fnum_str) return fnum_str
- local($_) = &'fnorm($_[0]);
- vec($_,0,8) ^= ord('+') ^ ord('-') unless $_ eq '+0E+0'; # flip sign
- if ( ord("\t") == 9 ) { # ascii
- s/^H/N/;
- }
- else { # ebcdic character set
- s/\373/N/;
- }
- $_;
-}
-
-# absolute value
-sub main'fabs { #(fnum_str) return fnum_str
- local($_) = &'fnorm($_[0]);
- s/^-/+/; # mash sign
- $_;
-}
-
-# multiplication
-sub main'fmul { #(fnum_str, fnum_str) return fnum_str
- local($x,$y) = (&'fnorm($_[0]),&'fnorm($_[1]));
- if ($x eq 'NaN' || $y eq 'NaN') {
- 'NaN';
- } else {
- local($xm,$xe) = split('E',$x);
- local($ym,$ye) = split('E',$y);
- &norm(&'bmul($xm,$ym),$xe+$ye);
- }
-}
-
-# addition
-sub main'fadd { #(fnum_str, fnum_str) return fnum_str
- local($x,$y) = (&'fnorm($_[0]),&'fnorm($_[1]));
- if ($x eq 'NaN' || $y eq 'NaN') {
- 'NaN';
- } else {
- local($xm,$xe) = split('E',$x);
- local($ym,$ye) = split('E',$y);
- ($xm,$xe,$ym,$ye) = ($ym,$ye,$xm,$xe) if ($xe < $ye);
- &norm(&'badd($ym,$xm.('0' x ($xe-$ye))),$ye);
- }
-}
-
-# subtraction
-sub main'fsub { #(fnum_str, fnum_str) return fnum_str
- &'fadd($_[0],&'fneg($_[1]));
-}
-
-# division
-# args are dividend, divisor, scale (optional)
-# result has at most max(scale, length(dividend), length(divisor)) digits
-sub main'fdiv #(fnum_str, fnum_str[,scale]) return fnum_str
-{
- local($x,$y,$scale) = (&'fnorm($_[0]),&'fnorm($_[1]),$_[2]);
- if ($x eq 'NaN' || $y eq 'NaN' || $y eq '+0E+0') {
- 'NaN';
- } else {
- local($xm,$xe) = split('E',$x);
- local($ym,$ye) = split('E',$y);
- $scale = $div_scale if (!$scale);
- $scale = length($xm)-1 if (length($xm)-1 > $scale);
- $scale = length($ym)-1 if (length($ym)-1 > $scale);
- $scale = $scale + length($ym) - length($xm);
- &norm(&round(&'bdiv($xm.('0' x $scale),$ym),&'babs($ym)),
- $xe-$ye-$scale);
- }
-}
-
-# round int $q based on fraction $r/$base using $rnd_mode
-sub round { #(int_str, int_str, int_str) return int_str
- local($q,$r,$base) = @_;
- if ($q eq 'NaN' || $r eq 'NaN') {
- 'NaN';
- } elsif ($rnd_mode eq 'trunc') {
- $q; # just truncate
- } else {
- local($cmp) = &'bcmp(&'bmul($r,'+2'),$base);
- if ( $cmp < 0 ||
- ($cmp == 0 &&
- ( $rnd_mode eq 'zero' ||
- ($rnd_mode eq '-inf' && (substr($q,0,1) eq '+')) ||
- ($rnd_mode eq '+inf' && (substr($q,0,1) eq '-')) ||
- ($rnd_mode eq 'even' && $q =~ /[24680]$/) ||
- ($rnd_mode eq 'odd' && $q =~ /[13579]$/) )) ) {
- $q; # round down
- } else {
- &'badd($q, ((substr($q,0,1) eq '-') ? '-1' : '+1'));
- # round up
- }
- }
-}
-
-# round the mantissa of $x to $scale digits
-sub main'fround { #(fnum_str, scale) return fnum_str
- local($x,$scale) = (&'fnorm($_[0]),$_[1]);
- if ($x eq 'NaN' || $scale <= 0) {
- $x;
- } else {
- local($xm,$xe) = split('E',$x);
- if (length($xm)-1 <= $scale) {
- $x;
- } else {
- &norm(&round(substr($xm,0,$scale+1),
- "+0".substr($xm,$scale+1,1),"+10"),
- $xe+length($xm)-$scale-1);
- }
- }
-}
-
-# round $x at the 10 to the $scale digit place
-sub main'ffround { #(fnum_str, scale) return fnum_str
- local($x,$scale) = (&'fnorm($_[0]),$_[1]);
- if ($x eq 'NaN') {
- 'NaN';
- } else {
- local($xm,$xe) = split('E',$x);
- if ($xe >= $scale) {
- $x;
- } else {
- $xe = length($xm)+$xe-$scale;
- if ($xe < 1) {
- '+0E+0';
- } elsif ($xe == 1) {
- # The first substr preserves the sign, which means that
- # we'll pass a non-normalized "-0" to &round when rounding
- # -0.006 (for example), purely so that &round won't lose
- # the sign.
- &norm(&round(substr($xm,0,1).'0',
- "+0".substr($xm,1,1),"+10"), $scale);
- } else {
- &norm(&round(substr($xm,0,$xe),
- "+0".substr($xm,$xe,1),"+10"), $scale);
- }
- }
- }
-}
-
-# compare 2 values returns one of undef, <0, =0, >0
-# returns undef if either or both input value are not numbers
-sub main'fcmp #(fnum_str, fnum_str) return cond_code
-{
- local($x, $y) = (&'fnorm($_[0]),&'fnorm($_[1]));
- if ($x eq "NaN" || $y eq "NaN") {
- undef;
- } else {
- ord($y) <=> ord($x)
- ||
- ( local($xm,$xe,$ym,$ye) = split('E', $x."E$y"),
- (($xe <=> $ye) * (substr($x,0,1).'1')
- || &bigint'cmp($xm,$ym))
- );
- }
-}
-
-# square root by Newtons method.
-sub main'fsqrt { #(fnum_str[, scale]) return fnum_str
- local($x, $scale) = (&'fnorm($_[0]), $_[1]);
- if ($x eq 'NaN' || $x =~ /^-/) {
- 'NaN';
- } elsif ($x eq '+0E+0') {
- '+0E+0';
- } else {
- local($xm, $xe) = split('E',$x);
- $scale = $div_scale if (!$scale);
- $scale = length($xm)-1 if ($scale < length($xm)-1);
- local($gs, $guess) = (1, sprintf("1E%+d", (length($xm)+$xe-1)/2));
- while ($gs < 2*$scale) {
- $guess = &'fmul(&'fadd($guess,&'fdiv($x,$guess,$gs*2)),".5");
- $gs *= 2;
- }
- &'fround($guess, $scale);
- }
-}
-
-1;
Deleted: vendor/perl/dist/lib/bigfloatpl.t
===================================================================
--- vendor/perl/dist/lib/bigfloatpl.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/bigfloatpl.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,422 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-{
- # Silence the deprecation warnings from bigfloat.pl for the purpose
- # of testing. These tests will be removed along with bigfloat.pl in
- # the next major release of perl.
- local $SIG{__WARN__} = sub {
- if ($_[0] !~ /will be removed from the Perl core distribution/) {
- print(STDERR @_);
- }
- };
- require "bigfloat.pl";
-}
-
-$test = 0;
-$| = 1;
-print "1..355\n";
-while (<DATA>) {
- chop;
- if (/^&/) {
- $f = $_;
- } elsif (/^\$.*/) {
- eval "$_;";
- } else {
- ++$test;
- @args = split(/:/,$_,99);
- $ans = pop(@args);
- $try = "$f('" . join("','", @args) . "');";
- if (($ans1 = eval($try)) eq $ans) {
- print "ok $test\n";
- } else {
- print "not ok $test\n";
- print "# '$try' expected: '$ans' got: '$ans1'\n";
- }
- }
-}
-__END__
-&fnorm
-abc:NaN
- 1 a:NaN
-1bcd2:NaN
-11111b:NaN
-+1z:NaN
--1z:NaN
-0:+0E+0
-+0:+0E+0
-+00:+0E+0
-+0 0 0:+0E+0
-000000 0000000 00000:+0E+0
--0:+0E+0
--0000:+0E+0
-+1:+1E+0
-+01:+1E+0
-+001:+1E+0
-+00000100000:+1E+5
-123456789:+123456789E+0
--1:-1E+0
--01:-1E+0
--001:-1E+0
--123456789:-123456789E+0
--00000100000:-1E+5
-123.456a:NaN
-123.456:+123456E-3
-0.01:+1E-2
-.002:+2E-3
--0.0003:-3E-4
--.0000000004:-4E-10
-123456E2:+123456E+2
-123456E-2:+123456E-2
--123456E2:-123456E+2
--123456E-2:-123456E-2
-1e1:+1E+1
-2e-11:+2E-11
--3e111:-3E+111
--4e-1111:-4E-1111
-&fneg
-abd:NaN
-+0:+0E+0
-+1:-1E+0
--1:+1E+0
-+123456789:-123456789E+0
--123456789:+123456789E+0
-+123.456789:-123456789E-6
--123456.789:+123456789E-3
-&fabs
-abc:NaN
-+0:+0E+0
-+1:+1E+0
--1:+1E+0
-+123456789:+123456789E+0
--123456789:+123456789E+0
-+123.456789:+123456789E-6
--123456.789:+123456789E-3
-&fround
-$bigfloat::rnd_mode = 'trunc'
-+10123456789:5:+10123E+6
--10123456789:5:-10123E+6
-+10123456789:9:+101234567E+2
--10123456789:9:-101234567E+2
-+101234500:6:+101234E+3
--101234500:6:-101234E+3
-$bigfloat::rnd_mode = 'zero'
-+20123456789:5:+20123E+6
--20123456789:5:-20123E+6
-+20123456789:9:+201234568E+2
--20123456789:9:-201234568E+2
-+201234500:6:+201234E+3
--201234500:6:-201234E+3
-$bigfloat::rnd_mode = '+inf'
-+30123456789:5:+30123E+6
--30123456789:5:-30123E+6
-+30123456789:9:+301234568E+2
--30123456789:9:-301234568E+2
-+301234500:6:+301235E+3
--301234500:6:-301234E+3
-$bigfloat::rnd_mode = '-inf'
-+40123456789:5:+40123E+6
--40123456789:5:-40123E+6
-+40123456789:9:+401234568E+2
--40123456789:9:-401234568E+2
-+401234500:6:+401234E+3
--401234500:6:-401235E+3
-$bigfloat::rnd_mode = 'odd'
-+50123456789:5:+50123E+6
--50123456789:5:-50123E+6
-+50123456789:9:+501234568E+2
--50123456789:9:-501234568E+2
-+501234500:6:+501235E+3
--501234500:6:-501235E+3
-$bigfloat::rnd_mode = 'even'
-+60123456789:5:+60123E+6
--60123456789:5:-60123E+6
-+60123456789:9:+601234568E+2
--60123456789:9:-601234568E+2
-+601234500:6:+601234E+3
--601234500:6:-601234E+3
-&ffround
-$bigfloat::rnd_mode = 'trunc'
-+1.23:-1:+12E-1
--1.23:-1:-12E-1
-+1.27:-1:+12E-1
--1.27:-1:-12E-1
-+1.25:-1:+12E-1
--1.25:-1:-12E-1
-+1.35:-1:+13E-1
--1.35:-1:-13E-1
--0.006:-1:+0E+0
--0.006:-2:+0E+0
-$bigfloat::rnd_mode = 'zero'
-+2.23:-1:+22E-1
--2.23:-1:-22E-1
-+2.27:-1:+23E-1
--2.27:-1:-23E-1
-+2.25:-1:+22E-1
--2.25:-1:-22E-1
-+2.35:-1:+23E-1
--2.35:-1:-23E-1
--0.0065:-1:+0E+0
--0.0065:-2:-1E-2
--0.0065:-3:-6E-3
--0.0065:-4:-65E-4
--0.0065:-5:-65E-4
-$bigfloat::rnd_mode = '+inf'
-+3.23:-1:+32E-1
--3.23:-1:-32E-1
-+3.27:-1:+33E-1
--3.27:-1:-33E-1
-+3.25:-1:+33E-1
--3.25:-1:-32E-1
-+3.35:-1:+34E-1
--3.35:-1:-33E-1
--0.0065:-1:+0E+0
--0.0065:-2:-1E-2
--0.0065:-3:-6E-3
--0.0065:-4:-65E-4
--0.0065:-5:-65E-4
-$bigfloat::rnd_mode = '-inf'
-+4.23:-1:+42E-1
--4.23:-1:-42E-1
-+4.27:-1:+43E-1
--4.27:-1:-43E-1
-+4.25:-1:+42E-1
--4.25:-1:-43E-1
-+4.35:-1:+43E-1
--4.35:-1:-44E-1
--0.0065:-1:+0E+0
--0.0065:-2:-1E-2
--0.0065:-3:-7E-3
--0.0065:-4:-65E-4
--0.0065:-5:-65E-4
-$bigfloat::rnd_mode = 'odd'
-+5.23:-1:+52E-1
--5.23:-1:-52E-1
-+5.27:-1:+53E-1
--5.27:-1:-53E-1
-+5.25:-1:+53E-1
--5.25:-1:-53E-1
-+5.35:-1:+53E-1
--5.35:-1:-53E-1
--0.0065:-1:+0E+0
--0.0065:-2:-1E-2
--0.0065:-3:-7E-3
--0.0065:-4:-65E-4
--0.0065:-5:-65E-4
-$bigfloat::rnd_mode = 'even'
-+6.23:-1:+62E-1
--6.23:-1:-62E-1
-+6.27:-1:+63E-1
--6.27:-1:-63E-1
-+6.25:-1:+62E-1
--6.25:-1:-62E-1
-+6.35:-1:+64E-1
--6.35:-1:-64E-1
--0.0065:-1:+0E+0
--0.0065:-2:-1E-2
--0.0065:-3:-6E-3
--0.0065:-4:-65E-4
--0.0065:-5:-65E-4
-&fcmp
-abc:abc:
-abc:+0:
-+0:abc:
-+0:+0:0
--1:+0:-1
-+0:-1:1
-+1:+0:1
-+0:+1:-1
--1:+1:-1
-+1:-1:1
--1:-1:0
-+1:+1:0
-+123:+123:0
-+123:+12:1
-+12:+123:-1
--123:-123:0
--123:-12:-1
--12:-123:1
-+123:+124:-1
-+124:+123:1
--123:-124:1
--124:-123:-1
-&fadd
-abc:abc:NaN
-abc:+0:NaN
-+0:abc:NaN
-+0:+0:+0E+0
-+1:+0:+1E+0
-+0:+1:+1E+0
-+1:+1:+2E+0
--1:+0:-1E+0
-+0:-1:-1E+0
--1:-1:-2E+0
--1:+1:+0E+0
-+1:-1:+0E+0
-+9:+1:+1E+1
-+99:+1:+1E+2
-+999:+1:+1E+3
-+9999:+1:+1E+4
-+99999:+1:+1E+5
-+999999:+1:+1E+6
-+9999999:+1:+1E+7
-+99999999:+1:+1E+8
-+999999999:+1:+1E+9
-+9999999999:+1:+1E+10
-+99999999999:+1:+1E+11
-+10:-1:+9E+0
-+100:-1:+99E+0
-+1000:-1:+999E+0
-+10000:-1:+9999E+0
-+100000:-1:+99999E+0
-+1000000:-1:+999999E+0
-+10000000:-1:+9999999E+0
-+100000000:-1:+99999999E+0
-+1000000000:-1:+999999999E+0
-+10000000000:-1:+9999999999E+0
-+123456789:+987654321:+111111111E+1
--123456789:+987654321:+864197532E+0
--123456789:-987654321:-111111111E+1
-+123456789:-987654321:-864197532E+0
-&fsub
-abc:abc:NaN
-abc:+0:NaN
-+0:abc:NaN
-+0:+0:+0E+0
-+1:+0:+1E+0
-+0:+1:-1E+0
-+1:+1:+0E+0
--1:+0:-1E+0
-+0:-1:+1E+0
--1:-1:+0E+0
--1:+1:-2E+0
-+1:-1:+2E+0
-+9:+1:+8E+0
-+99:+1:+98E+0
-+999:+1:+998E+0
-+9999:+1:+9998E+0
-+99999:+1:+99998E+0
-+999999:+1:+999998E+0
-+9999999:+1:+9999998E+0
-+99999999:+1:+99999998E+0
-+999999999:+1:+999999998E+0
-+9999999999:+1:+9999999998E+0
-+99999999999:+1:+99999999998E+0
-+10:-1:+11E+0
-+100:-1:+101E+0
-+1000:-1:+1001E+0
-+10000:-1:+10001E+0
-+100000:-1:+100001E+0
-+1000000:-1:+1000001E+0
-+10000000:-1:+10000001E+0
-+100000000:-1:+100000001E+0
-+1000000000:-1:+1000000001E+0
-+10000000000:-1:+10000000001E+0
-+123456789:+987654321:-864197532E+0
--123456789:+987654321:-111111111E+1
--123456789:-987654321:+864197532E+0
-+123456789:-987654321:+111111111E+1
-&fmul
-abc:abc:NaN
-abc:+0:NaN
-+0:abc:NaN
-+0:+0:+0E+0
-+0:+1:+0E+0
-+1:+0:+0E+0
-+0:-1:+0E+0
--1:+0:+0E+0
-+123456789123456789:+0:+0E+0
-+0:+123456789123456789:+0E+0
--1:-1:+1E+0
--1:+1:-1E+0
-+1:-1:-1E+0
-+1:+1:+1E+0
-+2:+3:+6E+0
--2:+3:-6E+0
-+2:-3:-6E+0
--2:-3:+6E+0
-+111:+111:+12321E+0
-+10101:+10101:+102030201E+0
-+1001001:+1001001:+1002003002001E+0
-+100010001:+100010001:+10002000300020001E+0
-+10000100001:+10000100001:+100002000030000200001E+0
-+11111111111:+9:+99999999999E+0
-+22222222222:+9:+199999999998E+0
-+33333333333:+9:+299999999997E+0
-+44444444444:+9:+399999999996E+0
-+55555555555:+9:+499999999995E+0
-+66666666666:+9:+599999999994E+0
-+77777777777:+9:+699999999993E+0
-+88888888888:+9:+799999999992E+0
-+99999999999:+9:+899999999991E+0
-&fdiv
-abc:abc:NaN
-abc:+1:abc:NaN
-+1:abc:NaN
-+0:+0:NaN
-+0:+1:+0E+0
-+1:+0:NaN
-+0:-1:+0E+0
--1:+0:NaN
-+1:+1:+1E+0
--1:-1:+1E+0
-+1:-1:-1E+0
--1:+1:-1E+0
-+1:+2:+5E-1
-+2:+1:+2E+0
-+10:+5:+2E+0
-+100:+4:+25E+0
-+1000:+8:+125E+0
-+10000:+16:+625E+0
-+10000:-16:-625E+0
-+999999999999:+9:+111111111111E+0
-+999999999999:+99:+10101010101E+0
-+999999999999:+999:+1001001001E+0
-+999999999999:+9999:+100010001E+0
-+999999999999999:+99999:+10000100001E+0
-+1000000000:+9:+1111111111111111111111111111111111111111E-31
-+2000000000:+9:+2222222222222222222222222222222222222222E-31
-+3000000000:+9:+3333333333333333333333333333333333333333E-31
-+4000000000:+9:+4444444444444444444444444444444444444444E-31
-+5000000000:+9:+5555555555555555555555555555555555555556E-31
-+6000000000:+9:+6666666666666666666666666666666666666667E-31
-+7000000000:+9:+7777777777777777777777777777777777777778E-31
-+8000000000:+9:+8888888888888888888888888888888888888889E-31
-+9000000000:+9:+1E+9
-+35500000:+113:+3141592920353982300884955752212389380531E-34
-+71000000:+226:+3141592920353982300884955752212389380531E-34
-+106500000:+339:+3141592920353982300884955752212389380531E-34
-+1000000000:+3:+3333333333333333333333333333333333333333E-31
-$bigfloat::div_scale = 20
-+1000000000:+9:+11111111111111111111E-11
-+2000000000:+9:+22222222222222222222E-11
-+3000000000:+9:+33333333333333333333E-11
-+4000000000:+9:+44444444444444444444E-11
-+5000000000:+9:+55555555555555555556E-11
-+6000000000:+9:+66666666666666666667E-11
-+7000000000:+9:+77777777777777777778E-11
-+8000000000:+9:+88888888888888888889E-11
-+9000000000:+9:+1E+9
-+35500000:+113:+314159292035398230088E-15
-+71000000:+226:+314159292035398230088E-15
-+106500000:+339:+31415929203539823009E-14
-+1000000000:+3:+33333333333333333333E-11
-$bigfloat::div_scale = 40
-&fsqrt
-+0:+0E+0
--1:NaN
--2:NaN
--16:NaN
--123.456:NaN
-+1:+1E+0
-+1.44:+12E-1
-+2:+141421356237309504880168872420969807857E-38
-+4:+2E+0
-+16:+4E+0
-+100:+1E+1
-+123.456:+1111107555549866648462149404118219234119E-38
-+15241.383936:+123456E-3
Deleted: vendor/perl/dist/lib/bigint.pl
===================================================================
--- vendor/perl/dist/lib/bigint.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/bigint.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,324 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-package bigint;
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# Suggested alternative: Math::BigInt
-
-# arbitrary size integer math package
-#
-# by Mark Biggar
-#
-# Canonical Big integer value are strings of the form
-# /^[+-]\d+$/ with leading zeros suppressed
-# Input values to these routines may be strings of the form
-# /^\s*[+-]?[\d\s]+$/.
-# Examples:
-# '+0' canonical zero value
-# ' -123 123 123' canonical value '-123123123'
-# '1 23 456 7890' canonical value '+1234567890'
-# Output values always in canonical form
-#
-# Actual math is done in an internal format consisting of an array
-# whose first element is the sign (/^[+-]$/) and whose remaining
-# elements are base 100000 digits with the least significant digit first.
-# The string 'NaN' is used to represent the result when input arguments
-# are not numbers, as well as the result of dividing by zero
-#
-# routines provided are:
-#
-# bneg(BINT) return BINT negation
-# babs(BINT) return BINT absolute value
-# bcmp(BINT,BINT) return CODE compare numbers (undef,<0,=0,>0)
-# badd(BINT,BINT) return BINT addition
-# bsub(BINT,BINT) return BINT subtraction
-# bmul(BINT,BINT) return BINT multiplication
-# bdiv(BINT,BINT) return (BINT,BINT) division (quo,rem) just quo if scalar
-# bmod(BINT,BINT) return BINT modulus
-# bgcd(BINT,BINT) return BINT greatest common divisor
-# bnorm(BINT) return BINT normalization
-#
-
-# overcome a floating point problem on certain osnames (posix-bc, os390)
-BEGIN {
- my $x = 100000.0;
- my $use_mult = int($x*1e-5)*1e5 == $x ? 1 : 0;
-}
-
-$zero = 0;
-
-
-# normalize string form of number. Strip leading zeros. Strip any
-# white space and add a sign, if missing.
-# Strings that are not numbers result the value 'NaN'.
-
-sub main'bnorm { #(num_str) return num_str
- local($_) = @_;
- s/\s+//g; # strip white space
- if (s/^([+-]?)0*(\d+)$/$1$2/) { # test if number
- substr($_,0,0) = '+' unless $1; # Add missing sign
- s/^-0/+0/;
- $_;
- } else {
- 'NaN';
- }
-}
-
-# Convert a number from string format to internal base 100000 format.
-# Assumes normalized value as input.
-sub internal { #(num_str) return int_num_array
- local($d) = @_;
- ($is,$il) = (substr($d,0,1),length($d)-2);
- substr($d,0,1) = '';
- ($is, reverse(unpack("a" . ($il%5+1) . ("a5" x ($il/5)), $d)));
-}
-
-# Convert a number from internal base 100000 format to string format.
-# This routine scribbles all over input array.
-sub external { #(int_num_array) return num_str
- $es = shift;
- grep($_ > 9999 || ($_ = substr('0000'.$_,-5)), @_); # zero pad
- &'bnorm(join('', $es, reverse(@_))); # reverse concat and normalize
-}
-
-# Negate input value.
-sub main'bneg { #(num_str) return num_str
- local($_) = &'bnorm(@_);
- vec($_,0,8) ^= ord('+') ^ ord('-') unless $_ eq '+0';
- s/^./N/ unless /^[-+]/; # works both in ASCII and EBCDIC
- $_;
-}
-
-# Returns the absolute value of the input.
-sub main'babs { #(num_str) return num_str
- &abs(&'bnorm(@_));
-}
-
-sub abs { # post-normalized abs for internal use
- local($_) = @_;
- s/^-/+/;
- $_;
-}
-
-# Compares 2 values. Returns one of undef, <0, =0, >0. (suitable for sort)
-sub main'bcmp { #(num_str, num_str) return cond_code
- local($x,$y) = (&'bnorm($_[0]),&'bnorm($_[1]));
- if ($x eq 'NaN') {
- undef;
- } elsif ($y eq 'NaN') {
- undef;
- } else {
- &cmp($x,$y);
- }
-}
-
-sub cmp { # post-normalized compare for internal use
- local($cx, $cy) = @_;
- return 0 if ($cx eq $cy);
-
- local($sx, $sy) = (substr($cx, 0, 1), substr($cy, 0, 1));
- local($ld);
-
- if ($sx eq '+') {
- return 1 if ($sy eq '-' || $cy eq '+0');
- $ld = length($cx) - length($cy);
- return $ld if ($ld);
- return $cx cmp $cy;
- } else { # $sx eq '-'
- return -1 if ($sy eq '+');
- $ld = length($cy) - length($cx);
- return $ld if ($ld);
- return $cy cmp $cx;
- }
-
-}
-
-sub main'badd { #(num_str, num_str) return num_str
- local(*x, *y); ($x, $y) = (&'bnorm($_[0]),&'bnorm($_[1]));
- if ($x eq 'NaN') {
- 'NaN';
- } elsif ($y eq 'NaN') {
- 'NaN';
- } else {
- @x = &internal($x); # convert to internal form
- @y = &internal($y);
- local($sx, $sy) = (shift @x, shift @y); # get signs
- if ($sx eq $sy) {
- &external($sx, &add(*x, *y)); # if same sign add
- } else {
- ($x, $y) = (&abs($x),&abs($y)); # make abs
- if (&cmp($y,$x) > 0) {
- &external($sy, &sub(*y, *x));
- } else {
- &external($sx, &sub(*x, *y));
- }
- }
- }
-}
-
-sub main'bsub { #(num_str, num_str) return num_str
- &'badd($_[0],&'bneg($_[1]));
-}
-
-# GCD -- Euclid's algorithm Knuth Vol 2 pg 296
-sub main'bgcd { #(num_str, num_str) return num_str
- local($x,$y) = (&'bnorm($_[0]),&'bnorm($_[1]));
- if ($x eq 'NaN' || $y eq 'NaN') {
- 'NaN';
- } else {
- ($x, $y) = ($y,&'bmod($x,$y)) while $y ne '+0';
- $x;
- }
-}
-
-# routine to add two base 1e5 numbers
-# stolen from Knuth Vol 2 Algorithm A pg 231
-# there are separate routines to add and sub as per Kunth pg 233
-sub add { #(int_num_array, int_num_array) return int_num_array
- local(*x, *y) = @_;
- $car = 0;
- for $x (@x) {
- last unless @y || $car;
- $x -= 1e5 if $car = (($x += shift(@y) + $car) >= 1e5) ? 1 : 0;
- }
- for $y (@y) {
- last unless $car;
- $y -= 1e5 if $car = (($y += $car) >= 1e5) ? 1 : 0;
- }
- (@x, @y, $car);
-}
-
-# subtract base 1e5 numbers -- stolen from Knuth Vol 2 pg 232, $x > $y
-sub sub { #(int_num_array, int_num_array) return int_num_array
- local(*sx, *sy) = @_;
- $bar = 0;
- for $sx (@sx) {
- last unless @y || $bar;
- $sx += 1e5 if $bar = (($sx -= shift(@sy) + $bar) < 0);
- }
- @sx;
-}
-
-# multiply two numbers -- stolen from Knuth Vol 2 pg 233
-sub main'bmul { #(num_str, num_str) return num_str
- local(*x, *y); ($x, $y) = (&'bnorm($_[0]), &'bnorm($_[1]));
- if ($x eq 'NaN') {
- 'NaN';
- } elsif ($y eq 'NaN') {
- 'NaN';
- } else {
- @x = &internal($x);
- @y = &internal($y);
- local($signr) = (shift @x ne shift @y) ? '-' : '+';
- @prod = ();
- for $x (@x) {
- ($car, $cty) = (0, 0);
- for $y (@y) {
- $prod = $x * $y + $prod[$cty] + $car;
- if ($use_mult) {
- $prod[$cty++] =
- $prod - ($car = int($prod * 1e-5)) * 1e5;
- }
- else {
- $prod[$cty++] =
- $prod - ($car = int($prod / 1e5)) * 1e5;
- }
- }
- $prod[$cty] += $car if $car;
- $x = shift @prod;
- }
- &external($signr, @x, @prod);
- }
-}
-
-# modulus
-sub main'bmod { #(num_str, num_str) return num_str
- (&'bdiv(@_))[1];
-}
-
-sub main'bdiv { #(dividend: num_str, divisor: num_str) return num_str
- local (*x, *y); ($x, $y) = (&'bnorm($_[0]), &'bnorm($_[1]));
- return wantarray ? ('NaN','NaN') : 'NaN'
- if ($x eq 'NaN' || $y eq 'NaN' || $y eq '+0');
- return wantarray ? ('+0',$x) : '+0' if (&cmp(&abs($x),&abs($y)) < 0);
- @x = &internal($x); @y = &internal($y);
- $srem = $y[0];
- $sr = (shift @x ne shift @y) ? '-' : '+';
- $car = $bar = $prd = 0;
- if (($dd = int(1e5/($y[$#y]+1))) != 1) {
- for $x (@x) {
- $x = $x * $dd + $car;
- if ($use_mult) {
- $x -= ($car = int($x * 1e-5)) * 1e5;
- }
- else {
- $x -= ($car = int($x / 1e5)) * 1e5;
- }
- }
- push(@x, $car); $car = 0;
- for $y (@y) {
- $y = $y * $dd + $car;
- if ($use_mult) {
- $y -= ($car = int($y * 1e-5)) * 1e5;
- }
- else {
- $y -= ($car = int($y / 1e5)) * 1e5;
- }
- }
- }
- else {
- push(@x, 0);
- }
- @q = (); ($v2,$v1) = @y[-2,-1];
- while ($#x > $#y) {
- ($u2,$u1,$u0) = @x[-3..-1];
- $q = (($u0 == $v1) ? 99999 : int(($u0*1e5+$u1)/$v1));
- --$q while ($v2*$q > ($u0*1e5+$u1-$q*$v1)*1e5+$u2);
- if ($q) {
- ($car, $bar) = (0,0);
- for ($y = 0, $x = $#x-$#y-1; $y <= $#y; ++$y,++$x) {
- $prd = $q * $y[$y] + $car;
- if ($use_mult) {
- $prd -= ($car = int($prd * 1e-5)) * 1e5;
- }
- else {
- $prd -= ($car = int($prd / 1e5)) * 1e5;
- }
- $x[$x] += 1e5 if ($bar = (($x[$x] -= $prd + $bar) < 0));
- }
- if ($x[$#x] < $car + $bar) {
- $car = 0; --$q;
- for ($y = 0, $x = $#x-$#y-1; $y <= $#y; ++$y,++$x) {
- $x[$x] -= 1e5
- if ($car = (($x[$x] += $y[$y] + $car) > 1e5));
- }
- }
- }
- pop(@x); unshift(@q, $q);
- }
- if (wantarray) {
- @d = ();
- if ($dd != 1) {
- $car = 0;
- for $x (reverse @x) {
- $prd = $car * 1e5 + $x;
- $car = $prd - ($tmp = int($prd / $dd)) * $dd;
- unshift(@d, $tmp);
- }
- }
- else {
- @d = @x;
- }
- (&external($sr, @q), &external($srem, @d, $zero));
- } else {
- &external($sr, @q);
- }
-}
-1;
Deleted: vendor/perl/dist/lib/bigint.pm
===================================================================
--- vendor/perl/dist/lib/bigint.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/bigint.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,675 +0,0 @@
-package bigint;
-use 5.006;
-
-$VERSION = '0.23';
-use Exporter;
- at ISA = qw( Exporter );
- at EXPORT_OK = qw( PI e bpi bexp );
- at EXPORT = qw( inf NaN );
-
-use strict;
-use overload;
-
-##############################################################################
-
-# These are all alike, and thus faked by AUTOLOAD
-
-my @faked = qw/round_mode accuracy precision div_scale/;
-use vars qw/$VERSION $AUTOLOAD $_lite/; # _lite for testsuite
-
-sub AUTOLOAD
- {
- my $name = $AUTOLOAD;
-
- $name =~ s/.*:://; # split package
- no strict 'refs';
- foreach my $n (@faked)
- {
- if ($n eq $name)
- {
- *{"bigint::$name"} = sub
- {
- my $self = shift;
- no strict 'refs';
- if (defined $_[0])
- {
- return Math::BigInt->$name($_[0]);
- }
- return Math::BigInt->$name();
- };
- return &$name;
- }
- }
-
- # delayed load of Carp and avoid recursion
- require Carp;
- Carp::croak ("Can't call bigint\-\>$name, not a valid method");
- }
-
-sub upgrade
- {
- $Math::BigInt::upgrade;
- }
-
-sub _binary_constant
- {
- # this takes a binary/hexadecimal/octal constant string and returns it
- # as string suitable for new. Basically it converts octal to decimal, and
- # passes every thing else unmodified back.
- my $string = shift;
-
- return Math::BigInt->new($string) if $string =~ /^0[bx]/;
-
- # so it must be an octal constant
- Math::BigInt->from_oct($string);
- }
-
-sub _float_constant
- {
- # this takes a floating point constant string and returns it truncated to
- # integer. For instance, '4.5' => '4', '1.234e2' => '123' etc
- my $float = shift;
-
- # some simple cases first
- return $float if ($float =~ /^[+-]?[0-9]+$/); # '+123','-1','0' etc
- return $float
- if ($float =~ /^[+-]?[0-9]+\.?[eE]\+?[0-9]+$/); # 123e2, 123.e+2
- return '0' if ($float =~ /^[+-]?[0]*\.[0-9]+$/); # .2, 0.2, -.1
- if ($float =~ /^[+-]?[0-9]+\.[0-9]*$/) # 1., 1.23, -1.2 etc
- {
- $float =~ s/\..*//;
- return $float;
- }
- my ($mis,$miv,$mfv,$es,$ev) = Math::BigInt::_split($float);
- return $float if !defined $mis; # doesn't look like a number to me
- my $ec = int($$ev);
- my $sign = $$mis; $sign = '' if $sign eq '+';
- if ($$es eq '-')
- {
- # ignore fraction part entirely
- if ($ec >= length($$miv)) # 123.23E-4
- {
- return '0';
- }
- return $sign . substr ($$miv,0,length($$miv)-$ec); # 1234.45E-2 = 12
- }
- # xE+y
- if ($ec >= length($$mfv))
- {
- $ec -= length($$mfv);
- return $sign.$$miv.$$mfv if $ec == 0; # 123.45E+2 => 12345
- return $sign.$$miv.$$mfv.'E'.$ec; # 123.45e+3 => 12345e1
- }
- $mfv = substr($$mfv,0,$ec);
- $sign.$$miv.$mfv; # 123.45e+1 => 1234
- }
-
-sub unimport
- {
- $^H{bigint} = undef; # no longer in effect
- overload::remove_constant('binary','','float','','integer');
- }
-
-sub in_effect
- {
- my $level = shift || 0;
- my $hinthash = (caller($level))[10];
- $hinthash->{bigint};
- }
-
-#############################################################################
-# the following two routines are for "use bigint qw/hex oct/;":
-
-sub _hex_global
- {
- my $i = $_[0];
- $i = '0x'.$i unless $i =~ /^0x/;
- Math::BigInt->new($i);
- }
-
-sub _oct_global
- {
- my $i = $_[0];
- return Math::BigInt->from_oct($i) if $i =~ /^0[0-7]/;
- Math::BigInt->new($i);
- }
-
-#############################################################################
-# the following two routines are for Perl 5.9.4 or later and are lexical
-
-sub _hex
- {
- return CORE::hex($_[0]) unless in_effect(1);
- my $i = $_[0];
- $i = '0x'.$i unless $i =~ /^0x/;
- Math::BigInt->new($i);
- }
-
-sub _oct
- {
- return CORE::oct($_[0]) unless in_effect(1);
- my $i = $_[0];
- return Math::BigInt->from_oct($i) if $i =~ /^0[0-7]/;
- Math::BigInt->new($i);
- }
-
-sub import
- {
- my $self = shift;
-
- $^H{bigint} = 1; # we are in effect
-
- my ($hex,$oct);
- # for newer Perls always override hex() and oct() with a lexical version:
- if ($] > 5.009004)
- {
- $oct = \&_oct;
- $hex = \&_hex;
- }
- # some defaults
- my $lib = ''; my $lib_kind = 'try';
-
- my @import = ( ':constant' ); # drive it w/ constant
- my @a = @_; my $l = scalar @_; my $j = 0;
- my ($ver,$trace); # version? trace?
- my ($a,$p); # accuracy, precision
- for ( my $i = 0; $i < $l ; $i++,$j++ )
- {
- if ($_[$i] =~ /^(l|lib|try|only)$/)
- {
- # this causes a different low lib to take care...
- $lib_kind = $1; $lib_kind = 'lib' if $lib_kind eq 'l';
- $lib = $_[$i+1] || '';
- my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..."
- splice @a, $j, $s; $j -= $s; $i++;
- }
- elsif ($_[$i] =~ /^(a|accuracy)$/)
- {
- $a = $_[$i+1];
- my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..."
- splice @a, $j, $s; $j -= $s; $i++;
- }
- elsif ($_[$i] =~ /^(p|precision)$/)
- {
- $p = $_[$i+1];
- my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..."
- splice @a, $j, $s; $j -= $s; $i++;
- }
- elsif ($_[$i] =~ /^(v|version)$/)
- {
- $ver = 1;
- splice @a, $j, 1; $j --;
- }
- elsif ($_[$i] =~ /^(t|trace)$/)
- {
- $trace = 1;
- splice @a, $j, 1; $j --;
- }
- elsif ($_[$i] eq 'hex')
- {
- splice @a, $j, 1; $j --;
- $hex = \&_hex_global;
- }
- elsif ($_[$i] eq 'oct')
- {
- splice @a, $j, 1; $j --;
- $oct = \&_oct_global;
- }
- elsif ($_[$i] !~ /^(PI|e|bpi|bexp)\z/)
- {
- die ("unknown option $_[$i]");
- }
- }
- my $class;
- $_lite = 0; # using M::BI::L ?
- if ($trace)
- {
- require Math::BigInt::Trace; $class = 'Math::BigInt::Trace';
- }
- else
- {
- # see if we can find Math::BigInt::Lite
- if (!defined $a && !defined $p) # rounding won't work to well
- {
- eval 'require Math::BigInt::Lite;';
- if ($@ eq '')
- {
- @import = ( ); # :constant in Lite, not MBI
- Math::BigInt::Lite->import( ':constant' );
- $_lite= 1; # signal okay
- }
- }
- require Math::BigInt if $_lite == 0; # not already loaded?
- $class = 'Math::BigInt'; # regardless of MBIL or not
- }
- push @import, $lib_kind => $lib if $lib ne '';
- # Math::BigInt::Trace or plain Math::BigInt
- $class->import(@import);
-
- bigint->accuracy($a) if defined $a;
- bigint->precision($p) if defined $p;
- if ($ver)
- {
- print "bigint\t\t\t v$VERSION\n";
- print "Math::BigInt::Lite\t v$Math::BigInt::Lite::VERSION\n" if $_lite;
- print "Math::BigInt\t\t v$Math::BigInt::VERSION";
- my $config = Math::BigInt->config();
- print " lib => $config->{lib} v$config->{lib_version}\n";
- exit;
- }
- # we take care of floating point constants, since BigFloat isn't available
- # and BigInt doesn't like them:
- overload::constant float => sub { Math::BigInt->new( _float_constant(shift) ); };
- # Take care of octal/hexadecimal constants
- overload::constant binary => sub { _binary_constant(shift) };
-
- # if another big* was already loaded:
- my ($package) = caller();
-
- no strict 'refs';
- if (!defined *{"${package}::inf"})
- {
- $self->export_to_level(1,$self, at a); # export inf and NaN, e and PI
- }
- {
- no warnings 'redefine';
- *CORE::GLOBAL::oct = $oct if $oct;
- *CORE::GLOBAL::hex = $hex if $hex;
- }
- }
-
-sub inf () { Math::BigInt::binf(); }
-sub NaN () { Math::BigInt::bnan(); }
-
-sub PI () { Math::BigInt->new(3); }
-sub e () { Math::BigInt->new(2); }
-sub bpi ($) { Math::BigInt->new(3); }
-sub bexp ($$) { my $x = Math::BigInt->new($_[0]); $x->bexp($_[1]); }
-
-1;
-
-__END__
-
-=head1 NAME
-
-bigint - Transparent BigInteger support for Perl
-
-=head1 SYNOPSIS
-
- use bigint;
-
- $x = 2 + 4.5,"\n"; # BigInt 6
- print 2 ** 512,"\n"; # really is what you think it is
- print inf + 42,"\n"; # inf
- print NaN * 7,"\n"; # NaN
- print hex("0x1234567890123490"),"\n"; # Perl v5.9.4 or later
-
- {
- no bigint;
- print 2 ** 256,"\n"; # a normal Perl scalar now
- }
-
- # Note that this will be global:
- use bigint qw/hex oct/;
- print hex("0x1234567890123490"),"\n";
- print oct("01234567890123490"),"\n";
-
-=head1 DESCRIPTION
-
-All operators (including basic math operations) are overloaded. Integer
-constants are created as proper BigInts.
-
-Floating point constants are truncated to integer. All parts and results of
-expressions are also truncated.
-
-Unlike L<integer>, this pragma creates integer constants that are only
-limited in their size by the available memory and CPU time.
-
-=head2 use integer vs. use bigint
-
-There is one small difference between C<use integer> and C<use bigint>: the
-former will not affect assignments to variables and the return value of
-some functions. C<bigint> truncates these results to integer too:
-
- # perl -Minteger -wle 'print 3.2'
- 3.2
- # perl -Minteger -wle 'print 3.2 + 0'
- 3
- # perl -Mbigint -wle 'print 3.2'
- 3
- # perl -Mbigint -wle 'print 3.2 + 0'
- 3
-
- # perl -Mbigint -wle 'print exp(1) + 0'
- 2
- # perl -Mbigint -wle 'print exp(1)'
- 2
- # perl -Minteger -wle 'print exp(1)'
- 2.71828182845905
- # perl -Minteger -wle 'print exp(1) + 0'
- 2
-
-In practice this makes seldom a difference as B<parts and results> of
-expressions will be truncated anyway, but this can, for instance, affect the
-return value of subroutines:
-
- sub three_integer { use integer; return 3.2; }
- sub three_bigint { use bigint; return 3.2; }
-
- print three_integer(), " ", three_bigint(),"\n"; # prints "3.2 3"
-
-=head2 Options
-
-bigint recognizes some options that can be passed while loading it via use.
-The options can (currently) be either a single letter form, or the long form.
-The following options exist:
-
-=over 2
-
-=item a or accuracy
-
-This sets the accuracy for all math operations. The argument must be greater
-than or equal to zero. See Math::BigInt's bround() function for details.
-
- perl -Mbigint=a,2 -le 'print 12345+1'
-
-Note that setting precision and accurary at the same time is not possible.
-
-=item p or precision
-
-This sets the precision for all math operations. The argument can be any
-integer. Negative values mean a fixed number of digits after the dot, and
-are <B>ignored</B> since all operations happen in integer space.
-A positive value rounds to this digit left from the dot. 0 or 1 mean round to
-integer and are ignore like negative values.
-
-See Math::BigInt's bfround() function for details.
-
- perl -Mbignum=p,5 -le 'print 123456789+123'
-
-Note that setting precision and accurary at the same time is not possible.
-
-=item t or trace
-
-This enables a trace mode and is primarily for debugging bigint or
-Math::BigInt.
-
-=item hex
-
-Override the built-in hex() method with a version that can handle big
-integers. Note that under Perl v5.9.4 or ealier, this will be global
-and cannot be disabled with "no bigint;".
-
-=item oct
-
-Override the built-in oct() method with a version that can handle big
-integers. Note that under Perl v5.9.4 or ealier, this will be global
-and cannot be disabled with "no bigint;".
-
-=item l, lib, try or only
-
-Load a different math lib, see L<Math Library>.
-
- perl -Mbigint=lib,GMP -e 'print 2 ** 512'
- perl -Mbigint=try,GMP -e 'print 2 ** 512'
- perl -Mbigint=only,GMP -e 'print 2 ** 512'
-
-Currently there is no way to specify more than one library on the command
-line. This means the following does not work:
-
- perl -Mbignum=l,GMP,Pari -e 'print 2 ** 512'
-
-This will be hopefully fixed soon ;)
-
-=item v or version
-
-This prints out the name and version of all modules used and then exits.
-
- perl -Mbigint=v
-
-=back
-
-=head2 Math Library
-
-Math with the numbers is done (by default) by a module called
-Math::BigInt::Calc. This is equivalent to saying:
-
- use bigint lib => 'Calc';
-
-You can change this by using:
-
- use bignum lib => 'GMP';
-
-The following would first try to find Math::BigInt::Foo, then
-Math::BigInt::Bar, and when this also fails, revert to Math::BigInt::Calc:
-
- use bigint lib => 'Foo,Math::BigInt::Bar';
-
-Using C<lib> warns if none of the specified libraries can be found and
-L<Math::BigInt> did fall back to one of the default libraries.
-To supress this warning, use C<try> instead:
-
- use bignum try => 'GMP';
-
-If you want the code to die instead of falling back, use C<only> instead:
-
- use bignum only => 'GMP';
-
-Please see respective module documentation for further details.
-
-=head2 Internal Format
-
-The numbers are stored as objects, and their internals might change at anytime,
-especially between math operations. The objects also might belong to different
-classes, like Math::BigInt, or Math::BigInt::Lite. Mixing them together, even
-with normal scalars is not extraordinary, but normal and expected.
-
-You should not depend on the internal format, all accesses must go through
-accessor methods. E.g. looking at $x->{sign} is not a good idea since there
-is no guaranty that the object in question has such a hash key, nor is a hash
-underneath at all.
-
-=head2 Sign
-
-The sign is either '+', '-', 'NaN', '+inf' or '-inf'.
-You can access it with the sign() method.
-
-A sign of 'NaN' is used to represent the result when input arguments are not
-numbers or as a result of 0/0. '+inf' and '-inf' represent plus respectively
-minus infinity. You will get '+inf' when dividing a positive number by 0, and
-'-inf' when dividing any negative number by 0.
-
-=head2 Methods
-
-Since all numbers are now objects, you can use all functions that are part of
-the BigInt API. You can only use the bxxx() notation, and not the fxxx()
-notation, though.
-
-=over 2
-
-=item inf()
-
-A shortcut to return Math::BigInt->binf(). Useful because Perl does not always
-handle bareword C<inf> properly.
-
-=item NaN()
-
-A shortcut to return Math::BigInt->bnan(). Useful because Perl does not always
-handle bareword C<NaN> properly.
-
-=item e
-
- # perl -Mbigint=e -wle 'print e'
-
-Returns Euler's number C<e>, aka exp(1). Note that under bigint, this is
-truncated to an integer, and hence simple '2'.
-
-=item PI
-
- # perl -Mbigint=PI -wle 'print PI'
-
-Returns PI. Note that under bigint, this is truncated to an integer, and hence
-simple '3'.
-
-=item bexp()
-
- bexp($power,$accuracy);
-
-Returns Euler's number C<e> raised to the appropriate power, to
-the wanted accuracy.
-
-Note that under bigint, the result is truncated to an integer.
-
-Example:
-
- # perl -Mbigint=bexp -wle 'print bexp(1,80)'
-
-=item bpi()
-
- bpi($accuracy);
-
-Returns PI to the wanted accuracy. Note that under bigint, this is truncated
-to an integer, and hence simple '3'.
-
-Example:
-
- # perl -Mbigint=bpi -wle 'print bpi(80)'
-
-=item upgrade()
-
-Return the class that numbers are upgraded to, is in fact returning
-C<$Math::BigInt::upgrade>.
-
-=item in_effect()
-
- use bigint;
-
- print "in effect\n" if bigint::in_effect; # true
- {
- no bigint;
- print "in effect\n" if bigint::in_effect; # false
- }
-
-Returns true or false if C<bigint> is in effect in the current scope.
-
-This method only works on Perl v5.9.4 or later.
-
-=back
-
-=head2 MATH LIBRARY
-
-Math with the numbers is done (by default) by a module called
-
-=head2 Caveat
-
-But a warning is in order. When using the following to make a copy of a number,
-only a shallow copy will be made.
-
- $x = 9; $y = $x;
- $x = $y = 7;
-
-Using the copy or the original with overloaded math is okay, e.g. the
-following work:
-
- $x = 9; $y = $x;
- print $x + 1, " ", $y,"\n"; # prints 10 9
-
-but calling any method that modifies the number directly will result in
-B<both> the original and the copy being destroyed:
-
- $x = 9; $y = $x;
- print $x->badd(1), " ", $y,"\n"; # prints 10 10
-
- $x = 9; $y = $x;
- print $x->binc(1), " ", $y,"\n"; # prints 10 10
-
- $x = 9; $y = $x;
- print $x->bmul(2), " ", $y,"\n"; # prints 18 18
-
-Using methods that do not modify, but testthe contents works:
-
- $x = 9; $y = $x;
- $z = 9 if $x->is_zero(); # works fine
-
-See the documentation about the copy constructor and C<=> in overload, as
-well as the documentation in BigInt for further details.
-
-=head1 CAVAETS
-
-=over 2
-
-=item in_effect()
-
-This method only works on Perl v5.9.4 or later.
-
-=item hex()/oct()
-
-C<bigint> overrides these routines with versions that can also handle
-big integer values. Under Perl prior to version v5.9.4, however, this
-will not happen unless you specifically ask for it with the two
-import tags "hex" and "oct" - and then it will be global and cannot be
-disabled inside a scope with "no bigint":
-
- use bigint qw/hex oct/;
-
- print hex("0x1234567890123456");
- {
- no bigint;
- print hex("0x1234567890123456");
- }
-
-The second call to hex() will warn about a non-portable constant.
-
-Compare this to:
-
- use bigint;
-
- # will warn only under Perl older than v5.9.4
- print hex("0x1234567890123456");
-
-=back
-
-=head1 MODULES USED
-
-C<bigint> is just a thin wrapper around various modules of the Math::BigInt
-family. Think of it as the head of the family, who runs the shop, and orders
-the others to do the work.
-
-The following modules are currently used by bigint:
-
- Math::BigInt::Lite (for speed, and only if it is loadable)
- Math::BigInt
-
-=head1 EXAMPLES
-
-Some cool command line examples to impress the Python crowd ;) You might want
-to compare them to the results under -Mbignum or -Mbigrat:
-
- perl -Mbigint -le 'print sqrt(33)'
- perl -Mbigint -le 'print 2*255'
- perl -Mbigint -le 'print 4.5+2*255'
- perl -Mbigint -le 'print 3/7 + 5/7 + 8/3'
- perl -Mbigint -le 'print 123->is_odd()'
- perl -Mbigint -le 'print log(2)'
- perl -Mbigint -le 'print 2 ** 0.5'
- perl -Mbigint=a,65 -le 'print 2 ** 0.2'
- perl -Mbignum=a,65,l,GMP -le 'print 7 ** 7777'
-
-=head1 LICENSE
-
-This program is free software; you may redistribute it and/or modify it under
-the same terms as Perl itself.
-
-=head1 SEE ALSO
-
-Especially L<bigrat> as in C<perl -Mbigrat -le 'print 1/3+1/4'> and
-L<bignum> as in C<perl -Mbignum -le 'print sqrt(2)'>.
-
-L<Math::BigInt>, L<Math::BigRat> and L<Math::Big> as well
-as L<Math::BigInt::BitVect>, L<Math::BigInt::Pari> and L<Math::BigInt::GMP>.
-
-=head1 AUTHORS
-
-(C) by Tels L<http://bloodgate.com/> in early 2002 - 2007.
-
-=cut
Deleted: vendor/perl/dist/lib/bigintpl.t
===================================================================
--- vendor/perl/dist/lib/bigintpl.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/bigintpl.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,296 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-{
- # Silence the deprecation warnings from bigint.pl for the purpose
- # of testing. These tests will be removed along with bigint.pl in
- # the next major release of perl.
- local $SIG{__WARN__} = sub {
- if ($_[0] !~ /will be removed from the Perl core distribution/) {
- print(STDERR @_);
- }
- };
- require "bigint.pl";
-}
-
-$test = 0;
-$| = 1;
-print "1..246\n";
-while (<DATA>) {
- chop;
- if (/^&/) {
- $f = $_;
- } else {
- ++$test;
- @args = split(/:/,$_,99);
- $ans = pop(@args);
- $try = "$f('" . join("','", @args) . "');";
- if (($ans1 = eval($try)) eq $ans) {
- print "ok $test\n";
- } else {
- print "not ok $test\n";
- print "# '$try' expected: '$ans' got: '$ans1'\n";
- }
- }
-}
-__END__
-&bnorm
-abc:NaN
- 1 a:NaN
-1bcd2:NaN
-11111b:NaN
-+1z:NaN
--1z:NaN
-0:+0
-+0:+0
-+00:+0
-+0 0 0:+0
-000000 0000000 00000:+0
--0:+0
--0000:+0
-+1:+1
-+01:+1
-+001:+1
-+00000100000:+100000
-123456789:+123456789
--1:-1
--01:-1
--001:-1
--123456789:-123456789
--00000100000:-100000
-&bneg
-abd:NaN
-+0:+0
-+1:-1
--1:+1
-+123456789:-123456789
--123456789:+123456789
-&babs
-abc:NaN
-+0:+0
-+1:+1
--1:+1
-+123456789:+123456789
--123456789:+123456789
-&bcmp
-abc:abc:
-abc:+0:
-+0:abc:
-+0:+0:0
--1:+0:-1
-+0:-1:1
-+1:+0:1
-+0:+1:-1
--1:+1:-1
-+1:-1:1
--1:-1:0
-+1:+1:0
-+123:+123:0
-+123:+12:1
-+12:+123:-1
--123:-123:0
--123:-12:-1
--12:-123:1
-+123:+124:-1
-+124:+123:1
--123:-124:1
--124:-123:-1
-&badd
-abc:abc:NaN
-abc:+0:NaN
-+0:abc:NaN
-+0:+0:+0
-+1:+0:+1
-+0:+1:+1
-+1:+1:+2
--1:+0:-1
-+0:-1:-1
--1:-1:-2
--1:+1:+0
-+1:-1:+0
-+9:+1:+10
-+99:+1:+100
-+999:+1:+1000
-+9999:+1:+10000
-+99999:+1:+100000
-+999999:+1:+1000000
-+9999999:+1:+10000000
-+99999999:+1:+100000000
-+999999999:+1:+1000000000
-+9999999999:+1:+10000000000
-+99999999999:+1:+100000000000
-+10:-1:+9
-+100:-1:+99
-+1000:-1:+999
-+10000:-1:+9999
-+100000:-1:+99999
-+1000000:-1:+999999
-+10000000:-1:+9999999
-+100000000:-1:+99999999
-+1000000000:-1:+999999999
-+10000000000:-1:+9999999999
-+123456789:+987654321:+1111111110
--123456789:+987654321:+864197532
--123456789:-987654321:-1111111110
-+123456789:-987654321:-864197532
-&bsub
-abc:abc:NaN
-abc:+0:NaN
-+0:abc:NaN
-+0:+0:+0
-+1:+0:+1
-+0:+1:-1
-+1:+1:+0
--1:+0:-1
-+0:-1:+1
--1:-1:+0
--1:+1:-2
-+1:-1:+2
-+9:+1:+8
-+99:+1:+98
-+999:+1:+998
-+9999:+1:+9998
-+99999:+1:+99998
-+999999:+1:+999998
-+9999999:+1:+9999998
-+99999999:+1:+99999998
-+999999999:+1:+999999998
-+9999999999:+1:+9999999998
-+99999999999:+1:+99999999998
-+10:-1:+11
-+100:-1:+101
-+1000:-1:+1001
-+10000:-1:+10001
-+100000:-1:+100001
-+1000000:-1:+1000001
-+10000000:-1:+10000001
-+100000000:-1:+100000001
-+1000000000:-1:+1000000001
-+10000000000:-1:+10000000001
-+123456789:+987654321:-864197532
--123456789:+987654321:-1111111110
--123456789:-987654321:+864197532
-+123456789:-987654321:+1111111110
-&bmul
-abc:abc:NaN
-abc:+0:NaN
-+0:abc:NaN
-+0:+0:+0
-+0:+1:+0
-+1:+0:+0
-+0:-1:+0
--1:+0:+0
-+123456789123456789:+0:+0
-+0:+123456789123456789:+0
--1:-1:+1
--1:+1:-1
-+1:-1:-1
-+1:+1:+1
-+2:+3:+6
--2:+3:-6
-+2:-3:-6
--2:-3:+6
-+111:+111:+12321
-+10101:+10101:+102030201
-+1001001:+1001001:+1002003002001
-+100010001:+100010001:+10002000300020001
-+10000100001:+10000100001:+100002000030000200001
-+11111111111:+9:+99999999999
-+22222222222:+9:+199999999998
-+33333333333:+9:+299999999997
-+44444444444:+9:+399999999996
-+55555555555:+9:+499999999995
-+66666666666:+9:+599999999994
-+77777777777:+9:+699999999993
-+88888888888:+9:+799999999992
-+99999999999:+9:+899999999991
-&bdiv
-abc:abc:NaN
-abc:+1:abc:NaN
-+1:abc:NaN
-+0:+0:NaN
-+0:+1:+0
-+1:+0:NaN
-+0:-1:+0
--1:+0:NaN
-+1:+1:+1
--1:-1:+1
-+1:-1:-1
--1:+1:-1
-+1:+2:+0
-+2:+1:+2
-+1000000000:+9:+111111111
-+2000000000:+9:+222222222
-+3000000000:+9:+333333333
-+4000000000:+9:+444444444
-+5000000000:+9:+555555555
-+6000000000:+9:+666666666
-+7000000000:+9:+777777777
-+8000000000:+9:+888888888
-+9000000000:+9:+1000000000
-+35500000:+113:+314159
-+71000000:+226:+314159
-+106500000:+339:+314159
-+1000000000:+3:+333333333
-+10:+5:+2
-+100:+4:+25
-+1000:+8:+125
-+10000:+16:+625
-+999999999999:+9:+111111111111
-+999999999999:+99:+10101010101
-+999999999999:+999:+1001001001
-+999999999999:+9999:+100010001
-+999999999999999:+99999:+10000100001
-&bmod
-abc:abc:NaN
-abc:+1:abc:NaN
-+1:abc:NaN
-+0:+0:NaN
-+0:+1:+0
-+1:+0:NaN
-+0:-1:+0
--1:+0:NaN
-+1:+1:+0
--1:-1:+0
-+1:-1:+0
--1:+1:+0
-+1:+2:+1
-+2:+1:+0
-+1000000000:+9:+1
-+2000000000:+9:+2
-+3000000000:+9:+3
-+4000000000:+9:+4
-+5000000000:+9:+5
-+6000000000:+9:+6
-+7000000000:+9:+7
-+8000000000:+9:+8
-+9000000000:+9:+0
-+35500000:+113:+33
-+71000000:+226:+66
-+106500000:+339:+99
-+1000000000:+3:+1
-+10:+5:+0
-+100:+4:+0
-+1000:+8:+0
-+10000:+16:+0
-+999999999999:+9:+0
-+999999999999:+99:+0
-+999999999999:+999:+0
-+999999999999:+9999:+0
-+999999999999999:+99999:+0
-&bgcd
-abc:abc:NaN
-abc:+0:NaN
-+0:abc:NaN
-+0:+0:+0
-+0:+1:+1
-+1:+0:+1
-+1:+1:+1
-+2:+3:+1
-+3:+2:+1
-+100:+625:+25
-+4096:+81:+1
Deleted: vendor/perl/dist/lib/bignum.pm
===================================================================
--- vendor/perl/dist/lib/bignum.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/bignum.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,681 +0,0 @@
-package bignum;
-use 5.006;
-
-$VERSION = '0.23';
-use Exporter;
- at ISA = qw( bigint );
- at EXPORT_OK = qw( PI e bexp bpi );
- at EXPORT = qw( inf NaN );
-
-use strict;
-use overload;
-require bigint; # no "use" to avoid import being called
-
-##############################################################################
-
-BEGIN
- {
- *inf = \&bigint::inf;
- *NaN = \&bigint::NaN;
- }
-
-# These are all alike, and thus faked by AUTOLOAD
-
-my @faked = qw/round_mode accuracy precision div_scale/;
-use vars qw/$VERSION $AUTOLOAD $_lite/; # _lite for testsuite
-
-sub AUTOLOAD
- {
- my $name = $AUTOLOAD;
-
- $name =~ s/.*:://; # split package
- no strict 'refs';
- foreach my $n (@faked)
- {
- if ($n eq $name)
- {
- *{"bignum::$name"} = sub
- {
- my $self = shift;
- no strict 'refs';
- if (defined $_[0])
- {
- Math::BigInt->$name($_[0]);
- return Math::BigFloat->$name($_[0]);
- }
- return Math::BigInt->$name();
- };
- return &$name;
- }
- }
-
- # delayed load of Carp and avoid recursion
- require Carp;
- Carp::croak ("Can't call bignum\-\>$name, not a valid method");
- }
-
-sub unimport
- {
- $^H{bignum} = undef; # no longer in effect
- overload::remove_constant('binary','','float','','integer');
- }
-
-sub in_effect
- {
- my $level = shift || 0;
- my $hinthash = (caller($level))[10];
- $hinthash->{bignum};
- }
-
-#############################################################################
-# the following two routines are for Perl 5.9.4 or later and are lexical
-
-sub _hex
- {
- return CORE::hex($_[0]) unless in_effect(1);
- my $i = $_[0];
- $i = '0x'.$i unless $i =~ /^0x/;
- Math::BigInt->new($i);
- }
-
-sub _oct
- {
- return CORE::oct($_[0]) unless in_effect(1);
- my $i = $_[0];
- return Math::BigInt->from_oct($i) if $i =~ /^0[0-7]/;
- Math::BigInt->new($i);
- }
-
-sub import
- {
- my $self = shift;
-
- $^H{bignum} = 1; # we are in effect
-
- my ($hex,$oct);
-
- # for newer Perls override hex() and oct() with a lexical version:
- if ($] > 5.009003)
- {
- $hex = \&_hex;
- $oct = \&_oct;
- }
-
- # some defaults
- my $lib = ''; my $lib_kind = 'try';
- my $upgrade = 'Math::BigFloat';
- my $downgrade = 'Math::BigInt';
-
- my @import = ( ':constant' ); # drive it w/ constant
- my @a = @_; my $l = scalar @_; my $j = 0;
- my ($ver,$trace); # version? trace?
- my ($a,$p); # accuracy, precision
- for ( my $i = 0; $i < $l ; $i++,$j++ )
- {
- if ($_[$i] eq 'upgrade')
- {
- # this causes upgrading
- $upgrade = $_[$i+1]; # or undef to disable
- my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..."
- splice @a, $j, $s; $j -= $s; $i++;
- }
- elsif ($_[$i] eq 'downgrade')
- {
- # this causes downgrading
- $downgrade = $_[$i+1]; # or undef to disable
- my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..."
- splice @a, $j, $s; $j -= $s; $i++;
- }
- elsif ($_[$i] =~ /^(l|lib|try|only)$/)
- {
- # this causes a different low lib to take care...
- $lib_kind = $1; $lib_kind = 'lib' if $lib_kind eq 'l';
- $lib = $_[$i+1] || '';
- my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..."
- splice @a, $j, $s; $j -= $s; $i++;
- }
- elsif ($_[$i] =~ /^(a|accuracy)$/)
- {
- $a = $_[$i+1];
- my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..."
- splice @a, $j, $s; $j -= $s; $i++;
- }
- elsif ($_[$i] =~ /^(p|precision)$/)
- {
- $p = $_[$i+1];
- my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..."
- splice @a, $j, $s; $j -= $s; $i++;
- }
- elsif ($_[$i] =~ /^(v|version)$/)
- {
- $ver = 1;
- splice @a, $j, 1; $j --;
- }
- elsif ($_[$i] =~ /^(t|trace)$/)
- {
- $trace = 1;
- splice @a, $j, 1; $j --;
- }
- elsif ($_[$i] eq 'hex')
- {
- splice @a, $j, 1; $j --;
- $hex = \&bigint::_hex_global;
- }
- elsif ($_[$i] eq 'oct')
- {
- splice @a, $j, 1; $j --;
- $oct = \&bigint::_oct_global;
- }
- elsif ($_[$i] !~ /^(PI|e|bexp|bpi)\z/)
- {
- die ("unknown option $_[$i]");
- }
- }
- my $class;
- $_lite = 0; # using M::BI::L ?
- if ($trace)
- {
- require Math::BigInt::Trace; $class = 'Math::BigInt::Trace';
- $upgrade = 'Math::BigFloat::Trace';
- }
- else
- {
- # see if we can find Math::BigInt::Lite
- if (!defined $a && !defined $p) # rounding won't work to well
- {
- eval 'require Math::BigInt::Lite;';
- if ($@ eq '')
- {
- @import = ( ); # :constant in Lite, not MBI
- Math::BigInt::Lite->import( ':constant' );
- $_lite= 1; # signal okay
- }
- }
- require Math::BigInt if $_lite == 0; # not already loaded?
- $class = 'Math::BigInt'; # regardless of MBIL or not
- }
- push @import, $lib_kind => $lib if $lib ne '';
- # Math::BigInt::Trace or plain Math::BigInt
- $class->import(@import, upgrade => $upgrade);
-
- if ($trace)
- {
- require Math::BigFloat::Trace; $class = 'Math::BigFloat::Trace';
- $downgrade = 'Math::BigInt::Trace';
- }
- else
- {
- require Math::BigFloat; $class = 'Math::BigFloat';
- }
- $class->import(':constant','downgrade',$downgrade);
-
- bignum->accuracy($a) if defined $a;
- bignum->precision($p) if defined $p;
- if ($ver)
- {
- print "bignum\t\t\t v$VERSION\n";
- print "Math::BigInt::Lite\t v$Math::BigInt::Lite::VERSION\n" if $_lite;
- print "Math::BigInt\t\t v$Math::BigInt::VERSION";
- my $config = Math::BigInt->config();
- print " lib => $config->{lib} v$config->{lib_version}\n";
- print "Math::BigFloat\t\t v$Math::BigFloat::VERSION\n";
- exit;
- }
-
- # Take care of octal/hexadecimal constants
- overload::constant binary => sub { bigint::_binary_constant(shift) };
-
- # if another big* was already loaded:
- my ($package) = caller();
-
- no strict 'refs';
- if (!defined *{"${package}::inf"})
- {
- $self->export_to_level(1,$self, at a); # export inf and NaN
- }
- {
- no warnings 'redefine';
- *CORE::GLOBAL::oct = $oct if $oct;
- *CORE::GLOBAL::hex = $hex if $hex;
- }
- }
-
-sub PI () { Math::BigFloat->new('3.141592653589793238462643383279502884197'); }
-sub e () { Math::BigFloat->new('2.718281828459045235360287471352662497757'); }
-sub bpi ($) { Math::BigFloat::bpi(@_); }
-sub bexp ($$) { my $x = Math::BigFloat->new($_[0]); $x->bexp($_[1]); }
-
-1;
-
-__END__
-
-=head1 NAME
-
-bignum - Transparent BigNumber support for Perl
-
-=head1 SYNOPSIS
-
- use bignum;
-
- $x = 2 + 4.5,"\n"; # BigFloat 6.5
- print 2 ** 512 * 0.1,"\n"; # really is what you think it is
- print inf * inf,"\n"; # prints inf
- print NaN * 3,"\n"; # prints NaN
-
- {
- no bignum;
- print 2 ** 256,"\n"; # a normal Perl scalar now
- }
-
- # for older Perls, note that this will be global:
- use bignum qw/hex oct/;
- print hex("0x1234567890123490"),"\n";
- print oct("01234567890123490"),"\n";
-
-=head1 DESCRIPTION
-
-All operators (including basic math operations) are overloaded. Integer and
-floating-point constants are created as proper BigInts or BigFloats,
-respectively.
-
-If you do
-
- use bignum;
-
-at the top of your script, Math::BigFloat and Math::BigInt will be loaded
-and any constant number will be converted to an object (Math::BigFloat for
-floats like 3.1415 and Math::BigInt for integers like 1234).
-
-So, the following line:
-
- $x = 1234;
-
-creates actually a Math::BigInt and stores a reference to in $x.
-This happens transparently and behind your back, so to speak.
-
-You can see this with the following:
-
- perl -Mbignum -le 'print ref(1234)'
-
-Don't worry if it says Math::BigInt::Lite, bignum and friends will use Lite
-if it is installed since it is faster for some operations. It will be
-automatically upgraded to BigInt whenever necessary:
-
- perl -Mbignum -le 'print ref(2**255)'
-
-This also means it is a bad idea to check for some specific package, since
-the actual contents of $x might be something unexpected. Due to the
-transparent way of bignum C<ref()> should not be necessary, anyway.
-
-Since Math::BigInt and BigFloat also overload the normal math operations,
-the following line will still work:
-
- perl -Mbignum -le 'print ref(1234+1234)'
-
-Since numbers are actually objects, you can call all the usual methods from
-BigInt/BigFloat on them. This even works to some extent on expressions:
-
- perl -Mbignum -le '$x = 1234; print $x->bdec()'
- perl -Mbignum -le 'print 1234->copy()->binc();'
- perl -Mbignum -le 'print 1234->copy()->binc->badd(6);'
- perl -Mbignum -le 'print +(1234)->copy()->binc()'
-
-(Note that print doesn't do what you expect if the expression starts with
-'(' hence the C<+>)
-
-You can even chain the operations together as usual:
-
- perl -Mbignum -le 'print 1234->copy()->binc->badd(6);'
- 1241
-
-Under bignum (or bigint or bigrat), Perl will "upgrade" the numbers
-appropriately. This means that:
-
- perl -Mbignum -le 'print 1234+4.5'
- 1238.5
-
-will work correctly. These mixed cases don't do always work when using
-Math::BigInt or Math::BigFloat alone, or at least not in the way normal Perl
-scalars work.
-
-If you do want to work with large integers like under C<use integer;>, try
-C<use bigint;>:
-
- perl -Mbigint -le 'print 1234.5+4.5'
- 1238
-
-There is also C<use bigrat;> which gives you big rationals:
-
- perl -Mbigrat -le 'print 1234+4.1'
- 12381/10
-
-The entire upgrading/downgrading is still experimental and might not work
-as you expect or may even have bugs. You might get errors like this:
-
- Can't use an undefined value as an ARRAY reference at
- /usr/local/lib/perl5/5.8.0/Math/BigInt/Calc.pm line 864
-
-This means somewhere a routine got a BigFloat/Lite but expected a BigInt (or
-vice versa) and the upgrade/downgrad path was missing. This is a bug, please
-report it so that we can fix it.
-
-You might consider using just Math::BigInt or Math::BigFloat, since they
-allow you finer control over what get's done in which module/space. For
-instance, simple loop counters will be Math::BigInts under C<use bignum;> and
-this is slower than keeping them as Perl scalars:
-
- perl -Mbignum -le 'for ($i = 0; $i < 10; $i++) { print ref($i); }'
-
-Please note the following does not work as expected (prints nothing), since
-overloading of '..' is not yet possible in Perl (as of v5.8.0):
-
- perl -Mbignum -le 'for (1..2) { print ref($_); }'
-
-=head2 Options
-
-bignum recognizes some options that can be passed while loading it via use.
-The options can (currently) be either a single letter form, or the long form.
-The following options exist:
-
-=over 2
-
-=item a or accuracy
-
-This sets the accuracy for all math operations. The argument must be greater
-than or equal to zero. See Math::BigInt's bround() function for details.
-
- perl -Mbignum=a,50 -le 'print sqrt(20)'
-
-Note that setting precision and accurary at the same time is not possible.
-
-=item p or precision
-
-This sets the precision for all math operations. The argument can be any
-integer. Negative values mean a fixed number of digits after the dot, while
-a positive value rounds to this digit left from the dot. 0 or 1 mean round to
-integer. See Math::BigInt's bfround() function for details.
-
- perl -Mbignum=p,-50 -le 'print sqrt(20)'
-
-Note that setting precision and accurary at the same time is not possible.
-
-=item t or trace
-
-This enables a trace mode and is primarily for debugging bignum or
-Math::BigInt/Math::BigFloat.
-
-=item l or lib
-
-Load a different math lib, see L<MATH LIBRARY>.
-
- perl -Mbignum=l,GMP -e 'print 2 ** 512'
-
-Currently there is no way to specify more than one library on the command
-line. This means the following does not work:
-
- perl -Mbignum=l,GMP,Pari -e 'print 2 ** 512'
-
-This will be hopefully fixed soon ;)
-
-=item hex
-
-Override the built-in hex() method with a version that can handle big
-integers. Note that under Perl older than v5.9.4, this will be global
-and cannot be disabled with "no bigint;".
-
-=item oct
-
-Override the built-in oct() method with a version that can handle big
-integers. Note that under Perl older than v5.9.4, this will be global
-and cannot be disabled with "no bigint;".
-
-=item v or version
-
-This prints out the name and version of all modules used and then exits.
-
- perl -Mbignum=v
-
-=back
-
-=head2 Methods
-
-Beside import() and AUTOLOAD() there are only a few other methods.
-
-Since all numbers are now objects, you can use all functions that are part of
-the BigInt or BigFloat API. It is wise to use only the bxxx() notation, and not
-the fxxx() notation, though. This makes it possible that the underlying object
-might morph into a different class than BigFloat.
-
-=head2 Caveats
-
-But a warning is in order. When using the following to make a copy of a number,
-only a shallow copy will be made.
-
- $x = 9; $y = $x;
- $x = $y = 7;
-
-If you want to make a real copy, use the following:
-
- $y = $x->copy();
-
-Using the copy or the original with overloaded math is okay, e.g. the
-following work:
-
- $x = 9; $y = $x;
- print $x + 1, " ", $y,"\n"; # prints 10 9
-
-but calling any method that modifies the number directly will result in
-B<both> the original and the copy being destroyed:
-
- $x = 9; $y = $x;
- print $x->badd(1), " ", $y,"\n"; # prints 10 10
-
- $x = 9; $y = $x;
- print $x->binc(1), " ", $y,"\n"; # prints 10 10
-
- $x = 9; $y = $x;
- print $x->bmul(2), " ", $y,"\n"; # prints 18 18
-
-Using methods that do not modify, but test the contents works:
-
- $x = 9; $y = $x;
- $z = 9 if $x->is_zero(); # works fine
-
-See the documentation about the copy constructor and C<=> in overload, as
-well as the documentation in BigInt for further details.
-
-=over 2
-
-=item inf()
-
-A shortcut to return Math::BigInt->binf(). Useful because Perl does not always
-handle bareword C<inf> properly.
-
-=item NaN()
-
-A shortcut to return Math::BigInt->bnan(). Useful because Perl does not always
-handle bareword C<NaN> properly.
-
-=item e
-
- # perl -Mbignum=e -wle 'print e'
-
-Returns Euler's number C<e>, aka exp(1).
-
-=item PI()
-
- # perl -Mbignum=PI -wle 'print PI'
-
-Returns PI.
-
-=item bexp()
-
- bexp($power,$accuracy);
-
-Returns Euler's number C<e> raised to the appropriate power, to
-the wanted accuracy.
-
-Example:
-
- # perl -Mbignum=bexp -wle 'print bexp(1,80)'
-
-=item bpi()
-
- bpi($accuracy);
-
-Returns PI to the wanted accuracy.
-
-Example:
-
- # perl -Mbignum=bpi -wle 'print bpi(80)'
-
-=item upgrade()
-
-Return the class that numbers are upgraded to, is in fact returning
-C<$Math::BigInt::upgrade>.
-
-=item in_effect()
-
- use bignum;
-
- print "in effect\n" if bignum::in_effect; # true
- {
- no bignum;
- print "in effect\n" if bignum::in_effect; # false
- }
-
-Returns true or false if C<bignum> is in effect in the current scope.
-
-This method only works on Perl v5.9.4 or later.
-
-=back
-
-=head2 Math Library
-
-Math with the numbers is done (by default) by a module called
-Math::BigInt::Calc. This is equivalent to saying:
-
- use bignum lib => 'Calc';
-
-You can change this by using:
-
- use bignum lib => 'GMP';
-
-The following would first try to find Math::BigInt::Foo, then
-Math::BigInt::Bar, and when this also fails, revert to Math::BigInt::Calc:
-
- use bignum lib => 'Foo,Math::BigInt::Bar';
-
-Please see respective module documentation for further details.
-
-Using C<lib> warns if none of the specified libraries can be found and
-L<Math::BigInt> did fall back to one of the default libraries.
-To supress this warning, use C<try> instead:
-
- use bignum try => 'GMP';
-
-If you want the code to die instead of falling back, use C<only> instead:
-
- use bignum only => 'GMP';
-
-=head2 INTERNAL FORMAT
-
-The numbers are stored as objects, and their internals might change at anytime,
-especially between math operations. The objects also might belong to different
-classes, like Math::BigInt, or Math::BigFLoat. Mixing them together, even
-with normal scalars is not extraordinary, but normal and expected.
-
-You should not depend on the internal format, all accesses must go through
-accessor methods. E.g. looking at $x->{sign} is not a bright idea since there
-is no guaranty that the object in question has such a hashkey, nor is a hash
-underneath at all.
-
-=head2 SIGN
-
-The sign is either '+', '-', 'NaN', '+inf' or '-inf' and stored seperately.
-You can access it with the sign() method.
-
-A sign of 'NaN' is used to represent the result when input arguments are not
-numbers or as a result of 0/0. '+inf' and '-inf' represent plus respectively
-minus infinity. You will get '+inf' when dividing a positive number by 0, and
-'-inf' when dividing any negative number by 0.
-
-=head1 CAVAETS
-
-=over 2
-
-=item in_effect()
-
-This method only works on Perl v5.9.4 or later.
-
-=item hex()/oct()
-
-C<bigint> overrides these routines with versions that can also handle
-big integer values. Under Perl prior to version v5.9.4, however, this
-will not happen unless you specifically ask for it with the two
-import tags "hex" and "oct" - and then it will be global and cannot be
-disabled inside a scope with "no bigint":
-
- use bigint qw/hex oct/;
-
- print hex("0x1234567890123456");
- {
- no bigint;
- print hex("0x1234567890123456");
- }
-
-The second call to hex() will warn about a non-portable constant.
-
-Compare this to:
-
- use bigint;
-
- # will warn only under older than v5.9.4
- print hex("0x1234567890123456");
-
-=back
-
-=head1 MODULES USED
-
-C<bignum> is just a thin wrapper around various modules of the Math::BigInt
-family. Think of it as the head of the family, who runs the shop, and orders
-the others to do the work.
-
-The following modules are currently used by bignum:
-
- Math::BigInt::Lite (for speed, and only if it is loadable)
- Math::BigInt
- Math::BigFloat
-
-=head1 EXAMPLES
-
-Some cool command line examples to impress the Python crowd ;)
-
- perl -Mbignum -le 'print sqrt(33)'
- perl -Mbignum -le 'print 2*255'
- perl -Mbignum -le 'print 4.5+2*255'
- perl -Mbignum -le 'print 3/7 + 5/7 + 8/3'
- perl -Mbignum -le 'print 123->is_odd()'
- perl -Mbignum -le 'print log(2)'
- perl -Mbignum -le 'print exp(1)'
- perl -Mbignum -le 'print 2 ** 0.5'
- perl -Mbignum=a,65 -le 'print 2 ** 0.2'
- perl -Mbignum=a,65,l,GMP -le 'print 7 ** 7777'
-
-=head1 LICENSE
-
-This program is free software; you may redistribute it and/or modify it under
-the same terms as Perl itself.
-
-=head1 SEE ALSO
-
-Especially L<bigrat> as in C<perl -Mbigrat -le 'print 1/3+1/4'>.
-
-L<Math::BigFloat>, L<Math::BigInt>, L<Math::BigRat> and L<Math::Big> as well
-as L<Math::BigInt::BitVect>, L<Math::BigInt::Pari> and L<Math::BigInt::GMP>.
-
-=head1 AUTHORS
-
-(C) by Tels L<http://bloodgate.com/> in early 2002 - 2007.
-
-=cut
Deleted: vendor/perl/dist/lib/bigrat.pl
===================================================================
--- vendor/perl/dist/lib/bigrat.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/bigrat.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,159 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-package bigrat;
-require "bigint.pl";
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Arbitrary size rational math package
-
-# by Mark Biggar
-#
-# Input values to these routines consist of strings of the form
-# m|^\s*[+-]?[\d\s]+(/[\d\s]+)?$|.
-# Examples:
-# "+0/1" canonical zero value
-# "3" canonical value "+3/1"
-# " -123/123 123" canonical value "-1/1001"
-# "123 456/7890" canonical value "+20576/1315"
-# Output values always include a sign and no leading zeros or
-# white space.
-# This package makes use of the bigint package.
-# The string 'NaN' is used to represent the result when input arguments
-# that are not numbers, as well as the result of dividing by zero and
-# the sqrt of a negative number.
-# Extremely naive algorithms are used.
-#
-# Routines provided are:
-#
-# rneg(RAT) return RAT negation
-# rabs(RAT) return RAT absolute value
-# rcmp(RAT,RAT) return CODE compare numbers (undef,<0,=0,>0)
-# radd(RAT,RAT) return RAT addition
-# rsub(RAT,RAT) return RAT subtraction
-# rmul(RAT,RAT) return RAT multiplication
-# rdiv(RAT,RAT) return RAT division
-# rmod(RAT) return (RAT,RAT) integer and fractional parts
-# rnorm(RAT) return RAT normalization
-# rsqrt(RAT, cycles) return RAT square root
-
-# Convert a number to the canonical string form m|^[+-]\d+/\d+|.
-sub main'rnorm { #(string) return rat_num
- local($_) = @_;
- s/\s+//g;
- if (m#^([+-]?\d+)(/(\d*[1-9]0*))?$#) {
- &norm($1, $3 ? $3 : '+1');
- } else {
- 'NaN';
- }
-}
-
-# Normalize by reducing to lowest terms
-sub norm { #(bint, bint) return rat_num
- local($num,$dom) = @_;
- if ($num eq 'NaN') {
- 'NaN';
- } elsif ($dom eq 'NaN') {
- 'NaN';
- } elsif ($dom =~ /^[+-]?0+$/) {
- 'NaN';
- } else {
- local($gcd) = &'bgcd($num,$dom);
- $gcd =~ s/^-/+/;
- if ($gcd ne '+1') {
- $num = &'bdiv($num,$gcd);
- $dom = &'bdiv($dom,$gcd);
- } else {
- $num = &'bnorm($num);
- $dom = &'bnorm($dom);
- }
- substr($dom,0,1) = '';
- "$num/$dom";
- }
-}
-
-# negation
-sub main'rneg { #(rat_num) return rat_num
- local($_) = &'rnorm(@_);
- tr/-+/+-/ if ($_ ne '+0/1');
- $_;
-}
-
-# absolute value
-sub main'rabs { #(rat_num) return $rat_num
- local($_) = &'rnorm(@_);
- substr($_,0,1) = '+' unless $_ eq 'NaN';
- $_;
-}
-
-# multipication
-sub main'rmul { #(rat_num, rat_num) return rat_num
- local($xn,$xd) = split('/',&'rnorm($_[0]));
- local($yn,$yd) = split('/',&'rnorm($_[1]));
- &norm(&'bmul($xn,$yn),&'bmul($xd,$yd));
-}
-
-# division
-sub main'rdiv { #(rat_num, rat_num) return rat_num
- local($xn,$xd) = split('/',&'rnorm($_[0]));
- local($yn,$yd) = split('/',&'rnorm($_[1]));
- &norm(&'bmul($xn,$yd),&'bmul($xd,$yn));
-}
-
-# addition
-sub main'radd { #(rat_num, rat_num) return rat_num
- local($xn,$xd) = split('/',&'rnorm($_[0]));
- local($yn,$yd) = split('/',&'rnorm($_[1]));
- &norm(&'badd(&'bmul($xn,$yd),&'bmul($yn,$xd)),&'bmul($xd,$yd));
-}
-
-# subtraction
-sub main'rsub { #(rat_num, rat_num) return rat_num
- local($xn,$xd) = split('/',&'rnorm($_[0]));
- local($yn,$yd) = split('/',&'rnorm($_[1]));
- &norm(&'bsub(&'bmul($xn,$yd),&'bmul($yn,$xd)),&'bmul($xd,$yd));
-}
-
-# comparison
-sub main'rcmp { #(rat_num, rat_num) return cond_code
- local($xn,$xd) = split('/',&'rnorm($_[0]));
- local($yn,$yd) = split('/',&'rnorm($_[1]));
- &bigint'cmp(&'bmul($xn,$yd),&'bmul($yn,$xd));
-}
-
-# int and frac parts
-sub main'rmod { #(rat_num) return (rat_num,rat_num)
- local($xn,$xd) = split('/',&'rnorm(@_));
- local($i,$f) = &'bdiv($xn,$xd);
- if (wantarray) {
- ("$i/1", "$f/$xd");
- } else {
- "$i/1";
- }
-}
-
-# square root by Newtons method.
-# cycles specifies the number of iterations default: 5
-sub main'rsqrt { #(fnum_str[, cycles]) return fnum_str
- local($x, $scale) = (&'rnorm($_[0]), $_[1]);
- if ($x eq 'NaN') {
- 'NaN';
- } elsif ($x =~ /^-/) {
- 'NaN';
- } else {
- local($gscale, $guess) = (0, '+1/1');
- $scale = 5 if (!$scale);
- while ($gscale++ < $scale) {
- $guess = &'rmul(&'radd($guess,&'rdiv($x,$guess)),"+1/2");
- }
- "$guess"; # quotes necessary due to perl bug
- }
-}
-
-1;
Deleted: vendor/perl/dist/lib/bigrat.pm
===================================================================
--- vendor/perl/dist/lib/bigrat.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/bigrat.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,566 +0,0 @@
-package bigrat;
-use 5.006;
-
-$VERSION = '0.23';
-require Exporter;
- at ISA = qw( bigint );
- at EXPORT_OK = qw( PI e bpi bexp );
- at EXPORT = qw( inf NaN );
-
-use strict;
-use overload;
-require bigint; # no "use" to avoid callind import
-
-##############################################################################
-
-BEGIN
- {
- *inf = \&bigint::inf;
- *NaN = \&bigint::NaN;
- }
-
-# These are all alike, and thus faked by AUTOLOAD
-
-my @faked = qw/round_mode accuracy precision div_scale/;
-use vars qw/$VERSION $AUTOLOAD $_lite/; # _lite for testsuite
-
-sub AUTOLOAD
- {
- my $name = $AUTOLOAD;
-
- $name =~ s/.*:://; # split package
- no strict 'refs';
- foreach my $n (@faked)
- {
- if ($n eq $name)
- {
- *{"bigrat::$name"} = sub
- {
- my $self = shift;
- no strict 'refs';
- if (defined $_[0])
- {
- Math::BigInt->$name($_[0]);
- Math::BigFloat->$name($_[0]);
- return Math::BigRat->$name($_[0]);
- }
- return Math::BigInt->$name();
- };
- return &$name;
- }
- }
-
- # delayed load of Carp and avoid recursion
- require Carp;
- Carp::croak ("Can't call bigrat\-\>$name, not a valid method");
- }
-
-sub unimport
- {
- $^H{bigrat} = undef; # no longer in effect
- overload::remove_constant('binary','','float','','integer');
- }
-
-sub in_effect
- {
- my $level = shift || 0;
- my $hinthash = (caller($level))[10];
- $hinthash->{bigrat};
- }
-
-#############################################################################
-# the following two routines are for Perl 5.9.4 or later and are lexical
-
-sub _hex
- {
- return CORE::hex($_[0]) unless in_effect(1);
- my $i = $_[0];
- $i = '0x'.$i unless $i =~ /^0x/;
- Math::BigInt->new($i);
- }
-
-sub _oct
- {
- return CORE::oct($_[0]) unless in_effect(1);
- my $i = $_[0];
- return Math::BigInt->from_oct($i) if $i =~ /^0[0-7]/;
- Math::BigInt->new($i);
- }
-
-sub import
- {
- my $self = shift;
-
- # see also bignum->import() for additional comments
-
- $^H{bigrat} = 1; # we are in effect
-
- my ($hex,$oct);
- # for newer Perls always override hex() and oct() with a lexical version:
- if ($] > 5.009004)
- {
- $oct = \&_oct;
- $hex = \&_hex;
- }
- # some defaults
- my $lib = ''; my $lib_kind = 'try'; my $upgrade = 'Math::BigFloat';
-
- my @import = ( ':constant' ); # drive it w/ constant
- my @a = @_; my $l = scalar @_; my $j = 0;
- my ($a,$p);
- my ($ver,$trace); # version? trace?
- for ( my $i = 0; $i < $l ; $i++,$j++ )
- {
- if ($_[$i] eq 'upgrade')
- {
- # this causes upgrading
- $upgrade = $_[$i+1]; # or undef to disable
- my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..."
- splice @a, $j, $s; $j -= $s;
- }
- elsif ($_[$i] =~ /^(l|lib|try|only)$/)
- {
- # this causes a different low lib to take care...
- $lib_kind = $1; $lib_kind = 'lib' if $lib_kind eq 'l';
- $lib = $_[$i+1] || '';
- my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..."
- splice @a, $j, $s; $j -= $s; $i++;
- }
- elsif ($_[$i] =~ /^(a|accuracy)$/)
- {
- $a = $_[$i+1];
- my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..."
- splice @a, $j, $s; $j -= $s; $i++;
- }
- elsif ($_[$i] =~ /^(p|precision)$/)
- {
- $p = $_[$i+1];
- my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..."
- splice @a, $j, $s; $j -= $s; $i++;
- }
- elsif ($_[$i] =~ /^(v|version)$/)
- {
- $ver = 1;
- splice @a, $j, 1; $j --;
- }
- elsif ($_[$i] =~ /^(t|trace)$/)
- {
- $trace = 1;
- splice @a, $j, 1; $j --;
- }
- elsif ($_[$i] eq 'hex')
- {
- splice @a, $j, 1; $j --;
- $hex = \&bigint::_hex_global;
- }
- elsif ($_[$i] eq 'oct')
- {
- splice @a, $j, 1; $j --;
- $oct = \&bigint::_oct_global;
- }
- elsif ($_[$i] !~ /^(PI|e|bpi|bexp)\z/)
- {
- die ("unknown option $_[$i]");
- }
- }
- my $class;
- $_lite = 0; # using M::BI::L ?
- if ($trace)
- {
- require Math::BigInt::Trace; $class = 'Math::BigInt::Trace';
- $upgrade = 'Math::BigFloat::Trace';
- }
- else
- {
- # see if we can find Math::BigInt::Lite
- if (!defined $a && !defined $p) # rounding won't work to well
- {
- eval 'require Math::BigInt::Lite;';
- if ($@ eq '')
- {
- @import = ( ); # :constant in Lite, not MBI
- Math::BigInt::Lite->import( ':constant' );
- $_lite= 1; # signal okay
- }
- }
- require Math::BigInt if $_lite == 0; # not already loaded?
- $class = 'Math::BigInt'; # regardless of MBIL or not
- }
- push @import, $lib_kind => $lib if $lib ne '';
- # Math::BigInt::Trace or plain Math::BigInt
- $class->import(@import, upgrade => $upgrade);
-
- require Math::BigFloat;
- Math::BigFloat->import( upgrade => 'Math::BigRat', ':constant' );
- require Math::BigRat;
-
- bigrat->accuracy($a) if defined $a;
- bigrat->precision($p) if defined $p;
- if ($ver)
- {
- print "bigrat\t\t\t v$VERSION\n";
- print "Math::BigInt::Lite\t v$Math::BigInt::Lite::VERSION\n" if $_lite;
- print "Math::BigInt\t\t v$Math::BigInt::VERSION";
- my $config = Math::BigInt->config();
- print " lib => $config->{lib} v$config->{lib_version}\n";
- print "Math::BigFloat\t\t v$Math::BigFloat::VERSION\n";
- print "Math::BigRat\t\t v$Math::BigRat::VERSION\n";
- exit;
- }
-
- # Take care of octal/hexadecimal constants
- overload::constant binary => sub { bigint::_binary_constant(shift) };
-
- # if another big* was already loaded:
- my ($package) = caller();
-
- no strict 'refs';
- if (!defined *{"${package}::inf"})
- {
- $self->export_to_level(1,$self, at a); # export inf and NaN
- }
- {
- no warnings 'redefine';
- *CORE::GLOBAL::oct = $oct if $oct;
- *CORE::GLOBAL::hex = $hex if $hex;
- }
- }
-
-sub PI () { Math::BigFloat->new('3.141592653589793238462643383279502884197'); }
-sub e () { Math::BigFloat->new('2.718281828459045235360287471352662497757'); }
-
-sub bpi ($) { local $Math::BigFloat::upgrade; Math::BigFloat::bpi(@_); }
-
-sub bexp ($$)
- {
- local $Math::BigFloat::upgrade;
- my $x = Math::BigFloat->new($_[0]); $x->bexp($_[1]);
- }
-
-1;
-
-__END__
-
-=head1 NAME
-
-bigrat - Transparent BigNumber/BigRational support for Perl
-
-=head1 SYNOPSIS
-
- use bigrat;
-
- print 2 + 4.5,"\n"; # BigFloat 6.5
- print 1/3 + 1/4,"\n"; # produces 7/12
-
- {
- no bigrat;
- print 1/3,"\n"; # 0.33333...
- }
-
- # Note that this will make hex() and oct() be globally overriden:
- use bigrat qw/hex oct/;
- print hex("0x1234567890123490"),"\n";
- print oct("01234567890123490"),"\n";
-
-=head1 DESCRIPTION
-
-All operators (including basic math operations) are overloaded. Integer and
-floating-point constants are created as proper BigInts or BigFloats,
-respectively.
-
-Other than L<bignum>, this module upgrades to Math::BigRat, meaning that
-instead of 2.5 you will get 2+1/2 as output.
-
-=head2 Modules Used
-
-C<bigrat> is just a thin wrapper around various modules of the Math::BigInt
-family. Think of it as the head of the family, who runs the shop, and orders
-the others to do the work.
-
-The following modules are currently used by bignum:
-
- Math::BigInt::Lite (for speed, and only if it is loadable)
- Math::BigInt
- Math::BigFloat
- Math::BigRat
-
-=head2 Math Library
-
-Math with the numbers is done (by default) by a module called
-Math::BigInt::Calc. This is equivalent to saying:
-
- use bigrat lib => 'Calc';
-
-You can change this by using:
-
- use bignum lib => 'GMP';
-
-The following would first try to find Math::BigInt::Foo, then
-Math::BigInt::Bar, and when this also fails, revert to Math::BigInt::Calc:
-
- use bigrat lib => 'Foo,Math::BigInt::Bar';
-
-Using C<lib> warns if none of the specified libraries can be found and
-L<Math::BigInt> did fall back to one of the default libraries.
-To supress this warning, use C<try> instead:
-
- use bignum try => 'GMP';
-
-If you want the code to die instead of falling back, use C<only> instead:
-
- use bignum only => 'GMP';
-
-Please see respective module documentation for further details.
-
-=head2 Sign
-
-The sign is either '+', '-', 'NaN', '+inf' or '-inf'.
-
-A sign of 'NaN' is used to represent the result when input arguments are not
-numbers or as a result of 0/0. '+inf' and '-inf' represent plus respectively
-minus infinity. You will get '+inf' when dividing a positive number by 0, and
-'-inf' when dividing any negative number by 0.
-
-=head2 Methods
-
-Since all numbers are not objects, you can use all functions that are part of
-the BigInt or BigFloat API. It is wise to use only the bxxx() notation, and not
-the fxxx() notation, though. This makes you independed on the fact that the
-underlying object might morph into a different class than BigFloat.
-
-=over 2
-
-=item inf()
-
-A shortcut to return Math::BigInt->binf(). Useful because Perl does not always
-handle bareword C<inf> properly.
-
-=item NaN()
-
-A shortcut to return Math::BigInt->bnan(). Useful because Perl does not always
-handle bareword C<NaN> properly.
-
-=item e
-
- # perl -Mbigrat=e -wle 'print e'
-
-Returns Euler's number C<e>, aka exp(1).
-
-=item PI
-
- # perl -Mbigrat=PI -wle 'print PI'
-
-Returns PI.
-
-=item bexp()
-
- bexp($power,$accuracy);
-
-
-Returns Euler's number C<e> raised to the appropriate power, to
-the wanted accuracy.
-
-Example:
-
- # perl -Mbigrat=bexp -wle 'print bexp(1,80)'
-
-=item bpi()
-
- bpi($accuracy);
-
-Returns PI to the wanted accuracy.
-
-Example:
-
- # perl -Mbigrat=bpi -wle 'print bpi(80)'
-
-=item upgrade()
-
-Return the class that numbers are upgraded to, is in fact returning
-C<$Math::BigInt::upgrade>.
-
-=item in_effect()
-
- use bigrat;
-
- print "in effect\n" if bigrat::in_effect; # true
- {
- no bigrat;
- print "in effect\n" if bigrat::in_effect; # false
- }
-
-Returns true or false if C<bigrat> is in effect in the current scope.
-
-This method only works on Perl v5.9.4 or later.
-
-=back
-
-=head2 MATH LIBRARY
-
-Math with the numbers is done (by default) by a module called
-
-=head2 Cavaet
-
-But a warning is in order. When using the following to make a copy of a number,
-only a shallow copy will be made.
-
- $x = 9; $y = $x;
- $x = $y = 7;
-
-If you want to make a real copy, use the following:
-
- $y = $x->copy();
-
-Using the copy or the original with overloaded math is okay, e.g. the
-following work:
-
- $x = 9; $y = $x;
- print $x + 1, " ", $y,"\n"; # prints 10 9
-
-but calling any method that modifies the number directly will result in
-B<both> the original and the copy being destroyed:
-
- $x = 9; $y = $x;
- print $x->badd(1), " ", $y,"\n"; # prints 10 10
-
- $x = 9; $y = $x;
- print $x->binc(1), " ", $y,"\n"; # prints 10 10
-
- $x = 9; $y = $x;
- print $x->bmul(2), " ", $y,"\n"; # prints 18 18
-
-Using methods that do not modify, but testthe contents works:
-
- $x = 9; $y = $x;
- $z = 9 if $x->is_zero(); # works fine
-
-See the documentation about the copy constructor and C<=> in overload, as
-well as the documentation in BigInt for further details.
-
-=head2 Options
-
-bignum recognizes some options that can be passed while loading it via use.
-The options can (currently) be either a single letter form, or the long form.
-The following options exist:
-
-=over 2
-
-=item a or accuracy
-
-This sets the accuracy for all math operations. The argument must be greater
-than or equal to zero. See Math::BigInt's bround() function for details.
-
- perl -Mbigrat=a,50 -le 'print sqrt(20)'
-
-Note that setting precision and accurary at the same time is not possible.
-
-=item p or precision
-
-This sets the precision for all math operations. The argument can be any
-integer. Negative values mean a fixed number of digits after the dot, while
-a positive value rounds to this digit left from the dot. 0 or 1 mean round to
-integer. See Math::BigInt's bfround() function for details.
-
- perl -Mbigrat=p,-50 -le 'print sqrt(20)'
-
-Note that setting precision and accurary at the same time is not possible.
-
-=item t or trace
-
-This enables a trace mode and is primarily for debugging bignum or
-Math::BigInt/Math::BigFloat.
-
-=item l or lib
-
-Load a different math lib, see L<MATH LIBRARY>.
-
- perl -Mbigrat=l,GMP -e 'print 2 ** 512'
-
-Currently there is no way to specify more than one library on the command
-line. This means the following does not work:
-
- perl -Mbignum=l,GMP,Pari -e 'print 2 ** 512'
-
-This will be hopefully fixed soon ;)
-
-=item hex
-
-Override the built-in hex() method with a version that can handle big
-integers. Note that under Perl v5.9.4 or ealier, this will be global
-and cannot be disabled with "no bigint;".
-
-=item oct
-
-Override the built-in oct() method with a version that can handle big
-integers. Note that under Perl v5.9.4 or ealier, this will be global
-and cannot be disabled with "no bigint;".
-
-=item v or version
-
-This prints out the name and version of all modules used and then exits.
-
- perl -Mbigrat=v
-
-=back
-
-=head1 CAVAETS
-
-=over 2
-
-=item in_effect()
-
-This method only works on Perl v5.9.4 or later.
-
-=item hex()/oct()
-
-C<bigint> overrides these routines with versions that can also handle
-big integer values. Under Perl prior to version v5.9.4, however, this
-will not happen unless you specifically ask for it with the two
-import tags "hex" and "oct" - and then it will be global and cannot be
-disabled inside a scope with "no bigint":
-
- use bigint qw/hex oct/;
-
- print hex("0x1234567890123456");
- {
- no bigint;
- print hex("0x1234567890123456");
- }
-
-The second call to hex() will warn about a non-portable constant.
-
-Compare this to:
-
- use bigint;
-
- # will warn only under Perl older than v5.9.4
- print hex("0x1234567890123456");
-
-=back
-
-=head1 EXAMPLES
-
- perl -Mbigrat -le 'print sqrt(33)'
- perl -Mbigrat -le 'print 2*255'
- perl -Mbigrat -le 'print 4.5+2*255'
- perl -Mbigrat -le 'print 3/7 + 5/7 + 8/3'
- perl -Mbigrat -le 'print 12->is_odd()';
- perl -Mbignum=l,GMP -le 'print 7 ** 7777'
-
-=head1 LICENSE
-
-This program is free software; you may redistribute it and/or modify it under
-the same terms as Perl itself.
-
-=head1 SEE ALSO
-
-Especially L<bignum>.
-
-L<Math::BigFloat>, L<Math::BigInt>, L<Math::BigRat> and L<Math::Big> as well
-as L<Math::BigInt::BitVect>, L<Math::BigInt::Pari> and L<Math::BigInt::GMP>.
-
-=head1 AUTHORS
-
-(C) by Tels L<http://bloodgate.com/> in early 2002 - 2007.
-
-=cut
Deleted: vendor/perl/dist/lib/cacheout.pl
===================================================================
--- vendor/perl/dist/lib/cacheout.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/cacheout.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,59 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: FileCache
-
-# Open in their package.
-
-sub cacheout'open {
- open($_[0], $_[1]);
-}
-
-# Close as well
-
-sub cacheout'close {
- close($_[0]);
-}
-
-# But only this sub name is visible to them.
-
-sub cacheout {
- package cacheout;
-
- ($file) = @_;
- if (!$isopen{$file}) {
- if (++$numopen > $maxopen) {
- local(@lru) = sort {$isopen{$a} <=> $isopen{$b};} keys(%isopen);
- splice(@lru, $maxopen / 3);
- $numopen -= @lru;
- for (@lru) { &close($_); delete $isopen{$_}; }
- }
- &open($file, ($saw{$file}++ ? '>>' : '>') . $file)
- || die "Can't create $file: $!\n";
- }
- $isopen{$file} = ++$seq;
-}
-
-package cacheout;
-
-$seq = 0;
-$numopen = 0;
-
-if (open(PARAM,'/usr/include/sys/param.h')) {
- local($_, $.);
- while (<PARAM>) {
- $maxopen = $1 - 4 if /^\s*#\s*define\s+NOFILE\s+(\d+)/;
- }
- close PARAM;
-}
-$maxopen = 16 unless $maxopen;
-
-1;
Deleted: vendor/perl/dist/lib/complete.pl
===================================================================
--- vendor/perl/dist/lib/complete.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/complete.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,124 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-;#
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: Term::Complete
-
-;# @(#)complete.pl,v1.1 (me at anywhere.EBay.Sun.COM) 09/23/91
-;#
-;# Author: Wayne Thompson
-;#
-;# Description:
-;# This routine provides word completion.
-;# (TAB) attempts word completion.
-;# (^D) prints completion list.
-;# (These may be changed by setting $Complete'complete, etc.)
-;#
-;# Diagnostics:
-;# Bell when word completion fails.
-;#
-;# Dependencies:
-;# The tty driver is put into raw mode.
-;#
-;# Bugs:
-;#
-;# Usage:
-;# $input = &Complete('prompt_string', *completion_list);
-;# or
-;# $input = &Complete('prompt_string', @completion_list);
-;#
-
-CONFIG: {
- package Complete;
-
- $complete = "\004";
- $kill = "\025";
- $erase1 = "\177";
- $erase2 = "\010";
-}
-
-sub Complete {
- package Complete;
-
- local($prompt, @cmp_list, $return, @match, $l, $test, $cmp, $r);
- if ($_[1] =~ /^StB\0/) {
- ($prompt, *_) = @_;
- }
- else {
- $prompt = shift(@_);
- }
- @cmp_lst = sort(@_);
-
- system('stty raw -echo');
- LOOP: {
- print($prompt, $return);
- while (($_ = getc(STDIN)) ne "\r") {
- CASE: {
- # (TAB) attempt completion
- $_ eq "\t" && do {
- @match = grep(/^$return/, @cmp_lst);
- $l = length($test = shift(@match));
- unless ($#match < 0) {
- foreach $cmp (@match) {
- until (substr($cmp, 0, $l) eq substr($test, 0, $l)) {
- $l--;
- }
- }
- print("\a");
- }
- print($test = substr($test, $r, $l - $r));
- $r = length($return .= $test);
- last CASE;
- };
-
- # (^D) completion list
- $_ eq $complete && do {
- print(join("\r\n", '', grep(/^$return/, @cmp_lst)), "\r\n");
- redo LOOP;
- };
-
- # (^U) kill
- $_ eq $kill && do {
- if ($r) {
- undef $r;
- undef $return;
- print("\r\n");
- redo LOOP;
- }
- last CASE;
- };
-
- # (DEL) || (BS) erase
- ($_ eq $erase1 || $_ eq $erase2) && do {
- if($r) {
- print("\b \b");
- chop($return);
- $r--;
- }
- last CASE;
- };
-
- # printable char
- ord >= 32 && do {
- $return .= $_;
- $r++;
- print;
- last CASE;
- };
- }
- }
- }
- system('stty -raw echo');
- print("\n");
- $return;
-}
-
-1;
Deleted: vendor/perl/dist/lib/constant.pm
===================================================================
--- vendor/perl/dist/lib/constant.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/constant.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,374 +0,0 @@
-package constant;
-use 5.005;
-use strict;
-use warnings::register;
-
-use vars qw($VERSION %declared);
-$VERSION = '1.17';
-
-#=======================================================================
-
-# Some names are evil choices.
-my %keywords = map +($_, 1), qw{ BEGIN INIT CHECK END DESTROY AUTOLOAD };
-$keywords{UNITCHECK}++ if $] > 5.009;
-
-my %forced_into_main = map +($_, 1),
- qw{ STDIN STDOUT STDERR ARGV ARGVOUT ENV INC SIG };
-
-my %forbidden = (%keywords, %forced_into_main);
-
-#=======================================================================
-# import() - import symbols into user's namespace
-#
-# What we actually do is define a function in the caller's namespace
-# which returns the value. The function we create will normally
-# be inlined as a constant, thereby avoiding further sub calling
-# overhead.
-#=======================================================================
-sub import {
- my $class = shift;
- return unless @_; # Ignore 'use constant;'
- my $constants;
- my $multiple = ref $_[0];
- my $pkg = caller;
- my $symtab;
- my $str_end = $] >= 5.006 ? "\\z" : "\\Z";
-
- if ($] > 5.009002) {
- no strict 'refs';
- $symtab = \%{$pkg . '::'};
- };
-
- if ( $multiple ) {
- if (ref $_[0] ne 'HASH') {
- require Carp;
- Carp::croak("Invalid reference type '".ref(shift)."' not 'HASH'");
- }
- $constants = shift;
- } else {
- $constants->{+shift} = undef;
- }
-
- foreach my $name ( keys %$constants ) {
- unless (defined $name) {
- require Carp;
- Carp::croak("Can't use undef as constant name");
- }
-
- # Normal constant name
- if ($name =~ /^_?[^\W_0-9]\w*$str_end/ and !$forbidden{$name}) {
- # Everything is okay
-
- # Name forced into main, but we're not in main. Fatal.
- } elsif ($forced_into_main{$name} and $pkg ne 'main') {
- require Carp;
- Carp::croak("Constant name '$name' is forced into main::");
-
- # Starts with double underscore. Fatal.
- } elsif ($name =~ /^__/) {
- require Carp;
- Carp::croak("Constant name '$name' begins with '__'");
-
- # Maybe the name is tolerable
- } elsif ($name =~ /^[A-Za-z_]\w*$str_end/) {
- # Then we'll warn only if you've asked for warnings
- if (warnings::enabled()) {
- if ($keywords{$name}) {
- warnings::warn("Constant name '$name' is a Perl keyword");
- } elsif ($forced_into_main{$name}) {
- warnings::warn("Constant name '$name' is " .
- "forced into package main::");
- }
- }
-
- # Looks like a boolean
- # use constant FRED == fred;
- } elsif ($name =~ /^[01]?$str_end/) {
- require Carp;
- if (@_) {
- Carp::croak("Constant name '$name' is invalid");
- } else {
- Carp::croak("Constant name looks like boolean value");
- }
-
- } else {
- # Must have bad characters
- require Carp;
- Carp::croak("Constant name '$name' has invalid characters");
- }
-
- {
- no strict 'refs';
- my $full_name = "${pkg}::$name";
- $declared{$full_name}++;
- if ($multiple || @_ == 1) {
- my $scalar = $multiple ? $constants->{$name} : $_[0];
- if ($symtab && !exists $symtab->{$name}) {
- # No typeglob yet, so we can use a reference as space-
- # efficient proxy for a constant subroutine
- # The check in Perl_ck_rvconst knows that inlinable
- # constants from cv_const_sv are read only. So we have to:
- Internals::SvREADONLY($scalar, 1);
- $symtab->{$name} = \$scalar;
- mro::method_changed_in($pkg);
- } else {
- *$full_name = sub () { $scalar };
- }
- } elsif (@_) {
- my @list = @_;
- *$full_name = sub () { @list };
- } else {
- *$full_name = sub () { };
- }
- }
- }
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-constant - Perl pragma to declare constants
-
-=head1 SYNOPSIS
-
- use constant PI => 4 * atan2(1, 1);
- use constant DEBUG => 0;
-
- print "Pi equals ", PI, "...\n" if DEBUG;
-
- use constant {
- SEC => 0,
- MIN => 1,
- HOUR => 2,
- MDAY => 3,
- MON => 4,
- YEAR => 5,
- WDAY => 6,
- YDAY => 7,
- ISDST => 8,
- };
-
- use constant WEEKDAYS => qw(
- Sunday Monday Tuesday Wednesday Thursday Friday Saturday
- );
-
- print "Today is ", (WEEKDAYS)[ (localtime)[WDAY] ], ".\n";
-
-=head1 DESCRIPTION
-
-This pragma allows you to declare constants at compile-time.
-
-When you declare a constant such as C<PI> using the method shown
-above, each machine your script runs upon can have as many digits
-of accuracy as it can use. Also, your program will be easier to
-read, more likely to be maintained (and maintained correctly), and
-far less likely to send a space probe to the wrong planet because
-nobody noticed the one equation in which you wrote C<3.14195>.
-
-When a constant is used in an expression, Perl replaces it with its
-value at compile time, and may then optimize the expression further.
-In particular, any code in an C<if (CONSTANT)> block will be optimized
-away if the constant is false.
-
-=head1 NOTES
-
-As with all C<use> directives, defining a constant happens at
-compile time. Thus, it's probably not correct to put a constant
-declaration inside of a conditional statement (like C<if ($foo)
-{ use constant ... }>).
-
-Constants defined using this module cannot be interpolated into
-strings like variables. However, concatenation works just fine:
-
- print "Pi equals PI...\n"; # WRONG: does not expand "PI"
- print "Pi equals ".PI."...\n"; # right
-
-Even though a reference may be declared as a constant, the reference may
-point to data which may be changed, as this code shows.
-
- use constant ARRAY => [ 1,2,3,4 ];
- print ARRAY->[1];
- ARRAY->[1] = " be changed";
- print ARRAY->[1];
-
-Dereferencing constant references incorrectly (such as using an array
-subscript on a constant hash reference, or vice versa) will be trapped at
-compile time.
-
-Constants belong to the package they are defined in. To refer to a
-constant defined in another package, specify the full package name, as
-in C<Some::Package::CONSTANT>. Constants may be exported by modules,
-and may also be called as either class or instance methods, that is,
-as C<< Some::Package->CONSTANT >> or as C<< $obj->CONSTANT >> where
-C<$obj> is an instance of C<Some::Package>. Subclasses may define
-their own constants to override those in their base class.
-
-The use of all caps for constant names is merely a convention,
-although it is recommended in order to make constants stand out
-and to help avoid collisions with other barewords, keywords, and
-subroutine names. Constant names must begin with a letter or
-underscore. Names beginning with a double underscore are reserved. Some
-poor choices for names will generate warnings, if warnings are enabled at
-compile time.
-
-=head2 List constants
-
-Constants may be lists of more (or less) than one value. A constant
-with no values evaluates to C<undef> in scalar context. Note that
-constants with more than one value do I<not> return their last value in
-scalar context as one might expect. They currently return the number
-of values, but B<this may change in the future>. Do not use constants
-with multiple values in scalar context.
-
-B<NOTE:> This implies that the expression defining the value of a
-constant is evaluated in list context. This may produce surprises:
-
- use constant TIMESTAMP => localtime; # WRONG!
- use constant TIMESTAMP => scalar localtime; # right
-
-The first line above defines C<TIMESTAMP> as a 9-element list, as
-returned by C<localtime()> in list context. To set it to the string
-returned by C<localtime()> in scalar context, an explicit C<scalar>
-keyword is required.
-
-List constants are lists, not arrays. To index or slice them, they
-must be placed in parentheses.
-
- my @workdays = WEEKDAYS[1 .. 5]; # WRONG!
- my @workdays = (WEEKDAYS)[1 .. 5]; # right
-
-=head2 Defining multiple constants at once
-
-Instead of writing multiple C<use constant> statements, you may define
-multiple constants in a single statement by giving, instead of the
-constant name, a reference to a hash where the keys are the names of
-the constants to be defined. Obviously, all constants defined using
-this method must have a single value.
-
- use constant {
- FOO => "A single value",
- BAR => "This", "won't", "work!", # Error!
- };
-
-This is a fundamental limitation of the way hashes are constructed in
-Perl. The error messages produced when this happens will often be
-quite cryptic -- in the worst case there may be none at all, and
-you'll only later find that something is broken.
-
-When defining multiple constants, you cannot use the values of other
-constants defined in the same declaration. This is because the
-calling package doesn't know about any constant within that group
-until I<after> the C<use> statement is finished.
-
- use constant {
- BITMASK => 0xAFBAEBA8,
- NEGMASK => ~BITMASK, # Error!
- };
-
-=head2 Magic constants
-
-Magical values and references can be made into constants at compile
-time, allowing for way cool stuff like this. (These error numbers
-aren't totally portable, alas.)
-
- use constant E2BIG => ($! = 7);
- print E2BIG, "\n"; # something like "Arg list too long"
- print 0+E2BIG, "\n"; # "7"
-
-You can't produce a tied constant by giving a tied scalar as the
-value. References to tied variables, however, can be used as
-constants without any problems.
-
-=head1 TECHNICAL NOTES
-
-In the current implementation, scalar constants are actually
-inlinable subroutines. As of version 5.004 of Perl, the appropriate
-scalar constant is inserted directly in place of some subroutine
-calls, thereby saving the overhead of a subroutine call. See
-L<perlsub/"Constant Functions"> for details about how and when this
-happens.
-
-In the rare case in which you need to discover at run time whether a
-particular constant has been declared via this module, you may use
-this function to examine the hash C<%constant::declared>. If the given
-constant name does not include a package name, the current package is
-used.
-
- sub declared ($) {
- use constant 1.01; # don't omit this!
- my $name = shift;
- $name =~ s/^::/main::/;
- my $pkg = caller;
- my $full_name = $name =~ /::/ ? $name : "${pkg}::$name";
- $constant::declared{$full_name};
- }
-
-=head1 CAVEATS
-
-In the current version of Perl, list constants are not inlined
-and some symbols may be redefined without generating a warning.
-
-It is not possible to have a subroutine or a keyword with the same
-name as a constant in the same package. This is probably a Good Thing.
-
-A constant with a name in the list C<STDIN STDOUT STDERR ARGV ARGVOUT
-ENV INC SIG> is not allowed anywhere but in package C<main::>, for
-technical reasons.
-
-Unlike constants in some languages, these cannot be overridden
-on the command line or via environment variables.
-
-You can get into trouble if you use constants in a context which
-automatically quotes barewords (as is true for any subroutine call).
-For example, you can't say C<$hash{CONSTANT}> because C<CONSTANT> will
-be interpreted as a string. Use C<$hash{CONSTANT()}> or
-C<$hash{+CONSTANT}> to prevent the bareword quoting mechanism from
-kicking in. Similarly, since the C<< => >> operator quotes a bareword
-immediately to its left, you have to say C<< CONSTANT() => 'value' >>
-(or simply use a comma in place of the big arrow) instead of
-C<< CONSTANT => 'value' >>.
-
-=head1 SEE ALSO
-
-L<Readonly> - Facility for creating read-only scalars, arrays, hashes.
-
-L<Const> - Facility for creating read-only variables. Similar to C<Readonly>,
-but uses C<SvREADONLY> instead of C<tie>.
-
-L<Attribute::Constant> - Make read-only variables via attribute
-
-L<Scalar::Readonly> - Perl extension to the C<SvREADONLY> scalar flag
-
-L<Hash::Util> - A selection of general-utility hash subroutines (mostly
-to lock/unlock keys and values)
-
-=head1 BUGS
-
-Please report any bugs or feature requests via the perlbug(1) utility.
-
-=head1 AUTHORS
-
-Tom Phoenix, E<lt>F<rootbeer at redcat.com>E<gt>, with help from
-many other folks.
-
-Multiple constant declarations at once added by Casey West,
-E<lt>F<casey at geeknest.com>E<gt>.
-
-Documentation mostly rewritten by Ilmari Karonen,
-E<lt>F<perl at itz.pp.sci.fi>E<gt>.
-
-This program is maintained by the Perl 5 Porters.
-The CPAN distribution is maintained by SE<eacute>bastien Aperghis-Tramoni
-E<lt>F<sebastien at aperghis.net>E<gt>.
-
-=head1 COPYRIGHT & LICENSE
-
-Copyright (C) 1997, 1999 Tom Phoenix
-
-This module is free software; you can redistribute it or modify it
-under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/constant.t
===================================================================
--- vendor/perl/dist/lib/constant.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/constant.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,350 +0,0 @@
-#!./perl -T
-
-BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
-use warnings;
-use vars qw{ @warnings $fagwoosh $putt $kloong};
-BEGIN { # ...and save 'em for later
- $SIG{'__WARN__'} = sub { push @warnings, @_ }
-}
-END { @warnings && print STDERR join "\n- ", "accumulated warnings:", @warnings }
-
-
-use strict;
-use Test::More tests => 95;
-my $TB = Test::More->builder;
-
-BEGIN { use_ok('constant'); }
-
-use constant PI => 4 * atan2 1, 1;
-
-ok defined PI, 'basic scalar constant';
-is substr(PI, 0, 7), '3.14159', ' in substr()';
-
-sub deg2rad { PI * $_[0] / 180 }
-
-my $ninety = deg2rad 90;
-
-cmp_ok abs($ninety - 1.5707), '<', 0.0001, ' in math expression';
-
-use constant UNDEF1 => undef; # the right way
-use constant UNDEF2 => ; # the weird way
-use constant 'UNDEF3' ; # the 'short' way
-use constant EMPTY => ( ) ; # the right way for lists
-
-is UNDEF1, undef, 'right way to declare an undef';
-is UNDEF2, undef, ' weird way';
-is UNDEF3, undef, ' short way';
-
-# XXX Why is this way different than the other ones?
-my @undef = UNDEF1;
-is @undef, 1;
-is $undef[0], undef;
-
- at undef = UNDEF2;
-is @undef, 0;
- at undef = UNDEF3;
-is @undef, 0;
- at undef = EMPTY;
-is @undef, 0;
-
-use constant COUNTDOWN => scalar reverse 1, 2, 3, 4, 5;
-use constant COUNTLIST => reverse 1, 2, 3, 4, 5;
-use constant COUNTLAST => (COUNTLIST)[-1];
-
-is COUNTDOWN, '54321';
-my @cl = COUNTLIST;
-is @cl, 5;
-is COUNTDOWN, join '', @cl;
-is COUNTLAST, 1;
-is((COUNTLIST)[1], 4);
-
-use constant ABC => 'ABC';
-is "abc${\( ABC )}abc", "abcABCabc";
-
-use constant DEF => 'D', 'E', chr ord 'F';
-is "d e f @{[ DEF ]} d e f", "d e f D E F d e f";
-
-use constant SINGLE => "'";
-use constant DOUBLE => '"';
-use constant BACK => '\\';
-my $tt = BACK . SINGLE . DOUBLE ;
-is $tt, q(\\'");
-
-use constant MESS => q('"'\\"'"\\);
-is MESS, q('"'\\"'"\\);
-is length(MESS), 8;
-
-use constant LEADING => " \t1234";
-cmp_ok LEADING, '==', 1234;
-is LEADING, " \t1234";
-
-use constant ZERO1 => 0;
-use constant ZERO2 => 0.0;
-use constant ZERO3 => '0.0';
-is ZERO1, '0';
-is ZERO2, '0';
-is ZERO3, '0.0';
-
-{
- package Other;
- use constant PI => 3.141;
-}
-
-cmp_ok(abs(PI - 3.1416), '<', 0.0001);
-is Other::PI, 3.141;
-
-use constant E2BIG => $! = 7;
-cmp_ok E2BIG, '==', 7;
-# This is something like "Arg list too long", but the actual message
-# text may vary, so we can't test much better than this.
-cmp_ok length(E2BIG), '>', 6;
-
-is @warnings, 0 or diag join "\n- ", "unexpected warning:", @warnings;
- at warnings = (); # just in case
-undef &PI;
-ok @warnings && ($warnings[0] =~ /Constant sub.* undefined/) or
- diag join "\n", "unexpected warning", @warnings;
-shift @warnings;
-
-is @warnings, 0, "unexpected warning";
-
-my $curr_test = $TB->current_test;
-use constant CSCALAR => \"ok 35\n";
-use constant CHASH => { foo => "ok 36\n" };
-use constant CARRAY => [ undef, "ok 37\n" ];
-use constant CCODE => sub { "ok $_[0]\n" };
-
-my $output = $TB->output ;
-print $output ${+CSCALAR};
-print $output CHASH->{foo};
-print $output CARRAY->[1];
-print $output CCODE->($curr_test+4);
-
-$TB->current_test($curr_test+4);
-
-eval q{ CCODE->{foo} };
-ok scalar($@ =~ /^Constant is not a HASH/);
-
-
-# Allow leading underscore
-use constant _PRIVATE => 47;
-is _PRIVATE, 47;
-
-# Disallow doubled leading underscore
-eval q{
- use constant __DISALLOWED => "Oops";
-};
-like $@, qr/begins with '__'/;
-
-# Check on declared() and %declared. This sub should be EXACTLY the
-# same as the one quoted in the docs!
-sub declared ($) {
- use constant 1.01; # don't omit this!
- my $name = shift;
- $name =~ s/^::/main::/;
- my $pkg = caller;
- my $full_name = $name =~ /::/ ? $name : "${pkg}::$name";
- $constant::declared{$full_name};
-}
-
-ok declared 'PI';
-ok $constant::declared{'main::PI'};
-
-ok !declared 'PIE';
-ok !$constant::declared{'main::PIE'};
-
-{
- package Other;
- use constant IN_OTHER_PACK => 42;
- ::ok ::declared 'IN_OTHER_PACK';
- ::ok $constant::declared{'Other::IN_OTHER_PACK'};
- ::ok ::declared 'main::PI';
- ::ok $constant::declared{'main::PI'};
-}
-
-ok declared 'Other::IN_OTHER_PACK';
-ok $constant::declared{'Other::IN_OTHER_PACK'};
-
- at warnings = ();
-eval q{
- no warnings;
- #local $^W if $] < 5.006;
- use warnings 'constant';
- use constant 'BEGIN' => 1 ;
- use constant 'INIT' => 1 ;
- use constant 'CHECK' => 1 ;
- use constant 'END' => 1 ;
- use constant 'DESTROY' => 1 ;
- use constant 'AUTOLOAD' => 1 ;
- use constant 'STDIN' => 1 ;
- use constant 'STDOUT' => 1 ;
- use constant 'STDERR' => 1 ;
- use constant 'ARGV' => 1 ;
- use constant 'ARGVOUT' => 1 ;
- use constant 'ENV' => 1 ;
- use constant 'INC' => 1 ;
- use constant 'SIG' => 1 ;
- use constant 'UNITCHECK' => 1;
-};
-
-my @Expected_Warnings =
- (
- qr/^Constant name 'BEGIN' is a Perl keyword at/,
- qr/^Constant subroutine BEGIN redefined at/,
- qr/^Constant name 'INIT' is a Perl keyword at/,
- qr/^Constant name 'CHECK' is a Perl keyword at/,
- qr/^Constant name 'END' is a Perl keyword at/,
- qr/^Constant name 'DESTROY' is a Perl keyword at/,
- qr/^Constant name 'AUTOLOAD' is a Perl keyword at/,
- qr/^Constant name 'STDIN' is forced into package main:: a/,
- qr/^Constant name 'STDOUT' is forced into package main:: at/,
- qr/^Constant name 'STDERR' is forced into package main:: at/,
- qr/^Constant name 'ARGV' is forced into package main:: at/,
- qr/^Constant name 'ARGVOUT' is forced into package main:: at/,
- qr/^Constant name 'ENV' is forced into package main:: at/,
- qr/^Constant name 'INC' is forced into package main:: at/,
- qr/^Constant name 'SIG' is forced into package main:: at/,
- qr/^Constant name 'UNITCHECK' is a Perl keyword at/,
-);
-
-unless ($] > 5.009) {
- # Remove the UNITCHECK warning
- pop @Expected_Warnings;
- # But keep the count the same
- push @Expected_Warnings, qr/^$/;
- push @warnings, "";
-}
-
-# when run under "make test"
-if (@warnings == 16) {
- push @warnings, "";
- push @Expected_Warnings, qr/^$/;
-}
-# when run directly: perl -wT -Ilib t/constant.t
-elsif (@warnings == 17) {
- splice @Expected_Warnings, 1, 0,
- qr/^Prototype mismatch: sub main::BEGIN \(\) vs none at/;
-}
-# when run directly under 5.6.2: perl -wT -Ilib t/constant.t
-elsif (@warnings == 15) {
- splice @Expected_Warnings, 1, 1;
- push @warnings, "", "";
- push @Expected_Warnings, qr/^$/, qr/^$/;
-}
-else {
- my $rule = " -" x 20;
- diag "/!\\ unexpected case: ", scalar @warnings, " warnings\n$rule\n";
- diag map { " $_" } @warnings;
- diag $rule, $/;
-}
-
-is @warnings, 17;
-
-for my $idx (0..$#warnings) {
- like $warnings[$idx], $Expected_Warnings[$idx];
-}
-
- at warnings = ();
-
-
-use constant {
- THREE => 3,
- FAMILY => [ qw( John Jane Sally ) ],
- AGES => { John => 33, Jane => 28, Sally => 3 },
- RFAM => [ [ qw( John Jane Sally ) ] ],
- SPIT => sub { shift },
-};
-
-is @{+FAMILY}, THREE;
-is @{+FAMILY}, @{RFAM->[0]};
-is FAMILY->[2], RFAM->[0]->[2];
-is AGES->{FAMILY->[1]}, 28;
-is THREE**3, SPIT->(@{+FAMILY}**3);
-
-# Allow name of digits/underscores only if it begins with underscore
-{
- use warnings FATAL => 'constant';
- eval q{
- use constant _1_2_3 => 'allowed';
- };
- ok( $@ eq '' );
-}
-
-sub slotch ();
-
-{
- my @warnings;
- local $SIG{'__WARN__'} = sub { push @warnings, @_ };
- eval 'use constant slotch => 3; 1' or die $@;
-
- is ("@warnings", "", "No warnings if a prototype exists");
-
- my $value = eval 'slotch';
- is ($@, '');
- is ($value, 3);
-}
-
-sub zit;
-
-{
- my @warnings;
- local $SIG{'__WARN__'} = sub { push @warnings, @_ };
- eval 'use constant zit => 4; 1' or die $@;
-
- # empty prototypes are reported differently in different versions
- my $no_proto = $] < 5.008004 ? "" : ": none";
-
- is(scalar @warnings, 1, "1 warning");
- like ($warnings[0], qr/^Prototype mismatch: sub main::zit$no_proto vs \(\)/,
- "about the prototype mismatch");
-
- my $value = eval 'zit';
- is ($@, '');
- is ($value, 4);
-}
-
-$fagwoosh = 'geronimo';
-$putt = 'leutwein';
-$kloong = 'schlozhauer';
-
-{
- my @warnings;
- local $SIG{'__WARN__'} = sub { push @warnings, @_ };
- eval 'use constant fagwoosh => 5; 1' or die $@;
-
- is ("@warnings", "", "No warnings if the typeglob exists already");
-
- my $value = eval 'fagwoosh';
- is ($@, '');
- is ($value, 5);
-
- my @value = eval 'fagwoosh';
- is ($@, '');
- is_deeply (\@value, [5]);
-
- eval 'use constant putt => 6, 7; 1' or die $@;
-
- is ("@warnings", "", "No warnings if the typeglob exists already");
-
- @value = eval 'putt';
- is ($@, '');
- is_deeply (\@value, [6, 7]);
-
- eval 'use constant "klong"; 1' or die $@;
-
- is ("@warnings", "", "No warnings if the typeglob exists already");
-
- $value = eval 'klong';
- is ($@, '');
- is ($value, undef);
-
- @value = eval 'klong';
- is ($@, '');
- is_deeply (\@value, []);
-}
Deleted: vendor/perl/dist/lib/ctime.pl
===================================================================
--- vendor/perl/dist/lib/ctime.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/ctime.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,63 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-;# ctime.pl is a simple Perl emulation for the well known ctime(3C) function.
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: the POSIX ctime function
-
-;#
-;# Waldemar Kebsch, Federal Republic of Germany, November 1988
-;# kebsch.pad at nixpbe.UUCP
-;# Modified March 1990, Feb 1991 to properly handle timezones
-;# $RCSfile: ctime.pl,v $$Revision: 1.1.1.2 $$Date: 2011-05-18 13:33:26 $
-;# Marion Hakanson (hakanson at cse.ogi.edu)
-;# Oregon Graduate Institute of Science and Technology
-;#
-;# usage:
-;#
-;# #include <ctime.pl> # see the -P and -I option in perl.man
-;# $Date = &ctime(time);
-
-CONFIG: {
- package ctime;
-
- @DoW = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
- @MoY = ('Jan','Feb','Mar','Apr','May','Jun',
- 'Jul','Aug','Sep','Oct','Nov','Dec');
-}
-
-sub ctime {
- package ctime;
-
- local($time) = @_;
- local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
-
- # Determine what time zone is in effect.
- # Use GMT if TZ is defined as null, local time if TZ undefined.
- # There's no portable way to find the system default timezone.
-
- $TZ = defined($ENV{'TZ'}) ? ( $ENV{'TZ'} ? $ENV{'TZ'} : 'GMT' ) : '';
- ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
- ($TZ eq 'GMT') ? gmtime($time) : localtime($time);
-
- # Hack to deal with 'PST8PDT' format of TZ
- # Note that this can't deal with all the esoteric forms, but it
- # does recognize the most common: [:]STDoff[DST[off][,rule]]
-
- if($TZ=~/^([^:\d+\-,]{3,})([+-]?\d{1,2}(:\d{1,2}){0,2})([^\d+\-,]{3,})?/){
- $TZ = $isdst ? $4 : $1;
- }
- $TZ .= ' ' unless $TZ eq '';
-
- $year += 1900;
- sprintf("%s %s %2d %2d:%02d:%02d %s%4d\n",
- $DoW[$wday], $MoY[$mon], $mday, $hour, $min, $sec, $TZ, $year);
-}
-1;
Deleted: vendor/perl/dist/lib/dotsh.pl
===================================================================
--- vendor/perl/dist/lib/dotsh.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/dotsh.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,78 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-#
-# @(#)dotsh.pl 03/19/94
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Author: Charles Collins
-#
-# Description:
-# This routine takes a shell script and 'dots' it into the current perl
-# environment. This makes it possible to use existing system scripts
-# to alter environment variables on the fly.
-#
-# Usage:
-# &dotsh ('ShellScript', 'DependentVariable(s)');
-#
-# where
-#
-# 'ShellScript' is the full name of the shell script to be dotted
-#
-# 'DependentVariable(s)' is an optional list of shell variables in the
-# form VARIABLE=VALUE,VARIABLE=VALUE,... that 'ShellScript' is
-# dependent upon. These variables MUST be defined using shell syntax.
-#
-# Example:
-# &dotsh ('/foo/bar', 'arg1');
-# &dotsh ('/foo/bar');
-# &dotsh ('/foo/bar arg1 ... argN');
-#
-
-sub dotsh {
- local(@sh) = @_;
- local($tmp,$key,$shell,$command,$args,$vars) = '';
- local(*dotsh);
- undef *dotsh;
- $dotsh = shift(@sh);
- @dotsh = split (/\s/, $dotsh);
- $command = shift (@dotsh);
- $args = join (" ", @dotsh);
- $vars = join ("\n", @sh);
- open (_SH_ENV, "$command") || die "Could not open $dotsh!\n";
- chop($_ = <_SH_ENV>);
- $shell = "$1 -c" if ($_ =~ /^\#\!\s*(\S+(\/sh|\/ksh|\/zsh|\/csh))\s*$/);
- close (_SH_ENV);
- if (!$shell) {
- if ($ENV{'SHELL'} =~ /\/sh$|\/ksh$|\/zsh$|\/bash$|\/csh$/) {
- $shell = "$ENV{'SHELL'} -c";
- } else {
- print "SHELL not recognized!\nUsing /bin/sh...\n";
- $shell = "/bin/sh -c";
- }
- }
- if (length($vars) > 0) {
- open (_SH_ENV, "$shell \"$vars && . $command $args && set \" |") || die;
- } else {
- open (_SH_ENV, "$shell \". $command $args && set \" |") || die;
- }
-
- while (<_SH_ENV>) {
- chop;
- m/^([^=]*)=(.*)/s;
- $ENV{$1} = $2;
- }
- close (_SH_ENV);
-
- foreach $key (keys(%ENV)) {
- $tmp .= "\$$key = \$ENV{'$key'};" if $key =~ /^[A-Za-z]\w*$/;
- }
- eval $tmp;
-}
-1;
Deleted: vendor/perl/dist/lib/exceptions.pl
===================================================================
--- vendor/perl/dist/lib/exceptions.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/exceptions.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,64 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-# exceptions.pl
-# tchrist at convex.com
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-
-# Here's a little code I use for exception handling. It's really just
-# glorified eval/die. The way to use use it is when you might otherwise
-# exit, use &throw to raise an exception. The first enclosing &catch
-# handler looks at the exception and decides whether it can catch this kind
-# (catch takes a list of regexps to catch), and if so, it returns the one it
-# caught. If it *can't* catch it, then it will reraise the exception
-# for someone else to possibly see, or to die otherwise.
-#
-# I use oddly named variables in order to make darn sure I don't conflict
-# with my caller. I also hide in my own package, and eval the code in his.
-#
-# The EXCEPTION: prefix is so you can tell whether it's a user-raised
-# exception or a perl-raised one (eval error).
-#
-# --tom
-#
-# examples:
-# if (&catch('/$user_input/', 'regexp', 'syntax error') {
-# warn "oops try again";
-# redo;
-# }
-#
-# if ($error = &catch('&subroutine()')) { # catches anything
-#
-# &throw('bad input') if /^$/;
-
-sub catch {
- package exception;
- local($__code__, @__exceptions__) = @_;
- local($__package__) = caller;
- local($__exception__);
-
- eval "package $__package__; $__code__";
- if ($__exception__ = &'thrown) {
- for (@__exceptions__) {
- return $__exception__ if /$__exception__/;
- }
- &'throw($__exception__);
- }
-}
-
-sub throw {
- local($exception) = @_;
- die "EXCEPTION: $exception\n";
-}
-
-sub thrown {
- $@ =~ /^(EXCEPTION: )+(.+)/ && $2;
-}
-
-1;
Deleted: vendor/perl/dist/lib/fastcwd.pl
===================================================================
--- vendor/perl/dist/lib/fastcwd.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/fastcwd.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,47 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-# By John Bazik
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: Cwd
-
-# Usage: $cwd = &fastcwd;
-#
-# This is a faster version of getcwd. It's also more dangerous because
-# you might chdir out of a directory that you can't chdir back into.
-
-sub fastcwd {
- local($odev, $oino, $cdev, $cino, $tdev, $tino);
- local(@path, $path);
- local(*DIR);
-
- ($cdev, $cino) = stat('.');
- for (;;) {
- ($odev, $oino) = ($cdev, $cino);
- chdir('..');
- ($cdev, $cino) = stat('.');
- last if $odev == $cdev && $oino == $cino;
- opendir(DIR, '.');
- for (;;) {
- $_ = readdir(DIR);
- next if $_ eq '.';
- next if $_ eq '..';
-
- last unless $_;
- ($tdev, $tino) = lstat($_);
- last unless $tdev != $odev || $tino != $oino;
- }
- closedir(DIR);
- unshift(@path, $_);
- }
- chdir($path = '/' . join('/', @path));
- $path;
-}
-1;
Deleted: vendor/perl/dist/lib/fields.pm
===================================================================
--- vendor/perl/dist/lib/fields.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/fields.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,327 +0,0 @@
-package fields;
-
-require 5.005;
-use strict;
-no strict 'refs';
-unless( eval q{require warnings::register; warnings::register->import; 1} ) {
- *warnings::warnif = sub {
- require Carp;
- Carp::carp(@_);
- }
-}
-use vars qw(%attr $VERSION);
-
-$VERSION = '2.14';
-
-# constant.pm is slow
-sub PUBLIC () { 2**0 }
-sub PRIVATE () { 2**1 }
-sub INHERITED () { 2**2 }
-sub PROTECTED () { 2**3 }
-
-
-# The %attr hash holds the attributes of the currently assigned fields
-# per class. The hash is indexed by class names and the hash value is
-# an array reference. The first element in the array is the lowest field
-# number not belonging to a base class. The remaining elements' indices
-# are the field numbers. The values are integer bit masks, or undef
-# in the case of base class private fields (which occupy a slot but are
-# otherwise irrelevant to the class).
-
-sub import {
- my $class = shift;
- return unless @_;
- my $package = caller(0);
- # avoid possible typo warnings
- %{"$package\::FIELDS"} = () unless %{"$package\::FIELDS"};
- my $fields = \%{"$package\::FIELDS"};
- my $fattr = ($attr{$package} ||= [1]);
- my $next = @$fattr;
-
- # Quiet pseudo-hash deprecation warning for uses of fields::new.
- bless \%{"$package\::FIELDS"}, 'pseudohash';
-
- if ($next > $fattr->[0]
- and ($fields->{$_[0]} || 0) >= $fattr->[0])
- {
- # There are already fields not belonging to base classes.
- # Looks like a possible module reload...
- $next = $fattr->[0];
- }
- foreach my $f (@_) {
- my $fno = $fields->{$f};
-
- # Allow the module to be reloaded so long as field positions
- # have not changed.
- if ($fno and $fno != $next) {
- require Carp;
- if ($fno < $fattr->[0]) {
- if ($] < 5.006001) {
- warn("Hides field '$f' in base class") if $^W;
- } else {
- warnings::warnif("Hides field '$f' in base class") ;
- }
- } else {
- Carp::croak("Field name '$f' already in use");
- }
- }
- $fields->{$f} = $next;
- $fattr->[$next] = ($f =~ /^_/) ? PRIVATE : PUBLIC;
- $next += 1;
- }
- if (@$fattr > $next) {
- # Well, we gave them the benefit of the doubt by guessing the
- # module was reloaded, but they appear to be declaring fields
- # in more than one place. We can't be sure (without some extra
- # bookkeeping) that the rest of the fields will be declared or
- # have the same positions, so punt.
- require Carp;
- Carp::croak ("Reloaded module must declare all fields at once");
- }
-}
-
-sub inherit {
- require base;
- goto &base::inherit_fields;
-}
-
-sub _dump # sometimes useful for debugging
-{
- for my $pkg (sort keys %attr) {
- print "\n$pkg";
- if (@{"$pkg\::ISA"}) {
- print " (", join(", ", @{"$pkg\::ISA"}), ")";
- }
- print "\n";
- my $fields = \%{"$pkg\::FIELDS"};
- for my $f (sort {$fields->{$a} <=> $fields->{$b}} keys %$fields) {
- my $no = $fields->{$f};
- print " $no: $f";
- my $fattr = $attr{$pkg}[$no];
- if (defined $fattr) {
- my @a;
- push(@a, "public") if $fattr & PUBLIC;
- push(@a, "private") if $fattr & PRIVATE;
- push(@a, "inherited") if $fattr & INHERITED;
- print "\t(", join(", ", @a), ")";
- }
- print "\n";
- }
- }
-}
-
-if ($] < 5.009) {
- *new = sub {
- my $class = shift;
- $class = ref $class if ref $class;
- return bless [\%{$class . "::FIELDS"}], $class;
- }
-} else {
- *new = sub {
- my $class = shift;
- $class = ref $class if ref $class;
- require Hash::Util;
- my $self = bless {}, $class;
-
- # The lock_keys() prototype won't work since we require Hash::Util :(
- &Hash::Util::lock_keys(\%$self, _accessible_keys($class));
- return $self;
- }
-}
-
-sub _accessible_keys {
- my ($class) = @_;
- return (
- keys %{$class.'::FIELDS'},
- map(_accessible_keys($_), @{$class.'::ISA'}),
- );
-}
-
-sub phash {
- die "Pseudo-hashes have been removed from Perl" if $] >= 5.009;
- my $h;
- my $v;
- if (@_) {
- if (ref $_[0] eq 'ARRAY') {
- my $a = shift;
- @$h{@$a} = 1 .. @$a;
- if (@_) {
- $v = shift;
- unless (! @_ and ref $v eq 'ARRAY') {
- require Carp;
- Carp::croak ("Expected at most two array refs\n");
- }
- }
- }
- else {
- if (@_ % 2) {
- require Carp;
- Carp::croak ("Odd number of elements initializing pseudo-hash\n");
- }
- my $i = 0;
- @$h{grep ++$i % 2, @_} = 1 .. @_ / 2;
- $i = 0;
- $v = [grep $i++ % 2, @_];
- }
- }
- else {
- $h = {};
- $v = [];
- }
- [ $h, @$v ];
-
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-fields - compile-time class fields
-
-=head1 SYNOPSIS
-
- {
- package Foo;
- use fields qw(foo bar _Foo_private);
- sub new {
- my Foo $self = shift;
- unless (ref $self) {
- $self = fields::new($self);
- $self->{_Foo_private} = "this is Foo's secret";
- }
- $self->{foo} = 10;
- $self->{bar} = 20;
- return $self;
- }
- }
-
- my $var = Foo->new;
- $var->{foo} = 42;
-
- # this will generate an error
- $var->{zap} = 42;
-
- # subclassing
- {
- package Bar;
- use base 'Foo';
- use fields qw(baz _Bar_private); # not shared with Foo
- sub new {
- my $class = shift;
- my $self = fields::new($class);
- $self->SUPER::new(); # init base fields
- $self->{baz} = 10; # init own fields
- $self->{_Bar_private} = "this is Bar's secret";
- return $self;
- }
- }
-
-=head1 DESCRIPTION
-
-The C<fields> pragma enables compile-time verified class fields.
-
-NOTE: The current implementation keeps the declared fields in the %FIELDS
-hash of the calling package, but this may change in future versions.
-Do B<not> update the %FIELDS hash directly, because it must be created
-at compile-time for it to be fully useful, as is done by this pragma.
-
-B<Only valid for perl before 5.9.0:>
-
-If a typed lexical variable holding a reference is used to access a
-hash element and a package with the same name as the type has
-declared class fields using this pragma, then the operation is
-turned into an array access at compile time.
-
-
-The related C<base> pragma will combine fields from base classes and any
-fields declared using the C<fields> pragma. This enables field
-inheritance to work properly.
-
-Field names that start with an underscore character are made private to
-the class and are not visible to subclasses. Inherited fields can be
-overridden but will generate a warning if used together with the C<-w>
-switch.
-
-B<Only valid for perls before 5.9.0:>
-
-The effect of all this is that you can have objects with named
-fields which are as compact and as fast arrays to access. This only
-works as long as the objects are accessed through properly typed
-variables. If the objects are not typed, access is only checked at
-run time.
-
-
-The following functions are supported:
-
-=over 4
-
-=item new
-
-B< perl before 5.9.0: > fields::new() creates and blesses a
-pseudo-hash comprised of the fields declared using the C<fields>
-pragma into the specified class.
-
-B< perl 5.9.0 and higher: > fields::new() creates and blesses a
-restricted-hash comprised of the fields declared using the C<fields>
-pragma into the specified class.
-
-This function is usable with or without pseudo-hashes. It is the
-recommended way to construct a fields-based object.
-
-This makes it possible to write a constructor like this:
-
- package Critter::Sounds;
- use fields qw(cat dog bird);
-
- sub new {
- my $self = shift;
- $self = fields::new($self) unless ref $self;
- $self->{cat} = 'meow'; # scalar element
- @$self{'dog','bird'} = ('bark','tweet'); # slice
- return $self;
- }
-
-=item phash
-
-B< before perl 5.9.0: >
-
-fields::phash() can be used to create and initialize a plain (unblessed)
-pseudo-hash. This function should always be used instead of creating
-pseudo-hashes directly.
-
-If the first argument is a reference to an array, the pseudo-hash will
-be created with keys from that array. If a second argument is supplied,
-it must also be a reference to an array whose elements will be used as
-the values. If the second array contains less elements than the first,
-the trailing elements of the pseudo-hash will not be initialized.
-This makes it particularly useful for creating a pseudo-hash from
-subroutine arguments:
-
- sub dogtag {
- my $tag = fields::phash([qw(name rank ser_num)], [@_]);
- }
-
-fields::phash() also accepts a list of key-value pairs that will
-be used to construct the pseudo hash. Examples:
-
- my $tag = fields::phash(name => "Joe",
- rank => "captain",
- ser_num => 42);
-
- my $pseudohash = fields::phash(%args);
-
-B< perl 5.9.0 and higher: >
-
-Pseudo-hashes have been removed from Perl as of 5.10. Consider using
-restricted hashes or fields::new() instead. Using fields::phash()
-will cause an error.
-
-=back
-
-=head1 SEE ALSO
-
-L<base>
-
-=cut
Deleted: vendor/perl/dist/lib/find.pl
===================================================================
--- vendor/perl/dist/lib/find.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/find.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,54 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-# This library is deprecated and unmaintained. It is included for
-# compatibility with Perl 4 scripts which may use it, but it will be
-# removed in a future version of Perl. Please use the File::Find module
-# instead.
-
-# Usage:
-# require "find.pl";
-#
-# &find('/foo','/bar');
-#
-# sub wanted { ... }
-# where wanted does whatever you want. $dir contains the
-# current directory name, and $_ the current filename within
-# that directory. $name contains "$dir/$_". You are cd'ed
-# to $dir when the function is called. The function may
-# set $prune to prune the tree.
-#
-# For example,
-#
-# find / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune
-#
-# corresponds to this
-#
-# sub wanted {
-# /^\.nfs.*$/ &&
-# (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
-# int(-M _) > 7 &&
-# unlink($_)
-# ||
-# ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) &&
-# $dev < 0 &&
-# ($prune = 1);
-# }
-#
-# Set the variable $dont_use_nlink if you're using AFS, since AFS cheats.
-
-use File::Find ();
-
-*name = *File::Find::name;
-*prune = *File::Find::prune;
-*dir = *File::Find::dir;
-*topdir = *File::Find::topdir;
-*topdev = *File::Find::topdev;
-*topino = *File::Find::topino;
-*topmode = *File::Find::topmode;
-*topnlink = *File::Find::topnlink;
-
-sub find {
- &File::Find::find(\&wanted, @_);
-}
-
-1;
Deleted: vendor/perl/dist/lib/finddepth.pl
===================================================================
--- vendor/perl/dist/lib/finddepth.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/finddepth.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,53 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-# This library is deprecated and unmaintained. It is included for
-# compatibility with Perl 4 scripts which may use it, but it will be
-# removed in a future version of Perl. Please use the File::Find module
-# instead.
-
-# Usage:
-# require "finddepth.pl";
-#
-# &finddepth('/foo','/bar');
-#
-# sub wanted { ... }
-# where wanted does whatever you want. $dir contains the
-# current directory name, and $_ the current filename within
-# that directory. $name contains "$dir/$_". You are cd'ed
-# to $dir when the function is called. The function may
-# set $prune to prune the tree.
-#
-# For example,
-#
-# find / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune
-#
-# corresponds to this
-#
-# sub wanted {
-# /^\.nfs.*$/ &&
-# (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
-# int(-M _) > 7 &&
-# unlink($_)
-# ||
-# ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) &&
-# $dev < 0 &&
-# ($prune = 1);
-# }
-
-
-use File::Find ();
-
-*name = *File::Find::name;
-*prune = *File::Find::prune;
-*dir = *File::Find::dir;
-*topdir = *File::Find::topdir;
-*topdev = *File::Find::topdev;
-*topino = *File::Find::topino;
-*topmode = *File::Find::topmode;
-*topnlink = *File::Find::topnlink;
-
-sub finddepth {
- &File::Find::finddepth(\&wanted, @_);
-}
-
-1;
Deleted: vendor/perl/dist/lib/flush.pl
===================================================================
--- vendor/perl/dist/lib/flush.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/flush.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,36 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: IO::Handle
-
-;# Usage: &flush(FILEHANDLE)
-;# flushes the named filehandle
-
-;# Usage: &printflush(FILEHANDLE, "prompt: ")
-;# prints arguments and flushes filehandle
-
-sub flush {
- local($old) = select(shift);
- $| = 1;
- print "";
- $| = 0;
- select($old);
-}
-
-sub printflush {
- local($old) = select(shift);
- $| = 1;
- print @_;
- $| = 0;
- select($old);
-}
-
-1;
Deleted: vendor/perl/dist/lib/getcwd.pl
===================================================================
--- vendor/perl/dist/lib/getcwd.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/getcwd.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,74 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-# By Brandon S. Allbery
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: Cwd
-
-#
-# Usage: $cwd = &getcwd;
-
-sub getcwd
-{
- local($dotdots, $cwd, @pst, @cst, $dir, @tst);
-
- unless (@cst = stat('.'))
- {
- warn "stat(.): $!";
- return '';
- }
- $cwd = '';
- do
- {
- $dotdots .= '/' if $dotdots;
- $dotdots .= '..';
- @pst = @cst;
- unless (opendir(getcwd'PARENT, $dotdots)) #'))
- {
- warn "opendir($dotdots): $!";
- return '';
- }
- unless (@cst = stat($dotdots))
- {
- warn "stat($dotdots): $!";
- closedir(getcwd'PARENT); #');
- return '';
- }
- if ($pst[0] == $cst[0] && $pst[1] == $cst[1])
- {
- $dir = '';
- }
- else
- {
- do
- {
- unless (defined ($dir = readdir(getcwd'PARENT))) #'))
- {
- warn "readdir($dotdots): $!";
- closedir(getcwd'PARENT); #');
- return '';
- }
- unless (@tst = lstat("$dotdots/$dir"))
- {
- # warn "lstat($dotdots/$dir): $!";
- # closedir(getcwd'PARENT); #');
- # return '';
- }
- }
- while ($dir eq '.' || $dir eq '..' || $tst[0] != $pst[0] ||
- $tst[1] != $pst[1]);
- }
- $cwd = "$dir/$cwd";
- closedir(getcwd'PARENT); #');
- } while ($dir ne '');
- chop($cwd);
- $cwd;
-}
-
-1;
Deleted: vendor/perl/dist/lib/getopt.pl
===================================================================
--- vendor/perl/dist/lib/getopt.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/getopt.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,52 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-;# $RCSfile: getopt.pl,v $$Revision: 1.1.1.2 $$Date: 2011-05-18 13:33:26 $
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternatives: Getopt::Long or Getopt::Std
-
-;# Process single-character switches with switch clustering. Pass one argument
-;# which is a string containing all switches that take an argument. For each
-;# switch found, sets $opt_x (where x is the switch name) to the value of the
-;# argument, or 1 if no argument. Switches which take an argument don't care
-;# whether there is a space between the switch and the argument.
-
-;# Usage:
-;# do Getopt('oDI'); # -o, -D & -I take arg. Sets opt_* as a side effect.
-
-sub Getopt {
- local($argumentative) = @_;
- local($_,$first,$rest);
-
- while (@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) {
- ($first,$rest) = ($1,$2);
- if (index($argumentative,$first) >= 0) {
- if ($rest ne '') {
- shift(@ARGV);
- }
- else {
- shift(@ARGV);
- $rest = shift(@ARGV);
- }
- ${"opt_$first"} = $rest;
- }
- else {
- ${"opt_$first"} = 1;
- if ($rest ne '') {
- $ARGV[0] = "-$rest";
- }
- else {
- shift(@ARGV);
- }
- }
- }
-}
-
-1;
Deleted: vendor/perl/dist/lib/getopts.pl
===================================================================
--- vendor/perl/dist/lib/getopts.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/getopts.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,67 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-;# getopts.pl - a better getopt.pl
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternatives: Getopt::Long or Getopt::Std
-
-;# Usage:
-;# do Getopts('a:bc'); # -a takes arg. -b & -c not. Sets opt_* as a
-;# # side effect.
-
-sub Getopts {
- local($argumentative) = @_;
- local(@args,$_,$first,$rest);
- local($errs) = 0;
-
- @args = split( / */, $argumentative );
- while(@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) {
- ($first,$rest) = ($1,$2);
- $pos = index($argumentative,$first);
- if($pos >= 0) {
- if($args[$pos+1] eq ':') {
- shift(@ARGV);
- if($rest eq '') {
- ++$errs unless(@ARGV);
- $rest = shift(@ARGV);
- }
- eval "
- push(\@opt_$first, \$rest);
- if (!defined \$opt_$first or \$opt_$first eq '') {
- \$opt_$first = \$rest;
- }
- else {
- \$opt_$first .= ' ' . \$rest;
- }
- ";
- }
- else {
- eval "\$opt_$first = 1";
- if($rest eq '') {
- shift(@ARGV);
- }
- else {
- $ARGV[0] = "-$rest";
- }
- }
- }
- else {
- print STDERR "Unknown option: $first\n";
- ++$errs;
- if($rest ne '') {
- $ARGV[0] = "-$rest";
- }
- else {
- shift(@ARGV);
- }
- }
- }
- $errs == 0;
-}
-
-1;
Deleted: vendor/perl/dist/lib/hostname.pl
===================================================================
--- vendor/perl/dist/lib/hostname.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/hostname.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,35 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-# From: asherman at fmrco.com (Aaron Sherman)
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: Sys::Hostname
-
-sub hostname
-{
- local(*P, at tmp,$hostname,$_);
- if (open(P,"hostname 2>&1 |") && (@tmp = <P>) && close(P))
- {
- chop($hostname = $tmp[$#tmp]);
- }
- elsif (open(P,"uname -n 2>&1 |") && (@tmp = <P>) && close(P))
- {
- chop($hostname = $tmp[$#tmp]);
- }
- else
- {
- die "$0: Cannot get hostname from 'hostname' or 'uname -n'\n";
- }
- @tmp = ();
- close P; # Just in case we failed in an odd spot....
- $hostname;
-}
-
-1;
Deleted: vendor/perl/dist/lib/if.pm
===================================================================
--- vendor/perl/dist/lib/if.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/if.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,56 +0,0 @@
-package if;
-
-$VERSION = '0.05';
-
-sub work {
- my $method = shift() ? 'import' : 'unimport';
- die "Too few arguments to `use if' (some code returning an empty list in list context?)"
- unless @_ >= 2;
- return unless shift; # CONDITION
-
- my $p = $_[0]; # PACKAGE
- (my $file = "$p.pm") =~ s!::!/!g;
- require $file; # Works even if $_[0] is a keyword (like open)
- my $m = $p->can($method);
- goto &$m if $m;
-}
-
-sub import { shift; unshift @_, 1; goto &work }
-sub unimport { shift; unshift @_, 0; goto &work }
-
-1;
-__END__
-
-=head1 NAME
-
-if - C<use> a Perl module if a condition holds
-
-=head1 SYNOPSIS
-
- use if CONDITION, MODULE => ARGUMENTS;
-
-=head1 DESCRIPTION
-
-The construct
-
- use if CONDITION, MODULE => ARGUMENTS;
-
-has no effect unless C<CONDITION> is true. In this case the effect is
-the same as of
-
- use MODULE ARGUMENTS;
-
-Above C<< => >> provides necessary quoting of C<MODULE>. If not used (e.g.,
-no ARGUMENTS to give), you'd better quote C<MODULE> yourselves.
-
-=head1 BUGS
-
-The current implementation does not allow specification of the
-required version of the module.
-
-=head1 AUTHOR
-
-Ilya Zakharevich L<mailto:perl-module-if at ilyaz.org>.
-
-=cut
-
Deleted: vendor/perl/dist/lib/if.t
===================================================================
--- vendor/perl/dist/lib/if.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/if.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,41 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' and @INC = '../lib' if $ENV{PERL_CORE};
-}
-
-my $t = 1;
-print "1..5\n";
-sub ok {
- print "not " unless shift;
- print "ok $t # ", shift, "\n";
- $t++;
-}
-
-my $v_plus = $] + 1;
-my $v_minus = $] - 1;
-
-unless (eval 'use open ":std"; 1') {
- # pretend that open.pm is present
- $INC{'open.pm'} = 'open.pm';
- eval 'sub open::foo{}'; # Just in case...
-}
-
-
-ok( eval "use if ($v_minus > \$]), strict => 'subs'; \${'f'} = 12" eq 12,
- '"use if" with a false condition, fake pragma');
-
-ok( eval "use if ($v_minus > \$]), strict => 'refs'; \${'f'} = 12" eq 12,
- '"use if" with a false condition and a pragma');
-
-ok( eval "use if ($v_plus > \$]), strict => 'subs'; \${'f'} = 12" eq 12,
- '"use if" with a true condition, fake pragma');
-
-ok( (not defined eval "use if ($v_plus > \$]), strict => 'refs'; \${'f'} = 12"
- and $@ =~ /while "strict refs" in use/),
- '"use if" with a true condition and a pragma');
-
-# Old version had problems with the module name `open', which is a keyword too
-# Use 'open' =>, since pre-5.6.0 could interpret differently
-ok( (eval "use if ($v_plus > \$]), 'open' => IN => ':crlf'; 12" || 0) eq 12,
- '"use if" with open');
Deleted: vendor/perl/dist/lib/importenv.pl
===================================================================
--- vendor/perl/dist/lib/importenv.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/importenv.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,21 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-
-;# This file, when interpreted, pulls the environment into normal variables.
-;# Usage:
-;# require 'importenv.pl';
-;# or
-;# #include <importenv.pl>
-
-local($tmp,$key) = '';
-
-foreach $key (keys(%ENV)) {
- $tmp .= "\$$key = \$ENV{'$key'};" if $key =~ /^[A-Za-z]\w*$/;
-}
-eval $tmp;
-
-1;
Deleted: vendor/perl/dist/lib/lib.t
===================================================================
--- vendor/perl/dist/lib/lib.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/lib.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,91 +0,0 @@
-#!./perl -w
-
-BEGIN {
- chdir 't';
- unshift @INC, '..';
- unshift @INC, '../lib';
- @OrigINC = @INC;
-}
-
-use Test::More tests => 13;
-use Config;
-use File::Spec;
-use File::Path;
-
-#set up files and directories
-my @lib_dir;
-my $Lib_Dir;
-my $Arch_Dir;
-my $Auto_Dir;
-my $Module;
-BEGIN {
- # lib.pm is documented to only work with Unix filepaths.
- @lib_dir = qw(stuff moo);
- $Lib_Dir = join "/", @lib_dir;
- $Arch_Dir = join "/", @lib_dir, $Config{archname};
-
- # create the auto/ directory and a module
- $Auto_Dir = File::Spec->catdir(@lib_dir, $Config{archname},'auto');
- $Module = File::Spec->catfile(@lib_dir, 'Yup.pm');
-
- mkpath [$Auto_Dir];
-
- open(MOD, ">$Module") || DIE $!;
- print MOD <<'MODULE';
-package Yup;
-$Plan = 9;
-return '42';
-MODULE
-
- close MOD;
-}
-
-END {
- # cleanup the auto/ directory we created.
- rmtree([$lib_dir[0]]);
-}
-
-
-use lib $Lib_Dir;
-use lib $Lib_Dir;
-
-BEGIN { use_ok('Yup') }
-
-BEGIN {
- if ($^O eq 'MacOS') {
- for ($Lib_Dir, $Arch_Dir) {
- tr|/|:|;
- $_ .= ":" unless /:$/;
- $_ = ":$_" unless /^:/; # we know this path is relative
- }
- }
- is( $INC[1], $Lib_Dir, 'lib adding at end of @INC' );
- print "# \@INC == @INC\n";
- is( $INC[0], $Arch_Dir, ' auto/ dir in front of that' );
- is( grep(/^\Q$Lib_Dir\E$/, @INC), 1, ' no duplicates' );
-
- # Yes, %INC uses Unixy filepaths.
- # Not on Mac OS, it doesn't ... it never has, at least.
- my $path = join("/",$Lib_Dir, 'Yup.pm');
- if ($^O eq 'MacOS') {
- $path = $Lib_Dir . 'Yup.pm';
- }
- is( $INC{'Yup.pm'}, $path, '%INC set properly' );
-
- is( eval { do 'Yup.pm' }, 42, 'do() works' );
- ok( eval { require Yup; }, ' require()' );
- ok( eval "use Yup; 1;", ' use()' );
- is( $@, '' );
-
- is_deeply(\@OrigINC, \@lib::ORIG_INC, '@lib::ORIG_INC' );
-}
-
-no lib $Lib_Dir;
-
-unlike( do { eval 'use lib $Config{installsitelib};'; $@ || '' },
- qr/::Config is read-only/, 'lib handles readonly stuff' );
-
-BEGIN {
- is( grep(/stuff/, @INC), 0, 'no lib' );
- ok( !do 'Yup.pm', ' do() effected' );
-}
Deleted: vendor/perl/dist/lib/lib_pm.PL
===================================================================
--- vendor/perl/dist/lib/lib_pm.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/lib_pm.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,319 +0,0 @@
-use Config;
-use File::Basename qw(&basename &dirname);
-use File::Spec;
-use Cwd;
-
-my $origdir = cwd;
-chdir dirname($0);
-my $file = basename($0, '.PL');
-$file =~ s/_(pm)$/.$1/i;
-
-my $useConfig;
-my $Config_archname;
-my $Config_version;
-my $Config_inc_version_list;
-
-# Expand the variables only if explicitly requested
-# or if a previously installed lib.pm does this, too
-# because otherwise relocating Perl becomes much harder.
-
-my $expand_config_vars = 0;
-if ($ENV{PERL_BUILD_EXPAND_CONFIG_VARS}) {
- $expand_config_vars = 1;
-}
-elsif (exists $ENV{PERL_BUILD_EXPAND_CONFIG_VARS}) {
- $expand_config_vars = 0;
-}
-else {
- eval <<'HERE';
- require lib;
- my $lib_file = $INC{"lib.pm"};
- open my $fh, '<', $lib_file
- or die "Could not open file '$lib_file' for reading: $!";
- my $ConfigRegex = qr/(?:use|require)\s+Config(?:\s+|;)/;
- my $found_config = 0;
- while (defined($_ = <$fh>)) {
- # crude heuristics to check that we were using Config
- if (/^\s*$ConfigRegex/ || /^\s*eval.*$ConfigRegex/) {
- $found_config = 1;
- last;
- }
- }
- $expand_config_vars = $found_config ? 0 : 1;
-HERE
- $expand_config_vars = 0 if $@;
-}
-
-if ($expand_config_vars) {
- $useConfig = '';
- $Config_archname = qq('$Config{archname}');
- $Config_version = qq('$Config{version}');
- my @Config_inc_version_list =
- reverse split / /, $Config{inc_version_list};
- $Config_inc_version_list =
- @Config_inc_version_list ?
- qq(qw(@Config_inc_version_list)) : q(());
-} else {
- $useConfig = 'use Config;';
- $Config_archname = q($Config{archname});
- $Config_version = q($Config{version});
- $Config_inc_version_list =
- q(reverse split / /, $Config{inc_version_list});
-}
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-package lib;
-
-# THIS FILE IS AUTOMATICALLY GENERATED FROM lib_pm.PL.
-# ANY CHANGES TO THIS FILE WILL BE OVERWRITTEN BY THE NEXT PERL BUILD.
-
-$useConfig
-
-use strict;
-
-my \$archname = $Config_archname;
-my \$version = $Config_version;
-my \@inc_version_list = $Config_inc_version_list;
-
-!GROK!THIS!
-print OUT <<'!NO!SUBS!';
-
-our @ORIG_INC = @INC; # take a handy copy of 'original' value
-our $VERSION = '0.62';
-my $Is_MacOS = $^O eq 'MacOS';
-my $Mac_FS;
-if ($Is_MacOS) {
- require File::Spec;
- $Mac_FS = eval { require Mac::FileSpec::Unixish };
-}
-
-sub import {
- shift;
-
- my %names;
- foreach (reverse @_) {
- my $path = $_; # we'll be modifying it, so break the alias
- if ($path eq '') {
- require Carp;
- Carp::carp("Empty compile time value given to use lib");
- }
-
- $path = _nativize($path);
-
- if ($path !~ /\.par$/i && -e $path && ! -d _) {
- require Carp;
- Carp::carp("Parameter to use lib must be directory, not file");
- }
- unshift(@INC, $path);
- # Add any previous version directories we found at configure time
- foreach my $incver (@inc_version_list)
- {
- my $dir = $Is_MacOS
- ? File::Spec->catdir( $path, $incver )
- : "$path/$incver";
- unshift(@INC, $dir) if -d $dir;
- }
- # Put a corresponding archlib directory in front of $path if it
- # looks like $path has an archlib directory below it.
- my($arch_auto_dir, $arch_dir, $version_dir, $version_arch_dir)
- = _get_dirs($path);
- unshift(@INC, $arch_dir) if -d $arch_auto_dir;
- unshift(@INC, $version_dir) if -d $version_dir;
- unshift(@INC, $version_arch_dir) if -d $version_arch_dir;
- }
-
- # remove trailing duplicates
- @INC = grep { ++$names{$_} == 1 } @INC;
- return;
-}
-
-
-sub unimport {
- shift;
-
- my %names;
- foreach (@_) {
- my $path = _nativize($_);
-
- my($arch_auto_dir, $arch_dir, $version_dir, $version_arch_dir)
- = _get_dirs($path);
- ++$names{$path};
- ++$names{$arch_dir} if -d $arch_auto_dir;
- ++$names{$version_dir} if -d $version_dir;
- ++$names{$version_arch_dir} if -d $version_arch_dir;
- }
-
- # Remove ALL instances of each named directory.
- @INC = grep { !exists $names{$_} } @INC;
- return;
-}
-
-sub _get_dirs {
- my($dir) = @_;
- my($arch_auto_dir, $arch_dir, $version_dir, $version_arch_dir);
-
- # we could use this for all platforms in the future, but leave it
- # Mac-only for now, until there is more time for testing it.
- if ($Is_MacOS) {
- $arch_auto_dir = File::Spec->catdir( $dir, $archname, 'auto' );
- $arch_dir = File::Spec->catdir( $dir, $archname, );
- $version_dir = File::Spec->catdir( $dir, $version );
- $version_arch_dir = File::Spec->catdir( $dir, $version, $archname );
- } else {
- $arch_auto_dir = "$dir/$archname/auto";
- $arch_dir = "$dir/$archname";
- $version_dir = "$dir/$version";
- $version_arch_dir = "$dir/$version/$archname";
- }
- return($arch_auto_dir, $arch_dir, $version_dir, $version_arch_dir);
-}
-
-sub _nativize {
- my($dir) = @_;
-
- if ($Is_MacOS && $Mac_FS && ! -d $dir) {
- $dir = Mac::FileSpec::Unixish::nativize($dir);
- $dir .= ":" unless $dir =~ /:$/;
- }
-
- return $dir;
-}
-
-1;
-__END__
-
-=head1 NAME
-
-lib - manipulate @INC at compile time
-
-=head1 SYNOPSIS
-
- use lib LIST;
-
- no lib LIST;
-
-=head1 DESCRIPTION
-
-This is a small simple module which simplifies the manipulation of @INC
-at compile time.
-
-It is typically used to add extra directories to perl's search path so
-that later C<use> or C<require> statements will find modules which are
-not located on perl's default search path.
-
-=head2 Adding directories to @INC
-
-The parameters to C<use lib> are added to the start of the perl search
-path. Saying
-
- use lib LIST;
-
-is I<almost> the same as saying
-
- BEGIN { unshift(@INC, LIST) }
-
-For each directory in LIST (called $dir here) the lib module also
-checks to see if a directory called $dir/$archname/auto exists.
-If so the $dir/$archname directory is assumed to be a corresponding
-architecture specific directory and is added to @INC in front of $dir.
-lib.pm also checks if directories called $dir/$version and $dir/$version/$archname
-exist and adds these directories to @INC.
-
-The current value of C<$archname> can be found with this command:
-
- perl -V:archname
-
-The corresponding command to get the current value of C<$version> is:
-
- perl -V:version
-
-To avoid memory leaks, all trailing duplicate entries in @INC are
-removed.
-
-=head2 Deleting directories from @INC
-
-You should normally only add directories to @INC. If you need to
-delete directories from @INC take care to only delete those which you
-added yourself or which you are certain are not needed by other modules
-in your script. Other modules may have added directories which they
-need for correct operation.
-
-The C<no lib> statement deletes all instances of each named directory
-from @INC.
-
-For each directory in LIST (called $dir here) the lib module also
-checks to see if a directory called $dir/$archname/auto exists.
-If so the $dir/$archname directory is assumed to be a corresponding
-architecture specific directory and is also deleted from @INC.
-
-=head2 Restoring original @INC
-
-When the lib module is first loaded it records the current value of @INC
-in an array C<@lib::ORIG_INC>. To restore @INC to that value you
-can say
-
- @INC = @lib::ORIG_INC;
-
-=head1 CAVEATS
-
-In order to keep lib.pm small and simple, it only works with Unix
-filepaths. This doesn't mean it only works on Unix, but non-Unix
-users must first translate their file paths to Unix conventions.
-
- # VMS users wanting to put [.stuff.moo] into
- # their @INC would write
- use lib 'stuff/moo';
-
-=head1 NOTES
-
-In the future, this module will likely use File::Spec for determining
-paths, as it does now for Mac OS (where Unix-style or Mac-style paths
-work, and Unix-style paths are converted properly to Mac-style paths
-before being added to @INC).
-
-If you try to add a file to @INC as follows:
-
- use lib 'this_is_a_file.txt';
-
-C<lib> will warn about this. The sole exceptions are files with the
-C<.par> extension which are intended to be used as libraries.
-
-=head1 SEE ALSO
-
-FindBin - optional module which deals with paths relative to the source file.
-
-PAR - optional module which can treat C<.par> files as Perl libraries.
-
-=head1 AUTHOR
-
-Tim Bunce, 2nd June 1995.
-
-C<lib> is maintained by the perl5-porters. Please direct
-any questions to the canonical mailing list. Anything that
-is applicable to the CPAN release can be sent to its maintainer,
-though.
-
-Maintainer: The Perl5-Porters <perl5-porters at perl.org>
-
-Maintainer of the CPAN release: Steffen Mueller <smueller at cpan.org>
-
-=head1 COPYRIGHT AND LICENSE
-
-This package has been part of the perl core since perl 5.001.
-It has been released separately to CPAN so older installations
-can benefit from bug fixes.
-
-This package has the same copyright and license as the perl core.
-
-=cut
-!NO!SUBS!
-
-close OUT or die "Can't close $file: $!";
-chdir $origdir;
Deleted: vendor/perl/dist/lib/look.pl
===================================================================
--- vendor/perl/dist/lib/look.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/look.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,54 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-;# Usage: &look(*FILEHANDLE,$key,$dict,$fold)
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-
-;# Sets file position in FILEHANDLE to be first line greater than or equal
-;# (stringwise) to $key. Pass flags for dictionary order and case folding.
-
-sub look {
- local(*FH,$key,$dict,$fold) = @_;
- local($max,$min,$mid,$_);
- local($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
- $blksize,$blocks) = stat(FH);
- $blksize = 8192 unless $blksize;
- $key =~ s/[^\w\s]//g if $dict;
- $key = lc $key if $fold;
- $max = int($size / $blksize);
- while ($max - $min > 1) {
- $mid = int(($max + $min) / 2);
- seek(FH,$mid * $blksize,0);
- $_ = <FH> if $mid; # probably a partial line
- $_ = <FH>;
- chop;
- s/[^\w\s]//g if $dict;
- $_ = lc $_ if $fold;
- if ($_ lt $key) {
- $min = $mid;
- }
- else {
- $max = $mid;
- }
- }
- $min *= $blksize;
- seek(FH,$min,0);
- <FH> if $min;
- while (<FH>) {
- chop;
- s/[^\w\s]//g if $dict;
- $_ = lc $_ if $fold;
- last if $_ ge $key;
- $min = tell(FH);
- }
- seek(FH,$min,0);
- $min;
-}
-
-1;
Deleted: vendor/perl/dist/lib/mro.pm
===================================================================
--- vendor/perl/dist/lib/mro.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/mro.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,378 +0,0 @@
-# mro.pm
-#
-# Copyright (c) 2007 Brandon L Black
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the README file.
-#
-package mro;
-use strict;
-use warnings;
-
-# mro.pm versions < 1.00 reserved for MRO::Compat
-# for partial back-compat to 5.[68].x
-our $VERSION = '1.00';
-
-sub import {
- mro::set_mro(scalar(caller), $_[1]) if $_[1];
-}
-
-package # hide me from PAUSE
- next;
-
-sub can { mro::_nextcan($_[0], 0) }
-
-sub method {
- my $method = mro::_nextcan($_[0], 1);
- goto &$method;
-}
-
-package # hide me from PAUSE
- maybe::next;
-
-sub method {
- my $method = mro::_nextcan($_[0], 0);
- goto &$method if defined $method;
- return;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-mro - Method Resolution Order
-
-=head1 SYNOPSIS
-
- use mro; # enables next::method and friends globally
-
- use mro 'dfs'; # enable DFS MRO for this class (Perl default)
- use mro 'c3'; # enable C3 MRO for this class
-
-=head1 DESCRIPTION
-
-The "mro" namespace provides several utilities for dealing
-with method resolution order and method caching in general.
-
-These interfaces are only available in Perl 5.9.5 and higher.
-See L<MRO::Compat> on CPAN for a mostly forwards compatible
-implementation for older Perls.
-
-=head1 OVERVIEW
-
-It's possible to change the MRO of a given class either by using C<use
-mro> as shown in the synopsis, or by using the L</mro::set_mro> function
-below. The functions in the mro namespace do not require loading the
-C<mro> module, as they are actually provided by the core perl interpreter.
-
-The special methods C<next::method>, C<next::can>, and
-C<maybe::next::method> are not available until this C<mro> module
-has been loaded via C<use> or C<require>.
-
-=head1 The C3 MRO
-
-In addition to the traditional Perl default MRO (depth first
-search, called C<DFS> here), Perl now offers the C3 MRO as
-well. Perl's support for C3 is based on the work done in
-Stevan Little's module L<Class::C3>, and most of the C3-related
-documentation here is ripped directly from there.
-
-=head2 What is C3?
-
-C3 is the name of an algorithm which aims to provide a sane method
-resolution order under multiple inheritance. It was first introduced in
-the language Dylan (see links in the L</"SEE ALSO"> section), and then
-later adopted as the preferred MRO (Method Resolution Order) for the
-new-style classes in Python 2.3. Most recently it has been adopted as the
-"canonical" MRO for Perl 6 classes, and the default MRO for Parrot objects
-as well.
-
-=head2 How does C3 work
-
-C3 works by always preserving local precendence ordering. This essentially
-means that no class will appear before any of its subclasses. Take, for
-instance, the classic diamond inheritance pattern:
-
- <A>
- / \
- <B> <C>
- \ /
- <D>
-
-The standard Perl 5 MRO would be (D, B, A, C). The result being that B<A>
-appears before B<C>, even though B<C> is the subclass of B<A>. The C3 MRO
-algorithm however, produces the following order: (D, B, C, A), which does
-not have this issue.
-
-This example is fairly trivial; for more complex cases and a deeper
-explanation, see the links in the L</"SEE ALSO"> section.
-
-=head1 Functions
-
-=head2 mro::get_linear_isa($classname[, $type])
-
-Returns an arrayref which is the linearized MRO of the given class.
-Uses whichever MRO is currently in effect for that class by default,
-or the given MRO (either C<c3> or C<dfs> if specified as C<$type>).
-
-The linearized MRO of a class is an ordered array of all of the
-classes one would search when resolving a method on that class,
-starting with the class itself.
-
-If the requested class doesn't yet exist, this function will still
-succeed, and return C<[ $classname ]>
-
-Note that C<UNIVERSAL> (and any members of C<UNIVERSAL>'s MRO) are not
-part of the MRO of a class, even though all classes implicitly inherit
-methods from C<UNIVERSAL> and its parents.
-
-=head2 mro::set_mro($classname, $type)
-
-Sets the MRO of the given class to the C<$type> argument (either
-C<c3> or C<dfs>).
-
-=head2 mro::get_mro($classname)
-
-Returns the MRO of the given class (either C<c3> or C<dfs>).
-
-=head2 mro::get_isarev($classname)
-
-Gets the C<mro_isarev> for this class, returned as an
-arrayref of class names. These are every class that "isa"
-the given class name, even if the isa relationship is
-indirect. This is used internally by the MRO code to
-keep track of method/MRO cache invalidations.
-
-Currently, this list only grows, it never shrinks. This
-was a performance consideration (properly tracking and
-deleting isarev entries when someone removes an entry
-from an C<@ISA> is costly, and it doesn't happen often
-anyways). The fact that a class which no longer truly
-"isa" this class at runtime remains on the list should be
-considered a quirky implementation detail which is subject
-to future change. It shouldn't be an issue as long as
-you're looking at this list for the same reasons the
-core code does: as a performance optimization
-over having to search every class in existence.
-
-As with C<mro::get_mro> above, C<UNIVERSAL> is special.
-C<UNIVERSAL> (and parents') isarev lists do not include
-every class in existence, even though all classes are
-effectively descendants for method inheritance purposes.
-
-=head2 mro::is_universal($classname)
-
-Returns a boolean status indicating whether or not
-the given classname is either C<UNIVERSAL> itself,
-or one of C<UNIVERSAL>'s parents by C<@ISA> inheritance.
-
-Any class for which this function returns true is
-"universal" in the sense that all classes potentially
-inherit methods from it.
-
-For similar reasons to C<isarev> above, this flag is
-permanent. Once it is set, it does not go away, even
-if the class in question really isn't universal anymore.
-
-=head2 mro::invalidate_all_method_caches()
-
-Increments C<PL_sub_generation>, which invalidates method
-caching in all packages.
-
-=head2 mro::method_changed_in($classname)
-
-Invalidates the method cache of any classes dependent on the
-given class. This is not normally necessary. The only
-known case where pure perl code can confuse the method
-cache is when you manually install a new constant
-subroutine by using a readonly scalar value, like the
-internals of L<constant> do. If you find another case,
-please report it so we can either fix it or document
-the exception here.
-
-=head2 mro::get_pkg_gen($classname)
-
-Returns an integer which is incremented every time a
-real local method in the package C<$classname> changes,
-or the local C<@ISA> of C<$classname> is modified.
-
-This is intended for authors of modules which do lots
-of class introspection, as it allows them to very quickly
-check if anything important about the local properties
-of a given class have changed since the last time they
-looked. It does not increment on method/C<@ISA>
-changes in superclasses.
-
-It's still up to you to seek out the actual changes,
-and there might not actually be any. Perhaps all
-of the changes since you last checked cancelled each
-other out and left the package in the state it was in
-before.
-
-This integer normally starts off at a value of C<1>
-when a package stash is instantiated. Calling it
-on packages whose stashes do not exist at all will
-return C<0>. If a package stash is completely
-deleted (not a normal occurence, but it can happen
-if someone does something like C<undef %PkgName::>),
-the number will be reset to either C<0> or C<1>,
-depending on how completely package was wiped out.
-
-=head2 next::method
-
-This is somewhat like C<SUPER>, but it uses the C3 method
-resolution order to get better consistency in multiple
-inheritance situations. Note that while inheritance in
-general follows whichever MRO is in effect for the
-given class, C<next::method> only uses the C3 MRO.
-
-One generally uses it like so:
-
- sub some_method {
- my $self = shift;
- my $superclass_answer = $self->next::method(@_);
- return $superclass_answer + 1;
- }
-
-Note that you don't (re-)specify the method name.
-It forces you to always use the same method name
-as the method you started in.
-
-It can be called on an object or a class, of course.
-
-The way it resolves which actual method to call is:
-
-=over 4
-
-=item 1
-
-First, it determines the linearized C3 MRO of
-the object or class it is being called on.
-
-=item 2
-
-Then, it determines the class and method name
-of the context it was invoked from.
-
-=item 3
-
-Finally, it searches down the C3 MRO list until
-it reaches the contextually enclosing class, then
-searches further down the MRO list for the next
-method with the same name as the contextually
-enclosing method.
-
-=back
-
-Failure to find a next method will result in an
-exception being thrown (see below for alternatives).
-
-This is substantially different than the behavior
-of C<SUPER> under complex multiple inheritance.
-(This becomes obvious when one realizes that the
-common superclasses in the C3 linearizations of
-a given class and one of its parents will not
-always be ordered the same for both.)
-
-B<Caveat>: Calling C<next::method> from methods defined outside the class:
-
-There is an edge case when using C<next::method> from within a subroutine
-which was created in a different module than the one it is called from. It
-sounds complicated, but it really isn't. Here is an example which will not
-work correctly:
-
- *Foo::foo = sub { (shift)->next::method(@_) };
-
-The problem exists because the anonymous subroutine being assigned to the
-C<*Foo::foo> glob will show up in the call stack as being called
-C<__ANON__> and not C<foo> as you might expect. Since C<next::method> uses
-C<caller> to find the name of the method it was called in, it will fail in
-this case.
-
-But fear not, there's a simple solution. The module C<Sub::Name> will
-reach into the perl internals and assign a name to an anonymous subroutine
-for you. Simply do this:
-
- use Sub::Name 'subname';
- *Foo::foo = subname 'Foo::foo' => sub { (shift)->next::method(@_) };
-
-and things will Just Work.
-
-=head2 next::can
-
-This is similar to C<next::method>, but just returns either a code
-reference or C<undef> to indicate that no further methods of this name
-exist.
-
-=head2 maybe::next::method
-
-In simple cases, it is equivalent to:
-
- $self->next::method(@_) if $self->next_can;
-
-But there are some cases where only this solution
-works (like C<goto &maybe::next::method>);
-
-=head1 SEE ALSO
-
-=head2 The original Dylan paper
-
-=over 4
-
-=item L<http://www.webcom.com/haahr/dylan/linearization-oopsla96.html>
-
-=back
-
-=head2 The prototype Perl 6 Object Model uses C3
-
-=over 4
-
-=item L<http://svn.openfoundry.org/pugs/perl5/Perl6-MetaModel/>
-
-=back
-
-=head2 Parrot now uses C3
-
-=over 4
-
-=item L<http://aspn.activestate.com/ASPN/Mail/Message/perl6-internals/2746631>
-
-=item L<http://use.perl.org/~autrijus/journal/25768>
-
-=back
-
-=head2 Python 2.3 MRO related links
-
-=over 4
-
-=item L<http://www.python.org/2.3/mro.html>
-
-=item L<http://www.python.org/2.2.2/descrintro.html#mro>
-
-=back
-
-=head2 C3 for TinyCLOS
-
-=over 4
-
-=item L<http://www.call-with-current-continuation.org/eggs/c3.html>
-
-=back
-
-=head2 Class::C3
-
-=over 4
-
-=item L<Class::C3>
-
-=back
-
-=head1 AUTHOR
-
-Brandon L. Black, E<lt>blblack at gmail.comE<gt>
-
-Based on Stevan Little's L<Class::C3>
-
-=cut
Deleted: vendor/perl/dist/lib/newgetopt.pl
===================================================================
--- vendor/perl/dist/lib/newgetopt.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/newgetopt.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,77 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# It is now just a wrapper around the Getopt::Long module.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: Getopt::Long
-
-{ package newgetopt;
-
- # Values for $order. See GNU getopt.c for details.
- $REQUIRE_ORDER = 0;
- $PERMUTE = 1;
- $RETURN_IN_ORDER = 2;
-
- # Handle POSIX compliance.
- if ( defined $ENV{"POSIXLY_CORRECT"} ) {
- $autoabbrev = 0; # no automatic abbrev of options (???)
- $getopt_compat = 0; # disallow '+' to start options
- $option_start = "(--|-)";
- $order = $REQUIRE_ORDER;
- $bundling = 0;
- $passthrough = 0;
- }
- else {
- $autoabbrev = 1; # automatic abbrev of options
- $getopt_compat = 1; # allow '+' to start options
- $option_start = "(--|-|\\+)";
- $order = $PERMUTE;
- $bundling = 0;
- $passthrough = 0;
- }
-
- # Other configurable settings.
- $debug = 0; # for debugging
- $ignorecase = 1; # ignore case when matching options
- $argv_end = "--"; # don't change this!
-}
-
-use Getopt::Long;
-
-################ Subroutines ################
-
-sub NGetOpt {
-
- $Getopt::Long::debug = $newgetopt::debug
- if defined $newgetopt::debug;
- $Getopt::Long::autoabbrev = $newgetopt::autoabbrev
- if defined $newgetopt::autoabbrev;
- $Getopt::Long::getopt_compat = $newgetopt::getopt_compat
- if defined $newgetopt::getopt_compat;
- $Getopt::Long::option_start = $newgetopt::option_start
- if defined $newgetopt::option_start;
- $Getopt::Long::order = $newgetopt::order
- if defined $newgetopt::order;
- $Getopt::Long::bundling = $newgetopt::bundling
- if defined $newgetopt::bundling;
- $Getopt::Long::ignorecase = $newgetopt::ignorecase
- if defined $newgetopt::ignorecase;
- $Getopt::Long::ignorecase = $newgetopt::ignorecase
- if defined $newgetopt::ignorecase;
- $Getopt::Long::passthrough = $newgetopt::passthrough
- if defined $newgetopt::passthrough;
-
- &GetOptions;
-}
-
-################ Package return ################
-
-1;
-
-################ End of newgetopt.pl ################
Deleted: vendor/perl/dist/lib/open2.pl
===================================================================
--- vendor/perl/dist/lib/open2.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/open2.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,17 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# This is a compatibility interface to IPC::Open2. New programs should
-# do
-#
-# use IPC::Open2;
-#
-# instead of
-#
-# require 'open2.pl';
-
-package main;
-use IPC::Open2 'open2';
-1
Deleted: vendor/perl/dist/lib/open3.pl
===================================================================
--- vendor/perl/dist/lib/open3.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/open3.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,17 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# This is a compatibility interface to IPC::Open3. New programs should
-# do
-#
-# use IPC::Open3;
-#
-# instead of
-#
-# require 'open3.pl';
-
-package main;
-use IPC::Open3 'open3';
-1
Deleted: vendor/perl/dist/lib/parent.pm
===================================================================
--- vendor/perl/dist/lib/parent.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/parent.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,136 +0,0 @@
-package parent;
-use strict;
-use vars qw($VERSION);
-$VERSION = '0.221';
-
-sub import {
- my $class = shift;
-
- my $inheritor = caller(0);
-
- if ( @_ and $_[0] eq '-norequire' ) {
- shift @_;
- } else {
- for ( my @filename = @_ ) {
- if ( $_ eq $inheritor ) {
- warn "Class '$inheritor' tried to inherit from itself\n";
- };
-
- s{::|'}{/}g;
- require "$_.pm"; # dies if the file is not found
- }
- }
-
- {
- no strict 'refs';
- # This is more efficient than push for the new MRO
- # at least until the new MRO is fixed
- @{"$inheritor\::ISA"} = (@{"$inheritor\::ISA"} , @_);
- };
-};
-
-"All your base are belong to us"
-
-__END__
-
-=head1 NAME
-
-parent - Establish an ISA relationship with base classes at compile time
-
-=head1 SYNOPSIS
-
- package Baz;
- use parent qw(Foo Bar);
-
-=head1 DESCRIPTION
-
-Allows you to both load one or more modules, while setting up inheritance from
-those modules at the same time. Mostly similar in effect to
-
- package Baz;
- BEGIN {
- require Foo;
- require Bar;
- push @ISA, qw(Foo Bar);
- }
-
-By default, every base class needs to live in a file of its own.
-If you want to have a subclass and its parent class in the same file, you
-can tell C<parent> not to load any modules by using the C<-norequire> switch:
-
- package Foo;
- sub exclaim { "I CAN HAS PERL" }
-
- package DoesNotLoadFooBar;
- use parent -norequire, 'Foo', 'Bar';
- # will not go looking for Foo.pm or Bar.pm
-
-This is equivalent to the following code:
-
- package Foo;
- sub exclaim { "I CAN HAS PERL" }
-
- package DoesNotLoadFooBar;
- push @DoesNotLoadFooBar::ISA, 'Foo';
-
-This is also helpful for the case where a package lives within
-a differently named file:
-
- package MyHash;
- use Tie::Hash;
- use parent -norequire, 'Tie::StdHash';
-
-This is equivalent to the following code:
-
- package MyHash;
- require Tie::Hash;
- push @ISA, 'Tie::StdHash';
-
-If you want to load a subclass from a file that C<require> would
-not consider an eligible filename (that is, it does not end in
-either C<.pm> or C<.pmc>), use the following code:
-
- package MySecondPlugin;
- require './plugins/custom.plugin'; # contains Plugin::Custom
- use parent -norequire, 'Plugin::Custom';
-
-=head1 DIAGNOSTICS
-
-=over 4
-
-=item Class 'Foo' tried to inherit from itself
-
-Attempting to inherit from yourself generates a warning.
-
- use Foo;
- use parent 'Foo';
-
-=back
-
-=head1 HISTORY
-
-This module was forked from L<base> to remove the cruft
-that had accumulated in it.
-
-=head1 CAVEATS
-
-=head1 SEE ALSO
-
-L<base>
-
-=head1 AUTHORS AND CONTRIBUTORS
-
-Rafa\xEBl Garcia-Suarez, Bart Lateur, Max Maischein, Anno Siegel, Michael Schwern
-
-=head1 MAINTAINER
-
-Max Maischein C< corion at cpan.org >
-
-Copyright (c) 2007 Max Maischein C<< <corion at cpan.org> >>
-Based on the idea of C<base.pm>, which was introduced with Perl 5.004_04.
-
-=head1 LICENSE
-
-This module is released under the same terms as Perl itself.
-
-=cut
Deleted: vendor/perl/dist/lib/pwd.pl
===================================================================
--- vendor/perl/dist/lib/pwd.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/pwd.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,71 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-;# pwd.pl - keeps track of current working directory in PWD environment var
-;#
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: Cwd
-
-;# $RCSfile: pwd.pl,v $$Revision: 1.1.1.2 $$Date: 2011-05-18 13:33:26 $
-;#
-;# $Log: not supported by cvs2svn $
-;#
-;# Usage:
-;# require "pwd.pl";
-;# &initpwd;
-;# ...
-;# &chdir($newdir);
-
-package pwd;
-
-sub main'initpwd {
- if ($ENV{'PWD'}) {
- local($dd,$di) = stat('.');
- local($pd,$pi) = stat($ENV{'PWD'});
- if (!defined $dd or !defined $pd or $di != $pi or $dd != $pd) {
- chop($ENV{'PWD'} = `pwd`);
- }
- }
- else {
- chop($ENV{'PWD'} = `pwd`);
- }
- if ($ENV{'PWD'} =~ m|(/[^/]+(/[^/]+/[^/]+))(.*)|) {
- local($pd,$pi) = stat($2);
- local($dd,$di) = stat($1);
- if (defined $pd and defined $dd and $di == $pi and $dd == $pd) {
- $ENV{'PWD'}="$2$3";
- }
- }
-}
-
-sub main'chdir {
- local($newdir) = shift;
- $newdir =~ s|/{2,}|/|g;
- if (chdir $newdir) {
- if ($newdir =~ m#^/#) {
- $ENV{'PWD'} = $newdir;
- }
- else {
- local(@curdir) = split(m#/#,$ENV{'PWD'});
- @curdir = '' unless @curdir;
- foreach $component (split(m#/#, $newdir)) {
- next if $component eq '.';
- pop(@curdir),next if $component eq '..';
- push(@curdir,$component);
- }
- $ENV{'PWD'} = join('/', at curdir) || '/';
- }
- }
- else {
- 0;
- }
-}
-
-1;
Deleted: vendor/perl/dist/lib/shellwords.pl
===================================================================
--- vendor/perl/dist/lib/shellwords.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/shellwords.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,19 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-;# This legacy library is deprecated and will be removed in a future
-;# release of perl.
-;#
-;# shellwords.pl
-;#
-;# Usage:
-;# require 'shellwords.pl';
-;# @words = shellwords($line);
-;# or
-;# @words = shellwords(@lines);
-;# or
-;# @words = shellwords(); # defaults to $_ (and clobbers it)
-
-require Text::ParseWords;
-*shellwords = \&Text::ParseWords::old_shellwords;
-
-1;
Deleted: vendor/perl/dist/lib/stat.pl
===================================================================
--- vendor/perl/dist/lib/stat.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/stat.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,35 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-;# This legacy library is deprecated and will be removed in a future
-;# release of perl.
-;#
-;# Usage:
-;# require 'stat.pl';
-;# @ary = stat(foo);
-;# $st_dev = @ary[$ST_DEV];
-;#
-
-$ST_DEV = 0;
-$ST_INO = 1;
-$ST_MODE = 2;
-$ST_NLINK = 3;
-$ST_UID = 4;
-$ST_GID = 5;
-$ST_RDEV = 6;
-$ST_SIZE = 7;
-$ST_ATIME = 8;
-$ST_MTIME = 9;
-$ST_CTIME = 10;
-$ST_BLKSIZE = 11;
-$ST_BLOCKS = 12;
-
-;# Usage:
-;# require 'stat.pl';
-;# do Stat('foo'); # sets st_* as a side effect
-;#
-sub Stat {
- ($st_dev,$st_ino,$st_mode,$st_nlink,$st_uid,$st_gid,$st_rdev,$st_size,
- $st_atime,$st_mtime,$st_ctime,$st_blksize,$st_blocks) = stat(shift(@_));
-}
-
-1;
Deleted: vendor/perl/dist/lib/syslog.pl
===================================================================
--- vendor/perl/dist/lib/syslog.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/syslog.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,201 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-#
-# syslog.pl
-#
-# $Log: not supported by cvs2svn $
-#
-# tom christiansen <tchrist at convex.com>
-# modified to use sockets by Larry Wall <lwall at jpl-devvax.jpl.nasa.gov>
-# NOTE: openlog now takes three arguments, just like openlog(3)
-#
-# call syslog() with a string priority and a list of printf() args
-# like syslog(3)
-#
-# usage: require 'syslog.pl';
-#
-# then (put these all in a script to test function)
-#
-#
-# do openlog($program,'cons,pid','user');
-# do syslog('info','this is another test');
-# do syslog('mail|warning','this is a better test: %d', time);
-# do closelog();
-#
-# do syslog('debug','this is the last test');
-# do openlog("$program $$",'ndelay','user');
-# do syslog('notice','fooprogram: this is really done');
-#
-# $! = 55;
-# do syslog('info','problem was %m'); # %m == $! in syslog(3)
-
-package syslog;
-
-use warnings::register;
-
-$host = 'localhost' unless $host; # set $syslog'host to change
-
-if ($] >= 5 && warnings::enabled()) {
- warnings::warn("You should 'use Sys::Syslog' instead; continuing");
-}
-
-require 'syslog.ph';
-
- eval 'use Socket; 1' ||
- eval { require "socket.ph" } ||
- require "sys/socket.ph";
-
-$maskpri = &LOG_UPTO(&LOG_DEBUG);
-
-sub main'openlog {
- ($ident, $logopt, $facility) = @_; # package vars
- $lo_pid = $logopt =~ /\bpid\b/;
- $lo_ndelay = $logopt =~ /\bndelay\b/;
- $lo_cons = $logopt =~ /\bcons\b/;
- $lo_nowait = $logopt =~ /\bnowait\b/;
- &connect if $lo_ndelay;
-}
-
-sub main'closelog {
- $facility = $ident = '';
- &disconnect;
-}
-
-sub main'setlogmask {
- local($oldmask) = $maskpri;
- $maskpri = shift;
- $oldmask;
-}
-
-sub main'syslog {
- local($priority) = shift;
- local($mask) = shift;
- local($message, $whoami);
- local(@words, $num, $numpri, $numfac, $sum);
- local($facility) = $facility; # may need to change temporarily.
-
- die "syslog: expected both priority and mask" unless $mask && $priority;
-
- @words = split(/\W+/, $priority, 2);# Allow "level" or "level|facility".
- undef $numpri;
- undef $numfac;
- foreach (@words) {
- $num = &xlate($_); # Translate word to number.
- if (/^kern$/ || $num < 0) {
- die "syslog: invalid level/facility: $_\n";
- }
- elsif ($num <= &LOG_PRIMASK) {
- die "syslog: too many levels given: $_\n" if defined($numpri);
- $numpri = $num;
- return 0 unless &LOG_MASK($numpri) & $maskpri;
- }
- else {
- die "syslog: too many facilities given: $_\n" if defined($numfac);
- $facility = $_;
- $numfac = $num;
- }
- }
-
- die "syslog: level must be given\n" unless defined($numpri);
-
- if (!defined($numfac)) { # Facility not specified in this call.
- $facility = 'user' unless $facility;
- $numfac = &xlate($facility);
- }
-
- &connect unless $connected;
-
- $whoami = $ident;
-
- if (!$ident && $mask =~ /^(\S.*):\s?(.*)/) {
- $whoami = $1;
- $mask = $2;
- }
-
- unless ($whoami) {
- ($whoami = getlogin) ||
- ($whoami = getpwuid($<)) ||
- ($whoami = 'syslog');
- }
-
- $whoami .= "[$$]" if $lo_pid;
-
- $mask =~ s/%m/$!/g;
- $mask .= "\n" unless $mask =~ /\n$/;
- $message = sprintf ($mask, @_);
-
- $sum = $numpri + $numfac;
- unless (send(SYSLOG,"<$sum>$whoami: $message",0)) {
- if ($lo_cons) {
- if ($pid = fork) {
- unless ($lo_nowait) {
- do {$died = wait;} until $died == $pid || $died < 0;
- }
- }
- else {
- open(CONS,">/dev/console");
- print CONS "<$facility.$priority>$whoami: $message\r";
- exit if defined $pid; # if fork failed, we're parent
- close CONS;
- }
- }
- }
-}
-
-sub xlate {
- local($name) = @_;
- $name = uc $name;
- $name = "LOG_$name" unless $name =~ /^LOG_/;
- $name = "syslog'$name";
- defined &$name ? &$name : -1;
-}
-
-sub connect {
- $pat = 'S n C4 x8';
-
- $af_unix = &AF_UNIX;
- $af_inet = &AF_INET;
-
- $stream = &SOCK_STREAM;
- $datagram = &SOCK_DGRAM;
-
- ($name,$aliases,$proto) = getprotobyname('udp');
- $udp = $proto;
-
- ($name,$aliases,$port,$proto) = getservbyname('syslog','udp');
- $syslog = $port;
-
- if (chop($myname = `hostname`)) {
- ($name,$aliases,$addrtype,$length, at addrs) = gethostbyname($myname);
- die "Can't lookup $myname\n" unless $name;
- @bytes = unpack("C4",$addrs[0]);
- }
- else {
- @bytes = (0,0,0,0);
- }
- $this = pack($pat, $af_inet, 0, @bytes);
-
- if ($host =~ /^\d+\./) {
- @bytes = split(/\./,$host);
- }
- else {
- ($name,$aliases,$addrtype,$length, at addrs) = gethostbyname($host);
- die "Can't lookup $host\n" unless $name;
- @bytes = unpack("C4",$addrs[0]);
- }
- $that = pack($pat,$af_inet,$syslog, at bytes);
-
- socket(SYSLOG,$af_inet,$datagram,$udp) || die "socket: $!\n";
- bind(SYSLOG,$this) || die "bind: $!\n";
- connect(SYSLOG,$that) || die "connect: $!\n";
-
- local($old) = select(SYSLOG); $| = 1; select($old);
- $connected = 1;
-}
-
-sub disconnect {
- close SYSLOG;
- $connected = 0;
-}
-
-1;
Deleted: vendor/perl/dist/lib/tainted.pl
===================================================================
--- vendor/perl/dist/lib/tainted.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/tainted.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,14 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-# This subroutine returns true if its argument is tainted, false otherwise.
-#
-
-sub tainted {
- local($@);
- eval { kill 0 * $_[0] };
- $@ =~ /^Insecure/;
-}
-
-1;
Deleted: vendor/perl/dist/lib/termcap.pl
===================================================================
--- vendor/perl/dist/lib/termcap.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/termcap.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,183 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-;# $RCSfile: termcap.pl,v $$Revision: 1.1.1.2 $$Date: 2011-05-18 13:33:26 $
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: Term::Cap
-#
-
-;#
-;# Usage:
-;# require 'ioctl.pl';
-;# ioctl(TTY,$TIOCGETP,$foo);
-;# ($ispeed,$ospeed) = unpack('cc',$foo);
-;# require 'termcap.pl';
-;# &Tgetent('vt100'); # sets $TC{'cm'}, etc.
-;# &Tputs(&Tgoto($TC{'cm'},$col,$row), 0, 'FILEHANDLE');
-;# &Tputs($TC{'dl'},$affcnt,'FILEHANDLE');
-;#
-sub Tgetent {
- local($TERM) = @_;
- local($TERMCAP,$_,$entry,$loop,$field);
-
- # warn "Tgetent: no ospeed set" unless $ospeed;
- foreach $key (keys %TC) {
- delete $TC{$key};
- }
- $TERM = $ENV{'TERM'} unless $TERM;
- $TERM =~ s/(\W)/\\$1/g;
- $TERMCAP = $ENV{'TERMCAP'};
- $TERMCAP = '/etc/termcap' unless $TERMCAP;
- if ($TERMCAP !~ m:^/:) {
- if ($TERMCAP !~ /(^|\|)$TERM[:\|]/) {
- $TERMCAP = '/etc/termcap';
- }
- }
- if ($TERMCAP =~ m:^/:) {
- $entry = '';
- do {
- $loop = "
- open(TERMCAP,'<$TERMCAP') || die \"Can't open $TERMCAP\";
- while (<TERMCAP>) {
- next if /^#/;
- next if /^\t/;
- if (/(^|\\|)${TERM}[:\\|]/) {
- chop;
- while (chop eq '\\\\') {
- \$_ .= <TERMCAP>;
- chop;
- }
- \$_ .= ':';
- last;
- }
- }
- close TERMCAP;
- \$entry .= \$_;
- ";
- eval $loop;
- } while s/:tc=([^:]+):/:/ && ($TERM = $1);
- $TERMCAP = $entry;
- }
-
- foreach $field (split(/:[\s:\\]*/,$TERMCAP)) {
- if ($field =~ /^\w\w$/) {
- $TC{$field} = 1;
- }
- elsif ($field =~ /^(\w\w)#(.*)/) {
- $TC{$1} = $2 if $TC{$1} eq '';
- }
- elsif ($field =~ /^(\w\w)=(.*)/) {
- $entry = $1;
- $_ = $2;
- s/\\E/\033/g;
- s/\\(200)/pack('c',0)/eg; # NUL character
- s/\\(0\d\d)/pack('c',oct($1))/eg; # octal
- s/\\(0x[0-9A-Fa-f][0-9A-Fa-f])/pack('c',hex($1))/eg; # hex
- s/\\(\d\d\d)/pack('c',$1 & 0177)/eg;
- s/\\n/\n/g;
- s/\\r/\r/g;
- s/\\t/\t/g;
- s/\\b/\b/g;
- s/\\f/\f/g;
- s/\\\^/\377/g;
- s/\^\?/\177/g;
- s/\^(.)/pack('c',ord($1) & 31)/eg;
- s/\\(.)/$1/g;
- s/\377/^/g;
- $TC{$entry} = $_ if $TC{$entry} eq '';
- }
- }
- $TC{'pc'} = "\0" if $TC{'pc'} eq '';
- $TC{'bc'} = "\b" if $TC{'bc'} eq '';
-}
-
- at Tputs = (0,200,133.3,90.9,74.3,66.7,50,33.3,16.7,8.3,5.5,4.1,2,1,.5,.2);
-
-sub Tputs {
- local($string,$affcnt,$FH) = @_;
- local($ms);
- if ($string =~ /(^[\d.]+)(\*?)(.*)$/) {
- $ms = $1;
- $ms *= $affcnt if $2;
- $string = $3;
- $decr = $Tputs[$ospeed];
- if ($decr > .1) {
- $ms += $decr / 2;
- $string .= $TC{'pc'} x ($ms / $decr);
- }
- }
- print $FH $string if $FH;
- $string;
-}
-
-sub Tgoto {
- local($string) = shift(@_);
- local($result) = '';
- local($after) = '';
- local($code,$tmp) = @_;
- local(@tmp);
- @tmp = ($tmp,$code);
- local($online) = 0;
- while ($string =~ /^([^%]*)%(.)(.*)/) {
- $result .= $1;
- $code = $2;
- $string = $3;
- if ($code eq 'd') {
- $result .= sprintf("%d",shift(@tmp));
- }
- elsif ($code eq '.') {
- $tmp = shift(@tmp);
- if ($tmp == 0 || $tmp == 4 || $tmp == 10) {
- if ($online) {
- ++$tmp, $after .= $TC{'up'} if $TC{'up'};
- }
- else {
- ++$tmp, $after .= $TC{'bc'};
- }
- }
- $result .= sprintf("%c",$tmp);
- $online = !$online;
- }
- elsif ($code eq '+') {
- $result .= sprintf("%c",shift(@tmp)+ord($string));
- $string = substr($string,1,99);
- $online = !$online;
- }
- elsif ($code eq 'r') {
- ($code,$tmp) = @tmp;
- @tmp = ($tmp,$code);
- $online = !$online;
- }
- elsif ($code eq '>') {
- ($code,$tmp,$string) = unpack("CCa99",$string);
- if ($tmp[0] > $code) {
- $tmp[0] += $tmp;
- }
- }
- elsif ($code eq '2') {
- $result .= sprintf("%02d",shift(@tmp));
- $online = !$online;
- }
- elsif ($code eq '3') {
- $result .= sprintf("%03d",shift(@tmp));
- $online = !$online;
- }
- elsif ($code eq 'i') {
- ($code,$tmp) = @tmp;
- @tmp = ($code+1,$tmp+1);
- }
- else {
- return "OOPS";
- }
- }
- $result . $string . $after;
-}
-
-1;
Deleted: vendor/perl/dist/lib/timelocal.pl
===================================================================
--- vendor/perl/dist/lib/timelocal.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/timelocal.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,23 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-;# timelocal.pl
-;#
-;# Usage:
-;# $time = timelocal($sec,$min,$hours,$mday,$mon,$year);
-;# $time = timegm($sec,$min,$hours,$mday,$mon,$year);
-
-;# This file has been superseded by the Time::Local library module.
-;# It is implemented as a call to that module for backwards compatibility
-;# with code written for perl4; new code should use Time::Local directly.
-;# This legacy library is deprecated and will be removed in a future
-;# release of perl.
-
-;# The current implementation shares with the original the questionable
-;# behavior of defining the timelocal() and timegm() functions in the
-;# namespace of whatever package was current when the first instance of
-;# C<require 'timelocal.pl';> was executed in a program.
-
-use Time::Local;
-
-*timelocal::cheat = \&Time::Local::cheat;
-
Deleted: vendor/perl/dist/lib/unicore/mktables.lst
===================================================================
--- vendor/perl/dist/lib/unicore/mktables.lst 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/unicore/mktables.lst 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,563 +0,0 @@
-#
-# mktables.lst -- File list for mktables.
-#
-# Autogenerated on Mon Jan 26 17:57:26 2009
-#
-# - First section is input files
-# (mktables itself is automatically included)
-# - Section seperator is /^=+$/
-# - Second section is a list of output files.
-# - Lines matching /^\s*#/ are treated as comments
-# which along with blank lines are ignored.
-#
-
-# Input files:
-
-ArabicShaping.txt
-BidiMirroring.txt
-Blocks.txt
-CaseFolding.txt
-CompositionExclusions.txt
-EastAsianWidth.txt
-HangulSyllableType.txt
-Index.txt
-Jamo.txt
-LineBreak.txt
-NameAliases.txt
-NamedSequences.txt
-NamedSqProv.txt
-NamesList.txt
-NormalizationCorrections.txt
-PropList.txt
-PropValueAliases.txt
-PropertyAliases.txt
-ReadMe.txt
-Scripts.txt
-SpecialCasing.txt
-StandardizedVariants.txt
-UnicodeData.txt
-version
-
-=================================
-
-# Output files:
-
-Properties
-Canonical.pl
-CombiningClass.pl
-Decomposition.pl
-Exact.pl
-Name.pl
-PVA.pl
-To/Digit.pl
-To/Fold.pl
-To/Lower.pl
-To/Title.pl
-To/Upper.pl
-lib/bc/AL.pl
-lib/bc/AN.pl
-lib/bc/B.pl
-lib/bc/BN.pl
-lib/bc/CS.pl
-lib/bc/EN.pl
-lib/bc/ES.pl
-lib/bc/ET.pl
-lib/bc/L.pl
-lib/bc/LRE.pl
-lib/bc/LRO.pl
-lib/bc/NSM.pl
-lib/bc/ON.pl
-lib/bc/PDF.pl
-lib/bc/R.pl
-lib/bc/RLE.pl
-lib/bc/RLO.pl
-lib/bc/S.pl
-lib/bc/WS.pl
-lib/ccc/A.pl
-lib/ccc/AL.pl
-lib/ccc/AR.pl
-lib/ccc/ATAR.pl
-lib/ccc/ATB.pl
-lib/ccc/ATBL.pl
-lib/ccc/B.pl
-lib/ccc/BL.pl
-lib/ccc/BR.pl
-lib/ccc/DA.pl
-lib/ccc/DB.pl
-lib/ccc/IS.pl
-lib/ccc/KV.pl
-lib/ccc/L.pl
-lib/ccc/NK.pl
-lib/ccc/NR.pl
-lib/ccc/OV.pl
-lib/ccc/R.pl
-lib/ccc/VR.pl
-lib/dt/Can.pl
-lib/dt/Com.pl
-lib/dt/Enc.pl
-lib/dt/Fin.pl
-lib/dt/Font.pl
-lib/dt/Fra.pl
-lib/dt/Init.pl
-lib/dt/Iso.pl
-lib/dt/Med.pl
-lib/dt/Nar.pl
-lib/dt/Nb.pl
-lib/dt/Sml.pl
-lib/dt/Sqr.pl
-lib/dt/Sub.pl
-lib/dt/Sup.pl
-lib/dt/Vert.pl
-lib/dt/Wide.pl
-lib/ea/A.pl
-lib/ea/F.pl
-lib/ea/H.pl
-lib/ea/N.pl
-lib/ea/Na.pl
-lib/ea/W.pl
-lib/gc_sc/AHex.pl
-lib/gc_sc/ASCII.pl
-lib/gc_sc/Alnum.pl
-lib/gc_sc/Alpha.pl
-lib/gc_sc/Alphabet.pl
-lib/gc_sc/Any.pl
-lib/gc_sc/Arab.pl
-lib/gc_sc/Armn.pl
-lib/gc_sc/AsciiHex.pl
-lib/gc_sc/Assigned.pl
-lib/gc_sc/Bali.pl
-lib/gc_sc/Beng.pl
-lib/gc_sc/BidiC.pl
-lib/gc_sc/BidiCont.pl
-lib/gc_sc/Blank.pl
-lib/gc_sc/Bopo.pl
-lib/gc_sc/Brai.pl
-lib/gc_sc/Bugi.pl
-lib/gc_sc/Buhd.pl
-lib/gc_sc/C.pl
-lib/gc_sc/Canadian.pl
-lib/gc_sc/Cari.pl
-lib/gc_sc/Cc.pl
-lib/gc_sc/Cf.pl
-lib/gc_sc/Cham.pl
-lib/gc_sc/Cher.pl
-lib/gc_sc/Cn.pl
-lib/gc_sc/Cntrl.pl
-lib/gc_sc/Co.pl
-lib/gc_sc/Copt.pl
-lib/gc_sc/Cprt.pl
-lib/gc_sc/Cs.pl
-lib/gc_sc/Cyrl.pl
-lib/gc_sc/Dash.pl
-lib/gc_sc/Dash2.pl
-lib/gc_sc/DefaultI.pl
-lib/gc_sc/Dep.pl
-lib/gc_sc/Deprecat.pl
-lib/gc_sc/Deva.pl
-lib/gc_sc/Dia.pl
-lib/gc_sc/Diacriti.pl
-lib/gc_sc/Digit.pl
-lib/gc_sc/Dsrt.pl
-lib/gc_sc/Ethi.pl
-lib/gc_sc/Ext.pl
-lib/gc_sc/Extender.pl
-lib/gc_sc/Geor.pl
-lib/gc_sc/Glag.pl
-lib/gc_sc/Goth.pl
-lib/gc_sc/Graph.pl
-lib/gc_sc/Grek.pl
-lib/gc_sc/Gujr.pl
-lib/gc_sc/Guru.pl
-lib/gc_sc/Hang.pl
-lib/gc_sc/Hani.pl
-lib/gc_sc/Hano.pl
-lib/gc_sc/Hebr.pl
-lib/gc_sc/Hex.pl
-lib/gc_sc/HexDigit.pl
-lib/gc_sc/Hira.pl
-lib/gc_sc/HorizSpa.pl
-lib/gc_sc/Hyphen.pl
-lib/gc_sc/Hyphen2.pl
-lib/gc_sc/IDSB.pl
-lib/gc_sc/IDST.pl
-lib/gc_sc/IdContin.pl
-lib/gc_sc/IdStart.pl
-lib/gc_sc/Ideo.pl
-lib/gc_sc/Ideograp.pl
-lib/gc_sc/IdsBinar.pl
-lib/gc_sc/IdsTrina.pl
-lib/gc_sc/InAegean.pl
-lib/gc_sc/InAlphab.pl
-lib/gc_sc/InAncie2.pl
-lib/gc_sc/InAncie3.pl
-lib/gc_sc/InAncien.pl
-lib/gc_sc/InArabi2.pl
-lib/gc_sc/InArabi3.pl
-lib/gc_sc/InArabi4.pl
-lib/gc_sc/InArabic.pl
-lib/gc_sc/InArmeni.pl
-lib/gc_sc/InArrows.pl
-lib/gc_sc/InBaline.pl
-lib/gc_sc/InBasicL.pl
-lib/gc_sc/InBengal.pl
-lib/gc_sc/InBlockE.pl
-lib/gc_sc/InBopom2.pl
-lib/gc_sc/InBopomo.pl
-lib/gc_sc/InBoxDra.pl
-lib/gc_sc/InBraill.pl
-lib/gc_sc/InBugine.pl
-lib/gc_sc/InBuhid.pl
-lib/gc_sc/InByzant.pl
-lib/gc_sc/InCarian.pl
-lib/gc_sc/InCham.pl
-lib/gc_sc/InCherok.pl
-lib/gc_sc/InCjkCo2.pl
-lib/gc_sc/InCjkCo3.pl
-lib/gc_sc/InCjkCo4.pl
-lib/gc_sc/InCjkCom.pl
-lib/gc_sc/InCjkRad.pl
-lib/gc_sc/InCjkStr.pl
-lib/gc_sc/InCjkSym.pl
-lib/gc_sc/InCjkUn2.pl
-lib/gc_sc/InCjkUn3.pl
-lib/gc_sc/InCjkUni.pl
-lib/gc_sc/InCombi2.pl
-lib/gc_sc/InCombi3.pl
-lib/gc_sc/InCombi4.pl
-lib/gc_sc/InCombin.pl
-lib/gc_sc/InContro.pl
-lib/gc_sc/InCoptic.pl
-lib/gc_sc/InCounti.pl
-lib/gc_sc/InCunei2.pl
-lib/gc_sc/InCuneif.pl
-lib/gc_sc/InCurren.pl
-lib/gc_sc/InCyprio.pl
-lib/gc_sc/InCyril2.pl
-lib/gc_sc/InCyril3.pl
-lib/gc_sc/InCyril4.pl
-lib/gc_sc/InCyrill.pl
-lib/gc_sc/InDesere.pl
-lib/gc_sc/InDevana.pl
-lib/gc_sc/InDingba.pl
-lib/gc_sc/InDomino.pl
-lib/gc_sc/InEnclo2.pl
-lib/gc_sc/InEnclos.pl
-lib/gc_sc/InEthio2.pl
-lib/gc_sc/InEthio3.pl
-lib/gc_sc/InEthiop.pl
-lib/gc_sc/InGenera.pl
-lib/gc_sc/InGeomet.pl
-lib/gc_sc/InGeorg2.pl
-lib/gc_sc/InGeorgi.pl
-lib/gc_sc/InGlagol.pl
-lib/gc_sc/InGothic.pl
-lib/gc_sc/InGreekA.pl
-lib/gc_sc/InGreekE.pl
-lib/gc_sc/InGujara.pl
-lib/gc_sc/InGurmuk.pl
-lib/gc_sc/InHalfwi.pl
-lib/gc_sc/InHangu2.pl
-lib/gc_sc/InHangu3.pl
-lib/gc_sc/InHangul.pl
-lib/gc_sc/InHanuno.pl
-lib/gc_sc/InHebrew.pl
-lib/gc_sc/InHighPr.pl
-lib/gc_sc/InHighSu.pl
-lib/gc_sc/InHiraga.pl
-lib/gc_sc/InIdeogr.pl
-lib/gc_sc/InIpaExt.pl
-lib/gc_sc/InKanbun.pl
-lib/gc_sc/InKangxi.pl
-lib/gc_sc/InKannad.pl
-lib/gc_sc/InKatak2.pl
-lib/gc_sc/InKataka.pl
-lib/gc_sc/InKayahL.pl
-lib/gc_sc/InKharos.pl
-lib/gc_sc/InKhmer.pl
-lib/gc_sc/InKhmerS.pl
-lib/gc_sc/InLao.pl
-lib/gc_sc/InLatin1.pl
-lib/gc_sc/InLatin2.pl
-lib/gc_sc/InLatin3.pl
-lib/gc_sc/InLatin4.pl
-lib/gc_sc/InLatin5.pl
-lib/gc_sc/InLatinE.pl
-lib/gc_sc/InLepcha.pl
-lib/gc_sc/InLetter.pl
-lib/gc_sc/InLimbu.pl
-lib/gc_sc/InLinea2.pl
-lib/gc_sc/InLinear.pl
-lib/gc_sc/InLowSur.pl
-lib/gc_sc/InLycian.pl
-lib/gc_sc/InLydian.pl
-lib/gc_sc/InMahjon.pl
-lib/gc_sc/InMalaya.pl
-lib/gc_sc/InMathe2.pl
-lib/gc_sc/InMathem.pl
-lib/gc_sc/InMisce2.pl
-lib/gc_sc/InMisce3.pl
-lib/gc_sc/InMisce4.pl
-lib/gc_sc/InMisce5.pl
-lib/gc_sc/InMiscel.pl
-lib/gc_sc/InModifi.pl
-lib/gc_sc/InMongol.pl
-lib/gc_sc/InMusica.pl
-lib/gc_sc/InMyanma.pl
-lib/gc_sc/InNewTai.pl
-lib/gc_sc/InNko.pl
-lib/gc_sc/InNumber.pl
-lib/gc_sc/InOgham.pl
-lib/gc_sc/InOlChik.pl
-lib/gc_sc/InOldIta.pl
-lib/gc_sc/InOldPer.pl
-lib/gc_sc/InOptica.pl
-lib/gc_sc/InOriya.pl
-lib/gc_sc/InOsmany.pl
-lib/gc_sc/InPhagsP.pl
-lib/gc_sc/InPhaist.pl
-lib/gc_sc/InPhoeni.pl
-lib/gc_sc/InPhone2.pl
-lib/gc_sc/InPhonet.pl
-lib/gc_sc/InPrivat.pl
-lib/gc_sc/InRejang.pl
-lib/gc_sc/InRunic.pl
-lib/gc_sc/InSauras.pl
-lib/gc_sc/InShavia.pl
-lib/gc_sc/InSinhal.pl
-lib/gc_sc/InSmallF.pl
-lib/gc_sc/InSpacin.pl
-lib/gc_sc/InSpecia.pl
-lib/gc_sc/InSundan.pl
-lib/gc_sc/InSupers.pl
-lib/gc_sc/InSuppl2.pl
-lib/gc_sc/InSuppl3.pl
-lib/gc_sc/InSuppl4.pl
-lib/gc_sc/InSuppl5.pl
-lib/gc_sc/InSuppl6.pl
-lib/gc_sc/InSupple.pl
-lib/gc_sc/InSyloti.pl
-lib/gc_sc/InSyriac.pl
-lib/gc_sc/InTagalo.pl
-lib/gc_sc/InTagban.pl
-lib/gc_sc/InTags.pl
-lib/gc_sc/InTaiLe.pl
-lib/gc_sc/InTaiXua.pl
-lib/gc_sc/InTamil.pl
-lib/gc_sc/InTelugu.pl
-lib/gc_sc/InThaana.pl
-lib/gc_sc/InThai.pl
-lib/gc_sc/InTibeta.pl
-lib/gc_sc/InTifina.pl
-lib/gc_sc/InUgarit.pl
-lib/gc_sc/InUnifie.pl
-lib/gc_sc/InVai.pl
-lib/gc_sc/InVaria2.pl
-lib/gc_sc/InVariat.pl
-lib/gc_sc/InVertic.pl
-lib/gc_sc/InYiRadi.pl
-lib/gc_sc/InYiSyll.pl
-lib/gc_sc/InYijing.pl
-lib/gc_sc/JoinC.pl
-lib/gc_sc/JoinCont.pl
-lib/gc_sc/Kana.pl
-lib/gc_sc/KayahLi.pl
-lib/gc_sc/Khar.pl
-lib/gc_sc/Khmr.pl
-lib/gc_sc/Knda.pl
-lib/gc_sc/L.pl
-lib/gc_sc/LC.pl
-lib/gc_sc/LOE.pl
-lib/gc_sc/Laoo.pl
-lib/gc_sc/Latn.pl
-lib/gc_sc/Lepc.pl
-lib/gc_sc/Limb.pl
-lib/gc_sc/LinearB.pl
-lib/gc_sc/Ll.pl
-lib/gc_sc/Lm.pl
-lib/gc_sc/Lo.pl
-lib/gc_sc/LogicalO.pl
-lib/gc_sc/Lower.pl
-lib/gc_sc/Lowercas.pl
-lib/gc_sc/Lt.pl
-lib/gc_sc/Lu.pl
-lib/gc_sc/Lyci.pl
-lib/gc_sc/Lydi.pl
-lib/gc_sc/M.pl
-lib/gc_sc/Math.pl
-lib/gc_sc/Mc.pl
-lib/gc_sc/Me.pl
-lib/gc_sc/Mlym.pl
-lib/gc_sc/Mn.pl
-lib/gc_sc/Mong.pl
-lib/gc_sc/Mymr.pl
-lib/gc_sc/N.pl
-lib/gc_sc/NChar.pl
-lib/gc_sc/Nd.pl
-lib/gc_sc/NewTaiLu.pl
-lib/gc_sc/Nkoo.pl
-lib/gc_sc/Nl.pl
-lib/gc_sc/No.pl
-lib/gc_sc/Nonchara.pl
-lib/gc_sc/OAlpha.pl
-lib/gc_sc/ODI.pl
-lib/gc_sc/OGrExt.pl
-lib/gc_sc/OIDC.pl
-lib/gc_sc/OIDS.pl
-lib/gc_sc/OLower.pl
-lib/gc_sc/OMath.pl
-lib/gc_sc/OUpper.pl
-lib/gc_sc/Ogam.pl
-lib/gc_sc/OlChiki.pl
-lib/gc_sc/OldItali.pl
-lib/gc_sc/OldPersi.pl
-lib/gc_sc/Orya.pl
-lib/gc_sc/Osma.pl
-lib/gc_sc/OtherAlp.pl
-lib/gc_sc/OtherDef.pl
-lib/gc_sc/OtherGra.pl
-lib/gc_sc/OtherIdC.pl
-lib/gc_sc/OtherIdS.pl
-lib/gc_sc/OtherLow.pl
-lib/gc_sc/OtherMat.pl
-lib/gc_sc/OtherUpp.pl
-lib/gc_sc/P.pl
-lib/gc_sc/PatSyn.pl
-lib/gc_sc/PatWS.pl
-lib/gc_sc/PatternS.pl
-lib/gc_sc/PatternW.pl
-lib/gc_sc/Pc.pl
-lib/gc_sc/Pd.pl
-lib/gc_sc/Pe.pl
-lib/gc_sc/PerlSpac.pl
-lib/gc_sc/PerlWord.pl
-lib/gc_sc/Pf.pl
-lib/gc_sc/PhagsPa.pl
-lib/gc_sc/Phnx.pl
-lib/gc_sc/Pi.pl
-lib/gc_sc/Po.pl
-lib/gc_sc/PosixAln.pl
-lib/gc_sc/PosixAlp.pl
-lib/gc_sc/PosixBla.pl
-lib/gc_sc/PosixCnt.pl
-lib/gc_sc/PosixDig.pl
-lib/gc_sc/PosixGra.pl
-lib/gc_sc/PosixLow.pl
-lib/gc_sc/PosixPri.pl
-lib/gc_sc/PosixPun.pl
-lib/gc_sc/PosixSpa.pl
-lib/gc_sc/PosixUpp.pl
-lib/gc_sc/Print.pl
-lib/gc_sc/Ps.pl
-lib/gc_sc/Punct.pl
-lib/gc_sc/QMark.pl
-lib/gc_sc/Qaai.pl
-lib/gc_sc/Quotatio.pl
-lib/gc_sc/Radical.pl
-lib/gc_sc/Radical2.pl
-lib/gc_sc/Rjng.pl
-lib/gc_sc/Runr.pl
-lib/gc_sc/S.pl
-lib/gc_sc/SD.pl
-lib/gc_sc/STerm.pl
-lib/gc_sc/Saur.pl
-lib/gc_sc/Sc.pl
-lib/gc_sc/Shaw.pl
-lib/gc_sc/Sinh.pl
-lib/gc_sc/Sk.pl
-lib/gc_sc/Sm.pl
-lib/gc_sc/So.pl
-lib/gc_sc/SoftDott.pl
-lib/gc_sc/Space.pl
-lib/gc_sc/SpacePer.pl
-lib/gc_sc/Sterm2.pl
-lib/gc_sc/Sund.pl
-lib/gc_sc/SylotiNa.pl
-lib/gc_sc/Syrc.pl
-lib/gc_sc/Tagb.pl
-lib/gc_sc/TaiLe.pl
-lib/gc_sc/Taml.pl
-lib/gc_sc/Telu.pl
-lib/gc_sc/Term.pl
-lib/gc_sc/Terminal.pl
-lib/gc_sc/Tfng.pl
-lib/gc_sc/Tglg.pl
-lib/gc_sc/Thaa.pl
-lib/gc_sc/Thai.pl
-lib/gc_sc/Tibt.pl
-lib/gc_sc/Title.pl
-lib/gc_sc/UIdeo.pl
-lib/gc_sc/Ugar.pl
-lib/gc_sc/UnifiedI.pl
-lib/gc_sc/Upper.pl
-lib/gc_sc/Uppercas.pl
-lib/gc_sc/VS.pl
-lib/gc_sc/Vaii.pl
-lib/gc_sc/Variatio.pl
-lib/gc_sc/VertSpac.pl
-lib/gc_sc/WSpace.pl
-lib/gc_sc/WhiteSpa.pl
-lib/gc_sc/Word.pl
-lib/gc_sc/XDigit.pl
-lib/gc_sc/Xsux.pl
-lib/gc_sc/Yiii.pl
-lib/gc_sc/Z.pl
-lib/gc_sc/Zl.pl
-lib/gc_sc/Zp.pl
-lib/gc_sc/Zs.pl
-lib/gc_sc/Zyyy.pl
-lib/gc_sc/_CanonDC.pl
-lib/gc_sc/_CaseIgn.pl
-lib/gc_sc/_CombAbo.pl
-lib/hst/L.pl
-lib/hst/LV.pl
-lib/hst/LVT.pl
-lib/hst/T.pl
-lib/hst/V.pl
-lib/jt/C.pl
-lib/jt/D.pl
-lib/jt/R.pl
-lib/jt/U.pl
-lib/lb/AI.pl
-lib/lb/AL.pl
-lib/lb/B2.pl
-lib/lb/BA.pl
-lib/lb/BB.pl
-lib/lb/BK.pl
-lib/lb/CB.pl
-lib/lb/CL.pl
-lib/lb/CM.pl
-lib/lb/CR.pl
-lib/lb/EX.pl
-lib/lb/GL.pl
-lib/lb/H2.pl
-lib/lb/H3.pl
-lib/lb/HY.pl
-lib/lb/ID.pl
-lib/lb/IN.pl
-lib/lb/IS.pl
-lib/lb/JL.pl
-lib/lb/JT.pl
-lib/lb/JV.pl
-lib/lb/LF.pl
-lib/lb/NL.pl
-lib/lb/NS.pl
-lib/lb/NU.pl
-lib/lb/OP.pl
-lib/lb/PO.pl
-lib/lb/PR.pl
-lib/lb/QU.pl
-lib/lb/SA.pl
-lib/lb/SG.pl
-lib/lb/SP.pl
-lib/lb/SY.pl
-lib/lb/WJ.pl
-lib/lb/XX.pl
-lib/lb/ZW.pl
-lib/nt/De.pl
-lib/nt/Di.pl
-lib/nt/Nu.pl
-
-# 24 input files
-# 514 output files
-
-# End list
Deleted: vendor/perl/dist/lib/validate.pl
===================================================================
--- vendor/perl/dist/lib/validate.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/validate.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,104 +0,0 @@
-warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
-
-;# The validate routine takes a single multiline string consisting of
-;# lines containing a filename plus a file test to try on it. (The
-;# file test may also be a 'cd', causing subsequent relative filenames
-;# to be interpreted relative to that directory.) After the file test
-;# you may put '|| die' to make it a fatal error if the file test fails.
-;# The default is '|| warn'. The file test may optionally have a ! prepended
-;# to test for the opposite condition. If you do a cd and then list some
-;# relative filenames, you may want to indent them slightly for readability.
-;# If you supply your own "die" or "warn" message, you can use $file to
-;# interpolate the filename.
-
-;# Filetests may be bunched: -rwx tests for all of -r, -w and -x.
-;# Only the first failed test of the bunch will produce a warning.
-
-;# The routine returns the number of warnings issued.
-
-;# Usage:
-;# require "validate.pl";
-;# $warnings += do validate('
-;# /vmunix -e || die
-;# /boot -e || die
-;# /bin cd
-;# csh -ex
-;# csh !-ug
-;# sh -ex
-;# sh !-ug
-;# /usr -d || warn "What happened to $file?\n"
-;# ');
-
-sub validate {
- local($file,$test,$warnings,$oldwarnings);
- foreach $check (split(/\n/,$_[0])) {
- next if $check =~ /^#/;
- next if $check =~ /^$/;
- ($file,$test) = split(' ',$check,2);
- if ($test =~ s/^(!?-)(\w{2,}\b)/$1Z/) {
- $testlist = $2;
- @testlist = split(//,$testlist);
- }
- else {
- @testlist = ('Z');
- }
- $oldwarnings = $warnings;
- foreach $one (@testlist) {
- $this = $test;
- $this =~ s/(-\w\b)/$1 \$file/g;
- $this =~ s/-Z/-$one/;
- $this .= ' || warn' unless $this =~ /\|\|/;
- $this =~ s/^(.*\S)\s*\|\|\s*(die|warn)$/$1 || do valmess('$2','$1')/;
- $this =~ s/\bcd\b/chdir (\$cwd = \$file)/g;
- eval $this;
- last if $warnings > $oldwarnings;
- }
- }
- $warnings;
-}
-
-sub valmess {
- local($disposition,$this) = @_;
- $file = $cwd . '/' . $file unless $file =~ m|^/|;
- if ($this =~ /^(!?)-(\w)\s+\$file\s*$/) {
- $neg = $1;
- $tmp = $2;
- $tmp eq 'r' && ($mess = "$file is not readable by uid $>.");
- $tmp eq 'w' && ($mess = "$file is not writable by uid $>.");
- $tmp eq 'x' && ($mess = "$file is not executable by uid $>.");
- $tmp eq 'o' && ($mess = "$file is not owned by uid $>.");
- $tmp eq 'R' && ($mess = "$file is not readable by you.");
- $tmp eq 'W' && ($mess = "$file is not writable by you.");
- $tmp eq 'X' && ($mess = "$file is not executable by you.");
- $tmp eq 'O' && ($mess = "$file is not owned by you.");
- $tmp eq 'e' && ($mess = "$file does not exist.");
- $tmp eq 'z' && ($mess = "$file does not have zero size.");
- $tmp eq 's' && ($mess = "$file does not have non-zero size.");
- $tmp eq 'f' && ($mess = "$file is not a plain file.");
- $tmp eq 'd' && ($mess = "$file is not a directory.");
- $tmp eq 'l' && ($mess = "$file is not a symbolic link.");
- $tmp eq 'p' && ($mess = "$file is not a named pipe (FIFO).");
- $tmp eq 'S' && ($mess = "$file is not a socket.");
- $tmp eq 'b' && ($mess = "$file is not a block special file.");
- $tmp eq 'c' && ($mess = "$file is not a character special file.");
- $tmp eq 'u' && ($mess = "$file does not have the setuid bit set.");
- $tmp eq 'g' && ($mess = "$file does not have the setgid bit set.");
- $tmp eq 'k' && ($mess = "$file does not have the sticky bit set.");
- $tmp eq 'T' && ($mess = "$file is not a text file.");
- $tmp eq 'B' && ($mess = "$file is not a binary file.");
- if ($neg eq '!') {
- $mess =~ s/ is not / should not be / ||
- $mess =~ s/ does not / should not / ||
- $mess =~ s/ not / /;
- }
- print STDERR $mess,"\n";
- }
- else {
- $this =~ s/\$file/'$file'/g;
- print STDERR "Can't do $this.\n";
- }
- if ($disposition eq 'die') { exit 1; }
- ++$warnings;
-}
-
-1;
Deleted: vendor/perl/dist/lib/version.t
===================================================================
--- vendor/perl/dist/lib/version.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/lib/version.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,894 +0,0 @@
-#! /usr/local/perl -w
-
-use Test::More qw(no_plan);
-use Data::Dumper;
-require Test::Harness;
-no warnings 'once';
-*Verbose = \$Test::Harness::Verbose;
-use POSIX qw/locale_h/;
-use File::Temp qw/tempfile/;
-use File::Basename;
-
-BEGIN {
- use_ok("version", 0.77);
- # If we made it this far, we are ok.
-}
-
-my $Verbose;
-
-diag "Tests with base class" unless $ENV{PERL_CORE};
-
-BaseTests("version","new","qv");
-BaseTests("version","new","declare");
-BaseTests("version","parse", "qv");
-BaseTests("version","parse", "declare");
-
-# dummy up a redundant call to satisfy David Wheeler
-local $SIG{__WARN__} = sub { die $_[0] };
-eval 'use version;';
-unlike ($@, qr/^Subroutine main::declare redefined/,
- "Only export declare once per package (to prevent redefined warnings).");
-
-package version::Bad;
-use base 'version';
-sub new { my($self,$n)=@_; bless \$n, $self }
-
-package main;
-
-my $warning;
-local $SIG{__WARN__} = sub { $warning = $_[0] };
-my ($fh, $filename) = tempfile('tXXXXXXX', SUFFIX => '.pm', UNLINK => 1);
-(my $package = basename($filename)) =~ s/\.pm$//;
-print $fh <<"EOF";
-# This is an empty subclass
-package $package;
-use base 'version';
-use vars '\$VERSION';
-\$VERSION=0.001;
-EOF
-close $fh;
-
-sub main_reset {
- delete $main::INC{'$package'};
- undef &qv; undef *::qv; # avoid 'used once' warning
- undef &declare; undef *::declare; # avoid 'used once' warning
-}
-
-diag "Tests with empty derived class" unless $ENV{PERL_CORE};
-
-use_ok($package, 0.001);
-my $testobj = $package->new(1.002_003);
-isa_ok( $testobj, $package );
-ok( $testobj->numify == 1.002003, "Numified correctly" );
-ok( $testobj->stringify eq "1.002003", "Stringified correctly" );
-ok( $testobj->normal eq "v1.2.3", "Normalified correctly" );
-
-my $verobj = version::->new("1.2.4");
-ok( $verobj > $testobj, "Comparison vs parent class" );
-
-BaseTests($package, "new", "qv");
-main_reset;
-use_ok($package, 0.001, "declare");
-BaseTests($package, "new", "declare");
-main_reset;
-use_ok($package, 0.001);
-BaseTests($package, "parse", "qv");
-main_reset;
-use_ok($package, 0.001, "declare");
-BaseTests($package, "parse", "declare");
-
-diag "tests with bad subclass" unless $ENV{PERL_CORE};
-$testobj = version::Bad->new(1.002_003);
-isa_ok( $testobj, "version::Bad" );
-eval { my $string = $testobj->numify };
-like($@, qr/Invalid version object/,
- "Bad subclass numify");
-eval { my $string = $testobj->normal };
-like($@, qr/Invalid version object/,
- "Bad subclass normal");
-eval { my $string = $testobj->stringify };
-like($@, qr/Invalid version object/,
- "Bad subclass stringify");
-eval { my $test = ($testobj > 1.0) };
-like($@, qr/Invalid version object/,
- "Bad subclass vcmp");
-
-# Invalid structure
-eval { $a = \\version->new(1); bless $a, "version"; print "# $a\n" };
-like($@, qr/Invalid version object/,
- "Bad internal structure (RT#78286)");
-
-# do strict lax tests in a sub to isolate a package to test importing
-strict_lax_tests();
-
-sub strict_lax_tests {
- package temp12345;
- # copied from perl core test t/op/packagev.t
- # format: STRING STRICT_OK LAX_OK
- my $strict_lax_data = << 'CASE_DATA';
-1.00 pass pass
-1.00001 pass pass
-0.123 pass pass
-12.345 pass pass
-42 pass pass
-0 pass pass
-0.0 pass pass
-v1.2.3 pass pass
-v1.2.3.4 pass pass
-v0.1.2 pass pass
-v0.0.0 pass pass
-01 fail pass
-01.0203 fail pass
-v01 fail pass
-v01.02.03 fail pass
-.1 fail pass
-.1.2 fail pass
-1. fail pass
-1.a fail fail
-1._ fail fail
-1.02_03 fail pass
-v1.2_3 fail pass
-v1.02_03 fail pass
-v1.2_3_4 fail fail
-v1.2_3.4 fail fail
-1.2_3.4 fail fail
-0_ fail fail
-1_ fail fail
-1_. fail fail
-1.1_ fail fail
-1.02_03_04 fail fail
-1.2.3 fail pass
-v1.2 fail pass
-v0 fail pass
-v1 fail pass
-v.1.2.3 fail fail
-v fail fail
-v1.2345.6 fail pass
-undef fail pass
-1a fail fail
-1.2a3 fail fail
-bar fail fail
-_ fail fail
-CASE_DATA
-
- require version;
- version->import( qw/is_strict is_lax/ );
- for my $case ( split qr/\n/, $strict_lax_data ) {
- my ($v, $strict, $lax) = split qr/\t+/, $case;
- main::ok( $strict eq 'pass' ? is_strict($v) : ! is_strict($v), "is_strict($v) [$strict]" );
- main::ok( $strict eq 'pass' ? version::is_strict($v) : ! version::is_strict($v), "version::is_strict($v) [$strict]" );
- main::ok( $lax eq 'pass' ? is_lax($v) : ! is_lax($v), "is_lax($v) [$lax]" );
- main::ok( $lax eq 'pass' ? version::is_lax($v) : ! version::is_lax($v), "version::is_lax($v) [$lax]" );
- }
-}
-
-sub BaseTests {
-
- my ($CLASS, $method, $qv_declare) = @_;
- my $warning;
- local $SIG{__WARN__} = sub { $warning = $_[0] };
-
- # Insert your test code below, the Test module is use()ed here so read
- # its man page ( perldoc Test ) for help writing this test script.
-
- # Test bare number processing
- diag "tests with bare numbers" unless $ENV{PERL_CORE};
- $version = $CLASS->$method(5.005_03);
- is ( "$version" , "5.00503" , '5.005_03 eq 5.00503' );
- $version = $CLASS->$method(1.23);
- is ( "$version" , "1.23" , '1.23 eq "1.23"' );
-
- # Test quoted number processing
- diag "tests with quoted numbers" unless $ENV{PERL_CORE};
- $version = $CLASS->$method("5.005_03");
- is ( "$version" , "5.005_03" , '"5.005_03" eq "5.005_03"' );
- $version = $CLASS->$method("v1.23");
- is ( "$version" , "v1.23" , '"v1.23" eq "v1.23"' );
-
- # Test stringify operator
- diag "tests with stringify" unless $ENV{PERL_CORE};
- $version = $CLASS->$method("5.005");
- is ( "$version" , "5.005" , '5.005 eq "5.005"' );
- $version = $CLASS->$method("5.006.001");
- is ( "$version" , "5.006.001" , '5.006.001 eq v5.6.1' );
- unlike ($warning, qr/v-string without leading 'v' deprecated/, 'No leading v');
- $version = $CLASS->$method("v1.2.3_4");
- is ( "$version" , "v1.2.3_4" , 'alpha version 1.2.3_4 eq v1.2.3_4' );
-
- # test illegal formats
- diag "test illegal formats" unless $ENV{PERL_CORE};
- eval {my $version = $CLASS->$method("1.2_3_4")};
- like($@, qr/multiple underscores/,
- "Invalid version format (multiple underscores)");
-
- eval {my $version = $CLASS->$method("1.2_3.4")};
- like($@, qr/underscores before decimal/,
- "Invalid version format (underscores before decimal)");
-
- eval {my $version = $CLASS->$method("1_2")};
- like($@, qr/alpha without decimal/,
- "Invalid version format (alpha without decimal)");
-
- eval { $version = $CLASS->$method("1.2b3")};
- like($@, qr/non-numeric data/,
- "Invalid version format (non-numeric data)");
-
- # from here on out capture the warning and test independently
- {
- eval{$version = $CLASS->$method("99 and 44/100 pure")};
-
- like($@, qr/non-numeric data/,
- "Invalid version format (non-numeric data)");
-
- eval{$version = $CLASS->$method("something")};
- like($@, qr/non-numeric data/,
- "Invalid version format (non-numeric data)");
-
- # reset the test object to something reasonable
- $version = $CLASS->$method("1.2.3");
-
- # Test boolean operator
- ok ($version, 'boolean');
-
- # Test class membership
- isa_ok ( $version, $CLASS );
-
- # Test comparison operators with self
- diag "tests with self" unless $ENV{PERL_CORE};
- is ( $version <=> $version, 0, '$version <=> $version == 0' );
- ok ( $version == $version, '$version == $version' );
-
- # Test Numeric Comparison operators
- # test first with non-object
- $version = $CLASS->$method("5.006.001");
- $new_version = "5.8.0";
- diag "numeric tests with non-objects" unless $ENV{PERL_CORE};
- ok ( $version == $version, '$version == $version' );
- ok ( $version < $new_version, '$version < $new_version' );
- ok ( $new_version > $version, '$new_version > $version' );
- ok ( $version != $new_version, '$version != $new_version' );
-
- # now test with existing object
- $new_version = $CLASS->$method($new_version);
- diag "numeric tests with objects" unless $ENV{PERL_CORE};
- ok ( $version < $new_version, '$version < $new_version' );
- ok ( $new_version > $version, '$new_version > $version' );
- ok ( $version != $new_version, '$version != $new_version' );
-
- # now test with actual numbers
- diag "numeric tests with numbers" unless $ENV{PERL_CORE};
- ok ( $version->numify() == 5.006001, '$version->numify() == 5.006001' );
- ok ( $version->numify() <= 5.006001, '$version->numify() <= 5.006001' );
- ok ( $version->numify() < 5.008, '$version->numify() < 5.008' );
- #ok ( $version->numify() > v5.005_02, '$version->numify() > 5.005_02' );
-
- # test with long decimals
- diag "Tests with extended decimal versions" unless $ENV{PERL_CORE};
- $version = $CLASS->$method(1.002003);
- ok ( $version == "1.2.3", '$version == "1.2.3"');
- ok ( $version->numify == 1.002003, '$version->numify == 1.002003');
- $version = $CLASS->$method("2002.09.30.1");
- ok ( $version == "2002.9.30.1",'$version == 2002.9.30.1');
- ok ( $version->numify == 2002.009030001,
- '$version->numify == 2002.009030001');
-
- # now test with alpha version form with string
- $version = $CLASS->$method("1.2.3");
- $new_version = "1.2.3_4";
- diag "numeric tests with alpha-style non-objects" unless $ENV{PERL_CORE};
- ok ( $version < $new_version, '$version < $new_version' );
- ok ( $new_version > $version, '$new_version > $version' );
- ok ( $version != $new_version, '$version != $new_version' );
-
- $version = $CLASS->$method("1.2.4");
- diag "numeric tests with alpha-style non-objects"
- unless $ENV{PERL_CORE};
- ok ( $version > $new_version, '$version > $new_version' );
- ok ( $new_version < $version, '$new_version < $version' );
- ok ( $version != $new_version, '$version != $new_version' );
-
- # now test with alpha version form with object
- $version = $CLASS->$method("1.2.3");
- $new_version = $CLASS->$method("1.2.3_4");
- diag "tests with alpha-style objects" unless $ENV{PERL_CORE};
- ok ( $version < $new_version, '$version < $new_version' );
- ok ( $new_version > $version, '$new_version > $version' );
- ok ( $version != $new_version, '$version != $new_version' );
- ok ( !$version->is_alpha, '!$version->is_alpha');
- ok ( $new_version->is_alpha, '$new_version->is_alpha');
-
- $version = $CLASS->$method("1.2.4");
- diag "tests with alpha-style objects" unless $ENV{PERL_CORE};
- ok ( $version > $new_version, '$version > $new_version' );
- ok ( $new_version < $version, '$new_version < $version' );
- ok ( $version != $new_version, '$version != $new_version' );
-
- $version = $CLASS->$method("1.2.3.4");
- $new_version = $CLASS->$method("1.2.3_4");
- diag "tests with alpha-style objects with same subversion"
- unless $ENV{PERL_CORE};
- ok ( $version > $new_version, '$version > $new_version' );
- ok ( $new_version < $version, '$new_version < $version' );
- ok ( $version != $new_version, '$version != $new_version' );
-
- diag "test implicit [in]equality" unless $ENV{PERL_CORE};
- $version = $CLASS->$method("v1.2.3");
- $new_version = $CLASS->$method("1.2.3.0");
- ok ( $version == $new_version, '$version == $new_version' );
- $new_version = $CLASS->$method("1.2.3_0");
- ok ( $version == $new_version, '$version == $new_version' );
- $new_version = $CLASS->$method("1.2.3.1");
- ok ( $version < $new_version, '$version < $new_version' );
- $new_version = $CLASS->$method("1.2.3_1");
- ok ( $version < $new_version, '$version < $new_version' );
- $new_version = $CLASS->$method("1.1.999");
- ok ( $version > $new_version, '$version > $new_version' );
-
- # that which is not expressly permitted is forbidden
- diag "forbidden operations" unless $ENV{PERL_CORE};
- ok ( !eval { ++$version }, "noop ++" );
- ok ( !eval { --$version }, "noop --" );
- ok ( !eval { $version/1 }, "noop /" );
- ok ( !eval { $version*3 }, "noop *" );
- ok ( !eval { abs($version) }, "noop abs" );
-
-SKIP: {
- skip "version require'd instead of use'd, cannot test $qv_declare", 3
- unless defined $qv_declare;
- # test the $qv_declare() sub
- diag "testing $qv_declare" unless $ENV{PERL_CORE};
- $version = $CLASS->$qv_declare("1.2");
- is ( "$version", "v1.2", $qv_declare.'("1.2") == "1.2.0"' );
- $version = $CLASS->$qv_declare(1.2);
- is ( "$version", "v1.2", $qv_declare.'(1.2) == "1.2.0"' );
- isa_ok( $CLASS->$qv_declare('5.008'), $CLASS );
-}
-
- # test creation from existing version object
- diag "create new from existing version" unless $ENV{PERL_CORE};
- ok (eval {$new_version = $CLASS->$method($version)},
- "new from existing object");
- ok ($new_version == $version, "class->$method($version) identical");
- $new_version = $version->$method(0);
- isa_ok ($new_version, $CLASS );
- is ($new_version, "0", "version->$method() doesn't clone");
- $new_version = $version->$method("1.2.3");
- is ($new_version, "1.2.3" , '$version->$method("1.2.3") works too');
-
- # test the CVS revision mode
- diag "testing CVS Revision" unless $ENV{PERL_CORE};
- $version = new $CLASS qw$Revision: 1.1.1.3 $;
- ok ( $version == "1.2.0", 'qw$Revision: 1.1.1.3 $ == 1.2.0' );
- $version = new $CLASS qw$Revision: 1.1.1.3 $;
- ok ( $version == "1.2.3.4", 'qw$Revision: 1.1.1.3 $ == 1.2.3.4' );
-
- # test the CPAN style reduced significant digit form
- diag "testing CPAN-style versions" unless $ENV{PERL_CORE};
- $version = $CLASS->$method("1.23_01");
- is ( "$version" , "1.23_01", "CPAN-style alpha version" );
- ok ( $version > 1.23, "1.23_01 > 1.23");
- ok ( $version < 1.24, "1.23_01 < 1.24");
-
- # test reformed UNIVERSAL::VERSION
- diag "Replacement UNIVERSAL::VERSION tests" unless $ENV{PERL_CORE};
-
- my $error_regex = $] < 5.006
- ? 'version \d required'
- : 'does not define \$t.{7}::VERSION';
-
- {
- my ($fh, $filename) = tempfile('tXXXXXXX', SUFFIX => '.pm', UNLINK => 1);
- (my $package = basename($filename)) =~ s/\.pm$//;
- print $fh "package $package;\n\$$package\::VERSION=0.58;\n1;\n";
- close $fh;
-
- $version = 0.58;
- eval "use lib '.'; use $package $version";
- unlike($@, qr/$package version $version/,
- 'Replacement eval works with exact version');
-
- # test as class method
- $new_version = $package->VERSION;
- cmp_ok($new_version,'==',$version, "Called as class method");
-
- eval "print Completely::Unknown::Module->VERSION";
- if ( $] < 5.008 ) {
- unlike($@, qr/$error_regex/,
- "Don't freak if the module doesn't even exist");
- }
- else {
- unlike($@, qr/defines neither package nor VERSION/,
- "Don't freak if the module doesn't even exist");
- }
-
- # this should fail even with old UNIVERSAL::VERSION
- $version += 0.01;
- eval "use lib '.'; use $package $version";
- like($@, qr/$package version $version/,
- 'Replacement eval works with incremented version');
-
- $version =~ s/0+$//; #convert to string and remove trailing 0's
- chop($version); # shorten by 1 digit, should still succeed
- eval "use lib '.'; use $package $version";
- unlike($@, qr/$package version $version/,
- 'Replacement eval works with single digit');
-
- # this would fail with old UNIVERSAL::VERSION
- $version += 0.1;
- eval "use lib '.'; use $package $version";
- like($@, qr/$package version $version/,
- 'Replacement eval works with incremented digit');
- unlink $filename;
- }
-
- { # dummy up some variously broken modules for testing
- my ($fh, $filename) = tempfile('tXXXXXXX', SUFFIX => '.pm', UNLINK => 1);
- (my $package = basename($filename)) =~ s/\.pm$//;
- print $fh "1;\n";
- close $fh;
-
- eval "use lib '.'; use $package 3;";
- if ( $] < 5.008 ) {
- like($@, qr/$error_regex/,
- 'Replacement handles modules without package or VERSION');
- }
- else {
- like($@, qr/defines neither package nor VERSION/,
- 'Replacement handles modules without package or VERSION');
- }
- eval "use lib '.'; use $package; \$version = $package->VERSION";
- unlike ($@, qr/$error_regex/,
- 'Replacement handles modules without package or VERSION');
- ok (!defined($version), "Called as class method");
- unlink $filename;
- }
-
- { # dummy up some variously broken modules for testing
- my ($fh, $filename) = tempfile('tXXXXXXX', SUFFIX => '.pm', UNLINK => 1);
- (my $package = basename($filename)) =~ s/\.pm$//;
- print $fh "package $package;\n#look ma no VERSION\n1;\n";
- close $fh;
- eval "use lib '.'; use $package 3;";
- like ($@, qr/$error_regex/,
- 'Replacement handles modules without VERSION');
- eval "use lib '.'; use $package; print $package->VERSION";
- unlike ($@, qr/$error_regex/,
- 'Replacement handles modules without VERSION');
- unlink $filename;
- }
-
- { # dummy up some variously broken modules for testing
- my ($fh, $filename) = tempfile('tXXXXXXX', SUFFIX => '.pm', UNLINK => 1);
- (my $package = basename($filename)) =~ s/\.pm$//;
- print $fh "package $package;\n\@VERSION = ();\n1;\n";
- close $fh;
- eval "use lib '.'; use $package 3;";
- like ($@, qr/$error_regex/,
- 'Replacement handles modules without VERSION');
- eval "use lib '.'; use $package; print $package->VERSION";
- unlike ($@, qr/$error_regex/,
- 'Replacement handles modules without VERSION');
- unlink $filename;
- }
-
-SKIP: {
- skip 'Cannot test bare v-strings with Perl < 5.6.0', 4
- if $] < 5.006_000;
- diag "Tests with v-strings" unless $ENV{PERL_CORE};
- $version = $CLASS->$method(1.2.3);
- ok("$version" eq "v1.2.3", '"$version" eq 1.2.3');
- $version = $CLASS->$method(1.0.0);
- $new_version = $CLASS->$method(1);
- ok($version == $new_version, '$version == $new_version');
- skip "version require'd instead of use'd, cannot test declare", 1
- unless defined $qv_declare;
- $version = &$qv_declare(1.2.3);
- ok("$version" eq "v1.2.3", 'v-string initialized $qv_declare()');
- }
-
-SKIP: {
- skip 'Cannot test bare alpha v-strings with Perl < 5.8.1', 2
- if $] lt 5.008_001;
- diag "Tests with bare alpha v-strings" unless $ENV{PERL_CORE};
- $version = $CLASS->$method(v1.2.3_4);
- is($version, "v1.2.3_4", '"$version" eq "v1.2.3_4"');
- $version = $CLASS->$method(eval "v1.2.3_4");
- is($version, "v1.2.3_4", '"$version" eq "v1.2.3_4" (from eval)');
- }
-
- diag "Tests with real-world (malformed) data" unless $ENV{PERL_CORE};
-
- # trailing zero testing (reported by Andreas Koenig).
- $version = $CLASS->$method("1");
- ok($version->numify eq "1.000", "trailing zeros preserved");
- $version = $CLASS->$method("1.0");
- ok($version->numify eq "1.000", "trailing zeros preserved");
- $version = $CLASS->$method("1.0.0");
- ok($version->numify eq "1.000000", "trailing zeros preserved");
- $version = $CLASS->$method("1.0.0.0");
- ok($version->numify eq "1.000000000", "trailing zeros preserved");
-
- # leading zero testing (reported by Andreas Koenig).
- $version = $CLASS->$method(".7");
- ok($version->numify eq "0.700", "leading zero inferred");
-
- # leading space testing (reported by Andreas Koenig).
- $version = $CLASS->$method(" 1.7");
- ok($version->numify eq "1.700", "leading space ignored");
-
- # RT 19517 - deal with undef and 'undef' initialization
- ok("$version" ne 'undef', "Undef version comparison #1");
- ok("$version" ne undef, "Undef version comparison #2");
- $version = $CLASS->$method('undef');
- unlike($warning, qr/^Version string 'undef' contains invalid data/,
- "Version string 'undef'");
-
- $version = $CLASS->$method(undef);
- like($warning, qr/^Use of uninitialized value/,
- "Version string 'undef'");
- ok($version == 'undef', "Undef version comparison #3");
- ok($version == undef, "Undef version comparison #4");
- eval "\$version = \$CLASS->$method()"; # no parameter at all
- unlike($@, qr/^Bizarre copy of CODE/, "No initializer at all");
- ok($version == 'undef', "Undef version comparison #5");
- ok($version == undef, "Undef version comparison #6");
-
- $version = $CLASS->$method(0.000001);
- unlike($warning, qr/^Version string '1e-06' contains invalid data/,
- "Very small version objects");
- }
-
-SKIP: {
- my $warning;
- local $SIG{__WARN__} = sub { $warning = $_[0] };
- # dummy up a legal module for testing RT#19017
- my ($fh, $filename) = tempfile('tXXXXXXX', SUFFIX => '.pm', UNLINK => 1);
- (my $package = basename($filename)) =~ s/\.pm$//;
- print $fh <<"EOF";
-package $package;
-use $CLASS; \$VERSION = ${CLASS}->new('0.0.4');
-1;
-EOF
- close $fh;
-
- eval "use lib '.'; use $package 0.000008;";
- like ($@, qr/^$package version 0.000008 required/,
- "Make sure very small versions don't freak");
- eval "use lib '.'; use $package 1;";
- like ($@, qr/^$package version 1 required/,
- "Comparing vs. version with no decimal");
- eval "use lib '.'; use $package 1.;";
- like ($@, qr/^$package version 1 required/,
- "Comparing vs. version with decimal only");
- if ( $] < 5.006_000 ) {
- skip 'Cannot "use" extended versions with Perl < 5.6.0', 3;
- }
- eval "use lib '.'; use $package v0.0.8;";
- my $regex = "^$package version v0.0.8 required";
- like ($@, qr/$regex/, "Make sure very small versions don't freak");
-
- $regex =~ s/8/4/; # set for second test
- eval "use lib '.'; use $package v0.0.4;";
- unlike($@, qr/$regex/, 'Succeed - required == VERSION');
- cmp_ok ( $package->VERSION, 'eq', '0.0.4', 'No undef warnings' );
- unlink $filename;
- }
-
-SKIP: {
- skip 'Cannot test "use base qw(version)" when require is used', 3
- unless defined $qv_declare;
- my ($fh, $filename) = tempfile('tXXXXXXX', SUFFIX => '.pm', UNLINK => 1);
- (my $package = basename($filename)) =~ s/\.pm$//;
- print $fh <<"EOF";
-package $package;
-use base qw(version);
-1;
-EOF
- close $fh;
- # need to eliminate any other $qv_declare()'s
- undef *{"main\::$qv_declare"};
- ok(!defined(&{"main\::$qv_declare"}), "make sure we cleared $qv_declare() properly");
- eval "use lib '.'; use $package qw/declare qv/;";
- ok(defined(&{"main\::$qv_declare"}), "make sure we exported $qv_declare() properly");
- isa_ok( &$qv_declare(1.2), $package);
- unlink $filename;
-}
-
-SKIP: {
- if ( $] < 5.006_000 ) {
- skip 'Cannot "use" extended versions with Perl < 5.6.0', 3;
- }
- my ($fh, $filename) = tempfile('tXXXXXXX', SUFFIX => '.pm', UNLINK => 1);
- (my $package = basename($filename)) =~ s/\.pm$//;
- print $fh <<"EOF";
-package $package;
-\$VERSION = 1.0;
-1;
-EOF
- close $fh;
- eval "use lib '.'; use $package 1.001;";
- like ($@, qr/^$package version 1.001 required/,
- "User typed numeric so we error with numeric");
- eval "use lib '.'; use $package v1.1.0;";
- like ($@, qr/^$package version v1.1.0 required/,
- "User typed extended so we error with extended");
- unlink $filename;
- }
-
-SKIP: {
- # test locale handling
- my $warning;
- local $SIG{__WARN__} = sub { $warning = $_[0] };
-
-$DB::single = 1;
- my $v = eval { $CLASS->$method('1,7') };
-# is( $@, "", 'Directly test comma as decimal compliance');
-
- my $ver = 1.23; # has to be floating point number
- my $orig_loc = setlocale( LC_ALL );
- my $loc;
- while (<DATA>) {
- chomp;
- $loc = setlocale( LC_ALL, $_);
- last if localeconv()->{decimal_point} eq ',';
- }
- skip 'Cannot test locale handling without a comma locale', 4
- unless ( $loc and ($ver eq '1,23') );
-
- diag ("Testing locale handling with $loc") unless $ENV{PERL_CORE};
-
- $v = $CLASS->$method($ver);
- unlike($warning, qr/Version string '1,23' contains invalid data/,
- "Process locale-dependent floating point");
- is ($v, "1.23", "Locale doesn't apply to version objects");
- ok ($v == $ver, "Comparison to locale floating point");
-
- setlocale( LC_ALL, $orig_loc); # reset this before possible skip
- skip 'Cannot test RT#46921 with Perl < 5.008', 1
- if ($] < 5.008);
- skip 'Cannot test RT#46921 with pure Perl module', 1
- if exists $INC{'version/vpp.pm'};
- my ($fh, $filename) = tempfile('tXXXXXXX', SUFFIX => '.pm', UNLINK => 1);
- (my $package = basename($filename)) =~ s/\.pm$//;
- print $fh <<"EOF";
-package $package;
-use POSIX qw(locale_h);
-\$^W = 1;
-use $CLASS;
-setlocale (LC_ALL, '$loc');
-use $CLASS ;
-eval "use Socket 1.7";
-setlocale( LC_ALL, '$orig_loc');
-1;
-EOF
- close $fh;
-
- eval "use lib '.'; use $package;";
- unlike($warning, qr"Version string '1,7' contains invalid data",
- 'Handle locale action-at-a-distance');
- }
-
- eval 'my $v = $CLASS->$method("1._1");';
- unlike($@, qr/^Invalid version format \(alpha with zero width\)/,
- "Invalid version format 1._1");
-
- {
- my $warning;
- local $SIG{__WARN__} = sub { $warning = $_[0] };
- eval 'my $v = $CLASS->$method(~0);';
- unlike($@, qr/Integer overflow in version/, "Too large version");
- like($warning, qr/Integer overflow in version/, "Too large version");
- }
-
- {
- # http://rt.cpan.org/Public/Bug/Display.html?id=30004
- my $v1 = $CLASS->$method("v0.1_1");
- (my $alpha1 = Dumper($v1)) =~ s/.+'alpha' => ([^,]+),.+/$1/ms;
- my $v2 = $CLASS->$method($v1);
- (my $alpha2 = Dumper($v2)) =~ s/.+'alpha' => ([^,]+),.+/$1/ms;
- is $alpha2, $alpha1, "Don't fall for Data::Dumper's tricks";
- }
-
- {
- # http://rt.perl.org/rt3/Ticket/Display.html?id=56606
- my $badv = bless { version => [1,2,3] }, "version";
- is $badv, '1.002003', "Deal with badly serialized versions from YAML";
- my $badv2 = bless { qv => 1, version => [1,2,3] }, "version";
- is $badv2, 'v1.2.3', "Deal with badly serialized versions from YAML ";
- }
-SKIP: {
- if ( $] < 5.006_000 ) {
- skip 'No v-string support at all < 5.6.0', 2;
- }
- # https://rt.cpan.org/Ticket/Display.html?id=49348
- my $v = $CLASS->$method("420");
- is "$v", "420", 'Correctly guesses this is not a v-string';
- $v = $CLASS->$method(4.2.0);
- is "$v", 'v4.2.0', 'Correctly guess that this is a v-string';
- }
-SKIP: {
- if ( $] < 5.006_000 ) {
- skip 'No v-string support at all < 5.6.0', 4;
- }
- # https://rt.cpan.org/Ticket/Display.html?id=50347
- # Check that the qv() implementation does not change
-
- ok $CLASS->$method(1.2.3) < $CLASS->$method(1.2.3.1), 'Compare 3 and 4 digit v-strings' ;
- ok $CLASS->$method(v1.2.3) < $CLASS->$method(v1.2.3.1), 'Compare 3 and 4 digit v-strings, leaving v';
- ok $CLASS->$method("1.2.3") < $CLASS->$method("1.2.3.1"), 'Compare 3 and 4 digit v-strings, quoted';
- ok $CLASS->$method("v1.2.3") < $CLASS->$method("v1.2.3.1"), 'Compare 3 and 4 digit v-strings, quoted leading v';
- }
-}
-
-1;
-
-__DATA__
-af_ZA
-af_ZA.utf8
-an_ES
-an_ES.utf8
-az_AZ.utf8
-be_BY
-be_BY.utf8
-bg_BG
-bg_BG.utf8
-br_FR
-br_FR at euro
-br_FR.utf8
-bs_BA
-bs_BA.utf8
-ca_ES
-ca_ES at euro
-ca_ES.utf8
-cs_CZ
-cs_CZ.utf8
-da_DK
-da_DK.utf8
-de_AT
-de_AT at euro
-de_AT.utf8
-de_BE
-de_BE at euro
-de_BE.utf8
-de_DE
-de_DE at euro
-de_DE.utf8
-de_LU
-de_LU at euro
-de_LU.utf8
-el_GR
-el_GR.utf8
-en_DK
-en_DK.utf8
-es_AR
-es_AR.utf8
-es_BO
-es_BO.utf8
-es_CL
-es_CL.utf8
-es_CO
-es_CO.utf8
-es_EC
-es_EC.utf8
-es_ES
-es_ES at euro
-es_ES.utf8
-es_PY
-es_PY.utf8
-es_UY
-es_UY.utf8
-es_VE
-es_VE.utf8
-et_EE
-et_EE.iso885915
-et_EE.utf8
-eu_ES
-eu_ES at euro
-eu_ES.utf8
-fi_FI
-fi_FI at euro
-fi_FI.utf8
-fo_FO
-fo_FO.utf8
-fr_BE
-fr_BE at euro
-fr_BE.utf8
-fr_CA
-fr_CA.utf8
-fr_CH
-fr_CH.utf8
-fr_FR
-fr_FR at euro
-fr_FR.utf8
-fr_LU
-fr_LU at euro
-fr_LU.utf8
-gl_ES
-gl_ES at euro
-gl_ES.utf8
-hr_HR
-hr_HR.utf8
-hu_HU
-hu_HU.utf8
-id_ID
-id_ID.utf8
-is_IS
-is_IS.utf8
-it_CH
-it_CH.utf8
-it_IT
-it_IT at euro
-it_IT.utf8
-ka_GE
-ka_GE.utf8
-kk_KZ
-kk_KZ.utf8
-kl_GL
-kl_GL.utf8
-lt_LT
-lt_LT.utf8
-lv_LV
-lv_LV.utf8
-mk_MK
-mk_MK.utf8
-mn_MN
-mn_MN.utf8
-nb_NO
-nb_NO.utf8
-nl_BE
-nl_BE at euro
-nl_BE.utf8
-nl_NL
-nl_NL at euro
-nl_NL.utf8
-nn_NO
-nn_NO.utf8
-no_NO
-no_NO.utf8
-oc_FR
-oc_FR.utf8
-pl_PL
-pl_PL.utf8
-pt_BR
-pt_BR.utf8
-pt_PT
-pt_PT at euro
-pt_PT.utf8
-ro_RO
-ro_RO.utf8
-ru_RU
-ru_RU.koi8r
-ru_RU.utf8
-ru_UA
-ru_UA.utf8
-se_NO
-se_NO.utf8
-sh_YU
-sh_YU.utf8
-sk_SK
-sk_SK.utf8
-sl_SI
-sl_SI.utf8
-sq_AL
-sq_AL.utf8
-sr_CS
-sr_CS.utf8
-sv_FI
-sv_FI at euro
-sv_FI.utf8
-sv_SE
-sv_SE.iso885915
-sv_SE.utf8
-tg_TJ
-tg_TJ.utf8
-tr_TR
-tr_TR.utf8
-tt_RU.utf8
-uk_UA
-uk_UA.utf8
-vi_VN
-vi_VN.tcvn
-wa_BE
-wa_BE at euro
-wa_BE.utf8
-
Modified: vendor/perl/dist/op.c
===================================================================
--- vendor/perl/dist/op.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/op.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -3206,7 +3206,7 @@
if ((PL_opargs[type] & OA_OTHERINT) && (PL_hints & HINT_INTEGER))
{
dVAR;
- o->op_ppaddr = PL_ppaddr[type = ++(o->op_type)];
+ o->op_ppaddr = PL_ppaddr[++(o->op_type)];
}
if (type == OP_NEGATE)
@@ -11144,8 +11144,8 @@
&& ( p->op_next->op_type == OP_NEXTSTATE
|| p->op_next->op_type == OP_DBSTATE)
&& count < OPpPADRANGE_COUNTMASK
+ && base + count == p->op_targ
) {
- assert(base + count == p->op_targ);
count++;
followop = p->op_next;
}
Modified: vendor/perl/dist/patchlevel.h
===================================================================
--- vendor/perl/dist/patchlevel.h 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/patchlevel.h 2014-08-27 11:27:40 UTC (rev 6720)
@@ -15,7 +15,7 @@
#define PERL_REVISION 5 /* age */
#define PERL_VERSION 18 /* epoch */
-#define PERL_SUBVERSION 1 /* generation */
+#define PERL_SUBVERSION 2 /* generation */
/* The following numbers describe the earliest compatible version of
Perl ("compatibility" here being defined as sufficient binary/API
Modified: vendor/perl/dist/perlio.c
===================================================================
--- vendor/perl/dist/perlio.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/perlio.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -2303,7 +2303,7 @@
if (self && self->Getarg)
arg = (*self->Getarg)(aTHX_ o, param, flags);
f = PerlIO_push(aTHX_ f, self, PerlIO_modestr(o,buf), arg);
- if (PerlIOBase(o)->flags & PERLIO_F_UTF8)
+ if (f && PerlIOBase(o)->flags & PERLIO_F_UTF8)
PerlIOBase(f)->flags |= PERLIO_F_UTF8;
SvREFCNT_dec(arg);
}
Modified: vendor/perl/dist/plan9/config.plan9
===================================================================
--- vendor/perl/dist/plan9/config.plan9 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/plan9/config.plan9 2014-08-27 11:27:40 UTC (rev 6720)
@@ -3385,8 +3385,8 @@
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "/sys/lib/perl/5.18.1" /**/
-#define PRIVLIB_EXP "/sys/lib/perl/5.18.1" /**/
+#define PRIVLIB "/sys/lib/perl/5.18.2" /**/
+#define PRIVLIB_EXP "/sys/lib/perl/5.18.2" /**/
/* PTRSIZE:
* This symbol contains the size of a pointer, so that the C preprocessor
@@ -3513,9 +3513,9 @@
* removed. The elements in inc_version_list (inc_version_list.U) can
* be tacked onto this variable to generate a list of directories to search.
*/
-#define SITELIB "/sys/lib/perl/5.18.1/site_perl" /**/
-#define SITELIB_EXP "/sys/lib/perl/5.18.1/site_perl" /**/
-#define SITELIB_STEM "/sys/lib/perl/5.18.1/site_perl" /**/
+#define SITELIB "/sys/lib/perl/5.18.2/site_perl" /**/
+#define SITELIB_EXP "/sys/lib/perl/5.18.2/site_perl" /**/
+#define SITELIB_STEM "/sys/lib/perl/5.18.2/site_perl" /**/
/* Size_t_size:
* This symbol holds the size of a Size_t in bytes.
Modified: vendor/perl/dist/plan9/config_sh.sample
===================================================================
--- vendor/perl/dist/plan9/config_sh.sample 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/plan9/config_sh.sample 2014-08-27 11:27:40 UTC (rev 6720)
@@ -34,10 +34,10 @@
api_revision='5'
api_subversion='0'
api_version='18'
-api_versionstring='5.18.1'
+api_versionstring='5.18.0'
ar='ar'
-archlib='/sys/lib/perl5/5.18.1/386'
-archlibexp='/sys/lib/perl5/5.18.1/386'
+archlib='/sys/lib/perl5/5.18.2/386'
+archlibexp='/sys/lib/perl5/5.18.2/386'
archname64=''
archname='386'
archobjs=''
@@ -726,17 +726,17 @@
inc_version_list_init='0'
incpath=''
inews=''
-installarchlib='/sys/lib/perl/5.18.1/386'
+installarchlib='/sys/lib/perl/5.18.2/386'
installbin='/usr/bin'
installman1dir='/sys/man/1pub'
installman3dir='/sys/man/2pub'
installprefix='/usr'
installprefixexp='/usr'
-installprivlib='/sys/lib/perl/5.18.1'
+installprivlib='/sys/lib/perl/5.18.2'
installscript='/usr/bin'
-installsitearch='/sys/lib/perl/5.18.1/site_perl/386'
+installsitearch='/sys/lib/perl/5.18.2/site_perl/386'
installsitebin='/usr/bin'
-installsitelib='/sys/lib/perl/5.18.1/site_perl'
+installsitelib='/sys/lib/perl/5.18.2/site_perl'
installstyle='lib/perl5'
installusrbinperl='undef'
installvendorarch=''
@@ -856,8 +856,8 @@
pr=''
prefix='/usr'
prefixexp='/usr'
-privlib='/sys/lib/perl/5.18.1'
-privlibexp='/sys/lib/perl/5.18.1'
+privlib='/sys/lib/perl/5.18.2'
+privlibexp='/sys/lib/perl/5.18.2'
procselfexe=''
prototype='define'
ptrsize='4'
@@ -922,13 +922,13 @@
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 0'
sig_size='50'
signal_t='void'
-sitearch='/sys/lib/perl/5.18.1/site_perl/386'
+sitearch='/sys/lib/perl/5.18.2/site_perl/386'
sitearchexp='/sys/lib/perl/site_perl/386'
sitebin='/usr/bin'
sitebinexp='/usr/bin'
-sitelib='/sys/lib/perl/5.18.1/site_perl'
-sitelib_stem='/sys/lib/perl/5.18.1/site_perl'
-sitelibexp='/sys/lib/perl/5.18.1/site_perl'
+sitelib='/sys/lib/perl/5.18.2/site_perl'
+sitelib_stem='/sys/lib/perl/5.18.2/site_perl'
+sitelibexp='/sys/lib/perl/5.18.2/site_perl'
siteprefix='/usr'
siteprefixexp='/usr'
sizesize='4'
@@ -961,7 +961,7 @@
strerror_r_proto='0'
strings='/sys/include/ape/string.h'
submit=''
-subversion='1'
+subversion='2'
sysman='/sys/man/1pub'
tail=''
tar=''
@@ -1041,8 +1041,8 @@
vendorlibexp=''
vendorprefix=''
vendorprefixexp=''
-version='5.18.1'
-version_patchlevel_string='version 18 subversion 1'
+version='5.18.2'
+version_patchlevel_string='version 18 subversion 2'
versiononly='undef'
vi=''
voidflags='15'
@@ -1057,7 +1057,7 @@
config_argc=0
PERL_REVISION=5
PERL_VERSION=18
-PERL_SUBVERSION=1
+PERL_SUBVERSION=2
PERL_API_REVISION=5
PERL_API_VERSION=18
PERL_API_SUBVERSION=0
Deleted: vendor/perl/dist/pod/checkpods.PL
===================================================================
--- vendor/perl/dist/pod/checkpods.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/checkpods.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,85 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
-chdir dirname($0);
-$file = basename($0, '.PL');
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{startperl}
- eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
-!GROK!THIS!
-
-# In the following, perl variables are not expanded during extraction.
-
-print OUT <<'!NO!SUBS!';
-# From roderick at gate.netThu Sep 5 17:19:30 1996
-# Date: Thu, 05 Sep 1996 00:11:22 -0400
-# From: Roderick Schertler <roderick at gate.net>
-# To: perl5-porters at africa.nicoh.com
-# Subject: POD lines with only spaces
-#
-# There are some places in the documentation where a POD directive is
-# ignored because the line before it contains whitespace (and so the
-# directive doesn't start a paragraph). This patch adds a way to check
-# for these to the pod Makefile (though it isn't made part of the build
-# process, which would be a good idea), and fixes those places where the
-# problem currently exists.
-#
-# Version 1.00 Original.
-# Version 1.01 Andy Dougherty <doughera at lafayette.edu>
-# Trivial modifications to output format for easier auto-parsing
-# Broke it out as a separate function to avoid nasty
-# Make/Shell/Perl quoting problems, and also to make it easier
-# to grow. Someone will probably want to rewrite in terms of
-# some sort of Pod::Checker module. Or something. Consider this
-# a placeholder for the future.
-# Version 1.02 Roderick Schertler <roderick at argon.org>
-# Check for pod directives following any kind of unempty line, not
-# just lines of whitespace.
-
- at directive = qw(head1 head2 item over back cut pod for begin end);
- at directive{@directive} = (1) x @directive;
-
-$exit = $last_unempty = 0;
-while (<>) {
- s/(\012|\015\012|\015)$//;
- if (/^=(\S+)/ && $directive{$1} && $last_unempty) {
- printf "%s: line %5d, no blank line preceding directive =%s\n",
- $ARGV, $., $1;
- $exit = 1;
- }
- $last_unempty = ($_ ne '');
- if (eof) {
- close(ARGV);
- $last_unempty = 0;
- }
-}
-exit $exit
-!NO!SUBS!
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
Modified: vendor/perl/dist/pod/perl.pod
===================================================================
--- vendor/perl/dist/pod/perl.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -179,6 +179,7 @@
perlhist Perl history records
perldelta Perl changes since previous version
+ perl5181delta Perl changes in version 5.18.1
perl5180delta Perl changes in version 5.18.0
perl5161delta Perl changes in version 5.16.1
perl5162delta Perl changes in version 5.16.2
@@ -267,6 +268,7 @@
perltodo
perltooc
perltoot
+ perlrepository
=for buildtoc __END__
Deleted: vendor/perl/dist/pod/perl5110delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5110delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5110delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1624 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl5110delta - what is new for perl v5.11.0
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.10.0 release and
-the 5.11.0 development release.
-
-=head1 Incompatible Changes
-
-=head2 Unicode interpretation of \w, \d, \s, and the POSIX character classes redefined.
-
-Previous versions of Perl tried to map POSIX style character class definitions onto
-Unicode property names so that patterns would "dwim" when matches were made against latin-1 or
-unicode strings. This proved to be a mistake, breaking character class negation, causing
-forward compatibility problems (as Unicode keeps updating their property definitions and adding
-new characters), and other problems.
-
-Therefore we have now defined a new set of artificial "unicode" property names which will be
-used to do unicode matching of patterns using POSIX style character classes and perl short-form
-escape character classes like \w and \d.
-
-The key change here is that \d will no longer match every digit in the unicode standard
-(there are thousands) nor will \w match every word character in the standard, instead they
-will match precisely their POSIX or Perl definition.
-
-Those needing to match based on Unicode properties can continue to do so by using the \p{} syntax
-to match whichever property they like, including the new artificial definitions.
-
-B<NOTE:> This is a backwards incompatible no-warning change in behaviour. If you are upgrading
-and you process large volumes of text look for POSIX and Perl style character classes and
-change them to the relevant property name (by removing the word 'Posix' from the current name).
-
-The following table maps the POSIX character class names, the escapes and the old and new
-Unicode property mappings:
-
- POSIX Esc Class New-Property ! Old-Property
- ----------------------------------------------+-------------
- alnum [0-9A-Za-z] IsPosixAlnum ! IsAlnum
- alpha [A-Za-z] IsPosixAlpha ! IsAlpha
- ascii [\000-\177] IsASCII = IsASCII
- blank [\011 ] IsPosixBlank !
- cntrl [\0-\37\177] IsPosixCntrl ! IsCntrl
- digit \d [0-9] IsPosixDigit ! IsDigit
- graph [!-~] IsPosixGraph ! IsGraph
- lower [a-z] IsPosixLower ! IsLower
- print [ -~] IsPosixPrint ! IsPrint
- punct [!-/:-@[-`{-~] IsPosixPunct ! IsPunct
- space [\11-\15 ] IsPosixSpace ! IsSpace
- \s [\11\12\14\15 ] IsPerlSpace ! IsSpacePerl
- upper [A-Z] IsPosixUpper ! IsUpper
- word \w [0-9A-Z_a-z] IsPerlWord ! IsWord
- xdigit [0-9A-Fa-f] IsXDigit = IsXDigit
-
-If you wish to build perl with the old mapping you may do so by setting
-
- #define PERL_LEGACY_UNICODE_CHARCLASS_MAPPINGS 1
-
-in regcomp.h, and then setting
-
- PERL_TEST_LEGACY_POSIX_CC
-
-to true your environment when testing.
-
-
-=head2 @INC reorganization
-
-In @INC, ARCHLIB and PRIVLIB now occur after after the current version's
-site_perl and vendor_perl.
-
-=head2 Switch statement changes
-
-The handling of complex expressions by the C<given>/C<when> switch
-statement has been enhanced. These enhancements are also available in
-5.10.1 and subsequent 5.10 releases. There are two new cases where C<when> now
-interprets its argument as a boolean, instead of an expression to be used
-in a smart match:
-
-=over 4
-
-=item flip-flop operators
-
-The C<..> and C<...> flip-flop operators are now evaluated in boolean
-context, following their usual semantics; see L<perlop/"Range Operators">.
-
-Note that, as in perl 5.10.0, C<when (1..10)> will not work to test
-whether a given value is an integer between 1 and 10; you should use
-C<when ([1..10])> instead (note the array reference).
-
-However, contrary to 5.10.0, evaluating the flip-flop operators in boolean
-context ensures it can now be useful in a C<when()>, notably for
-implementing bistable conditions, like in:
-
- when (/^=begin/ .. /^=end/) {
- # do something
- }
-
-=item defined-or operator
-
-A compound expression involving the defined-or operator, as in
-C<when (expr1 // expr2)>, will be treated as boolean if the first
-expression is boolean. (This just extends the existing rule that applies
-to the regular or operator, as in C<when (expr1 || expr2)>.)
-
-=back
-
-The next section details more changes brought to the semantics to
-the smart match operator, that naturally also modify the behaviour
-of the switch statements where smart matching is implicitly used.
-These changers were also made for the 5.10.1 release, and will remain in
-subsequent 5.10 releases.
-
-=head2 Smart match changes
-
-=head3 Changes to type-based dispatch
-
-The smart match operator C<~~> is no longer commutative. The behaviour of
-a smart match now depends primarily on the type of its right hand
-argument. Moreover, its semantics have been adjusted for greater
-consistency or usefulness in several cases. While the general backwards
-compatibility is maintained, several changes must be noted:
-
-=over 4
-
-=item *
-
-Code references with an empty prototype are no longer treated specially.
-They are passed an argument like the other code references (even if they
-choose to ignore it).
-
-=item *
-
-C<%hash ~~ sub {}> and C<@array ~~ sub {}> now test that the subroutine
-returns a true value for each key of the hash (or element of the
-array), instead of passing the whole hash or array as a reference to
-the subroutine.
-
-=item *
-
-Due to the commutativity breakage, code references are no longer
-treated specially when appearing on the left of the C<~~> operator,
-but like any vulgar scalar.
-
-=item *
-
-C<undef ~~ %hash> is always false (since C<undef> can't be a key in a
-hash). No implicit conversion to C<""> is done (as was the case in perl
-5.10.0).
-
-=item *
-
-C<$scalar ~~ @array> now always distributes the smart match across the
-elements of the array. It's true if one element in @array verifies
-C<$scalar ~~ $element>. This is a generalization of the old behaviour
-that tested whether the array contained the scalar.
-
-=back
-
-The full dispatch table for the smart match operator is given in
-L<perlsyn/"Smart matching in detail">.
-
-=head3 Smart match and overloading
-
-According to the rule of dispatch based on the rightmost argument type,
-when an object overloading C<~~> appears on the right side of the
-operator, the overload routine will always be called (with a 3rd argument
-set to a true value, see L<overload>.) However, when the object will
-appear on the left, the overload routine will be called only when the
-rightmost argument is a simple scalar. This way distributivity of smart match
-across arrays is not broken, as well as the other behaviours with complex
-types (coderefs, hashes, regexes). Thus, writers of overloading routines
-for smart match mostly need to worry only with comparing against a scalar,
-and possibly with stringification overloading; the other common cases
-will be automatically handled consistently.
-
-C<~~> will now refuse to work on objects that do not overload it (in order
-to avoid relying on the object's underlying structure). (However, if the
-object overloads the stringification or the numification operators, and
-if overload fallback is active, it will be used instead, as usual.)
-
-=head2 Labels can't be keywords
-
-Labels used as targets for the C<goto>, C<last>, C<next> or C<redo>
-statements cannot be keywords anymore. This restriction will prevent
-potential confusion between the C<goto LABEL> and C<goto EXPR> syntaxes:
-for example, a statement like C<goto print> would jump to a label whose
-name would be the return value of C<print()>, (usually 1), instead of a
-label named C<print>. Moreover, the other control flow statements
-would just ignore any keyword passed to them as a label name. Since
-such labels cannot be defined anymore, this kind of error will be
-avoided.
-
-=head2 Other incompatible changes
-
-=over 4
-
-=item *
-
-The semantics of C<use feature :5.10*> have changed slightly.
-See L<"Modules and Pragmata"> for more information.
-
-=item *
-
-It is now a run-time error to use the smart match operator C<~~>
-with an object that has no overload defined for it. (This way
-C<~~> will not break encapsulation by matching against the
-object's internal representation as a reference.)
-
-=item *
-
-The version control system used for the development of the perl
-interpreter has been switched from Perforce to git. This is mainly an
-internal issue that only affects people actively working on the perl core;
-but it may have minor external visibility, for example in some of details
-of the output of C<perl -V>. See L<perlrepository> for more information.
-
-=item *
-
-The internal structure of the C<ext/> directory in the perl source has
-been reorganised. In general, a module C<Foo::Bar> whose source was
-stored under F<ext/Foo/Bar/> is now located under F<ext/Foo-Bar/>. Also,
-nearly all dual-life modules have been moved from F<lib/> to F<ext/>. This
-is purely a source tarball change, and should make no difference to the
-compilation or installation of perl, unless you have a very customised build
-process that explicitly relies on this structure, or which hard-codes the
-C<nonxs_ext> F<Configure> parameter. Specifically, this change does not by
-default alter the location of any files in the final installation.
-
-=item *
-
-As part of the C<Test::Harness> 2.x to 3.x upgrade, the experimental
-C<Test::Harness::Straps> module has been removed.
-See L</"Updated Modules"> for more details.
-
-=item *
-
-As part of the C<ExtUtils::MakeMaker> upgrade, the
-C<ExtUtils::MakeMaker::bytes> and C<ExtUtils::MakeMaker::vmsish> modules
-have been removed from this distribution.
-
-=item *
-
-C<Module::CoreList> no longer contains the C<%:patchlevel> hash.
-
-=item *
-
-This one is actually a change introduced in 5.10.0, but it was missed
-from that release's perldelta, so it is mentioned here instead.
-
-A bugfix related to the handling of the C</m> modifier and C<qr> resulted
-in a change of behaviour between 5.8.x and 5.10.0:
-
- # matches in 5.8.x, doesn't match in 5.10.0
- $re = qr/^bar/; "foo\nbar" =~ /$re/m;
-
-=item *
-
-C<length undef> now returns undef.
-
-=item *
-
-Unsupported private C API functions are now declared "static" to prevent
-leakage to Perl's public API.
-
-=item *
-
-To support the bootstrapping process, F<miniperl> no longer builds with
-UTF-8 support in the regexp engine.
-
-This allows a build to complete with PERL_UNICODE set and a UTF-8 locale.
-Without this there's a bootstrapping problem, as miniperl can't load the UTF-8
-components of the regexp engine, because they're not yet built.
-
-=item *
-
-F<miniperl>'s @INC is now restricted to just -I..., the split of $ENV{PERL5LIB}, and "."
-
-=item *
-
-A space or a newline is now required after a C<"#line XXX"> directive.
-
-=item *
-
-Tied filehandles now have an additional method EOF which provides the EOF type
-
-=item *
-
-To better match all other flow control statements, C<foreach> may no longer be used as an attribute.
-
-=back
-
-=head1 Core Enhancements
-
-=head2 Unicode Character Database 5.1.0
-
-The copy of the Unicode Character Database included in Perl 5.11.0 has
-been updated to 5.1.0 from 5.0.0. See
-L<http://www.unicode.org/versions/Unicode5.1.0/#Notable_Changes> for the
-notable changes.
-
-=head2 A proper interface for pluggable Method Resolution Orders
-
-As of Perl 5.11.0 there is a new interface for plugging and using method
-resolution orders other than the default (linear depth first search).
-The C3 method resolution order added in 5.10.0 has been re-implemented as
-a plugin, without changing its Perl-space interface. See L<perlmroapi> for
-more information.
-
-=head2 The C<overloading> pragma
-
-This pragma allows you to lexically disable or enable overloading
-for some or all operations. (Yuval Kogman)
-
-=head2 C<\N> regex escape
-
-A new regex escape has been added, C<\N>. It will match any character that
-is not a newline, independently from the presence or absence of the single
-line match modifier C</s>. (If C<\N> is followed by an opening brace and
-by a letter, perl will still assume that a Unicode character name is
-coming, so compatibility is preserved.) (Rafael Garcia-Suarez)
-
-=head2 Implicit strictures
-
-Using the C<use VERSION> syntax with a version number greater or equal
-to 5.11.0 will also lexically enable strictures just like C<use strict>
-would do (in addition to enabling features.) So, the following:
-
- use 5.11.0;
-
-will now imply:
-
- use strict;
- use feature ':5.11';
-
-=head2 Parallel tests
-
-The core distribution can now run its regression tests in parallel on
-Unix-like platforms. Instead of running C<make test>, set C<TEST_JOBS> in
-your environment to the number of tests to run in parallel, and run
-C<make test_harness>. On a Bourne-like shell, this can be done as
-
- TEST_JOBS=3 make test_harness # Run 3 tests in parallel
-
-An environment variable is used, rather than parallel make itself, because
-L<TAP::Harness> needs to be able to schedule individual non-conflicting test
-scripts itself, and there is no standard interface to C<make> utilities to
-interact with their job schedulers.
-
-Note that currently some test scripts may fail when run in parallel (most
-notably C<ext/IO/t/io_dir.t>). If necessary run just the failing scripts
-again sequentially and see if the failures go away.
-
-=head2 The C<...> operator
-
-A new operator, C<...>, nicknamed the Yada Yada operator, has been added.
-It is intended to mark placeholder code, that is not yet implemented.
-See L<perlop/"Yada Yada Operator">. (chromatic)
-
-=head2 DTrace support
-
-Some support for DTrace has been added. See "DTrace support" in F<INSTALL>.
-
-=head2 Support for C<configure_requires> in CPAN module metadata
-
-Both C<CPAN> and C<CPANPLUS> now support the C<configure_requires> keyword
-in the F<META.yml> metadata file included in most recent CPAN distributions.
-This allows distribution authors to specify configuration prerequisites that
-must be installed before running F<Makefile.PL> or F<Build.PL>.
-
-See the documentation for C<ExtUtils::MakeMaker> or C<Module::Build> for more
-on how to specify C<configure_requires> when creating a distribution for CPAN.
-
-=head2 C<each> is now more flexible
-
-The C<each> function can now operate on arrays.
-
-=head2 Y2038 compliance
-
-Perl's core time-related functions are now Y2038 compliant. (With 29
-years to spare!)
-
-=head2 C<$,> flexibility
-
-The variable C<$,> may now be tied.
-
-=head2 // in where clauses
-
-// now behaves like || in when clauses
-
-=head2 Enabling warnings from your shell environment
-
-You can now set C<-W> from the C<PERL5OPT> environment variable
-
-=head2 C<delete local>
-
-C<delete local> now allows you to locally delete a hash entry.
-
-=head2 New support for Abstract namespace sockets
-
-Abstract namespace sockets are Linux-specific socket type that live in
-AF_UNIX family, slightly abusing it to be able to use arbitrary
-character arrays as addresses: They start with nul byte and are not
-terminated by nul byte, but with the length passed to the socket()
-system call.
-
-=head1 Modules and Pragmata
-
-=head2 Dual-lifed modules moved
-
-Dual-lifed modules maintained primarily in the Perl core now live in dist/.
-Dual-lifed modules maintained primarily on CPAN now live in cpan/
-
-In previous releases of Perl, it was customary to enumerate all module
-changes in this section of the C<perldelta> file. From 5.11.0 forward
-only notable updates (such as new or deprecated modules ) will be
-listed in this section. For a complete reference to the versions of
-modules shipped in a given release of perl, please see L<Module::CoreList>.
-
-=head2 New Modules and Pragmata
-
-=over 4
-
-=item C<autodie>
-
-This is a new lexically-scoped alternative for the C<Fatal> module.
-The bundled version is 2.06_01. Note that in this release, using a string
-eval when C<autodie> is in effect can cause the autodie behaviour to leak
-into the surrounding scope. See L<autodie/"BUGS"> for more details.
-
-=item C<Compress::Raw::Bzip2>
-
-This has been added to the core (version 2.020).
-
-=item C<parent>
-
-This pragma establishes an ISA relationship with base classes at compile
-time. It provides the key feature of C<base> without the feature creep.
-
-=item C<Parse::CPAN::Meta>
-
-This has been added to the core (version 1.39).
-
-=back
-
-=head2 Pragmata Changes
-
-=over 4
-
-=item C<overloading>
-
-See L</"The C<overloading> pragma"> above.
-
-=item C<attrs>
-
-The C<attrs> pragma has been removed. It had been marked as deprecated since
-5.6.0.
-
-=item C<charnames>
-
-The Unicode F<NameAliases.txt> database file has been added. This has the
-effect of adding some extra C<\N> character names that formerly wouldn't
-have been recognised; for example, C<"\N{LATIN CAPITAL LETTER GHA}">.
-
-=item C<feature>
-
-The meaning of the C<:5.10> and C<:5.10.X> feature bundles has
-changed slightly. The last component, if any (i.e. C<X>) is simply ignored.
-This is predicated on the assumption that new features will not, in
-general, be added to maintenance releases. So C<:5.10> and C<:5.10.X>
-have identical effect. This is a change to the behaviour documented for
-5.10.0.
-
-=item C<mro>
-
-Upgraded from version 1.00 to 1.01. Performance for single inheritance is 40%
-faster - see L</"Performance Enhancements"> below.
-
-C<mro> is now implemented as an XS extension. The documented interface has not
-changed. Code relying on the implementation detail that some C<mro::>
-methods happened to be available at all times gets to "keep both pieces".
-
-=back
-
-=head2 Updated Modules
-
-=over 4
-
-=item C<ExtUtils::MakeMaker>
-
-Upgraded from version 6.42 to 6.55_02.
-
-Note that C<ExtUtils::MakeMaker::bytes> and C<ExtUtils::MakeMaker::vmsish>
-have been removed from this distribution.
-
-=item C<Test::Harness>
-
-Upgraded from version 2.64 to 3.17.
-
-Note that one side-effect of the 2.x to 3.x upgrade is that the
-experimental C<Test::Harness::Straps> module (and its supporting
-C<Assert>, C<Iterator>, C<Point> and C<Results> modules) have been
-removed. If you still need this, then they are available in the
-(unmaintained) C<Test-Harness-Straps> distribution on CPAN.
-
-=item C<UNIVERSAL>
-
-Upgraded from version 1.04 to 1.05.
-
-C<< UNIVERSAL-E<gt>import() >> is now deprecated.
-
-=back
-
-=head1 Utility Changes
-
-=over 4
-
-=item F<h2ph>
-
-Now looks in C<include-fixed> too, which is a recent addition to gcc's
-search path.
-
-=item F<h2xs>
-
-No longer incorrectly treats enum values like macros (Daniel Burr).
-
-Now handles C++ style constants (C<//>) properly in enums. (A patch from
-Rainer Weikusat was used; Daniel Burr also proposed a similar fix).
-
-=item F<perl5db.pl>
-
-C<LVALUE> subroutines now work under the debugger.
-
-The debugger now correctly handles proxy constant subroutines, and
-subroutine stubs.
-
-=item F<perlbug>
-
-F<perlbug> now uses C<%Module::CoreList::bug_tracker> to print out upstream bug
-tracker URLs.
-
-Where the user names a module that their bug report is about, and we know the
-URL for its upstream bug tracker, provide a message to the user explaining
-that the core copies the CPAN version directly, and provide the URL for
-reporting the bug directly to upstream.
-
-=item F<perlthanks>
-
-Perl 5.11.0 added a new utility F<perlthanks>, which is a variant of
-F<perlbug>, but for sending non-bug-reports to the authors and maintainers
-of Perl. Getting nothing but bug reports can become a bit demoralising:
-we'll see if this changes things.
-
-=back
-
-=head1 New Documentation
-
-=over 4
-
-=item L<perlhaiku>
-
-This contains instructions on how to build perl for the Haiku platform.
-
-=item L<perlmroapi>
-
-This describes the new interface for pluggable Method Resolution Orders.
-
-=item L<perlperf>
-
-This document, by Richard Foley, provides an introduction to the use of
-performance and optimization techniques which can be used with particular
-reference to perl programs.
-
-=item L<perlrepository>
-
-This describes how to access the perl source using the I<git> version
-control system.
-
-=back
-
-=head1 Changes to Existing Documentation
-
-The various large F<Changes*> files (which listed every change made to perl
-over the last 18 years) have been removed, and replaced by a small file,
-also called F<Changes>, which just explains how that same information may
-be extracted from the git version control system.
-
-The file F<Porting/patching.pod> has been deleted, as it mainly described
-interacting with the old Perforce-based repository, which is now obsolete.
-Information still relevant has been moved to L<perlrepository>.
-
-L<perlapi>, L<perlintern>, L<perlmodlib> and L<perltoc> are now all
-generated at build time, rather than being shipped as part of the release.
-
-=over
-
-=item *
-
-Documented -X overloading.
-
-=item *
-
-Documented that C<when()> treats specially most of the filetest operators
-
-=item *
-
-Documented when as a syntax modifier
-
-=item *
-
-Eliminated "Old Perl threads tutorial", which describes 5005 threads.
-
-F<pod/perlthrtut.pod> is the same material reworked for ithreads.
-
-=item *
-
-Correct previous documentation: v-strings are not deprecated
-
-With version objects, we need them to use MODULE VERSION syntax. This
-patch removes the deprecation note.
-
-=item *
-
-Added security contact information to L<perlsec>
-
-=back
-
-=head1 Performance Enhancements
-
-
-=over 4
-
-=item *
-
-A new internal cache means that C<isa()> will often be faster.
-
-=item *
-
-The implementation of C<C3> Method Resolution Order has been optimised -
-linearisation for classes with single inheritance is 40% faster. Performance
-for multiple inheritance is unchanged.
-
-=item *
-
-Under C<use locale>, the locale-relevant information is now cached on
-read-only values, such as the list returned by C<keys %hash>. This makes
-operations such as C<sort keys %hash> in the scope of C<use locale> much
-faster.
-
-=item *
-
-Empty C<DESTROY> methods are no longer called.
-
-=item *
-
-Faster C<Perl_sv_utf8_upgrade()>
-
-=item *
-
-Speed up C<keys> on empty hash
-
-=back
-
-=head1 Installation and Configuration Improvements
-
-=head2 F<ext/> reorganisation
-
-The layout of directories in F<ext> has been revised. Specifically, all
-extensions are now flat, and at the top level, with C</> in pathnames
-replaced by C<->, so that F<ext/Data/Dumper/> is now F<ext/Data-Dumper/>,
-etc. The names of the extensions as specified to F<Configure>, and as
-reported by C<%Config::Config> under the keys C<dynamic_ext>,
-C<known_extensions>, C<nonxs_ext> and C<static_ext> have not changed, and
-still use C</>. Hence this change will not have any affect once perl is
-installed. C<Safe> has been split out from being part of C<Opcode>, and
-C<mro> is now an extension in its own right.
-
-Nearly all dual-life modules have been moved from F<lib> to F<ext>, and will
-now appear as known C<nonxs_ext>. This will made no difference to the
-structure of an installed perl, nor will the modules installed differ,
-unless you run F<Configure> with options to specify an exact list of
-extensions to build. In this case, you will rapidly become aware that you
-need to add to your list, because various modules needed to complete the
-build, such as C<ExtUtils::ParseXS>, have now become extensions, and
-without them the build will fail well before it attempts to run the
-regression tests.
-
-=head2 Configuration improvements
-
-If C<vendorlib> and C<vendorarch> are the same, then they are only added to
-C<@INC> once.
-
-C<$Config{usedevel}> and the C-level C<PERL_USE_DEVEL> are now defined if
-perl is built with C<-Dusedevel>.
-
-F<Configure> will enable use of C<-fstack-protector>, to provide protection
-against stack-smashing attacks, if the compiler supports it.
-
-F<Configure> will now determine the correct prototypes for re-entrant
-functions, and for C<gconvert>, if you are using a C++ compiler rather
-than a C compiler.
-
-On Unix, if you build from a tree containing a git repository, the
-configuration process will note the commit hash you have checked out, for
-display in the output of C<perl -v> and C<perl -V>. Unpushed local commits
-are automatically added to the list of local patches displayed by
-C<perl -V>.
-
-=head2 Compilation improvements
-
-As part of the flattening of F<ext>, all extensions on all platforms are
-built by F<make_ext.pl>. This replaces the Unix-specific
-F<ext/util/make_ext>, VMS-specific F<make_ext.com> and Win32-specific
-F<win32/buildext.pl>.
-
-=head2 Platform Specific Changes
-
-=over 4
-
-=item AIX
-
-Removed F<libbsd> for AIX 5L and 6.1. Only C<flock()> was used from F<libbsd>.
-
-Removed F<libgdbm> for AIX 5L and 6.1. The F<libgdbm> is delivered as an
-optional package with the AIX Toolbox. Unfortunately the 64 bit version
-is broken.
-
-Hints changes mean that AIX 4.2 should work again.
-
-=item Cygwin
-
-On Cygwin we now strip the last number from the DLL. This has been the
-behaviour in the cygwin.com build for years. The hints files have been
-updated.
-
-=item DomainOS
-
-Support for Apollo DomainOS was removed in Perl 5.11.0
-
-=item FreeBSD
-
-The hints files now identify the correct threading libraries on FreeBSD 7
-and later.
-
-=item Irix
-
-We now work around a bizarre preprocessor bug in the Irix 6.5 compiler:
-C<cc -E -> unfortunately goes into K&R mode, but C<cc -E file.c> doesn't.
-
-=item Haiku
-
-Patches from the Haiku maintainers have been merged in. Perl should now
-build on Haiku.
-
-=item MachTen
-
-Support for Tenon Intersystems MachTen Unix layer for MacOS Classic was
-removed in Perl 5.11.0
-
-=item MiNT
-
-Support for Atari MiNT was removed in Perl 5.11.0.
-
-=item MirOS BSD
-
-Perl should now build on MirOS BSD.
-
-=item NetBSD
-
-Hints now supports versions 5.*.
-
-=item Stratus VOS
-
-Various changes from Stratus have been merged in.
-
-=item Symbian
-
-There is now support for Symbian S60 3.2 SDK and S60 5.0 SDK.
-
-=item Win32
-
-Improved message window handling means that C<alarm> and C<kill> messages
-will no longer be dropped under race conditions.
-
-=item VMS
-
-Reads from the in-memory temporary files of C<PerlIO::scalar> used to fail
-if C<$/> was set to a numeric reference (to indicate record-style reads).
-This is now fixed.
-
-VMS now supports C<getgrgid>.
-
-Many improvements and cleanups have been made to the VMS file name handling
-and conversion code.
-
-Enabling the C<PERL_VMS_POSIX_EXIT> logical name now encodes a POSIX exit
-status in a VMS condition value for better interaction with GNV's bash
-shell and other utilities that depend on POSIX exit values. See
-L<perlvms/"$?"> for details.
-
-C<File::Copy> now detects Unix compatibility mode on VMS.
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-C<-I> on shebang line now adds directories in front of @INC
-as documented, and as does C<-I> when specified on the command-line.
-
-=item *
-
-C<kill> is now fatal when called on non-numeric process identifiers.
-Previously, an 'undef' process identifier would be interpreted as a request to
-kill process "0", which would terminate the current process group on POSIX
-systems. Since process identifiers are always integers, killing a non-numeric
-process is now fatal.
-
-=item *
-
-5.10.0 inadvertently disabled an optimisation, which caused a measurable
-performance drop in list assignment, such as is often used to assign
-function parameters from C<@_>. The optimisation has been re-instated, and
-the performance regression fixed.
-
-=item *
-
-Fixed memory leak on C<while (1) { map 1, 1 }> [RT #53038].
-
-=item *
-
-Some potential coredumps in PerlIO fixed [RT #57322,54828].
-
-=item *
-
-The debugger now works with lvalue subroutines.
-
-=item *
-
-The debugger's C<m> command was broken on modules that defined constants
-[RT #61222].
-
-=item *
-
-C<crypt> and string complement could return tainted values for untainted
-arguments [RT #59998].
-
-=item *
-
-The C<-i>I<.suffix> command-line switch now recreates the file using
-restricted permissions, before changing its mode to match the original
-file. This eliminates a potential race condition [RT #60904].
-
-=item *
-
-On some Unix systems, the value in C<$?> would not have the top bit set
-(C<$? & 128>) even if the child core dumped.
-
-=item *
-
-Under some circumstances, C<$^R> could incorrectly become undefined
-[RT #57042].
-
-=item *
-
-In the XS API, various hash functions, when passed a pre-computed hash where
-the key is UTF-8, might result in an incorrect lookup.
-
-=item *
-
-XS code including F<XSUB.h> before F<perl.h> gave a compile-time error
-[RT #57176].
-
-=item *
-
-C<< $object-E<gt>isa('Foo') >> would report false if the package C<Foo> didn't
-exist, even if the object's C<@ISA> contained C<Foo>.
-
-=item *
-
-Various bugs in the new-to 5.10.0 mro code, triggered by manipulating
-C<@ISA>, have been found and fixed.
-
-=item *
-
-Bitwise operations on references could crash the interpreter, e.g.
-C<$x=\$y; $x |= "foo"> [RT #54956].
-
-=item *
-
-Patterns including alternation might be sensitive to the internal UTF-8
-representation, e.g.
-
- my $byte = chr(192);
- my $utf8 = chr(192); utf8::upgrade($utf8);
- $utf8 =~ /$byte|X}/i; # failed in 5.10.0
-
-=item *
-
-Within UTF8-encoded Perl source files (i.e. where C<use utf8> is in
-effect), double-quoted literal strings could be corrupted where a C<\xNN>,
-C<\0NNN> or C<\N{}> is followed by a literal character with ordinal value
-greater than 255 [RT #59908].
-
-=item *
-
-C<B::Deparse> failed to correctly deparse various constructs:
-C<readpipe STRING> [RT #62428], C<CORE::require(STRING)> [RT #62488],
-C<sub foo(_)> [RT #62484].
-
-=item *
-
-Using C<setpgrp> with no arguments could corrupt the perl stack.
-
-=item *
-
-The block form of C<eval> is now specifically trappable by C<Safe> and
-C<ops>. Previously it was erroneously treated like string C<eval>.
-
-=item *
-
-In 5.10.0, the two characters C<[~> were sometimes parsed as the smart
-match operator (C<~~>) [RT #63854].
-
-=item *
-
-In 5.10.0, the C<*> quantifier in patterns was sometimes treated as
-C<{0,32767}> [RT #60034, #60464]. For example, this match would fail:
-
- ("ab" x 32768) =~ /^(ab)*$/
-
-=item *
-
-C<shmget> was limited to a 32 bit segment size on a 64 bit OS [RT #63924].
-
-=item *
-
-Using C<next> or C<last> to exit a C<given> block no longer produces a
-spurious warning like the following:
-
- Exiting given via last at foo.pl line 123
-
-=item *
-
-On Windows, C<'.\foo'> and C<'..\foo'> were treated differently than
-C<'./foo'> and C<'../foo'> by C<do> and C<require> [RT #63492].
-
-=item *
-
-Assigning a format to a glob could corrupt the format; e.g.:
-
- *bar=*foo{FORMAT}; # foo format now bad
-
-=item *
-
-Attempting to coerce a typeglob to a string or number could cause an
-assertion failure. The correct error message is now generated,
-C<Can't coerce GLOB to I<$type>>.
-
-=item *
-
-Under C<use filetest 'access'>, C<-x> was using the wrong access mode. This
-has been fixed [RT #49003].
-
-=item *
-
-C<length> on a tied scalar that returned a Unicode value would not be
-correct the first time. This has been fixed.
-
-=item *
-
-Using an array C<tie> inside in array C<tie> could SEGV. This has been
-fixed. [RT #51636]
-
-=item *
-
-A race condition inside C<PerlIOStdio_close()> has been identified and
-fixed. This used to cause various threading issues, including SEGVs.
-
-=item *
-
-In C<unpack>, the use of C<()> groups in scalar context was internally
-placing a list on the interpreter's stack, which manifested in various
-ways, including SEGVs. This is now fixed [RT #50256].
-
-=item *
-
-Magic was called twice in C<substr>, C<\&$x>, C<tie $x, $m> and C<chop>.
-These have all been fixed.
-
-=item *
-
-A 5.10.0 optimisation to clear the temporary stack within the implicit
-loop of C<s///ge> has been reverted, as it turned out to be the cause of
-obscure bugs in seemingly unrelated parts of the interpreter [commit
-ef0d4e17921ee3de].
-
-=item *
-
-The line numbers for warnings inside C<elsif> are now correct.
-
-=item *
-
-The C<..> operator now works correctly with ranges whose ends are at or
-close to the values of the smallest and largest integers.
-
-=item *
-
-C<binmode STDIN, ':raw'> could lead to segmentation faults on some platforms.
-This has been fixed [RT #54828].
-
-=item *
-
-An off-by-one error meant that C<index $str, ...> was effectively being
-executed as C<index "$str\0", ...>. This has been fixed [RT #53746].
-
-=item *
-
-Various leaks associated with named captures in regexes have been fixed
-[RT #57024].
-
-=item *
-
-A weak reference to a hash would leak. This was affecting C<DBI>
-[RT #56908].
-
-=item *
-
-Using (?|) in a regex could cause a segfault [RT #59734].
-
-=item *
-
-Use of a UTF-8 C<tr//> within a closure could cause a segfault [RT #61520].
-
-=item *
-
-Calling C<Perl_sv_chop()> or otherwise upgrading an SV could result in an
-unaligned 64-bit access on the SPARC architecture [RT #60574].
-
-=item *
-
-In the 5.10.0 release, C<inc_version_list> would incorrectly list
-C<5.10.*> after C<5.8.*>; this affected the C<@INC> search order
-[RT #67628].
-
-=item *
-
-In 5.10.0, C<pack "a*", $tainted_value> returned a non-tainted value
-[RT #52552].
-
-=item *
-
-In 5.10.0, C<printf> and C<sprintf> could produce the fatal error
-C<panic: utf8_mg_pos_cache_update> when printing UTF-8 strings
-[RT #62666].
-
-=item *
-
-In the 5.10.0 release, a dynamically created C<AUTOLOAD> method might be
-missed (method cache issue) [RT #60220,60232].
-
-=item *
-
-In the 5.10.0 release, a combination of C<use feature> and C<//ee> could
-cause a memory leak [RT #63110].
-
-=item *
-
-C<-C> on the shebang (C<#!>) line is once more permitted if it is also
-specified on the command line. C<-C> on the shebang line used to be a
-silent no-op I<if> it was not also on the command line, so perl 5.10.0
-disallowed it, which broke some scripts. Now perl checks whether it is
-also on the command line and only dies if it is not [RT #67880].
-
-=item *
-
-In 5.10.0, certain types of re-entrant regular expression could crash,
-or cause the following assertion failure [RT #60508]:
-
- Assertion rx->sublen >= (s - rx->subbeg) + i failed
-
-=item *
-
-Previously missing files from Unicode 5.1 Character Database are now included.
-
-=item *
-
-C<TMPDIR> is now honored when opening an anonymous temporary file
-
-=back
-
-=head1 New or Changed Diagnostics
-
-=over 4
-
-=item C<panic: sv_chop %s>
-
-This new fatal error occurs when the C routine C<Perl_sv_chop()> was
-passed a position that is not within the scalar's string buffer. This
-could be caused by buggy XS code, and at this point recovery is not
-possible.
-
-=item C<Can't locate package %s for the parents of %s>
-
-This warning has been removed. In general, it only got produced in
-conjunction with other warnings, and removing it allowed an ISA lookup
-optimisation to be added.
-
-=item C<v-string in use/require is non-portable>
-
-This warning has been removed.
-
-=item C<Deep recursion on subroutine "%s">
-
-It is now possible to change the depth threshold for this warning from the
-default of 100, by recompiling the F<perl> binary, setting the C
-pre-processor macro C<PERL_SUB_DEPTH_WARN> to the desired value.
-
-=back
-
-=head1 Changed Internals
-
-=over 4
-
-=item *
-
-TODO: C<SVt_RV> is gone. RVs are now stored in IVs
-
-=item *
-
-TODO: REGEXPs are first class
-
-=item *
-
-TODO: OOK is reworked, such that an OOKed scalar is PV not PVIV
-
-=item *
-
-The J.R.R. Tolkien quotes at the head of C source file have been checked and
-proper citations added, thanks to a patch from Tom Christiansen.
-
-=item *
-
-C<Perl_vcroak()> now accepts a null first argument. In addition, a full audit
-was made of the "not NULL" compiler annotations, and those for several
-other internal functions were corrected.
-
-=item *
-
-New macros C<dSAVEDERRNO>, C<dSAVE_ERRNO>, C<SAVE_ERRNO>, C<RESTORE_ERRNO>
-have been added to formalise the temporary saving of the C<errno>
-variable.
-
-=item *
-
-The function C<Perl_sv_insert_flags> has been added to augment
-C<Perl_sv_insert>.
-
-=item *
-
-The function C<Perl_newSV_type(type)> has been added, equivalent to
-C<Perl_newSV()> followed by C<Perl_sv_upgrade(type)>.
-
-=item *
-
-The function C<Perl_newSVpvn_flags()> has been added, equivalent to
-C<Perl_newSVpvn()> and then performing the action relevant to the flag.
-
-Two flag bits are currently supported.
-
-=over 4
-
-=item C<SVf_UTF8>
-
-This will call C<SvUTF8_on()> for you. (Note that this does not convert an
-sequence of ISO 8859-1 characters to UTF-8). A wrapper, C<newSVpvn_utf8()>
-is available for this.
-
-=item C<SVs_TEMP>
-
-Call C<Perl_sv_2mortal()> on the new SV.
-
-=back
-
-There is also a wrapper that takes constant strings, C<newSVpvs_flags()>.
-
-=item *
-
-The function C<Perl_croak_xs_usage> has been added as a wrapper to
-C<Perl_croak>.
-
-=item *
-
-The functions C<PerlIO_find_layer> and C<PerlIO_list_alloc> are now
-exported.
-
-=item *
-
-C<PL_na> has been exterminated from the core code, replaced by local STRLEN
-temporaries, or C<*_nolen()> calls. Either approach is faster than C<PL_na>,
-which is a pointer deference into the interpreter structure under ithreads,
-and a global variable otherwise.
-
-=item *
-
-C<Perl_mg_free()> used to leave freed memory accessible via C<SvMAGIC()> on
-the scalar. It now updates the linked list to remove each piece of magic
-as it is freed.
-
-=item *
-
-Under ithreads, the regex in C<PL_reg_curpm> is now reference counted. This
-eliminates a lot of hackish workarounds to cope with it not being reference
-counted.
-
-=item *
-
-C<Perl_mg_magical()> would sometimes incorrectly turn on C<SvRMAGICAL()>.
-This has been fixed.
-
-=item *
-
-The I<public> IV and NV flags are now not set if the string value has
-trailing "garbage". This behaviour is consistent with not setting the
-public IV or NV flags if the value is out of range for the type.
-
-=item *
-
-SV allocation tracing has been added to the diagnostics enabled by C<-Dm>.
-The tracing can alternatively output via the C<PERL_MEM_LOG> mechanism, if
-that was enabled when the F<perl> binary was compiled.
-
-=item *
-
-Smartmatch resolution tracing has been added as a new diagnostic. Use C<-DM> to
-enable it.
-
-
-=item *
-
-A new debugging flag C<-DB> now dumps subroutine definitions, leaving
-C<-Dx> for its original purpose of dumping syntax trees.
-
-=item *
-
-Uses of C<Nullav>, C<Nullcv>, C<Nullhv>, C<Nullop>, C<Nullsv> etc have been
-replaced by C<NULL> in the core code, and non-dual-life modules, as C<NULL>
-is clearer to those unfamiliar with the core code.
-
-=item *
-
-A macro C<MUTABLE_PTR(p)> has been added, which on (non-pedantic) gcc will
-not cast away C<const>, returning a C<void *>. Macros C<MUTABLE_SV(av)>,
-C<MUTABLE_SV(cv)> etc build on this, casting to C<AV *> etc without
-casting away C<const>. This allows proper compile-time auditing of
-C<const> correctness in the core, and helped picked up some errors (now
-fixed).
-
-=item *
-
-Macros C<mPUSHs()> and C<mXPUSHs()> have been added, for pushing SVs on the
-stack and mortalizing them.
-
-=item *
-
-Use of the private structure C<mro_meta> has changed slightly. Nothing
-outside the core should be accessing this directly anyway.
-
-=item *
-
-A new tool, F<Porting/expand-macro.pl> has been added, that allows you
-to view how a C preprocessor macro would be expanded when compiled.
-This is handy when trying to decode the macro hell that is the perl
-guts.
-
-=back
-
-=head1 New Tests
-
-Many modules updated from CPAN incorporate new tests.
-
-Several tests that have the potential to hang forever if they fail now
-incorporate a "watchdog" functionality that will kill them after a timeout,
-which helps ensure that C<make test> and C<make test_harness> run to
-completion automatically. (Jerry Hedden).
-
-Some core-specific tests have been added:
-
-=over 4
-
-=item t/comp/retainedlines.t
-
-Check that the debugger can retain source lines from C<eval>.
-
-=item t/io/perlio_fail.t
-
-Check that bad layers fail.
-
-=item t/io/perlio_leaks.t
-
-Check that PerlIO layers are not leaking.
-
-=item t/io/perlio_open.t
-
-Check that certain special forms of open work.
-
-=item t/io/perlio.t
-
-General PerlIO tests.
-
-=item t/io/pvbm.t
-
-Check that there is no unexpected interaction between the internal types
-C<PVBM> and C<PVGV>.
-
-=item t/mro/package_aliases.t
-
-Check that mro works properly in the presence of aliased packages.
-
-=item t/op/dbm.t
-
-Tests for C<dbmopen> and C<dbmclose>.
-
-=item t/op/index_thr.t
-
-Tests for the interaction of C<index> and threads.
-
-=item t/op/pat_thr.t
-
-Tests for the interaction of esoteric patterns and threads.
-
-=item t/op/qr_gc.t
-
-Test that C<qr> doesn't leak.
-
-=item t/op/reg_email_thr.t
-
-Tests for the interaction of regex recursion and threads.
-
-=item t/op/regexp_qr_embed_thr.t
-
-Tests for the interaction of patterns with embedded C<qr//> and threads.
-
-=item t/op/regexp_unicode_prop.t
-
-Tests for Unicode properties in regular expressions.
-
-=item t/op/regexp_unicode_prop_thr.t
-
-Tests for the interaction of Unicode properties and threads.
-
-=item t/op/reg_nc_tie.t
-
-Test the tied methods of C<Tie::Hash::NamedCapture>.
-
-=item t/op/reg_posixcc.t
-
-Check that POSIX character classes behave consistently.
-
-=item t/op/re.t
-
-Check that exportable C<re> functions in F<universal.c> work.
-
-=item t/op/setpgrpstack.t
-
-Check that C<setpgrp> works.
-
-=item t/op/substr_thr.t
-
-Tests for the interaction of C<substr> and threads.
-
-=item t/op/upgrade.t
-
-Check that upgrading and assigning scalars works.
-
-=item t/uni/lex_utf8.t
-
-Check that Unicode in the lexer works.
-
-=item t/uni/tie.t
-
-Check that Unicode and C<tie> work.
-
-=back
-
-=head1 Known Problems
-
-This is a list of some significant unfixed bugs, which are regressions
-from either 5.10.0 or 5.8.x.
-
-=over 4
-
-=item *
-
-C<List::Util::first> misbehaves in the presence of a lexical C<$_>
-(typically introduced by C<my $_> or implicitly by C<given>). The variable
-which gets set for each iteration is the package variable C<$_>, not the
-lexical C<$_> [RT #67694].
-
-A similar issue may occur in other modules that provide functions which
-take a block as their first argument, like
-
- foo { ... $_ ...} list
-
-=item *
-
-The C<charnames> pragma may generate a run-time error when a regex is
-interpolated [RT #56444]:
-
- use charnames ':full';
- my $r1 = qr/\N{THAI CHARACTER SARA I}/;
- "foo" =~ $r1; # okay
- "foo" =~ /$r1+/; # runtime error
-
-A workaround is to generate the character outside of the regex:
-
- my $a = "\N{THAI CHARACTER SARA I}";
- my $r1 = qr/$a/;
-
-=item *
-
-Some regexes may run much more slowly when run in a child thread compared
-with the thread the pattern was compiled into [RT #55600].
-
-=back
-
-=head1 Deprecations
-
-The following items are now deprecated.
-
-=over 4
-
-=item *
-
-C<Switch> is buggy and should be avoided. From perl 5.11.0 onwards, it is
-intended that any use of the core version of this module will emit a
-warning, and that the module will eventually be removed from the core
-(probably in perl 5.14.0). See L<perlsyn/"Switch statements"> for its
-replacement.
-
-=item *
-
-The following modules will be removed from the core distribution in a future
-release, and should be installed from CPAN instead. Distributions on CPAN
-which require these should add them to their prerequisites. The core versions
-of these modules warnings will issue a deprecation warning.
-
-=over
-
-=item *
-
-C<Class::ISA>
-
-=item *
-
-C<Pod::Plainer>
-
-=item *
-
-C<Shell>
-
-=back
-
-Currently support to install from CPAN without a I<force> is C<TODO> in CPAN
-and CPANPLUS. This will be addressed before 5.12.0 ships.
-
-=item *
-
-C<suidperl> has been removed. It used to provide a mechanism to
-emulate setuid permission bits on systems that don't support it properly.
-
-=item *
-
-Deprecate assignment to $[
-
-=item *
-
-Remove attrs, which has been deprecated since 1999/10/02.
-
-=item *
-
-Deprecate use of the attribute :locked on subroutines.
-
-=item *
-
-Deprecate using "locked" with the attributes pragma.
-
-=item *
-
-Deprecate using "unique" with the attributes pragma.
-
-=item *
-
-warn if ++ or -- are unable to change the value because it's beyond the limit of representation
-
-This uses a new warnings category: "imprecision".
-
-=item *
-
-Make lc/uc/lcfirst/ucfirst warn when passed undef.
-
-=item *
-
-Show constant in "Useless use of a constant in void context"
-
-=item *
-
-Make the new warning report undef constants as undef
-
-=item *
-
-Add a new warning, "Prototype after '%s'"
-
-=item *
-
-Tweak the "Illegal character in prototype" warning so it's more precise when reporting illegal characters after _
-
-=item *
-
-Unintended interpolation of $\ in regex
-
-=item *
-
-Make overflow warnings in gmtime/localtime only occur when warnings are on
-
-=item *
-
-Improve mro merging error messages.
-
-They are now very similar to those produced by Algorithm::C3.
-
-=item *
-
-Amelioration of the error message "Unrecognized character %s in column %d"
-
-Changes the error message to "Unrecognized character %s; marked by E<lt>--
-HERE after %sE<lt>-- HERE near column %d". This should make it a little
-simpler to spot and correct the suspicious character.
-
-=item *
-
-Explicitly point to $. when it causes an uninitialized warning for ranges in scalar context
-
-
-=item *
-
-Deprecated numerous Perl 4-era libraries:
-
-F<termcap.pl>, F<tainted.pl>, F<stat.pl>, F<shellwords.pl>, F<pwd.pl>,
-F<open3.pl>, F<open2.pl>, F<newgetopt.pl>, F<look.pl>, F<find.pl>,
-F<finddepth.pl>, F<importenv.pl>, F<hostname.pl>, F<getopts.pl>,
-F<getopt.pl>, F<getcwd.pl>, F<flush.pl>, F<fastcwd.pl>, F<exceptions.pl>,
-F<ctime.pl>, F<complete.pl>, F<cacheout.pl>, F<bigrat.pl>, F<bigint.pl>,
-F<bigfloat.pl>, F<assert.pl>, F<abbrev.pl>, F<dotsh.pl>, and
-F<timelocal.pl> are all now deprecated. Using them will incur a warning.
-
-=back
-
-=head1 Acknowledgements
-
-Some of the work in this release was funded by a TPF grant funded by
-Dijkmat BV, The Netherlands.
-
-Steffen Mueller and David Golden in particular helped getting CPAN modules
-polished and synchronised with their in-core equivalents.
-
-Craig Berry was tireless in getting maint to run under VMS, no matter how
-many times we broke it for him.
-
-The other core committers contributed most of the changes, and applied most
-of the patches sent in by the hundreds of contributors listed in F<AUTHORS>.
-
-Much of the work of categorizing changes in this perldelta file was contributed
-by the following porters using changelogger.bestpractical.com:
-
-Nicholas Clark, leon, shawn, alexm, rjbs, rafl, Pedro Melo, brunorc,
-anonymous, ☄, Tom Hukins, anonymous, Jesse, dagolden, Moritz Onken,
-Mark Fowler, chorny, anonymous, tmtm
-
-Finally, thanks to Larry Wall, without whom none of this would be
-necessary.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
-
-
Deleted: vendor/perl/dist/pod/perl5111delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5111delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5111delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,365 +0,0 @@
-=head1 NAME
-
-perl5111delta - what is new for perl v5.11.1
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.11.0 release and
-the 5.11.1 release.
-
-=head1 Incompatible Changes
-
-=over
-
-=item *
-
-The boolkeys op moved to the group of hash ops. This breaks binary compatibility.
-
-=item *
-
-C<\s> C<\w> and C<\d> once again have the semantics they had in Perl 5.8.x.
-
-
-=back
-
-=head1 Core Enhancements
-
-=head2 Add C<package NAME VERSION> syntax
-
-This new syntax allows a module author to set the $VERSION of a namespace
-when the namespace is declared with 'package'. It eliminates the need
-for C<our $VERSION = ...> and similar constructs. E.g.
-
- package Foo::Bar 1.23;
- # $Foo::Bar::VERSION == 1.23
-
-There are several advantages to this:
-
-=over
-
-=item *
-
-C<$VERSION> is parsed in I<exactly> the same way as C<use NAME VERSION>
-
-=item *
-
-C<$VERSION> is set at compile time
-
-=item *
-
-Eliminates C<$VERSION = ...> and C<eval $VERSION> clutter
-
-=item *
-
-As it requires VERSION to be a numeric literal or v-string
-literal, it can be statically parsed by toolchain modules
-without C<eval> the way MM-E<gt>parse_version does for C<$VERSION = ...>
-
-=item *
-
-Alpha versions with underscores do not need to be quoted; static
-parsing will preserve the underscore, but during compilation, Perl
-will remove underscores as it does for all numeric literals
-
-It does not break old code with only C<package NAME>, but code that uses
-C<package NAME VERSION> will need to be restricted to perl 5.11.X or newer
-This is analogous to the change to C<open> from two-args to three-args.
-Users requiring the latest Perl will benefit, and perhaps N years from
-now it will become standard practice when Perl 5.12 is targeted the way
-that 5.6 is today.
-
-=back
-
-=head1 Modules and Pragmata
-
-=head2 Updated Modules
-
-=over 4
-
-=item *
-
-Upgrade to Test-Simple 0.94
-
-=item *
-
-Upgrade to Storable 2.21
-
-=item *
-
-Upgrade to Pod-Simple 3.08
-
-=item *
-
-Upgrade to Parse-CPAN-Meta 1.40
-
-=item *
-
-Upgrade to ExtUtils-Manifest 1.57
-
-=item *
-
-Upgrade to ExtUtils-CBuilder 0.260301
-
-=item *
-
-Upgrade to CGI.pm-3.48
-
-=item *
-
-Upgrade CPANPLUS to CPAN version 0.89_02
-
-=item *
-
-Upgrade to threads::shared 1.32
-
-=item *
-
-Upgrade ExtUtils::ParseXS to 2.21
-
-=item *
-
-Upgrade File::Path to 2.08 (and add taint.t test)
-
-=item *
-
-Upgrade Module::CoreList to 2.20
-
-=item *
-
-Updated Object::Accessor to0.36
-
-=back
-
-=head1 New Documentation
-
-=over 4
-
-=item *
-
-L<perlpolicy> extends the "Social contract about contributed modules" into
-the beginnings of a document on Perl porting policies.
-
-=back
-
-=head1 Changes to Existing Documentation
-
-=over
-
-=item Documentation for C<$1> in perlvar.pod clarified
-
-=back
-
-=head1 Performance Enhancements
-
-=over 4
-
-=item C<if (%foo)> has been optimized to be faster than C<if (keys %foo)>
-
-=back
-
-=head1 Platform Specific Notes
-
-=over 4
-
-=item Darwin (Mac OS X)
-
-=over 4
-
-=item *
-
-Skip testing the be_BY.CP1131 locale on Darwin 10 (Mac OS X 10.6),
-as it's still buggy.
-
-=item *
-
-Correct infelicities in the regexp used to identify buggy locales
-on Darwin 8 and 9 (Mac OS X 10.4 and 10.5, respectively).
-
-=back
-
-=item DragonFly BSD
-
-=over 4
-
-=item *
-
-Fix thread library selection [perl #69686]
-
-=back
-
-=item Win32
-
-=over 4
-
-=item *
-
-Initial support for mingw64 is now available
-
-=item *
-
-Various bits of Perl's build infrastructure are no longer converted to win32 line endings at release time. If this hurts you, please speak up.
-
-=back
-
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-Perl now properly returns a syntax error instead of segfaulting
-if C<each>, C<keys> or C<values> is used without an argument
-
-=item *
-
-C<tell()> now fails properly if called without an argument and when no previous file was read
-
-C<tell()> now returns C<-1>, and sets errno to C<EBADF>, thus restoring the 5.8.x behaviour
-
-=item *
-
-overload no longer implicitly unsets fallback on repeated 'use overload' lines
-
-=item *
-
-POSIX::strftime() can now handle Unicode characters in the format string.
-
-=item *
-
-The Windows select() implementation now supports all empty C<fd_set>s more correctly.
-
-=back
-
-=head1 New or Changed Diagnostics
-
-=over 4
-
-
-=item *
-
-The 'syntax' category was removed from 5 warnings that should only be in 'deprecated'.
-
-=item *
-
-Three fatal pack/unpack error messages have been normalized to "panic: %s"
-
-=item *
-
-"Unicode character is illegal" has been rephrased to be more accurate
-
-It now reads C<Unicode non-character is illegal in interchange> and the
-perldiag documentation has been expanded a bit.
-
-=item *
-
-Perl now defaults to issuing a warning if a deprecated language feature is used.
-
-To disable this feature in a given lexical scope, you should use C<no
-warnings 'deprecated';> For information about which language features
-are deprecated and explanations of various deprecation warnings, please
-see L<perldiag>
-
-=back
-
-=head1 Testing
-
-=over 4
-
-=item *
-
-Significant cleanups to core tests to ensure that language and
-interpreter features are not used before they're tested.
-
-=item *
-
-C<make test_porting> now runs a number of important pre-commit checks which might be of use to anyone working on the Perl core.
-
-=item *
-
-F<t/porting/podcheck.t> automatically checks the well-formedness of
-POD found in all .pl, .pm and .pod files in the F<MANIFEST>, other than in
-dual-lifed modules which are primarily maintained outside the Perl core.
-
-=item *
-
-F<t/porting/manifest.t> now tests that all files listed in MANIFEST are present.
-
-=back
-
-=head1 Known Problems
-
-=over 4
-
-=item Untriaged test crashes on Windows 2000
-
-Several porters have reported mysterious crashes when Perl's entire test suite is run after a build on certain Windows 2000 systems. When run by hand, the individual tests reportedly work fine.
-
-=item Known test failures on VMS
-
-Perl 5.11.1 fails a small set of core and CPAN tests as of this release.
-With luck, that'll be sorted out for 5.11.2
-
-=back
-
-=head1 Errata for 5.11.0
-
-=over
-
-=item The Perl 5.11.0 release notes incorrectly described 'delete local'
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.11.1 represents approximately 3 weeks development since Perl 5.11.0
-contains 22,000 lines of changes across 396 files from 26 authors and committers:
-
-Abigail, Alex Vandiver, brian d foy, Chris Williams, Craig A. Berry,
-David Fifield, David Golden, demerphq, Eric Brine, Geoffrey T. Dairiki,
-George Greer, H.Merijn Brand, Jan Dubois, Jerry D. Hedden, Jesse Vincent,
-Josh ben Jore, Max Maischein, Nicholas Clark, Rafael Garcia-Suarez,
-Simon Schubert, Sisyphus, Smylers, Steve Hay, Steve Peters, Vincent Pit
-and Yves Orton.
-
-Many of the changes included in this version originated in the CPAN
-modules included in Perl's core. We're grateful to the entire CPAN
-community for helping Perl to flourish.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5112delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5112delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5112delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,348 +0,0 @@
-=head1 NAME
-
-perl5112delta - what is new for perl v5.11.2
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.11.1 release and the
-5.11.2 release.
-
-=head1 Core Enhancements
-
-=head2 qr overloading
-
-It is now possible to overload the C<qr//> operator, that is,
-conversion to regexp, like it was already possible to overload
-conversion to boolean, string or number of objects. It is invoked when
-an object appears on the right hand side of the C<=~> operator, or when
-it is interpolated into a regexp. See L<overload>.
-
-=head2 Pluggable keywords
-
-Extension modules can now cleanly hook into the Perl parser to define
-new kinds of keyword-headed expression and compound statement. The
-syntax following the keyword is defined entirely by the extension. This
-allow a completely non-Perl sublanguage to be parsed inline, with the
-right ops cleanly generated. This feature is currently considered
-experimental.
-
-See L<perlapi/PL_keyword_plugin> for the mechanism. The Perl core
-source distribution also includes a new module
-L<XS::APItest::KeywordRPN>, which implements reverse Polish notation
-arithmetic via pluggable keywords. This module is mainly used for test
-purposes, and is not normally installed, but also serves as an example
-of how to use the new mechanism.
-
-=head2 APIs for more internals
-
-The lowest layers of the lexer and parts of the pad system now have C
-APIs available to XS extensions. These are necessary to support proper
-use of pluggable keywords, but have other uses too. The new APIs are
-experimental, and only cover a small proportion of what would be
-necessary to take full advantage of the core's facilities in these
-areas. It is intended that the Perl 5.13 development cycle will see the
-addition of a full range of clean, supported interfaces.
-
-=head2 Overridable function lookup
-
-Where an extension module hooks the creation of rv2cv ops to modify the
-subroutine lookup process, this now works correctly for bareword
-subroutine calls. This means that prototypes on subroutines referenced
-this way will be processed correctly. (Previously bareword subroutine
-names were initially looked up, for parsing purposes, by an unhookable
-mechanism, so extensions could only properly influence subroutine names
-that appeared with an C<&> sigil.)
-
-=head1 Modules and Pragmata
-
-=head2 New Modules and Pragmata
-
-=over 4
-
-=item C<legacy>
-
-Preserves legacy behaviors or enable new non-default behaviors.
-Currently the only behaviour concerns semantics for the 128 characters
-on ASCII systems that have the 8th bit set.
-
-=back
-
-=head2 Pragmata Changes
-
-=over 4
-
-=item C<diagnostics>
-
-Supports %.0f formatting internally.
-
-=item C<overload>
-
-Allow overloading of 'qr'.
-
-=back
-
-=head2 Updated Modules
-
-=over 4
-
-=item C<B::Concise>
-
-Optimize reversing an array in-place, avoid using defined %hash in core
-code and tests.
-
-=item C<B::Deparse>
-
-Teach B::Deparse about in-place reverse.
-
-=item C<Carp>
-
-Refine Carp caller() fix and add tests.
-
-=item C<Compress::Zlib>
-
-Updated to 2.022.
-
-=item C<CPANPLUS>
-
-Updated to 0.89_09.
-
-=item C<Encode>
-
-Updated to 2.38.
-
-=item C<ExtUtils::CBuilder>
-
-Updated to 0.27.
-
-=item C<Env>
-
-Add EXISTS and DELETE methods to Env.pm.
-
-=item C<File::Fetch>
-
-Updated to 0.22.
-
-=item C<I8N::Langinfo>
-
-Correctly document export of I18N::Langinfo.
-
-=item C<I8N::LangTags>
-
-In I18N::LangTags::Detect, avoid using defined @array and defined
-%hash.
-
-=item C<IO::Compress>
-
-Updated to 2.022.
-
-=item C<IPC::Cmd>
-
-Updated to 0.54.
-
-=item C<List::Util>
-
-Updated to 1.22.
-
-=item C<Locale::Maketext>
-
-In Locale::Maketext, avoid using defined @array and defined %hash.
-Convert the odd Locale::Maketext test out from Test to Test::More.
-
-=item C<Module::Build>
-
-Updated to 0.35_08.
-
-=item C<Module::CoreList>
-
-Implemented is_deprecated().
-
-=item C<Pod::Simple>
-
-Updated to 3.10.
-
-=item C<Scalar::Util>
-
-Updated to 1.22.
-
-=item C<Switch>
-
-Updated to 2.16.
-
-=back
-
-=head1 Utility Changes
-
-=over 4
-
-=item F<a2p>
-
-Fixed bugs with the match() operator in list context, remove mention of
-$[.
-
-=back
-
-=head1 Performance Enhancements
-
-=over 4
-
-=item *
-
-Reversing an array to itself (as in C<@a = reverse @a>) in void context
-now happens in-place and is several orders of magnitude faster than it
-used to be. It will also preserve non-existent elements whenever
-possible, i.e. for non magical arrays or tied arrays with C<EXISTS> and
-C<DELETE> methods.
-
-=back
-
-=head1 New or Changed Diagnostics
-
-Several new diagnostics, see L<perldiag> for details.
-
-=over 4
-
-=item C<Bad plugin affecting keyword '%s'>
-
-=item C<gmtime(%.0f) too large>
-
-=item C<Lexing code attempted to stuff non-Latin-1 character into Latin-1 input>
-
-=item C<Lexing code internal error (%s)>
-
-=item C<localtime(%.0f) too large>
-
-=item C<Overloaded dereference did not return a reference>
-
-=item C<Overloaded qr did not return a REGEXP>
-
-=item C<Perl_pmflag() is deprecated, and will be removed from the XS API>
-
-=back
-
-One diagnostic has been removed:
-
-=over 4
-
-=item C<Runaway format>
-
-=back
-
-=head1 Changed Internals
-
-=over 4
-
-=item *
-
-C<Perl_pmflag> has been removed from the public API. Calling it now
-generates a deprecation warning, and it will be removed in a future
-release. Although listed as part of the API, it was never documented,
-and only ever used in F<toke.c>, and prior to 5.10, F<regcomp.c>. In
-core, it has been replaced by a static function.
-
-=back
-
-=head1 New Tests
-
-=over 4
-
-=item F<t/op/while_readdir.t>
-
-Test that a bare readdir in while loop sets $_.
-
-=back
-
-=head1 Known Problems
-
-=over 4
-
-=item Known test failures on VMS
-
-Perl 5.11.2 fails a small set of core and CPAN tests as of this
-release. With luck, that'll be sorted out for 5.11.3.
-
-=back
-
-=head1 Deprecations
-
-The following items are now deprecated.
-
-=head2 Use of C<:=> to mean an empty attribute list is now deprecated.
-
-An accident of Perl's parser meant that these constructions were all
-equivalent:
-
- my $pi := 4;
- my $pi : = 4;
- my $pi : = 4;
-
-with the C<:> being treated as the start of an attribute list, which
-ends before the C<=>. As whitespace is not significant here, all are
-parsed as an empty attribute list, hence all the above are equivalent
-to, and better written as
-
- my $pi = 4;
-
-because no attribute processing is done for an empty list.
-
-As is, this meant that C<:=> cannot be used as a new token, without
-silently changing the meaning of existing code. Hence that particular
-form is now deprecated, and will become a syntax error. If it is
-absolutely necessary to have empty attribute lists (for example,
-because of a code generator) then avoid the warning by adding a space
-before the C<=>.
-
-=head1 Acknowledgements
-
-Perl 5.11.2 represents approximately 3 weeks development since Perl
-5.11.1 and contains 29,992 lines of changes across 458 files from 38
-authors and committers:
-
-Abhijit Menon-Sen, Abigail, Ben Morrow, Bo Borgerson, Brad Gilbert,
-Bram, Chris Williams, Craig A. Berry, Daniel Frederick Crisman, Dave
-Rolsky, David E. Wheeler, David Golden, Eric Brine, Father
-Chrysostomos, Frank Wiegand, Gerard Goossen, Gisle Aas, Graham Barr,
-Harmen, H.Merijn Brand, Jan Dubois, Jerry D. Hedden, Jesse Vincent,
-Karl Williamson, Kevin Ryde, Leon Brocard, Nicholas Clark, Paul
-Marquess, Philippe Bruhat, Rafael Garcia-Suarez, Sisyphus, Steffen
-Mueller, Steve Hay, Steve Peters, Vincent Pit, Yuval Kogman, Yves
-Orton, and Zefram.
-
-Many of the changes included in this version originated in the CPAN
-modules included in Perl's core. We're grateful to the entire CPAN
-community for helping Perl to flourish.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl bug
-database at http://rt.perl.org/perlbug/ . There may also be information
-at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down to a
-tiny but sufficient test case. Your bug report, along with the output
-of C<perl -V>, will be sent off to perlbug at perl.org to be analysed by
-the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please
-send it to perl5-security-report at perl.org. This points to a closed
-subscription unarchived mailing list, which includes all the core
-committers, who be able to help assess the impact of issues, figure out
-a resolution, and help co-ordinate the release of patches to mitigate
-or fix the problem across all platforms on which Perl is supported.
-Please only use this address for security issues in the Perl core, not
-for modules independently distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive
-details on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5113delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5113delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5113delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,558 +0,0 @@
-=head1 NAME
-
-perl5113delta - what is new for perl v5.11.3
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.11.2 release and
-the 5.11.3 release.
-
-If you are upgrading from an earlier release such as 5.11.1, first read
-the L<perl5112delta>, which describes differences between 5.11.1 and
-5.11.2
-
-=head1 Incompatible Changes
-
-=head2 Filehandles are blessed directly into C<IO::Handle>, as C<FileHandle> is merely a wrapper around C<IO::Handle>.
-
-The previous behaviour was to bless Filehandles into L<FileHandle>
-(an empty proxy class) if it was loaded into memory and otherwise
-to bless them into C<IO::Handle>.
-
-=head1 Core Enhancements
-
-=head2 Unicode version
-
-Perl is shipped with the latest Unicode version, 5.2, dated October 2009. See
-L<http://www.unicode.org/versions/Unicode5.2.0> for details about this release
-of Unicode. See L<perlunicode> for instructions on installing and using
-older versions of Unicode.
-
-=head2 Unicode properties
-
-Perl can now handle every Unicode character property. A new pod,
-L<perluniprops>, lists all available non-Unihan character properties. By
-default the Unihan properties and certain others (deprecated and Unicode
-internal-only ones) are not exposed. See below for more details on
-these; there is also a section in the pod listing them, and why they are
-not exposed.
-
-Perl now fully supports the Unicode compound-style of using C<=> and C<:>
-in writing regular expressions: C<\p{property=value}> and
-C<\p{property:value}> (both of which mean the same thing).
-
-Perl now fully supports the Unicode loose matching rules for text
-between the braces in C<\p{...}> constructs. In addition, Perl also allows
-underscores between digits of numbers.
-
-All the Unicode-defined synonyms for properties and property values are
-now accepted.
-
-C<qr/\X/>, which matches a Unicode logical character, has been expanded to work
-better with various Asian languages. It now is defined as an C<extended
-grapheme cluster>. (See L<http://www.unicode.org/reports/tr29/>).
-Anything matched previously that made sense will continue to be matched. But
-in addition:
-
-=over
-
-=item *
-
-C<\X> will now not break apart a C<S<CR LF>> sequence.
-
-=item *
-
-C<\X> will now match a sequence including the C<ZWJ> and C<ZWNJ> characters.
-
-=item *
-
-C<\X> will now always match at least one character, including an initial mark.
-Marks generally come after a base character, but it is possible in Unicode to
-have them in isolation, and C<\X> will now handle that case, for example at the
-beginning of a line or after a C<ZWSP>. And this is the part where C<\X>
-doesn't match the things that it used to that don't make sense. Formerly, for
-example, you could have the nonsensical case of an accented LF.
-
-=item *
-
-C<\X> will now match a (Korean) Hangul syllable sequence, and the Thai and Lao
-exception cases.
-
-=back
-
-Otherwise, this change should be transparent for the non-affected languages.
-
-C<\p{...}> matches using the Canonical_Combining_Class property were
-completely broken in previous Perls. This is now fixed.
-
-In previous Perls, the Unicode C<Decomposition_Type=Compat> property and a
-Perl extension had the same name, which led to neither matching all the
-correct values (with more than 100 mistakes in one, and several thousand
-in the other). The Perl extension has now been renamed to be
-C<Decomposition_Type=Noncanonical> (short: C<dt=noncanon>). It has the same
-meaning as was previously intended, namely the union of all the
-non-canonical Decomposition types, with Unicode C<Compat> being just one of
-those.
-
-C<\p{Uppercase}> and C<\p{Lowercase}> have been brought into line with the
-Unicode definitions. This means they each match a few more characters
-than previously.
-
-C<\p{Cntrl}> now matches the same characters as C<\p{Control}>. This means it
-no longer will match Private Use (gc=co), Surrogates (gc=cs), nor Format
-(gc=cf) code points. The Format code points represent the biggest
-possible problem. All but 36 of them are either officially deprecated
-or strongly discouraged from being used. Of those 36, likely the most
-widely used are the soft hyphen (U+00AD), and BOM, ZWSP, ZWNJ, WJ, and
-similar, plus Bi-directional controls.
-
-C<\p{Alpha}> now matches the same characters as C<\p{Alphabetic}>. The Perl
-definition included a number of things that aren't really alpha (all
-marks), while omitting many that were. As a direct consequence, the
-definitions of C<\p{Alnum}> and C<\p{Word}> which depend on Alpha also change.
-
-C<\p{Word}> also now doesn't match certain characters it wasn't supposed
-to, such as fractions.
-
-C<\p{Print}> no longer matches the line control characters: Tab, LF, CR,
-FF, VT, and NEL. This brings it in line with the documentation.
-
-C<\p{Decomposition_Type=Canonical}> now includes the Hangul syllables.
-
-The Numeric type property has been extended to include the Unihan
-characters.
-
-There is a new Perl extension, the 'Present_In', or simply 'In',
-property. This is an extension of the Unicode Age property, but
-C<\p{In=5.0}> matches any code point whose usage has been determined
-I<as of> Unicode version 5.0. The C<\p{Age=5.0}> only matches code points
-added in I<precisely> version 5.0.
-
-A number of properties did not have the correct values for unassigned
-code points. This is now fixed. The affected properties are
-Bidi_Class, East_Asian_Width, Joining_Type, Decomposition_Type,
-Hangul_Syllable_Type, Numeric_Type, and Line_Break.
-
-The Default_Ignorable_Code_Point, ID_Continue, and ID_Start properties
-have been updated to their current Unicode definitions.
-
-Certain properties that are supposed to be Unicode internal-only were
-erroneously exposed by previous Perls. Use of these in regular
-expressions will now generate, if enabled, a deprecated warning message.
-The properties are: Other_Alphabetic, Other_Default_Ignorable_Code_Point,
-Other_Grapheme_Extend, Other_ID_Continue, Other_ID_Start, Other_Lowercase,
-Other_Math, and Other_Uppercase.
-
-An installation can now fairly easily change which Unicode properties
-Perl understands. As mentioned above, certain properties are by default
-turned off. These include all the Unihan properties (which should be
-accessible via the CPAN module Unicode::Unihan) and any deprecated or
-Unicode internal-only property that Perl has never exposed.
-
-The generated files in the C<lib/unicore/To> directory are now more
-clearly marked as being stable, directly usable by applications.
-New hash entries in them give the format of the normal entries,
-which allows for easier machine parsing. Perl can generate files
-in this directory for any property, though most are suppressed. An
-installation can choose to change which get written. Instructions
-are in L<perluniprops>.
-
-=head2 Regular Expressions
-
-U+0FFFF is now a legal character in regular expressions.
-
-=head1 Modules and Pragmata
-
-=head2 Pragmata Changes
-
-=over 4
-
-=item C<constant>
-
-Upgraded from version 1.19 to 1.20.
-
-=item C<diagnostics>
-
-This pragma no longer suppresses C<Use of uninitialized value in range (or flip)> warnings. [perl #71204]
-
-=item C<feature>
-
-Upgraded from 1.13 to 1.14. Added the C<unicode_strings> feature:
-
- use feature "unicode_strings";
-
-This pragma turns on Unicode semantics for the case-changing operations
-(uc/lc/ucfirst/lcfirst) on strings that don't have the internal UTF-8 flag set,
-but that contain single-byte characters between 128 and 255.
-
-=item C<legacy>
-
-The experimental C<legacy> pragma, introduced in 5.11.2, has been removed,
-and its functionality replaced by the new feature pragma, C<use feature
-"unicode_strings">.
-
-=item C<threads>
-
-Upgraded from version 1.74 to 1.75.
-
-=item C<warnings>
-
-Upgraded from 1.07 to 1.08. Added new C<warnings::fatal_enabled()> function.
-
-=back
-
-=head2 Updated Modules
-
-=over 4
-
-=item C<Archive::Extract>
-
-Upgraded from version 0.34 to 0.36.
-
-=item C<CPAN>
-
-Upgraded from version 1.94_51 to 1.94_5301, which is 1.94_53 on CPAN
-plus some local fixes for bleadperl.
-
-Includes better bzip2 support, improved FirstTime experience with
-auto-selection of CPAN mirrors, proper handling of modules removed from the
-Perl core, and an updated 'cpan' utility script
-
-=item C<CPANPLUS>
-
-Upgraded from version 0.89_09 to 0.90.
-
-=item C<Encode>
-
-Upgraded from version 2.38 to 2.39.
-
-=item C<ExtUtils::MakeMaker>
-
-Upgraded from version 6.55_02 to 6.56. Adds new BUILD_REQUIRES key to
-indicate build-only prerequisites. Also adds support for
-mingw64 and the new "package NAME VERSION" syntax.
-
-=item C<File::Path>
-
-Upgraded from version 2.08 to 2.08_01.
-
-=item C<Module::Build>
-
-Upgraded from version 0.35_09 to 0.36. Compared to 0.35, this version has a
-new 'installdeps' action, supports the PERL_MB_OPT environment variable, adds a
-'share_dir' property for L<File::ShareDir> support, support the "package NAME
-VERSION" syntax and has many other enhancements and bug fixes. The
-'passthrough' style of Module::Build::Compat has been deprecated.
-
-=item C<Module::CoreList>
-
-Upgraded from version 2.23 to 2.24.
-
-=item C<POSIX>
-
-Upgraded from version 1.18 to 1.19. Error codes for C<getaddrinfo()> and
-C<getnameinfo()> are now available.
-
-=item C<Pod::Simple>
-
-Upgraded from version 3.10 to 3.13.
-
-=item C<Safe>
-
-Upgraded from version 2.19 to 2.20.
-
-=back
-
-=head1 Utility Changes
-
-=over 4
-
-=item F<perlbug>
-
-No longer reports "Message sent" when it hasn't actually sent the message
-
-=back
-
-=head1 Changes to Existing Documentation
-
-The Pod specification (L<perlpodspec>) has been updated to bring the
-specification in line with modern usage already supported by most Pod systems.
-A parameter string may now follow the format name in a "begin/end" region.
-Links to URIs with a text description are now allowed. The usage of
-C<LE<lt>"section"E<gt>> has been marked as deprecated.
-
-L<if.pm|if> has been documented in L<perlfunc/use> as a means to get
-conditional loading of modules despite the implicit BEGIN block around C<use>.
-
-
-
-=head1 Installation and Configuration Improvements
-
-=head2 Testing improvements
-
-=over 4
-
-=item It's now possible to override C<PERL5OPT> and friends in F<t/TEST>
-
-=back
-
-=head2 Platform Specific Changes
-
-=over 4
-
-=item Win32
-
-=over 4
-
-=item *
-
-Always add a manifest resource to C<perl.exe> to specify the C<trustInfo>
-settings for Windows Vista and later. Without this setting Windows
-will treat C<perl.exe> as a legacy application and apply various
-heuristics like redirecting access to protected file system areas
-(like the "Program Files" folder) to the users "VirtualStore"
-instead of generating a proper "permission denied" error.
-
-For VC8 and VC9 this manifest setting is automatically generated by
-the compiler/linker (together with the binding information for their
-respective runtime libraries); for all other compilers we need to
-embed the manifest resource explicitly in the external resource file.
-
-This change also requests the Microsoft Common-Controls version 6.0
-(themed controls introduced in Windows XP) via the dependency list
-in the assembly manifest. For VC8 and VC9 this is specified using the
-C</manifestdependency> linker commandline option instead.
-
-=back
-
-=item cygwin
-
-=over 4
-
-=item Enable IPv6 support on cygwin 1.7 and newer
-
-=back
-
-=item OpenVMS
-
-=over 4
-
-=item Make -UDEBUGGING the default on VMS for 5.12.0.
-
-Like it has been everywhere else for ages and ages. Also make
-command-line selection of -UDEBUGGING and -DDEBUGGING work in
-configure.com; before the only way to turn it off was by saying
-no in answer to the interactive question.
-
-=back
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-Ensure that pp_qr returns a new regexp SV each time. Resolves RT #69852.
-
-Instead of returning a(nother) reference to the (pre-compiled) regexp in the
-optree, use reg_temp_copy() to create a copy of it, and return a reference to
-that. This resolves issues about Regexp::DESTROY not being called in a timely
-fashion (the original bug tracked by RT #69852), as well as bugs related to
-blessing regexps, and of assigning to regexps, as described in correspondence
-added to the ticket.
-
-It transpires that we also need to undo the SvPVX() sharing when ithreads
-cloning a Regexp SV, because mother_re is set to NULL, instead of a cloned
-copy of the mother_re. This change might fix bugs with regexps and threads in
-certain other situations, but as yet neither tests nor bug reports have
-indicated any problems, so it might not actually be an edge case that it's
-possible to reach.
-
-=item *
-
-Several compilation errors and segfaults when perl was built with C<-Dmad> were fixed.
-
-=item *
-
-Fixes for lexer API changes in 5.11.2 which broke NYTProf's savesrc option.
-
-=item *
-
-F<-t> should only return TRUE for file handles connected to a TTY
-
-The Microsoft C version of isatty() returns TRUE for all
-character mode devices, including the /dev/null style "nul"
-device and printers like "lpt1".
-
-=item *
-
-Fixed a regression caused by commit fafafbaf which caused a panic during
-parameter passing [perl #70171]
-
-=item *
-
-On systems which in-place edits without backup files, -i'*' now works as
-the documentation says it does [perl #70802]
-
-=item *
-
-Saving and restoring magic flags no longer loses readonly flag.
-
-=item *
-
-The malformed syntax C<grep EXPR LIST> (note the missing comma) no longer
-causes abrupt and total failure.
-
-=item *
-
-Regular expressions compiled with C<qr{}> literals properly set C<$'> when
-matching again.
-
-=item *
-
-Using named subroutines with C<sort> should no longer lead to bus errors [perl
-#71076]
-
-=item *
-
-Numerous bugfixes catch small issues caused by the recently-added Lexer API.
-
-=item *
-
-Smart match against C<@_> sometimes gave false negatives. [perl #71078]
-
-=item *
-
-C<$@> may now be assigned a read-only value (without error or busting the stack).
-
-=item *
-
-C<sort> called recursively from within an active comparison subroutine no
-longer causes a bus error if run multiple times. [perl #71076]
-
-=back
-
-=head1 New or Changed Diagnostics
-
-=over 4
-
-=item *
-
-C<split> now warns when called in void context
-
-=item *
-
-C<printf>-style functions called with too few arguments will now issue the
-warning C<"Missing argument in %s"> [perl #71000]
-
-=back
-
-=head1 New Tests
-
-Many modules updated from CPAN incorporate new tests.
-
-=over 4
-
-=item t/comp/final_line_num.t
-
-See if line numbers are correct at EOF
-
-=item t/comp/form_scope.t
-
-See if format scoping works
-
-=item t/comp/line_debug.t
-
-See if @{"_<$file"} works
-
-=item t/op/filetest_t.t
-
-See if -t file test works
-
-=item t/op/qr.t
-
-See if qr works
-
-=item t/op/utf8cache.t
-
-Tests malfunctions of utf8 cache
-
-=item t/re/uniprops.t
-
-Test unicode \p{} regex constructs
-
-=back
-
-=head1 Deprecations
-
-The following items are now deprecated.
-
-=over 4
-
-=item Use of "goto" to jump into a construct is deprecated
-
-Using C<goto> to jump from an outer scope into an inner
-scope is now deprecated. This rare use case was causing
-problems in the implementation of scopes.
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.11.3 represents approximately one month of development since
-Perl 5.11.2 and contains 61407 lines of changes across 396 files
-from 40 authors and committers:
-
-Abigail, Alex Davies, Alexandr Ciornii, Andrew Rodland, Andy
-Dougherty, Bram, brian d foy, Chip Salzenberg, Chris Williams, Craig
-A. Berry, Daniel Frederick Crisman, David Golden, Dennis Kaarsemaker,
-Eric Brine, Father Chrysostomos, Gene Sullivan, Gerard Goossen, H.
-Merijn Brand, Hugo van der Sanden, Jan Dubois, Jerry D. Hedden,
-Jesse Vincent, Jim Cromie, Karl Williamson, Leon Brocard, Max
-Maischein, Michael Breen, Moritz Lenz, Nicholas Clark, Rafael
-Garcia-Suarez, Reini Urban, Ricardo Signes, Stepan Kasal, Steve
-Hay, Steve Peters, Tim Bunce, Tony Cook, Vincent Pit and Zefram.
-
-Many of the changes included in this version originated in the CPAN
-modules included in Perl's core. We're grateful to the entire CPAN
-community for helping Perl to flourish.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
-
-
Deleted: vendor/perl/dist/pod/perl5114delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5114delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5114delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,278 +0,0 @@
-=head1 NAME
-
-perl5114delta - what is new for perl v5.11.4
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.11.3 release and
-the 5.11.4 release.
-
-If you are upgrading from an earlier release such as 5.11.2, first read
-L<perl5113delta>, which describes differences between 5.11.2 and
-5.11.3.
-
-=head1 Incompatible Changes
-
-=head2 Version number formats
-
-Acceptable version number formats have been formalized into "strict" and
-"lax" rules. C<package NAME VERSION> takes a strict version number. C<use
-NAME VERSION> takes a lax version number. C<UNIVERSAL::VERSION> and the
-L<version> object constructors take lax version numbers. Providing an
-invalid version will result in a fatal error.
-
-These formats will be documented fully in the L<version> module in a
-subsequent release of Perl 5.11. To a first approximation, a "strict"
-version number is a positive decimal number (integer or decimal-fraction)
-without exponentiation or else a dotted-decimal v-string with a leading 'v'
-character and at least three components. A "lax" version number allows
-v-strings with fewer than three components or without a leading 'v'. Under
-"lax" rules, both decimal and dotted-decimal versions may have a trailing
-"alpha" component separated by an underscore character after a fractional
-or dotted-decimal component.
-
-The L<version> module adds C<version::is_strict> and C<version::is_lax>
-functions to check a scalar against these rules.
-
-=head1 Core Enhancements
-
-=head2 Unicode properties
-
-C<\p{XDigit}> now matches the same characters as C<\p{Hex_Digit}>. This
-means that in addition to the characters it currently matches,
-C<[A-Fa-f0-9]>, it will also match their fullwidth equivalent forms, for
-example U+FF10: FULLWIDTH DIGIT ZERO.
-
-=head1 Modules and Pragmata
-
-=head2 Pragmata Changes
-
-=over 4
-
-=item C<less>
-
-Upgraded from version 0.02 to 0.03.
-
-This version introduces the C<stash_name> method to allow subclasses of less to
-pick where in %^H to store their stash.
-
-=item C<version>
-
-Upgraded from version 0.77 to 0.81.
-
-This version adds support for L</Version number formats> as described earlier
-in this document and in its own documentation.
-
-=item C<warnings>
-
-Upgraded from version 1.08 to 1.09.
-
-This version adds the C<illegalproto> warning category. See also L</New or
-Changed Diagnostics> for this change.
-
-=back
-
-=head2 Updated Modules
-
-=over 4
-
-=item C<Archive::Extract>
-
-Upgraded from version 0.36 to 0.38.
-
-=item C<B::Deparse>
-
-Upgraded from version 0.93 to 0.94.
-
-=item C<Compress::Raw::Bzip2>
-
-Upgraded from version 2.021 to 2.024.
-
-=item C<Compress::Raw::Zlib>
-
-Upgraded from version 2.021 to 2.024.
-
-=item C<CPAN>
-
-Upgraded from version 1.94_5301 to 1.94_54.
-
-=item C<File::Fetch>
-
-Upgraded from version 0.22 to 0.24.
-
-=item C<Module::Build>
-
-Upgraded from version 0.36 to 0.3603.
-
-=item C<Safe>
-
-Upgraded from version 2.20 to 2.21.
-
-Anonymous coderefs created in Safe containers no longer get bogus
-arguments passed to them, fixing RT #72068.
-
-=back
-
-=head2 Removed Modules and Pragmata
-
-=over 4
-
-=item C<Devel::DProf::V>
-
-Removed from the Perl core. Prior version was 'undef'.
-
-=back
-
-=head1 Changes to Existing Documentation
-
-A significant fraction of the core documentation has been updated to clarify
-the behavior of Perl's Unicode handling.
-
-Much of the remaining core documentation has been reviewed and edited
-for clarity, consistent use of language, and to fix the spelling of Tom
-Christiansen's name.
-
-=head2 Configuration improvements
-
-USE_ATTRIBUTES_FOR_PERLIO is now reported in the compile-time options
-listed by the C<-V> switch.
-
-=head2 Platform Specific Changes
-
-=over 4
-
-=item VMS
-
-The default pipe buffer size on VMS has been updated to 8192 on 64-bit
-systems.
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-Tie::Hash::NamedCapture::* shouldn't abort if passed bad input (RT #71828)
-
-=item *
-
- at _ and $_ no longer leak under threads (RT #34342 and #41138, also
-#70602, #70974)
-
-=back
-
-=head1 New or Changed Diagnostics
-
-=over 4
-
-=item New warning category C<illegalproto>
-
-The two warnings :
-
- Illegal character in prototype for %s : %s
- Prototype after '%c' for %s : %s
-
-have been moved from the C<syntax> top-level warnings category into a new
-first-level category, C<illegalproto>. These two warnings are currently the
-only ones emitted during parsing of an invalid/illegal prototype, so one
-can now do
-
- no warnings 'illegalproto';
-
-to suppress only those, but not other syntax-related warnings. Warnings where
-prototypes are changed, ignored, or not met are still in the C<prototype>
-category as before. (Matt S. Trout)
-
-=item lvalue attribute ignored after the subroutine has been defined
-
-This new warning is issued when one attempts to mark a subroutine as
-lvalue after it has been defined.
-
-=back
-
-=head1 Changed Internals
-
-=over 4
-
-=item *
-
-Perl_magic_setmglob now knows about globs, fixing RT #71254.
-
-=back
-
-=head1 Known Problems
-
-Perl 5.11.4 is a development release leading up to Perl 5.12.0.
-Some notable known problems found in 5.11.4 are listed as dependencies
-of RT #69710, the Perl 5 version 12 meta-ticket.
-
-=head1 Deprecations
-
-The following items are now deprecated.
-
-=over 4
-
-=item C<< UNIVERSAL-E<gt>import() >>
-
-The method C<< UNIVERSAL-E<gt>import() >> is now deprecated. Attempting to
-pass import arguments to a C<use UNIVERSAL> statement will result in a
-deprecation warning. (This is a less noisy version of the full deprecation
-warning added in 5.11.0.)
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.11.4 represents approximately one month of development since
-Perl 5.11.3 and contains 17682 lines of changes across 318 files
-from 40 authors and committers:
-
-Abigail, Andy Dougherty, brian d foy, Chris Williams, Craig A. Berry,
-David Golden, David Mitchell, Father Chrysostomos, Gerard Goossen,
-H.Merijn Brand, Jesse Vincent, Jim Cromie, Josh ben Jore, Karl
-Williamson, kmx, Matt S Trout, Nicholas Clark, Niko Tyni, Paul Marquess,
-Philip Hazel, Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo
-Signes, Shlomi Fish, Tim Bunce, Todd Rinaldo, Tom Christiansen, Tony
-Cook, Vincent Pit, and Zefram
-
-Many of the changes included in this version originated in the CPAN
-modules included in Perl's core. We're grateful to the entire CPAN
-community for helping Perl to flourish.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at L<http://rt.perl.org/perlbug/>. There may also be
-information at L<http://www.perl.org/>, the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analyzed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5115delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5115delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5115delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,327 +0,0 @@
-=head1 NAME
-
-perl5115delta - what is new for perl v5.11.5
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.11.4 release and
-the 5.11.5 release.
-
-If you are upgrading from an earlier release such as 5.11.3, first read
-L<perl5114delta>, which describes differences between 5.11.3 and
-5.11.4.
-
-=head1 Core Enhancements
-
-=head2 32-bit limit on substr arguments removed
-
-The 32-bit limit on C<substr> arguments has now been removed. The full range
-of the system's signed and unsigned integers is now available for the C<pos>
-and C<len> arguments.
-
-=head1 Modules and Pragmata
-
-=head2 Pragmata Changes
-
-=over 4
-
-=item C<version>
-
-Upgraded from version 0.81 to 0.82.
-
-The C<is_lax> and C<is_strict> functions can now be optionally exported to the
-caller's namespace and are also now documented.
-
-Undefined version objects are now uninitialized with zero rather than C<undef>.
-
-=back
-
-=head2 Updated Modules
-
-=over 4
-
-=item C<B::Debug>
-
-Upgraded from version 1.11 to 1.12.
-
-=item C<CPAN>
-
-Upgraded from version 1.94_53 to 1.94_56.
-
-This resolves RT #72362, in which CPAN was ignoring C<configure_requires>,
-and RT #72348, in which the command C<o conf init> in the CPAN shell could
-cause an exception to be thrown.
-
-This module is also now built in a less specialized way, which resolves a
-problem that caused C<make> after C<make clean> to fail, fixing RT #72218.
-
-=item C<CPANPLUS::Dist::Build>
-
-Upgraded from version 0.44 to 0.46.
-
-This makes the prereq resolving fall back to F<_build/> querying if the
-C<prereq_data> action fails.
-
-=item C<Pod::Perldoc>
-
-Upgraded from version 3.15_01 to 3.15_02.
-
-=item C<Pod::Plainer>
-
-Upgraded from version 1.01 to 1.02.
-
-=item C<Safe>
-
-Upgraded from version 2.21 to 2.22.
-
-This resolves RT #72700, in which an exception thrown from a closure was
-getting lost.
-
-=item C<Socket>
-
-Upgraded from version 1.85 to 1.86.
-
-This makes the new Socket implementation of C<inet_pton> consistent with the
-existing Socket6 implementation of C<inet_pton>, fixing RT #72884.
-
-=item C<podlators>
-
-Upgraded from version 2.2.2 to 2.3.1.
-
-=back
-
-=head1 Changes to Existing Documentation
-
-The syntax C<unless (EXPR) BLOCK else BLOCK> is now documented as valid, as
-is the syntax C<unless (EXPR) BLOCK elsif (EXPR) BLOCK ... else BLOCK>,
-although actually using the latter may not be the best idea for the
-readability of your source code.
-
-=head1 Installation and Configuration Improvements
-
-=head2 Configuration improvements
-
-Support for SystemTap's C<dtrace> compatibility layer has been added and an
-issue with linking C<miniperl> has been fixed in the process.
-
-C<less -R> is now used instead of C<less> for C<groff>'s new usage of ANSI
-escape codes by setting C<$Config{less}> (and thereby C<$Config{pager}>,
-which fixes RT #72156.
-
-USE_PERL_ATOF is now reported in the compile-time options listed by the C<-V>
-switch.
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-Arbitrary whitespace is now allowed between C<NAME> and C<VERSION> in
-C<package NAME VERSION;> statements. (Fixes RT #72432)
-
-=item *
-
-A panic caused by trying to load C<charnames> when the parser is already in
-error (e.g. by a missing C<my> under C<use strict;>) is now averted. This
-was a regression since Perl 5.10.0. (Fixes RT #72590)
-
-=item *
-
-Reading C<$!> no longer causes a SEGV for out of range C<errno> values. (Fixes
-RT #72850)
-
-=item *
-
-A possible SEGV in C</\N{...}/> has been fixed. This was a regression since
-Perl 5.10.
-
-=item *
-
-A possible SEGV when freeing a scalar that was upgraded to an C<SVt_REGEXP>
-type from a simple(r) scalar has been fixed.
-
-=item *
-
-A type conversion bug in C<gmtime64> that caused it to break around C<2**48>
-has been fixed.
-
-=item *
-
-Interpolating a regex that makes use of the C<charnames> pragma will no longer
-cause a run-time error. (Fixes RT #56444)
-
-=item *
-
-Array references assigned to C<*Foo::ISA> now have the necessary magic added
-to them to catch any further updates to the new C<@ISA>. (Fixes RT #72866)
-
-=item *
-
-Filehandles are now always blessed into C<IO::File>, which, together with
-some suitable manipulation of C<@IO::File::ISA>, fixes a breakage introduced
-in Perl 5.11.3 by a change that always blessed filehandles into C<IO::Handle>
-rather than checking for C<FileHandle> first.
-
-=item *
-
-A change in the behaviour of C<warnings::enabled> and C<warnings::warnif> in
-Perl 5.10.0 that wasn't documented at the time is now documented in
-L<perl5100delta>. (Fixes RT #62522)
-
-=item *
-
-RT #71504 is now fixed by simply skipping the tests that failed on OpenBSD
-with ithreads and perlio.
-
-=back
-
-=head1 New or Changed Diagnostics
-
-=over 4
-
-=item *
-
-The fatal error C<Malformed UTF-8 returned by \N> is now produced if the
-C<charnames> handler returns malformed UTF-8.
-
-=item *
-
-If an unresolved named character or sequence was encountered when compiling a
-regex pattern then the fatal error C<\\N{NAME} must be resolved by the lexer>
-is now produced. This can happen, for example, when using a single-quotish
-context like C<$re = '\N{SPACE}'; $re;>. See L<perldiag> for more examples of
-how the lexer can get bypassed.
-
-=item *
-
-The fatal error C<Invalid hexadecimal number in \\N{U+...}> will be produced
-if the character constant represented by C<...> is not a valid hexadecimal
-number.
-
-=item *
-
-The new meaning of C<\N> as C<[^\n]> is not valid in a bracketed character
-class, just like C<.> in a character class loses its special meaning, and will
-cause the fatal error C<\\N in a character class must be a named character:
-\\N{...}>.
-
-=item *
-
-The rules on what is legal for the C<...> in C<\N{...}> have been tightened
-up so that unless the C<...> begins with an alphabetic character and continues
-with a combination of alphanumerics, dashes, spaces, parentheses or colons
-then the warning C<Deprecated character(s) in \\N{...} starting at '%s'> is
-now issued.
-
-=item *
-
-The warning C<Using just the first characters returned by \N{}> will be
-issued if the C<charnames> handler returns a sequence of characters which
-exceeds the limit of the number of characters that can be used. The message
-will indicate which characters were used and which were discarded.
-
-=item *
-
-Currently, all but the first of the several characters that the C<charnames>
-handler may return are discarded when used in a regular expression pattern
-bracketed character class. If this happens then the warning C<Using just the
-first character returned by \N{} in character class> will be issued.
-
-=item *
-
-The warning C<Missing right brace on \\N{} or unescaped left brace after \\N.
-Assuming the latter> will be issued if Perl encounters a C<\N{> but doesn't
-find a matching C<}>. In this case Perl doesn't know if it was mistakenly
-omitted, or if "match non-newline" followed by "match a C<{>" was desired.
-It assumes the latter because that is actually a valid interpretation as
-written, unlike the other case. If you meant the former, you need to add the
-matching right brace. If you did mean the latter, you can silence this
-warning by writing instead C<\N\{>.
-
-=item *
-
-C<gmtime> and C<localtime> called with numbers smaller than they can reliably
-handle will now issue the warnings C<gmtime(%.0f) too small> and
-C<localtime(%.0f) too small>.
-
-=back
-
-=head1 New Tests
-
-=over 4
-
-=item F<t/op/filehandle.t>
-
-Tests some suitably portable filetest operators to check that they work as
-expected, particularly in the light of some internal changes made in how
-filehandles are blessed.
-
-=item F<t/op/time_loop.t>
-
-Tests that times greater than C<2**63>, which can now be handed to C<gmtime>
-and C<localtime>, do not cause an internal overflow or an excessively long
-loop.
-
-=back
-
-=head1 Known Problems
-
-Perl 5.11.5 is a development release leading up to Perl 5.12.0.
-Some notable known problems found in 5.11.5 are listed as dependencies
-of RT #69710, the Perl 5 version 12 meta-ticket.
-
-=head1 Acknowledgements
-
-Perl 5.11.5 represents approximately one month of development since
-Perl 5.11.4 and contains 9618 lines of changes across 151 files
-from 33 authors and committers:
-
-E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason, Abigail, brian d foy, Chris
-Williams, David Golden, David Mitchell, Eric Brine, Frank Wiegand, Gisle
-Aas, H.Merijn Brand, Jan Dubois, Jesse Vincent, Jim Cromie, John Peacock,
-Josh ben Jore, Karl Williamson, Marcus Holland-Moritz, Michael G Schwern,
-Nicholas Clark, Offer Kaye, Philippe Bruhat (BooK), Rafael Garcia-Suarez,
-Reini Urban, Ricardo Signes, Robin Barker, Slaven Rezic, Steffen Mueller,
-Steve Hay, Steve Peters, Tim Bunce, Todd Rinaldo, Tony Cook and
-Vincent Pit.
-
-Many of the changes included in this version originated in the CPAN
-modules included in Perl's core. We're grateful to the entire CPAN
-community for helping Perl to flourish.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analyzed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5130delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5130delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5130delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,133 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl5130delta - what is new for perl v5.13.0
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.12.0 release and the
-5.13.0 release.
-
-If you are upgrading from an earlier release such as 5.10.0, first read
-L<perl5120delta>, which describes differences between 5.10.0 and
-5.12.0.
-
-=head1 Core Enhancements
-
-=head2 "safe signals" optimization
-
-Signal dispatch has been moved from the runloop into control ops. This
-should give a few percent speed increase, and eliminates almost all of
-the speed penalty caused by the introduction of "safe signals" in
-5.8.0. Signals should still be dispatched within the same statement as
-they were previously - if this is not the case, or it is possible to
-create uninterruptible loops, this is a bug, and reports are encouraged
-of how to recreate such issues.
-
-=head2 Assignment to C<$0> sets the legacy process name with C<prctl()> on Linux
-
-On Linux the legacy process name will be set with L<prctl(2)>, in
-addition to altering the POSIX name via C<argv[0]> as perl has done
-since version 4.000. Now system utilities that read the legacy process
-name such as ps, top and killall will recognize the name you set when
-assigning to C<$0>. The string you supply will be cut off at 16 bytes,
-this is a limitation imposed by Linux.
-
-=head2 Optimization of shift; and pop; calls without arguments
-
-Additional two OPs are not added anymore into op tree for shift and pop
-calls without argument (when it works on C<@_>). Makes C<shift;> 5%
-faster over C<shift @_;> on not threaded perl and 25% faster on threaded.
-
-=head1 Modules and Pragmata
-
-=head2 Updated Modules
-
-=over 4
-
-=item CGI
-
-Updated to version 3.49.
-
-=item Data::Dumper
-
-Updated to version 2.126.
-
-=item MIME::Base64
-
-Updated to 3.09.
-
-=item threads
-
-Updated to version 1.77
-
-=item threads-shared
-
-Updated to version 1.33
-
-=back
-
-=head1 Installation and Configuration Improvements
-
-=head2 Platform Specific Changes
-
-=over 4
-
-=item AIX
-
-Allow building on AIX 4.2.
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.13.0 represents eight days of development since Perl 5.12.0 and
-contains 3,766 lines of changes across 151 files from 29 authors and
-committers.
-
-Thank you to the following for contributing to this release:
-
-Ævar Arnfjörð Bjarmason, Alex Vandiver, Chris Williams, chromatic,
-Craig A. Berry, David Golden, David Mitchell, Eric Brine, Father
-Chrysostomos, Florian Ragwitz, Frank Wiegand, Gisle Aas, H.Merijn
-Brand, Hugo van der Sanden, Jesse Vincent, Josh ben Jore, Karl
-Williamson, Leon Brocard, Michael G Schwern, Michael G. Schwern, Nga
-Tang Chan, Nicholas Clark, Niko Tyni, Rafael Garcia-Suarez, Ricardo
-Signes, Robin Barker, Slaven Rezic, Steffen Mueller, Zefram.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl bug
-database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down to a
-tiny but sufficient test case. Your bug report, along with the output
-of C<perl -V>, will be sent off to perlbug at perl.org to be analysed by
-the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please
-send it to perl5-security-report at perl.org. This points to a closed
-subscription unarchived mailing list, which includes all the core
-committers, who be able to help assess the impact of issues, figure out
-a resolution, and help co-ordinate the release of patches to mitigate
-or fix the problem across all platforms on which Perl is supported.
-Please only use this address for security issues in the Perl core, not
-for modules independently distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive
-details on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl51310delta.pod
===================================================================
--- vendor/perl/dist/pod/perl51310delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl51310delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,814 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl51310delta - what is new for perl v5.13.10
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.13.9 release and
-the 5.13.10 release.
-
-If you are upgrading from an earlier release such as 5.13.8, first read
-L<perl5139delta>, which describes differences between 5.13.8 and
-5.13.9.
-
-=head1 Core Enhancements
-
-=head2 The new regular expression modifiers available in suffix form
-
-Various releases of the 5.13.x series have added new regular expression
-modifiers, C</a>, C</d>, C</l>, and C</u>. They were only available in
-infix form (e.g., C<(?a:...)>) until this release; now they are usable
-in suffix form. This change was made too late to change all the
-affected documentation, so there are a number of places that erroneously
-say these must be used in infix form.
-
-However, there is an ambiguity with the construct, C<s/foo/bar/le...>. Due
-to backward compatibility constraints, in Perl 5.14 only, it will be
-resolved as C<s/foo/bar/ le...>, that is, as meaning to take the result
-of the substitution, and see if it is stringwise less-than-or-equal-to
-what follows. In Perl 5.16 and later, it will instead be resolved as
-meaning to do the pattern match using the rules of the current locale,
-and evaluate the rhs as an expression when doing the substitution. In
-5.14, if you want the latter interpretation, you can write "el" instead.
-
-=head2 Add C<\p{Titlecase}> as a synonym for C<\p{Title}>
-
-This synonym is added for symmetry with the Unicode property names
-C<\p{Uppercase}> and C<\p{Lowercase}>.
-
-=head2 New regular expression modifier option C</aa>
-
-Doubling the C</a> regular expression modifier increases its effect,
-so that in case-insensitive matching, no ASCII character will match a
-non-ASCII character. For example, normally,
-
- 'k' =~ /\N{KELVIN SIGN}/i
-
-will match; it won't under C</aa>.
-
-=head2 New warnings categories for problematic (non-)Unicode code points.
-
-Three new warnings subcategories of <utf8> have been added. These
-allow you to turn off warnings for their covered events, while allowing
-the other UTF-8 warnings to remain on. The three categories are:
-C<surrogate> when UTF-16 surrogates are encountered;
-C<nonchar> when Unicode non-character code points are encountered;
-and C<non_unicode> when code points that are above the legal Unicode
-maximum of 0x10FFFF are encountered.
-
-=head1 Incompatible Changes
-
-=head2 Most C<\p{}> properties are now immune from case-insensitive matching
-
-For most Unicode properties, it doesn't make sense to have them match
-differently under C</i> case-insensitive matching than not. And doing
-so leads to unexpected results and potential security holes. For
-example
-
- m/\p{ASCII_Hex_Digit}+/i
-
-could previously match non-ASCII characters because of the Unicode
-matching rules. There were a number of bugs in this feature until an
-earlier release in the 5.13 series. Now this release reverts, and
-removes the feature completely except for the few properties where
-people have come to expect it, namely the ones where casing is an
-integral part of their functionality, such as C<m/\p{Uppercase}/i> and
-C<m/\p{Lowercase}/i>, both of which match the exact same code points,
-namely those matched by C<m/\p{Cased}/i>. Details are in
-L<perlrecharclass/Unicode Properties>.
-
-User-defined property handlers that need to match differently under
-C</i> must change to read the new boolean parameter passed it which is
-non-zero if case-insensitive matching is in effect; 0 if not. See
-L<perluniprops/User-Defined Character Properties>.
-
-=head2 regex: \p{} in pattern implies Unicode semantics
-
-Now, a Unicode property match specified in the pattern will indicate
-that the pattern is meant for matching according to Unicode rules
-(e40e74f)
-
-=head2 add GvCV_set() and GvGP_set() macros and change GvGP()
-
-This allows a future commit to eliminate some backref magic between GV
-and CVs, which will require complete control over assignment to the
-gp_cv slot.
-
-If you've been using GvGP() in lvalue context this change will break
-your code, you should use GvGP_set() instead. (c43ae56)
-
-=head2 _swash_inversion_hash is no longer exported as part of the API
-
-This function shouldn't be called from XS code. (4c2e113)
-
-=head2 Unreferenced objects in global destruction
-
-The fix for [perl #36347], which made sure that destructors were called on
-unreferenced objects, broke the tests for three CPAN modules, which
-apparently rely on the bug.
-
-To provide more time for fixing them (as this is such a minor bug), we
-have reverted the fix until after perl 5.14.0.
-
-This resolves [perl #82542] and other related tickets.
-
-=head2 C<close> on shared pipes
-
-The C<close> function no longer waits for the child process to exit if the
-underlying file descriptor is still in use by another thread, to avoid
-deadlocks. It returns true in such cases.
-
-=head1 Deprecations
-
-=over
-
-=item Deprecated Modules
-
-The following modules will be removed from the core distribution in a
-future release, and should be installed from CPAN instead. Distributions
-on CPAN which require these should add them to their prerequisites. The
-core versions of these modules warnings will issue a deprecation warning.
-
-If you ship a packaged version of Perl, either alone or as part of a
-larger system, then you should carefully consider the repercussions of
-core module deprecations. You may want to consider shipping your default
-build of Perl with packages for some or all deprecated modules which
-install into C<vendor> or C<site> perl library directories. This will
-inhibit the deprecation warnings.
-
-Alternatively, you may want to consider patching F<lib/deprecate.pm>
-to provide deprecation warnings specific to your packaging system
-or distribution of Perl, consistent with how your packaging system
-or distribution manages a staged transition from a release where the
-installation of a single package provides the given functionality, to
-a later release where the system administrator needs to know to install
-multiple packages to get that same functionality.
-
-You can silence these deprecation warnings by installing the modules
-in question from CPAN. To install the latest version of all of them,
-just install C<Task::Deprecations::5_14>.
-
-=over
-
-=item L<Devel::DProf>
-
-We strongly recommend that you install and used L<Devel::NYTProf> in
-preference, as it offers significantly improved profiling and reporting.
-
-=back
-
-=back
-
-=head2 User-defined case-mapping
-
-This feature is being deprecated due to its many issues, as documented in
-L<perlunicode/User-Defined Case Mappings (for serious hackers only)>.
-It is planned to remove this feature in Perl 5.16. A CPAN module
-providing improved functionality is being prepared for release by the
-time 5.14 is.
-
-=head1 Modules and Pragmata
-
-=head2 New Modules and Pragmata
-
-=over 4
-
-=item *
-
-C<CPAN::Meta> version 2.110440 has been added as a dual-life module. It
-provides a standard library to read, interpret and write CPAN distribution
-metadata files (e.g. META.json and META.yml) which describes a
-distribution, its contents, and the requirements for building it and
-installing it. The latest CPAN distribution metadata specification is
-included as C<CPAN::Meta::Spec> and notes on changes in the specification
-over time are given in C<CPAN::Meta::History>.
-
-=item *
-
-C<Version::Requirements> version 0.101020 has been added as a dual-life
-module. It provides a standard library to model and manipulates module
-prerequisites and version constraints as defined in the L<CPAN::Meta::Spec>.
-
-=back
-
-=head2 Updated Modules and Pragmata
-
-=over 4
-
-=item *
-
-C<B> has been upgraded from version 1.27 to 1.28.
-
-=item *
-
-C<Carp> has been upgraded from version 1.19 to 1.20.
-
-[perl #82854] It now avoids using regular expressions that cause perl to
-load its Unicode tables, in order to avoid the 'BEGIN not safe after
-errors' error that will ensue if there has been a syntax error.
-
-=item *
-
-C<CGI> has been upgraded from version 3.51 to 3.52
-
-=item *
-
-C<CPAN> has been upgraded from version 1.94_64 to 1.94_65
-
-Includes support for META.json and MYMETA.json.
-
-=item *
-
-C<CPANPLUS> has been upgraded from version 0.9011 to 0.9101
-
-Includes support for META.json and MYMETA.json and a change to
-using Digest::SHA for CPAN checksums.
-
-=item *
-
-C<deprecate> has been upgraded from version 0.01 to 0.02.
-
-=item *
-
-C<diagnostics> has been upgraded from version 1.21 to 1.22.
-
-It now renders pod links slightly better, and has been taught to find
-descriptions for messages that share their descriptions with other
-messages.
-
-=item *
-
-C<Devel::DProf> has been upgraded from version 20080331.00 to 20110217.00.
-
-Merely loading C<Devel::DProf> now no longer triggers profiling to start.
-C<use Devel::DProf> and C<perl -d:DProf ...> still behave as before and start
-the profiler.
-
-NOTE: C<Devel::DProf> is deprecated and will be removed from a future
-version of Perl. We strongly recommend that you install and use
-L<Devel::NYTProf> instead, as it offers significantly improved
-profiling and reporting.
-
-=item *
-
-C<DynaLoader> has been upgraded from version 1.12 to 1.13.
-
-[perl #84358] It no longer inherits from AutoLoader; hence it no longer
-produces weird error messages for unsuccessful method calls on classes that
-inherit from DynaLoader.
-
-=item *
-
-C<IO::Select> has been upgraded from version 1.17 to 1.18.
-
-It now allows IO::Handle objects (and objects in derived classes) to be
-removed from an IO::Select set even if the underlying file descriptor is
-closed or invalid.
-
-=item *
-
-C<IPC::Cmd> has been upgraded from version 0.68 to 0.70
-
-=item *
-
-C<HTTP::Tiny> has been upgraded from version 0.009 to 0.010
-
-=item *
-
-C<Math::BigInt> has been upgraded from version 1.99_04 to 1.992.
-
-=item *
-
-C<Module::Build> has been upgraded from version 0.3607 to 0.37_05.
-
-A notable change is the deprecation of several modules.
-Module::Build::Version has been deprecated and Module::Build now relies
-directly upon L<version>. Module::Build::ModuleInfo has been deprecated in
-favor of a standalone copy of it called L<Module::Metadata>.
-Module::Build::YAML has been deprecated in favor of L<CPAN::Meta::YAML>.
-
-Module::Build now also generates META.json and MYMETA.json files
-in accordance with version 2 of the CPAN distribution metadata specification,
-L<CPAN::Meta::Spec>. The older format META.yml and MYMETA.yml files are
-still generated, as well.
-
-=item *
-
-C<Module::Load::Conditional> has been upgraded from version 0.40 to 0.44
-
-=item *
-
-C<Module::Metadata> has been upgraded from version 1.000003 to 1.000004.
-
-=item *
-
-C<overload> has been upgraded from version 1.12 to 1.13.
-
-The documentation has greatly improved. See L</Documentation> below.
-
-=item *
-
-C<Parse::CPAN::Meta> has been upgraded from version 1.40 to 1.4401.
-
-The latest Parse::CPAN::Meta can now read YAML or JSON files using
-L<CPAN::Meta::YAML> and L<JSON::PP>, which are now part of the Perl core.
-
-=item *
-
-C<re> has been upgraded from version 0.16 to 0.17.
-
-It now supports the double-a flag: C<use re '/aa';>
-
-The C<regmust> function used to crash when called on a regular expression
-belonging to a pluggable engine. Now it has been disabled for those.
-
-C<regmust> no longer leaks memory.
-
-=item *
-
-C<Term::UI> has been upgraded from version 0.24 to 0.26
-
-=item *
-
-C<Unicode::Collate> has been upgraded from version 0.68 to 0.72
-
-This also sees the switch from using the pure-perl version of this
-module to the XS version.`
-
-=item *
-
-C<VMS::DCLsym> has been upgraded from version 1.04 to 1.05.
-
-Two bugs have been fixed [perl #84086]:
-
-The symbol table name was lost when tying a hash, due to a thinko in
-C<TIEHASH>. The result was that all tied hashes interacted with the
-local symbol table.
-
-Unless a symbol table name had been explicitly specified in the call
-to the constructor, querying the special key ':LOCAL' failed to
-identify objects connected to the local symbol table.
-
-=item *
-
-Added new function C<Unicode::UCD::num()>. This function will return the
-numeric value of the string passed it; C<undef> if the string in its
-entirety has no safe numeric value.
-
-To be safe, a string must be a single character which has a numeric
-value, or consist entirely of characters that match \d, coming from the
-same Unicode block of digits. Thus, a mix of Bengali and Western
-digits would be considered unsafe, as well as a mix of half- and
-full-width digits, but strings consisting entirely of Devanagari digits
-or of "Mathematical Bold" digits would would be safe.
-
-=item *
-
-C<CPAN> has been upgraded from version 1.94_63 to 1.94_64.
-
-=back
-
-=head1 Documentation
-
-=head2 Changes to Existing Documentation
-
-=head3 L<overload>
-
-=over 4
-
-=item *
-
-L<overload>'s documentation has practically undergone a rewrite. It
-is now much more straightforward and clear.
-
-=back
-
-=head3 L<perlhack> and perlrepository
-
-=over 4
-
-=item *
-
-The L<perlhack> and perlrepository documents have been heavily edited and
-split up into several new documents.
-
-The L<perlhack> document is now much shorter, and focuses on the Perl 5
-development process and submitting patches to Perl. The technical content has
-been moved to several new documents, L<perlsource>, L<perlinterp>,
-L<perlhacktut>, and L<perlhacktips>. This technical content has only been
-lightly edited.
-
-The perlrepository document has been renamed to L<perlgit>. This new document
-is just a how-to on using git with the Perl source code. Any other content
-that used to be in perlrepository has been moved to perlhack.
-
-=back
-
-=head3 L<perlfunc>
-
-=over 4
-
-=item *
-
-The documentation for the C<map> function now contains more examples,
-see B<perldoc -f map> (f947627)
-
-=back
-
-=head3 L<perlfaq4>
-
-=over 4
-
-=item *
-
-Examples in L<perlfaq4> have been updated to show the use of
-L<Time::Piece>. (9243591)
-
-=back
-
-=head3 Miscellaneous
-
-=over 4
-
-=item *
-
-Many POD related RT bugs and other issues which are too numerous to
-enumerate have been solved by Michael Stevens.
-
-=back
-
-=head1 Diagnostics
-
-The following additions or changes have been made to diagnostic output,
-including warnings and fatal error messages. For the complete list of
-diagnostic messages, see L<perldiag>.
-
-=head2 New Diagnostics
-
-=over 4
-
-=item "\b{" is deprecated; use "\b\{" instead
-
-=item "\B{" is deprecated; use "\B\{" instead
-
-Use of an unescaped "{" immediately following a C<\b> or C<\B> is now
-deprecated so as to reserve its use for Perl itself in a future release.
-
-=item regcomp: Add warning if \p is used under locale. (fb2e24c)
-
-C<\p> implies Unicode matching rules, which are likely going to be
-different than the locale's.
-
-=item panic: gp_free failed to free glob pointer - something is repeatedly re-creating entries
-
-This new error is triggered if a destructor called on an object in a
-typeglob that is being freed creates a new typeglob entry containing an
-object with a destructor that creates a new entry containing an object....
-
-=item refcnt: fd %d%s
-
-This new error only occurs if a internal consistency check fails when a
-pipe is about to be closed.
-
-=back
-
-=head2 Changes to Existing Diagnostics
-
-=over 4
-
-=item *
-
-The warning message about regex unrecognized escapes passed through is
-changed to include any literal '{' following the 2-char escape. e.g.,
-"\q{" will include the { in the message as part of the escape
-(216bfc0).
-
-=item *
-
-C<binmode $fh, ':scalar'> no longer warns (8250589)
-
-Perl will now no longer produce this warning:
-
- $ perl -we 'open my $f, ">", \my $x; binmode $f, "scalar"'
- Use of uninitialized value in binmode at -e line 1.
-
-=back
-
-=head1 Utility Changes
-
-=head3 L<perlbug>
-
-=over 4
-
-=item *
-
-[perl #82996] Use the user's from address as return-path in perlbug
-
-Many systems these days don't have a valid Internet domain name and
-perlbug at perl.org does not accept email with a return-path that does
-not resolve. Therefore pass the user's address to sendmail so it's
-less likely to get stuck in a mail queue somewhere. (019cfd2)
-
-=back
-
-=head1 Configuration and Compilation
-
-=over 4
-
-=item *
-
-make reg_eval_scope.t TODOs consistently fail (daaf7ac)
-
-Some of the TODO tests in reg_eval_scope.t spuriously passed under
-non-threaded builds. Make the tests harder so they always fail.
-
-Since one of the key bugs in (?{..}) is the trashing of the parent pad,
-add some extra lexical vars to the parent scope and check they're still
-there at the end.
-
-=item *
-
-Stop EU::CBuilder's tests from failing in parallel (cbf59d5)
-
-It used to use the same paths for temporary files in all tests. This
-blew up randomly when the tests were run in parallel.
-
-=back
-
-=head1 Testing
-
-=over 4
-
-=item *
-
-F<porting/FindExt.t> now skips all tests on a static (-Uusedl) build
-of perl.
-
-=item *
-
-F<porting/FindExt.t> now passes on non-Win32 platforms when some
-extensions are built statically.
-
-=back
-
-=head1 Platform Support
-
-=head2 Platform-Specific Notes
-
-=over 4
-
-=item Windows
-
-=over 4
-
-=item *
-
-The C<test-prep> build target now depends on F<pod/perltoc.pod> to allow the
-F<t/porting/buildtoc.t> test to run successfully.
-
-=back
-
-=item MirBSD
-
-=over 4
-
-=item *
-
-[perl #82988] Skip hanging taint.t test on MirBSD 10 (1fb83d0)
-
-Skip a hanging test under MirBSD that was already being skipped under
-OpenBSD.
-
-=item *
-
-Previously if you build perl with a shared libperl.so on MirBSD (the
-default config), it will work up to the installation; however, once
-installed, it will be unable to find libperl. Treat path handling
-like in the other BSD dialects.
-
-=back
-
-=back
-
-=head1 Internal Changes
-
-=over 4
-
-=item *
-
-Fix harmless invalid read in Perl_re_compile() (f6d9469)
-
-[perl #2460] described a case where electric fence reported an invalid
-read. This could be reproduced under valgrind with blead and -e'/x/',
-but only on a non-debugging build.
-
-This was because it was checking for certain pairs of nodes (e.g. BOL + END)
-and wasn't allowing for EXACT nodes, which have the string at the next
-node position when using a naive NEXTOPER(first). In the non-debugging
-build, the nodes aren't initialised to zero, and a 1-char EXACT node isn't
-long enough to spill into the type field of the "next node".
-
-Fix this by only using NEXTOPER(first) when we know the first node is
-kosher.
-
-=item *
-
-Break out the generated function Perl_keywords() into F<keywords.c>, a new file. (26ea9e1)
-
-As it and Perl_yylex() both need FEATURE_IS_ENABLED, feature_is_enabled() is
-no longer static, and the two macro definitions move from toke.c to perl.h
-
-Previously, one had to cut and paste the output of perl_keywords.pl into the
-middle of toke.c, and it was not clear that it was generated code.
-
-=item *
-
-A lot of tests have been ported from Test to Test::More, e.g. in
-3842ad6.
-
-=item *
-
-Increase default PerlIO buffer size. (b83080d)
-
-The previous default size of a PerlIO buffer (4096 bytes) has been increased
-to the larger of 8192 bytes and your local BUFSIZ. Benchmarks show that doubling
-this decade-old default increases read and write performance in the neighborhood
-of 25% to 50% when using the default layers of perlio on top of unix. To choose
-a non-default size, such as to get back the old value or to obtain and even
-larger value, configure with:
-
- ./Configure -Accflags=-DPERLIOBUF_DEFAULT_BUFSIZ=N
-
-where N is the desired size in bytes; it should probably be a multiple of
-your page size.
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-A Unicode C<\p{}> property match in a regular expression pattern will
-now force Unicode rules for the rest of the regular expression
-
-=item *
-
-[perl #38456] binmode FH, ":crlf" only modifies top crlf layer (7826b36)
-
-When pushed on top of the stack, crlf will no longer enable crlf layers
-lower in the stack. This will prevent unexpected results.
-
-=item *
-
-Fix 'raw' layer for RT #80764 (ecfd064)
-
-Made a ':raw' open do what it advertises to do (first open the file,
-then binmode it), instead of leaving off the top layer.
-
-=item *
-
-Use PerlIOBase_open for pop, utf8 and bytes layers (c0888ac)
-
-Three of Perl's builtin PerlIO layers (C<:pop>, C<:utf8> and
-C<:bytes>) didn't allow stacking when opening a file. For example
-this:
-
- open FH, '>:pop:perlio', 'some.file' or die $!;
-
-Would throw an error: "Invalid argument". This has been fixed in this
-release.
-
-=item *
-
-An issue present since 5.13.1, where s/A/B/ with A utf8 and B
-non-utf8, could cause corruption or segfaults has been
-fixed. (c95ca9b)
-
-=item *
-
-String evals will no longer fail after 2 billion scopes have been
-compiled (d1bfb64, 2df5bdd, 0d311cd and 6012dc8)
-
-=item *
-
-[perl #81750] When strict 'refs' mode is off,
-C<%{...}> in rvalue context returns C<undef> if
-its argument is undefined. An optimisation introduced in perl 5.12.0 to
-make C<keys %{...}> faster when used as a boolean did not take this into
-account, causing C<keys %{+undef}> (and C<keys %$foo> when C<$foo> is
-undefined) to be an error, which it should only be in strict mode.
-
-=item *
-
-[perl #83194] Combining the vector (%v) flag and dynamic precision would
-cause sprintf to confuse the order of its arguments, making it treat the
-string as the precision and vice versa.
-
-=item *
-
-[perl #77692] Sometimes the UTF8 length cache would not be reset on a value
-returned by substr, causing C<length(substr($uni_string,...))> to give
-wrong answers. With C<${^UTF8CACHE}> set to -1, it would produce a 'panic'
-error message, too.
-
-=item *
-
-During the restoration of a localised typeglob on scope exit, any
-destructors called as a result would be able to see the typeglob in an
-inconsistent state, containing freed entries, which could result in a
-crash. This would affect code like this:
-
- local *@;
- eval { die bless [] }; # puts an object in $@
- sub DESTROY {
- local $@; # boom
- }
-
-Now the glob entries are cleared before any destructors are called. This
-also means that destructors can vivify entries in the glob. So perl tries
-again and, if the entries are re-created too many times, dies with a
-'panic: gp_free...' error message.
-
-=item *
-
-[perl #78494] When pipes are shared between threads, the C<close> function
-(and any implicit close, such as on thread exit) no longer blocks.
-
-=item *
-
-Several contexts no longer allow a Unicode character to begin a word
-that should never begin words, for an example an accent that must follow
-another character previously could precede all other characters.
-
-=item *
-
-Case insensitive matching in regular expressions compiled under C<use
-locale> now works much more sanely when the pattern and/or target string
-are encoded in UTF-8. Previously, under these conditions the localeness
-was completely lost. Now, code points above 255 are treated as Unicode,
-but code points between 0 and 255 are treated using the current locale
-rules, regardless of whether the pattern or string are encoded in UTF-8.
-The few case insensitive matches that cross the 255/256 boundary are not
-allowed. For example, 0xFF does not caselessly match the character at
-0x178, LATIN CAPITAL LETTER Y WITH DIAERESIS, because 0xFF may not be
-LATIN SMALL LETTER Y in the current locale, and Perl has no way of
-knowing if that character even exists in the locale, much less what code
-point it is.
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.13.10 represents approximately one month of development since
-Perl 5.13.9 and contains approximately 63000 lines of changes across
-609 files from 38 authors and committers:
-
-Abigail, Alexander Hartmaier, brian d foy, Charles Bailey, Chip
-Salzenberg, Chris 'BinGOs' Williams, Craig A. Berry, Curtis Jewell,
-Dave Rolsky, David Golden, David Leadbeater, David Mitchell, David
-Wheeler, Father Chrysostomos, Florian Ragwitz, Franz Fasching, George
-Greer, H.Merijn Brand, Hongwen Qiu, Hugo van der Sanden, Jay Hannah,
-Jesse Vincent, Karl Williamson, Larwan Berke, Leon Timmermans, Michael
-Breen, Michael Stevens, Nicholas Clark, Noirin Shirley, Paul Evans,
-Peter John Acklam, Ricardo Signes, Robin Barker, Steven Schubiger, Tom
-Christiansen, Tony Cook, Zsbán Ambrus and Ævar Arnfjörð Bjarmason
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the L<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl51311delta.pod
===================================================================
--- vendor/perl/dist/pod/perl51311delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl51311delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,513 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl51311delta - what is new for perl v5.13.11
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.13.10 release and
-the 5.13.11 release.
-
-If you are upgrading from an earlier release such as 5.13.9, first read
-L<perl5139delta>, which describes differences between 5.13.9 and
-5.13.10.
-
-=head1 Security
-
-=head2 User-defined regular expression properties
-
-Perl no longer allows a tainted regular expression to invoke a user-defined
-property via C<\p{...}> syntax. It simply dies instead [perl #82616].
-
-=head1 Incompatible Changes
-
-=head2 local($_) will strip all magic from $_
-
-local() on scalar variables will give them a new value, but keep all
-their magic intact. This has proven to be problematic for the default
-scalar variable $_, where L<perlsub> recommends that any subroutine
-that assigns to $_ should localize it first. This would throw an
-exception if $_ is aliased to a read-only variable, and could have
-various unintentional side-effects in general.
-
-Therefore, as an exception to the general rule, local($_) will not
-only assign a new value to $_, but also remove all existing magic from
-it as well.
-
-=head2 Passing references to warn()
-
-An earlier Perl 5.13.x release changed C<warn($ref)> to leave the reference
-unchanged, allowing C<$SIG{__WARN__}> handlers to access the original
-reference. But this stopped warnings that were references from having the
-file and line number appended even when there was no C<$SIG{__WARN__}>
-handler in place.
-
-Now C<warn> checks for the presence of such a handler and, if there is
-none, proceeds to stringify the reference and append the file and line
-number. This allows simple uses of C<warn> for debugging to continue to
-work as they did before.
-
-=head2 fork() emulation will not wait for signalled children
-
-On Windows parent processes would not terminate until all forked
-childred had terminated first. However, C<kill('KILL', ...)> is
-inherently unstable on pseudo-processes, and C<kill('TERM', ...)>
-might not get delivered if the child if blocked in a system call.
-
-To avoid the deadlock and still provide a safe mechanism to terminate
-the hosting process, Perl will now no longer wait for children that
-have been sent a SIGTERM signal. It is up to the parent process to
-waitpid() for these children if child clean-up processing must be
-allowed to finish. However, it is also the responsibility of the
-parent then to avoid the deadlock by making sure the child process
-can't be blocked on I/O either.
-
-See L<perlfork> for more information about the fork() emulation on
-Windows.
-
-=head2 Perl source code is read in text mode on Windows
-
-Perl scripts used to be read in binary mode on Windows for the benefit
-of the ByteLoader module (which is no longer part of core Perl). This
-had the side effect of breaking various operations on the DATA filehandle,
-including seek()/tell(), and even simply reading from DATA after file handles
-have been flushed by a call to system(), backticks, fork() etc.
-
-The default build options for Windows have been changed to read Perl source
-code on Windows in text mode now. Hopefully ByteLoader will be updated on
-CPAN to automatically handle this situation.
-
-=head1 Performance Enhancements
-
-=over 4
-
-=item *
-
-An earlier optimisation to speed up C<my @array = ...> and
-C<my %hash = ...> assignments caused a bug and was disabled in Perl 5.12.0.
-
-Now we have found another way to speed up these assignments [perl #82110].
-
-=back
-
-=head1 Modules and Pragmata
-
-=head2 Updated Modules and Pragmata
-
-=over 4
-
-=item *
-
-C<attributes> has been upgraded from version 0.13 to 0.14.
-
-=item *
-
-C<base> has been upgraded from version 2.15 to 2.16.
-
-=item *
-
-C<CPAN> has been upgraded from version 1.94_65 to 1.9600.
-
-=item *
-
-C<CPANPLUS> has been upgraded from version 0.9101 to 0.9103
-
-=item *
-
-C<CPANPLUS::Dist::Build> has been upgraded from version 0.52 to 0.54
-
-=item *
-
-C<Cwd> has been downgraded from version 3.37 to 3.36.
-
-An optimisation that recent core changes have rendered unnecessary has been
-reverted.
-
-=item *
-
-C<Devel::DProf> has been upgraded from version 20110225.01 to 20110228.00.
-
-=item *
-
-C<Digest::SHA> has been upgraded from version 5.50 to 5.61
-
-New SHA-512/224 and SHA-512/256 transforms ref. NIST Draft FIPS 180-4 (February 2011)
-
-=item *
-
-C<ExtUtils::Command> has been upgraded from version 1.16 to 1.17.
-
-=item *
-
-C<File::Copy> has been downgraded from version 2.22 to 2.21.
-
-An optimisation that recent core changes have rendered unnecessary has been
-reverted.
-
-=item *
-
-C<File::Glob> has been upgraded from version 1.11 to 1.12.
-
-=item *
-
-C<GDBM_File> has been upgraded from version 1.13 to 1.14.
-
-=item *
-
-C<Hash::Util> has been upgraded from version 0.10 to 0.11.
-
-=item *
-
-C<Hash::Util::FieldHash> has been upgraded from version 1.08 to 1.09.
-
-=item *
-
-C<HTTP::Tiny> has been upgraded from version 0.010 to 0.011.
-
-=item *
-
-C<I18N::Langinfo> has been upgraded from version 0.07 to 0.08.
-
-=item *
-
-C<IO> has been upgraded from version 1.25_03 to 1.25_04.
-
-=item *
-
-C<JSON::PP> has been upgraded from version 2.27103 to 2.27105
-
-=item *
-
-C<Locale::Codes> has been upgraded from version 3.15 to 3.16
-
-=item *
-
-C<Math::BigInt> has been upgraded from version 1.992 to 1.994
-
-=item *
-
-C<Math::BigInt::FastCalc> has been upgraded from version 0.24_02 to 0.28
-
-=item *
-
-C<Module::Build> has been upgraded from version 0.37_05 to 0.3800
-
-=item *
-
-C<Module::CoreList> has been upgraded from version 2.45 to 2.46.
-
-=item *
-
-C<mro> has been upgraded from version 1.06 to 1.07.
-
-=item *
-
-C<NDBM_File> has been upgraded from version 1.11 to 1.12.
-
-=item *
-
-C<parent> has been upgraded from version 0.224 to 0.225
-
-=item *
-
-C<Pod::Simple> has been upgraded from version 3.15 to 3.16
-
-=item *
-
-C<Storable> has been upgraded from version 2.26 to 2.27.
-
-=item *
-
-C<Sys::Hostname> has been upgraded from version 1.15 to 1.16.
-
-=item *
-
-C<Test::Harness> has been upgraded from version 3.22 to 3.23
-
-=item *
-
-C<Test::Simple> has been upgraded from version 0.97_01 to 0.98
-
-=item *
-
-C<Tie::Hash::NamedCapture> has been upgraded from version 0.07 to 0.08.
-
-Some of the Perl code has been converted to XS for efficency's sake.
-
-=item *
-
-C<Tie::RefHash> has been upgraded from version 1.38 to 1.39.
-
-=item *
-
-C<Unicode::Collate> has been upgraded from version 0.72 to 0.73
-
-DUCET has been updated for Unicode 6.0.0 as Collate/allkeys.txt and
-the default UCA_Version is 22.
-
-=item *
-
-C<Unicode::UCD> has been upgraded from version 0.31 to 0.32.
-This includes a number of bug fixes:
-
-=over 4
-
-=item charinfo()
-
-=over 4
-
-=item *
-
-It is now updated to Unicode Version 6 with Corrigendum #8, except,
-as with Perl 5.14, the code point at U+1F514 has no name.
-
-=item *
-
-The Hangul syllable code points have the correct names, and their
-decompositions are always output without requiring L<Lingua::KO::Hangul::Util>
-to be installed.
-
-=item *
-
-The CJK (Chinese-Japanese-Korean) code points U+2A700 - U+2B734
-and U+2B740 - 2B81D are now properly handled.
-
-=item *
-
-The numeric values are now output for those CJK code points that have them.
-
-=item *
-
-The names that are output for code points with multiple aliases are now the
-corrected ones.
-
-=back
-
-=item charscript()
-
-This now correctly returns "Unknown" instead of C<undef> for the script
-of a code point that hasn't been assigned another one.
-
-=item charblock()
-
-This now correctly returns "No_Block" instead of C<undef> for the block
-of a code point that hasn't been assigned to another one.
-
-=back
-
-=item *
-
-C<XS::Typemap> has been upgraded from version 0.04 to 0.05.
-
-=back
-
-=head1 Documentation
-
-=head2 Changes to Existing Documentation
-
-=head3 L<perlfunc>
-
-=over 4
-
-=item *
-
-Clarified the order in which to check C<$@> and C<$!> after C<do FILE>.
-(RT #80626)
-
-=back
-
-=head1 Diagnostics
-
-The following additions or changes have been made to diagnostic output,
-including warnings and fatal error messages. For the complete list of
-diagnostic messages, see L<perldiag>.
-
-=head2 New Diagnostics
-
-=over 4
-
-=item *
-
-Regexp modifier "/%c" may not appear twice
-
-(F syntax) The regular expression pattern had one of the mutually exclusive
-modifiers repeated. Remove all but one of the occurrences.
-
-=item *
-
-Regexp modifiers "/%c" and "/%c" are mutually exclusive
-
-(F syntax) The regular expression pattern had more than one of the mutually
-exclusive modifiers. Retain only the modifier that is supposed to be there.
-
-=item *
-
-Insecure user-defined property %s
-
-(F) Perl detected tainted data when trying to compile a regular
-expression that contains a call to a user-defined character property
-function, i.e. C<\p{IsFoo}> or C<\p{InFoo}>.
-See L<perlunicode/User-Defined Character Properties> and L<perlsec>.
-
-=back
-
-=head1 Testing
-
-Many of the tests have been refactored to use testing libraries more
-consistently. In some cases test files were created or deleted:
-
-=over 4
-
-=item *
-
-The tests for C<split /\s/> and Unicode have been moved from
-F<t/op/split.t> to the new F<t/op/split_unicode.t>.
-
-=item *
-
-F<t/re/re.t> has been moved to F<ext/re/t/re_funcs_u.t>.
-
-=item *
-
-The tests for [perl #72922] have been moved from F<t/re/qr.t> to the new
-F<t/re/qr-72922.t>.
-
-=item *
-
-F<t/re/reg_unsafe.t> has been deleted and its only test moved to
-F<t/re/pat_advanced.t>.
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-A fix for a bug in C<length(undef)> in 5.13.4 introduced a regression that
-meant C<print length undef> did not warn when warnings were enabled. It now
-correctly warns [perl #85508].
-
-=item *
-
-The C<(?|...)> regular expression construct no longer crashes if the final
-branch has more sets of capturing parentheses than any other branch. This
-was fixed in Perl 5.10.1 for the case of a single branch, but that fix did
-not take multiple branches into account [perl #84746].
-
-=item *
-
-Accessing an element of a package array with a hard-coded number (as
-opposed to an arbitrary expression) would crash if the array did not exist.
-Usually the array would be autovivified during compilation, but typeglob
-manipulation could remove it, as in these two cases which used to crash:
-
- *d = *a; print $d[0];
- undef *d; print $d[0];
-
-=item *
-
-C<#line> directives in string evals were not properly updating the arrays
-of lines of code (C<< @{"_<..."} >>) that the debugger (or any debugging or
-profiling module) uses. In threaded builds, they were not being updated at
-all. In non-threaded builds, the line number was ignored, so any change to
-the existing line number would cause the lines to be misnumbered
-[perl #79442].
-
-=item *
-
-C<$AUTOLOAD> used to remain tainted forever if it ever became tainted. Now
-it is correctly untainted if an autoloaded method is called and the method
-name was not tainted.
-
-=item *
-
-A bug has been fixed in the implementation of C<{...}> quantifiers in
-regular expressions that prevented the code block in
-C</((\w+)(?{ print $2 })){2}/> from seeing the C<$2> sometimes
-[perl #84294].
-
-=item *
-
-C<sprintf> now dies when passed a tainted scalar for the format. It did
-already die for arbitrary expressions, but not for simple scalars
-[perl #82250].
-
-=item *
-
-DESTROY methods of objects implementing ties are no longer able to crash by
-accessing the tied variable through a weak reference [perl #86328].
-
-=item *
-
-On Windows, calling kill(9, $child) on a pseudo-process created by the fork()
-emulation is inherently unstable. It can also be responsible for overriding
-the parent process exit code with a value of '9' if the parent terminates
-right after killing the child. This condition will now happen a lot less
-often than before.
-
-See also L</"fork() emulation will not wait for signalled children"> for a
-better way to terminate child processes that avoids deadlocks altogether.
-
-=item *
-
-Ensure that the C<exists &Errno::EFOO> idiom continues to work as documented.
-
-A change post-5.12 caused the documented idiom not to work if Errno was loaded
-after the C<exists> code had been compiled, as the compiler implicitly creates
-typeglobs in the Errno symbol table when it builds the optree for the C<exists
-code>.
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.13.11 represents approximately one month of development since Perl
-5.13.10 and contains approximately 80,000 lines of changes across 549 files from
-31 authors and committers:
-
-Alastair Douglas, Arvan, Boris Ratner, brian d foy, Chris 'BinGOs' Williams,
-Craig A. Berry, David Golden, David Leadbeater, David Mitchell, Father
-Chrysostomos, Florian Ragwitz, Jan Dubois, Karl Williamson, Kevin Ryde, Leon
-Brocard, Leon Timmermans, Michael Stevens, Michael Witten, Moritz Lenz, Nicholas
-Clark, Paul Johnson, Peter John Acklam, Reini Urban, Robin Barker, Steve Hay,
-Sullivan Beck, Tony Cook, Vadim Konovalov, Yves Orton, Zefram and Ævar Arnfjörð
-Bjarmason
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the L<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5131delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5131delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5131delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,287 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl5131delta - what is new for perl v5.13.1
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.13.0 release and
-the 5.13.1 release.
-
-If you are upgrading from an earlier release such as 5.10, first read
-L<perl5120delta>, which describes differences between 5.10 and
-5.12.
-
-=head1 Incompatible Changes
-
-=head2 "C<\cI<X>>"
-
-The backslash-c construct was designed as a way of specifying
-non-printable characters, but there were no restrictions (on ASCII
-platforms) on what the character following the C<c> could be. Now, that
-character must be one of the ASCII characters.
-
-=head2 localised tied hashes, arrays and scalars are no longed tied
-
-In the following:
-
- tie @a, ...;
- {
- local @a;
- # here, @a is a now a new, untied array
- }
- # here, @a refers again to the old, tied array
-
-The new local array used to be made tied too, which was fairly pointless,
-and has now been fixed. This fix could however potentially cause a change
-in behaviour of some code.
-
-=head2 C<given> return values
-
-Starting from this release, C<given> blocks returns the last evaluated
-expression, or an empty list if the block was exited by C<break>. Thus you
-can now write:
-
- my $type = do {
- given ($num) {
- break when undef;
- 'integer' when /^[+-]?[0-9]+$/;
- 'float' when /^[+-]?[0-9]+(?:\.[0-9]+)?$/;
- 'unknown';
- }
- };
-
-See L<perlsyn/Return value> for details.
-
-=head1 Core Enhancements
-
-=head2 Exception Handling Reliability
-
-Several changes have been made to the way C<die>, C<warn>, and C<$@>
-behave, in order to make them more reliable and consistent.
-
-When an exception is thrown inside an C<eval>, the exception is no
-longer at risk of being clobbered by code running during unwinding
-(e.g., destructors). Previously, the exception was written into C<$@>
-early in the throwing process, and would be overwritten if C<eval> was
-used internally in the destructor for an object that had to be freed
-while exiting from the outer C<eval>. Now the exception is written
-into C<$@> last thing before exiting the outer C<eval>, so the code
-running immediately thereafter can rely on the value in C<$@> correctly
-corresponding to that C<eval>.
-
-Likewise, a C<local $@> inside an C<eval> will no longer clobber any
-exception thrown in its scope. Previously, the restoration of C<$@> upon
-unwinding would overwrite any exception being thrown. Now the exception
-gets to the C<eval> anyway. So C<local $@> is safe inside an C<eval>,
-albeit of rather limited use.
-
-Exceptions thrown from object destructors no longer modify the C<$@>
-of the surrounding context. (If the surrounding context was exception
-unwinding, this used to be another way to clobber the exception being
-thrown. Due to the above change it no longer has that significance,
-but there are other situations where C<$@> is significant.) Previously
-such an exception was sometimes emitted as a warning, and then either
-string-appended to the surrounding C<$@> or completely replaced the
-surrounding C<$@>, depending on whether that exception and the surrounding
-C<$@> were strings or objects. Now, an exception in this situation is
-always emitted as a warning, leaving the surrounding C<$@> untouched.
-In addition to object destructors, this also affects any function call
-performed by XS code using the C<G_KEEPERR> flag.
-
-C<$@> is also no longer used as an internal temporary variable when
-preparing to C<die>. Previously it was internally necessary to put
-any exception object (any non-string exception) into C<$@> first,
-before it could be used as an exception. (The C API still offers the
-old option, so an XS module might still clobber C<$@> in the old way.)
-This change together with the foregoing means that, in various places,
-C<$@> may be observed to contain its previously-assigned value, rather
-than having been overwritten by recent exception-related activity.
-
-Warnings for C<warn> can now be objects, in the same way as exceptions
-for C<die>. If an object-based warning gets the default handling,
-of writing to standard error, it will of course still be stringified
-along the way. But a C<$SIG{__WARN__}> handler will now receive an
-object-based warning as an object, where previously it was passed the
-result of stringifying the object.
-
-=head1 Modules and Pragmata
-
-=head2 Updated Modules
-
-=over
-
-=item C<Errno>
-
-The implementation of C<Errno> has been refactored to use about 55% less memory.
-There should be no user-visible changes.
-
-=item Perl 4 C<.pl> libraries
-
-These historical libraries have been minimally modified to avoid using
-C<$[>. This is to prepare them for the deprecation of C<$[>.
-
-=item C<B::Deparse>
-
-A bug has been fixed when deparsing a nextstate op that has both a
-change of package (relative to the previous nextstate), or a change of
-C<%^H> or other state, and a label. Previously the label was emitted
-first, leading to syntactically invalid output because a label is not
-permitted immediately before a package declaration, B<BEGIN> block,
-or some other things. Now the label is emitted last.
-
-=back
-
-=head2 Removed Modules and Pragmata
-
-The following modules have been removed from the core distribution, and if
-needed should be installed from CPAN instead.
-
-=over
-
-=item C<Class::ISA>
-
-=item C<Pod::Plainer>
-
-=item C<Switch>
-
-=back
-
-The removal of C<Shell> has been deferred until after 5.14, as the
-implementation of C<Shell> shipped with 5.12.0 did not correctly issue the
-warning that it was to be removed from core.
-
-=head1 New Documentation
-
-=over 4
-
-=item perlgpl
-
-L<perlgpl> has been updated to contain GPL version 1, as is included in the
-F<README> distributed with perl.
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-Naming a deprecated character in \N{...} will not leak memory.
-
-=item *
-
-FETCH is no longer called needlessly on some tied variables.
-
-=item *
-
-The trie runtime code should no longer allocate massive amounts of memory,
-fixing #74484.
-
-=back
-
-=head1 Changed Internals
-
-=over 4
-
-=item *
-
-The protocol for unwinding the C stack at the last stage of a C<die>
-has changed how it identifies the target stack frame. This now uses
-a separate variable C<PL_restartjmpenv>, where previously it relied on
-the C<blk_eval.cur_top_env> pointer in the C<eval> context frame that
-has nominally just been discarded. This change means that code running
-during various stages of Perl-level unwinding no longer needs to take
-care to avoid destroying the ghost frame.
-
-=item *
-
-The format of entries on the scope stack has been changed, resulting in a
-reduction of memory usage of about 10%. In particular, the memory used by
-the scope stack to record each active lexical variable has been halved.
-
-=item *
-
-Memory allocation for pointer tables has been changed. Previously
-C<Perl_ptr_table_store> allocated memory from the same arena system as C<SV>
-bodies and C<HE>s, with freed memory remaining bound to those arenas until
-interpreter exit. Now it allocates memory from arenas private to the specific
-pointer table, and that memory is returned to the system when
-C<Perl_ptr_table_free> is called. Additionally, allocation and release are both
-less CPU intensive.
-
-=item *
-
-A new function, Perl_magic_methcall has been added that wraps the setup needed
-to call a magic method like FETCH (the existing S_magic_methcall function has
-been renamed S_magic_methcall1).
-
-=back
-
-=head1 Deprecations
-
-The following items are now deprecated.
-
-=over 4
-
-=item C<Perl_ptr_table_clear>
-
-C<Perl_ptr_table_clear> is no longer part of Perl's public API. Calling it now
-generates a deprecation warning, and it will be removed in a future
-release.
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.13.1 represents thirty days of development since Perl 5.13.0 and
-contains 15390 lines of changes across 289 files from 34 authors and
-committers.
-
-Thank you to the following for contributing to this release:
-
-Ævar Arnfjörð Bjarmason, Arkturuz, Chris 'BinGOs' Williams, Craig A. Berry,
-Curtis Jewell, Dan Dascalescu, David Golden, David Mitchell, Father
-Chrysostomos, Gene Sullivan, gfx, Gisle Aas, H.Merijn Brand, James E Keenan,
-James Mastros, Jan Dubois, Jesse Vincent, Karl Williamson, Leon Brocard,
-Lubomir Rintel (GoodData), Nicholas Clark, Philippe Bruhat (BooK), Rafael
-Garcia-Suarez, Rainer Tammer, Ricardo Signes, Richard Soderberg, Robin Barker,
-Ruslan Zakirov, Steffen Mueller, Todd Rinaldo, Tony Cook, Vincent Pit, Zefram
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5132delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5132delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5132delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,409 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl5132delta - what is new for perl v5.13.2
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.13.2 release and
-the 5.13.1 release.
-
-If you are upgrading from an earlier release such as 5.10, first read
-L<perl5120delta>, which describes differences between 5.10 and
-5.12.
-
-=head1 Incompatible Changes
-
-=head2 localised tied scalars are tied again.
-
-The change in behaviour in 5.13.1 of localising tied scalar values has
-been reverted to the existing 5.12.0 and earlier behaviour (the change for
-arrays and hashes remains).
-
-=head2 Naming fixes in Policy_sh.SH may invalidate Policy.sh
-
-Several long-standing typos and naming confusions in Policy_sh.SH have
-been fixed, standardizing on the variable names used in config.sh.
-
-This will change the behavior of Policy.sh if you happen to have been
-accidentally relying on the Policy.sh incorrect behavior. We'd appreciate
-feedback from anyone using Policy.sh to be sure nothing is broken by
-this change (c1bd23).
-
-=head2 Stashes are now always defined
-
-C<defined %Foo::> now always returns true, even when no symbols have yet been
-defined in that package.
-
-This is a side effect of removing a special case kludge in the tokeniser,
-added for 5.10.0, to hide side effects of changes to the internal storage of
-hashes that to drastically reduce their memory usage overhead.
-
-Calling defined on a stash has been deprecated since 5.6.0, warned on
-lexicals since 5.6.0, and has warned for stashes (and other package
-variables) since 5.12.0. C<defined %hash> has always exposed an
-implementation detail - emptying a hash by deleting all entries from it does
-not make C<defined %hash> false, hence C<defined %hash> is not valid code to
-determine whether an arbitrary hash is empty. Instead, use the behaviour
-that an empty C<%hash> always returns false in a scalar context.
-
-=head1 Core Enhancements
-
-=head2 Non-destructive substitution
-
-The substitution operator now supports a C</r> option that
-copies the input variable, carries out the substitution on
-the copy and returns the result. The original remains unmodified.
-
- my $old = 'cat';
- my $new = $old =~ s/cat/dog/r;
- # $old is 'cat' and $new is 'dog'
-
-This is particularly useful with C<map>. See L<perlop> for more examples
-(4f4d75, 000c65).
-
-=head2 package block syntax
-
-A package declaration can now contain a code block, in which case the
-declaration is in scope only inside that block. So C<package Foo { ... }>
-is precisely equivalent to C<{ package Foo; ... }>. It also works with
-a version number in the declaration, as in C<package Foo 1.2 { ... }>.
-See L<perlfunc> (434da3..36f77d, 702646).
-
-=head2 CLONE_PARAMS structure added to ease correct thread creation
-
-Modules that create threads should now create C<CLONE_PARAMS> structures
-by calling the new function C<Perl_clone_params_new()>, and free them with
-C<Perl_clone_params_del()>. This will ensure compatibility with any future
-changes to the internals of the C<CLONE_PARAMS> structure layout, and that
-it is correctly allocated and initialised.
-
-=head2 perl -h no longer recommends -w
-
-perl -h used to mark the -w option as recommended; since this option is
-far less useful than it used to be due to lexical 'use warnings' and since
-perl -h is primary a list and brief explanation of the command line switches,
-the recommendation has now been removed (60eaec).
-
-=head1 Modules and Pragmata
-
-=head2 Updated Modules
-
-=head3 Locale-Codes 3.13
-
-Locale::Country, Locale::Language and Locale::Currency were updated from
-3.12 to 3.13 of the Locale-Codes distribution to include locale code changes
-(e1137b).
-
-=head3 Thread-Semaphore 2.11
-
-Added new methods -E<gt>down_nb() and -E<gt>down_force() at the suggestion
-of Rick Garlick.
-
-Refactored methods to skip argument validation when no argument is supplied.
-
-(04febe, f06daa)
-
-=head3 CPAN.pm 1.94_57
-
-=over 4
-
-=item * release 1.94_57
-
-=item * bugfix: treat modules correctly that are deprecated in perl 5.12.
-
-=item * bugfix: RT #57482 and #57788 revealed that configure_requires
-implicitly assumed build_requires instead of normal requires. (Reported
-by Andrew Whatson and Father Chrysostomos respectively)
-
-=item * testfix: solaris should run the tests without expect because (some?)
-solaris have a broken expect
-
-=item * testfix: run tests with cache_metadata off to prevent spill over
-effects from previous test runs
-
-=back
-
-(742adb)
-
-=head3 Hash::Util warning fix
-
-Hash::Util now enables "no warnings 'uninitialized'" to suppress spurious
-warnings from undefined hash values (RT #74280).
-
-=head3 B::Deparse now handles 'no VERSION'
-
-The 'no 5.13.2' or similar form is now correctly handled by B::Deparse.
-
-=head3 IO::Socket doc additions
-
-getsockopt and setsockopt are now documented.
-
-=head3 B::Concise updated for OPpDEREF
-
-B::Concise marks rv2sv, rv2av and rv2hv ops with the new OPpDEREF flag
-as "DREFed".
-
-=head3 File::Copy doc clarification
-
-An extra stanza was added explaining behaviours when the copy destination
-already exists and is a directory.
-
-=head3 Multiple POD spelling fixes.
-
-Fixes were made to VMS::DCLsym, mro, Search::Dist, B::t::OptreeCheck
-and UNIVERSAL.
-
-=head1 Changes to Existing Documentation
-
-=head2 Replace wrong tr/// table in perlebcdic.pod
-
-perlebcdic.pod contains a helpful table to use in tr/// to convert
-between EBCDIC and Latin1/ASCII. Unfortunately, the table was the
-inverse of the one it describes, though the code that used the table
-worked correctly for the specific example given.
-
-The table has been changed to its inverse, and the sample code changed
-to correspond, as this is easier for the person trying to follow the
-instructions since deriving the old table is somewhat more complicated.
-
-The table has also been changed to hex from octal, as that is more the norm
-these days, and the recipes in the pod altered to print out leading
-zeros to make all the values the same length, as the table that they can
-generate has them (5f26d5).
-
-=head2 Document tricks for user-defined casing
-
-perlunicode.pod now contains an explanation of how to override, mangle
-and otherwise tweak the way perl handles upper, lower and other case
-conversions on unicode data, and how to provide scoped changes to alter
-one's own code's behaviour without stomping on anybody else (71648f).
-
-=head2 Document $# and $* as removed and clarify $#array usage
-
-$# and $* were both disabled as of perl5 version 10; this release adds
-documentation to that effect, a description of the results of continuing
-to try and use them, and a note explaining that $# can also function as a
-sigil in the $#array form (7f315d2).
-
-=head2 INSTALL explicitly states the requirement for C89
-
-This was already true but it's now Officially Stated For The Record (51eec7).
-
-=head2 No longer advertise Math::TrulyRandom
-
-This module hasn't been updated since 1996 so we can't recommend it any more
-(83918a).
-
-=head2 perlfaq synchronised to upstream
-
-The FAQ has been updated to commit
-37550b8f812e591bcd0dd869d61677dac5bda92c from the perlfaq repository
-at git at github.com:briandfoy/perlfaq.git
-
-=head1 Performance Enhancements
-
-Only allocate entries for @_ on demand - this not only saves memory per
-subroutine defined but should hopefully improve COW behaviour (77bac2).
-
-=head2 Multiple small improvements to threads
-
-The internal structures of threading now make fewer API calls and fewer
-allocations, resulting in noticeably smaller object code. Additionally,
-many thread context checks have been deferred so that they're only done
-when required (although this is only possible for non-debugging builds).
-
-=head2 Size optimisations to SV and HV structures
-
-xhv_fill has been eliminated from struct xpvhv, saving 1 IV per hash and
-on some systems will cause struct xpvhv to become cache aligned. To avoid
-this memory saving causing a slowdown elsewhere, boolean use of HvFILL
-now calls HvTOTALKEYS instead (which is equivalent) - so while the fill
-data when actually required is now calculated on demand, the cases when
-this needs to be done should be few and far between (f4431c .. fcd245).
-
-The order of structure elements in SV bodies has changed. Effectively,
-the NV slot has swapped location with STASH and MAGIC. As all access to
-SV members is via macros, this should be completely transparent. This
-change allows the space saving for PVHVs documented above, and may reduce
-the memory allocation needed for PVIVs on some architectures.
-
-=head2 Optimisation of regexp engine string comparison work
-
-The foldEQ_utf8 API function for case-insensitive comparison of strings (which
-is used heavily by the regexp engine) was substantially refactored and
-optimised - and its documentation much improved as a free bonus gift
-(8b3587, e6226b).
-
-=head2 Memory consumption improvements to Exporter
-
-The @EXPORT_FAIL AV is no longer created unless required, hence neither is
-the typeglob backing it - this saves about 200 bytes per Exporter using
-package that doesn't use this functionality.
-
-=head1 Installation and Configuration Improvements
-
-=head2 Compilation improvements
-
-Fix CCINCDIR and CCLIBDIR for mingw64 cross compiler to correctly be under
-$(CCHOME)\mingw\include and \lib rather than immediately below $(CCHOME).
-
-This means the 'incpath', 'libpth', 'ldflags', 'lddlflags' and
-'ldflags_nolargefiles' values in Config.pm and Config_heavy.pl are now
-set correctly (23ae7f).
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item * Timely cleanup of SVs that are cloned into a new thread but then
-discovered to be orphaned (i.e. their owners are -not- cloned) (e42956)
-
-=item * Don't accidentally clone lexicals in scope within active stack frames in
-the parent when creating a child thread (RT #73086) (05d04d).
-
-=item * Avoid loading feature.pm when 'no 5.13.2;' or similar is
-encountered (faee19).
-
-=item * Trap invalid use of SvIVX on SVt_REGEXP when assertions are on
-(e77da3)
-
-=item * Don't stamp on $DB::single, $DB::trace and $DB::signal if they
-already have values when $^P is assigned to (RT #72422) (4c0f30).
-
-=item * chop now correctly handles perl's extended UTF-8 (RT #73246) (65ab92)
-
-=item * Defer signal handling when shared SV locks are held to avoid
-deadlocks (RT #74868) (65c742).
-
-=item * glob() no longer crashes when %File::Glob:: is empty and
-CORE::GLOBAL::glob isn't present (4984aa).
-
-=item * perlbug now always permits the sender address to be changed
-before sending - if you were having trouble sending bug reports before
-now, this should fix it, we hope (e6eb90).
-
-=item * Overloading now works properly in conjunction with tied
-variables. What formerly happened was that most ops checked their
-arguments for overloading I<before> checking for magic, so for example
-an overloaded object returned by a tied array access would usually be
-treated as not overloaded (RT #57012) (6f1401, ed3b9b, 6a5f8c .. 24328f).
-
-=item * Independently, a bug was fixed that prevented $tied-E<gt>() from
-always calling FETCH correctly (RT #8438) (7c7501)
-
-=back
-
-=head1 Changed Internals
-
-=over 4
-
-=item * The implementation of sv_dup_inc() has changed from a macro to a function.
-
-=item *
-
-The C<find_rundefsvoffset> function has been deprecated. It appeared that
-its design was insufficient to reliably get the lexical C<$_> at run-time.
-
-Use the new C<find_rundefsv> function or the C<UNDERBAR> macro instead.
-They directly return the right SV representing C<$_>, whether it's lexical
-or dynamic (789bd8 .. 03d5bc).
-
-=item *
-
-The following new functions or macros have been added to the public API:
-C<SvNV_nomg>, C<sv_2nv_flags>, C<find_rundefsv>.
-
-=item *
-
-The C<UNDERBAR> macro now calls C<find_rundefsv>. C<dUNDERBAR> is now a
-noop but should still be used to ensure past and future compatibility.
-
-=item *
-
-The ibcmp_* functions have been renamed and are now called foldEQ,
-foldEQ_locale and foldEQ_utf8 (e6226b).
-
-=back
-
-=head1 Deprecations
-
-The following items are now deprecated.
-
-=over 4
-
-=item *
-
-Omitting a space between a regex pattern or pattern modifiers and the following
-word is deprecated. For example, C<< m/foo/sand $bar >> will still be parsed
-as C<< m/foo/s and $bar >> but will issue a warning.
-
-=back
-
-=head1 Platform Specific Notes
-
-=head2 Recent OpenBSDs now use perl's malloc
-
-OpenBSD E<gt> 3.7 has a new malloc implementation which is mmap based
-and as such can release memory back to the OS; however for perl using
-this malloc causes a substantial slowdown so we now default to using
-perl's malloc instead (RT #75742) (9b58b5).
-
-=head1 Acknowledgements
-
-Perl 5.13.2 represents thirty days of development since Perl 5.13.1 (and
-two days of waiting around while the release manager remembered where he
-left his brain) and contains 3685 lines of changes across 194 files from
-30 authors and committers.
-
-Thank you to the following for contributing to this release:
-
-Abigail, Andreas J. Koenig, Chas. Owens, Chris 'BinGOs' Williams,
-Craig A. Berry, David Caldwell, David Golden, David Mitchell,
-Father Chrysostomos, George Greer, H.Merijn Brand, Jerry D. Hedden,
-Karl Williamson, Maik Hentsche, Matt S Trout, Nicholas Clark, Rafael
-Garcia-Suarez, Ricardo Signes, Salvador Fandino, Salvador Ortiz Garcia,
-Shlomi Fish, Sinan Unur, Sisyphus, Slaven Rezic, Sullivan Beck, Tony Cook,
-Vincent Pit, Zefram, brian d foy, Ævar Arnfjörð Bjarmason
-
-Your humble release manager would like to specifically call out
-Karl Williamson for making the tests a better place to be, and Shlomi
-Fish for a passel of tiny incremental docfixes of the sort that don't get
-made often enough.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5133delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5133delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5133delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,667 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl5133delta - what is new for perl v5.13.3
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.13.3 release and
-the 5.13.2 release.
-
-If you are upgrading from an earlier release such as 5.13.1, first read
-L<perl5132delta>, which describes differences between 5.13.1 and
-5.13.2.
-
-=head1 Core Enhancements
-
-=head2 \o{...} for octals
-
-There is a new escape sequence, C<"\o">, in double-quote-like contexts.
-It must be followed by braces enclosing an octal number of at least one
-digit. It interpolates as the character with an ordinal value equal to
-the octal number. This construct allows large octal ordinals beyond the
-current max of 0777 to be represented. It also allows you to specify a
-character in octal which can safely be concatenated with other regex
-snippets and which won't be confused with being a backreference to
-a regex capture group. See L<perlre/Capture groups>.
-
-=head2 C<\N{I<name>}> and C<charnames> enhancements
-
-C<\N{}> and C<charnames::vianame> now know about the abbreviated
-character names listed by Unicode, such as NBSP, SHY, LRO, ZWJ, etc., as
-well as all the customary abbreviations for the C0 and C1 control
-characters (such as ACK, BEL, CAN, etc.), as well as a few new variants
-in common usage of some C1 full names.
-
-In the past, it was ineffective to override one of Perl's abbreviations
-with your own custom alias. Now it works.
-
-You can also create a custom alias directly to the ordinal of a
-character, known by C<\N{...}>, C<charnames::vianame()>, and
-C<charnames::viacode()>. Previously, an alias had to be to an official
-Unicode character name. This made it impossible to create an alias for
-a code point that had no name, such as the ones reserved for private
-use. So this change allows you to make more effective use of private
-use characters. Only if there is no official name will
-C<charnames::viacode()> return your custom one.
-
-See L<charnames> for details on all these changes.
-
-=head2 Uppercase X/B allowed in hexadecimal/binary literals
-
-Literals may now use either upper case C<0X...> or C<0B...> prefixes,
-in addition to the already supported C<0x...> and C<0b...>
-syntax. (RT#76296) (a674e8d, 333f87f)
-
-C, Ruby, Python and PHP already supported this syntax, and it makes
-Perl more internally consistent. A round-trip with C<eval sprintf
-"%#X", 0x10> now returns C<16> in addition to C<eval sprintf "%#x",
-0x10>, which worked before.
-
-=head1 Incompatible Changes
-
-=head2 \400 - \777
-
-Use of C<\400> - C<\777> in regexes in certain circumstances has given
-different, anomalous behavior than their use in all other
-double-quote-like contexts. Since 5.10.1, a deprecated warning message
-has been raised when this happens. Now, all double-quote-like contexts
-have the same behavior, namely to be equivalent to C<\x{100}> -
-C<\x{1FF}>, with no deprecation warning. Use of these values in the
-command line option C<"-0"> retains the current meaning to slurp input
-files whole; previously, this was documented only for C<"-0777">. It is
-recommended, however, because of various ambiguities, to use the new
-C<\o{...}> construct to represent characters in octal.
-(fa1639c..f6993e9).
-
-=head1 Deprecations
-
-=head2 Omitting a space between a regular expression and subsequent word
-
-Omitting a space between a regex pattern or pattern modifiers and the
-following word is deprecated. Deprecation for regular expression
-I<matches> was added in Perl 5.13.2. In this release, the deprecation
-is extended to regular expression I<substitutions>. For example,
-C<< s/foo/bar/sand $bar >> will still be parsed as
-C<< s/foo/bar/s and $bar >> but will issue a warning. (aa78b66)
-
-=head2 Deprecation warning added for deprecated-in-core .pl libs
-
-This is a mandatory warning, not obeying -X or lexical warning bits.
-The warning is modelled on that supplied by deprecate.pm for
-deprecated-in-core .pm libraries. It points to the specific CPAN
-distribution that contains the .pl libraries. The CPAN version, of
-course, does not generate the warning. (0111154)
-
-=head1 Performance Enhancements
-
-There are several small optimizations to reduce CPU cache misses in various very
-commonly used modules like C<warnings> and C<Carp> as well in accessing
-file-handles for reading.
-
-=head1 Modules and Pragmata
-
-=head2 Updated Modules and Pragmata
-
-=over 4
-
-=item C<autodie>
-
-Upgraded from version 2.06_01 to 2.10.
-
-=item C<charnames>
-
-Upgraded from version 1.08 to 1.10.
-
-C<viacode()> is now significantly faster. (f3227b7)
-
-=item C<lib>
-
-Upgraded from version 0.62 to 0.63.
-
-=item C<threads>
-
-Upgraded from version 1.77_02 to 1.77_03.
-
-=item C<threads::shared>
-
-Upgraded from version 1.33_01 to 1.33_02.
-
-=item C<warnings>
-
-Upgraded from version 1.09 to 1.10.
-
-Calling C<use warnings> without arguments is now significantly more efficient.
-(8452af9)
-
-=item C<Archive::Extract>
-
-Upgraded from version 0.38 to 0.42.
-
-Updates since 0.38 include: a safe print method that guards
-Archive::Extract from changes to $\; a fix to the tests when run in core
-perl; support for TZ files; and a modification for the lzma logic to favour
-IO::Uncompress::Unlzma (d7f8799)
-
-=item C<Archive::Tar>
-
-Upgraded from version 1.54 to 1.64.
-
-Important changes since 1.54 include: compatibility with busybox
-implementations of tar; a fix so that C<write()> and C<create_archive()>
-close only handles they opened; and a bug was fixed regarding the exit code
-of extract_archive. (afabe0e)
-
-=item C<Attribute::Handlers>
-
-Upgraded from version 0.87 to 0.88.
-
-=item C<Compress::Raw::Bzip2>
-
-Upgraded from version 2.024 to 2.027.
-
-=item C<Compress::Raw::Zlib>
-
-Upgraded from version 2.024 to 2.027_01.
-
-=item C<Compress::Zlib>
-
-Upgraded from version 2.024 to 2.027.
-
-=item C<CPANPLUS>
-
-Upgraded from version 0.90 to 0.9007.
-
-Fixed the shell test to skip if test is not being run under a terminal;
-resolved the issue where a prereq on Config would not be recognised as a
-core module. (d4e225a)
-
-=item C<Digest::MD5>
-
-Upgraded from version 2.39 to 2.40.
-
-=item C<Digest::SHA>
-
-Upgraded from version 5.47 to 5.48.
-
-=item C<Exporter>
-
-Upgraded from version 5.64_02 to 5.64_03.
-
-Exporter no longer overrides C<$SIG{__WARN__}> (RT #74472) (9b86bb5)
-
-=item C<ExtUtils::CBuilder>
-
-Upgraded from version 0.27 to 0.2703.
-
-=item C<ExtUtils::Manifest>
-
-Upgraded from version 1.57 to 1.58.
-
-=item C<ExtUtils::ParseXS>
-
-Upgraded from version 2.2205 to 2.2206.
-
-=item C<File::Copy>
-
-Upgraded from version 2.19 to 2.20.
-
-Skips suid tests on a nosuid partition. These tests were being skipped on
-OpenBSD, but nosuid partitions can exist on other systems too. Now it just
-checks if it can create a suid directory, if not the tests are skipped.
-Perl builds without errors in a nosuid /tmp with this patch. (cae9400)
-
-=item C<I18N::LangTags>
-
-Upgraded from version 0.35 to 0.35_01.
-
-=item C<IPC::Cmd>
-
-Upgraded from version 0.58 to 0.60.
-
-=item C<IPC::SysV>
-
-Upgraded from version 2.01 to 2.03.
-
-=item C<Locale::Maketext>
-
-Upgraded from version 1.14 to 1.15.
-
-Locale::Maketext guts have been merged back into the main module (87d86da)
-and adds external cache support (ace47d6)
-
-=item C<Module::Build>
-
-Upgraded from version 0.3603 to 0.3607.
-
-=item C<Module::CoreList>
-
-Upgraded from version 2.34 to 2.36.
-
-=item C<Module::Load>
-
-Upgraded from version 0.16 to 0.18.
-
-=item C<Term::ANSIColor>
-
-Upgraded from version 2.02 to 3.00.
-
-=item C<Test::Harness>
-
-Upgraded from version 3.17 to 3.21.
-
-The core update from Test-Harness 3.17 to 3.21 fixed some things, but
-also L<introduced a known problem|/"Known Problems"> with argument
-passing to non-Perl tests.
-
-=item C<Time::HiRes>
-
-Upgraded from version 1.9719 to 1.9721.
-
-=item C<Time::Piece>
-
-Upgraded from version 1.15_01 to 1.20_01.
-
-=item C<Unicode::Collate>
-
-Upgraded from version 0.52_01 to 0.53.
-
-Includes Unicode Collation Algorithm 18 (74b94a7)
-
-=item C<Unicode::Normalize>
-
-Upgraded from version 1.03 to 1.06.
-
-=back
-
-=head1 Documentation
-
-=head2 New Documentation
-
-=head3 L<perl5121delta>
-
-The Perl 5.12.1 perldelta file was added from the Perl maintenance branch
-
-=head2 Changes to Existing Documentation
-
-=head3 General changes
-
-=over
-
-=item *
-
-Octal character escapes in documentation now prefer a three-digit octal
-escape or the new C<\o{...}> escape as they have more consistent behavior
-in different contexts than other forms. (ce7b6f0) (d8b950d) (e1f120a)
-
-=item *
-
-Documentation now standardizes on the term 'capture group' over 'buffer'
-in regular expression documentation (c27a5cf)
-
-=back
-
-=head3 L<perlfunc>
-
-=over
-
-=item *
-
-Added cautionary note about "no VERSION" (e0de7c2)
-
-=item *
-
-Added additional notes regarding srand when forking (d460397)
-
-=back
-
-=head3 L<perlop>
-
-=over 4
-
-=item *
-
-Improved documentation of unusual character escapes (4068718, 9644846)
-
-=item *
-
-Clarified how hexadecimal escapes are interpreted, with particular
-attention to the treatment of invalid characters (9644846)
-
-=back
-
-=head3 L<perlrun>
-
-=over
-
-=item *
-
-Clarified the behavior of the C<-0NNN> switch for C<-0400> or higher (7ba31cb)
-
-=back
-
-=head3 L<perlpolicy>
-
-=over
-
-=item *
-
-Added the policy on compatibility and deprecation along with definitions of
-terms like "deprecation" (70e4a83)
-
-=back
-
-=head3 L<perlre>
-
-=over
-
-=item *
-
-Added examples of the perils of not using \g{} when there are more
-than nine back-references (9d86067)
-
-=back
-
-=head3 L<perltie>
-
-=over
-
-=item *
-
-Updated some examples for modern Perl style (67d00dd)
-
-=back
-
-=head1 Utility Changes
-
-=head3 L<perldb>
-
-=over
-
-=item *
-
-The remote terminal works after forking and spawns new sessions - one
-for each forked process (11653f7)
-
-=item *
-
-Uses the less pager path from Config instead of searching for it (bf320d6)
-
-=back
-
-=head1 Configuration and Compilation
-
-=over 4
-
-=item *
-
-Adjusted 'make test.valgrind' to account for cpan/dist/ext separation
-(e07ce2e)
-
-=back
-
-=head1 Testing
-
-=over 4
-
-=item *
-
-F<t/harness> clears PERL5LIB, PERLLIB, PERL5OPT as t/TEST does (a2d3de1)
-
-=item *
-
-Many common testing routines were refactored into t/lib/common.pl
-
-=item *
-
-Several test files have been modernized to use Test::More
-
-=back
-
-=head1 Platform Support
-
-=head2 Discontinued Platforms
-
-=over 4
-
-=item MacOS Classic
-
-Support for MacOS Classic within ExtUtils::MakeMaker was removed from Perl in
-December 2004. Vestigial MacOS Classic specific code has now been removed
-from other core modules as well (8f8c2a4..c457df0)
-
-=back
-
-=head2 Platform-Specific Notes
-
-=over 4
-
-=item Win32
-
-t/io/openpid.t now uses the alarm() watchdog strategy for more
-robustness (5732108)
-
-=back
-
-=head1 Internal Changes
-
-=over 4
-
-=item *
-
-Under some circumstances, the C<CvGV()> field of a CV is now reference
-counted. To ensure consistent behaviour, direct assignment to it, for
-example C<CvGV(cv) = gv> is now a compile-time error. A new macro,
-C<CvGV_set(cv,gv)> has been introduced to perform this operation safely.
-Note that modification of this field is not part of of the public API,
-regardless of this new macro. This change caused some
-L<issues|/"Known Problems"> in modules that used the private C<GvGV()>
-field.
-
-=item *
-
-It is now possible for XS code to hook into Perl's lexical scope
-mechanism at compile time, using the new C<Perl_blockhook_register>
-function. See L<perlguts/"Compile-time scope hooks">.
-
-=item *
-
-Added C<Perl_croak_no_modify()> to implement
-C<Perl_croak("%s", PL_no_modify)> (6ad8f25)
-
-=item *
-
-Added prototypes for C<tie()> and C<untie()> to allow overloading (RT#75902)
-(1db4d19)
-
-=item *
-
-Adds C<my_[l]stat_flags()> to replace C<my_[l]stat()>. C<my_stat()> and
-C<my_lstat()> call get magic on the stack arg, so create C<_flags()>
-variants that allow us to control this. (0d7d409)
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-Some work has been done on the internal pointers that link between symbol
-tables (stashes), typeglobs and subroutines. This has the effect that
-various edge cases related to deleting stashes or stash entries (e.g.
-<%FOO:: = ()>), and complex typeglob or code reference aliasing, will no
-longer crash the interpreter.
-
-=item *
-
-Fixed readline() when interrupted by signals so it no longer returns
-the "same thing" as before or random memory
-
-=item *
-
-Fixed a regression of kill() when a match variable is used for the
-process ID to kill (RT#75812) (8af710e)
-
-=item *
-
-Fixed several subtle bugs in sort() when @_ is accessed within a subroutine
-used for sorting (RT#72334) (8f443ca)
-
-=item *
-
-Catch yyparse() exceptions in C<< (?{...}) >> (RT#2353) (634d691)
-
-=item *
-
-Avoid UTF-8 cache panics with offsets beyond a string (RT #75898) (3e2d381)
-
-=item *
-
-Fixed POSIX::strftime memory leak (RT#73520) (c4bc4aa)
-
-=item *
-
-Doesn't set strict with C<no VERSION> if C<VERSION> is greater than 5.12
-(da8fb5d)
-
-=item *
-
-Avoids multiple FETCH/stringify on filetest ops (40c852d)
-
-=item *
-
-Fixed issue with string C<eval> not detecting taint of overloaded/tied
-arguments (RT #75716) (895b760)
-
-=item *
-
-Fix potential crashes of string C<eval> when evaluating a object with
-overloaded stringification by creating a stringified copy when necessary
-(3e5c018)
-
-=item *
-
-Fixed bug where overloaded stringification could remove tainting
-(RT #75716) (a02ec77)
-
-=item *
-
-Plugs more memory leaks in vms.c. (9e2bec0)
-
-=item *
-
-Fix pthread include error for Time::Piece (e9f284c)
-
-=back
-
-=head1 Known Problems
-
-=over 4
-
-=item *
-
-Bug fixes involving CvGV reference counting break Sub::Name. A
-patch has been sent upstream to the maintainer
-
-=item *
-
-readline() returns an empty string instead of undef when it is
-interrupted by a signal
-
-=item *
-
-Test-Harness was updated from 3.17 to 3.21 for this release. A rewrite
-in how it handles non-Perl tests (in 3.17_01) broke argument passing to
-non-Perl tests with L<prove> (RT #59186), and required that non-Perl
-tests be run as C<prove ./test.sh> instead of C<prove test.sh> These
-issues are being solved upstream, but didn't make it into this release.
-They're expected to be fixed in time for perl v5.13.4. (RT #59457)
-
-=item *
-
-C<version> now prevents object methods from being called as class methods
-(d808b68)
-
-=back
-
-=head1 Errata
-
-=over 4
-
-=item *
-
-Retroactively added the Acknowledgements list to L<perl5132delta>,
-which was excluded in the original release (d1e2db0)
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.13.3 represents approximately one month of development since Perl
-5.13.2, and contains 12,184 lines of changes across 575 files from 104
-authors and committers.
-
-Thank you to the following for contributing to this release:
-
-Abhijit Menon-Sen, Abigail, Alex Davies, Alex Vandiver, Alexandr
-Ciornii, Andreas J. Koenig, Andrew Rodland, Andy Dougherty, Aristotle
-Pagaltzis, Arkturuz, Ben Morrow, Bo Borgerson, Bo Lindbergh, Brad
-Gilbert, Bram, Brian Phillips, Chas. Owens, Chip Salzenberg, Chris
-Williams, Craig A. Berry, Curtis Jewell, Dan Dascalescu, Daniel
-Frederick Crisman, Dave Rolsky, David Caldwell, David E. Wheeler, David
-Golden, David Leadbeater, David Mitchell, Dennis Kaarsemaker, Eric
-Brine, Father Chrysostomos, Florian Ragwitz, Frank Wiegand, Gene
-Sullivan, George Greer, Gerard Goossen, Gisle Aas, Goro Fuji, Graham
-Barr, H.Merijn Brand, Harmen, Hugo van der Sanden, James E Keenan, James
-Mastros, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Jim Cromie, John
-Peacock, Jos Boumans, Josh ben Jore, Karl Williamson, Kevin Ryde, Leon
-Brocard, Lubomir Rintel, Maik Hentsche, Marcus Holland-Moritz, Matt
-Johnson, Matt S Trout, Max Maischein, Michael Breen, Michael G Schwern,
-Moritz Lenz, Nga Tang Chan, Nicholas Clark, Nick Cleaton, Nick Johnston,
-Niko Tyni, Offer Kaye, Paul Marquess, Philip Hazel, Philippe Bruhat,
-Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes,
-Richard Soderberg, Robin Barker, Ruslan Zakirov, Salvador Fandino,
-Salvador Ortiz Garcia, Shlomi Fish, Sinan Unur, Sisyphus, Slaven Rezic,
-Steffen Mueller, Stepan Kasal, Steve Hay, Steve Peters, Sullivan Beck,
-Tim Bunce, Todd Rinaldo, Tom Christiansen, Tom Hukins, Tony Cook,
-Vincent Pit, Yuval Kogman, Yves Orton, Zefram, brian d foy, chromatic,
-kmx, Ævar Arnfjörð Bjarmason
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5134delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5134delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5134delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,542 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl5134delta - what is new for perl v5.13.4
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.13.4 release and
-the 5.13.3 release.
-
-If you are upgrading from an earlier release such as 5.13.2, first read
-L<perl5133delta>, which describes differences between 5.13.2 and
-5.13.3.
-
-=head1 Core Enhancements
-
-=head2 C<srand()> now returns the seed
-
-This allows programs that need to have repeatable results to not have to come
-up with their own seed generating mechanism. Instead, they can use C<srand()>
-and somehow stash the return for future use. Typical is a test program which
-has too many combinations to test comprehensively in the time available to it
-each run. It can test a random subset each time, and should there be a failure,
-log the seed used for that run so that it can later be used to reproduce the
-exact results.
-
-=head2 C<\N{I<name>}> and C<charnames> enhancements
-
-C<\N{}>, C<charnames::vianame>, C<charnames::viacode> now know about every
-character in Unicode. Previously, they didn't know about the Hangul syllables
-nor a number of CJK (Chinese/Japanese/Korean) characters.
-
-=head1 Incompatible Changes
-
-=head2 Declare API incompatibility between blead releases
-
-Only stable releases (5.10.x, 5.12.x, 5.14.x, ...) guarantee binary
-compatibility with each other, while blead releases (5.13.x, 5.15.x, ...) often
-break this compatibility. However, prior to perl 5.13.4, all blead releases had
-the same C<PERL_API_REVISION>, C<PERL_API_VERSION>, and C<PERL_API_SUBVERSION>,
-effectively declaring them as binary compatible, which they weren't. From now
-on, blead releases will have a C<PERL_API_SUBVERSION> equal to their
-C<PERL_SUBVERSION>, explicitly marking them as incompatible with each other.
-
-Maintenance releases of stable perl versions will continue to make no
-intentionally incompatible API changes.
-
-=head2 Check API compatibility when loading XS modules
-
-When perl's API changes in incompatible ways (which usually happens between
-every major release), XS modules compiled for previous versions of perl will not
-work anymore. They will need to be recompiled against the new perl.
-
-In order to ensure that modules are recompiled, and to prevent users from
-accidentally loading modules compiled for old perls into newer ones, the
-C<XS_APIVERSION_BOOTCHECK> macro has been added. That macro, which is called
-when loading every newly compiled extension, compares the API version of the
-running perl with the version a module has been compiled for and raises an
-exception if they don't match.
-
-=head2 Binary Incompatible with all previous Perls
-
-Some bit fields have been reordered; therefore, this release will not be binary
-compatible with any previous Perl release.
-
-=head2 Change in the parsing of certain prototypes
-
-Functions declared with the following prototypes now behave correctly as unary
-functions:
-
-=over 4
-
-=item *
-
-C<*>
-
-=item *
-
-C<\sigil>
-
-=item *
-
-C<\[...]>
-
-=item *
-
-C<;$>
-
-=item *
-
-C<;*>
-
-=item *
-
-C<;\sigil>
-
-=item *
-
-C<;\[...]>
-
-=back
-
-Due to this bug fix, functions using the C<(*)>, C<(;$)> and C<(;*)> prototypes
-are parsed with higher precedence than before. So in the following example:
-
- sub foo($);
- foo $a < $b;
-
-the second line is now parsed correctly as C<< foo($a) < $b >>, rather than
-C<< foo($a < $b) >>. This happens when one of these operators is used in
-an unparenthesised argument:
-
- < > <= >= lt gt le ge
- == != <=> eq ne cmp ~~
- &
- | ^
- &&
- || //
- .. ...
- ?:
- = += -= *= etc.
-
-=head1 Deprecations
-
-=head2 List assignment to C<$[>
-
-After assignment to C<$[> has been deprecated and started to give warnings in
-perl version 5.12.0, this version of perl also starts to emit a warning when
-assigning to C<$[> in list context. This fixes an oversight in 5.12.0.
-
-=head1 Performance Enhancements
-
-=over 4
-
-=item *
-
-Make string appending 100 times faster
-
-When doing a lot of string appending, perl could end up allocating a lot more
-memory than needed in a very inefficient way, if perl was configured to use the
-system's C<malloc> implementation instead of its own.
-
-C<sv_grow>, which is what's being used to allocate more memory if necessary when
-appending to a string, has now been taught how to round up the memory it
-requests to a certain geometric progression, making it much faster on certain
-platforms and configurations. On Win32, it's now about 100 times faster.
-
-=item *
-
-For weak references, the common case of just a single weak reference per
-referent has been optimised to reduce the storage required. In this case it
-saves the equivalent of one small perl array per referent.
-
-=item *
-
-C<XPV>, C<XPVIV>, and C<XPVNV> now only allocate the parts of the C<SV> body
-they actually use, saving some space.
-
-=back
-
-=head1 Modules and Pragmata
-
-=head2 New Modules and Pragmata
-
-This release does not introduce any new modules or pragmata.
-
-=head2 Updated Modules and Pragmata
-
-=over 4
-
-=item C<Archive::Tar>
-
-Upgraded from version 1.64 to 1.68.
-
-Among other things, the new version adds a new option to C<ptar> to allow safe
-creation of tarballs without world-writable files on Windows, allowing those
-archives to be uploaded to CPAN.
-
-=item C<B::Lint>
-
-Upgraded from version 1.11 to 1.12.
-
-=item C<Carp>
-
-Upgraded from version 1.16 to 1.18.
-
-L<Carp> now detects incomplete L<caller()|perlfunc/"caller EXPR"> overrides and
-avoids using bogus C<@DB::args>. To provide backtraces, Carp relies on
-particular behaviour of the caller built-in. Carp now detects if other code has
-overridden this with an incomplete implementation, and modifies its backtrace
-accordingly. Previously incomplete overrides would cause incorrect values in
-backtraces (best case), or obscure fatal errors (worst case)
-
-This fixes certain cases of C<Bizarre copy of ARRAY> caused by modules
-overriding C<caller()> incorrectly.
-
-=item C<Compress::Raw::Bzip2>
-
-Upgraded from version 2.027 to 2.030.
-
-=item C<Compress::Raw::Zlib>
-
-Upgraded from version 2.027 to 2.030.
-
-=item C<File::Spec>
-
-Upgraded from version 3.31 to 3.31_01.
-
-Various issues in L<File::Spec::VMS> have been fixed.
-
-=item C<I18N::Langinfo>
-
-Upgraded from version 0.03 to 0.04.
-
-C<langinfo()> now defaults to using C<$_> if there is no argument given, just
-like the documentation always claimed it did.
-
-=item C<IO::Compress>
-
-Upgraded from version 2.027 to 2.030.
-
-=item C<Module::CoreList>
-
-Upgraded from version 2.36 to 2.37.
-
-Besides listing the updated core modules of this release, it also stops listing
-the C<Filespec> module. That module never existed in core. The scripts
-generating C<Module::CoreList> confused it with C<VMS::Filespec>, which actually
-is a core module, since the time of perl 5.8.7.
-
-=item C<Test::Harness>
-
-Upgraded from version 3.21 to 3.22.
-
-=item C<Test::Simple>
-
-Upgraded from version 0.94 to 0.96.
-
-Among many other things, subtests without a C<plan> or C<no_plan> now have an
-implicit C<done_testing()> added to them.
-
-=item C<Unicode::Collate>
-
-Upgraded from version 0.53 to 0.56.
-
-Among other things, it is now using UCA Revision 20 (based on Unicode 5.2.0) and
-supports a couple of new locales.
-
-=item C<feature>
-
-Upgraded from version 1.17 to 1.18.
-
-=back
-
-=head2 Removed Modules and Pragmata
-
-This release does not remove any modules or pragmata.
-
-=head1 Documentation
-
-=head2 Changes to Existing Documentation
-
-=head3 L<perldiag>
-
-=over 4
-
-=item *
-
-The following existing diagnostics are now documented:
-
-=over 4
-
-=item *
-
-L<Ambiguous use of %c resolved as operator %c|perldiag/"Ambiguous use of %c resolved as operator %c">
-
-=item *
-
-L<Ambiguous use of %c{%s} resolved to %c%s|perldiag/"Ambiguous use of %c{%s} resolved to %c%s">
-
-=item *
-
-L<Ambiguous use of %c{%s%s} resolved to %c%s%s|perldiag/"Ambiguous use of %c{%s%s} resolved to %c%s%s">
-
-=item *
-
-L<Ambiguous use of -%s resolved as -&%s()|perldiag/"Ambiguous use of -%s resolved as -&%s()">
-
-=item *
-
-L<Invalid strict version format (%s)|perldiag/"Invalid strict version format (%s)">
-
-=item *
-
-L<Invalid version format (%s)|perldiag/"Invalid version format (%s)">
-
-=item *
-
-L<Invalid version object|perldiag/"Invalid version object">
-
-=back
-
-=back
-
-=head3 L<perlport>
-
-=over 4
-
-=item *
-
-Documented a L<limitation|perlport/alarm> of L<alarm()|perlfunc/"alarm SECONDS">
-on Win32.
-
-=back
-
-=head3 L<perlre>
-
-=over 4
-
-=item *
-
-Minor fix to a multiple scalar match example.
-
-=back
-
-=head1 Configuration and Compilation
-
-=over 4
-
-=item *
-
-Compatibility with C<C++> compilers has been improved.
-
-=item *
-
-On compilers that support it, C<-Wwrite-strings> is now added to cflags by
-default.
-
-=back
-
-=head1 Testing
-
-=over 4
-
-=item *
-
-F<t/op/print.t> has been added to test implicit printing of C<$_>.
-
-=item *
-
-F<t/io/errnosig.t> has been added to test for restoration of of C<$!> when
-leaving signal handlers.
-
-=item *
-
-F<t/op/tie_fetch_count.t> has been added to see if C<FETCH> is only called once
-on tied variables.
-
-=item *
-
-F<lib/Tie/ExtraHash.t> has been added to make sure the, previously untested,
-L<Tie::ExtraHash> keeps working.
-
-=item *
-
-F<t/re/overload.t> has been added to test against string corruption in pattern
-matches on overloaded objects. This is a TODO test.
-
-=back
-
-=head1 Platform Support
-
-=head2 Platform-Specific Notes
-
-=over 4
-
-=item Win32
-
-=over 4
-
-=item *
-
-Fixed a possible hang in F<t/op/readline.t>.
-
-=item *
-
-Fixed build process for SDK2003SP1 compilers.
-
-=item *
-
-When using old 32-bit compilers, the define C<_USE_32BIT_TIME_T> will now be set
-in C<$Config{ccflags}>. This improves portability when compiling XS extensions
-using new compilers, but for a perl compiled with old 32-bit compilers.
-
-=back
-
-=back
-
-=head1 Internal Changes
-
-=over 4
-
-=item Removed C<PERL_POLLUTE>
-
-The option to define C<PERL_POLLUTE> to expose older 5.005 symbols for backwards
-compatibility has been removed. It's use was always discouraged, and MakeMaker
-contains a more specific escape hatch:
-
- perl Makefile.PL POLLUTE=1
-
-This can be used for modules that have not been upgraded to 5.6 naming
-conventions (and really should be completely obsolete by now).
-
-=item Added C<PERL_STATIC_INLINE>
-
-The C<PERL_STATIC_INLINE> define has been added to provide the best-guess
-incantation to use for static inline functions, if the C compiler supports
-C99-style static inline. If it doesn't, it'll give a plain C<static>.
-
-C<HAS_STATIC_INLINE> can be used to check if the compiler actually supports
-inline functions.
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-A possible memory leak when using L<caller()|perlfunc/"caller EXPR"> to set
-C<@DB::args> has been fixed.
-
-=item *
-
-Several memory leaks when loading XS modules were fixed.
-
-=item *
-
-A panic in the regular expression optimizer has been fixed (RT#75762).
-
-=item *
-
-Assignments to lvalue subroutines now honor copy-on-write behavior again, which
-has been broken since version 5.10.0 (RT#75656).
-
-=item *
-
-Assignments to glob copies now behave just like assignments to regular globs
-(RT#1804).
-
-=item *
-
-Within signal handlers, C<$!> is now implicitly localized.
-
-=item *
-
-L<readline|perlfunc/"readline EXPR"> now honors C<< <> >> overloading on tied
-arguments.
-
-=item *
-
-L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">,
-L<pos()|perlfunc/"index STR,SUBSTR,POSITION">, L<keys()|perlfunc/"keys HASH">,
-and L<vec()|perlfunc/"vec EXPR,OFFSET,BITS"> could, when used in combination
-with lvalues, result in leaking the scalar value they operate on, and cause its
-destruction to happen too late. This has now been fixed.
-
-=item *
-
-Building with C<PERL_GLOBAL_STRUCT>, which has been broken accidentally in
-5.13.3, now works again.
-
-=back
-
-=head1 Known Problems
-
-=over 4
-
-=item *
-
-The changes in L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">
-broke C<HTML::Parser> <= 3.66. A fixed C<HTML::Parser> is available as version
-3.67 on CPAN.
-
-=item *
-
-The changes in prototype handling break C<Switch>. A patch has been sent
-upstream and will hopefully appear on CPAN soon.
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.13.4 represents approximately one month of development since Perl 5.13.3,
-and contains 91,200 lines of changes across 436 files from 34 authors and
-committers.
-
-Thank you to the following for contributing to this release:
-
-Abigail, Andy Armstrong, Andy Dougherty, Chas. Owens, Chip Salzenberg, Chris
-'BinGOs' Williams, Craig A. Berry, David Cantrell, David Golden, David Mitchell,
-Eric Brine, Father Chrysostomos, Florian Ragwitz, George Greer, Gerard Goossen,
-H.Merijn Brand, James Mastros, Jan Dubois, Jerry D. Hedden, Joshua ben Jore,
-Karl Williamson, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯, Leon Brocard, Lubomir Rintel, Nicholas
-Clark, Paul Marquess, Rafael Garcia-Suarez, Reini Urban, Robin Barker, Slaven
-Rezic, Steve Peters, Tony Cook, Wolfram Humann, Zefram
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles recently
-posted to the comp.lang.perl.misc newsgroup and the perl bug database at
-http://rt.perl.org/perlbug/ . There may also be information at
-http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug> program
-included with your release. Be sure to trim your bug down to a tiny but
-sufficient test case. Your bug report, along with the output of C<perl -V>,
-will be sent off to perlbug at perl.org to be analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send it
-to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able to
-help assess the impact of issues, figure out a resolution, and help co-ordinate
-the release of patches to mitigate or fix the problem across all platforms on
-which Perl is supported. Please only use this address for security issues in the
-Perl core, not for modules independently distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5135delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5135delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5135delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,592 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl5135delta - what is new for perl v5.13.5
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.13.4 release and
-the 5.13.5 release.
-
-If you are upgrading from an earlier release such as 5.13.3, first read
-L<perl5134delta>, which describes differences between 5.13.3 and
-5.13.4.
-
-=head1 Core Enhancements
-
-=head2 Adjacent pairs of nextstate opcodes are now optimized away
-
-Previously, in code such as
-
- use constant DEBUG => 0;
-
- sub GAK {
- warn if DEBUG;
- print "stuff\n";
- }
-
-the ops for C<warn if DEBUG;> would be folded to a C<null> op (C<ex-const>), but
-the C<nextstate> op would remain, resulting in a runtime op dispatch of
-C<nextstate>, C<nextstate>, ...
-
-The execution of a sequence of C<nextstate> ops is indistinguishable from just
-the last C<nextstate> op so the peephole optimizer now eliminates the first of
-a pair of C<nextstate> ops, except where the first carries a label, since labels
-must not be eliminated by the optimizer and label usage isn't conclusively known
-at compile time.
-
-=head2 API function to parse statements
-
-The C<parse_fullstmt> function has been added to allow parsing of a single
-complete Perl statement. See L<perlapi> for details.
-
-=head2 API functions for accessing the runtime hinthash
-
-A new C API for introspecting the hinthash C<%^H> at runtime has been added.
-See C<cop_hints_2hv>, C<cop_hints_fetchpvn>, C<cop_hints_fetchpvs>,
-C<cop_hints_fetchsv>, and C<hv_copy_hints_hv> in L<perlapi> for details.
-
-=head2 C interface to C<caller()>
-
-The C<caller_cx> function has been added as an XSUB-writer's equivalent of
-C<caller()>. See L<perlapi> for details.
-
-=head1 Incompatible Changes
-
-=head2 Magic variables outside the main package
-
-In previous versions of Perl, magic variables like C<$!>, C<%SIG>, etc. would
-'leak' into other packages. So C<%foo::SIG> could be used to access signals,
-C<${"foo::!"}> (with strict mode off) to access C's C<errno>, etc.
-
-This was a bug, or an 'unintentional' feature, which caused various ill effects,
-such as signal handlers being wiped when modules were loaded, etc.
-
-This has been fixed (or the feature has been removed, depending on how you see
-it).
-
-=head2 Smart-matching against array slices
-
-Previously, the following code resulted in a successful match:
-
- my @a = qw(a y0 z);
- my @b = qw(a x0 z);
- @a[0 .. $#b] ~~ @b;
-
-This odd behaviour has now been fixed
-L<[perl #77468]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=77468>.
-
-=head2 C API changes
-
-The first argument of the C API function C<Perl_fetch_cop_label> has changed
-from C<struct refcounted he *> to C<COP *>, to better insulate the user from
-implementation details.
-
-This API function was marked as "may change", and likely isn't in use outside
-the core. (Neither an unpacked CPAN, nor Google's codesearch, finds any other
-references to it.)
-
-=head1 Deprecations
-
-=head2 Use of qw(...) as parentheses
-
-Historically the parser fooled itself into thinking that C<qw(...)> literals
-were always enclosed in parentheses, and as a result you could sometimes omit
-parentheses around them:
-
- for $x qw(a b c) { ... }
-
-The parser no longer lies to itself in this way. Wrap the list literal in
-parentheses, like:
-
- for $x (qw(a b c)) { ... }
-
-=head1 Performance Enhancements
-
-=over 4
-
-=item *
-
-Scalars containing regular expressions now only allocate the part of the C<SV>
-body they actually use, saving some space.
-
-=item *
-
-Compiling regular expressions has been made faster for the case where upgrading
-the regex to utf8 is necessary but that isn't known when the compilation begins.
-
-=back
-
-=head1 Modules and Pragmata
-
-=head2 Updated Modules and Pragmata
-
-=over 4
-
-=item C<bignum>
-
-Upgraded from version 0.23 to 0.25.
-
-=item C<blib>
-
-Upgraded from version 1.05 to 1.06.
-
-=item C<open>
-
-Upgraded from version 1.07 to 1.08.
-
-=item C<threads-shared>
-
-Upgraded from version 1.33_02 to 1.33_03.
-
-=item C<warnings> and C<warnings::register>
-
-Upgraded from version 1.10 to 1.11 and from version 1.01 to 1.02 respectively.
-
-It is now possible to register warning categories other than the names of
-packages using C<warnings::register>. See L<perllexwarn> for more information.
-
-=item C<B::Debug>
-
-Upgraded from version 1.12 to 1.16.
-
-=item C<CPANPLUS::Dist::Build>
-
-Upgraded from version 0.46 to 0.48.
-
-=item C<Data::Dumper>
-
-Upgraded from version 2.126 to 2.128.
-
-This fixes a crash when using custom sort functions that might cause the stack
-to change.
-
-=item C<Encode>
-
-Upgraded from version 2.39 to 2.40.
-
-=item C<Errno>
-
-Upgraded from version 1.12 to 1.13.
-
-On some platforms with unusual header files, like Win32/gcc using mingw64
-headers, some constants which weren't actually error numbers have been exposed
-by C<Errno>. This has been fixed
-L<[perl #77416]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=77416>.
-
-=item C<ExtUtils::MakeMaker>
-
-Upgraded from version 6.5601 to 6.57_05.
-
-=item C<Filter::Simple>
-
-Upgraded from version 0.84 to 0.85.
-
-=item C<Hash::Util>
-
-Upgraded from version 0.08 to 0.09.
-
-=item C<Math::BigInt>
-
-Upgraded from version 1.89_01 to 1.95.
-
-This fixes, among other things, incorrect results when computing binomial
-coefficients
-L<[perl #77640]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77640>.
-
-=item C<Math::BigInt::FastCalc>
-
-Upgraded from version 0.19 to 0.22.
-
-=item C<Math::BigRat>
-
-Upgraded from version 0.24 to 0.26.
-
-=item C<Module::CoreList>
-
-Upgraded from version 2.37 to 2.38.
-
-=item C<PerlIO::scalar>
-
-Upgraded from version 0.08 to 0.09.
-
-=item C<POSIX>
-
-Upgraded from version 1.19 to 1.20.
-
-It now includes constants for POSIX signal constants.
-
-=item C<Safe>
-
-Upgraded from version 2.27 to 2.28.
-
-This fixes a possible infinite loop when looking for coderefs.
-
-=item C<Test::Simple>
-
-Upgraded from version 0.96 to 0.97_01.
-
-=item C<Tie::Hash>
-
-Upgraded from version 1.03 to 1.04.
-
-Calling C<< Tie::Hash-E<gt>TIEHASH() >> used to loop forever. Now it C<croak>s.
-
-=item C<Unicode::Collate>
-
-Upgraded from version 0.56 to 0.59.
-
-=item C<XSLoader>
-
-Upgraded from version 0.10 to 0.11.
-
-=back
-
-=head1 Documentation
-
-=head2 Changes to Existing Documentation
-
-=head3 L<perlapi>
-
-=over 4
-
-=item *
-
-Many of the optree construction functions are now documented.
-
-=back
-
-=head3 L<perlbook>
-
-=over 4
-
-=item *
-
-Expanded to cover many more popular books.
-
-=back
-
-=head3 L<perlfaq>
-
-=over 4
-
-=item *
-
-L<perlfaq>, L<perlfaq2>, L<perlfaq4>, L<perlfaq5>, L<perlfaq6>, L<perlfaq8>, and
-L<perlfaq9> have seen various updates and modernizations.
-
-=back
-
-=head1 Diagnostics
-
-The following additions or changes have been made to diagnostic output,
-including warnings and fatal error messages. For the complete list of
-diagnostic messages, see L<perldiag>.
-
-=head2 New Diagnostics
-
-=over 4
-
-=item *
-
-Parsing code internal error (%s)
-
-New fatal error produced when parsing code supplied by an extension violated the
-parser's API in a detectable way.
-
-=item *
-
-Use of qw(...) as parentheses is deprecated
-
-See L</"Use of qw(...) as parentheses"> for details.
-
-=back
-
-=head2 Changes to Existing Diagnostics
-
-=over 4
-
-=item *
-
-C<warn> and C<die> now produce 'Wide character' warnings when fed a
-character outside the byte range if STDERR is a byte-sized handle.
-
-=back
-
-=head1 Utility Changes
-
-=head3 L<h2ph>
-
-=over 4
-
-=item *
-
-The use of a deprecated C<goto> construct has been removed
-L<[perl #74404]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=74404>.
-
-=back
-
-=head1 Testing
-
-=over 4
-
-=item *
-
-The new F<t/lib/universal.t> script tests the Internal::* functions and other
-things in F<universal.c>.
-
-=item *
-
-A rare race condition in F<t/op/while_readdir.t> has been fixed, stopping it
-from failing randomly when running tests in parallel.
-
-=item *
-
-The new F<t/op/leaky-magic.t> script tests that magic applied to variables in
-the main packages does not affect other packages.
-
-=back
-
-=head1 Platform Support
-
-=head2 Platform-Specific Notes
-
-=over 4
-
-=item VMS
-
-=over 4
-
-=item *
-
-Make C<PerlIOUnix_open> honour default permissions on VMS.
-
-When C<perlio> became the default and C<unixio> became the default bottom layer,
-the most common path for creating files from Perl became C<PerlIOUnix_open>,
-which has always explicitly used C<0666> as the permission mask.
-
-To avoid this, C<0777> is now passed as the permissions to C<open()>. In the
-VMS CRTL, C<0777> has a special meaning over and above intersecting with the
-current umask; specifically, it allows Unix syscalls to preserve native default
-permissions.
-
-=back
-
-=back
-
-=head1 Internal Changes
-
-=over 4
-
-=item *
-
-C<CALL_FPTR> and C<CPERLscope> have been deprecated.
-
-Those are left from an old implementation of C<MULTIPLICITY> using C++ objects,
-which was removed in Perl 5.8. Nowadays these macros do exactly nothing, so
-they shouldn't be used anymore.
-
-For compatibility, they are still defined for external C<XS> code. Only
-extensions defining C<PERL_CORE> must be updated now.
-
-=item *
-
-C<lex_stuff_pvs()> has been added as a convenience macro wrapping
-C<lex_stuff_pvn()> for literal strings.
-
-=item *
-
-The recursive part of the peephole optimizer is now hookable.
-
-In addition to C<PL_peepp>, for hooking into the toplevel peephole optimizer, a
-C<PL_rpeepp> is now available to hook into the optimizer recursing into
-side-chains of the optree.
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-A regression introduced in Perl 5.12.0, making
-C<< my $x = 3; $x = length(undef) >> result in C<$x> set to C<3> has been
-fixed. C<$x> will now be C<undef>.
-
-=item *
-
-A fatal error in regular expressions when processing UTF-8 data has been fixed
-L<[perl #75680]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75680>.
-
-=item *
-
-An erroneous regular expression engine optimization that caused regex verbs like
-C<*COMMIT> to sometimes be ignored has been removed.
-
-=item *
-
-The Perl debugger now also works in taint mode
-L<[perl #76872]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76872>.
-
-=item *
-
-Several memory leaks in cloning and freeing threaded Perl interpreters have been
-fixed L<[perl #77352]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77352>.
-
-=item *
-
-A possible string corruption when doing regular expression matches on overloaded
-objects has been fixed
-L<[perl #77084]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77084>.
-
-=item *
-
-Magic applied to variables in the main package no longer affects other packages.
-See L</Magic variables outside the main package> above
-L<[perl #76138]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76138>.
-
-=item *
-
-Opening a glob reference via C<< open $fh, "E<gt>", \*glob >> will no longer
-cause the glob to be corrupted when the filehandle is printed to. This would
-cause perl to crash whenever the glob's contents were accessed
-L<[perl #77492]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77492>.
-
-=item *
-
-The postincrement and postdecrement operators, C<++> and C<-->, used to cause
-leaks when being used on references. This has now been fixed.
-
-=item *
-
-A bug when replacing the glob of a loop variable within the loop has been fixed
-L<[perl #21469]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=21469>. This
-means the following code will no longer crash:
-
- for $x (...) {
- *x = *y;
- }
-
-=item *
-
-Perl would segfault if the undocumented C<Internals> functions that used
-reference prototypes were called with the C<&foo()> syntax, e.g.
-C<&Internals::SvREADONLY(undef)>
-L<[perl #77776]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77776>.
-
-These functions now call C<SvROK> on their arguments before dereferencing them
-with C<SvRV>, and we test for this case in F<t/lib/universal.t>.
-
-=item *
-
-When assigning a list with duplicated keys to a hash, the assignment used to
-return garbage and/or freed values:
-
- @a = %h = (list with some duplicate keys);
-
-This has now been fixed
-L<[perl #31865]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=31865>.
-
-=item *
-
-An earlier release of the 5.13 series of Perl changed the semantics of opening a
-reference to a copy of a glob:
-
- my $var = *STDOUT;
- open my $fh, '>', \$var;
-
-This was a mistake, and the previous behaviour from Perl 5.10 and 5.12, which is
-to treat \$var as a scalar reference, has now been restored.
-
-=item *
-
-The regular expression bracketed character class C<[\8\9]> was effectively the
-same as C<[89\000]>, incorrectly matching a NULL character. It also gave
-incorrect warnings that the C<8> and C<9> were ignored. Now C<[\8\9]> is the
-same as C<[89]> and gives legitimate warnings that C<\8> and C<\9> are
-unrecognized escape sequences, passed-through.
-
-=item *
-
-C<warn()> and C<die()> now respect utf8-encoded scalars
-L<[perl #45549]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=45549>.
-
-=back
-
-=head1 Known Problems
-
-=over 4
-
-=item *
-
-The upgrade to Encode-2.40 has caused some tests in the libwww-perl distribution
-on CPAN to fail. (Specifically, F<base/message-charset.t> tests 33-36 in version
-5.836 of that distribution now fail.)
-
-=item *
-
-The upgrade to ExtUtils-MakeMaker-6.57_05 has caused some tests in the
-Module-Install distribution on CPAN to fail. (Specifically, F<02_mymeta.t> tests
-5 and 21, F<18_all_from.t> tests 6 and 15, F<19_authors.t> tests 5, 13, 21 and
-29, and F<20_authors_with_special_characters.t> tests 6, 15 and 23 in version
-1.00 of that distribution now fail.)
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.13.5 represents approximately one month of development since
-Perl 5.13.4 and contains 74558 lines of changes across 549 files
-from 45 authors and committers:
-
-Abigail, Alexander Alekseev, Aristotle Pagaltzis, Ben Morrow, Bram, brian d foy,
-Chas. Owens, Chris 'BinGOs' Williams, Craig A. Berry, Curtis Jewell, Dagfinn
-Ilmari Mannsåker, David Golden, David Leadbeater, David Mitchell, Eric Brine,
-Father Chrysostomos, Florian Ragwitz, Gisle Aas, Jan Dubois, Jerry D. Hedden,
-Jesse Vincent, Jim Cromie, Jirka Hruška, Karl Williamson, Michael G. Schwern,
-Nicholas Clark, Paul Johnson, Philippe Bruhat (BooK), Piotr Fusik, Rafael
-Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes, Rob Hoelz, Robin
-Barker, Steffen Mueller, Steve Hay, Steve Peters, Todd Rinaldo, Tony Cook,
-Vincent Pit, Yves Orton, Zefram, Zsbán Ambrus, Ævar Arnfjörð Bjarmason.
-
-Many of the changes included in this version originated in the CPAN
-modules included in Perl's core. We're grateful to the entire CPAN
-community for helping Perl to flourish.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5136delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5136delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5136delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,799 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl5136delta - what is new for perl v5.13.6
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.13.5 release and
-the 5.13.6 release.
-
-If you are upgrading from an earlier release such as 5.13.4, first read
-L<perl5135delta>, which describes differences between 5.13.4 and
-5.13.5.
-
-=head1 Core Enhancements
-
-=head2 C<(?^...)> regex construct added to signify default modifiers
-
-A caret (also called a "circumflex accent") C<"^"> immediately following
-a C<"(?"> in a regular expression now means that the subexpression is to
-not inherit the surrounding modifiers such as C</i>, but to revert to the
-Perl defaults. Any modifiers following the caret override the defaults.
-
-The stringification of regular expressions now uses this
-notation. E.g., before, C<qr/hlagh/i> would be stringified as
-C<(?i-xsm:hlagh)>, but now it's stringified as C<(?^i:hlagh)>.
-
-The main purpose of this is to allow tests that rely on the
-stringification to not have to change when new modifiers are added.
-See L<perlre/Extended Patterns>.
-
-=head2 C<"d">, C<"l">, and C<"u"> regex modifiers added
-
-These modifiers are currently only available within a C<(?...)> construct.
-
-The C<"l"> modifier says to compile the regular expression as if it were
-in the scope of C<use locale>, even if it is not.
-
-The C<"u"> modifier says to compile the regular expression as if it were
-in the scope of a C<use feature "unicode_strings"> pragma.
-
-The C<"d"> modifier is used to override any C<use locale> and
-C<use feature "unicode_strings"> pragmas that are in effect at the time
-of compiling the regular expression.
-
-See just below and L<perlre/(?dlupimsx-imsx)>.
-
-=head2 C<use feature "unicode_strings"> now applies to some regex matching
-
-Another chunk of the L<perlunicode/The "Unicode Bug"> is fixed in this
-release. Now, regular expressions compiled within the scope of the
-"unicode_strings" feature will match the same whether or not the target
-string is encoded in utf8, with regard to C<\s>, C<\w>, C<\b>, and their
-complements. Work is underway to add the C<[[:posix:]]> character
-classes and case sensitive matching to the control of this feature, but
-was not complete in time for this dot release.
-
-=head2 C<\N{...}> now handles Unicode named character sequences
-
-Unicode has a number of named character sequences, in which particular sequences
-of code points are given names. C<\N{...}> now recognizes these.
-See L<charnames>.
-
-=head2 New function C<charnames::string_vianame()>
-
-This function is a run-time version of C<\N{...}>, returning the string
-of characters whose Unicode name is its parameter. It can handle
-Unicode named character sequences, whereas the pre-existing
-C<charnames::vianame()> cannot, as the latter returns a single code
-point.
-See L<charnames>.
-
-=head2 Reentrant regular expression engine
-
-It is now safe to use regular expressions within C<(?{...})> and
-C<(??{...})> code blocks inside regular expressions.
-
-These block are still experimental, however, and still have problems with
-lexical (C<my>) variables, lexical pragmata and abnormal exiting.
-
-=head2 Custom per-subroutine check hooks
-
-XS code in an extension module can now annotate a subroutine (whether
-implemented in XS or in Perl) so that nominated XS code will be called
-at compile time (specifically as part of op checking) to change the op
-tree of that subroutine. The compile-time check function (supplied by
-the extension module) can implement argument processing that can't be
-expressed as a prototype, generate customised compile-time warnings,
-perform constant folding for a pure function, inline a subroutine
-consisting of sufficiently simple ops, replace the whole call with a
-custom op, and so on. This was previously all possible by hooking the
-C<entersub> op checker, but the new mechanism makes it easy to tie the
-hook to a specific subroutine. See L<perlapi/cv_set_call_checker>.
-
-To help in writing custom check hooks, several subtasks within standard
-C<entersub> op checking have been separated out and exposed in the API.
-
-=head2 Return value of C<delete $+{...}>
-
-Custom regular expression engines can now determine the return value of
-C<delete> on an entry of C<%+> or C<%->.
-
-=head2 C<keys>, C<values> work on arrays
-
-You can now use the C<keys>, C<values>, C<each> builtin functions on arrays
-(previously you could only use them on hashes). See L<perlfunc> for details.
-This is actually a change introduced in perl 5.12.0, but it was missed from
-that release's perldelta.
-
-=head1 Incompatible Changes
-
-=head2 Stringification of regexes has changed
-
-Default regular expression modifiers are now notated by using
-C<(?^...)>. Code relying on the old stringification will fail. The
-purpose of this is so that when new modifiers are added, such code will
-not have to change (after this one time), as the stringification will
-automatically incorporate the new modifiers.
-
-Code that needs to work properly with both old- and new-style regexes
-can avoid the whole issue by using (for Perls since 5.9.5):
-
- use re qw(regexp_pattern);
- my ($pat, $mods) = regexp_pattern($re_ref);
-
-where C<$re_ref> is a reference to a compiled regular expression. Upon
-return, C<$mods> will be a string containing all the non-default
-modifiers used when the regular expression was compiled, and C<$pattern>
-the actual pattern.
-
-If the actual stringification is important, or older Perls need to be
-supported, you can use something like the following:
-
- # Accept both old and new-style stringification
- my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism';
-
-And then use C<$modifiers> instead of C<-xism>.
-
-=head2 Regular expressions retain their localeness when interpolated
-
-Regular expressions compiled under C<"use locale"> now retain this when
-interpolated into a new regular expression compiled outside a
-C<"use locale">, and vice-versa.
-
-Previously, a regular expression interpolated into another one inherited
-the localeness of the surrounding one, losing whatever state it
-originally had. This is considered a bug fix, but may trip up code that
-has come to rely on the incorrect behavior.
-
-=head2 Directory handles not copied to threads
-
-On systems that do not have a C<fchdir> function, newly-created threads no
-longer inherit directory handles from their parent threads. Such programs
-would probably have crashed anyway
-L<[perl #75154]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75154>.
-
-=head2 Negation treats strings differently from before
-
-The unary negation operator C<-> now treats strings that look like numbers
-as numbers
-L<[perl #57706]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=57706>.
-
-=head2 Negative zero
-
-Negative zero (-0.0), when converted to a string, now becomes "0" on all
-platforms. It used to become "-0" on some, but "0" on others.
-
-If you still need to determine whether a zero is negative, use
-C<sprintf("%g", $zero) =~ /^-/> or the L<Data::Float> module on CPAN.
-
-=head1 Performance Enhancements
-
-=over 4
-
-=item *
-
-The bulk of the C<Tie::Hash::NamedCapture> module used to be in the perl
-core. It has now been moved to an XS module, to reduce the overhead for
-programs that do not use C<%+> or C<%->.
-
-=item *
-
-Eliminate C<PL_*> accessor functions under ithreads.
-
-When C<MULTIPLICITY> was first developed, and interpreter state moved into an
-interpreter struct, thread and interpreter local C<PL_*> variables were defined
-as macros that called accessor functions, returning the address of the value,
-outside of the perl core. The intent was to allow members within the interpreter
-struct to change size without breaking binary compatibility, so that bug fixes
-could be merged to a maintenance branch that necessitated such a size change.
-
-However, some non-core code defines C<PERL_CORE>, sometimes intentionally to
-bypass this mechanism for speed reasons, sometimes for other reasons but with
-the inadvertent side effect of bypassing this mechanism. As some of this code is
-widespread in production use, the result is that the core B<can't> change the
-size of members of the interpreter struct, as it will break such modules
-compiled against a previous release on that maintenance branch. The upshot is
-that this mechanism is redundant, and well-behaved code is penalised by
-it. Hence it can and should be removed.
-
-=back
-
-=head1 Modules and Pragmata
-
-=head2 Updated Modules and Pragmata
-
-=over 4
-
-=item *
-
-C<Archive::Extract> has been upgraded from version 0.42 to 0.44
-
-=item *
-
-C<Carp> has been upgraded from version 1.18 to 1.19.
-
-It no longer autovivifies the C<*CORE::GLOBAL::caller> glob, something it
-started doing in 1.18, which was released with perl 5.13.4
-L<[perl #78082]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=78082>
-
-=item *
-
-C<Compress::Raw::Bzip2> has been upgraded from version 2.030 to 2.031
-
-Updated to use bzip2 1.0.6
-
-=item *
-
-C<CPAN> has been upgraded from version 1.94_57 to 1.94_61
-
-=item *
-
-C<Data::Dumper> has been upgraded from version 2.128 to 2.129.
-
-C<Dumpxs> no longer crashes with globs returned by C<*$io_ref>
-L<[perl #72332]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72332>.
-
-=item *
-
-C<Digest::MD5> has been upgraded from version 2.40 to 2.51.
-
-It is now safe to use this module in combination with threads.
-
-=item *
-
-C<File::DosGlob> has been upgraded from version 1.02 to 1.03.
-
-It allows patterns containing literal parentheses (they no longer need to
-be escaped). On Windows, it no longer adds an extra F<./> to the file names
-returned when the pattern is a relative glob with a drive specification,
-like F<c:*.pl>
-L<[perl #71712]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71712>.
-
-=item *
-
-C<File::Find> has been upgraded from version 1.17 to 1.18.
-
-It improves handling of backslashes on Windows, so that paths such as
-F<c:\dir\/file> are no longer generated
-L<[perl #71710]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71710>.
-
-=item *
-
-C<if> has been upgraded from version 0.05 to 0.06
-
-=item *
-
-C<IPC::Cmd> has been upgraded from version 0.60 to 0.64
-
-=item *
-
-C<IPC::Open3> has been upgraded from version 1.06 to 1.07.
-
-The internal C<xclose> routine now knows how to handle file descriptors, as
-documented, so duplicating STDIN in a child process using its file
-descriptor now works
-L<[perl #76474]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71710>.
-
-=item *
-
-C<Locale::Codes> has been upgraded from version 3.13 to 3.14.
-
-=item *
-
-C<Locale::Maketext> has been upgraded from version 1.15 to 1.16.
-
-It fixes an infinite loop in C<Locale::Maketext::Guts::_compile()> when
-working with tainted values
-(L<CPAN RT #40727|https://rt.cpan.org/Public/Bug/Display.html?id=40727>).
-
-C<< ->maketext >> calls will now backup and restore C<$@> so that error
-messages are not suppressed
-(L<CPAN RT #34182|https://rt.cpan.org/Public/Bug/Display.html?id=34182>).
-
-=item *
-
-C<Math::BigInt> has been upgraded from version 1.95 to 1.97.
-
-This prevents C<sqrt($int)> from crashing under C<use bigrat;>
-L<[perl #73534]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=73534>.
-
-=item *
-
-C<NEXT> has been upgraded from version 0.64 to 0.65.
-
-=item *
-
-C<overload> has been upgraded from version 1.10 to 1.11.
-
-C<overload::Method> can now handle subroutines that are themselves blessed
-into overloaded classes
-L<[perl #71998]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71998>.
-
-=item *
-
-C<PathTools> has been upgraded from version 3.31_01 to 3.34.
-
-=item *
-
-C<podlators> has been upgraded from version 2.3.1 to 2.4.0
-
-=item *
-
-C<sigtrap> has been upgraded from version 1.04 to 1.05.
-
-It no longer tries to modify read-only arguments when generating a
-backtrace
-L<[perl #72340]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72340>.
-
-=item *
-
-C<threads> has been upgraded from version 1.77_03 to 1.81_01.
-
-=item *
-
-C<threads::shared> has been upgrade from version 1.33_03 to 1.34
-
-=item *
-
-C<Unicode::Collate> has been upgraded from version 0.59 to 0.63
-
-U::C::Locale newly supports locales: ar, be, bg, de__phonebook, hu, hy, kk, mk, nso, om,
-tn, vi, hr, ig, ru, sq, se, sr, to and uk
-
-=item *
-
-C<Unicode::Normalize> has been upgraded from version 1.06 to 1.07
-
-=item *
-
-C<B::Deparse> has been upgraded from version 0.98 to 0.99
-
-B::Deparse now properly handles the code that applies a conditional
-pattern match against implicit C<$_> as it was fixed in
-L<[perl #20444]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=20444>.
-
-=item *
-
-C<GDBM_File> has been upgraded from version 1.10 to 1.11
-
-=back
-
-=head1 Documentation
-
-=head2 Changes to Existing Documentation
-
-=head3 L<perlapi>
-
-=over 4
-
-=item *
-
-The documentation for the C<SvTRUE> macro was simply wrong in stating that
-get-magic is not processed. It has been corrected.
-
-=back
-
-=head1 Diagnostics
-
-The following additions or changes have been made to diagnostic output,
-including warnings and fatal error messages. For the complete list of
-diagnostic messages, see L<perldiag>.
-
-=head2 Changes to Existing Diagnostics
-
-=over 4
-
-=item *
-
-The 'Layer does not match this perl' error message has been replaced with
-these more helpful messages:
-
-=over 4
-
-=item *
-
-PerlIO layer function table size (%d) does not match size expected by this
-perl (%d)
-
-=item *
-
-PerlIO layer instance size (%d) does not match size expected by this perl
-(%d)
-
-=back
-
-L<[perl #73754]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=73754>
-
-=back
-
-=head1 Testing
-
-=over 4
-
-=item *
-
-The script F<t/op/threads-dirh.t> has been added, which tests interaction
-of threads and directory handles.
-
-=back
-
-=head1 Platform Support
-
-=head2 Platform-Specific Notes
-
-=over 4
-
-=item IRIX
-
-Conversion of strings to floating-point numbers is now more accurate on
-IRIX systems
-L<[perl #32380]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=32380>.
-
-=item Mac OS X
-
-Early versions of Mac OS X (Darwin) had buggy implementations of the
-C<setregid>, C<setreuid>, C<setrgid> and C<setruid> functions, so perl
-would pretend they did not exist.
-
-These functions are now recognised on Mac OS 10.5 (Leopard; Darwin 9) and
-higher, as they have been fixed
-L<[perl #72990]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72990>.
-
-=item OpenVOS
-
-perl now builds again with OpenVOS (formerly known as Stratus VOS)
-L<[perl #78132]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=78132>.
-
-=item VMS
-
-The shortening of symbols longer than 31 characters in the C sources is
-now done by the compiler rather than by xsubpp (which could only do so
-for generated symbols in XS code).
-
-=item Windows
-
-C<$Config{gccversion}> is now set correctly when perl is built using the
-mingw64 compiler from L<http://mingw64.org>
-L<[perl #73754]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=73754>.
-
-The build process proceeds more smoothly with mingw and dmake when
-F<C:\MSYS\bin> is in the PATH, due to a C<Cwd> fix.
-
-=back
-
-=head1 Internal Changes
-
-=over 4
-
-=item *
-
-See L</Regular expressions retain their localeness when interpolated>,
-above.
-
-=item *
-
-The C<sv_cmp_flags>, C<sv_cmp_locale_flags>, C<sv_eq_flags> and
-C<sv_collxfrm_flags> functions have been added. These are like their
-non-_flags counterparts, but allow one to specify whether get-magic is
-processed.
-
-The C<sv_cmp>, C<sv_cmp_locale>, C<sv_eq> and C<sv_collxfrm> functions have
-been replaced with wrappers around the new functions.
-
-=item *
-
-A new C<sv_2bool_flags> function has been added.
-
-This is like C<sv_2bool>, but it lets the calling code decide whether
-get-magic is handled. C<sv_2bool> is now a macro that calls the new
-function.
-
-=item *
-
-A new macro, C<SvTRUE_nomg>, has been added.
-
-This is like C<SvTRUE>, except that it does not process magic. It uses the
-new C<sv_2bool_flags> function.
-
-=item *
-
-C<sv_catsv_flags> no longer calls C<mg_get> on its second argument (the
-source string) if the flags passed to it do not include SV_GMAGIC. So it
-now matches the documentation.
-
-=item *
-
-A new interface has been added for custom check hooks on subroutines. See
-L</Custom per-subroutine check hooks>, above.
-
-=item *
-
-List op building functions have been added to the
-API. See L<op_append_elem|perlapi/op_append_elem>,
-L<op_append_list|perlapi/op_append_list>, and
-L<op_prepend_elem|perlapi/op_prepend_elem>.
-
-=item *
-
-The L<LINKLIST|perlapi/LINKLIST> macro, part of op building that
-constructs the execution-order op chain, has been added to the API.
-
-=item *
-
-Many functions ending with pvn now have equivalent pv/pvs/sv versions.
-
-=item *
-
-The C<save_freeop>, C<save_op>, C<save_pushi32ptr> and C<save_pushptrptr>
-functions have been added to the API.
-
-=item *
-
-The new API function C<parse_stmtseq()> parses a sequence of statements, up
-to closing brace or EOF.
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-A regular expression match in the right-hand side of a global substitution
-(C<s///g>) that is in the same scope will no longer cause match variables
-to have the wrong values on subsequent iterations. This can happen when an
-array or hash subscript is interpolated in the right-hand side, as in
-C<s|(.)|@a{ print($1), /./ }|g>
-L<[perl #19078]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=19078>.
-
-=item *
-
-Constant-folding used to cause
-
- $text =~ ( 1 ? /phoo/ : /bear/)
-
-to turn into
-
- $text =~ /phoo/
-
-at compile time. Now it correctly matches against C<$_>
-L<[perl #20444]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=20444>.
-
-=item *
-
-Parsing Perl code (either with string C<eval> or by loading modules) from
-within a C<UNITCHECK> block no longer causes the interpreter to crash
-L<[perl #70614]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=70614>.
-
-=item *
-
-When C<-d> is used on the shebang (C<#!>) line, the debugger now has access
-to the lines of the main program. In the past, this sometimes worked and
-sometimes did not, depending on what order things happened to be arranged
-in memory
-L<[perl #71806]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71806>.
-
-=item *
-
-The C<y///> or C<tr///> operator now calls get-magic (e.g., the C<FETCH>
-method of a tie) on its left-hand side just once, not twice
-L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>.
-
-=item *
-
-String comparison (C<eq>, C<ne>, C<lt>, C<gt>, C<le>, C<ge> and
-C<cmp>) and logical not (C<not> and C<!>) operators no longer call magic
-(e.g., tie methods) twice on their operands
-L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>.
-
-This bug was introduced in an earlier 5.13 release, and does not affect
-perl 5.12.
-
-=item *
-
-When a tied (or other magic) variable is used as, or in, a regular
-expression, it no longer has its C<FETCH> method called twice
-L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>.
-
-This bug was introduced in an earlier 5.13 release, and does not affect
-perl 5.12.
-
-=item *
-
-The C<-C> command line option can now be followed by other options
-L<[perl #72434]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72434>.
-
-=item *
-
-Assigning a glob to a PVLV used to convert it to a plain string. Now it
-works correctly, and a PVLV can hold a glob. This would happen when a
-nonexistent hash or array element was passed to a subroutine:
-
- sub { $_[0] = *foo }->($hash{key});
- # $_[0] would have been the string "*main::foo"
-
-It also happened when a glob was assigned to, or returned from, an element
-of a tied array or hash
-L<[perl #36051]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=36051>.
-
-=item *
-
-Creating a new thread when directory handles were open used to cause a
-crash, because the handles were not cloned, but simply passed to the new
-thread, resulting in a double free.
-
-Now directory handles are cloned properly, on systems that have a C<fchdir>
-function. On other systems, new threads simply do not inherit directory
-handles from their parent threads
-L<[perl #75154]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75154>.
-
-=item *
-
-The regular expression parser no longer hangs when parsing C<\18> and
-C<\88>.
-
-This bug was introduced in version 5.13.5 and did not affect earlier
-versions
-L<[perl #78058]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78058>.
-
-=item *
-
-Subroutine redefinition works once more in the debugger
-L<[perl #48332]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=48332>.
-
-=item *
-
-The C<&> C<|> C<^> bitwise operators no longer coerce read-only arguments
-L<[perl #20661]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=20661>.
-
-=item *
-
-Stringifying a scalar containing -0.0 no longer has the affect of turning
-false into true
-L<[perl #45133]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=45133>.
-
-=item *
-
-Aliasing packages by assigning to globs or deleting packages by deleting
-their containing stash elements used to have erratic effects on method
-resolution, because the internal 'isa' caches were not reset. This has been
-fixed.
-
-=item *
-
-C<sort> with a custom sort routine could crash if too many nested
-subroutine calls occurred from within the sort routine
-L<[perl #77930]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77930>.
-
-This bug was introduced in an earlier 5.13 release, and did not affect
-perl 5.12.
-
-=item *
-
-The C<eval_sv> and C<eval_pv> C functions now set C<$@> correctly when
-there is a syntax error and no C<G_KEEPERR> flag, and never set it if the
-C<G_KEEPERR> flag is present
-L<[perl #3719]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=3719>.
-
-=item *
-
-Nested C<map> and C<grep> blocks no longer leak memory when processing
-large lists
-L<[perl #48004]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=48004>.
-
-=item *
-
-Malformed C<version> objects no longer cause crashes
-L<[perl #78286]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78286>.
-
-=item *
-
-The interpreter no longer crashes when freeing deeply-nested arrays of
-arrays. Hashes have not been fixed yet
-L<[perl #44225]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=44225>.
-
-=item *
-
-The mechanism for freeing objects in globs used to leave dangling
-pointers to freed SVs, meaning Perl users could see corrupted state
-during destruction.
-
-Perl now only frees the affected slots of the GV, rather than freeing
-the GV itself. This makes sure that there are no dangling refs or
-corrupted state during destruction.
-
-=item *
-
-The typeglob C<*,>, which holds the scalar variable C<$,> (output field
-separator), had the wrong reference count in child threads.
-
-=item *
-
-C<splice> now calls set-magic. This means that, for instance, changes made
-by C<splice @ISA> are respected by method calls
-L<[perl #78400]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78400>.
-
-=item *
-
-C<use v5.8> no longer leaks memory
-L<[perl #78436]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78436>.
-
-=item *
-
-The XS multicall API no longer causes subroutines to lose reference counts
-if called via the multicall interface from within those very subroutines.
-This affects modules like List::Util. Calling one of its functions with an
-active subroutine as the first argument could cause a crash
-L<[perl #78070]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78070>.
-
-=back
-
-=head1 Errata
-
-=over 4
-
-=item *
-
-Fixed a typo in L<perl5135delta> regarding array slices and smart matching
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.13.6 represents approximately one month of development since Perl
-5.13.5 and contains 67920 lines of changes across 566 files from 47 authors
-and committers:
-
-A. Sinan Unur, Aaron Crane, Alex Davies, Ali Polatel, Allen Smith, Andrew Rodland,
-Andy Dougherty, Ben Morrow, brian d foy, Casey West, Chip Salzenberg, Chris
-'BinGOs' Williams, Craig A. Berry, David Golden, David Mitchell, Eric Brine,
-Father Chrysostomos, Florian Ragwitz, George Greer, gregor herrmann, Jan Dubois,
-Jerry D. Hedden, Jesse Vincent, Joshua Pritikin, Karl Williamson, kmx, Michael
-G Schwern, Mike Kelly, Nicholas Clark, Paul Green, Rafael Garcia-Suarez, Renee
-Baecker, Ricardo Signes, Sisyphus, Slaven Rezic, Steffen Müller, Steve Hay,
-Sullivan Beck, Tatsuhiko Miyagawa, Todd Rinaldo, Tony Cook, Tye McQueen, Vernon
-Lyon, Walt Mankowski, Zefram, Zsbán Ambrus, Ævar Arnfjörð Bjarmason.
-
-Many of the changes included in this version originated in the CPAN
-modules included in Perl's core. We're grateful to the entire CPAN
-community for helping Perl to flourish.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5137delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5137delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5137delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,945 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl5137delta - what is new for perl v5.13.7
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.13.6 release and
-the 5.13.7 release.
-
-If you are upgrading from an earlier release such as 5.13.5, first read
-L<perl5136delta>, which describes differences between 5.13.5 and
-5.13.6.
-
-=head1 Core Enhancements
-
-=head2 Single term prototype
-
-The C<+> prototype is a special alternative to C<$> that will act like
-C<\[@%]> when given a literal array or hash variable, but will otherwise
-force scalar context on the argument. This is useful for functions which
-should accept either a literal array or an array reference as the argument:
-
- sub smartpush (+@) {
- my $aref = shift;
- die "Not an array or arrayref" unless ref $aref eq 'ARRAY';
- push @$aref, @_;
- }
-
-When using the C<+> prototype, your function must check that the argument
-is of an acceptable type.
-
-=head2 C<use re '/flags';>
-
-The C<re> pragma now has the ability to turn on regular expression flags
-till the end of the lexical scope:
-
- use re '/x';
- "foo" =~ / (.+) /; # /x implied
-
-See L<re/"'/flags' mode"> for details.
-
-=head2 Statement labels can appear in more places
-
-Statement labels can now occur before any type of statement or declaration,
-such as C<package>.
-
-=head2 C<use feature "unicode_strings"> now applies to more regex matching
-
-Another chunk of the L<perlunicode/The "Unicode Bug"> is fixed in this
-release. Now, regular expressions compiled within the scope of the
-"unicode_strings" feature (or under the "u" regex modifier (specifiable
-currently only with infix notation C<(?u:...)> or via C<use re '/u'>)
-will match the same whether or not the target string is encoded in utf8,
-with regard to C<[[:posix:]]> character classes
-
-Work is underway to add the case sensitive matching to the control of
-this feature, but was not complete in time for this dot release.
-
-=head2 Array and hash container functions accept references
-
-All built-in functions that operate directly on array or hash
-containers now also accept hard references to arrays or hashes:
-
- |----------------------------+---------------------------|
- | Traditional syntax | Terse syntax |
- |----------------------------+---------------------------|
- | push @$arrayref, @stuff | push $arrayref, @stuff |
- | unshift @$arrayref, @stuff | unshift $arrayref, @stuff |
- | pop @$arrayref | pop $arrayref |
- | shift @$arrayref | shift $arrayref |
- | splice @$arrayref, 0, 2 | splice $arrayref, 0, 2 |
- | keys %$hashref | keys $hashref |
- | keys @$arrayref | keys $arrayref |
- | values %$hashref | values $hashref |
- | values @$arrayref | values $arrayref |
- | ($k,$v) = each %$hashref | ($k,$v) = each $hashref |
- | ($k,$v) = each @$arrayref | ($k,$v) = each $arrayref |
- |----------------------------+---------------------------|
-
-This allows these built-in functions to act on long dereferencing chains
-or on the return value of subroutines without needing to wrap them in
-C<@{}> or C<%{}>:
-
- push @{$obj->tags}, $new_tag; # old way
- push $obj->tags, $new_tag; # new way
-
- for ( keys %{$hoh->{genres}{artists}} ) {...} # old way
- for ( keys $hoh->{genres}{artists} ) {...} # new way
-
-For C<push>, C<unshift> and C<splice>, the reference will auto-vivify
-if it is not defined, just as if it were wrapped with C<@{}>.
-
-Calling C<keys> or C<values> directly on a reference gives a substantial
-performance improvement over explicit dereferencing.
-
-For C<keys>, C<values>, C<each>, when overloaded dereferencing is
-present, the overloaded dereference is used instead of dereferencing the
-underlying reftype. Warnings are issued about assumptions made in the
-following three ambiguous cases:
-
- (a) If both %{} and @{} overloading exists, %{} is used
- (b) If %{} overloading exists on a blessed arrayref, %{} is used
- (c) If @{} overloading exists on a blessed hashref, @{} is used
-
-=head2 y///r
-
-The C</r> flag, which was added to C<s///> in 5.13.2, has been extended to
-the C<y///> operator.
-
-It causes it to perform the substitution on a I<copy> of its operand,
-returning that copy instead of a character count.
-
-=head2 New global variable C<${^GLOBAL_PHASE}>
-
-A new global variable, C<${^GLOBAL_PHASE}>, has been added to allow
-introspection of the current phase of the perl interpreter. It's explained in
-detail in L<perlvar/"${^GLOBAL_PHASE}"> and
-L<perlmod/"BEGIN, UNITCHECK, CHECK, INIT and END">.
-
-=head2 Unicode Version 6.0 is now supported (mostly)
-
-Perl comes with the Unicode 6.0 data base updated with
-L<Corrigendum #8|http://www.unicode.org/versions/corrigendum8.html>,
-with one exception noted below.
-See L<http://unicode.org/versions/Unicode6.0.0> for details on the new
-release. Perl does not support any Unicode provisional properties,
-including the new ones for this release, but their database files are
-packaged with Perl.
-
-Unicode 6.0 has chosen to use the name C<BELL> for the character at U+1F514,
-which is a symbol that looks like a bell, and used in Japanese cell
-phones. This conflicts with the long-standing Perl usage of having
-C<BELL> mean the ASCII C<BEL> character, U+0007. In Perl 5.14,
-C<\N{BELL}> will continue to mean U+0007, but its use will generate a
-deprecated warning message, unless such warnings are turned off. The
-new name for U+0007 in Perl will be C<ALERT>, which corresponds nicely
-with the existing shorthand sequence for it, C<"\a">. C<\N{BEL}> will
-mean U+0007, with no warning given. The character at U+1F514 will not
-have a name in 5.14, but can be referred to by C<\N{U+1F514}>. The plan
-is that in Perl 5.16, C<\N{BELL}> will refer to U+1F514, and so all code
-that uses C<\N{BELL}> should convert by then to using C<\N{ALERT}>,
-C<\N{BEL}>, or C<"\a"> instead.
-
-=head2 Improved support for custom OPs
-
-Custom ops can now be registered with the new C<custom_op_register> C
-function and the C<XOP> structure. This will make it easier to add new
-properties of custom ops in the future. Two new properties have been added
-already, C<xop_class> and C<xop_peep>.
-
-C<xop_class> is one of the OA_*OP constants, and allows L<B> and other
-introspection mechanisms to work with custom ops that aren't BASEOPs.
-C<xop_peep> is a pointer to a function that will be called for ops of this
-type from C<Perl_rpeep>.
-
-See L<perlguts/Custom Operators> and L<perlapi/Custom Operators> for more
-detail.
-
-The old C<PL_custom_op_names>/C<PL_custom_op_descs> interface is still
-supported but discouraged.
-
-=head1 Incompatible Changes
-
-=head2 Dereferencing typeglobs
-
-If you assign a typeglob to a scalar variable:
-
- $glob = *foo;
-
-the glob that is copied to C<$glob> is marked with a special flag
-indicating that the glob is just a copy. This allows subsequent assignments
-to C<$glob> to overwrite the glob. The original glob, however, is
-immutable.
-
-Many Perl operators did not distinguish between these two types of globs.
-This would result in strange behaviour in edge cases: C<untie $scalar>
-would do nothing if the last thing assigned to the scalar was a glob
-(because it treated it as C<untie *$scalar>, which unties a handle).
-Assignment to a glob slot (e.g., C<(*$glob) = \@some_array>) would simply
-assign C<\@some_array> to C<$glob>.
-
-To fix this, the C<*{}> operator (including the C<*foo> and C<*$foo> forms)
-has been modified to make a new immutable glob if its operand is a glob
-copy. Various operators that make a distinction between globs and scalars
-have been modified to treat only immutable globs as globs.
-
-This causes an incompatible change in code that assigns a glob to the
-return value of C<*{}> when that operator was passed a glob copy. Take the
-following code, for instance:
-
- $glob = *foo;
- *$glob = *bar;
-
-The C<*$glob> on the second line returns a new immutable glob. That new
-glob is made an alias to C<*bar>. Then it is discarded. So the second
-assignment has no effect.
-
-It also means that C<tie $handle> will now tie C<$handle> as a scalar, even
-if it has had a glob assigned to it.
-
-The upside to this incompatible change is that bugs
-L<[perl #77496]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77496>,
-L<[perl #77502]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77502>,
-L<[perl #77508]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77508>,
-L<[perl #77688]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77688>,
-and
-L<[perl #77812]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77812>,
-and maybe others, too, have been fixed.
-
-See L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=77810> for even
-more detail.
-
-=head2 Clearing stashes
-
-Stash list assignment C<%foo:: = ()> used to make the stash anonymous
-temporarily while it was being emptied. Consequently, any of its
-subroutines referenced elsewhere would become anonymous (showing up as
-"(unknown)" in C<caller>). Now they retain their package names, such that
-C<caller> will return the original sub name if there is still a reference
-to its typeglob, or "foo::__ANON__" otherwise
-L<[perl #79208]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79208>.
-
-=head1 Deprecations
-
-=head2 C<\N{BELL}> is deprecated
-
-This is because Unicode is using that name for a different character.
-See L</Unicode Version 6.0 is now supported (mostly)> for more
-explanation.
-
-=head1 Performance Enhancements
-
-=over 4
-
-=item *
-
-When an object has many weak references to it, freeing that object
-can under some some circumstances take O(N^2) time to free (where N is the
-number of references). The number of circumstances has been reduced.
-L<[perl #75254]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75254>.
-
-=back
-
-=head1 Modules and Pragmata
-
-=head2 New Modules and Pragmata
-
-=over 4
-
-=item *
-
-The following modules were added by the C<Unicode::Collate>
-upgrade from 0.63 to 0.67. See below for details.
-
-C<Unicode::Collate::CJK::Big5>
-
-C<Unicode::Collate::CJK::GB2312>
-
-C<Unicode::Collate::CJK::JISX0208>
-
-C<Unicode::Collate::CJK::Korean>
-
-C<Unicode::Collate::CJK::Pinyin>
-
-C<Unicode::Collate::CJK::Stroke>
-
-=back
-
-=head2 Updated Modules and Pragmata
-
-=over 4
-
-=item *
-
-C<Archive::Extract> has been upgraded from 0.44 to 0.46
-
-Resolves an issue with NetBSD-current and its new unzip
-executable.
-
-=item *
-
-C<Archive::Tar> has been upgraded from 1.68 to 1.72
-
-This adds the ptargrep utility for using regular expressions against
-the contents of files in a tar archive.
-
-=item *
-
-C<B> has been upgraded from 1.24 to 1.26.
-
-It no longer crashes when taking apart a C<y///> containing characters
-outside the octet range or compiled in a C<use utf8> scope.
-
-The size of the shared object has been reduced by about 40%, with no
-reduction in functionality.
-
-=item *
-
-C<B::Deparse> has been upgraded from 0.99 to 1.01.
-
-It fixes deparsing of C<our> followed by a variable with funny characters
-(as permitted under the C<utf8> pragma)
-L<[perl #33752]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=33752>.
-
-=item *
-
-C<CGI> has been upgraded from 3.49 to 3.50
-
-This provides the following security fixes: the MIME boundary in
-multipart_init is now random and improvements to the handling of
-newlines embedded in header values.
-
-The documentation for param_fetch() has been corrected and clarified.
-
-=item *
-
-C<CPAN> has been upgraded from 1.94_61 to 1.94_62
-
-=item *
-
-C<CPANPLUS> has been upgraded from 0.9007 to 0.9010
-
-Fixes for the SQLite source engine and resolving of issues with the
-testsuite when run under local::lib and/or cpanminus
-
-=item *
-
-C<CPANPLUS::Dist::Build> has been upgraded from 0.48 to 0.50
-
-=item *
-
-C<Data::Dumper> has been upgraded from 2.129 to 2.130_01.
-
-=item *
-
-C<DynaLoader> has been upgraded from 1.10 to 1.11.
-
-It fixes a buffer overflow when passed a very long file name.
-
-=item *
-
-C<ExtUtils::Constant> has been upgraded from 0.22 to 0.23.
-
-The C<AUTOLOAD> helper code generated by C<ExtUtils::Constant::ProxySubs>
-can now C<croak> for missing constants, or generate a complete C<AUTOLOAD>
-subroutine in XS, allowing simplification of many modules that use it.
-(C<Fcntl>, C<File::Glob>, C<GDBM_File>, C<I18N::Langinfo>, C<POSIX>, C<Socket>)
-
-C<ExtUtils::Constant::ProxySubs> can now optionally push the names of all
-constants onto the package's C{@EXPORT_OK}. This has been used to replace
-less space-efficient code in C<B>, helping considerably shrink the size of its
-shared object.
-
-=item *
-
-C<Fcntl> has been upgraded from 1.09 to 1.10.
-
-=item *
-
-C<File::Fetch> has been upgraded from 0.24 to 0.28
-
-C<HTTP::Lite> is now supported for 'http' scheme.
-
-The C<fetch> utility is supported on FreeBSD, NetBSD and
-Dragonfly BSD for the C<http> and C<ftp> schemes.
-
-=item *
-
-C<File::Glob> has been upgraded from 1.09 to 1.10.
-
-=item *
-
-C<File::stat> has been upgraded from 1.03 to 1.04.
-
-The C<-x> and C<-X> file test operators now work correctly under the root
-user.
-
-=item *
-
-C<GDBM_File> has been upgraded from 1.11 to 1.12.
-
-This fixes a memory leak when DBM filters are used.
-
-=item *
-
-C<Hash::Util> has been upgraded from 0.09 to 0.10.
-
-=item *
-
-C<Hash::Util::FieldHash> has been upgraded from 1.05 to 1.06.
-
-=item *
-
-C<I18N::Langinfo> has been upgraded from 0.06 to 0.07.
-
-=item *
-
-C<Locale::Maketext> has been upgraded from 1.16 to 1.17.
-
-=item *
-
-C<Math::BigInt> has been upgraded from 1.97 to 1.99_01.
-
-=item *
-
-C<Math::BigRat> has been upgraded from 0.26 to 0.26_01
-
-=item *
-
-C<Math::BigInt::FastCalc> has been upgraded from 0.22 to 0.24_01.
-
-=item *
-
-C<MIME::Base64> has been upgraded from 3.09 to 3.10
-
-Includes new functions to calculate the length of encoded and decoded
-base64 strings.
-
-=item *
-
-C<mro> has been upgraded from 1.04 to 1.05.
-
-=item *
-
-C<NDBM_File> has been upgraded from 1.09 to 1.10.
-
-This fixes a memory leak when DBM filters are used.
-
-=item *
-
-C<ODBM_File> has been upgraded from 1.08 to 1.09.
-
-This fixes a memory leak when DBM filters are used.
-
-=item *
-
-C<Opcode> has been upgraded from 1.16 to 1.17.
-
-=item *
-
-C<parent> has been upgraded from 0.223 to 0.224
-
-=item *
-
-C<Pod::Simple> has been upgraded from 3.14 to 3.15
-
-Includes various fixes to C<HTML> and C<XHTML> handling.
-
-=item *
-
-C<POSIX> has been upgraded from 1.21 to 1.22.
-
-=item *
-
-C<re> has been upgraded from 0.13 to 0.14, for the sake of the new
-C<use re "/flags"> pragma.
-
-=item *
-
-C<Safe> has been upgraded from 2.28 to 2.29.
-
-It adds C<&version::vxs::VCMP> to the default share.
-
-=item *
-
-C<SDBM_File> has been upgraded from 1.07 to 1.08.
-
-=item *
-
-C<SelfLoader> has been upgraded from 1.17 to 1.18.
-
-It now works in taint mode
-L<[perl #72062]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72062>.
-
-=item *
-
-C<Socket> has been upgraded from 1.90 to 1.91.
-
-=item *
-
-C<Storable> has been upgraded from 2.22 to 2.24
-
-Includes performance improvement for overloaded classes.
-
-=item *
-
-C<Sys::Hostname> has been upgraded from 1.13 to 1.14.
-
-=item *
-
-C<Unicode::Collate> has been upgraded from 0.63 to 0.67
-
-This release newly adds locales C<ja> C<ko> and C<zh> and its variants
-( C<zh__big5han>, C<zh__gb2312han>, C<zh__pinyin>, C<zh__stroke> ).
-
-Supported UCA_Version 22 for Unicode 6.0.0.
-
-The following modules have been added:
-
-C<Unicode::Collate::CJK::Big5> for C<zh__big5han> which makes
-tailoring of CJK Unified Ideographs in the order of CLDR's big5han ordering.
-
-C<Unicode::Collate::CJK::GB2312> for C<zh__gb2312han> which makes
-tailoring of CJK Unified Ideographs in the order of CLDR's gb2312han ordering.
-
-C<Unicode::Collate::CJK::JISX0208> which makes tailoring of 6355 kanji
-(CJK Unified Ideographs) in the JIS X 0208 order.
-
-C<Unicode::Collate::CJK::Korean> which makes tailoring of CJK Unified Ideographs
-in the order of CLDR's Korean ordering.
-
-C<Unicode::Collate::CJK::Pinyin> for C<zh__pinyin> which makes
-tailoring of CJK Unified Ideographs in the order of CLDR's pinyin ordering.
-
-C<Unicode::Collate::CJK::Stroke> for C<zh__stroke> which makes
-tailoring of CJK Unified Ideographs in the order of CLDR's stroke ordering.
-
-=back
-
-=head1 Documentation
-
-L<perlvar> reorders the variables and groups them by topic. Each variable
-introduced after Perl 5.000 notes the first version in which it is
-available. L<perlvar> also has a new section for deprecated variables to
-note when they were removed.
-
-=head2 New Documentation
-
-=head3 L<perlpodstyle>
-
-New style guide for POD documentation,
-split mostly from the NOTES section of the pod2man man page.
-
-( This was added to C<v5.13.6> but was not documented with that release ).
-
-=head2 Changes to Existing Documentation
-
-=over
-
-=item *
-
-Array and hash slices in scalar context are now documented in L<perldata>.
-
-=item *
-
-L<perlform> and L<perllocale> have been corrected to state that
-C<use locale> affects formats.
-
-=back
-
-=head1 Diagnostics
-
-=head2 New Diagnostics
-
-=over 4
-
-=item *
-
-"Using !~ with %s doesn't make sense": This message was actually added in
-5.13.2, but was omitted from perldelta. It now applies also to the C<y///>
-operator, and has been documented.
-
-=back
-
-=head1 Utility Changes
-
-=head3 L<ptargrep>
-
-=over 4
-
-=item *
-
-L<ptargrep> is a utility to apply pattern matching to the contents of files
-in a tar archive. It comes with C<Archive::Tar>.
-
-=back
-
-=head1 Testing
-
-=over 4
-
-=item *
-
-The new F<t/mro/isa_aliases.t> has been added, which tests that
-C<*Foo::ISA = *Bar::ISA> works properly.
-
-=item *
-
-F<t/mro/isarev.t> has been added, which tests that C<PL_isarev> (accessible
-at the Perl level via C<mro::get_isarev>) is updated properly.
-
-=item *
-
-F<t/run/switchd-78586.t> has been added, which tests that
-L<[perl #78586]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78586>
-has been fixed (related to line numbers in the debugger).
-
-=back
-
-=head1 Platform Support
-
-=head2 Platform-Specific Notes
-
-=over 4
-
-=item Windows
-
-Directory handles are now properly cloned when threads are created. In perl
-5.13.6, child threads simply stopped inheriting directory handles. In
-previous versions, threads would share handles, resulting in crashes.
-
-Support for building with Visual C++ 2010 is now underway, but is not yet
-complete. See F<README.win32> for more details.
-
-=item VMS
-
-Record-oriented files (record format variable or variable with fixed control)
-opened for write by the perlio layer will now be line buffered to prevent the
-introduction of spurious line breaks whenever the perlio buffer fills up.
-
-=back
-
-=head1 Internal Changes
-
-=over 4
-
-=item *
-
-C<lex_start> has been added to the API, but is considered experimental.
-
-=item *
-
-A new C<parse_block> function has been added to the API
-L<[perl #78222]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78222>.
-
-=item *
-
-A new, experimental API has been added for accessing the internal
-structure that Perl uses for C<%^H>. See the functions beginning with
-C<cophh_> in L<perlapi>.
-
-=item *
-
-A stash can now have a list of effective names in addition to its usual
-name. The first effective name can be accessed via the C<HvENAME> macro,
-which is now the recommended name to use in MRO linearisations (C<HvNAME>
-being a fallback if there is no C<HvENAME>).
-
-These names are added and deleted via C<hv_ename_add> and
-C<hv_ename_delete>. These two functions are I<not> part of the API.
-
-=item *
-
-The way the parser handles labels has been cleaned up and refactored. As a
-result, the C<newFOROP()> constructor function no longer takes a parameter
-stating what label is to go in the state op.
-
-=item *
-
-The C<newWHILEOP()> and C<newFOROP()> functions no longer accept a line
-number as a parameter.
-
-=item *
-
-A new C<parse_barestmt()> function has been added, for parsing a statement
-without a label.
-
-=item *
-
-A new C<parse_label()> function has been added, that parses a statement
-label, separate from statements.
-
-=item *
-
-The C<CvSTASH()> macro can now only be used as an rvalue. C<CvSTASH_set()>
-has been added to replace assignment to C<CvSTASH()>. This is to ensure
-that backreferences are handled properly. These macros are not part of the
-API.
-
-=item *
-
-The C<op_scope()> and C<op_lvalue()> functions have been added to the API,
-but are considered experimental.
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-The C<parse_stmt> C function added in earlier in the 5.13.x series has been
-fixed to work with statements ending with C<}>
-L<[perl #78222]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78222>.
-
-=item *
-
-The C<parse_fullstmt> C function added in 5.13.5 has been fixed to work
-when called while an expression is being parsed.
-
-=item *
-
-Characters in the Latin-1 non-ASCII range (0x80 to 0xFF) used not to match
-themselves if the string happened to be UTF8-encoded internally, the
-regular expression was not, and the character in the regular expression was
-inside a repeated group (e.g.,
-C<Encode::decode_utf8("\303\200") =~ /(\xc0)+/>)
-L<[perl #78464]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78464>.
-
-=item *
-
-The C<(?d)> regular expression construct now overrides a previous C<(?u)>
-or C<use feature "unicode_string">
-L<[perl #78508]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78508>.
-
-=item *
-
-A memory leak in C<do "file">, introduced in perl 5.13.6, has been fixed
-L<[perl #78488]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78488>.
-
-=item *
-
-Various bugs related to typeglob dereferencing have been fixed. See
-L</Dereferencing typeglobs>, above.
-
-=item *
-
-The C<SvPVbyte> function available to XS modules now calls magic before
-downgrading the SV, to avoid warnings about wide characters
-L<[perl #72398]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72398>.
-
-=item *
-
-The C<=> operator used to ignore magic (e.g., tie methods) on its
-right-hand side if the scalar happened to hold a typeglob. This could
-happen if a typeglob was the last thing returned from or assigned to a tied
-scalar
-L<[perl #77498]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77498>.
-
-=item *
-
-C<sprintf> was ignoring locales when called with constant arguments
-L<[perl #78632]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78632>.
-
-=item *
-
-A non-ASCII character in the Latin-1 range could match both a Posix
-class, such as C<[[:alnum:]]>, and its inverse C<[[:^alnum:]]>. This is
-now fixed for regular expressions compiled under the C<"u"> modifier.
-See L</C<use feature "unicode_strings"> now applies to more regex matching>.
-L<[perl #18281]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=18281>.
-
-=item *
-
-Concatenating long strings under C<use encoding> no longer causes perl to
-crash
-L<[perl #78674]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78674>.
-
-=item *
-
-Typeglob assignments would crash if the glob's stash no longer existed, so
-long as the glob assigned to was named 'ISA' or the glob on either side of
-the assignment contained a subroutine.
-
-=item *
-
-Calling C<< ->import >> on a class lacking an import method could corrupt
-the stack, resulting in strange behaviour. For instance,
-
- push @a, "foo", $b = bar->import;
-
-would assign 'foo' to C<$b>
-L<[perl #63790]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=63790>.
-
-=item *
-
-Creating an alias to a package when that package had been detached from the
-symbol table would result in corrupted isa caches
-L<[perl #77358]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77358>.
-
-=item *
-
-C<.=> followed by C<< <> >> or C<readline> would leak memory if C<$/>
-contained characters beyond the octet range and the scalar assigned to
-happened to be encoded as UTF8 internally
-L<[perl #72246]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72246>.
-
-=item *
-
-The C<recv> function could crash when called with the MSG_TRUNC flag
-L<[perl #75082]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75082>.
-
-=item *
-
-Evaluating a simple glob (like C<*a>) was calling get-magic on the glob,
-even when its contents were not being used
-L<[perl #78580]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78580>.
-
-This bug was introduced in 5.13.2 and did not affect earlier perl versions.
-
-=item *
-
-Matching a Unicode character against an alternation containing characters
-that happened to match continuation bytes in the former's UTF8
-representation (C<qq{\x{30ab}} =~ /\xab|\xa9/>) would cause erroneous
-warnings
-L<[perl #70998]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=70998>.
-
-=item *
-
-C<s///r> (added in 5.13.2) no longer leaks.
-
-=item *
-
-The trie optimisation was not taking empty groups into account, preventing
-'foo' from matching C</\A(?:(?:)foo|bar|zot)\z/>
-L<[perl #78356]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78356>.
-
-=item *
-
-A pattern containing a C<+> inside a lookahead would sometimes cause an
-incorrect match failure in a global match (e.g., C</(?=(\S+))/g>)
-L<[perl #68564]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68564>.
-
-=item *
-
-Iterating with C<foreach> over an array returned by an lvalue sub now works
-L<[perl #23790]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=23790>.
-
-=item *
-
-C<$@> is now localised during calls to C<binmode> to prevent action at a
-distance
-L<[perl #78844]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78844>.
-
-=item *
-
-C<PL_isarev>, which is accessible to Perl via C<mro::get_isarev> is now
-updated properly when packages are deleted or removed from the C<@ISA> of
-other classes. This allows many packages to be created and deleted without
-causing a memory leak
-L<[perl #75176]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75176>.
-
-=item *
-
-C<undef *Foo::> and C<undef *Foo::ISA> and C<delete $package::{ISA}>
-used not to update the internal isa caches if the
-stash or C<@ISA> array had a reference elsewhere. In
-fact, C<undef *Foo::ISA> would stop a new C<@Foo::ISA> array from updating
-caches.
-
-=item *
-
-C<@ISA> arrays can now be shared between classes via
-C<*Foo::ISA = \@Bar::ISA> or C<*Foo::ISA = *Bar::ISA>
-L<[perl #77238]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77238>.
-
-=item *
-
-The parser no longer hangs when encountering certain Unicode characters,
-such as U+387
-L<[perl #74022]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=74022>.
-
-=item *
-
-C<formline> no longer crashes when passed a tainted format picture. It also
-taints C<$^A> now if its arguments are tainted
-L<[perl #79138]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79138>.
-
-=item *
-
-A signal handler called within a signal handler could cause leaks or
-double-frees. Now fixed.
-L<[perl #76248]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76248>.
-
-=item *
-
-When trying to report C<Use of uninitialized value $Foo::BAR>, crashes could
-occur if the GLOB of the global variable causing the warning has been detached
-from its original stash by, for example C<delete $::{'Foo::'}>. This has been
-fixed by disabling the reporting of variable names in the warning in those
-cases.
-
-=back
-
-=head1 Obituary
-
-Randy Kobes, creator of the kobesearch alternative to search.cpan.org and
-contributor/maintainer to several core Perl toolchain modules, passed away
-on September 18, 2010 after a battle with lung cancer. His contributions
-to the Perl community will be missed.
-
-=head1 Acknowledgements
-
-Perl 5.13.7 represents approximately one month of development since Perl 5.13.6
-and contains 73100 lines of changes across 518 files from 39 authors and committers:
-
-Abhijit Menon-Sen, Abigail, Ben Morrow, Chas. J. Owens IV, Chris 'BinGOs' Williams, Craig A. Berry,
-David Golden, David Mitchell, Father Chrysostomos, Fingle Nark, Florian Ragwitz, George Greer,
-Grant McLean, H.Merijn Brand, Ian Goodacre, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Karl Williamson,
-Lubomir Rintel, Marty Pauley, Moritz Lenz, Nicholas Clark, Nicolas Kaiser, Niko Tyni, Peter John Acklam,
-Rafael Garcia-Suarez, Shlomi Fish, Steffen Mueller, Steve Hay, Tatsuhiko Miyagawa, Tim Bunce, Todd Rinaldo,
-Tom Christiansen, Tom Hukins, Tony Cook, Yves Orton, Zefram and brian d foy
-
-Many of the changes included in this version originated in the CPAN modules included in
-Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5138delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5138delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5138delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,912 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl5138delta - what is new for perl v5.13.8
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.13.7 release and
-the 5.13.8 release.
-
-If you are upgrading from an earlier release such as 5.13.6, first read
-L<perl5137delta>, which describes differences between 5.13.6 and
-5.13.7.
-
-=head1 Core Enhancements
-
-=head2 C<-d:-foo> calls C<Devel::foo::unimport>
-
-The syntax C<-dI<B<:>foo>> was extended in 5.6.1 to make C<-dI<:fooB<=bar>>>
-equivalent to C<-MDevel::foo=bar>, which expands
-internally to C<use Devel::foo 'bar';>.
-F<perl> now allows prefixing the module name with C<->, with the same
-semantics as C<-M>, I<i.e.>
-
-=over 4
-
-=item C<-d:-foo>
-
-Equivalent to C<-M-Devel::foo>, expands to
-C<no Devel::foo;>, calls C<< Devel::foo->unimport() >>
-if the method exists.
-
-=item C<-d:-foo=bar>
-
-Equivalent to C<-M-Devel::foo=bar>, expands to C<no Devel::foo 'bar';>,
-calls C<< Devel::foo->unimport('bar') >> if the method exists.
-
-=back
-
-This is particularly useful to suppresses the default actions of a
-C<Devel::*> module's C<import> method whilst still loading it for debugging.
-
-=head2 Filehandle method calls load L<IO::File> on demand
-
-When a method call on a filehandle would die because the method cannot
-be resolved, and L<IO::File> has not been loaded, Perl now loads L<IO::File>
-via C<require> and attempts method resolution again:
-
- open my $fh, ">", $file;
- $fh->binmode(":raw"); # loads IO::File and succeeds
-
-This also works for globs like STDOUT, STDERR and STDIN:
-
- STDOUT->autoflush(1);
-
-Because this on-demand load only happens if method resolution fails, the
-legacy approach of manually loading an L<IO::File> parent class for partial
-method support still works as expected:
-
- use IO::Handle;
- open my $fh, ">", $file;
- $fh->autoflush(1); # IO::File not loaded
-
-=head2 Full functionality for C<use feature 'unicode_strings'>
-
-This release provides full functionality for C<use feature
-'unicode_strings'>. Under its scope, all string operations executed and
-regular expressions compiled (even if executed outside its scope) have
-Unicode semantics. See L<feature>.
-
-This feature avoids most forms of the "Unicode Bug" (See
-L<perlunicode/The "Unicode Bug"> for details.) If there is a
-possibility that your code will process Unicode strings, you are
-B<strongly> encouraged to use this subpragma to avoid nasty surprises.
-
-The availability of this should strongly affect the whole tone of
-various documents, such as L<perlunicode> and L<perluniintro>, but this
-work has not been done yet.
-
-=head2 Exception Handling Backcompat Hack
-
-When an exception is thrown in an C<eval BLOCK>, C<$@> is now set before
-unwinding, as well as being set after unwinding as the eval block exits. This
-early setting supports code that has historically treated C<$@> during unwinding
-as an indicator of whether the unwinding was due to an exception. These modules
-had been broken by 5.13.1's change from setting C<$@> early to setting it late.
-This double setting arrangement is a stopgap until the reason for unwinding can
-be made properly introspectable. C<$@> has never been a reliable indicator of
-the reason for unwinding.
-
-=head2 printf-like functions understand post-1980 size modifiers
-
-Perl's printf and sprintf operators, and Perl's internal printf replacement
-function, now understand the C90 size modifiers "hh" (C<char>), "z"
-(C<size_t>), and "t" (C<ptrdiff_t>). Also, when compiled with a C99
-compiler, Perl now understands the size modifier "j" (C<intmax_t>).
-
-So, for example, on any modern machine, C<sprintf('%hhd', 257)> returns '1'.
-
-=head2 DTrace probes now include package name
-
-The DTrace probes now include an additional argument (C<arg3>) which contains
-the package the subroutine being entered or left was compiled in.
-
-For example using the following DTrace script:
-
- perl$target:::sub-entry
- {
- printf("%s::%s\n", copyinstr(arg0), copyinstr(arg3));
- }
-
-and then running:
-
- perl -e'sub test { }; test'
-
-DTrace will print:
-
- main::test
-
-=head2 Stacked labels
-
-Multiple statement labels can now appear before a single statement.
-
-=head1 Incompatible Changes
-
-=head2 C<:=> is now a syntax error
-
-Previously C<my $pi := 4;> was exactly equivalent to C<my $pi : = 4;>,
-with the C<:> being treated as the start of an attribute list, ending before
-the C<=>. The use of C<:=> to mean C<: => was deprecated in 5.12.0, and is now
-a syntax error. This will allow the future use of C<:=> as a new token.
-
-We find no Perl 5 code on CPAN using this construction, outside the core's
-tests for it, so we believe that this change will have very little impact on
-real-world codebases.
-
-If it is absolutely necessary to have empty attribute lists (for example,
-because of a code generator) then avoid the error by adding a space before
-the C<=>.
-
-=head2 Run-time code block in regular expressions
-
-Code blocks in regular expressions (C<(?{...})> and C<(??{...})>) used not
-to inherit any pragmata (strict, warnings, etc.) if the regular expression
-was compiled at run time as happens in cases like these two:
-
- use re 'eval';
- $foo =~ $bar; # when $bar contains (?{...})
- $foo =~ /$bar(?{ $finished = 1 })/;
-
-This was a bug, which has now been fixed. But it has the potential to break
-any code that was relying on this bug.
-
-=head1 Deprecations
-
-=head2 C<?PATTERN?> is deprecated
-
-C<?PATTERN?> (without the initial m) has been deprecated and now produces
-a warning. This is to allow future use of C<?> in new operators.
-The match-once functionality is still available in the form of C<m?PATTERN?>.
-
-=head2 C<sv_compile_2op()> is now deprecated
-
-The C<sv_compile_2op()> API function is now deprecated. Searches suggest
-that nothing on CPAN is using it, so this should have zero impact.
-
-It attempted to provide an API to compile code down to an optree, but failed
-to bind correctly to lexicals in the enclosing scope. It's not possible to
-fix this problem within the constraints of its parameters and return value.
-
-=head2 Tie functions on scalars holding typeglobs
-
-Calling a tie function (C<tie>, C<tied>, C<untie>) with a scalar argument
-acts on a file handle if the scalar happens to hold a typeglob.
-
-This is a long-standing bug that will be removed in Perl 5.16, as
-there is currently no way to tie the scalar itself when it holds
-a typeglob, and no way to untie a scalar that has had a typeglob
-assigned to it.
-
-This bug was fixed in 5.13.7 but, because of the breakage it caused, the
-fix has been reverted. Now there is a deprecation warning whenever a tie
-function is used on a handle without an explicit C<*>.
-
-=head1 Modules and Pragmata
-
-=head2 Updated Modules and Pragmata
-
-=over 4
-
-=item *
-
-C<Archive::Tar> has been upgraded from version 1.72 to 1.74.
-
-Skip extracting pax extended headers.
-
-=item *
-
-C<autodie> has been upgraded from version 2.10 to 2.1001.
-
-Test fix in blead for VMS.
-
-=item *
-
-C<B> has been upgraded from version 1.26 to 1.27.
-
-Avoid compiler warnings.
-
-=item *
-
-C<B::Concise> has been upgraded from version 0.81 to 0.82.
-
-It no longer produces mangled output with the C<-tree> option
-L<[perl #80632]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=80632>.
-
-=item *
-
-C<B::Deparse> has been upgraded from version 1.01 to 1.02.
-
-Test improvements.
-
-=item *
-
-C<Cwd> has been upgraded from version 3.34 to 3.35.
-
-Avoid compiler warnings.
-
-=item *
-
-C<Data::Dumper> has been upgraded from version 2.130_01 to 2.130_02.
-
-Avoid compiler warnings.
-
-=item *
-
-C<Devel::Peek> has been upgraded from version 1.05 to 1.06.
-
-Avoid compiler warnings.
-
-Test improvements.
-
-=item *
-
-C<Devel::SelfStubber> has been upgraded from version 1.03 to 1.05.
-
-Whitespace changes.
-
-=item *
-
-C<Digest::SHA> has been upgraded from 5.48 to 5.50.
-
-C<shasum> now more closely mimics C<sha1sum>/C<md5sum>.
-
-C<Addfile> accepts all POSIX filenames.
-
-=item *
-
-C<Dumpvalue> has been upgraded from version 1.14 to 1.15.
-
-Test improvements.
-
-=item *
-
-C<DynaLoader> has been upgraded from version 1.11 to 1.12.
-
-Remove obsolete RCS keywords.
-
-=item *
-
-C<Env> has been upgraded from version 1.01 to 1.02.
-
-Test improvements.
-
-=item *
-
-C<ExtUtils::CBuilder> has been upgraded from 0.2703 to 0.280201.
-
-Handle C and C++ compilers separately.
-
-Preserves exit status on VMS.
-
-Test improvements.
-
-=item *
-
-C<ExtUtils::Constant::Utils> has been upgraded from 0.02 to 0.03.
-
-Refactoring and fixing of backcompat code, preparing for resynchronisation
-with CPAN.
-
-=item *
-
-C<ExtUtils::Embed> has been upgraded from 1.29 to 1.30.
-
-Remove obsolete RCS keywords.
-
-=item *
-
-C<ExtUtils::ParseXS> has been upgraded from 2.2207 to 2.2208.
-
-Avoid compiler warnings.
-
-=item *
-
-C<Fcntl> has been upgraded from 1.10 to 1.11.
-
-Avoid compiler warnings.
-
-Test improvements.
-
-=item *
-
-C<feature> has been upgraded from 1.18 to 1.19.
-
-Documentation and test updates for the C<unicode_strings> feature.
-See L</Full functionality for C<use feature 'unicode_strings'>>.
-
-=item *
-
-C<File::CheckTree> has been upgraded from 4.4 to 4.41.
-
-Whitespace changes.
-
-=item *
-
-C<File::Glob> has been upgraded from 1.10 to 1.11.
-
-Avoid compiler warnings.
-
-Test improvements.
-
-=item *
-
-C<GDBM_File> has been upgraded from 1.12 to 1.13.
-
-Test improvements.
-
-Remove obsolete RCS keywords.
-
-=item *
-
-C<Hash::Util::FieldHash> has been upgraded from 1.06 to 1.07.
-
-Avoid compiler warnings.
-
-=item *
-
-C<I18N::Collate> has been upgraded from 1.01 to 1.02.
-
-Whitespace changes.
-
-Test improvements.
-
-=item *
-
-C<if> has been upgraded from 0.06 to 0.0601.
-
-Test improvements.
-
-=item *
-
-C<IO> has been upgraded from 1.25_02 to 1.25_03.
-
-Avoid compiler warnings.
-
-=item *
-
-C<IPC::Cmd> has been upgraded from 0.64 to 0.66.
-
-Resolves an issue with splitting Win32 command lines.
-
-Documentation enhancements.
-
-=item *
-
-C<IPC::Open3> has been upgraded from 1.07 to 1.08.
-
-Remove obsolete RCS keywords.
-
-Test improvements.
-
-=item *
-
-C<Locale::Codes> has been upgraded from version 3.14 to 3.15.
-
-Adds some codes.
-
-=item *
-
-C<Math::BigInt> has been upgraded from 1.99_01 to 1.99_02.
-
-Documentation and comment spelling fixes.
-
-=item *
-
-C<Memoize> has been upgraded from version 1.01_03 to 1.02.
-
-Remove obsolete RCS keywords.
-
-Whitespace changes.
-
-=item *
-
-C<MIME::Base64> has been upgraded from 3.10 to 3.13.
-
-Now provides C<encode_base64url> and C<decode_base64url> functions to process
-the base64 scheme for "URL applications".
-
-=item *
-
-C<mro> has been upgraded from version 1.05 to 1.06.
-
-C<next::method> I<et al.> now take into account that every class inherits
-from UNIVERSAL
-L<[perl #68654]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68654>.
-
-=item *
-
-C<NDBM_File> has been upgraded from 1.10 to 1.11.
-
-Remove obsolete RCS keywords.
-
-Test improvements.
-
-=item *
-
-C<Net::Ping> has been upgraded from 2.36 to 2.37.
-
-Remove obsolete RCS keywords.
-
-=item *
-
-C<ODBM_File> has been upgraded from 1.09 to 1.10.
-
-Remove obsolete RCS keywords.
-
-Test improvements.
-
-=item *
-
-C<Opcode> has been upgraded from 1.17 to 1.18.
-
-Avoid compiler warnings.
-
-Test improvements.
-
-=item *
-
-C<overload> has been upgraded from 1.11 to 1.12.
-
-Avoid a taint problem in use of sprintf.
-
-Test asymmetric fallback cases
-L<[perl #71286]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=71286>.
-
-=item *
-
-C<PerlIO::encoding> has been upgraded from 0.13 to 0.14.
-
-Avoid compiler warnings.
-
-Remove obsolete RCS keywords.
-
-Test improvements.
-
-=item *
-
-C<PerlIO::scalar> has been upgraded from 0.10 to 0.11.
-
-A C<read> after a C<seek> beyond the end of the string no longer thinks it
-has data to read
-L<[perl #78716]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78716>.
-
-Avoid compiler warnings.
-
-=item *
-
-C<PerlIO::via> has been upgraded from 0.10 to 0.11.
-
-Avoid compiler warnings.
-
-=item *
-
-C<POSIX> has been upgraded from 1.22 to 1.23.
-
-Avoid compiler warnings.
-
-=item *
-
-C<re> has been upgraded from 0.14 to 0.15.
-
-Enforce that C</d>, C</u>, and C</l> are mutually exclusive.
-
-=item *
-
-C<SDBM_File> has been upgraded from 1.08 to 1.09.
-
-Avoid compiler warnings.
-
-Remove obsolete RCS keywords.
-
-Test improvements.
-
-=item *
-
-C<Socket> has been upgraded from 1.91 to 1.92.
-
-It has several new functions for handling IPv6 addresses.
-
-=item *
-
-C<Storable> has been upgraded from 2.24 to 2.25.
-
-This adds support for serialising code references that contain UTF-8 strings
-correctly. The Storable minor version number changed as a result, meaning that
-Storable users who set C<$Storable::accept_future_minor> to a C<FALSE> value
-will see errors (see L<Storable/FORWARD COMPATIBILITY> for more details).
-
-Freezing no longer gets confused if the Perl stack gets reallocated
-during freezing
-L<[perl #80074]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=80074>.
-
-Avoid compiler warnings.
-
-=item *
-
-C<threads> has been upgraded from 1.81_02 to 1.81_03.
-
-Avoid compiler warnings.
-
-=item *
-
-C<threads::shared> has been upgraded from 1.34 to 1.35.
-
-Avoid compiler warnings.
-
-=item *
-
-C<Time::HiRes> has been upgraded from 1.9721 to 1.9721_01.
-
-Build fix in blead for VMS.
-
-=item *
-
-C<Unicode::Collate> has been upgraded from 0.67 to 0.6801.
-
-Documentation clarification.
-
-Test improvements.
-
-=item *
-
-C<Unicode::Normalize> has been upgraded from 1.07 to 1.08.
-
-Avoid compiler warnings.
-
-=item *
-
-C<Unicode::UCD> has been upgraded from 0.29 to 0.30.
-
-Add info about named sequence alternatives.
-
-Don't use C<CompositionExclusions.txt>.
-
-=item *
-
-C<version> has been upgraded from 0.82 to 0.86.
-
-Modify export logic for C<is_strict> and C<is_lax>.
-
-Various backcompat fixes.
-
-=item *
-
-C<Win32> has been upgraded from 0.39 to 0.41.
-
-Add several functions.
-
-Corrections to names returned by C<Win32::GetOSName> and
-C<Win32::GetOSDisplayName>.
-
-=item *
-
-C<XS::APItest> has been upgraded from 0.26 to 0.27.
-
-Test new API functions.
-
-Avoid compiler warnings.
-
-=back
-
-=head2 Dual-life Modules and Pragmata
-
-These modules were formerly distributed only in the Perl core
-distribution, and are now dual-lifed (meaning they are now also available
-separately on CPAN):
-
-=over 4
-
-=item *
-
-C<autouse>
-
-=item *
-
-C<Devel::SelfStubber>
-
-=item *
-
-C<Dumpvalue>
-
-=item *
-
-C<Env>
-
-=item *
-
-C<File::CheckTree>
-
-=item *
-
-C<I18N::Collate>
-
-=back
-
-=head1 Diagnostics
-
-The following additions or changes have been made to diagnostic output,
-including warnings and fatal error messages. For the complete list of
-diagnostic messages, see L<perldiag>.
-
-=head2 New Diagnostics
-
-=over 4
-
-=item *
-
-There is a new "Closure prototype called" error
-L<[perl #68560]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68560>.
-
-=back
-
-=head2 Changes to Existing Diagnostics
-
-=over 4
-
-=item *
-
-The "Found = in conditional" warning that is emitted when a constant is
-assigned to a variable in a condition is now withheld if the constant is
-actually a subroutine or one generated by C<use constant>, since the value
-of the constant may not be known at the time the program is written
-L<[perl #77762]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77762>.
-
-=back
-
-=head1 Configuration and Compilation
-
-=over 4
-
-=item *
-
-The C<Encode> module can now (once again) be included in a static Perl
-build. The special-case handling for this situation got broken in Perl
-5.11.0, and has now been repaired.
-
-=back
-
-=head1 Testing
-
-=over 4
-
-=item *
-
-Tests for C<Fcntl>, C<File::Glob>, C<GDBM_File>, C<IPC::Open3>,
-C<NDBM_File>, C<ODBM_File>, C<Opcode>, C<PerlIO::encoding>, C<SDBM_File>,
-and C<Storable> now use the L<Test::More> framework.
-
-=back
-
-=head1 Platform Support
-
-=head2 Platform-Specific Notes
-
-=over 4
-
-=item NetBSD
-
-The NetBSD hints file has been changed to make the system's malloc the
-default.
-
-=item Windows
-
-The option to use an externally-supplied C<crypt()>, or to build with no
-C<crypt()> at all, has been removed. Perl supplies its own C<crypt()>
-implementation for Windows, and the political situation that required
-this part of the distribution to sometimes be omitted is long gone.
-
-=back
-
-=head1 Internal Changes
-
-=over 4
-
-=item *
-
-The L<C<mg_findext()>|perlapi/mg_findext> and
-L<C<sv_unmagicext()>|perlapi/sv_unmagicext>
-functions have been added to the API.
-They allow extension authors to find and remove magic attached to
-scalars based on both the magic type and the magic virtual table, similar to how
-C<sv_magicext()> attaches magic of a certain type and with a given virtual table
-to a scalar. This eliminates the need for extensions to walk the list of
-C<MAGIC> pointers of an C<SV> to find the magic that belongs to them.
-
-=item *
-
-The
-L<C<parse_fullexpr()>|perlapi/parse_fullexpr>,
-L<C<parse_listexpr()>|perlapi/parse_listexpr>,
-L<C<parse_termexpr()>|perlapi/parse_termexpr>, and
-L<C<parse_arithexpr()>|perlapi/parse_arithexpr>
-functions have been added to the API. They perform
-recursive-descent parsing of expressions at various precedence levels.
-They are expected to be used by syntax plugins.
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-C<BEGIN {require 5.12.0}> now behaves as documented, rather than behaving
-identically to C<use 5.12.0;>. Previously, C<require> in a C<BEGIN> block
-was erroneously executing the C<use feature ':5.12.0'> and
-C<use strict; use warnings;> behaviour, which only C<use> was documented to
-provide
-L<[perl #69050]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=69050>.
-
-=item *
-
-C<use 5.42>
-L<[perl #69050]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=69050>,
-C<use 6> and C<no 5> no longer leak memory.
-
-=item *
-
-C<eval "BEGIN{die}"> no longer leaks memory on non-threaded builds.
-
-=item *
-
-PerlIO no longer crashes when called recursively, e.g., from a signal
-handler. Now it just leaks memory
-L<[perl #75556]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75556>.
-
-=item *
-
-Defining a constant with the same name as one of perl's special blocks
-(e.g., INIT) stopped working in 5.12.0, but has now been fixed
-L<[perl #78634]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78634>.
-
-=item *
-
-A reference to a literal value used as a hash key (C<$hash{\"foo"}>) used
-to be stringified, even if the hash was tied
-L<[perl #79178]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79178>.
-
-=item *
-
-A closure containing an C<if> statement followed by a constant or variable
-is no longer treated as a constant
-L<[perl #63540]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=63540>.
-
-=item *
-
-Calling a closure prototype (what is passed to an attribute handler for a
-closure) now results in a "Closure prototype called" error message instead
-of a crash
-L<[perl #68560]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68560>.
-
-=item *
-
-A regular expression optimisation would sometimes cause a match with a
-C<{n,m}> quantifier to fail when it should match
-L<[perl #79152]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79152>.
-
-=item *
-
-What has become known as the "Unicode Bug" is mostly resolved in this release.
-Under C<use feature 'unicode_strings'>, the internal storage format of a
-string no longer affects the external semantics. There are two known
-exceptions. User-defined case changing functions, which are planned to
-be deprecated in 5.14, require utf8-encoded strings to function; and the
-character C<LATIN SMALL LETTER SHARP S> in regular expression
-case-insensitive matching has a somewhat different set of bugs depending
-on the internal storage format. Case-insensitive matching of all
-characters that have multi-character matches, as this one does, is
-problematical in Perl.
-L<[perl #58182]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=58182>.
-
-=item *
-
-Mentioning a read-only lexical variable from the enclosing scope in a
-string C<eval> no longer causes the variable to become writable
-L<[perl #19135]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=19135>.
-
-=item *
-
-C<state> can now be used with attributes. It used to mean the same thing as
-C<my> if attributes were present
-L<[perl #68658]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68658>.
-
-=item *
-
-Expressions like C<< @$a > 3 >> no longer cause C<$a> to be mentioned in
-the "Use of uninitialized value in numeric gt" warning when C<$a> is
-undefined (since it is not part of the C<E<gt>> expression, but the operand
-of the C<@>)
-L<[perl #72090]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72090>.
-
-=item *
-
-C<require> no longer causes C<caller> to return the wrong file name for
-the scope that called C<require> and other scopes higher up that had the
-same file name
-L<[perl #68712]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68712>.
-
-=item *
-
-The ref types in the typemap for XS bindings now support magical variables
-L<[perl #72684]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72684>.
-
-=item *
-
-Match variables (e.g., C<$1>) no longer persist between calls to a sort
-subroutine
-L<[perl #76026]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76026>.
-
-=item *
-
-The C<B> module was returning C<B::OP>s instead of C<B::LOGOP>s for C<entertry>
-L<[perl #80622]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=80622>.
-This was due to a bug in the perl core, not in C<B> itself.
-
-=item *
-
-Some numeric operators were converting integers to floating point,
-resulting in loss of precision on 64-bit platforms
-L<[perl #77456]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77456>.
-
-=item *
-
-The fallback behaviour of overloading on binary operators was asymmetric
-L<[perl #71286]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=71286>.
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.13.8 represents approximately one month of development since
-Perl 5.13.7 and contains 38715 lines of changes across 546 files from
-38 authors and committers.
-
-Thank you to the following for contributing to this release:
-
-Abhijit Menon-Sen, Abigail, Andreas KE<0xf6>nig, Ben Morrow, Brad Gilbert,
-brian d foy, Chip Salzenberg, Chris 'BinGOs' Williams, Craig A. Berry,
-David Golden, David Leadbeater, David Mitchell, Father Chrysostomos,
-Florian Ragwitz, Goro Fuji, H.Merijn Brand, Jan Dubois, Jerry D. Hedden,
-Jesse Vincent, John Peacock, Karl Williamson, Lukas Mai, Marvin Humphrey,
-Max Maischein, Michael Breen, Michael Fig, Nicholas Clark, Nick Cleaton,
-Paul Evans, Peter J. Holzer, Peter John Acklam, Rafael Garcia-Suarez,
-Reini Urban, Renee Baecker, Ricardo Signes, Tony Cook, Yves Orton, Zefram
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the L<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl5139delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5139delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5139delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,646 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl5139delta - what is new for perl v5.13.9
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.13.8 release and
-the 5.13.9 release.
-
-If you are upgrading from an earlier release such as 5.13.7, first read
-L<perl5138delta>, which describes differences between 5.13.7 and
-5.13.8.
-
-=head1 Core Enhancements
-
-=head2 New regular expression modifier C</a>
-
-The C</a> regular expression modifier restricts C<\s> to match precisely
-the five characters C<[ \f\n\r\t]>, C<\d> to match precisely the 10
-characters C<[0-9]>, C<\w> to match precisely the 63 characters
-C<[A-Za-z0-9_]>, and the Posix (C<[[:posix:]]>) character classes to
-match only the appropriate ASCII characters. The complements, of
-course, match everything but; and C<\b> and C<\B> are correspondingly
-affected. Otherwise, C</a> behaves like the C</u> modifier, in that
-case-insensitive matching uses Unicode semantics; for example, "k" will
-match the Unicode C<\N{KELVIN SIGN}> under C</i> matching, and code
-points in the Latin1 range, above ASCII will have Unicode semantics when
-it comes to case-insensitive matching. Like its cousins (C</u>, C</l>,
-and C</d>), and in spite of the terminology, C</a> in 5.14 will not
-actually be able to be used as a suffix at the end of a regular
-expression (this restriction is planned to be lifted in 5.16). It must
-occur either as an infix modifier, such as C<(?a:...)> or (C<(?a)...>,
-or it can be turned on within the lexical scope of C<use re '/a'>.
-Turning on C</a> turns off the other "character set" modifiers.
-
-=head2 Any unsigned value can be encoded as a character
-
-With this release, Perl is adopting a model that any unsigned value can
-be treated as a code point and encoded internally (as utf8) without
-warnings -- not just the code points that are legal in Unicode.
-However, unless utf8 warnings have been
-explicitly lexically turned off, outputting or performing a
-Unicode-defined operation (such as upper-casing) on such a code point
-will generate a warning. Attempting to input these using strict rules
-(such as with the C<:encoding('UTF-8')> layer) will continue to fail.
-Prior to this release the handling was very inconsistent, and incorrect
-in places. Also, the Unicode non-characters, some of which previously were
-erroneously considered illegal in places by Perl, contrary to the Unicode
-standard, are now always legal internally. But inputting or outputting
-them will work the same as for the non-legal Unicode code points, as the
-Unicode standard says they are illegal for "open interchange".
-
-=head2 Regular expression debugging output improvement
-
-Regular expression debugging output (turned on by C<use re 'debug';>) now
-uses hexadecimal when escaping non-ASCII characters, instead of octal.
-
-=head1 Security
-
-=head2 Restrict \p{IsUserDefined} to In\w+ and Is\w+
-
-In L<perlunicode/"User-Defined Character Properties">, it says you can
-create custom properties by defining subroutines whose names begin with
-"In" or "Is". However, perl doesn't actually enforce that naming
-restriction, so \p{foo::bar} will call foo::Bar() if it exists.
-
-This commit finally enforces this convention. Note that this broke a
-number of existing tests for properties, since they didn't always use an
-Is/In prefix.
-
-=head1 Incompatible Changes
-
-=head2 All objects are destroyed
-
-It used to be possible to prevent a destructor from being called during
-global destruction by artificially increasing the reference count of an
-object.
-
-Now such objects I<will> will be destroyed, as a result of a bug fix
-L<[perl #81230]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=81230>.
-
-This has the potential to break some XS modules. (In fact, it break some.
-See L</Known Problems>, below.)
-
-=head1 Modules and Pragmata
-
-=head2 New Modules and Pragmata
-
-=over 4
-
-=item *
-
-C<CPAN::Meta::YAML> 0.003 has been added as a dual-life module. It supports a
-subset of YAML sufficient for reading and writing META.yml and MYMETA.yml files
-included with CPAN distributions or generated by the module installation
-toolchain. It should not be used for any other general YAML parsing or
-generation task.
-
-=item *
-
-C<HTTP::Tiny> 0.009 has been added as a dual-life module. It is a very
-small, simple HTTP/1.1 client designed for simple GET requests and file
-mirroring. It has has been added to enable CPAN.pm and CPANPLUS to
-"bootstrap" HTTP access to CPAN using pure Perl without relying on external
-binaries like F<curl> or F<wget>.
-
-=item *
-
-C<JSON::PP> 2.27103 has been added as a dual-life module, for the sake of
-reading F<META.json> files in CPAN distributions.
-
-=item *
-
-C<Module::Metadata> 1.000003 has been added as a dual-life module. It gathers
-package and POD information from Perl module files. It is a standalone module
-based on Module::Build::ModuleInfo for use by other module installation
-toolchain components. Module::Build::ModuleInfo has been deprecated in
-favor of this module instead.
-
-=item *
-
-C<Perl::OSType> 1.002 has been added as a dual-life module. It maps Perl
-operating system names (e.g. 'dragonfly' or 'MSWin32') to more generic types
-with standardized names (e.g. "Unix" or "Windows"). It has been refactored
-out of Module::Build and ExtUtils::CBuilder and consolidates such mappings into
-a single location for easier maintenance.
-
-=back
-
-=head2 Updated Modules and Pragmata
-
-=over 4
-
-=item *
-
-C<Archive::Extract> has been upgraded from version 0.46 to 0.48
-
-=item *
-
-C<Archive::Tar> has been upgraded from version 1.74 to 1.76
-
-=item *
-
-C<CGI> has been upgraded from version 3.50 to 3.51
-
-Further improvements have been made to guard against newline injections
-in headers.
-
-=item *
-
-C<Compress::Raw::Bzip2> has been upgraded from version 2.031 to 2.033
-
-=item *
-
-C<Compress::Raw::Zlib> has been upgraded from version 2.030 to 2.033
-
-=item *
-
-C<CPAN> has been upgraded from version 1.94_62 to 1.94_63
-
-=item *
-
-C<CPANPLUS> has been upgraded from version 0.9010 to 0.9011
-
-=item *
-
-C<CPANPLUS::Dist::Build> has been upgraded from version 0.50 to 0.52
-
-=item *
-
-C<DB_File> has been upgraded from version 1.820 to 1.821
-
-=item *
-
-C<Encode> has been upgraded from version 2.40 to 2.42.
-Now, all 66 Unicode non-characters are treated the same way U+FFFF has
-always been treated; if it was disallowed, all 66 are disallowed; if it
-warned, all 66 warn.
-
-=item *
-
-C<File::Fetch> has been upgraded from version 0.28 to 0.32
-
-=item *
-
-C<IO::Compress> has been upgraded from version 2.030 to 2.033
-
-=item *
-
-C<IPC::Cmd> has been upgraded from version 0.66 to 0.68
-
-=item *
-
-C<Log::Message> has been upgraded from version 0.02 to 0.04
-
-=item *
-
-C<Log::Message::Simple> has been upgraded from version 0.06 to 0.08
-
-=item *
-
-C<Module::Load::Conditional> has been upgraded from version 0.38 to 0.40
-
-=item *
-
-C<Object::Accessor> has been upgraded from version 0.36 to 0.38
-
-=item *
-
-C<Params::Check> has been upgraded from version 0.26 to 0.28
-
-=item *
-
-C<Pod::LaTeX> has been upgraded from version 0.58 to 0.59
-
-=item *
-
-C<Socket> has been updated with new affordances for IPv6,
-including implementations of the C<Socket::getaddrinfo()> and
-C<Socket::getnameinfo()> functions, along with related constants.
-
-=item *
-
-C<Term::UI> has been upgraded from version 0.20 to 0.24
-
-=item *
-
-C<Thread::Queue> has been upgraded from version 2.11 to 2.12.
-
-=item *
-
-C<Thread::Semaphore> has been upgraded from version 2.11 to 2.12.
-
-=item *
-
-C<threads> has been upgraded from version 1.81_03 to 1.82
-
-=item *
-
-C<threads::shared> has been upgraded from version 1.35 to 1.36
-
-=item *
-
-C<Time::Local> has been upgraded from version 1.1901_01 to 1.2000.
-
-=item *
-
-C<Unicode::Normalize> has been upgraded from version 1.07 to 1.10
-
-=item *
-
-C<version> has been upgraded from 0.86 to 0.88.
-
-=item *
-
-C<Win32> has been upgraded from version 0.41 to 0.44.
-
-=back
-
-=head1 Documentation
-
-=head2 Changes to Existing Documentation
-
-=head3 All documentation
-
-=over
-
-=item *
-
-Numerous POD warnings were fixed.
-
-=item *
-
-Many, many spelling errors and typographical mistakes were corrected throughout Perl's core.
-
-=back
-
-=head3 C<perlhack>
-
-=over 4
-
-=item *
-
-C<perlhack> was extensively reorganized.
-
-=back
-
-=head3 C<perlfunc>
-
-=over 4
-
-=item *
-
-It has now been documented that C<ord> returns 0 for an empty string.
-
-=back
-
-=head1 Diagnostics
-
-The following additions or changes have been made to diagnostic output,
-including warnings and fatal error messages. For the complete list of
-diagnostic messages, see L<perldiag>.
-
-=head2 New Diagnostics
-
-=over 4
-
-=item *
-
-Performing an operation requiring Unicode semantics (such as case-folding)
-on a Unicode surrogate or a non-Unicode character now triggers a warning:
-'Operation "%s" returns its argument for ...'.
-
-=back
-
-=head2 Changes to Existing Diagnostics
-
-=over 4
-
-=item *
-
-Previously, if none of the C<gethostbyaddr>, C<gethostbyname> and
-C<gethostent> functions were implemented on a given platform, they would
-all die with the message 'Unsupported socket function "gethostent" called',
-with analogous messages for C<getnet*> and C<getserv*>. This has been
-corrected.
-
-=back
-
-=head1 Utility Changes
-
-=head3 C<perlbug>
-
-=over 4
-
-=item *
-
-C<perlbug> did not previously generate a From: header, potentially
-resulting in dropped mail. Now it does include that header.
-
-=back
-
-=head3 C<buildtoc>
-
-=over 4
-
-=item *
-
-F<pod/buildtoc> has been modernized and can now be used to test the
-well-formedness of F<pod/perltoc.pod> automatically.
-
-=back
-
-=head1 Testing
-
-=over 4
-
-=item *
-
-C<lib/File/DosGlob.t> has been modernized and now uses C<Test::More>.
-
-=item *
-
-A new test script, C<t/porting/filenames.t>, makes sure that filenames and
-paths are reasonably portable.
-
-=item *
-
-C<t/porting/diag.t> is now several orders of magnitude faster.
-
-=item *
-
-C<t/porting/buildtoc.t> now tests that the documentation TOC file is current and well-formed.
-
-=item *
-
-C<t/base/while.t> now tests the basics of a while loop with minimal dependencies.
-
-=item *
-
-C<t/cmd/while.t> now uses F<test.pl> for better maintainability.
-
-=item *
-
-C<t/op/split.t> now tests calls to C<split> without any pattern specified.
-
-=back
-
-
-
-=head1 Platform Support
-
-=head2 Discontinued Platforms
-
-=over 4
-
-=item Apollo DomainOS
-
-The last vestiges of support for this platform have been excised from the
-Perl distribution. It was officially discontinued in version 5.12.0. It had
-not worked for years before that.
-
-=item MacOS Classic
-
-The last vestiges of support for this platform have been excised from the
-Perl distribution. It was officially discontinued in an earlier version.
-
-=back
-
-=head2 Platform-Specific Notes
-
-=over 4
-
-
-=item Cygwin
-
-=over
-
-=item *
-
-Updated MakeMaker to build man pages on cygwin.
-
-=item *
-
-Improved rebase behaviour
-
-If a dll is updated on cygwin reuse the old imagebase address.
-This solves most rebase errors, esp when updating on core dll's.
-See L<http://www.tishler.net/jason/software/rebase/rebase-2.4.2.README> for more information.
-
-=item *
-
-Support the standard cyg dll prefix, which is e.g. needed for FFI's.
-
-=item *
-
-Updated build hints file
-
-=back
-
-
-=item Solaris
-
-DTrace is now supported on Solaris. There used to be build failures, but
-these have been fixed
-L<[perl #73630]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=73630>.
-
-=back
-
-=head1 Internal Changes
-
-=over 4
-
-=item *
-
-The opcode bodies for C<chop> and C<chomp> and for C<schop> and C<schomp> have
-been merged. The implementation functions C<Perl_do_chop()> and
-C<Perl_do_chomp()>, never part of the public API, have been merged and moved to
-a static function in F<pp.c>. This shrinks the perl binary slightly, and should
-not affect any code outside the core (unless it is relying on the order of side
-effects when C<chomp> is passed a I<list> of values).
-
-=item *
-
-Some of the flags parameters to the uvuni_to_utf8_flags() and
-utf8n_to_uvuni() have changed. This is a result of Perl now allowing
-internal storage and manipulation of code points that are problematic
-in some situations. Hence, the default actions for these functions has
-been complemented to allow these code points. The new flags are
-documented in L<perlapi>. Code that requires the problematic code
-points to be rejected needs to change to use these flags. Some flag
-names are retained for backward source compatibility, though they do
-nothing, as they are now the default. However the flags
-C<UNICODE_ALLOW_FDD0>, C<UNICODE_ALLOW_FFFF>, C<UNICODE_ILLEGAL>, and
-C<UNICODE_IS_ILLEGAL> have been removed, as they stem from a
-fundamentally broken model of how the Unicode non-character code points
-should be handled, which is now described in
-L<perlunicode/Non-character code points>. See also L</Selected Bug Fixes>.
-
-=item *
-
-Certain shared flags in the C<pmop.op_pmflags> and C<regexp.extflags>
-structures have been removed. These are: C<Rxf_Pmf_LOCALE>,
-C<Rxf_Pmf_UNICODE>, and C<PMf_LOCALE>. Instead there are encodes and
-three static in-line functions for accessing the information:
-C<get_regex_charset()>, C<set_regex_charset()>, and C<get_regex_charset_name()>,
-which are defined in the places where the original flags were.
-
-=item *
-
-A new option has been added to C<pv_escape> to dump all characters above
-ASCII in hexadecimal. Before, one could get all characters as hexadecimal
-or the Latin1 non-ASCII as octal
-
-
-=item *
-
-Generate pp_* prototypes in pp_proto.h, and remove pp.sym
-
-Eliminate the #define pp_foo Perl_pp_foo(pTHX) macros, and update the 13
-locations that relied on them.
-
-regen/opcode.pl now generates prototypes for the PP functions directly, into
-pp_proto.h. It no longer writes pp.sym, and regen/embed.pl no longer reads
-this, removing the only ordering dependency in the regen scripts. opcode.pl
-is now responsible for prototypes for pp_* functions. (embed.pl remains
-responsible for ck_* functions, reading from regen/opcodes)
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-The handling of Unicode non-characters has changed.
-Previously they were mostly considered illegal, except that only one of
-the 66 of them was known about in places. The Unicode standard
-considers them legal, but forbids the "open interchange" of them.
-This is part of the change to allow the internal use of any code point
-(see L</Core Enhancements>). Together, these changes resolve
-L<# 38722|https://rt.perl.org/rt3/Ticket/Display.html?id=38722>,
-L<# 51918|http://rt.perl.org/rt3/Ticket/Display.html?id=51918>,
-L<# 51936|http://rt.perl.org/rt3/Ticket/Display.html?id=51936>,
-L<# 63446|http://rt.perl.org/rt3/Ticket/Display.html?id=63446>
-
-=item *
-
-Sometimes magic (ties, tainted, etc.) attached to variables could cause an
-object to last longer than it should, or cause a crash if a tied variable
-were freed from within a tie method. These have been fixed
-L<[perl #81230]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=81230>.
-
-=item *
-
-Most I/O functions were not warning for unopened handles unless the
-'closed' and 'unopened' warnings categories were both enabled. Now only
-C<use warnings 'unopened'> is necessary to trigger these warnings (as was
-always meant to be the case.
-
-=item *
-
-C<< E<lt>exprE<gt> >> always respects overloading now if the expression is
-overloaded.
-
-Due to the way that 'E<lt>E<gt> as glob' was parsed differently from
-'E<lt>E<gt> as filehandle' from 5.6 onwards, something like C<< E<lt>$foo[0]E<gt> >> did
-not handle overloading, even if C<$foo[0]> was an overloaded object. This
-was contrary to the documentation for overload, and meant that C<< E<lt>E<gt> >>
-could not be used as a general overloaded iterator operator.
-
-=item *
-
-Destructors on objects were not called during global destruction on objects
-that were not referenced by any scalars. This could happen if an array
-element were blessed (e.g., C<bless \$a[0]>) or if a closure referenced a
-blessed variable (C<bless \my @a; sub foo { @a }>).
-
-Now there is an extra pass during global destruction to fire destructors on
-any objects that might be left after the usual passes that check for
-objects referenced by scalars
-L<[perl #36347]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=36347>.
-
-=item *
-
-A long standing bug has now been fully fixed (partial fixes came in
-earlier releases), in which some Latin-1 non-ASCII characters on
-ASCII-platforms would match both a character class and its complement,
-such as U+00E2 being both in C<\w> and C<\W>, depending on the
-UTF-8-ness of the regular expression pattern and target string.
-Fixing this did expose some bugs in various modules and tests that
-relied on the previous behavior of C<[[:alpha:]]> not ever matching
-U+00FF, "LATIN SMALL LETTER Y WITH DIAERESIS", even when it should, in
-Unicode mode; now it does match when appropriate.
-L<[perl #60156]|http://rt.perl.org/rt3/Ticket/Display.html?id=60156>.
-
-=back
-
-=head1 Known Problems
-
-=over 4
-
-=item *
-
-The fix for [perl #81230] causes test failures for C<Tk> version 804.029.
-This is still being investigated.
-
-=back
-
-=head1 Acknowledgements
-
-Perl 5.13.9 represents approximately one month of development since
-Perl 5.13.8 and contains approximately 48000 lines of changes across
-809 files from 35 authors and committers:
-
-Abigail, Ævar Arnfjörð Bjarmason, brian d foy, Chris 'BinGOs' Williams,
-Craig A. Berry, David Golden, David Leadbeater, David Mitchell, Father
-Chrysostomos, Florian Ragwitz, Gerard Goossen, H.Merijn Brand, Jan
-Dubois, Jerry D. Hedden, Jesse Vincent, John Peacock, Karl Williamson,
-Leon Timmermans, Michael Parker, Michael Stevens, Nicholas Clark,
-Nuno Carvalho, Paul "LeoNerd" Evans, Peter J. Acklam, Peter Martini,
-Rainer Tammer, Reini Urban, Renee Baecker, Ricardo Signes, Robin Barker,
-Tony Cook, Vadim Konovalov, Vincent Pit, Zefram, and Zsbán Ambrus.
-
-Many of the changes included in this version originated in the CPAN
-modules included in Perl's core. We're grateful to the entire CPAN
-community for helping Perl to flourish.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the L<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report at perl.org. This points to a closed subscription
-unarchived mailing list, which includes all the core committers, who be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
-
-=head1 SEE ALSO
-
-The F<Changes> file for an explanation of how to view exhaustive details
-on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Modified: vendor/perl/dist/pod/perl5180delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5180delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl5180delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -3672,6 +3672,11 @@
C<*_{ARRAY}> returned from a subroutine no longer spontaneously
becomes empty.
+=item *
+
+When using C<say> to print to a tied filehandle, the value of C<$\> is
+correctly localized, even if it was previously undef. [perl #119927]
+
=back
=head1 Known Problems
Added: vendor/perl/dist/pod/perl5181delta.pod
===================================================================
--- vendor/perl/dist/pod/perl5181delta.pod (rev 0)
+++ vendor/perl/dist/pod/perl5181delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -0,0 +1,217 @@
+=encoding utf8
+
+=head1 NAME
+
+perl5181delta - what is new for perl v5.18.1
+
+=head1 DESCRIPTION
+
+This document describes differences between the 5.18.0 release and the 5.18.1
+release.
+
+If you are upgrading from an earlier release such as 5.16.0, first read
+L<perl5180delta>, which describes differences between 5.16.0 and 5.18.0.
+
+=head1 Incompatible Changes
+
+There are no changes intentionally incompatible with 5.18.0
+If any exist, they are bugs, and we request that you submit a
+report. See L</Reporting Bugs> below.
+
+=head1 Modules and Pragmata
+
+=head2 Updated Modules and Pragmata
+
+=over 4
+
+=item *
+
+B has been upgraded from 1.42 to 1.42_01, fixing bugs related to lexical
+subroutines.
+
+=item *
+
+Digest::SHA has been upgraded from 5.84 to 5.84_01, fixing a crashing bug.
+[RT #118649]
+
+=item *
+
+Module::CoreList has been upgraded from 2.89 to 2.96.
+
+=back
+
+=head1 Platform Support
+
+=head2 Platform-Specific Notes
+
+=over 4
+
+=item AIX
+
+A rarely-encounted configuration bug in the AIX hints file has been corrected.
+
+=item MidnightBSD
+
+After a patch to the relevant hints file, perl should now build correctly on
+MidnightBSD 0.4-RELEASE.
+
+=back
+
+=head1 Selected Bug Fixes
+
+=over 4
+
+=item *
+
+Starting in v5.18.0, a construct like C</[#](?{})/x> would have its C<#>
+incorrectly interpreted as a comment. The code block would be skipped,
+unparsed. This has been corrected.
+
+=item *
+
+A number of memory leaks related to the new, experimental regexp bracketed
+character class feature have been plugged.
+
+=item *
+
+The OP allocation code now returns correctly aligned memory in all cases
+for C<struct pmop>. Previously it could return memory only aligned to a
+4-byte boundary, which is not correct for an ithreads build with 64 bit IVs
+on some 32 bit platforms. Notably, this caused the build to fail completely
+on sparc GNU/Linux. [RT #118055]
+
+=item *
+
+The debugger's C<man> command been fixed. It was broken in the v5.18.0
+release. The C<man> command is aliased to the names C<doc> and C<perldoc> -
+all now work again.
+
+=item *
+
+C<@_> is now correctly visible in the debugger, fixing a regression
+introduced in v5.18.0's debugger. [RT #118169]
+
+=item *
+
+Fixed a small number of regexp constructions that could either fail to
+match or crash perl when the string being matched against was
+allocated above the 2GB line on 32-bit systems. [RT #118175]
+
+=item *
+
+Perl v5.16 inadvertently introduced a bug whereby calls to XSUBs that were
+not visible at compile time were treated as lvalues and could be assigned
+to, even when the subroutine was not an lvalue sub. This has been fixed.
+[perl #117947]
+
+=item *
+
+Perl v5.18 inadvertently introduced a bug whereby dual-vars (i.e.
+variables with both string and numeric values, such as C<$!> ) where the
+truthness of the variable was determined by the numeric value rather than
+the string value. [RT #118159]
+
+=item *
+
+Perl v5.18 inadvertently introduced a bug whereby interpolating mixed up-
+and down-graded UTF-8 strings in a regex could result in malformed UTF-8
+in the pattern: specifically if a downgraded character in the range
+C<\x80..\xff> followed a UTF-8 string, e.g.
+
+ utf8::upgrade( my $u = "\x{e5}");
+ utf8::downgrade(my $d = "\x{e5}");
+ /$u$d/
+
+[perl #118297].
+
+=item *
+
+Lexical constants (C<my sub a() { 42 }>) no longer crash when inlined.
+
+=item *
+
+Parameter prototypes attached to lexical subroutines are now respected when
+compiling sub calls without parentheses. Previously, the prototypes were
+honoured only for calls I<with> parentheses. [RT #116735]
+
+=item *
+
+Syntax errors in lexical subroutines in combination with calls to the same
+subroutines no longer cause crashes at compile time.
+
+=item *
+
+The dtrace sub-entry probe now works with lexical subs, instead of
+crashing [perl #118305].
+
+=item *
+
+Undefining an inlinable lexical subroutine (C<my sub foo() { 42 } undef
+&foo>) would result in a crash if warnings were turned on.
+
+=item *
+
+Deep recursion warnings no longer crash lexical subroutines. [RT #118521]
+
+=back
+
+=head1 Acknowledgements
+
+Perl 5.18.1 represents approximately 2 months of development since Perl 5.18.0
+and contains approximately 8,400 lines of changes across 60 files from 12
+authors.
+
+Perl continues to flourish into its third decade thanks to a vibrant community
+of users and developers. The following people are known to have contributed the
+improvements that became Perl 5.18.1:
+
+Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, David
+Mitchell, Father Chrysostomos, Karl Williamson, Lukas Mai, Nicholas Clark,
+Peter Martini, Ricardo Signes, Shlomi Fish, Tony Cook.
+
+The list above is almost certainly incomplete as it is automatically generated
+from version control history. In particular, it does not include the names of
+the (very much appreciated) contributors who reported issues to the Perl bug
+tracker.
+
+Many of the changes included in this version originated in the CPAN modules
+included in Perl's core. We're grateful to the entire CPAN community for
+helping Perl to flourish.
+
+For a more complete list of all of Perl's historical contributors, please see
+the F<AUTHORS> file in the Perl source distribution.
+
+=head1 Reporting Bugs
+
+If you find what you think is a bug, you might check the articles recently
+posted to the comp.lang.perl.misc newsgroup and the perl bug database at
+http://rt.perl.org/perlbug/ . There may also be information at
+http://www.perl.org/ , the Perl Home Page.
+
+If you believe you have an unreported bug, please run the L<perlbug> program
+included with your release. Be sure to trim your bug down to a tiny but
+sufficient test case. Your bug report, along with the output of C<perl -V>,
+will be sent off to perlbug at perl.org to be analysed by the Perl porting team.
+
+If the bug you are reporting has security implications, which make it
+inappropriate to send to a publicly archived mailing list, then please send it
+to perl5-security-report at perl.org. This points to a closed subscription
+unarchived mailing list, which includes all the core committers, who will be
+able to help assess the impact of issues, figure out a resolution, and help
+co-ordinate the release of patches to mitigate or fix the problem across all
+platforms on which Perl is supported. Please only use this address for
+security issues in the Perl core, not for modules independently distributed on
+CPAN.
+
+=head1 SEE ALSO
+
+The F<Changes> file for an explanation of how to view exhaustive details on
+what changed.
+
+The F<INSTALL> file for how to build Perl.
+
+The F<README> file for general stuff.
+
+The F<Artistic> and F<Copying> files for copyright information.
+
+=cut
Deleted: vendor/perl/dist/pod/perl570delta.pod
===================================================================
--- vendor/perl/dist/pod/perl570delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl570delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,899 +0,0 @@
-=head1 NAME
-
-perl570delta - what's new for perl v5.7.0
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.6.0 release and
-the 5.7.0 release.
-
-=head1 Security Vulnerability Closed
-
-A potential security vulnerability in the optional suidperl component
-of Perl has been identified. suidperl is neither built nor installed
-by default. As of September the 2nd, 2000, the only known vulnerable
-platform is Linux, most likely all Linux distributions. CERT and
-various vendors have been alerted about the vulnerability.
-
-The problem was caused by Perl trying to report a suspected security
-exploit attempt using an external program, /bin/mail. On Linux
-platforms the /bin/mail program had an undocumented feature which
-when combined with suidperl gave access to a root shell, resulting in
-a serious compromise instead of reporting the exploit attempt. If you
-don't have /bin/mail, or if you have 'safe setuid scripts', or if
-suidperl is not installed, you are safe.
-
-The exploit attempt reporting feature has been completely removed from
-the Perl 5.7.0 release, so that particular vulnerability isn't there
-anymore. However, further security vulnerabilities are,
-unfortunately, always possible. The suidperl code is being reviewed
-and if deemed too risky to continue to be supported, it may be
-completely removed from future releases. In any case, suidperl should
-only be used by security experts who know exactly what they are doing
-and why they are using suidperl instead of some other solution such as
-sudo ( see http://www.courtesan.com/sudo/ ).
-
-=head1 Incompatible Changes
-
-=over 4
-
-=item *
-
-Arrays now always interpolate into double-quoted strings:
-constructs like "foo at bar" now always assume C<@bar> is an array,
-whether or not the compiler has seen use of C<@bar>.
-
-=item *
-
-The semantics of bless(REF, REF) were unclear and until someone proves
-it to make some sense, it is forbidden.
-
-=item *
-
-A reference to a reference now stringify as "REF(0x81485ec)" instead
-of "SCALAR(0x81485ec)" in order to be more consistent with the return
-value of ref().
-
-=item *
-
-The very dusty examples in the eg/ directory have been removed.
-Suggestions for new shiny examples welcome but the main issue is that
-the examples need to be documented, tested and (most importantly)
-maintained.
-
-=item *
-
-The obsolete chat2 library that should never have been allowed
-to escape the laboratory has been decommissioned.
-
-=item *
-
-The unimplemented POSIX regex features [[.cc.]] and [[=c=]] are still
-recognised but now cause fatal errors. The previous behaviour of
-ignoring them by default and warning if requested was unacceptable
-since it, in a way, falsely promised that the features could be used.
-
-=item *
-
-The (bogus) escape sequences \8 and \9 now give an optional warning
-("Unrecognized escape passed through"). There is no need to \-escape
-any C<\w> character.
-
-=item *
-
-lstat(FILEHANDLE) now gives a warning because the operation makes no sense.
-In future releases this may become a fatal error.
-
-=item *
-
-The long deprecated uppercase aliases for the string comparison
-operators (EQ, NE, LT, LE, GE, GT) have now been removed.
-
-=item *
-
-The regular expression captured submatches ($1, $2, ...) are now
-more consistently unset if the match fails, instead of leaving false
-data lying around in them.
-
-=item *
-
-The tr///C and tr///U features have been removed and will not return;
-the interface was a mistake. Sorry about that. For similar
-functionality, see pack('U0', ...) and pack('C0', ...).
-
-=back
-
-=head1 Core Enhancements
-
-=over 4
-
-=item *
-
-C<perl -d:Module=arg,arg,arg> now works (previously one couldn't pass
-in multiple arguments.)
-
-=item *
-
-my __PACKAGE__ $obj now works.
-
-=item *
-
-C<no Module;> now works even if there is no "sub unimport" in the Module.
-
-=item *
-
-The numerical comparison operators return C<undef> if either operand
-is a NaN. Previously the behaviour was unspecified.
-
-=item *
-
-C<pack('U0a*', ...)> can now be used to force a string to UTF-8.
-
-=item *
-
-prototype(\&) is now available.
-
-=item *
-
-There is now an UNTIE method.
-
-=back
-
-=head1 Modules and Pragmata
-
-=head2 New Modules
-
-=over 4
-
-=item *
-
-File::Temp allows one to create temporary files and directories in an
-easy, portable, and secure way.
-
-=item *
-
-Storable gives persistence to Perl data structures by allowing the
-storage and retrieval of Perl data to and from files in a fast and
-compact binary format.
-
-=back
-
-=head2 Updated And Improved Modules and Pragmata
-
-=over 4
-
-=item *
-
-The following independently supported modules have been updated to
-newer versions from CPAN: CGI, CPAN, DB_File, File::Spec, Getopt::Long,
-the podlators bundle, Pod::LaTeX, Pod::Parser, Term::ANSIColor, Test.
-
-=item *
-
-Bug fixes and minor enhancements have been applied to B::Deparse,
-Data::Dumper, IO::Poll, IO::Socket::INET, Math::BigFloat,
-Math::Complex, Math::Trig, Net::protoent, the re pragma, SelfLoader,
-Sys::SysLog, Test::Harness, Text::Wrap, UNIVERSAL, and the warnings
-pragma.
-
-=item *
-
-The attributes::reftype() now works on tied arguments.
-
-=item *
-
-AutoLoader can now be disabled with C<no AutoLoader;>,
-
-=item *
-
-The English module can now be used without the infamous performance
-hit by saying
-
- use English '-no_performance_hit';
-
-(Assuming, of course, that one doesn't need the troublesome variables
-C<$`>, C<$&>, or C<$'>.) Also, introduced C<@LAST_MATCH_START> and
-C<@LAST_MATCH_END> English aliases for C<@-> and C<@+>.
-
-=item *
-
-File::Find now has pre- and post-processing callbacks. It also
-correctly changes directories when chasing symbolic links. Callbacks
-(naughtily) exiting with "next;" instead of "return;" now work.
-
-=item *
-
-File::Glob::glob() renamed to File::Glob::bsd_glob() to avoid
-prototype mismatch with CORE::glob().
-
-=item *
-
-IPC::Open3 now allows the use of numeric file descriptors.
-
-=item *
-
-use lib now works identically to @INC. Removing directories
-with 'no lib' now works.
-
-=item *
-
-C<%INC> now localised in a Safe compartment so that use/require work.
-
-=item *
-
-The Shell module now has an OO interface.
-
-=back
-
-=head1 Utility Changes
-
-=over 4
-
-=item *
-
-The Emacs perl mode (emacs/cperl-mode.el) has been updated to version
-4.31.
-
-=item *
-
-Perlbug is now much more robust. It also sends the bug report to
-perl.org, not perl.com.
-
-=item *
-
-The perlcc utility has been rewritten and its user interface (that is,
-command line) is much more like that of the Unix C compiler, cc.
-
-=item *
-
-The xsubpp utility for extension writers now understands POD
-documentation embedded in the *.xs files.
-
-=back
-
-=head1 New Documentation
-
-=over 4
-
-=item *
-
-perl56delta details the changes between the 5.005 release and the
-5.6.0 release.
-
-=item *
-
-perldebtut is a Perl debugging tutorial.
-
-=item *
-
-perlebcdic contains considerations for running Perl on EBCDIC platforms.
-Note that unfortunately EBCDIC platforms that used to supported back in
-Perl 5.005 are still unsupported by Perl 5.7.0; the plan, however, is to
-bring them back to the fold.
-
-=item *
-
-perlnewmod tells about writing and submitting a new module.
-
-=item *
-
-perlposix-bc explains using Perl on the POSIX-BC platform
-(an EBCDIC mainframe platform).
-
-=item *
-
-perlretut is a regular expression tutorial.
-
-=item *
-
-perlrequick is a regular expressions quick-start guide.
-Yes, much quicker than perlretut.
-
-=item *
-
-perlutil explains the command line utilities packaged with the Perl
-distribution.
-
-=back
-
-=head1 Performance Enhancements
-
-=over 4
-
-=item *
-
-map() that changes the size of the list should now work faster.
-
-=item *
-
-sort() has been changed to use mergesort internally as opposed to the
-earlier quicksort. For very small lists this may result in slightly
-slower sorting times, but in general the speedup should be at least
-20%. Additional bonuses are that the worst case behaviour of sort()
-is now better (in computer science terms it now runs in time O(N log N),
-as opposed to quicksort's Theta(N**2) worst-case run time behaviour),
-and that sort() is now stable (meaning that elements with identical
-keys will stay ordered as they were before the sort).
-
-=back
-
-=head1 Installation and Configuration Improvements
-
-=head2 Generic Improvements
-
-=over 4
-
-=item *
-
-INSTALL now explains how you can configure Perl to use 64-bit
-integers even on non-64-bit platforms.
-
-=item *
-
-Policy.sh policy change: if you are reusing a Policy.sh file
-(see INSTALL) and you use Configure -Dprefix=/foo/bar and in the old
-Policy $prefix eq $siteprefix and $prefix eq $vendorprefix, all of
-them will now be changed to the new prefix, /foo/bar. (Previously
-only $prefix changed.) If you do not like this new behaviour,
-specify prefix, siteprefix, and vendorprefix explicitly.
-
-=item *
-
-A new optional location for Perl libraries, otherlibdirs, is available.
-It can be used for example for vendor add-ons without disturbing Perl's
-own library directories.
-
-=item *
-
-In many platforms the vendor-supplied 'cc' is too stripped-down to
-build Perl (basically, 'cc' doesn't do ANSI C). If this seems
-to be the case and 'cc' does not seem to be the GNU C compiler
-'gcc', an automatic attempt is made to find and use 'gcc' instead.
-
-=item *
-
-gcc needs to closely track the operating system release to avoid
-build problems. If Configure finds that gcc was built for a different
-operating system release than is running, it now gives a clearly visible
-warning that there may be trouble ahead.
-
-=item *
-
-If binary compatibility with the 5.005 release is not wanted, Configure
-no longer suggests including the 5.005 modules in @INC.
-
-=item *
-
-Configure C<-S> can now run non-interactively.
-
-=item *
-
-configure.gnu now works with options with whitespace in them.
-
-=item *
-
-installperl now outputs everything to STDERR.
-
-=item *
-
-$Config{byteorder} is now computed dynamically (this is more robust
-with "fat binaries" where an executable image contains binaries for
-more than one binary platform.)
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 4
-
-=item *
-
-Several debugger fixes: exit code now reflects the script exit code,
-condition C<"0"> now treated correctly, the C<d> command now checks
-line number, the C<$.> no longer gets corrupted, all debugger output now
-goes correctly to the socket if RemotePort is set.
-
-=item *
-
-C<*foo{FORMAT}> now works.
-
-=item *
-
-Lexical warnings now propagating correctly between scopes.
-
-=item *
-
-Line renumbering with eval and C<#line> now works.
-
-=item *
-
-Fixed numerous memory leaks, especially in eval "".
-
-=item *
-
-Modulus of unsigned numbers now works (4063328477 % 65535 used to
-return 27406, instead of 27047).
-
-=item *
-
-Some "not a number" warnings introduced in 5.6.0 eliminated to be
-more compatible with 5.005. Infinity is now recognised as a number.
-
-=item *
-
-our() variables will not cause "will not stay shared" warnings.
-
-=item *
-
-pack "Z" now correctly terminates the string with "\0".
-
-=item *
-
-Fix password routines which in some shadow password platforms
-(e.g. HP-UX) caused getpwent() to return every other entry.
-
-=item *
-
-printf() no longer resets the numeric locale to "C".
-
-=item *
-
-C<q(a\\b)> now parses correctly as C<'a\\b'>.
-
-=item *
-
-Printing quads (64-bit integers) with printf/sprintf now works
-without the q L ll prefixes (assuming you are on a quad-capable platform).
-
-=item *
-
-Regular expressions on references and overloaded scalars now work.
-
-=item *
-
-scalar() now forces scalar context even when used in void context.
-
-=item *
-
-sort() arguments are now compiled in the right wantarray context
-(they were accidentally using the context of the sort() itself).
-
-=item *
-
-Changed the POSIX character class C<[[:space:]]> to include the (very
-rare) vertical tab character. Added a new POSIX-ish character class
-C<[[:blank:]]> which stands for horizontal whitespace (currently,
-the space and the tab).
-
-=item *
-
-$AUTOLOAD, sort(), lock(), and spawning subprocesses
-in multiple threads simultaneously are now thread-safe.
-
-=item *
-
-Allow read-only string on left hand side of non-modifying tr///.
-
-=item *
-
-Several Unicode fixes (but still not perfect).
-
-=over 8
-
-=item *
-
-BOMs (byte order marks) in the beginning of Perl files
-(scripts, modules) should now be transparently skipped.
-UTF-16 (UCS-2) encoded Perl files should now be read correctly.
-
-=item *
-
-The character tables have been updated to Unicode 3.0.1.
-
-=item *
-
-chr() for values greater than 127 now create utf8 when under use
-utf8.
-
-=item *
-
-Comparing with utf8 data does not magically upgrade non-utf8 data into
-utf8.
-
-=item *
-
-C<IsAlnum>, C<IsAlpha>, and C<IsWord> now match titlecase.
-
-=item *
-
-Concatenation with the C<.> operator or via variable interpolation,
-C<eq>, C<substr>, C<reverse>, C<quotemeta>, the C<x> operator,
-substitution with C<s///>, single-quoted UTF-8, should now work--in
-theory.
-
-=item *
-
-The C<tr///> operator now works I<slightly> better but is still rather
-broken. Note that the C<tr///CU> functionality has been removed (but
-see pack('U0', ...)).
-
-=item *
-
-vec() now refuses to deal with characters >255.
-
-=item *
-
-Zero entries were missing from the Unicode classes like C<IsDigit>.
-
-=back
-
-=item *
-
-UNIVERSAL::isa no longer caches methods incorrectly. (This broke
-the Tk extension with 5.6.0.)
-
-=back
-
-=head2 Platform Specific Changes and Fixes
-
-=over 4
-
-=item *
-
-BSDI 4.*
-
-Perl now works on post-4.0 BSD/OSes.
-
-=item *
-
-All BSDs
-
-Setting C<$0> now works (as much as possible; see perlvar for details).
-
-=item *
-
-Cygwin
-
-Numerous updates; currently synchronised with Cygwin 1.1.4.
-
-=item *
-
-EPOC
-
-EPOC update after Perl 5.6.0. See README.epoc.
-
-=item *
-
-FreeBSD 3.*
-
-Perl now works on post-3.0 FreeBSDs.
-
-=item *
-
-HP-UX
-
-README.hpux updated; C<Configure -Duse64bitall> now almost works.
-
-=item *
-
-IRIX
-
-Numerous compilation flag and hint enhancements; accidental mixing
-of 32-bit and 64-bit libraries (a doomed attempt) made much harder.
-
-=item *
-
-Linux
-
-Long doubles should now work (see INSTALL).
-
-=item *
-
-Mac OS Classic
-
-Compilation of the standard Perl distribution in Mac OS Classic should
-now work if you have the Metrowerks development environment and the
-missing Mac-specific toolkit bits. Contact the macperl mailing list
-for details.
-
-=item *
-
-MPE/iX
-
-MPE/iX update after Perl 5.6.0. See README.mpeix.
-
-=item *
-
-NetBSD/sparc
-
-Perl now works on NetBSD/sparc.
-
-=item *
-
-OS/2
-
-Now works with usethreads (see INSTALL).
-
-=item *
-
-Solaris
-
-64-bitness using the Sun Workshop compiler now works.
-
-=item *
-
-Tru64 (aka Digital UNIX, aka DEC OSF/1)
-
-The operating system version letter now recorded in $Config{osvers}.
-Allow compiling with gcc (previously explicitly forbidden). Compiling
-with gcc still not recommended because buggy code results, even with
-gcc 2.95.2.
-
-=item *
-
-Unicos
-
-Fixed various alignment problems that lead into core dumps either
-during build or later; no longer dies on math errors at runtime;
-now using full quad integers (64 bits), previously was using
-only 46 bit integers for speed.
-
-=item *
-
-VMS
-
-chdir() now works better despite a CRT bug; now works with MULTIPLICITY
-(see INSTALL); now works with Perl's malloc.
-
-=item *
-
-Windows
-
-=over 8
-
-=item *
-
-accept() no longer leaks memory.
-
-=item *
-
-Better chdir() return value for a non-existent directory.
-
-=item *
-
-New %ENV entries now propagate to subprocesses.
-
-=item *
-
-$ENV{LIB} now used to search for libs under Visual C.
-
-=item *
-
-A failed (pseudo)fork now returns undef and sets errno to EAGAIN.
-
-=item *
-
-Allow REG_EXPAND_SZ keys in the registry.
-
-=item *
-
-Can now send() from all threads, not just the first one.
-
-=item *
-
-Fake signal handling reenabled, bugs and all.
-
-=item *
-
-Less stack reserved per thread so that more threads can run
-concurrently. (Still 16M per thread.)
-
-=item *
-
-C<< File::Spec->tmpdir() >> now prefers C:/temp over /tmp
-(works better when perl is running as service).
-
-=item *
-
-Better UNC path handling under ithreads.
-
-=item *
-
-wait() and waitpid() now work much better.
-
-=item *
-
-winsock handle leak fixed.
-
-=back
-
-=back
-
-=head1 New or Changed Diagnostics
-
-All regular expression compilation error messages are now hopefully
-easier to understand both because the error message now comes before
-the failed regex and because the point of failure is now clearly
-marked.
-
-The various "opened only for", "on closed", "never opened" warnings
-drop the C<main::> prefix for filehandles in the C<main> package,
-for example C<STDIN> instead of <main::STDIN>.
-
-The "Unrecognized escape" warning has been extended to include C<\8>,
-C<\9>, and C<\_>. There is no need to escape any of the C<\w> characters.
-
-=head1 Changed Internals
-
-=over 4
-
-=item *
-
-perlapi.pod (a companion to perlguts) now attempts to document the
-internal API.
-
-=item *
-
-You can now build a really minimal perl called microperl.
-Building microperl does not require even running Configure;
-C<make -f Makefile.micro> should be enough. Beware: microperl makes
-many assumptions, some of which may be too bold; the resulting
-executable may crash or otherwise misbehave in wondrous ways.
-For careful hackers only.
-
-=item *
-
-Added rsignal(), whichsig(), do_join() to the publicised API.
-
-=item *
-
-Made possible to propagate customised exceptions via croak()ing.
-
-=item *
-
-Added is_utf8_char(), is_utf8_string(), bytes_to_utf8(), and utf8_to_bytes().
-
-=item *
-
-Now xsubs can have attributes just like subs.
-
-=back
-
-=head1 Known Problems
-
-=head2 Unicode Support Still Far From Perfect
-
-We're working on it. Stay tuned.
-
-=head2 EBCDIC Still A Lost Platform
-
-The plan is to bring them back.
-
-=head2 Building Extensions Can Fail Because Of Largefiles
-
-Certain extensions like mod_perl and BSD::Resource are known to have
-issues with `largefiles', a change brought by Perl 5.6.0 in which file
-offsets default to 64 bits wide, where supported. Modules may fail to
-compile at all or compile and work incorrectly. Currently there is no
-good solution for the problem, but Configure now provides appropriate
-non-largefile ccflags, ldflags, libswanted, and libs in the %Config
-hash (e.g., $Config{ccflags_nolargefiles}) so the extensions that are
-having problems can try configuring themselves without the
-largefileness. This is admittedly not a clean solution, and the
-solution may not even work at all. One potential failure is whether
-one can (or, if one can, whether it's a good idea) link together at
-all binaries with different ideas about file offsets, all this is
-platform-dependent.
-
-=head2 ftmp-security tests warn 'system possibly insecure'
-
-Don't panic. Read INSTALL 'make test' section instead.
-
-=head2 Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX
-
-If perl is configured with -Duse64bitall, the successful result of the
-subtest 10 of lib/posix may arrive before the successful result of the
-subtest 9, which confuses the test harness so much that it thinks the
-subtest 9 failed.
-
-=head2 Long Doubles Still Don't Work In Solaris
-
-The experimental long double support is still very much so in Solaris.
-(Other platforms like Linux and Tru64 are beginning to solidify in
-this area.)
-
-=head2 Linux With Sfio Fails op/misc Test 48
-
-No known fix.
-
-=head2 Storable tests fail in some platforms
-
-If any Storable tests fail the use of Storable is not advisable.
-
-=over 4
-
-=item *
-
-Many Storable tests fail on AIX configured with 64 bit integers.
-
-So far unidentified problems break Storable in AIX if Perl is
-configured to use 64 bit integers. AIX in 32-bit mode works and
-other 64-bit platforms work with Storable.
-
-=item *
-
-DOS DJGPP may hang when testing Storable.
-
-=item *
-
-st-06compat fails in UNICOS and UNICOS/mk.
-
-This means that you cannot read old (pre-Storable-0.7) Storable images
-made in other platforms.
-
-=item *
-
-st-store.t and st-retrieve may fail with Compaq C 6.2 on OpenVMS Alpha 7.2.
-
-=back
-
-=head2 Threads Are Still Experimental
-
-Multithreading is still an experimental feature. Some platforms
-emit the following message for lib/thr5005
-
- #
- # This is a KNOWN FAILURE, and one of the reasons why threading
- # is still an experimental feature. It is here to stop people
- # from deploying threads in production. ;-)
- #
-
-and another known thread-related warning is
-
- pragma/overload......Unbalanced saves: 3 more saves than restores
- panic: magic_mutexfree during global destruction.
- ok
- lib/selfloader.......Unbalanced saves: 3 more saves than restores
- panic: magic_mutexfree during global destruction.
- ok
- lib/st-dclone........Unbalanced saves: 3 more saves than restores
- panic: magic_mutexfree during global destruction.
- ok
-
-=head2 The Compiler Suite Is Still Experimental
-
-The compiler suite is slowly getting better but is nowhere near
-working order yet. The backend part that has seen perhaps the most
-progress is the bytecode compiler.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://bugs.perl.org/ There may also be
-information at http://www.perl.com/perl/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-=head1 SEE ALSO
-
-The F<Changes> file for exhaustive details on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=head1 HISTORY
-
-Written by Jarkko Hietaniemi <F<jhi at iki.fi>>, with many contributions
-from The Perl Porters and Perl Users submitting feedback and patches.
-
-Send omissions or corrections to <F<perlbug at perl.org>>.
-
-=cut
Deleted: vendor/perl/dist/pod/perl571delta.pod
===================================================================
--- vendor/perl/dist/pod/perl571delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl571delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1075 +0,0 @@
-=head1 NAME
-
-perl571delta - what's new for perl v5.7.1
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.7.0 release and the
-5.7.1 release.
-
-(To view the differences between the 5.6.0 release and the 5.7.0
-release, see L<perl570delta>.)
-
-=head1 Security Vulnerability Closed
-
-(This change was already made in 5.7.0 but bears repeating here.)
-
-A potential security vulnerability in the optional suidperl component
-of Perl was identified in August 2000. suidperl is neither built nor
-installed by default. As of April 2001 the only known vulnerable
-platform is Linux, most likely all Linux distributions. CERT and
-various vendors and distributors have been alerted about the vulnerability.
-See http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt
-for more information.
-
-The problem was caused by Perl trying to report a suspected security
-exploit attempt using an external program, /bin/mail. On Linux
-platforms the /bin/mail program had an undocumented feature which
-when combined with suidperl gave access to a root shell, resulting in
-a serious compromise instead of reporting the exploit attempt. If you
-don't have /bin/mail, or if you have 'safe setuid scripts', or if
-suidperl is not installed, you are safe.
-
-The exploit attempt reporting feature has been completely removed from
-all the Perl 5.7 releases (and will be gone also from the maintenance
-release 5.6.1), so that particular vulnerability isn't there anymore.
-However, further security vulnerabilities are, unfortunately, always
-possible. The suidperl code is being reviewed and if deemed too risky
-to continue to be supported, it may be completely removed from future
-releases. In any case, suidperl should only be used by security
-experts who know exactly what they are doing and why they are using
-suidperl instead of some other solution such as sudo
-( see http://www.courtesan.com/sudo/ ).
-
-=head1 Incompatible Changes
-
-=over 4
-
-=item *
-
-Although "you shouldn't do that", it was possible to write code that
-depends on Perl's hashed key order (Data::Dumper does this). The new
-algorithm "One-at-a-Time" produces a different hashed key order.
-More details are in L</"Performance Enhancements">.
-
-=item *
-
-The list of filenames from glob() (or <...>) is now by default sorted
-alphabetically to be csh-compliant. (bsd_glob() does still sort platform
-natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.)
-
-=back
-
-=head1 Core Enhancements
-
-=head2 AUTOLOAD Is Now Lvaluable
-
-AUTOLOAD is now lvaluable, meaning that you can add the :lvalue attribute
-to AUTOLOAD subroutines and you can assign to the AUTOLOAD return value.
-
-=head2 PerlIO is Now The Default
-
-=over 4
-
-=item *
-
-IO is now by default done via PerlIO rather than system's "stdio".
-PerlIO allows "layers" to be "pushed" onto a file handle to alter the
-handle's behaviour. Layers can be specified at open time via 3-arg
-form of open:
-
- open($fh,'>:crlf :utf8', $path) || ...
-
-or on already opened handles via extended C<binmode>:
-
- binmode($fh,':encoding(iso-8859-7)');
-
-The built-in layers are: unix (low level read/write), stdio (as in
-previous Perls), perlio (re-implementation of stdio buffering in a
-portable manner), crlf (does CRLF <=> "\n" translation as on Win32,
-but available on any platform). A mmap layer may be available if
-platform supports it (mostly Unixes).
-
-Layers to be applied by default may be specified via the 'open' pragma.
-
-See L</"Installation and Configuration Improvements"> for the effects
-of PerlIO on your architecture name.
-
-=item *
-
-File handles can be marked as accepting Perl's internal encoding of Unicode
-(UTF-8 or UTF-EBCDIC depending on platform) by a pseudo layer ":utf8" :
-
- open($fh,">:utf8","Uni.txt");
-
-Note for EBCDIC users: the pseudo layer ":utf8" is erroneously named
-for you since it's not UTF-8 what you will be getting but instead
-UTF-EBCDIC. See L<perlunicode>, L<utf8>, and
-http://www.unicode.org/unicode/reports/tr16/ for more information.
-In future releases this naming may change.
-
-=item *
-
-File handles can translate character encodings from/to Perl's internal
-Unicode form on read/write via the ":encoding()" layer.
-
-=item *
-
-File handles can be opened to "in memory" files held in Perl scalars via:
-
- open($fh,'>', \$variable) || ...
-
-=item *
-
-Anonymous temporary files are available without need to
-'use FileHandle' or other module via
-
- open($fh,"+>", undef) || ...
-
-That is a literal undef, not an undefined value.
-
-=item *
-
-The list form of C<open> is now implemented for pipes (at least on Unix):
-
- open($fh,"-|", 'cat', '/etc/motd')
-
-creates a pipe, and runs the equivalent of exec('cat', '/etc/motd') in
-the child process.
-
-=item *
-
-The following builtin functions are now overridable: chop(), chomp(),
-each(), keys(), pop(), push(), shift(), splice(), unshift().
-
-=item *
-
-Formats now support zero-padded decimal fields.
-
-=item *
-
-Perl now tries internally to use integer values in numeric conversions
-and basic arithmetics (+ - * /) if the arguments are integers, and
-tries also to keep the results stored internally as integers.
-This change leads into often slightly faster and always less lossy
-arithmetics. (Previously Perl always preferred floating point numbers
-in its math.)
-
-=item *
-
-The printf() and sprintf() now support parameter reordering using the
-C<%\d+\$> and C<*\d+\$> syntaxes. For example
-
- print "%2\$s %1\$s\n", "foo", "bar";
-
-will print "bar foo\n"; This feature helps in writing
-internationalised software.
-
-=item *
-
-Unicode in general should be now much more usable. Unicode can be
-used in hash keys, Unicode in regular expressions should work now,
-Unicode in tr/// should work now (though tr/// seems to be a
-particularly tricky to get right, so you have been warned)
-
-=item *
-
-The Unicode Character Database coming with Perl has been upgraded
-to Unicode 3.1. For more information, see http://www.unicode.org/ ,
-and http://www.unicode.org/unicode/reports/tr27/
-
-For developers interested in enhancing Perl's Unicode capabilities:
-almost all the UCD files are included with the Perl distribution in
-the lib/unicode subdirectory. The most notable omission, for space
-considerations, is the Unihan database.
-
-=item *
-
-The Unicode character classes \p{Blank} and \p{SpacePerl} have been
-added. "Blank" is like C isblank(), that is, it contains only
-"horizontal whitespace" (the space character is, the newline isn't),
-and the "SpacePerl" is the Unicode equivalent of C<\s> (\p{Space}
-isn't, since that includes the vertical tabulator character, whereas
-C<\s> doesn't.)
-
-=back
-
-=head2 Signals Are Now Safe
-
-Perl used to be fragile in that signals arriving at inopportune moments
-could corrupt Perl's internal state.
-
-=head1 Modules and Pragmata
-
-=head2 New Modules
-
-=over 4
-
-=item *
-
-B::Concise, by Stephen McCamant, is a new compiler backend for
-walking the Perl syntax tree, printing concise info about ops.
-The output is highly customisable.
-
-See L<B::Concise> for more information.
-
-=item *
-
-Class::ISA, by Sean Burke, for reporting the search path for a
-class's ISA tree, has been added.
-
-See L<Class::ISA> for more information.
-
-=item *
-
-Cwd has now a split personality: if possible, an extension is used,
-(this will hopefully be both faster and more secure and robust) but
-if not possible, the familiar Perl library implementation is used.
-
-=item *
-
-Digest, a frontend module for calculating digests (checksums),
-from Gisle Aas, has been added.
-
-See L<Digest> for more information.
-
-=item *
-
-Digest::MD5 for calculating MD5 digests (checksums), by Gisle Aas,
-has been added.
-
- use Digest::MD5 'md5_hex';
-
- $digest = md5_hex("Thirsty Camel");
-
- print $digest, "\n"; # 01d19d9d2045e005c3f1b80e8b164de1
-
-NOTE: the MD5 backward compatibility module is deliberately not
-included since its use is discouraged.
-
-See L<Digest::MD5> for more information.
-
-=item *
-
-Encode, by Nick Ing-Simmons, provides a mechanism to translate
-between different character encodings. Support for Unicode,
-ISO-8859-*, ASCII, CP*, KOI8-R, and three variants of EBCDIC are
-compiled in to the module. Several other encodings (like Japanese,
-Chinese, and MacIntosh encodings) are included and will be loaded at
-runtime.
-
-Any encoding supported by Encode module is also available to the
-":encoding()" layer if PerlIO is used.
-
-See L<Encode> for more information.
-
-=item *
-
-Filter::Simple is an easy-to-use frontend to Filter::Util::Call,
-from Damian Conway.
-
- # in MyFilter.pm:
-
- package MyFilter;
-
- use Filter::Simple sub {
- while (my ($from, $to) = splice @_, 0, 2) {
- s/$from/$to/g;
- }
- };
-
- 1;
-
- # in user's code:
-
- use MyFilter qr/red/ => 'green';
-
- print "red\n"; # this code is filtered, will print "green\n"
- print "bored\n"; # this code is filtered, will print "bogreen\n"
-
- no MyFilter;
-
- print "red\n"; # this code is not filtered, will print "red\n"
-
-See L<Filter::Simple> for more information.
-
-=item *
-
-Filter::Util::Call, by Paul Marquess, provides you with the
-framework to write I<Source Filters> in Perl. For most uses
-the frontend Filter::Simple is to be preferred.
-See L<Filter::Util::Call> for more information.
-
-=item *
-
-Locale::Constants, Locale::Country, Locale::Currency, and Locale::Language,
-from Neil Bowers, have been added. They provide the codes for various
-locale standards, such as "fr" for France, "usd" for US Dollar, and
-"jp" for Japanese.
-
- use Locale::Country;
-
- $country = code2country('jp'); # $country gets 'Japan'
- $code = country2code('Norway'); # $code gets 'no'
-
-See L<Locale::Constants>, L<Locale::Country>, L<Locale::Currency>,
-and L<Locale::Language> for more information.
-
-=item *
-
-MIME::Base64, by Gisle Aas, allows you to encode data in base64.
-
- use MIME::Base64;
-
- $encoded = encode_base64('Aladdin:open sesame');
- $decoded = decode_base64($encoded);
-
- print $encoded, "\n"; # "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
-
-See L<MIME::Base64> for more information.
-
-=item *
-
-MIME::QuotedPrint, by Gisle Aas, allows you to encode data in
-quoted-printable encoding.
-
- use MIME::QuotedPrint;
-
- $encoded = encode_qp("Smiley in Unicode: \x{263a}");
- $decoded = decode_qp($encoded);
-
- print $encoded, "\n"; # "Smiley in Unicode: =263A"
-
-MIME::QuotedPrint has been enhanced to provide the basic methods
-necessary to use it with PerlIO::Via as in :
-
- use MIME::QuotedPrint;
- open($fh,">Via(MIME::QuotedPrint)",$path)
-
-See L<MIME::QuotedPrint> for more information.
-
-=item *
-
-PerlIO::Scalar, by Nick Ing-Simmons, provides the implementation of
-IO to "in memory" Perl scalars as discussed above. It also serves as
-an example of a loadable layer. Other future possibilities include
-PerlIO::Array and PerlIO::Code. See L<PerlIO::Scalar> for more
-information.
-
-=item *
-
-PerlIO::Via, by Nick Ing-Simmons, acts as a PerlIO layer and wraps
-PerlIO layer functionality provided by a class (typically implemented
-in perl code).
-
- use MIME::QuotedPrint;
- open($fh,">Via(MIME::QuotedPrint)",$path)
-
-This will automatically convert everything output to C<$fh>
-to Quoted-Printable. See L<PerlIO::Via> for more information.
-
-=item *
-
-Pod::Text::Overstrike, by Joe Smith, has been added.
-It converts POD data to formatted overstrike text.
-See L<Pod::Text::Overstrike> for more information.
-
-=item *
-
-Switch from Damian Conway has been added. Just by saying
-
- use Switch;
-
-you have C<switch> and C<case> available in Perl.
-
- use Switch;
-
- switch ($val) {
-
- case 1 { print "number 1" }
- case "a" { print "string a" }
- case [1..10,42] { print "number in list" }
- case (@array) { print "number in list" }
- case /\w+/ { print "pattern" }
- case qr/\w+/ { print "pattern" }
- case (%hash) { print "entry in hash" }
- case (\%hash) { print "entry in hash" }
- case (\&sub) { print "arg to subroutine" }
- else { print "previous case not true" }
- }
-
-See L<Switch> for more information.
-
-=item *
-
-Text::Balanced from Damian Conway has been added, for
-extracting delimited text sequences from strings.
-
- use Text::Balanced 'extract_delimited';
-
- ($a, $b) = extract_delimited("'never say never', he never said", "'", '');
-
-$a will be "'never say never'", $b will be ', he never said'.
-
-In addition to extract_delimited() there are also extract_bracketed(),
-extract_quotelike(), extract_codeblock(), extract_variable(),
-extract_tagged(), extract_multiple(), gen_delimited_pat(), and
-gen_extract_tagged(). With these you can implement rather advanced
-parsing algorithms. See L<Text::Balanced> for more information.
-
-=item *
-
-Tie::RefHash::Nestable, by Edward Avis, allows storing hash references
-(unlike the standard Tie::RefHash) The module is contained within
-Tie::RefHash.
-
-=item *
-
-XS::Typemap, by Tim Jenness, is a test extension that exercises XS
-typemaps. Nothing gets installed but for extension writers the code
-is worth studying.
-
-=back
-
-=head2 Updated And Improved Modules and Pragmata
-
-=over 4
-
-=item *
-
-B::Deparse should be now more robust. It still far from providing a full
-round trip for any random piece of Perl code, though, and is under active
-development: expect more robustness in 5.7.2.
-
-=item *
-
-Class::Struct can now define the classes in compile time.
-
-=item *
-
-Math::BigFloat has undergone much fixing, and in addition the fmod()
-function now supports modulus operations.
-
-( The fixed Math::BigFloat module is also available in CPAN for those
-who can't upgrade their Perl: http://www.cpan.org/authors/id/J/JP/JPEACOCK/ )
-
-=item *
-
-Devel::Peek now has an interface for the Perl memory statistics
-(this works only if you are using perl's malloc, and if you have
-compiled with debugging).
-
-=item *
-
-IO::Socket has now atmark() method, which returns true if the socket
-is positioned at the out-of-band mark. The method is also exportable
-as a sockatmark() function.
-
-=item *
-
-IO::Socket::INET has support for ReusePort option (if your platform
-supports it). The Reuse option now has an alias, ReuseAddr. For clarity
-you may want to prefer ReuseAddr.
-
-=item *
-
-Net::Ping has been enhanced. There is now "external" protocol which
-uses Net::Ping::External module which runs external ping(1) and parses
-the output. An alpha version of Net::Ping::External is available in
-CPAN and in 5.7.2 the Net::Ping::External may be integrated to Perl.
-
-=item *
-
-The C<open> pragma allows layers other than ":raw" and ":crlf" when
-using PerlIO.
-
-=item *
-
-POSIX::sigaction() is now much more flexible and robust.
-You can now install coderef handlers, 'DEFAULT', and 'IGNORE'
-handlers, installing new handlers was not atomic.
-
-=item *
-
-The Test module has been significantly enhanced. Its use is
-greatly recommended for module writers.
-
-=item *
-
-The utf8:: name space (as in the pragma) provides various
-Perl-callable functions to provide low level access to Perl's
-internal Unicode representation. At the moment only length()
-has been implemented.
-
-=back
-
-The following modules have been upgraded from the versions at CPAN:
-CPAN, CGI, DB_File, File::Temp, Getopt::Long, Pod::Man, Pod::Text,
-Storable, Text-Tabs+Wrap.
-
-=head1 Performance Enhancements
-
-=over 4
-
-=item *
-
-Hashes now use Bob Jenkins "One-at-a-Time" hashing key algorithm
-( http://burtleburtle.net/bob/hash/doobs.html ). This algorithm is
-reasonably fast while producing a much better spread of values than
-the old hashing algorithm (originally by Chris Torek, later tweaked by
-Ilya Zakharevich). Hash values output from the algorithm on a hash of
-all 3-char printable ASCII keys comes much closer to passing the
-DIEHARD random number generation tests. According to perlbench, this
-change has not affected the overall speed of Perl.
-
-=item *
-
-unshift() should now be noticeably faster.
-
-=back
-
-=head1 Utility Changes
-
-=over 4
-
-=item *
-
-h2xs now produces template README.
-
-=item *
-
-s2p has been completely rewritten in Perl. (It is in fact a full
-implementation of sed in Perl.)
-
-=item *
-
-xsubpp now supports OUT keyword.
-
-=back
-
-=head1 New Documentation
-
-=head2 perlclib
-
-Internal replacements for standard C library functions.
-(Interesting only for extension writers and Perl core hackers.)
-
-=head2 perliol
-
-Internals of PerlIO with layers.
-
-=head2 README.aix
-
-Documentation on compiling Perl on AIX has been added. AIX has
-several different C compilers and getting the right patch level
-is essential. On install README.aix will be installed as L<perlaix>.
-
-=head2 README.bs2000
-
-Documentation on compiling Perl on the POSIX-BC platform (an EBCDIC
-mainframe environment) has been added.
-
-This was formerly known as README.posix-bc but the name was considered
-to be too confusing (it has nothing to do with the POSIX module or the
-POSIX standard). On install README.bs2000 will be installed as L<perlbs2000>.
-
-=head2 README.macos
-
-In perl 5.7.1 (and in the 5.6.1) the MacPerl sources have been
-synchronised with the standard Perl sources. To compile MacPerl
-some additional steps are required, and this file documents those
-steps. On install README.macos will be installed as L<perlmacos>.
-
-=head2 README.mpeix
-
-The README.mpeix has been podified, which means that this information
-about compiling and using Perl on the MPE/iX miniframe platform will
-be installed as L<perlmpeix>.
-
-=head2 README.solaris
-
-README.solaris has been created and Solaris wisdom from elsewhere
-in the Perl documentation has been collected there. On install
-README.solaris will be installed as L<perlsolaris>.
-
-=head2 README.vos
-
-The README.vos has been podified, which means that this information
-about compiling and using Perl on the Stratus VOS miniframe platform
-will be installed as L<perlvos>.
-
-=head2 Porting/repository.pod
-
-Documentation on how to use the Perl source repository has been added.
-
-=head1 Installation and Configuration Improvements
-
-=over 4
-
-=item *
-
-Because PerlIO is now the default on most platforms, "-perlio" doesn't
-get appended to the $Config{archname} (also known as $^O) anymore.
-Instead, if you explicitly choose not to use perlio (Configure command
-line option -Uuseperlio), you will get "-stdio" appended.
-
-=item *
-
-Another change related to the architecture name is that "-64all"
-(-Duse64bitall, or "maximally 64-bit") is appended only if your
-pointers are 64 bits wide. (To be exact, the use64bitall is ignored.)
-
-=item *
-
-APPLLIB_EXP, a less-know configuration-time definition, has been
-documented. It can be used to prepend site-specific directories
-to Perl's default search path (@INC), see INSTALL for information.
-
-=item *
-
-Building Berkeley DB3 for compatibility modes for DB, NDBM, and ODBM
-has been documented in INSTALL.
-
-=item *
-
-If you are on IRIX or Tru64 platforms, new profiling/debugging options
-have been added, see L<perlhack> for more information about pixie and
-Third Degree.
-
-=back
-
-=head2 New Or Improved Platforms
-
-For the list of platforms known to support Perl,
-see L<perlport/"Supported Platforms">.
-
-=over 4
-
-=item *
-
-AIX dynamic loading should be now better supported.
-
-=item *
-
-After a long pause, AmigaOS has been verified to be happy with Perl.
-
-=item *
-
-EBCDIC platforms (z/OS, also known as OS/390, POSIX-BC, and VM/ESA)
-have been regained. Many test suite tests still fail and the
-co-existence of Unicode and EBCDIC isn't quite settled, but the
-situation is much better than with Perl 5.6. See L<perlos390>,
-L<perlbs2000> (for POSIX-BC), and L<perlvmesa> for more information.
-
-=item *
-
-Building perl with -Duseithreads or -Duse5005threads now works under
-HP-UX 10.20 (previously it only worked under 10.30 or later). You will
-need a thread library package installed. See README.hpux.
-
-=item *
-
-Mac OS Classic (MacPerl has of course been available since
-perl 5.004 but now the source code bases of standard Perl
-and MacPerl have been synchronised)
-
-=item *
-
-NCR MP-RAS is now supported.
-
-=item *
-
-NonStop-UX is now supported.
-
-=item *
-
-Amdahl UTS is now supported.
-
-=item *
-
-z/OS (formerly known as OS/390, formerly known as MVS OE) has now
-support for dynamic loading. This is not selected by default,
-however, you must specify -Dusedl in the arguments of Configure.
-
-=back
-
-=head2 Generic Improvements
-
-=over 4
-
-=item *
-
-Configure no longer includes the DBM libraries (dbm, gdbm, db, ndbm)
-when building the Perl binary. The only exception to this is SunOS 4.x,
-which needs them.
-
-=item *
-
-Some new Configure symbols, useful for extension writers:
-
-=over 8
-
-=item d_cmsghdr
-
-For struct cmsghdr.
-
-=item d_fcntl_can_lock
-
-Whether fcntl() can be used for file locking.
-
-=item d_fsync
-
-=item d_getitimer
-
-=item d_getpagsz
-
-For getpagesize(), though you should prefer POSIX::sysconf(_SC_PAGE_SIZE))
-
-=item d_msghdr_s
-
-For struct msghdr.
-
-=item need_va_copy
-
-Whether one needs to use Perl_va_copy() to copy varargs.
-
-=item d_readv
-
-=item d_recvmsg
-
-=item d_sendmsg
-
-=item sig_size
-
-The number of elements in an array needed to hold all the available signals.
-
-=item d_sockatmark
-
-=item d_strtoq
-
-=item d_u32align
-
-Whether one needs to access character data aligned by U32 sized pointers.
-
-=item d_ualarm
-
-=item d_usleep
-
-=back
-
-=item *
-
-Removed Configure symbols: the PDP-11 memory model settings: huge,
-large, medium, models.
-
-=item *
-
-SOCKS support is now much more robust.
-
-=item *
-
-If your file system supports symbolic links you can build Perl outside
-of the source directory by
-
- mkdir perl/build/directory
- cd perl/build/directory
- sh /path/to/perl/source/Configure -Dmksymlinks ...
-
-This will create in perl/build/directory a tree of symbolic links
-pointing to files in /path/to/perl/source. The original files are left
-unaffected. After Configure has finished you can just say
-
- make all test
-
-and Perl will be built and tested, all in perl/build/directory.
-
-=back
-
-=head1 Selected Bug Fixes
-
-Numerous memory leaks and uninitialized memory accesses have been hunted down.
-Most importantly anonymous subs used to leak quite a bit.
-
-=over 4
-
-=item *
-
-chop(@list) in list context returned the characters chopped in
-reverse order. This has been reversed to be in the right order.
-
-=item *
-
-The order of DESTROYs has been made more predictable.
-
-=item *
-
-mkdir() now ignores trailing slashes in the directory name,
-as mandated by POSIX.
-
-=item *
-
-Attributes (like :shared) didn't work with our().
-
-=item *
-
-The PERL5OPT environment variable (for passing command line arguments
-to Perl) didn't work for more than a single group of options.
-
-=item *
-
-The tainting behaviour of sprintf() has been rationalized. It does
-not taint the result of floating point formats anymore, making the
-behaviour consistent with that of string interpolation.
-
-=item *
-
-All but the first argument of the IO syswrite() method are now optional.
-
-=item *
-
-Tie::ARRAY SPLICE method was broken.
-
-=item *
-
-vec() now tries to work with characters <= 255 when possible, but it leaves
-higher character values in place. In that case, if vec() was used to modify
-the string, it is no longer considered to be utf8-encoded.
-
-=back
-
-=head2 Platform Specific Changes and Fixes
-
-=over 4
-
-=item *
-
-Linux previously had problems related to sockaddrlen when using
-accept(), revcfrom() (in Perl: recv()), getpeername(), and getsockname().
-
-=item *
-
-Previously DYNIX/ptx had problems in its Configure probe for non-blocking I/O.
-
-=item *
-
-Windows
-
-=over 8
-
-=item *
-
-Borland C++ v5.5 is now a supported compiler that can build Perl.
-However, the generated binaries continue to be incompatible with those
-generated by the other supported compilers (GCC and Visual C++).
-
-=item *
-
-Win32::GetCwd() correctly returns C:\ instead of C: when at the drive root.
-Other bugs in chdir() and Cwd::cwd() have also been fixed.
-
-=item *
-
-Duping socket handles with open(F, ">&MYSOCK") now works under Windows 9x.
-
-=item *
-
-HTML files will be installed in c:\perl\html instead of c:\perl\lib\pod\html
-
-=item *
-
-The makefiles now provide a single switch to bulk-enable all the features
-enabled in ActiveState ActivePerl (a popular binary distribution).
-
-=back
-
-=back
-
-=head1 New or Changed Diagnostics
-
-Two new debugging options have been added: if you have compiled your
-Perl with debugging, you can use the -DT and -DR options to trace
-tokenising and to add reference counts to displaying variables,
-respectively.
-
-=over 4
-
-=item *
-
-If an attempt to use a (non-blessed) reference as an array index
-is made, a warning is given.
-
-=item *
-
-C<push @a;> and C<unshift @a;> (with no values to push or unshift)
-now give a warning. This may be a problem for generated and eval'ed
-code.
-
-=back
-
-=head1 Changed Internals
-
-=over 4
-
-=item *
-
-Some new APIs: ptr_table_clear(), ptr_table_free(), sv_setref_uv().
-For the full list of the available APIs see L<perlapi>.
-
-=item *
-
-dTHR and djSP have been obsoleted; the former removed (because it's
-a no-op) and the latter replaced with dSP.
-
-=item *
-
-Perl now uses system malloc instead of Perl malloc on all 64-bit
-platforms, and even in some not-always-64-bit platforms like AIX,
-IRIX, and Solaris. This change breaks backward compatibility but
-Perl's malloc has problems with large address spaces and also the
-speed of vendors' malloc is generally better in large address space
-machines (Perl's malloc is mostly tuned for space).
-
-=back
-
-=head1 New Tests
-
-Many new tests have been added. The most notable is probably the
-lib/1_compile: it is very notable because running it takes quite a
-long time. It test compiles all the Perl modules in the distribution.
-Please be patient.
-
-=head1 Known Problems
-
-Note that unlike other sections in this document (which describe
-changes since 5.7.0) this section is cumulative containing known
-problems for all the 5.7 releases.
-
-=head2 AIX vac 5.0.0.0 May Produce Buggy Code For Perl
-
-The AIX C compiler vac version 5.0.0.0 may produce buggy code,
-resulting in few random tests failing, but when the failing tests
-are run by hand, they succeed. We suggest upgrading to at least
-vac version 5.0.1.0, that has been known to compile Perl correctly.
-"lslpp -L|grep vac.C" will tell you the vac version.
-
-=head2 lib/ftmp-security tests warn 'system possibly insecure'
-
-Don't panic. Read INSTALL 'make test' section instead.
-
-=head2 lib/io_multihomed Fails In LP64-Configured HP-UX
-
-The lib/io_multihomed test may hang in HP-UX if Perl has been
-configured to be 64-bit. Because other 64-bit platforms do not hang in
-this test, HP-UX is suspect. All other tests pass in 64-bit HP-UX. The
-test attempts to create and connect to "multihomed" sockets (sockets
-which have multiple IP addresses).
-
-=head2 Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX
-
-If perl is configured with -Duse64bitall, the successful result of the
-subtest 10 of lib/posix may arrive before the successful result of the
-subtest 9, which confuses the test harness so much that it thinks the
-subtest 9 failed.
-
-=head2 lib/b test 19
-
-The test fails on various platforms (PA64 and IA64 are known), but the
-exact cause is still being investigated.
-
-=head2 Linux With Sfio Fails op/misc Test 48
-
-No known fix.
-
-=head2 sigaction test 13 in VMS
-
-The test is known to fail; whether it's because of VMS of because
-of faulty test is not known.
-
-=head2 sprintf tests 129 and 130
-
-The op/sprintf tests 129 and 130 are known to fail on some platforms.
-Examples include any platform using sfio, and Compaq/Tandem's NonStop-UX.
-The failing platforms do not comply with the ANSI C Standard, line
-19ff on page 134 of ANSI X3.159 1989 to be exact. (They produce
-something else than "1" and "-1" when formatting 0.6 and -0.6 using
-the printf format "%.0f", most often they produce "0" and "-0".)
-
-=head2 Failure of Thread tests
-
-The subtests 19 and 20 of lib/thr5005.t test are known to fail due to
-fundamental problems in the 5.005 threading implementation. These are
-not new failures--Perl 5.005_0x has the same bugs, but didn't have
-these tests. (Note that support for 5.005-style threading remains
-experimental.)
-
-=head2 Localising a Tied Variable Leaks Memory
-
- use Tie::Hash;
- tie my %tie_hash => 'Tie::StdHash';
-
- ...
-
- local($tie_hash{Foo}) = 1; # leaks
-
-Code like the above is known to leak memory every time the local()
-is executed.
-
-=head2 Self-tying of Arrays and Hashes Is Forbidden
-
-Self-tying of arrays and hashes is broken in rather deep and
-hard-to-fix ways. As a stop-gap measure to avoid people from getting
-frustrated at the mysterious results (core dumps, most often) it is
-for now forbidden (you will get a fatal error even from an attempt).
-
-=head2 Building Extensions Can Fail Because Of Largefiles
-
-Some extensions like mod_perl are known to have issues with
-`largefiles', a change brought by Perl 5.6.0 in which file offsets
-default to 64 bits wide, where supported. Modules may fail to compile
-at all or compile and work incorrectly. Currently there is no good
-solution for the problem, but Configure now provides appropriate
-non-largefile ccflags, ldflags, libswanted, and libs in the %Config
-hash (e.g., $Config{ccflags_nolargefiles}) so the extensions that are
-having problems can try configuring themselves without the
-largefileness. This is admittedly not a clean solution, and the
-solution may not even work at all. One potential failure is whether
-one can (or, if one can, whether it's a good idea) link together at
-all binaries with different ideas about file offsets, all this is
-platform-dependent.
-
-=head2 The Compiler Suite Is Still Experimental
-
-The compiler suite is slowly getting better but is nowhere near
-working order yet.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://bugs.perl.org/ There may also be
-information at http://www.perl.com/perl/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-=head1 SEE ALSO
-
-The F<Changes> file for exhaustive details on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=head1 HISTORY
-
-Written by Jarkko Hietaniemi <F<jhi at iki.fi>>, with many contributions
-from The Perl Porters and Perl Users submitting feedback and patches.
-
-Send omissions or corrections to <F<perlbug at perl.org>>.
-
-=cut
Deleted: vendor/perl/dist/pod/perl572delta.pod
===================================================================
--- vendor/perl/dist/pod/perl572delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl572delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,831 +0,0 @@
-=head1 NAME
-
-perl572delta - what's new for perl v5.7.2
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.7.1 release and the
-5.7.2 release.
-
-(To view the differences between the 5.6.0 release and the 5.7.0
-release, see L<perl570delta>. To view the differences between the
-5.7.0 release and the 5.7.1 release, see L<perl571delta>.)
-
-=head1 Security Vulnerability Closed
-
-(This change was already made in 5.7.0 but bears repeating here.)
-
-A security vulnerability affecting all Perl versions prior to 5.6.1
-was found in August 2000. The vulnerability does not affect default
-installations and as far as is known affects only the Linux platform.
-
-You should upgrade your Perl to 5.6.1 as soon as possible. Patches
-for earlier releases exist but using the patches require full
-recompilation from the source code anyway, so 5.6.1 is your best
-choice.
-
-See http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt
-for more information.
-
-=head1 Incompatible Changes
-
-=head2 64-bit platforms and malloc
-
-If your pointers are 64 bits wide, the Perl malloc is no more being
-used because it simply does not work with 8-byte pointers. Also,
-usually the system malloc on such platforms are much better optimized
-for such large memory models than the Perl malloc.
-
-=head2 AIX Dynaloading
-
-The AIX dynaloading now uses in AIX releases 4.3 and newer the native
-dlopen interface of AIX instead of the old emulated interface. This
-change will probably break backward compatibility with compiled
-modules. The change was made to make Perl more compliant with other
-applications like modperl which are using the AIX native interface.
-
-=head2 Socket Extension Dynamic in VMS
-
-The Socket extension is now dynamically loaded instead of being
-statically built in. This may or may not be a problem with ancient
-TCP/IP stacks of VMS: we do not know since we weren't able to test
-Perl in such configurations.
-
-=head2 Different Definition of the Unicode Character Classes \p{In...}
-
-As suggested by the Unicode consortium, the Unicode character classes
-now prefer I<scripts> as opposed to I<blocks> (as defined by Unicode);
-in Perl, when the C<\p{In....}> and the C<\p{In....}> regular expression
-constructs are used. This has changed the definition of some of those
-character classes.
-
-The difference between scripts and blocks is that scripts are the
-glyphs used by a language or a group of languages, while the blocks
-are more artificial groupings of 256 characters based on the Unicode
-numbering.
-
-In general this change results in more inclusive Unicode character
-classes, but changes to the other direction also do take place:
-for example while the script C<Latin> includes all the Latin
-characters and their various diacritic-adorned versions, it
-does not include the various punctuation or digits (since they
-are not solely C<Latin>).
-
-Changes in the character class semantics may have happened if a script
-and a block happen to have the same name, for example C<Hebrew>.
-In such cases the script wins and C<\p{InHebrew}> now means the script
-definition of Hebrew. The block definition in still available,
-though, by appending C<Block> to the name: C<\p{InHebrewBlock}> means
-what C<\p{InHebrew}> meant in perl 5.6.0. For the full list
-of affected character classes, see L<perlunicode/Blocks>.
-
-=head2 Deprecations
-
-The current user-visible implementation of pseudo-hashes (the weird
-use of the first array element) is deprecated starting from Perl 5.8.0
-and will be removed in Perl 5.10.0, and the feature will be
-implemented differently. Not only is the current interface rather
-ugly, but the current implementation slows down normal array and hash
-use quite noticeably. The C<fields> pragma interface will remain
-available.
-
-The syntaxes C<< @a->[...] >> and C<< @h->{...} >> have now been deprecated.
-
-The suidperl is also considered to be too much a risk to continue
-maintaining and the suidperl code is likely to be removed in a future
-release.
-
-The C<package;> syntax (C<package> without an argument has been
-deprecated. Its semantics were never that clear and its
-implementation even less so. If you have used that feature to
-disallow all but fully qualified variables, C<use strict;> instead.
-
-The chdir(undef) and chdir('') behaviors to match chdir() has been
-deprecated. In future versions, chdir(undef) and chdir('') will
-simply fail.
-
-=head1 Core Enhancements
-
-In general a lot of fixing has happened in the area of Perl's
-understanding of numbers, both integer and floating point. Since in
-many systems the standard number parsing functions like C<strtoul()>
-and C<atof()> seem to have bugs, Perl tries to work around their
-deficiencies. This results hopefully in more accurate numbers.
-
-=over 4
-
-=item *
-
-The rules for allowing underscores (underbars) in numeric constants
-have been relaxed and simplified: now you can have an underscore
-B<between digits>.
-
-=item *
-
-GMAGIC (right-hand side magic) could in many cases such as string
-concatenation be invoked too many times.
-
-=item *
-
-Lexicals I: lexicals outside an eval "" weren't resolved
-correctly inside a subroutine definition inside the eval "" if they
-were not already referenced in the top level of the eval""ed code.
-
-=item *
-
-Lexicals II: lexicals leaked at file scope into subroutines that
-were declared before the lexicals.
-
-=item *
-
-Lvalue subroutines can now return C<undef> in list context.
-
-=item *
-
-The C<op_clear> and C<op_null> are now exported.
-
-=item *
-
-A new special regular expression variable has been introduced:
-C<$^N>, which contains the most-recently closed group (submatch).
-
-=item *
-
-L<utime> now supports C<utime undef, undef, @files> to change the
-file timestamps to the current time.
-
-=item *
-
-The Perl parser has been stress tested using both random input and
-Markov chain input.
-
-=item *
-
-C<eval "v200"> now works.
-
-=item *
-
-VMS now works under PerlIO.
-
-=item *
-
-END blocks are now run even if you exit/die in a BEGIN block.
-The execution of END blocks is now controlled by
-PL_exit_flags & PERL_EXIT_DESTRUCT_END. This enables the new
-behaviour for perl embedders. This will default in 5.10. See
-L<perlembed>.
-
-=back
-
-=head1 Modules and Pragmata
-
-=head2 New Modules and Distributions
-
-=over 4
-
-=item *
-
-L<Attribute::Handlers> - Simpler definition of attribute handlers
-
-=item *
-
-L<ExtUtils::Constant> - generate XS code to import C header constants
-
-=item *
-
-L<I18N::Langinfo> - query locale information
-
-=item *
-
-L<I18N::LangTags> - functions for dealing with RFC3066-style language tags
-
-=item *
-
-L<libnet> - a collection of perl5 modules related to network programming
-
-Perl installation leaves libnet unconfigured, use F<libnetcfg> to configure.
-
-=item *
-
-L<List::Util> - selection of general-utility list subroutines
-
-=item *
-
-L<Locale::Maketext> - framework for localization
-
-=item *
-
-L<Memoize> - Make your functions faster by trading space for time
-
-=item *
-
-L<NEXT> - pseudo-class for method redispatch
-
-=item *
-
-L<Scalar::Util> - selection of general-utility scalar subroutines
-
-=item *
-
-L<Test::More> - yet another framework for writing test scripts
-
-=item *
-
-L<Test::Simple> - Basic utilities for writing tests
-
-=item *
-
-L<Time::HiRes> - high resolution ualarm, usleep, and gettimeofday
-
-=item *
-
-L<Time::Piece> - Object Oriented time objects
-
-(Previously known as L<Time::Object>.)
-
-=item *
-
-L<Time::Seconds> - a simple API to convert seconds to other date values
-
-=item *
-
-L<UnicodeCD> - Unicode Character Database
-
-=back
-
-=head2 Updated And Improved Modules and Pragmata
-
-=over 4
-
-=item *
-
-L<B::Deparse> module has been significantly enhanced. It now
-can deparse almost all of the standard test suite (so that the
-tests still succeed). There is a make target "test.deparse"
-for trying this out.
-
-=item *
-
-L<Class::Struct> now assigns the array/hash element if the accessor
-is called with an array/hash element as the B<sole> argument.
-
-=item *
-
-L<Cwd> extension is now (even) faster.
-
-=item *
-
-L<DB_File> extension has been updated to version 1.77.
-
-=item *
-
-L<Fcntl>, L<Socket>, and L<Sys::Syslog> have been rewritten to use the
-new-style constant dispatch section (see L<ExtUtils::Constant>).
-
-=item *
-
-L<File::Find> is now (again) reentrant. It also has been made
-more portable.
-
-=item *
-
-L<File::Glob> now supports C<GLOB_LIMIT> constant to limit the
-size of the returned list of filenames.
-
-=item *
-
-L<IO::Socket::INET> now supports C<LocalPort> of zero (usually meaning
-that the operating system will make one up.)
-
-=item *
-
-The L<vars> pragma now supports declaring fully qualified variables.
-(Something that C<our()> does not and will not support.)
-
-=back
-
-=head1 Utility Changes
-
-=over 4
-
-=item *
-
-The F<emacs/e2ctags.pl> is now much faster.
-
-=item *
-
-L<h2ph> now supports C trigraphs.
-
-=item *
-
-L<h2xs> uses the new L<ExtUtils::Constant> module which will affect
-newly created extensions that define constants. Since the new code is
-more correct (if you have two constants where the first one is a
-prefix of the second one, the first constant B<never> gets defined),
-less lossy (it uses integers for integer constant, as opposed to the
-old code that used floating point numbers even for integer constants),
-and slightly faster, you might want to consider regenerating your
-extension code (the new scheme makes regenerating easy).
-L<h2xs> now also supports C trigraphs.
-
-=item *
-
-L<libnetcfg> has been added to configure the libnet.
-
-=item *
-
-The F<Pod::Html> (and thusly L<pod2html>) now allows specifying
-a cache directory.
-
-=back
-
-=head1 New Documentation
-
-=over 4
-
-=item *
-
-L<Locale::Maketext::TPJ13> is an article about software localization,
-originally published in The Perl Journal #13, republished here with
-kind permission.
-
-=item *
-
-More README.$PLATFORM files have been converted into pod, which also
-means that they also be installed as perl$PLATFORM documentation
-files. The new files are L<perlapollo>, L<perlbeos>, L<perldgux>,
-L<perlhurd>, L<perlmint>, L<perlnetware>, L<perlplan9>, L<perlqnx>,
-and L<perltru64>.
-
-=item *
-
-The F<Todo> and F<Todo-5.6> files have been merged into L<perltodo>.
-
-=item *
-
-Use of the F<gprof> tool to profile Perl has been documented in
-L<perlhack>. There is a make target "perl.gprof" for generating a
-gprofiled Perl executable.
-
-=back
-
-=head1 Installation and Configuration Improvements
-
-=head2 New Or Improved Platforms
-
-=over 4
-
-=item *
-
-AIX should now work better with gcc, threads, and 64-bitness. Also the
-long doubles support in AIX should be better now. See L<perlaix>.
-
-=item *
-
-AtheOS ( http://www.atheos.cx/ ) is a new platform.
-
-=item *
-
-DG/UX platform now supports the 5.005-style threads. See L<perldgux>.
-
-=item *
-
-DYNIX/ptx platform (a.k.a. dynixptx) is supported at or near osvers 4.5.2.
-
-=item *
-
-Several Mac OS (Classic) portability patches have been applied. We
-hope to get a fully working port by 5.8.0. (The remaining problems
-relate to the changed IO model of Perl.) See L<perlmacos>.
-
-=item *
-
-Mac OS X (or Darwin) should now be able to build Perl even on HFS+
-filesystems. (The case-insensitivity confused the Perl build process.)
-
-=item *
-
-NetWare from Novell is now supported. See L<perlnetware>.
-
-=item *
-
-The Amdahl UTS Unix mainframe platform is now supported.
-
-=back
-
-=head2 Generic Improvements
-
-=over 4
-
-=item *
-
-In AFS installations one can configure the root of the AFS to be
-somewhere else than the default F</afs> by using the Configure
-parameter C<-Dafsroot=/some/where/else>.
-
-=item *
-
-The version of Berkeley DB used when the Perl (and, presumably, the
-DB_File extension) was built is now available as
-C<@Config{qw(db_version_major db_version_minor db_version_patch)}>
-from Perl and as C<DB_VERSION_MAJOR_CFG DB_VERSION_MINOR_CFG
-DB_VERSION_PATCH_CFG> from C.
-
-=item *
-
-The Thread extension is now not built at all under ithreads
-(C<Configure -Duseithreads>) because it wouldn't work anyway (the
-Thread extension requires being Configured with C<-Duse5005threads>).
-
-=item *
-
-The C<B::Deparse> compiler backend has been so significantly improved
-that almost the whole Perl test suite passes after being deparsed. A
-make target has been added to help in further testing: C<make test.deparse>.
-
-=back
-
-=head1 Selected Bug Fixes
-
-=over 5
-
-=item *
-
-The autouse pragma didn't work for Multi::Part::Function::Names.
-
-=item *
-
-The behaviour of non-decimal but numeric string constants such as
-"0x23" was platform-dependent: in some platforms that was seen as 35,
-in some as 0, in some as a floating point number (don't ask). This
-was caused by Perl using the operating system libraries in a situation
-where the result of the string to number conversion is undefined: now
-Perl consistently handles such strings as zero in numeric contexts.
-
-=item *
-
-L<dprofpp> -R didn't work.
-
-=item *
-
-PERL5OPT with embedded spaces didn't work.
-
-=item *
-
-L<Sys::Syslog> ignored the C<LOG_AUTH> constant.
-
-=back
-
-=head2 Platform Specific Changes and Fixes
-
-=over 4
-
-=item *
-
-Some versions of glibc have a broken modfl(). This affects builds
-with C<-Duselongdouble>. This version of Perl detects this brokenness
-and has a workaround for it. The glibc release 2.2.2 is known to have
-fixed the modfl() bug.
-
-=back
-
-=head1 New or Changed Diagnostics
-
-=over 4
-
-=item *
-
-In the regular expression diagnostics the C<E<lt>E<lt> HERE> marker
-introduced in 5.7.0 has been changed to be C<E<lt>-- HERE> since too
-many people found the C<E<lt>E<lt>> to be too similar to here-document
-starters.
-
-=item *
-
-If you try to L<perlfunc/pack> a number less than 0 or larger than 255
-using the C<"C"> format you will get an optional warning. Similarly
-for the C<"c"> format and a number less than -128 or more than 127.
-
-=item *
-
-Certain regex modifiers such as C<(?o)> make sense only if applied to
-the entire regex. You will an optional warning if you try to do otherwise.
-
-=item *
-
-Using arrays or hashes as references (e.g. C<< %foo->{bar} >> has been
-deprecated for a while. Now you will get an optional warning.
-
-=back
-
-=head1 Source Code Enhancements
-
-=head2 MAGIC constants
-
-The MAGIC constants (e.g. C<'P'>) have been macrofied
-(e.g. C<PERL_MAGIC_TIED>) for better source code readability
-and maintainability.
-
-=head2 Better commented code
-
-F<perly.c>, F<sv.c>, and F<sv.h> have now been extensively commented.
-
-=head2 Regex pre-/post-compilation items matched up
-
-The regex compiler now maintains a structure that identifies nodes in
-the compiled bytecode with the corresponding syntactic features of the
-original regex expression. The information is attached to the new
-C<offsets> member of the C<struct regexp>. See L<perldebguts> for more
-complete information.
-
-=head2 gcc -Wall
-
-The C code has been made much more C<gcc -Wall> clean. Some warning
-messages still remain, though, so if you are compiling with gcc you
-will see some warnings about dubious practices. The warnings are
-being worked on.
-
-=head1 New Tests
-
-Several new tests have been added, especially for the F<lib> subsection.
-
-The tests are now reported in a different order than in earlier Perls.
-(This happens because the test scripts from under t/lib have been moved
-to be closer to the library/extension they are testing.)
-
-=head1 Known Problems
-
-Note that unlike other sections in this document (which describe
-changes since 5.7.0) this section is cumulative containing known
-problems for all the 5.7 releases.
-
-=head2 AIX
-
-=over 4
-
-=item *
-
-In AIX 4.2 Perl extensions that use C++ functions that use statics
-may have problems in that the statics are not getting initialized.
-In newer AIX releases this has been solved by linking Perl with
-the libC_r library, but unfortunately in AIX 4.2 the said library
-has an obscure bug where the various functions related to time
-(such as time() and gettimeofday()) return broken values, and
-therefore in AIX 4.2 Perl is not linked against the libC_r.
-
-=item *
-
-vac 5.0.0.0 May Produce Buggy Code For Perl
-
-The AIX C compiler vac version 5.0.0.0 may produce buggy code,
-resulting in few random tests failing, but when the failing tests
-are run by hand, they succeed. We suggest upgrading to at least
-vac version 5.0.1.0, that has been known to compile Perl correctly.
-"lslpp -L|grep vac.C" will tell you the vac version.
-
-=back
-
-=head2 Amiga Perl Invoking Mystery
-
-One cannot call Perl using the C<volume:> syntax, that is, C<perl -v>
-works, but for example C<bin:perl -v> doesn't. The exact reason is
-known but the current suspect is the F<ixemul> library.
-
-=head2 lib/ftmp-security tests warn 'system possibly insecure'
-
-Don't panic. Read INSTALL 'make test' section instead.
-
-=head2 Cygwin intermittent failures of lib/Memoize/t/expire_file 11 and 12
-
-The subtests 11 and 12 sometimes fail and sometimes work.
-
-=head2 HP-UX lib/io_multihomed Fails When LP64-Configured
-
-The lib/io_multihomed test may hang in HP-UX if Perl has been
-configured to be 64-bit. Because other 64-bit platforms do not hang in
-this test, HP-UX is suspect. All other tests pass in 64-bit HP-UX. The
-test attempts to create and connect to "multihomed" sockets (sockets
-which have multiple IP addresses).
-
-=head2 HP-UX lib/posix Subtest 9 Fails When LP64-Configured
-
-If perl is configured with -Duse64bitall, the successful result of the
-subtest 10 of lib/posix may arrive before the successful result of the
-subtest 9, which confuses the test harness so much that it thinks the
-subtest 9 failed.
-
-=head2 Linux With Sfio Fails op/misc Test 48
-
-No known fix.
-
-=head2 OS/390
-
-OS/390 has rather many test failures but the situation is actually
-better than it was in 5.6.0, it's just that so many new modules and
-tests have been added.
-
- Failed Test Stat Wstat Total Fail Failed List of Failed
- -----------------------------------------------------------------------------
- ../ext/B/Deparse.t 14 1 7.14% 14
- ../ext/B/Showlex.t 1 1 100.00% 1
- ../ext/Encode/Encode/Tcl.t 610 13 2.13% 592 594 596 598
- 600 602 604-610
- ../ext/IO/lib/IO/t/io_unix.t 113 28928 5 3 60.00% 3-5
- ../ext/POSIX/POSIX.t 29 1 3.45% 14
- ../ext/Storable/t/lock.t 255 65280 5 3 60.00% 3-5
- ../lib/locale.t 129 33024 117 19 16.24% 99-117
- ../lib/warnings.t 434 1 0.23% 75
- ../lib/ExtUtils.t 27 1 3.70% 25
- ../lib/Math/BigInt/t/bigintpm.t 1190 1 0.08% 1145
- ../lib/Unicode/UCD.t 81 48 59.26% 1-16 49-64 66-81
- ../lib/User/pwent.t 9 1 11.11% 4
- op/pat.t 660 6 0.91% 242-243 424-425
- 626-627
- op/split.t 0 9 ?? ?? % ??
- op/taint.t 174 3 1.72% 156 162 168
- op/tr.t 70 3 4.29% 50 58-59
- Failed 16/422 test scripts, 96.21% okay. 105/23251 subtests failed, 99.55% okay.
-
-=head2 op/sprintf tests 129 and 130
-
-The op/sprintf tests 129 and 130 are known to fail on some platforms.
-Examples include any platform using sfio, and Compaq/Tandem's NonStop-UX.
-The failing platforms do not comply with the ANSI C Standard, line
-19ff on page 134 of ANSI X3.159 1989 to be exact. (They produce
-something other than "1" and "-1" when formatting 0.6 and -0.6 using
-the printf format "%.0f", most often they produce "0" and "-0".)
-
-=head2 Failure of Thread tests
-
-B<Note that support for 5.005-style threading remains experimental.>
-
-The following tests are known to fail due to fundamental problems in
-the 5.005 threading implementation. These are not new failures--Perl
-5.005_0x has the same bugs, but didn't have these tests.
-
- lib/autouse.t 4
- t/lib/thr5005.t 19-20
-
-=head2 UNICOS
-
-=over 4
-
-=item *
-
-ext/POSIX/sigaction subtests 6 and 13 may fail.
-
-=item *
-
-lib/ExtUtils may spuriously claim that subtest 28 failed,
-which is interesting since the test only has 27 tests.
-
-=item *
-
-Numerous numerical test failures
-
- op/numconvert 209,210,217,218
- op/override 7
- ext/Time/HiRes/HiRes 9
- lib/Math/BigInt/t/bigintpm 1145
- lib/Math/Trig 25
-
-These tests fail because of yet unresolved floating point inaccuracies.
-
-=back
-
-=head2 UTS
-
-There are a few known test failures, see L<perluts>.
-
-=head2 VMS
-
-Rather many tests are failing in VMS but that actually more tests
-succeed in VMS than they used to, it's just that there are many,
-many more tests than there used to be.
-
-Here are the known failures from some compiler/platform combinations.
-
-DEC C V5.3-006 on OpenVMS VAX V6.2
-
- [-.ext.list.util.t]tainted..............FAILED on test 3
- [-.ext.posix]sigaction..................FAILED on test 7
- [-.ext.time.hires]hires.................FAILED on test 14
- [-.lib.file.find]taint..................FAILED on test 17
- [-.lib.math.bigint.t]bigintpm...........FAILED on test 1183
- [-.lib.test.simple.t]exit...............FAILED on test 1
- [.lib]vmsish............................FAILED on test 13
- [.op]sprintf............................FAILED on test 12
- Failed 8/399 tests, 91.23% okay.
-
-DEC C V6.0-001 on OpenVMS Alpha V7.2-1 and
-Compaq C V6.2-008 on OpenVMS Alpha V7.1
-
- [-.ext.list.util.t]tainted..............FAILED on test 3
- [-.lib.file.find]taint..................FAILED on test 17
- [-.lib.test.simple.t]exit...............FAILED on test 1
- [.lib]vmsish............................FAILED on test 13
- Failed 4/399 tests, 92.48% okay.
-
-Compaq C V6.4-005 on OpenVMS Alpha 7.2.1
-
- [-.ext.b]showlex........................FAILED on test 1
- [-.ext.list.util.t]tainted..............FAILED on test 3
- [-.lib.file.find]taint..................FAILED on test 17
- [-.lib.test.simple.t]exit...............FAILED on test 1
- [.lib]vmsish............................FAILED on test 13
- [.op]misc...............................FAILED on test 49
- Failed 6/401 tests, 92.77% okay.
-
-=head2 Win32
-
-In multi-CPU boxes there are some problems with the I/O buffering:
-some output may appear twice.
-
-=head2 Localising a Tied Variable Leaks Memory
-
- use Tie::Hash;
- tie my %tie_hash => 'Tie::StdHash';
-
- ...
-
- local($tie_hash{Foo}) = 1; # leaks
-
-Code like the above is known to leak memory every time the local()
-is executed.
-
-=head2 Self-tying of Arrays and Hashes Is Forbidden
-
-Self-tying of arrays and hashes is broken in rather deep and
-hard-to-fix ways. As a stop-gap measure to avoid people from getting
-frustrated at the mysterious results (core dumps, most often) it is
-for now forbidden (you will get a fatal error even from an attempt).
-
-=head2 Variable Attributes are not Currently Usable for Tying
-
-This limitation will hopefully be fixed in future. (Subroutine
-attributes work fine for tying, see L<Attribute::Handlers>).
-
-=head2 Building Extensions Can Fail Because Of Largefiles
-
-Some extensions like mod_perl are known to have issues with
-`largefiles', a change brought by Perl 5.6.0 in which file offsets
-default to 64 bits wide, where supported. Modules may fail to compile
-at all or compile and work incorrectly. Currently there is no good
-solution for the problem, but Configure now provides appropriate
-non-largefile ccflags, ldflags, libswanted, and libs in the %Config
-hash (e.g., $Config{ccflags_nolargefiles}) so the extensions that are
-having problems can try configuring themselves without the
-largefileness. This is admittedly not a clean solution, and the
-solution may not even work at all. One potential failure is whether
-one can (or, if one can, whether it's a good idea) link together at
-all binaries with different ideas about file offsets, all this is
-platform-dependent.
-
-=head2 The Compiler Suite Is Still Experimental
-
-The compiler suite is slowly getting better but is nowhere near
-working order yet.
-
-=head2 The Long Double Support is Still Experimental
-
-The ability to configure Perl's numbers to use "long doubles",
-floating point numbers of hopefully better accuracy, is still
-experimental. The implementations of long doubles are not yet
-widespread and the existing implementations are not quite mature
-or standardised, therefore trying to support them is a rare
-and moving target. The gain of more precision may also be offset
-by slowdown in computations (more bits to move around, and the
-operations are more likely to be executed by less optimised
-libraries).
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://bugs.perl.org/ There may also be
-information at http://www.perl.com/perl/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-=head1 SEE ALSO
-
-The F<Changes> file for exhaustive details on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=head1 HISTORY
-
-Written by Jarkko Hietaniemi <F<jhi at iki.fi>>, with many contributions
-from The Perl Porters and Perl Users submitting feedback and patches.
-
-Send omissions or corrections to <F<perlbug at perl.org>>.
-
-=cut
Deleted: vendor/perl/dist/pod/perl573delta.pod
===================================================================
--- vendor/perl/dist/pod/perl573delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl573delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,246 +0,0 @@
-=head1 NAME
-
-perl573delta - what's new for perl v5.7.3
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.7.2 release and the
-5.7.3 release.
-
-(To view the differences between the 5.6.0 release and the 5.7.0
-release, see L<perl570delta>. To view the differences between the
-5.7.0 release and the 5.7.1 release, see L<perl571delta>. To view
-the differences between the 5.7.1 release and the 5.7.2 release,
-see L<perl572delta>.)
-
-=head1 Changes
-
-This is just a selected list of some of the more notable changes.
-The numbers refer to the Perl repository change numbers; see
-L<Changes58> (or L<Changes> in Perl 5.8.1). In addition to these
-changes, lots of work took place in integrating threads, PerlIO, and
-Unicode; general code cleanup; and last but not least porting to
-non-Unix lands such as Win32, VMS, Cygwin, DJGPP, VOS, MacOS Classic,
-and EBCDIC.
-
-=over 4
-
-=item 11362
-
-add LC_MESSAGES to POSIX :locale_h export tag
-
-=item 11371
-
-add DEL to [:cntrl:]
-
-=item 11375
-
-make h2ph understand constants like 1234L and 5678LL
-
-=item 11405
-
-Win32: fix bugs in handling of the virtualized environment
-
-=item 11410
-
-fix a bug in the security taint checking of open()
-
-=item 11423
-
-make perl fork() safe even on platforms that don't have pthread_atfork()
-
-=item 11459
-
-make switching optimization and debugging levels during Perl builds
-easier via the OPTIMIZE environment variable
-
-=item 11475
-
-make split()'s unused captures to be undef, not ''
-
-=item 11485
-
-Search::Dict: allow transforming lines before comparing
-
-=item 11490
-
-allow installing extra modules or bundles when building Perl
-
-=item 11516
-
-add -Wall in cflags when compiling with gcc to weed out dubious
-C practices
-
-=item 11541
-
-pluggable optimizer
-
-=item 11549
-
-WinCE: integrate the port
-
-=item 11589
-
-Win32: 4-arg select was broken
-
-=item 11594
-
-introduce the perlivp utility for verifying the Perl installation
-(IVP = Installation Verification Procedure)
-
-=item 11623
-
-rename lib/unicode to lib/unicore to avoid case-insensitivity problems
-with lib/Unicode
-
-=item 111631
-
-remove Time::Piece
-
-=item 11643
-
-document that use utf8 is not the right way most of the time
-
-=item 11656
-
-allow building perl with -DUSE_UTF8_SCRIPTS which makes UTF-8
-the default script encoding (not the default since that would
-break all scripts having legacy eight-bit data in them)
-
-=item 11725
-
-division preserving 64-bit integers
-
-=item 11743
-
-document the coderef-in- at INC feature
-
-=item 11794
-
-modulo (%) preserving 64-bit integers
-
-=item 11825
-
-update to Unicode 3.1.1
-
-=item 11865
-
-add the \[$@%&*] prototype support
-
-=item 11874
-
-oct() and hex() in glorious 64 bit
-
-=item 11877
-
-Class::Struct: allow recursive classes
-
-=item 11993
-
-fix unpack U to be the reverse of pack U
-
-=item 12056
-
-VMS: waitpid enhancements
-
-=item 12180
-
-unpack("Z*Z*", pack("Z*Z*", ..)) was broken
-
-=item 12243
-
-Devel::Peek: display UTF-8 SVs also as \x{...}
-
-=item 12288
-
-Data::Dumper: option to sort hashes
-
-=item 12542
-
-add perlpodspec
-
-=item 12652
-
-threadsafe DynaLoader, re, Opcode, File::Glob, and B
-
-=item 12756
-
-support BeOS better
-
-=item 12874
-
-read-only hashes (user-level interface is Hash::Util)
-
-=item 13162
-
-add Devel::PPPort
-
-=item 13179
-
-add the sort pragma
-
-=item 13326
-
-VMS: fix perl -P
-
-=item 13358
-
-add perlpacktut
-
-=item 13452
-
-SUPER-UX: add hints file
-
-=item 13575
-
-Win32: non-blocking waitpid(-1,WNOHANG)
-
-=item 13684
-
-introduce the -t option for gentler taint checking
-
-=item 14694
-
-add the if pragma
-
-=item 14832
-
-implement IV/UV/NV/long double un/packing with j/J/F/D
-
-=item 14854
-
-document the new taint behaviour of exec LIST and system LIST
-
-=back
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://bugs.perl.org. There may also be
-information at http://www.perl.com/, the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-=head1 SEE ALSO
-
-The F<Changes> file for exhaustive details on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=head1 HISTORY
-
-Written by Jarkko Hietaniemi <F<jhi at iki.fi>>, with many contributions
-from The Perl Porters and Perl Users submitting feedback and patches.
-
-Send omissions or corrections to <F<perlbug at perl.org>>.
-
-=cut
Deleted: vendor/perl/dist/pod/perl590delta.pod
===================================================================
--- vendor/perl/dist/pod/perl590delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl590delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1015 +0,0 @@
-=head1 NAME
-
-perl590delta - what is new for perl v5.9.0
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.8.0 release and
-the 5.9.0 release.
-
-=head1 Incompatible Changes
-
-=head2 Hash Randomisation
-
-Mainly due to security reasons, the "random ordering" of hashes
-has been made even more random. Previously while the order of hash
-elements from keys(), values(), and each() was essentially random,
-it was still repeatable. Now, however, the order varies between
-different runs of Perl.
-
-B<Perl has never guaranteed any ordering of the hash keys>, and the
-ordering has already changed several times during the lifetime of
-Perl 5. Also, the ordering of hash keys has always been, and
-continues to be, affected by the insertion order.
-
-The added randomness may affect applications.
-
-One possible scenario is when output of an application has included
-hash data. For example, if you have used the Data::Dumper module to
-dump data into different files, and then compared the files to see
-whether the data has changed, now you will have false positives since
-the order in which hashes are dumped will vary. In general the cure
-is to sort the keys (or the values); in particular for Data::Dumper to
-use the C<Sortkeys> option. If some particular order is really
-important, use tied hashes: for example the Tie::IxHash module
-which by default preserves the order in which the hash elements
-were added.
-
-More subtle problem is reliance on the order of "global destruction".
-That is what happens at the end of execution: Perl destroys all data
-structures, including user data. If your destructors (the DESTROY
-subroutines) have assumed any particular ordering to the global
-destruction, there might be problems ahead. For example, in a
-destructor of one object you cannot assume that objects of any other
-class are still available, unless you hold a reference to them.
-If the environment variable PERL_DESTRUCT_LEVEL is set to a non-zero
-value, or if Perl is exiting a spawned thread, it will also destruct
-the ordinary references and the symbol tables that are no longer in use.
-You can't call a class method or an ordinary function on a class that
-has been collected that way.
-
-The hash randomisation is certain to reveal hidden assumptions about
-some particular ordering of hash elements, and outright bugs: it
-revealed a few bugs in the Perl core and core modules.
-
-To disable the hash randomisation in runtime, set the environment
-variable PERL_HASH_SEED to 0 (zero) before running Perl (for more
-information see L<perlrun/PERL_HASH_SEED>), or to disable the feature
-completely in compile time, compile with C<-DNO_HASH_SEED> (see F<INSTALL>).
-
-See L<perlsec/"Algorithmic Complexity Attacks"> for the original
-rationale behind this change.
-
-=head2 UTF-8 On Filehandles No Longer Activated By Locale
-
-In Perl 5.8.0 all filehandles, including the standard filehandles,
-were implicitly set to be in Unicode UTF-8 if the locale settings
-indicated the use of UTF-8. This feature caused too many problems,
-so the feature was turned off and redesigned: see L</"Core Enhancements">.
-
-=head2 Single-number v-strings are no longer v-strings before "=>"
-
-The version strings or v-strings (see L<perldata/"Version Strings">)
-feature introduced in Perl 5.6.0 has been a source of some confusion--
-especially when the user did not want to use it, but Perl thought it
-knew better. Especially troublesome has been the feature that before
-a "=>" a version string (a "v" followed by digits) has been interpreted
-as a v-string instead of a string literal. In other words:
-
- %h = ( v65 => 42 );
-
-has meant since Perl 5.6.0
-
- %h = ( 'A' => 42 );
-
-(at least in platforms of ASCII progeny) Perl 5.8.1 restored the
-more natural interpretation
-
- %h = ( 'v65' => 42 );
-
-The multi-number v-strings like v65.66 and 65.66.67 still continue to
-be v-strings in Perl 5.8.
-
-=head2 (Win32) The -C Switch Has Been Repurposed
-
-The -C switch has changed in an incompatible way. The old semantics
-of this switch only made sense in Win32 and only in the "use utf8"
-universe in 5.6.x releases, and do not make sense for the Unicode
-implementation in 5.8.0. Since this switch could not have been used
-by anyone, it has been repurposed. The behavior that this switch
-enabled in 5.6.x releases may be supported in a transparent,
-data-dependent fashion in a future release.
-
-For the new life of this switch, see L<"UTF-8 no longer default under
-UTF-8 locales">, and L<perlrun/-C>.
-
-=head2 (Win32) The /d Switch Of cmd.exe
-
-Since version 5.8.1, perl uses the /d switch when running the cmd.exe shell
-internally for system(), backticks, and when opening pipes to external
-programs. The extra switch disables the execution of AutoRun commands
-from the registry, which is generally considered undesirable when
-running external programs. If you wish to retain compatibility with
-the older behavior, set PERL5SHELL in your environment to C<cmd /x/c>.
-
-=head2 The C<$*> variable has been removed
-
-C<$*>, which was deprecated in favor of the C</s> and C</m> regexp
-modifiers, has been removed.
-
-=head1 Core Enhancements
-
-=head2 Assertions
-
-Perl 5.9.0 has experimental support for assertions. Note that the user
-interface is not fully stabilized yet, and it may change until the 5.10.0
-release. A new command-line switch, B<-A>, is used to activate
-assertions, which are declared with the C<assertions> pragma. See
-L<assertions>.
-
-=head2 Defined-or operators
-
-A new operator C<//> (defined-or) has been implemented.
-The following statement:
-
- $a // $b
-
-is merely equivalent to
-
- defined $a ? $a : $b
-
-and
-
- $c //= $d;
-
-can be used instead of
-
- $c = $d unless defined $c;
-
-This operator has the same precedence and associativity as C<||>.
-It has a low-precedence counterpart, C<err>, which has the same precedence
-and associativity as C<or>. Special care has been taken to ensure that
-those operators Do What You Mean while not breaking old code, but some
-edge cases involving the empty regular expression may now parse
-differently. See L<perlop> for details.
-
-=head2 UTF-8 no longer default under UTF-8 locales
-
-In Perl 5.8.0 many Unicode features were introduced. One of them
-was found to be of more nuisance than benefit: the automagic
-(and silent) "UTF-8-ification" of filehandles, including the
-standard filehandles, if the user's locale settings indicated
-use of UTF-8.
-
-For example, if you had C<en_US.UTF-8> as your locale, your STDIN and
-STDOUT were automatically "UTF-8", in other words an implicit
-binmode(..., ":utf8") was made. This meant that trying to print, say,
-chr(0xff), ended up printing the bytes 0xc3 0xbf. Hardly what
-you had in mind unless you were aware of this feature of Perl 5.8.0.
-The problem is that the vast majority of people weren't: for example
-in RedHat releases 8 and 9 the B<default> locale setting is UTF-8, so
-all RedHat users got UTF-8 filehandles, whether they wanted it or not.
-The pain was intensified by the Unicode implementation of Perl 5.8.0
-(still) having nasty bugs, especially related to the use of s/// and
-tr///. (Bugs that have been fixed in 5.8.1)
-
-Therefore a decision was made to backtrack the feature and change it
-from implicit silent default to explicit conscious option. The new
-Perl command line option C<-C> and its counterpart environment
-variable PERL_UNICODE can now be used to control how Perl and Unicode
-interact at interfaces like I/O and for example the command line
-arguments. See L<perlrun/-C> and L<perlrun/PERL_UNICODE> for more
-information.
-
-=head2 Unsafe signals again available
-
-In Perl 5.8.0 the so-called "safe signals" were introduced. This
-means that Perl no longer handles signals immediately but instead
-"between opcodes", when it is safe to do so. The earlier immediate
-handling easily could corrupt the internal state of Perl, resulting
-in mysterious crashes.
-
-However, the new safer model has its problems too. Because now an
-opcode, a basic unit of Perl execution, is never interrupted but
-instead let to run to completion, certain operations that can take a
-long time now really do take a long time. For example, certain
-network operations have their own blocking and timeout mechanisms, and
-being able to interrupt them immediately would be nice.
-
-Therefore perl 5.8.1 introduced a "backdoor" to restore the pre-5.8.0
-(pre-5.7.3, really) signal behaviour. Just set the environment variable
-PERL_SIGNALS to C<unsafe>, and the old immediate (and unsafe)
-signal handling behaviour returns. See L<perlrun/PERL_SIGNALS>
-and L<perlipc/"Deferred Signals (Safe Signals)">.
-
-In completely unrelated news, you can now use safe signals with
-POSIX::SigAction. See L<POSIX/POSIX::SigAction>.
-
-=head2 Tied Arrays with Negative Array Indices
-
-Formerly, the indices passed to C<FETCH>, C<STORE>, C<EXISTS>, and
-C<DELETE> methods in tied array class were always non-negative. If
-the actual argument was negative, Perl would call FETCHSIZE implicitly
-and add the result to the index before passing the result to the tied
-array method. This behaviour is now optional. If the tied array class
-contains a package variable named C<$NEGATIVE_INDICES> which is set to
-a true value, negative values will be passed to C<FETCH>, C<STORE>,
-C<EXISTS>, and C<DELETE> unchanged.
-
-=head2 local ${$x}
-
-The syntaxes
-
- local ${$x}
- local @{$x}
- local %{$x}
-
-now do localise variables, given that the $x is a valid variable name.
-
-=head2 Unicode Character Database 4.0.0
-
-The copy of the Unicode Character Database included in Perl 5.8 has
-been updated to 4.0.0 from 3.2.0. This means for example that the
-Unicode character properties are as in Unicode 4.0.0.
-
-=head2 Miscellaneous Enhancements
-
-C<unpack()> now defaults to unpacking the C<$_>.
-
-C<map> in void context is no longer expensive. C<map> is now context
-aware, and will not construct a list if called in void context.
-
-If a socket gets closed by the server while printing to it, the client
-now gets a SIGPIPE. While this new feature was not planned, it fell
-naturally out of PerlIO changes, and is to be considered an accidental
-feature.
-
-PerlIO::get_layers(FH) returns the names of the PerlIO layers
-active on a filehandle.
-
-PerlIO::via layers can now have an optional UTF8 method to
-indicate whether the layer wants to "auto-:utf8" the stream.
-
-utf8::is_utf8() has been added as a quick way to test whether
-a scalar is encoded internally in UTF-8 (Unicode).
-
-=head1 Modules and Pragmata
-
-=head2 Updated Modules And Pragmata
-
-The following modules and pragmata have been updated since Perl 5.8.0:
-
-=over 4
-
-=item base
-
-=item B::Bytecode
-
-In much better shape than it used to be. Still far from perfect, but
-maybe worth a try.
-
-=item B::Concise
-
-=item B::Deparse
-
-=item Benchmark
-
-An optional feature, C<:hireswallclock>, now allows for high
-resolution wall clock times (uses Time::HiRes).
-
-=item ByteLoader
-
-See B::Bytecode.
-
-=item bytes
-
-Now has bytes::substr.
-
-=item CGI
-
-=item charnames
-
-One can now have custom character name aliases.
-
-=item CPAN
-
-There is now a simple command line frontend to the CPAN.pm
-module called F<cpan>.
-
-=item Data::Dumper
-
-A new option, Pair, allows choosing the separator between hash keys
-and values.
-
-=item DB_File
-
-=item Devel::PPPort
-
-=item Digest::MD5
-
-=item Encode
-
-Significant updates on the encoding pragma functionality
-(tr/// and the DATA filehandle, formats).
-
-If a filehandle has been marked as to have an encoding, unmappable
-characters are detected already during input, not later (when the
-corrupted data is being used).
-
-The ISO 8859-6 conversion table has been corrected (the 0x30..0x39
-erroneously mapped to U+0660..U+0669, instead of U+0030..U+0039). The
-GSM 03.38 conversion did not handle escape sequences correctly. The
-UTF-7 encoding has been added (making Encode feature-complete with
-Unicode::String).
-
-=item fields
-
-=item libnet
-
-=item Math::BigInt
-
-A lot of bugs have been fixed since v1.60, the version included in Perl
-v5.8.0. Especially noteworthy are the bug in Calc that caused div and mod to
-fail for some large values, and the fixes to the handling of bad inputs.
-
-Some new features were added, e.g. the broot() method, you can now pass
-parameters to config() to change some settings at runtime, and it is now
-possible to trap the creation of NaN and infinity.
-
-As usual, some optimizations took place and made the math overall a tad
-faster. In some cases, quite a lot faster, actually. Especially alternative
-libraries like Math::BigInt::GMP benefit from this. In addition, a lot of the
-quite clunky routines like fsqrt() and flog() are now much much faster.
-
-=item MIME::Base64
-
-=item NEXT
-
-Diamond inheritance now works.
-
-=item Net::Ping
-
-=item PerlIO::scalar
-
-Reading from non-string scalars (like the special variables, see
-L<perlvar>) now works.
-
-=item podlators
-
-=item Pod::LaTeX
-
-=item PodParsers
-
-=item Pod::Perldoc
-
-Complete rewrite. As a side-effect, no longer refuses to startup when
-run by root.
-
-=item Scalar::Util
-
-New utilities: refaddr, isvstring, looks_like_number, set_prototype.
-
-=item Storable
-
-Can now store code references (via B::Deparse, so not foolproof).
-
-=item strict
-
-Earlier versions of the strict pragma did not check the parameters
-implicitly passed to its "import" (use) and "unimport" (no) routine.
-This caused the false idiom such as:
-
- use strict qw(@ISA);
- @ISA = qw(Foo);
-
-This however (probably) raised the false expectation that the strict
-refs, vars and subs were being enforced (and that @ISA was somehow
-"declared"). But the strict refs, vars, and subs are B<not> enforced
-when using this false idiom.
-
-Starting from Perl 5.8.1, the above B<will> cause an error to be
-raised. This may cause programs which used to execute seemingly
-correctly without warnings and errors to fail when run under 5.8.1.
-This happens because
-
- use strict qw(@ISA);
-
-will now fail with the error:
-
- Unknown 'strict' tag(s) '@ISA'
-
-The remedy to this problem is to replace this code with the correct idiom:
-
- use strict;
- use vars qw(@ISA);
- @ISA = qw(Foo);
-
-=item Term::ANSIcolor
-
-=item Test::Harness
-
-Now much more picky about extra or missing output from test scripts.
-
-=item Test::More
-
-=item Test::Simple
-
-=item Text::Balanced
-
-=item Time::HiRes
-
-Use of nanosleep(), if available, allows mixing subsecond sleeps with
-alarms.
-
-=item threads
-
-Several fixes, for example for join() problems and memory
-leaks. In some platforms (like Linux) that use glibc the minimum memory
-footprint of one ithread has been reduced by several hundred kilobytes.
-
-=item threads::shared
-
-Many memory leaks have been fixed.
-
-=item Unicode::Collate
-
-=item Unicode::Normalize
-
-=item Win32::GetFolderPath
-
-=item Win32::GetOSVersion
-
-Now returns extra information.
-
-=back
-
-=head1 Utility Changes
-
-The C<h2xs> utility now produces a more modern layout:
-F<Foo-Bar/lib/Foo/Bar.pm> instead of F<Foo/Bar/Bar.pm>.
-Also, the boilerplate test is now called F<t/Foo-Bar.t>
-instead of F<t/1.t>.
-
-The Perl debugger (F<lib/perl5db.pl>) has now been extensively
-documented and bugs found while documenting have been fixed.
-
-C<perldoc> has been rewritten from scratch to be more robust and
-feature rich.
-
-C<perlcc -B> works now at least somewhat better, while C<perlcc -c>
-is rather more broken. (The Perl compiler suite as a whole continues
-to be experimental.)
-
-=head1 New Documentation
-
-perl573delta has been added to list the differences between the
-(now quite obsolete) development releases 5.7.2 and 5.7.3.
-
-perl58delta and perl581delta have been added: these are the perldeltas
-of 5.8.0 and 5.8.1, detailing the differences respectively between
-5.6.0 and 5.8.0, and between 5.8.0 and 5.8.1.
-
-perlartistic has been added: it is the Artistic License in pod format,
-making it easier for modules to refer to it.
-
-perlcheat has been added: it is a Perl cheat sheet.
-
-perlgpl has been added: it is the GNU General Public License in pod
-format, making it easier for modules to refer to it.
-
-perlmacosx has been added to tell about the installation and use
-of Perl in Mac OS X.
-
-perlos400 has been added to tell about the installation and use
-of Perl in OS/400 PASE.
-
-perlreref has been added: it is a regular expressions quick reference.
-
-=head1 Installation and Configuration Improvements
-
-The Unix standard Perl location, F</usr/bin/perl>, is no longer
-overwritten by default if it exists. This change was very prudent
-because so many Unix vendors already provide a F</usr/bin/perl>,
-but simultaneously many system utilities may depend on that
-exact version of Perl, so better not to overwrite it.
-
-One can now specify installation directories for site and vendor man
-and HTML pages, and site and vendor scripts. See F<INSTALL>.
-
-One can now specify a destination directory for Perl installation
-by specifying the DESTDIR variable for C<make install>. (This feature
-is slightly different from the previous C<Configure -Dinstallprefix=...>.)
-See F<INSTALL>.
-
-gcc versions 3.x introduced a new warning that caused a lot of noise
-during Perl compilation: C<gcc -Ialreadyknowndirectory (warning:
-changing search order)>. This warning has now been avoided by
-Configure weeding out such directories before the compilation.
-
-One can now build subsets of Perl core modules by using the
-Configure flags C<-Dnoextensions=...> and C<-Donlyextensions=...>,
-see F<INSTALL>.
-
-=head2 Platform-specific enhancements
-
-In Cygwin Perl can now be built with threads (C<Configure -Duseithreads>).
-This works with both Cygwin 1.3.22 and Cygwin 1.5.3.
-
-In newer FreeBSD releases Perl 5.8.0 compilation failed because of
-trying to use F<malloc.h>, which in FreeBSD is just a dummy file, and
-a fatal error to even try to use. Now F<malloc.h> is not used.
-
-Perl is now known to build also in Hitachi HI-UXMPP.
-
-Perl is now known to build again in LynxOS.
-
-Mac OS X now installs with Perl version number embedded in
-installation directory names for easier upgrading of user-compiled
-Perl, and the installation directories in general are more standard.
-In other words, the default installation no longer breaks the
-Apple-provided Perl. On the other hand, with C<Configure -Dprefix=/usr>
-you can now really replace the Apple-supplied Perl (B<please be careful>).
-
-Mac OS X now builds Perl statically by default. This change was done
-mainly for faster startup times. The Apple-provided Perl is still
-dynamically linked and shared, and you can enable the sharedness for
-your own Perl builds by C<Configure -Duseshrplib>.
-
-Perl has been ported to IBM's OS/400 PASE environment. The best way
-to build a Perl for PASE is to use an AIX host as a cross-compilation
-environment. See README.os400.
-
-Yet another cross-compilation option has been added: now Perl builds
-on OpenZaurus, an Linux distribution based on Mandrake + Embedix for
-the Sharp Zaurus PDA. See the Cross/README file.
-
-Tru64 when using gcc 3 drops the optimisation for F<toke.c> to C<-O2>
-because of gigantic memory use with the default C<-O3>.
-
-Tru64 can now build Perl with the newer Berkeley DBs.
-
-Building Perl on WinCE has been much enhanced, see F<README.ce>
-and F<README.perlce>.
-
-=head1 Selected Bug Fixes
-
-=head2 Closures, eval and lexicals
-
-There have been many fixes in the area of anonymous subs, lexicals and
-closures. Although this means that Perl is now more "correct", it is
-possible that some existing code will break that happens to rely on
-the faulty behaviour. In practice this is unlikely unless your code
-contains a very complex nesting of anonymous subs, evals and lexicals.
-
-=head2 Generic fixes
-
-If an input filehandle is marked C<:utf8> and Perl sees illegal UTF-8
-coming in when doing C<< <FH> >>, if warnings are enabled a warning is
-immediately given - instead of being silent about it and Perl being
-unhappy about the broken data later. (The C<:encoding(utf8)> layer
-also works the same way.)
-
-binmode(SOCKET, ":utf8") only worked on the input side, not on the
-output side of the socket. Now it works both ways.
-
-For threaded Perls certain system database functions like getpwent()
-and getgrent() now grow their result buffer dynamically, instead of
-failing. This means that at sites with lots of users and groups the
-functions no longer fail by returning only partial results.
-
-Perl 5.8.0 had accidentally broken the capability for users
-to define their own uppercase<->lowercase Unicode mappings
-(as advertised by the Camel). This feature has been fixed and
-is also documented better.
-
-In 5.8.0 this
-
- $some_unicode .= <FH>;
-
-didn't work correctly but instead corrupted the data. This has now
-been fixed.
-
-Tied methods like FETCH etc. may now safely access tied values, i.e.
-resulting in a recursive call to FETCH etc. Remember to break the
-recursion, though.
-
-At startup Perl blocks the SIGFPE signal away since there isn't much
-Perl can do about it. Previously this blocking was in effect also for
-programs executed from within Perl. Now Perl restores the original
-SIGFPE handling routine, whatever it was, before running external
-programs.
-
-Linenumbers in Perl scripts may now be greater than 65536, or 2**16.
-(Perl scripts have always been able to be larger than that, it's just
-that the linenumber for reported errors and warnings have "wrapped
-around".) While scripts that large usually indicate a need to rethink
-your code a bit, such Perl scripts do exist, for example as results
-from generated code. Now linenumbers can go all the way to
-4294967296, or 2**32.
-
-=head2 Platform-specific fixes
-
-Linux
-
-=over 4
-
-=item *
-
-Setting $0 works again (with certain limitations that
-Perl cannot do much about: see L<perlvar/$0>)
-
-=back
-
-HP-UX
-
-=over 4
-
-=item *
-
-Setting $0 now works.
-
-=back
-
-VMS
-
-=over 4
-
-=item *
-
-Configuration now tests for the presence of C<poll()>, and IO::Poll
-now uses the vendor-supplied function if detected.
-
-=item *
-
-A rare access violation at Perl start-up could occur if the Perl image was
-installed with privileges or if there was an identifier with the
-subsystem attribute set in the process's rightslist. Either of these
-circumstances triggered tainting code that contained a pointer bug.
-The faulty pointer arithmetic has been fixed.
-
-=item *
-
-The length limit on values (not keys) in the %ENV hash has been raised
-from 255 bytes to 32640 bytes (except when the PERL_ENV_TABLES setting
-overrides the default use of logical names for %ENV). If it is
-necessary to access these long values from outside Perl, be aware that
-they are implemented using search list logical names that store the
-value in pieces, each 255-byte piece (up to 128 of them) being an
-element in the search list. When doing a lookup in %ENV from within
-Perl, the elements are combined into a single value. The existing
-VMS-specific ability to access individual elements of a search list
-logical name via the $ENV{'foo;N'} syntax (where N is the search list
-index) is unimpaired.
-
-=item *
-
-The piping implementation now uses local rather than global DCL
-symbols for inter-process communication.
-
-=item *
-
-File::Find could become confused when navigating to a relative
-directory whose name collided with a logical name. This problem has
-been corrected by adding directory syntax to relative path names, thus
-preventing logical name translation.
-
-=back
-
-Win32
-
-=over 4
-
-=item *
-
-A memory leak in the fork() emulation has been fixed.
-
-=item *
-
-The return value of the ioctl() built-in function was accidentally
-broken in 5.8.0. This has been corrected.
-
-=item *
-
-The internal message loop executed by perl during blocking operations
-sometimes interfered with messages that were external to Perl.
-This often resulted in blocking operations terminating prematurely or
-returning incorrect results, when Perl was executing under environments
-that could generate Windows messages. This has been corrected.
-
-=item *
-
-Pipes and sockets are now automatically in binary mode.
-
-=item *
-
-The four-argument form of select() did not preserve $! (errno) properly
-when there were errors in the underlying call. This is now fixed.
-
-=item *
-
-The "CR CR LF" problem of has been fixed, binmode(FH, ":crlf")
-is now effectively a no-op.
-
-=back
-
-=head1 New or Changed Diagnostics
-
-All the warnings related to pack() and unpack() were made more
-informative and consistent.
-
-=head2 Changed "A thread exited while %d threads were running"
-
-The old version
-
- A thread exited while %d other threads were still running
-
-was misleading because the "other" included also the thread giving
-the warning.
-
-=head2 Removed "Attempt to clear a restricted hash"
-
-It is not illegal to clear a restricted hash, so the warning
-was removed.
-
-=head2 New "Illegal declaration of anonymous subroutine"
-
-You must specify the block of code for C<sub>.
-
-=head2 Changed "Invalid range "%s" in transliteration operator"
-
-The old version
-
- Invalid [] range "%s" in transliteration operator
-
-was simply wrong because there are no "[] ranges" in tr///.
-
-=head2 New "Missing control char name in \c"
-
-Self-explanatory.
-
-=head2 New "Newline in left-justified string for %s"
-
-The padding spaces would appear after the newline, which is
-probably not what you had in mind.
-
-=head2 New "Possible precedence problem on bitwise %c operator"
-
-If you think this
-
- $x & $y == 0
-
-tests whether the bitwise AND of $x and $y is zero,
-you will like this warning.
-
-=head2 New "read() on %s filehandle %s"
-
-You cannot read() (or sysread()) from a closed or unopened filehandle.
-
-=head2 New "Tied variable freed while still in use"
-
-Something pulled the plug on a live tied variable, Perl plays
-safe by bailing out.
-
-=head2 New "To%s: illegal mapping '%s'"
-
-An illegal user-defined Unicode casemapping was specified.
-
-=head2 New "Use of freed value in iteration"
-
-Something modified the values being iterated over. This is not good.
-
-=head1 Changed Internals
-
-These news matter to you only if you either write XS code or like to
-know about or hack Perl internals (using Devel::Peek or any of the
-C<B::> modules counts), or like to run Perl with the C<-D> option.
-
-The embedding examples of L<perlembed> have been reviewed to be
-up to date and consistent: for example, the correct use of
-PERL_SYS_INIT3() and PERL_SYS_TERM().
-
-Extensive reworking of the pad code (the code responsible
-for lexical variables) has been conducted by Dave Mitchell.
-
-Extensive work on the v-strings by John Peacock.
-
-UTF-8 length and position cache: to speed up the handling of Unicode
-(UTF-8) scalars, a cache was introduced. Potential problems exist if
-an extension bypasses the official APIs and directly modifies the PV
-of an SV: the UTF-8 cache does not get cleared as it should.
-
-APIs obsoleted in Perl 5.8.0, like sv_2pv, sv_catpvn, sv_catsv,
-sv_setsv, are again available.
-
-Certain Perl core C APIs like cxinc and regatom are no longer
-available at all to code outside the Perl core of the Perl core
-extensions. This is intentional. They never should have been
-available with the shorter names, and if you application depends on
-them, you should (be ashamed and) contact perl5-porters to discuss
-what are the proper APIs.
-
-Certain Perl core C APIs like C<Perl_list> are no longer available
-without their C<Perl_> prefix. If your XS module stops working
-because some functions cannot be found, in many cases a simple fix is
-to add the C<Perl_> prefix to the function and the thread context
-C<aTHX_> as the first argument of the function call. This is also how
-it should always have been done: letting the Perl_-less forms to leak
-from the core was an accident. For cleaner embedding you can also
-force this for all APIs by defining at compile time the cpp define
-PERL_NO_SHORT_NAMES.
-
-Perl_save_bool() has been added.
-
-Regexp objects (those created with C<qr>) now have S-magic rather than
-R-magic. This fixed regexps of the form /...(??{...;$x})/ to no
-longer ignore changes made to $x. The S-magic avoids dropping
-the caching optimization and making (??{...}) constructs obscenely
-slow (and consequently useless). See also L<perlguts/"Magic Variables">.
-Regexp::Copy was affected by this change.
-
-The Perl internal debugging macros DEBUG() and DEB() have been renamed
-to PERL_DEBUG() and PERL_DEB() to avoid namespace conflicts.
-
-C<-DL> removed (the leaktest had been broken and unsupported for years,
-use alternative debugging mallocs or tools like valgrind and Purify).
-
-Verbose modifier C<v> added for C<-DXv> and C<-Dsv>, see L<perlrun>.
-
-=head1 New Tests
-
-In Perl 5.8.0 there were about 69000 separate tests in about 700 test files,
-in Perl 5.9.0 there are about 77000 separate tests in about 780 test files.
-The exact numbers depend on the Perl configuration and on the operating
-system platform.
-
-=head1 Known Problems
-
-The hash randomisation mentioned in L</Incompatible Changes> is definitely
-problematic: it will wake dormant bugs and shake out bad assumptions.
-
-Many of the rarer platforms that worked 100% or pretty close to it
-with perl 5.8.0 have been left a little bit untended since their
-maintainers have been otherwise busy lately, and therefore there will
-be more failures on those platforms. Such platforms include Mac OS
-Classic, IBM z/OS (and other EBCDIC platforms), and NetWare. The most
-common Perl platforms (Unix and Unix-like, Microsoft platforms, and
-VMS) have large enough testing and expert population that they are
-doing well.
-
-=head2 Tied hashes in scalar context
-
-Tied hashes do not currently return anything useful in scalar context,
-for example when used as boolean tests:
-
- if (%tied_hash) { ... }
-
-The current nonsensical behaviour is always to return false,
-regardless of whether the hash is empty or has elements.
-
-The root cause is that there is no interface for the implementors of
-tied hashes to implement the behaviour of a hash in scalar context.
-
-=head2 Net::Ping 450_service and 510_ping_udp failures
-
-The subtests 9 and 18 of lib/Net/Ping/t/450_service.t, and the
-subtest 2 of lib/Net/Ping/t/510_ping_udp.t might fail if you have
-an unusual networking setup. For example in the latter case the
-test is trying to send a UDP ping to the IP address 127.0.0.1.
-
-=head2 B::C
-
-The C-generating compiler backend B::C (the frontend being
-C<perlcc -c>) is even more broken than it used to be because of
-the extensive lexical variable changes. (The good news is that
-B::Bytecode and ByteLoader are better than they used to be.)
-
-=head1 Platform Specific Problems
-
-=head2 EBCDIC Platforms
-
-IBM z/OS and other EBCDIC platforms continue to be problematic
-regarding Unicode support. Many Unicode tests are skipped when
-they really should be fixed.
-
-=head2 Cygwin 1.5 problems
-
-In Cygwin 1.5 the F<io/tell> and F<op/sysio> tests have failures for
-some yet unknown reason. In 1.5.5 the threads tests stress_cv,
-stress_re, and stress_string are failing unless the environment
-variable PERLIO is set to "perlio" (which makes also the io/tell
-failure go away).
-
-Perl 5.8.1 does build and work well with Cygwin 1.3: with (uname -a)
-C<CYGWIN_NT-5.0 ... 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 ...>
-a 100% "make test" was achieved with C<Configure -des -Duseithreads>.
-
-=head2 HP-UX: HP cc warnings about sendfile and sendpath
-
-With certain HP C compiler releases (e.g. B.11.11.02) you will
-get many warnings like this (lines wrapped for easier reading):
-
- cc: "/usr/include/sys/socket.h", line 504: warning 562:
- Redeclaration of "sendfile" with a different storage class specifier:
- "sendfile" will have internal linkage.
- cc: "/usr/include/sys/socket.h", line 505: warning 562:
- Redeclaration of "sendpath" with a different storage class specifier:
- "sendpath" will have internal linkage.
-
-The warnings show up both during the build of Perl and during certain
-lib/ExtUtils tests that invoke the C compiler. The warning, however,
-is not serious and can be ignored.
-
-=head2 IRIX: t/uni/tr_7jis.t falsely failing
-
-The test t/uni/tr_7jis.t is known to report failure under 'make test'
-or the test harness with certain releases of IRIX (at least IRIX 6.5
-and MIPSpro Compilers Version 7.3.1.1m), but if run manually the test
-fully passes.
-
-=head2 Mac OS X: no usemymalloc
-
-The Perl malloc (C<-Dusemymalloc>) does not work at all in Mac OS X.
-This is not that serious, though, since the native malloc works just
-fine.
-
-=head2 Tru64: No threaded builds with GNU cc (gcc)
-
-In the latest Tru64 releases (e.g. v5.1B or later) gcc cannot be used
-to compile a threaded Perl (-Duseithreads) because the system
-C<< <pthread.h> >> file doesn't know about gcc.
-
-=head2 Win32: sysopen, sysread, syswrite
-
-As of the 5.8.0 release, sysopen()/sysread()/syswrite() do not behave
-like they used to in 5.6.1 and earlier with respect to "text" mode.
-These built-ins now always operate in "binary" mode (even if sysopen()
-was passed the O_TEXT flag, or if binmode() was used on the file
-handle). Note that this issue should only make a difference for disk
-files, as sockets and pipes have always been in "binary" mode in the
-Windows port. As this behavior is currently considered a bug,
-compatible behavior may be re-introduced in a future release. Until
-then, the use of sysopen(), sysread() and syswrite() is not supported
-for "text" mode operations.
-
-=head1 TODO
-
-Here are some things that are planned for perl 5.10.0 :
-
-=over 4
-
-=item *
-
-Various Copy-On-Write techniques will be investigated in hopes
-of speeding up Perl.
-
-=item *
-
-CPANPLUS, Inline, and Module::Build will become core modules.
-
-=item *
-
-The ability to write true lexically scoped pragmas will be introduced,
-perhaps via a C<pragma> pragma.
-
-=item *
-
-Work will continue on the bytecompiler and byteloader.
-
-=item *
-
-v-strings as they currently exist are scheduled to be deprecated. The
-v-less form (1.2.3) will become a "version object" when used with C<use>,
-C<require>, and C<$VERSION>. $^V will also be a "version object" so the
-printf("%vd",...) construct will no longer be needed. The v-ful version
-(v1.2.3) will become obsolete. The equivalence of strings and v-strings (e.g.
-that currently 5.8.0 is equal to "\5\8\0") will go away. B<There may be no
-deprecation warning for v-strings>, though: it is quite hard to detect when
-v-strings are being used safely, and when they are not.
-
-=back
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at F<http://bugs.perl.org/>. There may also be
-information at F<http://www.perl.com/>, the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team. You can browse and search
-the Perl 5 bugs at F<http://bugs.perl.org/>.
-
-=head1 SEE ALSO
-
-The F<Changes> file for exhaustive details on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl591delta.pod
===================================================================
--- vendor/perl/dist/pod/perl591delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl591delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,323 +0,0 @@
-=head1 NAME
-
-perl591delta - what is new for perl v5.9.1
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.9.0 and the 5.9.1
-development releases. See L<perl590delta> for the differences between
-5.8.0 and 5.9.0.
-
-=head1 Incompatible Changes
-
-=head2 substr() lvalues are no longer fixed-length
-
-The lvalues returned by the three argument form of substr() used to be a
-"fixed length window" on the original string. In some cases this could
-cause surprising action at distance or other undefined behaviour. Now the
-length of the window adjusts itself to the length of the string assigned to
-it.
-
-=head2 The C<:unique> attribute is only meaningful for globals
-
-Now applying C<:unique> to lexical variables and to subroutines will
-result in a compilation error.
-
-=head1 Core Enhancements
-
-=head2 Lexical C<$_>
-
-The default variable C<$_> can now be lexicalized, by declaring it like
-any other lexical variable, with a simple
-
- my $_;
-
-The operations that default on C<$_> will use the lexically-scoped
-version of C<$_> when it exists, instead of the global C<$_>.
-
-In a C<map> or a C<grep> block, if C<$_> was previously my'ed, then the
-C<$_> inside the block is lexical as well (and scoped to the block).
-
-In a scope where C<$_> has been lexicalized, you can still have access to
-the global version of C<$_> by using C<$::_>, or, more simply, by
-overriding the lexical declaration with C<our $_>.
-
-=head2 Tied hashes in scalar context
-
-As of perl 5.8.2/5.9.0, tied hashes did not return anything useful in
-scalar context, for example when used as boolean tests:
-
- if (%tied_hash) { ... }
-
-The old nonsensical behaviour was always to return false,
-regardless of whether the hash is empty or has elements.
-
-There is now an interface for the implementors of tied hashes to implement
-the behaviour of a hash in scalar context, via the SCALAR method (see
-L<perltie>). Without a SCALAR method, perl will try to guess whether
-the hash is empty, by testing if it's inside an iteration (in this case
-it can't be empty) or by calling FIRSTKEY.
-
-=head2 Formats
-
-Formats were improved in several ways. A new field, C<^*>, can be used for
-variable-width, one-line-at-a-time text. Null characters are now handled
-correctly in picture lines. Using C<@#> and C<~~> together will now
-produce a compile-time error, as those format fields are incompatible.
-L<perlform> has been improved, and miscellaneous bugs fixed.
-
-=head2 Stacked filetest operators
-
-As a new form of syntactic sugar, it's now possible to stack up filetest
-operators. You can now write C<-f -w -x $file> in a row to mean
-C<-x $file && -w _ && -f _>. See L<perlfunc/-X>.
-
-=head1 Modules and Pragmata
-
-=over 4
-
-=item Benchmark
-
-In C<Benchmark>, cmpthese() and timestr() now use the time statistics of
-children instead of parent when the selected style is 'nop'.
-
-=item Carp
-
-The error messages produced by C<Carp> now include spaces between the
-arguments in function argument lists: this makes long error messages
-appear more nicely in browsers and other tools.
-
-=item Exporter
-
-C<Exporter> will now recognize grouping tags (such as C<:name>) anywhere
-in the import list, not only at the beginning.
-
-=item FindBin
-
-A function C<again> is provided to resolve problems where modules in different
-directories wish to use FindBin.
-
-=item List::Util
-
-You can now weaken references to read only values.
-
-=item threads::shared
-
-C<cond_wait> has a new two argument form. C<cond_timedwait> has been added.
-
-=back
-
-=head1 Utility Changes
-
-C<find2perl> now assumes C<-print> as a default action. Previously, it
-needed to be specified explicitly.
-
-A new utility, C<prove>, makes it easy to run an individual regression test
-at the command line. C<prove> is part of Test::Harness, which users of earlier
-Perl versions can install from CPAN.
-
-The perl debugger now supports a C<save> command, to save the current
-history to a file, and an C<i> command, which prints the inheritance tree
-of its argument (if the C<Class::ISA> module is installed.)
-
-=head1 Documentation
-
-The documentation has been revised in places to produce more standard manpages.
-
-The long-existing feature of C</(?{...})/> regexps setting C<$_> and pos()
-is now documented.
-
-=head1 Performance Enhancements
-
-Sorting arrays in place (C<@a = sort @a>) is now optimized to avoid
-making a temporary copy of the array.
-
-The operations involving case mapping on UTF-8 strings (uc(), lc(),
-C<//i>, etc.) have been greatly speeded up.
-
-Access to elements of lexical arrays via a numeric constant between 0 and
-255 is now faster. (This used to be only the case for global arrays.)
-
-=head1 Selected Bug Fixes
-
-=head2 UTF-8 bugs
-
-Using substr() on a UTF-8 string could cause subsequent accesses on that
-string to return garbage. This was due to incorrect UTF-8 offsets being
-cached, and is now fixed.
-
-join() could return garbage when the same join() statement was used to
-process 8 bit data having earlier processed UTF-8 data, due to the flags
-on that statement's temporary workspace not being reset correctly. This
-is now fixed.
-
-Using Unicode keys with tied hashes should now work correctly.
-
-chop() and chomp() used to mangle UTF-8 strings. This has been fixed.
-
-sprintf() used to misbehave when the format string was in UTF-8. This is
-now fixed.
-
-=head2 Threading bugs
-
-Hashes with the C<:unique> attribute weren't made read-only in new
-threads. They are now.
-
-=head2 More bugs
-
-C<$a .. $b> will now work as expected when either $a or $b is C<undef>.
-
-Reading $^E now preserves $!. Previously, the C code implementing $^E
-did not preserve C<errno>, so reading $^E could cause C<errno> and therefore
-C<$!> to change unexpectedly.
-
-C<strict> wasn't in effect in regexp-eval blocks (C</(?{...})/>).
-
-=head1 New or Changed Diagnostics
-
-A new deprecation warning, I<Deprecated use of my() in false conditional>,
-has been added, to warn against the use of the dubious and deprecated
-construct
-
- my $x if 0;
-
-See L<perldiag>.
-
-The fatal error I<DESTROY created new reference to dead object> is now
-documented in L<perldiag>.
-
-A new error, I<%ENV is aliased to %s>, is produced when taint checks are
-enabled and when C<*ENV> has been aliased (and thus doesn't reflect the
-program's environment anymore.)
-
-=head1 Changed Internals
-
-These news matter to you only if you either write XS code or like to
-know about or hack Perl internals (using Devel::Peek or any of the
-C<B::> modules counts), or like to run Perl with the C<-D> option.
-
-=head2 Reordering of SVt_* constants
-
-The relative ordering of constants that define the various types of C<SV>
-have changed; in particular, C<SVt_PVGV> has been moved before C<SVt_PVLV>,
-C<SVt_PVAV>, C<SVt_PVHV> and C<SVt_PVCV>. This is unlikely to make any
-difference unless you have code that explicitly makes assumptions about that
-ordering. (The inheritance hierarchy of C<B::*> objects has been changed
-to reflect this.)
-
-=head2 Removal of CPP symbols
-
-The C preprocessor symbols C<PERL_PM_APIVERSION> and
-C<PERL_XS_APIVERSION>, which were supposed to give the version number of
-the oldest perl binary-compatible (resp. source-compatible) with the
-present one, were not used, and sometimes had misleading values. They have
-been removed.
-
-=head2 Less space is used by ops
-
-The C<BASEOP> structure now uses less space. The C<op_seq> field has been
-removed and replaced by two one-bit fields, C<op_opt> and C<op_static>.
-C<opt_type> is now 9 bits long. (Consequently, the C<B::OP> class doesn't
-provide an C<seq> method anymore.)
-
-=head2 New parser
-
-perl's parser is now generated by bison (it used to be generated by
-byacc.) As a result, it seems to be a bit more robust.
-
-=head1 Configuration and Building
-
-C<Configure> now invokes callbacks regardless of the value of the variable
-they are called for. Previously callbacks were only invoked in the
-C<case $variable $define)> branch. This change should only affect platform
-maintainers writing configuration hints files.
-
-The portability and cleanliness of the Win32 makefiles has been improved.
-
-=head1 Known Problems
-
-There are still a couple of problems in the implementation of the lexical
-C<$_>: it doesn't work inside C</(?{...})/> blocks and with regard to the
-reverse() built-in used without arguments. (See the TODO tests in
-F<t/op/mydef.t>.)
-
-=head2 Platform Specific Problems
-
-The test F<ext/IPC/SysV/t/ipcsysv.t> may fail on OpenBSD. This hasn't been
-diagnosed yet.
-
-On some configurations on AIX 5, one test in F<lib/Time/Local.t> fails.
-When configured with long doubles, perl may fail tests 224-236 in
-F<t/op/pow.t> on the same platform.
-
-For threaded builds, F<ext/threads/shared/t/wait.t> has been reported to
-fail some tests on HP-UX 10.20.
-
-=head1 To-do for perl 5.10.0
-
-This is a non-exhaustive, non-ordered, non-contractual and non-definitive
-list of things to do (or nice to have) for perl 5.10.0 :
-
-Clean up and finish support for assertions. See L<assertions>.
-
-Reimplement the mechanism of lexical pragmas to be more extensible. Fix
-current pragmas that don't work well (or at all) with lexical scopes or in
-run-time eval(STRING) (C<sort>, C<re>, C<encoding> for example). MJD has a
-preliminary patch that implements this.
-
-Fix (or rewrite) the implementation of the C</(?{...})/> closures.
-
-Conversions from byte strings to UTF-8 currently map high bit characters
-to Unicode without translation (or, depending on how you look at it, by
-implicitly assuming that the byte strings are in Latin-1). As perl assumes
-the C locale by default, upgrading a string to UTF-8 may change the
-meaning of its contents regarding character classes, case mapping, etc.
-This should probably emit a warning (at least).
-
-Introduce a new special block, UNITCHECK, which is run at the end of a
-compilation unit (module, file, eval(STRING) block). This will correspond to
-the Perl 6 CHECK. Perl 5's CHECK cannot be changed or removed because the
-O.pm/B.pm backend framework depends on it.
-
-Study the possibility of adding a new prototype character, C<_>, meaning
-"this argument defaults to $_".
-
-Make the peephole optimizer optional.
-
-Allow lexical aliases (maybe via the syntax C<my \$alias = \$foo>.
-
-Fix the bugs revealed by running the test suite with the C<-t> switch (via
-C<make test.taintwarn>).
-
-Make threads more robust.
-
-Make C<no 6> and C<no v6> work (opposite of C<use 5.005>, etc.).
-
-A test suite for the B module would be nice.
-
-A ponie.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://bugs.perl.org/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-=head1 SEE ALSO
-
-The F<Changes> file for exhaustive details on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl592delta.pod
===================================================================
--- vendor/perl/dist/pod/perl592delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl592delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,342 +0,0 @@
-=head1 NAME
-
-perl592delta - what is new for perl v5.9.2
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.9.1 and the 5.9.2
-development releases. See L<perl590delta> and L<perl591delta> for the
-differences between 5.8.0 and 5.9.1.
-
-=head1 Incompatible Changes
-
-=head2 Packing and UTF-8 strings
-
-The semantics of pack() and unpack() regarding UTF-8-encoded data has been
-changed. Processing is now by default character per character instead of
-byte per byte on the underlying encoding. Notably, code that used things
-like C<pack("a*", $string)> to see through the encoding of string will now
-simply get back the original $string. Packed strings can also get upgraded
-during processing when you store upgraded characters. You can get the old
-behaviour by using C<use bytes>.
-
-To be consistent with pack(), the C<C0> in unpack() templates indicates
-that the data is to be processed in character mode, i.e. character by
-character; on the contrary, C<U0> in unpack() indicates UTF-8 mode, where
-the packed string is processed in its UTF-8-encoded Unicode form on a byte
-by byte basis. This is reversed with regard to perl 5.8.X.
-
-Moreover, C<C0> and C<U0> can also be used in pack() templates to specify
-respectively character and byte modes.
-
-C<C0> and C<U0> in the middle of a pack or unpack format now switch to the
-specified encoding mode, honoring parens grouping. Previously, parens were
-ignored.
-
-Also, there is a new pack() character format, C<W>, which is intended to
-replace the old C<C>. C<C> is kept for unsigned chars coded as bytes in
-the strings internal representation. C<W> represents unsigned (logical)
-character values, which can be greater than 255. It is therefore more
-robust when dealing with potentially UTF-8-encoded data (as C<C> will wrap
-values outside the range 0..255, and not respect the string encoding).
-
-In practice, that means that pack formats are now encoding-neutral, except
-C<C>.
-
-For consistency, C<A> in unpack() format now trims all Unicode whitespace
-from the end of the string. Before perl 5.9.2, it used to strip only the
-classical ASCII space characters.
-
-=head2 Miscellaneous
-
-The internal dump output has been improved, so that non-printable characters
-such as newline and backspace are output in C<\x> notation, rather than
-octal.
-
-The B<-C> option can no longer be used on the C<#!> line. It wasn't
-working there anyway.
-
-=head1 Core Enhancements
-
-=head2 Malloc wrapping
-
-Perl can now be built to detect attempts to assign pathologically large chunks
-of memory. Previously such assignments would suffer from integer wrap-around
-during size calculations causing a misallocation, which would crash perl, and
-could theoretically be used for "stack smashing" attacks. The wrapping
-defaults to enabled on platforms where we know it works (most AIX
-configurations, BSDi, Darwin, DEC OSF/1, FreeBSD, HP-UX, GNU Linux, OpenBSD,
-Solaris, VMS and most Win32 compilers) and defaults to disabled on other
-platforms.
-
-=head2 Unicode Character Database 4.0.1
-
-The copy of the Unicode Character Database included in Perl 5.9 has
-been updated to 4.0.1 from 4.0.0.
-
-=head2 suidperl less insecure
-
-Paul Szabo has analysed and patched C<suidperl> to remove existing known
-insecurities. Currently there are no known holes in C<suidperl>, but previous
-experience shows that we cannot be confident that these were the last. You may
-no longer invoke the set uid perl directly, so to preserve backwards
-compatibility with scripts that invoke #!/usr/bin/suidperl the only set uid
-binary is now C<sperl5.9.>I<n> (C<sperl5.9.2> for this release). C<suidperl>
-is installed as a hard link to C<perl>; both C<suidperl> and C<perl> will
-invoke C<sperl5.9.2> automatically the set uid binary, so this change should
-be completely transparent.
-
-For new projects the core perl team would strongly recommend that you use
-dedicated, single purpose security tools such as C<sudo> in preference to
-C<suidperl>.
-
-=head2 PERLIO_DEBUG
-
-The C<PERLIO_DEBUG> environment variable has no longer any effect for
-setuid scripts and for scripts run with B<-T>.
-
-Moreover, with a thread-enabled perl, using C<PERLIO_DEBUG> could lead to
-an internal buffer overflow. This has been fixed.
-
-=head2 Formats
-
-In addition to bug fixes, C<format>'s features have been enhanced. See
-L<perlform>.
-
-=head2 Unicode Character Classes
-
-Perl's regular expression engine now contains support for matching on the
-intersection of two Unicode character classes. You can also now refer to
-user-defined character classes from within other user defined character
-classes.
-
-=head2 Byte-order modifiers for pack() and unpack()
-
-There are two new byte-order modifiers, C<E<gt>> (big-endian) and C<E<lt>>
-(little-endian), that can be appended to most pack() and unpack() template
-characters and groups to force a certain byte-order for that type or group.
-See L<perlfunc/pack> and L<perlpacktut> for details.
-
-=head2 Byte count feature in pack()
-
-A new pack() template character, C<".">, returns the number of characters
-read so far.
-
-=head2 New variables
-
-A new variable, ${^RE_DEBUG_FLAGS}, controls what debug flags are in
-effect for the regular expression engine when running under C<use re
-"debug">. See L<re> for details.
-
-A new variable ${^UTF8LOCALE} indicates where a UTF-8 locale was detected
-by perl at startup.
-
-=head1 Modules and Pragmata
-
-=head2 New modules
-
-=over 4
-
-=item *
-
-C<encoding::warnings>, by Audrey Tang, is a module to emit warnings
-whenever an ASCII character string containing high-bit bytes is implicitly
-converted into UTF-8.
-
-=item *
-
-C<Module::CoreList>, by Richard Clamp, is a small handy module that tells
-you what versions of core modules ship with any versions of Perl 5. It
-comes with a command-line frontend, C<corelist>.
-
-=back
-
-=head2 Updated And Improved Modules and Pragmata
-
-Dual-lived modules have been updated to be kept up-to-date with respect to
-CPAN.
-
-The dual-lived modules which contain an C<_> in their version number are
-actually I<ahead> of the corresponding CPAN release.
-
-=over 4
-
-=item B::Concise
-
-C<B::Concise> was significantly improved.
-
-=item Socket
-
-There is experimental support for Linux abstract Unix domain sockets.
-
-=item Sys::Syslog
-
-C<syslog()> can now use numeric constants for facility names and priorities,
-in addition to strings.
-
-=item threads
-
-Detached threads are now also supported on Windows.
-
-=back
-
-=head1 Utility Changes
-
-=over 4
-
-=item *
-
-The C<corelist> utility is now installed with perl (see L</"New modules">
-above).
-
-=item *
-
-C<h2ph> and C<h2xs> have been made a bit more robust with regard to
-"modern" C code.
-
-=item *
-
-Several bugs have been fixed in C<find2perl>, regarding C<-exec> and
-C<-eval>. Also the options C<-path>, C<-ipath> and C<-iname> have been
-added.
-
-=item *
-
-The Perl debugger can now save all debugger commands for sourcing later;
-notably, it can now emulate stepping backwards, by restarting and
-rerunning all bar the last command from a saved command history.
-
-It can also display the parent inheritance tree of a given class.
-
-Perl has a new -dt command-line flag, which enables threads support in the
-debugger.
-
-=back
-
-=head1 Performance Enhancements
-
-=over 4
-
-=item *
-
-Unicode case mappings (C</i>, C<lc>, C<uc>, etc) are faster.
-
-=item *
-
-C<@a = sort @a> was optimized to do in-place sort. Likewise, C<reverse
-sort ...> is now optimized to sort in reverse, avoiding the generation of
-a temporary intermediate list.
-
-=item *
-
-Unnecessary assignments are optimised away in
-
- my $s = undef;
- my @a = ();
- my %h = ();
-
-=item *
-
-C<map> in scalar context is now optimized.
-
-=item *
-
-The regexp engine now implements the trie optimization : it's able to
-factor out common prefixes and suffixes in regular expressions. A new
-special variable, ${^RE_TRIE_MAXBUF}, has been added to fine-tune this
-optimization.
-
-=back
-
-=head1 Installation and Configuration Improvements
-
-Run-time customization of @INC can be enabled by passing the
-C<-Dusesitecustomize> flag to configure. When enabled, this will make perl
-run F<$sitelibexp/sitecustomize.pl> before anything else. This script can
-then be set up to add additional entries to @INC.
-
-There is alpha support for relocatable @INC entries.
-
-Perl should build on Interix and on GNU/kFreeBSD.
-
-=head1 Selected Bug Fixes
-
-Most of those bugs were reported in the perl 5.8.x maintenance track.
-Notably, quite a few utf8 bugs were fixed, and several memory leaks were
-suppressed. The perl58Xdelta manpages have more details on them.
-
-Development-only bug fixes include :
-
-C<$Foo::_> was wrongly forced as C<$main::_>.
-
-=head1 New or Changed Diagnostics
-
-A new warning, C<!=~ should be !~>, is emitted to prevent this misspelling
-of the non-matching operator.
-
-The warning I<Newline in left-justified string> has been removed.
-
-The error I<Too late for "-T" option> has been reformulated to be more
-descriptive.
-
-There is a new compilation error, I<Illegal declaration of subroutine>,
-for an obscure case of syntax errors.
-
-The diagnostic output of Carp has been changed slightly, to add a space after
-the comma between arguments. This makes it much easier for tools such as
-web browsers to wrap it, but might confuse any automatic tools which perform
-detailed parsing of Carp output.
-
-C<perl -V> has several improvements, making it more useable from shell
-scripts to get the value of configuration variables. See L<perlrun> for
-details.
-
-=head1 Changed Internals
-
-The perl core has been refactored and reorganised in several places.
-In short, this release will not be binary compatible with any previous
-perl release.
-
-=head1 Known Problems
-
-For threaded builds, F<ext/threads/shared/t/wait.t> has been reported to
-fail some tests on HP-UX 10.20.
-
-Net::Ping might fail some tests on HP-UX 11.00 with the latest OS
-upgrades.
-
-F<t/io/dup.t>, F<t/io/open.t> and F<lib/ExtUtils/t/Constant.t> fail some
-tests on some BSD flavours.
-
-=head1 Plans for the next release
-
-The current plan for perl 5.9.3 is to add CPANPLUS as a core module.
-More regular expression optimizations are also in the works.
-
-It is planned to release a development version of perl more frequently,
-i.e. each time something major changes.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://bugs.perl.org/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-=head1 SEE ALSO
-
-The F<Changes> file for exhaustive details on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl593delta.pod
===================================================================
--- vendor/perl/dist/pod/perl593delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl593delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,551 +0,0 @@
-=encoding utf8
-
-=head1 NAME
-
-perl593delta - what is new for perl v5.9.3
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.9.2 and the 5.9.3
-development releases. See L<perl590delta>, L<perl591delta> and
-L<perl592delta> for the differences between 5.8.0 and 5.9.2.
-
-=head1 Incompatible Changes
-
-=head2 Parsing of C<-f _>
-
-The identifier C<_> is now forced to be a bareword after a filetest
-operator. This solves a number of misparsing issues when a global C<_>
-subroutine is defined.
-
-=head2 C<mkdir()>
-
-C<mkdir()> without arguments now defaults to C<$_>.
-
-=head2 Magic goto and eval
-
-The construct C<eval { goto &foo }> is now disallowed. (Note that the
-similar construct, but with C<eval("")> instead, was already forbidden.)
-
-=head2 C<$#> has been removed
-
-The deprecated C<$#> variable (output format for numbers) has been
-removed. A new warning, C<$# is no longer supported>, has been added.
-
-=head2 C<:unique>
-
-The C<:unique> attribute has been made a no-op, since its current
-implementation was fundamentally flawed and not threadsafe.
-
-=head2 Scoping of the C<sort> pragma
-
-The C<sort> pragma is now lexically scoped. Its effect used to be global.
-
-=head1 Core Enhancements
-
-=head2 The C<feature> pragma
-
-The C<feature> pragma is used to enable new syntax that would break Perl's
-backwards-compatibility with older releases of the language. It's a lexical
-pragma, like C<strict> or C<warnings>.
-
-Currently the following new features are available: C<switch> (adds a
-switch statement), C<~~> (adds a Perl 6-like smart match operator), C<say>
-(adds a C<say> built-in function), and C<err> (adds an C<err> keyword).
-Those features are described below.
-
-Note that C<err> low-precedence defined-or operator used to be enabled by
-default (although as a weak keyword, meaning that any function would
-override it). It's now only recognized when explicitly turned on (and is
-then a regular keyword).
-
-Those features, and the C<feature> pragma itself, have been contributed by
-Robin Houston.
-
-=head2 Switch and Smart Match operator
-
-Perl 5 now has a switch statement. It's available when C<use feature
-'switch'> is in effect. This feature introduces three new keywords,
-C<given>, C<when>, and C<default>:
-
- given ($foo) {
- when (/^abc/) { $abc = 1; }
- when (/^def/) { $def = 1; }
- when (/^xyz/) { $xyz = 1; }
- default { $nothing = 1; }
- }
-
-A more complete description of how Perl matches the switch variable
-against the C<when> conditions is given in L<perlsyn/"Switch statements">.
-
-This kind of match is called I<smart match>, and it's also possible to use
-it outside of switch statements, via the new C<~~> operator (enabled via
-the C<use feature '~~'> directive). See L<perlsyn/"Smart matching in
-detail">.
-
-=head2 C<say()>
-
-say() is a new built-in, only available when C<use feature 'say'> is in
-effect, that is similar to print(), but that implicitly appends a newline
-to the printed string. See L<perlfunc/say>.
-
-=head2 C<CLONE_SKIP()>
-
-Perl has now support for the C<CLONE_SKIP> special subroutine. Like
-C<CLONE>, C<CLONE_SKIP> is called once per package; however, it is called
-just before cloning starts, and in the context of the parent thread. If it
-returns a true value, then no objects of that class will be cloned. See
-L<perlmod> for details. (Contributed by Dave Mitchell.)
-
-=head2 C<${^CHILD_ERROR_NATIVE}>
-
-A new internal variable, C<${^CHILD_ERROR_NATIVE}>, gives the native
-status returned by the last pipe close, backtick command, successful call
-to wait() or waitpid(), or from the system() operator. See L<perlrun> for
-details. (Contributed by Gisle Aas.)
-
-=head2 Assertions
-
-The support for assertions, introduced in perl 5.9.0, has been improved.
-The syntax for the C<-A> command-line switch has changed; it now accepts
-an optional module name, defaulting to C<assertions::activate>. See
-L<assertions> and L<perlrun>. (Contributed by Salvador Fandiño García.)
-
-=head2 Unicode Character Database 4.1.0
-
-The copy of the Unicode Character Database included in Perl 5.9 has
-been updated to 4.1.0.
-
-=head2 C<no VERSION>
-
-You can now use C<no> followed by a version number to specify that you
-want to use a version of perl older than the specified one.
-
-=head2 Recursive sort subs
-
-You can now use recursive subroutines with sort(), thanks to Robin Houston.
-
-=head2 Effect of pragmas in eval
-
-The compile-time value of the C<%^H> hint variable can now propagate into
-eval("")uated code. This makes it more useful to implement lexical
-pragmas.
-
-As a side-effect of this, the overloaded-ness of constants now propagates
-into eval("").
-
-=head2 New B<-E> command-line switch
-
-B<-E> is equivalent to B<-e>, but it implicitly enables all
-optional features (like C<use feature ":5.10">).
-
-=head2 C<chdir>, C<chmod> and C<chown> on filehandles
-
-C<chdir>, C<chmod> and C<chown> can now work on filehandles as well as
-filenames, if the system supports respectively C<fchdir>, C<fchmod> and
-C<fchown>, thanks to a patch provided by Gisle Aas.
-
-=head2 OS groups
-
-C<$(> and C<$)> now return groups in the order where the OS returns them,
-thanks to Gisle Aas. This wasn't previously the case.
-
-=head1 Modules and Pragmata
-
-=head2 New Core Modules
-
-=over 4
-
-=item *
-
-A new pragma, C<feature>, has been added; see above in L</"Core
-Enhancements">.
-
-=item *
-
-C<assertions::compat>, also available on CPAN, allows the use of assertions on
-perl versions prior to 5.9.0 (that is the first one to natively support
-them).
-
-=item *
-
-C<Math::BigInt::FastCalc> is an XS-enabled, and thus faster, version of
-C<Math::BigInt::Calc>.
-
-=item *
-
-C<Compress::Zlib> is an interface to the zlib compression library. It
-comes with a bundled version of zlib, so having a working zlib is not a
-prerequisite to install it. It's used by C<Archive::Tar> (see below).
-
-=item *
-
-C<IO::Zlib> is an C<IO::>-style interface to C<Compress::Zlib>.
-
-=item *
-
-C<Archive::Tar> is a module to manipulate C<tar> archives.
-
-=item *
-
-C<Digest::SHA> is a module used to calculate many types of SHA digests,
-has been included for SHA support in the CPAN module.
-
-=item *
-
-C<ExtUtils::CBuilder> and C<ExtUtils::ParseXS> have been added.
-
-=back
-
-=head1 Utility Changes
-
-=head2 C<ptar>
-
-C<ptar> is a pure perl implementation of C<tar>, that comes with
-C<Archive::Tar>.
-
-=head2 C<ptardiff>
-
-C<ptardiff> is a small script used to generate a diff between the contents
-of a tar archive and a directory tree. Like C<ptar>, it comes with
-C<Archive::Tar>.
-
-=head2 C<shasum>
-
-This command-line utility, used to print or to check SHA digests, comes
-with the new C<Digest::SHA> module.
-
-=head2 C<h2xs> enhancements
-
-C<h2xs> implements a new option C<--use-xsloader> to force use of
-C<XSLoader> even in backwards compatible modules.
-
-The handling of authors' names that had apostrophes has been fixed.
-
-Any enums with negative values are now skipped.
-
-=head2 C<perlivp> enhancements
-
-C<perlivp> no longer checks for F<*.ph> files by default. Use the new C<-a>
-option to run I<all> tests.
-
-=head1 Documentation
-
-=head2 Perl Glossary
-
-The L<perlglossary> manpage is a glossary of terms used in the Perl
-documentation, technical and otherwise, kindly provided by O'Reilly Media,
-Inc.
-
-L<perltodo> now lists a rough roadmap to Perl 5.10.
-
-=head1 Performance Enhancements
-
-=head2 XS-assisted SWASHGET
-
-Some pure-perl code that perl was using to retrieve Unicode properties and
-transliteration mappings has been reimplemented in XS.
-
-=head2 Constant subroutines
-
-The interpreter internals now support a far more memory efficient form of
-inlineable constants. Storing a reference to a constant value in a symbol
-table is equivalent to a full typeglob referencing a constant subroutine,
-but using about 400 bytes less memory. This proxy constant subroutine is
-automatically upgraded to a real typeglob with subroutine if necessary.
-The approach taken is analogous to the existing space optimisation for
-subroutine stub declarations, which are stored as plain scalars in place
-of the full typeglob.
-
-Several of the core modules have been converted to use this feature for
-their system dependent constants - as a result C<use POSIX;> now takes about
-200K less memory.
-
-=head2 C<PERL_DONT_CREATE_GVSV>
-
-The new compilation flag C<PERL_DONT_CREATE_GVSV>, introduced as an option
-in perl 5.8.8, is turned on by default in perl 5.9.3. It prevents perl
-from creating an empty scalar with every new typeglob. See L<perl589delta>
-for details.
-
-=head2 Weak references are cheaper
-
-Weak reference creation is now I<O(1)> rather than I<O(n)>, courtesy of
-Nicholas Clark. Weak reference deletion remains I<O(n)>, but if deletion only
-happens at program exit, it may be skipped completely.
-
-=head2 sort() enhancements
-
-Salvador Fandiño provided improvements to reduce the memory usage of C<sort>
-and to speed up some cases.
-
-=head1 Installation and Configuration Improvements
-
-=head2 Compilation improvements
-
-Parallel makes should work properly now, although there may still be problems
-if C<make test> is instructed to run in parallel.
-
-Building with Borland's compilers on Win32 should work more smoothly. In
-particular Steve Hay has worked to side step many warnings emitted by their
-compilers and at least one C compiler internal error.
-
-Perl extensions on Windows now can be statically built into the Perl DLL,
-thanks to a work by Vadim Konovalov.
-
-=head2 New Or Improved Platforms
-
-Perl is being ported to Symbian OS. See L<perlsymbian> for more
-information.
-
-The VMS port has been improved. See L<perlvms>.
-
-DynaLoader::dl_unload_file() now works on Windows.
-
-Portability of Perl on various recent compilers on Windows has been
-improved (Borland C++, Visual C++ 7.0).
-
-=head2 New probes
-
-C<Configure> will now detect C<clearenv> and C<unsetenv>, thanks to a
-patch from Alan Burlison. It will also probe for C<futimes> (and use it
-internally if available), and whether C<sprintf> correctly returns the
-length of the formatted string.
-
-=head2 Module auxiliary files
-
-README files and changelogs for CPAN modules bundled with perl are no
-longer installed.
-
-=head1 Selected Bug Fixes
-
-=head2 C<defined $$x>
-
-C<use strict "refs"> was ignoring taking a hard reference in an argument
-to defined(), as in :
-
- use strict "refs";
- my $x = "foo";
- if (defined $$x) {...}
-
-This now correctly produces the run-time error C<Can't use string as a
-SCALAR ref while "strict refs" in use>. (However, C<defined @$foo> and
-C<defined %$foo> are still allowed. Those constructs are discouraged
-anyway.)
-
-=head2 Calling CORE::require()
-
-CORE::require() and CORE::do() were always parsed as require() and do()
-when they were overridden. This is now fixed.
-
-=head2 Subscripts of slices
-
-You can now use a non-arrowed form for chained subscripts after a list
-slice, like in:
-
- ({foo => "bar"})[0]{foo}
-
-This used to be a syntax error; a C<< -> >> was required.
-
-=head2 Remove over-optimisation
-
-Perl 5.9.2 introduced a change so that assignments of C<undef> to a
-scalar, or of an empty list to an array or a hash, were optimised out. As
-this could cause problems when C<goto> jumps were involved, this change
-was backed out.
-
-=head2 sprintf() fixes
-
-Using the sprintf() function with some formats could lead to a buffer
-overflow in some specific cases. This has been fixed, along with several
-other bugs, notably in bounds checking.
-
-In related fixes, it was possible for badly written code that did not follow
-the documentation of C<Sys::Syslog> to have formatting vulnerabilities.
-C<Sys::Syslog> has been changed to protect people from poor quality third
-party code.
-
-=head2 no warnings 'category' works correctly with -w
-
-Previously when running with warnings enabled globally via C<-w>, selective
-disabling of specific warning categories would actually turn off all warnings.
-This is now fixed; now C<no warnings 'io';> will only turn off warnings in the
-C<io> class. Previously it would erroneously turn off all warnings.
-
-=head2 Smaller fixes
-
-=over 4
-
-=item *
-
-C<FindBin> now works better with directories where access rights are more
-restrictive than usual.
-
-=item *
-
-Several memory leaks in ithreads were closed. Also, ithreads were made
-less memory-intensive.
-
-=item *
-
-Trailing spaces are now trimmed from C<$!> and C<$^E>.
-
-=item *
-
-Operations that require perl to read a process's list of groups, such as reads
-of C<$(> and C<$)>, now dynamically allocate memory rather than using a
-fixed sized array. The fixed size array could cause C stack exhaustion on
-systems configured to use large numbers of groups.
-
-=item *
-
-C<PerlIO::scalar> now works better with non-default C<$/> settings.
-
-=item *
-
-The C<x> repetition operator is now able to operate on C<qw//> lists. This
-used to raise a syntax error.
-
-=item *
-
-The debugger now traces correctly execution in eval("")uated code that
-contains #line directives.
-
-=item *
-
-The value of the C<open> pragma is no longer ignored for three-argument
-opens.
-
-=item *
-
-Perl will now use the C library calls C<unsetenv> and C<clearenv> if present
-to delete keys from C<%ENV> and delete C<%ENV> entirely, thanks to a patch
-from Alan Burlison.
-
-=back
-
-=head2 More Unicode Fixes
-
-=over 4
-
-=item *
-
-chr() on a negative value now gives C<\x{FFFD}>, the Unicode replacement
-character, unless when the C<bytes> pragma is in effect, where the low
-eight bytes of the value are used.
-
-=item *
-
-Some case insensitive matches between UTF-8 encoded data and 8 bit regexps,
-and vice versa, could give malformed character warnings. These have been
-fixed by Dave Mitchell and Yves Orton.
-
-=item *
-
-C<lcfirst> and C<ucfirst> could corrupt the string for certain cases where
-the length UTF-8 encoding of the string in lower case, upper case or title
-case differed. This was fixed by Nicholas Clark.
-
-=back
-
-=head1 New or Changed Diagnostics
-
-=head2 Attempt to set length of freed array
-
-This is a new warning, produced in situations like the following one:
-
- $r = do {my @a; \$#a};
- $$r = 503;
-
-=head2 Non-string passed as bitmask
-
-This is a new warning, produced when number has been passed as a argument to
-select(), instead of a bitmask.
-
- # Wrong, will now warn
- $rin = fileno(STDIN);
- ($nfound,$timeleft) = select($rout=$rin, undef, undef, $timeout);
-
- # Should be
- $rin = '';
- vec($rin,fileno(STDIN),1) = 1;
- ($nfound,$timeleft) = select($rout=$rin, undef, undef, $timeout);
-
-=head2 Search pattern not terminated or ternary operator parsed as search pattern
-
-This syntax error indicates that the lexer couldn't find the final
-delimiter of a C<?PATTERN?> construct. Mentioning the ternary operator in
-this error message makes syntax diagnostic easier.
-
-=head2 "%s" variable %s masks earlier declaration
-
-This warning is now emitted in more consistent cases; in short, when one
-of the declarations involved is a C<my> variable:
-
- my $x; my $x; # warns
- my $x; our $x; # warns
- our $x; my $x; # warns
-
-On the other hand, the following:
-
- our $x; our $x;
-
-now gives a C<"our" variable %s redeclared> warning.
-
-=head2 readdir()/closedir()/etc. attempted on invalid dirhandle
-
-These new warnings are now emitted when a dirhandle is used but is
-either closed or not really a dirhandle.
-
-=head1 Changed Internals
-
-In general, the source code of perl has been refactored, tied up, and
-optimized in many places. Also, memory management and allocation has been
-improved in a couple of points.
-
-Andy Lester supplied many improvements to determine which function
-parameters and local variables could actually be declared C<const> to the C
-compiler. Steve Peters provided new C<*_set> macros and reworked the core to
-use these rather than assigning to macros in LVALUE context.
-
-Dave Mitchell improved the lexer debugging output under C<-DT>.
-
-A new file, F<mathoms.c>, has been added. It contains functions that are
-no longer used in the perl core, but that remain available for binary or
-source compatibility reasons. However, those functions will not be
-compiled in if you add C<-DNO_MATHOMS> in the compiler flags.
-
-The C<AvFLAGS> macro has been removed.
-
-The C<av_*()> functions, used to manipulate arrays, no longer accept null
-C<AV*> parameters.
-
-=head2 B:: modules inheritance changed
-
-The inheritance hierarchy of C<B::> modules has changed; C<B::NV> now
-inherits from C<B::SV> (it used to inherit from C<B::IV>).
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://bugs.perl.org/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-=head1 SEE ALSO
-
-The F<Changes> file for exhaustive details on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl594delta.pod
===================================================================
--- vendor/perl/dist/pod/perl594delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl594delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,382 +0,0 @@
-=head1 NAME
-
-perl594delta - what is new for perl v5.9.4
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.9.3 and the 5.9.4
-development releases. See L<perl590delta>, L<perl591delta>, L<perl592delta>
-and L<perl593delta> for the differences between 5.8.0 and 5.9.3.
-
-=head1 Incompatible Changes
-
-=head2 chdir FOO
-
-A bareword argument to chdir() is now recognized as a file handle.
-Earlier releases interpreted the bareword as a directory name.
-(Gisle Aas)
-
-=head2 Handling of pmc files
-
-An old feature of perl was that before C<require> or C<use> look for a
-file with a F<.pm> extension, they will first look for a similar filename
-with a F<.pmc> extension. If this file is found, it will be loaded in
-place of any potentially existing file ending in a F<.pm> extension.
-
-Previously, F<.pmc> files were loaded only if more recent than the
-matching F<.pm> file. Starting with 5.9.4, they'll be always loaded if
-they exist. (This trick is used by Pugs.)
-
-=head2 @- and @+ in patterns
-
-The special arrays C<@-> and C<@+> are no longer interpolated in regular
-expressions. (Sadahiro Tomoyuki)
-
-=head2 $AUTOLOAD can now be tainted
-
-If you call a subroutine by a tainted name, and if it defers to an
-AUTOLOAD function, then $AUTOLOAD will be (correctly) tainted.
-(Rick Delaney)
-
-=head1 Core Enhancements
-
-=head2 state() variables
-
-A new class of variables has been introduced. State variables are similar
-to C<my> variables, but are declared with the C<state> keyword in place of
-C<my>. They're visible only in their lexical scope, but their value is
-persistent: unlike C<my> variables, they're not undefined at scope entry,
-but retain their previous value. (Rafael Garcia-Suarez)
-
-To use state variables, one needs to enable them by using
-
- use feature "state";
-
-or by using the C<-E> command-line switch in one-liners.
-
-See L<perlsub/"Persistent variables via state()">.
-
-=head2 UNIVERSAL::DOES()
-
-The C<UNIVERSAL> class has a new method, C<DOES()>. It has been added to
-solve semantic problems with the C<isa()> method. C<isa()> checks for
-inheritance, while C<DOES()> has been designed to be overridden when
-module authors use other types of relations between classes (in addition
-to inheritance). (chromatic)
-
-See L<< UNIVERSAL/"$obj->DOES( ROLE )" >>.
-
-=head2 Exceptions in constant folding
-
-The constant folding routine is now wrapped in an exception handler, and
-if folding throws an exception (such as attempting to evaluate 0/0), perl
-now retains the current optree, rather than aborting the whole program.
-(Nicholas Clark, Dave Mitchell)
-
-=head2 Source filters in @INC
-
-It's possible to enhance the mechanism of subroutine hooks in @INC by
-adding a source filter on top of the filehandle opened and returned by the
-hook. This feature was planned a long time ago, but wasn't quite working
-until now. See L<perlfunc/require> for details. (Nicholas Clark)
-
-=head2 MAD
-
-MAD, which stands for I<Misc Attribute Decoration>, is a
-still-in-development work leading to a Perl 5 to Perl 6 converter. To
-enable it, it's necessary to pass the argument C<-Dmad> to Configure. The
-obtained perl isn't binary compatible with a regular perl 5.9.4, and has
-space and speed penalties; moreover not all regression tests still pass
-with it. (Larry Wall, Nicholas Clark)
-
-=head1 Modules and Pragmas
-
-=over 4
-
-=item *
-
-C<encoding::warnings> is now a lexical pragma. (Although on older perls,
-which don't have support for lexical pragmas, it keeps its global
-behaviour.) (Audrey Tang)
-
-=item *
-
-C<threads> is now a dual-life module, also available on CPAN. It has been
-expanded in many ways. A kill() method is available for thread signalling.
-One can get thread status, or the list of running or joinable threads.
-
-A new C<< threads->exit() >> method is used to exit from the application
-(this is the default for the main thread) or from the current thread only
-(this is the default for all other threads). On the other hand, the exit()
-built-in now always causes the whole application to terminate. (Jerry
-D. Hedden)
-
-=back
-
-=head2 New Core Modules
-
-=over 4
-
-=item *
-
-C<Hash::Util::FieldHash>, by Anno Siegel, has been added. This module
-provides support for I<field hashes>: hashes that maintain an association
-of a reference with a value, in a thread-safe garbage-collected way.
-Such hashes are useful to implement inside-out objects.
-
-=item *
-
-C<Module::Build>, by Ken Williams, has been added. It's an alternative to
-C<ExtUtils::MakeMaker> to build and install perl modules.
-
-=item *
-
-C<Module::Load>, by Jos Boumans, has been added. It provides a single
-interface to load Perl modules and F<.pl> files.
-
-=item *
-
-C<Module::Loaded>, by Jos Boumans, has been added. It's used to mark
-modules as loaded or unloaded.
-
-=item *
-
-C<Package::Constants>, by Jos Boumans, has been added. It's a simple
-helper to list all constants declared in a given package.
-
-=item *
-
-C<Win32API::File>, by Tye McQueen, has been added (for Windows builds).
-This module provides low-level access to Win32 system API calls for
-files/dirs.
-
-=back
-
-=head1 Utility Changes
-
-=head2 config_data
-
-C<config_data> is a new utility that comes with C<Module::Build>. It
-provides a command-line interface to the configuration of Perl modules
-that use Module::Build's framework of configurability (that is,
-C<*::ConfigData> modules that contain local configuration information for
-their parent modules.)
-
-=head1 Documentation
-
-=head2 New manpage, perlpragma
-
-The L<perlpragma> manpage documents how to write one's own lexical
-pragmas in pure Perl (something that is possible starting with 5.9.4).
-
-=head2 New manpage, perlreguts
-
-The L<perlreguts> manpage, courtesy of Yves Orton, describes internals of the
-Perl regular expression engine.
-
-=head2 New manpage, perlunitut
-
-The L<perlunitut> manpage is an tutorial for programming with Unicode and
-string encodings in Perl, courtesy of Juerd Waalboer.
-
-=head1 Performance Enhancements
-
-=head2 Memory optimisations
-
-Several internal data structures (typeglobs, GVs, CVs, formats) have been
-restructured to use less memory. (Nicholas Clark)
-
-=head2 UTF-8 cache optimisation
-
-The UTF-8 caching code is now more efficient, and used more often.
-(Nicholas Clark)
-
-=head2 Regular expressions
-
-=over 4
-
-=item Engine de-recursivised
-
-The regular expression engine is no longer recursive, meaning that
-patterns that used to overflow the stack will either die with useful
-explanations, or run to completion, which, since they were able to blow
-the stack before, will likely take a very long time to happen. If you were
-experiencing the occasional stack overflow (or segfault) and upgrade to
-discover that now perl apparently hangs instead, look for a degenerate
-regex. (Dave Mitchell)
-
-=item Single char char-classes treated as literals
-
-Classes of a single character are now treated the same as if the character
-had been used as a literal, meaning that code that uses char-classes as an
-escaping mechanism will see a speedup. (Yves Orton)
-
-=item Trie optimisation of literal string alternations
-
-Alternations, where possible, are optimised into more efficient matching
-structures. String literal alternations are merged into a trie and are
-matched simultaneously. This means that instead of O(N) time for matching
-N alternations at a given point the new code performs in O(1) time. (Yves
-Orton)
-
-B<Note:> Much code exists that works around perl's historic poor
-performance on alternations. Often the tricks used to do so will disable
-the new optimisations. Hopefully the utility modules used for this purpose
-will be educated about these new optimisations by the time 5.10 is
-released.
-
-=item Aho-Corasick start-point optimisation
-
-When a pattern starts with a trie-able alternation and there aren't
-better optimisations available the regex engine will use Aho-Corasick
-matching to find the start point. (Yves Orton)
-
-=back
-
-=head2 Sloppy stat on Windows
-
-On Windows, perl's stat() function normally opens the file to determine
-the link count and update attributes that may have been changed through
-hard links. Setting ${^WIN32_SLOPPY_STAT} to a true value speeds up
-stat() by not performing this operation. (Jan Dubois)
-
-=head1 Installation and Configuration Improvements
-
-=head2 Relocatable installations
-
-There is now Configure support for creating a relocatable perl tree. If
-you Configure with C<-Duserelocatableinc>, then the paths in @INC (and
-everything else in %Config) can be optionally located via the path of the
-perl executable.
-
-That means that, if the string C<".../"> is found at the start of any
-path, it's substituted with the directory of $^X. So, the relocation can
-be configured on a per-directory basis, although the default with
-C<-Duserelocatableinc> is that everything is relocated. The initial
-install is done to the original configured prefix.
-
-=head2 Ports
-
-Many improvements have been made towards making Perl work correctly on
-z/OS.
-
-Perl has been reported to work on DragonFlyBSD.
-
-=head2 Compilation improvements
-
-All F<ppport.h> files in the XS modules bundled with perl are now
-autogenerated at build time. (Marcus Holland-Moritz)
-
-=head2 New probes
-
-The configuration process now detects whether strlcat() and strlcpy() are
-available. When they are not available, perl's own version is used (from
-Russ Allbery's public domain implementation). Various places in the perl
-interpreter now use them. (Steve Peters)
-
-=head2 Windows build improvements
-
-=over 4
-
-=item Building XS extensions
-
-Support for building XS extension modules with the free MinGW compiler has
-been improved in the case where perl itself was built with the Microsoft
-VC++ compiler. (ActiveState)
-
-=item Support for 64-bit compiler
-
-Support for building perl with Microsoft's 64-bit compiler has been
-improved. (ActiveState)
-
-=back
-
-=head1 Selected Bug Fixes
-
-=head2 PERL5SHELL and tainting
-
-On Windows, the PERL5SHELL environment variable is now checked for
-taintedness. (Rafael Garcia-Suarez)
-
-=head2 Using *FILE{IO}
-
-C<stat()> and C<-X> filetests now treat *FILE{IO} filehandles like *FILE
-filehandles. (Steve Peters)
-
-=head2 Overloading and reblessing
-
-Overloading now works when references are reblessed into another class.
-Internally, this has been implemented by moving the flag for "overloading"
-from the reference to the referent, which logically is where it should
-always have been. (Nicholas Clark)
-
-=head2 Overloading and UTF-8
-
-A few bugs related to UTF-8 handling with objects that have
-stringification overloaded have been fixed. (Nicholas Clark)
-
-=head2 eval memory leaks fixed
-
-Traditionally, C<eval 'syntax error'> has leaked badly. Many (but not all)
-of these leaks have now been eliminated or reduced. (Dave Mitchell)
-
-=head2 Random device on Windows
-
-In previous versions, perl would read the file F</dev/urandom> if it
-existed when seeding its random number generator. That file is unlikely
-to exist on Windows, and if it did would probably not contain appropriate
-data, so perl no longer tries to read it on Windows. (Alex Davies)
-
-=head1 New or Changed Diagnostics
-
-=over 4
-
-=item State variable %s will be reinitialized
-
-One can assign initial values to state variables, but not when they're
-declared as a sub-part of a list assignment. See L<perldiag>.
-
-=back
-
-=head1 Changed Internals
-
-A new file, F<mathoms.c>, contains functions that aren't used anymore in
-the perl core, but remain around because modules out there might
-still use them. They come from a factorization effort: for example, many
-PP functions are now shared for several ops.
-
-The implementation of the special variables $^H and %^H has changed, to
-allow implementing lexical pragmas in pure perl.
-
-=head1 Known Problems
-
-One warning test (number 263 in F<lib/warnings.t>) fails under UTF-8
-locales.
-
-Bytecode tests fail under several platforms. We are considering removing
-support for byteloader and compiler before the 5.10.0 release.
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/rt3/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-=head1 SEE ALSO
-
-The F<Changes> file for exhaustive details on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perl595delta.pod
===================================================================
--- vendor/perl/dist/pod/perl595delta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perl595delta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,587 +0,0 @@
-=head1 NAME
-
-perl595delta - what is new for perl v5.9.5
-
-=head1 DESCRIPTION
-
-This document describes differences between the 5.9.4 and the 5.9.5
-development releases. See L<perl590delta>, L<perl591delta>,
-L<perl592delta>, L<perl593delta> and L<perl594delta> for the differences
-between 5.8.0 and 5.9.4.
-
-=head1 Incompatible Changes
-
-=head2 Tainting and printf
-
-When perl is run under taint mode, C<printf()> and C<sprintf()> will now
-reject any tainted format argument. (Rafael Garcia-Suarez)
-
-=head2 undef and signal handlers
-
-Undefining or deleting a signal handler via C<undef $SIG{FOO}> is now
-equivalent to setting it to C<'DEFAULT'>. (Rafael)
-
-=head2 strictures and array/hash dereferencing in defined()
-
-C<defined @$foo> and C<defined %$bar> are now subject to C<strict 'refs'>
-(that is, C<$foo> and C<$bar> shall be proper references there.)
-(Nicholas Clark)
-
-(However, C<defined(@foo)> and C<defined(%bar)> are discouraged constructs
-anyway.)
-
-=head2 C<(?p{})> has been removed
-
-The regular expression construct C<(?p{})>, which was deprecated in perl
-5.8, has been removed. Use C<(??{})> instead. (Rafael)
-
-=head2 Pseudo-hashes have been removed
-
-Support for pseudo-hashes has been removed from Perl 5.9. (The C<fields>
-pragma remains here, but uses an alternate implementation.)
-
-=head2 Removal of the bytecode compiler and of perlcc
-
-C<perlcc>, the byteloader and the supporting modules (B::C, B::CC,
-B::Bytecode, etc.) are no longer distributed with the perl sources. Those
-experimental tools have never worked reliably, and, due to the lack of
-volunteers to keep them in line with the perl interpreter developments, it
-was decided to remove them instead of shipping a broken version of those.
-The last version of those modules can be found with perl 5.9.4.
-
-However the B compiler framework stays supported in the perl core, as with
-the more useful modules it has permitted (among others, B::Deparse and
-B::Concise).
-
-=head2 Removal of the JPL
-
-The JPL (Java-Perl Linguo) has been removed from the perl sources tarball.
-
-=head2 Recursive inheritance detected earlier
-
-Perl will now immediately throw an exception if you modify any package's
-C<@ISA> in such a way that it would cause recursive inheritance.
-
-Previously, the exception would not occur until Perl attempted to make
-use of the recursive inheritance while resolving a method or doing a
-C<$foo-E<gt>isa($bar)> lookup.
-
-=head1 Core Enhancements
-
-=head2 Regular expressions
-
-=over 4
-
-=item Recursive Patterns
-
-It is now possible to write recursive patterns without using the C<(??{})>
-construct. This new way is more efficient, and in many cases easier to
-read.
-
-Each capturing parenthesis can now be treated as an independent pattern
-that can be entered by using the C<(?PARNO)> syntax (C<PARNO> standing for
-"parenthesis number"). For example, the following pattern will match
-nested balanced angle brackets:
-
- /
- ^ # start of line
- ( # start capture buffer 1
- < # match an opening angle bracket
- (?: # match one of:
- (?> # don't backtrack over the inside of this group
- [^<>]+ # one or more non angle brackets
- ) # end non backtracking group
- | # ... or ...
- (?1) # recurse to bracket 1 and try it again
- )* # 0 or more times.
- > # match a closing angle bracket
- ) # end capture buffer one
- $ # end of line
- /x
-
-Note, users experienced with PCRE will find that the Perl implementation
-of this feature differs from the PCRE one in that it is possible to
-backtrack into a recursed pattern, whereas in PCRE the recursion is
-atomic or "possessive" in nature. (Yves Orton)
-
-=item Named Capture Buffers
-
-It is now possible to name capturing parenthesis in a pattern and refer to
-the captured contents by name. The naming syntax is C<< (?<NAME>....) >>.
-It's possible to backreference to a named buffer with the C<< \k<NAME> >>
-syntax. In code, the new magical hashes C<%+> and C<%-> can be used to
-access the contents of the capture buffers.
-
-Thus, to replace all doubled chars, one could write
-
- s/(?<letter>.)\k<letter>/$+{letter}/g
-
-Only buffers with defined contents will be "visible" in the C<%+> hash, so
-it's possible to do something like
-
- foreach my $name (keys %+) {
- print "content of buffer '$name' is $+{$name}\n";
- }
-
-The C<%-> hash is a bit more complete, since it will contain array refs
-holding values from all capture buffers similarly named, if there should
-be many of them.
-
-C<%+> and C<%-> are implemented as tied hashes through the new module
-C<Tie::Hash::NamedCapture>.
-
-Users exposed to the .NET regex engine will find that the perl
-implementation differs in that the numerical ordering of the buffers
-is sequential, and not "unnamed first, then named". Thus in the pattern
-
- /(A)(?<B>B)(C)(?<D>D)/
-
-$1 will be 'A', $2 will be 'B', $3 will be 'C' and $4 will be 'D' and not
-$1 is 'A', $2 is 'C' and $3 is 'B' and $4 is 'D' that a .NET programmer
-would expect. This is considered a feature. :-) (Yves Orton)
-
-=item Possessive Quantifiers
-
-Perl now supports the "possessive quantifier" syntax of the "atomic match"
-pattern. Basically a possessive quantifier matches as much as it can and never
-gives any back. Thus it can be used to control backtracking. The syntax is
-similar to non-greedy matching, except instead of using a '?' as the modifier
-the '+' is used. Thus C<?+>, C<*+>, C<++>, C<{min,max}+> are now legal
-quantifiers. (Yves Orton)
-
-=item Backtracking control verbs
-
-The regex engine now supports a number of special-purpose backtrack
-control verbs: (*THEN), (*PRUNE), (*MARK), (*SKIP), (*COMMIT), (*FAIL)
-and (*ACCEPT). See L<perlre> for their descriptions. (Yves Orton)
-
-=item Relative backreferences
-
-A new syntax C<\g{N}> or C<\gN> where "N" is a decimal integer allows a
-safer form of back-reference notation as well as allowing relative
-backreferences. This should make it easier to generate and embed patterns
-that contain backreferences. See L<perlre/"Capture buffers">. (Yves Orton)
-
-=item C<\K> escape
-
-The functionality of Jeff Pinyan's module Regexp::Keep has been added to
-the core. You can now use in regular expressions the special escape C<\K>
-as a way to do something like floating length positive lookbehind. It is
-also useful in substitutions like:
-
- s/(foo)bar/$1/g
-
-that can now be converted to
-
- s/foo\Kbar//g
-
-which is much more efficient. (Yves Orton)
-
-=item Vertical and horizontal whitespace, and linebreak
-
-Regular expressions now recognize the C<\v> and C<\h> escapes, that match
-vertical and horizontal whitespace, respectively. C<\V> and C<\H>
-logically match their complements.
-
-C<\R> matches a generic linebreak, that is, vertical whitespace, plus
-the multi-character sequence C<"\x0D\x0A">.
-
-=back
-
-=head2 The C<_> prototype
-
-A new prototype character has been added. C<_> is equivalent to C<$> (it
-denotes a scalar), but defaults to C<$_> if the corresponding argument
-isn't supplied. Due to the optional nature of the argument, you can only
-use it at the end of a prototype, or before a semicolon.
-
-This has a small incompatible consequence: the prototype() function has
-been adjusted to return C<_> for some built-ins in appropriate cases (for
-example, C<prototype('CORE::rmdir')>). (Rafael)
-
-=head2 UNITCHECK blocks
-
-C<UNITCHECK>, a new special code block has been introduced, in addition to
-C<BEGIN>, C<CHECK>, C<INIT> and C<END>.
-
-C<CHECK> and C<INIT> blocks, while useful for some specialized purposes,
-are always executed at the transition between the compilation and the
-execution of the main program, and thus are useless whenever code is
-loaded at runtime. On the other hand, C<UNITCHECK> blocks are executed
-just after the unit which defined them has been compiled. See L<perlmod>
-for more information. (Alex Gough)
-
-=head2 readpipe() is now overridable
-
-The built-in function readpipe() is now overridable. Overriding it permits
-also to override its operator counterpart, C<qx//> (a.k.a. C<``>).
-Moreover, it now defaults to C<$_> if no argument is provided. (Rafael)
-
-=head2 default argument for readline()
-
-readline() now defaults to C<*ARGV> if no argument is provided. (Rafael)
-
-=head2 UCD 5.0.0
-
-The copy of the Unicode Character Database included in Perl 5.9 has
-been updated to version 5.0.0.
-
-=head2 Smart match
-
-The smart match operator (C<~~>) is now available by default (you don't
-need to enable it with C<use feature> any longer). (Michael G Schwern)
-
-=head2 Implicit loading of C<feature>
-
-The C<feature> pragma is now implicitly loaded when you require a minimal
-perl version (with the C<use VERSION> construct) greater than, or equal
-to, 5.9.5.
-
-=head1 Modules and Pragmas
-
-=head2 New Pragma, C<mro>
-
-A new pragma, C<mro> (for Method Resolution Order) has been added. It
-permits to switch, on a per-class basis, the algorithm that perl uses to
-find inherited methods in case of a multiple inheritance hierarchy. The
-default MRO hasn't changed (DFS, for Depth First Search). Another MRO is
-available: the C3 algorithm. See L<mro> for more information.
-(Brandon Black)
-
-Note that, due to changes in the implementation of class hierarchy search,
-code that used to undef the C<*ISA> glob will most probably break. Anyway,
-undef'ing C<*ISA> had the side-effect of removing the magic on the @ISA
-array and should not have been done in the first place.
-
-=head2 bignum, bigint, bigrat
-
-The three numeric pragmas C<bignum>, C<bigint> and C<bigrat> are now
-lexically scoped. (Tels)
-
-=head2 Math::BigInt/Math::BigFloat
-
-Many bugs have been fixed; noteworthy are comparisons with NaN, which
-no longer warn about undef values.
-
-The following things are new:
-
-=over 4
-
-=item config()
-
-The config() method now also supports the calling-style
-C<< config('lib') >> in addition to C<< config()->{'lib'} >>.
-
-=item import()
-
-Upon import, using C<< lib => 'Foo' >> now warns if the low-level library
-cannot be found. To suppress the warning, you can use C<< try => 'Foo' >>
-instead. To convert the warning into a die, use C<< only => 'Foo' >>
-instead.
-
-=item roundmode common
-
-A rounding mode of C<common> is now supported.
-
-=back
-
-Also, support for the following methods has been added:
-
-=over 4
-
-=item bpi(), bcos(), bsin(), batan(), batan2()
-
-=item bmuladd()
-
-=item bexp(), bnok()
-
-=item from_hex(), from_oct(), and from_bin()
-
-=item as_oct()
-
-=back
-
-In addition, the default math-backend (Calc (Perl) and FastCalc (XS)) now
-support storing numbers in parts with 9 digits instead of 7 on Perls with
-either 64bit integer or long double support. This means math operations
-scale better and are thus faster for really big numbers.
-
-=head2 New Core Modules
-
-=over 4
-
-=item *
-
-C<Locale::Maketext::Simple>, needed by CPANPLUS, is a simple wrapper around
-C<Locale::Maketext::Lexicon>. Note that C<Locale::Maketext::Lexicon> isn't
-included in the perl core; the behaviour of C<Locale::Maketext::Simple>
-gracefully degrades when the later isn't present.
-
-=item *
-
-C<Params::Check> implements a generic input parsing/checking mechanism. It
-is used by CPANPLUS.
-
-=item *
-
-C<Term::UI> simplifies the task to ask questions at a terminal prompt.
-
-=item *
-
-C<Object::Accessor> provides an interface to create per-object accessors.
-
-=item *
-
-C<Module::Pluggable> is a simple framework to create modules that accept
-pluggable sub-modules.
-
-=item *
-
-C<Module::Load::Conditional> provides simple ways to query and possibly
-load installed modules.
-
-=item *
-
-C<Time::Piece> provides an object oriented interface to time functions,
-overriding the built-ins localtime() and gmtime().
-
-=item *
-
-C<IPC::Cmd> helps to find and run external commands, possibly
-interactively.
-
-=item *
-
-C<File::Fetch> provide a simple generic file fetching mechanism.
-
-=item *
-
-C<Log::Message> and C<Log::Message::Simple> are used by the log facility
-of C<CPANPLUS>.
-
-=item *
-
-C<Archive::Extract> is a generic archive extraction mechanism
-for F<.tar> (plain, gziped or bzipped) or F<.zip> files.
-
-=item *
-
-C<CPANPLUS> provides an API and a command-line tool to access the CPAN
-mirrors.
-
-=back
-
-=head2 Module changes
-
-=over 4
-
-=item C<assertions>
-
-The C<assertions> pragma, its submodules C<assertions::activate> and
-C<assertions::compat> and the B<-A> command-line switch have been removed.
-The interface was not judged mature enough for inclusion in a stable
-release.
-
-=item C<base>
-
-The C<base> pragma now warns if a class tries to inherit from itself.
-(Curtis "Ovid" Poe)
-
-=item C<strict> and C<warnings>
-
-C<strict> and C<warnings> will now complain loudly if they are loaded via
-incorrect casing (as in C<use Strict;>). (Johan Vromans)
-
-=item C<warnings>
-
-The C<warnings> pragma doesn't load C<Carp> anymore. That means that code
-that used C<Carp> routines without having loaded it at compile time might
-need to be adjusted; typically, the following (faulty) code won't work
-anymore, and will require parentheses to be added after the function name:
-
- use warnings;
- require Carp;
- Carp::confess "argh";
-
-=item C<less>
-
-C<less> now does something useful (or at least it tries to). In fact, it
-has been turned into a lexical pragma. So, in your modules, you can now
-test whether your users have requested to use less CPU, or less memory,
-less magic, or maybe even less fat. See L<less> for more. (Joshua ben
-Jore)
-
-=item C<Attribute::Handlers>
-
-C<Attribute::Handlers> can now report the caller's file and line number.
-(David Feldman)
-
-=item C<B::Lint>
-
-C<B::Lint> is now based on C<Module::Pluggable>, and so can be extended
-with plugins. (Joshua ben Jore)
-
-=item C<B>
-
-It's now possible to access the lexical pragma hints (C<%^H>) by using the
-method B::COP::hints_hash(). It returns a C<B::RHE> object, which in turn
-can be used to get a hash reference via the method B::RHE::HASH(). (Joshua
-ben Jore)
-
-=for p5p XXX document this in B.pm too
-
-=item C<Thread>
-
-As the old 5005thread threading model has been removed, in favor of the
-ithreads scheme, the C<Thread> module is now a compatibility wrapper, to
-be used in old code only. It has been removed from the default list of
-dynamic extensions.
-
-=back
-
-=head1 Utility Changes
-
-=head2 C<cpanp>
-
-C<cpanp>, the CPANPLUS shell, has been added. (C<cpanp-run-perl>, an
-helper for CPANPLUS operation, has been added too, but isn't intended for
-direct use).
-
-=head2 C<cpan2dist>
-
-C<cpan2dist> is a new utility, that comes with CPANPLUS. It's a tool to
-create distributions (or packages) from CPAN modules.
-
-=head2 C<pod2html>
-
-The output of C<pod2html> has been enhanced to be more customizable via
-CSS. Some formatting problems were also corrected. (Jari Aalto)
-
-=head1 Documentation
-
-=head2 New manpage, perlunifaq
-
-A new manual page, L<perlunifaq> (the Perl Unicode FAQ), has been added
-(Juerd Waalboer).
-
-=head1 Installation and Configuration Improvements
-
-=head2 C++ compatibility
-
-Efforts have been made to make perl and the core XS modules compilable
-with various C++ compilers (although the situation is not perfect with
-some of the compilers on some of the platforms tested.)
-
-=head2 Visual C++
-
-Perl now can be compiled with Microsoft Visual C++ 2005.
-
-=head2 Static build on Win32
-
-It's now possible to build a C<perl-static.exe> that doesn't depend
-on C<perl59.dll> on Win32. See the Win32 makefiles for details.
-(Vadim Konovalov)
-
-=head2 win32 builds
-
-All win32 builds (MS-Win, WinCE) have been merged and cleaned up.
-
-=head2 C<d_pseudofork> and C<d_printf_format_null>
-
-A new configuration variable, available as C<$Config{d_pseudofork}> in
-the L<Config> module, has been added, to distinguish real fork() support
-from fake pseudofork used on Windows platforms.
-
-A new configuration variable, C<d_printf_format_null>, has been added,
-to see if printf-like formats are allowed to be NULL.
-
-=head2 Help
-
-C<Configure -h> has been extended with the most used option.
-
-Much less 'Whoa there' messages.
-
-=head2 64bit systems
-
-Better detection of 64bit(only) systems, and setting all the (library)
-paths accordingly.
-
-=head2 Ports
-
-Perl has been reported to work on MidnightBSD.
-
-Support for Cray XT4 Catamount/Qk has been added.
-
-Vendor patches have been merged for RedHat and GenToo.
-
-=head1 Selected Bug Fixes
-
-PerlIO::scalar will now prevent writing to read-only scalars. Moreover,
-seek() is now supported with PerlIO::scalar-based filehandles, the
-underlying string being zero-filled as needed. (Rafael, Jarkko Hietaniemi)
-
-study() never worked for UTF-8 strings, but could lead to false results.
-It's now a no-op on UTF-8 data. (Yves Orton)
-
-The signals SIGILL, SIGBUS and SIGSEGV are now always delivered in an
-"unsafe" manner (contrary to other signals, that are deferred until the
-perl interpreter reaches a reasonably stable state; see
-L<perlipc/"Deferred Signals (Safe Signals)">). (Rafael)
-
-When a module or a file is loaded through an @INC-hook, and when this hook
-has set a filename entry in %INC, __FILE__ is now set for this module
-accordingly to the contents of that %INC entry. (Rafael)
-
-The C<-w> and C<-t> switches can now be used together without messing
-up what categories of warnings are activated or not. (Rafael)
-
-Duping a filehandle which has the C<:utf8> PerlIO layer set will now
-properly carry that layer on the duped filehandle. (Rafael)
-
-Localizing an hash element whose key was given as a variable didn't work
-correctly if the variable was changed while the local() was in effect (as
-in C<local $h{$x}; ++$x>). (Bo Lindbergh)
-
-=head1 New or Changed Diagnostics
-
-=head2 Deprecations
-
-Two deprecation warnings have been added: (Rafael)
-
- Opening dirhandle %s also as a file
- Opening filehandle %s also as a directory
-
-=head1 Changed Internals
-
-The anonymous hash and array constructors now take 1 op in the optree
-instead of 3, now that pp_anonhash and pp_anonlist return a reference to
-an hash/array when the op is flagged with OPf_SPECIAL (Nicholas Clark).
-
-=for p5p XXX have we some docs on how to create regexp engine plugins, since that's now possible ? (perlreguts)
-
-=for p5p XXX new BIND SV type, #29544, #29642
-
-=head1 Reporting Bugs
-
-If you find what you think is a bug, you might check the articles
-recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/rt3/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
-
-If you believe you have an unreported bug, please run the B<perlbug>
-program included with your release. Be sure to trim your bug down
-to a tiny but sufficient test case. Your bug report, along with the
-output of C<perl -V>, will be sent off to perlbug at perl.org to be
-analysed by the Perl porting team.
-
-=head1 SEE ALSO
-
-The F<Changes> file for exhaustive details on what changed.
-
-The F<INSTALL> file for how to build Perl.
-
-The F<README> file for general stuff.
-
-The F<Artistic> and F<Copying> files for copyright information.
-
-=cut
Deleted: vendor/perl/dist/pod/perlapi.pod
===================================================================
--- vendor/perl/dist/pod/perlapi.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlapi.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7193 +0,0 @@
--*- buffer-read-only: t -*-
-
-!!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-This file is built by autodoc.pl extracting documentation from the C source
-files.
-
-=head1 NAME
-
-perlapi - autogenerated documentation for the perl public API
-
-=head1 DESCRIPTION
-X<Perl API> X<API> X<api>
-
-This file contains the documentation of the perl public API generated by
-embed.pl, specifically a listing of functions, macros, flags, and variables
-that may be used by extension writers. The interfaces of any functions that
-are not listed here are subject to change without notice. For this reason,
-blindly using functions listed in proto.h is to be avoided when writing
-extensions.
-
-Note that all Perl API global variables must be referenced with the C<PL_>
-prefix. Some macros are provided for compatibility with the older,
-unadorned names, but this support may be disabled in a future release.
-
-The listing is alphabetical, case insensitive.
-
-
-=head1 "Gimme" Values
-
-=over 8
-
-=item GIMME
-X<GIMME>
-
-A backward-compatible version of C<GIMME_V> which can only return
-C<G_SCALAR> or C<G_ARRAY>; in a void context, it returns C<G_SCALAR>.
-Deprecated. Use C<GIMME_V> instead.
-
- U32 GIMME
-
-=for hackers
-Found in file op.h
-
-=item GIMME_V
-X<GIMME_V>
-
-The XSUB-writer's equivalent to Perl's C<wantarray>. Returns C<G_VOID>,
-C<G_SCALAR> or C<G_ARRAY> for void, scalar or list context,
-respectively.
-
- U32 GIMME_V
-
-=for hackers
-Found in file op.h
-
-=item G_ARRAY
-X<G_ARRAY>
-
-Used to indicate list context. See C<GIMME_V>, C<GIMME> and
-L<perlcall>.
-
-=for hackers
-Found in file cop.h
-
-=item G_DISCARD
-X<G_DISCARD>
-
-Indicates that arguments returned from a callback should be discarded. See
-L<perlcall>.
-
-=for hackers
-Found in file cop.h
-
-=item G_EVAL
-X<G_EVAL>
-
-Used to force a Perl C<eval> wrapper around a callback. See
-L<perlcall>.
-
-=for hackers
-Found in file cop.h
-
-=item G_NOARGS
-X<G_NOARGS>
-
-Indicates that no arguments are being sent to a callback. See
-L<perlcall>.
-
-=for hackers
-Found in file cop.h
-
-=item G_SCALAR
-X<G_SCALAR>
-
-Used to indicate scalar context. See C<GIMME_V>, C<GIMME>, and
-L<perlcall>.
-
-=for hackers
-Found in file cop.h
-
-=item G_VOID
-X<G_VOID>
-
-Used to indicate void context. See C<GIMME_V> and L<perlcall>.
-
-=for hackers
-Found in file cop.h
-
-
-=back
-
-=head1 Array Manipulation Functions
-
-=over 8
-
-=item AvFILL
-X<AvFILL>
-
-Same as C<av_len()>. Deprecated, use C<av_len()> instead.
-
- int AvFILL(AV* av)
-
-=for hackers
-Found in file av.h
-
-=item av_clear
-X<av_clear>
-
-Clears an array, making it empty. Does not free the memory used by the
-array itself.
-
- void av_clear(AV* ar)
-
-=for hackers
-Found in file av.c
-
-=item av_create_and_push
-X<av_create_and_push>
-
-Push an SV onto the end of the array, creating the array if necessary.
-A small internal helper function to remove a commonly duplicated idiom.
-
-NOTE: this function is experimental and may change or be
-removed without notice.
-
- void av_create_and_push(AV **const avp, SV *const val)
-
-=for hackers
-Found in file av.c
-
-=item av_create_and_unshift_one
-X<av_create_and_unshift_one>
-
-Unshifts an SV onto the beginning of the array, creating the array if
-necessary.
-A small internal helper function to remove a commonly duplicated idiom.
-
-NOTE: this function is experimental and may change or be
-removed without notice.
-
- SV** av_create_and_unshift_one(AV **const avp, SV *const val)
-
-=for hackers
-Found in file av.c
-
-=item av_delete
-X<av_delete>
-
-Deletes the element indexed by C<key> from the array. Returns the
-deleted element. If C<flags> equals C<G_DISCARD>, the element is freed
-and null is returned.
-
- SV* av_delete(AV* ar, I32 key, I32 flags)
-
-=for hackers
-Found in file av.c
-
-=item av_exists
-X<av_exists>
-
-Returns true if the element indexed by C<key> has been initialized.
-
-This relies on the fact that uninitialized array elements are set to
-C<&PL_sv_undef>.
-
- bool av_exists(AV* ar, I32 key)
-
-=for hackers
-Found in file av.c
-
-=item av_extend
-X<av_extend>
-
-Pre-extend an array. The C<key> is the index to which the array should be
-extended.
-
- void av_extend(AV* ar, I32 key)
-
-=for hackers
-Found in file av.c
-
-=item av_fetch
-X<av_fetch>
-
-Returns the SV at the specified index in the array. The C<key> is the
-index. If C<lval> is set then the fetch will be part of a store. Check
-that the return value is non-null before dereferencing it to a C<SV*>.
-
-See L<perlguts/"Understanding the Magic of Tied Hashes and Arrays"> for
-more information on how to use this function on tied arrays.
-
- SV** av_fetch(AV* ar, I32 key, I32 lval)
-
-=for hackers
-Found in file av.c
-
-=item av_fill
-X<av_fill>
-
-Set the highest index in the array to the given number, equivalent to
-Perl's C<$#array = $fill;>.
-
-The number of elements in the an array will be C<fill + 1> after
-av_fill() returns. If the array was previously shorter then the
-additional elements appended are set to C<PL_sv_undef>. If the array
-was longer, then the excess elements are freed. C<av_fill(av, -1)> is
-the same as C<av_clear(av)>.
-
- void av_fill(AV* ar, I32 fill)
-
-=for hackers
-Found in file av.c
-
-=item av_len
-X<av_len>
-
-Returns the highest index in the array. The number of elements in the
-array is C<av_len(av) + 1>. Returns -1 if the array is empty.
-
- I32 av_len(const AV* ar)
-
-=for hackers
-Found in file av.c
-
-=item av_make
-X<av_make>
-
-Creates a new AV and populates it with a list of SVs. The SVs are copied
-into the array, so they may be freed after the call to av_make. The new AV
-will have a reference count of 1.
-
- AV* av_make(I32 size, SV** svp)
-
-=for hackers
-Found in file av.c
-
-=item av_pop
-X<av_pop>
-
-Pops an SV off the end of the array. Returns C<&PL_sv_undef> if the array
-is empty.
-
- SV* av_pop(AV* ar)
-
-=for hackers
-Found in file av.c
-
-=item av_push
-X<av_push>
-
-Pushes an SV onto the end of the array. The array will grow automatically
-to accommodate the addition.
-
- void av_push(AV* ar, SV* val)
-
-=for hackers
-Found in file av.c
-
-=item av_shift
-X<av_shift>
-
-Shifts an SV off the beginning of the array.
-
- SV* av_shift(AV* ar)
-
-=for hackers
-Found in file av.c
-
-=item av_store
-X<av_store>
-
-Stores an SV in an array. The array index is specified as C<key>. The
-return value will be NULL if the operation failed or if the value did not
-need to be actually stored within the array (as in the case of tied
-arrays). Otherwise it can be dereferenced to get the original C<SV*>. Note
-that the caller is responsible for suitably incrementing the reference
-count of C<val> before the call, and decrementing it if the function
-returned NULL.
-
-See L<perlguts/"Understanding the Magic of Tied Hashes and Arrays"> for
-more information on how to use this function on tied arrays.
-
- SV** av_store(AV* ar, I32 key, SV* val)
-
-=for hackers
-Found in file av.c
-
-=item av_undef
-X<av_undef>
-
-Undefines the array. Frees the memory used by the array itself.
-
- void av_undef(AV* ar)
-
-=for hackers
-Found in file av.c
-
-=item av_unshift
-X<av_unshift>
-
-Unshift the given number of C<undef> values onto the beginning of the
-array. The array will grow automatically to accommodate the addition. You
-must then use C<av_store> to assign values to these new elements.
-
- void av_unshift(AV* ar, I32 num)
-
-=for hackers
-Found in file av.c
-
-=item get_av
-X<get_av>
-
-Returns the AV of the specified Perl array. If C<create> is set and the
-Perl variable does not exist then it will be created. If C<create> is not
-set and the variable does not exist then NULL is returned.
-
-NOTE: the perl_ form of this function is deprecated.
-
- AV* get_av(const char* name, I32 create)
-
-=for hackers
-Found in file perl.c
-
-=item newAV
-X<newAV>
-
-Creates a new AV. The reference count is set to 1.
-
- AV* newAV()
-
-=for hackers
-Found in file av.c
-
-=item sortsv
-X<sortsv>
-
-Sort an array. Here is an example:
-
- sortsv(AvARRAY(av), av_len(av)+1, Perl_sv_cmp_locale);
-
-Currently this always uses mergesort. See sortsv_flags for a more
-flexible routine.
-
- void sortsv(SV** array, size_t num_elts, SVCOMPARE_t cmp)
-
-=for hackers
-Found in file pp_sort.c
-
-=item sortsv_flags
-X<sortsv_flags>
-
-Sort an array, with various options.
-
- void sortsv_flags(SV** array, size_t num_elts, SVCOMPARE_t cmp, U32 flags)
-
-=for hackers
-Found in file pp_sort.c
-
-
-=back
-
-=head1 Callback Functions
-
-=over 8
-
-=item call_argv
-X<call_argv>
-
-Performs a callback to the specified Perl sub. See L<perlcall>.
-
-NOTE: the perl_ form of this function is deprecated.
-
- I32 call_argv(const char* sub_name, I32 flags, char** argv)
-
-=for hackers
-Found in file perl.c
-
-=item call_method
-X<call_method>
-
-Performs a callback to the specified Perl method. The blessed object must
-be on the stack. See L<perlcall>.
-
-NOTE: the perl_ form of this function is deprecated.
-
- I32 call_method(const char* methname, I32 flags)
-
-=for hackers
-Found in file perl.c
-
-=item call_pv
-X<call_pv>
-
-Performs a callback to the specified Perl sub. See L<perlcall>.
-
-NOTE: the perl_ form of this function is deprecated.
-
- I32 call_pv(const char* sub_name, I32 flags)
-
-=for hackers
-Found in file perl.c
-
-=item call_sv
-X<call_sv>
-
-Performs a callback to the Perl sub whose name is in the SV. See
-L<perlcall>.
-
-NOTE: the perl_ form of this function is deprecated.
-
- I32 call_sv(SV* sv, I32 flags)
-
-=for hackers
-Found in file perl.c
-
-=item ENTER
-X<ENTER>
-
-Opening bracket on a callback. See C<LEAVE> and L<perlcall>.
-
- ENTER;
-
-=for hackers
-Found in file scope.h
-
-=item eval_pv
-X<eval_pv>
-
-Tells Perl to C<eval> the given string and return an SV* result.
-
-NOTE: the perl_ form of this function is deprecated.
-
- SV* eval_pv(const char* p, I32 croak_on_error)
-
-=for hackers
-Found in file perl.c
-
-=item eval_sv
-X<eval_sv>
-
-Tells Perl to C<eval> the string in the SV.
-
-NOTE: the perl_ form of this function is deprecated.
-
- I32 eval_sv(SV* sv, I32 flags)
-
-=for hackers
-Found in file perl.c
-
-=item FREETMPS
-X<FREETMPS>
-
-Closing bracket for temporaries on a callback. See C<SAVETMPS> and
-L<perlcall>.
-
- FREETMPS;
-
-=for hackers
-Found in file scope.h
-
-=item LEAVE
-X<LEAVE>
-
-Closing bracket on a callback. See C<ENTER> and L<perlcall>.
-
- LEAVE;
-
-=for hackers
-Found in file scope.h
-
-=item SAVETMPS
-X<SAVETMPS>
-
-Opening bracket for temporaries on a callback. See C<FREETMPS> and
-L<perlcall>.
-
- SAVETMPS;
-
-=for hackers
-Found in file scope.h
-
-
-=back
-
-=head1 Character classes
-
-=over 8
-
-=item isALNUM
-X<isALNUM>
-
-Returns a boolean indicating whether the C C<char> is an ASCII alphanumeric
-character (including underscore) or digit.
-
- bool isALNUM(char ch)
-
-=for hackers
-Found in file handy.h
-
-=item isALPHA
-X<isALPHA>
-
-Returns a boolean indicating whether the C C<char> is an ASCII alphabetic
-character.
-
- bool isALPHA(char ch)
-
-=for hackers
-Found in file handy.h
-
-=item isDIGIT
-X<isDIGIT>
-
-Returns a boolean indicating whether the C C<char> is an ASCII
-digit.
-
- bool isDIGIT(char ch)
-
-=for hackers
-Found in file handy.h
-
-=item isLOWER
-X<isLOWER>
-
-Returns a boolean indicating whether the C C<char> is a lowercase
-character.
-
- bool isLOWER(char ch)
-
-=for hackers
-Found in file handy.h
-
-=item isSPACE
-X<isSPACE>
-
-Returns a boolean indicating whether the C C<char> is whitespace.
-
- bool isSPACE(char ch)
-
-=for hackers
-Found in file handy.h
-
-=item isUPPER
-X<isUPPER>
-
-Returns a boolean indicating whether the C C<char> is an uppercase
-character.
-
- bool isUPPER(char ch)
-
-=for hackers
-Found in file handy.h
-
-=item toLOWER
-X<toLOWER>
-
-Converts the specified character to lowercase.
-
- char toLOWER(char ch)
-
-=for hackers
-Found in file handy.h
-
-=item toUPPER
-X<toUPPER>
-
-Converts the specified character to uppercase.
-
- char toUPPER(char ch)
-
-=for hackers
-Found in file handy.h
-
-
-=back
-
-=head1 Cloning an interpreter
-
-=over 8
-
-=item perl_clone
-X<perl_clone>
-
-Create and return a new interpreter by cloning the current one.
-
-perl_clone takes these flags as parameters:
-
-CLONEf_COPY_STACKS - is used to, well, copy the stacks also,
-without it we only clone the data and zero the stacks,
-with it we copy the stacks and the new perl interpreter is
-ready to run at the exact same point as the previous one.
-The pseudo-fork code uses COPY_STACKS while the
-threads->create doesn't.
-
-CLONEf_KEEP_PTR_TABLE
-perl_clone keeps a ptr_table with the pointer of the old
-variable as a key and the new variable as a value,
-this allows it to check if something has been cloned and not
-clone it again but rather just use the value and increase the
-refcount. If KEEP_PTR_TABLE is not set then perl_clone will kill
-the ptr_table using the function
-C<ptr_table_free(PL_ptr_table); PL_ptr_table = NULL;>,
-reason to keep it around is if you want to dup some of your own
-variable who are outside the graph perl scans, example of this
-code is in threads.xs create
-
-CLONEf_CLONE_HOST
-This is a win32 thing, it is ignored on unix, it tells perls
-win32host code (which is c++) to clone itself, this is needed on
-win32 if you want to run two threads at the same time,
-if you just want to do some stuff in a separate perl interpreter
-and then throw it away and return to the original one,
-you don't need to do anything.
-
- PerlInterpreter* perl_clone(PerlInterpreter* interp, UV flags)
-
-=for hackers
-Found in file sv.c
-
-
-=back
-
-=head1 CV Manipulation Functions
-
-=over 8
-
-=item CvSTASH
-X<CvSTASH>
-
-Returns the stash of the CV.
-
- HV* CvSTASH(CV* cv)
-
-=for hackers
-Found in file cv.h
-
-=item get_cv
-X<get_cv>
-
-Uses C<strlen> to get the length of C<name>, then calls C<get_cvn_flags>.
-
-NOTE: the perl_ form of this function is deprecated.
-
- CV* get_cv(const char* name, I32 flags)
-
-=for hackers
-Found in file perl.c
-
-=item get_cvn_flags
-X<get_cvn_flags>
-
-Returns the CV of the specified Perl subroutine. C<flags> are passed to
-C<gv_fetchpvn_flags>. If C<GV_ADD> is set and the Perl subroutine does not
-exist then it will be declared (which has the same effect as saying
-C<sub name;>). If C<GV_ADD> is not set and the subroutine does not exist
-then NULL is returned.
-
-NOTE: the perl_ form of this function is deprecated.
-
- CV* get_cvn_flags(const char* name, STRLEN len, I32 flags)
-
-=for hackers
-Found in file perl.c
-
-
-=back
-
-=head1 Embedding Functions
-
-=over 8
-
-=item cv_undef
-X<cv_undef>
-
-Clear out all the active components of a CV. This can happen either
-by an explicit C<undef &foo>, or by the reference count going to zero.
-In the former case, we keep the CvOUTSIDE pointer, so that any anonymous
-children can still follow the full lexical scope chain.
-
- void cv_undef(CV* cv)
-
-=for hackers
-Found in file op.c
-
-=item load_module
-X<load_module>
-
-Loads the module whose name is pointed to by the string part of name.
-Note that the actual module name, not its filename, should be given.
-Eg, "Foo::Bar" instead of "Foo/Bar.pm". flags can be any of
-PERL_LOADMOD_DENY, PERL_LOADMOD_NOIMPORT, or PERL_LOADMOD_IMPORT_OPS
-(or 0 for no flags). ver, if specified, provides version semantics
-similar to C<use Foo::Bar VERSION>. The optional trailing SV*
-arguments can be used to specify arguments to the module's import()
-method, similar to C<use Foo::Bar VERSION LIST>.
-
- void load_module(U32 flags, SV* name, SV* ver, ...)
-
-=for hackers
-Found in file op.c
-
-=item nothreadhook
-X<nothreadhook>
-
-Stub that provides thread hook for perl_destruct when there are
-no threads.
-
- int nothreadhook()
-
-=for hackers
-Found in file perl.c
-
-=item perl_alloc
-X<perl_alloc>
-
-Allocates a new Perl interpreter. See L<perlembed>.
-
- PerlInterpreter* perl_alloc()
-
-=for hackers
-Found in file perl.c
-
-=item perl_construct
-X<perl_construct>
-
-Initializes a new Perl interpreter. See L<perlembed>.
-
- void perl_construct(PerlInterpreter* interp)
-
-=for hackers
-Found in file perl.c
-
-=item perl_destruct
-X<perl_destruct>
-
-Shuts down a Perl interpreter. See L<perlembed>.
-
- int perl_destruct(PerlInterpreter* interp)
-
-=for hackers
-Found in file perl.c
-
-=item perl_free
-X<perl_free>
-
-Releases a Perl interpreter. See L<perlembed>.
-
- void perl_free(PerlInterpreter* interp)
-
-=for hackers
-Found in file perl.c
-
-=item perl_parse
-X<perl_parse>
-
-Tells a Perl interpreter to parse a Perl script. See L<perlembed>.
-
- int perl_parse(PerlInterpreter* interp, XSINIT_t xsinit, int argc, char** argv, char** env)
-
-=for hackers
-Found in file perl.c
-
-=item perl_run
-X<perl_run>
-
-Tells a Perl interpreter to run. See L<perlembed>.
-
- int perl_run(PerlInterpreter* interp)
-
-=for hackers
-Found in file perl.c
-
-=item require_pv
-X<require_pv>
-
-Tells Perl to C<require> the file named by the string argument. It is
-analogous to the Perl code C<eval "require '$file'">. It's even
-implemented that way; consider using load_module instead.
-
-NOTE: the perl_ form of this function is deprecated.
-
- void require_pv(const char* pv)
-
-=for hackers
-Found in file perl.c
-
-
-=back
-
-=head1 Functions in file dump.c
-
-
-=over 8
-
-=item pv_display
-X<pv_display>
-
- char *pv_display(SV *dsv, const char *pv, STRLEN cur, STRLEN len,
- STRLEN pvlim, U32 flags)
-
-Similar to
-
- pv_escape(dsv,pv,cur,pvlim,PERL_PV_ESCAPE_QUOTE);
-
-except that an additional "\0" will be appended to the string when
-len > cur and pv[cur] is "\0".
-
-Note that the final string may be up to 7 chars longer than pvlim.
-
- char* pv_display(SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
-
-=for hackers
-Found in file dump.c
-
-=item pv_escape
-X<pv_escape>
-
- |const STRLEN count|const STRLEN max
- |STRLEN const *escaped, const U32 flags
-
-Escapes at most the first "count" chars of pv and puts the results into
-dsv such that the size of the escaped string will not exceed "max" chars
-and will not contain any incomplete escape sequences.
-
-If flags contains PERL_PV_ESCAPE_QUOTE then any double quotes in the string
-will also be escaped.
-
-Normally the SV will be cleared before the escaped string is prepared,
-but when PERL_PV_ESCAPE_NOCLEAR is set this will not occur.
-
-If PERL_PV_ESCAPE_UNI is set then the input string is treated as Unicode,
-if PERL_PV_ESCAPE_UNI_DETECT is set then the input string is scanned
-using C<is_utf8_string()> to determine if it is Unicode.
-
-If PERL_PV_ESCAPE_ALL is set then all input chars will be output
-using C<\x01F1> style escapes, otherwise only chars above 255 will be
-escaped using this style, other non printable chars will use octal or
-common escaped patterns like C<\n>. If PERL_PV_ESCAPE_NOBACKSLASH
-then all chars below 255 will be treated as printable and
-will be output as literals.
-
-If PERL_PV_ESCAPE_FIRSTCHAR is set then only the first char of the
-string will be escaped, regardles of max. If the string is utf8 and
-the chars value is >255 then it will be returned as a plain hex
-sequence. Thus the output will either be a single char,
-an octal escape sequence, a special escape like C<\n> or a 3 or
-more digit hex value.
-
-If PERL_PV_ESCAPE_RE is set then the escape char used will be a '%' and
-not a '\\'. This is because regexes very often contain backslashed
-sequences, whereas '%' is not a particularly common character in patterns.
-
-Returns a pointer to the escaped text as held by dsv.
-
-NOTE: the perl_ form of this function is deprecated.
-
- char* pv_escape(SV *dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags)
-
-=for hackers
-Found in file dump.c
-
-=item pv_pretty
-X<pv_pretty>
-
- |const STRLEN count|const STRLEN max\
- |const char const *start_color| const char const *end_color\
- |const U32 flags
-
-Converts a string into something presentable, handling escaping via
-pv_escape() and supporting quoting and ellipses.
-
-If the PERL_PV_PRETTY_QUOTE flag is set then the result will be
-double quoted with any double quotes in the string escaped. Otherwise
-if the PERL_PV_PRETTY_LTGT flag is set then the result be wrapped in
-angle brackets.
-
-If the PERL_PV_PRETTY_ELLIPSES flag is set and not all characters in
-string were output then an ellipsis C<...> will be appended to the
-string. Note that this happens AFTER it has been quoted.
-
-If start_color is non-null then it will be inserted after the opening
-quote (if there is one) but before the escaped text. If end_color
-is non-null then it will be inserted after the escaped text but before
-any quotes or ellipses.
-
-Returns a pointer to the prettified text as held by dsv.
-
-NOTE: the perl_ form of this function is deprecated.
-
- char* pv_pretty(SV *dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags)
-
-=for hackers
-Found in file dump.c
-
-
-=back
-
-=head1 Functions in file mathoms.c
-
-
-=over 8
-
-=item gv_fetchmethod
-X<gv_fetchmethod>
-
-See L<gv_fetchmethod_autoload>.
-
- GV* gv_fetchmethod(HV* stash, const char* name)
-
-=for hackers
-Found in file mathoms.c
-
-=item pack_cat
-X<pack_cat>
-
-The engine implementing pack() Perl function. Note: parameters next_in_list and
-flags are not used. This call should not be used; use packlist instead.
-
- void pack_cat(SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_2pvbyte_nolen
-X<sv_2pvbyte_nolen>
-
-Return a pointer to the byte-encoded representation of the SV.
-May cause the SV to be downgraded from UTF-8 as a side-effect.
-
-Usually accessed via the C<SvPVbyte_nolen> macro.
-
- char* sv_2pvbyte_nolen(SV* sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_2pvutf8_nolen
-X<sv_2pvutf8_nolen>
-
-Return a pointer to the UTF-8-encoded representation of the SV.
-May cause the SV to be upgraded to UTF-8 as a side-effect.
-
-Usually accessed via the C<SvPVutf8_nolen> macro.
-
- char* sv_2pvutf8_nolen(SV* sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_2pv_nolen
-X<sv_2pv_nolen>
-
-Like C<sv_2pv()>, but doesn't return the length too. You should usually
-use the macro wrapper C<SvPV_nolen(sv)> instead.
- char* sv_2pv_nolen(SV* sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_catpvn_mg
-X<sv_catpvn_mg>
-
-Like C<sv_catpvn>, but also handles 'set' magic.
-
- void sv_catpvn_mg(SV *sv, const char *ptr, STRLEN len)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_catsv_mg
-X<sv_catsv_mg>
-
-Like C<sv_catsv>, but also handles 'set' magic.
-
- void sv_catsv_mg(SV *dstr, SV *sstr)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_force_normal
-X<sv_force_normal>
-
-Undo various types of fakery on an SV: if the PV is a shared string, make
-a private copy; if we're a ref, stop refing; if we're a glob, downgrade to
-an xpvmg. See also C<sv_force_normal_flags>.
-
- void sv_force_normal(SV *sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_iv
-X<sv_iv>
-
-A private implementation of the C<SvIVx> macro for compilers which can't
-cope with complex macro expressions. Always use the macro instead.
-
- IV sv_iv(SV* sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_nolocking
-X<sv_nolocking>
-
-Dummy routine which "locks" an SV when there is no locking module present.
-Exists to avoid test for a NULL function pointer and because it could
-potentially warn under some level of strict-ness.
-
-"Superseded" by sv_nosharing().
-
- void sv_nolocking(SV *sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_nounlocking
-X<sv_nounlocking>
-
-Dummy routine which "unlocks" an SV when there is no locking module present.
-Exists to avoid test for a NULL function pointer and because it could
-potentially warn under some level of strict-ness.
-
-"Superseded" by sv_nosharing().
-
- void sv_nounlocking(SV *sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_nv
-X<sv_nv>
-
-A private implementation of the C<SvNVx> macro for compilers which can't
-cope with complex macro expressions. Always use the macro instead.
-
- NV sv_nv(SV* sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_pv
-X<sv_pv>
-
-Use the C<SvPV_nolen> macro instead
-
- char* sv_pv(SV *sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_pvbyte
-X<sv_pvbyte>
-
-Use C<SvPVbyte_nolen> instead.
-
- char* sv_pvbyte(SV *sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_pvbyten
-X<sv_pvbyten>
-
-A private implementation of the C<SvPVbyte> macro for compilers
-which can't cope with complex macro expressions. Always use the macro
-instead.
-
- char* sv_pvbyten(SV *sv, STRLEN *len)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_pvn
-X<sv_pvn>
-
-A private implementation of the C<SvPV> macro for compilers which can't
-cope with complex macro expressions. Always use the macro instead.
-
- char* sv_pvn(SV *sv, STRLEN *len)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_pvutf8
-X<sv_pvutf8>
-
-Use the C<SvPVutf8_nolen> macro instead
-
- char* sv_pvutf8(SV *sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_pvutf8n
-X<sv_pvutf8n>
-
-A private implementation of the C<SvPVutf8> macro for compilers
-which can't cope with complex macro expressions. Always use the macro
-instead.
-
- char* sv_pvutf8n(SV *sv, STRLEN *len)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_taint
-X<sv_taint>
-
-Taint an SV. Use C<SvTAINTED_on> instead.
- void sv_taint(SV* sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_unref
-X<sv_unref>
-
-Unsets the RV status of the SV, and decrements the reference count of
-whatever was being referenced by the RV. This can almost be thought of
-as a reversal of C<newSVrv>. This is C<sv_unref_flags> with the C<flag>
-being zero. See C<SvROK_off>.
-
- void sv_unref(SV* sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_usepvn
-X<sv_usepvn>
-
-Tells an SV to use C<ptr> to find its string value. Implemented by
-calling C<sv_usepvn_flags> with C<flags> of 0, hence does not handle 'set'
-magic. See C<sv_usepvn_flags>.
-
- void sv_usepvn(SV* sv, char* ptr, STRLEN len)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_usepvn_mg
-X<sv_usepvn_mg>
-
-Like C<sv_usepvn>, but also handles 'set' magic.
-
- void sv_usepvn_mg(SV *sv, char *ptr, STRLEN len)
-
-=for hackers
-Found in file mathoms.c
-
-=item sv_uv
-X<sv_uv>
-
-A private implementation of the C<SvUVx> macro for compilers which can't
-cope with complex macro expressions. Always use the macro instead.
-
- UV sv_uv(SV* sv)
-
-=for hackers
-Found in file mathoms.c
-
-=item unpack_str
-X<unpack_str>
-
-The engine implementing unpack() Perl function. Note: parameters strbeg, new_s
-and ocnt are not used. This call should not be used, use unpackstring instead.
-
- I32 unpack_str(const char *pat, const char *patend, const char *s, const char *strbeg, const char *strend, char **new_s, I32 ocnt, U32 flags)
-
-=for hackers
-Found in file mathoms.c
-
-
-=back
-
-=head1 Functions in file pp_ctl.c
-
-
-=over 8
-
-=item find_runcv
-X<find_runcv>
-
-Locate the CV corresponding to the currently executing sub or eval.
-If db_seqp is non_null, skip CVs that are in the DB package and populate
-*db_seqp with the cop sequence number at the point that the DB:: code was
-entered. (allows debuggers to eval in the scope of the breakpoint rather
-than in the scope of the debugger itself).
-
- CV* find_runcv(U32 *db_seqp)
-
-=for hackers
-Found in file pp_ctl.c
-
-
-=back
-
-=head1 Functions in file pp_pack.c
-
-
-=over 8
-
-=item packlist
-X<packlist>
-
-The engine implementing pack() Perl function.
-
- void packlist(SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist)
-
-=for hackers
-Found in file pp_pack.c
-
-=item unpackstring
-X<unpackstring>
-
-The engine implementing unpack() Perl function. C<unpackstring> puts the
-extracted list items on the stack and returns the number of elements.
-Issue C<PUTBACK> before and C<SPAGAIN> after the call to this function.
-
- I32 unpackstring(const char *pat, const char *patend, const char *s, const char *strend, U32 flags)
-
-=for hackers
-Found in file pp_pack.c
-
-
-=back
-
-=head1 GV Functions
-
-=over 8
-
-=item GvSV
-X<GvSV>
-
-Return the SV from the GV.
-
- SV* GvSV(GV* gv)
-
-=for hackers
-Found in file gv.h
-
-=item gv_const_sv
-X<gv_const_sv>
-
-If C<gv> is a typeglob whose subroutine entry is a constant sub eligible for
-inlining, or C<gv> is a placeholder reference that would be promoted to such
-a typeglob, then returns the value returned by the sub. Otherwise, returns
-NULL.
-
- SV* gv_const_sv(GV* gv)
-
-=for hackers
-Found in file gv.c
-
-=item gv_fetchmeth
-X<gv_fetchmeth>
-
-Returns the glob with the given C<name> and a defined subroutine or
-C<NULL>. The glob lives in the given C<stash>, or in the stashes
-accessible via @ISA and UNIVERSAL::.
-
-The argument C<level> should be either 0 or -1. If C<level==0>, as a
-side-effect creates a glob with the given C<name> in the given C<stash>
-which in the case of success contains an alias for the subroutine, and sets
-up caching info for this glob.
-
-This function grants C<"SUPER"> token as a postfix of the stash name. The
-GV returned from C<gv_fetchmeth> may be a method cache entry, which is not
-visible to Perl code. So when calling C<call_sv>, you should not use
-the GV directly; instead, you should use the method's CV, which can be
-obtained from the GV with the C<GvCV> macro.
-
- GV* gv_fetchmeth(HV* stash, const char* name, STRLEN len, I32 level)
-
-=for hackers
-Found in file gv.c
-
-=item gv_fetchmethod_autoload
-X<gv_fetchmethod_autoload>
-
-Returns the glob which contains the subroutine to call to invoke the method
-on the C<stash>. In fact in the presence of autoloading this may be the
-glob for "AUTOLOAD". In this case the corresponding variable $AUTOLOAD is
-already setup.
-
-The third parameter of C<gv_fetchmethod_autoload> determines whether
-AUTOLOAD lookup is performed if the given method is not present: non-zero
-means yes, look for AUTOLOAD; zero means no, don't look for AUTOLOAD.
-Calling C<gv_fetchmethod> is equivalent to calling C<gv_fetchmethod_autoload>
-with a non-zero C<autoload> parameter.
-
-These functions grant C<"SUPER"> token as a prefix of the method name. Note
-that if you want to keep the returned glob for a long time, you need to
-check for it being "AUTOLOAD", since at the later time the call may load a
-different subroutine due to $AUTOLOAD changing its value. Use the glob
-created via a side effect to do this.
-
-These functions have the same side-effects and as C<gv_fetchmeth> with
-C<level==0>. C<name> should be writable if contains C<':'> or C<'
-''>. The warning against passing the GV returned by C<gv_fetchmeth> to
-C<call_sv> apply equally to these functions.
-
- GV* gv_fetchmethod_autoload(HV* stash, const char* name, I32 autoload)
-
-=for hackers
-Found in file gv.c
-
-=item gv_fetchmeth_autoload
-X<gv_fetchmeth_autoload>
-
-Same as gv_fetchmeth(), but looks for autoloaded subroutines too.
-Returns a glob for the subroutine.
-
-For an autoloaded subroutine without a GV, will create a GV even
-if C<level < 0>. For an autoloaded subroutine without a stub, GvCV()
-of the result may be zero.
-
- GV* gv_fetchmeth_autoload(HV* stash, const char* name, STRLEN len, I32 level)
-
-=for hackers
-Found in file gv.c
-
-=item gv_stashpv
-X<gv_stashpv>
-
-Returns a pointer to the stash for a specified package. Uses C<strlen> to
-determine the length of C<name>, then calls C<gv_stashpvn()>.
-
- HV* gv_stashpv(const char* name, I32 flags)
-
-=for hackers
-Found in file gv.c
-
-=item gv_stashpvn
-X<gv_stashpvn>
-
-Returns a pointer to the stash for a specified package. The C<namelen>
-parameter indicates the length of the C<name>, in bytes. C<flags> is passed
-to C<gv_fetchpvn_flags()>, so if set to C<GV_ADD> then the package will be
-created if it does not already exist. If the package does not exist and
-C<flags> is 0 (or any other setting that does not create packages) then NULL
-is returned.
-
-
- HV* gv_stashpvn(const char* name, U32 namelen, I32 flags)
-
-=for hackers
-Found in file gv.c
-
-=item gv_stashpvs
-X<gv_stashpvs>
-
-Like C<gv_stashpvn>, but takes a literal string instead of a string/length pair.
-
- HV* gv_stashpvs(const char* name, I32 create)
-
-=for hackers
-Found in file handy.h
-
-=item gv_stashsv
-X<gv_stashsv>
-
-Returns a pointer to the stash for a specified package. See C<gv_stashpvn>.
-
- HV* gv_stashsv(SV* sv, I32 flags)
-
-=for hackers
-Found in file gv.c
-
-
-=back
-
-=head1 Handy Values
-
-=over 8
-
-=item Nullav
-X<Nullav>
-
-Null AV pointer.
-
-=for hackers
-Found in file av.h
-
-=item Nullch
-X<Nullch>
-
-Null character pointer.
-
-=for hackers
-Found in file handy.h
-
-=item Nullcv
-X<Nullcv>
-
-Null CV pointer.
-
-=for hackers
-Found in file cv.h
-
-=item Nullhv
-X<Nullhv>
-
-Null HV pointer.
-
-=for hackers
-Found in file hv.h
-
-=item Nullsv
-X<Nullsv>
-
-Null SV pointer.
-
-=for hackers
-Found in file handy.h
-
-
-=back
-
-=head1 Hash Manipulation Functions
-
-=over 8
-
-=item get_hv
-X<get_hv>
-
-Returns the HV of the specified Perl hash. If C<create> is set and the
-Perl variable does not exist then it will be created. If C<create> is not
-set and the variable does not exist then NULL is returned.
-
-NOTE: the perl_ form of this function is deprecated.
-
- HV* get_hv(const char* name, I32 create)
-
-=for hackers
-Found in file perl.c
-
-=item HEf_SVKEY
-X<HEf_SVKEY>
-
-This flag, used in the length slot of hash entries and magic structures,
-specifies the structure contains an C<SV*> pointer where a C<char*> pointer
-is to be expected. (For information only--not to be used).
-
-=for hackers
-Found in file hv.h
-
-=item HeHASH
-X<HeHASH>
-
-Returns the computed hash stored in the hash entry.
-
- U32 HeHASH(HE* he)
-
-=for hackers
-Found in file hv.h
-
-=item HeKEY
-X<HeKEY>
-
-Returns the actual pointer stored in the key slot of the hash entry. The
-pointer may be either C<char*> or C<SV*>, depending on the value of
-C<HeKLEN()>. Can be assigned to. The C<HePV()> or C<HeSVKEY()> macros are
-usually preferable for finding the value of a key.
-
- void* HeKEY(HE* he)
-
-=for hackers
-Found in file hv.h
-
-=item HeKLEN
-X<HeKLEN>
-
-If this is negative, and amounts to C<HEf_SVKEY>, it indicates the entry
-holds an C<SV*> key. Otherwise, holds the actual length of the key. Can
-be assigned to. The C<HePV()> macro is usually preferable for finding key
-lengths.
-
- STRLEN HeKLEN(HE* he)
-
-=for hackers
-Found in file hv.h
-
-=item HePV
-X<HePV>
-
-Returns the key slot of the hash entry as a C<char*> value, doing any
-necessary dereferencing of possibly C<SV*> keys. The length of the string
-is placed in C<len> (this is a macro, so do I<not> use C<&len>). If you do
-not care about what the length of the key is, you may use the global
-variable C<PL_na>, though this is rather less efficient than using a local
-variable. Remember though, that hash keys in perl are free to contain
-embedded nulls, so using C<strlen()> or similar is not a good way to find
-the length of hash keys. This is very similar to the C<SvPV()> macro
-described elsewhere in this document.
-
- char* HePV(HE* he, STRLEN len)
-
-=for hackers
-Found in file hv.h
-
-=item HeSVKEY
-X<HeSVKEY>
-
-Returns the key as an C<SV*>, or C<NULL> if the hash entry does not
-contain an C<SV*> key.
-
- SV* HeSVKEY(HE* he)
-
-=for hackers
-Found in file hv.h
-
-=item HeSVKEY_force
-X<HeSVKEY_force>
-
-Returns the key as an C<SV*>. Will create and return a temporary mortal
-C<SV*> if the hash entry contains only a C<char*> key.
-
- SV* HeSVKEY_force(HE* he)
-
-=for hackers
-Found in file hv.h
-
-=item HeSVKEY_set
-X<HeSVKEY_set>
-
-Sets the key to a given C<SV*>, taking care to set the appropriate flags to
-indicate the presence of an C<SV*> key, and returns the same
-C<SV*>.
-
- SV* HeSVKEY_set(HE* he, SV* sv)
-
-=for hackers
-Found in file hv.h
-
-=item HeVAL
-X<HeVAL>
-
-Returns the value slot (type C<SV*>) stored in the hash entry.
-
- SV* HeVAL(HE* he)
-
-=for hackers
-Found in file hv.h
-
-=item HvNAME
-X<HvNAME>
-
-Returns the package name of a stash, or NULL if C<stash> isn't a stash.
-See C<SvSTASH>, C<CvSTASH>.
-
- char* HvNAME(HV* stash)
-
-=for hackers
-Found in file hv.h
-
-=item hv_assert
-X<hv_assert>
-
-Check that a hash is in an internally consistent state.
-
- void hv_assert(HV* tb)
-
-=for hackers
-Found in file hv.c
-
-=item hv_clear
-X<hv_clear>
-
-Clears a hash, making it empty.
-
- void hv_clear(HV* tb)
-
-=for hackers
-Found in file hv.c
-
-=item hv_clear_placeholders
-X<hv_clear_placeholders>
-
-Clears any placeholders from a hash. If a restricted hash has any of its keys
-marked as readonly and the key is subsequently deleted, the key is not actually
-deleted but is marked by assigning it a value of &PL_sv_placeholder. This tags
-it so it will be ignored by future operations such as iterating over the hash,
-but will still allow the hash to have a value reassigned to the key at some
-future point. This function clears any such placeholder keys from the hash.
-See Hash::Util::lock_keys() for an example of its use.
-
- void hv_clear_placeholders(HV* hb)
-
-=for hackers
-Found in file hv.c
-
-=item hv_delete
-X<hv_delete>
-
-Deletes a key/value pair in the hash. The value SV is removed from the
-hash and returned to the caller. The C<klen> is the length of the key.
-The C<flags> value will normally be zero; if set to G_DISCARD then NULL
-will be returned.
-
- SV* hv_delete(HV* tb, const char* key, I32 klen, I32 flags)
-
-=for hackers
-Found in file hv.c
-
-=item hv_delete_ent
-X<hv_delete_ent>
-
-Deletes a key/value pair in the hash. The value SV is removed from the
-hash and returned to the caller. The C<flags> value will normally be zero;
-if set to G_DISCARD then NULL will be returned. C<hash> can be a valid
-precomputed hash value, or 0 to ask for it to be computed.
-
- SV* hv_delete_ent(HV* tb, SV* key, I32 flags, U32 hash)
-
-=for hackers
-Found in file hv.c
-
-=item hv_exists
-X<hv_exists>
-
-Returns a boolean indicating whether the specified hash key exists. The
-C<klen> is the length of the key.
-
- bool hv_exists(HV* tb, const char* key, I32 klen)
-
-=for hackers
-Found in file hv.c
-
-=item hv_exists_ent
-X<hv_exists_ent>
-
-Returns a boolean indicating whether the specified hash key exists. C<hash>
-can be a valid precomputed hash value, or 0 to ask for it to be
-computed.
-
- bool hv_exists_ent(HV* tb, SV* key, U32 hash)
-
-=for hackers
-Found in file hv.c
-
-=item hv_fetch
-X<hv_fetch>
-
-Returns the SV which corresponds to the specified key in the hash. The
-C<klen> is the length of the key. If C<lval> is set then the fetch will be
-part of a store. Check that the return value is non-null before
-dereferencing it to an C<SV*>.
-
-See L<perlguts/"Understanding the Magic of Tied Hashes and Arrays"> for more
-information on how to use this function on tied hashes.
-
- SV** hv_fetch(HV* tb, const char* key, I32 klen, I32 lval)
-
-=for hackers
-Found in file hv.c
-
-=item hv_fetchs
-X<hv_fetchs>
-
-Like C<hv_fetch>, but takes a literal string instead of a string/length pair.
-
- SV** hv_fetchs(HV* tb, const char* key, I32 lval)
-
-=for hackers
-Found in file handy.h
-
-=item hv_fetch_ent
-X<hv_fetch_ent>
-
-Returns the hash entry which corresponds to the specified key in the hash.
-C<hash> must be a valid precomputed hash number for the given C<key>, or 0
-if you want the function to compute it. IF C<lval> is set then the fetch
-will be part of a store. Make sure the return value is non-null before
-accessing it. The return value when C<tb> is a tied hash is a pointer to a
-static location, so be sure to make a copy of the structure if you need to
-store it somewhere.
-
-See L<perlguts/"Understanding the Magic of Tied Hashes and Arrays"> for more
-information on how to use this function on tied hashes.
-
- HE* hv_fetch_ent(HV* tb, SV* key, I32 lval, U32 hash)
-
-=for hackers
-Found in file hv.c
-
-=item hv_iterinit
-X<hv_iterinit>
-
-Prepares a starting point to traverse a hash table. Returns the number of
-keys in the hash (i.e. the same as C<HvKEYS(tb)>). The return value is
-currently only meaningful for hashes without tie magic.
-
-NOTE: Before version 5.004_65, C<hv_iterinit> used to return the number of
-hash buckets that happen to be in use. If you still need that esoteric
-value, you can get it through the macro C<HvFILL(tb)>.
-
-
- I32 hv_iterinit(HV* tb)
-
-=for hackers
-Found in file hv.c
-
-=item hv_iterkey
-X<hv_iterkey>
-
-Returns the key from the current position of the hash iterator. See
-C<hv_iterinit>.
-
- char* hv_iterkey(HE* entry, I32* retlen)
-
-=for hackers
-Found in file hv.c
-
-=item hv_iterkeysv
-X<hv_iterkeysv>
-
-Returns the key as an C<SV*> from the current position of the hash
-iterator. The return value will always be a mortal copy of the key. Also
-see C<hv_iterinit>.
-
- SV* hv_iterkeysv(HE* entry)
-
-=for hackers
-Found in file hv.c
-
-=item hv_iternext
-X<hv_iternext>
-
-Returns entries from a hash iterator. See C<hv_iterinit>.
-
-You may call C<hv_delete> or C<hv_delete_ent> on the hash entry that the
-iterator currently points to, without losing your place or invalidating your
-iterator. Note that in this case the current entry is deleted from the hash
-with your iterator holding the last reference to it. Your iterator is flagged
-to free the entry on the next call to C<hv_iternext>, so you must not discard
-your iterator immediately else the entry will leak - call C<hv_iternext> to
-trigger the resource deallocation.
-
- HE* hv_iternext(HV* tb)
-
-=for hackers
-Found in file hv.c
-
-=item hv_iternextsv
-X<hv_iternextsv>
-
-Performs an C<hv_iternext>, C<hv_iterkey>, and C<hv_iterval> in one
-operation.
-
- SV* hv_iternextsv(HV* hv, char** key, I32* retlen)
-
-=for hackers
-Found in file hv.c
-
-=item hv_iternext_flags
-X<hv_iternext_flags>
-
-Returns entries from a hash iterator. See C<hv_iterinit> and C<hv_iternext>.
-The C<flags> value will normally be zero; if HV_ITERNEXT_WANTPLACEHOLDERS is
-set the placeholders keys (for restricted hashes) will be returned in addition
-to normal keys. By default placeholders are automatically skipped over.
-Currently a placeholder is implemented with a value that is
-C<&Perl_sv_placeholder>. Note that the implementation of placeholders and
-restricted hashes may change, and the implementation currently is
-insufficiently abstracted for any change to be tidy.
-
-NOTE: this function is experimental and may change or be
-removed without notice.
-
- HE* hv_iternext_flags(HV* tb, I32 flags)
-
-=for hackers
-Found in file hv.c
-
-=item hv_iterval
-X<hv_iterval>
-
-Returns the value from the current position of the hash iterator. See
-C<hv_iterkey>.
-
- SV* hv_iterval(HV* tb, HE* entry)
-
-=for hackers
-Found in file hv.c
-
-=item hv_magic
-X<hv_magic>
-
-Adds magic to a hash. See C<sv_magic>.
-
- void hv_magic(HV* hv, GV* gv, int how)
-
-=for hackers
-Found in file hv.c
-
-=item hv_scalar
-X<hv_scalar>
-
-Evaluates the hash in scalar context and returns the result. Handles magic when the hash is tied.
-
- SV* hv_scalar(HV* hv)
-
-=for hackers
-Found in file hv.c
-
-=item hv_store
-X<hv_store>
-
-Stores an SV in a hash. The hash key is specified as C<key> and C<klen> is
-the length of the key. The C<hash> parameter is the precomputed hash
-value; if it is zero then Perl will compute it. The return value will be
-NULL if the operation failed or if the value did not need to be actually
-stored within the hash (as in the case of tied hashes). Otherwise it can
-be dereferenced to get the original C<SV*>. Note that the caller is
-responsible for suitably incrementing the reference count of C<val> before
-the call, and decrementing it if the function returned NULL. Effectively
-a successful hv_store takes ownership of one reference to C<val>. This is
-usually what you want; a newly created SV has a reference count of one, so
-if all your code does is create SVs then store them in a hash, hv_store
-will own the only reference to the new SV, and your code doesn't need to do
-anything further to tidy up. hv_store is not implemented as a call to
-hv_store_ent, and does not create a temporary SV for the key, so if your
-key data is not already in SV form then use hv_store in preference to
-hv_store_ent.
-
-See L<perlguts/"Understanding the Magic of Tied Hashes and Arrays"> for more
-information on how to use this function on tied hashes.
-
- SV** hv_store(HV* tb, const char* key, I32 klen, SV* val, U32 hash)
-
-=for hackers
-Found in file hv.c
-
-=item hv_stores
-X<hv_stores>
-
-Like C<hv_store>, but takes a literal string instead of a string/length pair
-and omits the hash parameter.
-
- SV** hv_stores(HV* tb, const char* key, NULLOK SV* val)
-
-=for hackers
-Found in file handy.h
-
-=item hv_store_ent
-X<hv_store_ent>
-
-Stores C<val> in a hash. The hash key is specified as C<key>. The C<hash>
-parameter is the precomputed hash value; if it is zero then Perl will
-compute it. The return value is the new hash entry so created. It will be
-NULL if the operation failed or if the value did not need to be actually
-stored within the hash (as in the case of tied hashes). Otherwise the
-contents of the return value can be accessed using the C<He?> macros
-described here. Note that the caller is responsible for suitably
-incrementing the reference count of C<val> before the call, and
-decrementing it if the function returned NULL. Effectively a successful
-hv_store_ent takes ownership of one reference to C<val>. This is
-usually what you want; a newly created SV has a reference count of one, so
-if all your code does is create SVs then store them in a hash, hv_store
-will own the only reference to the new SV, and your code doesn't need to do
-anything further to tidy up. Note that hv_store_ent only reads the C<key>;
-unlike C<val> it does not take ownership of it, so maintaining the correct
-reference count on C<key> is entirely the caller's responsibility. hv_store
-is not implemented as a call to hv_store_ent, and does not create a temporary
-SV for the key, so if your key data is not already in SV form then use
-hv_store in preference to hv_store_ent.
-
-See L<perlguts/"Understanding the Magic of Tied Hashes and Arrays"> for more
-information on how to use this function on tied hashes.
-
- HE* hv_store_ent(HV* tb, SV* key, SV* val, U32 hash)
-
-=for hackers
-Found in file hv.c
-
-=item hv_undef
-X<hv_undef>
-
-Undefines the hash.
-
- void hv_undef(HV* tb)
-
-=for hackers
-Found in file hv.c
-
-=item newHV
-X<newHV>
-
-Creates a new HV. The reference count is set to 1.
-
- HV* newHV()
-
-=for hackers
-Found in file hv.c
-
-
-=back
-
-=head1 Magical Functions
-
-=over 8
-
-=item mg_clear
-X<mg_clear>
-
-Clear something magical that the SV represents. See C<sv_magic>.
-
- int mg_clear(SV* sv)
-
-=for hackers
-Found in file mg.c
-
-=item mg_copy
-X<mg_copy>
-
-Copies the magic from one SV to another. See C<sv_magic>.
-
- int mg_copy(SV* sv, SV* nsv, const char* key, I32 klen)
-
-=for hackers
-Found in file mg.c
-
-=item mg_find
-X<mg_find>
-
-Finds the magic pointer for type matching the SV. See C<sv_magic>.
-
- MAGIC* mg_find(const SV* sv, int type)
-
-=for hackers
-Found in file mg.c
-
-=item mg_free
-X<mg_free>
-
-Free any magic storage used by the SV. See C<sv_magic>.
-
- int mg_free(SV* sv)
-
-=for hackers
-Found in file mg.c
-
-=item mg_get
-X<mg_get>
-
-Do magic after a value is retrieved from the SV. See C<sv_magic>.
-
- int mg_get(SV* sv)
-
-=for hackers
-Found in file mg.c
-
-=item mg_length
-X<mg_length>
-
-Report on the SV's length. See C<sv_magic>.
-
- U32 mg_length(SV* sv)
-
-=for hackers
-Found in file mg.c
-
-=item mg_magical
-X<mg_magical>
-
-Turns on the magical status of an SV. See C<sv_magic>.
-
- void mg_magical(SV* sv)
-
-=for hackers
-Found in file mg.c
-
-=item mg_set
-X<mg_set>
-
-Do magic after a value is assigned to the SV. See C<sv_magic>.
-
- int mg_set(SV* sv)
-
-=for hackers
-Found in file mg.c
-
-=item SvGETMAGIC
-X<SvGETMAGIC>
-
-Invokes C<mg_get> on an SV if it has 'get' magic. This macro evaluates its
-argument more than once.
-
- void SvGETMAGIC(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvLOCK
-X<SvLOCK>
-
-Arranges for a mutual exclusion lock to be obtained on sv if a suitable module
-has been loaded.
-
- void SvLOCK(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvSETMAGIC
-X<SvSETMAGIC>
-
-Invokes C<mg_set> on an SV if it has 'set' magic. This macro evaluates its
-argument more than once.
-
- void SvSETMAGIC(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvSetMagicSV
-X<SvSetMagicSV>
-
-Like C<SvSetSV>, but does any set magic required afterwards.
-
- void SvSetMagicSV(SV* dsb, SV* ssv)
-
-=for hackers
-Found in file sv.h
-
-=item SvSetMagicSV_nosteal
-X<SvSetMagicSV_nosteal>
-
-Like C<SvSetSV_nosteal>, but does any set magic required afterwards.
-
- void SvSetMagicSV_nosteal(SV* dsv, SV* ssv)
-
-=for hackers
-Found in file sv.h
-
-=item SvSetSV
-X<SvSetSV>
-
-Calls C<sv_setsv> if dsv is not the same as ssv. May evaluate arguments
-more than once.
-
- void SvSetSV(SV* dsb, SV* ssv)
-
-=for hackers
-Found in file sv.h
-
-=item SvSetSV_nosteal
-X<SvSetSV_nosteal>
-
-Calls a non-destructive version of C<sv_setsv> if dsv is not the same as
-ssv. May evaluate arguments more than once.
-
- void SvSetSV_nosteal(SV* dsv, SV* ssv)
-
-=for hackers
-Found in file sv.h
-
-=item SvSHARE
-X<SvSHARE>
-
-Arranges for sv to be shared between threads if a suitable module
-has been loaded.
-
- void SvSHARE(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvUNLOCK
-X<SvUNLOCK>
-
-Releases a mutual exclusion lock on sv if a suitable module
-has been loaded.
-
- void SvUNLOCK(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-
-=back
-
-=head1 Memory Management
-
-=over 8
-
-=item Copy
-X<Copy>
-
-The XSUB-writer's interface to the C C<memcpy> function. The C<src> is the
-source, C<dest> is the destination, C<nitems> is the number of items, and C<type> is
-the type. May fail on overlapping copies. See also C<Move>.
-
- void Copy(void* src, void* dest, int nitems, type)
-
-=for hackers
-Found in file handy.h
-
-=item CopyD
-X<CopyD>
-
-Like C<Copy> but returns dest. Useful for encouraging compilers to tail-call
-optimise.
-
- void * CopyD(void* src, void* dest, int nitems, type)
-
-=for hackers
-Found in file handy.h
-
-=item Move
-X<Move>
-
-The XSUB-writer's interface to the C C<memmove> function. The C<src> is the
-source, C<dest> is the destination, C<nitems> is the number of items, and C<type> is
-the type. Can do overlapping moves. See also C<Copy>.
-
- void Move(void* src, void* dest, int nitems, type)
-
-=for hackers
-Found in file handy.h
-
-=item MoveD
-X<MoveD>
-
-Like C<Move> but returns dest. Useful for encouraging compilers to tail-call
-optimise.
-
- void * MoveD(void* src, void* dest, int nitems, type)
-
-=for hackers
-Found in file handy.h
-
-=item Newx
-X<Newx>
-
-The XSUB-writer's interface to the C C<malloc> function.
-
-In 5.9.3, Newx() and friends replace the older New() API, and drops
-the first parameter, I<x>, a debug aid which allowed callers to identify
-themselves. This aid has been superseded by a new build option,
-PERL_MEM_LOG (see L<perlhack/PERL_MEM_LOG>). The older API is still
-there for use in XS modules supporting older perls.
-
- void Newx(void* ptr, int nitems, type)
-
-=for hackers
-Found in file handy.h
-
-=item Newxc
-X<Newxc>
-
-The XSUB-writer's interface to the C C<malloc> function, with
-cast. See also C<Newx>.
-
- void Newxc(void* ptr, int nitems, type, cast)
-
-=for hackers
-Found in file handy.h
-
-=item Newxz
-X<Newxz>
-
-The XSUB-writer's interface to the C C<malloc> function. The allocated
-memory is zeroed with C<memzero>. See also C<Newx>.
-
- void Newxz(void* ptr, int nitems, type)
-
-=for hackers
-Found in file handy.h
-
-=item Poison
-X<Poison>
-
-PoisonWith(0xEF) for catching access to freed memory.
-
- void Poison(void* dest, int nitems, type)
-
-=for hackers
-Found in file handy.h
-
-=item PoisonFree
-X<PoisonFree>
-
-PoisonWith(0xEF) for catching access to freed memory.
-
- void PoisonFree(void* dest, int nitems, type)
-
-=for hackers
-Found in file handy.h
-
-=item PoisonNew
-X<PoisonNew>
-
-PoisonWith(0xAB) for catching access to allocated but uninitialized memory.
-
- void PoisonNew(void* dest, int nitems, type)
-
-=for hackers
-Found in file handy.h
-
-=item PoisonWith
-X<PoisonWith>
-
-Fill up memory with a byte pattern (a byte repeated over and over
-again) that hopefully catches attempts to access uninitialized memory.
-
- void PoisonWith(void* dest, int nitems, type, U8 byte)
-
-=for hackers
-Found in file handy.h
-
-=item Renew
-X<Renew>
-
-The XSUB-writer's interface to the C C<realloc> function.
-
- void Renew(void* ptr, int nitems, type)
-
-=for hackers
-Found in file handy.h
-
-=item Renewc
-X<Renewc>
-
-The XSUB-writer's interface to the C C<realloc> function, with
-cast.
-
- void Renewc(void* ptr, int nitems, type, cast)
-
-=for hackers
-Found in file handy.h
-
-=item Safefree
-X<Safefree>
-
-The XSUB-writer's interface to the C C<free> function.
-
- void Safefree(void* ptr)
-
-=for hackers
-Found in file handy.h
-
-=item savepv
-X<savepv>
-
-Perl's version of C<strdup()>. Returns a pointer to a newly allocated
-string which is a duplicate of C<pv>. The size of the string is
-determined by C<strlen()>. The memory allocated for the new string can
-be freed with the C<Safefree()> function.
-
- char* savepv(const char* pv)
-
-=for hackers
-Found in file util.c
-
-=item savepvn
-X<savepvn>
-
-Perl's version of what C<strndup()> would be if it existed. Returns a
-pointer to a newly allocated string which is a duplicate of the first
-C<len> bytes from C<pv>, plus a trailing NUL byte. The memory allocated for
-the new string can be freed with the C<Safefree()> function.
-
- char* savepvn(const char* pv, I32 len)
-
-=for hackers
-Found in file util.c
-
-=item savepvs
-X<savepvs>
-
-Like C<savepvn>, but takes a literal string instead of a string/length pair.
-
- char* savepvs(const char* s)
-
-=for hackers
-Found in file handy.h
-
-=item savesharedpv
-X<savesharedpv>
-
-A version of C<savepv()> which allocates the duplicate string in memory
-which is shared between threads.
-
- char* savesharedpv(const char* pv)
-
-=for hackers
-Found in file util.c
-
-=item savesharedpvn
-X<savesharedpvn>
-
-A version of C<savepvn()> which allocates the duplicate string in memory
-which is shared between threads. (With the specific difference that a NULL
-pointer is not acceptable)
-
- char* savesharedpvn(const char *const pv, const STRLEN len)
-
-=for hackers
-Found in file util.c
-
-=item savesvpv
-X<savesvpv>
-
-A version of C<savepv()>/C<savepvn()> which gets the string to duplicate from
-the passed in SV using C<SvPV()>
-
- char* savesvpv(SV* sv)
-
-=for hackers
-Found in file util.c
-
-=item StructCopy
-X<StructCopy>
-
-This is an architecture-independent macro to copy one structure to another.
-
- void StructCopy(type src, type dest, type)
-
-=for hackers
-Found in file handy.h
-
-=item Zero
-X<Zero>
-
-The XSUB-writer's interface to the C C<memzero> function. The C<dest> is the
-destination, C<nitems> is the number of items, and C<type> is the type.
-
- void Zero(void* dest, int nitems, type)
-
-=for hackers
-Found in file handy.h
-
-=item ZeroD
-X<ZeroD>
-
-Like C<Zero> but returns dest. Useful for encouraging compilers to tail-call
-optimise.
-
- void * ZeroD(void* dest, int nitems, type)
-
-=for hackers
-Found in file handy.h
-
-
-=back
-
-=head1 Miscellaneous Functions
-
-=over 8
-
-=item fbm_compile
-X<fbm_compile>
-
-Analyses the string in order to make fast searches on it using fbm_instr()
--- the Boyer-Moore algorithm.
-
- void fbm_compile(SV* sv, U32 flags)
-
-=for hackers
-Found in file util.c
-
-=item fbm_instr
-X<fbm_instr>
-
-Returns the location of the SV in the string delimited by C<str> and
-C<strend>. It returns C<NULL> if the string can't be found. The C<sv>
-does not have to be fbm_compiled, but the search will not be as fast
-then.
-
- char* fbm_instr(unsigned char* big, unsigned char* bigend, SV* littlesv, U32 flags)
-
-=for hackers
-Found in file util.c
-
-=item form
-X<form>
-
-Takes a sprintf-style format pattern and conventional
-(non-SV) arguments and returns the formatted string.
-
- (char *) Perl_form(pTHX_ const char* pat, ...)
-
-can be used any place a string (char *) is required:
-
- char * s = Perl_form("%d.%d",major,minor);
-
-Uses a single private buffer so if you want to format several strings you
-must explicitly copy the earlier strings away (and free the copies when you
-are done).
-
- char* form(const char* pat, ...)
-
-=for hackers
-Found in file util.c
-
-=item getcwd_sv
-X<getcwd_sv>
-
-Fill the sv with current working directory
-
- int getcwd_sv(SV* sv)
-
-=for hackers
-Found in file util.c
-
-=item my_snprintf
-X<my_snprintf>
-
-The C library C<snprintf> functionality, if available and
-standards-compliant (uses C<vsnprintf>, actually). However, if the
-C<vsnprintf> is not available, will unfortunately use the unsafe
-C<vsprintf> which can overrun the buffer (there is an overrun check,
-but that may be too late). Consider using C<sv_vcatpvf> instead, or
-getting C<vsnprintf>.
-
- int my_snprintf(char *buffer, const Size_t len, const char *format, ...)
-
-=for hackers
-Found in file util.c
-
-=item my_sprintf
-X<my_sprintf>
-
-The C library C<sprintf>, wrapped if necessary, to ensure that it will return
-the length of the string written to the buffer. Only rare pre-ANSI systems
-need the wrapper function - usually this is a direct call to C<sprintf>.
-
- int my_sprintf(char *buffer, const char *pat, ...)
-
-=for hackers
-Found in file util.c
-
-=item my_vsnprintf
-X<my_vsnprintf>
-
-The C library C<vsnprintf> if available and standards-compliant.
-However, if if the C<vsnprintf> is not available, will unfortunately
-use the unsafe C<vsprintf> which can overrun the buffer (there is an
-overrun check, but that may be too late). Consider using
-C<sv_vcatpvf> instead, or getting C<vsnprintf>.
-
- int my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap)
-
-=for hackers
-Found in file util.c
-
-=item new_version
-X<new_version>
-
-Returns a new version object based on the passed in SV:
-
- SV *sv = new_version(SV *ver);
-
-Does not alter the passed in ver SV. See "upg_version" if you
-want to upgrade the SV.
-
- SV* new_version(SV *ver)
-
-=for hackers
-Found in file util.c
-
-=item scan_version
-X<scan_version>
-
-Returns a pointer to the next character after the parsed
-version string, as well as upgrading the passed in SV to
-an RV.
-
-Function must be called with an already existing SV like
-
- sv = newSV(0);
- s = scan_version(s, SV *sv, bool qv);
-
-Performs some preprocessing to the string to ensure that
-it has the correct characteristics of a version. Flags the
-object if it contains an underscore (which denotes this
-is an alpha version). The boolean qv denotes that the version
-should be interpreted as if it had multiple decimals, even if
-it doesn't.
-
- const char* scan_version(const char *vstr, SV *sv, bool qv)
-
-=for hackers
-Found in file util.c
-
-=item strEQ
-X<strEQ>
-
-Test two strings to see if they are equal. Returns true or false.
-
- bool strEQ(char* s1, char* s2)
-
-=for hackers
-Found in file handy.h
-
-=item strGE
-X<strGE>
-
-Test two strings to see if the first, C<s1>, is greater than or equal to
-the second, C<s2>. Returns true or false.
-
- bool strGE(char* s1, char* s2)
-
-=for hackers
-Found in file handy.h
-
-=item strGT
-X<strGT>
-
-Test two strings to see if the first, C<s1>, is greater than the second,
-C<s2>. Returns true or false.
-
- bool strGT(char* s1, char* s2)
-
-=for hackers
-Found in file handy.h
-
-=item strLE
-X<strLE>
-
-Test two strings to see if the first, C<s1>, is less than or equal to the
-second, C<s2>. Returns true or false.
-
- bool strLE(char* s1, char* s2)
-
-=for hackers
-Found in file handy.h
-
-=item strLT
-X<strLT>
-
-Test two strings to see if the first, C<s1>, is less than the second,
-C<s2>. Returns true or false.
-
- bool strLT(char* s1, char* s2)
-
-=for hackers
-Found in file handy.h
-
-=item strNE
-X<strNE>
-
-Test two strings to see if they are different. Returns true or
-false.
-
- bool strNE(char* s1, char* s2)
-
-=for hackers
-Found in file handy.h
-
-=item strnEQ
-X<strnEQ>
-
-Test two strings to see if they are equal. The C<len> parameter indicates
-the number of bytes to compare. Returns true or false. (A wrapper for
-C<strncmp>).
-
- bool strnEQ(char* s1, char* s2, STRLEN len)
-
-=for hackers
-Found in file handy.h
-
-=item strnNE
-X<strnNE>
-
-Test two strings to see if they are different. The C<len> parameter
-indicates the number of bytes to compare. Returns true or false. (A
-wrapper for C<strncmp>).
-
- bool strnNE(char* s1, char* s2, STRLEN len)
-
-=for hackers
-Found in file handy.h
-
-=item sv_destroyable
-X<sv_destroyable>
-
-Dummy routine which reports that object can be destroyed when there is no
-sharing module present. It ignores its single SV argument, and returns
-'true'. Exists to avoid test for a NULL function pointer and because it
-could potentially warn under some level of strict-ness.
-
- bool sv_destroyable(SV *sv)
-
-=for hackers
-Found in file util.c
-
-=item sv_nosharing
-X<sv_nosharing>
-
-Dummy routine which "shares" an SV when there is no sharing module present.
-Or "locks" it. Or "unlocks" it. In other words, ignores its single SV argument.
-Exists to avoid test for a NULL function pointer and because it could
-potentially warn under some level of strict-ness.
-
- void sv_nosharing(SV *sv)
-
-=for hackers
-Found in file util.c
-
-=item upg_version
-X<upg_version>
-
-In-place upgrade of the supplied SV to a version object.
-
- SV *sv = upg_version(SV *sv, bool qv);
-
-Returns a pointer to the upgraded SV. Set the boolean qv if you want
-to force this SV to be interpreted as an "extended" version.
-
- SV* upg_version(SV *ver, bool qv)
-
-=for hackers
-Found in file util.c
-
-=item vcmp
-X<vcmp>
-
-Version object aware cmp. Both operands must already have been
-converted into version objects.
-
- int vcmp(SV *lvs, SV *rvs)
-
-=for hackers
-Found in file util.c
-
-=item vnormal
-X<vnormal>
-
-Accepts a version object and returns the normalized string
-representation. Call like:
-
- sv = vnormal(rv);
-
-NOTE: you can pass either the object directly or the SV
-contained within the RV.
-
- SV* vnormal(SV *vs)
-
-=for hackers
-Found in file util.c
-
-=item vnumify
-X<vnumify>
-
-Accepts a version object and returns the normalized floating
-point representation. Call like:
-
- sv = vnumify(rv);
-
-NOTE: you can pass either the object directly or the SV
-contained within the RV.
-
- SV* vnumify(SV *vs)
-
-=for hackers
-Found in file util.c
-
-=item vstringify
-X<vstringify>
-
-In order to maintain maximum compatibility with earlier versions
-of Perl, this function will return either the floating point
-notation or the multiple dotted notation, depending on whether
-the original version contained 1 or more dots, respectively
-
- SV* vstringify(SV *vs)
-
-=for hackers
-Found in file util.c
-
-=item vverify
-X<vverify>
-
-Validates that the SV contains a valid version object.
-
- bool vverify(SV *vobj);
-
-Note that it only confirms the bare minimum structure (so as not to get
-confused by derived classes which may contain additional hash entries):
-
- bool vverify(SV *vs)
-
-=for hackers
-Found in file util.c
-
-
-=back
-
-=head1 MRO Functions
-
-=over 8
-
-=item mro_get_linear_isa
-X<mro_get_linear_isa>
-
-Returns either C<mro_get_linear_isa_c3> or
-C<mro_get_linear_isa_dfs> for the given stash,
-dependant upon which MRO is in effect
-for that stash. The return value is a
-read-only AV*.
-
-You are responsible for C<SvREFCNT_inc()> on the
-return value if you plan to store it anywhere
-semi-permanently (otherwise it might be deleted
-out from under you the next time the cache is
-invalidated).
-
- AV* mro_get_linear_isa(HV* stash)
-
-=for hackers
-Found in file mro.c
-
-=item mro_method_changed_in
-X<mro_method_changed_in>
-
-Invalidates method caching on any child classes
-of the given stash, so that they might notice
-the changes in this one.
-
-Ideally, all instances of C<PL_sub_generation++> in
-perl source outside of C<mro.c> should be
-replaced by calls to this.
-
-Perl automatically handles most of the common
-ways a method might be redefined. However, there
-are a few ways you could change a method in a stash
-without the cache code noticing, in which case you
-need to call this method afterwards:
-
-1) Directly manipulating the stash HV entries from
-XS code.
-
-2) Assigning a reference to a readonly scalar
-constant into a stash entry in order to create
-a constant subroutine (like constant.pm
-does).
-
-This same method is available from pure perl
-via, C<mro::method_changed_in(classname)>.
-
- void mro_method_changed_in(HV* stash)
-
-=for hackers
-Found in file mro.c
-
-
-=back
-
-=head1 Multicall Functions
-
-=over 8
-
-=item dMULTICALL
-X<dMULTICALL>
-
-Declare local variables for a multicall. See L<perlcall/Lightweight Callbacks>.
-
- dMULTICALL;
-
-=for hackers
-Found in file cop.h
-
-=item MULTICALL
-X<MULTICALL>
-
-Make a lightweight callback. See L<perlcall/Lightweight Callbacks>.
-
- MULTICALL;
-
-=for hackers
-Found in file cop.h
-
-=item POP_MULTICALL
-X<POP_MULTICALL>
-
-Closing bracket for a lightweight callback.
-See L<perlcall/Lightweight Callbacks>.
-
- POP_MULTICALL;
-
-=for hackers
-Found in file cop.h
-
-=item PUSH_MULTICALL
-X<PUSH_MULTICALL>
-
-Opening bracket for a lightweight callback.
-See L<perlcall/Lightweight Callbacks>.
-
- PUSH_MULTICALL;
-
-=for hackers
-Found in file cop.h
-
-
-=back
-
-=head1 Numeric functions
-
-=over 8
-
-=item grok_bin
-X<grok_bin>
-
-converts a string representing a binary number to numeric form.
-
-On entry I<start> and I<*len> give the string to scan, I<*flags> gives
-conversion flags, and I<result> should be NULL or a pointer to an NV.
-The scan stops at the end of the string, or the first invalid character.
-Unless C<PERL_SCAN_SILENT_ILLDIGIT> is set in I<*flags>, encountering an
-invalid character will also trigger a warning.
-On return I<*len> is set to the length of the scanned string,
-and I<*flags> gives output flags.
-
-If the value is <= C<UV_MAX> it is returned as a UV, the output flags are clear,
-and nothing is written to I<*result>. If the value is > UV_MAX C<grok_bin>
-returns UV_MAX, sets C<PERL_SCAN_GREATER_THAN_UV_MAX> in the output flags,
-and writes the value to I<*result> (or the value is discarded if I<result>
-is NULL).
-
-The binary number may optionally be prefixed with "0b" or "b" unless
-C<PERL_SCAN_DISALLOW_PREFIX> is set in I<*flags> on entry. If
-C<PERL_SCAN_ALLOW_UNDERSCORES> is set in I<*flags> then the binary
-number may use '_' characters to separate digits.
-
- UV grok_bin(const char* start, STRLEN* len_p, I32* flags, NV *result)
-
-=for hackers
-Found in file numeric.c
-
-=item grok_hex
-X<grok_hex>
-
-converts a string representing a hex number to numeric form.
-
-On entry I<start> and I<*len> give the string to scan, I<*flags> gives
-conversion flags, and I<result> should be NULL or a pointer to an NV.
-The scan stops at the end of the string, or the first invalid character.
-Unless C<PERL_SCAN_SILENT_ILLDIGIT> is set in I<*flags>, encountering an
-invalid character will also trigger a warning.
-On return I<*len> is set to the length of the scanned string,
-and I<*flags> gives output flags.
-
-If the value is <= UV_MAX it is returned as a UV, the output flags are clear,
-and nothing is written to I<*result>. If the value is > UV_MAX C<grok_hex>
-returns UV_MAX, sets C<PERL_SCAN_GREATER_THAN_UV_MAX> in the output flags,
-and writes the value to I<*result> (or the value is discarded if I<result>
-is NULL).
-
-The hex number may optionally be prefixed with "0x" or "x" unless
-C<PERL_SCAN_DISALLOW_PREFIX> is set in I<*flags> on entry. If
-C<PERL_SCAN_ALLOW_UNDERSCORES> is set in I<*flags> then the hex
-number may use '_' characters to separate digits.
-
- UV grok_hex(const char* start, STRLEN* len_p, I32* flags, NV *result)
-
-=for hackers
-Found in file numeric.c
-
-=item grok_number
-X<grok_number>
-
-Recognise (or not) a number. The type of the number is returned
-(0 if unrecognised), otherwise it is a bit-ORed combination of
-IS_NUMBER_IN_UV, IS_NUMBER_GREATER_THAN_UV_MAX, IS_NUMBER_NOT_INT,
-IS_NUMBER_NEG, IS_NUMBER_INFINITY, IS_NUMBER_NAN (defined in perl.h).
-
-If the value of the number can fit an in UV, it is returned in the *valuep
-IS_NUMBER_IN_UV will be set to indicate that *valuep is valid, IS_NUMBER_IN_UV
-will never be set unless *valuep is valid, but *valuep may have been assigned
-to during processing even though IS_NUMBER_IN_UV is not set on return.
-If valuep is NULL, IS_NUMBER_IN_UV will be set for the same cases as when
-valuep is non-NULL, but no actual assignment (or SEGV) will occur.
-
-IS_NUMBER_NOT_INT will be set with IS_NUMBER_IN_UV if trailing decimals were
-seen (in which case *valuep gives the true value truncated to an integer), and
-IS_NUMBER_NEG if the number is negative (in which case *valuep holds the
-absolute value). IS_NUMBER_IN_UV is not set if e notation was used or the
-number is larger than a UV.
-
- int grok_number(const char *pv, STRLEN len, UV *valuep)
-
-=for hackers
-Found in file numeric.c
-
-=item grok_numeric_radix
-X<grok_numeric_radix>
-
-Scan and skip for a numeric decimal separator (radix).
-
- bool grok_numeric_radix(const char **sp, const char *send)
-
-=for hackers
-Found in file numeric.c
-
-=item grok_oct
-X<grok_oct>
-
-converts a string representing an octal number to numeric form.
-
-On entry I<start> and I<*len> give the string to scan, I<*flags> gives
-conversion flags, and I<result> should be NULL or a pointer to an NV.
-The scan stops at the end of the string, or the first invalid character.
-Unless C<PERL_SCAN_SILENT_ILLDIGIT> is set in I<*flags>, encountering an
-invalid character will also trigger a warning.
-On return I<*len> is set to the length of the scanned string,
-and I<*flags> gives output flags.
-
-If the value is <= UV_MAX it is returned as a UV, the output flags are clear,
-and nothing is written to I<*result>. If the value is > UV_MAX C<grok_oct>
-returns UV_MAX, sets C<PERL_SCAN_GREATER_THAN_UV_MAX> in the output flags,
-and writes the value to I<*result> (or the value is discarded if I<result>
-is NULL).
-
-If C<PERL_SCAN_ALLOW_UNDERSCORES> is set in I<*flags> then the octal
-number may use '_' characters to separate digits.
-
- UV grok_oct(const char* start, STRLEN* len_p, I32* flags, NV *result)
-
-=for hackers
-Found in file numeric.c
-
-=item Perl_signbit
-X<Perl_signbit>
-
-Return a non-zero integer if the sign bit on an NV is set, and 0 if
-it is not.
-
-If Configure detects this system has a signbit() that will work with
-our NVs, then we just use it via the #define in perl.h. Otherwise,
-fall back on this implementation. As a first pass, this gets everything
-right except -0.0. Alas, catching -0.0 is the main use for this function,
-so this is not too helpful yet. Still, at least we have the scaffolding
-in place to support other systems, should that prove useful.
-
-
-Configure notes: This function is called 'Perl_signbit' instead of a
-plain 'signbit' because it is easy to imagine a system having a signbit()
-function or macro that doesn't happen to work with our particular choice
-of NVs. We shouldn't just re-#define signbit as Perl_signbit and expect
-the standard system headers to be happy. Also, this is a no-context
-function (no pTHX_) because Perl_signbit() is usually re-#defined in
-perl.h as a simple macro call to the system's signbit().
-Users should just always call Perl_signbit().
-
-NOTE: this function is experimental and may change or be
-removed without notice.
-
- int Perl_signbit(NV f)
-
-=for hackers
-Found in file numeric.c
-
-=item scan_bin
-X<scan_bin>
-
-For backwards compatibility. Use C<grok_bin> instead.
-
- NV scan_bin(const char* start, STRLEN len, STRLEN* retlen)
-
-=for hackers
-Found in file numeric.c
-
-=item scan_hex
-X<scan_hex>
-
-For backwards compatibility. Use C<grok_hex> instead.
-
- NV scan_hex(const char* start, STRLEN len, STRLEN* retlen)
-
-=for hackers
-Found in file numeric.c
-
-=item scan_oct
-X<scan_oct>
-
-For backwards compatibility. Use C<grok_oct> instead.
-
- NV scan_oct(const char* start, STRLEN len, STRLEN* retlen)
-
-=for hackers
-Found in file numeric.c
-
-
-=back
-
-=head1 Optree Manipulation Functions
-
-=over 8
-
-=item cv_const_sv
-X<cv_const_sv>
-
-If C<cv> is a constant sub eligible for inlining. returns the constant
-value returned by the sub. Otherwise, returns NULL.
-
-Constant subs can be created with C<newCONSTSUB> or as described in
-L<perlsub/"Constant Functions">.
-
- SV* cv_const_sv(CV* cv)
-
-=for hackers
-Found in file op.c
-
-=item newCONSTSUB
-X<newCONSTSUB>
-
-Creates a constant sub equivalent to Perl C<sub FOO () { 123 }> which is
-eligible for inlining at compile-time.
-
- CV* newCONSTSUB(HV* stash, const char* name, SV* sv)
-
-=for hackers
-Found in file op.c
-
-=item newXS
-X<newXS>
-
-Used by C<xsubpp> to hook up XSUBs as Perl subs. I<filename> needs to be
-static storage, as it is used directly as CvFILE(), without a copy being made.
-
-=for hackers
-Found in file op.c
-
-
-=back
-
-=head1 Pad Data Structures
-
-=over 8
-
-=item pad_sv
-X<pad_sv>
-
-Get the value at offset po in the current pad.
-Use macro PAD_SV instead of calling this function directly.
-
- SV* pad_sv(PADOFFSET po)
-
-=for hackers
-Found in file pad.c
-
-
-=back
-
-=head1 Per-Interpreter Variables
-
-=over 8
-
-=item PL_modglobal
-X<PL_modglobal>
-
-C<PL_modglobal> is a general purpose, interpreter global HV for use by
-extensions that need to keep information on a per-interpreter basis.
-In a pinch, it can also be used as a symbol table for extensions
-to share data among each other. It is a good idea to use keys
-prefixed by the package name of the extension that owns the data.
-
- HV* PL_modglobal
-
-=for hackers
-Found in file intrpvar.h
-
-=item PL_na
-X<PL_na>
-
-A convenience variable which is typically used with C<SvPV> when one
-doesn't care about the length of the string. It is usually more efficient
-to either declare a local variable and use that instead or to use the
-C<SvPV_nolen> macro.
-
- STRLEN PL_na
-
-=for hackers
-Found in file intrpvar.h
-
-=item PL_sv_no
-X<PL_sv_no>
-
-This is the C<false> SV. See C<PL_sv_yes>. Always refer to this as
-C<&PL_sv_no>.
-
- SV PL_sv_no
-
-=for hackers
-Found in file intrpvar.h
-
-=item PL_sv_undef
-X<PL_sv_undef>
-
-This is the C<undef> SV. Always refer to this as C<&PL_sv_undef>.
-
- SV PL_sv_undef
-
-=for hackers
-Found in file intrpvar.h
-
-=item PL_sv_yes
-X<PL_sv_yes>
-
-This is the C<true> SV. See C<PL_sv_no>. Always refer to this as
-C<&PL_sv_yes>.
-
- SV PL_sv_yes
-
-=for hackers
-Found in file intrpvar.h
-
-
-=back
-
-=head1 REGEXP Functions
-
-=over 8
-
-=item SvRX
-X<SvRX>
-
-Convenience macro to get the REGEXP from a SV. This is approximately
-equivalent to the following snippet:
-
- if (SvMAGICAL(sv))
- mg_get(sv);
- if (SvROK(sv) &&
- (tmpsv = (SV*)SvRV(sv)) &&
- SvTYPE(tmpsv) == SVt_PVMG &&
- (tmpmg = mg_find(tmpsv, PERL_MAGIC_qr)))
- {
- return (REGEXP *)tmpmg->mg_obj;
- }
-
-NULL will be returned if a REGEXP* is not found.
-
- REGEXP * SvRX(SV *sv)
-
-=for hackers
-Found in file regexp.h
-
-=item SvRXOK
-X<SvRXOK>
-
-Returns a boolean indicating whether the SV contains qr magic
-(PERL_MAGIC_qr).
-
-If you want to do something with the REGEXP* later use SvRX instead
-and check for NULL.
-
- bool SvRXOK(SV* sv)
-
-=for hackers
-Found in file regexp.h
-
-
-=back
-
-=head1 Simple Exception Handling Macros
-
-=over 8
-
-=item dXCPT
-X<dXCPT>
-
-Set up necessary local variables for exception handling.
-See L<perlguts/"Exception Handling">.
-
- dXCPT;
-
-=for hackers
-Found in file XSUB.h
-
-=item XCPT_CATCH
-X<XCPT_CATCH>
-
-Introduces a catch block. See L<perlguts/"Exception Handling">.
-
-=for hackers
-Found in file XSUB.h
-
-=item XCPT_RETHROW
-X<XCPT_RETHROW>
-
-Rethrows a previously caught exception. See L<perlguts/"Exception Handling">.
-
- XCPT_RETHROW;
-
-=for hackers
-Found in file XSUB.h
-
-=item XCPT_TRY_END
-X<XCPT_TRY_END>
-
-Ends a try block. See L<perlguts/"Exception Handling">.
-
-=for hackers
-Found in file XSUB.h
-
-=item XCPT_TRY_START
-X<XCPT_TRY_START>
-
-Starts a try block. See L<perlguts/"Exception Handling">.
-
-=for hackers
-Found in file XSUB.h
-
-
-=back
-
-=head1 Stack Manipulation Macros
-
-=over 8
-
-=item dMARK
-X<dMARK>
-
-Declare a stack marker variable, C<mark>, for the XSUB. See C<MARK> and
-C<dORIGMARK>.
-
- dMARK;
-
-=for hackers
-Found in file pp.h
-
-=item dORIGMARK
-X<dORIGMARK>
-
-Saves the original stack mark for the XSUB. See C<ORIGMARK>.
-
- dORIGMARK;
-
-=for hackers
-Found in file pp.h
-
-=item dSP
-X<dSP>
-
-Declares a local copy of perl's stack pointer for the XSUB, available via
-the C<SP> macro. See C<SP>.
-
- dSP;
-
-=for hackers
-Found in file pp.h
-
-=item EXTEND
-X<EXTEND>
-
-Used to extend the argument stack for an XSUB's return values. Once
-used, guarantees that there is room for at least C<nitems> to be pushed
-onto the stack.
-
- void EXTEND(SP, int nitems)
-
-=for hackers
-Found in file pp.h
-
-=item MARK
-X<MARK>
-
-Stack marker variable for the XSUB. See C<dMARK>.
-
-=for hackers
-Found in file pp.h
-
-=item mPUSHi
-X<mPUSHi>
-
-Push an integer onto the stack. The stack must have room for this element.
-Handles 'set' magic. Does not use C<TARG>. See also C<PUSHi>, C<mXPUSHi>
-and C<XPUSHi>.
-
- void mPUSHi(IV iv)
-
-=for hackers
-Found in file pp.h
-
-=item mPUSHn
-X<mPUSHn>
-
-Push a double onto the stack. The stack must have room for this element.
-Handles 'set' magic. Does not use C<TARG>. See also C<PUSHn>, C<mXPUSHn>
-and C<XPUSHn>.
-
- void mPUSHn(NV nv)
-
-=for hackers
-Found in file pp.h
-
-=item mPUSHp
-X<mPUSHp>
-
-Push a string onto the stack. The stack must have room for this element.
-The C<len> indicates the length of the string. Handles 'set' magic. Does
-not use C<TARG>. See also C<PUSHp>, C<mXPUSHp> and C<XPUSHp>.
-
- void mPUSHp(char* str, STRLEN len)
-
-=for hackers
-Found in file pp.h
-
-=item mPUSHu
-X<mPUSHu>
-
-Push an unsigned integer onto the stack. The stack must have room for this
-element. Handles 'set' magic. Does not use C<TARG>. See also C<PUSHu>,
-C<mXPUSHu> and C<XPUSHu>.
-
- void mPUSHu(UV uv)
-
-=for hackers
-Found in file pp.h
-
-=item mXPUSHi
-X<mXPUSHi>
-
-Push an integer onto the stack, extending the stack if necessary. Handles
-'set' magic. Does not use C<TARG>. See also C<XPUSHi>, C<mPUSHi> and
-C<PUSHi>.
-
- void mXPUSHi(IV iv)
-
-=for hackers
-Found in file pp.h
-
-=item mXPUSHn
-X<mXPUSHn>
-
-Push a double onto the stack, extending the stack if necessary. Handles
-'set' magic. Does not use C<TARG>. See also C<XPUSHn>, C<mPUSHn> and
-C<PUSHn>.
-
- void mXPUSHn(NV nv)
-
-=for hackers
-Found in file pp.h
-
-=item mXPUSHp
-X<mXPUSHp>
-
-Push a string onto the stack, extending the stack if necessary. The C<len>
-indicates the length of the string. Handles 'set' magic. Does not use
-C<TARG>. See also C<XPUSHp>, C<mPUSHp> and C<PUSHp>.
-
- void mXPUSHp(char* str, STRLEN len)
-
-=for hackers
-Found in file pp.h
-
-=item mXPUSHu
-X<mXPUSHu>
-
-Push an unsigned integer onto the stack, extending the stack if necessary.
-Handles 'set' magic. Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu>
-and C<PUSHu>.
-
- void mXPUSHu(UV uv)
-
-=for hackers
-Found in file pp.h
-
-=item ORIGMARK
-X<ORIGMARK>
-
-The original stack mark for the XSUB. See C<dORIGMARK>.
-
-=for hackers
-Found in file pp.h
-
-=item POPi
-X<POPi>
-
-Pops an integer off the stack.
-
- IV POPi
-
-=for hackers
-Found in file pp.h
-
-=item POPl
-X<POPl>
-
-Pops a long off the stack.
-
- long POPl
-
-=for hackers
-Found in file pp.h
-
-=item POPn
-X<POPn>
-
-Pops a double off the stack.
-
- NV POPn
-
-=for hackers
-Found in file pp.h
-
-=item POPp
-X<POPp>
-
-Pops a string off the stack. Deprecated. New code should use POPpx.
-
- char* POPp
-
-=for hackers
-Found in file pp.h
-
-=item POPpbytex
-X<POPpbytex>
-
-Pops a string off the stack which must consist of bytes i.e. characters < 256.
-
- char* POPpbytex
-
-=for hackers
-Found in file pp.h
-
-=item POPpx
-X<POPpx>
-
-Pops a string off the stack.
-
- char* POPpx
-
-=for hackers
-Found in file pp.h
-
-=item POPs
-X<POPs>
-
-Pops an SV off the stack.
-
- SV* POPs
-
-=for hackers
-Found in file pp.h
-
-=item PUSHi
-X<PUSHi>
-
-Push an integer onto the stack. The stack must have room for this element.
-Handles 'set' magic. Uses C<TARG>, so C<dTARGET> or C<dXSTARG> should be
-called to declare it. Do not call multiple C<TARG>-oriented macros to
-return lists from XSUB's - see C<mPUSHi> instead. See also C<XPUSHi> and
-C<mXPUSHi>.
-
- void PUSHi(IV iv)
-
-=for hackers
-Found in file pp.h
-
-=item PUSHMARK
-X<PUSHMARK>
-
-Opening bracket for arguments on a callback. See C<PUTBACK> and
-L<perlcall>.
-
- void PUSHMARK(SP)
-
-=for hackers
-Found in file pp.h
-
-=item PUSHmortal
-X<PUSHmortal>
-
-Push a new mortal SV onto the stack. The stack must have room for this
-element. Does not handle 'set' magic. Does not use C<TARG>. See also
-C<PUSHs>, C<XPUSHmortal> and C<XPUSHs>.
-
- void PUSHmortal()
-
-=for hackers
-Found in file pp.h
-
-=item PUSHn
-X<PUSHn>
-
-Push a double onto the stack. The stack must have room for this element.
-Handles 'set' magic. Uses C<TARG>, so C<dTARGET> or C<dXSTARG> should be
-called to declare it. Do not call multiple C<TARG>-oriented macros to
-return lists from XSUB's - see C<mPUSHn> instead. See also C<XPUSHn> and
-C<mXPUSHn>.
-
- void PUSHn(NV nv)
-
-=for hackers
-Found in file pp.h
-
-=item PUSHp
-X<PUSHp>
-
-Push a string onto the stack. The stack must have room for this element.
-The C<len> indicates the length of the string. Handles 'set' magic. Uses
-C<TARG>, so C<dTARGET> or C<dXSTARG> should be called to declare it. Do not
-call multiple C<TARG>-oriented macros to return lists from XSUB's - see
-C<mPUSHp> instead. See also C<XPUSHp> and C<mXPUSHp>.
-
- void PUSHp(char* str, STRLEN len)
-
-=for hackers
-Found in file pp.h
-
-=item PUSHs
-X<PUSHs>
-
-Push an SV onto the stack. The stack must have room for this element.
-Does not handle 'set' magic. Does not use C<TARG>. See also C<PUSHmortal>,
-C<XPUSHs> and C<XPUSHmortal>.
-
- void PUSHs(SV* sv)
-
-=for hackers
-Found in file pp.h
-
-=item PUSHu
-X<PUSHu>
-
-Push an unsigned integer onto the stack. The stack must have room for this
-element. Handles 'set' magic. Uses C<TARG>, so C<dTARGET> or C<dXSTARG>
-should be called to declare it. Do not call multiple C<TARG>-oriented
-macros to return lists from XSUB's - see C<mPUSHu> instead. See also
-C<XPUSHu> and C<mXPUSHu>.
-
- void PUSHu(UV uv)
-
-=for hackers
-Found in file pp.h
-
-=item PUTBACK
-X<PUTBACK>
-
-Closing bracket for XSUB arguments. This is usually handled by C<xsubpp>.
-See C<PUSHMARK> and L<perlcall> for other uses.
-
- PUTBACK;
-
-=for hackers
-Found in file pp.h
-
-=item SP
-X<SP>
-
-Stack pointer. This is usually handled by C<xsubpp>. See C<dSP> and
-C<SPAGAIN>.
-
-=for hackers
-Found in file pp.h
-
-=item SPAGAIN
-X<SPAGAIN>
-
-Refetch the stack pointer. Used after a callback. See L<perlcall>.
-
- SPAGAIN;
-
-=for hackers
-Found in file pp.h
-
-=item XPUSHi
-X<XPUSHi>
-
-Push an integer onto the stack, extending the stack if necessary. Handles
-'set' magic. Uses C<TARG>, so C<dTARGET> or C<dXSTARG> should be called to
-declare it. Do not call multiple C<TARG>-oriented macros to return lists
-from XSUB's - see C<mXPUSHi> instead. See also C<PUSHi> and C<mPUSHi>.
-
- void XPUSHi(IV iv)
-
-=for hackers
-Found in file pp.h
-
-=item XPUSHmortal
-X<XPUSHmortal>
-
-Push a new mortal SV onto the stack, extending the stack if necessary. Does
-not handle 'set' magic. Does not use C<TARG>. See also C<XPUSHs>,
-C<PUSHmortal> and C<PUSHs>.
-
- void XPUSHmortal()
-
-=for hackers
-Found in file pp.h
-
-=item XPUSHn
-X<XPUSHn>
-
-Push a double onto the stack, extending the stack if necessary. Handles
-'set' magic. Uses C<TARG>, so C<dTARGET> or C<dXSTARG> should be called to
-declare it. Do not call multiple C<TARG>-oriented macros to return lists
-from XSUB's - see C<mXPUSHn> instead. See also C<PUSHn> and C<mPUSHn>.
-
- void XPUSHn(NV nv)
-
-=for hackers
-Found in file pp.h
-
-=item XPUSHp
-X<XPUSHp>
-
-Push a string onto the stack, extending the stack if necessary. The C<len>
-indicates the length of the string. Handles 'set' magic. Uses C<TARG>, so
-C<dTARGET> or C<dXSTARG> should be called to declare it. Do not call
-multiple C<TARG>-oriented macros to return lists from XSUB's - see
-C<mXPUSHp> instead. See also C<PUSHp> and C<mPUSHp>.
-
- void XPUSHp(char* str, STRLEN len)
-
-=for hackers
-Found in file pp.h
-
-=item XPUSHs
-X<XPUSHs>
-
-Push an SV onto the stack, extending the stack if necessary. Does not
-handle 'set' magic. Does not use C<TARG>. See also C<XPUSHmortal>,
-C<PUSHs> and C<PUSHmortal>.
-
- void XPUSHs(SV* sv)
-
-=for hackers
-Found in file pp.h
-
-=item XPUSHu
-X<XPUSHu>
-
-Push an unsigned integer onto the stack, extending the stack if necessary.
-Handles 'set' magic. Uses C<TARG>, so C<dTARGET> or C<dXSTARG> should be
-called to declare it. Do not call multiple C<TARG>-oriented macros to
-return lists from XSUB's - see C<mXPUSHu> instead. See also C<PUSHu> and
-C<mPUSHu>.
-
- void XPUSHu(UV uv)
-
-=for hackers
-Found in file pp.h
-
-=item XSRETURN
-X<XSRETURN>
-
-Return from XSUB, indicating number of items on the stack. This is usually
-handled by C<xsubpp>.
-
- void XSRETURN(int nitems)
-
-=for hackers
-Found in file XSUB.h
-
-=item XSRETURN_EMPTY
-X<XSRETURN_EMPTY>
-
-Return an empty list from an XSUB immediately.
-
- XSRETURN_EMPTY;
-
-=for hackers
-Found in file XSUB.h
-
-=item XSRETURN_IV
-X<XSRETURN_IV>
-
-Return an integer from an XSUB immediately. Uses C<XST_mIV>.
-
- void XSRETURN_IV(IV iv)
-
-=for hackers
-Found in file XSUB.h
-
-=item XSRETURN_NO
-X<XSRETURN_NO>
-
-Return C<&PL_sv_no> from an XSUB immediately. Uses C<XST_mNO>.
-
- XSRETURN_NO;
-
-=for hackers
-Found in file XSUB.h
-
-=item XSRETURN_NV
-X<XSRETURN_NV>
-
-Return a double from an XSUB immediately. Uses C<XST_mNV>.
-
- void XSRETURN_NV(NV nv)
-
-=for hackers
-Found in file XSUB.h
-
-=item XSRETURN_PV
-X<XSRETURN_PV>
-
-Return a copy of a string from an XSUB immediately. Uses C<XST_mPV>.
-
- void XSRETURN_PV(char* str)
-
-=for hackers
-Found in file XSUB.h
-
-=item XSRETURN_UNDEF
-X<XSRETURN_UNDEF>
-
-Return C<&PL_sv_undef> from an XSUB immediately. Uses C<XST_mUNDEF>.
-
- XSRETURN_UNDEF;
-
-=for hackers
-Found in file XSUB.h
-
-=item XSRETURN_UV
-X<XSRETURN_UV>
-
-Return an integer from an XSUB immediately. Uses C<XST_mUV>.
-
- void XSRETURN_UV(IV uv)
-
-=for hackers
-Found in file XSUB.h
-
-=item XSRETURN_YES
-X<XSRETURN_YES>
-
-Return C<&PL_sv_yes> from an XSUB immediately. Uses C<XST_mYES>.
-
- XSRETURN_YES;
-
-=for hackers
-Found in file XSUB.h
-
-=item XST_mIV
-X<XST_mIV>
-
-Place an integer into the specified position C<pos> on the stack. The
-value is stored in a new mortal SV.
-
- void XST_mIV(int pos, IV iv)
-
-=for hackers
-Found in file XSUB.h
-
-=item XST_mNO
-X<XST_mNO>
-
-Place C<&PL_sv_no> into the specified position C<pos> on the
-stack.
-
- void XST_mNO(int pos)
-
-=for hackers
-Found in file XSUB.h
-
-=item XST_mNV
-X<XST_mNV>
-
-Place a double into the specified position C<pos> on the stack. The value
-is stored in a new mortal SV.
-
- void XST_mNV(int pos, NV nv)
-
-=for hackers
-Found in file XSUB.h
-
-=item XST_mPV
-X<XST_mPV>
-
-Place a copy of a string into the specified position C<pos> on the stack.
-The value is stored in a new mortal SV.
-
- void XST_mPV(int pos, char* str)
-
-=for hackers
-Found in file XSUB.h
-
-=item XST_mUNDEF
-X<XST_mUNDEF>
-
-Place C<&PL_sv_undef> into the specified position C<pos> on the
-stack.
-
- void XST_mUNDEF(int pos)
-
-=for hackers
-Found in file XSUB.h
-
-=item XST_mYES
-X<XST_mYES>
-
-Place C<&PL_sv_yes> into the specified position C<pos> on the
-stack.
-
- void XST_mYES(int pos)
-
-=for hackers
-Found in file XSUB.h
-
-
-=back
-
-=head1 SV Flags
-
-=over 8
-
-=item svtype
-X<svtype>
-
-An enum of flags for Perl types. These are found in the file B<sv.h>
-in the C<svtype> enum. Test these flags with the C<SvTYPE> macro.
-
-=for hackers
-Found in file sv.h
-
-=item SVt_IV
-X<SVt_IV>
-
-Integer type flag for scalars. See C<svtype>.
-
-=for hackers
-Found in file sv.h
-
-=item SVt_NV
-X<SVt_NV>
-
-Double type flag for scalars. See C<svtype>.
-
-=for hackers
-Found in file sv.h
-
-=item SVt_PV
-X<SVt_PV>
-
-Pointer type flag for scalars. See C<svtype>.
-
-=for hackers
-Found in file sv.h
-
-=item SVt_PVAV
-X<SVt_PVAV>
-
-Type flag for arrays. See C<svtype>.
-
-=for hackers
-Found in file sv.h
-
-=item SVt_PVCV
-X<SVt_PVCV>
-
-Type flag for code refs. See C<svtype>.
-
-=for hackers
-Found in file sv.h
-
-=item SVt_PVHV
-X<SVt_PVHV>
-
-Type flag for hashes. See C<svtype>.
-
-=for hackers
-Found in file sv.h
-
-=item SVt_PVMG
-X<SVt_PVMG>
-
-Type flag for blessed scalars. See C<svtype>.
-
-=for hackers
-Found in file sv.h
-
-
-=back
-
-=head1 SV Manipulation Functions
-
-=over 8
-
-=item get_sv
-X<get_sv>
-
-Returns the SV of the specified Perl scalar. If C<create> is set and the
-Perl variable does not exist then it will be created. If C<create> is not
-set and the variable does not exist then NULL is returned.
-
-NOTE: the perl_ form of this function is deprecated.
-
- SV* get_sv(const char* name, I32 create)
-
-=for hackers
-Found in file perl.c
-
-=item newRV_inc
-X<newRV_inc>
-
-Creates an RV wrapper for an SV. The reference count for the original SV is
-incremented.
-
- SV* newRV_inc(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvCUR
-X<SvCUR>
-
-Returns the length of the string which is in the SV. See C<SvLEN>.
-
- STRLEN SvCUR(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvCUR_set
-X<SvCUR_set>
-
-Set the current length of the string which is in the SV. See C<SvCUR>
-and C<SvIV_set>.
-
- void SvCUR_set(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvEND
-X<SvEND>
-
-Returns a pointer to the last character in the string which is in the SV.
-See C<SvCUR>. Access the character as *(SvEND(sv)).
-
- char* SvEND(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvGAMAGIC
-X<SvGAMAGIC>
-
-Returns true if the SV has get magic or overloading. If either is true then
-the scalar is active data, and has the potential to return a new value every
-time it is accessed. Hence you must be careful to only read it once per user
-logical operation and work with that returned value. If neither is true then
-the scalar's value cannot change unless written to.
-
- char* SvGAMAGIC(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvGROW
-X<SvGROW>
-
-Expands the character buffer in the SV so that it has room for the
-indicated number of bytes (remember to reserve space for an extra trailing
-NUL character). Calls C<sv_grow> to perform the expansion if necessary.
-Returns a pointer to the character buffer.
-
- char * SvGROW(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvIOK
-X<SvIOK>
-
-Returns a U32 value indicating whether the SV contains an integer.
-
- U32 SvIOK(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIOKp
-X<SvIOKp>
-
-Returns a U32 value indicating whether the SV contains an integer. Checks
-the B<private> setting. Use C<SvIOK>.
-
- U32 SvIOKp(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIOK_notUV
-X<SvIOK_notUV>
-
-Returns a boolean indicating whether the SV contains a signed integer.
-
- bool SvIOK_notUV(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIOK_off
-X<SvIOK_off>
-
-Unsets the IV status of an SV.
-
- void SvIOK_off(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIOK_on
-X<SvIOK_on>
-
-Tells an SV that it is an integer.
-
- void SvIOK_on(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIOK_only
-X<SvIOK_only>
-
-Tells an SV that it is an integer and disables all other OK bits.
-
- void SvIOK_only(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIOK_only_UV
-X<SvIOK_only_UV>
-
-Tells and SV that it is an unsigned integer and disables all other OK bits.
-
- void SvIOK_only_UV(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIOK_UV
-X<SvIOK_UV>
-
-Returns a boolean indicating whether the SV contains an unsigned integer.
-
- bool SvIOK_UV(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIsCOW
-X<SvIsCOW>
-
-Returns a boolean indicating whether the SV is Copy-On-Write. (either shared
-hash key scalars, or full Copy On Write scalars if 5.9.0 is configured for
-COW)
-
- bool SvIsCOW(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIsCOW_shared_hash
-X<SvIsCOW_shared_hash>
-
-Returns a boolean indicating whether the SV is Copy-On-Write shared hash key
-scalar.
-
- bool SvIsCOW_shared_hash(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIV
-X<SvIV>
-
-Coerces the given SV to an integer and returns it. See C<SvIVx> for a
-version which guarantees to evaluate sv only once.
-
- IV SvIV(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIVX
-X<SvIVX>
-
-Returns the raw value in the SV's IV slot, without checks or conversions.
-Only use when you are sure SvIOK is true. See also C<SvIV()>.
-
- IV SvIVX(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIVx
-X<SvIVx>
-
-Coerces the given SV to an integer and returns it. Guarantees to evaluate
-C<sv> only once. Only use this if C<sv> is an expression with side effects,
-otherwise use the more efficient C<SvIV>.
-
- IV SvIVx(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIV_nomg
-X<SvIV_nomg>
-
-Like C<SvIV> but doesn't process magic.
-
- IV SvIV_nomg(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvIV_set
-X<SvIV_set>
-
-Set the value of the IV pointer in sv to val. It is possible to perform
-the same function of this macro with an lvalue assignment to C<SvIVX>.
-With future Perls, however, it will be more efficient to use
-C<SvIV_set> instead of the lvalue assignment to C<SvIVX>.
-
- void SvIV_set(SV* sv, IV val)
-
-=for hackers
-Found in file sv.h
-
-=item SvLEN
-X<SvLEN>
-
-Returns the size of the string buffer in the SV, not including any part
-attributable to C<SvOOK>. See C<SvCUR>.
-
- STRLEN SvLEN(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvLEN_set
-X<SvLEN_set>
-
-Set the actual length of the string which is in the SV. See C<SvIV_set>.
-
- void SvLEN_set(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvMAGIC_set
-X<SvMAGIC_set>
-
-Set the value of the MAGIC pointer in sv to val. See C<SvIV_set>.
-
- void SvMAGIC_set(SV* sv, MAGIC* val)
-
-=for hackers
-Found in file sv.h
-
-=item SvNIOK
-X<SvNIOK>
-
-Returns a U32 value indicating whether the SV contains a number, integer or
-double.
-
- U32 SvNIOK(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvNIOKp
-X<SvNIOKp>
-
-Returns a U32 value indicating whether the SV contains a number, integer or
-double. Checks the B<private> setting. Use C<SvNIOK>.
-
- U32 SvNIOKp(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvNIOK_off
-X<SvNIOK_off>
-
-Unsets the NV/IV status of an SV.
-
- void SvNIOK_off(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvNOK
-X<SvNOK>
-
-Returns a U32 value indicating whether the SV contains a double.
-
- U32 SvNOK(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvNOKp
-X<SvNOKp>
-
-Returns a U32 value indicating whether the SV contains a double. Checks the
-B<private> setting. Use C<SvNOK>.
-
- U32 SvNOKp(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvNOK_off
-X<SvNOK_off>
-
-Unsets the NV status of an SV.
-
- void SvNOK_off(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvNOK_on
-X<SvNOK_on>
-
-Tells an SV that it is a double.
-
- void SvNOK_on(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvNOK_only
-X<SvNOK_only>
-
-Tells an SV that it is a double and disables all other OK bits.
-
- void SvNOK_only(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvNV
-X<SvNV>
-
-Coerce the given SV to a double and return it. See C<SvNVx> for a version
-which guarantees to evaluate sv only once.
-
- NV SvNV(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvNVX
-X<SvNVX>
-
-Returns the raw value in the SV's NV slot, without checks or conversions.
-Only use when you are sure SvNOK is true. See also C<SvNV()>.
-
- NV SvNVX(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvNVx
-X<SvNVx>
-
-Coerces the given SV to a double and returns it. Guarantees to evaluate
-C<sv> only once. Only use this if C<sv> is an expression with side effects,
-otherwise use the more efficient C<SvNV>.
-
- NV SvNVx(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvNV_set
-X<SvNV_set>
-
-Set the value of the NV pointer in sv to val. See C<SvIV_set>.
-
- void SvNV_set(SV* sv, NV val)
-
-=for hackers
-Found in file sv.h
-
-=item SvOK
-X<SvOK>
-
-Returns a U32 value indicating whether the value is an SV. It also tells
-whether the value is defined or not.
-
- U32 SvOK(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvOOK
-X<SvOOK>
-
-Returns a U32 indicating whether the SvIVX is a valid offset value for
-the SvPVX. This hack is used internally to speed up removal of characters
-from the beginning of a SvPV. When SvOOK is true, then the start of the
-allocated string buffer is really (SvPVX - SvIVX).
-
- U32 SvOOK(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvPOK
-X<SvPOK>
-
-Returns a U32 value indicating whether the SV contains a character
-string.
-
- U32 SvPOK(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvPOKp
-X<SvPOKp>
-
-Returns a U32 value indicating whether the SV contains a character string.
-Checks the B<private> setting. Use C<SvPOK>.
-
- U32 SvPOKp(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvPOK_off
-X<SvPOK_off>
-
-Unsets the PV status of an SV.
-
- void SvPOK_off(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvPOK_on
-X<SvPOK_on>
-
-Tells an SV that it is a string.
-
- void SvPOK_on(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvPOK_only
-X<SvPOK_only>
-
-Tells an SV that it is a string and disables all other OK bits.
-Will also turn off the UTF-8 status.
-
- void SvPOK_only(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvPOK_only_UTF8
-X<SvPOK_only_UTF8>
-
-Tells an SV that it is a string and disables all other OK bits,
-and leaves the UTF-8 status as it was.
-
- void SvPOK_only_UTF8(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvPV
-X<SvPV>
-
-Returns a pointer to the string in the SV, or a stringified form of
-the SV if the SV does not contain a string. The SV may cache the
-stringified version becoming C<SvPOK>. Handles 'get' magic. See also
-C<SvPVx> for a version which guarantees to evaluate sv only once.
-
- char* SvPV(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPVbyte
-X<SvPVbyte>
-
-Like C<SvPV>, but converts sv to byte representation first if necessary.
-
- char* SvPVbyte(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPVbytex
-X<SvPVbytex>
-
-Like C<SvPV>, but converts sv to byte representation first if necessary.
-Guarantees to evaluate sv only once; use the more efficient C<SvPVbyte>
-otherwise.
-
- char* SvPVbytex(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPVbytex_force
-X<SvPVbytex_force>
-
-Like C<SvPV_force>, but converts sv to byte representation first if necessary.
-Guarantees to evaluate sv only once; use the more efficient C<SvPVbyte_force>
-otherwise.
-
- char* SvPVbytex_force(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPVbyte_force
-X<SvPVbyte_force>
-
-Like C<SvPV_force>, but converts sv to byte representation first if necessary.
-
- char* SvPVbyte_force(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPVbyte_nolen
-X<SvPVbyte_nolen>
-
-Like C<SvPV_nolen>, but converts sv to byte representation first if necessary.
-
- char* SvPVbyte_nolen(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvPVutf8
-X<SvPVutf8>
-
-Like C<SvPV>, but converts sv to utf8 first if necessary.
-
- char* SvPVutf8(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPVutf8x
-X<SvPVutf8x>
-
-Like C<SvPV>, but converts sv to utf8 first if necessary.
-Guarantees to evaluate sv only once; use the more efficient C<SvPVutf8>
-otherwise.
-
- char* SvPVutf8x(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPVutf8x_force
-X<SvPVutf8x_force>
-
-Like C<SvPV_force>, but converts sv to utf8 first if necessary.
-Guarantees to evaluate sv only once; use the more efficient C<SvPVutf8_force>
-otherwise.
-
- char* SvPVutf8x_force(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPVutf8_force
-X<SvPVutf8_force>
-
-Like C<SvPV_force>, but converts sv to utf8 first if necessary.
-
- char* SvPVutf8_force(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPVutf8_nolen
-X<SvPVutf8_nolen>
-
-Like C<SvPV_nolen>, but converts sv to utf8 first if necessary.
-
- char* SvPVutf8_nolen(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvPVX
-X<SvPVX>
-
-Returns a pointer to the physical string in the SV. The SV must contain a
-string.
-
- char* SvPVX(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvPVx
-X<SvPVx>
-
-A version of C<SvPV> which guarantees to evaluate C<sv> only once.
-Only use this if C<sv> is an expression with side effects, otherwise use the
-more efficient C<SvPVX>.
-
- char* SvPVx(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPV_force
-X<SvPV_force>
-
-Like C<SvPV> but will force the SV into containing just a string
-(C<SvPOK_only>). You want force if you are going to update the C<SvPVX>
-directly.
-
- char* SvPV_force(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPV_force_nomg
-X<SvPV_force_nomg>
-
-Like C<SvPV> but will force the SV into containing just a string
-(C<SvPOK_only>). You want force if you are going to update the C<SvPVX>
-directly. Doesn't process magic.
-
- char* SvPV_force_nomg(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPV_nolen
-X<SvPV_nolen>
-
-Returns a pointer to the string in the SV, or a stringified form of
-the SV if the SV does not contain a string. The SV may cache the
-stringified form becoming C<SvPOK>. Handles 'get' magic.
-
- char* SvPV_nolen(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvPV_nomg
-X<SvPV_nomg>
-
-Like C<SvPV> but doesn't process magic.
-
- char* SvPV_nomg(SV* sv, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item SvPV_set
-X<SvPV_set>
-
-Set the value of the PV pointer in sv to val. See C<SvIV_set>.
-
- void SvPV_set(SV* sv, char* val)
-
-=for hackers
-Found in file sv.h
-
-=item SvREFCNT
-X<SvREFCNT>
-
-Returns the value of the object's reference count.
-
- U32 SvREFCNT(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvREFCNT_dec
-X<SvREFCNT_dec>
-
-Decrements the reference count of the given SV.
-
- void SvREFCNT_dec(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvREFCNT_inc
-X<SvREFCNT_inc>
-
-Increments the reference count of the given SV.
-
-All of the following SvREFCNT_inc* macros are optimized versions of
-SvREFCNT_inc, and can be replaced with SvREFCNT_inc.
-
- SV* SvREFCNT_inc(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvREFCNT_inc_NN
-X<SvREFCNT_inc_NN>
-
-Same as SvREFCNT_inc, but can only be used if you know I<sv>
-is not NULL. Since we don't have to check the NULLness, it's faster
-and smaller.
-
- SV* SvREFCNT_inc_NN(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvREFCNT_inc_simple
-X<SvREFCNT_inc_simple>
-
-Same as SvREFCNT_inc, but can only be used with expressions without side
-effects. Since we don't have to store a temporary value, it's faster.
-
- SV* SvREFCNT_inc_simple(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvREFCNT_inc_simple_NN
-X<SvREFCNT_inc_simple_NN>
-
-Same as SvREFCNT_inc_simple, but can only be used if you know I<sv>
-is not NULL. Since we don't have to check the NULLness, it's faster
-and smaller.
-
- SV* SvREFCNT_inc_simple_NN(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvREFCNT_inc_simple_void
-X<SvREFCNT_inc_simple_void>
-
-Same as SvREFCNT_inc_simple, but can only be used if you don't need the
-return value. The macro doesn't need to return a meaningful value.
-
- void SvREFCNT_inc_simple_void(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvREFCNT_inc_simple_void_NN
-X<SvREFCNT_inc_simple_void_NN>
-
-Same as SvREFCNT_inc, but can only be used if you don't need the return
-value, and you know that I<sv> is not NULL. The macro doesn't need
-to return a meaningful value, or check for NULLness, so it's smaller
-and faster.
-
- void SvREFCNT_inc_simple_void_NN(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvREFCNT_inc_void
-X<SvREFCNT_inc_void>
-
-Same as SvREFCNT_inc, but can only be used if you don't need the
-return value. The macro doesn't need to return a meaningful value.
-
- void SvREFCNT_inc_void(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvREFCNT_inc_void_NN
-X<SvREFCNT_inc_void_NN>
-
-Same as SvREFCNT_inc, but can only be used if you don't need the return
-value, and you know that I<sv> is not NULL. The macro doesn't need
-to return a meaningful value, or check for NULLness, so it's smaller
-and faster.
-
- void SvREFCNT_inc_void_NN(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvROK
-X<SvROK>
-
-Tests if the SV is an RV.
-
- U32 SvROK(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvROK_off
-X<SvROK_off>
-
-Unsets the RV status of an SV.
-
- void SvROK_off(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvROK_on
-X<SvROK_on>
-
-Tells an SV that it is an RV.
-
- void SvROK_on(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvRV
-X<SvRV>
-
-Dereferences an RV to return the SV.
-
- SV* SvRV(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvRV_set
-X<SvRV_set>
-
-Set the value of the RV pointer in sv to val. See C<SvIV_set>.
-
- void SvRV_set(SV* sv, SV* val)
-
-=for hackers
-Found in file sv.h
-
-=item SvSTASH
-X<SvSTASH>
-
-Returns the stash of the SV.
-
- HV* SvSTASH(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvSTASH_set
-X<SvSTASH_set>
-
-Set the value of the STASH pointer in sv to val. See C<SvIV_set>.
-
- void SvSTASH_set(SV* sv, HV* val)
-
-=for hackers
-Found in file sv.h
-
-=item SvTAINT
-X<SvTAINT>
-
-Taints an SV if tainting is enabled.
-
- void SvTAINT(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvTAINTED
-X<SvTAINTED>
-
-Checks to see if an SV is tainted. Returns TRUE if it is, FALSE if
-not.
-
- bool SvTAINTED(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvTAINTED_off
-X<SvTAINTED_off>
-
-Untaints an SV. Be I<very> careful with this routine, as it short-circuits
-some of Perl's fundamental security features. XS module authors should not
-use this function unless they fully understand all the implications of
-unconditionally untainting the value. Untainting should be done in the
-standard perl fashion, via a carefully crafted regexp, rather than directly
-untainting variables.
-
- void SvTAINTED_off(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvTAINTED_on
-X<SvTAINTED_on>
-
-Marks an SV as tainted if tainting is enabled.
-
- void SvTAINTED_on(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvTRUE
-X<SvTRUE>
-
-Returns a boolean indicating whether Perl would evaluate the SV as true or
-false, defined or undefined. Does not handle 'get' magic.
-
- bool SvTRUE(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvTYPE
-X<SvTYPE>
-
-Returns the type of the SV. See C<svtype>.
-
- svtype SvTYPE(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvUOK
-X<SvUOK>
-
-Returns a boolean indicating whether the SV contains an unsigned integer.
-
- bool SvUOK(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvUPGRADE
-X<SvUPGRADE>
-
-Used to upgrade an SV to a more complex form. Uses C<sv_upgrade> to
-perform the upgrade if necessary. See C<svtype>.
-
- void SvUPGRADE(SV* sv, svtype type)
-
-=for hackers
-Found in file sv.h
-
-=item SvUTF8
-X<SvUTF8>
-
-Returns a U32 value indicating whether the SV contains UTF-8 encoded data.
-Call this after SvPV() in case any call to string overloading updates the
-internal flag.
-
- U32 SvUTF8(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvUTF8_off
-X<SvUTF8_off>
-
-Unsets the UTF-8 status of an SV.
-
- void SvUTF8_off(SV *sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvUTF8_on
-X<SvUTF8_on>
-
-Turn on the UTF-8 status of an SV (the data is not changed, just the flag).
-Do not use frivolously.
-
- void SvUTF8_on(SV *sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvUV
-X<SvUV>
-
-Coerces the given SV to an unsigned integer and returns it. See C<SvUVx>
-for a version which guarantees to evaluate sv only once.
-
- UV SvUV(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvUVX
-X<SvUVX>
-
-Returns the raw value in the SV's UV slot, without checks or conversions.
-Only use when you are sure SvIOK is true. See also C<SvUV()>.
-
- UV SvUVX(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvUVx
-X<SvUVx>
-
-Coerces the given SV to an unsigned integer and returns it. Guarantees to
-C<sv> only once. Only use this if C<sv> is an expression with side effects,
-otherwise use the more efficient C<SvUV>.
-
- UV SvUVx(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvUV_nomg
-X<SvUV_nomg>
-
-Like C<SvUV> but doesn't process magic.
-
- UV SvUV_nomg(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item SvUV_set
-X<SvUV_set>
-
-Set the value of the UV pointer in sv to val. See C<SvIV_set>.
-
- void SvUV_set(SV* sv, UV val)
-
-=for hackers
-Found in file sv.h
-
-=item SvVOK
-X<SvVOK>
-
-Returns a boolean indicating whether the SV contains a v-string.
-
- bool SvVOK(SV* sv)
-
-=for hackers
-Found in file sv.h
-
-=item sv_catpvn_nomg
-X<sv_catpvn_nomg>
-
-Like C<sv_catpvn> but doesn't process magic.
-
- void sv_catpvn_nomg(SV* sv, const char* ptr, STRLEN len)
-
-=for hackers
-Found in file sv.h
-
-=item sv_catsv_nomg
-X<sv_catsv_nomg>
-
-Like C<sv_catsv> but doesn't process magic.
-
- void sv_catsv_nomg(SV* dsv, SV* ssv)
-
-=for hackers
-Found in file sv.h
-
-=item sv_derived_from
-X<sv_derived_from>
-
-Returns a boolean indicating whether the SV is derived from the specified class
-I<at the C level>. To check derivation at the Perl level, call C<isa()> as a
-normal Perl method.
-
- bool sv_derived_from(SV* sv, const char* name)
-
-=for hackers
-Found in file universal.c
-
-=item sv_does
-X<sv_does>
-
-Returns a boolean indicating whether the SV performs a specific, named role.
-The SV can be a Perl object or the name of a Perl class.
-
- bool sv_does(SV* sv, const char* name)
-
-=for hackers
-Found in file universal.c
-
-=item sv_report_used
-X<sv_report_used>
-
-Dump the contents of all SVs not yet freed. (Debugging aid).
-
- void sv_report_used()
-
-=for hackers
-Found in file sv.c
-
-=item sv_setsv_nomg
-X<sv_setsv_nomg>
-
-Like C<sv_setsv> but doesn't process magic.
-
- void sv_setsv_nomg(SV* dsv, SV* ssv)
-
-=for hackers
-Found in file sv.h
-
-
-=back
-
-=head1 SV-Body Allocation
-
-=over 8
-
-=item looks_like_number
-X<looks_like_number>
-
-Test if the content of an SV looks like a number (or is a number).
-C<Inf> and C<Infinity> are treated as numbers (so will not issue a
-non-numeric warning), even if your atof() doesn't grok them.
-
- I32 looks_like_number(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item newRV_noinc
-X<newRV_noinc>
-
-Creates an RV wrapper for an SV. The reference count for the original
-SV is B<not> incremented.
-
- SV* newRV_noinc(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item newSV
-X<newSV>
-
-Creates a new SV. A non-zero C<len> parameter indicates the number of
-bytes of preallocated string space the SV should have. An extra byte for a
-trailing NUL is also reserved. (SvPOK is not set for the SV even if string
-space is allocated.) The reference count for the new SV is set to 1.
-
-In 5.9.3, newSV() replaces the older NEWSV() API, and drops the first
-parameter, I<x>, a debug aid which allowed callers to identify themselves.
-This aid has been superseded by a new build option, PERL_MEM_LOG (see
-L<perlhack/PERL_MEM_LOG>). The older API is still there for use in XS
-modules supporting older perls.
-
- SV* newSV(STRLEN len)
-
-=for hackers
-Found in file sv.c
-
-=item newSVhek
-X<newSVhek>
-
-Creates a new SV from the hash key structure. It will generate scalars that
-point to the shared string table where possible. Returns a new (undefined)
-SV if the hek is NULL.
-
- SV* newSVhek(const HEK *hek)
-
-=for hackers
-Found in file sv.c
-
-=item newSViv
-X<newSViv>
-
-Creates a new SV and copies an integer into it. The reference count for the
-SV is set to 1.
-
- SV* newSViv(IV i)
-
-=for hackers
-Found in file sv.c
-
-=item newSVnv
-X<newSVnv>
-
-Creates a new SV and copies a floating point value into it.
-The reference count for the SV is set to 1.
-
- SV* newSVnv(NV n)
-
-=for hackers
-Found in file sv.c
-
-=item newSVpv
-X<newSVpv>
-
-Creates a new SV and copies a string into it. The reference count for the
-SV is set to 1. If C<len> is zero, Perl will compute the length using
-strlen(). For efficiency, consider using C<newSVpvn> instead.
-
- SV* newSVpv(const char* s, STRLEN len)
-
-=for hackers
-Found in file sv.c
-
-=item newSVpvf
-X<newSVpvf>
-
-Creates a new SV and initializes it with the string formatted like
-C<sprintf>.
-
- SV* newSVpvf(const char* pat, ...)
-
-=for hackers
-Found in file sv.c
-
-=item newSVpvn
-X<newSVpvn>
-
-Creates a new SV and copies a string into it. The reference count for the
-SV is set to 1. Note that if C<len> is zero, Perl will create a zero length
-string. You are responsible for ensuring that the source string is at least
-C<len> bytes long. If the C<s> argument is NULL the new SV will be undefined.
-
- SV* newSVpvn(const char* s, STRLEN len)
-
-=for hackers
-Found in file sv.c
-
-=item newSVpvn_share
-X<newSVpvn_share>
-
-Creates a new SV with its SvPVX_const pointing to a shared string in the string
-table. If the string does not already exist in the table, it is created
-first. Turns on READONLY and FAKE. If the C<hash> parameter is non-zero, that
-value is used; otherwise the hash is computed. The string's hash can be later
-be retrieved from the SV with the C<SvSHARED_HASH()> macro. The idea here is
-that as the string table is used for shared hash keys these strings will have
-SvPVX_const == HeKEY and hash lookup will avoid string compare.
-
- SV* newSVpvn_share(const char* s, I32 len, U32 hash)
-
-=for hackers
-Found in file sv.c
-
-=item newSVpvs
-X<newSVpvs>
-
-Like C<newSVpvn>, but takes a literal string instead of a string/length pair.
-
- SV* newSVpvs(const char* s)
-
-=for hackers
-Found in file handy.h
-
-=item newSVpvs_share
-X<newSVpvs_share>
-
-Like C<newSVpvn_share>, but takes a literal string instead of a string/length
-pair and omits the hash parameter.
-
- SV* newSVpvs_share(const char* s)
-
-=for hackers
-Found in file handy.h
-
-=item newSVrv
-X<newSVrv>
-
-Creates a new SV for the RV, C<rv>, to point to. If C<rv> is not an RV then
-it will be upgraded to one. If C<classname> is non-null then the new SV will
-be blessed in the specified package. The new SV is returned and its
-reference count is 1.
-
- SV* newSVrv(SV* rv, const char* classname)
-
-=for hackers
-Found in file sv.c
-
-=item newSVsv
-X<newSVsv>
-
-Creates a new SV which is an exact duplicate of the original SV.
-(Uses C<sv_setsv>).
-
- SV* newSVsv(SV* old)
-
-=for hackers
-Found in file sv.c
-
-=item newSVuv
-X<newSVuv>
-
-Creates a new SV and copies an unsigned integer into it.
-The reference count for the SV is set to 1.
-
- SV* newSVuv(UV u)
-
-=for hackers
-Found in file sv.c
-
-=item newSV_type
-X<newSV_type>
-
-Creates a new SV, of the type specified. The reference count for the new SV
-is set to 1.
-
- SV* newSV_type(svtype type)
-
-=for hackers
-Found in file sv.c
-
-=item sv_2bool
-X<sv_2bool>
-
-This function is only called on magical items, and is only used by
-sv_true() or its macro equivalent.
-
- bool sv_2bool(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_2cv
-X<sv_2cv>
-
-Using various gambits, try to get a CV from an SV; in addition, try if
-possible to set C<*st> and C<*gvp> to the stash and GV associated with it.
-The flags in C<lref> are passed to sv_fetchsv.
-
- CV* sv_2cv(SV* sv, HV** st, GV** gvp, I32 lref)
-
-=for hackers
-Found in file sv.c
-
-=item sv_2io
-X<sv_2io>
-
-Using various gambits, try to get an IO from an SV: the IO slot if its a
-GV; or the recursive result if we're an RV; or the IO slot of the symbol
-named after the PV if we're a string.
-
- IO* sv_2io(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_2iv_flags
-X<sv_2iv_flags>
-
-Return the integer value of an SV, doing any necessary string
-conversion. If flags includes SV_GMAGIC, does an mg_get() first.
-Normally used via the C<SvIV(sv)> and C<SvIVx(sv)> macros.
-
- IV sv_2iv_flags(SV* sv, I32 flags)
-
-=for hackers
-Found in file sv.c
-
-=item sv_2mortal
-X<sv_2mortal>
-
-Marks an existing SV as mortal. The SV will be destroyed "soon", either
-by an explicit call to FREETMPS, or by an implicit call at places such as
-statement boundaries. SvTEMP() is turned on which means that the SV's
-string buffer can be "stolen" if this SV is copied. See also C<sv_newmortal>
-and C<sv_mortalcopy>.
-
- SV* sv_2mortal(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_2nv
-X<sv_2nv>
-
-Return the num value of an SV, doing any necessary string or integer
-conversion, magic etc. Normally used via the C<SvNV(sv)> and C<SvNVx(sv)>
-macros.
-
- NV sv_2nv(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_2pvbyte
-X<sv_2pvbyte>
-
-Return a pointer to the byte-encoded representation of the SV, and set *lp
-to its length. May cause the SV to be downgraded from UTF-8 as a
-side-effect.
-
-Usually accessed via the C<SvPVbyte> macro.
-
- char* sv_2pvbyte(SV* sv, STRLEN* lp)
-
-=for hackers
-Found in file sv.c
-
-=item sv_2pvutf8
-X<sv_2pvutf8>
-
-Return a pointer to the UTF-8-encoded representation of the SV, and set *lp
-to its length. May cause the SV to be upgraded to UTF-8 as a side-effect.
-
-Usually accessed via the C<SvPVutf8> macro.
-
- char* sv_2pvutf8(SV* sv, STRLEN* lp)
-
-=for hackers
-Found in file sv.c
-
-=item sv_2pv_flags
-X<sv_2pv_flags>
-
-Returns a pointer to the string value of an SV, and sets *lp to its length.
-If flags includes SV_GMAGIC, does an mg_get() first. Coerces sv to a string
-if necessary.
-Normally invoked via the C<SvPV_flags> macro. C<sv_2pv()> and C<sv_2pv_nomg>
-usually end up here too.
-
- char* sv_2pv_flags(SV* sv, STRLEN* lp, I32 flags)
-
-=for hackers
-Found in file sv.c
-
-=item sv_2uv_flags
-X<sv_2uv_flags>
-
-Return the unsigned integer value of an SV, doing any necessary string
-conversion. If flags includes SV_GMAGIC, does an mg_get() first.
-Normally used via the C<SvUV(sv)> and C<SvUVx(sv)> macros.
-
- UV sv_2uv_flags(SV* sv, I32 flags)
-
-=for hackers
-Found in file sv.c
-
-=item sv_backoff
-X<sv_backoff>
-
-Remove any string offset. You should normally use the C<SvOOK_off> macro
-wrapper instead.
-
- int sv_backoff(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_bless
-X<sv_bless>
-
-Blesses an SV into a specified package. The SV must be an RV. The package
-must be designated by its stash (see C<gv_stashpv()>). The reference count
-of the SV is unaffected.
-
- SV* sv_bless(SV* sv, HV* stash)
-
-=for hackers
-Found in file sv.c
-
-=item sv_catpv
-X<sv_catpv>
-
-Concatenates the string onto the end of the string which is in the SV.
-If the SV has the UTF-8 status set, then the bytes appended should be
-valid UTF-8. Handles 'get' magic, but not 'set' magic. See C<sv_catpv_mg>.
-
- void sv_catpv(SV* sv, const char* ptr)
-
-=for hackers
-Found in file sv.c
-
-=item sv_catpvf
-X<sv_catpvf>
-
-Processes its arguments like C<sprintf> and appends the formatted
-output to an SV. If the appended data contains "wide" characters
-(including, but not limited to, SVs with a UTF-8 PV formatted with %s,
-and characters >255 formatted with %c), the original SV might get
-upgraded to UTF-8. Handles 'get' magic, but not 'set' magic. See
-C<sv_catpvf_mg>. If the original SV was UTF-8, the pattern should be
-valid UTF-8; if the original SV was bytes, the pattern should be too.
-
- void sv_catpvf(SV* sv, const char* pat, ...)
-
-=for hackers
-Found in file sv.c
-
-=item sv_catpvf_mg
-X<sv_catpvf_mg>
-
-Like C<sv_catpvf>, but also handles 'set' magic.
-
- void sv_catpvf_mg(SV *sv, const char* pat, ...)
-
-=for hackers
-Found in file sv.c
-
-=item sv_catpvn
-X<sv_catpvn>
-
-Concatenates the string onto the end of the string which is in the SV. The
-C<len> indicates number of bytes to copy. If the SV has the UTF-8
-status set, then the bytes appended should be valid UTF-8.
-Handles 'get' magic, but not 'set' magic. See C<sv_catpvn_mg>.
-
- void sv_catpvn(SV* sv, const char* ptr, STRLEN len)
-
-=for hackers
-Found in file sv.c
-
-=item sv_catpvn_flags
-X<sv_catpvn_flags>
-
-Concatenates the string onto the end of the string which is in the SV. The
-C<len> indicates number of bytes to copy. If the SV has the UTF-8
-status set, then the bytes appended should be valid UTF-8.
-If C<flags> has C<SV_GMAGIC> bit set, will C<mg_get> on C<dsv> if
-appropriate, else not. C<sv_catpvn> and C<sv_catpvn_nomg> are implemented
-in terms of this function.
-
- void sv_catpvn_flags(SV* sv, const char* ptr, STRLEN len, I32 flags)
-
-=for hackers
-Found in file sv.c
-
-=item sv_catpvs
-X<sv_catpvs>
-
-Like C<sv_catpvn>, but takes a literal string instead of a string/length pair.
-
- void sv_catpvs(SV* sv, const char* s)
-
-=for hackers
-Found in file handy.h
-
-=item sv_catpv_mg
-X<sv_catpv_mg>
-
-Like C<sv_catpv>, but also handles 'set' magic.
-
- void sv_catpv_mg(SV *sv, const char *ptr)
-
-=for hackers
-Found in file sv.c
-
-=item sv_catsv
-X<sv_catsv>
-
-Concatenates the string from SV C<ssv> onto the end of the string in
-SV C<dsv>. Modifies C<dsv> but not C<ssv>. Handles 'get' magic, but
-not 'set' magic. See C<sv_catsv_mg>.
-
- void sv_catsv(SV* dsv, SV* ssv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_catsv_flags
-X<sv_catsv_flags>
-
-Concatenates the string from SV C<ssv> onto the end of the string in
-SV C<dsv>. Modifies C<dsv> but not C<ssv>. If C<flags> has C<SV_GMAGIC>
-bit set, will C<mg_get> on the SVs if appropriate, else not. C<sv_catsv>
-and C<sv_catsv_nomg> are implemented in terms of this function.
-
- void sv_catsv_flags(SV* dsv, SV* ssv, I32 flags)
-
-=for hackers
-Found in file sv.c
-
-=item sv_chop
-X<sv_chop>
-
-Efficient removal of characters from the beginning of the string buffer.
-SvPOK(sv) must be true and the C<ptr> must be a pointer to somewhere inside
-the string buffer. The C<ptr> becomes the first character of the adjusted
-string. Uses the "OOK hack".
-Beware: after this function returns, C<ptr> and SvPVX_const(sv) may no longer
-refer to the same chunk of data.
-
- void sv_chop(SV* sv, const char* ptr)
-
-=for hackers
-Found in file sv.c
-
-=item sv_clear
-X<sv_clear>
-
-Clear an SV: call any destructors, free up any memory used by the body,
-and free the body itself. The SV's head is I<not> freed, although
-its type is set to all 1's so that it won't inadvertently be assumed
-to be live during global destruction etc.
-This function should only be called when REFCNT is zero. Most of the time
-you'll want to call C<sv_free()> (or its macro wrapper C<SvREFCNT_dec>)
-instead.
-
- void sv_clear(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_cmp
-X<sv_cmp>
-
-Compares the strings in two SVs. Returns -1, 0, or 1 indicating whether the
-string in C<sv1> is less than, equal to, or greater than the string in
-C<sv2>. Is UTF-8 and 'use bytes' aware, handles get magic, and will
-coerce its args to strings if necessary. See also C<sv_cmp_locale>.
-
- I32 sv_cmp(SV* sv1, SV* sv2)
-
-=for hackers
-Found in file sv.c
-
-=item sv_cmp_locale
-X<sv_cmp_locale>
-
-Compares the strings in two SVs in a locale-aware manner. Is UTF-8 and
-'use bytes' aware, handles get magic, and will coerce its args to strings
-if necessary. See also C<sv_cmp_locale>. See also C<sv_cmp>.
-
- I32 sv_cmp_locale(SV* sv1, SV* sv2)
-
-=for hackers
-Found in file sv.c
-
-=item sv_collxfrm
-X<sv_collxfrm>
-
-Add Collate Transform magic to an SV if it doesn't already have it.
-
-Any scalar variable may carry PERL_MAGIC_collxfrm magic that contains the
-scalar data of the variable, but transformed to such a format that a normal
-memory comparison can be used to compare the data according to the locale
-settings.
-
- char* sv_collxfrm(SV* sv, STRLEN* nxp)
-
-=for hackers
-Found in file sv.c
-
-=item sv_copypv
-X<sv_copypv>
-
-Copies a stringified representation of the source SV into the
-destination SV. Automatically performs any necessary mg_get and
-coercion of numeric values into strings. Guaranteed to preserve
-UTF8 flag even from overloaded objects. Similar in nature to
-sv_2pv[_flags] but operates directly on an SV instead of just the
-string. Mostly uses sv_2pv_flags to do its work, except when that
-would lose the UTF-8'ness of the PV.
-
- void sv_copypv(SV* dsv, SV* ssv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_dec
-X<sv_dec>
-
-Auto-decrement of the value in the SV, doing string to numeric conversion
-if necessary. Handles 'get' magic.
-
- void sv_dec(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_eq
-X<sv_eq>
-
-Returns a boolean indicating whether the strings in the two SVs are
-identical. Is UTF-8 and 'use bytes' aware, handles get magic, and will
-coerce its args to strings if necessary.
-
- I32 sv_eq(SV* sv1, SV* sv2)
-
-=for hackers
-Found in file sv.c
-
-=item sv_force_normal_flags
-X<sv_force_normal_flags>
-
-Undo various types of fakery on an SV: if the PV is a shared string, make
-a private copy; if we're a ref, stop refing; if we're a glob, downgrade to
-an xpvmg; if we're a copy-on-write scalar, this is the on-write time when
-we do the copy, and is also used locally. If C<SV_COW_DROP_PV> is set
-then a copy-on-write scalar drops its PV buffer (if any) and becomes
-SvPOK_off rather than making a copy. (Used where this scalar is about to be
-set to some other value.) In addition, the C<flags> parameter gets passed to
-C<sv_unref_flags()> when unrefing. C<sv_force_normal> calls this function
-with flags set to 0.
-
- void sv_force_normal_flags(SV *sv, U32 flags)
-
-=for hackers
-Found in file sv.c
-
-=item sv_free
-X<sv_free>
-
-Decrement an SV's reference count, and if it drops to zero, call
-C<sv_clear> to invoke destructors and free up any memory used by
-the body; finally, deallocate the SV's head itself.
-Normally called via a wrapper macro C<SvREFCNT_dec>.
-
- void sv_free(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_gets
-X<sv_gets>
-
-Get a line from the filehandle and store it into the SV, optionally
-appending to the currently-stored string.
-
- char* sv_gets(SV* sv, PerlIO* fp, I32 append)
-
-=for hackers
-Found in file sv.c
-
-=item sv_grow
-X<sv_grow>
-
-Expands the character buffer in the SV. If necessary, uses C<sv_unref> and
-upgrades the SV to C<SVt_PV>. Returns a pointer to the character buffer.
-Use the C<SvGROW> wrapper instead.
-
- char* sv_grow(SV* sv, STRLEN newlen)
-
-=for hackers
-Found in file sv.c
-
-=item sv_inc
-X<sv_inc>
-
-Auto-increment of the value in the SV, doing string to numeric conversion
-if necessary. Handles 'get' magic.
-
- void sv_inc(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_insert
-X<sv_insert>
-
-Inserts a string at the specified offset/length within the SV. Similar to
-the Perl substr() function.
-
- void sv_insert(SV* bigsv, STRLEN offset, STRLEN len, const char* little, STRLEN littlelen)
-
-=for hackers
-Found in file sv.c
-
-=item sv_isa
-X<sv_isa>
-
-Returns a boolean indicating whether the SV is blessed into the specified
-class. This does not check for subtypes; use C<sv_derived_from> to verify
-an inheritance relationship.
-
- int sv_isa(SV* sv, const char* name)
-
-=for hackers
-Found in file sv.c
-
-=item sv_isobject
-X<sv_isobject>
-
-Returns a boolean indicating whether the SV is an RV pointing to a blessed
-object. If the SV is not an RV, or if the object is not blessed, then this
-will return false.
-
- int sv_isobject(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_len
-X<sv_len>
-
-Returns the length of the string in the SV. Handles magic and type
-coercion. See also C<SvCUR>, which gives raw access to the xpv_cur slot.
-
- STRLEN sv_len(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_len_utf8
-X<sv_len_utf8>
-
-Returns the number of characters in the string in an SV, counting wide
-UTF-8 bytes as a single character. Handles magic and type coercion.
-
- STRLEN sv_len_utf8(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_magic
-X<sv_magic>
-
-Adds magic to an SV. First upgrades C<sv> to type C<SVt_PVMG> if necessary,
-then adds a new magic item of type C<how> to the head of the magic list.
-
-See C<sv_magicext> (which C<sv_magic> now calls) for a description of the
-handling of the C<name> and C<namlen> arguments.
-
-You need to use C<sv_magicext> to add magic to SvREADONLY SVs and also
-to add more than one instance of the same 'how'.
-
- void sv_magic(SV* sv, SV* obj, int how, const char* name, I32 namlen)
-
-=for hackers
-Found in file sv.c
-
-=item sv_magicext
-X<sv_magicext>
-
-Adds magic to an SV, upgrading it if necessary. Applies the
-supplied vtable and returns a pointer to the magic added.
-
-Note that C<sv_magicext> will allow things that C<sv_magic> will not.
-In particular, you can add magic to SvREADONLY SVs, and add more than
-one instance of the same 'how'.
-
-If C<namlen> is greater than zero then a C<savepvn> I<copy> of C<name> is
-stored, if C<namlen> is zero then C<name> is stored as-is and - as another
-special case - if C<(name && namlen == HEf_SVKEY)> then C<name> is assumed
-to contain an C<SV*> and is stored as-is with its REFCNT incremented.
-
-(This is now used as a subroutine by C<sv_magic>.)
-
- MAGIC * sv_magicext(SV* sv, SV* obj, int how, const MGVTBL *vtbl, const char* name, I32 namlen)
-
-=for hackers
-Found in file sv.c
-
-=item sv_mortalcopy
-X<sv_mortalcopy>
-
-Creates a new SV which is a copy of the original SV (using C<sv_setsv>).
-The new SV is marked as mortal. It will be destroyed "soon", either by an
-explicit call to FREETMPS, or by an implicit call at places such as
-statement boundaries. See also C<sv_newmortal> and C<sv_2mortal>.
-
- SV* sv_mortalcopy(SV* oldsv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_newmortal
-X<sv_newmortal>
-
-Creates a new null SV which is mortal. The reference count of the SV is
-set to 1. It will be destroyed "soon", either by an explicit call to
-FREETMPS, or by an implicit call at places such as statement boundaries.
-See also C<sv_mortalcopy> and C<sv_2mortal>.
-
- SV* sv_newmortal()
-
-=for hackers
-Found in file sv.c
-
-=item sv_newref
-X<sv_newref>
-
-Increment an SV's reference count. Use the C<SvREFCNT_inc()> wrapper
-instead.
-
- SV* sv_newref(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_pos_b2u
-X<sv_pos_b2u>
-
-Converts the value pointed to by offsetp from a count of bytes from the
-start of the string, to a count of the equivalent number of UTF-8 chars.
-Handles magic and type coercion.
-
- void sv_pos_b2u(SV* sv, I32* offsetp)
-
-=for hackers
-Found in file sv.c
-
-=item sv_pos_u2b
-X<sv_pos_u2b>
-
-Converts the value pointed to by offsetp from a count of UTF-8 chars from
-the start of the string, to a count of the equivalent number of bytes; if
-lenp is non-zero, it does the same to lenp, but this time starting from
-the offset, rather than from the start of the string. Handles magic and
-type coercion.
-
- void sv_pos_u2b(SV* sv, I32* offsetp, I32* lenp)
-
-=for hackers
-Found in file sv.c
-
-=item sv_pvbyten_force
-X<sv_pvbyten_force>
-
-The backend for the C<SvPVbytex_force> macro. Always use the macro instead.
-
- char* sv_pvbyten_force(SV* sv, STRLEN* lp)
-
-=for hackers
-Found in file sv.c
-
-=item sv_pvn_force
-X<sv_pvn_force>
-
-Get a sensible string out of the SV somehow.
-A private implementation of the C<SvPV_force> macro for compilers which
-can't cope with complex macro expressions. Always use the macro instead.
-
- char* sv_pvn_force(SV* sv, STRLEN* lp)
-
-=for hackers
-Found in file sv.c
-
-=item sv_pvn_force_flags
-X<sv_pvn_force_flags>
-
-Get a sensible string out of the SV somehow.
-If C<flags> has C<SV_GMAGIC> bit set, will C<mg_get> on C<sv> if
-appropriate, else not. C<sv_pvn_force> and C<sv_pvn_force_nomg> are
-implemented in terms of this function.
-You normally want to use the various wrapper macros instead: see
-C<SvPV_force> and C<SvPV_force_nomg>
-
- char* sv_pvn_force_flags(SV* sv, STRLEN* lp, I32 flags)
-
-=for hackers
-Found in file sv.c
-
-=item sv_pvutf8n_force
-X<sv_pvutf8n_force>
-
-The backend for the C<SvPVutf8x_force> macro. Always use the macro instead.
-
- char* sv_pvutf8n_force(SV* sv, STRLEN* lp)
-
-=for hackers
-Found in file sv.c
-
-=item sv_reftype
-X<sv_reftype>
-
-Returns a string describing what the SV is a reference to.
-
- const char* sv_reftype(const SV* sv, int ob)
-
-=for hackers
-Found in file sv.c
-
-=item sv_replace
-X<sv_replace>
-
-Make the first argument a copy of the second, then delete the original.
-The target SV physically takes over ownership of the body of the source SV
-and inherits its flags; however, the target keeps any magic it owns,
-and any magic in the source is discarded.
-Note that this is a rather specialist SV copying operation; most of the
-time you'll want to use C<sv_setsv> or one of its many macro front-ends.
-
- void sv_replace(SV* sv, SV* nsv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_reset
-X<sv_reset>
-
-Underlying implementation for the C<reset> Perl function.
-Note that the perl-level function is vaguely deprecated.
-
- void sv_reset(const char* s, HV* stash)
-
-=for hackers
-Found in file sv.c
-
-=item sv_rvweaken
-X<sv_rvweaken>
-
-Weaken a reference: set the C<SvWEAKREF> flag on this RV; give the
-referred-to SV C<PERL_MAGIC_backref> magic if it hasn't already; and
-push a back-reference to this RV onto the array of backreferences
-associated with that magic. If the RV is magical, set magic will be
-called after the RV is cleared.
-
- SV* sv_rvweaken(SV *sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setiv
-X<sv_setiv>
-
-Copies an integer into the given SV, upgrading first if necessary.
-Does not handle 'set' magic. See also C<sv_setiv_mg>.
-
- void sv_setiv(SV* sv, IV num)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setiv_mg
-X<sv_setiv_mg>
-
-Like C<sv_setiv>, but also handles 'set' magic.
-
- void sv_setiv_mg(SV *sv, IV i)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setnv
-X<sv_setnv>
-
-Copies a double into the given SV, upgrading first if necessary.
-Does not handle 'set' magic. See also C<sv_setnv_mg>.
-
- void sv_setnv(SV* sv, NV num)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setnv_mg
-X<sv_setnv_mg>
-
-Like C<sv_setnv>, but also handles 'set' magic.
-
- void sv_setnv_mg(SV *sv, NV num)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setpv
-X<sv_setpv>
-
-Copies a string into an SV. The string must be null-terminated. Does not
-handle 'set' magic. See C<sv_setpv_mg>.
-
- void sv_setpv(SV* sv, const char* ptr)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setpvf
-X<sv_setpvf>
-
-Works like C<sv_catpvf> but copies the text into the SV instead of
-appending it. Does not handle 'set' magic. See C<sv_setpvf_mg>.
-
- void sv_setpvf(SV* sv, const char* pat, ...)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setpvf_mg
-X<sv_setpvf_mg>
-
-Like C<sv_setpvf>, but also handles 'set' magic.
-
- void sv_setpvf_mg(SV *sv, const char* pat, ...)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setpviv
-X<sv_setpviv>
-
-Copies an integer into the given SV, also updating its string value.
-Does not handle 'set' magic. See C<sv_setpviv_mg>.
-
- void sv_setpviv(SV* sv, IV num)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setpviv_mg
-X<sv_setpviv_mg>
-
-Like C<sv_setpviv>, but also handles 'set' magic.
-
- void sv_setpviv_mg(SV *sv, IV iv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setpvn
-X<sv_setpvn>
-
-Copies a string into an SV. The C<len> parameter indicates the number of
-bytes to be copied. If the C<ptr> argument is NULL the SV will become
-undefined. Does not handle 'set' magic. See C<sv_setpvn_mg>.
-
- void sv_setpvn(SV* sv, const char* ptr, STRLEN len)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setpvn_mg
-X<sv_setpvn_mg>
-
-Like C<sv_setpvn>, but also handles 'set' magic.
-
- void sv_setpvn_mg(SV *sv, const char *ptr, STRLEN len)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setpvs
-X<sv_setpvs>
-
-Like C<sv_setpvn>, but takes a literal string instead of a string/length pair.
-
- void sv_setpvs(SV* sv, const char* s)
-
-=for hackers
-Found in file handy.h
-
-=item sv_setpv_mg
-X<sv_setpv_mg>
-
-Like C<sv_setpv>, but also handles 'set' magic.
-
- void sv_setpv_mg(SV *sv, const char *ptr)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setref_iv
-X<sv_setref_iv>
-
-Copies an integer into a new SV, optionally blessing the SV. The C<rv>
-argument will be upgraded to an RV. That RV will be modified to point to
-the new SV. The C<classname> argument indicates the package for the
-blessing. Set C<classname> to C<NULL> to avoid the blessing. The new SV
-will have a reference count of 1, and the RV will be returned.
-
- SV* sv_setref_iv(SV* rv, const char* classname, IV iv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setref_nv
-X<sv_setref_nv>
-
-Copies a double into a new SV, optionally blessing the SV. The C<rv>
-argument will be upgraded to an RV. That RV will be modified to point to
-the new SV. The C<classname> argument indicates the package for the
-blessing. Set C<classname> to C<NULL> to avoid the blessing. The new SV
-will have a reference count of 1, and the RV will be returned.
-
- SV* sv_setref_nv(SV* rv, const char* classname, NV nv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setref_pv
-X<sv_setref_pv>
-
-Copies a pointer into a new SV, optionally blessing the SV. The C<rv>
-argument will be upgraded to an RV. That RV will be modified to point to
-the new SV. If the C<pv> argument is NULL then C<PL_sv_undef> will be placed
-into the SV. The C<classname> argument indicates the package for the
-blessing. Set C<classname> to C<NULL> to avoid the blessing. The new SV
-will have a reference count of 1, and the RV will be returned.
-
-Do not use with other Perl types such as HV, AV, SV, CV, because those
-objects will become corrupted by the pointer copy process.
-
-Note that C<sv_setref_pvn> copies the string while this copies the pointer.
-
- SV* sv_setref_pv(SV* rv, const char* classname, void* pv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setref_pvn
-X<sv_setref_pvn>
-
-Copies a string into a new SV, optionally blessing the SV. The length of the
-string must be specified with C<n>. The C<rv> argument will be upgraded to
-an RV. That RV will be modified to point to the new SV. The C<classname>
-argument indicates the package for the blessing. Set C<classname> to
-C<NULL> to avoid the blessing. The new SV will have a reference count
-of 1, and the RV will be returned.
-
-Note that C<sv_setref_pv> copies the pointer while this copies the string.
-
- SV* sv_setref_pvn(SV* rv, const char* classname, const char* pv, STRLEN n)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setref_uv
-X<sv_setref_uv>
-
-Copies an unsigned integer into a new SV, optionally blessing the SV. The C<rv>
-argument will be upgraded to an RV. That RV will be modified to point to
-the new SV. The C<classname> argument indicates the package for the
-blessing. Set C<classname> to C<NULL> to avoid the blessing. The new SV
-will have a reference count of 1, and the RV will be returned.
-
- SV* sv_setref_uv(SV* rv, const char* classname, UV uv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setsv
-X<sv_setsv>
-
-Copies the contents of the source SV C<ssv> into the destination SV
-C<dsv>. The source SV may be destroyed if it is mortal, so don't use this
-function if the source SV needs to be reused. Does not handle 'set' magic.
-Loosely speaking, it performs a copy-by-value, obliterating any previous
-content of the destination.
-
-You probably want to use one of the assortment of wrappers, such as
-C<SvSetSV>, C<SvSetSV_nosteal>, C<SvSetMagicSV> and
-C<SvSetMagicSV_nosteal>.
-
- void sv_setsv(SV* dsv, SV* ssv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setsv_flags
-X<sv_setsv_flags>
-
-Copies the contents of the source SV C<ssv> into the destination SV
-C<dsv>. The source SV may be destroyed if it is mortal, so don't use this
-function if the source SV needs to be reused. Does not handle 'set' magic.
-Loosely speaking, it performs a copy-by-value, obliterating any previous
-content of the destination.
-If the C<flags> parameter has the C<SV_GMAGIC> bit set, will C<mg_get> on
-C<ssv> if appropriate, else not. If the C<flags> parameter has the
-C<NOSTEAL> bit set then the buffers of temps will not be stolen. <sv_setsv>
-and C<sv_setsv_nomg> are implemented in terms of this function.
-
-You probably want to use one of the assortment of wrappers, such as
-C<SvSetSV>, C<SvSetSV_nosteal>, C<SvSetMagicSV> and
-C<SvSetMagicSV_nosteal>.
-
-This is the primary function for copying scalars, and most other
-copy-ish functions and macros use this underneath.
-
- void sv_setsv_flags(SV* dsv, SV* ssv, I32 flags)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setsv_mg
-X<sv_setsv_mg>
-
-Like C<sv_setsv>, but also handles 'set' magic.
-
- void sv_setsv_mg(SV *dstr, SV *sstr)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setuv
-X<sv_setuv>
-
-Copies an unsigned integer into the given SV, upgrading first if necessary.
-Does not handle 'set' magic. See also C<sv_setuv_mg>.
-
- void sv_setuv(SV* sv, UV num)
-
-=for hackers
-Found in file sv.c
-
-=item sv_setuv_mg
-X<sv_setuv_mg>
-
-Like C<sv_setuv>, but also handles 'set' magic.
-
- void sv_setuv_mg(SV *sv, UV u)
-
-=for hackers
-Found in file sv.c
-
-=item sv_tainted
-X<sv_tainted>
-
-Test an SV for taintedness. Use C<SvTAINTED> instead.
- bool sv_tainted(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_true
-X<sv_true>
-
-Returns true if the SV has a true value by Perl's rules.
-Use the C<SvTRUE> macro instead, which may call C<sv_true()> or may
-instead use an in-line version.
-
- I32 sv_true(SV *sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_unmagic
-X<sv_unmagic>
-
-Removes all magic of type C<type> from an SV.
-
- int sv_unmagic(SV* sv, int type)
-
-=for hackers
-Found in file sv.c
-
-=item sv_unref_flags
-X<sv_unref_flags>
-
-Unsets the RV status of the SV, and decrements the reference count of
-whatever was being referenced by the RV. This can almost be thought of
-as a reversal of C<newSVrv>. The C<cflags> argument can contain
-C<SV_IMMEDIATE_UNREF> to force the reference count to be decremented
-(otherwise the decrementing is conditional on the reference count being
-different from one or the reference being a readonly SV).
-See C<SvROK_off>.
-
- void sv_unref_flags(SV* sv, U32 flags)
-
-=for hackers
-Found in file sv.c
-
-=item sv_untaint
-X<sv_untaint>
-
-Untaint an SV. Use C<SvTAINTED_off> instead.
- void sv_untaint(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_upgrade
-X<sv_upgrade>
-
-Upgrade an SV to a more complex form. Generally adds a new body type to the
-SV, then copies across as much information as possible from the old body.
-You generally want to use the C<SvUPGRADE> macro wrapper. See also C<svtype>.
-
- void sv_upgrade(SV* sv, svtype new_type)
-
-=for hackers
-Found in file sv.c
-
-=item sv_usepvn_flags
-X<sv_usepvn_flags>
-
-Tells an SV to use C<ptr> to find its string value. Normally the
-string is stored inside the SV but sv_usepvn allows the SV to use an
-outside string. The C<ptr> should point to memory that was allocated
-by C<malloc>. The string length, C<len>, must be supplied. By default
-this function will realloc (i.e. move) the memory pointed to by C<ptr>,
-so that pointer should not be freed or used by the programmer after
-giving it to sv_usepvn, and neither should any pointers from "behind"
-that pointer (e.g. ptr + 1) be used.
-
-If C<flags> & SV_SMAGIC is true, will call SvSETMAGIC. If C<flags> &
-SV_HAS_TRAILING_NUL is true, then C<ptr[len]> must be NUL, and the realloc
-will be skipped. (i.e. the buffer is actually at least 1 byte longer than
-C<len>, and already meets the requirements for storing in C<SvPVX>)
-
- void sv_usepvn_flags(SV* sv, char* ptr, STRLEN len, U32 flags)
-
-=for hackers
-Found in file sv.c
-
-=item sv_utf8_decode
-X<sv_utf8_decode>
-
-If the PV of the SV is an octet sequence in UTF-8
-and contains a multiple-byte character, the C<SvUTF8> flag is turned on
-so that it looks like a character. If the PV contains only single-byte
-characters, the C<SvUTF8> flag stays being off.
-Scans PV for validity and returns false if the PV is invalid UTF-8.
-
-NOTE: this function is experimental and may change or be
-removed without notice.
-
- bool sv_utf8_decode(SV *sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_utf8_downgrade
-X<sv_utf8_downgrade>
-
-Attempts to convert the PV of an SV from characters to bytes.
-If the PV contains a character beyond byte, this conversion will fail;
-in this case, either returns false or, if C<fail_ok> is not
-true, croaks.
-
-This is not as a general purpose Unicode to byte encoding interface:
-use the Encode extension for that.
-
-NOTE: this function is experimental and may change or be
-removed without notice.
-
- bool sv_utf8_downgrade(SV *sv, bool fail_ok)
-
-=for hackers
-Found in file sv.c
-
-=item sv_utf8_encode
-X<sv_utf8_encode>
-
-Converts the PV of an SV to UTF-8, but then turns the C<SvUTF8>
-flag off so that it looks like octets again.
-
- void sv_utf8_encode(SV *sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_utf8_upgrade
-X<sv_utf8_upgrade>
-
-Converts the PV of an SV to its UTF-8-encoded form.
-Forces the SV to string form if it is not already.
-Always sets the SvUTF8 flag to avoid future validity checks even
-if all the bytes have hibit clear.
-
-This is not as a general purpose byte encoding to Unicode interface:
-use the Encode extension for that.
-
- STRLEN sv_utf8_upgrade(SV *sv)
-
-=for hackers
-Found in file sv.c
-
-=item sv_utf8_upgrade_flags
-X<sv_utf8_upgrade_flags>
-
-Converts the PV of an SV to its UTF-8-encoded form.
-Forces the SV to string form if it is not already.
-Always sets the SvUTF8 flag to avoid future validity checks even
-if all the bytes have hibit clear. If C<flags> has C<SV_GMAGIC> bit set,
-will C<mg_get> on C<sv> if appropriate, else not. C<sv_utf8_upgrade> and
-C<sv_utf8_upgrade_nomg> are implemented in terms of this function.
-
-This is not as a general purpose byte encoding to Unicode interface:
-use the Encode extension for that.
-
- STRLEN sv_utf8_upgrade_flags(SV *sv, I32 flags)
-
-=for hackers
-Found in file sv.c
-
-=item sv_vcatpvf
-X<sv_vcatpvf>
-
-Processes its arguments like C<vsprintf> and appends the formatted output
-to an SV. Does not handle 'set' magic. See C<sv_vcatpvf_mg>.
-
-Usually used via its frontend C<sv_catpvf>.
-
- void sv_vcatpvf(SV* sv, const char* pat, va_list* args)
-
-=for hackers
-Found in file sv.c
-
-=item sv_vcatpvfn
-X<sv_vcatpvfn>
-
-Processes its arguments like C<vsprintf> and appends the formatted output
-to an SV. Uses an array of SVs if the C style variable argument list is
-missing (NULL). When running with taint checks enabled, indicates via
-C<maybe_tainted> if results are untrustworthy (often due to the use of
-locales).
-
-Usually used via one of its frontends C<sv_vcatpvf> and C<sv_vcatpvf_mg>.
-
- void sv_vcatpvfn(SV* sv, const char* pat, STRLEN patlen, va_list* args, SV** svargs, I32 svmax, bool *maybe_tainted)
-
-=for hackers
-Found in file sv.c
-
-=item sv_vcatpvf_mg
-X<sv_vcatpvf_mg>
-
-Like C<sv_vcatpvf>, but also handles 'set' magic.
-
-Usually used via its frontend C<sv_catpvf_mg>.
-
- void sv_vcatpvf_mg(SV* sv, const char* pat, va_list* args)
-
-=for hackers
-Found in file sv.c
-
-=item sv_vsetpvf
-X<sv_vsetpvf>
-
-Works like C<sv_vcatpvf> but copies the text into the SV instead of
-appending it. Does not handle 'set' magic. See C<sv_vsetpvf_mg>.
-
-Usually used via its frontend C<sv_setpvf>.
-
- void sv_vsetpvf(SV* sv, const char* pat, va_list* args)
-
-=for hackers
-Found in file sv.c
-
-=item sv_vsetpvfn
-X<sv_vsetpvfn>
-
-Works like C<sv_vcatpvfn> but copies the text into the SV instead of
-appending it.
-
-Usually used via one of its frontends C<sv_vsetpvf> and C<sv_vsetpvf_mg>.
-
- void sv_vsetpvfn(SV* sv, const char* pat, STRLEN patlen, va_list* args, SV** svargs, I32 svmax, bool *maybe_tainted)
-
-=for hackers
-Found in file sv.c
-
-=item sv_vsetpvf_mg
-X<sv_vsetpvf_mg>
-
-Like C<sv_vsetpvf>, but also handles 'set' magic.
-
-Usually used via its frontend C<sv_setpvf_mg>.
-
- void sv_vsetpvf_mg(SV* sv, const char* pat, va_list* args)
-
-=for hackers
-Found in file sv.c
-
-
-=back
-
-=head1 Unicode Support
-
-=over 8
-
-=item bytes_from_utf8
-X<bytes_from_utf8>
-
-Converts a string C<s> of length C<len> from UTF-8 into byte encoding.
-Unlike C<utf8_to_bytes> but like C<bytes_to_utf8>, returns a pointer to
-the newly-created string, and updates C<len> to contain the new
-length. Returns the original string if no conversion occurs, C<len>
-is unchanged. Do nothing if C<is_utf8> points to 0. Sets C<is_utf8> to
-0 if C<s> is converted or contains all 7bit characters.
-
-NOTE: this function is experimental and may change or be
-removed without notice.
-
- U8* bytes_from_utf8(const U8 *s, STRLEN *len, bool *is_utf8)
-
-=for hackers
-Found in file utf8.c
-
-=item bytes_to_utf8
-X<bytes_to_utf8>
-
-Converts a string C<s> of length C<len> from ASCII into UTF-8 encoding.
-Returns a pointer to the newly-created string, and sets C<len> to
-reflect the new length.
-
-If you want to convert to UTF-8 from other encodings than ASCII,
-see sv_recode_to_utf8().
-
-NOTE: this function is experimental and may change or be
-removed without notice.
-
- U8* bytes_to_utf8(const U8 *s, STRLEN *len)
-
-=for hackers
-Found in file utf8.c
-
-=item ibcmp_utf8
-X<ibcmp_utf8>
-
-Return true if the strings s1 and s2 differ case-insensitively, false
-if not (if they are equal case-insensitively). If u1 is true, the
-string s1 is assumed to be in UTF-8-encoded Unicode. If u2 is true,
-the string s2 is assumed to be in UTF-8-encoded Unicode. If u1 or u2
-are false, the respective string is assumed to be in native 8-bit
-encoding.
-
-If the pe1 and pe2 are non-NULL, the scanning pointers will be copied
-in there (they will point at the beginning of the I<next> character).
-If the pointers behind pe1 or pe2 are non-NULL, they are the end
-pointers beyond which scanning will not continue under any
-circumstances. If the byte lengths l1 and l2 are non-zero, s1+l1 and
-s2+l2 will be used as goal end pointers that will also stop the scan,
-and which qualify towards defining a successful match: all the scans
-that define an explicit length must reach their goal pointers for
-a match to succeed).
-
-For case-insensitiveness, the "casefolding" of Unicode is used
-instead of upper/lowercasing both the characters, see
-http://www.unicode.org/unicode/reports/tr21/ (Case Mappings).
-
- I32 ibcmp_utf8(const char* a, char **pe1, UV l1, bool u1, const char* b, char **pe2, UV l2, bool u2)
-
-=for hackers
-Found in file utf8.c
-
-=item is_utf8_char
-X<is_utf8_char>
-
-Tests if some arbitrary number of bytes begins in a valid UTF-8
-character. Note that an INVARIANT (i.e. ASCII) character is a valid
-UTF-8 character. The actual number of bytes in the UTF-8 character
-will be returned if it is valid, otherwise 0.
-
- STRLEN is_utf8_char(const U8 *p)
-
-=for hackers
-Found in file utf8.c
-
-=item is_utf8_string
-X<is_utf8_string>
-
-Returns true if first C<len> bytes of the given string form a valid
-UTF-8 string, false otherwise. Note that 'a valid UTF-8 string' does
-not mean 'a string that contains code points above 0x7F encoded in UTF-8'
-because a valid ASCII string is a valid UTF-8 string.
-
-See also is_utf8_string_loclen() and is_utf8_string_loc().
-
- bool is_utf8_string(const U8 *s, STRLEN len)
-
-=for hackers
-Found in file utf8.c
-
-=item is_utf8_string_loc
-X<is_utf8_string_loc>
-
-Like is_utf8_string() but stores the location of the failure (in the
-case of "utf8ness failure") or the location s+len (in the case of
-"utf8ness success") in the C<ep>.
-
-See also is_utf8_string_loclen() and is_utf8_string().
-
- bool is_utf8_string_loc(const U8 *s, STRLEN len, const U8 **p)
-
-=for hackers
-Found in file utf8.c
-
-=item is_utf8_string_loclen
-X<is_utf8_string_loclen>
-
-Like is_utf8_string() but stores the location of the failure (in the
-case of "utf8ness failure") or the location s+len (in the case of
-"utf8ness success") in the C<ep>, and the number of UTF-8
-encoded characters in the C<el>.
-
-See also is_utf8_string_loc() and is_utf8_string().
-
- bool is_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)
-
-=for hackers
-Found in file utf8.c
-
-=item pv_uni_display
-X<pv_uni_display>
-
-Build to the scalar dsv a displayable version of the string spv,
-length len, the displayable version being at most pvlim bytes long
-(if longer, the rest is truncated and "..." will be appended).
-
-The flags argument can have UNI_DISPLAY_ISPRINT set to display
-isPRINT()able characters as themselves, UNI_DISPLAY_BACKSLASH
-to display the \\[nrfta\\] as the backslashed versions (like '\n')
-(UNI_DISPLAY_BACKSLASH is preferred over UNI_DISPLAY_ISPRINT for \\).
-UNI_DISPLAY_QQ (and its alias UNI_DISPLAY_REGEX) have both
-UNI_DISPLAY_BACKSLASH and UNI_DISPLAY_ISPRINT turned on.
-
-The pointer to the PV of the dsv is returned.
-
- char* pv_uni_display(SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV flags)
-
-=for hackers
-Found in file utf8.c
-
-=item sv_cat_decode
-X<sv_cat_decode>
-
-The encoding is assumed to be an Encode object, the PV of the ssv is
-assumed to be octets in that encoding and decoding the input starts
-from the position which (PV + *offset) pointed to. The dsv will be
-concatenated the decoded UTF-8 string from ssv. Decoding will terminate
-when the string tstr appears in decoding output or the input ends on
-the PV of the ssv. The value which the offset points will be modified
-to the last input position on the ssv.
-
-Returns TRUE if the terminator was found, else returns FALSE.
-
- bool sv_cat_decode(SV* dsv, SV *encoding, SV *ssv, int *offset, char* tstr, int tlen)
-
-=for hackers
-Found in file sv.c
-
-=item sv_recode_to_utf8
-X<sv_recode_to_utf8>
-
-The encoding is assumed to be an Encode object, on entry the PV
-of the sv is assumed to be octets in that encoding, and the sv
-will be converted into Unicode (and UTF-8).
-
-If the sv already is UTF-8 (or if it is not POK), or if the encoding
-is not a reference, nothing is done to the sv. If the encoding is not
-an C<Encode::XS> Encoding object, bad things will happen.
-(See F<lib/encoding.pm> and L<Encode>).
-
-The PV of the sv is returned.
-
- char* sv_recode_to_utf8(SV* sv, SV *encoding)
-
-=for hackers
-Found in file sv.c
-
-=item sv_uni_display
-X<sv_uni_display>
-
-Build to the scalar dsv a displayable version of the scalar sv,
-the displayable version being at most pvlim bytes long
-(if longer, the rest is truncated and "..." will be appended).
-
-The flags argument is as in pv_uni_display().
-
-The pointer to the PV of the dsv is returned.
-
- char* sv_uni_display(SV *dsv, SV *ssv, STRLEN pvlim, UV flags)
-
-=for hackers
-Found in file utf8.c
-
-=item to_utf8_case
-X<to_utf8_case>
-
-The "p" contains the pointer to the UTF-8 string encoding
-the character that is being converted.
-
-The "ustrp" is a pointer to the character buffer to put the
-conversion result to. The "lenp" is a pointer to the length
-of the result.
-
-The "swashp" is a pointer to the swash to use.
-
-Both the special and normal mappings are stored lib/unicore/To/Foo.pl,
-and loaded by SWASHNEW, using lib/utf8_heavy.pl. The special (usually,
-but not always, a multicharacter mapping), is tried first.
-
-The "special" is a string like "utf8::ToSpecLower", which means the
-hash %utf8::ToSpecLower. The access to the hash is through
-Perl_to_utf8_case().
-
-The "normal" is a string like "ToLower" which means the swash
-%utf8::ToLower.
-
- UV to_utf8_case(const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special)
-
-=for hackers
-Found in file utf8.c
-
-=item to_utf8_fold
-X<to_utf8_fold>
-
-Convert the UTF-8 encoded character at p to its foldcase version and
-store that in UTF-8 in ustrp and its length in bytes in lenp. Note
-that the ustrp needs to be at least UTF8_MAXBYTES_CASE+1 bytes since the
-foldcase version may be longer than the original character (up to
-three characters).
-
-The first character of the foldcased version is returned
-(but note, as explained above, that there may be more.)
-
- UV to_utf8_fold(const U8 *p, U8* ustrp, STRLEN *lenp)
-
-=for hackers
-Found in file utf8.c
-
-=item to_utf8_lower
-X<to_utf8_lower>
-
-Convert the UTF-8 encoded character at p to its lowercase version and
-store that in UTF-8 in ustrp and its length in bytes in lenp. Note
-that the ustrp needs to be at least UTF8_MAXBYTES_CASE+1 bytes since the
-lowercase version may be longer than the original character.
-
-The first character of the lowercased version is returned
-(but note, as explained above, that there may be more.)
-
- UV to_utf8_lower(const U8 *p, U8* ustrp, STRLEN *lenp)
-
-=for hackers
-Found in file utf8.c
-
-=item to_utf8_title
-X<to_utf8_title>
-
-Convert the UTF-8 encoded character at p to its titlecase version and
-store that in UTF-8 in ustrp and its length in bytes in lenp. Note
-that the ustrp needs to be at least UTF8_MAXBYTES_CASE+1 bytes since the
-titlecase version may be longer than the original character.
-
-The first character of the titlecased version is returned
-(but note, as explained above, that there may be more.)
-
- UV to_utf8_title(const U8 *p, U8* ustrp, STRLEN *lenp)
-
-=for hackers
-Found in file utf8.c
-
-=item to_utf8_upper
-X<to_utf8_upper>
-
-Convert the UTF-8 encoded character at p to its uppercase version and
-store that in UTF-8 in ustrp and its length in bytes in lenp. Note
-that the ustrp needs to be at least UTF8_MAXBYTES_CASE+1 bytes since
-the uppercase version may be longer than the original character.
-
-The first character of the uppercased version is returned
-(but note, as explained above, that there may be more.)
-
- UV to_utf8_upper(const U8 *p, U8* ustrp, STRLEN *lenp)
-
-=for hackers
-Found in file utf8.c
-
-=item utf8n_to_uvchr
-X<utf8n_to_uvchr>
-
-flags
-
-Returns the native character value of the first character in the string
-C<s>
-which is assumed to be in UTF-8 encoding; C<retlen> will be set to the
-length, in bytes, of that character.
-
-Allows length and flags to be passed to low level routine.
-
- UV utf8n_to_uvchr(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
-
-=for hackers
-Found in file utf8.c
-
-=item utf8n_to_uvuni
-X<utf8n_to_uvuni>
-
-Bottom level UTF-8 decode routine.
-Returns the Unicode code point value of the first character in the string C<s>
-which is assumed to be in UTF-8 encoding and no longer than C<curlen>;
-C<retlen> will be set to the length, in bytes, of that character.
-
-If C<s> does not point to a well-formed UTF-8 character, the behaviour
-is dependent on the value of C<flags>: if it contains UTF8_CHECK_ONLY,
-it is assumed that the caller will raise a warning, and this function
-will silently just set C<retlen> to C<-1> and return zero. If the
-C<flags> does not contain UTF8_CHECK_ONLY, warnings about
-malformations will be given, C<retlen> will be set to the expected
-length of the UTF-8 character in bytes, and zero will be returned.
-
-The C<flags> can also contain various flags to allow deviations from
-the strict UTF-8 encoding (see F<utf8.h>).
-
-Most code should use utf8_to_uvchr() rather than call this directly.
-
- UV utf8n_to_uvuni(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
-
-=for hackers
-Found in file utf8.c
-
-=item utf8_distance
-X<utf8_distance>
-
-Returns the number of UTF-8 characters between the UTF-8 pointers C<a>
-and C<b>.
-
-WARNING: use only if you *know* that the pointers point inside the
-same UTF-8 buffer.
-
- IV utf8_distance(const U8 *a, const U8 *b)
-
-=for hackers
-Found in file utf8.c
-
-=item utf8_hop
-X<utf8_hop>
-
-Return the UTF-8 pointer C<s> displaced by C<off> characters, either
-forward or backward.
-
-WARNING: do not use the following unless you *know* C<off> is within
-the UTF-8 data pointed to by C<s> *and* that on entry C<s> is aligned
-on the first byte of character or just after the last byte of a character.
-
- U8* utf8_hop(const U8 *s, I32 off)
-
-=for hackers
-Found in file utf8.c
-
-=item utf8_length
-X<utf8_length>
-
-Return the length of the UTF-8 char encoded string C<s> in characters.
-Stops at C<e> (inclusive). If C<e E<lt> s> or if the scan would end
-up past C<e>, croaks.
-
- STRLEN utf8_length(const U8* s, const U8 *e)
-
-=for hackers
-Found in file utf8.c
-
-=item utf8_to_bytes
-X<utf8_to_bytes>
-
-Converts a string C<s> of length C<len> from UTF-8 into byte encoding.
-Unlike C<bytes_to_utf8>, this over-writes the original string, and
-updates len to contain the new length.
-Returns zero on failure, setting C<len> to -1.
-
-If you need a copy of the string, see C<bytes_from_utf8>.
-
-NOTE: this function is experimental and may change or be
-removed without notice.
-
- U8* utf8_to_bytes(U8 *s, STRLEN *len)
-
-=for hackers
-Found in file utf8.c
-
-=item utf8_to_uvchr
-X<utf8_to_uvchr>
-
-Returns the native character value of the first character in the string C<s>
-which is assumed to be in UTF-8 encoding; C<retlen> will be set to the
-length, in bytes, of that character.
-
-If C<s> does not point to a well-formed UTF-8 character, zero is
-returned and retlen is set, if possible, to -1.
-
- UV utf8_to_uvchr(const U8 *s, STRLEN *retlen)
-
-=for hackers
-Found in file utf8.c
-
-=item utf8_to_uvuni
-X<utf8_to_uvuni>
-
-Returns the Unicode code point of the first character in the string C<s>
-which is assumed to be in UTF-8 encoding; C<retlen> will be set to the
-length, in bytes, of that character.
-
-This function should only be used when returned UV is considered
-an index into the Unicode semantic tables (e.g. swashes).
-
-If C<s> does not point to a well-formed UTF-8 character, zero is
-returned and retlen is set, if possible, to -1.
-
- UV utf8_to_uvuni(const U8 *s, STRLEN *retlen)
-
-=for hackers
-Found in file utf8.c
-
-=item uvchr_to_utf8
-X<uvchr_to_utf8>
-
-Adds the UTF-8 representation of the Native codepoint C<uv> to the end
-of the string C<d>; C<d> should be have at least C<UTF8_MAXBYTES+1> free
-bytes available. The return value is the pointer to the byte after the
-end of the new character. In other words,
-
- d = uvchr_to_utf8(d, uv);
-
-is the recommended wide native character-aware way of saying
-
- *(d++) = uv;
-
- U8* uvchr_to_utf8(U8 *d, UV uv)
-
-=for hackers
-Found in file utf8.c
-
-=item uvuni_to_utf8_flags
-X<uvuni_to_utf8_flags>
-
-Adds the UTF-8 representation of the Unicode codepoint C<uv> to the end
-of the string C<d>; C<d> should be have at least C<UTF8_MAXBYTES+1> free
-bytes available. The return value is the pointer to the byte after the
-end of the new character. In other words,
-
- d = uvuni_to_utf8_flags(d, uv, flags);
-
-or, in most cases,
-
- d = uvuni_to_utf8(d, uv);
-
-(which is equivalent to)
-
- d = uvuni_to_utf8_flags(d, uv, 0);
-
-is the recommended Unicode-aware way of saying
-
- *(d++) = uv;
-
- U8* uvuni_to_utf8_flags(U8 *d, UV uv, UV flags)
-
-=for hackers
-Found in file utf8.c
-
-
-=back
-
-=head1 Variables created by C<xsubpp> and C<xsubpp> internal functions
-
-=over 8
-
-=item ax
-X<ax>
-
-Variable which is setup by C<xsubpp> to indicate the stack base offset,
-used by the C<ST>, C<XSprePUSH> and C<XSRETURN> macros. The C<dMARK> macro
-must be called prior to setup the C<MARK> variable.
-
- I32 ax
-
-=for hackers
-Found in file XSUB.h
-
-=item CLASS
-X<CLASS>
-
-Variable which is setup by C<xsubpp> to indicate the
-class name for a C++ XS constructor. This is always a C<char*>. See C<THIS>.
-
- char* CLASS
-
-=for hackers
-Found in file XSUB.h
-
-=item dAX
-X<dAX>
-
-Sets up the C<ax> variable.
-This is usually handled automatically by C<xsubpp> by calling C<dXSARGS>.
-
- dAX;
-
-=for hackers
-Found in file XSUB.h
-
-=item dAXMARK
-X<dAXMARK>
-
-Sets up the C<ax> variable and stack marker variable C<mark>.
-This is usually handled automatically by C<xsubpp> by calling C<dXSARGS>.
-
- dAXMARK;
-
-=for hackers
-Found in file XSUB.h
-
-=item dITEMS
-X<dITEMS>
-
-Sets up the C<items> variable.
-This is usually handled automatically by C<xsubpp> by calling C<dXSARGS>.
-
- dITEMS;
-
-=for hackers
-Found in file XSUB.h
-
-=item dUNDERBAR
-X<dUNDERBAR>
-
-Sets up the C<padoff_du> variable for an XSUB that wishes to use
-C<UNDERBAR>.
-
- dUNDERBAR;
-
-=for hackers
-Found in file XSUB.h
-
-=item dXSARGS
-X<dXSARGS>
-
-Sets up stack and mark pointers for an XSUB, calling dSP and dMARK.
-Sets up the C<ax> and C<items> variables by calling C<dAX> and C<dITEMS>.
-This is usually handled automatically by C<xsubpp>.
-
- dXSARGS;
-
-=for hackers
-Found in file XSUB.h
-
-=item dXSI32
-X<dXSI32>
-
-Sets up the C<ix> variable for an XSUB which has aliases. This is usually
-handled automatically by C<xsubpp>.
-
- dXSI32;
-
-=for hackers
-Found in file XSUB.h
-
-=item items
-X<items>
-
-Variable which is setup by C<xsubpp> to indicate the number of
-items on the stack. See L<perlxs/"Variable-length Parameter Lists">.
-
- I32 items
-
-=for hackers
-Found in file XSUB.h
-
-=item ix
-X<ix>
-
-Variable which is setup by C<xsubpp> to indicate which of an
-XSUB's aliases was used to invoke it. See L<perlxs/"The ALIAS: Keyword">.
-
- I32 ix
-
-=for hackers
-Found in file XSUB.h
-
-=item newXSproto
-X<newXSproto>
-
-Used by C<xsubpp> to hook up XSUBs as Perl subs. Adds Perl prototypes to
-the subs.
-
-=for hackers
-Found in file XSUB.h
-
-=item RETVAL
-X<RETVAL>
-
-Variable which is setup by C<xsubpp> to hold the return value for an
-XSUB. This is always the proper type for the XSUB. See
-L<perlxs/"The RETVAL Variable">.
-
- (whatever) RETVAL
-
-=for hackers
-Found in file XSUB.h
-
-=item ST
-X<ST>
-
-Used to access elements on the XSUB's stack.
-
- SV* ST(int ix)
-
-=for hackers
-Found in file XSUB.h
-
-=item THIS
-X<THIS>
-
-Variable which is setup by C<xsubpp> to designate the object in a C++
-XSUB. This is always the proper type for the C++ object. See C<CLASS> and
-L<perlxs/"Using XS With C++">.
-
- (whatever) THIS
-
-=for hackers
-Found in file XSUB.h
-
-=item UNDERBAR
-X<UNDERBAR>
-
-The SV* corresponding to the $_ variable. Works even if there
-is a lexical $_ in scope.
-
-=for hackers
-Found in file XSUB.h
-
-=item XS
-X<XS>
-
-Macro to declare an XSUB and its C parameter list. This is handled by
-C<xsubpp>.
-
-=for hackers
-Found in file XSUB.h
-
-=item XS_VERSION
-X<XS_VERSION>
-
-The version identifier for an XS module. This is usually
-handled automatically by C<ExtUtils::MakeMaker>. See C<XS_VERSION_BOOTCHECK>.
-
-=for hackers
-Found in file XSUB.h
-
-=item XS_VERSION_BOOTCHECK
-X<XS_VERSION_BOOTCHECK>
-
-Macro to verify that a PM module's $VERSION variable matches the XS
-module's C<XS_VERSION> variable. This is usually handled automatically by
-C<xsubpp>. See L<perlxs/"The VERSIONCHECK: Keyword">.
-
- XS_VERSION_BOOTCHECK;
-
-=for hackers
-Found in file XSUB.h
-
-
-=back
-
-=head1 Warning and Dieing
-
-=over 8
-
-=item croak
-X<croak>
-
-This is the XSUB-writer's interface to Perl's C<die> function.
-Normally call this function the same way you call the C C<printf>
-function. Calling C<croak> returns control directly to Perl,
-sidestepping the normal C order of execution. See C<warn>.
-
-If you want to throw an exception object, assign the object to
-C<$@> and then pass C<NULL> to croak():
-
- errsv = get_sv("@", TRUE);
- sv_setsv(errsv, exception_object);
- croak(NULL);
-
- void croak(const char* pat, ...)
-
-=for hackers
-Found in file util.c
-
-=item warn
-X<warn>
-
-This is the XSUB-writer's interface to Perl's C<warn> function. Call this
-function the same way you call the C C<printf> function. See C<croak>.
-
- void warn(const char* pat, ...)
-
-=for hackers
-Found in file util.c
-
-
-=back
-
-=head1 AUTHORS
-
-Until May 1997, this document was maintained by Jeff Okamoto
-<okamoto at corp.hp.com>. It is now maintained as part of Perl itself.
-
-With lots of help and suggestions from Dean Roehrich, Malcolm Beattie,
-Andreas Koenig, Paul Hudson, Ilya Zakharevich, Paul Marquess, Neil
-Bowers, Matthew Green, Tim Bunce, Spider Boardman, Ulrich Pfeifer,
-Stephen McCamant, and Gurusamy Sarathy.
-
-API Listing originally by Dean Roehrich <roehrich at cray.com>.
-
-Updated to be autogenerated from comments in the source by Benjamin Stuhl.
-
-=head1 SEE ALSO
-
-perlguts(1), perlxs(1), perlxstut(1), perlintern(1)
-
-=cut
-
- ex: set ro:
Deleted: vendor/perl/dist/pod/perlcompile.pod
===================================================================
--- vendor/perl/dist/pod/perlcompile.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlcompile.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,293 +0,0 @@
-=head1 NAME
-
-perlcompile - Introduction to the Perl Compiler-Translator
-
-=head1 DESCRIPTION
-
-Perl has always had a compiler: your source is compiled into an
-internal form (a parse tree) which is then optimized before being
-run. Since version 5.005, Perl has shipped with a module
-capable of inspecting the optimized parse tree (C<B>), and this has
-been used to write many useful utilities, including a module that lets
-you turn your Perl into C source code that can be compiled into a
-native executable.
-
-The C<B> module provides access to the parse tree, and other modules
-("back ends") do things with the tree. Some write it out as
-semi-human-readable text. Another traverses the parse tree to build a
-cross-reference of which subroutines, formats, and variables are used
-where. Another checks your code for dubious constructs. Yet another back
-end dumps the parse tree back out as Perl source, acting as a source code
-beautifier or deobfuscator.
-
-Because its original purpose was to be a way to produce C code
-corresponding to a Perl program, and in turn a native executable, the
-C<B> module and its associated back ends are known as "the
-compiler", even though they don't really compile anything.
-Different parts of the compiler are more accurately a "translator",
-or an "inspector", but people want Perl to have a "compiler
-option" not an "inspector gadget". What can you do?
-
-This document covers the use of the Perl compiler: which modules
-it comprises, how to use the most important of the back end modules,
-what problems there are, and how to work around them.
-
-=head2 Layout
-
-The compiler back ends are in the C<B::> hierarchy, and the front-end
-(the module that you, the user of the compiler, will sometimes
-interact with) is the O module.
-
-Here are the important back ends to know about, with their status
-expressed as a number from 0 (outline for later implementation) to
-10 (if there's a bug in it, we're very surprised):
-
-=over 4
-
-=item B::Lint
-
-Complains if it finds dubious constructs in your source code. Status:
-6 (it works adequately, but only has a very limited number of areas
-that it checks).
-
-=item B::Deparse
-
-Recreates the Perl source, making an attempt to format it coherently.
-Status: 8 (it works nicely, but a few obscure things are missing).
-
-=item B::Xref
-
-Reports on the declaration and use of subroutines and variables.
-Status: 8 (it works nicely, but still has a few lingering bugs).
-
-=back
-
-=head1 Using The Back Ends
-
-The following sections describe how to use the various compiler back
-ends. They're presented roughly in order of maturity, so that the
-most stable and proven back ends are described first, and the most
-experimental and incomplete back ends are described last.
-
-The O module automatically enabled the B<-c> flag to Perl, which
-prevents Perl from executing your code once it has been compiled.
-This is why all the back ends print:
-
- myperlprogram syntax OK
-
-before producing any other output.
-
-=head2 The Cross-Referencing Back End
-
-The cross-referencing back end (B::Xref) produces a report on your program,
-breaking down declarations and uses of subroutines and variables (and
-formats) by file and subroutine. For instance, here's part of the
-report from the I<pod2man> program that comes with Perl:
-
- Subroutine clear_noremap
- Package (lexical)
- $ready_to_print i1069, 1079
- Package main
- $& 1086
- $. 1086
- $0 1086
- $1 1087
- $2 1085, 1085
- $3 1085, 1085
- $ARGV 1086
- %HTML_Escapes 1085, 1085
-
-This shows the variables used in the subroutine C<clear_noremap>. The
-variable C<$ready_to_print> is a my() (lexical) variable,
-B<i>ntroduced (first declared with my()) on line 1069, and used on
-line 1079. The variable C<$&> from the main package is used on 1086,
-and so on.
-
-A line number may be prefixed by a single letter:
-
-=over 4
-
-=item i
-
-Lexical variable introduced (declared with my()) for the first time.
-
-=item &
-
-Subroutine or method call.
-
-=item s
-
-Subroutine defined.
-
-=item r
-
-Format defined.
-
-=back
-
-The most useful option the cross referencer has is to save the report
-to a separate file. For instance, to save the report on
-I<myperlprogram> to the file I<report>:
-
- $ perl -MO=Xref,-oreport myperlprogram
-
-=head2 The Decompiling Back End
-
-The Deparse back end turns your Perl source back into Perl source. It
-can reformat along the way, making it useful as a deobfuscator. The
-most basic way to use it is:
-
- $ perl -MO=Deparse myperlprogram
-
-You'll notice immediately that Perl has no idea of how to paragraph
-your code. You'll have to separate chunks of code from each other
-with newlines by hand. However, watch what it will do with
-one-liners:
-
- $ perl -MO=Deparse -e '$op=shift||die "usage: $0
- code [...]";chomp(@ARGV=<>)unless at ARGV; for(@ARGV){$was=$_;eval$op;
- die$@ if$@; rename$was,$_ unless$was eq $_}'
- -e syntax OK
- $op = shift @ARGV || die("usage: $0 code [...]");
- chomp(@ARGV = <ARGV>) unless @ARGV;
- foreach $_ (@ARGV) {
- $was = $_;
- eval $op;
- die $@ if $@;
- rename $was, $_ unless $was eq $_;
- }
-
-The decompiler has several options for the code it generates. For
-instance, you can set the size of each indent from 4 (as above) to
-2 with:
-
- $ perl -MO=Deparse,-si2 myperlprogram
-
-The B<-p> option adds parentheses where normally they are omitted:
-
- $ perl -MO=Deparse -e 'print "Hello, world\n"'
- -e syntax OK
- print "Hello, world\n";
- $ perl -MO=Deparse,-p -e 'print "Hello, world\n"'
- -e syntax OK
- print("Hello, world\n");
-
-See L<B::Deparse> for more information on the formatting options.
-
-=head2 The Lint Back End
-
-The lint back end (B::Lint) inspects programs for poor style. One
-programmer's bad style is another programmer's useful tool, so options
-let you select what is complained about.
-
-To run the style checker across your source code:
-
- $ perl -MO=Lint myperlprogram
-
-To disable context checks and undefined subroutines:
-
- $ perl -MO=Lint,-context,-undefined-subs myperlprogram
-
-See L<B::Lint> for information on the options.
-
-=head1 Module List for the Compiler Suite
-
-=over 4
-
-=item B
-
-This module is the introspective ("reflective" in Java terms)
-module, which allows a Perl program to inspect its innards. The
-back end modules all use this module to gain access to the compiled
-parse tree. You, the user of a back end module, will not need to
-interact with B.
-
-=item O
-
-This module is the front-end to the compiler's back ends. Normally
-called something like this:
-
- $ perl -MO=Deparse myperlprogram
-
-This is like saying C<use O 'Deparse'> in your Perl program.
-
-=item B::Concise
-
-This module prints a concise (but complete) version of the Perl parse
-tree. Its output is more customizable than the one of B::Terse or
-B::Debug (and it can emulate them). This module is useful for people who
-are writing their own back end, or who are learning about the Perl
-internals. It's not useful to the average programmer.
-
-=item B::Debug
-
-This module dumps the Perl parse tree in verbose detail to STDOUT.
-It's useful for people who are writing their own back end, or who
-are learning about the Perl internals. It's not useful to the
-average programmer.
-
-=item B::Deparse
-
-This module produces Perl source code from the compiled parse tree.
-It is useful in debugging and deconstructing other people's code,
-also as a pretty-printer for your own source. See
-L</"The Decompiling Back End"> for details about usage.
-
-=item B::Lint
-
-This module inspects the compiled form of your source code for things
-which, while some people frown on them, aren't necessarily bad enough
-to justify a warning. For instance, use of an array in scalar context
-without explicitly saying C<scalar(@array)> is something that Lint
-can identify. See L</"The Lint Back End"> for details about usage.
-
-=item B::Showlex
-
-This module prints out the my() variables used in a function or a
-file. To get a list of the my() variables used in the subroutine
-mysub() defined in the file myperlprogram:
-
- $ perl -MO=Showlex,mysub myperlprogram
-
-To get a list of the my() variables used in the file myperlprogram:
-
- $ perl -MO=Showlex myperlprogram
-
-[BROKEN]
-
-=item B::Terse
-
-This module prints the contents of the parse tree, but without as much
-information as B::Debug. For comparison, C<print "Hello, world.">
-produced 96 lines of output from B::Debug, but only 6 from B::Terse.
-
-This module is useful for people who are writing their own back end,
-or who are learning about the Perl internals. It's not useful to the
-average programmer.
-
-=item B::Xref
-
-This module prints a report on where the variables, subroutines, and
-formats are defined and used within a program and the modules it
-loads. See L</"The Cross-Referencing Back End"> for details about
-usage.
-
-=back
-
-=head1 KNOWN PROBLEMS
-
-BEGIN{} blocks are executed while compiling your code. Any external
-state that is initialized in BEGIN{}, such as opening files, initiating
-database connections etc., do not behave properly. To work around
-this, Perl has an INIT{} block that corresponds to code being executed
-before your program begins running but after your program has finished
-being compiled. Execution order: BEGIN{}, (possible save of state
-through compiler back-end), INIT{}, program runs, END{}.
-
-=head1 AUTHOR
-
-This document was originally written by Nathan Torkington, and is now
-maintained by the perl5-porters mailing list
-I<perl5-porters at perl.org>.
-
-=cut
Modified: vendor/perl/dist/pod/perldelta.pod
===================================================================
--- vendor/perl/dist/pod/perldelta.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perldelta.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -2,22 +2,16 @@
=head1 NAME
-perldelta - what is new for perl v5.18.1
+perldelta - what is new for perl v5.18.2
=head1 DESCRIPTION
-This document describes differences between the 5.18.0 release and the 5.18.1
+This document describes differences between the 5.18.1 release and the 5.18.2
release.
-If you are upgrading from an earlier release such as 5.16.0, first read
-L<perl5180delta>, which describes differences between 5.16.0 and 5.18.0.
+If you are upgrading from an earlier release such as 5.18.0, first read
+L<perl5181delta>, which describes differences between 5.18.0 and 5.18.1.
-=head1 Incompatible Changes
-
-There are no changes intentionally incompatible with 5.18.0
-If any exist, they are bugs, and we request that you submit a
-report. See L</Reporting Bugs> below.
-
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
@@ -26,153 +20,117 @@
=item *
-B has been upgraded from 1.42 to 1.42_01, fixing bugs related to lexical
-subroutines.
+L<B> has been upgraded from version 1.42_01 to 1.42_02.
-=item *
+The fix for [perl #118525] introduced a regression in the behaviour of
+C<B::CV::GV>, changing the return value from a C<B::SPECIAL> object on
+a C<NULL> C<CvGV> to C<undef>. C<B::CV::GV> again returns a
+C<B::SPECIAL> object in this case. [perl #119413]
-Digest::SHA has been upgraded from 5.84 to 5.84_01, fixing a crashing bug.
-[RT #118649]
-
=item *
-Module::CoreList has been upgraded from 2.89 to 2.96.
+L<B::Concise> has been upgraded from version 0.95 to 0.95_01.
-=back
+This fixes a bug in dumping unexpected SEPCIALs.
-=head1 Platform Support
+=item *
-=head2 Platform-Specific Notes
+L<English> has been upgraded from version 1.06 to 1.06_01. This fixes an
+error about the performance of C<$`>, C<$&>, and c<$'>.
-=over 4
+=item *
-=item AIX
+L<File::Glob> has been upgraded from version 1.20 to 1.20_01.
-A rarely-encounted configuration bug in the AIX hints file has been corrected.
+=back
-=item MidnightBSD
+=head1 Documentation
-After a patch to the relevant hints file, perl should now build correctly on
-MidnightBSD 0.4-RELEASE.
+=head2 Changes to Existing Documentation
-=back
-
-=head1 Selected Bug Fixes
-
=over 4
=item *
-Starting in v5.18.0, a construct like C</[#](?{})/x> would have its C<#>
-incorrectly interpreted as a comment. The code block would be skipped,
-unparsed. This has been corrected.
+L<perlrepository> has been restored with a pointer to more useful pages.
=item *
-A number of memory leaks related to the new, experimental regexp bracketed
-character class feature have been plugged.
+L<perlhack> has been updated with the latest changes from blead.
-=item *
+=back
-The OP allocation code now returns correctly aligned memory in all cases
-for C<struct pmop>. Previously it could return memory only aligned to a
-4-byte boundary, which is not correct for an ithreads build with 64 bit IVs
-on some 32 bit platforms. Notably, this caused the build to fail completely
-on sparc GNU/Linux. [RT #118055]
+=head1 Selected Bug Fixes
-=item *
+=over 4
-The debugger's C<man> command been fixed. It was broken in the v5.18.0
-release. The C<man> command is aliased to the names C<doc> and C<perldoc> -
-all now work again.
-
=item *
-C<@_> is now correctly visible in the debugger, fixing a regression
-introduced in v5.18.0's debugger. [RT #118169]
+Perl 5.18.1 introduced a regression along with a bugfix for lexical subs.
+Some B::SPECIAL results from B::CV::GV became undefs instead. This broke
+Devel::Cover among other libraries. This has been fixed. [perl #119351]
=item *
-Fixed a small number of regexp constructions that could either fail to
-match or crash perl when the string being matched against was
-allocated above the 2GB line on 32-bit systems. [RT #118175]
+Perl 5.18.0 introduced a regression whereby C<[:^ascii:]>, if used in the same
+character class as other qualifiers, would fail to match characters in the
+Latin-1 block. This has been fixed. [perl #120799]
=item *
-Perl v5.16 inadvertently introduced a bug whereby calls to XSUBs that were
-not visible at compile time were treated as lvalues and could be assigned
-to, even when the subroutine was not an lvalue sub. This has been fixed.
-[perl #117947]
+Perl 5.18.0 introduced a regression when using ->SUPER::method with AUTOLOAD
+by looking up AUTOLOAD from the current package, rather than the current
+package’s superclass. This has been fixed. [perl #120694]
=item *
-Perl v5.18 inadvertently introduced a bug whereby dual-vars (i.e.
-variables with both string and numeric values, such as C<$!> ) where the
-truthness of the variable was determined by the numeric value rather than
-the string value. [RT #118159]
+Perl 5.18.0 introduced a regression whereby C<-bareword> was no longer
+permitted under the C<strict> and C<integer> pragmata when used together. This
+has been fixed. [perl #120288]
=item *
-Perl v5.18 inadvertently introduced a bug whereby interpolating mixed up-
-and down-graded UTF-8 strings in a regex could result in malformed UTF-8
-in the pattern: specifically if a downgraded character in the range
-C<\x80..\xff> followed a UTF-8 string, e.g.
+Previously PerlIOBase_dup didn't check if pushing the new layer succeeded
+before (optionally) setting the utf8 flag. This could cause
+segfaults-by-nullpointer. This has been fixed.
- utf8::upgrade( my $u = "\x{e5}");
- utf8::downgrade(my $d = "\x{e5}");
- /$u$d/
-
-[perl #118297].
-
=item *
-Lexical constants (C<my sub a() { 42 }>) no longer crash when inlined.
+A buffer overflow with very long identifiers has been fixed.
=item *
-Parameter prototypes attached to lexical subroutines are now respected when
-compiling sub calls without parentheses. Previously, the prototypes were
-honoured only for calls I<with> parentheses. [RT #116735]
+A regression from 5.16 in the handling of padranges led to assertion failures
+if a keyword plugin declined to handle the second ‘my’, but only after creating
+a padop.
-=item *
+This affected, at least, Devel::CallParser under threaded builds.
-Syntax errors in lexical subroutines in combination with calls to the same
-subroutines no longer cause crashes at compile time.
+This has been fixed
=item *
-The dtrace sub-entry probe now works with lexical subs, instead of
-crashing [perl #118305].
+The construct C<< $r=qr/.../; /$r/p >> is now handled properly, an issue which
+had been worsened by changes 5.18.0. [perl #118213]
-=item *
-
-Undefining an inlinable lexical subroutine (C<my sub foo() { 42 } undef
-&foo>) would result in a crash if warnings were turned on.
-
-=item *
-
-Deep recursion warnings no longer crash lexical subroutines. [RT #118521]
-
=back
=head1 Acknowledgements
-Perl 5.18.1 represents approximately 2 months of development since Perl 5.18.0
-and contains approximately 8,400 lines of changes across 60 files from 12
+Perl 5.18.2 represents approximately 3 months of development since Perl
+5.18.1 and contains approximately 980 lines of changes across 39 files from 4
authors.
-Perl continues to flourish into its third decade thanks to a vibrant community
-of users and developers. The following people are known to have contributed the
-improvements that became Perl 5.18.1:
+Perl continues to flourish into its third decade thanks to a vibrant
+community of users and developers. The following people are known to have
+contributed the improvements that became Perl 5.18.2:
-Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, David
-Mitchell, Father Chrysostomos, Karl Williamson, Lukas Mai, Nicholas Clark,
-Peter Martini, Ricardo Signes, Shlomi Fish, Tony Cook.
+Craig A. Berry, David Mitchell, Ricardo Signes, Tony Cook.
-The list above is almost certainly incomplete as it is automatically generated
-from version control history. In particular, it does not include the names of
-the (very much appreciated) contributors who reported issues to the Perl bug
-tracker.
+The list above is almost certainly incomplete as it is automatically
+generated from version control history. In particular, it does not include
+the names of the (very much appreciated) contributors who reported issues to
+the Perl bug tracker.
Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
Deleted: vendor/perl/dist/pod/perldoc.pod
===================================================================
--- vendor/perl/dist/pod/perldoc.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perldoc.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,270 +0,0 @@
-
-=head1 NAME
-
-perldoc - Look up Perl documentation in Pod format.
-
-=head1 SYNOPSIS
-
-B<perldoc> [B<-h>] [B<-D>] [B<-t>] [B<-u>] [B<-m>] [B<-l>] [B<-F>]
-[B<-i>] [B<-V>] [B<-T>] [B<-r>]
-[B<-dI<destination_file>>]
-[B<-oI<formatname>>]
-[B<-MI<FormatterClassName>>]
-[B<-wI<formatteroption:value>>]
-[B<-n>I<nroff-replacement>]
-[B<-X>]
-[B<-L> I<language_code>]
-PageName|ModuleName|ProgramName
-
-B<perldoc> B<-f> BuiltinFunction
-
-B<perldoc> B<-L> it B<-f> BuiltinFunction
-
-B<perldoc> B<-q> FAQ Keyword
-
-B<perldoc> B<-L> fr B<-q> FAQ Keyword
-
-B<perldoc> B<-v> PerlVariable
-
-See below for more description of the switches.
-
-=head1 DESCRIPTION
-
-I<perldoc> looks up a piece of documentation in .pod format that is embedded
-in the perl installation tree or in a perl script, and displays it via
-C<pod2man | nroff -man | $PAGER>. (In addition, if running under HP-UX,
-C<col -x> will be used.) This is primarily used for the documentation for
-the perl library modules.
-
-Your system may also have man pages installed for those modules, in
-which case you can probably just use the man(1) command.
-
-If you are looking for a table of contents to the Perl library modules
-documentation, see the L<perltoc> page.
-
-=head1 OPTIONS
-
-=over 5
-
-=item B<-h>
-
-Prints out a brief B<h>elp message.
-
-=item B<-D>
-
-B<D>escribes search for the item in B<d>etail.
-
-=item B<-t>
-
-Display docs using plain B<t>ext converter, instead of nroff. This may be faster,
-but it probably won't look as nice.
-
-=item B<-u>
-
-Skip the real Pod formatting, and just show the raw Pod source (B<U>nformatted)
-
-=item B<-m> I<module>
-
-Display the entire module: both code and unformatted pod documentation.
-This may be useful if the docs don't explain a function in the detail
-you need, and you'd like to inspect the code directly; perldoc will find
-the file for you and simply hand it off for display.
-
-=item B<-l>
-
-Display onB<l>y the file name of the module found.
-
-=item B<-F>
-
-Consider arguments as file names; no search in directories will be performed.
-
-=item B<-f> I<perlfunc>
-
-The B<-f> option followed by the name of a perl built-in function will
-extract the documentation of this function from L<perlfunc>.
-
-Example:
-
- perldoc -f sprintf
-
-
-=item B<-q> I<perlfaq-search-regexp>
-
-The B<-q> option takes a regular expression as an argument. It will search
-the B<q>uestion headings in perlfaq[1-9] and print the entries matching
-the regular expression.
-
-Example:
-
- perldoc -q shuffle
-
-
-=item B<-v> I<perlvar>
-
-The B<-v> option followed by the name of a Perl predefined variable will
-extract the documentation of this variable from L<perlvar>.
-
-Examples:
-
- perldoc -v '$"'
- perldoc -v @+
- perldoc -v DATA
-
-
-=item B<-T>
-
-This specifies that the output is not to be sent to a pager, but is to
-be sent right to STDOUT.
-
-=item B<-d> I<destination-filename>
-
-This specifies that the output is to be sent neither to a pager nor
-to STDOUT, but is to be saved to the specified filename. Example:
-C<perldoc -oLaTeX -dtextwrapdocs.tex Text::Wrap>
-
-=item B<-o> I<output-formatname>
-
-This specifies that you want Perldoc to try using a Pod-formatting
-class for the output format that you specify. For example:
-C<-oman>. This is actually just a wrapper around the C<-M> switch;
-using C<-oI<formatname>> just looks for a loadable class by adding
-that format name (with different capitalizations) to the end of
-different classname prefixes.
-
-For example, C<-oLaTeX> currently tries all of the following classes:
-Pod::Perldoc::ToLaTeX Pod::Perldoc::Tolatex Pod::Perldoc::ToLatex
-Pod::Perldoc::ToLATEX Pod::Simple::LaTeX Pod::Simple::latex
-Pod::Simple::Latex Pod::Simple::LATEX Pod::LaTeX Pod::latex Pod::Latex
-Pod::LATEX.
-
-=item B<-M> I<module-name>
-
-This specifies the module that you want to try using for formatting the
-pod. The class must at least provide a C<parse_from_file> method.
-For example: C<perldoc -MPod::Perldoc::ToChecker>.
-
-You can specify several classes to try by joining them with commas
-or semicolons, as in C<-MTk::SuperPod;Tk::Pod>.
-
-=item B<-w> I<option:value> or B<-w> I<option>
-
-This specifies an option to call the formatter B<w>ith. For example,
-C<-w textsize:15> will call
-C<< $formatter->textsize(15) >> on the formatter object before it is
-used to format the object. For this to be valid, the formatter class
-must provide such a method, and the value you pass should be valid.
-(So if C<textsize> expects an integer, and you do C<-w textsize:big>,
-expect trouble.)
-
-You can use C<-w optionname> (without a value) as shorthand for
-C<-w optionname:I<TRUE>>. This is presumably useful in cases of on/off
-features like: C<-w page_numbering>.
-
-You can use an "=" instead of the ":", as in: C<-w textsize=15>. This
-might be more (or less) convenient, depending on what shell you use.
-
-=item B<-X>
-
-Use an index if it is present. The B<-X> option looks for an entry
-whose basename matches the name given on the command line in the file
-C<$Config{archlib}/pod.idx>. The F<pod.idx> file should contain fully
-qualified filenames, one per line.
-
-=item B<-L> I<language_code>
-
-This allows one to specify the I<language code> for the desired language
-translation. If the C<POD2::E<lt>language_codeE<gt>> package isn't
-installed in your system, the switch is ignored.
-All available translation packages are to be found under the C<POD2::>
-namespace. See L<POD2::IT> (or L<POD2::FR>) to see how to create new
-localized C<POD2::*> documentation packages and integrate them into
-L<Pod::Perldoc>.
-
-=item B<PageName|ModuleName|ProgramName>
-
-The item you want to look up. Nested modules (such as C<File::Basename>)
-are specified either as C<File::Basename> or C<File/Basename>. You may also
-give a descriptive name of a page, such as C<perlfunc>.
-
-For simple names like 'foo', when the normal search fails to find
-a matching page, a search with the "perl" prefix is tried as well.
-So "perldoc intro" is enough to find/render "perlintro.pod".
-
-=item B<-n> I<some-formatter>
-
-Specify replacement for nroff
-
-=item B<-r>
-
-Recursive search.
-
-=item B<-i>
-
-Ignore case.
-
-=item B<-V>
-
-Displays the version of perldoc you're running.
-
-=back
-
-
-
-=head1 SECURITY
-
-Because B<perldoc> does not run properly tainted, and is known to
-have security issues, when run as the superuser it will attempt to
-drop privileges by setting the effective and real IDs to nobody's
-or nouser's account, or -2 if unavailable. If it cannot relinquish
-its privileges, it will not run.
-
-
-=head1 ENVIRONMENT
-
-Any switches in the C<PERLDOC> environment variable will be used before the
-command line arguments.
-
-Useful values for C<PERLDOC> include C<-oman>, C<-otext>, C<-otk>, C<-ortf>,
-C<-oxml>, and so on, depending on what modules you have on hand; or
-the formatter class may be specified exactly with C<-MPod::Perldoc::ToMan>
-or the like.
-
-C<perldoc> also searches directories
-specified by the C<PERL5LIB> (or C<PERLLIB> if C<PERL5LIB> is not
-defined) and C<PATH> environment variables.
-(The latter is so that embedded pods for executables, such as
-C<perldoc> itself, are available.)
-
-C<perldoc> will use, in order of preference, the pager defined in
-C<PERLDOC_PAGER>, C<MANPAGER>, or C<PAGER> before trying to find a pager
-on its own. (C<MANPAGER> is not used if C<perldoc> was told to display
-plain text or unformatted pod.)
-
-One useful value for C<PERLDOC_PAGER> is C<less -+C -E>.
-
-Having PERLDOCDEBUG set to a positive integer will make perldoc emit
-even more descriptive output than the C<-v> switch does; the higher the
-number, the more it emits.
-
-
-=head1 CHANGES
-
-Up to 3.14_05, the switch B<-v> was used to produce verbose
-messages of B<perldoc> operation, which is now enabled by B<-D>.
-
-=head1 SEE ALSO
-
-L<perlpod>, L<Pod::Perldoc>
-
-=head1 AUTHOR
-
-Current maintainer: Adriano R. Ferreira <ferreira at cpan.org>
-
-Past contributors are:
-Sean M. Burke <sburke at cpan.org>,
-Kenneth Albanowski <kjahds at kjahds.com>,
-Andy Dougherty <doughera at lafcol.lafayette.edu>,
-and many others.
-
-=cut
-
Deleted: vendor/perl/dist/pod/perlfaq.pod
===================================================================
--- vendor/perl/dist/pod/perlfaq.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlfaq.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1444 +0,0 @@
-=head1 NAME
-
-perlfaq - frequently asked questions about Perl
-
-=head1 DESCRIPTION
-
-The perlfaq comprises several documents that answer the most commonly
-asked questions about Perl and Perl programming. It's divided by topic
-into nine major sections outlined in this document.
-
-=head2 Where to get the perlfaq
-
-The perlfaq comes with the standard Perl distribution, so if you have Perl
-you should have the perlfaq. You should also have the C<perldoc> tool
-that lets you read the L<perlfaq>:
-
- $ perldoc perlfaq
-
-Besides your local system, you can find the perlfaq on the web, including
-at http://perldoc.perl.org/ .
-
-The perlfaq is an evolving document and you can read the latest version
-at http://faq.perl.org/ . The perlfaq-workers periodically post extracts
-of the latest perlfaq to comp.lang.perl.misc.
-
-The perlfaq documents are in the perl source tree (see
-L<perlgit>). The git repository notes all changes to the FAQ and
-holds the latest version of the working documents and may vary
-significantly from the version distributed with the latest version of
-Perl. Check the repository before sending your corrections.
-
-=head2 How to contribute to the perlfaq
-
-You can mail corrections, additions, and suggestions to
-C<< <perlfaq-workers AT perl DOT org> >>. The perlfaq volunteers use this
-address to coordinate their efforts and track the perlfaq development.
-They appreciate your contributions to the FAQ but do not have time to
-provide individual help, so don't use this address to ask FAQs.
-
-The perlfaq server posts extracts of the perlfaq to that newsgroup
-every 6 hours (or so), and the community of volunteers reviews and
-updates the answers. If you'd like to help review and update the
-answers, check out comp.lang.perl.misc.
-
-You can also fork the perl repository, make your changes, and send them
-to Perl 5 Porters. See L<perlgit>.
-
-=head2 What will happen if you mail your Perl programming problems to the authors?
-
-The perlfaq-workers like to keep all traffic on the perlfaq-workers list
-so that everyone can see the work being done (and the work that needs to
-be done). The mailing list serves as an official record. If you email the
-authors or maintainers directly, you'll probably get a reply asking you
-to post to the mailing list. If you don't get a reply, it probably means
-that the person never saw the message or didn't have time to deal with
-it. Posting to the list allows the volunteers with time to deal with it
-when others are busy.
-
-If you have a question that isn't in the FAQ and you would like help with
-it, try the resources in L<perlfaq2>.
-
-=head1 CREDITS
-
-Tom Christiansen wrote the original perlfaq then expanded it with the
-help of Nat Torkington. The perlfaq-workers maintain current document
-and the denizens of comp.lang.perl.misc regularly review and update the
-FAQ. Several people have contributed answers, corrections, and comments,
-and the perlfaq notes those contributions wherever appropriate.
-
-=head1 AUTHOR AND COPYRIGHT
-
-Tom Christiansen wrote the original version of this document.
-brian d foy C<< <bdfoy at cpan.org> >> wrote this version. See the
-individual perlfaq documents for additional copyright information.
-
-This document is available under the same terms as Perl itself. Code
-examples in all the perlfaq documents are in the public domain. Use
-them as you see fit (and at your own risk with no warranty from anyone).
-
-=head1 Table of Contents
-
-=over 4
-
-=item perlfaq - this document
-
-=item perlfaq1 - General Questions About Perl
-
-=item perlfaq2 - Obtaining and Learning about Perl
-
-=item perlfaq3 - Programming Tools
-
-=item perlfaq4 - Data Manipulation
-
-=item perlfaq5 - Files and Formats
-
-=item perlfaq6 - Regular Expressions
-
-=item perlfaq7 - General Perl Language Issues
-
-=item perlfaq8 - System Interaction
-
-=item perlfaq9 - Networking
-
-=back
-
-=head1 The Questions
-
-=head2 L<perlfaq1>: General Questions About Perl
-
-Very general, high-level questions about Perl.
-
-=over 4
-
-=item *
-
-What is Perl?
-
-=item *
-
-Who supports Perl? Who develops it? Why is it free?
-
-=item *
-
-Which version of Perl should I use?
-
-=item *
-
-What are Perl 4, Perl 5, or Perl 6?
-
-=item *
-
-What was Ponie?
-
-=item *
-
-What is Perl 6?
-
-=item *
-
-How stable is Perl?
-
-=item *
-
-Is Perl difficult to learn?
-
-=item *
-
-How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl?
-
-=item *
-
-Can I do [task] in Perl?
-
-=item *
-
-When shouldn't I program in Perl?
-
-=item *
-
-What's the difference between "perl" and "Perl"?
-
-=item *
-
-Is it a Perl program or a Perl script?
-
-=item *
-
-What is a JAPH?
-
-=item *
-
-Where can I get a list of Larry Wall witticisms?
-
-=item *
-
-How can I convince others to use Perl?
-
-=back
-
-
-=head2 L<perlfaq2>: Obtaining and Learning about Perl
-
-Where to find source and documentation for Perl, support, and related matters.
-
-=over 4
-
-=item *
-
-What machines support perl? Where do I get it?
-
-=item *
-
-How can I get a binary version of perl?
-
-=item *
-
-I don't have a C compiler. How can I build my own Perl interpreter?
-
-=item *
-
-I copied the perl binary from one machine to another, but scripts don't work.
-
-=item *
-
-I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work?
-
-=item *
-
-What modules and extensions are available for Perl? What is CPAN? What does CPAN/src/... mean?
-
-=item *
-
-Is there an ISO or ANSI certified version of Perl?
-
-=item *
-
-Where can I get information on Perl?
-
-=item *
-
-What are the Perl newsgroups on Usenet? Where do I post questions?
-
-=item *
-
-Where should I post source code?
-
-=item *
-
-Perl Books
-
-=item *
-
-Which magazines have Perl content?
-
-=item *
-
-What mailing lists are there for Perl?
-
-=item *
-
-Where are the archives for comp.lang.perl.misc?
-
-=item *
-
-Where can I buy a commercial version of perl?
-
-=item *
-
-Where do I send bug reports?
-
-=item *
-
-What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org?
-
-=back
-
-
-=head2 L<perlfaq3>: Programming Tools
-
-Programmer tools and programming support.
-
-=over 4
-
-=item *
-
-How do I do (anything)?
-
-=item *
-
-How can I use Perl interactively?
-
-=item *
-
-Is there a Perl shell?
-
-=item *
-
-How do I find which modules are installed on my system?
-
-=item *
-
-How do I debug my Perl programs?
-
-=item *
-
-How do I profile my Perl programs?
-
-=item *
-
-How do I cross-reference my Perl programs?
-
-=item *
-
-Is there a pretty-printer (formatter) for Perl?
-
-=item *
-
-Is there a ctags for Perl?
-
-=item *
-
-Is there an IDE or Windows Perl Editor?
-
-=item *
-
-Where can I get Perl macros for vi?
-
-=item *
-
-Where can I get perl-mode or cperl-mode for emacs?
-
-=item *
-
-How can I use curses with Perl?
-
-=item *
-
-How can I write a GUI (X, Tk, Gtk, etc.) in Perl?
-
-=item *
-
-How can I make my Perl program run faster?
-
-=item *
-
-How can I make my Perl program take less memory?
-
-=item *
-
-Is it safe to return a reference to local or lexical data?
-
-=item *
-
-How can I free an array or hash so my program shrinks?
-
-=item *
-
-How can I make my CGI script more efficient?
-
-=item *
-
-How can I hide the source for my Perl program?
-
-=item *
-
-How can I compile my Perl program into byte code or C?
-
-=item *
-
-How can I get C<#!perl> to work on [MS-DOS,NT,...]?
-
-=item *
-
-Can I write useful Perl programs on the command line?
-
-=item *
-
-Why don't Perl one-liners work on my DOS/Mac/VMS system?
-
-=item *
-
-Where can I learn about CGI or Web programming in Perl?
-
-=item *
-
-Where can I learn about object-oriented Perl programming?
-
-=item *
-
-Where can I learn about linking C with Perl?
-
-=item *
-
-I've read perlembed, perlguts, etc., but I can't embed perl in my C program; what am I doing wrong?
-
-=item *
-
-When I tried to run my script, I got this message. What does it mean?
-
-=item *
-
-What's MakeMaker?
-
-=back
-
-
-=head2 L<perlfaq4>: Data Manipulation
-
-Manipulating numbers, dates, strings, arrays, hashes, and miscellaneous data issues.
-
-=over 4
-
-=item *
-
-Why am I getting long decimals (eg, 19.9499999999999) instead of the numbers I should be getting (eg, 19.95)?
-
-=item *
-
-Why is int() broken?
-
-=item *
-
-Why isn't my octal data interpreted correctly?
-
-=item *
-
-Does Perl have a round() function? What about ceil() and floor()? Trig functions?
-
-=item *
-
-How do I convert between numeric representations/bases/radixes?
-
-=item *
-
-Why doesn't & work the way I want it to?
-
-=item *
-
-How do I multiply matrices?
-
-=item *
-
-How do I perform an operation on a series of integers?
-
-=item *
-
-How can I output Roman numerals?
-
-=item *
-
-Why aren't my random numbers random?
-
-=item *
-
-How do I get a random number between X and Y?
-
-=item *
-
-How do I find the day or week of the year?
-
-=item *
-
-How do I find the current century or millennium?
-
-=item *
-
-How can I compare two dates and find the difference?
-
-=item *
-
-How can I take a string and turn it into epoch seconds?
-
-=item *
-
-How can I find the Julian Day?
-
-=item *
-
-How do I find yesterday's date?
-
-=item *
-
-Does Perl have a Year 2000 or 2038 problem? Is Perl Y2K compliant?
-
-=item *
-
-How do I validate input?
-
-=item *
-
-How do I unescape a string?
-
-=item *
-
-How do I remove consecutive pairs of characters?
-
-=item *
-
-How do I expand function calls in a string?
-
-=item *
-
-How do I find matching/nesting anything?
-
-=item *
-
-How do I reverse a string?
-
-=item *
-
-How do I expand tabs in a string?
-
-=item *
-
-How do I reformat a paragraph?
-
-=item *
-
-How can I access or change N characters of a string?
-
-=item *
-
-How do I change the Nth occurrence of something?
-
-=item *
-
-How can I count the number of occurrences of a substring within a string?
-
-=item *
-
-How do I capitalize all the words on one line?
-
-=item *
-
-How can I split a [character]-delimited string except when inside [character]?
-
-=item *
-
-How do I strip blank space from the beginning/end of a string?
-
-=item *
-
-How do I pad a string with blanks or pad a number with zeroes?
-
-=item *
-
-How do I extract selected columns from a string?
-
-=item *
-
-How do I find the soundex value of a string?
-
-=item *
-
-How can I expand variables in text strings?
-
-=item *
-
-What's wrong with always quoting "$vars"?
-
-=item *
-
-Why don't my E<lt>E<lt>HERE documents work?
-
-=item *
-
-What is the difference between a list and an array?
-
-=item *
-
-What is the difference between $array[1] and @array[1]?
-
-=item *
-
-How can I remove duplicate elements from a list or array?
-
-=item *
-
-How can I tell whether a certain element is contained in a list or array?
-
-=item *
-
-How do I compute the difference of two arrays? How do I compute the intersection of two arrays?
-
-=item *
-
-How do I test whether two arrays or hashes are equal?
-
-=item *
-
-How do I find the first array element for which a condition is true?
-
-=item *
-
-How do I handle linked lists?
-
-=item *
-
-How do I handle circular lists?
-
-=item *
-
-How do I shuffle an array randomly?
-
-=item *
-
-How do I process/modify each element of an array?
-
-=item *
-
-How do I select a random element from an array?
-
-=item *
-
-How do I permute N elements of a list?
-
-=item *
-
-How do I sort an array by (anything)?
-
-=item *
-
-How do I manipulate arrays of bits?
-
-=item *
-
-Why does defined() return true on empty arrays and hashes?
-
-=item *
-
-How do I process an entire hash?
-
-=item *
-
-How do I merge two hashes?
-
-=item *
-
-What happens if I add or remove keys from a hash while iterating over it?
-
-=item *
-
-How do I look up a hash element by value?
-
-=item *
-
-How can I know how many entries are in a hash?
-
-=item *
-
-How do I sort a hash (optionally by value instead of key)?
-
-=item *
-
-How can I always keep my hash sorted?
-
-=item *
-
-What's the difference between "delete" and "undef" with hashes?
-
-=item *
-
-Why don't my tied hashes make the defined/exists distinction?
-
-=item *
-
-How do I reset an each() operation part-way through?
-
-=item *
-
-How can I get the unique keys from two hashes?
-
-=item *
-
-How can I store a multidimensional array in a DBM file?
-
-=item *
-
-How can I make my hash remember the order I put elements into it?
-
-=item *
-
-Why does passing a subroutine an undefined element in a hash create it?
-
-=item *
-
-How can I make the Perl equivalent of a C structure/C++ class/hash or array of hashes or arrays?
-
-=item *
-
-How can I use a reference as a hash key?
-
-=item *
-
-How can I check if a key exists in a multilevel hash?
-
-=item *
-
-How do I handle binary data correctly?
-
-=item *
-
-How do I determine whether a scalar is a number/whole/integer/float?
-
-=item *
-
-How do I keep persistent data across program calls?
-
-=item *
-
-How do I print out or copy a recursive data structure?
-
-=item *
-
-How do I define methods for every class/object?
-
-=item *
-
-How do I verify a credit card checksum?
-
-=item *
-
-How do I pack arrays of doubles or floats for XS code?
-
-=back
-
-
-=head2 L<perlfaq5>: Files and Formats
-
-I/O and the "f" issues: filehandles, flushing, formats, and footers.
-
-=over 4
-
-=item *
-
-How do I flush/unbuffer an output filehandle? Why must I do this?
-
-=item *
-
-How do I change, delete, or insert a line in a file, or append to the beginning of a file?
-
-=item *
-
-How do I count the number of lines in a file?
-
-=item *
-
-How do I delete the last N lines from a file?
-
-=item *
-
-How can I use Perl's C<-i> option from within a program?
-
-=item *
-
-How can I copy a file?
-
-=item *
-
-How do I make a temporary file name?
-
-=item *
-
-How can I manipulate fixed-record-length files?
-
-=item *
-
-How can I make a filehandle local to a subroutine? How do I pass filehandles between subroutines? How do I make an array of filehandles?
-
-=item *
-
-How can I use a filehandle indirectly?
-
-=item *
-
-How can I set up a footer format to be used with write()?
-
-=item *
-
-How can I write() into a string?
-
-=item *
-
-How can I open a filehandle to a string?
-
-=item *
-
-How can I output my numbers with commas added?
-
-=item *
-
-How can I translate tildes (~) in a filename?
-
-=item *
-
-How come when I open a file read-write it wipes it out?
-
-=item *
-
-Why do I sometimes get an "Argument list too long" when I use E<lt>*E<gt>?
-
-=item *
-
-Is there a leak/bug in glob()?
-
-=item *
-
-How can I open a file with a leading ">" or trailing blanks?
-
-=item *
-
-How can I reliably rename a file?
-
-=item *
-
-How can I lock a file?
-
-=item *
-
-Why can't I just open(FH, "E<gt>file.lock")?
-
-=item *
-
-I still don't get locking. I just want to increment the number in the file. How can I do this?
-
-=item *
-
-All I want to do is append a small amount of text to the end of a file. Do I still have to use locking?
-
-=item *
-
-How do I randomly update a binary file?
-
-=item *
-
-How do I get a file's timestamp in perl?
-
-=item *
-
-How do I set a file's timestamp in perl?
-
-=item *
-
-How do I print to more than one file at once?
-
-=item *
-
-How can I read in an entire file all at once?
-
-=item *
-
-How can I read in a file by paragraphs?
-
-=item *
-
-How can I read a single character from a file? From the keyboard?
-
-=item *
-
-How can I tell whether there's a character waiting on a filehandle?
-
-=item *
-
-How do I do a C<tail -f> in perl?
-
-=item *
-
-How do I dup() a filehandle in Perl?
-
-=item *
-
-How do I close a file descriptor by number?
-
-=item *
-
-Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work?
-
-=item *
-
-Why doesn't glob("*.*") get all the files?
-
-=item *
-
-Why does Perl let me delete read-only files? Why does C<-i> clobber protected files? Isn't this a bug in Perl?
-
-=item *
-
-How do I select a random line from a file?
-
-=item *
-
-Why do I get weird spaces when I print an array of lines?
-
-=item *
-
-How do I traverse a directory tree?
-
-=item *
-
-How do I delete a directory tree?
-
-=item *
-
-How do I copy an entire directory?
-
-=back
-
-
-=head2 L<perlfaq6>: Regular Expressions
-
-This section is surprisingly small because the rest of the FAQ is littered with answers involving regular expressions. For example, decoding a URL and checking whether something is a number are handled with regular expressions, but those answers are found elsewhere in this document (in L<perlfaq9>: "How do I decode or create those %-encodings on the web" and L<perlfaq4>: "How do I determine whether a scalar is a number/whole/integer/float", to be precise).
-
-=over 4
-
-=item *
-
-How can I hope to use regular expressions without creating illegible and unmaintainable code?
-
-=item *
-
-I'm having trouble matching over more than one line. What's wrong?
-
-=item *
-
-How can I pull out lines between two patterns that are themselves on different lines?
-
-=item *
-
-How do I match XML, HTML, or other nasty, ugly things with a regex?
-
-=item *
-
-I put a regular expression into $/ but it didn't work. What's wrong?
-
-=item *
-
-How do I substitute case-insensitively on the LHS while preserving case on the RHS?
-
-=item *
-
-How can I make C<\w> match national character sets?
-
-=item *
-
-How can I match a locale-smart version of C</[a-zA-Z]/>?
-
-=item *
-
-How can I quote a variable to use in a regex?
-
-=item *
-
-What is C</o> really for?
-
-=item *
-
-How do I use a regular expression to strip C-style comments from a file?
-
-=item *
-
-Can I use Perl regular expressions to match balanced text?
-
-=item *
-
-What does it mean that regexes are greedy? How can I get around it?
-
-=item *
-
-How do I process each word on each line?
-
-=item *
-
-How can I print out a word-frequency or line-frequency summary?
-
-=item *
-
-How can I do approximate matching?
-
-=item *
-
-How do I efficiently match many regular expressions at once?
-
-=item *
-
-Why don't word-boundary searches with C<\b> work for me?
-
-=item *
-
-Why does using $&, $`, or $' slow my program down?
-
-=item *
-
-What good is C<\G> in a regular expression?
-
-=item *
-
-Are Perl regexes DFAs or NFAs? Are they POSIX compliant?
-
-=item *
-
-What's wrong with using grep in a void context?
-
-=item *
-
-How can I match strings with multibyte characters?
-
-=item *
-
-How do I match a regular expression that's in a variable?
-
-=back
-
-
-=head2 L<perlfaq7>: General Perl Language Issues
-
-General Perl language issues that don't clearly fit into any of the other sections.
-
-=over 4
-
-=item *
-
-Can I get a BNF/yacc/RE for the Perl language?
-
-=item *
-
-What are all these $@%&* punctuation signs, and how do I know when to use them?
-
-=item *
-
-Do I always/never have to quote my strings or use semicolons and commas?
-
-=item *
-
-How do I skip some return values?
-
-=item *
-
-How do I temporarily block warnings?
-
-=item *
-
-What's an extension?
-
-=item *
-
-Why do Perl operators have different precedence than C operators?
-
-=item *
-
-How do I declare/create a structure?
-
-=item *
-
-How do I create a module?
-
-=item *
-
-How do I adopt or take over a module already on CPAN?
-
-=item *
-
-How do I create a class?
-
-=item *
-
-How can I tell if a variable is tainted?
-
-=item *
-
-What's a closure?
-
-=item *
-
-What is variable suicide and how can I prevent it?
-
-=item *
-
-How can I pass/return a {Function, FileHandle, Array, Hash, Method, Regex}?
-
-=item *
-
-How do I create a static variable?
-
-=item *
-
-What's the difference between dynamic and lexical (static) scoping? Between local() and my()?
-
-=item *
-
-How can I access a dynamic variable while a similarly named lexical is in scope?
-
-=item *
-
-What's the difference between deep and shallow binding?
-
-=item *
-
-Why doesn't "my($foo) = E<lt>FILEE<gt>;" work right?
-
-=item *
-
-How do I redefine a builtin function, operator, or method?
-
-=item *
-
-What's the difference between calling a function as &foo and foo()?
-
-=item *
-
-How do I create a switch or case statement?
-
-=item *
-
-How can I catch accesses to undefined variables, functions, or methods?
-
-=item *
-
-Why can't a method included in this same file be found?
-
-=item *
-
-How can I find out my current or calling package?
-
-=item *
-
-How can I comment out a large block of Perl code?
-
-=item *
-
-How do I clear a package?
-
-=item *
-
-How can I use a variable as a variable name?
-
-=item *
-
-What does "bad interpreter" mean?
-
-=back
-
-
-=head2 L<perlfaq8>: System Interaction
-
-This section of the Perl FAQ covers questions involving operating system interaction. Topics include interprocess communication (IPC), control over the user-interface (keyboard, screen and pointing devices), and most anything else not related to data manipulation. Read the FAQs and documentation specific to the port of perl to your operating system (eg, L<perlvms>, L<perlplan9>, ...). These should contain more detailed information on the vagaries of your perl.
-
-=over 4
-
-=item *
-
-How do I find out which operating system I'm running under?
-
-=item *
-
-How come exec() doesn't return?
-
-=item *
-
-How do I do fancy stuff with the keyboard/screen/mouse?
-
-=item *
-
-How do I print something out in color?
-
-=item *
-
-How do I read just one key without waiting for a return key?
-
-=item *
-
-How do I check whether input is ready on the keyboard?
-
-=item *
-
-How do I clear the screen?
-
-=item *
-
-How do I get the screen size?
-
-=item *
-
-How do I ask the user for a password?
-
-=item *
-
-How do I read and write the serial port?
-
-=item *
-
-How do I decode encrypted password files?
-
-=item *
-
-How do I start a process in the background?
-
-=item *
-
-How do I trap control characters/signals?
-
-=item *
-
-How do I modify the shadow password file on a Unix system?
-
-=item *
-
-How do I set the time and date?
-
-=item *
-
-How can I sleep() or alarm() for under a second?
-
-=item *
-
-How can I measure time under a second?
-
-=item *
-
-How can I do an atexit() or setjmp()/longjmp()? (Exception handling)
-
-=item *
-
-Why doesn't my sockets program work under System V (Solaris)? What does the error message "Protocol not supported" mean?
-
-=item *
-
-How can I call my system's unique C functions from Perl?
-
-=item *
-
-Where do I get the include files to do ioctl() or syscall()?
-
-=item *
-
-Why do setuid perl scripts complain about kernel problems?
-
-=item *
-
-How can I open a pipe both to and from a command?
-
-=item *
-
-Why can't I get the output of a command with system()?
-
-=item *
-
-How can I capture STDERR from an external command?
-
-=item *
-
-Why doesn't open() return an error when a pipe open fails?
-
-=item *
-
-What's wrong with using backticks in a void context?
-
-=item *
-
-How can I call backticks without shell processing?
-
-=item *
-
-Why can't my script read from STDIN after I gave it EOF (^D on Unix, ^Z on MS-DOS)?
-
-=item *
-
-How can I convert my shell script to perl?
-
-=item *
-
-Can I use perl to run a telnet or ftp session?
-
-=item *
-
-How can I write expect in Perl?
-
-=item *
-
-Is there a way to hide perl's command line from programs such as "ps"?
-
-=item *
-
-I {changed directory, modified my environment} in a perl script. How come the change disappeared when I exited the script? How do I get my changes to be visible?
-
-=item *
-
-How do I close a process's filehandle without waiting for it to complete?
-
-=item *
-
-How do I fork a daemon process?
-
-=item *
-
-How do I find out if I'm running interactively or not?
-
-=item *
-
-How do I timeout a slow event?
-
-=item *
-
-How do I set CPU limits?
-
-=item *
-
-How do I avoid zombies on a Unix system?
-
-=item *
-
-How do I use an SQL database?
-
-=item *
-
-How do I make a system() exit on control-C?
-
-=item *
-
-How do I open a file without blocking?
-
-=item *
-
-How do I tell the difference between errors from the shell and perl?
-
-=item *
-
-How do I install a module from CPAN?
-
-=item *
-
-What's the difference between require and use?
-
-=item *
-
-How do I keep my own module/library directory?
-
-=item *
-
-How do I add the directory my program lives in to the module/library search path?
-
-=item *
-
-How do I add a directory to my include path (@INC) at runtime?
-
-=item *
-
-What is socket.ph and where do I get it?
-
-=back
-
-
-=head2 L<perlfaq9>: Networking
-
-Networking, the internet, and a few on the web.
-
-=over 4
-
-=item *
-
-What is the correct form of response from a CGI script?
-
-=item *
-
-My CGI script runs from the command line but not the browser. (500 Server Error)
-
-=item *
-
-How can I get better error messages from a CGI program?
-
-=item *
-
-How do I remove HTML from a string?
-
-=item *
-
-How do I extract URLs?
-
-=item *
-
-How do I download a file from the user's machine? How do I open a file on another machine?
-
-=item *
-
-How do I make an HTML pop-up menu with Perl?
-
-=item *
-
-How do I fetch an HTML file?
-
-=item *
-
-How do I automate an HTML form submission?
-
-=item *
-
-How do I decode or create those %-encodings on the web?
-
-=item *
-
-How do I redirect to another page?
-
-=item *
-
-How do I put a password on my web pages?
-
-=item *
-
-How do I edit my .htpasswd and .htgroup files with Perl?
-
-=item *
-
-How do I make sure users can't enter values into a form that cause my CGI script to do bad things?
-
-=item *
-
-How do I parse a mail header?
-
-=item *
-
-How do I decode a CGI form?
-
-=item *
-
-How do I check a valid mail address?
-
-=item *
-
-How do I decode a MIME/BASE64 string?
-
-=item *
-
-How do I return the user's mail address?
-
-=item *
-
-How do I send mail?
-
-=item *
-
-How do I use MIME to make an attachment to a mail message?
-
-=item *
-
-How do I read mail?
-
-=item *
-
-How do I find out my hostname, domainname, or IP address?
-
-=item *
-
-How do I fetch a news article or the active newsgroups?
-
-=item *
-
-How do I fetch/put an FTP file?
-
-=item *
-
-How can I do RPC in Perl?
-
-=back
-
-
Deleted: vendor/perl/dist/pod/perlfaq1.pod
===================================================================
--- vendor/perl/dist/pod/perlfaq1.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlfaq1.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,413 +0,0 @@
-=head1 NAME
-
-perlfaq1 - General Questions About Perl
-
-=head1 DESCRIPTION
-
-This section of the FAQ answers very general, high-level questions
-about Perl.
-
-=head2 What is Perl?
-
-Perl is a high-level programming language with an eclectic heritage
-written by Larry Wall and a cast of thousands. It derives from the
-ubiquitous C programming language and to a lesser extent from sed,
-awk, the Unix shell, and at least a dozen other tools and languages.
-Perl's process, file, and text manipulation facilities make it
-particularly well-suited for tasks involving quick prototyping, system
-utilities, software tools, system management tasks, database access,
-graphical programming, networking, and world wide web programming.
-These strengths make it especially popular with system administrators
-and CGI script authors, but mathematicians, geneticists, journalists,
-and even managers also use Perl. Maybe you should, too.
-
-=head2 Who supports Perl? Who develops it? Why is it free?
-
-The original culture of the pre-populist Internet and the deeply-held
-beliefs of Perl's author, Larry Wall, gave rise to the free and open
-distribution policy of perl. Perl is supported by its users. The
-core, the standard Perl library, the optional modules, and the
-documentation you're reading now were all written by volunteers. See
-the personal note at the end of the README file in the perl source
-distribution for more details. See L<perlhist> (new as of 5.005)
-for Perl's milestone releases.
-
-In particular, the core development team (known as the Perl Porters)
-are a rag-tag band of highly altruistic individuals committed to
-producing better software for free than you could hope to purchase for
-money. You may snoop on pending developments via the archives at
-http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/
-and http://archive.develooper.com/perl5-porters@perl.org/
-or the news gateway nntp://nntp.perl.org/perl.perl5.porters or
-its web interface at http://nntp.perl.org/group/perl.perl5.porters ,
-or read the faq at http://dev.perl.org/perl5/docs/p5p-faq.html ,
-or you can subscribe to the mailing list by sending
-perl5-porters-subscribe at perl.org a subscription request
-(an empty message with no subject is fine).
-
-While the GNU project includes Perl in its distributions, there's no
-such thing as "GNU Perl". Perl is not produced nor maintained by the
-Free Software Foundation. Perl's licensing terms are also more open
-than GNU software's tend to be.
-
-You can get commercial support of Perl if you wish, although for most
-users the informal support will more than suffice. See the answer to
-"Where can I buy a commercial version of perl?" for more information.
-
-=head2 Which version of Perl should I use?
-
-(contributed by brian d foy)
-
-There is often a matter of opinion and taste, and there isn't any one
-answer that fits everyone. In general, you want to use either the current
-stable release, or the stable release immediately prior to that one.
-Currently, those are perl5.14.x and perl5.12.x, respectively.
-
-Beyond that, you have to consider several things and decide which is best
-for you.
-
-=over 4
-
-=item *
-
-If things aren't broken, upgrading perl may break them (or at least issue
-new warnings).
-
-=item *
-
-The latest versions of perl have more bug fixes.
-
-=item *
-
-The Perl community is geared toward supporting the most recent releases,
-so you'll have an easier time finding help for those.
-
-=item *
-
-Versions prior to perl5.004 had serious security problems with buffer
-overflows, and in some cases have CERT advisories (for instance,
-http://www.cert.org/advisories/CA-1997-17.html ).
-
-=item *
-
-The latest versions are probably the least deployed and widely tested, so
-you may want to wait a few months after their release and see what
-problems others have if you are risk averse.
-
-=item *
-
-The immediate, previous releases (i.e. perl5.8.x ) are usually maintained
-for a while, although not at the same level as the current releases.
-
-=item *
-
-No one is actively supporting Perl 4. Ten years ago it was a dead
-camel carcass (according to this document). Now it's barely a skeleton
-as its whitewashed bones have fractured or eroded.
-
-=item *
-
-There is no Perl 6 release scheduled, but it will be available when
-it's ready. The joke is that it's scheduled for Christmas, but that we
-just don't know which one. Stay tuned, but don't worry that you'll
-have to change major versions of Perl; no one is going to take Perl 5
-away from you.
-
-=item *
-
-There are really two tracks of perl development: a maintenance version
-and an experimental version. The maintenance versions are stable, and
-have an even number as the minor release (i.e. perl5.10.x, where 10 is the
-minor release). The experimental versions may include features that
-don't make it into the stable versions, and have an odd number as the
-minor release (i.e. perl5.9.x, where 9 is the minor release).
-
-=back
-
-
-=head2 What are Perl 4, Perl 5, or Perl 6?
-
-(contributed by brian d foy)
-
-In short, Perl 4 is the past, Perl 5 is the present, and Perl 6 is the
-future.
-
-The number after Perl (i.e. the 5 after Perl 5) is the major release
-of the perl interpreter as well as the version of the language. Each
-major version has significant differences that earlier versions cannot
-support.
-
-The current major release of Perl is Perl 5, and was first released in
-1994. It can run scripts from the previous major release, Perl 4
-(March 1991), but has significant differences. It introduced the
-concept of references, complex data structures, and modules. The Perl
-5 interpreter was a complete re-write of the previous perl sources.
-
-Perl 6 is the next major version of Perl, although it's not intended to
-replace Perl 5. It's still in development in both its syntax and
-design. The work started in 2002 and is still ongoing. Some of the
-most interesting features have shown up in the latest versions of Perl
-5, and some Perl 5 modules allow you to use some Perl 6 syntax in your
-programs. The current leading implementation of Perl 6 is Rakudo (
-http://rakudo.org ).
-
-See L<perlhist> for a history of Perl revisions.
-
-=head2 What was Ponie?
-
-(contributed by brian d foy)
-
-Ponie stands for "Perl On the New Internal Engine", started by Arthur
-Bergman from Fotango in 2003, and subsequently run as a project of The
-Perl Foundation. It was abandoned in 2006
-( http://www.nntp.perl.org/group/perl.ponie.dev/487 ).
-
-Instead of using the current Perl internals, Ponie aimed to create a
-new one that would provide a translation path from Perl 5 to Perl 6
-(or anything else that targets Parrot, actually). You would have been
-able to just keep using Perl 5 with Parrot, the virtual machine which
-will compile and run Perl 6 bytecode.
-
-=head2 What is Perl 6?
-
-At The Second O'Reilly Open Source Software Convention, Larry Wall
-announced Perl 6 development would begin in earnest. Perl 6 was an oft
-used term for Chip Salzenberg's project to rewrite Perl in C++ named
-Topaz. However, Topaz provided valuable insights to the next version
-of Perl and its implementation, but was ultimately abandoned.
-
-If you want to learn more about Perl 6, or have a desire to help in
-the crusade to make Perl a better place then read the Perl 6 developers
-page at http://dev.perl.org/perl6/ and get involved.
-
-Perl 6 is not scheduled for release yet, and Perl 5 will still be supported
-for quite awhile after its release. Do not wait for Perl 6 to do whatever
-you need to do.
-
-"We're really serious about reinventing everything that needs reinventing."
---Larry Wall
-
-=head2 How stable is Perl?
-
-Production releases, which incorporate bug fixes and new functionality,
-are widely tested before release. Since the 5.000 release, we have
-averaged only about one production release per year.
-
-Larry and the Perl development team occasionally make changes to the
-internal core of the language, but all possible efforts are made toward
-backward compatibility. While not quite all Perl 4 scripts run flawlessly
-under Perl 5, an update to perl should nearly never invalidate a program
-written for an earlier version of perl (barring accidental bug fixes
-and the rare new keyword).
-
-=head2 Is Perl difficult to learn?
-
-No, Perl is easy to start learning--and easy to keep learning. It looks
-like most programming languages you're likely to have experience
-with, so if you've ever written a C program, an awk script, a shell
-script, or even a BASIC program, you're already partway there.
-
-Most tasks only require a small subset of the Perl language. One of
-the guiding mottos for Perl development is "there's more than one way
-to do it" (TMTOWTDI, sometimes pronounced "tim toady"). Perl's
-learning curve is therefore shallow (easy to learn) and long (there's
-a whole lot you can do if you really want).
-
-Finally, because Perl is frequently (but not always, and certainly not by
-definition) an interpreted language, you can write your programs and test
-them without an intermediate compilation step, allowing you to experiment
-and test/debug quickly and easily. This ease of experimentation flattens
-the learning curve even more.
-
-Things that make Perl easier to learn: Unix experience, almost any kind
-of programming experience, an understanding of regular expressions, and
-the ability to understand other people's code. If there's something you
-need to do, then it's probably already been done, and a working example is
-usually available for free. Don't forget Perl modules, either.
-They're discussed in Part 3 of this FAQ, along with CPAN, which is
-discussed in Part 2.
-
-=head2 How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl?
-
-Favorably in some areas, unfavorably in others. Precisely which areas
-are good and bad is often a personal choice, so asking this question
-on Usenet runs a strong risk of starting an unproductive Holy War.
-
-Probably the best thing to do is try to write equivalent code to do a
-set of tasks. These languages have their own newsgroups in which you
-can learn about (but hopefully not argue about) them.
-
-Some comparison documents can be found at http://www.perl.com/doc/FMTEYEWTK/versus/
-if you really can't stop yourself.
-
-=head2 Can I do [task] in Perl?
-
-Perl is flexible and extensible enough for you to use on virtually any
-task, from one-line file-processing tasks to large, elaborate systems.
-For many people, Perl serves as a great replacement for shell scripting.
-For others, it serves as a convenient, high-level replacement for most of
-what they'd program in low-level languages like C or C++. It's ultimately
-up to you (and possibly your management) which tasks you'll use Perl
-for and which you won't.
-
-If you have a library that provides an API, you can make any component
-of it available as just another Perl function or variable using a Perl
-extension written in C or C++ and dynamically linked into your main
-perl interpreter. You can also go the other direction, and write your
-main program in C or C++, and then link in some Perl code on the fly,
-to create a powerful application. See L<perlembed>.
-
-That said, there will always be small, focused, special-purpose
-languages dedicated to a specific problem domain that are simply more
-convenient for certain kinds of problems. Perl tries to be all things
-to all people, but nothing special to anyone. Examples of specialized
-languages that come to mind include prolog and matlab.
-
-=head2 When shouldn't I program in Perl?
-
-When your manager forbids it--but do consider replacing them :-).
-
-Actually, one good reason is when you already have an existing
-application written in another language that's all done (and done
-well), or you have an application language specifically designed for a
-certain task (e.g. prolog, make).
-
-For various reasons, Perl is probably not well-suited for real-time
-embedded systems, low-level operating systems development work like
-device drivers or context-switching code, complex multi-threaded
-shared-memory applications, or extremely large applications. You'll
-notice that perl is not itself written in Perl.
-
-Perl remains fundamentally a dynamically typed language, not
-a statically typed one. You certainly won't be chastised if you don't
-trust nuclear-plant or brain-surgery monitoring code to it. And Larry
-will sleep easier, too--Wall Street programs not withstanding. :-)
-
-=head2 What's the difference between "perl" and "Perl"?
-
-One bit. Oh, you weren't talking ASCII? :-) Larry now uses "Perl" to
-signify the language proper and "perl" the implementation of it, i.e.
-the current interpreter. Hence Tom's quip that "Nothing but perl can
-parse Perl."
-
-Before the first edition of I<Programming perl>, people commonly
-referred to the language as "perl", and its name appeared that way in
-the title because it referred to the interpreter. In the book, Randal
-Schwartz capitalised the language's name to make it stand out better
-when typeset. This convention was adopted by the community, and the
-second edition became I<Programming Perl>, using the capitalized
-version of the name to refer to the language.
-
-You may or may not choose to follow this usage. For example,
-parallelism means "awk and perl" and "Python and Perl" look good, while
-"awk and Perl" and "Python and perl" do not. But never write "PERL",
-because perl is not an acronym, apocryphal folklore and post-facto
-expansions notwithstanding.
-
-=head2 Is it a Perl program or a Perl script?
-
-Larry doesn't really care. He says (half in jest) that "a script is
-what you give the actors. A program is what you give the audience."
-
-Originally, a script was a canned sequence of normally interactive
-commands--that is, a chat script. Something like a UUCP or PPP chat
-script or an expect script fits the bill nicely, as do configuration
-scripts run by a program at its start up, such F<.cshrc> or F<.ircrc>,
-for example. Chat scripts were just drivers for existing programs,
-not stand-alone programs in their own right.
-
-A computer scientist will correctly explain that all programs are
-interpreted and that the only question is at what level. But if you
-ask this question of someone who isn't a computer scientist, they might
-tell you that a I<program> has been compiled to physical machine code
-once and can then be run multiple times, whereas a I<script> must be
-translated by a program each time it's used.
-
-Now that "script" and "scripting" are terms that have been seized by
-unscrupulous or unknowing marketeers for their own nefarious purposes,
-they have begun to take on strange and often pejorative meanings,
-like "non serious" or "not real programming". Consequently, some Perl
-programmers prefer to avoid them altogether.
-
-=head2 What is a JAPH?
-
-(contributed by brian d foy)
-
-JAPH stands for "Just another Perl hacker,", which Randal Schwartz used
-to sign email and usenet messages starting in the late 1980s. He
-previously used the phrase with many subjects ("Just another x hacker,"),
-so to distinguish his JAPH, he started to write them as Perl programs:
-
- print "Just another Perl hacker,";
-
-Other people picked up on this and started to write clever or obfuscated
-programs to produce the same output, spinning things quickly out of
-control while still providing hours of amusement for their creators and
-readers.
-
-CPAN has several JAPH programs at http://www.cpan.org/misc/japh .
-
-=head2 Where can I get a list of Larry Wall witticisms?
-
-(contributed by brian d foy)
-
-Google "larry wall quotes"! You might even try the "I feel lucky" button.
-:)
-
-Wikiquote has the witticisms from Larry along with their source,
-including his usenet postings and source code comments.
-
-If you want a plain text file, try
-http://www.cpan.org/misc/lwall-quotes.txt.gz .
-
-=head2 How can I convince others to use Perl?
-
-(contributed by brian d foy)
-
-Appeal to their self interest! If Perl is new (and thus scary) to them,
-find something that Perl can do to solve one of their problems. That
-might mean that Perl either saves them something (time, headaches, money)
-or gives them something (flexibility, power, testability).
-
-In general, the benefit of a language is closely related to the skill of
-the people using that language. If you or your team can be faster,
-better, and stronger through Perl, you'll deliver more value. Remember,
-people often respond better to what they get out of it. If you run
-into resistance, figure out what those people get out of the other
-choice and how Perl might satisfy that requirement.
-
-You don't have to worry about finding or paying for Perl; it's freely
-available and several popular operating systems come with Perl. Community
-support in places such as Perlmonks ( http://www.perlmonks.com )
-and the various Perl mailing lists ( http://lists.perl.org ) means that
-you can usually get quick answers to your problems.
-
-Finally, keep in mind that Perl might not be the right tool for every
-job. You're a much better advocate if your claims are reasonable and
-grounded in reality. Dogmatically advocating anything tends to make
-people discount your message. Be honest about possible disadvantages
-to your choice of Perl since any choice has trade-offs.
-
-You might find these links useful:
-
-=over 4
-
-=item * http://perltraining.com.au/whyperl.html
-
-=item * http://www.perl.org/advocacy/whyperl.html
-
-=back
-
-=head1 AUTHOR AND COPYRIGHT
-
-Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
-other authors as noted. All rights reserved.
-
-This documentation is free; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-Irrespective of its distribution, all code examples here are in the public
-domain. You are permitted and encouraged to use this code and any
-derivatives thereof in your own programs for fun or for profit as you
-see fit. A simple comment in the code giving credit to the FAQ would
-be courteous but is not required.
Deleted: vendor/perl/dist/pod/perlfaq2.pod
===================================================================
--- vendor/perl/dist/pod/perlfaq2.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlfaq2.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,377 +0,0 @@
-=head1 NAME
-
-perlfaq2 - Obtaining and Learning about Perl
-
-=head1 DESCRIPTION
-
-This section of the FAQ answers questions about where to find
-source and documentation for Perl, support, and
-related matters.
-
-=head2 What machines support perl? Where do I get it?
-
-The standard release of perl (the one maintained by the perl
-development team) is distributed only in source code form. You
-can find the latest releases at http://www.cpan.org/src/README.html .
-
-Perl builds and runs on a bewildering number of platforms. Virtually
-all known and current Unix derivatives are supported (perl's native
-platform), as are other systems like VMS, DOS, OS/2, Windows,
-QNX, BeOS, OS X, MPE/iX and the Amiga.
-
-Binary distributions for some proprietary platforms can be found
-http://www.cpan.org/ports/ directory. Because these are not part of
-the standard distribution, they may and in fact do differ from the
-base perl port in a variety of ways. You'll have to check their
-respective release notes to see just what the differences are. These
-differences can be either positive (e.g. extensions for the features
-of the particular platform that are not supported in the source
-release of perl) or negative (e.g. might be based upon a less current
-source release of perl).
-
-=head2 How can I get a binary version of perl?
-
-(contributed by brian d foy)
-
-ActiveState: Windows, Linux, Mac OS X, Solaris, AIX and HP-UX
-
- http://www.activestate.com/
-
-Sunfreeware.com: Solaris 2.5 to Solaris 10 (SPARC and x86)
-
- http://www.sunfreeware.com/
-
-Strawberry Perl: Windows, Perl 5.8.8 and 5.10.0
-
- http://www.strawberryperl.com
-
-IndigoPerl: Windows
-
- http://indigostar.com/
-
-=head2 I don't have a C compiler. How can I build my own Perl interpreter?
-
-Since you don't have a C compiler, you're doomed and your vendor
-should be sacrificed to the Sun gods. But that doesn't help you.
-
-What you need to do is get a binary version of C<gcc> for your system
-first. Consult the Usenet FAQs for your operating system for
-information on where to get such a binary version.
-
-You might look around the net for a pre-built binary of Perl (or a
-C compiler!) that meets your needs, though:
-
-For Windows, Vanilla Perl ( http://vanillaperl.com/ ) and Strawberry Perl
-( http://strawberryperl.com/ ) come with a
-bundled C compiler. ActivePerl is a pre-compiled version of Perl
-ready-to-use.
-
-For Sun systems, SunFreeware.com provides binaries of most popular
-applications, including compilers and Perl.
-
-=head2 I copied the perl binary from one machine to another, but scripts don't work.
-
-That's probably because you forgot libraries, or library paths differ.
-You really should build the whole distribution on the machine it will
-eventually live on, and then type C<make install>. Most other
-approaches are doomed to failure.
-
-One simple way to check that things are in the right place is to print out
-the hard-coded C<@INC> that perl looks through for libraries:
-
- % perl -le 'print for @INC'
-
-If this command lists any paths that don't exist on your system, then you
-may need to move the appropriate libraries to these locations, or create
-symbolic links, aliases, or shortcuts appropriately. C<@INC> is also printed as
-part of the output of
-
- % perl -V
-
-You might also want to check out
-L<perlfaq8/"How do I keep my own module/library directory?">.
-
-=head2 I grabbed the sources and tried to compile but gdbm/dynamic loading/malloc/linking/... failed. How do I make it work?
-
-Read the F<INSTALL> file, which is part of the source distribution.
-It describes in detail how to cope with most idiosyncrasies that the
-C<Configure> script can't work around for any given system or
-architecture.
-
-=head2 What modules and extensions are available for Perl? What is CPAN? What does CPAN/src/... mean?
-
-CPAN stands for Comprehensive Perl Archive Network, a multi-gigabyte
-archive replicated on hundreds of machines all over the world. CPAN
-contains source code, non-native ports, documentation, scripts, and
-many third-party modules and extensions, designed for everything from
-commercial database interfaces to keyboard/screen control to web
-walking and CGI scripts. The master web site for CPAN is
-http://www.cpan.org/ and there is the CPAN Multiplexer at
-http://www.cpan.org/CPAN.html which will choose a mirror near you via
-DNS. See http://www.perl.com/CPAN (without a slash at the end) for
-how this process works. Also, http://mirror.cpan.org/ has a nice
-interface to the http://www.cpan.org/MIRRORED.BY mirror directory.
-
-See the CPAN FAQ at http://www.cpan.org/misc/cpan-faq.html for answers
-to the most frequently asked questions about CPAN including how to
-become a mirror.
-
-C<CPAN/path/...> is a naming convention for files available on CPAN
-sites. CPAN indicates the base directory of a CPAN mirror, and the
-rest of the path is the path from that directory to the file. For
-instance, if you're using ftp://ftp.funet.fi/pub/languages/perl/CPAN
-as your CPAN site, the file C<CPAN/misc/japh> is downloadable as
-ftp://ftp.funet.fi/pub/languages/perl/CPAN/misc/japh .
-
-Considering that, as of 2006, there are over ten thousand existing
-modules in the archive, one probably exists to do nearly anything you
-can think of. Current categories under C<CPAN/modules/by-category/>
-include Perl core modules; development support; operating system
-interfaces; networking, devices, and interprocess communication; data
-type utilities; database interfaces; user interfaces; interfaces to
-other languages; filenames, file systems, and file locking;
-internationalization and locale; world wide web support; server and
-daemon utilities; archiving and compression; image manipulation; mail
-and news; control flow utilities; filehandle and I/O; Microsoft
-Windows modules; and miscellaneous modules.
-
-See http://www.cpan.org/modules/00modlist.long.html or
-http://search.cpan.org/ for a more complete list of modules by
-category.
-
-CPAN is a free service and is not affiliated with O'Reilly Media.
-
-=head2 Is there an ISO or ANSI certified version of Perl?
-
-Certainly not. Larry expects that he'll be certified before Perl is.
-
-=head2 Where can I get information on Perl?
-
-The complete Perl documentation is available with the Perl distribution.
-If you have Perl installed locally, you probably have the documentation
-installed as well: type C<man perl> if you're on a system resembling Unix.
-This will lead you to other important man pages, including how to set your
-C<$MANPATH>. If you're not on a Unix system, access to the documentation
-will be different; for example, documentation might only be in HTML format. All
-proper perl installations have fully-accessible documentation.
-
-You might also try C<perldoc perl> in case your system doesn't
-have a proper C<man> command, or it's been misinstalled. If that doesn't
-work, try looking in C</usr/local/lib/perl5/pod> for documentation.
-
-If all else fails, consult http://perldoc.perl.org/ which has the
-complete documentation in HTML and PDF format.
-
-Many good books have been written about Perl--see the section later in
-L<perlfaq2> for more details.
-
-Tutorial documents included in current or upcoming Perl releases
-include L<perltoot> for objects or L<perlboot> for a beginner's
-approach to objects, L<perlopentut> for file opening semantics,
-L<perlreftut> for managing references, L<perlretut> for regular
-expressions, L<perlthrtut> for threads, L<perldebtut> for debugging,
-and L<perlxstut> for linking C and Perl together. There may be more
-by the time you read this. These URLs might also be useful:
-
- http://perldoc.perl.org/
- http://bookmarks.cpan.org/search.cgi?cat=Training%2FTutorials
-
-=head2 What are the Perl newsgroups on Usenet? Where do I post questions?
-
-Several groups devoted to the Perl language are on Usenet:
-
- comp.lang.perl.announce Moderated announcement group
- comp.lang.perl.misc High traffic general Perl discussion
- comp.lang.perl.moderated Moderated discussion group
- comp.lang.perl.modules Use and development of Perl modules
- comp.lang.perl.tk Using Tk (and X) from Perl
-
-Some years ago, comp.lang.perl was divided into those groups, and
-comp.lang.perl itself officially removed. While that group may still
-be found on some news servers, it is unwise to use it, because
-postings there will not appear on news servers which honour the
-official list of group names. Use comp.lang.perl.misc for topics
-which do not have a more-appropriate specific group.
-
-There is also a Usenet gateway to Perl mailing lists sponsored by
-perl.org at nntp://nntp.perl.org , a web interface to the same lists
-at http://nntp.perl.org/group/ and these lists are also available
-under the C<perl.*> hierarchy at http://groups.google.com . Other
-groups are listed at http://lists.perl.org/ ( also known as
-http://lists.cpan.org/ ).
-
-A nice place to ask questions is the PerlMonks site,
-http://www.perlmonks.org/ , or the Perl Beginners mailing list
-http://lists.perl.org/showlist.cgi?name=beginners .
-
-Note that none of the above are supposed to write your code for you:
-asking questions about particular problems or general advice is fine,
-but asking someone to write your code for free is not very cool.
-
-=head2 Where should I post source code?
-
-You should post source code to whichever group is most appropriate, but
-feel free to cross-post to comp.lang.perl.misc. If you want to cross-post
-to alt.sources, please make sure it follows their posting standards,
-including setting the Followup-To header line to NOT include alt.sources;
-see their FAQ ( http://www.faqs.org/faqs/alt-sources-intro/ ) for details.
-
-If you're just looking for software, first use Google
-( http://www.google.com ), Google's Usenet search interface
-( http://groups.google.com ), and CPAN Search ( http://search.cpan.org ).
-This is faster and more productive than just posting a request.
-
-=head2 Perl Books
-
-There are many good books on Perl. See the L<perlbook> documentation or
-( http://books.perl.org ).
-
-=head2 Which magazines have Perl content?
-
-I<The Perl Review> ( http://www.theperlreview.com ) focuses on Perl
-almost completely (although it sometimes sneaks in an article about
-another language). There's also I<$foo Magazin>, a German magazine
-dedicated to Perl, at ( http://www.foo-magazin.de ).
-
-The I<Perl-Zeitung> is a German-speaking magazine for Perl beginners
-(see http://perl-zeitung.at.tf ).
-
-Magazines that frequently carry quality articles on Perl include I<The
-Perl Review> ( http://www.theperlreview.com ), I<Unix Review> (
-http://www.unixreview.com/ ), I<Linux Magazine> (
-http://www.linuxmagazine.com/ ), and Usenix's newsletter/magazine to
-its members, I<login:> ( http://www.usenix.org/ ).
-
-The Perl columns of Randal L. Schwartz are available on the web at
-http://www.stonehenge.com/merlyn/WebTechniques/ ,
-http://www.stonehenge.com/merlyn/UnixReview/ , and
-http://www.stonehenge.com/merlyn/LinuxMag/ .
-
-The first (and for a long time, only) periodical devoted to All Things
-Perl, I<The Perl Journal> contains tutorials, demonstrations, case
-studies, announcements, contests, and much more. I<TPJ> has columns
-on web development, databases, Win32 Perl, graphical programming,
-regular expressions, and networking, and sponsors the Obfuscated Perl
-Contest and the Perl Poetry Contests. Beginning in November 2002, I<TPJ>
-moved to a reader-supported monthly e-zine format in which subscribers
-can download issues as PDF documents. In 2006, I<TPJ> merged with Dr.
-Dobbs Journal (online edition). To read old I<TPJ> articles, see
-http://www.ddj.com/ or brian d foy's index of online TPJ content
-( http://www.perlmonks.org/index.pl?node_id=711609 ).
-
-=head2 What mailing lists are there for Perl?
-
-Most of the major modules (C<Tk>, C<CGI>, C<libwww-perl>) have their own
-mailing lists. Consult the documentation that came with the module for
-subscription information.
-
-A comprehensive list of Perl-related mailing lists can be found at:
-
- http://lists.perl.org/
-
-=head2 Where are the archives for comp.lang.perl.misc?
-
-The Google search engine now carries archived and searchable newsgroup
-content.
-
-http://groups.google.com/group/comp.lang.perl.misc/topics
-
-If you have a question, you can be sure someone has already asked the
-same question at some point on c.l.p.m. It requires some time and patience
-to sift through all the content but often you will find the answer you
-seek.
-
-=head2 Where can I buy a commercial version of perl?
-
-In a real sense, perl already I<is> commercial software: it has a license
-that you can grab and carefully read to your manager. It is distributed
-in releases and comes in well-defined packages. There is a very large
-user community and an extensive literature. The comp.lang.perl.*
-newsgroups and several of the mailing lists provide free answers to your
-questions in near real-time. Perl has traditionally been supported by
-Larry, scores of software designers and developers, and myriad
-programmers, all working for free to create a useful thing to make life
-better for everyone.
-
-However, these answers may not suffice for managers who require a
-purchase order from a company whom they can sue should anything go awry.
-Or maybe they need very serious hand-holding and contractual obligations.
-Shrink-wrapped CDs with perl on them are available from several sources if
-that will help. For example, many Perl books include a distribution of perl,
-as do the O'Reilly Perl Resource Kits (in both the Unix flavor
-and in the proprietary Microsoft flavor); the free Unix distributions
-also all come with perl.
-
-=head2 Where do I send bug reports?
-
-(contributed by brian d foy)
-
-First, ensure that you've found an actual bug. Second, ensure you've
-found an actual bug.
-
-If you've found a bug with the perl interpreter or one of the modules
-in the standard library (those that come with Perl), you can use the
-L<perlbug> utility that comes with Perl (>= 5.004). It collects
-information about your installation to include with your message, then
-sends the message to the right place.
-
-To determine if a module came with your version of Perl, you can
-use the C<Module::CoreList> module. It has the information about
-the modules (with their versions) included with each release of Perl.
-
-If C<Module::CoreList> is not installed on your system, check out
-http://perlpunks.de/corelist .
-
-Every CPAN module has a bug tracker set up in RT, http://rt.cpan.org .
-You can submit bugs to RT either through its web interface or by
-email. To email a bug report, send it to
-bug-E<lt>distribution-nameE<gt>@rt.cpan.org . For example, if you
-wanted to report a bug in C<Business::ISBN>, you could send a message to
-bug-Business-ISBN at rt.cpan.org .
-
-Some modules might have special reporting requirements, such as a
-Sourceforge or Google Code tracking system, so you should check the
-module documentation too.
-
-=head2 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org?
-
-Perl.com ( http://www.perl.com/ ) used to be part of the O'Reilly
-Network, a subsidiary of O'Reilly Media. Although it retains most of
-the original content from its O'Reilly Network, it is now hosted by
-The Perl Foundation.
-
-The Perl Foundation is an advocacy organization for the Perl language
-which maintains the web site ( http://www.perl.org/ ) as a general
-advocacy site for the Perl language. It uses the domain to provide
-general support services to the Perl community, including the hosting
-of mailing lists, web sites, and other services. There are also many
-other sub-domains for special topics like learning Perl, Perl news,
-jobs in Perl, such as:
-
- http://www.perl.org/
- http://learn.perl.org/
- http://jobs.perl.org/
- http://lists.perl.org/
-
-Perl Mongers uses the pm.org domain for services related to Perl user
-groups, including the hosting of mailing lists and web sites. See the
-Perl Mongers website ( http://www.pm.org/ ) for more information about
-joining, starting, or requesting services for a Perl user group.
-
-CPAN, or the Comprehensive Perl Archive Network (
-http://www.cpan.org/ ), is a replicated, worldwide repository of Perl
-software. See I<What is CPAN?> in L<perlfaq2>.
-
-=head1 AUTHOR AND COPYRIGHT
-
-Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
-other authors as noted. All rights reserved.
-
-This documentation is free; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-Irrespective of its distribution, all code examples here are in the public
-domain. You are permitted and encouraged to use this code and any
-derivatives thereof in your own programs for fun or for profit as you
-see fit. A simple comment in the code giving credit to the FAQ would
-be courteous but is not required.
Deleted: vendor/perl/dist/pod/perlfaq3.pod
===================================================================
--- vendor/perl/dist/pod/perlfaq3.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlfaq3.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1098 +0,0 @@
-=head1 NAME
-
-perlfaq3 - Programming Tools
-
-=head1 DESCRIPTION
-
-This section of the FAQ answers questions related to programmer tools
-and programming support.
-
-=head2 How do I do (anything)?
-
-Have you looked at CPAN (see L<perlfaq2>)? The chances are that
-someone has already written a module that can solve your problem.
-Have you read the appropriate manpages? Here's a brief index:
-
- Basics perldata, perlvar, perlsyn, perlop, perlsub
- Execution perlrun, perldebug
- Functions perlfunc
- Objects perlref, perlmod, perlobj, perltie
- Data Structures perlref, perllol, perldsc
- Modules perlmod, perlmodlib, perlsub
- Regexes perlre, perlfunc, perlop, perllocale
- Moving to perl5 perltrap, perl
- Linking w/C perlxstut, perlxs, perlcall, perlguts, perlembed
- Various http://www.cpan.org/misc/olddoc/FMTEYEWTK.tgz
- (not a man-page but still useful, a collection
- of various essays on Perl techniques)
-
-A crude table of contents for the Perl manpage set is found in L<perltoc>.
-
-=head2 How can I use Perl interactively?
-
-The typical approach uses the Perl debugger, described in the
-C<perldebug(1)> manpage, on an "empty" program, like this:
-
- perl -de 42
-
-Now just type in any legal Perl code, and it will be immediately
-evaluated. You can also examine the symbol table, get stack
-backtraces, check variable values, set breakpoints, and other
-operations typically found in symbolic debuggers.
-
-=head2 Is there a Perl shell?
-
-The C<psh> (Perl sh) is currently at version 1.8. The Perl Shell is a shell
-that combines the interactive nature of a Unix shell with the power of
-Perl. The goal is a full-featured shell that behaves as expected for
-normal shell activity and uses Perl syntax and functionality for
-control-flow statements and other things. You can get C<psh> at
-http://sourceforge.net/projects/psh/ .
-
-C<Zoidberg> is a similar project and provides a shell written in perl,
-configured in perl and operated in perl. It is intended as a login shell
-and development environment. It can be found at
-http://pardus-larus.student.utwente.nl/~pardus/projects/zoidberg/
-or your local CPAN mirror.
-
-The C<Shell.pm> module (distributed with Perl) makes Perl try commands
-which aren't part of the Perl language as shell commands. C<perlsh> from
-the source distribution is simplistic and uninteresting, but may still
-be what you want.
-
-=head2 How do I find which modules are installed on my system?
-
-From the command line, you can use the C<cpan> command's C<-l> switch:
-
- $ cpan -l
-
-You can also use C<cpan>'s C<-a> switch to create an autobundle file
-that C<CPAN.pm> understands and can use to re-install every module:
-
- $ cpan -a
-
-Inside a Perl program, you can use the C<ExtUtils::Installed> module to
-show all installed distributions, although it can take awhile to do
-its magic. The standard library which comes with Perl just shows up
-as "Perl" (although you can get those with C<Module::CoreList>).
-
- use ExtUtils::Installed;
-
- my $inst = ExtUtils::Installed->new();
- my @modules = $inst->modules();
-
-If you want a list of all of the Perl module filenames, you
-can use C<File::Find::Rule>:
-
- use File::Find::Rule;
-
- my @files = File::Find::Rule->
- extras({follow => 1})->
- file()->
- name( '*.pm' )->
- in( @INC )
- ;
-
-If you do not have that module, you can do the same thing
-with C<File::Find> which is part of the standard library:
-
- use File::Find;
- my @files;
-
- find(
- {
- wanted => sub {
- push @files, $File::Find::fullname
- if -f $File::Find::fullname && /\.pm$/
- },
- follow => 1,
- follow_skip => 2,
- },
- @INC
- );
-
- print join "\n", @files;
-
-If you simply need to check quickly to see if a module is
-available, you can check for its documentation. If you can
-read the documentation the module is most likely installed.
-If you cannot read the documentation, the module might not
-have any (in rare cases):
-
- $ perldoc Module::Name
-
-You can also try to include the module in a one-liner to see if
-perl finds it:
-
- $ perl -MModule::Name -e1
-
-=head2 How do I debug my Perl programs?
-
-(contributed by brian d foy)
-
-Before you do anything else, you can help yourself by ensuring that
-you let Perl tell you about problem areas in your code. By turning
-on warnings and strictures, you can head off many problems before
-they get too big. You can find out more about these in L<strict>
-and L<warnings>.
-
- #!/usr/bin/perl
- use strict;
- use warnings;
-
-Beyond that, the simplest debugger is the C<print> function. Use it
-to look at values as you run your program:
-
- print STDERR "The value is [$value]\n";
-
-The C<Data::Dumper> module can pretty-print Perl data structures:
-
- use Data::Dumper qw( Dumper );
- print STDERR "The hash is " . Dumper( \%hash ) . "\n";
-
-Perl comes with an interactive debugger, which you can start with the
-C<-d> switch. It's fully explained in L<perldebug>.
-
-If you'd like a graphical user interface and you have C<Tk>, you can use
-C<ptkdb>. It's on CPAN and available for free.
-
-If you need something much more sophisticated and controllable, Leon
-Brocard's C<Devel::ebug> (which you can call with the C<-D> switch as C<-Debug>)
-gives you the programmatic hooks into everything you need to write your
-own (without too much pain and suffering).
-
-You can also use a commercial debugger such as Affrus (Mac OS X), Komodo
-from Activestate (Windows and Mac OS X), or EPIC (most platforms).
-
-=head2 How do I profile my Perl programs?
-
-(contributed by brian d foy, updated Fri Jul 25 12:22:26 PDT 2008)
-
-The C<Devel> namespace has several modules which you can use to
-profile your Perl programs. The C<Devel::DProf> module comes with Perl
-and you can invoke it with the C<-d> switch:
-
- perl -d:DProf program.pl
-
-After running your program under C<DProf>, you'll get a F<tmon.out> file
-with the profile data. To look at the data, you can turn it into a
-human-readable report with the C<dprofpp> program that comes with
-C<Devel::DProf>.
-
- dprofpp
-
-You can also do the profiling and reporting in one step with the C<-p>
-switch to C<dprofpp>:
-
- dprofpp -p program.pl
-
-The C<Devel::NYTProf> (New York Times Profiler) does both statement
-and subroutine profiling. It's available from CPAN and you also invoke
-it with the C<-d> switch:
-
- perl -d:NYTProf some_perl.pl
-
-Like C<DProf>, it creates a database of the profile information that you
-can turn into reports. The C<nytprofhtml> command turns the data into
-an HTML report similar to the C<Devel::Cover> report:
-
- nytprofhtml
-
-CPAN has several other profilers that you can invoke in the same
-fashion. You might also be interested in using the C<Benchmark> to
-measure and compare code snippets.
-
-You can read more about profiling in I<Programming Perl>, chapter 20,
-or I<Mastering Perl>, chapter 5.
-
-L<perldebguts> documents creating a custom debugger if you need to
-create a special sort of profiler. brian d foy describes the process
-in I<The Perl Journal>, "Creating a Perl Debugger",
-http://www.ddj.com/184404522 , and "Profiling in Perl"
-http://www.ddj.com/184404580 .
-
-Perl.com has two interesting articles on profiling: "Profiling Perl",
-by Simon Cozens, http://www.perl.com/lpt/a/850 and "Debugging and
-Profiling mod_perl Applications", by Frank Wiles,
-http://www.perl.com/pub/a/2006/02/09/debug_mod_perl.html .
-
-Randal L. Schwartz writes about profiling in "Speeding up Your Perl
-Programs" for I<Unix Review>,
-http://www.stonehenge.com/merlyn/UnixReview/col49.html , and "Profiling
-in Template Toolkit via Overriding" for I<Linux Magazine>,
-http://www.stonehenge.com/merlyn/LinuxMag/col75.html .
-
-=head2 How do I cross-reference my Perl programs?
-
-The C<B::Xref> module can be used to generate cross-reference reports
-for Perl programs.
-
- perl -MO=Xref[,OPTIONS] scriptname.plx
-
-=head2 Is there a pretty-printer (formatter) for Perl?
-
-C<Perltidy> is a Perl script which indents and reformats Perl scripts
-to make them easier to read by trying to follow the rules of the
-L<perlstyle>. If you write Perl scripts, or spend much time reading
-them, you will probably find it useful. It is available at
-http://perltidy.sourceforge.net .
-
-Of course, if you simply follow the guidelines in L<perlstyle>,
-you shouldn't need to reformat. The habit of formatting your code
-as you write it will help prevent bugs. Your editor can and should
-help you with this. The perl-mode or newer cperl-mode for emacs
-can provide remarkable amounts of help with most (but not all)
-code, and even less programmable editors can provide significant
-assistance. Tom Christiansen and many other VI users swear by
-the following settings in vi and its clones:
-
- set ai sw=4
- map! ^O {^M}^[O^T
-
-Put that in your F<.exrc> file (replacing the caret characters
-with control characters) and away you go. In insert mode, ^T is
-for indenting, ^D is for undenting, and ^O is for blockdenting--as
-it were. A more complete example, with comments, can be found at
-http://www.cpan.org/authors/id/TOMC/scripts/toms.exrc.gz
-
-The a2ps http://www-inf.enst.fr/%7Edemaille/a2ps/black+white.ps.gz does
-lots of things related to generating nicely printed output of
-documents.
-
-=head2 Is there a ctags for Perl?
-
-(contributed by brian d foy)
-
-Ctags uses an index to quickly find things in source code, and many
-popular editors support ctags for several different languages,
-including Perl.
-
-Exuberant ctags supports Perl: http://ctags.sourceforge.net/
-
-You might also try pltags: http://www.mscha.com/pltags.zip
-
-=head2 Is there an IDE or Windows Perl Editor?
-
-Perl programs are just plain text, so any editor will do.
-
-If you're on Unix, you already have an IDE--Unix itself. The Unix
-philosophy is the philosophy of several small tools that each do one
-thing and do it well. It's like a carpenter's toolbox.
-
-If you want an IDE, check the following (in alphabetical order, not
-order of preference):
-
-=over 4
-
-=item Eclipse
-
-http://e-p-i-c.sf.net/
-
-The Eclipse Perl Integration Project integrates Perl
-editing/debugging with Eclipse.
-
-=item Enginsite
-
-http://www.enginsite.com/
-
-Perl Editor by EngInSite is a complete integrated development
-environment (IDE) for creating, testing, and debugging Perl scripts;
-the tool runs on Windows 9x/NT/2000/XP or later.
-
-=item Komodo
-
-http://www.ActiveState.com/Products/Komodo/
-
-ActiveState's cross-platform (as of October 2004, that's Windows, Linux,
-and Solaris), multi-language IDE has Perl support, including a regular expression
-debugger and remote debugging.
-
-=item Notepad++
-
-http://notepad-plus.sourceforge.net/
-
-=item Open Perl IDE
-
-http://open-perl-ide.sourceforge.net/
-
-Open Perl IDE is an integrated development environment for writing
-and debugging Perl scripts with ActiveState's ActivePerl distribution
-under Windows 95/98/NT/2000.
-
-=item OptiPerl
-
-http://www.optiperl.com/
-
-OptiPerl is a Windows IDE with simulated CGI environment, including
-debugger and syntax-highlighting editor.
-
-=item Padre
-
-http://padre.perlide.org/
-
-Padre is cross-platform IDE for Perl written in Perl using wxWidgets to provide
-a native look and feel. It's open source under the Artistic License.
-
-=item PerlBuilder
-
-http://www.solutionsoft.com/perl.htm
-
-PerlBuilder is an integrated development environment for Windows that
-supports Perl development.
-
-=item visiPerl+
-
-http://helpconsulting.net/visiperl/
-
-From Help Consulting, for Windows.
-
-=item Visual Perl
-
-http://www.activestate.com/Products/Visual_Perl/
-
-Visual Perl is a Visual Studio.NET plug-in from ActiveState.
-
-=item Zeus
-
-http://www.zeusedit.com/lookmain.html
-
-Zeus for Window is another Win32 multi-language editor/IDE
-that comes with support for Perl.
-
-=back
-
-For editors: if you're on Unix you probably have vi or a vi clone
-already, and possibly an emacs too, so you may not need to download
-anything. In any emacs the cperl-mode (M-x cperl-mode) gives you
-perhaps the best available Perl editing mode in any editor.
-
-If you are using Windows, you can use any editor that lets you work
-with plain text, such as NotePad or WordPad. Word processors, such as
-Microsoft Word or WordPerfect, typically do not work since they insert
-all sorts of behind-the-scenes information, although some allow you to
-save files as "Text Only". You can also download text editors designed
-specifically for programming, such as Textpad (
-http://www.textpad.com/ ) and UltraEdit ( http://www.ultraedit.com/ ),
-among others.
-
-If you are using MacOS, the same concerns apply. MacPerl (for Classic
-environments) comes with a simple editor. Popular external editors are
-BBEdit ( http://www.bbedit.com/ ) or Alpha (
-http://www.his.com/~jguyer/Alpha/Alpha8.html ). MacOS X users can use
-Unix editors as well.
-
-=over 4
-
-=item GNU Emacs
-
-http://www.gnu.org/software/emacs/windows/ntemacs.html
-
-=item MicroEMACS
-
-http://www.microemacs.de/
-
-=item XEmacs
-
-http://www.xemacs.org/Download/index.html
-
-=item Jed
-
-http://space.mit.edu/~davis/jed/
-
-=back
-
-or a vi clone such as
-
-=over 4
-
-=item Elvis
-
-ftp://ftp.cs.pdx.edu/pub/elvis/ http://www.fh-wedel.de/elvis/
-
-=item Vile
-
-http://dickey.his.com/vile/vile.html
-
-=item Vim
-
-http://www.vim.org/
-
-=back
-
-For vi lovers in general, Windows or elsewhere:
-
- http://www.thomer.com/thomer/vi/vi.html
-
-nvi ( http://www.bostic.com/vi/ , available from CPAN in src/misc/) is
-yet another vi clone, unfortunately not available for Windows, but in
-Unix platforms you might be interested in trying it out, firstly because
-strictly speaking it is not a vi clone, it is the real vi, or the new
-incarnation of it, and secondly because you can embed Perl inside it
-to use Perl as the scripting language. nvi is not alone in this,
-though: at least also vim and vile offer an embedded Perl.
-
-The following are Win32 multilanguage editor/IDEs that support Perl:
-
-=over 4
-
-=item Codewright
-
-http://www.borland.com/codewright/
-
-=item MultiEdit
-
-http://www.MultiEdit.com/
-
-=item SlickEdit
-
-http://www.slickedit.com/
-
-=item ConTEXT
-
-http://www.contexteditor.org/
-
-=back
-
-There is also a toyedit Text widget based editor written in Perl
-that is distributed with the Tk module on CPAN. The ptkdb
-( http://ptkdb.sourceforge.net/ ) is a Perl/Tk-based debugger that
-acts as a development environment of sorts. Perl Composer
-( http://perlcomposer.sourceforge.net/ ) is an IDE for Perl/Tk
-GUI creation.
-
-In addition to an editor/IDE you might be interested in a more
-powerful shell environment for Win32. Your options include
-
-=over 4
-
-=item Bash
-
-from the Cygwin package ( http://sources.redhat.com/cygwin/ )
-
-=item Ksh
-
-from the MKS Toolkit ( http://www.mkssoftware.com/ ), or the Bourne shell of
-the U/WIN environment ( http://www.research.att.com/sw/tools/uwin/ )
-
-=item Tcsh
-
-ftp://ftp.astron.com/pub/tcsh/ , see also
-http://www.primate.wisc.edu/software/csh-tcsh-book/
-
-=item Zsh
-
-http://www.zsh.org/
-
-=back
-
-MKS and U/WIN are commercial (U/WIN is free for educational and
-research purposes), Cygwin is covered by the GNU General Public
-License (but that shouldn't matter for Perl use). The Cygwin, MKS,
-and U/WIN all contain (in addition to the shells) a comprehensive set
-of standard Unix toolkit utilities.
-
-If you're transferring text files between Unix and Windows using FTP
-be sure to transfer them in ASCII mode so the ends of lines are
-appropriately converted.
-
-On Mac OS the MacPerl Application comes with a simple 32k text editor
-that behaves like a rudimentary IDE. In contrast to the MacPerl Application
-the MPW Perl tool can make use of the MPW Shell itself as an editor (with
-no 32k limit).
-
-=over 4
-
-=item Affrus
-
-is a full Perl development environment with full debugger support
-( http://www.latenightsw.com ).
-
-=item Alpha
-
-is an editor, written and extensible in Tcl, that nonetheless has
-built-in support for several popular markup and programming languages,
-including Perl and HTML ( http://www.his.com/~jguyer/Alpha/Alpha8.html ).
-
-=item BBEdit and BBEdit Lite
-
-are text editors for Mac OS that have a Perl sensitivity mode
-( http://web.barebones.com/ ).
-
-=back
-
-=head2 Where can I get Perl macros for vi?
-
-For a complete version of Tom Christiansen's vi configuration file,
-see http://www.cpan.org/authors/Tom_Christiansen/scripts/toms.exrc.gz ,
-the standard benchmark file for vi emulators. The file runs best with nvi,
-the current version of vi out of Berkeley, which incidentally can be built
-with an embedded Perl interpreter--see http://www.cpan.org/src/misc/ .
-
-=head2 Where can I get perl-mode or cperl-mode for emacs?
-X<emacs>
-
-Since Emacs version 19 patchlevel 22 or so, there have been both a
-perl-mode.el and support for the Perl debugger built in. These should
-come with the standard Emacs 19 distribution.
-
-Note that the perl-mode of emacs will have fits with C<"main'foo">
-(single quote), and mess up the indentation and highlighting. You
-are probably using C<"main::foo"> in new Perl code anyway, so this
-shouldn't be an issue.
-
-For CPerlMode, see http://www.emacswiki.org/cgi-bin/wiki/CPerlMode
-
-=head2 How can I use curses with Perl?
-
-The Curses module from CPAN provides a dynamically loadable object
-module interface to a curses library. A small demo can be found at the
-directory http://www.cpan.org/authors/Tom_Christiansen/scripts/rep.gz ;
-this program repeats a command and updates the screen as needed, rendering
-B<rep ps axu> similar to B<top>.
-
-=head2 How can I write a GUI (X, Tk, Gtk, etc.) in Perl?
-X<GUI> X<Tk> X<Wx> X<WxWidgets> X<Gtk> X<Gtk2> X<CamelBones> X<Qt>
-
-(contributed by Ben Morrow)
-
-There are a number of modules which let you write GUIs in Perl. Most
-GUI toolkits have a perl interface: an incomplete list follows.
-
-=over 4
-
-=item Tk
-
-This works under Unix and Windows, and the current version doesn't
-look half as bad under Windows as it used to. Some of the gui elements
-still don't 'feel' quite right, though. The interface is very natural
-and 'perlish', making it easy to use in small scripts that just need a
-simple gui. It hasn't been updated in a while.
-
-=item Wx
-
-This is a Perl binding for the cross-platform wxWidgets toolkit
-( http://www.wxwidgets.org ). It works under Unix, Win32 and Mac OS X,
-using native widgets (Gtk under Unix). The interface follows the C++
-interface closely, but the documentation is a little sparse for someone
-who doesn't know the library, mostly just referring you to the C++
-documentation.
-
-=item Gtk and Gtk2
-
-These are Perl bindings for the Gtk toolkit ( http://www.gtk.org ). The
-interface changed significantly between versions 1 and 2 so they have
-separate Perl modules. It runs under Unix, Win32 and Mac OS X (currently
-it requires an X server on Mac OS, but a 'native' port is underway), and
-the widgets look the same on every platform: i.e., they don't match the
-native widgets. As with Wx, the Perl bindings follow the C API closely,
-and the documentation requires you to read the C documentation to
-understand it.
-
-=item Win32::GUI
-
-This provides access to most of the Win32 GUI widgets from Perl.
-Obviously, it only runs under Win32, and uses native widgets. The Perl
-interface doesn't really follow the C interface: it's been made more
-Perlish, and the documentation is pretty good. More advanced stuff may
-require familiarity with the C Win32 APIs, or reference to MSDN.
-
-=item CamelBones
-
-CamelBones ( http://camelbones.sourceforge.net ) is a Perl interface to
-Mac OS X's Cocoa GUI toolkit, and as such can be used to produce native
-GUIs on Mac OS X. It's not on CPAN, as it requires frameworks that
-CPAN.pm doesn't know how to install, but installation is via the
-standard OSX package installer. The Perl API is, again, very close to
-the ObjC API it's wrapping, and the documentation just tells you how to
-translate from one to the other.
-
-=item Qt
-
-There is a Perl interface to TrollTech's Qt toolkit, but it does not
-appear to be maintained.
-
-=item Athena
-
-Sx is an interface to the Athena widget set which comes with X, but
-again it appears not to be much used nowadays.
-
-=back
-
-=head2 How can I make my Perl program run faster?
-
-The best way to do this is to come up with a better algorithm. This
-can often make a dramatic difference. Jon Bentley's book
-I<Programming Pearls> (that's not a misspelling!) has some good tips
-on optimization, too. Advice on benchmarking boils down to: benchmark
-and profile to make sure you're optimizing the right part, look for
-better algorithms instead of microtuning your code, and when all else
-fails consider just buying faster hardware. You will probably want to
-read the answer to the earlier question "How do I profile my Perl
-programs?" if you haven't done so already.
-
-A different approach is to autoload seldom-used Perl code. See the
-AutoSplit and AutoLoader modules in the standard distribution for
-that. Or you could locate the bottleneck and think about writing just
-that part in C, the way we used to take bottlenecks in C code and
-write them in assembler. Similar to rewriting in C, modules that have
-critical sections can be written in C (for instance, the PDL module
-from CPAN).
-
-If you're currently linking your perl executable to a shared
-I<libc.so>, you can often gain a 10-25% performance benefit by
-rebuilding it to link with a static libc.a instead. This will make a
-bigger perl executable, but your Perl programs (and programmers) may
-thank you for it. See the F<INSTALL> file in the source distribution
-for more information.
-
-The undump program was an ancient attempt to speed up Perl program by
-storing the already-compiled form to disk. This is no longer a viable
-option, as it only worked on a few architectures, and wasn't a good
-solution anyway.
-
-=head2 How can I make my Perl program take less memory?
-
-When it comes to time-space tradeoffs, Perl nearly always prefers to
-throw memory at a problem. Scalars in Perl use more memory than
-strings in C, arrays take more than that, and hashes use even more. While
-there's still a lot to be done, recent releases have been addressing
-these issues. For example, as of 5.004, duplicate hash keys are
-shared amongst all hashes using them, so require no reallocation.
-
-In some cases, using substr() or vec() to simulate arrays can be
-highly beneficial. For example, an array of a thousand booleans will
-take at least 20,000 bytes of space, but it can be turned into one
-125-byte bit vector--a considerable memory savings. The standard
-Tie::SubstrHash module can also help for certain types of data
-structure. If you're working with specialist data structures
-(matrices, for instance) modules that implement these in C may use
-less memory than equivalent Perl modules.
-
-Another thing to try is learning whether your Perl was compiled with
-the system malloc or with Perl's builtin malloc. Whichever one it
-is, try using the other one and see whether this makes a difference.
-Information about malloc is in the F<INSTALL> file in the source
-distribution. You can find out whether you are using perl's malloc by
-typing C<perl -V:usemymalloc>.
-
-Of course, the best way to save memory is to not do anything to waste
-it in the first place. Good programming practices can go a long way
-toward this:
-
-=over 4
-
-=item * Don't slurp!
-
-Don't read an entire file into memory if you can process it line
-by line. Or more concretely, use a loop like this:
-
- #
- # Good Idea
- #
- while (<FILE>) {
- # ...
- }
-
-instead of this:
-
- #
- # Bad Idea
- #
- @data = <FILE>;
- foreach (@data) {
- # ...
- }
-
-When the files you're processing are small, it doesn't much matter which
-way you do it, but it makes a huge difference when they start getting
-larger.
-
-=item * Use map and grep selectively
-
-Remember that both map and grep expect a LIST argument, so doing this:
-
- @wanted = grep {/pattern/} <FILE>;
-
-will cause the entire file to be slurped. For large files, it's better
-to loop:
-
- while (<FILE>) {
- push(@wanted, $_) if /pattern/;
- }
-
-=item * Avoid unnecessary quotes and stringification
-
-Don't quote large strings unless absolutely necessary:
-
- my $copy = "$large_string";
-
-makes 2 copies of $large_string (one for $copy and another for the
-quotes), whereas
-
- my $copy = $large_string;
-
-only makes one copy.
-
-Ditto for stringifying large arrays:
-
- {
- local $, = "\n";
- print @big_array;
- }
-
-is much more memory-efficient than either
-
- print join "\n", @big_array;
-
-or
-
- {
- local $" = "\n";
- print "@big_array";
- }
-
-
-=item * Pass by reference
-
-Pass arrays and hashes by reference, not by value. For one thing, it's
-the only way to pass multiple lists or hashes (or both) in a single
-call/return. It also avoids creating a copy of all the contents. This
-requires some judgement, however, because any changes will be propagated
-back to the original data. If you really want to mangle (er, modify) a
-copy, you'll have to sacrifice the memory needed to make one.
-
-=item * Tie large variables to disk
-
-For "big" data stores (i.e. ones that exceed available memory) consider
-using one of the DB modules to store it on disk instead of in RAM. This
-will incur a penalty in access time, but that's probably better than
-causing your hard disk to thrash due to massive swapping.
-
-=back
-
-=head2 Is it safe to return a reference to local or lexical data?
-
-Yes. Perl's garbage collection system takes care of this so
-everything works out right.
-
- sub makeone {
- my @a = ( 1 .. 10 );
- return \@a;
- }
-
- for ( 1 .. 10 ) {
- push @many, makeone();
- }
-
- print $many[4][5], "\n";
-
- print "@many\n";
-
-=head2 How can I free an array or hash so my program shrinks?
-
-(contributed by Michael Carman)
-
-You usually can't. Memory allocated to lexicals (i.e. my() variables)
-cannot be reclaimed or reused even if they go out of scope. It is
-reserved in case the variables come back into scope. Memory allocated
-to global variables can be reused (within your program) by using
-undef() and/or delete().
-
-On most operating systems, memory allocated to a program can never be
-returned to the system. That's why long-running programs sometimes re-
-exec themselves. Some operating systems (notably, systems that use
-mmap(2) for allocating large chunks of memory) can reclaim memory that
-is no longer used, but on such systems, perl must be configured and
-compiled to use the OS's malloc, not perl's.
-
-In general, memory allocation and de-allocation isn't something you can
-or should be worrying about much in Perl.
-
-See also "How can I make my Perl program take less memory?"
-
-=head2 How can I make my CGI script more efficient?
-
-Beyond the normal measures described to make general Perl programs
-faster or smaller, a CGI program has additional issues. It may be run
-several times per second. Given that each time it runs it will need
-to be re-compiled and will often allocate a megabyte or more of system
-memory, this can be a killer. Compiling into C B<isn't going to help
-you> because the process start-up overhead is where the bottleneck is.
-
-There are two popular ways to avoid this overhead. One solution
-involves running the Apache HTTP server (available from
-http://www.apache.org/ ) with either of the mod_perl or mod_fastcgi
-plugin modules.
-
-With mod_perl and the Apache::Registry module (distributed with
-mod_perl), httpd will run with an embedded Perl interpreter which
-pre-compiles your script and then executes it within the same address
-space without forking. The Apache extension also gives Perl access to
-the internal server API, so modules written in Perl can do just about
-anything a module written in C can. For more on mod_perl, see
-http://perl.apache.org/
-
-With the FCGI module (from CPAN) and the mod_fastcgi
-module (available from http://www.fastcgi.com/ ) each of your Perl
-programs becomes a permanent CGI daemon process.
-
-Both of these solutions can have far-reaching effects on your system
-and on the way you write your CGI programs, so investigate them with
-care.
-
-See also
-http://www.cpan.org/modules/by-category/15_World_Wide_Web_HTML_HTTP_CGI/ .
-
-=head2 How can I hide the source for my Perl program?
-
-Delete it. :-) Seriously, there are a number of (mostly
-unsatisfactory) solutions with varying levels of "security".
-
-First of all, however, you I<can't> take away read permission, because
-the source code has to be readable in order to be compiled and
-interpreted. (That doesn't mean that a CGI script's source is
-readable by people on the web, though--only by people with access to
-the filesystem.) So you have to leave the permissions at the socially
-friendly 0755 level.
-
-Some people regard this as a security problem. If your program does
-insecure things and relies on people not knowing how to exploit those
-insecurities, it is not secure. It is often possible for someone to
-determine the insecure things and exploit them without viewing the
-source. Security through obscurity, the name for hiding your bugs
-instead of fixing them, is little security indeed.
-
-You can try using encryption via source filters (Starting from Perl
-5.8 the Filter::Simple and Filter::Util::Call modules are included in
-the standard distribution), but any decent programmer will be able to
-decrypt it. You can try using the byte code compiler and interpreter
-described later in L<perlfaq3>, but the curious might still be able to
-de-compile it. You can try using the native-code compiler described
-later, but crackers might be able to disassemble it. These pose
-varying degrees of difficulty to people wanting to get at your code,
-but none can definitively conceal it (true of every language, not just
-Perl).
-
-It is very easy to recover the source of Perl programs. You simply
-feed the program to the perl interpreter and use the modules in
-the B:: hierarchy. The B::Deparse module should be able to
-defeat most attempts to hide source. Again, this is not
-unique to Perl.
-
-If you're concerned about people profiting from your code, then the
-bottom line is that nothing but a restrictive license will give you
-legal security. License your software and pepper it with threatening
-statements like "This is unpublished proprietary software of XYZ Corp.
-Your access to it does not give you permission to use it blah blah
-blah." We are not lawyers, of course, so you should see a lawyer if
-you want to be sure your license's wording will stand up in court.
-
-=head2 How can I compile my Perl program into byte code or C?
-
-(contributed by brian d foy)
-
-In general, you can't do this. There are some things that may work
-for your situation though. People usually ask this question
-because they want to distribute their works without giving away
-the source code, and most solutions trade disk space for convenience.
-You probably won't see much of a speed increase either, since most
-solutions simply bundle a Perl interpreter in the final product
-(but see L<How can I make my Perl program run faster?>).
-
-The Perl Archive Toolkit ( http://par.perl.org/ ) is Perl's
-analog to Java's JAR. It's freely available and on CPAN (
-http://search.cpan.org/dist/PAR/ ).
-
-There are also some commercial products that may work for you, although
-you have to buy a license for them.
-
-The Perl Dev Kit ( http://www.activestate.com/Products/Perl_Dev_Kit/ )
-from ActiveState can "Turn your Perl programs into ready-to-run
-executables for HP-UX, Linux, Solaris and Windows."
-
-Perl2Exe ( http://www.indigostar.com/perl2exe.htm ) is a command line
-program for converting perl scripts to executable files. It targets both
-Windows and Unix platforms.
-
-=head2 How can I get C<#!perl> to work on [MS-DOS,NT,...]?
-
-For OS/2 just use
-
- extproc perl -S -your_switches
-
-as the first line in C<*.cmd> file (C<-S> due to a bug in cmd.exe's
-"extproc" handling). For DOS one should first invent a corresponding
-batch file and codify it in C<ALTERNATE_SHEBANG> (see the
-F<dosish.h> file in the source distribution for more information).
-
-The Win95/NT installation, when using the ActiveState port of Perl,
-will modify the Registry to associate the C<.pl> extension with the
-perl interpreter. If you install another port, perhaps even building
-your own Win95/NT Perl from the standard sources by using a Windows port
-of gcc (e.g., with cygwin or mingw32), then you'll have to modify
-the Registry yourself. In addition to associating C<.pl> with the
-interpreter, NT people can use: C<SET PATHEXT=%PATHEXT%;.PL> to let them
-run the program C<install-linux.pl> merely by typing C<install-linux>.
-
-Under "Classic" MacOS, a perl program will have the appropriate Creator and
-Type, so that double-clicking them will invoke the MacPerl application.
-Under Mac OS X, clickable apps can be made from any C<#!> script using Wil
-Sanchez' DropScript utility: http://www.wsanchez.net/software/ .
-
-I<IMPORTANT!>: Whatever you do, PLEASE don't get frustrated, and just
-throw the perl interpreter into your cgi-bin directory, in order to
-get your programs working for a web server. This is an EXTREMELY big
-security risk. Take the time to figure out how to do it correctly.
-
-=head2 Can I write useful Perl programs on the command line?
-
-Yes. Read L<perlrun> for more information. Some examples follow.
-(These assume standard Unix shell quoting rules.)
-
- # sum first and last fields
- perl -lane 'print $F[0] + $F[-1]' *
-
- # identify text files
- perl -le 'for(@ARGV) {print if -f && -T _}' *
-
- # remove (most) comments from C program
- perl -0777 -pe 's{/\*.*?\*/}{}gs' foo.c
-
- # make file a month younger than today, defeating reaper daemons
- perl -e '$X=24*60*60; utime(time(),time() + 30 * $X, at ARGV)' *
-
- # find first unused uid
- perl -le '$i++ while getpwuid($i); print $i'
-
- # display reasonable manpath
- echo $PATH | perl -nl -072 -e '
- s![^/+]*$!man!&&-d&&!$s{$_}++&&push at m,$_;END{print"@m"}'
-
-OK, the last one was actually an Obfuscated Perl Contest entry. :-)
-
-=head2 Why don't Perl one-liners work on my DOS/Mac/VMS system?
-
-The problem is usually that the command interpreters on those systems
-have rather different ideas about quoting than the Unix shells under
-which the one-liners were created. On some systems, you may have to
-change single-quotes to double ones, which you must I<NOT> do on Unix
-or Plan9 systems. You might also have to change a single % to a %%.
-
-For example:
-
- # Unix (including Mac OS X)
- perl -e 'print "Hello world\n"'
-
- # DOS, etc.
- perl -e "print \"Hello world\n\""
-
- # Mac Classic
- print "Hello world\n"
- (then Run "Myscript" or Shift-Command-R)
-
- # MPW
- perl -e 'print "Hello world\n"'
-
- # VMS
- perl -e "print ""Hello world\n"""
-
-The problem is that none of these examples are reliable: they depend on the
-command interpreter. Under Unix, the first two often work. Under DOS,
-it's entirely possible that neither works. If 4DOS was the command shell,
-you'd probably have better luck like this:
-
- perl -e "print <Ctrl-x>"Hello world\n<Ctrl-x>""
-
-Under the Mac, it depends which environment you are using. The MacPerl
-shell, or MPW, is much like Unix shells in its support for several
-quoting variants, except that it makes free use of the Mac's non-ASCII
-characters as control characters.
-
-Using qq(), q(), and qx(), instead of "double quotes", 'single
-quotes', and `backticks`, may make one-liners easier to write.
-
-There is no general solution to all of this. It is a mess.
-
-[Some of this answer was contributed by Kenneth Albanowski.]
-
-=head2 Where can I learn about CGI or Web programming in Perl?
-
-For modules, get the CGI or LWP modules from CPAN. For textbooks,
-see the two especially dedicated to web stuff in the question on
-books. For problems and questions related to the web, like "Why
-do I get 500 Errors" or "Why doesn't it run from the browser right
-when it runs fine on the command line", see the troubleshooting
-guides and references in L<perlfaq9> or in the CGI MetaFAQ:
-
- http://www.perl.org/CGI_MetaFAQ.html
-
-=head2 Where can I learn about object-oriented Perl programming?
-
-A good place to start is L<perltoot>, and you can use L<perlobj>,
-L<perlboot>, L<perltoot>, L<perltooc>, and L<perlbot> for reference.
-
-A good book on OO on Perl is the "Object-Oriented Perl"
-by Damian Conway from Manning Publications, or "Intermediate Perl"
-by Randal Schwartz, brian d foy, and Tom Phoenix from O'Reilly Media.
-
-=head2 Where can I learn about linking C with Perl?
-
-If you want to call C from Perl, start with L<perlxstut>,
-moving on to L<perlxs>, L<xsubpp>, and L<perlguts>. If you want to
-call Perl from C, then read L<perlembed>, L<perlcall>, and
-L<perlguts>. Don't forget that you can learn a lot from looking at
-how the authors of existing extension modules wrote their code and
-solved their problems.
-
-You might not need all the power of XS. The Inline::C module lets
-you put C code directly in your Perl source. It handles all the
-magic to make it work. You still have to learn at least some of
-the perl API but you won't have to deal with the complexity of the
-XS support files.
-
-=head2 I've read perlembed, perlguts, etc., but I can't embed perl in my C program; what am I doing wrong?
-
-Download the ExtUtils::Embed kit from CPAN and run `make test'. If
-the tests pass, read the pods again and again and again. If they
-fail, see L<perlbug> and send a bug report with the output of
-C<make test TEST_VERBOSE=1> along with C<perl -V>.
-
-=head2 When I tried to run my script, I got this message. What does it mean?
-
-A complete list of Perl's error messages and warnings with explanatory
-text can be found in L<perldiag>. You can also use the splain program
-(distributed with Perl) to explain the error messages:
-
- perl program 2>diag.out
- splain [-v] [-p] diag.out
-
-or change your program to explain the messages for you:
-
- use diagnostics;
-
-or
-
- use diagnostics -verbose;
-
-=head2 What's MakeMaker?
-
-(contributed by brian d foy)
-
-The C<ExtUtils::MakeMaker> module, better known simply as "MakeMaker",
-turns a Perl script, typically called C<Makefile.PL>, into a Makefile.
-The Unix tool C<make> uses this file to manage dependencies and actions
-to process and install a Perl distribution.
-
-=head1 AUTHOR AND COPYRIGHT
-
-Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
-other authors as noted. All rights reserved.
-
-This documentation is free; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-Irrespective of its distribution, all code examples here are in the public
-domain. You are permitted and encouraged to use this code and any
-derivatives thereof in your own programs for fun or for profit as you
-see fit. A simple comment in the code giving credit to the FAQ would
-be courteous but is not required.
Deleted: vendor/perl/dist/pod/perlfaq4.pod
===================================================================
--- vendor/perl/dist/pod/perlfaq4.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlfaq4.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,2689 +0,0 @@
-=head1 NAME
-
-perlfaq4 - Data Manipulation
-
-=head1 DESCRIPTION
-
-This section of the FAQ answers questions related to manipulating
-numbers, dates, strings, arrays, hashes, and miscellaneous data issues.
-
-=head1 Data: Numbers
-
-=head2 Why am I getting long decimals (eg, 19.9499999999999) instead of the numbers I should be getting (eg, 19.95)?
-
-For the long explanation, see David Goldberg's "What Every Computer
-Scientist Should Know About Floating-Point Arithmetic"
-(L<http://web.cse.msu.edu/~cse320/Documents/FloatingPoint.pdf>).
-
-Internally, your computer represents floating-point numbers in binary.
-Digital (as in powers of two) computers cannot store all numbers
-exactly. Some real numbers lose precision in the process. This is a
-problem with how computers store numbers and affects all computer
-languages, not just Perl.
-
-L<perlnumber> shows the gory details of number representations and
-conversions.
-
-To limit the number of decimal places in your numbers, you can use the
-C<printf> or C<sprintf> function. See
-L<perlop/"Floating Point Arithmetic"> for more details.
-
- printf "%.2f", 10/3;
-
- my $number = sprintf "%.2f", 10/3;
-
-=head2 Why is int() broken?
-
-Your C<int()> is most probably working just fine. It's the numbers that
-aren't quite what you think.
-
-First, see the answer to "Why am I getting long decimals
-(eg, 19.9499999999999) instead of the numbers I should be getting
-(eg, 19.95)?".
-
-For example, this
-
- print int(0.6/0.2-2), "\n";
-
-will in most computers print 0, not 1, because even such simple
-numbers as 0.6 and 0.2 cannot be presented exactly by floating-point
-numbers. What you think in the above as 'three' is really more like
-2.9999999999999995559.
-
-=head2 Why isn't my octal data interpreted correctly?
-
-(contributed by brian d foy)
-
-You're probably trying to convert a string to a number, which Perl only
-converts as a decimal number. When Perl converts a string to a number, it
-ignores leading spaces and zeroes, then assumes the rest of the digits
-are in base 10:
-
- my $string = '0644';
-
- print $string + 0; # prints 644
-
- print $string + 44; # prints 688, certainly not octal!
-
-This problem usually involves one of the Perl built-ins that has the
-same name a Unix command that uses octal numbers as arguments on the
-command line. In this example, C<chmod> on the command line knows that
-its first argument is octal because that's what it does:
-
- %prompt> chmod 644 file
-
-If you want to use the same literal digits (644) in Perl, you have to tell
-Perl to treat them as octal numbers either by prefixing the digits with
-a C<0> or using C<oct>:
-
- chmod( 0644, $file); # right, has leading zero
- chmod( oct(644), $file ); # also correct
-
-The problem comes in when you take your numbers from something that Perl
-thinks is a string, such as a command line argument in C<@ARGV>:
-
- chmod( $ARGV[0], $file); # wrong, even if "0644"
-
- chmod( oct($ARGV[0]), $file ); # correct, treat string as octal
-
-You can always check the value you're using by printing it in octal
-notation to ensure it matches what you think it should be. Print it
-in octal and decimal format:
-
- printf "0%o %d", $number, $number;
-
-=head2 Does Perl have a round() function? What about ceil() and floor()? Trig functions?
-
-Remember that C<int()> merely truncates toward 0. For rounding to a
-certain number of digits, C<sprintf()> or C<printf()> is usually the
-easiest route.
-
- printf("%.3f", 3.1415926535); # prints 3.142
-
-The C<POSIX> module (part of the standard Perl distribution)
-implements C<ceil()>, C<floor()>, and a number of other mathematical
-and trigonometric functions.
-
- use POSIX;
- $ceil = ceil(3.5); # 4
- $floor = floor(3.5); # 3
-
-In 5.000 to 5.003 perls, trigonometry was done in the C<Math::Complex>
-module. With 5.004, the C<Math::Trig> module (part of the standard Perl
-distribution) implements the trigonometric functions. Internally it
-uses the C<Math::Complex> module and some functions can break out from
-the real axis into the complex plane, for example the inverse sine of
-2.
-
-Rounding in financial applications can have serious implications, and
-the rounding method used should be specified precisely. In these
-cases, it probably pays not to trust whichever system of rounding is
-being used by Perl, but instead to implement the rounding function you
-need yourself.
-
-To see why, notice how you'll still have an issue on half-way-point
-alternation:
-
- for ($i = 0; $i < 1.01; $i += 0.05) { printf "%.1f ",$i}
-
- 0.0 0.1 0.1 0.2 0.2 0.2 0.3 0.3 0.4 0.4 0.5 0.5 0.6 0.7 0.7
- 0.8 0.8 0.9 0.9 1.0 1.0
-
-Don't blame Perl. It's the same as in C. IEEE says we have to do
-this. Perl numbers whose absolute values are integers under 2**31 (on
-32-bit machines) will work pretty much like mathematical integers.
-Other numbers are not guaranteed.
-
-=head2 How do I convert between numeric representations/bases/radixes?
-
-As always with Perl there is more than one way to do it. Below are a
-few examples of approaches to making common conversions between number
-representations. This is intended to be representational rather than
-exhaustive.
-
-Some of the examples later in L<perlfaq4> use the C<Bit::Vector>
-module from CPAN. The reason you might choose C<Bit::Vector> over the
-perl built-in functions is that it works with numbers of ANY size,
-that it is optimized for speed on some operations, and for at least
-some programmers the notation might be familiar.
-
-=over 4
-
-=item How do I convert hexadecimal into decimal
-
-Using perl's built in conversion of C<0x> notation:
-
- $dec = 0xDEADBEEF;
-
-Using the C<hex> function:
-
- $dec = hex("DEADBEEF");
-
-Using C<pack>:
-
- $dec = unpack("N", pack("H8", substr("0" x 8 . "DEADBEEF", -8)));
-
-Using the CPAN module C<Bit::Vector>:
-
- use Bit::Vector;
- $vec = Bit::Vector->new_Hex(32, "DEADBEEF");
- $dec = $vec->to_Dec();
-
-=item How do I convert from decimal to hexadecimal
-
-Using C<sprintf>:
-
- $hex = sprintf("%X", 3735928559); # upper case A-F
- $hex = sprintf("%x", 3735928559); # lower case a-f
-
-Using C<unpack>:
-
- $hex = unpack("H*", pack("N", 3735928559));
-
-Using C<Bit::Vector>:
-
- use Bit::Vector;
- $vec = Bit::Vector->new_Dec(32, -559038737);
- $hex = $vec->to_Hex();
-
-And C<Bit::Vector> supports odd bit counts:
-
- use Bit::Vector;
- $vec = Bit::Vector->new_Dec(33, 3735928559);
- $vec->Resize(32); # suppress leading 0 if unwanted
- $hex = $vec->to_Hex();
-
-=item How do I convert from octal to decimal
-
-Using Perl's built in conversion of numbers with leading zeros:
-
- $dec = 033653337357; # note the leading 0!
-
-Using the C<oct> function:
-
- $dec = oct("33653337357");
-
-Using C<Bit::Vector>:
-
- use Bit::Vector;
- $vec = Bit::Vector->new(32);
- $vec->Chunk_List_Store(3, split(//, reverse "33653337357"));
- $dec = $vec->to_Dec();
-
-=item How do I convert from decimal to octal
-
-Using C<sprintf>:
-
- $oct = sprintf("%o", 3735928559);
-
-Using C<Bit::Vector>:
-
- use Bit::Vector;
- $vec = Bit::Vector->new_Dec(32, -559038737);
- $oct = reverse join('', $vec->Chunk_List_Read(3));
-
-=item How do I convert from binary to decimal
-
-Perl 5.6 lets you write binary numbers directly with
-the C<0b> notation:
-
- $number = 0b10110110;
-
-Using C<oct>:
-
- my $input = "10110110";
- $decimal = oct( "0b$input" );
-
-Using C<pack> and C<ord>:
-
- $decimal = ord(pack('B8', '10110110'));
-
-Using C<pack> and C<unpack> for larger strings:
-
- $int = unpack("N", pack("B32",
- substr("0" x 32 . "11110101011011011111011101111", -32)));
- $dec = sprintf("%d", $int);
-
- # substr() is used to left-pad a 32-character string with zeros.
-
-Using C<Bit::Vector>:
-
- $vec = Bit::Vector->new_Bin(32, "11011110101011011011111011101111");
- $dec = $vec->to_Dec();
-
-=item How do I convert from decimal to binary
-
-Using C<sprintf> (perl 5.6+):
-
- $bin = sprintf("%b", 3735928559);
-
-Using C<unpack>:
-
- $bin = unpack("B*", pack("N", 3735928559));
-
-Using C<Bit::Vector>:
-
- use Bit::Vector;
- $vec = Bit::Vector->new_Dec(32, -559038737);
- $bin = $vec->to_Bin();
-
-The remaining transformations (e.g. hex -> oct, bin -> hex, etc.)
-are left as an exercise to the inclined reader.
-
-=back
-
-=head2 Why doesn't & work the way I want it to?
-
-The behavior of binary arithmetic operators depends on whether they're
-used on numbers or strings. The operators treat a string as a series
-of bits and work with that (the string C<"3"> is the bit pattern
-C<00110011>). The operators work with the binary form of a number
-(the number C<3> is treated as the bit pattern C<00000011>).
-
-So, saying C<11 & 3> performs the "and" operation on numbers (yielding
-C<3>). Saying C<"11" & "3"> performs the "and" operation on strings
-(yielding C<"1">).
-
-Most problems with C<&> and C<|> arise because the programmer thinks
-they have a number but really it's a string or vice versa. To avoid this,
-stringify the arguments explicitly (using C<""> or C<qq()>) or convert them
-to numbers explicitly (using C<0+$arg>). The rest arise because
-the programmer says:
-
- if ("\020\020" & "\101\101") {
- # ...
- }
-
-but a string consisting of two null bytes (the result of C<"\020\020"
-& "\101\101">) is not a false value in Perl. You need:
-
- if ( ("\020\020" & "\101\101") !~ /[^\000]/) {
- # ...
- }
-
-=head2 How do I multiply matrices?
-
-Use the C<Math::Matrix> or C<Math::MatrixReal> modules (available from CPAN)
-or the C<PDL> extension (also available from CPAN).
-
-=head2 How do I perform an operation on a series of integers?
-
-To call a function on each element in an array, and collect the
-results, use:
-
- @results = map { my_func($_) } @array;
-
-For example:
-
- @triple = map { 3 * $_ } @single;
-
-To call a function on each element of an array, but ignore the
-results:
-
- foreach $iterator (@array) {
- some_func($iterator);
- }
-
-To call a function on each integer in a (small) range, you B<can> use:
-
- @results = map { some_func($_) } (5 .. 25);
-
-but you should be aware that the C<..> operator creates a list of
-all integers in the range. This can take a lot of memory for large
-ranges. Instead use:
-
- @results = ();
- for ($i=5; $i <= 500_005; $i++) {
- push(@results, some_func($i));
- }
-
-This situation has been fixed in Perl5.005. Use of C<..> in a C<for>
-loop will iterate over the range, without creating the entire range.
-
- for my $i (5 .. 500_005) {
- push(@results, some_func($i));
- }
-
-will not create a list of 500,000 integers.
-
-=head2 How can I output Roman numerals?
-
-Get the L<http://www.cpan.org/modules/by-module/Roman> module.
-
-=head2 Why aren't my random numbers random?
-
-If you're using a version of Perl before 5.004, you must call C<srand>
-once at the start of your program to seed the random number generator.
-
- BEGIN { srand() if $] < 5.004 }
-
-5.004 and later automatically call C<srand> at the beginning. Don't
-call C<srand> more than once--you make your numbers less random,
-rather than more.
-
-Computers are good at being predictable and bad at being random
-(despite appearances caused by bugs in your programs :-). The
-F<random> article in the "Far More Than You Ever Wanted To Know"
-collection in L<http://www.cpan.org/misc/olddoc/FMTEYEWTK.tgz>, courtesy
-of Tom Phoenix, talks more about this. John von Neumann said, "Anyone
-who attempts to generate random numbers by deterministic means is, of
-course, living in a state of sin."
-
-If you want numbers that are more random than C<rand> with C<srand>
-provides, you should also check out the C<Math::TrulyRandom> module from
-CPAN. It uses the imperfections in your system's timer to generate
-random numbers, but this takes quite a while. If you want a better
-pseudorandom generator than comes with your operating system, look at
-"Numerical Recipes in C" at L<http://www.nr.com/>.
-
-=head2 How do I get a random number between X and Y?
-
-To get a random number between two values, you can use the C<rand()>
-built-in to get a random number between 0 and 1. From there, you shift
-that into the range that you want.
-
-C<rand($x)> returns a number such that C<< 0 <= rand($x) < $x >>. Thus
-what you want to have perl figure out is a random number in the range
-from 0 to the difference between your I<X> and I<Y>.
-
-That is, to get a number between 10 and 15, inclusive, you want a
-random number between 0 and 5 that you can then add to 10.
-
- my $number = 10 + int rand( 15-10+1 ); # ( 10,11,12,13,14, or 15 )
-
-Hence you derive the following simple function to abstract
-that. It selects a random integer between the two given
-integers (inclusive), For example: C<random_int_between(50,120)>.
-
- sub random_int_between {
- my($min, $max) = @_;
- # Assumes that the two arguments are integers themselves!
- return $min if $min == $max;
- ($min, $max) = ($max, $min) if $min > $max;
- return $min + int rand(1 + $max - $min);
- }
-
-=head1 Data: Dates
-
-=head2 How do I find the day or week of the year?
-
-The day of the year is in the list returned
-by the C<localtime> function. Without an
-argument C<localtime> uses the current time.
-
- my $day_of_year = (localtime)[7];
-
-The C<POSIX> module can also format a date as the day of the year or
-week of the year.
-
- use POSIX qw/strftime/;
- my $day_of_year = strftime "%j", localtime;
- my $week_of_year = strftime "%W", localtime;
-
-To get the day of year for any date, use C<POSIX>'s C<mktime> to get
-a time in epoch seconds for the argument to C<localtime>.
-
- use POSIX qw/mktime strftime/;
- my $week_of_year = strftime "%W",
- localtime( mktime( 0, 0, 0, 18, 11, 87 ) );
-
-You can also use C<Time::Piece>, which comes with Perl and provides a
-C<localtime> that returns an object:
-
- use Time::Piece;
- my $day_of_year = localtime->yday;
- my $week_of_year = localtime->week;
-
-The C<Date::Calc> module provides two functions to calculate these, too:
-
- use Date::Calc;
- my $day_of_year = Day_of_Year( 1987, 12, 18 );
- my $week_of_year = Week_of_Year( 1987, 12, 18 );
-
-=head2 How do I find the current century or millennium?
-
-Use the following simple functions:
-
- sub get_century {
- return int((((localtime(shift || time))[5] + 1999))/100);
- }
-
- sub get_millennium {
- return 1+int((((localtime(shift || time))[5] + 1899))/1000);
- }
-
-On some systems, the C<POSIX> module's C<strftime()> function has been
-extended in a non-standard way to use a C<%C> format, which they
-sometimes claim is the "century". It isn't, because on most such
-systems, this is only the first two digits of the four-digit year, and
-thus cannot be used to determine reliably the current century or
-millennium.
-
-=head2 How can I compare two dates and find the difference?
-
-(contributed by brian d foy)
-
-You could just store all your dates as a number and then subtract.
-Life isn't always that simple though.
-
-The C<Time::Piece> module, which comes with Perl, replaces C<localtime>
-with a version that returns an object. It also overloads the comparison
-operators so you can compare them directly:
-
- use Time::Piece;
- my $date1 = localtime( $some_time );
- my $date2 = localtime( $some_other_time );
-
- if( $date1 < $date2 ) {
- print "The date was in the past\n";
- }
-
-You can also get differences with a subtraction, which returns a
-C<Time::Seconds> object:
-
- my $diff = $date1 - $date2;
- print "The difference is ", $date_diff->days, " days\n";
-
-If you want to work with formatted dates, the C<Date::Manip>,
-C<Date::Calc>, or C<DateTime> modules can help you.
-
-=head2 How can I take a string and turn it into epoch seconds?
-
-If it's a regular enough string that it always has the same format,
-you can split it up and pass the parts to C<timelocal> in the standard
-C<Time::Local> module. Otherwise, you should look into the C<Date::Calc>,
-C<Date::Parse>, and C<Date::Manip> modules from CPAN.
-
-=head2 How can I find the Julian Day?
-
-(contributed by brian d foy and Dave Cross)
-
-You can use the C<Time::Piece> module, part of the Standard Library,
-which can convert a date/time to a Julian Day:
-
- $ perl -MTime::Piece -le 'print localtime->julian_day'
- 2455607.7959375
-
-Or the modified Julian Day:
-
- $ perl -MTime::Piece -le 'print localtime->mjd'
- 55607.2961226851
-
-Or even the day of the year (which is what some people think of as a
-Julian day):
-
- $ perl -MTime::Piece -le 'print localtime->yday'
- 45
-
-You can also do the same things with the C<DateTime> module:
-
- $ perl -MDateTime -le'print DateTime->today->jd'
- 2453401.5
- $ perl -MDateTime -le'print DateTime->today->mjd'
- 53401
- $ perl -MDateTime -le'print DateTime->today->doy'
- 31
-
-You can use the C<Time::JulianDay> module available on CPAN. Ensure
-that you really want to find a Julian day, though, as many people have
-different ideas about Julian days (see http://www.hermetic.ch/cal_stud/jdn.htm
-for instance):
-
- $ perl -MTime::JulianDay -le 'print local_julian_day( time )'
- 55608
-
-=head2 How do I find yesterday's date?
-X<date> X<yesterday> X<DateTime> X<Date::Calc> X<Time::Local>
-X<daylight saving time> X<day> X<Today_and_Now> X<localtime>
-X<timelocal>
-
-(contributed by brian d foy)
-
-To do it correctly, you can use one of the C<Date> modules since they
-work with calendars instead of times. The C<DateTime> module makes it
-simple, and give you the same time of day, only the day before,
-despite daylight saving time changes:
-
- use DateTime;
-
- my $yesterday = DateTime->now->subtract( days => 1 );
-
- print "Yesterday was $yesterday\n";
-
-You can also use the C<Date::Calc> module using its C<Today_and_Now>
-function.
-
- use Date::Calc qw( Today_and_Now Add_Delta_DHMS );
-
- my @date_time = Add_Delta_DHMS( Today_and_Now(), -1, 0, 0, 0 );
-
- print "@date_time\n";
-
-Most people try to use the time rather than the calendar to figure out
-dates, but that assumes that days are twenty-four hours each. For
-most people, there are two days a year when they aren't: the switch to
-and from summer time throws this off. For example, the rest of the
-suggestions will be wrong sometimes:
-
-Starting with Perl 5.10, C<Time::Piece> and C<Time::Seconds> are part
-of the standard distribution, so you might think that you could do
-something like this:
-
- use Time::Piece;
- use Time::Seconds;
-
- my $yesterday = localtime() - ONE_DAY; # WRONG
- print "Yesterday was $yesterday\n";
-
-The C<Time::Piece> module exports a new C<localtime> that returns an
-object, and C<Time::Seconds> exports the C<ONE_DAY> constant that is a
-set number of seconds. This means that it always gives the time 24
-hours ago, which is not always yesterday. This can cause problems
-around the end of daylight saving time when there's one day that is 25
-hours long.
-
-You have the same problem with C<Time::Local>, which will give the wrong
-answer for those same special cases:
-
- # contributed by Gunnar Hjalmarsson
- use Time::Local;
- my $today = timelocal 0, 0, 12, ( localtime )[3..5];
- my ($d, $m, $y) = ( localtime $today-86400 )[3..5]; # WRONG
- printf "Yesterday: %d-%02d-%02d\n", $y+1900, $m+1, $d;
-
-=head2 Does Perl have a Year 2000 or 2038 problem? Is Perl Y2K compliant?
-
-(contributed by brian d foy)
-
-Perl itself never had a Y2K problem, although that never stopped people
-from creating Y2K problems on their own. See the documentation for
-C<localtime> for its proper use.
-
-Starting with Perl 5.12, C<localtime> and C<gmtime> can handle dates past
-03:14:08 January 19, 2038, when a 32-bit based time would overflow. You
-still might get a warning on a 32-bit C<perl>:
-
- % perl5.12 -E 'say scalar localtime( 0x9FFF_FFFFFFFF )'
- Integer overflow in hexadecimal number at -e line 1.
- Wed Nov 1 19:42:39 5576711
-
-On a 64-bit C<perl>, you can get even larger dates for those really long
-running projects:
-
- % perl5.12 -E 'say scalar gmtime( 0x9FFF_FFFFFFFF )'
- Thu Nov 2 00:42:39 5576711
-
-You're still out of luck if you need to keep track of decaying protons
-though.
-
-=head1 Data: Strings
-
-=head2 How do I validate input?
-
-(contributed by brian d foy)
-
-There are many ways to ensure that values are what you expect or
-want to accept. Besides the specific examples that we cover in the
-perlfaq, you can also look at the modules with "Assert" and "Validate"
-in their names, along with other modules such as C<Regexp::Common>.
-
-Some modules have validation for particular types of input, such
-as C<Business::ISBN>, C<Business::CreditCard>, C<Email::Valid>,
-and C<Data::Validate::IP>.
-
-=head2 How do I unescape a string?
-
-It depends just what you mean by "escape". URL escapes are dealt
-with in L<perlfaq9>. Shell escapes with the backslash (C<\>)
-character are removed with
-
- s/\\(.)/$1/g;
-
-This won't expand C<"\n"> or C<"\t"> or any other special escapes.
-
-=head2 How do I remove consecutive pairs of characters?
-
-(contributed by brian d foy)
-
-You can use the substitution operator to find pairs of characters (or
-runs of characters) and replace them with a single instance. In this
-substitution, we find a character in C<(.)>. The memory parentheses
-store the matched character in the back-reference C<\g1> and we use
-that to require that the same thing immediately follow it. We replace
-that part of the string with the character in C<$1>.
-
- s/(.)\g1/$1/g;
-
-We can also use the transliteration operator, C<tr///>. In this
-example, the search list side of our C<tr///> contains nothing, but
-the C<c> option complements that so it contains everything. The
-replacement list also contains nothing, so the transliteration is
-almost a no-op since it won't do any replacements (or more exactly,
-replace the character with itself). However, the C<s> option squashes
-duplicated and consecutive characters in the string so a character
-does not show up next to itself
-
- my $str = 'Haarlem'; # in the Netherlands
- $str =~ tr///cs; # Now Harlem, like in New York
-
-=head2 How do I expand function calls in a string?
-
-(contributed by brian d foy)
-
-This is documented in L<perlref>, and although it's not the easiest
-thing to read, it does work. In each of these examples, we call the
-function inside the braces used to dereference a reference. If we
-have more than one return value, we can construct and dereference an
-anonymous array. In this case, we call the function in list context.
-
- print "The time values are @{ [localtime] }.\n";
-
-If we want to call the function in scalar context, we have to do a bit
-more work. We can really have any code we like inside the braces, so
-we simply have to end with the scalar reference, although how you do
-that is up to you, and you can use code inside the braces. Note that
-the use of parens creates a list context, so we need C<scalar> to
-force the scalar context on the function:
-
- print "The time is ${\(scalar localtime)}.\n"
-
- print "The time is ${ my $x = localtime; \$x }.\n";
-
-If your function already returns a reference, you don't need to create
-the reference yourself.
-
- sub timestamp { my $t = localtime; \$t }
-
- print "The time is ${ timestamp() }.\n";
-
-The C<Interpolation> module can also do a lot of magic for you. You can
-specify a variable name, in this case C<E>, to set up a tied hash that
-does the interpolation for you. It has several other methods to do this
-as well.
-
- use Interpolation E => 'eval';
- print "The time values are $E{localtime()}.\n";
-
-In most cases, it is probably easier to simply use string concatenation,
-which also forces scalar context.
-
- print "The time is " . localtime() . ".\n";
-
-=head2 How do I find matching/nesting anything?
-
-This isn't something that can be done in one regular expression, no
-matter how complicated. To find something between two single
-characters, a pattern like C</x([^x]*)x/> will get the intervening
-bits in $1. For multiple ones, then something more like
-C</alpha(.*?)omega/> would be needed. But none of these deals with
-nested patterns. For balanced expressions using C<(>, C<{>, C<[> or
-C<< < >> as delimiters, use the CPAN module Regexp::Common, or see
-L<perlre/(??{ code })>. For other cases, you'll have to write a
-parser.
-
-If you are serious about writing a parser, there are a number of
-modules or oddities that will make your life a lot easier. There are
-the CPAN modules C<Parse::RecDescent>, C<Parse::Yapp>, and
-C<Text::Balanced>; and the C<byacc> program. Starting from perl 5.8
-the C<Text::Balanced> is part of the standard distribution.
-
-One simple destructive, inside-out approach that you might try is to
-pull out the smallest nesting parts one at a time:
-
- while (s/BEGIN((?:(?!BEGIN)(?!END).)*)END//gs) {
- # do something with $1
- }
-
-A more complicated and sneaky approach is to make Perl's regular
-expression engine do it for you. This is courtesy Dean Inada, and
-rather has the nature of an Obfuscated Perl Contest entry, but it
-really does work:
-
- # $_ contains the string to parse
- # BEGIN and END are the opening and closing markers for the
- # nested text.
-
- @( = ('(','');
- @) = (')','');
- ($re=$_)=~s/((BEGIN)|(END)|.)/$)[!$3]\Q$1\E$([!$2]/gs;
- @$ = (eval{/$re/},$@!~/unmatched/i);
- print join("\n",@$[0..$#$]) if( $$[-1] );
-
-=head2 How do I reverse a string?
-
-Use C<reverse()> in scalar context, as documented in
-L<perlfunc/reverse>.
-
- $reversed = reverse $string;
-
-=head2 How do I expand tabs in a string?
-
-You can do it yourself:
-
- 1 while $string =~ s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e;
-
-Or you can just use the C<Text::Tabs> module (part of the standard Perl
-distribution).
-
- use Text::Tabs;
- @expanded_lines = expand(@lines_with_tabs);
-
-=head2 How do I reformat a paragraph?
-
-Use C<Text::Wrap> (part of the standard Perl distribution):
-
- use Text::Wrap;
- print wrap("\t", ' ', @paragraphs);
-
-The paragraphs you give to C<Text::Wrap> should not contain embedded
-newlines. C<Text::Wrap> doesn't justify the lines (flush-right).
-
-Or use the CPAN module C<Text::Autoformat>. Formatting files can be
-easily done by making a shell alias, like so:
-
- alias fmt="perl -i -MText::Autoformat -n0777 \
- -e 'print autoformat $_, {all=>1}' $*"
-
-See the documentation for C<Text::Autoformat> to appreciate its many
-capabilities.
-
-=head2 How can I access or change N characters of a string?
-
-You can access the first characters of a string with substr().
-To get the first character, for example, start at position 0
-and grab the string of length 1.
-
-
- $string = "Just another Perl Hacker";
- $first_char = substr( $string, 0, 1 ); # 'J'
-
-To change part of a string, you can use the optional fourth
-argument which is the replacement string.
-
- substr( $string, 13, 4, "Perl 5.8.0" );
-
-You can also use substr() as an lvalue.
-
- substr( $string, 13, 4 ) = "Perl 5.8.0";
-
-=head2 How do I change the Nth occurrence of something?
-
-You have to keep track of N yourself. For example, let's say you want
-to change the fifth occurrence of C<"whoever"> or C<"whomever"> into
-C<"whosoever"> or C<"whomsoever">, case insensitively. These
-all assume that $_ contains the string to be altered.
-
- $count = 0;
- s{((whom?)ever)}{
- ++$count == 5 # is it the 5th?
- ? "${2}soever" # yes, swap
- : $1 # renege and leave it there
- }ige;
-
-In the more general case, you can use the C</g> modifier in a C<while>
-loop, keeping count of matches.
-
- $WANT = 3;
- $count = 0;
- $_ = "One fish two fish red fish blue fish";
- while (/(\w+)\s+fish\b/gi) {
- if (++$count == $WANT) {
- print "The third fish is a $1 one.\n";
- }
- }
-
-That prints out: C<"The third fish is a red one."> You can also use a
-repetition count and repeated pattern like this:
-
- /(?:\w+\s+fish\s+){2}(\w+)\s+fish/i;
-
-=head2 How can I count the number of occurrences of a substring within a string?
-
-There are a number of ways, with varying efficiency. If you want a
-count of a certain single character (X) within a string, you can use the
-C<tr///> function like so:
-
- $string = "ThisXlineXhasXsomeXx'sXinXit";
- $count = ($string =~ tr/X//);
- print "There are $count X characters in the string";
-
-This is fine if you are just looking for a single character. However,
-if you are trying to count multiple character substrings within a
-larger string, C<tr///> won't work. What you can do is wrap a while()
-loop around a global pattern match. For example, let's count negative
-integers:
-
- $string = "-9 55 48 -2 23 -76 4 14 -44";
- while ($string =~ /-\d+/g) { $count++ }
- print "There are $count negative numbers in the string";
-
-Another version uses a global match in list context, then assigns the
-result to a scalar, producing a count of the number of matches.
-
- $count = () = $string =~ /-\d+/g;
-
-=head2 How do I capitalize all the words on one line?
-X<Text::Autoformat> X<capitalize> X<case, title> X<case, sentence>
-
-(contributed by brian d foy)
-
-Damian Conway's L<Text::Autoformat> handles all of the thinking
-for you.
-
- use Text::Autoformat;
- my $x = "Dr. Strangelove or: How I Learned to Stop ".
- "Worrying and Love the Bomb";
-
- print $x, "\n";
- for my $style (qw( sentence title highlight )) {
- print autoformat($x, { case => $style }), "\n";
- }
-
-How do you want to capitalize those words?
-
- FRED AND BARNEY'S LODGE # all uppercase
- Fred And Barney's Lodge # title case
- Fred and Barney's Lodge # highlight case
-
-It's not as easy a problem as it looks. How many words do you think
-are in there? Wait for it... wait for it.... If you answered 5
-you're right. Perl words are groups of C<\w+>, but that's not what
-you want to capitalize. How is Perl supposed to know not to capitalize
-that C<s> after the apostrophe? You could try a regular expression:
-
- $string =~ s/ (
- (^\w) #at the beginning of the line
- | # or
- (\s\w) #preceded by whitespace
- )
- /\U$1/xg;
-
- $string =~ s/([\w']+)/\u\L$1/g;
-
-Now, what if you don't want to capitalize that "and"? Just use
-L<Text::Autoformat> and get on with the next problem. :)
-
-=head2 How can I split a [character]-delimited string except when inside [character]?
-
-Several modules can handle this sort of parsing--C<Text::Balanced>,
-C<Text::CSV>, C<Text::CSV_XS>, and C<Text::ParseWords>, among others.
-
-Take the example case of trying to split a string that is
-comma-separated into its different fields. You can't use C<split(/,/)>
-because you shouldn't split if the comma is inside quotes. For
-example, take a data line like this:
-
- SAR001,"","Cimetrix, Inc","Bob Smith","CAM",N,8,1,0,7,"Error, Core Dumped"
-
-Due to the restriction of the quotes, this is a fairly complex
-problem. Thankfully, we have Jeffrey Friedl, author of
-I<Mastering Regular Expressions>, to handle these for us. He
-suggests (assuming your string is contained in C<$text>):
-
- @new = ();
- push(@new, $+) while $text =~ m{
- "([^\"\\]*(?:\\.[^\"\\]*)*)",? # groups the phrase inside the quotes
- | ([^,]+),?
- | ,
- }gx;
- push(@new, undef) if substr($text,-1,1) eq ',';
-
-If you want to represent quotation marks inside a
-quotation-mark-delimited field, escape them with backslashes (eg,
-C<"like \"this\"">.
-
-Alternatively, the C<Text::ParseWords> module (part of the standard
-Perl distribution) lets you say:
-
- use Text::ParseWords;
- @new = quotewords(",", 0, $text);
-
-=head2 How do I strip blank space from the beginning/end of a string?
-
-(contributed by brian d foy)
-
-A substitution can do this for you. For a single line, you want to
-replace all the leading or trailing whitespace with nothing. You
-can do that with a pair of substitutions:
-
- s/^\s+//;
- s/\s+$//;
-
-You can also write that as a single substitution, although it turns
-out the combined statement is slower than the separate ones. That
-might not matter to you, though:
-
- s/^\s+|\s+$//g;
-
-In this regular expression, the alternation matches either at the
-beginning or the end of the string since the anchors have a lower
-precedence than the alternation. With the C</g> flag, the substitution
-makes all possible matches, so it gets both. Remember, the trailing
-newline matches the C<\s+>, and the C<$> anchor can match to the
-absolute end of the string, so the newline disappears too. Just add
-the newline to the output, which has the added benefit of preserving
-"blank" (consisting entirely of whitespace) lines which the C<^\s+>
-would remove all by itself:
-
- while( <> ) {
- s/^\s+|\s+$//g;
- print "$_\n";
- }
-
-For a multi-line string, you can apply the regular expression to each
-logical line in the string by adding the C</m> flag (for
-"multi-line"). With the C</m> flag, the C<$> matches I<before> an
-embedded newline, so it doesn't remove it. This pattern still removes
-the newline at the end of the string:
-
- $string =~ s/^\s+|\s+$//gm;
-
-Remember that lines consisting entirely of whitespace will disappear,
-since the first part of the alternation can match the entire string
-and replace it with nothing. If you need to keep embedded blank lines,
-you have to do a little more work. Instead of matching any whitespace
-(since that includes a newline), just match the other whitespace:
-
- $string =~ s/^[\t\f ]+|[\t\f ]+$//mg;
-
-=head2 How do I pad a string with blanks or pad a number with zeroes?
-
-In the following examples, C<$pad_len> is the length to which you wish
-to pad the string, C<$text> or C<$num> contains the string to be padded,
-and C<$pad_char> contains the padding character. You can use a single
-character string constant instead of the C<$pad_char> variable if you
-know what it is in advance. And in the same way you can use an integer in
-place of C<$pad_len> if you know the pad length in advance.
-
-The simplest method uses the C<sprintf> function. It can pad on the left
-or right with blanks and on the left with zeroes and it will not
-truncate the result. The C<pack> function can only pad strings on the
-right with blanks and it will truncate the result to a maximum length of
-C<$pad_len>.
-
- # Left padding a string with blanks (no truncation):
- $padded = sprintf("%${pad_len}s", $text);
- $padded = sprintf("%*s", $pad_len, $text); # same thing
-
- # Right padding a string with blanks (no truncation):
- $padded = sprintf("%-${pad_len}s", $text);
- $padded = sprintf("%-*s", $pad_len, $text); # same thing
-
- # Left padding a number with 0 (no truncation):
- $padded = sprintf("%0${pad_len}d", $num);
- $padded = sprintf("%0*d", $pad_len, $num); # same thing
-
- # Right padding a string with blanks using pack (will truncate):
- $padded = pack("A$pad_len",$text);
-
-If you need to pad with a character other than blank or zero you can use
-one of the following methods. They all generate a pad string with the
-C<x> operator and combine that with C<$text>. These methods do
-not truncate C<$text>.
-
-Left and right padding with any character, creating a new string:
-
- $padded = $pad_char x ( $pad_len - length( $text ) ) . $text;
- $padded = $text . $pad_char x ( $pad_len - length( $text ) );
-
-Left and right padding with any character, modifying C<$text> directly:
-
- substr( $text, 0, 0 ) = $pad_char x ( $pad_len - length( $text ) );
- $text .= $pad_char x ( $pad_len - length( $text ) );
-
-=head2 How do I extract selected columns from a string?
-
-(contributed by brian d foy)
-
-If you know the columns that contain the data, you can
-use C<substr> to extract a single column.
-
- my $column = substr( $line, $start_column, $length );
-
-You can use C<split> if the columns are separated by whitespace or
-some other delimiter, as long as whitespace or the delimiter cannot
-appear as part of the data.
-
- my $line = ' fred barney betty ';
- my @columns = split /\s+/, $line;
- # ( '', 'fred', 'barney', 'betty' );
-
- my $line = 'fred||barney||betty';
- my @columns = split /\|/, $line;
- # ( 'fred', '', 'barney', '', 'betty' );
-
-If you want to work with comma-separated values, don't do this since
-that format is a bit more complicated. Use one of the modules that
-handle that format, such as C<Text::CSV>, C<Text::CSV_XS>, or
-C<Text::CSV_PP>.
-
-If you want to break apart an entire line of fixed columns, you can use
-C<unpack> with the A (ASCII) format. By using a number after the format
-specifier, you can denote the column width. See the C<pack> and C<unpack>
-entries in L<perlfunc> for more details.
-
- my @fields = unpack( $line, "A8 A8 A8 A16 A4" );
-
-Note that spaces in the format argument to C<unpack> do not denote literal
-spaces. If you have space separated data, you may want C<split> instead.
-
-=head2 How do I find the soundex value of a string?
-
-(contributed by brian d foy)
-
-You can use the Text::Soundex module. If you want to do fuzzy or close
-matching, you might also try the C<String::Approx>, and
-C<Text::Metaphone>, and C<Text::DoubleMetaphone> modules.
-
-=head2 How can I expand variables in text strings?
-
-(contributed by brian d foy)
-
-If you can avoid it, don't, or if you can use a templating system,
-such as C<Text::Template> or C<Template> Toolkit, do that instead. You
-might even be able to get the job done with C<sprintf> or C<printf>:
-
- my $string = sprintf 'Say hello to %s and %s', $foo, $bar;
-
-However, for the one-off simple case where I don't want to pull out a
-full templating system, I'll use a string that has two Perl scalar
-variables in it. In this example, I want to expand C<$foo> and C<$bar>
-to their variable's values:
-
- my $foo = 'Fred';
- my $bar = 'Barney';
- $string = 'Say hello to $foo and $bar';
-
-One way I can do this involves the substitution operator and a double
-C</e> flag. The first C</e> evaluates C<$1> on the replacement side and
-turns it into C<$foo>. The second /e starts with C<$foo> and replaces
-it with its value. C<$foo>, then, turns into 'Fred', and that's finally
-what's left in the string:
-
- $string =~ s/(\$\w+)/$1/eeg; # 'Say hello to Fred and Barney'
-
-The C</e> will also silently ignore violations of strict, replacing
-undefined variable names with the empty string. Since I'm using the
-C</e> flag (twice even!), I have all of the same security problems I
-have with C<eval> in its string form. If there's something odd in
-C<$foo>, perhaps something like C<@{[ system "rm -rf /" ]}>, then
-I could get myself in trouble.
-
-To get around the security problem, I could also pull the values from
-a hash instead of evaluating variable names. Using a single C</e>, I
-can check the hash to ensure the value exists, and if it doesn't, I
-can replace the missing value with a marker, in this case C<???> to
-signal that I missed something:
-
- my $string = 'This has $foo and $bar';
-
- my %Replacements = (
- foo => 'Fred',
- );
-
- # $string =~ s/\$(\w+)/$Replacements{$1}/g;
- $string =~ s/\$(\w+)/
- exists $Replacements{$1} ? $Replacements{$1} : '???'
- /eg;
-
- print $string;
-
-=head2 What's wrong with always quoting "$vars"?
-
-The problem is that those double-quotes force
-stringification--coercing numbers and references into strings--even
-when you don't want them to be strings. Think of it this way:
-double-quote expansion is used to produce new strings. If you already
-have a string, why do you need more?
-
-If you get used to writing odd things like these:
-
- print "$var"; # BAD
- $new = "$old"; # BAD
- somefunc("$var"); # BAD
-
-You'll be in trouble. Those should (in 99.8% of the cases) be
-the simpler and more direct:
-
- print $var;
- $new = $old;
- somefunc($var);
-
-Otherwise, besides slowing you down, you're going to break code when
-the thing in the scalar is actually neither a string nor a number, but
-a reference:
-
- func(\@array);
- sub func {
- my $aref = shift;
- my $oref = "$aref"; # WRONG
- }
-
-You can also get into subtle problems on those few operations in Perl
-that actually do care about the difference between a string and a
-number, such as the magical C<++> autoincrement operator or the
-syscall() function.
-
-Stringification also destroys arrays.
-
- @lines = `command`;
- print "@lines"; # WRONG - extra blanks
- print @lines; # right
-
-=head2 Why don't my E<lt>E<lt>HERE documents work?
-
-Here documents are found in L<perlop>. Check for these three things:
-
-=over 4
-
-=item There must be no space after the E<lt>E<lt> part.
-
-=item There (probably) should be a semicolon at the end of the opening token
-
-=item You can't (easily) have any space in front of the tag.
-
-=item There needs to be at least a line separator after the end token.
-
-=back
-
-If you want to indent the text in the here document, you
-can do this:
-
- # all in one
- ($VAR = <<HERE_TARGET) =~ s/^\s+//gm;
- your text
- goes here
- HERE_TARGET
-
-But the HERE_TARGET must still be flush against the margin.
-If you want that indented also, you'll have to quote
-in the indentation.
-
- ($quote = <<' FINIS') =~ s/^\s+//gm;
- ...we will have peace, when you and all your works have
- perished--and the works of your dark master to whom you
- would deliver us. You are a liar, Saruman, and a corrupter
- of men's hearts. --Theoden in /usr/src/perl/taint.c
- FINIS
- $quote =~ s/\s+--/\n--/;
-
-A nice general-purpose fixer-upper function for indented here documents
-follows. It expects to be called with a here document as its argument.
-It looks to see whether each line begins with a common substring, and
-if so, strips that substring off. Otherwise, it takes the amount of leading
-whitespace found on the first line and removes that much off each
-subsequent line.
-
- sub fix {
- local $_ = shift;
- my ($white, $leader); # common whitespace and common leading string
- if (/^\s*(?:([^\w\s]+)(\s*).*\n)(?:\s*\g1\g2?.*\n)+$/) {
- ($white, $leader) = ($2, quotemeta($1));
- } else {
- ($white, $leader) = (/^(\s+)/, '');
- }
- s/^\s*?$leader(?:$white)?//gm;
- return $_;
- }
-
-This works with leading special strings, dynamically determined:
-
- $remember_the_main = fix<<' MAIN_INTERPRETER_LOOP';
- @@@ int
- @@@ runops() {
- @@@ SAVEI32(runlevel);
- @@@ runlevel++;
- @@@ while ( op = (*op->op_ppaddr)() );
- @@@ TAINT_NOT;
- @@@ return 0;
- @@@ }
- MAIN_INTERPRETER_LOOP
-
-Or with a fixed amount of leading whitespace, with remaining
-indentation correctly preserved:
-
- $poem = fix<<EVER_ON_AND_ON;
- Now far ahead the Road has gone,
- And I must follow, if I can,
- Pursuing it with eager feet,
- Until it joins some larger way
- Where many paths and errands meet.
- And whither then? I cannot say.
- --Bilbo in /usr/src/perl/pp_ctl.c
- EVER_ON_AND_ON
-
-=head1 Data: Arrays
-
-=head2 What is the difference between a list and an array?
-
-(contributed by brian d foy)
-
-A list is a fixed collection of scalars. An array is a variable that
-holds a variable collection of scalars. An array can supply its collection
-for list operations, so list operations also work on arrays:
-
- # slices
- ( 'dog', 'cat', 'bird' )[2,3];
- @animals[2,3];
-
- # iteration
- foreach ( qw( dog cat bird ) ) { ... }
- foreach ( @animals ) { ... }
-
- my @three = grep { length == 3 } qw( dog cat bird );
- my @three = grep { length == 3 } @animals;
-
- # supply an argument list
- wash_animals( qw( dog cat bird ) );
- wash_animals( @animals );
-
-Array operations, which change the scalars, rearranges them, or adds
-or subtracts some scalars, only work on arrays. These can't work on a
-list, which is fixed. Array operations include C<shift>, C<unshift>,
-C<push>, C<pop>, and C<splice>.
-
-An array can also change its length:
-
- $#animals = 1; # truncate to two elements
- $#animals = 10000; # pre-extend to 10,001 elements
-
-You can change an array element, but you can't change a list element:
-
- $animals[0] = 'Rottweiler';
- qw( dog cat bird )[0] = 'Rottweiler'; # syntax error!
-
- foreach ( @animals ) {
- s/^d/fr/; # works fine
- }
-
- foreach ( qw( dog cat bird ) ) {
- s/^d/fr/; # Error! Modification of read only value!
- }
-
-However, if the list element is itself a variable, it appears that you
-can change a list element. However, the list element is the variable, not
-the data. You're not changing the list element, but something the list
-element refers to. The list element itself doesn't change: it's still
-the same variable.
-
-You also have to be careful about context. You can assign an array to
-a scalar to get the number of elements in the array. This only works
-for arrays, though:
-
- my $count = @animals; # only works with arrays
-
-If you try to do the same thing with what you think is a list, you
-get a quite different result. Although it looks like you have a list
-on the righthand side, Perl actually sees a bunch of scalars separated
-by a comma:
-
- my $scalar = ( 'dog', 'cat', 'bird' ); # $scalar gets bird
-
-Since you're assigning to a scalar, the righthand side is in scalar
-context. The comma operator (yes, it's an operator!) in scalar
-context evaluates its lefthand side, throws away the result, and
-evaluates it's righthand side and returns the result. In effect,
-that list-lookalike assigns to C<$scalar> it's rightmost value. Many
-people mess this up because they choose a list-lookalike whose
-last element is also the count they expect:
-
- my $scalar = ( 1, 2, 3 ); # $scalar gets 3, accidentally
-
-=head2 What is the difference between $array[1] and @array[1]?
-
-(contributed by brian d foy)
-
-The difference is the sigil, that special character in front of the
-array name. The C<$> sigil means "exactly one item", while the C<@>
-sigil means "zero or more items". The C<$> gets you a single scalar,
-while the C<@> gets you a list.
-
-The confusion arises because people incorrectly assume that the sigil
-denotes the variable type.
-
-The C<$array[1]> is a single-element access to the array. It's going
-to return the item in index 1 (or undef if there is no item there).
-If you intend to get exactly one element from the array, this is the
-form you should use.
-
-The C<@array[1]> is an array slice, although it has only one index.
-You can pull out multiple elements simultaneously by specifying
-additional indices as a list, like C<@array[1,4,3,0]>.
-
-Using a slice on the lefthand side of the assignment supplies list
-context to the righthand side. This can lead to unexpected results.
-For instance, if you want to read a single line from a filehandle,
-assigning to a scalar value is fine:
-
- $array[1] = <STDIN>;
-
-However, in list context, the line input operator returns all of the
-lines as a list. The first line goes into C<@array[1]> and the rest
-of the lines mysteriously disappear:
-
- @array[1] = <STDIN>; # most likely not what you want
-
-Either the C<use warnings> pragma or the B<-w> flag will warn you when
-you use an array slice with a single index.
-
-=head2 How can I remove duplicate elements from a list or array?
-
-(contributed by brian d foy)
-
-Use a hash. When you think the words "unique" or "duplicated", think
-"hash keys".
-
-If you don't care about the order of the elements, you could just
-create the hash then extract the keys. It's not important how you
-create that hash: just that you use C<keys> to get the unique
-elements.
-
- my %hash = map { $_, 1 } @array;
- # or a hash slice: @hash{ @array } = ();
- # or a foreach: $hash{$_} = 1 foreach ( @array );
-
- my @unique = keys %hash;
-
-If you want to use a module, try the C<uniq> function from
-C<List::MoreUtils>. In list context it returns the unique elements,
-preserving their order in the list. In scalar context, it returns the
-number of unique elements.
-
- use List::MoreUtils qw(uniq);
-
- my @unique = uniq( 1, 2, 3, 4, 4, 5, 6, 5, 7 ); # 1,2,3,4,5,6,7
- my $unique = uniq( 1, 2, 3, 4, 4, 5, 6, 5, 7 ); # 7
-
-You can also go through each element and skip the ones you've seen
-before. Use a hash to keep track. The first time the loop sees an
-element, that element has no key in C<%Seen>. The C<next> statement
-creates the key and immediately uses its value, which is C<undef>, so
-the loop continues to the C<push> and increments the value for that
-key. The next time the loop sees that same element, its key exists in
-the hash I<and> the value for that key is true (since it's not 0 or
-C<undef>), so the next skips that iteration and the loop goes to the
-next element.
-
- my @unique = ();
- my %seen = ();
-
- foreach my $elem ( @array )
- {
- next if $seen{ $elem }++;
- push @unique, $elem;
- }
-
-You can write this more briefly using a grep, which does the
-same thing.
-
- my %seen = ();
- my @unique = grep { ! $seen{ $_ }++ } @array;
-
-=head2 How can I tell whether a certain element is contained in a list or array?
-
-(portions of this answer contributed by Anno Siegel and brian d foy)
-
-Hearing the word "in" is an I<in>dication that you probably should have
-used a hash, not a list or array, to store your data. Hashes are
-designed to answer this question quickly and efficiently. Arrays aren't.
-
-That being said, there are several ways to approach this. In Perl 5.10
-and later, you can use the smart match operator to check that an item is
-contained in an array or a hash:
-
- use 5.010;
-
- if( $item ~~ @array )
- {
- say "The array contains $item"
- }
-
- if( $item ~~ %hash )
- {
- say "The hash contains $item"
- }
-
-With earlier versions of Perl, you have to do a bit more work. If you
-are going to make this query many times over arbitrary string values,
-the fastest way is probably to invert the original array and maintain a
-hash whose keys are the first array's values:
-
- @blues = qw/azure cerulean teal turquoise lapis-lazuli/;
- %is_blue = ();
- for (@blues) { $is_blue{$_} = 1 }
-
-Now you can check whether C<$is_blue{$some_color}>. It might have
-been a good idea to keep the blues all in a hash in the first place.
-
-If the values are all small integers, you could use a simple indexed
-array. This kind of an array will take up less space:
-
- @primes = (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31);
- @is_tiny_prime = ();
- for (@primes) { $is_tiny_prime[$_] = 1 }
- # or simply @istiny_prime[@primes] = (1) x @primes;
-
-Now you check whether $is_tiny_prime[$some_number].
-
-If the values in question are integers instead of strings, you can save
-quite a lot of space by using bit strings instead:
-
- @articles = ( 1..10, 150..2000, 2017 );
- undef $read;
- for (@articles) { vec($read,$_,1) = 1 }
-
-Now check whether C<vec($read,$n,1)> is true for some C<$n>.
-
-These methods guarantee fast individual tests but require a re-organization
-of the original list or array. They only pay off if you have to test
-multiple values against the same array.
-
-If you are testing only once, the standard module C<List::Util> exports
-the function C<first> for this purpose. It works by stopping once it
-finds the element. It's written in C for speed, and its Perl equivalent
-looks like this subroutine:
-
- sub first (&@) {
- my $code = shift;
- foreach (@_) {
- return $_ if &{$code}();
- }
- undef;
- }
-
-If speed is of little concern, the common idiom uses grep in scalar context
-(which returns the number of items that passed its condition) to traverse the
-entire list. This does have the benefit of telling you how many matches it
-found, though.
-
- my $is_there = grep $_ eq $whatever, @array;
-
-If you want to actually extract the matching elements, simply use grep in
-list context.
-
- my @matches = grep $_ eq $whatever, @array;
-
-=head2 How do I compute the difference of two arrays? How do I compute the intersection of two arrays?
-
-Use a hash. Here's code to do both and more. It assumes that each
-element is unique in a given array:
-
- @union = @intersection = @difference = ();
- %count = ();
- foreach $element (@array1, @array2) { $count{$element}++ }
- foreach $element (keys %count) {
- push @union, $element;
- push @{ $count{$element} > 1 ? \@intersection : \@difference }, $element;
- }
-
-Note that this is the I<symmetric difference>, that is, all elements
-in either A or in B but not in both. Think of it as an xor operation.
-
-=head2 How do I test whether two arrays or hashes are equal?
-
-With Perl 5.10 and later, the smart match operator can give you the answer
-with the least amount of work:
-
- use 5.010;
-
- if( @array1 ~~ @array2 )
- {
- say "The arrays are the same";
- }
-
- if( %hash1 ~~ %hash2 ) # doesn't check values!
- {
- say "The hash keys are the same";
- }
-
-The following code works for single-level arrays. It uses a
-stringwise comparison, and does not distinguish defined versus
-undefined empty strings. Modify if you have other needs.
-
- $are_equal = compare_arrays(\@frogs, \@toads);
-
- sub compare_arrays {
- my ($first, $second) = @_;
- no warnings; # silence spurious -w undef complaints
- return 0 unless @$first == @$second;
- for (my $i = 0; $i < @$first; $i++) {
- return 0 if $first->[$i] ne $second->[$i];
- }
- return 1;
- }
-
-For multilevel structures, you may wish to use an approach more
-like this one. It uses the CPAN module C<FreezeThaw>:
-
- use FreezeThaw qw(cmpStr);
- @a = @b = ( "this", "that", [ "more", "stuff" ] );
-
- printf "a and b contain %s arrays\n",
- cmpStr(\@a, \@b) == 0
- ? "the same"
- : "different";
-
-This approach also works for comparing hashes. Here we'll demonstrate
-two different answers:
-
- use FreezeThaw qw(cmpStr cmpStrHard);
-
- %a = %b = ( "this" => "that", "extra" => [ "more", "stuff" ] );
- $a{EXTRA} = \%b;
- $b{EXTRA} = \%a;
-
- printf "a and b contain %s hashes\n",
- cmpStr(\%a, \%b) == 0 ? "the same" : "different";
-
- printf "a and b contain %s hashes\n",
- cmpStrHard(\%a, \%b) == 0 ? "the same" : "different";
-
-
-The first reports that both those the hashes contain the same data,
-while the second reports that they do not. Which you prefer is left as
-an exercise to the reader.
-
-=head2 How do I find the first array element for which a condition is true?
-
-To find the first array element which satisfies a condition, you can
-use the C<first()> function in the C<List::Util> module, which comes
-with Perl 5.8. This example finds the first element that contains
-"Perl".
-
- use List::Util qw(first);
-
- my $element = first { /Perl/ } @array;
-
-If you cannot use C<List::Util>, you can make your own loop to do the
-same thing. Once you find the element, you stop the loop with last.
-
- my $found;
- foreach ( @array ) {
- if( /Perl/ ) { $found = $_; last }
- }
-
-If you want the array index, you can iterate through the indices
-and check the array element at each index until you find one
-that satisfies the condition.
-
- my( $found, $index ) = ( undef, -1 );
- for( $i = 0; $i < @array; $i++ ) {
- if( $array[$i] =~ /Perl/ ) {
- $found = $array[$i];
- $index = $i;
- last;
- }
- }
-
-=head2 How do I handle linked lists?
-
-(contributed by brian d foy)
-
-Perl's arrays do not have a fixed size, so you don't need linked lists
-if you just want to add or remove items. You can use array operations
-such as C<push>, C<pop>, C<shift>, C<unshift>, or C<splice> to do
-that.
-
-Sometimes, however, linked lists can be useful in situations where you
-want to "shard" an array so you have have many small arrays instead of
-a single big array. You can keep arrays longer than Perl's largest
-array index, lock smaller arrays separately in threaded programs,
-reallocate less memory, or quickly insert elements in the middle of
-the chain.
-
-Steve Lembark goes through the details in his YAPC::NA 2009 talk "Perly
-Linked Lists" ( http://www.slideshare.net/lembark/perly-linked-lists ),
-although you can just use his C<LinkedList::Single> module.
-
-=head2 How do I handle circular lists?
-X<circular> X<array> X<Tie::Cycle> X<Array::Iterator::Circular>
-X<cycle> X<modulus>
-
-(contributed by brian d foy)
-
-If you want to cycle through an array endlessly, you can increment the
-index modulo the number of elements in the array:
-
- my @array = qw( a b c );
- my $i = 0;
-
- while( 1 ) {
- print $array[ $i++ % @array ], "\n";
- last if $i > 20;
- }
-
-You can also use C<Tie::Cycle> to use a scalar that always has the
-next element of the circular array:
-
- use Tie::Cycle;
-
- tie my $cycle, 'Tie::Cycle', [ qw( FFFFFF 000000 FFFF00 ) ];
-
- print $cycle; # FFFFFF
- print $cycle; # 000000
- print $cycle; # FFFF00
-
-The C<Array::Iterator::Circular> creates an iterator object for
-circular arrays:
-
- use Array::Iterator::Circular;
-
- my $color_iterator = Array::Iterator::Circular->new(
- qw(red green blue orange)
- );
-
- foreach ( 1 .. 20 ) {
- print $color_iterator->next, "\n";
- }
-
-=head2 How do I shuffle an array randomly?
-
-If you either have Perl 5.8.0 or later installed, or if you have
-Scalar-List-Utils 1.03 or later installed, you can say:
-
- use List::Util 'shuffle';
-
- @shuffled = shuffle(@list);
-
-If not, you can use a Fisher-Yates shuffle.
-
- sub fisher_yates_shuffle {
- my $deck = shift; # $deck is a reference to an array
- return unless @$deck; # must not be empty!
-
- my $i = @$deck;
- while (--$i) {
- my $j = int rand ($i+1);
- @$deck[$i,$j] = @$deck[$j,$i];
- }
- }
-
- # shuffle my mpeg collection
- #
- my @mpeg = <audio/*/*.mp3>;
- fisher_yates_shuffle( \@mpeg ); # randomize @mpeg in place
- print @mpeg;
-
-Note that the above implementation shuffles an array in place,
-unlike the C<List::Util::shuffle()> which takes a list and returns
-a new shuffled list.
-
-You've probably seen shuffling algorithms that work using splice,
-randomly picking another element to swap the current element with
-
- srand;
- @new = ();
- @old = 1 .. 10; # just a demo
- while (@old) {
- push(@new, splice(@old, rand @old, 1));
- }
-
-This is bad because splice is already O(N), and since you do it N
-times, you just invented a quadratic algorithm; that is, O(N**2).
-This does not scale, although Perl is so efficient that you probably
-won't notice this until you have rather largish arrays.
-
-=head2 How do I process/modify each element of an array?
-
-Use C<for>/C<foreach>:
-
- for (@lines) {
- s/foo/bar/; # change that word
- tr/XZ/ZX/; # swap those letters
- }
-
-Here's another; let's compute spherical volumes:
-
- for (@volumes = @radii) { # @volumes has changed parts
- $_ **= 3;
- $_ *= (4/3) * 3.14159; # this will be constant folded
- }
-
-which can also be done with C<map()> which is made to transform
-one list into another:
-
- @volumes = map {$_ ** 3 * (4/3) * 3.14159} @radii;
-
-If you want to do the same thing to modify the values of the
-hash, you can use the C<values> function. As of Perl 5.6
-the values are not copied, so if you modify $orbit (in this
-case), you modify the value.
-
- for $orbit ( values %orbits ) {
- ($orbit **= 3) *= (4/3) * 3.14159;
- }
-
-Prior to perl 5.6 C<values> returned copies of the values,
-so older perl code often contains constructions such as
-C<@orbits{keys %orbits}> instead of C<values %orbits> where
-the hash is to be modified.
-
-=head2 How do I select a random element from an array?
-
-Use the C<rand()> function (see L<perlfunc/rand>):
-
- $index = rand @array;
- $element = $array[$index];
-
-Or, simply:
-
- my $element = $array[ rand @array ];
-
-=head2 How do I permute N elements of a list?
-X<List::Permutor> X<permute> X<Algorithm::Loops> X<Knuth>
-X<The Art of Computer Programming> X<Fischer-Krause>
-
-Use the C<List::Permutor> module on CPAN. If the list is actually an
-array, try the C<Algorithm::Permute> module (also on CPAN). It's
-written in XS code and is very efficient:
-
- use Algorithm::Permute;
-
- my @array = 'a'..'d';
- my $p_iterator = Algorithm::Permute->new ( \@array );
-
- while (my @perm = $p_iterator->next) {
- print "next permutation: (@perm)\n";
- }
-
-For even faster execution, you could do:
-
- use Algorithm::Permute;
-
- my @array = 'a'..'d';
-
- Algorithm::Permute::permute {
- print "next permutation: (@array)\n";
- } @array;
-
-Here's a little program that generates all permutations of all the
-words on each line of input. The algorithm embodied in the
-C<permute()> function is discussed in Volume 4 (still unpublished) of
-Knuth's I<The Art of Computer Programming> and will work on any list:
-
- #!/usr/bin/perl -n
- # Fischer-Krause ordered permutation generator
-
- sub permute (&@) {
- my $code = shift;
- my @idx = 0..$#_;
- while ( $code->(@_[@idx]) ) {
- my $p = $#idx;
- --$p while $idx[$p-1] > $idx[$p];
- my $q = $p or return;
- push @idx, reverse splice @idx, $p;
- ++$q while $idx[$p-1] > $idx[$q];
- @idx[$p-1,$q]=@idx[$q,$p-1];
- }
- }
-
- permute { print "@_\n" } split;
-
-The C<Algorithm::Loops> module also provides the C<NextPermute> and
-C<NextPermuteNum> functions which efficiently find all unique permutations
-of an array, even if it contains duplicate values, modifying it in-place:
-if its elements are in reverse-sorted order then the array is reversed,
-making it sorted, and it returns false; otherwise the next
-permutation is returned.
-
-C<NextPermute> uses string order and C<NextPermuteNum> numeric order, so
-you can enumerate all the permutations of C<0..9> like this:
-
- use Algorithm::Loops qw(NextPermuteNum);
-
- my @list= 0..9;
- do { print "@list\n" } while NextPermuteNum @list;
-
-=head2 How do I sort an array by (anything)?
-
-Supply a comparison function to sort() (described in L<perlfunc/sort>):
-
- @list = sort { $a <=> $b } @list;
-
-The default sort function is cmp, string comparison, which would
-sort C<(1, 2, 10)> into C<(1, 10, 2)>. C<< <=> >>, used above, is
-the numerical comparison operator.
-
-If you have a complicated function needed to pull out the part you
-want to sort on, then don't do it inside the sort function. Pull it
-out first, because the sort BLOCK can be called many times for the
-same element. Here's an example of how to pull out the first word
-after the first number on each item, and then sort those words
-case-insensitively.
-
- @idx = ();
- for (@data) {
- ($item) = /\d+\s*(\S+)/;
- push @idx, uc($item);
- }
- @sorted = @data[ sort { $idx[$a] cmp $idx[$b] } 0 .. $#idx ];
-
-which could also be written this way, using a trick
-that's come to be known as the Schwartzian Transform:
-
- @sorted = map { $_->[0] }
- sort { $a->[1] cmp $b->[1] }
- map { [ $_, uc( (/\d+\s*(\S+)/)[0]) ] } @data;
-
-If you need to sort on several fields, the following paradigm is useful.
-
- @sorted = sort {
- field1($a) <=> field1($b) ||
- field2($a) cmp field2($b) ||
- field3($a) cmp field3($b)
- } @data;
-
-This can be conveniently combined with precalculation of keys as given
-above.
-
-See the F<sort> article in the "Far More Than You Ever Wanted
-To Know" collection in http://www.cpan.org/misc/olddoc/FMTEYEWTK.tgz for
-more about this approach.
-
-See also the question later in L<perlfaq4> on sorting hashes.
-
-=head2 How do I manipulate arrays of bits?
-
-Use C<pack()> and C<unpack()>, or else C<vec()> and the bitwise
-operations.
-
-For example, you don't have to store individual bits in an array
-(which would mean that you're wasting a lot of space). To convert an
-array of bits to a string, use C<vec()> to set the right bits. This
-sets C<$vec> to have bit N set only if C<$ints[N]> was set:
-
- @ints = (...); # array of bits, e.g. ( 1, 0, 0, 1, 1, 0 ... )
- $vec = '';
- foreach( 0 .. $#ints ) {
- vec($vec,$_,1) = 1 if $ints[$_];
- }
-
-The string C<$vec> only takes up as many bits as it needs. For
-instance, if you had 16 entries in C<@ints>, C<$vec> only needs two
-bytes to store them (not counting the scalar variable overhead).
-
-Here's how, given a vector in C<$vec>, you can get those bits into
-your C<@ints> array:
-
- sub bitvec_to_list {
- my $vec = shift;
- my @ints;
- # Find null-byte density then select best algorithm
- if ($vec =~ tr/\0// / length $vec > 0.95) {
- use integer;
- my $i;
-
- # This method is faster with mostly null-bytes
- while($vec =~ /[^\0]/g ) {
- $i = -9 + 8 * pos $vec;
- push @ints, $i if vec($vec, ++$i, 1);
- push @ints, $i if vec($vec, ++$i, 1);
- push @ints, $i if vec($vec, ++$i, 1);
- push @ints, $i if vec($vec, ++$i, 1);
- push @ints, $i if vec($vec, ++$i, 1);
- push @ints, $i if vec($vec, ++$i, 1);
- push @ints, $i if vec($vec, ++$i, 1);
- push @ints, $i if vec($vec, ++$i, 1);
- }
- }
- else {
- # This method is a fast general algorithm
- use integer;
- my $bits = unpack "b*", $vec;
- push @ints, 0 if $bits =~ s/^(\d)// && $1;
- push @ints, pos $bits while($bits =~ /1/g);
- }
-
- return \@ints;
- }
-
-This method gets faster the more sparse the bit vector is.
-(Courtesy of Tim Bunce and Winfried Koenig.)
-
-You can make the while loop a lot shorter with this suggestion
-from Benjamin Goldberg:
-
- while($vec =~ /[^\0]+/g ) {
- push @ints, grep vec($vec, $_, 1), $-[0] * 8 .. $+[0] * 8;
- }
-
-Or use the CPAN module C<Bit::Vector>:
-
- $vector = Bit::Vector->new($num_of_bits);
- $vector->Index_List_Store(@ints);
- @ints = $vector->Index_List_Read();
-
-C<Bit::Vector> provides efficient methods for bit vector, sets of
-small integers and "big int" math.
-
-Here's a more extensive illustration using vec():
-
- # vec demo
- $vector = "\xff\x0f\xef\xfe";
- print "Ilya's string \\xff\\x0f\\xef\\xfe represents the number ",
- unpack("N", $vector), "\n";
- $is_set = vec($vector, 23, 1);
- print "Its 23rd bit is ", $is_set ? "set" : "clear", ".\n";
- pvec($vector);
-
- set_vec(1,1,1);
- set_vec(3,1,1);
- set_vec(23,1,1);
-
- set_vec(3,1,3);
- set_vec(3,2,3);
- set_vec(3,4,3);
- set_vec(3,4,7);
- set_vec(3,8,3);
- set_vec(3,8,7);
-
- set_vec(0,32,17);
- set_vec(1,32,17);
-
- sub set_vec {
- my ($offset, $width, $value) = @_;
- my $vector = '';
- vec($vector, $offset, $width) = $value;
- print "offset=$offset width=$width value=$value\n";
- pvec($vector);
- }
-
- sub pvec {
- my $vector = shift;
- my $bits = unpack("b*", $vector);
- my $i = 0;
- my $BASE = 8;
-
- print "vector length in bytes: ", length($vector), "\n";
- @bytes = unpack("A8" x length($vector), $bits);
- print "bits are: @bytes\n\n";
- }
-
-=head2 Why does defined() return true on empty arrays and hashes?
-
-The short story is that you should probably only use defined on scalars or
-functions, not on aggregates (arrays and hashes). See L<perlfunc/defined>
-in the 5.004 release or later of Perl for more detail.
-
-=head1 Data: Hashes (Associative Arrays)
-
-=head2 How do I process an entire hash?
-
-(contributed by brian d foy)
-
-There are a couple of ways that you can process an entire hash. You
-can get a list of keys, then go through each key, or grab a one
-key-value pair at a time.
-
-To go through all of the keys, use the C<keys> function. This extracts
-all of the keys of the hash and gives them back to you as a list. You
-can then get the value through the particular key you're processing:
-
- foreach my $key ( keys %hash ) {
- my $value = $hash{$key}
- ...
- }
-
-Once you have the list of keys, you can process that list before you
-process the hash elements. For instance, you can sort the keys so you
-can process them in lexical order:
-
- foreach my $key ( sort keys %hash ) {
- my $value = $hash{$key}
- ...
- }
-
-Or, you might want to only process some of the items. If you only want
-to deal with the keys that start with C<text:>, you can select just
-those using C<grep>:
-
- foreach my $key ( grep /^text:/, keys %hash ) {
- my $value = $hash{$key}
- ...
- }
-
-If the hash is very large, you might not want to create a long list of
-keys. To save some memory, you can grab one key-value pair at a time using
-C<each()>, which returns a pair you haven't seen yet:
-
- while( my( $key, $value ) = each( %hash ) ) {
- ...
- }
-
-The C<each> operator returns the pairs in apparently random order, so if
-ordering matters to you, you'll have to stick with the C<keys> method.
-
-The C<each()> operator can be a bit tricky though. You can't add or
-delete keys of the hash while you're using it without possibly
-skipping or re-processing some pairs after Perl internally rehashes
-all of the elements. Additionally, a hash has only one iterator, so if
-you use C<keys>, C<values>, or C<each> on the same hash, you can reset
-the iterator and mess up your processing. See the C<each> entry in
-L<perlfunc> for more details.
-
-=head2 How do I merge two hashes?
-X<hash> X<merge> X<slice, hash>
-
-(contributed by brian d foy)
-
-Before you decide to merge two hashes, you have to decide what to do
-if both hashes contain keys that are the same and if you want to leave
-the original hashes as they were.
-
-If you want to preserve the original hashes, copy one hash (C<%hash1>)
-to a new hash (C<%new_hash>), then add the keys from the other hash
-(C<%hash2> to the new hash. Checking that the key already exists in
-C<%new_hash> gives you a chance to decide what to do with the
-duplicates:
-
- my %new_hash = %hash1; # make a copy; leave %hash1 alone
-
- foreach my $key2 ( keys %hash2 )
- {
- if( exists $new_hash{$key2} )
- {
- warn "Key [$key2] is in both hashes!";
- # handle the duplicate (perhaps only warning)
- ...
- next;
- }
- else
- {
- $new_hash{$key2} = $hash2{$key2};
- }
- }
-
-If you don't want to create a new hash, you can still use this looping
-technique; just change the C<%new_hash> to C<%hash1>.
-
- foreach my $key2 ( keys %hash2 )
- {
- if( exists $hash1{$key2} )
- {
- warn "Key [$key2] is in both hashes!";
- # handle the duplicate (perhaps only warning)
- ...
- next;
- }
- else
- {
- $hash1{$key2} = $hash2{$key2};
- }
- }
-
-If you don't care that one hash overwrites keys and values from the other, you
-could just use a hash slice to add one hash to another. In this case, values
-from C<%hash2> replace values from C<%hash1> when they have keys in common:
-
- @hash1{ keys %hash2 } = values %hash2;
-
-=head2 What happens if I add or remove keys from a hash while iterating over it?
-
-(contributed by brian d foy)
-
-The easy answer is "Don't do that!"
-
-If you iterate through the hash with each(), you can delete the key
-most recently returned without worrying about it. If you delete or add
-other keys, the iterator may skip or double up on them since perl
-may rearrange the hash table. See the
-entry for C<each()> in L<perlfunc>.
-
-=head2 How do I look up a hash element by value?
-
-Create a reverse hash:
-
- %by_value = reverse %by_key;
- $key = $by_value{$value};
-
-That's not particularly efficient. It would be more space-efficient
-to use:
-
- while (($key, $value) = each %by_key) {
- $by_value{$value} = $key;
- }
-
-If your hash could have repeated values, the methods above will only find
-one of the associated keys. This may or may not worry you. If it does
-worry you, you can always reverse the hash into a hash of arrays instead:
-
- while (($key, $value) = each %by_key) {
- push @{$key_list_by_value{$value}}, $key;
- }
-
-=head2 How can I know how many entries are in a hash?
-
-(contributed by brian d foy)
-
-This is very similar to "How do I process an entire hash?", also in
-L<perlfaq4>, but a bit simpler in the common cases.
-
-You can use the C<keys()> built-in function in scalar context to find out
-have many entries you have in a hash:
-
- my $key_count = keys %hash; # must be scalar context!
-
-If you want to find out how many entries have a defined value, that's
-a bit different. You have to check each value. A C<grep> is handy:
-
- my $defined_value_count = grep { defined } values %hash;
-
-You can use that same structure to count the entries any way that
-you like. If you want the count of the keys with vowels in them,
-you just test for that instead:
-
- my $vowel_count = grep { /[aeiou]/ } keys %hash;
-
-The C<grep> in scalar context returns the count. If you want the list
-of matching items, just use it in list context instead:
-
- my @defined_values = grep { defined } values %hash;
-
-The C<keys()> function also resets the iterator, which means that you may
-see strange results if you use this between uses of other hash operators
-such as C<each()>.
-
-=head2 How do I sort a hash (optionally by value instead of key)?
-
-(contributed by brian d foy)
-
-To sort a hash, start with the keys. In this example, we give the list of
-keys to the sort function which then compares them ASCIIbetically (which
-might be affected by your locale settings). The output list has the keys
-in ASCIIbetical order. Once we have the keys, we can go through them to
-create a report which lists the keys in ASCIIbetical order.
-
- my @keys = sort { $a cmp $b } keys %hash;
-
- foreach my $key ( @keys )
- {
- printf "%-20s %6d\n", $key, $hash{$key};
- }
-
-We could get more fancy in the C<sort()> block though. Instead of
-comparing the keys, we can compute a value with them and use that
-value as the comparison.
-
-For instance, to make our report order case-insensitive, we use
-the C<\L> sequence in a double-quoted string to make everything
-lowercase. The C<sort()> block then compares the lowercased
-values to determine in which order to put the keys.
-
- my @keys = sort { "\L$a" cmp "\L$b" } keys %hash;
-
-Note: if the computation is expensive or the hash has many elements,
-you may want to look at the Schwartzian Transform to cache the
-computation results.
-
-If we want to sort by the hash value instead, we use the hash key
-to look it up. We still get out a list of keys, but this time they
-are ordered by their value.
-
- my @keys = sort { $hash{$a} <=> $hash{$b} } keys %hash;
-
-From there we can get more complex. If the hash values are the same,
-we can provide a secondary sort on the hash key.
-
- my @keys = sort {
- $hash{$a} <=> $hash{$b}
- or
- "\L$a" cmp "\L$b"
- } keys %hash;
-
-=head2 How can I always keep my hash sorted?
-X<hash tie sort DB_File Tie::IxHash>
-
-You can look into using the C<DB_File> module and C<tie()> using the
-C<$DB_BTREE> hash bindings as documented in L<DB_File/"In Memory
-Databases">. The C<Tie::IxHash> module from CPAN might also be
-instructive. Although this does keep your hash sorted, you might not
-like the slowdown you suffer from the tie interface. Are you sure you
-need to do this? :)
-
-=head2 What's the difference between "delete" and "undef" with hashes?
-
-Hashes contain pairs of scalars: the first is the key, the
-second is the value. The key will be coerced to a string,
-although the value can be any kind of scalar: string,
-number, or reference. If a key C<$key> is present in
-%hash, C<exists($hash{$key})> will return true. The value
-for a given key can be C<undef>, in which case
-C<$hash{$key}> will be C<undef> while C<exists $hash{$key}>
-will return true. This corresponds to (C<$key>, C<undef>)
-being in the hash.
-
-Pictures help... Here's the C<%hash> table:
-
- keys values
- +------+------+
- | a | 3 |
- | x | 7 |
- | d | 0 |
- | e | 2 |
- +------+------+
-
-And these conditions hold
-
- $hash{'a'} is true
- $hash{'d'} is false
- defined $hash{'d'} is true
- defined $hash{'a'} is true
- exists $hash{'a'} is true (Perl 5 only)
- grep ($_ eq 'a', keys %hash) is true
-
-If you now say
-
- undef $hash{'a'}
-
-your table now reads:
-
-
- keys values
- +------+------+
- | a | undef|
- | x | 7 |
- | d | 0 |
- | e | 2 |
- +------+------+
-
-and these conditions now hold; changes in caps:
-
- $hash{'a'} is FALSE
- $hash{'d'} is false
- defined $hash{'d'} is true
- defined $hash{'a'} is FALSE
- exists $hash{'a'} is true (Perl 5 only)
- grep ($_ eq 'a', keys %hash) is true
-
-Notice the last two: you have an undef value, but a defined key!
-
-Now, consider this:
-
- delete $hash{'a'}
-
-your table now reads:
-
- keys values
- +------+------+
- | x | 7 |
- | d | 0 |
- | e | 2 |
- +------+------+
-
-and these conditions now hold; changes in caps:
-
- $hash{'a'} is false
- $hash{'d'} is false
- defined $hash{'d'} is true
- defined $hash{'a'} is false
- exists $hash{'a'} is FALSE (Perl 5 only)
- grep ($_ eq 'a', keys %hash) is FALSE
-
-See, the whole entry is gone!
-
-=head2 Why don't my tied hashes make the defined/exists distinction?
-
-This depends on the tied hash's implementation of EXISTS().
-For example, there isn't the concept of undef with hashes
-that are tied to DBM* files. It also means that exists() and
-defined() do the same thing with a DBM* file, and what they
-end up doing is not what they do with ordinary hashes.
-
-=head2 How do I reset an each() operation part-way through?
-
-(contributed by brian d foy)
-
-You can use the C<keys> or C<values> functions to reset C<each>. To
-simply reset the iterator used by C<each> without doing anything else,
-use one of them in void context:
-
- keys %hash; # resets iterator, nothing else.
- values %hash; # resets iterator, nothing else.
-
-See the documentation for C<each> in L<perlfunc>.
-
-=head2 How can I get the unique keys from two hashes?
-
-First you extract the keys from the hashes into lists, then solve
-the "removing duplicates" problem described above. For example:
-
- %seen = ();
- for $element (keys(%foo), keys(%bar)) {
- $seen{$element}++;
- }
- @uniq = keys %seen;
-
-Or more succinctly:
-
- @uniq = keys %{{%foo,%bar}};
-
-Or if you really want to save space:
-
- %seen = ();
- while (defined ($key = each %foo)) {
- $seen{$key}++;
- }
- while (defined ($key = each %bar)) {
- $seen{$key}++;
- }
- @uniq = keys %seen;
-
-=head2 How can I store a multidimensional array in a DBM file?
-
-Either stringify the structure yourself (no fun), or else
-get the MLDBM (which uses Data::Dumper) module from CPAN and layer
-it on top of either DB_File or GDBM_File. You might also try DBM::Deep, but
-it can be a bit slow.
-
-=head2 How can I make my hash remember the order I put elements into it?
-
-Use the C<Tie::IxHash> from CPAN.
-
- use Tie::IxHash;
-
- tie my %myhash, 'Tie::IxHash';
-
- for (my $i=0; $i<20; $i++) {
- $myhash{$i} = 2*$i;
- }
-
- my @keys = keys %myhash;
- # @keys = (0,1,2,3,...)
-
-=head2 Why does passing a subroutine an undefined element in a hash create it?
-
-(contributed by brian d foy)
-
-Are you using a really old version of Perl?
-
-Normally, accessing a hash key's value for a nonexistent key will
-I<not> create the key.
-
- my %hash = ();
- my $value = $hash{ 'foo' };
- print "This won't print\n" if exists $hash{ 'foo' };
-
-Passing C<$hash{ 'foo' }> to a subroutine used to be a special case, though.
-Since you could assign directly to C<$_[0]>, Perl had to be ready to
-make that assignment so it created the hash key ahead of time:
-
- my_sub( $hash{ 'foo' } );
- print "This will print before 5.004\n" if exists $hash{ 'foo' };
-
- sub my_sub {
- # $_[0] = 'bar'; # create hash key in case you do this
- 1;
- }
-
-Since Perl 5.004, however, this situation is a special case and Perl
-creates the hash key only when you make the assignment:
-
- my_sub( $hash{ 'foo' } );
- print "This will print, even after 5.004\n" if exists $hash{ 'foo' };
-
- sub my_sub {
- $_[0] = 'bar';
- }
-
-However, if you want the old behavior (and think carefully about that
-because it's a weird side effect), you can pass a hash slice instead.
-Perl 5.004 didn't make this a special case:
-
- my_sub( @hash{ qw/foo/ } );
-
-=head2 How can I make the Perl equivalent of a C structure/C++ class/hash or array of hashes or arrays?
-
-Usually a hash ref, perhaps like this:
-
- $record = {
- NAME => "Jason",
- EMPNO => 132,
- TITLE => "deputy peon",
- AGE => 23,
- SALARY => 37_000,
- PALS => [ "Norbert", "Rhys", "Phineas"],
- };
-
-References are documented in L<perlref> and L<perlreftut>.
-Examples of complex data structures are given in L<perldsc> and
-L<perllol>. Examples of structures and object-oriented classes are
-in L<perltoot>.
-
-=head2 How can I use a reference as a hash key?
-
-(contributed by brian d foy and Ben Morrow)
-
-Hash keys are strings, so you can't really use a reference as the key.
-When you try to do that, perl turns the reference into its stringified
-form (for instance, C<HASH(0xDEADBEEF)>). From there you can't get
-back the reference from the stringified form, at least without doing
-some extra work on your own.
-
-Remember that the entry in the hash will still be there even if
-the referenced variable goes out of scope, and that it is entirely
-possible for Perl to subsequently allocate a different variable at
-the same address. This will mean a new variable might accidentally
-be associated with the value for an old.
-
-If you have Perl 5.10 or later, and you just want to store a value
-against the reference for lookup later, you can use the core
-Hash::Util::Fieldhash module. This will also handle renaming the
-keys if you use multiple threads (which causes all variables to be
-reallocated at new addresses, changing their stringification), and
-garbage-collecting the entries when the referenced variable goes out
-of scope.
-
-If you actually need to be able to get a real reference back from
-each hash entry, you can use the Tie::RefHash module, which does the
-required work for you.
-
-=head2 How can I check if a key exists in a multilevel hash?
-
-(contributed by brian d foy)
-
-The trick to this problem is avoiding accidental autovivification. If
-you want to check three keys deep, you might naïvely try this:
-
- my %hash;
- if( exists $hash{key1}{key2}{key3} ) {
- ...;
- }
-
-Even though you started with a completely empty hash, after that call to
-C<exists> you've created the structure you needed to check for C<key3>:
-
- %hash = (
- 'key1' => {
- 'key2' => {}
- }
- );
-
-That's autovivification. You can get around this in a few ways. The
-easiest way is to just turn it off. The lexical C<autovivification>
-pragma is available on CPAN. Now you don't add to the hash:
-
- {
- no autovivification;
- my %hash;
- if( exists $hash{key1}{key2}{key3} ) {
- ...;
- }
- }
-
-The C<Data::Diver> module on CPAN can do it for you too. Its C<Dive>
-subroutine can tell you not only if the keys exist but also get the
-value:
-
- use Data::Diver qw(Dive);
-
- my @exists = Dive( \%hash, qw(key1 key2 key3) );
- if( ! @exists ) {
- ...; # keys do not exist
- }
- elsif( ! defined $exists[0] ) {
- ...; # keys exist but value is undef
- }
-
-You can easily do this yourself too by checking each level of the hash
-before you move onto the next level. This is essentially what
-C<Data::Diver> does for you:
-
- if( check_hash( \%hash, qw(key1 key2 key3) ) ) {
- ...;
- }
-
- sub check_hash {
- my( $hash, @keys ) = @_;
-
- return unless @keys;
-
- foreach my $key ( @keys ) {
- return unless eval { exists $hash->{$key} };
- $hash = $hash->{$key};
- }
-
- return 1;
- }
-
-=head1 Data: Misc
-
-=head2 How do I handle binary data correctly?
-
-Perl is binary-clean, so it can handle binary data just fine.
-On Windows or DOS, however, you have to use C<binmode> for binary
-files to avoid conversions for line endings. In general, you should
-use C<binmode> any time you want to work with binary data.
-
-Also see L<perlfunc/"binmode"> or L<perlopentut>.
-
-If you're concerned about 8-bit textual data then see L<perllocale>.
-If you want to deal with multibyte characters, however, there are
-some gotchas. See the section on Regular Expressions.
-
-=head2 How do I determine whether a scalar is a number/whole/integer/float?
-
-Assuming that you don't care about IEEE notations like "NaN" or
-"Infinity", you probably just want to use a regular expression:
-
- use 5.010;
-
- given( $number ) {
- when( /\D/ )
- { say "\thas nondigits"; continue }
- when( /^\d+\z/ )
- { say "\tis a whole number"; continue }
- when( /^-?\d+\z/ )
- { say "\tis an integer"; continue }
- when( /^[+-]?\d+\z/ )
- { say "\tis a +/- integer"; continue }
- when( /^-?(?:\d+\.?|\.\d)\d*\z/ )
- { say "\tis a real number"; continue }
- when( /^[+-]?(?=\.?\d)\d*\.?\d*(?:e[+-]?\d+)?\z/i)
- { say "\tis a C float" }
- }
-
-There are also some commonly used modules for the task.
-L<Scalar::Util> (distributed with 5.8) provides access to perl's
-internal function C<looks_like_number> for determining whether a
-variable looks like a number. L<Data::Types> exports functions that
-validate data types using both the above and other regular
-expressions. Thirdly, there is C<Regexp::Common> which has regular
-expressions to match various types of numbers. Those three modules are
-available from the CPAN.
-
-If you're on a POSIX system, Perl supports the C<POSIX::strtod>
-function for converting strings to doubles (and also C<POSIX::strtol>
-for longs). Its semantics are somewhat cumbersome, so here's a
-C<getnum> wrapper function for more convenient access. This function
-takes a string and returns the number it found, or C<undef> for input
-that isn't a C float. The C<is_numeric> function is a front end to
-C<getnum> if you just want to say, "Is this a float?"
-
- sub getnum {
- use POSIX qw(strtod);
- my $str = shift;
- $str =~ s/^\s+//;
- $str =~ s/\s+$//;
- $! = 0;
- my($num, $unparsed) = strtod($str);
- if (($str eq '') || ($unparsed != 0) || $!) {
- return undef;
- }
- else {
- return $num;
- }
- }
-
- sub is_numeric { defined getnum($_[0]) }
-
-Or you could check out the L<String::Scanf> module on the CPAN
-instead.
-
-=head2 How do I keep persistent data across program calls?
-
-For some specific applications, you can use one of the DBM modules.
-See L<AnyDBM_File>. More generically, you should consult the C<FreezeThaw>
-or C<Storable> modules from CPAN. Starting from Perl 5.8 C<Storable> is part
-of the standard distribution. Here's one example using C<Storable>'s C<store>
-and C<retrieve> functions:
-
- use Storable;
- store(\%hash, "filename");
-
- # later on...
- $href = retrieve("filename"); # by ref
- %hash = %{ retrieve("filename") }; # direct to hash
-
-=head2 How do I print out or copy a recursive data structure?
-
-The C<Data::Dumper> module on CPAN (or the 5.005 release of Perl) is great
-for printing out data structures. The C<Storable> module on CPAN (or the
-5.8 release of Perl), provides a function called C<dclone> that recursively
-copies its argument.
-
- use Storable qw(dclone);
- $r2 = dclone($r1);
-
-Where C<$r1> can be a reference to any kind of data structure you'd like.
-It will be deeply copied. Because C<dclone> takes and returns references,
-you'd have to add extra punctuation if you had a hash of arrays that
-you wanted to copy.
-
- %newhash = %{ dclone(\%oldhash) };
-
-=head2 How do I define methods for every class/object?
-
-(contributed by Ben Morrow)
-
-You can use the C<UNIVERSAL> class (see L<UNIVERSAL>). However, please
-be very careful to consider the consequences of doing this: adding
-methods to every object is very likely to have unintended
-consequences. If possible, it would be better to have all your object
-inherit from some common base class, or to use an object system like
-Moose that supports roles.
-
-=head2 How do I verify a credit card checksum?
-
-Get the C<Business::CreditCard> module from CPAN.
-
-=head2 How do I pack arrays of doubles or floats for XS code?
-
-The arrays.h/arrays.c code in the C<PGPLOT> module on CPAN does just this.
-If you're doing a lot of float or double processing, consider using
-the C<PDL> module from CPAN instead--it makes number-crunching easy.
-
-See L<http://search.cpan.org/dist/PGPLOT> for the code.
-
-=head1 AUTHOR AND COPYRIGHT
-
-Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
-other authors as noted. All rights reserved.
-
-This documentation is free; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-Irrespective of its distribution, all code examples in this file
-are hereby placed into the public domain. You are permitted and
-encouraged to use this code in your own programs for fun
-or for profit as you see fit. A simple comment in the code giving
-credit would be courteous but is not required.
Deleted: vendor/perl/dist/pod/perlfaq5.pod
===================================================================
--- vendor/perl/dist/pod/perlfaq5.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlfaq5.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1598 +0,0 @@
-=head1 NAME
-
-perlfaq5 - Files and Formats
-
-=head1 DESCRIPTION
-
-This section deals with I/O and the "f" issues: filehandles, flushing,
-formats, and footers.
-
-=head2 How do I flush/unbuffer an output filehandle? Why must I do this?
-X<flush> X<buffer> X<unbuffer> X<autoflush>
-
-(contributed by brian d foy)
-
-You might like to read Mark Jason Dominus's "Suffering From Buffering"
-at http://perl.plover.com/FAQs/Buffering.html .
-
-Perl normally buffers output so it doesn't make a system call for every
-bit of output. By saving up output, it makes fewer expensive system calls.
-For instance, in this little bit of code, you want to print a dot to the
-screen for every line you process to watch the progress of your program.
-Instead of seeing a dot for every line, Perl buffers the output and you
-have a long wait before you see a row of 50 dots all at once:
-
- # long wait, then row of dots all at once
- while( <> ) {
- print ".";
- print "\n" unless ++$count % 50;
-
- #... expensive line processing operations
- }
-
-To get around this, you have to unbuffer the output filehandle, in this
-case, C<STDOUT>. You can set the special variable C<$|> to a true value
-(mnemonic: making your filehandles "piping hot"):
-
- $|++;
-
- # dot shown immediately
- while( <> ) {
- print ".";
- print "\n" unless ++$count % 50;
-
- #... expensive line processing operations
- }
-
-The C<$|> is one of the per-filehandle special variables, so each
-filehandle has its own copy of its value. If you want to merge
-standard output and standard error for instance, you have to unbuffer
-each (although STDERR might be unbuffered by default):
-
- {
- my $previous_default = select(STDOUT); # save previous default
- $|++; # autoflush STDOUT
- select(STDERR);
- $|++; # autoflush STDERR, to be sure
- select($previous_default); # restore previous default
- }
-
- # now should alternate . and +
- while( 1 )
- {
- sleep 1;
- print STDOUT ".";
- print STDERR "+";
- print STDOUT "\n" unless ++$count % 25;
- }
-
-Besides the C<$|> special variable, you can use C<binmode> to give
-your filehandle a C<:unix> layer, which is unbuffered:
-
- binmode( STDOUT, ":unix" );
-
- while( 1 ) {
- sleep 1;
- print ".";
- print "\n" unless ++$count % 50;
- }
-
-For more information on output layers, see the entries for C<binmode>
-and C<open> in L<perlfunc>, and the C<PerlIO> module documentation.
-
-If you are using C<IO::Handle> or one of its subclasses, you can
-call the C<autoflush> method to change the settings of the
-filehandle:
-
- use IO::Handle;
- open my( $io_fh ), ">", "output.txt";
- $io_fh->autoflush(1);
-
-The C<IO::Handle> objects also have a C<flush> method. You can flush
-the buffer any time you want without auto-buffering
-
- $io_fh->flush;
-
-=head2 How do I change, delete, or insert a line in a file, or append to the beginning of a file?
-X<file, editing>
-
-(contributed by brian d foy)
-
-The basic idea of inserting, changing, or deleting a line from a text
-file involves reading and printing the file to the point you want to
-make the change, making the change, then reading and printing the rest
-of the file. Perl doesn't provide random access to lines (especially
-since the record input separator, C<$/>, is mutable), although modules
-such as C<Tie::File> can fake it.
-
-A Perl program to do these tasks takes the basic form of opening a
-file, printing its lines, then closing the file:
-
- open my $in, '<', $file or die "Can't read old file: $!";
- open my $out, '>', "$file.new" or die "Can't write new file: $!";
-
- while( <$in> )
- {
- print $out $_;
- }
-
- close $out;
-
-Within that basic form, add the parts that you need to insert, change,
-or delete lines.
-
-To prepend lines to the beginning, print those lines before you enter
-the loop that prints the existing lines.
-
- open my $in, '<', $file or die "Can't read old file: $!";
- open my $out, '>', "$file.new" or die "Can't write new file: $!";
-
- print $out "# Add this line to the top\n"; # <--- HERE'S THE MAGIC
-
- while( <$in> )
- {
- print $out $_;
- }
-
- close $out;
-
-To change existing lines, insert the code to modify the lines inside
-the C<while> loop. In this case, the code finds all lowercased
-versions of "perl" and uppercases them. The happens for every line, so
-be sure that you're supposed to do that on every line!
-
- open my $in, '<', $file or die "Can't read old file: $!";
- open my $out, '>', "$file.new" or die "Can't write new file: $!";
-
- print $out "# Add this line to the top\n";
-
- while( <$in> )
- {
- s/\b(perl)\b/Perl/g;
- print $out $_;
- }
-
- close $out;
-
-To change only a particular line, the input line number, C<$.>, is
-useful. First read and print the lines up to the one you want to
-change. Next, read the single line you want to change, change it, and
-print it. After that, read the rest of the lines and print those:
-
- while( <$in> ) # print the lines before the change
- {
- print $out $_;
- last if $. == 4; # line number before change
- }
-
- my $line = <$in>;
- $line =~ s/\b(perl)\b/Perl/g;
- print $out $line;
-
- while( <$in> ) # print the rest of the lines
- {
- print $out $_;
- }
-
-To skip lines, use the looping controls. The C<next> in this example
-skips comment lines, and the C<last> stops all processing once it
-encounters either C<__END__> or C<__DATA__>.
-
- while( <$in> )
- {
- next if /^\s+#/; # skip comment lines
- last if /^__(END|DATA)__$/; # stop at end of code marker
- print $out $_;
- }
-
-Do the same sort of thing to delete a particular line by using C<next>
-to skip the lines you don't want to show up in the output. This
-example skips every fifth line:
-
- while( <$in> )
- {
- next unless $. % 5;
- print $out $_;
- }
-
-If, for some odd reason, you really want to see the whole file at once
-rather than processing line-by-line, you can slurp it in (as long as
-you can fit the whole thing in memory!):
-
- open my $in, '<', $file or die "Can't read old file: $!"
- open my $out, '>', "$file.new" or die "Can't write new file: $!";
-
- my @lines = do { local $/; <$in> }; # slurp!
-
- # do your magic here
-
- print $out @lines;
-
-Modules such as C<File::Slurp> and C<Tie::File> can help with that
-too. If you can, however, avoid reading the entire file at once. Perl
-won't give that memory back to the operating system until the process
-finishes.
-
-You can also use Perl one-liners to modify a file in-place. The
-following changes all 'Fred' to 'Barney' in F<inFile.txt>, overwriting
-the file with the new contents. With the C<-p> switch, Perl wraps a
-C<while> loop around the code you specify with C<-e>, and C<-i> turns
-on in-place editing. The current line is in C<$_>. With C<-p>, Perl
-automatically prints the value of C<$_> at the end of the loop. See
-L<perlrun> for more details.
-
- perl -pi -e 's/Fred/Barney/' inFile.txt
-
-To make a backup of C<inFile.txt>, give C<-i> a file extension to add:
-
- perl -pi.bak -e 's/Fred/Barney/' inFile.txt
-
-To change only the fifth line, you can add a test checking C<$.>, the
-input line number, then only perform the operation when the test
-passes:
-
- perl -pi -e 's/Fred/Barney/ if $. == 5' inFile.txt
-
-To add lines before a certain line, you can add a line (or lines!)
-before Perl prints C<$_>:
-
- perl -pi -e 'print "Put before third line\n" if $. == 3' inFile.txt
-
-You can even add a line to the beginning of a file, since the current
-line prints at the end of the loop:
-
- perl -pi -e 'print "Put before first line\n" if $. == 1' inFile.txt
-
-To insert a line after one already in the file, use the C<-n> switch.
-It's just like C<-p> except that it doesn't print C<$_> at the end of
-the loop, so you have to do that yourself. In this case, print C<$_>
-first, then print the line that you want to add.
-
- perl -ni -e 'print; print "Put after fifth line\n" if $. == 5' inFile.txt
-
-To delete lines, only print the ones that you want.
-
- perl -ni -e 'print unless /d/' inFile.txt
-
- ... or ...
-
- perl -pi -e 'next unless /d/' inFile.txt
-
-=head2 How do I count the number of lines in a file?
-X<file, counting lines> X<lines> X<line>
-
-(contributed by brian d foy)
-
-Conceptually, the easiest way to count the lines in a file is to
-simply read them and count them:
-
- my $count = 0;
- while( <$fh> ) { $count++; }
-
-You don't really have to count them yourself, though, since Perl
-already does that with the C<$.> variable, which is the current line
-number from the last filehandle read:
-
- 1 while( <$fh> );
- my $count = $.;
-
-If you want to use C<$.>, you can reduce it to a simple one-liner,
-like one of these:
-
- % perl -lne '} print $.; {' file
-
- % perl -lne 'END { print $. }' file
-
-Those can be rather inefficient though. If they aren't fast enough for
-you, you might just read chunks of data and count the number of
-newlines:
-
- my $lines = 0;
- open my($fh), '<:raw', $filename or die "Can't open $filename: $!";
- while( sysread $fh, $buffer, 4096 ) {
- $lines += ( $buffer =~ tr/\n// );
- }
- close FILE;
-
-However, that doesn't work if the line ending isn't a newline. You
-might change that C<tr///> to a C<s///> so you can count the number of
-times the input record separator, C<$/>, shows up:
-
- my $lines = 0;
- open my($fh), '<:raw', $filename or die "Can't open $filename: $!";
- while( sysread $fh, $buffer, 4096 ) {
- $lines += ( $buffer =~ s|$/||g; );
- }
- close FILE;
-
-If you don't mind shelling out, the C<wc> command is usually the
-fastest, even with the extra interprocess overhead. Ensure that you
-have an untainted filename though:
-
- #!perl -T
-
- $ENV{PATH} = undef;
-
- my $lines;
- if( $filename =~ /^([0-9a-z_.]+)\z/ ) {
- $lines = `/usr/bin/wc -l $1`
- chomp $lines;
- }
-
-=head2 How do I delete the last N lines from a file?
-X<lines> X<file>
-
-(contributed by brian d foy)
-
-The easiest conceptual solution is to count the lines in the
-file then start at the beginning and print the number of lines
-(minus the last N) to a new file.
-
-Most often, the real question is how you can delete the last N lines
-without making more than one pass over the file, or how to do it
-without a lot of copying. The easy concept is the hard reality when
-you might have millions of lines in your file.
-
-One trick is to use C<File::ReadBackwards>, which starts at the end of
-the file. That module provides an object that wraps the real filehandle
-to make it easy for you to move around the file. Once you get to the
-spot you need, you can get the actual filehandle and work with it as
-normal. In this case, you get the file position at the end of the last
-line you want to keep and truncate the file to that point:
-
- use File::ReadBackwards;
-
- my $filename = 'test.txt';
- my $Lines_to_truncate = 2;
-
- my $bw = File::ReadBackwards->new( $filename )
- or die "Could not read backwards in [$filename]: $!";
-
- my $lines_from_end = 0;
- until( $bw->eof or $lines_from_end == $Lines_to_truncate )
- {
- print "Got: ", $bw->readline;
- $lines_from_end++;
- }
-
- truncate( $filename, $bw->tell );
-
-The C<File::ReadBackwards> module also has the advantage of setting
-the input record separator to a regular expression.
-
-You can also use the C<Tie::File> module which lets you access
-the lines through a tied array. You can use normal array operations
-to modify your file, including setting the last index and using
-C<splice>.
-
-=head2 How can I use Perl's C<-i> option from within a program?
-X<-i> X<in-place>
-
-C<-i> sets the value of Perl's C<$^I> variable, which in turn affects
-the behavior of C<< <> >>; see L<perlrun> for more details. By
-modifying the appropriate variables directly, you can get the same
-behavior within a larger program. For example:
-
- # ...
- {
- local($^I, @ARGV) = ('.orig', glob("*.c"));
- while (<>) {
- if ($. == 1) {
- print "This line should appear at the top of each file\n";
- }
- s/\b(p)earl\b/${1}erl/i; # Correct typos, preserving case
- print;
- close ARGV if eof; # Reset $.
- }
- }
- # $^I and @ARGV return to their old values here
-
-This block modifies all the C<.c> files in the current directory,
-leaving a backup of the original data from each file in a new
-C<.c.orig> file.
-
-=head2 How can I copy a file?
-X<copy> X<file, copy> X<File::Copy>
-
-(contributed by brian d foy)
-
-Use the C<File::Copy> module. It comes with Perl and can do a
-true copy across file systems, and it does its magic in
-a portable fashion.
-
- use File::Copy;
-
- copy( $original, $new_copy ) or die "Copy failed: $!";
-
-If you can't use C<File::Copy>, you'll have to do the work yourself:
-open the original file, open the destination file, then print
-to the destination file as you read the original. You also have to
-remember to copy the permissions, owner, and group to the new file.
-
-=head2 How do I make a temporary file name?
-X<file, temporary>
-
-If you don't need to know the name of the file, you can use C<open()>
-with C<undef> in place of the file name. In Perl 5.8 or later, the
-C<open()> function creates an anonymous temporary file:
-
- open my $tmp, '+>', undef or die $!;
-
-Otherwise, you can use the File::Temp module.
-
- use File::Temp qw/ tempfile tempdir /;
-
- my $dir = tempdir( CLEANUP => 1 );
- ($fh, $filename) = tempfile( DIR => $dir );
-
- # or if you don't need to know the filename
-
- my $fh = tempfile( DIR => $dir );
-
-The File::Temp has been a standard module since Perl 5.6.1. If you
-don't have a modern enough Perl installed, use the C<new_tmpfile>
-class method from the IO::File module to get a filehandle opened for
-reading and writing. Use it if you don't need to know the file's name:
-
- use IO::File;
- my $fh = IO::File->new_tmpfile()
- or die "Unable to make new temporary file: $!";
-
-If you're committed to creating a temporary file by hand, use the
-process ID and/or the current time-value. If you need to have many
-temporary files in one process, use a counter:
-
- BEGIN {
- use Fcntl;
- my $temp_dir = -d '/tmp' ? '/tmp' : $ENV{TMPDIR} || $ENV{TEMP};
- my $base_name = sprintf "%s/%d-%d-0000", $temp_dir, $$, time;
-
- sub temp_file {
- my $fh;
- my $count = 0;
- until( defined(fileno($fh)) || $count++ > 100 ) {
- $base_name =~ s/-(\d+)$/"-" . (1 + $1)/e;
- # O_EXCL is required for security reasons.
- sysopen $fh, $base_name, O_WRONLY|O_EXCL|O_CREAT;
- }
-
- if( defined fileno($fh) ) {
- return ($fh, $base_name);
- }
- else {
- return ();
- }
- }
-
- }
-
-=head2 How can I manipulate fixed-record-length files?
-X<fixed-length> X<file, fixed-length records>
-
-The most efficient way is using L<pack()|perlfunc/"pack"> and
-L<unpack()|perlfunc/"unpack">. This is faster than using
-L<substr()|perlfunc/"substr"> when taking many, many strings. It is
-slower for just a few.
-
-Here is a sample chunk of code to break up and put back together again
-some fixed-format input lines, in this case from the output of a normal,
-Berkeley-style ps:
-
- # sample input line:
- # 15158 p5 T 0:00 perl /home/tchrist/scripts/now-what
- my $PS_T = 'A6 A4 A7 A5 A*';
- open my $ps, '-|', 'ps';
- print scalar <$ps>;
- my @fields = qw( pid tt stat time command );
- while (<$ps>) {
- my %process;
- @process{@fields} = unpack($PS_T, $_);
- for my $field ( @fields ) {
- print "$field: <$process{$field}>\n";
- }
- print 'line=', pack($PS_T, @process{@fields} ), "\n";
- }
-
-We've used a hash slice in order to easily handle the fields of each row.
-Storing the keys in an array makes it easy to operate on them as a
-group or loop over them with C<for>. It also avoids polluting the program
-with global variables and using symbolic references.
-
-=head2 How can I make a filehandle local to a subroutine? How do I pass filehandles between subroutines? How do I make an array of filehandles?
-X<filehandle, local> X<filehandle, passing> X<filehandle, reference>
-
-As of perl5.6, open() autovivifies file and directory handles
-as references if you pass it an uninitialized scalar variable.
-You can then pass these references just like any other scalar,
-and use them in the place of named handles.
-
- open my $fh, $file_name;
-
- open local $fh, $file_name;
-
- print $fh "Hello World!\n";
-
- process_file( $fh );
-
-If you like, you can store these filehandles in an array or a hash.
-If you access them directly, they aren't simple scalars and you
-need to give C<print> a little help by placing the filehandle
-reference in braces. Perl can only figure it out on its own when
-the filehandle reference is a simple scalar.
-
- my @fhs = ( $fh1, $fh2, $fh3 );
-
- for( $i = 0; $i <= $#fhs; $i++ ) {
- print {$fhs[$i]} "just another Perl answer, \n";
- }
-
-Before perl5.6, you had to deal with various typeglob idioms
-which you may see in older code.
-
- open FILE, "> $filename";
- process_typeglob( *FILE );
- process_reference( \*FILE );
-
- sub process_typeglob { local *FH = shift; print FH "Typeglob!" }
- sub process_reference { local $fh = shift; print $fh "Reference!" }
-
-If you want to create many anonymous handles, you should
-check out the Symbol or IO::Handle modules.
-
-=head2 How can I use a filehandle indirectly?
-X<filehandle, indirect>
-
-An indirect filehandle is the use of something other than a symbol
-in a place that a filehandle is expected. Here are ways
-to get indirect filehandles:
-
- $fh = SOME_FH; # bareword is strict-subs hostile
- $fh = "SOME_FH"; # strict-refs hostile; same package only
- $fh = *SOME_FH; # typeglob
- $fh = \*SOME_FH; # ref to typeglob (bless-able)
- $fh = *SOME_FH{IO}; # blessed IO::Handle from *SOME_FH typeglob
-
-Or, you can use the C<new> method from one of the IO::* modules to
-create an anonymous filehandle and store that in a scalar variable.
-
- use IO::Handle; # 5.004 or higher
- my $fh = IO::Handle->new();
-
-Then use any of those as you would a normal filehandle. Anywhere that
-Perl is expecting a filehandle, an indirect filehandle may be used
-instead. An indirect filehandle is just a scalar variable that contains
-a filehandle. Functions like C<print>, C<open>, C<seek>, or
-the C<< <FH> >> diamond operator will accept either a named filehandle
-or a scalar variable containing one:
-
- ($ifh, $ofh, $efh) = (*STDIN, *STDOUT, *STDERR);
- print $ofh "Type it: ";
- my $got = <$ifh>
- print $efh "What was that: $got";
-
-If you're passing a filehandle to a function, you can write
-the function in two ways:
-
- sub accept_fh {
- my $fh = shift;
- print $fh "Sending to indirect filehandle\n";
- }
-
-Or it can localize a typeglob and use the filehandle directly:
-
- sub accept_fh {
- local *FH = shift;
- print FH "Sending to localized filehandle\n";
- }
-
-Both styles work with either objects or typeglobs of real filehandles.
-(They might also work with strings under some circumstances, but this
-is risky.)
-
- accept_fh(*STDOUT);
- accept_fh($handle);
-
-In the examples above, we assigned the filehandle to a scalar variable
-before using it. That is because only simple scalar variables, not
-expressions or subscripts of hashes or arrays, can be used with
-built-ins like C<print>, C<printf>, or the diamond operator. Using
-something other than a simple scalar variable as a filehandle is
-illegal and won't even compile:
-
- my @fd = (*STDIN, *STDOUT, *STDERR);
- print $fd[1] "Type it: "; # WRONG
- my $got = <$fd[0]> # WRONG
- print $fd[2] "What was that: $got"; # WRONG
-
-With C<print> and C<printf>, you get around this by using a block and
-an expression where you would place the filehandle:
-
- print { $fd[1] } "funny stuff\n";
- printf { $fd[1] } "Pity the poor %x.\n", 3_735_928_559;
- # Pity the poor deadbeef.
-
-That block is a proper block like any other, so you can put more
-complicated code there. This sends the message out to one of two places:
-
- my $ok = -x "/bin/cat";
- print { $ok ? $fd[1] : $fd[2] } "cat stat $ok\n";
- print { $fd[ 1+ ($ok || 0) ] } "cat stat $ok\n";
-
-This approach of treating C<print> and C<printf> like object methods
-calls doesn't work for the diamond operator. That's because it's a
-real operator, not just a function with a comma-less argument. Assuming
-you've been storing typeglobs in your structure as we did above, you
-can use the built-in function named C<readline> to read a record just
-as C<< <> >> does. Given the initialization shown above for @fd, this
-would work, but only because readline() requires a typeglob. It doesn't
-work with objects or strings, which might be a bug we haven't fixed yet.
-
- $got = readline($fd[0]);
-
-Let it be noted that the flakiness of indirect filehandles is not
-related to whether they're strings, typeglobs, objects, or anything else.
-It's the syntax of the fundamental operators. Playing the object
-game doesn't help you at all here.
-
-=head2 How can I set up a footer format to be used with write()?
-X<footer>
-
-There's no builtin way to do this, but L<perlform> has a couple of
-techniques to make it possible for the intrepid hacker.
-
-=head2 How can I write() into a string?
-X<write, into a string>
-
-(contributed by brian d foy)
-
-If you want to C<write> into a string, you just have to <open> a
-filehandle to a string, which Perl has been able to do since Perl 5.6:
-
- open FH, '>', \my $string;
- write( FH );
-
-Since you want to be a good programmer, you probably want to use a lexical
-filehandle, even though formats are designed to work with bareword filehandles
-since the default format names take the filehandle name. However, you can
-control this with some Perl special per-filehandle variables: C<$^>, which
-names the top-of-page format, and C<$~> which shows the line format. You have
-to change the default filehandle to set these variables:
-
- open my($fh), '>', \my $string;
-
- { # set per-filehandle variables
- my $old_fh = select( $fh );
- $~ = 'ANIMAL';
- $^ = 'ANIMAL_TOP';
- select( $old_fh );
- }
-
- format ANIMAL_TOP =
- ID Type Name
- .
-
- format ANIMAL =
- @## @<<< @<<<<<<<<<<<<<<
- $id, $type, $name
- .
-
-Although write can work with lexical or package variables, whatever variables
-you use have to scope in the format. That most likely means you'll want to
-localize some package variables:
-
- {
- local( $id, $type, $name ) = qw( 12 cat Buster );
- write( $fh );
- }
-
- print $string;
-
-There are also some tricks that you can play with C<formline> and the
-accumulator variable C<$^A>, but you lose a lot of the value of formats
-since C<formline> won't handle paging and so on. You end up reimplementing
-formats when you use them.
-
-=head2 How can I open a filehandle to a string?
-X<string> X<open> X<IO::String> X<filehandle>
-
-(contributed by Peter J. Holzer, hjp-usenet2 at hjp.at)
-
-Since Perl 5.8.0 a file handle referring to a string can be created by
-calling open with a reference to that string instead of the filename.
-This file handle can then be used to read from or write to the string:
-
- open(my $fh, '>', \$string) or die "Could not open string for writing";
- print $fh "foo\n";
- print $fh "bar\n"; # $string now contains "foo\nbar\n"
-
- open(my $fh, '<', \$string) or die "Could not open string for reading";
- my $x = <$fh>; # $x now contains "foo\n"
-
-With older versions of Perl, the C<IO::String> module provides similar
-functionality.
-
-=head2 How can I output my numbers with commas added?
-X<number, commify>
-
-(contributed by brian d foy and Benjamin Goldberg)
-
-You can use L<Number::Format> to separate places in a number.
-It handles locale information for those of you who want to insert
-full stops instead (or anything else that they want to use,
-really).
-
-This subroutine will add commas to your number:
-
- sub commify {
- local $_ = shift;
- 1 while s/^([-+]?\d+)(\d{3})/$1,$2/;
- return $_;
- }
-
-This regex from Benjamin Goldberg will add commas to numbers:
-
- s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g;
-
-It is easier to see with comments:
-
- s/(
- ^[-+]? # beginning of number.
- \d+? # first digits before first comma
- (?= # followed by, (but not included in the match) :
- (?>(?:\d{3})+) # some positive multiple of three digits.
- (?!\d) # an *exact* multiple, not x * 3 + 1 or whatever.
- )
- | # or:
- \G\d{3} # after the last group, get three digits
- (?=\d) # but they have to have more digits after them.
- )/$1,/xg;
-
-=head2 How can I translate tildes (~) in a filename?
-X<tilde> X<tilde expansion>
-
-Use the E<lt>E<gt> (C<glob()>) operator, documented in L<perlfunc>.
-Versions of Perl older than 5.6 require that you have a shell
-installed that groks tildes. Later versions of Perl have this feature
-built in. The C<File::KGlob> module (available from CPAN) gives more
-portable glob functionality.
-
-Within Perl, you may use this directly:
-
- $filename =~ s{
- ^ ~ # find a leading tilde
- ( # save this in $1
- [^/] # a non-slash character
- * # repeated 0 or more times (0 means me)
- )
- }{
- $1
- ? (getpwnam($1))[7]
- : ( $ENV{HOME} || $ENV{LOGDIR} )
- }ex;
-
-=head2 How come when I open a file read-write it wipes it out?
-X<clobber> X<read-write> X<clobbering> X<truncate> X<truncating>
-
-Because you're using something like this, which truncates the file
-I<then> gives you read-write access:
-
- open my $fh, '+>', '/path/name'; # WRONG (almost always)
-
-Whoops. You should instead use this, which will fail if the file
-doesn't exist:
-
- open my $fh, '+<', '/path/name'; # open for update
-
-Using ">" always clobbers or creates. Using "<" never does
-either. The "+" doesn't change this.
-
-Here are examples of many kinds of file opens. Those using C<sysopen>
-all assume that you've pulled in the constants from C<Fcntl>:
-
- use Fcntl;
-
-To open file for reading:
-
- open my $fh, '<', $path or die $!;
- sysopen my $fh, $path, O_RDONLY or die $!;
-
-To open file for writing, create new file if needed or else truncate old file:
-
- open my $fh, '>', $path or die $!;
- sysopen my $fh, $path, O_WRONLY|O_TRUNC|O_CREAT or die $!;
- sysopen my $fh, $path, O_WRONLY|O_TRUNC|O_CREAT, 0666 or die $!;
-
-To open file for writing, create new file, file must not exist:
-
- sysopen my $fh, $path, O_WRONLY|O_EXCL|O_CREAT or die $!;
- sysopen my $fh, $path, O_WRONLY|O_EXCL|O_CREAT, 0666 or die $!;
-
-To open file for appending, create if necessary:
-
- open my $fh, '>>' $path or die $!;
- sysopen my $fh, $path, O_WRONLY|O_APPEND|O_CREAT or die $!;
- sysopen my $fh, $path, O_WRONLY|O_APPEND|O_CREAT, 0666 or die $!;
-
-To open file for appending, file must exist:
-
- sysopen my $fh, $path, O_WRONLY|O_APPEND or die $!;
-
-To open file for update, file must exist:
-
- open my $fh, '+<', $path or die $!;
- sysopen my $fh, $path, O_RDWR or die $!;
-
-To open file for update, create file if necessary:
-
- sysopen my $fh, $path, O_RDWR|O_CREAT or die $!;
- sysopen my $fh, $path, O_RDWR|O_CREAT, 0666 or die $!;
-
-To open file for update, file must not exist:
-
- sysopen my $fh, $path, O_RDWR|O_EXCL|O_CREAT or die $!;
- sysopen my $fh, $path, O_RDWR|O_EXCL|O_CREAT, 0666 or die $!;
-
-To open a file without blocking, creating if necessary:
-
- sysopen my $fh, '/foo/somefile', O_WRONLY|O_NDELAY|O_CREAT
- or die "can't open /foo/somefile: $!":
-
-Be warned that neither creation nor deletion of files is guaranteed to
-be an atomic operation over NFS. That is, two processes might both
-successfully create or unlink the same file! Therefore O_EXCL
-isn't as exclusive as you might wish.
-
-See also L<perlopentut>.
-
-=head2 Why do I sometimes get an "Argument list too long" when I use E<lt>*E<gt>?
-X<argument list too long>
-
-The C<< <> >> operator performs a globbing operation (see above).
-In Perl versions earlier than v5.6.0, the internal glob() operator forks
-csh(1) to do the actual glob expansion, but
-csh can't handle more than 127 items and so gives the error message
-C<Argument list too long>. People who installed tcsh as csh won't
-have this problem, but their users may be surprised by it.
-
-To get around this, either upgrade to Perl v5.6.0 or later, do the glob
-yourself with readdir() and patterns, or use a module like File::KGlob,
-one that doesn't use the shell to do globbing.
-
-=head2 Is there a leak/bug in glob()?
-X<glob>
-
-(contributed by brian d foy)
-
-Starting with Perl 5.6.0, C<glob> is implemented internally rather
-than relying on an external resource. As such, memory issues with
-C<glob> aren't a problem in modern perls.
-
-=head2 How can I open a file with a leading ">" or trailing blanks?
-X<filename, special characters>
-
-(contributed by Brian McCauley)
-
-The special two-argument form of Perl's open() function ignores
-trailing blanks in filenames and infers the mode from certain leading
-characters (or a trailing "|"). In older versions of Perl this was the
-only version of open() and so it is prevalent in old code and books.
-
-Unless you have a particular reason to use the two-argument form you
-should use the three-argument form of open() which does not treat any
-characters in the filename as special.
-
- open my $fh, "<", " file "; # filename is " file "
- open my $fh, ">", ">file"; # filename is ">file"
-
-=head2 How can I reliably rename a file?
-X<rename> X<mv> X<move> X<file, rename>
-
-If your operating system supports a proper mv(1) utility or its
-functional equivalent, this works:
-
- rename($old, $new) or system("mv", $old, $new);
-
-It may be more portable to use the C<File::Copy> module instead.
-You just copy to the new file to the new name (checking return
-values), then delete the old one. This isn't really the same
-semantically as a C<rename()>, which preserves meta-information like
-permissions, timestamps, inode info, etc.
-
-=head2 How can I lock a file?
-X<lock> X<file, lock> X<flock>
-
-Perl's builtin flock() function (see L<perlfunc> for details) will call
-flock(2) if that exists, fcntl(2) if it doesn't (on perl version 5.004 and
-later), and lockf(3) if neither of the two previous system calls exists.
-On some systems, it may even use a different form of native locking.
-Here are some gotchas with Perl's flock():
-
-=over 4
-
-=item 1
-
-Produces a fatal error if none of the three system calls (or their
-close equivalent) exists.
-
-=item 2
-
-lockf(3) does not provide shared locking, and requires that the
-filehandle be open for writing (or appending, or read/writing).
-
-=item 3
-
-Some versions of flock() can't lock files over a network (e.g. on NFS file
-systems), so you'd need to force the use of fcntl(2) when you build Perl.
-But even this is dubious at best. See the flock entry of L<perlfunc>
-and the F<INSTALL> file in the source distribution for information on
-building Perl to do this.
-
-Two potentially non-obvious but traditional flock semantics are that
-it waits indefinitely until the lock is granted, and that its locks are
-I<merely advisory>. Such discretionary locks are more flexible, but
-offer fewer guarantees. This means that files locked with flock() may
-be modified by programs that do not also use flock(). Cars that stop
-for red lights get on well with each other, but not with cars that don't
-stop for red lights. See the perlport manpage, your port's specific
-documentation, or your system-specific local manpages for details. It's
-best to assume traditional behavior if you're writing portable programs.
-(If you're not, you should as always feel perfectly free to write
-for your own system's idiosyncrasies (sometimes called "features").
-Slavish adherence to portability concerns shouldn't get in the way of
-your getting your job done.)
-
-For more information on file locking, see also
-L<perlopentut/"File Locking"> if you have it (new for 5.6).
-
-=back
-
-=head2 Why can't I just open(FH, "E<gt>file.lock")?
-X<lock, lockfile race condition>
-
-A common bit of code B<NOT TO USE> is this:
-
- sleep(3) while -e 'file.lock'; # PLEASE DO NOT USE
- open my $lock, '>', 'file.lock'; # THIS BROKEN CODE
-
-This is a classic race condition: you take two steps to do something
-which must be done in one. That's why computer hardware provides an
-atomic test-and-set instruction. In theory, this "ought" to work:
-
- sysopen my $fh, "file.lock", O_WRONLY|O_EXCL|O_CREAT
- or die "can't open file.lock: $!";
-
-except that lamentably, file creation (and deletion) is not atomic
-over NFS, so this won't work (at least, not every time) over the net.
-Various schemes involving link() have been suggested, but
-these tend to involve busy-wait, which is also less than desirable.
-
-=head2 I still don't get locking. I just want to increment the number in the file. How can I do this?
-X<counter> X<file, counter>
-
-Didn't anyone ever tell you web-page hit counters were useless?
-They don't count number of hits, they're a waste of time, and they serve
-only to stroke the writer's vanity. It's better to pick a random number;
-they're more realistic.
-
-Anyway, this is what you can do if you can't help yourself.
-
- use Fcntl qw(:DEFAULT :flock);
- sysopen my $fh, "numfile", O_RDWR|O_CREAT or die "can't open numfile: $!";
- flock $fh, LOCK_EX or die "can't flock numfile: $!";
- my $num = <$fh> || 0;
- seek $fh, 0, 0 or die "can't rewind numfile: $!";
- truncate $fh, 0 or die "can't truncate numfile: $!";
- (print $fh $num+1, "\n") or die "can't write numfile: $!";
- close $fh or die "can't close numfile: $!";
-
-Here's a much better web-page hit counter:
-
- $hits = int( (time() - 850_000_000) / rand(1_000) );
-
-If the count doesn't impress your friends, then the code might. :-)
-
-=head2 All I want to do is append a small amount of text to the end of a file. Do I still have to use locking?
-X<append> X<file, append>
-
-If you are on a system that correctly implements C<flock> and you use
-the example appending code from "perldoc -f flock" everything will be
-OK even if the OS you are on doesn't implement append mode correctly
-(if such a system exists). So if you are happy to restrict yourself to
-OSs that implement C<flock> (and that's not really much of a
-restriction) then that is what you should do.
-
-If you know you are only going to use a system that does correctly
-implement appending (i.e. not Win32) then you can omit the C<seek>
-from the code in the previous answer.
-
-If you know you are only writing code to run on an OS and filesystem
-that does implement append mode correctly (a local filesystem on a
-modern Unix for example), and you keep the file in block-buffered mode
-and you write less than one buffer-full of output between each manual
-flushing of the buffer then each bufferload is almost guaranteed to be
-written to the end of the file in one chunk without getting
-intermingled with anyone else's output. You can also use the
-C<syswrite> function which is simply a wrapper around your system's
-C<write(2)> system call.
-
-There is still a small theoretical chance that a signal will interrupt
-the system-level C<write()> operation before completion. There is also
-a possibility that some STDIO implementations may call multiple system
-level C<write()>s even if the buffer was empty to start. There may be
-some systems where this probability is reduced to zero, and this is
-not a concern when using C<:perlio> instead of your system's STDIO.
-
-=head2 How do I randomly update a binary file?
-X<file, binary patch>
-
-If you're just trying to patch a binary, in many cases something as
-simple as this works:
-
- perl -i -pe 's{window manager}{window mangler}g' /usr/bin/emacs
-
-However, if you have fixed sized records, then you might do something more
-like this:
-
- $RECSIZE = 220; # size of record, in bytes
- $recno = 37; # which record to update
- open my $fh, '+<', 'somewhere' or die "can't update somewhere: $!";
- seek $fh, $recno * $RECSIZE, 0;
- read $fh, $record, $RECSIZE == $RECSIZE or die "can't read record $recno: $!";
- # munge the record
- seek $fh, -$RECSIZE, 1;
- print $fh $record;
- close $fh;
-
-Locking and error checking are left as an exercise for the reader.
-Don't forget them or you'll be quite sorry.
-
-=head2 How do I get a file's timestamp in perl?
-X<timestamp> X<file, timestamp>
-
-If you want to retrieve the time at which the file was last read,
-written, or had its meta-data (owner, etc) changed, you use the B<-A>,
-B<-M>, or B<-C> file test operations as documented in L<perlfunc>.
-These retrieve the age of the file (measured against the start-time of
-your program) in days as a floating point number. Some platforms may
-not have all of these times. See L<perlport> for details. To retrieve
-the "raw" time in seconds since the epoch, you would call the stat
-function, then use C<localtime()>, C<gmtime()>, or
-C<POSIX::strftime()> to convert this into human-readable form.
-
-Here's an example:
-
- my $write_secs = (stat($file))[9];
- printf "file %s updated at %s\n", $file,
- scalar localtime($write_secs);
-
-If you prefer something more legible, use the File::stat module
-(part of the standard distribution in version 5.004 and later):
-
- # error checking left as an exercise for reader.
- use File::stat;
- use Time::localtime;
- my $date_string = ctime(stat($file)->mtime);
- print "file $file updated at $date_string\n";
-
-The POSIX::strftime() approach has the benefit of being,
-in theory, independent of the current locale. See L<perllocale>
-for details.
-
-=head2 How do I set a file's timestamp in perl?
-X<timestamp> X<file, timestamp>
-
-You use the utime() function documented in L<perlfunc/utime>.
-By way of example, here's a little program that copies the
-read and write times from its first argument to all the rest
-of them.
-
- if (@ARGV < 2) {
- die "usage: cptimes timestamp_file other_files ...\n";
- }
- my $timestamp = shift;
- my($atime, $mtime) = (stat($timestamp))[8,9];
- utime $atime, $mtime, @ARGV;
-
-Error checking is, as usual, left as an exercise for the reader.
-
-The perldoc for utime also has an example that has the same
-effect as touch(1) on files that I<already exist>.
-
-Certain file systems have a limited ability to store the times
-on a file at the expected level of precision. For example, the
-FAT and HPFS filesystem are unable to create dates on files with
-a finer granularity than two seconds. This is a limitation of
-the filesystems, not of utime().
-
-=head2 How do I print to more than one file at once?
-X<print, to multiple files>
-
-To connect one filehandle to several output filehandles,
-you can use the IO::Tee or Tie::FileHandle::Multiplex modules.
-
-If you only have to do this once, you can print individually
-to each filehandle.
-
- for my $fh (FH1, FH2, FH3) { print $fh "whatever\n" }
-
-=head2 How can I read in an entire file all at once?
-X<slurp> X<file, slurping>
-
-The customary Perl approach for processing all the lines in a file is to
-do so one line at a time:
-
- open my $input, '<', $file or die "can't open $file: $!";
- while (<$input>) {
- chomp;
- # do something with $_
- }
- close $input or die "can't close $file: $!";
-
-This is tremendously more efficient than reading the entire file into
-memory as an array of lines and then processing it one element at a time,
-which is often--if not almost always--the wrong approach. Whenever
-you see someone do this:
-
- my @lines = <INPUT>;
-
-You should think long and hard about why you need everything loaded at
-once. It's just not a scalable solution.
-
-If you "mmap" the file with the File::Map module from
-CPAN, you can virtually load the entire file into a
-string without actually storing it in memory:
-
- use File::Map qw(map_file);
-
- map_file my $string, $filename;
-
-Once mapped, you can treat C<$string> as you would any other string.
-Since you don't necessarily have to load the data, mmap-ing can be
-very fast and may not increase your memory footprint.
-
-You might also find it more
-fun to use the standard C<Tie::File> module, or the C<DB_File> module's
-C<$DB_RECNO> bindings, which allow you to tie an array to a file so that
-accessing an element of the array actually accesses the corresponding
-line in the file.
-
-If you want to load the entire file, you can use the C<File::Slurp>
-module to do it in one one simple and efficient step:
-
- use File::Slurp;
-
- my $all_of_it = read_file($filename); # entire file in scalar
- my @all_lines = read_file($filename); # one line per element
-
-Or you can read the entire file contents into a scalar like this:
-
- my $var;
- {
- local $/;
- open my $fh, '<', $file or die "can't open $file: $!";
- $var = <$fh>;
- }
-
-That temporarily undefs your record separator, and will automatically
-close the file at block exit. If the file is already open, just use this:
-
- my $var = do { local $/; <$fh> };
-
-You can also use a localized C<@ARGV> to eliminate the C<open>:
-
- my $var = do { local( @ARGV, $/ ) = $file; <> };
-
-For ordinary files you can also use the C<read> function.
-
- read( $fh, $var, -s $fh );
-
-That third argument tests the byte size of the data on the C<$fh> filehandle
-and reads that many bytes into the buffer C<$var>.
-
-=head2 How can I read in a file by paragraphs?
-X<file, reading by paragraphs>
-
-Use the C<$/> variable (see L<perlvar> for details). You can either
-set it to C<""> to eliminate empty paragraphs (C<"abc\n\n\n\ndef">,
-for instance, gets treated as two paragraphs and not three), or
-C<"\n\n"> to accept empty paragraphs.
-
-Note that a blank line must have no blanks in it. Thus
-S<C<"fred\n \nstuff\n\n">> is one paragraph, but C<"fred\n\nstuff\n\n"> is two.
-
-=head2 How can I read a single character from a file? From the keyboard?
-X<getc> X<file, reading one character at a time>
-
-You can use the builtin C<getc()> function for most filehandles, but
-it won't (easily) work on a terminal device. For STDIN, either use
-the Term::ReadKey module from CPAN or use the sample code in
-L<perlfunc/getc>.
-
-If your system supports the portable operating system programming
-interface (POSIX), you can use the following code, which you'll note
-turns off echo processing as well.
-
- #!/usr/bin/perl -w
- use strict;
- $| = 1;
- for (1..4) {
- print "gimme: ";
- my $got = getone();
- print "--> $got\n";
- }
- exit;
-
- BEGIN {
- use POSIX qw(:termios_h);
-
- my ($term, $oterm, $echo, $noecho, $fd_stdin);
-
- my $fd_stdin = fileno(STDIN);
-
- $term = POSIX::Termios->new();
- $term->getattr($fd_stdin);
- $oterm = $term->getlflag();
-
- $echo = ECHO | ECHOK | ICANON;
- $noecho = $oterm & ~$echo;
-
- sub cbreak {
- $term->setlflag($noecho);
- $term->setcc(VTIME, 1);
- $term->setattr($fd_stdin, TCSANOW);
- }
-
- sub cooked {
- $term->setlflag($oterm);
- $term->setcc(VTIME, 0);
- $term->setattr($fd_stdin, TCSANOW);
- }
-
- sub getone {
- my $key = '';
- cbreak();
- sysread(STDIN, $key, 1);
- cooked();
- return $key;
- }
-
- }
-
- END { cooked() }
-
-The Term::ReadKey module from CPAN may be easier to use. Recent versions
-include also support for non-portable systems as well.
-
- use Term::ReadKey;
- open my $tty, '<', '/dev/tty';
- print "Gimme a char: ";
- ReadMode "raw";
- my $key = ReadKey 0, $tty;
- ReadMode "normal";
- printf "\nYou said %s, char number %03d\n",
- $key, ord $key;
-
-=head2 How can I tell whether there's a character waiting on a filehandle?
-
-The very first thing you should do is look into getting the Term::ReadKey
-extension from CPAN. As we mentioned earlier, it now even has limited
-support for non-portable (read: not open systems, closed, proprietary,
-not POSIX, not Unix, etc.) systems.
-
-You should also check out the Frequently Asked Questions list in
-comp.unix.* for things like this: the answer is essentially the same.
-It's very system-dependent. Here's one solution that works on BSD
-systems:
-
- sub key_ready {
- my($rin, $nfd);
- vec($rin, fileno(STDIN), 1) = 1;
- return $nfd = select($rin,undef,undef,0);
- }
-
-If you want to find out how many characters are waiting, there's
-also the FIONREAD ioctl call to be looked at. The I<h2ph> tool that
-comes with Perl tries to convert C include files to Perl code, which
-can be C<require>d. FIONREAD ends up defined as a function in the
-I<sys/ioctl.ph> file:
-
- require 'sys/ioctl.ph';
-
- $size = pack("L", 0);
- ioctl(FH, FIONREAD(), $size) or die "Couldn't call ioctl: $!\n";
- $size = unpack("L", $size);
-
-If I<h2ph> wasn't installed or doesn't work for you, you can
-I<grep> the include files by hand:
-
- % grep FIONREAD /usr/include/*/*
- /usr/include/asm/ioctls.h:#define FIONREAD 0x541B
-
-Or write a small C program using the editor of champions:
-
- % cat > fionread.c
- #include <sys/ioctl.h>
- main() {
- printf("%#08x\n", FIONREAD);
- }
- ^D
- % cc -o fionread fionread.c
- % ./fionread
- 0x4004667f
-
-And then hard-code it, leaving porting as an exercise to your successor.
-
- $FIONREAD = 0x4004667f; # XXX: opsys dependent
-
- $size = pack("L", 0);
- ioctl(FH, $FIONREAD, $size) or die "Couldn't call ioctl: $!\n";
- $size = unpack("L", $size);
-
-FIONREAD requires a filehandle connected to a stream, meaning that sockets,
-pipes, and tty devices work, but I<not> files.
-
-=head2 How do I do a C<tail -f> in perl?
-X<tail> X<IO::Handle> X<File::Tail> X<clearerr>
-
-First try
-
- seek(GWFILE, 0, 1);
-
-The statement C<seek(GWFILE, 0, 1)> doesn't change the current position,
-but it does clear the end-of-file condition on the handle, so that the
-next C<< <GWFILE> >> makes Perl try again to read something.
-
-If that doesn't work (it relies on features of your stdio implementation),
-then you need something more like this:
-
- for (;;) {
- for ($curpos = tell(GWFILE); <GWFILE>; $curpos = tell(GWFILE)) {
- # search for some stuff and put it into files
- }
- # sleep for a while
- seek(GWFILE, $curpos, 0); # seek to where we had been
- }
-
-If this still doesn't work, look into the C<clearerr> method
-from C<IO::Handle>, which resets the error and end-of-file states
-on the handle.
-
-There's also a C<File::Tail> module from CPAN.
-
-=head2 How do I dup() a filehandle in Perl?
-X<dup>
-
-If you check L<perlfunc/open>, you'll see that several of the ways
-to call open() should do the trick. For example:
-
- open my $log, '>>', '/foo/logfile';
- open STDERR, '>&LOG';
-
-Or even with a literal numeric descriptor:
-
- my $fd = $ENV{MHCONTEXTFD};
- open $mhcontext, "<&=$fd"; # like fdopen(3S)
-
-Note that "<&STDIN" makes a copy, but "<&=STDIN" makes
-an alias. That means if you close an aliased handle, all
-aliases become inaccessible. This is not true with
-a copied one.
-
-Error checking, as always, has been left as an exercise for the reader.
-
-=head2 How do I close a file descriptor by number?
-X<file, closing file descriptors> X<POSIX> X<close>
-
-If, for some reason, you have a file descriptor instead of a
-filehandle (perhaps you used C<POSIX::open>), you can use the
-C<close()> function from the C<POSIX> module:
-
- use POSIX ();
-
- POSIX::close( $fd );
-
-This should rarely be necessary, as the Perl C<close()> function is to be
-used for things that Perl opened itself, even if it was a dup of a
-numeric descriptor as with C<MHCONTEXT> above. But if you really have
-to, you may be able to do this:
-
- require 'sys/syscall.ph';
- my $rc = syscall(&SYS_close, $fd + 0); # must force numeric
- die "can't sysclose $fd: $!" unless $rc == -1;
-
-Or, just use the fdopen(3S) feature of C<open()>:
-
- {
- open my( $fh ), "<&=$fd" or die "Cannot reopen fd=$fd: $!";
- close $fh;
- }
-
-=head2 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work?
-X<filename, DOS issues>
-
-Whoops! You just put a tab and a formfeed into that filename!
-Remember that within double quoted strings ("like\this"), the
-backslash is an escape character. The full list of these is in
-L<perlop/Quote and Quote-like Operators>. Unsurprisingly, you don't
-have a file called "c:(tab)emp(formfeed)oo" or
-"c:(tab)emp(formfeed)oo.exe" on your legacy DOS filesystem.
-
-Either single-quote your strings, or (preferably) use forward slashes.
-Since all DOS and Windows versions since something like MS-DOS 2.0 or so
-have treated C</> and C<\> the same in a path, you might as well use the
-one that doesn't clash with Perl--or the POSIX shell, ANSI C and C++,
-awk, Tcl, Java, or Python, just to mention a few. POSIX paths
-are more portable, too.
-
-=head2 Why doesn't glob("*.*") get all the files?
-X<glob>
-
-Because even on non-Unix ports, Perl's glob function follows standard
-Unix globbing semantics. You'll need C<glob("*")> to get all (non-hidden)
-files. This makes glob() portable even to legacy systems. Your
-port may include proprietary globbing functions as well. Check its
-documentation for details.
-
-=head2 Why does Perl let me delete read-only files? Why does C<-i> clobber protected files? Isn't this a bug in Perl?
-
-This is elaborately and painstakingly described in the
-F<file-dir-perms> article in the "Far More Than You Ever Wanted To
-Know" collection in http://www.cpan.org/misc/olddoc/FMTEYEWTK.tgz .
-
-The executive summary: learn how your filesystem works. The
-permissions on a file say what can happen to the data in that file.
-The permissions on a directory say what can happen to the list of
-files in that directory. If you delete a file, you're removing its
-name from the directory (so the operation depends on the permissions
-of the directory, not of the file). If you try to write to the file,
-the permissions of the file govern whether you're allowed to.
-
-=head2 How do I select a random line from a file?
-X<file, selecting a random line>
-
-Short of loading the file into a database or pre-indexing the lines in
-the file, there are a couple of things that you can do.
-
-Here's a reservoir-sampling algorithm from the Camel Book:
-
- srand;
- rand($.) < 1 && ($line = $_) while <>;
-
-This has a significant advantage in space over reading the whole file
-in. You can find a proof of this method in I<The Art of Computer
-Programming>, Volume 2, Section 3.4.2, by Donald E. Knuth.
-
-You can use the C<File::Random> module which provides a function
-for that algorithm:
-
- use File::Random qw/random_line/;
- my $line = random_line($filename);
-
-Another way is to use the C<Tie::File> module, which treats the entire
-file as an array. Simply access a random array element.
-
-=head2 Why do I get weird spaces when I print an array of lines?
-
-(contributed by brian d foy)
-
-If you are seeing spaces between the elements of your array when
-you print the array, you are probably interpolating the array in
-double quotes:
-
- my @animals = qw(camel llama alpaca vicuna);
- print "animals are: @animals\n";
-
-It's the double quotes, not the C<print>, doing this. Whenever you
-interpolate an array in a double quote context, Perl joins the
-elements with spaces (or whatever is in C<$">, which is a space by
-default):
-
- animals are: camel llama alpaca vicuna
-
-This is different than printing the array without the interpolation:
-
- my @animals = qw(camel llama alpaca vicuna);
- print "animals are: ", @animals, "\n";
-
-Now the output doesn't have the spaces between the elements because
-the elements of C<@animals> simply become part of the list to
-C<print>:
-
- animals are: camelllamaalpacavicuna
-
-You might notice this when each of the elements of C<@array> end with
-a newline. You expect to print one element per line, but notice that
-every line after the first is indented:
-
- this is a line
- this is another line
- this is the third line
-
-That extra space comes from the interpolation of the array. If you
-don't want to put anything between your array elements, don't use the
-array in double quotes. You can send it to print without them:
-
- print @lines;
-
-=head2 How do I traverse a directory tree?
-
-(contributed by brian d foy)
-
-The C<File::Find> module, which comes with Perl, does all of the hard
-work to traverse a directory structure. It comes with Perl. You simply
-call the C<find> subroutine with a callback subroutine and the
-directories you want to traverse:
-
- use File::Find;
-
- find( \&wanted, @directories );
-
- sub wanted {
- # full path in $File::Find::name
- # just filename in $_
- ... do whatever you want to do ...
- }
-
-The C<File::Find::Closures>, which you can download from CPAN, provides
-many ready-to-use subroutines that you can use with C<File::Find>.
-
-The C<File::Finder>, which you can download from CPAN, can help you
-create the callback subroutine using something closer to the syntax of
-the C<find> command-line utility:
-
- use File::Find;
- use File::Finder;
-
- my $deep_dirs = File::Finder->depth->type('d')->ls->exec('rmdir','{}');
-
- find( $deep_dirs->as_options, @places );
-
-The C<File::Find::Rule> module, which you can download from CPAN, has
-a similar interface, but does the traversal for you too:
-
- use File::Find::Rule;
-
- my @files = File::Find::Rule->file()
- ->name( '*.pm' )
- ->in( @INC );
-
-=head2 How do I delete a directory tree?
-
-(contributed by brian d foy)
-
-If you have an empty directory, you can use Perl's built-in C<rmdir>.
-If the directory is not empty (so, no files or subdirectories), you
-either have to empty it yourself (a lot of work) or use a module to
-help you.
-
-The C<File::Path> module, which comes with Perl, has a C<remove_tree>
-which can take care of all of the hard work for you:
-
- use File::Path qw(remove_tree);
-
- remove_tree( @directories );
-
-The C<File::Path> module also has a legacy interface to the older
-C<rmtree> subroutine.
-
-=head2 How do I copy an entire directory?
-
-(contributed by Shlomi Fish)
-
-To do the equivalent of C<cp -R> (i.e. copy an entire directory tree
-recursively) in portable Perl, you'll either need to write something yourself
-or find a good CPAN module such as L<File::Copy::Recursive>.
-
-=head1 AUTHOR AND COPYRIGHT
-
-Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
-other authors as noted. All rights reserved.
-
-This documentation is free; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-Irrespective of its distribution, all code examples here are in the public
-domain. You are permitted and encouraged to use this code and any
-derivatives thereof in your own programs for fun or for profit as you
-see fit. A simple comment in the code giving credit to the FAQ would
-be courteous but is not required.
Deleted: vendor/perl/dist/pod/perlfaq6.pod
===================================================================
--- vendor/perl/dist/pod/perlfaq6.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlfaq6.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1149 +0,0 @@
-=head1 NAME
-
-perlfaq6 - Regular Expressions
-
-=head1 DESCRIPTION
-
-This section is surprisingly small because the rest of the FAQ is
-littered with answers involving regular expressions. For example,
-decoding a URL and checking whether something is a number are handled
-with regular expressions, but those answers are found elsewhere in
-this document (in L<perlfaq9>: "How do I decode or create those %-encodings
-on the web" and L<perlfaq4>: "How do I determine whether a scalar is
-a number/whole/integer/float", to be precise).
-
-=head2 How can I hope to use regular expressions without creating illegible and unmaintainable code?
-X<regex, legibility> X<regexp, legibility>
-X<regular expression, legibility> X</x>
-
-Three techniques can make regular expressions maintainable and
-understandable.
-
-=over 4
-
-=item Comments Outside the Regex
-
-Describe what you're doing and how you're doing it, using normal Perl
-comments.
-
- # turn the line into the first word, a colon, and the
- # number of characters on the rest of the line
- s/^(\w+)(.*)/ lc($1) . ":" . length($2) /meg;
-
-=item Comments Inside the Regex
-
-The C</x> modifier causes whitespace to be ignored in a regex pattern
-(except in a character class and a few other places), and also allows you to
-use normal comments there, too. As you can imagine, whitespace and comments
-help a lot.
-
-C</x> lets you turn this:
-
- s{<(?:[^>'"]*|".*?"|'.*?')+>}{}gs;
-
-into this:
-
- s{ < # opening angle bracket
- (?: # Non-backreffing grouping paren
- [^>'"] * # 0 or more things that are neither > nor ' nor "
- | # or else
- ".*?" # a section between double quotes (stingy match)
- | # or else
- '.*?' # a section between single quotes (stingy match)
- ) + # all occurring one or more times
- > # closing angle bracket
- }{}gsx; # replace with nothing, i.e. delete
-
-It's still not quite so clear as prose, but it is very useful for
-describing the meaning of each part of the pattern.
-
-=item Different Delimiters
-
-While we normally think of patterns as being delimited with C</>
-characters, they can be delimited by almost any character. L<perlre>
-describes this. For example, the C<s///> above uses braces as
-delimiters. Selecting another delimiter can avoid quoting the
-delimiter within the pattern:
-
- s/\/usr\/local/\/usr\/share/g; # bad delimiter choice
- s#/usr/local#/usr/share#g; # better
-
-=back
-
-=head2 I'm having trouble matching over more than one line. What's wrong?
-X<regex, multiline> X<regexp, multiline> X<regular expression, multiline>
-
-Either you don't have more than one line in the string you're looking
-at (probably), or else you aren't using the correct modifier(s) on
-your pattern (possibly).
-
-There are many ways to get multiline data into a string. If you want
-it to happen automatically while reading input, you'll want to set $/
-(probably to '' for paragraphs or C<undef> for the whole file) to
-allow you to read more than one line at a time.
-
-Read L<perlre> to help you decide which of C</s> and C</m> (or both)
-you might want to use: C</s> allows dot to include newline, and C</m>
-allows caret and dollar to match next to a newline, not just at the
-end of the string. You do need to make sure that you've actually
-got a multiline string in there.
-
-For example, this program detects duplicate words, even when they span
-line breaks (but not paragraph ones). For this example, we don't need
-C</s> because we aren't using dot in a regular expression that we want
-to cross line boundaries. Neither do we need C</m> because we aren't
-wanting caret or dollar to match at any point inside the record next
-to newlines. But it's imperative that $/ be set to something other
-than the default, or else we won't actually ever have a multiline
-record read in.
-
- $/ = ''; # read in whole paragraph, not just one line
- while ( <> ) {
- while ( /\b([\w'-]+)(\s+\g1)+\b/gi ) { # word starts alpha
- print "Duplicate $1 at paragraph $.\n";
- }
- }
-
-Here's code that finds sentences that begin with "From " (which would
-be mangled by many mailers):
-
- $/ = ''; # read in whole paragraph, not just one line
- while ( <> ) {
- while ( /^From /gm ) { # /m makes ^ match next to \n
- print "leading from in paragraph $.\n";
- }
- }
-
-Here's code that finds everything between START and END in a paragraph:
-
- undef $/; # read in whole file, not just one line or paragraph
- while ( <> ) {
- while ( /START(.*?)END/sgm ) { # /s makes . cross line boundaries
- print "$1\n";
- }
- }
-
-=head2 How can I pull out lines between two patterns that are themselves on different lines?
-X<..>
-
-You can use Perl's somewhat exotic C<..> operator (documented in
-L<perlop>):
-
- perl -ne 'print if /START/ .. /END/' file1 file2 ...
-
-If you wanted text and not lines, you would use
-
- perl -0777 -ne 'print "$1\n" while /START(.*?)END/gs' file1 file2 ...
-
-But if you want nested occurrences of C<START> through C<END>, you'll
-run up against the problem described in the question in this section
-on matching balanced text.
-
-Here's another example of using C<..>:
-
- while (<>) {
- $in_header = 1 .. /^$/;
- $in_body = /^$/ .. eof;
- # now choose between them
- } continue {
- $. = 0 if eof; # fix $.
- }
-
-=head2 How do I match XML, HTML, or other nasty, ugly things with a regex?
-X<regex, XML> X<regex, HTML> X<XML> X<HTML> X<pain> X<frustration>
-X<sucking out, will to live>
-
-(contributed by brian d foy)
-
-If you just want to get work done, use a module and forget about the
-regular expressions. The C<XML::Parser> and C<HTML::Parser> modules
-are good starts, although each namespace has other parsing modules
-specialized for certain tasks and different ways of doing it. Start at
-CPAN Search ( http://search.cpan.org ) and wonder at all the work people
-have done for you already! :)
-
-The problem with things such as XML is that they have balanced text
-containing multiple levels of balanced text, but sometimes it isn't
-balanced text, as in an empty tag (C<< <br/> >>, for instance). Even then,
-things can occur out-of-order. Just when you think you've got a
-pattern that matches your input, someone throws you a curveball.
-
-If you'd like to do it the hard way, scratching and clawing your way
-toward a right answer but constantly being disappointed, besieged by
-bug reports, and weary from the inordinate amount of time you have to
-spend reinventing a triangular wheel, then there are several things
-you can try before you give up in frustration:
-
-=over 4
-
-=item * Solve the balanced text problem from another question in L<perlfaq6>
-
-=item * Try the recursive regex features in Perl 5.10 and later. See L<perlre>
-
-=item * Try defining a grammar using Perl 5.10's C<(?DEFINE)> feature.
-
-=item * Break the problem down into sub-problems instead of trying to use a single regex
-
-=item * Convince everyone not to use XML or HTML in the first place
-
-=back
-
-Good luck!
-
-=head2 I put a regular expression into $/ but it didn't work. What's wrong?
-X<$/, regexes in> X<$INPUT_RECORD_SEPARATOR, regexes in>
-X<$RS, regexes in>
-
-$/ has to be a string. You can use these examples if you really need to
-do this.
-
-If you have File::Stream, this is easy.
-
- use File::Stream;
-
- my $stream = File::Stream->new(
- $filehandle,
- separator => qr/\s*,\s*/,
- );
-
- print "$_\n" while <$stream>;
-
-If you don't have File::Stream, you have to do a little more work.
-
-You can use the four-argument form of sysread to continually add to
-a buffer. After you add to the buffer, you check if you have a
-complete line (using your regular expression).
-
- local $_ = "";
- while( sysread FH, $_, 8192, length ) {
- while( s/^((?s).*?)your_pattern// ) {
- my $record = $1;
- # do stuff here.
- }
- }
-
-You can do the same thing with foreach and a match using the
-c flag and the \G anchor, if you do not mind your entire file
-being in memory at the end.
-
- local $_ = "";
- while( sysread FH, $_, 8192, length ) {
- foreach my $record ( m/\G((?s).*?)your_pattern/gc ) {
- # do stuff here.
- }
- substr( $_, 0, pos ) = "" if pos;
- }
-
-
-=head2 How do I substitute case-insensitively on the LHS while preserving case on the RHS?
-X<replace, case preserving> X<substitute, case preserving>
-X<substitution, case preserving> X<s, case preserving>
-
-Here's a lovely Perlish solution by Larry Rosler. It exploits
-properties of bitwise xor on ASCII strings.
-
- $_= "this is a TEsT case";
-
- $old = 'test';
- $new = 'success';
-
- s{(\Q$old\E)}
- { uc $new | (uc $1 ^ $1) .
- (uc(substr $1, -1) ^ substr $1, -1) x
- (length($new) - length $1)
- }egi;
-
- print;
-
-And here it is as a subroutine, modeled after the above:
-
- sub preserve_case($$) {
- my ($old, $new) = @_;
- my $mask = uc $old ^ $old;
-
- uc $new | $mask .
- substr($mask, -1) x (length($new) - length($old))
- }
-
- $string = "this is a TEsT case";
- $string =~ s/(test)/preserve_case($1, "success")/egi;
- print "$string\n";
-
-This prints:
-
- this is a SUcCESS case
-
-As an alternative, to keep the case of the replacement word if it is
-longer than the original, you can use this code, by Jeff Pinyan:
-
- sub preserve_case {
- my ($from, $to) = @_;
- my ($lf, $lt) = map length, @_;
-
- if ($lt < $lf) { $from = substr $from, 0, $lt }
- else { $from .= substr $to, $lf }
-
- return uc $to | ($from ^ uc $from);
- }
-
-This changes the sentence to "this is a SUcCess case."
-
-Just to show that C programmers can write C in any programming language,
-if you prefer a more C-like solution, the following script makes the
-substitution have the same case, letter by letter, as the original.
-(It also happens to run about 240% slower than the Perlish solution runs.)
-If the substitution has more characters than the string being substituted,
-the case of the last character is used for the rest of the substitution.
-
- # Original by Nathan Torkington, massaged by Jeffrey Friedl
- #
- sub preserve_case($$)
- {
- my ($old, $new) = @_;
- my ($state) = 0; # 0 = no change; 1 = lc; 2 = uc
- my ($i, $oldlen, $newlen, $c) = (0, length($old), length($new));
- my ($len) = $oldlen < $newlen ? $oldlen : $newlen;
-
- for ($i = 0; $i < $len; $i++) {
- if ($c = substr($old, $i, 1), $c =~ /[\W\d_]/) {
- $state = 0;
- } elsif (lc $c eq $c) {
- substr($new, $i, 1) = lc(substr($new, $i, 1));
- $state = 1;
- } else {
- substr($new, $i, 1) = uc(substr($new, $i, 1));
- $state = 2;
- }
- }
- # finish up with any remaining new (for when new is longer than old)
- if ($newlen > $oldlen) {
- if ($state == 1) {
- substr($new, $oldlen) = lc(substr($new, $oldlen));
- } elsif ($state == 2) {
- substr($new, $oldlen) = uc(substr($new, $oldlen));
- }
- }
- return $new;
- }
-
-=head2 How can I make C<\w> match national character sets?
-X<\w>
-
-Put C<use locale;> in your script. The \w character class is taken
-from the current locale.
-
-See L<perllocale> for details.
-
-=head2 How can I match a locale-smart version of C</[a-zA-Z]/>?
-X<alpha>
-
-You can use the POSIX character class syntax C</[[:alpha:]]/>
-documented in L<perlre>.
-
-No matter which locale you are in, the alphabetic characters are
-the characters in \w without the digits and the underscore.
-As a regex, that looks like C</[^\W\d_]/>. Its complement,
-the non-alphabetics, is then everything in \W along with
-the digits and the underscore, or C</[\W\d_]/>.
-
-=head2 How can I quote a variable to use in a regex?
-X<regex, escaping> X<regexp, escaping> X<regular expression, escaping>
-
-The Perl parser will expand $variable and @variable references in
-regular expressions unless the delimiter is a single quote. Remember,
-too, that the right-hand side of a C<s///> substitution is considered
-a double-quoted string (see L<perlop> for more details). Remember
-also that any regex special characters will be acted on unless you
-precede the substitution with \Q. Here's an example:
-
- $string = "Placido P. Octopus";
- $regex = "P.";
-
- $string =~ s/$regex/Polyp/;
- # $string is now "Polypacido P. Octopus"
-
-Because C<.> is special in regular expressions, and can match any
-single character, the regex C<P.> here has matched the <Pl> in the
-original string.
-
-To escape the special meaning of C<.>, we use C<\Q>:
-
- $string = "Placido P. Octopus";
- $regex = "P.";
-
- $string =~ s/\Q$regex/Polyp/;
- # $string is now "Placido Polyp Octopus"
-
-The use of C<\Q> causes the <.> in the regex to be treated as a
-regular character, so that C<P.> matches a C<P> followed by a dot.
-
-=head2 What is C</o> really for?
-X</o, regular expressions> X<compile, regular expressions>
-
-(contributed by brian d foy)
-
-The C</o> option for regular expressions (documented in L<perlop> and
-L<perlreref>) tells Perl to compile the regular expression only once.
-This is only useful when the pattern contains a variable. Perls 5.6
-and later handle this automatically if the pattern does not change.
-
-Since the match operator C<m//>, the substitution operator C<s///>,
-and the regular expression quoting operator C<qr//> are double-quotish
-constructs, you can interpolate variables into the pattern. See the
-answer to "How can I quote a variable to use in a regex?" for more
-details.
-
-This example takes a regular expression from the argument list and
-prints the lines of input that match it:
-
- my $pattern = shift @ARGV;
-
- while( <> ) {
- print if m/$pattern/;
- }
-
-Versions of Perl prior to 5.6 would recompile the regular expression
-for each iteration, even if C<$pattern> had not changed. The C</o>
-would prevent this by telling Perl to compile the pattern the first
-time, then reuse that for subsequent iterations:
-
- my $pattern = shift @ARGV;
-
- while( <> ) {
- print if m/$pattern/o; # useful for Perl < 5.6
- }
-
-In versions 5.6 and later, Perl won't recompile the regular expression
-if the variable hasn't changed, so you probably don't need the C</o>
-option. It doesn't hurt, but it doesn't help either. If you want any
-version of Perl to compile the regular expression only once even if
-the variable changes (thus, only using its initial value), you still
-need the C</o>.
-
-You can watch Perl's regular expression engine at work to verify for
-yourself if Perl is recompiling a regular expression. The C<use re
-'debug'> pragma (comes with Perl 5.005 and later) shows the details.
-With Perls before 5.6, you should see C<re> reporting that its
-compiling the regular expression on each iteration. With Perl 5.6 or
-later, you should only see C<re> report that for the first iteration.
-
- use re 'debug';
-
- $regex = 'Perl';
- foreach ( qw(Perl Java Ruby Python) ) {
- print STDERR "-" x 73, "\n";
- print STDERR "Trying $_...\n";
- print STDERR "\t$_ is good!\n" if m/$regex/;
- }
-
-=head2 How do I use a regular expression to strip C-style comments from a file?
-
-While this actually can be done, it's much harder than you'd think.
-For example, this one-liner
-
- perl -0777 -pe 's{/\*.*?\*/}{}gs' foo.c
-
-will work in many but not all cases. You see, it's too simple-minded for
-certain kinds of C programs, in particular, those with what appear to be
-comments in quoted strings. For that, you'd need something like this,
-created by Jeffrey Friedl and later modified by Fred Curtis.
-
- $/ = undef;
- $_ = <>;
- s#/\*[^*]*\*+([^/*][^*]*\*+)*/|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#defined $2 ? $2 : ""#gse;
- print;
-
-This could, of course, be more legibly written with the C</x> modifier, adding
-whitespace and comments. Here it is expanded, courtesy of Fred Curtis.
-
- s{
- /\* ## Start of /* ... */ comment
- [^*]*\*+ ## Non-* followed by 1-or-more *'s
- (
- [^/*][^*]*\*+
- )* ## 0-or-more things which don't start with /
- ## but do end with '*'
- / ## End of /* ... */ comment
-
- | ## OR various things which aren't comments:
-
- (
- " ## Start of " ... " string
- (
- \\. ## Escaped char
- | ## OR
- [^"\\] ## Non "\
- )*
- " ## End of " ... " string
-
- | ## OR
-
- ' ## Start of ' ... ' string
- (
- \\. ## Escaped char
- | ## OR
- [^'\\] ## Non '\
- )*
- ' ## End of ' ... ' string
-
- | ## OR
-
- . ## Anything other char
- [^/"'\\]* ## Chars which doesn't start a comment, string or escape
- )
- }{defined $2 ? $2 : ""}gxse;
-
-A slight modification also removes C++ comments, possibly spanning multiple lines
-using a continuation character:
-
- s#/\*[^*]*\*+([^/*][^*]*\*+)*/|//([^\\]|[^\n][\n]?)*?\n|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#defined $3 ? $3 : ""#gse;
-
-=head2 Can I use Perl regular expressions to match balanced text?
-X<regex, matching balanced test> X<regexp, matching balanced test>
-X<regular expression, matching balanced test> X<possessive> X<PARNO>
-X<Text::Balanced> X<Regexp::Common> X<backtracking> X<recursion>
-
-(contributed by brian d foy)
-
-Your first try should probably be the C<Text::Balanced> module, which
-is in the Perl standard library since Perl 5.8. It has a variety of
-functions to deal with tricky text. The C<Regexp::Common> module can
-also help by providing canned patterns you can use.
-
-As of Perl 5.10, you can match balanced text with regular expressions
-using recursive patterns. Before Perl 5.10, you had to resort to
-various tricks such as using Perl code in C<(??{})> sequences.
-
-Here's an example using a recursive regular expression. The goal is to
-capture all of the text within angle brackets, including the text in
-nested angle brackets. This sample text has two "major" groups: a
-group with one level of nesting and a group with two levels of
-nesting. There are five total groups in angle brackets:
-
- I have some <brackets in <nested brackets> > and
- <another group <nested once <nested twice> > >
- and that's it.
-
-The regular expression to match the balanced text uses two new (to
-Perl 5.10) regular expression features. These are covered in L<perlre>
-and this example is a modified version of one in that documentation.
-
-First, adding the new possessive C<+> to any quantifier finds the
-longest match and does not backtrack. That's important since you want
-to handle any angle brackets through the recursion, not backtracking.
-The group C<< [^<>]++ >> finds one or more non-angle brackets without
-backtracking.
-
-Second, the new C<(?PARNO)> refers to the sub-pattern in the
-particular capture group given by C<PARNO>. In the following regex,
-the first capture group finds (and remembers) the balanced text, and
-you need that same pattern within the first buffer to get past the
-nested text. That's the recursive part. The C<(?1)> uses the pattern
-in the outer capture group as an independent part of the regex.
-
-Putting it all together, you have:
-
- #!/usr/local/bin/perl5.10.0
-
- my $string =<<"HERE";
- I have some <brackets in <nested brackets> > and
- <another group <nested once <nested twice> > >
- and that's it.
- HERE
-
- my @groups = $string =~ m/
- ( # start of capture group 1
- < # match an opening angle bracket
- (?:
- [^<>]++ # one or more non angle brackets, non backtracking
- |
- (?1) # found < or >, so recurse to capture group 1
- )*
- > # match a closing angle bracket
- ) # end of capture group 1
- /xg;
-
- $" = "\n\t";
- print "Found:\n\t at groups\n";
-
-The output shows that Perl found the two major groups:
-
- Found:
- <brackets in <nested brackets> >
- <another group <nested once <nested twice> > >
-
-With a little extra work, you can get the all of the groups in angle
-brackets even if they are in other angle brackets too. Each time you
-get a balanced match, remove its outer delimiter (that's the one you
-just matched so don't match it again) and add it to a queue of strings
-to process. Keep doing that until you get no matches:
-
- #!/usr/local/bin/perl5.10.0
-
- my @queue =<<"HERE";
- I have some <brackets in <nested brackets> > and
- <another group <nested once <nested twice> > >
- and that's it.
- HERE
-
- my $regex = qr/
- ( # start of bracket 1
- < # match an opening angle bracket
- (?:
- [^<>]++ # one or more non angle brackets, non backtracking
- |
- (?1) # recurse to bracket 1
- )*
- > # match a closing angle bracket
- ) # end of bracket 1
- /x;
-
- $" = "\n\t";
-
- while( @queue )
- {
- my $string = shift @queue;
-
- my @groups = $string =~ m/$regex/g;
- print "Found:\n\t at groups\n\n" if @groups;
-
- unshift @queue, map { s/^<//; s/>$//; $_ } @groups;
- }
-
-The output shows all of the groups. The outermost matches show up
-first and the nested matches so up later:
-
- Found:
- <brackets in <nested brackets> >
- <another group <nested once <nested twice> > >
-
- Found:
- <nested brackets>
-
- Found:
- <nested once <nested twice> >
-
- Found:
- <nested twice>
-
-=head2 What does it mean that regexes are greedy? How can I get around it?
-X<greedy> X<greediness>
-
-Most people mean that greedy regexes match as much as they can.
-Technically speaking, it's actually the quantifiers (C<?>, C<*>, C<+>,
-C<{}>) that are greedy rather than the whole pattern; Perl prefers local
-greed and immediate gratification to overall greed. To get non-greedy
-versions of the same quantifiers, use (C<??>, C<*?>, C<+?>, C<{}?>).
-
-An example:
-
- $s1 = $s2 = "I am very very cold";
- $s1 =~ s/ve.*y //; # I am cold
- $s2 =~ s/ve.*?y //; # I am very cold
-
-Notice how the second substitution stopped matching as soon as it
-encountered "y ". The C<*?> quantifier effectively tells the regular
-expression engine to find a match as quickly as possible and pass
-control on to whatever is next in line, as you would if you were
-playing hot potato.
-
-=head2 How do I process each word on each line?
-X<word>
-
-Use the split function:
-
- while (<>) {
- foreach $word ( split ) {
- # do something with $word here
- }
- }
-
-Note that this isn't really a word in the English sense; it's just
-chunks of consecutive non-whitespace characters.
-
-To work with only alphanumeric sequences (including underscores), you
-might consider
-
- while (<>) {
- foreach $word (m/(\w+)/g) {
- # do something with $word here
- }
- }
-
-=head2 How can I print out a word-frequency or line-frequency summary?
-
-To do this, you have to parse out each word in the input stream. We'll
-pretend that by word you mean chunk of alphabetics, hyphens, or
-apostrophes, rather than the non-whitespace chunk idea of a word given
-in the previous question:
-
- while (<>) {
- while ( /(\b[^\W_\d][\w'-]+\b)/g ) { # misses "`sheep'"
- $seen{$1}++;
- }
- }
-
- while ( ($word, $count) = each %seen ) {
- print "$count $word\n";
- }
-
-If you wanted to do the same thing for lines, you wouldn't need a
-regular expression:
-
- while (<>) {
- $seen{$_}++;
- }
-
- while ( ($line, $count) = each %seen ) {
- print "$count $line";
- }
-
-If you want these output in a sorted order, see L<perlfaq4>: "How do I
-sort a hash (optionally by value instead of key)?".
-
-=head2 How can I do approximate matching?
-X<match, approximate> X<matching, approximate>
-
-See the module String::Approx available from CPAN.
-
-=head2 How do I efficiently match many regular expressions at once?
-X<regex, efficiency> X<regexp, efficiency>
-X<regular expression, efficiency>
-
-(contributed by brian d foy)
-
-If you have Perl 5.10 or later, this is almost trivial. You just smart
-match against an array of regular expression objects:
-
- my @patterns = ( qr/Fr.d/, qr/B.rn.y/, qr/W.lm./ );
-
- if( $string ~~ @patterns ) {
- ...
- };
-
-The smart match stops when it finds a match, so it doesn't have to try
-every expression.
-
-Earlier than Perl 5.10, you have a bit of work to do. You want to
-avoid compiling a regular expression every time you want to match it.
-In this example, perl must recompile the regular expression for every
-iteration of the C<foreach> loop since it has no way to know what
-C<$pattern> will be:
-
- my @patterns = qw( foo bar baz );
-
- LINE: while( <DATA> ) {
- foreach $pattern ( @patterns ) {
- if( /\b$pattern\b/i ) {
- print;
- next LINE;
- }
- }
- }
-
-The C<qr//> operator showed up in perl 5.005. It compiles a regular
-expression, but doesn't apply it. When you use the pre-compiled
-version of the regex, perl does less work. In this example, I inserted
-a C<map> to turn each pattern into its pre-compiled form. The rest of
-the script is the same, but faster:
-
- my @patterns = map { qr/\b$_\b/i } qw( foo bar baz );
-
- LINE: while( <> ) {
- foreach $pattern ( @patterns ) {
- if( /$pattern/ )
- {
- print;
- next LINE;
- }
- }
- }
-
-In some cases, you may be able to make several patterns into a single
-regular expression. Beware of situations that require backtracking
-though.
-
- my $regex = join '|', qw( foo bar baz );
-
- LINE: while( <> ) {
- print if /\b(?:$regex)\b/i;
- }
-
-For more details on regular expression efficiency, see I<Mastering
-Regular Expressions> by Jeffrey Friedl. He explains how regular
-expressions engine work and why some patterns are surprisingly
-inefficient. Once you understand how perl applies regular expressions,
-you can tune them for individual situations.
-
-=head2 Why don't word-boundary searches with C<\b> work for me?
-X<\b>
-
-(contributed by brian d foy)
-
-Ensure that you know what \b really does: it's the boundary between a
-word character, \w, and something that isn't a word character. That
-thing that isn't a word character might be \W, but it can also be the
-start or end of the string.
-
-It's not (not!) the boundary between whitespace and non-whitespace,
-and it's not the stuff between words we use to create sentences.
-
-In regex speak, a word boundary (\b) is a "zero width assertion",
-meaning that it doesn't represent a character in the string, but a
-condition at a certain position.
-
-For the regular expression, /\bPerl\b/, there has to be a word
-boundary before the "P" and after the "l". As long as something other
-than a word character precedes the "P" and succeeds the "l", the
-pattern will match. These strings match /\bPerl\b/.
-
- "Perl" # no word char before P or after l
- "Perl " # same as previous (space is not a word char)
- "'Perl'" # the ' char is not a word char
- "Perl's" # no word char before P, non-word char after "l"
-
-These strings do not match /\bPerl\b/.
-
- "Perl_" # _ is a word char!
- "Perler" # no word char before P, but one after l
-
-You don't have to use \b to match words though. You can look for
-non-word characters surrounded by word characters. These strings
-match the pattern /\b'\b/.
-
- "don't" # the ' char is surrounded by "n" and "t"
- "qep'a'" # the ' char is surrounded by "p" and "a"
-
-These strings do not match /\b'\b/.
-
- "foo'" # there is no word char after non-word '
-
-You can also use the complement of \b, \B, to specify that there
-should not be a word boundary.
-
-In the pattern /\Bam\B/, there must be a word character before the "a"
-and after the "m". These patterns match /\Bam\B/:
-
- "llama" # "am" surrounded by word chars
- "Samuel" # same
-
-These strings do not match /\Bam\B/
-
- "Sam" # no word boundary before "a", but one after "m"
- "I am Sam" # "am" surrounded by non-word chars
-
-
-=head2 Why does using $&, $`, or $' slow my program down?
-X<$MATCH> X<$&> X<$POSTMATCH> X<$'> X<$PREMATCH> X<$`>
-
-(contributed by Anno Siegel)
-
-Once Perl sees that you need one of these variables anywhere in the
-program, it provides them on each and every pattern match. That means
-that on every pattern match the entire string will be copied, part of it
-to $`, part to $&, and part to $'. Thus the penalty is most severe with
-long strings and patterns that match often. Avoid $&, $', and $` if you
-can, but if you can't, once you've used them at all, use them at will
-because you've already paid the price. Remember that some algorithms
-really appreciate them. As of the 5.005 release, the $& variable is no
-longer "expensive" the way the other two are.
-
-Since Perl 5.6.1 the special variables @- and @+ can functionally replace
-$`, $& and $'. These arrays contain pointers to the beginning and end
-of each match (see perlvar for the full story), so they give you
-essentially the same information, but without the risk of excessive
-string copying.
-
-Perl 5.10 added three specials, C<${^MATCH}>, C<${^PREMATCH}>, and
-C<${^POSTMATCH}> to do the same job but without the global performance
-penalty. Perl 5.10 only sets these variables if you compile or execute the
-regular expression with the C</p> modifier.
-
-=head2 What good is C<\G> in a regular expression?
-X<\G>
-
-You use the C<\G> anchor to start the next match on the same
-string where the last match left off. The regular
-expression engine cannot skip over any characters to find
-the next match with this anchor, so C<\G> is similar to the
-beginning of string anchor, C<^>. The C<\G> anchor is typically
-used with the C<g> flag. It uses the value of C<pos()>
-as the position to start the next match. As the match
-operator makes successive matches, it updates C<pos()> with the
-position of the next character past the last match (or the
-first character of the next match, depending on how you like
-to look at it). Each string has its own C<pos()> value.
-
-Suppose you want to match all of consecutive pairs of digits
-in a string like "1122a44" and stop matching when you
-encounter non-digits. You want to match C<11> and C<22> but
-the letter <a> shows up between C<22> and C<44> and you want
-to stop at C<a>. Simply matching pairs of digits skips over
-the C<a> and still matches C<44>.
-
- $_ = "1122a44";
- my @pairs = m/(\d\d)/g; # qw( 11 22 44 )
-
-If you use the C<\G> anchor, you force the match after C<22> to
-start with the C<a>. The regular expression cannot match
-there since it does not find a digit, so the next match
-fails and the match operator returns the pairs it already
-found.
-
- $_ = "1122a44";
- my @pairs = m/\G(\d\d)/g; # qw( 11 22 )
-
-You can also use the C<\G> anchor in scalar context. You
-still need the C<g> flag.
-
- $_ = "1122a44";
- while( m/\G(\d\d)/g )
- {
- print "Found $1\n";
- }
-
-After the match fails at the letter C<a>, perl resets C<pos()>
-and the next match on the same string starts at the beginning.
-
- $_ = "1122a44";
- while( m/\G(\d\d)/g )
- {
- print "Found $1\n";
- }
-
- print "Found $1 after while" if m/(\d\d)/g; # finds "11"
-
-You can disable C<pos()> resets on fail with the C<c> flag, documented
-in L<perlop> and L<perlreref>. Subsequent matches start where the last
-successful match ended (the value of C<pos()>) even if a match on the
-same string has failed in the meantime. In this case, the match after
-the C<while()> loop starts at the C<a> (where the last match stopped),
-and since it does not use any anchor it can skip over the C<a> to find
-C<44>.
-
- $_ = "1122a44";
- while( m/\G(\d\d)/gc )
- {
- print "Found $1\n";
- }
-
- print "Found $1 after while" if m/(\d\d)/g; # finds "44"
-
-Typically you use the C<\G> anchor with the C<c> flag
-when you want to try a different match if one fails,
-such as in a tokenizer. Jeffrey Friedl offers this example
-which works in 5.004 or later.
-
- while (<>) {
- chomp;
- PARSER: {
- m/ \G( \d+\b )/gcx && do { print "number: $1\n"; redo; };
- m/ \G( \w+ )/gcx && do { print "word: $1\n"; redo; };
- m/ \G( \s+ )/gcx && do { print "space: $1\n"; redo; };
- m/ \G( [^\w\d]+ )/gcx && do { print "other: $1\n"; redo; };
- }
- }
-
-For each line, the C<PARSER> loop first tries to match a series
-of digits followed by a word boundary. This match has to
-start at the place the last match left off (or the beginning
-of the string on the first match). Since C<m/ \G( \d+\b
-)/gcx> uses the C<c> flag, if the string does not match that
-regular expression, perl does not reset pos() and the next
-match starts at the same position to try a different
-pattern.
-
-=head2 Are Perl regexes DFAs or NFAs? Are they POSIX compliant?
-X<DFA> X<NFA> X<POSIX>
-
-While it's true that Perl's regular expressions resemble the DFAs
-(deterministic finite automata) of the egrep(1) program, they are in
-fact implemented as NFAs (non-deterministic finite automata) to allow
-backtracking and backreferencing. And they aren't POSIX-style either,
-because those guarantee worst-case behavior for all cases. (It seems
-that some people prefer guarantees of consistency, even when what's
-guaranteed is slowness.) See the book "Mastering Regular Expressions"
-(from O'Reilly) by Jeffrey Friedl for all the details you could ever
-hope to know on these matters (a full citation appears in
-L<perlfaq2>).
-
-=head2 What's wrong with using grep in a void context?
-X<grep>
-
-The problem is that grep builds a return list, regardless of the context.
-This means you're making Perl go to the trouble of building a list that
-you then just throw away. If the list is large, you waste both time and space.
-If your intent is to iterate over the list, then use a for loop for this
-purpose.
-
-In perls older than 5.8.1, map suffers from this problem as well.
-But since 5.8.1, this has been fixed, and map is context aware - in void
-context, no lists are constructed.
-
-=head2 How can I match strings with multibyte characters?
-X<regex, and multibyte characters> X<regexp, and multibyte characters>
-X<regular expression, and multibyte characters> X<martian> X<encoding, Martian>
-
-Starting from Perl 5.6 Perl has had some level of multibyte character
-support. Perl 5.8 or later is recommended. Supported multibyte
-character repertoires include Unicode, and legacy encodings
-through the Encode module. See L<perluniintro>, L<perlunicode>,
-and L<Encode>.
-
-If you are stuck with older Perls, you can do Unicode with the
-C<Unicode::String> module, and character conversions using the
-C<Unicode::Map8> and C<Unicode::Map> modules. If you are using
-Japanese encodings, you might try using the jperl 5.005_03.
-
-Finally, the following set of approaches was offered by Jeffrey
-Friedl, whose article in issue #5 of The Perl Journal talks about
-this very matter.
-
-Let's suppose you have some weird Martian encoding where pairs of
-ASCII uppercase letters encode single Martian letters (i.e. the two
-bytes "CV" make a single Martian letter, as do the two bytes "SG",
-"VS", "XX", etc.). Other bytes represent single characters, just like
-ASCII.
-
-So, the string of Martian "I am CVSGXX!" uses 12 bytes to encode the
-nine characters 'I', ' ', 'a', 'm', ' ', 'CV', 'SG', 'XX', '!'.
-
-Now, say you want to search for the single character C</GX/>. Perl
-doesn't know about Martian, so it'll find the two bytes "GX" in the "I
-am CVSGXX!" string, even though that character isn't there: it just
-looks like it is because "SG" is next to "XX", but there's no real
-"GX". This is a big problem.
-
-Here are a few ways, all painful, to deal with it:
-
- # Make sure adjacent "martian" bytes are no longer adjacent.
- $martian =~ s/([A-Z][A-Z])/ $1 /g;
-
- print "found GX!\n" if $martian =~ /GX/;
-
-Or like this:
-
- @chars = $martian =~ m/([A-Z][A-Z]|[^A-Z])/g;
- # above is conceptually similar to: @chars = $text =~ m/(.)/g;
- #
- foreach $char (@chars) {
- print "found GX!\n", last if $char eq 'GX';
- }
-
-Or like this:
-
- while ($martian =~ m/\G([A-Z][A-Z]|.)/gs) { # \G probably unneeded
- print "found GX!\n", last if $1 eq 'GX';
- }
-
-Here's another, slightly less painful, way to do it from Benjamin
-Goldberg, who uses a zero-width negative look-behind assertion.
-
- print "found GX!\n" if $martian =~ m/
- (?<![A-Z])
- (?:[A-Z][A-Z])*?
- GX
- /x;
-
-This succeeds if the "martian" character GX is in the string, and fails
-otherwise. If you don't like using (?<!), a zero-width negative
-look-behind assertion, you can replace (?<![A-Z]) with (?:^|[^A-Z]).
-
-It does have the drawback of putting the wrong thing in $-[0] and $+[0],
-but this usually can be worked around.
-
-=head2 How do I match a regular expression that's in a variable?
-X<regex, in variable> X<eval> X<regex> X<quotemeta> X<\Q, regex>
-X<\E, regex>, X<qr//>
-
-(contributed by brian d foy)
-
-We don't have to hard-code patterns into the match operator (or
-anything else that works with regular expressions). We can put the
-pattern in a variable for later use.
-
-The match operator is a double quote context, so you can interpolate
-your variable just like a double quoted string. In this case, you
-read the regular expression as user input and store it in C<$regex>.
-Once you have the pattern in C<$regex>, you use that variable in the
-match operator.
-
- chomp( my $regex = <STDIN> );
-
- if( $string =~ m/$regex/ ) { ... }
-
-Any regular expression special characters in C<$regex> are still
-special, and the pattern still has to be valid or Perl will complain.
-For instance, in this pattern there is an unpaired parenthesis.
-
- my $regex = "Unmatched ( paren";
-
- "Two parens to bind them all" =~ m/$regex/;
-
-When Perl compiles the regular expression, it treats the parenthesis
-as the start of a memory match. When it doesn't find the closing
-parenthesis, it complains:
-
- Unmatched ( in regex; marked by <-- HERE in m/Unmatched ( <-- HERE paren/ at script line 3.
-
-You can get around this in several ways depending on our situation.
-First, if you don't want any of the characters in the string to be
-special, you can escape them with C<quotemeta> before you use the string.
-
- chomp( my $regex = <STDIN> );
- $regex = quotemeta( $regex );
-
- if( $string =~ m/$regex/ ) { ... }
-
-You can also do this directly in the match operator using the C<\Q>
-and C<\E> sequences. The C<\Q> tells Perl where to start escaping
-special characters, and the C<\E> tells it where to stop (see L<perlop>
-for more details).
-
- chomp( my $regex = <STDIN> );
-
- if( $string =~ m/\Q$regex\E/ ) { ... }
-
-Alternately, you can use C<qr//>, the regular expression quote operator (see
-L<perlop> for more details). It quotes and perhaps compiles the pattern,
-and you can apply regular expression flags to the pattern.
-
- chomp( my $input = <STDIN> );
-
- my $regex = qr/$input/is;
-
- $string =~ m/$regex/ # same as m/$input/is;
-
-You might also want to trap any errors by wrapping an C<eval> block
-around the whole thing.
-
- chomp( my $input = <STDIN> );
-
- eval {
- if( $string =~ m/\Q$input\E/ ) { ... }
- };
- warn $@ if $@;
-
-Or...
-
- my $regex = eval { qr/$input/is };
- if( defined $regex ) {
- $string =~ m/$regex/;
- }
- else {
- warn $@;
- }
-
-=head1 AUTHOR AND COPYRIGHT
-
-Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
-other authors as noted. All rights reserved.
-
-This documentation is free; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-Irrespective of its distribution, all code examples in this file
-are hereby placed into the public domain. You are permitted and
-encouraged to use this code in your own programs for fun
-or for profit as you see fit. A simple comment in the code giving
-credit would be courteous but is not required.
Deleted: vendor/perl/dist/pod/perlfaq7.pod
===================================================================
--- vendor/perl/dist/pod/perlfaq7.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlfaq7.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1070 +0,0 @@
-=head1 NAME
-
-perlfaq7 - General Perl Language Issues
-
-=head1 DESCRIPTION
-
-This section deals with general Perl language issues that don't
-clearly fit into any of the other sections.
-
-=head2 Can I get a BNF/yacc/RE for the Perl language?
-
-There is no BNF, but you can paw your way through the yacc grammar in
-perly.y in the source distribution if you're particularly brave. The
-grammar relies on very smart tokenizing code, so be prepared to
-venture into toke.c as well.
-
-In the words of Chaim Frenkel: "Perl's grammar can not be reduced to BNF.
-The work of parsing perl is distributed between yacc, the lexer, smoke
-and mirrors."
-
-=head2 What are all these $@%&* punctuation signs, and how do I know when to use them?
-
-They are type specifiers, as detailed in L<perldata>:
-
- $ for scalar values (number, string or reference)
- @ for arrays
- % for hashes (associative arrays)
- & for subroutines (aka functions, procedures, methods)
- * for all types of that symbol name. In version 4 you used them like
- pointers, but in modern perls you can just use references.
-
-There are a couple of other symbols that
-you're likely to encounter that aren't
-really type specifiers:
-
- <> are used for inputting a record from a filehandle.
- \ takes a reference to something.
-
-Note that <FILE> is I<neither> the type specifier for files
-nor the name of the handle. It is the C<< <> >> operator applied
-to the handle FILE. It reads one line (well, record--see
-L<perlvar/$E<sol>>) from the handle FILE in scalar context, or I<all> lines
-in list context. When performing open, close, or any other operation
-besides C<< <> >> on files, or even when talking about the handle, do
-I<not> use the brackets. These are correct: C<eof(FH)>, C<seek(FH, 0,
-2)> and "copying from STDIN to FILE".
-
-=head2 Do I always/never have to quote my strings or use semicolons and commas?
-
-Normally, a bareword doesn't need to be quoted, but in most cases
-probably should be (and must be under C<use strict>). But a hash key
-consisting of a simple word and the left-hand
-operand to the C<< => >> operator both
-count as though they were quoted:
-
- This is like this
- ------------ ---------------
- $foo{line} $foo{'line'}
- bar => stuff 'bar' => stuff
-
-The final semicolon in a block is optional, as is the final comma in a
-list. Good style (see L<perlstyle>) says to put them in except for
-one-liners:
-
- if ($whoops) { exit 1 }
- @nums = (1, 2, 3);
-
- if ($whoops) {
- exit 1;
- }
-
- @lines = (
- "There Beren came from mountains cold",
- "And lost he wandered under leaves",
- );
-
-=head2 How do I skip some return values?
-
-One way is to treat the return values as a list and index into it:
-
- $dir = (getpwnam($user))[7];
-
-Another way is to use undef as an element on the left-hand-side:
-
- ($dev, $ino, undef, undef, $uid, $gid) = stat($file);
-
-You can also use a list slice to select only the elements that
-you need:
-
- ($dev, $ino, $uid, $gid) = ( stat($file) )[0,1,4,5];
-
-=head2 How do I temporarily block warnings?
-
-If you are running Perl 5.6.0 or better, the C<use warnings> pragma
-allows fine control of what warning are produced.
-See L<perllexwarn> for more details.
-
- {
- no warnings; # temporarily turn off warnings
- $a = $b + $c; # I know these might be undef
- }
-
-Additionally, you can enable and disable categories of warnings.
-You turn off the categories you want to ignore and you can still
-get other categories of warnings. See L<perllexwarn> for the
-complete details, including the category names and hierarchy.
-
- {
- no warnings 'uninitialized';
- $a = $b + $c;
- }
-
-If you have an older version of Perl, the C<$^W> variable (documented
-in L<perlvar>) controls runtime warnings for a block:
-
- {
- local $^W = 0; # temporarily turn off warnings
- $a = $b + $c; # I know these might be undef
- }
-
-Note that like all the punctuation variables, you cannot currently
-use my() on C<$^W>, only local().
-
-=head2 What's an extension?
-
-An extension is a way of calling compiled C code from Perl. Reading
-L<perlxstut> is a good place to learn more about extensions.
-
-=head2 Why do Perl operators have different precedence than C operators?
-
-Actually, they don't. All C operators that Perl copies have the same
-precedence in Perl as they do in C. The problem is with operators that C
-doesn't have, especially functions that give a list context to everything
-on their right, eg. print, chmod, exec, and so on. Such functions are
-called "list operators" and appear as such in the precedence table in
-L<perlop>.
-
-A common mistake is to write:
-
- unlink $file || die "snafu";
-
-This gets interpreted as:
-
- unlink ($file || die "snafu");
-
-To avoid this problem, either put in extra parentheses or use the
-super low precedence C<or> operator:
-
- (unlink $file) || die "snafu";
- unlink $file or die "snafu";
-
-The "English" operators (C<and>, C<or>, C<xor>, and C<not>)
-deliberately have precedence lower than that of list operators for
-just such situations as the one above.
-
-Another operator with surprising precedence is exponentiation. It
-binds more tightly even than unary minus, making C<-2**2> produce a
-negative not a positive four. It is also right-associating, meaning
-that C<2**3**2> is two raised to the ninth power, not eight squared.
-
-Although it has the same precedence as in C, Perl's C<?:> operator
-produces an lvalue. This assigns $x to either $a or $b, depending
-on the trueness of $maybe:
-
- ($maybe ? $a : $b) = $x;
-
-=head2 How do I declare/create a structure?
-
-In general, you don't "declare" a structure. Just use a (probably
-anonymous) hash reference. See L<perlref> and L<perldsc> for details.
-Here's an example:
-
- $person = {}; # new anonymous hash
- $person->{AGE} = 24; # set field AGE to 24
- $person->{NAME} = "Nat"; # set field NAME to "Nat"
-
-If you're looking for something a bit more rigorous, try L<perltoot>.
-
-=head2 How do I create a module?
-
-(contributed by brian d foy)
-
-L<perlmod>, L<perlmodlib>, L<perlmodstyle> explain modules
-in all the gory details. L<perlnewmod> gives a brief
-overview of the process along with a couple of suggestions
-about style.
-
-If you need to include C code or C library interfaces in
-your module, you'll need h2xs. h2xs will create the module
-distribution structure and the initial interface files
-you'll need. L<perlxs> and L<perlxstut> explain the details.
-
-If you don't need to use C code, other tools such as
-ExtUtils::ModuleMaker and Module::Starter, can help you
-create a skeleton module distribution.
-
-You may also want to see Sam Tregar's "Writing Perl Modules
-for CPAN" ( http://apress.com/book/bookDisplay.html?bID=14 )
-which is the best hands-on guide to creating module
-distributions.
-
-=head2 How do I adopt or take over a module already on CPAN?
-
-(contributed by brian d foy)
-
-The easiest way to take over a module is to have the current
-module maintainer either make you a co-maintainer or transfer
-the module to you.
-
-If you can't reach the author for some reason (e.g. email bounces),
-the PAUSE admins at modules at perl.org can help. The PAUSE admins
-treat each case individually.
-
-=over 4
-
-=item *
-
-Get a login for the Perl Authors Upload Server (PAUSE) if you don't
-already have one: http://pause.perl.org
-
-=item *
-
-Write to modules at perl.org explaining what you did to contact the
-current maintainer. The PAUSE admins will also try to reach the
-maintainer.
-
-=item *
-
-Post a public message in a heavily trafficked site announcing your
-intention to take over the module.
-
-=item *
-
-Wait a bit. The PAUSE admins don't want to act too quickly in case
-the current maintainer is on holiday. If there's no response to
-private communication or the public post, a PAUSE admin can transfer
-it to you.
-
-=back
-
-=head2 How do I create a class?
-X<class, creation> X<package>
-
-(contributed by brian d foy)
-
-In Perl, a class is just a package, and methods are just subroutines.
-Perl doesn't get more formal than that and lets you set up the package
-just the way that you like it (that is, it doesn't set up anything for
-you).
-
-The Perl documentation has several tutorials that cover class
-creation, including L<perlboot> (Barnyard Object Oriented Tutorial),
-L<perltoot> (Tom's Object Oriented Tutorial), L<perlbot> (Bag o'
-Object Tricks), and L<perlobj>.
-
-=head2 How can I tell if a variable is tainted?
-
-You can use the tainted() function of the Scalar::Util module, available
-from CPAN (or included with Perl since release 5.8.0).
-See also L<perlsec/"Laundering and Detecting Tainted Data">.
-
-=head2 What's a closure?
-
-Closures are documented in L<perlref>.
-
-I<Closure> is a computer science term with a precise but
-hard-to-explain meaning. Usually, closures are implemented in Perl as
-anonymous subroutines with lasting references to lexical variables
-outside their own scopes. These lexicals magically refer to the
-variables that were around when the subroutine was defined (deep
-binding).
-
-Closures are most often used in programming languages where you can
-have the return value of a function be itself a function, as you can
-in Perl. Note that some languages provide anonymous functions but are
-not capable of providing proper closures: the Python language, for
-example. For more information on closures, check out any textbook on
-functional programming. Scheme is a language that not only supports
-but encourages closures.
-
-Here's a classic non-closure function-generating function:
-
- sub add_function_generator {
- return sub { shift() + shift() };
- }
-
- $add_sub = add_function_generator();
- $sum = $add_sub->(4,5); # $sum is 9 now.
-
-The anonymous subroutine returned by add_function_generator() isn't
-technically a closure because it refers to no lexicals outside its own
-scope. Using a closure gives you a I<function template> with some
-customization slots left out to be filled later.
-
-Contrast this with the following make_adder() function, in which the
-returned anonymous function contains a reference to a lexical variable
-outside the scope of that function itself. Such a reference requires
-that Perl return a proper closure, thus locking in for all time the
-value that the lexical had when the function was created.
-
- sub make_adder {
- my $addpiece = shift;
- return sub { shift() + $addpiece };
- }
-
- $f1 = make_adder(20);
- $f2 = make_adder(555);
-
-Now C<&$f1($n)> is always 20 plus whatever $n you pass in, whereas
-C<&$f2($n)> is always 555 plus whatever $n you pass in. The $addpiece
-in the closure sticks around.
-
-Closures are often used for less esoteric purposes. For example, when
-you want to pass in a bit of code into a function:
-
- my $line;
- timeout( 30, sub { $line = <STDIN> } );
-
-If the code to execute had been passed in as a string,
-C<< '$line = <STDIN>' >>, there would have been no way for the
-hypothetical timeout() function to access the lexical variable
-$line back in its caller's scope.
-
-Another use for a closure is to make a variable I<private> to a
-named subroutine, e.g. a counter that gets initialized at creation
-time of the sub and can only be modified from within the sub.
-This is sometimes used with a BEGIN block in package files to make
-sure a variable doesn't get meddled with during the lifetime of the
-package:
-
- BEGIN {
- my $id = 0;
- sub next_id { ++$id }
- }
-
-This is discussed in more detail in L<perlsub>; see the entry on
-I<Persistent Private Variables>.
-
-=head2 What is variable suicide and how can I prevent it?
-
-This problem was fixed in perl 5.004_05, so preventing it means upgrading
-your version of perl. ;)
-
-Variable suicide is when you (temporarily or permanently) lose the value
-of a variable. It is caused by scoping through my() and local()
-interacting with either closures or aliased foreach() iterator variables
-and subroutine arguments. It used to be easy to inadvertently lose a
-variable's value this way, but now it's much harder. Take this code:
-
- my $f = 'foo';
- sub T {
- while ($i++ < 3) { my $f = $f; $f .= "bar"; print $f, "\n" }
- }
-
- T;
- print "Finally $f\n";
-
-If you are experiencing variable suicide, that C<my $f> in the subroutine
-doesn't pick up a fresh copy of the C<$f> whose value is <foo>. The output
-shows that inside the subroutine the value of C<$f> leaks through when it
-shouldn't, as in this output:
-
- foobar
- foobarbar
- foobarbarbar
- Finally foo
-
-The $f that has "bar" added to it three times should be a new C<$f>
-C<my $f> should create a new lexical variable each time through the loop.
-The expected output is:
-
- foobar
- foobar
- foobar
- Finally foo
-
-=head2 How can I pass/return a {Function, FileHandle, Array, Hash, Method, Regex}?
-
-You need to pass references to these objects. See L<perlsub/"Pass by
-Reference"> for this particular question, and L<perlref> for
-information on references.
-
-=over 4
-
-=item Passing Variables and Functions
-
-Regular variables and functions are quite easy to pass: just pass in a
-reference to an existing or anonymous variable or function:
-
- func( \$some_scalar );
-
- func( \@some_array );
- func( [ 1 .. 10 ] );
-
- func( \%some_hash );
- func( { this => 10, that => 20 } );
-
- func( \&some_func );
- func( sub { $_[0] ** $_[1] } );
-
-=item Passing Filehandles
-
-As of Perl 5.6, you can represent filehandles with scalar variables
-which you treat as any other scalar.
-
- open my $fh, $filename or die "Cannot open $filename! $!";
- func( $fh );
-
- sub func {
- my $passed_fh = shift;
-
- my $line = <$passed_fh>;
- }
-
-Before Perl 5.6, you had to use the C<*FH> or C<\*FH> notations.
-These are "typeglobs"--see L<perldata/"Typeglobs and Filehandles">
-and especially L<perlsub/"Pass by Reference"> for more information.
-
-=item Passing Regexes
-
-Here's an example of how to pass in a string and a regular expression
-for it to match against. You construct the pattern with the C<qr//>
-operator:
-
- sub compare($$) {
- my ($val1, $regex) = @_;
- my $retval = $val1 =~ /$regex/;
- return $retval;
- }
- $match = compare("old McDonald", qr/d.*D/i);
-
-=item Passing Methods
-
-To pass an object method into a subroutine, you can do this:
-
- call_a_lot(10, $some_obj, "methname")
- sub call_a_lot {
- my ($count, $widget, $trick) = @_;
- for (my $i = 0; $i < $count; $i++) {
- $widget->$trick();
- }
- }
-
-Or, you can use a closure to bundle up the object, its
-method call, and arguments:
-
- my $whatnot = sub { $some_obj->obfuscate(@args) };
- func($whatnot);
- sub func {
- my $code = shift;
- &$code();
- }
-
-You could also investigate the can() method in the UNIVERSAL class
-(part of the standard perl distribution).
-
-=back
-
-=head2 How do I create a static variable?
-
-(contributed by brian d foy)
-
-In Perl 5.10, declare the variable with C<state>. The C<state>
-declaration creates the lexical variable that persists between calls
-to the subroutine:
-
- sub counter { state $count = 1; $counter++ }
-
-You can fake a static variable by using a lexical variable which goes
-out of scope. In this example, you define the subroutine C<counter>, and
-it uses the lexical variable C<$count>. Since you wrap this in a BEGIN
-block, C<$count> is defined at compile-time, but also goes out of
-scope at the end of the BEGIN block. The BEGIN block also ensures that
-the subroutine and the value it uses is defined at compile-time so the
-subroutine is ready to use just like any other subroutine, and you can
-put this code in the same place as other subroutines in the program
-text (i.e. at the end of the code, typically). The subroutine
-C<counter> still has a reference to the data, and is the only way you
-can access the value (and each time you do, you increment the value).
-The data in chunk of memory defined by C<$count> is private to
-C<counter>.
-
- BEGIN {
- my $count = 1;
- sub counter { $count++ }
- }
-
- my $start = counter();
-
- .... # code that calls counter();
-
- my $end = counter();
-
-In the previous example, you created a function-private variable
-because only one function remembered its reference. You could define
-multiple functions while the variable is in scope, and each function
-can share the "private" variable. It's not really "static" because you
-can access it outside the function while the lexical variable is in
-scope, and even create references to it. In this example,
-C<increment_count> and C<return_count> share the variable. One
-function adds to the value and the other simply returns the value.
-They can both access C<$count>, and since it has gone out of scope,
-there is no other way to access it.
-
- BEGIN {
- my $count = 1;
- sub increment_count { $count++ }
- sub return_count { $count }
- }
-
-To declare a file-private variable, you still use a lexical variable.
-A file is also a scope, so a lexical variable defined in the file
-cannot be seen from any other file.
-
-See L<perlsub/"Persistent Private Variables"> for more information.
-The discussion of closures in L<perlref> may help you even though we
-did not use anonymous subroutines in this answer. See
-L<perlsub/"Persistent Private Variables"> for details.
-
-=head2 What's the difference between dynamic and lexical (static) scoping? Between local() and my()?
-
-C<local($x)> saves away the old value of the global variable C<$x>
-and assigns a new value for the duration of the subroutine I<which is
-visible in other functions called from that subroutine>. This is done
-at run-time, so is called dynamic scoping. local() always affects global
-variables, also called package variables or dynamic variables.
-
-C<my($x)> creates a new variable that is only visible in the current
-subroutine. This is done at compile-time, so it is called lexical or
-static scoping. my() always affects private variables, also called
-lexical variables or (improperly) static(ly scoped) variables.
-
-For instance:
-
- sub visible {
- print "var has value $var\n";
- }
-
- sub dynamic {
- local $var = 'local'; # new temporary value for the still-global
- visible(); # variable called $var
- }
-
- sub lexical {
- my $var = 'private'; # new private variable, $var
- visible(); # (invisible outside of sub scope)
- }
-
- $var = 'global';
-
- visible(); # prints global
- dynamic(); # prints local
- lexical(); # prints global
-
-Notice how at no point does the value "private" get printed. That's
-because $var only has that value within the block of the lexical()
-function, and it is hidden from the called subroutine.
-
-In summary, local() doesn't make what you think of as private, local
-variables. It gives a global variable a temporary value. my() is
-what you're looking for if you want private variables.
-
-See L<perlsub/"Private Variables via my()"> and
-L<perlsub/"Temporary Values via local()"> for excruciating details.
-
-=head2 How can I access a dynamic variable while a similarly named lexical is in scope?
-
-If you know your package, you can just mention it explicitly, as in
-$Some_Pack::var. Note that the notation $::var is B<not> the dynamic $var
-in the current package, but rather the one in the "main" package, as
-though you had written $main::var.
-
- use vars '$var';
- local $var = "global";
- my $var = "lexical";
-
- print "lexical is $var\n";
- print "global is $main::var\n";
-
-Alternatively you can use the compiler directive our() to bring a
-dynamic variable into the current lexical scope.
-
- require 5.006; # our() did not exist before 5.6
- use vars '$var';
-
- local $var = "global";
- my $var = "lexical";
-
- print "lexical is $var\n";
-
- {
- our $var;
- print "global is $var\n";
- }
-
-=head2 What's the difference between deep and shallow binding?
-
-In deep binding, lexical variables mentioned in anonymous subroutines
-are the same ones that were in scope when the subroutine was created.
-In shallow binding, they are whichever variables with the same names
-happen to be in scope when the subroutine is called. Perl always uses
-deep binding of lexical variables (i.e., those created with my()).
-However, dynamic variables (aka global, local, or package variables)
-are effectively shallowly bound. Consider this just one more reason
-not to use them. See the answer to L<"What's a closure?">.
-
-=head2 Why doesn't "my($foo) = E<lt>FILEE<gt>;" work right?
-
-C<my()> and C<local()> give list context to the right hand side
-of C<=>. The <FH> read operation, like so many of Perl's
-functions and operators, can tell which context it was called in and
-behaves appropriately. In general, the scalar() function can help.
-This function does nothing to the data itself (contrary to popular myth)
-but rather tells its argument to behave in whatever its scalar fashion is.
-If that function doesn't have a defined scalar behavior, this of course
-doesn't help you (such as with sort()).
-
-To enforce scalar context in this particular case, however, you need
-merely omit the parentheses:
-
- local($foo) = <FILE>; # WRONG
- local($foo) = scalar(<FILE>); # ok
- local $foo = <FILE>; # right
-
-You should probably be using lexical variables anyway, although the
-issue is the same here:
-
- my($foo) = <FILE>; # WRONG
- my $foo = <FILE>; # right
-
-=head2 How do I redefine a builtin function, operator, or method?
-
-Why do you want to do that? :-)
-
-If you want to override a predefined function, such as open(),
-then you'll have to import the new definition from a different
-module. See L<perlsub/"Overriding Built-in Functions">.
-
-If you want to overload a Perl operator, such as C<+> or C<**>,
-then you'll want to use the C<use overload> pragma, documented
-in L<overload>.
-
-If you're talking about obscuring method calls in parent classes,
-see L<perltoot/"Overridden Methods">.
-
-=head2 What's the difference between calling a function as &foo and foo()?
-
-(contributed by brian d foy)
-
-Calling a subroutine as C<&foo> with no trailing parentheses ignores
-the prototype of C<foo> and passes it the current value of the argument
-list, C<@_>. Here's an example; the C<bar> subroutine calls C<&foo>,
-which prints its arguments list:
-
- sub bar { &foo }
-
- sub foo { print "Args in foo are: @_\n" }
-
- bar( qw( a b c ) );
-
-When you call C<bar> with arguments, you see that C<foo> got the same C<@_>:
-
- Args in foo are: a b c
-
-Calling the subroutine with trailing parentheses, with or without arguments,
-does not use the current C<@_> and respects the subroutine prototype. Changing
-the example to put parentheses after the call to C<foo> changes the program:
-
- sub bar { &foo() }
-
- sub foo { print "Args in foo are: @_\n" }
-
- bar( qw( a b c ) );
-
-Now the output shows that C<foo> doesn't get the C<@_> from its caller.
-
- Args in foo are:
-
-The main use of the C<@_> pass-through feature is to write subroutines
-whose main job it is to call other subroutines for you. For further
-details, see L<perlsub>.
-
-=head2 How do I create a switch or case statement?
-
-In Perl 5.10, use the C<given-when> construct described in L<perlsyn>:
-
- use 5.010;
-
- given ( $string ) {
- when( 'Fred' ) { say "I found Fred!" }
- when( 'Barney' ) { say "I found Barney!" }
- when( /Bamm-?Bamm/ ) { say "I found Bamm-Bamm!" }
- default { say "I don't recognize the name!" }
- };
-
-If one wants to use pure Perl and to be compatible with Perl versions
-prior to 5.10, the general answer is to use C<if-elsif-else>:
-
- for ($variable_to_test) {
- if (/pat1/) { } # do something
- elsif (/pat2/) { } # do something else
- elsif (/pat3/) { } # do something else
- else { } # default
- }
-
-Here's a simple example of a switch based on pattern matching,
-lined up in a way to make it look more like a switch statement.
-We'll do a multiway conditional based on the type of reference stored
-in $whatchamacallit:
-
- SWITCH: for (ref $whatchamacallit) {
-
- /^$/ && die "not a reference";
-
- /SCALAR/ && do {
- print_scalar($$ref);
- last SWITCH;
- };
-
- /ARRAY/ && do {
- print_array(@$ref);
- last SWITCH;
- };
-
- /HASH/ && do {
- print_hash(%$ref);
- last SWITCH;
- };
-
- /CODE/ && do {
- warn "can't print function ref";
- last SWITCH;
- };
-
- # DEFAULT
-
- warn "User defined type skipped";
-
- }
-
-See L<perlsyn> for other examples in this style.
-
-Sometimes you should change the positions of the constant and the variable.
-For example, let's say you wanted to test which of many answers you were
-given, but in a case-insensitive way that also allows abbreviations.
-You can use the following technique if the strings all start with
-different characters or if you want to arrange the matches so that
-one takes precedence over another, as C<"SEND"> has precedence over
-C<"STOP"> here:
-
- chomp($answer = <>);
- if ("SEND" =~ /^\Q$answer/i) { print "Action is send\n" }
- elsif ("STOP" =~ /^\Q$answer/i) { print "Action is stop\n" }
- elsif ("ABORT" =~ /^\Q$answer/i) { print "Action is abort\n" }
- elsif ("LIST" =~ /^\Q$answer/i) { print "Action is list\n" }
- elsif ("EDIT" =~ /^\Q$answer/i) { print "Action is edit\n" }
-
-A totally different approach is to create a hash of function references.
-
- my %commands = (
- "happy" => \&joy,
- "sad", => \&sullen,
- "done" => sub { die "See ya!" },
- "mad" => \&angry,
- );
-
- print "How are you? ";
- chomp($string = <STDIN>);
- if ($commands{$string}) {
- $commands{$string}->();
- } else {
- print "No such command: $string\n";
- }
-
-Starting from Perl 5.8, a source filter module, C<Switch>, can also be
-used to get switch and case. Its use is now discouraged, because it's
-not fully compatible with the native switch of Perl 5.10, and because,
-as it's implemented as a source filter, it doesn't always work as intended
-when complex syntax is involved.
-
-=head2 How can I catch accesses to undefined variables, functions, or methods?
-
-The AUTOLOAD method, discussed in L<perlsub/"Autoloading"> and
-L<perltoot/"AUTOLOAD: Proxy Methods">, lets you capture calls to
-undefined functions and methods.
-
-When it comes to undefined variables that would trigger a warning
-under C<use warnings>, you can promote the warning to an error.
-
- use warnings FATAL => qw(uninitialized);
-
-=head2 Why can't a method included in this same file be found?
-
-Some possible reasons: your inheritance is getting confused, you've
-misspelled the method name, or the object is of the wrong type. Check
-out L<perltoot> for details about any of the above cases. You may
-also use C<print ref($object)> to find out the class C<$object> was
-blessed into.
-
-Another possible reason for problems is that you've used the
-indirect object syntax (eg, C<find Guru "Samy">) on a class name
-before Perl has seen that such a package exists. It's wisest to make
-sure your packages are all defined before you start using them, which
-will be taken care of if you use the C<use> statement instead of
-C<require>. If not, make sure to use arrow notation (eg.,
-C<< Guru->find("Samy") >>) instead. Object notation is explained in
-L<perlobj>.
-
-Make sure to read about creating modules in L<perlmod> and
-the perils of indirect objects in L<perlobj/"Method Invocation">.
-
-=head2 How can I find out my current or calling package?
-
-(contributed by brian d foy)
-
-To find the package you are currently in, use the special literal
-C<__PACKAGE__>, as documented in L<perldata>. You can only use the
-special literals as separate tokens, so you can't interpolate them
-into strings like you can with variables:
-
- my $current_package = __PACKAGE__;
- print "I am in package $current_package\n";
-
-If you want to find the package calling your code, perhaps to give better
-diagnostics as C<Carp> does, use the C<caller> built-in:
-
- sub foo {
- my @args = ...;
- my( $package, $filename, $line ) = caller;
-
- print "I was called from package $package\n";
- );
-
-By default, your program starts in package C<main>, so you will
-always be in some package.
-
-This is different from finding out the package an object is blessed
-into, which might not be the current package. For that, use C<blessed>
-from C<Scalar::Util>, part of the Standard Library since Perl 5.8:
-
- use Scalar::Util qw(blessed);
- my $object_package = blessed( $object );
-
-Most of the time, you shouldn't care what package an object is blessed
-into, however, as long as it claims to inherit from that class:
-
- my $is_right_class = eval { $object->isa( $package ) }; # true or false
-
-And, with Perl 5.10 and later, you don't have to check for an
-inheritance to see if the object can handle a role. For that, you can
-use C<DOES>, which comes from C<UNIVERSAL>:
-
- my $class_does_it = eval { $object->DOES( $role ) }; # true or false
-
-You can safely replace C<isa> with C<DOES> (although the converse is not true).
-
-=head2 How can I comment out a large block of Perl code?
-
-(contributed by brian d foy)
-
-The quick-and-dirty way to comment out more than one line of Perl is
-to surround those lines with Pod directives. You have to put these
-directives at the beginning of the line and somewhere where Perl
-expects a new statement (so not in the middle of statements like the #
-comments). You end the comment with C<=cut>, ending the Pod section:
-
- =pod
-
- my $object = NotGonnaHappen->new();
-
- ignored_sub();
-
- $wont_be_assigned = 37;
-
- =cut
-
-The quick-and-dirty method only works well when you don't plan to
-leave the commented code in the source. If a Pod parser comes along,
-you're multiline comment is going to show up in the Pod translation.
-A better way hides it from Pod parsers as well.
-
-The C<=begin> directive can mark a section for a particular purpose.
-If the Pod parser doesn't want to handle it, it just ignores it. Label
-the comments with C<comment>. End the comment using C<=end> with the
-same label. You still need the C<=cut> to go back to Perl code from
-the Pod comment:
-
- =begin comment
-
- my $object = NotGonnaHappen->new();
-
- ignored_sub();
-
- $wont_be_assigned = 37;
-
- =end comment
-
- =cut
-
-For more information on Pod, check out L<perlpod> and L<perlpodspec>.
-
-=head2 How do I clear a package?
-
-Use this code, provided by Mark-Jason Dominus:
-
- sub scrub_package {
- no strict 'refs';
- my $pack = shift;
- die "Shouldn't delete main package"
- if $pack eq "" || $pack eq "main";
- my $stash = *{$pack . '::'}{HASH};
- my $name;
- foreach $name (keys %$stash) {
- my $fullname = $pack . '::' . $name;
- # Get rid of everything with that name.
- undef $$fullname;
- undef @$fullname;
- undef %$fullname;
- undef &$fullname;
- undef *$fullname;
- }
- }
-
-Or, if you're using a recent release of Perl, you can
-just use the Symbol::delete_package() function instead.
-
-=head2 How can I use a variable as a variable name?
-
-Beginners often think they want to have a variable contain the name
-of a variable.
-
- $fred = 23;
- $varname = "fred";
- ++$$varname; # $fred now 24
-
-This works I<sometimes>, but it is a very bad idea for two reasons.
-
-The first reason is that this technique I<only works on global
-variables>. That means that if $fred is a lexical variable created
-with my() in the above example, the code wouldn't work at all: you'd
-accidentally access the global and skip right over the private lexical
-altogether. Global variables are bad because they can easily collide
-accidentally and in general make for non-scalable and confusing code.
-
-Symbolic references are forbidden under the C<use strict> pragma.
-They are not true references and consequently are not reference-counted
-or garbage-collected.
-
-The other reason why using a variable to hold the name of another
-variable is a bad idea is that the question often stems from a lack of
-understanding of Perl data structures, particularly hashes. By using
-symbolic references, you are just using the package's symbol-table hash
-(like C<%main::>) instead of a user-defined hash. The solution is to
-use your own hash or a real reference instead.
-
- $USER_VARS{"fred"} = 23;
- $varname = "fred";
- $USER_VARS{$varname}++; # not $$varname++
-
-There we're using the %USER_VARS hash instead of symbolic references.
-Sometimes this comes up in reading strings from the user with variable
-references and wanting to expand them to the values of your perl
-program's variables. This is also a bad idea because it conflates the
-program-addressable namespace and the user-addressable one. Instead of
-reading a string and expanding it to the actual contents of your program's
-own variables:
-
- $str = 'this has a $fred and $barney in it';
- $str =~ s/(\$\w+)/$1/eeg; # need double eval
-
-it would be better to keep a hash around like %USER_VARS and have
-variable references actually refer to entries in that hash:
-
- $str =~ s/\$(\w+)/$USER_VARS{$1}/g; # no /e here at all
-
-That's faster, cleaner, and safer than the previous approach. Of course,
-you don't need to use a dollar sign. You could use your own scheme to
-make it less confusing, like bracketed percent symbols, etc.
-
- $str = 'this has a %fred% and %barney% in it';
- $str =~ s/%(\w+)%/$USER_VARS{$1}/g; # no /e here at all
-
-Another reason that folks sometimes think they want a variable to
-contain the name of a variable is that they don't know how to build
-proper data structures using hashes. For example, let's say they
-wanted two hashes in their program: %fred and %barney, and that they
-wanted to use another scalar variable to refer to those by name.
-
- $name = "fred";
- $$name{WIFE} = "wilma"; # set %fred
-
- $name = "barney";
- $$name{WIFE} = "betty"; # set %barney
-
-This is still a symbolic reference, and is still saddled with the
-problems enumerated above. It would be far better to write:
-
- $folks{"fred"}{WIFE} = "wilma";
- $folks{"barney"}{WIFE} = "betty";
-
-And just use a multilevel hash to start with.
-
-The only times that you absolutely I<must> use symbolic references are
-when you really must refer to the symbol table. This may be because it's
-something that one can't take a real reference to, such as a format name.
-Doing so may also be important for method calls, since these always go
-through the symbol table for resolution.
-
-In those cases, you would turn off C<strict 'refs'> temporarily so you
-can play around with the symbol table. For example:
-
- @colors = qw(red blue green yellow orange purple violet);
- for my $name (@colors) {
- no strict 'refs'; # renege for the block
- *$name = sub { "<FONT COLOR='$name'>@_</FONT>" };
- }
-
-All those functions (red(), blue(), green(), etc.) appear to be separate,
-but the real code in the closure actually was compiled only once.
-
-So, sometimes you might want to use symbolic references to manipulate
-the symbol table directly. This doesn't matter for formats, handles, and
-subroutines, because they are always global--you can't use my() on them.
-For scalars, arrays, and hashes, though--and usually for subroutines--
-you probably only want to use hard references.
-
-=head2 What does "bad interpreter" mean?
-
-(contributed by brian d foy)
-
-The "bad interpreter" message comes from the shell, not perl. The
-actual message may vary depending on your platform, shell, and locale
-settings.
-
-If you see "bad interpreter - no such file or directory", the first
-line in your perl script (the "shebang" line) does not contain the
-right path to perl (or any other program capable of running scripts).
-Sometimes this happens when you move the script from one machine to
-another and each machine has a different path to perl--/usr/bin/perl
-versus /usr/local/bin/perl for instance. It may also indicate
-that the source machine has CRLF line terminators and the
-destination machine has LF only: the shell tries to find
-/usr/bin/perl<CR>, but can't.
-
-If you see "bad interpreter: Permission denied", you need to make your
-script executable.
-
-In either case, you should still be able to run the scripts with perl
-explicitly:
-
- % perl script.pl
-
-If you get a message like "perl: command not found", perl is not in
-your PATH, which might also mean that the location of perl is not
-where you expect it so you need to adjust your shebang line.
-
-=head1 AUTHOR AND COPYRIGHT
-
-Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
-other authors as noted. All rights reserved.
-
-This documentation is free; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-Irrespective of its distribution, all code examples in this file
-are hereby placed into the public domain. You are permitted and
-encouraged to use this code in your own programs for fun
-or for profit as you see fit. A simple comment in the code giving
-credit would be courteous but is not required.
-
Deleted: vendor/perl/dist/pod/perlfaq8.pod
===================================================================
--- vendor/perl/dist/pod/perlfaq8.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlfaq8.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1416 +0,0 @@
-=head1 NAME
-
-perlfaq8 - System Interaction
-
-=head1 DESCRIPTION
-
-This section of the Perl FAQ covers questions involving operating
-system interaction. Topics include interprocess communication (IPC),
-control over the user-interface (keyboard, screen and pointing
-devices), and most anything else not related to data manipulation.
-
-Read the FAQs and documentation specific to the port of perl to your
-operating system (eg, L<perlvms>, L<perlplan9>, ...). These should
-contain more detailed information on the vagaries of your perl.
-
-=head2 How do I find out which operating system I'm running under?
-
-The C<$^O> variable (C<$OSNAME> if you use C<English>) contains an
-indication of the name of the operating system (not its release
-number) that your perl binary was built for.
-
-=head2 How come exec() doesn't return?
-X<exec> X<system> X<fork> X<open> X<pipe>
-
-(contributed by brian d foy)
-
-The C<exec> function's job is to turn your process into another
-command and never to return. If that's not what you want to do, don't
-use C<exec>. :)
-
-If you want to run an external command and still keep your Perl process
-going, look at a piped C<open>, C<fork>, or C<system>.
-
-=head2 How do I do fancy stuff with the keyboard/screen/mouse?
-
-How you access/control keyboards, screens, and pointing devices
-("mice") is system-dependent. Try the following modules:
-
-=over 4
-
-=item Keyboard
-
- Term::Cap Standard perl distribution
- Term::ReadKey CPAN
- Term::ReadLine::Gnu CPAN
- Term::ReadLine::Perl CPAN
- Term::Screen CPAN
-
-=item Screen
-
- Term::Cap Standard perl distribution
- Curses CPAN
- Term::ANSIColor CPAN
-
-=item Mouse
-
- Tk CPAN
-
-=back
-
-Some of these specific cases are shown as examples in other answers
-in this section of the perlfaq.
-
-=head2 How do I print something out in color?
-
-In general, you don't, because you don't know whether
-the recipient has a color-aware display device. If you
-know that they have an ANSI terminal that understands
-color, you can use the C<Term::ANSIColor> module from CPAN:
-
- use Term::ANSIColor;
- print color("red"), "Stop!\n", color("reset");
- print color("green"), "Go!\n", color("reset");
-
-Or like this:
-
- use Term::ANSIColor qw(:constants);
- print RED, "Stop!\n", RESET;
- print GREEN, "Go!\n", RESET;
-
-=head2 How do I read just one key without waiting for a return key?
-
-Controlling input buffering is a remarkably system-dependent matter.
-On many systems, you can just use the B<stty> command as shown in
-L<perlfunc/getc>, but as you see, that's already getting you into
-portability snags.
-
- open(TTY, "+</dev/tty") or die "no tty: $!";
- system "stty cbreak </dev/tty >/dev/tty 2>&1";
- $key = getc(TTY); # perhaps this works
- # OR ELSE
- sysread(TTY, $key, 1); # probably this does
- system "stty -cbreak </dev/tty >/dev/tty 2>&1";
-
-The C<Term::ReadKey> module from CPAN offers an easy-to-use interface that
-should be more efficient than shelling out to B<stty> for each key.
-It even includes limited support for Windows.
-
- use Term::ReadKey;
- ReadMode('cbreak');
- $key = ReadKey(0);
- ReadMode('normal');
-
-However, using the code requires that you have a working C compiler
-and can use it to build and install a CPAN module. Here's a solution
-using the standard C<POSIX> module, which is already on your system
-(assuming your system supports POSIX).
-
- use HotKey;
- $key = readkey();
-
-And here's the C<HotKey> module, which hides the somewhat mystifying calls
-to manipulate the POSIX termios structures.
-
- # HotKey.pm
- package HotKey;
-
- @ISA = qw(Exporter);
- @EXPORT = qw(cbreak cooked readkey);
-
- use strict;
- use POSIX qw(:termios_h);
- my ($term, $oterm, $echo, $noecho, $fd_stdin);
-
- $fd_stdin = fileno(STDIN);
- $term = POSIX::Termios->new();
- $term->getattr($fd_stdin);
- $oterm = $term->getlflag();
-
- $echo = ECHO | ECHOK | ICANON;
- $noecho = $oterm & ~$echo;
-
- sub cbreak {
- $term->setlflag($noecho); # ok, so i don't want echo either
- $term->setcc(VTIME, 1);
- $term->setattr($fd_stdin, TCSANOW);
- }
-
- sub cooked {
- $term->setlflag($oterm);
- $term->setcc(VTIME, 0);
- $term->setattr($fd_stdin, TCSANOW);
- }
-
- sub readkey {
- my $key = '';
- cbreak();
- sysread(STDIN, $key, 1);
- cooked();
- return $key;
- }
-
- END { cooked() }
-
- 1;
-
-=head2 How do I check whether input is ready on the keyboard?
-
-The easiest way to do this is to read a key in nonblocking mode with the
-C<Term::ReadKey> module from CPAN, passing it an argument of -1 to indicate
-not to block:
-
- use Term::ReadKey;
-
- ReadMode('cbreak');
-
- if (defined ($char = ReadKey(-1)) ) {
- # input was waiting and it was $char
- } else {
- # no input was waiting
- }
-
- ReadMode('normal'); # restore normal tty settings
-
-=head2 How do I clear the screen?
-
-(contributed by brian d foy)
-
-To clear the screen, you just have to print the special sequence
-that tells the terminal to clear the screen. Once you have that
-sequence, output it when you want to clear the screen.
-
-You can use the C<Term::ANSIScreen> module to get the special
-sequence. Import the C<cls> function (or the C<:screen> tag):
-
- use Term::ANSIScreen qw(cls);
- my $clear_screen = cls();
-
- print $clear_screen;
-
-The C<Term::Cap> module can also get the special sequence if you want
-to deal with the low-level details of terminal control. The C<Tputs>
-method returns the string for the given capability:
-
- use Term::Cap;
-
- $terminal = Term::Cap->Tgetent( { OSPEED => 9600 } );
- $clear_string = $terminal->Tputs('cl');
-
- print $clear_screen;
-
-On Windows, you can use the C<Win32::Console> module. After creating
-an object for the output filehandle you want to affect, call the
-C<Cls> method:
-
- Win32::Console;
-
- $OUT = Win32::Console->new(STD_OUTPUT_HANDLE);
- my $clear_string = $OUT->Cls;
-
- print $clear_screen;
-
-If you have a command-line program that does the job, you can call
-it in backticks to capture whatever it outputs so you can use it
-later:
-
- $clear_string = `clear`;
-
- print $clear_string;
-
-=head2 How do I get the screen size?
-
-If you have C<Term::ReadKey> module installed from CPAN,
-you can use it to fetch the width and height in characters
-and in pixels:
-
- use Term::ReadKey;
- ($wchar, $hchar, $wpixels, $hpixels) = GetTerminalSize();
-
-This is more portable than the raw C<ioctl>, but not as
-illustrative:
-
- require 'sys/ioctl.ph';
- die "no TIOCGWINSZ " unless defined &TIOCGWINSZ;
- open(TTY, "+</dev/tty") or die "No tty: $!";
- unless (ioctl(TTY, &TIOCGWINSZ, $winsize='')) {
- die sprintf "$0: ioctl TIOCGWINSZ (%08x: $!)\n", &TIOCGWINSZ;
- }
- ($row, $col, $xpixel, $ypixel) = unpack('S4', $winsize);
- print "(row,col) = ($row,$col)";
- print " (xpixel,ypixel) = ($xpixel,$ypixel)" if $xpixel || $ypixel;
- print "\n";
-
-=head2 How do I ask the user for a password?
-
-(This question has nothing to do with the web. See a different
-FAQ for that.)
-
-There's an example of this in L<perlfunc/crypt>). First, you put the
-terminal into "no echo" mode, then just read the password normally.
-You may do this with an old-style C<ioctl()> function, POSIX terminal
-control (see L<POSIX> or its documentation the Camel Book), or a call
-to the B<stty> program, with varying degrees of portability.
-
-You can also do this for most systems using the C<Term::ReadKey> module
-from CPAN, which is easier to use and in theory more portable.
-
- use Term::ReadKey;
-
- ReadMode('noecho');
- $password = ReadLine(0);
-
-=head2 How do I read and write the serial port?
-
-This depends on which operating system your program is running on. In
-the case of Unix, the serial ports will be accessible through files in
-/dev; on other systems, device names will doubtless differ.
-Several problem areas common to all device interaction are the
-following:
-
-=over 4
-
-=item lockfiles
-
-Your system may use lockfiles to control multiple access. Make sure
-you follow the correct protocol. Unpredictable behavior can result
-from multiple processes reading from one device.
-
-=item open mode
-
-If you expect to use both read and write operations on the device,
-you'll have to open it for update (see L<perlfunc/"open"> for
-details). You may wish to open it without running the risk of
-blocking by using C<sysopen()> and C<O_RDWR|O_NDELAY|O_NOCTTY> from the
-C<Fcntl> module (part of the standard perl distribution). See
-L<perlfunc/"sysopen"> for more on this approach.
-
-=item end of line
-
-Some devices will be expecting a "\r" at the end of each line rather
-than a "\n". In some ports of perl, "\r" and "\n" are different from
-their usual (Unix) ASCII values of "\015" and "\012". You may have to
-give the numeric values you want directly, using octal ("\015"), hex
-("0x0D"), or as a control-character specification ("\cM").
-
- print DEV "atv1\012"; # wrong, for some devices
- print DEV "atv1\015"; # right, for some devices
-
-Even though with normal text files a "\n" will do the trick, there is
-still no unified scheme for terminating a line that is portable
-between Unix, DOS/Win, and Macintosh, except to terminate I<ALL> line
-ends with "\015\012", and strip what you don't need from the output.
-This applies especially to socket I/O and autoflushing, discussed
-next.
-
-=item flushing output
-
-If you expect characters to get to your device when you C<print()> them,
-you'll want to autoflush that filehandle. You can use C<select()>
-and the C<$|> variable to control autoflushing (see L<perlvar/$E<verbar>>
-and L<perlfunc/select>, or L<perlfaq5>, "How do I flush/unbuffer an
-output filehandle? Why must I do this?"):
-
- $oldh = select(DEV);
- $| = 1;
- select($oldh);
-
-You'll also see code that does this without a temporary variable, as in
-
- select((select(DEV), $| = 1)[0]);
-
-Or if you don't mind pulling in a few thousand lines
-of code just because you're afraid of a little C<$|> variable:
-
- use IO::Handle;
- DEV->autoflush(1);
-
-As mentioned in the previous item, this still doesn't work when using
-socket I/O between Unix and Macintosh. You'll need to hard code your
-line terminators, in that case.
-
-=item non-blocking input
-
-If you are doing a blocking C<read()> or C<sysread()>, you'll have to
-arrange for an alarm handler to provide a timeout (see
-L<perlfunc/alarm>). If you have a non-blocking open, you'll likely
-have a non-blocking read, which means you may have to use a 4-arg
-C<select()> to determine whether I/O is ready on that device (see
-L<perlfunc/"select">.
-
-=back
-
-While trying to read from his caller-id box, the notorious Jamie
-Zawinski C<< <jwz at netscape.com> >>, after much gnashing of teeth and
-fighting with C<sysread>, C<sysopen>, POSIX's C<tcgetattr> business,
-and various other functions that go bump in the night, finally came up
-with this:
-
- sub open_modem {
- use IPC::Open2;
- my $stty = `/bin/stty -g`;
- open2( \*MODEM_IN, \*MODEM_OUT, "cu -l$modem_device -s2400 2>&1");
- # starting cu hoses /dev/tty's stty settings, even when it has
- # been opened on a pipe...
- system("/bin/stty $stty");
- $_ = <MODEM_IN>;
- chomp;
- if ( !m/^Connected/ ) {
- print STDERR "$0: cu printed `$_' instead of `Connected'\n";
- }
- }
-
-=head2 How do I decode encrypted password files?
-
-You spend lots and lots of money on dedicated hardware, but this is
-bound to get you talked about.
-
-Seriously, you can't if they are Unix password files--the Unix
-password system employs one-way encryption. It's more like hashing
-than encryption. The best you can do is check whether something else
-hashes to the same string. You can't turn a hash back into the
-original string. Programs like Crack can forcibly (and intelligently)
-try to guess passwords, but don't (can't) guarantee quick success.
-
-If you're worried about users selecting bad passwords, you should
-proactively check when they try to change their password (by modifying
-passwd(1), for example).
-
-=head2 How do I start a process in the background?
-
-(contributed by brian d foy)
-
-There's not a single way to run code in the background so you don't
-have to wait for it to finish before your program moves on to other
-tasks. Process management depends on your particular operating system,
-and many of the techniques are in L<perlipc>.
-
-Several CPAN modules may be able to help, including C<IPC::Open2> or
-C<IPC::Open3>, C<IPC::Run>, C<Parallel::Jobs>,
-C<Parallel::ForkManager>, C<POE>, C<Proc::Background>, and
-C<Win32::Process>. There are many other modules you might use, so
-check those namespaces for other options too.
-
-If you are on a Unix-like system, you might be able to get away with a
-system call where you put an C<&> on the end of the command:
-
- system("cmd &")
-
-You can also try using C<fork>, as described in L<perlfunc> (although
-this is the same thing that many of the modules will do for you).
-
-=over 4
-
-=item STDIN, STDOUT, and STDERR are shared
-
-Both the main process and the backgrounded one (the "child" process)
-share the same STDIN, STDOUT and STDERR filehandles. If both try to
-access them at once, strange things can happen. You may want to close
-or reopen these for the child. You can get around this with
-C<open>ing a pipe (see L<perlfunc/"open">) but on some systems this
-means that the child process cannot outlive the parent.
-
-=item Signals
-
-You'll have to catch the SIGCHLD signal, and possibly SIGPIPE too.
-SIGCHLD is sent when the backgrounded process finishes. SIGPIPE is
-sent when you write to a filehandle whose child process has closed (an
-untrapped SIGPIPE can cause your program to silently die). This is
-not an issue with C<system("cmd&")>.
-
-=item Zombies
-
-You have to be prepared to "reap" the child process when it finishes.
-
- $SIG{CHLD} = sub { wait };
-
- $SIG{CHLD} = 'IGNORE';
-
-You can also use a double fork. You immediately C<wait()> for your
-first child, and the init daemon will C<wait()> for your grandchild once
-it exits.
-
- unless ($pid = fork) {
- unless (fork) {
- exec "what you really wanna do";
- die "exec failed!";
- }
- exit 0;
- }
- waitpid($pid, 0);
-
-See L<perlipc/"Signals"> for other examples of code to do this.
-Zombies are not an issue with C<system("prog &")>.
-
-=back
-
-=head2 How do I trap control characters/signals?
-
-You don't actually "trap" a control character. Instead, that character
-generates a signal which is sent to your terminal's currently
-foregrounded process group, which you then trap in your process.
-Signals are documented in L<perlipc/"Signals"> and the
-section on "Signals" in the Camel.
-
-You can set the values of the C<%SIG> hash to be the functions you want
-to handle the signal. After perl catches the signal, it looks in C<%SIG>
-for a key with the same name as the signal, then calls the subroutine
-value for that key.
-
- # as an anonymous subroutine
-
- $SIG{INT} = sub { syswrite(STDERR, "ouch\n", 5 ) };
-
- # or a reference to a function
-
- $SIG{INT} = \&ouch;
-
- # or the name of the function as a string
-
- $SIG{INT} = "ouch";
-
-Perl versions before 5.8 had in its C source code signal handlers which
-would catch the signal and possibly run a Perl function that you had set
-in C<%SIG>. This violated the rules of signal handling at that level
-causing perl to dump core. Since version 5.8.0, perl looks at C<%SIG>
-B<after> the signal has been caught, rather than while it is being caught.
-Previous versions of this answer were incorrect.
-
-=head2 How do I modify the shadow password file on a Unix system?
-
-If perl was installed correctly and your shadow library was written
-properly, the C<getpw*()> functions described in L<perlfunc> should in
-theory provide (read-only) access to entries in the shadow password
-file. To change the file, make a new shadow password file (the format
-varies from system to system--see L<passwd> for specifics) and use
-C<pwd_mkdb(8)> to install it (see L<pwd_mkdb> for more details).
-
-=head2 How do I set the time and date?
-
-Assuming you're running under sufficient permissions, you should be
-able to set the system-wide date and time by running the C<date(1)>
-program. (There is no way to set the time and date on a per-process
-basis.) This mechanism will work for Unix, MS-DOS, Windows, and NT;
-the VMS equivalent is C<set time>.
-
-However, if all you want to do is change your time zone, you can
-probably get away with setting an environment variable:
-
- $ENV{TZ} = "MST7MDT"; # Unixish
- $ENV{'SYS$TIMEZONE_DIFFERENTIAL'}="-5" # vms
- system "trn comp.lang.perl.misc";
-
-=head2 How can I sleep() or alarm() for under a second?
-X<Time::HiRes> X<BSD::Itimer> X<sleep> X<select>
-
-If you want finer granularity than the 1 second that the C<sleep()>
-function provides, the easiest way is to use the C<select()> function as
-documented in L<perlfunc/"select">. Try the C<Time::HiRes> and
-the C<BSD::Itimer> modules (available from CPAN, and starting from
-Perl 5.8 C<Time::HiRes> is part of the standard distribution).
-
-=head2 How can I measure time under a second?
-X<Time::HiRes> X<BSD::Itimer> X<sleep> X<select>
-
-(contributed by brian d foy)
-
-The C<Time::HiRes> module (part of the standard distribution as of
-Perl 5.8) measures time with the C<gettimeofday()> system call, which
-returns the time in microseconds since the epoch. If you can't install
-C<Time::HiRes> for older Perls and you are on a Unixish system, you
-may be able to call C<gettimeofday(2)> directly. See
-L<perlfunc/syscall>.
-
-=head2 How can I do an atexit() or setjmp()/longjmp()? (Exception handling)
-
-You can use the C<END> block to simulate C<atexit()>. Each package's
-C<END> block is called when the program or thread ends. See the L<perlmod>
-manpage for more details about C<END> blocks.
-
-For example, you can use this to make sure your filter program managed
-to finish its output without filling up the disk:
-
- END {
- close(STDOUT) || die "stdout close failed: $!";
- }
-
-The C<END> block isn't called when untrapped signals kill the program,
-though, so if you use C<END> blocks you should also use
-
- use sigtrap qw(die normal-signals);
-
-Perl's exception-handling mechanism is its C<eval()> operator. You
-can use C<eval()> as C<setjmp> and C<die()> as C<longjmp>. For
-details of this, see the section on signals, especially the time-out
-handler for a blocking C<flock()> in L<perlipc/"Signals"> or the
-section on "Signals" in I<Programming Perl>.
-
-If exception handling is all you're interested in, use one of the
-many CPAN modules that handle exceptions, such as C<Try::Tiny>.
-
-If you want the C<atexit()> syntax (and an C<rmexit()> as well), try the
-C<AtExit> module available from CPAN.
-
-=head2 Why doesn't my sockets program work under System V (Solaris)? What does the error message "Protocol not supported" mean?
-
-Some Sys-V based systems, notably Solaris 2.X, redefined some of the
-standard socket constants. Since these were constant across all
-architectures, they were often hardwired into perl code. The proper
-way to deal with this is to "use Socket" to get the correct values.
-
-Note that even though SunOS and Solaris are binary compatible, these
-values are different. Go figure.
-
-=head2 How can I call my system's unique C functions from Perl?
-
-In most cases, you write an external module to do it--see the answer
-to "Where can I learn about linking C with Perl? [h2xs, xsubpp]".
-However, if the function is a system call, and your system supports
-C<syscall()>, you can use the C<syscall> function (documented in
-L<perlfunc>).
-
-Remember to check the modules that came with your distribution, and
-CPAN as well--someone may already have written a module to do it. On
-Windows, try C<Win32::API>. On Macs, try C<Mac::Carbon>. If no module
-has an interface to the C function, you can inline a bit of C in your
-Perl source with C<Inline::C>.
-
-=head2 Where do I get the include files to do ioctl() or syscall()?
-
-Historically, these would be generated by the C<h2ph> tool, part of the
-standard perl distribution. This program converts C<cpp(1)> directives
-in C header files to files containing subroutine definitions, like
-C<&SYS_getitimer>, which you can use as arguments to your functions.
-It doesn't work perfectly, but it usually gets most of the job done.
-Simple files like F<errno.h>, F<syscall.h>, and F<socket.h> were fine,
-but the hard ones like F<ioctl.h> nearly always need to be hand-edited.
-Here's how to install the *.ph files:
-
- 1. become super-user
- 2. cd /usr/include
- 3. h2ph *.h */*.h
-
-If your system supports dynamic loading, for reasons of portability and
-sanity you probably ought to use C<h2xs> (also part of the standard perl
-distribution). This tool converts C header files to Perl extensions.
-See L<perlxstut> for how to get started with C<h2xs>.
-
-If your system doesn't support dynamic loading, you still probably
-ought to use C<h2xs>. See L<perlxstut> and L<ExtUtils::MakeMaker> for
-more information (in brief, just use B<make perl> instead of a plain
-B<make> to rebuild perl with a new static extension).
-
-=head2 Why do setuid perl scripts complain about kernel problems?
-
-Some operating systems have bugs in the kernel that make setuid
-scripts inherently insecure. Perl gives you a number of options
-(described in L<perlsec>) to work around such systems.
-
-=head2 How can I open a pipe both to and from a command?
-
-The C<IPC::Open2> module (part of the standard perl distribution) is
-an easy-to-use approach that internally uses C<pipe()>, C<fork()>, and
-C<exec()> to do the job. Make sure you read the deadlock warnings in
-its documentation, though (see L<IPC::Open2>). See
-L<perlipc/"Bidirectional Communication with Another Process"> and
-L<perlipc/"Bidirectional Communication with Yourself">
-
-You may also use the C<IPC::Open3> module (part of the standard perl
-distribution), but be warned that it has a different order of
-arguments from C<IPC::Open2> (see L<IPC::Open3>).
-
-=head2 Why can't I get the output of a command with system()?
-
-You're confusing the purpose of C<system()> and backticks (``). C<system()>
-runs a command and returns exit status information (as a 16 bit value:
-the low 7 bits are the signal the process died from, if any, and
-the high 8 bits are the actual exit value). Backticks (``) run a
-command and return what it sent to STDOUT.
-
- $exit_status = system("mail-users");
- $output_string = `ls`;
-
-=head2 How can I capture STDERR from an external command?
-
-There are three basic ways of running external commands:
-
- system $cmd; # using system()
- $output = `$cmd`; # using backticks (``)
- open (PIPE, "cmd |"); # using open()
-
-With C<system()>, both STDOUT and STDERR will go the same place as the
-script's STDOUT and STDERR, unless the C<system()> command redirects them.
-Backticks and C<open()> read B<only> the STDOUT of your command.
-
-You can also use the C<open3()> function from C<IPC::Open3>. Benjamin
-Goldberg provides some sample code:
-
-To capture a program's STDOUT, but discard its STDERR:
-
- use IPC::Open3;
- use File::Spec;
- use Symbol qw(gensym);
- open(NULL, ">", File::Spec->devnull);
- my $pid = open3(gensym, \*PH, ">&NULL", "cmd");
- while( <PH> ) { }
- waitpid($pid, 0);
-
-To capture a program's STDERR, but discard its STDOUT:
-
- use IPC::Open3;
- use File::Spec;
- use Symbol qw(gensym);
- open(NULL, ">", File::Spec->devnull);
- my $pid = open3(gensym, ">&NULL", \*PH, "cmd");
- while( <PH> ) { }
- waitpid($pid, 0);
-
-To capture a program's STDERR, and let its STDOUT go to our own STDERR:
-
- use IPC::Open3;
- use Symbol qw(gensym);
- my $pid = open3(gensym, ">&STDERR", \*PH, "cmd");
- while( <PH> ) { }
- waitpid($pid, 0);
-
-To read both a command's STDOUT and its STDERR separately, you can
-redirect them to temp files, let the command run, then read the temp
-files:
-
- use IPC::Open3;
- use Symbol qw(gensym);
- use IO::File;
- local *CATCHOUT = IO::File->new_tmpfile;
- local *CATCHERR = IO::File->new_tmpfile;
- my $pid = open3(gensym, ">&CATCHOUT", ">&CATCHERR", "cmd");
- waitpid($pid, 0);
- seek $_, 0, 0 for \*CATCHOUT, \*CATCHERR;
- while( <CATCHOUT> ) {}
- while( <CATCHERR> ) {}
-
-But there's no real need for B<both> to be tempfiles... the following
-should work just as well, without deadlocking:
-
- use IPC::Open3;
- use Symbol qw(gensym);
- use IO::File;
- local *CATCHERR = IO::File->new_tmpfile;
- my $pid = open3(gensym, \*CATCHOUT, ">&CATCHERR", "cmd");
- while( <CATCHOUT> ) {}
- waitpid($pid, 0);
- seek CATCHERR, 0, 0;
- while( <CATCHERR> ) {}
-
-And it'll be faster, too, since we can begin processing the program's
-stdout immediately, rather than waiting for the program to finish.
-
-With any of these, you can change file descriptors before the call:
-
- open(STDOUT, ">logfile");
- system("ls");
-
-or you can use Bourne shell file-descriptor redirection:
-
- $output = `$cmd 2>some_file`;
- open (PIPE, "cmd 2>some_file |");
-
-You can also use file-descriptor redirection to make STDERR a
-duplicate of STDOUT:
-
- $output = `$cmd 2>&1`;
- open (PIPE, "cmd 2>&1 |");
-
-Note that you I<cannot> simply open STDERR to be a dup of STDOUT
-in your Perl program and avoid calling the shell to do the redirection.
-This doesn't work:
-
- open(STDERR, ">&STDOUT");
- $alloutput = `cmd args`; # stderr still escapes
-
-This fails because the C<open()> makes STDERR go to where STDOUT was
-going at the time of the C<open()>. The backticks then make STDOUT go to
-a string, but don't change STDERR (which still goes to the old
-STDOUT).
-
-Note that you I<must> use Bourne shell (C<sh(1)>) redirection syntax in
-backticks, not C<csh(1)>! Details on why Perl's C<system()> and backtick
-and pipe opens all use the Bourne shell are in the
-F<versus/csh.whynot> article in the "Far More Than You Ever Wanted To
-Know" collection in http://www.cpan.org/misc/olddoc/FMTEYEWTK.tgz . To
-capture a command's STDERR and STDOUT together:
-
- $output = `cmd 2>&1`; # either with backticks
- $pid = open(PH, "cmd 2>&1 |"); # or with an open pipe
- while (<PH>) { } # plus a read
-
-To capture a command's STDOUT but discard its STDERR:
-
- $output = `cmd 2>/dev/null`; # either with backticks
- $pid = open(PH, "cmd 2>/dev/null |"); # or with an open pipe
- while (<PH>) { } # plus a read
-
-To capture a command's STDERR but discard its STDOUT:
-
- $output = `cmd 2>&1 1>/dev/null`; # either with backticks
- $pid = open(PH, "cmd 2>&1 1>/dev/null |"); # or with an open pipe
- while (<PH>) { } # plus a read
-
-To exchange a command's STDOUT and STDERR in order to capture the STDERR
-but leave its STDOUT to come out our old STDERR:
-
- $output = `cmd 3>&1 1>&2 2>&3 3>&-`; # either with backticks
- $pid = open(PH, "cmd 3>&1 1>&2 2>&3 3>&-|");# or with an open pipe
- while (<PH>) { } # plus a read
-
-To read both a command's STDOUT and its STDERR separately, it's easiest
-to redirect them separately to files, and then read from those files
-when the program is done:
-
- system("program args 1>program.stdout 2>program.stderr");
-
-Ordering is important in all these examples. That's because the shell
-processes file descriptor redirections in strictly left to right order.
-
- system("prog args 1>tmpfile 2>&1");
- system("prog args 2>&1 1>tmpfile");
-
-The first command sends both standard out and standard error to the
-temporary file. The second command sends only the old standard output
-there, and the old standard error shows up on the old standard out.
-
-=head2 Why doesn't open() return an error when a pipe open fails?
-
-If the second argument to a piped C<open()> contains shell
-metacharacters, perl C<fork()>s, then C<exec()>s a shell to decode the
-metacharacters and eventually run the desired program. If the program
-couldn't be run, it's the shell that gets the message, not Perl. All
-your Perl program can find out is whether the shell itself could be
-successfully started. You can still capture the shell's STDERR and
-check it for error messages. See L<"How can I capture STDERR from an
-external command?"> elsewhere in this document, or use the
-C<IPC::Open3> module.
-
-If there are no shell metacharacters in the argument of C<open()>, Perl
-runs the command directly, without using the shell, and can correctly
-report whether the command started.
-
-=head2 What's wrong with using backticks in a void context?
-
-Strictly speaking, nothing. Stylistically speaking, it's not a good
-way to write maintainable code. Perl has several operators for
-running external commands. Backticks are one; they collect the output
-from the command for use in your program. The C<system> function is
-another; it doesn't do this.
-
-Writing backticks in your program sends a clear message to the readers
-of your code that you wanted to collect the output of the command.
-Why send a clear message that isn't true?
-
-Consider this line:
-
- `cat /etc/termcap`;
-
-You forgot to check C<$?> to see whether the program even ran
-correctly. Even if you wrote
-
- print `cat /etc/termcap`;
-
-this code could and probably should be written as
-
- system("cat /etc/termcap") == 0
- or die "cat program failed!";
-
-which will echo the cat command's output as it is generated, instead
-of waiting until the program has completed to print it out. It also
-checks the return value.
-
-C<system> also provides direct control over whether shell wildcard
-processing may take place, whereas backticks do not.
-
-=head2 How can I call backticks without shell processing?
-
-This is a bit tricky. You can't simply write the command
-like this:
-
- @ok = `grep @opts '$search_string' @filenames`;
-
-As of Perl 5.8.0, you can use C<open()> with multiple arguments.
-Just like the list forms of C<system()> and C<exec()>, no shell
-escapes happen.
-
- open( GREP, "-|", 'grep', @opts, $search_string, @filenames );
- chomp(@ok = <GREP>);
- close GREP;
-
-You can also:
-
- my @ok = ();
- if (open(GREP, "-|")) {
- while (<GREP>) {
- chomp;
- push(@ok, $_);
- }
- close GREP;
- } else {
- exec 'grep', @opts, $search_string, @filenames;
- }
-
-Just as with C<system()>, no shell escapes happen when you C<exec()> a
-list. Further examples of this can be found in L<perlipc/"Safe Pipe
-Opens">.
-
-Note that if you're using Windows, no solution to this vexing issue is
-even possible. Even though Perl emulates C<fork()>, you'll still be
-stuck, because Windows does not have an argc/argv-style API.
-
-=head2 Why can't my script read from STDIN after I gave it EOF (^D on Unix, ^Z on MS-DOS)?
-
-This happens only if your perl is compiled to use stdio instead of
-perlio, which is the default. Some (maybe all?) stdios set error and
-eof flags that you may need to clear. The C<POSIX> module defines
-C<clearerr()> that you can use. That is the technically correct way to
-do it. Here are some less reliable workarounds:
-
-=over 4
-
-=item 1
-
-Try keeping around the seekpointer and go there, like this:
-
- $where = tell(LOG);
- seek(LOG, $where, 0);
-
-=item 2
-
-If that doesn't work, try seeking to a different part of the file and
-then back.
-
-=item 3
-
-If that doesn't work, try seeking to a different part of
-the file, reading something, and then seeking back.
-
-=item 4
-
-If that doesn't work, give up on your stdio package and use sysread.
-
-=back
-
-=head2 How can I convert my shell script to perl?
-
-Learn Perl and rewrite it. Seriously, there's no simple converter.
-Things that are awkward to do in the shell are easy to do in Perl, and
-this very awkwardness is what would make a shell->perl converter
-nigh-on impossible to write. By rewriting it, you'll think about what
-you're really trying to do, and hopefully will escape the shell's
-pipeline datastream paradigm, which while convenient for some matters,
-causes many inefficiencies.
-
-=head2 Can I use perl to run a telnet or ftp session?
-
-Try the C<Net::FTP>, C<TCP::Client>, and C<Net::Telnet> modules
-(available from CPAN).
-http://www.cpan.org/scripts/netstuff/telnet.emul.shar will also help
-for emulating the telnet protocol, but C<Net::Telnet> is quite
-probably easier to use.
-
-If all you want to do is pretend to be telnet but don't need
-the initial telnet handshaking, then the standard dual-process
-approach will suffice:
-
- use IO::Socket; # new in 5.004
- $handle = IO::Socket::INET->new('www.perl.com:80')
- or die "can't connect to port 80 on www.perl.com: $!";
- $handle->autoflush(1);
- if (fork()) { # XXX: undef means failure
- select($handle);
- print while <STDIN>; # everything from stdin to socket
- } else {
- print while <$handle>; # everything from socket to stdout
- }
- close $handle;
- exit;
-
-=head2 How can I write expect in Perl?
-
-Once upon a time, there was a library called F<chat2.pl> (part of the
-standard perl distribution), which never really got finished. If you
-find it somewhere, I<don't use it>. These days, your best bet is to
-look at the Expect module available from CPAN, which also requires two
-other modules from CPAN, C<IO::Pty> and C<IO::Stty>.
-
-=head2 Is there a way to hide perl's command line from programs such as "ps"?
-
-First of all note that if you're doing this for security reasons (to
-avoid people seeing passwords, for example) then you should rewrite
-your program so that critical information is never given as an
-argument. Hiding the arguments won't make your program completely
-secure.
-
-To actually alter the visible command line, you can assign to the
-variable $0 as documented in L<perlvar>. This won't work on all
-operating systems, though. Daemon programs like sendmail place their
-state there, as in:
-
- $0 = "orcus [accepting connections]";
-
-=head2 I {changed directory, modified my environment} in a perl script. How come the change disappeared when I exited the script? How do I get my changes to be visible?
-
-=over 4
-
-=item Unix
-
-In the strictest sense, it can't be done--the script executes as a
-different process from the shell it was started from. Changes to a
-process are not reflected in its parent--only in any children
-created after the change. There is shell magic that may allow you to
-fake it by C<eval()>ing the script's output in your shell; check out the
-comp.unix.questions FAQ for details.
-
-=back
-
-=head2 How do I close a process's filehandle without waiting for it to complete?
-
-Assuming your system supports such things, just send an appropriate signal
-to the process (see L<perlfunc/"kill">). It's common to first send a TERM
-signal, wait a little bit, and then send a KILL signal to finish it off.
-
-=head2 How do I fork a daemon process?
-
-If by daemon process you mean one that's detached (disassociated from
-its tty), then the following process is reported to work on most
-Unixish systems. Non-Unix users should check their Your_OS::Process
-module for other solutions.
-
-=over 4
-
-=item *
-
-Open /dev/tty and use the TIOCNOTTY ioctl on it. See L<tty>
-for details. Or better yet, you can just use the C<POSIX::setsid()>
-function, so you don't have to worry about process groups.
-
-=item *
-
-Change directory to /
-
-=item *
-
-Reopen STDIN, STDOUT, and STDERR so they're not connected to the old
-tty.
-
-=item *
-
-Background yourself like this:
-
- fork && exit;
-
-=back
-
-The C<Proc::Daemon> module, available from CPAN, provides a function to
-perform these actions for you.
-
-=head2 How do I find out if I'm running interactively or not?
-
-(contributed by brian d foy)
-
-This is a difficult question to answer, and the best answer is
-only a guess.
-
-What do you really want to know? If you merely want to know if one of
-your filehandles is connected to a terminal, you can try the C<-t>
-file test:
-
- if( -t STDOUT ) {
- print "I'm connected to a terminal!\n";
- }
-
-However, you might be out of luck if you expect that means there is a
-real person on the other side. With the C<Expect> module, another
-program can pretend to be a person. The program might even come close
-to passing the Turing test.
-
-The C<IO::Interactive> module does the best it can to give you an
-answer. Its C<is_interactive> function returns an output filehandle;
-that filehandle points to standard output if the module thinks the
-session is interactive. Otherwise, the filehandle is a null handle
-that simply discards the output:
-
- use IO::Interactive;
-
- print { is_interactive } "I might go to standard output!\n";
-
-This still doesn't guarantee that a real person is answering your
-prompts or reading your output.
-
-If you want to know how to handle automated testing for your
-distribution, you can check the environment. The CPAN
-Testers, for instance, set the value of C<AUTOMATED_TESTING>:
-
- unless( $ENV{AUTOMATED_TESTING} ) {
- print "Hello interactive tester!\n";
- }
-
-=head2 How do I timeout a slow event?
-
-Use the C<alarm()> function, probably in conjunction with a signal
-handler, as documented in L<perlipc/"Signals"> and the section on
-"Signals" in the Camel. You may instead use the more flexible
-C<Sys::AlarmCall> module available from CPAN.
-
-The C<alarm()> function is not implemented on all versions of Windows.
-Check the documentation for your specific version of Perl.
-
-=head2 How do I set CPU limits?
-X<BSD::Resource> X<limit> X<CPU>
-
-(contributed by Xho)
-
-Use the C<BSD::Resource> module from CPAN. As an example:
-
- use BSD::Resource;
- setrlimit(RLIMIT_CPU,10,20) or die $!;
-
-This sets the soft and hard limits to 10 and 20 seconds, respectively.
-After 10 seconds of time spent running on the CPU (not "wall" time),
-the process will be sent a signal (XCPU on some systems) which, if not
-trapped, will cause the process to terminate. If that signal is
-trapped, then after 10 more seconds (20 seconds in total) the process
-will be killed with a non-trappable signal.
-
-See the C<BSD::Resource> and your systems documentation for the gory
-details.
-
-=head2 How do I avoid zombies on a Unix system?
-
-Use the reaper code from L<perlipc/"Signals"> to call C<wait()> when a
-SIGCHLD is received, or else use the double-fork technique described
-in L<perlfaq8/"How do I start a process in the background?">.
-
-=head2 How do I use an SQL database?
-
-The C<DBI> module provides an abstract interface to most database
-servers and types, including Oracle, DB2, Sybase, mysql, Postgresql,
-ODBC, and flat files. The DBI module accesses each database type
-through a database driver, or DBD. You can see a complete list of
-available drivers on CPAN: http://www.cpan.org/modules/by-module/DBD/ .
-You can read more about DBI on http://dbi.perl.org .
-
-Other modules provide more specific access: C<Win32::ODBC>, C<Alzabo>,
-C<iodbc>, and others found on CPAN Search: http://search.cpan.org .
-
-=head2 How do I make a system() exit on control-C?
-
-You can't. You need to imitate the C<system()> call (see L<perlipc> for
-sample code) and then have a signal handler for the INT signal that
-passes the signal on to the subprocess. Or you can check for it:
-
- $rc = system($cmd);
- if ($rc & 127) { die "signal death" }
-
-=head2 How do I open a file without blocking?
-
-If you're lucky enough to be using a system that supports
-non-blocking reads (most Unixish systems do), you need only to use the
-C<O_NDELAY> or C<O_NONBLOCK> flag from the C<Fcntl> module in conjunction with
-C<sysopen()>:
-
- use Fcntl;
- sysopen(FH, "/foo/somefile", O_WRONLY|O_NDELAY|O_CREAT, 0644)
- or die "can't open /foo/somefile: $!":
-
-=head2 How do I tell the difference between errors from the shell and perl?
-
-(answer contributed by brian d foy)
-
-When you run a Perl script, something else is running the script for you,
-and that something else may output error messages. The script might
-emit its own warnings and error messages. Most of the time you cannot
-tell who said what.
-
-You probably cannot fix the thing that runs perl, but you can change how
-perl outputs its warnings by defining a custom warning and die functions.
-
-Consider this script, which has an error you may not notice immediately.
-
- #!/usr/locl/bin/perl
-
- print "Hello World\n";
-
-I get an error when I run this from my shell (which happens to be
-bash). That may look like perl forgot it has a C<print()> function,
-but my shebang line is not the path to perl, so the shell runs the
-script, and I get the error.
-
- $ ./test
- ./test: line 3: print: command not found
-
-A quick and dirty fix involves a little bit of code, but this may be all
-you need to figure out the problem.
-
- #!/usr/bin/perl -w
-
- BEGIN {
- $SIG{__WARN__} = sub{ print STDERR "Perl: ", @_; };
- $SIG{__DIE__} = sub{ print STDERR "Perl: ", @_; exit 1};
- }
-
- $a = 1 + undef;
- $x / 0;
- __END__
-
-The perl message comes out with "Perl" in front. The C<BEGIN> block
-works at compile time so all of the compilation errors and warnings
-get the "Perl:" prefix too.
-
- Perl: Useless use of division (/) in void context at ./test line 9.
- Perl: Name "main::a" used only once: possible typo at ./test line 8.
- Perl: Name "main::x" used only once: possible typo at ./test line 9.
- Perl: Use of uninitialized value in addition (+) at ./test line 8.
- Perl: Use of uninitialized value in division (/) at ./test line 9.
- Perl: Illegal division by zero at ./test line 9.
- Perl: Illegal division by zero at -e line 3.
-
-If I don't see that "Perl:", it's not from perl.
-
-You could also just know all the perl errors, and although there are
-some people who may know all of them, you probably don't. However, they
-all should be in the L<perldiag> manpage. If you don't find the error in
-there, it probably isn't a perl error.
-
-Looking up every message is not the easiest way, so let perl to do it
-for you. Use the diagnostics pragma with turns perl's normal messages
-into longer discussions on the topic.
-
- use diagnostics;
-
-If you don't get a paragraph or two of expanded discussion, it
-might not be perl's message.
-
-=head2 How do I install a module from CPAN?
-
-(contributed by brian d foy)
-
-The easiest way is to have a module also named CPAN do it for you by using
-the C<cpan> command that comes with Perl. You can give it a list of modules
-to install:
-
- $ cpan IO::Interactive Getopt::Whatever
-
-If you prefer C<CPANPLUS>, it's just as easy:
-
- $ cpanp i IO::Interactive Getopt::Whatever
-
-If you want to install a distribution from the current directory, you can
-tell C<CPAN.pm> to install C<.> (the full stop):
-
- $ cpan .
-
-See the documentation for either of those commands to see what else
-you can do.
-
-If you want to try to install a distribution by yourself, resolving
-all dependencies on your own, you follow one of two possible build
-paths.
-
-For distributions that use I<Makefile.PL>:
-
- $ perl Makefile.PL
- $ make test install
-
-For distributions that use I<Build.PL>:
-
- $ perl Build.PL
- $ ./Build test
- $ ./Build install
-
-Some distributions may need to link to libraries or other third-party
-code and their build and installation sequences may be more complicated.
-Check any I<README> or I<INSTALL> files that you may find.
-
-=head2 What's the difference between require and use?
-
-(contributed by brian d foy)
-
-Perl runs C<require> statement at run-time. Once Perl loads, compiles,
-and runs the file, it doesn't do anything else. The C<use> statement
-is the same as a C<require> run at compile-time, but Perl also calls the
-C<import> method for the loaded package. These two are the same:
-
- use MODULE qw(import list);
-
- BEGIN {
- require MODULE;
- MODULE->import(import list);
- }
-
-However, you can suppress the C<import> by using an explicit, empty
-import list. Both of these still happen at compile-time:
-
- use MODULE ();
-
- BEGIN {
- require MODULE;
- }
-
-Since C<use> will also call the C<import> method, the actual value
-for C<MODULE> must be a bareword. That is, C<use> cannot load files
-by name, although C<require> can:
-
- require "$ENV{HOME}/lib/Foo.pm"; # no @INC searching!
-
-See the entry for C<use> in L<perlfunc> for more details.
-
-=head2 How do I keep my own module/library directory?
-
-When you build modules, tell Perl where to install the modules.
-
-If you want to install modules for your own use, the easiest way might
-be C<local::lib>, which you can download from CPAN. It sets various
-installation settings for you, and uses those same settings within
-your programs.
-
-If you want more flexibility, you need to configure your CPAN client
-for your particular situation.
-
-For C<Makefile.PL>-based distributions, use the INSTALL_BASE option
-when generating Makefiles:
-
- perl Makefile.PL INSTALL_BASE=/mydir/perl
-
-You can set this in your C<CPAN.pm> configuration so modules
-automatically install in your private library directory when you use
-the CPAN.pm shell:
-
- % cpan
- cpan> o conf makepl_arg INSTALL_BASE=/mydir/perl
- cpan> o conf commit
-
-For C<Build.PL>-based distributions, use the --install_base option:
-
- perl Build.PL --install_base /mydir/perl
-
-You can configure C<CPAN.pm> to automatically use this option too:
-
- % cpan
- cpan> o conf mbuild_arg "--install_base /mydir/perl"
- cpan> o conf commit
-
-INSTALL_BASE tells these tools to put your modules into
-F</mydir/perl/lib/perl5>. See L<How do I add a directory to my
-include path (@INC) at runtime?> for details on how to run your newly
-installed modules.
-
-There is one caveat with INSTALL_BASE, though, since it acts
-differently from the PREFIX and LIB settings that older versions of
-C<ExtUtils::MakeMaker> advocated. INSTALL_BASE does not support
-installing modules for multiple versions of Perl or different
-architectures under the same directory. You should consider whether you
-really want that and, if you do, use the older PREFIX and LIB
-settings. See the C<ExtUtils::Makemaker> documentation for more details.
-
-=head2 How do I add the directory my program lives in to the module/library search path?
-
-(contributed by brian d foy)
-
-If you know the directory already, you can add it to C<@INC> as you would
-for any other directory. You might <use lib> if you know the directory
-at compile time:
-
- use lib $directory;
-
-The trick in this task is to find the directory. Before your script does
-anything else (such as a C<chdir>), you can get the current working
-directory with the C<Cwd> module, which comes with Perl:
-
- BEGIN {
- use Cwd;
- our $directory = cwd;
- }
-
- use lib $directory;
-
-You can do a similar thing with the value of C<$0>, which holds the
-script name. That might hold a relative path, but C<rel2abs> can turn
-it into an absolute path. Once you have the
-
- BEGIN {
- use File::Spec::Functions qw(rel2abs);
- use File::Basename qw(dirname);
-
- my $path = rel2abs( $0 );
- our $directory = dirname( $path );
- }
-
- use lib $directory;
-
-The C<FindBin> module, which comes with Perl, might work. It finds the
-directory of the currently running script and puts it in C<$Bin>, which
-you can then use to construct the right library path:
-
- use FindBin qw($Bin);
-
-You can also use C<local::lib> to do much of the same thing. Install
-modules using C<local::lib>'s settings then use the module in your
-program:
-
- use local::lib; # sets up a local lib at ~/perl5
-
-See the C<local::lib> documentation for more details.
-
-=head2 How do I add a directory to my include path (@INC) at runtime?
-
-Here are the suggested ways of modifying your include path, including
-environment variables, run-time switches, and in-code statements:
-
-=over 4
-
-=item the C<PERLLIB> environment variable
-
- $ export PERLLIB=/path/to/my/dir
- $ perl program.pl
-
-=item the C<PERL5LIB> environment variable
-
- $ export PERL5LIB=/path/to/my/dir
- $ perl program.pl
-
-=item the C<perl -Idir> command line flag
-
- $ perl -I/path/to/my/dir program.pl
-
-=item the C<lib> pragma:
-
- use lib "$ENV{HOME}/myown_perllib";
-
-=item the C<local::lib> module:
-
- use local::lib;
-
- use local::lib "~/myown_perllib";
-
-=back
-
-The last is particularly useful because it knows about machine-dependent
-architectures. The C<lib.pm> pragmatic module was first
-included with the 5.002 release of Perl.
-
-=head2 What is socket.ph and where do I get it?
-
-It's a Perl 4 style file defining values for system networking
-constants. Sometimes it is built using C<h2ph> when Perl is installed,
-but other times it is not. Modern programs C<use Socket;> instead.
-
-=head1 AUTHOR AND COPYRIGHT
-
-Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
-other authors as noted. All rights reserved.
-
-This documentation is free; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-Irrespective of its distribution, all code examples in this file
-are hereby placed into the public domain. You are permitted and
-encouraged to use this code in your own programs for fun
-or for profit as you see fit. A simple comment in the code giving
-credit would be courteous but is not required.
Deleted: vendor/perl/dist/pod/perlfaq9.pod
===================================================================
--- vendor/perl/dist/pod/perlfaq9.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlfaq9.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,693 +0,0 @@
-=head1 NAME
-
-perlfaq9 - Networking
-
-=head1 DESCRIPTION
-
-This section deals with questions related to networking, the internet,
-and a few on the web.
-
-=head2 What is the correct form of response from a CGI script?
-
-(Alan Flavell <flavell+www at a5.ph.gla.ac.uk> answers...)
-
-The Common Gateway Interface (CGI) specifies a software interface between
-a program ("CGI script") and a web server (HTTPD). It is not specific
-to Perl, and has its own FAQs and tutorials, and usenet group,
-comp.infosystems.www.authoring.cgi
-
-The CGI specification is outlined in an informational RFC:
-http://www.ietf.org/rfc/rfc3875
-
-These Perl FAQs very selectively cover some CGI issues. However, Perl
-programmers are strongly advised to use the C<CGI.pm> module, to take care
-of the details for them.
-
-The similarity between CGI response headers (defined in the CGI
-specification) and HTTP response headers (defined in the HTTP
-specification, RFC2616) is intentional, but can sometimes be confusing.
-
-The CGI specification defines two kinds of script: the "Parsed Header"
-script, and the "Non Parsed Header" (NPH) script. Check your server
-documentation to see what it supports. "Parsed Header" scripts are
-simpler in various respects. The CGI specification allows any of the
-usual newline representations in the CGI response (it's the server's
-job to create an accurate HTTP response based on it). So "\n" written in
-text mode is technically correct, and recommended. NPH scripts are more
-tricky: they must put out a complete and accurate set of HTTP
-transaction response headers; the HTTP specification calls for records
-to be terminated with carriage-return and line-feed; i.e., ASCII \015\012
-written in binary mode.
-
-Using C<CGI.pm> gives excellent platform independence, including EBCDIC
-systems. C<CGI.pm> selects an appropriate newline representation
-(C<$CGI::CRLF>) and sets binmode as appropriate.
-
-=head2 My CGI script runs from the command line but not the browser. (500 Server Error)
-
-(contributed by brian d foy)
-
-There are many things that might be wrong with your CGI program, and only
-some of them might be related to Perl. Try going through the troubleshooting
-guide on Perlmonks:
-
- http://www.perlmonks.org/?node_id=380424
-
-=head2 How can I get better error messages from a CGI program?
-
-Use the C<CGI::Carp> module. It replaces C<warn> and C<die>, plus the
-normal C<Carp> module's C<carp>, C<croak>, and C<confess> functions with
-more verbose and safer versions. It still sends them to the normal
-server error log.
-
- use CGI::Carp;
- warn "This is a complaint";
- die "But this one is serious";
-
-The following use of C<CGI::Carp> also redirects errors to a file of your choice,
-placed in a C<BEGIN> block to catch compile-time warnings as well:
-
- BEGIN {
- use CGI::Carp qw(carpout);
- open(LOG, ">>/var/local/cgi-logs/mycgi-log")
- or die "Unable to append to mycgi-log: $!\n";
- carpout(*LOG);
- }
-
-You can even arrange for fatal errors to go back to the client browser,
-which is nice for your own debugging, but might confuse the end user.
-
- use CGI::Carp qw(fatalsToBrowser);
- die "Bad error here";
-
-Even if the error happens before you get the HTTP header out, the module
-will try to take care of this to avoid the dreaded server 500 errors.
-Normal warnings still go out to the server error log (or wherever
-you've sent them with C<carpout>) with the application name and date
-stamp prepended.
-
-=head2 How do I remove HTML from a string?
-
-The most correct way (albeit not the fastest) is to use C<HTML::Parser>
-from CPAN. Another mostly correct
-way is to use C<HTML::FormatText> which not only removes HTML but also
-attempts to do a little simple formatting of the resulting plain text.
-
-Many folks attempt a simple-minded regular expression approach, like
-C<< s/<.*?>//g >>, but that fails in many cases because the tags
-may continue over line breaks, they may contain quoted angle-brackets,
-or HTML comments may be present. Plus, folks forget to convert
-entities--like C<<> for example.
-
-Here's one "simple-minded" approach, that works for most files:
-
- #!/usr/bin/perl -p0777
- s/<(?:[^>'"]*|(['"]).*?\g1)*>//gs
-
-If you want a more complete solution, see the 3-stage striphtml
-program in
-http://www.cpan.org/authors/Tom_Christiansen/scripts/striphtml.gz
-.
-
-Here are some tricky cases that you should think about when picking
-a solution:
-
- <IMG SRC = "foo.gif" ALT = "A > B">
-
- <IMG SRC = "foo.gif"
- ALT = "A > B">
-
- <!-- <A comment> -->
-
- <script>if (a<b && a>c)</script>
-
- <# Just data #>
-
- <![INCLUDE CDATA [ >>>>>>>>>>>> ]]>
-
-If HTML comments include other tags, those solutions would also break
-on text like this:
-
- <!-- This section commented out.
- <B>You can't see me!</B>
- -->
-
-=head2 How do I extract URLs?
-
-You can easily extract all sorts of URLs from HTML with
-C<HTML::SimpleLinkExtor> which handles anchors, images, objects,
-frames, and many other tags that can contain a URL. If you need
-anything more complex, you can create your own subclass of
-C<HTML::LinkExtor> or C<HTML::Parser>. You might even use
-C<HTML::SimpleLinkExtor> as an example for something specifically
-suited to your needs.
-
-You can use C<URI::Find> to extract URLs from an arbitrary text document.
-
-Less complete solutions involving regular expressions can save
-you a lot of processing time if you know that the input is simple. One
-solution from Tom Christiansen runs 100 times faster than most
-module-based approaches but only extracts URLs from anchors where the first
-attribute is HREF and there are no other attributes.
-
- #!/usr/bin/perl -n00
- # qxurl - tchrist at perl.com
- print "$2\n" while m{
- < \s*
- A \s+ HREF \s* = \s* (["']) (.*?) \g1
- \s* >
- }gsix;
-
-=head2 How do I download a file from the user's machine? How do I open a file on another machine?
-
-In this case, download means to use the file upload feature of HTML
-forms. You allow the web surfer to specify a file to send to your web
-server. To you it looks like a download, and to the user it looks
-like an upload. No matter what you call it, you do it with what's
-known as B<multipart/form-data> encoding. The C<CGI.pm> module (which
-comes with Perl as part of the Standard Library) supports this in the
-C<start_multipart_form()> method, which isn't the same as the C<startform()>
-method.
-
-See the section in the C<CGI.pm> documentation on file uploads for code
-examples and details.
-
-=head2 How do I make an HTML pop-up menu with Perl?
-
-(contributed by brian d foy)
-
-The C<CGI.pm> module (which comes with Perl) has functions to create
-the HTML form widgets. See the C<CGI.pm> documentation for more
-examples.
-
- use CGI qw/:standard/;
- print header,
- start_html('Favorite Animals'),
-
- start_form,
- "What's your favorite animal? ",
- popup_menu(
- -name => 'animal',
- -values => [ qw( Llama Alpaca Camel Ram ) ]
- ),
- submit,
-
- end_form,
- end_html;
-
-=head2 How do I fetch an HTML file?
-
-(contributed by brian d foy)
-
-Use the libwww-perl distribution. The C<LWP::Simple> module can fetch web
-resources and give their content back to you as a string:
-
- use LWP::Simple qw(get);
-
- my $html = get( "http://www.example.com/index.html" );
-
-It can also store the resource directly in a file:
-
- use LWP::Simple qw(getstore);
-
- getstore( "http://www.example.com/index.html", "foo.html" );
-
-If you need to do something more complicated, you can use
-C<LWP::UserAgent> module to create your own user-agent (e.g. browser)
-to get the job done. If you want to simulate an interactive web
-browser, you can use the C<WWW::Mechanize> module.
-
-=head2 How do I automate an HTML form submission?
-
-If you are doing something complex, such as moving through many pages
-and forms or a web site, you can use C<WWW::Mechanize>. See its
-documentation for all the details.
-
-If you're submitting values using the GET method, create a URL and encode
-the form using the C<query_form> method:
-
- use LWP::Simple;
- use URI::URL;
-
- my $url = url('http://www.perl.com/cgi-bin/cpan_mod');
- $url->query_form(module => 'DB_File', readme => 1);
- $content = get($url);
-
-If you're using the POST method, create your own user agent and encode
-the content appropriately.
-
- use HTTP::Request::Common qw(POST);
- use LWP::UserAgent;
-
- $ua = LWP::UserAgent->new();
- my $req = POST 'http://www.perl.com/cgi-bin/cpan_mod',
- [ module => 'DB_File', readme => 1 ];
- $content = $ua->request($req)->as_string;
-
-=head2 How do I decode or create those %-encodings on the web?
-X<URI> X<CGI.pm> X<CGI> X<URI::Escape> X<RFC 2396>
-
-(contributed by brian d foy)
-
-Those C<%> encodings handle reserved characters in URIs, as described
-in RFC 2396, Section 2. This encoding replaces the reserved character
-with the hexadecimal representation of the character's number from
-the US-ASCII table. For instance, a colon, C<:>, becomes C<%3A>.
-
-In CGI scripts, you don't have to worry about decoding URIs if you are
-using C<CGI.pm>. You shouldn't have to process the URI yourself,
-either on the way in or the way out.
-
-If you have to encode a string yourself, remember that you should
-never try to encode an already-composed URI. You need to escape the
-components separately then put them together. To encode a string, you
-can use the C<URI::Escape> module. The C<uri_escape> function
-returns the escaped string:
-
- my $original = "Colon : Hash # Percent %";
-
- my $escaped = uri_escape( $original );
-
- print "$escaped\n"; # 'Colon%20%3A%20Hash%20%23%20Percent%20%25'
-
-To decode the string, use the C<uri_unescape> function:
-
- my $unescaped = uri_unescape( $escaped );
-
- print $unescaped; # back to original
-
-If you wanted to do it yourself, you simply need to replace the
-reserved characters with their encodings. A global substitution
-is one way to do it:
-
- # encode
- $string =~ s/([^^A-Za-z0-9\-_.!~*'()])/ sprintf "%%%0x", ord $1 /eg;
-
- #decode
- $string =~ s/%([A-Fa-f\d]{2})/chr hex $1/eg;
-
-=head2 How do I redirect to another page?
-
-Specify the complete URL of the destination (even if it is on the same
-server). This is one of the two different kinds of CGI "Location:"
-responses which are defined in the CGI specification for a Parsed Headers
-script. The other kind (an absolute URLpath) is resolved internally to
-the server without any HTTP redirection. The CGI specifications do not
-allow relative URLs in either case.
-
-Use of C<CGI.pm> is strongly recommended. This example shows redirection
-with a complete URL. This redirection is handled by the web browser.
-
- use CGI qw/:standard/;
-
- my $url = 'http://www.cpan.org/';
- print redirect($url);
-
-This example shows a redirection with an absolute URLpath. This
-redirection is handled by the local web server.
-
- my $url = '/CPAN/index.html';
- print redirect($url);
-
-But if coded directly, it could be as follows (the final "\n" is
-shown separately, for clarity), using either a complete URL or
-an absolute URLpath.
-
- print "Location: $url\n"; # CGI response header
- print "\n"; # end of headers
-
-=head2 How do I put a password on my web pages?
-
-To enable authentication for your web server, you need to configure
-your web server. The configuration is different for different sorts
-of web servers--apache does it differently from iPlanet which does
-it differently from IIS. Check your web server documentation for
-the details for your particular server.
-
-=head2 How do I edit my .htpasswd and .htgroup files with Perl?
-
-The C<HTTPD::UserAdmin> and C<HTTPD::GroupAdmin> modules provide a
-consistent OO interface to these files, regardless of how they're
-stored. Databases may be text, dbm, Berkeley DB or any database with
-a DBI compatible driver. C<HTTPD::UserAdmin> supports files used by the
-"Basic" and "Digest" authentication schemes. Here's an example:
-
- use HTTPD::UserAdmin ();
- HTTPD::UserAdmin
- ->new(DB => "/foo/.htpasswd")
- ->add($username => $password);
-
-=head2 How do I make sure users can't enter values into a form that cause my CGI script to do bad things?
-
-(contributed by brian d foy)
-
-You can't prevent people from sending your script bad data. Even if
-you add some client-side checks, people may disable them or bypass
-them completely. For instance, someone might use a module such as
-C<LWP> to access your CGI program. If you want to prevent data that
-try to use SQL injection or other sorts of attacks (and you should
-want to), you have to not trust any data that enter your program.
-
-The L<perlsec> documentation has general advice about data security.
-If you are using the C<DBI> module, use placeholder to fill in data.
-If you are running external programs with C<system> or C<exec>, use
-the list forms. There are many other precautions that you should take,
-too many to list here, and most of them fall under the category of not
-using any data that you don't intend to use. Trust no one.
-
-=head2 How do I parse a mail header?
-
-For a quick-and-dirty solution, try this solution derived
-from L<perlfunc/split>:
-
- $/ = '';
- $header = <MSG>;
- $header =~ s/\n\s+/ /g; # merge continuation lines
- %head = ( UNIX_FROM_LINE, split /^([-\w]+):\s*/m, $header );
-
-That solution doesn't do well if, for example, you're trying to
-maintain all the Received lines. A more complete approach is to use
-the C<Mail::Header> module from CPAN (part of the C<MailTools> package).
-
-=head2 How do I decode a CGI form?
-
-(contributed by brian d foy)
-
-Use the C<CGI.pm> module that comes with Perl. It's quick,
-it's easy, and it actually does quite a bit of work to
-ensure things happen correctly. It handles GET, POST, and
-HEAD requests, multipart forms, multivalued fields, query
-string and message body combinations, and many other things
-you probably don't want to think about.
-
-It doesn't get much easier: the C<CGI.pm> module automatically
-parses the input and makes each value available through the
-C<param()> function.
-
- use CGI qw(:standard);
-
- my $total = param( 'price' ) + param( 'shipping' );
-
- my @items = param( 'item' ); # multiple values, same field name
-
-If you want an object-oriented approach, C<CGI.pm> can do that too.
-
- use CGI;
-
- my $cgi = CGI->new();
-
- my $total = $cgi->param( 'price' ) + $cgi->param( 'shipping' );
-
- my @items = $cgi->param( 'item' );
-
-You might also try C<CGI::Minimal> which is a lightweight version
-of the same thing. Other CGI::* modules on CPAN might work better
-for you, too.
-
-Many people try to write their own decoder (or copy one from
-another program) and then run into one of the many "gotchas"
-of the task. It's much easier and less hassle to use C<CGI.pm>.
-
-=head2 How do I check a valid mail address?
-
-(partly contributed by Aaron Sherman)
-
-This isn't as simple a question as it sounds. There are two parts:
-
-a) How do I verify that an email address is correctly formatted?
-
-b) How do I verify that an email address targets a valid recipient?
-
-Without sending mail to the address and seeing whether there's a human
-on the other end to answer you, you cannot fully answer part I<b>, but
-either the C<Email::Valid> or the C<RFC::RFC822::Address> module will do
-both part I<a> and part I<b> as far as you can in real-time.
-
-If you want to just check part I<a> to see that the address is valid
-according to the mail header standard with a simple regular expression,
-you can have problems, because there are deliverable addresses that
-aren't RFC-2822 (the latest mail header standard) compliant, and
-addresses that aren't deliverable which, are compliant. However, the
-following will match valid RFC-2822 addresses that do not have comments,
-folding whitespace, or any other obsolete or non-essential elements.
-This I<just> matches the address itself:
-
- my $atom = qr{[a-zA-Z0-9_!#\$\%&'*+/=?\^`{}~|\-]+};
- my $dot_atom = qr{$atom(?:\.$atom)*};
- my $quoted = qr{"(?:\\[^\r\n]|[^\\"])*"};
- my $local = qr{(?:$dot_atom|$quoted)};
- my $quotedpair = qr{\\[\x00-\x09\x0B-\x0c\x0e-\x7e]};
- my $domain_lit = qr{\[(?:$quotedpair|[\x21-\x5a\x5e-\x7e])*\]};
- my $domain = qr{(?:$dot_atom|$domain_lit)};
- my $addr_spec = qr{$local\@$domain};
-
-Just match an address against C</^${addr_spec}$/> to see if it follows
-the RFC2822 specification. However, because it is impossible to be
-sure that such a correctly formed address is actually the correct way
-to reach a particular person or even has a mailbox associated with it,
-you must be very careful about how you use this.
-
-Our best advice for verifying a person's mail address is to have them
-enter their address twice, just as you normally do to change a
-password. This usually weeds out typos. If both versions match, send
-mail to that address with a personal message. If you get the message
-back and they've followed your directions, you can be reasonably
-assured that it's real.
-
-A related strategy that's less open to forgery is to give them a PIN
-(personal ID number). Record the address and PIN (best that it be a
-random one) for later processing. In the mail you send, ask them to
-include the PIN in their reply. But if it bounces, or the message is
-included via a "vacation" script, it'll be there anyway. So it's
-best to ask them to mail back a slight alteration of the PIN, such as
-with the characters reversed, one added or subtracted to each digit, etc.
-
-=head2 How do I decode a MIME/BASE64 string?
-
-The C<MIME-Base64> package (available from CPAN) handles this as well as
-the MIME/QP encoding. Decoding BASE64 becomes as simple as:
-
- use MIME::Base64;
- $decoded = decode_base64($encoded);
-
-The C<MIME-Tools> package (available from CPAN) supports extraction with
-decoding of BASE64 encoded attachments and content directly from email
-messages.
-
-If the string to decode is short (less than 84 bytes long)
-a more direct approach is to use the C<unpack()> function's "u"
-format after minor transliterations:
-
- tr#A-Za-z0-9+/##cd; # remove non-base64 chars
- tr#A-Za-z0-9+/# -_#; # convert to uuencoded format
- $len = pack("c", 32 + 0.75*length); # compute length byte
- print unpack("u", $len . $_); # uudecode and print
-
-=head2 How do I return the user's mail address?
-
-On systems that support getpwuid, the C<< $< >> variable, and the
-C<Sys::Hostname> module (which is part of the standard perl distribution),
-you can probably try using something like this:
-
- use Sys::Hostname;
- $address = sprintf('%s@%s', scalar getpwuid($<), hostname);
-
-Company policies on mail address can mean that this generates addresses
-that the company's mail system will not accept, so you should ask for
-users' mail addresses when this matters. Furthermore, not all systems
-on which Perl runs are so forthcoming with this information as is Unix.
-
-The C<Mail::Util> module from CPAN (part of the C<MailTools> package) provides a
-C<mailaddress()> function that tries to guess the mail address of the user.
-It makes a more intelligent guess than the code above, using information
-given when the module was installed, but it could still be incorrect.
-Again, the best way is often just to ask the user.
-
-=head2 How do I send mail?
-
-Use the C<sendmail> program directly:
-
- open(SENDMAIL, "|/usr/lib/sendmail -oi -t -odq")
- or die "Can't fork for sendmail: $!\n";
- print SENDMAIL <<"EOF";
- From: User Originating Mail <me\@host>
- To: Final Destination <you\@otherhost>
- Subject: A relevant subject line
-
- Body of the message goes here after the blank line
- in as many lines as you like.
- EOF
- close(SENDMAIL) or warn "sendmail didn't close nicely";
-
-The B<-oi> option prevents C<sendmail> from interpreting a line consisting
-of a single dot as "end of message". The B<-t> option says to use the
-headers to decide who to send the message to, and B<-odq> says to put
-the message into the queue. This last option means your message won't
-be immediately delivered, so leave it out if you want immediate
-delivery.
-
-Alternate, less convenient approaches include calling C<mail> (sometimes
-called C<mailx>) directly or simply opening up port 25 have having an
-intimate conversation between just you and the remote SMTP daemon,
-probably C<sendmail>.
-
-Or you might be able use the CPAN module C<Mail::Mailer>:
-
- use Mail::Mailer;
-
- $mailer = Mail::Mailer->new();
- $mailer->open({ From => $from_address,
- To => $to_address,
- Subject => $subject,
- })
- or die "Can't open: $!\n";
- print $mailer $body;
- $mailer->close();
-
-The C<Mail::Internet> module uses C<Net::SMTP> which is less Unix-centric than
-C<Mail::Mailer>, but less reliable. Avoid raw SMTP commands. There
-are many reasons to use a mail transport agent like C<sendmail>. These
-include queuing, MX records, and security.
-
-=head2 How do I use MIME to make an attachment to a mail message?
-
-This answer is extracted directly from the C<MIME::Lite> documentation.
-Create a multipart message (i.e., one with attachments).
-
- use MIME::Lite;
-
- ### Create a new multipart message:
- $msg = MIME::Lite->new(
- From =>'me at myhost.com',
- To =>'you at yourhost.com',
- Cc =>'some at other.com, some at more.com',
- Subject =>'A message with 2 parts...',
- Type =>'multipart/mixed'
- );
-
- ### Add parts (each "attach" has same arguments as "new"):
- $msg->attach(Type =>'TEXT',
- Data =>"Here's the GIF file you wanted"
- );
- $msg->attach(Type =>'image/gif',
- Path =>'aaa000123.gif',
- Filename =>'logo.gif'
- );
-
- $text = $msg->as_string;
-
-C<MIME::Lite> also includes a method for sending these things.
-
- $msg->send;
-
-This defaults to using L<sendmail> but can be customized to use
-SMTP via L<Net::SMTP>.
-
-=head2 How do I read mail?
-
-While you could use the C<Mail::Folder> module from CPAN (part of the
-C<MailFolder> package) or the C<Mail::Internet> module from CPAN (part
-of the C<MailTools> package), often a module is overkill. Here's a
-mail sorter.
-
- #!/usr/bin/perl
-
- my(@msgs, @sub);
- my $msgno = -1;
- $/ = ''; # paragraph reads
- while (<>) {
- if (/^From /m) {
- /^Subject:\s*(?:Re:\s*)*(.*)/mi;
- $sub[++$msgno] = lc($1) || '';
- }
- $msgs[$msgno] .= $_;
- }
- for my $i (sort { $sub[$a] cmp $sub[$b] || $a <=> $b } (0 .. $#msgs)) {
- print $msgs[$i];
- }
-
-Or more succinctly,
-
- #!/usr/bin/perl -n00
- # bysub2 - awkish sort-by-subject
- BEGIN { $msgno = -1 }
- $sub[++$msgno] = (/^Subject:\s*(?:Re:\s*)*(.*)/mi)[0] if /^From/m;
- $msg[$msgno] .= $_;
- END { print @msg[ sort { $sub[$a] cmp $sub[$b] || $a <=> $b } (0 .. $#msg) ] }
-
-=head2 How do I find out my hostname, domainname, or IP address?
-X<hostname, domainname, IP address, host, domain, hostfqdn, inet_ntoa,
-gethostbyname, Socket, Net::Domain, Sys::Hostname>
-
-(contributed by brian d foy)
-
-The C<Net::Domain> module, which is part of the standard distribution starting
-in perl5.7.3, can get you the fully qualified domain name (FQDN), the host
-name, or the domain name.
-
- use Net::Domain qw(hostname hostfqdn hostdomain);
-
- my $host = hostfqdn();
-
-The C<Sys::Hostname> module, included in the standard distribution since
-perl5.6, can also get the hostname.
-
- use Sys::Hostname;
-
- $host = hostname();
-
-To get the IP address, you can use the C<gethostbyname> built-in function
-to turn the name into a number. To turn that number into the dotted octet
-form (a.b.c.d) that most people expect, use the C<inet_ntoa> function
-from the C<Socket> module, which also comes with perl.
-
- use Socket;
-
- my $address = inet_ntoa(
- scalar gethostbyname( $host || 'localhost' )
- );
-
-=head2 How do I fetch a news article or the active newsgroups?
-
-Use the C<Net::NNTP> or C<News::NNTPClient> modules, both available from CPAN.
-This can make tasks like fetching the newsgroup list as simple as
-
- perl -MNews::NNTPClient
- -e 'print News::NNTPClient->new->list("newsgroups")'
-
-=head2 How do I fetch/put an FTP file?
-
-(contributed by brian d foy)
-
-The C<LWP> family of modules (available on CPAN as the libwww-perl distribution)
-can work with FTP just like it can with many other protocols. C<LWP::Simple>
-makes it quite easy to fetch a file:
-
- use LWP::Simple;
-
- my $data = get( 'ftp://some.ftp.site/some/file.txt' );
-
-If you want more direct or low-level control of the FTP process, you can use
-the C<Net::FTP> module (in the Standard Library since Perl 5.8). It's
-documentation has examples showing you just how to do that.
-
-=head2 How can I do RPC in Perl?
-
-(contributed by brian d foy)
-
-Use one of the RPC modules you can find on CPAN (
-http://search.cpan.org/search?query=RPC&mode=all ).
-
-=head1 AUTHOR AND COPYRIGHT
-
-Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
-other authors as noted. All rights reserved.
-
-This documentation is free; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-Irrespective of its distribution, all code examples in this file
-are hereby placed into the public domain. You are permitted and
-encouraged to use this code in your own programs for fun
-or for profit as you see fit. A simple comment in the code giving
-credit would be courteous but is not required.
Deleted: vendor/perl/dist/pod/perlglossary.pod
===================================================================
--- vendor/perl/dist/pod/perlglossary.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlglossary.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,3430 +0,0 @@
-=head1 NAME
-
-perlglossary - Perl Glossary
-
-=head1 DESCRIPTION
-
-A glossary of terms (technical and otherwise) used in the Perl documentation.
-Other useful sources include the Free On-Line Dictionary of Computing
-L<http://foldoc.doc.ic.ac.uk/foldoc/index.html>, the Jargon File
-L<http://catb.org/~esr/jargon/>, and Wikipedia L<http://www.wikipedia.org/>.
-
-=head2 A
-
-=over 4
-
-=item accessor methods
-
-A L</method> used to indirectly inspect or update an L</object>'s
-state (its L<instance variables|/instance variable>).
-
-=item actual arguments
-
-The L<scalar values|/scalar value> that you supply to a L</function>
-or L</subroutine> when you call it. For instance, when you call
-C<power("puff")>, the string C<"puff"> is the actual argument. See
-also L</argument> and L</formal arguments>.
-
-=item address operator
-
-Some languages work directly with the memory addresses of values, but
-this can be like playing with fire. Perl provides a set of asbestos
-gloves for handling all memory management. The closest to an address
-operator in Perl is the backslash operator, but it gives you a L</hard
-reference>, which is much safer than a memory address.
-
-=item algorithm
-
-A well-defined sequence of steps, clearly enough explained that even a
-computer could do them.
-
-=item alias
-
-A nickname for something, which behaves in all ways as though you'd
-used the original name instead of the nickname. Temporary aliases are
-implicitly created in the loop variable for C<foreach> loops, in the
-C<$_> variable for L<map|perlfunc/map> or L<grep|perlfunc/grep>
-operators, in C<$a> and C<$b> during L<sort|perlfunc/sort>'s
-comparison function, and in each element of C<@_> for the L</actual
-arguments> of a subroutine call. Permanent aliases are explicitly
-created in L<packages|/package> by L<importing|/import> symbols or by
-assignment to L<typeglobs|/typeglob>. Lexically scoped aliases for
-package variables are explicitly created by the L<our|perlfunc/our>
-declaration.
-
-=item alternatives
-
-A list of possible choices from which you may select only one, as in
-"Would you like door A, B, or C?" Alternatives in regular expressions
-are separated with a single vertical bar: C<|>. Alternatives in
-normal Perl expressions are separated with a double vertical bar:
-C<||>. Logical alternatives in L</Boolean> expressions are separated
-with either C<||> or C<or>.
-
-=item anonymous
-
-Used to describe a L</referent> that is not directly accessible
-through a named L</variable>. Such a referent must be indirectly
-accessible through at least one L</hard reference>. When the last
-hard reference goes away, the anonymous referent is destroyed without
-pity.
-
-=item architecture
-
-The kind of computer you're working on, where one "kind" of computer
-means all those computers sharing a compatible machine language.
-Since Perl programs are (typically) simple text files, not executable
-images, a Perl program is much less sensitive to the architecture it's
-running on than programs in other languages, such as C, that are
-compiled into machine code. See also L</platform> and L</operating
-system>.
-
-=item argument
-
-A piece of data supplied to a L<program|/executable file>,
-L</subroutine>, L</function>, or L</method> to tell it what it's
-supposed to do. Also called a "parameter".
-
-=item ARGV
-
-The name of the array containing the L</argument> L</vector> from the
-command line. If you use the empty C<< E<lt>E<gt> >> operator, L</ARGV> is
-the name of both the L</filehandle> used to traverse the arguments and
-the L</scalar> containing the name of the current input file.
-
-=item arithmetical operator
-
-A L</symbol> such as C<+> or C</> that tells Perl to do the arithmetic
-you were supposed to learn in grade school.
-
-=item array
-
-An ordered sequence of L<values|/value>, stored such that you can
-easily access any of the values using an integer L</subscript>
-that specifies the value's L</offset> in the sequence.
-
-=item array context
-
-An archaic expression for what is more correctly referred to as
-L</list context>.
-
-=item ASCII
-
-The American Standard Code for Information Interchange (a 7-bit
-character set adequate only for poorly representing English text).
-Often used loosely to describe the lowest 128 values of the various
-ISO-8859-X character sets, a bunch of mutually incompatible 8-bit
-codes sometimes described as half ASCII. See also L</Unicode>.
-
-=item assertion
-
-A component of a L</regular expression> that must be true for the
-pattern to match but does not necessarily match any characters itself.
-Often used specifically to mean a L</zero width> assertion.
-
-=item assignment
-
-An L</operator> whose assigned mission in life is to change the value
-of a L</variable>.
-
-=item assignment operator
-
-Either a regular L</assignment>, or a compound L</operator> composed
-of an ordinary assignment and some other operator, that changes the
-value of a variable in place, that is, relative to its old value. For
-example, C<$a += 2> adds C<2> to C<$a>.
-
-=item associative array
-
-See L</hash>. Please.
-
-=item associativity
-
-Determines whether you do the left L</operator> first or the right
-L</operator> first when you have "A L</operator> B L</operator> C" and
-the two operators are of the same precedence. Operators like C<+> are
-left associative, while operators like C<**> are right associative.
-See L<perlop> for a list of operators and their associativity.
-
-=item asynchronous
-
-Said of events or activities whose relative temporal ordering is
-indeterminate because too many things are going on at once. Hence, an
-asynchronous event is one you didn't know when to expect.
-
-=item atom
-
-A L</regular expression> component potentially matching a
-L</substring> containing one or more characters and treated as an
-indivisible syntactic unit by any following L</quantifier>. (Contrast
-with an L</assertion> that matches something of L</zero width> and may
-not be quantified.)
-
-=item atomic operation
-
-When Democritus gave the word "atom" to the indivisible bits of
-matter, he meant literally something that could not be cut: I<a->
-(not) + I<tomos> (cuttable). An atomic operation is an action that
-can't be interrupted, not one forbidden in a nuclear-free zone.
-
-=item attribute
-
-A new feature that allows the declaration of L<variables|/variable>
-and L<subroutines|/subroutine> with modifiers as in C<sub foo : locked
-method>. Also, another name for an L</instance variable> of an
-L</object>.
-
-=item autogeneration
-
-A feature of L</operator overloading> of L<objects|/object>, whereby
-the behavior of certain L<operators|/operator> can be reasonably
-deduced using more fundamental operators. This assumes that the
-overloaded operators will often have the same relationships as the
-regular operators. See L<perlop>.
-
-=item autoincrement
-
-To add one to something automatically, hence the name of the C<++>
-operator. To instead subtract one from something automatically is
-known as an "autodecrement".
-
-=item autoload
-
-To load on demand. (Also called "lazy" loading.) Specifically, to
-call an L<AUTOLOAD|perlsub/Autoloading> subroutine on behalf of an
-undefined subroutine.
-
-=item autosplit
-
-To split a string automatically, as the B<-a> L</switch> does when
-running under B<-p> or B<-n> in order to emulate L</awk>. (See also
-the L<AutoSplit> module, which has nothing to do with the B<-a>
-switch, but a lot to do with autoloading.)
-
-=item autovivification
-
-A Greco-Roman word meaning "to bring oneself to life". In Perl,
-storage locations (L<lvalues|/lvalue>) spontaneously generate
-themselves as needed, including the creation of any L</hard reference>
-values to point to the next level of storage. The assignment
-C<$a[5][5][5][5][5] = "quintet"> potentially creates five scalar
-storage locations, plus four references (in the first four scalar
-locations) pointing to four new anonymous arrays (to hold the last
-four scalar locations). But the point of autovivification is that you
-don't have to worry about it.
-
-=item AV
-
-Short for "array value", which refers to one of Perl's internal data
-types that holds an L</array>. The L</AV> type is a subclass of
-L</SV>.
-
-=item awk
-
-Descriptive editing term--short for "awkward". Also coincidentally
-refers to a venerable text-processing language from which Perl derived
-some of its high-level ideas.
-
-=back
-
-=head2 B
-
-=over 4
-
-=item backreference
-
-A substring L<captured|/capturing> by a subpattern within
-unadorned parentheses in a L</regex>, also referred to as a capture group. The
-sequences (C<\g1>, C<\g2>, etc.) later in the same pattern refer back to
-the corresponding subpattern in the current match. Outside the pattern,
-the numbered variables (C<$1>, C<$2>, etc.) continue to refer to these
-same values, as long as the pattern was the last successful match of
-the current dynamic scope. C<\g{-1}> can be used to refer to a group by
-relative rather than absolute position; and groups can be also be named, and
-referred to later by name rather than number. See L<perlre/"Capture groups">.
-
-=item backtracking
-
-The practice of saying, "If I had to do it all over, I'd do it
-differently," and then actually going back and doing it all over
-differently. Mathematically speaking, it's returning from an
-unsuccessful recursion on a tree of possibilities. Perl backtracks
-when it attempts to match patterns with a L</regular expression>, and
-its earlier attempts don't pan out. See L<perlre/Backtracking>.
-
-=item backward compatibility
-
-Means you can still run your old program because we didn't break any
-of the features or bugs it was relying on.
-
-=item bareword
-
-A word sufficiently ambiguous to be deemed illegal under L<use strict
-'subs'|strict/strict subs>. In the absence of that stricture, a
-bareword is treated as if quotes were around it.
-
-=item base class
-
-A generic L</object> type; that is, a L</class> from which other, more
-specific classes are derived genetically by L</inheritance>. Also
-called a "superclass" by people who respect their ancestors.
-
-=item big-endian
-
-From Swift: someone who eats eggs big end first. Also used of
-computers that store the most significant L</byte> of a word at a
-lower byte address than the least significant byte. Often considered
-superior to little-endian machines. See also L</little-endian>.
-
-=item binary
-
-Having to do with numbers represented in base 2. That means there's
-basically two numbers, 0 and 1. Also used to describe a "non-text
-file", presumably because such a file makes full use of all the binary
-bits in its bytes. With the advent of L</Unicode>, this distinction,
-already suspect, loses even more of its meaning.
-
-=item binary operator
-
-An L</operator> that takes two L<operands|/operand>.
-
-=item bind
-
-To assign a specific L</network address> to a L</socket>.
-
-=item bit
-
-An integer in the range from 0 to 1, inclusive. The smallest possible
-unit of information storage. An eighth of a L</byte> or of a dollar.
-(The term "Pieces of Eight" comes from being able to split the old
-Spanish dollar into 8 bits, each of which still counted for money.
-That's why a 25-cent piece today is still "two bits".)
-
-=item bit shift
-
-The movement of bits left or right in a computer word, which has the
-effect of multiplying or dividing by a power of 2.
-
-=item bit string
-
-A sequence of L<bits|/bit> that is actually being thought of as a
-sequence of bits, for once.
-
-=item bless
-
-In corporate life, to grant official approval to a thing, as in, "The
-VP of Engineering has blessed our WebCruncher project." Similarly in
-Perl, to grant official approval to a L</referent> so that it can
-function as an L</object>, such as a WebCruncher object. See
-L<perlfunc/"bless">.
-
-=item block
-
-What a L</process> does when it has to wait for something: "My process
-blocked waiting for the disk." As an unrelated noun, it refers to a
-large chunk of data, of a size that the L</operating system> likes to
-deal with (normally a power of two such as 512 or 8192). Typically
-refers to a chunk of data that's coming from or going to a disk file.
-
-=item BLOCK
-
-A syntactic construct consisting of a sequence of Perl
-L<statements|/statement> that is delimited by braces. The C<if> and
-C<while> statements are defined in terms of L<BLOCKs|/BLOCK>, for instance.
-Sometimes we also say "block" to mean a lexical scope; that is, a
-sequence of statements that act like a L</BLOCK>, such as within an
-L<eval|perlfunc/eval> or a file, even though the statements aren't
-delimited by braces.
-
-=item block buffering
-
-A method of making input and output efficient by passing one L</block>
-at a time. By default, Perl does block buffering to disk files. See
-L</buffer> and L</command buffering>.
-
-=item Boolean
-
-A value that is either L</true> or L</false>.
-
-=item Boolean context
-
-A special kind of L</scalar context> used in conditionals to decide
-whether the L</scalar value> returned by an expression is L</true> or
-L</false>. Does not evaluate as either a string or a number. See
-L</context>.
-
-=item breakpoint
-
-A spot in your program where you've told the debugger to stop
-L<execution|/execute> so you can poke around and see whether anything
-is wrong yet.
-
-=item broadcast
-
-To send a L</datagram> to multiple destinations simultaneously.
-
-=item BSD
-
-A psychoactive drug, popular in the 80s, probably developed at
-U. C. Berkeley or thereabouts. Similar in many ways to the
-prescription-only medication called "System V", but infinitely more
-useful. (Or, at least, more fun.) The full chemical name is
-"Berkeley Standard Distribution".
-
-=item bucket
-
-A location in a L</hash table> containing (potentially) multiple
-entries whose keys "hash" to the same hash value according to its hash
-function. (As internal policy, you don't have to worry about it,
-unless you're into internals, or policy.)
-
-=item buffer
-
-A temporary holding location for data. L<Block buffering|/block
-buffering> means that the data is passed on to its destination
-whenever the buffer is full. L<Line buffering|/line buffering> means
-that it's passed on whenever a complete line is received. L<Command
-buffering|/command buffering> means that it's passed every time you do
-a L<print|perlfunc/print> command (or equivalent). If your output is
-unbuffered, the system processes it one byte at a time without the use
-of a holding area. This can be rather inefficient.
-
-=item built-in
-
-A L</function> that is predefined in the language. Even when hidden
-by L</overriding>, you can always get at a built-in function by
-L<qualifying|/qualified> its name with the C<CORE::> pseudo-package.
-
-=item bundle
-
-A group of related modules on L</CPAN>. (Also, sometimes refers to a
-group of command-line switches grouped into one L</switch cluster>.)
-
-=item byte
-
-A piece of data worth eight L<bits|/bit> in most places.
-
-=item bytecode
-
-A pidgin-like language spoken among 'droids when they don't wish to
-reveal their orientation (see L</endian>). Named after some similar
-languages spoken (for similar reasons) between compilers and
-interpreters in the late 20th century. These languages are
-characterized by representing everything as a
-non-architecture-dependent sequence of bytes.
-
-=back
-
-=head2 C
-
-=over 4
-
-=item C
-
-A language beloved by many for its inside-out L</type> definitions,
-inscrutable L</precedence> rules, and heavy L</overloading> of the
-function-call mechanism. (Well, actually, people first switched to C
-because they found lowercase identifiers easier to read than upper.)
-Perl is written in C, so it's not surprising that Perl borrowed a few
-ideas from it.
-
-=item C preprocessor
-
-The typical C compiler's first pass, which processes lines beginning
-with C<#> for conditional compilation and macro definition and does
-various manipulations of the program text based on the current
-definitions. Also known as I<cpp>(1).
-
-=item call by reference
-
-An L</argument>-passing mechanism in which the L</formal arguments>
-refer directly to the L</actual arguments>, and the L</subroutine> can
-change the actual arguments by changing the formal arguments. That
-is, the formal argument is an L</alias> for the actual argument. See
-also L</call by value>.
-
-=item call by value
-
-An L</argument>-passing mechanism in which the L</formal arguments>
-refer to a copy of the L</actual arguments>, and the L</subroutine>
-cannot change the actual arguments by changing the formal arguments.
-See also L</call by reference>.
-
-=item callback
-
-A L</handler> that you register with some other part of your program
-in the hope that the other part of your program will L</trigger> your
-handler when some event of interest transpires.
-
-=item canonical
-
-Reduced to a standard form to facilitate comparison.
-
-=item capture buffer, capture group
-
-These two terms are synonymous:
-a L<captured substring|/capturing> by a regex subpattern.
-
-=item capturing
-
-The use of parentheses around a L</subpattern> in a L</regular
-expression> to store the matched L</substring> as a L</backreference>
-or L<capture group|/capture buffer, capture group>.
-(Captured strings are also returned as a list in L</list context>.)
-
-=item character
-
-A small integer representative of a unit of orthography.
-Historically, characters were usually stored as fixed-width integers
-(typically in a byte, or maybe two, depending on the character set),
-but with the advent of UTF-8, characters are often stored in a
-variable number of bytes depending on the size of the integer that
-represents the character. Perl manages this transparently for you,
-for the most part.
-
-=item character class
-
-A square-bracketed list of characters used in a L</regular expression>
-to indicate that any character of the set may occur at a given point.
-Loosely, any predefined set of characters so used.
-
-=item character property
-
-A predefined L</character class> matchable by the C<\p>
-L</metasymbol>. Many standard properties are defined for L</Unicode>.
-
-=item circumfix operator
-
-An L</operator> that surrounds its L</operand>, like the angle
-operator, or parentheses, or a hug.
-
-=item class
-
-A user-defined L</type>, implemented in Perl via a L</package> that
-provides (either directly or by inheritance) L<methods|/method> (that
-is, L<subroutines|/subroutine>) to handle L<instances|/instance> of
-the class (its L<objects|/object>). See also L</inheritance>.
-
-=item class method
-
-A L</method> whose L</invocand> is a L</package> name, not an
-L</object> reference. A method associated with the class as a whole.
-
-=item client
-
-In networking, a L</process> that initiates contact with a L</server>
-process in order to exchange data and perhaps receive a service.
-
-=item cloister
-
-A L</cluster> used to restrict the scope of a L</regular expression
-modifier>.
-
-=item closure
-
-An L</anonymous> subroutine that, when a reference to it is generated
-at run time, keeps track of the identities of externally visible
-L<lexical variables|/lexical variable> even after those lexical
-variables have supposedly gone out of L</scope>. They're called
-"closures" because this sort of behavior gives mathematicians a sense
-of closure.
-
-=item cluster
-
-A parenthesized L</subpattern> used to group parts of a L</regular
-expression> into a single L</atom>.
-
-=item CODE
-
-The word returned by the L<ref|perlfunc/ref> function when you apply
-it to a reference to a subroutine. See also L</CV>.
-
-=item code generator
-
-A system that writes code for you in a low-level language, such as
-code to implement the backend of a compiler. See L</program
-generator>.
-
-=item code point
-
-The position of a character in a character set encoding. The character
-C<NULL> is almost certainly at the zeroth position in all character
-sets, so its code point is 0. The code point for the C<SPACE>
-character in the ASCII character set is 0x20, or 32 decimal; in EBCDIC
-it is 0x40, or 64 decimal. The L<ord|perlfunc/ord> function returns
-the code point of a character.
-
-"code position" and "ordinal" mean the same thing as "code point".
-
-=item code subpattern
-
-A L</regular expression> subpattern whose real purpose is to execute
-some Perl code, for example, the C<(?{...})> and C<(??{...})>
-subpatterns.
-
-=item collating sequence
-
-The order into which L<characters|/character> sort. This is used by
-L</string> comparison routines to decide, for example, where in this
-glossary to put "collating sequence".
-
-=item command
-
-In L</shell> programming, the syntactic combination of a program name
-and its arguments. More loosely, anything you type to a shell (a
-command interpreter) that starts it doing something. Even more
-loosely, a Perl L</statement>, which might start with a L</label> and
-typically ends with a semicolon.
-
-=item command buffering
-
-A mechanism in Perl that lets you store up the output of each Perl
-L</command> and then flush it out as a single request to the
-L</operating system>. It's enabled by setting the C<$|>
-(C<$AUTOFLUSH>) variable to a true value. It's used when you don't
-want data sitting around not going where it's supposed to, which may
-happen because the default on a L</file> or L</pipe> is to use
-L</block buffering>.
-
-=item command name
-
-The name of the program currently executing, as typed on the command
-line. In C, the L</command> name is passed to the program as the
-first command-line argument. In Perl, it comes in separately as
-C<$0>.
-
-=item command-line arguments
-
-The L<values|/value> you supply along with a program name when you
-tell a L</shell> to execute a L</command>. These values are passed to
-a Perl program through C<@ARGV>.
-
-=item comment
-
-A remark that doesn't affect the meaning of the program. In Perl, a
-comment is introduced by a C<#> character and continues to the end of
-the line.
-
-=item compilation unit
-
-The L</file> (or L</string>, in the case of L<eval|perlfunc/eval>)
-that is currently being compiled.
-
-=item compile phase
-
-Any time before Perl starts running your main program. See also
-L</run phase>. Compile phase is mostly spent in L</compile time>, but
-may also be spent in L</run time> when C<BEGIN> blocks,
-L<use|perlfunc/use> declarations, or constant subexpressions are being
-evaluated. The startup and import code of any L<use|perlfunc/use>
-declaration is also run during compile phase.
-
-=item compile time
-
-The time when Perl is trying to make sense of your code, as opposed to
-when it thinks it knows what your code means and is merely trying to
-do what it thinks your code says to do, which is L</run time>.
-
-=item compiler
-
-Strictly speaking, a program that munches up another program and spits
-out yet another file containing the program in a "more executable"
-form, typically containing native machine instructions. The I<perl>
-program is not a compiler by this definition, but it does contain a
-kind of compiler that takes a program and turns it into a more
-executable form (L<syntax trees|/syntax tree>) within the I<perl>
-process itself, which the L</interpreter> then interprets. There are,
-however, extension L<modules|/module> to get Perl to act more like a
-"real" compiler. See L<O>.
-
-=item composer
-
-A "constructor" for a L</referent> that isn't really an L</object>,
-like an anonymous array or a hash (or a sonata, for that matter). For
-example, a pair of braces acts as a composer for a hash, and a pair of
-brackets acts as a composer for an array. See L<perlref/Making
-References>.
-
-=item concatenation
-
-The process of gluing one cat's nose to another cat's tail. Also, a
-similar operation on two L<strings|/string>.
-
-=item conditional
-
-Something "iffy". See L</Boolean context>.
-
-=item connection
-
-In telephony, the temporary electrical circuit between the caller's
-and the callee's phone. In networking, the same kind of temporary
-circuit between a L</client> and a L</server>.
-
-=item construct
-
-As a noun, a piece of syntax made up of smaller pieces. As a
-transitive verb, to create an L</object> using a L</constructor>.
-
-=item constructor
-
-Any L</class method>, instance L</method>, or L</subroutine>
-that composes, initializes, blesses, and returns an L</object>.
-Sometimes we use the term loosely to mean a L</composer>.
-
-=item context
-
-The surroundings, or environment. The context given by the
-surrounding code determines what kind of data a particular
-L</expression> is expected to return. The three primary contexts are
-L</list context>, L</scalar context>, and L</void context>. Scalar
-context is sometimes subdivided into L</Boolean context>, L</numeric
-context>, L</string context>, and L</void context>. There's also a
-"don't care" scalar context (which is dealt with in Programming Perl,
-Third Edition, Chapter 2, "Bits and Pieces" if you care).
-
-=item continuation
-
-The treatment of more than one physical L</line> as a single logical
-line. L</Makefile> lines are continued by putting a backslash before
-the L</newline>. Mail headers as defined by RFC 822 are continued by
-putting a space or tab I<after> the newline. In general, lines in
-Perl do not need any form of continuation mark, because L</whitespace>
-(including newlines) is gleefully ignored. Usually.
-
-=item core dump
-
-The corpse of a L</process>, in the form of a file left in the
-L</working directory> of the process, usually as a result of certain
-kinds of fatal error.
-
-=item CPAN
-
-The Comprehensive Perl Archive Network. (See L<perlfaq2/What modules and extensions are available for Perl? What is CPAN? What does CPANE<sol>srcE<sol>... mean?>).
-
-=item cracker
-
-Someone who breaks security on computer systems. A cracker may be a
-true L</hacker> or only a L</script kiddie>.
-
-=item current package
-
-The L</package> in which the current statement is compiled. Scan
-backwards in the text of your program through the current L<lexical
-scope|/lexical scoping> or any enclosing lexical scopes till you find
-a package declaration. That's your current package name.
-
-=item current working directory
-
-See L</working directory>.
-
-=item currently selected output channel
-
-The last L</filehandle> that was designated with
-L<select|perlfunc/select>(C<FILEHANDLE>); L</STDOUT>, if no filehandle
-has been selected.
-
-=item CV
-
-An internal "code value" typedef, holding a L</subroutine>. The L</CV>
-type is a subclass of L</SV>.
-
-=back
-
-=head2 D
-
-=over 4
-
-=item dangling statement
-
-A bare, single L</statement>, without any braces, hanging off an C<if>
-or C<while> conditional. C allows them. Perl doesn't.
-
-=item data structure
-
-How your various pieces of data relate to each other and what shape
-they make when you put them all together, as in a rectangular table or
-a triangular-shaped tree.
-
-=item data type
-
-A set of possible values, together with all the operations that know
-how to deal with those values. For example, a numeric data type has a
-certain set of numbers that you can work with and various mathematical
-operations that you can do on the numbers but would make little sense
-on, say, a string such as C<"Kilroy">. Strings have their own
-operations, such as L</concatenation>. Compound types made of a
-number of smaller pieces generally have operations to compose and
-decompose them, and perhaps to rearrange them. L<Objects|/object>
-that model things in the real world often have operations that
-correspond to real activities. For instance, if you model an
-elevator, your elevator object might have an C<open_door()>
-L</method>.
-
-=item datagram
-
-A packet of data, such as a L</UDP> message, that (from the viewpoint
-of the programs involved) can be sent independently over the network.
-(In fact, all packets are sent independently at the L</IP> level, but
-L</stream> protocols such as L</TCP> hide this from your program.)
-
-=item DBM
-
-Stands for "Data Base Management" routines, a set of routines that
-emulate an L</associative array> using disk files. The routines use a
-dynamic hashing scheme to locate any entry with only two disk
-accesses. DBM files allow a Perl program to keep a persistent
-L</hash> across multiple invocations. You can L<tie|perlfunc/tie>
-your hash variables to various DBM implementations--see L<AnyDBM_File>
-and L<DB_File>.
-
-=item declaration
-
-An L</assertion> that states something exists and perhaps describes
-what it's like, without giving any commitment as to how or where
-you'll use it. A declaration is like the part of your recipe that
-says, "two cups flour, one large egg, four or five tadpoles..." See
-L</statement> for its opposite. Note that some declarations also
-function as statements. Subroutine declarations also act as
-definitions if a body is supplied.
-
-=item decrement
-
-To subtract a value from a variable, as in "decrement C<$x>" (meaning
-to remove 1 from its value) or "decrement C<$x> by 3".
-
-=item default
-
-A L</value> chosen for you if you don't supply a value of your own.
-
-=item defined
-
-Having a meaning. Perl thinks that some of the things people try to
-do are devoid of meaning, in particular, making use of variables that
-have never been given a L</value> and performing certain operations on
-data that isn't there. For example, if you try to read data past the
-end of a file, Perl will hand you back an undefined value. See also
-L</false> and L<perlfunc/defined>.
-
-=item delimiter
-
-A L</character> or L</string> that sets bounds to an arbitrarily-sized
-textual object, not to be confused with a L</separator> or
-L</terminator>. "To delimit" really just means "to surround" or "to
-enclose" (like these parentheses are doing).
-
-=item deprecated modules and features
-
-Deprecated modules and features are those which were part of a stable
-release, but later found to be subtly flawed, and which should be avoided.
-They are subject to removal and/or bug-incompatible reimplementation in
-the next major release (but they will be preserved through maintenance
-releases). Deprecation warnings are issued under B<-w> or C<use
-diagnostics>, and notices are found in L<perldelta>s, as well as various
-other PODs. Coding practices that misuse features, such as C<my $foo if
-0>, can also be deprecated.
-
-=item dereference
-
-A fancy computer science term meaning "to follow a L</reference> to
-what it points to". The "de" part of it refers to the fact that
-you're taking away one level of L</indirection>.
-
-=item derived class
-
-A L</class> that defines some of its L<methods|/method> in terms of a
-more generic class, called a L</base class>. Note that classes aren't
-classified exclusively into base classes or derived classes: a class
-can function as both a derived class and a base class simultaneously,
-which is kind of classy.
-
-=item descriptor
-
-See L</file descriptor>.
-
-=item destroy
-
-To deallocate the memory of a L</referent> (first triggering its
-C<DESTROY> method, if it has one).
-
-=item destructor
-
-A special L</method> that is called when an L</object> is thinking
-about L<destroying|/destroy> itself. A Perl program's C<DESTROY>
-method doesn't do the actual destruction; Perl just
-L<triggers|/trigger> the method in case the L</class> wants to do any
-associated cleanup.
-
-=item device
-
-A whiz-bang hardware gizmo (like a disk or tape drive or a modem or a
-joystick or a mouse) attached to your computer, that the L</operating
-system> tries to make look like a L</file> (or a bunch of files).
-Under Unix, these fake files tend to live in the I</dev> directory.
-
-=item directive
-
-A L</pod> directive. See L<perlpod>.
-
-=item directory
-
-A special file that contains other files. Some L<operating
-systems|/operating system> call these "folders", "drawers", or
-"catalogs".
-
-=item directory handle
-
-A name that represents a particular instance of opening a directory to
-read it, until you close it. See the L<opendir|perlfunc/opendir>
-function.
-
-=item dispatch
-
-To send something to its correct destination. Often used
-metaphorically to indicate a transfer of programmatic control to a
-destination selected algorithmically, often by lookup in a table of
-function L<references|/reference> or, in the case of object
-L<methods|/method>, by traversing the inheritance tree looking for the
-most specific definition for the method.
-
-=item distribution
-
-A standard, bundled release of a system of software. The default
-usage implies source code is included. If that is not the case, it
-will be called a "binary-only" distribution.
-
-=item (to be) dropped modules
-
-When Perl 5 was first released (see L<perlhist>), several modules were
-included, which have now fallen out of common use. It has been suggested
-that these modules should be removed, since the distribution became rather
-large, and the common criterion for new module additions is now limited to
-modules that help to build, test, and extend perl itself. Furthermore,
-the CPAN (which didn't exist at the time of Perl 5.0) can become the new
-home of dropped modules. Dropping modules is currently not an option, but
-further developments may clear the last barriers.
-
-=item dweomer
-
-An enchantment, illusion, phantasm, or jugglery. Said when Perl's
-magical L</dwimmer> effects don't do what you expect, but rather seem
-to be the product of arcane dweomercraft, sorcery, or wonder working.
-[From Old English]
-
-=item dwimmer
-
-DWIM is an acronym for "Do What I Mean", the principle that something
-should just do what you want it to do without an undue amount of fuss.
-A bit of code that does "dwimming" is a "dwimmer". Dwimming can
-require a great deal of behind-the-scenes magic, which (if it doesn't
-stay properly behind the scenes) is called a L</dweomer> instead.
-
-=item dynamic scoping
-
-Dynamic scoping works over a dynamic scope, making variables visible
-throughout the rest of the L</block> in which they are first used and
-in any L<subroutines|/subroutine> that are called by the rest of the
-block. Dynamically scoped variables can have their values temporarily
-changed (and implicitly restored later) by a L<local|perlfunc/local>
-operator. (Compare L</lexical scoping>.) Used more loosely to mean
-how a subroutine that is in the middle of calling another subroutine
-"contains" that subroutine at L</run time>.
-
-=back
-
-=head2 E
-
-=over 4
-
-=item eclectic
-
-Derived from many sources. Some would say I<too> many.
-
-=item element
-
-A basic building block. When you're talking about an L</array>, it's
-one of the items that make up the array.
-
-=item embedding
-
-When something is contained in something else, particularly when that
-might be considered surprising: "I've embedded a complete Perl
-interpreter in my editor!"
-
-=item empty subclass test
-
-The notion that an empty L</derived class> should behave exactly like
-its L</base class>.
-
-=item en passant
-
-When you change a L</value> as it is being copied. [From French, "in
-passing", as in the exotic pawn-capturing maneuver in chess.]
-
-=item encapsulation
-
-The veil of abstraction separating the L</interface> from the
-L</implementation> (whether enforced or not), which mandates that all
-access to an L</object>'s state be through L<methods|/method> alone.
-
-=item endian
-
-See L</little-endian> and L</big-endian>.
-
-=item environment
-
-The collective set of L<environment variables|/environment variable>
-your L</process> inherits from its parent. Accessed via C<%ENV>.
-
-=item environment variable
-
-A mechanism by which some high-level agent such as a user can pass its
-preferences down to its future offspring (child L<processes|/process>,
-grandchild processes, great-grandchild processes, and so on). Each
-environment variable is a L</key>/L</value> pair, like one entry in a
-L</hash>.
-
-=item EOF
-
-End of File. Sometimes used metaphorically as the terminating string
-of a L</here document>.
-
-=item errno
-
-The error number returned by a L</syscall> when it fails. Perl refers
-to the error by the name C<$!> (or C<$OS_ERROR> if you use the English
-module).
-
-=item error
-
-See L</exception> or L</fatal error>.
-
-=item escape sequence
-
-See L</metasymbol>.
-
-=item exception
-
-A fancy term for an error. See L</fatal error>.
-
-=item exception handling
-
-The way a program responds to an error. The exception handling
-mechanism in Perl is the L<eval|perlfunc/eval> operator.
-
-=item exec
-
-To throw away the current L</process>'s program and replace it with
-another without exiting the process or relinquishing any resources
-held (apart from the old memory image).
-
-=item executable file
-
-A L</file> that is specially marked to tell the L</operating system>
-that it's okay to run this file as a program. Usually shortened to
-"executable".
-
-=item execute
-
-To run a L<program|/executable file> or L</subroutine>. (Has nothing
-to do with the L<kill|perlfunc/kill> built-in, unless you're trying to
-run a L</signal handler>.)
-
-=item execute bit
-
-The special mark that tells the operating system it can run this
-program. There are actually three execute bits under Unix, and which
-bit gets used depends on whether you own the file singularly,
-collectively, or not at all.
-
-=item exit status
-
-See L</status>.
-
-=item export
-
-To make symbols from a L</module> available for L</import> by other modules.
-
-=item expression
-
-Anything you can legally say in a spot where a L</value> is required.
-Typically composed of L<literals|/literal>, L<variables|/variable>,
-L<operators|/operator>, L<functions|/function>, and L</subroutine>
-calls, not necessarily in that order.
-
-=item extension
-
-A Perl module that also pulls in compiled C or C++ code. More
-generally, any experimental option that can be compiled into Perl,
-such as multithreading.
-
-=back
-
-=head2 F
-
-=over 4
-
-=item false
-
-In Perl, any value that would look like C<""> or C<"0"> if evaluated
-in a string context. Since undefined values evaluate to C<"">, all
-undefined values are false, but not all false values are undefined.
-
-=item FAQ
-
-Frequently Asked Question (although not necessarily frequently
-answered, especially if the answer appears in the Perl FAQ shipped
-standard with Perl).
-
-=item fatal error
-
-An uncaught L</exception>, which causes termination of the L</process>
-after printing a message on your L</standard error> stream. Errors
-that happen inside an L<eval|perlfunc/eval> are not fatal. Instead,
-the L<eval|perlfunc/eval> terminates after placing the exception
-message in the C<$@> (C<$EVAL_ERROR>) variable. You can try to
-provoke a fatal error with the L<die|perlfunc/die> operator (known as
-throwing or raising an exception), but this may be caught by a
-dynamically enclosing L<eval|perlfunc/eval>. If not caught, the
-L<die|perlfunc/die> becomes a fatal error.
-
-=item field
-
-A single piece of numeric or string data that is part of a longer
-L</string>, L</record>, or L</line>. Variable-width fields are usually
-split up by L<separators|/separator> (so use L<split|perlfunc/split> to
-extract the fields), while fixed-width fields are usually at fixed
-positions (so use L<unpack|perlfunc/unpack>). L<Instance
-variables|/instance variable> are also known as fields.
-
-=item FIFO
-
-First In, First Out. See also L</LIFO>. Also, a nickname for a
-L</named pipe>.
-
-=item file
-
-A named collection of data, usually stored on disk in a L</directory>
-in a L</filesystem>. Roughly like a document, if you're into office
-metaphors. In modern filesystems, you can actually give a file more
-than one name. Some files have special properties, like directories
-and devices.
-
-=item file descriptor
-
-The little number the L</operating system> uses to keep track of which
-opened L</file> you're talking about. Perl hides the file descriptor
-inside a L</standard IE<sol>O> stream and then attaches the stream to
-a L</filehandle>.
-
-=item file test operator
-
-A built-in unary operator that you use to determine whether something
-is L</true> about a file, such as C<-o $filename> to test whether
-you're the owner of the file.
-
-=item fileglob
-
-A "wildcard" match on L<filenames|/filename>. See the
-L<glob|perlfunc/glob> function.
-
-=item filehandle
-
-An identifier (not necessarily related to the real name of a file)
-that represents a particular instance of opening a file until you
-close it. If you're going to open and close several different files
-in succession, it's fine to open each of them with the same
-filehandle, so you don't have to write out separate code to process
-each file.
-
-=item filename
-
-One name for a file. This name is listed in a L</directory>, and you
-can use it in an L<open|perlfunc/open> to tell the L</operating
-system> exactly which file you want to open, and associate the file
-with a L</filehandle> which will carry the subsequent identity of that
-file in your program, until you close it.
-
-=item filesystem
-
-A set of L<directories|/directory> and L<files|/file> residing on a
-partition of the disk. Sometimes known as a "partition". You can
-change the file's name or even move a file around from directory to
-directory within a filesystem without actually moving the file itself,
-at least under Unix.
-
-=item filter
-
-A program designed to take a L</stream> of input and transform it into
-a stream of output.
-
-=item flag
-
-We tend to avoid this term because it means so many things. It may
-mean a command-line L</switch> that takes no argument
-itself (such as Perl's B<-n> and B<-p>
-flags) or, less frequently, a single-bit indicator (such as the
-C<O_CREAT> and C<O_EXCL> flags used in
-L<sysopen|perlfunc/sysopen>).
-
-=item floating point
-
-A method of storing numbers in "scientific notation", such that the
-precision of the number is independent of its magnitude (the decimal
-point "floats"). Perl does its numeric work with floating-point
-numbers (sometimes called "floats"), when it can't get away with
-using L<integers|/integer>. Floating-point numbers are mere
-approximations of real numbers.
-
-=item flush
-
-The act of emptying a L</buffer>, often before it's full.
-
-=item FMTEYEWTK
-
-Far More Than Everything You Ever Wanted To Know. An exhaustive
-treatise on one narrow topic, something of a super-L</FAQ>. See Tom
-for far more.
-
-=item fork
-
-To create a child L</process> identical to the parent process at its
-moment of conception, at least until it gets ideas of its own. A
-thread with protected memory.
-
-=item formal arguments
-
-The generic names by which a L</subroutine> knows its
-L<arguments|/argument>. In many languages, formal arguments are
-always given individual names, but in Perl, the formal arguments are
-just the elements of an array. The formal arguments to a Perl program
-are C<$ARGV[0]>, C<$ARGV[1]>, and so on. Similarly, the formal
-arguments to a Perl subroutine are C<$_[0]>, C<$_[1]>, and so on. You
-may give the arguments individual names by assigning the values to a
-L<my|perlfunc/my> list. See also L</actual arguments>.
-
-=item format
-
-A specification of how many spaces and digits and things to put
-somewhere so that whatever you're printing comes out nice and pretty.
-
-=item freely available
-
-Means you don't have to pay money to get it, but the copyright on it
-may still belong to someone else (like Larry).
-
-=item freely redistributable
-
-Means you're not in legal trouble if you give a bootleg copy of it to
-your friends and we find out about it. In fact, we'd rather you gave
-a copy to all your friends.
-
-=item freeware
-
-Historically, any software that you give away, particularly if you
-make the source code available as well. Now often called C<open
-source software>. Recently there has been a trend to use the term in
-contradistinction to L</open source software>, to refer only to free
-software released under the Free Software Foundation's GPL (General
-Public License), but this is difficult to justify etymologically.
-
-=item function
-
-Mathematically, a mapping of each of a set of input values to a
-particular output value. In computers, refers to a L</subroutine> or
-L</operator> that returns a L</value>. It may or may not have input
-values (called L<arguments|/argument>).
-
-=item funny character
-
-Someone like Larry, or one of his peculiar friends. Also refers to
-the strange prefixes that Perl requires as noun markers on its
-variables.
-
-=back
-
-=head2 G
-
-=over 4
-
-=item garbage collection
-
-A misnamed feature--it should be called, "expecting your mother to
-pick up after you". Strictly speaking, Perl doesn't do this, but it
-relies on a reference-counting mechanism to keep things tidy.
-However, we rarely speak strictly and will often refer to the
-reference-counting scheme as a form of garbage collection. (If it's
-any comfort, when your interpreter exits, a "real" garbage collector
-runs to make sure everything is cleaned up if you've been messy with
-circular references and such.)
-
-=item GID
-
-Group ID--in Unix, the numeric group ID that the L</operating system>
-uses to identify you and members of your L</group>.
-
-=item glob
-
-Strictly, the shell's C<*> character, which will match a "glob" of
-characters when you're trying to generate a list of filenames.
-Loosely, the act of using globs and similar symbols to do pattern
-matching. See also L</fileglob> and L</typeglob>.
-
-=item global
-
-Something you can see from anywhere, usually used of
-L<variables|/variable> and L<subroutines|/subroutine> that are visible
-everywhere in your program. In Perl, only certain special variables
-are truly global--most variables (and all subroutines) exist only in
-the current L</package>. Global variables can be declared with
-L<our|perlfunc/our>. See L<perlfunc/our>.
-
-=item global destruction
-
-The L</garbage collection> of globals (and the running of any
-associated object destructors) that takes place when a Perl
-L</interpreter> is being shut down. Global destruction should not be
-confused with the Apocalypse, except perhaps when it should.
-
-=item glue language
-
-A language such as Perl that is good at hooking things together that
-weren't intended to be hooked together.
-
-=item granularity
-
-The size of the pieces you're dealing with, mentally speaking.
-
-=item greedy
-
-A L</subpattern> whose L</quantifier> wants to match as many things as
-possible.
-
-=item grep
-
-Originally from the old Unix editor command for "Globally search for a
-Regular Expression and Print it", now used in the general sense of any
-kind of search, especially text searches. Perl has a built-in
-L<grep|perlfunc/grep> function that searches a list for elements
-matching any given criterion, whereas the I<grep>(1) program searches
-for lines matching a L</regular expression> in one or more files.
-
-=item group
-
-A set of users of which you are a member. In some operating systems
-(like Unix), you can give certain file access permissions to other
-members of your group.
-
-=item GV
-
-An internal "glob value" typedef, holding a L</typeglob>. The L</GV>
-type is a subclass of L</SV>.
-
-=back
-
-=head2 H
-
-=over 4
-
-=item hacker
-
-Someone who is brilliantly persistent in solving technical problems,
-whether these involve golfing, fighting orcs, or programming. Hacker
-is a neutral term, morally speaking. Good hackers are not to be
-confused with evil L<crackers|/cracker> or clueless L<script
-kiddies|/script kiddie>. If you confuse them, we will presume that
-you are either evil or clueless.
-
-=item handler
-
-A L</subroutine> or L</method> that is called by Perl when your
-program needs to respond to some internal event, such as a L</signal>,
-or an encounter with an operator subject to L</operator overloading>.
-See also L</callback>.
-
-=item hard reference
-
-A L</scalar> L</value> containing the actual address of a
-L</referent>, such that the referent's L</reference> count accounts
-for it. (Some hard references are held internally, such as the
-implicit reference from one of a L</typeglob>'s variable slots to its
-corresponding referent.) A hard reference is different from a
-L</symbolic reference>.
-
-=item hash
-
-An unordered association of L</key>/L</value> pairs, stored such that
-you can easily use a string L</key> to look up its associated data
-L</value>. This glossary is like a hash, where the word to be defined
-is the key, and the definition is the value. A hash is also sometimes
-septisyllabically called an "associative array", which is a pretty
-good reason for simply calling it a "hash" instead.
-
-=item hash table
-
-A data structure used internally by Perl for implementing associative
-arrays (hashes) efficiently. See also L</bucket>.
-
-=item header file
-
-A file containing certain required definitions that you must include
-"ahead" of the rest of your program to do certain obscure operations.
-A C header file has a I<.h> extension. Perl doesn't really have
-header files, though historically Perl has sometimes used translated
-I<.h> files with a I<.ph> extension. See L<perlfunc/require>.
-(Header files have been superseded by the L</module> mechanism.)
-
-=item here document
-
-So called because of a similar construct in L<shells|/shell> that
-pretends that the L<lines|/line> following the L</command> are a
-separate L</file> to be fed to the command, up to some terminating
-string. In Perl, however, it's just a fancy form of quoting.
-
-=item hexadecimal
-
-A number in base 16, "hex" for short. The digits for 10 through 16
-are customarily represented by the letters C<a> through C<f>.
-Hexadecimal constants in Perl start with C<0x>. See also
-L<perlfunc/hex>.
-
-=item home directory
-
-The directory you are put into when you log in. On a Unix system, the
-name is often placed into C<$ENV{HOME}> or C<$ENV{LOGDIR}> by
-I<login>, but you can also find it with C<(getpwuid($E<lt>))[7]>.
-(Some platforms do not have a concept of a home directory.)
-
-=item host
-
-The computer on which a program or other data resides.
-
-=item hubris
-
-Excessive pride, the sort of thing Zeus zaps you for. Also the
-quality that makes you write (and maintain) programs that other people
-won't want to say bad things about. Hence, the third great virtue of
-a programmer. See also L</laziness> and L</impatience>.
-
-=item HV
-
-Short for a "hash value" typedef, which holds Perl's internal
-representation of a hash. The L</HV> type is a subclass of L</SV>.
-
-=back
-
-=head2 I
-
-=over 4
-
-=item identifier
-
-A legally formed name for most anything in which a computer program
-might be interested. Many languages (including Perl) allow
-identifiers that start with a letter and contain letters and digits.
-Perl also counts the underscore character as a valid letter. (Perl
-also has more complicated names, such as L</qualified> names.)
-
-=item impatience
-
-The anger you feel when the computer is being lazy. This makes you
-write programs that don't just react to your needs, but actually
-anticipate them. Or at least that pretend to. Hence, the second
-great virtue of a programmer. See also L</laziness> and L</hubris>.
-
-=item implementation
-
-How a piece of code actually goes about doing its job. Users of the
-code should not count on implementation details staying the same
-unless they are part of the published L</interface>.
-
-=item import
-
-To gain access to symbols that are exported from another module. See
-L<perlfunc/use>.
-
-=item increment
-
-To increase the value of something by 1 (or by some other number, if
-so specified).
-
-=item indexing
-
-In olden days, the act of looking up a L</key> in an actual index
-(such as a phone book), but now merely the act of using any kind of
-key or position to find the corresponding L</value>, even if no index
-is involved. Things have degenerated to the point that Perl's
-L<index|perlfunc/index> function merely locates the position (index)
-of one string in another.
-
-=item indirect filehandle
-
-An L</expression> that evaluates to something that can be used as a
-L</filehandle>: a L</string> (filehandle name), a L</typeglob>, a
-typeglob L</reference>, or a low-level L</IO> object.
-
-=item indirect object
-
-In English grammar, a short noun phrase between a verb and its direct
-object indicating the beneficiary or recipient of the action. In
-Perl, C<print STDOUT "$foo\n";> can be understood as "verb
-indirect-object object" where L</STDOUT> is the recipient of the
-L<print|perlfunc/print> action, and C<"$foo"> is the object being
-printed. Similarly, when invoking a L</method>, you might place the
-invocand between the method and its arguments:
-
- $gollum = new Pathetic::Creature "Smeagol";
- give $gollum "Fisssssh!";
- give $gollum "Precious!";
-
-In modern Perl, calling methods this way is often considered bad practice and
-to be avoided.
-
-=item indirect object slot
-
-The syntactic position falling between a method call and its arguments
-when using the indirect object invocation syntax. (The slot is
-distinguished by the absence of a comma between it and the next
-argument.) L</STDERR> is in the indirect object slot here:
-
- print STDERR "Awake! Awake! Fear, Fire,
- Foes! Awake!\n";
-
-=item indirection
-
-If something in a program isn't the value you're looking for but
-indicates where the value is, that's indirection. This can be done
-with either L<symbolic references|/symbolic reference> or L<hard
-references|/hard reference>.
-
-=item infix
-
-An L</operator> that comes in between its L<operands|/operand>, such
-as multiplication in C<24 * 7>.
-
-=item inheritance
-
-What you get from your ancestors, genetically or otherwise. If you
-happen to be a L</class>, your ancestors are called L<base
-classes|/base class> and your descendants are called L<derived
-classes|/derived class>. See L</single inheritance> and L</multiple
-inheritance>.
-
-=item instance
-
-Short for "an instance of a class", meaning an L</object> of that L</class>.
-
-=item instance variable
-
-An L</attribute> of an L</object>; data stored with the particular
-object rather than with the class as a whole.
-
-=item integer
-
-A number with no fractional (decimal) part. A counting number, like
-1, 2, 3, and so on, but including 0 and the negatives.
-
-=item interface
-
-The services a piece of code promises to provide forever, in contrast to
-its L</implementation>, which it should feel free to change whenever it
-likes.
-
-=item interpolation
-
-The insertion of a scalar or list value somewhere in the middle of
-another value, such that it appears to have been there all along. In
-Perl, variable interpolation happens in double-quoted strings and
-patterns, and list interpolation occurs when constructing the list of
-values to pass to a list operator or other such construct that takes a
-L</LIST>.
-
-=item interpreter
-
-Strictly speaking, a program that reads a second program and does what
-the second program says directly without turning the program into a
-different form first, which is what L<compilers|/compiler> do. Perl
-is not an interpreter by this definition, because it contains a kind
-of compiler that takes a program and turns it into a more executable
-form (L<syntax trees|/syntax tree>) within the I<perl> process itself,
-which the Perl L</run time> system then interprets.
-
-=item invocand
-
-The agent on whose behalf a L</method> is invoked. In a L</class>
-method, the invocand is a package name. In an L</instance> method,
-the invocand is an object reference.
-
-=item invocation
-
-The act of calling up a deity, daemon, program, method, subroutine, or
-function to get it do what you think it's supposed to do. We usually
-"call" subroutines but "invoke" methods, since it sounds cooler.
-
-=item I/O
-
-Input from, or output to, a L</file> or L</device>.
-
-=item IO
-
-An internal I/O object. Can also mean L</indirect object>.
-
-=item IP
-
-Internet Protocol, or Intellectual Property.
-
-=item IPC
-
-Interprocess Communication.
-
-=item is-a
-
-A relationship between two L<objects|/object> in which one object is
-considered to be a more specific version of the other, generic object:
-"A camel is a mammal." Since the generic object really only exists in
-a Platonic sense, we usually add a little abstraction to the notion of
-objects and think of the relationship as being between a generic
-L</base class> and a specific L</derived class>. Oddly enough,
-Platonic classes don't always have Platonic relationships--see
-L</inheritance>.
-
-=item iteration
-
-Doing something repeatedly.
-
-=item iterator
-
-A special programming gizmo that keeps track of where you are in
-something that you're trying to iterate over. The C<foreach> loop in
-Perl contains an iterator; so does a hash, allowing you to
-L<each|perlfunc/each> through it.
-
-=item IV
-
-The integer four, not to be confused with six, Tom's favorite editor.
-IV also means an internal Integer Value of the type a L</scalar> can
-hold, not to be confused with an L</NV>.
-
-=back
-
-=head2 J
-
-=over 4
-
-=item JAPH
-
-"Just Another Perl Hacker," a clever but cryptic bit of Perl code that
-when executed, evaluates to that string. Often used to illustrate a
-particular Perl feature, and something of an ongoing Obfuscated Perl
-Contest seen in Usenix signatures.
-
-=back
-
-=head2 K
-
-=over 4
-
-=item key
-
-The string index to a L</hash>, used to look up the L</value>
-associated with that key.
-
-=item keyword
-
-See L</reserved words>.
-
-=back
-
-=head2 L
-
-=over 4
-
-=item label
-
-A name you give to a L</statement> so that you can talk about that
-statement elsewhere in the program.
-
-=item laziness
-
-The quality that makes you go to great effort to reduce overall energy
-expenditure. It makes you write labor-saving programs that other
-people will find useful, and document what you wrote so you don't have
-to answer so many questions about it. Hence, the first great virtue
-of a programmer. Also hence, this book. See also L</impatience> and
-L</hubris>.
-
-=item left shift
-
-A L</bit shift> that multiplies the number by some power of 2.
-
-=item leftmost longest
-
-The preference of the L</regular expression> engine to match the
-leftmost occurrence of a L</pattern>, then given a position at which a
-match will occur, the preference for the longest match (presuming the
-use of a L</greedy> quantifier). See L<perlre> for I<much> more on
-this subject.
-
-=item lexeme
-
-Fancy term for a L</token>.
-
-=item lexer
-
-Fancy term for a L</tokener>.
-
-=item lexical analysis
-
-Fancy term for L</tokenizing>.
-
-=item lexical scoping
-
-Looking at your I<Oxford English Dictionary> through a microscope.
-(Also known as L</static scoping>, because dictionaries don't change
-very fast.) Similarly, looking at variables stored in a private
-dictionary (namespace) for each scope, which are visible only from
-their point of declaration down to the end of the lexical scope in
-which they are declared. --Syn. L</static scoping>.
---Ant. L</dynamic scoping>.
-
-=item lexical variable
-
-A L</variable> subject to L</lexical scoping>, declared by
-L<my|perlfunc/my>. Often just called a "lexical". (The
-L<our|perlfunc/our> declaration declares a lexically scoped name for a
-global variable, which is not itself a lexical variable.)
-
-=item library
-
-Generally, a collection of procedures. In ancient days, referred to a
-collection of subroutines in a I<.pl> file. In modern times, refers
-more often to the entire collection of Perl L<modules|/module> on your
-system.
-
-=item LIFO
-
-Last In, First Out. See also L</FIFO>. A LIFO is usually called a
-L</stack>.
-
-=item line
-
-In Unix, a sequence of zero or more non-newline characters terminated
-with a L</newline> character. On non-Unix machines, this is emulated
-by the C library even if the underlying L</operating system> has
-different ideas.
-
-=item line buffering
-
-Used by a L</standard IE<sol>O> output stream that flushes its
-L</buffer> after every L</newline>. Many standard I/O libraries
-automatically set up line buffering on output that is going to the
-terminal.
-
-=item line number
-
-The number of lines read previous to this one, plus 1. Perl keeps a
-separate line number for each source or input file it opens. The
-current source file's line number is represented by C<__LINE__>. The
-current input line number (for the file that was most recently read
-via C<< E<lt>FHE<gt> >>) is represented by the C<$.>
-(C<$INPUT_LINE_NUMBER>) variable. Many error messages report both
-values, if available.
-
-=item link
-
-Used as a noun, a name in a L</directory>, representing a L</file>. A
-given file can have multiple links to it. It's like having the same
-phone number listed in the phone directory under different names. As
-a verb, to resolve a partially compiled file's unresolved symbols into
-a (nearly) executable image. Linking can generally be static or
-dynamic, which has nothing to do with static or dynamic scoping.
-
-=item LIST
-
-A syntactic construct representing a comma-separated list of
-expressions, evaluated to produce a L</list value>. Each
-L</expression> in a L</LIST> is evaluated in L</list context> and
-interpolated into the list value.
-
-=item list
-
-An ordered set of scalar values.
-
-=item list context
-
-The situation in which an L</expression> is expected by its
-surroundings (the code calling it) to return a list of values rather
-than a single value. Functions that want a L</LIST> of arguments tell
-those arguments that they should produce a list value. See also
-L</context>.
-
-=item list operator
-
-An L</operator> that does something with a list of values, such as
-L<join|perlfunc/join> or L<grep|perlfunc/grep>. Usually used for
-named built-in operators (such as L<print|perlfunc/print>,
-L<unlink|perlfunc/unlink>, and L<system|perlfunc/system>) that do not
-require parentheses around their L</argument> list.
-
-=item list value
-
-An unnamed list of temporary scalar values that may be passed around
-within a program from any list-generating function to any function or
-construct that provides a L</list context>.
-
-=item literal
-
-A token in a programming language such as a number or L</string> that
-gives you an actual L</value> instead of merely representing possible
-values as a L</variable> does.
-
-=item little-endian
-
-From Swift: someone who eats eggs little end first. Also used of
-computers that store the least significant L</byte> of a word at a
-lower byte address than the most significant byte. Often considered
-superior to big-endian machines. See also L</big-endian>.
-
-=item local
-
-Not meaning the same thing everywhere. A global variable in Perl can
-be localized inside a L<dynamic scope|/dynamic scoping> via the
-L<local|perlfunc/local> operator.
-
-=item logical operator
-
-Symbols representing the concepts "and", "or", "xor", and "not".
-
-=item lookahead
-
-An L</assertion> that peeks at the string to the right of the current
-match location.
-
-=item lookbehind
-
-An L</assertion> that peeks at the string to the left of the current
-match location.
-
-=item loop
-
-A construct that performs something repeatedly, like a roller coaster.
-
-=item loop control statement
-
-Any statement within the body of a loop that can make a loop
-prematurely stop looping or skip an L</iteration>. Generally you
-shouldn't try this on roller coasters.
-
-=item loop label
-
-A kind of key or name attached to a loop (or roller coaster) so that
-loop control statements can talk about which loop they want to
-control.
-
-=item lvaluable
-
-Able to serve as an L</lvalue>.
-
-=item lvalue
-
-Term used by language lawyers for a storage location you can assign a
-new L</value> to, such as a L</variable> or an element of an
-L</array>. The "l" is short for "left", as in the left side of an
-assignment, a typical place for lvalues. An L</lvaluable> function or
-expression is one to which a value may be assigned, as in C<pos($x) =
-10>.
-
-=item lvalue modifier
-
-An adjectival pseudofunction that warps the meaning of an L</lvalue>
-in some declarative fashion. Currently there are three lvalue
-modifiers: L<my|perlfunc/my>, L<our|perlfunc/our>, and
-L<local|perlfunc/local>.
-
-=back
-
-=head2 M
-
-=over 4
-
-=item magic
-
-Technically speaking, any extra semantics attached to a variable such
-as C<$!>, C<$0>, C<%ENV>, or C<%SIG>, or to any tied variable.
-Magical things happen when you diddle those variables.
-
-=item magical increment
-
-An L</increment> operator that knows how to bump up alphabetics as
-well as numbers.
-
-=item magical variables
-
-Special variables that have side effects when you access them or
-assign to them. For example, in Perl, changing elements of the
-C<%ENV> array also changes the corresponding environment variables
-that subprocesses will use. Reading the C<$!> variable gives you the
-current system error number or message.
-
-=item Makefile
-
-A file that controls the compilation of a program. Perl programs
-don't usually need a L</Makefile> because the Perl compiler has plenty
-of self-control.
-
-=item man
-
-The Unix program that displays online documentation (manual pages) for
-you.
-
-=item manpage
-
-A "page" from the manuals, typically accessed via the I<man>(1)
-command. A manpage contains a SYNOPSIS, a DESCRIPTION, a list of
-BUGS, and so on, and is typically longer than a page. There are
-manpages documenting L<commands|/command>, L<syscalls|/syscall>,
-L</library> L<functions|/function>, L<devices|/device>,
-L<protocols|/protocol>, L<files|/file>, and such. In this book, we
-call any piece of standard Perl documentation (like I<perlop> or
-I<perldelta>) a manpage, no matter what format it's installed in on
-your system.
-
-=item matching
-
-See L</pattern matching>.
-
-=item member data
-
-See L</instance variable>.
-
-=item memory
-
-This always means your main memory, not your disk. Clouding the issue
-is the fact that your machine may implement L</virtual> memory; that
-is, it will pretend that it has more memory than it really does, and
-it'll use disk space to hold inactive bits. This can make it seem
-like you have a little more memory than you really do, but it's not a
-substitute for real memory. The best thing that can be said about
-virtual memory is that it lets your performance degrade gradually
-rather than suddenly when you run out of real memory. But your
-program can die when you run out of virtual memory too, if you haven't
-thrashed your disk to death first.
-
-=item metacharacter
-
-A L</character> that is I<not> supposed to be treated normally. Which
-characters are to be treated specially as metacharacters varies
-greatly from context to context. Your L</shell> will have certain
-metacharacters, double-quoted Perl L<strings|/string> have other
-metacharacters, and L</regular expression> patterns have all the
-double-quote metacharacters plus some extra ones of their own.
-
-=item metasymbol
-
-Something we'd call a L</metacharacter> except that it's a sequence of
-more than one character. Generally, the first character in the
-sequence must be a true metacharacter to get the other characters in
-the metasymbol to misbehave along with it.
-
-=item method
-
-A kind of action that an L</object> can take if you tell it to. See
-L<perlobj>.
-
-=item minimalism
-
-The belief that "small is beautiful." Paradoxically, if you say
-something in a small language, it turns out big, and if you say it in
-a big language, it turns out small. Go figure.
-
-=item mode
-
-In the context of the L<stat> syscall, refers to the field holding
-the L</permission bits> and the type of the L</file>.
-
-=item modifier
-
-See L</statement modifier>, L</regular expression modifier>, and
-L</lvalue modifier>, not necessarily in that order.
-
-=item module
-
-A L</file> that defines a L</package> of (almost) the same name, which
-can either L</export> symbols or function as an L</object> class. (A
-module's main I<.pm> file may also load in other files in support of
-the module.) See the L<use|perlfunc/use> built-in.
-
-=item modulus
-
-An integer divisor when you're interested in the remainder instead of
-the quotient.
-
-=item monger
-
-Short for Perl Monger, a purveyor of Perl.
-
-=item mortal
-
-A temporary value scheduled to die when the current statement
-finishes.
-
-=item multidimensional array
-
-An array with multiple subscripts for finding a single element. Perl
-implements these using L<references|/reference>--see L<perllol> and
-L<perldsc>.
-
-=item multiple inheritance
-
-The features you got from your mother and father, mixed together
-unpredictably. (See also L</inheritance>, and L</single
-inheritance>.) In computer languages (including Perl), the notion
-that a given class may have multiple direct ancestors or L<base
-classes|/base class>.
-
-=back
-
-=head2 N
-
-=over 4
-
-=item named pipe
-
-A L</pipe> with a name embedded in the L</filesystem> so that it can
-be accessed by two unrelated L<processes|/process>.
-
-=item namespace
-
-A domain of names. You needn't worry about whether the names in one
-such domain have been used in another. See L</package>.
-
-=item network address
-
-The most important attribute of a socket, like your telephone's
-telephone number. Typically an IP address. See also L</port>.
-
-=item newline
-
-A single character that represents the end of a line, with the ASCII
-value of 012 octal under Unix (but 015 on a Mac), and represented by
-C<\n> in Perl strings. For Windows machines writing text files, and
-for certain physical devices like terminals, the single newline gets
-automatically translated by your C library into a line feed and a
-carriage return, but normally, no translation is done.
-
-=item NFS
-
-Network File System, which allows you to mount a remote filesystem as
-if it were local.
-
-=item null character
-
-A character with the ASCII value of zero. It's used by C to terminate
-strings, but Perl allows strings to contain a null.
-
-=item null list
-
-A L</list value> with zero elements, represented in Perl by C<()>.
-
-=item null string
-
-A L</string> containing no characters, not to be confused with a
-string containing a L</null character>, which has a positive length
-and is L</true>.
-
-=item numeric context
-
-The situation in which an expression is expected by its surroundings
-(the code calling it) to return a number. See also L</context> and
-L</string context>.
-
-=item NV
-
-Short for Nevada, no part of which will ever be confused with
-civilization. NV also means an internal floating-point Numeric Value
-of the type a L</scalar> can hold, not to be confused with an L</IV>.
-
-=item nybble
-
-Half a L</byte>, equivalent to one L</hexadecimal> digit, and worth
-four L<bits|/bit>.
-
-=back
-
-=head2 O
-
-=over 4
-
-=item object
-
-An L</instance> of a L</class>. Something that "knows" what
-user-defined type (class) it is, and what it can do because of what
-class it is. Your program can request an object to do things, but the
-object gets to decide whether it wants to do them or not. Some
-objects are more accommodating than others.
-
-=item octal
-
-A number in base 8. Only the digits 0 through 7 are allowed. Octal
-constants in Perl start with 0, as in 013. See also the
-L<oct|perlfunc/oct> function.
-
-=item offset
-
-How many things you have to skip over when moving from the beginning
-of a string or array to a specific position within it. Thus, the
-minimum offset is zero, not one, because you don't skip anything to
-get to the first item.
-
-=item one-liner
-
-An entire computer program crammed into one line of text.
-
-=item open source software
-
-Programs for which the source code is freely available and freely
-redistributable, with no commercial strings attached. For a more
-detailed definition, see L<http://www.opensource.org/osd.html>.
-
-=item operand
-
-An L</expression> that yields a L</value> that an L</operator>
-operates on. See also L</precedence>.
-
-=item operating system
-
-A special program that runs on the bare machine and hides the gory
-details of managing L<processes|/process> and L<devices|/device>.
-Usually used in a looser sense to indicate a particular culture of
-programming. The loose sense can be used at varying levels of
-specificity. At one extreme, you might say that all versions of Unix
-and Unix-lookalikes are the same operating system (upsetting many
-people, especially lawyers and other advocates). At the other
-extreme, you could say this particular version of this particular
-vendor's operating system is different from any other version of this
-or any other vendor's operating system. Perl is much more portable
-across operating systems than many other languages. See also
-L</architecture> and L</platform>.
-
-=item operator
-
-A gizmo that transforms some number of input values to some number of
-output values, often built into a language with a special syntax or
-symbol. A given operator may have specific expectations about what
-L<types|/type> of data you give as its arguments
-(L<operands|/operand>) and what type of data you want back from it.
-
-=item operator overloading
-
-A kind of L</overloading> that you can do on built-in
-L<operators|/operator> to make them work on L<objects|/object> as if
-the objects were ordinary scalar values, but with the actual semantics
-supplied by the object class. This is set up with the L<overload>
-L</pragma>.
-
-=item options
-
-See either L<switches|/switch> or L</regular expression modifier>.
-
-=item ordinal
-
-Another name for L</code point>
-
-=item overloading
-
-Giving additional meanings to a symbol or construct. Actually, all
-languages do overloading to one extent or another, since people are
-good at figuring out things from L</context>.
-
-=item overriding
-
-Hiding or invalidating some other definition of the same name. (Not
-to be confused with L</overloading>, which adds definitions that must
-be disambiguated some other way.) To confuse the issue further, we use
-the word with two overloaded definitions: to describe how you can
-define your own L</subroutine> to hide a built-in L</function> of the
-same name (see L<perlsub/Overriding Built-in Functions>) and to
-describe how you can define a replacement L</method> in a L</derived
-class> to hide a L</base class>'s method of the same name (see
-L<perlobj>).
-
-=item owner
-
-The one user (apart from the superuser) who has absolute control over
-a L</file>. A file may also have a L</group> of users who may
-exercise joint ownership if the real owner permits it. See
-L</permission bits>.
-
-=back
-
-=head2 P
-
-=over 4
-
-=item package
-
-A L</namespace> for global L<variables|/variable>,
-L<subroutines|/subroutine>, and the like, such that they can be kept
-separate from like-named L<symbols|/symbol> in other namespaces. In a
-sense, only the package is global, since the symbols in the package's
-symbol table are only accessible from code compiled outside the
-package by naming the package. But in another sense, all package
-symbols are also globals--they're just well-organized globals.
-
-=item pad
-
-Short for L</scratchpad>.
-
-=item parameter
-
-See L</argument>.
-
-=item parent class
-
-See L</base class>.
-
-=item parse tree
-
-See L</syntax tree>.
-
-=item parsing
-
-The subtle but sometimes brutal art of attempting to turn your
-possibly malformed program into a valid L</syntax tree>.
-
-=item patch
-
-To fix by applying one, as it were. In the realm of hackerdom, a
-listing of the differences between two versions of a program as might
-be applied by the I<patch>(1) program when you want to fix a bug or
-upgrade your old version.
-
-=item PATH
-
-The list of L<directories|/directory> the system searches to find a
-program you want to L</execute>. The list is stored as one of your
-L<environment variables|/environment variable>, accessible in Perl as
-C<$ENV{PATH}>.
-
-=item pathname
-
-A fully qualified filename such as I</usr/bin/perl>. Sometimes
-confused with L</PATH>.
-
-=item pattern
-
-A template used in L</pattern matching>.
-
-=item pattern matching
-
-Taking a pattern, usually a L</regular expression>, and trying the
-pattern various ways on a string to see whether there's any way to
-make it fit. Often used to pick interesting tidbits out of a file.
-
-=item permission bits
-
-Bits that the L</owner> of a file sets or unsets to allow or disallow
-access to other people. These flag bits are part of the L</mode> word
-returned by the L<stat|perlfunc/stat> built-in when you ask about a
-file. On Unix systems, you can check the I<ls>(1) manpage for more
-information.
-
-=item Pern
-
-What you get when you do C<Perl++> twice. Doing it only once will
-curl your hair. You have to increment it eight times to shampoo your
-hair. Lather, rinse, iterate.
-
-=item pipe
-
-A direct L</connection> that carries the output of one L</process> to
-the input of another without an intermediate temporary file. Once the
-pipe is set up, the two processes in question can read and write as if
-they were talking to a normal file, with some caveats.
-
-=item pipeline
-
-A series of L<processes|/process> all in a row, linked by
-L<pipes|/pipe>, where each passes its output stream to the next.
-
-=item platform
-
-The entire hardware and software context in which a program runs. A
- program written in a platform-dependent language might break if you
-change any of: machine, operating system, libraries, compiler, or
-system configuration. The I<perl> interpreter has to be compiled
-differently for each platform because it is implemented in C, but
-programs written in the Perl language are largely
-platform-independent.
-
-=item pod
-
-The markup used to embed documentation into your Perl code. See
-L<perlpod>.
-
-=item pointer
-
-A L</variable> in a language like C that contains the exact memory
-location of some other item. Perl handles pointers internally so you
-don't have to worry about them. Instead, you just use symbolic
-pointers in the form of L<keys|/key> and L</variable> names, or L<hard
-references|/hard reference>, which aren't pointers (but act like
-pointers and do in fact contain pointers).
-
-=item polymorphism
-
-The notion that you can tell an L</object> to do something generic,
-and the object will interpret the command in different ways depending
-on its type. [E<lt>Gk many shapes]
-
-=item port
-
-The part of the address of a TCP or UDP socket that directs packets to
-the correct process after finding the right machine, something like
-the phone extension you give when you reach the company operator.
-Also, the result of converting code to run on a different platform
-than originally intended, or the verb denoting this conversion.
-
-=item portable
-
-Once upon a time, C code compilable under both BSD and SysV. In
-general, code that can be easily converted to run on another
-L</platform>, where "easily" can be defined however you like, and
-usually is. Anything may be considered portable if you try hard
-enough. See I<mobile home> or I<London Bridge>.
-
-=item porter
-
-Someone who "carries" software from one L</platform> to another.
-Porting programs written in platform-dependent languages such as C can
-be difficult work, but porting programs like Perl is very much worth
-the agony.
-
-=item POSIX
-
-The Portable Operating System Interface specification.
-
-=item postfix
-
-An L</operator> that follows its L</operand>, as in C<$x++>.
-
-=item pp
-
-An internal shorthand for a "push-pop" code, that is, C code
-implementing Perl's stack machine.
-
-=item pragma
-
-A standard module whose practical hints and suggestions are received
-(and possibly ignored) at compile time. Pragmas are named in all
-lowercase.
-
-=item precedence
-
-The rules of conduct that, in the absence of other guidance, determine
-what should happen first. For example, in the absence of parentheses,
-you always do multiplication before addition.
-
-=item prefix
-
-An L</operator> that precedes its L</operand>, as in C<++$x>.
-
-=item preprocessing
-
-What some helper L</process> did to transform the incoming data into a
-form more suitable for the current process. Often done with an
-incoming L</pipe>. See also L</C preprocessor>.
-
-=item procedure
-
-A L</subroutine>.
-
-=item process
-
-An instance of a running program. Under multitasking systems like
-Unix, two or more separate processes could be running the same program
-independently at the same time--in fact, the L<fork|perlfunc/fork>
-function is designed to bring about this happy state of affairs.
-Under other operating systems, processes are sometimes called
-"threads", "tasks", or "jobs", often with slight nuances in meaning.
-
-=item program generator
-
-A system that algorithmically writes code for you in a high-level
-language. See also L</code generator>.
-
-=item progressive matching
-
-L<Pattern matching|/pattern matching> that picks up where it left off before.
-
-=item property
-
-See either L</instance variable> or L</character property>.
-
-=item protocol
-
-In networking, an agreed-upon way of sending messages back and forth
-so that neither correspondent will get too confused.
-
-=item prototype
-
-An optional part of a L</subroutine> declaration telling the Perl
-compiler how many and what flavor of arguments may be passed as
-L</actual arguments>, so that you can write subroutine calls that
-parse much like built-in functions. (Or don't parse, as the case may
-be.)
-
-=item pseudofunction
-
-A construct that sometimes looks like a function but really isn't.
-Usually reserved for L</lvalue> modifiers like L<my|perlfunc/my>, for
-L</context> modifiers like L<scalar|perlfunc/scalar>, and for the
-pick-your-own-quotes constructs, C<q//>, C<qq//>, C<qx//>, C<qw//>,
-C<qr//>, C<m//>, C<s///>, C<y///>, and C<tr///>.
-
-=item pseudohash
-
-A reference to an array whose initial element happens to hold a
-reference to a hash. You can treat a pseudohash reference as either
-an array reference or a hash reference.
-
-=item pseudoliteral
-
-An L</operator> that looks something like a L</literal>, such as the
-output-grabbing operator, C<`>I<C<command>>C<`>.
-
-=item public domain
-
-Something not owned by anybody. Perl is copyrighted and is thus
-I<not> in the public domain--it's just L</freely available> and
-L</freely redistributable>.
-
-=item pumpkin
-
-A notional "baton" handed around the Perl community indicating who is
-the lead integrator in some arena of development.
-
-=item pumpking
-
-A L</pumpkin> holder, the person in charge of pumping the pump, or at
-least priming it. Must be willing to play the part of the Great
-Pumpkin now and then.
-
-=item PV
-
-A "pointer value", which is Perl Internals Talk for a C<char*>.
-
-=back
-
-=head2 Q
-
-=over 4
-
-=item qualified
-
-Possessing a complete name. The symbol C<$Ent::moot> is qualified;
-C<$moot> is unqualified. A fully qualified filename is specified from
-the top-level directory.
-
-=item quantifier
-
-A component of a L</regular expression> specifying how many times the
-foregoing L</atom> may occur.
-
-=back
-
-=head2 R
-
-=over 4
-
-=item readable
-
-With respect to files, one that has the proper permission bit set to
-let you access the file. With respect to computer programs, one
-that's written well enough that someone has a chance of figuring out
-what it's trying to do.
-
-=item reaping
-
-The last rites performed by a parent L</process> on behalf of a
-deceased child process so that it doesn't remain a L</zombie>. See
-the L<wait|perlfunc/wait> and L<waitpid|perlfunc/waitpid> function
-calls.
-
-=item record
-
-A set of related data values in a L</file> or L</stream>, often
-associated with a unique L</key> field. In Unix, often commensurate
-with a L</line>, or a blank-line-terminated set of lines (a
-"paragraph"). Each line of the I</etc/passwd> file is a record, keyed
-on login name, containing information about that user.
-
-=item recursion
-
-The art of defining something (at least partly) in terms of itself,
-which is a naughty no-no in dictionaries but often works out okay in
-computer programs if you're careful not to recurse forever, which is
-like an infinite loop with more spectacular failure modes.
-
-=item reference
-
-Where you look to find a pointer to information somewhere else. (See
-L</indirection>.) References come in two flavors, L<symbolic
-references|/symbolic reference> and L<hard references|/hard
-reference>.
-
-=item referent
-
-Whatever a reference refers to, which may or may not have a name.
-Common types of referents include scalars, arrays, hashes, and
-subroutines.
-
-=item regex
-
-See L</regular expression>.
-
-=item regular expression
-
-A single entity with various interpretations, like an elephant. To a
-computer scientist, it's a grammar for a little language in which some
-strings are legal and others aren't. To normal people, it's a pattern
-you can use to find what you're looking for when it varies from case
-to case. Perl's regular expressions are far from regular in the
-theoretical sense, but in regular use they work quite well. Here's a
-regular expression: C</Oh s.*t./>. This will match strings like "C<Oh
-say can you see by the dawn's early light>" and "C<Oh sit!>". See
-L<perlre>.
-
-=item regular expression modifier
-
-An option on a pattern or substitution, such as C</i> to render the
-pattern case insensitive. See also L</cloister>.
-
-=item regular file
-
-A L</file> that's not a L</directory>, a L</device>, a named L</pipe>
-or L</socket>, or a L</symbolic link>. Perl uses the C<-f> file test
-operator to identify regular files. Sometimes called a "plain" file.
-
-=item relational operator
-
-An L</operator> that says whether a particular ordering relationship
-is L</true> about a pair of L<operands|/operand>. Perl has both
-numeric and string relational operators. See L</collating sequence>.
-
-=item reserved words
-
-A word with a specific, built-in meaning to a L</compiler>, such as
-C<if> or L<delete|perlfunc/delete>. In many languages (not Perl),
-it's illegal to use reserved words to name anything else. (Which is
-why they're reserved, after all.) In Perl, you just can't use them to
-name L<labels|/label> or L<filehandles|/filehandle>. Also called
-"keywords".
-
-=item return value
-
-The L</value> produced by a L</subroutine> or L</expression> when
-evaluated. In Perl, a return value may be either a L</list> or a
-L</scalar>.
-
-=item RFC
-
-Request For Comment, which despite the timid connotations is the name
-of a series of important standards documents.
-
-=item right shift
-
-A L</bit shift> that divides a number by some power of 2.
-
-=item root
-
-The superuser (UID == 0). Also, the top-level directory of the
-filesystem.
-
-=item RTFM
-
-What you are told when someone thinks you should Read The Fine Manual.
-
-=item run phase
-
-Any time after Perl starts running your main program. See also
-L</compile phase>. Run phase is mostly spent in L</run time> but may
-also be spent in L</compile time> when L<require|perlfunc/require>,
-L<do|perlfunc/do> C<FILE>, or L<eval|perlfunc/eval> C<STRING>
-operators are executed or when a substitution uses the C</ee>
-modifier.
-
-=item run time
-
-The time when Perl is actually doing what your code says to do, as
-opposed to the earlier period of time when it was trying to figure out
-whether what you said made any sense whatsoever, which is L</compile
-time>.
-
-=item run-time pattern
-
-A pattern that contains one or more variables to be interpolated
-before parsing the pattern as a L</regular expression>, and that
-therefore cannot be analyzed at compile time, but must be re-analyzed
-each time the pattern match operator is evaluated. Run-time patterns
-are useful but expensive.
-
-=item RV
-
-A recreational vehicle, not to be confused with vehicular recreation.
-RV also means an internal Reference Value of the type a L</scalar> can
-hold. See also L</IV> and L</NV> if you're not confused yet.
-
-=item rvalue
-
-A L</value> that you might find on the right side of an
-L</assignment>. See also L</lvalue>.
-
-=back
-
-=head2 S
-
-=over 4
-
-=item scalar
-
-A simple, singular value; a number, L</string>, or L</reference>.
-
-=item scalar context
-
-The situation in which an L</expression> is expected by its
-surroundings (the code calling it) to return a single L</value> rather
-than a L</list> of values. See also L</context> and L</list context>.
-A scalar context sometimes imposes additional constraints on the
-return value--see L</string context> and L</numeric context>.
-Sometimes we talk about a L</Boolean context> inside conditionals, but
-this imposes no additional constraints, since any scalar value,
-whether numeric or L</string>, is already true or false.
-
-=item scalar literal
-
-A number or quoted L</string>--an actual L</value> in the text of your
-program, as opposed to a L</variable>.
-
-=item scalar value
-
-A value that happens to be a L</scalar> as opposed to a L</list>.
-
-=item scalar variable
-
-A L</variable> prefixed with C<$> that holds a single value.
-
-=item scope
-
-How far away you can see a variable from, looking through one. Perl
-has two visibility mechanisms: it does L</dynamic scoping> of
-L<local|perlfunc/local> L<variables|/variable>, meaning that the rest
-of the L</block>, and any L<subroutines|/subroutine> that are called
-by the rest of the block, can see the variables that are local to the
-block. Perl does L</lexical scoping> of L<my|perlfunc/my> variables,
-meaning that the rest of the block can see the variable, but other
-subroutines called by the block I<cannot> see the variable.
-
-=item scratchpad
-
-The area in which a particular invocation of a particular file or
-subroutine keeps some of its temporary values, including any lexically
-scoped variables.
-
-=item script
-
-A text L</file> that is a program intended to be L<executed|/execute>
-directly rather than L<compiled|/compiler> to another form of file
-before execution. Also, in the context of L</Unicode>, a writing
-system for a particular language or group of languages, such as Greek,
-Bengali, or Klingon.
-
-=item script kiddie
-
-A L</cracker> who is not a L</hacker>, but knows just enough to run
-canned scripts. A cargo-cult programmer.
-
-=item sed
-
-A venerable Stream EDitor from which Perl derives some of its ideas.
-
-=item semaphore
-
-A fancy kind of interlock that prevents multiple L<threads|/thread> or
-L<processes|/process> from using up the same resources simultaneously.
-
-=item separator
-
-A L</character> or L</string> that keeps two surrounding strings from
-being confused with each other. The L<split|perlfunc/split> function
-works on separators. Not to be confused with L<delimiters|/delimiter>
-or L<terminators|/terminator>. The "or" in the previous sentence
-separated the two alternatives.
-
-=item serialization
-
-Putting a fancy L</data structure> into linear order so that it can be
-stored as a L</string> in a disk file or database or sent through a
-L</pipe>. Also called marshalling.
-
-=item server
-
-In networking, a L</process> that either advertises a L</service> or
-just hangs around at a known location and waits for L<clients|/client>
-who need service to get in touch with it.
-
-=item service
-
-Something you do for someone else to make them happy, like giving them
-the time of day (or of their life). On some machines, well-known
-services are listed by the L<getservent|perlfunc/getservent> function.
-
-=item setgid
-
-Same as L</setuid>, only having to do with giving away L</group>
-privileges.
-
-=item setuid
-
-Said of a program that runs with the privileges of its L</owner>
-rather than (as is usually the case) the privileges of whoever is
-running it. Also describes the bit in the mode word (L</permission
-bits>) that controls the feature. This bit must be explicitly set by
-the owner to enable this feature, and the program must be carefully
-written not to give away more privileges than it ought to.
-
-=item shared memory
-
-A piece of L</memory> accessible by two different
-L<processes|/process> who otherwise would not see each other's memory.
-
-=item shebang
-
-Irish for the whole McGillicuddy. In Perl culture, a portmanteau of
-"sharp" and "bang", meaning the C<#!> sequence that tells the system
-where to find the interpreter.
-
-=item shell
-
-A L</command>-line L</interpreter>. The program that interactively
-gives you a prompt, accepts one or more L<lines|/line> of input, and
-executes the programs you mentioned, feeding each of them their proper
-L<arguments|/argument> and input data. Shells can also execute
-scripts containing such commands. Under Unix, typical shells include
-the Bourne shell (I</bin/sh>), the C shell (I</bin/csh>), and the Korn
-shell (I</bin/ksh>). Perl is not strictly a shell because it's not
-interactive (although Perl programs can be interactive).
-
-=item side effects
-
-Something extra that happens when you evaluate an L</expression>.
-Nowadays it can refer to almost anything. For example, evaluating a
-simple assignment statement typically has the "side effect" of
-assigning a value to a variable. (And you thought assigning the value
-was your primary intent in the first place!) Likewise, assigning a
-value to the special variable C<$|> (C<$AUTOFLUSH>) has the side
-effect of forcing a flush after every L<write|perlfunc/write> or
-L<print|perlfunc/print> on the currently selected filehandle.
-
-=item signal
-
-A bolt out of the blue; that is, an event triggered by the
-L</operating system>, probably when you're least expecting it.
-
-=item signal handler
-
-A L</subroutine> that, instead of being content to be called in the
-normal fashion, sits around waiting for a bolt out of the blue before
-it will deign to L</execute>. Under Perl, bolts out of the blue are
-called signals, and you send them with the L<kill|perlfunc/kill>
-built-in. See L<perlvar/%SIG> and L<perlipc/Signals>.
-
-=item single inheritance
-
-The features you got from your mother, if she told you that you don't
-have a father. (See also L</inheritance> and L</multiple
-inheritance>.) In computer languages, the notion that
-L<classes|/class> reproduce asexually so that a given class can only
-have one direct ancestor or L</base class>. Perl supplies no such
-restriction, though you may certainly program Perl that way if you
-like.
-
-=item slice
-
-A selection of any number of L<elements|/element> from a L</list>,
-L</array>, or L</hash>.
-
-=item slurp
-
-To read an entire L</file> into a L</string> in one operation.
-
-=item socket
-
-An endpoint for network communication among multiple
-L<processes|/process> that works much like a telephone or a post
-office box. The most important thing about a socket is its L</network
-address> (like a phone number). Different kinds of sockets have
-different kinds of addresses--some look like filenames, and some
-don't.
-
-=item soft reference
-
-See L</symbolic reference>.
-
-=item source filter
-
-A special kind of L</module> that does L</preprocessing> on your
-script just before it gets to the L</tokener>.
-
-=item stack
-
-A device you can put things on the top of, and later take them back
-off in the opposite order in which you put them on. See L</LIFO>.
-
-=item standard
-
-Included in the official Perl distribution, as in a standard module, a
-standard tool, or a standard Perl L</manpage>.
-
-=item standard error
-
-The default output L</stream> for nasty remarks that don't belong in
-L</standard output>. Represented within a Perl program by the
-L</filehandle> L</STDERR>. You can use this stream explicitly, but the
-L<die|perlfunc/die> and L<warn|perlfunc/warn> built-ins write to your
-standard error stream automatically.
-
-=item standard I/O
-
-A standard C library for doing L<buffered|/buffer> input and output to
-the L</operating system>. (The "standard" of standard I/O is only
-marginally related to the "standard" of standard input and output.)
-In general, Perl relies on whatever implementation of standard I/O a
-given operating system supplies, so the buffering characteristics of a
-Perl program on one machine may not exactly match those on another
-machine. Normally this only influences efficiency, not semantics. If
-your standard I/O package is doing block buffering and you want it to
-L</flush> the buffer more often, just set the C<$|> variable to a true
-value.
-
-=item standard input
-
-The default input L</stream> for your program, which if possible
-shouldn't care where its data is coming from. Represented within a
-Perl program by the L</filehandle> L</STDIN>.
-
-=item standard output
-
-The default output L</stream> for your program, which if possible
-shouldn't care where its data is going. Represented within a Perl
-program by the L</filehandle> L</STDOUT>.
-
-=item stat structure
-
-A special internal spot in which Perl keeps the information about the
-last L</file> on which you requested information.
-
-=item statement
-
-A L</command> to the computer about what to do next, like a step in a
-recipe: "Add marmalade to batter and mix until mixed." A statement is
-distinguished from a L</declaration>, which doesn't tell the computer
-to do anything, but just to learn something.
-
-=item statement modifier
-
-A L</conditional> or L</loop> that you put after the L</statement>
-instead of before, if you know what we mean.
-
-=item static
-
-Varying slowly compared to something else. (Unfortunately, everything
-is relatively stable compared to something else, except for certain
-elementary particles, and we're not so sure about them.) In
-computers, where things are supposed to vary rapidly, "static" has a
-derogatory connotation, indicating a slightly dysfunctional
-L</variable>, L</subroutine>, or L</method>. In Perl culture, the
-word is politely avoided.
-
-=item static method
-
-No such thing. See L</class method>.
-
-=item static scoping
-
-No such thing. See L</lexical scoping>.
-
-=item static variable
-
-No such thing. Just use a L</lexical variable> in a scope larger than
-your L</subroutine>.
-
-=item status
-
-The L</value> returned to the parent L</process> when one of its child
-processes dies. This value is placed in the special variable C<$?>.
-Its upper eight L<bits|/bit> are the exit status of the defunct
-process, and its lower eight bits identify the signal (if any) that
-the process died from. On Unix systems, this status value is the same
-as the status word returned by I<wait>(2). See L<perlfunc/system>.
-
-=item STDERR
-
-See L</standard error>.
-
-=item STDIN
-
-See L</standard input>.
-
-=item STDIO
-
-See L</standard IE<sol>O>.
-
-=item STDOUT
-
-See L</standard output>.
-
-=item stream
-
-A flow of data into or out of a process as a steady sequence of bytes
-or characters, without the appearance of being broken up into packets.
-This is a kind of L</interface>--the underlying L</implementation> may
-well break your data up into separate packets for delivery, but this
-is hidden from you.
-
-=item string
-
-A sequence of characters such as "He said !@#*&%@#*?!". A string does
-not have to be entirely printable.
-
-=item string context
-
-The situation in which an expression is expected by its surroundings
-(the code calling it) to return a L</string>. See also L</context>
-and L</numeric context>.
-
-=item stringification
-
-The process of producing a L</string> representation of an abstract
-object.
-
-=item struct
-
-C keyword introducing a structure definition or name.
-
-=item structure
-
-See L</data structure>.
-
-=item subclass
-
-See L</derived class>.
-
-=item subpattern
-
-A component of a L</regular expression> pattern.
-
-=item subroutine
-
-A named or otherwise accessible piece of program that can be invoked
-from elsewhere in the program in order to accomplish some sub-goal of
-the program. A subroutine is often parameterized to accomplish
-different but related things depending on its input
-L<arguments|/argument>. If the subroutine returns a meaningful
-L</value>, it is also called a L</function>.
-
-=item subscript
-
-A L</value> that indicates the position of a particular L</array>
-L</element> in an array.
-
-=item substitution
-
-Changing parts of a string via the C<s///> operator. (We avoid use of
-this term to mean L</variable interpolation>.)
-
-=item substring
-
-A portion of a L</string>, starting at a certain L</character>
-position (L</offset>) and proceeding for a certain number of
-characters.
-
-=item superclass
-
-See L</base class>.
-
-=item superuser
-
-The person whom the L</operating system> will let do almost anything.
-Typically your system administrator or someone pretending to be your
-system administrator. On Unix systems, the L</root> user. On Windows
-systems, usually the Administrator user.
-
-=item SV
-
-Short for "scalar value". But within the Perl interpreter every
-L</referent> is treated as a member of a class derived from SV, in an
-object-oriented sort of way. Every L</value> inside Perl is passed
-around as a C language C<SV*> pointer. The SV L</struct> knows its
-own "referent type", and the code is smart enough (we hope) not to try
-to call a L</hash> function on a L</subroutine>.
-
-=item switch
-
-An option you give on a command line to influence the way your program
-works, usually introduced with a minus sign. The word is also used as
-a nickname for a L</switch statement>.
-
-=item switch cluster
-
-The combination of multiple command-line switches (e.g., B<-a -b -c>)
-into one switch (e.g., B<-abc>). Any switch with an additional
-L</argument> must be the last switch in a cluster.
-
-=item switch statement
-
-A program technique that lets you evaluate an L</expression> and then,
-based on the value of the expression, do a multiway branch to the
-appropriate piece of code for that value. Also called a "case
-structure", named after the similar Pascal construct. See
-L<perlsyn/"Switch statements">.
-
-=item symbol
-
-Generally, any L</token> or L</metasymbol>. Often used more
-specifically to mean the sort of name you might find in a L</symbol
-table>.
-
-=item symbol table
-
-Where a L</compiler> remembers symbols. A program like Perl must
-somehow remember all the names of all the L<variables|/variable>,
-L<filehandles|/filehandle>, and L<subroutines|/subroutine> you've
-used. It does this by placing the names in a symbol table, which is
-implemented in Perl using a L</hash table>. There is a separate
-symbol table for each L</package> to give each package its own
-L</namespace>.
-
-=item symbolic debugger
-
-A program that lets you step through the L<execution|/execute> of your
-program, stopping or printing things out here and there to see whether
-anything has gone wrong, and if so, what. The "symbolic" part just
-means that you can talk to the debugger using the same symbols with
-which your program is written.
-
-=item symbolic link
-
-An alternate filename that points to the real L</filename>, which in
-turn points to the real L</file>. Whenever the L</operating system>
-is trying to parse a L</pathname> containing a symbolic link, it
-merely substitutes the new name and continues parsing.
-
-=item symbolic reference
-
-A variable whose value is the name of another variable or subroutine.
-By L<dereferencing|/dereference> the first variable, you can get at
-the second one. Symbolic references are illegal under L<use strict
-'refs'|strict/strict refs>.
-
-=item synchronous
-
-Programming in which the orderly sequence of events can be determined;
-that is, when things happen one after the other, not at the same time.
-
-=item syntactic sugar
-
-An alternative way of writing something more easily; a shortcut.
-
-=item syntax
-
-From Greek, "with-arrangement". How things (particularly symbols) are
-put together with each other.
-
-=item syntax tree
-
-An internal representation of your program wherein lower-level
-L<constructs|/construct> dangle off the higher-level constructs
-enclosing them.
-
-=item syscall
-
-A L</function> call directly to the L</operating system>. Many of the
-important subroutines and functions you use aren't direct system
-calls, but are built up in one or more layers above the system call
-level. In general, Perl programmers don't need to worry about the
-distinction. However, if you do happen to know which Perl functions
-are really syscalls, you can predict which of these will set the C<$!>
-(C<$ERRNO>) variable on failure. Unfortunately, beginning programmers
-often confusingly employ the term "system call" to mean what happens
-when you call the Perl L<system|perlfunc/system> function, which
-actually involves many syscalls. To avoid any confusion, we nearly
-always use say "syscall" for something you could call indirectly via
-Perl's L<syscall|perlfunc/syscall> function, and never for something
-you would call with Perl's L<system|perlfunc/system> function.
-
-=back
-
-=head2 T
-
-=over 4
-
-=item tainted
-
-Said of data derived from the grubby hands of a user and thus unsafe
-for a secure program to rely on. Perl does taint checks if you run a
-L</setuid> (or L</setgid>) program, or if you use the B<-T> switch.
-
-=item TCP
-
-Short for Transmission Control Protocol. A protocol wrapped around
-the Internet Protocol to make an unreliable packet transmission
-mechanism appear to the application program to be a reliable
-L</stream> of bytes. (Usually.)
-
-=item term
-
-Short for a "terminal", that is, a leaf node of a L</syntax tree>. A
-thing that functions grammatically as an L</operand> for the operators
-in an expression.
-
-=item terminator
-
-A L</character> or L</string> that marks the end of another string.
-The C<$/> variable contains the string that terminates a
-L<readline|perlfunc/readline> operation, which L<chomp|perlfunc/chomp>
-deletes from the end. Not to be confused with
-L<delimiters|/delimiter> or L<separators|/separator>. The period at
-the end of this sentence is a terminator.
-
-=item ternary
-
-An L</operator> taking three L<operands|/operand>. Sometimes
-pronounced L</trinary>.
-
-=item text
-
-A L</string> or L</file> containing primarily printable characters.
-
-=item thread
-
-Like a forked process, but without L</fork>'s inherent memory
-protection. A thread is lighter weight than a full process, in that a
-process could have multiple threads running around in it, all fighting
-over the same process's memory space unless steps are taken to protect
-threads from each other. See L<threads>.
-
-=item tie
-
-The bond between a magical variable and its implementation class. See
-L<perlfunc/tie> and L<perltie>.
-
-=item TMTOWTDI
-
-There's More Than One Way To Do It, the Perl Motto. The notion that
-there can be more than one valid path to solving a programming problem
-in context. (This doesn't mean that more ways are always better or
-that all possible paths are equally desirable--just that there need
-not be One True Way.) Pronounced TimToady.
-
-=item token
-
-A morpheme in a programming language, the smallest unit of text with
-semantic significance.
-
-=item tokener
-
-A module that breaks a program text into a sequence of
-L<tokens|/token> for later analysis by a parser.
-
-=item tokenizing
-
-Splitting up a program text into L<tokens|/token>. Also known as
-"lexing", in which case you get "lexemes" instead of tokens.
-
-=item toolbox approach
-
-The notion that, with a complete set of simple tools that work well
-together, you can build almost anything you want. Which is fine if
-you're assembling a tricycle, but if you're building a defranishizing
-comboflux regurgalator, you really want your own machine shop in which
-to build special tools. Perl is sort of a machine shop.
-
-=item transliterate
-
-To turn one string representation into another by mapping each
-character of the source string to its corresponding character in the
-result string. See
-L<perlop/trE<sol>SEARCHLISTE<sol>REPLACEMENTLISTE<sol>cdsr>.
-
-=item trigger
-
-An event that causes a L</handler> to be run.
-
-=item trinary
-
-Not a stellar system with three stars, but an L</operator> taking
-three L<operands|/operand>. Sometimes pronounced L</ternary>.
-
-=item troff
-
-A venerable typesetting language from which Perl derives the name of
-its C<$%> variable and which is secretly used in the production of
-Camel books.
-
-=item true
-
-Any scalar value that doesn't evaluate to 0 or C<"">.
-
-=item truncating
-
-Emptying a file of existing contents, either automatically when
-opening a file for writing or explicitly via the
-L<truncate|perlfunc/truncate> function.
-
-=item type
-
-See L</data type> and L</class>.
-
-=item type casting
-
-Converting data from one type to another. C permits this. Perl does
-not need it. Nor want it.
-
-=item typed lexical
-
-A L</lexical variable> that is declared with a L</class> type: C<my
-Pony $bill>.
-
-=item typedef
-
-A type definition in the C language.
-
-=item typeglob
-
-Use of a single identifier, prefixed with C<*>. For example, C<*name>
-stands for any or all of C<$name>, C<@name>, C<%name>, C<&name>, or
-just C<name>. How you use it determines whether it is interpreted as
-all or only one of them. See L<perldata/Typeglobs and Filehandles>.
-
-=item typemap
-
-A description of how C types may be transformed to and from Perl types
-within an L</extension> module written in L</XS>.
-
-=back
-
-=head2 U
-
-=over 4
-
-=item UDP
-
-User Datagram Protocol, the typical way to send L<datagrams|/datagram>
-over the Internet.
-
-=item UID
-
-A user ID. Often used in the context of L</file> or L</process>
-ownership.
-
-=item umask
-
-A mask of those L</permission bits> that should be forced off when
-creating files or directories, in order to establish a policy of whom
-you'll ordinarily deny access to. See the L<umask|perlfunc/umask>
-function.
-
-=item unary operator
-
-An operator with only one L</operand>, like C<!> or
-L<chdir|perlfunc/chdir>. Unary operators are usually prefix
-operators; that is, they precede their operand. The C<++> and C<-->
-operators can be either prefix or postfix. (Their position I<does>
-change their meanings.)
-
-=item Unicode
-
-A character set comprising all the major character sets of the world,
-more or less. See L<perlunicode> and L<http://www.unicode.org>.
-
-=item Unix
-
-A very large and constantly evolving language with several alternative
-and largely incompatible syntaxes, in which anyone can define anything
-any way they choose, and usually do. Speakers of this language think
-it's easy to learn because it's so easily twisted to one's own ends,
-but dialectical differences make tribal intercommunication nearly
-impossible, and travelers are often reduced to a pidgin-like subset of
-the language. To be universally understood, a Unix shell programmer
-must spend years of study in the art. Many have abandoned this
-discipline and now communicate via an Esperanto-like language called
-Perl.
-
-In ancient times, Unix was also used to refer to some code that a
-couple of people at Bell Labs wrote to make use of a PDP-7 computer
-that wasn't doing much of anything else at the time.
-
-=back
-
-=head2 V
-
-=over 4
-
-=item value
-
-An actual piece of data, in contrast to all the variables, references,
-keys, indexes, operators, and whatnot that you need to access the
-value.
-
-=item variable
-
-A named storage location that can hold any of various kinds of
-L</value>, as your program sees fit.
-
-=item variable interpolation
-
-The L</interpolation> of a scalar or array variable into a string.
-
-=item variadic
-
-Said of a L</function> that happily receives an indeterminate number
-of L</actual arguments>.
-
-=item vector
-
-Mathematical jargon for a list of L<scalar values|/scalar value>.
-
-=item virtual
-
-Providing the appearance of something without the reality, as in:
-virtual memory is not real memory. (See also L</memory>.) The
-opposite of "virtual" is "transparent", which means providing the
-reality of something without the appearance, as in: Perl handles the
-variable-length UTF-8 character encoding transparently.
-
-=item void context
-
-A form of L</scalar context> in which an L</expression> is not
-expected to return any L</value> at all and is evaluated for its
-L</side effects> alone.
-
-=item v-string
-
-A "version" or "vector" L</string> specified with a C<v> followed by a
-series of decimal integers in dot notation, for instance,
-C<v1.20.300.4000>. Each number turns into a L</character> with the
-specified ordinal value. (The C<v> is optional when there are at
-least three integers.)
-
-=back
-
-=head2 W
-
-=over 4
-
-=item warning
-
-A message printed to the L</STDERR> stream to the effect that something
-might be wrong but isn't worth blowing up over. See L<perlfunc/warn>
-and the L<warnings> pragma.
-
-=item watch expression
-
-An expression which, when its value changes, causes a breakpoint in
-the Perl debugger.
-
-=item whitespace
-
-A L</character> that moves your cursor but doesn't otherwise put
-anything on your screen. Typically refers to any of: space, tab, line
-feed, carriage return, or form feed.
-
-=item word
-
-In normal "computerese", the piece of data of the size most
-efficiently handled by your computer, typically 32 bits or so, give or
-take a few powers of 2. In Perl culture, it more often refers to an
-alphanumeric L</identifier> (including underscores), or to a string of
-nonwhitespace L<characters|/character> bounded by whitespace or string
-boundaries.
-
-=item working directory
-
-Your current L</directory>, from which relative pathnames are
-interpreted by the L</operating system>. The operating system knows
-your current directory because you told it with a
-L<chdir|perlfunc/chdir> or because you started out in the place where
-your parent L</process> was when you were born.
-
-=item wrapper
-
-A program or subroutine that runs some other program or subroutine for
-you, modifying some of its input or output to better suit your
-purposes.
-
-=item WYSIWYG
-
-What You See Is What You Get. Usually used when something that
-appears on the screen matches how it will eventually look, like Perl's
-L<format|perlfunc/format> declarations. Also used to mean the
-opposite of magic because everything works exactly as it appears, as
-in the three-argument form of L<open|perlfunc/open>.
-
-=back
-
-=head2 X
-
-=over 4
-
-=item XS
-
-An extraordinarily exported, expeditiously excellent, expressly
-eXternal Subroutine, executed in existing C or C++ or in an exciting
-new extension language called (exasperatingly) XS. Examine L<perlxs>
-for the exact explanation or L<perlxstut> for an exemplary unexacting
-one.
-
-=item XSUB
-
-An external L</subroutine> defined in L</XS>.
-
-=back
-
-=head2 Y
-
-=over 4
-
-=item yacc
-
-Yet Another Compiler Compiler. A parser generator without which Perl
-probably would not have existed. See the file I<perly.y> in the Perl
-source distribution.
-
-=back
-
-=head2 Z
-
-=over 4
-
-=item zero width
-
-A subpattern L</assertion> matching the L</null string> between
-L<characters|/character>.
-
-=item zombie
-
-A process that has died (exited) but whose parent has not yet received
-proper notification of its demise by virtue of having called
-L<wait|perlfunc/wait> or L<waitpid|perlfunc/waitpid>. If you
-L<fork|perlfunc/fork>, you must clean up after your child processes
-when they exit, or else the process table will fill up and your system
-administrator will Not Be Happy with you.
-
-=back
-
-=head1 AUTHOR AND COPYRIGHT
-
-Based on the Glossary of Programming Perl, Third Edition,
-by Larry Wall, Tom Christiansen & Jon Orwant.
-Copyright (c) 2000, 1996, 1991 O'Reilly Media, Inc.
-This document may be distributed under the same terms as Perl itself.
Modified: vendor/perl/dist/pod/perlhack.pod
===================================================================
--- vendor/perl/dist/pod/perlhack.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlhack.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -10,7 +10,7 @@
=head1 DESCRIPTION
-This document explains how Perl development works. It includes details
+This document explains how Perl development works. It includes details
about the Perl 5 Porters email list, the Perl repository, the Perlbug
bug tracker, patch guidelines, and commentary on Perl development
philosophy.
@@ -24,11 +24,18 @@
=item * Check out the source repository
-The perl source is in a git repository. You can clone the repository
+The perl source is in a git repository. You can clone the repository
with the following command:
% git clone git://perl5.git.perl.org/perl.git perl
+=item * Ensure you're following the latest advice
+
+In case the advice in this guide has been updated recently, read the
+latest version directly from the perl source:
+
+ % perldoc pod/perlhack.pod
+
=item * Make your change
Hack, hack, hack.
@@ -49,7 +56,7 @@
% git commit -a -m 'Commit message goes here'
Make sure the commit message describes your change in a single
-sentence. For example, "Fixed spelling errors in perlhack.pod".
+sentence. For example, "Fixed spelling errors in perlhack.pod".
=item * Send your change to perlbug
@@ -56,28 +63,49 @@
The next step is to submit your patch to the Perl core ticket system
via email.
-Assuming your patch consists of a single git commit, the following
-writes the file as a MIME attachment, and sends it with a meaningful
+If your changes are in a single git commit, run the following commands
+to write the file as a MIME attachment and send it with a meaningful
subject:
% git format-patch -1 --attach
- % perlbug -s "[PATCH] $(git log -1 --oneline HEAD)" -f 0001-*.patch
+ % ./perl -Ilib utils/perlbug -s "[PATCH] $(
+ git log -1 --oneline HEAD)" -f 0001-*.patch
The perlbug program will ask you a few questions about your email
-address and the patch you're submitting. Once you've answered them it
+address and the patch you're submitting. Once you've answered them it
will submit your patch via email.
+If your changes are in multiple commits, generate a patch file
+containing them all, and attach that:
+
+ % git format-patch origin/blead --attach --stdout > patches
+ % ./perl -Ilib utils/perlbug -f patches
+
+When prompted, pick a subject that summarizes your changes overall and
+has "[PATCH]" at the beginning.
+
=item * Thank you
The porters appreciate the time you spent helping to make Perl better.
Thank you!
+=item * Next time
+
+The next time you wish to make a patch, you need to start from the
+latest perl in a pristine state. Check you don't have any local changes
+or added files in your perl check-out which you wish to keep, then run
+these commands:
+
+ % git pull
+ % git reset --hard origin/blead
+ % git clean -dxf
+
=back
=head1 BUG REPORTING
If you want to report a bug in Perl, you must use the F<perlbug>
-command line tool. This tool will ensure that your bug report includes
+command line tool. This tool will ensure that your bug report includes
all the relevant system and configuration information.
To browse existing Perl bugs and patches, you can use the web interface
@@ -84,22 +112,22 @@
at L<http://rt.perl.org/>.
Please check the archive of the perl5-porters list (see below) and/or
-the bug tracking system before submitting a bug report. Often, you'll
+the bug tracking system before submitting a bug report. Often, you'll
find that the bug has been reported already.
You can log in to the bug tracking system and comment on existing bug
-reports. If you have additional information regarding an existing bug,
-please add it. This will help the porters fix the bug.
+reports. If you have additional information regarding an existing bug,
+please add it. This will help the porters fix the bug.
=head1 PERL 5 PORTERS
The perl5-porters (p5p) mailing list is where the Perl standard
-distribution is maintained and developed. The people who maintain Perl
+distribution is maintained and developed. The people who maintain Perl
are also referred to as the "Perl 5 Porters", "p5p" or just the
"porters".
A searchable archive of the list is available at
-L<http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/>. There is
+L<http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/>. There is
also another archive at
L<http://archive.develooper.com/perl5-porters@perl.org/>.
@@ -107,7 +135,7 @@
The perl5-changes mailing list receives a copy of each patch that gets
submitted to the maintenance and development branches of the perl
-repository. See L<http://lists.perl.org/list/perl5-changes.html> for
+repository. See L<http://lists.perl.org/list/perl5-changes.html> for
subscription and archive information.
=head2 #p5p on IRC
@@ -119,8 +147,8 @@
=head1 GETTING THE PERL SOURCE
All of Perl's source code is kept centrally in a Git repository at
-I<perl5.git.perl.org>. The repository contains many Perl revisions from
-Perl 1 onwards and all the revisions from Perforce, the previous
+I<perl5.git.perl.org>. The repository contains many Perl revisions
+from Perl 1 onwards and all the revisions from Perforce, the previous
version control system.
For much more detail on using git with the Perl repository, please see
@@ -128,7 +156,7 @@
=head2 Read access via Git
-You will need a copy of Git for your computer. You can fetch a copy of
+You will need a copy of Git for your computer. You can fetch a copy of
the repository using the git protocol:
% git clone git://perl5.git.perl.org/perl.git perl
@@ -143,10 +171,10 @@
=head2 Read access via the web
-You may access the repository over the web. This allows you to browse
+You may access the repository over the web. This allows you to browse
the tree, see recent commits, subscribe to RSS feeds for the changes,
-search for particular commits and more. You may access it at
-L<http://perl5.git.perl.org/perl.git>. A mirror of the repository is
+search for particular commits and more. You may access it at
+L<http://perl5.git.perl.org/perl.git>. A mirror of the repository is
found at L<http://github.com/mirrors/perl>.
=head2 Read access via rsync
@@ -154,18 +182,18 @@
You can also choose to use rsync to get a copy of the current source
tree for the bleadperl branch and all maintenance branches:
- % rsync -avz rsync://perl5.git.perl.org/perl-current .
- % rsync -avz rsync://perl5.git.perl.org/perl-5.12.x .
- % rsync -avz rsync://perl5.git.perl.org/perl-5.10.x .
- % rsync -avz rsync://perl5.git.perl.org/perl-5.8.x .
- % rsync -avz rsync://perl5.git.perl.org/perl-5.6.x .
- % rsync -avz rsync://perl5.git.perl.org/perl-5.005xx .
+ % rsync -avz rsync://perl5.git.perl.org/perl-current .
+ % rsync -avz rsync://perl5.git.perl.org/perl-5.12.x .
+ % rsync -avz rsync://perl5.git.perl.org/perl-5.10.x .
+ % rsync -avz rsync://perl5.git.perl.org/perl-5.8.x .
+ % rsync -avz rsync://perl5.git.perl.org/perl-5.6.x .
+ % rsync -avz rsync://perl5.git.perl.org/perl-5.005xx .
(Add the C<--delete> option to remove leftover files.)
To get a full list of the available sync points:
- % rsync perl5.git.perl.org::
+ % rsync perl5.git.perl.org::
=head2 Write access via git
@@ -175,40 +203,41 @@
=head1 PATCHING PERL
If you're planning to do more extensive work than a single small fix,
-we encourage you to read the documentation below. This will help you
+we encourage you to read the documentation below. This will help you
focus your work and make your patches easier to incorporate into the
Perl source.
=head2 Submitting patches
-If you have a small patch to submit, please submit it via perlbug. You
-can also send email directly to perlbug at perl.org. Please note that
+If you have a small patch to submit, please submit it via perlbug. You
+can also send email directly to perlbug at perl.org. Please note that
messages sent to perlbug may be held in a moderation queue, so you
won't receive a response immediately.
You'll know your submission has been processed when you receive an
-email from our ticket tracking system. This email will give you a
-ticket number. Once your patch has made it to the ticket tracking
+email from our ticket tracking system. This email will give you a
+ticket number. Once your patch has made it to the ticket tracking
system, it will also be sent to the perl5-porters at perl.org list.
-Patches are reviewed and discussed on the p5p list. Simple,
+Patches are reviewed and discussed on the p5p list. Simple,
uncontroversial patches will usually be applied without any discussion.
When the patch is applied, the ticket will be updated and you will
-receive email. In addition, an email will be sent to the p5p list.
+receive email. In addition, an email will be sent to the p5p list.
-In other cases, the patch will need more work or discussion. That will
+In other cases, the patch will need more work or discussion. That will
happen on the p5p list.
You are encouraged to participate in the discussion and advocate for
-your patch. Sometimes your patch may get lost in the shuffle. It's
+your patch. Sometimes your patch may get lost in the shuffle. It's
appropriate to send a reminder email to p5p if no action has been taken
-in a month. Please remember that the Perl 5 developers are all
+in a month. Please remember that the Perl 5 developers are all
volunteers, and be polite.
Changes are always applied directly to the main development branch,
-called "blead". Some patches may be backported to a maintenance branch.
-If you think your patch is appropriate for the maintenance branch,
-please explain why when you submit it.
+called "blead". Some patches may be backported to a maintenance
+branch. If you think your patch is appropriate for the maintenance
+branch (see L<perlpolicy/MAINTENANCE BRANCHES>), please explain why
+when you submit it.
=head2 Getting your patch accepted
@@ -218,10 +247,10 @@
=head3 Patch style
If you used git to check out the Perl source, then using C<git
-format-patch> will produce a patch in a style suitable for Perl. The
+format-patch> will produce a patch in a style suitable for Perl. The
C<format-patch> command produces one patch file for each commit you
-made. If you prefer to send a single patch for all commits, you can use
-C<git diff>.
+made. If you prefer to send a single patch for all commits, you can
+use C<git diff>.
% git checkout blead
% git pull
@@ -228,15 +257,15 @@
% git diff blead my-branch-name
This produces a patch based on the difference between blead and your
-current branch. It's important to make sure that blead is up to date
+current branch. It's important to make sure that blead is up to date
before producing the diff, that's why we call C<git pull> first.
-We strongly recommend that you use git if possible. It will make your
+We strongly recommend that you use git if possible. It will make your
life easier, and ours as well.
However, if you're not using git, you can still produce a suitable
-patch. You'll need a pristine copy of the Perl source to diff against.
-The porters prefer unified diffs. Using GNU C<diff>, you can produce a
+patch. You'll need a pristine copy of the Perl source to diff against.
+The porters prefer unified diffs. Using GNU C<diff>, you can produce a
diff like this:
% diff -Npurd perl.pristine perl.mine
@@ -247,11 +276,11 @@
=head3 Commit message
As you craft each patch you intend to submit to the Perl core, it's
-important to write a good commit message. This is especially important
+important to write a good commit message. This is especially important
if your submission will consist of a series of commits.
The first line of the commit message should be a short description
-without a period. It should be no longer than the subject line of an
+without a period. It should be no longer than the subject line of an
email, 50 characters being a good rule of thumb.
A lot of Git tools (Gitweb, GitHub, git log --pretty=oneline, ...) will
@@ -271,11 +300,11 @@
=item * Why
Your commit message should describe why the change you are making is
-important. When someone looks at your change in six months or six
+important. When someone looks at your change in six months or six
years, your intent should be clear.
If you're deprecating a feature with the intent of later simplifying
-another bit of code, say so. If you're fixing a performance problem or
+another bit of code, say so. If you're fixing a performance problem or
adding a new feature to support some other bit of the core, mention
that.
@@ -294,11 +323,11 @@
=back
A commit message isn't intended to take the place of comments in your
-code. Commit messages should describe the change you made, while code
+code. Commit messages should describe the change you made, while code
comments should describe the current state of the code.
If you've just implemented a new feature, complete with doc, tests and
-well-commented code, a brief commit message will often suffice. If,
+well-commented code, a brief commit message will often suffice. If,
however, you've just changed a single character deep in the parser or
lexer, you might need to write a small novel to ensure that future
readers understand what you did and why you did it.
@@ -305,12 +334,12 @@
=head3 Comments, Comments, Comments
-Be sure to adequately comment your code. While commenting every line is
-unnecessary, anything that takes advantage of side effects of
+Be sure to adequately comment your code. While commenting every line
+is unnecessary, anything that takes advantage of side effects of
operators, that creates changes that will be felt outside of the
function being patched, or that others may find confusing should be
-documented. If you are going to err, it is better to err on the side of
-adding too many comments than too few.
+documented. If you are going to err, it is better to err on the side
+of adding too many comments than too few.
The best comments explain I<why> the code does what it does, not I<what
it does>.
@@ -393,8 +422,8 @@
need to be able to compile without warnings with commonly used extra
compilation flags, such as gcc's C<-Wswitch-default> which warns
whenever a switch statement does not have a "default" case. The use of
-these extra flags is to catch potential problems in legal C code, and is
-often used by Perl aggregators, such as Linux distributors.
+these extra flags is to catch potential problems in legal C code, and
+is often used by Perl aggregators, such as Linux distributors.
=back
@@ -402,7 +431,7 @@
If your patch changes code (rather than just changing documentation),
you should also include one or more test cases which illustrate the bug
-you're fixing or validate the new functionality you're adding. In
+you're fixing or validate the new functionality you're adding. In
general, you should update an existing test file rather than create a
new one.
@@ -413,7 +442,7 @@
=item *
-Know what you're testing. Read the docs, and the source.
+Know what you're testing. Read the docs, and the source.
=item *
@@ -443,7 +472,7 @@
=item *
-Avoid using qx// and system() unless you are testing for them. If you
+Avoid using qx// and system() unless you are testing for them. If you
do use them, make sure that you cover _all_ perl platforms.
=item *
@@ -465,7 +494,7 @@
=item *
-Make updating the '1..42' string unnecessary. Or make sure that you
+Make updating the '1..42' string unnecessary. Or make sure that you
update it.
=item *
@@ -488,7 +517,7 @@
consideration.
Modules in the F<cpan/> directory of the source tree are maintained
-outside of the Perl core. When the author updates the module, the
+outside of the Perl core. When the author updates the module, the
updates are simply copied into the core. See that module's
documentation or its listing on L<http://search.cpan.org/> for more
information on reporting bugs and submitting patches.
@@ -508,8 +537,8 @@
For changes significant enough to warrant a F<pod/perldelta.pod> entry,
the porters will greatly appreciate it if you submit a delta entry
-along with your actual change. Significant changes include, but are not
-limited to:
+along with your actual change. Significant changes include, but are
+not limited to:
=over 4
@@ -549,13 +578,13 @@
=back
Please make sure you add the perldelta entry to the right section
-within F<pod/perldelta.pod>. More information on how to write good
+within F<pod/perldelta.pod>. More information on how to write good
perldelta entries is available in the C<Style> section of
F<Porting/how_to_write_a_perldelta.pod>.
=head2 What makes for a good patch?
-New features and extensions to the language can be contentious. There
+New features and extensions to the language can be contentious. There
is no specific set of criteria which determine what features get added,
but here are some questions to consider when developing a patch:
@@ -589,28 +618,28 @@
=head3 Where is the implementation?
-All the talk in the world is useless without an implementation. In
+All the talk in the world is useless without an implementation. In
almost every case, the person or people who argue for a new feature
-will be expected to be the ones who implement it. Porters capable of
+will be expected to be the ones who implement it. Porters capable of
coding new features have their own agendas, and are not available to
implement your (possibly good) idea.
=head3 Backwards compatibility
-It's a cardinal sin to break existing Perl programs. New warnings can
+It's a cardinal sin to break existing Perl programs. New warnings can
be contentious--some say that a program that emits warnings is not
-broken, while others say it is. Adding keywords has the potential to
+broken, while others say it is. Adding keywords has the potential to
break programs, changing the meaning of existing token sequences or
functions might break programs.
The Perl 5 core includes mechanisms to help porters make backwards
incompatible changes more compatible such as the L<feature> and
-L<deprecate> modules. Please use them when appropriate.
+L<deprecate> modules. Please use them when appropriate.
=head3 Could it be a module instead?
Perl 5 has extension mechanisms, modules and XS, specifically to avoid
-the need to keep changing the Perl interpreter. You can write modules
+the need to keep changing the Perl interpreter. You can write modules
that export functions, you can give those functions prototypes so they
can be called like built-in functions, you can even write XS code to
mess with the runtime data structures of the Perl interpreter if you
@@ -633,13 +662,13 @@
=head3 How big is it?
-The smaller and more localized the change, the better. Similarly, a
+The smaller and more localized the change, the better. Similarly, a
series of small patches is greatly preferred over a single large patch.
=head3 Does it preclude other desirable features?
A patch is likely to be rejected if it closes off future avenues of
-development. For instance, a patch that placed a true and final
+development. For instance, a patch that placed a true and final
interpretation on prototypes is likely to be rejected because there are
still options for the future of prototypes that haven't been addressed.
@@ -646,13 +675,13 @@
=head3 Is the implementation robust?
Good patches (tight code, complete, correct) stand more chance of going
-in. Sloppy or incorrect patches might be placed on the back burner
+in. Sloppy or incorrect patches might be placed on the back burner
until the pumpking has time to fix, or might be discarded altogether
without further notice.
=head3 Is the implementation generic enough to be portable?
-The worst patches make use of system-specific features. It's highly
+The worst patches make use of system-specific features. It's highly
unlikely that non-portable additions to the Perl language will be
accepted.
@@ -671,7 +700,7 @@
=head3 Is there enough documentation?
Patches without documentation are probably ill-thought out or
-incomplete. No features can be added or changed without documentation,
+incomplete. No features can be added or changed without documentation,
so submitting a patch for the appropriate pod docs as well as the
source code is important.
@@ -678,7 +707,7 @@
=head3 Is there another way to do it?
Larry said "Although the Perl Slogan is I<There's More Than One Way to
-Do It>, I hesitate to make 10 ways to do something". This is a tricky
+Do It>, I hesitate to make 10 ways to do something". This is a tricky
heuristic to navigate, though--one man's essential addition is another
man's pointless cruft.
@@ -689,12 +718,12 @@
=head3 Patches speak louder than words
-Working code is always preferred to pie-in-the-sky ideas. A patch to
+Working code is always preferred to pie-in-the-sky ideas. A patch to
add a feature stands a much higher chance of making it to the language
than does a random feature request, no matter how fervently argued the
-request might be. This ties into "Will it be useful?", as the fact that
-someone took the time to make the patch demonstrates a strong desire
-for the feature.
+request might be. This ties into "Will it be useful?", as the fact
+that someone took the time to make the patch demonstrates a strong
+desire for the feature.
=head1 TESTING
@@ -702,11 +731,12 @@
"ok/not ok" run through Test::Harness, but there are a few special
considerations.
-There are three ways to write a test in the core. L<Test::More>,
-F<t/test.pl> and ad hoc C<print $test ? "ok 42\n" : "not ok 42\n">. The
-decision of which to use depends on what part of the test suite you're
-working on. This is a measure to prevent a high-level failure (such as
-Config.pm breaking) from causing basic functionality tests to fail.
+There are three ways to write a test in the core: L<Test::More>,
+F<t/test.pl> and ad hoc C<print $test ? "ok 42\n" : "not ok 42\n">.
+The decision of which to use depends on what part of the test suite
+you're working on. This is a measure to prevent a high-level failure
+(such as Config.pm breaking) from causing basic functionality tests to
+fail.
The F<t/test.pl> library provides some of the features of
L<Test::More>, but avoids loading most modules and uses as few core
@@ -720,10 +750,10 @@
=item * F<t/base>, F<t/comp> and F<t/opbasic>
Since we don't know if require works, or even subroutines, use ad hoc
-tests for these three. Step carefully to avoid using the feature being
-tested. Tests in F<t/opbasic>, for instance, have been placed there rather
-than in F<t/op> because they test functionality which F<t/test.pl> presumes
-has already been demonstrated to work.
+tests for these three. Step carefully to avoid using the feature being
+tested. Tests in F<t/opbasic>, for instance, have been placed there
+rather than in F<t/op> because they test functionality which
+F<t/test.pl> presumes has already been demonstrated to work.
=item * F<t/cmd>, F<t/run>, F<t/io> and F<t/op>
@@ -736,17 +766,17 @@
=item * Everything else
Now that the core of Perl is tested, L<Test::More> can and should be
-used. You can also use the full suite of core modules in the tests.
+used. You can also use the full suite of core modules in the tests.
=back
When you say "make test", Perl uses the F<t/TEST> program to run the
-test suite (except under Win32 where it uses F<t/harness> instead). All
-tests are run from the F<t/> directory, B<not> the directory which
-contains the test. This causes some problems with the tests in F<lib/>,
-so here's some opportunity for some patching.
+test suite (except under Win32 where it uses F<t/harness> instead).
+All tests are run from the F<t/> directory, B<not> the directory which
+contains the test. This causes some problems with the tests in
+F<lib/>, so here's some opportunity for some patching.
-You must be triply conscious of cross-platform concerns. This usually
+You must be triply conscious of cross-platform concerns. This usually
boils down to using L<File::Spec> and avoiding things like C<fork()>
and C<system()> unless absolutely necessary.
@@ -753,8 +783,8 @@
=head2 Special C<make test> targets
There are various special make targets that can be used to test Perl
-slightly differently than the standard "test" target. Not all them are
-expected to give a 100% success rate. Many of them have several
+slightly differently than the standard "test" target. Not all them are
+expected to give a 100% success rate. Many of them have several
aliases, and many of them are not available on certain operating
systems.
@@ -765,68 +795,25 @@
This runs some basic sanity tests on the source tree and helps catch
basic errors before you submit a patch.
-=item * coretest
-
-Run F<perl> on all core tests (F<t/*> and F<lib/[a-z]*> pragma tests).
-
-(Not available on Win32)
-
-=item * test.deparse
-
-Run all the tests through L<B::Deparse>. Not all tests will succeed.
-
-(Not available on Win32)
-
-=item * test.taintwarn
-
-Run all tests with the B<-t> command-line switch. Not all tests are
-expected to succeed (until they're specifically fixed, of course).
-
-(Not available on Win32)
-
=item * minitest
Run F<miniperl> on F<t/base>, F<t/comp>, F<t/cmd>, F<t/run>, F<t/io>,
F<t/op>, F<t/uni> and F<t/mro> tests.
-=item * test.valgrind check.valgrind utest.valgrind ucheck.valgrind
+=item * test.valgrind check.valgrind
(Only in Linux) Run all the tests using the memory leak + naughty
-memory access tool "valgrind". The log files will be named
+memory access tool "valgrind". The log files will be named
F<testname.valgrind>.
-=item * test.torture torturetest
-
-Run all the usual tests and some extra tests. As of Perl 5.8.0, the
-only extra tests are Abigail's JAPHs, F<t/japh/abigail.t>.
-
-You can also run the torture test with F<t/harness> by giving
-C<-torture> argument to F<t/harness>.
-
-=item * utest ucheck test.utf8 check.utf8
-
-Run all the tests with -Mutf8. Not all tests will succeed.
-
-(Not available on Win32)
-
-=item * minitest.utf16 test.utf16
-
-Runs the tests with UTF-16 encoded scripts, encoded with different
-versions of this encoding.
-
-C<make utest.utf16> runs the test suite with a combination of C<-utf8>
-and C<-utf16> arguments to F<t/TEST>.
-
-(Not available on Win32)
-
=item * test_harness
Run the test suite with the F<t/harness> controlling program, instead
-of F<t/TEST>. F<t/harness> is more sophisticated, and uses the
+of F<t/TEST>. F<t/harness> is more sophisticated, and uses the
L<Test::Harness> module, thus using this test target supposes that perl
-mostly works. The main advantage for our purposes is that it prints a
-detailed summary of failed tests at the end. Also, unlike F<t/TEST>, it
-doesn't redirect stderr to stdout.
+mostly works. The main advantage for our purposes is that it prints a
+detailed summary of failed tests at the end. Also, unlike F<t/TEST>,
+it doesn't redirect stderr to stdout.
Note that under Win32 F<t/harness> is always used instead of F<t/TEST>,
so there is no special "test_harness" target.
@@ -833,7 +820,7 @@
Under Win32's "test" target you may use the TEST_SWITCHES and
TEST_FILES environment variables to control the behaviour of
-F<t/harness>. This means you can say
+F<t/harness>. This means you can say
nmake test TEST_FILES="op/*.t"
nmake test TEST_SWITCHES="-torture" TEST_FILES="op/*.t"
@@ -847,9 +834,9 @@
=head2 Parallel tests
The core distribution can now run its regression tests in parallel on
-Unix-like platforms. Instead of running C<make test>, set C<TEST_JOBS>
+Unix-like platforms. Instead of running C<make test>, set C<TEST_JOBS>
in your environment to the number of tests to run in parallel, and run
-C<make test_harness>. On a Bourne-like shell, this can be done as
+C<make test_harness>. On a Bourne-like shell, this can be done as
TEST_JOBS=3 make test_harness # Run 3 tests in parallel
@@ -859,8 +846,8 @@
to C<make> utilities to interact with their job schedulers.
Note that currently some test scripts may fail when run in parallel
-(most notably F<ext/IO/t/io_dir.t>). If necessary, run just the failing
-scripts again sequentially and see if the failures go away.
+(most notably F<ext/IO/t/io_dir.t>). If necessary, run just the
+failing scripts again sequentially and see if the failures go away.
=head2 Running tests by hand
@@ -878,7 +865,7 @@
=head2 Using F<t/harness> for testing
If you use C<harness> for testing, you have several command line
-options available to you. The arguments are as follows, and are in the
+options available to you. The arguments are as follows, and are in the
order that they must appear if used together.
harness -v -torture -re=pattern LIST OF FILES TO TEST
@@ -885,7 +872,7 @@
harness -v -torture -re LIST OF PATTERNS TO MATCH
If C<LIST OF FILES TO TEST> is omitted, the file list is obtained from
-the manifest. The file list may include shell wildcards which will be
+the manifest. The file list may include shell wildcards which will be
expanded out.
=over 4
@@ -901,14 +888,14 @@
=item * -re=PATTERN
-Filter the file list so that all the test files run match PATTERN. Note
-that this form is distinct from the B<-re LIST OF PATTERNS> form below
-in that it allows the file list to be provided as well.
+Filter the file list so that all the test files run match PATTERN.
+Note that this form is distinct from the B<-re LIST OF PATTERNS> form
+below in that it allows the file list to be provided as well.
=item * -re LIST OF PATTERNS
Filter the file list so that all the test files run match
-/(LIST|OF|PATTERNS)/. Note that with this form the patterns are joined
+/(LIST|OF|PATTERNS)/. Note that with this form the patterns are joined
by '|' and you cannot supply a list of files, instead the test files
are obtained from the MANIFEST.
@@ -926,7 +913,7 @@
=item * PERL_CORE=1
indicates that we're running this test as part of the perl core test
-suite. This is useful for modules that have a dual life on CPAN.
+suite. This is useful for modules that have a dual life on CPAN.
=item * PERL_DESTRUCT_LEVEL=2
@@ -941,9 +928,9 @@
=item * PERL_SKIP_TTY_TEST
-if set, tells to skip the tests that need a terminal. It's actually set
-automatically by the Makefile, but can also be forced artificially by
-running 'make test_notty'.
+if set, tells to skip the tests that need a terminal. It's actually
+set automatically by the Makefile, but can also be forced artificially
+by running 'make test_notty'.
=back
@@ -954,7 +941,7 @@
=item * PERL_TEST_Net_Ping
Setting this variable runs all the Net::Ping modules tests, otherwise
-some tests that interact with the outside world are skipped. See
+some tests that interact with the outside world are skipped. See
L<perl58delta>.
=item * PERL_TEST_NOVREXX
@@ -968,8 +955,8 @@
=item * PERL_TEST_MEMORY
Setting this variable includes the tests in F<t/bigmem/>. This should
-be set to the number of gigabytes of memory available for testing,
-eg. C<PERL_TEST_MEMORY=4> indicates that tests that require 4GiB of
+be set to the number of gigabytes of memory available for testing, eg.
+C<PERL_TEST_MEMORY=4> indicates that tests that require 4GiB of
available memory can be run safely.
=back
@@ -985,7 +972,7 @@
=item * L<perlsource>
-An overview of the Perl source tree. This will help you find the files
+An overview of the Perl source tree. This will help you find the files
you're looking for.
=item * L<perlinterp>
@@ -996,12 +983,12 @@
=item * L<perlhacktut>
This document walks through the creation of a small patch to Perl's C
-code. If you're just getting started with Perl core hacking, this will
+code. If you're just getting started with Perl core hacking, this will
help you understand how it works.
=item * L<perlhacktips>
-More details on hacking the Perl core. This document focuses on lower
+More details on hacking the Perl core. This document focuses on lower
level details such as how to write tests, compilation issues,
portability, debugging, etc.
@@ -1010,7 +997,7 @@
=item * L<perlguts>
This is of paramount importance, since it's the documentation of what
-goes where in the Perl source. Read it over a couple of times and it
+goes where in the Perl source. Read it over a couple of times and it
might start to make sense - don't worry if it doesn't yet, because the
best way to study it is to read it in conjunction with poking at Perl
source, and we'll do that later on.
@@ -1024,7 +1011,7 @@
A working knowledge of XSUB programming is incredibly useful for core
hacking; XSUBs use techniques drawn from the PP code, the portion of
-the guts that actually executes a Perl program. It's a lot gentler to
+the guts that actually executes a Perl program. It's a lot gentler to
learn those techniques from simple examples and explanation than from
the core itself.
@@ -1051,9 +1038,9 @@
automatically test Perl source releases on platforms with various
configurations.
-Both efforts welcome volunteers. In order to get involved in smoke
+Both efforts welcome volunteers. In order to get involved in smoke
testing of the perl itself visit
-L<http://search.cpan.org/dist/Test-Smoke/>. In order to start smoke
+L<http://search.cpan.org/dist/Test-Smoke/>. In order to start smoke
testing CPAN modules visit
L<http://search.cpan.org/dist/CPANPLUS-YACSmoke/> or
L<http://search.cpan.org/dist/minismokebox/> or
@@ -1077,14 +1064,14 @@
=item *
Do read the README associated with your operating system, e.g.
-README.aix on the IBM AIX OS. Don't hesitate to supply patches to that
+README.aix on the IBM AIX OS. Don't hesitate to supply patches to that
README if you find anything missing or changed over a new OS release.
=item *
Find an area of Perl that seems interesting to you, and see if you can
-work out how it works. Scan through the source, and step over it in the
-debugger. Play, poke, investigate, fiddle! You'll probably get to
+work out how it works. Scan through the source, and step over it in
+the debugger. Play, poke, investigate, fiddle! You'll probably get to
understand not just your chosen area but a much wider range of
F<perl>'s activity as well, and probably sooner than you'd think.
@@ -1093,7 +1080,7 @@
=head2 "The Road goes ever on and on, down from the door where it began."
If you can do these things, you've started on the long road to Perl
-porting. Thanks for wanting to help make Perl better - and happy
+porting. Thanks for wanting to help make Perl better - and happy
hacking!
=head2 Metaphoric Quotations
@@ -1101,7 +1088,7 @@
If you recognized the quote about the Road above, you're in luck.
Most software projects begin each file with a literal description of
-each file's purpose. Perl instead begins each with a literary allusion
+each file's purpose. Perl instead begins each with a literary allusion
to that file's purpose.
Like chapters in many books, all top-level Perl source files (along
@@ -1110,7 +1097,7 @@
material you're about to read.
Quotations are taken from writings of J.R.R. Tolkien pertaining to his
-Legendarium, almost always from I<The Lord of the Rings>. Chapters and
+Legendarium, almost always from I<The Lord of the Rings>. Chapters and
page numbers are given using the following editions:
=over 4
@@ -1117,13 +1104,13 @@
=item *
-I<The Hobbit>, by J.R.R. Tolkien. The hardcover, 70th-anniversary
+I<The Hobbit>, by J.R.R. Tolkien. The hardcover, 70th-anniversary
edition of 2007 was used, published in the UK by Harper Collins
Publishers and in the US by the Houghton Mifflin Company.
=item *
-I<The Lord of the Rings>, by J.R.R. Tolkien. The hardcover,
+I<The Lord of the Rings>, by J.R.R. Tolkien. The hardcover,
50th-anniversary edition of 2004 was used, published in the UK by
Harper Collins Publishers and in the US by the Houghton Mifflin
Company.
@@ -1132,7 +1119,7 @@
I<The Lays of Beleriand>, by J.R.R. Tolkien and published posthumously
by his son and literary executor, C.J.R. Tolkien, being the 3rd of the
-12 volumes in Christopher's mammoth I<History of Middle Earth>. Page
+12 volumes in Christopher's mammoth I<History of Middle Earth>. Page
numbers derive from the hardcover edition, first published in 1983 by
George Allen & Unwin; no page numbers changed for the special 3-volume
omnibus edition of 2002 or the various trade-paper editions, all again
@@ -1143,7 +1130,7 @@
Other JRRT books fair game for quotes would thus include I<The
Adventures of Tom Bombadil>, I<The Silmarillion>, I<Unfinished Tales>,
and I<The Tale of the Children of Hurin>, all but the first
-posthumously assembled by CJRT. But I<The Lord of the Rings> itself is
+posthumously assembled by CJRT. But I<The Lord of the Rings> itself is
perfectly fine and probably best to quote from, provided you can find a
suitable quote there.
@@ -1151,7 +1138,7 @@
to Perl, you should conform to this peculiar practice by yourself
selecting an appropriate quotation from Tolkien, retaining the original
spelling and punctuation and using the same format the rest of the
-quotes are in. Indirect and oblique is just fine; remember, it's a
+quotes are in. Indirect and oblique is just fine; remember, it's a
metaphor, so being meta is, after all, what it's for.
=head1 AUTHOR
Modified: vendor/perl/dist/pod/perlhist.pod
===================================================================
--- vendor/perl/dist/pod/perlhist.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlhist.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -512,6 +512,7 @@
Ricardo 5.18.1-RC2 2013-Aug-03
Ricardo 5.18.1-RC3 2013-Aug-08
Ricardo 5.18.1 2013-Aug-12
+ Ricardo 5.18.2 2014-Jan-06
Ricardo 5.19.0 2013-May-20 The 5.19 development track
David G 5.19.1 2013-Jun-21
Deleted: vendor/perl/dist/pod/perlintern.pod
===================================================================
--- vendor/perl/dist/pod/perlintern.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlintern.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1111 +0,0 @@
--*- buffer-read-only: t -*-
-
-!!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-This file is built by autodoc.pl extracting documentation from the C source
-files.
-
-=head1 NAME
-
-perlintern - autogenerated documentation of purely B<internal>
- Perl functions
-
-=head1 DESCRIPTION
-X<internal Perl functions> X<interpreter functions>
-
-This file is the autogenerated documentation of functions in the
-Perl interpreter that are documented using Perl's internal documentation
-format but are not marked as part of the Perl API. In other words,
-B<they are not for use in extensions>!
-
-
-=head1 CV reference counts and CvOUTSIDE
-
-=over 8
-
-=item CvWEAKOUTSIDE
-X<CvWEAKOUTSIDE>
-
-Each CV has a pointer, C<CvOUTSIDE()>, to its lexically enclosing
-CV (if any). Because pointers to anonymous sub prototypes are
-stored in C<&> pad slots, it is a possible to get a circular reference,
-with the parent pointing to the child and vice-versa. To avoid the
-ensuing memory leak, we do not increment the reference count of the CV
-pointed to by C<CvOUTSIDE> in the I<one specific instance> that the parent
-has a C<&> pad slot pointing back to us. In this case, we set the
-C<CvWEAKOUTSIDE> flag in the child. This allows us to determine under what
-circumstances we should decrement the refcount of the parent when freeing
-the child.
-
-There is a further complication with non-closure anonymous subs (i.e. those
-that do not refer to any lexicals outside that sub). In this case, the
-anonymous prototype is shared rather than being cloned. This has the
-consequence that the parent may be freed while there are still active
-children, eg
-
- BEGIN { $a = sub { eval '$x' } }
-
-In this case, the BEGIN is freed immediately after execution since there
-are no active references to it: the anon sub prototype has
-C<CvWEAKOUTSIDE> set since it's not a closure, and $a points to the same
-CV, so it doesn't contribute to BEGIN's refcount either. When $a is
-executed, the C<eval '$x'> causes the chain of C<CvOUTSIDE>s to be followed,
-and the freed BEGIN is accessed.
-
-To avoid this, whenever a CV and its associated pad is freed, any
-C<&> entries in the pad are explicitly removed from the pad, and if the
-refcount of the pointed-to anon sub is still positive, then that
-child's C<CvOUTSIDE> is set to point to its grandparent. This will only
-occur in the single specific case of a non-closure anon prototype
-having one or more active references (such as C<$a> above).
-
-One other thing to consider is that a CV may be merely undefined
-rather than freed, eg C<undef &foo>. In this case, its refcount may
-not have reached zero, but we still delete its pad and its C<CvROOT> etc.
-Since various children may still have their C<CvOUTSIDE> pointing at this
-undefined CV, we keep its own C<CvOUTSIDE> for the time being, so that
-the chain of lexical scopes is unbroken. For example, the following
-should print 123:
-
- my $x = 123;
- sub tmp { sub { eval '$x' } }
- my $a = tmp();
- undef &tmp;
- print $a->();
-
- bool CvWEAKOUTSIDE(CV *cv)
-
-=for hackers
-Found in file cv.h
-
-
-=back
-
-=head1 Functions in file pad.h
-
-
-=over 8
-
-=item CX_CURPAD_SAVE
-X<CX_CURPAD_SAVE>
-
-Save the current pad in the given context block structure.
-
- void CX_CURPAD_SAVE(struct context)
-
-=for hackers
-Found in file pad.h
-
-=item CX_CURPAD_SV
-X<CX_CURPAD_SV>
-
-Access the SV at offset po in the saved current pad in the given
-context block structure (can be used as an lvalue).
-
- SV * CX_CURPAD_SV(struct context, PADOFFSET po)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_BASE_SV
-X<PAD_BASE_SV>
-
-Get the value from slot C<po> in the base (DEPTH=1) pad of a padlist
-
- SV * PAD_BASE_SV(PADLIST padlist, PADOFFSET po)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_CLONE_VARS
-X<PAD_CLONE_VARS>
-
-|CLONE_PARAMS* param
-Clone the state variables associated with running and compiling pads.
-
- void PAD_CLONE_VARS(PerlInterpreter *proto_perl \)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_COMPNAME_FLAGS
-X<PAD_COMPNAME_FLAGS>
-
-Return the flags for the current compiling pad name
-at offset C<po>. Assumes a valid slot entry.
-
- U32 PAD_COMPNAME_FLAGS(PADOFFSET po)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_COMPNAME_GEN
-X<PAD_COMPNAME_GEN>
-
-The generation number of the name at offset C<po> in the current
-compiling pad (lvalue). Note that C<SvUVX> is hijacked for this purpose.
-
- STRLEN PAD_COMPNAME_GEN(PADOFFSET po)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_COMPNAME_GEN_set
-X<PAD_COMPNAME_GEN_set>
-
-Sets the generation number of the name at offset C<po> in the current
-ling pad (lvalue) to C<gen>. Note that C<SvUV_set> is hijacked for this purpose.
-
- STRLEN PAD_COMPNAME_GEN_set(PADOFFSET po, int gen)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_COMPNAME_OURSTASH
-X<PAD_COMPNAME_OURSTASH>
-
-Return the stash associated with an C<our> variable.
-Assumes the slot entry is a valid C<our> lexical.
-
- HV * PAD_COMPNAME_OURSTASH(PADOFFSET po)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_COMPNAME_PV
-X<PAD_COMPNAME_PV>
-
-Return the name of the current compiling pad name
-at offset C<po>. Assumes a valid slot entry.
-
- char * PAD_COMPNAME_PV(PADOFFSET po)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_COMPNAME_TYPE
-X<PAD_COMPNAME_TYPE>
-
-Return the type (stash) of the current compiling pad name at offset
-C<po>. Must be a valid name. Returns null if not typed.
-
- HV * PAD_COMPNAME_TYPE(PADOFFSET po)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_DUP
-X<PAD_DUP>
-
-Clone a padlist.
-
- void PAD_DUP(PADLIST dstpad, PADLIST srcpad, CLONE_PARAMS* param)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_RESTORE_LOCAL
-X<PAD_RESTORE_LOCAL>
-
-Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL()
-
- void PAD_RESTORE_LOCAL(PAD *opad)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_SAVE_LOCAL
-X<PAD_SAVE_LOCAL>
-
-Save the current pad to the local variable opad, then make the
-current pad equal to npad
-
- void PAD_SAVE_LOCAL(PAD *opad, PAD *npad)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_SAVE_SETNULLPAD
-X<PAD_SAVE_SETNULLPAD>
-
-Save the current pad then set it to null.
-
- void PAD_SAVE_SETNULLPAD()
-
-=for hackers
-Found in file pad.h
-
-=item PAD_SETSV
-X<PAD_SETSV>
-
-Set the slot at offset C<po> in the current pad to C<sv>
-
- SV * PAD_SETSV(PADOFFSET po, SV* sv)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_SET_CUR
-X<PAD_SET_CUR>
-
-Set the current pad to be pad C<n> in the padlist, saving
-the previous current pad. NB currently this macro expands to a string too
-long for some compilers, so it's best to replace it with
-
- SAVECOMPPAD();
- PAD_SET_CUR_NOSAVE(padlist,n);
-
-
- void PAD_SET_CUR(PADLIST padlist, I32 n)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_SET_CUR_NOSAVE
-X<PAD_SET_CUR_NOSAVE>
-
-like PAD_SET_CUR, but without the save
-
- void PAD_SET_CUR_NOSAVE(PADLIST padlist, I32 n)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_SV
-X<PAD_SV>
-
-Get the value at offset C<po> in the current pad
-
- void PAD_SV(PADOFFSET po)
-
-=for hackers
-Found in file pad.h
-
-=item PAD_SVl
-X<PAD_SVl>
-
-Lightweight and lvalue version of C<PAD_SV>.
-Get or set the value at offset C<po> in the current pad.
-Unlike C<PAD_SV>, does not print diagnostics with -DX.
-For internal use only.
-
- SV * PAD_SVl(PADOFFSET po)
-
-=for hackers
-Found in file pad.h
-
-=item SAVECLEARSV
-X<SAVECLEARSV>
-
-Clear the pointed to pad value on scope exit. (i.e. the runtime action of 'my')
-
- void SAVECLEARSV(SV **svp)
-
-=for hackers
-Found in file pad.h
-
-=item SAVECOMPPAD
-X<SAVECOMPPAD>
-
-save PL_comppad and PL_curpad
-
-
-
-
-
- void SAVECOMPPAD()
-
-=for hackers
-Found in file pad.h
-
-=item SAVEPADSV
-X<SAVEPADSV>
-
-Save a pad slot (used to restore after an iteration)
-
-XXX DAPM it would make more sense to make the arg a PADOFFSET
- void SAVEPADSV(PADOFFSET po)
-
-=for hackers
-Found in file pad.h
-
-
-=back
-
-=head1 GV Functions
-
-=over 8
-
-=item is_gv_magical
-X<is_gv_magical>
-
-Returns C<TRUE> if given the name of a magical GV.
-
-Currently only useful internally when determining if a GV should be
-created even in rvalue contexts.
-
-C<flags> is not used at present but available for future extension to
-allow selecting particular classes of magical variable.
-
-Currently assumes that C<name> is NUL terminated (as well as len being valid).
-This assumption is met by all callers within the perl core, which all pass
-pointers returned by SvPV.
-
- bool is_gv_magical(const char *name, STRLEN len, U32 flags)
-
-=for hackers
-Found in file gv.c
-
-=item is_gv_magical_sv
-X<is_gv_magical_sv>
-
-Returns C<TRUE> if given the name of a magical GV. Calls is_gv_magical.
-
- bool is_gv_magical_sv(SV *name, U32 flags)
-
-=for hackers
-Found in file gv.c
-
-
-=back
-
-=head1 Hash Manipulation Functions
-
-=over 8
-
-=item refcounted_he_chain_2hv
-X<refcounted_he_chain_2hv>
-
-Generates and returns a C<HV *> by walking up the tree starting at the passed
-in C<struct refcounted_he *>.
-
- HV * refcounted_he_chain_2hv(const struct refcounted_he *c)
-
-=for hackers
-Found in file hv.c
-
-=item refcounted_he_free
-X<refcounted_he_free>
-
-Decrements the reference count of the passed in C<struct refcounted_he *>
-by one. If the reference count reaches zero the structure's memory is freed,
-and C<refcounted_he_free> iterates onto the parent node.
-
- void refcounted_he_free(struct refcounted_he *he)
-
-=for hackers
-Found in file hv.c
-
-=item refcounted_he_new
-X<refcounted_he_new>
-
-Creates a new C<struct refcounted_he>. As S<key> is copied, and value is
-stored in a compact form, all references remain the property of the caller.
-The C<struct refcounted_he> is returned with a reference count of 1.
-
- struct refcounted_he * refcounted_he_new(struct refcounted_he *const parent, SV *const key, SV *const value)
-
-=for hackers
-Found in file hv.c
-
-
-=back
-
-=head1 IO Functions
-
-=over 8
-
-=item start_glob
-X<start_glob>
-
-Function called by C<do_readline> to spawn a glob (or do the glob inside
-perl on VMS). This code used to be inline, but now perl uses C<File::Glob>
-this glob starter is only used by miniperl during the build process.
-Moving it away shrinks pp_hot.c; shrinking pp_hot.c helps speed perl up.
-
- PerlIO* start_glob(SV* pattern, IO *io)
-
-=for hackers
-Found in file doio.c
-
-
-=back
-
-=head1 Magical Functions
-
-=over 8
-
-=item magic_sethint
-X<magic_sethint>
-
-Triggered by a delete from %^H, records the key to
-C<PL_compiling.cop_hints_hash>.
-
- int magic_sethint(SV* sv, MAGIC* mg)
-
-=for hackers
-Found in file mg.c
-
-=item mg_localize
-X<mg_localize>
-
-Copy some of the magic from an existing SV to new localized version of
-that SV. Container magic (eg %ENV, $1, tie) gets copied, value magic
-doesn't (eg taint, pos).
-
- void mg_localize(SV* sv, SV* nsv)
-
-=for hackers
-Found in file mg.c
-
-
-=back
-
-=head1 MRO Functions
-
-=over 8
-
-=item mro_get_linear_isa_c3
-X<mro_get_linear_isa_c3>
-
-Returns the C3 linearization of @ISA
-the given stash. The return value is a read-only AV*.
-C<level> should be 0 (it is used internally in this
-function's recursion).
-
-You are responsible for C<SvREFCNT_inc()> on the
-return value if you plan to store it anywhere
-semi-permanently (otherwise it might be deleted
-out from under you the next time the cache is
-invalidated).
-
- AV* mro_get_linear_isa_c3(HV* stash, I32 level)
-
-=for hackers
-Found in file mro.c
-
-=item mro_get_linear_isa_dfs
-X<mro_get_linear_isa_dfs>
-
-Returns the Depth-First Search linearization of @ISA
-the given stash. The return value is a read-only AV*.
-C<level> should be 0 (it is used internally in this
-function's recursion).
-
-You are responsible for C<SvREFCNT_inc()> on the
-return value if you plan to store it anywhere
-semi-permanently (otherwise it might be deleted
-out from under you the next time the cache is
-invalidated).
-
- AV* mro_get_linear_isa_dfs(HV* stash, I32 level)
-
-=for hackers
-Found in file mro.c
-
-=item mro_isa_changed_in
-X<mro_isa_changed_in>
-
-Takes the necessary steps (cache invalidations, mostly)
-when the @ISA of the given package has changed. Invoked
-by the C<setisa> magic, should not need to invoke directly.
-
- void mro_isa_changed_in(HV* stash)
-
-=for hackers
-Found in file mro.c
-
-
-=back
-
-=head1 Pad Data Structures
-
-=over 8
-
-=item CvPADLIST
-X<CvPADLIST>
-
-CV's can have CvPADLIST(cv) set to point to an AV.
-
-For these purposes "forms" are a kind-of CV, eval""s are too (except they're
-not callable at will and are always thrown away after the eval"" is done
-executing). Require'd files are simply evals without any outer lexical
-scope.
-
-XSUBs don't have CvPADLIST set - dXSTARG fetches values from PL_curpad,
-but that is really the callers pad (a slot of which is allocated by
-every entersub).
-
-The CvPADLIST AV has does not have AvREAL set, so REFCNT of component items
-is managed "manual" (mostly in pad.c) rather than normal av.c rules.
-The items in the AV are not SVs as for a normal AV, but other AVs:
-
-0'th Entry of the CvPADLIST is an AV which represents the "names" or rather
-the "static type information" for lexicals.
-
-The CvDEPTH'th entry of CvPADLIST AV is an AV which is the stack frame at that
-depth of recursion into the CV.
-The 0'th slot of a frame AV is an AV which is @_.
-other entries are storage for variables and op targets.
-
-During compilation:
-C<PL_comppad_name> is set to the names AV.
-C<PL_comppad> is set to the frame AV for the frame CvDEPTH == 1.
-C<PL_curpad> is set to the body of the frame AV (i.e. AvARRAY(PL_comppad)).
-
-During execution, C<PL_comppad> and C<PL_curpad> refer to the live
-frame of the currently executing sub.
-
-Iterating over the names AV iterates over all possible pad
-items. Pad slots that are SVs_PADTMP (targets/GVs/constants) end up having
-&PL_sv_undef "names" (see pad_alloc()).
-
-Only my/our variable (SVs_PADMY/SVs_PADOUR) slots get valid names.
-The rest are op targets/GVs/constants which are statically allocated
-or resolved at compile time. These don't have names by which they
-can be looked up from Perl code at run time through eval"" like
-my/our variables can be. Since they can't be looked up by "name"
-but only by their index allocated at compile time (which is usually
-in PL_op->op_targ), wasting a name SV for them doesn't make sense.
-
-The SVs in the names AV have their PV being the name of the variable.
-xlow+1..xhigh inclusive in the NV union is a range of cop_seq numbers for
-which the name is valid. For typed lexicals name SV is SVt_PVMG and SvSTASH
-points at the type. For C<our> lexicals, the type is also SVt_PVMG, with the
-SvOURSTASH slot pointing at the stash of the associated global (so that
-duplicate C<our> declarations in the same package can be detected). SvUVX is
-sometimes hijacked to store the generation number during compilation.
-
-If SvFAKE is set on the name SV, then that slot in the frame AV is
-a REFCNT'ed reference to a lexical from "outside". In this case,
-the name SV does not use xlow and xhigh to store a cop_seq range, since it is
-in scope throughout. Instead xhigh stores some flags containing info about
-the real lexical (is it declared in an anon, and is it capable of being
-instantiated multiple times?), and for fake ANONs, xlow contains the index
-within the parent's pad where the lexical's value is stored, to make
-cloning quicker.
-
-If the 'name' is '&' the corresponding entry in frame AV
-is a CV representing a possible closure.
-(SvFAKE and name of '&' is not a meaningful combination currently but could
-become so if C<my sub foo {}> is implemented.)
-
-Note that formats are treated as anon subs, and are cloned each time
-write is called (if necessary).
-
-The flag SVf_PADSTALE is cleared on lexicals each time the my() is executed,
-and set on scope exit. This allows the 'Variable $x is not available' warning
-to be generated in evals, such as
-
- { my $x = 1; sub f { eval '$x'} } f();
-
- AV * CvPADLIST(CV *cv)
-
-=for hackers
-Found in file pad.c
-
-=item cv_clone
-X<cv_clone>
-
-Clone a CV: make a new CV which points to the same code etc, but which
-has a newly-created pad built by copying the prototype pad and capturing
-any outer lexicals.
-
- CV* cv_clone(CV* proto)
-
-=for hackers
-Found in file pad.c
-
-=item cv_dump
-X<cv_dump>
-
-dump the contents of a CV
-
- void cv_dump(const CV *cv, const char *title)
-
-=for hackers
-Found in file pad.c
-
-=item do_dump_pad
-X<do_dump_pad>
-
-Dump the contents of a padlist
-
- void do_dump_pad(I32 level, PerlIO *file, PADLIST *padlist, int full)
-
-=for hackers
-Found in file pad.c
-
-=item intro_my
-X<intro_my>
-
-"Introduce" my variables to visible status.
-
- U32 intro_my()
-
-=for hackers
-Found in file pad.c
-
-=item pad_add_anon
-X<pad_add_anon>
-
-Add an anon code entry to the current compiling pad
-
- PADOFFSET pad_add_anon(SV* sv, OPCODE op_type)
-
-=for hackers
-Found in file pad.c
-
-=item pad_add_name
-X<pad_add_name>
-
-Create a new name and associated PADMY SV in the current pad; return the
-offset.
-If C<typestash> is valid, the name is for a typed lexical; set the
-name's stash to that value.
-If C<ourstash> is valid, it's an our lexical, set the name's
-SvOURSTASH to that value
-
-If fake, it means we're cloning an existing entry
-
- PADOFFSET pad_add_name(const char *name, HV* typestash, HV* ourstash, bool clone, bool state)
-
-=for hackers
-Found in file pad.c
-
-=item pad_alloc
-X<pad_alloc>
-
-Allocate a new my or tmp pad entry. For a my, simply push a null SV onto
-the end of PL_comppad, but for a tmp, scan the pad from PL_padix upwards
-for a slot which has no name and no active value.
-
- PADOFFSET pad_alloc(I32 optype, U32 tmptype)
-
-=for hackers
-Found in file pad.c
-
-=item pad_block_start
-X<pad_block_start>
-
-Update the pad compilation state variables on entry to a new block
-
- void pad_block_start(int full)
-
-=for hackers
-Found in file pad.c
-
-=item pad_check_dup
-X<pad_check_dup>
-
-Check for duplicate declarations: report any of:
- * a my in the current scope with the same name;
- * an our (anywhere in the pad) with the same name and the same stash
- as C<ourstash>
-C<is_our> indicates that the name to check is an 'our' declaration
-
- void pad_check_dup(const char* name, bool is_our, const HV* ourstash)
-
-=for hackers
-Found in file pad.c
-
-=item pad_findlex
-X<pad_findlex>
-
-Find a named lexical anywhere in a chain of nested pads. Add fake entries
-in the inner pads if it's found in an outer one.
-
-Returns the offset in the bottom pad of the lex or the fake lex.
-cv is the CV in which to start the search, and seq is the current cop_seq
-to match against. If warn is true, print appropriate warnings. The out_*
-vars return values, and so are pointers to where the returned values
-should be stored. out_capture, if non-null, requests that the innermost
-instance of the lexical is captured; out_name_sv is set to the innermost
-matched namesv or fake namesv; out_flags returns the flags normally
-associated with the IVX field of a fake namesv.
-
-Note that pad_findlex() is recursive; it recurses up the chain of CVs,
-then comes back down, adding fake entries as it goes. It has to be this way
-because fake namesvs in anon protoypes have to store in xlow the index into
-the parent pad.
-
- PADOFFSET pad_findlex(const char *name, const CV* cv, U32 seq, int warn, SV** out_capture, SV** out_name_sv, int *out_flags)
-
-=for hackers
-Found in file pad.c
-
-=item pad_findmy
-X<pad_findmy>
-
-Given a lexical name, try to find its offset, first in the current pad,
-or failing that, in the pads of any lexically enclosing subs (including
-the complications introduced by eval). If the name is found in an outer pad,
-then a fake entry is added to the current pad.
-Returns the offset in the current pad, or NOT_IN_PAD on failure.
-
- PADOFFSET pad_findmy(const char* name)
-
-=for hackers
-Found in file pad.c
-
-=item pad_fixup_inner_anons
-X<pad_fixup_inner_anons>
-
-For any anon CVs in the pad, change CvOUTSIDE of that CV from
-old_cv to new_cv if necessary. Needed when a newly-compiled CV has to be
-moved to a pre-existing CV struct.
-
- void pad_fixup_inner_anons(PADLIST *padlist, CV *old_cv, CV *new_cv)
-
-=for hackers
-Found in file pad.c
-
-=item pad_free
-X<pad_free>
-
-Free the SV at offset po in the current pad.
-
- void pad_free(PADOFFSET po)
-
-=for hackers
-Found in file pad.c
-
-=item pad_leavemy
-X<pad_leavemy>
-
-Cleanup at end of scope during compilation: set the max seq number for
-lexicals in this scope and warn of any lexicals that never got introduced.
-
- void pad_leavemy()
-
-=for hackers
-Found in file pad.c
-
-=item pad_new
-X<pad_new>
-
-Create a new compiling padlist, saving and updating the various global
-vars at the same time as creating the pad itself. The following flags
-can be OR'ed together:
-
- padnew_CLONE this pad is for a cloned CV
- padnew_SAVE save old globals
- padnew_SAVESUB also save extra stuff for start of sub
-
- PADLIST* pad_new(int flags)
-
-=for hackers
-Found in file pad.c
-
-=item pad_push
-X<pad_push>
-
-Push a new pad frame onto the padlist, unless there's already a pad at
-this depth, in which case don't bother creating a new one. Then give
-the new pad an @_ in slot zero.
-
- void pad_push(PADLIST *padlist, int depth)
-
-=for hackers
-Found in file pad.c
-
-=item pad_reset
-X<pad_reset>
-
-Mark all the current temporaries for reuse
-
- void pad_reset()
-
-=for hackers
-Found in file pad.c
-
-=item pad_setsv
-X<pad_setsv>
-
-Set the entry at offset po in the current pad to sv.
-Use the macro PAD_SETSV() rather than calling this function directly.
-
- void pad_setsv(PADOFFSET po, SV* sv)
-
-=for hackers
-Found in file pad.c
-
-=item pad_swipe
-X<pad_swipe>
-
-Abandon the tmp in the current pad at offset po and replace with a
-new one.
-
- void pad_swipe(PADOFFSET po, bool refadjust)
-
-=for hackers
-Found in file pad.c
-
-=item pad_tidy
-X<pad_tidy>
-
-Tidy up a pad after we've finished compiling it:
- * remove most stuff from the pads of anonsub prototypes;
- * give it a @_;
- * mark tmps as such.
-
- void pad_tidy(padtidy_type type)
-
-=for hackers
-Found in file pad.c
-
-=item pad_undef
-X<pad_undef>
-
-Free the padlist associated with a CV.
-If parts of it happen to be current, we null the relevant
-PL_*pad* global vars so that we don't have any dangling references left.
-We also repoint the CvOUTSIDE of any about-to-be-orphaned
-inner subs to the outer of this cv.
-
-(This function should really be called pad_free, but the name was already
-taken)
-
- void pad_undef(CV* cv)
-
-=for hackers
-Found in file pad.c
-
-
-=back
-
-=head1 Per-Interpreter Variables
-
-=over 8
-
-=item PL_DBsingle
-X<PL_DBsingle>
-
-When Perl is run in debugging mode, with the B<-d> switch, this SV is a
-boolean which indicates whether subs are being single-stepped.
-Single-stepping is automatically turned on after every step. This is the C
-variable which corresponds to Perl's $DB::single variable. See
-C<PL_DBsub>.
-
- SV * PL_DBsingle
-
-=for hackers
-Found in file intrpvar.h
-
-=item PL_DBsub
-X<PL_DBsub>
-
-When Perl is run in debugging mode, with the B<-d> switch, this GV contains
-the SV which holds the name of the sub being debugged. This is the C
-variable which corresponds to Perl's $DB::sub variable. See
-C<PL_DBsingle>.
-
- GV * PL_DBsub
-
-=for hackers
-Found in file intrpvar.h
-
-=item PL_DBtrace
-X<PL_DBtrace>
-
-Trace variable used when Perl is run in debugging mode, with the B<-d>
-switch. This is the C variable which corresponds to Perl's $DB::trace
-variable. See C<PL_DBsingle>.
-
- SV * PL_DBtrace
-
-=for hackers
-Found in file intrpvar.h
-
-=item PL_dowarn
-X<PL_dowarn>
-
-The C variable which corresponds to Perl's $^W warning variable.
-
- bool PL_dowarn
-
-=for hackers
-Found in file intrpvar.h
-
-=item PL_last_in_gv
-X<PL_last_in_gv>
-
-The GV which was last used for a filehandle input operation. (C<< <FH> >>)
-
- GV* PL_last_in_gv
-
-=for hackers
-Found in file intrpvar.h
-
-=item PL_ofs_sv
-X<PL_ofs_sv>
-
-The output field separator - C<$,> in Perl space.
-
- SV* PL_ofs_sv
-
-=for hackers
-Found in file intrpvar.h
-
-=item PL_rs
-X<PL_rs>
-
-The input record separator - C<$/> in Perl space.
-
- SV* PL_rs
-
-=for hackers
-Found in file intrpvar.h
-
-
-=back
-
-=head1 Stack Manipulation Macros
-
-=over 8
-
-=item djSP
-X<djSP>
-
-Declare Just C<SP>. This is actually identical to C<dSP>, and declares
-a local copy of perl's stack pointer, available via the C<SP> macro.
-See C<SP>. (Available for backward source code compatibility with the
-old (Perl 5.005) thread model.)
-
- djSP;
-
-=for hackers
-Found in file pp.h
-
-=item LVRET
-X<LVRET>
-
-True if this op will be the return value of an lvalue subroutine
-
-=for hackers
-Found in file pp.h
-
-
-=back
-
-=head1 SV Manipulation Functions
-
-=over 8
-
-=item sv_add_arena
-X<sv_add_arena>
-
-Given a chunk of memory, link it to the head of the list of arenas,
-and split it into a list of free SVs.
-
- void sv_add_arena(char* ptr, U32 size, U32 flags)
-
-=for hackers
-Found in file sv.c
-
-=item sv_clean_all
-X<sv_clean_all>
-
-Decrement the refcnt of each remaining SV, possibly triggering a
-cleanup. This function may have to be called multiple times to free
-SVs which are in complex self-referential hierarchies.
-
- I32 sv_clean_all()
-
-=for hackers
-Found in file sv.c
-
-=item sv_clean_objs
-X<sv_clean_objs>
-
-Attempt to destroy all objects not yet freed
-
- void sv_clean_objs()
-
-=for hackers
-Found in file sv.c
-
-=item sv_free_arenas
-X<sv_free_arenas>
-
-Deallocate the memory used by all arenas. Note that all the individual SV
-heads and bodies within the arenas must already have been freed.
-
- void sv_free_arenas()
-
-=for hackers
-Found in file sv.c
-
-
-=back
-
-=head1 SV-Body Allocation
-
-=over 8
-
-=item sv_2num
-X<sv_2num>
-
-Return an SV with the numeric value of the source SV, doing any necessary
-reference or overload conversion. You must use the C<SvNUM(sv)> macro to
-access this function.
-
- SV* sv_2num(SV* sv)
-
-=for hackers
-Found in file sv.c
-
-
-=back
-
-=head1 Unicode Support
-
-=over 8
-
-=item find_uninit_var
-X<find_uninit_var>
-
-Find the name of the undefined variable (if any) that caused the operator o
-to issue a "Use of uninitialized value" warning.
-If match is true, only return a name if it's value matches uninit_sv.
-So roughly speaking, if a unary operator (such as OP_COS) generates a
-warning, then following the direct child of the op may yield an
-OP_PADSV or OP_GV that gives the name of the undefined variable. On the
-other hand, with OP_ADD there are two branches to follow, so we only print
-the variable name if we get an exact match.
-
-The name is returned as a mortal SV.
-
-Assumes that PL_op is the op that originally triggered the error, and that
-PL_comppad/PL_curpad points to the currently executing pad.
-
- SV* find_uninit_var(OP* obase, SV* uninit_sv, bool top)
-
-=for hackers
-Found in file sv.c
-
-=item report_uninit
-X<report_uninit>
-
-Print appropriate "Use of uninitialized variable" warning
-
- void report_uninit(SV* uninit_sv)
-
-=for hackers
-Found in file sv.c
-
-
-=back
-
-=head1 AUTHORS
-
-The autodocumentation system was originally added to the Perl core by
-Benjamin Stuhl. Documentation is by whoever was kind enough to
-document their functions.
-
-=head1 SEE ALSO
-
-perlguts(1), perlapi(1)
-
-=cut
-
- ex: set ro:
Deleted: vendor/perl/dist/pod/perlmodlib.pod
===================================================================
--- vendor/perl/dist/pod/perlmodlib.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlmodlib.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,3194 +0,0 @@
-=for maintainers
-Generated by perlmodlib.PL -- DO NOT EDIT!
-
-=head1 NAME
-
-perlmodlib - constructing new Perl modules and finding existing ones
-
-=head1 THE PERL MODULE LIBRARY
-
-Many modules are included in the Perl distribution. These are described
-below, and all end in F<.pm>. You may discover compiled library
-files (usually ending in F<.so>) or small pieces of modules to be
-autoloaded (ending in F<.al>); these were automatically generated
-by the installation process. 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, Errno, or Fcntl modules.)
-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 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 C<use>, or C<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
-C<$^H> hints variable. Others affect the current package instead,
-like C<use vars> and C<use subs>, which 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 attributes
-
-Get/set subroutine or variable attributes
-
-=item attrs
-
-Set/get attributes of a subroutine (deprecated)
-
-=item autouse
-
-Postpone load of modules until a function is used
-
-=item base
-
-Establish an ISA relationship with base classes at compile time
-
-=item bigint
-
-Transparent BigInteger support for Perl
-
-=item bignum
-
-Transparent BigNumber support for Perl
-
-=item bigrat
-
-Transparent BigNumber/BigRational support for Perl
-
-=item blib
-
-Use MakeMaker's uninstalled version of a package
-
-=item bytes
-
-Force byte semantics rather than character semantics
-
-=item charnames
-
-Define character names for C<\N{named}> string literal escapes
-
-=item constant
-
-Declare constants
-
-=item diagnostics
-
-Produce verbose warning diagnostics
-
-=item encoding
-
-Allows you to write your script in non-ascii or non-utf8
-
-=item encoding::warnings
-
-Warn on implicit encoding conversions
-
-=item feature
-
-Enable new syntactic features
-
-=item fields
-
-Compile-time class fields
-
-=item filetest
-
-Control the filetest permission operators
-
-=item if
-
-C<use> a Perl module if a condition holds
-
-=item integer
-
-Use integer arithmetic instead of floating point
-
-=item less
-
-Request less of something
-
-=item lib
-
-Manipulate @INC at compile time
-
-=item locale
-
-Use and avoid POSIX locales for built-in operations
-
-=item mro
-
-Method Resolution Order
-
-=item open
-
-Set default PerlIO layers for input and output
-
-=item ops
-
-Restrict unsafe operations when compiling
-
-=item overload
-
-Package for overloading Perl operations
-
-=item re
-
-Alter regular expression behaviour
-
-=item sigtrap
-
-Enable simple signal handling
-
-=item sort
-
-Control sort() behaviour
-
-=item strict
-
-Restrict unsafe constructs
-
-=item subs
-
-Predeclare sub names
-
-=item threads
-
-Perl interpreter-based threads
-
-=item threads::shared
-
-Perl extension for sharing data structures between threads
-
-=item utf8
-
-Enable/disable UTF-8 (or UTF-EBCDIC) in source code
-
-=item vars
-
-Predeclare global variable names (obsolete)
-
-=item version
-
-Perl extension for Version Objects
-
-=item vmsish
-
-Control VMS-specific language features
-
-=item warnings
-
-Control optional warnings
-
-=item warnings::register
-
-Warnings import function
-
-=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.
-
-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.
-
-=over 12
-
-=item AnyDBM_File
-
-Provide framework for multiple DBMs
-
-=item Archive::Extract
-
-A generic archive extracting mechanism
-
-=item Archive::Tar
-
-Module for manipulations of tar archives
-
-=item Archive::Tar::File
-
-A subclass for in-memory extracted file from Archive::Tar
-
-=item Attribute::Handlers
-
-Simpler definition of attribute handlers
-
-=item AutoLoader
-
-Load subroutines only on demand
-
-=item AutoSplit
-
-Split a package for autoloading
-
-=item B
-
-The Perl Compiler
-
-=item B::Concise
-
-Walk Perl syntax tree, printing concise info about ops
-
-=item B::Debug
-
-Walk Perl syntax tree, printing debug info about ops
-
-=item B::Deparse
-
-Perl compiler backend to produce perl code
-
-=item B::Lint
-
-Perl lint
-
-=item B::Showlex
-
-Show lexical variables used in functions or files
-
-=item B::Terse
-
-Walk Perl syntax tree, printing terse info about ops
-
-=item B::Xref
-
-Generates cross reference reports for Perl programs
-
-=item Benchmark
-
-Benchmark running times of Perl code
-
-=item CGI
-
-Simple Common Gateway Interface Class
-
-=item CGI::Apache
-
-Backward compatibility module for CGI.pm
-
-=item CGI::Carp
-
-CGI routines for writing to the HTTPD (or other) error log
-
-=item CGI::Cookie
-
-Interface to Netscape Cookies
-
-=item CGI::Fast
-
-CGI Interface for Fast CGI
-
-=item CGI::Pretty
-
-Module to produce nicely formatted HTML code
-
-=item CGI::Push
-
-Simple Interface to Server Push
-
-=item CGI::Switch
-
-Backward compatibility module for defunct CGI::Switch
-
-=item CGI::Util
-
-Internal utilities used by CGI module
-
-=item CORE
-
-Pseudo-namespace for Perl's core routines
-
-=item CPAN
-
-Query, download and build perl modules from CPAN sites
-
-=item CPAN::API::HOWTO
-
-A recipe book for programming with CPAN.pm
-
-=item CPAN::FirstTime
-
-Utility for CPAN::Config file Initialization
-
-=item CPAN::Kwalify
-
-Interface between CPAN.pm and Kwalify.pm
-
-=item CPAN::Nox
-
-Wrapper around CPAN.pm without using any XS module
-
-=item CPAN::Version
-
-Utility functions to compare CPAN versions
-
-=item CPANPLUS
-
-API & CLI access to the CPAN mirrors
-
-=item CPANPLUS::Dist::Base
-
-Base class for custom distribution classes
-
-=item CPANPLUS::Dist::Sample
-
-Sample code to create your own Dist::* plugin
-
-=item CPANPLUS::Shell::Classic
-
-CPAN.pm emulation for CPANPLUS
-
-=item CPANPLUS::Shell::Default::Plugins::HOWTO
-
-Documentation on how to write your own plugins
-
-=item Carp
-
-Warn of errors (from perspective of caller)
-
-=item Carp::Heavy
-
-Heavy machinery, no user serviceable parts inside
-
-=item Class::ISA
-
-Report the search path for a class's ISA tree
-
-=item Class::Struct
-
-Declare struct-like datatypes as Perl classes
-
-=item Compress::Raw::Zlib
-
-Low-Level Interface to zlib compression library
-
-=item Compress::Zlib
-
-Interface to zlib compression library
-
-=item Config
-
-Access Perl configuration information
-
-=item Cwd
-
-Get pathname of current working directory
-
-=item DB
-
-Programmatic interface to the Perl debugging API
-
-=item DBM_Filter
-
-Filter DBM keys/values
-
-=item DBM_Filter::compress
-
-Filter for DBM_Filter
-
-=item DBM_Filter::encode
-
-Filter for DBM_Filter
-
-=item DBM_Filter::int32
-
-Filter for DBM_Filter
-
-=item DBM_Filter::null
-
-Filter for DBM_Filter
-
-=item DBM_Filter::utf8
-
-Filter for DBM_Filter
-
-=item DB_File
-
-Perl5 access to Berkeley DB version 1.x
-
-=item Data::Dumper
-
-Stringified perl data structures, suitable for both printing and C<eval>
-
-=item Devel::DProf
-
-A Perl code profiler
-
-=item Devel::InnerPackage
-
-Find all the inner packages of a package
-
-=item Devel::Peek
-
-A data debugging tool for the XS programmer
-
-=item Devel::SelfStubber
-
-Generate stubs for a SelfLoading module
-
-=item Digest
-
-Modules that calculate message digests
-
-=item Digest::MD5
-
-Perl interface to the MD5 Algorithm
-
-=item Digest::SHA
-
-Perl extension for SHA-1/224/256/384/512
-
-=item Digest::base
-
-Digest base class
-
-=item Digest::file
-
-Calculate digests of files
-
-=item DirHandle
-
-Supply object methods for directory handles
-
-=item Dumpvalue
-
-Provides screen dump of Perl data.
-
-=item DynaLoader
-
-Dynamically load C libraries into Perl code
-
-=item Encode
-
-Character encodings
-
-=item Encode::Alias
-
-Alias definitions to encodings
-
-=item Encode::Byte
-
-Single Byte Encodings
-
-=item Encode::CJKConstants
-
-Internally used by Encode::??::ISO_2022_*
-
-=item Encode::CN
-
-China-based Chinese Encodings
-
-=item Encode::CN::HZ
-
-Internally used by Encode::CN
-
-=item Encode::Config
-
-Internally used by Encode
-
-=item Encode::EBCDIC
-
-EBCDIC Encodings
-
-=item Encode::Encoder
-
-Object Oriented Encoder
-
-=item Encode::Encoding
-
-Encode Implementation Base Class
-
-=item Encode::GSM0338
-
-ESTI GSM 03.38 Encoding
-
-=item Encode::Guess
-
-Guesses encoding from data
-
-=item Encode::JP
-
-Japanese Encodings
-
-=item Encode::JP::H2Z
-
-Internally used by Encode::JP::2022_JP*
-
-=item Encode::JP::JIS7
-
-Internally used by Encode::JP
-
-=item Encode::KR
-
-Korean Encodings
-
-=item Encode::KR::2022_KR
-
-Internally used by Encode::KR
-
-=item Encode::MIME::Header
-
-MIME 'B' and 'Q' header encoding
-
-=item Encode::MIME::Name
-
-Internally used by Encode
-
-=item Encode::PerlIO
-
-A detailed document on Encode and PerlIO
-
-=item Encode::Supported
-
-Encodings supported by Encode
-
-=item Encode::Symbol
-
-Symbol Encodings
-
-=item Encode::TW
-
-Taiwan-based Chinese Encodings
-
-=item Encode::Unicode
-
-Various Unicode Transformation Formats
-
-=item Encode::Unicode::UTF7
-
-UTF-7 encoding
-
-=item English
-
-Use nice English (or awk) names for ugly punctuation variables
-
-=item Env
-
-Perl module that imports environment variables as scalars or arrays
-
-=item Errno
-
-System errno constants
-
-=item Exporter
-
-Implements default import method for modules
-
-=item Exporter::Heavy
-
-Exporter guts
-
-=item ExtUtils::CBuilder
-
-Compile and link C code for Perl modules
-
-=item ExtUtils::CBuilder::Platform::Windows
-
-Builder class for Windows platforms
-
-=item ExtUtils::Command
-
-Utilities to replace common UNIX commands in Makefiles etc.
-
-=item ExtUtils::Command::MM
-
-Commands for the MM's to use in Makefiles
-
-=item ExtUtils::Constant
-
-Generate XS code to import C header constants
-
-=item ExtUtils::Constant::Base
-
-Base class for ExtUtils::Constant objects
-
-=item ExtUtils::Constant::Utils
-
-Helper functions for ExtUtils::Constant
-
-=item ExtUtils::Constant::XS
-
-Base class for ExtUtils::Constant objects
-
-=item ExtUtils::Embed
-
-Utilities for embedding Perl in C/C++ applications
-
-=item ExtUtils::Install
-
-Install files from here to there
-
-=item ExtUtils::Installed
-
-Inventory management of installed modules
-
-=item ExtUtils::Liblist
-
-Determine libraries to use and how to use them
-
-=item ExtUtils::MM
-
-OS adjusted ExtUtils::MakeMaker subclass
-
-=item ExtUtils::MM_AIX
-
-AIX specific subclass of ExtUtils::MM_Unix
-
-=item ExtUtils::MM_Any
-
-Platform-agnostic MM methods
-
-=item ExtUtils::MM_BeOS
-
-Methods to override UN*X behaviour in ExtUtils::MakeMaker
-
-=item ExtUtils::MM_Cygwin
-
-Methods to override UN*X behaviour in ExtUtils::MakeMaker
-
-=item ExtUtils::MM_DOS
-
-DOS specific subclass of ExtUtils::MM_Unix
-
-=item ExtUtils::MM_MacOS
-
-Once produced Makefiles for MacOS Classic
-
-=item ExtUtils::MM_NW5
-
-Methods to override UN*X behaviour in ExtUtils::MakeMaker
-
-=item ExtUtils::MM_OS2
-
-Methods to override UN*X behaviour in ExtUtils::MakeMaker
-
-=item ExtUtils::MM_QNX
-
-QNX specific subclass of ExtUtils::MM_Unix
-
-=item ExtUtils::MM_UWIN
-
-U/WIN specific subclass of ExtUtils::MM_Unix
-
-=item ExtUtils::MM_Unix
-
-Methods used by ExtUtils::MakeMaker
-
-=item ExtUtils::MM_VMS
-
-Methods to override UN*X behaviour in ExtUtils::MakeMaker
-
-=item ExtUtils::MM_VOS
-
-VOS specific subclass of ExtUtils::MM_Unix
-
-=item ExtUtils::MM_Win32
-
-Methods to override UN*X behaviour in ExtUtils::MakeMaker
-
-=item ExtUtils::MM_Win95
-
-Method to customize MakeMaker for Win9X
-
-=item ExtUtils::MY
-
-ExtUtils::MakeMaker subclass for customization
-
-=item ExtUtils::MakeMaker
-
-Create a module Makefile
-
-=item ExtUtils::MakeMaker::Config
-
-Wrapper around Config.pm
-
-=item ExtUtils::MakeMaker::FAQ
-
-Frequently Asked Questions About MakeMaker
-
-=item ExtUtils::MakeMaker::Tutorial
-
-Writing a module with MakeMaker
-
-=item ExtUtils::MakeMaker::bytes
-
-Version-agnostic bytes.pm
-
-=item ExtUtils::MakeMaker::vmsish
-
-Platform-agnostic vmsish.pm
-
-=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::Packlist
-
-Manage .packlist files
-
-=item ExtUtils::ParseXS
-
-Converts Perl XS code into C code
-
-=item ExtUtils::testlib
-
-Add blib/* directories to @INC
-
-=item Fatal
-
-Replace functions with equivalents which succeed or die
-
-=item Fcntl
-
-Load the C Fcntl.h defines
-
-=item File::Basename
-
-Parse file paths into directory, filename and suffix.
-
-=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::DosGlob
-
-DOS like globbing and then some
-
-=item File::Fetch
-
-A generic file fetching mechanism
-
-=item File::Find
-
-Traverse a directory tree.
-
-=item File::Glob
-
-Perl extension for BSD glob routine
-
-=item File::GlobMapper
-
-Extend File Glob to Allow Input and Output Files
-
-=item File::Path
-
-Create or remove directory trees
-
-=item File::Spec
-
-Portably perform operations on file names
-
-=item File::Spec::Cygwin
-
-Methods for Cygwin file specs
-
-=item File::Spec::Epoc
-
-Methods for Epoc file specs
-
-=item File::Spec::Functions
-
-Portably perform operations on file names
-
-=item File::Spec::Mac
-
-File::Spec for Mac OS (Classic)
-
-=item File::Spec::OS2
-
-Methods for OS/2 file specs
-
-=item File::Spec::Unix
-
-File::Spec for Unix, base for other File::Spec modules
-
-=item File::Spec::VMS
-
-Methods for VMS file specs
-
-=item File::Spec::Win32
-
-Methods for Win32 file specs
-
-=item File::Temp
-
-Return name and handle of a temporary file safely
-
-=item File::stat
-
-By-name interface to Perl's built-in stat() functions
-
-=item FileCache
-
-Keep more files open than the system permits
-
-=item FileHandle
-
-Supply object methods for filehandles
-
-=item Filter::Simple
-
-Simplified source filtering
-
-=item Filter::Util::Call
-
-Perl Source Filter Utility Module
-
-=item FindBin
-
-Locate directory of original perl script
-
-=item GDBM_File
-
-Perl5 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 Hash::Util
-
-A selection of general-utility hash subroutines
-
-=item Hash::Util::FieldHash
-
-Support for Inside-Out Classes
-
-=item I18N::Collate
-
-Compare 8-bit scalar data according to the current locale
-
-=item I18N::LangTags
-
-Functions for dealing with RFC3066-style language tags
-
-=item I18N::LangTags::Detect
-
-Detect the user's language preferences
-
-=item I18N::LangTags::List
-
-Tags and names for human languages
-
-=item I18N::Langinfo
-
-Query locale information
-
-=item IO
-
-Load various IO modules
-
-=item IO::Compress::Base
-
-Base Class for IO::Compress modules
-
-=item IO::Compress::Deflate
-
-Write RFC 1950 files/buffers
-
-=item IO::Compress::Gzip
-
-Write RFC 1952 files/buffers
-
-=item IO::Compress::RawDeflate
-
-Write RFC 1951 files/buffers
-
-=item IO::Compress::Zip
-
-Write zip files/buffers
-
-=item IO::Dir
-
-Supply object methods for directory handles
-
-=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::Poll
-
-Object interface to system poll call
-
-=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 IO::Socket::INET
-
-Object interface for AF_INET domain sockets
-
-=item IO::Socket::UNIX
-
-Object interface for AF_UNIX domain sockets
-
-=item IO::Uncompress::AnyInflate
-
-Uncompress zlib-based (zip, gzip) file/buffer
-
-=item IO::Uncompress::AnyUncompress
-
-Uncompress gzip, zip, bzip2 or lzop file/buffer
-
-=item IO::Uncompress::Base
-
-Base Class for IO::Uncompress modules
-
-=item IO::Uncompress::Gunzip
-
-Read RFC 1952 files/buffers
-
-=item IO::Uncompress::Inflate
-
-Read RFC 1950 files/buffers
-
-=item IO::Uncompress::RawInflate
-
-Read RFC 1951 files/buffers
-
-=item IO::Uncompress::Unzip
-
-Read zip files/buffers
-
-=item IO::Zlib
-
-IO:: style interface to L<Compress::Zlib>
-
-=item IPC::Cmd
-
-Finding and running system commands made easy
-
-=item IPC::Open2
-
-Open a process for both reading and writing
-
-=item IPC::Open3
-
-Open a process for reading, writing, and error handling
-
-=item IPC::SysV
-
-SysV IPC constants
-
-=item IPC::SysV::Msg
-
-SysV Msg IPC object class
-
-=item IPC::SysV::Semaphore
-
-SysV Semaphore IPC object class
-
-=item List::Util
-
-A selection of general-utility list subroutines
-
-=item Locale::Constants
-
-Constants for Locale codes
-
-=item Locale::Country
-
-ISO codes for country identification (ISO 3166)
-
-=item Locale::Currency
-
-ISO three letter codes for currency identification (ISO 4217)
-
-=item Locale::Language
-
-ISO two letter codes for language identification (ISO 639)
-
-=item Locale::Maketext
-
-Framework for localization
-
-=item Locale::Maketext::Simple
-
-Simple interface to Locale::Maketext::Lexicon
-
-=item Locale::Maketext::TPJ13
-
-Article about software localization
-
-=item Locale::Script
-
-ISO codes for script identification (ISO 15924)
-
-=item Log::Message
-
-A generic message storing mechanism;
-
-=item Log::Message::Config
-
-Configuration options for Log::Message
-
-=item Log::Message::Handlers
-
-Message handlers for Log::Message
-
-=item Log::Message::Item
-
-Message objects for Log::Message
-
-=item MIME::Base64
-
-Encoding and decoding of base64 strings
-
-=item MIME::QuotedPrint
-
-Encoding and decoding of quoted-printable strings
-
-=item Math::BigFloat
-
-Arbitrary size floating point math package
-
-=item Math::BigInt
-
-Arbitrary size integer/float math package
-
-=item Math::BigInt::Calc
-
-Pure Perl module to support Math::BigInt
-
-=item Math::BigInt::CalcEmu
-
-Emulate low-level math with BigInt code
-
-=item Math::BigInt::FastCalc
-
-Math::BigInt::Calc with some XS for more speed
-
-=item Math::BigRat
-
-Arbitrary big rational numbers
-
-=item Math::Complex
-
-Complex numbers and associated mathematical functions
-
-=item Math::Trig
-
-Trigonometric functions
-
-=item Memoize
-
-Make functions faster by trading space for time
-
-=item Memoize::AnyDBM_File
-
-Glue to provide EXISTS for AnyDBM_File for Storable use
-
-=item Memoize::Expire
-
-Plug-in module for automatic expiration of memoized values
-
-=item Memoize::ExpireFile
-
-Test for Memoize expiration semantics
-
-=item Memoize::ExpireTest
-
-Test for Memoize expiration semantics
-
-=item Memoize::NDBM_File
-
-Glue to provide EXISTS for NDBM_File for Storable use
-
-=item Memoize::SDBM_File
-
-Glue to provide EXISTS for SDBM_File for Storable use
-
-=item Memoize::Storable
-
-Store Memoized data in Storable database
-
-=item Module::Build
-
-Build and install Perl modules
-
-=item Module::Build::API
-
-API Reference for Module Authors
-
-=item Module::Build::Authoring
-
-Authoring Module::Build modules
-
-=item Module::Build::Base
-
-Default methods for Module::Build
-
-=item Module::Build::Compat
-
-Compatibility with ExtUtils::MakeMaker
-
-=item Module::Build::ConfigData
-
-Configuration for Module::Build
-
-=item Module::Build::Cookbook
-
-Examples of Module::Build Usage
-
-=item Module::Build::ModuleInfo
-
-Gather package and POD information from a perl module files
-
-=item Module::Build::Notes
-
-Configuration for $module_name
-
-=item Module::Build::PPMMaker
-
-Perl Package Manager file creation
-
-=item Module::Build::Platform::Amiga
-
-Builder class for Amiga platforms
-
-=item Module::Build::Platform::Default
-
-Stub class for unknown platforms
-
-=item Module::Build::Platform::EBCDIC
-
-Builder class for EBCDIC platforms
-
-=item Module::Build::Platform::MPEiX
-
-Builder class for MPEiX platforms
-
-=item Module::Build::Platform::MacOS
-
-Builder class for MacOS platforms
-
-=item Module::Build::Platform::RiscOS
-
-Builder class for RiscOS platforms
-
-=item Module::Build::Platform::Unix
-
-Builder class for Unix platforms
-
-=item Module::Build::Platform::VMS
-
-Builder class for VMS platforms
-
-=item Module::Build::Platform::VOS
-
-Builder class for VOS platforms
-
-=item Module::Build::Platform::Windows
-
-Builder class for Windows platforms
-
-=item Module::Build::Platform::aix
-
-Builder class for AIX platform
-
-=item Module::Build::Platform::cygwin
-
-Builder class for Cygwin platform
-
-=item Module::Build::Platform::darwin
-
-Builder class for Mac OS X platform
-
-=item Module::Build::Platform::os2
-
-Builder class for OS/2 platform
-
-=item Module::Build::YAML
-
-Provides just enough YAML support so that Module::Build works even if YAML.pm is not installed
-
-=item Module::CoreList
-
-What modules shipped with versions of perl
-
-=item Module::Load
-
-Runtime require of both modules and files
-
-=item Module::Load::Conditional
-
-Looking up module information / loading at runtime
-
-=item Module::Loaded
-
-Mark modules as loaded or unloaded
-
-=item Module::Pluggable
-
-Automatically give your module the ability to have plugins
-
-=item Module::Pluggable::Object
-
-Automatically give your module the ability to have plugins
-
-=item NDBM_File
-
-Tied access to ndbm files
-
-=item NEXT
-
-Provide a pseudo-class NEXT (et al) that allows method redispatch
-
-=item Net::Cmd
-
-Network Command class (as used by FTP, SMTP etc)
-
-=item Net::Config
-
-Local configuration data for libnet
-
-=item Net::Domain
-
-Attempt to evaluate the current host's internet name and domain
-
-=item Net::FTP
-
-FTP Client class
-
-=item Net::NNTP
-
-NNTP Client class
-
-=item Net::Netrc
-
-OO interface to users netrc file
-
-=item Net::POP3
-
-Post Office Protocol 3 Client class (RFC1939)
-
-=item Net::Ping
-
-Check a remote host for reachability
-
-=item Net::SMTP
-
-Simple Mail Transfer Protocol Client
-
-=item Net::Time
-
-Time and daytime network client interface
-
-=item Net::hostent
-
-By-name interface to Perl's built-in gethost*() functions
-
-=item Net::libnetFAQ
-
-Libnet Frequently Asked Questions
-
-=item Net::netent
-
-By-name interface to Perl's built-in getnet*() functions
-
-=item Net::protoent
-
-By-name interface to Perl's built-in getproto*() functions
-
-=item Net::servent
-
-By-name interface to Perl's built-in getserv*() functions
-
-=item O
-
-Generic interface to Perl Compiler backends
-
-=item ODBM_File
-
-Tied access to odbm files
-
-=item Opcode
-
-Disable named opcodes when compiling perl code
-
-=item POSIX
-
-Perl interface to IEEE Std 1003.1
-
-=item Package::Constants
-
-List all constants declared in a package
-
-=item Params::Check
-
-A generic input parsing/checking mechanism.
-
-=item PerlIO
-
-On demand loader for PerlIO layers and root of PerlIO::* name space
-
-=item PerlIO::encoding
-
-Encoding layer
-
-=item PerlIO::scalar
-
-In-memory IO, scalar IO
-
-=item PerlIO::via
-
-Helper class for PerlIO layers implemented in perl
-
-=item PerlIO::via::QuotedPrint
-
-PerlIO layer for quoted-printable strings
-
-=item Pod::Checker
-
-Check pod documents for syntax errors
-
-=item Pod::Escapes
-
-For resolving Pod EE<lt>...E<gt> sequences
-
-=item Pod::Find
-
-Find POD documents in directory trees
-
-=item Pod::Functions
-
-Group Perl's functions a la perlfunc.pod
-
-=item Pod::Html
-
-Module to convert pod files to HTML
-
-=item Pod::InputObjects
-
-Objects representing POD input paragraphs, commands, etc.
-
-=item Pod::LaTeX
-
-Convert Pod data to formatted Latex
-
-=item Pod::Man
-
-Convert POD data to formatted *roff input
-
-=item Pod::ParseLink
-
-Parse an LE<lt>E<gt> formatting code in POD text
-
-=item Pod::ParseUtils
-
-Helpers for POD parsing and conversion
-
-=item Pod::Parser
-
-Base class for creating POD filters and translators
-
-=item Pod::Perldoc::ToChecker
-
-Let Perldoc check Pod for errors
-
-=item Pod::Perldoc::ToMan
-
-Let Perldoc render Pod as man pages
-
-=item Pod::Perldoc::ToNroff
-
-Let Perldoc convert Pod to nroff
-
-=item Pod::Perldoc::ToPod
-
-Let Perldoc render Pod as ... Pod!
-
-=item Pod::Perldoc::ToRtf
-
-Let Perldoc render Pod as RTF
-
-=item Pod::Perldoc::ToText
-
-Let Perldoc render Pod as plaintext
-
-=item Pod::Perldoc::ToTk
-
-Let Perldoc use Tk::Pod to render Pod
-
-=item Pod::Perldoc::ToXml
-
-Let Perldoc render Pod as XML
-
-=item Pod::PlainText
-
-Convert POD data to formatted ASCII text
-
-=item Pod::Plainer
-
-Perl extension for converting Pod to old style Pod.
-
-=item Pod::Select
-
-Extract selected sections of POD from input
-
-=item Pod::Simple
-
-Framework for parsing Pod
-
-=item Pod::Simple::Checker
-
-Check the Pod syntax of a document
-
-=item Pod::Simple::Debug
-
-Put Pod::Simple into trace/debug mode
-
-=item Pod::Simple::DumpAsText
-
-Dump Pod-parsing events as text
-
-=item Pod::Simple::DumpAsXML
-
-Turn Pod into XML
-
-=item Pod::Simple::HTML
-
-Convert Pod to HTML
-
-=item Pod::Simple::HTMLBatch
-
-Convert several Pod files to several HTML files
-
-=item Pod::Simple::LinkSection
-
-Represent "section" attributes of L codes
-
-=item Pod::Simple::Methody
-
-Turn Pod::Simple events into method calls
-
-=item Pod::Simple::PullParser
-
-A pull-parser interface to parsing Pod
-
-=item Pod::Simple::PullParserEndToken
-
-End-tokens from Pod::Simple::PullParser
-
-=item Pod::Simple::PullParserStartToken
-
-Start-tokens from Pod::Simple::PullParser
-
-=item Pod::Simple::PullParserTextToken
-
-Text-tokens from Pod::Simple::PullParser
-
-=item Pod::Simple::PullParserToken
-
-Tokens from Pod::Simple::PullParser
-
-=item Pod::Simple::RTF
-
-Format Pod as RTF
-
-=item Pod::Simple::Search
-
-Find POD documents in directory trees
-
-=item Pod::Simple::SimpleTree
-
-Parse Pod into a simple parse tree
-
-=item Pod::Simple::Subclassing
-
-Write a formatter as a Pod::Simple subclass
-
-=item Pod::Simple::Text
-
-Format Pod as plaintext
-
-=item Pod::Simple::TextContent
-
-Get the text content of Pod
-
-=item Pod::Simple::XMLOutStream
-
-Turn Pod into XML
-
-=item Pod::Text
-
-Convert POD data to formatted ASCII text
-
-=item Pod::Text::Color
-
-Convert POD data to formatted color ASCII text
-
-=item Pod::Text::Overstrike
-
-Convert POD data to formatted overstrike text
-
-=item Pod::Text::Termcap
-
-Convert POD data to ASCII text with format escapes
-
-=item Pod::Usage
-
-Print a usage message from embedded pod documentation
-
-=item SDBM_File
-
-Tied access to sdbm files
-
-=item Safe
-
-Compile and execute code in restricted compartments
-
-=item Scalar::Util
-
-A selection of general-utility scalar subroutines
-
-=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 Shell
-
-Run shell commands transparently within perl
-
-=item Socket
-
-Load the C socket.h defines and structure manipulators
-
-=item Storable
-
-Persistence for Perl data structures
-
-=item Switch
-
-A switch statement for Perl
-
-=item Symbol
-
-Manipulate Perl symbols and their names
-
-=item Sys::Hostname
-
-Try every conceivable way to get hostname
-
-=item Sys::Syslog
-
-Perl interface to the UNIX syslog(3) calls
-
-=item Sys::Syslog::win32::Win32
-
-Win32 support for Sys::Syslog
-
-=item Term::ANSIColor
-
-Color screen output using ANSI escape sequences
-
-=item Term::Cap
-
-Perl termcap interface
-
-=item Term::Complete
-
-Perl word completion module
-
-=item Term::ReadLine
-
-Perl interface to various C<readline> packages.
-
-=item Term::UI
-
-Term::ReadLine UI made easy
-
-=item Test
-
-Provides a simple framework for writing test scripts
-
-=item Test::Builder
-
-Backend for building test libraries
-
-=item Test::Builder::Module
-
-Base class for test modules
-
-=item Test::Builder::Tester
-
-Test testsuites that have been built with
-
-=item Test::Builder::Tester::Color
-
-Turn on colour in Test::Builder::Tester
-
-=item Test::Harness
-
-Run Perl standard test scripts with statistics
-
-=item Test::Harness::Assert
-
-Simple assert
-
-=item Test::Harness::Iterator
-
-Internal Test::Harness Iterator
-
-=item Test::Harness::Point
-
-Object for tracking a single test point
-
-=item Test::Harness::Results
-
-Object for tracking results from a single test file
-
-=item Test::Harness::Straps
-
-Detailed analysis of test results
-
-=item Test::Harness::TAP
-
-Documentation for the TAP format
-
-=item Test::Harness::Util
-
-Utility functions for Test::Harness::*
-
-=item Test::More
-
-Yet another framework for writing test scripts
-
-=item Test::Simple
-
-Basic utilities for writing tests.
-
-=item Test::Tutorial
-
-A tutorial about writing really basic tests
-
-=item Text::Abbrev
-
-Create an abbreviation table from a list
-
-=item Text::Balanced
-
-Extract delimited text sequences from strings.
-
-=item Text::ParseWords
-
-Parse text into an array of tokens or array of arrays
-
-=item Text::Soundex
-
-Implementation of the soundex algorithm.
-
-=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 Thread
-
-Manipulate threads in Perl (for old code only)
-
-=item Thread::Queue
-
-Thread-safe queues
-
-=item Thread::Semaphore
-
-Thread-safe semaphores
-
-=item Tie::Array
-
-Base class for tied arrays
-
-=item Tie::File
-
-Access the lines of a disk file via a Perl array
-
-=item Tie::Handle
-
-Base class definitions for tied handles
-
-=item Tie::Hash
-
-Base class definitions for tied hashes
-
-=item Tie::Hash::NamedCapture
-
-Named regexp capture buffers
-
-=item Tie::Memoize
-
-Add data to hash when needed
-
-=item Tie::RefHash
-
-Use references as hash keys
-
-=item Tie::Scalar
-
-Base class definitions for tied scalars
-
-=item Tie::SubstrHash
-
-Fixed-table-size, fixed-key-length hashing
-
-=item Time::HiRes
-
-High resolution alarm, sleep, gettimeofday, interval timers
-
-=item Time::Local
-
-Efficiently compute time from local and GMT time
-
-=item Time::Piece
-
-Object Oriented time objects
-
-=item Time::Piece::Seconds
-
-A simple API to convert seconds to other date values
-
-=item Time::gmtime
-
-By-name interface to Perl's built-in gmtime() function
-
-=item Time::localtime
-
-By-name interface to Perl's built-in localtime() function
-
-=item Time::tm
-
-Internal object used by Time::gmtime and Time::localtime
-
-=item UNIVERSAL
-
-Base class for ALL classes (blessed references)
-
-=item Unicode::Collate
-
-Unicode Collation Algorithm
-
-=item Unicode::Normalize
-
-Unicode Normalization Forms
-
-=item Unicode::UCD
-
-Unicode character database
-
-=item User::grent
-
-By-name interface to Perl's built-in getgr*() functions
-
-=item User::pwent
-
-By-name interface to Perl's built-in getpw*() functions
-
-=item Win32
-
-Interfaces to some Win32 API Functions
-
-=item Win32API::File
-
-Low-level access to Win32 system API calls for files/dirs.
-
-=item Win32CORE
-
-Win32 CORE function stubs
-
-=item XS::APItest
-
-Test the perl C API
-
-=item XS::Typemap
-
-Module to test the XS typemaps distributed with perl
-
-=item XSLoader
-
-Dynamically load C libraries into Perl code
-
-=back
-
-To find out I<all> modules installed on your system, including
-those without documentation or outside the standard release,
-just use the following command (under the default win32 shell,
-double quotes should be used instead of single quotes).
-
- % perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \
- 'find { wanted => sub { print canonpath $_ if /\.pm\z/ },
- no_chdir => 1 }, @INC'
-
-(The -T is here to prevent '.' from being listed in @INC.)
-They should all have their own documentation installed and accessible
-via your system man(1) command. If you do not have a B<find>
-program, you can use the Perl B<find2perl> program instead, which
-generates Perl code as output you can run through perl. If you
-have a B<man> program but it doesn't find your modules, you'll have
-to fix your manpath. See L<perl> for details. If you have no
-system B<man> command, you might try the B<perldoc> program.
-
-Note also that the command C<perldoc perllocal> gives you a (possibly
-incomplete) list of the modules that have been further installed on
-your system. (The perllocal.pod file is updated by the standard MakeMaker
-install process.)
-
-=head2 Extension Modules
-
-Extension modules are written in C (or a mix of Perl and C). They
-are usually dynamically loaded into Perl if and when you need them,
-but may also be linked in statically. Supported extension modules
-include Socket, Fcntl, and POSIX.
-
-Many popular C extension modules do not come bundled (at least, not
-completely) due to their sizes, volatility, or simply lack of time
-for adequate testing and configuration across the multitude of
-platforms on which Perl was beta-tested. You are encouraged to
-look for them on CPAN (described below), or using web search engines
-like Alta Vista or Google.
-
-=head1 CPAN
-
-CPAN stands for Comprehensive Perl Archive Network; it's a globally
-replicated trove of Perl materials, including documentation, style
-guides, tricks and traps, alternate ports to non-Unix systems and
-occasional binary distributions for these. Search engines for
-CPAN can be found at http://www.cpan.org/
-
-Most importantly, CPAN includes around a thousand unbundled modules,
-some of which require a C compiler to build. Major categories of
-modules are:
-
-=over
-
-=item *
-
-Language Extensions and Documentation Tools
-
-=item *
-
-Development Support
-
-=item *
-
-Operating System Interfaces
-
-=item *
-
-Networking, Device Control (modems) and InterProcess Communication
-
-=item *
-
-Data Types and Data Type Utilities
-
-=item *
-
-Database Interfaces
-
-=item *
-
-User Interfaces
-
-=item *
-
-Interfaces to / Emulations of Other Programming Languages
-
-=item *
-
-File Names, File Systems and File Locking (see also File Handles)
-
-=item *
-
-String Processing, Language Text Processing, Parsing, and Searching
-
-=item *
-
-Option, Argument, Parameter, and Configuration File Processing
-
-=item *
-
-Internationalization and Locale
-
-=item *
-
-Authentication, Security, and Encryption
-
-=item *
-
-World Wide Web, HTML, HTTP, CGI, MIME
-
-=item *
-
-Server and Daemon Utilities
-
-=item *
-
-Archiving and Compression
-
-=item *
-
-Images, Pixmap and Bitmap Manipulation, Drawing, and Graphing
-
-=item *
-
-Mail and Usenet News
-
-=item *
-
-Control Flow Utilities (callbacks and exceptions etc)
-
-=item *
-
-File Handle and Input/Output Stream Utilities
-
-=item *
-
-Miscellaneous Modules
-
-=back
-
-The list of the registered CPAN sites as of this writing follows.
-Please note that the sorting order is alphabetical on fields:
-
-Continent
- |
- |-->Country
- |
- |-->[state/province]
- |
- |-->ftp
- |
- |-->[http]
-
-and thus the North American servers happen to be listed between the
-European and the South American sites.
-
-You should try to choose one close to you.
-
-=head2 Africa
-
-=over 4
-
-=item South Africa
-
- http://ftp.rucus.ru.ac.za/pub/perl/CPAN/
- ftp://ftp.rucus.ru.ac.za/pub/perl/CPAN/
- ftp://ftp.is.co.za/programming/perl/CPAN/
- ftp://ftp.saix.net/pub/CPAN/
- ftp://ftp.sun.ac.za/CPAN/CPAN/
-
-=back
-
-=head2 Asia
-
-=over 4
-
-=item China
-
- http://cpan.linuxforum.net/
- http://cpan.shellhung.org/
- ftp://ftp.shellhung.org/pub/CPAN
- ftp://mirrors.hknet.com/CPAN
-
-=item Indonesia
-
- http://mirrors.tf.itb.ac.id/cpan/
- http://cpan.cbn.net.id/
- ftp://ftp.cbn.net.id/mirror/CPAN
-
-=item Israel
-
- ftp://ftp.iglu.org.il/pub/CPAN/
- http://cpan.lerner.co.il/
- http://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/
- ftp://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/
-
-=item Japan
-
- ftp://ftp.u-aizu.ac.jp/pub/CPAN
- ftp://ftp.kddlabs.co.jp/CPAN/
- ftp://ftp.ayamura.org/pub/CPAN/
- ftp://ftp.jaist.ac.jp/pub/lang/perl/CPAN/
- http://ftp.cpan.jp/
- ftp://ftp.cpan.jp/CPAN/
- ftp://ftp.dti.ad.jp/pub/lang/CPAN/
- ftp://ftp.ring.gr.jp/pub/lang/perl/CPAN/
-
-=item Malaysia
-
- http://cpan.MyBSD.org.my
- http://mirror.leafbug.org/pub/CPAN
- http://ossig.mncc.com.my/mirror/pub/CPAN
-
-=item Russian Federation
-
- http://cpan.tomsk.ru
- ftp://cpan.tomsk.ru/
-
-=item Saudi Arabia
-
- ftp://ftp.isu.net.sa/pub/CPAN/
-
-=item Singapore
-
- http://CPAN.en.com.sg/
- ftp://cpan.en.com.sg/
- http://mirror.averse.net/pub/CPAN
- ftp://mirror.averse.net/pub/CPAN
- http://cpan.oss.eznetsols.org
- ftp://ftp.oss.eznetsols.org/cpan
-
-=item South Korea
-
- http://CPAN.bora.net/
- ftp://ftp.bora.net/pub/CPAN/
- http://mirror.kr.FreeBSD.org/CPAN
- ftp://ftp.kr.FreeBSD.org/pub/CPAN
-
-=item Taiwan
-
- ftp://ftp.nctu.edu.tw/UNIX/perl/CPAN
- http://cpan.cdpa.nsysu.edu.tw/
- ftp://cpan.cdpa.nsysu.edu.tw/pub/CPAN
- http://ftp.isu.edu.tw/pub/CPAN
- ftp://ftp.isu.edu.tw/pub/CPAN
- ftp://ftp1.sinica.edu.tw/pub1/perl/CPAN/
- http://ftp.tku.edu.tw/pub/CPAN/
- ftp://ftp.tku.edu.tw/pub/CPAN/
-
-=item Thailand
-
- ftp://ftp.loxinfo.co.th/pub/cpan/
- ftp://ftp.cs.riubon.ac.th/pub/mirrors/CPAN/
-
-=back
-
-=head2 Central America
-
-=over 4
-
-=item Costa Rica
-
- http://ftp.ucr.ac.cr/Unix/CPAN/
- ftp://ftp.ucr.ac.cr/pub/Unix/CPAN/
-
-=back
-
-=head2 Europe
-
-=over 4
-
-=item Austria
-
- http://cpan.inode.at/
- ftp://cpan.inode.at
- ftp://ftp.tuwien.ac.at/pub/CPAN/
-
-=item Belgium
-
- http://ftp.easynet.be/pub/CPAN/
- ftp://ftp.easynet.be/pub/CPAN/
- http://cpan.skynet.be
- ftp://ftp.cpan.skynet.be/pub/CPAN
- ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/CPAN/
-
-=item Bosnia and Herzegovina
-
- http://cpan.blic.net/
-
-=item Bulgaria
-
- http://cpan.online.bg
- ftp://cpan.online.bg/cpan
- http://cpan.zadnik.org
- ftp://ftp.zadnik.org/mirrors/CPAN/
- http://cpan.lirex.net/
- ftp://ftp.lirex.net/pub/mirrors/CPAN
-
-=item Croatia
-
- http://ftp.linux.hr/pub/CPAN/
- ftp://ftp.linux.hr/pub/CPAN/
-
-=item Czech Republic
-
- ftp://ftp.fi.muni.cz/pub/CPAN/
- ftp://sunsite.mff.cuni.cz/MIRRORS/ftp.funet.fi/pub/languages/perl/CPAN/
-
-=item Denmark
-
- http://mirrors.sunsite.dk/cpan/
- ftp://sunsite.dk/mirrors/cpan/
- http://cpan.cybercity.dk
- http://www.cpan.dk/CPAN/
- ftp://www.cpan.dk/ftp.cpan.org/CPAN/
-
-=item Estonia
-
- ftp://ftp.ut.ee/pub/languages/perl/CPAN/
-
-=item Finland
-
- ftp://ftp.funet.fi/pub/languages/perl/CPAN/
- http://mirror.eunet.fi/CPAN
-
-=item France
-
- http://www.enstimac.fr/Perl/CPAN
- http://ftp.u-paris10.fr/perl/CPAN
- ftp://ftp.u-paris10.fr/perl/CPAN
- http://cpan.mirrors.easynet.fr/
- ftp://cpan.mirrors.easynet.fr/pub/ftp.cpan.org/
- ftp://ftp.club-internet.fr/pub/perl/CPAN/
- http://fr.cpan.org/
- ftp://ftp.lip6.fr/pub/perl/CPAN/
- ftp://ftp.oleane.net/pub/mirrors/CPAN/
- ftp://ftp.pasteur.fr/pub/computing/CPAN/
- http://mir2.ovh.net/ftp.cpan.org
- ftp://mir1.ovh.net/ftp.cpan.org
- http://ftp.crihan.fr/mirrors/ftp.cpan.org/
- ftp://ftp.crihan.fr/mirrors/ftp.cpan.org/
- http://ftp.u-strasbg.fr/CPAN
- ftp://ftp.u-strasbg.fr/CPAN
- ftp://cpan.cict.fr/pub/CPAN/
- ftp://ftp.uvsq.fr/pub/perl/CPAN/
-
-=item Germany
-
- ftp://ftp.rub.de/pub/CPAN/
- ftp://ftp.freenet.de/pub/ftp.cpan.org/pub/CPAN/
- ftp://ftp.uni-erlangen.de/pub/source/CPAN/
- ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/CPAN
- http://pandemonium.tiscali.de/pub/CPAN/
- ftp://pandemonium.tiscali.de/pub/CPAN/
- http://ftp.gwdg.de/pub/languages/perl/CPAN/
- ftp://ftp.gwdg.de/pub/languages/perl/CPAN/
- ftp://ftp.uni-hamburg.de/pub/soft/lang/perl/CPAN/
- ftp://ftp.leo.org/pub/CPAN/
- http://cpan.noris.de/
- ftp://cpan.noris.de/pub/CPAN/
- ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/
- ftp://ftp.gmd.de/mirrors/CPAN/
-
-=item Greece
-
- ftp://ftp.acn.gr/pub/lang/perl
- ftp://ftp.forthnet.gr/pub/languages/perl/CPAN
- ftp://ftp.ntua.gr/pub/lang/perl/
-
-=item Hungary
-
- http://ftp.kfki.hu/packages/perl/CPAN/
- ftp://ftp.kfki.hu/pub/packages/perl/CPAN/
-
-=item Iceland
-
- http://ftp.rhnet.is/pub/CPAN/
- ftp://ftp.rhnet.is/pub/CPAN/
-
-=item Ireland
-
- http://cpan.indigo.ie/
- ftp://cpan.indigo.ie/pub/CPAN/
- http://ftp.heanet.ie/mirrors/ftp.perl.org/pub/CPAN
- ftp://ftp.heanet.ie/mirrors/ftp.perl.org/pub/CPAN
- http://sunsite.compapp.dcu.ie/pub/perl/
- ftp://sunsite.compapp.dcu.ie/pub/perl/
-
-=item Italy
-
- http://cpan.nettuno.it/
- http://gusp.dyndns.org/CPAN/
- ftp://gusp.dyndns.org/pub/CPAN
- http://softcity.iol.it/cpan
- ftp://softcity.iol.it/pub/cpan
- ftp://ftp.unina.it/pub/Other/CPAN/CPAN/
- ftp://ftp.unipi.it/pub/mirror/perl/CPAN/
- ftp://cis.uniRoma2.it/CPAN/
- ftp://ftp.edisontel.it/pub/CPAN_Mirror/
- http://cpan.flashnet.it/
- ftp://ftp.flashnet.it/pub/CPAN/
-
-=item Latvia
-
- http://kvin.lv/pub/CPAN/
-
-=item Lithuania
-
- ftp://ftp.unix.lt/pub/CPAN/
-
-=item Netherlands
-
- ftp://download.xs4all.nl/pub/mirror/CPAN/
- ftp://ftp.nl.uu.net/pub/CPAN/
- ftp://ftp.nluug.nl/pub/languages/perl/CPAN/
- http://cpan.cybercomm.nl/
- ftp://mirror.cybercomm.nl/pub/CPAN
- ftp://mirror.vuurwerk.nl/pub/CPAN/
- ftp://ftp.cpan.nl/pub/CPAN/
- http://ftp.easynet.nl/mirror/CPAN
- ftp://ftp.easynet.nl/mirror/CPAN
- http://archive.cs.uu.nl/mirror/CPAN/
- ftp://ftp.cs.uu.nl/mirror/CPAN/
-
-=item Norway
-
- ftp://ftp.uninett.no/pub/languages/perl/CPAN
- ftp://ftp.uit.no/pub/languages/perl/cpan/
-
-=item Poland
-
- ftp://ftp.mega.net.pl/CPAN
- ftp://ftp.man.torun.pl/pub/doc/CPAN/
- ftp://sunsite.icm.edu.pl/pub/CPAN/
-
-=item Portugal
-
- ftp://ftp.ua.pt/pub/CPAN/
- ftp://perl.di.uminho.pt/pub/CPAN/
- http://cpan.dei.uc.pt/
- ftp://ftp.dei.uc.pt/pub/CPAN
- ftp://ftp.nfsi.pt/pub/CPAN
- http://ftp.linux.pt/pub/mirrors/CPAN
- ftp://ftp.linux.pt/pub/mirrors/CPAN
- http://cpan.ip.pt/
- ftp://cpan.ip.pt/pub/cpan/
- http://cpan.telepac.pt/
- ftp://ftp.telepac.pt/pub/cpan/
-
-=item Romania
-
- ftp://ftp.bio-net.ro/pub/CPAN
- ftp://ftp.kappa.ro/pub/mirrors/ftp.perl.org/pub/CPAN/
- ftp://ftp.lug.ro/CPAN
- ftp://ftp.roedu.net/pub/CPAN/
- ftp://ftp.dntis.ro/pub/cpan/
- ftp://ftp.iasi.roedu.net/pub/mirrors/ftp.cpan.org/
- http://cpan.ambra.ro/
- ftp://ftp.ambra.ro/pub/CPAN
- ftp://ftp.dnttm.ro/pub/CPAN/
- ftp://ftp.lasting.ro/pub/CPAN
- ftp://ftp.timisoara.roedu.net/mirrors/CPAN/
-
-=item Russia
-
- ftp://ftp.chg.ru/pub/lang/perl/CPAN/
- http://cpan.rinet.ru/
- ftp://cpan.rinet.ru/pub/mirror/CPAN/
- ftp://ftp.aha.ru/pub/CPAN/
- ftp://ftp.corbina.ru/pub/CPAN/
- http://cpan.sai.msu.ru/
- ftp://ftp.sai.msu.su/pub/lang/perl/CPAN/
-
-=item Slovakia
-
- ftp://ftp.cvt.stuba.sk/pub/CPAN/
-
-=item Slovenia
-
- ftp://ftp.arnes.si/software/perl/CPAN/
-
-=item Spain
-
- http://cpan.imasd.elmundo.es/
- ftp://ftp.rediris.es/mirror/CPAN/
- ftp://ftp.ri.telefonica-data.net/CPAN
- ftp://ftp.etse.urv.es/pub/perl/
-
-=item Sweden
-
- http://ftp.du.se/CPAN/
- ftp://ftp.du.se/pub/CPAN/
- http://mirror.dataphone.se/CPAN
- ftp://mirror.dataphone.se/pub/CPAN
- ftp://ftp.sunet.se/pub/lang/perl/CPAN/
-
-=item Switzerland
-
- http://cpan.mirror.solnet.ch/
- ftp://ftp.solnet.ch/mirror/CPAN/
- ftp://ftp.danyk.ch/CPAN/
- ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
-
-=item Turkey
-
- http://ftp.ulak.net.tr/perl/CPAN/
- ftp://ftp.ulak.net.tr/perl/CPAN
- ftp://sunsite.bilkent.edu.tr/pub/languages/CPAN/
-
-=item Ukraine
-
- http://cpan.org.ua/
- ftp://cpan.org.ua/
- ftp://ftp.perl.org.ua/pub/CPAN/
- http://no-more.kiev.ua/CPAN/
- ftp://no-more.kiev.ua/pub/CPAN/
-
-=item United Kingdom
-
- http://www.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN
- ftp://ftp.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN/
- http://cpan.teleglobe.net/
- ftp://cpan.teleglobe.net/pub/CPAN
- http://cpan.mirror.anlx.net/
- ftp://ftp.mirror.anlx.net/CPAN/
- http://cpan.etla.org/
- ftp://cpan.etla.org/pub/CPAN
- ftp://ftp.demon.co.uk/pub/CPAN/
- http://cpan.m.flirble.org/
- ftp://ftp.flirble.org/pub/languages/perl/CPAN/
- ftp://ftp.plig.org/pub/CPAN/
- http://cpan.hambule.co.uk/
- http://cpan.mirrors.clockerz.net/
- ftp://ftp.clockerz.net/pub/CPAN/
- ftp://usit.shef.ac.uk/pub/packages/CPAN/
-
-=back
-
-=head2 North America
-
-=over 4
-
-=item Canada
-
-=over 8
-
-=item Alberta
-
- http://cpan.sunsite.ualberta.ca/
- ftp://cpan.sunsite.ualberta.ca/pub/CPAN/
-
-=item Manitoba
-
- http://theoryx5.uwinnipeg.ca/pub/CPAN/
- ftp://theoryx5.uwinnipeg.ca/pub/CPAN/
-
-=item Nova Scotia
-
- ftp://cpan.chebucto.ns.ca/pub/CPAN/
-
-=item Ontario
-
- ftp://ftp.nrc.ca/pub/CPAN/
-
-=back
-
-=item Mexico
-
- http://cpan.azc.uam.mx
- ftp://cpan.azc.uam.mx/mirrors/CPAN
- http://www.cpan.unam.mx/
- ftp://ftp.unam.mx/pub/CPAN
- http://www.msg.com.mx/CPAN/
- ftp://ftp.msg.com.mx/pub/CPAN/
-
-=item United States
-
-=over 8
-
-=item Alabama
-
- http://mirror.hiwaay.net/CPAN/
- ftp://mirror.hiwaay.net/CPAN/
-
-=item California
-
- http://cpan.develooper.com/
- http://www.cpan.org/
- ftp://cpan.valueclick.com/pub/CPAN/
- http://www.mednor.net/ftp/pub/mirrors/CPAN/
- ftp://ftp.mednor.net/pub/mirrors/CPAN/
- http://mirrors.gossamer-threads.com/CPAN
- ftp://cpan.nas.nasa.gov/pub/perl/CPAN/
- http://mirrors.kernel.org/cpan/
- ftp://mirrors.kernel.org/pub/CPAN
- http://cpan-sj.viaverio.com/
- ftp://cpan-sj.viaverio.com/pub/CPAN/
- http://cpan.digisle.net/
- ftp://cpan.digisle.net/pub/CPAN
- http://www.perl.com/CPAN/
- http://www.uberlan.net/CPAN
-
-=item Colorado
-
- ftp://ftp.cs.colorado.edu/pub/perl/CPAN/
- http://cpan.four10.com
-
-=item Delaware
-
- http://ftp.lug.udel.edu/pub/CPAN
- ftp://ftp.lug.udel.edu/pub/CPAN
-
-=item District of Columbia
-
- ftp://ftp.dc.aleron.net/pub/CPAN/
-
-=item Florida
-
- ftp://ftp.cise.ufl.edu/pub/mirrors/CPAN/
- http://mirror.csit.fsu.edu/pub/CPAN/
- ftp://mirror.csit.fsu.edu/pub/CPAN/
- http://cpan.mirrors.nks.net/
-
-=item Indiana
-
- ftp://ftp.uwsg.iu.edu/pub/perl/CPAN/
- http://cpan.netnitco.net/
- ftp://cpan.netnitco.net/pub/mirrors/CPAN/
- http://archive.progeny.com/CPAN/
- ftp://archive.progeny.com/CPAN/
- http://fx.saintjoe.edu/pub/CPAN
- ftp://ftp.saintjoe.edu/pub/CPAN
- http://csociety-ftp.ecn.purdue.edu/pub/CPAN
- ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN
-
-=item Kentucky
-
- http://cpan.uky.edu/
- ftp://cpan.uky.edu/pub/CPAN/
- http://slugsite.louisville.edu/cpan
- ftp://slugsite.louisville.edu/CPAN
-
-=item Massachusetts
-
- http://mirrors.towardex.com/CPAN
- ftp://mirrors.towardex.com/pub/CPAN
- ftp://ftp.ccs.neu.edu/net/mirrors/ftp.funet.fi/pub/languages/perl/CPAN/
-
-=item Michigan
-
- ftp://cpan.cse.msu.edu/
- http://cpan.calvin.edu/pub/CPAN
- ftp://cpan.calvin.edu/pub/CPAN
-
-=item Nevada
-
- http://www.oss.redundant.com/pub/CPAN
- ftp://www.oss.redundant.com/pub/CPAN
-
-=item New Jersey
-
- http://ftp.cpanel.net/pub/CPAN/
- ftp://ftp.cpanel.net/pub/CPAN/
- http://cpan.teleglobe.net/
- ftp://cpan.teleglobe.net/pub/CPAN
-
-=item New York
-
- http://cpan.belfry.net/
- http://cpan.erlbaum.net/
- ftp://cpan.erlbaum.net/
- http://cpan.thepirtgroup.com/
- ftp://cpan.thepirtgroup.com/
- ftp://ftp.stealth.net/pub/CPAN/
- http://www.rge.com/pub/languages/perl/
- ftp://ftp.rge.com/pub/languages/perl/
-
-=item North Carolina
-
- http://www.ibiblio.org/pub/languages/perl/CPAN
- ftp://ftp.ibiblio.org/pub/languages/perl/CPAN
- ftp://ftp.duke.edu/pub/perl/
- ftp://ftp.ncsu.edu/pub/mirror/CPAN/
-
-=item Oklahoma
-
- ftp://ftp.ou.edu/mirrors/CPAN/
-
-=item Oregon
-
- ftp://ftp.orst.edu/pub/CPAN
-
-=item Pennsylvania
-
- http://ftp.epix.net/CPAN/
- ftp://ftp.epix.net/pub/languages/perl/
- http://mirrors.phenominet.com/pub/CPAN/
- ftp://mirrors.phenominet.com/pub/CPAN/
- http://cpan.pair.com/
- ftp://cpan.pair.com/pub/CPAN/
- ftp://carroll.cac.psu.edu/pub/CPAN/
-
-=item Tennessee
-
- ftp://ftp.sunsite.utk.edu/pub/CPAN/
-
-=item Texas
-
- http://ftp.sedl.org/pub/mirrors/CPAN/
- http://www.binarycode.org/cpan
- ftp://mirror.telentente.com/pub/CPAN
- http://mirrors.theonlinerecordstore.com/CPAN
-
-=item Utah
-
- ftp://mirror.xmission.com/CPAN/
-
-=item Virginia
-
- http://cpan-du.viaverio.com/
- ftp://cpan-du.viaverio.com/pub/CPAN/
- http://mirrors.rcn.net/pub/lang/CPAN/
- ftp://mirrors.rcn.net/pub/lang/CPAN/
- http://perl.secsup.org/
- ftp://perl.secsup.org/pub/perl/
- http://noc.cvaix.com/mirrors/CPAN/
-
-=item Washington
-
- http://cpan.llarian.net/
- ftp://cpan.llarian.net/pub/CPAN/
- http://cpan.mirrorcentral.com/
- ftp://ftp.mirrorcentral.com/pub/CPAN/
- ftp://ftp-mirror.internap.com/pub/CPAN/
-
-=item Wisconsin
-
- http://mirror.sit.wisc.edu/pub/CPAN/
- ftp://mirror.sit.wisc.edu/pub/CPAN/
- http://mirror.aphix.com/CPAN
- ftp://mirror.aphix.com/pub/CPAN
-
-=back
-
-=back
-
-=head2 Oceania
-
-=over 4
-
-=item Australia
-
- http://ftp.planetmirror.com/pub/CPAN/
- ftp://ftp.planetmirror.com/pub/CPAN/
- ftp://mirror.aarnet.edu.au/pub/perl/CPAN/
- ftp://cpan.topend.com.au/pub/CPAN/
- http://cpan.mirrors.ilisys.com.au
-
-=item New Zealand
-
- ftp://ftp.auckland.ac.nz/pub/perl/CPAN/
-
-=item United States
-
- http://aniani.ifa.hawaii.edu/CPAN/
- ftp://aniani.ifa.hawaii.edu/CPAN/
-
-=back
-
-=head2 South America
-
-=over 4
-
-=item Argentina
-
- ftp://mirrors.bannerlandia.com.ar/mirrors/CPAN/
- http://www.linux.org.ar/mirrors/cpan
- ftp://ftp.linux.org.ar/mirrors/cpan
-
-=item Brazil
-
- ftp://cpan.pop-mg.com.br/pub/CPAN/
- ftp://ftp.matrix.com.br/pub/perl/CPAN/
- http://cpan.hostsul.com.br/
- ftp://cpan.hostsul.com.br/
-
-=item Chile
-
- http://cpan.netglobalis.net/
- ftp://cpan.netglobalis.net/pub/CPAN/
-
-=back
-
-=head2 RSYNC Mirrors
-
- www.linux.org.ar::cpan
- theoryx5.uwinnipeg.ca::CPAN
- ftp.shellhung.org::CPAN
- rsync.nic.funet.fi::CPAN
- ftp.u-paris10.fr::CPAN
- mir1.ovh.net::CPAN
- rsync://ftp.crihan.fr::CPAN
- ftp.gwdg.de::FTP/languages/perl/CPAN/
- ftp.leo.org::CPAN
- ftp.cbn.net.id::CPAN
- rsync://ftp.heanet.ie/mirrors/ftp.perl.org/pub/CPAN
- ftp.iglu.org.il::CPAN
- gusp.dyndns.org::cpan
- ftp.kddlabs.co.jp::cpan
- ftp.ayamura.org::pub/CPAN/
- mirror.leafbug.org::CPAN
- rsync.en.com.sg::CPAN
- mirror.averse.net::cpan
- rsync.oss.eznetsols.org
- ftp.kr.FreeBSD.org::CPAN
- ftp.solnet.ch::CPAN
- cpan.cdpa.nsysu.edu.tw::CPAN
- cpan.teleglobe.net::CPAN
- rsync://rsync.mirror.anlx.net::CPAN
- ftp.sedl.org::cpan
- ibiblio.org::CPAN
- cpan-du.viaverio.com::CPAN
- aniani.ifa.hawaii.edu::CPAN
- archive.progeny.com::CPAN
- rsync://slugsite.louisville.edu::CPAN
- mirror.aphix.com::CPAN
- cpan.teleglobe.net::CPAN
- ftp.lug.udel.edu::cpan
- mirrors.kernel.org::mirrors/CPAN
- mirrors.phenominet.com::CPAN
- cpan.pair.com::CPAN
- cpan-sj.viaverio.com::CPAN
- mirror.csit.fsu.edu::CPAN
- csociety-ftp.ecn.purdue.edu::CPAN
-
-For an up-to-date listing of CPAN sites,
-see http://www.cpan.org/SITES or ftp://www.cpan.org/SITES .
-
-=head1 Modules: Creation, Use, and Abuse
-
-(The following section is borrowed directly from Tim Bunce's modules
-file, available at your nearest CPAN site.)
-
-Perl implements a class using a package, but the presence of a
-package doesn't imply the presence of a class. A package is just a
-namespace. A class is a package that provides subroutines that can be
-used as methods. A method is just a subroutine that expects, as its
-first argument, either the name of a package (for "static" methods),
-or a reference to something (for "virtual" methods).
-
-A module is a file that (by convention) provides a class of the same
-name (sans the .pm), plus an import method in that class that can be
-called to fetch exported symbols. This module may implement some of
-its methods by loading dynamic C or C++ objects, but that should be
-totally transparent to the user of the module. Likewise, the module
-might set up an AUTOLOAD function to slurp in subroutine definitions on
-demand, but this is also transparent. Only the F<.pm> file is required to
-exist. See L<perlsub>, L<perltoot>, and L<AutoLoader> for details about
-the AUTOLOAD mechanism.
-
-=head2 Guidelines for Module Creation
-
-=over 4
-
-=item *
-
-Do similar modules already exist in some form?
-
-If so, please try to reuse the existing modules either in whole or
-by inheriting useful features into a new class. If this is not
-practical try to get together with the module authors to work on
-extending or enhancing the functionality of the existing modules.
-A perfect example is the plethora of packages in perl4 for dealing
-with command line options.
-
-If you are writing a module to expand an already existing set of
-modules, please coordinate with the author of the package. It
-helps if you follow the same naming scheme and module interaction
-scheme as the original author.
-
-=item *
-
-Try to design the new module to be easy to extend and reuse.
-
-Try to C<use warnings;> (or C<use warnings qw(...);>).
-Remember that you can add C<no warnings qw(...);> to individual blocks
-of code that need less warnings.
-
-Use blessed references. Use the two argument form of bless to bless
-into the class name given as the first parameter of the constructor,
-e.g.,:
-
- sub new {
- my $class = shift;
- return bless {}, $class;
- }
-
-or even this if you'd like it to be used as either a static
-or a virtual method.
-
- sub new {
- my $self = shift;
- my $class = ref($self) || $self;
- return bless {}, $class;
- }
-
-Pass arrays as references so more parameters can be added later
-(it's also faster). Convert functions into methods where
-appropriate. Split large methods into smaller more flexible ones.
-Inherit methods from other modules if appropriate.
-
-Avoid class name tests like: C<die "Invalid" unless ref $ref eq 'FOO'>.
-Generally you can delete the C<eq 'FOO'> part with no harm at all.
-Let the objects look after themselves! Generally, avoid hard-wired
-class names as far as possible.
-
-Avoid C<< $r->Class::func() >> where using C<@ISA=qw(... Class ...)> and
-C<< $r->func() >> would work (see L<perlbot> for more details).
-
-Use autosplit so little used or newly added functions won't be a
-burden to programs that don't use them. Add test functions to
-the module after __END__ either using AutoSplit or by saying:
-
- eval join('',<main::DATA>) || die $@ unless caller();
-
-Does your module pass the 'empty subclass' test? If you say
-C<@SUBCLASS::ISA = qw(YOURCLASS);> your applications should be able
-to use SUBCLASS in exactly the same way as YOURCLASS. For example,
-does your application still work if you change: C<< $obj = YOURCLASS->new(); >>
-into: C<< $obj = SUBCLASS->new(); >> ?
-
-Avoid keeping any state information in your packages. It makes it
-difficult for multiple other packages to use yours. Keep state
-information in objects.
-
-Always use B<-w>.
-
-Try to C<use strict;> (or C<use strict qw(...);>).
-Remember that you can add C<no strict qw(...);> to individual blocks
-of code that need less strictness.
-
-Always use B<-w>.
-
-Follow the guidelines in the perlstyle(1) manual.
-
-Always use B<-w>.
-
-=item *
-
-Some simple style guidelines
-
-The perlstyle manual supplied with Perl has many helpful points.
-
-Coding style is a matter of personal taste. Many people evolve their
-style over several years as they learn what helps them write and
-maintain good code. Here's one set of assorted suggestions that
-seem to be widely used by experienced developers:
-
-Use underscores to separate words. It is generally easier to read
-$var_names_like_this than $VarNamesLikeThis, especially for
-non-native speakers of English. It's also a simple rule that works
-consistently with VAR_NAMES_LIKE_THIS.
-
-Package/Module names are an exception to this rule. Perl informally
-reserves lowercase module names for 'pragma' modules like integer
-and strict. Other modules normally begin with a capital letter and
-use mixed case with no underscores (need to be short and portable).
-
-You may find it helpful to use letter case to indicate the scope
-or nature of a variable. For example:
-
- $ALL_CAPS_HERE constants only (beware clashes with Perl vars)
- $Some_Caps_Here package-wide global/static
- $no_caps_here function scope my() or local() variables
-
-Function and method names seem to work best as all lowercase.
-e.g., C<< $obj->as_string() >>.
-
-You can use a leading underscore to indicate that a variable or
-function should not be used outside the package that defined it.
-
-=item *
-
-Select what to export.
-
-Do NOT export method names!
-
-Do NOT export anything else by default without a good reason!
-
-Exports pollute the namespace of the module user. If you must
-export try to use @EXPORT_OK in preference to @EXPORT and avoid
-short or common names to reduce the risk of name clashes.
-
-Generally anything not exported is still accessible from outside the
-module using the ModuleName::item_name (or C<< $blessed_ref->method >>)
-syntax. By convention you can use a leading underscore on names to
-indicate informally that they are 'internal' and not for public use.
-
-(It is actually possible to get private functions by saying:
-C<my $subref = sub { ... }; &$subref;>. But there's no way to call that
-directly as a method, because a method must have a name in the symbol
-table.)
-
-As a general rule, if the module is trying to be object oriented
-then export nothing. If it's just a collection of functions then
- at EXPORT_OK anything but use @EXPORT with caution.
-
-=item *
-
-Select a name for the module.
-
-This name should be as descriptive, accurate, and complete as
-possible. Avoid any risk of ambiguity. Always try to use two or
-more whole words. Generally the name should reflect what is special
-about what the module does rather than how it does it. Please use
-nested module names to group informally or categorize a module.
-There should be a very good reason for a module not to have a nested name.
-Module names should begin with a capital letter.
-
-Having 57 modules all called Sort will not make life easy for anyone
-(though having 23 called Sort::Quick is only marginally better :-).
-Imagine someone trying to install your module alongside many others.
-If in any doubt ask for suggestions in comp.lang.perl.misc.
-
-If you are developing a suite of related modules/classes it's good
-practice to use nested classes with a common prefix as this will
-avoid namespace clashes. For example: Xyz::Control, Xyz::View,
-Xyz::Model etc. Use the modules in this list as a naming guide.
-
-If adding a new module to a set, follow the original author's
-standards for naming modules and the interface to methods in
-those modules.
-
-If developing modules for private internal or project specific use,
-that will never be released to the public, then you should ensure
-that their names will not clash with any future public module. You
-can do this either by using the reserved Local::* category or by
-using a category name that includes an underscore like Foo_Corp::*.
-
-To be portable each component of a module name should be limited to
-11 characters. If it might be used on MS-DOS then try to ensure each is
-unique in the first 8 characters. Nested modules make this easier.
-
-=item *
-
-Have you got it right?
-
-How do you know that you've made the right decisions? Have you
-picked an interface design that will cause problems later? Have
-you picked the most appropriate name? Do you have any questions?
-
-The best way to know for sure, and pick up many helpful suggestions,
-is to ask someone who knows. Comp.lang.perl.misc is read by just about
-all the people who develop modules and it's the best place to ask.
-
-All you need to do is post a short summary of the module, its
-purpose and interfaces. A few lines on each of the main methods is
-probably enough. (If you post the whole module it might be ignored
-by busy people - generally the very people you want to read it!)
-
-Don't worry about posting if you can't say when the module will be
-ready - just say so in the message. It might be worth inviting
-others to help you, they may be able to complete it for you!
-
-=item *
-
-README and other Additional Files.
-
-It's well known that software developers usually fully document the
-software they write. If, however, the world is in urgent need of
-your software and there is not enough time to write the full
-documentation please at least provide a README file containing:
-
-=over 10
-
-=item *
-
-A description of the module/package/extension etc.
-
-=item *
-
-A copyright notice - see below.
-
-=item *
-
-Prerequisites - what else you may need to have.
-
-=item *
-
-How to build it - possible changes to Makefile.PL etc.
-
-=item *
-
-How to install it.
-
-=item *
-
-Recent changes in this release, especially incompatibilities
-
-=item *
-
-Changes / enhancements you plan to make in the future.
-
-=back
-
-If the README file seems to be getting too large you may wish to
-split out some of the sections into separate files: INSTALL,
-Copying, ToDo etc.
-
-=over 4
-
-=item *
-
-Adding a Copyright Notice.
-
-How you choose to license 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.
-
-Perl, for example, is supplied with two types of licence: The GNU GPL
-and The Artistic Licence (see the files README, Copying, and Artistic,
-or L<perlgpl> and L<perlartistic>). Larry has good reasons for NOT
-just using the GNU GPL.
-
-My personal recommendation, out of respect for Larry, Perl, and the
-Perl community at large is to state something simply like:
-
- Copyright (c) 1995 Your Name. All rights reserved.
- This program is free software; you can redistribute it and/or
- modify it under the same terms as Perl itself.
-
-This statement should at least appear in the README file. You may
-also wish to include it in a Copying file and your source files.
-Remember to include the other words in addition to the Copyright.
-
-=item *
-
-Give the module a version/issue/release number.
-
-To be fully compatible with the Exporter and MakeMaker modules you
-should store your module's version number in a non-my package
-variable called $VERSION. This should be a floating point
-number with at least two digits after the decimal (i.e., hundredths,
-e.g, C<$VERSION = "0.01">). Don't use a "1.3.2" style version.
-See L<Exporter> for details.
-
-It may be handy to add a function or method to retrieve the number.
-Use the number in announcements and archive file names when
-releasing the module (ModuleName-1.02.tar.Z).
-See perldoc ExtUtils::MakeMaker.pm for details.
-
-=item *
-
-How to release and distribute a module.
-
-It's good idea to post an announcement of the availability of your
-module (or the module itself if small) to the comp.lang.perl.announce
-Usenet newsgroup. This will at least ensure very wide once-off
-distribution.
-
-If possible, register the module with CPAN. You should
-include details of its location in your announcement.
-
-Some notes about ftp archives: Please use a long descriptive file
-name that includes the version number. Most incoming directories
-will not be readable/listable, i.e., you won't be able to see your
-file after uploading it. Remember to send your email notification
-message as soon as possible after uploading else your file may get
-deleted automatically. Allow time for the file to be processed
-and/or check the file has been processed before announcing its
-location.
-
-FTP Archives for Perl Modules:
-
-Follow the instructions and links on:
-
- http://www.cpan.org/modules/00modlist.long.html
- http://www.cpan.org/modules/04pause.html
-
-or upload to one of these sites:
-
- https://pause.kbx.de/pause/
- http://pause.perl.org/pause/
-
-and notify <modules at perl.org>.
-
-By using the WWW interface you can ask the Upload Server to mirror
-your modules from your ftp or WWW site into your own directory on
-CPAN!
-
-Please remember to send me an updated entry for the Module list!
-
-=item *
-
-Take care when changing a released module.
-
-Always strive to remain compatible with previous released versions.
-Otherwise try to add a mechanism to revert to the
-old behavior if people rely on it. Document incompatible changes.
-
-=back
-
-=back
-
-=head2 Guidelines for Converting Perl 4 Library Scripts into Modules
-
-=over 4
-
-=item *
-
-There is no requirement to convert anything.
-
-If it ain't broke, don't fix it! Perl 4 library scripts should
-continue to work with no problems. You may need to make some minor
-changes (like escaping non-array @'s in double quoted strings) but
-there is no need to convert a .pl file into a Module for just that.
-
-=item *
-
-Consider the implications.
-
-All Perl applications that make use of the script will need to
-be changed (slightly) if the script is converted into a module. Is
-it worth it unless you plan to make other changes at the same time?
-
-=item *
-
-Make the most of the opportunity.
-
-If you are going to convert the script to a module you can use the
-opportunity to redesign the interface. The guidelines for module
-creation above include many of the issues you should consider.
-
-=item *
-
-The pl2pm utility will get you started.
-
-This utility will read *.pl files (given as parameters) and write
-corresponding *.pm files. The pl2pm utilities does the following:
-
-=over 10
-
-=item *
-
-Adds the standard Module prologue lines
-
-=item *
-
-Converts package specifiers from ' to ::
-
-=item *
-
-Converts die(...) to croak(...)
-
-=item *
-
-Several other minor changes
-
-=back
-
-Being a mechanical process pl2pm is not bullet proof. The converted
-code will need careful checking, especially any package statements.
-Don't delete the original .pl file till the new .pm one works!
-
-=back
-
-=head2 Guidelines for Reusing Application Code
-
-=over 4
-
-=item *
-
-Complete applications rarely belong in the Perl Module Library.
-
-=item *
-
-Many applications contain some Perl code that could be reused.
-
-Help save the world! Share your code in a form that makes it easy
-to reuse.
-
-=item *
-
-Break-out the reusable code into one or more separate module files.
-
-=item *
-
-Take the opportunity to reconsider and redesign the interfaces.
-
-=item *
-
-In some cases the 'application' can then be reduced to a small
-
-fragment of code built on top of the reusable modules. In these cases
-the application could invoked as:
-
- % perl -e 'use Module::Name; method(@ARGV)' ...
-or
- % perl -mModule::Name ... (in perl5.002 or higher)
-
-=back
-
-=head1 NOTE
-
-Perl does not enforce private and public parts of its modules as you may
-have been used to in other languages like C++, Ada, or Modula-17. Perl
-doesn't have an infatuation with enforced privacy. It would prefer
-that you stayed out of its living room because you weren't invited, not
-because it has a shotgun.
-
-The module and its user have a contract, part of which is common law,
-and part of which is "written". Part of the common law contract is
-that a module doesn't pollute any namespace it wasn't asked to. The
-written contract for the module (A.K.A. documentation) may make other
-provisions. But then you know when you C<use RedefineTheWorld> that
-you're redefining the world and willing to take the consequences.
Deleted: vendor/perl/dist/pod/perlothrtut.pod
===================================================================
--- vendor/perl/dist/pod/perlothrtut.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlothrtut.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1067 +0,0 @@
-=head1 NAME
-
-perlothrtut - old tutorial on threads in Perl
-
-=head1 DESCRIPTION
-
-B<WARNING>:
-This tutorial describes the old-style thread model that was introduced in
-release 5.005. This model is deprecated, and has been removed
-for version 5.10. The interfaces described here were considered
-experimental, and are likely to be buggy.
-
-For information about the new interpreter threads ("ithreads") model, see
-the F<perlthrtut> tutorial, and the L<threads> and L<threads::shared>
-modules.
-
-You are strongly encouraged to migrate any existing threads code to the
-new model as soon as possible.
-
-=head1 What Is A Thread Anyway?
-
-A thread is a flow of control through a program with a single
-execution point.
-
-Sounds an awful lot like a process, doesn't it? Well, it should.
-Threads are one of the pieces of a process. Every process has at least
-one thread and, up until now, every process running Perl had only one
-thread. With 5.005, though, you can create extra threads. We're going
-to show you how, when, and why.
-
-=head1 Threaded Program Models
-
-There are three basic ways that you can structure a threaded
-program. Which model you choose depends on what you need your program
-to do. For many non-trivial threaded programs you'll need to choose
-different models for different pieces of your program.
-
-=head2 Boss/Worker
-
-The boss/worker model usually has one `boss' thread and one or more
-`worker' threads. The boss thread gathers or generates tasks that need
-to be done, then parcels those tasks out to the appropriate worker
-thread.
-
-This model is common in GUI and server programs, where a main thread
-waits for some event and then passes that event to the appropriate
-worker threads for processing. Once the event has been passed on, the
-boss thread goes back to waiting for another event.
-
-The boss thread does relatively little work. While tasks aren't
-necessarily performed faster than with any other method, it tends to
-have the best user-response times.
-
-=head2 Work Crew
-
-In the work crew model, several threads are created that do
-essentially the same thing to different pieces of data. It closely
-mirrors classical parallel processing and vector processors, where a
-large array of processors do the exact same thing to many pieces of
-data.
-
-This model is particularly useful if the system running the program
-will distribute multiple threads across different processors. It can
-also be useful in ray tracing or rendering engines, where the
-individual threads can pass on interim results to give the user visual
-feedback.
-
-=head2 Pipeline
-
-The pipeline model divides up a task into a series of steps, and
-passes the results of one step on to the thread processing the
-next. Each thread does one thing to each piece of data and passes the
-results to the next thread in line.
-
-This model makes the most sense if you have multiple processors so two
-or more threads will be executing in parallel, though it can often
-make sense in other contexts as well. It tends to keep the individual
-tasks small and simple, as well as allowing some parts of the pipeline
-to block (on I/O or system calls, for example) while other parts keep
-going. If you're running different parts of the pipeline on different
-processors you may also take advantage of the caches on each
-processor.
-
-This model is also handy for a form of recursive programming where,
-rather than having a subroutine call itself, it instead creates
-another thread. Prime and Fibonacci generators both map well to this
-form of the pipeline model. (A version of a prime number generator is
-presented later on.)
-
-=head1 Native threads
-
-There are several different ways to implement threads on a system. How
-threads are implemented depends both on the vendor and, in some cases,
-the version of the operating system. Often the first implementation
-will be relatively simple, but later versions of the OS will be more
-sophisticated.
-
-While the information in this section is useful, it's not necessary,
-so you can skip it if you don't feel up to it.
-
-There are three basic categories of threads-user-mode threads, kernel
-threads, and multiprocessor kernel threads.
-
-User-mode threads are threads that live entirely within a program and
-its libraries. In this model, the OS knows nothing about threads. As
-far as it's concerned, your process is just a process.
-
-This is the easiest way to implement threads, and the way most OSes
-start. The big disadvantage is that, since the OS knows nothing about
-threads, if one thread blocks they all do. Typical blocking activities
-include most system calls, most I/O, and things like sleep().
-
-Kernel threads are the next step in thread evolution. The OS knows
-about kernel threads, and makes allowances for them. The main
-difference between a kernel thread and a user-mode thread is
-blocking. With kernel threads, things that block a single thread don't
-block other threads. This is not the case with user-mode threads,
-where the kernel blocks at the process level and not the thread level.
-
-This is a big step forward, and can give a threaded program quite a
-performance boost over non-threaded programs. Threads that block
-performing I/O, for example, won't block threads that are doing other
-things. Each process still has only one thread running at once,
-though, regardless of how many CPUs a system might have.
-
-Since kernel threading can interrupt a thread at any time, they will
-uncover some of the implicit locking assumptions you may make in your
-program. For example, something as simple as C<$a = $a + 2> can behave
-unpredictably with kernel threads if $a is visible to other
-threads, as another thread may have changed $a between the time it
-was fetched on the right hand side and the time the new value is
-stored.
-
-Multiprocessor Kernel Threads are the final step in thread
-support. With multiprocessor kernel threads on a machine with multiple
-CPUs, the OS may schedule two or more threads to run simultaneously on
-different CPUs.
-
-This can give a serious performance boost to your threaded program,
-since more than one thread will be executing at the same time. As a
-tradeoff, though, any of those nagging synchronization issues that
-might not have shown with basic kernel threads will appear with a
-vengeance.
-
-In addition to the different levels of OS involvement in threads,
-different OSes (and different thread implementations for a particular
-OS) allocate CPU cycles to threads in different ways.
-
-Cooperative multitasking systems have running threads give up control
-if one of two things happen. If a thread calls a yield function, it
-gives up control. It also gives up control if the thread does
-something that would cause it to block, such as perform I/O. In a
-cooperative multitasking implementation, one thread can starve all the
-others for CPU time if it so chooses.
-
-Preemptive multitasking systems interrupt threads at regular intervals
-while the system decides which thread should run next. In a preemptive
-multitasking system, one thread usually won't monopolize the CPU.
-
-On some systems, there can be cooperative and preemptive threads
-running simultaneously. (Threads running with realtime priorities
-often behave cooperatively, for example, while threads running at
-normal priorities behave preemptively.)
-
-=head1 What kind of threads are perl threads?
-
-If you have experience with other thread implementations, you might
-find that things aren't quite what you expect. It's very important to
-remember when dealing with Perl threads that Perl Threads Are Not X
-Threads, for all values of X. They aren't POSIX threads, or
-DecThreads, or Java's Green threads, or Win32 threads. There are
-similarities, and the broad concepts are the same, but if you start
-looking for implementation details you're going to be either
-disappointed or confused. Possibly both.
-
-This is not to say that Perl threads are completely different from
-everything that's ever come before--they're not. Perl's threading
-model owes a lot to other thread models, especially POSIX. Just as
-Perl is not C, though, Perl threads are not POSIX threads. So if you
-find yourself looking for mutexes, or thread priorities, it's time to
-step back a bit and think about what you want to do and how Perl can
-do it.
-
-=head1 Threadsafe Modules
-
-The addition of threads has changed Perl's internals
-substantially. There are implications for people who write
-modules--especially modules with XS code or external libraries. While
-most modules won't encounter any problems, modules that aren't
-explicitly tagged as thread-safe should be tested before being used in
-production code.
-
-Not all modules that you might use are thread-safe, and you should
-always assume a module is unsafe unless the documentation says
-otherwise. This includes modules that are distributed as part of the
-core. Threads are a beta feature, and even some of the standard
-modules aren't thread-safe.
-
-If you're using a module that's not thread-safe for some reason, you
-can protect yourself by using semaphores and lots of programming
-discipline to control access to the module. Semaphores are covered
-later in the article. Perl Threads Are Different
-
-=head1 Thread Basics
-
-The core Thread module provides the basic functions you need to write
-threaded programs. In the following sections we'll cover the basics,
-showing you what you need to do to create a threaded program. After
-that, we'll go over some of the features of the Thread module that
-make threaded programming easier.
-
-=head2 Basic Thread Support
-
-Thread support is a Perl compile-time option-it's something that's
-turned on or off when Perl is built at your site, rather than when
-your programs are compiled. If your Perl wasn't compiled with thread
-support enabled, then any attempt to use threads will fail.
-
-Remember that the threading support in 5.005 is in beta release, and
-should be treated as such. You should expect that it may not function
-entirely properly, and the thread interface may well change some
-before it is a fully supported, production release. The beta version
-shouldn't be used for mission-critical projects. Having said that,
-threaded Perl is pretty nifty, and worth a look.
-
-Your programs can use the Config module to check whether threads are
-enabled. If your program can't run without them, you can say something
-like:
-
- $Config{usethreads} or die "Recompile Perl with threads to run this program.";
-
-A possibly-threaded program using a possibly-threaded module might
-have code like this:
-
- use Config;
- use MyMod;
-
- if ($Config{usethreads}) {
- # We have threads
- require MyMod_threaded;
- import MyMod_threaded;
- } else {
- require MyMod_unthreaded;
- import MyMod_unthreaded;
- }
-
-Since code that runs both with and without threads is usually pretty
-messy, it's best to isolate the thread-specific code in its own
-module. In our example above, that's what MyMod_threaded is, and it's
-only imported if we're running on a threaded Perl.
-
-=head2 Creating Threads
-
-The Thread package provides the tools you need to create new
-threads. Like any other module, you need to tell Perl you want to use
-it; use Thread imports all the pieces you need to create basic
-threads.
-
-The simplest, straightforward way to create a thread is with new():
-
- use Thread;
-
- $thr = Thread->new( \&sub1 );
-
- sub sub1 {
- print "In the thread\n";
- }
-
-The new() method takes a reference to a subroutine and creates a new
-thread, which starts executing in the referenced subroutine. Control
-then passes both to the subroutine and the caller.
-
-If you need to, your program can pass parameters to the subroutine as
-part of the thread startup. Just include the list of parameters as
-part of the C<Thread::new> call, like this:
-
- use Thread;
- $Param3 = "foo";
- $thr = Thread->new( \&sub1, "Param 1", "Param 2", $Param3 );
- $thr = Thread->new( \&sub1, @ParamList );
- $thr = Thread->new( \&sub1, qw(Param1 Param2 $Param3) );
-
- sub sub1 {
- my @InboundParameters = @_;
- print "In the thread\n";
- print "got parameters >", join("<>", @InboundParameters), "<\n";
- }
-
-
-The subroutine runs like a normal Perl subroutine, and the call to new
-Thread returns whatever the subroutine returns.
-
-The last example illustrates another feature of threads. You can spawn
-off several threads using the same subroutine. Each thread executes
-the same subroutine, but in a separate thread with a separate
-environment and potentially separate arguments.
-
-The other way to spawn a new thread is with async(), which is a way to
-spin off a chunk of code like eval(), but into its own thread:
-
- use Thread qw(async);
-
- $LineCount = 0;
-
- $thr = async {
- while(<>) {$LineCount++}
- print "Got $LineCount lines\n";
- };
-
- print "Waiting for the linecount to end\n";
- $thr->join;
- print "All done\n";
-
-You'll notice we did a use Thread qw(async) in that example. async is
-not exported by default, so if you want it, you'll either need to
-import it before you use it or fully qualify it as
-Thread::async. You'll also note that there's a semicolon after the
-closing brace. That's because async() treats the following block as an
-anonymous subroutine, so the semicolon is necessary.
-
-Like eval(), the code executes in the same context as it would if it
-weren't spun off. Since both the code inside and after the async start
-executing, you need to be careful with any shared resources. Locking
-and other synchronization techniques are covered later.
-
-=head2 Giving up control
-
-There are times when you may find it useful to have a thread
-explicitly give up the CPU to another thread. Your threading package
-might not support preemptive multitasking for threads, for example, or
-you may be doing something compute-intensive and want to make sure
-that the user-interface thread gets called frequently. Regardless,
-there are times that you might want a thread to give up the processor.
-
-Perl's threading package provides the yield() function that does
-this. yield() is pretty straightforward, and works like this:
-
- use Thread qw(yield async);
- async {
- my $foo = 50;
- while ($foo--) { print "first async\n" }
- yield;
- $foo = 50;
- while ($foo--) { print "first async\n" }
- };
- async {
- my $foo = 50;
- while ($foo--) { print "second async\n" }
- yield;
- $foo = 50;
- while ($foo--) { print "second async\n" }
- };
-
-=head2 Waiting For A Thread To Exit
-
-Since threads are also subroutines, they can return values. To wait
-for a thread to exit and extract any scalars it might return, you can
-use the join() method.
-
- use Thread;
- $thr = Thread->new( \&sub1 );
-
- @ReturnData = $thr->join;
- print "Thread returned @ReturnData";
-
- sub sub1 { return "Fifty-six", "foo", 2; }
-
-In the example above, the join() method returns as soon as the thread
-ends. In addition to waiting for a thread to finish and gathering up
-any values that the thread might have returned, join() also performs
-any OS cleanup necessary for the thread. That cleanup might be
-important, especially for long-running programs that spawn lots of
-threads. If you don't want the return values and don't want to wait
-for the thread to finish, you should call the detach() method
-instead. detach() is covered later in the article.
-
-=head2 Errors In Threads
-
-So what happens when an error occurs in a thread? Any errors that
-could be caught with eval() are postponed until the thread is
-joined. If your program never joins, the errors appear when your
-program exits.
-
-Errors deferred until a join() can be caught with eval():
-
- use Thread qw(async);
- $thr = async {$b = 3/0}; # Divide by zero error
- $foo = eval {$thr->join};
- if ($@) {
- print "died with error $@\n";
- } else {
- print "Hey, why aren't you dead?\n";
- }
-
-eval() passes any results from the joined thread back unmodified, so
-if you want the return value of the thread, this is your only chance
-to get them.
-
-=head2 Ignoring A Thread
-
-join() does three things: it waits for a thread to exit, cleans up
-after it, and returns any data the thread may have produced. But what
-if you're not interested in the thread's return values, and you don't
-really care when the thread finishes? All you want is for the thread
-to get cleaned up after when it's done.
-
-In this case, you use the detach() method. Once a thread is detached,
-it'll run until it's finished, then Perl will clean up after it
-automatically.
-
- use Thread;
- $thr = Thread->new( \&sub1 ); # Spawn the thread
-
- $thr->detach; # Now we officially don't care any more
-
- sub sub1 {
- $a = 0;
- while (1) {
- $a++;
- print "\$a is $a\n";
- sleep 1;
- }
- }
-
-
-Once a thread is detached, it may not be joined, and any output that
-it might have produced (if it was done and waiting for a join) is
-lost.
-
-=head1 Threads And Data
-
-Now that we've covered the basics of threads, it's time for our next
-topic: data. Threading introduces a couple of complications to data
-access that non-threaded programs never need to worry about.
-
-=head2 Shared And Unshared Data
-
-The single most important thing to remember when using threads is that
-all threads potentially have access to all the data anywhere in your
-program. While this is true with a nonthreaded Perl program as well,
-it's especially important to remember with a threaded program, since
-more than one thread can be accessing this data at once.
-
-Perl's scoping rules don't change because you're using threads. If a
-subroutine (or block, in the case of async()) could see a variable if
-you weren't running with threads, it can see it if you are. This is
-especially important for the subroutines that create, and makes C<my>
-variables even more important. Remember--if your variables aren't
-lexically scoped (declared with C<my>) you're probably sharing them
-between threads.
-
-=head2 Thread Pitfall: Races
-
-While threads bring a new set of useful tools, they also bring a
-number of pitfalls. One pitfall is the race condition:
-
- use Thread;
- $a = 1;
- $thr1 = Thread->new(\&sub1);
- $thr2 = Thread->new(\&sub2);
-
- sleep 10;
- print "$a\n";
-
- sub sub1 { $foo = $a; $a = $foo + 1; }
- sub sub2 { $bar = $a; $a = $bar + 1; }
-
-What do you think $a will be? The answer, unfortunately, is "it
-depends." Both sub1() and sub2() access the global variable $a, once
-to read and once to write. Depending on factors ranging from your
-thread implementation's scheduling algorithm to the phase of the moon,
-$a can be 2 or 3.
-
-Race conditions are caused by unsynchronized access to shared
-data. Without explicit synchronization, there's no way to be sure that
-nothing has happened to the shared data between the time you access it
-and the time you update it. Even this simple code fragment has the
-possibility of error:
-
- use Thread qw(async);
- $a = 2;
- async{ $b = $a; $a = $b + 1; };
- async{ $c = $a; $a = $c + 1; };
-
-Two threads both access $a. Each thread can potentially be interrupted
-at any point, or be executed in any order. At the end, $a could be 3
-or 4, and both $b and $c could be 2 or 3.
-
-Whenever your program accesses data or resources that can be accessed
-by other threads, you must take steps to coordinate access or risk
-data corruption and race conditions.
-
-=head2 Controlling access: lock()
-
-The lock() function takes a variable (or subroutine, but we'll get to
-that later) and puts a lock on it. No other thread may lock the
-variable until the locking thread exits the innermost block containing
-the lock. Using lock() is straightforward:
-
- use Thread qw(async);
- $a = 4;
- $thr1 = async {
- $foo = 12;
- {
- lock ($a); # Block until we get access to $a
- $b = $a;
- $a = $b * $foo;
- }
- print "\$foo was $foo\n";
- };
- $thr2 = async {
- $bar = 7;
- {
- lock ($a); # Block until we can get access to $a
- $c = $a;
- $a = $c * $bar;
- }
- print "\$bar was $bar\n";
- };
- $thr1->join;
- $thr2->join;
- print "\$a is $a\n";
-
-lock() blocks the thread until the variable being locked is
-available. When lock() returns, your thread can be sure that no other
-thread can lock that variable until the innermost block containing the
-lock exits.
-
-It's important to note that locks don't prevent access to the variable
-in question, only lock attempts. This is in keeping with Perl's
-longstanding tradition of courteous programming, and the advisory file
-locking that flock() gives you. Locked subroutines behave differently,
-however. We'll cover that later in the article.
-
-You may lock arrays and hashes as well as scalars. Locking an array,
-though, will not block subsequent locks on array elements, just lock
-attempts on the array itself.
-
-Finally, locks are recursive, which means it's okay for a thread to
-lock a variable more than once. The lock will last until the outermost
-lock() on the variable goes out of scope.
-
-=head2 Thread Pitfall: Deadlocks
-
-Locks are a handy tool to synchronize access to data. Using them
-properly is the key to safe shared data. Unfortunately, locks aren't
-without their dangers. Consider the following code:
-
- use Thread qw(async yield);
- $a = 4;
- $b = "foo";
- async {
- lock($a);
- yield;
- sleep 20;
- lock ($b);
- };
- async {
- lock($b);
- yield;
- sleep 20;
- lock ($a);
- };
-
-This program will probably hang until you kill it. The only way it
-won't hang is if one of the two async() routines acquires both locks
-first. A guaranteed-to-hang version is more complicated, but the
-principle is the same.
-
-The first thread spawned by async() will grab a lock on $a then, a
-second or two later, try to grab a lock on $b. Meanwhile, the second
-thread grabs a lock on $b, then later tries to grab a lock on $a. The
-second lock attempt for both threads will block, each waiting for the
-other to release its lock.
-
-This condition is called a deadlock, and it occurs whenever two or
-more threads are trying to get locks on resources that the others
-own. Each thread will block, waiting for the other to release a lock
-on a resource. That never happens, though, since the thread with the
-resource is itself waiting for a lock to be released.
-
-There are a number of ways to handle this sort of problem. The best
-way is to always have all threads acquire locks in the exact same
-order. If, for example, you lock variables $a, $b, and $c, always lock
-$a before $b, and $b before $c. It's also best to hold on to locks for
-as short a period of time to minimize the risks of deadlock.
-
-=head2 Queues: Passing Data Around
-
-A queue is a special thread-safe object that lets you put data in one
-end and take it out the other without having to worry about
-synchronization issues. They're pretty straightforward, and look like
-this:
-
- use Thread qw(async);
- use Thread::Queue;
-
- my $DataQueue = Thread::Queue->new();
- $thr = async {
- while ($DataElement = $DataQueue->dequeue) {
- print "Popped $DataElement off the queue\n";
- }
- };
-
- $DataQueue->enqueue(12);
- $DataQueue->enqueue("A", "B", "C");
- sleep 10;
- $DataQueue->enqueue(undef);
-
-You create the queue with C<< Thread::Queue->new >>. Then you can add
-lists of scalars onto the end with enqueue(), and pop scalars off the
-front of it with dequeue(). A queue has no fixed size, and can grow as
-needed to hold everything pushed on to it.
-
-If a queue is empty, dequeue() blocks until another thread enqueues
-something. This makes queues ideal for event loops and other
-communications between threads.
-
-=head1 Threads And Code
-
-In addition to providing thread-safe access to data via locks and
-queues, threaded Perl also provides general-purpose semaphores for
-coarser synchronization than locks provide and thread-safe access to
-entire subroutines.
-
-=head2 Semaphores: Synchronizing Data Access
-
-Semaphores are a kind of generic locking mechanism. Unlike lock, which
-gets a lock on a particular scalar, Perl doesn't associate any
-particular thing with a semaphore so you can use them to control
-access to anything you like. In addition, semaphores can allow more
-than one thread to access a resource at once, though by default
-semaphores only allow one thread access at a time.
-
-=over 4
-
-=item Basic semaphores
-
-Semaphores have two methods, down and up. down decrements the resource
-count, while up increments it. down calls will block if the
-semaphore's current count would decrement below zero. This program
-gives a quick demonstration:
-
- use Thread qw(yield);
- use Thread::Semaphore;
- my $semaphore = Thread::Semaphore->new();
- $GlobalVariable = 0;
-
- $thr1 = Thread->new( \&sample_sub, 1 );
- $thr2 = Thread->new( \&sample_sub, 2 );
- $thr3 = Thread->new( \&sample_sub, 3 );
-
- sub sample_sub {
- my $SubNumber = shift @_;
- my $TryCount = 10;
- my $LocalCopy;
- sleep 1;
- while ($TryCount--) {
- $semaphore->down;
- $LocalCopy = $GlobalVariable;
- print "$TryCount tries left for sub $SubNumber (\$GlobalVariable is $GlobalVariable)\n";
- yield;
- sleep 2;
- $LocalCopy++;
- $GlobalVariable = $LocalCopy;
- $semaphore->up;
- }
- }
-
-The three invocations of the subroutine all operate in sync. The
-semaphore, though, makes sure that only one thread is accessing the
-global variable at once.
-
-=item Advanced Semaphores
-
-By default, semaphores behave like locks, letting only one thread
-down() them at a time. However, there are other uses for semaphores.
-
-Each semaphore has a counter attached to it. down() decrements the
-counter and up() increments the counter. By default, semaphores are
-created with the counter set to one, down() decrements by one, and
-up() increments by one. If down() attempts to decrement the counter
-below zero, it blocks until the counter is large enough. Note that
-while a semaphore can be created with a starting count of zero, any
-up() or down() always changes the counter by at least
-one. $semaphore->down(0) is the same as $semaphore->down(1).
-
-The question, of course, is why would you do something like this? Why
-create a semaphore with a starting count that's not one, or why
-decrement/increment it by more than one? The answer is resource
-availability. Many resources that you want to manage access for can be
-safely used by more than one thread at once.
-
-For example, let's take a GUI driven program. It has a semaphore that
-it uses to synchronize access to the display, so only one thread is
-ever drawing at once. Handy, but of course you don't want any thread
-to start drawing until things are properly set up. In this case, you
-can create a semaphore with a counter set to zero, and up it when
-things are ready for drawing.
-
-Semaphores with counters greater than one are also useful for
-establishing quotas. Say, for example, that you have a number of
-threads that can do I/O at once. You don't want all the threads
-reading or writing at once though, since that can potentially swamp
-your I/O channels, or deplete your process' quota of filehandles. You
-can use a semaphore initialized to the number of concurrent I/O
-requests (or open files) that you want at any one time, and have your
-threads quietly block and unblock themselves.
-
-Larger increments or decrements are handy in those cases where a
-thread needs to check out or return a number of resources at once.
-
-=back
-
-=head2 Attributes: Restricting Access To Subroutines
-
-In addition to synchronizing access to data or resources, you might
-find it useful to synchronize access to subroutines. You may be
-accessing a singular machine resource (perhaps a vector processor), or
-find it easier to serialize calls to a particular subroutine than to
-have a set of locks and semaphores.
-
-One of the additions to Perl 5.005 is subroutine attributes. The
-Thread package uses these to provide several flavors of
-serialization. It's important to remember that these attributes are
-used in the compilation phase of your program so you can't change a
-subroutine's behavior while your program is actually running.
-
-=head2 Subroutine Locks
-
-The basic subroutine lock looks like this:
-
- sub test_sub :locked {
- }
-
-This ensures that only one thread will be executing this subroutine at
-any one time. Once a thread calls this subroutine, any other thread
-that calls it will block until the thread in the subroutine exits
-it. A more elaborate example looks like this:
-
- use Thread qw(yield);
-
- Thread->new(\&thread_sub, 1);
- Thread->new(\&thread_sub, 2);
- Thread->new(\&thread_sub, 3);
- Thread->new(\&thread_sub, 4);
-
- sub sync_sub :locked {
- my $CallingThread = shift @_;
- print "In sync_sub for thread $CallingThread\n";
- yield;
- sleep 3;
- print "Leaving sync_sub for thread $CallingThread\n";
- }
-
- sub thread_sub {
- my $ThreadID = shift @_;
- print "Thread $ThreadID calling sync_sub\n";
- sync_sub($ThreadID);
- print "$ThreadID is done with sync_sub\n";
- }
-
-The C<locked> attribute tells perl to lock sync_sub(), and if you run
-this, you can see that only one thread is in it at any one time.
-
-=head2 Methods
-
-Locking an entire subroutine can sometimes be overkill, especially
-when dealing with Perl objects. When calling a method for an object,
-for example, you want to serialize calls to a method, so that only one
-thread will be in the subroutine for a particular object, but threads
-calling that subroutine for a different object aren't blocked. The
-method attribute indicates whether the subroutine is really a method.
-
- use Thread;
-
- sub tester {
- my $thrnum = shift @_;
- my $bar = Foo->new();
- foreach (1..10) {
- print "$thrnum calling per_object\n";
- $bar->per_object($thrnum);
- print "$thrnum out of per_object\n";
- yield;
- print "$thrnum calling one_at_a_time\n";
- $bar->one_at_a_time($thrnum);
- print "$thrnum out of one_at_a_time\n";
- yield;
- }
- }
-
- foreach my $thrnum (1..10) {
- Thread->new(\&tester, $thrnum);
- }
-
- package Foo;
- sub new {
- my $class = shift @_;
- return bless [@_], $class;
- }
-
- sub per_object :locked :method {
- my ($class, $thrnum) = @_;
- print "In per_object for thread $thrnum\n";
- yield;
- sleep 2;
- print "Exiting per_object for thread $thrnum\n";
- }
-
- sub one_at_a_time :locked {
- my ($class, $thrnum) = @_;
- print "In one_at_a_time for thread $thrnum\n";
- yield;
- sleep 2;
- print "Exiting one_at_a_time for thread $thrnum\n";
- }
-
-As you can see from the output (omitted for brevity; it's 800 lines)
-all the threads can be in per_object() simultaneously, but only one
-thread is ever in one_at_a_time() at once.
-
-=head2 Locking A Subroutine
-
-You can lock a subroutine as you would lock a variable. Subroutine locks
-work the same as specifying a C<locked> attribute for the subroutine,
-and block all access to the subroutine for other threads until the
-lock goes out of scope. When the subroutine isn't locked, any number
-of threads can be in it at once, and getting a lock on a subroutine
-doesn't affect threads already in the subroutine. Getting a lock on a
-subroutine looks like this:
-
- lock(\&sub_to_lock);
-
-Simple enough. Unlike the C<locked> attribute, which is a compile time
-option, locking and unlocking a subroutine can be done at runtime at your
-discretion. There is some runtime penalty to using lock(\&sub) instead
-of the C<locked> attribute, so make sure you're choosing the proper
-method to do the locking.
-
-You'd choose lock(\&sub) when writing modules and code to run on both
-threaded and unthreaded Perl, especially for code that will run on
-5.004 or earlier Perls. In that case, it's useful to have subroutines
-that should be serialized lock themselves if they're running threaded,
-like so:
-
- package Foo;
- use Config;
- $Running_Threaded = 0;
-
- BEGIN { $Running_Threaded = $Config{'usethreads'} }
-
- sub sub1 { lock(\&sub1) if $Running_Threaded }
-
-
-This way you can ensure single-threadedness regardless of which
-version of Perl you're running.
-
-=head1 General Thread Utility Routines
-
-We've covered the workhorse parts of Perl's threading package, and
-with these tools you should be well on your way to writing threaded
-code and packages. There are a few useful little pieces that didn't
-really fit in anyplace else.
-
-=head2 What Thread Am I In?
-
-The Thread->self method provides your program with a way to get an
-object representing the thread it's currently in. You can use this
-object in the same way as the ones returned from the thread creation.
-
-=head2 Thread IDs
-
-tid() is a thread object method that returns the thread ID of the
-thread the object represents. Thread IDs are integers, with the main
-thread in a program being 0. Currently Perl assigns a unique tid to
-every thread ever created in your program, assigning the first thread
-to be created a tid of 1, and increasing the tid by 1 for each new
-thread that's created.
-
-=head2 Are These Threads The Same?
-
-The equal() method takes two thread objects and returns true
-if the objects represent the same thread, and false if they don't.
-
-=head2 What Threads Are Running?
-
-Thread->list returns a list of thread objects, one for each thread
-that's currently running. Handy for a number of things, including
-cleaning up at the end of your program:
-
- # Loop through all the threads
- foreach $thr (Thread->list) {
- # Don't join the main thread or ourselves
- if ($thr->tid && !Thread::equal($thr, Thread->self)) {
- $thr->join;
- }
- }
-
-The example above is just for illustration. It isn't strictly
-necessary to join all the threads you create, since Perl detaches all
-the threads before it exits.
-
-=head1 A Complete Example
-
-Confused yet? It's time for an example program to show some of the
-things we've covered. This program finds prime numbers using threads.
-
- 1 #!/usr/bin/perl -w
- 2 # prime-pthread, courtesy of Tom Christiansen
- 3
- 4 use strict;
- 5
- 6 use Thread;
- 7 use Thread::Queue;
- 8
- 9 my $stream = Thread::Queue->new();
- 10 my $kid = Thread->new(\&check_num, $stream, 2);
- 11
- 12 for my $i ( 3 .. 1000 ) {
- 13 $stream->enqueue($i);
- 14 }
- 15
- 16 $stream->enqueue(undef);
- 17 $kid->join();
- 18
- 19 sub check_num {
- 20 my ($upstream, $cur_prime) = @_;
- 21 my $kid;
- 22 my $downstream = Thread::Queue->new();
- 23 while (my $num = $upstream->dequeue) {
- 24 next unless $num % $cur_prime;
- 25 if ($kid) {
- 26 $downstream->enqueue($num);
- 27 } else {
- 28 print "Found prime $num\n";
- 29 $kid = Thread->new(\&check_num, $downstream, $num);
- 30 }
- 31 }
- 32 $downstream->enqueue(undef) if $kid;
- 33 $kid->join() if $kid;
- 34 }
-
-This program uses the pipeline model to generate prime numbers. Each
-thread in the pipeline has an input queue that feeds numbers to be
-checked, a prime number that it's responsible for, and an output queue
-that it funnels numbers that have failed the check into. If the thread
-has a number that's failed its check and there's no child thread, then
-the thread must have found a new prime number. In that case, a new
-child thread is created for that prime and stuck on the end of the
-pipeline.
-
-This probably sounds a bit more confusing than it really is, so lets
-go through this program piece by piece and see what it does. (For
-those of you who might be trying to remember exactly what a prime
-number is, it's a number that's only evenly divisible by itself and 1)
-
-The bulk of the work is done by the check_num() subroutine, which
-takes a reference to its input queue and a prime number that it's
-responsible for. After pulling in the input queue and the prime that
-the subroutine's checking (line 20), we create a new queue (line 22)
-and reserve a scalar for the thread that we're likely to create later
-(line 21).
-
-The while loop from lines 23 to line 31 grabs a scalar off the input
-queue and checks against the prime this thread is responsible
-for. Line 24 checks to see if there's a remainder when we modulo the
-number to be checked against our prime. If there is one, the number
-must not be evenly divisible by our prime, so we need to either pass
-it on to the next thread if we've created one (line 26) or create a
-new thread if we haven't.
-
-The new thread creation is line 29. We pass on to it a reference to
-the queue we've created, and the prime number we've found.
-
-Finally, once the loop terminates (because we got a 0 or undef in the
-queue, which serves as a note to die), we pass on the notice to our
-child and wait for it to exit if we've created a child (Lines 32 and
-37).
-
-Meanwhile, back in the main thread, we create a queue (line 9) and the
-initial child thread (line 10), and pre-seed it with the first prime:
-2. Then we queue all the numbers from 3 to 1000 for checking (lines
-12-14), then queue a die notice (line 16) and wait for the first child
-thread to terminate (line 17). Because a child won't die until its
-child has died, we know that we're done once we return from the join.
-
-That's how it works. It's pretty simple; as with many Perl programs,
-the explanation is much longer than the program.
-
-=head1 Conclusion
-
-A complete thread tutorial could fill a book (and has, many times),
-but this should get you well on your way. The final authority on how
-Perl's threads behave is the documentation bundled with the Perl
-distribution, but with what we've covered in this article, you should
-be well on your way to becoming a threaded Perl expert.
-
-=head1 Bibliography
-
-Here's a short bibliography courtesy of J\xFCrgen Christoffel:
-
-=head2 Introductory Texts
-
-Birrell, Andrew D. An Introduction to Programming with
-Threads. Digital Equipment Corporation, 1989, DEC-SRC Research Report
-#35 online as
-http://www.research.digital.com/SRC/staff/birrell/bib.html (highly
-recommended)
-
-Robbins, Kay. A., and Steven Robbins. Practical Unix Programming: A
-Guide to Concurrency, Communication, and
-Multithreading. Prentice-Hall, 1996.
-
-Lewis, Bill, and Daniel J. Berg. Multithreaded Programming with
-Pthreads. Prentice Hall, 1997, ISBN 0-13-443698-9 (a well-written
-introduction to threads).
-
-Nelson, Greg (editor). Systems Programming with Modula-3. Prentice
-Hall, 1991, ISBN 0-13-590464-1.
-
-Nichols, Bradford, Dick Buttlar, and Jacqueline Proulx Farrell.
-Pthreads Programming. O'Reilly & Associates, 1996, ISBN 156592-115-1
-(covers POSIX threads).
-
-=head2 OS-Related References
-
-Boykin, Joseph, David Kirschen, Alan Langerman, and Susan
-LoVerso. Programming under Mach. Addison-Wesley, 1994, ISBN
-0-201-52739-1.
-
-Tanenbaum, Andrew S. Distributed Operating Systems. Prentice Hall,
-1995, ISBN 0-13-219908-4 (great textbook).
-
-Silberschatz, Abraham, and Peter B. Galvin. Operating System Concepts,
-4th ed. Addison-Wesley, 1995, ISBN 0-201-59292-4
-
-=head2 Other References
-
-Arnold, Ken and James Gosling. The Java Programming Language, 2nd
-ed. Addison-Wesley, 1998, ISBN 0-201-31006-6.
-
-Le Sergent, T. and B. Berthomieu. "Incremental MultiThreaded Garbage
-Collection on Virtually Shared Memory Architectures" in Memory
-Management: Proc. of the International Workshop IWMM 92, St. Malo,
-France, September 1992, Yves Bekkers and Jacques Cohen, eds. Springer,
-1992, ISBN 3540-55940-X (real-life thread applications).
-
-=head1 Acknowledgements
-
-Thanks (in no particular order) to Chaim Frenkel, Steve Fink, Gurusamy
-Sarathy, Ilya Zakharevich, Benjamin Sugars, J\xFCrgen Christoffel, Joshua
-Pritikin, and Alan Burlison, for their help in reality-checking and
-polishing this article. Big thanks to Tom Christiansen for his rewrite
-of the prime number generator.
-
-=head1 AUTHOR
-
-Dan Sugalski E<lt>sugalskd at ous.eduE<gt>
-
-=head1 Copyrights
-
-This article originally appeared in The Perl Journal #10, and is
-copyright 1998 The Perl Journal. It appears courtesy of Jon Orwant and
-The Perl Journal. This document may be distributed under the same terms
-as Perl itself.
-
-
Modified: vendor/perl/dist/pod/perlrepository.pod
===================================================================
--- vendor/perl/dist/pod/perlrepository.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlrepository.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,689 +1,18 @@
-=for comment
-Consistent formatting of this file is achieved with:
- perl ./Porting/podtidy pod/perlrepository.pod
+=encoding utf8
=head1 NAME
-perlrepository - Using the Perl source repository
+perlrepository - Links to current information on the Perl source repository
-=head1 SYNOPSIS
+=head1 DESCRIPTION
-All of Perl's source code is kept centrally in a Git repository at
-I<perl5.git.perl.org>. The repository contains many Perl revisions from
-Perl 1 onwards and all the revisions from Perforce, the version control
-system we were using previously. This repository is accessible in
-different ways.
+Perl's source code is stored in a Git repository.
-The full repository takes up about 80MB of disk space. A check out of
-the blead branch (that is, the main development branch, which contains
-bleadperl, the development version of perl 5) takes up about 160MB of
-disk space (including the repository). A build of bleadperl takes up
-about 200MB (including the repository and the check out).
+See L<perlhack> for an explanation of Perl development, including the
+L<Super Quick Patch Guide|perlhack/SUPER QUICK PATCH GUIDE> for making and
+submitting a small patch.
-=head1 GETTING ACCESS TO THE REPOSITORY
+See L<perlgit> for detailed information about Perl's Git repository.
-=head2 READ ACCESS VIA THE WEB
-
-You may access the repository over the web. This allows you to browse
-the tree, see recent commits, subscribe to RSS feeds for the changes,
-search for particular commits and more. You may access it at:
-
- http://perl5.git.perl.org/perl.git
-
-A mirror of the repository is found at:
-
- http://github.com/github/perl
-
-=head2 READ ACCESS VIA GIT
-
-You will need a copy of Git for your computer. You can fetch a copy of
-the repository using the Git protocol (which uses port 9418):
-
- git clone git://perl5.git.perl.org/perl.git perl-git
-
-This clones the repository and makes a local copy in the F<perl-git>
-directory.
-
-If your local network does not allow you to use port 9418, then you can
-fetch a copy of the repository over HTTP (this is slower):
-
- git clone http://perl5.git.perl.org/perl.git perl-http
-
-This clones the repository and makes a local copy in the F<perl-http>
-directory.
-
-=head2 WRITE ACCESS TO THE REPOSITORY
-
-If you are a committer, then you can fetch a copy of the repository
-that you can push back on with:
-
- git clone ssh://perl5.git.perl.org/gitroot/perl.git perl-ssh
-
-This clones the repository and makes a local copy in the F<perl-ssh>
-directory.
-
-If you cloned using the git protocol, which is faster than ssh, then
-you will need to modify your config in order to enable pushing. Edit
-F<.git/config> where you will see something like:
-
- [remote "origin"]
- url = git://perl5.git.perl.org/perl.git
-
-change that to something like this:
-
- [remote "origin"]
- url = ssh://perl5.git.perl.org/gitroot/perl.git
-
-NOTE: there are symlinks set up so that the /gitroot is optional and
-since SSH is the default protocol you can actually shorten the "url" to
-C<perl5.git.perl.org:/perl.git>.
-
-You can also set up your user name and e-mail address. For example
-
- % git config user.name "Leon Brocard"
- % git config user.email acme at astray.com
-
-It is also possible to keep C<origin> as a git remote, and add a new
-remote for ssh access:
-
- % git remote add camel perl5.git.perl.org:/perl.git
-
-This allows you to update your local repository by pulling from
-C<origin>, which is faster and doesn't require you to authenticate, and
-to push your changes back with the C<camel> remote:
-
- % git fetch camel
- % git push camel
-
-The C<fetch> command just updates the C<camel> refs, as the objects
-themselves should have been fetched when pulling from C<origin>.
-
-The committers have access to 2 servers that serve perl5.git.perl.org.
-One is camel.booking.com, which is the 'master' repository. The
-perl5.git.perl.org IP address also lives on this machine. The second
-one is dromedary.booking.com, which can be used for general testing and
-development. Dromedary syncs the git tree from camel every few minutes,
-you should not push there. Both machines also have a full CPAN mirror.
-To share files with the general public, dromedary serves your
-~/public_html/ as http://users.perl5.git.perl.org/~yourlogin/
-
-=head1 OVERVIEW OF THE REPOSITORY
-
-Once you have changed into the repository directory, you can inspect
-it.
-
-After a clone the repository will contain a single local branch, which
-will be the current branch as well, as indicated by the asterisk.
-
- % git branch
- * blead
-
-Using the -a switch to C<branch> will also show the remote tracking
-branches in the repository:
-
- % git branch -a
- * blead
- origin/HEAD
- origin/blead
- ...
-
-The branches that begin with "origin" correspond to the "git remote"
-that you cloned from (which is named "origin"). Each branch on the
-remote will be exactly tracked by theses branches. You should NEVER do
-work on these remote tracking branches. You only ever do work in a
-local branch. Local branches can be configured to automerge (on pull)
-from a designated remote tracking branch. This is the case with the
-default branch C<blead> which will be configured to merge from the
-remote tracking branch C<origin/blead>.
-
-You can see recent commits:
-
- % git log
-
-And pull new changes from the repository, and update your local
-repository (must be clean first)
-
- % git pull
-
-Assuming we are on the branch C<blead> immediately after a pull, this
-command would be more or less equivalent to:
-
- % git fetch
- % git merge origin/blead
-
-In fact if you want to update your local repository without touching
-your working directory you do:
-
- % git fetch
-
-And if you want to update your remote-tracking branches for all defined
-remotes simultaneously you can do
-
- % git remote update
-
-Neither of these last two commands will update your working directory,
-however both will update the remote-tracking branches in your
-repository.
-
-To switch to another branch:
-
- % git checkout origin/maint-5.8-dor
-
-To make a local branch of a remote branch:
-
- % git checkout -b maint-5.10 origin/maint-5.10
-
-To switch back to blead:
-
- % git checkout blead
-
-=head2 FINDING OUT YOUR STATUS
-
-The most common git command you will use will probably be
-
- % git status
-
-This command will produce as output a description of the current state
-of the repository, including modified files and unignored untracked
-files, and in addition it will show things like what files have been
-staged for the next commit, and usually some useful information about
-how to change things. For instance the following:
-
- $ git status
- # On branch blead
- # Your branch is ahead of 'origin/blead' by 1 commit.
- #
- # Changes to be committed:
- # (use "git reset HEAD <file>..." to unstage)
- #
- # modified: pod/perlrepository.pod
- #
- # Changed but not updated:
- # (use "git add <file>..." to update what will be committed)
- #
- # modified: pod/perlrepository.pod
- #
- # Untracked files:
- # (use "git add <file>..." to include in what will be committed)
- #
- # deliberate.untracked
-
-This shows that there were changes to this document staged for commit,
-and that there were further changes in the working directory not yet
-staged. It also shows that there was an untracked file in the working
-directory, and as you can see shows how to change all of this. It also
-shows that there is one commit on the working branch C<blead> which has
-not been pushed to the C<origin> remote yet. B<NOTE>: that this output
-is also what you see as a template if you do not provide a message to
-C<git commit>.
-
-Assuming we commit all the mentioned changes above:
-
- % git commit -a -m'explain git status and stuff about remotes'
- Created commit daf8e63: explain git status and stuff about remotes
- 1 files changed, 83 insertions(+), 3 deletions(-)
-
-We can re-run git status and see something like this:
-
- % git status
- # On branch blead
- # Your branch is ahead of 'origin/blead' by 2 commits.
- #
- # Untracked files:
- # (use "git add <file>..." to include in what will be committed)
- #
- # deliberate.untracked
- nothing added to commit but untracked files present (use "git add" to track)
-
-
-When in doubt, before you do anything else, check your status and read
-it carefully, many questions are answered directly by the git status
-output.
-
-=head1 SUBMITTING A PATCH
-
-If you have a patch in mind for Perl, you should first get a copy of
-the repository:
-
- % git clone git://perl5.git.perl.org/perl.git perl-git
-
-Then change into the directory:
-
- % cd perl-git
-
-Alternatively, if you already have a Perl repository, you should ensure
-that you're on the I<blead> branch, and your repository is up to date:
-
- % git checkout blead
- % git pull
-
-It's preferable to patch against the latest blead version, since this
-is where new development occurs for all changes other than critical bug
-fixes. Critical bug fix patches should be made against the relevant
-maint branches, or should be submitted with a note indicating all the
-branches where the fix should be applied.
-
-Now that we have everything up to date, we need to create a temporary
-new branch for these changes and switch into it:
-
- % git checkout -b orange
-
-which is the short form of
-
- % git branch orange
- % git checkout orange
-
-Then make your changes. For example, if Leon Brocard changes his name
-to Orange Brocard, we should change his name in the AUTHORS file:
-
- % perl -pi -e 's{Leon Brocard}{Orange Brocard}' AUTHORS
-
-You can see what files are changed:
-
- % git status
- # On branch orange
- # Changes to be committed:
- # (use "git reset HEAD <file>..." to unstage)
- #
- # modified: AUTHORS
- #
-
-And you can see the changes:
-
- % git diff
- diff --git a/AUTHORS b/AUTHORS
- index 293dd70..722c93e 100644
- --- a/AUTHORS
- +++ b/AUTHORS
- @@ -541,7 +541,7 @@ Lars Hecking <lhecking at nmrc.ucc.ie>
- Laszlo Molnar <laszlo.molnar at eth.ericsson.se>
- Leif Huhn <leif at hale.dkstat.com>
- Len Johnson <lenjay at ibm.net>
- -Leon Brocard <acme at astray.com>
- +Orange Brocard <acme at astray.com>
- Les Peters <lpeters at aol.net>
- Lesley Binks <lesley.binks at gmail.com>
- Lincoln D. Stein <lstein at cshl.org>
-
-Now commit your change locally:
-
- % git commit -a -m 'Rename Leon Brocard to Orange Brocard'
- Created commit 6196c1d: Rename Leon Brocard to Orange Brocard
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-You can examine your last commit with:
-
- % git show HEAD
-
-and if you are not happy with either the description or the patch
-itself you can fix it up by editing the files once more and then issue:
-
- % git commit -a --amend
-
-Now you should create a patch file for all your local changes:
-
- % git format-patch origin
- 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch
-
-You should now send an email to perl5-porters at perl.org with a
-description of your changes, and include this patch file as an
-attachment.
-
-If you want to delete your temporary branch, you may do so with:
-
- % git checkout blead
- % git branch -d orange
- error: The branch 'orange' is not an ancestor of your current HEAD.
- If you are sure you want to delete it, run 'git branch -D orange'.
- % git branch -D orange
- Deleted branch orange.
-
-=head2 A note on derived files
-
-Be aware that many files in the distribution are derivative--avoid
-patching them, because git won't see the changes to them, and the build
-process will overwrite them. Patch the originals instead. Most
-utilities (like perldoc) are in this category, i.e. patch
-utils/perldoc.PL rather than utils/perldoc. Similarly, don't create
-patches for files under $src_root/ext from their copies found in
-$install_root/lib. If you are unsure about the proper location of a
-file that may have gotten copied while building the source
-distribution, consult the C<MANIFEST>.
-
-=head2 A note on binary files
-
-Since the patch(1) utility cannot deal with binary files, it's
-important that you either avoid the use of binary files in your patch,
-generate the files dynamically, or that you encode any binary files
-using the F<uupacktool.pl> utility.
-
-Assuming you needed to include a gzip-encoded file for a module's test
-suite, you might do this as follows using the F<uupacktool.pl> utility:
-
- $ perl uupacktool.pl -v -p -D lib/Some/Module/t/src/t.gz
- Writing lib/Some/Module/t/src/t.gz into lib/Some/Module/t/src/t.gz.packed
-
-This will replace the C<t.gz> file with an encoded counterpart. During
-C<make test>, before any tests are run, perl's Makefile will restore
-all the C<.packed> files mentioned in the MANIFEST to their original
-name. This means that the test suite does not need to be aware of this
-packing scheme and will not need to be altered.
-
-=head2 Getting your patch accepted
-
-The first thing you should include with your patch is a description of
-the problem that the patch corrects. If it is a code patch (rather
-than a documentation patch) you should also include a small test case
-that illustrates the bug (a patch to an existing test file is
-preferred).
-
-If you are submitting a code patch there are several other things that
-you need to do.
-
-=over 4
-
-=item Comments, Comments, Comments
-
-Be sure to adequately comment your code. While commenting every line
-is unnecessary, anything that takes advantage of side effects of
-operators, that creates changes that will be felt outside of the
-function being patched, or that others may find confusing should be
-documented. If you are going to err, it is better to err on the side
-of adding too many comments than too few.
-
-=item Style
-
-In general, please follow the particular style of the code you are
-patching.
-
-In particular, follow these general guidelines for patching Perl
-sources:
-
- 8-wide tabs (no exceptions!)
- 4-wide indents for code, 2-wide indents for nested CPP #defines
- try hard not to exceed 79-columns
- ANSI C prototypes
- uncuddled elses and "K&R" style for indenting control constructs
- no C++ style (//) comments
- mark places that need to be revisited with XXX (and revisit often!)
- opening brace lines up with "if" when conditional spans multiple
- lines; should be at end-of-line otherwise
- in function definitions, name starts in column 0 (return value is on
- previous line)
- single space after keywords that are followed by parens, no space
- between function name and following paren
- avoid assignments in conditionals, but if they're unavoidable, use
- extra paren, e.g. "if (a && (b = c)) ..."
- "return foo;" rather than "return(foo);"
- "if (!foo) ..." rather than "if (foo == FALSE) ..." etc.
-
-=item Testsuite
-
-When submitting a patch you should make every effort to also include an
-addition to perl's regression tests to properly exercise your patch.
-Your testsuite additions should generally follow these guidelines
-(courtesy of Gurusamy Sarathy <gsar at activestate.com>):
-
- Know what you're testing. Read the docs, and the source.
- Tend to fail, not succeed.
- Interpret results strictly.
- Use unrelated features (this will flush out bizarre interactions).
- Use non-standard idioms (otherwise you are not testing TIMTOWTDI).
- Avoid using hardcoded test numbers whenever possible (the
- EXPECTED/GOT found in t/op/tie.t is much more maintainable,
- and gives better failure reports).
- Give meaningful error messages when a test fails.
- Avoid using qx// and system() unless you are testing for them. If you
- do use them, make sure that you cover _all_ perl platforms.
- Unlink any temporary files you create.
- Promote unforeseen warnings to errors with $SIG{__WARN__}.
- Be sure to use the libraries and modules shipped with the version
- being tested, not those that were already installed.
- Add comments to the code explaining what you are testing for.
- Make updating the '1..42' string unnecessary. Or make sure that
- you update it.
- Test _all_ behaviors of a given operator, library, or function:
- - All optional arguments
- - Return values in various contexts (boolean, scalar, list, lvalue)
- - Use both global and lexical variables
- - Don't forget the exceptional, pathological cases.
-
-=back
-
-=head1 ACCEPTING A PATCH
-
-If you have received a patch file generated using the above section,
-you should try out the patch.
-
-First we need to create a temporary new branch for these changes and
-switch into it:
-
- % git checkout -b experimental
-
-Patches that were formatted by C<git format-patch> are applied with
-C<git am>:
-
- % git am 0001-Rename-Leon-Brocard-to-Orange-Brocard.patch
- Applying Rename Leon Brocard to Orange Brocard
-
-If just a raw diff is provided, it is also possible use this two-step
-process:
-
- % git apply bugfix.diff
- % git commit -a -m "Some fixing" --author="That Guy <that.guy at internets.com>"
-
-Now we can inspect the change:
-
- % git show HEAD
- commit b1b3dab48344cff6de4087efca3dbd63548ab5e2
- Author: Leon Brocard <acme at astray.com>
- Date: Fri Dec 19 17:02:59 2008 +0000
-
- Rename Leon Brocard to Orange Brocard
-
- diff --git a/AUTHORS b/AUTHORS
- index 293dd70..722c93e 100644
- --- a/AUTHORS
- +++ b/AUTHORS
- @@ -541,7 +541,7 @@ Lars Hecking <lhecking at nmrc.ucc.ie>
- Laszlo Molnar <laszlo.molnar at eth.ericsson.se>
- Leif Huhn <leif at hale.dkstat.com>
- Len Johnson <lenjay at ibm.net>
- -Leon Brocard <acme at astray.com>
- +Orange Brocard <acme at astray.com>
- Les Peters <lpeters at aol.net>
- Lesley Binks <lesley.binks at gmail.com>
- Lincoln D. Stein <lstein at cshl.org>
-
-If you are a committer to Perl and you think the patch is good, you can
-then merge it into blead then push it out to the main repository:
-
- % git checkout blead
- % git merge experimental
- % git push
-
-If you want to delete your temporary branch, you may do so with:
-
- % git checkout blead
- % git branch -d experimental
- error: The branch 'experimental' is not an ancestor of your current HEAD.
- If you are sure you want to delete it, run 'git branch -D experimental'.
- % git branch -D experimental
- Deleted branch experimental.
-
-=head1 CLEANING A WORKING DIRECTORY
-
-The command C<git clean> can with varying arguments be used as a
-replacement for C<make clean>.
-
-To reset your working directory to a pristine condition you can do:
-
- git clean -dxf
-
-However, be aware this will delete ALL untracked content. You can use
-
- git clean -Xf
-
-to remove all ignored untracked files, such as build and test
-byproduct, but leave any manually created files alone.
-
-If you only want to cancel some uncommitted edits, you can use C<git
-checkout> and give it a list of files to be reverted, or C<git checkout
--f> to revert them all.
-
-If you want to cancel one or several commits, you can use C<git reset>.
-
-=head1 BISECTING
-
-C<git> provides a built-in way to determine, with a binary search in
-the history, which commit should be blamed for introducing a given bug.
-
-Suppose that we have a script F<~/testcase.pl> that exits with C<0>
-when some behaviour is correct, and with C<1> when it's faulty. We need
-an helper script that automates building C<perl> and running the
-testcase:
-
- % cat ~/run
- #!/bin/sh
- git clean -dxf
- # If you can use ccache, add -Dcc=ccache\ gcc -Dld=gcc to the Configure line
- sh Configure -des -Dusedevel -Doptimize="-g"
- test -f config.sh || exit 125
- # Correct makefile for newer GNU gcc
- perl -ni -we 'print unless /<(?:built-in|command)/' makefile x2p/makefile
- # if you just need miniperl, replace test_prep with miniperl
- make -j4 test_prep
- -x ./perl || exit 125
- ./perl -Ilib ~/testcase.pl
- ret=$?
- git clean -dxf
- exit $ret
-
-This script may return C<125> to indicate that the corresponding commit
-should be skipped. Otherwise, it returns the status of
-F<~/testcase.pl>.
-
-We first enter in bisect mode with:
-
- % git bisect start
-
-For example, if the bug is present on C<HEAD> but wasn't in 5.10.0,
-C<git> will learn about this when you enter:
-
- % git bisect bad
- % git bisect good perl-5.10.0
- Bisecting: 853 revisions left to test after this
-
-This results in checking out the median commit between C<HEAD> and
-C<perl-5.10.0>. We can then run the bisecting process with:
-
- % git bisect run ~/run
-
-When the first bad commit is isolated, C<git bisect> will tell you so:
-
- ca4cfd28534303b82a216cfe83a1c80cbc3b9dc5 is first bad commit
- commit ca4cfd28534303b82a216cfe83a1c80cbc3b9dc5
- Author: Dave Mitchell <davem at fdisolutions.com>
- Date: Sat Feb 9 14:56:23 2008 +0000
-
- [perl #49472] Attributes + Unknown Error
- ...
-
- bisect run success
-
-You can peek into the bisecting process with C<git bisect log> and
-C<git bisect visualize>. C<git bisect reset> will get you out of bisect
-mode.
-
-Please note that the first C<good> state must be an ancestor of the
-first C<bad> state. If you want to search for the commit that I<solved>
-some bug, you have to negate your test case (i.e. exit with C<1> if OK
-and C<0> if not) and still mark the lower bound as C<good> and the
-upper as C<bad>. The "first bad commit" has then to be understood as
-the "first commit where the bug is solved".
-
-C<git help bisect> has much more information on how you can tweak your
-binary searches.
-
-=head1 SUBMITTING A PATCH VIA GITHUB
-
-GitHub is a website that makes it easy to fork and publish projects
-with Git. First you should set up a GitHub account and log in.
-
-Perl's git repository is mirrored on GitHub at this page:
-
- http://github.com/github/perl/tree/blead
-
-Visit the page and click the "fork" button. This clones the Perl git
-repository for you and provides you with "Your Clone URL" from which
-you should clone:
-
- % git clone git at github.com:USERNAME/perl.git perl-github
-
-We shall make the same patch as above, creating a new branch:
-
- % cd perl-github
- % git remote add upstream git://github.com/github/perl.git
- % git pull upstream blead
- % git checkout -b orange
- % perl -pi -e 's{Leon Brocard}{Orange Brocard}' AUTHORS
- % git commit -a -m 'Rename Leon Brocard to Orange Brocard'
- % git push origin orange
-
-The orange branch has been pushed to GitHub, so you should now send an
-email to perl5-porters at perl.org with a description of your changes and
-the following information:
-
- http://github.com/USERNAME/perl/tree/orange
- git at github.com:USERNAME/perl.git branch orange
-
-=head1 MERGING FROM A BRANCH VIA GITHUB
-
-If someone has provided a branch via GitHub and you are a committer,
-you should use the following in your perl-ssh directory:
-
- % git remote add dandv git://github.com/dandv/perl.git
- % git fetch
-
-Now you can see the differences between the branch and blead:
-
- % git diff dandv/blead
-
-And you can see the commits:
-
- % git log dandv/blead
-
-If you approve of a specific commit, you can cherry pick it:
-
- % git cherry-pick 3adac458cb1c1d41af47fc66e67b49c8dec2323f
-
-Or you could just merge the whole branch if you like it all:
-
- % git merge dandv/blead
-
-And then push back to the repository:
-
- % git push
-
-=head1 COMMITTING TO MAINTENANCE VERSIONS
-
-Maintenance versions should only be altered to add critical bug fixes.
-
-To commit to a maintenance version of perl, you need to create a local
-tracking branch:
-
- % git checkout --track -b maint-5.005 origin/maint-5.005
-
-This creates a local branch named C<maint-5.005>, which tracks the
-remote branch C<origin/maint-5.005>. Then you can pull, commit, merge
-and push as before.
-
-You can also cherry-pick commits from blead and another branch, by
-using the C<git cherry-pick> command. It is recommended to use the
-B<-x> option to C<git cherry-pick> in order to record the SHA1 of the
-original commit in the new commit message.
-
-=head1 SEE ALSO
-
-The git documentation, accessible via C<git help command>.
-
+(The above documents supersede the information that was formerly here in
+perlrepository.)
Deleted: vendor/perl/dist/pod/perltoc.pod
===================================================================
--- vendor/perl/dist/pod/perltoc.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perltoc.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,33219 +0,0 @@
-
-# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
-# This file is autogenerated by buildtoc from all the other pods.
-# Edit those files and run buildtoc --build-toc to effect changes.
-
-=head1 NAME
-
-perltoc - perl documentation table of contents
-
-=head1 DESCRIPTION
-
-This page provides a brief table of contents for the rest of the Perl
-documentation set. It is meant to be scanned quickly or grepped
-through to locate the proper section you're looking for.
-
-=head1 BASIC DOCUMENTATION
-
-=head2 perl - Practical Extraction and Report Language
-
-=over 4
-
-=item SYNOPSIS
-
-=over 4
-
-=item Overview
-
-=item Tutorials
-
-=item Reference Manual
-
-=item Internals and C Language Interface
-
-=item Miscellaneous
-
-=item Language-Specific
-
-=item Platform-Specific
-
-=back
-
-=item DESCRIPTION
-
-=item AVAILABILITY
-
-=item ENVIRONMENT
-
-=item AUTHOR
-
-=item FILES
-
-=item SEE ALSO
-
-=item DIAGNOSTICS
-
-=item BUGS
-
-=item NOTES
-
-=back
-
-=head2 perlintro -- a brief introduction and overview of Perl
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item What is Perl?
-
-=item Running Perl programs
-
-=item Safety net
-
-=item Basic syntax overview
-
-=item Perl variable types
-
-Scalars, Arrays, Hashes
-
-=item Variable scoping
-
-=item Conditional and looping constructs
-
-if, while, for, foreach
-
-=item Builtin operators and functions
-
-Arithmetic, Numeric comparison, String comparison, Boolean logic,
-Miscellaneous
-
-=item Files and I/O
-
-=item Regular expressions
-
-Simple matching, Simple substitution, More complex regular expressions,
-Parentheses for capturing, Other regexp features
-
-=item Writing subroutines
-
-=item OO Perl
-
-=item Using Perl modules
-
-=back
-
-=item AUTHOR
-
-=back
-
-=head2 perlreftut - Mark's very short tutorial about references
-
-=over 4
-
-=item DESCRIPTION
-
-=item Who Needs Complicated Data Structures?
-
-=item The Solution
-
-=item Syntax
-
-=over 4
-
-=item Making References
-
-=item Using References
-
-=item An Example
-
-=item Arrow Rule
-
-=back
-
-=item Solution
-
-=item The Rest
-
-=item Summary
-
-=item Credits
-
-=over 4
-
-=item Distribution Conditions
-
-=back
-
-=back
-
-=head2 perldsc - Perl Data Structures Cookbook
-
-=over 4
-
-=item DESCRIPTION
-
-arrays of arrays, hashes of arrays, arrays of hashes, hashes of hashes,
-more elaborate constructs
-
-=item REFERENCES
-X<reference> X<dereference> X<dereferencing> X<pointer>
-
-=item COMMON MISTAKES
-
-=item CAVEAT ON PRECEDENCE
-X<dereference, precedence> X<dereferencing, precedence>
-
-=item WHY YOU SHOULD ALWAYS C<use strict>
-
-=item DEBUGGING
-X<data structure, debugging> X<complex data structure, debugging>
-X<AoA, debugging> X<HoA, debugging> X<AoH, debugging> X<HoH, debugging>
-X<array of arrays, debugging> X<hash of arrays, debugging>
-X<array of hashes, debugging> X<hash of hashes, debugging>
-
-=item CODE EXAMPLES
-
-=item ARRAYS OF ARRAYS
-X<array of arrays> X<AoA>
-
-=over 4
-
-=item Declaration of an ARRAY OF ARRAYS
-
-=item Generation of an ARRAY OF ARRAYS
-
-=item Access and Printing of an ARRAY OF ARRAYS
-
-=back
-
-=item HASHES OF ARRAYS
-X<hash of arrays> X<HoA>
-
-=over 4
-
-=item Declaration of a HASH OF ARRAYS
-
-=item Generation of a HASH OF ARRAYS
-
-=item Access and Printing of a HASH OF ARRAYS
-
-=back
-
-=item ARRAYS OF HASHES
-X<array of hashes> X<AoH>
-
-=over 4
-
-=item Declaration of an ARRAY OF HASHES
-
-=item Generation of an ARRAY OF HASHES
-
-=item Access and Printing of an ARRAY OF HASHES
-
-=back
-
-=item HASHES OF HASHES
-X<hass of hashes> X<HoH>
-
-=over 4
-
-=item Declaration of a HASH OF HASHES
-
-=item Generation of a HASH OF HASHES
-
-=item Access and Printing of a HASH OF HASHES
-
-=back
-
-=item MORE ELABORATE RECORDS
-X<record> X<structure> X<struct>
-
-=over 4
-
-=item Declaration of MORE ELABORATE RECORDS
-
-=item Declaration of a HASH OF COMPLEX RECORDS
-
-=item Generation of a HASH OF COMPLEX RECORDS
-
-=back
-
-=item Database Ties
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 perllol - Manipulating Arrays of Arrays in Perl
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Declaration and Access of Arrays of Arrays
-
-=item Growing Your Own
-
-=item Access and Printing
-
-=item Slices
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 perlrequick - Perl regular expressions quick start
-
-=over 4
-
-=item DESCRIPTION
-
-=item The Guide
-
-=over 4
-
-=item Simple word matching
-
-=item Using character classes
-
-=item Matching this or that
-
-=item Grouping things and hierarchical matching
-
-=item Extracting matches
-
-=item Matching repetitions
-
-=item More matching
-
-=item Search and replace
-
-=item The split operator
-
-=back
-
-=item BUGS
-
-=item SEE ALSO
-
-=item AUTHOR AND COPYRIGHT
-
-=over 4
-
-=item Acknowledgments
-
-=back
-
-=back
-
-=head2 perlretut - Perl regular expressions tutorial
-
-=over 4
-
-=item DESCRIPTION
-
-=item Part 1: The basics
-
-=over 4
-
-=item Simple word matching
-
-=item Using character classes
-
-=item Matching this or that
-
-=item Grouping things and hierarchical matching
-
-=item Extracting matches
-
-=item Backreferences
-
-=item Relative backreferences
-
-=item Named backreferences
-
-=item Alternative capture group numbering
-
-=item Position information
-
-=item Non-capturing groupings
-
-=item Matching repetitions
-
-=item Possessive quantifiers
-
-=item Building a regexp
-
-=item Using regular expressions in Perl
-
-=back
-
-=item Part 2: Power tools
-
-=over 4
-
-=item More on characters, strings, and character classes
-
-=item Compiling and saving regular expressions
-
-=item Composing regular expressions at runtime
-
-=item Embedding comments and modifiers in a regular expression
-
-=item Looking ahead and looking behind
-
-=item Using independent subexpressions to prevent backtracking
-
-=item Conditional expressions
-
-=item Defining named patterns
-
-=item Recursive patterns
-
-=item A bit of magic: executing Perl code in a regular expression
-
-=item Backtracking control verbs
-
-=item Pragmas and debugging
-
-=back
-
-=item BUGS
-
-=item SEE ALSO
-
-=item AUTHOR AND COPYRIGHT
-
-=over 4
-
-=item Acknowledgments
-
-=back
-
-=back
-
-=head2 perlboot - Beginner's Object-Oriented Tutorial
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item If we could talk to the animals...
-
-=item Introducing the method invocation arrow
-
-=item Invoking a barnyard
-
-=item The extra parameter of method invocation
-
-=item Calling a second method to simplify things
-
-=item Inheriting the windpipes
-
-=item A few notes about @ISA
-
-=item Overriding the methods
-
-=item Starting the search from a different place
-
-=item The SUPER way of doing things
-
-=item Where we're at so far...
-
-=item A horse is a horse, of course of course -- or is it?
-
-=item Invoking an instance method
-
-=item Accessing the instance data
-
-=item How to build a horse
-
-=item Inheriting the constructor
-
-=item Making a method work with either classes or instances
-
-=item Adding parameters to a method
-
-=item More interesting instances
-
-=item A horse of a different color
-
-=item Summary
-
-=back
-
-=item SEE ALSO
-
-=item COPYRIGHT
-
-=back
-
-=head2 perltoot - Tom's object-oriented tutorial for perl
-
-=over 4
-
-=item DESCRIPTION
-
-=item Creating a Class
-
-=over 4
-
-=item Object Representation
-
-=item Class Interface
-
-=item Constructors and Instance Methods
-
-=item Planning for the Future: Better Constructors
-
-=item Destructors
-
-=item Other Object Methods
-
-=back
-
-=item Class Data
-
-=over 4
-
-=item Accessing Class Data
-
-=item Debugging Methods
-
-=item Class Destructors
-
-=item Documenting the Interface
-
-=back
-
-=item Aggregation
-
-=item Inheritance
-
-=over 4
-
-=item Overridden Methods
-
-=item Multiple Inheritance
-
-=item UNIVERSAL: The Root of All Objects
-
-=item Deeper UNIVERSAL details
-
-=back
-
-=item Alternate Object Representations
-
-=over 4
-
-=item Arrays as Objects
-
-=item Closures as Objects
-
-=back
-
-=item AUTOLOAD: Proxy Methods
-
-=over 4
-
-=item Autoloaded Data Methods
-
-=item Inherited Autoloaded Data Methods
-
-=back
-
-=item Metaclassical Tools
-
-=over 4
-
-=item Class::Struct
-
-=item Data Members as Variables
-
-=back
-
-=item NOTES
-
-=over 4
-
-=item Object Terminology
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR AND COPYRIGHT
-
-=item COPYRIGHT
-
-=over 4
-
-=item Acknowledgments
-
-=back
-
-=back
-
-=head2 perltooc - Tom's OO Tutorial for Class Data in Perl
-
-=over 4
-
-=item DESCRIPTION
-
-=item Class Data in a Can
-
-=item Class Data as Package Variables
-
-=over 4
-
-=item Putting All Your Eggs in One Basket
-
-=item Inheritance Concerns
-
-=item The Eponymous Meta-Object
-
-=item Indirect References to Class Data
-
-=item Monadic Classes
-
-=item Translucent Attributes
-
-=back
-
-=item Class Data as Lexical Variables
-
-=over 4
-
-=item Privacy and Responsibility
-
-=item File-Scoped Lexicals
-
-=item More Inheritance Concerns
-
-=item Locking the Door and Throwing Away the Key
-
-=item Translucency Revisited
-
-=back
-
-=item NOTES
-
-=item SEE ALSO
-
-=item AUTHOR AND COPYRIGHT
-
-=item ACKNOWLEDGEMENTS
-
-=item HISTORY
-
-=back
-
-=head2 perlbot - Bag'o Object Tricks (the BOT)
-
-=over 4
-
-=item DESCRIPTION
-
-=item OO SCALING TIPS
-
-=item INSTANCE VARIABLES
-
-=item SCALAR INSTANCE VARIABLES
-
-=item INSTANCE VARIABLE INHERITANCE
-
-=item OBJECT RELATIONSHIPS
-
-=item OVERRIDING SUPERCLASS METHODS
-
-=item USING RELATIONSHIP WITH SDBM
-
-=item THINKING OF CODE REUSE
-
-=item CLASS CONTEXT AND THE OBJECT
-
-=item INHERITING A CONSTRUCTOR
-
-=item DELEGATION
-
-=item SEE ALSO
-
-=back
-
-=head2 perlstyle - Perl style guide
-
-=over 4
-
-=item DESCRIPTION
-
-=back
-
-=head2 perlcheat - Perl 5 Cheat Sheet
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item The sheet
-
-=back
-
-=item ACKNOWLEDGEMENTS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 perltrap - Perl traps for the unwary
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Awk Traps
-
-=item C/C++ Traps
-
-=item Sed Traps
-
-=item Shell Traps
-
-=item Perl Traps
-
-=item Perl4 to Perl5 Traps
-
-Discontinuance, Deprecation, and BugFix traps, Parsing Traps, Numerical
-Traps, General data type traps, Context Traps - scalar, list contexts,
-Precedence Traps, General Regular Expression Traps using s///, etc,
-Subroutine, Signal, Sorting Traps, OS Traps, DBM Traps, Unclassified Traps
-
-=item Discontinuance, Deprecation, and BugFix traps
-
-Symbols starting with "_" no longer forced into main, Double-colon valid
-package separator in variable name, 2nd and 3rd args to C<splice()> are now
-in scalar context, Can't do C<goto> into a block that is optimized away,
-Can't use whitespace as variable name or quote delimiter, C<while/if BLOCK
-BLOCK> gone, C<**> binds tighter than unary minus, C<foreach> changed when
-iterating over a list, C<split> with no args behavior changed, B<-e>
-behavior fixed, C<push> returns number of elements in resulting list, Some
-error messages differ, C<split()> honors subroutine args, Bugs removed
-
-=item Parsing Traps
-
-Space between . and = triggers syntax error, Better parsing in perl 5,
-Function parsing, String interpolation of C<$#array> differs, Perl guesses
-on C<map>, C<grep> followed by C<{> if it starts BLOCK or hash ref
-
-=item Numerical Traps
-
-Formatted output and significant digits, Auto-increment operator over
-signed int limit deleted, Assignment of return values from numeric equality
-tests doesn't work, Bitwise string ops
-
-=item General data type traps
-
-Negative array subscripts now count from the end of array, Setting
-C<$#array> lower now discards array elements, Hashes get defined before
-use, Glob assignment from localized variable to variable, Assigning
-C<undef> to glob, Changes in unary negation (of strings), Modifying of
-constants prohibited, C<defined $var> behavior changed, Variable Suicide
-
-=item Context Traps - scalar, list contexts
-
-Elements of argument lists for formats evaluated in list context,
-C<caller()> returns false value in scalar context if no caller present,
-Comma operator in scalar context gives scalar context to args, C<sprintf()>
-prototyped as C<($;@)>
-
-=item Precedence Traps
-
-LHS vs. RHS of any assignment operator, Semantic errors introduced due to
-precedence, Precedence of assignment operators same as the precedence of
-assignment, C<open> requires parentheses around filehandle, C<$:>
-precedence over C<$::> gone, Precedence of file test operators documented,
-C<keys>, C<each>, C<values> are regular named unary operators
-
-=item General Regular Expression Traps using s///, etc.
-
-C<s'$lhs'$rhs'> interpolates on either side, C<m//g> attaches its state to
-the searched string, C<m//o> used within an anonymous sub, C<$+> isn't set
-to whole match, Substitution now returns null string if it fails,
-C<s`lhs`rhs`> is now a normal substitution, Stricter parsing of variables
-in regular expressions, C<m?x?> matches only once, Failed matches don't
-reset the match variables
-
-=item Subroutine, Signal, Sorting Traps
-
-Barewords that used to look like strings look like subroutine calls,
-Reverse is no longer allowed as the name of a sort subroutine, C<warn()>
-won't let you specify a filehandle
-
-=item OS Traps
-
-SysV resets signal handler correctly, SysV C<seek()> appends correctly
-
-=item Interpolation Traps
-
-C<@> always interpolates an array in double-quotish strings, Double-quoted
-strings may no longer end with an unescaped $, Arbitrary expressions are
-evaluated inside braces within double quotes, C<$$x> now tries to
-dereference $x, Creation of hashes on the fly with C<eval "EXPR"> requires
-protection, Bugs in earlier perl versions, Array and hash brackets during
-interpolation, Interpolation of C<\$$foo{bar}>, C<qq()> string passed to
-C<eval> will not find string terminator
-
-=item DBM Traps
-
-Perl5 must have been linked with same dbm/ndbm as the default for
-C<dbmopen()>, DBM exceeding limit on the key/value size will cause perl5 to
-exit immediately
-
-=item Unclassified Traps
-
-C<require>/C<do> trap using returned value, C<split> on empty string with
-LIMIT specified
-
-=back
-
-=back
-
-=head2 perldebtut - Perl debugging tutorial
-
-=over 4
-
-=item DESCRIPTION
-
-=item use strict
-
-=item Looking at data and -w and v
-
-=item help
-
-=item Stepping through code
-
-=item Placeholder for a, w, t, T
-
-=item REGULAR EXPRESSIONS
-
-=item OUTPUT TIPS
-
-=item CGI
-
-=item GUIs
-
-=item SUMMARY
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item CONTRIBUTORS
-
-=back
-
-=head2 perlfaq - frequently asked questions about Perl
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Where to get the perlfaq
-
-=item How to contribute to the perlfaq
-
-=item What will happen if you mail your Perl programming problems to the
-authors?
-
-=back
-
-=item CREDITS
-
-=item AUTHOR AND COPYRIGHT
-
-=item Table of Contents
-
-perlfaq - this document, perlfaq1 - General Questions About Perl, perlfaq2
-- Obtaining and Learning about Perl, perlfaq3 - Programming Tools, perlfaq4
-- Data Manipulation, perlfaq5 - Files and Formats, perlfaq6 - Regular
-Expressions, perlfaq7 - General Perl Language Issues, perlfaq8 - System
-Interaction, perlfaq9 - Networking
-
-=item The Questions
-
-=over 4
-
-=item L<perlfaq1>: General Questions About Perl
-
-=item L<perlfaq2>: Obtaining and Learning about Perl
-
-=item L<perlfaq3>: Programming Tools
-
-=item L<perlfaq4>: Data Manipulation
-
-=item L<perlfaq5>: Files and Formats
-
-=item L<perlfaq6>: Regular Expressions
-
-=item L<perlfaq7>: General Perl Language Issues
-
-=item L<perlfaq8>: System Interaction
-
-=item L<perlfaq9>: Networking
-
-=back
-
-=back
-
-=head2 perlfaq1 - General Questions About Perl
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item What is Perl?
-
-=item Who supports Perl? Who develops it? Why is it free?
-
-=item Which version of Perl should I use?
-
-=item What are Perl 4, Perl 5, or Perl 6?
-
-=item What was Ponie?
-
-=item What is Perl 6?
-
-=item How stable is Perl?
-
-=item Is Perl difficult to learn?
-
-=item How does Perl compare with other languages like Java, Python, REXX,
-Scheme, or Tcl?
-
-=item Can I do [task] in Perl?
-
-=item When shouldn't I program in Perl?
-
-=item What's the difference between "perl" and "Perl"?
-
-=item Is it a Perl program or a Perl script?
-
-=item What is a JAPH?
-
-=item Where can I get a list of Larry Wall witticisms?
-
-=item How can I convince others to use Perl?
-
-http://perltraining.com.au/whyperl.html,
-http://www.perl.org/advocacy/whyperl.html
-
-=back
-
-=item REVISION
-
-=item AUTHOR AND COPYRIGHT
-
-=back
-
-=head2 perlfaq2 - Obtaining and Learning about Perl
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item What machines support perl? Where do I get it?
-
-=item How can I get a binary version of perl?
-
-=item I don't have a C compiler. How can I build my own Perl interpreter?
-
-=item I copied the perl binary from one machine to another, but scripts
-don't work.
-
-=item I grabbed the sources and tried to compile but gdbm/dynamic
-loading/malloc/linking/... failed. How do I make it work?
-
-=item What modules and extensions are available for Perl? What is CPAN?
-What does CPAN/src/... mean?
-
-=item Is there an ISO or ANSI certified version of Perl?
-
-=item Where can I get information on Perl?
-
-=item What are the Perl newsgroups on Usenet? Where do I post questions?
-
-=item Where should I post source code?
-
-=item Perl Books
-
-References, Tutorials, Task-Oriented, Special Topics
-
-=item Which magazines have Perl content?
-
-=item What mailing lists are there for Perl?
-
-=item Where are the archives for comp.lang.perl.misc?
-
-=item Where can I buy a commercial version of perl?
-
-=item Where do I send bug reports?
-
-=item What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org?
-
-=back
-
-=item REVISION
-
-=item AUTHOR AND COPYRIGHT
-
-=back
-
-=head2 perlfaq3 - Programming Tools
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item How do I do (anything)?
-
-=item How can I use Perl interactively?
-
-=item Is there a Perl shell?
-
-=item How do I find which modules are installed on my system?
-
-=item How do I debug my Perl programs?
-
-=item How do I profile my Perl programs?
-
-=item How do I cross-reference my Perl programs?
-
-=item Is there a pretty-printer (formatter) for Perl?
-
-=item Is there a ctags for Perl?
-
-=item Is there an IDE or Windows Perl Editor?
-
-Eclipse, Enginsite, Komodo, Open Perl IDE, OptiPerl, PerlBuilder,
-visiPerl+, Visual Perl, Zeus, GNU Emacs, MicroEMACS, XEmacs, Jed, Elvis,
-Vile, Vim, Codewright, MultiEdit, SlickEdit, Bash, Ksh, Tcsh, Zsh, Affrus,
-Alpha, BBEdit and BBEdit Lite
-
-=item Where can I get Perl macros for vi?
-
-=item Where can I get perl-mode for emacs?
-
-=item How can I use curses with Perl?
-
-=item How can I write a GUI (X, Tk, Gtk, etc.) in Perl?
-X<GUI> X<Tk> X<Wx> X<WxWidgets> X<Gtk> X<Gtk2> X<CamelBones> X<Qt>
-
-Tk, Wx, Gtk and Gtk2, Win32::GUI, CamelBones, Qt, Athena
-
-=item How can I make my Perl program run faster?
-
-=item How can I make my Perl program take less memory?
-
-Don't slurp!, Use map and grep selectively, Avoid unnecessary quotes and
-stringification, Pass by reference, Tie large variables to disk
-
-=item Is it safe to return a reference to local or lexical data?
-
-=item How can I free an array or hash so my program shrinks?
-
-=item How can I make my CGI script more efficient?
-
-=item How can I hide the source for my Perl program?
-
-=item How can I compile my Perl program into byte code or C?
-
-=item How can I get C<#!perl> to work on [MS-DOS,NT,...]?
-
-=item Can I write useful Perl programs on the command line?
-
-=item Why don't Perl one-liners work on my DOS/Mac/VMS system?
-
-=item Where can I learn about CGI or Web programming in Perl?
-
-=item Where can I learn about object-oriented Perl programming?
-
-=item Where can I learn about linking C with Perl?
-
-=item I've read perlembed, perlguts, etc., but I can't embed perl in my C
-program; what am I doing wrong?
-
-=item When I tried to run my script, I got this message. What does it mean?
-
-=item What's MakeMaker?
-
-=back
-
-=item REVISION
-
-=item AUTHOR AND COPYRIGHT
-
-=back
-
-=head2 perlfaq4 - Data Manipulation
-
-=over 4
-
-=item DESCRIPTION
-
-=item Data: Numbers
-
-=over 4
-
-=item Why am I getting long decimals (eg, 19.9499999999999) instead of the
-numbers I should be getting (eg, 19.95)?
-
-=item Why is int() broken?
-
-=item Why isn't my octal data interpreted correctly?
-
-=item Does Perl have a round() function? What about ceil() and floor()?
-Trig functions?
-
-=item How do I convert between numeric representations/bases/radixes?
-
-How do I convert hexadecimal into decimal, How do I convert from decimal to
-hexadecimal, How do I convert from octal to decimal, How do I convert from
-decimal to octal, How do I convert from binary to decimal, How do I convert
-from decimal to binary
-
-=item Why doesn't & work the way I want it to?
-
-=item How do I multiply matrices?
-
-=item How do I perform an operation on a series of integers?
-
-=item How can I output Roman numerals?
-
-=item Why aren't my random numbers random?
-
-=item How do I get a random number between X and Y?
-
-=back
-
-=item Data: Dates
-
-=over 4
-
-=item How do I find the day or week of the year?
-
-=item How do I find the current century or millennium?
-
-=item How can I compare two dates and find the difference?
-
-=item How can I take a string and turn it into epoch seconds?
-
-=item How can I find the Julian Day?
-
-=item How do I find yesterday's date?
-
-=item Does Perl have a Year 2000 problem? Is Perl Y2K compliant?
-
-=back
-
-=item Data: Strings
-
-=over 4
-
-=item How do I validate input?
-
-=item How do I unescape a string?
-
-=item How do I remove consecutive pairs of characters?
-
-=item How do I expand function calls in a string?
-
-=item How do I find matching/nesting anything?
-
-=item How do I reverse a string?
-
-=item How do I expand tabs in a string?
-
-=item How do I reformat a paragraph?
-
-=item How can I access or change N characters of a string?
-
-=item How do I change the Nth occurrence of something?
-
-=item How can I count the number of occurrences of a substring within a
-string?
-
-=item How do I capitalize all the words on one line?
-
-=item How can I split a [character] delimited string except when inside
-[character]?
-
-=item How do I strip blank space from the beginning/end of a string?
-
-=item How do I pad a string with blanks or pad a number with zeroes?
-
-=item How do I extract selected columns from a string?
-
-=item How do I find the soundex value of a string?
-
-=item How can I expand variables in text strings?
-
-=item What's wrong with always quoting "$vars"?
-
-=item Why don't my E<lt>E<lt>HERE documents work?
-
-There must be no space after the E<lt>E<lt> part, There (probably) should
-be a semicolon at the end, You can't (easily) have any space in front of
-the tag
-
-=back
-
-=item Data: Arrays
-
-=over 4
-
-=item What is the difference between a list and an array?
-
-=item What is the difference between $array[1] and @array[1]?
-
-=item How can I remove duplicate elements from a list or array?
-
-=item How can I tell whether a certain element is contained in a list or
-array?
-
-=item How do I compute the difference of two arrays? How do I compute the
-intersection of two arrays?
-
-=item How do I test whether two arrays or hashes are equal?
-
-=item How do I find the first array element for which a condition is true?
-
-=item How do I handle linked lists?
-
-=item How do I handle circular lists?
-
-=item How do I shuffle an array randomly?
-
-=item How do I process/modify each element of an array?
-
-=item How do I select a random element from an array?
-
-=item How do I permute N elements of a list?
-X<List::Permuter> X<permute> X<Algorithm::Loops> X<Knuth>
-X<The Art of Computer Programming> X<Fischer-Krause>
-
-=item How do I sort an array by (anything)?
-
-=item How do I manipulate arrays of bits?
-
-=item Why does defined() return true on empty arrays and hashes?
-
-=back
-
-=item Data: Hashes (Associative Arrays)
-
-=over 4
-
-=item How do I process an entire hash?
-
-=item What happens if I add or remove keys from a hash while iterating over
-it?
-
-=item How do I look up a hash element by value?
-
-=item How can I know how many entries are in a hash?
-
-=item How do I sort a hash (optionally by value instead of key)?
-
-=item How can I always keep my hash sorted?
-X<hash tie sort DB_File Tie::IxHash>
-
-=item What's the difference between "delete" and "undef" with hashes?
-
-=item Why don't my tied hashes make the defined/exists distinction?
-
-=item How do I reset an each() operation part-way through?
-
-=item How can I get the unique keys from two hashes?
-
-=item How can I store a multidimensional array in a DBM file?
-
-=item How can I make my hash remember the order I put elements into it?
-
-=item Why does passing a subroutine an undefined element in a hash create
-it?
-
-=item How can I make the Perl equivalent of a C structure/C++ class/hash or
-array of hashes or arrays?
-
-=item How can I use a reference as a hash key?
-
-=back
-
-=item Data: Misc
-
-=over 4
-
-=item How do I handle binary data correctly?
-
-=item How do I determine whether a scalar is a number/whole/integer/float?
-
-=item How do I keep persistent data across program calls?
-
-=item How do I print out or copy a recursive data structure?
-
-=item How do I define methods for every class/object?
-
-=item How do I verify a credit card checksum?
-
-=item How do I pack arrays of doubles or floats for XS code?
-
-=back
-
-=item REVISION
-
-=item AUTHOR AND COPYRIGHT
-
-=back
-
-=head2 perlfaq5 - Files and Formats
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item How do I flush/unbuffer an output filehandle? Why must I do this?
-X<flush> X<buffer> X<unbuffer> X<autoflush>
-
-=item How do I count the number of lines in a file?
-X<file, counting lines> X<lines> X<line>
-
-=item How can I use Perl's C<-i> option from within a program?
-X<-i> X<in-place>
-
-=item How can I copy a file?
-X<copy> X<file, copy>
-
-=item How do I make a temporary file name?
-X<file, temporary>
-
-=item How can I manipulate fixed-record-length files?
-X<fixed-length> X<file, fixed-length records>
-
-=item How can I make a filehandle local to a subroutine? How do I pass
-filehandles between subroutines? How do I make an array of filehandles?
-X<filehandle, local> X<filehandle, passing> X<filehandle, reference>
-
-=item How can I use a filehandle indirectly?
-X<filehandle, indirect>
-
-=item How can I set up a footer format to be used with write()?
-X<footer>
-
-=item How can I write() into a string?
-X<write, into a string>
-
-=item How can I open a filehandle to a string?
-X<string>, X<open>, X<IO::Scalar>, X<filehandle>
-
-=item How can I translate tildes (~) in a filename?
-X<tilde> X<tilde expansion>
-
-=item How come when I open a file read-write it wipes it out?
-X<clobber> X<read-write> X<clobbering> X<truncate> X<truncating>
-
-=item Why do I sometimes get an "Argument list too long" when I use
-E<lt>*E<gt>?
-X<argument list too long>
-
-=item Is there a leak/bug in glob()?
-X<glob>
-
-=item How can I open a file with a leading ">" or trailing blanks?
-X<filename, special characters>
-
-=item How can I reliably rename a file?
-X<rename> X<mv> X<move> X<file, rename> X<ren>
-
-=item How can I lock a file?
-X<lock> X<file, lock> X<flock>
-
-=item Why can't I just open(FH, "E<gt>file.lock")?
-X<lock, lockfile race condition>
-
-=item I still don't get locking. I just want to increment the number in
-the file. How can I do this?
-X<counter> X<file, counter>
-
-=item All I want to do is append a small amount of text to the end of a
-file. Do I still have to use locking?
-X<append> X<file, append>
-
-=item How do I randomly update a binary file?
-X<file, binary patch>
-
-=item How do I get a file's timestamp in perl?
-X<timestamp> X<file, timestamp>
-
-=item How do I set a file's timestamp in perl?
-X<timestamp> X<file, timestamp>
-
-=item How do I print to more than one file at once?
-X<print, to multiple files>
-
-=item How can I read in an entire file all at once?
-X<slurp> X<file, slurping>
-
-=item How can I read in a file by paragraphs?
-X<file, reading by paragraphs>
-
-=item How can I read a single character from a file? From the keyboard?
-X<getc> X<file, reading one character at a time>
-
-=item How can I tell whether there's a character waiting on a filehandle?
-
-=item How do I do a C<tail -f> in perl?
-X<tail> X<IO::Handle> X<File::Tail> X<clearerr>
-
-=item How do I dup() a filehandle in Perl?
-X<dup>
-
-=item How do I close a file descriptor by number?
-X<file, closing file descriptors> X<POSIX> X<close>
-
-=item Why can't I use "C:\temp\foo" in DOS paths? Why doesn't
-`C:\temp\foo.exe` work?
-X<filename, DOS issues>
-
-=item Why doesn't glob("*.*") get all the files?
-X<glob>
-
-=item Why does Perl let me delete read-only files? Why does C<-i> clobber
-protected files? Isn't this a bug in Perl?
-
-=item How do I select a random line from a file?
-X<file, selecting a random line>
-
-=item Why do I get weird spaces when I print an array of lines?
-
-=back
-
-=item REVISION
-
-=item AUTHOR AND COPYRIGHT
-
-=back
-
-=head2 perlfaq6 - Regular Expressions
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item How can I hope to use regular expressions without creating illegible
-and unmaintainable code?
-X<regex, legibility> X<regexp, legibility>
-X<regular expression, legibility> X</x>
-
-Comments Outside the Regex, Comments Inside the Regex, Different Delimiters
-
-=item I'm having trouble matching over more than one line. What's wrong?
-X<regex, multiline> X<regexp, multiline> X<regular expression, multiline>
-
-=item How can I pull out lines between two patterns that are themselves on
-different lines?
-X<..>
-
-=item I put a regular expression into $/ but it didn't work. What's wrong?
-X<$/, regexes in> X<$INPUT_RECORD_SEPARATOR, regexes in>
-X<$RS, regexes in>
-
-=item How do I substitute case insensitively on the LHS while preserving
-case on the RHS?
-X<replace, case preserving> X<substitute, case preserving>
-X<substitution, case preserving> X<s, case preserving>
-
-=item How can I make C<\w> match national character sets?
-X<\w>
-
-=item How can I match a locale-smart version of C</[a-zA-Z]/>?
-X<alpha>
-
-=item How can I quote a variable to use in a regex?
-X<regex, escaping> X<regexp, escaping> X<regular expression, escaping>
-
-=item What is C</o> really for?
-X</o, regular expressions> X<compile, regular expressions>
-
-=item How do I use a regular expression to strip C style comments from a
-file?
-
-=item Can I use Perl regular expressions to match balanced text?
-X<regex, matching balanced test> X<regexp, matching balanced test>
-X<regular expression, matching balanced test>
-
-=item What does it mean that regexes are greedy? How can I get around it?
-X<greedy> X<greediness>
-
-=item How do I process each word on each line?
-X<word>
-
-=item How can I print out a word-frequency or line-frequency summary?
-
-=item How can I do approximate matching?
-X<match, approximate> X<matching, approximate>
-
-=item How do I efficiently match many regular expressions at once?
-X<regex, efficiency> X<regexp, efficiency>
-X<regular expression, efficiency>
-
-=item Why don't word-boundary searches with C<\b> work for me?
-X<\b>
-
-=item Why does using $&, $`, or $' slow my program down?
-X<$MATCH> X<$&> X<$POSTMATCH> X<$'> X<$PREMATCH> X<$`>
-
-=item What good is C<\G> in a regular expression?
-X<\G>
-
-=item Are Perl regexes DFAs or NFAs? Are they POSIX compliant?
-X<DFA> X<NFA> X<POSIX>
-
-=item What's wrong with using grep in a void context?
-X<grep>
-
-=item How can I match strings with multibyte characters?
-X<regex, and multibyte characters> X<regexp, and multibyte characters>
-X<regular expression, and multibyte characters> X<martian> X<encoding,
-Martian>
-
-=item How do I match a regular expression that's in a variable?
-X<regex, in variable> X<eval> X<regex> X<quotemeta> X<\Q, regex>
-X<\E, regex>, X<qr//>
-
-=back
-
-=item REVISION
-
-=item AUTHOR AND COPYRIGHT
-
-=back
-
-=head2 perlfaq7 - General Perl Language Issues
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Can I get a BNF/yacc/RE for the Perl language?
-
-=item What are all these $@%&* punctuation signs, and how do I know when to
-use them?
-
-=item Do I always/never have to quote my strings or use semicolons and
-commas?
-
-=item How do I skip some return values?
-
-=item How do I temporarily block warnings?
-
-=item What's an extension?
-
-=item Why do Perl operators have different precedence than C operators?
-
-=item How do I declare/create a structure?
-
-=item How do I create a module?
-
-=item How do I adopt or take over a module already on CPAN?
-
-=item How do I create a class?
-
-=item How can I tell if a variable is tainted?
-
-=item What's a closure?
-
-=item What is variable suicide and how can I prevent it?
-
-=item How can I pass/return a {Function, FileHandle, Array, Hash, Method,
-Regex}?
-
-Passing Variables and Functions, Passing Filehandles, Passing Regexes,
-Passing Methods
-
-=item How do I create a static variable?
-
-=item What's the difference between dynamic and lexical (static) scoping?
-Between local() and my()?
-
-=item How can I access a dynamic variable while a similarly named lexical
-is in scope?
-
-=item What's the difference between deep and shallow binding?
-
-=item Why doesn't "my($foo) = E<lt>FILEE<gt>;" work right?
-
-=item How do I redefine a builtin function, operator, or method?
-
-=item What's the difference between calling a function as &foo and foo()?
-
-=item How do I create a switch or case statement?
-
-=item How can I catch accesses to undefined variables, functions, or
-methods?
-
-=item Why can't a method included in this same file be found?
-
-=item How can I find out my current package?
-
-=item How can I comment out a large block of perl code?
-
-=item How do I clear a package?
-
-=item How can I use a variable as a variable name?
-
-=item What does "bad interpreter" mean?
-
-=back
-
-=item REVISION
-
-=item AUTHOR AND COPYRIGHT
-
-=back
-
-=head2 perlfaq8 - System Interaction
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item How do I find out which operating system I'm running under?
-
-=item How come exec() doesn't return?
-
-=item How do I do fancy stuff with the keyboard/screen/mouse?
-
-Keyboard, Screen, Mouse
-
-=item How do I print something out in color?
-
-=item How do I read just one key without waiting for a return key?
-
-=item How do I check whether input is ready on the keyboard?
-
-=item How do I clear the screen?
-
-=item How do I get the screen size?
-
-=item How do I ask the user for a password?
-
-=item How do I read and write the serial port?
-
-lockfiles, open mode, end of line, flushing output, non-blocking input
-
-=item How do I decode encrypted password files?
-
-=item How do I start a process in the background?
-
-STDIN, STDOUT, and STDERR are shared, Signals, Zombies
-
-=item How do I trap control characters/signals?
-
-=item How do I modify the shadow password file on a Unix system?
-
-=item How do I set the time and date?
-
-=item How can I sleep() or alarm() for under a second?
-X<Time::HiRes> X<BSD::Itimer> X<sleep> X<select>
-
-=item How can I measure time under a second?
-X<Time::HiRes> X<BSD::Itimer> X<sleep> X<select>
-
-=item How can I do an atexit() or setjmp()/longjmp()? (Exception handling)
-
-=item Why doesn't my sockets program work under System V (Solaris)? What
-does the error message "Protocol not supported" mean?
-
-=item How can I call my system's unique C functions from Perl?
-
-=item Where do I get the include files to do ioctl() or syscall()?
-
-=item Why do setuid perl scripts complain about kernel problems?
-
-=item How can I open a pipe both to and from a command?
-
-=item Why can't I get the output of a command with system()?
-
-=item How can I capture STDERR from an external command?
-
-=item Why doesn't open() return an error when a pipe open fails?
-
-=item What's wrong with using backticks in a void context?
-
-=item How can I call backticks without shell processing?
-
-=item Why can't my script read from STDIN after I gave it EOF (^D on Unix,
-^Z on MS-DOS)?
-
-=item How can I convert my shell script to perl?
-
-=item Can I use perl to run a telnet or ftp session?
-
-=item How can I write expect in Perl?
-
-=item Is there a way to hide perl's command line from programs such as
-"ps"?
-
-=item I {changed directory, modified my environment} in a perl script. How
-come the change disappeared when I exited the script? How do I get my
-changes to be visible?
-
-Unix
-
-=item How do I close a process's filehandle without waiting for it to
-complete?
-
-=item How do I fork a daemon process?
-
-=item How do I find out if I'm running interactively or not?
-
-=item How do I timeout a slow event?
-
-=item How do I set CPU limits?
-X<BSD::Resource> X<limit> X<CPU>
-
-=item How do I avoid zombies on a Unix system?
-
-=item How do I use an SQL database?
-
-=item How do I make a system() exit on control-C?
-
-=item How do I open a file without blocking?
-
-=item How do I tell the difference between errors from the shell and perl?
-
-=item How do I install a module from CPAN?
-
-=item What's the difference between require and use?
-
-=item How do I keep my own module/library directory?
-
-=item How do I add the directory my program lives in to the module/library
-search path?
-
-=item How do I add a directory to my include path (@INC) at runtime?
-
-the PERLLIB environment variable, the PERL5LIB environment variable, the
-perl -Idir command line flag, the use lib pragma:
-
-=item What is socket.ph and where do I get it?
-
-=back
-
-=item REVISION
-
-=item AUTHOR AND COPYRIGHT
-
-=back
-
-=head2 perlfaq9 - Networking
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item What is the correct form of response from a CGI script?
-
-=item My CGI script runs from the command line but not the browser. (500
-Server Error)
-
-=item How can I get better error messages from a CGI program?
-
-=item How do I remove HTML from a string?
-
-=item How do I extract URLs?
-
-=item How do I download a file from the user's machine? How do I open a
-file on another machine?
-
-=item How do I make an HTML pop-up menu with Perl?
-
-=item How do I fetch an HTML file?
-
-=item How do I automate an HTML form submission?
-
-=item How do I decode or create those %-encodings on the web?
-
-=item How do I redirect to another page?
-
-=item How do I put a password on my web pages?
-
-=item How do I edit my .htpasswd and .htgroup files with Perl?
-
-=item How do I make sure users can't enter values into a form that cause my
-CGI script to do bad things?
-
-=item How do I parse a mail header?
-
-=item How do I decode a CGI form?
-
-=item How do I check a valid mail address?
-
-=item How do I decode a MIME/BASE64 string?
-
-=item How do I return the user's mail address?
-
-=item How do I send mail?
-
-=item How do I use MIME to make an attachment to a mail message?
-
-=item How do I read mail?
-
-=item How do I find out my hostname, domainname, or IP address?
-X<hostname, domainname, IP address, host, domain, hostfqdn, inet_ntoa,
-gethostbyname, Socket, Net::Domain, Sys::Hostname>
-
-=item How do I fetch a news article or the active newsgroups?
-
-=item How do I fetch/put an FTP file?
-
-=item How can I do RPC in Perl?
-
-=back
-
-=item REVISION
-
-=item AUTHOR AND COPYRIGHT
-
-=back
-
-=head2 perlsyn - Perl syntax
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Declarations
-X<declaration> X<undef> X<undefined> X<uninitialized>
-
-=item Comments
-X<comment> X<#>
-
-=item Simple Statements
-X<statement> X<semicolon> X<expression> X<;>
-
-=item Truth and Falsehood
-X<truth> X<falsehood> X<true> X<false> X<!> X<not> X<negation> X<0>
-
-=item Statement Modifiers
-X<statement modifier> X<modifier> X<if> X<unless> X<while>
-X<until> X<foreach> X<for>
-
-=item Compound Statements
-X<statement, compound> X<block> X<bracket, curly> X<curly bracket> X<brace>
-X<{> X<}> X<if> X<unless> X<while> X<until> X<foreach> X<for> X<continue>
-
-=item Loop Control
-X<loop control> X<loop, control> X<next> X<last> X<redo> X<continue>
-
-=item For Loops
-X<for> X<foreach>
-
-=item Foreach Loops
-X<for> X<foreach>
-
-=item Basic BLOCKs
-X<block>
-
-=item Switch statements
-X<switch> X<case> X<given> X<when> X<default>
-
-o, o, o, o, o, o, o
-
-=item Goto
-X<goto>
-
-=item PODs: Embedded Documentation
-X<POD> X<documentation>
-
-=item Plain Old Comments (Not!)
-X<comment> X<line> X<#> X<preprocessor> X<eval>
-
-=back
-
-=back
-
-=head2 perldata - Perl data types
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Variable names
-X<variable, name> X<variable name> X<data type> X<type>
-
-=item Context
-X<context> X<scalar context> X<list context>
-
-=item Scalar values
-X<scalar> X<number> X<string> X<reference>
-
-=item Scalar value constructors
-X<scalar, literal> X<scalar, constant>
-
-=item List value constructors
-X<list>
-
-=item Subscripts
-
-=item Slices
-X<slice> X<array, slice> X<hash, slice>
-
-=item Typeglobs and Filehandles
-X<typeglob> X<filehandle> X<*>
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 perlop - Perl operators and precedence
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Operator Precedence and Associativity
-X<operator, precedence> X<precedence> X<associativity>
-
-=item Terms and List Operators (Leftward)
-X<list operator> X<operator, list> X<term>
-
-=item The Arrow Operator
-X<arrow> X<dereference> X<< -> >>
-
-=item Auto-increment and Auto-decrement
-X<increment> X<auto-increment> X<++> X<decrement> X<auto-decrement> X<-->
-
-=item Exponentiation
-X<**> X<exponentiation> X<power>
-
-=item Symbolic Unary Operators
-X<unary operator> X<operator, unary>
-
-=item Binding Operators
-X<binding> X<operator, binding> X<=~> X<!~>
-
-=item Multiplicative Operators
-X<operator, multiplicative>
-
-=item Additive Operators
-X<operator, additive>
-
-=item Shift Operators
-X<shift operator> X<operator, shift> X<<< << >>>
-X<<< >> >>> X<right shift> X<left shift> X<bitwise shift>
-X<shl> X<shr> X<shift, right> X<shift, left>
-
-=item Named Unary Operators
-X<operator, named unary>
-
-=item Relational Operators
-X<relational operator> X<operator, relational>
-
-=item Equality Operators
-X<equality> X<equal> X<equals> X<operator, equality>
-
-=item Bitwise And
-X<operator, bitwise, and> X<bitwise and> X<&>
-
-=item Bitwise Or and Exclusive Or
-X<operator, bitwise, or> X<bitwise or> X<|> X<operator, bitwise, xor>
-X<bitwise xor> X<^>
-
-=item C-style Logical And
-X<&&> X<logical and> X<operator, logical, and>
-
-=item C-style Logical Or
-X<||> X<operator, logical, or>
-
-=item C-style Logical Defined-Or
-X<//> X<operator, logical, defined-or>
-
-=item Range Operators
-X<operator, range> X<range> X<..> X<...>
-
-=item Conditional Operator
-X<operator, conditional> X<operator, ternary> X<ternary> X<?:>
-
-=item Assignment Operators
-X<assignment> X<operator, assignment> X<=> X<**=> X<+=> X<*=> X<&=>
-X<<< <<= >>> X<&&=> X<-=> X</=> X<|=> X<<< >>= >>> X<||=> X<//=> X<.=>
-X<%=> X<^=> X<x=>
-
-=item Comma Operator
-X<comma> X<operator, comma> X<,>
-
-=item List Operators (Rightward)
-X<operator, list, rightward> X<list operator>
-
-=item Logical Not
-X<operator, logical, not> X<not>
-
-=item Logical And
-X<operator, logical, and> X<and>
-
-=item Logical or, Defined or, and Exclusive Or
-X<operator, logical, or> X<operator, logical, xor>
-X<operator, logical, defined or> X<operator, logical, exclusive or>
-X<or> X<xor>
-
-=item C Operators Missing From Perl
-X<operator, missing from perl> X<&> X<*>
-X<typecasting> X<(TYPE)>
-
-unary &, unary *, (TYPE)
-
-=item Quote and Quote-like Operators
-X<operator, quote> X<operator, quote-like> X<q> X<qq> X<qx> X<qw> X<m>
-X<qr> X<s> X<tr> X<'> X<''> X<"> X<""> X<//> X<`> X<``> X<<< << >>>
-X<escape sequence> X<escape>
-
-=item Regexp Quote-Like Operators
-X<operator, regexp>
-
-qr/STRING/msixpo X<qr> X</i> X</m> X</o> X</s> X</x> X</p>,
-m/PATTERN/msixpogc X<m> X<operator, match> X<regexp, options> X<regexp>
-X<regex, options> X<regex> X</m> X</s> X</i> X</x> X</p> X</o> X</g> X</c>,
-/PATTERN/msixpogc, ?PATTERN? X<?>, s/PATTERN/REPLACEMENT/msixpogce
-X<substitute> X<substitution> X<replace> X<regexp, replace> X<regexp,
-substitute> X</m> X</s> X</i> X</x> X</p> X</o> X</g> X</c> X</e>
-
-=item Quote-Like Operators
-X<operator, quote-like>
-
-q/STRING/ X<q> X<quote, single> X<'> X<''>, 'STRING', qq/STRING/ X<qq>
-X<quote, double> X<"> X<"">, "STRING", qx/STRING/ X<qx> X<`> X<``>
-X<backtick>, `STRING`, qw/STRING/ X<qw> X<quote, list> X<quote, words>,
-tr/SEARCHLIST/REPLACEMENTLIST/cds X<tr> X<y> X<transliterate> X</c> X</d>
-X</s>, y/SEARCHLIST/REPLACEMENTLIST/cds, <<EOF X<here-doc> X<heredoc>
-X<here-document> X<<< << >>>, Double Quotes, Single Quotes, Backticks
-
-=item Gory details of parsing quoted constructs
-X<quote, gory details>
-
-Finding the end, Interpolation X<interpolation>, C<<<'EOF'>, C<m''>, the
-pattern of C<s'''>, C<''>, C<q//>, C<tr'''>, C<y'''>, the replacement of
-C<s'''>, C<tr///>, C<y///>, C<"">, C<``>, C<qq//>, C<qx//>, C<< <file*glob>
->>, C<<<"EOF">, the replacement of C<s///>, C<RE> in C<?RE?>, C</RE/>,
-C<m/RE/>, C<s/RE/foo/>,, parsing regular expressions X<regexp, parse>,
-Optimization of regular expressions X<regexp, optimization>
-
-=item I/O Operators
-X<operator, i/o> X<operator, io> X<io> X<while> X<filehandle>
-X<< <> >> X<@ARGV>
-
-=item Constant Folding
-X<constant folding> X<folding>
-
-=item No-ops
-X<no-op> X<nop>
-
-=item Bitwise String Operators
-X<operator, bitwise, string>
-
-=item Integer Arithmetic
-X<integer>
-
-=item Floating-point Arithmetic
-X<floating-point> X<floating point> X<float> X<real>
-
-=item Bigger Numbers
-X<number, arbitrary precision>
-
-=back
-
-=back
-
-=head2 perlsub - Perl subroutines
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Private Variables via my()
-X<my> X<variable, lexical> X<lexical> X<lexical variable> X<scope, lexical>
-X<lexical scope> X<attributes, my>
-
-=item Persistent Private Variables
-X<state> X<state variable> X<static> X<variable, persistent> X<variable,
-static> X<closure>
-
-=item Temporary Values via local()
-X<local> X<scope, dynamic> X<dynamic scope> X<variable, local>
-X<variable, temporary>
-
-=item Lvalue subroutines
-X<lvalue> X<subroutine, lvalue>
-
-Lvalue subroutines are EXPERIMENTAL
-
-=item Passing Symbol Table Entries (typeglobs)
-X<typeglob> X<*>
-
-=item When to Still Use local()
-X<local> X<variable, local>
-
-=item Pass by Reference
-X<pass by reference> X<pass-by-reference> X<reference>
-
-=item Prototypes
-X<prototype> X<subroutine, prototype>
-
-=item Constant Functions
-X<constant>
-
-=item Overriding Built-in Functions
-X<built-in> X<override> X<CORE> X<CORE::GLOBAL>
-
-=item Autoloading
-X<autoloading> X<AUTOLOAD>
-
-=item Subroutine Attributes
-X<attribute> X<subroutine, attribute> X<attrs>
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 perlfunc - Perl builtin functions
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Perl Functions by Category
-X<function>
-
-Functions for SCALARs or strings X<scalar> X<string> X<character>, Regular
-expressions and pattern matching X<regular expression> X<regex> X<regexp>,
-Numeric functions X<numeric> X<number> X<trigonometric> X<trigonometry>,
-Functions for real @ARRAYs X<array>, Functions for list data X<list>,
-Functions for real %HASHes X<hash>, Input and output functions X<I/O>
-X<input> X<output> X<dbm>, Functions for fixed length data or records,
-Functions for filehandles, files, or directories X<file> X<filehandle>
-X<directory> X<pipe> X<link> X<symlink>, Keywords related to the control
-flow of your Perl program X<control flow>, Keywords related to switch,
-Keywords related to scoping, Miscellaneous functions, Functions for
-processes and process groups X<process> X<pid> X<process id>, Keywords
-related to perl modules X<module>, Keywords related to classes and
-object-orientation X<object> X<class> X<package>, Low-level socket
-functions X<socket> X<sock>, System V interprocess communication functions
-X<IPC> X<System V> X<semaphore> X<shared memory> X<memory> X<message>,
-Fetching user and group info X<user> X<group> X<password> X<uid> X<gid>
-X<passwd> X</etc/passwd>, Fetching network info X<network> X<protocol>
-X<host> X<hostname> X<IP> X<address> X<service>, Time-related functions
-X<time> X<date>, Functions new in perl5 X<perl5>, Functions obsoleted in
-perl5
-
-=item Portability
-X<portability> X<Unix> X<portable>
-
-=item Alphabetical Listing of Perl Functions
-
--I<X> FILEHANDLE
-X<-r>X<-w>X<-x>X<-o>X<-R>X<-W>X<-X>X<-O>X<-e>X<-z>X<-s>X<-f>X<-d>X<-l>X<-p>
-X<-S>X<-b>X<-c>X<-t>X<-u>X<-g>X<-k>X<-T>X<-B>X<-M>X<-A>X<-C>, -I<X> EXPR,
--I<X> DIRHANDLE, -I<X>, abs VALUE X<abs> X<absolute>, abs, accept
-NEWSOCKET,GENERICSOCKET X<accept>, alarm SECONDS X<alarm> X<SIGALRM>
-X<timer>, alarm, atan2 Y,X X<atan2> X<arctangent> X<tan> X<tangent>, bind
-SOCKET,NAME X<bind>, binmode FILEHANDLE, LAYER X<binmode> X<binary> X<text>
-X<DOS> X<Windows>, binmode FILEHANDLE, bless REF,CLASSNAME X<bless>, bless
-REF, break, caller EXPR X<caller> X<call stack> X<stack> X<stack trace>,
-caller, chdir EXPR X<chdir> X<cd> X<directory, change>, chdir FILEHANDLE,
-chdir DIRHANDLE, chdir, chmod LIST X<chmod> X<permission> X<mode>, chomp
-VARIABLE X<chomp> X<INPUT_RECORD_SEPARATOR> X<$/> X<newline> X<eol>, chomp(
-LIST ), chomp, chop VARIABLE X<chop>, chop( LIST ), chop, chown LIST
-X<chown> X<owner> X<user> X<group>, chr NUMBER X<chr> X<character> X<ASCII>
-X<Unicode>, chr, chroot FILENAME X<chroot> X<root>, chroot, close
-FILEHANDLE X<close>, close, closedir DIRHANDLE X<closedir>, connect
-SOCKET,NAME X<connect>, continue BLOCK X<continue>, continue, cos EXPR
-X<cos> X<cosine> X<acos> X<arccosine>, cos, crypt PLAINTEXT,SALT X<crypt>
-X<digest> X<hash> X<salt> X<plaintext> X<password> X<decrypt>
-X<cryptography> X<passwd> X<encrypt>, dbmclose HASH X<dbmclose>, dbmopen
-HASH,DBNAME,MASK X<dbmopen> X<dbm> X<ndbm> X<sdbm> X<gdbm>, defined EXPR
-X<defined> X<undef> X<undefined>, defined, delete EXPR X<delete>, die LIST
-X<die> X<throw> X<exception> X<raise> X<$@> X<abort>, do BLOCK X<do>
-X<block>, do SUBROUTINE(LIST) X<do>, do EXPR X<do>, dump LABEL X<dump>
-X<core> X<undump>, dump, each HASH X<each> X<hash, iterator>, eof
-FILEHANDLE X<eof> X<end of file> X<end-of-file>, eof (), eof, eval EXPR
-X<eval> X<try> X<catch> X<evaluate> X<parse> X<execute> X<error, handling>
-X<exception, handling>, eval BLOCK, eval, exec LIST X<exec> X<execute>,
-exec PROGRAM LIST, exists EXPR X<exists> X<autovivification>, exit EXPR
-X<exit> X<terminate> X<abort>, exit, exp EXPR X<exp> X<exponential>
-X<antilog> X<antilogarithm> X<e>, exp, fcntl FILEHANDLE,FUNCTION,SCALAR
-X<fcntl>, fileno FILEHANDLE X<fileno>, flock FILEHANDLE,OPERATION X<flock>
-X<lock> X<locking>, fork X<fork> X<child> X<parent>, format X<format>,
-formline PICTURE,LIST X<formline>, getc FILEHANDLE X<getc> X<getchar>
-X<character> X<file, read>, getc, getlogin X<getlogin> X<login>,
-getpeername SOCKET X<getpeername> X<peer>, getpgrp PID X<getpgrp> X<group>,
-getppid X<getppid> X<parent> X<pid>, getpriority WHICH,WHO X<getpriority>
-X<priority> X<nice>, getpwnam NAME X<getpwnam> X<getgrnam> X<gethostbyname>
-X<getnetbyname> X<getprotobyname> X<getpwuid> X<getgrgid> X<getservbyname>
-X<gethostbyaddr> X<getnetbyaddr> X<getprotobynumber> X<getservbyport>
-X<getpwent> X<getgrent> X<gethostent> X<getnetent> X<getprotoent>
-X<getservent> X<setpwent> X<setgrent> X<sethostent> X<setnetent>
-X<setprotoent> X<setservent> X<endpwent> X<endgrent> X<endhostent>
-X<endnetent> X<endprotoent> X<endservent>, getgrnam NAME, gethostbyname
-NAME, getnetbyname NAME, getprotobyname NAME, getpwuid UID, getgrgid GID,
-getservbyname NAME,PROTO, gethostbyaddr ADDR,ADDRTYPE, getnetbyaddr
-ADDR,ADDRTYPE, getprotobynumber NUMBER, getservbyport PORT,PROTO, getpwent,
-getgrent, gethostent, getnetent, getprotoent, getservent, setpwent,
-setgrent, sethostent STAYOPEN, setnetent STAYOPEN, setprotoent STAYOPEN,
-setservent STAYOPEN, endpwent, endgrent, endhostent, endnetent,
-endprotoent, endservent, getsockname SOCKET X<getsockname>, getsockopt
-SOCKET,LEVEL,OPTNAME X<getsockopt>, glob EXPR X<glob> X<wildcard>
-X<filename, expansion> X<expand>, glob, gmtime EXPR X<gmtime> X<UTC>
-X<Greenwich>, gmtime, goto LABEL X<goto> X<jump> X<jmp>, goto EXPR, goto
-&NAME, grep BLOCK LIST X<grep>, grep EXPR,LIST, hex EXPR X<hex>
-X<hexadecimal>, hex, import LIST X<import>, index STR,SUBSTR,POSITION
-X<index> X<indexOf> X<InStr>, index STR,SUBSTR, int EXPR X<int> X<integer>
-X<truncate> X<trunc> X<floor>, int, ioctl FILEHANDLE,FUNCTION,SCALAR
-X<ioctl>, join EXPR,LIST X<join>, keys HASH X<keys> X<key>, kill SIGNAL,
-LIST X<kill> X<signal>, last LABEL X<last> X<break>, last, lc EXPR X<lc>
-X<lowercase>, lc, lcfirst EXPR X<lcfirst> X<lowercase>, lcfirst, length
-EXPR X<length> X<size>, length, link OLDFILE,NEWFILE X<link>, listen
-SOCKET,QUEUESIZE X<listen>, local EXPR X<local>, localtime EXPR
-X<localtime> X<ctime>, localtime, lock THING X<lock>, log EXPR X<log>
-X<logarithm> X<e> X<ln> X<base>, log, lstat EXPR X<lstat>, lstat, m//, map
-BLOCK LIST X<map>, map EXPR,LIST, mkdir FILENAME,MASK X<mkdir> X<md>
-X<directory, create>, mkdir FILENAME, mkdir, msgctl ID,CMD,ARG X<msgctl>,
-msgget KEY,FLAGS X<msgget>, msgrcv ID,VAR,SIZE,TYPE,FLAGS X<msgrcv>, msgsnd
-ID,MSG,FLAGS X<msgsnd>, my EXPR X<my>, my TYPE EXPR, my EXPR : ATTRS, my
-TYPE EXPR : ATTRS, next LABEL X<next> X<continue>, next, no Module VERSION
-LIST X<no>, no Module VERSION, no Module LIST, no Module, no VERSION, oct
-EXPR X<oct> X<octal> X<hex> X<hexadecimal> X<binary> X<bin>, oct, open
-FILEHANDLE,EXPR X<open> X<pipe> X<file, open> X<fopen>, open
-FILEHANDLE,MODE,EXPR, open FILEHANDLE,MODE,EXPR,LIST, open
-FILEHANDLE,MODE,REFERENCE, open FILEHANDLE, opendir DIRHANDLE,EXPR
-X<opendir>, ord EXPR X<ord> X<encoding>, ord, our EXPR X<our> X<global>,
-our TYPE EXPR, our EXPR : ATTRS, our TYPE EXPR : ATTRS, pack TEMPLATE,LIST
-X<pack>, package NAMESPACE X<package> X<module> X<namespace>, package, pipe
-READHANDLE,WRITEHANDLE X<pipe>, pop ARRAY X<pop> X<stack>, pop, pos SCALAR
-X<pos> X<match, position>, pos, print FILEHANDLE LIST X<print>, print LIST,
-print, printf FILEHANDLE FORMAT, LIST X<printf>, printf FORMAT, LIST,
-prototype FUNCTION X<prototype>, push ARRAY,LIST X<push> X<stack>,
-q/STRING/, qq/STRING/, qr/STRING/, qx/STRING/, qw/STRING/, quotemeta EXPR
-X<quotemeta> X<metacharacter>, quotemeta, rand EXPR X<rand> X<random>,
-rand, read FILEHANDLE,SCALAR,LENGTH,OFFSET X<read> X<file, read>, read
-FILEHANDLE,SCALAR,LENGTH, readdir DIRHANDLE X<readdir>, readline EXPR,
-readline X<readline> X<gets> X<fgets>, readlink EXPR X<readlink>, readlink,
-readpipe EXPR, readpipe X<readpipe>, recv SOCKET,SCALAR,LENGTH,FLAGS
-X<recv>, redo LABEL X<redo>, redo, ref EXPR X<ref> X<reference>, ref,
-rename OLDNAME,NEWNAME X<rename> X<move> X<mv> X<ren>, require VERSION
-X<require>, require EXPR, require, reset EXPR X<reset>, reset, return EXPR
-X<return>, return, reverse LIST X<reverse> X<rev> X<invert>, rewinddir
-DIRHANDLE X<rewinddir>, rindex STR,SUBSTR,POSITION X<rindex>, rindex
-STR,SUBSTR, rmdir FILENAME X<rmdir> X<rd> X<directory, remove>, rmdir,
-s///, say FILEHANDLE LIST X<say>, say LIST, say, scalar EXPR X<scalar>
-X<context>, seek FILEHANDLE,POSITION,WHENCE X<seek> X<fseek> X<filehandle,
-position>, seekdir DIRHANDLE,POS X<seekdir>, select FILEHANDLE X<select>
-X<filehandle, default>, select, select RBITS,WBITS,EBITS,TIMEOUT X<select>,
-semctl ID,SEMNUM,CMD,ARG X<semctl>, semget KEY,NSEMS,FLAGS X<semget>, semop
-KEY,OPSTRING X<semop>, send SOCKET,MSG,FLAGS,TO X<send>, send
-SOCKET,MSG,FLAGS, setpgrp PID,PGRP X<setpgrp> X<group>, setpriority
-WHICH,WHO,PRIORITY X<setpriority> X<priority> X<nice> X<renice>, setsockopt
-SOCKET,LEVEL,OPTNAME,OPTVAL X<setsockopt>, shift ARRAY X<shift>, shift,
-shmctl ID,CMD,ARG X<shmctl>, shmget KEY,SIZE,FLAGS X<shmget>, shmread
-ID,VAR,POS,SIZE X<shmread> X<shmwrite>, shmwrite ID,STRING,POS,SIZE,
-shutdown SOCKET,HOW X<shutdown>, sin EXPR X<sin> X<sine> X<asin>
-X<arcsine>, sin, sleep EXPR X<sleep> X<pause>, sleep, socket
-SOCKET,DOMAIN,TYPE,PROTOCOL X<socket>, socketpair
-SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL X<socketpair>, sort SUBNAME LIST
-X<sort> X<qsort> X<quicksort> X<mergesort>, sort BLOCK LIST, sort LIST,
-splice ARRAY,OFFSET,LENGTH,LIST X<splice>, splice ARRAY,OFFSET,LENGTH,
-splice ARRAY,OFFSET, splice ARRAY, split /PATTERN/,EXPR,LIMIT X<split>,
-split /PATTERN/,EXPR, split /PATTERN/, split, sprintf FORMAT, LIST
-X<sprintf>, format parameter index, flags, vector flag, (minimum) width,
-precision, or maximum width X<precision>, size, order of arguments, sqrt
-EXPR X<sqrt> X<root> X<square root>, sqrt, srand EXPR X<srand> X<seed>
-X<randseed>, srand, stat FILEHANDLE X<stat> X<file, status> X<ctime>, stat
-EXPR, stat DIRHANDLE, stat, state EXPR X<state>, state TYPE EXPR, state
-EXPR : ATTRS, state TYPE EXPR : ATTRS, study SCALAR X<study>, study, sub
-NAME BLOCK X<sub>, sub NAME (PROTO) BLOCK, sub NAME : ATTRS BLOCK, sub NAME
-(PROTO) : ATTRS BLOCK, substr EXPR,OFFSET,LENGTH,REPLACEMENT X<substr>
-X<substring> X<mid> X<left> X<right>, substr EXPR,OFFSET,LENGTH, substr
-EXPR,OFFSET, symlink OLDFILE,NEWFILE X<symlink> X<link> X<symbolic link>
-X<link, symbolic>, syscall NUMBER, LIST X<syscall> X<system call>, sysopen
-FILEHANDLE,FILENAME,MODE X<sysopen>, sysopen
-FILEHANDLE,FILENAME,MODE,PERMS, sysread FILEHANDLE,SCALAR,LENGTH,OFFSET
-X<sysread>, sysread FILEHANDLE,SCALAR,LENGTH, sysseek
-FILEHANDLE,POSITION,WHENCE X<sysseek> X<lseek>, system LIST X<system>
-X<shell>, system PROGRAM LIST, syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET
-X<syswrite>, syswrite FILEHANDLE,SCALAR,LENGTH, syswrite FILEHANDLE,SCALAR,
-tell FILEHANDLE X<tell>, tell, telldir DIRHANDLE X<telldir>, tie
-VARIABLE,CLASSNAME,LIST X<tie>, tied VARIABLE X<tied>, time X<time>
-X<epoch>, times X<times>, tr///, truncate FILEHANDLE,LENGTH X<truncate>,
-truncate EXPR,LENGTH, uc EXPR X<uc> X<uppercase> X<toupper>, uc, ucfirst
-EXPR X<ucfirst> X<uppercase>, ucfirst, umask EXPR X<umask>, umask, undef
-EXPR X<undef> X<undefine>, undef, unlink LIST X<unlink> X<delete> X<remove>
-X<rm> X<del>, unlink, unpack TEMPLATE,EXPR X<unpack>, unpack TEMPLATE,
-untie VARIABLE X<untie>, unshift ARRAY,LIST X<unshift>, use Module VERSION
-LIST X<use> X<module> X<import>, use Module VERSION, use Module LIST, use
-Module, use VERSION, utime LIST X<utime>, values HASH X<values>, vec
-EXPR,OFFSET,BITS X<vec> X<bit> X<bit vector>, wait X<wait>, waitpid
-PID,FLAGS X<waitpid>, wantarray X<wantarray> X<context>, warn LIST X<warn>
-X<warning> X<STDERR>, write FILEHANDLE X<write>, write EXPR, write, y///
-
-=back
-
-=back
-
-=head2 perlopentut - tutorial on opening things in Perl
-
-=over 4
-
-=item DESCRIPTION
-
-=item Open E<agrave> la shell
-
-=over 4
-
-=item Simple Opens
-
-=item Indirect Filehandles
-
-=item Pipe Opens
-
-=item The Minus File
-
-=item Mixing Reads and Writes
-
-=item Filters
-
-=back
-
-=item Open E<agrave> la C
-
-=over 4
-
-=item Permissions E<agrave> la mode
-
-=back
-
-=item Obscure Open Tricks
-
-=over 4
-
-=item Re-Opening Files (dups)
-
-=item Dispelling the Dweomer
-
-=item Paths as Opens
-
-=item Single Argument Open
-
-=item Playing with STDIN and STDOUT
-
-=back
-
-=item Other I/O Issues
-
-=over 4
-
-=item Opening Non-File Files
-
-=item Opening Named Pipes
-
-=item Opening Sockets
-
-=item Binary Files
-
-=item File Locking
-
-=item IO Layers
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR and COPYRIGHT
-
-=item HISTORY
-
-=back
-
-=head2 perlpacktut - tutorial on C<pack> and C<unpack>
-
-=over 4
-
-=item DESCRIPTION
-
-=item The Basic Principle
-
-=item Packing Text
-
-=item Packing Numbers
-
-=over 4
-
-=item Integers
-
-=item Unpacking a Stack Frame
-
-=item How to Eat an Egg on a Net
-
-=item Byte-order modifiers
-
-=item Floating point Numbers
-
-=back
-
-=item Exotic Templates
-
-=over 4
-
-=item Bit Strings
-
-=item Uuencoding
-
-=item Doing Sums
-
-=item Unicode
-
-=item Another Portable Binary Encoding
-
-=back
-
-=item Template Grouping
-
-=item Lengths and Widths
-
-=over 4
-
-=item String Lengths
-
-=item Dynamic Templates
-
-=item Counting Repetitions
-
-=back
-
-=item Packing and Unpacking C Structures
-
-=over 4
-
-=item The Alignment Pit
-
-=item Dealing with Endian-ness
-
-=item Alignment, Take 2
-
-=item Alignment, Take 3
-
-=item Pointers for How to Use Them
-
-=back
-
-=item Pack Recipes
-
-=item Funnies Section
-
-=item Authors
-
-=back
-
-=head2 perlpod - the Plain Old Documentation format
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Ordinary Paragraph
-X<POD, ordinary paragraph>
-
-=item Verbatim Paragraph
-X<POD, verbatim paragraph> X<verbatim>
-
-=item Command Paragraph
-X<POD, command>
-
-C<=head1 I<Heading Text>> X<=head1> X<=head2> X<=head3> X<=head4> X<head1>
-X<head2> X<head3> X<head4>, C<=head2 I<Heading Text>>, C<=head3 I<Heading
-Text>>, C<=head4 I<Heading Text>>, C<=over I<indentlevel>> X<=over>
-X<=item> X<=back> X<over> X<item> X<back>, C<=item I<stuff...>>, C<=back>,
-C<=cut> X<=cut> X<cut>, C<=pod> X<=pod> X<pod>, C<=begin I<formatname>>
-X<=begin> X<=end> X<=for> X<begin> X<end> X<for>, C<=end I<formatname>>,
-C<=for I<formatname> I<text...>>, C<=encoding I<encodingname>> X<=encoding>
-X<encoding>
-
-=item Formatting Codes
-X<POD, formatting code> X<formatting code>
-X<POD, interior sequence> X<interior sequence>
-
-C<IE<lt>textE<gt>> -- italic text X<I> X<< IZ<><> >> X<POD, formatting
-code, italic> X<italic>, C<BE<lt>textE<gt>> -- bold text X<B> X<< BZ<><> >>
-X<POD, formatting code, bold> X<bold>, C<CE<lt>codeE<gt>> -- code text X<C>
-X<< CZ<><> >> X<POD, formatting code, code> X<code>, C<LE<lt>nameE<gt>> --
-a hyperlink X<L> X<< LZ<><> >> X<POD, formatting code, hyperlink>
-X<hyperlink>, C<EE<lt>escapeE<gt>> -- a character escape X<E> X<< EZ<><> >>
-X<POD, formatting code, escape> X<escape>, C<FE<lt>filenameE<gt>> -- used
-for filenames X<F> X<< FZ<><> >> X<POD, formatting code, filename>
-X<filename>, C<SE<lt>textE<gt>> -- text contains non-breaking spaces X<S>
-X<< SZ<><> >> X<POD, formatting code, non-breaking space> X<non-breaking
-space>, C<XE<lt>topic nameE<gt>> -- an index entry X<X> X<< XZ<><> >>
-X<POD, formatting code, index entry> X<index entry>, C<ZE<lt>E<gt>> -- a
-null (zero-effect) formatting code X<Z> X<< ZZ<><> >> X<POD, formatting
-code, null> X<null>
-
-=item The Intent
-X<POD, intent of>
-
-=item Embedding Pods in Perl Modules
-X<POD, embedding>
-
-=item Hints for Writing Pod
-
-X<podchecker> X<POD, validating>
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 perlpodspec - Plain Old Documentation: format specification and
-notes
-
-=over 4
-
-=item DESCRIPTION
-
-=item Pod Definitions
-
-=item Pod Commands
-
-"=head1", "=head2", "=head3", "=head4", "=pod", "=cut", "=over", "=item",
-"=back", "=begin formatname", "=end formatname", "=for formatname text...",
-"=encoding encodingname"
-
-=item Pod Formatting Codes
-
-C<IE<lt>textE<gt>> -- italic text, C<BE<lt>textE<gt>> -- bold text,
-C<CE<lt>codeE<gt>> -- code text, C<FE<lt>filenameE<gt>> -- style for
-filenames, C<XE<lt>topic nameE<gt>> -- an index entry, C<ZE<lt>E<gt>> -- a
-null (zero-effect) formatting code, C<LE<lt>nameE<gt>> -- a hyperlink,
-C<EE<lt>escapeE<gt>> -- a character escape, C<SE<lt>textE<gt>> -- text
-contains non-breaking spaces
-
-=item Notes on Implementing Pod Processors
-
-=item About LE<lt>...E<gt> Codes
-
-First:, Second:, Third:, Fourth:, Fifth:, Sixth:
-
-=item About =over...=back Regions
-
-=item About Data Paragraphs and "=begin/=end" Regions
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 perlrun - how to execute the Perl interpreter
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item #! and quoting on non-Unix systems
-X<hashbang> X<#!>
-
-OS/2, MS-DOS, Win95/NT, Macintosh, VMS
-
-=item Location of Perl
-X<perl, location of interpreter>
-
-=item Command Switches
-X<perl, command switches> X<command switches>
-
-B<-0>[I<octal/hexadecimal>] X<-0> X<$/>, B<-a> X<-a> X<autosplit>, B<-C
-[I<number/list>]> X<-C>, B<-c> X<-c>, B<-d> X<-d> X<-dt>, B<-dt>,
-B<-d:>I<foo[=bar,baz]> X<-d> X<-dt>, B<-dt:>I<foo[=bar,baz]>,
-B<-D>I<letters> X<-D> X<DEBUGGING> X<-DDEBUGGING>, B<-D>I<number>, B<-e>
-I<commandline> X<-e>, B<-E> I<commandline> X<-E>, B<-f> X<-f>,
-B<-F>I<pattern> X<-F>, B<-h> X<-h>, B<-i>[I<extension>] X<-i> X<in-place>,
-B<-I>I<directory> X<-I> X<@INC>, B<-l>[I<octnum>] X<-l> X<$/> X<$\>,
-B<-m>[B<->]I<module> X<-m> X<-M>, B<-M>[B<->]I<module>,
-B<-M>[B<->]I<'module ...'>, B<-[mM]>[B<->]I<module=arg[,arg]...>, B<-n>
-X<-n>, B<-p> X<-p>, B<-P> X<-P>, B<-s> X<-s>, B<-S> X<-S>, B<-t> X<-t>,
-B<-T> X<-T>, B<-u> X<-u>, B<-U> X<-U>, B<-v> X<-v>, B<-V> X<-V>,
-B<-V:>I<configvar>, B<-w> X<-w>, B<-W> X<-W>, B<-X> X<-X>, B<-x> X<-x>,
-B<-x>I<directory>
-
-=back
-
-=item ENVIRONMENT
-X<perl, environment variables>
-
-HOME X<HOME>, LOGDIR X<LOGDIR>, PATH X<PATH>, PERL5LIB X<PERL5LIB>,
-PERL5OPT X<PERL5OPT>, PERLIO X<PERLIO>, :bytes X<:bytes>, :crlf X<:crlf>,
-:mmap X<:mmap>, :perlio X<:perlio>, :pop X<:pop>, :raw X<:raw>, :stdio
-X<:stdio>, :unix X<:unix>, :utf8 X<:utf8>, :win32 X<:win32>, PERLIO_DEBUG
-X<PERLIO_DEBUG>, PERLLIB X<PERLLIB>, PERL5DB X<PERL5DB>, PERL5DB_THREADED
-X<PERL5DB_THREADED>, PERL5SHELL (specific to the Win32 port) X<PERL5SHELL>,
-PERL_ALLOW_NON_IFS_LSP (specific to the Win32 port)
-X<PERL_ALLOW_NON_IFS_LSP>, PERL_DEBUG_MSTATS X<PERL_DEBUG_MSTATS>,
-PERL_DESTRUCT_LEVEL X<PERL_DESTRUCT_LEVEL>, PERL_DL_NONLAZY
-X<PERL_DL_NONLAZY>, PERL_ENCODING X<PERL_ENCODING>, PERL_HASH_SEED
-X<PERL_HASH_SEED>, PERL_HASH_SEED_DEBUG X<PERL_HASH_SEED_DEBUG>, PERL_ROOT
-(specific to the VMS port) X<PERL_ROOT>, PERL_SIGNALS X<PERL_SIGNALS>,
-PERL_UNICODE X<PERL_UNICODE>, SYS$LOGIN (specific to the VMS port)
-X<SYS$LOGIN>
-
-=back
-
-=head2 perldiag - various Perl diagnostics
-
-=over 4
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=back
-
-=head2 perllexwarn - Perl Lexical Warnings
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Default Warnings and Optional Warnings
-
-=item What's wrong with B<-w> and C<$^W>
-
-=item Controlling Warnings from the Command Line
-
-B<-w> X<-w>, B<-W> X<-W>, B<-X> X<-X>
-
-=item Backward Compatibility
-
-=item Category Hierarchy
-X<warning, categories>
-
-=item Fatal Warnings
-X<warning, fatal>
-
-=item Reporting Warnings from a Module
-X<warning, reporting> X<warning, registering>
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 perldebug - Perl debugging
-
-=over 4
-
-=item DESCRIPTION
-
-=item The Perl Debugger
-
-=over 4
-
-=item Calling the debugger
-
-perl -d program_name, perl -d -e 0, perl -d:Ptkdb program_name, perl -dt
-threaded_program_name
-
-=item Debugger Commands
-
-h X<debugger command, h>, h [command], h h, p expr X<debugger command, p>,
-x [maxdepth] expr X<debugger command, x>, V [pkg [vars]] X<debugger
-command, V>, X [vars] X<debugger command, X>, y [level [vars]] X<debugger
-command, y>, T X<debugger command, T> X<backtrace> X<stack, backtrace>, s
-[expr] X<debugger command, s> X<step>, n [expr] X<debugger command, n>, r
-X<debugger command, r>, <CR>, c [line|sub] X<debugger command, c>, l
-X<debugger command, l>, l min+incr, l min-max, l line, l subname, -
-X<debugger command, ->, v [line] X<debugger command, v>, . X<debugger
-command, .>, f filename X<debugger command, f>, /pattern/, ?pattern?, L
-[abw] X<debugger command, L>, S [[!]regex] X<debugger command, S>, t
-X<debugger command, t>, t expr X<debugger command, t>, b X<breakpoint>
-X<debugger command, b>, b [line] [condition] X<breakpoint> X<debugger
-command, b>, b subname [condition] X<breakpoint> X<debugger command, b>, b
-postpone subname [condition] X<breakpoint> X<debugger command, b>, b load
-filename X<breakpoint> X<debugger command, b>, b compile subname
-X<breakpoint> X<debugger command, b>, B line X<breakpoint> X<debugger
-command, B>, B * X<breakpoint> X<debugger command, B>, a [line] command
-X<debugger command, a>, A line X<debugger command, A>, A * X<debugger
-command, A>, w expr X<debugger command, w>, W expr X<debugger command, W>,
-W * X<debugger command, W>, o X<debugger command, o>, o booloption ...
-X<debugger command, o>, o anyoption? ... X<debugger command, o>, o
-option=value ... X<debugger command, o>, < ? X<< debugger command, < >>, <
-[ command ] X<< debugger command, < >>, < * X<< debugger command, < >>, <<
-command X<< debugger command, << >>, > ? X<< debugger command, > >>, >
-command X<< debugger command, > >>, > * X<< debugger command, > >>, >>
-command X<<< debugger command, >> >>>, { ? X<debugger command, {>, { [
-command ], { * X<debugger command, {>, {{ command X<debugger command, {{>,
-! number X<debugger command, !>, ! -number X<debugger command, !>, !
-pattern X<debugger command, !>, !! cmd X<debugger command, !!>, source file
-X<debugger command, source>, H -number X<debugger command, H>, q or ^D
-X<debugger command, q> X<debugger command, ^D>, R X<debugger command, R>,
-|dbcmd X<debugger command, |>, ||dbcmd X<debugger command, ||>, command, m
-expr X<debugger command, m>, M X<debugger command, M>, man [manpage]
-X<debugger command, man>
-
-=item Configurable Options
-
-C<recallCommand>, C<ShellBang> X<debugger option, recallCommand> X<debugger
-option, ShellBang>, C<pager> X<debugger option, pager>, C<tkRunning>
-X<debugger option, tkRunning>, C<signalLevel>, C<warnLevel>, C<dieLevel>
-X<debugger option, signalLevel> X<debugger option, warnLevel> X<debugger
-option, dieLevel>, C<AutoTrace> X<debugger option, AutoTrace>, C<LineInfo>
-X<debugger option, LineInfo>, C<inhibit_exit> X<debugger option,
-inhibit_exit>, C<PrintRet> X<debugger option, PrintRet>, C<ornaments>
-X<debugger option, ornaments>, C<frame> X<debugger option, frame>,
-C<maxTraceLen> X<debugger option, maxTraceLen>, C<windowSize> X<debugger
-option, windowSize>, C<arrayDepth>, C<hashDepth> X<debugger option,
-arrayDepth> X<debugger option, hashDepth>, C<dumpDepth> X<debugger option,
-dumpDepth>, C<compactDump>, C<veryCompact> X<debugger option, compactDump>
-X<debugger option, veryCompact>, C<globPrint> X<debugger option,
-globPrint>, C<DumpDBFiles> X<debugger option, DumpDBFiles>, C<DumpPackages>
-X<debugger option, DumpPackages>, C<DumpReused> X<debugger option,
-DumpReused>, C<quote>, C<HighBit>, C<undefPrint> X<debugger option, quote>
-X<debugger option, HighBit> X<debugger option, undefPrint>, C<UsageOnly>
-X<debugger option, UsageOnly>, C<TTY> X<debugger option, TTY>, C<noTTY>
-X<debugger option, noTTY>, C<ReadLine> X<debugger option, ReadLine>,
-C<NonStop> X<debugger option, NonStop>
-
-=item Debugger input/output
-
-Prompt, Multiline commands, Stack backtrace X<backtrace> X<stack,
-backtrace>, Line Listing Format, Frame listing
-
-=item Debugging compile-time statements
-
-=item Debugger Customization
-
-=item Readline Support
-
-=item Editor Support for Debugging
-
-=item The Perl Profiler
-X<profile> X<profiling> X<profiler>
-
-=back
-
-=item Debugging regular expressions
-X<regular expression, debugging>
-X<regex, debugging> X<regexp, debugging>
-
-=item Debugging memory usage
-X<memory usage>
-
-=item SEE ALSO
-
-=item BUGS
-
-=back
-
-=head2 perlvar - Perl predefined variables
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Predefined Names
-
-$ARG, $_ X<$_> X<$ARG>, $a, $b X<$a> X<$b>, $<I<digits>> X<$1> X<$2> X<$3>,
-$MATCH, $& X<$&> X<$MATCH>, ${^MATCH} X<${^MATCH}>, $PREMATCH, $` X<$`>
-X<$PREMATCH>, ${^PREMATCH} X<${^PREMATCH}>, $POSTMATCH, $' X<$'>
-X<$POSTMATCH>, ${^POSTMATCH} X<${^POSTMATCH}>, $LAST_PAREN_MATCH, $+ X<$+>
-X<$LAST_PAREN_MATCH>, $LAST_SUBMATCH_RESULT, $^N X<$^N>, @LAST_MATCH_END,
- at + X<@+> X<@LAST_MATCH_END>, %+ X<%+>, HANDLE->input_line_number(EXPR),
-$INPUT_LINE_NUMBER, $NR, $. X<$.> X<$NR> X<$INPUT_LINE_NUMBER> X<line
-number>, IO::Handle->input_record_separator(EXPR), $INPUT_RECORD_SEPARATOR,
-$RS, $/ X<$/> X<$RS> X<$INPUT_RECORD_SEPARATOR>, HANDLE->autoflush(EXPR),
-$OUTPUT_AUTOFLUSH, $| X<$|> X<autoflush> X<flush> X<$OUTPUT_AUTOFLUSH>,
-IO::Handle->output_field_separator EXPR, $OUTPUT_FIELD_SEPARATOR, $OFS, $,
-X<$,> X<$OFS> X<$OUTPUT_FIELD_SEPARATOR>,
-IO::Handle->output_record_separator EXPR, $OUTPUT_RECORD_SEPARATOR, $ORS,
-$\ X<$\> X<$ORS> X<$OUTPUT_RECORD_SEPARATOR>, $LIST_SEPARATOR, $" X<$">
-X<$LIST_SEPARATOR>, $SUBSCRIPT_SEPARATOR, $SUBSEP, $; X<$;> X<$SUBSEP>
-X<SUBSCRIPT_SEPARATOR>, HANDLE->format_page_number(EXPR),
-$FORMAT_PAGE_NUMBER, $% X<$%> X<$FORMAT_PAGE_NUMBER>,
-HANDLE->format_lines_per_page(EXPR), $FORMAT_LINES_PER_PAGE, $= X<$=>
-X<$FORMAT_LINES_PER_PAGE>, HANDLE->format_lines_left(EXPR),
-$FORMAT_LINES_LEFT, $- X<$-> X<$FORMAT_LINES_LEFT>, @LAST_MATCH_START, @-
-X<@-> X<@LAST_MATCH_START>, C<$`> is the same as C<substr($var, 0, $-[0])>,
-C<$&> is the same as C<substr($var, $-[0], $+[0] - $-[0])>, C<$'> is the
-same as C<substr($var, $+[0])>, C<$1> is the same as C<substr($var, $-[1],
-$+[1] - $-[1])>, C<$2> is the same as C<substr($var, $-[2], $+[2] -
-$-[2])>, C<$3> is the same as C<substr($var, $-[3], $+[3] - $-[3])>, %-
-X<%->, HANDLE->format_name(EXPR), $FORMAT_NAME, $~ X<$~> X<$FORMAT_NAME>,
-HANDLE->format_top_name(EXPR), $FORMAT_TOP_NAME, $^ X<$^>
-X<$FORMAT_TOP_NAME>, IO::Handle->format_line_break_characters EXPR,
-$FORMAT_LINE_BREAK_CHARACTERS, $: X<$:> X<FORMAT_LINE_BREAK_CHARACTERS>,
-IO::Handle->format_formfeed EXPR, $FORMAT_FORMFEED, $^L X<$^L>
-X<$FORMAT_FORMFEED>, $ACCUMULATOR, $^A X<$^A> X<$ACCUMULATOR>,
-$CHILD_ERROR, $? X<$?> X<$CHILD_ERROR>, ${^CHILD_ERROR_NATIVE}
-X<$^CHILD_ERROR_NATIVE>, ${^ENCODING} X<$^ENCODING>, $OS_ERROR, $ERRNO, $!
-X<$!> X<$ERRNO> X<$OS_ERROR>, %OS_ERROR, %ERRNO, %! X<%!>,
-$EXTENDED_OS_ERROR, $^E X<$^E> X<$EXTENDED_OS_ERROR>, $EVAL_ERROR, $@ X<$@>
-X<$EVAL_ERROR>, $PROCESS_ID, $PID, $$ X<$$> X<$PID> X<$PROCESS_ID>,
-$REAL_USER_ID, $UID, $< X<< $< >> X<$UID> X<$REAL_USER_ID>,
-$EFFECTIVE_USER_ID, $EUID, $> X<< $> >> X<$EUID> X<$EFFECTIVE_USER_ID>,
-$REAL_GROUP_ID, $GID, $( X<$(> X<$GID> X<$REAL_GROUP_ID>,
-$EFFECTIVE_GROUP_ID, $EGID, $) X<$)> X<$EGID> X<$EFFECTIVE_GROUP_ID>,
-$PROGRAM_NAME, $0 X<$0> X<$PROGRAM_NAME>, $[ X<$[>, $] X<$]>, $COMPILING,
-$^C X<$^C> X<$COMPILING>, $DEBUGGING, $^D X<$^D> X<$DEBUGGING>,
-${^RE_DEBUG_FLAGS}, ${^RE_TRIE_MAXBUF}, $SYSTEM_FD_MAX, $^F X<$^F>
-X<$SYSTEM_FD_MAX>, $^H, %^H, $INPLACE_EDIT, $^I X<$^I> X<$INPLACE_EDIT>,
-$^M X<$^M>, $OSNAME, $^O X<$^O> X<$OSNAME>, ${^OPEN}, $PERLDB, $^P X<$^P>
-X<$PERLDB>, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200,
-0x400, $LAST_REGEXP_CODE_RESULT, $^R X<$^R> X<$LAST_REGEXP_CODE_RESULT>,
-$EXCEPTIONS_BEING_CAUGHT, $^S X<$^S> X<$EXCEPTIONS_BEING_CAUGHT>,
-$BASETIME, $^T X<$^T> X<$BASETIME>, ${^TAINT}, ${^UNICODE}, ${^UTF8CACHE},
-${^UTF8LOCALE}, $PERL_VERSION, $^V X<$^V> X<$PERL_VERSION>, $WARNING, $^W
-X<$^W> X<$WARNING>, ${^WARNING_BITS}, ${^WIN32_SLOPPY_STAT},
-$EXECUTABLE_NAME, $^X X<$^X> X<$EXECUTABLE_NAME>, ARGV X<ARGV>, $ARGV
-X<$ARGV>, @ARGV X<@ARGV>, ARGVOUT X<ARGVOUT>, @F X<@F>, @INC X<@INC>, @ARG,
- at _ X<@_> X<@ARG>, %INC X<%INC>, %ENV, $ENV{expr} X<%ENV>, %SIG, $SIG{expr}
-X<%SIG>
-
-=item Error Indicators
-X<error> X<exception>
-
-=item Technical Note on the Syntax of Variable Names
-
-=back
-
-=item BUGS
-
-=back
-
-=head2 perlre - Perl regular expressions
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Modifiers
-
-m X</m> X<regex, multiline> X<regexp, multiline> X<regular expression,
-multiline>, s X</s> X<regex, single-line> X<regexp, single-line> X<regular
-expression, single-line>, i X</i> X<regex, case-insensitive> X<regexp,
-case-insensitive> X<regular expression, case-insensitive>, x X</x>, p X</p>
-X<regex, preserve> X<regexp, preserve>, g and c X</g> X</c>
-
-=item Regular Expressions
-
-[1], [2], [3], cntrl X<cntrl>, graph X<graph>, print X<print>, punct
-X<punct>, xdigit X<xdigit>
-
-=item Extended Patterns
-
-C<(?#text)> X<(?#)>, C<(?pimsx-imsx)> X<(?)>, C<(?:pattern)> X<(?:)>,
-C<(?imsx-imsx:pattern)>, C<(?|pattern)> X<(?|)> X<Branch reset>,
-Look-Around Assertions X<look-around assertion> X<lookaround assertion>
-X<look-around> X<lookaround>, C<(?=pattern)> X<(?=)> X<look-ahead,
-positive> X<lookahead, positive>, C<(?!pattern)> X<(?!)> X<look-ahead,
-negative> X<lookahead, negative>, C<(?<=pattern)> C<\K> X<(?<=)>
-X<look-behind, positive> X<lookbehind, positive> X<\K>, C<(?<!pattern)>
-X<(?<!)> X<look-behind, negative> X<lookbehind, negative>,
-C<(?'NAME'pattern)>, C<< (?<NAME>pattern) >> X<< (?<NAME>) >> X<(?'NAME')>
-X<named capture> X<capture>, C<< \k<NAME> >>, C<< \k'NAME' >>, C<(?{ code
-})> X<(?{})> X<regex, code in> X<regexp, code in> X<regular expression,
-code in>, C<(??{ code })> X<(??{})> X<regex, postponed> X<regexp,
-postponed> X<regular expression, postponed>, C<(?PARNO)> C<(?-PARNO)>
-C<(?+PARNO)> C<(?R)> C<(?0)> X<(?PARNO)> X<(?1)> X<(?R)> X<(?0)> X<(?-1)>
-X<(?+1)> X<(?-PARNO)> X<(?+PARNO)> X<regex, recursive> X<regexp, recursive>
-X<regular expression, recursive> X<regex, relative recursion>, C<(?&NAME)>
-X<(?&NAME)>, C<(?(condition)yes-pattern|no-pattern)> X<(?()>,
-C<(?(condition)yes-pattern)>, (1) (2) .., (<NAME>) ('NAME'), (?{ CODE }),
-(R), (R1) (R2) .., (R&NAME), (DEFINE), C<< (?>pattern) >> X<backtrack>
-X<backtracking> X<atomic> X<possessive>
-
-=item Special Backtracking Control Verbs
-
-Verbs that take an argument, C<(*PRUNE)> C<(*PRUNE:NAME)> X<(*PRUNE)>
-X<(*PRUNE:NAME)>, C<(*SKIP)> C<(*SKIP:NAME)> X<(*SKIP)>, C<(*MARK:NAME)>
-C<(*:NAME)> X<(*MARK)> C<(*MARK:NAME)> C<(*:NAME)>, C<(*THEN)>
-C<(*THEN:NAME)>, C<(*COMMIT)> X<(*COMMIT)>, Verbs without an argument,
-C<(*FAIL)> C<(*F)> X<(*FAIL)> X<(*F)>, C<(*ACCEPT)> X<(*ACCEPT)>
-
-=item Backtracking
-X<backtrack> X<backtracking>
-
-=item Version 8 Regular Expressions
-X<regular expression, version 8> X<regex, version 8> X<regexp, version 8>
-
-=item Warning on \1 Instead of $1
-
-=item Repeated Patterns Matching a Zero-length Substring
-
-=item Combining RE Pieces
-
-C<ST>, C<S|T>, C<S{REPEAT_COUNT}>, C<S{min,max}>, C<S{min,max}?>, C<S?>,
-C<S*>, C<S+>, C<S??>, C<S*?>, C<S+?>, C<< (?>S) >>, C<(?=S)>, C<(?<=S)>,
-C<(?!S)>, C<(?<!S)>, C<(??{ EXPR })>, C<(?PARNO)>,
-C<(?(condition)yes-pattern|no-pattern)>
-
-=item Creating Custom RE Engines
-
-=back
-
-=item PCRE/Python Support
-
-C<< (?PE<lt>NAMEE<gt>pattern) >>, C<< (?P=NAME) >>, C<< (?P>NAME) >>
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 perlrebackslash - Perl Regular Expression Backslash Sequences and
-Escapes
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item The backslash
-
-[1]
-
-=item All the sequences and escapes
-
-=item Character Escapes
-
-[1], [2]
-
-=item Modifiers
-
-=item Character classes
-
-=item Referencing
-
-=item Assertions
-
-\A, \z, \Z, \G, \b, \B
-
-=item Misc
-
-\C, \K, \R, \X
-
-=back
-
-=back
-
-=head2 perlrecharclass - Perl Regular Expression Character Classes
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item The dot
-
-=item Backslashed sequences
-
-[1]
-
-=item Bracketed Character Classes
-
-cntrl, graph, print, punct
-
-=item Locale, Unicode and UTF-8
-
-=back
-
-=back
-
-=head2 perlreref - Perl Regular Expressions Reference
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item OPERATORS
-
-=item SYNTAX
-
-=item ESCAPE SEQUENCES
-
-=item CHARACTER CLASSES
-
-=item ANCHORS
-
-=item QUANTIFIERS
-
-=item EXTENDED CONSTRUCTS
-
-=item VARIABLES
-
-=item FUNCTIONS
-
-=item TERMINOLOGY
-
-=back
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=item THANKS
-
-=back
-
-=head2 perlref - Perl references and nested data structures
-
-=over 4
-
-=item NOTE
-
-=item DESCRIPTION
-
-=over 4
-
-=item Making References
-X<reference, creation> X<referencing>
-
-1. X<\> X<backslash>, 2. X<array, anonymous> X<[> X<[]> X<square bracket>
-X<bracket, square> X<arrayref> X<array reference> X<reference, array>, 3.
-X<hash, anonymous> X<{> X<{}> X<curly bracket> X<bracket, curly> X<brace>
-X<hashref> X<hash reference> X<reference, hash>, 4. X<subroutine,
-anonymous> X<subroutine, reference> X<reference, subroutine> X<scope,
-lexical> X<closure> X<lexical> X<lexical scope>, 5. X<constructor> X<new>,
-6. X<autovivification>, 7. X<*foo{THING}> X<*>
-
-=item Using References
-X<reference, use> X<dereferencing> X<dereference>
-
-=item Symbolic references
-X<reference, symbolic> X<reference, soft>
-X<symbolic reference> X<soft reference>
-
-=item Not-so-symbolic references
-
-=item Pseudo-hashes: Using an array as a hash
-X<pseudo-hash> X<pseudo hash> X<pseudohash>
-
-=item Function Templates
-X<scope, lexical> X<closure> X<lexical> X<lexical scope>
-X<subroutine, nested> X<sub, nested> X<subroutine, local> X<sub, local>
-
-=back
-
-=item WARNING
-X<reference, string context> X<reference, use as hash key>
-
-=item SEE ALSO
-
-=back
-
-=head2 perlform - Perl formats
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Text Fields
-X<format, text field>
-
-=item Numeric Fields
-X<#> X<format, numeric field>
-
-=item The Field @* for Variable Width Multi-Line Text
-X<@*>
-
-=item The Field ^* for Variable Width One-line-at-a-time Text
-X<^*>
-
-=item Specifying Values
-X<format, specifying values>
-
-=item Using Fill Mode
-X<format, fill mode>
-
-=item Suppressing Lines Where All Fields Are Void
-X<format, suppressing lines>
-
-=item Repeating Format Lines
-X<format, repeating lines>
-
-=item Top of Form Processing
-X<format, top of form> X<top> X<header>
-
-=item Format Variables
-X<format variables>
-X<format, variables>
-
-=back
-
-=item NOTES
-
-=over 4
-
-=item Footers
-X<format, footer> X<footer>
-
-=item Accessing Formatting Internals
-X<format, internals>
-
-=back
-
-=item WARNINGS
-
-=back
-
-=head2 perlobj - Perl objects
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item An Object is Simply a Reference
-X<object> X<bless> X<constructor> X<new>
-
-=item A Class is Simply a Package
-X<class> X<package> X<@ISA> X<inheritance>
-
-=item A Method is Simply a Subroutine
-X<method>
-
-=item Method Invocation
-X<invocation> X<method> X<arrow> X<< -> >>
-
-=item Indirect Object Syntax
-X<indirect object syntax> X<invocation, indirect> X<indirect>
-
-=item Default UNIVERSAL methods
-X<UNIVERSAL>
-
-isa(CLASS) X<isa>, can(METHOD) X<can>, VERSION( [NEED] ) X<VERSION>
-
-=item Destructors
-X<destructor> X<DESTROY>
-
-=item Summary
-
-=item Two-Phased Garbage Collection
-X<garbage collection> X<GC> X<circular reference>
-X<reference, circular> X<DESTROY> X<destructor>
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 perltie - how to hide an object class in a simple variable
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Tying Scalars
-X<scalar, tying>
-
-TIESCALAR classname, LIST X<TIESCALAR>, FETCH this X<FETCH>, STORE this,
-value X<STORE>, UNTIE this X<UNTIE>, DESTROY this X<DESTROY>
-
-=item Tying Arrays
-X<array, tying>
-
-TIEARRAY classname, LIST X<TIEARRAY>, FETCH this, index X<FETCH>, STORE
-this, index, value X<STORE>, FETCHSIZE this X<FETCHSIZE>, STORESIZE this,
-count X<STORESIZE>, EXTEND this, count X<EXTEND>, EXISTS this, key
-X<EXISTS>, DELETE this, key X<DELETE>, CLEAR this X<CLEAR>, PUSH this, LIST
- X<PUSH>, POP this X<POP>, SHIFT this X<SHIFT>, UNSHIFT this, LIST
-X<UNSHIFT>, SPLICE this, offset, length, LIST X<SPLICE>, UNTIE this
-X<UNTIE>, DESTROY this X<DESTROY>
-
-=item Tying Hashes
-X<hash, tying>
-
-USER, HOME, CLOBBER, LIST, TIEHASH classname, LIST X<TIEHASH>, FETCH this,
-key X<FETCH>, STORE this, key, value X<STORE>, DELETE this, key X<DELETE>,
-CLEAR this X<CLEAR>, EXISTS this, key X<EXISTS>, FIRSTKEY this X<FIRSTKEY>,
-NEXTKEY this, lastkey X<NEXTKEY>, SCALAR this X<SCALAR>, UNTIE this
-X<UNTIE>, DESTROY this X<DESTROY>
-
-=item Tying FileHandles
-X<filehandle, tying>
-
-TIEHANDLE classname, LIST X<TIEHANDLE>, WRITE this, LIST X<WRITE>, PRINT
-this, LIST X<PRINT>, PRINTF this, LIST X<PRINTF>, READ this, LIST X<READ>,
-READLINE this X<READLINE>, GETC this X<GETC>, CLOSE this X<CLOSE>, UNTIE
-this X<UNTIE>, DESTROY this X<DESTROY>
-
-=item UNTIE this
-X<UNTIE>
-
-=item The C<untie> Gotcha
-X<untie>
-
-=back
-
-=item SEE ALSO
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 perldbmfilter - Perl DBM Filters
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-B<filter_store_key>, B<filter_store_value>, B<filter_fetch_key>,
-B<filter_fetch_value>
-
-=over 4
-
-=item The Filter
-
-=item An Example -- the NULL termination problem.
-
-=item Another Example -- Key is a C int.
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 perlipc - Perl interprocess communication (signals, fifos, pipes,
-safe subprocesses, sockets, and semaphores)
-
-=over 4
-
-=item DESCRIPTION
-
-=item Signals
-
-=over 4
-
-=item Handling the SIGHUP Signal in Daemons
-
-=back
-
-=item Named Pipes
-
-=over 4
-
-=item Deferred Signals (Safe Signals)
-
-Long-running opcodes, Interrupting IO, Restartable system calls, Signals as
-"faults", Signals triggered by operating system state
-
-=back
-
-=item Using open() for IPC
-
-=over 4
-
-=item Filehandles
-
-=item Background Processes
-
-=item Complete Dissociation of Child from Parent
-
-=item Safe Pipe Opens
-
-=item Bidirectional Communication with Another Process
-
-=item Bidirectional Communication with Yourself
-
-=back
-
-=item Sockets: Client/Server Communication
-
-=over 4
-
-=item Internet Line Terminators
-
-=item Internet TCP Clients and Servers
-
-=item Unix-Domain TCP Clients and Servers
-
-=back
-
-=item TCP Clients with IO::Socket
-
-=over 4
-
-=item A Simple Client
-
-C<Proto>, C<PeerAddr>, C<PeerPort>
-
-=item A Webget Client
-
-=item Interactive Client with IO::Socket
-
-=back
-
-=item TCP Servers with IO::Socket
-
-Proto, LocalPort, Listen, Reuse
-
-=item UDP: Message Passing
-
-=item SysV IPC
-
-=item NOTES
-
-=item BUGS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 perlfork - Perl's fork() emulation
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Behavior of other Perl features in forked pseudo-processes
-
-$$ or $PROCESS_ID, %ENV, chdir() and all other builtins that accept
-filenames, wait() and waitpid(), kill(), exec(), exit(), Open handles to
-files, directories and network sockets
-
-=item Resource limits
-
-=item Killing the parent process
-
-=item Lifetime of the parent process and pseudo-processes
-
-=item CAVEATS AND LIMITATIONS
-
-BEGIN blocks, Open filehandles, Forking pipe open() not yet implemented,
-Global state maintained by XSUBs, Interpreter embedded in larger
-application, Thread-safety of extensions
-
-=back
-
-=item BUGS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 perlnumber - semantics of numbers and numeric operations in Perl
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Storing numbers
-
-=item Numeric operators and numeric conversions
-
-=item Flavors of Perl numeric operations
-
-Arithmetic operators, ++, Arithmetic operators during C<use integer>, Other
-mathematical operators, Bitwise operators, Bitwise operators during C<use
-integer>, Operators which expect an integer, Operators which expect a
-string
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 perlthrtut - Tutorial on threads in Perl
-
-=over 4
-
-=item DESCRIPTION
-
-=item What Is A Thread Anyway?
-
-=item Threaded Program Models
-
-=over 4
-
-=item Boss/Worker
-
-=item Work Crew
-
-=item Pipeline
-
-=back
-
-=item What kind of threads are Perl threads?
-
-=item Thread-Safe Modules
-
-=item Thread Basics
-
-=over 4
-
-=item Basic Thread Support
-
-=item A Note about the Examples
-
-=item Creating Threads
-
-=item Waiting For A Thread To Exit
-
-=item Ignoring A Thread
-
-=item Process and Thread Termination
-
-=back
-
-=item Threads And Data
-
-=over 4
-
-=item Shared And Unshared Data
-
-=item Thread Pitfalls: Races
-
-=back
-
-=item Synchronization and control
-
-=over 4
-
-=item Controlling access: lock()
-
-=item A Thread Pitfall: Deadlocks
-
-=item Queues: Passing Data Around
-
-=item Semaphores: Synchronizing Data Access
-
-=item Basic semaphores
-
-=item Advanced Semaphores
-
-=item Waiting for a Condition
-
-=item Giving up control
-
-=back
-
-=item General Thread Utility Routines
-
-=over 4
-
-=item What Thread Am I In?
-
-=item Thread IDs
-
-=item Are These Threads The Same?
-
-=item What Threads Are Running?
-
-=back
-
-=item A Complete Example
-
-=item Different implementations of threads
-
-=item Performance considerations
-
-=item Process-scope Changes
-
-=item Thread-Safety of System Libraries
-
-=item Conclusion
-
-=item SEE ALSO
-
-=item Bibliography
-
-=over 4
-
-=item Introductory Texts
-
-=item OS-Related References
-
-=item Other References
-
-=back
-
-=item Acknowledgements
-
-=item AUTHOR
-
-=item Copyrights
-
-=back
-
-=head2 perlothrtut - old tutorial on threads in Perl
-
-=over 4
-
-=item DESCRIPTION
-
-=item What Is A Thread Anyway?
-
-=item Threaded Program Models
-
-=over 4
-
-=item Boss/Worker
-
-=item Work Crew
-
-=item Pipeline
-
-=back
-
-=item Native threads
-
-=item What kind of threads are perl threads?
-
-=item Threadsafe Modules
-
-=item Thread Basics
-
-=over 4
-
-=item Basic Thread Support
-
-=item Creating Threads
-
-=item Giving up control
-
-=item Waiting For A Thread To Exit
-
-=item Errors In Threads
-
-=item Ignoring A Thread
-
-=back
-
-=item Threads And Data
-
-=over 4
-
-=item Shared And Unshared Data
-
-=item Thread Pitfall: Races
-
-=item Controlling access: lock()
-
-=item Thread Pitfall: Deadlocks
-
-=item Queues: Passing Data Around
-
-=back
-
-=item Threads And Code
-
-=over 4
-
-=item Semaphores: Synchronizing Data Access
-
-Basic semaphores, Advanced Semaphores
-
-=item Attributes: Restricting Access To Subroutines
-
-=item Subroutine Locks
-
-=item Methods
-
-=item Locking A Subroutine
-
-=back
-
-=item General Thread Utility Routines
-
-=over 4
-
-=item What Thread Am I In?
-
-=item Thread IDs
-
-=item Are These Threads The Same?
-
-=item What Threads Are Running?
-
-=back
-
-=item A Complete Example
-
-=item Conclusion
-
-=item Bibliography
-
-=over 4
-
-=item Introductory Texts
-
-=item OS-Related References
-
-=item Other References
-
-=back
-
-=item Acknowledgements
-
-=item AUTHOR
-
-=item Copyrights
-
-=back
-
-=head2 perlport - Writing portable Perl
-
-=over 4
-
-=item DESCRIPTION
-
-Not all Perl programs have to be portable, Nearly all of Perl already I<is>
-portable
-
-=item ISSUES
-
-=over 4
-
-=item Newlines
-
-=item Numbers endianness and Width
-
-=item Files and Filesystems
-
-=item System Interaction
-
-=item Command names versus file pathnames
-
-=item Networking
-
-=item Interprocess Communication (IPC)
-
-=item External Subroutines (XS)
-
-=item Standard Modules
-
-=item Time and Date
-
-=item Character sets and character encoding
-
-=item Internationalisation
-
-=item System Resources
-
-=item Security
-
-=item Style
-
-=back
-
-=item CPAN Testers
-
-=item PLATFORMS
-
-=over 4
-
-=item Unix
-
-=item DOS and Derivatives
-
-=item S<Mac OS>
-
-=item VMS
-
-=item VOS
-
-=item EBCDIC Platforms
-
-=item Acorn RISC OS
-
-=item Other perls
-
-=back
-
-=item FUNCTION IMPLEMENTATIONS
-
-=over 4
-
-=item Alphabetical Listing of Perl Functions
-
--I<X>, atan2, binmode, chmod, chown, chroot, crypt, dbmclose, dbmopen,
-dump, exec, exit, fcntl, flock, fork, getlogin, getpgrp, getppid,
-getpriority, getpwnam, getgrnam, getnetbyname, getpwuid, getgrgid,
-getnetbyaddr, getprotobynumber, getservbyport, getpwent, getgrent,
-gethostbyname, gethostent, getnetent, getprotoent, getservent, sethostent,
-setnetent, setprotoent, setservent, endpwent, endgrent, endhostent,
-endnetent, endprotoent, endservent, getsockopt SOCKET,LEVEL,OPTNAME, glob,
-gmtime, ioctl FILEHANDLE,FUNCTION,SCALAR, kill, link, localtime, lstat,
-msgctl, msgget, msgsnd, msgrcv, open, pipe, readlink, rename, select,
-semctl, semget, semop, setgrent, setpgrp, setpriority, setpwent,
-setsockopt, shmctl, shmget, shmread, shmwrite, sockatmark, socketpair,
-stat, symlink, syscall, sysopen, system, times, truncate, umask, utime,
-wait, waitpid
-
-=back
-
-=item Supported Platforms
-
-=item SEE ALSO
-
-=item AUTHORS / CONTRIBUTORS
-
-=back
-
-=head2 perllocale - Perl locale handling (internationalization and
-localization)
-
-=over 4
-
-=item DESCRIPTION
-
-=item PREPARING TO USE LOCALES
-
-=item USING LOCALES
-
-=over 4
-
-=item The use locale pragma
-
-=item The setlocale function
-
-=item Finding locales
-
-=item LOCALE PROBLEMS
-
-=item Temporarily fixing locale problems
-
-=item Permanently fixing locale problems
-
-=item Permanently fixing your system's locale configuration
-
-=item Fixing system locale configuration
-
-=item The localeconv function
-
-=item I18N::Langinfo
-
-=back
-
-=item LOCALE CATEGORIES
-
-=over 4
-
-=item Category LC_COLLATE: Collation
-
-=item Category LC_CTYPE: Character Types
-
-=item Category LC_NUMERIC: Numeric Formatting
-
-=item Category LC_MONETARY: Formatting of monetary amounts
-
-=item LC_TIME
-
-=item Other categories
-
-=back
-
-=item SECURITY
-
-=item ENVIRONMENT
-
-PERL_BADLANG, LC_ALL, LANGUAGE, LC_CTYPE, LC_COLLATE, LC_MONETARY,
-LC_NUMERIC, LC_TIME, LANG
-
-=over 4
-
-=item Examples
-
-=back
-
-=item NOTES
-
-=over 4
-
-=item Backward compatibility
-
-=item I18N:Collate obsolete
-
-=item Sort speed and memory use impacts
-
-=item write() and LC_NUMERIC
-
-=item Freely available locale definitions
-
-=item I18n and l10n
-
-=item An imperfect standard
-
-=back
-
-=item Unicode and UTF-8
-
-=item BUGS
-
-=over 4
-
-=item Broken systems
-
-=back
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 perluniintro - Perl Unicode introduction
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Unicode
-
-=item Perl's Unicode Support
-
-=item Perl's Unicode Model
-
-=item Unicode and EBCDIC
-
-=item Creating Unicode
-
-=item Handling Unicode
-
-=item Legacy Encodings
-
-=item Unicode I/O
-
-=item Displaying Unicode As Text
-
-=item Special Cases
-
-=item Advanced Topics
-
-=item Miscellaneous
-
-=item Questions With Answers
-
-=item Hexadecimal Notation
-
-=item Further Resources
-
-=back
-
-=item UNICODE IN OLDER PERLS
-
-=item SEE ALSO
-
-=item ACKNOWLEDGMENTS
-
-=item AUTHOR, COPYRIGHT, AND LICENSE
-
-=back
-
-=head2 perlunicode - Unicode support in Perl
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Important Caveats
-
-Input and Output Layers, Regular Expressions, C<use utf8> still needed to
-enable UTF-8/UTF-EBCDIC in scripts, BOM-marked scripts and UTF-16 scripts
-autodetected, C<use encoding> needed to upgrade non-Latin-1 byte strings
-
-=item Byte and Character Semantics
-
-=item Effects of Character Semantics
-
-=item Unicode Character Properties
-
-General Category, Bidirectional Character Types, Scripts, Extended property
-classes, Use of "Is" Prefix, Blocks
-
-=item User-Defined Character Properties
-
-=item User-Defined Case Mappings
-
-=item Character Encodings for Input and Output
-
-=item Unicode Regular Expression Support Level
-
-=item Unicode Encodings
-
-=item Security Implications of Unicode
-
-=item Unicode in Perl on EBCDIC
-
-=item Locales
-
-=item When Unicode Does Not Happen
-
-=item Forcing Unicode in Perl (Or Unforcing Unicode in Perl)
-
-=item Using Unicode in XS
-
-=back
-
-=item BUGS
-
-=over 4
-
-=item Interaction with Locales
-
-=item Interaction with Extensions
-
-=item Speed
-
-=item Porting code from perl-5.6.X
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 perlunifaq - Perl Unicode FAQ
-
-=over 4
-
-=item Q and A
-
-=over 4
-
-=item perlunitut isn't really a Unicode tutorial, is it?
-
-=item What character encodings does Perl support?
-
-=item Which version of perl should I use?
-
-=item What about binary data, like images?
-
-=item When should I decode or encode?
-
-=item What if I don't decode?
-
-=item What if I don't encode?
-
-=item Is there a way to automatically decode or encode?
-
-=item What if I don't know which encoding was used?
-
-=item Can I use Unicode in my Perl sources?
-
-=item Data::Dumper doesn't restore the UTF8 flag; is it broken?
-
-=item Why do regex character classes sometimes match only in the ASCII
-range?
-
-=item Why do some characters not uppercase or lowercase correctly?
-
-=item How can I determine if a string is a text string or a binary string?
-
-=item How do I convert from encoding FOO to encoding BAR?
-
-=item What are C<decode_utf8> and C<encode_utf8>?
-
-=item What is a "wide character"?
-
-=back
-
-=item INTERNALS
-
-=over 4
-
-=item What is "the UTF8 flag"?
-
-=item What about the C<use bytes> pragma?
-
-=item What about the C<use encoding> pragma?
-
-=item What is the difference between C<:encoding> and C<:utf8>?
-
-=item What's the difference between C<UTF-8> and C<utf8>?
-
-=item I lost track; what encoding is the internal format really?
-
-=back
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 perlunitut - Perl Unicode Tutorial
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Definitions
-
-=item Your new toolkit
-
-=item I/O flow (the actual 5 minute tutorial)
-
-=back
-
-=item SUMMARY
-
-=item Q and A (or FAQ)
-
-=item ACKNOWLEDGEMENTS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 perlebcdic - Considerations for running Perl on EBCDIC platforms
-
-=over 4
-
-=item DESCRIPTION
-
-=item COMMON CHARACTER CODE SETS
-
-=over 4
-
-=item ASCII
-
-=item ISO 8859
-
-=item Latin 1 (ISO 8859-1)
-
-=item EBCDIC
-
-=item 13 variant characters
-
-=item 0037
-
-=item 1047
-
-=item POSIX-BC
-
-=item Unicode code points versus EBCDIC code points
-
-=item Remaining Perl Unicode problems in EBCDIC
-
-=item Unicode and UTF
-
-=item Using Encode
-
-=back
-
-=item SINGLE OCTET TABLES
-
-recipe 0, recipe 1, recipe 2, recipe 3, recipe 4, recipe 5, recipe 6
-
-=item IDENTIFYING CHARACTER CODE SETS
-
-=item CONVERSIONS
-
-=over 4
-
-=item tr///
-
-=item iconv
-
-=item C RTL
-
-=back
-
-=item OPERATOR DIFFERENCES
-
-=item FUNCTION DIFFERENCES
-
-chr(), ord(), pack(), print(), printf(), sort(), sprintf(), unpack()
-
-=item REGULAR EXPRESSION DIFFERENCES
-
-=item SOCKETS
-
-=item SORTING
-
-=over 4
-
-=item Ignore ASCII vs. EBCDIC sort differences.
-
-=item MONO CASE then sort data.
-
-=item Convert, sort data, then re convert.
-
-=item Perform sorting on one type of machine only.
-
-=back
-
-=item TRANSFORMATION FORMATS
-
-=over 4
-
-=item URL decoding and encoding
-
-=item uu encoding and decoding
-
-=item Quoted-Printable encoding and decoding
-
-=item Caesarian ciphers
-
-=back
-
-=item Hashing order and checksums
-
-=item I18N AND L10N
-
-=item MULTI OCTET CHARACTER SETS
-
-=item OS ISSUES
-
-=over 4
-
-=item OS/400
-
-PASE, IFS access
-
-=item OS/390, z/OS
-
-chcp, dataset access, OS/390, z/OS iconv, locales
-
-=item VM/ESA?
-
-=item POSIX-BC?
-
-=back
-
-=item BUGS
-
-=item SEE ALSO
-
-=item REFERENCES
-
-=item HISTORY
-
-=item AUTHOR
-
-=back
-
-=head2 perlsec - Perl security
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Laundering and Detecting Tainted Data
-
-=item Switches On the "#!" Line
-
-=item Taint mode and @INC
-
-=item Cleaning Up Your Path
-
-=item Security Bugs
-
-=item Protecting Your Programs
-
-=item Unicode
-
-=item Algorithmic Complexity Attacks
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 perlmod - Perl modules (packages and symbol tables)
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Packages
-X<package> X<namespace> X<variable, global> X<global variable> X<global>
-
-=item Symbol Tables
-X<symbol table> X<stash> X<%::> X<%main::> X<typeglob> X<glob> X<alias>
-
-=item BEGIN, UNITCHECK, CHECK, INIT and END
-X<BEGIN> X<UNITCHECK> X<CHECK> X<INIT> X<END>
-
-=item Perl Classes
-X<class> X<@ISA>
-
-=item Perl Modules
-X<module>
-
-=item Making your module threadsafe
-X<threadsafe> X<thread safe>
-X<module, threadsafe> X<module, thread safe>
-X<CLONE> X<CLONE_SKIP> X<thread> X<threads> X<ithread>
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 perlmodlib - constructing new Perl modules and finding existing ones
-
-=over 4
-
-=item THE PERL MODULE LIBRARY
-
-=over 4
-
-=item Pragmatic Modules
-
-attributes, attrs, autouse, base, bigint, bignum, bigrat, blib, bytes,
-charnames, constant, diagnostics, encoding, encoding::warnings, feature,
-fields, filetest, if, integer, less, lib, locale, mro, open, ops, overload,
-re, sigtrap, sort, strict, subs, threads, threads::shared, utf8, vars,
-version, vmsish, warnings, warnings::register
-
-=item Standard Modules
-
-AnyDBM_File, Archive::Extract, Archive::Tar, Archive::Tar::File,
-Attribute::Handlers, AutoLoader, AutoSplit, B, B::Concise, B::Debug,
-B::Deparse, B::Lint, B::Showlex, B::Terse, B::Xref, Benchmark, CGI,
-CGI::Apache, CGI::Carp, CGI::Cookie, CGI::Fast, CGI::Pretty, CGI::Push,
-CGI::Switch, CGI::Util, CORE, CPAN, CPAN::API::HOWTO, CPAN::FirstTime,
-CPAN::Kwalify, CPAN::Nox, CPAN::Version, CPANPLUS, CPANPLUS::Dist::Base,
-CPANPLUS::Dist::Sample, CPANPLUS::Shell::Classic,
-CPANPLUS::Shell::Default::Plugins::HOWTO, Carp, Carp::Heavy, Class::ISA,
-Class::Struct, Compress::Raw::Zlib, Compress::Zlib, Config, Cwd, DB,
-DBM_Filter, DBM_Filter::compress, DBM_Filter::encode, DBM_Filter::int32,
-DBM_Filter::null, DBM_Filter::utf8, DB_File, Data::Dumper, Devel::DProf,
-Devel::InnerPackage, Devel::Peek, Devel::SelfStubber, Digest, Digest::MD5,
-Digest::SHA, Digest::base, Digest::file, DirHandle, Dumpvalue, DynaLoader,
-Encode, Encode::Alias, Encode::Byte, Encode::CJKConstants, Encode::CN,
-Encode::CN::HZ, Encode::Config, Encode::EBCDIC, Encode::Encoder,
-Encode::Encoding, Encode::GSM0338, Encode::Guess, Encode::JP,
-Encode::JP::H2Z, Encode::JP::JIS7, Encode::KR, Encode::KR::2022_KR,
-Encode::MIME::Header, Encode::MIME::Name, Encode::PerlIO,
-Encode::Supported, Encode::Symbol, Encode::TW, Encode::Unicode,
-Encode::Unicode::UTF7, English, Env, Errno, Exporter, Exporter::Heavy,
-ExtUtils::CBuilder, ExtUtils::CBuilder::Platform::Windows,
-ExtUtils::Command, ExtUtils::Command::MM, ExtUtils::Constant,
-ExtUtils::Constant::Base, ExtUtils::Constant::Utils,
-ExtUtils::Constant::XS, ExtUtils::Embed, ExtUtils::Install,
-ExtUtils::Installed, ExtUtils::Liblist, ExtUtils::MM, ExtUtils::MM_AIX,
-ExtUtils::MM_Any, ExtUtils::MM_BeOS, ExtUtils::MM_Cygwin, ExtUtils::MM_DOS,
-ExtUtils::MM_MacOS, ExtUtils::MM_NW5, ExtUtils::MM_OS2, ExtUtils::MM_QNX,
-ExtUtils::MM_UWIN, ExtUtils::MM_Unix, ExtUtils::MM_VMS, ExtUtils::MM_VOS,
-ExtUtils::MM_Win32, ExtUtils::MM_Win95, ExtUtils::MY, ExtUtils::MakeMaker,
-ExtUtils::MakeMaker::Config, ExtUtils::MakeMaker::FAQ,
-ExtUtils::MakeMaker::Tutorial, ExtUtils::MakeMaker::bytes,
-ExtUtils::MakeMaker::vmsish, ExtUtils::Manifest, ExtUtils::Mkbootstrap,
-ExtUtils::Mksymlists, ExtUtils::Packlist, ExtUtils::ParseXS,
-ExtUtils::testlib, Fatal, Fcntl, File::Basename, File::CheckTree,
-File::Compare, File::Copy, File::DosGlob, File::Fetch, File::Find,
-File::Glob, File::GlobMapper, File::Path, File::Spec, File::Spec::Cygwin,
-File::Spec::Epoc, File::Spec::Functions, File::Spec::Mac, File::Spec::OS2,
-File::Spec::Unix, File::Spec::VMS, File::Spec::Win32, File::Temp,
-File::stat, FileCache, FileHandle, Filter::Simple, Filter::Util::Call,
-FindBin, GDBM_File, Getopt::Long, Getopt::Std, Hash::Util,
-Hash::Util::FieldHash, I18N::Collate, I18N::LangTags,
-I18N::LangTags::Detect, I18N::LangTags::List, I18N::Langinfo, IO,
-IO::Compress::Base, IO::Compress::Deflate, IO::Compress::Gzip,
-IO::Compress::RawDeflate, IO::Compress::Zip, IO::Dir, IO::File, IO::Handle,
-IO::Pipe, IO::Poll, IO::Seekable, IO::Select, IO::Socket, IO::Socket::INET,
-IO::Socket::UNIX, IO::Uncompress::AnyInflate,
-IO::Uncompress::AnyUncompress, IO::Uncompress::Base,
-IO::Uncompress::Gunzip, IO::Uncompress::Inflate,
-IO::Uncompress::RawInflate, IO::Uncompress::Unzip, IO::Zlib, IPC::Cmd,
-IPC::Open2, IPC::Open3, IPC::SysV, IPC::SysV::Msg, IPC::SysV::Semaphore,
-List::Util, Locale::Constants, Locale::Country, Locale::Currency,
-Locale::Language, Locale::Maketext, Locale::Maketext::Simple,
-Locale::Maketext::TPJ13, Locale::Script, Log::Message,
-Log::Message::Config, Log::Message::Handlers, Log::Message::Item,
-MIME::Base64, MIME::QuotedPrint, Math::BigFloat, Math::BigInt,
-Math::BigInt::Calc, Math::BigInt::CalcEmu, Math::BigInt::FastCalc,
-Math::BigRat, Math::Complex, Math::Trig, Memoize, Memoize::AnyDBM_File,
-Memoize::Expire, Memoize::ExpireFile, Memoize::ExpireTest,
-Memoize::NDBM_File, Memoize::SDBM_File, Memoize::Storable, Module::Build,
-Module::Build::API, Module::Build::Authoring, Module::Build::Base,
-Module::Build::Compat, Module::Build::ConfigData, Module::Build::Cookbook,
-Module::Build::ModuleInfo, Module::Build::Notes, Module::Build::PPMMaker,
-Module::Build::Platform::Amiga, Module::Build::Platform::Default,
-Module::Build::Platform::EBCDIC, Module::Build::Platform::MPEiX,
-Module::Build::Platform::MacOS, Module::Build::Platform::RiscOS,
-Module::Build::Platform::Unix, Module::Build::Platform::VMS,
-Module::Build::Platform::VOS, Module::Build::Platform::Windows,
-Module::Build::Platform::aix, Module::Build::Platform::cygwin,
-Module::Build::Platform::darwin, Module::Build::Platform::os2,
-Module::Build::YAML, Module::CoreList, Module::Load,
-Module::Load::Conditional, Module::Loaded, Module::Pluggable,
-Module::Pluggable::Object, NDBM_File, NEXT, Net::Cmd, Net::Config,
-Net::Domain, Net::FTP, Net::NNTP, Net::Netrc, Net::POP3, Net::Ping,
-Net::SMTP, Net::Time, Net::hostent, Net::libnetFAQ, Net::netent,
-Net::protoent, Net::servent, O, ODBM_File, Opcode, POSIX,
-Package::Constants, Params::Check, PerlIO, PerlIO::encoding,
-PerlIO::scalar, PerlIO::via, PerlIO::via::QuotedPrint, Pod::Checker,
-Pod::Escapes, Pod::Find, Pod::Functions, Pod::Html, Pod::InputObjects,
-Pod::LaTeX, Pod::Man, Pod::ParseLink, Pod::ParseUtils, Pod::Parser,
-Pod::Perldoc::ToChecker, Pod::Perldoc::ToMan, Pod::Perldoc::ToNroff,
-Pod::Perldoc::ToPod, Pod::Perldoc::ToRtf, Pod::Perldoc::ToText,
-Pod::Perldoc::ToTk, Pod::Perldoc::ToXml, Pod::PlainText, Pod::Plainer,
-Pod::Select, Pod::Simple, Pod::Simple::Checker, Pod::Simple::Debug,
-Pod::Simple::DumpAsText, Pod::Simple::DumpAsXML, Pod::Simple::HTML,
-Pod::Simple::HTMLBatch, Pod::Simple::LinkSection, Pod::Simple::Methody,
-Pod::Simple::PullParser, Pod::Simple::PullParserEndToken,
-Pod::Simple::PullParserStartToken, Pod::Simple::PullParserTextToken,
-Pod::Simple::PullParserToken, Pod::Simple::RTF, Pod::Simple::Search,
-Pod::Simple::SimpleTree, Pod::Simple::Subclassing, Pod::Simple::Text,
-Pod::Simple::TextContent, Pod::Simple::XMLOutStream, Pod::Text,
-Pod::Text::Color, Pod::Text::Overstrike, Pod::Text::Termcap, Pod::Usage,
-SDBM_File, Safe, Scalar::Util, Search::Dict, SelectSaver, SelfLoader,
-Shell, Socket, Storable, Switch, Symbol, Sys::Hostname, Sys::Syslog,
-Sys::Syslog::win32::Win32, Term::ANSIColor, Term::Cap, Term::Complete,
-Term::ReadLine, Term::UI, Test, Test::Builder, Test::Builder::Module,
-Test::Builder::Tester, Test::Builder::Tester::Color, Test::Harness,
-Test::Harness::Assert, Test::Harness::Iterator, Test::Harness::Point,
-Test::Harness::Results, Test::Harness::Straps, Test::Harness::TAP,
-Test::Harness::Util, Test::More, Test::Simple, Test::Tutorial,
-Text::Abbrev, Text::Balanced, Text::ParseWords, Text::Soundex, Text::Tabs,
-Text::Wrap, Thread, Thread::Queue, Thread::Semaphore, Tie::Array,
-Tie::File, Tie::Handle, Tie::Hash, Tie::Hash::NamedCapture, Tie::Memoize,
-Tie::RefHash, Tie::Scalar, Tie::SubstrHash, Time::HiRes, Time::Local,
-Time::Piece, Time::Piece::Seconds, Time::gmtime, Time::localtime, Time::tm,
-UNIVERSAL, Unicode::Collate, Unicode::Normalize, Unicode::UCD, User::grent,
-User::pwent, Win32, Win32API::File, Win32CORE, XS::APItest, XS::Typemap,
-XSLoader
-
-=item Extension Modules
-
-=back
-
-=item CPAN
-
-=over 4
-
-=item Africa
-
-South Africa
-
-=item Asia
-
-China, Indonesia, Israel, Japan, Malaysia, Russian Federation, Saudi
-Arabia, Singapore, South Korea, Taiwan, Thailand
-
-=item Central America
-
-Costa Rica
-
-=item Europe
-
-Austria, Belgium, Bosnia and Herzegovina, Bulgaria, Croatia, Czech
-Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary,
-Iceland, Ireland, Italy, Latvia, Lithuania, Netherlands, Norway, Poland,
-Portugal, Romania, Russia, Slovakia, Slovenia, Spain, Sweden, Switzerland,
-Turkey, Ukraine, United Kingdom
-
-=item North America
-
-Canada, Alberta, Manitoba, Nova Scotia, Ontario, Mexico, United States,
-Alabama, California, Colorado, Delaware, District of Columbia, Florida,
-Indiana, Kentucky, Massachusetts, Michigan, Nevada, New Jersey, New York,
-North Carolina, Oklahoma, Oregon, Pennsylvania, Tennessee, Texas, Utah,
-Virginia, Washington, Wisconsin
-
-=item Oceania
-
-Australia, New Zealand, United States
-
-=item South America
-
-Argentina, Brazil, Chile
-
-=item RSYNC Mirrors
-
-=back
-
-=item Modules: Creation, Use, and Abuse
-
-=over 4
-
-=item Guidelines for Module Creation
-
-=item Guidelines for Converting Perl 4 Library Scripts into Modules
-
-=item Guidelines for Reusing Application Code
-
-=back
-
-=item NOTE
-
-=back
-
-=head2 perlmodstyle - Perl module style guide
-
-=over 4
-
-=item INTRODUCTION
-
-=item QUICK CHECKLIST
-
-=over 4
-
-=item Before you start
-
-=item The API
-
-=item Stability
-
-=item Documentation
-
-=item Release considerations
-
-=back
-
-=item BEFORE YOU START WRITING A MODULE
-
-=over 4
-
-=item Has it been done before?
-
-=item Do one thing and do it well
-
-=item What's in a name?
-
-=back
-
-=item DESIGNING AND WRITING YOUR MODULE
-
-=over 4
-
-=item To OO or not to OO?
-
-=item Designing your API
-
-Write simple routines to do simple things, Separate functionality from
-output, Provide sensible shortcuts and defaults, Naming conventions,
-Parameter passing
-
-=item Strictness and warnings
-
-=item Backwards compatibility
-
-=item Error handling and messages
-
-=back
-
-=item DOCUMENTING YOUR MODULE
-
-=over 4
-
-=item POD
-
-=item README, INSTALL, release notes, changelogs
-
-perl Makefile.PL, make, make test, make install, perl Build.PL, perl Build,
-perl Build test, perl Build install
-
-=back
-
-=item RELEASE CONSIDERATIONS
-
-=over 4
-
-=item Version numbering
-
-=item Pre-requisites
-
-=item Testing
-
-=item Packaging
-
-=item Licensing
-
-=back
-
-=item COMMON PITFALLS
-
-=over 4
-
-=item Reinventing the wheel
-
-=item Trying to do too much
-
-=item Inappropriate documentation
-
-=back
-
-=item SEE ALSO
-
-L<perlstyle>, L<perlnewmod>, L<perlpod>, L<podchecker>, Packaging Tools,
-Testing tools, http://pause.perl.org/, Any good book on software
-engineering
-
-=item AUTHOR
-
-=back
-
-=head2 perlmodinstall - Installing CPAN Modules
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item PREAMBLE
-
-B<DECOMPRESS> the file, B<UNPACK> the file into a directory, B<BUILD> the
-module (sometimes unnecessary), B<INSTALL> the module
-
-=back
-
-=item PORTABILITY
-
-=item HEY
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 perlnewmod - preparing a new module for distribution
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Warning
-
-=item What should I make into a module?
-
-=item Step-by-step: Preparing the ground
-
-Look around, Check it's new, Discuss the need, Choose a name, Check again
-
-=item Step-by-step: Making the module
-
-Start with F<module-starter> or F<h2xs>, Use L<strict|strict> and
-L<warnings|warnings>, Use L<Carp|Carp>, Use L<Exporter|Exporter> - wisely!,
-Use L<plain old documentation|perlpod>, Write tests, Write the README
-
-=item Step-by-step: Distributing your module
-
-Get a CPAN user ID, C<perl Makefile.PL; make test; make dist>, Upload the
-tarball, Announce to the modules list, Announce to clpa, Fix bugs!
-
-=back
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 perlpragma - how to write a user pragma
-
-=over 4
-
-=item DESCRIPTION
-
-=item A basic example
-
-=item Implementation details
-
-=back
-
-=head2 perlutil - utilities packaged with the Perl distribution
-
-=over 4
-
-=item DESCRIPTION
-
-=item LIST OF UTILITIES
-
-=over 4
-
-=item Documentation
-
-L<perldoc|perldoc>, L<pod2man|pod2man> and L<pod2text|pod2text>,
-L<pod2html|pod2html> and L<pod2latex|pod2latex>, L<pod2usage|pod2usage>,
-L<podselect|podselect>, L<podchecker|podchecker>, L<splain|splain>,
-L<roffitall|roffitall>
-
-=item Convertors
-
-L<a2p|a2p>, L<s2p|s2p> and L<psed>, L<find2perl|find2perl>
-
-=item Administration
-
-L<config_data|config_data>, L<libnetcfg|libnetcfg>, L<perlivp>
-
-=item Development
-
-L<perlbug|perlbug>, L<h2ph|h2ph>, L<c2ph|c2ph> and L<pstruct|pstruct>,
-L<h2xs|h2xs>, L<enc2xs>, L<xsubpp>, L<dprofpp|dprofpp>, L<prove>,
-L<corelist>
-
-=item General tools
-
-L<piconv>, L<ptar>, L<ptardiff>, L<shasum>
-
-=item Installation
-
-L<cpan>, L<cpanp>, L<cpan2dist>, L<instmodsh>
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 perlcompile - Introduction to the Perl Compiler-Translator
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Layout
-
-B::Lint, B::Deparse, B::Xref
-
-=back
-
-=item Using The Back Ends
-
-=over 4
-
-=item The Cross Referencing Back End
-
-i, &, s, r
-
-=item The Decompiling Back End
-
-=item The Lint Back End
-
-=back
-
-=item Module List for the Compiler Suite
-
-B, O, B::Concise, B::Debug, B::Deparse, B::Lint, B::Showlex, B::Terse,
-B::Xref
-
-=item KNOWN PROBLEMS
-
-=item AUTHOR
-
-=back
-
-=head2 perlfilter - Source Filters
-
-=over 4
-
-=item DESCRIPTION
-
-=item CONCEPTS
-
-=item USING FILTERS
-
-=item WRITING A SOURCE FILTER
-
-=item WRITING A SOURCE FILTER IN C
-
-B<Decryption Filters>
-
-=item CREATING A SOURCE FILTER AS A SEPARATE EXECUTABLE
-
-=item WRITING A SOURCE FILTER IN PERL
-
-=item USING CONTEXT: THE DEBUG FILTER
-
-=item CONCLUSION
-
-=item THINGS TO LOOK OUT FOR
-
-Some Filters Clobber the C<DATA> Handle
-
-=item REQUIREMENTS
-
-=item AUTHOR
-
-=item Copyrights
-
-=back
-
-=head2 perlglossary - Perl Glossary
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item A
-
-accessor methods, actual arguments, address operator, algorithm, alias,
-alternatives, anonymous, architecture, argument, ARGV, arithmetical
-operator, array, array context, ASCII, assertion, assignment, assignment
-operator, associative array, associativity, asynchronous, atom, atomic
-operation, attribute, autogeneration, autoincrement, autoload, autosplit,
-autovivification, AV, awk
-
-=item B
-
-backreference, backtracking, backward compatibility, bareword, base class,
-big-endian, binary, binary operator, bind, bit, bit shift, bit string,
-bless, block, BLOCK, block buffering, Boolean, Boolean context, breakpoint,
-broadcast, BSD, bucket, buffer, built-in, bundle, byte, bytecode
-
-=item C
-
-C, C preprocessor, call by reference, call by value, callback, canonical,
-capturing, character, character class, character property, circumfix
-operator, class, class method, client, cloister, closure, cluster, CODE,
-code generator, code subpattern, collating sequence, command, command
-buffering, command name, command-line arguments, comment, compilation unit,
-compile phase, compile time, compiler, composer, concatenation,
-conditional, connection, construct, constructor, context, continuation,
-core dump, CPAN, cracker, current package, current working directory,
-currently selected output channel, CV
-
-=item D
-
-dangling statement, data structure, data type, datagram, DBM, declaration,
-decrement, default, defined, delimiter, deprecated modules and features,
-dereference, derived class, descriptor, destroy, destructor, device,
-directive, directory, directory handle, dispatch, distribution, (to be)
-dropped modules, dweomer, dwimmer, dynamic scoping
-
-=item E
-
-eclectic, element, embedding, empty subclass test, en passant,
-encapsulation, endian, environment, environment variable, EOF, errno,
-error, escape sequence, exception, exception handling, exec, executable
-file, execute, execute bit, exit status, export, expression, extension
-
-=item F
-
-false, FAQ, fatal error, field, FIFO, file, file descriptor, file test
-operator, fileglob, filehandle, filename, filesystem, filter, flag,
-floating point, flush, FMTEYEWTK, fork, formal arguments, format, freely
-available, freely redistributable, freeware, function, funny character,
-garbage collection
-
-=item G
-
-GID, glob, global, global destruction, glue language, granularity, greedy,
-grep, group, GV
-
-=item H
-
-hacker, handler, hard reference, hash, hash table, header file, here
-document, hexadecimal, home directory, host, hubris, HV
-
-=item I
-
-identifier, impatience, implementation, import, increment, indexing,
-indirect filehandle, indirect object, indirect object slot, indirection,
-infix, inheritance, instance, instance variable, integer, interface,
-interpolation, interpreter, invocant, invocation, I/O, IO, IP, IPC, is-a,
-iteration, iterator, IV
-
-=item J
-
-JAPH
-
-=item K
-
-key, keyword
-
-=item L
-
-label, laziness, left shift, leftmost longest, lexeme, lexer, lexical
-analysis, lexical scoping, lexical variable, library, LIFO, line, line
-buffering, line number, link, LIST, list, list context, list operator, list
-value, literal, little-endian, local, logical operator, lookahead,
-lookbehind, loop, loop control statement, loop label, lvaluable, lvalue,
-lvalue modifier
-
-=item M
-
-magic, magical increment, magical variables, Makefile, man, manpage,
-matching, member data, memory, metacharacter, metasymbol, method,
-minimalism, mode, modifier, module, modulus, monger, mortal,
-multidimensional array, multiple inheritance
-
-=item N
-
-named pipe, namespace, network address, newline, NFS, null character, null
-list, null string, numeric context, NV, nybble
-
-=item O
-
-object, octal, offset, one-liner, open source software, operand, operating
-system, operator, operator overloading, options, overloading, overriding,
-owner
-
-=item P
-
-package, pad, parameter, parent class, parse tree, parsing, patch, PATH,
-pathname, pattern, pattern matching, permission bits, Pern, pipe, pipeline,
-platform, pod, pointer, polymorphism, port, portable, porter, POSIX,
-postfix, pp, pragma, precedence, prefix, preprocessing, procedure, process,
-program generator, progressive matching, property, protocol, prototype,
-pseudofunction, pseudohash, pseudoliteral, public domain, pumpkin,
-pumpking, PV
-
-=item Q
-
-qualified, quantifier
-
-=item R
-
-readable, reaping, record, recursion, reference, referent, regex, regular
-expression, regular expression modifier, regular file, relational operator,
-reserved words, return value, RFC, right shift, root, RTFM, run phase, run
-time, run-time pattern, RV, rvalue
-
-=item S
-
-scalar, scalar context, scalar literal, scalar value, scalar variable,
-scope, scratchpad, script, script kiddie, sed, semaphore, separator,
-serialization, server, service, setgid, setuid, shared memory, shebang,
-shell, side effects, signal, signal handler, single inheritance, slice,
-slurp, socket, soft reference, source filter, stack, standard, standard
-error, standard I/O, standard input, standard output, stat structure,
-statement, statement modifier, static, static method, static scoping,
-static variable, status, STDERR, STDIN, STDIO, STDOUT, stream, string,
-string context, stringification, struct, structure, subclass, subpattern,
-subroutine, subscript, substitution, substring, superclass, superuser, SV,
-switch, switch cluster, switch statement, symbol, symbol table, symbolic
-debugger, symbolic link, symbolic reference, synchronous, syntactic sugar,
-syntax, syntax tree, syscall
-
-=item T
-
-tainted, TCP, term, terminator, ternary, text, thread, tie, TMTOWTDI,
-token, tokener, tokenizing, toolbox approach, transliterate, trigger,
-trinary, troff, true, truncating, type, type casting, typed lexical,
-typedef, typeglob, typemap
-
-=item U
-
-UDP, UID, umask, unary operator, Unicode, Unix
-
-=item V
-
-value, variable, variable interpolation, variadic, vector, virtual, void
-context, v-string
-
-=item W
-
-warning, watch expression, whitespace, word, working directory, wrapper,
-WYSIWYG
-
-=item X
-
-XS, XSUB
-
-=item Y
-
-yacc
-
-=item Z
-
-zero width, zombie
-
-=back
-
-=item AUTHOR AND COPYRIGHT
-
-=back
-
-=head2 perlembed - how to embed perl in your C program
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item PREAMBLE
-
-B<Use C from Perl?>, B<Use a Unix program from Perl?>, B<Use Perl from
-Perl?>, B<Use C from C?>, B<Use Perl from C?>
-
-=item ROADMAP
-
-=item Compiling your C program
-
-=item Adding a Perl interpreter to your C program
-
-=item Calling a Perl subroutine from your C program
-
-=item Evaluating a Perl statement from your C program
-
-=item Performing Perl pattern matches and substitutions from your C program
-
-=item Fiddling with the Perl stack from your C program
-
-=item Maintaining a persistent interpreter
-
-=item Execution of END blocks
-
-=item $0 assignments
-
-=item Maintaining multiple interpreter instances
-
-=item Using Perl modules, which themselves use C libraries, from your C
-program
-
-=back
-
-=item Embedding Perl under Win32
-
-=item Hiding Perl_
-
-=item MORAL
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 perldebguts - Guts of Perl debugging
-
-=over 4
-
-=item DESCRIPTION
-
-=item Debugger Internals
-
-=over 4
-
-=item Writing Your Own Debugger
-
-=back
-
-=item Frame Listing Output Examples
-
-=item Debugging regular expressions
-
-=over 4
-
-=item Compile-time output
-
-C<anchored> I<STRING> C<at> I<POS>, C<floating> I<STRING> C<at>
-I<POS1..POS2>, C<matching floating/anchored>, C<minlen>, C<stclass>
-I<TYPE>, C<noscan>, C<isall>, C<GPOS>, C<plus>, C<implicit>, C<with eval>,
-C<anchored(TYPE)>
-
-=item Types of nodes
-
-=item Run-time output
-
-=back
-
-=item Debugging Perl memory usage
-
-=over 4
-
-=item Using C<$ENV{PERL_DEBUG_MSTATS}>
-
-C<buckets SMALLEST(APPROX)..GREATEST(APPROX)>, Free/Used, C<Total sbrk():
-SBRKed/SBRKs:CONTINUOUS>, C<pad: 0>, C<heads: 2192>, C<chain: 0>, C<tail:
-6144>
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 perlxstut, perlXStut - Tutorial for writing XSUBs
-
-=over 4
-
-=item DESCRIPTION
-
-=item SPECIAL NOTES
-
-=over 4
-
-=item make
-
-=item Version caveat
-
-=item Dynamic Loading versus Static Loading
-
-=back
-
-=item TUTORIAL
-
-=over 4
-
-=item EXAMPLE 1
-
-=item EXAMPLE 2
-
-=item What has gone on?
-
-=item Writing good test scripts
-
-=item EXAMPLE 3
-
-=item What's new here?
-
-=item Input and Output Parameters
-
-=item The XSUBPP Program
-
-=item The TYPEMAP file
-
-=item Warning about Output Arguments
-
-=item EXAMPLE 4
-
-=item What has happened here?
-
-=item Anatomy of .xs file
-
-=item Getting the fat out of XSUBs
-
-=item More about XSUB arguments
-
-=item The Argument Stack
-
-=item Extending your Extension
-
-=item Documenting your Extension
-
-=item Installing your Extension
-
-=item EXAMPLE 5
-
-=item New Things in this Example
-
-=item EXAMPLE 6
-
-=item New Things in this Example
-
-=item EXAMPLE 7 (Coming Soon)
-
-=item EXAMPLE 8 (Coming Soon)
-
-=item EXAMPLE 9 Passing open files to XSes
-
-=item Troubleshooting these Examples
-
-=back
-
-=item See also
-
-=item Author
-
-=over 4
-
-=item Last Changed
-
-=back
-
-=back
-
-=head2 perlxs - XS language reference manual
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Introduction
-
-=item On The Road
-
-=item The Anatomy of an XSUB
-
-=item The Argument Stack
-
-=item The RETVAL Variable
-
-=item Returning SVs, AVs and HVs through RETVAL
-
-=item The MODULE Keyword
-
-=item The PACKAGE Keyword
-
-=item The PREFIX Keyword
-
-=item The OUTPUT: Keyword
-
-=item The NO_OUTPUT Keyword
-
-=item The CODE: Keyword
-
-=item The INIT: Keyword
-
-=item The NO_INIT Keyword
-
-=item Initializing Function Parameters
-
-=item Default Parameter Values
-
-=item The PREINIT: Keyword
-
-=item The SCOPE: Keyword
-
-=item The INPUT: Keyword
-
-=item The IN/OUTLIST/IN_OUTLIST/OUT/IN_OUT Keywords
-
-=item The C<length(NAME)> Keyword
-
-=item Variable-length Parameter Lists
-
-=item The C_ARGS: Keyword
-
-=item The PPCODE: Keyword
-
-=item Returning Undef And Empty Lists
-
-=item The REQUIRE: Keyword
-
-=item The CLEANUP: Keyword
-
-=item The POSTCALL: Keyword
-
-=item The BOOT: Keyword
-
-=item The VERSIONCHECK: Keyword
-
-=item The PROTOTYPES: Keyword
-
-=item The PROTOTYPE: Keyword
-
-=item The ALIAS: Keyword
-
-=item The OVERLOAD: Keyword
-
-=item The FALLBACK: Keyword
-
-=item The INTERFACE: Keyword
-
-=item The INTERFACE_MACRO: Keyword
-
-=item The INCLUDE: Keyword
-
-=item The CASE: Keyword
-
-=item The & Unary Operator
-
-=item Inserting POD, Comments and C Preprocessor Directives
-
-=item Using XS With C++
-
-=item Interface Strategy
-
-=item Perl Objects And C Structures
-
-=item The Typemap
-
-=item Safely Storing Static Data in XS
-
-MY_CXT_KEY, typedef my_cxt_t, START_MY_CXT, MY_CXT_INIT, dMY_CXT, MY_CXT,
-aMY_CXT/pMY_CXT, MY_CXT_CLONE, MY_CXT_INIT_INTERP(my_perl),
-dMY_CXT_INTERP(my_perl)
-
-=item Thread-aware system interfaces
-
-=back
-
-=item EXAMPLES
-
-=item XS VERSION
-
-=item AUTHOR
-
-=back
-
-=head2 perlclib - Internal replacements for standard C library functions
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Conventions
-
-C<t>, C<p>, C<n>, C<s>
-
-=item File Operations
-
-=item File Input and Output
-
-=item File Positioning
-
-=item Memory Management and String Handling
-
-=item Character Class Tests
-
-=item F<stdlib.h> functions
-
-=item Miscellaneous functions
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 perlguts - Introduction to the Perl API
-
-=over 4
-
-=item DESCRIPTION
-
-=item Variables
-
-=over 4
-
-=item Datatypes
-
-=item What is an "IV"?
-
-=item Working with SVs
-
-=item Offsets
-
-=item What's Really Stored in an SV?
-
-=item Working with AVs
-
-=item Working with HVs
-
-=item Hash API Extensions
-
-=item AVs, HVs and undefined values
-
-=item References
-
-=item Blessed References and Class Objects
-
-=item Creating New Variables
-
-GV_ADDMULTI, GV_ADDWARN
-
-=item Reference Counts and Mortality
-
-=item Stashes and Globs
-
-=item Double-Typed SVs
-
-=item Magic Variables
-
-=item Assigning Magic
-
-=item Magic Virtual Tables
-
-=item Finding Magic
-
-=item Understanding the Magic of Tied Hashes and Arrays
-
-=item Localizing changes
-
-C<SAVEINT(int i)>, C<SAVEIV(IV i)>, C<SAVEI32(I32 i)>, C<SAVELONG(long i)>,
-C<SAVESPTR(s)>, C<SAVEPPTR(p)>, C<SAVEFREESV(SV *sv)>, C<SAVEMORTALIZESV(SV
-*sv)>, C<SAVEFREEOP(OP *op)>, C<SAVEFREEPV(p)>, C<SAVECLEARSV(SV *sv)>,
-C<SAVEDELETE(HV *hv, char *key, I32 length)>,
-C<SAVEDESTRUCTOR(DESTRUCTORFUNC_NOCONTEXT_t f, void *p)>,
-C<SAVEDESTRUCTOR_X(DESTRUCTORFUNC_t f, void *p)>, C<SAVESTACK_POS()>, C<SV*
-save_scalar(GV *gv)>, C<AV* save_ary(GV *gv)>, C<HV* save_hash(GV *gv)>,
-C<void save_item(SV *item)>, C<void save_list(SV **sarg, I32 maxsarg)>,
-C<SV* save_svref(SV **sptr)>, C<void save_aptr(AV **aptr)>, C<void
-save_hptr(HV **hptr)>
-
-=back
-
-=item Subroutines
-
-=over 4
-
-=item XSUBs and the Argument Stack
-
-=item Calling Perl Routines from within C Programs
-
-=item Memory Allocation
-
-=item PerlIO
-
-=item Putting a C value on Perl stack
-
-=item Scratchpads
-
-=item Scratchpads and recursion
-
-=back
-
-=item Compiled code
-
-=over 4
-
-=item Code tree
-
-=item Examining the tree
-
-=item Compile pass 1: check routines
-
-=item Compile pass 1a: constant folding
-
-=item Compile pass 2: context propagation
-
-=item Compile pass 3: peephole optimization
-
-=item Pluggable runops
-
-=back
-
-=item Examining internal data structures with the C<dump> functions
-
-=item How multiple interpreters and concurrency are supported
-
-=over 4
-
-=item Background and PERL_IMPLICIT_CONTEXT
-
-=item So what happened to dTHR?
-
-=item How do I use all this in extensions?
-
-=item Should I do anything special if I call perl from multiple threads?
-
-=item Future Plans and PERL_IMPLICIT_SYS
-
-=back
-
-=item Internal Functions
-
-A, p, d, s, n, r, f, M, o, x, m, X, E, b, others
-
-=over 4
-
-=item Formatted Printing of IVs, UVs, and NVs
-
-=item Pointer-To-Integer and Integer-To-Pointer
-
-=item Exception Handling
-
-=item Source Documentation
-
-=item Backwards compatibility
-
-=back
-
-=item Unicode Support
-
-=over 4
-
-=item What B<is> Unicode, anyway?
-
-=item How can I recognise a UTF-8 string?
-
-=item How does UTF-8 represent Unicode characters?
-
-=item How does Perl store UTF-8 strings?
-
-=item How do I convert a string to UTF-8?
-
-=item Is there anything else I need to know?
-
-=back
-
-=item Custom Operators
-
-=item AUTHORS
-
-=item SEE ALSO
-
-=back
-
-=head2 perlcall - Perl calling conventions from C
-
-=over 4
-
-=item DESCRIPTION
-
-An Error Handler, An Event Driven Program
-
-=item THE CALL_ FUNCTIONS
-
-call_sv, call_pv, call_method, call_argv
-
-=item FLAG VALUES
-
-=over 4
-
-=item G_VOID
-
-=item G_SCALAR
-
-=item G_ARRAY
-
-=item G_DISCARD
-
-=item G_NOARGS
-
-=item G_EVAL
-
-=item G_KEEPERR
-
-=item Determining the Context
-
-=back
-
-=item EXAMPLES
-
-=over 4
-
-=item No Parameters, Nothing returned
-
-=item Passing Parameters
-
-=item Returning a Scalar
-
-=item Returning a list of values
-
-=item Returning a list in a scalar context
-
-=item Returning Data from Perl via the parameter list
-
-=item Using G_EVAL
-
-=item Using G_KEEPERR
-
-=item Using call_sv
-
-=item Using call_argv
-
-=item Using call_method
-
-=item Using GIMME_V
-
-=item Using Perl to dispose of temporaries
-
-=item Strategies for storing Callback Context Information
-
-1. Ignore the problem - Allow only 1 callback, 2. Create a sequence of
-callbacks - hard wired limit, 3. Use a parameter to map to the Perl
-callback
-
-=item Alternate Stack Manipulation
-
-=item Creating and calling an anonymous subroutine in C
-
-=back
-
-=item LIGHTWEIGHT CALLBACKS
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item DATE
-
-=back
-
-=head2 perlreapi - perl regular expression plugin interface
-
-=over 4
-
-=item DESCRIPTION
-
-=item Callbacks
-
-=over 4
-
-=item comp
-
-C</m> - RXf_PMf_MULTILINE, C</s> - RXf_PMf_SINGLELINE, C</i> -
-RXf_PMf_FOLD, C</x> - RXf_PMf_EXTENDED, C</p> - RXf_PMf_KEEPCOPY,
-RXf_PMf_LOCALE, RXf_UTF8, RXf_SPLIT, RXf_SKIPWHITE, RXf_START_ONLY,
-RXf_WHITE, RXf_NULL
-
-=item exec
-
-=item intuit
-
-=item checkstr
-
-=item free
-
-=item Numbered capture callbacks
-
-=item Named capture callbacks
-
-=item qr_package
-
-=item dupe
-
-=back
-
-=item The REGEXP structure
-
-=over 4
-
-=item C<engine>
-
-=item C<mother_re>
-
-=item C<extflags>
-
-=item C<minlen> C<minlenret>
-
-=item C<gofs>
-
-=item C<substrs>
-
-=item C<nparens>, C<lasparen>, and C<lastcloseparen>
-
-=item C<intflags>
-
-=item C<pprivate>
-
-=item C<swap>
-
-=item C<offs>
-
-=item C<precomp> C<prelen>
-
-=item C<paren_names>
-
-=item C<substrs>
-
-=item C<subbeg> C<sublen> C<saved_copy>
-
-=item C<wrapped> C<wraplen>
-
-=item C<seen_evals>
-
-=item C<refcnt>
-
-=back
-
-=item HISTORY
-
-=item AUTHORS
-
-=item LICENSE
-
-=back
-
-=head2 perlreguts - Description of the Perl regular expression engine.
-
-=over 4
-
-=item DESCRIPTION
-
-=item OVERVIEW
-
-=over 4
-
-=item A quick note on terms
-
-=item What is a regular expression engine?
-
-=item Structure of a Regexp Program
-
-C<regnode_1>, C<regnode_2>, C<regnode_string>, C<regnode_charclass>,
-C<regnode_charclass_class>
-
-=back
-
-=item Process Overview
-
-A. Compilation, 1. Parsing for size, 2. Parsing for construction, 3.
-Peep-hole optimisation and analysis, B. Execution, 4. Start position and
-no-match optimisations, 5. Program execution
-
-=over 4
-
-=item Compilation
-
-anchored fixed strings, floating fixed strings, minimum and maximum length
-requirements, start class, Beginning/End of line positions
-
-=item Execution
-
-=back
-
-=item MISCELLANEOUS
-
-=over 4
-
-=item Unicode and Localisation Support
-
-=item Base Structures
-
-C<swap>, C<offsets>, C<regstclass>, C<data>, C<program>
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item LICENCE
-
-=item REFERENCES
-
-=back
-
-=head2 perlapi - autogenerated documentation for the perl public API
-
-=over 4
-
-=item DESCRIPTION
-X<Perl API> X<API> X<api>
-
-=item "Gimme" Values
-
-GIMME X<GIMME>, GIMME_V X<GIMME_V>, G_ARRAY X<G_ARRAY>, G_DISCARD
-X<G_DISCARD>, G_EVAL X<G_EVAL>, G_NOARGS X<G_NOARGS>, G_SCALAR X<G_SCALAR>,
-G_VOID X<G_VOID>
-
-=item Array Manipulation Functions
-
-AvFILL X<AvFILL>, av_clear X<av_clear>, av_create_and_push
-X<av_create_and_push>, av_create_and_unshift_one
-X<av_create_and_unshift_one>, av_delete X<av_delete>, av_exists
-X<av_exists>, av_extend X<av_extend>, av_fetch X<av_fetch>, av_fill
-X<av_fill>, av_len X<av_len>, av_make X<av_make>, av_pop X<av_pop>, av_push
-X<av_push>, av_shift X<av_shift>, av_store X<av_store>, av_undef
-X<av_undef>, av_unshift X<av_unshift>, get_av X<get_av>, newAV X<newAV>,
-sortsv X<sortsv>, sortsv_flags X<sortsv_flags>
-
-=item Callback Functions
-
-call_argv X<call_argv>, call_method X<call_method>, call_pv X<call_pv>,
-call_sv X<call_sv>, ENTER X<ENTER>, eval_pv X<eval_pv>, eval_sv X<eval_sv>,
-FREETMPS X<FREETMPS>, LEAVE X<LEAVE>, SAVETMPS X<SAVETMPS>
-
-=item Character classes
-
-isALNUM X<isALNUM>, isALPHA X<isALPHA>, isDIGIT X<isDIGIT>, isLOWER
-X<isLOWER>, isSPACE X<isSPACE>, isUPPER X<isUPPER>, toLOWER X<toLOWER>,
-toUPPER X<toUPPER>
-
-=item Cloning an interpreter
-
-perl_clone X<perl_clone>
-
-=item CV Manipulation Functions
-
-CvSTASH X<CvSTASH>, get_cv X<get_cv>, get_cvn_flags X<get_cvn_flags>
-
-=item Embedding Functions
-
-cv_undef X<cv_undef>, load_module X<load_module>, nothreadhook
-X<nothreadhook>, perl_alloc X<perl_alloc>, perl_construct
-X<perl_construct>, perl_destruct X<perl_destruct>, perl_free X<perl_free>,
-perl_parse X<perl_parse>, perl_run X<perl_run>, require_pv X<require_pv>
-
-=item Functions in file dump.c
-
-pv_display X<pv_display>, pv_escape X<pv_escape>, pv_pretty X<pv_pretty>
-
-=item Functions in file mathoms.c
-
-gv_fetchmethod X<gv_fetchmethod>, pack_cat X<pack_cat>, sv_2pvbyte_nolen
-X<sv_2pvbyte_nolen>, sv_2pvutf8_nolen X<sv_2pvutf8_nolen>, sv_2pv_nolen
-X<sv_2pv_nolen>, sv_catpvn_mg X<sv_catpvn_mg>, sv_catsv_mg X<sv_catsv_mg>,
-sv_force_normal X<sv_force_normal>, sv_iv X<sv_iv>, sv_nolocking
-X<sv_nolocking>, sv_nounlocking X<sv_nounlocking>, sv_nv X<sv_nv>, sv_pv
-X<sv_pv>, sv_pvbyte X<sv_pvbyte>, sv_pvbyten X<sv_pvbyten>, sv_pvn
-X<sv_pvn>, sv_pvutf8 X<sv_pvutf8>, sv_pvutf8n X<sv_pvutf8n>, sv_taint
-X<sv_taint>, sv_unref X<sv_unref>, sv_usepvn X<sv_usepvn>, sv_usepvn_mg
-X<sv_usepvn_mg>, sv_uv X<sv_uv>, unpack_str X<unpack_str>
-
-=item Functions in file pp_ctl.c
-
-find_runcv X<find_runcv>
-
-=item Functions in file pp_pack.c
-
-packlist X<packlist>, unpackstring X<unpackstring>
-
-=item GV Functions
-
-GvSV X<GvSV>, gv_const_sv X<gv_const_sv>, gv_fetchmeth X<gv_fetchmeth>,
-gv_fetchmethod_autoload X<gv_fetchmethod_autoload>, gv_fetchmeth_autoload
-X<gv_fetchmeth_autoload>, gv_stashpv X<gv_stashpv>, gv_stashpvn
-X<gv_stashpvn>, gv_stashpvs X<gv_stashpvs>, gv_stashsv X<gv_stashsv>
-
-=item Handy Values
-
-Nullav X<Nullav>, Nullch X<Nullch>, Nullcv X<Nullcv>, Nullhv X<Nullhv>,
-Nullsv X<Nullsv>
-
-=item Hash Manipulation Functions
-
-get_hv X<get_hv>, HEf_SVKEY X<HEf_SVKEY>, HeHASH X<HeHASH>, HeKEY X<HeKEY>,
-HeKLEN X<HeKLEN>, HePV X<HePV>, HeSVKEY X<HeSVKEY>, HeSVKEY_force
-X<HeSVKEY_force>, HeSVKEY_set X<HeSVKEY_set>, HeVAL X<HeVAL>, HvNAME
-X<HvNAME>, hv_assert X<hv_assert>, hv_clear X<hv_clear>,
-hv_clear_placeholders X<hv_clear_placeholders>, hv_delete X<hv_delete>,
-hv_delete_ent X<hv_delete_ent>, hv_exists X<hv_exists>, hv_exists_ent
-X<hv_exists_ent>, hv_fetch X<hv_fetch>, hv_fetchs X<hv_fetchs>,
-hv_fetch_ent X<hv_fetch_ent>, hv_iterinit X<hv_iterinit>, hv_iterkey
-X<hv_iterkey>, hv_iterkeysv X<hv_iterkeysv>, hv_iternext X<hv_iternext>,
-hv_iternextsv X<hv_iternextsv>, hv_iternext_flags X<hv_iternext_flags>,
-hv_iterval X<hv_iterval>, hv_magic X<hv_magic>, hv_scalar X<hv_scalar>,
-hv_store X<hv_store>, hv_stores X<hv_stores>, hv_store_ent X<hv_store_ent>,
-hv_undef X<hv_undef>, newHV X<newHV>
-
-=item Magical Functions
-
-mg_clear X<mg_clear>, mg_copy X<mg_copy>, mg_find X<mg_find>, mg_free
-X<mg_free>, mg_get X<mg_get>, mg_length X<mg_length>, mg_magical
-X<mg_magical>, mg_set X<mg_set>, SvGETMAGIC X<SvGETMAGIC>, SvLOCK
-X<SvLOCK>, SvSETMAGIC X<SvSETMAGIC>, SvSetMagicSV X<SvSetMagicSV>,
-SvSetMagicSV_nosteal X<SvSetMagicSV_nosteal>, SvSetSV X<SvSetSV>,
-SvSetSV_nosteal X<SvSetSV_nosteal>, SvSHARE X<SvSHARE>, SvUNLOCK
-X<SvUNLOCK>
-
-=item Memory Management
-
-Copy X<Copy>, CopyD X<CopyD>, Move X<Move>, MoveD X<MoveD>, Newx X<Newx>,
-Newxc X<Newxc>, Newxz X<Newxz>, Poison X<Poison>, PoisonFree X<PoisonFree>,
-PoisonNew X<PoisonNew>, PoisonWith X<PoisonWith>, Renew X<Renew>, Renewc
-X<Renewc>, Safefree X<Safefree>, savepv X<savepv>, savepvn X<savepvn>,
-savepvs X<savepvs>, savesharedpv X<savesharedpv>, savesharedpvn
-X<savesharedpvn>, savesvpv X<savesvpv>, StructCopy X<StructCopy>, Zero
-X<Zero>, ZeroD X<ZeroD>
-
-=item Miscellaneous Functions
-
-fbm_compile X<fbm_compile>, fbm_instr X<fbm_instr>, form X<form>, getcwd_sv
-X<getcwd_sv>, my_snprintf X<my_snprintf>, my_sprintf X<my_sprintf>,
-my_vsnprintf X<my_vsnprintf>, new_version X<new_version>, scan_version
-X<scan_version>, strEQ X<strEQ>, strGE X<strGE>, strGT X<strGT>, strLE
-X<strLE>, strLT X<strLT>, strNE X<strNE>, strnEQ X<strnEQ>, strnNE
-X<strnNE>, sv_destroyable X<sv_destroyable>, sv_nosharing X<sv_nosharing>,
-upg_version X<upg_version>, vcmp X<vcmp>, vnormal X<vnormal>, vnumify
-X<vnumify>, vstringify X<vstringify>, vverify X<vverify>
-
-=item MRO Functions
-
-mro_get_linear_isa X<mro_get_linear_isa>, mro_method_changed_in
-X<mro_method_changed_in>
-
-=item Multicall Functions
-
-dMULTICALL X<dMULTICALL>, MULTICALL X<MULTICALL>, POP_MULTICALL
-X<POP_MULTICALL>, PUSH_MULTICALL X<PUSH_MULTICALL>
-
-=item Numeric functions
-
-grok_bin X<grok_bin>, grok_hex X<grok_hex>, grok_number X<grok_number>,
-grok_numeric_radix X<grok_numeric_radix>, grok_oct X<grok_oct>,
-Perl_signbit X<Perl_signbit>, scan_bin X<scan_bin>, scan_hex X<scan_hex>,
-scan_oct X<scan_oct>
-
-=item Optree Manipulation Functions
-
-cv_const_sv X<cv_const_sv>, newCONSTSUB X<newCONSTSUB>, newXS X<newXS>
-
-=item Pad Data Structures
-
-pad_sv X<pad_sv>
-
-=item Per-Interpreter Variables
-
-PL_modglobal X<PL_modglobal>, PL_na X<PL_na>, PL_sv_no X<PL_sv_no>,
-PL_sv_undef X<PL_sv_undef>, PL_sv_yes X<PL_sv_yes>
-
-=item REGEXP Functions
-
-SvRX X<SvRX>, SvRXOK X<SvRXOK>
-
-=item Simple Exception Handling Macros
-
-dXCPT X<dXCPT>, XCPT_CATCH X<XCPT_CATCH>, XCPT_RETHROW X<XCPT_RETHROW>,
-XCPT_TRY_END X<XCPT_TRY_END>, XCPT_TRY_START X<XCPT_TRY_START>
-
-=item Stack Manipulation Macros
-
-dMARK X<dMARK>, dORIGMARK X<dORIGMARK>, dSP X<dSP>, EXTEND X<EXTEND>, MARK
-X<MARK>, mPUSHi X<mPUSHi>, mPUSHn X<mPUSHn>, mPUSHp X<mPUSHp>, mPUSHu
-X<mPUSHu>, mXPUSHi X<mXPUSHi>, mXPUSHn X<mXPUSHn>, mXPUSHp X<mXPUSHp>,
-mXPUSHu X<mXPUSHu>, ORIGMARK X<ORIGMARK>, POPi X<POPi>, POPl X<POPl>, POPn
-X<POPn>, POPp X<POPp>, POPpbytex X<POPpbytex>, POPpx X<POPpx>, POPs
-X<POPs>, PUSHi X<PUSHi>, PUSHMARK X<PUSHMARK>, PUSHmortal X<PUSHmortal>,
-PUSHn X<PUSHn>, PUSHp X<PUSHp>, PUSHs X<PUSHs>, PUSHu X<PUSHu>, PUTBACK
-X<PUTBACK>, SP X<SP>, SPAGAIN X<SPAGAIN>, XPUSHi X<XPUSHi>, XPUSHmortal
-X<XPUSHmortal>, XPUSHn X<XPUSHn>, XPUSHp X<XPUSHp>, XPUSHs X<XPUSHs>,
-XPUSHu X<XPUSHu>, XSRETURN X<XSRETURN>, XSRETURN_EMPTY X<XSRETURN_EMPTY>,
-XSRETURN_IV X<XSRETURN_IV>, XSRETURN_NO X<XSRETURN_NO>, XSRETURN_NV
-X<XSRETURN_NV>, XSRETURN_PV X<XSRETURN_PV>, XSRETURN_UNDEF
-X<XSRETURN_UNDEF>, XSRETURN_UV X<XSRETURN_UV>, XSRETURN_YES
-X<XSRETURN_YES>, XST_mIV X<XST_mIV>, XST_mNO X<XST_mNO>, XST_mNV
-X<XST_mNV>, XST_mPV X<XST_mPV>, XST_mUNDEF X<XST_mUNDEF>, XST_mYES
-X<XST_mYES>
-
-=item SV Flags
-
-svtype X<svtype>, SVt_IV X<SVt_IV>, SVt_NV X<SVt_NV>, SVt_PV X<SVt_PV>,
-SVt_PVAV X<SVt_PVAV>, SVt_PVCV X<SVt_PVCV>, SVt_PVHV X<SVt_PVHV>, SVt_PVMG
-X<SVt_PVMG>
-
-=item SV Manipulation Functions
-
-get_sv X<get_sv>, newRV_inc X<newRV_inc>, SvCUR X<SvCUR>, SvCUR_set
-X<SvCUR_set>, SvEND X<SvEND>, SvGAMAGIC X<SvGAMAGIC>, SvGROW X<SvGROW>,
-SvIOK X<SvIOK>, SvIOKp X<SvIOKp>, SvIOK_notUV X<SvIOK_notUV>, SvIOK_off
-X<SvIOK_off>, SvIOK_on X<SvIOK_on>, SvIOK_only X<SvIOK_only>, SvIOK_only_UV
-X<SvIOK_only_UV>, SvIOK_UV X<SvIOK_UV>, SvIsCOW X<SvIsCOW>,
-SvIsCOW_shared_hash X<SvIsCOW_shared_hash>, SvIV X<SvIV>, SvIVX X<SvIVX>,
-SvIVx X<SvIVx>, SvIV_nomg X<SvIV_nomg>, SvIV_set X<SvIV_set>, SvLEN
-X<SvLEN>, SvLEN_set X<SvLEN_set>, SvMAGIC_set X<SvMAGIC_set>, SvNIOK
-X<SvNIOK>, SvNIOKp X<SvNIOKp>, SvNIOK_off X<SvNIOK_off>, SvNOK X<SvNOK>,
-SvNOKp X<SvNOKp>, SvNOK_off X<SvNOK_off>, SvNOK_on X<SvNOK_on>, SvNOK_only
-X<SvNOK_only>, SvNV X<SvNV>, SvNVX X<SvNVX>, SvNVx X<SvNVx>, SvNV_set
-X<SvNV_set>, SvOK X<SvOK>, SvOOK X<SvOOK>, SvPOK X<SvPOK>, SvPOKp
-X<SvPOKp>, SvPOK_off X<SvPOK_off>, SvPOK_on X<SvPOK_on>, SvPOK_only
-X<SvPOK_only>, SvPOK_only_UTF8 X<SvPOK_only_UTF8>, SvPV X<SvPV>, SvPVbyte
-X<SvPVbyte>, SvPVbytex X<SvPVbytex>, SvPVbytex_force X<SvPVbytex_force>,
-SvPVbyte_force X<SvPVbyte_force>, SvPVbyte_nolen X<SvPVbyte_nolen>,
-SvPVutf8 X<SvPVutf8>, SvPVutf8x X<SvPVutf8x>, SvPVutf8x_force
-X<SvPVutf8x_force>, SvPVutf8_force X<SvPVutf8_force>, SvPVutf8_nolen
-X<SvPVutf8_nolen>, SvPVX X<SvPVX>, SvPVx X<SvPVx>, SvPV_force
-X<SvPV_force>, SvPV_force_nomg X<SvPV_force_nomg>, SvPV_nolen
-X<SvPV_nolen>, SvPV_nomg X<SvPV_nomg>, SvPV_set X<SvPV_set>, SvREFCNT
-X<SvREFCNT>, SvREFCNT_dec X<SvREFCNT_dec>, SvREFCNT_inc X<SvREFCNT_inc>,
-SvREFCNT_inc_NN X<SvREFCNT_inc_NN>, SvREFCNT_inc_simple
-X<SvREFCNT_inc_simple>, SvREFCNT_inc_simple_NN X<SvREFCNT_inc_simple_NN>,
-SvREFCNT_inc_simple_void X<SvREFCNT_inc_simple_void>,
-SvREFCNT_inc_simple_void_NN X<SvREFCNT_inc_simple_void_NN>,
-SvREFCNT_inc_void X<SvREFCNT_inc_void>, SvREFCNT_inc_void_NN
-X<SvREFCNT_inc_void_NN>, SvROK X<SvROK>, SvROK_off X<SvROK_off>, SvROK_on
-X<SvROK_on>, SvRV X<SvRV>, SvRV_set X<SvRV_set>, SvSTASH X<SvSTASH>,
-SvSTASH_set X<SvSTASH_set>, SvTAINT X<SvTAINT>, SvTAINTED X<SvTAINTED>,
-SvTAINTED_off X<SvTAINTED_off>, SvTAINTED_on X<SvTAINTED_on>, SvTRUE
-X<SvTRUE>, SvTYPE X<SvTYPE>, SvUOK X<SvUOK>, SvUPGRADE X<SvUPGRADE>, SvUTF8
-X<SvUTF8>, SvUTF8_off X<SvUTF8_off>, SvUTF8_on X<SvUTF8_on>, SvUV X<SvUV>,
-SvUVX X<SvUVX>, SvUVx X<SvUVx>, SvUV_nomg X<SvUV_nomg>, SvUV_set
-X<SvUV_set>, SvVOK X<SvVOK>, sv_catpvn_nomg X<sv_catpvn_nomg>,
-sv_catsv_nomg X<sv_catsv_nomg>, sv_derived_from X<sv_derived_from>, sv_does
-X<sv_does>, sv_report_used X<sv_report_used>, sv_setsv_nomg
-X<sv_setsv_nomg>
-
-=item SV-Body Allocation
-
-looks_like_number X<looks_like_number>, newRV_noinc X<newRV_noinc>, newSV
-X<newSV>, newSVhek X<newSVhek>, newSViv X<newSViv>, newSVnv X<newSVnv>,
-newSVpv X<newSVpv>, newSVpvf X<newSVpvf>, newSVpvn X<newSVpvn>,
-newSVpvn_share X<newSVpvn_share>, newSVpvs X<newSVpvs>, newSVpvs_share
-X<newSVpvs_share>, newSVrv X<newSVrv>, newSVsv X<newSVsv>, newSVuv
-X<newSVuv>, newSV_type X<newSV_type>, sv_2bool X<sv_2bool>, sv_2cv
-X<sv_2cv>, sv_2io X<sv_2io>, sv_2iv_flags X<sv_2iv_flags>, sv_2mortal
-X<sv_2mortal>, sv_2nv X<sv_2nv>, sv_2pvbyte X<sv_2pvbyte>, sv_2pvutf8
-X<sv_2pvutf8>, sv_2pv_flags X<sv_2pv_flags>, sv_2uv_flags X<sv_2uv_flags>,
-sv_backoff X<sv_backoff>, sv_bless X<sv_bless>, sv_catpv X<sv_catpv>,
-sv_catpvf X<sv_catpvf>, sv_catpvf_mg X<sv_catpvf_mg>, sv_catpvn
-X<sv_catpvn>, sv_catpvn_flags X<sv_catpvn_flags>, sv_catpvs X<sv_catpvs>,
-sv_catpv_mg X<sv_catpv_mg>, sv_catsv X<sv_catsv>, sv_catsv_flags
-X<sv_catsv_flags>, sv_chop X<sv_chop>, sv_clear X<sv_clear>, sv_cmp
-X<sv_cmp>, sv_cmp_locale X<sv_cmp_locale>, sv_collxfrm X<sv_collxfrm>,
-sv_copypv X<sv_copypv>, sv_dec X<sv_dec>, sv_eq X<sv_eq>,
-sv_force_normal_flags X<sv_force_normal_flags>, sv_free X<sv_free>, sv_gets
-X<sv_gets>, sv_grow X<sv_grow>, sv_inc X<sv_inc>, sv_insert X<sv_insert>,
-sv_isa X<sv_isa>, sv_isobject X<sv_isobject>, sv_len X<sv_len>, sv_len_utf8
-X<sv_len_utf8>, sv_magic X<sv_magic>, sv_magicext X<sv_magicext>,
-sv_mortalcopy X<sv_mortalcopy>, sv_newmortal X<sv_newmortal>, sv_newref
-X<sv_newref>, sv_pos_b2u X<sv_pos_b2u>, sv_pos_u2b X<sv_pos_u2b>,
-sv_pvbyten_force X<sv_pvbyten_force>, sv_pvn_force X<sv_pvn_force>,
-sv_pvn_force_flags X<sv_pvn_force_flags>, sv_pvutf8n_force
-X<sv_pvutf8n_force>, sv_reftype X<sv_reftype>, sv_replace X<sv_replace>,
-sv_reset X<sv_reset>, sv_rvweaken X<sv_rvweaken>, sv_setiv X<sv_setiv>,
-sv_setiv_mg X<sv_setiv_mg>, sv_setnv X<sv_setnv>, sv_setnv_mg
-X<sv_setnv_mg>, sv_setpv X<sv_setpv>, sv_setpvf X<sv_setpvf>, sv_setpvf_mg
-X<sv_setpvf_mg>, sv_setpviv X<sv_setpviv>, sv_setpviv_mg X<sv_setpviv_mg>,
-sv_setpvn X<sv_setpvn>, sv_setpvn_mg X<sv_setpvn_mg>, sv_setpvs
-X<sv_setpvs>, sv_setpv_mg X<sv_setpv_mg>, sv_setref_iv X<sv_setref_iv>,
-sv_setref_nv X<sv_setref_nv>, sv_setref_pv X<sv_setref_pv>, sv_setref_pvn
-X<sv_setref_pvn>, sv_setref_uv X<sv_setref_uv>, sv_setsv X<sv_setsv>,
-sv_setsv_flags X<sv_setsv_flags>, sv_setsv_mg X<sv_setsv_mg>, sv_setuv
-X<sv_setuv>, sv_setuv_mg X<sv_setuv_mg>, sv_tainted X<sv_tainted>, sv_true
-X<sv_true>, sv_unmagic X<sv_unmagic>, sv_unref_flags X<sv_unref_flags>,
-sv_untaint X<sv_untaint>, sv_upgrade X<sv_upgrade>, sv_usepvn_flags
-X<sv_usepvn_flags>, sv_utf8_decode X<sv_utf8_decode>, sv_utf8_downgrade
-X<sv_utf8_downgrade>, sv_utf8_encode X<sv_utf8_encode>, sv_utf8_upgrade
-X<sv_utf8_upgrade>, sv_utf8_upgrade_flags X<sv_utf8_upgrade_flags>,
-sv_vcatpvf X<sv_vcatpvf>, sv_vcatpvfn X<sv_vcatpvfn>, sv_vcatpvf_mg
-X<sv_vcatpvf_mg>, sv_vsetpvf X<sv_vsetpvf>, sv_vsetpvfn X<sv_vsetpvfn>,
-sv_vsetpvf_mg X<sv_vsetpvf_mg>
-
-=item Unicode Support
-
-bytes_from_utf8 X<bytes_from_utf8>, bytes_to_utf8 X<bytes_to_utf8>,
-ibcmp_utf8 X<ibcmp_utf8>, is_utf8_char X<is_utf8_char>, is_utf8_string
-X<is_utf8_string>, is_utf8_string_loc X<is_utf8_string_loc>,
-is_utf8_string_loclen X<is_utf8_string_loclen>, pv_uni_display
-X<pv_uni_display>, sv_cat_decode X<sv_cat_decode>, sv_recode_to_utf8
-X<sv_recode_to_utf8>, sv_uni_display X<sv_uni_display>, to_utf8_case
-X<to_utf8_case>, to_utf8_fold X<to_utf8_fold>, to_utf8_lower
-X<to_utf8_lower>, to_utf8_title X<to_utf8_title>, to_utf8_upper
-X<to_utf8_upper>, utf8n_to_uvchr X<utf8n_to_uvchr>, utf8n_to_uvuni
-X<utf8n_to_uvuni>, utf8_distance X<utf8_distance>, utf8_hop X<utf8_hop>,
-utf8_length X<utf8_length>, utf8_to_bytes X<utf8_to_bytes>, utf8_to_uvchr
-X<utf8_to_uvchr>, utf8_to_uvuni X<utf8_to_uvuni>, uvchr_to_utf8
-X<uvchr_to_utf8>, uvuni_to_utf8_flags X<uvuni_to_utf8_flags>
-
-=item Variables created by C<xsubpp> and C<xsubpp> internal functions
-
-ax X<ax>, CLASS X<CLASS>, dAX X<dAX>, dAXMARK X<dAXMARK>, dITEMS X<dITEMS>,
-dUNDERBAR X<dUNDERBAR>, dXSARGS X<dXSARGS>, dXSI32 X<dXSI32>, items
-X<items>, ix X<ix>, newXSproto X<newXSproto>, RETVAL X<RETVAL>, ST X<ST>,
-THIS X<THIS>, UNDERBAR X<UNDERBAR>, XS X<XS>, XS_VERSION X<XS_VERSION>,
-XS_VERSION_BOOTCHECK X<XS_VERSION_BOOTCHECK>
-
-=item Warning and Dieing
-
-croak X<croak>, warn X<warn>
-
-=item AUTHORS
-
-=item SEE ALSO
-
-=back
-
-=head2 perlintern - autogenerated documentation of purely B<internal>
- Perl functions
-
-=over 4
-
-=item DESCRIPTION
-X<internal Perl functions> X<interpreter functions>
-
-=item CV reference counts and CvOUTSIDE
-
-CvWEAKOUTSIDE X<CvWEAKOUTSIDE>
-
-=item Functions in file pad.h
-
-CX_CURPAD_SAVE X<CX_CURPAD_SAVE>, CX_CURPAD_SV X<CX_CURPAD_SV>, PAD_BASE_SV
-X<PAD_BASE_SV>, PAD_CLONE_VARS X<PAD_CLONE_VARS>, PAD_COMPNAME_FLAGS
-X<PAD_COMPNAME_FLAGS>, PAD_COMPNAME_GEN X<PAD_COMPNAME_GEN>,
-PAD_COMPNAME_GEN_set X<PAD_COMPNAME_GEN_set>, PAD_COMPNAME_OURSTASH
-X<PAD_COMPNAME_OURSTASH>, PAD_COMPNAME_PV X<PAD_COMPNAME_PV>,
-PAD_COMPNAME_TYPE X<PAD_COMPNAME_TYPE>, PAD_DUP X<PAD_DUP>,
-PAD_RESTORE_LOCAL X<PAD_RESTORE_LOCAL>, PAD_SAVE_LOCAL X<PAD_SAVE_LOCAL>,
-PAD_SAVE_SETNULLPAD X<PAD_SAVE_SETNULLPAD>, PAD_SETSV X<PAD_SETSV>,
-PAD_SET_CUR X<PAD_SET_CUR>, PAD_SET_CUR_NOSAVE X<PAD_SET_CUR_NOSAVE>,
-PAD_SV X<PAD_SV>, PAD_SVl X<PAD_SVl>, SAVECLEARSV X<SAVECLEARSV>,
-SAVECOMPPAD X<SAVECOMPPAD>, SAVEPADSV X<SAVEPADSV>
-
-=item GV Functions
-
-is_gv_magical X<is_gv_magical>, is_gv_magical_sv X<is_gv_magical_sv>
-
-=item Hash Manipulation Functions
-
-refcounted_he_chain_2hv X<refcounted_he_chain_2hv>, refcounted_he_free
-X<refcounted_he_free>, refcounted_he_new X<refcounted_he_new>
-
-=item IO Functions
-
-start_glob X<start_glob>
-
-=item Magical Functions
-
-magic_sethint X<magic_sethint>, mg_localize X<mg_localize>
-
-=item MRO Functions
-
-mro_get_linear_isa_c3 X<mro_get_linear_isa_c3>, mro_get_linear_isa_dfs
-X<mro_get_linear_isa_dfs>, mro_isa_changed_in X<mro_isa_changed_in>
-
-=item Pad Data Structures
-
-CvPADLIST X<CvPADLIST>, cv_clone X<cv_clone>, cv_dump X<cv_dump>,
-do_dump_pad X<do_dump_pad>, intro_my X<intro_my>, pad_add_anon
-X<pad_add_anon>, pad_add_name X<pad_add_name>, pad_alloc X<pad_alloc>,
-pad_block_start X<pad_block_start>, pad_check_dup X<pad_check_dup>,
-pad_findlex X<pad_findlex>, pad_findmy X<pad_findmy>, pad_fixup_inner_anons
-X<pad_fixup_inner_anons>, pad_free X<pad_free>, pad_leavemy X<pad_leavemy>,
-pad_new X<pad_new>, pad_push X<pad_push>, pad_reset X<pad_reset>, pad_setsv
-X<pad_setsv>, pad_swipe X<pad_swipe>, pad_tidy X<pad_tidy>, pad_undef
-X<pad_undef>
-
-=item Per-Interpreter Variables
-
-PL_DBsingle X<PL_DBsingle>, PL_DBsub X<PL_DBsub>, PL_DBtrace X<PL_DBtrace>,
-PL_dowarn X<PL_dowarn>, PL_last_in_gv X<PL_last_in_gv>, PL_ofs_sv
-X<PL_ofs_sv>, PL_rs X<PL_rs>
-
-=item Stack Manipulation Macros
-
-djSP X<djSP>, LVRET X<LVRET>
-
-=item SV Manipulation Functions
-
-sv_add_arena X<sv_add_arena>, sv_clean_all X<sv_clean_all>, sv_clean_objs
-X<sv_clean_objs>, sv_free_arenas X<sv_free_arenas>
-
-=item SV-Body Allocation
-
-sv_2num X<sv_2num>
-
-=item Unicode Support
-
-find_uninit_var X<find_uninit_var>, report_uninit X<report_uninit>
-
-=item AUTHORS
-
-=item SEE ALSO
-
-=back
-
-=head2 perliol - C API for Perl's implementation of IO in Layers.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item History and Background
-
-=item Basic Structure
-
-=item Layers vs Disciplines
-
-=item Data Structures
-
-=item Functions and Attributes
-
-=item Per-instance Data
-
-=item Layers in action.
-
-=item Per-instance flag bits
-
-PERLIO_F_EOF, PERLIO_F_CANWRITE, PERLIO_F_CANREAD, PERLIO_F_ERROR,
-PERLIO_F_TRUNCATE, PERLIO_F_APPEND, PERLIO_F_CRLF, PERLIO_F_UTF8,
-PERLIO_F_UNBUF, PERLIO_F_WRBUF, PERLIO_F_RDBUF, PERLIO_F_LINEBUF,
-PERLIO_F_TEMP, PERLIO_F_OPEN, PERLIO_F_FASTGETS
-
-=item Methods in Detail
-
-fsize, name, size, kind, PERLIO_K_BUFFERED, PERLIO_K_RAW, PERLIO_K_CANCRLF,
-PERLIO_K_FASTGETS, PERLIO_K_MULTIARG, Pushed, Popped, Open, Binmode,
-Getarg, Fileno, Dup, Read, Write, Seek, Tell, Close, Flush, Fill, Eof,
-Error, Clearerr, Setlinebuf, Get_base, Get_bufsiz, Get_ptr, Get_cnt,
-Set_ptrcnt
-
-=item Utilities
-
-=item Implementing PerlIO Layers
-
-C implementations, Perl implementations
-
-=item Core Layers
-
-"unix", "perlio", "stdio", "crlf", "mmap", "pending", "raw", "utf8"
-
-=item Extension Layers
-
-":encoding", ":scalar", ":via"
-
-=back
-
-=item TODO
-
-=back
-
-=head2 perlapio - perl's IO abstraction interface.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-1. USE_STDIO, 2. USE_SFIO, 3. USE_PERLIO, B<PerlIO_stdin()>,
-B<PerlIO_stdout()>, B<PerlIO_stderr()>, B<PerlIO_open(path, mode)>,
-B<PerlIO_fdopen(fd,mode)>, B<PerlIO_reopen(path,mode,f)>,
-B<PerlIO_printf(f,fmt,...)>, B<PerlIO_vprintf(f,fmt,a)>,
-B<PerlIO_stdoutf(fmt,...)>, B<PerlIO_read(f,buf,count)>,
-B<PerlIO_write(f,buf,count)>, B<PerlIO_close(f)>, B<PerlIO_puts(f,s)>,
-B<PerlIO_putc(f,c)>, B<PerlIO_ungetc(f,c)>, B<PerlIO_getc(f)>,
-B<PerlIO_eof(f)>, B<PerlIO_error(f)>, B<PerlIO_fileno(f)>,
-B<PerlIO_clearerr(f)>, B<PerlIO_flush(f)>, B<PerlIO_seek(f,offset,whence)>,
-B<PerlIO_tell(f)>, B<PerlIO_getpos(f,p)>, B<PerlIO_setpos(f,p)>,
-B<PerlIO_rewind(f)>, B<PerlIO_tmpfile()>, B<PerlIO_setlinebuf(f)>
-
-=over 4
-
-=item Co-existence with stdio
-
-B<PerlIO_importFILE(f,mode)>, B<PerlIO_exportFILE(f,mode)>,
-B<PerlIO_releaseFILE(p,f)>, B<PerlIO_findFILE(f)>
-
-=item "Fast gets" Functions
-
-B<PerlIO_fast_gets(f)>, B<PerlIO_has_cntptr(f)>, B<PerlIO_get_cnt(f)>,
-B<PerlIO_get_ptr(f)>, B<PerlIO_set_ptrcnt(f,p,c)>, B<PerlIO_canset_cnt(f)>,
-B<PerlIO_set_cnt(f,c)>, B<PerlIO_has_base(f)>, B<PerlIO_get_base(f)>,
-B<PerlIO_get_bufsiz(f)>
-
-=item Other Functions
-
-PerlIO_apply_layers(f,mode,layers), PerlIO_binmode(f,ptype,imode,layers),
-'E<lt>' read, 'E<gt>' write, '+' read/write, PerlIO_debug(fmt,...)
-
-=back
-
-=back
-
-=head2 perlhack - How to hack at the Perl internals
-
-=over 4
-
-=item DESCRIPTION
-
-Does concept match the general goals of Perl?, Where is the
-implementation?, Backwards compatibility, Could it be a module instead?, Is
-the feature generic enough?, Does it potentially introduce new bugs?, Does
-it preclude other desirable features?, Is the implementation robust?, Is
-the implementation generic enough to be portable?, Is the implementation
-tested?, Is there enough documentation?, Is there another way to do it?,
-Does it create too much work?, Patches speak louder than words
-
-=over 4
-
-=item Keeping in sync
-
-rsync'ing the source tree, Using rsync over the LAN, Using pushing over the
-NFS, rsync'ing the patches
-
-=item Why rsync the source tree
-
-It's easier to rsync the source tree, It's more reliable
-
-=item Why rsync the patches
-
-It's easier to rsync the patches, It's a good reference, Finding a start
-point, Finding how to fix a bug, Finding the source of misbehaviour
-
-=item Working with the source
-
-=item Perlbug administration
-
-=item Submitting patches
-
-L<perlguts>, L<perlxstut> and L<perlxs>, L<perlapi>,
-F<Porting/pumpkin.pod>, The perl5-porters FAQ
-
-=item Finding Your Way Around
-
-Core modules, Tests, Documentation, Configure, Interpreter
-
-=item Elements of the interpreter
-
-Startup, Parsing, Optimization, Running, Exception handing
-
-=item Internal Variable Types
-
-=item Op Trees
-
-=item Stacks
-
-Argument stack, Mark stack, Save stack
-
-=item Millions of Macros
-
-=item The .i Targets
-
-=back
-
-=item SOURCE CODE STATIC ANALYSIS
-
-=over 4
-
-=item lint, splint
-
-=item Coverity
-
-=item cpd (cut-and-paste detector)
-
-=item gcc warnings
-
-=item Warnings of other C compilers
-
-=item DEBUGGING
-
-=item Poking at Perl
-
-=item Using a source-level debugger
-
-run [args], break function_name, break source.c:xxx, step, next, continue,
-finish, 'enter', print
-
-=item gdb macro support
-
-=item Dumping Perl Data Structures
-
-=item Patching
-
-=item Patching a core module
-
-=item Adding a new function to the core
-
-=item Writing a test
-
-F<t/base/>, F<t/cmd/>, F<t/comp/>, F<t/io/>, F<t/lib/>, F<t/mro/>,
-F<t/op/>, F<t/pod/>, F<t/run/>, F<t/uni/>, F<t/win32/>, F<t/x2p>, t/base
-t/comp, t/cmd t/run t/io t/op, t/lib ext lib
-
-=item Special Make Test Targets
-
-coretest, test.deparse, test.taintwarn, minitest, test.valgrind
-check.valgrind utest.valgrind ucheck.valgrind, test.third check.third
-utest.third ucheck.third, test.torture torturetest, utest ucheck test.utf8
-check.utf8, minitest.utf16 test.utf16, test_harness, test-notty test_notty
-
-=item Running tests by hand
-
--v, -torture, -re=PATTERN, -re LIST OF PATTERNS, PERL_CORE=1,
-PERL_DESTRUCT_LEVEL=2, PERL, PERL_SKIP_TTY_TEST, PERL_TEST_Net_Ping,
-PERL_TEST_NOVREXX, PERL_TEST_NUMCONVERTS
-
-=item Common problems when patching Perl source code
-
-=item Perl environment problems
-
-=item Portability problems
-
-=item Problematic System Interfaces
-
-=item Security problems
-
-=back
-
-=item EXTERNAL TOOLS FOR DEBUGGING PERL
-
-=over 4
-
-=item Rational Software's Purify
-
-=item Purify on Unix
-
--Accflags=-DPURIFY, -Doptimize='-g', -Uusemymalloc, -Dusemultiplicity
-
-=item Purify on NT
-
-DEFINES, USE_MULTI = define, #PERL_MALLOC = define, CFG = Debug
-
-=item valgrind
-
-=item Compaq's/Digital's/HP's Third Degree
-
-=item PERL_DESTRUCT_LEVEL
-
-=item PERL_MEM_LOG
-
-=item Profiling
-
-=item Gprof Profiling
-
--a, -b, -e routine, -f routine, -s, -z
-
-=item GCC gcov Profiling
-
-=item Pixie Profiling
-
--h, -l, -p[rocedures], -h[eavy], -i[nvocations], -l[ines], -testcoverage,
--z[ero]
-
-=item Miscellaneous tricks
-
-=back
-
-=item CONCLUSION
-
-I<The Road goes ever on and on, down from the door where it began.>
-
-=item AUTHOR
-
-=back
-
-=head2 perlbook - Perl book information
-
-=over 4
-
-=item DESCRIPTION
-
-=back
-
-=head2 perlcommunity - a brief overview of the Perl community
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Where to find the community
-
-=item Mailing lists and Newsgroups
-
-=item IRC
-
-=item Websites
-
-L<http://perl.com/>, L<http://use.perl.org/>, L<http://www.perlmonks.org/>
-
-=item User Groups
-
-=item Workshops
-
-=item Hackathons
-
-=item Conventions
-
-=item Calendar of Perl Events
-
-=back
-
-=item AUTHOR
-
-=back
-
-=head2 perltodo - Perl TO-DO List
-
-=over 4
-
-=item DESCRIPTION
-
-=item Tasks that only need Perl knowledge
-
-=over 4
-
-=item Remove duplication of test setup.
-
-=item merge common code in installperl and installman
-
-=item common test code for timed bail out
-
-=item POD -E<gt> HTML conversion in the core still sucks
-
-=item merge checkpods and podchecker
-
-=item perlmodlib.PL rewrite
-
-=item Parallel testing
-
-=item Make Schwern poorer
-
-=item Improve the coverage of the core tests
-
-=item test B
-
-=item Deparse inlined constants
-
-=item A decent benchmark
-
-=item fix tainting bugs
-
-=item Dual life everything
-
-=item Improving C<threads::shared>
-
-=item POSIX memory footprint
-
-=item embed.pl/makedef.pl
-
-=item use strict; and AutoLoad
-
-=back
-
-=item Tasks that need a little sysadmin-type knowledge
-
-=over 4
-
-=item make HTML install work
-
-=item compressed man pages
-
-=item Add a code coverage target to the Makefile
-
-=item Make Config.pm cope with differences between built and installed perl
-
-=item linker specification files
-
-=item Cross-compile support
-
-=item roffitall
-
-=back
-
-=item Tasks that need a little C knowledge
-
-=over 4
-
-=item Exterminate PL_na!
-
-=item Modernize the order of directories in @INC
-
-=item -Duse32bit*
-
-=item Make it clear from -v if this is the exact official release
-
-=item Profile Perl - am I hot or not?
-
-=item Allocate OPs from arenas
-
-=item Improve win32/wince.c
-
-=item Use secure CRT functions when building with VC8 on Win32
-
-=item strcat(), strcpy(), strncat(), strncpy(), sprintf(), vsprintf()
-
-=item -D_FORTIFY_SOURCE=2, -fstack-protector
-
-=back
-
-=item Tasks that need a knowledge of XS
-
-=over 4
-
-=item autovivification
-
-=item Unicode in Filenames
-
-=item Unicode in %ENV
-
-=item Unicode and glob()
-
-=item Unicode and lc/uc operators
-
-=item use less 'memory'
-
-=item Re-implement C<:unique> in a way that is actually thread-safe
-
-=item Make tainting consistent
-
-=item readpipe(LIST)
-
-=item Audit the code for destruction ordering assumptions
-
-=item Extend PerlIO and PerlIO::Scalar
-
-=item -C on the #! line
-
-=item Propagate const outwards from Perl_moreswitches()
-
-=item Duplicate logic in S_method_common() and
-Perl_gv_fetchmethod_autoload()
-
-=item Organize error messages
-
-=back
-
-=item Tasks that need a knowledge of the interpreter
-
-=over 4
-
-=item state variable initialization in list context
-
-=item Implement $value ~~ 0 .. $range
-
-=item A does() built-in
-
-=item Tied filehandles and write() don't mix
-
-=item Attach/detach debugger from running program
-
-=item Optimize away empty destructors
-
-=item LVALUE functions for lists
-
-=item LVALUE functions in the debugger
-
-=item regexp optimiser optional
-
-=item delete &function
-
-=item C</w> regex modifier
-
-=item optional optimizer
-
-=item You WANT *how* many
-
-=item lexical aliases
-
-=item entersub XS vs Perl
-
-=item Self-ties
-
-=item Optimize away @_
-
-=item Properly Unicode safe tokeniser and pads.
-
-=item The yada yada yada operators
-
-=item Virtualize operating system access
-
-=item Investigate PADTMP hash pessimisation
-
-=back
-
-=item Big projects
-
-=over 4
-
-=item make ithreads more robust
-
-=item iCOW
-
-=item (?{...}) closures in regexps
-
-=item A re-entrant regexp engine
-
-=item Add class set operations to regexp engine
-
-=back
-
-=back
-
-=head2 perldoc - Look up Perl documentation in Pod format.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OPTIONS
-
-B<-h>, B<-v>, B<-t>, B<-u>, B<-m> I<module>, B<-l>, B<-F>, B<-f>
-I<perlfunc>, B<-q> I<perlfaq-search-regexp>, B<-T>, B<-d>
-I<destination-filename>, B<-o> I<output-formatname>, B<-M> I<module-name>,
-B<-w> I<option:value> or B<-w> I<option>, B<-X>, B<-L> I<language_code>,
-B<PageName|ModuleName|ProgramName>, B<-n> I<some-formatter>, B<-r>, B<-i>,
-B<-V>
-
-=item SECURITY
-
-=item ENVIRONMENT
-
-=item AUTHOR
-
-=back
-
-=head2 perlhist - the Perl history records
-
-=over 4
-
-=item DESCRIPTION
-
-=item INTRODUCTION
-
-=item THE KEEPERS OF THE PUMPKIN
-
-=over 4
-
-=item PUMPKIN?
-
-=back
-
-=item THE RECORDS
-
-=over 4
-
-=item SELECTED RELEASE SIZES
-
-=item SELECTED PATCH SIZES
-
-=back
-
-=item THE KEEPERS OF THE RECORDS
-
-=back
-
-=head2 perldelta - what is new for perl 5.10.0
-
-=over 4
-
-=item DESCRIPTION
-
-=item Core Enhancements
-
-=over 4
-
-=item The C<feature> pragma
-
-=item New B<-E> command-line switch
-
-=item Defined-or operator
-
-=item Switch and Smart Match operator
-
-=item Regular expressions
-
-Recursive Patterns, Named Capture Buffers, Possessive Quantifiers,
-Backtracking control verbs, Relative backreferences, C<\K> escape, Vertical
-and horizontal whitespace, and linebreak
-
-=item C<say()>
-
-=item Lexical C<$_>
-
-=item The C<_> prototype
-
-=item UNITCHECK blocks
-
-=item New Pragma, C<mro>
-
-=item readdir() may return a "short filename" on Windows
-
-=item readpipe() is now overridable
-
-=item Default argument for readline()
-
-=item state() variables
-
-=item Stacked filetest operators
-
-=item UNIVERSAL::DOES()
-
-=item Formats
-
-=item Byte-order modifiers for pack() and unpack()
-
-=item C<no VERSION>
-
-=item C<chdir>, C<chmod> and C<chown> on filehandles
-
-=item OS groups
-
-=item Recursive sort subs
-
-=item Exceptions in constant folding
-
-=item Source filters in @INC
-
-=item New internal variables
-
-C<${^RE_DEBUG_FLAGS}>, C<${^CHILD_ERROR_NATIVE}>, C<${^RE_TRIE_MAXBUF}>,
-C<${^WIN32_SLOPPY_STAT}>
-
-=item Miscellaneous
-
-=item UCD 5.0.0
-
-=item MAD
-
-=item kill() on Windows
-
-=back
-
-=item Incompatible Changes
-
-=over 4
-
-=item Packing and UTF-8 strings
-
-=item Byte/character count feature in unpack()
-
-=item The C<$*> and C<$#> variables have been removed
-
-=item substr() lvalues are no longer fixed-length
-
-=item Parsing of C<-f _>
-
-=item C<:unique>
-
-=item Effect of pragmas in eval
-
-=item chdir FOO
-
-=item Handling of .pmc files
-
-=item $^V is now a C<version> object instead of a v-string
-
-=item @- and @+ in patterns
-
-=item $AUTOLOAD can now be tainted
-
-=item Tainting and printf
-
-=item undef and signal handlers
-
-=item strictures and dereferencing in defined()
-
-=item C<(?p{})> has been removed
-
-=item Pseudo-hashes have been removed
-
-=item Removal of the bytecode compiler and of perlcc
-
-=item Removal of the JPL
-
-=item Recursive inheritance detected earlier
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item Upgrading individual core modules
-
-=item Pragmata Changes
-
-C<feature>, C<mro>, Scoping of the C<sort> pragma, Scoping of C<bignum>,
-C<bigint>, C<bigrat>, C<base>, C<strict> and C<warnings>, C<version>,
-C<warnings>, C<less>
-
-=item New modules
-
-=item Selected Changes to Core Modules
-
-C<Attribute::Handlers>, C<B::Lint>, C<B>, C<Thread>
-
-=back
-
-=item Utility Changes
-
-perl -d, ptar, ptardiff, shasum, corelist, h2ph and h2xs, perlivp,
-find2perl, config_data, cpanp, cpan2dist, pod2html
-
-=item New Documentation
-
-=item Performance Enhancements
-
-=over 4
-
-=item In-place sorting
-
-=item Lexical array access
-
-=item XS-assisted SWASHGET
-
-=item Constant subroutines
-
-=item C<PERL_DONT_CREATE_GVSV>
-
-=item Weak references are cheaper
-
-=item sort() enhancements
-
-=item Memory optimisations
-
-=item UTF-8 cache optimisation
-
-=item Sloppy stat on Windows
-
-=item Regular expressions optimisations
-
-Engine de-recursivised, Single char char-classes treated as literals, Trie
-optimisation of literal string alternations, Aho-Corasick start-point
-optimisation
-
-=back
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item Configuration improvements
-
-C<-Dusesitecustomize>, Relocatable installations, strlcat() and strlcpy(),
-C<d_pseudofork> and C<d_printf_format_null>, Configure help
-
-=item Compilation improvements
-
-Parallel build, Borland's compilers support, Static build on Windows,
-ppport.h files, C++ compatibility, Support for Microsoft 64-bit compiler,
-Visual C++, Win32 builds
-
-=item Installation improvements
-
-Module auxiliary files
-
-=item New Or Improved Platforms
-
-=back
-
-=item Selected Bug Fixes
-
-strictures in regexp-eval blocks, Calling CORE::require(), Subscripts of
-slices, C<no warnings 'category'> works correctly with -w, threads
-improvements, chr() and negative values, PERL5SHELL and tainting, Using
-*FILE{IO}, Overloading and reblessing, Overloading and UTF-8, eval memory
-leaks fixed, Random device on Windows, PERLIO_DEBUG, PerlIO::scalar and
-read-only scalars, study() and UTF-8, Critical signals, @INC-hook fix,
-C<-t> switch fix, Duping UTF-8 filehandles, Localisation of hash elements
-
-=item New or Changed Diagnostics
-
-Use of uninitialized value, Deprecated use of my() in false conditional,
-!=~ should be !~, Newline in left-justified string, Too late for "-T"
-option, "%s" variable %s masks earlier declaration,
-readdir()/closedir()/etc. attempted on invalid dirhandle, Opening
-dirhandle/filehandle %s also as a file/directory, Use of -P is deprecated,
-v-string in use/require is non-portable, perl -V
-
-=item Changed Internals
-
-=over 4
-
-=item Reordering of SVt_* constants
-
-=item Elimination of SVt_PVBM
-
-=item New type SVt_BIND
-
-=item Removal of CPP symbols
-
-=item Less space is used by ops
-
-=item New parser
-
-=item Use of C<const>
-
-=item Mathoms
-
-=item C<AvFLAGS> has been removed
-
-=item C<av_*> changes
-
-=item $^H and %^H
-
-=item B:: modules inheritance changed
-
-=item Anonymous hash and array constructors
-
-=back
-
-=item Known Problems
-
-=item Platform Specific Problems
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl5100delta, perldelta - what is new for perl 5.10.0
-
-=over 4
-
-=item DESCRIPTION
-
-=item Core Enhancements
-
-=over 4
-
-=item The C<feature> pragma
-
-=item New B<-E> command-line switch
-
-=item Defined-or operator
-
-=item Switch and Smart Match operator
-
-=item Regular expressions
-
-Recursive Patterns, Named Capture Buffers, Possessive Quantifiers,
-Backtracking control verbs, Relative backreferences, C<\K> escape, Vertical
-and horizontal whitespace, and linebreak
-
-=item C<say()>
-
-=item Lexical C<$_>
-
-=item The C<_> prototype
-
-=item UNITCHECK blocks
-
-=item New Pragma, C<mro>
-
-=item readdir() may return a "short filename" on Windows
-
-=item readpipe() is now overridable
-
-=item Default argument for readline()
-
-=item state() variables
-
-=item Stacked filetest operators
-
-=item UNIVERSAL::DOES()
-
-=item Formats
-
-=item Byte-order modifiers for pack() and unpack()
-
-=item C<no VERSION>
-
-=item C<chdir>, C<chmod> and C<chown> on filehandles
-
-=item OS groups
-
-=item Recursive sort subs
-
-=item Exceptions in constant folding
-
-=item Source filters in @INC
-
-=item New internal variables
-
-C<${^RE_DEBUG_FLAGS}>, C<${^CHILD_ERROR_NATIVE}>, C<${^RE_TRIE_MAXBUF}>,
-C<${^WIN32_SLOPPY_STAT}>
-
-=item Miscellaneous
-
-=item UCD 5.0.0
-
-=item MAD
-
-=item kill() on Windows
-
-=back
-
-=item Incompatible Changes
-
-=over 4
-
-=item Packing and UTF-8 strings
-
-=item Byte/character count feature in unpack()
-
-=item The C<$*> and C<$#> variables have been removed
-
-=item substr() lvalues are no longer fixed-length
-
-=item Parsing of C<-f _>
-
-=item C<:unique>
-
-=item Effect of pragmas in eval
-
-=item chdir FOO
-
-=item Handling of .pmc files
-
-=item $^V is now a C<version> object instead of a v-string
-
-=item @- and @+ in patterns
-
-=item $AUTOLOAD can now be tainted
-
-=item Tainting and printf
-
-=item undef and signal handlers
-
-=item strictures and dereferencing in defined()
-
-=item C<(?p{})> has been removed
-
-=item Pseudo-hashes have been removed
-
-=item Removal of the bytecode compiler and of perlcc
-
-=item Removal of the JPL
-
-=item Recursive inheritance detected earlier
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item Upgrading individual core modules
-
-=item Pragmata Changes
-
-C<feature>, C<mro>, Scoping of the C<sort> pragma, Scoping of C<bignum>,
-C<bigint>, C<bigrat>, C<base>, C<strict> and C<warnings>, C<version>,
-C<warnings>, C<less>
-
-=item New modules
-
-=item Selected Changes to Core Modules
-
-C<Attribute::Handlers>, C<B::Lint>, C<B>, C<Thread>
-
-=back
-
-=item Utility Changes
-
-perl -d, ptar, ptardiff, shasum, corelist, h2ph and h2xs, perlivp,
-find2perl, config_data, cpanp, cpan2dist, pod2html
-
-=item New Documentation
-
-=item Performance Enhancements
-
-=over 4
-
-=item In-place sorting
-
-=item Lexical array access
-
-=item XS-assisted SWASHGET
-
-=item Constant subroutines
-
-=item C<PERL_DONT_CREATE_GVSV>
-
-=item Weak references are cheaper
-
-=item sort() enhancements
-
-=item Memory optimisations
-
-=item UTF-8 cache optimisation
-
-=item Sloppy stat on Windows
-
-=item Regular expressions optimisations
-
-Engine de-recursivised, Single char char-classes treated as literals, Trie
-optimisation of literal string alternations, Aho-Corasick start-point
-optimisation
-
-=back
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item Configuration improvements
-
-C<-Dusesitecustomize>, Relocatable installations, strlcat() and strlcpy(),
-C<d_pseudofork> and C<d_printf_format_null>, Configure help
-
-=item Compilation improvements
-
-Parallel build, Borland's compilers support, Static build on Windows,
-ppport.h files, C++ compatibility, Support for Microsoft 64-bit compiler,
-Visual C++, Win32 builds
-
-=item Installation improvements
-
-Module auxiliary files
-
-=item New Or Improved Platforms
-
-=back
-
-=item Selected Bug Fixes
-
-strictures in regexp-eval blocks, Calling CORE::require(), Subscripts of
-slices, C<no warnings 'category'> works correctly with -w, threads
-improvements, chr() and negative values, PERL5SHELL and tainting, Using
-*FILE{IO}, Overloading and reblessing, Overloading and UTF-8, eval memory
-leaks fixed, Random device on Windows, PERLIO_DEBUG, PerlIO::scalar and
-read-only scalars, study() and UTF-8, Critical signals, @INC-hook fix,
-C<-t> switch fix, Duping UTF-8 filehandles, Localisation of hash elements
-
-=item New or Changed Diagnostics
-
-Use of uninitialized value, Deprecated use of my() in false conditional,
-!=~ should be !~, Newline in left-justified string, Too late for "-T"
-option, "%s" variable %s masks earlier declaration,
-readdir()/closedir()/etc. attempted on invalid dirhandle, Opening
-dirhandle/filehandle %s also as a file/directory, Use of -P is deprecated,
-v-string in use/require is non-portable, perl -V
-
-=item Changed Internals
-
-=over 4
-
-=item Reordering of SVt_* constants
-
-=item Elimination of SVt_PVBM
-
-=item New type SVt_BIND
-
-=item Removal of CPP symbols
-
-=item Less space is used by ops
-
-=item New parser
-
-=item Use of C<const>
-
-=item Mathoms
-
-=item C<AvFLAGS> has been removed
-
-=item C<av_*> changes
-
-=item $^H and %^H
-
-=item B:: modules inheritance changed
-
-=item Anonymous hash and array constructors
-
-=back
-
-=item Known Problems
-
-=item Platform Specific Problems
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl595delta - what is new for perl v5.9.5
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=over 4
-
-=item Tainting and printf
-
-=item undef and signal handlers
-
-=item strictures and array/hash dereferencing in defined()
-
-=item C<(?p{})> has been removed
-
-=item Pseudo-hashes have been removed
-
-=item Removal of the bytecode compiler and of perlcc
-
-=item Removal of the JPL
-
-=item Recursive inheritance detected earlier
-
-=back
-
-=item Core Enhancements
-
-=over 4
-
-=item Regular expressions
-
-Recursive Patterns, Named Capture Buffers, Possessive Quantifiers,
-Backtracking control verbs, Relative backreferences, C<\K> escape, Vertical
-and horizontal whitespace, and linebreak
-
-=item The C<_> prototype
-
-=item UNITCHECK blocks
-
-=item readpipe() is now overridable
-
-=item default argument for readline()
-
-=item UCD 5.0.0
-
-=item Smart match
-
-=item Implicit loading of C<feature>
-
-=back
-
-=item Modules and Pragmas
-
-=over 4
-
-=item New Pragma, C<mro>
-
-=item bignum, bigint, bigrat
-
-=item Math::BigInt/Math::BigFloat
-
-config(), import(), roundmode common, bpi(), bcos(), bsin(), batan(),
-batan2(), bmuladd(), bexp(), bnok(), from_hex(), from_oct(), and
-from_bin(), as_oct()
-
-=item New Core Modules
-
-=item Module changes
-
-C<assertions>, C<base>, C<strict> and C<warnings>, C<warnings>, C<less>,
-C<Attribute::Handlers>, C<B::Lint>, C<B>, C<Thread>
-
-=back
-
-=item Utility Changes
-
-=over 4
-
-=item C<cpanp>
-
-=item C<cpan2dist>
-
-=item C<pod2html>
-
-=back
-
-=item Documentation
-
-=over 4
-
-=item New manpage, perlunifaq
-
-=back
-
-=item Performance Enhancements
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item C++ compatibility
-
-=item Visual C++
-
-=item Static build on Win32
-
-=item win32 builds
-
-=item C<d_pseudofork> and C<d_printf_format_null>
-
-=item Help
-
-=item 64bit systems
-
-=item Ports
-
-=back
-
-=item Selected Bug Fixes
-
-=item New or Changed Diagnostics
-
-=over 4
-
-=item Deprecations
-
-=back
-
-=item Changed Internals
-
-=item Known Problems
-
-=over 4
-
-=item Platform Specific Problems
-
-=back
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl594delta - what is new for perl v5.9.4
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=over 4
-
-=item chdir FOO
-
-=item Handling of pmc files
-
-=item @- and @+ in patterns
-
-=item $AUTOLOAD can now be tainted
-
-=back
-
-=item Core Enhancements
-
-=over 4
-
-=item state() variables
-
-=item UNIVERSAL::DOES()
-
-=item Exceptions in constant folding
-
-=item Source filters in @INC
-
-=item MAD
-
-=back
-
-=item Modules and Pragmas
-
-=over 4
-
-=item New Core Modules
-
-=back
-
-=item Utility Changes
-
-=over 4
-
-=item config_data
-
-=back
-
-=item Documentation
-
-=over 4
-
-=item New manpage, perlpragma
-
-=item New manpage, perlreguts
-
-=item New manpage, perlunitut
-
-=back
-
-=item Performance Enhancements
-
-=over 4
-
-=item Memory optimisations
-
-=item UTF-8 cache optimisation
-
-=item Regular expressions
-
-Engine de-recursivised, Single char char-classes treated as literals, Trie
-optimisation of literal string alternations, Aho-Corasick start-point
-optimisation
-
-=item Sloppy stat on Windows
-
-=back
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item Relocatable installations
-
-=item Ports
-
-=item Compilation improvements
-
-=item New probes
-
-=item Windows build improvements
-
-Building XS extensions, Support for 64-bit compiler
-
-=back
-
-=item Selected Bug Fixes
-
-=over 4
-
-=item PERL5SHELL and tainting
-
-=item Using *FILE{IO}
-
-=item Overloading and reblessing
-
-=item Overloading and UTF-8
-
-=item eval memory leaks fixed
-
-=item Random device on Windows
-
-=back
-
-=item New or Changed Diagnostics
-
-State variable %s will be reinitialized
-
-=item Changed Internals
-
-=item Known Problems
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl593delta - what is new for perl v5.9.3
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=over 4
-
-=item Parsing of C<-f _>
-
-=item C<mkdir()>
-
-=item Magic goto and eval
-
-=item C<$#> has been removed
-
-=item C<:unique>
-
-=item Scoping of the C<sort> pragma
-
-=back
-
-=item Core Enhancements
-
-=over 4
-
-=item The C<feature> pragma
-
-=item Switch and Smart Match operator
-
-=item C<say()>
-
-=item C<CLONE_SKIP()>
-
-=item C<${^CHILD_ERROR_NATIVE}>
-
-=item Assertions
-
-=item Unicode Character Database 4.1.0
-
-=item C<no VERSION>
-
-=item Recursive sort subs
-
-=item Effect of pragmas in eval
-
-=item New B<-E> command-line switch
-
-=item C<chdir>, C<chmod> and C<chown> on filehandles
-
-=item OS groups
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item New Core Modules
-
-=back
-
-=item Utility Changes
-
-=over 4
-
-=item C<ptar>
-
-=item C<ptardiff>
-
-=item C<shasum>
-
-=item C<h2xs> enhancements
-
-=item C<perlivp> enhancements
-
-=back
-
-=item Documentation
-
-=over 4
-
-=item Perl Glossary
-
-=back
-
-=item Performance Enhancements
-
-=over 4
-
-=item XS-assisted SWASHGET
-
-=item Constant subroutines
-
-=item C<PERL_DONT_CREATE_GVSV>
-
-=item Weak references are cheaper
-
-=item sort() enhancements
-
-=back
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item Compilation improvements
-
-=item New Or Improved Platforms
-
-=item New probes
-
-=item Module auxiliary files
-
-=back
-
-=item Selected Bug Fixes
-
-=over 4
-
-=item C<defined $$x>
-
-=item Calling CORE::require()
-
-=item Subscripts of slices
-
-=item Remove over-optimisation
-
-=item sprintf() fixes
-
-=item no warnings 'category' works correctly with -w
-
-=item Smaller fixes
-
-=item More Unicode Fixes
-
-=back
-
-=item New or Changed Diagnostics
-
-=over 4
-
-=item Attempt to set length of freed array
-
-=item Non-string passed as bitmask
-
-=item Search pattern not terminated or ternary operator parsed as search
-pattern
-
-=item "%s" variable %s masks earlier declaration
-
-=item readdir()/closedir()/etc. attempted on invalid dirhandle
-
-=back
-
-=item Changed Internals
-
-=over 4
-
-=item B:: modules inheritance changed
-
-=back
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl592delta - what is new for perl v5.9.2
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=over 4
-
-=item Packing and UTF-8 strings
-
-=item Miscellaneous
-
-=back
-
-=item Core Enhancements
-
-=over 4
-
-=item Malloc wrapping
-
-=item Unicode Character Database 4.0.1
-
-=item suidperl less insecure
-
-=item PERLIO_DEBUG
-
-=item Formats
-
-=item Unicode Character Classes
-
-=item Byte-order modifiers for pack() and unpack()
-
-=item Byte count feature in pack()
-
-=item New variables
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item New modules
-
-=item Updated And Improved Modules and Pragmata
-
-B::Concise, Socket, Sys::Syslog, threads
-
-=back
-
-=item Utility Changes
-
-=item Performance Enhancements
-
-=item Installation and Configuration Improvements
-
-=item Selected Bug Fixes
-
-=item New or Changed Diagnostics
-
-=item Changed Internals
-
-=item Known Problems
-
-=item Plans for the next release
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl591delta - what is new for perl v5.9.1
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=over 4
-
-=item substr() lvalues are no longer fixed-length
-
-=item The C<:unique> attribute is only meaningful for globals
-
-=back
-
-=item Core Enhancements
-
-=over 4
-
-=item Lexical C<$_>
-
-=item Tied hashes in scalar context
-
-=item Formats
-
-=item Stacked filetest operators
-
-=back
-
-=item Modules and Pragmata
-
-Benchmark, Carp, Exporter, FindBin, List::Util, threads::shared
-
-=item Utility Changes
-
-=item Documentation
-
-=item Performance Enhancements
-
-=item Selected Bug Fixes
-
-=over 4
-
-=item UTF-8 bugs
-
-=item Threading bugs
-
-=item More bugs
-
-=back
-
-=item New or Changed Diagnostics
-
-=item Changed Internals
-
-=over 4
-
-=item Reordering of SVt_* constants
-
-=item Removal of CPP symbols
-
-=item Less space is used by ops
-
-=item New parser
-
-=back
-
-=item Configuration and Building
-
-=item Known Problems
-
-=over 4
-
-=item Platform Specific Problems
-
-=back
-
-=item To-do for perl 5.10.0
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl590delta - what is new for perl v5.9.0
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=over 4
-
-=item Hash Randomisation
-
-=item UTF-8 On Filehandles No Longer Activated By Locale
-
-=item Single-number v-strings are no longer v-strings before "=>"
-
-=item (Win32) The -C Switch Has Been Repurposed
-
-=item (Win32) The /d Switch Of cmd.exe
-
-=item The C<$*> variable has been removed
-
-=back
-
-=item Core Enhancements
-
-=over 4
-
-=item Assertions
-
-=item Defined-or operators
-
-=item UTF-8 no longer default under UTF-8 locales
-
-=item Unsafe signals again available
-
-=item Tied Arrays with Negative Array Indices
-
-=item local ${$x}
-
-=item Unicode Character Database 4.0.0
-
-=item Miscellaneous Enhancements
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item Updated Modules And Pragmata
-
-base, B::Bytecode, B::Concise, B::Deparse, Benchmark, ByteLoader, bytes,
-CGI, charnames, CPAN, Data::Dumper, DB_File, Devel::PPPort, Digest::MD5,
-Encode, fields, libnet, Math::BigInt, MIME::Base64, NEXT, Net::Ping,
-PerlIO::scalar, podlators, Pod::LaTeX, PodParsers, Pod::Perldoc,
-Scalar::Util, Storable, strict, Term::ANSIcolor, Test::Harness, Test::More,
-Test::Simple, Text::Balanced, Time::HiRes, threads, threads::shared,
-Unicode::Collate, Unicode::Normalize, Win32::GetFolderPath,
-Win32::GetOSVersion
-
-=back
-
-=item Utility Changes
-
-=item New Documentation
-
-=item Performance Enhancements
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item Platform-specific enhancements
-
-=back
-
-=item Selected Bug Fixes
-
-=over 4
-
-=item Closures, eval and lexicals
-
-=item Generic fixes
-
-=item Platform-specific fixes
-
-=back
-
-=item New or Changed Diagnostics
-
-=over 4
-
-=item Changed "A thread exited while %d threads were running"
-
-=item Removed "Attempt to clear a restricted hash"
-
-=item New "Illegal declaration of anonymous subroutine"
-
-=item Changed "Invalid range "%s" in transliteration operator"
-
-=item New "Missing control char name in \c"
-
-=item New "Newline in left-justified string for %s"
-
-=item New "Possible precedence problem on bitwise %c operator"
-
-=item New "read() on %s filehandle %s"
-
-=item New "Tied variable freed while still in use"
-
-=item New "To%s: illegal mapping '%s'"
-
-=item New "Use of freed value in iteration"
-
-=back
-
-=item Changed Internals
-
-=item New Tests
-
-=item Known Problems
-
-=over 4
-
-=item Tied hashes in scalar context
-
-=item Net::Ping 450_service and 510_ping_udp failures
-
-=item B::C
-
-=back
-
-=item Platform Specific Problems
-
-=over 4
-
-=item EBCDIC Platforms
-
-=item Cygwin 1.5 problems
-
-=item HP-UX: HP cc warnings about sendfile and sendpath
-
-=item IRIX: t/uni/tr_7jis.t falsely failing
-
-=item Mac OS X: no usemymalloc
-
-=item Tru64: No threaded builds with GNU cc (gcc)
-
-=item Win32: sysopen, sysread, syswrite
-
-=back
-
-=item TODO
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl588delta - what is new for perl v5.8.8
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=item Core Enhancements
-
-=item Modules and Pragmata
-
-=item Utility Changes
-
-=over 4
-
-=item C<h2xs> enhancements
-
-=item C<perlivp> enhancements
-
-=back
-
-=item New Documentation
-
-=item Performance Enhancements
-
-=item Installation and Configuration Improvements
-
-=item Selected Bug Fixes
-
-=over 4
-
-=item no warnings 'category' works correctly with -w
-
-=item Remove over-optimisation
-
-=item sprintf() fixes
-
-=item Debugger and Unicode slowdown
-
-=item Smaller fixes
-
-=back
-
-=item New or Changed Diagnostics
-
-=over 4
-
-=item Attempt to set length of freed array
-
-=item Non-string passed as bitmask
-
-=item Search pattern not terminated or ternary operator parsed as search
-pattern
-
-=back
-
-=item Changed Internals
-
-=item Platform Specific Problems
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl587delta - what is new for perl v5.8.7
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=item Core Enhancements
-
-=over 4
-
-=item Unicode Character Database 4.1.0
-
-=item suidperl less insecure
-
-=item Optional site customization script
-
-=item C<Config.pm> is now much smaller.
-
-=back
-
-=item Modules and Pragmata
-
-=item Utility Changes
-
-=over 4
-
-=item find2perl enhancements
-
-=back
-
-=item Performance Enhancements
-
-=item Installation and Configuration Improvements
-
-=item Selected Bug Fixes
-
-=item New or Changed Diagnostics
-
-=item Changed Internals
-
-=item Known Problems
-
-=item Platform Specific Problems
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl586delta - what is new for perl v5.8.6
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=item Core Enhancements
-
-=item Modules and Pragmata
-
-=item Utility Changes
-
-=item Performance Enhancements
-
-=item Selected Bug Fixes
-
-=item New or Changed Diagnostics
-
-=item Changed Internals
-
-=item New Tests
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl585delta - what is new for perl v5.8.5
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=item Core Enhancements
-
-=item Modules and Pragmata
-
-=item Utility Changes
-
-=over 4
-
-=item Perl's debugger
-
-=item h2ph
-
-=back
-
-=item Installation and Configuration Improvements
-
-=item Selected Bug Fixes
-
-=item New or Changed Diagnostics
-
-=item Changed Internals
-
-=item Known Problems
-
-=item Platform Specific Problems
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl584delta - what is new for perl v5.8.4
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=item Core Enhancements
-
-=over 4
-
-=item Malloc wrapping
-
-=item Unicode Character Database 4.0.1
-
-=item suidperl less insecure
-
-=item format
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item Updated modules
-
-Attribute::Handlers, B, Benchmark, CGI, Carp, Cwd, Exporter, File::Find,
-IO, IPC::Open3, Local::Maketext, Math::BigFloat, Math::BigInt,
-Math::BigRat, MIME::Base64, ODBM_File, POSIX, Shell, Socket, Storable,
-Switch, Sys::Syslog, Term::ANSIColor, Time::HiRes, Unicode::UCD, Win32,
-base, open, threads, utf8
-
-=back
-
-=item Performance Enhancements
-
-=item Utility Changes
-
-=item Installation and Configuration Improvements
-
-=item Selected Bug Fixes
-
-=item New or Changed Diagnostics
-
-=item Changed Internals
-
-=item Future Directions
-
-=item Platform Specific Problems
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl583delta - what is new for perl v5.8.3
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=item Core Enhancements
-
-=item Modules and Pragmata
-
-CGI, Cwd, Digest, Digest::MD5, Encode, File::Spec, FindBin, List::Util,
-Math::BigInt, PodParser, Pod::Perldoc, POSIX, Unicode::Collate,
-Unicode::Normalize, Test::Harness, threads::shared
-
-=item Utility Changes
-
-=item New Documentation
-
-=item Installation and Configuration Improvements
-
-=item Selected Bug Fixes
-
-=item New or Changed Diagnostics
-
-=item Changed Internals
-
-=item Configuration and Building
-
-=item Platform Specific Problems
-
-=item Known Problems
-
-=item Future Directions
-
-=item Obituary
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl582delta - what is new for perl v5.8.2
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=item Core Enhancements
-
-=over 4
-
-=item Hash Randomisation
-
-=item Threading
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item Updated Modules And Pragmata
-
-Devel::PPPort, Digest::MD5, I18N::LangTags, libnet, MIME::Base64,
-Pod::Perldoc, strict, Tie::Hash, Time::HiRes, Unicode::Collate,
-Unicode::Normalize, UNIVERSAL
-
-=back
-
-=item Selected Bug Fixes
-
-=item Changed Internals
-
-=item Platform Specific Problems
-
-=item Future Directions
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl581delta - what is new for perl v5.8.1
-
-=over 4
-
-=item DESCRIPTION
-
-=item Incompatible Changes
-
-=over 4
-
-=item Hash Randomisation
-
-=item UTF-8 On Filehandles No Longer Activated By Locale
-
-=item Single-number v-strings are no longer v-strings before "=>"
-
-=item (Win32) The -C Switch Has Been Repurposed
-
-=item (Win32) The /d Switch Of cmd.exe
-
-=back
-
-=item Core Enhancements
-
-=over 4
-
-=item UTF-8 no longer default under UTF-8 locales
-
-=item Unsafe signals again available
-
-=item Tied Arrays with Negative Array Indices
-
-=item local ${$x}
-
-=item Unicode Character Database 4.0.0
-
-=item Deprecation Warnings
-
-=item Miscellaneous Enhancements
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item Updated Modules And Pragmata
-
-base, B::Bytecode, B::Concise, B::Deparse, Benchmark, ByteLoader, bytes,
-CGI, charnames, CPAN, Data::Dumper, DB_File, Devel::PPPort, Digest::MD5,
-Encode, fields, libnet, Math::BigInt, MIME::Base64, NEXT, Net::Ping,
-PerlIO::scalar, podlators, Pod::LaTeX, PodParsers, Pod::Perldoc,
-Scalar::Util, Storable, strict, Term::ANSIcolor, Test::Harness, Test::More,
-Test::Simple, Text::Balanced, Time::HiRes, threads, threads::shared,
-Unicode::Collate, Unicode::Normalize, Win32::GetFolderPath,
-Win32::GetOSVersion
-
-=back
-
-=item Utility Changes
-
-=item New Documentation
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item Platform-specific enhancements
-
-=back
-
-=item Selected Bug Fixes
-
-=over 4
-
-=item Closures, eval and lexicals
-
-=item Generic fixes
-
-=item Platform-specific fixes
-
-=back
-
-=item New or Changed Diagnostics
-
-=over 4
-
-=item Changed "A thread exited while %d threads were running"
-
-=item Removed "Attempt to clear a restricted hash"
-
-=item New "Illegal declaration of anonymous subroutine"
-
-=item Changed "Invalid range "%s" in transliteration operator"
-
-=item New "Missing control char name in \c"
-
-=item New "Newline in left-justified string for %s"
-
-=item New "Possible precedence problem on bitwise %c operator"
-
-=item New "Pseudo-hashes are deprecated"
-
-=item New "read() on %s filehandle %s"
-
-=item New "5.005 threads are deprecated"
-
-=item New "Tied variable freed while still in use"
-
-=item New "To%s: illegal mapping '%s'"
-
-=item New "Use of freed value in iteration"
-
-=back
-
-=item Changed Internals
-
-=item New Tests
-
-=item Known Problems
-
-=over 4
-
-=item Tied hashes in scalar context
-
-=item Net::Ping 450_service and 510_ping_udp failures
-
-=item B::C
-
-=back
-
-=item Platform Specific Problems
-
-=over 4
-
-=item EBCDIC Platforms
-
-=item Cygwin 1.5 problems
-
-=item HP-UX: HP cc warnings about sendfile and sendpath
-
-=item IRIX: t/uni/tr_7jis.t falsely failing
-
-=item Mac OS X: no usemymalloc
-
-=item Tru64: No threaded builds with GNU cc (gcc)
-
-=item Win32: sysopen, sysread, syswrite
-
-=back
-
-=item Future Directions
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=back
-
-=head2 perl58delta - what is new for perl v5.8.0
-
-=over 4
-
-=item DESCRIPTION
-
-=item Highlights In 5.8.0
-
-=item Incompatible Changes
-
-=over 4
-
-=item Binary Incompatibility
-
-=item 64-bit platforms and malloc
-
-=item AIX Dynaloading
-
-=item Attributes for C<my> variables now handled at run-time
-
-=item Socket Extension Dynamic in VMS
-
-=item IEEE-format Floating Point Default on OpenVMS Alpha
-
-=item New Unicode Semantics (no more C<use utf8>, almost)
-
-=item New Unicode Properties
-
-=item REF(...) Instead Of SCALAR(...)
-
-=item pack/unpack D/F recycled
-
-=item glob() now returns filenames in alphabetical order
-
-=item Deprecations
-
-=back
-
-=item Core Enhancements
-
-=over 4
-
-=item Unicode Overhaul
-
-=item PerlIO is Now The Default
-
-=item ithreads
-
-=item Restricted Hashes
-
-=item Safe Signals
-
-=item Understanding of Numbers
-
-=item Arrays now always interpolate into double-quoted strings [561]
-
-=item Miscellaneous Changes
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item New Modules and Pragmata
-
-=item Updated And Improved Modules and Pragmata
-
-=back
-
-=item Utility Changes
-
-=item New Documentation
-
-=item Performance Enhancements
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item Generic Improvements
-
-=item New Or Improved Platforms
-
-=back
-
-=item Selected Bug Fixes
-
-=over 4
-
-=item Platform Specific Changes and Fixes
-
-=back
-
-=item New or Changed Diagnostics
-
-=item Changed Internals
-
-=item Security Vulnerability Closed [561]
-
-=item New Tests
-
-=item Known Problems
-
-=over 4
-
-=item The Compiler Suite Is Still Very Experimental
-
-=item Localising Tied Arrays and Hashes Is Broken
-
-=item Building Extensions Can Fail Because Of Largefiles
-
-=item Modifying $_ Inside for(..)
-
-=item mod_perl 1.26 Doesn't Build With Threaded Perl
-
-=item lib/ftmp-security tests warn 'system possibly insecure'
-
-=item libwww-perl (LWP) fails base/date #51
-
-=item PDL failing some tests
-
-=item Perl_get_sv
-
-=item Self-tying Problems
-
-=item ext/threads/t/libc
-
-=item Failure of Thread (5.005-style) tests
-
-=item Timing problems
-
-=item Tied/Magical Array/Hash Elements Do Not Autovivify
-
-=item Unicode in package/class and subroutine names does not work
-
-=back
-
-=item Platform Specific Problems
-
-=over 4
-
-=item AIX
-
-=item Alpha systems with old gccs fail several tests
-
-=item AmigaOS
-
-=item BeOS
-
-=item Cygwin "unable to remap"
-
-=item Cygwin ndbm tests fail on FAT
-
-=item DJGPP Failures
-
-=item FreeBSD built with ithreads coredumps reading large directories
-
-=item FreeBSD Failing locale Test 117 For ISO 8859-15 Locales
-
-=item IRIX fails ext/List/Util/t/shuffle.t or Digest::MD5
-
-=item HP-UX lib/posix Subtest 9 Fails When LP64-Configured
-
-=item Linux with glibc 2.2.5 fails t/op/int subtest #6 with -Duse64bitint
-
-=item Linux With Sfio Fails op/misc Test 48
-
-=item Mac OS X
-
-=item Mac OS X dyld undefined symbols
-
-=item OS/2 Test Failures
-
-=item op/sprintf tests 91, 129, and 130
-
-=item SCO
-
-=item Solaris 2.5
-
-=item Solaris x86 Fails Tests With -Duse64bitint
-
-=item SUPER-UX (NEC SX)
-
-=item Term::ReadKey not working on Win32
-
-=item UNICOS/mk
-
-=item UTS
-
-=item VOS (Stratus)
-
-=item VMS
-
-=item Win32
-
-=item XML::Parser not working
-
-=item z/OS (OS/390)
-
-=item Unicode Support on EBCDIC Still Spotty
-
-=item Seen In Perl 5.7 But Gone Now
-
-=back
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 perl573delta - what's new for perl v5.7.3
-
-=over 4
-
-=item DESCRIPTION
-
-=item Changes
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 perl572delta - what's new for perl v5.7.2
-
-=over 4
-
-=item DESCRIPTION
-
-=item Security Vulnerability Closed
-
-=item Incompatible Changes
-
-=over 4
-
-=item 64-bit platforms and malloc
-
-=item AIX Dynaloading
-
-=item Socket Extension Dynamic in VMS
-
-=item Different Definition of the Unicode Character Classes \p{In...}
-
-=item Deprecations
-
-=back
-
-=item Core Enhancements
-
-=item Modules and Pragmata
-
-=over 4
-
-=item New Modules and Distributions
-
-=item Updated And Improved Modules and Pragmata
-
-=back
-
-=item Utility Changes
-
-=item New Documentation
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item New Or Improved Platforms
-
-=item Generic Improvements
-
-=back
-
-=item Selected Bug Fixes
-
-=over 4
-
-=item Platform Specific Changes and Fixes
-
-=back
-
-=item New or Changed Diagnostics
-
-=item Source Code Enhancements
-
-=over 4
-
-=item MAGIC constants
-
-=item Better commented code
-
-=item Regex pre-/post-compilation items matched up
-
-=item gcc -Wall
-
-=back
-
-=item New Tests
-
-=item Known Problems
-
-=over 4
-
-=item AIX
-
-=item Amiga Perl Invoking Mystery
-
-=item lib/ftmp-security tests warn 'system possibly insecure'
-
-=item Cygwin intermittent failures of lib/Memoize/t/expire_file 11 and 12
-
-=item HP-UX lib/io_multihomed Fails When LP64-Configured
-
-=item HP-UX lib/posix Subtest 9 Fails When LP64-Configured
-
-=item Linux With Sfio Fails op/misc Test 48
-
-=item OS/390
-
-=item op/sprintf tests 129 and 130
-
-=item Failure of Thread tests
-
-=item UNICOS
-
-=item UTS
-
-=item VMS
-
-=item Win32
-
-=item Localising a Tied Variable Leaks Memory
-
-=item Self-tying of Arrays and Hashes Is Forbidden
-
-=item Variable Attributes are not Currently Usable for Tieing
-
-=item Building Extensions Can Fail Because Of Largefiles
-
-=item The Compiler Suite Is Still Experimental
-
-=item The Long Double Support is Still Experimental
-
-=back
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 perl571delta - what's new for perl v5.7.1
-
-=over 4
-
-=item DESCRIPTION
-
-=item Security Vulnerability Closed
-
-=item Incompatible Changes
-
-=item Core Enhancements
-
-=over 4
-
-=item AUTOLOAD Is Now Lvaluable
-
-=item PerlIO is Now The Default
-
-=item Signals Are Now Safe
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item New Modules
-
-=item Updated And Improved Modules and Pragmata
-
-=back
-
-=item Performance Enhancements
-
-=item Utility Changes
-
-=item New Documentation
-
-=over 4
-
-=item perlclib
-
-=item perliol
-
-=item README.aix
-
-=item README.bs2000
-
-=item README.macos
-
-=item README.mpeix
-
-=item README.solaris
-
-=item README.vos
-
-=item Porting/repository.pod
-
-=back
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item New Or Improved Platforms
-
-=item Generic Improvements
-
-d_cmsghdr, d_fcntl_can_lock, d_fsync, d_getitimer, d_getpagsz, d_msghdr_s,
-need_va_copy, d_readv, d_recvmsg, d_sendmsg, sig_size, d_sockatmark,
-d_strtoq, d_u32align, d_ualarm, d_usleep
-
-=back
-
-=item Selected Bug Fixes
-
-=over 4
-
-=item Platform Specific Changes and Fixes
-
-=back
-
-=item New or Changed Diagnostics
-
-=item Changed Internals
-
-=item New Tests
-
-=item Known Problems
-
-=over 4
-
-=item AIX vac 5.0.0.0 May Produce Buggy Code For Perl
-
-=item lib/ftmp-security tests warn 'system possibly insecure'
-
-=item lib/io_multihomed Fails In LP64-Configured HP-UX
-
-=item Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX
-
-=item lib/b test 19
-
-=item Linux With Sfio Fails op/misc Test 48
-
-=item sigaction test 13 in VMS
-
-=item sprintf tests 129 and 130
-
-=item Failure of Thread tests
-
-=item Localising a Tied Variable Leaks Memory
-
-=item Self-tying of Arrays and Hashes Is Forbidden
-
-=item Building Extensions Can Fail Because Of Largefiles
-
-=item The Compiler Suite Is Still Experimental
-
-=back
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 perl570delta - what's new for perl v5.7.0
-
-=over 4
-
-=item DESCRIPTION
-
-=item Security Vulnerability Closed
-
-=item Incompatible Changes
-
-=item Core Enhancements
-
-=item Modules and Pragmata
-
-=over 4
-
-=item New Modules
-
-=item Updated And Improved Modules and Pragmata
-
-=back
-
-=item Utility Changes
-
-=item New Documentation
-
-=item Performance Enhancements
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item Generic Improvements
-
-=back
-
-=item Selected Bug Fixes
-
-=over 4
-
-=item Platform Specific Changes and Fixes
-
-=back
-
-=item New or Changed Diagnostics
-
-=item Changed Internals
-
-=item Known Problems
-
-=over 4
-
-=item Unicode Support Still Far From Perfect
-
-=item EBCDIC Still A Lost Platform
-
-=item Building Extensions Can Fail Because Of Largefiles
-
-=item ftmp-security tests warn 'system possibly insecure'
-
-=item Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX
-
-=item Long Doubles Still Don't Work In Solaris
-
-=item Linux With Sfio Fails op/misc Test 48
-
-=item Storable tests fail in some platforms
-
-=item Threads Are Still Experimental
-
-=item The Compiler Suite Is Still Experimental
-
-=back
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 perl561delta - what's new for perl v5.6.x
-
-=over 4
-
-=item DESCRIPTION
-
-=item Summary of changes between 5.6.0 and 5.6.1
-
-=over 4
-
-=item Security Issues
-
-=item Core bug fixes
-
-C<UNIVERSAL::isa()>, Memory leaks, Numeric conversions, qw(a\\b), caller(),
-Bugs in regular expressions, "slurp" mode, Autovivification of symbolic
-references to special variables, Lexical warnings, Spurious warnings and
-errors, glob(), Tainting, sort(), #line directives, Subroutine prototypes,
-map(), Debugger, PERL5OPT, chop(), Unicode support, 64-bit support,
-Compiler, Lvalue subroutines, IO::Socket, File::Find, xsubpp, C<no
-Module;>, Tests
-
-=item Core features
-
-=item Configuration issues
-
-=item Documentation
-
-=item Bundled modules
-
-B::Concise, File::Temp, Pod::LaTeX, Pod::Text::Overstrike, CGI, CPAN,
-Class::Struct, DB_File, Devel::Peek, File::Find, Getopt::Long, IO::Poll,
-IPC::Open3, Math::BigFloat, Math::Complex, Net::Ping, Opcode, Pod::Parser,
-Pod::Text, SDBM_File, Sys::Syslog, Tie::RefHash, Tie::SubstrHash
-
-=item Platform-specific improvements
-
-NCR MP-RAS, NonStop-UX
-
-=back
-
-=item Core Enhancements
-
-=over 4
-
-=item Interpreter cloning, threads, and concurrency
-
-=item Lexically scoped warning categories
-
-=item Unicode and UTF-8 support
-
-=item Support for interpolating named characters
-
-=item "our" declarations
-
-=item Support for strings represented as a vector of ordinals
-
-=item Improved Perl version numbering system
-
-=item New syntax for declaring subroutine attributes
-
-=item File and directory handles can be autovivified
-
-=item open() with more than two arguments
-
-=item 64-bit support
-
-=item Large file support
-
-=item Long doubles
-
-=item "more bits"
-
-=item Enhanced support for sort() subroutines
-
-=item C<sort $coderef @foo> allowed
-
-=item File globbing implemented internally
-
-=item Support for CHECK blocks
-
-=item POSIX character class syntax [: :] supported
-
-=item Better pseudo-random number generator
-
-=item Improved C<qw//> operator
-
-=item Better worst-case behavior of hashes
-
-=item pack() format 'Z' supported
-
-=item pack() format modifier '!' supported
-
-=item pack() and unpack() support counted strings
-
-=item Comments in pack() templates
-
-=item Weak references
-
-=item Binary numbers supported
-
-=item Lvalue subroutines
-
-=item Some arrows may be omitted in calls through references
-
-=item Boolean assignment operators are legal lvalues
-
-=item exists() is supported on subroutine names
-
-=item exists() and delete() are supported on array elements
-
-=item Pseudo-hashes work better
-
-=item Automatic flushing of output buffers
-
-=item Better diagnostics on meaningless filehandle operations
-
-=item Where possible, buffered data discarded from duped input filehandle
-
-=item eof() has the same old magic as <>
-
-=item binmode() can be used to set :crlf and :raw modes
-
-=item C<-T> filetest recognizes UTF-8 encoded files as "text"
-
-=item system(), backticks and pipe open now reflect exec() failure
-
-=item Improved diagnostics
-
-=item Diagnostics follow STDERR
-
-=item More consistent close-on-exec behavior
-
-=item syswrite() ease-of-use
-
-=item Better syntax checks on parenthesized unary operators
-
-=item Bit operators support full native integer width
-
-=item Improved security features
-
-=item More functional bareword prototype (*)
-
-=item C<require> and C<do> may be overridden
-
-=item $^X variables may now have names longer than one character
-
-=item New variable $^C reflects C<-c> switch
-
-=item New variable $^V contains Perl version as a string
-
-=item Optional Y2K warnings
-
-=item Arrays now always interpolate into double-quoted strings
-
-=item @- and @+ provide starting/ending offsets of regex submatches
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item Modules
-
-attributes, B, Benchmark, ByteLoader, constant, charnames, Data::Dumper,
-DB, DB_File, Devel::DProf, Devel::Peek, Dumpvalue, DynaLoader, English,
-Env, Fcntl, File::Compare, File::Find, File::Glob, File::Spec,
-File::Spec::Functions, Getopt::Long, IO, JPL, lib, Math::BigInt,
-Math::Complex, Math::Trig, Pod::Parser, Pod::InputObjects, Pod::Checker,
-podchecker, Pod::ParseUtils, Pod::Find, Pod::Select, podselect, Pod::Usage,
-pod2usage, Pod::Text and Pod::Man, SDBM_File, Sys::Syslog, Sys::Hostname,
-Term::ANSIColor, Time::Local, Win32, XSLoader, DBM Filters
-
-=item Pragmata
-
-=back
-
-=item Utility Changes
-
-=over 4
-
-=item dprofpp
-
-=item find2perl
-
-=item h2xs
-
-=item perlcc
-
-=item perldoc
-
-=item The Perl Debugger
-
-=back
-
-=item Improved Documentation
-
-perlapi.pod, perlboot.pod, perlcompile.pod, perldbmfilter.pod,
-perldebug.pod, perldebguts.pod, perlfork.pod, perlfilter.pod, perlhack.pod,
-perlintern.pod, perllexwarn.pod, perlnumber.pod, perlopentut.pod,
-perlreftut.pod, perltootc.pod, perltodo.pod, perlunicode.pod
-
-=item Performance enhancements
-
-=over 4
-
-=item Simple sort() using { $a <=> $b } and the like are optimized
-
-=item Optimized assignments to lexical variables
-
-=item Faster subroutine calls
-
-=item delete(), each(), values() and hash iteration are faster
-
-=back
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item -Dusethreads means something different
-
-=item New Configure flags
-
-=item Threadedness and 64-bitness now more daring
-
-=item Long Doubles
-
-=item -Dusemorebits
-
-=item -Duselargefiles
-
-=item installusrbinperl
-
-=item SOCKS support
-
-=item C<-A> flag
-
-=item Enhanced Installation Directories
-
-=item gcc automatically tried if 'cc' does not seem to be working
-
-=back
-
-=item Platform specific changes
-
-=over 4
-
-=item Supported platforms
-
-=item DOS
-
-=item OS390 (OpenEdition MVS)
-
-=item VMS
-
-=item Win32
-
-=back
-
-=item Significant bug fixes
-
-=over 4
-
-=item <HANDLE> on empty files
-
-=item C<eval '...'> improvements
-
-=item All compilation errors are true errors
-
-=item Implicitly closed filehandles are safer
-
-=item Behavior of list slices is more consistent
-
-=item C<(\$)> prototype and C<$foo{a}>
-
-=item C<goto &sub> and AUTOLOAD
-
-=item C<-bareword> allowed under C<use integer>
-
-=item Failures in DESTROY()
-
-=item Locale bugs fixed
-
-=item Memory leaks
-
-=item Spurious subroutine stubs after failed subroutine calls
-
-=item Taint failures under C<-U>
-
-=item END blocks and the C<-c> switch
-
-=item Potential to leak DATA filehandles
-
-=back
-
-=item New or Changed Diagnostics
-
-"%s" variable %s masks earlier declaration in same %s, "my sub" not yet
-implemented, "our" variable %s redeclared, '!' allowed only after types %s,
-/ cannot take a count, / must be followed by a, A or Z, / must be followed
-by a*, A* or Z*, / must follow a numeric type, /%s/: Unrecognized escape
-\\%c passed through, /%s/: Unrecognized escape \\%c in character class
-passed through, /%s/ should probably be written as "%s", %s() called too
-early to check prototype, %s argument is not a HASH or ARRAY element, %s
-argument is not a HASH or ARRAY element or slice, %s argument is not a
-subroutine name, %s package attribute may clash with future reserved word:
-%s, (in cleanup) %s, <> should be quotes, Attempt to join self, Bad evalled
-substitution pattern, Bad realloc() ignored, Bareword found in conditional,
-Binary number > 0b11111111111111111111111111111111 non-portable, Bit vector
-size > 32 non-portable, Buffer overflow in prime_env_iter: %s, Can't check
-filesystem of script "%s", Can't declare class for non-scalar %s in "%s",
-Can't declare %s in "%s", Can't ignore signal CHLD, forcing to default,
-Can't modify non-lvalue subroutine call, Can't read CRTL environ, Can't
-remove %s: %s, skipping file, Can't return %s from lvalue subroutine, Can't
-weaken a nonreference, Character class [:%s:] unknown, Character class
-syntax [%s] belongs inside character classes, Constant is not %s reference,
-constant(%s): %s, CORE::%s is not a keyword, defined(@array) is deprecated,
-defined(%hash) is deprecated, Did not produce a valid header, (Did you mean
-"local" instead of "our"?), Document contains no data, entering effective
-%s failed, false [] range "%s" in regexp, Filehandle %s opened only for
-output, flock() on closed filehandle %s, Global symbol "%s" requires
-explicit package name, Hexadecimal number > 0xffffffff non-portable,
-Ill-formed CRTL environ value "%s", Ill-formed message in prime_env_iter:
-|%s|, Illegal binary digit %s, Illegal binary digit %s ignored, Illegal
-number of bits in vec, Integer overflow in %s number, Invalid %s attribute:
-%s, Invalid %s attributes: %s, invalid [] range "%s" in regexp, Invalid
-separator character %s in attribute list, Invalid separator character %s in
-subroutine attribute list, leaving effective %s failed, Lvalue subs
-returning %s not implemented yet, Method %s not permitted, Missing
-%sbrace%s on \N{}, Missing command in piped open, Missing name in "my sub",
-No %s specified for -%c, No package name allowed for variable %s in "our",
-No space allowed after -%c, no UTC offset information; assuming local time
-is UTC, Octal number > 037777777777 non-portable, panic: del_backref,
-panic: kid popen errno read, panic: magic_killbackrefs, Parentheses missing
-around "%s" list, Possible unintended interpolation of %s in string,
-Possible Y2K bug: %s, pragma "attrs" is deprecated, use "sub NAME : ATTRS"
-instead, Premature end of script headers, Repeat count in pack overflows,
-Repeat count in unpack overflows, realloc() of freed memory ignored,
-Reference is already weak, setpgrp can't take arguments, Strange *+?{} on
-zero-length expression, switching effective %s is not implemented, This
-Perl can't reset CRTL environ elements (%s), This Perl can't set CRTL
-environ elements (%s=%s), Too late to run %s block, Unknown open() mode
-'%s', Unknown process %x sent message to prime_env_iter: %s, Unrecognized
-escape \\%c passed through, Unterminated attribute parameter in attribute
-list, Unterminated attribute list, Unterminated attribute parameter in
-subroutine attribute list, Unterminated subroutine attribute list, Value of
-CLI symbol "%s" too long, Version number must be a constant number
-
-=item New tests
-
-=item Incompatible Changes
-
-=over 4
-
-=item Perl Source Incompatibilities
-
-CHECK is a new keyword, Treatment of list slices of undef has changed,
-Format of $English::PERL_VERSION is different, Literals of the form
-C<1.2.3> parse differently, Possibly changed pseudo-random number
-generator, Hashing function for hash keys has changed, C<undef> fails on
-read only values, Close-on-exec bit may be set on pipe and socket handles,
-Writing C<"$$1"> to mean C<"${$}1"> is unsupported, delete(), each(),
-values() and C<\(%h)>, vec(EXPR,OFFSET,BITS) enforces powers-of-two BITS,
-Text of some diagnostic output has changed, C<%@> has been removed,
-Parenthesized not() behaves like a list operator, Semantics of bareword
-prototype C<(*)> have changed, Semantics of bit operators may have changed
-on 64-bit platforms, More builtins taint their results
-
-=item C Source Incompatibilities
-
-C<PERL_POLLUTE>, C<PERL_IMPLICIT_CONTEXT>, C<PERL_POLLUTE_MALLOC>
-
-=item Compatible C Source API Changes
-
-C<PATCHLEVEL> is now C<PERL_VERSION>
-
-=item Binary Incompatibilities
-
-=back
-
-=item Known Problems
-
-=over 4
-
-=item Localizing a tied hash element may leak memory
-
-=item Known test failures
-
-=item EBCDIC platforms not fully supported
-
-=item UNICOS/mk CC failures during Configure run
-
-=item Arrow operator and arrays
-
-=item Experimental features
-
-Threads, Unicode, 64-bit support, Lvalue subroutines, Weak references, The
-pseudo-hash data type, The Compiler suite, Internal implementation of file
-globbing, The DB module, The regular expression code constructs:
-
-=back
-
-=item Obsolete Diagnostics
-
-Character class syntax [: :] is reserved for future extensions, Ill-formed
-logical name |%s| in prime_env_iter, In string, @%s now must be written as
-\@%s, Probable precedence problem on %s, regexp too big, Use of "$$<digit>"
-to mean "${$}<digit>" is deprecated
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 perl56delta - what's new for perl v5.6.0
-
-=over 4
-
-=item DESCRIPTION
-
-=item Core Enhancements
-
-=over 4
-
-=item Interpreter cloning, threads, and concurrency
-
-=item Lexically scoped warning categories
-
-=item Unicode and UTF-8 support
-
-=item Support for interpolating named characters
-
-=item "our" declarations
-
-=item Support for strings represented as a vector of ordinals
-
-=item Improved Perl version numbering system
-
-=item New syntax for declaring subroutine attributes
-
-=item File and directory handles can be autovivified
-
-=item open() with more than two arguments
-
-=item 64-bit support
-
-=item Large file support
-
-=item Long doubles
-
-=item "more bits"
-
-=item Enhanced support for sort() subroutines
-
-=item C<sort $coderef @foo> allowed
-
-=item File globbing implemented internally
-
-=item Support for CHECK blocks
-
-=item POSIX character class syntax [: :] supported
-
-=item Better pseudo-random number generator
-
-=item Improved C<qw//> operator
-
-=item Better worst-case behavior of hashes
-
-=item pack() format 'Z' supported
-
-=item pack() format modifier '!' supported
-
-=item pack() and unpack() support counted strings
-
-=item Comments in pack() templates
-
-=item Weak references
-
-=item Binary numbers supported
-
-=item Lvalue subroutines
-
-=item Some arrows may be omitted in calls through references
-
-=item Boolean assignment operators are legal lvalues
-
-=item exists() is supported on subroutine names
-
-=item exists() and delete() are supported on array elements
-
-=item Pseudo-hashes work better
-
-=item Automatic flushing of output buffers
-
-=item Better diagnostics on meaningless filehandle operations
-
-=item Where possible, buffered data discarded from duped input filehandle
-
-=item eof() has the same old magic as <>
-
-=item binmode() can be used to set :crlf and :raw modes
-
-=item C<-T> filetest recognizes UTF-8 encoded files as "text"
-
-=item system(), backticks and pipe open now reflect exec() failure
-
-=item Improved diagnostics
-
-=item Diagnostics follow STDERR
-
-=item More consistent close-on-exec behavior
-
-=item syswrite() ease-of-use
-
-=item Better syntax checks on parenthesized unary operators
-
-=item Bit operators support full native integer width
-
-=item Improved security features
-
-=item More functional bareword prototype (*)
-
-=item C<require> and C<do> may be overridden
-
-=item $^X variables may now have names longer than one character
-
-=item New variable $^C reflects C<-c> switch
-
-=item New variable $^V contains Perl version as a string
-
-=item Optional Y2K warnings
-
-=item Arrays now always interpolate into double-quoted strings
-
-=item @- and @+ provide starting/ending offsets of regex matches
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item Modules
-
-attributes, B, Benchmark, ByteLoader, constant, charnames, Data::Dumper,
-DB, DB_File, Devel::DProf, Devel::Peek, Dumpvalue, DynaLoader, English,
-Env, Fcntl, File::Compare, File::Find, File::Glob, File::Spec,
-File::Spec::Functions, Getopt::Long, IO, JPL, lib, Math::BigInt,
-Math::Complex, Math::Trig, Pod::Parser, Pod::InputObjects, Pod::Checker,
-podchecker, Pod::ParseUtils, Pod::Find, Pod::Select, podselect, Pod::Usage,
-pod2usage, Pod::Text and Pod::Man, SDBM_File, Sys::Syslog, Sys::Hostname,
-Term::ANSIColor, Time::Local, Win32, XSLoader, DBM Filters
-
-=item Pragmata
-
-=back
-
-=item Utility Changes
-
-=over 4
-
-=item dprofpp
-
-=item find2perl
-
-=item h2xs
-
-=item perlcc
-
-=item perldoc
-
-=item The Perl Debugger
-
-=back
-
-=item Improved Documentation
-
-perlapi.pod, perlboot.pod, perlcompile.pod, perldbmfilter.pod,
-perldebug.pod, perldebguts.pod, perlfork.pod, perlfilter.pod, perlhack.pod,
-perlintern.pod, perllexwarn.pod, perlnumber.pod, perlopentut.pod,
-perlreftut.pod, perltootc.pod, perltodo.pod, perlunicode.pod
-
-=item Performance enhancements
-
-=over 4
-
-=item Simple sort() using { $a <=> $b } and the like are optimized
-
-=item Optimized assignments to lexical variables
-
-=item Faster subroutine calls
-
-=item delete(), each(), values() and hash iteration are faster
-
-=back
-
-=item Installation and Configuration Improvements
-
-=over 4
-
-=item -Dusethreads means something different
-
-=item New Configure flags
-
-=item Threadedness and 64-bitness now more daring
-
-=item Long Doubles
-
-=item -Dusemorebits
-
-=item -Duselargefiles
-
-=item installusrbinperl
-
-=item SOCKS support
-
-=item C<-A> flag
-
-=item Enhanced Installation Directories
-
-=back
-
-=item Platform specific changes
-
-=over 4
-
-=item Supported platforms
-
-=item DOS
-
-=item OS390 (OpenEdition MVS)
-
-=item VMS
-
-=item Win32
-
-=back
-
-=item Significant bug fixes
-
-=over 4
-
-=item <HANDLE> on empty files
-
-=item C<eval '...'> improvements
-
-=item All compilation errors are true errors
-
-=item Implicitly closed filehandles are safer
-
-=item Behavior of list slices is more consistent
-
-=item C<(\$)> prototype and C<$foo{a}>
-
-=item C<goto &sub> and AUTOLOAD
-
-=item C<-bareword> allowed under C<use integer>
-
-=item Failures in DESTROY()
-
-=item Locale bugs fixed
-
-=item Memory leaks
-
-=item Spurious subroutine stubs after failed subroutine calls
-
-=item Taint failures under C<-U>
-
-=item END blocks and the C<-c> switch
-
-=item Potential to leak DATA filehandles
-
-=back
-
-=item New or Changed Diagnostics
-
-"%s" variable %s masks earlier declaration in same %s, "my sub" not yet
-implemented, "our" variable %s redeclared, '!' allowed only after types %s,
-/ cannot take a count, / must be followed by a, A or Z, / must be followed
-by a*, A* or Z*, / must follow a numeric type, /%s/: Unrecognized escape
-\\%c passed through, /%s/: Unrecognized escape \\%c in character class
-passed through, /%s/ should probably be written as "%s", %s() called too
-early to check prototype, %s argument is not a HASH or ARRAY element, %s
-argument is not a HASH or ARRAY element or slice, %s argument is not a
-subroutine name, %s package attribute may clash with future reserved word:
-%s, (in cleanup) %s, <> should be quotes, Attempt to join self, Bad evalled
-substitution pattern, Bad realloc() ignored, Bareword found in conditional,
-Binary number > 0b11111111111111111111111111111111 non-portable, Bit vector
-size > 32 non-portable, Buffer overflow in prime_env_iter: %s, Can't check
-filesystem of script "%s", Can't declare class for non-scalar %s in "%s",
-Can't declare %s in "%s", Can't ignore signal CHLD, forcing to default,
-Can't modify non-lvalue subroutine call, Can't read CRTL environ, Can't
-remove %s: %s, skipping file, Can't return %s from lvalue subroutine, Can't
-weaken a nonreference, Character class [:%s:] unknown, Character class
-syntax [%s] belongs inside character classes, Constant is not %s reference,
-constant(%s): %s, CORE::%s is not a keyword, defined(@array) is deprecated,
-defined(%hash) is deprecated, Did not produce a valid header, (Did you mean
-"local" instead of "our"?), Document contains no data, entering effective
-%s failed, false [] range "%s" in regexp, Filehandle %s opened only for
-output, flock() on closed filehandle %s, Global symbol "%s" requires
-explicit package name, Hexadecimal number > 0xffffffff non-portable,
-Ill-formed CRTL environ value "%s", Ill-formed message in prime_env_iter:
-|%s|, Illegal binary digit %s, Illegal binary digit %s ignored, Illegal
-number of bits in vec, Integer overflow in %s number, Invalid %s attribute:
-%s, Invalid %s attributes: %s, invalid [] range "%s" in regexp, Invalid
-separator character %s in attribute list, Invalid separator character %s in
-subroutine attribute list, leaving effective %s failed, Lvalue subs
-returning %s not implemented yet, Method %s not permitted, Missing
-%sbrace%s on \N{}, Missing command in piped open, Missing name in "my sub",
-No %s specified for -%c, No package name allowed for variable %s in "our",
-No space allowed after -%c, no UTC offset information; assuming local time
-is UTC, Octal number > 037777777777 non-portable, panic: del_backref,
-panic: kid popen errno read, panic: magic_killbackrefs, Parentheses missing
-around "%s" list, Possible unintended interpolation of %s in string,
-Possible Y2K bug: %s, pragma "attrs" is deprecated, use "sub NAME : ATTRS"
-instead, Premature end of script headers, Repeat count in pack overflows,
-Repeat count in unpack overflows, realloc() of freed memory ignored,
-Reference is already weak, setpgrp can't take arguments, Strange *+?{} on
-zero-length expression, switching effective %s is not implemented, This
-Perl can't reset CRTL environ elements (%s), This Perl can't set CRTL
-environ elements (%s=%s), Too late to run %s block, Unknown open() mode
-'%s', Unknown process %x sent message to prime_env_iter: %s, Unrecognized
-escape \\%c passed through, Unterminated attribute parameter in attribute
-list, Unterminated attribute list, Unterminated attribute parameter in
-subroutine attribute list, Unterminated subroutine attribute list, Value of
-CLI symbol "%s" too long, Version number must be a constant number
-
-=item New tests
-
-=item Incompatible Changes
-
-=over 4
-
-=item Perl Source Incompatibilities
-
-CHECK is a new keyword, Treatment of list slices of undef has changed,
-Format of $English::PERL_VERSION is different, Literals of the form
-C<1.2.3> parse differently, Possibly changed pseudo-random number
-generator, Hashing function for hash keys has changed, C<undef> fails on
-read only values, Close-on-exec bit may be set on pipe and socket handles,
-Writing C<"$$1"> to mean C<"${$}1"> is unsupported, delete(), each(),
-values() and C<\(%h)>, vec(EXPR,OFFSET,BITS) enforces powers-of-two BITS,
-Text of some diagnostic output has changed, C<%@> has been removed,
-Parenthesized not() behaves like a list operator, Semantics of bareword
-prototype C<(*)> have changed, Semantics of bit operators may have changed
-on 64-bit platforms, More builtins taint their results
-
-=item C Source Incompatibilities
-
-C<PERL_POLLUTE>, C<PERL_IMPLICIT_CONTEXT>, C<PERL_POLLUTE_MALLOC>
-
-=item Compatible C Source API Changes
-
-C<PATCHLEVEL> is now C<PERL_VERSION>
-
-=item Binary Incompatibilities
-
-=back
-
-=item Known Problems
-
-=over 4
-
-=item Thread test failures
-
-=item EBCDIC platforms not supported
-
-=item In 64-bit HP-UX the lib/io_multihomed test may hang
-
-=item NEXTSTEP 3.3 POSIX test failure
-
-=item Tru64 (aka Digital UNIX, aka DEC OSF/1) lib/sdbm test failure with
-gcc
-
-=item UNICOS/mk CC failures during Configure run
-
-=item Arrow operator and arrays
-
-=item Experimental features
-
-Threads, Unicode, 64-bit support, Lvalue subroutines, Weak references, The
-pseudo-hash data type, The Compiler suite, Internal implementation of file
-globbing, The DB module, The regular expression code constructs:
-
-=back
-
-=item Obsolete Diagnostics
-
-Character class syntax [: :] is reserved for future extensions, Ill-formed
-logical name |%s| in prime_env_iter, In string, @%s now must be written as
-\@%s, Probable precedence problem on %s, regexp too big, Use of "$$<digit>"
-to mean "${$}<digit>" is deprecated
-
-=item Reporting Bugs
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 perl5005delta - what's new for perl5.005
-
-=over 4
-
-=item DESCRIPTION
-
-=item About the new versioning system
-
-=item Incompatible Changes
-
-=over 4
-
-=item WARNING: This version is not binary compatible with Perl 5.004.
-
-=item Default installation structure has changed
-
-=item Perl Source Compatibility
-
-=item C Source Compatibility
-
-=item Binary Compatibility
-
-=item Security fixes may affect compatibility
-
-=item Relaxed new mandatory warnings introduced in 5.004
-
-=item Licensing
-
-=back
-
-=item Core Changes
-
-=over 4
-
-=item Threads
-
-=item Compiler
-
-=item Regular Expressions
-
-Many new and improved optimizations, Many bug fixes, New regular expression
-constructs, New operator for precompiled regular expressions, Other
-improvements, Incompatible changes
-
-=item Improved malloc()
-
-=item Quicksort is internally implemented
-
-=item Reliable signals
-
-=item Reliable stack pointers
-
-=item More generous treatment of carriage returns
-
-=item Memory leaks
-
-=item Better support for multiple interpreters
-
-=item Behavior of local() on array and hash elements is now well-defined
-
-=item C<%!> is transparently tied to the L<Errno> module
-
-=item Pseudo-hashes are supported
-
-=item C<EXPR foreach EXPR> is supported
-
-=item Keywords can be globally overridden
-
-=item C<$^E> is meaningful on Win32
-
-=item C<foreach (1..1000000)> optimized
-
-=item C<Foo::> can be used as implicitly quoted package name
-
-=item C<exists $Foo::{Bar::}> tests existence of a package
-
-=item Better locale support
-
-=item Experimental support for 64-bit platforms
-
-=item prototype() returns useful results on builtins
-
-=item Extended support for exception handling
-
-=item Re-blessing in DESTROY() supported for chaining DESTROY() methods
-
-=item All C<printf> format conversions are handled internally
-
-=item New C<INIT> keyword
-
-=item New C<lock> keyword
-
-=item New C<qr//> operator
-
-=item C<our> is now a reserved word
-
-=item Tied arrays are now fully supported
-
-=item Tied handles support is better
-
-=item 4th argument to substr
-
-=item Negative LENGTH argument to splice
-
-=item Magic lvalues are now more magical
-
-=item <> now reads in records
-
-=back
-
-=item Supported Platforms
-
-=over 4
-
-=item New Platforms
-
-=item Changes in existing support
-
-=back
-
-=item Modules and Pragmata
-
-=over 4
-
-=item New Modules
-
-B, Data::Dumper, Dumpvalue, Errno, File::Spec, ExtUtils::Installed,
-ExtUtils::Packlist, Fatal, IPC::SysV, Test, Tie::Array, Tie::Handle,
-Thread, attrs, fields, re
-
-=item Changes in existing modules
-
-Benchmark, Carp, CGI, Fcntl, Math::Complex, Math::Trig, POSIX, DB_File,
-MakeMaker, CPAN, Cwd
-
-=back
-
-=item Utility Changes
-
-=item Documentation Changes
-
-=item New Diagnostics
-
-Ambiguous call resolved as CORE::%s(), qualify as such or use &, Bad index
-while coercing array into hash, Bareword "%s" refers to nonexistent
-package, Can't call method "%s" on an undefined value, Can't check
-filesystem of script "%s" for nosuid, Can't coerce array into hash, Can't
-goto subroutine from an eval-string, Can't localize pseudo-hash element,
-Can't use %%! because Errno.pm is not available, Cannot find an opnumber
-for "%s", Character class syntax [. .] is reserved for future extensions,
-Character class syntax [: :] is reserved for future extensions, Character
-class syntax [= =] is reserved for future extensions, %s: Eval-group in
-insecure regular expression, %s: Eval-group not allowed, use re 'eval', %s:
-Eval-group not allowed at run time, Explicit blessing to '' (assuming
-package main), Illegal hex digit ignored, No such array field, No such
-field "%s" in variable %s of type %s, Out of memory during ridiculously
-large request, Range iterator outside integer range, Recursive inheritance
-detected while looking for method '%s' %s, Reference found where even-sized
-list expected, Undefined value assigned to typeglob, Use of reserved word
-"%s" is deprecated, perl: warning: Setting locale failed
-
-=item Obsolete Diagnostics
-
-Can't mktemp(), Can't write to temp file for B<-e>: %s, Cannot open
-temporary file, regexp too big
-
-=item Configuration Changes
-
-=item BUGS
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 perl5004delta - what's new for perl5.004
-
-=over 4
-
-=item DESCRIPTION
-
-=item Supported Environments
-
-=item Core Changes
-
-=over 4
-
-=item List assignment to %ENV works
-
-=item Change to "Can't locate Foo.pm in @INC" error
-
-=item Compilation option: Binary compatibility with 5.003
-
-=item $PERL5OPT environment variable
-
-=item Limitations on B<-M>, B<-m>, and B<-T> options
-
-=item More precise warnings
-
-=item Deprecated: Inherited C<AUTOLOAD> for non-methods
-
-=item Previously deprecated %OVERLOAD is no longer usable
-
-=item Subroutine arguments created only when they're modified
-
-=item Group vector changeable with C<$)>
-
-=item Fixed parsing of $$<digit>, &$<digit>, etc.
-
-=item Fixed localization of $<digit>, $&, etc.
-
-=item No resetting of $. on implicit close
-
-=item C<wantarray> may return undef
-
-=item C<eval EXPR> determines value of EXPR in scalar context
-
-=item Changes to tainting checks
-
-No glob() or <*>, No spawning if tainted $CDPATH, $ENV, $BASH_ENV, No
-spawning if tainted $TERM doesn't look like a terminal name
-
-=item New Opcode module and revised Safe module
-
-=item Embedding improvements
-
-=item Internal change: FileHandle class based on IO::* classes
-
-=item Internal change: PerlIO abstraction interface
-
-=item New and changed syntax
-
-$coderef->(PARAMS)
-
-=item New and changed builtin constants
-
-__PACKAGE__
-
-=item New and changed builtin variables
-
-$^E, $^H, $^M
-
-=item New and changed builtin functions
-
-delete on slices, flock, printf and sprintf, keys as an lvalue, my() in
-Control Structures, pack() and unpack(), sysseek(), use VERSION, use Module
-VERSION LIST, prototype(FUNCTION), srand, $_ as Default, C<m//gc> does not
-reset search position on failure, C<m//x> ignores whitespace before ?*+{},
-nested C<sub{}> closures work now, formats work right on changing lexicals
-
-=item New builtin methods
-
-isa(CLASS), can(METHOD), VERSION( [NEED] )
-
-=item TIEHANDLE now supported
-
-TIEHANDLE classname, LIST, PRINT this, LIST, PRINTF this, LIST, READ this
-LIST, READLINE this, GETC this, DESTROY this
-
-=item Malloc enhancements
-
--DPERL_EMERGENCY_SBRK, -DPACK_MALLOC, -DTWO_POT_OPTIMIZE
-
-=item Miscellaneous efficiency enhancements
-
-=back
-
-=item Support for More Operating Systems
-
-=over 4
-
-=item Win32
-
-=item Plan 9
-
-=item QNX
-
-=item AmigaOS
-
-=back
-
-=item Pragmata
-
-use autouse MODULE => qw(sub1 sub2 sub3), use blib, use blib 'dir', use
-constant NAME => VALUE, use locale, use ops, use vmsish
-
-=item Modules
-
-=over 4
-
-=item Required Updates
-
-=item Installation directories
-
-=item Module information summary
-
-=item Fcntl
-
-=item IO
-
-=item Math::Complex
-
-=item Math::Trig
-
-=item DB_File
-
-=item Net::Ping
-
-=item Object-oriented overrides for builtin operators
-
-=back
-
-=item Utility Changes
-
-=over 4
-
-=item pod2html
-
-Sends converted HTML to standard output
-
-=item xsubpp
-
-C<void> XSUBs now default to returning nothing
-
-=back
-
-=item C Language API Changes
-
-C<gv_fetchmethod> and C<perl_call_sv>, C<perl_eval_pv>, Extended API for
-manipulating hashes
-
-=item Documentation Changes
-
-L<perldelta>, L<perlfaq>, L<perllocale>, L<perltoot>, L<perlapio>,
-L<perlmodlib>, L<perldebug>, L<perlsec>
-
-=item New Diagnostics
-
-"my" variable %s masks earlier declaration in same scope, %s argument is
-not a HASH element or slice, Allocation too large: %lx, Allocation too
-large, Applying %s to %s will act on scalar(%s), Attempt to free
-nonexistent shared string, Attempt to use reference as lvalue in substr,
-Bareword "%s" refers to nonexistent package, Can't redefine active sort
-subroutine %s, Can't use bareword ("%s") as %s ref while "strict refs" in
-use, Cannot resolve method `%s' overloading `%s' in package `%s', Constant
-subroutine %s redefined, Constant subroutine %s undefined, Copy method did
-not return a reference, Died, Exiting pseudo-block via %s, Identifier too
-long, Illegal character %s (carriage return), Illegal switch in PERL5OPT:
-%s, Integer overflow in hex number, Integer overflow in octal number,
-internal error: glob failed, Invalid conversion in %s: "%s", Invalid type
-in pack: '%s', Invalid type in unpack: '%s', Name "%s::%s" used only once:
-possible typo, Null picture in formline, Offset outside string, Out of
-memory!, Out of memory during request for %s, panic: frexp, Possible
-attempt to put comments in qw() list, Possible attempt to separate words
-with commas, Scalar value @%s{%s} better written as $%s{%s}, Stub found
-while resolving method `%s' overloading `%s' in %s, Too late for "B<-T>"
-option, untie attempted while %d inner references still exist, Unrecognized
-character %s, Unsupported function fork, Use of "$$<digit>" to mean
-"${$}<digit>" is deprecated, Value of %s can be "0"; test with defined(),
-Variable "%s" may be unavailable, Variable "%s" will not stay shared,
-Warning: something's wrong, Ill-formed logical name |%s| in prime_env_iter,
-Got an error from DosAllocMem, Malformed PERLLIB_PREFIX, PERL_SH_DIR too
-long, Process terminated by SIG%s
-
-=item BUGS
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 perlartistic - the Perl Artistic License
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item The "Artistic License"
-
-=over 4
-
-=item Preamble
-
-=item Definitions
-
-"Package", "Standard Version", "Copyright Holder", "You", "Reasonable
-copying fee", "Freely Available"
-
-=item Conditions
-
-a), b), c), d), a), b), c), d)
-
-=back
-
-=back
-
-=head2 perlgpl - the GNU General Public License, version 2
-
-=over 4
-
-=item SYNOPSIS
-
-=back
-
-=over 4
-
-=item DESCRIPTION
-
-=item GNU GENERAL PUBLIC LICENSE
-
-=back
-
-=head2 perlaix, README.aix - Perl version 5 on IBM Unix (AIX) systems
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Compiling Perl 5 on AIX
-
-=item OS level
-
-=item Building Dynamic Extensions on AIX
-
-=item The IBM ANSI C Compiler
-
-=item The usenm option
-
-=item Using GNU's gcc for building perl
-
-=item Using Large Files with Perl
-
-=item Threaded Perl
-
-=item 64-bit Perl
-
-=item AIX 4.2 and extensions using C++ with statics
-
-=back
-
-=item AUTHOR
-
-=item DATE
-
-=back
-
-=head2 perlamiga - Perl under Amiga OS
-
-=over 4
-
-=item NOTE
-
-=item SYNOPSIS
-
-=back
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Prerequisites for Compiling Perl on AmigaOS
-
-B<Unix emulation for AmigaOS: ixemul.library>, B<Version of Amiga OS>
-
-=item Starting Perl programs under AmigaOS
-
-=item Shortcomings of Perl under AmigaOS
-
-=back
-
-=item INSTALLATION
-
-=item Accessing documentation
-
-=over 4
-
-=item Manpages for Perl on AmigaOS
-
-=item Perl HTML Documentation on AmigaOS
-
-=item Perl GNU Info Files on AmigaOS
-
-=item Perl LaTeX Documentation on AmigaOS
-
-=back
-
-=item BUILDING PERL ON AMIGAOS
-
-=over 4
-
-=item Build Prerequisites for Perl on AmigaOS
-
-=item Getting the Perl Source for AmigaOS
-
-=item Making Perl on AmigaOS
-
-=item Testing Perl on AmigaOS
-
-=item Installing the built Perl on AmigaOS
-
-=back
-
-=item PERL 5.8.0 BROKEN IN AMIGAOS
-
-=item AUTHORS
-
-=item SEE ALSO
-
-=back
-
-=head2 perlapollo, README.apollo - Perl version 5 on Apollo DomainOS
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=back
-
-=head2 perlbeos, README.beos - Perl version 5.8+ on BeOS
-
-=over 4
-
-=item DESCRIPTION
-
-=item BUILD AND INSTALL
-
-=over 4
-
-=item Requirements
-
-=item Configure
-
-=item Build
-
-=item Install
-
-=back
-
-=item KNOWN PROBLEMS
-
-=item CONTACT
-
-=back
-
-=head2 perlbs2000, README.BS2000 - building and installing Perl for BS2000.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item gzip on BS2000
-
-=item bison on BS2000
-
-=item Unpacking Perl Distribution on BS2000
-
-=item Compiling Perl on BS2000
-
-=item Testing Perl on BS2000
-
-=item Installing Perl on BS2000
-
-=item Using Perl in the Posix-Shell of BS2000
-
-=item Using Perl in "native" BS2000
-
-=item Floating point anomalies on BS2000
-
-=item Using PerlIO and different encodings on ASCII and EBCDIC partitions
-
-=back
-
-=item AUTHORS
-
-=item SEE ALSO
-
-=over 4
-
-=item Mailing list
-
-=back
-
-=item HISTORY
-
-=back
-
-=head2 perlce - Perl for WinCE
-
-=over 4
-
-=item Building Perl for WinCE
-
-=over 4
-
-=item DESCRIPTION
-
-=item General explanations on cross-compiling WinCE
-
-=item BUILD
-
-Microsoft Embedded Visual Tools, Microsoft Visual C++, Rainer Keuchel's
-celib-sources, Rainer Keuchel's console-sources, go to C<./win32>
-subdirectory, edit file C<./win32/ce-helpers/compile.bat>, run
-compile.bat, run compile.bat dist
-
-=back
-
-=item Using Perl on WinCE
-
-=over 4
-
-=item DESCRIPTION
-
-=item LIMITATIONS
-
-=item ENVIRONMENT
-
-PERL5LIB, PATH, TMP, UNIXROOTPATH, ROWS/COLS, HOME, CONSOLEFONTSIZE
-
-=item REGISTRY
-
-=item XS
-
-=item BUGS
-
-=item INSTALLATION
-
-=back
-
-=item ACKNOWLEDGEMENTS
-
-=item History of WinCE port
-
-=item AUTHORS
-
-Rainer Keuchel <coyxc at rainer-keuchel.de>, Vadim Konovalov
-
-=back
-
-=head2 perlcygwin, README.cygwin - Perl for Cygwin
-
-=over 4
-
-=item SYNOPSIS
-
-=item PREREQUISITES FOR COMPILING PERL ON CYGWIN
-
-=over 4
-
-=item Cygwin = GNU+Cygnus+Windows (Don't leave UNIX without it)
-
-=item Cygwin Configuration
-
-C<PATH>, I<nroff>, Permissions
-
-=back
-
-=item CONFIGURE PERL ON CYGWIN
-
-=over 4
-
-=item Stripping Perl Binaries on Cygwin
-
-=item Optional Libraries for Perl on Cygwin
-
-C<-lcrypt>, C<-lgdbm_compat> (C<use GDBM_File>), C<-ldb> (C<use DB_File>),
-C<cygserver> (C<use IPC::SysV>), C<-lutil>
-
-=item Configure-time Options for Perl on Cygwin
-
-C<-Uusedl>, C<-Uusemymalloc>, C<-Uuseperlio>, C<-Dusemultiplicity>,
-C<-Duse64bitint>, C<-Duselongdouble>, C<-Dusethreads>, C<-Duselargefiles>,
-C<-Dmksymlinks>
-
-=item Suspicious Warnings on Cygwin
-
-Win9x and C<d_eofnblk>, Compiler/Preprocessor defines
-
-=back
-
-=item MAKE ON CYGWIN
-
-=item TEST ON CYGWIN
-
-=over 4
-
-=item File Permissions on Cygwin
-
-=item NDBM_File and ODBM_File do not work on FAT filesystems
-
-=item C<fork()> failures in io_* tests
-
-=back
-
-=item Specific features of the Cygwin port
-
-=over 4
-
-=item Script Portability on Cygwin
-
-Pathnames, Text/Binary, PerlIO, F<.exe>, Cygwin vs. Windows process ids,
-Cygwin vs. Windows errors, C<chown()>, Miscellaneous
-
-=item Prebuilt methods:
-
-C<Cwd::cwd>, C<Cygwin::pid_to_winpid>, C<Cygwin::winpid_to_pid>,
-C<Cygwin::win_to_posix_path>, C<Cygwin::posix_to_win_path>,
-C<Cygwin::mount_table()>, C<Cygwin::mount_flags>, C<Cygwin::is_binmount>
-
-=back
-
-=item INSTALL PERL ON CYGWIN
-
-=item MANIFEST ON CYGWIN
-
-Documentation, Build, Configure, Make, Install, Tests, Compiled Perl
-Source, Compiled Module Source, Perl Modules/Scripts, Perl Module Tests
-
-=item BUGS ON CYGWIN
-
-=item AUTHORS
-
-=item HISTORY
-
-=back
-
-=head2 perldgux - Perl under DG/UX.
-
-=over 4
-
-=item SYNOPSIS
-
-=back
-
-=over 4
-
-=item DESCRIPTION
-
-=item BUILDING PERL ON DG/UX
-
-=over 4
-
-=item Non-threaded Perl on DG/UX
-
-=item Threaded Perl on DG/UX
-
-=item Testing Perl on DG/UX
-
-=item Installing the built perl on DG/UX
-
-=back
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 perldos - Perl under DOS, W31, W95.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Prerequisites for Compiling Perl on DOS
-
-DJGPP, Pthreads
-
-=item Shortcomings of Perl under DOS
-
-=item Building Perl on DOS
-
-=item Testing Perl on DOS
-
-=item Installation of Perl on DOS
-
-=back
-
-=item BUILDING AND INSTALLING MODULES ON DOS
-
-=over 4
-
-=item Building Prerequisites for Perl on DOS
-
-=item Unpacking CPAN Modules on DOS
-
-=item Building Non-XS Modules on DOS
-
-=item Building XS Modules on DOS
-
-=back
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 perlepoc, README.epoc - Perl for EPOC
-
-=over 4
-
-=item SYNOPSIS
-
-=item INTRODUCTION
-
-=item INSTALLING PERL ON EPOC
-
-=item STARTING PERL ON EPOC
-
-=over 4
-
-=item Editors on Epoc
-
-=item Features of Perl on Epoc
-
-=item Restrictions of Perl on Epoc
-
-=item Compiling Perl 5 on the EPOC cross compiling environment
-
-=back
-
-=item SUPPORT STATUS OF PERL ON EPOC
-
-=item AUTHOR
-
-=item LAST UPDATE
-
-=back
-
-=head2 perlfreebsd, README.freebsd - Perl version 5 on FreeBSD systems
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item FreeBSD core dumps from readdir_r with ithreads
-
-=item $^X doesn't always contain a full path in FreeBSD
-
-=item Perl will no longer be part of "base FreeBSD"
-
-=back
-
-=item AUTHOR
-
-=back
-
-=head2 perlhpux, README.hpux - Perl version 5 on Hewlett-Packard Unix
-(HP-UX) systems
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Using perl as shipped with HP-UX
-
-=item Using perl from HP's porting centre
-
-=item Compiling Perl 5 on HP-UX
-
-=item PA-RISC
-
-=item Portability Between PA-RISC Versions
-
-=item PA-RISC 1.0
-
-=item PA-RISC 1.1
-
-=item PA-RISC 2.0
-
-=item Itanium Processor Family (IPF) and HP-UX
-
-=item Itanium, Itanium 2 & Madison 6
-
-=item Building Dynamic Extensions on HP-UX
-
-=item The HP ANSI C Compiler
-
-=item The GNU C Compiler
-
-=item Using Large Files with Perl on HP-UX
-
-=item Threaded Perl on HP-UX
-
-=item 64-bit Perl on HP-UX
-
-=item Oracle on HP-UX
-
-=item GDBM and Threads on HP-UX
-
-=item NFS filesystems and utime(2) on HP-UX
-
-=item perl -P and // and HP-UX
-
-=item HP-UX Kernel Parameters (maxdsiz) for Compiling Perl
-
-=back
-
-=item nss_delete core dump from op/pwent or op/grent
-
-=item Miscellaneous
-
-=item AUTHOR
-
-=item DATE
-
-=back
-
-=head2 perlhurd, README.hurd - Perl version 5 on Hurd
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Known Problems with Perl on Hurd
-
-=back
-
-=item AUTHOR
-
-=back
-
-=head2 perlirix, README.irix - Perl version 5 on Irix systems
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Building 32-bit Perl in Irix
-
-=item Building 64-bit Perl in Irix
-
-=item About Compiler Versions of Irix
-
-=item Linker Problems in Irix
-
-=item Malloc in Irix
-
-=item Building with threads in Irix
-
-=item Irix 5.3
-
-=back
-
-=item AUTHOR
-
-=back
-
-=head2 perllinux, README.linux - Perl version 5 on Linux systems
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Experimental Support for Sun Studio Compilers for Linux OS
-
-=back
-
-=item AUTHOR
-
-=back
-
-=head2 perlmachten, README.machten - Perl version 5 on Power MachTen
-systems
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Perl version 5.8.x and greater not supported
-
-=item Compiling Perl 5.6.x on MachTen
-
-=item Failures during C<make test> on MachTen
-
-op/lexassign.t, pragma/warnings.t
-
-=item Building external modules on MachTen
-
-=back
-
-=item AUTHOR
-
-=item DATE
-
-=back
-
-=head2 perlmacos, README.macos - Perl under Mac OS (Classic)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item DATE
-
-=back
-
-=head2 perlmacosx, README.macosx - Perl under Mac OS X
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Installation Prefix
-
-=item SDK support
-
-=item Universal Binary support
-
-=item 64-bit PPC support
-
-=item libperl and Prebinding
-
-=item Updating Apple's Perl
-
-=item Known problems
-
-=item MacPerl
-
-=item Carbon
-
-=item Cocoa
-
-=back
-
-=item Starting From Scratch
-
-=item AUTHOR
-
-=item DATE
-
-=back
-
-=head2 perlmint, README.mint - Perl version 5 on Atari MiNT
-
-=over 4
-
-=item DESCRIPTION
-
-=item Known problems with Perl on MiNT
-
-=item AUTHOR
-
-=back
-
-=head2 perlmpeix, README.mpeix - Perl/iX for HP e3000 MPE
-
-=over 4
-
-=item SYNOPSIS
-
-=item NOTE
-
-=item Binary distribution from HP
-
-=item What's New in Perl for MPE/iX
-
-=item Welcome to Perl/iX
-
-=item System Requirements for Perl/iX
-
-=item How to Obtain Perl/iX
-
-=item Perl/iX Distribution Contents Highlights
-
-README, INSTALL, LIBSHP3K, PERL, .cpan/, lib/, man/,
-public_html/feedback.cgi, src/perl-5.6.0-mpe
-
-=item How to Compile Perl/iX
-
- 4, 6
-
-=item Getting Started with Perl/iX
-
-=item MPE/iX Implementation Considerations
-
-=item Known Perl/iX Bugs Under Investigation
-
-=item Perl/iX To-Do List
-
-=item Perl/iX Change History
-
-=item AUTHOR
-
-=back
-
-=head2 perlnetware - Perl for NetWare
-
-=over 4
-
-=item DESCRIPTION
-
-=item BUILD
-
-=over 4
-
-=item Tools & SDK
-
-=item Setup
-
-SetNWBld.bat, Buildtype.bat
-
-=item Make
-
-=item Interpreter
-
-=item Extensions
-
-=back
-
-=item INSTALL
-
-=item BUILD NEW EXTENSIONS
-
-=item ACKNOWLEDGEMENTS
-
-=item AUTHORS
-
-=item DATE
-
-=back
-
-=head2 perlopenbsd, README.openbsd - Perl version 5 on OpenBSD systems
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item OpenBSD core dumps from getprotobyname_r and getservbyname_r with
-ithreads
-
-=back
-
-=item AUTHOR
-
-=back
-
-=head2 perlos2 - Perl under OS/2, DOS, Win0.3*, Win0.95 and WinNT.
-
-=over 4
-
-=item SYNOPSIS
-
-=back
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Target
-
-=item Other OSes
-
-=item Prerequisites
-
-EMX, RSX, HPFS, pdksh
-
-=item Starting Perl programs under OS/2 (and DOS and...)
-
-=item Starting OS/2 (and DOS) programs under Perl
-
-=back
-
-=item Frequently asked questions
-
-=over 4
-
-=item "It does not work"
-
-=item I cannot run external programs
-
-=item I cannot embed perl into my program, or use F<perl.dll> from my
-program.
-
-Is your program EMX-compiled with C<-Zmt -Zcrtdll>?, Did you use
-L<ExtUtils::Embed>?
-
-=item C<``> and pipe-C<open> do not work under DOS.
-
-=item Cannot start C<find.exe "pattern" file>
-
-=back
-
-=item INSTALLATION
-
-=over 4
-
-=item Automatic binary installation
-
-C<PERL_BADLANG>, C<PERL_BADFREE>, F<Config.pm>
-
-=item Manual binary installation
-
-Perl VIO and PM executables (dynamically linked), Perl_ VIO executable
-(statically linked), Executables for Perl utilities, Main Perl library,
-Additional Perl modules, Tools to compile Perl modules, Manpages for Perl
-and utilities, Manpages for Perl modules, Source for Perl documentation,
-Perl manual in F<.INF> format, Pdksh
-
-=item B<Warning>
-
-=back
-
-=item Accessing documentation
-
-=over 4
-
-=item OS/2 F<.INF> file
-
-=item Plain text
-
-=item Manpages
-
-=item HTML
-
-=item GNU C<info> files
-
-=item F<PDF> files
-
-=item C<LaTeX> docs
-
-=back
-
-=item BUILD
-
-=over 4
-
-=item The short story
-
-=item Prerequisites
-
-=item Getting perl source
-
-=item Application of the patches
-
-=item Hand-editing
-
-=item Making
-
-=item Testing
-
-A lot of C<bad free>, Process terminated by SIGTERM/SIGINT, F<op/fs.t>,
-F<op/stat.t>
-
-=item Installing the built perl
-
-=item C<a.out>-style build
-
-=back
-
-=item Building a binary distribution
-
-=item Building custom F<.EXE> files
-
-=over 4
-
-=item Making executables with a custom collection of statically loaded
-extensions
-
-=item Making executables with a custom search-paths
-
-=back
-
-=item Build FAQ
-
-=over 4
-
-=item Some C</> became C<\> in pdksh.
-
-=item C<'errno'> - unresolved external
-
-=item Problems with tr or sed
-
-=item Some problem (forget which ;-)
-
-=item Library ... not found
-
-=item Segfault in make
-
-=item op/sprintf test failure
-
-=back
-
-=item Specific (mis)features of OS/2 port
-
-=over 4
-
-=item C<setpriority>, C<getpriority>
-
-=item C<system()>
-
-=item C<extproc> on the first line
-
-=item Additional modules:
-
-=item Prebuilt methods:
-
-C<File::Copy::syscopy>, C<DynaLoader::mod2fname>, C<Cwd::current_drive()>,
- C<Cwd::sys_chdir(name)>, C<Cwd::change_drive(name)>,
-C<Cwd::sys_is_absolute(name)>, C<Cwd::sys_is_rooted(name)>,
-C<Cwd::sys_is_relative(name)>, C<Cwd::sys_cwd(name)>,
-C<Cwd::sys_abspath(name, dir)>, C<Cwd::extLibpath([type])>,
-C<Cwd::extLibpath_set( path [, type ] )>,
-C<OS2::Error(do_harderror,do_exception)>, C<OS2::Errors2Drive(drive)>,
-OS2::SysInfo(), OS2::BootDrive(), C<OS2::MorphPM(serve)>,
-C<OS2::UnMorphPM(serve)>, C<OS2::Serve_Messages(force)>,
-C<OS2::Process_Messages(force [, cnt])>, C<OS2::_control87(new,mask)>,
-OS2::get_control87(), C<OS2::set_control87_em(new=MCW_EM,mask=MCW_EM)>,
-C<OS2::DLLname([how [, \&xsub]])>
-
-=item Prebuilt variables:
-
-$OS2::emx_rev, $OS2::emx_env, $OS2::os_ver, $OS2::is_aout, $OS2::can_fork,
-$OS2::nsyserror
-
-=item Misfeatures
-
-=item Modifications
-
-C<popen>, C<tmpnam>, C<tmpfile>, C<ctermid>, C<stat>, C<mkdir>, C<rmdir>,
-C<flock>
-
-=item Identifying DLLs
-
-=item Centralized management of resources
-
-C<HAB>, C<HMQ>, Treating errors reported by OS/2 API,
-C<CheckOSError(expr)>, C<CheckWinError(expr)>, C<SaveWinError(expr)>,
-C<SaveCroakWinError(expr,die,name1,name2)>, C<WinError_2_Perl_rc>,
-C<FillWinError>, C<FillOSError(rc)>, Loading DLLs and ordinals in DLLs
-
-=back
-
-=item Perl flavors
-
-=over 4
-
-=item F<perl.exe>
-
-=item F<perl_.exe>
-
-=item F<perl__.exe>
-
-=item F<perl___.exe>
-
-=item Why strange names?
-
-=item Why dynamic linking?
-
-=item Why chimera build?
-
-=back
-
-=item ENVIRONMENT
-
-=over 4
-
-=item C<PERLLIB_PREFIX>
-
-=item C<PERL_BADLANG>
-
-=item C<PERL_BADFREE>
-
-=item C<PERL_SH_DIR>
-
-=item C<USE_PERL_FLOCK>
-
-=item C<TMP> or C<TEMP>
-
-=back
-
-=item Evolution
-
-=over 4
-
-=item Text-mode filehandles
-
-=item Priorities
-
-=item DLL name mangling: pre 5.6.2
-
-=item DLL name mangling: 5.6.2 and beyond
-
-Global DLLs, specific DLLs, C<BEGINLIBPATH> and C<ENDLIBPATH>, F<.> from
-C<LIBPATH>
-
-=item DLL forwarder generation
-
-=item Threading
-
-=item Calls to external programs
-
-=item Memory allocation
-
-=item Threads
-
-C<COND_WAIT>, F<os2.c>
-
-=back
-
-=item BUGS
-
-=back
-
-=over 4
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 perlos390, README.os390 - building and installing Perl for OS/390
-and z/OS
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Tools
-
-=item Unpacking Perl distribution on OS/390
-
-=item Setup and utilities for Perl on OS/390
-
-=item Configure Perl on OS/390
-
-=item Build, Test, Install Perl on OS/390
-
-=item Build Anomalies with Perl on OS/390
-
-=item Testing Anomalies with Perl on OS/390
-
-=item Installation Anomalies with Perl on OS/390
-
-=item Usage Hints for Perl on OS/390
-
-=item Floating Point Anomalies with Perl on OS/390
-
-=item Modules and Extensions for Perl on OS/390
-
-=back
-
-=item AUTHORS
-
-=item SEE ALSO
-
-=over 4
-
-=item Mailing list for Perl on OS/390
-
-=back
-
-=item HISTORY
-
-=back
-
-=head2 perlos400, README.os400 - Perl version 5 on OS/400
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Compiling Perl for OS/400 PASE
-
-=item Installing Perl in OS/400 PASE
-
-=item Using Perl in OS/400 PASE
-
-=item Known Problems
-
-=item Perl on ILE
-
-=back
-
-=item AUTHORS
-
-=back
-
-=head2 perlplan9 - Plan 9-specific documentation for Perl
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Invoking Perl
-
-=item What's in Plan 9 Perl
-
-=item What's not in Plan 9 Perl
-
-=item Perl5 Functions not currently supported in Plan 9 Perl
-
-=item Signals in Plan 9 Perl
-
-=back
-
-=item COMPILING AND INSTALLING PERL ON PLAN 9
-
-=over 4
-
-=item Installing Perl Documentation on Plan 9
-
-=back
-
-=item BUGS
-
-=item Revision date
-
-=item AUTHOR
-
-=back
-
-=head2 perlqnx, README.qnx - Perl version 5 on QNX
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Required Software for Compiling Perl on QNX4
-
-/bin/sh, ar, nm, cpp, make
-
-=item Outstanding Issues with Perl on QNX4
-
-=item QNX auxiliary files
-
-qnx/ar, qnx/cpp
-
-=item Outstanding issues with perl under QNX6
-
-=back
-
-=item AUTHOR
-
-=back
-
-=head2 perlriscos, README.riscos - Perl version 5 for RISC OS
-
-=over 4
-
-=item DESCRIPTION
-
-=item BUILD
-
-=item AUTHOR
-
-=back
-
-=head2 perlsolaris, README.solaris - Perl version 5 on Solaris systems
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Solaris Version Numbers.
-
-=back
-
-=item RESOURCES
-
-Solaris FAQ, Precompiled Binaries, Solaris Documentation
-
-=item SETTING UP
-
-=over 4
-
-=item File Extraction Problems on Solaris.
-
-=item Compiler and Related Tools on Solaris.
-
-=item Environment for Compiling perl on Solaris
-
-=back
-
-=item RUN CONFIGURE.
-
-=over 4
-
-=item 64-bit perl on Solaris.
-
-=item Threads in perl on Solaris.
-
-=item Malloc Issues with perl on Solaris.
-
-=back
-
-=item MAKE PROBLEMS.
-
-Dynamic Loading Problems With GNU as and GNU ld, ld.so.1: ./perl: fatal:
-relocation error:, dlopen: stub interception failed, #error "No
-DATAMODEL_NATIVE specified", sh: ar: not found
-
-=item MAKE TEST
-
-=over 4
-
-=item op/stat.t test 4 in Solaris
-
-=item nss_delete core dump from op/pwent or op/grent
-
-=back
-
-=item PREBUILT BINARIES OF PERL FOR SOLARIS.
-
-=item RUNTIME ISSUES FOR PERL ON SOLARIS.
-
-=over 4
-
-=item Limits on Numbers of Open Files on Solaris.
-
-=back
-
-=item SOLARIS-SPECIFIC MODULES.
-
-=item SOLARIS-SPECIFIC PROBLEMS WITH MODULES.
-
-=over 4
-
-=item Proc::ProcessTable on Solaris
-
-=item BSD::Resource on Solaris
-
-=item Net::SSLeay on Solaris
-
-=back
-
-=item SunOS 4.x
-
-=item AUTHOR
-
-=back
-
-=head2 perlsymbian, README.symbian - Perl version 5 on Symbian OS
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Compiling Perl on Symbian
-
-=item Compilation problems
-
-=item PerlApp
-
-=item sisify.pl
-
-=item Using Perl in Symbian
-
-=back
-
-=item TO DO
-
-=item WARNING
-
-=item NOTE
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item LICENSE
-
-=item HISTORY
-
-=back
-
-=head2 perltru64, README.tru64 - Perl version 5 on Tru64 (formerly known as
-Digital UNIX formerly known as DEC OSF/1) systems
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Compiling Perl 5 on Tru64
-
-=item Using Large Files with Perl on Tru64
-
-=item Threaded Perl on Tru64
-
-=item Long Doubles on Tru64
-
-=item DB_File tests failing on Tru64
-
-=item 64-bit Perl on Tru64
-
-=item Warnings about floating-point overflow when compiling Perl on Tru64
-
-=back
-
-=item Testing Perl on Tru64
-
-=item ext/ODBM_File/odbm Test Failing With Static Builds
-
-=item Perl Fails Because Of Unresolved Symbol sockatmark
-
-=item AUTHOR
-
-=back
-
-=head2 perluts - Perl under UTS
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item BUILDING PERL ON UTS
-
-=item Installing the built perl on UTS
-
-=item AUTHOR
-
-=back
-
-=head2 perlvmesa, README.vmesa - building and installing Perl for VM/ESA.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Unpacking Perl Distribution on VM/ESA
-
-=item Setup Perl and utilities on VM/ESA
-
-=item Configure Perl on VM/ESA
-
-=item Testing Anomalies of Perl on VM/ESA
-
-=item Usage Hints for Perl on VM/ESA
-
-=back
-
-=item AUTHORS
-
-=item SEE ALSO
-
-=over 4
-
-=item Mailing list for Perl on VM/ESA
-
-=back
-
-=back
-
-=head2 perlvms - VMS-specific documentation for Perl
-
-=over 4
-
-=item DESCRIPTION
-
-=item Installation
-
-=item Organization of Perl Images
-
-=over 4
-
-=item Core Images
-
-=item Perl Extensions
-
-=item Installing static extensions
-
-=item Installing dynamic extensions
-
-=back
-
-=item File specifications
-
-=over 4
-
-=item Syntax
-
-=item Filename Case
-
-=item Symbolic Links
-
-=item Wildcard expansion
-
-=item Pipes
-
-=back
-
-=item PERL5LIB and PERLLIB
-
-=item The Perl Forked Debugger
-
-=item PERL_VMS_EXCEPTION_DEBUG
-
-=item Command line
-
-=over 4
-
-=item I/O redirection and backgrounding
-
-=item Command line switches
-
--i, -S, -u
-
-=back
-
-=item Perl functions
-
-File tests, backticks, binmode FILEHANDLE, crypt PLAINTEXT, USER, die,
-dump, exec LIST, fork, getpwent, getpwnam, getpwuid, gmtime, kill, qx//,
-select (system call), stat EXPR, system LIST, time, times, unlink LIST,
-utime LIST, waitpid PID,FLAGS
-
-=item Perl variables
-
-%ENV, CRTL_ENV, CLISYM_[LOCAL], Any other string, $!, $^E, $?, $|
-
-=item Standard modules with VMS-specific differences
-
-=over 4
-
-=item SDBM_File
-
-=back
-
-=item Revision date
-
-=item AUTHOR
-
-=back
-
-=head2 perlvos, README.vos - Perl for Stratus VOS
-
-=over 4
-
-=item SYNOPSIS
-
-=item BUILDING PERL FOR VOS
-
-=item INSTALLING PERL IN VOS
-
-=item USING PERL IN VOS
-
-=over 4
-
-=item Restrictions of Perl on VOS
-
-=item Handling of underflow and overflow
-
-=back
-
-=item TEST STATUS
-
-=item SUPPORT STATUS
-
-=item AUTHOR
-
-=item LAST UPDATE
-
-=back
-
-=head2 perlwin32 - Perl under Windows
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Setting Up Perl on Win32
-
-Make, Command Shell, Borland C++, Microsoft Visual C++, Microsoft Visual
-C++ 2008 Express Edition Beta 2, Microsoft Visual C++ 2005 Express Edition,
-Microsoft Visual C++ Toolkit 2003, Microsoft Platform SDK 64-bit Compiler,
-MinGW release 3 with gcc, MinGW release 1 with gcc
-
-=item Building
-
-=item Testing Perl on Win32
-
-=item Installation of Perl on Win32
-
-=item Usage Hints for Perl on Win32
-
-Environment Variables, File Globbing, Using perl from the command line,
-Building Extensions, Command-line Wildcard Expansion, Win32 Specific
-Extensions, Notes on 64-bit Windows
-
-=item Running Perl Scripts
-
-=item Miscellaneous Things
-
-=back
-
-=item BUGS AND CAVEATS
-
-=item ACKNOWLEDGEMENTS
-
-=item AUTHORS
-
-Gary Ng E<lt>71564.1743 at CompuServe.COME<gt>, Gurusamy Sarathy
-E<lt>gsar at activestate.comE<gt>, Nick Ing-Simmons
-E<lt>nick at ing-simmons.netE<gt>, Jan Dubois E<lt>jand at activestate.comE<gt>,
-Steve Hay E<lt>steve.hay at uk.radan.comE<gt>
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head1 PRAGMA DOCUMENTATION
-
-=head2 attrs - set/get attributes of a subroutine (deprecated)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-method, locked
-
-=back
-
-=head2 re - Perl pragma to alter regular expression behaviour
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item 'taint' mode
-
-=item 'eval' mode
-
-=item 'debug' mode
-
-=item 'Debug' mode
-
-Compile related options, COMPILE, PARSE, OPTIMISE, TRIEC, DUMP, Execute
-related options, EXECUTE, MATCH, TRIEE, INTUIT, Extra debugging options,
-EXTRA, BUFFERS, TRIEM, STATE, STACK, OPTIMISEM, OFFSETS, OFFSETSDBG, Other
-useful flags, ALL, All, MORE, More
-
-=item Exportable Functions
-
-is_regexp($ref), regexp_pattern($ref), regmust($ref), regname($name,$all),
-regnames($all), regnames_count()
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 threadshared::shared, threads::shared - Perl extension for sharing
-data structures between threads
-
-=over 4
-
-=item VERSION
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXPORT
-
-=item FUNCTIONS
-
-share VARIABLE, is_shared VARIABLE, lock VARIABLE, cond_wait VARIABLE,
-cond_wait CONDVAR, LOCKVAR, cond_timedwait VARIABLE, ABS_TIMEOUT,
-cond_timedwait CONDVAR, ABS_TIMEOUT, LOCKVAR, cond_signal VARIABLE,
-cond_broadcast VARIABLE
-
-=item OBJECTS
-
-=item NOTES
-
-=item BUGS AND LIMITATIONS
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 threads - Perl interpreter-based threads
-
-=over 4
-
-=item VERSION
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-$thr = threads->create(FUNCTION, ARGS), $thr->join(), $thr->detach(),
-threads->detach(), threads->self(), $thr->tid(), threads->tid(), "$thr",
-threads->object($tid), threads->yield(), threads->list(),
-threads->list(threads::all), threads->list(threads::running),
-threads->list(threads::joinable), $thr1->equal($thr2), async BLOCK;,
-$thr->error(), $thr->_handle(), threads->_handle()
-
-=item EXITING A THREAD
-
-threads->exit(), threads->exit(status), die(), exit(status), use threads
-'exit' => 'threads_only', threads->create({'exit' => 'thread_only'}, ...),
-$thr->set_thread_exit_only(boolean), threads->set_thread_exit_only(boolean)
-
-=item THREAD STATE
-
-$thr->is_running(), $thr->is_joinable(), $thr->is_detached(),
-threads->is_detached()
-
-=item THREAD CONTEXT
-
-=over 4
-
-=item Explicit context
-
-=item Implicit context
-
-=item $thr->wantarray()
-
-=item threads->wantarray()
-
-=back
-
-=item THREAD STACK SIZE
-
-threads->get_stack_size();, $size = $thr->get_stack_size();, $old_size =
-threads->set_stack_size($new_size);, use threads ('stack_size' => VALUE);,
-$ENV{'PERL5_ITHREADS_STACK_SIZE'}, threads->create({'stack_size' => VALUE},
-FUNCTION, ARGS), $thr2 = $thr1->create(FUNCTION, ARGS)
-
-=item THREAD SIGNALLING
-
-$thr->kill('SIG...');
-
-=item WARNINGS
-
-Perl exited with active threads:, Thread creation failed: pthread_create
-returned #, Thread # terminated abnormally: .., Using minimum thread stack
-size of #, Thread creation failed: pthread_attr_setstacksize(I<SIZE>)
-returned 22
-
-=item ERRORS
-
-This Perl not built to support threads, Cannot change stack size of an
-existing thread, Cannot signal threads without safe signals, Unrecognized
-signal name: ..
-
-=item BUGS AND LIMITATIONS
-
-Thread-safe modules, Using non-thread-safe modules, Current working
-directory, Environment variables, Parent-child threads, Creating threads
-inside special blocks, Unsafe signals, Perl has been built with
-C<PERL_OLD_SIGNALS> (see C<perl -V>), The environment variable
-C<PERL_SIGNALS> is set to C<unsafe> (see L<perlrun/"PERL_SIGNALS">), The
-module L<Perl::Unsafe::Signals> is used, Returning closures from threads,
-Returning objects from threads, Perl Bugs and the CPAN Version of
-L<threads>
-
-=item REQUIREMENTS
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item ACKNOWLEDGEMENTS
-
-=back
-
-=head2 attributes - get/set subroutine or variable attributes
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Built-in Attributes
-
-locked, method, lvalue
-
-=item Available Subroutines
-
-get, reftype
-
-=item Package-specific Attribute Handling
-
-FETCH_I<type>_ATTRIBUTES, MODIFY_I<type>_ATTRIBUTES
-
-=item Syntax of Attribute Lists
-
-=back
-
-=item EXPORTS
-
-=over 4
-
-=item Default exports
-
-=item Available exports
-
-=item Export tags defined
-
-=back
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=back
-
-=head2 autouse - postpone load of modules until a function is used
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item WARNING
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 base - Establish an ISA relationship with base classes at compile
-time
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item DIAGNOSTICS
-
-Base class package "%s" is empty, Class 'Foo' tried to inherit from itself
-
-=item HISTORY
-
-=item CAVEATS
-
-=item SEE ALSO
-
-=back
-
-=head2 bigint - Transparent BigInteger support for Perl
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item use integer vs. use bigint
-
-=item Options
-
-a or accuracy, p or precision, t or trace, hex, oct, l, lib, try or only, v
-or version
-
-=item Math Library
-
-=item Internal Format
-
-=item Sign
-
-=item Methods
-
-inf(), NaN(), e, PI, bexp(), bpi(), upgrade(), in_effect()
-
-=item MATH LIBRARY
-
-=item Caveat
-
-=back
-
-=item CAVAETS
-
-in_effect(), hex()/oct()
-
-=item MODULES USED
-
-=item EXAMPLES
-
-=item LICENSE
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=back
-
-=head2 bignum - Transparent BigNumber support for Perl
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Options
-
-a or accuracy, p or precision, t or trace, l or lib, hex, oct, v or version
-
-=item Methods
-
-=item Caveats
-
-inf(), NaN(), e, PI(), bexp(), bpi(), upgrade(), in_effect()
-
-=item Math Library
-
-=item INTERNAL FORMAT
-
-=item SIGN
-
-=back
-
-=item CAVAETS
-
-in_effect(), hex()/oct()
-
-=item MODULES USED
-
-=item EXAMPLES
-
-=item LICENSE
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=back
-
-=head2 bigrat - Transparent BigNumber/BigRational support for Perl
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Modules Used
-
-=item Math Library
-
-=item Sign
-
-=item Methods
-
-inf(), NaN(), e, PI, bexp(), bpi(), upgrade(), in_effect()
-
-=item MATH LIBRARY
-
-=item Cavaet
-
-=item Options
-
-a or accuracy, p or precision, t or trace, l or lib, hex, oct, v or version
-
-=back
-
-=item CAVAETS
-
-in_effect(), hex()/oct()
-
-=item EXAMPLES
-
- perl -Mbigrat -le 'print sqrt(33)'
- perl -Mbigrat -le 'print 2*255'
- perl -Mbigrat -le 'print 4.5+2*255'
- perl -Mbigrat -le 'print 3/7 + 5/7 + 8/3'
- perl -Mbigrat -le 'print 12->is_odd()';
- perl -Mbignum=l,GMP -le 'print 7 ** 7777'
-
-=item LICENSE
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=back
-
-=head2 blib - Use MakeMaker's uninstalled version of a package
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 bytes - Perl pragma to force byte semantics rather than character
-semantics
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item LIMITATIONS
-
-=item SEE ALSO
-
-=back
-
-=head2 charnames - define character names for C<\N{named}> string literal
-escapes
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item ALIASES
-
-=item CUSTOM ALIASES
-
-=over 4
-
-=item Anonymous hashes
-
-=item Alias file
-
-=item Alias shortcut
-
-=back
-
-=item charnames::viacode(code)
-
-=item charnames::vianame(name)
-
-=item CUSTOM TRANSLATORS
-
-=item ILLEGAL CHARACTERS
-
-=item BUGS
-
-=back
-
-=head2 constant - Perl pragma to declare constants
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTES
-
-=over 4
-
-=item List constants
-
-=item Defining multiple constants at once
-
-=item Magic constants
-
-=back
-
-=item TECHNICAL NOTES
-
-=item CAVEATS
-
-=item BUGS
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=back
-
-=head2 diagnostics, splain - produce verbose warning diagnostics
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item The C<diagnostics> Pragma
-
-=item The I<splain> Program
-
-=back
-
-=item EXAMPLES
-
-=item INTERNALS
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 encoding - allows you to write your script in non-ascii or non-utf8
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=over 4
-
-=item Literal Conversions
-
-=item PerlIO layers for C<STD(IN|OUT)>
-
-=item Implicit upgrading for byte strings
-
-=item Side effects
-
-=item Side effects
-
-=item Side effects
-
-=back
-
-=item FEATURES THAT REQUIRE 5.8.1
-
-"NON-EUC" doublebyte encodings, tr//, DATA pseudo-filehandle
-
-=item USAGE
-
-use encoding [I<ENCNAME>] ;, use encoding I<ENCNAME> [ STDIN =E<gt>
-I<ENCNAME_IN> ...] ;, use encoding I<ENCNAME> Filter=E<gt>1;, no encoding;
-
-=item The Filter Option
-
-=over 4
-
-=item Filter-related changes at Encode version 1.87
-
-=back
-
-=item CAVEATS
-
-=over 4
-
-=item NOT SCOPED
-
-=item DO NOT MIX MULTIPLE ENCODINGS
-
-=item tr/// with ranges
-
-Legend of characters above
-
-=back
-
-=item EXAMPLE - Greekperl
-
-=item KNOWN PROBLEMS
-
-literals in regex that are longer than 127 bytes, EBCDIC, format, Thread
-safety
-
-=over 4
-
-=item The Logic of :locale
-
-=back
-
-=item HISTORY
-
-=item SEE ALSO
-
-=back
-
-=head2 encoding::warnings - Warn on implicit encoding conversions
-
-=over 4
-
-=item VERSION
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Overview of the problem
-
-=item Detecting the problem
-
-=item Solving the problem
-
-Upgrade both sides to unicode-strings, Downgrade both sides to
-byte-strings, Specify the encoding for implicit byte-string upgrading,
-PerlIO layers for B<STDIN> and B<STDOUT>, Literal conversions, Implicit
-upgrading for byte-strings
-
-=back
-
-=item CAVEATS
-
-=back
-
-=over 4
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=back
-
-=head2 feature - Perl pragma to enable new syntactic features
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Lexical effect
-
-=item C<no feature>
-
-=item The 'switch' feature
-
-=item The 'say' feature
-
-=item the 'state' feature
-
-=back
-
-=item FEATURE BUNDLES
-
-=item IMPLICIT LOADING
-
-=back
-
-=head2 fields - compile-time class fields
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-new, phash
-
-=item SEE ALSO
-
-=back
-
-=head2 filetest - Perl pragma to control the filetest permission operators
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Consider this carefully
-
-=item The "access" sub-pragma
-
-=item Limitation with regard to C<_>
-
-=back
-
-=back
-
-=head2 if - C<use> a Perl module if a condition holds
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 integer - Perl pragma to use integer arithmetic instead of floating
-point
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 less - perl pragma to request less of something
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FOR MODULE AUTHORS
-
-=over 4
-
-=item C<< BOOLEAN = less->of( FEATURE ) >>
-
-=item C<< FEATURES = less->of() >>
-
-=back
-
-=item CAVEATS
-
-This probably does nothing, This works only on 5.10+
-
-=back
-
-=head2 lib - manipulate @INC at compile time
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Adding directories to @INC
-
-=item Deleting directories from @INC
-
-=item Restoring original @INC
-
-=back
-
-=item CAVEATS
-
-=item NOTES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 locale - Perl pragma to use and avoid POSIX locales for built-in
-operations
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 mro - Method Resolution Order
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OVERVIEW
-
-=item The C3 MRO
-
-=over 4
-
-=item What is C3?
-
-=item How does C3 work
-
-=back
-
-=item Functions
-
-=over 4
-
-=item mro::get_linear_isa($classname[, $type])
-
-=item mro::set_mro($classname, $type)
-
-=item mro::get_mro($classname)
-
-=item mro::get_isarev($classname)
-
-=item mro::is_universal($classname)
-
-=item mro::invalidate_all_method_caches()
-
-=item mro::method_changed_in($classname)
-
-=item mro::get_pkg_gen($classname)
-
-=item next::method
-
-=item next::can
-
-=item maybe::next::method
-
-=back
-
-=item SEE ALSO
-
-=over 4
-
-=item The original Dylan paper
-
-L<http://www.webcom.com/haahr/dylan/linearization-oopsla96.html>
-
-=item The prototype Perl 6 Object Model uses C3
-
-L<http://svn.openfoundry.org/pugs/perl5/Perl6-MetaModel/>
-
-=item Parrot now uses C3
-
-L<http://aspn.activestate.com/ASPN/Mail/Message/perl6-internals/2746631>,
-L<http://use.perl.org/~autrijus/journal/25768>
-
-=item Python 2.3 MRO related links
-
-L<http://www.python.org/2.3/mro.html>,
-L<http://www.python.org/2.2.2/descrintro.html#mro>
-
-=item C3 for TinyCLOS
-
-L<http://www.call-with-current-continuation.org/eggs/c3.html>
-
-=item Class::C3
-
-L<Class::C3>
-
-=back
-
-=item AUTHOR
-
-=back
-
-=head2 open - perl pragma to set default PerlIO layers for input and output
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NONPERLIO FUNCTIONALITY
-
-=item IMPLEMENTATION DETAILS
-
-=item SEE ALSO
-
-=back
-
-=head2 ops - Perl pragma to restrict unsafe operations when compiling
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=back
-
-=head2 overload - Package for overloading Perl operations
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Declaration of overloaded functions
-
-=item Calling Conventions for Binary Operations
-
-FALSE, TRUE, C<undef>
-
-=item Calling Conventions for Unary Operations
-
-=item Calling Conventions for Mutators
-
-C<++> and C<-->, C<x=> and other assignment versions
-
-=item Overloadable Operations
-
-I<Arithmetic operations>, I<Comparison operations>, I<Bit operations>,
-I<Increment and decrement>, I<Transcendental functions>, I<Boolean, string
-and numeric conversion>, I<Iteration>, I<Dereferencing>, I<Special>
-
-=item Inheritance and overloading
-
-Strings as values of C<use overload> directive, Overloading of an operation
-is inherited by derived classes
-
-=back
-
-=item SPECIAL SYMBOLS FOR C<use overload>
-
-=over 4
-
-=item Last Resort
-
-=item Fallback
-
-C<undef>, TRUE, defined, but FALSE
-
-=item Smart Match
-
-=item Copy Constructor
-
-B<Example>
-
-=back
-
-=item MAGIC AUTOGENERATION
-
-I<Assignment forms of arithmetic operations>, I<Conversion operations>,
-I<Increment and decrement>, C<abs($a)>, I<Unary minus>, I<Negation>,
-I<Concatenation>, I<Comparison operations>, I<Iterator>, I<Dereferencing>,
-I<Copy operator>
-
-=item Minimal set of overloaded operations
-
-=item Losing overloading
-
-=item Run-time Overloading
-
-=item Public functions
-
-overload::StrVal(arg), overload::Overloaded(arg), overload::Method(obj,op)
-
-=item Overloading constants
-
-integer, float, binary, q, qr
-
-=item IMPLEMENTATION
-
-=item Metaphor clash
-
-=item Cookbook
-
-=over 4
-
-=item Two-face scalars
-
-=item Two-face references
-
-=item Symbolic calculator
-
-=item I<Really> symbolic calculator
-
-=back
-
-=item AUTHOR
-
-=item DIAGNOSTICS
-
-Odd number of arguments for overload::constant, `%s' is not an overloadable
-type, `%s' is not a code reference
-
-=item BUGS
-
-=back
-
-=head2 sigtrap - Perl pragma to enable simple signal handling
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OPTIONS
-
-=over 4
-
-=item SIGNAL HANDLERS
-
-B<stack-trace>, B<die>, B<handler> I<your-handler>
-
-=item SIGNAL LISTS
-
-B<normal-signals>, B<error-signals>, B<old-interface-signals>
-
-=item OTHER
-
-B<untrapped>, B<any>, I<signal>, I<number>
-
-=back
-
-=item EXAMPLES
-
-=back
-
-=head2 sort - perl pragma to control sort() behaviour
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CAVEATS
-
-=back
-
-=head2 strict - Perl pragma to restrict unsafe constructs
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-C<strict refs>, C<strict vars>, C<strict subs>
-
-=item HISTORY
-
-=back
-
-=head2 subs - Perl pragma to predeclare sub names
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 threadshared, threads::shared - Perl extension for sharing data
-structures between threads
-
-=over 4
-
-=item VERSION
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXPORT
-
-=item FUNCTIONS
-
-share VARIABLE, is_shared VARIABLE, lock VARIABLE, cond_wait VARIABLE,
-cond_wait CONDVAR, LOCKVAR, cond_timedwait VARIABLE, ABS_TIMEOUT,
-cond_timedwait CONDVAR, ABS_TIMEOUT, LOCKVAR, cond_signal VARIABLE,
-cond_broadcast VARIABLE
-
-=item OBJECTS
-
-=item NOTES
-
-=item BUGS AND LIMITATIONS
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 utf8 - Perl pragma to enable/disable UTF-8 (or UTF-EBCDIC) in source
-code
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Utility functions
-
-$num_octets = utf8::upgrade($string), $success = utf8::downgrade($string[,
-FAIL_OK]), utf8::encode($string), $success = utf8::decode($string), $flag =
-utf8::is_utf8(STRING), $flag = utf8::valid(STRING)
-
-=back
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 vars - Perl pragma to predeclare global variable names (obsolete)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 version - Perl extension for Version Objects
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item BEST PRACTICES
-
-Be consistent, Be careful
-
-=item Using modules that use version.pm
-
-Numeric versions always work, Extended version work sometimes
-
-=item What IS a version
-
-Numeric Versions, Extended Versions
-
-=item Numeric Versions
-
-=item Extended Versions
-
-=item Numeric Alpha Versions
-
-=item Object Methods
-
-New Operator, qv(), Normal Form, Numification, Stringification, Comparison
-operators, Logical Operators
-
-=item Quoting
-
-=item What about v-strings?
-
-=item Types of Versions Objects
-
-Ordinary versions, Alpha Versions
-
-=item Replacement UNIVERSAL::VERSION
-
-=back
-
-=item SUBCLASSING
-
-=item EXPORT
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 vmsish - Perl pragma to control VMS-specific language features
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-C<vmsish status>, C<vmsish exit>, C<vmsish time>, C<vmsish hushed>
-
-=back
-
-=head2 warnings - Perl pragma to control optional warnings
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-use warnings::register, warnings::enabled(), warnings::enabled($category),
-warnings::enabled($object), warnings::warn($message),
-warnings::warn($category, $message), warnings::warn($object, $message),
-warnings::warnif($message), warnings::warnif($category, $message),
-warnings::warnif($object, $message)
-
-=back
-
-=head2 warnings::register - warnings import function
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head1 MODULE DOCUMENTATION
-
-=head2 AnyDBM_File - provide framework for multiple DBMs
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item DBM Comparisons
-
-[0], [1], [2], [3]
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 Archive::Extract - A generic archive extracting mechanism
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item METHODS
-
-=over 4
-
-=item $ae = Archive::Extract->new(archive => '/path/to/archive',[type =>
-TYPE])
-
-tar, tgz, gz, Z, zip, bz2, tbz
-
-=back
-
-=back
-
-=over 4
-
-=item $ae->extract( [to => '/output/path'] )
-
-$ae->extract_path, $ae->files
-
-=back
-
-=over 4
-
-=item ACCESSORS
-
-=over 4
-
-=item $ae->error([BOOL])
-
-=item $ae->extract_path
-
-=item $ae->files
-
-=item $ae->archive
-
-=item $ae->type
-
-=item $ae->types
-
-=back
-
-=back
-
-=over 4
-
-=item $ae->is_tgz
-
-=item $ae->is_tar
-
-=item $ae->is_gz
-
-=item $ae->is_Z
-
-=item $ae->is_zip
-
-=back
-
-=over 4
-
-=item $ae->bin_tar
-
-=item $ae->bin_gzip
-
-=item $ae->bin_unzip
-
-=back
-
-=over 4
-
-=item HOW IT WORKS
-
-=item CAVEATS
-
-=over 4
-
-=item File Extensions
-
-=item Supporting Very Large Files
-
-=item Bunzip2 support of arbitrary extensions.
-
-=back
-
-=item GLOBAL VARIABLES
-
-=over 4
-
-=item $Archive::Extract::DEBUG
-
-=item $Archive::Extract::WARN
-
-=item $Archive::Extract::PREFER_BIN
-
-=back
-
-=item TODO
-
-Mime magic support
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Archive::Tar - module for manipulations of tar archives
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Object Methods
-
-=over 4
-
-=item Archive::Tar->new( [$file, $compressed] )
-
-=back
-
-=back
-
-=over 4
-
-=item $tar->read ( $filename|$handle, $compressed, {opt => 'val'} )
-
-limit, extract
-
-=back
-
-=over 4
-
-=item $tar->contains_file( $filename )
-
-=back
-
-=over 4
-
-=item $tar->extract( [@filenames] )
-
-=back
-
-=over 4
-
-=item $tar->extract_file( $file, [$extract_path] )
-
-=back
-
-=over 4
-
-=item $tar->list_files( [\@properties] )
-
-=back
-
-=over 4
-
-=item $tar->get_files( [@filenames] )
-
-=back
-
-=over 4
-
-=item $tar->get_content( $file )
-
-=back
-
-=over 4
-
-=item $tar->replace_content( $file, $content )
-
-=back
-
-=over 4
-
-=item $tar->rename( $file, $new_name )
-
-=back
-
-=over 4
-
-=item $tar->remove (@filenamelist)
-
-=back
-
-=over 4
-
-=item $tar->clear
-
-=back
-
-=over 4
-
-=item $tar->write ( [$file, $compressed, $prefix] )
-
-=back
-
-=over 4
-
-=item $tar->add_files( @filenamelist )
-
-=back
-
-=over 4
-
-=item $tar->add_data ( $filename, $data, [$opthashref] )
-
-FILE, HARDLINK, SYMLINK, CHARDEV, BLOCKDEV, DIR, FIFO, SOCKET
-
-=back
-
-=over 4
-
-=item $tar->error( [$BOOL] )
-
-=back
-
-=over 4
-
-=item $tar->setcwd( $cwd );
-
-=back
-
-=over 4
-
-=item $bool = $tar->has_io_string
-
-=back
-
-=over 4
-
-=item $bool = $tar->has_perlio
-
-=back
-
-=over 4
-
-=item Class Methods
-
-=over 4
-
-=item Archive::Tar->create_archive($file, $compression, @filelist)
-
-=back
-
-=back
-
-=over 4
-
-=item Archive::Tar->list_archive ($file, $compressed, [\@properties])
-
-=back
-
-=over 4
-
-=item Archive::Tar->extract_archive ($file, $gzip)
-
-=back
-
-=over 4
-
-=item Archive::Tar->can_handle_compressed_files
-
-=back
-
-=over 4
-
-=item GLOBAL VARIABLES
-
-=over 4
-
-=item $Archive::Tar::FOLLOW_SYMLINK
-
-=item $Archive::Tar::CHOWN
-
-=item $Archive::Tar::CHMOD
-
-=item $Archive::Tar::DO_NOT_USE_PREFIX
-
-=item $Archive::Tar::DEBUG
-
-=item $Archive::Tar::WARN
-
-=item $Archive::Tar::error
-
-=item $Archive::Tar::INSECURE_EXTRACT_MODE
-
-=item $Archive::Tar::HAS_PERLIO
-
-=item $Archive::Tar::HAS_IO_STRING
-
-=back
-
-=item FAQ
-
-What's the minimum perl version required to run Archive::Tar?, Isn't
-Archive::Tar slow?, Isn't Archive::Tar heavier on memory than /bin/tar?,
-Can't you lazy-load data instead?, How much memory will an X kb tar file
-need?, What do you do with unsupported filetypes in an archive?, I'm using
-WinZip, or some other non-POSIX client, and files are not being extracted
-properly!, How do I extract only files that have property X from an
-archive?, How do I access .tar.Z files?, How do I handle Unicode strings?
-
-=item TODO
-
-Check if passed in handles are open for read/write, Allow archives to be
-passed in as string, Facilitate processing an opened filehandle of a
-compressed archive
-
-=item SEE ALSO
-
-The GNU tar specification, The PAX format specication, A comparison of GNU
-and POSIX tar standards;
-C<http://www.delorie.com/gnu/docs/tar/tar_114.html>, GNU tar intends to
-switch to POSIX compatibility, A Comparison between various tar
-implementations
-
-=item AUTHOR
-
-=item ACKNOWLEDGEMENTS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Archive::Tar::File - a subclass for in-memory extracted file from
-Archive::Tar
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Accessors
-
-name, mode, uid, gid, size, mtime, chksum, type, linkname, magic, version,
-uname, gname, devmajor, devminor, prefix, raw
-
-=back
-
-=item Methods
-
-=over 4
-
-=item new( file => $path )
-
-=item new( data => $path, $data, $opt )
-
-=item new( chunk => $chunk )
-
-=back
-
-=back
-
-=over 4
-
-=item full_path
-
-=back
-
-=over 4
-
-=item validate
-
-=back
-
-=over 4
-
-=item has_content
-
-=back
-
-=over 4
-
-=item get_content
-
-=back
-
-=over 4
-
-=item get_content_by_ref
-
-=back
-
-=over 4
-
-=item replace_content( $content )
-
-=back
-
-=over 4
-
-=item rename( $new_name )
-
-=back
-
-=over 4
-
-=item Convenience methods
-
-is_file, is_dir, is_hardlink, is_symlink, is_chardev, is_blockdev, is_fifo,
-is_socket, is_longlink, is_label, is_unknown
-
-=back
-
-=head2 Attribute::Handlers - Simpler definition of attribute handlers
-
-=over 4
-
-=item VERSION
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-[0], [1], [2], [3], [4], [5], [6], [7]
-
-=over 4
-
-=item Typed lexicals
-
-=item Type-specific attribute handlers
-
-=item Non-interpretive attribute handlers
-
-=item Phase-specific attribute handlers
-
-=item Attributes as C<tie> interfaces
-
-=back
-
-=item EXAMPLES
-
-=item DIAGNOSTICS
-
-C<Bad attribute type: ATTR(%s)>, C<Attribute handler %s doesn't handle %s
-attributes>, C<Declaration of %s attribute in package %s may clash with
-future reserved word>, C<Can't have two ATTR specifiers on one subroutine>,
-C<Can't autotie a %s>, C<Internal error: %s symbol went missing>, C<Won't
-be able to apply END handler>
-
-=item AUTHOR
-
-=item BUGS
-
-=item COPYRIGHT
-
-=back
-
-=head2 AutoLoader - load subroutines only on demand
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Subroutine Stubs
-
-=item Using B<AutoLoader>'s AUTOLOAD Subroutine
-
-=item Overriding B<AutoLoader>'s AUTOLOAD Subroutine
-
-=item Package Lexicals
-
-=item Not Using AutoLoader
-
-=item B<AutoLoader> vs. B<SelfLoader>
-
-=back
-
-=item CAVEATS
-
-=item SEE ALSO
-
-=back
-
-=head2 AutoSplit - split a package for autoloading
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-$keep, $check, $modtime
-
-=over 4
-
-=item Multiple packages
-
-=back
-
-=item DIAGNOSTICS
-
-=back
-
-=head2 B - The Perl Compiler
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OVERVIEW
-
-=item Utility Functions
-
-=over 4
-
-=item Functions Returning C<B::SV>, C<B::AV>, C<B::HV>, and C<B::CV>
-objects
-
-sv_undef, sv_yes, sv_no, svref_2object(SVREF), amagic_generation, init_av,
-check_av, unitcheck_av, begin_av, end_av, comppadlist, regex_padav, main_cv
-
-=item Functions for Examining the Symbol Table
-
-walksymtable(SYMREF, METHOD, RECURSE, PREFIX)
-
-=item Functions Returning C<B::OP> objects or for walking op trees
-
-main_root, main_start, walkoptree(OP, METHOD), walkoptree_debug(DEBUG)
-
-=item Miscellaneous Utility Functions
-
-ppname(OPNUM), hash(STR), cast_I32(I), minus_c, cstring(STR),
-perlstring(STR), class(OBJ), threadsv_names
-
-=item Exported utility variabiles
-
- at optype, @specialsv_name
-
-=back
-
-=item OVERVIEW OF CLASSES
-
-=over 4
-
-=item SV-RELATED CLASSES
-
-=item B::SV Methods
-
-REFCNT, FLAGS, object_2svref
-
-=item B::IV Methods
-
-IV, IVX, UVX, int_value, needs64bits, packiv
-
-=item B::NV Methods
-
-NV, NVX
-
-=item B::RV Methods
-
-RV
-
-=item B::PV Methods
-
-PV, RV, PVX
-
-=item B::PVMG Methods
-
-MAGIC, SvSTASH
-
-=item B::MAGIC Methods
-
-MOREMAGIC, precomp, PRIVATE, TYPE, FLAGS, OBJ, PTR, REGEX
-
-=item B::PVLV Methods
-
-TARGOFF, TARGLEN, TYPE, TARG
-
-=item B::BM Methods
-
-USEFUL, PREVIOUS, RARE, TABLE
-
-=item B::GV Methods
-
-is_empty, NAME, SAFENAME, STASH, SV, IO, FORM, AV, HV, EGV, CV, CVGEN,
-LINE, FILE, FILEGV, GvREFCNT, FLAGS
-
-=item B::IO Methods
-
-LINES, PAGE, PAGE_LEN, LINES_LEFT, TOP_NAME, TOP_GV, FMT_NAME, FMT_GV,
-BOTTOM_NAME, BOTTOM_GV, SUBPROCESS, IoTYPE, IoFLAGS, IsSTD
-
-=item B::AV Methods
-
-FILL, MAX, ARRAY, ARRAYelt, OFF, AvFLAGS
-
-=item B::CV Methods
-
-STASH, START, ROOT, GV, FILE, DEPTH, PADLIST, OUTSIDE, OUTSIDE_SEQ, XSUB,
-XSUBANY, CvFLAGS, const_sv
-
-=item B::HV Methods
-
-FILL, MAX, KEYS, RITER, NAME, ARRAY, PMROOT
-
-=item OP-RELATED CLASSES
-
-=item B::OP Methods
-
-next, sibling, name, ppaddr, desc, targ, type, opt, flags, private, spare
-
-=item B::UNOP METHOD
-
-first
-
-=item B::BINOP METHOD
-
-last
-
-=item B::LOGOP METHOD
-
-other
-
-=item B::LISTOP METHOD
-
-children
-
-=item B::PMOP Methods
-
-pmreplroot, pmreplstart, pmnext, pmregexp, pmflags, extflags, precomp,
-pmoffset
-
-=item B::SVOP METHOD
-
-sv, gv
-
-=item B::PADOP METHOD
-
-padix
-
-=item B::PVOP METHOD
-
-pv
-
-=item B::LOOP Methods
-
-redoop, nextop, lastop
-
-=item B::COP Methods
-
-label, stash, stashpv, file, cop_seq, arybase, line, warnings, io, hints,
-hints_hash
-
-=back
-
-=item AUTHOR
-
-=back
-
-=head2 B::Concise - Walk Perl syntax tree, printing concise info about ops
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXAMPLE
-
-=item OPTIONS
-
-=over 4
-
-=item Options for Opcode Ordering
-
-B<-basic>, B<-exec>, B<-tree>
-
-=item Options for Line-Style
-
-B<-concise>, B<-terse>, B<-linenoise>, B<-debug>, B<-env>
-
-=item Options for tree-specific formatting
-
-B<-compact>, B<-loose>, B<-vt>, B<-ascii>
-
-=item Options controlling sequence numbering
-
-B<-base>I<n>, B<-bigendian>, B<-littleendian>
-
-=item Other options
-
-B<-src>, B<-stash="somepackage">, B<-main>, B<-nomain>, B<-nobanner>,
-B<-banner>, B<-banneris> => subref
-
-=item Option Stickiness
-
-=back
-
-=item ABBREVIATIONS
-
-=over 4
-
-=item OP class abbreviations
-
-=item OP flags abbreviations
-
-=back
-
-=item FORMATTING SPECIFICATIONS
-
-=over 4
-
-=item Special Patterns
-
-B<(x(>I<exec_text>B<;>I<basic_text>B<)x)>, B<(*(>I<text>B<)*)>,
-B<(*(>I<text1>B<;>I<text2>B<)*)>, B<(?(>I<text1>B<#>I<var>I<Text2>B<)?)>,
-B<~>
-
-=item # Variables
-
-B<#>I<var>, B<#>I<var>I<N>, B<#>I<Var>, B<#addr>, B<#arg>, B<#class>,
-B<#classsym>, B<#coplabel>, B<#exname>, B<#extarg>, B<#firstaddr>,
-B<#flags>, B<#flagval>, B<#hints>, B<#hintsval>, B<#hyphseq>, B<#label>,
-B<#lastaddr>, B<#name>, B<#NAME>, B<#next>, B<#nextaddr>, B<#noise>,
-B<#private>, B<#privval>, B<#seq>, B<#seqnum>, B<#opt>, B<#sibaddr>,
-B<#svaddr>, B<#svclass>, B<#svval>, B<#targ>, B<#targarg>, B<#targarglife>,
-B<#typenum>
-
-=back
-
-=item One-Liner Command tips
-
-perl -MO=Concise,bar foo.pl, perl -MDigest::MD5=md5 -MO=Concise,md5 -e1,
-perl -MPOSIX -MO=Concise,_POSIX_ARG_MAX -e1, perl -MPOSIX -MO=Concise,a -e
-'print _POSIX_SAVED_IDS', perl -MPOSIX -MO=Concise,a -e 'sub
-a{_POSIX_SAVED_IDS}', perl -MB::Concise -e
-'B::Concise::compile("-exec","-src", \%B::Concise::)->()'
-
-=item Using B::Concise outside of the O framework
-
-=over 4
-
-=item Example: Altering Concise Renderings
-
-=item set_style()
-
-=item set_style_standard($name)
-
-=item add_style()
-
-=item add_callback()
-
-=item Running B::Concise::compile()
-
-=item B::Concise::reset_sequence()
-
-=item Errors
-
-=back
-
-=item AUTHOR
-
-=back
-
-=head2 B::Debug - Walk Perl syntax tree, printing debug info about ops
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=back
-
-=head2 B::Deparse - Perl compiler backend to produce perl code
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OPTIONS
-
-B<-d>, B<-f>I<FILE>, B<-l>, B<-p>, B<-P>, B<-q>, B<-s>I<LETTERS>, B<C>,
-B<i>I<NUMBER>, B<T>, B<v>I<STRING>B<.>, B<-x>I<LEVEL>
-
-=item USING B::Deparse AS A MODULE
-
-=over 4
-
-=item Synopsis
-
-=item Description
-
-=item new
-
-=item ambient_pragmas
-
-strict, $[, bytes, utf8, integer, re, warnings, hint_bits, warning_bits,
-%^H
-
-=item coderef2text
-
-=back
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 B::Lint - Perl lint
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OPTIONS AND LINT CHECKS
-
-B<magic-diamond>, B<context>, B<implicit-read> and B<implicit-write>,
-B<bare-subs>, B<dollar-underscore>, B<private-names>, B<undefined-subs>,
-B<regexp-variables>, B<all>, B<none>
-
-=item NON LINT-CHECK OPTIONS
-
-B<-u Package>
-
-=item EXTENDING LINT
-
-=item TODO
-
-while(<FH>) stomps $_, strict oo, unchecked system calls, more tests,
-validate against older perls
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 B::O, O - Generic interface to Perl Compiler backends
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONVENTIONS
-
-=item IMPLEMENTATION
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 B::Showlex - Show lexical variables used in functions or files
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXAMPLES
-
-=over 4
-
-=item OPTIONS
-
-=back
-
-=item SEE ALSO
-
-=item TODO
-
-=item AUTHOR
-
-=back
-
-=head2 B::Terse - Walk Perl syntax tree, printing terse info about ops
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=back
-
-=head2 B::Xref - Generates cross reference reports for Perl programs
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OPTIONS
-
-C<-oFILENAME>, C<-r>, C<-d>, C<-D[tO]>
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 Benchmark - benchmark running times of Perl code
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Methods
-
-new, debug, iters
-
-=item Standard Exports
-
-timeit(COUNT, CODE), timethis ( COUNT, CODE, [ TITLE, [ STYLE ]] ),
-timethese ( COUNT, CODEHASHREF, [ STYLE ] ), timediff ( T1, T2 ), timestr (
-TIMEDIFF, [ STYLE, [ FORMAT ] ] )
-
-=item Optional Exports
-
-clearcache ( COUNT ), clearallcache ( ), cmpthese ( COUNT, CODEHASHREF, [
-STYLE ] ), cmpthese ( RESULTSHASHREF, [ STYLE ] ), countit(TIME, CODE),
-disablecache ( ), enablecache ( ), timesum ( T1, T2 )
-
-=item :hireswallclock
-
-=back
-
-=item NOTES
-
-=item EXAMPLES
-
-=item INHERITANCE
-
-=item CAVEATS
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item MODIFICATION HISTORY
-
-=back
-
-=head2 CGI - Simple Common Gateway Interface Class
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item DESCRIPTION
-
-=over 4
-
-=item PROGRAMMING STYLE
-
-=item CALLING CGI.PM ROUTINES
-
-=item CREATING A NEW QUERY OBJECT (OBJECT-ORIENTED STYLE):
-
-=item CREATING A NEW QUERY OBJECT FROM AN INPUT FILE
-
-=item FETCHING A LIST OF KEYWORDS FROM THE QUERY:
-
-=item FETCHING THE NAMES OF ALL THE PARAMETERS PASSED TO YOUR SCRIPT:
-
-=item FETCHING THE VALUE OR VALUES OF A SINGLE NAMED PARAMETER:
-
-=item SETTING THE VALUE(S) OF A NAMED PARAMETER:
-
-=item APPENDING ADDITIONAL VALUES TO A NAMED PARAMETER:
-
-=item IMPORTING ALL PARAMETERS INTO A NAMESPACE:
-
-=item DELETING A PARAMETER COMPLETELY:
-
-=item DELETING ALL PARAMETERS:
-
-=item HANDLING NON-URLENCODED ARGUMENTS
-
-=item DIRECT ACCESS TO THE PARAMETER LIST:
-
-=item FETCHING THE PARAMETER LIST AS A HASH:
-
-=item SAVING THE STATE OF THE SCRIPT TO A FILE:
-
-=item RETRIEVING CGI ERRORS
-
-=item USING THE FUNCTION-ORIENTED INTERFACE
-
-B<:cgi>, B<:form>, B<:html2>, B<:html3>, B<:html4>, B<:netscape>, B<:html>,
-B<:standard>, B<:all>
-
-=item PRAGMAS
-
--any, -compile, -nosticky, -tabindex, -no_undef_params, -no_xhtml, -nph,
--newstyle_urls, -oldstyle_urls, -autoload, -no_debug, -debug,
--private_tempfiles
-
-=item SPECIAL FORMS FOR IMPORTING HTML-TAG FUNCTIONS
-
-1. start_table() (generates a <table> tag), 2. end_table() (generates a
-</table> tag), 3. start_ul() (generates a <ul> tag), 4. end_ul() (generates
-a </ul> tag)
-
-=back
-
-=item GENERATING DYNAMIC DOCUMENTS
-
-=over 4
-
-=item CREATING A STANDARD HTTP HEADER:
-
-=item GENERATING A REDIRECTION HEADER
-
-=item CREATING THE HTML DOCUMENT HEADER
-
-B<Parameters:>, 4, 5, 6..
-
-=item ENDING THE HTML DOCUMENT:
-
-=item CREATING A SELF-REFERENCING URL THAT PRESERVES STATE INFORMATION:
-
-=item OBTAINING THE SCRIPT'S URL
-
-B<-absolute>, B<-relative>, B<-full>, B<-path> (B<-path_info>), B<-query>
-(B<-query_string>), B<-base>, B<-rewrite>
-
-=item MIXING POST AND URL PARAMETERS
-
-=back
-
-=item CREATING STANDARD HTML ELEMENTS:
-
-=over 4
-
-=item PROVIDING ARGUMENTS TO HTML SHORTCUTS
-
-=item THE DISTRIBUTIVE PROPERTY OF HTML SHORTCUTS
-
-=item HTML SHORTCUTS AND LIST INTERPOLATION
-
-=item NON-STANDARD HTML SHORTCUTS
-
-=item AUTOESCAPING HTML
-
-$escaped_string = escapeHTML("unescaped string");, $charset =
-charset([$charset]);, $flag = autoEscape([$flag]);
-
-=item PRETTY-PRINTING HTML
-
-=back
-
-=item CREATING FILL-OUT FORMS:
-
-=over 4
-
-=item CREATING AN ISINDEX TAG
-
-=item STARTING AND ENDING A FORM
-
-B<application/x-www-form-urlencoded>, B<multipart/form-data>
-
-=item FORM ELEMENTS
-
-B<-name>, B<-value>, B<-values>, B<-tabindex>, B<-id>, B<-override>,
-B<-onChange>, B<-onFocus>, B<-onBlur>, B<-onMouseOver>, B<-onMouseOut>,
-B<-onSelect>
-
-=item CREATING A TEXT FIELD
-
-B<Parameters>
-
-=item CREATING A BIG TEXT FIELD
-
-=item CREATING A PASSWORD FIELD
-
-=item CREATING A FILE UPLOAD FIELD
-
-B<Parameters>
-
-=item CREATING A POPUP MENU
-
-=item CREATING AN OPTION GROUP
-
-=item CREATING A SCROLLING LIST
-
-B<Parameters:>
-
-=item CREATING A GROUP OF RELATED CHECKBOXES
-
-B<Parameters:>
-
-=item CREATING A STANDALONE CHECKBOX
-
-B<Parameters:>
-
-=item CREATING A RADIO BUTTON GROUP
-
-B<Parameters:>
-
-=item CREATING A SUBMIT BUTTON
-
-B<Parameters:>
-
-=item CREATING A RESET BUTTON
-
-=item CREATING A DEFAULT BUTTON
-
-=item CREATING A HIDDEN FIELD
-
-B<Parameters:>
-
-=item CREATING A CLICKABLE IMAGE BUTTON
-
-B<Parameters:>, 3. The third option (-align, optional) is an alignment
-type, and may be TOP, BOTTOM or MIDDLE
-
-=item CREATING A JAVASCRIPT ACTION BUTTON
-
-=back
-
-=item HTTP COOKIES
-
-1. an expiration time, 2. a domain, 3. a path, 4. a "secure" flag,
-B<-name>, B<-value>, B<-path>, B<-domain>, B<-expires>, B<-secure>
-
-=item WORKING WITH FRAMES
-
-1. Create a <Frameset> document, 2. Specify the destination for the
-document in the HTTP header, 3. Specify the destination for the document in
-the <form> tag
-
-=item SUPPORT FOR JAVASCRIPT
-
-B<onLoad>, B<onUnload>, B<onSubmit>, B<onClick>, B<onChange>, B<onFocus>,
-B<onBlur>, B<onSelect>, B<onMouseOver>, B<onMouseOut>
-
-=item LIMITED SUPPORT FOR CASCADING STYLE SHEETS
-
-=item DEBUGGING
-
-=over 4
-
-=item DUMPING OUT ALL THE NAME/VALUE PAIRS
-
-=back
-
-=item FETCHING ENVIRONMENT VARIABLES
-
-B<Accept()>, B<raw_cookie()>, B<user_agent()>, B<path_info()>,
-B<path_translated()>, B<remote_host()>, B<script_name()> Return the script
-name as a partial URL, for self-refering scripts, B<referer()>, B<auth_type
-()>, B<server_name ()>, B<virtual_host ()>, B<server_port ()>,
-B<virtual_port ()>, B<server_software ()>, B<remote_user ()>, B<user_name
-()>, B<request_method()>, B<content_type()>, B<http()>, B<https()>
-
-=item USING NPH SCRIPTS
-
-In the B<use> statement, By calling the B<nph()> method:, By using B<-nph>
-parameters
-
-=item Server Push
-
-multipart_init(), multipart_start(), multipart_end(), multipart_final()
-
-=item Avoiding Denial of Service Attacks
-
-B<$CGI::POST_MAX>, B<$CGI::DISABLE_UPLOADS>, B<1. On a script-by-script
-basis>, B<2. Globally for all scripts>
-
-=item COMPATIBILITY WITH CGI-LIB.PL
-
-=item AUTHOR INFORMATION
-
-=item CREDITS
-
-Matt Heffron (heffron at falstaff.css.beckman.com), James Taylor
-(james.taylor at srs.gov), Scott Anguish <sanguish at digifix.com>, Mike Jewell
-(mlj3u at virginia.edu), Timothy Shimmin (tes at kbs.citri.edu.au), Joergen Haegg
-(jh at axis.se), Laurent Delfosse (delfosse at delfosse.com), Richard Resnick
-(applepi1 at aol.com), Craig Bishop (csb at barwonwater.vic.gov.au), Tony Curtis
-(tc at vcpc.univie.ac.at), Tim Bunce (Tim.Bunce at ig.co.uk), Tom Christiansen
-(tchrist at convex.com), Andreas Koenig (k at franz.ww.TU-Berlin.DE), Tim
-MacKenzie (Tim.MacKenzie at fulcrum.com.au), Kevin B. Hendricks
-(kbhend at dogwood.tyler.wm.edu), Stephen Dahmen (joyfire at inxpress.net), Ed
-Jordan (ed at fidalgo.net), David Alan Pisoni (david at cnation.com), Doug
-MacEachern (dougm at opengroup.org), Robin Houston (robin at oneworld.org),
-...and many many more..
-
-=item A COMPLETE EXAMPLE OF A SIMPLE FORM-BASED SCRIPT
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 CGI::Apache - Backward compatibility module for CGI.pm
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item DESCRIPTION
-
-=item AUTHOR INFORMATION
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 CGI::Carp, B<CGI::Carp> - CGI routines for writing to the HTTPD (or
-other) error log
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item REDIRECTING ERROR MESSAGES
-
-=item MAKING PERL ERRORS APPEAR IN THE BROWSER WINDOW
-
-=over 4
-
-=item Changing the default message
-
-=back
-
-=item DOING MORE THAN PRINTING A MESSAGE IN THE EVENT OF PERL ERRORS
-
-=item MAKING WARNINGS APPEAR AS HTML COMMENTS
-
-=item OVERRIDING THE NAME OF THE PROGRAM
-
-=item AUTHORS
-
-=item SEE ALSO
-
-=back
-
-=head2 CGI::Cookie - Interface to Netscape Cookies
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item USING CGI::Cookie
-
-B<1. expiration date>, B<2. domain>, B<3. path>, B<4. secure flag>, B<4.
-httponly flag>
-
-=over 4
-
-=item Creating New Cookies
-
-=item Sending the Cookie to the Browser
-
-=item Recovering Previous Cookies
-
-=item Manipulating Cookies
-
-B<name()>, B<value()>, B<domain()>, B<path()>, B<expires()>
-
-=back
-
-=item AUTHOR INFORMATION
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 CGI::Fast - CGI Interface for Fast CGI
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OTHER PIECES OF THE PUZZLE
-
-=item WRITING FASTCGI PERL SCRIPTS
-
-=item INSTALLING FASTCGI SCRIPTS
-
-=item USING FASTCGI SCRIPTS AS CGI SCRIPTS
-
-=item EXTERNAL FASTCGI SERVER INVOCATION
-
-FCGI_SOCKET_PATH, FCGI_LISTEN_QUEUE
-
-=item CAVEATS
-
-=item AUTHOR INFORMATION
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 CGI::Pretty - module to produce nicely formatted HTML code
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Tags that won't be formatted
-
-=item Customizing the Indenting
-
-=back
-
-=item BUGS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 CGI::Push - Simple Interface to Server Push
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item USING CGI::Push
-
--next_page, -last_page, -type, -delay, -cookie, -target, -expires, -nph
-
-=over 4
-
-=item Heterogeneous Pages
-
-=item Changing the Page Delay on the Fly
-
-=back
-
-=item INSTALLING CGI::Push SCRIPTS
-
-=item AUTHOR INFORMATION
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 CGI::Switch - Backward compatibility module for defunct CGI::Switch
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item DESCRIPTION
-
-=item AUTHOR INFORMATION
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 CGI::Util - Internal utilities used by CGI module
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item AUTHOR INFORMATION
-
-=item SEE ALSO
-
-=back
-
-=head2 CORE - Pseudo-namespace for Perl's core routines
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OVERRIDING CORE FUNCTIONS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 CPAN - query, download and build perl modules from CPAN sites
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item CPAN::shell([$prompt, $command]) Starting Interactive Mode
-
-Searching for authors, bundles, distribution files and modules, C<get>,
-C<make>, C<test>, C<install>, C<clean> modules or distributions, C<readme>,
-C<perldoc>, C<look> module or distribution, C<ls> author, C<ls>
-globbing_expression, C<failed>, Persistence between sessions, The C<force>
-and the C<fforce> pragma, Lockfile, Signals
-
-=item CPAN::Shell
-
-=item autobundle
-
-=item hosts
-
-=item mkmyconfig
-
-=item recent ***EXPERIMENTAL COMMAND***
-
-=item recompile
-
-=item report Bundle|Distribution|Module
-
-=item smoke ***EXPERIMENTAL COMMAND***
-
-=item upgrade [Module|/Regex/]...
-
-=item The four C<CPAN::*> Classes: Author, Bundle, Module, Distribution
-
-=item Integrating local directories
-
-=back
-
-=item CONFIGURATION
-
-completion support, displaying some help: o conf help, displaying current
-values: o conf [KEY], changing of scalar values: o conf KEY VALUE, changing
-of list values: o conf KEY SHIFT|UNSHIFT|PUSH|POP|SPLICE|LIST, reverting to
-saved: o conf defaults, saving the config: o conf commit
-
-=over 4
-
-=item Config Variables
-
-C<o conf E<lt>scalar optionE<gt>>, C<o conf E<lt>scalar optionE<gt>
-E<lt>valueE<gt>>, C<o conf E<lt>list optionE<gt>>, C<o conf E<lt>list
-optionE<gt> [shift|pop]>, C<o conf E<lt>list optionE<gt>
-[unshift|push|splice] E<lt>listE<gt>>, interactive editing: o conf init
-[MATCH|LIST]
-
-=item CPAN::anycwd($path): Note on config variable getcwd
-
-cwd, getcwd, fastcwd, backtickcwd
-
-=item Note on the format of the urllist parameter
-
-=item The urllist parameter has CD-ROM support
-
-=item Maintaining the urllist parameter
-
-=item The C<requires> and C<build_requires> dependency declarations
-
-=item Configuration for individual distributions (I<Distroprefs>)
-
-=item Filenames
-
-=item Fallback Data::Dumper and Storable
-
-=item Blueprint
-
-=item Language Specs
-
-comment [scalar], cpanconfig [hash], depends [hash] *** EXPERIMENTAL
-FEATURE ***, disabled [boolean], goto [string], install [hash], make
-[hash], match [hash], patches [array], pl [hash], test [hash]
-
-=item Processing Instructions
-
-args [array], commandline, eexpect [hash], env [hash], expect [array]
-
-=item Schema verification with C<Kwalify>
-
-=item Example Distroprefs Files
-
-=back
-
-=item PROGRAMMER'S INTERFACE
-
-expand($type, at things), expandany(@things), Programming Examples
-
-=over 4
-
-=item Methods in the other Classes
-
-CPAN::Author::as_glimpse(), CPAN::Author::as_string(),
-CPAN::Author::email(), CPAN::Author::fullname(), CPAN::Author::name(),
-CPAN::Bundle::as_glimpse(), CPAN::Bundle::as_string(),
-CPAN::Bundle::clean(), CPAN::Bundle::contains(),
-CPAN::Bundle::force($method, at args), CPAN::Bundle::get(),
-CPAN::Bundle::inst_file(), CPAN::Bundle::inst_version(),
-CPAN::Bundle::uptodate(), CPAN::Bundle::install(), CPAN::Bundle::make(),
-CPAN::Bundle::readme(), CPAN::Bundle::test(),
-CPAN::Distribution::as_glimpse(), CPAN::Distribution::as_string(),
-CPAN::Distribution::author, CPAN::Distribution::pretty_id(),
-CPAN::Distribution::base_id(), CPAN::Distribution::clean(),
-CPAN::Distribution::containsmods(), CPAN::Distribution::cvs_import(),
-CPAN::Distribution::dir(), CPAN::Distribution::force($method, at args),
-CPAN::Distribution::get(), CPAN::Distribution::install(),
-CPAN::Distribution::install_tested(), CPAN::Distribution::isa_perl(),
-CPAN::Distribution::is_tested(), CPAN::Distribution::look(),
-CPAN::Distribution::make(), CPAN::Distribution::perldoc(),
-CPAN::Distribution::prefs(), CPAN::Distribution::prereq_pm(),
-CPAN::Distribution::readme(), CPAN::Distribution::reports(),
-CPAN::Distribution::read_yaml(), CPAN::Distribution::test(),
-CPAN::Distribution::uptodate(), CPAN::Index::force_reload(),
-CPAN::Index::reload(), CPAN::InfoObj::dump(), CPAN::Module::as_glimpse(),
-CPAN::Module::as_string(), CPAN::Module::clean(),
-CPAN::Module::cpan_file(), CPAN::Module::cpan_version(),
-CPAN::Module::cvs_import(), CPAN::Module::description(),
-CPAN::Module::distribution(), CPAN::Module::dslip_status(),
-CPAN::Module::force($method, at args), CPAN::Module::get(),
-CPAN::Module::inst_file(), CPAN::Module::available_file(),
-CPAN::Module::inst_version(), CPAN::Module::available_version(),
-CPAN::Module::install(), CPAN::Module::look(), CPAN::Module::make(),
-CPAN::Module::manpage_headline(), CPAN::Module::perldoc(),
-CPAN::Module::readme(), CPAN::Module::reports(), CPAN::Module::test(),
-CPAN::Module::uptodate(), CPAN::Module::userid()
-
-=item Cache Manager
-
-=item Bundles
-
-=back
-
-=item PREREQUISITES
-
-=item UTILITIES
-
-=over 4
-
-=item Finding packages and VERSION
-
-=item Debugging
-
-o debug package.., o debug -package.., o debug all, o debug number
-
-=item Floppy, Zip, Offline Mode
-
-=item Basic Utilities for Programmers
-
-has_inst($module), has_usable($module), instance($module)
-
-=back
-
-=item SECURITY
-
-=over 4
-
-=item Cryptographically signed modules
-
-=back
-
-=item EXPORT
-
-=item ENVIRONMENT
-
-=item POPULATE AN INSTALLATION WITH LOTS OF MODULES
-
-=item WORKING WITH CPAN.pm BEHIND FIREWALLS
-
-=over 4
-
-=item Three basic types of firewalls
-
-http firewall, ftp firewall, One way visibility, SOCKS, IP Masquerade
-
-=item Configuring lynx or ncftp for going through a firewall
-
-=back
-
-=item FAQ
-
-1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16)
-
-=item COMPATIBILITY
-
-=over 4
-
-=item OLD PERL VERSIONS
-
-=item CPANPLUS
-
-=back
-
-=item SECURITY ADVICE
-
-=item BUGS
-
-=item AUTHOR
-
-=item LICENSE
-
-=item TRANSLATIONS
-
-=item SEE ALSO
-
-=back
-
-=head2 CPAN::API::HOWTO - a recipe book for programming with CPAN.pm
-
-=over 4
-
-=item RECIPES
-
-=over 4
-
-=item What distribution contains a particular module?
-
-=item What modules does a particular distribution contain?
-
-=back
-
-=item SEE ALSO
-
-=item LICENSE
-
-=item AUTHOR
-
-=back
-
-=head2 CPAN::FirstTime - Utility for CPAN::Config file Initialization
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-auto_commit, build_cache, build_dir, build_dir_reuse,
-build_requires_install_policy, cache_metadata, check_sigs, colorize_output,
-colorize_print, colorize_warn, colorize_debug, commandnumber_in_prompt,
-ftp_passive, getcwd, histfile, histsize, inactivity_timeout, index_expire,
-inhibit_startup_message, keep_source_where, load_module_verbosity,
-makepl_arg, make_arg, make_install_arg, make_install_make_command,
-mbuildpl_arg, mbuild_arg, mbuild_install_arg, mbuild_install_build_command,
-pager, prefer_installer, prefs_dir, prerequisites_policy,
-randomize_urllist, scan_cache, shell, show_unparsable_versions,
-show_upload_date, show_zero_versions, tar_verbosity, term_is_latin,
-term_ornaments, test_report, use_sqlite, yaml_load_code, yaml_module
-
-=over 4
-
-=item LICENSE
-
-=back
-
-=head2 CPAN::Kwalify - Interface between CPAN.pm and Kwalify.pm
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-_validate($schema_name, $data, $file, $doc), yaml($schema_name)
-
-=item AUTHOR
-
-=item LICENSE
-
-=back
-
-=head2 CPAN::Version - utility functions to compare CPAN versions
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item LICENSE
-
-=back
-
-=head2 CPANPLUS - API & CLI access to the CPAN mirrors
-
-=over 4
-
-=item SYNOPSIS
-
-=item GUIDE TO DOCUMENTATION
-
-=over 4
-
-=item GENERAL USAGE
-
-=item API REFERENCE
-
-=back
-
-=back
-
-=over 4
-
-=item COMMANDLINE TOOLS
-
-=over 4
-
-=item STARTING AN INTERACTIVE SHELL
-
-=item BUILDING PACKAGES
-
-=item $bool = install( Module::Name | /A/AU/AUTHOR/Module-Name-1.tgz )
-
-=item $where = fetch( Module::Name | /A/AU/AUTHOR/Module-Name-1.tgz )
-
-=item $where = get( Module::Name | /A/AU/AUTHOR/Module-Name-1.tgz )
-
-=item shell()
-
-=back
-
-=item FAQ
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=item CONTACT INFORMATION
-
-Bug reporting: I<bug-cpanplus at rt.cpan.org>, Questions & suggestions:
-I<cpanplus-devel at lists.sourceforge.net>
-
-=back
-
-=head2 CPANPLUS::Backend
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item ENVIRONMENT
-
-=item METHODS
-
-=over 4
-
-=item $cb = CPANPLUS::Backend->new( [CONFIGURE_OBJ] )
-
-Provide a valid C<CPANPLUS::Configure> object, No arguments
-
-=back
-
-=back
-
-=over 4
-
-=item $href = $cb->module_tree( [@modules_names_list] )
-
-=back
-
-=over 4
-
-=item $href = $cb->author_tree( [@author_names_list] )
-
-=back
-
-=over 4
-
-=item $conf = $cb->configure_object;
-
-=back
-
-=over 4
-
-=item $su = $cb->selfupdate_object;
-
-=back
-
-=over 4
-
-=item @mods = $cb->search( type => TYPE, allow => AREF, [data => AREF,
-verbose => BOOL] )
-
-=back
-
-=over 4
-
-=item $backend_rv = $cb->fetch( modules => \@mods )
-
-=item $backend_rv = $cb->extract( modules => \@mods )
-
-=item $backend_rv = $cb->install( modules => \@mods )
-
-=item $backend_rv = $cb->readme( modules => \@mods )
-
-=item $backend_rv = $cb->files( modules => \@mods )
-
-=item $backend_rv = $cb->distributions( modules => \@mods )
-
-=back
-
-=over 4
-
-=item $mod_obj = $cb->parse_module( module =>
-$modname|$distname|$modobj|URI )
-
-Text::Bastardize, Text-Bastardize, Text-Bastardize-1.06,
-AYRNIEU/Text-Bastardize, AYRNIEU/Text-Bastardize-1.06,
-AYRNIEU/Text-Bastardize-1.06.tar.gz,
-http://example.com/Text-Bastardize-1.06.tar.gz,
-file:///tmp/Text-Bastardize-1.06.tar.gz
-
-=back
-
-=over 4
-
-=item $bool = $cb->reload_indices( [update_source => BOOL, verbose => BOOL]
-);
-
-=back
-
-=over 4
-
-=item $bool = $cb->flush(CACHE_NAME)
-
-C<methods>, C<hosts>, C<modules>, C<lib>, C<load>, C<all>
-
-=back
-
-=over 4
-
-=item @mods = $cb->installed()
-
-=back
-
-=over 4
-
-=item $bool = $cb->local_mirror([path => '/dir/to/save/to', index_files =>
-BOOL, force => BOOL, verbose => BOOL] )
-
-path, index_files, force, verbose
-
-=back
-
-=over 4
-
-=item $file = $cb->autobundle([path => OUTPUT_PATH, force => BOOL, verbose
-=> BOOL])
-
-=back
-
-=over 4
-
-=item CUSTOM MODULE SOURCES
-
-=over 4
-
-=item %files = $cb->list_custom_sources
-
-=back
-
-=back
-
-=over 4
-
-=item $local_index = $cb->add_custom_source( uri => URI, [verbose => BOOL]
-);
-
-=back
-
-=over 4
-
-=item $local_index = $cb->remove_custom_source( uri => URI, [verbose =>
-BOOL] );
-
-=back
-
-=over 4
-
-=item $bool = $cb->update_custom_source( [remote => URI] );
-
-=back
-
-=over 4
-
-=item $file = $cb->write_custom_source_index( path =>
-/path/to/package/root, [to => /path/to/index/file, verbose => BOOL] );
-
-=back
-
-=over 4
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 CPANPLUS::Backend::RV
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=over 4
-
-=item new( ok => BOOL, args => DATA, rv => DATA, [function => $method_name]
-)
-
-ok, args, rv, function
-
-=back
-
-=back
-
-=over 4
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 CPANPLUS::Config
-
-=over 4
-
-=item DESCRIPTION
-
-=item CONFIGURATION
-
-=back
-
-=over 4
-
-=item Section 'conf'
-
-hosts
-
-=back
-
-base
-
-buildflags
-
-cpantest
-
-cpantest_mx
-
-debug
-
-dist_type
-
-email
-
-extractdir
-
-fetchdir
-
-flush
-
-force
-
-lib
-
-makeflags
-
-makemakerflags
-
-md5
-
-no_update
-
-passive
-
-prefer_bin
-
-prefer_makefile
-
-prereqs
-
-shell
-
-show_startup_tip
-
-signature
-
-skiptest
-
-storable
-
-timeout
-
-verbose
-
-write_install_log
-
-editor
-
-make
-
-pager
-
-shell
-
-sudo
-
-perlwrapper
-
-=over 4
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 CPANPLUS::Configure
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=over 4
-
-=item $Configure = CPANPLUS::Configure->new( load_configs => BOOL )
-
-=back
-
-=back
-
-=over 4
-
-=item $bool = $Configure->init( [rescan => BOOL])
-
-=back
-
-=over 4
-
-=item can_save( [$config_location] )
-
-=back
-
-=over 4
-
-=item $file = $conf->save( [$package_name] )
-
-=back
-
-=over 4
-
-=item options( type => TYPE )
-
-=back
-
-=over 4
-
-=item ACCESSORS
-
-=over 4
-
-=item get_SOMETHING( ITEM, [ITEM, ITEM, ... ] );
-
-=item set_SOMETHING( ITEM => VAL, [ITEM => VAL, ITEM => VAL, ... ] );
-
-=item add_SOMETHING( ITEM => VAL, [ITEM => VAL, ITEM => VAL, ... ] );
-
-set|get_conf, set|get_program, _set|_get_build, _set|_get_source,
-_set|_get_mirror, _set|_get_fetch
-
-=back
-
-=back
-
-=over 4
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 CPANPLUS::Dist
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item ACCESSORS
-
-parent(), status()
-
-=item STATUS ACCESSORS
-
-created(), installed(), uninstalled(), dist()
-
-=back
-
-=over 4
-
-=item $dist = CPANPLUS::Dist->new( module => MODOBJ, [format => DIST_TYPE]
-);
-
-=back
-
-=over 4
-
-=item @dists = CPANPLUS::Dist->dist_types;
-
-=back
-
-=over 4
-
-=item prereq_satisfied( modobj => $modobj, version => $version_spec )
-
-=back
-
-=over 4
-
-=item _resolve_prereqs
-
-=back
-
-=head2 CPANPLUS::Dist::Base - Base class for custom distribution classes
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FLOW
-
-=item METHODS
-
-=back
-
-=over 4
-
-=item $bool = $Class->format_available
-
-=back
-
-=over 4
-
-=item $bool = $dist->init
-
-=back
-
-=over 4
-
-=item $bool = $dist->prepare
-
-=back
-
-=over 4
-
-=item $bool = $dist->create
-
-=back
-
-=over 4
-
-=item $bool = $dist->install
-
-=back
-
-=over 4
-
-=item $bool = $dist->uninstall
-
-=back
-
-=head2 CPANPLUS::Dist::Build
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item ACCESSORS
-
-parent(), status()
-
-=item STATUS ACCESSORS
-
-build_pl (), build (), test (), prepared (), distdir (), created (),
-installed (), uninstalled (), _create_args (), _install_args (), _mb_object
-()
-
-=back
-
-=over 4
-
-=item METHODS
-
-=over 4
-
-=item $bool = CPANPLUS::Dist::Build->format_available();
-
-=back
-
-=back
-
-=over 4
-
-=item $bool = $dist->init();
-
-=back
-
-=over 4
-
-=item $bool = $dist->prepare([perl => '/path/to/perl', buildflags =>
-'EXTRA=FLAGS', force => BOOL, verbose => BOOL])
-
-=back
-
-=over 4
-
-=item $dist->create([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS',
-prereq_target => TARGET, force => BOOL, verbose => BOOL, skiptest => BOOL])
-
-=back
-
-=over 4
-
-=item $dist->install([verbose => BOOL, perl => /path/to/perl])
-
-=back
-
-=over 4
-
-=item KNOWN ISSUES
-
-Module::Build can not be upgraded using its own API (#13169), Module::Build
-does not provide access to install history (#9793)
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 CPANPLUS::Dist::MM
-
-=over 4
-
-=item SYNOPSIS
-
-=item ACCESSORS
-
-parent(), status()
-
-=item STATUS ACCESSORS
-
-makefile (), make (), test (), prepared (), distdir (), created (),
-installed (), uninstalled (), _create_args (), _install_args ()
-
-=back
-
-=over 4
-
-=item METHODS
-
-=over 4
-
-=item $bool = $dist->format_available();
-
-=back
-
-=back
-
-=over 4
-
-=item $href = $dist->_find_prereqs( file => '/path/to/Makefile', [verbose
-=> BOOL])
-
-=back
-
-=over 4
-
-=item $bool = $dist->create([perl => '/path/to/perl', make =>
-'/path/to/make', makeflags => 'EXTRA=FLAGS', prereq_target => TARGET,
-skiptest => BOOL, force => BOOL, verbose => BOOL])
-
-=back
-
-=over 4
-
-=item $bool = $dist->install([make => '/path/to/make', makemakerflags =>
-'EXTRA=FLAGS', force => BOOL, verbose => BOOL])
-
-=back
-
-=over 4
-
-=item $bool = $dist->write_makefile_pl([force => BOOL, verbose => BOOL])
-
-=back
-
-=head2 CPANPLUS::Dist::Sample -- Sample code to create your own Dist::*
-plugin
-
-=over 4
-
-=item Description.
-
-=back
-
-=head2 CPANPLUS::Error
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS
-
-=over 4
-
-=item cp_msg("message string" [,VERBOSE])
-
-=item msg()
-
-=item cp_error("error string" [,VERBOSE])
-
-=item error()
-
-=back
-
-=item CLASS METHODS
-
-=over 4
-
-=item CPANPLUS::Error->stack()
-
-=item CPANPLUS::Error->stack_as_string([TRACE])
-
-=item CPANPLUS::Error->flush()
-
-=back
-
-=back
-
-=over 4
-
-=item GLOBAL VARIABLES
-
-$ERROR_FH, $MSG_FH
-
-=back
-
-=head2 CPANPLUS::FAQ
-
-=over 4
-
-=item DESCRIPTION
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 CPANPLUS::Hacking
-
-=over 4
-
-=item DESCRIPTION
-
-=item OBTAINING CPANPLUS
-
-=item INSTALLING CPANPLUS
-
-=item CONFIGURING CPANPLUS
-
-=item RUNNING CPANPLUS FROM DEVELOPMENT ENVIRONMENT
-
-=item RUNNING CPANPLUS TESTS
-
-=item FINDING BUGS
-
-Problem description, Program demonstrating the bug, [OPTIONAL] A patch to
-the test suite to test for the bug, [OPTIONAL] A patch to the code + tests
-+ documentation
-
-=item SUPPLYING PATCHES
-
-In C<diff -u> or C<diff -c> format, From the root of the snapshot,
-Including patches for code + tests + docs, Sent per mail to
-cpanplus-devel at lists.sourceforge.net, With subject containing C<[PATCH]> +
-description of the patch
-
-=back
-
-=head2 CPANPLUS::Internals
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item ACCESSORS
-
-_conf, _id, _lib, _perl5lib
-
-=back
-
-=over 4
-
-=item METHODS
-
-=over 4
-
-=item $internals = CPANPLUS::Internals->_init( _conf => CONFIG_OBJ )
-
-=back
-
-=back
-
-=over 4
-
-=item $bool = $internals->_flush( list => \@caches )
-
-=back
-
-=over 4
-
-=item $bool = $internals->_register_callback( name => CALLBACK_NAME, code
-=> CODEREF );
-
-install_prerequisite, send_test_report, munge_test_report,
-edit_test_report, proceed_on_test_failure, munge_dist_metafile
-
-=back
-
-=over 4
-
-=item $bool = $internals->_add_to_includepath( directories => \@dirs )
-
-=back
-
-=over 4
-
-=item $id = CPANPLUS::Internals->_last_id
-
-=item $id = CPANPLUS::Internals->_store_id( $internals )
-
-=item $obj = CPANPLUS::Internals->_retrieve_id( $ID )
-
-=item CPANPLUS::Internals->_remove_id( $ID )
-
-=item @objs = CPANPLUS::Internals->_return_all_objects
-
-=back
-
-=head2 CPANPLUS::Internals::Extract
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item $dir = _extract( module => $modobj, [perl => '/path/to/perl',
-extractdir => '/path/to/extract/to', prefer_bin => BOOL, verbose => BOOL,
-force => BOOL] )
-
-module, extractdir, prefer_bin, perl, verbose, force
-
-=back
-
-=back
-
-=head2 CPANPLUS::Internals::Fetch
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=back
-
-=over 4
-
-=item $path = _fetch( module => $modobj, [fetchdir => '/path/to/save/to',
-fetch_from => 'scheme://path/to/fetch/from', verbose => BOOL, force =>
-BOOL, prefer_bin => BOOL] )
-
-=back
-
-=over 4
-
-=item _add_fail_host( host => $host_hashref )
-
-=item _host_ok( host => $host_hashref )
-
-=back
-
-=head2 CPANPLUS::Internals::Report
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=over 4
-
-=item $bool = $cb->_have_query_report_modules
-
-=item $bool = $cb->_have_send_report_modules
-
-=back
-
-=back
-
-=over 4
-
-=item @list = $cb->_query_report( module => $modobj, [all_versions => BOOL,
-verbose => BOOL] )
-
-=back
-
-=over 4
-
-=item $bool = $cb->_send_report( module => $modobj, buffer => $make_output,
-failed => BOOL, [save => BOOL, address => $email_to, dontcc => BOOL,
-verbose => BOOL, force => BOOL]);
-
-module, buffer, failed, save, address, dontcc, verbose, force
-
-=back
-
-=head2 CPANPLUS::Internals::Search
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=over 4
-
-=item _search_module_tree( type => TYPE, allow => \@regexex, [data =>
-\@previous_results ] )
-
-type, allow, data
-
-=back
-
-=back
-
-=over 4
-
-=item _search_author_tree( type => TYPE, allow => \@regexex, [data =>
-\@previous_results ] )
-
-type, allow, data
-
-=back
-
-=over 4
-
-=item _all_installed()
-
-=back
-
-=head2 CPANPLUS::Internals::Source
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=back
-
-=over 4
-
-=item $cb->_check_trees( [update_source => BOOL, path => PATH, verbose =>
-BOOL] )
-
-update_source, path, verbose
-
-=back
-
-=over 4
-
-=item $cb->__check_uptodate( file => $file, name => $name, [update_source
-=> BOOL, verbose => BOOL] )
-
-file, name, update_source, verbose
-
-=back
-
-=over 4
-
-=item $cb->_update_source( name => $name, [path => $path, verbose => BOOL]
-)
-
-name, path, verbose
-
-=back
-
-=over 4
-
-=item $cb->_build_trees( uptodate => BOOL, [use_stored => BOOL, path =>
-$path, verbose => BOOL] )
-
-uptodate, path, verbose, use_stored
-
-=back
-
-=over 4
-
-=item $cb->__retrieve_source(name => $name, [path => $path, uptodate =>
-BOOL, verbose => BOOL])
-
-name, uptodate, path, verbose
-
-=back
-
-=over 4
-
-=item $cb->_save_source([verbose => BOOL, path => $path])
-
-path, verbose
-
-=back
-
-=over 4
-
-=item $cb->__create_author_tree([path => $path, uptodate => BOOL, verbose
-=> BOOL])
-
-uptodate, path, verbose
-
-=back
-
-=over 4
-
-=item $cb->_create_mod_tree([path => $path, uptodate => BOOL, verbose =>
-BOOL])
-
-uptodate, path, verbose
-
-=back
-
-=over 4
-
-=item $cb->__create_dslip_tree([path => $path, uptodate => BOOL, verbose =>
-BOOL])
-
-uptodate, path, verbose
-
-=back
-
-=over 4
-
-=item $cb->_dslip_defs ()
-
-=back
-
-=over 4
-
-=item $file = $cb->_add_custom_module_source( uri => URI, [verbose => BOOL]
-);
-
-=back
-
-=over 4
-
-=item $index = $cb->__custom_module_source_index_file( uri => $uri );
-
-=back
-
-=over 4
-
-=item $file = $cb->_remove_custom_module_source( uri => URI, [verbose =>
-BOOL] );
-
-=back
-
-=over 4
-
-=item %files = $cb->__list_custom_module_sources
-
-=back
-
-=over 4
-
-=item $bool = $cb->__update_custom_module_sources( [verbose => BOOL] );
-
-=back
-
-=over 4
-
-=item $ok = $cb->__update_custom_module_source
-
-=back
-
-=over 4
-
-=item $bool = $cb->__write_custom_module_index( path => /path/to/packages,
-[to => /path/to/index/file, verbose => BOOL] )
-
-=back
-
-=over 4
-
-=item $bool = $cb->__create_custom_module_entries( [verbose => BOOL] )
-
-=back
-
-=head2 CPANPLUS::Internals::Utils
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=over 4
-
-=item $cb->_mkdir( dir => '/some/dir' )
-
-=back
-
-=back
-
-=over 4
-
-=item $cb->_chdir( dir => '/some/dir' )
-
-=back
-
-=over 4
-
-=item $cb->_rmdir( dir => '/some/dir' );
-
-=back
-
-=over 4
-
-=item $cb->_perl_version ( perl => 'some/perl/binary' );
-
-=back
-
-=over 4
-
-=item $cb->_version_to_number( version => $version );
-
-=back
-
-=over 4
-
-=item $cb->_whoami
-
-=back
-
-=over 4
-
-=item _get_file_contents( file => $file );
-
-=back
-
-=over 4
-
-=item $cb->_mode_plus_w( file => '/path/to/file' );
-
-=back
-
-=over 4
-
-=item $uri = $cb->_host_to_uri( scheme => SCHEME, host => HOST, path =>
-PATH );
-
-=back
-
-=over 4
-
-=item $cb->_vcmp( VERSION, VERSION );
-
-=back
-
-=over 4
-
-=item $cb->_home_dir
-
-=back
-
-=over 4
-
-=item $path = $cb->_safe_path( path => $path );
-
-=back
-
-=over 4
-
-=item ($pkg, $version, $ext) = $cb->_split_package_string( package =>
-PACKAGE_STRING );
-
-=back
-
-=head2 CPANPLUS::Module
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item CLASS METHODS
-
-=over 4
-
-=item accessors ()
-
-=back
-
-=back
-
-=over 4
-
-=item ACCESSORS
-
-name, module, version, path, comment, package, description, dslip
-
-=back
-
-status, author, parent
-
-=over 4
-
-=item STATUS ACCESSORS
-
-installer_type, dist_cpan, dist, prereqs, signature, extract, fetch,
-readme, uninstall, created, installed, checksums, checksum_ok,
-checksum_value
-
-=item METHODS
-
-=over 4
-
-=item $self = CPANPLUS::Module::new( OPTIONS )
-
-=back
-
-=back
-
-=over 4
-
-=item $mod->package_name
-
-=item $mod->package_version
-
-=item $mod->package_extension
-
-=item $mod->package_is_perl_core
-
-=item $mod->module_is_supplied_with_perl_core( [version => $]] )
-
-=item $mod->is_bundle
-
-=item $mod->is_third_party
-
-=item $mod->third_party_information
-
-=back
-
-=over 4
-
-=item $clone = $self->clone
-
-=back
-
-=over 4
-
-=item $where = $self->fetch
-
-=back
-
-=over 4
-
-=item $path = $self->extract
-
-=back
-
-=over 4
-
-=item $type = $self->get_installer_type([prefer_makefile => BOOL])
-
-=back
-
-=over 4
-
-=item $dist = $self->dist([target => 'prepare|create', format =>
-DISTRIBUTION_TYPE, args => {key => val}]);
-
-=back
-
-=over 4
-
-=item $bool = $mod->prepare( )
-
-Convenience method around C<install()> that prepares a module
-without actually building it. This is equivalent to invoking C<install>
-with C<target> set to C<prepare>
-
-=back
-
-=over 4
-
-=item $bool = $mod->create( )
-
-=back
-
-=over 4
-
-=item $bool = $mod->test( )
-
-=back
-
-=over 4
-
-=item $bool = $self->install([ target => 'prepare|create|install', format
-=> FORMAT_TYPE, extractdir => DIRECTORY, fetchdir => DIRECTORY, prefer_bin
-=> BOOL, force => BOOL, verbose => BOOL, ..... ]);
-
-=back
-
-=over 4
-
-=item $text = $self->readme
-
-=back
-
-=over 4
-
-=item $version = $self->installed_version()
-
-=item $where = $self->installed_file()
-
-=item $bool = $self->is_uptodate([version => VERSION_NUMBER])
-
-=back
-
-=over 4
-
-=item $href = $self->details()
-
-=back
-
-=over 4
-
-=item @list = $self->contains()
-
-=back
-
-=over 4
-
-=item @list_of_hrefs = $self->fetch_report()
-
-=back
-
-=over 4
-
-=item $bool = $self->uninstall([type => [all|man|prog])
-
-=back
-
-=over 4
-
-=item @modobj = $self->distributions()
-
-=back
-
-=over 4
-
-=item @list = $self->files ()
-
-=back
-
-=over 4
-
-=item @list = $self->directory_tree ()
-
-=back
-
-=over 4
-
-=item @list = $self->packlist ()
-
-=back
-
-=over 4
-
-=item @list = $self->validate ()
-
-=back
-
-=over 4
-
-=item $bool = $self->add_to_includepath;
-
-=item $path = $self->best_path_to_module_build();
-
-=back
-
-=over 4
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 CPANPLUS::Module::Author
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item ACCESSORS
-
-author, cpanid, email, parent
-
-=back
-
-=over 4
-
-=item METHODS
-
-=over 4
-
-=item $auth = CPANPLUS::Module::Author->new( author => AUTHOR_NAME, cpanid
-=> CPAN_ID, _id => INTERNALS_ID [, email => AUTHOR_EMAIL] )
-
-=back
-
-=back
-
-=over 4
-
-=item @mod_objs = $auth->modules()
-
-=back
-
-=over 4
-
-=item @dists = $auth->distributions()
-
-=back
-
-=over 4
-
-=item CLASS METHODS
-
-=over 4
-
-=item accessors ()
-
-=back
-
-=back
-
-=head2 CPANPLUS::Module::Author::Fake
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=over 4
-
-=item new( _id => DIGIT )
-
-=back
-
-=back
-
-=head2 CPANPLUS::Module::Checksums
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=over 4
-
-=item $mod->checksums
-
-=back
-
-=back
-
-=head2 CPANPLUS::Module::Fake
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=over 4
-
-=item new( module => $mod, path => $path, package => $pkg, [_id => DIGIT] )
-
-=back
-
-=back
-
-=head2 CPANPLUS::inc
-
-=over 4
-
-=item DESCRIPTION
-
-=back
-
-=head2 CPANPLUS::inc - runtime inclusion of privately bundled modules
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-Put a coderef at the beginning of C<@INC>, Add the full path to the
-C<CPANPLUS/inc> directory to C<$ENV{PERL5LIB>
-
-=item METHODS
-
-=over 4
-
-=item CPANPLUS::inc->inc_path()
-
-=item CPANPLUS::inc->my_path()
-
-=item CPANPLUS::inc->installer_path()
-
-=back
-
-=back
-
-=over 4
-
-=item CPANPLUS::inc->original_perl5lib
-
-=item CPANPLUS::inc->original_perl5opt
-
-=item CPANPLUS::inc->original_inc
-
-=item CPANPLUS::inc->limited_perl5opt(@modules);
-
-=back
-
-=over 4
-
-=item CPANPLUS::inc->interesting_modules()
-
-=back
-
-=over 4
-
-=item INTERESTING MODULES
-
-Loop over your @INC, Check the version on every suitable module found in
- at INC
-
-=back
-
-=over 4
-
-=item DEBUG
-
-=item CAVEATS
-
-On multiple C<use lib> calls, our coderef may not be the first in @INC,
-Non-directories in @INC
-
-=back
-
-=head2 CPANPLUSelfupdate, CPANPLUS::Selfupdate
-
-=over 4
-
-=item SYNOPSIS
-
-=back
-
-=over 4
-
-=item METHODS
-
-=over 4
-
-=item $self = CPANPLUS::Selfupdate->new( $backend_object );
-
-=back
-
-=back
-
-=over 4
-
-=item %list = $self->list_modules_to_update( update =>
-"core|dependencies|enabled_features|features|all", [latest => BOOL] )
-
-List which modules C<selfupdate> would upgrade. You can update either
-the core (CPANPLUS itself), the core dependencies, all features you have
-currently turned on, or all features available, or everything.
-
-=back
-
-=over 4
-
-=item @features = $self->list_features
-
-=back
-
-=over 4
-
-=item @features = $self->list_enabled_features
-
-=back
-
-=over 4
-
-=item @mods = $self->modules_for_feature( FEATURE [,AS_HASH] )
-
-=back
-
-=over 4
-
-=item @mods = $self->list_core_dependencies( [AS_HASH] )
-
-=back
-
-=over 4
-
-=item @mods = $self->list_core_modules( [AS_HASH] )
-
-=back
-
-=over 4
-
-=item CPANPLUS::Selfupdate::Module
-
-=back
-
-=over 4
-
-=item $version = $mod->version_required
-
-=back
-
-=over 4
-
-=item $bool = $mod->is_installed_version_sufficient
-
-=back
-
-=over 4
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 CPANPLUShell, CPANPLUS::Shell
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 CPANPLUShell::Classic, CPANPLUS::Shell::Classic - CPAN.pm emulation
-for CPANPLUS
-
-=over 4
-
-=item DESCRIPTION
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=over 4
-
-=item SEE ALSO
-
-=back
-
-=head2 CPANPLUShell::Default, CPANPLUS::Shell::Default
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 CPANPLUShell::Default::Plugins::CustomSource,
-CPANPLUS::Shell::Default::Plugins::CustomSource
-
-=over 4
-
-=item SYNOPSIS
-
- ### elaborate help text
- CPAN Terminal> /? cs
-
-=item DESCRIPTION
-
-=back
-
-=head2 CPANPLUShell::Default::Plugins::HOWTO,
-CPANPLUS::Shell::Default::Plugins::HOWTO -- documentation on how to write
-your own plugins
-
-=over 4
-
-=item SYNOPSIS
-
-=item HOWTO
-
-=over 4
-
-=item Registering Plugin Modules
-
-=item Registering Plugin Commands
-
-=item Registering Plugin Help
-
-=item Arguments to Plugin Commands
-
-Classname -- The name of your plugin class, Shell -- The
-CPANPLUS::Shell::Default object, Backend -- The CPANPLUS::Backend object,
-Command -- The command issued by the user, Input -- The input string
-from the user, Options -- A hashref of options provided by the user
-
-=back
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 CPANPLUShell::Default::Plugins::Remote,
-CPANPLUS::Shell::Default::Plugins::Remote
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 CPANPLUShell::Default::Plugins::Source,
-CPANPLUS::Shell::Default::Plugins::Source
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 CPANox, CPAN::Nox - Wrapper around CPAN.pm without using any XS
-module
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item LICENSE
-
-=item SEE ALSO
-
-=back
-
-=head2 Carp, carp - warn of errors (from perspective of caller)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Forcing a Stack Trace
-
-=back
-
-=item GLOBAL VARIABLES
-
-=over 4
-
-=item $Carp::MaxEvalLen
-
-=item $Carp::MaxArgLen
-
-=item $Carp::MaxArgNums
-
-=item $Carp::Verbose
-
-=item %Carp::Internal
-
-=item %Carp::CarpInternal
-
-=item $Carp::CarpLevel
-
-=back
-
-=item BUGS
-
-=back
-
-=head2 Carp::Heavy - heavy machinery, no user serviceable parts inside
-
-=head2 Class::ISA -- report the search path for a class's ISA tree
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS
-
-the function Class::ISA::super_path($CLASS), the function
-Class::ISA::self_and_super_path($CLASS), the function
-Class::ISA::self_and_super_versions($CLASS)
-
-=item CAUTIONARY NOTES
-
-=item COPYRIGHT
-
-=item AUTHOR
-
-=back
-
-=head2 Class::Struct - declare struct-like datatypes as Perl classes
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item The C<struct()> function
-
-=item Class Creation at Compile Time
-
-=item Element Types and Accessor Methods
-
-Scalar (C<'$'> or C<'*$'>), Array (C<'@'> or C<'*@'>), Hash (C<'%'> or
-C<'*%'>), Class (C<'Class_Name'> or C<'*Class_Name'>)
-
-=item Initializing with C<new>
-
-=back
-
-=item EXAMPLES
-
-Example 1, Example 2, Example 3
-
-=item Author and Modification History
-
-=back
-
-=head2 Compress::Raw::Zlib - Low-Level Interface to zlib compression
-library
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Compress::Raw::Zlib::Deflate
-
-=over 4
-
-=item B<($d, $status) = new Compress::Raw::Zlib::Deflate( [OPT] ) >
-
-B<-Level>, B<-Method>, B<-WindowBits>, B<-MemLevel>, B<-Strategy>,
-B<-Dictionary>, B<-Bufsize>, B<-AppendOutput>, B<-CRC32>, B<-ADLER32>
-
-=item B<$status = $d-E<gt>deflate($input, $output)>
-
-=item B<$status = $d-E<gt>flush($output [, $flush_type]) >
-
-=item B<$status = $d-E<gt>deflateParams([OPT])>
-
-B<-Level>, B<-Strategy>, B<-BufSize>
-
-=item B<$status = $d-E<gt>deflateTune($good_length, $max_lazy,
-$nice_length, $max_chain)>
-
-=item B<$d-E<gt>dict_adler()>
-
-=item B<$d-E<gt>crc32()>
-
-=item B<$d-E<gt>adler32()>
-
-=item B<$d-E<gt>msg()>
-
-=item B<$d-E<gt>total_in()>
-
-=item B<$d-E<gt>total_out()>
-
-=item B<$d-E<gt>get_Strategy()>
-
-=item B<$d-E<gt>get_Level()>
-
-=item B<$d-E<gt>get_BufSize()>
-
-=item Example
-
-=back
-
-=item Compress::Raw::Zlib::Inflate
-
-=over 4
-
-=item B< ($i, $status) = new Compress::Raw::Zlib::Inflate( [OPT] ) >
-
-B<-WindowBits>, B<-Bufsize>, B<-Dictionary>, B<-AppendOutput>, B<-CRC32>,
-B<-ADLER32>, B<-ConsumeInput>
-
-=item B< $status = $i-E<gt>inflate($input, $output [,$eof]) >
-
-=item B<$status = $i-E<gt>inflateSync($input)>
-
-=item B<$i-E<gt>dict_adler()>
-
-=item B<$i-E<gt>crc32()>
-
-=item B<$i-E<gt>adler32()>
-
-=item B<$i-E<gt>msg()>
-
-=item B<$i-E<gt>total_in()>
-
-=item B<$i-E<gt>total_out()>
-
-=item B<$d-E<gt>get_BufSize()>
-
-=item Example
-
-=back
-
-=item CHECKSUM FUNCTIONS
-
-=item ACCESSING ZIP FILES
-
-=item CONSTANTS
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Compress::Raw::Zlib::Compress::Raw::Zlib, Compress::Raw::Zlib -
-Low-Level Interface to zlib compression library
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Compress::Raw::Zlib::Deflate
-
-=over 4
-
-=item B<($d, $status) = new Compress::Raw::Zlib::Deflate( [OPT] ) >
-
-B<-Level>, B<-Method>, B<-WindowBits>, B<-MemLevel>, B<-Strategy>,
-B<-Dictionary>, B<-Bufsize>, B<-AppendOutput>, B<-CRC32>, B<-ADLER32>
-
-=item B<$status = $d-E<gt>deflate($input, $output)>
-
-=item B<$status = $d-E<gt>flush($output [, $flush_type]) >
-
-=item B<$status = $d-E<gt>deflateParams([OPT])>
-
-B<-Level>, B<-Strategy>, B<-BufSize>
-
-=item B<$status = $d-E<gt>deflateTune($good_length, $max_lazy,
-$nice_length, $max_chain)>
-
-=item B<$d-E<gt>dict_adler()>
-
-=item B<$d-E<gt>crc32()>
-
-=item B<$d-E<gt>adler32()>
-
-=item B<$d-E<gt>msg()>
-
-=item B<$d-E<gt>total_in()>
-
-=item B<$d-E<gt>total_out()>
-
-=item B<$d-E<gt>get_Strategy()>
-
-=item B<$d-E<gt>get_Level()>
-
-=item B<$d-E<gt>get_BufSize()>
-
-=item Example
-
-=back
-
-=item Compress::Raw::Zlib::Inflate
-
-=over 4
-
-=item B< ($i, $status) = new Compress::Raw::Zlib::Inflate( [OPT] ) >
-
-B<-WindowBits>, B<-Bufsize>, B<-Dictionary>, B<-AppendOutput>, B<-CRC32>,
-B<-ADLER32>, B<-ConsumeInput>
-
-=item B< $status = $i-E<gt>inflate($input, $output [,$eof]) >
-
-=item B<$status = $i-E<gt>inflateSync($input)>
-
-=item B<$i-E<gt>dict_adler()>
-
-=item B<$i-E<gt>crc32()>
-
-=item B<$i-E<gt>adler32()>
-
-=item B<$i-E<gt>msg()>
-
-=item B<$i-E<gt>total_in()>
-
-=item B<$i-E<gt>total_out()>
-
-=item B<$d-E<gt>get_BufSize()>
-
-=item Example
-
-=back
-
-=item CHECKSUM FUNCTIONS
-
-=item ACCESSING ZIP FILES
-
-=item CONSTANTS
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Compress::Zlib - Interface to zlib compression library
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Notes for users of Compress::Zlib version 1
-
-=back
-
-=item GZIP INTERFACE
-
-B<$gz = gzopen($filename, $mode)>, B<$gz = gzopen($filehandle, $mode)>,
-B<$bytesread = $gz-E<gt>gzread($buffer [, $size]) ;>, B<$bytesread =
-$gz-E<gt>gzreadline($line) ;>, B<$byteswritten = $gz-E<gt>gzwrite($buffer)
-;>, B<$status = $gz-E<gt>gzflush($flush_type) ;>, B<$offset =
-$gz-E<gt>gztell() ;>, B<$status = $gz-E<gt>gzseek($offset, $whence) ;>,
-B<$gz-E<gt>gzclose>, B<$gz-E<gt>gzsetparams($level, $strategy>, B<$level>,
-B<$strategy>, B<$gz-E<gt>gzerror>, B<$gzerrno>
-
-=over 4
-
-=item Examples
-
-=item Compress::Zlib::memGzip
-
-=item Compress::Zlib::memGunzip
-
-=back
-
-=item COMPRESS/UNCOMPRESS
-
-B<$dest = compress($source [, $level] ) ;>, B<$dest = uncompress($source)
-;>
-
-=item Deflate Interface
-
-=over 4
-
-=item B<($d, $status) = deflateInit( [OPT] )>
-
-B<-Level>, B<-Method>, B<-WindowBits>, B<-MemLevel>, B<-Strategy>,
-B<-Dictionary>, B<-Bufsize>
-
-=item B<($out, $status) = $d-E<gt>deflate($buffer)>
-
-=item B<($out, $status) = $d-E<gt>flush([flush_type])>
-
-=item B<$status = $d-E<gt>deflateParams([OPT])>
-
-B<-Level>, B<-Strategy>
-
-=item B<$d-E<gt>dict_adler()>
-
-=item B<$d-E<gt>msg()>
-
-=item B<$d-E<gt>total_in()>
-
-=item B<$d-E<gt>total_out()>
-
-=item Example
-
-=back
-
-=item Inflate Interface
-
-=over 4
-
-=item B<($i, $status) = inflateInit()>
-
-B<-WindowBits>, B<-Bufsize>, B<-Dictionary>
-
-=item B<($out, $status) = $i-E<gt>inflate($buffer)>
-
-=item B<$status = $i-E<gt>inflateSync($buffer)>
-
-=item B<$i-E<gt>dict_adler()>
-
-=item B<$i-E<gt>msg()>
-
-=item B<$i-E<gt>total_in()>
-
-=item B<$i-E<gt>total_out()>
-
-=item Example
-
-=back
-
-=item CHECKSUM FUNCTIONS
-
-=item CONSTANTS
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Compress::Zlib::Compress::Zlib, Compress::Zlib - Interface to zlib
-compression library
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Notes for users of Compress::Zlib version 1
-
-=back
-
-=item GZIP INTERFACE
-
-B<$gz = gzopen($filename, $mode)>, B<$gz = gzopen($filehandle, $mode)>,
-B<$bytesread = $gz-E<gt>gzread($buffer [, $size]) ;>, B<$bytesread =
-$gz-E<gt>gzreadline($line) ;>, B<$byteswritten = $gz-E<gt>gzwrite($buffer)
-;>, B<$status = $gz-E<gt>gzflush($flush_type) ;>, B<$offset =
-$gz-E<gt>gztell() ;>, B<$status = $gz-E<gt>gzseek($offset, $whence) ;>,
-B<$gz-E<gt>gzclose>, B<$gz-E<gt>gzsetparams($level, $strategy>, B<$level>,
-B<$strategy>, B<$gz-E<gt>gzerror>, B<$gzerrno>
-
-=over 4
-
-=item Examples
-
-=item Compress::Zlib::memGzip
-
-=item Compress::Zlib::memGunzip
-
-=back
-
-=item COMPRESS/UNCOMPRESS
-
-B<$dest = compress($source [, $level] ) ;>, B<$dest = uncompress($source)
-;>
-
-=item Deflate Interface
-
-=over 4
-
-=item B<($d, $status) = deflateInit( [OPT] )>
-
-B<-Level>, B<-Method>, B<-WindowBits>, B<-MemLevel>, B<-Strategy>,
-B<-Dictionary>, B<-Bufsize>
-
-=item B<($out, $status) = $d-E<gt>deflate($buffer)>
-
-=item B<($out, $status) = $d-E<gt>flush([flush_type])>
-
-=item B<$status = $d-E<gt>deflateParams([OPT])>
-
-B<-Level>, B<-Strategy>
-
-=item B<$d-E<gt>dict_adler()>
-
-=item B<$d-E<gt>msg()>
-
-=item B<$d-E<gt>total_in()>
-
-=item B<$d-E<gt>total_out()>
-
-=item Example
-
-=back
-
-=item Inflate Interface
-
-=over 4
-
-=item B<($i, $status) = inflateInit()>
-
-B<-WindowBits>, B<-Bufsize>, B<-Dictionary>
-
-=item B<($out, $status) = $i-E<gt>inflate($buffer)>
-
-=item B<$status = $i-E<gt>inflateSync($buffer)>
-
-=item B<$i-E<gt>dict_adler()>
-
-=item B<$i-E<gt>msg()>
-
-=item B<$i-E<gt>total_in()>
-
-=item B<$i-E<gt>total_out()>
-
-=item Example
-
-=back
-
-=item CHECKSUM FUNCTIONS
-
-=item CONSTANTS
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Config - access Perl configuration information
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-myconfig(), config_sh(), config_re($regex), config_vars(@names)
-
-=item EXAMPLE
-
-=item WARNING
-
-=item GLOSSARY
-
-=over 4
-
-=item _
-
-C<_a>, C<_exe>, C<_o>
-
-=item a
-
-C<afs>, C<afsroot>, C<alignbytes>, C<ansi2knr>, C<aphostname>,
-C<api_revision>, C<api_subversion>, C<api_version>, C<api_versionstring>,
-C<ar>, C<archlib>, C<archlibexp>, C<archname>, C<archname64>, C<archobjs>,
-C<asctime_r_proto>, C<awk>
-
-=item b
-
-C<baserev>, C<bash>, C<bin>, C<binexp>, C<bison>, C<byacc>, C<byteorder>
-
-=item c
-
-C<c>, C<castflags>, C<cat>, C<cc>, C<cccdlflags>, C<ccdlflags>, C<ccflags>,
-C<ccflags_uselargefiles>, C<ccname>, C<ccsymbols>, C<ccversion>, C<cf_by>,
-C<cf_email>, C<cf_time>, C<chgrp>, C<chmod>, C<chown>, C<clocktype>,
-C<comm>, C<compress>, C<contains>, C<cp>, C<cpio>, C<cpp>, C<cpp_stuff>,
-C<cppccsymbols>, C<cppflags>, C<cpplast>, C<cppminus>, C<cpprun>,
-C<cppstdin>, C<cppsymbols>, C<crypt_r_proto>, C<cryptlib>, C<csh>,
-C<ctermid_r_proto>, C<ctime_r_proto>
-
-=item d
-
-C<d__fwalk>, C<d_access>, C<d_accessx>, C<d_aintl>, C<d_alarm>,
-C<d_archlib>, C<d_asctime_r>, C<d_atolf>, C<d_atoll>,
-C<d_attribute_format>, C<d_attribute_malloc>, C<d_attribute_nonnull>,
-C<d_attribute_noreturn>, C<d_attribute_pure>, C<d_attribute_unused>,
-C<d_attribute_warn_unused_result>, C<d_bcmp>, C<d_bcopy>, C<d_bsd>,
-C<d_bsdgetpgrp>, C<d_bsdsetpgrp>, C<d_builtin_choose_expr>,
-C<d_builtin_expect>, C<d_bzero>, C<d_c99_variadic_macros>, C<d_casti32>,
-C<d_castneg>, C<d_charvspr>, C<d_chown>, C<d_chroot>, C<d_chsize>,
-C<d_class>, C<d_clearenv>, C<d_closedir>, C<d_cmsghdr_s>, C<d_const>,
-C<d_copysignl>, C<d_cplusplus>, C<d_crypt>, C<d_crypt_r>, C<d_csh>,
-C<d_ctermid>, C<d_ctermid_r>, C<d_ctime_r>, C<d_cuserid>, C<d_dbl_dig>,
-C<d_dbminitproto>, C<d_difftime>, C<d_dir_dd_fd>, C<d_dirfd>,
-C<d_dirnamlen>, C<d_dlerror>, C<d_dlopen>, C<d_dlsymun>, C<d_dosuid>,
-C<d_drand48_r>, C<d_drand48proto>, C<d_dup2>, C<d_eaccess>, C<d_endgrent>,
-C<d_endgrent_r>, C<d_endhent>, C<d_endhostent_r>, C<d_endnent>,
-C<d_endnetent_r>, C<d_endpent>, C<d_endprotoent_r>, C<d_endpwent>,
-C<d_endpwent_r>, C<d_endsent>, C<d_endservent_r>, C<d_eofnblk>,
-C<d_eunice>, C<d_faststdio>, C<d_fchdir>, C<d_fchmod>, C<d_fchown>,
-C<d_fcntl>, C<d_fcntl_can_lock>, C<d_fd_macros>, C<d_fd_set>,
-C<d_fds_bits>, C<d_fgetpos>, C<d_finite>, C<d_finitel>, C<d_flexfnam>,
-C<d_flock>, C<d_flockproto>, C<d_fork>, C<d_fp_class>, C<d_fpathconf>,
-C<d_fpclass>, C<d_fpclassify>, C<d_fpclassl>, C<d_fpos64_t>, C<d_frexpl>,
-C<d_fs_data_s>, C<d_fseeko>, C<d_fsetpos>, C<d_fstatfs>, C<d_fstatvfs>,
-C<d_fsync>, C<d_ftello>, C<d_ftime>, C<d_futimes>, C<d_Gconvert>,
-C<d_getcwd>, C<d_getespwnam>, C<d_getfsstat>, C<d_getgrent>,
-C<d_getgrent_r>, C<d_getgrgid_r>, C<d_getgrnam_r>, C<d_getgrps>,
-C<d_gethbyaddr>, C<d_gethbyname>, C<d_gethent>, C<d_gethname>,
-C<d_gethostbyaddr_r>, C<d_gethostbyname_r>, C<d_gethostent_r>,
-C<d_gethostprotos>, C<d_getitimer>, C<d_getlogin>, C<d_getlogin_r>,
-C<d_getmnt>, C<d_getmntent>, C<d_getnbyaddr>, C<d_getnbyname>,
-C<d_getnent>, C<d_getnetbyaddr_r>, C<d_getnetbyname_r>, C<d_getnetent_r>,
-C<d_getnetprotos>, C<d_getpagsz>, C<d_getpbyname>, C<d_getpbynumber>,
-C<d_getpent>, C<d_getpgid>, C<d_getpgrp>, C<d_getpgrp2>, C<d_getppid>,
-C<d_getprior>, C<d_getprotobyname_r>, C<d_getprotobynumber_r>,
-C<d_getprotoent_r>, C<d_getprotoprotos>, C<d_getprpwnam>, C<d_getpwent>,
-C<d_getpwent_r>, C<d_getpwnam_r>, C<d_getpwuid_r>, C<d_getsbyname>,
-C<d_getsbyport>, C<d_getsent>, C<d_getservbyname_r>, C<d_getservbyport_r>,
-C<d_getservent_r>, C<d_getservprotos>, C<d_getspnam>, C<d_getspnam_r>,
-C<d_gettimeod>, C<d_gmtime_r>, C<d_gnulibc>, C<d_grpasswd>, C<d_hasmntopt>,
-C<d_htonl>, C<d_ilogbl>, C<d_inc_version_list>, C<d_index>, C<d_inetaton>,
-C<d_int64_t>, C<d_isascii>, C<d_isfinite>, C<d_isinf>, C<d_isnan>,
-C<d_isnanl>, C<d_killpg>, C<d_lchown>, C<d_ldbl_dig>,
-C<d_libm_lib_version>, C<d_link>, C<d_localtime_r>,
-C<d_localtime_r_needs_tzset>, C<d_locconv>, C<d_lockf>, C<d_longdbl>,
-C<d_longlong>, C<d_lseekproto>, C<d_lstat>, C<d_madvise>,
-C<d_malloc_good_size>, C<d_malloc_size>, C<d_mblen>, C<d_mbstowcs>,
-C<d_mbtowc>, C<d_memchr>, C<d_memcmp>, C<d_memcpy>, C<d_memmove>,
-C<d_memset>, C<d_mkdir>, C<d_mkdtemp>, C<d_mkfifo>, C<d_mkstemp>,
-C<d_mkstemps>, C<d_mktime>, C<d_mmap>, C<d_modfl>, C<d_modfl_pow32_bug>,
-C<d_modflproto>, C<d_mprotect>, C<d_msg>, C<d_msg_ctrunc>,
-C<d_msg_dontroute>, C<d_msg_oob>, C<d_msg_peek>, C<d_msg_proxy>,
-C<d_msgctl>, C<d_msgget>, C<d_msghdr_s>, C<d_msgrcv>, C<d_msgsnd>,
-C<d_msync>, C<d_munmap>, C<d_mymalloc>, C<d_nice>, C<d_nl_langinfo>,
-C<d_nv_preserves_uv>, C<d_nv_zero_is_allbits_zero>, C<d_off64_t>,
-C<d_old_pthread_create_joinable>, C<d_oldpthreads>, C<d_oldsock>,
-C<d_open3>, C<d_pathconf>, C<d_pause>, C<d_perl_otherlibdirs>,
-C<d_phostname>, C<d_pipe>, C<d_poll>, C<d_portable>, C<d_PRId64>,
-C<d_PRIeldbl>, C<d_PRIEUldbl>, C<d_PRIfldbl>, C<d_PRIFUldbl>,
-C<d_PRIgldbl>, C<d_PRIGUldbl>, C<d_PRIi64>, C<d_printf_format_null>,
-C<d_PRIo64>, C<d_PRIu64>, C<d_PRIx64>, C<d_PRIXU64>, C<d_procselfexe>,
-C<d_pseudofork>, C<d_pthread_atfork>, C<d_pthread_attr_setscope>,
-C<d_pthread_yield>, C<d_pwage>, C<d_pwchange>, C<d_pwclass>,
-C<d_pwcomment>, C<d_pwexpire>, C<d_pwgecos>, C<d_pwpasswd>, C<d_pwquota>,
-C<d_qgcvt>, C<d_quad>, C<d_random_r>, C<d_readdir>, C<d_readdir64_r>,
-C<d_readdir_r>, C<d_readlink>, C<d_readv>, C<d_recvmsg>, C<d_rename>,
-C<d_rewinddir>, C<d_rmdir>, C<d_safebcpy>, C<d_safemcpy>, C<d_sanemcmp>,
-C<d_sbrkproto>, C<d_scalbnl>, C<d_sched_yield>, C<d_scm_rights>,
-C<d_SCNfldbl>, C<d_seekdir>, C<d_select>, C<d_sem>, C<d_semctl>,
-C<d_semctl_semid_ds>, C<d_semctl_semun>, C<d_semget>, C<d_semop>,
-C<d_sendmsg>, C<d_setegid>, C<d_seteuid>, C<d_setgrent>, C<d_setgrent_r>,
-C<d_setgrps>, C<d_sethent>, C<d_sethostent_r>, C<d_setitimer>,
-C<d_setlinebuf>, C<d_setlocale>, C<d_setlocale_r>, C<d_setnent>,
-C<d_setnetent_r>, C<d_setpent>, C<d_setpgid>, C<d_setpgrp>, C<d_setpgrp2>,
-C<d_setprior>, C<d_setproctitle>, C<d_setprotoent_r>, C<d_setpwent>,
-C<d_setpwent_r>, C<d_setregid>, C<d_setresgid>, C<d_setresuid>,
-C<d_setreuid>, C<d_setrgid>, C<d_setruid>, C<d_setsent>, C<d_setservent_r>,
-C<d_setsid>, C<d_setvbuf>, C<d_sfio>, C<d_shm>, C<d_shmat>,
-C<d_shmatprototype>, C<d_shmctl>, C<d_shmdt>, C<d_shmget>, C<d_sigaction>,
-C<d_signbit>, C<d_sigprocmask>, C<d_sigsetjmp>, C<d_sitearch>,
-C<d_snprintf>, C<d_sockatmark>, C<d_sockatmarkproto>, C<d_socket>,
-C<d_socklen_t>, C<d_sockpair>, C<d_socks5_init>,
-C<d_sprintf_returns_strlen>, C<d_sqrtl>, C<d_srand48_r>, C<d_srandom_r>,
-C<d_sresgproto>, C<d_sresuproto>, C<d_statblks>, C<d_statfs_f_flags>,
-C<d_statfs_s>, C<d_statvfs>, C<d_stdio_cnt_lval>, C<d_stdio_ptr_lval>,
-C<d_stdio_ptr_lval_nochange_cnt>, C<d_stdio_ptr_lval_sets_cnt>,
-C<d_stdio_stream_array>, C<d_stdiobase>, C<d_stdstdio>, C<d_strchr>,
-C<d_strcoll>, C<d_strctcpy>, C<d_strerrm>, C<d_strerror>, C<d_strerror_r>,
-C<d_strftime>, C<d_strlcat>, C<d_strlcpy>, C<d_strtod>, C<d_strtol>,
-C<d_strtold>, C<d_strtoll>, C<d_strtoq>, C<d_strtoul>, C<d_strtoull>,
-C<d_strtouq>, C<d_strxfrm>, C<d_suidsafe>, C<d_symlink>, C<d_syscall>,
-C<d_syscallproto>, C<d_sysconf>, C<d_sysernlst>, C<d_syserrlst>,
-C<d_system>, C<d_tcgetpgrp>, C<d_tcsetpgrp>, C<d_telldir>,
-C<d_telldirproto>, C<d_time>, C<d_times>, C<d_tm_tm_gmtoff>,
-C<d_tm_tm_zone>, C<d_tmpnam_r>, C<d_truncate>, C<d_ttyname_r>, C<d_tzname>,
-C<d_u32align>, C<d_ualarm>, C<d_umask>, C<d_uname>, C<d_union_semun>,
-C<d_unordered>, C<d_unsetenv>, C<d_usleep>, C<d_usleepproto>, C<d_ustat>,
-C<d_vendorarch>, C<d_vendorbin>, C<d_vendorlib>, C<d_vendorscript>,
-C<d_vfork>, C<d_void_closedir>, C<d_voidsig>, C<d_voidtty>, C<d_volatile>,
-C<d_vprintf>, C<d_vsnprintf>, C<d_wait4>, C<d_waitpid>, C<d_wcstombs>,
-C<d_wctomb>, C<d_writev>, C<d_xenix>, C<date>, C<db_hashtype>,
-C<db_prefixtype>, C<db_version_major>, C<db_version_minor>,
-C<db_version_patch>, C<defvoidused>, C<direntrytype>, C<dlext>, C<dlsrc>,
-C<doublesize>, C<drand01>, C<drand48_r_proto>, C<dynamic_ext>
-
-=item e
-
-C<eagain>, C<ebcdic>, C<echo>, C<egrep>, C<emacs>, C<endgrent_r_proto>,
-C<endhostent_r_proto>, C<endnetent_r_proto>, C<endprotoent_r_proto>,
-C<endpwent_r_proto>, C<endservent_r_proto>, C<eunicefix>, C<exe_ext>,
-C<expr>, C<extensions>, C<extras>
-
-=item f
-
-C<fflushall>, C<fflushNULL>, C<find>, C<firstmakefile>, C<flex>,
-C<fpossize>, C<fpostype>, C<freetype>, C<from>, C<full_ar>, C<full_csh>,
-C<full_sed>
-
-=item g
-
-C<gccansipedantic>, C<gccosandvers>, C<gccversion>, C<getgrent_r_proto>,
-C<getgrgid_r_proto>, C<getgrnam_r_proto>, C<gethostbyaddr_r_proto>,
-C<gethostbyname_r_proto>, C<gethostent_r_proto>, C<getlogin_r_proto>,
-C<getnetbyaddr_r_proto>, C<getnetbyname_r_proto>, C<getnetent_r_proto>,
-C<getprotobyname_r_proto>, C<getprotobynumber_r_proto>,
-C<getprotoent_r_proto>, C<getpwent_r_proto>, C<getpwnam_r_proto>,
-C<getpwuid_r_proto>, C<getservbyname_r_proto>, C<getservbyport_r_proto>,
-C<getservent_r_proto>, C<getspnam_r_proto>, C<gidformat>, C<gidsign>,
-C<gidsize>, C<gidtype>, C<glibpth>, C<gmake>, C<gmtime_r_proto>,
-C<gnulibc_version>, C<grep>, C<groupcat>, C<groupstype>, C<gzip>
-
-=item h
-
-C<h_fcntl>, C<h_sysfile>, C<hint>, C<hostcat>, C<html1dir>, C<html1direxp>,
-C<html3dir>, C<html3direxp>
-
-=item i
-
-C<i16size>, C<i16type>, C<i32size>, C<i32type>, C<i64size>, C<i64type>,
-C<i8size>, C<i8type>, C<i_arpainet>, C<i_bsdioctl>, C<i_crypt>, C<i_db>,
-C<i_dbm>, C<i_dirent>, C<i_dld>, C<i_dlfcn>, C<i_fcntl>, C<i_float>,
-C<i_fp>, C<i_fp_class>, C<i_gdbm>, C<i_grp>, C<i_ieeefp>, C<i_inttypes>,
-C<i_langinfo>, C<i_libutil>, C<i_limits>, C<i_locale>, C<i_machcthr>,
-C<i_malloc>, C<i_math>, C<i_memory>, C<i_mntent>, C<i_ndbm>, C<i_netdb>,
-C<i_neterrno>, C<i_netinettcp>, C<i_niin>, C<i_poll>, C<i_prot>,
-C<i_pthread>, C<i_pwd>, C<i_rpcsvcdbm>, C<i_sfio>, C<i_sgtty>, C<i_shadow>,
-C<i_socks>, C<i_stdarg>, C<i_stddef>, C<i_stdlib>, C<i_string>,
-C<i_sunmath>, C<i_sysaccess>, C<i_sysdir>, C<i_sysfile>, C<i_sysfilio>,
-C<i_sysin>, C<i_sysioctl>, C<i_syslog>, C<i_sysmman>, C<i_sysmode>,
-C<i_sysmount>, C<i_sysndir>, C<i_sysparam>, C<i_sysresrc>, C<i_syssecrt>,
-C<i_sysselct>, C<i_syssockio>, C<i_sysstat>, C<i_sysstatfs>,
-C<i_sysstatvfs>, C<i_systime>, C<i_systimek>, C<i_systimes>, C<i_systypes>,
-C<i_sysuio>, C<i_sysun>, C<i_sysutsname>, C<i_sysvfs>, C<i_syswait>,
-C<i_termio>, C<i_termios>, C<i_time>, C<i_unistd>, C<i_ustat>, C<i_utime>,
-C<i_values>, C<i_varargs>, C<i_varhdr>, C<i_vfork>,
-C<ignore_versioned_solibs>, C<inc_version_list>, C<inc_version_list_init>,
-C<incpath>, C<inews>, C<initialinstalllocation>, C<installarchlib>,
-C<installbin>, C<installhtml1dir>, C<installhtml3dir>, C<installman1dir>,
-C<installman3dir>, C<installprefix>, C<installprefixexp>,
-C<installprivlib>, C<installscript>, C<installsitearch>, C<installsitebin>,
-C<installsitehtml1dir>, C<installsitehtml3dir>, C<installsitelib>,
-C<installsiteman1dir>, C<installsiteman3dir>, C<installsitescript>,
-C<installstyle>, C<installusrbinperl>, C<installvendorarch>,
-C<installvendorbin>, C<installvendorhtml1dir>, C<installvendorhtml3dir>,
-C<installvendorlib>, C<installvendorman1dir>, C<installvendorman3dir>,
-C<installvendorscript>, C<intsize>, C<issymlink>, C<ivdformat>, C<ivsize>,
-C<ivtype>
-
-=item k
-
-C<known_extensions>, C<ksh>
-
-=item l
-
-C<ld>, C<lddlflags>, C<ldflags>, C<ldflags_uselargefiles>, C<ldlibpthname>,
-C<less>, C<lib_ext>, C<libc>, C<libperl>, C<libpth>, C<libs>, C<libsdirs>,
-C<libsfiles>, C<libsfound>, C<libspath>, C<libswanted>,
-C<libswanted_uselargefiles>, C<line>, C<lint>, C<lkflags>, C<ln>, C<lns>,
-C<localtime_r_proto>, C<locincpth>, C<loclibpth>, C<longdblsize>,
-C<longlongsize>, C<longsize>, C<lp>, C<lpr>, C<ls>, C<lseeksize>,
-C<lseektype>
-
-=item m
-
-C<mad>, C<madlyh>, C<madlyobj>, C<madlysrc>, C<mail>, C<mailx>, C<make>,
-C<make_set_make>, C<mallocobj>, C<mallocsrc>, C<malloctype>, C<man1dir>,
-C<man1direxp>, C<man1ext>, C<man3dir>, C<man3direxp>, C<man3ext>
-
-=item M
-
-C<Mcc>, C<mips_type>, C<mistrustnm>, C<mkdir>, C<mmaptype>, C<modetype>,
-C<more>, C<multiarch>, C<mv>, C<myarchname>, C<mydomain>, C<myhostname>,
-C<myuname>
-
-=item n
-
-C<n>, C<need_va_copy>, C<netdb_hlen_type>, C<netdb_host_type>,
-C<netdb_name_type>, C<netdb_net_type>, C<nm>, C<nm_opt>, C<nm_so_opt>,
-C<nonxs_ext>, C<nroff>, C<nv_preserves_uv_bits>, C<nveformat>,
-C<nvEUformat>, C<nvfformat>, C<nvFUformat>, C<nvgformat>, C<nvGUformat>,
-C<nvsize>, C<nvtype>
-
-=item o
-
-C<o_nonblock>, C<obj_ext>, C<old_pthread_create_joinable>, C<optimize>,
-C<orderlib>, C<osname>, C<osvers>, C<otherlibdirs>
-
-=item p
-
-C<package>, C<pager>, C<passcat>, C<patchlevel>, C<path_sep>, C<perl>,
-C<perl5>
-
-=item P
-
-C<PERL_API_REVISION>, C<PERL_API_SUBVERSION>, C<PERL_API_VERSION>,
-C<PERL_CONFIG_SH>, C<PERL_PATCHLEVEL>, C<perl_patchlevel>,
-C<PERL_REVISION>, C<PERL_SUBVERSION>, C<PERL_VERSION>, C<perladmin>,
-C<perllibs>, C<perlpath>, C<pg>, C<phostname>, C<pidtype>, C<plibpth>,
-C<pmake>, C<pr>, C<prefix>, C<prefixexp>, C<privlib>, C<privlibexp>,
-C<procselfexe>, C<prototype>, C<ptrsize>
-
-=item q
-
-C<quadkind>, C<quadtype>
-
-=item r
-
-C<randbits>, C<randfunc>, C<random_r_proto>, C<randseedtype>, C<ranlib>,
-C<rd_nodata>, C<readdir64_r_proto>, C<readdir_r_proto>, C<revision>, C<rm>,
-C<rm_try>, C<rmail>, C<run>, C<runnm>
-
-=item s
-
-C<sched_yield>, C<scriptdir>, C<scriptdirexp>, C<sed>, C<seedfunc>,
-C<selectminbits>, C<selecttype>, C<sendmail>, C<setgrent_r_proto>,
-C<sethostent_r_proto>, C<setlocale_r_proto>, C<setnetent_r_proto>,
-C<setprotoent_r_proto>, C<setpwent_r_proto>, C<setservent_r_proto>, C<sh>,
-C<shar>, C<sharpbang>, C<shmattype>, C<shortsize>, C<shrpenv>, C<shsharp>,
-C<sig_count>, C<sig_name>, C<sig_name_init>, C<sig_num>, C<sig_num_init>,
-C<sig_size>, C<signal_t>, C<sitearch>, C<sitearchexp>, C<sitebin>,
-C<sitebinexp>, C<sitehtml1dir>, C<sitehtml1direxp>, C<sitehtml3dir>,
-C<sitehtml3direxp>, C<sitelib>, C<sitelib_stem>, C<sitelibexp>,
-C<siteman1dir>, C<siteman1direxp>, C<siteman3dir>, C<siteman3direxp>,
-C<siteprefix>, C<siteprefixexp>, C<sitescript>, C<sitescriptexp>,
-C<sizesize>, C<sizetype>, C<sleep>, C<smail>, C<so>, C<sockethdr>,
-C<socketlib>, C<socksizetype>, C<sort>, C<spackage>, C<spitshell>,
-C<sPRId64>, C<sPRIeldbl>, C<sPRIEUldbl>, C<sPRIfldbl>, C<sPRIFUldbl>,
-C<sPRIgldbl>, C<sPRIGUldbl>, C<sPRIi64>, C<sPRIo64>, C<sPRIu64>,
-C<sPRIx64>, C<sPRIXU64>, C<srand48_r_proto>, C<srandom_r_proto>, C<src>,
-C<sSCNfldbl>, C<ssizetype>, C<startperl>, C<startsh>, C<static_ext>,
-C<stdchar>, C<stdio_base>, C<stdio_bufsiz>, C<stdio_cnt>, C<stdio_filbuf>,
-C<stdio_ptr>, C<stdio_stream_array>, C<strerror_r_proto>, C<strings>,
-C<submit>, C<subversion>, C<sysman>
-
-=item t
-
-C<tail>, C<tar>, C<targetarch>, C<tbl>, C<tee>, C<test>, C<timeincl>,
-C<timetype>, C<tmpnam_r_proto>, C<to>, C<touch>, C<tr>, C<trnl>, C<troff>,
-C<ttyname_r_proto>
-
-=item u
-
-C<u16size>, C<u16type>, C<u32size>, C<u32type>, C<u64size>, C<u64type>,
-C<u8size>, C<u8type>, C<uidformat>, C<uidsign>, C<uidsize>, C<uidtype>,
-C<uname>, C<uniq>, C<uquadtype>, C<use5005threads>, C<use64bitall>,
-C<use64bitint>, C<usecrosscompile>, C<usedl>, C<usefaststdio>,
-C<useithreads>, C<uselargefiles>, C<uselongdouble>, C<usemallocwrap>,
-C<usemorebits>, C<usemultiplicity>, C<usemymalloc>, C<usenm>, C<useopcode>,
-C<useperlio>, C<useposix>, C<usereentrant>, C<userelocatableinc>,
-C<usesfio>, C<useshrplib>, C<usesitecustomize>, C<usesocks>, C<usethreads>,
-C<usevendorprefix>, C<usevfork>, C<usrinc>, C<uuname>, C<uvoformat>,
-C<uvsize>, C<uvtype>, C<uvuformat>, C<uvxformat>, C<uvXUformat>
-
-=item v
-
-C<vendorarch>, C<vendorarchexp>, C<vendorbin>, C<vendorbinexp>,
-C<vendorhtml1dir>, C<vendorhtml1direxp>, C<vendorhtml3dir>,
-C<vendorhtml3direxp>, C<vendorlib>, C<vendorlib_stem>, C<vendorlibexp>,
-C<vendorman1dir>, C<vendorman1direxp>, C<vendorman3dir>,
-C<vendorman3direxp>, C<vendorprefix>, C<vendorprefixexp>, C<vendorscript>,
-C<vendorscriptexp>, C<version>, C<version_patchlevel_string>,
-C<versiononly>, C<vi>, C<voidflags>
-
-=item x
-
-C<xlibpth>
-
-=item y
-
-C<yacc>, C<yaccflags>
-
-=item z
-
-C<zcat>, C<zip>
-
-=back
-
-=item NOTE
-
-=back
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-dynamic, nonxs, static
-
-=item AUTHOR
-
-=back
-
-=head2 Cwd - get pathname of current working directory
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item getcwd and friends
-
-getcwd, cwd, fastcwd, fastgetcwd, getdcwd
-
-=item abs_path and friends
-
-abs_path, realpath, fast_abs_path
-
-=item $ENV{PWD}
-
-=back
-
-=item NOTES
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 DB - programmatic interface to the Perl debugging API
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Global Variables
-
- $DB::sub, %DB::sub, $DB::single, $DB::signal, $DB::trace, @DB::args,
- at DB::dbline, %DB::dbline, $DB::package, $DB::filename, $DB::subname,
-$DB::lineno
-
-=item API Methods
-
-CLIENT->register(), CLIENT->evalcode(STRING), CLIENT->skippkg('D::hide'),
-CLIENT->run(), CLIENT->step(), CLIENT->next(), CLIENT->done()
-
-=item Client Callback Methods
-
-CLIENT->init(), CLIENT->prestop([STRING]), CLIENT->stop(), CLIENT->idle(),
-CLIENT->poststop([STRING]), CLIENT->evalcode(STRING), CLIENT->cleanup(),
-CLIENT->output(LIST)
-
-=back
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 DBM_Filter -- Filter DBM keys/values
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item What is a DBM Filter?
-
-=over 4
-
-=item So what's new?
-
-=back
-
-=item METHODS
-
-=over 4
-
-=item $db->Filter_Push()
-
-=item $db->Filter_Key_Push()
-
-=item $db->Filter_Value_Push()
-
-Filter_Push, Filter_Key_Push, Filter_Value_Push
-
-=item $db->Filter_Pop()
-
-=item $db->Filtered()
-
-=back
-
-=item Writing a Filter
-
-=over 4
-
-=item Immediate Filters
-
-=item Canned Filters
-
-"name", params
-
-=back
-
-=item Filters Included
-
-utf8, encode, compress, int32, null
-
-=item NOTES
-
-=over 4
-
-=item Maintain Round Trip Integrity
-
-=item Don't mix filtered & non-filtered data in the same database file.
-
-=back
-
-=item EXAMPLE
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 DBM_Filter::compress - filter for DBM_Filter
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 DBM_Filter::encode - filter for DBM_Filter
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 DBM_Filter::int32 - filter for DBM_Filter
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 DBM_Filter::null - filter for DBM_Filter
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 DBM_Filter::utf8 - filter for DBM_Filter
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 DB_File - Perl5 access to Berkeley DB version 1.x
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-B<DB_HASH>, B<DB_BTREE>, B<DB_RECNO>
-
-=over 4
-
-=item Using DB_File with Berkeley DB version 2 or greater
-
-=item Interface to Berkeley DB
-
-=item Opening a Berkeley DB Database File
-
-=item Default Parameters
-
-=item In Memory Databases
-
-=back
-
-=item DB_HASH
-
-=over 4
-
-=item A Simple Example
-
-=back
-
-=item DB_BTREE
-
-=over 4
-
-=item Changing the BTREE sort order
-
-=item Handling Duplicate Keys
-
-=item The get_dup() Method
-
-=item The find_dup() Method
-
-=item The del_dup() Method
-
-=item Matching Partial Keys
-
-=back
-
-=item DB_RECNO
-
-=over 4
-
-=item The 'bval' Option
-
-=item A Simple Example
-
-=item Extra RECNO Methods
-
-B<$X-E<gt>push(list) ;>, B<$value = $X-E<gt>pop ;>, B<$X-E<gt>shift>,
-B<$X-E<gt>unshift(list) ;>, B<$X-E<gt>length>, B<$X-E<gt>splice(offset,
-length, elements);>
-
-=item Another Example
-
-=back
-
-=item THE API INTERFACE
-
-B<$status = $X-E<gt>get($key, $value [, $flags]) ;>, B<$status =
-$X-E<gt>put($key, $value [, $flags]) ;>, B<$status = $X-E<gt>del($key [,
-$flags]) ;>, B<$status = $X-E<gt>fd ;>, B<$status = $X-E<gt>seq($key,
-$value, $flags) ;>, B<$status = $X-E<gt>sync([$flags]) ;>
-
-=item DBM FILTERS
-
-B<filter_store_key>, B<filter_store_value>, B<filter_fetch_key>,
-B<filter_fetch_value>
-
-=over 4
-
-=item The Filter
-
-=item An Example -- the NULL termination problem.
-
-=item Another Example -- Key is a C int.
-
-=back
-
-=item HINTS AND TIPS
-
-=over 4
-
-=item Locking: The Trouble with fd
-
-=item Safe ways to lock a database
-
-B<Tie::DB_Lock>, B<Tie::DB_LockFile>, B<DB_File::Lock>
-
-=item Sharing Databases With C Applications
-
-=item The untie() Gotcha
-
-=back
-
-=item COMMON QUESTIONS
-
-=over 4
-
-=item Why is there Perl source in my database?
-
-=item How do I store complex data structures with DB_File?
-
-=item What does "Invalid Argument" mean?
-
-=item What does "Bareword 'DB_File' not allowed" mean?
-
-=back
-
-=item REFERENCES
-
-=item HISTORY
-
-=item BUGS
-
-=item AVAILABILITY
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 Data::Dumper - stringified perl data structures, suitable for both
-printing and C<eval>
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Methods
-
-I<PACKAGE>->new(I<ARRAYREF [>, I<ARRAYREF]>), I<$OBJ>->Dump I<or>
-I<PACKAGE>->Dump(I<ARRAYREF [>, I<ARRAYREF]>), I<$OBJ>->Seen(I<[HASHREF]>),
-I<$OBJ>->Values(I<[ARRAYREF]>), I<$OBJ>->Names(I<[ARRAYREF]>),
-I<$OBJ>->Reset
-
-=item Functions
-
-Dumper(I<LIST>)
-
-=item Configuration Variables or Methods
-
-=item Exports
-
-Dumper
-
-=back
-
-=item EXAMPLES
-
-=item BUGS
-
-=over 4
-
-=item NOTE
-
-=back
-
-=item AUTHOR
-
-=item VERSION
-
-=item SEE ALSO
-
-=back
-
-=head2 Devel::DProf - a Perl code profiler
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item PROFILE FORMAT
-
-=item AUTOLOAD
-
-=item ENVIRONMENT
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 Devel::InnerPackage - find all the inner packages of a package
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=over 4
-
-=item list_packages <package name>
-
-=back
-
-=back
-
-=over 4
-
-=item AUTHOR
-
-=item COPYING
-
-=item BUGS
-
-=back
-
-=head2 Devel::PPPort - Perl/Pollution/Portability
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Why use ppport.h?
-
-=item How to use ppport.h
-
-=item Running ppport.h
-
-=back
-
-=item FUNCTIONS
-
-=over 4
-
-=item WriteFile
-
-=back
-
-=item COMPATIBILITY
-
-=over 4
-
-=item Provided Perl compatibility API
-
-=item Perl API not supported by ppport.h
-
-perl 5.9.5, perl 5.9.4, perl 5.9.3, perl 5.9.2, perl 5.9.1, perl 5.9.0,
-perl 5.8.3, perl 5.8.1, perl 5.8.0, perl 5.7.3, perl 5.7.2, perl 5.7.1,
-perl 5.6.1, perl 5.6.0, perl 5.005_03, perl 5.005, perl 5.004_05, perl
-5.004
-
-=back
-
-=item BUGS
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 Devel::Peek - A data debugging tool for the XS programmer
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Runtime debugging
-
-=item Memory footprint debugging
-
-=back
-
-=item EXAMPLES
-
-=over 4
-
-=item A simple scalar string
-
-=item A simple scalar number
-
-=item A simple scalar with an extra reference
-
-=item A reference to a simple scalar
-
-=item A reference to an array
-
-=item A reference to a hash
-
-=item Dumping a large array or hash
-
-=item A reference to an SV which holds a C pointer
-
-=item A reference to a subroutine
-
-=back
-
-=item EXPORTS
-
-=item BUGS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Devel::SelfStubber - generate stubs for a SelfLoading module
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 Digest - Modules that calculate message digests
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-I<binary>, I<hex>, I<base64>
-
-=item OO INTERFACE
-
-$ctx = Digest->XXX($arg,...), $ctx = Digest->new(XXX => $arg,...), $ctx =
-Digest::XXX->new($arg,...), $other_ctx = $ctx->clone, $ctx->reset,
-$ctx->add( $data ), $ctx->add( $chunk1, $chunk2, ... ), $ctx->addfile(
-$io_handle ), $ctx->add_bits( $data, $nbits ), $ctx->add_bits( $bitstring
-), $ctx->digest, $ctx->hexdigest, $ctx->b64digest
-
-=item Digest speed
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 Digest::MD5 - Perl interface to the MD5 Algorithm
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS
-
-md5($data,...), md5_hex($data,...), md5_base64($data,...)
-
-=item METHODS
-
-$md5 = Digest::MD5->new, $md5->reset, $md5->clone, $md5->add($data,...),
-$md5->addfile($io_handle), $md5->add_bits($data, $nbits),
-$md5->add_bits($bitstring), $md5->digest, $md5->hexdigest, $md5->b64digest
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item COPYRIGHT
-
-=item AUTHORS
-
-=back
-
-=head2 Digest::SHA - Perl extension for SHA-1/224/256/384/512
-
-=over 4
-
-=item SYNOPSIS
-
-=item SYNOPSIS (HMAC-SHA)
-
-=item ABSTRACT
-
-=item DESCRIPTION
-
-=item NIST STATEMENT ON SHA-1
-
-=item PADDING OF BASE64 DIGESTS
-
-=item EXPORT
-
-=item EXPORTABLE FUNCTIONS
-
-B<sha1($data, ...)>, B<sha224($data, ...)>, B<sha256($data, ...)>,
-B<sha384($data, ...)>, B<sha512($data, ...)>, B<sha1_hex($data, ...)>,
-B<sha224_hex($data, ...)>, B<sha256_hex($data, ...)>, B<sha384_hex($data,
-...)>, B<sha512_hex($data, ...)>, B<sha1_base64($data, ...)>,
-B<sha224_base64($data, ...)>, B<sha256_base64($data, ...)>,
-B<sha384_base64($data, ...)>, B<sha512_base64($data, ...)>, B<new($alg)>,
-B<reset($alg)>, B<hashsize>, B<algorithm>, B<clone>, B<add($data, ...)>,
-B<add_bits($data, $nbits)>, B<add_bits($bits)>, B<addfile(*FILE)>,
-B<addfile($filename [, $mode])>, B<dump($filename)>, B<load($filename)>,
-B<digest>, B<hexdigest>, B<b64digest>, B<hmac_sha1($data, $key)>,
-B<hmac_sha224($data, $key)>, B<hmac_sha256($data, $key)>,
-B<hmac_sha384($data, $key)>, B<hmac_sha512($data, $key)>,
-B<hmac_sha1_hex($data, $key)>, B<hmac_sha224_hex($data, $key)>,
-B<hmac_sha256_hex($data, $key)>, B<hmac_sha384_hex($data, $key)>,
-B<hmac_sha512_hex($data, $key)>, B<hmac_sha1_base64($data, $key)>,
-B<hmac_sha224_base64($data, $key)>, B<hmac_sha256_base64($data, $key)>,
-B<hmac_sha384_base64($data, $key)>, B<hmac_sha512_base64($data, $key)>
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item ACKNOWLEDGMENTS
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Digest::base - Digest base class
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=back
-
-=head2 Digest::file - Calculate digests of files
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-digest_file( $file, $algorithm, [$arg,...] ), digest_file_hex( $file,
-$algorithm, [$arg,...] ), digest_file_base64( $file, $algorithm, [$arg,...]
-)
-
-=item SEE ALSO
-
-=back
-
-=head2 DirHandle - supply object methods for directory handles
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTES
-
-=back
-
-=head2 Dumpvalue - provides screen dump of Perl data.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Creation
-
-C<arrayDepth>, C<hashDepth>, C<compactDump>, C<veryCompact>, C<globPrint>,
-C<dumpDBFiles>, C<dumpPackages>, C<dumpReused>, C<tick>, C<quoteHighBit>,
-C<printUndef>, C<usageOnly>, unctrl, subdump, bareStringify, quoteHighBit,
-stopDbSignal
-
-=item Methods
-
-dumpValue, dumpValues, stringify, dumpvars, set_quote, set_unctrl,
-compactDump, veryCompact, set, get
-
-=back
-
-=back
-
-=head2 DynaLoader - Dynamically load C libraries into Perl code
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
- at dl_library_path, @dl_resolve_using, @dl_require_symbols, @dl_librefs,
- at dl_modules, @dl_shared_objects, dl_error(), $dl_debug, dl_findfile(),
-dl_expandspec(), dl_load_file(), dl_unload_file(), dl_load_flags(),
-dl_find_symbol(), dl_find_symbol_anywhere(), dl_undef_symbols(),
-dl_install_xsub(), bootstrap()
-
-=item AUTHOR
-
-=back
-
-=head2 DynaLoader::XSLoader, XSLoader - Dynamically load C libraries into
-Perl code
-
-=over 4
-
-=item VERSION
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Migration from C<DynaLoader>
-
-=item Backward compatible boilerplate
-
-=back
-
-=item Order of initialization: early load()
-
-=over 4
-
-=item The most hairy case
-
-=back
-
-=item DIAGNOSTICS
-
-C<Can't find '%s' symbol in %s>, C<Can't load '%s' for module %s: %s>,
-C<Undefined symbols present after loading %s: %s>,
-C<XSLoader::load('Your::Module', $Your::Module::VERSION)>
-
-=item LIMITATIONS
-
-=item BUGS
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Encode - character encodings
-
-=over 4
-
-=item SYNOPSIS
-
-=over 4
-
-=item Table of Contents
-
-=back
-
-=item DESCRIPTION
-
-=over 4
-
-=item TERMINOLOGY
-
-=back
-
-=item PERL ENCODING API
-
-$octets = encode(ENCODING, $string [, CHECK]), $string = decode(ENCODING,
-$octets [, CHECK]), [$obj =] find_encoding(ENCODING), [$length =]
-from_to($octets, FROM_ENC, TO_ENC [, CHECK]), $octets =
-encode_utf8($string);, $string = decode_utf8($octets [, CHECK]);
-
-=over 4
-
-=item Listing available encodings
-
-=item Defining Aliases
-
-=item Finding IANA Character Set Registry names
-
-=back
-
-=item Encoding via PerlIO
-
-=item Handling Malformed Data
-
-B<NOTE:> Not all encoding support this feature, I<CHECK> =
-Encode::FB_DEFAULT ( == 0), I<CHECK> = Encode::FB_CROAK ( == 1), I<CHECK> =
-Encode::FB_QUIET, I<CHECK> = Encode::FB_WARN, perlqq mode (I<CHECK> =
-Encode::FB_PERLQQ), HTML charref mode (I<CHECK> = Encode::FB_HTMLCREF), XML
-charref mode (I<CHECK> = Encode::FB_XMLCREF), The bitmask,
-Encode::LEAVE_SRC
-
-=item Defining Encodings
-
-=item The UTF8 flag
-
-Goal #1:, Goal #2:, Goal #3:, Goal #4:
-
-=over 4
-
-=item Messing with Perl's Internals
-
-is_utf8(STRING [, CHECK]), _utf8_on(STRING), _utf8_off(STRING)
-
-=back
-
-=item UTF-8 vs. utf8 vs. UTF8
-
-=item SEE ALSO
-
-=item MAINTAINER
-
-=item COPYRIGHT
-
-=back
-
-=head2 Encode::Alias - alias definitions to encodings
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-As a simple string, As a qr// compiled regular expression, e.g.:, As a code
-reference, e.g.:
-
-=over 4
-
-=item Alias overloading
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::Byte - Single Byte Encodings
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::CJKConstants -- Internally used by Encode::??::ISO_2022_*
-
-=head2 Encode::CN - China-based Chinese Encodings
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTES
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::CN::HZ -- internally used by Encode::CN
-
-=head2 Encode::Config -- internally used by Encode
-
-=head2 Encode::EBCDIC - EBCDIC Encodings
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::Encoding - Encode Implementation Base Class
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Methods you should implement
-
--E<gt>encode($string [,$check]), -E<gt>decode($octets [,$check]),
--E<gt>cat_decode($destination, $octets, $offset, $terminator [,$check])
-
-=item Other methods defined in Encode::Encodings
-
--E<gt>name, -E<gt>mime_name, -E<gt>renew, -E<gt>renewed, -E<gt>perlio_ok(),
--E<gt>needs_lines()
-
-=item Example: Encode::ROT13
-
-=back
-
-=item Why the heck Encode API is different?
-
-=over 4
-
-=item Compiled Encodings
-
-=back
-
-=item SEE ALSO
-
-Scheme 1, Scheme 2, Other Schemes
-
-=back
-
-=head2 Encode::GSM0338 -- ESTI GSM 03.38 Encoding
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTES
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::Guess -- Guesses encoding from data
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item DESCRIPTION
-
-Encode::Guess->set_suspects, Encode::Guess->add_suspects,
-Encode::decode("Guess" ...), Encode::Guess->guess($data),
-guess_encoding($data, [, I<list of suspects>])
-
-=item CAVEATS
-
-=item TO DO
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::JP - Japanese Encodings
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item DESCRIPTION
-
-=item Note on ISO-2022-JP(-1)?
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::JP::H2Z -- internally used by Encode::JP::2022_JP*
-
-=head2 Encode::JP::JIS7 -- internally used by Encode::JP
-
-=head2 Encode::KR - Korean Encodings
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::KR::2022_KR -- internally used by Encode::KR
-
-=head2 Encode::MIME::Header -- MIME 'B' and 'Q' header encoding
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item DESCRIPTION
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::MIME::Name, Encode::MIME::NAME -- internally used by Encode
-
-=over 4
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::PerlIO -- a detailed document on Encode and PerlIO
-
-=over 4
-
-=item Overview
-
-=item How does it work?
-
-=item Line Buffering
-
-=over 4
-
-=item How can I tell whether my encoding fully supports PerlIO ?
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::Supported -- Encodings supported by Encode
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Encoding Names
-
-=back
-
-=item Supported Encodings
-
-=over 4
-
-=item Built-in Encodings
-
-=item Encode::Unicode -- other Unicode encodings
-
-=item Encode::Byte -- Extended ASCII
-
-ISO-8859 and corresponding vendor mappings, KOI8 - De Facto Standard for
-the Cyrillic world
-
-=item gsm0338 - Hentai Latin 1
-
-gsm0338 support before 2.19
-
-=item CJK: Chinese, Japanese, Korean (Multibyte)
-
-Encode::CN -- Continental China, Encode::JP -- Japan, Encode::KR -- Korea,
-Encode::TW -- Taiwan, Encode::HanExtra -- More Chinese via CPAN,
-Encode::JIS2K -- JIS X 0213 encodings via CPAN
-
-=item Miscellaneous encodings
-
-Encode::EBCDIC, Encode::Symbols, Encode::MIME::Header, Encode::Guess
-
-=back
-
-=item Unsupported encodings
-
- ISO-2022-JP-2 [RFC1554], ISO-2022-CN [RFC1922], Various HP-UX encodings,
-Cyrillic encoding ISO-IR-111, ISO-8859-8-1 [Hebrew], ISIRI 3342, Iran
-System, ISIRI 2900 [Farsi], Thai encoding TCVN, Vietnamese encodings VPS,
-Various Mac encodings, (Mac) Indic encodings
-
-=item Encoding vs. Charset -- terminology
-
-=item Encoding Classification (by Anton Tagunov and Dan Kogai)
-
-=over 4
-
-=item Microsoft-related naming mess
-
-KS_C_5601-1987, GB2312, Big5, Shift_JIS
-
-=back
-
-=item Glossary
-
-character repertoire, coded character set (CCS), character encoding scheme
-(CES), charset (in MIME context), EUC, ISO-2022, UCS, UCS-2, Unicode, UTF,
-UTF-16
-
-=item See Also
-
-=item References
-
-ECMA, ECMA-035 (eq C<ISO-2022>), IANA, Assigned Charset Names by IANA, ISO,
-RFC, UC, Unicode Glossary
-
-=over 4
-
-=item Other Notable Sites
-
-czyborra.com, CJK.inf, Jungshik Shin's Hangul FAQ, debian.org:
-"Introduction to i18n"
-
-=item Offline sources
-
-C<CJKV Information Processing> by Ken Lunde
-
-=back
-
-=back
-
-=head2 Encode::Symbol - Symbol Encodings
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::TW - Taiwan-based Chinese Encodings
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTES
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::Unicode -- Various Unicode Transformation Formats
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-L<http://www.unicode.org/glossary/> says:, Quick Reference
-
-=item Size, Endianness, and BOM
-
-=over 4
-
-=item by size
-
-=item by endianness
-
-BOM as integer when fetched in network byte order
-
-=back
-
-=item Surrogate Pairs
-
-=item Error Checking
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::Unicode::UTF7 -- UTF-7 encoding
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item In Practice
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::lib::Encode::Alias, Encode::Alias - alias definitions to
-encodings
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-As a simple string, As a qr// compiled regular expression, e.g.:, As a code
-reference, e.g.:
-
-=over 4
-
-=item Alias overloading
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::lib::Encode::CJKConstants, Encode::CJKConstants.pm --
-Internally used by Encode::??::ISO_2022_*
-
-=head2 Encode::lib::Encode::CN::HZ, Encode::CN::HZ -- internally used by
-Encode::CN
-
-=head2 Encode::lib::Encode::Config, Encode::Config -- internally used by
-Encode
-
-=head2 Encode::lib::Encode::Encoding, Encode::Encoding - Encode
-Implementation Base Class
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Methods you should implement
-
--E<gt>encode($string [,$check]), -E<gt>decode($octets [,$check]),
--E<gt>cat_decode($destination, $octets, $offset, $terminator [,$check])
-
-=item Other methods defined in Encode::Encodings
-
--E<gt>name, -E<gt>mime_name, -E<gt>renew, -E<gt>renewed, -E<gt>perlio_ok(),
--E<gt>needs_lines()
-
-=item Example: Encode::ROT13
-
-=back
-
-=item Why the heck Encode API is different?
-
-=over 4
-
-=item Compiled Encodings
-
-=back
-
-=item SEE ALSO
-
-Scheme 1, Scheme 2, Other Schemes
-
-=back
-
-=head2 Encode::lib::Encode::GSM0338, Encode::GSM0338 -- ESTI GSM 03.38
-Encoding
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTES
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::lib::Encode::Guess, Encode::Guess -- Guesses encoding from
-data
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item DESCRIPTION
-
-Encode::Guess->set_suspects, Encode::Guess->add_suspects,
-Encode::decode("Guess" ...), Encode::Guess->guess($data),
-guess_encoding($data, [, I<list of suspects>])
-
-=item CAVEATS
-
-=item TO DO
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::lib::Encode::JP::H2Z, Encode::JP::H2Z -- internally used by
-Encode::JP::2022_JP*
-
-=head2 Encode::lib::Encode::JP::JIS7, Encode::JP::JIS7 -- internally used
-by Encode::JP
-
-=head2 Encode::lib::Encode::KR::2022_KR, Encode::KR::2022_KR -- internally
-used by Encode::KR
-
-=head2 Encode::lib::Encode::MIME::Header, Encode::MIME::Header -- MIME 'B'
-and 'Q' header encoding
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item DESCRIPTION
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::lib::Encode::MIME::Name, Encode::MIME::NAME -- internally
-used by Encode
-
-=over 4
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::lib::Encode::PerlIO, Encode::PerlIO -- a detailed document
-on Encode and PerlIO
-
-=over 4
-
-=item Overview
-
-=item How does it work?
-
-=item Line Buffering
-
-=over 4
-
-=item How can I tell whether my encoding fully supports PerlIO ?
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::lib::Encode::Supported, Encode::Supported -- Encodings
-supported by Encode
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Encoding Names
-
-=back
-
-=item Supported Encodings
-
-=over 4
-
-=item Built-in Encodings
-
-=item Encode::Unicode -- other Unicode encodings
-
-=item Encode::Byte -- Extended ASCII
-
-ISO-8859 and corresponding vendor mappings, KOI8 - De Facto Standard for
-the Cyrillic world
-
-=item gsm0338 - Hentai Latin 1
-
-gsm0338 support before 2.19
-
-=item CJK: Chinese, Japanese, Korean (Multibyte)
-
-Encode::CN -- Continental China, Encode::JP -- Japan, Encode::KR -- Korea,
-Encode::TW -- Taiwan, Encode::HanExtra -- More Chinese via CPAN,
-Encode::JIS2K -- JIS X 0213 encodings via CPAN
-
-=item Miscellaneous encodings
-
-Encode::EBCDIC, Encode::Symbols, Encode::MIME::Header, Encode::Guess
-
-=back
-
-=item Unsupported encodings
-
- ISO-2022-JP-2 [RFC1554], ISO-2022-CN [RFC1922], Various HP-UX encodings,
-Cyrillic encoding ISO-IR-111, ISO-8859-8-1 [Hebrew], ISIRI 3342, Iran
-System, ISIRI 2900 [Farsi], Thai encoding TCVN, Vietnamese encodings VPS,
-Various Mac encodings, (Mac) Indic encodings
-
-=item Encoding vs. Charset -- terminology
-
-=item Encoding Classification (by Anton Tagunov and Dan Kogai)
-
-=over 4
-
-=item Microsoft-related naming mess
-
-KS_C_5601-1987, GB2312, Big5, Shift_JIS
-
-=back
-
-=item Glossary
-
-character repertoire, coded character set (CCS), character encoding scheme
-(CES), charset (in MIME context), EUC, ISO-2022, UCS, UCS-2, Unicode, UTF,
-UTF-16
-
-=item See Also
-
-=item References
-
-ECMA, ECMA-035 (eq C<ISO-2022>), IANA, Assigned Charset Names by IANA, ISO,
-RFC, UC, Unicode Glossary
-
-=over 4
-
-=item Other Notable Sites
-
-czyborra.com, CJK.inf, Jungshik Shin's Hangul FAQ, debian.org:
-"Introduction to i18n"
-
-=item Offline sources
-
-C<CJKV Information Processing> by Ken Lunde
-
-=back
-
-=back
-
-=head2 Encode::lib::Encode::Unicode::UTF7, Encode::Unicode::UTF7 -- UTF-7
-encoding
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item In Practice
-
-=item SEE ALSO
-
-=back
-
-=head2 Encode::lib::Encoder, Encode::Encoder -- Object Oriented Encoder
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item Description
-
-=over 4
-
-=item Predefined Methods
-
-$e = Encode::Encoder-E<gt>new([$data, $encoding]);, encoder(),
-$e-E<gt>data([$data]), $e-E<gt>encoding([$encoding]),
-$e-E<gt>bytes([$encoding])
-
-=item Example: base64 transcoder
-
-=item Operator Overloading
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 Encodencoding, encoding - allows you to write your script in
-non-ascii or non-utf8
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=over 4
-
-=item Literal Conversions
-
-=item PerlIO layers for C<STD(IN|OUT)>
-
-=item Implicit upgrading for byte strings
-
-=item Side effects
-
-=item Side effects
-
-=item Side effects
-
-=back
-
-=item FEATURES THAT REQUIRE 5.8.1
-
-"NON-EUC" doublebyte encodings, tr//, DATA pseudo-filehandle
-
-=item USAGE
-
-use encoding [I<ENCNAME>] ;, use encoding I<ENCNAME> [ STDIN =E<gt>
-I<ENCNAME_IN> ...] ;, use encoding I<ENCNAME> Filter=E<gt>1;, no encoding;
-
-=item The Filter Option
-
-=over 4
-
-=item Filter-related changes at Encode version 1.87
-
-=back
-
-=item CAVEATS
-
-=over 4
-
-=item NOT SCOPED
-
-=item DO NOT MIX MULTIPLE ENCODINGS
-
-=item tr/// with ranges
-
-Legend of characters above
-
-=back
-
-=item EXAMPLE - Greekperl
-
-=item KNOWN PROBLEMS
-
-literals in regex that are longer than 127 bytes, EBCDIC, format, Thread
-safety
-
-=over 4
-
-=item The Logic of :locale
-
-=back
-
-=item HISTORY
-
-=item SEE ALSO
-
-=back
-
-=head2 Encoder, Encode::Encoder -- Object Oriented Encoder
-
-=over 4
-
-=item SYNOPSIS
-
-=item ABSTRACT
-
-=item Description
-
-=over 4
-
-=item Predefined Methods
-
-$e = Encode::Encoder-E<gt>new([$data, $encoding]);, encoder(),
-$e-E<gt>data([$data]), $e-E<gt>encoding([$encoding]),
-$e-E<gt>bytes([$encoding])
-
-=item Example: base64 transcoder
-
-=item Operator Overloading
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 English - use nice English (or awk) names for ugly punctuation
-variables
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item PERFORMANCE
-
-=back
-
-=head2 Env - perl module that imports environment variables as scalars or
-arrays
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item LIMITATIONS
-
-=item AUTHOR
-
-=back
-
-=head2 Errno - System errno constants
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CAVEATS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Exporter - Implements default import method for modules
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item How to Export
-
-=item Selecting What To Export
-
-=item How to Import
-
-C<use ModuleName;>, C<use ModuleName ();>, C<use ModuleName qw(...);>
-
-=back
-
-=item Advanced features
-
-=over 4
-
-=item Specialised Import Lists
-
-=item Exporting without using Exporter's import method
-
-=item Exporting without inheriting from Exporter
-
-=item Module Version Checking
-
-=item Managing Unknown Symbols
-
-=item Tag Handling Utility Functions
-
-=item Generating combined tags
-
-=item C<AUTOLOAD>ed Constants
-
-=back
-
-=item Good Practices
-
-=over 4
-
-=item Declaring C<@EXPORT_OK> and Friends
-
-=item Playing Safe
-
-=item What not to Export
-
-=back
-
-=item SEE ALSO
-
-=item LICENSE
-
-=back
-
-=head2 Exporter::Heavy - Exporter guts
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 ExtUtils::CBuilder - Compile and link C code for Perl modules
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-new, have_compiler, compile, C<object_file>, C<include_dirs>,
-C<extra_compiler_flags>, link, lib_file, module_name, extra_linker_flags,
-link_executable, exe_file, object_file, lib_file, exe_file, prelink,
-need_prelink, extra_link_args_after_prelink
-
-=item TO DO
-
-=item HISTORY
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::CBuilder::Platform::Windows - Builder class for Windows
-platforms
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::Command - utilities to replace common UNIX commands in
-Makefiles etc.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item FUNCTIONS
-
-=back
-
-=back
-
-cat
-
-eqtime
-
-rm_rf
-
-rm_f
-
-touch
-
-mv
-
-cp
-
-chmod
-
-mkpath
-
-test_f
-
-test_d
-
-dos2unix
-
-=over 4
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 ExtUtils::Command::MM - Commands for the MM's to use in Makefiles
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-B<test_harness>
-
-=back
-
-B<pod2man>
-
-B<warn_if_old_packlist>
-
-B<perllocal_install>
-
-B<uninstall>
-
-=head2 ExtUtils::Constant - generate XS code to import C header constants
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item USAGE
-
-IV, UV, NV, PV, PVN, SV, YES, NO, UNDEF
-
-=item FUNCTIONS
-
-=back
-
-constant_types
-
-XS_constant PACKAGE, TYPES, SUBNAME, C_SUBNAME
-
-autoload PACKAGE, VERSION, AUTOLOADER
-
-WriteMakefileSnippet
-
-WriteConstants ATTRIBUTE =E<gt> VALUE [, ...], NAME, DEFAULT_TYPE,
-BREAKOUT_AT, NAMES, C_FH, C_FILE, XS_FH, XS_FILE, SUBNAME, C_SUBNAME
-
-=over 4
-
-=item AUTHOR
-
-=back
-
-=head2 ExtUtils::Constant::Base - base class for ExtUtils::Constant objects
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item USAGE
-
-=back
-
-header
-
-memEQ_clause args_hashref
-
-dump_names arg_hashref, ITEM..
-
-assign arg_hashref, VALUE..
-
-return_clause arg_hashref, ITEM
-
-switch_clause arg_hashref, NAMELEN, ITEMHASH, ITEM..
-
-params WHAT
-
-dogfood arg_hashref, ITEM..
-
-normalise_items args, default_type, seen_types, seen_items, ITEM..
-
-C_constant arg_hashref, ITEM.., name, type, value, macro, default, pre,
-post, def_pre, def_post, utf8, weight
-
-=over 4
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 ExtUtils::Constant::Utils - helper functions for ExtUtils::Constant
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item USAGE
-
-C_stringify NAME
-
-=back
-
-perl_stringify NAME
-
-=over 4
-
-=item AUTHOR
-
-=back
-
-=head2 ExtUtils::Constant::XS, ExtUtils::Constant::Base - base class for
-ExtUtils::Constant objects
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 ExtUtils::Embed - Utilities for embedding Perl in C/C++ applications
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item @EXPORT
-
-=item FUNCTIONS
-
-xsinit(), Examples, ldopts(), Examples, perl_inc(), ccflags(), ccdlflags(),
-ccopts(), xsi_header(), xsi_protos(@modules), xsi_body(@modules)
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 ExtUtils::Install - install files from here to there
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-_chmod($$;$), _warnonce(@), _choke(@)
-
-=back
-
-_move_file_at_boot( $file, $target, $moan )
-
-_unlink_or_rename( $file, $tryhard, $installing )
-
-=over 4
-
-=item Functions
-
-B<install>
-
-=back
-
-_get_install_skip
-
-_have_write_access
-
-_can_write_dir(C<$dir>)
-
-_mkpath($dir,$show,$mode,$verbose,$fake)
-
-_copy($from,$to,$verbose,$fake)
-
-_chdir($from)
-
-_do_cleanup
-
-install_rooted_file( $file ), install_rooted_dir( $dir )
-
-forceunlink( $file, $tryhard )
-
-directory_not_empty( $dir )
-
-B<install_default> I<DISCOURAGED>
-
-B<uninstall>
-
-inc_uninstall($filepath,$libdir,$verbose,$nonono,$ignore)
-
-run_filter($cmd,$src,$dest)
-
-B<pm_to_blib>
-
-_autosplit
-
-_invokant
-
-=over 4
-
-=item ENVIRONMENT
-
-B<PERL_INSTALL_ROOT>, B<EU_INSTALL_IGNORE_SKIP>,
-B<EU_INSTALL_SITE_SKIPFILE>
-
-=item AUTHOR
-
-=item LICENSE
-
-=back
-
-=head2 ExtUtils::Installed - Inventory management of installed modules
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item USAGE
-
-=item FUNCTIONS
-
-new(), modules(), files(), directories(), directory_tree(), validate(),
-packlist(), version()
-
-=item EXAMPLE
-
-=item AUTHOR
-
-=back
-
-=head2 ExtUtils::Liblist - determine libraries to use and how to use them
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-For static extensions, For dynamic extensions at build/link time, For
-dynamic extensions at load time
-
-=over 4
-
-=item EXTRALIBS
-
-=item LDLOADLIBS and LD_RUN_PATH
-
-=item BSLOADLIBS
-
-=back
-
-=item PORTABILITY
-
-=over 4
-
-=item VMS implementation
-
-=item Win32 implementation
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::MM - OS adjusted ExtUtils::MakeMaker subclass
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 ExtUtils::MM_AIX - AIX specific subclass of ExtUtils::MM_Unix
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Overridden methods
-
-=back
-
-=back
-
-=over 4
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::MM_Any - Platform-agnostic MM methods
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=over 4
-
-=item Cross-platform helper methods
-
-=back
-
-=back
-
-=over 4
-
-=item Targets
-
-=back
-
-=over 4
-
-=item Init methods
-
-=back
-
-=over 4
-
-=item Tools
-
-=back
-
-=over 4
-
-=item File::Spec wrappers
-
-=back
-
-=over 4
-
-=item Misc
-
-=back
-
-=over 4
-
-=item AUTHOR
-
-=back
-
-=head2 ExtUtils::MM_BeOS - methods to override UN*X behaviour in
-ExtUtils::MakeMaker
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-os_flavor
-
-init_linker
-
-=head2 ExtUtils::MM_Cygwin - methods to override UN*X behaviour in
-ExtUtils::MakeMaker
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-os_flavor
-
-=back
-
-cflags
-
-replace_manpage_separator
-
-init_linker
-
-=head2 ExtUtils::MM_DOS - DOS specific subclass of ExtUtils::MM_Unix
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Overridden methods
-
-os_flavor
-
-=back
-
-=back
-
-B<replace_manpage_separator>
-
-=over 4
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::MM_MacOS - once produced Makefiles for MacOS Classic
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 ExtUtils::MM_NW5 - methods to override UN*X behaviour in
-ExtUtils::MakeMaker
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-os_flavor
-
-init_platform, platform_constants
-
-const_cccmd
-
-static_lib
-
-dynamic_lib
-
-=head2 ExtUtils::MM_OS2 - methods to override UN*X behaviour in
-ExtUtils::MakeMaker
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-init_dist
-
-=back
-
-init_linker
-
-os_flavor
-
-=head2 ExtUtils::MM_QNX - QNX specific subclass of ExtUtils::MM_Unix
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Overridden methods
-
-=back
-
-=back
-
-=over 4
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::MM_UWIN - U/WIN specific subclass of ExtUtils::MM_Unix
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Overridden methods
-
-os_flavor
-
-=back
-
-=back
-
-B<replace_manpage_separator>
-
-=over 4
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::MM_Unix - methods used by ExtUtils::MakeMaker
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=back
-
-=over 4
-
-=item Methods
-
-os_flavor
-
-=back
-
-c_o (o)
-
-cflags (o)
-
-const_cccmd (o)
-
-const_config (o)
-
-const_loadlibs (o)
-
-constants (o)
-
-depend (o)
-
-init_DEST
-
-init_dist
-
-dist (o)
-
-dist_basics (o)
-
-dist_ci (o)
-
-dist_core (o)
-
-B<dist_target>
-
-B<tardist_target>
-
-B<zipdist_target>
-
-B<tarfile_target>
-
-zipfile_target
-
-uutardist_target
-
-shdist_target
-
-dlsyms (o)
-
-dynamic_bs (o)
-
-dynamic_lib (o)
-
-exescan
-
-extliblist
-
-find_perl
-
-fixin
-
-force (o)
-
-guess_name
-
-has_link_code
-
-init_dirscan
-
-init_MANPODS
-
-init_MAN1PODS
-
-init_MAN3PODS
-
-init_PM
-
-init_DIRFILESEP
-
-init_main
-
-init_others
-
-init_linker
-
-init_lib2arch
-
-init_PERL
-
-init_platform, platform_constants
-
-init_PERM
-
-init_xs
-
-install (o)
-
-installbin (o)
-
-linkext (o)
-
-lsdir
-
-macro (o)
-
-makeaperl (o)
-
-makefile (o)
-
-maybe_command
-
-needs_linking (o)
-
-parse_abstract
-
-parse_version
-
-pasthru (o)
-
-perl_script
-
-perldepend (o)
-
-perm_rw (o)
-
-perm_rwx (o)
-
-pm_to_blib
-
-post_constants (o)
-
-post_initialize (o)
-
-postamble (o)
-
-ppd
-
-prefixify
-
-processPL (o)
-
-quote_paren
-
-replace_manpage_separator
-
-cd
-
-oneliner
-
-quote_literal
-
-escape_newlines
-
-max_exec_len
-
-static (o)
-
-static_lib (o)
-
-staticmake (o)
-
-subdir_x (o)
-
-subdirs (o)
-
-test (o)
-
-test_via_harness (override)
-
-test_via_script (override)
-
-tools_other (o)
-
-tool_xsubpp (o)
-
-all_target
-
-top_targets (o)
-
-writedoc
-
-xs_c (o)
-
-xs_cpp (o)
-
-xs_o (o)
-
-=over 4
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::MM_VMS - methods to override UN*X behaviour in
-ExtUtils::MakeMaker
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Methods always loaded
-
-wraplist
-
-=back
-
-=back
-
-=over 4
-
-=item Methods
-
-guess_name (override)
-
-=back
-
-find_perl (override)
-
-maybe_command (override)
-
-pasthru (override)
-
-pm_to_blib (override)
-
-perl_script (override)
-
-replace_manpage_separator
-
-init_DEST
-
-init_DIRFILESEP
-
-init_main (override)
-
-init_others (override)
-
-init_platform (override)
-
-platform_constants
-
-init_VERSION (override)
-
-constants (override)
-
-special_targets
-
-cflags (override)
-
-const_cccmd (override)
-
-tools_other (override)
-
-init_dist (override)
-
-c_o (override)
-
-xs_c (override)
-
-xs_o (override)
-
-dlsyms (override)
-
-dynamic_lib (override)
-
-static_lib (override)
-
-extra_clean_files
-
-zipfile_target, tarfile_target, shdist_target
-
-install (override)
-
-perldepend (override)
-
-makeaperl (override)
-
-maketext_filter (override)
-
-prefixify (override)
-
-cd
-
-oneliner
-
-B<echo>
-
-quote_literal
-
-escape_newlines
-
-max_exec_len
-
-init_linker
-
-eliminate_macros
-
-fixpath
-
-os_flavor
-
-=over 4
-
-=item AUTHOR
-
-=back
-
-=head2 ExtUtils::MM_VOS - VOS specific subclass of ExtUtils::MM_Unix
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Overridden methods
-
-=back
-
-=back
-
-=over 4
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::MM_Win32 - methods to override UN*X behaviour in
-ExtUtils::MakeMaker
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item Overridden methods
-
-B<dlsyms>
-
-=back
-
-replace_manpage_separator
-
-B<maybe_command>
-
-B<init_DIRFILESEP>
-
-B<init_others>
-
-init_platform, platform_constants
-
-special_targets
-
-static_lib
-
-dynamic_lib
-
-extra_clean_files
-
-init_linker
-
-perl_script
-
-xs_o
-
-pasthru
-
-oneliner
-
-cd
-
-max_exec_len
-
-os_flavor
-
-cflags
-
-=head2 ExtUtils::MM_Win95 - method to customize MakeMaker for Win9X
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Overridden methods
-
-xs_c
-
-=back
-
-=back
-
-xs_cpp
-
-xs_o
-
-max_exec_len
-
-os_flavor
-
-=over 4
-
-=item AUTHOR
-
-=back
-
-=head2 ExtUtils::MY - ExtUtils::MakeMaker subclass for customization
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 ExtUtils::MakeMaker - Create a module Makefile
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item How To Write A Makefile.PL
-
-=item Default Makefile Behaviour
-
-=item make test
-
-=item make testdb
-
-=item make install
-
-=item INSTALL_BASE
-
-=item PREFIX and LIB attribute
-
-=item AFS users
-
-=item Static Linking of a new Perl Binary
-
-=item Determination of Perl Library and Installation Locations
-
-=item Which architecture dependent directory?
-
-=item Using Attributes and Parameters
-
-ABSTRACT, ABSTRACT_FROM, AUTHOR, BINARY_LOCATION, C, CCFLAGS, CONFIG,
-CONFIGURE, DEFINE, DESTDIR, DIR, DISTNAME, DISTVNAME, DL_FUNCS, DL_VARS,
-EXCLUDE_EXT, EXE_FILES, FIRST_MAKEFILE, FULLPERL, FULLPERLRUN,
-FULLPERLRUNINST, FUNCLIST, H, IMPORTS, INC, INCLUDE_EXT, INSTALLARCHLIB,
-INSTALLBIN, INSTALLDIRS, INSTALLMAN1DIR, INSTALLMAN3DIR, INSTALLPRIVLIB,
-INSTALLSCRIPT, INSTALLSITEARCH, INSTALLSITEBIN, INSTALLSITELIB,
-INSTALLSITEMAN1DIR, INSTALLSITEMAN3DIR, INSTALLSITESCRIPT,
-INSTALLVENDORARCH, INSTALLVENDORBIN, INSTALLVENDORLIB,
-INSTALLVENDORMAN1DIR, INSTALLVENDORMAN3DIR, INSTALLVENDORSCRIPT,
-INST_ARCHLIB, INST_BIN, INST_LIB, INST_MAN1DIR, INST_MAN3DIR, INST_SCRIPT,
-LD, LDDLFLAGS, LDFROM, LIB, LIBPERL_A, LIBS, LICENSE, LINKTYPE, MAKE,
-MAKEAPERL, MAKEFILE_OLD, MAN1PODS, MAN3PODS, MAP_TARGET, MYEXTLIB, NAME,
-NEEDS_LINKING, NOECHO, NORECURS, NO_META, NO_VC, OBJECT, OPTIMIZE, PERL,
-PERL_CORE, PERLMAINCC, PERL_ARCHLIB, PERL_LIB, PERL_MALLOC_OK, PERLPREFIX,
-PERLRUN, PERLRUNINST, PERL_SRC, PERM_RW, PERM_RWX, PL_FILES, PM, PMLIBDIRS,
-PM_FILTER, POLLUTE, PPM_INSTALL_EXEC, PPM_INSTALL_SCRIPT, PREFIX,
-PREREQ_FATAL, PREREQ_PM, PREREQ_PRINT, PRINT_PREREQ, SITEPREFIX, SIGN,
-SKIP, TYPEMAPS, VENDORPREFIX, VERBINST, VERSION, VERSION_FROM, VERSION_SYM,
-XS, XSOPT, XSPROTOARG, XS_VERSION
-
-=item Additional lowercase attributes
-
-clean, depend, dist, dynamic_lib, linkext, macro, postamble, realclean,
-test, tool_autosplit
-
-=item Overriding MakeMaker Methods
-
-=item The End Of Cargo Cult Programming
-
-C<< MAN3PODS => ' ' >>
-
-=item Hintsfile support
-
-=item Distribution Support
-
- make distcheck, make skipcheck, make distclean, make manifest,
- make distdir, make disttest, make tardist, make dist, make
-uutardist, make shdist, make zipdist, make ci
-
-=item Module Meta-Data
-
-=item Disabling an extension
-
-=item Other Handy Functions
-
-prompt
-
-=back
-
-=item ENVIRONMENT
-
-PERL_MM_OPT, PERL_MM_USE_DEFAULT, PERL_CORE
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item LICENSE
-
-=back
-
-=head2 ExtUtils::MakeMaker::Config - Wrapper around Config.pm
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 ExtUtils::MakeMaker::FAQ - Frequently Asked Questions About
-MakeMaker
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Module Installation
-
-How do I install a module into my home directory?, How do I get MakeMaker
-and Module::Build to install to the same place?, How do I keep from
-installing man pages?, How do I use a module without installing it?, PREFIX
-vs INSTALL_BASE from Module::Build::Cookbook
-
-=item Philosophy and History
-
-Why not just use <insert other build config tool here>?, What is
-Module::Build and how does it relate to MakeMaker?, pure perl. no make, no
-shell commands, easier to customize, cleaner internals, less cruft
-
-=item Module Writing
-
-How do I keep my $VERSION up to date without resetting it manually?, What's
-this F<META.yml> thing and how did it get in my F<MANIFEST>?!, How do I
-delete everything not in my F<MANIFEST>?
-
-=item XS
-
-How to I prevent "object version X.XX does not match bootstrap parameter
-Y.YY" errors?, How do I make two or more XS files coexist in the same
-directory?
-
-=back
-
-=item PATCHING
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::MakeMaker::Tutorial - Writing a module with MakeMaker
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item The Mantra
-
-=item The Layout
-
-Makefile.PL, MANIFEST, lib/, t/, Changes, README, INSTALL, MANIFEST.SKIP,
-bin/
-
-=back
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::MakeMaker::bytes - Version-agnostic bytes.pm
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 ExtUtils::MakeMaker::vmsish - Platform-agnostic vmsish.pm
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 ExtUtils::Manifest - utilities to write and check a MANIFEST file
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Functions
-
-mkmanifest
-
-=back
-
-=back
-
-manifind
-
-manicheck
-
-filecheck
-
-fullcheck
-
-skipcheck
-
-maniread
-
-manicopy
-
-maniadd
-
-=over 4
-
-=item MANIFEST
-
-=item MANIFEST.SKIP
-
-#!include_default, #!include /Path/to/another/manifest.skip
-
-=item EXPORT_OK
-
-=item GLOBAL VARIABLES
-
-=back
-
-=over 4
-
-=item DIAGNOSTICS
-
-C<Not in MANIFEST:> I<file>, C<Skipping> I<file>, C<No such file:> I<file>,
-C<MANIFEST:> I<$!>, C<Added to MANIFEST:> I<file>
-
-=item ENVIRONMENT
-
-B<PERL_MM_MANIFEST_DEBUG>
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 ExtUtils::Miniperl, writemain - write the C code for perlmain.c
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::Mkbootstrap - make a bootstrap file for use by DynaLoader
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 ExtUtils::Mksymlists - write linker options files for dynamic
-extension
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-DLBASE, DL_FUNCS, DL_VARS, FILE, FUNCLIST, IMPORTS, NAME
-
-=item AUTHOR
-
-=item REVISION
-
-mkfh()
-
-=back
-
-__find_relocations
-
-=head2 ExtUtils::Packlist - manage .packlist files
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item USAGE
-
-=item FUNCTIONS
-
-new(), read(), write(), validate(), packlist_file()
-
-=item EXAMPLE
-
-=item AUTHOR
-
-=back
-
-=head2 ExtUtils::ParseXS - converts Perl XS code into C code
-
-=over 4
-
-=item SYNOPSIS
-
-=item EXPORT
-
-=item FUNCTIONS
-
-process_xs(), B<C++>, B<hiertype>, B<except>, B<typemap>, B<prototypes>,
-B<versioncheck>, B<linenumbers>, B<optimize>, B<inout>, B<argtypes>, B<s>,
-errors()
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 ExtUtils::testlib - add blib/* directories to @INC
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 Fatal - replace functions with equivalents which succeed or die
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 Fcntl - load the C Fcntl.h defines
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTE
-
-=item EXPORTED SYMBOLS
-
-=back
-
-=head2 File::Basename - Parse file paths into directory, filename and
-suffix.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-C<fileparse> X<fileparse>
-
-C<basename> X<basename> X<filename>
-
-C<dirname> X<dirname>
-
-C<fileparse_set_fstype> X<filesystem>
-
-=over 4
-
-=item SEE ALSO
-
-=back
-
-=head2 File::CheckTree - run many filetest checks on a tree
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item HISTORY
-
-=back
-
-=head2 File::Compare - Compare files or filehandles
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item RETURN
-
-=item AUTHOR
-
-=back
-
-=head2 File::Copy - Copy files or filehandles
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-copy X<copy> X<cp>, move X<move> X<mv> X<rename>, syscopy X<syscopy>,
-rmscopy($from,$to[,$date_flag]) X<rmscopy>
-
-=item RETURN
-
-=item NOTES
-
-=item AUTHOR
-
-=back
-
-=head2 File::DosGlob - DOS like globbing and then some
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTES
-
-=item EXPORTS (by request only)
-
-=item BUGS
-
-=item AUTHOR
-
-=item HISTORY
-
-=item SEE ALSO
-
-=back
-
-=head2 File::Fetch - A generic file fetching mechanism
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item ACCESSORS
-
-$ff->uri, $ff->scheme, $ff->host, $ff->vol, $ff->share, $ff->path,
-$ff->file
-
-=back
-
-$ff->output_file
-
-=over 4
-
-=item METHODS
-
-=over 4
-
-=item $ff = File::Fetch->new( uri => 'http://some.where.com/dir/file.txt'
-);
-
-=back
-
-=back
-
-=over 4
-
-=item $ff->fetch( [to => /my/output/dir/] )
-
-=back
-
-=over 4
-
-=item $ff->error([BOOL])
-
-=back
-
-=over 4
-
-=item HOW IT WORKS
-
-=item GLOBAL VARIABLES
-
-=over 4
-
-=item $File::Fetch::FROM_EMAIL
-
-=item $File::Fetch::USER_AGENT
-
-=item $File::Fetch::FTP_PASSIVE
-
-=item $File::Fetch::TIMEOUT
-
-=item $File::Fetch::WARN
-
-=item $File::Fetch::DEBUG
-
-=item $File::Fetch::BLACKLIST
-
-=item $File::Fetch::METHOD_FAIL
-
-=back
-
-=item MAPPING
-
-=item FREQUENTLY ASKED QUESTIONS
-
-=over 4
-
-=item So how do I use a proxy with File::Fetch?
-
-=item I used 'lynx' to fetch a file, but its contents is all wrong!
-
-=item Files I'm trying to fetch have reserved characters or non-ASCII
-characters in them. What do I do?
-
-=back
-
-=item TODO
-
-Implement $PREFER_BIN
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 File::Find - Traverse a directory tree.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-B<find>, B<finddepth>
-
-=over 4
-
-=item %options
-
-C<wanted>, C<bydepth>, C<preprocess>, C<postprocess>, C<follow>,
-C<follow_fast>, C<follow_skip>, C<dangling_symlinks>, C<no_chdir>,
-C<untaint>, C<untaint_pattern>, C<untaint_skip>
-
-=item The wanted function
-
-C<$File::Find::dir> is the current directory name,, C<$_> is the current
-filename within that directory, C<$File::Find::name> is the complete
-pathname to the file
-
-=back
-
-=item WARNINGS
-
-=item CAVEAT
-
-$dont_use_nlink, symlinks
-
-=item NOTES
-
-=item BUGS AND CAVEATS
-
-=item HISTORY
-
-=back
-
-=head2 File::Glob - Perl extension for BSD glob routine
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item META CHARACTERS
-
-=item POSIX FLAGS
-
-C<GLOB_ERR>, C<GLOB_LIMIT>, C<GLOB_MARK>, C<GLOB_NOCASE>, C<GLOB_NOCHECK>,
-C<GLOB_NOSORT>, C<GLOB_BRACE>, C<GLOB_NOMAGIC>, C<GLOB_QUOTE>,
-C<GLOB_TILDE>, C<GLOB_CSH>, C<GLOB_ALPHASORT>
-
-=back
-
-=item DIAGNOSTICS
-
-C<GLOB_NOSPACE>, C<GLOB_ABEND>
-
-=item NOTES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 File::GlobMapper - Extend File Glob to Allow Input and Output Files
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-This code is a work in progress, There are known bugs, The interface
-defined here is tentative, There are portability issues, Do not use in
-production code, Consider yourself warned!
-
-=over 4
-
-=item Behind The Scenes
-
-=item Limitations
-
-=item Input File Glob
-
-B<~>, B<~user>, B<.>, B<*>, B<?>, B<\>, B<[]>, B<{,}>, B<()>
-
-=item Output File Glob
-
-"*", #1
-
-=item Returned Data
-
-=back
-
-=item EXAMPLES
-
-=over 4
-
-=item A Rename script
-
-=item A few example globmaps
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 File::Path - Create or remove directory trees
-
-=over 4
-
-=item VERSION
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item FUNCTIONS
-
-mode, verbose, error, verbose, safe, keep_root, result, error
-
-=item TRADITIONAL INTERFACE
-
-=item ERROR HANDLING
-
-=item NOTES
-
-=back
-
-=item DIAGNOSTICS
-
-mkdir [path]: [errmsg] (SEVERE), No root path(s) specified, No such file or
-directory, cannot fetch initial working directory: [errmsg], cannot stat
-initial working directory: [errmsg], cannot chdir to [dir]: [errmsg],
-directory [dir] changed before chdir, expected dev=[n] inode=[n], actual
-dev=[n] ino=[n], aborting. (FATAL), cannot make directory [dir]
-read+writeable: [errmsg], cannot read [dir]: [errmsg], cannot reset chmod
-[dir]: [errmsg], cannot chdir to [parent-dir] from [child-dir]: [errmsg],
-aborting. (FATAL), cannot stat prior working directory [dir]: [errmsg],
-aborting. (FATAL), previous directory [parent-dir] changed before entering
-[child-dir], expected dev=[n] inode=[n], actual dev=[n] ino=[n], aborting.
-(FATAL), cannot make directory [dir] writeable: [errmsg], cannot remove
-directory [dir]: [errmsg], cannot restore permissions of [dir] to [0nnn]:
-[errmsg], cannot make file [file] writeable: [errmsg], cannot unlink file
-[file]: [errmsg], cannot restore permissions of [file] to [0nnn]: [errmsg]
-
-=item SEE ALSO
-
-=item BUGS
-
-=item ACKNOWLEDGEMENTS
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=item LICENSE
-
-=back
-
-=head2 File::Spec - portably perform operations on file names
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-canonpath X<canonpath>, catdir X<catdir>, catfile X<catfile>, curdir
-X<curdir>, devnull X<devnull>, rootdir X<rootdir>, tmpdir X<tmpdir>, updir
-X<updir>, no_upwards, case_tolerant, file_name_is_absolute, path X<path>,
-join X<join, path>, splitpath X<splitpath> X<split, path>, splitdir
-X<splitdir> X<split, dir>, catpath(), abs2rel X<abs2rel> X<absolute, path>
-X<relative, path>, rel2abs() X<rel2abs> X<absolute, path> X<relative, path>
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 File::Spec::Cygwin - methods for Cygwin file specs
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-canonpath
-
-file_name_is_absolute
-
-tmpdir (override)
-
-case_tolerant
-
-=over 4
-
-=item COPYRIGHT
-
-=back
-
-=head2 File::Spec::Epoc - methods for Epoc file specs
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-canonpath()
-
-=over 4
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 File::Spec::Functions - portably perform operations on file names
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Exports
-
-=back
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 File::Spec::Mac - File::Spec for Mac OS (Classic)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-canonpath
-
-=back
-
-catdir()
-
-catfile
-
-curdir
-
-devnull
-
-rootdir
-
-tmpdir
-
-updir
-
-file_name_is_absolute
-
-path
-
-splitpath
-
-splitdir
-
-catpath
-
-abs2rel
-
-rel2abs
-
-=over 4
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 File::Spec::OS2 - methods for OS/2 file specs
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-tmpdir, splitpath
-
-=item COPYRIGHT
-
-=back
-
-=head2 File::Spec::Unix - File::Spec for Unix, base for other File::Spec
-modules
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-canonpath()
-
-=back
-
-catdir()
-
-catfile
-
-curdir
-
-devnull
-
-rootdir
-
-tmpdir
-
-updir
-
-no_upwards
-
-case_tolerant
-
-file_name_is_absolute
-
-path
-
-join
-
-splitpath
-
-splitdir
-
-catpath()
-
-abs2rel
-
-rel2abs()
-
-=over 4
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 File::Spec::VMS - methods for VMS file specs
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-canonpath (override)
-
-=back
-
-catdir (override)
-
-catfile (override)
-
-curdir (override)
-
-devnull (override)
-
-rootdir (override)
-
-tmpdir (override)
-
-updir (override)
-
-case_tolerant (override)
-
-path (override)
-
-file_name_is_absolute (override)
-
-splitpath (override)
-
-splitdir (override)
-
-catpath (override)
-
-abs2rel (override)
-
-rel2abs (override)
-
-=over 4
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 File::Spec::Win32 - methods for Win32 file specs
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-devnull
-
-=back
-
-tmpdir
-
-case_tolerant
-
-file_name_is_absolute
-
-catfile
-
-canonpath
-
-splitpath
-
-splitdir
-
-catpath
-
-=over 4
-
-=item Note For File::Spec::Win32 Maintainers
-
-=back
-
-=over 4
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 File::Temp - return name and handle of a temporary file safely
-
-=over 4
-
-=item PORTABILITY
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item OBJECT-ORIENTED INTERFACE
-
-B<new>
-
-=back
-
-B<filename>
-
-B<unlink_on_destroy>
-
-B<DESTROY>
-
-=over 4
-
-=item FUNCTIONS
-
-B<tempfile>
-
-=back
-
-B<tempdir>
-
-=over 4
-
-=item MKTEMP FUNCTIONS
-
-B<mkstemp>
-
-=back
-
-B<mkstemps>
-
-B<mkdtemp>
-
-B<mktemp>
-
-=over 4
-
-=item POSIX FUNCTIONS
-
-B<tmpnam>
-
-=back
-
-B<tmpfile>
-
-=over 4
-
-=item ADDITIONAL FUNCTIONS
-
-B<tempnam>
-
-=back
-
-=over 4
-
-=item UTILITY FUNCTIONS
-
-B<unlink0>
-
-=back
-
-B<cmpstat>
-
-B<unlink1>
-
-B<cleanup>
-
-=over 4
-
-=item PACKAGE VARIABLES
-
-B<safe_level>, STANDARD, MEDIUM, HIGH
-
-=back
-
-TopSystemUID
-
-B<$KEEP_ALL>, B<$DEBUG>
-
-=over 4
-
-=item WARNING
-
-=over 4
-
-=item Temporary files and NFS
-
-=item Forking
-
-=item BINMODE
-
-=back
-
-=item HISTORY
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 File::stat - by-name interface to Perl's built-in stat() functions
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item BUGS
-
-=item NOTE
-
-=item AUTHOR
-
-=back
-
-=head2 FileCache - keep more files open than the system permits
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-cacheout EXPR, cacheout MODE, EXPR
-
-=item CAVEATS
-
-=item BUGS
-
-=back
-
-=head2 FileHandle - supply object methods for filehandles
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-$fh->print, $fh->printf, $fh->getline, $fh->getlines
-
-=item SEE ALSO
-
-=back
-
-=head2 Filter::Simple - Simplified source filtering
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item The Problem
-
-=item A Solution
-
-=item Disabling or changing <no> behaviour
-
-=item All-in-one interface
-
-=item Filtering only specific components of source code
-
-C<"code">, C<"code_no_comments">, C<"executable">,
-C<"executable_no_comments">, C<"quotelike">, C<"string">, C<"regex">,
-C<"all">
-
-=item Filtering only the code parts of source code
-
-Most source code ceases to be grammatically correct when it is broken up
-into the pieces between string literals and regexes. So the C<'code'>
-and C<'code_no_comments'> component filter behave slightly differently
-from the other partial filters described in the previous section.
-
-=item Using Filter::Simple with an explicit C<import> subroutine
-
-=item Using Filter::Simple and Exporter together
-
-=item How it works
-
-=back
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Filter::Util::Call - Perl Source Filter Utility Module
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item B<use Filter::Util::Call>
-
-=item B<import()>
-
-=item B<filter() and anonymous sub>
-
-B<$_>, B<$status>, B<filter_read> and B<filter_read_exact>, B<filter_del>
-
-=back
-
-=item EXAMPLES
-
-=over 4
-
-=item Example 1: A simple filter.
-
-=item Example 2: Using the context
-
-=item Example 3: Using the context within the filter
-
-=item Example 4: Using filter_del
-
-=back
-
-=item Filter::Simple
-
-=item AUTHOR
-
-=item DATE
-
-=back
-
-=head2 FindBin - Locate directory of original perl script
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXPORTABLE VARIABLES
-
-=item KNOWN ISSUES
-
-=item KNOWN BUGS
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=back
-
-=head2 GDBM_File - Perl5 access to the gdbm library.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item AVAILABILITY
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 Getopt::Long - Extended processing of command line options
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Command Line Options, an Introduction
-
-=item Getting Started with Getopt::Long
-
-=over 4
-
-=item Simple options
-
-=item A little bit less simple options
-
-=item Mixing command line option with other arguments
-
-=item Options with values
-
-=item Options with multiple values
-
-=item Options with hash values
-
-=item User-defined subroutines to handle options
-
-=item Options with multiple names
-
-=item Case and abbreviations
-
-=item Summary of Option Specifications
-
-!, +, s, i, o, f, : I<type> [ I<desttype> ], : I<number> [ I<desttype> ], :
-+ [ I<desttype> ]
-
-=back
-
-=item Advanced Possibilities
-
-=over 4
-
-=item Object oriented interface
-
-=item Thread Safety
-
-=item Documentation and help texts
-
-=item Parsing options from an arbitrary array
-
-=item Parsing options from an arbitrary string
-
-=item Storing options values in a hash
-
-=item Bundling
-
-=item The lonesome dash
-
-=item Argument callback
-
-=back
-
-=item Configuring Getopt::Long
-
-default, posix_default, auto_abbrev, getopt_compat, gnu_compat, gnu_getopt,
-require_order, permute, bundling (default: disabled), bundling_override
-(default: disabled), ignore_case (default: enabled), ignore_case_always
-(default: disabled), auto_version (default:disabled), auto_help
-(default:disabled), pass_through (default: disabled), prefix,
-prefix_pattern, long_prefix_pattern, debug (default: disabled)
-
-=item Exportable Methods
-
-VersionMessage, C<-message>, C<-msg>, C<-exitval>, C<-output>, HelpMessage
-
-=item Return values and Errors
-
-=item Legacy
-
-=over 4
-
-=item Default destinations
-
-=item Alternative option starters
-
-=item Configuration variables
-
-=back
-
-=item Tips and Techniques
-
-=over 4
-
-=item Pushing multiple values in a hash option
-
-=back
-
-=item Trouble Shooting
-
-=over 4
-
-=item GetOptions does not return a false result when an option is not
-supplied
-
-=item GetOptions does not split the command line correctly
-
-=item Undefined subroutine &main::GetOptions called
-
-=item How do I put a "-?" option into a Getopt::Long?
-
-=back
-
-=item AUTHOR
-
-=item COPYRIGHT AND DISCLAIMER
-
-=back
-
-=head2 Getopt::Std, getopt, getopts - Process single-character switches
-with switch clustering
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item C<--help> and C<--version>
-
-=back
-
-=head2 Hash::Util - A selection of general-utility hash subroutines
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Restricted hashes
-
-B<lock_keys>, B<unlock_keys>
-
-=back
-
-=back
-
-B<lock_keys_plus>
-
-B<lock_value>, B<unlock_value>
-
-B<lock_hash>, B<unlock_hash>
-
-B<lock_hash_recurse>, B<unlock_hash_recurse>
-
-B<hash_unlocked>
-
-B<legal_keys>, B<hidden_keys>, B<all_keys>, B<hash_seed>
-
-B<hv_store>
-
-=over 4
-
-=item Operating on references to hashes.
-
-lock_ref_keys, unlock_ref_keys, lock_ref_keys_plus, lock_ref_value,
-unlock_ref_value, lock_hashref, unlock_hashref, lock_hashref_recurse,
-unlock_hashref_recurse, hash_ref_unlocked, legal_ref_keys, hidden_ref_keys
-
-=back
-
-=over 4
-
-=item CAVEATS
-
-=item BUGS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Hash::Util::FieldHash - Support for Inside-Out Classes
-
-=over 4
-
-=item SYNOPSIS
-
-=item FUNCTIONS
-
-id, id_2obj, register, idhash, idhashes, fieldhash, fieldhashes
-
-=item DESCRIPTION
-
-=over 4
-
-=item The Inside-out Technique
-
-=item Problems of Inside-out
-
-=item Solutions
-
-=item More Problems
-
-=item The Generic Object
-
-=item How to use Field Hashes
-
-=item Garbage-Collected Hashes
-
-=back
-
-=item EXAMPLES
-
-C<init()>, C<first()>, C<last()>, C<name()>, C<Name_hash>, C<Name_id>,
-C<Name_idhash>, C<Name_id_reg>, C<Name_idhash_reg>, C<Name_fieldhash>
-
-=over 4
-
-=item Example 1
-
-=item Example 2
-
-=back
-
-=item GUTS
-
-=over 4
-
-=item The C<PERL_MAGIC_uvar> interface for hashes
-
-=item Weakrefs call uvar magic
-
-=item How field hashes work
-
-=item Internal function Hash::Util::FieldHash::_fieldhash
-
-=back
-
-=item AUTHOR
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Hash::Util::FieldHash::lib::Hash::Util::FieldHash,
-Hash::Util::FieldHash - Support for Inside-Out Classes
-
-=over 4
-
-=item SYNOPSIS
-
-=item FUNCTIONS
-
-id, id_2obj, register, idhash, idhashes, fieldhash, fieldhashes
-
-=item DESCRIPTION
-
-=over 4
-
-=item The Inside-out Technique
-
-=item Problems of Inside-out
-
-=item Solutions
-
-=item More Problems
-
-=item The Generic Object
-
-=item How to use Field Hashes
-
-=item Garbage-Collected Hashes
-
-=back
-
-=item EXAMPLES
-
-C<init()>, C<first()>, C<last()>, C<name()>, C<Name_hash>, C<Name_id>,
-C<Name_idhash>, C<Name_id_reg>, C<Name_idhash_reg>, C<Name_fieldhash>
-
-=over 4
-
-=item Example 1
-
-=item Example 2
-
-=back
-
-=item GUTS
-
-=over 4
-
-=item The C<PERL_MAGIC_uvar> interface for hashes
-
-=item Weakrefs call uvar magic
-
-=item How field hashes work
-
-=item Internal function Hash::Util::FieldHash::_fieldhash
-
-=back
-
-=item AUTHOR
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Hash::Utilib::Hash::Util, Hash::Util - A selection of
-general-utility hash subroutines
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Restricted hashes
-
-B<lock_keys>, B<unlock_keys>
-
-=back
-
-=back
-
-B<lock_keys_plus>
-
-B<lock_value>, B<unlock_value>
-
-B<lock_hash>, B<unlock_hash>
-
-B<lock_hash_recurse>, B<unlock_hash_recurse>
-
-B<hash_unlocked>
-
-B<legal_keys>, B<hidden_keys>, B<all_keys>, B<hash_seed>
-
-B<hv_store>
-
-=over 4
-
-=item Operating on references to hashes.
-
-lock_ref_keys, unlock_ref_keys, lock_ref_keys_plus, lock_ref_value,
-unlock_ref_value, lock_hashref, unlock_hashref, lock_hashref_recurse,
-unlock_hashref_recurse, hash_ref_unlocked, legal_ref_keys, hidden_ref_keys
-
-=back
-
-=over 4
-
-=item CAVEATS
-
-=item BUGS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 I18N::Collate - compare 8-bit scalar data according to the current
-locale
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 I18N::LangTags - functions for dealing with RFC3066-style language
-tags
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-the function is_language_tag($lang1)
-
-the function extract_language_tags($whatever)
-
-the function same_language_tag($lang1, $lang2)
-
-the function similarity_language_tag($lang1, $lang2)
-
-the function is_dialect_of($lang1, $lang2)
-
-the function super_languages($lang1)
-
-the function locale2language_tag($locale_identifier)
-
-the function encode_language_tag($lang1)
-
-the function alternate_language_tags($lang1)
-
-the function @langs = panic_languages(@accept_languages)
-
-the function implicate_supers( ...languages... ), the function
-implicate_supers_strictly( ...languages... )
-
-=over 4
-
-=item ABOUT LOWERCASING
-
-=item ABOUT UNICODE PLAINTEXT LANGUAGE TAGS
-
-=item SEE ALSO
-
-=item COPYRIGHT
-
-=item AUTHOR
-
-=back
-
-=head2 I18N::LangTags::Detect - detect the user's language preferences
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS
-
-=item ENVIRONMENT
-
-=item SEE ALSO
-
-=item COPYRIGHT
-
-=item AUTHOR
-
-=back
-
-=head2 I18N::LangTags::List -- tags and names for human languages
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item ABOUT LANGUAGE TAGS
-
-=item LIST OF LANGUAGES
-
-{ab} : Abkhazian, {ace} : Achinese, {ach} : Acoli, {ada} : Adangme, {ady} :
-Adyghe, {aa} : Afar, {afh} : Afrihili, {af} : Afrikaans, [{afa} :
-Afro-Asiatic (Other)], {ak} : Akan, {akk} : Akkadian, {sq} : Albanian,
-{ale} : Aleut, [{alg} : Algonquian languages], [{tut} : Altaic (Other)],
-{am} : Amharic, {i-ami} : Ami, [{apa} : Apache languages], {ar} : Arabic,
-{arc} : Aramaic, {arp} : Arapaho, {arn} : Araucanian, {arw} : Arawak, {hy}
-: Armenian, {an} : Aragonese, [{art} : Artificial (Other)], {ast} :
-Asturian, {as} : Assamese, [{ath} : Athapascan languages], [{aus} :
-Australian languages], [{map} : Austronesian (Other)], {av} : Avaric, {ae}
-: Avestan, {awa} : Awadhi, {ay} : Aymara, {az} : Azerbaijani, {ban} :
-Balinese, [{bat} : Baltic (Other)], {bal} : Baluchi, {bm} : Bambara, [{bai}
-: Bamileke languages], {bad} : Banda, [{bnt} : Bantu (Other)], {bas} :
-Basa, {ba} : Bashkir, {eu} : Basque, {btk} : Batak (Indonesia), {bej} :
-Beja, {be} : Belarusian, {bem} : Bemba, {bn} : Bengali, [{ber} : Berber
-(Other)], {bho} : Bhojpuri, {bh} : Bihari, {bik} : Bikol, {bin} : Bini,
-{bi} : Bislama, {bs} : Bosnian, {bra} : Braj, {br} : Breton, {bug} :
-Buginese, {bg} : Bulgarian, {i-bnn} : Bunun, {bua} : Buriat, {my} :
-Burmese, {cad} : Caddo, {car} : Carib, {ca} : Catalan, [{cau} : Caucasian
-(Other)], {ceb} : Cebuano, [{cel} : Celtic (Other)], [{cai} : Central
-American Indian (Other)], {chg} : Chagatai, [{cmc} : Chamic languages],
-{ch} : Chamorro, {ce} : Chechen, {chr} : Cherokee, {chy} : Cheyenne, {chb}
-: Chibcha, {ny} : Chichewa, {zh} : Chinese, {chn} : Chinook Jargon, {chp} :
-Chipewyan, {cho} : Choctaw, {cu} : Church Slavic, {chk} : Chuukese, {cv} :
-Chuvash, {cop} : Coptic, {kw} : Cornish, {co} : Corsican, {cr} : Cree,
-{mus} : Creek, [{cpe} : English-based Creoles and pidgins (Other)], [{cpf}
-: French-based Creoles and pidgins (Other)], [{cpp} : Portuguese-based
-Creoles and pidgins (Other)], [{crp} : Creoles and pidgins (Other)], {hr} :
-Croatian, [{cus} : Cushitic (Other)], {cs} : Czech, {dak} : Dakota, {da} :
-Danish, {dar} : Dargwa, {day} : Dayak, {i-default} : Default (Fallthru)
-Language, {del} : Delaware, {din} : Dinka, {dv} : Divehi, {doi} : Dogri,
-{dgr} : Dogrib, [{dra} : Dravidian (Other)], {dua} : Duala, {nl} : Dutch,
-{dum} : Middle Dutch (ca.1050-1350), {dyu} : Dyula, {dz} : Dzongkha, {efi}
-: Efik, {egy} : Ancient Egyptian, {eka} : Ekajuk, {elx} : Elamite, {en} :
-English, {enm} : Old English (1100-1500), {ang} : Old English
-(ca.450-1100), {i-enochian} : Enochian (Artificial), {myv} : Erzya, {eo} :
-Esperanto, {et} : Estonian, {ee} : Ewe, {ewo} : Ewondo, {fan} : Fang, {fat}
-: Fanti, {fo} : Faroese, {fj} : Fijian, {fi} : Finnish, [{fiu} :
-Finno-Ugrian (Other)], {fon} : Fon, {fr} : French, {frm} : Middle French
-(ca.1400-1600), {fro} : Old French (842-ca.1400), {fy} : Frisian, {fur} :
-Friulian, {ff} : Fulah, {gaa} : Ga, {gd} : Scots Gaelic, {gl} : Gallegan,
-{lg} : Ganda, {gay} : Gayo, {gba} : Gbaya, {gez} : Geez, {ka} : Georgian,
-{de} : German, {gmh} : Middle High German (ca.1050-1500), {goh} : Old High
-German (ca.750-1050), [{gem} : Germanic (Other)], {gil} : Gilbertese, {gon}
-: Gondi, {gor} : Gorontalo, {got} : Gothic, {grb} : Grebo, {grc} : Ancient
-Greek, {el} : Modern Greek, {gn} : Guarani, {gu} : Gujarati, {gwi} :
-Gwich'in, {hai} : Haida, {ht} : Haitian, {ha} : Hausa, {haw} : Hawaiian,
-{he} : Hebrew, {hz} : Herero, {hil} : Hiligaynon, {him} : Himachali, {hi} :
-Hindi, {ho} : Hiri Motu, {hit} : Hittite, {hmn} : Hmong, {hu} : Hungarian,
-{hup} : Hupa, {iba} : Iban, {is} : Icelandic, {io} : Ido, {ig} : Igbo,
-{ijo} : Ijo, {ilo} : Iloko, [{inc} : Indic (Other)], [{ine} : Indo-European
-(Other)], {id} : Indonesian, {inh} : Ingush, {ia} : Interlingua
-(International Auxiliary Language Association), {ie} : Interlingue, {iu} :
-Inuktitut, {ik} : Inupiaq, [{ira} : Iranian (Other)], {ga} : Irish, {mga} :
-Middle Irish (900-1200), {sga} : Old Irish (to 900), [{iro} : Iroquoian
-languages], {it} : Italian, {ja} : Japanese, {jv} : Javanese, {jrb} :
-Judeo-Arabic, {jpr} : Judeo-Persian, {kbd} : Kabardian, {kab} : Kabyle,
-{kac} : Kachin, {kl} : Kalaallisut, {xal} : Kalmyk, {kam} : Kamba, {kn} :
-Kannada, {kr} : Kanuri, {krc} : Karachay-Balkar, {kaa} : Kara-Kalpak, {kar}
-: Karen, {ks} : Kashmiri, {csb} : Kashubian, {kaw} : Kawi, {kk} : Kazakh,
-{kha} : Khasi, {km} : Khmer, [{khi} : Khoisan (Other)], {kho} : Khotanese,
-{ki} : Kikuyu, {kmb} : Kimbundu, {rw} : Kinyarwanda, {ky} : Kirghiz,
-{i-klingon} : Klingon, {kv} : Komi, {kg} : Kongo, {kok} : Konkani, {ko} :
-Korean, {kos} : Kosraean, {kpe} : Kpelle, {kro} : Kru, {kj} : Kuanyama,
-{kum} : Kumyk, {ku} : Kurdish, {kru} : Kurukh, {kut} : Kutenai, {lad} :
-Ladino, {lah} : Lahnda, {lam} : Lamba, {lo} : Lao, {la} : Latin, {lv} :
-Latvian, {lb} : Letzeburgesch, {lez} : Lezghian, {li} : Limburgish, {ln} :
-Lingala, {lt} : Lithuanian, {nds} : Low German, {art-lojban} : Lojban
-(Artificial), {loz} : Lozi, {lu} : Luba-Katanga, {lua} : Luba-Lulua, {lui}
-: Luiseno, {lun} : Lunda, {luo} : Luo (Kenya and Tanzania), {lus} : Lushai,
-{mk} : Macedonian, {mad} : Madurese, {mag} : Magahi, {mai} : Maithili,
-{mak} : Makasar, {mg} : Malagasy, {ms} : Malay, {ml} : Malayalam, {mt} :
-Maltese, {mnc} : Manchu, {mdr} : Mandar, {man} : Mandingo, {mni} :
-Manipuri, [{mno} : Manobo languages], {gv} : Manx, {mi} : Maori, {mr} :
-Marathi, {chm} : Mari, {mh} : Marshall, {mwr} : Marwari, {mas} : Masai,
-[{myn} : Mayan languages], {men} : Mende, {mic} : Micmac, {min} :
-Minangkabau, {i-mingo} : Mingo, [{mis} : Miscellaneous languages], {moh} :
-Mohawk, {mdf} : Moksha, {mo} : Moldavian, [{mkh} : Mon-Khmer (Other)],
-{lol} : Mongo, {mn} : Mongolian, {mos} : Mossi, [{mul} : Multiple
-languages], [{mun} : Munda languages], {nah} : Nahuatl, {nap} : Neapolitan,
-{na} : Nauru, {nv} : Navajo, {nd} : North Ndebele, {nr} : South Ndebele,
-{ng} : Ndonga, {ne} : Nepali, {new} : Newari, {nia} : Nias, [{nic} :
-Niger-Kordofanian (Other)], [{ssa} : Nilo-Saharan (Other)], {niu} : Niuean,
-{nog} : Nogai, {non} : Old Norse, [{nai} : North American Indian], {no} :
-Norwegian, {nb} : Norwegian Bokmal, {nn} : Norwegian Nynorsk, [{nub} :
-Nubian languages], {nym} : Nyamwezi, {nyn} : Nyankole, {nyo} : Nyoro, {nzi}
-: Nzima, {oc} : Occitan (post 1500), {oj} : Ojibwa, {or} : Oriya, {om} :
-Oromo, {osa} : Osage, {os} : Ossetian; Ossetic, [{oto} : Otomian
-languages], {pal} : Pahlavi, {i-pwn} : Paiwan, {pau} : Palauan, {pi} :
-Pali, {pam} : Pampanga, {pag} : Pangasinan, {pa} : Panjabi, {pap} :
-Papiamento, [{paa} : Papuan (Other)], {fa} : Persian, {peo} : Old Persian
-(ca.600-400 B.C.), [{phi} : Philippine (Other)], {phn} : Phoenician, {pon}
-: Pohnpeian, {pl} : Polish, {pt} : Portuguese, [{pra} : Prakrit languages],
-{pro} : Old Provencal (to 1500), {ps} : Pushto, {qu} : Quechua, {rm} :
-Raeto-Romance, {raj} : Rajasthani, {rap} : Rapanui, {rar} : Rarotongan,
-[{qaa - qtz} : Reserved for local use.], [{roa} : Romance (Other)], {ro} :
-Romanian, {rom} : Romany, {rn} : Rundi, {ru} : Russian, [{sal} : Salishan
-languages], {sam} : Samaritan Aramaic, {se} : Northern Sami, {sma} :
-Southern Sami, {smn} : Inari Sami, {smj} : Lule Sami, {sms} : Skolt Sami,
-[{smi} : Sami languages (Other)], {sm} : Samoan, {sad} : Sandawe, {sg} :
-Sango, {sa} : Sanskrit, {sat} : Santali, {sc} : Sardinian, {sas} : Sasak,
-{sco} : Scots, {sel} : Selkup, [{sem} : Semitic (Other)], {sr} : Serbian,
-{srr} : Serer, {shn} : Shan, {sn} : Shona, {sid} : Sidamo, {sgn-...} : Sign
-Languages, {bla} : Siksika, {sd} : Sindhi, {si} : Sinhalese, [{sit} :
-Sino-Tibetan (Other)], [{sio} : Siouan languages], {den} : Slave
-(Athapascan), [{sla} : Slavic (Other)], {sk} : Slovak, {sl} : Slovenian,
-{sog} : Sogdian, {so} : Somali, {son} : Songhai, {snk} : Soninke, {wen} :
-Sorbian languages, {nso} : Northern Sotho, {st} : Southern Sotho, [{sai} :
-South American Indian (Other)], {es} : Spanish, {suk} : Sukuma, {sux} :
-Sumerian, {su} : Sundanese, {sus} : Susu, {sw} : Swahili, {ss} : Swati,
-{sv} : Swedish, {syr} : Syriac, {tl} : Tagalog, {ty} : Tahitian, [{tai} :
-Tai (Other)], {tg} : Tajik, {tmh} : Tamashek, {ta} : Tamil, {i-tao} : Tao,
-{tt} : Tatar, {i-tay} : Tayal, {te} : Telugu, {ter} : Tereno, {tet} :
-Tetum, {th} : Thai, {bo} : Tibetan, {tig} : Tigre, {ti} : Tigrinya, {tem} :
-Timne, {tiv} : Tiv, {tli} : Tlingit, {tpi} : Tok Pisin, {tkl} : Tokelau,
-{tog} : Tonga (Nyasa), {to} : Tonga (Tonga Islands), {tsi} : Tsimshian,
-{ts} : Tsonga, {i-tsu} : Tsou, {tn} : Tswana, {tum} : Tumbuka, [{tup} :
-Tupi languages], {tr} : Turkish, {ota} : Ottoman Turkish (1500-1928), {crh}
-: Crimean Turkish, {tk} : Turkmen, {tvl} : Tuvalu, {tyv} : Tuvinian, {tw} :
-Twi, {udm} : Udmurt, {uga} : Ugaritic, {ug} : Uighur, {uk} : Ukrainian,
-{umb} : Umbundu, {und} : Undetermined, {ur} : Urdu, {uz} : Uzbek, {vai} :
-Vai, {ve} : Venda, {vi} : Vietnamese, {vo} : Volapuk, {vot} : Votic, [{wak}
-: Wakashan languages], {wa} : Walloon, {wal} : Walamo, {war} : Waray, {was}
-: Washo, {cy} : Welsh, {wo} : Wolof, {x-...} : Unregistered (Semi-Private
-Use), {xh} : Xhosa, {sah} : Yakut, {yao} : Yao, {yap} : Yapese, {ii} :
-Sichuan Yi, {yi} : Yiddish, {yo} : Yoruba, [{ypk} : Yupik languages], {znd}
-: Zande, [{zap} : Zapotec], {zen} : Zenaga, {za} : Zhuang, {zu} : Zulu,
-{zun} : Zuni
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMER
-
-=item AUTHOR
-
-=back
-
-=head2 I18N::Langinfo - query locale information
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item EXPORT
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO - load various IO modules
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item DEPRECATED
-
-=back
-
-=head2 IO::Compress::Base - Base Class for IO::Compress modules
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO::Compress::Deflate - Write RFC 1950 files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item deflate $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeIn => 0|1 >>, C<< Append => 0|1 >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< Append => 0|1 >>, A Buffer, A Filename, A
-Filehandle, C<< Merge => 0|1 >>, -Level, -Strategy, C<< Strict => 0|1 >>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item print
-
-=item printf
-
-=item syswrite
-
-=item write
-
-=item flush
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item newStream([OPTS])
-
-=item deflateParams
-
-=back
-
-=item Importing
-
-:all, :constants, :flush, :level, :strategy
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO::Compress::Gzip - Write RFC 1952 files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item gzip $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeIn => 0|1 >>, C<< Append => 0|1 >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< Append => 0|1 >>, A Buffer, A Filename, A
-Filehandle, C<< Merge => 0|1 >>, -Level, -Strategy, C<< Minimal => 0|1 >>,
-C<< Comment => $comment >>, C<< Name => $string >>, C<< Time => $number >>,
-C<< TextFlag => 0|1 >>, C<< HeaderCRC => 0|1 >>, C<< OS_Code => $value >>,
-C<< ExtraField => $data >>, C<< ExtraFlags => $value >>, C<< Strict => 0|1
->>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item print
-
-=item printf
-
-=item syswrite
-
-=item write
-
-=item flush
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item newStream([OPTS])
-
-=item deflateParams
-
-=back
-
-=item Importing
-
-:all, :constants, :flush, :level, :strategy
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO::Compress::RawDeflate - Write RFC 1951 files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item rawdeflate $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeIn => 0|1 >>, C<< Append => 0|1 >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< Append => 0|1 >>, A Buffer, A Filename, A
-Filehandle, C<< Merge => 0|1 >>, -Level, -Strategy, C<< Strict => 0|1 >>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item print
-
-=item printf
-
-=item syswrite
-
-=item write
-
-=item flush
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item newStream([OPTS])
-
-=item deflateParams
-
-=back
-
-=item Importing
-
-:all, :constants, :flush, :level, :strategy
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO::Compress::Zip - Write zip files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item zip $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeIn => 0|1 >>, C<< Append => 0|1 >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< Append => 0|1 >>, A Buffer, A Filename, A
-Filehandle, C<< Name => $string >>, C<< Time => $number >>, C<< ExtAttr =>
-$attr >>, C<< exTime => [$atime, $mtime, $ctime] >>, C<< Comment =>
-$comment >>, C<< ZipComment => $comment >>, C<< Method => $method >>, C<<
-Stream => 0|1 >>, C<< Zip64 => 0|1 >>, C<< TextFlag => 0|1 >>, C<<
-ExtraFieldLocal => $data >> =item C<< ExtraFieldCentral => $data >>, C<<
-Minimal => 1|0 >>, C<< BlockSize100K => number >>, C<< WorkFactor => number
->>, -Level, -Strategy, C<< Strict => 0|1 >>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item print
-
-=item printf
-
-=item syswrite
-
-=item write
-
-=item flush
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item newStream([OPTS])
-
-=item deflateParams
-
-=back
-
-=item Importing
-
-:all, :constants, :flush, :level, :strategy, :zip_method
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO::Dir - supply object methods for directory handles
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-new ( [ DIRNAME ] ), open ( DIRNAME ), read (), seek ( POS ), tell (),
-rewind (), close (), tie %hash, 'IO::Dir', DIRNAME [, OPTIONS ]
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::File - supply object methods for filehandles
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( FILENAME [,MODE [,PERMS]] ), new_tmpfile
-
-=item METHODS
-
-open( FILENAME [,MODE [,PERMS]] ), open( FILENAME, IOLAYERS ), binmode(
-[LAYER] )
-
-=item NOTE
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 IO::Handle - supply object methods for I/O handles
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new (), new_from_fd ( FD, MODE )
-
-=item METHODS
-
-$io->fdopen ( FD, MODE ), $io->opened, $io->getline, $io->getlines,
-$io->ungetc ( ORD ), $io->write ( BUF, LEN [, OFFSET ] ), $io->error,
-$io->clearerr, $io->sync, $io->flush, $io->printflush ( ARGS ),
-$io->blocking ( [ BOOL ] ), $io->untaint
-
-=item NOTE
-
-=item SEE ALSO
-
-=item BUGS
-
-=item HISTORY
-
-=back
-
-=head2 IO::Pipe - supply object methods for pipes
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [READER, WRITER] )
-
-=item METHODS
-
-reader ([ARGS]), writer ([ARGS]), handles ()
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::Poll - Object interface to system poll call
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-mask ( IO [, EVENT_MASK ] ), poll ( [ TIMEOUT ] ), events ( IO ), remove (
-IO ), handles( [ EVENT_MASK ] )
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::Seekable - supply seek based methods for I/O objects
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-$io->getpos, $io->setpos, $io->seek ( POS, WHENCE ), WHENCE=0 (SEEK_SET),
-WHENCE=1 (SEEK_CUR), WHENCE=2 (SEEK_END), $io->sysseek( POS, WHENCE ),
-$io->tell
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 IO::Select - OO interface to the select system call
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [ HANDLES ] )
-
-=item METHODS
-
-add ( HANDLES ), remove ( HANDLES ), exists ( HANDLE ), handles, can_read (
-[ TIMEOUT ] ), can_write ( [ TIMEOUT ] ), has_exception ( [ TIMEOUT ] ),
-count (), bits(), select ( READ, WRITE, EXCEPTION [, TIMEOUT ] )
-
-=item EXAMPLE
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::Socket - Object interface to socket communications
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [ARGS] )
-
-=item METHODS
-
-accept([PKG]), socketpair(DOMAIN, TYPE, PROTOCOL), atmark, connected,
-protocol, sockdomain, sockopt(OPT [, VAL]), socktype, timeout([VAL])
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::Socket::INET - Object interface for AF_INET domain sockets
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [ARGS] )
-
-=over 4
-
-=item METHODS
-
-sockaddr (), sockport (), sockhost (), peeraddr (), peerport (), peerhost
-()
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::Socket::UNIX - Object interface for AF_UNIX domain sockets
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [ARGS] )
-
-=item METHODS
-
-hostpath(), peerpath()
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::Uncompress::AnyInflate - Uncompress zlib-based (zip, gzip)
-file/buffer
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-RFC 1950, RFC 1951 (optionally), gzip (RFC 1952), zip
-
-=item Functional Interface
-
-=over 4
-
-=item anyinflate $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeOut => 0|1 >>, C<< Append => 0|1 >>,
-C<< MultiStream => 0|1 >>, C<< TrailingData => $scalar >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< MultiStream => 0|1 >>, C<< Prime => $string
->>, C<< Transparent => 0|1 >>, C<< BlockSize => $num >>, C<< InputLength =>
-$size >>, C<< Append => 0|1 >>, C<< Strict => 0|1 >>, C<< RawInflate => 0|1
->>, C<< ParseExtra => 0|1 >> If the gzip FEXTRA header field is present and
-this option is set, it will force the module to check that it conforms to
-the sub-field structure as defined in RFC 1952
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item read
-
-=item read
-
-=item getline
-
-=item getc
-
-=item ungetc
-
-=item inflateSync
-
-=item getHeaderInfo
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item nextStream
-
-=item trailingData
-
-=back
-
-=item Importing
-
-:all
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2 or lzop
-file/buffer
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-RFC 1950, RFC 1951 (optionally), gzip (RFC 1952), zip, bzip2, lzop, lzf
-
-=item Functional Interface
-
-=over 4
-
-=item anyuncompress $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeOut => 0|1 >>, C<< Append => 0|1 >>,
-C<< MultiStream => 0|1 >>, C<< TrailingData => $scalar >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< MultiStream => 0|1 >>, C<< Prime => $string
->>, C<< Transparent => 0|1 >>, C<< BlockSize => $num >>, C<< InputLength =>
-$size >>, C<< Append => 0|1 >>, C<< Strict => 0|1 >>, C<< RawInflate => 0|1
->>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item read
-
-=item read
-
-=item getline
-
-=item getc
-
-=item ungetc
-
-=item getHeaderInfo
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item nextStream
-
-=item trailingData
-
-=back
-
-=item Importing
-
-:all
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO::Uncompress::Base - Base Class for IO::Uncompress modules
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO::Uncompress::Gunzip - Read RFC 1952 files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item gunzip $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeOut => 0|1 >>, C<< Append => 0|1 >>,
-C<< MultiStream => 0|1 >>, C<< TrailingData => $scalar >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< MultiStream => 0|1 >>, C<< Prime => $string
->>, C<< Transparent => 0|1 >>, C<< BlockSize => $num >>, C<< InputLength =>
-$size >>, C<< Append => 0|1 >>, C<< Strict => 0|1 >>, C<< ParseExtra => 0|1
->> If the gzip FEXTRA header field is present and this option is set, it
-will force the module to check that it conforms to the sub-field structure
-as defined in RFC 1952
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item read
-
-=item read
-
-=item getline
-
-=item getc
-
-=item ungetc
-
-=item inflateSync
-
-=item getHeaderInfo
-
-Name, Comment
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item nextStream
-
-=item trailingData
-
-=back
-
-=item Importing
-
-:all
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO::Uncompress::Inflate - Read RFC 1950 files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item inflate $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeOut => 0|1 >>, C<< Append => 0|1 >>,
-C<< MultiStream => 0|1 >>, C<< TrailingData => $scalar >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< MultiStream => 0|1 >>, C<< Prime => $string
->>, C<< Transparent => 0|1 >>, C<< BlockSize => $num >>, C<< InputLength =>
-$size >>, C<< Append => 0|1 >>, C<< Strict => 0|1 >>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item read
-
-=item read
-
-=item getline
-
-=item getc
-
-=item ungetc
-
-=item inflateSync
-
-=item getHeaderInfo
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item nextStream
-
-=item trailingData
-
-=back
-
-=item Importing
-
-:all
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO::Uncompress::RawInflate - Read RFC 1951 files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item rawinflate $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeOut => 0|1 >>, C<< Append => 0|1 >>,
-C<< MultiStream => 0|1 >>, C<< TrailingData => $scalar >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< MultiStream => 0|1 >>, C<< Prime => $string
->>, C<< Transparent => 0|1 >>, C<< BlockSize => $num >>, C<< InputLength =>
-$size >>, C<< Append => 0|1 >>, C<< Strict => 0|1 >>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item read
-
-=item read
-
-=item getline
-
-=item getc
-
-=item ungetc
-
-=item inflateSync
-
-=item getHeaderInfo
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item nextStream
-
-=item trailingData
-
-=back
-
-=item Importing
-
-:all
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO::Uncompress::Unzip - Read zip files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item unzip $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeOut => 0|1 >>, C<< Append => 0|1 >>,
-C<< MultiStream => 0|1 >>, C<< TrailingData => $scalar >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< MultiStream => 0|1 >>, C<< Prime => $string
->>, C<< Transparent => 0|1 >>, C<< BlockSize => $num >>, C<< InputLength =>
-$size >>, C<< Append => 0|1 >>, C<< Strict => 0|1 >>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item read
-
-=item read
-
-=item getline
-
-=item getc
-
-=item ungetc
-
-=item inflateSync
-
-=item getHeaderInfo
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item nextStream
-
-=item trailingData
-
-=back
-
-=item Importing
-
-:all
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO::Zlib - IO:: style interface to L<Compress::Zlib>
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [ARGS] )
-
-=item OBJECT METHODS
-
-open ( FILENAME, MODE ), opened, close, getc, getline, getlines, print (
-ARGS... ), read ( BUF, NBYTES, [OFFSET] ), eof, seek ( OFFSET, WHENCE ),
-tell, setpos ( POS ), getpos ( POS )
-
-=item USING THE EXTERNAL GZIP
-
-=item CLASS METHODS
-
-has_Compress_Zlib, gzip_external, gzip_used, gzip_read_open,
-gzip_write_open
-
-=item DIAGNOSTICS
-
-IO::Zlib::getlines: must be called in list context,
-IO::Zlib::gzopen_external: mode '...' is illegal, IO::Zlib::import: '...'
-is illegal, IO::Zlib::import: ':gzip_external' requires an argument,
-IO::Zlib::import: 'gzip_read_open' requires an argument, IO::Zlib::import:
-'gzip_read' '...' is illegal, IO::Zlib::import: 'gzip_write_open' requires
-an argument, IO::Zlib::import: 'gzip_write_open' '...' is illegal,
-IO::Zlib::import: no Compress::Zlib and no external gzip, IO::Zlib::open:
-needs a filename, IO::Zlib::READ: NBYTES must be specified,
-IO::Zlib::WRITE: too long LENGTH, IO::Zlib::WRITE: OFFSET is not supported
-
-=item SEE ALSO
-
-=item HISTORY
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::lib::IO::Dir, IO::Dir - supply object methods for directory
-handles
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-new ( [ DIRNAME ] ), open ( DIRNAME ), read (), seek ( POS ), tell (),
-rewind (), close (), tie %hash, 'IO::Dir', DIRNAME [, OPTIONS ]
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::lib::IO::File, IO::File - supply object methods for filehandles
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( FILENAME [,MODE [,PERMS]] ), new_tmpfile
-
-=item METHODS
-
-open( FILENAME [,MODE [,PERMS]] ), open( FILENAME, IOLAYERS ), binmode(
-[LAYER] )
-
-=item NOTE
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 IO::lib::IO::Handle, IO::Handle - supply object methods for I/O
-handles
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new (), new_from_fd ( FD, MODE )
-
-=item METHODS
-
-$io->fdopen ( FD, MODE ), $io->opened, $io->getline, $io->getlines,
-$io->ungetc ( ORD ), $io->write ( BUF, LEN [, OFFSET ] ), $io->error,
-$io->clearerr, $io->sync, $io->flush, $io->printflush ( ARGS ),
-$io->blocking ( [ BOOL ] ), $io->untaint
-
-=item NOTE
-
-=item SEE ALSO
-
-=item BUGS
-
-=item HISTORY
-
-=back
-
-=head2 IO::lib::IO::Pipe, IO::Pipe - supply object methods for pipes
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [READER, WRITER] )
-
-=item METHODS
-
-reader ([ARGS]), writer ([ARGS]), handles ()
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::lib::IO::Poll, IO::Poll - Object interface to system poll call
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-mask ( IO [, EVENT_MASK ] ), poll ( [ TIMEOUT ] ), events ( IO ), remove (
-IO ), handles( [ EVENT_MASK ] )
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::lib::IO::Seekable, IO::Seekable - supply seek based methods for
-I/O objects
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-$io->getpos, $io->setpos, $io->seek ( POS, WHENCE ), WHENCE=0 (SEEK_SET),
-WHENCE=1 (SEEK_CUR), WHENCE=2 (SEEK_END), $io->sysseek( POS, WHENCE ),
-$io->tell
-
-=item SEE ALSO
-
-=item HISTORY
-
-=back
-
-=head2 IO::lib::IO::Select, IO::Select - OO interface to the select system
-call
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [ HANDLES ] )
-
-=item METHODS
-
-add ( HANDLES ), remove ( HANDLES ), exists ( HANDLE ), handles, can_read (
-[ TIMEOUT ] ), can_write ( [ TIMEOUT ] ), has_exception ( [ TIMEOUT ] ),
-count (), bits(), select ( READ, WRITE, EXCEPTION [, TIMEOUT ] )
-
-=item EXAMPLE
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::lib::IO::Socket, IO::Socket - Object interface to socket
-communications
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [ARGS] )
-
-=item METHODS
-
-accept([PKG]), socketpair(DOMAIN, TYPE, PROTOCOL), atmark, connected,
-protocol, sockdomain, sockopt(OPT [, VAL]), socktype, timeout([VAL])
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::lib::IO::Socket::INET, IO::Socket::INET - Object interface for
-AF_INET domain sockets
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [ARGS] )
-
-=over 4
-
-=item METHODS
-
-sockaddr (), sockport (), sockhost (), peeraddr (), peerport (), peerhost
-()
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO::lib::IO::Socket::UNIX, IO::Socket::UNIX - Object interface for
-AF_UNIX domain sockets
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [ARGS] )
-
-=item METHODS
-
-hostpath(), peerpath()
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IO_Compress_Base::lib::File::GlobMapper, File::GlobMapper - Extend
-File Glob to Allow Input and Output Files
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-This code is a work in progress, There are known bugs, The interface
-defined here is tentative, There are portability issues, Do not use in
-production code, Consider yourself warned!
-
-=over 4
-
-=item Behind The Scenes
-
-=item Limitations
-
-=item Input File Glob
-
-B<~>, B<~user>, B<.>, B<*>, B<?>, B<\>, B<[]>, B<{,}>, B<()>
-
-=item Output File Glob
-
-"*", #1
-
-=item Returned Data
-
-=back
-
-=item EXAMPLES
-
-=over 4
-
-=item A Rename script
-
-=item A few example globmaps
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO_Compress_Base::lib::IO::Compress::Base, IO::Compress::Base - Base
-Class for IO::Compress modules
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO_Compress_Base::lib::IO::Uncompress::AnyUncompress,
-IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2 or lzop
-file/buffer
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-RFC 1950, RFC 1951 (optionally), gzip (RFC 1952), zip, bzip2, lzop, lzf
-
-=item Functional Interface
-
-=over 4
-
-=item anyuncompress $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeOut => 0|1 >>, C<< Append => 0|1 >>,
-C<< MultiStream => 0|1 >>, C<< TrailingData => $scalar >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< MultiStream => 0|1 >>, C<< Prime => $string
->>, C<< Transparent => 0|1 >>, C<< BlockSize => $num >>, C<< InputLength =>
-$size >>, C<< Append => 0|1 >>, C<< Strict => 0|1 >>, C<< RawInflate => 0|1
->>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item read
-
-=item read
-
-=item getline
-
-=item getc
-
-=item ungetc
-
-=item getHeaderInfo
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item nextStream
-
-=item trailingData
-
-=back
-
-=item Importing
-
-:all
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO_Compress_Base::lib::IO::Uncompress::Base, IO::Uncompress::Base -
-Base Class for IO::Uncompress modules
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO_Compress_Zlib::IO::Compress::Deflate, IO::Compress::Deflate -
-Write RFC 1950 files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item deflate $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeIn => 0|1 >>, C<< Append => 0|1 >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< Append => 0|1 >>, A Buffer, A Filename, A
-Filehandle, C<< Merge => 0|1 >>, -Level, -Strategy, C<< Strict => 0|1 >>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item print
-
-=item printf
-
-=item syswrite
-
-=item write
-
-=item flush
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item newStream([OPTS])
-
-=item deflateParams
-
-=back
-
-=item Importing
-
-:all, :constants, :flush, :level, :strategy
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO_Compress_Zlib::IO::Compress::Gzip, IO::Compress::Gzip - Write RFC
-1952 files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item gzip $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeIn => 0|1 >>, C<< Append => 0|1 >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< Append => 0|1 >>, A Buffer, A Filename, A
-Filehandle, C<< Merge => 0|1 >>, -Level, -Strategy, C<< Minimal => 0|1 >>,
-C<< Comment => $comment >>, C<< Name => $string >>, C<< Time => $number >>,
-C<< TextFlag => 0|1 >>, C<< HeaderCRC => 0|1 >>, C<< OS_Code => $value >>,
-C<< ExtraField => $data >>, C<< ExtraFlags => $value >>, C<< Strict => 0|1
->>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item print
-
-=item printf
-
-=item syswrite
-
-=item write
-
-=item flush
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item newStream([OPTS])
-
-=item deflateParams
-
-=back
-
-=item Importing
-
-:all, :constants, :flush, :level, :strategy
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO_Compress_Zlib::IO::Compress::RawDeflate, IO::Compress::RawDeflate
-- Write RFC 1951 files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item rawdeflate $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeIn => 0|1 >>, C<< Append => 0|1 >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< Append => 0|1 >>, A Buffer, A Filename, A
-Filehandle, C<< Merge => 0|1 >>, -Level, -Strategy, C<< Strict => 0|1 >>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item print
-
-=item printf
-
-=item syswrite
-
-=item write
-
-=item flush
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item newStream([OPTS])
-
-=item deflateParams
-
-=back
-
-=item Importing
-
-:all, :constants, :flush, :level, :strategy
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO_Compress_Zlib::IO::Compress::Zip, IO::Compress::Zip - Write zip
-files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item zip $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeIn => 0|1 >>, C<< Append => 0|1 >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< Append => 0|1 >>, A Buffer, A Filename, A
-Filehandle, C<< Name => $string >>, C<< Time => $number >>, C<< ExtAttr =>
-$attr >>, C<< exTime => [$atime, $mtime, $ctime] >>, C<< Comment =>
-$comment >>, C<< ZipComment => $comment >>, C<< Method => $method >>, C<<
-Stream => 0|1 >>, C<< Zip64 => 0|1 >>, C<< TextFlag => 0|1 >>, C<<
-ExtraFieldLocal => $data >> =item C<< ExtraFieldCentral => $data >>, C<<
-Minimal => 1|0 >>, C<< BlockSize100K => number >>, C<< WorkFactor => number
->>, -Level, -Strategy, C<< Strict => 0|1 >>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item print
-
-=item printf
-
-=item syswrite
-
-=item write
-
-=item flush
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item newStream([OPTS])
-
-=item deflateParams
-
-=back
-
-=item Importing
-
-:all, :constants, :flush, :level, :strategy, :zip_method
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO_Compress_Zlib::IO::Uncompress::AnyInflate,
-IO::Uncompress::AnyInflate - Uncompress zlib-based (zip, gzip) file/buffer
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-RFC 1950, RFC 1951 (optionally), gzip (RFC 1952), zip
-
-=item Functional Interface
-
-=over 4
-
-=item anyinflate $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeOut => 0|1 >>, C<< Append => 0|1 >>,
-C<< MultiStream => 0|1 >>, C<< TrailingData => $scalar >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< MultiStream => 0|1 >>, C<< Prime => $string
->>, C<< Transparent => 0|1 >>, C<< BlockSize => $num >>, C<< InputLength =>
-$size >>, C<< Append => 0|1 >>, C<< Strict => 0|1 >>, C<< RawInflate => 0|1
->>, C<< ParseExtra => 0|1 >> If the gzip FEXTRA header field is present and
-this option is set, it will force the module to check that it conforms to
-the sub-field structure as defined in RFC 1952
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item read
-
-=item read
-
-=item getline
-
-=item getc
-
-=item ungetc
-
-=item inflateSync
-
-=item getHeaderInfo
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item nextStream
-
-=item trailingData
-
-=back
-
-=item Importing
-
-:all
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO_Compress_Zlib::IO::Uncompress::Gunzip, IO::Uncompress::Gunzip -
-Read RFC 1952 files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item gunzip $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeOut => 0|1 >>, C<< Append => 0|1 >>,
-C<< MultiStream => 0|1 >>, C<< TrailingData => $scalar >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< MultiStream => 0|1 >>, C<< Prime => $string
->>, C<< Transparent => 0|1 >>, C<< BlockSize => $num >>, C<< InputLength =>
-$size >>, C<< Append => 0|1 >>, C<< Strict => 0|1 >>, C<< ParseExtra => 0|1
->> If the gzip FEXTRA header field is present and this option is set, it
-will force the module to check that it conforms to the sub-field structure
-as defined in RFC 1952
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item read
-
-=item read
-
-=item getline
-
-=item getc
-
-=item ungetc
-
-=item inflateSync
-
-=item getHeaderInfo
-
-Name, Comment
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item nextStream
-
-=item trailingData
-
-=back
-
-=item Importing
-
-:all
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO_Compress_Zlib::IO::Uncompress::Inflate, IO::Uncompress::Inflate -
-Read RFC 1950 files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item inflate $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeOut => 0|1 >>, C<< Append => 0|1 >>,
-C<< MultiStream => 0|1 >>, C<< TrailingData => $scalar >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< MultiStream => 0|1 >>, C<< Prime => $string
->>, C<< Transparent => 0|1 >>, C<< BlockSize => $num >>, C<< InputLength =>
-$size >>, C<< Append => 0|1 >>, C<< Strict => 0|1 >>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item read
-
-=item read
-
-=item getline
-
-=item getc
-
-=item ungetc
-
-=item inflateSync
-
-=item getHeaderInfo
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item nextStream
-
-=item trailingData
-
-=back
-
-=item Importing
-
-:all
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO_Compress_Zlib::IO::Uncompress::RawInflate,
-IO::Uncompress::RawInflate - Read RFC 1951 files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item rawinflate $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeOut => 0|1 >>, C<< Append => 0|1 >>,
-C<< MultiStream => 0|1 >>, C<< TrailingData => $scalar >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< MultiStream => 0|1 >>, C<< Prime => $string
->>, C<< Transparent => 0|1 >>, C<< BlockSize => $num >>, C<< InputLength =>
-$size >>, C<< Append => 0|1 >>, C<< Strict => 0|1 >>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item read
-
-=item read
-
-=item getline
-
-=item getc
-
-=item ungetc
-
-=item inflateSync
-
-=item getHeaderInfo
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item nextStream
-
-=item trailingData
-
-=back
-
-=item Importing
-
-:all
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IO_Compress_Zlib::IO::Uncompress::Unzip, IO::Uncompress::Unzip -
-Read zip files/buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Functional Interface
-
-=over 4
-
-=item unzip $input => $output [, OPTS]
-
-A filename, A filehandle, A scalar reference, An array reference, An Input
-FileGlob string, A filename, A filehandle, A scalar reference, An Array
-Reference, An Output FileGlob
-
-=item Notes
-
-=item Optional Parameters
-
-C<< AutoClose => 0|1 >>, C<< BinModeOut => 0|1 >>, C<< Append => 0|1 >>,
-C<< MultiStream => 0|1 >>, C<< TrailingData => $scalar >>
-
-=item Examples
-
-=back
-
-=item OO Interface
-
-=over 4
-
-=item Constructor
-
-A filename, A filehandle, A scalar reference
-
-=item Constructor Options
-
-C<< AutoClose => 0|1 >>, C<< MultiStream => 0|1 >>, C<< Prime => $string
->>, C<< Transparent => 0|1 >>, C<< BlockSize => $num >>, C<< InputLength =>
-$size >>, C<< Append => 0|1 >>, C<< Strict => 0|1 >>
-
-=item Examples
-
-=back
-
-=item Methods
-
-=over 4
-
-=item read
-
-=item read
-
-=item getline
-
-=item getc
-
-=item ungetc
-
-=item inflateSync
-
-=item getHeaderInfo
-
-=item tell
-
-=item eof
-
-=item seek
-
-=item binmode
-
-=item opened
-
-=item autoflush
-
-=item input_line_number
-
-=item fileno
-
-=item close
-
-=item nextStream
-
-=item trailingData
-
-=back
-
-=item Importing
-
-:all
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item MODIFICATION HISTORY
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 IPC::Msg - SysV Msg IPC object class
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-new ( KEY , FLAGS ), id, rcv ( BUF, LEN [, TYPE [, FLAGS ]] ), remove, set
-( STAT ), set ( NAME => VALUE [, NAME => VALUE ...] ), snd ( TYPE, MSG [,
-FLAGS ] ), stat
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IPC::Open2, open2 - open a process for both reading and writing
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item WARNING
-
-=item SEE ALSO
-
-=back
-
-=head2 IPC::Open3, open3 - open a process for reading, writing, and error
-handling
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item See Also
-
-L<IPC::Open2>, L<IPC::Run>
-
-=item WARNING
-
-=back
-
-=head2 IPC::Semaphore - SysV Semaphore IPC object class
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-new ( KEY , NSEMS , FLAGS ), getall, getncnt ( SEM ), getpid ( SEM ),
-getval ( SEM ), getzcnt ( SEM ), id, op ( OPLIST ), remove, set ( STAT ),
-set ( NAME => VALUE [, NAME => VALUE ...] ), setall ( VALUES ), setval ( N
-, VALUE ), stat
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IPC::SysV - SysV IPC constants
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-ftok( PATH, ID )
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=back
-
-=head2 IPC::SysV::Msg, IPC::Msg - SysV Msg IPC object class
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-new ( KEY , FLAGS ), id, rcv ( BUF, LEN [, TYPE [, FLAGS ]] ), remove, set
-( STAT ), set ( NAME => VALUE [, NAME => VALUE ...] ), snd ( TYPE, MSG [,
-FLAGS ] ), stat
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IPC::SysV::Semaphore, IPC::Semaphore - SysV Semaphore IPC object
-class
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-new ( KEY , NSEMS , FLAGS ), getall, getncnt ( SEM ), getpid ( SEM ),
-getval ( SEM ), getzcnt ( SEM ), id, op ( OPLIST ), remove, set ( STAT ),
-set ( NAME => VALUE [, NAME => VALUE ...] ), setall ( VALUES ), setval ( N
-, VALUE ), stat
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 IPCmd, IPC::Cmd - finding and running system commands made easy
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CLASS METHODS
-
-=over 4
-
-=item $bool = IPC::Cmd->can_use_ipc_run( [VERBOSE] )
-
-=back
-
-=back
-
-=over 4
-
-=item $bool = IPC::Cmd->can_use_ipc_open3( [VERBOSE] )
-
-=back
-
-=over 4
-
-=item $bool = IPC::Cmd->can_capture_buffer
-
-=back
-
-=over 4
-
-=item FUNCTIONS
-
-=over 4
-
-=item $path = can_run( PROGRAM );
-
-=back
-
-=back
-
-=over 4
-
-=item $ok | ($ok, $err, $full_buf, $stdout_buff, $stderr_buff) = run(
-command => COMMAND, [verbose => BOOL, buffer => \$SCALAR] );
-
-command, verbose, buffer, success, errorcode, full_buffer, out_buffer,
-error_buffer
-
-=back
-
-=over 4
-
-=item HOW IT WORKS
-
-=item Global Variables
-
-=over 4
-
-=item $IPC::Cmd::VERBOSE
-
-=item $IPC::Cmd::USE_IPC_RUN
-
-=item $IPC::Cmd::USE_IPC_OPEN3
-
-=item $IPC::Cmd::WARN
-
-=back
-
-=item Caveats
-
-Whitespace, IO Redirect
-
-=item See Also
-
-=item ACKNOWLEDGEMENTS
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 List::Util - A selection of general-utility list subroutines
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-first BLOCK LIST, max LIST, maxstr LIST, min LIST, minstr LIST, reduce
-BLOCK LIST, shuffle LIST, sum LIST
-
-=item KNOWN BUGS
-
-=item SUGGESTED ADDITIONS
-
-=item SEE ALSO
-
-=item COPYRIGHT
-
-=back
-
-=head2 List::Utilib::List::Util, List::Util - A selection of
-general-utility list subroutines
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-first BLOCK LIST, max LIST, maxstr LIST, min LIST, minstr LIST, reduce
-BLOCK LIST, shuffle LIST, sum LIST
-
-=item KNOWN BUGS
-
-=item SUGGESTED ADDITIONS
-
-=item SEE ALSO
-
-=item COPYRIGHT
-
-=back
-
-=head2 List::Utilib::Scalar::Util, Scalar::Util - A selection of
-general-utility scalar subroutines
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-blessed EXPR, dualvar NUM, STRING, isvstring EXPR, isweak EXPR,
-looks_like_number EXPR, openhandle FH, refaddr EXPR, reftype EXPR,
-set_prototype CODEREF, PROTOTYPE, tainted EXPR, weaken REF
-
-=item KNOWN BUGS
-
-=item SEE ALSO
-
-=item COPYRIGHT
-
-=item BLATANT PLUG
-
-=back
-
-=head2 Locale::Constants - constants for Locale codes
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item KNOWN BUGS AND LIMITATIONS
-
-=item SEE ALSO
-
-Locale::Language, Locale::Country, Locale::Script, Locale::Currency
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Locale::Country - ISO codes for country identification (ISO 3166)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-B<alpha-2>, B<alpha-3>, B<numeric>
-
-=item CONVERSION ROUTINES
-
-code2country( CODE, [ CODESET ] ), country2code( STRING, [ CODESET ] ),
-country_code2code( CODE, CODESET, CODESET )
-
-=item QUERY ROUTINES
-
-C<all_country_codes( [ CODESET ] )>, C<all_country_names( [ CODESET ] )>
-
-=item SEMI-PRIVATE ROUTINES
-
-=over 4
-
-=item alias_code
-
-=item rename_country
-
-=back
-
-=item EXAMPLES
-
-=item DOMAIN NAMES
-
-=item KNOWN BUGS AND LIMITATIONS
-
-=item SEE ALSO
-
-Locale::Language, Locale::Script, Locale::Currency, Locale::SubCountry, ISO
-3166-1, http://www.iso.org/iso/en/prods-services/iso3166ma/index.html,
-http://www.egt.ie/standards/iso3166/iso3166-1-en.html,
-http://www.cia.gov/cia/publications/factbook/docs/app-d-1.html
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Locale::Currency - ISO three letter codes for currency
-identification (ISO 4217)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-XTS, XXX
-
-=item CONVERSION ROUTINES
-
-code2currency(), currency2code()
-
-=item QUERY ROUTINES
-
-C<all_currency_codes()>, C<all_currency_names()>
-
-=item EXAMPLES
-
-=item KNOWN BUGS AND LIMITATIONS
-
-=item SEE ALSO
-
-Locale::Country, Locale::Script, ISO 4217:1995,
-http://www.bsi-global.com/iso4217currency
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Locale::Language - ISO two letter codes for language identification
-(ISO 639)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONVERSION ROUTINES
-
-code2language(), language2code()
-
-=item QUERY ROUTINES
-
-C<all_language_codes()>, C<all_language_names()>
-
-=item EXAMPLES
-
-=item KNOWN BUGS AND LIMITATIONS
-
-=item SEE ALSO
-
-Locale::Country, Locale::Script, Locale::Currency, ISO 639:1988 (E/F),
-http://lcweb.loc.gov/standards/iso639-2/langhome.html
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Locale::Maketext - framework for localization
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item QUICK OVERVIEW
-
-=item METHODS
-
-=over 4
-
-=item Construction Methods
-
-=item The "maketext" Method
-
-$lh->fail_with I<or> $lh->fail_with(I<PARAM>), $lh->failure_handler_auto
-
-=item Utility Methods
-
-$language->quant($number, $singular), $language->quant($number, $singular,
-$plural), $language->quant($number, $singular, $plural, $negative),
-$language->numf($number), $language->sprintf($format, @items),
-$language->language_tag(), $language->encoding()
-
-=item Language Handle Attributes and Internals
-
-=back
-
-=item LANGUAGE CLASS HIERARCHIES
-
-=item ENTRIES IN EACH LEXICON
-
-=item BRACKET NOTATION
-
-=item AUTO LEXICONS
-
-=item CONTROLLING LOOKUP FAILURE
-
-=item HOW TO USE MAKETEXT
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMER
-
-=item AUTHOR
-
-=back
-
-=head2 Locale::Maketext::Simple - Simple interface to
-Locale::Maketext::Lexicon
-
-=over 4
-
-=item VERSION
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OPTIONS
-
-=over 4
-
-=item Class
-
-=item Path
-
-=item Style
-
-=item Export
-
-=item Subclass
-
-=item Decode
-
-=item Encoding
-
-=back
-
-=back
-
-=over 4
-
-=item ACKNOWLEDGMENTS
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=over 4
-
-=item The "MIT" License
-
-=back
-
-=back
-
-=head2 Locale::Maketext::TPJ13 -- article about software localization
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Localization and Perl: gettext breaks, Maketext fixes
-
-=over 4
-
-=item A Localization Horror Story: It Could Happen To You
-
-=item The Linguistic View
-
-=item Breaking gettext
-
-=item Replacing gettext
-
-=item Buzzwords: Abstraction and Encapsulation
-
-=item Buzzword: Isomorphism
-
-=item Buzzword: Inheritance
-
-=item Buzzword: Concision
-
-=item The Devil in the Details
-
-=item The Proof in the Pudding: Localizing Web Sites
-
-=item References
-
-=back
-
-=back
-
-=head2 Locale::Script - ISO codes for script identification (ISO 15924)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-B<alpha-2>, B<alpha-3>, B<numeric>
-
-=over 4
-
-=item SPECIAL CODES
-
-=back
-
-=item CONVERSION ROUTINES
-
-code2script( CODE, [ CODESET ] ), script2code( STRING, [ CODESET ] ),
-script_code2code( CODE, CODESET, CODESET )
-
-=item QUERY ROUTINES
-
-C<all_script_codes ( [ CODESET ] )>, C<all_script_names ( [ CODESET ] )>
-
-=item EXAMPLES
-
-=item KNOWN BUGS AND LIMITATIONS
-
-=item SEE ALSO
-
-Locale::Language, Locale::Currency, Locale::Country, ISO 15924,
-http://www.evertype.com/standards/iso15924/
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Log::Message - A generic message storing mechanism;
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Hierarchy
-
-Log::Message, Log::Message::Item, Log::Message::Handlers,
-Log::Message::Config
-
-=item Options
-
-config, private, verbose, tag, level, remove, chrono
-
-=back
-
-=over 4
-
-=item Methods
-
-=over 4
-
-=item new
-
-=back
-
-=back
-
-=over 4
-
-=item store
-
-message, tag, level, extra
-
-=back
-
-=over 4
-
-=item retrieve
-
-tag, level, message, amount, chrono, remove
-
-=back
-
-=over 4
-
-=item first
-
-=back
-
-=over 4
-
-=item last
-
-=back
-
-=over 4
-
-=item flush
-
-=back
-
-=over 4
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item Acknowledgements
-
-=item COPYRIGHT
-
-=back
-
-=head2 Log::Message::Config - Configuration options for Log::Message
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item Acknowledgements
-
-=item COPYRIGHT
-
-=back
-
-=head2 Log::Message::Handlers - Message handlers for Log::Message
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Default Handlers
-
-=over 4
-
-=item log
-
-=back
-
-=back
-
-=over 4
-
-=item carp
-
-=back
-
-=over 4
-
-=item croak
-
-=back
-
-=over 4
-
-=item cluck
-
-=back
-
-=over 4
-
-=item confess
-
-=back
-
-=over 4
-
-=item die
-
-=back
-
-=over 4
-
-=item warn
-
-=back
-
-=over 4
-
-=item trace
-
-=back
-
-=over 4
-
-=item Custom Handlers
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item Acknowledgements
-
-=item COPYRIGHT
-
-=back
-
-=head2 Log::Message::Item - Message objects for Log::Message
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Methods and Accessors
-
-=over 4
-
-=item remove
-
-=item id
-
-=item when
-
-=item message
-
-=item level
-
-=item tag
-
-=item shortmess
-
-=item longmess
-
-=item parent
-
-=back
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item Acknowledgements
-
-=item COPYRIGHT
-
-=back
-
-=head2 Log::Message::Simple
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS
-
-=over 4
-
-=item msg("message string" [,VERBOSE])
-
-=item debug("message string" [,VERBOSE])
-
-=item error("error string" [,VERBOSE])
-
-=back
-
-=back
-
-=over 4
-
-=item carp();
-
-=item croak();
-
-=item confess();
-
-=item cluck();
-
-=back
-
-=over 4
-
-=item CLASS METHODS
-
-=over 4
-
-=item Log::Message::Simple->stack()
-
-=item Log::Message::Simple->stack_as_string([TRACE])
-
-=item Log::Message::Simple->flush()
-
-=back
-
-=back
-
-=over 4
-
-=item GLOBAL VARIABLES
-
-$ERROR_FH, $MSG_FH, $DEBUG_FH, $STACKTRACE_ON_ERROR
-
-=back
-
-=head2 MIME::Base64 - Encoding and decoding of base64 strings
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-encode_base64($str), encode_base64($str, $eol);, decode_base64($str)
-
-=item DIAGNOSTICS
-
-Premature end of base64 data, Premature padding of base64 data, Wide
-character in subroutine entry
-
-=item EXAMPLES
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 MIME::Base64::QuotedPrint, MIME::QuotedPrint - Encoding and decoding
-of quoted-printable strings
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-encode_qp($str), encode_qp($str, $eol), encode_qp($str, $eol, $binmode),
-decode_qp($str);
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 MIME::QuotedPrint - Encoding and decoding of quoted-printable
-strings
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-encode_qp($str), encode_qp($str, $eol), encode_qp($str, $eol, $binmode),
-decode_qp($str);
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 Math::BigFloat - Arbitrary size floating point math package
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Canonical notation
-
-=item Output
-
-=item C<mantissa()>, C<exponent()> and C<parts()>
-
-=item Accuracy vs. Precision
-
-=item Rounding
-
-ffround ( +$scale ), ffround ( -$scale ), ffround ( 0 ), fround ( +$scale
-), fround ( -$scale ) and fround ( 0 )
-
-=back
-
-=item METHODS
-
-=over 4
-
-=item accuracy
-
-=item precision()
-
-=item bexp()
-
-=item bnok()
-
-=item bpi()
-
-=item bcos()
-
-=item bsin()
-
-=item batan2()
-
-=item batan()
-
-=item bmuladd()
-
-=back
-
-=item Autocreating constants
-
-=over 4
-
-=item Math library
-
-=item Using Math::BigInt::Lite
-
-=back
-
-=item EXPORTS
-
-=item BUGS
-
-=item CAVEATS
-
-stringify, bstr(), bdiv, brsft, Modifying and =, bpow, precision() vs.
-accuracy()
-
-=item SEE ALSO
-
-=item LICENSE
-
-=item AUTHORS
-
-=back
-
-=head2 Math::BigInt - Arbitrary size integer/float math package
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-Input, Output
-
-=item METHODS
-
-=over 4
-
-=item config()
-
-=item accuracy()
-
-=item precision()
-
-=item brsft()
-
-=item new()
-
-=item from_oct()
-
-=item from_hex()
-
-=item from_bin()
-
-=item bnan()
-
-=item bzero()
-
-=item binf()
-
-=item bone()
-
-=item is_one()/is_zero()/is_nan()/is_inf()
-
-=item is_pos()/is_neg()/is_positive()/is_negative()
-
- $x->is_pos(); # true if > 0
- $x->is_neg(); # true if < 0
-
-=item is_odd()/is_even()/is_int()
-
-=item bcmp()
-
-=item bacmp()
-
-=item sign()
-
-=item digit()
-
-=item bneg()
-
-=item babs()
-
-=item bnorm()
-
-=item bnot()
-
-=item binc()
-
-=item bdec()
-
-=item badd()
-
-=item bsub()
-
-=item bmul()
-
-=item bmuladd()
-
-=item bdiv()
-
-=item bmod()
-
-=item bmodinv()
-
-=item bmodpow()
-
-=item bpow()
-
-=item blog()
-
-=item bexp()
-
-=item bnok()
-
-=item bpi()
-
-=item bcos()
-
-=item bsin()
-
-=item batan2()
-
-=item batan()
-
-=item blsft()
-
-=item brsft()
-
-=item band()
-
-=item bior()
-
-=item bxor()
-
-=item bnot()
-
-=item bsqrt()
-
-=item broot()
-
-=item bfac()
-
-=item round()
-
-=item bround()
-
-=item bfround()
-
-=item bfloor()
-
-=item bceil()
-
-=item bgcd()
-
-=item blcm()
-
-=item exponent()
-
-=item mantissa()
-
-=item parts()
-
-=item copy()
-
-=item as_int()/as_number()
-
-=item bsstr()
-
-=item as_hex()
-
-=item as_bin()
-
-=item as_oct()
-
-=item numify()
-
-=item modify()
-
-=item upgrade()/downgrade()
-
-=item div_scale()
-
-=item round_mode()
-
-=back
-
-=item ACCURACY and PRECISION
-
-=over 4
-
-=item Precision P
-
-=item Accuracy A
-
-=item Fallback F
-
-=item Rounding mode R
-
-'trunc', 'even', 'odd', '+inf', '-inf', 'zero', 'common', Precision,
-Accuracy (significant digits), Setting/Accessing, Creating numbers, Usage,
-Precedence, Overriding globals, Local settings, Rounding, Default values,
-Remarks
-
-=back
-
-=item Infinity and Not a Number
-
-oct()/hex(), log(-inf), exp(), cos(), sin(), atan2()
-
-=item INTERNALS
-
-=over 4
-
-=item MATH LIBRARY
-
-=item SIGN
-
-=item mantissa(), exponent() and parts()
-
-=back
-
-=item EXAMPLES
-
- use Math::BigInt;
-
-=item Autocreating constants
-
-=item PERFORMANCE
-
-=over 4
-
-=item Alternative math libraries
-
-=item SUBCLASSING
-
-=back
-
-=item Subclassing Math::BigInt
-
-=item UPGRADING
-
-=over 4
-
-=item Auto-upgrade
-
-bsqrt(), div(), blog(), bexp()
-
-=back
-
-=item EXPORTS
-
-=item CAVEATS
-
-bstr(), bsstr() and 'cmp', int(), length, bdiv, infinity handling,
-Modifying and =, bpow, Overloading -$x, Mixing different object types,
-bsqrt(), brsft()
-
-=item LICENSE
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=back
-
-=head2 Math::BigInt::Calc - Pure Perl module to support Math::BigInt
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item STORAGE
-
-=item METHODS
-
-=item WRAP YOUR OWN
-
-=item LICENSE
-
-This program is free software; you may redistribute it and/or modify it
-under
-the same terms as Perl itself.
-
-=item AUTHORS
-
-=item SEE ALSO
-
-=back
-
-=head2 Math::BigInt::CalcEmu - Emulate low-level math with BigInt code
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=over 4
-
-=item __emu_bxor
-
-=item __emu_band
-
-=item __emu_bior
-
-=back
-
-=item LICENSE
-
-This program is free software; you may redistribute it and/or modify it
-under
-the same terms as Perl itself.
-
-=item AUTHORS
-
-=item SEE ALSO
-
-=back
-
-=head2 Math::BigInt::FastCalc - Math::BigInt::Calc with some XS for more
-speed
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item STORAGE
-
-=item METHODS
-
-=item LICENSE
-
-This program is free software; you may redistribute it and/or modify it
-under
-the same terms as Perl itself.
-
-=item AUTHORS
-
-=item SEE ALSO
-
-=back
-
-=head2 Math::BigRat - Arbitrary big rational numbers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item MATH LIBRARY
-
-=back
-
-=item METHODS
-
-=over 4
-
-=item new()
-
-=item numerator()
-
-=item denominator()
-
- $d = $x->denominator();
-
-=item parts()
-
-=item numify()
-
-=item as_int()/as_number()
-
-=item as_hex()
-
-=item as_bin()
-
-=item as_oct()
-
-=item from_hex()/from_bin()/from_oct()
-
-=item length()
-
-=item digit()
-
-=item bnorm()
-
-=item bfac()
-
-=item bround()/round()/bfround()
-
-=item bmod()
-
-=item bneg()
-
-=item is_one()
-
-=item is_zero()
-
-=item is_pos()/is_positive()
-
-=item is_neg()/is_negative()
-
-=item is_int()
-
-=item is_odd()
-
-=item is_even()
-
-=item bceil()
-
-=item bfloor()
-
- $x->bfloor();
-
-=item bsqrt()
-
- $x->bsqrt();
-
-=item broot()
-
- $x->broot($n);
-
-=item badd()/bmul()/bsub()/bdiv()/bdec()/binc()
-
-=item copy()
-
-=item bstr()/bsstr()
-
-=item bacmp()/bcmp()
-
-=item blsft()/brsft()
-
-=item bpow()
-
-=item bexp()
-
-=item bnok()
-
-=item config()
-
-=back
-
-=item BUGS
-
-inf handling (partial), NaN handling (partial), rounding (not implemented
-except for bceil/bfloor), $x ** $y where $y is not an integer, bmod(),
-blog(), bmodinv() and bmodpow() (partial)
-
-=item LICENSE
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=back
-
-=head2 Math::Complex - complex numbers and associated mathematical
-functions
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OPERATIONS
-
-=item CREATION
-
-=item DISPLAYING
-
-=over 4
-
-=item CHANGED IN PERL 5.6
-
-=back
-
-=item USAGE
-
-=over 4
-
-=item PI
-
-=back
-
-=item ERRORS DUE TO DIVISION BY ZERO OR LOGARITHM OF ZERO
-
-=item ERRORS DUE TO INDIGESTIBLE ARGUMENTS
-
-=item BUGS
-
-=item AUTHORS
-
-=back
-
-=head2 Math::Trig - trigonometric functions
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item TRIGONOMETRIC FUNCTIONS
-
-B<tan>
-
-=over 4
-
-=item ERRORS DUE TO DIVISION BY ZERO
-
-=item SIMPLE (REAL) ARGUMENTS, COMPLEX RESULTS
-
-=back
-
-=item PLANE ANGLE CONVERSIONS
-
-deg2rad, grad2rad, rad2deg, grad2deg, deg2grad, rad2grad, rad2rad, deg2deg,
-grad2grad
-
-=item RADIAL COORDINATE CONVERSIONS
-
-=over 4
-
-=item COORDINATE SYSTEMS
-
-=item 3-D ANGLE CONVERSIONS
-
-cartesian_to_cylindrical, cartesian_to_spherical, cylindrical_to_cartesian,
-cylindrical_to_spherical, spherical_to_cartesian, spherical_to_cylindrical
-
-=back
-
-=item GREAT CIRCLE DISTANCES AND DIRECTIONS
-
-=over 4
-
-=item great_circle_distance
-
-=item great_circle_direction
-
-=item great_circle_bearing
-
-=item great_circle_destination
-
-=item great_circle_midpoint
-
-=item great_circle_waypoint
-
-=back
-
-=item EXAMPLES
-
-=over 4
-
-=item CAVEAT FOR GREAT CIRCLE FORMULAS
-
-=back
-
-=item BUGS
-
-=item AUTHORS
-
-=back
-
-=head2 Memoize - Make functions faster by trading space for time
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item DETAILS
-
-=item OPTIONS
-
-=over 4
-
-=item INSTALL
-
-=item NORMALIZER
-
-=item C<SCALAR_CACHE>, C<LIST_CACHE>
-
-C<MEMORY>, C<HASH>, C<TIE>, C<FAULT>, C<MERGE>
-
-=back
-
-=item OTHER FACILITIES
-
-=over 4
-
-=item C<unmemoize>
-
-=item C<flush_cache>
-
-=back
-
-=item CAVEATS
-
-=item PERSISTENT CACHE SUPPORT
-
-=item EXPIRATION SUPPORT
-
-=item BUGS
-
-=item MAILING LIST
-
-=item AUTHOR
-
-=item COPYRIGHT AND LICENSE
-
-=item THANK YOU
-
-=back
-
-=head2 Memoize::AnyDBM_File - glue to provide EXISTS for AnyDBM_File for
-Storable use
-
-=over 4
-
-=item DESCRIPTION
-
-=back
-
-=head2 Memoize::Expire - Plug-in module for automatic expiration of
-memoized values
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item INTERFACE
-
- TIEHASH, EXISTS, STORE
-
-=item ALTERNATIVES
-
-=item CAVEATS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Memoize::ExpireFile - test for Memoize expiration semantics
-
-=over 4
-
-=item DESCRIPTION
-
-=back
-
-=head2 Memoize::ExpireTest - test for Memoize expiration semantics
-
-=over 4
-
-=item DESCRIPTION
-
-=back
-
-=head2 Memoize::NDBM_File - glue to provide EXISTS for NDBM_File for
-Storable use
-
-=over 4
-
-=item DESCRIPTION
-
-=back
-
-=head2 Memoize::SDBM_File - glue to provide EXISTS for SDBM_File for
-Storable use
-
-=over 4
-
-=item DESCRIPTION
-
-=back
-
-=head2 Memoize::Storable - store Memoized data in Storable database
-
-=over 4
-
-=item DESCRIPTION
-
-=back
-
-=head2 Module::Build - Build and install Perl modules
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item GUIDE TO DOCUMENTATION
-
-General Usage (L<Module::Build>), Authoring Reference
-(L<Module::Build::Authoring>), API Reference (L<Module::Build::API>),
-Cookbook (L<Module::Build::Cookbook>)
-
-=item ACTIONS
-
-build, clean, code, config_data, diff, dist, distcheck, distclean, distdir,
-distmeta, distsign, disttest, docs, fakeinstall, help, html, install,
-manifest, manpages, pardist, ppd, ppmdist, prereq_report, pure_install,
-realclean, retest, skipcheck, test, testall, testcover, testdb, testpod,
-testpodcoverage, versioninstall
-
-=item OPTIONS
-
-=over 4
-
-=item Command Line Options
-
-quiet, use_rcfile, verbose, allow_mb_mismatch
-
-=item Default Options File (F<.modulebuildrc>)
-
-=back
-
-=item INSTALL PATHS
-
-lib, arch, script, bin, bindoc, libdoc, binhtml, libhtml, installdirs,
-install_path, install_base, destdir, prefix
-
-=item MOTIVATIONS
-
-+, +
-
-=item TO DO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::API - API Reference for Module Authors
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item CONSTRUCTORS
-
-current(), new(), add_to_cleanup, auto_features, autosplit, build_class,
-build_requires, create_packlist, c_source, conflicts, create_makefile_pl,
-create_readme, dist_abstract, dist_author, dist_name, dist_version,
-dist_version_from, dynamic_config, extra_compiler_flags,
-extra_linker_flags, get_options, type, store, default, include_dirs,
-install_path, installdirs, license, apache, artistic, artistic_2, bsd, gpl,
-lgpl, mit, mozilla, open_source, perl, restrictive, unrestricted, meta_add,
-meta_merge, module_name, PL_files, pm_files, pod_files, recommends,
-recursive_test_files, requires, script_files, sign, test_files, xs_files,
-new_from_context(%args), resume(), subclass()
-
-=item METHODS
-
-add_build_element($type), add_to_cleanup(@files), args(),
-autosplit_file($from, $to), base_dir(), build_requires(),
-check_installed_status($module, $version), check_installed_version($module,
-$version), compare_versions($v1, $op, $v2), config($key), config($key,
-$value), config() [deprecated], config_data($name), config_data($name =>
-$value), conflicts(), contains_pod($file), copy_if_modified(%parameters),
-create_build_script(), current_action(), depends_on(@actions),
-dir_contains($first_dir, $second_dir), dispatch($action, %args),
-dist_dir(), dist_name(), dist_version(), do_system($cmd, @args),
-feature($name), feature($name => $value), have_c_compiler(),
-install_base_relpaths(), install_base_relpaths($type),
-install_base_relpaths($type => $path), install_destination($type),
-install_path(), install_path($type), install_path($type => $path),
-install_types(), invoked_action(), notes(), notes($key), notes($key =>
-$value), orig_dir(), os_type(), is_vmsish(), is_windowsish(), is_unixish(),
-prefix_relpaths(), prefix_relpaths($installdirs),
-prefix_relpaths($installdirs, $type), prefix_relpaths($installdirs, $type
-=> $path), prepare_metadata(), prereq_failures(), prereq_report(),
-prompt($message, $default), recommends(), requires(), rscan_dir($dir,
-$pattern), runtime_params(), runtime_params($key), script_files(),
-up_to_date($source_file, $derived_file), up_to_date(\@source_files,
-\@derived_files), y_n($message, $default)
-
-=item Autogenerated Accessors
-
-PL_files(), allow_mb_mismatch(), autosplit(), base_dir(), bindoc_dirs(),
-blib(), build_bat(), build_class(), build_elements(), build_requires(),
-build_script(), c_source(), config_dir(), configure_requires(),
-conflicts(), create_makefile_pl(), create_packlist(), create_readme(),
-debugger(), destdir(), get_options(), html_css(), include_dirs(),
-install_base(), install_sets(), installdirs(), libdoc_dirs(), license(),
-magic_number(), mb_version(), meta_add(), meta_merge(), metafile(),
-module_name(), orig_dir(), original_prefix(), perl(), pm_files(),
-pod_files(), pollute(), prefix(), prereq_action_types(), quiet(),
-recommends(), recurse_into(), recursive_test_files(), requires(),
-scripts(), use_rcfile(), verbose(), xs_files()
-
-=back
-
-=item MODULE METADATA
-
-keywords, resources
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Authoring - Authoring Module::Build modules
-
-=over 4
-
-=item DESCRIPTION
-
-=item STRUCTURE
-
-=item SUBCLASSING
-
-=item PREREQUISITES
-
-=over 4
-
-=item Types of prerequisites
-
-configure_requires, build_requires, requires, recommends, conflicts
-
-=item Format of prerequisites
-
-=item XS Extensions
-
-=back
-
-=item SAVING CONFIGURATION INFORMATION
-
-=item STARTING MODULE DEVELOPMENT
-
-=item AUTOMATION
-
-=item MIGRATION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Base - Default methods for Module::Build
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Compat - Compatibility with ExtUtils::MakeMaker
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-create_makefile_pl($style, $build), small, passthrough, traditional,
-run_build_pl(args => \@ARGV), args, script, write_makefile(), makefile
-
-=item SCENARIOS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::ConfigData - Configuration for Module::Build
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-config($name), feature($name), set_config($name, $value),
-set_feature($name, $value), config_names(), feature_names(),
-auto_feature_names(), write()
-
-=item AUTHOR
-
-=back
-
-=head2 Module::Build::Cookbook - Examples of Module::Build Usage
-
-=over 4
-
-=item DESCRIPTION
-
-=item BASIC RECIPES
-
-=over 4
-
-=item Installing modules that use Module::Build
-
-=item Modifying Config.pm values
-
-=item Installing modules using the programmatic interface
-
-=item Installing to a temporary directory
-
-=item Installing to a non-standard directory
-
-=item Installing in the same location as ExtUtils::MakeMaker
-
-=item Running a single test file
-
-=back
-
-=item ADVANCED RECIPES
-
-=over 4
-
-=item Making a CPAN.pm-compatible distribution
-
-=item Changing the order of the build process
-
-=item Adding new file types to the build process
-
-=item Adding new elements to the install process
-
-=back
-
-=item EXAMPLES ON CPAN
-
-=over 4
-
-=item SVN-Notify-Mirror
-
-1. Using C<auto_features>, I check to see whether two optional modules are
-available - SVN::Notify::Config and Net::SSH;, 2. If the S::N::Config
-module is loaded, I automatically generate testfiles for it during Build
-(using the C<PL_files> property), 3. If the C<ssh_feature> is available, I
-ask if the user wishes to perform the ssh tests (since it requires a little
-preliminary setup);, 4. Only if the user has C<ssh_feature> and answers yes
-to the testing, do I generate a test file
-
-=item Modifying an action
-
-=back
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::ModuleInfo, ModuleInfo - Gather package and POD
-information from a perl module files
-
-=over 4
-
-=item DESCRIPTION
-
-new_from_file($filename, collect_pod => 1), new_from_module($module,
-collect_pod => 1, inc => \@dirs), name(), version($package), filename(),
-packages_inside(), pod_inside(), contains_pod(), pod($section),
-find_module_by_name($module, \@dirs), find_module_dir_by_name($module,
-\@dirs)
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Notes, $notes_name - Configuration for $module_name
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-config(\$name), feature(\$name), set_config(\$name, \$value),
-set_feature(\$name, \$value), config_names(), feature_names(),
-auto_feature_names(), write()
-
-=item AUTHOR
-
-=back
-
-=head2 Module::Build::PPMMaker - Perl Package Manager file creation
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::Amiga - Builder class for Amiga platforms
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::Default - Stub class for unknown platforms
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::EBCDIC - Builder class for EBCDIC platforms
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::MPEiX - Builder class for MPEiX platforms
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::MacOS - Builder class for MacOS platforms
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Overriden Methods
-
-new(), make_executable(), dispatch(), ACTION_realclean()
-
-=back
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::RiscOS - Builder class for RiscOS platforms
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::Unix - Builder class for Unix platforms
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::VMS - Builder class for VMS platforms
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Overridden Methods
-
-_set_defaults
-
-=back
-
-=back
-
-cull_args
-
-manpage_separator
-
-prefixify
-
-_quote_args
-
-have_forkpipe
-
-_backticks
-
-do_system
-
-_infer_xs_spec
-
-rscan_dir
-
-dist_dir
-
-man3page_name
-
-expand_test_dir
-
-_detildefy
-
-find_perl_interpreter
-
-=over 4
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::VOS - Builder class for VOS platforms
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::Windows - Builder class for Windows
-platforms
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::aix - Builder class for AIX platform
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::cygwin - Builder class for Cygwin platform
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::darwin - Builder class for Mac OS X
-platform
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::Platform::os2 - Builder class for OS/2 platform
-
-=over 4
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Build::YAML - Provides just enough YAML support so that
-Module::Build works even if YAML.pm is not installed
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Module::CoreList - what modules shipped with versions of perl
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CAVEATS
-
-=item HISTORY
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Load - runtime require of both modules and files
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Rules
-
-=item Caveats
-
-=item ACKNOWLEDGEMENTS
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Module::Load::Conditional - Looking up module information / loading
-at runtime
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Methods
-
-=item $href = check_install( module => NAME [, version => VERSION, verbose
-=> BOOL ] );
-
-module, version, verbose, file, version, uptodate
-
-=back
-
-=over 4
-
-=item $bool = can_load( modules => { NAME => VERSION [,NAME => VERSION] },
-[verbose => BOOL, nocache => BOOL] )
-
-modules, verbose, nocache
-
-=back
-
-=over 4
-
-=item @list = requires( MODULE );
-
-=back
-
-=over 4
-
-=item Global Variables
-
-=over 4
-
-=item $Module::Load::Conditional::VERBOSE
-
-=item $Module::Load::Conditional::FIND_VERSION
-
-=item $Module::Load::Conditional::CHECK_INC_HASH
-
-=item $Module::Load::Conditional::CACHE
-
-=item $Module::Load::Conditional::ERROR
-
-=back
-
-=item See Also
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Module::Loaded - mark modules as loaded or unloaded
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS
-
-=over 4
-
-=item $bool = mark_as_loaded( PACKAGE );
-
-=back
-
-=back
-
-=over 4
-
-=item $bool = mark_as_unloaded( PACKAGE );
-
-=back
-
-=over 4
-
-=item $loc = is_loaded( PACKAGE );
-
-=back
-
-=over 4
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Module::Pluggable - automatically give your module the ability to
-have plugins
-
-=over 4
-
-=item SYNOPSIS
-
-=item EXAMPLE
-
-=item DESCRIPTION
-
-=item ADVANCED USAGE
-
-=item INNER PACKAGES
-
-=item OPTIONS
-
-=over 4
-
-=item sub_name
-
-=item search_path
-
-=item search_dirs
-
-=item instantiate
-
-=item require
-
-=item inner
-
-=item only
-
-=item except
-
-=item package
-
-=item file_regex
-
-=back
-
-=item METHODs
-
-=over 4
-
-=item search_path
-
-=back
-
-=item FUTURE PLANS
-
-=item AUTHOR
-
-=item COPYING
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 Module::Pluggable::Object - automatically give your module the
-ability to have plugins
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=item COPYING
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 NDBM_File - Tied access to ndbm files
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-C<O_RDONLY>, C<O_WRONLY>, C<O_RDWR>
-
-=item DIAGNOSTICS
-
-=over 4
-
-=item C<ndbm store returned -1, errno 22, key "..." at ...>
-
-=back
-
-=item BUGS AND WARNINGS
-
-=back
-
-=head2 NEXT - Provide a pseudo-class NEXT (et al) that allows method
-redispatch
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Enforcing redispatch
-
-=item Avoiding repetitions
-
-=item Invoking all versions of a method with a single call
-
-=item Using C<EVERY> methods
-
-=back
-
-=item AUTHOR
-
-=item BUGS AND IRRITATIONS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Net::Cmd - Network Command class (as used by FTP, SMTP etc)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item USER METHODS
-
-debug ( VALUE ), message (), code (), ok (), status (), datasend ( DATA ),
-dataend ()
-
-=item CLASS METHODS
-
-debug_print ( DIR, TEXT ), debug_text ( TEXT ), command ( CMD [, ARGS, ...
-]), unsupported (), response (), parse_response ( TEXT ), getline (),
-ungetline ( TEXT ), rawdatasend ( DATA ), read_until_dot (), tied_fh ()
-
-=item EXPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Net::Config - Local configuration data for libnet
-
-=over 4
-
-=item SYNOPSYS
-
-=item DESCRIPTION
-
-=item METHODS
-
-requires_firewall HOST
-
-=item NetConfig VALUES
-
-nntp_hosts, snpp_hosts, pop3_hosts, smtp_hosts, ph_hosts, daytime_hosts,
-time_hosts, inet_domain, ftp_firewall, ftp_firewall_type, ftp_ext_passive,
-ftp_int_passive, local_netmask, test_hosts, test_exists
-
-=back
-
-=head2 Net::Domain - Attempt to evaluate the current host's internet name
-and domain
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-hostfqdn (), domainname (), hostname (), hostdomain ()
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Net::FTP - FTP Client class
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OVERVIEW
-
-=item CONSTRUCTOR
-
-new ([ HOST ] [, OPTIONS ])
-
-=item METHODS
-
-login ([LOGIN [,PASSWORD [, ACCOUNT] ] ]), authorize ( [AUTH [, RESP]]),
-site (ARGS), ascii, binary, rename ( OLDNAME, NEWNAME ), delete ( FILENAME
-), cwd ( [ DIR ] ), cdup (), pwd (), restart ( WHERE ), rmdir ( DIR [,
-RECURSE ]), mkdir ( DIR [, RECURSE ]), alloc ( SIZE [, RECORD_SIZE] ), ls (
-[ DIR ] ), dir ( [ DIR ] ), get ( REMOTE_FILE [, LOCAL_FILE [, WHERE]] ),
-put ( LOCAL_FILE [, REMOTE_FILE ] ), put_unique ( LOCAL_FILE [, REMOTE_FILE
-] ), append ( LOCAL_FILE [, REMOTE_FILE ] ), unique_name (), mdtm ( FILE ),
-size ( FILE ), supported ( CMD ), hash ( [FILEHANDLE_GLOB_REF],[
-BYTES_PER_HASH_MARK] ), feature ( NAME ), nlst ( [ DIR ] ), list ( [ DIR ]
-), retr ( FILE ), stor ( FILE ), stou ( FILE ), appe ( FILE ), port ( [
-PORT ] ), pasv (), pasv_xfer ( SRC_FILE, DEST_SERVER [, DEST_FILE ] ),
-pasv_xfer_unique ( SRC_FILE, DEST_SERVER [, DEST_FILE ] ), pasv_wait (
-NON_PASV_SERVER ), abort (), quit ()
-
-=over 4
-
-=item Methods for the adventurous
-
-quot (CMD [,ARGS])
-
-=back
-
-=item THE dataconn CLASS
-
-read ( BUFFER, SIZE [, TIMEOUT ] ), write ( BUFFER, SIZE [, TIMEOUT ] ),
-bytes_read (), abort (), close ()
-
-=item UNIMPLEMENTED
-
-B<SMNT>, B<HELP>, B<MODE>, B<SYST>, B<STAT>, B<STRU>, B<REIN>
-
-=item REPORTING BUGS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=item USE EXAMPLES
-
-http://www.csh.rit.edu/~adam/Progs/
-
-=item CREDITS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Net::NNTP - NNTP Client class
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [ HOST ] [, OPTIONS ])
-
-=item METHODS
-
-article ( [ MSGID|MSGNUM ], [FH] ), body ( [ MSGID|MSGNUM ], [FH] ), head (
-[ MSGID|MSGNUM ], [FH] ), articlefh ( [ MSGID|MSGNUM ] ), bodyfh ( [
-MSGID|MSGNUM ] ), headfh ( [ MSGID|MSGNUM ] ), nntpstat ( [ MSGID|MSGNUM ]
-), group ( [ GROUP ] ), ihave ( MSGID [, MESSAGE ]), last (), date (),
-postok (), authinfo ( USER, PASS ), list (), newgroups ( SINCE [,
-DISTRIBUTIONS ]), newnews ( SINCE [, GROUPS [, DISTRIBUTIONS ]]), next (),
-post ( [ MESSAGE ] ), postfh (), slave (), quit ()
-
-=over 4
-
-=item Extension methods
-
-newsgroups ( [ PATTERN ] ), distributions (), subscriptions (),
-overview_fmt (), active_times (), active ( [ PATTERN ] ), xgtitle ( PATTERN
-), xhdr ( HEADER, MESSAGE-SPEC ), xover ( MESSAGE-SPEC ), xpath (
-MESSAGE-ID ), xpat ( HEADER, PATTERN, MESSAGE-SPEC), xrover, listgroup ( [
-GROUP ] ), reader
-
-=back
-
-=item UNSUPPORTED
-
-=item DEFINITIONS
-
-MESSAGE-SPEC, PATTERN, Examples, C<[^]-]>, C<*bdc>, C<[0-9a-zA-Z]>, C<a??d>
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Net::POP3 - Post Office Protocol 3 Client class (RFC1939)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-new ( [ HOST ] [, OPTIONS ] 0
-
-=item METHODS
-
-auth ( USERNAME, PASSWORD ), user ( USER ), pass ( PASS ), login ( [ USER
-[, PASS ]] ), apop ( [ USER [, PASS ]] ), banner (), capa (), capabilities
-(), top ( MSGNUM [, NUMLINES ] ), list ( [ MSGNUM ] ), get ( MSGNUM [, FH ]
-), getfh ( MSGNUM ), last (), popstat (), ping ( USER ), uidl ( [ MSGNUM ]
-), delete ( MSGNUM ), reset (), quit ()
-
-=item NOTES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Net::Ping - check a remote host for reachability
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Functions
-
-Net::Ping->new([$proto [, $def_timeout [, $bytes [, $device [, $tos
-]]]]]);, $p->ping($host [, $timeout]);, $p->source_verify( { 0 | 1 } );,
-$p->service_check( { 0 | 1 } );, $p->tcp_service_check( { 0 | 1 } );,
-$p->hires( { 0 | 1 } );, $p->bind($local_addr);, $p->open($host);, $p->ack(
-[ $host ] );, $p->nack( $failed_ack_host );, $p->close();,
-$p->port_number([$port_number]), pingecho($host [, $timeout]);
-
-=back
-
-=item NOTES
-
-=item INSTALL
-
-=item BUGS
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Net::SMTP - Simple Mail Transfer Protocol Client
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXAMPLES
-
-=item CONSTRUCTOR
-
-new ( [ HOST ] [, OPTIONS ] )
-
-=item METHODS
-
-banner (), domain (), hello ( DOMAIN ), host (), etrn ( DOMAIN ), auth (
-USERNAME, PASSWORD ), mail ( ADDRESS [, OPTIONS] ), send ( ADDRESS ),
-send_or_mail ( ADDRESS ), send_and_mail ( ADDRESS ), reset (), recipient (
-ADDRESS [, ADDRESS, [...]] [, OPTIONS ] ), to ( ADDRESS [, ADDRESS [...]]
-), cc ( ADDRESS [, ADDRESS [...]] ), bcc ( ADDRESS [, ADDRESS [...]] ),
-data ( [ DATA ] ), expand ( ADDRESS ), verify ( ADDRESS ), help ( [
-$subject ] ), quit ()
-
-=item ADDRESSES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Net::Time - time and daytime network client interface
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-inet_time ( [HOST [, PROTOCOL [, TIMEOUT]]]), inet_daytime ( [HOST [,
-PROTOCOL [, TIMEOUT]]])
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Net::hostent - by-name interface to Perl's built-in gethost*()
-functions
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXAMPLES
-
-=item NOTE
-
-=item AUTHOR
-
-=back
-
-=head2 Net::libnetFAQ, libnetFAQ - libnet Frequently Asked Questions
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Where to get this document
-
-=item How to contribute to this document
-
-=back
-
-=item Author and Copyright Information
-
-=over 4
-
-=item Disclaimer
-
-=back
-
-=item Obtaining and installing libnet
-
-=over 4
-
-=item What is libnet ?
-
-=item Which version of perl do I need ?
-
-=item What other modules do I need ?
-
-=item What machines support libnet ?
-
-=item Where can I get the latest libnet release
-
-=back
-
-=item Using Net::FTP
-
-=over 4
-
-=item How do I download files from an FTP server ?
-
-=item How do I transfer files in binary mode ?
-
-=item How can I get the size of a file on a remote FTP server ?
-
-=item How can I get the modification time of a file on a remote FTP server
-?
-
-=item How can I change the permissions of a file on a remote server ?
-
-=item Can I do a reget operation like the ftp command ?
-
-=item How do I get a directory listing from an FTP server ?
-
-=item Changing directory to "" does not fail ?
-
-=item I am behind a SOCKS firewall, but the Firewall option does not work ?
-
-=item I am behind an FTP proxy firewall, but cannot access machines outside
-?
-
-=item My ftp proxy firewall does not listen on port 21
-
-=item Is it possible to change the file permissions of a file on an FTP
-server ?
-
-=item I have seen scripts call a method message, but cannot find it
-documented ?
-
-=item Why does Net::FTP not implement mput and mget methods
-
-=back
-
-=item Using Net::SMTP
-
-=over 4
-
-=item Why can't the part of an Email address after the @ be used as the
-hostname ?
-
-=item Why does Net::SMTP not do DNS MX lookups ?
-
-=item The verify method always returns true ?
-
-=back
-
-=item Debugging scripts
-
-=over 4
-
-=item How can I debug my scripts that use Net::* modules ?
-
-=back
-
-=item AUTHOR AND COPYRIGHT
-
-=back
-
-=head2 Net::netent - by-name interface to Perl's built-in getnet*()
-functions
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXAMPLES
-
-=item NOTE
-
-=item AUTHOR
-
-=back
-
-=head2 Net::protoent - by-name interface to Perl's built-in getproto*()
-functions
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTE
-
-=item AUTHOR
-
-=back
-
-=head2 Net::servent - by-name interface to Perl's built-in getserv*()
-functions
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXAMPLES
-
-=item NOTE
-
-=item AUTHOR
-
-=back
-
-=head2 Netrc, Net::Netrc - OO interface to users netrc file
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item THE .netrc FILE
-
-machine name, default, login name, password string, account string, macdef
-name
-
-=item CONSTRUCTOR
-
-lookup ( MACHINE [, LOGIN ])
-
-=item METHODS
-
-login (), password (), account (), lpa ()
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=item COPYRIGHT
-
-=back
-
-=head2 O - Generic interface to Perl Compiler backends
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONVENTIONS
-
-=item IMPLEMENTATION
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 ODBM_File - Tied access to odbm files
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-C<O_RDONLY>, C<O_WRONLY>, C<O_RDWR>
-
-=item DIAGNOSTICS
-
-=over 4
-
-=item C<odbm store returned -1, errno 22, key "..." at ...>
-
-=back
-
-=item BUGS AND WARNINGS
-
-=back
-
-=head2 Object::Accessor
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=over 4
-
-=item $object = Object::Accessor->new( [ARGS] );
-
-=back
-
-=back
-
-=over 4
-
-=item $bool = $object->mk_accessors( @ACCESSORS | \%ACCESSOR_MAP );
-
-=back
-
-=over 4
-
-=item @list = $self->ls_accessors;
-
-=back
-
-=over 4
-
-=item $ref = $self->ls_allow(KEY)
-
-=back
-
-=over 4
-
-=item $clone = $self->mk_clone;
-
-=back
-
-=over 4
-
-=item $bool = $self->mk_flush;
-
-=back
-
-=over 4
-
-=item $bool = $self->mk_verify;
-
-=back
-
-=over 4
-
-=item $bool = $self->register_callback( sub { ... } );
-
-=back
-
-=over 4
-
-=item $bool = $self->can( METHOD_NAME )
-
-=back
-
-=over 4
-
-=item $val = $self->___get( METHOD_NAME );
-
-=back
-
-=over 4
-
-=item $bool = $self->___set( METHOD_NAME => VALUE );
-
-=back
-
-=over 4
-
-=item LVALUE ACCESSORS
-
-=over 4
-
-=item CAVEATS
-
-Allow handlers, Callbacks
-
-=back
-
-=back
-
-=over 4
-
-=item GLOBAL VARIABLES
-
-=over 4
-
-=item $Object::Accessor::FATAL
-
-=item $Object::Accessor::DEBUG
-
-=back
-
-=item TODO
-
-=over 4
-
-=item Create read-only accessors
-
-=back
-
-=item CAVEATS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Opcode - Disable named opcodes when compiling perl code
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTE
-
-=item WARNING
-
-=item Operator Names and Operator Lists
-
-an operator name (opname), an operator tag name (optag), a negated opname
-or optag, an operator set (opset)
-
-=item Opcode Functions
-
-opcodes, opset (OP, ...), opset_to_ops (OPSET), opset_to_hex (OPSET),
-full_opset, empty_opset, invert_opset (OPSET), verify_opset (OPSET, ...),
-define_optag (OPTAG, OPSET), opmask_add (OPSET), opmask, opdesc (OP, ...),
-opdump (PAT)
-
-=item Manipulating Opsets
-
-=item TO DO (maybe)
-
-=back
-
-=over 4
-
-=item Predefined Opcode Tags
-
-:base_core, :base_mem, :base_loop, :base_io, :base_orig, :base_math,
-:base_thread, :default, :filesys_read, :sys_db, :browse, :filesys_open,
-:filesys_write, :subprocess, :ownprocess, :others, :load,
-:still_to_be_decided, :dangerous
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=back
-
-=head2 Opcode::Safe, Safe - Compile and execute code in restricted
-compartments
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-a new namespace, an operator mask
-
-=item WARNING
-
-=over 4
-
-=item RECENT CHANGES
-
-=item Methods in class Safe
-
-permit (OP, ...), permit_only (OP, ...), deny (OP, ...), deny_only (OP,
-...), trap (OP, ...), untrap (OP, ...), share (NAME, ...), share_from
-(PACKAGE, ARRAYREF), varglob (VARNAME), reval (STRING), rdo (FILENAME),
-root (NAMESPACE), mask (MASK)
-
-=item Some Safety Issues
-
-Memory, CPU, Snooping, Signals, State Changes
-
-=item AUTHOR
-
-=back
-
-=back
-
-=head2 Opcode::ops, ops - Perl pragma to restrict unsafe operations when
-compiling
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=back
-
-=head2 POSIX - Perl interface to IEEE Std 1003.1
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTE
-
-=item CAVEATS
-
-=item FUNCTIONS
-
-_exit, abort, abs, access, acos, alarm, asctime, asin, assert, atan, atan2,
-atexit, atof, atoi, atol, bsearch, calloc, ceil, chdir, chmod, chown,
-clearerr, clock, close, closedir, cos, cosh, creat, ctermid, ctime,
-cuserid, difftime, div, dup, dup2, errno, execl, execle, execlp, execv,
-execve, execvp, exit, exp, fabs, fclose, fcntl, fdopen, feof, ferror,
-fflush, fgetc, fgetpos, fgets, fileno, floor, fmod, fopen, fork, fpathconf,
-fprintf, fputc, fputs, fread, free, freopen, frexp, fscanf, fseek, fsetpos,
-fstat, fsync, ftell, fwrite, getc, getchar, getcwd, getegid, getenv,
-geteuid, getgid, getgrgid, getgrnam, getgroups, getlogin, getpgrp, getpid,
-getppid, getpwnam, getpwuid, gets, getuid, gmtime, isalnum, isalpha,
-isatty, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace,
-isupper, isxdigit, kill, labs, ldexp, ldiv, link, localeconv, localtime,
-log, log10, longjmp, lseek, malloc, mblen, mbstowcs, mbtowc, memchr,
-memcmp, memcpy, memmove, memset, mkdir, mkfifo, mktime, modf, nice,
-offsetof, open, opendir, pathconf, pause, perror, pipe, pow, printf, putc,
-putchar, puts, qsort, raise, rand, read, readdir, realloc, remove, rename,
-rewind, rewinddir, rmdir, scanf, setgid, setjmp, setlocale, setpgid,
-setsid, setuid, sigaction, siglongjmp, sigpending, sigprocmask, sigsetjmp,
-sigsuspend, sin, sinh, sleep, sprintf, sqrt, srand, sscanf, stat, strcat,
-strchr, strcmp, strcoll, strcpy, strcspn, strerror, strftime, strlen,
-strncat, strncmp, strncpy, strpbrk, strrchr, strspn, strstr, strtod,
-strtok, strtol, strtoul, strxfrm, sysconf, system, tan, tanh, tcdrain,
-tcflow, tcflush, tcgetpgrp, tcsendbreak, tcsetpgrp, time, times, tmpfile,
-tmpnam, tolower, toupper, ttyname, tzname, tzset, umask, uname, ungetc,
-unlink, utime, vfprintf, vprintf, vsprintf, wait, waitpid, wcstombs,
-wctomb, write
-
-=item CLASSES
-
-=over 4
-
-=item POSIX::SigAction
-
-new, handler, mask, flags, safe
-
-=item POSIX::SigRt
-
-%SIGRT, SIGRTMIN, SIGRTMAX
-
-=item POSIX::SigSet
-
-new, addset, delset, emptyset, fillset, ismember
-
-=item POSIX::Termios
-
-new, getattr, getcc, getcflag, getiflag, getispeed, getlflag, getoflag,
-getospeed, setattr, setcc, setcflag, setiflag, setispeed, setlflag,
-setoflag, setospeed, Baud rate values, Terminal interface values, c_cc
-field values, c_cflag field values, c_iflag field values, c_lflag field
-values, c_oflag field values
-
-=back
-
-=item PATHNAME CONSTANTS
-
-Constants
-
-=item POSIX CONSTANTS
-
-Constants
-
-=item SYSTEM CONFIGURATION
-
-Constants
-
-=item ERRNO
-
-Constants
-
-=item FCNTL
-
-Constants
-
-=item FLOAT
-
-Constants
-
-=item LIMITS
-
-Constants
-
-=item LOCALE
-
-Constants
-
-=item MATH
-
-Constants
-
-=item SIGNAL
-
-Constants
-
-=item STAT
-
-Constants, Macros
-
-=item STDLIB
-
-Constants
-
-=item STDIO
-
-Constants
-
-=item TIME
-
-Constants
-
-=item UNISTD
-
-Constants
-
-=item WAIT
-
-Constants, WNOHANG, WUNTRACED, Macros, WIFEXITED, WEXITSTATUS, WIFSIGNALED,
-WTERMSIG, WIFSTOPPED, WSTOPSIG
-
-=back
-
-=head2 Package::Constants - List all constants declared in a package
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CLASS METHODS
-
-=over 4
-
-=item @const = Package::Constants->list( PACKAGE_NAME );
-
-=back
-
-=back
-
-=over 4
-
-=item GLOBAL VARIABLES
-
-=over 4
-
-=item $Package::Constants::DEBUG
-
-=back
-
-=back
-
-=over 4
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Params::Check - A generic input parsing/checking mechanism.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Template
-
-default, required, strict_type, defined, no_override, store, allow
-
-=item Functions
-
-=over 4
-
-=item check( \%tmpl, \%args, [$verbose] );
-
-Template, Arguments, Verbose
-
-=back
-
-=back
-
-=over 4
-
-=item allow( $test_me, \@criteria );
-
-string, regexp, subroutine, array ref
-
-=back
-
-=over 4
-
-=item last_error()
-
-=back
-
-=over 4
-
-=item Global Variables
-
-=over 4
-
-=item $Params::Check::VERBOSE
-
-=item $Params::Check::STRICT_TYPE
-
-=item $Params::Check::ALLOW_UNKNOWN
-
-=item $Params::Check::STRIP_LEADING_DASHES
-
-=item $Params::Check::NO_DUPLICATES
-
-=item $Params::Check::PRESERVE_CASE
-
-=item $Params::Check::ONLY_ALLOW_DEFINED
-
-=item $Params::Check::SANITY_CHECK_TEMPLATE
-
-=item $Params::Check::WARNINGS_FATAL
-
-=item $Params::Check::CALLER_DEPTH
-
-=back
-
-=item AUTHOR
-
-=item Acknowledgements
-
-=item COPYRIGHT
-
-=back
-
-=head2 PerlIO - On demand loader for PerlIO layers and root of PerlIO::*
-name space
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-:unix, :stdio, :perlio, :crlf, :mmap, :utf8, :bytes, :raw, :pop, :win32
-
-=over 4
-
-=item Custom Layers
-
-:encoding, :via
-
-=item Alternatives to raw
-
-=item Defaults and how to override them
-
-=item Querying the layers of filehandles
-
-=back
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 PerlIO::encoding - encoding layer
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=back
-
-=head2 PerlIO::scalar - in-memory IO, scalar IO
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item IMPLEMENTATION NOTE
-
-=back
-
-=head2 PerlIO::via - Helper class for PerlIO layers implemented in perl
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXPECTED METHODS
-
-$class->PUSHED([$mode[,$fh]]), $obj->POPPED([$fh]),
-$obj->UTF8($bellowFlag,[$fh]), $obj->OPEN($path,$mode[,$fh]),
-$obj->BINMODE([,$fh]), $obj->FDOPEN($fd[,$fh]),
-$obj->SYSOPEN($path,$imode,$perm,[,$fh]), $obj->FILENO($fh),
-$obj->READ($buffer,$len,$fh), $obj->WRITE($buffer,$fh), $obj->FILL($fh),
-$obj->CLOSE($fh), $obj->SEEK($posn,$whence,$fh), $obj->TELL($fh),
-$obj->UNREAD($buffer,$fh), $obj->FLUSH($fh), $obj->SETLINEBUF($fh),
-$obj->CLEARERR($fh), $obj->ERROR($fh), $obj->EOF($fh)
-
-=item EXAMPLES
-
-=over 4
-
-=item Example - a Hexadecimal Handle
-
-=back
-
-=back
-
-=head2 PerlIO::via::QuotedPrint - PerlIO layer for quoted-printable strings
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item REQUIRED MODULES
-
-=item SEE ALSO
-
-=item ACKNOWLEDGEMENTS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Pod::Checker, podchecker() - check pod documents for syntax errors
-
-=over 4
-
-=item SYNOPSIS
-
-=item OPTIONS/ARGUMENTS
-
-=over 4
-
-=item podchecker()
-
-B<-warnings> =E<gt> I<val>
-
-=back
-
-=item DESCRIPTION
-
-=item DIAGNOSTICS
-
-=over 4
-
-=item Errors
-
-empty =headn, =over on line I<N> without closing =back, =item without
-previous =over, =back without previous =over, No argument for =begin, =end
-without =begin, Nested =begin's, =for without formatter specification,
-unresolved internal link I<NAME>, Unknown command "I<CMD>", Unknown
-interior-sequence "I<SEQ>", nested commands
-I<CMD>E<lt>...I<CMD>E<lt>...E<gt>...E<gt>, garbled entity I<STRING>, Entity
-number out of range, malformed link LE<lt>E<gt>, nonempty ZE<lt>E<gt>,
-empty XE<lt>E<gt>, Spurious text after =pod / =cut, Spurious character(s)
-after =back
-
-=item Warnings
-
-multiple occurrence of link target I<name>, line containing nothing but
-whitespace in paragraph, file does not start with =head, previous =item has
-no contents, preceding non-item paragraph(s), =item type mismatch (I<one>
-vs. I<two>), I<N> unescaped C<E<lt>E<gt>> in paragraph, Unknown entity, No
-items in =over, No argument for =item, empty section in previous paragraph,
-Verbatim paragraph in NAME section, =headI<n> without preceding higher
-level
-
-=item Hyperlinks
-
-ignoring leading/trailing whitespace in link, (section) in '$page'
-deprecated, alternative text/node '%s' contains non-escaped | or /
-
-=back
-
-=item RETURN VALUE
-
-=item EXAMPLES
-
-=item INTERFACE
-
-=back
-
-C<Pod::Checker-E<gt>new( %options )>
-
-C<$checker-E<gt>poderror( @args )>, C<$checker-E<gt>poderror( {%opts},
- at args )>
-
-C<$checker-E<gt>num_errors()>
-
-C<$checker-E<gt>num_warnings()>
-
-C<$checker-E<gt>name()>
-
-C<$checker-E<gt>node()>
-
-C<$checker-E<gt>idx()>
-
-C<$checker-E<gt>hyperlink()>
-
-=over 4
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Escapes -- for resolving Pod EE<lt>...E<gt> sequences
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item GOODIES
-
-e2char($e_content), e2charnum($e_content), $Name2character{I<name>},
-$Name2character_number{I<name>}, $Latin1Code_to_fallback{I<integer>},
-$Latin1Char_to_fallback{I<character>}, $Code2USASCII{I<integer>}
-
-=item CAVEATS
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Find - find POD documents in directory trees
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item C<pod_find( { %opts } , @directories )>
-
-C<-verbose =E<gt> 1>, C<-perl =E<gt> 1>, C<-script =E<gt> 1>, C<-inc =E<gt>
-1>
-
-=back
-
-=over 4
-
-=item C<simplify_name( $str )>
-
-=back
-
-=over 4
-
-=item C<pod_where( { %opts }, $pod )>
-
-C<-inc =E<gt> 1>, C<-dirs =E<gt> [ $dir1, $dir2, ... ]>, C<-verbose =E<gt>
-1>
-
-=back
-
-=over 4
-
-=item C<contains_pod( $file , $verbose )>
-
-=back
-
-=over 4
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Pod::Html - module to convert pod files to HTML
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS
-
-=over 4
-
-=item pod2html
-
-backlink, cachedir, css, flush, header, help, hiddendirs, htmldir,
-htmlroot, index, infile, libpods, netscape, outfile, podpath, podroot,
-quiet, recurse, title, verbose
-
-=item htmlify
-
-=item anchorify
-
-=back
-
-=item ENVIRONMENT
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=item COPYRIGHT
-
-=back
-
-=head2 Pod::InputObjects - objects representing POD input paragraphs,
-commands, etc.
-
-=over 4
-
-=item SYNOPSIS
-
-=item REQUIRES
-
-=item EXPORTS
-
-=item DESCRIPTION
-
-package B<Pod::InputSource>, package B<Pod::Paragraph>, package
-B<Pod::InteriorSequence>, package B<Pod::ParseTree>
-
-=back
-
-=over 4
-
-=item B<Pod::InputSource>
-
-=back
-
-=over 4
-
-=item B<new()>
-
-=back
-
-=over 4
-
-=item B<name()>
-
-=back
-
-=over 4
-
-=item B<handle()>
-
-=back
-
-=over 4
-
-=item B<was_cutting()>
-
-=back
-
-=over 4
-
-=item B<Pod::Paragraph>
-
-=back
-
-=over 4
-
-=item Pod::Paragraph-E<gt>B<new()>
-
-=back
-
-=over 4
-
-=item $pod_para-E<gt>B<cmd_name()>
-
-=back
-
-=over 4
-
-=item $pod_para-E<gt>B<text()>
-
-=back
-
-=over 4
-
-=item $pod_para-E<gt>B<raw_text()>
-
-=back
-
-=over 4
-
-=item $pod_para-E<gt>B<cmd_prefix()>
-
-=back
-
-=over 4
-
-=item $pod_para-E<gt>B<cmd_separator()>
-
-=back
-
-=over 4
-
-=item $pod_para-E<gt>B<parse_tree()>
-
-=back
-
-=over 4
-
-=item $pod_para-E<gt>B<file_line()>
-
-=back
-
-=over 4
-
-=item B<Pod::InteriorSequence>
-
-=back
-
-=over 4
-
-=item Pod::InteriorSequence-E<gt>B<new()>
-
-=back
-
-=over 4
-
-=item $pod_seq-E<gt>B<cmd_name()>
-
-=back
-
-=over 4
-
-=item $pod_seq-E<gt>B<prepend()>
-
-=back
-
-=over 4
-
-=item $pod_seq-E<gt>B<append()>
-
-=back
-
-=over 4
-
-=item $pod_seq-E<gt>B<nested()>
-
-=back
-
-=over 4
-
-=item $pod_seq-E<gt>B<raw_text()>
-
-=back
-
-=over 4
-
-=item $pod_seq-E<gt>B<left_delimiter()>
-
-=back
-
-=over 4
-
-=item $pod_seq-E<gt>B<right_delimiter()>
-
-=back
-
-=over 4
-
-=item $pod_seq-E<gt>B<parse_tree()>
-
-=back
-
-=over 4
-
-=item $pod_seq-E<gt>B<file_line()>
-
-=back
-
-=over 4
-
-=item Pod::InteriorSequence::B<DESTROY()>
-
-=back
-
-=over 4
-
-=item B<Pod::ParseTree>
-
-=back
-
-=over 4
-
-=item Pod::ParseTree-E<gt>B<new()>
-
-=back
-
-=over 4
-
-=item $ptree-E<gt>B<top()>
-
-=back
-
-=over 4
-
-=item $ptree-E<gt>B<children()>
-
-=back
-
-=over 4
-
-=item $ptree-E<gt>B<prepend()>
-
-=back
-
-=over 4
-
-=item $ptree-E<gt>B<append()>
-
-=back
-
-=over 4
-
-=item $ptree-E<gt>B<raw_text()>
-
-=back
-
-=over 4
-
-=item Pod::ParseTree::B<DESTROY()>
-
-=back
-
-=over 4
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::LaTeX - Convert Pod data to formatted Latex
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item OBJECT METHODS
-
-C<initialize>
-
-=back
-
-=over 4
-
-=item Data Accessors
-
-B<AddPreamble>
-
-=back
-
-B<AddPostamble>
-
-B<Head1Level>
-
-B<Label>
-
-B<LevelNoNum>
-
-B<MakeIndex>
-
-B<ReplaceNAMEwithSection>
-
-B<StartWithNewPage>
-
-B<TableOfContents>
-
-B<UniqueLabels>
-
-B<UserPreamble>
-
-B<UserPostamble>
-
-B<Lists>
-
-=over 4
-
-=item Subclassed methods
-
-=back
-
-B<begin_pod>
-
-B<end_pod>
-
-B<command>
-
-B<verbatim>
-
-B<textblock>
-
-B<interior_sequence>
-
-=over 4
-
-=item List Methods
-
-B<begin_list>
-
-=back
-
-B<end_list>
-
-B<add_item>
-
-=over 4
-
-=item Methods for headings
-
-B<head>
-
-=back
-
-=over 4
-
-=item Internal methods
-
-B<_output>
-
-=back
-
-B<_replace_special_chars>
-
-B<_replace_special_chars_late>
-
-B<_create_label>
-
-B<_create_index>
-
-B<_clean_latex_commands>
-
-B<_split_delimited>
-
-=over 4
-
-=item NOTES
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=item REVISION
-
-=back
-
-=head2 Pod::Man - Convert POD data to formatted *roff input
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-center, date, fixed, fixedbold, fixeditalic, fixedbolditalic, name, quotes,
-release, section
-
-=item DIAGNOSTICS
-
-roff font should be 1 or 2 chars, not "%s", Invalid quote specification
-"%s"
-
-=item BUGS
-
-=item CAVEATS
-
-=item AUTHOR
-
-=item COPYRIGHT AND LICENSE
-
-=item SEE ALSO
-
-=back
-
-=head2 Pod::ParseLink - Parse an LE<lt>E<gt> formatting code in POD text
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Pod::ParseUtils - helpers for POD parsing and conversion
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item Pod::List
-
-Pod::List-E<gt>new()
-
-=back
-
-$list-E<gt>file()
-
-$list-E<gt>start()
-
-$list-E<gt>indent()
-
-$list-E<gt>type()
-
-$list-E<gt>rx()
-
-$list-E<gt>item()
-
-$list-E<gt>parent()
-
-$list-E<gt>tag()
-
-=over 4
-
-=item Pod::Hyperlink
-
-Pod::Hyperlink-E<gt>new()
-
-=back
-
-$link-E<gt>parse($string)
-
-$link-E<gt>markup($string)
-
-$link-E<gt>text()
-
-$link-E<gt>warning()
-
-$link-E<gt>file(), $link-E<gt>line()
-
-$link-E<gt>page()
-
-$link-E<gt>node()
-
-$link-E<gt>alttext()
-
-$link-E<gt>type()
-
-$link-E<gt>link()
-
-=over 4
-
-=item Pod::Cache
-
-Pod::Cache-E<gt>new()
-
-=back
-
-$cache-E<gt>item()
-
-$cache-E<gt>find_page($name)
-
-=over 4
-
-=item Pod::Cache::Item
-
-Pod::Cache::Item-E<gt>new()
-
-=back
-
-$cacheitem-E<gt>page()
-
-$cacheitem-E<gt>description()
-
-$cacheitem-E<gt>path()
-
-$cacheitem-E<gt>file()
-
-$cacheitem-E<gt>nodes()
-
-$cacheitem-E<gt>find_node($name)
-
-$cacheitem-E<gt>idx()
-
-=over 4
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Pod::Parser - base class for creating POD filters and translators
-
-=over 4
-
-=item SYNOPSIS
-
-=item REQUIRES
-
-=item EXPORTS
-
-=item DESCRIPTION
-
-=item QUICK OVERVIEW
-
-=item PARSING OPTIONS
-
-B<-want_nonPODs> (default: unset), B<-process_cut_cmd> (default: unset),
-B<-warnings> (default: unset)
-
-=back
-
-=over 4
-
-=item RECOMMENDED SUBROUTINE/METHOD OVERRIDES
-
-=back
-
-=over 4
-
-=item B<command()>
-
-C<$cmd>, C<$text>, C<$line_num>, C<$pod_para>
-
-=back
-
-=over 4
-
-=item B<verbatim()>
-
-C<$text>, C<$line_num>, C<$pod_para>
-
-=back
-
-=over 4
-
-=item B<textblock()>
-
-C<$text>, C<$line_num>, C<$pod_para>
-
-=back
-
-=over 4
-
-=item B<interior_sequence()>
-
-=back
-
-=over 4
-
-=item OPTIONAL SUBROUTINE/METHOD OVERRIDES
-
-=back
-
-=over 4
-
-=item B<new()>
-
-=back
-
-=over 4
-
-=item B<initialize()>
-
-=back
-
-=over 4
-
-=item B<begin_pod()>
-
-=back
-
-=over 4
-
-=item B<begin_input()>
-
-=back
-
-=over 4
-
-=item B<end_input()>
-
-=back
-
-=over 4
-
-=item B<end_pod()>
-
-=back
-
-=over 4
-
-=item B<preprocess_line()>
-
-=back
-
-=over 4
-
-=item B<preprocess_paragraph()>
-
-=back
-
-=over 4
-
-=item METHODS FOR PARSING AND PROCESSING
-
-=back
-
-=over 4
-
-=item B<parse_text()>
-
-B<-expand_seq> =E<gt> I<code-ref>|I<method-name>, B<-expand_text> =E<gt>
-I<code-ref>|I<method-name>, B<-expand_ptree> =E<gt>
-I<code-ref>|I<method-name>
-
-=back
-
-=over 4
-
-=item B<interpolate()>
-
-=back
-
-=over 4
-
-=item B<parse_paragraph()>
-
-=back
-
-=over 4
-
-=item B<parse_from_filehandle()>
-
-=back
-
-=over 4
-
-=item B<parse_from_file()>
-
-=back
-
-=over 4
-
-=item ACCESSOR METHODS
-
-=back
-
-=over 4
-
-=item B<errorsub()>
-
-=back
-
-=over 4
-
-=item B<cutting()>
-
-=back
-
-=over 4
-
-=item B<parseopts()>
-
-=back
-
-=over 4
-
-=item B<output_file()>
-
-=back
-
-=over 4
-
-=item B<output_handle()>
-
-=back
-
-=over 4
-
-=item B<input_file()>
-
-=back
-
-=over 4
-
-=item B<input_handle()>
-
-=back
-
-=over 4
-
-=item B<input_streams()>
-
-=back
-
-=over 4
-
-=item B<top_stream()>
-
-=back
-
-=over 4
-
-=item PRIVATE METHODS AND DATA
-
-=back
-
-=over 4
-
-=item B<_push_input_stream()>
-
-=back
-
-=over 4
-
-=item B<_pop_input_stream()>
-
-=back
-
-=over 4
-
-=item TREE-BASED PARSING
-
-=item CAVEATS
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Perldoc::ToChecker - let Perldoc check Pod for errors
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Perldoc::ToMan - let Perldoc render Pod as man pages
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CAVEAT
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Perldoc::ToNroff - let Perldoc convert Pod to nroff
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CAVEAT
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Perldoc::ToPod - let Perldoc render Pod as ... Pod!
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Perldoc::ToRtf - let Perldoc render Pod as RTF
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Perldoc::ToText - let Perldoc render Pod as plaintext
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CAVEAT
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Perldoc::ToTk - let Perldoc use Tk::Pod to render Pod
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Perldoc::ToXml - let Perldoc render Pod as XML
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::PlainText - Convert POD data to formatted ASCII text
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-alt, indent, loose, sentence, width
-
-=item DIAGNOSTICS
-
-Bizarre space in item, Can't open %s for reading: %s, Unknown escape: %s,
-Unknown sequence: %s, Unmatched =back
-
-=item RESTRICTIONS
-
-=item NOTES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Plainer - Perl extension for converting Pod to old style Pod.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item EXPORT
-
-=back
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Pod::Select, podselect() - extract selected sections of POD from
-input
-
-=over 4
-
-=item SYNOPSIS
-
-=item REQUIRES
-
-=item EXPORTS
-
-=item DESCRIPTION
-
-=item SECTION SPECIFICATIONS
-
-=item RANGE SPECIFICATIONS
-
-=back
-
-=over 4
-
-=item OBJECT METHODS
-
-=back
-
-=over 4
-
-=item B<curr_headings()>
-
-=back
-
-=over 4
-
-=item B<select()>
-
-=back
-
-=over 4
-
-=item B<add_selection()>
-
-=back
-
-=over 4
-
-=item B<clear_selections()>
-
-=back
-
-=over 4
-
-=item B<match_section()>
-
-=back
-
-=over 4
-
-=item B<is_selected()>
-
-=back
-
-=over 4
-
-=item EXPORTED FUNCTIONS
-
-=back
-
-=over 4
-
-=item B<podselect()>
-
-B<-output>, B<-sections>, B<-ranges>
-
-=back
-
-=over 4
-
-=item PRIVATE METHODS AND DATA
-
-=back
-
-=over 4
-
-=item B<_compile_section_spec()>
-
-=back
-
-=over 4
-
-=item $self->{_SECTION_HEADINGS}
-
-=back
-
-=over 4
-
-=item $self->{_SELECTED_SECTIONS}
-
-=back
-
-=over 4
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple - framework for parsing Pod
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item MAIN METHODS
-
-C<< $parser = I<SomeClass>->new(); >>, C<< $parser->output_fh( *OUT ); >>,
-C<< $parser->output_string( \$somestring ); >>, C<< $parser->parse_file(
-I<$some_filename> ); >>, C<< $parser->parse_file( *INPUT_FH ); >>, C<<
-$parser->parse_string_document( I<$all_content> ); >>, C<<
-$parser->parse_lines( I<... at lines...>, undef ); >>, C<<
-$parser->content_seen >>, C<< I<SomeClass>->filter( I<$filename> ); >>, C<<
-I<SomeClass>->filter( I<*INPUT_FH> ); >>, C<< I<SomeClass>->filter(
-I<\$document_content> ); >>
-
-=item SECONDARY METHODS
-
-C<< $parser->no_whining( I<SOMEVALUE> ) >>, C<< $parser->no_errata_section(
-I<SOMEVALUE> ) >>, C<< $parser->complain_stderr( I<SOMEVALUE> ) >>, C<<
-$parser->source_filename >>, C<< $parser->doc_has_started >>, C<<
-$parser->source_dead >>
-
-=item CAVEATS
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::Checker -- check the Pod syntax of a document
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::Debug -- put Pod::Simple into trace/debug mode
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CAVEATS
-
-=item GUTS
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::DumpAsText -- dump Pod-parsing events as text
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::DumpAsXML -- turn Pod into XML
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::HTML - convert Pod to HTML
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CALLING FROM THE COMMAND LINE
-
-=item CALLING FROM PERL
-
-=item METHODS
-
-=item SUBCLASSING
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::HTMLBatch - convert several Pod files to several HTML
-files
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item FROM THE COMMAND LINE
-
-=back
-
-=item MAIN METHODS
-
-$batchconv = Pod::Simple::HTMLBatch->new;, $batchconv->batch_convert(
-I<indirs>, I<outdir> );, $batchconv->batch_convert( undef , ...);,
-$batchconv->batch_convert( q{@INC}, ...);, $batchconv->batch_convert(
-\@dirs , ...);, $batchconv->batch_convert( "somedir" , ...);,
-$batchconv->batch_convert( 'somedir:someother:also' , ...);,
-$batchconv->batch_convert( ... , undef );, $batchconv->batch_convert( ... ,
-'somedir' );
-
-=over 4
-
-=item ACCESSOR METHODS
-
-$batchconv->verbose( I<nonnegative_integer> );, $batchconv->index(
-I<true-or-false> );, $batchconv->contents_file( I<filename> );,
-$batchconv->contents_page_start( I<HTML_string> );,
-$batchconv->contents_page_end( I<HTML_string> );, $batchconv->add_css( $url
-);, $batchconv->add_javascript( $url );, $batchconv->css_flurry(
-I<true-or-false> );, $batchconv->javascript_flurry( I<true-or-false> );,
-$batchconv->no_contents_links( I<true-or-false> );,
-$batchconv->html_render_class( I<classname> );
-
-=back
-
-=item NOTES ON CUSTOMIZATION
-
-=item ASK ME!
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::LinkSection -- represent "section" attributes of L
-codes
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::Methody -- turn Pod::Simple events into method calls
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHOD CALLING
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::PullParser -- a pull-parser interface to parsing Pod
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-my $token = $parser->get_token, $parser->unget_token( $token ),
-$parser->unget_token( $token1, $token2, ... ), $parser->set_source(
-$filename ), $parser->set_source( $filehandle_object ),
-$parser->set_source( \$document_source ), $parser->set_source(
-\@document_lines ), $parser->parse_file(...),
-$parser->parse_string_document(...), $parser->filter(...),
-$parser->parse_from_file(...), my $title_string = $parser->get_title, my
-$title_string = $parser->get_short_title, $author_name =
-$parser->get_author, $description_name = $parser->get_description,
-$version_block = $parser->get_version
-
-=item NOTE
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::PullParserEndToken -- end-tokens from
-Pod::Simple::PullParser
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-$token->tagname, $token->tagname(I<somestring>), $token->tag(...),
-$token->is_tag(I<somestring>) or $token->is_tagname(I<somestring>)
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::PullParserStartToken -- start-tokens from
-Pod::Simple::PullParser
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-$token->tagname, $token->tagname(I<somestring>), $token->tag(...),
-$token->is_tag(I<somestring>) or $token->is_tagname(I<somestring>),
-$token->attr(I<attrname>), $token->attr(I<attrname>, I<newvalue>),
-$token->attr_hash
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::PullParserTextToken -- text-tokens from
-Pod::Simple::PullParser
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-$token->text, $token->text(I<somestring>), $token->text_r()
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::PullParserToken -- tokens from Pod::Simple::PullParser
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-$token->type, $token->is_start, $token->is_text, $token->is_end,
-$token->dump
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::RTF -- format Pod as RTF
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FORMAT CONTROL ATTRIBUTES
-
-$parser->head1_halfpoint_size( I<halfpoint_integer> );,
-$parser->head2_halfpoint_size( I<halfpoint_integer> );,
-$parser->head3_halfpoint_size( I<halfpoint_integer> );,
-$parser->head4_halfpoint_size( I<halfpoint_integer> );,
-$parser->codeblock_halfpoint_size( I<halfpoint_integer> );,
-$parser->header_halfpoint_size( I<halfpoint_integer> );,
-$parser->normal_halfpoint_size( I<halfpoint_integer> );,
-$parser->no_proofing_exemptions( I<true_or_false> );, $parser->doc_lang(
-I<microsoft_decimal_language_code> )
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::Search - find POD documents in directory trees
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTOR
-
-=item ACCESSORS
-
-$search->inc( I<true-or-false> );, $search->verbose( I<nonnegative-number>
-);, $search->limit_glob( I<some-glob-string> );, $search->callback(
-I<\&some_routine> );, $search->laborious( I<true-or-false> );,
-$search->shadows( I<true-or-false> );, $search->limit_re( I<some-regxp> );,
-$search->dir_prefix( I<some-string-value> );, $search->progress(
-I<some-progress-object> );, $name2path = $self->name2path;, $path2name =
-$self->path2name;
-
-=item MAIN SEARCH METHODS
-
-=over 4
-
-=item C<< $search->survey( @directories ) >>
-
-C<name2path>, C<path2name>
-
-=item C<< $search->simplify_name( $str ) >>
-
-=item C<< $search->find( $pod ) >>
-
-=item C<< $search->find( $pod, @search_dirs ) >>
-
-=item C<< $self->contains_pod( $file ) >>
-
-=back
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Pod::Simple::Subclassing -- write a formatter as a Pod::Simple
-subclass
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Events
-
-C<< $parser->_handle_element_start( I<element_name>, I<attr_hashref> ) >>,
-C<< $parser->_handle_element_end( I<element_name> ) >>, C<<
-$parser->_handle_text( I<text_string> ) >>, events with an element_name
-of Document, events with an element_name of Para, events with an
-element_name of B, C, F, or I, events with an element_name of S, events
-with an element_name of X, events with an element_name of L, events with an
-element_name of E or Z, events with an element_name of Verbatim, events
-with an element_name of head1 .. head4, events with an element_name of
-over-bullet, events with an element_name of over-number, events with an
-element_name of over-text, events with an element_name of over-block,
-events with an element_name of item-bullet, events with an element_name of
-item-number, events with an element_name of item-text, events with an
-element_name of for, events with an element_name of Data
-
-=item More Pod::Simple Methods
-
-C<< $parser->accept_targets( I<SOMEVALUE> ) >>, C<<
-$parser->accept_targets_as_text( I<SOMEVALUE> ) >>, C<<
-$parser->accept_codes( I<Codename>, I<Codename>... ) >>, C<<
-$parser->accept_directive_as_data( I<directive_name> ) >>, C<<
-$parser->accept_directive_as_verbatim( I<directive_name> ) >>, C<<
-$parser->accept_directive_as_processed( I<directive_name> ) >>, C<<
-$parser->nbsp_for_S( I<BOOLEAN> ); >>, C<< $parser->version_report() >>,
-C<< $parser->pod_para_count() >>, C<< $parser->line_count() >>, C<<
-$parser->nix_X_codes( I<SOMEVALUE> ) >>, C<< $parser->merge_text(
-I<SOMEVALUE> ) >>, C<< $parser->code_handler( I<CODE_REF> ) >>, C<<
-$parser->cut_handler( I<CODE_REF> ) >>, C<< $parser->whine(
-I<linenumber>, I<complaint string> ) >>, C<< $parser->scream(
-I<linenumber>, I<complaint string> ) >>, C<< $parser->source_dead(1) >>,
-C<< $parser->hide_line_numbers( I<SOMEVALUE> ) >>, C<< $parser->no_whining(
-I<SOMEVALUE> ) >>, C<< $parser->no_errata_section( I<SOMEVALUE> ) >>, C<<
-$parser->complain_stderr( I<SOMEVALUE> ) >>, C<< $parser->bare_output(
-I<SOMEVALUE> ) >>, C<< $parser->preserve_whitespace( I<SOMEVALUE> ) >>
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::Text -- format Pod as plaintext
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::TextContent -- get the text content of Pod
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Simple::XMLOutStream -- turn Pod into XML
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item ABOUT EXTENDING POD
-
-=item ASK ME!
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::SimpleTree, Pod::Simple::SimpleTree -- parse Pod into a simple
-parse tree
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=item Tree Contents
-
-=item SEE ALSO
-
-=item COPYRIGHT AND DISCLAIMERS
-
-=item AUTHOR
-
-=back
-
-=head2 Pod::Text - Convert POD data to formatted ASCII text
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-alt, code, indent, loose, margin, quotes, sentence, width
-
-=item DIAGNOSTICS
-
-Bizarre space in item, Item called without tag, Can't open %s for reading:
-%s, Invalid quote specification "%s"
-
-=item NOTES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Pod::Text::Color - Convert POD data to formatted color ASCII text
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item BUGS
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Pod::Text::Overstrike - Convert POD data to formatted overstrike
-text
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item BUGS
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Pod::Text::Termcap - Convert POD data to ASCII text with format
-escapes
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTES
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Pod::Usage, pod2usage() - print a usage message from embedded pod
-documentation
-
-=over 4
-
-=item SYNOPSIS
-
-=item ARGUMENTS
-
-C<-message>, C<-msg>, C<-exitval>, C<-verbose>, C<-sections>, C<-output>,
-C<-input>, C<-pathlist>, C<-noperldoc>
-
-=item DESCRIPTION
-
-=item EXAMPLES
-
-=over 4
-
-=item Recommended Use
-
-=back
-
-=item CAVEATS
-
-=item AUTHOR
-
-=item ACKNOWLEDGMENTS
-
-=back
-
-=head2 SDBM_File - Tied access to sdbm files
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-C<O_RDONLY>, C<O_WRONLY>, C<O_RDWR>
-
-=item DIAGNOSTICS
-
-=over 4
-
-=item C<sdbm store returned -1, errno 22, key "..." at ...>
-
-=back
-
-=item BUGS AND WARNINGS
-
-=back
-
-=head2 Safe - Compile and execute code in restricted compartments
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-a new namespace, an operator mask
-
-=item WARNING
-
-=over 4
-
-=item RECENT CHANGES
-
-=item Methods in class Safe
-
-permit (OP, ...), permit_only (OP, ...), deny (OP, ...), deny_only (OP,
-...), trap (OP, ...), untrap (OP, ...), share (NAME, ...), share_from
-(PACKAGE, ARRAYREF), varglob (VARNAME), reval (STRING), rdo (FILENAME),
-root (NAMESPACE), mask (MASK)
-
-=item Some Safety Issues
-
-Memory, CPU, Snooping, Signals, State Changes
-
-=item AUTHOR
-
-=back
-
-=back
-
-=head2 Scalar::Util - A selection of general-utility scalar subroutines
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-blessed EXPR, dualvar NUM, STRING, isvstring EXPR, isweak EXPR,
-looks_like_number EXPR, openhandle FH, refaddr EXPR, reftype EXPR,
-set_prototype CODEREF, PROTOTYPE, tainted EXPR, weaken REF
-
-=item KNOWN BUGS
-
-=item SEE ALSO
-
-=item COPYRIGHT
-
-=item BLATANT PLUG
-
-=back
-
-=head2 Search::Dict, look - search for key in dictionary file
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 SelectSaver - save and restore selected file handle
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=head2 SelfLoader - load functions only on demand
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item The __DATA__ token
-
-=item SelfLoader autoloading
-
-=item Autoloading and package lexicals
-
-=item SelfLoader and AutoLoader
-
-=item __DATA__, __END__, and the FOOBAR::DATA filehandle.
-
-=item Classes and inherited methods.
-
-=back
-
-=item Multiple packages and fully qualified subroutine names
-
-=back
-
-B<_make_cmd>
-
-=head2 Shell - run shell commands transparently within perl
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Caveats
-
-=item Escaping Magic Characters
-
-=item Configuration
-
-=back
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 Socket, sockaddr_in, sockaddr_un, inet_aton, inet_ntoa - load the C
-socket.h defines and structure manipulators
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-inet_aton HOSTNAME, inet_ntoa IP_ADDRESS, INADDR_ANY, INADDR_BROADCAST,
-INADDR_LOOPBACK, INADDR_NONE, sockaddr_family SOCKADDR, sockaddr_in PORT,
-ADDRESS, sockaddr_in SOCKADDR_IN, pack_sockaddr_in PORT, IP_ADDRESS,
-unpack_sockaddr_in SOCKADDR_IN, sockaddr_un PATHNAME, sockaddr_un
-SOCKADDR_UN, pack_sockaddr_un PATH, unpack_sockaddr_un SOCKADDR_UN
-
-=back
-
-=head2 Storable - persistence for Perl data structures
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item MEMORY STORE
-
-=item ADVISORY LOCKING
-
-=item SPEED
-
-=item CANONICAL REPRESENTATION
-
-=item CODE REFERENCES
-
-=item FORWARD COMPATIBILITY
-
-utf8 data, restricted hashes, files from future versions of Storable
-
-=item ERROR REPORTING
-
-=item WIZARDS ONLY
-
-=over 4
-
-=item Hooks
-
-C<STORABLE_freeze> I<obj>, I<cloning>, C<STORABLE_thaw> I<obj>, I<cloning>,
-I<serialized>, .., C<STORABLE_attach> I<class>, I<cloning>, I<serialized>
-
-=item Predicates
-
-C<Storable::last_op_in_netorder>, C<Storable::is_storing>,
-C<Storable::is_retrieving>
-
-=item Recursion
-
-=item Deep Cloning
-
-=back
-
-=item Storable magic
-
-$info = Storable::file_magic( $filename ), C<version>, C<version_nv>,
-C<major>, C<minor>, C<hdrsize>, C<netorder>, C<byteorder>, C<intsize>,
-C<longsize>, C<ptrsize>, C<nvsize>, C<file>, $info = Storable::read_magic(
-$buffer ), $info = Storable::read_magic( $buffer, $must_be_file )
-
-=item EXAMPLES
-
-=item WARNING
-
-=item BUGS
-
-=over 4
-
-=item 64 bit data in perl 5.6.0 and 5.6.1
-
-=back
-
-=item CREDITS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Switch - A switch statement for Perl
-
-=over 4
-
-=item VERSION
-
-=item SYNOPSIS
-
-=item BACKGROUND
-
-=item DESCRIPTION
-
-=over 4
-
-=item Allowing fall-through
-
-=item Automating fall-through
-
-=item Alternative syntax
-
-=item Higher-order Operations
-
-=back
-
-=item DEPENDENCIES
-
-=item AUTHOR
-
-=item BUGS
-
-=item LIMITATIONS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Symbol - manipulate Perl symbols and their names
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item BUGS
-
-=back
-
-=head2 Sys::Hostname - Try every conceivable way to get hostname
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=back
-
-=head2 Syslog, Sys::Syslog - Perl interface to the UNIX syslog(3) calls
-
-=over 4
-
-=item VERSION
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXPORTS
-
-=item FUNCTIONS
-
-B<openlog($ident, $logopt, $facility)>, B<syslog($priority, $message)>,
-B<syslog($priority, $format, @args)>, B<Note>,
-B<setlogmask($mask_priority)>, B<setlogsock($sock_type)>,
-B<setlogsock($sock_type, $stream_location)> (added in Perl 5.004_02),
-B<Note>, B<closelog()>
-
-=item THE RULES OF SYS::SYSLOG
-
-=item EXAMPLES
-
-=item CONSTANTS
-
-=over 4
-
-=item Facilities
-
-=item Levels
-
-=back
-
-=item DIAGNOSTICS
-
-C<Invalid argument passed to setlogsock>, C<eventlog passed to setlogsock,
-but no Win32 API available>, C<no connection to syslog available>, C<stream
-passed to setlogsock, but %s is not writable>, C<stream passed to
-setlogsock, but could not find any device>, C<tcp passed to setlogsock, but
-tcp service unavailable>, C<syslog: expecting argument %s>, C<syslog:
-invalid level/facility: %s>, C<syslog: too many levels given: %s>,
-C<syslog: too many facilities given: %s>, C<syslog: level must be given>,
-C<udp passed to setlogsock, but udp service unavailable>, C<unix passed to
-setlogsock, but path not available>
-
-=item SEE ALSO
-
-=over 4
-
-=item Manual Pages
-
-=item RFCs
-
-=item Articles
-
-=item Event Log
-
-=back
-
-=item AUTHORS & ACKNOWLEDGEMENTS
-
-=item BUGS
-
-=item SUPPORT
-
-AnnoCPAN: Annotated CPAN documentation, CPAN Ratings, RT: CPAN's request
-tracker, Search CPAN, Kobes' CPAN Search, Perl Documentation
-
-=item COPYRIGHT
-
-=item LICENSE
-
-=back
-
-=head2 Syslog::Syslog, Sys::Syslog - Perl interface to the UNIX syslog(3)
-calls
-
-=over 4
-
-=item VERSION
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXPORTS
-
-=item FUNCTIONS
-
-B<openlog($ident, $logopt, $facility)>, B<syslog($priority, $message)>,
-B<syslog($priority, $format, @args)>, B<Note>,
-B<setlogmask($mask_priority)>, B<setlogsock($sock_type)>,
-B<setlogsock($sock_type, $stream_location)> (added in Perl 5.004_02),
-B<Note>, B<closelog()>
-
-=item THE RULES OF SYS::SYSLOG
-
-=item EXAMPLES
-
-=item CONSTANTS
-
-=over 4
-
-=item Facilities
-
-=item Levels
-
-=back
-
-=item DIAGNOSTICS
-
-C<Invalid argument passed to setlogsock>, C<eventlog passed to setlogsock,
-but no Win32 API available>, C<no connection to syslog available>, C<stream
-passed to setlogsock, but %s is not writable>, C<stream passed to
-setlogsock, but could not find any device>, C<tcp passed to setlogsock, but
-tcp service unavailable>, C<syslog: expecting argument %s>, C<syslog:
-invalid level/facility: %s>, C<syslog: too many levels given: %s>,
-C<syslog: too many facilities given: %s>, C<syslog: level must be given>,
-C<udp passed to setlogsock, but udp service unavailable>, C<unix passed to
-setlogsock, but path not available>
-
-=item SEE ALSO
-
-=over 4
-
-=item Manual Pages
-
-=item RFCs
-
-=item Articles
-
-=item Event Log
-
-=back
-
-=item AUTHORS & ACKNOWLEDGEMENTS
-
-=item BUGS
-
-=item SUPPORT
-
-AnnoCPAN: Annotated CPAN documentation, CPAN Ratings, RT: CPAN's request
-tracker, Search CPAN, Kobes' CPAN Search, Perl Documentation
-
-=item COPYRIGHT
-
-=item LICENSE
-
-=back
-
-=head2 Syslog::win32::Win32, Sys::Syslog::Win32 - Win32 support for
-Sys::Syslog
-
-=over 4
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item LICENSE
-
-=back
-
-=head2 Term::ANSIColor - Color screen output using ANSI escape sequences
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item DIAGNOSTICS
-
-Bad escape sequence %s, Bareword "%s" not allowed while "strict subs" in
-use, Invalid attribute name %s, Name "%s" used only once: possible typo, No
-comma allowed after filehandle, No name for escape sequence %s
-
-=item ENVIRONMENT
-
-ANSI_COLORS_DISABLED
-
-=item RESTRICTIONS
-
-=item NOTES
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Term::Cap - Perl termcap interface
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item METHODS
-
-=back
-
-=back
-
-B<Tgetent>, OSPEED, TERM
-
-B<Tpad>, B<$string>, B<$cnt>, B<$FH>
-
-B<Tputs>, B<$cap>, B<$cnt>, B<$FH>
-
-B<Tgoto>, B<$cap>, B<$col>, B<$row>, B<$FH>
-
-B<Trequire>
-
-=over 4
-
-=item EXAMPLES
-
-=item COPYRIGHT AND LICENSE
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Term::Complete - Perl word completion module
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-E<lt>tabE<gt>, ^D, ^U, E<lt>delE<gt>, E<lt>bsE<gt>
-
-=item DIAGNOSTICS
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 Term::ReadLine - Perl interface to various C<readline> packages.
-If no real package is found, substitutes stubs instead of basic functions.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Minimal set of supported functions
-
-C<ReadLine>, C<new>, C<readline>, C<addhistory>, C<IN>, C<OUT>, C<MinLine>,
-C<findConsole>, Attribs, C<Features>
-
-=item Additional supported functions
-
-C<tkRunning>, C<ornaments>, C<newTTY>
-
-=item EXPORTS
-
-=item ENVIRONMENT
-
-=item CAVEATS
-
-=back
-
-=head2 Term::UI - Term::ReadLine UI made easy
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item HOW IT WORKS
-
-=item METHODS
-
-=over 4
-
-=item $reply = $term->get_reply( prompt => 'question?', [choices => \@list,
-default => $list[0], multi => BOOL, print_me => "extra text to print &
-record", allow => $ref] );
-
-=back
-
-=back
-
-=over 4
-
-=item $bool = $term->ask_yn( prompt => "your question", [default =>
-(y|1,n|0), print_me => "extra text to print & record"] )
-
-=back
-
-=over 4
-
-=item ($opts, $munged) = $term->parse_options( STRING );
-
-=back
-
-=over 4
-
-=item $str = $term->history_as_string
-
-=back
-
-=over 4
-
-=item GLOBAL VARIABLES
-
-=over 4
-
-=item $Term::UI::VERBOSE
-
-=item $Term::UI::AUTOREPLY
-
-=item $Term::UI::INVALID
-
-=item $Term::UI::History::HISTORY_FH
-
-=back
-
-=item EXAMPLES
-
-=over 4
-
-=item Basic get_reply sample
-
-=item get_reply with choices
-
-=item get_reply with choices and default
-
-=item get_reply using print_me & multi
-
-=item get_reply & allow
-
-=item an elaborate ask_yn sample
-
-=back
-
-=item See Also
-
-=item BUG REPORTS
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Term::UI::History
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS
-
-=over 4
-
-=item history("message string" [,VERBOSE])
-
-=back
-
-=back
-
-=over 4
-
-=item GLOBAL VARIABLES
-
-$HISTORY_FH
-
-=item See Also
-
-=item AUTHOR
-
-=item COPYRIGHT
-
-=back
-
-=head2 Test - provides a simple framework for writing test scripts
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item QUICK START GUIDE
-
-=over 4
-
-=item Functions
-
-C<plan(...)>, C<tests =E<gt> I<number>>, C<todo =E<gt> [I<1,5,14>]>,
-C<onfail =E<gt> sub { ... }>, C<onfail =E<gt> \&some_sub>
-
-=back
-
-=back
-
-B<_to_value>
-
-C<ok(...)>
-
-C<skip(I<skip_if_true>, I<args...>)>
-
-=over 4
-
-=item TEST TYPES
-
-NORMAL TESTS, SKIPPED TESTS, TODO TESTS
-
-=item ONFAIL
-
-=item BUGS and CAVEATS
-
-=item ENVIRONMENT
-
-=item NOTE
-
-=item SEE ALSO
-
-=item AUTHOR
-
-=back
-
-=head2 Test::Builder - Backend for building test libraries
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Construction
-
-B<new>
-
-=back
-
-=back
-
-B<create>
-
-B<reset>
-
-=over 4
-
-=item Setting up tests
-
-B<exported_to>
-
-=back
-
-B<plan>
-
-B<expected_tests>
-
-B<no_plan>
-
-B<has_plan>
-
-B<skip_all>
-
-=over 4
-
-=item Running tests
-
-B<ok>
-
-=back
-
-B<is_eq>, B<is_num>
-
-B<isnt_eq>, B<isnt_num>
-
-B<like>, B<unlike>
-
-B<cmp_ok>
-
-=over 4
-
-=item Other Testing Methods
-
-B<BAIL_OUT>
-
-=back
-
-B<skip>
-
-B<todo_skip>
-
-B<skip_rest>
-
-=over 4
-
-=item Test building utility methods
-
-B<maybe_regex>
-
-=back
-
-B<_try>
-
-B<is_fh>
-
-=over 4
-
-=item Test style
-
-B<level>
-
-=back
-
-B<use_numbers>
-
-B<no_diag>, B<no_ending>, B<no_header>
-
-=over 4
-
-=item Output
-
-B<diag>
-
-=back
-
-B<_print>
-
-B<_print_diag>
-
-B<output>, B<failure_output>, B<todo_output>
-
-carp, croak
-
-=over 4
-
-=item Test Status and Info
-
-B<current_test>
-
-=back
-
-B<summary>
-
-B<details>
-
-B<todo>
-
-B<caller>
-
-B<_sanity_check>
-
-B<_whoa>
-
-B<_my_exit>
-
-=over 4
-
-=item EXIT CODES
-
-=item THREADS
-
-=item EXAMPLES
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Test::Builder::Module - Base class for test modules
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Importing
-
-=back
-
-=back
-
-=over 4
-
-=item Builder
-
-=back
-
-=head2 Test::Builder::Tester - test testsuites that have been built with
-Test::Builder
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item Functions
-
-test_out, test_err
-
-=back
-
-test_fail
-
-test_diag
-
-test_test, title (synonym 'name', 'label'), skip_out, skip_err
-
-line_num
-
-color
-
-=over 4
-
-=item BUGS
-
-=item AUTHOR
-
-=item NOTES
-
-=item SEE ALSO
-
-=back
-
-=head2 Test::Builder::Tester::Color - turn on colour in
-Test::Builder::Tester
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item AUTHOR
-
-=item BUGS
-
-=item SEE ALSO
-
-=back
-
-=head2 Test::Harness - Run Perl standard test scripts with statistics
-
-=over 4
-
-=item VERSION
-
-=back
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Taint mode
-
-=item Configuration variables.
-
-C<$Test::Harness::Verbose>, C<$Test::Harness::switches>,
-C<$Test::Harness::Timer>
-
-=item Failure
-
-B<Failed Test>, B<Stat>, B<Wstat>, B<Total>, B<Fail>, B<List of Failed>
-
-=back
-
-=item FUNCTIONS
-
-=over 4
-
-=item runtests( @test_files )
-
-=back
-
-=back
-
-=over 4
-
-=item execute_tests( tests => \@test_files, out => \*FH )
-
-=back
-
-=over 4
-
-=item EXPORT
-
-=item DIAGNOSTICS
-
-C<All tests successful.\nFiles=%d, Tests=%d, %s>, C<FAILED tests
-%s\n\tFailed %d/%d tests, %.2f%% okay.>, C<Test returned status %d (wstat
-%d)>, C<Failed 1 test, %.2f%% okay. %s>, C<Failed %d/%d tests, %.2f%% okay.
-%s>, C<FAILED--Further testing stopped: %s>
-
-=item ENVIRONMENT VARIABLES THAT TEST::HARNESS SETS
-
-C<HARNESS_ACTIVE>, C<HARNESS_VERSION>
-
-=item ENVIRONMENT VARIABLES THAT AFFECT TEST::HARNESS
-
-C<HARNESS_COLUMNS>, C<HARNESS_COMPILE_TEST>, C<HARNESS_DEBUG>,
-C<HARNESS_FILELEAK_IN_DIR>, C<HARNESS_NOTTY>, C<HARNESS_PERL>,
-C<HARNESS_PERL_SWITCHES>, C<HARNESS_TIMER>, C<HARNESS_VERBOSE>,
-C<HARNESS_STRAP_CLASS>
-
-=item EXAMPLE
-
-=item SEE ALSO
-
-=item TODO
-
-=item BUGS
-
-=item SUPPORT
-
-AnnoCPAN: Annotated CPAN documentation, CPAN Ratings, RT: CPAN's request
-tracker, Search CPAN
-
-=item SOURCE CODE
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Test::Harness::Assert - simple assert
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS
-
-=over 4
-
-=item C<assert()>
-
-=back
-
-=back
-
-=over 4
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Test::Harness::Iterator - Internal Test::Harness Iterator
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item new()
-
-=item next()
-
-=back
-
-=back
-
-=head2 Test::Harness::Point - object for tracking a single test point
-
-=over 4
-
-=item SYNOPSIS
-
-=item CONSTRUCTION
-
-=over 4
-
-=item new()
-
-=back
-
-=back
-
-=over 4
-
-=item from_test_line( $line )
-
-=back
-
-=over 4
-
-=item ACCESSORS
-
-ok, number
-
-=back
-
-=head2 Test::Harness::Results - object for tracking results from a single
-test file
-
-=over 4
-
-=item SYNOPSIS
-
-=item CONSTRUCTION
-
-=over 4
-
-=item new()
-
-=back
-
-=back
-
-=over 4
-
-=item ACCESSORS
-
-wait, exit
-
-=back
-
-=head2 Test::Harness::Straps - detailed analysis of test results
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CONSTRUCTION
-
-=over 4
-
-=item new()
-
-=back
-
-=back
-
-=over 4
-
-=item ANALYSIS
-
-=over 4
-
-=item $strap->analyze( $name, \@output_lines )
-
-=back
-
-=back
-
-=over 4
-
-=item $strap->analyze_file( $test_file )
-
-=back
-
-=over 4
-
-=item Parsing
-
-=back
-
-=over 4
-
-=item EXAMPLES
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Test::Harness::TAP - Documentation for the TAP format
-
-=over 4
-
-=item SYNOPSIS
-
-=item TODO
-
-=item THE TAP FORMAT
-
-=item HARNESS BEHAVIOR
-
-=item TESTS LINES AND THE PLAN
-
-=over 4
-
-=item The plan
-
-=item The test line
-
-C<ok> or C<not ok>, Test number, Description, Directive, ok/not ok
-(required), Test number (recommended), Description (recommended), Directive
-(only when necessary)
-
-=back
-
-=item DIRECTIVES
-
-=over 4
-
-=item TODO tests
-
-=item Skipping tests
-
-=back
-
-=item OTHER LINES
-
-=over 4
-
-=item Bail out!
-
-=item Diagnostics
-
-=item Anything else
-
-=back
-
-=item EXAMPLES
-
-=over 4
-
-=item Common with explanation
-
-=item Unknown amount and failures
-
-=item Giving up
-
-=item Skipping a few
-
-=item Skipping everything
-
-=item Got spare tuits?
-
-=item Creative liberties
-
-=back
-
-=item Non-Perl TAP
-
-=over 4
-
-=item C/C++
-
-Specify a test plan, Run tests, Skip tests in certain situations, Have TODO
-tests, Produce TAP compatible diagnostics
-
-=item Python
-
-=item JavaScript
-
-=item PHP
-
-phpt, PHPUnit, SimpleTest, Apache-Test
-
-=back
-
-=item AUTHORS
-
-=item ACKNOWLEDGEMENTS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Test::Harness::Util - Utility functions for Test::Harness::*
-
-=over 4
-
-=item SYNOPSIS
-
-=item PUBLIC FUNCTIONS
-
-=over 4
-
-=item all_in( {parm => value, parm => value} )
-
-start, recurse
-
-=back
-
-=back
-
-=over 4
-
-=item shuffle( @list )
-
-=back
-
-=over 4
-
-=item blibdir()
-
-=back
-
-=head2 Test::More - yet another framework for writing test scripts
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item I love it when a plan comes together
-
-=back
-
-=back
-
-=over 4
-
-=item Test names
-
-=item I'm ok, you're not ok.
-
-B<ok>
-
-=back
-
-B<is>, B<isnt>
-
-B<like>
-
-B<unlike>
-
-B<cmp_ok>
-
-B<can_ok>
-
-B<isa_ok>
-
-B<pass>, B<fail>
-
-=over 4
-
-=item Module tests
-
-B<use_ok>
-
-=back
-
-B<require_ok>
-
-=over 4
-
-=item Complex data structures
-
-B<is_deeply>
-
-=back
-
-=over 4
-
-=item Diagnostics
-
-B<diag>
-
-=back
-
-=over 4
-
-=item Conditional tests
-
-B<SKIP: BLOCK>
-
-=back
-
-B<TODO: BLOCK>, B<todo_skip>
-
-When do I use SKIP vs. TODO?
-
-=over 4
-
-=item Test control
-
-B<BAIL_OUT>
-
-=back
-
-=over 4
-
-=item Discouraged comparison functions
-
-B<eq_array>
-
-=back
-
-B<eq_hash>
-
-B<eq_set>
-
-=over 4
-
-=item Extending and Embedding Test::More
-
-B<builder>
-
-=back
-
-=over 4
-
-=item EXIT CODES
-
-=item CAVEATS and NOTES
-
-Backwards compatibility, Overloaded objects, Threads, Test::Harness upgrade
-
-=item HISTORY
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item BUGS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Test::Simple - Basic utilities for writing tests.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-B<ok>
-
-=back
-
-=over 4
-
-=item EXAMPLE
-
-=item CAVEATS
-
-=item NOTES
-
-=item HISTORY
-
-=item SEE ALSO
-
-L<Test::More>, L<Test>, L<Test::Unit>, L<Test::Inline>, L<SelfTest>,
-L<Test::Harness>
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Test::Tutorial - A tutorial about writing really basic tests
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Nuts and bolts of testing.
-
-=item Where to start?
-
-=item Names
-
-=item Test the manual
-
-=item Sometimes the tests are wrong
-
-=item Testing lots of values
-
-=item Informative names
-
-=item Skipping tests
-
-=item Todo tests
-
-=item Testing with taint mode.
-
-=back
-
-=item FOOTNOTES
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Text::Abbrev, abbrev - create an abbreviation table from a list
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXAMPLE
-
-=back
-
-=head2 Text::Balanced - Extract delimited text sequences from strings.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item General behaviour in list contexts
-
-[0], [1], [2]
-
-=item General behaviour in scalar and void contexts
-
-=item A note about prefixes
-
-=item C<extract_delimited>
-
-=item C<extract_bracketed>
-
-=item C<extract_variable>
-
-[0], [1], [2]
-
-=item C<extract_tagged>
-
-C<reject =E<gt> $listref>, C<ignore =E<gt> $listref>, C<fail =E<gt> $str>,
-[0], [1], [2], [3], [4], [5]
-
-=item C<gen_extract_tagged>
-
-=item C<extract_quotelike>
-
-[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10]
-
-=item C<extract_quotelike> and "here documents"
-
-[0], [1], [2], [3], [4], [5], [6], [7..10]
-
-=item C<extract_codeblock>
-
-=item C<extract_multiple>
-
-=item C<gen_delimited_pat>
-
-=item C<delimited_pat>
-
-=back
-
-=item DIAGNOSTICS
-
- C<Did not find a suitable bracket: "%s">, C<Did not find prefix: /%s/>,
-C<Did not find opening bracket after prefix: "%s">, C<No quotelike
-operator found after prefix: "%s">, C<Unmatched closing bracket: "%c">,
-C<Unmatched opening bracket(s): "%s">, C<Unmatched embedded quote (%s)>,
-C<Did not find closing delimiter to match '%s'>, C<Mismatched closing
-bracket: expected "%c" but found "%s">, C<No block delimiter found after
-quotelike "%s">, C<Did not find leading dereferencer>, C<Bad identifier
-after dereferencer>, C<Did not find expected opening bracket at %s>,
-C<Improperly nested codeblock at %s>, C<Missing second block for quotelike
-"%s">, C<No match found for opening bracket>, C<Did not find opening tag:
-/%s/>, C<Unable to construct closing tag to match: /%s/>, C<Found invalid
-nested tag: %s>, C<Found unbalanced nested tag: %s>, C<Did not find closing
-tag>
-
-=item AUTHOR
-
-=item BUGS AND IRRITATIONS
-
-=item COPYRIGHT
-
-=back
-
-=head2 Text::ParseWords - parse text into an array of tokens or array of
-arrays
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXAMPLES
-
-=item AUTHORS
-
-=back
-
-=head2 Text::Soundex - Implementation of the soundex algorithm.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXAMPLES
-
-=item LIMITATIONS
-
-=item MAINTAINER
-
-=item HISTORY
-
-=back
-
-=head2 Text::Tabs -- expand and unexpand tabs per the unix expand(1) and
-unexpand(1)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXAMPLE
-
-=item LICENSE
-
-=back
-
-=head2 Text::Wrap - line wrapping to form simple paragraphs
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item OVERRIDES
-
-=item EXAMPLES
-
-=item LICENSE
-
-=back
-
-=head2 Thread - Manipulate threads in Perl (for old code only)
-
-=over 4
-
-=item DEPRECATED
-
-=item HISTORY
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS
-
-$thread = Thread->new(\&start_sub), $thread = Thread->new(\&start_sub,
-LIST), lock VARIABLE, async BLOCK;, Thread->self, Thread->list, cond_wait
-VARIABLE, cond_signal VARIABLE, cond_broadcast VARIABLE, yield
-
-=item METHODS
-
-join, detach, equal, tid, done
-
-=item DEFUNCT
-
-lock(\&sub), eval, flags
-
-=item SEE ALSO
-
-=back
-
-=head2 Thread::Queue - thread-safe queues
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS AND METHODS
-
-new, enqueue LIST, dequeue, dequeue_nb, pending
-
-=item SEE ALSO
-
-=back
-
-=head2 Thread::Semaphore - thread-safe semaphores
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS AND METHODS
-
-new, new NUMBER, down, down NUMBER, up, up NUMBER
-
-=back
-
-=head2 Tie::Array - base class for tied arrays
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-TIEARRAY classname, LIST, STORE this, index, value, FETCH this, index,
-FETCHSIZE this, STORESIZE this, count, EXTEND this, count, EXISTS this,
-key, DELETE this, key, CLEAR this, DESTROY this, PUSH this, LIST, POP this,
-SHIFT this, UNSHIFT this, LIST, SPLICE this, offset, length, LIST
-
-=item CAVEATS
-
-=item AUTHOR
-
-=back
-
-=head2 Tie::File - Access the lines of a disk file via a Perl array
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item C<recsep>
-
-=item C<autochomp>
-
-=item C<mode>
-
-=item C<memory>
-
-=item C<dw_size>
-
-=item Option Format
-
-=back
-
-=item Public Methods
-
-=over 4
-
-=item C<flock>
-
-=item C<autochomp>
-
-=item C<defer>, C<flush>, C<discard>, and C<autodefer>
-
-=item C<offset>
-
-=back
-
-=item Tying to an already-opened filehandle
-
-=item Deferred Writing
-
-=over 4
-
-=item Autodeferring
-
-=back
-
-=item CONCURRENT ACCESS TO FILES
-
-=item CAVEATS
-
-=item SUBCLASSING
-
-=item WHAT ABOUT C<DB_File>?
-
-=item AUTHOR
-
-=item LICENSE
-
-=item WARRANTY
-
-=item THANKS
-
-=item TODO
-
-=back
-
-=head2 Tie::Handle - base class definitions for tied handles
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-TIEHANDLE classname, LIST, WRITE this, scalar, length, offset, PRINT this,
-LIST, PRINTF this, format, LIST, READ this, scalar, length, offset,
-READLINE this, GETC this, CLOSE this, OPEN this, filename, BINMODE this,
-EOF this, TELL this, SEEK this, offset, whence, DESTROY this
-
-=item MORE INFORMATION
-
-=item COMPATIBILITY
-
-=back
-
-=head2 Tie::Hash, Tie::StdHash, Tie::ExtraHash - base class definitions for
-tied hashes
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-TIEHASH classname, LIST, STORE this, key, value, FETCH this, key, FIRSTKEY
-this, NEXTKEY this, lastkey, EXISTS this, key, DELETE this, key, CLEAR
-this, SCALAR this
-
-=item Inheriting from B<Tie::StdHash>
-
-=item Inheriting from B<Tie::ExtraHash>
-
-=item C<SCALAR>, C<UNTIE> and C<DESTROY>
-
-=item MORE INFORMATION
-
-=back
-
-=head2 Tie::Hash::NamedCapture - Named regexp capture buffers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=back
-
-=head2 Tie::Memoize - add data to hash when needed
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item Inheriting from B<Tie::Memoize>
-
-=item EXAMPLE
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 Tie::RefHash - use references as hash keys
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item EXAMPLE
-
-=item THREAD SUPPORT
-
-=item STORABLE SUPPORT
-
-=item RELIC SUPPORT
-
-=item MAINTAINER
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Tie::Scalar, Tie::StdScalar - base class definitions for tied
-scalars
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-TIESCALAR classname, LIST, FETCH this, STORE this, value, DESTROY this
-
-=item MORE INFORMATION
-
-=back
-
-=head2 Tie::SubstrHash - Fixed-table-size, fixed-key-length hashing
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item CAVEATS
-
-=back
-
-=head2 Time::HiRes - High resolution alarm, sleep, gettimeofday, interval
-timers
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-gettimeofday (), usleep ( $useconds ), nanosleep ( $nanoseconds ), ualarm (
-$useconds [, $interval_useconds ] ), tv_interval, time (), sleep (
-$floating_seconds ), alarm ( $floating_seconds [,
-$interval_floating_seconds ] ), setitimer ( $which, $floating_seconds [,
-$interval_floating_seconds ] ), getitimer ( $which ), clock_gettime (
-$which ), clock_getres ( $which ), clock_nanosleep ( $which, $nanoseconds,
-$flags = 0), clock(), stat, stat FH, stat EXPR
-
-=item EXAMPLES
-
-=item C API
-
-=item DIAGNOSTICS
-
-=over 4
-
-=item useconds or interval more than ...
-
-=item negative time not invented yet
-
-=item internal error: useconds < 0 (unsigned ... signed ...)
-
-=back
-
-=item CAVEATS
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item COPYRIGHT AND LICENSE
-
-=back
-
-=head2 Time::Local - efficiently compute time from local and GMT time
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item FUNCTIONS
-
-=over 4
-
-=item C<timelocal()> and C<timegm()>
-
-=item C<timelocal_nocheck()> and C<timegm_nocheck()>
-
-=item Year Value Interpretation
-
-=item Limits of time_t
-
-=item Ambiguous Local Times (DST)
-
-=item Non-Existent Local Times (DST)
-
-=item Negative Epoch Values
-
-=back
-
-=item IMPLEMENTATION
-
-=item BUGS
-
-=item SUPPORT
-
-=item COPYRIGHT
-
-=item AUTHOR
-
-=back
-
-=head2 Time::Piece - Object Oriented time objects
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item USAGE
-
-=over 4
-
-=item Local Locales
-
-=item Date Calculations
-
-=item Date Comparisons
-
-=item Date Parsing
-
-=item YYYY-MM-DDThh:mm:ss
-
-=item Week Number
-
-=item Global Overriding
-
-=back
-
-=item AUTHOR
-
-=item License
-
-=item SEE ALSO
-
-=item BUGS
-
-=back
-
-=head2 Time::Piece::Seconds, Time::Seconds - a simple API to convert
-seconds to other date values
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=item AUTHOR
-
-=item LICENSE
-
-=item Bugs
-
-=back
-
-=head2 Time::Seconds - a simple API to convert seconds to other date values
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item METHODS
-
-=item AUTHOR
-
-=item LICENSE
-
-=item Bugs
-
-=back
-
-=head2 Time::gmtime - by-name interface to Perl's built-in gmtime()
-function
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTE
-
-=item AUTHOR
-
-=back
-
-=head2 Time::localtime - by-name interface to Perl's built-in localtime()
-function
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTE
-
-=item AUTHOR
-
-=back
-
-=head2 Time::tm - internal object used by Time::gmtime and Time::localtime
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item AUTHOR
-
-=back
-
-=head2 UNIVERSAL - base class for ALL classes (blessed references)
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-C<< $obj->isa( TYPE ) >>, C<< CLASS->isa( TYPE ) >>, C<< eval { VAL->isa(
-TYPE ) } >>, C<TYPE>, C<$obj>, C<CLASS>, C<VAL>, C<< $obj->DOES( ROLE ) >>,
-C<< CLASS->DOES( ROLE ) >>, C<< $obj->can( METHOD ) >>, C<< CLASS->can(
-METHOD ) >>, C<< eval { VAL->can( METHOD ) } >>, C<VERSION ( [ REQUIRE ] )>
-
-=item EXPORTS
-
-=back
-
-=head2 Unicode::Collate - Unicode Collation Algorithm
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Constructor and Tailoring
-
-UCA_Version, alternate, backwards, entry, hangul_terminator, ignoreChar,
-ignoreName, katakana_before_hiragana, level, normalization, overrideCJK,
-overrideHangul, preprocess, rearrange, table, undefChar, undefName,
-upper_before_lower, variable
-
-=item Methods for Collation
-
-C<@sorted = $Collator-E<gt>sort(@not_sorted)>, C<$result =
-$Collator-E<gt>cmp($a, $b)>, C<$result = $Collator-E<gt>eq($a, $b)>,
-C<$result = $Collator-E<gt>ne($a, $b)>, C<$result = $Collator-E<gt>lt($a,
-$b)>, C<$result = $Collator-E<gt>le($a, $b)>, C<$result =
-$Collator-E<gt>gt($a, $b)>, C<$result = $Collator-E<gt>ge($a, $b)>,
-C<$sortKey = $Collator-E<gt>getSortKey($string)>, C<$sortKeyForm =
-$Collator-E<gt>viewSortKey($string)>
-
-=item Methods for Searching
-
-C<$position = $Collator-E<gt>index($string, $substring[, $position])>,
-C<($position, $length) = $Collator-E<gt>index($string, $substring[,
-$position])>, C<$match_ref = $Collator-E<gt>match($string, $substring)>,
-C<($match) = $Collator-E<gt>match($string, $substring)>, C<@match =
-$Collator-E<gt>gmatch($string, $substring)>, C<$count =
-$Collator-E<gt>subst($string, $substring, $replacement)>, C<$count =
-$Collator-E<gt>gsubst($string, $substring, $replacement)>
-
-=item Other Methods
-
-C<%old_tailoring = $Collator-E<gt>change(%new_tailoring)>, C<$version =
-$Collator-E<gt>version()>, C<UCA_Version()>, C<Base_Unicode_Version()>
-
-=back
-
-=item EXPORT
-
-=item INSTALL
-
-=item CAVEATS
-
-Normalization, Conformance Test
-
-=item AUTHOR, COPYRIGHT AND LICENSE
-
-=item SEE ALSO
-
-Unicode Collation Algorithm - UTS #10, The Default Unicode Collation
-Element Table (DUCET), The conformance test for the UCA, Hangul Syllable
-Type, Unicode Normalization Forms - UAX #15
-
-=back
-
-=head2 Unicode::Normalize - Unicode Normalization Forms
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Normalization Forms
-
-C<$NFD_string = NFD($string)>, C<$NFC_string = NFC($string)>,
-C<$NFKD_string = NFKD($string)>, C<$NFKC_string = NFKC($string)>,
-C<$FCD_string = FCD($string)>, C<$FCC_string = FCC($string)>,
-C<$normalized_string = normalize($form_name, $string)>
-
-=item Decomposition and Composition
-
-C<$decomposed_string = decompose($string [, $useCompatMapping])>,
-C<$reordered_string = reorder($string)>, C<$composed_string =
-compose($string)>
-
-=item Quick Check
-
-C<$result = checkNFD($string)>, C<$result = checkNFC($string)>, C<$result =
-checkNFKD($string)>, C<$result = checkNFKC($string)>, C<$result =
-checkFCD($string)>, C<$result = checkFCC($string)>, C<$result =
-check($form_name, $string)>
-
-=item Character Data
-
-C<$canonical_decomposition = getCanon($code_point)>,
-C<$compatibility_decomposition = getCompat($code_point)>,
-C<$code_point_composite = getComposite($code_point_here,
-$code_point_next)>, C<$combining_class = getCombinClass($code_point)>,
-C<$may_be_composed_with_prev_char = isComp2nd($code_point)>,
-C<$is_exclusion = isExclusion($code_point)>, C<$is_singleton =
-isSingleton($code_point)>, C<$is_non_starter_decomposition =
-isNonStDecomp($code_point)>, C<$is_Full_Composition_Exclusion =
-isComp_Ex($code_point)>, C<$NFD_is_NO = isNFD_NO($code_point)>,
-C<$NFC_is_NO = isNFC_NO($code_point)>, C<$NFC_is_MAYBE =
-isNFC_MAYBE($code_point)>, C<$NFKD_is_NO = isNFKD_NO($code_point)>,
-C<$NFKC_is_NO = isNFKC_NO($code_point)>, C<$NFKC_is_MAYBE =
-isNFKC_MAYBE($code_point)>
-
-=back
-
-=item EXPORT
-
-=item CAVEATS
-
-Perl's version vs. Unicode version, Correction of decomposition mapping,
-Revised definition of canonical composition
-
-=item AUTHOR
-
-=item SEE ALSO
-
-http://www.unicode.org/reports/tr15/,
-http://www.unicode.org/Public/UNIDATA/CompositionExclusions.txt,
-http://www.unicode.org/Public/UNIDATA/DerivedNormalizationProps.txt,
-http://www.unicode.org/Public/UNIDATA/NormalizationCorrections.txt,
-http://www.unicode.org/review/pr-29.html, http://www.unicode.org/notes/tn5/
-
-=back
-
-=head2 Unicode::UCD - Unicode character database
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=back
-
-=over 4
-
-=item charinfo
-
-=back
-
-=over 4
-
-=item charblock
-
-=back
-
-=over 4
-
-=item charscript
-
-=back
-
-=over 4
-
-=item charblocks
-
-=back
-
-=over 4
-
-=item charscripts
-
-=back
-
-=over 4
-
-=item Blocks versus Scripts
-
-=item Matching Scripts and Blocks
-
-=item Code Point Arguments
-
-=item charinrange
-
-=back
-
-=over 4
-
-=item general_categories
-
-=back
-
-=over 4
-
-=item bidi_types
-
-=back
-
-=over 4
-
-=item compexcl
-
-=back
-
-=over 4
-
-=item casefold
-
-=back
-
-=over 4
-
-=item casespec
-
-=back
-
-=over 4
-
-=item namedseq()
-
-=back
-
-=over 4
-
-=item Unicode::UCD::UnicodeVersion
-
-=back
-
-=over 4
-
-=item Implementation Note
-
-=back
-
-=over 4
-
-=item BUGS
-
-=item AUTHOR
-
-=back
-
-=head2 User::grent - by-name interface to Perl's built-in getgr*()
-functions
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item NOTE
-
-=item AUTHOR
-
-=back
-
-=head2 User::pwent - by-name interface to Perl's built-in getpw*()
-functions
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item System Specifics
-
-=back
-
-=item NOTE
-
-=item AUTHOR
-
-=item HISTORY
-
-March 18th, 2000
-
-=back
-
-=head2 Win32 - Interfaces to some Win32 API Functions
-
-=over 4
-
-=item DESCRIPTION
-
-=over 4
-
-=item Alphabetical Listing of Win32 Functions
-
-Win32::AbortSystemShutdown(MACHINE), Win32::BuildNumber(),
-Win32::CopyFile(FROM, TO, OVERWRITE), Win32::CreateDirectory(DIRECTORY),
-Win32::CreateFile(FILE), Win32::DomainName(),
-Win32::ExpandEnvironmentStrings(STRING), Win32::FormatMessage(ERRORCODE),
-Win32::FsType(), Win32::FreeLibrary(HANDLE),
-Win32::GetANSIPathName(FILENAME), Win32::GetArchName(),
-Win32::GetChipName(), Win32::GetCwd(), Win32::GetCurrentThreadId(),
-Win32::GetFileVersion(FILENAME), Win32::GetFolderPath(FOLDER [, CREATE]),
-Win32::GetFullPathName(FILENAME), Win32::GetLastError(),
-Win32::GetLongPathName(PATHNAME), Win32::GetNextAvailDrive(),
-Win32::GetOSVersion(), Win32::GetOSName(),
-Win32::GetShortPathName(PATHNAME), Win32::GetProcAddress(INSTANCE,
-PROCNAME), Win32::GetTickCount(), Win32::GuidGen(), Win32::IsAdminUser(),
-Win32::IsWinNT(), Win32::IsWin95(), Win32::LoadLibrary(LIBNAME),
-Win32::LoginName(), Win32::LookupAccountName(SYSTEM, ACCOUNT, DOMAIN, SID,
-SIDTYPE), Win32::LookupAccountSID(SYSTEM, SID, ACCOUNT, DOMAIN, SIDTYPE),
-Win32::MsgBox(MESSAGE [, FLAGS [, TITLE]]), Win32::NodeName(),
-Win32::OutputDebugString(STRING), Win32::RegisterServer(LIBRARYNAME),
-Win32::SetChildShowWindow(SHOWWINDOW), Win32::SetCwd(NEWDIRECTORY),
-Win32::SetLastError(ERROR), Win32::Sleep(TIME), Win32::Spawn(COMMAND, ARGS,
-PID), Win32::UnregisterServer(LIBRARYNAME)
-
-=back
-
-=back
-
-=head2 Win32API::File - Low-level access to Win32 system API calls for
-files/dirs.
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Object Oriented/Tied Handle Interface
-
-=item Exports
-
-C<":Func">, attrLetsToBits, C<$uBits= attrLetsToBits( $sAttributeLetters
-)>, C<"a">, C<"c">, C<"h">, C<"o">, C<"r">, C<"s">, C<"t">, createFile,
-C<$hObject= createFile( $sPath )>, C<$hObject= createFile( $sPath,
-$rvhvOptions )>, C<$hObject= createFile( $sPath, $svAccess )>, C<$hObject=
-createFile( $sPath, $svAccess, $rvhvOptions )>, C<$hObject= createFile(
-$sPath, $svAccess, $svShare )>, C<$hObject= createFile( $sPath, $svAccess,
-$svShare, $rvhvOptions )>, C<"q">, C<"r">, C<"w">, C<"k">, C<"t">, C<"n">,
-C<"c">, C<"e">, C<"kc">, C<"ke">, C<"tc">, C<"te">, C<"nc">, C<"ne">, Flags
-=> $uFlags, Attributes => $sAttributes, Security => $pSecurityAttributes,
-Model => $hModelFile, Access => $sAccess, Access => $uAccess, Create =>
-$sCreate, Create => $uCreate, Share => $sShare, Share => $uShare,
-getLogicalDrives, C<@roots= getLogicalDrives()>, CloseHandle,
-C<CloseHandle( $hObject )>, CopyFile, C<CopyFile( $sOldFileName,
-$sNewFileName, $bFailIfExists )>, CreateFile, C<$hObject= CreateFile(
-$sPath, $uAccess, $uShare, $pSecAttr, $uCreate, $uFlags, $hModel )>,
-C<"//./PhysicalDrive0">, C<"//./C:">, C<"//./A:">, C<"//./PIPE/PipeName">,
-DefineDosDevice, C<DefineDosDevice( $uFlags, $sDosDeviceName, $sTargetPath
-)>, C<DDD_RAW_TARGET_PATH>, C<DDD_REMOVE_DEFINITION>,
-C<DDD_EXACT_MATCH_ON_REMOVE>, DeleteFile, C<DeleteFile( $sFileName )>,
-DeviceIoControl, C<DeviceIoControl( $hDevice, $uIoControlCode, $pInBuf,
-$lInBuf, $opOutBuf, $lOutBuf, $olRetBytes, $pOverlapped )>, FdGetOsFHandle,
-C<$hNativeHandle= FdGetOsFHandle( $ivFd )>, fileConstant, C<$value=
-fileConstant( $sConstantName )>, fileLastError, C<$svError=
-fileLastError();>, C<fileLastError( $uError );>, GetDriveType,
-C<$uDriveType= GetDriveType( $sRootPath )>, C<DRIVE_UNKNOWN>,
-C<DRIVE_NO_ROOT_DIR>, C<DRIVE_REMOVABLE>, C<DRIVE_FIXED>, C<DRIVE_REMOTE>,
-C<DRIVE_CDROM>, C<DRIVE_RAMDISK>, GetFileAttributes, C<$uAttrs =
-GetFileAttributes( $sPath )>, C<FILE_ATTRIBUTE_ARCHIVE>,
-C<FILE_ATTRIBUTE_COMPRESSED>, C<FILE_ATTRIBUTE_DEVICE>,
-C<FILE_ATTRIBUTE_DIRECTORY>, C<FILE_ATTRIBUTE_ENCRYPTED>,
-C<FILE_ATTRIBUTE_HIDDEN>, C<FILE_ATTRIBUTE_NORMAL>,
-C<FILE_ATTRIBUTE_NOT_CONTENT_INDEXED>, C<FILE_ATTRIBUTE_OFFLINE>,
-C<FILE_ATTRIBUTE_READONLY>, C<FILE_ATTRIBUTE_REPARSE_POINT>,
-C<FILE_ATTRIBUTE_SPARSE_FILE>, C<FILE_ATTRIBUTE_SYSTEM>,
-C<FILE_ATTRIBUTE_TEMPORARY>, GetFileType, C<$uFileType= GetFileType( $hFile
-)>, C<FILE_TYPE_UNKNOWN>, C<FILE_TYPE_DISK>, C<FILE_TYPE_CHAR>,
-C<FILE_TYPE_PIPE>, getFileSize, C<$size= getFileSize( $hFile )>,
-GetFileSize, C<$iSizeLow= GetFileSize($win32Handle, $iSizeHigh)>,
-GetOverlappedResult, C<$bRetval= GetOverlappedResult( $win32Handle,
-$pOverlapped, $numBytesTransferred, $bWait )>, GetLogicalDrives,
-C<$uDriveBits= GetLogicalDrives()>, GetLogicalDriveStrings, C<$olOutLength=
-GetLogicalDriveStrings( $lBufSize, $osBuffer )>, GetHandleInformation,
-C<GetHandleInformation( $hObject, $ouFlags )>, GetOsFHandle,
-C<$hNativeHandle= GetOsFHandle( FILE )>, GetVolumeInformation,
-C<GetVolumeInformation( $sRootPath, $osVolName, $lVolName, $ouSerialNum,
-$ouMaxNameLen, $ouFsFlags, $osFsType, $lFsType )>, C<FS_CASE_IS_PRESERVED>,
-C<FS_CASE_SENSITIVE>, C<FS_UNICODE_STORED_ON_DISK>, C<FS_PERSISTENT_ACLS>,
-C<FS_FILE_COMPRESSION>, C<FS_VOL_IS_COMPRESSED>, IsRecognizedPartition,
-C<IsRecognizedPartition( $ivPartitionType )>, IsContainerPartition,
-C<IsContainerPartition( $ivPartitionType )>, MoveFile, C<MoveFile(
-$sOldName, $sNewName )>, MoveFileEx, C<MoveFileEx( $sOldName, $sNewName,
-$uFlags )>, C<MOVEFILE_REPLACE_EXISTING>, C<MOVEFILE_COPY_ALLOWED>,
-C<MOVEFILE_DELAY_UNTIL_REBOOT>, C<MOVEFILE_WRITE_THROUGH>, OsFHandleOpen,
-C<OsFHandleOpen( FILE, $hNativeHandle, $sMode )>, OsFHandleOpenFd, C<$ivFD=
-OsFHandleOpenFd( $hNativeHandle, $uMode )>, QueryDosDevice, C<$olTargetLen=
-QueryDosDevice( $sDosDeviceName, $osTargetPath, $lTargetBuf )>, ReadFile,
-C<ReadFile( $hFile, $opBuffer, $lBytes, $olBytesRead, $pOverlapped )>,
-SetErrorMode, C<$uOldMode= SetErrorMode( $uNewMode )>,
-C<SEM_FAILCRITICALERRORS>, C<SEM_NOALIGNMENTFAULTEXCEPT>,
-C<SEM_NOGPFAULTERRORBOX>, C<SEM_NOOPENFILEERRORBOX>, setFilePointer,
-C<$uNewPos = setFilePointer( $hFile, $ivOffset, $uFromWhere )>,
-SetFilePointer, C<$uNewPos = SetFilePointer( $hFile, $ivOffset,
-$ioivOffsetHigh, $uFromWhere )>, SetHandleInformation,
-C<SetHandleInformation( $hObject, $uMask, $uFlags )>, WriteFile,
-C<WriteFile( $hFile, $pBuffer, $lBytes, $ouBytesWritten, $pOverlapped )>,
-C<":FuncA">, C<":FuncW">, CopyFileW, C<CopyFileW( $swOldFileName,
-$swNewFileName, $bFailIfExists )>, CreateFileW, C<$hObject= CreateFileW(
-$swPath, $uAccess, $uShare, $pSecAttr, $uCreate, $uFlags, $hModel )>,
-DefineDosDeviceW, C<DefineDosDeviceW( $uFlags, $swDosDeviceName,
-$swTargetPath )>, DeleteFileW, C<DeleteFileW( $swFileName )>,
-GetDriveTypeW, C<$uDriveType= GetDriveTypeW( $swRootPath )>,
-GetFileAttributesW, C<$uAttrs= GetFileAttributesW( $swPath )>,
-GetLogicalDriveStringsW, C<$olwOutLength= GetLogicalDriveStringsW(
-$lwBufSize, $oswBuffer )>, GetVolumeInformationW, C<GetVolumeInformationW(
-$swRootPath, $oswVolName, $lwVolName, $ouSerialNum, $ouMaxNameLen,
-$ouFsFlags, $oswFsType, $lwFsType )>, MoveFileW, C<MoveFileW( $swOldName,
-$swNewName )>, MoveFileExW, C<MoveFileExW( $swOldName, $swNewName, $uFlags
-)>, QueryDosDeviceW, C<$olwTargetLen= QueryDosDeviceW( $swDeviceName,
-$oswTargetPath, $lwTargetBuf )>, C<":Misc">, C<":DDD_">, C<":DRIVE_">,
-C<":FILE_">, C<":FILE_ATTRIBUTE_">, C<":FILE_FLAG_">, C<":FILE_SHARE_">,
-C<":FILE_TYPE_">, C<":FS_">, C<":HANDLE_FLAG_">, HANDLE_FLAG_INHERIT,
-HANDLE_FLAG_PROTECT_FROM_CLOSE, C<":IOCTL_STORAGE_">,
-C<IOCTL_STORAGE_CHECK_VERIFY>, C<IOCTL_STORAGE_MEDIA_REMOVAL>,
-C<IOCTL_STORAGE_EJECT_MEDIA>, C<IOCTL_STORAGE_LOAD_MEDIA>,
-C<IOCTL_STORAGE_RESERVE>, C<IOCTL_STORAGE_RELEASE>,
-C<IOCTL_STORAGE_FIND_NEW_DEVICES>, C<IOCTL_STORAGE_GET_MEDIA_TYPES>,
-C<$ucCylsLow[$i]>, C<$ivcCylsHigh[$i]>, C<$uMediaType[$i]>,
-C<$uTracksPerCyl[$i]>, C<$uSectsPerTrack[$i]>, C<$uBytesPerSect[$i]>,
-C<":IOCTL_DISK_">, C<IOCTL_DISK_GET_DRIVE_GEOMETRY>, C<$ucCylsLow>,
-C<$ivcCylsHigh>, C<$uMediaType>, C<$uTracksPerCyl>, C<$uSectsPerTrack>,
-C<$uBytesPerSect>, C<IOCTL_DISK_GET_PARTITION_INFO>, C<$uStartLow> and
-C<$ivStartHigh>, C<$ucHiddenSects>, C<$uPartitionSeqNumber>,
-C<$uPartitionType>, C<$bActive>, C<$bRecognized>, C<$bToRewrite>,
-C<IOCTL_DISK_SET_PARTITION_INFO>, C<IOCTL_DISK_GET_DRIVE_LAYOUT>,
-C<$cPartitions>, C<$uDiskSignature>, C<IOCTL_DISK_GET_MEDIA_TYPES>,
-C<IOCTL_DISK_SET_DRIVE_LAYOUT>, C<IOCTL_DISK_VERIFY>, C<$uStartOffsetLow>
-and C<$ivStartOffsetHigh>, C<$uLength>, C<IOCTL_DISK_FORMAT_TRACKS>,
-C<IOCTL_DISK_REASSIGN_BLOCKS>, C<IOCTL_DISK_PERFORMANCE>,
-C<IOCTL_DISK_IS_WRITABLE>, C<IOCTL_DISK_LOGGING>, DISK_LOGGING_START,
-DISK_LOGGING_STOP, DISK_LOGGING_DUMP, DISK_LOGGING_BINNING,
-C<IOCTL_DISK_FORMAT_TRACKS_EX>, C<IOCTL_DISK_HISTOGRAM_STRUCTURE>,
-C<IOCTL_DISK_HISTOGRAM_DATA>, C<IOCTL_DISK_HISTOGRAM_RESET>,
-C<IOCTL_DISK_REQUEST_STRUCTURE>, C<IOCTL_DISK_REQUEST_DATA>, C<":FSCTL_">,
-C<FSCTL_SET_REPARSE_POINT>, C<FSCTL_GET_REPARSE_POINT>,
-C<FSCTL_DELETE_REPARSE_POINT>, C<":GENERIC_">, C<":MEDIA_TYPE">,
-C<Unknown>, C<F5_1Pt2_512>, C<F3_1Pt44_512>, C<F3_2Pt88_512>,
-C<F3_20Pt8_512>, C<F3_720_512>, C<F5_360_512>, C<F5_320_512>,
-C<F5_320_1024>, C<F5_180_512>, C<F5_160_512>, C<RemovableMedia>,
-C<FixedMedia>, C<F3_120M_512>, C<":MOVEFILE_">, C<":SECURITY_">,
-C<":SEM_">, C<":PARTITION_">, C<":ALL">
-
-=back
-
-=item BUGS
-
-=item AUTHOR
-
-=item SEE ALSO
-
-=back
-
-=head2 Win32CORE - Win32 CORE function stubs
-
-=over 4
-
-=item DESCRIPTION
-
-=item HISTORY
-
-=back
-
-=head2 XSLoader - Dynamically load C libraries into Perl code
-
-=over 4
-
-=item VERSION
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=over 4
-
-=item Migration from C<DynaLoader>
-
-=item Backward compatible boilerplate
-
-=back
-
-=item Order of initialization: early load()
-
-=over 4
-
-=item The most hairy case
-
-=back
-
-=item DIAGNOSTICS
-
-C<Can't find '%s' symbol in %s>, C<Can't load '%s' for module %s: %s>,
-C<Undefined symbols present after loading %s: %s>,
-C<XSLoader::load('Your::Module', $Your::Module::VERSION)>
-
-=item LIMITATIONS
-
-=item BUGS
-
-=item SEE ALSO
-
-=item AUTHORS
-
-=item COPYRIGHT
-
-=back
-
-=head1 AUXILIARY DOCUMENTATION
-
-Here should be listed all the extra programs' documentation, but they
-don't all have manual pages yet:
-
-=over 4
-
-=item a2p
-
-=item c2ph
-
-=item dprofpp
-
-=item h2ph
-
-=item h2xs
-
-=item perlbug
-
-=item perldoc
-
-=item pl2pm
-
-=item pod2html
-
-=item pod2man
-
-=item s2p
-
-=item splain
-
-=item xsubpp
-
-=back
-
-=head1 AUTHOR
-
-Larry Wall <F<larry at wall.org>>, with the help of oodles
-of other folks.
-
Deleted: vendor/perl/dist/pod/perlxs.pod
===================================================================
--- vendor/perl/dist/pod/perlxs.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlxs.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,2142 +0,0 @@
-=head1 NAME
-
-perlxs - XS language reference manual
-
-=head1 DESCRIPTION
-
-=head2 Introduction
-
-XS is an interface description file format used to create an extension
-interface between Perl and C code (or a C library) which one wishes
-to use with Perl. The XS interface is combined with the library to
-create a new library which can then be either dynamically loaded
-or statically linked into perl. The XS interface description is
-written in the XS language and is the core component of the Perl
-extension interface.
-
-An B<XSUB> forms the basic unit of the XS interface. After compilation
-by the B<xsubpp> compiler, each XSUB amounts to a C function definition
-which will provide the glue between Perl calling conventions and C
-calling conventions.
-
-The glue code pulls the arguments from the Perl stack, converts these
-Perl values to the formats expected by a C function, call this C function,
-transfers the return values of the C function back to Perl.
-Return values here may be a conventional C return value or any C
-function arguments that may serve as output parameters. These return
-values may be passed back to Perl either by putting them on the
-Perl stack, or by modifying the arguments supplied from the Perl side.
-
-The above is a somewhat simplified view of what really happens. Since
-Perl allows more flexible calling conventions than C, XSUBs may do much
-more in practice, such as checking input parameters for validity,
-throwing exceptions (or returning undef/empty list) if the return value
-from the C function indicates failure, calling different C functions
-based on numbers and types of the arguments, providing an object-oriented
-interface, etc.
-
-Of course, one could write such glue code directly in C. However, this
-would be a tedious task, especially if one needs to write glue for
-multiple C functions, and/or one is not familiar enough with the Perl
-stack discipline and other such arcana. XS comes to the rescue here:
-instead of writing this glue C code in long-hand, one can write
-a more concise short-hand I<description> of what should be done by
-the glue, and let the XS compiler B<xsubpp> handle the rest.
-
-The XS language allows one to describe the mapping between how the C
-routine is used, and how the corresponding Perl routine is used. It
-also allows creation of Perl routines which are directly translated to
-C code and which are not related to a pre-existing C function. In cases
-when the C interface coincides with the Perl interface, the XSUB
-declaration is almost identical to a declaration of a C function (in K&R
-style). In such circumstances, there is another tool called C<h2xs>
-that is able to translate an entire C header file into a corresponding
-XS file that will provide glue to the functions/macros described in
-the header file.
-
-The XS compiler is called B<xsubpp>. This compiler creates
-the constructs necessary to let an XSUB manipulate Perl values, and
-creates the glue necessary to let Perl call the XSUB. The compiler
-uses B<typemaps> to determine how to map C function parameters
-and output values to Perl values and back. The default typemap
-(which comes with Perl) handles many common C types. A supplementary
-typemap may also be needed to handle any special structures and types
-for the library being linked.
-
-A file in XS format starts with a C language section which goes until the
-first C<MODULE =Z<>> directive. Other XS directives and XSUB definitions
-may follow this line. The "language" used in this part of the file
-is usually referred to as the XS language. B<xsubpp> recognizes and
-skips POD (see L<perlpod>) in both the C and XS language sections, which
-allows the XS file to contain embedded documentation.
-
-See L<perlxstut> for a tutorial on the whole extension creation process.
-
-Note: For some extensions, Dave Beazley's SWIG system may provide a
-significantly more convenient mechanism for creating the extension
-glue code. See L<http://www.swig.org/> for more information.
-
-=head2 On The Road
-
-Many of the examples which follow will concentrate on creating an interface
-between Perl and the ONC+ RPC bind library functions. The rpcb_gettime()
-function is used to demonstrate many features of the XS language. This
-function has two parameters; the first is an input parameter and the second
-is an output parameter. The function also returns a status value.
-
- bool_t rpcb_gettime(const char *host, time_t *timep);
-
-From C this function will be called with the following
-statements.
-
- #include <rpc/rpc.h>
- bool_t status;
- time_t timep;
- status = rpcb_gettime( "localhost", &timep );
-
-If an XSUB is created to offer a direct translation between this function
-and Perl, then this XSUB will be used from Perl with the following code.
-The $status and $timep variables will contain the output of the function.
-
- use RPC;
- $status = rpcb_gettime( "localhost", $timep );
-
-The following XS file shows an XS subroutine, or XSUB, which
-demonstrates one possible interface to the rpcb_gettime()
-function. This XSUB represents a direct translation between
-C and Perl and so preserves the interface even from Perl.
-This XSUB will be invoked from Perl with the usage shown
-above. Note that the first three #include statements, for
-C<EXTERN.h>, C<perl.h>, and C<XSUB.h>, will always be present at the
-beginning of an XS file. This approach and others will be
-expanded later in this document.
-
- #include "EXTERN.h"
- #include "perl.h"
- #include "XSUB.h"
- #include <rpc/rpc.h>
-
- MODULE = RPC PACKAGE = RPC
-
- bool_t
- rpcb_gettime(host,timep)
- char *host
- time_t &timep
- OUTPUT:
- timep
-
-Any extension to Perl, including those containing XSUBs,
-should have a Perl module to serve as the bootstrap which
-pulls the extension into Perl. This module will export the
-extension's functions and variables to the Perl program and
-will cause the extension's XSUBs to be linked into Perl.
-The following module will be used for most of the examples
-in this document and should be used from Perl with the C<use>
-command as shown earlier. Perl modules are explained in
-more detail later in this document.
-
- package RPC;
-
- require Exporter;
- require DynaLoader;
- @ISA = qw(Exporter DynaLoader);
- @EXPORT = qw( rpcb_gettime );
-
- bootstrap RPC;
- 1;
-
-Throughout this document a variety of interfaces to the rpcb_gettime()
-XSUB will be explored. The XSUBs will take their parameters in different
-orders or will take different numbers of parameters. In each case the
-XSUB is an abstraction between Perl and the real C rpcb_gettime()
-function, and the XSUB must always ensure that the real rpcb_gettime()
-function is called with the correct parameters. This abstraction will
-allow the programmer to create a more Perl-like interface to the C
-function.
-
-=head2 The Anatomy of an XSUB
-
-The simplest XSUBs consist of 3 parts: a description of the return
-value, the name of the XSUB routine and the names of its arguments,
-and a description of types or formats of the arguments.
-
-The following XSUB allows a Perl program to access a C library function
-called sin(). The XSUB will imitate the C function which takes a single
-argument and returns a single value.
-
- double
- sin(x)
- double x
-
-Optionally, one can merge the description of types and the list of
-argument names, rewriting this as
-
- double
- sin(double x)
-
-This makes this XSUB look similar to an ANSI C declaration. An optional
-semicolon is allowed after the argument list, as in
-
- double
- sin(double x);
-
-Parameters with C pointer types can have different semantic: C functions
-with similar declarations
-
- bool string_looks_as_a_number(char *s);
- bool make_char_uppercase(char *c);
-
-are used in absolutely incompatible manner. Parameters to these functions
-could be described B<xsubpp> like this:
-
- char * s
- char &c
-
-Both these XS declarations correspond to the C<char*> C type, but they have
-different semantics, see L<"The & Unary Operator">.
-
-It is convenient to think that the indirection operator
-C<*> should be considered as a part of the type and the address operator C<&>
-should be considered part of the variable. See L<"The Typemap">
-for more info about handling qualifiers and unary operators in C types.
-
-The function name and the return type must be placed on
-separate lines and should be flush left-adjusted.
-
- INCORRECT CORRECT
-
- double sin(x) double
- double x sin(x)
- double x
-
-The rest of the function description may be indented or left-adjusted. The
-following example shows a function with its body left-adjusted. Most
-examples in this document will indent the body for better readability.
-
- CORRECT
-
- double
- sin(x)
- double x
-
-More complicated XSUBs may contain many other sections. Each section of
-an XSUB starts with the corresponding keyword, such as INIT: or CLEANUP:.
-However, the first two lines of an XSUB always contain the same data:
-descriptions of the return type and the names of the function and its
-parameters. Whatever immediately follows these is considered to be
-an INPUT: section unless explicitly marked with another keyword.
-(See L<The INPUT: Keyword>.)
-
-An XSUB section continues until another section-start keyword is found.
-
-=head2 The Argument Stack
-
-The Perl argument stack is used to store the values which are
-sent as parameters to the XSUB and to store the XSUB's
-return value(s). In reality all Perl functions (including non-XSUB
-ones) keep their values on this stack all the same time, each limited
-to its own range of positions on the stack. In this document the
-first position on that stack which belongs to the active
-function will be referred to as position 0 for that function.
-
-XSUBs refer to their stack arguments with the macro B<ST(x)>, where I<x>
-refers to a position in this XSUB's part of the stack. Position 0 for that
-function would be known to the XSUB as ST(0). The XSUB's incoming
-parameters and outgoing return values always begin at ST(0). For many
-simple cases the B<xsubpp> compiler will generate the code necessary to
-handle the argument stack by embedding code fragments found in the
-typemaps. In more complex cases the programmer must supply the code.
-
-=head2 The RETVAL Variable
-
-The RETVAL variable is a special C variable that is declared automatically
-for you. The C type of RETVAL matches the return type of the C library
-function. The B<xsubpp> compiler will declare this variable in each XSUB
-with non-C<void> return type. By default the generated C function
-will use RETVAL to hold the return value of the C library function being
-called. In simple cases the value of RETVAL will be placed in ST(0) of
-the argument stack where it can be received by Perl as the return value
-of the XSUB.
-
-If the XSUB has a return type of C<void> then the compiler will
-not declare a RETVAL variable for that function. When using
-a PPCODE: section no manipulation of the RETVAL variable is required, the
-section may use direct stack manipulation to place output values on the stack.
-
-If PPCODE: directive is not used, C<void> return value should be used
-only for subroutines which do not return a value, I<even if> CODE:
-directive is used which sets ST(0) explicitly.
-
-Older versions of this document recommended to use C<void> return
-value in such cases. It was discovered that this could lead to
-segfaults in cases when XSUB was I<truly> C<void>. This practice is
-now deprecated, and may be not supported at some future version. Use
-the return value C<SV *> in such cases. (Currently C<xsubpp> contains
-some heuristic code which tries to disambiguate between "truly-void"
-and "old-practice-declared-as-void" functions. Hence your code is at
-mercy of this heuristics unless you use C<SV *> as return value.)
-
-=head2 Returning SVs, AVs and HVs through RETVAL
-
-When you're using RETVAL to return an C<SV *>, there's some magic
-going on behind the scenes that should be mentioned. When you're
-manipulating the argument stack using the ST(x) macro, for example,
-you usually have to pay special attention to reference counts. (For
-more about reference counts, see L<perlguts>.) To make your life
-easier, the typemap file automatically makes C<RETVAL> mortal when
-you're returning an C<SV *>. Thus, the following two XSUBs are more
-or less equivalent:
-
- void
- alpha()
- PPCODE:
- ST(0) = newSVpv("Hello World",0);
- sv_2mortal(ST(0));
- XSRETURN(1);
-
- SV *
- beta()
- CODE:
- RETVAL = newSVpv("Hello World",0);
- OUTPUT:
- RETVAL
-
-This is quite useful as it usually improves readability. While
-this works fine for an C<SV *>, it's unfortunately not as easy
-to have C<AV *> or C<HV *> as a return value. You I<should> be
-able to write:
-
- AV *
- array()
- CODE:
- RETVAL = newAV();
- /* do something with RETVAL */
- OUTPUT:
- RETVAL
-
-But due to an unfixable bug (fixing it would break lots of existing
-CPAN modules) in the typemap file, the reference count of the C<AV *>
-is not properly decremented. Thus, the above XSUB would leak memory
-whenever it is being called. The same problem exists for C<HV *>.
-
-When you're returning an C<AV *> or a C<HV *>, you have to make sure
-their reference count is decremented by making the AV or HV mortal:
-
- AV *
- array()
- CODE:
- RETVAL = newAV();
- sv_2mortal((SV*)RETVAL);
- /* do something with RETVAL */
- OUTPUT:
- RETVAL
-
-And also remember that you don't have to do this for an C<SV *>.
-
-=head2 The MODULE Keyword
-
-The MODULE keyword is used to start the XS code and to specify the package
-of the functions which are being defined. All text preceding the first
-MODULE keyword is considered C code and is passed through to the output with
-POD stripped, but otherwise untouched. Every XS module will have a
-bootstrap function which is used to hook the XSUBs into Perl. The package
-name of this bootstrap function will match the value of the last MODULE
-statement in the XS source files. The value of MODULE should always remain
-constant within the same XS file, though this is not required.
-
-The following example will start the XS code and will place
-all functions in a package named RPC.
-
- MODULE = RPC
-
-=head2 The PACKAGE Keyword
-
-When functions within an XS source file must be separated into packages
-the PACKAGE keyword should be used. This keyword is used with the MODULE
-keyword and must follow immediately after it when used.
-
- MODULE = RPC PACKAGE = RPC
-
- [ XS code in package RPC ]
-
- MODULE = RPC PACKAGE = RPCB
-
- [ XS code in package RPCB ]
-
- MODULE = RPC PACKAGE = RPC
-
- [ XS code in package RPC ]
-
-The same package name can be used more than once, allowing for
-non-contiguous code. This is useful if you have a stronger ordering
-principle than package names.
-
-Although this keyword is optional and in some cases provides redundant
-information it should always be used. This keyword will ensure that the
-XSUBs appear in the desired package.
-
-=head2 The PREFIX Keyword
-
-The PREFIX keyword designates prefixes which should be
-removed from the Perl function names. If the C function is
-C<rpcb_gettime()> and the PREFIX value is C<rpcb_> then Perl will
-see this function as C<gettime()>.
-
-This keyword should follow the PACKAGE keyword when used.
-If PACKAGE is not used then PREFIX should follow the MODULE
-keyword.
-
- MODULE = RPC PREFIX = rpc_
-
- MODULE = RPC PACKAGE = RPCB PREFIX = rpcb_
-
-=head2 The OUTPUT: Keyword
-
-The OUTPUT: keyword indicates that certain function parameters should be
-updated (new values made visible to Perl) when the XSUB terminates or that
-certain values should be returned to the calling Perl function. For
-simple functions which have no CODE: or PPCODE: section,
-such as the sin() function above, the RETVAL variable is
-automatically designated as an output value. For more complex functions
-the B<xsubpp> compiler will need help to determine which variables are output
-variables.
-
-This keyword will normally be used to complement the CODE: keyword.
-The RETVAL variable is not recognized as an output variable when the
-CODE: keyword is present. The OUTPUT: keyword is used in this
-situation to tell the compiler that RETVAL really is an output
-variable.
-
-The OUTPUT: keyword can also be used to indicate that function parameters
-are output variables. This may be necessary when a parameter has been
-modified within the function and the programmer would like the update to
-be seen by Perl.
-
- bool_t
- rpcb_gettime(host,timep)
- char *host
- time_t &timep
- OUTPUT:
- timep
-
-The OUTPUT: keyword will also allow an output parameter to
-be mapped to a matching piece of code rather than to a
-typemap.
-
- bool_t
- rpcb_gettime(host,timep)
- char *host
- time_t &timep
- OUTPUT:
- timep sv_setnv(ST(1), (double)timep);
-
-B<xsubpp> emits an automatic C<SvSETMAGIC()> for all parameters in the
-OUTPUT section of the XSUB, except RETVAL. This is the usually desired
-behavior, as it takes care of properly invoking 'set' magic on output
-parameters (needed for hash or array element parameters that must be
-created if they didn't exist). If for some reason, this behavior is
-not desired, the OUTPUT section may contain a C<SETMAGIC: DISABLE> line
-to disable it for the remainder of the parameters in the OUTPUT section.
-Likewise, C<SETMAGIC: ENABLE> can be used to reenable it for the
-remainder of the OUTPUT section. See L<perlguts> for more details
-about 'set' magic.
-
-=head2 The NO_OUTPUT Keyword
-
-The NO_OUTPUT can be placed as the first token of the XSUB. This keyword
-indicates that while the C subroutine we provide an interface to has
-a non-C<void> return type, the return value of this C subroutine should not
-be returned from the generated Perl subroutine.
-
-With this keyword present L<The RETVAL Variable> is created, and in the
-generated call to the subroutine this variable is assigned to, but the value
-of this variable is not going to be used in the auto-generated code.
-
-This keyword makes sense only if C<RETVAL> is going to be accessed by the
-user-supplied code. It is especially useful to make a function interface
-more Perl-like, especially when the C return value is just an error condition
-indicator. For example,
-
- NO_OUTPUT int
- delete_file(char *name)
- POSTCALL:
- if (RETVAL != 0)
- croak("Error %d while deleting file '%s'", RETVAL, name);
-
-Here the generated XS function returns nothing on success, and will die()
-with a meaningful error message on error.
-
-=head2 The CODE: Keyword
-
-This keyword is used in more complicated XSUBs which require
-special handling for the C function. The RETVAL variable is
-still declared, but it will not be returned unless it is specified
-in the OUTPUT: section.
-
-The following XSUB is for a C function which requires special handling of
-its parameters. The Perl usage is given first.
-
- $status = rpcb_gettime( "localhost", $timep );
-
-The XSUB follows.
-
- bool_t
- rpcb_gettime(host,timep)
- char *host
- time_t timep
- CODE:
- RETVAL = rpcb_gettime( host, &timep );
- OUTPUT:
- timep
- RETVAL
-
-=head2 The INIT: Keyword
-
-The INIT: keyword allows initialization to be inserted into the XSUB before
-the compiler generates the call to the C function. Unlike the CODE: keyword
-above, this keyword does not affect the way the compiler handles RETVAL.
-
- bool_t
- rpcb_gettime(host,timep)
- char *host
- time_t &timep
- INIT:
- printf("# Host is %s\n", host );
- OUTPUT:
- timep
-
-Another use for the INIT: section is to check for preconditions before
-making a call to the C function:
-
- long long
- lldiv(a,b)
- long long a
- long long b
- INIT:
- if (a == 0 && b == 0)
- XSRETURN_UNDEF;
- if (b == 0)
- croak("lldiv: cannot divide by 0");
-
-=head2 The NO_INIT Keyword
-
-The NO_INIT keyword is used to indicate that a function
-parameter is being used only as an output value. The B<xsubpp>
-compiler will normally generate code to read the values of
-all function parameters from the argument stack and assign
-them to C variables upon entry to the function. NO_INIT
-will tell the compiler that some parameters will be used for
-output rather than for input and that they will be handled
-before the function terminates.
-
-The following example shows a variation of the rpcb_gettime() function.
-This function uses the timep variable only as an output variable and does
-not care about its initial contents.
-
- bool_t
- rpcb_gettime(host,timep)
- char *host
- time_t &timep = NO_INIT
- OUTPUT:
- timep
-
-=head2 Initializing Function Parameters
-
-C function parameters are normally initialized with their values from
-the argument stack (which in turn contains the parameters that were
-passed to the XSUB from Perl). The typemaps contain the
-code segments which are used to translate the Perl values to
-the C parameters. The programmer, however, is allowed to
-override the typemaps and supply alternate (or additional)
-initialization code. Initialization code starts with the first
-C<=>, C<;> or C<+> on a line in the INPUT: section. The only
-exception happens if this C<;> terminates the line, then this C<;>
-is quietly ignored.
-
-The following code demonstrates how to supply initialization code for
-function parameters. The initialization code is eval'ed within double
-quotes by the compiler before it is added to the output so anything
-which should be interpreted literally [mainly C<$>, C<@>, or C<\\>]
-must be protected with backslashes. The variables $var, $arg,
-and $type can be used as in typemaps.
-
- bool_t
- rpcb_gettime(host,timep)
- char *host = (char *)SvPV_nolen($arg);
- time_t &timep = 0;
- OUTPUT:
- timep
-
-This should not be used to supply default values for parameters. One
-would normally use this when a function parameter must be processed by
-another library function before it can be used. Default parameters are
-covered in the next section.
-
-If the initialization begins with C<=>, then it is output in
-the declaration for the input variable, replacing the initialization
-supplied by the typemap. If the initialization
-begins with C<;> or C<+>, then it is performed after
-all of the input variables have been declared. In the C<;>
-case the initialization normally supplied by the typemap is not performed.
-For the C<+> case, the declaration for the variable will include the
-initialization from the typemap. A global
-variable, C<%v>, is available for the truly rare case where
-information from one initialization is needed in another
-initialization.
-
-Here's a truly obscure example:
-
- bool_t
- rpcb_gettime(host,timep)
- time_t &timep; /* \$v{timep}=@{[$v{timep}=$arg]} */
- char *host + SvOK($v{timep}) ? SvPV_nolen($arg) : NULL;
- OUTPUT:
- timep
-
-The construct C<\$v{timep}=@{[$v{timep}=$arg]}> used in the above
-example has a two-fold purpose: first, when this line is processed by
-B<xsubpp>, the Perl snippet C<$v{timep}=$arg> is evaluated. Second,
-the text of the evaluated snippet is output into the generated C file
-(inside a C comment)! During the processing of C<char *host> line,
-$arg will evaluate to C<ST(0)>, and C<$v{timep}> will evaluate to
-C<ST(1)>.
-
-=head2 Default Parameter Values
-
-Default values for XSUB arguments can be specified by placing an
-assignment statement in the parameter list. The default value may
-be a number, a string or the special string C<NO_INIT>. Defaults should
-always be used on the right-most parameters only.
-
-To allow the XSUB for rpcb_gettime() to have a default host
-value the parameters to the XSUB could be rearranged. The
-XSUB will then call the real rpcb_gettime() function with
-the parameters in the correct order. This XSUB can be called
-from Perl with either of the following statements:
-
- $status = rpcb_gettime( $timep, $host );
-
- $status = rpcb_gettime( $timep );
-
-The XSUB will look like the code which follows. A CODE:
-block is used to call the real rpcb_gettime() function with
-the parameters in the correct order for that function.
-
- bool_t
- rpcb_gettime(timep,host="localhost")
- char *host
- time_t timep = NO_INIT
- CODE:
- RETVAL = rpcb_gettime( host, &timep );
- OUTPUT:
- timep
- RETVAL
-
-=head2 The PREINIT: Keyword
-
-The PREINIT: keyword allows extra variables to be declared immediately
-before or after the declarations of the parameters from the INPUT: section
-are emitted.
-
-If a variable is declared inside a CODE: section it will follow any typemap
-code that is emitted for the input parameters. This may result in the
-declaration ending up after C code, which is C syntax error. Similar
-errors may happen with an explicit C<;>-type or C<+>-type initialization of
-parameters is used (see L<"Initializing Function Parameters">). Declaring
-these variables in an INIT: section will not help.
-
-In such cases, to force an additional variable to be declared together
-with declarations of other variables, place the declaration into a
-PREINIT: section. The PREINIT: keyword may be used one or more times
-within an XSUB.
-
-The following examples are equivalent, but if the code is using complex
-typemaps then the first example is safer.
-
- bool_t
- rpcb_gettime(timep)
- time_t timep = NO_INIT
- PREINIT:
- char *host = "localhost";
- CODE:
- RETVAL = rpcb_gettime( host, &timep );
- OUTPUT:
- timep
- RETVAL
-
-For this particular case an INIT: keyword would generate the
-same C code as the PREINIT: keyword. Another correct, but error-prone example:
-
- bool_t
- rpcb_gettime(timep)
- time_t timep = NO_INIT
- CODE:
- char *host = "localhost";
- RETVAL = rpcb_gettime( host, &timep );
- OUTPUT:
- timep
- RETVAL
-
-Another way to declare C<host> is to use a C block in the CODE: section:
-
- bool_t
- rpcb_gettime(timep)
- time_t timep = NO_INIT
- CODE:
- {
- char *host = "localhost";
- RETVAL = rpcb_gettime( host, &timep );
- }
- OUTPUT:
- timep
- RETVAL
-
-The ability to put additional declarations before the typemap entries are
-processed is very handy in the cases when typemap conversions manipulate
-some global state:
-
- MyObject
- mutate(o)
- PREINIT:
- MyState st = global_state;
- INPUT:
- MyObject o;
- CLEANUP:
- reset_to(global_state, st);
-
-Here we suppose that conversion to C<MyObject> in the INPUT: section and from
-MyObject when processing RETVAL will modify a global variable C<global_state>.
-After these conversions are performed, we restore the old value of
-C<global_state> (to avoid memory leaks, for example).
-
-There is another way to trade clarity for compactness: INPUT sections allow
-declaration of C variables which do not appear in the parameter list of
-a subroutine. Thus the above code for mutate() can be rewritten as
-
- MyObject
- mutate(o)
- MyState st = global_state;
- MyObject o;
- CLEANUP:
- reset_to(global_state, st);
-
-and the code for rpcb_gettime() can be rewritten as
-
- bool_t
- rpcb_gettime(timep)
- time_t timep = NO_INIT
- char *host = "localhost";
- C_ARGS:
- host, &timep
- OUTPUT:
- timep
- RETVAL
-
-=head2 The SCOPE: Keyword
-
-The SCOPE: keyword allows scoping to be enabled for a particular XSUB. If
-enabled, the XSUB will invoke ENTER and LEAVE automatically.
-
-To support potentially complex type mappings, if a typemap entry used
-by an XSUB contains a comment like C</*scope*/> then scoping will
-be automatically enabled for that XSUB.
-
-To enable scoping:
-
- SCOPE: ENABLE
-
-To disable scoping:
-
- SCOPE: DISABLE
-
-=head2 The INPUT: Keyword
-
-The XSUB's parameters are usually evaluated immediately after entering the
-XSUB. The INPUT: keyword can be used to force those parameters to be
-evaluated a little later. The INPUT: keyword can be used multiple times
-within an XSUB and can be used to list one or more input variables. This
-keyword is used with the PREINIT: keyword.
-
-The following example shows how the input parameter C<timep> can be
-evaluated late, after a PREINIT.
-
- bool_t
- rpcb_gettime(host,timep)
- char *host
- PREINIT:
- time_t tt;
- INPUT:
- time_t timep
- CODE:
- RETVAL = rpcb_gettime( host, &tt );
- timep = tt;
- OUTPUT:
- timep
- RETVAL
-
-The next example shows each input parameter evaluated late.
-
- bool_t
- rpcb_gettime(host,timep)
- PREINIT:
- time_t tt;
- INPUT:
- char *host
- PREINIT:
- char *h;
- INPUT:
- time_t timep
- CODE:
- h = host;
- RETVAL = rpcb_gettime( h, &tt );
- timep = tt;
- OUTPUT:
- timep
- RETVAL
-
-Since INPUT sections allow declaration of C variables which do not appear
-in the parameter list of a subroutine, this may be shortened to:
-
- bool_t
- rpcb_gettime(host,timep)
- time_t tt;
- char *host;
- char *h = host;
- time_t timep;
- CODE:
- RETVAL = rpcb_gettime( h, &tt );
- timep = tt;
- OUTPUT:
- timep
- RETVAL
-
-(We used our knowledge that input conversion for C<char *> is a "simple" one,
-thus C<host> is initialized on the declaration line, and our assignment
-C<h = host> is not performed too early. Otherwise one would need to have the
-assignment C<h = host> in a CODE: or INIT: section.)
-
-=head2 The IN/OUTLIST/IN_OUTLIST/OUT/IN_OUT Keywords
-
-In the list of parameters for an XSUB, one can precede parameter names
-by the C<IN>/C<OUTLIST>/C<IN_OUTLIST>/C<OUT>/C<IN_OUT> keywords.
-C<IN> keyword is the default, the other keywords indicate how the Perl
-interface should differ from the C interface.
-
-Parameters preceded by C<OUTLIST>/C<IN_OUTLIST>/C<OUT>/C<IN_OUT>
-keywords are considered to be used by the C subroutine I<via
-pointers>. C<OUTLIST>/C<OUT> keywords indicate that the C subroutine
-does not inspect the memory pointed by this parameter, but will write
-through this pointer to provide additional return values.
-
-Parameters preceded by C<OUTLIST> keyword do not appear in the usage
-signature of the generated Perl function.
-
-Parameters preceded by C<IN_OUTLIST>/C<IN_OUT>/C<OUT> I<do> appear as
-parameters to the Perl function. With the exception of
-C<OUT>-parameters, these parameters are converted to the corresponding
-C type, then pointers to these data are given as arguments to the C
-function. It is expected that the C function will write through these
-pointers.
-
-The return list of the generated Perl function consists of the C return value
-from the function (unless the XSUB is of C<void> return type or
-C<The NO_OUTPUT Keyword> was used) followed by all the C<OUTLIST>
-and C<IN_OUTLIST> parameters (in the order of appearance). On the
-return from the XSUB the C<IN_OUT>/C<OUT> Perl parameter will be
-modified to have the values written by the C function.
-
-For example, an XSUB
-
- void
- day_month(OUTLIST day, IN unix_time, OUTLIST month)
- int day
- int unix_time
- int month
-
-should be used from Perl as
-
- my ($day, $month) = day_month(time);
-
-The C signature of the corresponding function should be
-
- void day_month(int *day, int unix_time, int *month);
-
-The C<IN>/C<OUTLIST>/C<IN_OUTLIST>/C<IN_OUT>/C<OUT> keywords can be
-mixed with ANSI-style declarations, as in
-
- void
- day_month(OUTLIST int day, int unix_time, OUTLIST int month)
-
-(here the optional C<IN> keyword is omitted).
-
-The C<IN_OUT> parameters are identical with parameters introduced with
-L<The & Unary Operator> and put into the C<OUTPUT:> section (see
-L<The OUTPUT: Keyword>). The C<IN_OUTLIST> parameters are very similar,
-the only difference being that the value C function writes through the
-pointer would not modify the Perl parameter, but is put in the output
-list.
-
-The C<OUTLIST>/C<OUT> parameter differ from C<IN_OUTLIST>/C<IN_OUT>
-parameters only by the initial value of the Perl parameter not
-being read (and not being given to the C function - which gets some
-garbage instead). For example, the same C function as above can be
-interfaced with as
-
- void day_month(OUT int day, int unix_time, OUT int month);
-
-or
-
- void
- day_month(day, unix_time, month)
- int &day = NO_INIT
- int unix_time
- int &month = NO_INIT
- OUTPUT:
- day
- month
-
-However, the generated Perl function is called in very C-ish style:
-
- my ($day, $month);
- day_month($day, time, $month);
-
-=head2 The C<length(NAME)> Keyword
-
-If one of the input arguments to the C function is the length of a string
-argument C<NAME>, one can substitute the name of the length-argument by
-C<length(NAME)> in the XSUB declaration. This argument must be omitted when
-the generated Perl function is called. E.g.,
-
- void
- dump_chars(char *s, short l)
- {
- short n = 0;
- while (n < l) {
- printf("s[%d] = \"\\%#03o\"\n", n, (int)s[n]);
- n++;
- }
- }
-
- MODULE = x PACKAGE = x
-
- void dump_chars(char *s, short length(s))
-
-should be called as C<dump_chars($string)>.
-
-This directive is supported with ANSI-type function declarations only.
-
-=head2 Variable-length Parameter Lists
-
-XSUBs can have variable-length parameter lists by specifying an ellipsis
-C<(...)> in the parameter list. This use of the ellipsis is similar to that
-found in ANSI C. The programmer is able to determine the number of
-arguments passed to the XSUB by examining the C<items> variable which the
-B<xsubpp> compiler supplies for all XSUBs. By using this mechanism one can
-create an XSUB which accepts a list of parameters of unknown length.
-
-The I<host> parameter for the rpcb_gettime() XSUB can be
-optional so the ellipsis can be used to indicate that the
-XSUB will take a variable number of parameters. Perl should
-be able to call this XSUB with either of the following statements.
-
- $status = rpcb_gettime( $timep, $host );
-
- $status = rpcb_gettime( $timep );
-
-The XS code, with ellipsis, follows.
-
- bool_t
- rpcb_gettime(timep, ...)
- time_t timep = NO_INIT
- PREINIT:
- char *host = "localhost";
- CODE:
- if( items > 1 )
- host = (char *)SvPV_nolen(ST(1));
- RETVAL = rpcb_gettime( host, &timep );
- OUTPUT:
- timep
- RETVAL
-
-=head2 The C_ARGS: Keyword
-
-The C_ARGS: keyword allows creating of XSUBS which have different
-calling sequence from Perl than from C, without a need to write
-CODE: or PPCODE: section. The contents of the C_ARGS: paragraph is
-put as the argument to the called C function without any change.
-
-For example, suppose that a C function is declared as
-
- symbolic nth_derivative(int n, symbolic function, int flags);
-
-and that the default flags are kept in a global C variable
-C<default_flags>. Suppose that you want to create an interface which
-is called as
-
- $second_deriv = $function->nth_derivative(2);
-
-To do this, declare the XSUB as
-
- symbolic
- nth_derivative(function, n)
- symbolic function
- int n
- C_ARGS:
- n, function, default_flags
-
-=head2 The PPCODE: Keyword
-
-The PPCODE: keyword is an alternate form of the CODE: keyword and is used
-to tell the B<xsubpp> compiler that the programmer is supplying the code to
-control the argument stack for the XSUBs return values. Occasionally one
-will want an XSUB to return a list of values rather than a single value.
-In these cases one must use PPCODE: and then explicitly push the list of
-values on the stack. The PPCODE: and CODE: keywords should not be used
-together within the same XSUB.
-
-The actual difference between PPCODE: and CODE: sections is in the
-initialization of C<SP> macro (which stands for the I<current> Perl
-stack pointer), and in the handling of data on the stack when returning
-from an XSUB. In CODE: sections SP preserves the value which was on
-entry to the XSUB: SP is on the function pointer (which follows the
-last parameter). In PPCODE: sections SP is moved backward to the
-beginning of the parameter list, which allows C<PUSH*()> macros
-to place output values in the place Perl expects them to be when
-the XSUB returns back to Perl.
-
-The generated trailer for a CODE: section ensures that the number of return
-values Perl will see is either 0 or 1 (depending on the C<void>ness of the
-return value of the C function, and heuristics mentioned in
-L<"The RETVAL Variable">). The trailer generated for a PPCODE: section
-is based on the number of return values and on the number of times
-C<SP> was updated by C<[X]PUSH*()> macros.
-
-Note that macros C<ST(i)>, C<XST_m*()> and C<XSRETURN*()> work equally
-well in CODE: sections and PPCODE: sections.
-
-The following XSUB will call the C rpcb_gettime() function
-and will return its two output values, timep and status, to
-Perl as a single list.
-
- void
- rpcb_gettime(host)
- char *host
- PREINIT:
- time_t timep;
- bool_t status;
- PPCODE:
- status = rpcb_gettime( host, &timep );
- EXTEND(SP, 2);
- PUSHs(sv_2mortal(newSViv(status)));
- PUSHs(sv_2mortal(newSViv(timep)));
-
-Notice that the programmer must supply the C code necessary
-to have the real rpcb_gettime() function called and to have
-the return values properly placed on the argument stack.
-
-The C<void> return type for this function tells the B<xsubpp> compiler that
-the RETVAL variable is not needed or used and that it should not be created.
-In most scenarios the void return type should be used with the PPCODE:
-directive.
-
-The EXTEND() macro is used to make room on the argument
-stack for 2 return values. The PPCODE: directive causes the
-B<xsubpp> compiler to create a stack pointer available as C<SP>, and it
-is this pointer which is being used in the EXTEND() macro.
-The values are then pushed onto the stack with the PUSHs()
-macro.
-
-Now the rpcb_gettime() function can be used from Perl with
-the following statement.
-
- ($status, $timep) = rpcb_gettime("localhost");
-
-When handling output parameters with a PPCODE section, be sure to handle
-'set' magic properly. See L<perlguts> for details about 'set' magic.
-
-=head2 Returning Undef And Empty Lists
-
-Occasionally the programmer will want to return simply
-C<undef> or an empty list if a function fails rather than a
-separate status value. The rpcb_gettime() function offers
-just this situation. If the function succeeds we would like
-to have it return the time and if it fails we would like to
-have undef returned. In the following Perl code the value
-of $timep will either be undef or it will be a valid time.
-
- $timep = rpcb_gettime( "localhost" );
-
-The following XSUB uses the C<SV *> return type as a mnemonic only,
-and uses a CODE: block to indicate to the compiler
-that the programmer has supplied all the necessary code. The
-sv_newmortal() call will initialize the return value to undef, making that
-the default return value.
-
- SV *
- rpcb_gettime(host)
- char * host
- PREINIT:
- time_t timep;
- bool_t x;
- CODE:
- ST(0) = sv_newmortal();
- if( rpcb_gettime( host, &timep ) )
- sv_setnv( ST(0), (double)timep);
-
-The next example demonstrates how one would place an explicit undef in the
-return value, should the need arise.
-
- SV *
- rpcb_gettime(host)
- char * host
- PREINIT:
- time_t timep;
- bool_t x;
- CODE:
- if( rpcb_gettime( host, &timep ) ){
- ST(0) = sv_newmortal();
- sv_setnv( ST(0), (double)timep);
- }
- else{
- ST(0) = &PL_sv_undef;
- }
-
-To return an empty list one must use a PPCODE: block and
-then not push return values on the stack.
-
- void
- rpcb_gettime(host)
- char *host
- PREINIT:
- time_t timep;
- PPCODE:
- if( rpcb_gettime( host, &timep ) )
- PUSHs(sv_2mortal(newSViv(timep)));
- else{
- /* Nothing pushed on stack, so an empty
- * list is implicitly returned. */
- }
-
-Some people may be inclined to include an explicit C<return> in the above
-XSUB, rather than letting control fall through to the end. In those
-situations C<XSRETURN_EMPTY> should be used, instead. This will ensure that
-the XSUB stack is properly adjusted. Consult L<perlapi> for other
-C<XSRETURN> macros.
-
-Since C<XSRETURN_*> macros can be used with CODE blocks as well, one can
-rewrite this example as:
-
- int
- rpcb_gettime(host)
- char *host
- PREINIT:
- time_t timep;
- CODE:
- RETVAL = rpcb_gettime( host, &timep );
- if (RETVAL == 0)
- XSRETURN_UNDEF;
- OUTPUT:
- RETVAL
-
-In fact, one can put this check into a POSTCALL: section as well. Together
-with PREINIT: simplifications, this leads to:
-
- int
- rpcb_gettime(host)
- char *host
- time_t timep;
- POSTCALL:
- if (RETVAL == 0)
- XSRETURN_UNDEF;
-
-=head2 The REQUIRE: Keyword
-
-The REQUIRE: keyword is used to indicate the minimum version of the
-B<xsubpp> compiler needed to compile the XS module. An XS module which
-contains the following statement will compile with only B<xsubpp> version
-1.922 or greater:
-
- REQUIRE: 1.922
-
-=head2 The CLEANUP: Keyword
-
-This keyword can be used when an XSUB requires special cleanup procedures
-before it terminates. When the CLEANUP: keyword is used it must follow
-any CODE:, PPCODE:, or OUTPUT: blocks which are present in the XSUB. The
-code specified for the cleanup block will be added as the last statements
-in the XSUB.
-
-=head2 The POSTCALL: Keyword
-
-This keyword can be used when an XSUB requires special procedures
-executed after the C subroutine call is performed. When the POSTCALL:
-keyword is used it must precede OUTPUT: and CLEANUP: blocks which are
-present in the XSUB.
-
-See examples in L<"The NO_OUTPUT Keyword"> and L<"Returning Undef And Empty Lists">.
-
-The POSTCALL: block does not make a lot of sense when the C subroutine
-call is supplied by user by providing either CODE: or PPCODE: section.
-
-=head2 The BOOT: Keyword
-
-The BOOT: keyword is used to add code to the extension's bootstrap
-function. The bootstrap function is generated by the B<xsubpp> compiler and
-normally holds the statements necessary to register any XSUBs with Perl.
-With the BOOT: keyword the programmer can tell the compiler to add extra
-statements to the bootstrap function.
-
-This keyword may be used any time after the first MODULE keyword and should
-appear on a line by itself. The first blank line after the keyword will
-terminate the code block.
-
- BOOT:
- # The following message will be printed when the
- # bootstrap function executes.
- printf("Hello from the bootstrap!\n");
-
-=head2 The VERSIONCHECK: Keyword
-
-The VERSIONCHECK: keyword corresponds to B<xsubpp>'s C<-versioncheck> and
-C<-noversioncheck> options. This keyword overrides the command line
-options. Version checking is enabled by default. When version checking is
-enabled the XS module will attempt to verify that its version matches the
-version of the PM module.
-
-To enable version checking:
-
- VERSIONCHECK: ENABLE
-
-To disable version checking:
-
- VERSIONCHECK: DISABLE
-
-Note that if the version of the PM module is an NV (a floating point
-number), it will be stringified with a possible loss of precision
-(currently chopping to nine decimal places) so that it may not match
-the version of the XS module anymore. Quoting the $VERSION declaration
-to make it a string is recommended if long version numbers are used.
-
-=head2 The PROTOTYPES: Keyword
-
-The PROTOTYPES: keyword corresponds to B<xsubpp>'s C<-prototypes> and
-C<-noprototypes> options. This keyword overrides the command line options.
-Prototypes are enabled by default. When prototypes are enabled XSUBs will
-be given Perl prototypes. This keyword may be used multiple times in an XS
-module to enable and disable prototypes for different parts of the module.
-
-To enable prototypes:
-
- PROTOTYPES: ENABLE
-
-To disable prototypes:
-
- PROTOTYPES: DISABLE
-
-=head2 The PROTOTYPE: Keyword
-
-This keyword is similar to the PROTOTYPES: keyword above but can be used to
-force B<xsubpp> to use a specific prototype for the XSUB. This keyword
-overrides all other prototype options and keywords but affects only the
-current XSUB. Consult L<perlsub/Prototypes> for information about Perl
-prototypes.
-
- bool_t
- rpcb_gettime(timep, ...)
- time_t timep = NO_INIT
- PROTOTYPE: $;$
- PREINIT:
- char *host = "localhost";
- CODE:
- if( items > 1 )
- host = (char *)SvPV_nolen(ST(1));
- RETVAL = rpcb_gettime( host, &timep );
- OUTPUT:
- timep
- RETVAL
-
-If the prototypes are enabled, you can disable it locally for a given
-XSUB as in the following example:
-
- void
- rpcb_gettime_noproto()
- PROTOTYPE: DISABLE
- ...
-
-=head2 The ALIAS: Keyword
-
-The ALIAS: keyword allows an XSUB to have two or more unique Perl names
-and to know which of those names was used when it was invoked. The Perl
-names may be fully-qualified with package names. Each alias is given an
-index. The compiler will setup a variable called C<ix> which contain the
-index of the alias which was used. When the XSUB is called with its
-declared name C<ix> will be 0.
-
-The following example will create aliases C<FOO::gettime()> and
-C<BAR::getit()> for this function.
-
- bool_t
- rpcb_gettime(host,timep)
- char *host
- time_t &timep
- ALIAS:
- FOO::gettime = 1
- BAR::getit = 2
- INIT:
- printf("# ix = %d\n", ix );
- OUTPUT:
- timep
-
-=head2 The OVERLOAD: Keyword
-
-Instead of writing an overloaded interface using pure Perl, you
-can also use the OVERLOAD keyword to define additional Perl names
-for your functions (like the ALIAS: keyword above). However, the
-overloaded functions must be defined with three parameters (except
-for the nomethod() function which needs four parameters). If any
-function has the OVERLOAD: keyword, several additional lines
-will be defined in the c file generated by xsubpp in order to
-register with the overload magic.
-
-Since blessed objects are actually stored as RV's, it is useful
-to use the typemap features to preprocess parameters and extract
-the actual SV stored within the blessed RV. See the sample for
-T_PTROBJ_SPECIAL below.
-
-To use the OVERLOAD: keyword, create an XS function which takes
-three input parameters ( or use the c style '...' definition) like
-this:
-
- SV *
- cmp (lobj, robj, swap)
- My_Module_obj lobj
- My_Module_obj robj
- IV swap
- OVERLOAD: cmp <=>
- { /* function defined here */}
-
-In this case, the function will overload both of the three way
-comparison operators. For all overload operations using non-alpha
-characters, you must type the parameter without quoting, separating
-multiple overloads with whitespace. Note that "" (the stringify
-overload) should be entered as \"\" (i.e. escaped).
-
-=head2 The FALLBACK: Keyword
-
-In addition to the OVERLOAD keyword, if you need to control how
-Perl autogenerates missing overloaded operators, you can set the
-FALLBACK keyword in the module header section, like this:
-
- MODULE = RPC PACKAGE = RPC
-
- FALLBACK: TRUE
- ...
-
-where FALLBACK can take any of the three values TRUE, FALSE, or
-UNDEF. If you do not set any FALLBACK value when using OVERLOAD,
-it defaults to UNDEF. FALLBACK is not used except when one or
-more functions using OVERLOAD have been defined. Please see
-L<overload/Fallback> for more details.
-
-=head2 The INTERFACE: Keyword
-
-This keyword declares the current XSUB as a keeper of the given
-calling signature. If some text follows this keyword, it is
-considered as a list of functions which have this signature, and
-should be attached to the current XSUB.
-
-For example, if you have 4 C functions multiply(), divide(), add(),
-subtract() all having the signature:
-
- symbolic f(symbolic, symbolic);
-
-you can make them all to use the same XSUB using this:
-
- symbolic
- interface_s_ss(arg1, arg2)
- symbolic arg1
- symbolic arg2
- INTERFACE:
- multiply divide
- add subtract
-
-(This is the complete XSUB code for 4 Perl functions!) Four generated
-Perl function share names with corresponding C functions.
-
-The advantage of this approach comparing to ALIAS: keyword is that there
-is no need to code a switch statement, each Perl function (which shares
-the same XSUB) knows which C function it should call. Additionally, one
-can attach an extra function remainder() at runtime by using
-
- CV *mycv = newXSproto("Symbolic::remainder",
- XS_Symbolic_interface_s_ss, __FILE__, "$$");
- XSINTERFACE_FUNC_SET(mycv, remainder);
-
-say, from another XSUB. (This example supposes that there was no
-INTERFACE_MACRO: section, otherwise one needs to use something else instead of
-C<XSINTERFACE_FUNC_SET>, see the next section.)
-
-=head2 The INTERFACE_MACRO: Keyword
-
-This keyword allows one to define an INTERFACE using a different way
-to extract a function pointer from an XSUB. The text which follows
-this keyword should give the name of macros which would extract/set a
-function pointer. The extractor macro is given return type, C<CV*>,
-and C<XSANY.any_dptr> for this C<CV*>. The setter macro is given cv,
-and the function pointer.
-
-The default value is C<XSINTERFACE_FUNC> and C<XSINTERFACE_FUNC_SET>.
-An INTERFACE keyword with an empty list of functions can be omitted if
-INTERFACE_MACRO keyword is used.
-
-Suppose that in the previous example functions pointers for
-multiply(), divide(), add(), subtract() are kept in a global C array
-C<fp[]> with offsets being C<multiply_off>, C<divide_off>, C<add_off>,
-C<subtract_off>. Then one can use
-
- #define XSINTERFACE_FUNC_BYOFFSET(ret,cv,f) \
- ((XSINTERFACE_CVT_ANON(ret))fp[CvXSUBANY(cv).any_i32])
- #define XSINTERFACE_FUNC_BYOFFSET_set(cv,f) \
- CvXSUBANY(cv).any_i32 = CAT2( f, _off )
-
-in C section,
-
- symbolic
- interface_s_ss(arg1, arg2)
- symbolic arg1
- symbolic arg2
- INTERFACE_MACRO:
- XSINTERFACE_FUNC_BYOFFSET
- XSINTERFACE_FUNC_BYOFFSET_set
- INTERFACE:
- multiply divide
- add subtract
-
-in XSUB section.
-
-=head2 The INCLUDE: Keyword
-
-This keyword can be used to pull other files into the XS module. The other
-files may have XS code. INCLUDE: can also be used to run a command to
-generate the XS code to be pulled into the module.
-
-The file F<Rpcb1.xsh> contains our C<rpcb_gettime()> function:
-
- bool_t
- rpcb_gettime(host,timep)
- char *host
- time_t &timep
- OUTPUT:
- timep
-
-The XS module can use INCLUDE: to pull that file into it.
-
- INCLUDE: Rpcb1.xsh
-
-If the parameters to the INCLUDE: keyword are followed by a pipe (C<|>) then
-the compiler will interpret the parameters as a command. This feature is
-mildly deprecated in favour of the C<INCLUDE_COMMAND:> directive, as documented
-below.
-
- INCLUDE: cat Rpcb1.xsh |
-
-Do not use this to run perl: C<INCLUDE: perl |> will run the perl that
-happens to be the first in your path and not necessarily the same perl that is
-used to run C<xsubpp>. See L<"The INCLUDE_COMMAND: Keyword">.
-
-=head2 The INCLUDE_COMMAND: Keyword
-
-Runs the supplied command and includes its output into the current XS
-document. C<INCLUDE_COMMAND> assigns special meaning to the C<$^X> token
-in that it runs the same perl interpreter that is running C<xsubpp>:
-
- INCLUDE_COMMAND: cat Rpcb1.xsh
-
- INCLUDE_COMMAND: $^X -e ...
-
-=head2 The CASE: Keyword
-
-The CASE: keyword allows an XSUB to have multiple distinct parts with each
-part acting as a virtual XSUB. CASE: is greedy and if it is used then all
-other XS keywords must be contained within a CASE:. This means nothing may
-precede the first CASE: in the XSUB and anything following the last CASE: is
-included in that case.
-
-A CASE: might switch via a parameter of the XSUB, via the C<ix> ALIAS:
-variable (see L<"The ALIAS: Keyword">), or maybe via the C<items> variable
-(see L<"Variable-length Parameter Lists">). The last CASE: becomes the
-B<default> case if it is not associated with a conditional. The following
-example shows CASE switched via C<ix> with a function C<rpcb_gettime()>
-having an alias C<x_gettime()>. When the function is called as
-C<rpcb_gettime()> its parameters are the usual C<(char *host, time_t *timep)>,
-but when the function is called as C<x_gettime()> its parameters are
-reversed, C<(time_t *timep, char *host)>.
-
- long
- rpcb_gettime(a,b)
- CASE: ix == 1
- ALIAS:
- x_gettime = 1
- INPUT:
- # 'a' is timep, 'b' is host
- char *b
- time_t a = NO_INIT
- CODE:
- RETVAL = rpcb_gettime( b, &a );
- OUTPUT:
- a
- RETVAL
- CASE:
- # 'a' is host, 'b' is timep
- char *a
- time_t &b = NO_INIT
- OUTPUT:
- b
- RETVAL
-
-That function can be called with either of the following statements. Note
-the different argument lists.
-
- $status = rpcb_gettime( $host, $timep );
-
- $status = x_gettime( $timep, $host );
-
-=head2 The & Unary Operator
-
-The C<&> unary operator in the INPUT: section is used to tell B<xsubpp>
-that it should convert a Perl value to/from C using the C type to the left
-of C<&>, but provide a pointer to this value when the C function is called.
-
-This is useful to avoid a CODE: block for a C function which takes a parameter
-by reference. Typically, the parameter should be not a pointer type (an
-C<int> or C<long> but not an C<int*> or C<long*>).
-
-The following XSUB will generate incorrect C code. The B<xsubpp> compiler will
-turn this into code which calls C<rpcb_gettime()> with parameters C<(char
-*host, time_t timep)>, but the real C<rpcb_gettime()> wants the C<timep>
-parameter to be of type C<time_t*> rather than C<time_t>.
-
- bool_t
- rpcb_gettime(host,timep)
- char *host
- time_t timep
- OUTPUT:
- timep
-
-That problem is corrected by using the C<&> operator. The B<xsubpp> compiler
-will now turn this into code which calls C<rpcb_gettime()> correctly with
-parameters C<(char *host, time_t *timep)>. It does this by carrying the
-C<&> through, so the function call looks like C<rpcb_gettime(host, &timep)>.
-
- bool_t
- rpcb_gettime(host,timep)
- char *host
- time_t &timep
- OUTPUT:
- timep
-
-=head2 Inserting POD, Comments and C Preprocessor Directives
-
-C preprocessor directives are allowed within BOOT:, PREINIT: INIT:, CODE:,
-PPCODE:, POSTCALL:, and CLEANUP: blocks, as well as outside the functions.
-Comments are allowed anywhere after the MODULE keyword. The compiler will
-pass the preprocessor directives through untouched and will remove the
-commented lines. POD documentation is allowed at any point, both in the
-C and XS language sections. POD must be terminated with a C<=cut> command;
-C<xsubpp> will exit with an error if it does not. It is very unlikely that
-human generated C code will be mistaken for POD, as most indenting styles
-result in whitespace in front of any line starting with C<=>. Machine
-generated XS files may fall into this trap unless care is taken to
-ensure that a space breaks the sequence "\n=".
-
-Comments can be added to XSUBs by placing a C<#> as the first
-non-whitespace of a line. Care should be taken to avoid making the
-comment look like a C preprocessor directive, lest it be interpreted as
-such. The simplest way to prevent this is to put whitespace in front of
-the C<#>.
-
-If you use preprocessor directives to choose one of two
-versions of a function, use
-
- #if ... version1
- #else /* ... version2 */
- #endif
-
-and not
-
- #if ... version1
- #endif
- #if ... version2
- #endif
-
-because otherwise B<xsubpp> will believe that you made a duplicate
-definition of the function. Also, put a blank line before the
-#else/#endif so it will not be seen as part of the function body.
-
-=head2 Using XS With C++
-
-If an XSUB name contains C<::>, it is considered to be a C++ method.
-The generated Perl function will assume that
-its first argument is an object pointer. The object pointer
-will be stored in a variable called THIS. The object should
-have been created by C++ with the new() function and should
-be blessed by Perl with the sv_setref_pv() macro. The
-blessing of the object by Perl can be handled by a typemap. An example
-typemap is shown at the end of this section.
-
-If the return type of the XSUB includes C<static>, the method is considered
-to be a static method. It will call the C++
-function using the class::method() syntax. If the method is not static
-the function will be called using the THIS-E<gt>method() syntax.
-
-The next examples will use the following C++ class.
-
- class color {
- public:
- color();
- ~color();
- int blue();
- void set_blue( int );
-
- private:
- int c_blue;
- };
-
-The XSUBs for the blue() and set_blue() methods are defined with the class
-name but the parameter for the object (THIS, or "self") is implicit and is
-not listed.
-
- int
- color::blue()
-
- void
- color::set_blue( val )
- int val
-
-Both Perl functions will expect an object as the first parameter. In the
-generated C++ code the object is called C<THIS>, and the method call will
-be performed on this object. So in the C++ code the blue() and set_blue()
-methods will be called as this:
-
- RETVAL = THIS->blue();
-
- THIS->set_blue( val );
-
-You could also write a single get/set method using an optional argument:
-
- int
- color::blue( val = NO_INIT )
- int val
- PROTOTYPE $;$
- CODE:
- if (items > 1)
- THIS->set_blue( val );
- RETVAL = THIS->blue();
- OUTPUT:
- RETVAL
-
-If the function's name is B<DESTROY> then the C++ C<delete> function will be
-called and C<THIS> will be given as its parameter. The generated C++ code for
-
- void
- color::DESTROY()
-
-will look like this:
-
- color *THIS = ...; // Initialized as in typemap
-
- delete THIS;
-
-If the function's name is B<new> then the C++ C<new> function will be called
-to create a dynamic C++ object. The XSUB will expect the class name, which
-will be kept in a variable called C<CLASS>, to be given as the first
-argument.
-
- color *
- color::new()
-
-The generated C++ code will call C<new>.
-
- RETVAL = new color();
-
-The following is an example of a typemap that could be used for this C++
-example.
-
- TYPEMAP
- color * O_OBJECT
-
- OUTPUT
- # The Perl object is blessed into 'CLASS', which should be a
- # char* having the name of the package for the blessing.
- O_OBJECT
- sv_setref_pv( $arg, CLASS, (void*)$var );
-
- INPUT
- O_OBJECT
- if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) )
- $var = ($type)SvIV((SV*)SvRV( $arg ));
- else{
- warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" );
- XSRETURN_UNDEF;
- }
-
-=head2 Interface Strategy
-
-When designing an interface between Perl and a C library a straight
-translation from C to XS (such as created by C<h2xs -x>) is often sufficient.
-However, sometimes the interface will look
-very C-like and occasionally nonintuitive, especially when the C function
-modifies one of its parameters, or returns failure inband (as in "negative
-return values mean failure"). In cases where the programmer wishes to
-create a more Perl-like interface the following strategy may help to
-identify the more critical parts of the interface.
-
-Identify the C functions with input/output or output parameters. The XSUBs for
-these functions may be able to return lists to Perl.
-
-Identify the C functions which use some inband info as an indication
-of failure. They may be
-candidates to return undef or an empty list in case of failure. If the
-failure may be detected without a call to the C function, you may want to use
-an INIT: section to report the failure. For failures detectable after the C
-function returns one may want to use a POSTCALL: section to process the
-failure. In more complicated cases use CODE: or PPCODE: sections.
-
-If many functions use the same failure indication based on the return value,
-you may want to create a special typedef to handle this situation. Put
-
- typedef int negative_is_failure;
-
-near the beginning of XS file, and create an OUTPUT typemap entry
-for C<negative_is_failure> which converts negative values to C<undef>, or
-maybe croak()s. After this the return value of type C<negative_is_failure>
-will create more Perl-like interface.
-
-Identify which values are used by only the C and XSUB functions
-themselves, say, when a parameter to a function should be a contents of a
-global variable. If Perl does not need to access the contents of the value
-then it may not be necessary to provide a translation for that value
-from C to Perl.
-
-Identify the pointers in the C function parameter lists and return
-values. Some pointers may be used to implement input/output or
-output parameters, they can be handled in XS with the C<&> unary operator,
-and, possibly, using the NO_INIT keyword.
-Some others will require handling of types like C<int *>, and one needs
-to decide what a useful Perl translation will do in such a case. When
-the semantic is clear, it is advisable to put the translation into a typemap
-file.
-
-Identify the structures used by the C functions. In many
-cases it may be helpful to use the T_PTROBJ typemap for
-these structures so they can be manipulated by Perl as
-blessed objects. (This is handled automatically by C<h2xs -x>.)
-
-If the same C type is used in several different contexts which require
-different translations, C<typedef> several new types mapped to this C type,
-and create separate F<typemap> entries for these new types. Use these
-types in declarations of return type and parameters to XSUBs.
-
-=head2 Perl Objects And C Structures
-
-When dealing with C structures one should select either
-B<T_PTROBJ> or B<T_PTRREF> for the XS type. Both types are
-designed to handle pointers to complex objects. The
-T_PTRREF type will allow the Perl object to be unblessed
-while the T_PTROBJ type requires that the object be blessed.
-By using T_PTROBJ one can achieve a form of type-checking
-because the XSUB will attempt to verify that the Perl object
-is of the expected type.
-
-The following XS code shows the getnetconfigent() function which is used
-with ONC+ TIRPC. The getnetconfigent() function will return a pointer to a
-C structure and has the C prototype shown below. The example will
-demonstrate how the C pointer will become a Perl reference. Perl will
-consider this reference to be a pointer to a blessed object and will
-attempt to call a destructor for the object. A destructor will be
-provided in the XS source to free the memory used by getnetconfigent().
-Destructors in XS can be created by specifying an XSUB function whose name
-ends with the word B<DESTROY>. XS destructors can be used to free memory
-which may have been malloc'd by another XSUB.
-
- struct netconfig *getnetconfigent(const char *netid);
-
-A C<typedef> will be created for C<struct netconfig>. The Perl
-object will be blessed in a class matching the name of the C
-type, with the tag C<Ptr> appended, and the name should not
-have embedded spaces if it will be a Perl package name. The
-destructor will be placed in a class corresponding to the
-class of the object and the PREFIX keyword will be used to
-trim the name to the word DESTROY as Perl will expect.
-
- typedef struct netconfig Netconfig;
-
- MODULE = RPC PACKAGE = RPC
-
- Netconfig *
- getnetconfigent(netid)
- char *netid
-
- MODULE = RPC PACKAGE = NetconfigPtr PREFIX = rpcb_
-
- void
- rpcb_DESTROY(netconf)
- Netconfig *netconf
- CODE:
- printf("Now in NetconfigPtr::DESTROY\n");
- free( netconf );
-
-This example requires the following typemap entry. Consult the typemap
-section for more information about adding new typemaps for an extension.
-
- TYPEMAP
- Netconfig * T_PTROBJ
-
-This example will be used with the following Perl statements.
-
- use RPC;
- $netconf = getnetconfigent("udp");
-
-When Perl destroys the object referenced by $netconf it will send the
-object to the supplied XSUB DESTROY function. Perl cannot determine, and
-does not care, that this object is a C struct and not a Perl object. In
-this sense, there is no difference between the object created by the
-getnetconfigent() XSUB and an object created by a normal Perl subroutine.
-
-=head2 The Typemap
-
-The typemap is a collection of code fragments which are used by the B<xsubpp>
-compiler to map C function parameters and values to Perl values. The
-typemap file may consist of three sections labelled C<TYPEMAP>, C<INPUT>, and
-C<OUTPUT>. An unlabelled initial section is assumed to be a C<TYPEMAP>
-section. The INPUT section tells
-the compiler how to translate Perl values
-into variables of certain C types. The OUTPUT section tells the compiler
-how to translate the values from certain C types into values Perl can
-understand. The TYPEMAP section tells the compiler which of the INPUT and
-OUTPUT code fragments should be used to map a given C type to a Perl value.
-The section labels C<TYPEMAP>, C<INPUT>, or C<OUTPUT> must begin
-in the first column on a line by themselves, and must be in uppercase.
-
-The default typemap in the C<lib/ExtUtils> directory of the Perl source
-contains many useful types which can be used by Perl extensions. Some
-extensions define additional typemaps which they keep in their own directory.
-These additional typemaps may reference INPUT and OUTPUT maps in the main
-typemap. The B<xsubpp> compiler will allow the extension's own typemap to
-override any mappings which are in the default typemap.
-
-Most extensions which require a custom typemap will need only the TYPEMAP
-section of the typemap file. The custom typemap used in the
-getnetconfigent() example shown earlier demonstrates what may be the typical
-use of extension typemaps. That typemap is used to equate a C structure
-with the T_PTROBJ typemap. The typemap used by getnetconfigent() is shown
-here. Note that the C type is separated from the XS type with a tab and
-that the C unary operator C<*> is considered to be a part of the C type name.
-
- TYPEMAP
- Netconfig *<tab>T_PTROBJ
-
-Here's a more complicated example: suppose that you wanted C<struct
-netconfig> to be blessed into the class C<Net::Config>. One way to do
-this is to use underscores (_) to separate package names, as follows:
-
- typedef struct netconfig * Net_Config;
-
-And then provide a typemap entry C<T_PTROBJ_SPECIAL> that maps underscores to
-double-colons (::), and declare C<Net_Config> to be of that type:
-
-
- TYPEMAP
- Net_Config T_PTROBJ_SPECIAL
-
- INPUT
- T_PTROBJ_SPECIAL
- if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\")) {
- IV tmp = SvIV((SV*)SvRV($arg));
- $var = INT2PTR($type, tmp);
- }
- else
- croak(\"$var is not of type ${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\")
-
- OUTPUT
- T_PTROBJ_SPECIAL
- sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\",
- (void*)$var);
-
-The INPUT and OUTPUT sections substitute underscores for double-colons
-on the fly, giving the desired effect. This example demonstrates some
-of the power and versatility of the typemap facility.
-
-The INT2PTR macro (defined in perl.h) casts an integer to a pointer,
-of a given type, taking care of the possible different size of integers
-and pointers. There are also PTR2IV, PTR2UV, PTR2NV macros,
-to map the other way, which may be useful in OUTPUT sections.
-
-=head2 Safely Storing Static Data in XS
-
-Starting with Perl 5.8, a macro framework has been defined to allow
-static data to be safely stored in XS modules that will be accessed from
-a multi-threaded Perl.
-
-Although primarily designed for use with multi-threaded Perl, the macros
-have been designed so that they will work with non-threaded Perl as well.
-
-It is therefore strongly recommended that these macros be used by all
-XS modules that make use of static data.
-
-The easiest way to get a template set of macros to use is by specifying
-the C<-g> (C<--global>) option with h2xs (see L<h2xs>).
-
-Below is an example module that makes use of the macros.
-
- #include "EXTERN.h"
- #include "perl.h"
- #include "XSUB.h"
-
- /* Global Data */
-
- #define MY_CXT_KEY "BlindMice::_guts" XS_VERSION
-
- typedef struct {
- int count;
- char name[3][100];
- } my_cxt_t;
-
- START_MY_CXT
-
- MODULE = BlindMice PACKAGE = BlindMice
-
- BOOT:
- {
- MY_CXT_INIT;
- MY_CXT.count = 0;
- strcpy(MY_CXT.name[0], "None");
- strcpy(MY_CXT.name[1], "None");
- strcpy(MY_CXT.name[2], "None");
- }
-
- int
- newMouse(char * name)
- char * name;
- PREINIT:
- dMY_CXT;
- CODE:
- if (MY_CXT.count >= 3) {
- warn("Already have 3 blind mice");
- RETVAL = 0;
- }
- else {
- RETVAL = ++ MY_CXT.count;
- strcpy(MY_CXT.name[MY_CXT.count - 1], name);
- }
-
- char *
- get_mouse_name(index)
- int index
- CODE:
- dMY_CXT;
- RETVAL = MY_CXT.lives ++;
- if (index > MY_CXT.count)
- croak("There are only 3 blind mice.");
- else
- RETVAL = newSVpv(MY_CXT.name[index - 1]);
-
- void
- CLONE(...)
- CODE:
- MY_CXT_CLONE;
-
-B<REFERENCE>
-
-=over 5
-
-=item MY_CXT_KEY
-
-This macro is used to define a unique key to refer to the static data
-for an XS module. The suggested naming scheme, as used by h2xs, is to
-use a string that consists of the module name, the string "::_guts"
-and the module version number.
-
- #define MY_CXT_KEY "MyModule::_guts" XS_VERSION
-
-=item typedef my_cxt_t
-
-This struct typedef I<must> always be called C<my_cxt_t>. The other
-C<CXT*> macros assume the existence of the C<my_cxt_t> typedef name.
-
-Declare a typedef named C<my_cxt_t> that is a structure that contains
-all the data that needs to be interpreter-local.
-
- typedef struct {
- int some_value;
- } my_cxt_t;
-
-=item START_MY_CXT
-
-Always place the START_MY_CXT macro directly after the declaration
-of C<my_cxt_t>.
-
-=item MY_CXT_INIT
-
-The MY_CXT_INIT macro initialises storage for the C<my_cxt_t> struct.
-
-It I<must> be called exactly once, typically in a BOOT: section. If you
-are maintaining multiple interpreters, it should be called once in each
-interpreter instance, except for interpreters cloned from existing ones.
-(But see C<MY_CXT_CLONE> below.)
-
-=item dMY_CXT
-
-Use the dMY_CXT macro (a declaration) in all the functions that access
-MY_CXT.
-
-=item MY_CXT
-
-Use the MY_CXT macro to access members of the C<my_cxt_t> struct. For
-example, if C<my_cxt_t> is
-
- typedef struct {
- int index;
- } my_cxt_t;
-
-then use this to access the C<index> member
-
- dMY_CXT;
- MY_CXT.index = 2;
-
-=item aMY_CXT/pMY_CXT
-
-C<dMY_CXT> may be quite expensive to calculate, and to avoid the overhead
-of invoking it in each function it is possible to pass the declaration
-onto other functions using the C<aMY_CXT>/C<pMY_CXT> macros, eg
-
- void sub1() {
- dMY_CXT;
- MY_CXT.index = 1;
- sub2(aMY_CXT);
- }
-
- void sub2(pMY_CXT) {
- MY_CXT.index = 2;
- }
-
-Analogously to C<pTHX>, there are equivalent forms for when the macro is the
-first or last in multiple arguments, where an underscore represents a
-comma, i.e. C<_aMY_CXT>, C<aMY_CXT_>, C<_pMY_CXT> and C<pMY_CXT_>.
-
-=item MY_CXT_CLONE
-
-By default, when a new interpreter is created as a copy of an existing one
-(eg via C<< threads->create() >>), both interpreters share the same physical
-my_cxt_t structure. Calling C<MY_CXT_CLONE> (typically via the package's
-C<CLONE()> function), causes a byte-for-byte copy of the structure to be
-taken, and any future dMY_CXT will cause the copy to be accessed instead.
-
-=item MY_CXT_INIT_INTERP(my_perl)
-
-=item dMY_CXT_INTERP(my_perl)
-
-These are versions of the macros which take an explicit interpreter as an
-argument.
-
-=back
-
-Note that these macros will only work together within the I<same> source
-file; that is, a dMY_CTX in one source file will access a different structure
-than a dMY_CTX in another source file.
-
-=head2 Thread-aware system interfaces
-
-Starting from Perl 5.8, in C/C++ level Perl knows how to wrap
-system/library interfaces that have thread-aware versions
-(e.g. getpwent_r()) into frontend macros (e.g. getpwent()) that
-correctly handle the multithreaded interaction with the Perl
-interpreter. This will happen transparently, the only thing
-you need to do is to instantiate a Perl interpreter.
-
-This wrapping happens always when compiling Perl core source
-(PERL_CORE is defined) or the Perl core extensions (PERL_EXT is
-defined). When compiling XS code outside of Perl core the wrapping
-does not take place. Note, however, that intermixing the _r-forms
-(as Perl compiled for multithreaded operation will do) and the _r-less
-forms is neither well-defined (inconsistent results, data corruption,
-or even crashes become more likely), nor is it very portable.
-
-=head1 EXAMPLES
-
-File C<RPC.xs>: Interface to some ONC+ RPC bind library functions.
-
- #include "EXTERN.h"
- #include "perl.h"
- #include "XSUB.h"
-
- #include <rpc/rpc.h>
-
- typedef struct netconfig Netconfig;
-
- MODULE = RPC PACKAGE = RPC
-
- SV *
- rpcb_gettime(host="localhost")
- char *host
- PREINIT:
- time_t timep;
- CODE:
- ST(0) = sv_newmortal();
- if( rpcb_gettime( host, &timep ) )
- sv_setnv( ST(0), (double)timep );
-
- Netconfig *
- getnetconfigent(netid="udp")
- char *netid
-
- MODULE = RPC PACKAGE = NetconfigPtr PREFIX = rpcb_
-
- void
- rpcb_DESTROY(netconf)
- Netconfig *netconf
- CODE:
- printf("NetconfigPtr::DESTROY\n");
- free( netconf );
-
-File C<typemap>: Custom typemap for RPC.xs.
-
- TYPEMAP
- Netconfig * T_PTROBJ
-
-File C<RPC.pm>: Perl module for the RPC extension.
-
- package RPC;
-
- require Exporter;
- require DynaLoader;
- @ISA = qw(Exporter DynaLoader);
- @EXPORT = qw(rpcb_gettime getnetconfigent);
-
- bootstrap RPC;
- 1;
-
-File C<rpctest.pl>: Perl test program for the RPC extension.
-
- use RPC;
-
- $netconf = getnetconfigent();
- $a = rpcb_gettime();
- print "time = $a\n";
- print "netconf = $netconf\n";
-
- $netconf = getnetconfigent("tcp");
- $a = rpcb_gettime("poplar");
- print "time = $a\n";
- print "netconf = $netconf\n";
-
-
-=head1 XS VERSION
-
-This document covers features supported by C<xsubpp> 1.935.
-
-=head1 AUTHOR
-
-Originally written by Dean Roehrich <F<roehrich at cray.com>>.
-
-Maintained since 1996 by The Perl Porters <F<perlbug at perl.org>>.
Deleted: vendor/perl/dist/pod/perlxstut.pod
===================================================================
--- vendor/perl/dist/pod/perlxstut.pod 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/perlxstut.pod 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1370 +0,0 @@
-=head1 NAME
-
-perlXStut - Tutorial for writing XSUBs
-
-=head1 DESCRIPTION
-
-This tutorial will educate the reader on the steps involved in creating
-a Perl extension. The reader is assumed to have access to L<perlguts>,
-L<perlapi> and L<perlxs>.
-
-This tutorial starts with very simple examples and becomes more complex,
-with each new example adding new features. Certain concepts may not be
-completely explained until later in the tutorial in order to slowly ease
-the reader into building extensions.
-
-This tutorial was written from a Unix point of view. Where I know them
-to be otherwise different for other platforms (e.g. Win32), I will list
-them. If you find something that was missed, please let me know.
-
-=head1 SPECIAL NOTES
-
-=head2 make
-
-This tutorial assumes that the make program that Perl is configured to
-use is called C<make>. Instead of running "make" in the examples that
-follow, you may have to substitute whatever make program Perl has been
-configured to use. Running B<perl -V:make> should tell you what it is.
-
-=head2 Version caveat
-
-When writing a Perl extension for general consumption, one should expect that
-the extension will be used with versions of Perl different from the
-version available on your machine. Since you are reading this document,
-the version of Perl on your machine is probably 5.005 or later, but the users
-of your extension may have more ancient versions.
-
-To understand what kinds of incompatibilities one may expect, and in the rare
-case that the version of Perl on your machine is older than this document,
-see the section on "Troubleshooting these Examples" for more information.
-
-If your extension uses some features of Perl which are not available on older
-releases of Perl, your users would appreciate an early meaningful warning.
-You would probably put this information into the F<README> file, but nowadays
-installation of extensions may be performed automatically, guided by F<CPAN.pm>
-module or other tools.
-
-In MakeMaker-based installations, F<Makefile.PL> provides the earliest
-opportunity to perform version checks. One can put something like this
-in F<Makefile.PL> for this purpose:
-
- eval { require 5.007 }
- or die <<EOD;
- ############
- ### This module uses frobnication framework which is not available before
- ### version 5.007 of Perl. Upgrade your Perl before installing Kara::Mba.
- ############
- EOD
-
-=head2 Dynamic Loading versus Static Loading
-
-It is commonly thought that if a system does not have the capability to
-dynamically load a library, you cannot build XSUBs. This is incorrect.
-You I<can> build them, but you must link the XSUBs subroutines with the
-rest of Perl, creating a new executable. This situation is similar to
-Perl 4.
-
-This tutorial can still be used on such a system. The XSUB build mechanism
-will check the system and build a dynamically-loadable library if possible,
-or else a static library and then, optionally, a new statically-linked
-executable with that static library linked in.
-
-Should you wish to build a statically-linked executable on a system which
-can dynamically load libraries, you may, in all the following examples,
-where the command "C<make>" with no arguments is executed, run the command
-"C<make perl>" instead.
-
-If you have generated such a statically-linked executable by choice, then
-instead of saying "C<make test>", you should say "C<make test_static>".
-On systems that cannot build dynamically-loadable libraries at all, simply
-saying "C<make test>" is sufficient.
-
-=head1 TUTORIAL
-
-Now let's go on with the show!
-
-=head2 EXAMPLE 1
-
-Our first extension will be very simple. When we call the routine in the
-extension, it will print out a well-known message and return.
-
-Run "C<h2xs -A -n Mytest>". This creates a directory named Mytest,
-possibly under ext/ if that directory exists in the current working
-directory. Several files will be created under the Mytest dir, including
-MANIFEST, Makefile.PL, lib/Mytest.pm, Mytest.xs, t/Mytest.t, and Changes.
-
-The MANIFEST file contains the names of all the files just created in the
-Mytest directory.
-
-The file Makefile.PL should look something like this:
-
- use ExtUtils::MakeMaker;
- # See lib/ExtUtils/MakeMaker.pm for details of how to influence
- # the contents of the Makefile that is written.
- WriteMakefile(
- NAME => 'Mytest',
- VERSION_FROM => 'Mytest.pm', # finds $VERSION
- LIBS => [''], # e.g., '-lm'
- DEFINE => '', # e.g., '-DHAVE_SOMETHING'
- INC => '', # e.g., '-I/usr/include/other'
- );
-
-The file Mytest.pm should start with something like this:
-
- package Mytest;
-
- use 5.008008;
- use strict;
- use warnings;
-
- require Exporter;
-
- our @ISA = qw(Exporter);
- our %EXPORT_TAGS = ( 'all' => [ qw(
-
- ) ] );
-
- our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
-
- our @EXPORT = qw(
-
- );
-
- our $VERSION = '0.01';
-
- require XSLoader;
- XSLoader::load('Mytest', $VERSION);
-
- # Preloaded methods go here.
-
- 1;
- __END__
- # Below is the stub of documentation for your module. You better edit it!
-
-The rest of the .pm file contains sample code for providing documentation for
-the extension.
-
-Finally, the Mytest.xs file should look something like this:
-
- #include "EXTERN.h"
- #include "perl.h"
- #include "XSUB.h"
-
- #include "ppport.h"
-
- MODULE = Mytest PACKAGE = Mytest
-
-Let's edit the .xs file by adding this to the end of the file:
-
- void
- hello()
- CODE:
- printf("Hello, world!\n");
-
-It is okay for the lines starting at the "CODE:" line to not be indented.
-However, for readability purposes, it is suggested that you indent CODE:
-one level and the lines following one more level.
-
-Now we'll run "C<perl Makefile.PL>". This will create a real Makefile,
-which make needs. Its output looks something like:
-
- % perl Makefile.PL
- Checking if your kit is complete...
- Looks good
- Writing Makefile for Mytest
- %
-
-Now, running make will produce output that looks something like this (some
-long lines have been shortened for clarity and some extraneous lines have
-been deleted):
-
- % make
- cp lib/Mytest.pm blib/lib/Mytest.pm
- perl xsubpp -typemap typemap Mytest.xs > Mytest.xsc && mv Mytest.xsc Mytest.c
- Please specify prototyping behavior for Mytest.xs (see perlxs manual)
- cc -c Mytest.c
- Running Mkbootstrap for Mytest ()
- chmod 644 Mytest.bs
- rm -f blib/arch/auto/Mytest/Mytest.so
- cc -shared -L/usr/local/lib Mytest.o -o blib/arch/auto/Mytest/Mytest.so \
- \
-
- chmod 755 blib/arch/auto/Mytest/Mytest.so
- cp Mytest.bs blib/arch/auto/Mytest/Mytest.bs
- chmod 644 blib/arch/auto/Mytest/Mytest.bs
- Manifying blib/man3/Mytest.3pm
- %
-
-You can safely ignore the line about "prototyping behavior" - it is
-explained in L<perlxs/"The PROTOTYPES: Keyword">.
-
-Perl has its own special way of easily writing test scripts, but for this
-example only, we'll create our own test script. Create a file called hello
-that looks like this:
-
- #! /opt/perl5/bin/perl
-
- use ExtUtils::testlib;
-
- use Mytest;
-
- Mytest::hello();
-
-Now we make the script executable (C<chmod +x hello>), run the script
-and we should see the following output:
-
- % ./hello
- Hello, world!
- %
-
-=head2 EXAMPLE 2
-
-Now let's add to our extension a subroutine that will take a single numeric
-argument as input and return 1 if the number is even or 0 if the number
-is odd.
-
-Add the following to the end of Mytest.xs:
-
- int
- is_even(input)
- int input
- CODE:
- RETVAL = (input % 2 == 0);
- OUTPUT:
- RETVAL
-
-There does not need to be whitespace at the start of the "C<int input>"
-line, but it is useful for improving readability. Placing a semi-colon at
-the end of that line is also optional. Any amount and kind of whitespace
-may be placed between the "C<int>" and "C<input>".
-
-Now re-run make to rebuild our new shared library.
-
-Now perform the same steps as before, generating a Makefile from the
-Makefile.PL file, and running make.
-
-In order to test that our extension works, we now need to look at the
-file Mytest.t. This file is set up to imitate the same kind of testing
-structure that Perl itself has. Within the test script, you perform a
-number of tests to confirm the behavior of the extension, printing "ok"
-when the test is correct, "not ok" when it is not.
-
- use Test::More tests => 4;
- BEGIN { use_ok('Mytest') };
-
- #########################
-
- # Insert your test code below, the Test::More module is use()ed here so read
- # its man page ( perldoc Test::More ) for help writing this test script.
-
- is(&Mytest::is_even(0), 1);
- is(&Mytest::is_even(1), 0);
- is(&Mytest::is_even(2), 1);
-
-We will be calling the test script through the command "C<make test>". You
-should see output that looks something like this:
-
- %make test
- PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
- t/Mytest....ok
- All tests successful.
- Files=1, Tests=4, 0 wallclock secs ( 0.03 cusr + 0.00 csys = 0.03 CPU)
- %
-
-=head2 What has gone on?
-
-The program h2xs is the starting point for creating extensions. In later
-examples we'll see how we can use h2xs to read header files and generate
-templates to connect to C routines.
-
-h2xs creates a number of files in the extension directory. The file
-Makefile.PL is a perl script which will generate a true Makefile to build
-the extension. We'll take a closer look at it later.
-
-The .pm and .xs files contain the meat of the extension. The .xs file holds
-the C routines that make up the extension. The .pm file contains routines
-that tell Perl how to load your extension.
-
-Generating the Makefile and running C<make> created a directory called blib
-(which stands for "build library") in the current working directory. This
-directory will contain the shared library that we will build. Once we have
-tested it, we can install it into its final location.
-
-Invoking the test script via "C<make test>" did something very important.
-It invoked perl with all those C<-I> arguments so that it could find the
-various files that are part of the extension. It is I<very> important that
-while you are still testing extensions that you use "C<make test>". If you
-try to run the test script all by itself, you will get a fatal error.
-Another reason it is important to use "C<make test>" to run your test
-script is that if you are testing an upgrade to an already-existing version,
-using "C<make test>" ensures that you will test your new extension, not the
-already-existing version.
-
-When Perl sees a C<use extension;>, it searches for a file with the same name
-as the C<use>'d extension that has a .pm suffix. If that file cannot be found,
-Perl dies with a fatal error. The default search path is contained in the
-C<@INC> array.
-
-In our case, Mytest.pm tells perl that it will need the Exporter and Dynamic
-Loader extensions. It then sets the C<@ISA> and C<@EXPORT> arrays and the
-C<$VERSION> scalar; finally it tells perl to bootstrap the module. Perl
-will call its dynamic loader routine (if there is one) and load the shared
-library.
-
-The two arrays C<@ISA> and C<@EXPORT> are very important. The C<@ISA>
-array contains a list of other packages in which to search for methods (or
-subroutines) that do not exist in the current package. This is usually
-only important for object-oriented extensions (which we will talk about
-much later), and so usually doesn't need to be modified.
-
-The C<@EXPORT> array tells Perl which of the extension's variables and
-subroutines should be placed into the calling package's namespace. Because
-you don't know if the user has already used your variable and subroutine
-names, it's vitally important to carefully select what to export. Do I<not>
-export method or variable names I<by default> without a good reason.
-
-As a general rule, if the module is trying to be object-oriented then don't
-export anything. If it's just a collection of functions and variables, then
-you can export them via another array, called C<@EXPORT_OK>. This array
-does not automatically place its subroutine and variable names into the
-namespace unless the user specifically requests that this be done.
-
-See L<perlmod> for more information.
-
-The C<$VERSION> variable is used to ensure that the .pm file and the shared
-library are "in sync" with each other. Any time you make changes to
-the .pm or .xs files, you should increment the value of this variable.
-
-=head2 Writing good test scripts
-
-The importance of writing good test scripts cannot be over-emphasized. You
-should closely follow the "ok/not ok" style that Perl itself uses, so that
-it is very easy and unambiguous to determine the outcome of each test case.
-When you find and fix a bug, make sure you add a test case for it.
-
-By running "C<make test>", you ensure that your Mytest.t script runs and uses
-the correct version of your extension. If you have many test cases,
-save your test files in the "t" directory and use the suffix ".t".
-When you run "C<make test>", all of these test files will be executed.
-
-=head2 EXAMPLE 3
-
-Our third extension will take one argument as its input, round off that
-value, and set the I<argument> to the rounded value.
-
-Add the following to the end of Mytest.xs:
-
- void
- round(arg)
- double arg
- CODE:
- if (arg > 0.0) {
- arg = floor(arg + 0.5);
- } else if (arg < 0.0) {
- arg = ceil(arg - 0.5);
- } else {
- arg = 0.0;
- }
- OUTPUT:
- arg
-
-Edit the Makefile.PL file so that the corresponding line looks like this:
-
- 'LIBS' => ['-lm'], # e.g., '-lm'
-
-Generate the Makefile and run make. Change the test number in Mytest.t to
-"9" and add the following tests:
-
- $i = -1.5; &Mytest::round($i); is( $i, -2.0 );
- $i = -1.1; &Mytest::round($i); is( $i, -1.0 );
- $i = 0.0; &Mytest::round($i); is( $i, 0.0 );
- $i = 0.5; &Mytest::round($i); is( $i, 1.0 );
- $i = 1.2; &Mytest::round($i); is( $i, 1.0 );
-
-Running "C<make test>" should now print out that all nine tests are okay.
-
-Notice that in these new test cases, the argument passed to round was a
-scalar variable. You might be wondering if you can round a constant or
-literal. To see what happens, temporarily add the following line to Mytest.t:
-
- &Mytest::round(3);
-
-Run "C<make test>" and notice that Perl dies with a fatal error. Perl won't
-let you change the value of constants!
-
-=head2 What's new here?
-
-=over 4
-
-=item *
-
-We've made some changes to Makefile.PL. In this case, we've specified an
-extra library to be linked into the extension's shared library, the math
-library libm in this case. We'll talk later about how to write XSUBs that
-can call every routine in a library.
-
-=item *
-
-The value of the function is not being passed back as the function's return
-value, but by changing the value of the variable that was passed into the
-function. You might have guessed that when you saw that the return value
-of round is of type "void".
-
-=back
-
-=head2 Input and Output Parameters
-
-You specify the parameters that will be passed into the XSUB on the line(s)
-after you declare the function's return value and name. Each input parameter
-line starts with optional whitespace, and may have an optional terminating
-semicolon.
-
-The list of output parameters occurs at the very end of the function, just
-after the OUTPUT: directive. The use of RETVAL tells Perl that you
-wish to send this value back as the return value of the XSUB function. In
-Example 3, we wanted the "return value" placed in the original variable
-which we passed in, so we listed it (and not RETVAL) in the OUTPUT: section.
-
-=head2 The XSUBPP Program
-
-The B<xsubpp> program takes the XS code in the .xs file and translates it into
-C code, placing it in a file whose suffix is .c. The C code created makes
-heavy use of the C functions within Perl.
-
-=head2 The TYPEMAP file
-
-The B<xsubpp> program uses rules to convert from Perl's data types (scalar,
-array, etc.) to C's data types (int, char, etc.). These rules are stored
-in the typemap file ($PERLLIB/ExtUtils/typemap). This file is split into
-three parts.
-
-The first section maps various C data types to a name, which corresponds
-somewhat with the various Perl types. The second section contains C code
-which B<xsubpp> uses to handle input parameters. The third section contains
-C code which B<xsubpp> uses to handle output parameters.
-
-Let's take a look at a portion of the .c file created for our extension.
-The file name is Mytest.c:
-
- XS(XS_Mytest_round)
- {
- dXSARGS;
- if (items != 1)
- Perl_croak(aTHX_ "Usage: Mytest::round(arg)");
- PERL_UNUSED_VAR(cv); /* -W */
- {
- double arg = (double)SvNV(ST(0)); /* XXXXX */
- if (arg > 0.0) {
- arg = floor(arg + 0.5);
- } else if (arg < 0.0) {
- arg = ceil(arg - 0.5);
- } else {
- arg = 0.0;
- }
- sv_setnv(ST(0), (double)arg); /* XXXXX */
- SvSETMAGIC(ST(0));
- }
- XSRETURN_EMPTY;
- }
-
-Notice the two lines commented with "XXXXX". If you check the first section
-of the typemap file, you'll see that doubles are of type T_DOUBLE. In the
-INPUT section, an argument that is T_DOUBLE is assigned to the variable
-arg by calling the routine SvNV on something, then casting it to double,
-then assigned to the variable arg. Similarly, in the OUTPUT section,
-once arg has its final value, it is passed to the sv_setnv function to
-be passed back to the calling subroutine. These two functions are explained
-in L<perlguts>; we'll talk more later about what that "ST(0)" means in the
-section on the argument stack.
-
-=head2 Warning about Output Arguments
-
-In general, it's not a good idea to write extensions that modify their input
-parameters, as in Example 3. Instead, you should probably return multiple
-values in an array and let the caller handle them (we'll do this in a later
-example). However, in order to better accommodate calling pre-existing C
-routines, which often do modify their input parameters, this behavior is
-tolerated.
-
-=head2 EXAMPLE 4
-
-In this example, we'll now begin to write XSUBs that will interact with
-pre-defined C libraries. To begin with, we will build a small library of
-our own, then let h2xs write our .pm and .xs files for us.
-
-Create a new directory called Mytest2 at the same level as the directory
-Mytest. In the Mytest2 directory, create another directory called mylib,
-and cd into that directory.
-
-Here we'll create some files that will generate a test library. These will
-include a C source file and a header file. We'll also create a Makefile.PL
-in this directory. Then we'll make sure that running make at the Mytest2
-level will automatically run this Makefile.PL file and the resulting Makefile.
-
-In the mylib directory, create a file mylib.h that looks like this:
-
- #define TESTVAL 4
-
- extern double foo(int, long, const char*);
-
-Also create a file mylib.c that looks like this:
-
- #include <stdlib.h>
- #include "./mylib.h"
-
- double
- foo(int a, long b, const char *c)
- {
- return (a + b + atof(c) + TESTVAL);
- }
-
-And finally create a file Makefile.PL that looks like this:
-
- use ExtUtils::MakeMaker;
- $Verbose = 1;
- WriteMakefile(
- NAME => 'Mytest2::mylib',
- SKIP => [qw(all static static_lib dynamic dynamic_lib)],
- clean => {'FILES' => 'libmylib$(LIB_EXT)'},
- );
-
-
- sub MY::top_targets {
- '
- all :: static
-
- pure_all :: static
-
- static :: libmylib$(LIB_EXT)
-
- libmylib$(LIB_EXT): $(O_FILES)
- $(AR) cr libmylib$(LIB_EXT) $(O_FILES)
- $(RANLIB) libmylib$(LIB_EXT)
-
- ';
- }
-
-Make sure you use a tab and not spaces on the lines beginning with "$(AR)"
-and "$(RANLIB)". Make will not function properly if you use spaces.
-It has also been reported that the "cr" argument to $(AR) is unnecessary
-on Win32 systems.
-
-We will now create the main top-level Mytest2 files. Change to the directory
-above Mytest2 and run the following command:
-
- % h2xs -O -n Mytest2 ./Mytest2/mylib/mylib.h
-
-This will print out a warning about overwriting Mytest2, but that's okay.
-Our files are stored in Mytest2/mylib, and will be untouched.
-
-The normal Makefile.PL that h2xs generates doesn't know about the mylib
-directory. We need to tell it that there is a subdirectory and that we
-will be generating a library in it. Let's add the argument MYEXTLIB to
-the WriteMakefile call so that it looks like this:
-
- WriteMakefile(
- 'NAME' => 'Mytest2',
- 'VERSION_FROM' => 'Mytest2.pm', # finds $VERSION
- 'LIBS' => [''], # e.g., '-lm'
- 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
- 'INC' => '', # e.g., '-I/usr/include/other'
- 'MYEXTLIB' => 'mylib/libmylib$(LIB_EXT)',
- );
-
-and then at the end add a subroutine (which will override the pre-existing
-subroutine). Remember to use a tab character to indent the line beginning
-with "cd"!
-
- sub MY::postamble {
- '
- $(MYEXTLIB): mylib/Makefile
- cd mylib && $(MAKE) $(PASSTHRU)
- ';
- }
-
-Let's also fix the MANIFEST file so that it accurately reflects the contents
-of our extension. The single line that says "mylib" should be replaced by
-the following three lines:
-
- mylib/Makefile.PL
- mylib/mylib.c
- mylib/mylib.h
-
-To keep our namespace nice and unpolluted, edit the .pm file and change
-the variable C<@EXPORT> to C<@EXPORT_OK>. Finally, in the
-.xs file, edit the #include line to read:
-
- #include "mylib/mylib.h"
-
-And also add the following function definition to the end of the .xs file:
-
- double
- foo(a,b,c)
- int a
- long b
- const char * c
- OUTPUT:
- RETVAL
-
-Now we also need to create a typemap file because the default Perl doesn't
-currently support the const char * type. Create a file called typemap in
-the Mytest2 directory and place the following in it:
-
- const char * T_PV
-
-Now run perl on the top-level Makefile.PL. Notice that it also created a
-Makefile in the mylib directory. Run make and watch that it does cd into
-the mylib directory and run make in there as well.
-
-Now edit the Mytest2.t script and change the number of tests to "4",
-and add the following lines to the end of the script:
-
- is( &Mytest2::foo(1, 2, "Hello, world!"), 7 );
- is( &Mytest2::foo(1, 2, "0.0"), 7 );
- ok( abs(&Mytest2::foo(0, 0, "-3.4") - 0.6) <= 0.01 );
-
-(When dealing with floating-point comparisons, it is best to not check for
-equality, but rather that the difference between the expected and actual
-result is below a certain amount (called epsilon) which is 0.01 in this case)
-
-Run "C<make test>" and all should be well. There are some warnings on missing tests
-for the Mytest2::mylib extension, but you can ignore them.
-
-=head2 What has happened here?
-
-Unlike previous examples, we've now run h2xs on a real include file. This
-has caused some extra goodies to appear in both the .pm and .xs files.
-
-=over 4
-
-=item *
-
-In the .xs file, there's now a #include directive with the absolute path to
-the mylib.h header file. We changed this to a relative path so that we
-could move the extension directory if we wanted to.
-
-=item *
-
-There's now some new C code that's been added to the .xs file. The purpose
-of the C<constant> routine is to make the values that are #define'd in the
-header file accessible by the Perl script (by calling either C<TESTVAL> or
-C<&Mytest2::TESTVAL>). There's also some XS code to allow calls to the
-C<constant> routine.
-
-=item *
-
-The .pm file originally exported the name C<TESTVAL> in the C<@EXPORT> array.
-This could lead to name clashes. A good rule of thumb is that if the #define
-is only going to be used by the C routines themselves, and not by the user,
-they should be removed from the C<@EXPORT> array. Alternately, if you don't
-mind using the "fully qualified name" of a variable, you could move most
-or all of the items from the C<@EXPORT> array into the C<@EXPORT_OK> array.
-
-=item *
-
-If our include file had contained #include directives, these would not have
-been processed by h2xs. There is no good solution to this right now.
-
-=item *
-
-We've also told Perl about the library that we built in the mylib
-subdirectory. That required only the addition of the C<MYEXTLIB> variable
-to the WriteMakefile call and the replacement of the postamble subroutine
-to cd into the subdirectory and run make. The Makefile.PL for the
-library is a bit more complicated, but not excessively so. Again we
-replaced the postamble subroutine to insert our own code. This code
-simply specified that the library to be created here was a static archive
-library (as opposed to a dynamically loadable library) and provided the
-commands to build it.
-
-=back
-
-=head2 Anatomy of .xs file
-
-The .xs file of L<"EXAMPLE 4"> contained some new elements. To understand
-the meaning of these elements, pay attention to the line which reads
-
- MODULE = Mytest2 PACKAGE = Mytest2
-
-Anything before this line is plain C code which describes which headers
-to include, and defines some convenience functions. No translations are
-performed on this part, apart from having embedded POD documentation
-skipped over (see L<perlpod>) it goes into the generated output C file as is.
-
-Anything after this line is the description of XSUB functions.
-These descriptions are translated by B<xsubpp> into C code which
-implements these functions using Perl calling conventions, and which
-makes these functions visible from Perl interpreter.
-
-Pay a special attention to the function C<constant>. This name appears
-twice in the generated .xs file: once in the first part, as a static C
-function, then another time in the second part, when an XSUB interface to
-this static C function is defined.
-
-This is quite typical for .xs files: usually the .xs file provides
-an interface to an existing C function. Then this C function is defined
-somewhere (either in an external library, or in the first part of .xs file),
-and a Perl interface to this function (i.e. "Perl glue") is described in the
-second part of .xs file. The situation in L<"EXAMPLE 1">, L<"EXAMPLE 2">,
-and L<"EXAMPLE 3">, when all the work is done inside the "Perl glue", is
-somewhat of an exception rather than the rule.
-
-=head2 Getting the fat out of XSUBs
-
-In L<"EXAMPLE 4"> the second part of .xs file contained the following
-description of an XSUB:
-
- double
- foo(a,b,c)
- int a
- long b
- const char * c
- OUTPUT:
- RETVAL
-
-Note that in contrast with L<"EXAMPLE 1">, L<"EXAMPLE 2"> and L<"EXAMPLE 3">,
-this description does not contain the actual I<code> for what is done
-during a call to Perl function foo(). To understand what is going
-on here, one can add a CODE section to this XSUB:
-
- double
- foo(a,b,c)
- int a
- long b
- const char * c
- CODE:
- RETVAL = foo(a,b,c);
- OUTPUT:
- RETVAL
-
-However, these two XSUBs provide almost identical generated C code: B<xsubpp>
-compiler is smart enough to figure out the C<CODE:> section from the first
-two lines of the description of XSUB. What about C<OUTPUT:> section? In
-fact, that is absolutely the same! The C<OUTPUT:> section can be removed
-as well, I<as far as C<CODE:> section or C<PPCODE:> section> is not
-specified: B<xsubpp> can see that it needs to generate a function call
-section, and will autogenerate the OUTPUT section too. Thus one can
-shortcut the XSUB to become:
-
- double
- foo(a,b,c)
- int a
- long b
- const char * c
-
-Can we do the same with an XSUB
-
- int
- is_even(input)
- int input
- CODE:
- RETVAL = (input % 2 == 0);
- OUTPUT:
- RETVAL
-
-of L<"EXAMPLE 2">? To do this, one needs to define a C function C<int
-is_even(int input)>. As we saw in L<Anatomy of .xs file>, a proper place
-for this definition is in the first part of .xs file. In fact a C function
-
- int
- is_even(int arg)
- {
- return (arg % 2 == 0);
- }
-
-is probably overkill for this. Something as simple as a C<#define> will
-do too:
-
- #define is_even(arg) ((arg) % 2 == 0)
-
-After having this in the first part of .xs file, the "Perl glue" part becomes
-as simple as
-
- int
- is_even(input)
- int input
-
-This technique of separation of the glue part from the workhorse part has
-obvious tradeoffs: if you want to change a Perl interface, you need to
-change two places in your code. However, it removes a lot of clutter,
-and makes the workhorse part independent from idiosyncrasies of Perl calling
-convention. (In fact, there is nothing Perl-specific in the above description,
-a different version of B<xsubpp> might have translated this to TCL glue or
-Python glue as well.)
-
-=head2 More about XSUB arguments
-
-With the completion of Example 4, we now have an easy way to simulate some
-real-life libraries whose interfaces may not be the cleanest in the world.
-We shall now continue with a discussion of the arguments passed to the
-B<xsubpp> compiler.
-
-When you specify arguments to routines in the .xs file, you are really
-passing three pieces of information for each argument listed. The first
-piece is the order of that argument relative to the others (first, second,
-etc). The second is the type of argument, and consists of the type
-declaration of the argument (e.g., int, char*, etc). The third piece is
-the calling convention for the argument in the call to the library function.
-
-While Perl passes arguments to functions by reference,
-C passes arguments by value; to implement a C function which modifies data
-of one of the "arguments", the actual argument of this C function would be
-a pointer to the data. Thus two C functions with declarations
-
- int string_length(char *s);
- int upper_case_char(char *cp);
-
-may have completely different semantics: the first one may inspect an array
-of chars pointed by s, and the second one may immediately dereference C<cp>
-and manipulate C<*cp> only (using the return value as, say, a success
-indicator). From Perl one would use these functions in
-a completely different manner.
-
-One conveys this info to B<xsubpp> by replacing C<*> before the
-argument by C<&>. C<&> means that the argument should be passed to a library
-function by its address. The above two function may be XSUB-ified as
-
- int
- string_length(s)
- char * s
-
- int
- upper_case_char(cp)
- char &cp
-
-For example, consider:
-
- int
- foo(a,b)
- char &a
- char * b
-
-The first Perl argument to this function would be treated as a char and assigned
-to the variable a, and its address would be passed into the function foo.
-The second Perl argument would be treated as a string pointer and assigned to the
-variable b. The I<value> of b would be passed into the function foo. The
-actual call to the function foo that B<xsubpp> generates would look like this:
-
- foo(&a, b);
-
-B<xsubpp> will parse the following function argument lists identically:
-
- char &a
- char&a
- char & a
-
-However, to help ease understanding, it is suggested that you place a "&"
-next to the variable name and away from the variable type), and place a
-"*" near the variable type, but away from the variable name (as in the
-call to foo above). By doing so, it is easy to understand exactly what
-will be passed to the C function; it will be whatever is in the "last
-column".
-
-You should take great pains to try to pass the function the type of variable
-it wants, when possible. It will save you a lot of trouble in the long run.
-
-=head2 The Argument Stack
-
-If we look at any of the C code generated by any of the examples except
-example 1, you will notice a number of references to ST(n), where n is
-usually 0. "ST" is actually a macro that points to the n'th argument
-on the argument stack. ST(0) is thus the first argument on the stack and
-therefore the first argument passed to the XSUB, ST(1) is the second
-argument, and so on.
-
-When you list the arguments to the XSUB in the .xs file, that tells B<xsubpp>
-which argument corresponds to which of the argument stack (i.e., the first
-one listed is the first argument, and so on). You invite disaster if you
-do not list them in the same order as the function expects them.
-
-The actual values on the argument stack are pointers to the values passed
-in. When an argument is listed as being an OUTPUT value, its corresponding
-value on the stack (i.e., ST(0) if it was the first argument) is changed.
-You can verify this by looking at the C code generated for Example 3.
-The code for the round() XSUB routine contains lines that look like this:
-
- double arg = (double)SvNV(ST(0));
- /* Round the contents of the variable arg */
- sv_setnv(ST(0), (double)arg);
-
-The arg variable is initially set by taking the value from ST(0), then is
-stored back into ST(0) at the end of the routine.
-
-XSUBs are also allowed to return lists, not just scalars. This must be
-done by manipulating stack values ST(0), ST(1), etc, in a subtly
-different way. See L<perlxs> for details.
-
-XSUBs are also allowed to avoid automatic conversion of Perl function arguments
-to C function arguments. See L<perlxs> for details. Some people prefer
-manual conversion by inspecting C<ST(i)> even in the cases when automatic
-conversion will do, arguing that this makes the logic of an XSUB call clearer.
-Compare with L<"Getting the fat out of XSUBs"> for a similar tradeoff of
-a complete separation of "Perl glue" and "workhorse" parts of an XSUB.
-
-While experts may argue about these idioms, a novice to Perl guts may
-prefer a way which is as little Perl-guts-specific as possible, meaning
-automatic conversion and automatic call generation, as in
-L<"Getting the fat out of XSUBs">. This approach has the additional
-benefit of protecting the XSUB writer from future changes to the Perl API.
-
-=head2 Extending your Extension
-
-Sometimes you might want to provide some extra methods or subroutines
-to assist in making the interface between Perl and your extension simpler
-or easier to understand. These routines should live in the .pm file.
-Whether they are automatically loaded when the extension itself is loaded
-or only loaded when called depends on where in the .pm file the subroutine
-definition is placed. You can also consult L<AutoLoader> for an alternate
-way to store and load your extra subroutines.
-
-=head2 Documenting your Extension
-
-There is absolutely no excuse for not documenting your extension.
-Documentation belongs in the .pm file. This file will be fed to pod2man,
-and the embedded documentation will be converted to the manpage format,
-then placed in the blib directory. It will be copied to Perl's
-manpage directory when the extension is installed.
-
-You may intersperse documentation and Perl code within the .pm file.
-In fact, if you want to use method autoloading, you must do this,
-as the comment inside the .pm file explains.
-
-See L<perlpod> for more information about the pod format.
-
-=head2 Installing your Extension
-
-Once your extension is complete and passes all its tests, installing it
-is quite simple: you simply run "make install". You will either need
-to have write permission into the directories where Perl is installed,
-or ask your system administrator to run the make for you.
-
-Alternately, you can specify the exact directory to place the extension's
-files by placing a "PREFIX=/destination/directory" after the make install.
-(or in between the make and install if you have a brain-dead version of make).
-This can be very useful if you are building an extension that will eventually
-be distributed to multiple systems. You can then just archive the files in
-the destination directory and distribute them to your destination systems.
-
-=head2 EXAMPLE 5
-
-In this example, we'll do some more work with the argument stack. The
-previous examples have all returned only a single value. We'll now
-create an extension that returns an array.
-
-This extension is very Unix-oriented (struct statfs and the statfs system
-call). If you are not running on a Unix system, you can substitute for
-statfs any other function that returns multiple values, you can hard-code
-values to be returned to the caller (although this will be a bit harder
-to test the error case), or you can simply not do this example. If you
-change the XSUB, be sure to fix the test cases to match the changes.
-
-Return to the Mytest directory and add the following code to the end of
-Mytest.xs:
-
- void
- statfs(path)
- char * path
- INIT:
- int i;
- struct statfs buf;
-
- PPCODE:
- i = statfs(path, &buf);
- if (i == 0) {
- XPUSHs(sv_2mortal(newSVnv(buf.f_bavail)));
- XPUSHs(sv_2mortal(newSVnv(buf.f_bfree)));
- XPUSHs(sv_2mortal(newSVnv(buf.f_blocks)));
- XPUSHs(sv_2mortal(newSVnv(buf.f_bsize)));
- XPUSHs(sv_2mortal(newSVnv(buf.f_ffree)));
- XPUSHs(sv_2mortal(newSVnv(buf.f_files)));
- XPUSHs(sv_2mortal(newSVnv(buf.f_type)));
- } else {
- XPUSHs(sv_2mortal(newSVnv(errno)));
- }
-
-You'll also need to add the following code to the top of the .xs file, just
-after the include of "XSUB.h":
-
- #include <sys/vfs.h>
-
-Also add the following code segment to Mytest.t while incrementing the "9"
-tests to "11":
-
- @a = &Mytest::statfs("/blech");
- ok( scalar(@a) == 1 && $a[0] == 2 );
- @a = &Mytest::statfs("/");
- is( scalar(@a), 7 );
-
-=head2 New Things in this Example
-
-This example added quite a few new concepts. We'll take them one at a time.
-
-=over 4
-
-=item *
-
-The INIT: directive contains code that will be placed immediately after
-the argument stack is decoded. C does not allow variable declarations at
-arbitrary locations inside a function,
-so this is usually the best way to declare local variables needed by the XSUB.
-(Alternatively, one could put the whole C<PPCODE:> section into braces, and
-put these declarations on top.)
-
-=item *
-
-This routine also returns a different number of arguments depending on the
-success or failure of the call to statfs. If there is an error, the error
-number is returned as a single-element array. If the call is successful,
-then a 7-element array is returned. Since only one argument is passed into
-this function, we need room on the stack to hold the 7 values which may be
-returned.
-
-We do this by using the PPCODE: directive, rather than the CODE: directive.
-This tells B<xsubpp> that we will be managing the return values that will be
-put on the argument stack by ourselves.
-
-=item *
-
-When we want to place values to be returned to the caller onto the stack,
-we use the series of macros that begin with "XPUSH". There are five
-different versions, for placing integers, unsigned integers, doubles,
-strings, and Perl scalars on the stack. In our example, we placed a
-Perl scalar onto the stack. (In fact this is the only macro which
-can be used to return multiple values.)
-
-The XPUSH* macros will automatically extend the return stack to prevent
-it from being overrun. You push values onto the stack in the order you
-want them seen by the calling program.
-
-=item *
-
-The values pushed onto the return stack of the XSUB are actually mortal SV's.
-They are made mortal so that once the values are copied by the calling
-program, the SV's that held the returned values can be deallocated.
-If they were not mortal, then they would continue to exist after the XSUB
-routine returned, but would not be accessible. This is a memory leak.
-
-=item *
-
-If we were interested in performance, not in code compactness, in the success
-branch we would not use C<XPUSHs> macros, but C<PUSHs> macros, and would
-pre-extend the stack before pushing the return values:
-
- EXTEND(SP, 7);
-
-The tradeoff is that one needs to calculate the number of return values
-in advance (though overextending the stack will not typically hurt
-anything but memory consumption).
-
-Similarly, in the failure branch we could use C<PUSHs> I<without> extending
-the stack: the Perl function reference comes to an XSUB on the stack, thus
-the stack is I<always> large enough to take one return value.
-
-=back
-
-=head2 EXAMPLE 6
-
-In this example, we will accept a reference to an array as an input
-parameter, and return a reference to an array of hashes. This will
-demonstrate manipulation of complex Perl data types from an XSUB.
-
-This extension is somewhat contrived. It is based on the code in
-the previous example. It calls the statfs function multiple times,
-accepting a reference to an array of filenames as input, and returning
-a reference to an array of hashes containing the data for each of the
-filesystems.
-
-Return to the Mytest directory and add the following code to the end of
-Mytest.xs:
-
- SV *
- multi_statfs(paths)
- SV * paths
- INIT:
- AV * results;
- I32 numpaths = 0;
- int i, n;
- struct statfs buf;
-
- if ((!SvROK(paths))
- || (SvTYPE(SvRV(paths)) != SVt_PVAV)
- || ((numpaths = av_len((AV *)SvRV(paths))) < 0))
- {
- XSRETURN_UNDEF;
- }
- results = (AV *)sv_2mortal((SV *)newAV());
- CODE:
- for (n = 0; n <= numpaths; n++) {
- HV * rh;
- STRLEN l;
- char * fn = SvPV(*av_fetch((AV *)SvRV(paths), n, 0), l);
-
- i = statfs(fn, &buf);
- if (i != 0) {
- av_push(results, newSVnv(errno));
- continue;
- }
-
- rh = (HV *)sv_2mortal((SV *)newHV());
-
- hv_store(rh, "f_bavail", 8, newSVnv(buf.f_bavail), 0);
- hv_store(rh, "f_bfree", 7, newSVnv(buf.f_bfree), 0);
- hv_store(rh, "f_blocks", 8, newSVnv(buf.f_blocks), 0);
- hv_store(rh, "f_bsize", 7, newSVnv(buf.f_bsize), 0);
- hv_store(rh, "f_ffree", 7, newSVnv(buf.f_ffree), 0);
- hv_store(rh, "f_files", 7, newSVnv(buf.f_files), 0);
- hv_store(rh, "f_type", 6, newSVnv(buf.f_type), 0);
-
- av_push(results, newRV((SV *)rh));
- }
- RETVAL = newRV((SV *)results);
- OUTPUT:
- RETVAL
-
-And add the following code to Mytest.t, while incrementing the "11"
-tests to "13":
-
- $results = Mytest::multi_statfs([ '/', '/blech' ]);
- ok( ref $results->[0] );
- ok( ! ref $results->[1] );
-
-=head2 New Things in this Example
-
-There are a number of new concepts introduced here, described below:
-
-=over 4
-
-=item *
-
-This function does not use a typemap. Instead, we declare it as accepting
-one SV* (scalar) parameter, and returning an SV* value, and we take care of
-populating these scalars within the code. Because we are only returning
-one value, we don't need a C<PPCODE:> directive - instead, we use C<CODE:>
-and C<OUTPUT:> directives.
-
-=item *
-
-When dealing with references, it is important to handle them with caution.
-The C<INIT:> block first checks that
-C<SvROK> returns true, which indicates that paths is a valid reference. It
-then verifies that the object referenced by paths is an array, using C<SvRV>
-to dereference paths, and C<SvTYPE> to discover its type. As an added test,
-it checks that the array referenced by paths is non-empty, using the C<av_len>
-function (which returns -1 if the array is empty). The XSRETURN_UNDEF macro
-is used to abort the XSUB and return the undefined value whenever all three of
-these conditions are not met.
-
-=item *
-
-We manipulate several arrays in this XSUB. Note that an array is represented
-internally by an AV* pointer. The functions and macros for manipulating
-arrays are similar to the functions in Perl: C<av_len> returns the highest
-index in an AV*, much like $#array; C<av_fetch> fetches a single scalar value
-from an array, given its index; C<av_push> pushes a scalar value onto the
-end of the array, automatically extending the array as necessary.
-
-Specifically, we read pathnames one at a time from the input array, and
-store the results in an output array (results) in the same order. If
-statfs fails, the element pushed onto the return array is the value of
-errno after the failure. If statfs succeeds, though, the value pushed
-onto the return array is a reference to a hash containing some of the
-information in the statfs structure.
-
-As with the return stack, it would be possible (and a small performance win)
-to pre-extend the return array before pushing data into it, since we know
-how many elements we will return:
-
- av_extend(results, numpaths);
-
-=item *
-
-We are performing only one hash operation in this function, which is storing
-a new scalar under a key using C<hv_store>. A hash is represented by an HV*
-pointer. Like arrays, the functions for manipulating hashes from an XSUB
-mirror the functionality available from Perl. See L<perlguts> and L<perlapi>
-for details.
-
-=item *
-
-To create a reference, we use the C<newRV> function. Note that you can
-cast an AV* or an HV* to type SV* in this case (and many others). This
-allows you to take references to arrays, hashes and scalars with the same
-function. Conversely, the C<SvRV> function always returns an SV*, which may
-need to be cast to the appropriate type if it is something other than a
-scalar (check with C<SvTYPE>).
-
-=item *
-
-At this point, xsubpp is doing very little work - the differences between
-Mytest.xs and Mytest.c are minimal.
-
-=back
-
-=head2 EXAMPLE 7 (Coming Soon)
-
-XPUSH args AND set RETVAL AND assign return value to array
-
-=head2 EXAMPLE 8 (Coming Soon)
-
-Setting $!
-
-=head2 EXAMPLE 9 Passing open files to XSes
-
-You would think passing files to an XS is difficult, with all the
-typeglobs and stuff. Well, it isn't.
-
-Suppose that for some strange reason we need a wrapper around the
-standard C library function C<fputs()>. This is all we need:
-
- #define PERLIO_NOT_STDIO 0
- #include "EXTERN.h"
- #include "perl.h"
- #include "XSUB.h"
-
- #include <stdio.h>
-
- int
- fputs(s, stream)
- char * s
- FILE * stream
-
-The real work is done in the standard typemap.
-
-B<But> you loose all the fine stuff done by the perlio layers. This
-calls the stdio function C<fputs()>, which knows nothing about them.
-
-The standard typemap offers three variants of PerlIO *:
-C<InputStream> (T_IN), C<InOutStream> (T_INOUT) and C<OutputStream>
-(T_OUT). A bare C<PerlIO *> is considered a T_INOUT. If it matters
-in your code (see below for why it might) #define or typedef
-one of the specific names and use that as the argument or result
-type in your XS file.
-
-The standard typemap does not contain PerlIO * before perl 5.7,
-but it has the three stream variants. Using a PerlIO * directly
-is not backwards compatible unless you provide your own typemap.
-
-For streams coming I<from> perl the main difference is that
-C<OutputStream> will get the output PerlIO * - which may make
-a difference on a socket. Like in our example...
-
-For streams being handed I<to> perl a new file handle is created
-(i.e. a reference to a new glob) and associated with the PerlIO *
-provided. If the read/write state of the PerlIO * is not correct then you
-may get errors or warnings from when the file handle is used.
-So if you opened the PerlIO * as "w" it should really be an
-C<OutputStream> if open as "r" it should be an C<InputStream>.
-
-Now, suppose you want to use perlio layers in your XS. We'll use the
-perlio C<PerlIO_puts()> function as an example.
-
-In the C part of the XS file (above the first MODULE line) you
-have
-
- #define OutputStream PerlIO *
- or
- typedef PerlIO * OutputStream;
-
-
-And this is the XS code:
-
- int
- perlioputs(s, stream)
- char * s
- OutputStream stream
- CODE:
- RETVAL = PerlIO_puts(stream, s);
- OUTPUT:
- RETVAL
-
-We have to use a C<CODE> section because C<PerlIO_puts()> has the arguments
-reversed compared to C<fputs()>, and we want to keep the arguments the same.
-
-Wanting to explore this thoroughly, we want to use the stdio C<fputs()>
-on a PerlIO *. This means we have to ask the perlio system for a stdio
-C<FILE *>:
-
- int
- perliofputs(s, stream)
- char * s
- OutputStream stream
- PREINIT:
- FILE *fp = PerlIO_findFILE(stream);
- CODE:
- if (fp != (FILE*) 0) {
- RETVAL = fputs(s, fp);
- } else {
- RETVAL = -1;
- }
- OUTPUT:
- RETVAL
-
-Note: C<PerlIO_findFILE()> will search the layers for a stdio
-layer. If it can't find one, it will call C<PerlIO_exportFILE()> to
-generate a new stdio C<FILE>. Please only call C<PerlIO_exportFILE()> if
-you want a I<new> C<FILE>. It will generate one on each call and push a
-new stdio layer. So don't call it repeatedly on the same
-file. C<PerlIO_findFILE()> will retrieve the stdio layer once it has been
-generated by C<PerlIO_exportFILE()>.
-
-This applies to the perlio system only. For versions before 5.7,
-C<PerlIO_exportFILE()> is equivalent to C<PerlIO_findFILE()>.
-
-=head2 Troubleshooting these Examples
-
-As mentioned at the top of this document, if you are having problems with
-these example extensions, you might see if any of these help you.
-
-=over 4
-
-=item *
-
-In versions of 5.002 prior to the gamma version, the test script in Example
-1 will not function properly. You need to change the "use lib" line to
-read:
-
- use lib './blib';
-
-=item *
-
-In versions of 5.002 prior to version 5.002b1h, the test.pl file was not
-automatically created by h2xs. This means that you cannot say "make test"
-to run the test script. You will need to add the following line before the
-"use extension" statement:
-
- use lib './blib';
-
-=item *
-
-In versions 5.000 and 5.001, instead of using the above line, you will need
-to use the following line:
-
- BEGIN { unshift(@INC, "./blib") }
-
-=item *
-
-This document assumes that the executable named "perl" is Perl version 5.
-Some systems may have installed Perl version 5 as "perl5".
-
-=back
-
-=head1 See also
-
-For more information, consult L<perlguts>, L<perlapi>, L<perlxs>, L<perlmod>,
-and L<perlpod>.
-
-=head1 Author
-
-Jeff Okamoto <F<okamoto at corp.hp.com>>
-
-Reviewed and assisted by Dean Roehrich, Ilya Zakharevich, Andreas Koenig,
-and Tim Bunce.
-
-PerlIO material contributed by Lupe Christoph, with some clarification
-by Nick Ing-Simmons.
-
-Changes for h2xs as of Perl 5.8.x by Renee Baecker
-
-=head2 Last Changed
-
-2007/10/11
Deleted: vendor/perl/dist/pod/pod2html.PL
===================================================================
--- vendor/perl/dist/pod/pod2html.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/pod2html.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,183 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
-chdir dirname($0);
-$file = basename($0, '.PL');
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{startperl}
- eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
-!GROK!THIS!
-
-# In the following, perl variables are not expanded during extraction.
-
-print OUT <<'!NO!SUBS!';
-=pod
-
-=head1 NAME
-
-pod2html - convert .pod files to .html files
-
-=head1 SYNOPSIS
-
- pod2html --help --htmlroot=<name> --infile=<name> --outfile=<name>
- --podpath=<name>:...:<name> --podroot=<name>
- --libpods=<name>:...:<name> --recurse --norecurse --verbose
- --index --noindex --title=<name>
-
-=head1 DESCRIPTION
-
-Converts files from pod format (see L<perlpod>) to HTML format.
-
-=head1 ARGUMENTS
-
-pod2html takes the following arguments:
-
-=over 4
-
-=item help
-
- --help
-
-Displays the usage message.
-
-=item htmlroot
-
- --htmlroot=name
-
-Sets the base URL for the HTML files. When cross-references are made,
-the HTML root is prepended to the URL.
-
-=item infile
-
- --infile=name
-
-Specify the pod file to convert. Input is taken from STDIN if no
-infile is specified.
-
-=item outfile
-
- --outfile=name
-
-Specify the HTML file to create. Output goes to STDOUT if no outfile
-is specified.
-
-=item podroot
-
- --podroot=name
-
-Specify the base directory for finding library pods.
-
-=item podpath
-
- --podpath=name:...:name
-
-Specify which subdirectories of the podroot contain pod files whose
-HTML converted forms can be linked-to in cross-references.
-
-=item libpods
-
- --libpods=name:...:name
-
-List of page names (eg, "perlfunc") which contain linkable C<=item>s.
-
-=item netscape
-
- --netscape
-
-Use Netscape HTML directives when applicable.
-
-=item nonetscape
-
- --nonetscape
-
-Do not use Netscape HTML directives (default).
-
-=item index
-
- --index
-
-Generate an index at the top of the HTML file (default behaviour).
-
-=item noindex
-
- --noindex
-
-Do not generate an index at the top of the HTML file.
-
-
-=item recurse
-
- --recurse
-
-Recurse into subdirectories specified in podpath (default behaviour).
-
-=item norecurse
-
- --norecurse
-
-Do not recurse into subdirectories specified in podpath.
-
-=item title
-
- --title=title
-
-Specify the title of the resulting HTML file.
-
-=item verbose
-
- --verbose
-
-Display progress messages.
-
-=back
-
-=head1 AUTHOR
-
-Tom Christiansen, E<lt>tchrist at perl.comE<gt>.
-
-=head1 BUGS
-
-See L<Pod::Html> for a list of known bugs in the translator.
-
-=head1 SEE ALSO
-
-L<perlpod>, L<Pod::Html>
-
-=head1 COPYRIGHT
-
-This program is distributed under the Artistic License.
-
-=cut
-
-use Pod::Html;
-
-pod2html @ARGV;
-!NO!SUBS!
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
Deleted: vendor/perl/dist/pod/pod2latex.PL
===================================================================
--- vendor/perl/dist/pod/pod2latex.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/pod2latex.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,421 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
-chdir dirname($0);
-$file = basename($0, '.PL');
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{startperl}
- eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
-!GROK!THIS!
-
-# In the following, perl variables are not expanded during extraction.
-
-print OUT <<'!NO!SUBS!';
-
-# pod2latex conversion program
-
-use strict;
-use Pod::LaTeX;
-use Pod::Find qw/ pod_find /;
-use Pod::Usage;
-use Getopt::Long;
-use File::Basename;
-use Symbol;
-
-my $VERSION = "1.01";
-
-# return the entire contents of a text file
-# whose name is given as argument
-sub _get {
- my $fn = shift;
- my $infh = gensym;
- open $infh, $fn
- or die "Could not open file $fn: $!\n";
- local $/;
- return <$infh>;
-}
-
-# Read command line arguments
-
-my %options = (
- "help" => 0,
- "man" => 0,
- "sections" => [],
- "full" => 0,
- "out" => undef,
- "verbose" => 0,
- "modify" => 0,
- "h1level" => 1, # section is equivalent to H1
- "preamble" => [],
- "postamble" => [],
- );
-# "prefile" is just like "preamble", but the argument
-# comes from the file named by the argument
-$options{"prefile"} = sub { shift; push @{$options{"preamble"}}, _get(shift) };
-# the same between "postfile" and "postamble"
-$options{"postfile"} = sub { shift; push @{$options{"postamble"}}, _get(shift) };
-
-GetOptions(\%options,
- "help",
- "man",
- "verbose",
- "full",
- "sections=s@",
- "out=s",
- "modify",
- "h1level=i",
- "preamble=s@",
- "postamble=s@",
- "prefile=s",
- "postfile=s"
- ) || pod2usage(2);
-
-pod2usage(1) if ($options{help});
-pod2usage(-verbose => 2) if ($options{man});
-
-
-# Read all the files from the command line
-my @files = @ARGV;
-
-# Now find which ones are real pods and convert
-# directories to their contents.
-
-# Extract the pods from each arg since some of them might
-# be directories
-# This is not as efficient as using pod_find to search through
-# everything at once but it allows us to preserve the order
-# supplied by the user
-
-my @pods;
-foreach my $arg (@files) {
- my %pods = pod_find($arg);
- push(@pods, sort keys %pods);
-}
-
-# Abort if nothing to do
-if ($#pods == -1) {
- warn "None of the supplied Pod files actually exist\n";
- exit;
-}
-
-# Only want to override the preamble and postamble if we have
-# been given values.
-my %User;
-$User{UserPreamble} = join("\n", @{$options{'preamble'}})
- if ($options{preamble} && @{$options{preamble}});
-$User{UserPostamble} = join("\n", @{$options{'postamble'}})
- if ($options{postamble} && @{$options{postamble}});
-
-
-
-# If $options{'out'} is set we are processing to a single output file
-my $multi_documents;
-if (exists $options{'out'} && defined $options{'out'}) {
- $multi_documents = 0;
-} else {
- $multi_documents = 1;
-}
-
-# If the output file is not specified it is assumed that
-# a single output file is required per input file using
-# a .tex extension rather than any exisiting extension
-
-if ($multi_documents) {
-
- # Case where we just generate one input per output
-
- foreach my $pod (@pods) {
-
- if (-f $pod) {
-
- my $output = $pod;
- $output = basename($output, '.pm', '.pod','.pl') . '.tex';
-
- # Create a new parser object
- my $parser = new Pod::LaTeX(
- AddPreamble => $options{'full'},
- AddPostamble => $options{'full'},
- MakeIndex => $options{'full'},
- TableOfContents => $options{'full'},
- ReplaceNAMEwithSection => $options{'modify'},
- UniqueLabels => $options{'modify'},
- Head1Level => $options{'h1level'},
- LevelNoNum => $options{'h1level'} + 1,
- %User,
- );
-
- # Select sections if supplied
- $parser->select(@{ $options{'sections'}})
- if @{$options{'sections'}};
-
- # Derive the input file from the output file
- $parser->parse_from_file($pod, $output);
-
- print "Written output to $output\n" if $options{'verbose'};
-
- } else {
- warn "File $pod not found\n";
- }
-
- }
-} else {
-
- # Case where we want everything to be in a single document
-
- # Need to open the output file ourselves
- my $output = $options{'out'};
- $output .= '.tex' unless $output =~ /\.tex$/;
-
- # Use auto-vivified file handle in perl 5.6
- my $outfh = gensym;
- open ($outfh, ">$output") || die "Could not open output file: $!\n";
-
- # Flag to indicate whether we have converted at least one file
- # indicates how many files have been converted
- my $converted = 0;
-
- # Loop over the input files
- foreach my $pod (@pods) {
-
- if (-f $pod) {
-
- warn "Converting $pod\n" if $options{'verbose'};
-
- # Open the file (need the handle)
- # Use auto-vivified handle in perl 5.6
- my $podfh = gensym;
- open ($podfh, "<$pod") || die "Could not open pod file $pod: $!\n";
-
- # if this is the first file to be converted we may want to add
- # a preamble (controlled by command line option)
- my $preamble = 0;
- $preamble = 1 if ($converted == 0 && $options{'full'});
-
- # if this is the last file to be converted may want to add
- # a postamble (controlled by command line option)
- # relies on a previous pass to check existence of all pods we
- # are converting.
- my $postamble = ( ($converted == $#pods && $options{'full'}) ? 1 : 0 );
-
- # Open parser object
- # May want to start with a preamble for the first one and
- # end with an index for the last
- my $parser = new Pod::LaTeX(
- MakeIndex => $options{'full'},
- TableOfContents => $preamble,
- ReplaceNAMEwithSection => $options{'modify'},
- UniqueLabels => $options{'modify'},
- StartWithNewPage => $options{'full'},
- AddPreamble => $preamble,
- AddPostamble => $postamble,
- Head1Level => $options{'h1level'},
- LevelNoNum => $options{'h1level'} + 1,
- %User
- );
-
- # Store the file name for error messages
- # This is a kluge that breaks the data hiding of the object
- $parser->{_INFILE} = $pod;
-
- # Select sections if supplied
- $parser->select(@{ $options{'sections'}})
- if @{$options{'sections'}};
-
- # Parse it
- $parser->parse_from_filehandle($podfh, $outfh);
-
- # We have converted at least one file
- $converted++;
-
- } else {
- warn "File $pod not found\n";
- }
-
- }
-
- # Should unlink the file if we didn't convert anything!
- # dont check for return status of unlink
- # since there is not a lot to be done if the unlink failed
- # and the program does not rely upon it.
- unlink "$output" unless $converted;
-
- # If verbose
- warn "Converted $converted files\n" if $options{'verbose'};
-
-}
-
-exit;
-
-__END__
-
-=head1 NAME
-
-pod2latex - convert pod documentation to latex format
-
-=head1 SYNOPSIS
-
- pod2latex *.pm
-
- pod2latex -out mytex.tex *.pod
-
- pod2latex -full -sections 'DESCRIPTION|NAME' SomeDir
-
- pod2latex -prefile h.tex -postfile t.tex my.pod
-
-=head1 DESCRIPTION
-
-C<pod2latex> is a program to convert POD format documentation
-(L<perlpod>) into latex. It can process multiple input documents at a
-time and either generate a latex file per input document or a single
-combined output file.
-
-=head1 OPTIONS AND ARGUMENTS
-
-This section describes the supported command line options. Minimum
-matching is supported.
-
-=over 4
-
-=item B<-out>
-
-Name of the output file to be used. If there are multiple input pods
-it is assumed that the intention is to write all translated output
-into a single file. C<.tex> is appended if not present. If the
-argument is not supplied, a single document will be created for each
-input file.
-
-=item B<-full>
-
-Creates a complete C<latex> file that can be processed immediately
-(unless C<=for/=begin> directives are used that rely on extra packages).
-Table of contents and index generation commands are included in the
-wrapper C<latex> code.
-
-=item B<-sections>
-
-Specify pod sections to include (or remove if negated) in the
-translation. See L<Pod::Select/"SECTION SPECIFICATIONS"> for the
-format to use for I<section-spec>. This option may be given multiple
-times on the command line.This is identical to the similar option in
-the C<podselect()> command.
-
-=item B<-modify>
-
-This option causes the output C<latex> to be slightly
-modified from the input pod such that when a C<=head1 NAME>
-is encountered a section is created containing the actual
-pod name (rather than B<NAME>) and all subsequent C<=head1>
-directives are treated as subsections. This has the advantage
-that the description of a module will be in its own section
-which is helpful for including module descriptions in documentation.
-Also forces C<latex> label and index entries to be prefixed by the
-name of the module.
-
-=item B<-h1level>
-
-Specifies the C<latex> section that is equivalent to a C<H1> pod
-directive. This is an integer between 0 and 5 with 0 equivalent to a
-C<latex> chapter, 1 equivalent to a C<latex> section etc. The default
-is 1 (C<H1> equivalent to a latex section).
-
-=item B<-help>
-
-Print a brief help message and exit.
-
-=item B<-man>
-
-Print the manual page and exit.
-
-=item B<-verbose>
-
-Print information messages as each document is processed.
-
-=item B<-preamble>
-
-A user-supplied preamble for the LaTeX code. Multiple values
-are supported and appended in order separated by "\n".
-See B<-prefile> for reading the preamble from a file.
-
-=item B<-postamble>
-
-A user supplied postamble for the LaTeX code. Multiple values
-are supported and appended in order separated by "\n".
-See B<-postfile> for reading the postamble from a file.
-
-=item B<-prefile>
-
-A user-supplied preamble for the LaTeX code to be read from the
-named file. Multiple values are supported and appended in
-order. See B<-preamble>.
-
-=item B<-postfile>
-
-A user-supplied postamble for the LaTeX code to be read from the
-named file. Multiple values are supported and appended in
-order. See B<-postamble>.
-
-=back
-
-=head1 BUGS
-
-Known bugs are:
-
-=over 4
-
-=item *
-
-Cross references between documents are not resolved when multiple
-pod documents are converted into a single output C<latex> file.
-
-=item *
-
-Functions and variables are not automatically recognized
-and they will therefore not be marked up in any special way
-unless instructed by an explicit pod command.
-
-=back
-
-=head1 SEE ALSO
-
-L<Pod::LaTeX>
-
-=head1 AUTHOR
-
-Tim Jenness E<lt>tjenness at cpan.orgE<gt>
-
-This program is free software; you can redistribute it
-and/or modify it under the same terms as Perl itself.
-
-Copyright (C) 2000, 2003, 2004 Tim Jenness. All Rights Reserved.
-
-=cut
-
-!NO!SUBS!
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
Deleted: vendor/perl/dist/pod/pod2man.PL
===================================================================
--- vendor/perl/dist/pod/pod2man.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/pod2man.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,588 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
-chdir dirname($0);
-$file = basename($0, '.PL');
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{startperl}
- eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
-!GROK!THIS!
-
-# In the following, perl variables are not expanded during extraction.
-
-print OUT <<'!NO!SUBS!';
-
-# pod2man -- Convert POD data to formatted *roff input.
-#
-# Copyright 1999, 2000, 2001, 2004, 2006, 2008 Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-
-require 5.004;
-
-use Getopt::Long qw(GetOptions);
-use Pod::Man ();
-use Pod::Usage qw(pod2usage);
-
-use strict;
-
-# Silence -w warnings.
-use vars qw($running_under_some_shell);
-
-# Insert -- into @ARGV before any single dash argument to hide it from
-# Getopt::Long; we want to interpret it as meaning stdin.
-my $stdin;
- at ARGV = map { $_ eq '-' && !$stdin++ ? ('--', $_) : $_ } @ARGV;
-
-# Parse our options, trying to retain backward compatibility with pod2man but
-# allowing short forms as well. --lax is currently ignored.
-my %options;
-$options{errors} = 'pod';
-Getopt::Long::config ('bundling_override');
-GetOptions (\%options, 'center|c=s', 'date|d=s', 'fixed=s', 'fixedbold=s',
- 'fixeditalic=s', 'fixedbolditalic=s', 'help|h', 'lax|l',
- 'name|n=s', 'official|o', 'quotes|q=s', 'release|r:s',
- 'section|s=s', 'stderr', 'verbose|v', 'utf8|u') or exit 1;
-pod2usage (0) if $options{help};
-
-# Official sets --center, but don't override things explicitly set.
-if ($options{official} && !defined $options{center}) {
- $options{center} = 'Perl Programmers Reference Guide';
-}
-
-# Verbose is only our flag, not a Pod::Man flag.
-my $verbose = $options{verbose};
-delete $options{verbose};
-
-# This isn't a valid Pod::Man option and is only accepted for backward
-# compatibility.
-delete $options{lax};
-
-# Initialize and run the formatter, pulling a pair of input and output off at
-# a time.
-my $parser = Pod::Man->new (%options);
-my @files;
-do {
- @files = splice (@ARGV, 0, 2);
- print " $files[1]\n" if $verbose;
- $parser->parse_from_file (@files);
-} while (@ARGV);
-
-__END__
-
-=head1 NAME
-
-pod2man - Convert POD data to formatted *roff input
-
-=for stopwords
-en em --stderr stderr --utf8 UTF-8 overdo markup MT-LEVEL Allbery Solaris
-URL troff troff-specific formatters uppercased Christiansen
-
-=head1 SYNOPSIS
-
-pod2man [B<--center>=I<string>] [B<--date>=I<string>]
- [B<--fixed>=I<font>] [B<--fixedbold>=I<font>] [B<--fixeditalic>=I<font>]
- [B<--fixedbolditalic>=I<font>] [B<--name>=I<name>] [B<--official>]
- [B<--quotes>=I<quotes>] [B<--release>[=I<version>]]
- [B<--section>=I<manext>] [B<--stderr>] [B<--utf8>] [B<--verbose>]
- [I<input> [I<output>] ...]
-
-pod2man B<--help>
-
-=head1 DESCRIPTION
-
-B<pod2man> is a front-end for Pod::Man, using it to generate *roff input
-from POD source. The resulting *roff code is suitable for display on a
-terminal using nroff(1), normally via man(1), or printing using troff(1).
-
-I<input> is the file to read for POD source (the POD can be embedded in
-code). If I<input> isn't given, it defaults to C<STDIN>. I<output>, if
-given, is the file to which to write the formatted output. If I<output>
-isn't given, the formatted output is written to C<STDOUT>. Several POD
-files can be processed in the same B<pod2man> invocation (saving module
-load and compile times) by providing multiple pairs of I<input> and
-I<output> files on the command line.
-
-B<--section>, B<--release>, B<--center>, B<--date>, and B<--official> can
-be used to set the headers and footers to use; if not given, Pod::Man will
-assume various defaults. See below or L<Pod::Man> for details.
-
-B<pod2man> assumes that your *roff formatters have a fixed-width font
-named C<CW>. If yours is called something else (like C<CR>), use
-B<--fixed> to specify it. This generally only matters for troff output
-for printing. Similarly, you can set the fonts used for bold, italic, and
-bold italic fixed-width output.
-
-Besides the obvious pod conversions, Pod::Man, and therefore pod2man also
-takes care of formatting func(), func(n), and simple variable references
-like $foo or @bar so you don't have to use code escapes for them; complex
-expressions like C<$fred{'stuff'}> will still need to be escaped, though.
-It also translates dashes that aren't used as hyphens into en dashes, makes
-long dashes--like this--into proper em dashes, fixes "paired quotes," and
-takes care of several other troff-specific tweaks. See L<Pod::Man> for
-complete information.
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-c> I<string>, B<--center>=I<string>
-
-Sets the centered page header to I<string>. The default is "User
-Contributed Perl Documentation", but also see B<--official> below.
-
-=item B<-d> I<string>, B<--date>=I<string>
-
-Set the left-hand footer string to this value. By default, the modification
-date of the input file will be used, or the current date if input comes from
-C<STDIN>.
-
-=item B<--fixed>=I<font>
-
-The fixed-width font to use for verbatim text and code. Defaults to
-C<CW>. Some systems may want C<CR> instead. Only matters for troff(1)
-output.
-
-=item B<--fixedbold>=I<font>
-
-Bold version of the fixed-width font. Defaults to C<CB>. Only matters
-for troff(1) output.
-
-=item B<--fixeditalic>=I<font>
-
-Italic version of the fixed-width font (actually, something of a misnomer,
-since most fixed-width fonts only have an oblique version, not an italic
-version). Defaults to C<CI>. Only matters for troff(1) output.
-
-=item B<--fixedbolditalic>=I<font>
-
-Bold italic (probably actually oblique) version of the fixed-width font.
-Pod::Man doesn't assume you have this, and defaults to C<CB>. Some
-systems (such as Solaris) have this font available as C<CX>. Only matters
-for troff(1) output.
-
-=item B<-h>, B<--help>
-
-Print out usage information.
-
-=item B<-l>, B<--lax>
-
-No longer used. B<pod2man> used to check its input for validity as a
-manual page, but this should now be done by L<podchecker(1)> instead.
-Accepted for backward compatibility; this option no longer does anything.
-
-=item B<-n> I<name>, B<--name>=I<name>
-
-Set the name of the manual page to I<name>. Without this option, the manual
-name is set to the uppercased base name of the file being converted unless
-the manual section is 3, in which case the path is parsed to see if it is a
-Perl module path. If it is, a path like C<.../lib/Pod/Man.pm> is converted
-into a name like C<Pod::Man>. This option, if given, overrides any
-automatic determination of the name.
-
-Note that this option is probably not useful when converting multiple POD
-files at once. The convention for Unix man pages for commands is for the
-man page title to be in all-uppercase even if the command isn't.
-
-=item B<-o>, B<--official>
-
-Set the default header to indicate that this page is part of the standard
-Perl release, if B<--center> is not also given.
-
-=item B<-q> I<quotes>, B<--quotes>=I<quotes>
-
-Sets the quote marks used to surround CE<lt>> text to I<quotes>. If
-I<quotes> is a single character, it is used as both the left and right
-quote; if I<quotes> is two characters, the first character is used as the
-left quote and the second as the right quoted; and if I<quotes> is four
-characters, the first two are used as the left quote and the second two as
-the right quote.
-
-I<quotes> may also be set to the special value C<none>, in which case no
-quote marks are added around CE<lt>> text (but the font is still changed for
-troff output).
-
-=item B<-r>, B<--release>
-
-Set the centered footer. By default, this is the version of Perl you run
-B<pod2man> under. Note that some system an macro sets assume that the
-centered footer will be a modification date and will prepend something like
-"Last modified: "; if this is the case, you may want to set B<--release> to
-the last modified date and B<--date> to the version number.
-
-=item B<-s>, B<--section>
-
-Set the section for the C<.TH> macro. The standard section numbering
-convention is to use 1 for user commands, 2 for system calls, 3 for
-functions, 4 for devices, 5 for file formats, 6 for games, 7 for
-miscellaneous information, and 8 for administrator commands. There is a lot
-of variation here, however; some systems (like Solaris) use 4 for file
-formats, 5 for miscellaneous information, and 7 for devices. Still others
-use 1m instead of 8, or some mix of both. About the only section numbers
-that are reliably consistent are 1, 2, and 3.
-
-By default, section 1 will be used unless the file ends in C<.pm>, in
-which case section 3 will be selected.
-
-=item B<--stderr>
-
-By default, B<pod2man> puts any errors detected in the POD input in a POD
-ERRORS section in the output manual page. If B<--stderr> is given, errors
-are sent to standard error instead and the POD ERRORS section is
-suppressed.
-
-=item B<-u>, B<--utf8>
-
-By default, B<pod2man> produces the most conservative possible *roff
-output to try to ensure that it will work with as many different *roff
-implementations as possible. Many *roff implementations cannot handle
-non-ASCII characters, so this means all non-ASCII characters are converted
-either to a *roff escape sequence that tries to create a properly accented
-character (at least for troff output) or to C<X>.
-
-This option says to instead output literal UTF-8 characters. If your
-*roff implementation can handle it, this is the best output format to use
-and avoids corruption of documents containing non-ASCII characters.
-However, be warned that *roff source with literal UTF-8 characters is not
-supported by many implementations and may even result in segfaults and
-other bad behavior.
-
-Be aware that, when using this option, the input encoding of your POD
-source must be properly declared unless it is US-ASCII or Latin-1. POD
-input without an C<=encoding> command will be assumed to be in Latin-1,
-and if it's actually in UTF-8, the output will be double-encoded. See
-L<perlpod(1)> for more information on the C<=encoding> command.
-
-=item B<-v>, B<--verbose>
-
-Print out the name of each output file as it is being generated.
-
-=back
-
-=head1 DIAGNOSTICS
-
-If B<pod2man> fails with errors, see L<Pod::Man> and L<Pod::Simple> for
-information about what those errors might mean.
-
-=head1 EXAMPLES
-
- pod2man program > program.1
- pod2man SomeModule.pm /usr/perl/man/man3/SomeModule.3
- pod2man --section=7 note.pod > note.7
-
-If you would like to print out a lot of man page continuously, you probably
-want to set the C and D registers to set contiguous page numbering and
-even/odd paging, at least on some versions of man(7).
-
- troff -man -rC1 -rD1 perl.1 perldata.1 perlsyn.1 ...
-
-To get index entries on C<STDERR>, turn on the F register, as in:
-
- troff -man -rF1 perl.1
-
-The indexing merely outputs messages via C<.tm> for each major page,
-section, subsection, item, and any C<XE<lt>E<gt>> directives. See
-L<Pod::Man> for more details.
-
-=head1 BUGS
-
-Lots of this documentation is duplicated from L<Pod::Man>.
-
-=head1 NOTES
-
-For those not sure of the proper layout of a man page, here are some notes
-on writing a proper man page.
-
-The name of the program being documented is conventionally written in bold
-(using BE<lt>E<gt>) wherever it occurs, as are all program options.
-Arguments should be written in italics (IE<lt>E<gt>). Functions are
-traditionally written in italics; if you write a function as function(),
-Pod::Man will take care of this for you. Literal code or commands should
-be in CE<lt>E<gt>. References to other man pages should be in the form
-C<manpage(section)>, and Pod::Man will automatically format those
-appropriately. As an exception, it's traditional not to use this form when
-referring to module documentation; use C<LE<lt>Module::NameE<gt>> instead.
-
-References to other programs or functions are normally in the form of man
-page references so that cross-referencing tools can provide the user with
-links and the like. It's possible to overdo this, though, so be careful not
-to clutter your documentation with too much markup.
-
-The major headers should be set out using a C<=head1> directive, and are
-historically written in the rather startling ALL UPPER CASE format, although
-this is not mandatory. Minor headers may be included using C<=head2>, and
-are typically in mixed case.
-
-The standard sections of a manual page are:
-
-=over 4
-
-=item NAME
-
-Mandatory section; should be a comma-separated list of programs or functions
-documented by this POD page, such as:
-
- foo, bar - programs to do something
-
-Manual page indexers are often extremely picky about the format of this
-section, so don't put anything in it except this line. A single dash, and
-only a single dash, should separate the list of programs or functions from
-the description. Functions should not be qualified with C<()> or the like.
-The description should ideally fit on a single line, even if a man program
-replaces the dash with a few tabs.
-
-=item SYNOPSIS
-
-A short usage summary for programs and functions. This section is mandatory
-for section 3 pages.
-
-=item DESCRIPTION
-
-Extended description and discussion of the program or functions, or the body
-of the documentation for man pages that document something else. If
-particularly long, it's a good idea to break this up into subsections
-C<=head2> directives like:
-
- =head2 Normal Usage
-
- =head2 Advanced Features
-
- =head2 Writing Configuration Files
-
-or whatever is appropriate for your documentation.
-
-=item OPTIONS
-
-Detailed description of each of the command-line options taken by the
-program. This should be separate from the description for the use of things
-like L<Pod::Usage|Pod::Usage>. This is normally presented as a list, with
-each option as a separate C<=item>. The specific option string should be
-enclosed in BE<lt>E<gt>. Any values that the option takes should be
-enclosed in IE<lt>E<gt>. For example, the section for the option
-B<--section>=I<manext> would be introduced with:
-
- =item B<--section>=I<manext>
-
-Synonymous options (like both the short and long forms) are separated by a
-comma and a space on the same C<=item> line, or optionally listed as their
-own item with a reference to the canonical name. For example, since
-B<--section> can also be written as B<-s>, the above would be:
-
- =item B<-s> I<manext>, B<--section>=I<manext>
-
-(Writing the short option first is arguably easier to read, since the long
-option is long enough to draw the eye to it anyway and the short option can
-otherwise get lost in visual noise.)
-
-=item RETURN VALUE
-
-What the program or function returns, if successful. This section can be
-omitted for programs whose precise exit codes aren't important, provided
-they return 0 on success as is standard. It should always be present for
-functions.
-
-=item ERRORS
-
-Exceptions, error return codes, exit statuses, and errno settings.
-Typically used for function documentation; program documentation uses
-DIAGNOSTICS instead. The general rule of thumb is that errors printed to
-C<STDOUT> or C<STDERR> and intended for the end user are documented in
-DIAGNOSTICS while errors passed internal to the calling program and
-intended for other programmers are documented in ERRORS. When documenting
-a function that sets errno, a full list of the possible errno values
-should be given here.
-
-=item DIAGNOSTICS
-
-All possible messages the program can print out--and what they mean. You
-may wish to follow the same documentation style as the Perl documentation;
-see perldiag(1) for more details (and look at the POD source as well).
-
-If applicable, please include details on what the user should do to correct
-the error; documenting an error as indicating "the input buffer is too
-small" without telling the user how to increase the size of the input buffer
-(or at least telling them that it isn't possible) aren't very useful.
-
-=item EXAMPLES
-
-Give some example uses of the program or function. Don't skimp; users often
-find this the most useful part of the documentation. The examples are
-generally given as verbatim paragraphs.
-
-Don't just present an example without explaining what it does. Adding a
-short paragraph saying what the example will do can increase the value of
-the example immensely.
-
-=item ENVIRONMENT
-
-Environment variables that the program cares about, normally presented as a
-list using C<=over>, C<=item>, and C<=back>. For example:
-
- =over 6
-
- =item HOME
-
- Used to determine the user's home directory. F<.foorc> in this
- directory is read for configuration details, if it exists.
-
- =back
-
-Since environment variables are normally in all uppercase, no additional
-special formatting is generally needed; they're glaring enough as it is.
-
-=item FILES
-
-All files used by the program or function, normally presented as a list, and
-what it uses them for. File names should be enclosed in FE<lt>E<gt>. It's
-particularly important to document files that will be potentially modified.
-
-=item CAVEATS
-
-Things to take special care with, sometimes called WARNINGS.
-
-=item BUGS
-
-Things that are broken or just don't work quite right.
-
-=item RESTRICTIONS
-
-Bugs you don't plan to fix. :-)
-
-=item NOTES
-
-Miscellaneous commentary.
-
-=item AUTHOR
-
-Who wrote it (use AUTHORS for multiple people). Including your current
-e-mail address (or some e-mail address to which bug reports should be sent)
-so that users have a way of contacting you is a good idea. Remember that
-program documentation tends to roam the wild for far longer than you expect
-and pick an e-mail address that's likely to last if possible.
-
-=item HISTORY
-
-Programs derived from other sources sometimes have this, or you might keep
-a modification log here. If the log gets overly long or detailed,
-consider maintaining it in a separate file, though.
-
-=item COPYRIGHT AND LICENSE
-
-For copyright
-
- Copyright YEAR(s) by YOUR NAME(s)
-
-(No, (C) is not needed. No, "all rights reserved" is not needed.)
-
-For licensing the easiest way is to use the same licensing as Perl itself:
-
- This library is free software; you may redistribute it and/or modify
- it under the same terms as Perl itself.
-
-This makes it easy for people to use your module with Perl. Note that
-this licensing is neither an endorsement or a requirement, you are of
-course free to choose any licensing.
-
-=item SEE ALSO
-
-Other man pages to check out, like man(1), man(7), makewhatis(8), or
-catman(8). Normally a simple list of man pages separated by commas, or a
-paragraph giving the name of a reference work. Man page references, if they
-use the standard C<name(section)> form, don't have to be enclosed in
-LE<lt>E<gt> (although it's recommended), but other things in this section
-probably should be when appropriate.
-
-If the package has a mailing list, include a URL or subscription
-instructions here.
-
-If the package has a web site, include a URL here.
-
-=back
-
-In addition, some systems use CONFORMING TO to note conformance to relevant
-standards and MT-LEVEL to note safeness for use in threaded programs or
-signal handlers. These headings are primarily useful when documenting parts
-of a C library. Documentation of object-oriented libraries or modules may
-use CONSTRUCTORS and METHODS sections for detailed documentation of the
-parts of the library and save the DESCRIPTION section for an overview; other
-large modules may use FUNCTIONS for similar reasons. Some people use
-OVERVIEW to summarize the description if it's quite long.
-
-Section ordering varies, although NAME should I<always> be the first section
-(you'll break some man page systems otherwise), and NAME, SYNOPSIS,
-DESCRIPTION, and OPTIONS generally always occur first and in that order if
-present. In general, SEE ALSO, AUTHOR, and similar material should be left
-for last. Some systems also move WARNINGS and NOTES to last. The order
-given above should be reasonable for most purposes.
-
-Finally, as a general note, try not to use an excessive amount of markup.
-As documented here and in L<Pod::Man>, you can safely leave Perl variables,
-function names, man page references, and the like unadorned by markup and
-the POD translators will figure it out for you. This makes it much easier
-to later edit the documentation. Note that many existing translators
-(including this one currently) will do the wrong thing with e-mail addresses
-when wrapped in LE<lt>E<gt>, so don't do that.
-
-For additional information that may be more accurate for your specific
-system, see either L<man(5)> or L<man(7)> depending on your system manual
-section numbering conventions.
-
-=head1 SEE ALSO
-
-L<Pod::Man>, L<Pod::Simple>, L<man(1)>, L<nroff(1)>, L<perlpod(1)>,
-L<podchecker(1)>, L<troff(1)>, L<man(7)>
-
-The man page documenting the an macro set may be L<man(5)> instead of
-L<man(7)> on your system.
-
-The current version of this script is always available from its web site at
-L<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
-Perl core distribution as of 5.6.0.
-
-=head1 AUTHOR
-
-Russ Allbery <rra at stanford.edu>, based I<very> heavily on the original
-B<pod2man> by Larry Wall and Tom Christiansen. Large portions of this
-documentation, particularly the sections on the anatomy of a proper man
-page, are taken from the B<pod2man> documentation by Tom.
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 1999, 2000, 2001, 2004, 2006, 2008 Russ Allbery
-<rra at stanford.edu>.
-
-This program is free software; you may redistribute it and/or modify it
-under the same terms as Perl itself.
-
-=cut
-!NO!SUBS!
-#'# (cperl-mode)
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
Deleted: vendor/perl/dist/pod/pod2text.PL
===================================================================
--- vendor/perl/dist/pod/pod2text.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/pod2text.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,312 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
-chdir dirname($0);
-$file = basename($0, '.PL');
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{startperl}
- eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
-!GROK!THIS!
-
-# In the following, perl variables are not expanded during extraction.
-
-print OUT <<'!NO!SUBS!';
-
-# pod2text -- Convert POD data to formatted ASCII text.
-#
-# Copyright 1999, 2000, 2001, 2004, 2006, 2008 Russ Allbery <rra at stanford.edu>
-#
-# This program is free software; you may redistribute it and/or modify it
-# under the same terms as Perl itself.
-#
-# The driver script for Pod::Text, Pod::Text::Termcap, and Pod::Text::Color,
-# invoked by perldoc -t among other things.
-
-require 5.004;
-
-use Getopt::Long qw(GetOptions);
-use Pod::Text ();
-use Pod::Usage qw(pod2usage);
-
-use strict;
-
-# Silence -w warnings.
-use vars qw($running_under_some_shell);
-
-# Take an initial pass through our options, looking for one of the form
-# -<number>. We turn that into -w <number> for compatibility with the
-# original pod2text script.
-for (my $i = 0; $i < @ARGV; $i++) {
- last if $ARGV[$i] =~ /^--$/;
- if ($ARGV[$i] =~ /^-(\d+)$/) {
- splice (@ARGV, $i++, 1, '-w', $1);
- }
-}
-
-# Insert -- into @ARGV before any single dash argument to hide it from
-# Getopt::Long; we want to interpret it as meaning stdin (which Pod::Simple
-# does correctly).
-my $stdin;
- at ARGV = map { $_ eq '-' && !$stdin++ ? ('--', $_) : $_ } @ARGV;
-
-# Parse our options. Use the same names as Pod::Text for simplicity, and
-# default to sentence boundaries turned off for compatibility.
-my %options;
-$options{sentence} = 0;
-Getopt::Long::config ('bundling');
-GetOptions (\%options, 'alt|a', 'code', 'color|c', 'help|h', 'indent|i=i',
- 'loose|l', 'margin|left-margin|m=i', 'overstrike|o',
- 'quotes|q=s', 'sentence|s', 'stderr', 'termcap|t', 'utf8|u',
- 'width|w=i')
- or exit 1;
-pod2usage (1) if $options{help};
-
-# Figure out what formatter we're going to use. -c overrides -t.
-my $formatter = 'Pod::Text';
-if ($options{color}) {
- $formatter = 'Pod::Text::Color';
- eval { require Term::ANSIColor };
- if ($@) { die "-c (--color) requires Term::ANSIColor be installed\n" }
- require Pod::Text::Color;
-} elsif ($options{termcap}) {
- $formatter = 'Pod::Text::Termcap';
- require Pod::Text::Termcap;
-} elsif ($options{overstrike}) {
- $formatter = 'Pod::Text::Overstrike';
- require Pod::Text::Overstrike;
-}
-delete @options{'color', 'termcap', 'overstrike'};
-
-# Initialize and run the formatter.
-my $parser = $formatter->new (%options);
-do {
- my ($input, $output) = splice (@ARGV, 0, 2);
- $parser->parse_from_file ($input, $output);
-} while (@ARGV);
-
-__END__
-
-=head1 NAME
-
-pod2text - Convert POD data to formatted ASCII text
-
-=for stopwords
--aclostu --alt --stderr Allbery --overstrike overstrike --termcap --utf8
-UTF-8
-
-=head1 SYNOPSIS
-
-pod2text [B<-aclostu>] [B<--code>] [B<-i> I<indent>] S<[B<-q> I<quotes>]>
- [B<--stderr>] S<[B<-w> I<width>]> [I<input> [I<output> ...]]
-
-pod2text B<-h>
-
-=head1 DESCRIPTION
-
-B<pod2text> is a front-end for Pod::Text and its subclasses. It uses them
-to generate formatted ASCII text from POD source. It can optionally use
-either termcap sequences or ANSI color escape sequences to format the text.
-
-I<input> is the file to read for POD source (the POD can be embedded in
-code). If I<input> isn't given, it defaults to C<STDIN>. I<output>, if
-given, is the file to which to write the formatted output. If I<output>
-isn't given, the formatted output is written to C<STDOUT>. Several POD
-files can be processed in the same B<pod2text> invocation (saving module
-load and compile times) by providing multiple pairs of I<input> and
-I<output> files on the command line.
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-a>, B<--alt>
-
-Use an alternate output format that, among other things, uses a different
-heading style and marks C<=item> entries with a colon in the left margin.
-
-=item B<--code>
-
-Include any non-POD text from the input file in the output as well. Useful
-for viewing code documented with POD blocks with the POD rendered and the
-code left intact.
-
-=item B<-c>, B<--color>
-
-Format the output with ANSI color escape sequences. Using this option
-requires that Term::ANSIColor be installed on your system.
-
-=item B<-i> I<indent>, B<--indent=>I<indent>
-
-Set the number of spaces to indent regular text, and the default indentation
-for C<=over> blocks. Defaults to 4 spaces if this option isn't given.
-
-=item B<-h>, B<--help>
-
-Print out usage information and exit.
-
-=item B<-l>, B<--loose>
-
-Print a blank line after a C<=head1> heading. Normally, no blank line is
-printed after C<=head1>, although one is still printed after C<=head2>,
-because this is the expected formatting for manual pages; if you're
-formatting arbitrary text documents, using this option is recommended.
-
-=item B<-m> I<width>, B<--left-margin>=I<width>, B<--margin>=I<width>
-
-The width of the left margin in spaces. Defaults to 0. This is the margin
-for all text, including headings, not the amount by which regular text is
-indented; for the latter, see B<-i> option.
-
-=item B<-o>, B<--overstrike>
-
-Format the output with overstrike printing. Bold text is rendered as
-character, backspace, character. Italics and file names are rendered as
-underscore, backspace, character. Many pagers, such as B<less>, know how
-to convert this to bold or underlined text.
-
-=item B<-q> I<quotes>, B<--quotes>=I<quotes>
-
-Sets the quote marks used to surround CE<lt>> text to I<quotes>. If
-I<quotes> is a single character, it is used as both the left and right
-quote; if I<quotes> is two characters, the first character is used as the
-left quote and the second as the right quoted; and if I<quotes> is four
-characters, the first two are used as the left quote and the second two as
-the right quote.
-
-I<quotes> may also be set to the special value C<none>, in which case no
-quote marks are added around CE<lt>> text.
-
-=item B<-s>, B<--sentence>
-
-Assume each sentence ends with two spaces and try to preserve that spacing.
-Without this option, all consecutive whitespace in non-verbatim paragraphs
-is compressed into a single space.
-
-=item B<--stderr>
-
-By default, B<pod2text> puts any errors detected in the POD input in a POD
-ERRORS section in the output manual page. If B<--stderr> is given, errors
-are sent to standard error instead and the POD ERRORS section is
-suppressed.
-
-=item B<-t>, B<--termcap>
-
-Try to determine the width of the screen and the bold and underline
-sequences for the terminal from termcap, and use that information in
-formatting the output. Output will be wrapped at two columns less than the
-width of your terminal device. Using this option requires that your system
-have a termcap file somewhere where Term::Cap can find it and requires that
-your system support termios. With this option, the output of B<pod2text>
-will contain terminal control sequences for your current terminal type.
-
-=item B<-u>, B<--utf8>
-
-By default, B<pod2text> tries to use the same output encoding as its input
-encoding (to be backward-compatible with older versions). This option
-says to instead force the output encoding to UTF-8.
-
-Be aware that, when using this option, the input encoding of your POD
-source must be properly declared unless it is US-ASCII or Latin-1. POD
-input without an C<=encoding> command will be assumed to be in Latin-1,
-and if it's actually in UTF-8, the output will be double-encoded. See
-L<perlpod(1)> for more information on the C<=encoding> command.
-
-=item B<-w>, B<--width=>I<width>, B<->I<width>
-
-The column at which to wrap text on the right-hand side. Defaults to 76,
-unless B<-t> is given, in which case it's two columns less than the width of
-your terminal device.
-
-=back
-
-=head1 DIAGNOSTICS
-
-If B<pod2text> fails with errors, see L<Pod::Text> and L<Pod::Simple> for
-information about what those errors might mean. Internally, it can also
-produce the following diagnostics:
-
-=over 4
-
-=item -c (--color) requires Term::ANSIColor be installed
-
-(F) B<-c> or B<--color> were given, but Term::ANSIColor could not be
-loaded.
-
-=item Unknown option: %s
-
-(F) An unknown command line option was given.
-
-=back
-
-In addition, other L<Getopt::Long> error messages may result from invalid
-command-line options.
-
-=head1 ENVIRONMENT
-
-=over 4
-
-=item COLUMNS
-
-If B<-t> is given, B<pod2text> will take the current width of your screen
-from this environment variable, if available. It overrides terminal width
-information in TERMCAP.
-
-=item TERMCAP
-
-If B<-t> is given, B<pod2text> will use the contents of this environment
-variable if available to determine the correct formatting sequences for your
-current terminal device.
-
-=back
-
-=head1 SEE ALSO
-
-L<Pod::Text>, L<Pod::Text::Color>, L<Pod::Text::Overstrike>,
-L<Pod::Text::Termcap>, L<Pod::Simple>, L<perlpod(1)>
-
-The current version of this script is always available from its web site at
-L<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
-Perl core distribution as of 5.6.0.
-
-=head1 AUTHOR
-
-Russ Allbery <rra at stanford.edu>.
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 1999, 2000, 2001, 2004, 2006, 2008 Russ Allbery
-<rra at stanford.edu>.
-
-This program is free software; you may redistribute it and/or modify it
-under the same terms as Perl itself.
-
-=cut
-!NO!SUBS!
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
Deleted: vendor/perl/dist/pod/pod2usage.PL
===================================================================
--- vendor/perl/dist/pod/pod2usage.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/pod2usage.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,180 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
-chdir(dirname($0));
-$file = basename($0, '.PL');
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{'startperl'}
- eval 'exec perl -S \$0 "\$@"'
- if 0;
-!GROK!THIS!
-
-# In the following, perl variables are not expanded during extraction.
-
-print OUT <<'!NO!SUBS!';
-
-#############################################################################
-# pod2usage -- command to print usage messages from embedded pod docs
-#
-# Copyright (c) 1996-2000 by Bradford Appleton. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-use strict;
-#use diagnostics;
-
-=head1 NAME
-
-pod2usage - print usage messages from embedded pod docs in files
-
-=head1 SYNOPSIS
-
-=over 12
-
-=item B<pod2usage>
-
-[B<-help>]
-[B<-man>]
-[B<-exit>S< >I<exitval>]
-[B<-output>S< >I<outfile>]
-[B<-verbose> I<level>]
-[B<-pathlist> I<dirlist>]
-I<file>
-
-=back
-
-=head1 OPTIONS AND ARGUMENTS
-
-=over 8
-
-=item B<-help>
-
-Print a brief help message and exit.
-
-=item B<-man>
-
-Print this command's manual page and exit.
-
-=item B<-exit> I<exitval>
-
-The exit status value to return.
-
-=item B<-output> I<outfile>
-
-The output file to print to. If the special names "-" or ">&1" or ">&STDOUT"
-are used then standard output is used. If ">&2" or ">&STDERR" is used then
-standard error is used.
-
-=item B<-verbose> I<level>
-
-The desired level of verbosity to use:
-
- 1 : print SYNOPSIS only
- 2 : print SYNOPSIS sections and any OPTIONS/ARGUMENTS sections
- 3 : print the entire manpage (similar to running pod2text)
-
-=item B<-pathlist> I<dirlist>
-
-Specifies one or more directories to search for the input file if it
-was not supplied with an absolute path. Each directory path in the given
-list should be separated by a ':' on Unix (';' on MSWin32 and DOS).
-
-=item I<file>
-
-The pathname of a file containing pod documentation to be output in
-usage message format (defaults to standard input).
-
-=back
-
-=head1 DESCRIPTION
-
-B<pod2usage> will read the given input file looking for pod
-documentation and will print the corresponding usage message.
-If no input file is specified then standard input is read.
-
-B<pod2usage> invokes the B<pod2usage()> function in the B<Pod::Usage>
-module. Please see L<Pod::Usage/pod2usage()>.
-
-=head1 SEE ALSO
-
-L<Pod::Usage>, L<pod2text(1)>
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Brad Appleton E<lt>bradapp at enteract.comE<gt>
-
-Based on code for B<pod2text(1)> written by
-Tom Christiansen E<lt>tchrist at mox.perl.comE<gt>
-
-=cut
-
-use Pod::Usage;
-use Getopt::Long;
-
-## Define options
-my %options = ();
-my @opt_specs = (
- 'help',
- 'man',
- 'exit=i',
- 'output=s',
- 'pathlist=s',
- 'verbose=i',
-);
-
-## Parse options
-GetOptions(\%options, @opt_specs) || pod2usage(2);
-pod2usage(1) if ($options{help});
-pod2usage(VERBOSE => 2) if ($options{man});
-
-## Dont default to STDIN if connected to a terminal
-pod2usage(2) if ((@ARGV == 0) && (-t STDIN));
-
- at ARGV = ('-') unless (@ARGV);
-if (@ARGV > 1) {
- print STDERR "pod2usage: Too many filenames given\n\n";
- pod2usage(2);
-}
-
-my %usage = ();
-$usage{-input} = shift(@ARGV);
-$usage{-exitval} = $options{'exit'} if (defined $options{'exit'});
-$usage{-output} = $options{'output'} if (defined $options{'output'});
-$usage{-verbose} = $options{'verbose'} if (defined $options{'verbose'});
-$usage{-pathlist} = $options{'pathlist'} if (defined $options{'pathlist'});
-
-pod2usage(\%usage);
-
-
-!NO!SUBS!
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
Deleted: vendor/perl/dist/pod/podchecker.PL
===================================================================
--- vendor/perl/dist/pod/podchecker.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/podchecker.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,186 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
-chdir(dirname($0));
-($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
- if ($^O eq 'VMS' or $^O eq 'os2' or $^O eq 'dos'); # "case-forgiving"
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{'startperl'}
- eval 'exec perl -S \$0 "\$@"'
- if 0;
-!GROK!THIS!
-
-# In the following, perl variables are not expanded during extraction.
-
-print OUT <<'!NO!SUBS!';
-#############################################################################
-# podchecker -- command to invoke the podchecker function in Pod::Checker
-#
-# Copyright (c) 1998-2000 by Bradford Appleton. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-use strict;
-#use diagnostics;
-
-=head1 NAME
-
-podchecker - check the syntax of POD format documentation files
-
-=head1 SYNOPSIS
-
-B<podchecker> [B<-help>] [B<-man>] [B<-(no)warnings>] [I<file>S< >...]
-
-=head1 OPTIONS AND ARGUMENTS
-
-=over 8
-
-=item B<-help>
-
-Print a brief help message and exit.
-
-=item B<-man>
-
-Print the manual page and exit.
-
-=item B<-warnings> B<-nowarnings>
-
-Turn on/off printing of warnings. Repeating B<-warnings> increases the
-warning level, i.e. more warnings are printed. Currently increasing to
-level two causes flagging of unescaped "E<lt>,E<gt>" characters.
-
-=item I<file>
-
-The pathname of a POD file to syntax-check (defaults to standard input).
-
-=back
-
-=head1 DESCRIPTION
-
-B<podchecker> will read the given input files looking for POD
-syntax errors in the POD documentation and will print any errors
-it find to STDERR. At the end, it will print a status message
-indicating the number of errors found.
-
-Directories are ignored, an appropriate warning message is printed.
-
-B<podchecker> invokes the B<podchecker()> function exported by B<Pod::Checker>
-Please see L<Pod::Checker/podchecker()> for more details.
-
-=head1 RETURN VALUE
-
-B<podchecker> returns a 0 (zero) exit status if all specified
-POD files are ok.
-
-=head1 ERRORS
-
-B<podchecker> returns the exit status 1 if at least one of
-the given POD files has syntax errors.
-
-The status 2 indicates that at least one of the specified
-files does not contain I<any> POD commands.
-
-Status 1 overrides status 2. If you want unambiguous
-results, call B<podchecker> with one single argument only.
-
-=head1 SEE ALSO
-
-L<Pod::Parser> and L<Pod::Checker>
-
-=head1 AUTHORS
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Brad Appleton E<lt>bradapp at enteract.comE<gt>,
-Marek Rouchal E<lt>marekr at cpan.orgE<gt>
-
-Based on code for B<Pod::Text::pod2text(1)> written by
-Tom Christiansen E<lt>tchrist at mox.perl.comE<gt>
-
-=cut
-
-
-use Pod::Checker;
-use Pod::Usage;
-use Getopt::Long;
-
-## Define options
-my %options;
-
-## Parse options
-GetOptions(\%options, qw(help man warnings+ nowarnings)) || pod2usage(2);
-pod2usage(1) if ($options{help});
-pod2usage(-verbose => 2) if ($options{man});
-
-if($options{nowarnings}) {
- $options{warnings} = 0;
-}
-elsif(!defined $options{warnings}) {
- $options{warnings} = 1; # default is warnings on
-}
-
-## Dont default to STDIN if connected to a terminal
-pod2usage(2) if ((@ARGV == 0) && (-t STDIN));
-
-## Invoke podchecker()
-my $status = 0;
- at ARGV = qw(-) unless(@ARGV);
-for my $podfile (@ARGV) {
- if($podfile eq '-') {
- $podfile = '<&STDIN';
- }
- elsif(-d $podfile) {
- warn "podchecker: Warning: Ignoring directory '$podfile'\n";
- next;
- }
- my $errors =
- podchecker($podfile, undef, '-warnings' => $options{warnings});
- if($errors > 0) {
- # errors occurred
- $status = 1;
- printf STDERR ("%s has %d pod syntax %s.\n",
- $podfile, $errors,
- ($errors == 1) ? 'error' : 'errors');
- }
- elsif($errors < 0) {
- # no pod found
- $status = 2 unless($status);
- print STDERR "$podfile does not contain any pod commands.\n";
- }
- else {
- print STDERR "$podfile pod syntax OK.\n";
- }
-}
-exit $status;
-
-!NO!SUBS!
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
Deleted: vendor/perl/dist/pod/podselect.PL
===================================================================
--- vendor/perl/dist/pod/podselect.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/podselect.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,143 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
-chdir(dirname($0));
-$file = basename($0, '.PL');
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{'startperl'}
- eval 'exec perl -S \$0 "\$@"'
- if 0;
-!GROK!THIS!
-
-# In the following, perl variables are not expanded during extraction.
-
-print OUT <<'!NO!SUBS!';
-
-#############################################################################
-# podselect -- command to invoke the podselect function in Pod::Select
-#
-# Copyright (c) 1996-2000 by Bradford Appleton. All rights reserved.
-# This file is part of "PodParser". PodParser is free software;
-# you can redistribute it and/or modify it under the same terms
-# as Perl itself.
-#############################################################################
-
-use strict;
-#use diagnostics;
-
-=head1 NAME
-
-podselect - print selected sections of pod documentation on standard output
-
-=head1 SYNOPSIS
-
-B<podselect> [B<-help>] [B<-man>] [B<-section>S< >I<section-spec>]
-[I<file>S< >...]
-
-=head1 OPTIONS AND ARGUMENTS
-
-=over 8
-
-=item B<-help>
-
-Print a brief help message and exit.
-
-=item B<-man>
-
-Print the manual page and exit.
-
-=item B<-section>S< >I<section-spec>
-
-Specify a section to include in the output.
-See L<Pod::Parser/"SECTION SPECIFICATIONS">
-for the format to use for I<section-spec>.
-This option may be given multiple times on the command line.
-
-=item I<file>
-
-The pathname of a file from which to select sections of pod
-documentation (defaults to standard input).
-
-=back
-
-=head1 DESCRIPTION
-
-B<podselect> will read the given input files looking for pod
-documentation and will print out (in raw pod format) all sections that
-match one ore more of the given section specifications. If no section
-specifications are given than all pod sections encountered are output.
-
-B<podselect> invokes the B<podselect()> function exported by B<Pod::Select>
-Please see L<Pod::Select/podselect()> for more details.
-
-=head1 SEE ALSO
-
-L<Pod::Parser> and L<Pod::Select>
-
-=head1 AUTHOR
-
-Please report bugs using L<http://rt.cpan.org>.
-
-Brad Appleton E<lt>bradapp at enteract.comE<gt>
-
-Based on code for B<Pod::Text::pod2text(1)> written by
-Tom Christiansen E<lt>tchrist at mox.perl.comE<gt>
-
-=cut
-
-use Pod::Select;
-use Pod::Usage;
-use Getopt::Long;
-
-## Define options
-my %options = (
- 'help' => 0,
- 'man' => 0,
- 'sections' => [],
-);
-
-## Parse options
-GetOptions(\%options, 'help', 'man', 'sections|select=s@') || pod2usage(2);
-pod2usage(1) if ($options{help});
-pod2usage(-verbose => 2) if ($options{man});
-
-## Dont default to STDIN if connected to a terminal
-pod2usage(2) if ((@ARGV == 0) && (-t STDIN));
-
-## Invoke podselect().
-if (@{ $options{'sections'} } > 0) {
- podselect({ -sections => $options{'sections'} }, @ARGV);
-}
-else {
- podselect(@ARGV);
-}
-
-
-!NO!SUBS!
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
Deleted: vendor/perl/dist/pod/roffitall
===================================================================
--- vendor/perl/dist/pod/roffitall 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pod/roffitall 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,311 +0,0 @@
-#!/bin/sh
-#
-# Usage: roffitall [-nroff|-psroff|-groff]
-#
-# Authors: Tom Christiansen, Raphael Manfredi
-
-me=roffitall
-tmp=.
-
-if test -f ../config.sh; then
- . ../config.sh
-fi
-
-mandir=$installman1dir
-libdir=$installman3dir
-
-test -d $mandir || mandir=/usr/new/man/man1
-test -d $libdir || libdir=/usr/new/man/man3
-
-case "$1" in
--nroff) cmd="nroff -man"; ext='txt';;
--psroff) cmd="psroff -t"; ext='ps';;
--groff) cmd="groff -man"; ext='ps';;
-*)
- echo "Usage: roffitall [-nroff|-psroff|-groff]" >&2
- exit 1
- ;;
-esac
-
-# NEEDS TO BE BUILT BASED ON Makefile (or Makefile.SH, should such happen)
-toroff=`
- echo \
- $mandir/perl.1 \
- $mandir/perl5004delta.1 \
- $mandir/perl5005delta.1 \
- $mandir/perl56delta.1 \
- $mandir/perlapi.1 \
- $mandir/perlapio.1 \
- $mandir/perlbook.1 \
- $mandir/perlboot.1 \
- $mandir/perlbot.1 \
- $mandir/perlcall.1 \
- $mandir/perlcompile.1 \
- $mandir/perldata.1 \
- $mandir/perldbmfilter.1 \
- $mandir/perldebguts.1 \
- $mandir/perldebug.1 \
- $mandir/perldelta.1 \
- $mandir/perldiag.1 \
- $mandir/perldsc.1 \
- $mandir/perlembed.1 \
- $mandir/perlfaq.1 \
- $mandir/perlfaq1.1 \
- $mandir/perlfaq2.1 \
- $mandir/perlfaq3.1 \
- $mandir/perlfaq4.1 \
- $mandir/perlfaq5.1 \
- $mandir/perlfaq6.1 \
- $mandir/perlfaq7.1 \
- $mandir/perlfaq8.1 \
- $mandir/perlfaq9.1 \
- $mandir/perlfilter.1 \
- $mandir/perlfork.1 \
- $mandir/perlform.1 \
- $mandir/perlfunc.1 \
- $mandir/perlguts.1 \
- $mandir/perlhack.1 \
- $mandir/perlhist.1 \
- $mandir/perlintern.1 \
- $mandir/perlipc.1 \
- $mandir/perllexwarn.1 \
- $mandir/perllocale.1 \
- $mandir/perllol.1 \
- $mandir/perlmod.1 \
- $mandir/perlmodinstall.1 \
- $mandir/perlmodlib.1 \
- $mandir/perlnewmod.1 \
- $mandir/perlnumber.1 \
- $mandir/perlobj.1 \
- $mandir/perlop.1 \
- $mandir/perlopentut.1 \
- $mandir/perlpod.1 \
- $mandir/perlport.1 \
- $mandir/perlre.1 \
- $mandir/perlref.1 \
- $mandir/perlreftut.1 \
- $mandir/perlrequick.1 \
- $mandir/perlretut.1 \
- $mandir/perlrun.1 \
- $mandir/perlsec.1 \
- $mandir/perlstyle.1 \
- $mandir/perlsub.1 \
- $mandir/perlsyn.1 \
- $mandir/perlthrtut.1 \
- $mandir/perltie.1 \
- $mandir/perltoc.1 \
- $mandir/perltodo.1 \
- $mandir/perltooc.1 \
- $mandir/perltoot.1 \
- $mandir/perltrap.1 \
- $mandir/perlunicode.1 \
- $mandir/perlutil.1 \
- $mandir/perlvar.1 \
- $mandir/perlxs.1 \
- $mandir/perlxstut.1 \
- \
- $mandir/a2p.1 \
- $mandir/c2ph.1 \
- $mandir/dprofpp.1 \
- $mandir/h2ph.1 \
- $mandir/h2xs.1 \
- $mandir/perlbug.1 \
- $mandir/perldoc.1 \
- $mandir/pl2pm.1 \
- $mandir/pod2html.1 \
- $mandir/pod2man.1 \
- $mandir/s2p.1 \
- $mandir/splain.1 \
- $mandir/xsubpp.1 \
- \
- $libdir/autouse.3 \
- $libdir/base.3 \
- $libdir/blib.3 \
- $libdir/constant.3 \
- $libdir/diagnostics.3 \
- $libdir/fields.3 \
- $libdir/filetest.3 \
- $libdir/integer.3 \
- $libdir/less.3 \
- $libdir/lib.3 \
- $libdir/locale.3 \
- $libdir/ops.3 \
- $libdir/overload.3 \
- $libdir/re.3 \
- $libdir/sigtrap.3 \
- $libdir/strict.3 \
- $libdir/subs.3 \
- $libdir/vars.3 \
- \
- $libdir/AnyDBM_File.3 \
- $libdir/AutoLoader.3 \
- $libdir/AutoSplit.3 \
- $libdir/B.3 \
- $libdir/B::Asmdata.3 \
- $libdir/B::Assembler.3 \
- $libdir/B::Bblock.3 \
- $libdir/B::Bytecode.3 \
- $libdir/B::C.3 \
- $libdir/B::CC.3 \
- $libdir/B::Debug.3 \
- $libdir/B::Deparse.3 \
- $libdir/B::Disassembler.3 \
- $libdir/B::Lint.3 \
- $libdir/B::Showlex.3 \
- $libdir/B::Stackobj.3 \
- $libdir/B::Terse.3 \
- $libdir/B::Xref.3 \
- $libdir/Benchmark.3 \
- $libdir/Carp.3 \
- $libdir/CGI.3 \
- $libdir/CGI::Apache.3 \
- $libdir/CGI::Carp.3 \
- $libdir/CGI::Cookie.3 \
- $libdir/CGI::Fast.3 \
- $libdir/CGI::Push.3 \
- $libdir/CGI::Switch.3 \
- $libdir/Class::Struct.3 \
- $libdir/Config.3 \
- $libdir/CPAN.3 \
- $libdir/CPAN::FirstTime.3 \
- $libdir/CPAN::Nox.3 \
- $libdir/Cwd.3 \
- $libdir/Data::Dumper.3 \
- $libdir/DB_File.3 \
- $libdir/Devel::SelfStubber.3 \
- $libdir/DirHandle.3 \
- $libdir/DynaLoader.3 \
- $libdir/Dumpvalue.3 \
- $libdir/English.3 \
- $libdir/Env.3 \
- $libdir/Errno.3 \
- $libdir/Exporter.3 \
- $libdir/ExtUtils::Command.3 \
- $libdir/ExtUtils::Embed.3 \
- $libdir/ExtUtils::Install.3 \
- $libdir/ExtUtils::Installed.3 \
- $libdir/ExtUtils::Liblist.3 \
- $libdir/ExtUtils::MakeMaker.3 \
- $libdir/ExtUtils::Manifest.3 \
- $libdir/ExtUtils::Miniperl.3 \
- $libdir/ExtUtils::Mkbootstrap.3 \
- $libdir/ExtUtils::Mksymlists.3 \
- $libdir/ExtUtils::MM_OS2.3 \
- $libdir/ExtUtils::MM_Unix.3 \
- $libdir/ExtUtils::MM_VMS.3 \
- $libdir/ExtUtils::MM_Win32.3 \
- $libdir/ExtUtils::Packlist.3 \
- $libdir/ExtUtils::testlib.3 \
- $libdir/Fatal.3 \
- $libdir/Fcntl.3 \
- $libdir/File::Basename.3 \
- $libdir/File::CheckTree.3 \
- $libdir/File::Compare.3 \
- $libdir/File::Copy.3 \
- $libdir/File::DosGlob.3 \
- $libdir/File::Find.3 \
- $libdir/File::Path.3 \
- $libdir/File::Spec.3 \
- $libdir/File::Spec::Mac.3 \
- $libdir/File::Spec::OS2.3 \
- $libdir/File::Spec::Unix.3 \
- $libdir/File::Spec::VMS.3 \
- $libdir/File::Spec::Win32.3 \
- $libdir/File::stat.3 \
- $libdir/FileCache.3 \
- $libdir/FileHandle.3 \
- $libdir/FindBin.3 \
- $libdir/GDBM_File.3 \
- $libdir/Getopt::Long.3 \
- $libdir/Getopt::Std.3 \
- $libdir/I18N::Collate.3 \
- $libdir/IO.3 \
- $libdir/IO::File.3 \
- $libdir/IO::Handle.3 \
- $libdir/IO::Pipe.3 \
- $libdir/IO::Seekable.3 \
- $libdir/IO::Select.3 \
- $libdir/IO::Socket.3 \
- $libdir/IPC::Msg.3 \
- $libdir/IPC::Open2.3 \
- $libdir/IPC::Open3.3 \
- $libdir/IPC::Semaphore.3 \
- $libdir/IPC::SysV.3 \
- $libdir/Math::BigFloat.3 \
- $libdir/Math::BigInt.3 \
- $libdir/Math::Complex.3 \
- $libdir/Math::Trig.3 \
- $libdir/NDBM_File.3 \
- $libdir/Net::hostent.3 \
- $libdir/Net::netent.3 \
- $libdir/Net::Ping.3 \
- $libdir/Net::protoent.3 \
- $libdir/Net::servent.3 \
- $libdir/O.3 \
- $libdir/Opcode.3 \
- $libdir/Pod::Html.3 \
- $libdir/Pod::Text.3 \
- $libdir/POSIX.3 \
- $libdir/Safe.3 \
- $libdir/SDBM_File.3 \
- $libdir/Search::Dict.3 \
- $libdir/SelectSaver.3 \
- $libdir/SelfLoader.3 \
- $libdir/Shell.3 \
- $libdir/Socket.3 \
- $libdir/Symbol.3 \
- $libdir/Sys::Hostname.3 \
- $libdir/Sys::Syslog.3 \
- $libdir/Term::Cap.3 \
- $libdir/Term::Complete.3 \
- $libdir/Term::ReadLine.3 \
- $libdir/Test.3 \
- $libdir/Test::Harness.3 \
- $libdir/Text::Abbrev.3 \
- $libdir/Text::ParseWords.3 \
- $libdir/Text::Soundex.3 \
- $libdir/Text::Tabs.3 \
- $libdir/Text::Wrap.3 \
- $libdir/Tie::Array.3 \
- $libdir/Tie::Handle.3 \
- $libdir/Tie::Hash.3 \
- $libdir/Tie::RefHash.3 \
- $libdir/Tie::Scalar.3 \
- $libdir/Tie::SubstrHash.3 \
- $libdir/Time::gmtime.3 \
- $libdir/Time::Local.3 \
- $libdir/Time::localtime.3 \
- $libdir/Time::tm.3 \
- $libdir/UNIVERSAL.3 \
- $libdir/User::grent.3 \
- $libdir/User::pwent.3 | \
- perl -ne 'map { -r && print "$_ " } split'`
-
- # Bypass internal shell buffer limit -- can't use case
- if perl -e '$a = shift; exit($a =~ m|/|)' $toroff; then
- echo "$me: empty file list -- did you run install?" >&2
- exit 1
- fi
-
- #psroff -t -man -rC1 -rD1 -rF1 > $tmp/PerlDoc.ps 2>$tmp/PerlTOC.raw
- #nroff -man -rC1 -rD1 -rF1 > $tmp/PerlDoc.txt 2>$tmp/PerlTOC.nr.raw
-
- # First, create the raw data
- run="$cmd -rC1 -rD1 -rF1 >$tmp/PerlDoc.$ext 2>$tmp/PerlTOC.$ext.raw"
- echo "$me: running $run"
- eval $run $toroff
-
- #Now create the TOC
- echo "$me: parsing TOC"
- ./rofftoc $tmp/PerlTOC.$ext.raw > $tmp/PerlTOC.tmp.man
- run="$cmd $tmp/PerlTOC.tmp.man >$tmp/PerlTOC.$ext"
- echo "$me: running $run"
- eval $run
-
- # Finally, recreate the Doc, without the blank page 0
- run="$cmd -rC1 -rD1 >$tmp/PerlDoc.$ext 2>$tmp/PerlTOC.$ext.raw"
- echo "$me: running $run"
- eval $run $toroff
- rm -f $tmp/PerlTOC.tmp.man $tmp/PerlTOC.$ext.raw
- echo "$me: leaving you with $tmp/PerlDoc.$ext and $tmp/PerlTOC.$ext"
-
Modified: vendor/perl/dist/pp_ctl.c
===================================================================
--- vendor/perl/dist/pp_ctl.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pp_ctl.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -3281,7 +3281,11 @@
int level = 0;
if (db_seqp)
- *db_seqp = PL_curcop->cop_seq;
+ *db_seqp =
+ PL_curcop == &PL_compiling
+ ? PL_cop_seqmax
+ : PL_curcop->cop_seq;
+
for (si = PL_curstackinfo; si; si = si->si_prev) {
I32 ix;
for (ix = si->si_cxix; ix >= 0; ix--) {
Modified: vendor/perl/dist/pp_hot.c
===================================================================
--- vendor/perl/dist/pp_hot.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/pp_hot.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1414,6 +1414,7 @@
if ( RX_NPARENS(rx)
|| PL_sawampersand
|| (RX_EXTFLAGS(rx) & (RXf_EVAL_SEEN|RXf_PMf_KEEPCOPY))
+ || (dynpm->op_pmflags & PMf_KEEPCOPY)
)
#endif
{
@@ -1425,6 +1426,11 @@
if (! (global && gimme == G_ARRAY))
r_flags |= REXEC_COPY_SKIP_POST;
};
+#ifdef PERL_SAWAMPERSAND
+ if (dynpm->op_pmflags & PMf_KEEPCOPY)
+ /* handle KEEPCOPY in pmop but not rx, eg $r=qr/a/; /$r/p */
+ r_flags &= ~(REXEC_COPY_SKIP_PRE|REXEC_COPY_SKIP_POST);
+#endif
play_it_again:
if (global && RX_OFFS(rx)[0].start != -1) {
@@ -2247,6 +2253,7 @@
r_flags = ( RX_NPARENS(rx)
|| PL_sawampersand
|| (RX_EXTFLAGS(rx) & (RXf_EVAL_SEEN|RXf_PMf_KEEPCOPY))
+ || (rpm->op_pmflags & PMf_KEEPCOPY)
)
? REXEC_COPY_STR
: 0;
Modified: vendor/perl/dist/regcomp.c
===================================================================
--- vendor/perl/dist/regcomp.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/regcomp.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -6688,13 +6688,23 @@
PERL_ARGS_ASSERT_REG_NUMBERED_BUFF_FETCH;
- if ( ( n == RX_BUFF_IDX_CARET_PREMATCH
+ if ( n == RX_BUFF_IDX_CARET_PREMATCH
|| n == RX_BUFF_IDX_CARET_FULLMATCH
|| n == RX_BUFF_IDX_CARET_POSTMATCH
- )
- && !(rx->extflags & RXf_PMf_KEEPCOPY)
- )
- goto ret_undef;
+ )
+ {
+ bool keepcopy = cBOOL(rx->extflags & RXf_PMf_KEEPCOPY);
+ if (!keepcopy) {
+ /* on something like
+ * $r = qr/.../;
+ * /$qr/p;
+ * the KEEPCOPY is set on the PMOP rather than the regex */
+ if (PL_curpm && r == PM_GETRE(PL_curpm))
+ keepcopy = cBOOL(PL_curpm->op_pmflags & PMf_KEEPCOPY);
+ }
+ if (!keepcopy)
+ goto ret_undef;
+ }
if (!rx->subbeg)
goto ret_undef;
@@ -6800,13 +6810,27 @@
PERL_ARGS_ASSERT_REG_NUMBERED_BUFF_LENGTH;
+ if ( paren == RX_BUFF_IDX_CARET_PREMATCH
+ || paren == RX_BUFF_IDX_CARET_FULLMATCH
+ || paren == RX_BUFF_IDX_CARET_POSTMATCH
+ )
+ {
+ bool keepcopy = cBOOL(rx->extflags & RXf_PMf_KEEPCOPY);
+ if (!keepcopy) {
+ /* on something like
+ * $r = qr/.../;
+ * /$qr/p;
+ * the KEEPCOPY is set on the PMOP rather than the regex */
+ if (PL_curpm && r == PM_GETRE(PL_curpm))
+ keepcopy = cBOOL(PL_curpm->op_pmflags & PMf_KEEPCOPY);
+ }
+ if (!keepcopy)
+ goto warn_undef;
+ }
+
/* Some of this code was originally in C<Perl_magic_len> in F<mg.c> */
switch (paren) {
case RX_BUFF_IDX_CARET_PREMATCH: /* ${^PREMATCH} */
- if (!(rx->extflags & RXf_PMf_KEEPCOPY))
- goto warn_undef;
- /*FALLTHROUGH*/
-
case RX_BUFF_IDX_PREMATCH: /* $` */
if (rx->offs[0].start != -1) {
i = rx->offs[0].start;
@@ -6819,8 +6843,6 @@
return 0;
case RX_BUFF_IDX_CARET_POSTMATCH: /* ${^POSTMATCH} */
- if (!(rx->extflags & RXf_PMf_KEEPCOPY))
- goto warn_undef;
case RX_BUFF_IDX_POSTMATCH: /* $' */
if (rx->offs[0].end != -1) {
i = rx->sublen - rx->offs[0].end;
@@ -6832,13 +6854,7 @@
}
return 0;
- case RX_BUFF_IDX_CARET_FULLMATCH: /* ${^MATCH} */
- if (!(rx->extflags & RXf_PMf_KEEPCOPY))
- goto warn_undef;
- /*FALLTHROUGH*/
-
- /* $& / ${^MATCH}, $1, $2, ... */
- default:
+ default: /* $& / ${^MATCH}, $1, $2, ... */
if (paren <= (I32)rx->nparens &&
(s1 = rx->offs[paren].start) != -1 &&
(t1 = rx->offs[paren].end) != -1)
@@ -10950,6 +10966,12 @@
if (PL_encoding && ender < 0x100)
goto recode_encoding;
break;
+ case '8': case '9': /* These are illegal unless backrefs */
+ if (atoi(p) <= RExC_npar) {
+ --p; /* backup to backslash; handle as backref */
+ goto loopdone;
+ }
+ goto unrecognized;
recode_encoding:
if (! RExC_override_recoding) {
SV* enc = PL_encoding;
@@ -10964,6 +10986,7 @@
FAIL("Trailing \\");
/* FALL THROUGH */
default:
+ unrecognized:
if (!SIZE_ONLY&& isALPHANUMERIC(*p)) {
/* Include any { following the alpha to emphasize
* that it could be part of an escape at some point
@@ -12664,6 +12687,7 @@
}
else
#endif /* Not isascii(); just use the hard-coded definition for it */
+ {
_invlist_union_maybe_complement_2nd(
posixes,
PL_ASCII,
@@ -12670,6 +12694,14 @@
cBOOL(namedclass % 2), /* Complement if odd
(NASCII) */
&posixes);
+
+ /* The code points 128-255 added above will be
+ * subtracted out below under /d, so the flag needs to
+ * be set */
+ if (namedclass == ANYOF_NASCII && DEPENDS_SEMANTICS) {
+ ANYOF_FLAGS(ret) |= ANYOF_NON_UTF8_LATIN1_ALL;
+ }
+ }
}
else { /* Garden variety class */
Modified: vendor/perl/dist/sv.c
===================================================================
--- vendor/perl/dist/sv.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/sv.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -6442,14 +6442,21 @@
assert(SvTYPE(stash) == SVt_PVHV);
if (HvNAME(stash)) {
CV* destructor = NULL;
+ assert (SvOOK(stash));
if (!SvOBJECT(stash)) destructor = (CV *)SvSTASH(stash);
- if (!destructor) {
+ if (!destructor || HvMROMETA(stash)->destroy_gen
+ != PL_sub_generation)
+ {
GV * const gv =
gv_fetchmeth_autoload(stash, "DESTROY", 7, 0);
if (gv) destructor = GvCV(gv);
if (!SvOBJECT(stash))
+ {
SvSTASH(stash) =
destructor ? (HV *)destructor : ((HV *)0)+1;
+ HvAUX(stash)->xhv_mro_meta->destroy_gen =
+ PL_sub_generation;
+ }
}
assert(!destructor || destructor == ((CV *)0)+1
|| SvTYPE(destructor) == SVt_PVCV);
Deleted: vendor/perl/dist/t/TestInit.pm
===================================================================
--- vendor/perl/dist/t/TestInit.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/TestInit.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,28 +0,0 @@
-# This is a replacement for the old BEGIN preamble which heads (or
-# should head) up every core test program to prepare it for running.
-# Now instead of:
-#
-# BEGIN {
-# chdir 't' if -d 't';
-# @INC = '../lib';
-# }
-#
-# t/TEST will use -MTestInit. You may "use TestInit" in the test
-# programs but it is not required.
-#
-# P.S. This documentation is not in POD format in order to avoid
-# problems when there are fundamental bugs in perl.
-
-package TestInit;
-
-$VERSION = 1.01;
-
-chdir 't' if -d 't';
- at INC = '../lib';
-
-# Don't interfere with the taintedness of %ENV, this could perturbate tests
-$ENV{PERL_CORE} = 1 unless ${^TAINT};
-
-$0 =~ s/\.dp$//; # for the test.deparse make target
-1;
-
Deleted: vendor/perl/dist/t/cmd/while.t
===================================================================
--- vendor/perl/dist/t/cmd/while.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/cmd/while.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,214 +0,0 @@
-#!./perl
-
-BEGIN {
- require "test.pl";
-}
-
-plan(25);
-
-my $tmpfile = tempfile();
-open (tmp,'>', $tmpfile) || die "Can't create Cmd_while.tmp.";
-print tmp "tvi925\n";
-print tmp "tvi920\n";
-print tmp "vt100\n";
-print tmp "Amiga\n";
-print tmp "paper\n";
-close tmp or die "Could not close: $!";
-
-# test "last" command
-
-open(fh, $tmpfile) || die "Can't open Cmd_while.tmp.";
-while (<fh>) {
- last if /vt100/;
-}
-ok(!eof && /vt100/);
-
-# test "next" command
-
-$bad = '';
-open(fh, $tmpfile) || die "Can't open Cmd_while.tmp.";
-while (<fh>) {
- next if /vt100/;
- $bad = 1 if /vt100/;
-}
-ok(eof && !/vt100/ && !$bad);
-
-# test "redo" command
-
-$bad = '';
-open(fh,$tmpfile) || die "Can't open Cmd_while.tmp.";
-while (<fh>) {
- if (s/vt100/VT100/g) {
- s/VT100/Vt100/g;
- redo;
- }
- $bad = 1 if /vt100/;
- $bad = 1 if /VT100/;
-}
-ok(eof && !$bad);
-
-# now do the same with a label and a continue block
-
-# test "last" command
-
-$badcont = '';
-open(fh,$tmpfile) || die "Can't open Cmd_while.tmp.";
-line: while (<fh>) {
- if (/vt100/) {last line;}
-} continue {
- $badcont = 1 if /vt100/;
-}
-ok(!eof && /vt100/);
-ok(!$badcont);
-
-# test "next" command
-
-$bad = '';
-$badcont = 1;
-open(fh,$tmpfile) || die "Can't open Cmd_while.tmp.";
-entry: while (<fh>) {
- next entry if /vt100/;
- $bad = 1 if /vt100/;
-} continue {
- $badcont = '' if /vt100/;
-}
-ok(eof && !/vt100/ && !$bad);
-ok(!$badcont);
-
-# test "redo" command
-
-$bad = '';
-$badcont = '';
-open(fh,$tmpfile) || die "Can't open Cmd_while.tmp.";
-loop: while (<fh>) {
- if (s/vt100/VT100/g) {
- s/VT100/Vt100/g;
- redo loop;
- }
- $bad = 1 if /vt100/;
- $bad = 1 if /VT100/;
-} continue {
- $badcont = 1 if /vt100/;
-}
-ok(eof && !$bad);
-ok(!$badcont);
-
-close(fh) || die "Can't close Cmd_while.tmp.";
-
-$i = 9;
-{
- $i++;
-}
-is($i, 10);
-
-# Check curpm is reset when jumping out of a scope
-$i = 0;
-'abc' =~ /b/;
-WHILE:
-while (1) {
- $i++;
- is($` . $& . $', "abc");
- { # Localize changes to $` and friends
- 'end' =~ /end/;
- redo WHILE if $i == 1;
- next WHILE if $i == 2;
- # 3 do a normal loop
- last WHILE if $i == 4;
- }
-}
-is($` . $& . $', "abc");
-
-# check that scope cleanup happens right when there's a continue block
-{
- my $var = 16;
- my (@got_var, @got_i);
- while (my $i = ++$var) {
- next if $i == 17;
- last if $i > 17;
- my $i = 0;
- }
- continue {
- ($got_var, $got_i) = ($var, $i);
- }
- is($got_var, 17);
- is($got_i, 17);
-}
-
-{
- my $got_l;
- local $l = 18;
- {
- local $l = 0
- }
- continue {
- $got_l = $l;
- }
- is($got_l, 18);
-}
-
-{
- my $got_l;
- local $l = 19;
- my $x = 0;
- while (!$x++) {
- local $l = 0
- }
- continue {
- $got_l = $l;
- }
- is($got_l, $l);
-}
-
-{
- my $ok = 1;
- $i = 20;
- while (1) {
- my $x;
- $ok = 0 if defined $x;
- if ($i == 21) {
- next;
- }
- last;
- }
- continue {
- ++$i;
- }
- ok($ok);
-}
-
-sub save_context { $_[0] = wantarray; $_[1] }
-
-{
- my $context = -1;
- my $p = sub {
- my $x = 1;
- while ($x--) {
- save_context($context, "foo");
- }
- };
- is(scalar($p->()), 0);
- is($context, undef, "last statement in while block has 'void' context");
-}
-
-{
- my $context = -1;
- my $p = sub {
- my $x = 1;
- {
- save_context($context, "foo");
- }
- };
- is(scalar($p->()), "foo");
- is($context, "", "last statement in block has 'scalar' context");
-}
-
-{
- # test scope is cleaned
- my $i = 0;
- my @a;
- while ($i++ < 2) {
- my $x;
- push @a, \$x;
- }
- ok($a[0] ne $a[1]);
-}
Deleted: vendor/perl/dist/t/comp/cpp.aux
===================================================================
--- vendor/perl/dist/t/comp/cpp.aux 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/comp/cpp.aux 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,35 +0,0 @@
-#!./perl -l
-
-# There's a bug in -P where the #! line is ignored. If this test
-# suddenly starts printing blank lines that bug has been fixed.
-
-print "1..3\n";
-
-#define MESS "ok 1\n"
-print MESS;
-
-#ifdef MESS
- print "ok 2\n";
-#else
- print "not ok 2\n";
-#endif
-
-open(TRY,">Comp_cpp.tmp") || die "Can't open temp perl file: $!";
-
-($prog = <<'END') =~ s/X//g;
-X$ok = "not ok 3\n";
-X#include "Comp_cpp.inc"
-X#ifdef OK
-X$ok = OK;
-X#endif
-Xprint $ok;
-END
-print TRY $prog;
-close TRY or die "Could not close Comp_cpp.tmp: $!";
-
-open(TRY,">Comp_cpp.inc") || (die "Can't open temp include file: $!");
-print TRY '#define OK "ok 3\n"' . "\n";
-close TRY or die "Could not close Comp_cpp.tmp: $!";
-
-print `$^X "-P" Comp_cpp.tmp`;
-unlink "Comp_cpp.tmp", "Comp_cpp.inc";
Deleted: vendor/perl/dist/t/comp/cpp.t
===================================================================
--- vendor/perl/dist/t/comp/cpp.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/comp/cpp.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,17 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- $ENV{PERL5LIB} = '../lib';
-}
-
-use Config;
-if ( $^O eq 'MacOS' ||
- ($Config{'cppstdin'} =~ /\bcppstdin\b/) &&
- ! -x $Config{'binexp'} . "/cppstdin" ) {
- print "1..0 # Skip: \$Config{cppstdin} unavailable\n";
- exit; # Cannot test till after install, alas.
-}
-
-system qq{$^X -"P" "comp/cpp.aux"};
Modified: vendor/perl/dist/t/comp/parser.t
===================================================================
--- vendor/perl/dist/t/comp/parser.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/comp/parser.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -3,7 +3,7 @@
# Checks if the parser behaves correctly in edge cases
# (including weird syntax errors)
-print "1..154\n";
+print "1..155\n";
sub failed {
my ($got, $expected, $name) = @_;
@@ -450,6 +450,14 @@
$pkg = 3;
is $pkg, 3, '[perl #114942] for my $foo()){} $foo';
+eval 'Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo'
+ .'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo'
+ .'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo'
+ .'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo'
+ .'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo'
+ .'ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo';
+like $@, "^Identifier too long at ", 'ident buffer overflow';
+
# Add new tests HERE (above this line)
# bug #74022: Loop on characters in \p{OtherIDContinue}
Deleted: vendor/perl/dist/t/comp/script.t
===================================================================
--- vendor/perl/dist/t/comp/script.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/comp/script.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,29 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't';
- @INC = '../lib';
- require './test.pl'; # for which_perl() etc
-}
-
-my $Perl = which_perl();
-
-my $filename = tempfile();
-
-print "1..3\n";
-
-$x = `$Perl -le "print 'ok';"`;
-
-if ($x eq "ok\n") {print "ok 1\n";} else {print "not ok 1\n";}
-
-open(try,">$filename") || (die "Can't open temp file.");
-print try 'print "ok\n";'; print try "\n";
-close try or die "Could not close: $!";
-
-$x = `$Perl $filename`;
-
-if ($x eq "ok\n") {print "ok 2\n";} else {print "not ok 2\n";}
-
-$x = `$Perl <$filename`;
-
-if ($x eq "ok\n") {print "ok 3\n";} else {print "not ok 3\n";}
Deleted: vendor/perl/dist/t/lib/Dummy.pm
===================================================================
--- vendor/perl/dist/t/lib/Dummy.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/lib/Dummy.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,4 +0,0 @@
-package Dummy;
-
-# Attempt to emulate a bug with finding the version in Exporter.
-$VERSION = '5.562';
Deleted: vendor/perl/dist/t/lib/HasSigDie.pm
===================================================================
--- vendor/perl/dist/t/lib/HasSigDie.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/lib/HasSigDie.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,6 +0,0 @@
-package HasSigDie;
-
-$SIG{__DIE__} = sub { "Die, Bart, Die!" };
-
-1;
-
Deleted: vendor/perl/dist/t/lib/NoExporter.pm
===================================================================
--- vendor/perl/dist/t/lib/NoExporter.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/lib/NoExporter.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,10 +0,0 @@
-package NoExporter;
-
-$VERSION = 1.02;
-sub import {
- shift;
- die "NoExporter exports nothing. You asked for: @_" if @_;
-}
-
-1;
-
Deleted: vendor/perl/dist/t/lib/TieIn.pm
===================================================================
--- vendor/perl/dist/t/lib/TieIn.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/lib/TieIn.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,23 +0,0 @@
-package TieIn;
-
-sub TIEHANDLE {
- bless( \(my $scalar), $_[0]);
-}
-
-sub write {
- my $self = shift;
- $$self .= join '', @_;
-}
-
-sub READLINE {
- my $self = shift;
- $$self =~ s/^(.*\n?)//;
- return $1;
-}
-
-sub EOF {
- my $self = shift;
- return !length $$self;
-}
-
-1;
Deleted: vendor/perl/dist/t/lib/TieOut.pm
===================================================================
--- vendor/perl/dist/t/lib/TieOut.pm 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/lib/TieOut.pm 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,28 +0,0 @@
-package TieOut;
-
-sub TIEHANDLE {
- my $scalar = '';
- bless( \$scalar, $_[0]);
-}
-
-sub PRINT {
- my $self = shift;
- $$self .= join('', @_);
-}
-
-sub PRINTF {
- my $self = shift;
- my $fmt = shift;
- $$self .= sprintf $fmt, @_;
-}
-
-sub FILENO {}
-
-sub read {
- my $self = shift;
- my $data = $$self;
- $$self = '';
- return $data;
-}
-
-1;
Deleted: vendor/perl/dist/t/lib/contains_bad_pod.xr
===================================================================
--- vendor/perl/dist/t/lib/contains_bad_pod.xr 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/lib/contains_bad_pod.xr 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,5 +0,0 @@
-=head foo
-
-bar baz.
-
-=cut
Deleted: vendor/perl/dist/t/lib/contains_pod.xr
===================================================================
--- vendor/perl/dist/t/lib/contains_pod.xr 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/lib/contains_pod.xr 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,5 +0,0 @@
-=head1 foo
-
-bar baz.
-
-=cut
Deleted: vendor/perl/dist/t/lib/filter-util.pl
===================================================================
--- vendor/perl/dist/t/lib/filter-util.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/lib/filter-util.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,56 +0,0 @@
-
-use strict ;
-use warnings;
-
-use vars qw( $Perl $Inc);
-
-sub readFile
-{
- my ($filename) = @_ ;
- my ($string) = '' ;
-
- open (F, "<$filename")
- or die "Cannot open $filename: $!\n" ;
- while (<F>)
- { $string .= $_ }
- close F ;
- $string ;
-}
-
-sub writeFile
-{
- my($filename, @strings) = @_ ;
- open (F, ">$filename")
- or die "Cannot open $filename: $!\n" ;
- binmode(F) if $filename =~ /bin$/i;
- foreach (@strings)
- { print F }
- close F or die "Could not close: $!" ;
-}
-
-sub ok
-{
- my($number, $result, $note) = @_ ;
-
- $note = "" if ! defined $note ;
- if ($note) {
- $note = "# $note" if $note !~ /^\s*#/ ;
- $note =~ s/^\s*/ / ;
- }
-
- print "not " if !$result ;
- print "ok ${number}${note}\n";
-}
-
-$Inc = '' ;
-foreach (@INC)
- { $Inc .= "\"-I$_\" " }
-$Inc = "-I::lib" if $^O eq 'MacOS';
-
-$Perl = '' ;
-$Perl = ($ENV{'FULLPERL'} or $^X or 'perl') ;
-
-$Perl = "$Perl -MMac::err=unix" if $^O eq 'MacOS';
-$Perl = "$Perl -w" ;
-
-1;
Deleted: vendor/perl/dist/t/lib/manifest.t
===================================================================
--- vendor/perl/dist/t/lib/manifest.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/lib/manifest.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,52 +0,0 @@
-#!./perl -w
-
-# Test the well-formed-ness of the MANIFEST file.
-
-BEGIN {
- chdir 't';
- @INC = '../lib';
-}
-
-use strict;
-use File::Spec;
-require './test.pl';
-
-plan('no_plan');
-
-my $manifest = File::Spec->catfile(File::Spec->updir(), 'MANIFEST');
-
-open my $m, '<', $manifest or die "Can't open '$manifest': $!";
-
-# Test that MANIFEST uses tabs - not spaces - after the name of the file.
-while (<$m>) {
- chomp;
- next unless /\s/; # Ignore lines without whitespace (i.e., filename only)
- my ($file, $separator) = /^(\S+)(\s+)/;
- isnt($file, undef, "Line $. doesn't start with a blank") or next;
- if ($separator !~ tr/\t//c) {
- # It's all tabs
- next;
- } elsif ($separator !~ tr/ //c) {
- # It's all spaces
- fail("Spaces in entry for $file");
- } elsif ($separator =~ tr/\t//) {
- fail("Mixed tabs and spaces in entry for $file");
- } else {
- fail("Odd whitespace in entry for $file");
- }
-}
-
-close $m or die $!;
-
-# Test that MANIFEST is properly sorted
-SKIP: {
- skip("'Porting/manisort' not found", 1) if (! -f '../Porting/manisort');
-
- my $result = runperl('progfile' => '../Porting/manisort',
- 'args' => [ '-c', '../MANIFEST' ],
- 'stderr' => 1);
-
- like($result, qr/is sorted properly/, 'MANIFEST sorted properly');
-}
-
-# EOF
Modified: vendor/perl/dist/t/mro/basic.t
===================================================================
--- vendor/perl/dist/t/mro/basic.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/mro/basic.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -3,7 +3,7 @@
use strict;
use warnings;
-BEGIN { require q(./test.pl); } plan(tests => 59);
+BEGIN { require q(./test.pl); } plan(tests => 60);
require mro;
@@ -370,3 +370,17 @@
}
is "il"->can("tomatoes"), "puree", 'local *ISA=[] unwinding';
}
+
+# Changes to UNIVERSAL::DESTROY should not leave stale DESTROY caches
+# (part of #114864)
+our $destroy_output;
+sub UNIVERSAL::DESTROY { $destroy_output = "old" }
+my $x = bless[];
+undef $x; # cache the DESTROY method
+undef *UNIVERSAL::DESTROY;
+*UNIVERSAL::DESTROY = sub { $destroy_output = "new" };
+$x = bless[];
+undef $x; # should use the new DESTROY
+is $destroy_output, "new",
+ 'Changes to UNIVERSAL::DESTROY invalidate DESTROY caches';
+undef *UNIVERSAL::DESTROY;
Deleted: vendor/perl/dist/t/op/arith.t
===================================================================
--- vendor/perl/dist/t/op/arith.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/arith.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,326 +0,0 @@
-#!./perl -w
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-print "1..145\n";
-
-sub try ($$) {
- print +($_[1] ? "ok" : "not ok"), " $_[0]\n";
-}
-sub tryeq ($$$) {
- if ($_[1] == $_[2]) {
- print "ok $_[0]\n";
- } else {
- print "not ok $_[0] # $_[1] != $_[2]\n";
- }
-}
-sub tryeq_sloppy ($$$) {
- if ($_[1] == $_[2]) {
- print "ok $_[0]\n";
- } else {
- my $error = abs ($_[1] - $_[2]) / $_[1];
- if ($error < 1e-9) {
- print "ok $_[0] # $_[1] is close to $_[2], \$^O eq $^O\n";
- } else {
- print "not ok $_[0] # $_[1] != $_[2]\n";
- }
- }
-}
-
-my $T = 1;
-tryeq $T++, 13 % 4, 1;
-tryeq $T++, -13 % 4, 3;
-tryeq $T++, 13 % -4, -3;
-tryeq $T++, -13 % -4, -1;
-
-# Give abs() a good work-out before using it in anger
-tryeq $T++, abs(0), 0;
-tryeq $T++, abs(1), 1;
-tryeq $T++, abs(-1), 1;
-tryeq $T++, abs(2147483647), 2147483647;
-tryeq $T++, abs(-2147483647), 2147483647;
-tryeq $T++, abs(4294967295), 4294967295;
-tryeq $T++, abs(-4294967295), 4294967295;
-tryeq $T++, abs(9223372036854775807), 9223372036854775807;
-tryeq $T++, abs(-9223372036854775807), 9223372036854775807;
-tryeq $T++, abs(1e50), 1e50; # Assume no change whatever; no slop needed
-tryeq $T++, abs(-1e50), 1e50; # Assume only sign bit flipped
-
-my $limit = 1e6;
-
-# Division (and modulo) of floating point numbers
-# seem to be rather sloppy in Cray.
-$limit = 1e8 if $^O eq 'unicos';
-
-try $T++, abs( 13e21 % 4e21 - 1e21) < $limit;
-try $T++, abs(-13e21 % 4e21 - 3e21) < $limit;
-try $T++, abs( 13e21 % -4e21 - -3e21) < $limit;
-try $T++, abs(-13e21 % -4e21 - -1e21) < $limit;
-
-# UVs should behave properly
-
-tryeq $T++, 4063328477 % 65535, 27407;
-tryeq $T++, 4063328477 % 4063328476, 1;
-tryeq $T++, 4063328477 % 2031664238, 1;
-tryeq $T++, 2031664238 % 4063328477, 2031664238;
-
-# These should trigger wrapping on 32 bit IVs and UVs
-
-tryeq $T++, 2147483647 + 0, 2147483647;
-
-# IV + IV promote to UV
-tryeq $T++, 2147483647 + 1, 2147483648;
-tryeq $T++, 2147483640 + 10, 2147483650;
-tryeq $T++, 2147483647 + 2147483647, 4294967294;
-# IV + UV promote to NV
-tryeq $T++, 2147483647 + 2147483649, 4294967296;
-# UV + IV promote to NV
-tryeq $T++, 4294967294 + 2, 4294967296;
-# UV + UV promote to NV
-tryeq $T++, 4294967295 + 4294967295, 8589934590;
-
-# UV + IV to IV
-tryeq $T++, 2147483648 + -1, 2147483647;
-tryeq $T++, 2147483650 + -10, 2147483640;
-# IV + UV to IV
-tryeq $T++, -1 + 2147483648, 2147483647;
-tryeq $T++, -10 + 4294967294, 4294967284;
-# IV + IV to NV
-tryeq $T++, -2147483648 + -2147483648, -4294967296;
-tryeq $T++, -2147483640 + -10, -2147483650;
-
-# Hmm. Don't forget the simple stuff
-tryeq $T++, 1 + 1, 2;
-tryeq $T++, 4 + -2, 2;
-tryeq $T++, -10 + 100, 90;
-tryeq $T++, -7 + -9, -16;
-tryeq $T++, -63 + +2, -61;
-tryeq $T++, 4 + -1, 3;
-tryeq $T++, -1 + 1, 0;
-tryeq $T++, +29 + -29, 0;
-tryeq $T++, -1 + 4, 3;
-tryeq $T++, +4 + -17, -13;
-
-# subtraction
-tryeq $T++, 3 - 1, 2;
-tryeq $T++, 3 - 15, -12;
-tryeq $T++, 3 - -7, 10;
-tryeq $T++, -156 - 5, -161;
-tryeq $T++, -156 - -5, -151;
-tryeq $T++, -5 - -12, 7;
-tryeq $T++, -3 - -3, 0;
-tryeq $T++, 15 - 15, 0;
-
-tryeq $T++, 2147483647 - 0, 2147483647;
-tryeq $T++, 2147483648 - 0, 2147483648;
-tryeq $T++, -2147483648 - 0, -2147483648;
-
-tryeq $T++, 0 - -2147483647, 2147483647;
-tryeq $T++, -1 - -2147483648, 2147483647;
-tryeq $T++, 2 - -2147483648, 2147483650;
-
-tryeq $T++, 4294967294 - 3, 4294967291;
-tryeq $T++, -2147483648 - -1, -2147483647;
-
-# IV - IV promote to UV
-tryeq $T++, 2147483647 - -1, 2147483648;
-tryeq $T++, 2147483647 - -2147483648, 4294967295;
-# UV - IV promote to NV
-tryeq $T++, 4294967294 - -3, 4294967297;
-# IV - IV promote to NV
-tryeq $T++, -2147483648 - +1, -2147483649;
-# UV - UV promote to IV
-tryeq $T++, 2147483648 - 2147483650, -2;
-# IV - UV promote to IV
-tryeq $T++, 2000000000 - 4000000000, -2000000000;
-
-# No warnings should appear;
-my $a;
-$a += 1;
-tryeq $T++, $a, 1;
-undef $a;
-$a += -1;
-tryeq $T++, $a, -1;
-undef $a;
-$a += 4294967290;
-tryeq $T++, $a, 4294967290;
-undef $a;
-$a += -4294967290;
-tryeq $T++, $a, -4294967290;
-undef $a;
-$a += 4294967297;
-tryeq $T++, $a, 4294967297;
-undef $a;
-$a += -4294967297;
-tryeq $T++, $a, -4294967297;
-
-my $s;
-$s -= 1;
-tryeq $T++, $s, -1;
-undef $s;
-$s -= -1;
-tryeq $T++, $s, +1;
-undef $s;
-$s -= -4294967290;
-tryeq $T++, $s, +4294967290;
-undef $s;
-$s -= 4294967290;
-tryeq $T++, $s, -4294967290;
-undef $s;
-$s -= 4294967297;
-tryeq $T++, $s, -4294967297;
-undef $s;
-$s -= -4294967297;
-tryeq $T++, $s, +4294967297;
-
-# Multiplication
-
-tryeq $T++, 1 * 3, 3;
-tryeq $T++, -2 * 3, -6;
-tryeq $T++, 3 * -3, -9;
-tryeq $T++, -4 * -3, 12;
-
-# check with 0xFFFF and 0xFFFF
-tryeq $T++, 65535 * 65535, 4294836225;
-tryeq $T++, 65535 * -65535, -4294836225;
-tryeq $T++, -65535 * 65535, -4294836225;
-tryeq $T++, -65535 * -65535, 4294836225;
-
-# check with 0xFFFF and 0x10001
-tryeq $T++, 65535 * 65537, 4294967295;
-tryeq $T++, 65535 * -65537, -4294967295;
-tryeq $T++, -65535 * 65537, -4294967295;
-tryeq $T++, -65535 * -65537, 4294967295;
-
-# check with 0x10001 and 0xFFFF
-tryeq $T++, 65537 * 65535, 4294967295;
-tryeq $T++, 65537 * -65535, -4294967295;
-tryeq $T++, -65537 * 65535, -4294967295;
-tryeq $T++, -65537 * -65535, 4294967295;
-
-# These should all be dones as NVs
-tryeq $T++, 65537 * 65537, 4295098369;
-tryeq $T++, 65537 * -65537, -4295098369;
-tryeq $T++, -65537 * 65537, -4295098369;
-tryeq $T++, -65537 * -65537, 4295098369;
-
-# will overflow an IV (in 32-bit)
-tryeq $T++, 46340 * 46342, 0x80001218;
-tryeq $T++, 46340 * -46342, -0x80001218;
-tryeq $T++, -46340 * 46342, -0x80001218;
-tryeq $T++, -46340 * -46342, 0x80001218;
-
-tryeq $T++, 46342 * 46340, 0x80001218;
-tryeq $T++, 46342 * -46340, -0x80001218;
-tryeq $T++, -46342 * 46340, -0x80001218;
-tryeq $T++, -46342 * -46340, 0x80001218;
-
-# will overflow a positive IV (in 32-bit)
-tryeq $T++, 65536 * 32768, 0x80000000;
-tryeq $T++, 65536 * -32768, -0x80000000;
-tryeq $T++, -65536 * 32768, -0x80000000;
-tryeq $T++, -65536 * -32768, 0x80000000;
-
-tryeq $T++, 32768 * 65536, 0x80000000;
-tryeq $T++, 32768 * -65536, -0x80000000;
-tryeq $T++, -32768 * 65536, -0x80000000;
-tryeq $T++, -32768 * -65536, 0x80000000;
-
-# 2147483647 is prime. bah.
-
-tryeq $T++, 46339 * 46341, 0x7ffea80f;
-tryeq $T++, 46339 * -46341, -0x7ffea80f;
-tryeq $T++, -46339 * 46341, -0x7ffea80f;
-tryeq $T++, -46339 * -46341, 0x7ffea80f;
-
-# leading space should be ignored
-
-tryeq $T++, 1 + " 1", 2;
-tryeq $T++, 3 + " -1", 2;
-tryeq $T++, 1.2, " 1.2";
-tryeq $T++, -1.2, " -1.2";
-
-# divide
-
-tryeq $T++, 28/14, 2;
-tryeq $T++, 28/-7, -4;
-tryeq $T++, -28/4, -7;
-tryeq $T++, -28/-2, 14;
-
-tryeq $T++, 0x80000000/1, 0x80000000;
-tryeq $T++, 0x80000000/-1, -0x80000000;
-tryeq $T++, -0x80000000/1, -0x80000000;
-tryeq $T++, -0x80000000/-1, 0x80000000;
-
-# The example for sloppy divide, rigged to avoid the peephole optimiser.
-tryeq_sloppy $T++, "20." / "5.", 4;
-
-tryeq $T++, 2.5 / 2, 1.25;
-tryeq $T++, 3.5 / -2, -1.75;
-tryeq $T++, -4.5 / 2, -2.25;
-tryeq $T++, -5.5 / -2, 2.75;
-
-# Bluuurg if your floating point can't accurately cope with powers of 2
-# [I suspect this is parsing string->float problems, not actual arith]
-tryeq_sloppy $T++, 18446744073709551616/1, 18446744073709551616; # Bluuurg
-tryeq_sloppy $T++, 18446744073709551616/2, 9223372036854775808;
-tryeq_sloppy $T++, 18446744073709551616/4294967296, 4294967296;
-tryeq_sloppy $T++, 18446744073709551616/9223372036854775808, 2;
-
-{
- # The peephole optimiser is wrong to think that it can substitute intops
- # in place of regular ops, because i_multiply can overflow.
- # Bug reported by "Sisyphus" <kalinabears at hdc.com.au>
- my $n = 1127;
-
- my $float = ($n % 1000) * 167772160.0;
- tryeq_sloppy $T++, $float, 21307064320;
-
- # On a 32 bit machine, if the i_multiply op is used, you will probably get
- # -167772160. It's actually undefined behaviour, so anything may happen.
- my $int = ($n % 1000) * 167772160;
- tryeq $T++, $int, 21307064320;
-
- my $t = time;
- my $t1000 = time() * 1000;
- try $T++, abs($t1000 -1000 * $t) <= 2000;
-}
-
-my $vms_no_ieee;
-if ($^O eq 'VMS') {
- use vars '%Config';
- eval {require Config; import Config};
- $vms_no_ieee = 1 unless defined($Config{useieee});
-}
-
-if ($^O eq 'vos') {
- print "not ok ", $T++, " # TODO VOS raises SIGFPE instead of producing infinity.\n";
-}
-elsif ($vms_no_ieee) {
- print $T++, " # SKIP -- the IEEE infinity model is unavailable in this configuration.\n"
-}
-elsif ($^O eq 'ultrix') {
- print "not ok ", $T++, " # TODO Ultrix enters deep nirvana instead of producing infinity.\n";
-}
-else {
- # The computation of $v should overflow and produce "infinity"
- # on any system whose max exponent is less than 10**1506.
- # The exact string used to represent infinity varies by OS,
- # so we don't test for it; all we care is that we don't die.
- #
- # Perl considers it to be an error if SIGFPE is raised.
- # Chances are the interpreter will die, since it doesn't set
- # up a handler for SIGFPE. That's why this test is last; to
- # minimize the number of test failures. --PG
-
- my $n = 5000;
- my $v = 2;
- while (--$n)
- {
- $v *= 2;
- }
- print "ok ", $T++, "\n";
-}
Deleted: vendor/perl/dist/t/op/array_base.aux
===================================================================
--- vendor/perl/dist/t/op/array_base.aux 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/array_base.aux 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,5 +0,0 @@
-our($ra1, $ri1, $rf1, $rfe1);
-$ra1 = $[;
-BEGIN { $ri1 = $^H; $rf1 = $^H{foo}; $rfe1 = exists($^H{foo}); }
-
-1;
Deleted: vendor/perl/dist/t/op/cmp.t
===================================================================
--- vendor/perl/dist/t/op/cmp.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/cmp.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,318 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-# 2s complement assumption. Won't break test, just makes the internals of
-# the SVs less interesting if were not on 2s complement system.
-my $uv_max = ~0;
-my $uv_maxm1 = ~0 ^ 1;
-my $uv_big = $uv_max;
-$uv_big = ($uv_big - 20000) | 1;
-my ($iv0, $iv1, $ivm1, $iv_min, $iv_max, $iv_big, $iv_small);
-$iv_max = $uv_max; # Do copy, *then* divide
-$iv_max /= 2;
-$iv_min = $iv_max;
-{
- use integer;
- $iv0 = 2 - 2;
- $iv1 = 3 - 2;
- $ivm1 = 2 - 3;
- $iv_max -= 1;
- $iv_min += 0;
- $iv_big = $iv_max - 3;
- $iv_small = $iv_min + 2;
-}
-my $uv_bigi = $iv_big;
-$uv_bigi |= 0x0;
-
-my @array = qw(perl rules);
-
-my @raw, @upgraded, @utf8;
-foreach ("\x{1F4A9}", chr(163), 'N') {
- push @raw, $_;
- my $temp = $_ . chr 256;
- chop $temp;
- push @upgraded, $temp;
- my $utf8 = $_;
- next if utf8::upgrade($utf8) == length $_;
- utf8::encode($utf8);
- push @utf8, $utf8;
-}
-
-# Seems one needs to perform the maths on 'Inf' to get the NV correctly primed.
- at FOO = ('s', 'N/A', 'a', 'NaN', -1, undef, 0, 1, 3.14, 1e37, 0.632120558, -.5,
- 'Inf'+1, '-Inf'-1, 0x0, 0x1, 0x5, 0xFFFFFFFF, $uv_max, $uv_maxm1,
- $uv_big, $uv_bigi, $iv0, $iv1, $ivm1, $iv_min, $iv_max, $iv_big,
- $iv_small, \$array[0], \$array[0], \$array[1], \$^X, @raw, @upgraded,
- @utf8);
-
-$expect = 7 * ($#FOO+2) * ($#FOO+1) + 6 * @raw + 6 * @utf8;
-print "1..$expect\n";
-
-my $bad_NaN = 0;
-
-{
- # gcc's -ffast-math option may stop NaNs working correctly
- use Config;
- my $ccflags = $Config{ccflags} // '';
- $bad_NaN = 1 if $ccflags =~ /-ffast-math\b/;
-}
-
-sub nok ($$$$$$$$) {
- my ($test, $left, $threeway, $right, $result, $i, $j, $boolean) = @_;
- $result = defined $result ? "'$result'" : 'undef';
- if ($bad_NaN && ($left eq 'NaN' || $right eq 'NaN')) {
- print "ok $test # skipping failed NaN test under -ffast-math\n";
- }
- else {
- print "not ok $test # ($left $threeway $right) gives: $result \$i=$i \$j=$j, $boolean disagrees\n";
- }
-}
-
-my $ok = 0;
-for my $i (0..$#FOO) {
- for my $j ($i..$#FOO) {
- $ok++;
- # Comparison routines may convert these internally, which would change
- # what is used to determine the comparison on later runs. Hence copy
- my ($i1, $i2, $i3, $i4, $i5, $i6, $i7, $i8, $i9, $i10,
- $i11, $i12, $i13, $i14, $i15, $i16, $i17) =
- ($FOO[$i], $FOO[$i], $FOO[$i], $FOO[$i], $FOO[$i], $FOO[$i],
- $FOO[$i], $FOO[$i], $FOO[$i], $FOO[$i], $FOO[$i], $FOO[$i],
- $FOO[$i], $FOO[$i], $FOO[$i], $FOO[$i], $FOO[$i]);
- my ($j1, $j2, $j3, $j4, $j5, $j6, $j7, $j8, $j9, $j10,
- $j11, $j12, $j13, $j14, $j15, $j16, $j17) =
- ($FOO[$j], $FOO[$j], $FOO[$j], $FOO[$j], $FOO[$j], $FOO[$j],
- $FOO[$j], $FOO[$j], $FOO[$j], $FOO[$j], $FOO[$j], $FOO[$j],
- $FOO[$j], $FOO[$j], $FOO[$j], $FOO[$j], $FOO[$j]);
- my $cmp = $i1 <=> $j1;
- if (!defined($cmp) ? !($i2 < $j2)
- : ($cmp == -1 && $i2 < $j2 ||
- $cmp == 0 && !($i2 < $j2) ||
- $cmp == 1 && !($i2 < $j2)))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, '<=>', $j3, $cmp, $i, $j, '<');
- }
- $ok++;
- if (!defined($cmp) ? !($i4 == $j4)
- : ($cmp == -1 && !($i4 == $j4) ||
- $cmp == 0 && $i4 == $j4 ||
- $cmp == 1 && !($i4 == $j4)))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, '<=>', $j3, $cmp, $i, $j, '==');
- }
- $ok++;
- if (!defined($cmp) ? !($i5 > $j5)
- : ($cmp == -1 && !($i5 > $j5) ||
- $cmp == 0 && !($i5 > $j5) ||
- $cmp == 1 && ($i5 > $j5)))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, '<=>', $j3, $cmp, $i, $j, '>');
- }
- $ok++;
- if (!defined($cmp) ? !($i6 >= $j6)
- : ($cmp == -1 && !($i6 >= $j6) ||
- $cmp == 0 && $i6 >= $j6 ||
- $cmp == 1 && $i6 >= $j6))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, '<=>', $j3, $cmp, $i, $j, '>=');
- }
- $ok++;
- # OK, so the docs are wrong it seems. NaN != NaN
- if (!defined($cmp) ? ($i7 != $j7)
- : ($cmp == -1 && $i7 != $j7 ||
- $cmp == 0 && !($i7 != $j7) ||
- $cmp == 1 && $i7 != $j7))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, '<=>', $j3, $cmp, $i, $j, '!=');
- }
- $ok++;
- if (!defined($cmp) ? !($i8 <= $j8)
- : ($cmp == -1 && $i8 <= $j8 ||
- $cmp == 0 && $i8 <= $j8 ||
- $cmp == 1 && !($i8 <= $j8)))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, '<=>', $j3, $cmp, $i, $j, '<=');
- }
- $ok++;
- my $pmc = $j16 <=> $i16; # cmp it in reverse
- # Should give -ve of other answer, or undef for NaNs
- # a + -a should be zero. not zero is truth. which avoids using ==
- if (defined($cmp) ? !($cmp + $pmc) : !defined $pmc)
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, '<=>', $j3, $cmp, $i, $j, '<=> transposed');
- }
-
-
- # String comparisons
- $ok++;
- $cmp = $i9 cmp $j9;
- if ($cmp == -1 && $i10 lt $j10 ||
- $cmp == 0 && !($i10 lt $j10) ||
- $cmp == 1 && !($i10 lt $j10))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, 'cmp', $j3, $cmp, $i, $j, 'lt');
- }
- $ok++;
- if ($cmp == -1 && !($i11 eq $j11) ||
- $cmp == 0 && ($i11 eq $j11) ||
- $cmp == 1 && !($i11 eq $j11))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, 'cmp', $j3, $cmp, $i, $j, 'eq');
- }
- $ok++;
- if ($cmp == -1 && !($i12 gt $j12) ||
- $cmp == 0 && !($i12 gt $j12) ||
- $cmp == 1 && ($i12 gt $j12))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, 'cmp', $j3, $cmp, $i, $j, 'gt');
- }
- $ok++;
- if ($cmp == -1 && $i13 le $j13 ||
- $cmp == 0 && ($i13 le $j13) ||
- $cmp == 1 && !($i13 le $j13))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, 'cmp', $j3, $cmp, $i, $j, 'le');
- }
- $ok++;
- if ($cmp == -1 && ($i14 ne $j14) ||
- $cmp == 0 && !($i14 ne $j14) ||
- $cmp == 1 && ($i14 ne $j14))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, 'cmp', $j3, $cmp, $i, $j, 'ne');
- }
- $ok++;
- if ($cmp == -1 && !($i15 ge $j15) ||
- $cmp == 0 && ($i15 ge $j15) ||
- $cmp == 1 && ($i15 ge $j15))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, 'cmp', $j3, $cmp, $i, $j, 'ge');
- }
- $ok++;
- $pmc = $j17 cmp $i17; # cmp it in reverse
- # Should give -ve of other answer
- # a + -a should be zero. not zero is truth. which avoids using ==
- if (!($cmp + $pmc))
- {
- print "ok $ok\n";
- }
- else {
- nok ($ok, $i3, 'cmp', $j3, $cmp, $i, $j, 'cmp transposed');
- }
- }
-}
-
-# We know the answers for these. We can rely on the consistency checks above
-# to test the other string comparisons.
-
-while (my ($i, $v) = each @raw) {
- # Copy, to avoid any inadvertent conversion
- my ($raw, $cooked, $not);
- $raw = $v;
- $cooked = $upgraded[$i];
- $not = $raw eq $cooked ? '' : 'not ';
- printf "%sok %d # eq, chr %d\n", $not, ++$ok, ord $raw;
-
- $raw = $v;
- $cooked = $upgraded[$i];
- $not = $raw ne $cooked ? 'not ' : '';
- printf "%sok %d # ne, chr %d\n", $not, ++$ok, ord $raw;
-
- $raw = $v;
- $cooked = $upgraded[$i];
- $not = (($raw cmp $cooked) == 0) ? '' : 'not ';
- printf "%sok %d # cmp, chr %d\n", $not, ++$ok, ord $raw;
-
- # And now, transposed.
- $raw = $v;
- $cooked = $upgraded[$i];
- $not = $cooked eq $raw ? '' : 'not ';
- printf "%sok %d # eq, chr %d\n", $not, ++$ok, ord $raw;
-
- $raw = $v;
- $cooked = $upgraded[$i];
- $not = $cooked ne $raw ? 'not ' : '';
- printf "%sok %d # ne, chr %d\n", $not, ++$ok, ord $raw;
-
- $raw = $v;
- $cooked = $upgraded[$i];
- $not = (($cooked cmp $raw) == 0) ? '' : 'not ';
- printf "%sok %d # cmp, chr %d\n", $not, ++$ok, ord $raw;
-}
-
-while (my ($i, $v) = each @utf8) {
- # Copy, to avoid any inadvertent conversion
- my ($raw, $cooked, $not);
- $raw = $raw[$i];
- $cooked = $v;
- $not = $raw eq $cooked ? 'not ' : '';
- printf "%sok %d # eq vs octets, chr %d\n", $not, ++$ok, ord $raw;
-
- $raw = $raw[$i];
- $cooked = $v;
- $not = $raw ne $cooked ? '' : 'not ';
- printf "%sok %d # ne vs octets, chr %d\n", $not, ++$ok, ord $raw;
-
- $raw = $raw[$i];
- $cooked = $v;
- $not = (($raw cmp $cooked) == 0) ? 'not ' : '';
- printf "%sok %d # cmp vs octects, chr %d\n", $not, ++$ok, ord $raw;
-
- # And now, transposed.
- $raw = $raw[$i];
- $cooked = $v;
- $not = $cooked eq $raw ? 'not ' : '';
- printf "%sok %d # eq vs octets, chr %d\n", $not, ++$ok, ord $raw;
-
- $raw = $raw[$i];
- $cooked = $v;
- $not = $cooked ne $raw? '' : 'not ';
- printf "%sok %d # ne vs octets, chr %d\n", $not, ++$ok, ord $raw;
-
- $raw = $raw[$i];
- $cooked = $v;
- $not = (($cooked cmp $raw) == 0) ? 'not ' : '';
- printf "%sok %d # cmp vs octects, chr %d\n", $not, ++$ok, ord $raw;
-}
Deleted: vendor/perl/dist/t/op/concat.t
===================================================================
--- vendor/perl/dist/t/op/concat.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/concat.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,161 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-# This ok() function is specially written to avoid any concatenation.
-my $test = 1;
-sub ok {
- my($ok, $name) = @_;
-
- printf "%sok %d - %s\n", ($ok ? "" : "not "), $test, $name;
-
- printf "# Failed test at line %d\n", (caller)[2] unless $ok;
-
- $test++;
- return $ok;
-}
-
-print "1..30\n";
-
-($a, $b, $c) = qw(foo bar);
-
-ok("$a" eq "foo", "verifying assign");
-ok("$a$b" eq "foobar", "basic concatenation");
-ok("$c$a$c" eq "foo", "concatenate undef, fore and aft");
-
-# Okay, so that wasn't very challenging. Let's go Unicode.
-
-{
- # bug id 20000819.004
-
- $_ = $dx = "\x{10f2}";
- s/($dx)/$dx$1/;
- {
- ok($_ eq "$dx$dx","bug id 20000819.004, back");
- }
-
- $_ = $dx = "\x{10f2}";
- s/($dx)/$1$dx/;
- {
- ok($_ eq "$dx$dx","bug id 20000819.004, front");
- }
-
- $dx = "\x{10f2}";
- $_ = "\x{10f2}\x{10f2}";
- s/($dx)($dx)/$1$2/;
- {
- ok($_ eq "$dx$dx","bug id 20000819.004, front and back");
- }
-}
-
-{
- # bug id 20000901.092
- # test that undef left and right of utf8 results in a valid string
-
- my $a;
- $a .= "\x{1ff}";
- ok($a eq "\x{1ff}", "bug id 20000901.092, undef left");
- $a .= undef;
- ok($a eq "\x{1ff}", "bug id 20000901.092, undef right");
-}
-
-{
- # ID 20001020.006
-
- "x" =~ /(.)/; # unset $2
-
- # Without the fix this 5.7.0 would croak:
- # Modification of a read-only value attempted at ...
- eval {"$2\x{1234}"};
- ok(!$@, "bug id 20001020.006, left");
-
- # For symmetry with the above.
- eval {"\x{1234}$2"};
- ok(!$@, "bug id 20001020.006, right");
-
- *pi = \undef;
- # This bug existed earlier than the $2 bug, but is fixed with the same
- # patch. Without the fix this 5.7.0 would also croak:
- # Modification of a read-only value attempted at ...
- eval{"$pi\x{1234}"};
- ok(!$@, "bug id 20001020.006, constant left");
-
- # For symmetry with the above.
- eval{"\x{1234}$pi"};
- ok(!$@, "bug id 20001020.006, constant right");
-}
-
-sub beq { use bytes; $_[0] eq $_[1]; }
-
-{
- # concat should not upgrade its arguments.
- my($l, $r, $c);
-
- ($l, $r, $c) = ("\x{101}", "\x{fe}", "\x{101}\x{fe}");
- ok(beq($l.$r, $c), "concat utf8 and byte");
- ok(beq($l, "\x{101}"), "right not changed after concat u+b");
- ok(beq($r, "\x{fe}"), "left not changed after concat u+b");
-
- ($l, $r, $c) = ("\x{fe}", "\x{101}", "\x{fe}\x{101}");
- ok(beq($l.$r, $c), "concat byte and utf8");
- ok(beq($l, "\x{fe}"), "right not changed after concat b+u");
- ok(beq($r, "\x{101}"), "left not changed after concat b+u");
-}
-
-{
- my $a; ($a .= 5) . 6;
- ok($a == 5, '($a .= 5) . 6 - present since 5.000');
-}
-
-{
- # [perl #24508] optree construction bug
- sub strfoo { "x" }
- my ($x, $y);
- $y = ($x = '' . strfoo()) . "y";
- ok( "$x,$y" eq "x,xy", 'figures out correct target' );
-}
-
-{
- # [perl #26905] "use bytes" doesn't apply byte semantics to concatenation
-
- my $p = "\xB6"; # PILCROW SIGN (ASCII/EBCDIC), 2bytes in UTF-X
- my $u = "\x{100}";
- my $b = pack 'a*', "\x{100}";
- my $pu = "\xB6\x{100}";
- my $up = "\x{100}\xB6";
- my $x1 = $p;
- my $y1 = $u;
-
- use bytes;
- ok(beq($p.$u, $p.$b), "perl #26905, left eq bytes");
- ok(beq($u.$p, $b.$p), "perl #26905, right eq bytes");
- ok(!beq($p.$u, $pu), "perl #26905, left ne unicode");
- ok(!beq($u.$p, $up), "perl #26905, right ne unicode");
-
- $x1 .= $u;
- $x2 = $p . $u;
- $y1 .= $p;
- $y2 = $u . $p;
-
- no bytes;
- ok(beq($x1, $x2), "perl #26905, left, .= vs = . in bytes");
- ok(beq($y1, $y2), "perl #26905, right, .= vs = . in bytes");
- ok(($x1 eq $x2), "perl #26905, left, .= vs = . in chars");
- ok(($y1 eq $y2), "perl #26905, right, .= vs = . in chars");
-}
-
-{
- # Concatenation needs to preserve UTF8ness of left oper.
- my $x = eval"qr/\x{fff}/";
- ok( ord chop($x .= "\303\277") == 191, "UTF8ness preserved" );
-}
-
-{
- my $x;
- $x = "a" . "b";
- $x .= "-append-";
- ok($x eq "ab-append-", "Appending to something initialized using constant folding");
-}
Deleted: vendor/perl/dist/t/op/lc_user.t
===================================================================
--- vendor/perl/dist/t/op/lc_user.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/lc_user.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,33 +0,0 @@
-BEGIN {
- chdir 't';
- @INC = '../lib';
- require './test.pl';
-}
-
-plan tests => 5;
-
-%utf8::ToSpecUpper = (
-"s" => "SS", # Make sure can handle weird ASCII translations
-);
-
-sub ToUpper {
- return <<END;
-0061 0063 0041
-END
-}
-
-is("\Ufoo\x{101}", "foo\x{101}", "no changes on 'foo'");
-is("\Ubar\x{101}", "BAr\x{101}", "changing 'ab' on 'bar' ");
-my $s = 's';
-utf8::upgrade $s;
-is(uc($s), "SS", "Verify uc('s') is 'SS' with our weird xlation, and utf8");
-
-sub ToLower {
- return <<END;
-0041 0061
-END
-}
-
-is("\LFOO\x{100}", "FOO\x{100}", "no changes on 'FOO'");
-is("\LBAR\x{100}", "BaR\x{100}", "changing 'A' on 'BAR' ");
-
Deleted: vendor/perl/dist/t/op/magic_phase.t
===================================================================
--- vendor/perl/dist/t/op/magic_phase.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/magic_phase.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,48 +0,0 @@
-#!./perl
-
-use strict;
-use warnings;
-
-# Test ${^GLOBAL_PHASE}
-#
-# Test::More, test.pl, etc assert plans in END, which happens before global
-# destruction, so we don't want to use those here.
-
-BEGIN { print "1..7\n" }
-
-sub ok ($$) {
- print "not " if !$_[0];
- print "ok";
- print " - $_[1]" if defined $_[1];
- print "\n";
-}
-
-BEGIN {
- ok ${^GLOBAL_PHASE} eq 'START', 'START';
-}
-
-CHECK {
- ok ${^GLOBAL_PHASE} eq 'CHECK', 'CHECK';
-}
-
-INIT {
- ok ${^GLOBAL_PHASE} eq 'INIT', 'INIT';
-}
-
-ok ${^GLOBAL_PHASE} eq 'RUN', 'RUN';
-
-sub Moo::DESTROY {
- ok ${^GLOBAL_PHASE} eq 'RUN', 'DESTROY is run-time too, usually';
-}
-
-my $tiger = bless {}, Moo::;
-
-sub Kooh::DESTROY {
- ok ${^GLOBAL_PHASE} eq 'DESTRUCT', 'DESTRUCT';
-}
-
-our $affe = bless {}, Kooh::;
-
-END {
- ok ${^GLOBAL_PHASE} eq 'END', 'END';
-}
Modified: vendor/perl/dist/t/op/method.t
===================================================================
--- vendor/perl/dist/t/op/method.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/method.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -13,7 +13,7 @@
use strict;
no warnings 'once';
-plan(tests => 141);
+plan(tests => 142);
@A::ISA = 'B';
@B::ISA = 'C';
@@ -268,6 +268,27 @@
'SUPER inside moved package respects method changes';
}
+package foo120694 {
+ BEGIN { our @ISA = qw(bar120694) }
+
+ sub AUTOLOAD {
+ my $self = shift;
+ local our $recursive = $recursive;
+ return "recursive" if $recursive++;
+ return if our $AUTOLOAD eq 'DESTROY';
+ $AUTOLOAD = "SUPER:" . substr $AUTOLOAD, rindex($AUTOLOAD, ':');
+ return $self->$AUTOLOAD(@_);
+ }
+}
+package bar120694 {
+ sub AUTOLOAD {
+ return "xyzzy";
+ }
+}
+is bless( [] => "foo120694" )->plugh, 'xyzzy',
+ '->SUPER::method autoloading uses parent of current pkg';
+
+
# failed method call or UNIVERSAL::can() should not autovivify packages
is( $::{"Foo::"} || "none", "none"); # sanity check 1
is( $::{"Foo::"} || "none", "none"); # sanity check 2
Modified: vendor/perl/dist/t/op/negate.t
===================================================================
--- vendor/perl/dist/t/op/negate.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/negate.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -6,7 +6,7 @@
require './test.pl';
}
-plan tests => 45;
+plan tests => 46;
# Some of these will cause warnings if left on. Here we're checking the
# functionality, not the warnings.
@@ -102,3 +102,10 @@
is(-$au, -$a, 'utf8 flag makes no difference for string negation');
is -"\x{100}", 0, '-(non-ASCII) is equivalent to -(punct)';
}
+
+# [perl #120288] use integer should not stop barewords from being quoted
+{
+ use strict;
+ use integer;
+ is eval "return -a"||$@, "-a", '-bareword under strict+integer';
+}
Deleted: vendor/perl/dist/t/op/pat.t
===================================================================
--- vendor/perl/dist/t/op/pat.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/pat.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,4373 +0,0 @@
-#!./perl
-#
-# This is a home for regular expression tests that don't fit into
-# the format supported by op/regexp.t. If you want to add a test
-# that does fit that format, add it to op/re_tests, not here.
-
-use strict;
-use warnings;
-use 5.010;
-
-
-sub run_tests;
-
-$| = 1;
-
-my $EXPECTED_TESTS = 4065; # Update this when adding/deleting tests.
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-our $TODO;
-our $Message = "Noname test";
-our $Error;
-our $DiePattern;
-our $WarnPattern;
-our $BugId;
-our $PatchId;
-our $running_as_thread;
-
-my $ordA = ord ('A'); # This defines ASCII/UTF-8 vs EBCDIC/UTF-EBCDIC
-# This defined the platform.
-my $IS_ASCII = $ordA == 65;
-my $IS_EBCDIC = $ordA == 193;
-
-use vars '%Config';
-eval 'use Config'; # Defaults assumed if this fails
-
-my $test = 0;
-
-print "1..$EXPECTED_TESTS\n";
-
-run_tests unless caller ();
-
-END {
-}
-
-sub pretty {
- my ($mess) = @_;
- $mess =~ s/\n/\\n/g;
- $mess =~ s/\r/\\r/g;
- $mess =~ s/\t/\\t/g;
- $mess =~ s/([\00-\37\177])/sprintf '\%03o', ord $1/eg;
- $mess =~ s/#/\\#/g;
- $mess;
-}
-
-sub safe_globals {
- defined($_) and s/#/\\#/g for $BugId, $PatchId, $TODO;
-}
-
-sub _ok {
- my ($ok, $mess, $error) = @_;
- safe_globals();
- $mess = pretty ($mess // $Message);
- $mess .= "; Bug $BugId" if defined $BugId;
- $mess .= "; Patch $PatchId" if defined $PatchId;
- $mess .= " # TODO $TODO" if defined $TODO;
-
- my $line_nr = (caller(1)) [2];
-
- printf "%sok %d - %s\n",
- ($ok ? "" : "not "),
- ++ $test,
- "$mess\tLine $line_nr";
-
- unless ($ok) {
- print "# Failed test at line $line_nr\n" unless defined $TODO;
- if ($error //= $Error) {
- no warnings 'utf8';
- chomp $error;
- $error = join "\n#", map {pretty $_} split /\n\h*#/ => $error;
- $error = "# $error" unless $error =~ /^\h*#/;
- print $error, "\n";
- }
- }
-
- return $ok;
-}
-
-# Force scalar context on the pattern match
-sub ok ($;$$) {_ok $_ [0], $_ [1], $_ [2]}
-sub nok ($;$$) {_ok !$_ [0], "Failed: " . ($_ [1] // $Message), $_ [2]}
-
-
-sub skip {
- my $why = shift;
- safe_globals();
- $why =~ s/\n.*//s;
- $why .= "; Bug $BugId" if defined $BugId;
- # seems like the new harness code doesnt like todo and skip to be mixed.
- # which seems like a bug in the harness to me. -- dmq
- #$why .= " # TODO $TODO" if defined $TODO;
-
- my $n = shift // 1;
- my $line_nr = (caller(0)) [2];
- for (1 .. $n) {
- ++ $test;
- #print "not " if defined $TODO;
- print "ok $test # skip $why\tLine $line_nr\n";
- }
- no warnings "exiting";
- last SKIP;
-}
-
-sub iseq ($$;$) {
- my ($got, $expect, $name) = @_;
-
- $_ = defined ($_) ? "'$_'" : "undef" for $got, $expect;
-
- my $ok = $got eq $expect;
- my $error = "# expected: $expect\n" .
- "# result: $got";
-
- _ok $ok, $name, $error;
-}
-
-sub isneq ($$;$) {
- my ($got, $expect, $name) = @_;
- my $todo = $TODO ? " # TODO $TODO" : '';
-
- $_ = defined ($_) ? "'$_'" : "undef" for $got, $expect;
-
- my $ok = $got ne $expect;
- my $error = "# results are equal ($got)";
-
- _ok $ok, $name, $error;
-}
-
-
-sub eval_ok ($;$) {
- my ($code, $name) = @_;
- local $@;
- if (ref $code) {
- _ok eval {&$code} && !$@, $name;
- }
- else {
- _ok eval ($code) && !$@, $name;
- }
-}
-
-sub must_die {
- my ($code, $pattern, $name) = @_;
- $pattern //= $DiePattern;
- undef $@;
- ref $code ? &$code : eval $code;
- my $r = $@ && $@ =~ /$pattern/;
- _ok $r, $name // $Message // "\$\@ =~ /$pattern/";
-}
-
-sub must_warn {
- my ($code, $pattern, $name) = @_;
- $pattern //= $WarnPattern;
- my $w;
- local $SIG {__WARN__} = sub {$w .= join "" => @_};
- use warnings 'all';
- ref $code ? &$code : eval $code;
- my $r = $w && $w =~ /$pattern/;
- $w //= "UNDEF";
- _ok $r, $name // $Message // "Got warning /$pattern/",
- "# expected: /$pattern/\n" .
- "# result: $w";
-}
-
-sub may_not_warn {
- my ($code, $name) = @_;
- my $w;
- local $SIG {__WARN__} = sub {$w .= join "" => @_};
- use warnings 'all';
- ref $code ? &$code : eval $code;
- _ok !$w, $name // ($Message ? "$Message (did not warn)"
- : "Did not warn"),
- "Got warning '$w'";
-}
-
-
-#
-# Tests start here.
-#
-sub run_tests {
-
- {
-
- my $x = "abc\ndef\n";
-
- ok $x =~ /^abc/, qq ["$x" =~ /^abc/];
- ok $x !~ /^def/, qq ["$x" !~ /^def/];
-
- # used to be a test for $*
- ok $x =~ /^def/m, qq ["$x" =~ /^def/m];
-
- nok $x =~ /^xxx/, qq ["$x" =~ /^xxx/];
- nok $x !~ /^abc/, qq ["$x" !~ /^abc/];
-
- ok $x =~ /def/, qq ["$x" =~ /def/];
- nok $x !~ /def/, qq ["$x" !~ /def/];
-
- ok $x !~ /.def/, qq ["$x" !~ /.def/];
- nok $x =~ /.def/, qq ["$x" =~ /.def/];
-
- ok $x =~ /\ndef/, qq ["$x" =~ /\ndef/];
- nok $x !~ /\ndef/, qq ["$x" !~ /\ndef/];
- }
-
- {
- $_ = '123';
- ok /^([0-9][0-9]*)/, qq [\$_ = '$_'; /^([0-9][0-9]*)/];
- }
-
- {
- $_ = 'aaabbbccc';
- ok /(a*b*)(c*)/ && $1 eq 'aaabbb' && $2 eq 'ccc',
- qq [\$_ = '$_'; /(a*b*)(c*)/];
- ok /(a+b+c+)/ && $1 eq 'aaabbbccc', qq [\$_ = '$_'; /(a+b+c+)/];
- nok /a+b?c+/, qq [\$_ = '$_'; /a+b?c+/];
-
- $_ = 'aaabccc';
- ok /a+b?c+/, qq [\$_ = '$_'; /a+b?c+/];
- ok /a*b?c*/, qq [\$_ = '$_'; /a*b?c*/];
-
- $_ = 'aaaccc';
- ok /a*b?c*/, qq [\$_ = '$_'; /a*b?c*/];
- nok /a*b+c*/, qq [\$_ = '$_'; /a*b+c*/];
-
- $_ = 'abcdef';
- ok /bcd|xyz/, qq [\$_ = '$_'; /bcd|xyz/];
- ok /xyz|bcd/, qq [\$_ = '$_'; /xyz|bcd/];
- ok m|bc/*d|, qq [\$_ = '$_'; m|bc/*d|];
- ok /^$_$/, qq [\$_ = '$_'; /^\$_\$/];
- }
-
- {
- # used to be a test for $*
- ok "ab\ncd\n" =~ /^cd/m, qq ["ab\ncd\n" =~ /^cd/m];
- }
-
- {
- our %XXX = map {($_ => $_)} 123, 234, 345;
-
- our @XXX = ('ok 1','not ok 1', 'ok 2','not ok 2','not ok 3');
- while ($_ = shift(@XXX)) {
- my $f = index ($_, 'not') >= 0 ? \&nok : \&ok;
- my $r = ?(.*)?;
- &$f ($r, "?(.*)?");
- /not/ && reset;
- if (/not ok 2/) {
- if ($^O eq 'VMS') {
- $_ = shift(@XXX);
- }
- else {
- reset 'X';
- }
- }
- }
-
- SKIP: {
- if ($^O eq 'VMS') {
- skip "Reset 'X'", 1;
- }
- ok !keys %XXX, "%XXX is empty";
- }
-
- }
-
- {
- local $Message = "Test empty pattern";
- my $xyz = 'xyz';
- my $cde = 'cde';
-
- $cde =~ /[^ab]*/;
- $xyz =~ //;
- iseq $&, $xyz;
-
- my $foo = '[^ab]*';
- $cde =~ /$foo/;
- $xyz =~ //;
- iseq $&, $xyz;
-
- $cde =~ /$foo/;
- my $null;
- no warnings 'uninitialized';
- $xyz =~ /$null/;
- iseq $&, $xyz;
-
- $null = "";
- $xyz =~ /$null/;
- iseq $&, $xyz;
- }
-
- {
- local $Message = q !Check $`, $&, $'!;
- $_ = 'abcdefghi';
- /def/; # optimized up to cmd
- iseq "$`:$&:$'", 'abc:def:ghi';
-
- no warnings 'void';
- /cde/ + 0; # optimized only to spat
- iseq "$`:$&:$'", 'ab:cde:fghi';
-
- /[d][e][f]/; # not optimized
- iseq "$`:$&:$'", 'abc:def:ghi';
- }
-
- {
- $_ = 'now is the {time for all} good men to come to.';
- / {([^}]*)}/;
- iseq $1, 'time for all', "Match braces";
- }
-
- {
- local $Message = "{N,M} quantifier";
- $_ = 'xxx {3,4} yyy zzz';
- ok /( {3,4})/;
- iseq $1, ' ';
- ok !/( {4,})/;
- ok /( {2,3}.)/;
- iseq $1, ' y';
- ok /(y{2,3}.)/;
- iseq $1, 'yyy ';
- ok !/x {3,4}/;
- ok !/^xxx {3,4}/;
- }
-
- {
- local $Message = "Test /g";
- local $" = ":";
- $_ = "now is the time for all good men to come to.";
- my @words = /(\w+)/g;
- my $exp = "now:is:the:time:for:all:good:men:to:come:to";
-
- iseq "@words", $exp;
-
- @words = ();
- while (/\w+/g) {
- push (@words, $&);
- }
- iseq "@words", $exp;
-
- @words = ();
- pos = 0;
- while (/to/g) {
- push(@words, $&);
- }
- iseq "@words", "to:to";
-
- pos $_ = 0;
- @words = /to/g;
- iseq "@words", "to:to";
- }
-
- {
- $_ = "abcdefghi";
-
- my $pat1 = 'def';
- my $pat2 = '^def';
- my $pat3 = '.def.';
- my $pat4 = 'abc';
- my $pat5 = '^abc';
- my $pat6 = 'abc$';
- my $pat7 = 'ghi';
- my $pat8 = '\w*ghi';
- my $pat9 = 'ghi$';
-
- my $t1 = my $t2 = my $t3 = my $t4 = my $t5 =
- my $t6 = my $t7 = my $t8 = my $t9 = 0;
-
- for my $iter (1 .. 5) {
- $t1++ if /$pat1/o;
- $t2++ if /$pat2/o;
- $t3++ if /$pat3/o;
- $t4++ if /$pat4/o;
- $t5++ if /$pat5/o;
- $t6++ if /$pat6/o;
- $t7++ if /$pat7/o;
- $t8++ if /$pat8/o;
- $t9++ if /$pat9/o;
- }
- my $x = "$t1$t2$t3$t4$t5$t6$t7$t8$t9";
- iseq $x, '505550555', "Test /o";
- }
-
-
- SKIP: {
- my $xyz = 'xyz';
- ok "abc" =~ /^abc$|$xyz/, "| after \$";
-
- # perl 4.009 says "unmatched ()"
- local $Message = '$ inside ()';
-
- my $result;
- eval '"abc" =~ /a(bc$)|$xyz/; $result = "$&:$1"';
- iseq $@, "" or skip "eval failed", 1;
- iseq $result, "abc:bc";
- }
-
-
- {
- local $Message = "Scalar /g";
- $_ = "abcfooabcbar";
-
- ok /abc/g && $` eq "";
- ok /abc/g && $` eq "abcfoo";
- ok !/abc/g;
-
- local $Message = "Scalar /gi";
- pos = 0;
- ok /ABC/gi && $` eq "";
- ok /ABC/gi && $` eq "abcfoo";
- ok !/ABC/gi;
-
- local $Message = "Scalar /g";
- pos = 0;
- ok /abc/g && $' eq "fooabcbar";
- ok /abc/g && $' eq "bar";
-
- $_ .= '';
- my @x = /abc/g;
- iseq @x, 2, "/g reset after assignment";
- }
-
- {
- local $Message = '/g, \G and pos';
- $_ = "abdc";
- pos $_ = 2;
- /\Gc/gc;
- iseq pos $_, 2;
- /\Gc/g;
- ok !defined pos $_;
- }
-
- {
- local $Message = '(?{ })';
- our $out = 1;
- 'abc' =~ m'a(?{ $out = 2 })b';
- iseq $out, 2;
-
- $out = 1;
- 'abc' =~ m'a(?{ $out = 3 })c';
- iseq $out, 1;
- }
-
-
- {
- $_ = 'foobar1 bar2 foobar3 barfoobar5 foobar6';
- my @out = /(?<!foo)bar./g;
- iseq "@out", 'bar2 barf', "Negative lookbehind";
- }
-
- {
- local $Message = "REG_INFTY tests";
- # Tests which depend on REG_INFTY
- $::reg_infty = $Config {reg_infty} // 32767;
- $::reg_infty_m = $::reg_infty - 1;
- $::reg_infty_p = $::reg_infty + 1;
- $::reg_infty_m = $::reg_infty_m; # Surpress warning.
-
- # As well as failing if the pattern matches do unexpected things, the
- # next three tests will fail if you should have picked up a lower-than-
- # default value for $reg_infty from Config.pm, but have not.
-
- eval_ok q (('aaa' =~ /(a{1,$::reg_infty_m})/)[0] eq 'aaa');
- eval_ok q (('a' x $::reg_infty_m) =~ /a{$::reg_infty_m}/);
- eval_ok q (('a' x ($::reg_infty_m - 1)) !~ /a{$::reg_infty_m}/);
- eval "'aaa' =~ /a{1,$::reg_infty}/";
- ok $@ =~ /^\QQuantifier in {,} bigger than/;
- eval "'aaa' =~ /a{1,$::reg_infty_p}/";
- ok $@ =~ /^\QQuantifier in {,} bigger than/;
- }
-
- {
- # Poke a couple more parse failures
- my $context = 'x' x 256;
- eval qq("${context}y" =~ /(?<=$context)y/);
- ok $@ =~ /^\QLookbehind longer than 255 not/, "Lookbehind limit";
- }
-
- {
- # Long Monsters
- local $Message = "Long monster";
- for my $l (125, 140, 250, 270, 300000, 30) { # Ordered to free memory
- my $a = 'a' x $l;
- local $Error = "length = $l";
- ok "ba$a=" =~ /a$a=/;
- nok "b$a=" =~ /a$a=/;
- ok "b$a=" =~ /ba+=/;
-
- ok "ba$a=" =~ /b(?:a|b)+=/;
- }
- }
-
-
- {
- # 20000 nodes, each taking 3 words per string, and 1 per branch
- my $long_constant_len = join '|', 12120 .. 32645;
- my $long_var_len = join '|', 8120 .. 28645;
- my %ans = ( 'ax13876y25677lbc' => 1,
- 'ax13876y25677mcb' => 0, # not b.
- 'ax13876y35677nbc' => 0, # Num too big
- 'ax13876y25677y21378obc' => 1,
- 'ax13876y25677y21378zbc' => 0, # Not followed by [k-o]
- 'ax13876y25677y21378y21378kbc' => 1,
- 'ax13876y25677y21378y21378kcb' => 0, # Not b.
- 'ax13876y25677y21378y21378y21378kbc' => 0, # 5 runs
- );
-
- local $Message = "20000 nodes";
- for (keys %ans) {
- local $Error = "const-len '$_'";
- ok !($ans{$_} xor /a(?=([yx]($long_constant_len)){2,4}[k-o]).*b./o);
-
- local $Error = "var-len '$_'";
- ok !($ans{$_} xor /a(?=([yx]($long_var_len)){2,4}[k-o]).*b./o);
- }
- }
-
- {
- local $Message = "Complicated backtracking";
- $_ = " a (bla()) and x(y b((l)u((e))) and b(l(e)e)e";
- my $expect = "(bla()) ((l)u((e))) (l(e)e)";
-
- use vars '$c';
- sub matchit {
- m/
- (
- \(
- (?{ $c = 1 }) # Initialize
- (?:
- (?(?{ $c == 0 }) # PREVIOUS iteration was OK, stop the loop
- (?!
- ) # Fail: will unwind one iteration back
- )
- (?:
- [^()]+ # Match a big chunk
- (?=
- [()]
- ) # Do not try to match subchunks
- |
- \(
- (?{ ++$c })
- |
- \)
- (?{ --$c })
- )
- )+ # This may not match with different subblocks
- )
- (?(?{ $c != 0 })
- (?!
- ) # Fail
- ) # Otherwise the chunk 1 may succeed with $c>0
- /xg;
- }
-
- my @ans = ();
- my $res;
- push @ans, $res while $res = matchit;
- iseq "@ans", "1 1 1";
-
- @ans = matchit;
- iseq "@ans", $expect;
-
- local $Message = "Recursion with (??{ })";
- our $matched;
- $matched = qr/\((?:(?>[^()]+)|(??{$matched}))*\)/;
-
- @ans = my @ans1 = ();
- push (@ans, $res), push (@ans1, $&) while $res = m/$matched/g;
-
- iseq "@ans", "1 1 1";
- iseq "@ans1", $expect;
-
- @ans = m/$matched/g;
- iseq "@ans", $expect;
-
- }
-
- {
- ok "abc" =~ /^(??{"a"})b/, '"abc" =~ /^(??{"a"})b/';
- }
-
- {
- my @ans = ('a/b' =~ m%(.*/)?(.*)%); # Stack may be bad
- iseq "@ans", 'a/ b', "Stack may be bad";
- }
-
- {
- local $Message = "Eval-group not allowed at runtime";
- my $code = '{$blah = 45}';
- our $blah = 12;
- eval { /(?$code)/ };
- ok $@ && $@ =~ /not allowed at runtime/ && $blah == 12;
-
- for $code ('{$blah = 45}','=xx') {
- $blah = 12;
- my $res = eval { "xx" =~ /(?$code)/o };
- no warnings 'uninitialized';
- local $Error = "'$@', '$res', '$blah'";
- if ($code eq '=xx') {
- ok !$@ && $res;
- }
- else {
- ok $@ && $@ =~ /not allowed at runtime/ && $blah == 12;
- }
- }
-
- $code = '{$blah = 45}';
- $blah = 12;
- eval "/(?$code)/";
- iseq $blah, 45;
-
- $blah = 12;
- /(?{$blah = 45})/;
- iseq $blah, 45;
- }
-
- {
- local $Message = "Pos checks";
- my $x = 'banana';
- $x =~ /.a/g;
- iseq pos ($x), 2;
-
- $x =~ /.z/gc;
- iseq pos ($x), 2;
-
- sub f {
- my $p = $_[0];
- return $p;
- }
-
- $x =~ /.a/g;
- iseq f (pos ($x)), 4;
- }
-
- {
- local $Message = 'Checking $^R';
- our $x = $^R = 67;
- 'foot' =~ /foo(?{$x = 12; 75})[t]/;
- iseq $^R, 75;
-
- $x = $^R = 67;
- 'foot' =~ /foo(?{$x = 12; 75})[xy]/;
- ok $^R eq '67' && $x eq '12';
-
- $x = $^R = 67;
- 'foot' =~ /foo(?{ $^R + 12 })((?{ $x = 12; $^R + 17 })[xy])?/;
- ok $^R eq '79' && $x eq '12';
- }
-
- {
- iseq qr/\b\v$/i, '(?i-xsm:\b\v$)', 'qr/\b\v$/i';
- iseq qr/\b\v$/s, '(?s-xim:\b\v$)', 'qr/\b\v$/s';
- iseq qr/\b\v$/m, '(?m-xis:\b\v$)', 'qr/\b\v$/m';
- iseq qr/\b\v$/x, '(?x-ism:\b\v$)', 'qr/\b\v$/x';
- iseq qr/\b\v$/xism, '(?msix:\b\v$)', 'qr/\b\v$/xism';
- iseq qr/\b\v$/, '(?-xism:\b\v$)', 'qr/\b\v$/';
- }
-
-
- {
- local $Message = "Look around";
- $_ = 'xabcx';
- SKIP:
- foreach my $ans ('', 'c') {
- ok /(?<=(?=a)..)((?=c)|.)/g or skip "Match failed", 1;
- iseq $1, $ans;
- }
- }
-
- {
- local $Message = "Empty clause";
- $_ = 'a';
- foreach my $ans ('', 'a', '') {
- ok /^|a|$/g or skip "Match failed", 1;
- iseq $&, $ans;
- }
- }
-
- {
- local $Message = "Prefixify";
- sub prefixify {
- SKIP: {
- my ($v, $a, $b, $res) = @_;
- ok $v =~ s/\Q$a\E/$b/ or skip "Match failed", 1;
- iseq $v, $res;
- }
- }
-
- prefixify ('/a/b/lib/arch', "/a/b/lib", 'X/lib', 'X/lib/arch');
- prefixify ('/a/b/man/arch', "/a/b/man", 'X/man', 'X/man/arch');
- }
-
- {
- $_ = 'var="foo"';
- /(\")/;
- ok $1 && /$1/, "Capture a quote";
- }
-
- {
- local $Message = "Call code from qr //";
- $a = qr/(?{++$b})/;
- $b = 7;
- ok /$a$a/ && $b eq '9';
-
- $c="$a";
- ok /$a$a/ && $b eq '11';
-
- undef $@;
- eval {/$c/};
- ok $@ && $@ =~ /not allowed at runtime/;
-
- use re "eval";
- /$a$c$a/;
- iseq $b, '14';
-
- our $lex_a = 43;
- our $lex_b = 17;
- our $lex_c = 27;
- my $lex_res = ($lex_b =~ qr/$lex_b(?{ $lex_c = $lex_a++ })/);
-
- iseq $lex_res, 1;
- iseq $lex_a, 44;
- iseq $lex_c, 43;
-
- no re "eval";
- undef $@;
- my $match = eval { /$a$c$a/ };
- ok $@ && $@ =~ /Eval-group not allowed/ && !$match;
- iseq $b, '14';
-
- $lex_a = 2;
- $lex_a = 43;
- $lex_b = 17;
- $lex_c = 27;
- $lex_res = ($lex_b =~ qr/17(?{ $lex_c = $lex_a++ })/);
-
- iseq $lex_res, 1;
- iseq $lex_a, 44;
- iseq $lex_c, 43;
-
- }
-
-
- {
- no warnings 'closure';
- local $Message = '(?{ $var } refers to package vars';
- package aa;
- our $c = 2;
- $::c = 3;
- '' =~ /(?{ $c = 4 })/;
- main::iseq $c, 4;
- main::iseq $::c, 3;
- }
-
-
- {
- must_die 'q(a:[b]:) =~ /[x[:foo:]]/',
- 'POSIX class \[:[^:]+:\] unknown in regex',
- 'POSIX class [: :] must have valid name';
-
- for my $d (qw [= .]) {
- must_die "/[[${d}foo${d}]]/",
- "\QPOSIX syntax [$d $d] is reserved for future extensions",
- "POSIX syntax [[$d $d]] is an error";
- }
- }
-
-
- {
- # test if failure of patterns returns empty list
- local $Message = "Failed pattern returns empty list";
- $_ = 'aaa';
- @_ = /bbb/;
- iseq "@_", "";
-
- @_ = /bbb/g;
- iseq "@_", "";
-
- @_ = /(bbb)/;
- iseq "@_", "";
-
- @_ = /(bbb)/g;
- iseq "@_", "";
- }
-
-
- {
- local $Message = '@- and @+ tests';
-
- /a(?=.$)/;
- iseq $#+, 0;
- iseq $#-, 0;
- iseq $+ [0], 2;
- iseq $- [0], 1;
- ok !defined $+ [1] && !defined $- [1] &&
- !defined $+ [2] && !defined $- [2];
-
- /a(a)(a)/;
- iseq $#+, 2;
- iseq $#-, 2;
- iseq $+ [0], 3;
- iseq $- [0], 0;
- iseq $+ [1], 2;
- iseq $- [1], 1;
- iseq $+ [2], 3;
- iseq $- [2], 2;
- ok !defined $+ [3] && !defined $- [3] &&
- !defined $+ [4] && !defined $- [4];
-
-
- /.(a)(b)?(a)/;
- iseq $#+, 3;
- iseq $#-, 3;
- iseq $+ [1], 2;
- iseq $- [1], 1;
- iseq $+ [3], 3;
- iseq $- [3], 2;
- ok !defined $+ [2] && !defined $- [2] &&
- !defined $+ [4] && !defined $- [4];
-
-
- /.(a)/;
- iseq $#+, 1;
- iseq $#-, 1;
- iseq $+ [0], 2;
- iseq $- [0], 0;
- iseq $+ [1], 2;
- iseq $- [1], 1;
- ok !defined $+ [2] && !defined $- [2] &&
- !defined $+ [3] && !defined $- [3];
-
- /.(a)(ba*)?/;
- iseq $#+, 2;
- iseq $#-, 1;
- }
-
-
- {
- local $DiePattern = '^Modification of a read-only value attempted';
- local $Message = 'Elements of @- and @+ are read-only';
- must_die '$+[0] = 13';
- must_die '$-[0] = 13';
- must_die '@+ = (7, 6, 5)';
- must_die '@- = qw (foo bar)';
- }
-
-
- {
- local $Message = '\G testing';
- $_ = 'aaa';
- pos = 1;
- my @a = /\Ga/g;
- iseq "@a", "a a";
-
- my $str = 'abcde';
- pos $str = 2;
- ok $str !~ /^\G/;
- ok $str !~ /^.\G/;
- ok $str =~ /^..\G/;
- ok $str !~ /^...\G/;
- ok $str =~ /\G../ && $& eq 'cd';
-
- local $TODO = $running_as_thread;
- ok $str =~ /.\G./ && $& eq 'bc';
- }
-
-
- {
- local $Message = 'pos inside (?{ })';
- my $str = 'abcde';
- our ($foo, $bar);
- ok $str =~ /b(?{$foo = $_; $bar = pos})c/;
- iseq $foo, $str;
- iseq $bar, 2;
- ok !defined pos ($str);
-
- undef $foo;
- undef $bar;
- pos $str = undef;
- ok $str =~ /b(?{$foo = $_; $bar = pos})c/g;
- iseq $foo, $str;
- iseq $bar, 2;
- iseq pos ($str), 3;
-
- $_ = $str;
- undef $foo;
- undef $bar;
- ok /b(?{$foo = $_; $bar = pos})c/;
- iseq $foo, $str;
- iseq $bar, 2;
-
- undef $foo;
- undef $bar;
- ok /b(?{$foo = $_; $bar = pos})c/g;
- iseq $foo, $str;
- iseq $bar, 2;
- iseq pos, 3;
-
- undef $foo;
- undef $bar;
- pos = undef;
- 1 while /b(?{$foo = $_; $bar = pos})c/g;
- iseq $foo, $str;
- iseq $bar, 2;
- ok !defined pos;
-
- undef $foo;
- undef $bar;
- $_ = 'abcde|abcde';
- ok s/b(?{$foo = $_; $bar = pos})c/x/g;
- iseq $foo, 'abcde|abcde';
- iseq $bar, 8;
- iseq $_, 'axde|axde';
-
- # List context:
- $_ = 'abcde|abcde';
- our @res;
- () = /([ace]).(?{push @res, $1,$2})([ce])(?{push @res, $1,$2})/g;
- @res = map {defined $_ ? "'$_'" : 'undef'} @res;
- iseq "@res", "'a' undef 'a' 'c' 'e' undef 'a' undef 'a' 'c'";
-
- @res = ();
- () = /([ace]).(?{push @res, $`,$&,$'})([ce])(?{push @res, $`,$&,$'})/g;
- @res = map {defined $_ ? "'$_'" : 'undef'} @res;
- iseq "@res", "'' 'ab' 'cde|abcde' " .
- "'' 'abc' 'de|abcde' " .
- "'abcd' 'e|' 'abcde' " .
- "'abcde|' 'ab' 'cde' " .
- "'abcde|' 'abc' 'de'" ;
- }
-
-
- {
- local $Message = '\G anchor checks';
- my $foo = 'aabbccddeeffgg';
- pos ($foo) = 1;
- {
- local $TODO = $running_as_thread;
- no warnings 'uninitialized';
- ok $foo =~ /.\G(..)/g;
- iseq $1, 'ab';
-
- pos ($foo) += 1;
- ok $foo =~ /.\G(..)/g;
- iseq $1, 'cc';
-
- pos ($foo) += 1;
- ok $foo =~ /.\G(..)/g;
- iseq $1, 'de';
-
- ok $foo =~ /\Gef/g;
- }
-
- undef pos $foo;
- ok $foo =~ /\G(..)/g;
- iseq $1, 'aa';
-
- ok $foo =~ /\G(..)/g;
- iseq $1, 'bb';
-
- pos ($foo) = 5;
- ok $foo =~ /\G(..)/g;
- iseq $1, 'cd';
- }
-
-
- {
- $_ = '123x123';
- my @res = /(\d*|x)/g;
- local $" = '|';
- iseq "@res", "123||x|123|", "0 match in alternation";
- }
-
-
- {
- local $Message = "Match against temporaries (created via pp_helem())" .
- " is safe";
- ok {foo => "bar\n" . $^X} -> {foo} =~ /^(.*)\n/g;
- iseq $1, "bar";
- }
-
-
- {
- local $Message = 'package $i inside (?{ }), ' .
- 'saved substrings and changing $_';
- our @a = qw [foo bar];
- our @b = ();
- s/(\w)(?{push @b, $1})/,$1,/g for @a;
- iseq "@b", "f o o b a r";
- iseq "@a", ",f,,o,,o, ,b,,a,,r,";
-
- local $Message = 'lexical $i inside (?{ }), ' .
- 'saved substrings and changing $_';
- no warnings 'closure';
- my @c = qw [foo bar];
- my @d = ();
- s/(\w)(?{push @d, $1})/,$1,/g for @c;
- iseq "@d", "f o o b a r";
- iseq "@c", ",f,,o,,o, ,b,,a,,r,";
- }
-
-
- {
- local $Message = 'Brackets';
- our $brackets;
- $brackets = qr {
- { (?> [^{}]+ | (??{ $brackets }) )* }
- }x;
-
- ok "{{}" =~ $brackets;
- iseq $&, "{}";
- ok "something { long { and } hairy" =~ $brackets;
- iseq $&, "{ and }";
- ok "something { long { and } hairy" =~ m/((??{ $brackets }))/;
- iseq $&, "{ and }";
- }
-
-
- {
- $_ = "a-a\nxbb";
- pos = 1;
- nok m/^-.*bb/mg, '$_ = "a-a\nxbb"; m/^-.*bb/mg';
- }
-
-
- {
- local $Message = '\G anchor checks';
- my $text = "aaXbXcc";
- pos ($text) = 0;
- ok $text !~ /\GXb*X/g;
- }
-
-
- {
- $_ = "xA\n" x 500;
- nok /^\s*A/m, '$_ = "xA\n" x 500; /^\s*A/m"';
-
- my $text = "abc dbf";
- my @res = ($text =~ /.*?(b).*?\b/g);
- iseq "@res", "b b", '\b is not special';
- }
-
-
- {
- local $Message = '\S, [\S], \s, [\s]';
- my @a = map chr, 0 .. 255;
- my @b = grep /\S/, @a;
- my @c = grep /[^\s]/, @a;
- iseq "@b", "@c";
-
- @b = grep /\S/, @a;
- @c = grep /[\S]/, @a;
- iseq "@b", "@c";
-
- @b = grep /\s/, @a;
- @c = grep /[^\S]/, @a;
- iseq "@b", "@c";
-
- @b = grep /\s/, @a;
- @c = grep /[\s]/, @a;
- iseq "@b", "@c";
- }
- {
- local $Message = '\D, [\D], \d, [\d]';
- my @a = map chr, 0 .. 255;
- my @b = grep /\D/, @a;
- my @c = grep /[^\d]/, @a;
- iseq "@b", "@c";
-
- @b = grep /\D/, @a;
- @c = grep /[\D]/, @a;
- iseq "@b", "@c";
-
- @b = grep /\d/, @a;
- @c = grep /[^\D]/, @a;
- iseq "@b", "@c";
-
- @b = grep /\d/, @a;
- @c = grep /[\d]/, @a;
- iseq "@b", "@c";
- }
- {
- local $Message = '\W, [\W], \w, [\w]';
- my @a = map chr, 0 .. 255;
- my @b = grep /\W/, @a;
- my @c = grep /[^\w]/, @a;
- iseq "@b", "@c";
-
- @b = grep /\W/, @a;
- @c = grep /[\W]/, @a;
- iseq "@b", "@c";
-
- @b = grep /\w/, @a;
- @c = grep /[^\W]/, @a;
- iseq "@b", "@c";
-
- @b = grep /\w/, @a;
- @c = grep /[\w]/, @a;
- iseq "@b", "@c";
- }
-
-
- {
- # see if backtracking optimization works correctly
- local $Message = 'Backtrack optimization';
- ok "\n\n" =~ /\n $ \n/x;
- ok "\n\n" =~ /\n* $ \n/x;
- ok "\n\n" =~ /\n+ $ \n/x;
- ok "\n\n" =~ /\n? $ \n/x;
- ok "\n\n" =~ /\n*? $ \n/x;
- ok "\n\n" =~ /\n+? $ \n/x;
- ok "\n\n" =~ /\n?? $ \n/x;
- ok "\n\n" !~ /\n*+ $ \n/x;
- ok "\n\n" !~ /\n++ $ \n/x;
- ok "\n\n" =~ /\n?+ $ \n/x;
- }
-
-
- {
- package S;
- use overload '""' => sub {'Object S'};
- sub new {bless []}
-
- local $Message = "Ref stringification";
- ::ok do { \my $v} =~ /^SCALAR/, "Scalar ref stringification";
- ::ok do {\\my $v} =~ /^REF/, "Ref ref stringification";
- ::ok [] =~ /^ARRAY/, "Array ref stringification";
- ::ok {} =~ /^HASH/, "Hash ref stringification";
- ::ok 'S' -> new =~ /^Object S/, "Object stringification";
- }
-
-
- {
- local $Message = "Test result of match used as match";
- ok 'a1b' =~ ('xyz' =~ /y/);
- iseq $`, 'a';
- ok 'a1b' =~ ('xyz' =~ /t/);
- iseq $`, 'a';
- }
-
-
- {
- local $Message = '"1" is not \s';
- may_not_warn sub {ok ("1\n" x 102) !~ /^\s*\n/m};
- }
-
-
- {
- local $Message = '\s, [[:space:]] and [[:blank:]]';
- my %space = (spc => " ",
- tab => "\t",
- cr => "\r",
- lf => "\n",
- ff => "\f",
- # There's no \v but the vertical tabulator seems miraculously
- # be 11 both in ASCII and EBCDIC.
- vt => chr(11),
- false => "space");
-
- my @space0 = sort grep {$space {$_} =~ /\s/ } keys %space;
- my @space1 = sort grep {$space {$_} =~ /[[:space:]]/} keys %space;
- my @space2 = sort grep {$space {$_} =~ /[[:blank:]]/} keys %space;
-
- iseq "@space0", "cr ff lf spc tab";
- iseq "@space1", "cr ff lf spc tab vt";
- iseq "@space2", "spc tab";
- }
-
-
- {
- local $BugId = '20000731.001';
- ok "A \x{263a} B z C" =~ /A . B (??{ "z" }) C/,
- "Match UTF-8 char in presense of (??{ })";
- }
-
-
- {
- local $BugId = '20001021.005';
- no warnings 'uninitialized';
- ok undef =~ /^([^\/]*)(.*)$/, "Used to cause a SEGV";
- }
-
-
- SKIP:
- {
- local $Message = '\C matches octet';
- $_ = "a\x{100}b";
- ok /(.)(\C)(\C)(.)/ or skip q [\C doesn't match], 4;
- iseq $1, "a";
- if ($IS_ASCII) { # ASCII (or equivalent), should be UTF-8
- iseq $2, "\xC4";
- iseq $3, "\x80";
- }
- elsif ($IS_EBCDIC) { # EBCDIC (or equivalent), should be UTF-EBCDIC
- iseq $2, "\x8C";
- iseq $3, "\x41";
- }
- else {
- SKIP: {
- ok 0, "Unexpected platform", "ord ('A') = $ordA";
- skip "Unexpected platform";
- }
- }
- iseq $4, "b";
- }
-
-
- SKIP:
- {
- local $Message = '\C matches octet';
- $_ = "\x{100}";
- ok /(\C)/g or skip q [\C doesn't match], 2;
- if ($IS_ASCII) {
- iseq $1, "\xC4";
- }
- elsif ($IS_EBCDIC) {
- iseq $1, "\x8C";
- }
- else {
- ok 0, "Unexpected platform", "ord ('A') = $ordA";
- }
- ok /(\C)/g or skip q [\C doesn't match];
- if ($IS_ASCII) {
- iseq $1, "\x80";
- }
- elsif ($IS_EBCDIC) {
- iseq $1, "\x41";
- }
- else {
- ok 0, "Unexpected platform", "ord ('A') = $ordA";
- }
- }
-
-
- {
- # Japhy -- added 03/03/2001
- () = (my $str = "abc") =~ /(...)/;
- $str = "def";
- iseq $1, "abc", 'Changing subject does not modify $1';
- }
-
-
- SKIP:
- {
- # The trick is that in EBCDIC the explicit numeric range should
- # match (as also in non-EBCDIC) but the explicit alphabetic range
- # should not match.
- ok "\x8e" =~ /[\x89-\x91]/, '"\x8e" =~ /[\x89-\x91]/';
- ok "\xce" =~ /[\xc9-\xd1]/, '"\xce" =~ /[\xc9-\xd1]/';
-
- skip "Not an EBCDIC platform", 2 unless ord ('i') == 0x89 &&
- ord ('J') == 0xd1;
-
- # In most places these tests would succeed since \x8e does not
- # in most character sets match 'i' or 'j' nor would \xce match
- # 'I' or 'J', but strictly speaking these tests are here for
- # the good of EBCDIC, so let's test these only there.
- nok "\x8e" !~ /[i-j]/, '"\x8e" !~ /[i-j]/';
- nok "\xce" !~ /[I-J]/, '"\xce" !~ /[I-J]/';
- }
-
-
- {
- ok "\x{ab}" =~ /\x{ab}/, '"\x{ab}" =~ /\x{ab}/ ';
- ok "\x{abcd}" =~ /\x{abcd}/, '"\x{abcd}" =~ /\x{abcd}/';
- }
-
-
- {
- local $Message = 'bug id 20001008.001';
-
- my @x = ("stra\337e 138", "stra\337e 138");
- for (@x) {
- ok s/(\d+)\s*([\w\-]+)/$1 . uc $2/e;
- ok my ($latin) = /^(.+)(?:\s+\d)/;
- iseq $latin, "stra\337e";
- ok $latin =~ s/stra\337e/straße/;
- #
- # Previous code follows, but outcommented - there were no tests.
- #
- # $latin =~ s/stra\337e/straße/; # \303\237 after the 2nd a
- # use utf8; # needed for the raw UTF-8
- # $latin =~ s!(s)tr(?:aß|s+e)!$1tr.!; # \303\237 after the a
- }
- }
-
-
- {
- local $Message = 'Test \x escapes';
- ok "ba\xd4c" =~ /([a\xd4]+)/ && $1 eq "a\xd4";
- ok "ba\xd4c" =~ /([a\xd4]+)/ && $1 eq "a\x{d4}";
- ok "ba\x{d4}c" =~ /([a\xd4]+)/ && $1 eq "a\x{d4}";
- ok "ba\x{d4}c" =~ /([a\xd4]+)/ && $1 eq "a\xd4";
- ok "ba\xd4c" =~ /([a\x{d4}]+)/ && $1 eq "a\xd4";
- ok "ba\xd4c" =~ /([a\x{d4}]+)/ && $1 eq "a\x{d4}";
- ok "ba\x{d4}c" =~ /([a\x{d4}]+)/ && $1 eq "a\x{d4}";
- ok "ba\x{d4}c" =~ /([a\x{d4}]+)/ && $1 eq "a\xd4";
- }
-
-
- {
- local $BugId = '20001028.003';
-
- # Fist half of the bug.
- local $Message = 'HEBREW ACCENT QADMA matched by .*';
- my $X = chr (1448);
- ok my ($Y) = $X =~ /(.*)/;
- iseq $Y, v1448;
- iseq length ($Y), 1;
-
- # Second half of the bug.
- $Message = 'HEBREW ACCENT QADMA in replacement';
- $X = '';
- $X =~ s/^/chr(1488)/e;
- iseq length $X, 1;
- iseq ord ($X), 1488;
- }
-
-
- {
- local $BugId = '20001108.001';
- local $Message = 'Repeated s///';
- my $X = "Szab\x{f3},Bal\x{e1}zs";
- my $Y = $X;
- $Y =~ s/(B)/$1/ for 0 .. 3;
- iseq $Y, $X;
- iseq $X, "Szab\x{f3},Bal\x{e1}zs";
- }
-
-
- {
- local $BugId = '20000517.001';
- local $Message = 's/// on UTF-8 string';
- my $x = "\x{100}A";
- $x =~ s/A/B/;
- iseq $x, "\x{100}B";
- iseq length $x, 2;
- }
-
-
- {
- local $BugId = '20001230.002';
- local $Message = '\C and É';
- ok "École" =~ /^\C\C(.)/ && $1 eq 'c';
- ok "École" =~ /^\C\C(c)/;
- }
-
-
- SKIP:
- {
- local $Message = 'Match code points > 255';
- $_ = "abc\x{100}\x{200}\x{300}\x{380}\x{400}defg";
- ok /(.\x{300})./ or skip "No match", 4;
- ok $` eq "abc\x{100}" && length ($`) == 4;
- ok $& eq "\x{200}\x{300}\x{380}" && length ($&) == 3;
- ok $' eq "\x{400}defg" && length ($') == 5;
- ok $1 eq "\x{200}\x{300}" && length ($1) == 2;
- }
-
-
- {
- # The original bug report had 'no utf8' here but that was irrelevant.
- local $BugId = '20010306.008';
- local $Message = "Don't dump core";
- my $a = "a\x{1234}";
- ok $a =~ m/\w/; # used to core dump.
- }
-
-
- {
- local $BugId = '20010410.006';
- local $Message = '/g in scalar context';
- for my $rx ('/(.*?)\{(.*?)\}/csg',
- '/(.*?)\{(.*?)\}/cg',
- '/(.*?)\{(.*?)\}/sg',
- '/(.*?)\{(.*?)\}/g',
- '/(.+?)\{(.+?)\}/csg',) {
- my $i = 0;
- my $input = "a{b}c{d}";
- eval <<" --";
- while (eval \$input =~ $rx) {
- \$i ++;
- }
- --
- iseq $i, 2;
- }
- }
-
-
- {
- my $x = "\x{10FFFD}";
- $x =~ s/(.)/$1/g;
- ok ord($x) == 0x10FFFD && length($x) == 1, "From Robin Houston";
- }
-
-
- {
- my %d = (
- "7f" => [0, 0, 0],
- "80" => [1, 1, 0],
- "ff" => [1, 1, 0],
- "100" => [0, 1, 1],
- );
- SKIP:
- while (my ($code, $match) = each %d) {
- local $Message = "Properties of \\x$code";
- my $char = eval qq ["\\x{$code}"];
- my $i = 0;
- ok (($char =~ /[\x80-\xff]/) xor !$$match [$i ++]);
- ok (($char =~ /[\x80-\x{100}]/) xor !$$match [$i ++]);
- ok (($char =~ /[\x{100}]/) xor !$$match [$i ++]);
- }
- }
-
-
- {
- # From Japhy
- local $Message;
- must_warn 'qr/(?c)/', '^Useless \(\?c\)';
- must_warn 'qr/(?-c)/', '^Useless \(\?-c\)';
- must_warn 'qr/(?g)/', '^Useless \(\?g\)';
- must_warn 'qr/(?-g)/', '^Useless \(\?-g\)';
- must_warn 'qr/(?o)/', '^Useless \(\?o\)';
- must_warn 'qr/(?-o)/', '^Useless \(\?-o\)';
-
- # Now test multi-error regexes
- must_warn 'qr/(?g-o)/', '^Useless \(\?g\).*\nUseless \(\?-o\)';
- must_warn 'qr/(?g-c)/', '^Useless \(\?g\).*\nUseless \(\?-c\)';
- # (?c) means (?g) error won't be thrown
- must_warn 'qr/(?o-cg)/', '^Useless \(\?o\).*\nUseless \(\?-c\)';
- must_warn 'qr/(?ogc)/', '^Useless \(\?o\).*\nUseless \(\?g\).*\n' .
- 'Useless \(\?c\)';
- }
-
-
- {
- local $Message = "/x tests";
- $_ = "foo";
- eval_ok <<" --";
- /f
- o\r
- o
- \$
- /x
- --
- eval_ok <<" --";
- /f
- o
- o
- \$\r
- /x
- --
- }
-
-
- {
- local $Message = "/o feature";
- sub test_o {$_ [0] =~ /$_[1]/o; return $1}
- iseq test_o ('abc', '(.)..'), 'a';
- iseq test_o ('abc', '..(.)'), 'a';
- }
-
-
- {
- local $BugId = "20010619.003";
- # Amazingly vertical tabulator is the same in ASCII and EBCDIC.
- for ("\n", "\t", "\014", "\r") {
- ok !/[[:print:]]/, "'$_' not in [[:print:]]";
- }
- for (" ") {
- ok /[[:print:]]/, "'$_' in [[:print:]]";
- }
- }
-
-
- {
- # Test basic $^N usage outside of a regex
- local $Message = '$^N usage outside of a regex';
- my $x = "abcdef";
- ok ($x =~ /cde/ and !defined $^N);
- ok ($x =~ /(cde)/ and $^N eq "cde");
- ok ($x =~ /(c)(d)(e)/ and $^N eq "e");
- ok ($x =~ /(c(d)e)/ and $^N eq "cde");
- ok ($x =~ /(foo)|(c(d)e)/ and $^N eq "cde");
- ok ($x =~ /(c(d)e)|(foo)/ and $^N eq "cde");
- ok ($x =~ /(c(d)e)|(abc)/ and $^N eq "abc");
- ok ($x =~ /(c(d)e)|(abc)x/ and $^N eq "cde");
- ok ($x =~ /(c(d)e)(abc)?/ and $^N eq "cde");
- ok ($x =~ /(?:c(d)e)/ and $^N eq "d");
- ok ($x =~ /(?:c(d)e)(?:f)/ and $^N eq "d");
- ok ($x =~ /(?:([abc])|([def]))*/ and $^N eq "f");
- ok ($x =~ /(?:([ace])|([bdf]))*/ and $^N eq "f");
- ok ($x =~ /(([ace])|([bd]))*/ and $^N eq "e");
- {ok ($x =~ /(([ace])|([bdf]))*/ and $^N eq "f");}
- ## Test to see if $^N is automatically localized -- it should now
- ## have the value set in the previous test.
- iseq $^N, "e", '$^N is automatically localized';
-
- # Now test inside (?{ ... })
- local $Message = '$^N usage inside (?{ ... })';
- our ($y, $z);
- ok ($x =~ /a([abc])(?{$y=$^N})c/ and $y eq "b");
- ok ($x =~ /a([abc]+)(?{$y=$^N})d/ and $y eq "bc");
- ok ($x =~ /a([abcdefg]+)(?{$y=$^N})d/ and $y eq "bc");
- ok ($x =~ /(a([abcdefg]+)(?{$y=$^N})d)(?{$z=$^N})e/ and $y eq "bc"
- and $z eq "abcd");
- ok ($x =~ /(a([abcdefg]+)(?{$y=$^N})de)(?{$z=$^N})/ and $y eq "bc"
- and $z eq "abcde");
-
- }
-
-
- SKIP:
- {
- ## Should probably put in tests for all the POSIX stuff,
- ## but not sure how to guarantee a specific locale......
-
- skip "Not an ASCII platform", 2 unless $IS_ASCII;
- local $Message = 'Test [[:cntrl:]]';
- my $AllBytes = join "" => map {chr} 0 .. 255;
- (my $x = $AllBytes) =~ s/[[:cntrl:]]//g;
- iseq $x, join "", map {chr} 0x20 .. 0x7E, 0x80 .. 0xFF;
-
- ($x = $AllBytes) =~ s/[^[:cntrl:]]//g;
- iseq $x, join "", map {chr} 0x00 .. 0x1F, 0x7F;
- }
-
-
- {
- # With /s modifier UTF8 chars were interpreted as bytes
- local $Message = "UTF-8 chars aren't bytes";
- my $a = "Hello \x{263A} World";
- my @a = ($a =~ /./gs);
- iseq $#a, 12;
- }
-
-
- {
- local $Message = '. matches \n with /s';
- my $str1 = "foo\nbar";
- my $str2 = "foo\n\x{100}bar";
- my ($a, $b) = map {chr} $IS_ASCII ? (0xc4, 0x80) : (0x8c, 0x41);
- my @a;
- @a = $str1 =~ /./g; iseq @a, 6; iseq "@a", "f o o b a r";
- @a = $str1 =~ /./gs; iseq @a, 7; iseq "@a", "f o o \n b a r";
- @a = $str1 =~ /\C/g; iseq @a, 7; iseq "@a", "f o o \n b a r";
- @a = $str1 =~ /\C/gs; iseq @a, 7; iseq "@a", "f o o \n b a r";
- @a = $str2 =~ /./g; iseq @a, 7; iseq "@a", "f o o \x{100} b a r";
- @a = $str2 =~ /./gs; iseq @a, 8; iseq "@a", "f o o \n \x{100} b a r";
- @a = $str2 =~ /\C/g; iseq @a, 9; iseq "@a", "f o o \n $a $b b a r";
- @a = $str2 =~ /\C/gs; iseq @a, 9; iseq "@a", "f o o \n $a $b b a r";
- }
-
-
- {
- # [ID 20010814.004] pos() doesn't work when using =~m// in list context
- local $BugId = '20010814.004';
- $_ = "ababacadaea";
- my $a = join ":", /b./gc;
- my $b = join ":", /a./gc;
- my $c = pos;
- iseq "$a $b $c", 'ba:ba ad:ae 10', "pos() works with () = m//";
- }
-
-
- {
- # [ID 20010407.006] matching utf8 return values from
- # functions does not work
- local $BugId = '20010407.006';
- local $Message = 'UTF-8 return values from functions';
- package ID_20010407_006;
- sub x {"a\x{1234}"}
- my $x = x;
- my $y;
- ::ok $x =~ /(..)/;
- $y = $1;
- ::ok length ($y) == 2 && $y eq $x;
- ::ok x =~ /(..)/;
- $y = $1;
- ::ok length ($y) == 2 && $y eq $x;
- }
-
-
- {
- no warnings 'digit';
- # Check that \x## works. 5.6.1 and 5.005_03 fail some of these.
- my $x;
- $x = "\x4e" . "E";
- ok ($x =~ /^\x4EE$/, "Check only 2 bytes of hex are matched.");
-
- $x = "\x4e" . "i";
- ok ($x =~ /^\x4Ei$/, "Check that invalid hex digit stops it (2)");
-
- $x = "\x4" . "j";
- ok ($x =~ /^\x4j$/, "Check that invalid hex digit stops it (1)");
-
- $x = "\x0" . "k";
- ok ($x =~ /^\xk$/, "Check that invalid hex digit stops it (0)");
-
- $x = "\x0" . "x";
- ok ($x =~ /^\xx$/, "\\xx isn't to be treated as \\0");
-
- $x = "\x0" . "xa";
- ok ($x =~ /^\xxa$/, "\\xxa isn't to be treated as \\xa");
-
- $x = "\x9" . "_b";
- ok ($x =~ /^\x9_b$/, "\\x9_b isn't to be treated as \\x9b");
-
- # and now again in [] ranges
-
- $x = "\x4e" . "E";
- ok ($x =~ /^[\x4EE]{2}$/, "Check only 2 bytes of hex are matched.");
-
- $x = "\x4e" . "i";
- ok ($x =~ /^[\x4Ei]{2}$/, "Check that invalid hex digit stops it (2)");
-
- $x = "\x4" . "j";
- ok ($x =~ /^[\x4j]{2}$/, "Check that invalid hex digit stops it (1)");
-
- $x = "\x0" . "k";
- ok ($x =~ /^[\xk]{2}$/, "Check that invalid hex digit stops it (0)");
-
- $x = "\x0" . "x";
- ok ($x =~ /^[\xx]{2}$/, "\\xx isn't to be treated as \\0");
-
- $x = "\x0" . "xa";
- ok ($x =~ /^[\xxa]{3}$/, "\\xxa isn't to be treated as \\xa");
-
- $x = "\x9" . "_b";
- ok ($x =~ /^[\x9_b]{3}$/, "\\x9_b isn't to be treated as \\x9b");
-
- # Check that \x{##} works. 5.6.1 fails quite a few of these.
-
- $x = "\x9b";
- ok ($x =~ /^\x{9_b}$/, "\\x{9_b} is to be treated as \\x9b");
-
- $x = "\x9b" . "y";
- ok ($x =~ /^\x{9_b}y$/, "\\x{9_b} is to be treated as \\x9b (again)");
-
- $x = "\x9b" . "y";
- ok ($x =~ /^\x{9b_}y$/, "\\x{9b_} is to be treated as \\x9b");
-
- $x = "\x9b" . "y";
- ok ($x =~ /^\x{9_bq}y$/, "\\x{9_bc} is to be treated as \\x9b");
-
- $x = "\x0" . "y";
- ok ($x =~ /^\x{x9b}y$/, "\\x{x9b} is to be treated as \\x0");
-
- $x = "\x0" . "y";
- ok ($x =~ /^\x{0x9b}y$/, "\\x{0x9b} is to be treated as \\x0");
-
- $x = "\x9b" . "y";
- ok ($x =~ /^\x{09b}y$/, "\\x{09b} is to be treated as \\x9b");
-
- $x = "\x9b";
- ok ($x =~ /^[\x{9_b}]$/, "\\x{9_b} is to be treated as \\x9b");
-
- $x = "\x9b" . "y";
- ok ($x =~ /^[\x{9_b}y]{2}$/,
- "\\x{9_b} is to be treated as \\x9b (again)");
-
- $x = "\x9b" . "y";
- ok ($x =~ /^[\x{9b_}y]{2}$/, "\\x{9b_} is to be treated as \\x9b");
-
- $x = "\x9b" . "y";
- ok ($x =~ /^[\x{9_bq}y]{2}$/, "\\x{9_bc} is to be treated as \\x9b");
-
- $x = "\x0" . "y";
- ok ($x =~ /^[\x{x9b}y]{2}$/, "\\x{x9b} is to be treated as \\x0");
-
- $x = "\x0" . "y";
- ok ($x =~ /^[\x{0x9b}y]{2}$/, "\\x{0x9b} is to be treated as \\x0");
-
- $x = "\x9b" . "y";
- ok ($x =~ /^[\x{09b}y]{2}$/, "\\x{09b} is to be treated as \\x9b");
-
- }
-
-
- {
- # High bit bug -- japhy
- my $x = "ab\200d";
- ok $x =~ /.*?\200/, "High bit fine";
- }
-
-
- {
- # The basic character classes and Unicode
- ok "\x{0100}" =~ /\w/, 'LATIN CAPITAL LETTER A WITH MACRON in /\w/';
- ok "\x{0660}" =~ /\d/, 'ARABIC-INDIC DIGIT ZERO in /\d/';
- ok "\x{1680}" =~ /\s/, 'OGHAM SPACE MARK in /\s/';
- }
-
-
- {
- local $Message = "Folding matches and Unicode";
- ok "a\x{100}" =~ /A/i;
- ok "A\x{100}" =~ /a/i;
- ok "a\x{100}" =~ /a/i;
- ok "A\x{100}" =~ /A/i;
- ok "\x{101}a" =~ /\x{100}/i;
- ok "\x{100}a" =~ /\x{100}/i;
- ok "\x{101}a" =~ /\x{101}/i;
- ok "\x{100}a" =~ /\x{101}/i;
- ok "a\x{100}" =~ /A\x{100}/i;
- ok "A\x{100}" =~ /a\x{100}/i;
- ok "a\x{100}" =~ /a\x{100}/i;
- ok "A\x{100}" =~ /A\x{100}/i;
- ok "a\x{100}" =~ /[A]/i;
- ok "A\x{100}" =~ /[a]/i;
- ok "a\x{100}" =~ /[a]/i;
- ok "A\x{100}" =~ /[A]/i;
- ok "\x{101}a" =~ /[\x{100}]/i;
- ok "\x{100}a" =~ /[\x{100}]/i;
- ok "\x{101}a" =~ /[\x{101}]/i;
- ok "\x{100}a" =~ /[\x{101}]/i;
- }
-
-
- {
- use charnames ':full';
- local $Message = "Folding 'LATIN LETTER A WITH GRAVE'";
-
- my $lower = "\N{LATIN SMALL LETTER A WITH GRAVE}";
- my $UPPER = "\N{LATIN CAPITAL LETTER A WITH GRAVE}";
-
- ok $lower =~ m/$UPPER/i;
- ok $UPPER =~ m/$lower/i;
- ok $lower =~ m/[$UPPER]/i;
- ok $UPPER =~ m/[$lower]/i;
-
- local $Message = "Folding 'GREEK LETTER ALPHA WITH VRACHY'";
-
- $lower = "\N{GREEK CAPITAL LETTER ALPHA WITH VRACHY}";
- $UPPER = "\N{GREEK SMALL LETTER ALPHA WITH VRACHY}";
-
- ok $lower =~ m/$UPPER/i;
- ok $UPPER =~ m/$lower/i;
- ok $lower =~ m/[$UPPER]/i;
- ok $UPPER =~ m/[$lower]/i;
-
- local $Message = "Folding 'LATIN LETTER Y WITH DIAERESIS'";
-
- $lower = "\N{LATIN SMALL LETTER Y WITH DIAERESIS}";
- $UPPER = "\N{LATIN CAPITAL LETTER Y WITH DIAERESIS}";
-
- ok $lower =~ m/$UPPER/i;
- ok $UPPER =~ m/$lower/i;
- ok $lower =~ m/[$UPPER]/i;
- ok $UPPER =~ m/[$lower]/i;
- }
-
-
- {
- use charnames ':full';
- local $PatchId = "13843";
- local $Message = "GREEK CAPITAL LETTER SIGMA vs " .
- "COMBINING GREEK PERISPOMENI";
-
- my $SIGMA = "\N{GREEK CAPITAL LETTER SIGMA}";
- my $char = "\N{COMBINING GREEK PERISPOMENI}";
-
- may_not_warn sub {ok "_:$char:_" !~ m/_:$SIGMA:_/i};
- }
-
-
- {
- local $Message = '\X';
- use charnames ':full';
-
- ok "a!" =~ /^(\X)!/ && $1 eq "a";
- ok "\xDF!" =~ /^(\X)!/ && $1 eq "\xDF";
- ok "\x{100}!" =~ /^(\X)!/ && $1 eq "\x{100}";
- ok "\x{100}\x{300}!" =~ /^(\X)!/ && $1 eq "\x{100}\x{300}";
- ok "\N{LATIN CAPITAL LETTER E}!" =~ /^(\X)!/ &&
- $1 eq "\N{LATIN CAPITAL LETTER E}";
- ok "\N{LATIN CAPITAL LETTER E}\N{COMBINING GRAVE ACCENT}!"
- =~ /^(\X)!/ &&
- $1 eq "\N{LATIN CAPITAL LETTER E}\N{COMBINING GRAVE ACCENT}";
-
- local $Message = '\C and \X';
- ok "!abc!" =~ /a\Cc/;
- ok "!abc!" =~ /a\Xc/;
- }
-
-
- {
- local $Message = "Final Sigma";
-
- my $SIGMA = "\x{03A3}"; # CAPITAL
- my $Sigma = "\x{03C2}"; # SMALL FINAL
- my $sigma = "\x{03C3}"; # SMALL
-
- ok $SIGMA =~ /$SIGMA/i;
- ok $SIGMA =~ /$Sigma/i;
- ok $SIGMA =~ /$sigma/i;
-
- ok $Sigma =~ /$SIGMA/i;
- ok $Sigma =~ /$Sigma/i;
- ok $Sigma =~ /$sigma/i;
-
- ok $sigma =~ /$SIGMA/i;
- ok $sigma =~ /$Sigma/i;
- ok $sigma =~ /$sigma/i;
-
- ok $SIGMA =~ /[$SIGMA]/i;
- ok $SIGMA =~ /[$Sigma]/i;
- ok $SIGMA =~ /[$sigma]/i;
-
- ok $Sigma =~ /[$SIGMA]/i;
- ok $Sigma =~ /[$Sigma]/i;
- ok $Sigma =~ /[$sigma]/i;
-
- ok $sigma =~ /[$SIGMA]/i;
- ok $sigma =~ /[$Sigma]/i;
- ok $sigma =~ /[$sigma]/i;
-
- local $Message = "More final Sigma";
-
- my $S3 = "$SIGMA$Sigma$sigma";
-
- ok ":$S3:" =~ /:(($SIGMA)+):/i && $1 eq $S3 && $2 eq $sigma;
- ok ":$S3:" =~ /:(($Sigma)+):/i && $1 eq $S3 && $2 eq $sigma;
- ok ":$S3:" =~ /:(($sigma)+):/i && $1 eq $S3 && $2 eq $sigma;
-
- ok ":$S3:" =~ /:(([$SIGMA])+):/i && $1 eq $S3 && $2 eq $sigma;
- ok ":$S3:" =~ /:(([$Sigma])+):/i && $1 eq $S3 && $2 eq $sigma;
- ok ":$S3:" =~ /:(([$sigma])+):/i && $1 eq $S3 && $2 eq $sigma;
- }
-
-
- {
- use charnames ':full';
- local $Message = "Parlez-Vous " .
- "Fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais?";
-
- ok "Fran\N{LATIN SMALL LETTER C}ais" =~ /Fran.ais/ &&
- $& eq "Francais";
- ok "Fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais" =~ /Fran.ais/ &&
- $& eq "Fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais";
- ok "Fran\N{LATIN SMALL LETTER C}ais" =~ /Fran\Cais/ &&
- $& eq "Francais";
- # COMBINING CEDILLA is two bytes when encoded
- ok "Franc\N{COMBINING CEDILLA}ais" =~ /Franc\C\Cais/;
- ok "Fran\N{LATIN SMALL LETTER C}ais" =~ /Fran\Xais/ &&
- $& eq "Francais";
- ok "Fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais" =~ /Fran\Xais/ &&
- $& eq "Fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais";
- ok "Franc\N{COMBINING CEDILLA}ais" =~ /Fran\Xais/ &&
- $& eq "Franc\N{COMBINING CEDILLA}ais";
- ok "Fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais" =~
- /Fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais/ &&
- $& eq "Fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais";
- ok "Franc\N{COMBINING CEDILLA}ais" =~ /Franc\N{COMBINING CEDILLA}ais/ &&
- $& eq "Franc\N{COMBINING CEDILLA}ais";
-
- my @f = (
- ["Fran\N{LATIN SMALL LETTER C}ais", "Francais"],
- ["Fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais",
- "Fran\N{LATIN SMALL LETTER C WITH CEDILLA}ais"],
- ["Franc\N{COMBINING CEDILLA}ais", "Franc\N{COMBINING CEDILLA}ais"],
- );
- foreach my $entry (@f) {
- my ($subject, $match) = @$entry;
- ok $subject =~ /Fran(?:c\N{COMBINING CEDILLA}?|
- \N{LATIN SMALL LETTER C WITH CEDILLA})ais/x &&
- $& eq $match;
- }
- }
-
-
- {
- local $Message = "Lingering (and useless) UTF8 flag doesn't mess up /i";
- my $pat = "ABcde";
- my $str = "abcDE\x{100}";
- chop $str;
- ok $str =~ /$pat/i;
-
- $pat = "ABcde\x{100}";
- $str = "abcDE";
- chop $pat;
- ok $str =~ /$pat/i;
-
- $pat = "ABcde\x{100}";
- $str = "abcDE\x{100}";
- chop $pat;
- chop $str;
- ok $str =~ /$pat/i;
- }
-
-
- {
- use charnames ':full';
- local $Message = "LATIN SMALL LETTER SHARP S " .
- "(\N{LATIN SMALL LETTER SHARP S})";
-
- ok "\N{LATIN SMALL LETTER SHARP S}" =~
- /\N{LATIN SMALL LETTER SHARP S}/;
- ok "\N{LATIN SMALL LETTER SHARP S}" =~
- /\N{LATIN SMALL LETTER SHARP S}/i;
- ok "\N{LATIN SMALL LETTER SHARP S}" =~
- /[\N{LATIN SMALL LETTER SHARP S}]/;
- ok "\N{LATIN SMALL LETTER SHARP S}" =~
- /[\N{LATIN SMALL LETTER SHARP S}]/i;
-
- ok "ss" =~ /\N{LATIN SMALL LETTER SHARP S}/i;
- ok "SS" =~ /\N{LATIN SMALL LETTER SHARP S}/i;
- ok "ss" =~ /[\N{LATIN SMALL LETTER SHARP S}]/i;
- ok "SS" =~ /[\N{LATIN SMALL LETTER SHARP S}]/i;
-
- ok "\N{LATIN SMALL LETTER SHARP S}" =~ /ss/i;
- ok "\N{LATIN SMALL LETTER SHARP S}" =~ /SS/i;
-
- local $Message = "Unoptimized named sequence in class";
- ok "ss" =~ /[\N{LATIN SMALL LETTER SHARP S}x]/i;
- ok "SS" =~ /[\N{LATIN SMALL LETTER SHARP S}x]/i;
- ok "\N{LATIN SMALL LETTER SHARP S}" =~
- /[\N{LATIN SMALL LETTER SHARP S}x]/;
- ok "\N{LATIN SMALL LETTER SHARP S}" =~
- /[\N{LATIN SMALL LETTER SHARP S}x]/i;
- }
-
-
- {
- # More whitespace: U+0085, U+2028, U+2029\n";
-
- # U+0085, U+00A0 need to be forced to be Unicode, the \x{100} does that.
- SKIP: {
- skip "EBCDIC platform", 4 if $IS_EBCDIC;
- # Do \x{0015} and \x{0041} match \s in EBCDIC?
- ok "<\x{100}\x{0085}>" =~ /<\x{100}\s>/, '\x{0085} in \s';
- ok "<\x{0085}>" =~ /<\v>/, '\x{0085} in \v';
- ok "<\x{100}\x{00A0}>" =~ /<\x{100}\s>/, '\x{00A0} in \s';
- ok "<\x{00A0}>" =~ /<\h>/, '\x{00A0} in \h';
- }
- my @h = map {sprintf "%05x" => $_} 0x01680, 0x0180E, 0x02000 .. 0x0200A,
- 0x0202F, 0x0205F, 0x03000;
- my @v = map {sprintf "%05x" => $_} 0x02028, 0x02029;
-
- my @H = map {sprintf "%05x" => $_} 0x01361, 0x0200B, 0x02408, 0x02420,
- 0x0303F, 0xE0020;
- my @V = map {sprintf "%05x" => $_} 0x0008A .. 0x0008D, 0x00348, 0x10100,
- 0xE005F, 0xE007C;
-
- for my $hex (@h) {
- my $str = eval qq ["<\\x{$hex}>"];
- ok $str =~ /<\s>/, "\\x{$hex} in \\s";
- ok $str =~ /<\h>/, "\\x{$hex} in \\h";
- ok $str !~ /<\v>/, "\\x{$hex} not in \\v";
- }
-
- for my $hex (@v) {
- my $str = eval qq ["<\\x{$hex}>"];
- ok $str =~ /<\s>/, "\\x{$hex} in \\s";
- ok $str =~ /<\v>/, "\\x{$hex} in \\v";
- ok $str !~ /<\h>/, "\\x{$hex} not in \\h";
- }
-
- for my $hex (@H) {
- my $str = eval qq ["<\\x{$hex}>"];
- ok $str =~ /<\S>/, "\\x{$hex} in \\S";
- ok $str =~ /<\H>/, "\\x{$hex} in \\H";
- }
-
- for my $hex (@V) {
- my $str = eval qq ["<\\x{$hex}>"];
- ok $str =~ /<\S>/, "\\x{$hex} in \\S";
- ok $str =~ /<\V>/, "\\x{$hex} in \\V";
- }
- }
-
-
- {
- # . with /s should work on characters, as opposed to bytes
- local $Message = ". with /s works on characters, not bytes";
-
- my $s = "\x{e4}\x{100}";
- # This is not expected to match: the point is that
- # neither should we get "Malformed UTF-8" warnings.
- may_not_warn sub {$s =~ /\G(.+?)\n/gcs}, "No 'Malformed UTF-8' warning";
-
- my @c;
- push @c => $1 while $s =~ /\G(.)/gs;
-
- local $" = "";
- iseq "@c", $s;
-
- # Test only chars < 256
- my $t1 = "Q003\n\n\x{e4}\x{f6}\n\nQ004\n\n\x{e7}";
- my $r1 = "";
- while ($t1 =~ / \G ( .+? ) \n\s+ ( .+? ) ( $ | \n\s+ ) /xgcs) {
- $r1 .= $1 . $2;
- }
-
- my $t2 = $t1 . "\x{100}"; # Repeat with a larger char
- my $r2 = "";
- while ($t2 =~ / \G ( .+? ) \n\s+ ( .+? ) ( $ | \n\s+ ) /xgcs) {
- $r2 .= $1 . $2;
- }
- $r2 =~ s/\x{100}//;
-
- iseq $r1, $r2;
- }
-
-
- {
- local $Message = "Unicode lookbehind";
- ok "A\x{100}B" =~ /(?<=A.)B/;
- ok "A\x{200}\x{300}B" =~ /(?<=A..)B/;
- ok "\x{400}AB" =~ /(?<=\x{400}.)B/;
- ok "\x{500}\x{600}B" =~ /(?<=\x{500}.)B/;
-
- # Original code also contained:
- # ok "\x{500\x{600}}B" =~ /(?<=\x{500}.)B/;
- # but that looks like a typo.
- }
-
-
- {
- local $Message = 'UTF-8 hash keys and /$/';
- # http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters
- # /2002-01/msg01327.html
-
- my $u = "a\x{100}";
- my $v = substr ($u, 0, 1);
- my $w = substr ($u, 1, 1);
- my %u = ($u => $u, $v => $v, $w => $w);
- for (keys %u) {
- my $m1 = /^\w*$/ ? 1 : 0;
- my $m2 = $u {$_} =~ /^\w*$/ ? 1 : 0;
- iseq $m1, $m2;
- }
- }
-
-
- {
- local $BugId = "20020124.005";
- local $PatchId = "14795";
- local $Message = "s///eg";
-
- for my $char ("a", "\x{df}", "\x{100}") {
- my $x = "$char b $char";
- $x =~ s{($char)}{
- "c" =~ /c/;
- "x";
- }ge;
- iseq substr ($x, 0, 1), substr ($x, -1, 1);
- }
- }
-
-
- {
- local $Message = "No SEGV in s/// and UTF-8";
- my $s = "s#\x{100}" x 4;
- ok $s =~ s/[^\w]/ /g;
- if ($ENV {REAL_POSIX_CC}) {
- iseq $s, "s " x 4;
- }
- else {
- iseq $s, "s \x{100}" x 4;
- }
- }
-
-
- {
- local $Message = "UTF-8 bug (maybe already known?)";
- my $u = "foo";
- $u =~ s/./\x{100}/g;
- iseq $u, "\x{100}\x{100}\x{100}";
-
- $u = "foobar";
- $u =~ s/[ao]/\x{100}/g;
- iseq $u, "f\x{100}\x{100}b\x{100}r";
-
- $u =~ s/\x{100}/e/g;
- iseq $u, "feeber";
- }
-
-
- {
- local $Message = "UTF-8 bug with s///";
- # check utf8/non-utf8 mixtures
- # try to force all float/anchored check combinations
-
- my $c = "\x{100}";
- my $subst;
- for my $re ("xx.*$c", "x.*$c$c", "$c.*xx", "$c$c.*x",
- "xx.*(?=$c)", "(?=$c).*xx",) {
- ok "xxx" !~ /$re/;
- ok +($subst = "xxx") !~ s/$re//;
- }
- for my $re ("xx.*$c*", "$c*.*xx") {
- ok "xxx" =~ /$re/;
- ok +($subst = "xxx") =~ s/$re//;
- iseq $subst, "";
- }
- for my $re ("xxy*", "y*xx") {
- ok "xx$c" =~ /$re/;
- ok +($subst = "xx$c") =~ s/$re//;
- iseq $subst, $c;
- ok "xy$c" !~ /$re/;
- ok +($subst = "xy$c") !~ s/$re//;
- }
- for my $re ("xy$c*z", "x$c*yz") {
- ok "xyz" =~ /$re/;
- ok +($subst = "xyz") =~ s/$re//;
- iseq $subst, "";
- }
- }
-
-
- {
- local $Message = "qr /.../x";
- my $R = qr / A B C # D E/x;
- ok "ABCDE" =~ $R && $& eq "ABC";
- ok "ABCDE" =~ /$R/ && $& eq "ABC";
- ok "ABCDE" =~ m/$R/ && $& eq "ABC";
- ok "ABCDE" =~ /($R)/ && $1 eq "ABC";
- ok "ABCDE" =~ m/($R)/ && $1 eq "ABC";
- }
-
-
- {
- local $BugId = "20020412.005";
- local $Message = "Correct pmop flags checked when empty pattern";
-
- # Requires reuse of last successful pattern.
- my $num = 123;
- $num =~ /\d/;
- for (0 .. 1) {
- my $match = ?? + 0;
- ok $match != $_, $Message,
- sprintf "'match one' %s on %s iteration" =>
- $match ? 'succeeded' : 'failed',
- $_ ? 'second' : 'first';
- }
- $num =~ /(\d)/;
- my $result = join "" => $num =~ //g;
- iseq $result, $num;
- }
-
-
- {
- local $BugId = '20020630.002';
- local $Message = 'UTF-8 regex matches above 32k';
- for (['byte', "\x{ff}"], ['utf8', "\x{1ff}"]) {
- my ($type, $char) = @$_;
- for my $len (32000, 32768, 33000) {
- my $s = $char . "f" x $len;
- my $r = $s =~ /$char([f]*)/gc;
- ok $r, $Message, "<$type x $len>";
- ok !$r || pos ($s) == $len + 1, $Message,
- "<$type x $len>; pos = @{[pos $s]}";
- }
- }
- }
-
-
- {
- our $a = bless qr /foo/ => 'Foo';
- ok 'goodfood' =~ $a, "Reblessed qr // matches";
- iseq $a, '(?-xism:foo)', "Reblessed qr // stringifies";
- my $x = "\x{3fe}";
- my $z = my $y = "\317\276"; # Byte representation of $x
- $a = qr /$x/;
- ok $x =~ $a, "UTF-8 interpolation in qr //";
- ok "a$a" =~ $x, "Stringified qr // preserves UTF-8";
- ok "a$x" =~ /^a$a\z/, "Interpolated qr // preserves UTF-8";
- ok "a$x" =~ /^a(??{$a})\z/,
- "Postponed interpolation of qr // preserves UTF-8";
- {
- local $BugId = '17776';
- iseq length qr /##/x, 12, "## in qr // doesn't corrupt memory";
- }
- {
- use re 'eval';
- ok "$x$x" =~ /^$x(??{$x})\z/,
- "Postponed UTF-8 string in UTF-8 re matches UTF-8";
- ok "$y$x" =~ /^$y(??{$x})\z/,
- "Postponed UTF-8 string in non-UTF-8 re matches UTF-8";
- ok "$y$x" !~ /^$y(??{$y})\z/,
- "Postponed non-UTF-8 string in non-UTF-8 re doesn't match UTF-8";
- ok "$x$x" !~ /^$x(??{$y})\z/,
- "Postponed non-UTF-8 string in UTF-8 re doesn't match UTF-8";
- ok "$y$y" =~ /^$y(??{$y})\z/,
- "Postponed non-UTF-8 string in non-UTF-8 re matches non-UTF8";
- ok "$x$y" =~ /^$x(??{$y})\z/,
- "Postponed non-UTF-8 string in UTF-8 re matches non-UTF8";
-
- $y = $z; # Reset $y after upgrade.
- ok "$x$y" !~ /^$x(??{$x})\z/,
- "Postponed UTF-8 string in UTF-8 re doesn't match non-UTF-8";
- ok "$y$y" !~ /^$y(??{$x})\z/,
- "Postponed UTF-8 string in non-UTF-8 re doesn't match non-UTF-8";
- }
- }
-
-
- {
- local $PatchId = '18179';
- my $s = "\x{100}" x 5;
- my $ok = $s =~ /(\x{100}{4})/;
- my ($ord, $len) = (ord $1, length $1);
- ok $ok && $ord == 0x100 && $len == 4, "No panic: end_shift";
- }
-
-
- {
- local $BugId = '15763';
- our $a = "x\x{100}";
- chop $a; # Leaves the UTF-8 flag
- $a .= "y"; # 1 byte before 'y'.
-
- ok $a =~ /^\C/, 'match one \C on 1-byte UTF-8';
- ok $a =~ /^\C{1}/, 'match \C{1}';
-
- ok $a =~ /^\Cy/, 'match \Cy';
- ok $a =~ /^\C{1}y/, 'match \C{1}y';
-
- ok $a !~ /^\C\Cy/, q {don't match two \Cy};
- ok $a !~ /^\C{2}y/, q {don't match \C{2}y};
-
- $a = "\x{100}y"; # 2 bytes before "y"
-
- ok $a =~ /^\C/, 'match one \C on 2-byte UTF-8';
- ok $a =~ /^\C{1}/, 'match \C{1}';
- ok $a =~ /^\C\C/, 'match two \C';
- ok $a =~ /^\C{2}/, 'match \C{2}';
-
- ok $a =~ /^\C\C\C/, 'match three \C on 2-byte UTF-8 and a byte';
- ok $a =~ /^\C{3}/, 'match \C{3}';
-
- ok $a =~ /^\C\Cy/, 'match two \C';
- ok $a =~ /^\C{2}y/, 'match \C{2}';
-
- ok $a !~ /^\C\C\Cy/, q {don't match three \Cy};
- ok $a !~ /^\C{2}\Cy/, q {don't match \C{2}\Cy};
- ok $a !~ /^\C{3}y/, q {don't match \C{3}y};
-
- $a = "\x{1000}y"; # 3 bytes before "y"
-
- ok $a =~ /^\C/, 'match one \C on three-byte UTF-8';
- ok $a =~ /^\C{1}/, 'match \C{1}';
- ok $a =~ /^\C\C/, 'match two \C';
- ok $a =~ /^\C{2}/, 'match \C{2}';
- ok $a =~ /^\C\C\C/, 'match three \C';
- ok $a =~ /^\C{3}/, 'match \C{3}';
-
- ok $a =~ /^\C\C\C\C/, 'match four \C on three-byte UTF-8 and a byte';
- ok $a =~ /^\C{4}/, 'match \C{4}';
-
- ok $a =~ /^\C\C\Cy/, 'match three \Cy';
- ok $a =~ /^\C{3}y/, 'match \C{3}y';
-
- ok $a !~ /^\C\C\C\Cy/, q {don't match four \Cy};
- ok $a !~ /^\C{4}y/, q {don't match \C{4}y};
- }
-
-
- {
- local $\;
- $_ = 'aaaaaaaaaa';
- utf8::upgrade($_); chop $_; $\="\n";
- ok /[^\s]+/, 'm/[^\s]/ utf8';
- ok /[^\d]+/, 'm/[^\d]/ utf8';
- ok +($a = $_, $_ =~ s/[^\s]+/./g), 's/[^\s]/ utf8';
- ok +($a = $_, $a =~ s/[^\d]+/./g), 's/[^\s]/ utf8';
- }
-
-
- {
- local $BugId = '15397';
- local $Message = 'UTF-8 matching';
- ok "\x{100}" =~ /\x{100}/;
- ok "\x{100}" =~ /(\x{100})/;
- ok "\x{100}" =~ /(\x{100}){1}/;
- ok "\x{100}\x{100}" =~ /(\x{100}){2}/;
- ok "\x{100}\x{100}" =~ /(\x{100})(\x{100})/;
- }
-
-
- {
- local $BugId = '7471';
- local $Message = 'Neither ()* nor ()*? sets $1 when matched 0 times';
- local $_ = 'CD';
- ok /(AB)*?CD/ && !defined $1;
- ok /(AB)*CD/ && !defined $1;
- }
-
-
- {
- local $BugId = '3547';
- local $Message = "Caching shouldn't prevent match";
- my $pattern = "^(b+?|a){1,2}c";
- ok "bac" =~ /$pattern/ && $1 eq 'a';
- ok "bbac" =~ /$pattern/ && $1 eq 'a';
- ok "bbbac" =~ /$pattern/ && $1 eq 'a';
- ok "bbbbac" =~ /$pattern/ && $1 eq 'a';
- }
-
-
-
- {
- local $BugId = '18232';
- local $Message = '$1 should keep UTF-8 ness';
- ok "\x{100}" =~ /(.)/;
- iseq $1, "\x{100}", '$1 is UTF-8';
- { 'a' =~ /./; }
- iseq $1, "\x{100}", '$1 is still UTF-8';
- isneq $1, "\xC4\x80", '$1 is not non-UTF-8';
- }
-
-
- {
- local $BugId = '19767';
- local $Message = "Optimizer doesn't prematurely reject match";
- use utf8;
-
- my $attr = 'Name-1';
- my $NormalChar = qr /[\p{IsDigit}\p{IsLower}\p{IsUpper}]/;
- my $NormalWord = qr /${NormalChar}+?/;
- my $PredNameHyphen = qr /^${NormalWord}(\-${NormalWord})*?$/;
-
- $attr =~ /^$/;
- ok $attr =~ $PredNameHyphen; # Original test.
-
- "a" =~ m/[b]/;
- ok "0" =~ /\p{N}+\z/; # Variant.
- }
-
-
- {
- local $BugId = '20683';
- local $Message = "(??{ }) doesn't return stale values";
- our $p = 1;
- foreach (1, 2, 3, 4) {
- $p ++ if /(??{ $p })/
- }
- iseq $p, 5;
-
- {
- package P;
- $a = 1;
- sub TIESCALAR {bless []}
- sub FETCH {$a ++}
- }
- tie $p, "P";
- foreach (1, 2, 3, 4) {
- /(??{ $p })/
- }
- iseq $p, 5;
- }
-
-
- {
- # Subject: Odd regexp behavior
- # From: Markus Kuhn <Markus.Kuhn at cl.cam.ac.uk>
- # Date: Wed, 26 Feb 2003 16:53:12 +0000
- # Message-Id: <E18o4nw-0008Ly-00 at wisbech.cl.cam.ac.uk>
- # To: perl-unicode at perl.org
-
- local $Message = 'Markus Kuhn 2003-02-26';
-
- my $x = "\x{2019}\nk";
- ok $x =~ s/(\S)\n(\S)/$1 $2/sg;
- ok $x eq "\x{2019} k";
-
- $x = "b\nk";
- ok $x =~ s/(\S)\n(\S)/$1 $2/sg;
- ok $x eq "b k";
-
- ok "\x{2019}" =~ /\S/;
- }
-
-
- {
- local $BugId = '21411';
- local $Message = "(??{ .. }) in split doesn't corrupt its stack";
- our $i;
- ok '-1-3-5-' eq join '', split /((??{$i++}))/, '-1-3-5-';
- no warnings 'deprecated', 'syntax';
- split /(?{'WOW'})/, 'abc';
- local $" = "|";
- iseq "@_", "a|b|c";
- }
-
-
- {
- # XXX DAPM 13-Apr-06. Recursive split is still broken. It's only luck it
- # hasn't been crashing. Disable this test until it is fixed properly.
- # XXX also check what it returns rather than just doing ok(1,...)
- # split /(?{ split "" })/, "abc";
- local $TODO = "Recursive split is still broken";
- ok 0, 'cache_re & "(?{": it dumps core in 5.6.1 & 5.8.0';
- }
-
-
- {
- ok "\x{100}\n" =~ /\x{100}\n$/, "UTF-8 length cache and fbm_compile";
- }
-
-
- {
- package Str;
- use overload q /""/ => sub {${$_ [0]};};
- sub new {my ($c, $v) = @_; bless \$v, $c;}
-
- package main;
- $_ = Str -> new ("a\x{100}/\x{100}b");
- ok join (":", /\b(.)\x{100}/g) eq "a:/", "re_intuit_start and PL_bostr";
- }
-
-
- {
- local $BugId = '17757';
- $_ = "code: 'x' { '...' }\n"; study;
- my @x; push @x, $& while m/'[^\']*'/gx;
- local $" = ":";
- iseq "@x", "'x':'...'", "Parse::RecDescent triggered infinite loop";
- }
-
-
- {
- my $re = qq /^([^X]*)X/;
- utf8::upgrade ($re);
- ok "\x{100}X" =~ /$re/, "S_cl_and ANYOF_UNICODE & ANYOF_INVERTED";
- }
-
-
- {
- local $BugId = '22354';
- sub func ($) {
- ok "a\nb" !~ /^b/, "Propagated modifier; $_[0]";
- ok "a\nb" =~ /^b/m, "Propagated modifier; $_[0] - with /m";
- }
- func "standalone";
- $_ = "x"; s/x/func "in subst"/e;
- $_ = "x"; s/x/func "in multiline subst"/em;
-
- #
- # Next two give 'panic: malloc'.
- # Outcommented, using two TODOs.
- #
- local $TODO = 'panic: malloc';
- local $Message = 'Postponed regexp and propaged modifier';
- # ok 0 for 1 .. 2;
- SKIP: {
- skip "panic: malloc", 2;
- $_ = "x"; /x(?{func "in regexp"})/;
- $_ = "x"; /x(?{func "in multiline regexp"})/m;
- }
- }
-
-
- {
- local $BugId = '19049';
- $_ = "abcdef\n";
- my @x = m/./g;
- iseq "abcde", $`, 'Global match sets $`';
- }
-
-
- {
- ok "123\x{100}" =~ /^.*1.*23\x{100}$/,
- 'UTF-8 + multiple floating substr';
- }
-
-
- {
- local $Message = '<20030808193656.5109.1 at llama.ni-s.u-net.com>';
-
- # LATIN SMALL/CAPITAL LETTER A WITH MACRON
- ok " \x{101}" =~ qr/\x{100}/i;
-
- # LATIN SMALL/CAPITAL LETTER A WITH RING BELOW
- ok " \x{1E01}" =~ qr/\x{1E00}/i;
-
- # DESERET SMALL/CAPITAL LETTER LONG I
- ok " \x{10428}" =~ qr/\x{10400}/i;
-
- # LATIN SMALL/CAPITAL LETTER A WITH RING BELOW + 'X'
- ok " \x{1E01}x" =~ qr/\x{1E00}X/i;
- }
-
-
- {
- # [perl #23769] Unicode regex broken on simple example
- # regrepeat() didn't handle UTF-8 EXACT case right.
- local $BugId = '23769';
- my $Mess = 'regrepeat() handles UTF-8 EXACT case right';
- local $Message = $Mess;
-
- my $s = "\x{a0}\x{a0}\x{a0}\x{100}"; chop $s;
-
- ok $s =~ /\x{a0}/;
- ok $s =~ /\x{a0}+/;
- ok $s =~ /\x{a0}\x{a0}/;
-
- $Message = "$Mess (easy variant)";
- ok "aaa\x{100}" =~ /(a+)/;
- iseq $1, "aaa";
-
- $Message = "$Mess (easy invariant)";
- ok "aaa\x{100} " =~ /(a+?)/;
- iseq $1, "a";
-
- $Message = "$Mess (regrepeat variant)";
- ok "\xa0\xa0\xa0\x{100} " =~ /(\xa0+?)/;
- iseq $1, "\xa0";
-
- $Message = "$Mess (regrepeat invariant)";
- ok "\xa0\xa0\xa0\x{100}" =~ /(\xa0+)/;
- iseq $1, "\xa0\xa0\xa0";
-
- $Message = "$Mess (hard variant)";
- ok "\xa0\xa1\xa0\xa1\xa0\xa1\x{100}" =~ /((?:\xa0\xa1)+?)/;
- iseq $1, "\xa0\xa1";
-
- $Message = "$Mess (hard invariant)";
- ok "ababab\x{100} " =~ /((?:ab)+)/;
- iseq $1, 'ababab';
-
- ok "\xa0\xa1\xa0\xa1\xa0\xa1\x{100}" =~ /((?:\xa0\xa1)+)/;
- iseq $1, "\xa0\xa1\xa0\xa1\xa0\xa1";
-
- ok "ababab\x{100} " =~ /((?:ab)+?)/;
- iseq $1, "ab";
-
- $Message = "Don't match first byte of UTF-8 representation";
- ok "\xc4\xc4\xc4" !~ /(\x{100}+)/;
- ok "\xc4\xc4\xc4" !~ /(\x{100}+?)/;
- ok "\xc4\xc4\xc4" !~ /(\x{100}++)/;
- }
-
-
- {
- for (120 .. 130) {
- my $head = 'x' x $_;
- local $Message = q [Don't misparse \x{...} in regexp ] .
- q [near 127 char EXACT limit];
- for my $tail ('\x{0061}', '\x{1234}', '\x61') {
- eval_ok qq ["$head$tail" =~ /$head$tail/];
- }
- local $Message = q [Don't misparse \N{...} in regexp ] .
- q [near 127 char EXACT limit];
- for my $tail ('\N{SNOWFLAKE}') {
- eval_ok qq [use charnames ':full';
- "$head$tail" =~ /$head$tail/];
- }
- }
- }
-
-
- {
- # perl panic: pp_match start/end pointers
- local $BugId = '25269';
- iseq "a-bc", eval {my ($x, $y) = "bca" =~ /^(?=.*(a)).*(bc)/; "$x-$y"},
- 'Captures can move backwards in string';
- }
-
-
- {
- local $BugId = '27940'; # \cA not recognized in character classes
- ok "a\cAb" =~ /\cA/, '\cA in pattern';
- ok "a\cAb" =~ /[\cA]/, '\cA in character class';
- ok "a\cAb" =~ /[\cA-\cB]/, '\cA in character class range';
- ok "abc" =~ /[^\cA-\cB]/, '\cA in negated character class range';
- ok "a\cBb" =~ /[\cA-\cC]/, '\cB in character class range';
- ok "a\cCbc" =~ /[^\cA-\cB]/, '\cC in negated character class range';
- ok "a\cAb" =~ /(??{"\cA"})/, '\cA in ??{} pattern';
- ok "ab" !~ /a\cIb/x, '\cI in pattern';
- }
-
-
- {
- # perl #28532: optional zero-width match at end of string is ignored
- local $BugId = '28532';
- ok "abc" =~ /^abc(\z)?/ && defined($1),
- 'Optional zero-width match at end of string';
- ok "abc" =~ /^abc(\z)??/ && !defined($1),
- 'Optional zero-width match at end of string';
- }
-
-
-
- { # TRIE related
- our @got = ();
- "words" =~ /(word|word|word)(?{push @got, $1})s$/;
- iseq @got, 1, "TRIE optimation";
-
- @got = ();
- "words" =~ /(word|word|word)(?{push @got,$1})s$/i;
- iseq @got, 1,"TRIEF optimisation";
-
- my @nums = map {int rand 1000} 1 .. 100;
- my $re = "(" . (join "|", @nums) . ")";
- $re = qr/\b$re\b/;
-
- foreach (@nums) {
- ok $_ =~ /$re/, "Trie nums";
- }
-
- $_ = join " ", @nums;
- @got = ();
- push @got, $1 while /$re/g;
-
- my %count;
- $count {$_} ++ for @got;
- my $ok = 1;
- for (@nums) {
- $ok = 0 if --$count {$_} < 0;
- }
- ok $ok, "Trie min count matches";
- }
-
-
- {
- # TRIE related
- # LATIN SMALL/CAPITAL LETTER A WITH MACRON
- ok "foba \x{101}foo" =~ qr/(foo|\x{100}foo|bar)/i &&
- $1 eq "\x{101}foo",
- "TRIEF + LATIN SMALL/CAPITAL LETTER A WITH MACRON";
-
- # LATIN SMALL/CAPITAL LETTER A WITH RING BELOW
- ok "foba \x{1E01}foo" =~ qr/(foo|\x{1E00}foo|bar)/i &&
- $1 eq "\x{1E01}foo",
- "TRIEF + LATIN SMALL/CAPITAL LETTER A WITH RING BELOW";
-
- # DESERET SMALL/CAPITAL LETTER LONG I
- ok "foba \x{10428}foo" =~ qr/(foo|\x{10400}foo|bar)/i &&
- $1 eq "\x{10428}foo",
- "TRIEF + DESERET SMALL/CAPITAL LETTER LONG I";
-
- # LATIN SMALL/CAPITAL LETTER A WITH RING BELOW + 'X'
- ok "foba \x{1E01}xfoo" =~ qr/(foo|\x{1E00}Xfoo|bar)/i &&
- $1 eq "\x{1E01}xfoo",
- "TRIEF + LATIN SMALL/CAPITAL LETTER A WITH RING BELOW + 'X'";
-
- use charnames ':full';
-
- my $s = "\N{LATIN SMALL LETTER SHARP S}";
- ok "foba ba$s" =~ qr/(foo|Ba$s|bar)/i && $1 eq "ba$s",
- "TRIEF + LATIN SMALL LETTER SHARP S =~ ss";
- ok "foba ba$s" =~ qr/(Ba$s|foo|bar)/i && $1 eq "ba$s",
- "TRIEF + LATIN SMALL LETTER SHARP S =~ ss";
- ok "foba ba$s" =~ qr/(foo|bar|Ba$s)/i && $1 eq "ba$s",
- "TRIEF + LATIN SMALL LETTER SHARP S =~ ss";
-
- ok "foba ba$s" =~ qr/(foo|Bass|bar)/i && $1 eq "ba$s",
- "TRIEF + LATIN SMALL LETTER SHARP S =~ ss";
-
- ok "foba ba$s" =~ qr/(foo|BaSS|bar)/i && $1 eq "ba$s",
- "TRIEF + LATIN SMALL LETTER SHARP S =~ SS";
-
- ok "foba ba${s}pxySS$s$s" =~ qr/(b(?:a${s}t|a${s}f|a${s}p)[xy]+$s*)/i
- && $1 eq "ba${s}pxySS$s$s",
- "COMMON PREFIX TRIEF + LATIN SMALL LETTER SHARP S";
- }
-
-
- SKIP:
- {
- print "# Set PERL_SKIP_PSYCHO_TEST to skip this test\n";
- my @normal = qw [the are some normal words];
-
- skip "Skipped Psycho", 2 * @normal if $ENV {PERL_SKIP_PSYCHO_TEST};
-
- local $" = "|";
-
- my @psycho = (@normal, map chr $_, 255 .. 20000);
- my $psycho1 = "@psycho";
- for (my $i = @psycho; -- $i;) {
- my $j = int rand (1 + $i);
- @psycho [$i, $j] = @psycho [$j, $i];
- }
- my $psycho2 = "@psycho";
-
- foreach my $word (@normal) {
- ok $word =~ /($psycho1)/ && $1 eq $word, 'Psycho';
- ok $word =~ /($psycho2)/ && $1 eq $word, 'Psycho';
- }
- }
-
-
- {
- local $BugId = '36207';
- my $utf8 = "\xe9\x{100}"; chop $utf8;
- my $latin1 = "\xe9";
-
- ok $utf8 =~ /\xe9/i, "utf8/latin";
- ok $utf8 =~ /$latin1/i, "utf8/latin runtime";
- ok $utf8 =~ /(abc|\xe9)/i, "utf8/latin trie";
- ok $utf8 =~ /(abc|$latin1)/i, "utf8/latin trie runtime";
-
- ok "\xe9" =~ /$utf8/i, "latin/utf8";
- ok "\xe9" =~ /(abc|$utf8)/i, "latin/utf8 trie";
- ok $latin1 =~ /$utf8/i, "latin/utf8 runtime";
- ok $latin1 =~ /(abc|$utf8)/i, "latin/utf8 trie runtime";
- }
-
-
- {
- local $BugId = '37038';
- my $s = "abcd";
- $s =~ /(..)(..)/g;
- $s = $1;
- $s = $2;
- iseq $2, 'cd',
- "Assigning to original string does not corrupt match vars";
- }
-
-
- {
- {
- package wooosh;
- sub gloople {"!"}
- }
- my $aeek = bless {} => 'wooosh';
- eval_ok sub {$aeek -> gloople () =~ /(.)/g},
- "//g match against return value of sub";
-
- sub gloople {"!"}
- eval_ok sub {gloople () =~ /(.)/g},
- "26410 didn't affect sub calls for some reason";
- }
-
-
- {
- local $TODO = "See changes 26925-26928, which reverted change 26410";
- {
- package lv;
- our $var = "abc";
- sub variable : lvalue {$var}
- }
- my $o = bless [] => 'lv';
- my $f = "";
- my $r = eval {
- for (1 .. 2) {
- $f .= $1 if $o -> variable =~ /(.)/g;
- }
- 1;
- };
- if ($r) {
- iseq $f, "ab", "pos() retained between calls";
- }
- else {
- local $TODO;
- ok 0, "Code failed: $@";
- }
-
- our $var = "abc";
- sub variable : lvalue {$var}
- my $g = "";
- my $s = eval {
- for (1 .. 2) {
- $g .= $1 if variable =~ /(.)/g;
- }
- 1;
- };
- if ($s) {
- iseq $g, "ab", "pos() retained between calls";
- }
- else {
- local $TODO;
- ok 0, "Code failed: $@";
- }
- }
-
-
- SKIP:
- {
- local $BugId = '37836';
- skip "In EBCDIC" if $IS_EBCDIC;
- no warnings 'utf8';
- $_ = pack 'U0C2', 0xa2, 0xf8; # Ill-formed UTF-8
- my $ret = 0;
- eval_ok sub {!($ret = s/[\0]+//g)},
- "Ill-formed UTF-8 doesn't match NUL in class";
- }
-
-
- {
- # chr(65535) should be allowed in regexes
- local $BugId = '38293';
- no warnings 'utf8'; # To allow non-characters
- my ($c, $r, $s);
-
- $c = chr 0xffff;
- $c =~ s/$c//g;
- ok $c eq "", "U+FFFF, parsed as atom";
-
- $c = chr 0xffff;
- $r = "\\$c";
- $c =~ s/$r//g;
- ok $c eq "", "U+FFFF backslashed, parsed as atom";
-
- $c = chr 0xffff;
- $c =~ s/[$c]//g;
- ok $c eq "", "U+FFFF, parsed in class";
-
- $c = chr 0xffff;
- $r = "[\\$c]";
- $c =~ s/$r//g;
- ok $c eq "", "U+FFFF backslashed, parsed in class";
-
- $s = "A\x{ffff}B";
- $s =~ s/\x{ffff}//i;
- ok $s eq "AB", "U+FFFF, EXACTF";
-
- $s = "\x{ffff}A";
- $s =~ s/\bA//;
- ok $s eq "\x{ffff}", "U+FFFF, BOUND";
-
- $s = "\x{ffff}!";
- $s =~ s/\B!//;
- ok $s eq "\x{ffff}", "U+FFFF, NBOUND";
- }
-
-
- {
- local $BugId = '39583';
-
- # The printing characters
- my @chars = ("A" .. "Z");
- my $delim = ",";
- my $size = 32771 - 4;
- my $str = '';
-
- # Create some random junk. Inefficient, but it works.
- for (my $i = 0; $i < $size; $ i++) {
- $str .= $chars [rand @chars];
- }
-
- $str .= ($delim x 4);
- my $res;
- my $matched;
- ok $str =~ s/^(.*?)${delim}{4}//s, "Pattern matches";
- iseq $str, "", "Empty string";
- ok defined $1 && length ($1) == $size, '$1 is correct size';
- }
-
-
- {
- local $BugId = '27940';
- ok "\0-A" =~ /\c at -A/, '@- should not be interpolated in a pattern';
- ok "\0\0A" =~ /\c at +A/, '@+ should not be interpolated in a pattern';
- ok "X\@-A" =~ /X at -A/, '@- should not be interpolated in a pattern';
- ok "X\@\@A" =~ /X at +A/, '@+ should not be interpolated in a pattern';
-
- ok "X\0A" =~ /X\c@?A/, '\c@?';
- ok "X\0A" =~ /X\c@*A/, '\c@*';
- ok "X\0A" =~ /X\c@(A)/, '\c@(';
- ok "X\0A" =~ /X(\c@)A/, '\c@)';
- ok "X\0A" =~ /X\c@|ZA/, '\c@|';
-
- ok "X\@A" =~ /X@?A/, '@?';
- ok "X\@A" =~ /X@*A/, '@*';
- ok "X\@A" =~ /X@(A)/, '@(';
- ok "X\@A" =~ /X(@)A/, '@)';
- ok "X\@A" =~ /X@|ZA/, '@|';
-
- local $" = ','; # non-whitespace and non-RE-specific
- ok 'abc' =~ /(.)(.)(.)/, 'The last successful match is bogus';
- ok "A at +B" =~ /A@{+}B/, 'Interpolation of @+ in /@{+}/';
- ok "A at -B" =~ /A@{-}B/, 'Interpolation of @- in /@{-}/';
- ok "A at +B" =~ /A@{+}B/x, 'Interpolation of @+ in /@{+}/x';
- ok "A at -B" =~ /A@{-}B/x, 'Interpolation of @- in /@{-}/x';
- }
-
-
- {
- use lib 'lib';
- use Cname;
-
- ok 'fooB' =~ /\N{foo}[\N{B}\N{b}]/, "Passthrough charname";
- my $test = 1233;
- #
- # Why doesn't must_warn work here?
- #
- my $w;
- local $SIG {__WARN__} = sub {$w .= "@_"};
- eval 'q(xxWxx) =~ /[\N{WARN}]/';
- ok $w && $w =~ /^Ignoring excess chars from/,
- "Ignoring excess chars warning";
-
- undef $w;
- eval q [ok "\0" !~ /[\N{EMPTY-STR}XY]/,
- "Zerolength charname in charclass doesn't match \\0"];
- ok $w && $w =~ /^Ignoring zero length/,
- 'Ignoring zero length \N{%} in character class warning';
-
- ok 'AB' =~ /(\N{EVIL})/ && $1 eq 'A', 'Charname caching $1';
- ok 'ABC' =~ /(\N{EVIL})/, 'Charname caching $1';
- ok 'xy' =~ /x\N{EMPTY-STR}y/,
- 'Empty string charname produces NOTHING node';
- ok '' =~ /\N{EMPTY-STR}/,
- 'Empty string charname produces NOTHING node';
-
- }
-
-
- {
- use charnames ':full';
-
- ok 'aabc' !~ /a\N{PLUS SIGN}b/, '/a\N{PLUS SIGN}b/ against aabc';
- ok 'a+bc' =~ /a\N{PLUS SIGN}b/, '/a\N{PLUS SIGN}b/ against a+bc';
-
- ok ' A B' =~ /\N{SPACE}\N{U+0041}\N{SPACE}\N{U+0042}/,
- 'Intermixed named and unicode escapes';
- ok "\N{SPACE}\N{U+0041}\N{SPACE}\N{U+0042}" =~
- /\N{SPACE}\N{U+0041}\N{SPACE}\N{U+0042}/,
- 'Intermixed named and unicode escapes';
- ok "\N{SPACE}\N{U+0041}\N{SPACE}\N{U+0042}" =~
- /[\N{SPACE}\N{U+0041}][\N{SPACE}\N{U+0042}]/,
- 'Intermixed named and unicode escapes';
- }
-
-
- {
- our $brackets;
- $brackets = qr{
- { (?> [^{}]+ | (??{ $brackets }) )* }
- }x;
-
- ok "{b{c}d" !~ m/^((??{ $brackets }))/, "Bracket mismatch";
-
- SKIP: {
- our @stack = ();
- my @expect = qw(
- stuff1
- stuff2
- <stuff1>and<stuff2>
- right
- <right>
- <<right>>
- <<<right>>>
- <<stuff1>and<stuff2>><<<<right>>>>
- );
-
- local $_ = '<<<stuff1>and<stuff2>><<<<right>>>>>';
- ok /^(<((?:(?>[^<>]+)|(?1))*)>(?{push @stack, $2 }))$/,
- "Recursion matches";
- iseq @stack, @expect, "Right amount of matches"
- or skip "Won't test individual results as count isn't equal",
- 0 + @expect;
- my $idx = 0;
- foreach my $expect (@expect) {
- iseq $stack [$idx], $expect,
- "Expecting '$expect' at stack pos #$idx";
- $idx ++;
- }
- }
- }
-
-
- {
- my $s = '123453456';
- $s =~ s/(?<digits>\d+)\k<digits>/$+{digits}/;
- ok $s eq '123456', 'Named capture (angle brackets) s///';
- $s = '123453456';
- $s =~ s/(?'digits'\d+)\k'digits'/$+{digits}/;
- ok $s eq '123456', 'Named capture (single quotes) s///';
- }
-
-
- {
- my @ary = (
- pack('U', 0x00F1), # n-tilde
- '_'.pack('U', 0x00F1), # _ + n-tilde
- 'c'.pack('U', 0x0327), # c + cedilla
- pack('U*', 0x00F1, 0x0327), # n-tilde + cedilla
- 'a'.pack('U', 0x00B2), # a + superscript two
- pack('U', 0x0391), # ALPHA
- pack('U', 0x0391).'2', # ALPHA + 2
- pack('U', 0x0391).'_', # ALPHA + _
- );
-
- for my $uni (@ary) {
- my ($r1, $c1, $r2, $c2) = eval qq {
- use utf8;
- scalar ("..foo foo.." =~ /(?'${uni}'foo) \\k'${uni}'/),
- \$+{${uni}},
- scalar ("..bar bar.." =~ /(?<${uni}>bar) \\k<${uni}>/),
- \$+{${uni}};
- };
- ok $r1, "Named capture UTF (?'')";
- ok defined $c1 && $c1 eq 'foo', "Named capture UTF \%+";
- ok $r2, "Named capture UTF (?<>)";
- ok defined $c2 && $c2 eq 'bar', "Named capture UTF \%+";
- }
- }
-
-
- {
- my $s = 'foo bar baz';
- my (@k, @v, @fetch, $res);
- my $count = 0;
- my @names = qw ($+{A} $+{B} $+{C});
- if ($s =~ /(?<A>foo)\s+(?<B>bar)?\s+(?<C>baz)/) {
- while (my ($k, $v) = each (%+)) {
- $count++;
- }
- @k = sort keys (%+);
- @v = sort values (%+);
- $res = 1;
- push @fetch,
- ["$+{A}", "$1"],
- ["$+{B}", "$2"],
- ["$+{C}", "$3"],
- ;
- }
- foreach (0 .. 2) {
- if ($fetch [$_]) {
- iseq $fetch [$_] [0], $fetch [$_] [1], $names [$_];
- } else {
- ok 0, $names[$_];
- }
- }
- iseq $res, 1, "'$s' =~ /(?<A>foo)\\s+(?<B>bar)?\\s+(?<C>baz)/";
- iseq $count, 3, "Got 3 keys in %+ via each";
- iseq 0 + @k, 3, 'Got 3 keys in %+ via keys';
- iseq "@k", "A B C", "Got expected keys";
- iseq "@v", "bar baz foo", "Got expected values";
- eval '
- no warnings "uninitialized";
- print for $+ {this_key_doesnt_exist};
- ';
- ok !$@, 'lvalue $+ {...} should not throw an exception';
- }
-
-
- {
- #
- # Almost the same as the block above, except that the capture is nested.
- #
- local $BugId = '50496';
- my $s = 'foo bar baz';
- my (@k, @v, @fetch, $res);
- my $count = 0;
- my @names = qw ($+{A} $+{B} $+{C} $+{D});
- if ($s =~ /(?<D>(?<A>foo)\s+(?<B>bar)?\s+(?<C>baz))/) {
- while (my ($k,$v) = each(%+)) {
- $count++;
- }
- @k = sort keys (%+);
- @v = sort values (%+);
- $res = 1;
- push @fetch,
- ["$+{A}", "$2"],
- ["$+{B}", "$3"],
- ["$+{C}", "$4"],
- ["$+{D}", "$1"],
- ;
- }
- foreach (0 .. 3) {
- if ($fetch [$_]) {
- iseq $fetch [$_] [0], $fetch [$_] [1], $names [$_];
- } else {
- ok 0, $names [$_];
- }
- }
- iseq $res, 1, "'$s' =~ /(?<D>(?<A>foo)\\s+(?<B>bar)?\\s+(?<C>baz))/";
- iseq $count, 4, "Got 4 keys in %+ via each";
- iseq @k, 4, 'Got 4 keys in %+ via keys';
- iseq "@k", "A B C D", "Got expected keys";
- iseq "@v", "bar baz foo foo bar baz", "Got expected values";
- eval '
- no warnings "uninitialized";
- print for $+ {this_key_doesnt_exist};
- ';
- ok !$@,'lvalue $+ {...} should not throw an exception';
- }
-
-
- {
- my $s = 'foo bar baz';
- my @res;
- if ('1234' =~ /(?<A>1)(?<B>2)(?<A>3)(?<B>4)/) {
- foreach my $name (sort keys(%-)) {
- my $ary = $- {$name};
- foreach my $idx (0 .. $#$ary) {
- push @res, "$name:$idx:$ary->[$idx]";
- }
- }
- }
- my @expect = qw (A:0:1 A:1:3 B:0:2 B:1:4);
- iseq "@res", "@expect", "Check %-";
- eval'
- no warnings "uninitialized";
- print for $- {this_key_doesnt_exist};
- ';
- ok !$@,'lvalue $- {...} should not throw an exception';
- }
-
-
- SKIP:
- {
- # stress test CURLYX/WHILEM.
- #
- # This test includes varying levels of nesting, and according to
- # profiling done against build 28905, exercises every code line in the
- # CURLYX and WHILEM blocks, except those related to LONGJMP, the
- # super-linear cache and warnings. It executes about 0.5M regexes
-
- skip "No psycho tests" if $ENV {PERL_SKIP_PSYCHO_TEST};
- print "# Set PERL_SKIP_PSYCHO_TEST to skip this test\n";
- my $r = qr/^
- (?:
- ( (?:a|z+)+ )
- (?:
- ( (?:b|z+){3,}? )
- (
- (?:
- (?:
- (?:c|z+){1,1}?z
- )?
- (?:c|z+){1,1}
- )*
- )
- (?:z*){2,}
- ( (?:z+|d)+ )
- (?:
- ( (?:e|z+)+ )
- )*
- ( (?:f|z+)+ )
- )*
- ( (?:z+|g)+ )
- (?:
- ( (?:h|z+)+ )
- )*
- ( (?:i|z+)+ )
- )+
- ( (?:j|z+)+ )
- (?:
- ( (?:k|z+)+ )
- )*
- ( (?:l|z+)+ )
- $/x;
-
- my $ok = 1;
- my $msg = "CURLYX stress test";
- OUTER:
- for my $a ("x","a","aa") {
- for my $b ("x","bbb","bbbb") {
- my $bs = $a.$b;
- for my $c ("x","c","cc") {
- my $cs = $bs.$c;
- for my $d ("x","d","dd") {
- my $ds = $cs.$d;
- for my $e ("x","e","ee") {
- my $es = $ds.$e;
- for my $f ("x","f","ff") {
- my $fs = $es.$f;
- for my $g ("x","g","gg") {
- my $gs = $fs.$g;
- for my $h ("x","h","hh") {
- my $hs = $gs.$h;
- for my $i ("x","i","ii") {
- my $is = $hs.$i;
- for my $j ("x","j","jj") {
- my $js = $is.$j;
- for my $k ("x","k","kk") {
- my $ks = $js.$k;
- for my $l ("x","l","ll") {
- my $ls = $ks.$l;
- if ($ls =~ $r) {
- if ($ls =~ /x/) {
- $msg .= ": unexpected match for [$ls]";
- $ok = 0;
- last OUTER;
- }
- my $cap = "$1$2$3$4$5$6$7$8$9$10$11$12";
- unless ($ls eq $cap) {
- $msg .= ": capture: [$ls], got [$cap]";
- $ok = 0;
- last OUTER;
- }
- }
- else {
- unless ($ls =~ /x/) {
- $msg = ": failed for [$ls]";
- $ok = 0;
- last OUTER;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- ok($ok, $msg);
- }
-
-
- {
- # \, breaks {3,4}
- ok "xaaay" !~ /xa{3\,4}y/, '\, in a pattern';
- ok "xa{3,4}y" =~ /xa{3\,4}y/, '\, in a pattern';
-
- # \c\ followed by _
- ok "x\c_y" !~ /x\c\_y/, '\_ in a pattern';
- ok "x\c\_y" =~ /x\c\_y/, '\_ in a pattern';
-
- # \c\ followed by other characters
- for my $c ("z", "\0", "!", chr(254), chr(256)) {
- my $targ = "a\034$c";
- my $reg = "a\\c\\$c";
- ok eval ("qq/$targ/ =~ /$reg/"), "\\c\\ in pattern";
- }
- }
-
-
- {
- local $BugId = '36046';
- my $str = 'abc';
- my $count = 0;
- my $mval = 0;
- my $pval = 0;
- while ($str =~ /b/g) {$mval = $#-; $pval = $#+; $count ++}
- iseq $mval, 0, '@- should be empty';
- iseq $pval, 0, '@+ should be empty';
- iseq $count, 1, 'Should have matched once only';
- }
-
-
- { # Test the (*PRUNE) pattern
- our $count = 0;
- 'aaab' =~ /a+b?(?{$count++})(*FAIL)/;
- iseq $count, 9, "Expect 9 for no (*PRUNE)";
- $count = 0;
- 'aaab' =~ /a+b?(*PRUNE)(?{$count++})(*FAIL)/;
- iseq $count, 3, "Expect 3 with (*PRUNE)";
- local $_ = 'aaab';
- $count = 0;
- 1 while /.(*PRUNE)(?{$count++})(*FAIL)/g;
- iseq $count, 4, "/.(*PRUNE)/";
- $count = 0;
- 'aaab' =~ /a+b?(??{'(*PRUNE)'})(?{$count++})(*FAIL)/;
- iseq $count, 3, "Expect 3 with (*PRUNE)";
- local $_ = 'aaab';
- $count = 0;
- 1 while /.(??{'(*PRUNE)'})(?{$count++})(*FAIL)/g;
- iseq $count, 4, "/.(*PRUNE)/";
- }
-
-
- { # Test the (*SKIP) pattern
- our $count = 0;
- 'aaab' =~ /a+b?(*SKIP)(?{$count++})(*FAIL)/;
- iseq $count, 1, "Expect 1 with (*SKIP)";
- local $_ = 'aaab';
- $count = 0;
- 1 while /.(*SKIP)(?{$count++})(*FAIL)/g;
- iseq $count, 4, "/.(*SKIP)/";
- $_ = 'aaabaaab';
- $count = 0;
- our @res = ();
- 1 while /(a+b?)(*SKIP)(?{$count++; push @res,$1})(*FAIL)/g;
- iseq $count, 2, "Expect 2 with (*SKIP)";
- iseq "@res", "aaab aaab", "Adjacent (*SKIP) works as expected";
- }
-
-
- { # Test the (*SKIP) pattern
- our $count = 0;
- 'aaab' =~ /a+b?(*MARK:foo)(*SKIP)(?{$count++})(*FAIL)/;
- iseq $count, 1, "Expect 1 with (*SKIP)";
- local $_ = 'aaab';
- $count = 0;
- 1 while /.(*MARK:foo)(*SKIP)(?{$count++})(*FAIL)/g;
- iseq $count, 4, "/.(*SKIP)/";
- $_ = 'aaabaaab';
- $count = 0;
- our @res = ();
- 1 while /(a+b?)(*MARK:foo)(*SKIP)(?{$count++; push @res,$1})(*FAIL)/g;
- iseq $count, 2, "Expect 2 with (*SKIP)";
- iseq "@res", "aaab aaab", "Adjacent (*SKIP) works as expected";
- }
-
-
- { # Test the (*SKIP) pattern
- our $count = 0;
- 'aaab' =~ /a*(*MARK:a)b?(*MARK:b)(*SKIP:a)(?{$count++})(*FAIL)/;
- iseq $count, 3, "Expect 3 with *MARK:a)b?(*MARK:b)(*SKIP:a)";
- local $_ = 'aaabaaab';
- $count = 0;
- our @res = ();
- 1 while
- /(a*(*MARK:a)b?)(*MARK:x)(*SKIP:a)(?{$count++; push @res,$1})(*FAIL)/g;
- iseq $count, 5, "Expect 5 with (*MARK:a)b?)(*MARK:x)(*SKIP:a)";
- iseq "@res", "aaab b aaab b ",
- "Adjacent (*MARK:a)b?)(*MARK:x)(*SKIP:a) works as expected";
- }
-
-
- { # Test the (*COMMIT) pattern
- our $count = 0;
- 'aaabaaab' =~ /a+b?(*COMMIT)(?{$count++})(*FAIL)/;
- iseq $count, 1, "Expect 1 with (*COMMIT)";
- local $_ = 'aaab';
- $count = 0;
- 1 while /.(*COMMIT)(?{$count++})(*FAIL)/g;
- iseq $count, 1, "/.(*COMMIT)/";
- $_ = 'aaabaaab';
- $count = 0;
- our @res = ();
- 1 while /(a+b?)(*COMMIT)(?{$count++; push @res,$1})(*FAIL)/g;
- iseq $count, 1, "Expect 1 with (*COMMIT)";
- iseq "@res", "aaab", "Adjacent (*COMMIT) works as expected";
- }
-
-
- {
- # Test named commits and the $REGERROR var
- our $REGERROR;
- for my $name ('', ':foo') {
- for my $pat ("(*PRUNE$name)",
- ($name ? "(*MARK$name)" : "") . "(*SKIP$name)",
- "(*COMMIT$name)") {
- for my $suffix ('(*FAIL)', '') {
- 'aaaab' =~ /a+b$pat$suffix/;
- iseq $REGERROR,
- ($suffix ? ($name ? 'foo' : "1") : ""),
- "Test $pat and \$REGERROR $suffix";
- }
- }
- }
- }
-
-
- {
- # Test named commits and the $REGERROR var
- package Fnorble;
- our $REGERROR;
- for my $name ('', ':foo') {
- for my $pat ("(*PRUNE$name)",
- ($name ? "(*MARK$name)" : "") . "(*SKIP$name)",
- "(*COMMIT$name)") {
- for my $suffix ('(*FAIL)','') {
- 'aaaab' =~ /a+b$pat$suffix/;
- ::iseq $REGERROR,
- ($suffix ? ($name ? 'foo' : "1") : ""),
- "Test $pat and \$REGERROR $suffix";
- }
- }
- }
- }
-
-
- {
- # Test named commits and the $REGERROR var
- local $Message = '$REGERROR';
- our $REGERROR;
- for my $word (qw (bar baz bop)) {
- $REGERROR = "";
- "aaaaa$word" =~
- /a+(?:bar(*COMMIT:bar)|baz(*COMMIT:baz)|bop(*COMMIT:bop))(*FAIL)/;
- iseq $REGERROR, $word;
- }
- }
-
-
- {
- local $BugId = '40684';
- local $Message = '/m in precompiled regexp';
- my $s = "abc\ndef";
- my $rex = qr'^abc$'m;
- ok $s =~ m/$rex/;
- ok $s =~ m/^abc$/m;
- }
-
-
- {
- #Mindnumbingly simple test of (*THEN)
- for ("ABC","BAX") {
- ok /A (*THEN) X | B (*THEN) C/x, "Simple (*THEN) test";
- }
- }
-
-
- {
- local $Message = "Relative Recursion";
- my $parens = qr/(\((?:[^()]++|(?-1))*+\))/;
- local $_ = 'foo((2*3)+4-3) + bar(2*(3+4)-1*(2-3))';
- my ($all, $one, $two) = ('', '', '');
- ok /foo $parens \s* \+ \s* bar $parens/x;
- iseq $1, '((2*3)+4-3)';
- iseq $2, '(2*(3+4)-1*(2-3))';
- iseq $&, 'foo((2*3)+4-3) + bar(2*(3+4)-1*(2-3))';
- iseq $&, $_;
- }
-
- {
- my $spaces=" ";
- local $_ = join 'bar', $spaces, $spaces;
- our $count = 0;
- s/(?>\s+bar)(?{$count++})//g;
- iseq $_, $spaces, "SUSPEND final string";
- iseq $count, 1, "Optimiser should have prevented more than one match";
- }
-
- {
- local $BugId = '36909';
- local $Message = '(?: ... )? should not lose $^R';
- $^R = 'Nothing';
- {
- local $^R = "Bad";
- ok 'x foofoo y' =~ m {
- (foo) # $^R correctly set
- (?{ "last regexp code result" })
- }x;
- iseq $^R, 'last regexp code result';
- }
- iseq $^R, 'Nothing';
-
- {
- local $^R = "Bad";
-
- ok 'x foofoo y' =~ m {
- (?:foo|bar)+ # $^R correctly set
- (?{ "last regexp code result" })
- }x;
- iseq $^R, 'last regexp code result';
- }
- iseq $^R, 'Nothing';
-
- {
- local $^R = "Bad";
- ok 'x foofoo y' =~ m {
- (foo|bar)\1+ # $^R undefined
- (?{ "last regexp code result" })
- }x;
- iseq $^R, 'last regexp code result';
- }
- iseq $^R, 'Nothing';
-
- {
- local $^R = "Bad";
- ok 'x foofoo y' =~ m {
- (foo|bar)\1 # This time without the +
- (?{"last regexp code result"})
- }x;
- iseq $^R, 'last regexp code result';
- }
- iseq $^R, 'Nothing';
- }
-
-
- {
- local $BugId = '22395';
- local $Message = 'Match is linear, not quadratic';
- our $count;
- for my $l (10, 100, 1000) {
- $count = 0;
- ('a' x $l) =~ /(.*)(?{$count++})[bc]/;
- local $TODO = "Should be L+1 not L*(L+3)/2 (L=$l)";
- iseq $count, $l + 1;
- }
- }
-
-
- {
- local $BugId = '22614';
- local $Message = '@-/@+ should not have undefined values';
- local $_ = 'ab';
- our @len = ();
- /(.){1,}(?{push @len,0+ at -})(.){1,}(?{})^/;
- iseq "@len", "2 2 2";
- }
-
-
- {
- local $BugId = '18209';
- local $Message = '$& set on s///';
- my $text = ' word1 word2 word3 word4 word5 word6 ';
-
- my @words = ('word1', 'word3', 'word5');
- my $count;
- foreach my $word (@words) {
- $text =~ s/$word\s//gi; # Leave a space to seperate words
- # in the resultant str.
- # The following block is not working.
- if ($&) {
- $count ++;
- }
- # End bad block
- }
- iseq $count, 3;
- iseq $text, ' word2 word4 word6 ';
- }
-
-
- {
- # RT#6893
- local $BugId = '6893';
- local $_ = qq (A\nB\nC\n);
- my @res;
- while (m#(\G|\n)([^\n]*)\n#gsx) {
- push @res, "$2";
- last if @res > 3;
- }
- iseq "@res", "A B C", "/g pattern shouldn't infinite loop";
- }
-
-
- {
- # From Message-ID: <877ixs6oa6.fsf at k75.linux.bogus>
- my $dow_name = "nada";
- my $parser = "(\$dow_name) = \$time_string =~ /(D\x{e9}\\ " .
- "C\x{e9}adaoin|D\x{e9}\\ Sathairn|\\w+|\x{100})/";
- my $time_string = "D\x{e9} C\x{e9}adaoin";
- eval $parser;
- ok !$@, "Test Eval worked";
- iseq $dow_name, $time_string, "UTF-8 trie common prefix extraction";
- }
-
-
- {
- my $v;
- ($v = 'bar') =~ /(\w+)/g;
- $v = 'foo';
- iseq "$1", 'bar', '$1 is safe after /g - may fail due ' .
- 'to specialized config in pp_hot.c'
- }
-
-
- {
- local $Message = "http://nntp.perl.org/group/perl.perl5.porters/118663";
- my $qr_barR1 = qr/(bar)\g-1/;
- ok "foobarbarxyz" =~ $qr_barR1;
- ok "foobarbarxyz" =~ qr/foo${qr_barR1}xyz/;
- ok "foobarbarxyz" =~ qr/(foo)${qr_barR1}xyz/;
- ok "foobarbarxyz" =~ qr/(foo)(bar)\g{-1}xyz/;
- ok "foobarbarxyz" =~ qr/(foo${qr_barR1})xyz/;
- ok "foobarbarxyz" =~ qr/(foo(bar)\g{-1})xyz/;
- }
-
-
- {
- local $BugId = '41010';
- local $Message = 'No optimizer bug';
- my @tails = ('', '(?(1))', '(|)', '()?');
- my @quants = ('*','+');
- my $doit = sub {
- my $pats = shift;
- for (@_) {
- for my $pat (@$pats) {
- for my $quant (@quants) {
- for my $tail (@tails) {
- my $re = "($pat$quant\$)$tail";
- ok /$re/ && $1 eq $_, "'$_' =~ /$re/";
- ok /$re/m && $1 eq $_, "'$_' =~ /$re/m";
- }
- }
- }
- }
- };
-
- my @dpats = ('\d',
- '[1234567890]',
- '(1|[23]|4|[56]|[78]|[90])',
- '(?:1|[23]|4|[56]|[78]|[90])',
- '(1|2|3|4|5|6|7|8|9|0)',
- '(?:1|2|3|4|5|6|7|8|9|0)');
- my @spats = ('[ ]', ' ', '( |\t)', '(?: |\t)', '[ \t]', '\s');
- my @sstrs = (' ');
- my @dstrs = ('12345');
- $doit -> (\@spats, @sstrs);
- $doit -> (\@dpats, @dstrs);
- }
-
-
- {
- local $Message = '$REGMARK';
- our @r = ();
- our ($REGMARK, $REGERROR);
- ok 'foofoo' =~ /foo (*MARK:foo) (?{push @r,$REGMARK}) /x;
- iseq "@r","foo";
- iseq $REGMARK, "foo";
- ok 'foofoo' !~ /foo (*MARK:foo) (*FAIL) /x;
- ok !$REGMARK;
- iseq $REGERROR, 'foo';
- }
-
-
- {
- local $Message = '\K test';
- my $x;
- $x = "abc.def.ghi.jkl";
- $x =~ s/.*\K\..*//;
- iseq $x, "abc.def.ghi";
-
- $x = "one two three four";
- $x =~ s/o+ \Kthree//g;
- iseq $x, "one two four";
-
- $x = "abcde";
- $x =~ s/(.)\K/$1/g;
- iseq $x, "aabbccddee";
- }
-
-
- {
- sub kt {
- return '4' if $_[0] eq '09028623';
- }
- # Nested EVAL using PL_curpm (via $1 or friends)
- my $re;
- our $grabit = qr/ ([0-6][0-9]{7}) (??{ kt $1 }) [890] /x;
- $re = qr/^ ( (??{ $grabit }) ) $ /x;
- my @res = '0902862349' =~ $re;
- iseq join ("-", @res), "0902862349",
- 'PL_curpm is set properly on nested eval';
-
- our $qr = qr/ (o) (??{ $1 }) /x;
- ok 'boob'=~/( b (??{ $qr }) b )/x && 1, "PL_curpm, nested eval";
- }
-
-
- {
- use charnames ":full";
- ok "\N{ROMAN NUMERAL ONE}" =~ /\p{Alphabetic}/, "I =~ Alphabetic";
- ok "\N{ROMAN NUMERAL ONE}" =~ /\p{Uppercase}/, "I =~ Uppercase";
- ok "\N{ROMAN NUMERAL ONE}" !~ /\p{Lowercase}/, "I !~ Lowercase";
- ok "\N{ROMAN NUMERAL ONE}" =~ /\p{IDStart}/, "I =~ ID_Start";
- ok "\N{ROMAN NUMERAL ONE}" =~ /\p{IDContinue}/, "I =~ ID_Continue";
- ok "\N{SMALL ROMAN NUMERAL ONE}" =~ /\p{Alphabetic}/, "i =~ Alphabetic";
- ok "\N{SMALL ROMAN NUMERAL ONE}" !~ /\p{Uppercase}/, "i !~ Uppercase";
- ok "\N{SMALL ROMAN NUMERAL ONE}" =~ /\p{Lowercase}/, "i =~ Lowercase";
- ok "\N{SMALL ROMAN NUMERAL ONE}" =~ /\p{IDStart}/, "i =~ ID_Start";
- ok "\N{SMALL ROMAN NUMERAL ONE}" =~ /\p{IDContinue}/, "i =~ ID_Continue"
- }
-
-
- {
- # requirement of Unicode Technical Standard #18, 1.7 Code Points
- # cf. http://www.unicode.org/reports/tr18/#Supplementary_Characters
- for my $u (0x7FF, 0x800, 0xFFFF, 0x10000) {
- no warnings 'utf8'; # oops
- my $c = chr $u;
- my $x = sprintf '%04X', $u;
- ok "A${c}B" =~ /A[\0-\x{10000}]B/, "Unicode range - $x";
- }
- }
-
-
- {
- my $res="";
-
- if ('1' =~ /(?|(?<digit>1)|(?<digit>2))/) {
- $res = "@{$- {digit}}";
- }
- iseq $res, "1",
- "Check that (?|...) doesnt cause dupe entries in the names array";
-
- $res = "";
- if ('11' =~ /(?|(?<digit>1)|(?<digit>2))(?&digit)/) {
- $res = "@{$- {digit}}";
- }
- iseq $res, "1", "Check that (?&..) to a buffer inside " .
- "a (?|...) goes to the leftmost";
- }
-
-
- {
- use warnings;
- local $Message = "ASCII pattern that really is UTF-8";
- my @w;
- local $SIG {__WARN__} = sub {push @w, "@_"};
- my $c = qq (\x{DF});
- ok $c =~ /${c}|\x{100}/;
- ok @w == 0;
- }
-
-
- {
- local $Message = "Corruption of match results of qr// across scopes";
- my $qr = qr/(fo+)(ba+r)/;
- 'foobar' =~ /$qr/;
- iseq "$1$2", "foobar";
- {
- 'foooooobaaaaar' =~ /$qr/;
- iseq "$1$2", 'foooooobaaaaar';
- }
- iseq "$1$2", "foobar";
- }
-
-
- {
- local $Message = "HORIZWS";
- local $_ = "\t \r\n \n \t".chr(11)."\n";
- s/\H/H/g;
- s/\h/h/g;
- iseq $_, "hhHHhHhhHH";
- $_ = "\t \r\n \n \t" . chr (11) . "\n";
- utf8::upgrade ($_);
- s/\H/H/g;
- s/\h/h/g;
- iseq $_, "hhHHhHhhHH";
- }
-
-
- {
- local $Message = "Various whitespace special patterns";
- my @h = map {chr $_} 0x09, 0x20, 0xa0, 0x1680, 0x180e, 0x2000,
- 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006,
- 0x2007, 0x2008, 0x2009, 0x200a, 0x202f, 0x205f,
- 0x3000;
- my @v = map {chr $_} 0x0a, 0x0b, 0x0c, 0x0d, 0x85, 0x2028,
- 0x2029;
- my @lb = ("\x0D\x0A", map {chr $_} 0x0A .. 0x0D, 0x85, 0x2028, 0x2029);
- foreach my $t ([\@h, qr/\h/, qr/\h+/],
- [\@v, qr/\v/, qr/\v+/],
- [\@lb, qr/\R/, qr/\R+/],) {
- my $ary = shift @$t;
- foreach my $pat (@$t) {
- foreach my $str (@$ary) {
- ok $str =~ /($pat)/, $pat;
- iseq $1, $str, $pat;
- utf8::upgrade ($str);
- ok $str =~ /($pat)/, "Upgraded string - $pat";
- iseq $1, $str, "Upgraded string - $pat";
- }
- }
- }
- }
-
-
- {
- local $Message = "Check that \\xDF match properly in its various forms";
- # Test that \xDF matches properly. this is pretty hacky stuff,
- # but its actually needed. The malarky with '-' is to prevent
- # compilation caching from playing any role in the test.
- my @df = (chr (0xDF), '-', chr (0xDF));
- utf8::upgrade ($df [2]);
- my @strs = ('ss', 'sS', 'Ss', 'SS', chr (0xDF));
- my @ss = map {("$_", "$_")} @strs;
- utf8::upgrade ($ss [$_ * 2 + 1]) for 0 .. $#strs;
-
- for my $ssi (0 .. $#ss) {
- for my $dfi (0 .. $#df) {
- my $pat = $df [$dfi];
- my $str = $ss [$ssi];
- my $utf_df = ($dfi > 1) ? 'utf8' : '';
- my $utf_ss = ($ssi % 2) ? 'utf8' : '';
- (my $sstr = $str) =~ s/\xDF/\\xDF/;
-
- if ($utf_df || $utf_ss || length ($ss [$ssi]) == 1) {
- my $ret = $str =~ /$pat/i;
- next if $pat eq '-';
- ok $ret, "\"$sstr\" =~ /\\xDF/i " .
- "(str is @{[$utf_ss||'latin']}, pat is " .
- "@{[$utf_df||'latin']})";
- }
- else {
- my $ret = $str !~ /$pat/i;
- next if $pat eq '-';
- ok $ret, "\"$sstr\" !~ /\\xDF/i " .
- "(str is @{[$utf_ss||'latin']}, pat is " .
- "@{[$utf_df||'latin']})";
- }
- }
- }
- }
-
-
- {
- local $Message = "BBC(Bleadperl Breaks CPAN) Today: String::Multibyte";
- my $re = qr/(?:[\x00-\xFF]{4})/;
- my $hyp = "\0\0\0-";
- my $esc = "\0\0\0\\";
-
- my $str = "$esc$hyp$hyp$esc$esc";
- my @a = ($str =~ /\G(?:\Q$esc$esc\E|\Q$esc$hyp\E|$re)/g);
-
- iseq @a,3;
- local $" = "=";
- iseq "@a","$esc$hyp=$hyp=$esc$esc";
- }
-
-
- {
- # Test for keys in %+ and %-
- local $Message = 'Test keys in %+ and %-';
- no warnings 'uninitialized';
- my $_ = "abcdef";
- /(?<foo>a)|(?<foo>b)/;
- iseq ((join ",", sort keys %+), "foo");
- iseq ((join ",", sort keys %-), "foo");
- iseq ((join ",", sort values %+), "a");
- iseq ((join ",", sort map "@$_", values %-), "a ");
- /(?<bar>a)(?<bar>b)(?<quux>.)/;
- iseq ((join ",", sort keys %+), "bar,quux");
- iseq ((join ",", sort keys %-), "bar,quux");
- iseq ((join ",", sort values %+), "a,c"); # leftmost
- iseq ((join ",", sort map "@$_", values %-), "a b,c");
- /(?<un>a)(?<deux>c)?/; # second buffer won't capture
- iseq ((join ",", sort keys %+), "un");
- iseq ((join ",", sort keys %-), "deux,un");
- iseq ((join ",", sort values %+), "a");
- iseq ((join ",", sort map "@$_", values %-), ",a");
- }
-
-
- {
- # length() on captures, the numbered ones end up in Perl_magic_len
- my $_ = "aoeu \xe6var ook";
- /^ \w+ \s (?<eek>\S+)/x;
-
- iseq length ($`), 0, q[length $`];
- iseq length ($'), 4, q[length $'];
- iseq length ($&), 9, q[length $&];
- iseq length ($1), 4, q[length $1];
- iseq length ($+{eek}), 4, q[length $+{eek} == length $1];
- }
-
-
- {
- my $ok = -1;
-
- $ok = exists ($-{x}) ? 1 : 0 if 'bar' =~ /(?<x>foo)|bar/;
- iseq $ok, 1, '$-{x} exists after "bar"=~/(?<x>foo)|bar/';
- iseq scalar (%+), 0, 'scalar %+ == 0 after "bar"=~/(?<x>foo)|bar/';
- iseq scalar (%-), 1, 'scalar %- == 1 after "bar"=~/(?<x>foo)|bar/';
-
- $ok = -1;
- $ok = exists ($+{x}) ? 1 : 0 if 'bar' =~ /(?<x>foo)|bar/;
- iseq $ok, 0, '$+{x} not exists after "bar"=~/(?<x>foo)|bar/';
- iseq scalar (%+), 0, 'scalar %+ == 0 after "bar"=~/(?<x>foo)|bar/';
- iseq scalar (%-), 1, 'scalar %- == 1 after "bar"=~/(?<x>foo)|bar/';
-
- $ok = -1;
- $ok = exists ($-{x}) ? 1 : 0 if 'foo' =~ /(?<x>foo)|bar/;
- iseq $ok, 1, '$-{x} exists after "foo"=~/(?<x>foo)|bar/';
- iseq scalar (%+), 1, 'scalar %+ == 1 after "foo"=~/(?<x>foo)|bar/';
- iseq scalar (%-), 1, 'scalar %- == 1 after "foo"=~/(?<x>foo)|bar/';
-
- $ok = -1;
- $ok = exists ($+{x}) ? 1 : 0 if 'foo'=~/(?<x>foo)|bar/;
- iseq $ok, 1, '$+{x} exists after "foo"=~/(?<x>foo)|bar/';
- }
-
-
- {
- local $_;
- ($_ = 'abc') =~ /(abc)/g;
- $_ = '123';
- iseq "$1", 'abc', "/g leads to unsafe match vars: $1";
- }
-
-
- {
- local $Message = 'Message-ID: <20070818091501.7eff4831 at r2d2>';
- my $str = "";
- for (0 .. 5) {
- my @x;
- $str .= "@x"; # this should ALWAYS be the empty string
- 'a' =~ /(a|)/;
- push @x, 1;
- }
- iseq length ($str), 0, "Trie scope error, string should be empty";
- $str = "";
- my @foo = ('a') x 5;
- for (@foo) {
- my @bar;
- $str .= "@bar";
- s/a|/push @bar, 1/e;
- }
- iseq length ($str), 0, "Trie scope error, string should be empty";
- }
-
-
- {
- local $BugId = '45605';
- # [perl #45605] Regexp failure with utf8-flagged and byte-flagged string
-
- my $utf_8 = "\xd6schel";
- utf8::upgrade ($utf_8);
- $utf_8 =~ m {(\xd6|Ö)schel};
- iseq $1, "\xd6", "Upgrade error";
- }
-
- {
-# more TRIE/AHOCORASICK problems with mixed utf8 / latin-1 and case folding
- for my $chr (160 .. 255) {
- my $chr_byte = chr($chr);
- my $chr_utf8 = chr($chr); utf8::upgrade($chr_utf8);
- my $rx = qr{$chr_byte|X}i;
- ok($chr_utf8 =~ $rx, "utf8/latin, codepoint $chr");
- }
- }
-
- {
- # Regardless of utf8ness any character matches itself when
- # doing a case insensitive match. See also [perl #36207]
- local $BugId = '36207';
- for my $o (0 .. 255) {
- my @ch = (chr ($o), chr ($o));
- utf8::upgrade ($ch [1]);
- for my $u_str (0, 1) {
- for my $u_pat (0, 1) {
- ok $ch [$u_str] =~ /\Q$ch[$u_pat]\E/i,
- "\$c =~ /\$c/i : chr ($o) : u_str = $u_str u_pat = $u_pat";
- ok $ch [$u_str] =~ /\Q$ch[$u_pat]\E|xyz/i,
- "\$c=~/\$c|xyz/i : chr($o) : u_str = $u_str u_pat = $u_pat";
- }
- }
- }
- }
-
-
- {
- our $a = 3; "" =~ /(??{ $a })/;
- our $b = $a;
- iseq $b, $a, "Copy of scalar used for postponed subexpression";
- }
-
-
- {
- local $BugId = '49190';
- local $Message = '$REGMARK in replacement';
- our $REGMARK;
- my $_ = "A";
- ok s/(*:B)A/$REGMARK/;
- iseq $_, "B";
- $_ = "CCCCBAA";
- ok s/(*:X)A+|(*:Y)B+|(*:Z)C+/$REGMARK/g;
- iseq $_, "ZYX";
- }
-
-
- {
- our @ctl_n = ();
- our @plus = ();
- our $nested_tags;
- $nested_tags = qr{
- <
- (\w+)
- (?{
- push @ctl_n,$^N;
- push @plus,$+;
- })
- >
- (??{$nested_tags})*
- </\s* \w+ \s*>
- }x;
-
- my $match = '<bla><blubb></blubb></bla>' =~ m/^$nested_tags$/;
- ok $match, 'nested construct matches';
- iseq "@ctl_n", "bla blubb", '$^N inside of (?{}) works as expected';
- iseq "@plus", "bla blubb", '$+ inside of (?{}) works as expected';
- }
-
-
- {
- local $BugId = '52658';
- local $Message = 'Substitution evaluation in list context';
- my $reg = '../xxx/';
- my @te = ($reg =~ m{^(/?(?:\.\./)*)},
- $reg =~ s/(x)/'b'/eg > 1 ? '##' : '++');
- iseq $reg, '../bbb/';
- iseq $te [0], '../';
- }
-
- # This currently has to come before any "use encoding" in this file.
- {
- local $Message;
- local $BugId = '59342';
- # for 5.10.x, add a dummy test indead
- #must_warn 'qr/\400/', '^Use of octal value above 377';
- $Message=""; ok 1;
- }
-
-
- SKIP: {
- # XXX: This set of tests is essentially broken, POSIX character classes
- # should not have differing definitions under Unicode.
- # There are property names for that.
- skip "Tests assume ASCII", 4 unless $IS_ASCII;
-
- my @notIsPunct = grep {/[[:punct:]]/ and not /\p{IsPunct}/}
- map {chr} 0x20 .. 0x7f;
- iseq join ('', @notIsPunct), '$+<=>^`|~',
- '[:punct:] disagress with IsPunct on Symbols';
-
- my @isPrint = grep {not /[[:print:]]/ and /\p{IsPrint}/}
- map {chr} 0 .. 0x1f, 0x7f .. 0x9f;
- iseq join ('', @isPrint), "\x09\x0a\x0b\x0c\x0d\x85",
- 'IsPrint disagrees with [:print:] on control characters';
-
- my @isPunct = grep {/[[:punct:]]/ != /\p{IsPunct}/}
- map {chr} 0x80 .. 0xff;
- iseq join ('', @isPunct), "\xa1\xab\xb7\xbb\xbf", # ¡ « · » ¿
- 'IsPunct disagrees with [:punct:] outside ASCII';
-
- my @isPunctLatin1 = eval q {
- use encoding 'latin1';
- grep {/[[:punct:]]/ != /\p{IsPunct}/} map {chr} 0x80 .. 0xff;
- };
- skip "Eval failed ($@)", 1 if $@;
- skip "PERL_LEGACY_UNICODE_CHARCLASS_MAPPINGS set to 0", 1
- if $ENV {REAL_POSIX_CC};
- iseq join ('', @isPunctLatin1), '',
- 'IsPunct agrees with [:punct:] with explicit Latin1';
- }
-
-
- {
- local $BugId = '60034';
- my $a = "xyzt" x 8192;
- ok $a =~ /\A(?>[a-z])*\z/,
- '(?>) does not cause wrongness on long string';
- my $b = $a . chr 256;
- chop $b;
- {
- iseq $a, $b;
- }
- ok $b =~ /\A(?>[a-z])*\z/,
- '(?>) does not cause wrongness on long string with UTF-8';
- }
-
-
- #
- # Keep the following tests last -- they may crash perl
- #
- print "# Tests that follow may crash perl\n";
- {
- local $BugId = '19049/38869';
- local $Message = 'Pattern in a loop, failure should not ' .
- 'affect previous success';
- my @list = (
- 'ab cdef', # Matches regex
- ('e' x 40000 ) .'ab c' # Matches not, but 'ab c' matches part of it
- );
- my $y;
- my $x;
- foreach (@list) {
- m/ab(.+)cd/i; # The ignore-case seems to be important
- $y = $1; # Use $1, which might not be from the last match!
- $x = substr ($list [0], $- [0], $+ [0] - $- [0]);
- }
- iseq $y, ' ';
- iseq $x, 'ab cd';
- }
-
-
- {
- local $BugId = '24274';
-
- ok (("a" x (2 ** 15 - 10)) =~ /^()(a|bb)*$/, "Recursive stack cracker");
- ok ((q(a)x 100) =~ /^(??{'(.)'x 100})/,
- "Regexp /^(??{'(.)'x 100})/ crashes older perls");
- }
-
-
- {
- eval '/\k/';
- ok $@ =~ /\QSequence \k... not terminated in regex;\E/,
- 'Lone \k not allowed';
- }
-
-
- {
- local $Message = "Substitution with lookahead (possible segv)";
- $_ = "ns1ns1ns1";
- s/ns(?=\d)/ns_/g;
- iseq $_, "ns_1ns_1ns_1";
- $_ = "ns1";
- s/ns(?=\d)/ns_/;
- iseq $_, "ns_1";
- $_ = "123";
- s/(?=\d+)|(?<=\d)/!Bang!/g;
- iseq $_, "!Bang!1!Bang!2!Bang!3!Bang!";
- }
-
-
- {
- # [perl #45337] utf8 + "[a]a{2}" + /$.../ = panic: sv_len_utf8 cache
- local $BugId = '45337';
- local ${^UTF8CACHE} = -1;
- local $Message = "Shouldn't panic";
- my $s = "[a]a{2}";
- utf8::upgrade $s;
- ok "aaa" =~ /$s/;
- }
- {
- local $BugId = '57042';
- local $Message = "Check if tree logic breaks \$^R";
- my $cond_re = qr/\s*
- \s* (?:
- \( \s* A (?{1})
- | \( \s* B (?{2})
- )
- /x;
- my @res;
- for my $line ("(A)","(B)") {
- if ($line =~ m/$cond_re/) {
- push @res, $^R ? "#$^R" : "UNDEF";
- }
- }
- iseq "@res","#1 #2";
- }
- {
- no warnings 'closure';
- my $re = qr/A(??{"1"})/;
- ok "A1B" =~ m/^((??{ $re }))((??{"B"}))$/;
- ok $1 eq "A1";
- ok $2 eq "B";
- }
-
-
- {
- use re 'eval';
- local $Message = 'Test if $^N and $+ work in (?{{})';
- our @ctl_n = ();
- our @plus = ();
- our $nested_tags;
- $nested_tags = qr{
- <
- ((\w)+)
- (?{
- push @ctl_n, (defined $^N ? $^N : "undef");
- push @plus, (defined $+ ? $+ : "undef");
- })
- >
- (??{$nested_tags})*
- </\s* \w+ \s*>
- }x;
-
-
- my $c = 0;
- for my $test (
- # Test structure:
- # [ Expected result, Regex, Expected value(s) of $^N, Expected value(s) of $+ ]
- [ 1, qr#^$nested_tags$#, "bla blubb bla", "a b a" ],
- [ 1, qr#^($nested_tags)$#, "bla blubb <bla><blubb></blubb></bla>", "a b a" ],
- [ 1, qr#^(|)$nested_tags$#, "bla blubb bla", "a b a" ],
- [ 1, qr#^(?:|)$nested_tags$#, "bla blubb bla", "a b a" ],
- [ 1, qr#^<(bl|bla)>$nested_tags<(/\1)>$#, "blubb /bla", "b /bla" ],
- [ 1, qr#(??{"(|)"})$nested_tags$#, "bla blubb bla", "a b a" ],
- [ 1, qr#^(??{"(bla|)"})$nested_tags$#, "bla blubb bla", "a b a" ],
- [ 1, qr#^(??{"(|)"})(??{$nested_tags})$#, "bla blubb undef", "a b undef" ],
- [ 1, qr#^(??{"(?:|)"})$nested_tags$#, "bla blubb bla", "a b a" ],
- [ 1, qr#^((??{"(?:bla|)"}))((??{$nested_tags}))$#, "bla blubb <bla><blubb></blubb></bla>", "a b <bla><blubb></blubb></bla>" ],
- [ 1, qr#^((??{"(?!)?"}))((??{$nested_tags}))$#, "bla blubb <bla><blubb></blubb></bla>", "a b <bla><blubb></blubb></bla>" ],
- [ 1, qr#^((??{"(?:|<(/?bla)>)"}))((??{$nested_tags}))\1$#, "bla blubb <bla><blubb></blubb></bla>", "a b <bla><blubb></blubb></bla>" ],
- [ 0, qr#^((??{"(?!)"}))?((??{$nested_tags}))(?!)$#, "bla blubb undef", "a b undef" ],
-
- ) { #"#silence vim highlighting
- $c++;
- @ctl_n = ();
- @plus = ();
- my $match = (("<bla><blubb></blubb></bla>" =~ $test->[1]) ? 1 : 0);
- push @ctl_n, (defined $^N ? $^N : "undef");
- push @plus, (defined $+ ? $+ : "undef");
- ok($test->[0] == $match, "match $c");
- if ($test->[0] != $match) {
- # unset @ctl_n and @plus
- @ctl_n = @plus = ();
- }
- iseq("@ctl_n", $test->[2], "ctl_n $c");
- iseq("@plus", $test->[3], "plus $c");
- }
- }
-
- {
- use re 'eval';
- local $BugId = '56194';
-
- our $f;
- local $f;
- $f = sub {
- defined $_[0] ? $_[0] : "undef";
- };
-
- ok("123" =~ m/^(\d)(((??{1 + $^N})))+$/);
-
- our @ctl_n;
- our @plus;
-
- my $re = qr#(1)((??{ push @ctl_n, $f->($^N); push @plus, $f->($+); $^N + 1}))*(?{$^N})#;
- my $re2 = qr#(1)((??{ push @ctl_n, $f->($^N); push @plus, $f->($+); $^N + 1}))*(?{$^N})(|a(b)c|def)(??{"$^R"})#;
- my $re3 = qr#(1)((??{ push @ctl_n, $f->($^N); push @plus, $f->($+); $^N + 1})){2}(?{$^N})(|a(b)c|def)(??{"$^R"})#;
- our $re5;
- local $re5 = qr#(1)((??{ push @ctl_n, $f->($^N); push @plus, $f->($+); $^N + 1})){2}(?{$^N})#;
- my $re6 = qr#(??{ push @ctl_n, $f->($^N); push @plus, $f->($+); $^N + 1})#;
- my $re7 = qr#(??{ push @ctl_n, $f->($^N); push @plus, $f->($+); $^N + 1})#;
- my $re8 = qr/(\d+)/;
- my $c = 0;
- for my $test (
- # Test structure:
- # [
- # String to match
- # Regex too match
- # Expected values of $^N
- # Expected values of $+
- # Expected values of $1, $2, $3, $4 and $5
- # ]
- [
- "1233",
- qr#^(1)((??{ push @ctl_n, $f->($^N); push @plus, $f->($+); $^N + 1}))+(??{$^N})$#,
- "1 2 3 3",
- "1 2 3 3",
- "\$1 = 1, \$2 = 3, \$3 = undef, \$4 = undef, \$5 = undef",
- ],
- [
- "1233",
- qr#^(1)((??{ push @ctl_n, $f->($^N); push @plus, $f->($+); $^N + 1}))+(abc|def|)?(??{$+})$#,
- "1 2 3 3",
- "1 2 3 3",
- "\$1 = 1, \$2 = 3, \$3 = undef, \$4 = undef, \$5 = undef",
- ],
- [
- "1233",
- qr#^(1)((??{ push @ctl_n, $f->($^N); push @plus, $f->($+); $^N + 1}))+(|abc|def)?(??{$+})$#,
- "1 2 3 3",
- "1 2 3 3",
- "\$1 = 1, \$2 = 3, \$3 = undef, \$4 = undef, \$5 = undef",
- ],
- [
- "1233",
- qr#^(1)((??{ push @ctl_n, $f->($^N); push @plus, $f->($+); $^N + 1}))+(abc|def|)?(??{$^N})$#,
- "1 2 3 3",
- "1 2 3 3",
- "\$1 = 1, \$2 = 3, \$3 = undef, \$4 = undef, \$5 = undef",
- ],
- [
- "1233",
- qr#^(1)((??{ push @ctl_n, $f->($^N); push @plus, $f->($+); $^N + 1}))+(|abc|def)?(??{$^N})$#,
- "1 2 3 3",
- "1 2 3 3",
- "\$1 = 1, \$2 = 3, \$3 = undef, \$4 = undef, \$5 = undef",
- ],
- [
- "123abc3",
- qr#^($re)(|a(b)c|def)(??{$^R})$#,
- "1 2 3 abc",
- "1 2 3 b",
- "\$1 = 123, \$2 = 1, \$3 = 3, \$4 = abc, \$5 = b",
- ],
- [
- "123abc3",
- qr#^($re2)$#,
- "1 2 3 123abc3",
- "1 2 3 b",
- "\$1 = 123abc3, \$2 = 1, \$3 = 3, \$4 = abc, \$5 = b",
- ],
- [
- "123abc3",
- qr#^($re3)$#,
- "1 2 123abc3",
- "1 2 b",
- "\$1 = 123abc3, \$2 = 1, \$3 = 3, \$4 = abc, \$5 = b",
- ],
- [
- "123abc3",
- qr#^(??{$re5})(|abc|def)(??{"$^R"})$#,
- "1 2 abc",
- "1 2 abc",
- "\$1 = abc, \$2 = undef, \$3 = undef, \$4 = undef, \$5 = undef",
- ],
- [
- "123abc3",
- qr#^(??{$re5})(|a(b)c|def)(??{"$^R"})$#,
- "1 2 abc",
- "1 2 b",
- "\$1 = abc, \$2 = b, \$3 = undef, \$4 = undef, \$5 = undef",
- ],
- [
- "1234",
- qr#^((\d+)((??{push @ctl_n, $f->($^N); push @plus, $f->($+);$^N + 1}))((??{push @ctl_n, $f->($^N); push @plus, $f->($+);$^N + 1}))((??{push @ctl_n, $f->($^N); push @plus, $f->($+);$^N + 1})))$#,
- "1234 123 12 1 2 3 1234",
- "1234 123 12 1 2 3 4",
- "\$1 = 1234, \$2 = 1, \$3 = 2, \$4 = 3, \$5 = 4",
- ],
- [
- "1234556",
- qr#^(\d+)($re6)($re6)($re6)$re6(($re6)$re6)$#,
- "1234556 123455 12345 1234 123 12 1 2 3 4 4 5 56",
- "1234556 123455 12345 1234 123 12 1 2 3 4 4 5 5",
- "\$1 = 1, \$2 = 2, \$3 = 3, \$4 = 4, \$5 = 56",
- ],
- [
- "12345562",
- qr#^((??{$re8}))($re7)($re7)($re7)$re7($re7)($re7(\2))$#,
- "12345562 1234556 123455 12345 1234 123 12 1 2 3 4 4 5 62",
- "12345562 1234556 123455 12345 1234 123 12 1 2 3 4 4 5 2",
- "\$1 = 1, \$2 = 2, \$3 = 3, \$4 = 4, \$5 = 5",
- ],
- ) {
- $c++;
- @ctl_n = ();
- @plus = ();
- undef $^R;
- my $match = $test->[0] =~ $test->[1];
- my $str = join(", ", '$1 = '.$f->($1), '$2 = '.$f->($2), '$3 = '.$f->($3), '$4 = '.$f->($4),'$5 = '.$f->($5));
- push @ctl_n, $f->($^N);
- push @plus, $f->($+);
- ok($match, "match $c");
- if (not $match) {
- # unset $str, @ctl_n and @plus
- $str = "";
- @ctl_n = @plus = ();
- }
- iseq("@ctl_n", $test->[2], "ctl_n $c");
- iseq("@plus", $test->[3], "plus $c");
- iseq($str, $test->[4], "str $c");
- }
- SKIP: {
- if ($] le '5.010') {
- skip "test segfaults on perl < 5.10", 4;
- }
-
- @ctl_n = ();
- @plus = ();
-
- our $re4;
- local $re4 = qr#(1)((??{push @ctl_n, $f->($^N); push @plus, $f->($+);$^N + 1})){2}(?{$^N})(|abc|def)(??{"$^R"})#;
- undef $^R;
- my $match = "123abc3" =~ m/^(??{$re4})$/;
- my $str = join(", ", '$1 = '.$f->($1), '$2 = '.$f->($2), '$3 = '.$f->($3), '$4 = '.$f->($4),'$5 = '.$f->($5),'$^R = '.$f->($^R));
- push @ctl_n, $f->($^N);
- push @plus, $f->($+);
- ok($match);
- if (not $match) {
- # unset $str
- @ctl_n = ();
- @plus = ();
- $str = "";
- }
- iseq("@ctl_n", "1 2 undef");
- iseq("@plus", "1 2 undef");
- iseq($str, "\$1 = undef, \$2 = undef, \$3 = undef, \$4 = undef, \$5 = undef, \$^R = undef");
- }
- }
-
- {
- local $BugId = 65372; # minimal CURLYM limited to 32767 matches
- my @pat = (
- qr{a(x|y)*b}, # CURLYM
- qr{a(x|y)*?b}, # .. with minmod
- qr{a([wx]|[yz])*b}, # .. and without tries
- qr{a([wx]|[yz])*?b},
- );
- my $len = 32768;
- my $s = join '', 'a', 'x' x $len, 'b';
- for my $pat (@pat) {
- ok($s =~ $pat, $pat);
- }
- }
- #
- # This should be the last test.
- #
- iseq $test + 1, $EXPECTED_TESTS, "Got the right number of tests!";
-
-} # End of sub run_tests
-
-1;
Deleted: vendor/perl/dist/t/op/pat_thr.t
===================================================================
--- vendor/perl/dist/t/op/pat_thr.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/pat_thr.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-chdir 't' if -d 't';
- at INC = ('../lib', '.');
-
-require 'thread_it.pl';
-thread_it(qw(op pat.t));
Deleted: vendor/perl/dist/t/op/qq.t
===================================================================
--- vendor/perl/dist/t/op/qq.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/qq.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,73 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-print q(1..28
-);
-
-# This is() function is written to avoid ""
-my $test = 1;
-sub is {
- my($left, $right) = @_;
-
- if ($left eq $right) {
- printf 'ok %d
-', $test++;
- return 1;
- }
- foreach ($left, $right) {
- # Comment out these regexps to map non-printables to ord if the perl under
- # test is so broken that it's not helping
- s/([^-+A-Za-z_0-9])/sprintf q{'.chr(%d).'}, ord $1/ge;
- $_ = sprintf q('%s'), $_;
- s/^''\.//;
- s/\.''$//;
- }
- printf q(not ok %d - got %s expected %s
-), $test++, $left, $right;
-
- printf q(# Failed test at line %d
-), (caller)[2];
-
- return 0;
-}
-
-is ("\x53", chr 83);
-is ("\x4EE", chr (78) . 'E');
-is ("\x4i", chr (4) . 'i'); # This will warn
-is ("\xh", chr (0) . 'h'); # This will warn
-is ("\xx", chr (0) . 'x'); # This will warn
-is ("\xx9", chr (0) . 'x9'); # This will warn. \x9 is tab in EBCDIC too?
-is ("\x9_E", chr (9) . '_E'); # This will warn
-
-is ("\x{4E}", chr 78);
-is ("\x{6_9}", chr 105);
-is ("\x{_6_3}", chr 99);
-is ("\x{_6B}", chr 107);
-
-is ("\x{9__0}", chr 9); # multiple underscores not allowed.
-is ("\x{77_}", chr 119); # trailing underscore warns.
-is ("\x{6FQ}z", chr (111) . 'z');
-
-is ("\x{0x4E}", chr 0);
-is ("\x{x4E}", chr 0);
-
-is ("\x{0065}", chr 101);
-is ("\x{000000000000000000000000000000000000000000000000000000000000000072}",
- chr 114);
-is ("\x{0_06_5}", chr 101);
-is ("\x{1234}", chr 4660);
-is ("\x{10FFFD}", chr 1114109);
-is ("\400", chr 0x100);
-is ("\600", chr 0x180);
-is ("\777", chr 0x1FF);
-is ("a\o{120}b", "a" . chr(0x50) . "b");
-is ("a\o{400}b", "a" . chr(0x100) . "b");
-is ("a\o{1000}b", "a" . chr(0x200) . "b");
-
-# This caused a memory fault
-no warnings "utf8";
-is ("abc", eval qq[qq\x{8000_0000}abc\x{8000_0000}])
Deleted: vendor/perl/dist/t/op/qr_gc.t
===================================================================
--- vendor/perl/dist/t/op/qr_gc.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/qr_gc.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,35 +0,0 @@
-#!./perl -w
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require './test.pl';
- undef &Regexp::DESTROY;
-}
-
-plan tests => 2;
-
-if ($] >= 5.011) { # doesn't leak on 5.10.x
- $TODO = "leaking since 32751";
-}
-
-my $destroyed;
-{
- sub Regexp::DESTROY { $destroyed++ }
-}
-
-{
- my $rx = qr//;
-}
-
-is( $destroyed, 1, "destroyed regexp" );
-
-undef $destroyed;
-
-{
- my $var = bless {}, "Foo";
- my $rx = qr/(?{ $var })/;
-}
-
-is( $destroyed, 1, "destroyed regexp with closure capture" );
-
Deleted: vendor/perl/dist/t/op/qrstack.t
===================================================================
--- vendor/perl/dist/t/op/qrstack.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/qrstack.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,11 +0,0 @@
-#!./perl -w
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require './test.pl';
-}
-
-plan tests => 1;
-
-ok(defined [(1)x127,qr//,1]->[127], "qr// should extend the stack properly");
Deleted: vendor/perl/dist/t/op/re.t
===================================================================
--- vendor/perl/dist/t/op/re.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/re.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,46 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-use strict;
-use warnings;
-
-use Test::More; # test count at bottom of file
-use re qw(is_regexp regexp_pattern
- regname regnames regnames_count);
-{
- my $qr=qr/foo/pi;
- ok(is_regexp($qr),'is_regexp($qr)');
- ok(!is_regexp(''),'is_regexp("")');
- is((regexp_pattern($qr))[0],'foo','regexp_pattern[0]');
- is((regexp_pattern($qr))[1],'ip','regexp_pattern[1]');
- is(regexp_pattern($qr),'(?pi-xsm:foo)','scalar regexp_pattern');
- ok(!regexp_pattern(''),'!regexp_pattern("")');
-}
-
-if ('1234'=~/(?:(?<A>\d)|(?<C>!))(?<B>\d)(?<A>\d)(?<B>\d)/){
- my @names = sort +regnames();
- is("@names","A B","regnames");
- @names = sort +regnames(0);
- is("@names","A B","regnames");
- my $names = regnames();
- is($names, "B", "regnames in scalar context");
- @names = sort +regnames(1);
- is("@names","A B C","regnames");
- is(join("", @{regname("A",1)}),"13");
- is(join("", @{regname("B",1)}),"24");
- {
- if ('foobar'=~/(?<foo>foo)(?<bar>bar)/) {
- is(regnames_count(),2);
- } else {
- ok(0); ok(0);
- }
- }
- is(regnames_count(),3);
-}
-# New tests above this line, don't forget to update the test count below!
-use Test::More tests => 14;
-# No tests here!
Deleted: vendor/perl/dist/t/op/re_tests
===================================================================
--- vendor/perl/dist/t/op/re_tests 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/re_tests 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1375 +0,0 @@
-# This stops me getting screenfulls of syntax errors every time I accidentally
-# run this file via a shell glob
-__END__
-abc abc y $& abc
-abc abc y $-[0] 0
-abc abc y $+[0] 3
-abc xbc n - -
-abc axc n - -
-abc abx n - -
-abc xabcy y $& abc
-abc xabcy y $-[0] 1
-abc xabcy y $+[0] 4
-abc ababc y $& abc
-abc ababc y $-[0] 2
-abc ababc y $+[0] 5
-ab*c abc y $& abc
-ab*c abc y $-[0] 0
-ab*c abc y $+[0] 3
-ab*bc abc y $& abc
-ab*bc abc y $-[0] 0
-ab*bc abc y $+[0] 3
-ab*bc abbc y $& abbc
-ab*bc abbc y $-[0] 0
-ab*bc abbc y $+[0] 4
-ab*bc abbbbc y $& abbbbc
-ab*bc abbbbc y $-[0] 0
-ab*bc abbbbc y $+[0] 6
-.{1} abbbbc y $& a
-.{1} abbbbc y $-[0] 0
-.{1} abbbbc y $+[0] 1
-.{3,4} abbbbc y $& abbb
-.{3,4} abbbbc y $-[0] 0
-.{3,4} abbbbc y $+[0] 4
-ab{0,}bc abbbbc y $& abbbbc
-ab{0,}bc abbbbc y $-[0] 0
-ab{0,}bc abbbbc y $+[0] 6
-ab+bc abbc y $& abbc
-ab+bc abbc y $-[0] 0
-ab+bc abbc y $+[0] 4
-ab+bc abc n - -
-ab+bc abq n - -
-ab{1,}bc abq n - -
-ab+bc abbbbc y $& abbbbc
-ab+bc abbbbc y $-[0] 0
-ab+bc abbbbc y $+[0] 6
-ab{1,}bc abbbbc y $& abbbbc
-ab{1,}bc abbbbc y $-[0] 0
-ab{1,}bc abbbbc y $+[0] 6
-ab{1,3}bc abbbbc y $& abbbbc
-ab{1,3}bc abbbbc y $-[0] 0
-ab{1,3}bc abbbbc y $+[0] 6
-ab{3,4}bc abbbbc y $& abbbbc
-ab{3,4}bc abbbbc y $-[0] 0
-ab{3,4}bc abbbbc y $+[0] 6
-ab{4,5}bc abbbbc n - -
-ab?bc abbc y $& abbc
-ab?bc abc y $& abc
-ab{0,1}bc abc y $& abc
-ab?bc abbbbc n - -
-ab?c abc y $& abc
-ab{0,1}c abc y $& abc
-^abc$ abc y $& abc
-^abc$ abcc n - -
-^abc abcc y $& abc
-^abc$ aabc n - -
-abc$ aabc y $& abc
-abc$ aabcd n - -
-^ abc y $&
-$ abc y $&
-a.c abc y $& abc
-a.c axc y $& axc
-a.*c axyzc y $& axyzc
-a.*c axyzd n - -
-a[bc]d abc n - -
-a[bc]d abd y $& abd
-a[b]d abd y $& abd
-[a][b][d] abd y $& abd
-.[b]. abd y $& abd
-.[b]. aBd n - -
-(?i:.[b].) abd y $& abd
-a[b-d]e abd n - -
-a[b-d]e ace y $& ace
-a[b-d] aac y $& ac
-a[-b] a- y $& a-
-a[b-] a- y $& a-
-a[b-a] - c - Invalid [] range \"b-a\"
-a[]b - c - Unmatched [
-a[ - c - Unmatched [
-a] a] y $& a]
-a[]]b a]b y $& a]b
-a[^bc]d aed y $& aed
-a[^bc]d abd n - -
-a[^-b]c adc y $& adc
-a[^-b]c a-c n - -
-a[^]b]c a]c n - -
-a[^]b]c adc y $& adc
-\ba\b a- y - -
-\ba\b -a y - -
-\ba\b -a- y - -
-\by\b xy n - -
-\by\b yz n - -
-\by\b xyz n - -
-\Ba\B a- n - -
-\Ba\B -a n - -
-\Ba\B -a- n - -
-\By\b xy y - -
-\By\b xy y $-[0] 1
-\By\b xy y $+[0] 2
-\By\b xy y - -
-\by\B yz y - -
-\By\B xyz y - -
-\w a y - -
-\w - n - -
-\W a n - -
-\W - y - -
-a\sb a b y - -
-a\sb a-b n - -
-a\Sb a b n - -
-a\Sb a-b y - -
-\d 1 y - -
-\d - n - -
-\D 1 n - -
-\D - y - -
-[\w] a y - -
-[\w] - n - -
-[\W] a n - -
-[\W] - y - -
-a[\s]b a b y - -
-a[\s]b a-b n - -
-a[\S]b a b n - -
-a[\S]b a-b y - -
-[\d] 1 y - -
-[\d] - n - -
-[\D] 1 n - -
-[\D] - y - -
-ab|cd abc y $& ab
-ab|cd abcd y $& ab
-()ef def y $&-$1 ef-
-()ef def y $-[0] 1
-()ef def y $+[0] 3
-()ef def y $-[1] 1
-()ef def y $+[1] 1
-*a - c - Quantifier follows nothing
-(|*)b - c - Quantifier follows nothing
-(*)b - c - Unknown verb
-$b b n - -
-a\ - c - Search pattern not terminated
-a\(b a(b y $&-$1 a(b-
-a\(*b ab y $& ab
-a\(*b a((b y $& a((b
-a\\b a\\b y $& a\\b
-abc) - c - Unmatched )
-(abc - c - Unmatched (
-((a)) abc y $&-$1-$2 a-a-a
-((a)) abc y $-[0]-$-[1]-$-[2] 0-0-0
-((a)) abc y $+[0]-$+[1]-$+[2] 1-1-1
-((a)) abc b @- 0 0 0
-((a)) abc b @+ 1 1 1
-(a)b(c) abc y $&-$1-$2 abc-a-c
-(a)b(c) abc y $-[0]-$-[1]-$-[2] 0-0-2
-(a)b(c) abc y $+[0]-$+[1]-$+[2] 3-1-3
-a+b+c aabbabc y $& abc
-a{1,}b{1,}c aabbabc y $& abc
-a** - c - Nested quantifiers
-a.+?c abcabc y $& abc
-(a+|b)* ab y $&-$1 ab-b
-(a+|b)* ab y $-[0] 0
-(a+|b)* ab y $+[0] 2
-(a+|b)* ab y $-[1] 1
-(a+|b)* ab y $+[1] 2
-(a+|b){0,} ab y $&-$1 ab-b
-(a+|b)+ ab y $&-$1 ab-b
-(a+|b){1,} ab y $&-$1 ab-b
-(a+|b)? ab y $&-$1 a-a
-(a+|b){0,1} ab y $&-$1 a-a
-)( - c - Unmatched )
-[^ab]* cde y $& cde
-abc n - -
-a* y $&
-([abc])*d abbbcd y $&-$1 abbbcd-c
-([abc])*bcd abcd y $&-$1 abcd-a
-a|b|c|d|e e y $& e
-(a|b|c|d|e)f ef y $&-$1 ef-e
-(a|b|c|d|e)f ef y $-[0] 0
-(a|b|c|d|e)f ef y $+[0] 2
-(a|b|c|d|e)f ef y $-[1] 0
-(a|b|c|d|e)f ef y $+[1] 1
-abcd*efg abcdefg y $& abcdefg
-ab* xabyabbbz y $& ab
-ab* xayabbbz y $& a
-(ab|cd)e abcde y $&-$1 cde-cd
-[abhgefdc]ij hij y $& hij
-^(ab|cd)e abcde n x$1y xy
-(abc|)ef abcdef y $&-$1 ef-
-(a|b)c*d abcd y $&-$1 bcd-b
-(ab|ab*)bc abc y $&-$1 abc-a
-a([bc]*)c* abc y $&-$1 abc-bc
-a([bc]*)(c*d) abcd y $&-$1-$2 abcd-bc-d
-a([bc]*)(c*d) abcd y $-[0] 0
-a([bc]*)(c*d) abcd y $+[0] 4
-a([bc]*)(c*d) abcd y $-[1] 1
-a([bc]*)(c*d) abcd y $+[1] 3
-a([bc]*)(c*d) abcd y $-[2] 3
-a([bc]*)(c*d) abcd y $+[2] 4
-a([bc]+)(c*d) abcd y $&-$1-$2 abcd-bc-d
-a([bc]*)(c+d) abcd y $&-$1-$2 abcd-b-cd
-a([bc]*)(c+d) abcd y $-[0] 0
-a([bc]*)(c+d) abcd y $+[0] 4
-a([bc]*)(c+d) abcd y $-[1] 1
-a([bc]*)(c+d) abcd y $+[1] 2
-a([bc]*)(c+d) abcd y $-[2] 2
-a([bc]*)(c+d) abcd y $+[2] 4
-a[bcd]*dcdcde adcdcde y $& adcdcde
-a[bcd]+dcdcde adcdcde n - -
-(ab|a)b*c abc y $&-$1 abc-ab
-(ab|a)b*c abc y $-[0] 0
-(ab|a)b*c abc y $+[0] 3
-(ab|a)b*c abc y $-[1] 0
-(ab|a)b*c abc y $+[1] 2
-((a)(b)c)(d) abcd y $1-$2-$3-$4 abc-a-b-d
-((a)(b)c)(d) abcd y $-[0] 0
-((a)(b)c)(d) abcd y $+[0] 4
-((a)(b)c)(d) abcd y $-[1] 0
-((a)(b)c)(d) abcd y $+[1] 3
-((a)(b)c)(d) abcd y $-[2] 0
-((a)(b)c)(d) abcd y $+[2] 1
-((a)(b)c)(d) abcd y $-[3] 1
-((a)(b)c)(d) abcd y $+[3] 2
-((a)(b)c)(d) abcd y $-[4] 3
-((a)(b)c)(d) abcd y $+[4] 4
-[a-zA-Z_][a-zA-Z0-9_]* alpha y $& alpha
-^a(bc+|b[eh])g|.h$ abh y $&-$1 bh-
-(bc+d$|ef*g.|h?i(j|k)) effgz y $&-$1-$2 effgz-effgz-
-(bc+d$|ef*g.|h?i(j|k)) ij y $&-$1-$2 ij-ij-j
-(bc+d$|ef*g.|h?i(j|k)) effg n - -
-(bc+d$|ef*g.|h?i(j|k)) bcdd n - -
-(bc+d$|ef*g.|h?i(j|k)) reffgz y $&-$1-$2 effgz-effgz-
-((((((((((a)))))))))) a y $10 a
-((((((((((a)))))))))) a y $-[0] 0
-((((((((((a)))))))))) a y $+[0] 1
-((((((((((a)))))))))) a y $-[10] 0
-((((((((((a)))))))))) a y $+[10] 1
-((((((((((a))))))))))\10 aa y $& aa
-((((((((((a))))))))))${bang} aa n - -
-((((((((((a))))))))))${bang} a! y $& a!
-(((((((((a))))))))) a y $& a
-multiple words of text uh-uh n - -
-multiple words multiple words, yeah y $& multiple words
-(.*)c(.*) abcde y $&-$1-$2 abcde-ab-de
-\((.*), (.*)\) (a, b) y ($2, $1) (b, a)
-[k] ab n - -
-abcd abcd y $&-\$&-\\$& abcd-\$&-\\abcd
-a(bc)d abcd y $1-\$1-\\$1 bc-\$1-\\bc
-a[-]?c ac y $& ac
-(abc)\1 abcabc y $1 abc
-([a-c]*)\1 abcabc y $1 abc
-\1 - c - Reference to nonexistent group
-\2 - c - Reference to nonexistent group
-\g1 - c - Reference to nonexistent group
-\g-1 - c - Reference to nonexistent or unclosed group
-\g{1} - c - Reference to nonexistent group
-\g{-1} - c - Reference to nonexistent or unclosed group
-\g0 - c - Reference to invalid group 0
-\g-0 - c - Reference to invalid group 0
-\g{0} - c - Reference to invalid group 0
-\g{-0} - c - Reference to invalid group 0
-(a)|\1 a y - -
-(a)|\1 x n - -
-(a)|\2 - c - Reference to nonexistent group
-(([a-c])b*?\2)* ababbbcbc y $&-$1-$2 ababb-bb-b
-(([a-c])b*?\2){3} ababbbcbc y $&-$1-$2 ababbbcbc-cbc-c
-((\3|b)\2(a)x)+ aaxabxbaxbbx n - -
-((\3|b)\2(a)x)+ aaaxabaxbaaxbbax y $&-$1-$2-$3 bbax-bbax-b-a
-((\3|b)\2(a)){2,} bbaababbabaaaaabbaaaabba y $&-$1-$2-$3 bbaaaabba-bba-b-a
-#Bug #3589 - up to perl-5.6.0 matches incorrectly, from 5.6.1 not anymore
-^((.)?a\2)+$ babadad n - -
-(a)|(b) b y $-[0] 0
-(a)|(b) b y $+[0] 1
-(a)|(b) b y x$-[1] x
-(a)|(b) b y x$+[1] x
-(a)|(b) b y $-[2] 0
-(a)|(b) b y $+[2] 1
-'abc'i ABC y $& ABC
-'abc'i XBC n - -
-'abc'i AXC n - -
-'abc'i ABX n - -
-'abc'i XABCY y $& ABC
-'abc'i ABABC y $& ABC
-'ab*c'i ABC y $& ABC
-'ab*bc'i ABC y $& ABC
-'ab*bc'i ABBC y $& ABBC
-'ab*?bc'i ABBBBC y $& ABBBBC
-'ab{0,}?bc'i ABBBBC y $& ABBBBC
-'ab+?bc'i ABBC y $& ABBC
-'ab+bc'i ABC n - -
-'ab+bc'i ABQ n - -
-'ab{1,}bc'i ABQ n - -
-'ab+bc'i ABBBBC y $& ABBBBC
-'ab{1,}?bc'i ABBBBC y $& ABBBBC
-'ab{1,3}?bc'i ABBBBC y $& ABBBBC
-'ab{3,4}?bc'i ABBBBC y $& ABBBBC
-'ab{4,5}?bc'i ABBBBC n - -
-'ab??bc'i ABBC y $& ABBC
-'ab??bc'i ABC y $& ABC
-'ab{0,1}?bc'i ABC y $& ABC
-'ab??bc'i ABBBBC n - -
-'ab??c'i ABC y $& ABC
-'ab{0,1}?c'i ABC y $& ABC
-'^abc$'i ABC y $& ABC
-'^abc$'i ABCC n - -
-'^abc'i ABCC y $& ABC
-'^abc$'i AABC n - -
-'abc$'i AABC y $& ABC
-'^'i ABC y $&
-'$'i ABC y $&
-'a.c'i ABC y $& ABC
-'a.c'i AXC y $& AXC
-'a.*?c'i AXYZC y $& AXYZC
-'a.*c'i AXYZD n - -
-'a[bc]d'i ABC n - -
-'a[bc]d'i ABD y $& ABD
-'a[b-d]e'i ABD n - -
-'a[b-d]e'i ACE y $& ACE
-'a[b-d]'i AAC y $& AC
-'a[-b]'i A- y $& A-
-'a[b-]'i A- y $& A-
-'a[b-a]'i - c - Invalid [] range \"b-a\"
-'a[]b'i - c - Unmatched [
-'a['i - c - Unmatched [
-'a]'i A] y $& A]
-'a[]]b'i A]B y $& A]B
-'a[^bc]d'i AED y $& AED
-'a[^bc]d'i ABD n - -
-'a[^-b]c'i ADC y $& ADC
-'a[^-b]c'i A-C n - -
-'a[^]b]c'i A]C n - -
-'a[^]b]c'i ADC y $& ADC
-'ab|cd'i ABC y $& AB
-'ab|cd'i ABCD y $& AB
-'()ef'i DEF y $&-$1 EF-
-'*a'i - c - Quantifier follows nothing
-'(|*)b'i - c - Quantifier follows nothing
-'(*)b'i - c - Unknown verb
-'$b'i B n - -
-'a\'i - c - Search pattern not terminated
-'a\(b'i A(B y $&-$1 A(B-
-'a\(*b'i AB y $& AB
-'a\(*b'i A((B y $& A((B
-'a\\b'i A\\B y $& A\\B
-'abc)'i - c - Unmatched )
-'(abc'i - c - Unmatched (
-'((a))'i ABC y $&-$1-$2 A-A-A
-'(a)b(c)'i ABC y $&-$1-$2 ABC-A-C
-'a+b+c'i AABBABC y $& ABC
-'a{1,}b{1,}c'i AABBABC y $& ABC
-'a**'i - c - Nested quantifiers
-'a.+?c'i ABCABC y $& ABC
-'a.*?c'i ABCABC y $& ABC
-'a.{0,5}?c'i ABCABC y $& ABC
-'(a+|b)*'i AB y $&-$1 AB-B
-'(a+|b){0,}'i AB y $&-$1 AB-B
-'(a+|b)+'i AB y $&-$1 AB-B
-'(a+|b){1,}'i AB y $&-$1 AB-B
-'(a+|b)?'i AB y $&-$1 A-A
-'(a+|b){0,1}'i AB y $&-$1 A-A
-'(a+|b){0,1}?'i AB y $&-$1 -
-')('i - c - Unmatched )
-'[^ab]*'i CDE y $& CDE
-'abc'i n - -
-'a*'i y $&
-'([abc])*d'i ABBBCD y $&-$1 ABBBCD-C
-'([abc])*bcd'i ABCD y $&-$1 ABCD-A
-'a|b|c|d|e'i E y $& E
-'(a|b|c|d|e)f'i EF y $&-$1 EF-E
-'abcd*efg'i ABCDEFG y $& ABCDEFG
-'ab*'i XABYABBBZ y $& AB
-'ab*'i XAYABBBZ y $& A
-'(ab|cd)e'i ABCDE y $&-$1 CDE-CD
-'[abhgefdc]ij'i HIJ y $& HIJ
-'^(ab|cd)e'i ABCDE n x$1y XY
-'(abc|)ef'i ABCDEF y $&-$1 EF-
-'(a|b)c*d'i ABCD y $&-$1 BCD-B
-'(ab|ab*)bc'i ABC y $&-$1 ABC-A
-'a([bc]*)c*'i ABC y $&-$1 ABC-BC
-'a([bc]*)(c*d)'i ABCD y $&-$1-$2 ABCD-BC-D
-'a([bc]+)(c*d)'i ABCD y $&-$1-$2 ABCD-BC-D
-'a([bc]*)(c+d)'i ABCD y $&-$1-$2 ABCD-B-CD
-'a[bcd]*dcdcde'i ADCDCDE y $& ADCDCDE
-'a[bcd]+dcdcde'i ADCDCDE n - -
-'(ab|a)b*c'i ABC y $&-$1 ABC-AB
-'((a)(b)c)(d)'i ABCD y $1-$2-$3-$4 ABC-A-B-D
-'[a-zA-Z_][a-zA-Z0-9_]*'i ALPHA y $& ALPHA
-'^a(bc+|b[eh])g|.h$'i ABH y $&-$1 BH-
-'(bc+d$|ef*g.|h?i(j|k))'i EFFGZ y $&-$1-$2 EFFGZ-EFFGZ-
-'(bc+d$|ef*g.|h?i(j|k))'i IJ y $&-$1-$2 IJ-IJ-J
-'(bc+d$|ef*g.|h?i(j|k))'i EFFG n - -
-'(bc+d$|ef*g.|h?i(j|k))'i BCDD n - -
-'(bc+d$|ef*g.|h?i(j|k))'i REFFGZ y $&-$1-$2 EFFGZ-EFFGZ-
-'((((((((((a))))))))))'i A y $10 A
-'((((((((((a))))))))))\10'i AA y $& AA
-'((((((((((a))))))))))${bang}'i AA n - -
-'((((((((((a))))))))))${bang}'i A! y $& A!
-'(((((((((a)))))))))'i A y $& A
-'(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))'i A y $1 A
-'(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))'i C y $1 C
-'multiple words of text'i UH-UH n - -
-'multiple words'i MULTIPLE WORDS, YEAH y $& MULTIPLE WORDS
-'(.*)c(.*)'i ABCDE y $&-$1-$2 ABCDE-AB-DE
-'\((.*), (.*)\)'i (A, B) y ($2, $1) (B, A)
-'[k]'i AB n - -
-'abcd'i ABCD y $&-\$&-\\$& ABCD-\$&-\\ABCD
-'a(bc)d'i ABCD y $1-\$1-\\$1 BC-\$1-\\BC
-'a[-]?c'i AC y $& AC
-'(abc)\1'i ABCABC y $1 ABC
-'([a-c]*)\1'i ABCABC y $1 ABC
-a(?!b). abad y $& ad
-(?=)a a y $& a
-a(?=d). abad y $& ad
-a(?=c|d). abad y $& ad
-a(?:b|c|d)(.) ace y $1 e
-a(?:b|c|d)*(.) ace y $1 e
-a(?:b|c|d)+?(.) ace y $1 e
-a(?:b|c|d)+?(.) acdbcdbe y $1 d
-a(?:b|c|d)+(.) acdbcdbe y $1 e
-a(?:b|c|d){2}(.) acdbcdbe y $1 b
-a(?:b|c|d){4,5}(.) acdbcdbe y $1 b
-a(?:b|c|d){4,5}?(.) acdbcdbe y $1 d
-((foo)|(bar))* foobar y $1-$2-$3 bar-foo-bar
-:(?: - c - Sequence (? incomplete
-a(?:b|c|d){6,7}(.) acdbcdbe y $1 e
-a(?:b|c|d){6,7}?(.) acdbcdbe y $1 e
-a(?:b|c|d){5,6}(.) acdbcdbe y $1 e
-a(?:b|c|d){5,6}?(.) acdbcdbe y $1 b
-a(?:b|c|d){5,7}(.) acdbcdbe y $1 e
-a(?:b|c|d){5,7}?(.) acdbcdbe y $1 b
-a(?:b|(c|e){1,2}?|d)+?(.) ace y $1$2 ce
-^(.+)?B AB y $1 A
-^([^a-z])|(\^)$ . y $1 .
-^[<>]& <&OUT y $& <&
-^(a\1?){4}$ aaaaaaaaaa y $1 aaaa
-^(a\1?){4}$ aaaaaaaaa n - -
-^(a\1?){4}$ aaaaaaaaaaa n - -
-^(a(?(1)\1)){4}$ aaaaaaaaaa y $1 aaaa
-^(a(?(1)\1)){4}$ aaaaaaaaa n - -
-^(a(?(1)\1)){4}$ aaaaaaaaaaa n - -
-((a{4})+) aaaaaaaaa y $1 aaaaaaaa
-(((aa){2})+) aaaaaaaaaa y $1 aaaaaaaa
-(((a{2}){2})+) aaaaaaaaaa y $1 aaaaaaaa
-(?:(f)(o)(o)|(b)(a)(r))* foobar y $1:$2:$3:$4:$5:$6 f:o:o:b:a:r
-(?<=a)b ab y $& b
-(?<=a)b cb n - -
-(?<=a)b b n - -
-(?<!c)b ab y $& b
-(?<!c)b cb n - -
-(?<!c)b b y - -
-(?<!c)b b y $& b
-(?<%)b - c - Sequence (?<%...) not recognized
-(?:..)*a aba y $& aba
-(?:..)*?a aba y $& a
-^(?:b|a(?=(.)))*\1 abc y $& ab
-^(){3,5} abc y a$1 a
-^(a+)*ax aax y $1 a
-^((a|b)+)*ax aax y $1 a
-^((a|bc)+)*ax aax y $1 a
-(a|x)*ab cab y y$1 y
-(a)*ab cab y y$1 y
-(?:(?i)a)b ab y $& ab
-((?i)a)b ab y $&:$1 ab:a
-(?:(?i)a)b Ab y $& Ab
-((?i)a)b Ab y $&:$1 Ab:A
-(?:(?i)a)b aB n - -
-((?i)a)b aB n - -
-(?i:a)b ab y $& ab
-((?i:a))b ab y $&:$1 ab:a
-(?i:a)b Ab y $& Ab
-((?i:a))b Ab y $&:$1 Ab:A
-(?i:a)b aB n - -
-((?i:a))b aB n - -
-'(?:(?-i)a)b'i ab y $& ab
-'((?-i)a)b'i ab y $&:$1 ab:a
-'(?:(?-i)a)b'i aB y $& aB
-'((?-i)a)b'i aB y $&:$1 aB:a
-'(?:(?-i)a)b'i Ab n - -
-'((?-i)a)b'i Ab n - -
-'(?:(?-i)a)b'i aB y $& aB
-'((?-i)a)b'i aB y $1 a
-'(?:(?-i)a)b'i AB n - -
-'((?-i)a)b'i AB n - -
-'(?-i:a)b'i ab y $& ab
-'((?-i:a))b'i ab y $&:$1 ab:a
-'(?-i:a)b'i aB y $& aB
-'((?-i:a))b'i aB y $&:$1 aB:a
-'(?-i:a)b'i Ab n - -
-'((?-i:a))b'i Ab n - -
-'(?-i:a)b'i aB y $& aB
-'((?-i:a))b'i aB y $1 a
-'(?-i:a)b'i AB n - -
-'((?-i:a))b'i AB n - -
-'((?-i:a.))b'i a\nB n - -
-'((?s-i:a.))b'i a\nB y $1 a\n
-'((?s-i:a.))b'i B\nB n - -
-(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b))) cabbbb y $& cabbbb
-(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb))) caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb y $& caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-'(ab)\d\1'i Ab4ab y $1 Ab
-'(ab)\d\1'i ab4Ab y $1 ab
-foo\w*\d{4}baz foobar1234baz y $& foobar1234baz
-a(?{})b cabd y $& ab
-a(?{)b - c - Sequence (?{...}) not terminated or not {}-balanced
-a(?{{})b - c - Sequence (?{...}) not terminated or not {}-balanced
-a(?{}})b - c -
-a(?{"{"})b - c - Sequence (?{...}) not terminated or not {}-balanced
-a(?{"\{"})b cabd y $& ab
-a(?{"{"}})b - c - Unmatched right curly bracket
-a(?{$::bl="\{"}).b caxbd y $::bl {
-x(~~)*(?:(?:F)?)? x~~ y - -
-^a(?#xxx){3}c aaac y $& aaac
-'^a (?#xxx) (?#yyy) {3}c'x aaac y $& aaac
-(?<![cd])b dbcb n - -
-(?<![cd])[ab] dbaacb y $& a
-(?<!(c|d))b dbcb n - -
-(?<!(c|d))[ab] dbaacb y $& a
-(?<!cd)[ab] cdaccb y $& b
-^(?:a?b?)*$ a-- n - -
-((?s)^a(.))((?m)^b$) a\nb\nc\n y $1;$2;$3 a\n;\n;b
-((?m)^b$) a\nb\nc\n y $1 b
-(?m)^b a\nb\n y $& b
-(?m)^(b) a\nb\n y $1 b
-((?m)^b) a\nb\n y $1 b
-\n((?m)^b) a\nb\n y $1 b
-((?s).)c(?!.) a\nb\nc\n y $1 \n
-((?s).)c(?!.) a\nb\nc\n y $1:$& \n:\nc
-((?s)b.)c(?!.) a\nb\nc\n y $1 b\n
-((?s)b.)c(?!.) a\nb\nc\n y $1:$& b\n:b\nc
-^b a\nb\nc\n n - -
-()^b a\nb\nc\n n - -
-((?m)^b) a\nb\nc\n y $1 b
-(?(1)a|b) a n - -
-(?(1)b|a) a y $& a
-(x)?(?(1)a|b) a n - -
-(x)?(?(1)b|a) a y $& a
-()?(?(1)b|a) a y $& a
-()(?(1)b|a) a n - -
-()?(?(1)a|b) a y $& a
-^(\()?blah(?(1)(\)))$ (blah) y $2 )
-^(\()?blah(?(1)(\)))$ blah y ($2) ()
-^(\()?blah(?(1)(\)))$ blah) n - -
-^(\()?blah(?(1)(\)))$ (blah n - -
-^(\(+)?blah(?(1)(\)))$ (blah) y $2 )
-^(\(+)?blah(?(1)(\)))$ blah y ($2) ()
-^(\(+)?blah(?(1)(\)))$ blah) n - -
-^(\(+)?blah(?(1)(\)))$ (blah n - -
-(?(1?)a|b) a c - Switch condition not recognized
-(?(1)a|b|c) a c - Switch (?(condition)... contains too many branches
-(?(?{0})a|b) a n - -
-(?(?{0})b|a) a y $& a
-(?(?{1})b|a) a n - -
-(?(?{1})a|b) a y $& a
-(?(?!a)a|b) a n - -
-(?(?!a)b|a) a y $& a
-(?(?=a)b|a) a n - -
-(?(?=a)a|b) a y $& a
-(?=(a+?))(\1ab) aaab y $2 aab
-^(?=(a+?))\1ab aaab n - -
-(\w+:)+ one: y $1 one:
-$(?<=^(a)) a y $1 a
-(?=(a+?))(\1ab) aaab y $2 aab
-^(?=(a+?))\1ab aaab n - -
-([\w:]+::)?(\w+)$ abcd: n - -
-([\w:]+::)?(\w+)$ abcd y $1-$2 -abcd
-([\w:]+::)?(\w+)$ xy:z:::abcd y $1-$2 xy:z:::-abcd
-^[^bcd]*(c+) aexycd y $1 c
-(a*)b+ caab y $1 aa
-([\w:]+::)?(\w+)$ abcd: n - -
-([\w:]+::)?(\w+)$ abcd y $1-$2 -abcd
-([\w:]+::)?(\w+)$ xy:z:::abcd y $1-$2 xy:z:::-abcd
-^[^bcd]*(c+) aexycd y $1 c
-(?{$a=2})a*aa(?{local$a=$a+1})k*c(?{$b=$a}) yaaxxaaaacd y $b 3
-(?{$a=2})(a(?{local$a=$a+1}))*aak*c(?{$b=$a}) yaaxxaaaacd y $b 4
-(>a+)ab aaab n - -
-(?>a+)b aaab y - -
-([[:]+) a:[b]: y $1 :[
-([[=]+) a=[b]= y $1 =[
-([[.]+) a.[b]. y $1 .[
-[a[:xyz: - c - Unmatched [
-[a[:xyz:] - c - POSIX class [:xyz:] unknown
-[a[:]b[:c] abc y $& abc
-([a[:xyz:]b]+) pbaq c - POSIX class [:xyz:] unknown
-[a[:]b[:c] abc y $& abc
-([[:alpha:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd
-([[:alnum:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy
-([[:ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__-- ${nulnul}
-([[:cntrl:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${nulnul}
-([[:digit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 01
-([[:graph:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__--
-([[:lower:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 cd
-([[:print:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__--
-([[:punct:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 __--
-([[:space:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1
-([[:word:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__
-([[:upper:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 AB
-([[:xdigit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01
-([[:^alpha:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 01
-([[:^alnum:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 __-- ${nulnul}${ffff}
-([[:^ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${ffff}
-([[:^cntrl:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__--
-([[:^digit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd
-([[:^lower:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 AB
-([[:^print:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${nulnul}${ffff}
-([[:^punct:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy
-([[:^space:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__--
-([[:^word:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 -- ${nulnul}${ffff}
-([[:^upper:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 cd01
-([[:^xdigit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 Xy__-- ${nulnul}${ffff}
-[[:foo:]] - c - POSIX class [:foo:] unknown
-[[:^foo:]] - c - POSIX class [:^foo:] unknown
-((?>a+)b) aaab y $1 aaab
-(?>(a+))b aaab y $1 aaa
-((?>[^()]+)|\([^()]*\))+ ((abc(ade)ufh()()x y $& abc(ade)ufh()()x
-(?<=x+)y - c - Variable length lookbehind not implemented
-a{37,17} - c - Can't do {n,m} with n > m
-a{37,0} - c - Can't do {n,m} with n > m
-\Z a\nb\n y $-[0] 3
-\z a\nb\n y $-[0] 4
-$ a\nb\n y $-[0] 3
-\Z b\na\n y $-[0] 3
-\z b\na\n y $-[0] 4
-$ b\na\n y $-[0] 3
-\Z b\na y $-[0] 3
-\z b\na y $-[0] 3
-$ b\na y $-[0] 3
-'\Z'm a\nb\n y $-[0] 3
-'\z'm a\nb\n y $-[0] 4
-'$'m a\nb\n y $-[0] 1
-'\Z'm b\na\n y $-[0] 3
-'\z'm b\na\n y $-[0] 4
-'$'m b\na\n y $-[0] 1
-'\Z'm b\na y $-[0] 3
-'\z'm b\na y $-[0] 3
-'$'m b\na y $-[0] 1
-a\Z a\nb\n n - -
-a\z a\nb\n n - -
-a$ a\nb\n n - -
-a\Z b\na\n y $-[0] 2
-a\z b\na\n n - -
-a$ b\na\n y $-[0] 2
-a\Z b\na y $-[0] 2
-a\z b\na y $-[0] 2
-a$ b\na y $-[0] 2
-'a\Z'm a\nb\n n - -
-'a\z'm a\nb\n n - -
-'a$'m a\nb\n y $-[0] 0
-'a\Z'm b\na\n y $-[0] 2
-'a\z'm b\na\n n - -
-'a$'m b\na\n y $-[0] 2
-'a\Z'm b\na y $-[0] 2
-'a\z'm b\na y $-[0] 2
-'a$'m b\na y $-[0] 2
-aa\Z aa\nb\n n - -
-aa\z aa\nb\n n - -
-aa$ aa\nb\n n - -
-aa\Z b\naa\n y $-[0] 2
-aa\z b\naa\n n - -
-aa$ b\naa\n y $-[0] 2
-aa\Z b\naa y $-[0] 2
-aa\z b\naa y $-[0] 2
-aa$ b\naa y $-[0] 2
-'aa\Z'm aa\nb\n n - -
-'aa\z'm aa\nb\n n - -
-'aa$'m aa\nb\n y $-[0] 0
-'aa\Z'm b\naa\n y $-[0] 2
-'aa\z'm b\naa\n n - -
-'aa$'m b\naa\n y $-[0] 2
-'aa\Z'm b\naa y $-[0] 2
-'aa\z'm b\naa y $-[0] 2
-'aa$'m b\naa y $-[0] 2
-aa\Z ac\nb\n n - -
-aa\z ac\nb\n n - -
-aa$ ac\nb\n n - -
-aa\Z b\nac\n n - -
-aa\z b\nac\n n - -
-aa$ b\nac\n n - -
-aa\Z b\nac n - -
-aa\z b\nac n - -
-aa$ b\nac n - -
-'aa\Z'm ac\nb\n n - -
-'aa\z'm ac\nb\n n - -
-'aa$'m ac\nb\n n - -
-'aa\Z'm b\nac\n n - -
-'aa\z'm b\nac\n n - -
-'aa$'m b\nac\n n - -
-'aa\Z'm b\nac n - -
-'aa\z'm b\nac n - -
-'aa$'m b\nac n - -
-aa\Z ca\nb\n n - -
-aa\z ca\nb\n n - -
-aa$ ca\nb\n n - -
-aa\Z b\nca\n n - -
-aa\z b\nca\n n - -
-aa$ b\nca\n n - -
-aa\Z b\nca n - -
-aa\z b\nca n - -
-aa$ b\nca n - -
-'aa\Z'm ca\nb\n n - -
-'aa\z'm ca\nb\n n - -
-'aa$'m ca\nb\n n - -
-'aa\Z'm b\nca\n n - -
-'aa\z'm b\nca\n n - -
-'aa$'m b\nca\n n - -
-'aa\Z'm b\nca n - -
-'aa\z'm b\nca n - -
-'aa$'m b\nca n - -
-ab\Z ab\nb\n n - -
-ab\z ab\nb\n n - -
-ab$ ab\nb\n n - -
-ab\Z b\nab\n y $-[0] 2
-ab\z b\nab\n n - -
-ab$ b\nab\n y $-[0] 2
-ab\Z b\nab y $-[0] 2
-ab\z b\nab y $-[0] 2
-ab$ b\nab y $-[0] 2
-'ab\Z'm ab\nb\n n - -
-'ab\z'm ab\nb\n n - -
-'ab$'m ab\nb\n y $-[0] 0
-'ab\Z'm b\nab\n y $-[0] 2
-'ab\z'm b\nab\n n - -
-'ab$'m b\nab\n y $-[0] 2
-'ab\Z'm b\nab y $-[0] 2
-'ab\z'm b\nab y $-[0] 2
-'ab$'m b\nab y $-[0] 2
-ab\Z ac\nb\n n - -
-ab\z ac\nb\n n - -
-ab$ ac\nb\n n - -
-ab\Z b\nac\n n - -
-ab\z b\nac\n n - -
-ab$ b\nac\n n - -
-ab\Z b\nac n - -
-ab\z b\nac n - -
-ab$ b\nac n - -
-'ab\Z'm ac\nb\n n - -
-'ab\z'm ac\nb\n n - -
-'ab$'m ac\nb\n n - -
-'ab\Z'm b\nac\n n - -
-'ab\z'm b\nac\n n - -
-'ab$'m b\nac\n n - -
-'ab\Z'm b\nac n - -
-'ab\z'm b\nac n - -
-'ab$'m b\nac n - -
-ab\Z ca\nb\n n - -
-ab\z ca\nb\n n - -
-ab$ ca\nb\n n - -
-ab\Z b\nca\n n - -
-ab\z b\nca\n n - -
-ab$ b\nca\n n - -
-ab\Z b\nca n - -
-ab\z b\nca n - -
-ab$ b\nca n - -
-'ab\Z'm ca\nb\n n - -
-'ab\z'm ca\nb\n n - -
-'ab$'m ca\nb\n n - -
-'ab\Z'm b\nca\n n - -
-'ab\z'm b\nca\n n - -
-'ab$'m b\nca\n n - -
-'ab\Z'm b\nca n - -
-'ab\z'm b\nca n - -
-'ab$'m b\nca n - -
-abb\Z abb\nb\n n - -
-abb\z abb\nb\n n - -
-abb$ abb\nb\n n - -
-abb\Z b\nabb\n y $-[0] 2
-abb\z b\nabb\n n - -
-abb$ b\nabb\n y $-[0] 2
-abb\Z b\nabb y $-[0] 2
-abb\z b\nabb y $-[0] 2
-abb$ b\nabb y $-[0] 2
-'abb\Z'm abb\nb\n n - -
-'abb\z'm abb\nb\n n - -
-'abb$'m abb\nb\n y $-[0] 0
-'abb\Z'm b\nabb\n y $-[0] 2
-'abb\z'm b\nabb\n n - -
-'abb$'m b\nabb\n y $-[0] 2
-'abb\Z'm b\nabb y $-[0] 2
-'abb\z'm b\nabb y $-[0] 2
-'abb$'m b\nabb y $-[0] 2
-abb\Z ac\nb\n n - -
-abb\z ac\nb\n n - -
-abb$ ac\nb\n n - -
-abb\Z b\nac\n n - -
-abb\z b\nac\n n - -
-abb$ b\nac\n n - -
-abb\Z b\nac n - -
-abb\z b\nac n - -
-abb$ b\nac n - -
-'abb\Z'm ac\nb\n n - -
-'abb\z'm ac\nb\n n - -
-'abb$'m ac\nb\n n - -
-'abb\Z'm b\nac\n n - -
-'abb\z'm b\nac\n n - -
-'abb$'m b\nac\n n - -
-'abb\Z'm b\nac n - -
-'abb\z'm b\nac n - -
-'abb$'m b\nac n - -
-abb\Z ca\nb\n n - -
-abb\z ca\nb\n n - -
-abb$ ca\nb\n n - -
-abb\Z b\nca\n n - -
-abb\z b\nca\n n - -
-abb$ b\nca\n n - -
-abb\Z b\nca n - -
-abb\z b\nca n - -
-abb$ b\nca n - -
-'abb\Z'm ca\nb\n n - -
-'abb\z'm ca\nb\n n - -
-'abb$'m ca\nb\n n - -
-'abb\Z'm b\nca\n n - -
-'abb\z'm b\nca\n n - -
-'abb$'m b\nca\n n - -
-'abb\Z'm b\nca n - -
-'abb\z'm b\nca n - -
-'abb$'m b\nca n - -
-(^|x)(c) ca y $2 c
-a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz x n - -
-a(?{$a=2;$b=3;($b)=$a})b yabz y $b 2
-round\(((?>[^()]+))\) _I(round(xs * sz),1) y $1 xs * sz
-'((?x:.) )' x y $1- x -
-'((?-x:.) )'x x y $1- x-
-foo.bart foo.bart y - -
-'^d[x][x][x]'m abcd\ndxxx y - -
-.X(.+)+X bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
-.X(.+)+XX bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
-.XX(.+)+X bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
-.X(.+)+X bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
-.X(.+)+XX bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
-.XX(.+)+X bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
-.X(.+)+[X] bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
-.X(.+)+[X][X] bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
-.XX(.+)+[X] bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
-.X(.+)+[X] bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
-.X(.+)+[X][X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
-.XX(.+)+[X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
-.[X](.+)+[X] bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
-.[X](.+)+[X][X] bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
-.[X][X](.+)+[X] bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
-.[X](.+)+[X] bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
-.[X](.+)+[X][X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
-.[X][X](.+)+[X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
-tt+$ xxxtt y - -
-([a-\d]+) za-9z y $1 a-9
-([\d-z]+) a0-za y $1 0-z
-([\d-\s]+) a0- z y $1 0-
-([a-[:digit:]]+) za-9z y $1 a-9
-([[:digit:]-z]+) =0-z= y $1 0-z
-([[:digit:]-[:alpha:]]+) =0-z= y $1 0-z
-\GX.*X aaaXbX n - -
-(\d+\.\d+) 3.1415926 y $1 3.1415926
-(\ba.{0,10}br) have a web browser y $1 a web br
-'\.c(pp|xx|c)?$'i Changes n - -
-'\.c(pp|xx|c)?$'i IO.c y - -
-'(\.c(pp|xx|c)?$)'i IO.c y $1 .c
-^([a-z]:) C:/ n - -
-'^\S\s+aa$'m \nx aa y - -
-(^|a)b ab y - -
-^([ab]*?)(b)?(c)$ abac y -$2- --
-(\w)?(abc)\1b abcab n - -
-^(?:.,){2}c a,b,c y - -
-^(.,){2}c a,b,c y $1 b,
-^(?:[^,]*,){2}c a,b,c y - -
-^([^,]*,){2}c a,b,c y $1 b,
-^([^,]*,){3}d aaa,b,c,d y $1 c,
-^([^,]*,){3,}d aaa,b,c,d y $1 c,
-^([^,]*,){0,3}d aaa,b,c,d y $1 c,
-^([^,]{1,3},){3}d aaa,b,c,d y $1 c,
-^([^,]{1,3},){3,}d aaa,b,c,d y $1 c,
-^([^,]{1,3},){0,3}d aaa,b,c,d y $1 c,
-^([^,]{1,},){3}d aaa,b,c,d y $1 c,
-^([^,]{1,},){3,}d aaa,b,c,d y $1 c,
-^([^,]{1,},){0,3}d aaa,b,c,d y $1 c,
-^([^,]{0,3},){3}d aaa,b,c,d y $1 c,
-^([^,]{0,3},){3,}d aaa,b,c,d y $1 c,
-^([^,]{0,3},){0,3}d aaa,b,c,d y $1 c,
-(?i) y - -
-'(?!\A)x'm a\nxb\n y - -
-^(a(b)?)+$ aba y -$1-$2- -a--
-^(aa(bb)?)+$ aabbaa y -$1-$2- -aa--
-'^.{9}abc.*\n'm 123\nabcabcabcabc\n y - -
-^(a)?a$ a y -$1- --
-^(a)?(?(1)a|b)+$ a n - -
-^(a\1?)(a\1?)(a\2?)(a\3?)$ aaaaaa y $1,$2,$3,$4 a,aa,a,aa
-^(a\1?){4}$ aaaaaa y $1 aa
-^(0+)?(?:x(1))? x1 y - -
-^([0-9a-fA-F]+)(?:x([0-9a-fA-F]+)?)(?:x([0-9a-fA-F]+))? 012cxx0190 y - -
-^(b+?|a){1,2}c bbbac y $1 a
-^(b+?|a){1,2}c bbbbac y $1 a
-\((\w\. \w+)\) cd. (A. Tw) y -$1- -A. Tw-
-((?:aaaa|bbbb)cccc)? aaaacccc y - -
-((?:aaaa|bbbb)cccc)? bbbbcccc y - -
-(a)?(a)+ a y $1:$2 :a -
-(ab)?(ab)+ ab y $1:$2 :ab -
-(abc)?(abc)+ abc y $1:$2 :abc -
-'b\s^'m a\nb\n n - -
-\ba a y - -
-^(a(??{"(?!)"})|(a)(?{1}))b ab y $2 a # [ID 20010811.006]
-ab(?i)cd AbCd n - - # [ID 20010809.023]
-ab(?i)cd abCd y - -
-(A|B)*(?(1)(CD)|(CD)) CD y $2-$3 -CD
-(A|B)*(?(1)(CD)|(CD)) ABCD y $2-$3 CD-
-(A|B)*?(?(1)(CD)|(CD)) CD y $2-$3 -CD # [ID 20010803.016]
-(A|B)*?(?(1)(CD)|(CD)) ABCD y $2-$3 CD-
-'^(o)(?!.*\1)'i Oo n - -
-(.*)\d+\1 abc12bc y $1 bc
-(?m:(foo\s*$)) foo\n bar y $1 foo
-(.*)c abcd y $1 ab
-(.*)(?=c) abcd y $1 ab
-(.*)(?=c)c abcd yB $1 ab
-(.*)(?=b|c) abcd y $1 ab
-(.*)(?=b|c)c abcd y $1 ab
-(.*)(?=c|b) abcd y $1 ab
-(.*)(?=c|b)c abcd y $1 ab
-(.*)(?=[bc]) abcd y $1 ab
-(.*)(?=[bc])c abcd yB $1 ab
-(.*)(?<=b) abcd y $1 ab
-(.*)(?<=b)c abcd y $1 ab
-(.*)(?<=b|c) abcd y $1 abc
-(.*)(?<=b|c)c abcd y $1 ab
-(.*)(?<=c|b) abcd y $1 abc
-(.*)(?<=c|b)c abcd y $1 ab
-(.*)(?<=[bc]) abcd y $1 abc
-(.*)(?<=[bc])c abcd y $1 ab
-(.*?)c abcd y $1 ab
-(.*?)(?=c) abcd y $1 ab
-(.*?)(?=c)c abcd yB $1 ab
-(.*?)(?=b|c) abcd y $1 a
-(.*?)(?=b|c)c abcd y $1 ab
-(.*?)(?=c|b) abcd y $1 a
-(.*?)(?=c|b)c abcd y $1 ab
-(.*?)(?=[bc]) abcd y $1 a
-(.*?)(?=[bc])c abcd yB $1 ab
-(.*?)(?<=b) abcd y $1 ab
-(.*?)(?<=b)c abcd y $1 ab
-(.*?)(?<=b|c) abcd y $1 ab
-(.*?)(?<=b|c)c abcd y $1 ab
-(.*?)(?<=c|b) abcd y $1 ab
-(.*?)(?<=c|b)c abcd y $1 ab
-(.*?)(?<=[bc]) abcd y $1 ab
-(.*?)(?<=[bc])c abcd y $1 ab
-2(]*)?$\1 2 y $& 2
-(??{}) x y - -
-a(b)?? abc y <$1> <> # undef [perl #16773]
-(\d{1,3}\.){3,} 128.134.142.8 y <$1> <142.> # [perl #18019]
-^.{3,4}(.+)\1\z foobarbar y $1 bar # 16 tests for [perl #23171]
-^(?:f|o|b){3,4}(.+)\1\z foobarbar y $1 bar
-^.{3,4}((?:b|a|r)+)\1\z foobarbar y $1 bar
-^(?:f|o|b){3,4}((?:b|a|r)+)\1\z foobarbar y $1 bar
-^.{3,4}(.+?)\1\z foobarbar y $1 bar
-^(?:f|o|b){3,4}(.+?)\1\z foobarbar y $1 bar
-^.{3,4}((?:b|a|r)+?)\1\z foobarbar y $1 bar
-^(?:f|o|b){3,4}((?:b|a|r)+?)\1\z foobarbar y $1 bar
-^.{2,3}?(.+)\1\z foobarbar y $1 bar
-^(?:f|o|b){2,3}?(.+)\1\z foobarbar y $1 bar
-^.{2,3}?((?:b|a|r)+)\1\z foobarbar y $1 bar
-^(?:f|o|b){2,3}?((?:b|a|r)+)\1\z foobarbar y $1 bar
-^.{2,3}?(.+?)\1\z foobarbar y $1 bar
-^(?:f|o|b){2,3}?(.+?)\1\z foobarbar y $1 bar
-^.{2,3}?((?:b|a|r)+?)\1\z foobarbar y $1 bar
-^(?:f|o|b){2,3}?((?:b|a|r)+?)\1\z foobarbar y $1 bar
-.*a(?!(b|cd)*e).*f ......abef n - - # [perl #23030]
-x(?# x c - Sequence (?#... not terminated
-:x(?#: x c - Sequence (?#... not terminated
-(WORDS|WORD)S WORDS y $1 WORD
-(X.|WORDS|X.|WORD)S WORDS y $1 WORD
-(WORDS|WORLD|WORD)S WORDS y $1 WORD
-(X.|WORDS|WORD|Y.)S WORDS y $1 WORD
-(foo|fool|x.|money|parted)$ fool y $1 fool
-(x.|foo|fool|x.|money|parted|y.)$ fool y $1 fool
-(foo|fool|money|parted)$ fool y $1 fool
-(foo|fool|x.|money|parted)$ fools n - -
-(x.|foo|fool|x.|money|parted|y.)$ fools n - -
-(foo|fool|money|parted)$ fools n - -
-(a|aa|aaa||aaaa|aaaaa|aaaaaa)(b|c) aaaaaaaaaaaaaaab y $1$2 aaaaaab
-(a|aa|aaa||aaaa|aaaaa|aaaaaa)(??{$1&&""})(b|c) aaaaaaaaaaaaaaab y $1$2 aaaaaab
-(a|aa|aaa|aaaa|aaaaa|aaaaaa)(??{$1&&"foo"})(b|c) aaaaaaaaaaaaaaab n - -
-^(a*?)(?!(aa|aaaa)*$) aaaaaaaaaaaaaaaaaaaa y $1 a # [perl #34195]
-^(a*?)(?!(aa|aaaa)*$)(?=a\z) aaaaaaaa y $1 aaaaaaa
-^(.)\s+.$(?(1)) A B y $1 A # [perl #37688]
-(?:r?)*?r|(.{2,4}) abcde y $1 abcd
-(?!)+?|(.{2,4}) abcde y $1 abcd
-^(a*?)(?!(a{6}|a{5})*$) aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y $+[1] 12 # super-linear cache bug may return 18
-^((?>(?:aa)?b)?) aab y $1 aab
-^((?:aa)*)(?:X+((?:\d+|-)(?:X+(.+))?))?$ aaaaX5 y $1 aaaa
-X(A|B||C|D)Y XXXYYY y $& XY # Trie w/ NOTHING
-(?i:X([A]|[B]|y[Y]y|[D]|)Y) XXXYYYB y $& XY # Trie w/ NOTHING
-^([a]{1})*$ aa y $1 a
-a(?!b(?!c))(..) abababc y $1 bc # test nested negatives
-a(?!b(?=a))(..) abababc y $1 bc # test nested lookaheads
-a(?!b(?!c(?!d(?!e))))...(.) abxabcdxabcde y $1 e
-X(?!b+(?!(c+)*(?!(c+)*d))).*X aXbbbbbbbcccccccccccccaaaX y - -
-^(XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P): ZEQQQQQQQQQQQQQQQQQQP: y $1 ZEQQQQQQQQQQQQQQQQQQP
-^(XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P): ZEQQQX: y $1 ZEQQQX
-^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P): ZEQQQQQQQQQQQQQQQQQQP: y $1 ZEQQQQQQQQQQQQQQQQQQP
-^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P): ZEQQQX: y $1 ZEQQQX
-^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P|[MKJ]): ZEQQQQQQQQQQQQQQQQQQP: y $1 ZEQQQQQQQQQQQQQQQQQQP
-^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P|[MKJ]): ZEQQQX: y $1 ZEQQQX
-^(XXX|YYY|Z.Q*X|Z[TE]Q*P): ZEQQQQQQQQQQQQQQQQQQP: y $1 ZEQQQQQQQQQQQQQQQQQQP
-^(XXX|YYY|Z.Q*X|Z[TE]Q*P): ZEQQQX: y $1 ZEQQQX
-^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P): ZEQQQQQQQQQQQQQQQQQQP: y $1 ZEQQQQQQQQQQQQQQQQQQP
-^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P): ZEQQQX: y $1 ZEQQQX
-^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P|[MKJ]): ZEQQQQQQQQQQQQQQQQQQP: y $1 ZEQQQQQQQQQQQQQQQQQQP
-^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P|[MKJ]): ZEQQQX: y $1 ZEQQQX
-X(?:ABCF[cC]x*|ABCD|ABCF):(?:DIT|DID|DIM) XABCFCxxxxxxxxxx:DIM y $& XABCFCxxxxxxxxxx:DIM
-(((ABCD|ABCE|ABCF)))(A|B|C[xy]*): ABCFCxxxxxxxxxx:DIM y $& ABCFCxxxxxxxxxx:
-(?=foo) foo y pos 0
-(?=foo) XfooY y pos 1
-.*(?=foo) XfooY y pos 1
-(?<=foo) foo y pos 3
-(?<=foo) XfooY y pos 4
-.*(?<=foo) foo y pos 3
-.*(?<=foo) XfooY y pos 4
-(?<=foo)Y XfooY y pos 5
-o(?<=foo)Y ..XfooY.. y pos 7
-X(?=foo)f ..XfooY.. y pos 4
-X(?=foo) ..XfooY.. y pos 3
-X(?<=foo.)[YZ] ..XfooXY.. y pos 8
-(?=XY*foo) Xfoo y pos 0
-^(?=XY*foo) Xfoo y pos 0
-^(??{"a+"})a aa y $& aa
-^(?:(??{"a+"})|b)a aa y $& aa
-^(??{chr 0x100}).$ \x{100}\x{100} y $& \x{100}\x{100}
-^(??{q(\x{100})}). \x{100}\x{100} y $& \x{100}\x{100}
-^(??{q(.+)})\x{100} \x{100}\x{100} y $& \x{100}\x{100}
-^(??{q(.)})\x{100} \x{100}\x{100} y $& \x{100}\x{100}
-^(??{chr 0x100})\xbb \x{100}\x{bb} y $& \x{100}\x{bb}
-^(.)(??{"(.)(.)"})(.)$ abcd y $1-$2 a-d
-^(.)(??{"(bz+|.)(.)"})(.)$ abcd y $1-$2 a-d
-^(.)((??{"(.)(cz+)"})|.) abcd y $1-$2 a-b
-^a(?>(??{q(b)}))(??{q(c)})d abcd y - -
-^x(??{""})+$ x y $& x
-^(<(?:[^<>]+|(?3)|(?1))*>)()(!>!>!>)$ <<!>!>!>><>>!>!>!> y $1 <<!>!>!>><>>
-^(<(?:[^<>]+|(?1))*>)$ <<><<<><>>>> y $1 <<><<<><>>>>
-((?2)*)([fF]o+) fooFoFoo y $1-$2 fooFo-Foo
-(<(?:[^<>]+|(?R))*>) <<><<<><>>>> y $1 <<><<<><>>>>
-(?<n>foo|bar|baz) snofooewa y $1 foo
-(?<n>foo|bar|baz) snofooewa y $+{n} foo
-(?<n>foo|bar|baz)(?<m>[ew]+) snofooewa y $+{n} foo
-(?<n>foo|bar|baz)(?<m>[ew]+) snofooewa y $+{m} ew
-(?<n>foo)|(?<n>bar)|(?<n>baz) snofooewa y $+{n} foo
-(?<n>foo)(??{ $+{n} }) snofooefoofoowaa y $+{n} foo
-(?P<n>foo|bar|baz) snofooewa y $1 foo
-(?P<n>foo|bar|baz) snofooewa y $+{n} foo
-(?P<n>foo|bar|baz)(?P<m>[ew]+) snofooewa y $+{n} foo
-(?P<n>foo|bar|baz)(?P<m>[ew]+) snofooewa y $+{m} ew
-(?P<n>foo)|(?P<n>bar)|(?P<n>baz) snofooewa y $+{n} foo
-(?P<n>foo)(??{ $+{n} }) snofooefoofoowaa y $+{n} foo
-(?P<=n>foo|bar|baz) snofooewa c - Sequence (?P<=...) not recognized
-(?P<!n>foo|bar|baz) snofooewa c - Sequence (?P<!...) not recognized
-(?PX<n>foo|bar|baz) snofooewa c - Sequence (?PX<...) not recognized
-/(?'n'foo|bar|baz)/ snofooewa y $1 foo
-/(?'n'foo|bar|baz)/ snofooewa y $+{n} foo
-/(?'n'foo|bar|baz)(?'m'[ew]+)/ snofooewa y $+{n} foo
-/(?'n'foo|bar|baz)(?'m'[ew]+)/ snofooewa y $+{m} ew
-/(?'n'foo)|(?'n'bar)|(?<n>baz)/ snobazewa y $+{n} baz
-/(?'n'foo)(??{ $+{n} })/ snofooefoofoowaa y $+{n} foo
-/(?'n'foo)\k<n>/ ..foofoo.. y $1 foo
-/(?'n'foo)\k<n>/ ..foofoo.. y $+{n} foo
-/(?<n>foo)\k'n'/ ..foofoo.. y $1 foo
-/(?<n>foo)\k'n'/ ..foofoo.. y $+{n} foo
-/(?:(?<n>foo)|(?<n>bar))\k<n>/ ..barbar.. y $+{n} bar
-/^(?'main'<(?:[^<>]+|(?&crap)|(?&main))*>)(?'empty')(?'crap'!>!>!>)$/ <<!>!>!>><>>!>!>!> y $+{main} <<!>!>!>><>>
-/^(?'main'<(?:[^<>]+|(?&main))*>)$/ <<><<<><>>>> y $1 <<><<<><>>>>
-/(?'first'(?&second)*)(?'second'[fF]o+)/ fooFoFoo y $+{first}-$+{second} fooFo-Foo
-(?<A>foo)?(?(<A>)bar|nada) foobar y $+{A} foo
-(?<A>foo)?(?(<A>)bar|nada) foo-barnada y $& nada
-(?<A>foo)?(?(1)bar|nada) foo-barnada y $& nada
-(?<A>foo(?(R)bar))?(?1) foofoobar y $1 foo
-(?<A>foo(?(R)bar))?(?1) foofoobar y $& foofoobar
-(x)(?<A>foo(?(R&A)bar))?(?&A) xfoofoobar y $2 foo
-(x)(?<A>foo(?(R&A)bar))?(?&A) xfoofoobar y $& xfoofoobar
-(x)(?<A>foo(?(R2)bar))?(?&A) xfoofoobar y $2 foo
-(x)(?<A>foo(?(R2)bar))?(?&A) xfoofoobar y $& xfoofoobar
-(?1)(?(DEFINE)(blah)) blah y $& blah
-/^(?<PAL>(?<CHAR>.)((?&PAL)|.?)\k<CHAR>)$/ madamimadam y $& madamimadam
-/^(?<PAL>(?<CHAR>.)((?&PAL)|.?)\k<CHAR>)$/ madamiamadam n - -
-/(a)?((?1))(fox)/ aafox y $1-$2-$3 a-a-fox
-/(a)*((?1))(fox)/ aafox y $1-$2-$3 a-a-fox
-/(a)+((?1))(fox)/ aafox y $1-$2-$3 a-a-fox
-/(a){1,100}((?1))(fox)/ aafox y $1-$2-$3 a-a-fox
-/(a){0,100}((?1))(fox)/ aafox y $1-$2-$3 a-a-fox
-/(ab)?((?1))(fox)/ ababfox y $1-$2-$3 ab-ab-fox
-/(ab)*((?1))(fox)/ ababfox y $1-$2-$3 ab-ab-fox
-/(ab)+((?1))(fox)/ ababfox y $1-$2-$3 ab-ab-fox
-/(ab){1,100}((?1))(fox)/ ababfox y $1-$2-$3 ab-ab-fox
-/(ab){0,100}((?1))(fox)/ ababfox y $1-$2-$3 ab-ab-fox
-# possessive captures
-a++a aaaaa n - -
-a*+a aaaaa n - -
-a{1,5}+a aaaaa n - -
-a?+a ab n - -
-a++b aaaaab y $& aaaaab
-a*+b aaaaab y $& aaaaab
-a{1,5}+b aaaaab y $& aaaaab
-a?+b ab y $& ab
-fooa++a fooaaaaa n - -
-fooa*+a fooaaaaa n - -
-fooa{1,5}+a fooaaaaa n - -
-fooa?+a fooab n - -
-fooa++b fooaaaaab y $& fooaaaaab
-fooa*+b fooaaaaab y $& fooaaaaab
-fooa{1,5}+b fooaaaaab y $& fooaaaaab
-fooa?+b fooab y $& fooab
-(?:aA)++(?:aA) aAaAaAaAaA n - aAaAaAaAaA
-(aA)++(aA) aAaAaAaAaA n - aAaAaAaAaA
-(aA|bB)++(aA|bB) aAaAbBaAbB n - aAaAbBaAbB
-(?:aA|bB)++(?:aA|bB) aAbBbBbBaA n - aAbBbBbBaA
-(?:aA)*+(?:aA) aAaAaAaAaA n - aAaAaAaAaA
-(aA)*+(aA) aAaAaAaAaA n - aAaAaAaAaA
-(aA|bB)*+(aA|bB) aAaAbBaAaA n - aAaAbBaAaA
-(?:aA|bB)*+(?:aA|bB) aAaAaAbBaA n - aAaAaAbBaA
-(?:aA){1,5}+(?:aA) aAaAaAaAaA n - aAaAaAaAaA
-(aA){1,5}+(aA) aAaAaAaAaA n - aAaAaAaAaA
-(aA|bB){1,5}+(aA|bB) aAaAbBaAaA n - aAaAbBaAaA
-(?:aA|bB){1,5}+(?:aA|bB) bBbBbBbBbB n - bBbBbBbBbB
-(?:aA)?+(?:aA) aAb n - aAb
-(aA)?+(aA) aAb n - aAb
-(aA|bB)?+(aA|bB) bBb n - bBb
-(?:aA|bB)?+(?:aA|bB) aAb n - aAb
-(?:aA)++b aAaAaAaAaAb y $& aAaAaAaAaAb
-(aA)++b aAaAaAaAaAb y $& aAaAaAaAaAb
-(aA|bB)++b aAbBaAaAbBb y $& aAbBaAaAbBb
-(?:aA|bB)++b aAbBbBaAaAb y $& aAbBbBaAaAb
-(?:aA)*+b aAaAaAaAaAb y $& aAaAaAaAaAb
-(aA)*+b aAaAaAaAaAb y $& aAaAaAaAaAb
-(aA|bB)*+b bBbBbBbBbBb y $& bBbBbBbBbBb
-(?:aA|bB)*+b bBaAbBbBaAb y $& bBaAbBbBaAb
-(?:aA){1,5}+b aAaAaAaAaAb y $& aAaAaAaAaAb
-(aA){1,5}+b aAaAaAaAaAb y $& aAaAaAaAaAb
-(aA|bB){1,5}+b bBaAbBaAbBb y $& bBaAbBaAbBb
-(?:aA|bB){1,5}+b aAbBaAbBbBb y $& aAbBaAbBbBb
-(?:aA)?+b aAb y $& aAb
-(aA)?+b aAb y $& aAb
-(aA|bB)?+b bBb y $& bBb
-(?:aA|bB)?+b bBb y $& bBb
-foo(?:aA)++(?:aA) fooaAaAaAaAaA n - fooaAaAaAaAaA
-foo(aA)++(aA) fooaAaAaAaAaA n - fooaAaAaAaAaA
-foo(aA|bB)++(aA|bB) foobBbBbBaAaA n - foobBbBbBaAaA
-foo(?:aA|bB)++(?:aA|bB) fooaAaAaAaAaA n - fooaAaAaAaAaA
-foo(?:aA)*+(?:aA) fooaAaAaAaAaA n - fooaAaAaAaAaA
-foo(aA)*+(aA) fooaAaAaAaAaA n - fooaAaAaAaAaA
-foo(aA|bB)*+(aA|bB) foobBaAbBaAaA n - foobBaAbBaAaA
-foo(?:aA|bB)*+(?:aA|bB) fooaAaAbBbBaA n - fooaAaAbBbBaA
-foo(?:aA){1,5}+(?:aA) fooaAaAaAaAaA n - fooaAaAaAaAaA
-foo(aA){1,5}+(aA) fooaAaAaAaAaA n - fooaAaAaAaAaA
-foo(aA|bB){1,5}+(aA|bB) fooaAbBbBaAaA n - fooaAbBbBaAaA
-foo(?:aA|bB){1,5}+(?:aA|bB) fooaAbBbBaAbB n - fooaAbBbBaAbB
-foo(?:aA)?+(?:aA) fooaAb n - fooaAb
-foo(aA)?+(aA) fooaAb n - fooaAb
-foo(aA|bB)?+(aA|bB) foobBb n - foobBb
-foo(?:aA|bB)?+(?:aA|bB) fooaAb n - fooaAb
-foo(?:aA)++b fooaAaAaAaAaAb y $& fooaAaAaAaAaAb
-foo(aA)++b fooaAaAaAaAaAb y $& fooaAaAaAaAaAb
-foo(aA|bB)++b foobBaAbBaAbBb y $& foobBaAbBaAbBb
-foo(?:aA|bB)++b fooaAaAbBaAaAb y $& fooaAaAbBaAaAb
-foo(?:aA)*+b fooaAaAaAaAaAb y $& fooaAaAaAaAaAb
-foo(aA)*+b fooaAaAaAaAaAb y $& fooaAaAaAaAaAb
-foo(aA|bB)*+b foobBbBaAaAaAb y $& foobBbBaAaAaAb
-foo(?:aA|bB)*+b foobBaAaAbBaAb y $& foobBaAaAbBaAb
-foo(?:aA){1,5}+b fooaAaAaAaAaAb y $& fooaAaAaAaAaAb
-foo(aA){1,5}+b fooaAaAaAaAaAb y $& fooaAaAaAaAaAb
-foo(aA|bB){1,5}+b foobBaAaAaAaAb y $& foobBaAaAaAaAb
-foo(?:aA|bB){1,5}+b fooaAbBaAbBbBb y $& fooaAbBaAbBbBb
-foo(?:aA)?+b fooaAb y $& fooaAb
-foo(aA)?+b fooaAb y $& fooaAb
-foo(aA|bB)?+b foobBb y $& foobBb
-foo(?:aA|bB)?+b foobBb y $& foobBb
-
-([^()]++|\([^()]*\))+ ((abc(ade)ufh()()x y $& abc(ade)ufh()()x
-round\(([^()]++)\) _I(round(xs * sz),1) y $1 xs * sz
-
-(foo[1x]|bar[2x]|baz[3x])+y foo1bar2baz3y y $1 baz3
-(foo[1x]|bar[2x]|baz[3x])+y foo1bar2baz3y y $& foo1bar2baz3y
-(foo[1x]|bar[2x]|baz[3x])*y foo1bar2baz3y y $1 baz3
-(foo[1x]|bar[2x]|baz[3x])*y foo1bar2baz3y y $& foo1bar2baz3y
-
-([yX].|WORDS|[yX].|WORD)S WORDS y $1 WORD
-(WORDS|WORLD|WORD)S WORDS y $1 WORD
-([yX].|WORDS|WORD|[xY].)S WORDS y $1 WORD
-(foo|fool|[zx].|money|parted)$ fool y $1 fool
-([zx].|foo|fool|[zq].|money|parted|[yx].)$ fool y $1 fool
-(foo|fool|[zx].|money|parted)$ fools n - -
-([zx].|foo|fool|[qx].|money|parted|[py].)$ fools n - -
-
-([yX].|WORDS|[yX].|WORD)+S WORDS y $1 WORD
-(WORDS|WORLD|WORD)+S WORDS y $1 WORD
-([yX].|WORDS|WORD|[xY].)+S WORDS y $1 WORD
-(foo|fool|[zx].|money|parted)+$ fool y $1 fool
-([zx].|foo|fool|[zq].|money|parted|[yx].)+$ fool y $1 fool
-(foo|fool|[zx].|money|parted)+$ fools n - -
-([zx].|foo|fool|[qx].|money|parted|[py].)+$ fools n - -
-
-(x|y|z[QW])+(longish|loquatious|excessive|overblown[QW])+ xyzQzWlongishoverblownW y $1-$2 zW-overblownW
-(x|y|z[QW])*(longish|loquatious|excessive|overblown[QW])* xyzQzWlongishoverblownW y $1-$2 zW-overblownW
-(x|y|z[QW]){1,5}(longish|loquatious|excessive|overblown[QW]){1,5} xyzQzWlongishoverblownW y $1-$2 zW-overblownW
-
-(x|y|z[QW])++(longish|loquatious|excessive|overblown[QW])++ xyzQzWlongishoverblownW y $1-$2 zW-overblownW
-(x|y|z[QW])*+(longish|loquatious|excessive|overblown[QW])*+ xyzQzWlongishoverblownW y $1-$2 zW-overblownW
-(x|y|z[QW]){1,5}+(longish|loquatious|excessive|overblown[QW]){1,5}+ xyzQzWlongishoverblownW y $1-$2 zW-overblownW
-
-a*(?!) aaaab n - -
-a*(*FAIL) aaaab n - -
-a*(*F) aaaab n - -
-
-(A(A|B(*ACCEPT)|C)D)(E) AB y $1 AB
-(A(A|B(*ACCEPT)|C)D)(E) ACDE y $1$2$3 ACDCE
-
-(a)(?:(?-1)|(?+1))(b) aab y $&-$1-$2 aab-a-b
-(a)(?:(?-1)|(?+1))(b) abb y $1-$2 a-b
-(a)(?:(?-1)|(?+1))(b) acb n - -
-
-(foo)(\g-2) foofoo y $1-$2 foo-foo
-(foo)(\g-2)(foo)(\g-2) foofoofoofoo y $1-$2-$3-$4 foo-foo-foo-foo
-(([abc]+) \g-1)(([abc]+) \g{-1}) abc abccba cba y $2-$4 abc-cba
-(a)(b)(c)\g1\g2\g3 abcabc y $1$2$3 abc
-
-# \k<n> preceded by a literal
-/(?'n'foo) \k<n>/ ..foo foo.. y $1 foo
-/(?'n'foo) \k<n>/ ..foo foo.. y $+{n} foo
-/(?<n>foo) \k'n'/ ..foo foo.. y $1 foo
-/(?<n>foo) \k'n'/ ..foo foo.. y $+{n} foo
-/(?'a1'foo) \k'a1'/ ..foo foo.. y $+{a1} foo
-/(?<a1>foo) \k<a1>/ ..foo foo.. y $+{a1} foo
-/(?'_'foo) \k'_'/ ..foo foo.. y $+{_} foo
-/(?<_>foo) \k<_>/ ..foo foo.. y $+{_} foo
-/(?'_0_'foo) \k'_0_'/ ..foo foo.. y $+{_0_} foo
-/(?<_0_>foo) \k<_0_>/ ..foo foo.. y $+{_0_} foo
-/(?'0'foo) bar/ ..foo bar.. c - Sequence (?'
-/(?<0>foo) bar/ ..foo bar.. c - Sequence (?<
-/(?'12'foo) bar/ ..foo bar.. c - Sequence (?'
-/(?<12>foo) bar/ ..foo bar.. c - Sequence (?<
-/(?'1a'foo) bar/ ..foo bar.. c - Sequence (?'
-/(?<1a>foo) bar/ ..foo bar.. c - Sequence (?<
-/(?''foo) bar/ ..foo bar.. c - Sequence (?''
-/(?<>foo) bar/ ..foo bar.. c - Sequence (?<>
-/foo \k'n'/ foo foo c - Reference to nonexistent named group
-/foo \k<n>/ foo foo c - Reference to nonexistent named group
-/foo \k'a1'/ foo foo c - Reference to nonexistent named group
-/foo \k<a1>/ foo foo c - Reference to nonexistent named group
-/foo \k'_'/ foo foo c - Reference to nonexistent named group
-/foo \k<_>/ foo foo c - Reference to nonexistent named group
-/foo \k'_0_'/ foo foo c - Reference to nonexistent named group
-/foo \k<_0_>/ foo foo c - Reference to nonexistent named group
-/foo \k'0'/ foo foo c - Sequence \\k'
-/foo \k<0>/ foo foo c - Sequence \\k<
-/foo \k'12'/ foo foo c - Sequence \\k'
-/foo \k<12>/ foo foo c - Sequence \\k<
-/foo \k'1a'/ foo foo c - Sequence \\k'
-/foo \k<1a>/ foo foo c - Sequence \\k<
-/foo \k''/ foo foo c - Sequence \\k'
-/foo \k<>/ foo foo c - Sequence \\k<
-/(?<as>as) (\w+) \k<as> (\w+)/ as easy as pie y $1-$2-$3 as-easy-pie
-
-# \g{...} with a name as the argument
-/(?'n'foo) \g{n}/ ..foo foo.. y $1 foo
-/(?'n'foo) \g{n}/ ..foo foo.. y $+{n} foo
-/(?<n>foo) \g{n}/ ..foo foo.. y $1 foo
-/(?<n>foo) \g{n}/ ..foo foo.. y $+{n} foo
-/(?<as>as) (\w+) \g{as} (\w+)/ as easy as pie y $1-$2-$3 as-easy-pie
-
-# Python style named capture buffer stuff
-/(?P<n>foo)(?P=n)/ ..foofoo.. y $1 foo
-/(?P<n>foo)(?P=n)/ ..foofoo.. y $+{n} foo
-/(?:(?P<n>foo)|(?P<n>bar))(?P=n)/ ..barbar.. y $+{n} bar
-/^(?P<PAL>(?P<CHAR>.)((?P>PAL)|.?)(?P=CHAR))$/ madamimadam y $& madamimadam
-/^(?P<PAL>(?P<CHAR>.)((?P>PAL)|.?)(?P=CHAR))$/ madamiamadam n - -
-/(?P<n>foo) (?P=n)/ ..foo foo.. y $1 foo
-/(?P<n>foo) (?P=n)/ ..foo foo.. y $+{n} foo
-/(?P<as>as) (\w+) (?P=as) (\w+)/ as easy as pie y $1-$2-$3 as-easy-pie
-
-#check that non identifiers as names are treated as the appropriate lookaround
-(?<=bar>)foo bar>foo y $& foo
-(?<!bar>)foo bar>foo n - -
-(?<=bar>ABC)foo bar>ABCfoo y $& foo
-(?<!bar>ABC)foo bar>ABCfoo n - -
-(?<bar>)foo bar>ABCfoo y $& foo
-(?<bar>ABC)foo bar>ABCfoo y $& ABCfoo
-
-(?<=abcd(?<=(aaaabcd))) ..aaaabcd.. y $1 aaaabcd
-(?=xy(?<=(aaxy))) ..aaxy.. y $1 aaxy
-
-X(\w+)(?=\s)|X(\w+) Xab y [$1-$2] [-ab]
-
-#check that branch reset works ok.
-(?|(a)) a y $1-$+-$^N a-a-a
-(?|a(.)b|d(.(o).)d|i(.)(.)j)(.) d!o!da y $1-$2-$3 !o!-o-a
-(?|a(.)b|d(.(o).)d|i(.)(.)j)(.) aabc y $1-$2-$3 a--c
-(?|a(.)b|d(.(o).)d|i(.)(.)j)(.) ixyjp y $1-$2-$3 x-y-p
-(?|(?|(a)|(b))|(?|(c)|(d))) a y $1 a
-(?|(?|(a)|(b))|(?|(c)|(d))) b y $1 b
-(?|(?|(a)|(b))|(?|(c)|(d))) c y $1 c
-(?|(?|(a)|(b))|(?|(c)|(d))) d y $1 d
-(.)(?|(.)(.)x|(.)d)(.) abcde y $1-$2-$3-$4-$5- b-c--e--
-(?|(?<foo>x)) x y $+{foo} x
-(?|(?<foo>x)|(?<bar>y)) x y $+{foo} x
-(?|(?<bar>y)|(?<foo>x)) x y $+{foo} x
-(?<bar>)(?|(?<foo>x)) x y $+{foo} x
-
-#Bug #41492
-(?(DEFINE)(?<A>(?&B)+)(?<B>a))(?&A) a y $& a
-(?(DEFINE)(?<A>(?&B)+)(?<B>a))(?&A) aa y $& aa
-\x{100}?(??{""})xxx xxx y $& xxx
-
-foo(\R)bar foo\r\nbar y $1 \r\n
-foo(\R)bar foo\nbar y $1 \n
-foo(\R)bar foo\rbar y $1 \r
-
-foo(\R+)bar foo\r\n\x{85}\r\n\nbar y $1 \r\n\x{85}\r\n\n
-(\V+)(\R) foo\r\n\x{85}\r\n\nbar y $1-$2 foo-\r\n
-(\R+)(\V) foo\r\n\x{85}\r\n\nbar y $1-$2 \r\n\x{85}\r\n\n-b
-foo(\R)bar foo\x{85}bar y $1 \x{85}
-(\V)(\R) foo\x{85}bar y $1-$2 o-\x{85}
-(\R)(\V) foo\x{85}bar y $1-$2 \x{85}-b
-foo(\R)bar foo\r\nbar y $1 \r\n
-(\V)(\R) foo\r\nbar y $1-$2 o-\r\n
-(\R)(\V) foo\r\nbar y $1-$2 \r\n-b
-foo(\R)bar foo\r\nbar y $1 \r\n
-(\V)(\R) foo\r\nbar y $1-$2 o-\r\n
-(\R)(\V) foo\r\nbar y $1-$2 \r\n-b
-foo(\R)bar foo\rbar y $1 \r
-(\V)(\R) foo\rbar y $1-$2 o-\r
-(\R)(\V) foo\rbar y $1-$2 \r-b
-
-foo(\v+)bar foo\r\n\x{85}\r\n\nbar y $1 \r\n\x{85}\r\n\n
-(\V+)(\v) foo\r\n\x{85}\r\n\nbar y $1-$2 foo-\r
-(\v+)(\V) foo\r\n\x{85}\r\n\nbar y $1-$2 \r\n\x{85}\r\n\n-b
-foo(\v)bar foo\x{85}bar y $1 \x{85}
-(\V)(\v) foo\x{85}bar y $1-$2 o-\x{85}
-(\v)(\V) foo\x{85}bar y $1-$2 \x{85}-b
-foo(\v)bar foo\rbar y $1 \r
-(\V)(\v) foo\rbar y $1-$2 o-\r
-(\v)(\V) foo\rbar y $1-$2 \r-b
-
-
-foo(\h+)bar foo\t\x{A0}bar y $1 \t\x{A0}
-(\H+)(\h) foo\t\x{A0}bar y $1-$2 foo-\t
-(\h+)(\H) foo\t\x{A0}bar y $1-$2 \t\x{A0}-b
-foo(\h)bar foo\x{A0}bar y $1 \x{A0}
-(\H)(\h) foo\x{A0}bar y $1-$2 o-\x{A0}
-(\h)(\H) foo\x{A0}bar y $1-$2 \x{A0}-b
-foo(\h)bar foo\tbar y $1 \t
-(\H)(\h) foo\tbar y $1-$2 o-\t
-(\h)(\H) foo\tbar y $1-$2 \t-b
-
-.*\z foo\n y - -
-^(?:(\d)x)?\d$ 1 y ${\(defined($1)?1:0)} 0
-.*?(?:(\w)|(\w))x abx y $1-$2 b-
-
-0{50} 000000000000000000000000000000000000000000000000000 y - -
-^a?(?=b)b ab y $& ab # Bug #56690
-^a*(?=b)b ab y $& ab # Bug #56690
-/>\d+$ \n/ix >10\n y $& >10
-/>\d+$ \n/ix >1\n y $& >1
-/\d+$ \n/ix >10\n y $& 10
-/>\d\d$ \n/ix >10\n y $& >10
-/>\d+$ \n/x >10\n y $& >10
-
-# Two regressions in 5.8.x (only) introduced by change 30638
-# Simplification of the test failure in XML::LibXML::Simple:
-/^\s*i.*?o\s*$/s io\n io y - -
-# As reported in #59168 by Father Chrysostomos:
-/(.*?)a(?!(a+)b\2c)/ baaabaac y $&-$1 baa-ba
-# [perl #60344] Regex lookbehind failure after an (if)then|else in perl 5.10
-/\A(?(?=db2)db2|\D+)(?<!processed)\.csv\z/xms sql_processed.csv n - -
-/\N{U+0100}/ \x{100} y $& \x{100} # Bug #59328
-[\s][\S] \x{a0}\x{a0} nT - - # TODO Unicode complements should not match same character
-
-# was generating malformed utf8
-'[\x{100}\xff]'i \x{ff} y $& \x{ff}
-
-((??{ "(?:|)" }))\s C\x20 y - -
Deleted: vendor/perl/dist/t/op/reg_email.t
===================================================================
--- vendor/perl/dist/t/op/reg_email.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/reg_email.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,103 +0,0 @@
-#!./perl
-#
-# Tests to make sure the regexp engine doesn't run into limits too soon.
-#
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-print "1..13\n";
-
-my $email = qr {
- (?(DEFINE)
- (?<address> (?&mailbox) | (?&group))
- (?<mailbox> (?&name_addr) | (?&addr_spec))
- (?<name_addr> (?&display_name)? (?&angle_addr))
- (?<angle_addr> (?&CFWS)? < (?&addr_spec) > (?&CFWS)?)
- (?<group> (?&display_name) : (?:(?&mailbox_list) | (?&CFWS))? ;
- (?&CFWS)?)
- (?<display_name> (?&phrase))
- (?<mailbox_list> (?&mailbox) (?: , (?&mailbox))*)
-
- (?<addr_spec> (?&local_part) \@ (?&domain))
- (?<local_part> (?&dot_atom) | (?"ed_string))
- (?<domain> (?&dot_atom) | (?&domain_literal))
- (?<domain_literal> (?&CFWS)? \[ (?: (?&FWS)? (?&dcontent))* (?&FWS)?
- \] (?&CFWS)?)
- (?<dcontent> (?&dtext) | (?"ed_pair))
- (?<dtext> (?&NO_WS_CTL) | [\x21-\x5a\x5e-\x7e])
-
- (?<atext> (?&ALPHA) | (?&DIGIT) | [!#\$%&'*+-/=?^_`{|}~])
- (?<atom> (?&CFWS)? (?&atext)+ (?&CFWS)?)
- (?<dot_atom> (?&CFWS)? (?&dot_atom_text) (?&CFWS)?)
- (?<dot_atom_text> (?&atext)+ (?: \. (?&atext)+)*)
-
- (?<text> [\x01-\x09\x0b\x0c\x0e-\x7f])
- (?<quoted_pair> \\ (?&text))
-
- (?<qtext> (?&NO_WS_CTL) | [\x21\x23-\x5b\x5d-\x7e])
- (?<qcontent> (?&qtext) | (?"ed_pair))
- (?<quoted_string> (?&CFWS)? (?&DQUOTE) (?:(?&FWS)? (?&qcontent))*
- (?&FWS)? (?&DQUOTE) (?&CFWS)?)
-
- (?<word> (?&atom) | (?"ed_string))
- (?<phrase> (?&word)+)
-
- # Folding white space
- (?<FWS> (?: (?&WSP)* (?&CRLF))? (?&WSP)+)
- (?<ctext> (?&NO_WS_CTL) | [\x21-\x27\x2a-\x5b\x5d-\x7e])
- (?<ccontent> (?&ctext) | (?"ed_pair) | (?&comment))
- (?<comment> \( (?: (?&FWS)? (?&ccontent))* (?&FWS)? \) )
- (?<CFWS> (?: (?&FWS)? (?&comment))*
- (?: (?:(?&FWS)? (?&comment)) | (?&FWS)))
-
- # No whitespace control
- (?<NO_WS_CTL> [\x01-\x08\x0b\x0c\x0e-\x1f\x7f])
-
- (?<ALPHA> [A-Za-z])
- (?<DIGIT> [0-9])
- (?<CRLF> \x0d \x0a)
- (?<DQUOTE> ")
- (?<WSP> [\x20\x09])
- )
-
- (?&address)
-}x;
-
-
-run_tests() unless caller;
-
-sub run_tests {
- my $count = 0;
-
- $| = 1;
- # rewinding DATA is necessary with PERLIO=stdio when this
- # test is run from another thread
- seek *DATA, 0, 0;
- while (<DATA>) { last if /^__DATA__/ }
- while (<DATA>) {
- chomp;
- next if /^#/;
- print /^$email$/ ? "ok " : "not ok ", ++ $count, "\n";
- }
-}
-
-#
-# Acme::MetaSyntactic ++
-#
-__DATA__
-Jeff_Tracy at thunderbirds.org
-"Lady Penelope"@thunderbirds.org
-"The\ Hood"@thunderbirds.org
-fred @ flintstones.net
-barney (rubble) @ flintstones.org
-bammbamm (bam! bam! (bam! bam! (bam!)) bam!) @ flintstones.org
-Michelangelo@[127.0.0.1]
-Donatello @ [127.0.0.1]
-Raphael (He as well) @ [127.0.0.1]
-"Leonardo" @ [127.0.0.1]
-Barbapapa <barbapapa @ barbapapa.net>
-"Barba Mama" <barbamama @ [127.0.0.1]>
-Barbalala (lalalalalalalala) <barbalala (Yes, her!) @ (barba) barbapapa.net>
Deleted: vendor/perl/dist/t/op/reg_email_thr.t
===================================================================
--- vendor/perl/dist/t/op/reg_email_thr.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/reg_email_thr.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-chdir 't' if -d 't';
- at INC = ('../lib', '.');
-
-require 'thread_it.pl';
-thread_it(qw(op reg_email.t));
Deleted: vendor/perl/dist/t/op/reg_fold.t
===================================================================
--- vendor/perl/dist/t/op/reg_fold.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/reg_fold.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,42 +0,0 @@
-#!perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-use strict;
-use warnings;
-use Test::More;
-my $count=1;
-my @tests;
-
-my $file="../lib/unicore/CaseFolding.txt";
-open my $fh,"<",$file or die "Failed to read '$file': $!";
-while (<$fh>) {
- chomp;
- my ($line,$comment)= split/\s+#\s+/, $_;
- my ($cp,$type, at fc)=split/[\s;]+/,$line||'';
- next unless $type and ($type eq 'F' or $type eq 'C');
- $_="\\x{$_}" for @fc;
- my $cpv=hex("0x$cp");
- my $chr="chr(0x$cp)";
- my @str;
- push @str,$chr if $cpv<128 or $cpv>256;
- if ($cpv<256) {
- push @str,"do{my \$c=$chr; utf8::upgrade(\$c); \$c}"
- }
-
- foreach my $str ( @str ) {
- my $expr="$str=~/@fc/ix";
- my $t=($cpv > 256 || $str=~/^do/) ? "unicode" : "latin";
- push @tests,
- qq[ok($expr,'$chr=~/@fc/ix - $comment ($t string)')];
- $tests[-1]="TODO: { local \$TODO='[13:41] <BinGOs> cue *It is all Greek to me* joke.';\n$tests[-1] }"
- if $cp eq '0390' or $cp eq '03B0';
- $count++;
- }
-}
-eval join ";\n","plan tests=>".($count-1), at tests,"1"
- or die $@;
-__DATA__
Deleted: vendor/perl/dist/t/op/reg_mesg.t
===================================================================
--- vendor/perl/dist/t/op/reg_mesg.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/reg_mesg.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,194 +0,0 @@
-#!./perl -w
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-my $debug = 1;
-
-##
-## If the markers used are changed (search for "MARKER1" in regcomp.c),
-## update only these two variables, and leave the {#} in the @death/@warning
-## arrays below. The {#} is a meta-marker -- it marks where the marker should
-## go.
-
-my $marker1 = "<-- HERE";
-my $marker2 = " <-- HERE ";
-
-##
-## Key-value pairs of code/error of code that should have fatal errors.
-##
-
-eval 'use Config'; # assume defaults if fail
-our %Config;
-my $inf_m1 = ($Config{reg_infty} || 32767) - 1;
-my $inf_p1 = $inf_m1 + 2;
-my @death =
-(
- '/[[=foo=]]/' => 'POSIX syntax [= =] is reserved for future extensions in regex; marked by {#} in m/[[=foo=]{#}]/',
-
- '/(?<= .*)/' => 'Variable length lookbehind not implemented in regex m/(?<= .*)/',
-
- '/(?<= x{1000})/' => 'Lookbehind longer than 255 not implemented in regex m/(?<= x{1000})/',
-
- '/(?@)/' => 'Sequence (?@...) not implemented in regex; marked by {#} in m/(?@{#})/',
-
- '/(?{ 1/' => 'Sequence (?{...}) not terminated or not {}-balanced in regex; marked by {#} in m/(?{{#} 1/',
-
- '/(?(1x))/' => 'Switch condition not recognized in regex; marked by {#} in m/(?(1x{#}))/',
-
- '/(?(1)x|y|z)/' => 'Switch (?(condition)... contains too many branches in regex; marked by {#} in m/(?(1)x|y|{#}z)/',
-
- '/(?(x)y|x)/' => 'Unknown switch condition (?(x) in regex; marked by {#} in m/(?({#}x)y|x)/',
-
- '/(?/' => 'Sequence (? incomplete in regex; marked by {#} in m/(?{#}/',
-
- '/(?;x/' => 'Sequence (?;...) not recognized in regex; marked by {#} in m/(?;{#}x/',
- '/(?<;x/' => 'Sequence (?<;...) not recognized in regex; marked by {#} in m/(?<;{#}x/',
-
- '/(?\ix/' => 'Sequence (?\...) not recognized in regex; marked by {#} in m/(?\{#}ix/',
- '/(?\mx/' => 'Sequence (?\...) not recognized in regex; marked by {#} in m/(?\{#}mx/',
- '/(?\:x/' => 'Sequence (?\...) not recognized in regex; marked by {#} in m/(?\{#}:x/',
- '/(?\=x/' => 'Sequence (?\...) not recognized in regex; marked by {#} in m/(?\{#}=x/',
- '/(?\!x/' => 'Sequence (?\...) not recognized in regex; marked by {#} in m/(?\{#}!x/',
- '/(?\<=x/' => 'Sequence (?\...) not recognized in regex; marked by {#} in m/(?\{#}<=x/',
- '/(?\<!x/' => 'Sequence (?\...) not recognized in regex; marked by {#} in m/(?\{#}<!x/',
- '/(?\>x/' => 'Sequence (?\...) not recognized in regex; marked by {#} in m/(?\{#}>x/',
-
- '/((x)/' => 'Unmatched ( in regex; marked by {#} in m/({#}(x)/',
-
- "/x{$inf_p1}/" => "Quantifier in {,} bigger than $inf_m1 in regex; marked by {#} in m/x{{#}$inf_p1}/",
-
- '/x{3,1}/' => 'Can\'t do {n,m} with n > m in regex; marked by {#} in m/x{3,1}{#}/',
-
- '/x**/' => 'Nested quantifiers in regex; marked by {#} in m/x**{#}/',
-
- '/x[/' => 'Unmatched [ in regex; marked by {#} in m/x[{#}/',
-
- '/*/', => 'Quantifier follows nothing in regex; marked by {#} in m/*{#}/',
-
- '/\p{x/' => 'Missing right brace on \p{} in regex; marked by {#} in m/\p{{#}x/',
-
- '/[\p{x]/' => 'Missing right brace on \p{} in regex; marked by {#} in m/[\p{{#}x]/',
-
- '/(x)\2/' => 'Reference to nonexistent group in regex; marked by {#} in m/(x)\2{#}/',
-
- 'my $m = "\\\"; $m =~ $m', => 'Trailing \ in regex m/\/',
-
- '/\x{1/' => 'Missing right brace on \x{} in regex; marked by {#} in m/\x{{#}1/',
-
- '/[\x{X]/' => 'Missing right brace on \x{} in regex; marked by {#} in m/[\x{{#}X]/',
-
- '/[[:barf:]]/' => 'POSIX class [:barf:] unknown in regex; marked by {#} in m/[[:barf:]{#}]/',
-
- '/[[=barf=]]/' => 'POSIX syntax [= =] is reserved for future extensions in regex; marked by {#} in m/[[=barf=]{#}]/',
-
- '/[[.barf.]]/' => 'POSIX syntax [. .] is reserved for future extensions in regex; marked by {#} in m/[[.barf.]{#}]/',
-
- '/[z-a]/' => 'Invalid [] range "z-a" in regex; marked by {#} in m/[z-a{#}]/',
-
- '/\p/' => 'Empty \p{} in regex; marked by {#} in m/\p{#}/',
-
- '/\P{}/' => 'Empty \P{} in regex; marked by {#} in m/\P{{#}}/',
-);
-
-##
-## Key-value pairs of code/error of code that should have non-fatal warnings.
-##
- at warning = (
- 'm/\b*/' => '\b* matches null string many times in regex; marked by {#} in m/\b*{#}/',
-
- 'm/[:blank:]/' => 'POSIX syntax [: :] belongs inside character classes in regex; marked by {#} in m/[:blank:]{#}/',
-
- "m'[\\y]'" => 'Unrecognized escape \y in character class passed through in regex; marked by {#} in m/[\y{#}]/',
-
- 'm/[a-\d]/' => 'False [] range "a-\d" in regex; marked by {#} in m/[a-\d{#}]/',
- 'm/[\w-x]/' => 'False [] range "\w-" in regex; marked by {#} in m/[\w-{#}x]/',
- 'm/[a-\pM]/' => 'False [] range "a-\pM" in regex; marked by {#} in m/[a-\pM{#}]/',
- 'm/[\pM-x]/' => 'False [] range "\pM-" in regex; marked by {#} in m/[\pM-{#}x]/',
- "m'\\y'" => 'Unrecognized escape \y passed through in regex; marked by {#} in m/\y{#}/',
-);
-
-my $total = (@death + @warning)/2;
-
-# utf8 is a noop on EBCDIC platforms, it is not fatal
-my $Is_EBCDIC = (ord('A') == 193);
-if ($Is_EBCDIC) {
- my @utf8_death = grep(/utf8/, @death);
- $total = $total - @utf8_death;
-}
-
-print "1..$total\n";
-
-my $count = 0;
-
-while (@death)
-{
- my $regex = shift @death;
- my $result = shift @death;
- # skip the utf8 test on EBCDIC since they do not die
- next if ($Is_EBCDIC && $regex =~ /utf8/);
- $count++;
-
- $_ = "x";
- eval $regex;
- if (not $@) {
- print "# oops, $regex didn't die\nnot ok $count\n";
- next;
- }
- chomp $@;
- $result =~ s/{\#}/$marker1/;
- $result =~ s/{\#}/$marker2/;
- $result .= " at ";
- if ($@ !~ /^\Q$result/) {
- print "# For $regex, expected:\n# $result\n# Got:\n# $@\n#\nnot ";
- }
- print "ok $count - $regex\n";
-}
-
-
-our $warning;
-$SIG{__WARN__} = sub { $warning = shift };
-
-while (@warning)
-{
- $count++;
- my $regex = shift @warning;
- my $result = shift @warning;
-
- undef $warning;
- $_ = "x";
- eval $regex;
-
- if ($@)
- {
- print "# oops, $regex died with:\n#\t$@#\nnot ok $count\n";
- next;
- }
-
- if (not $warning)
- {
- print "# oops, $regex didn't generate a warning\nnot ok $count\n";
- next;
- }
- $result =~ s/{\#}/$marker1/;
- $result =~ s/{\#}/$marker2/;
- $result .= " at ";
- if ($warning !~ /^\Q$result/)
- {
- print <<"EOM";
-# For $regex, expected:
-# $result
-# Got:
-# $warning
-#
-not ok $count
-EOM
- next;
- }
- print "ok $count - $regex\n";
-}
-
-
-
Deleted: vendor/perl/dist/t/op/reg_namedcapture.t
===================================================================
--- vendor/perl/dist/t/op/reg_namedcapture.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/reg_namedcapture.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,26 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- unless ( -r "$INC[0]/Errno.pm") {
- print "1..0 # Skip: Errno.pm not yet available\n";
- exit 0;
- }
-}
-
-# WARNING: Do not directly use any modules as part of this test code.
-# We could get action at a distance that would invalidate the tests.
-
-print "1..2\n";
-
-# This tests whether glob assignment fails to load the tie.
-*X = *-;
-'X'=~/(?<X>X)/;
-print eval '*X{HASH}{X} || 1' ? "" :"not ","ok ",++$test,"\n";
-
-# And since it's a similar case we check %! as well. Note that
-# this can't be done until ../lib/Errno.pm is in place, as the
-# glob hits $!, which needs that module.
-*Y = *!;
-print 0<keys(%Y) ? "" :"not ","ok ",++$test,"\n";
Deleted: vendor/perl/dist/t/op/reg_nc_tie.t
===================================================================
--- vendor/perl/dist/t/op/reg_nc_tie.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/reg_nc_tie.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,53 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require './test.pl';
-}
-
-# Do a basic test on all the tied methods of Tie::Hash::NamedCapture
-
-print "1..13\n";
-
-# PL_curpm->paren_names can be a null pointer. See that this succeeds anyway.
-'x' =~ /(.)/;
-() = %+;
-pass( 'still alive' );
-
-"hlagh" =~ /
- (?<a>.)
- (?<b>.)
- (?<a>.)
- .*
- (?<e>$)
-/x;
-
-# FETCH
-is($+{a}, "h", "FETCH");
-is($+{b}, "l", "FETCH");
-is($-{a}[0], "h", "FETCH");
-is($-{a}[1], "a", "FETCH");
-
-# STORE
-eval { $+{a} = "yon" };
-ok(index($@, "read-only") != -1, "STORE");
-
-# DELETE
-eval { delete $+{a} };
-ok(index($@, "read-only") != -1, "DELETE");
-
-# CLEAR
-eval { %+ = () };
-ok(index($@, "read-only") != -1, "CLEAR");
-
-# EXISTS
-ok(exists $+{e}, "EXISTS");
-ok(!exists $+{d}, "EXISTS");
-
-# FIRSTKEY/NEXTKEY
-is(join('|', sort keys %+), "a|b|e", "FIRSTKEY/NEXTKEY");
-
-# SCALAR
-is(scalar(%+), 3, "SCALAR");
-is(scalar(%-), 3, "SCALAR");
Deleted: vendor/perl/dist/t/op/reg_pmod.t
===================================================================
--- vendor/perl/dist/t/op/reg_pmod.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/reg_pmod.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,49 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require './test.pl';
-}
-
-use strict;
-use warnings;
-
-our @tests = (
- # /p Pattern PRE MATCH POST
- [ '/p', "456", "123-", "456", "-789"],
- [ '(?p)', "456", "123-", "456", "-789"],
- [ '', "(456)", "123-", "456", "-789"],
- [ '', "456", undef, undef, undef ],
-);
-
-plan tests => 4 * @tests + 2;
-my $W = "";
-
-$SIG{__WARN__} = sub { $W.=join("", at _); };
-sub _u($$) { "$_[0] is ".(defined $_[1] ? "'$_[1]'" : "undef") }
-
-$_ = '123-456-789';
-foreach my $test (@tests) {
- my ($p, $pat,$l,$m,$r) = @$test;
- my $test_name = $p eq '/p' ? "/$pat/p"
- : $p eq '(?p)' ? "/(?p)$pat/"
- : "/$pat/";
-
- #
- # Cannot use if/else due to the scope invalidating ${^MATCH} and friends.
- #
- my $ok = ok $p eq '/p' ? /$pat/p
- : $p eq '(?p)' ? /(?p)$pat/
- : /$pat/
- => $test_name;
- SKIP: {
- skip "/$pat/$p failed to match", 3
- unless $ok;
- is(${^PREMATCH}, $l,_u "$test_name: ^PREMATCH",$l);
- is(${^MATCH}, $m,_u "$test_name: ^MATCH",$m );
- is(${^POSTMATCH}, $r,_u "$test_name: ^POSTMATCH",$r );
- }
-}
-is($W,"","No warnings should be produced");
-ok(!defined ${^MATCH}, "No /p in scope so ^MATCH is undef");
Deleted: vendor/perl/dist/t/op/reg_posixcc.t
===================================================================
--- vendor/perl/dist/t/op/reg_posixcc.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/reg_posixcc.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,158 +0,0 @@
-#!perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-use strict;
-use warnings;
-use Test::More 'no_plan'; # otherwise it would 38401 tests, which is, uh, a lot. :-)
-my @pats=(
- "\\w",
- "\\W",
- "\\s",
- "\\S",
- "\\d",
- "\\D",
- "[:alnum:]",
- "[:^alnum:]",
- "[:alpha:]",
- "[:^alpha:]",
- "[:ascii:]",
- "[:^ascii:]",
- "[:cntrl:]",
- "[:^cntrl:]",
- "[:graph:]",
- "[:^graph:]",
- "[:lower:]",
- "[:^lower:]",
- "[:print:]",
- "[:^print:]",
- "[:punct:]",
- "[:^punct:]",
- "[:upper:]",
- "[:^upper:]",
- "[:xdigit:]",
- "[:^xdigit:]",
- "[:space:]",
- "[:^space:]",
- "[:blank:]",
- "[:^blank:]" );
-if (not $ENV{REAL_POSIX_CC}) {
- $TODO = "Only works under PERL_LEGACY_UNICODE_CHARCLASS_MAPPINGS = 0";
-}
-
-sub rangify {
- my $ary= shift;
- my $fmt= shift || '%d';
- my $sep= shift || ' ';
- my $rng= shift || '..';
-
-
- my $first= $ary->[0];
- my $last= $ary->[0];
- my $ret= sprintf $fmt, $first;
- for my $idx (1..$#$ary) {
- if ( $ary->[$idx] != $last + 1) {
- if ($last!=$first) {
- $ret.=sprintf "%s$fmt",$rng, $last;
- }
- $first= $last= $ary->[$idx];
- $ret.=sprintf "%s$fmt",$sep,$first;
- } else {
- $last= $ary->[$idx];
- }
- }
- if ( $last != $first) {
- $ret.=sprintf "%s$fmt",$rng, $last;
- }
- return $ret;
-}
-
-my $description = "";
-while (@pats) {
- my ($yes,$no)= splice @pats,0,2;
-
- my %err_by_type;
- my %singles;
- my %complements;
- foreach my $b (0..255) {
- my %got;
- for my $type ('unicode','not-unicode') {
- my $str=chr($b).chr($b);
- if ($type eq 'unicode') {
- $str.=chr(256);
- chop $str;
- }
- if ($str=~/[$yes][$no]/){
- TODO: {
- unlike($str,qr/[$yes][$no]/,
- "chr($b)=~/[$yes][$no]/ should not match under $type");
- }
- push @{$err_by_type{$type}},$b;
- }
- $got{"[$yes]"}{$type} = $str=~/[$yes]/ ? 1 : 0;
- $got{"[$no]"}{$type} = $str=~/[$no]/ ? 1 : 0;
- $got{"[^$yes]"}{$type} = $str=~/[^$yes]/ ? 1 : 0;
- $got{"[^$no]"}{$type} = $str=~/[^$no]/ ? 1 : 0;
- }
- foreach my $which ("[$yes]","[$no]","[^$yes]","[^$no]") {
- if ($got{$which}{'unicode'} != $got{$which}{'not-unicode'}){
- TODO: {
- is($got{$which}{'unicode'},$got{$which}{'not-unicode'},
- "chr($b)=~/$which/ should have the same results regardless of internal string encoding");
- }
- push @{$singles{$which}},$b;
- }
- }
- foreach my $which ($yes,$no) {
- foreach my $strtype ('unicode','not-unicode') {
- if ($got{"[$which]"}{$strtype} == $got{"[^$which]"}{$strtype}) {
- TODO: {
- isnt($got{"[$which]"}{$strtype},$got{"[^$which]"}{$strtype},
- "chr($b)=~/[$which]/ should not have the same result as chr($b)=~/[^$which]/");
- }
- push @{$complements{$which}{$strtype}},$b;
- }
- }
- }
- }
-
-
- if (%err_by_type || %singles || %complements) {
- $description||=" Error:\n";
- $description .= "/[$yes][$no]/\n";
- if (%err_by_type) {
- foreach my $type (sort keys %err_by_type) {
- $description .= "\tmatches $type codepoints:\t";
- $description .= rangify($err_by_type{$type});
- $description .= "\n";
- }
- $description .= "\n";
- }
- if (%singles) {
- $description .= "Unicode/Nonunicode mismatches:\n";
- foreach my $type (sort keys %singles) {
- $description .= "\t$type:\t";
- $description .= rangify($singles{$type});
- $description .= "\n";
- }
- $description .= "\n";
- }
- if (%complements) {
- foreach my $class (sort keys %complements) {
- foreach my $strtype (sort keys %{$complements{$class}}) {
- $description .= "\t$class has complement failures under $strtype for:\t";
- $description .= rangify($complements{$class}{$strtype});
- $description .= "\n";
- }
- }
- }
- }
-}
-TODO: {
- is( $description, "", "POSIX and perl charclasses should not depend on string type");
-}
-
-__DATA__
Deleted: vendor/perl/dist/t/op/reg_unsafe.t
===================================================================
--- vendor/perl/dist/t/op/reg_unsafe.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/reg_unsafe.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,19 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-
-}
-print "1..1\n";
-
-# there is an equivelent test in t/op/pat.t which does NOT fail
-# its not clear why it doesnt fail, so this todo gets its own test
-# file until we can work it out.
-
-my $x;
-($x='abc')=~/(abc)/g;
-$x='123';
-
-print "not " if $1 ne 'abc';
-print "ok 1 # TODO safe match vars make /g slow\n";
Deleted: vendor/perl/dist/t/op/regexp.t
===================================================================
--- vendor/perl/dist/t/op/regexp.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/regexp.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,207 +0,0 @@
-#!./perl
-
-# The tests are in a separate file 't/op/re_tests'.
-# Each line in that file is a separate test.
-# There are five columns, separated by tabs.
-#
-# Column 1 contains the pattern, optionally enclosed in C<''>.
-# Modifiers can be put after the closing C<'>.
-#
-# Column 2 contains the string to be matched.
-#
-# Column 3 contains the expected result:
-# y expect a match
-# n expect no match
-# c expect an error
-# T the test is a TODO (can be combined with y/n/c)
-# B test exposes a known bug in Perl, should be skipped
-# b test exposes a known bug in Perl, should be skipped if noamp
-# t test exposes a bug with threading, TODO if qr_embed_thr
-#
-# Columns 4 and 5 are used only if column 3 contains C<y> or C<c>.
-#
-# Column 4 contains a string, usually C<$&>.
-#
-# Column 5 contains the expected result of double-quote
-# interpolating that string after the match, or start of error message.
-#
-# Column 6, if present, contains a reason why the test is skipped.
-# This is printed with "skipped", for harness to pick up.
-#
-# \n in the tests are interpolated, as are variables of the form ${\w+}.
-#
-# Blanks lines are treated as PASSING tests to keep the line numbers
-# linked to the test number.
-#
-# If you want to add a regular expression test that can't be expressed
-# in this format, don't add it here: put it in op/pat.t instead.
-#
-# Note that columns 2,3 and 5 are all enclosed in double quotes and then
-# evalled; so something like a\"\x{100}$1 has length 3+length($1).
-
-my $file;
-BEGIN {
- $iters = shift || 1; # Poor man performance suite, 10000 is OK.
-
- # Do this open before any chdir
- $file = shift;
- if (defined $file) {
- open TESTS, $file or die "Can't open $file";
- }
-
- chdir 't' if -d 't';
- @INC = '../lib';
-
- if ($qr_embed_thr) {
- require Config;
- if (!$Config::Config{useithreads}) {
- print "1..0 # Skip: no ithreads\n";
- exit 0;
- }
- if ($ENV{PERL_CORE_MINITEST}) {
- print "1..0 # Skip: no dynamic loading on miniperl, no threads\n";
- exit 0;
- }
- require threads;
- }
-}
-
-use strict;
-use warnings FATAL=>"all";
-use vars qw($iters $numtests $bang $ffff $nulnul $OP);
-use vars qw($qr $skip_amp $qr_embed $qr_embed_thr); # set by our callers
-
-
-if (!defined $file) {
- open(TESTS,'op/re_tests') || open(TESTS,'t/op/re_tests')
- || open(TESTS,':op:re_tests') || die "Can't open re_tests";
-}
-
-my @tests = <TESTS>;
-
-close TESTS;
-
-$bang = sprintf "\\%03o", ord "!"; # \41 would not be portable.
-$ffff = chr(0xff) x 2;
-$nulnul = "\0" x 2;
-$OP = $qr ? 'qr' : 'm';
-
-$| = 1;
-printf "1..%d\n# $iters iterations\n", scalar @tests;
-
-my $test;
-TEST:
-foreach (@tests) {
- $test++;
- if (!/\S/ || /^\s*#/ || /^__END__$/) {
- print "ok $test # (Blank line or comment)\n";
- if (/#/) { print $_ };
- next;
- }
- chomp;
- s/\\n/\n/g;
- my ($pat, $subject, $result, $repl, $expect, $reason) = split(/\t/,$_,6);
- $reason = '' unless defined $reason;
- my $input = join(':',$pat,$subject,$result,$repl,$expect);
- # the double '' below keeps simple syntax highlighters from going crazy
- $pat = "'$pat'" unless $pat =~ /^[:''\/]/;
- $pat =~ s/(\$\{\w+\})/$1/eeg;
- $pat =~ s/\\n/\n/g;
- $subject = eval qq("$subject"); die $@ if $@;
- $expect = eval qq("$expect"); die $@ if $@;
- $expect = $repl = '-' if $skip_amp and $input =~ /\$[&\`\']/;
- my $todo_qr = $qr_embed_thr && ($result =~ s/t//);
- my $skip = ($skip_amp ? ($result =~ s/B//i) : ($result =~ s/B//));
- $reason = 'skipping $&' if $reason eq '' && $skip_amp;
- $result =~ s/B//i unless $skip;
- my $todo= $result =~ s/T// ? " # TODO" : "";
-
-
- for my $study ('', 'study $subject', 'utf8::upgrade($subject)',
- 'utf8::upgrade($subject); study $subject') {
- # Need to make a copy, else the utf8::upgrade of an alreay studied
- # scalar confuses things.
- my $subject = $subject;
- my $c = $iters;
- my ($code, $match, $got);
- if ($repl eq 'pos') {
- $code= <<EOFCODE;
- $study;
- pos(\$subject)=0;
- \$match = ( \$subject =~ m${pat}g );
- \$got = pos(\$subject);
-EOFCODE
- }
- elsif ($qr_embed) {
- $code= <<EOFCODE;
- my \$RE = qr$pat;
- $study;
- \$match = (\$subject =~ /(?:)\$RE(?:)/) while \$c--;
- \$got = "$repl";
-EOFCODE
- }
- elsif ($qr_embed_thr) {
- $code= <<EOFCODE;
- # Can't run the match in a subthread, but can do this and
- # clone the pattern the other way.
- my \$RE = threads->new(sub {qr$pat})->join();
- $study;
- \$match = (\$subject =~ /(?:)\$RE(?:)/) while \$c--;
- \$got = "$repl";
-EOFCODE
- }
- else {
- $code= <<EOFCODE;
- $study;
- \$match = (\$subject =~ $OP$pat) while \$c--;
- \$got = "$repl";
-EOFCODE
- }
- #$code.=qq[\n\$expect="$expect";\n];
- #use Devel::Peek;
- #die Dump($code) if $pat=~/\\h/ and $subject=~/\x{A0}/;
- {
- # Probably we should annotate specific tests with which warnings
- # categories they're known to trigger, and hence should be
- # disabled just for that test
- no warnings qw(uninitialized regexp);
- eval $code;
- }
- chomp( my $err = $@ );
- if ($result eq 'c') {
- if ($err !~ m!^\Q$expect!) { print "not ok $test$todo (compile) $input => `$err'\n"; next TEST }
- last; # no need to study a syntax error
- }
- elsif ( $skip ) {
- print "ok $test # skipped", length($reason) ? " $reason" : '', "\n";
- next TEST;
- }
- elsif ( $todo_qr ) {
- print "not ok $test # TODO", length($reason) ? " - $reason" : '', "\n";
- next TEST;
- }
- elsif ($@) {
- print "not ok $test$todo $input => error `$err'\n$code\n$@\n"; next TEST;
- }
- elsif ($result =~ /^n/) {
- if ($match) { print "not ok $test$todo ($study) $input => false positive\n"; next TEST }
- }
- else {
- if (!$match || $got ne $expect) {
- eval { require Data::Dumper };
- if ($@) {
- print "not ok $test$todo ($study) $input => `$got', match=$match\n$code\n";
- }
- else { # better diagnostics
- my $s = Data::Dumper->new([$subject],['subject'])->Useqq(1)->Dump;
- my $g = Data::Dumper->new([$got],['got'])->Useqq(1)->Dump;
- print "not ok $test$todo ($study) $input => `$got', match=$match\n$s\n$g\n$code\n";
- }
- next TEST;
- }
- }
- }
- print "ok $test$todo\n";
-}
-
-1;
Deleted: vendor/perl/dist/t/op/regexp_noamp.t
===================================================================
--- vendor/perl/dist/t/op/regexp_noamp.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/regexp_noamp.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,10 +0,0 @@
-#!./perl
-
-$skip_amp = 1;
-for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
- if (-r $file) {
- do $file or die $@;
- exit;
- }
-}
-die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
Deleted: vendor/perl/dist/t/op/regexp_notrie.t
===================================================================
--- vendor/perl/dist/t/op/regexp_notrie.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/regexp_notrie.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,15 +0,0 @@
-#!./perl
-#use re 'debug';
-BEGIN {
- ${^RE_TRIE_MAXBUF}=-1;
- #${^RE_DEBUG_FLAGS}=0;
-}
-
-$qr = 1;
-for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
- if (-r $file) {
- do $file or die $@;
- exit;
- }
-}
-die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
Deleted: vendor/perl/dist/t/op/regexp_qr.t
===================================================================
--- vendor/perl/dist/t/op/regexp_qr.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/regexp_qr.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,10 +0,0 @@
-#!./perl
-
-$qr = 1;
-for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
- if (-r $file) {
- do $file or die $@;
- exit;
- }
-}
-die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
Deleted: vendor/perl/dist/t/op/regexp_qr_embed.t
===================================================================
--- vendor/perl/dist/t/op/regexp_qr_embed.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/regexp_qr_embed.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,11 +0,0 @@
-#!./perl
-
-$qr = 1;
-$qr_embed = 1;
-for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
- if (-r $file) {
- do $file or die $@;
- exit;
- }
-}
-die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
Deleted: vendor/perl/dist/t/op/regexp_qr_embed_thr.t
===================================================================
--- vendor/perl/dist/t/op/regexp_qr_embed_thr.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/regexp_qr_embed_thr.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,11 +0,0 @@
-#!./perl
-
-$qr = 1;
-$qr_embed_thr = 1;
-for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
- if (-r $file) {
- do $file or die $@;
- exit;
- }
-}
-die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
Deleted: vendor/perl/dist/t/op/regexp_trielist.t
===================================================================
--- vendor/perl/dist/t/op/regexp_trielist.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/regexp_trielist.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,15 +0,0 @@
-#!./perl
-#use re 'debug';
-BEGIN {
- ${^RE_TRIE_MAXBUFF}=0;
- #${^RE_DEBUG_FLAGS}=0;
- }
-
-$qr = 1;
-for $file ('./op/regexp.t', './t/op/regexp.t', ':op:regexp.t') {
- if (-r $file) {
- do $file or die $@;
- exit;
- }
-}
-die "Cannot find ./op/regexp.t or ./t/op/regexp.t\n";
Deleted: vendor/perl/dist/t/op/regexp_unicode_prop.t
===================================================================
--- vendor/perl/dist/t/op/regexp_unicode_prop.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/regexp_unicode_prop.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,303 +0,0 @@
-#!./perl
-#
-# Tests that have to do with checking whether characters have (or not have)
-# certain Unicode properties; belong (or not belong) to blocks, scripts, etc.
-#
-
-use strict;
-use warnings;
-use 5.010;
-
-my $IS_EBCDIC = ord ('A') == 193;
-
-sub run_tests;
-
-#
-# This is the data to test.
-#
-# This is a hash; keys are the property to test.
-# Values are arrays containing characters to test. The characters can
-# have the following formats:
-# '\N{CHARACTER NAME}' - Use character with that name
-# '\x{1234}' - Use character with that hex escape
-# '0x1234' - Use chr() to get that character
-# "a" - Character to use
-#
-# If a character entry starts with ! the character does not belong to the class
-#
-# If the class is just single letter, we use both \pL and \p{L}
-#
-
-use charnames ':full';
-
-my @CLASSES = (
- L => ["a", "A"],
- Ll => ["b", "!B"],
- Lu => ["!c", "C"],
- IsLl => ["d", "!D"],
- IsLu => ["!e", "E"],
- LC => ["f", "!1"],
- 'L&' => ["g", "!2"],
- 'Lowercase Letter' => ["h", "!H"],
-
- Common => ["!i", "3"],
- Inherited => ["!j", '\x{300}'],
-
- InBasicLatin => ['\N{LATIN CAPITAL LETTER A}'],
- InLatin1Supplement => ['\N{LATIN CAPITAL LETTER A WITH GRAVE}'],
- InLatinExtendedA => ['\N{LATIN CAPITAL LETTER A WITH MACRON}'],
- InLatinExtendedB => ['\N{LATIN SMALL LETTER B WITH STROKE}'],
- InKatakana => ['\N{KATAKANA LETTER SMALL A}'],
- IsLatin => ["0x100", "0x212b"],
- IsHebrew => ["0x5d0", "0xfb4f"],
- IsGreek => ["0x37a", "0x386", "!0x387", "0x388",
- "0x38a", "!0x38b", "0x38c"],
- HangulSyllables => ['\x{AC00}'],
- 'Script=Latin' => ['\x{0100}'],
- 'Block=LatinExtendedA' => ['\x{0100}'],
- 'Category=UppercaseLetter' => ['\x{0100}'],
-
- #
- # It's ok to repeat class names.
- #
- InLatin1Supplement =>
- $IS_EBCDIC ? ['!\x{7f}', '\x{80}', '!\x{100}']
- : ['!\x{7f}', '\x{80}', '\x{ff}', '!\x{100}'],
- InLatinExtendedA =>
- ['!\x{7f}', '!\x{80}', '!\x{ff}', '\x{100}'],
-
- #
- # Properties are case-insensitive, and may have whitespace,
- # dashes and underscores.
- #
- 'in-latin1_SUPPLEMENT' => ['\x{80}',
- '\N{LATIN SMALL LETTER Y WITH DIAERESIS}'],
- ' ^ In Latin 1 Supplement '
- => ['!\x{80}', '\N{COFFIN}'],
- 'latin-1 supplement' => ['\x{80}', "0xDF"],
-
-);
-
-my @USER_DEFINED_PROPERTIES = (
- #
- # User defined properties
- #
- InKana1 => ['\x{3040}', '!\x{303F}'],
- InKana2 => ['\x{3040}', '!\x{303F}'],
- InKana3 => ['\x{3041}', '!\x{3040}'],
- InNotKana => ['\x{3040}', '!\x{3041}'],
- InConsonant => ['d', '!e'],
- IsSyriac1 => ['\x{0712}', '!\x{072F}'],
- Syriac1 => ['\x{0712}', '!\x{072F}'],
- '# User-defined character properties my lack \n at the end',
- InGreekSmall => ['\N{GREEK SMALL LETTER PI}',
- '\N{GREEK SMALL LETTER FINAL SIGMA}'],
- InGreekCapital => ['\N{GREEK CAPITAL LETTER PI}', '!\x{03A2}'],
- Dash => ['-'],
- ASCII_Hex_Digit => ['!-', 'A'],
- AsciiHexAndDash => ['-', 'A'],
-);
-
-
-#
-# From the short properties we populate POSIX-like classes.
-#
-my %SHORT_PROPERTIES = (
- 'Ll' => ['m', '\N{CYRILLIC SMALL LETTER A}'],
- 'Lu' => ['M', '\N{GREEK CAPITAL LETTER ALPHA}'],
- 'Lo' => ['\N{HIRAGANA LETTER SMALL A}'],
- 'Mn' => ['\N{COMBINING GRAVE ACCENT}'],
- 'Nd' => ["0", '\N{ARABIC-INDIC DIGIT ZERO}'],
- 'Pc' => ["_"],
- 'Po' => ["!"],
- 'Zs' => [" "],
- 'Cc' => ['\x{00}'],
-);
-
-#
-# Illegal properties
-#
-my @ILLEGAL_PROPERTIES = qw [q qrst];
-
-my %d;
-
-while (my ($class, $chars) = each %SHORT_PROPERTIES) {
- push @{$d {IsAlpha}} => map {$class =~ /^[LM]/ ? $_ : "!$_"} @$chars;
- push @{$d {IsAlnum}} => map {$class =~ /^[LMN]./ ? $_ : "!$_"} @$chars;
- push @{$d {IsASCII}} => map {length ($_) == 1 || $_ eq '\x{00}'
- ? $_ : "!$_"} @$chars;
- push @{$d {IsCntrl}} => map {$class =~ /^C/ ? $_ : "!$_"} @$chars;
- push @{$d {IsBlank}} => map {$class =~ /^Z[lps]/ ? $_ : "!$_"} @$chars;
- push @{$d {IsDigit}} => map {$class =~ /^Nd$/ ? $_ : "!$_"} @$chars;
- push @{$d {IsGraph}} => map {$class =~ /^([LMNPS]|Co)/
- ? $_ : "!$_"} @$chars;
- push @{$d {IsPrint}} => map {$class =~ /^([LMNPS]|Co|Zs)/
- ? $_ : "!$_"} @$chars;
- push @{$d {IsLower}} => map {$class =~ /^Ll$/ ? $_ : "!$_"} @$chars;
- push @{$d {IsUpper}} => map {$class =~ /^L[ut]/ ? $_ : "!$_"} @$chars;
- push @{$d {IsPunct}} => map {$class =~ /^P/ ? $_ : "!$_"} @$chars;
- push @{$d {IsWord}} => map {$class =~ /^[LMN]/ || $_ eq "_"
- ? $_ : "!$_"} @$chars;
- push @{$d {IsSpace}} => map {$class =~ /^Z/ ||
- length ($_) == 1 && ord ($_) >= 0x09
- && ord ($_) <= 0x0D
- ? $_ : "!$_"} @$chars;
-}
-
-delete $d {IsASCII} if $IS_EBCDIC;
-
-push @CLASSES => "# Short properties" => %SHORT_PROPERTIES,
- "# POSIX like properties" => %d,
- "# User defined properties" => @USER_DEFINED_PROPERTIES;
-
-
-#
-# Calculate the number of tests.
-#
-my $count = 0;
-for (my $i = 0; $i < @CLASSES; $i += 2) {
- $i ++, redo if $CLASSES [$i] =~ /^\h*#\h*(.*)/;
- $count += (length $CLASSES [$i] == 1 ? 4 : 2) * @{$CLASSES [$i + 1]};
-}
-$count += 2 * @ILLEGAL_PROPERTIES;
-$count += 2 * grep {length $_ == 1} @ILLEGAL_PROPERTIES;
-
-my $tests = 0;
-
-say "1..$count";
-
-run_tests unless caller ();
-
-sub match {
- my ($char, $match, $nomatch) = @_;
-
- my ($str, $name);
-
- given ($char) {
- when (/^\\/) {
- $str = eval qq ["$char"];
- $name = qq ["$char"];
- }
- when (/^0x([0-9A-Fa-f]+)$/) {
- $str = chr hex $1;
- $name = "chr ($char)";
- }
- default {
- $str = $char;
- $name = qq ["$char"];
- }
- }
-
- print "not " unless $str =~ /$match/;
- print "ok ", ++ $tests, " - $name =~ /$match/\n";
- print "not " unless $str !~ /$nomatch/;
- print "ok ", ++ $tests, " - $name !~ /$nomatch/\n";
-}
-
-sub run_tests {
-
- while (@CLASSES) {
- my $class = shift @CLASSES;
- if ($class =~ /^\h*#\h*(.*)/) {
- print "# $1\n";
- next;
- }
- last unless @CLASSES;
- my $chars = shift @CLASSES;
- my @in = grep {!/^!./} @$chars;
- my @out = map {s/^!(?=.)//; $_} grep { /^!./} @$chars;
- my $in_pat = eval qq ['\\p{$class}'];
- my $out_pat = eval qq ['\\P{$class}'];
-
- match $_, $in_pat, $out_pat for @in;
- match $_, $out_pat, $in_pat for @out;
-
- if (1 == length $class) {
- my $in_pat = eval qq ['\\p$class'];
- my $out_pat = eval qq ['\\P$class'];
-
- match $_, $in_pat, $out_pat for @in;
- match $_, $out_pat, $in_pat for @out;
- }
- }
-
-
- my $pat = qr /^Can't find Unicode property definition/;
- print "# Illegal properties\n";
- foreach my $p (@ILLEGAL_PROPERTIES) {
- undef $@;
- my $r = eval "'a' =~ /\\p{$p}/; 1";
- print "not " unless !$r && $@ && $@ =~ $pat;
- print "ok ", ++ $tests, " - Unknown Unicode property \\p{$p}\n";
- undef $@;
- my $s = eval "'a' =~ /\\P{$p}/; 1";
- print "not " unless !$s && $@ && $@ =~ $pat;
- print "ok ", ++ $tests, " - Unknown Unicode property \\P{$p}\n";
- if (length $p == 1) {
- undef $@;
- my $r = eval "'a' =~ /\\p$p/; 1";
- print "not " unless !$r && $@ && $@ =~ $pat;
- print "ok ", ++ $tests, " - Unknown Unicode property \\p$p\n";
- undef $@;
- my $s = eval "'a' =~ /\\P$p/; 1";
- print "not " unless !$s && $@ && $@ =~ $pat;
- print "ok ", ++ $tests, " - Unknown Unicode property \\P$p\n";
- }
- }
-}
-
-
-#
-# User defined properties
-#
-
-sub InKana1 {<<'--'}
-3040 309F
-30A0 30FF
---
-
-sub InKana2 {<<'--'}
-+utf8::InHiragana
-+utf8::InKatakana
---
-
-sub InKana3 {<<'--'}
-+utf8::InHiragana
-+utf8::InKatakana
--utf8::IsCn
---
-
-sub InNotKana {<<'--'}
-!utf8::InHiragana
--utf8::InKatakana
-+utf8::IsCn
---
-
-sub InConsonant {<<'--'} # Not EBCDIC-aware.
-0061 007f
--0061
--0065
--0069
--006f
--0075
---
-
-sub IsSyriac1 {<<'--'}
-0712 072C
-0730 074A
---
-
-sub Syriac1 {<<'--'}
-0712 072C
-0730 074A
---
-
-sub InGreekSmall {return "03B1\t03C9"}
-sub InGreekCapital {return "0391\t03A9\n-03A2"}
-
-sub AsciiHexAndDash {<<'--'}
-+utf8::ASCII_Hex_Digit
-+utf8::Dash
---
-
-__END__
Deleted: vendor/perl/dist/t/op/regexp_unicode_prop_thr.t
===================================================================
--- vendor/perl/dist/t/op/regexp_unicode_prop_thr.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/regexp_unicode_prop_thr.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,7 +0,0 @@
-#!./perl
-
-chdir 't' if -d 't';
- at INC = ('../lib', '.');
-
-require 'thread_it.pl';
-thread_it(qw(op regexp_unicode_prop.t));
Deleted: vendor/perl/dist/t/op/rxcode.t
===================================================================
--- vendor/perl/dist/t/op/rxcode.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/rxcode.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,86 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require './test.pl';
-}
-
-plan tests => 38;
-
-$^R = undef;
-like( 'a', qr/^a(?{1})(?:b(?{2}))?/, 'a =~ ab?' );
-cmp_ok( $^R, '==', 1, '..$^R after a =~ ab?' );
-
-$^R = undef;
-unlike( 'abc', qr/^a(?{3})(?:b(?{4}))$/, 'abc !~ a(?:b)$' );
-ok( !defined $^R, '..$^R after abc !~ a(?:b)$' );
-
-$^R = undef;
-like( 'ab', qr/^a(?{5})b(?{6})/, 'ab =~ ab' );
-cmp_ok( $^R, '==', 6, '..$^R after ab =~ ab' );
-
-$^R = undef;
-like( 'ab', qr/^a(?{7})(?:b(?{8}))?/, 'ab =~ ab?' );
-
-cmp_ok( $^R, '==', 8, '..$^R after ab =~ ab?' );
-
-$^R = undef;
-like( 'ab', qr/^a(?{9})b?(?{10})/, 'ab =~ ab? (2)' );
-cmp_ok( $^R, '==', 10, '..$^R after ab =~ ab? (2)' );
-
-$^R = undef;
-like( 'ab', qr/^(a(?{11})(?:b(?{12})))?/, 'ab =~ (ab)? (3)' );
-cmp_ok( $^R, '==', 12, '..$^R after ab =~ ab? (3)' );
-
-$^R = undef;
-unlike( 'ac', qr/^a(?{13})b(?{14})/, 'ac !~ ab' );
-ok( !defined $^R, '..$^R after ac !~ ab' );
-
-$^R = undef;
-like( 'ac', qr/^a(?{15})(?:b(?{16}))?/, 'ac =~ ab?' );
-cmp_ok( $^R, '==', 15, '..$^R after ac =~ ab?' );
-
-my @ar;
-like( 'ab', qr/^a(?{push @ar,101})(?:b(?{push @ar,102}))?/, 'ab =~ ab? with code push' );
-cmp_ok( scalar(@ar), '==', 2, '.. at ar pushed' );
-cmp_ok( $ar[0], '==', 101, '..first element pushed' );
-cmp_ok( $ar[1], '==', 102, '..second element pushed' );
-
-$^R = undef;
-unlike( 'a', qr/^a(?{103})b(?{104})/, 'a !~ ab with code push' );
-ok( !defined $^R, '..$^R after a !~ ab with code push' );
-
- at ar = ();
-unlike( 'a', qr/^a(?{push @ar,105})b(?{push @ar,106})/, 'a !~ ab (push)' );
-cmp_ok( scalar(@ar), '==', 0, '..nothing pushed' );
-
- at ar = ();
-unlike( 'abc', qr/^a(?{push @ar,107})b(?{push @ar,108})$/, 'abc !~ ab$ (push)' );
-cmp_ok( scalar(@ar), '==', 0, '..still nothing pushed' );
-
-use vars '@var';
-
-like( 'ab', qr/^a(?{push @var,109})(?:b(?{push @var,110}))?/, 'ab =~ ab? push to package var' );
-cmp_ok( scalar(@var), '==', 2, '.. at var pushed' );
-cmp_ok( $var[0], '==', 109, '..first element pushed (package)' );
-cmp_ok( $var[1], '==', 110, '..second element pushed (package)' );
-
- at var = ();
-unlike( 'a', qr/^a(?{push @var,111})b(?{push @var,112})/, 'a !~ ab (push package var)' );
-cmp_ok( scalar(@var), '==', 0, '..nothing pushed (package)' );
-
- at var = ();
-unlike( 'abc', qr/^a(?{push @var,113})b(?{push @var,114})$/, 'abc !~ ab$ (push package var)' );
-cmp_ok( scalar(@var), '==', 0, '..still nothing pushed (package)' );
-
-{
- local $^R = undef;
- ok( 'ac' =~ /^a(?{30})(?:b(?{31})|c(?{32}))?/, 'ac =~ a(?:b|c)?' );
- ok( $^R == 32, '$^R == 32' );
-}
-{
- local $^R = undef;
- ok( 'abbb' =~ /^a(?{36})(?:b(?{37})|c(?{38}))+/, 'abbbb =~ a(?:b|c)+' );
- ok( $^R == 37, '$^R == 37' ) or print "# \$^R=$^R\n";
-}
Deleted: vendor/perl/dist/t/op/subst.t
===================================================================
--- vendor/perl/dist/t/op/subst.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/subst.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,593 +0,0 @@
-#!./perl -w
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require Config; import Config;
-}
-
-require './test.pl';
-plan( tests => 139 );
-
-$x = 'foo';
-$_ = "x";
-s/x/\$x/;
-ok( $_ eq '$x', ":$_: eq :\$x:" );
-
-$_ = "x";
-s/x/$x/;
-ok( $_ eq 'foo', ":$_: eq :foo:" );
-
-$_ = "x";
-s/x/\$x $x/;
-ok( $_ eq '$x foo', ":$_: eq :\$x foo:" );
-
-$b = 'cd';
-($a = 'abcdef') =~ s<(b${b}e)>'\n$1';
-ok( $1 eq 'bcde' && $a eq 'a\n$1f', ":$1: eq :bcde: ; :$a: eq :a\\n\$1f:" );
-
-$a = 'abacada';
-ok( ($a =~ s/a/x/g) == 4 && $a eq 'xbxcxdx' );
-
-ok( ($a =~ s/a/y/g) == 0 && $a eq 'xbxcxdx' );
-
-ok( ($a =~ s/b/y/g) == 1 && $a eq 'xyxcxdx' );
-
-$_ = 'ABACADA';
-ok( /a/i && s///gi && $_ eq 'BCD' );
-
-$_ = '\\' x 4;
-ok( length($_) == 4 );
-$snum = s/\\/\\\\/g;
-ok( $_ eq '\\' x 8 && $snum == 4 );
-
-$_ = '\/' x 4;
-ok( length($_) == 8 );
-$snum = s/\//\/\//g;
-ok( $_ eq '\\//' x 4 && $snum == 4 );
-ok( length($_) == 12 );
-
-$_ = 'aaaXXXXbbb';
-s/^a//;
-ok( $_ eq 'aaXXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-s/a//;
-ok( $_ eq 'aaXXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-s/^a/b/;
-ok( $_ eq 'baaXXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-s/a/b/;
-ok( $_ eq 'baaXXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-s/aa//;
-ok( $_ eq 'aXXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-s/aa/b/;
-ok( $_ eq 'baXXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-s/b$//;
-ok( $_ eq 'aaaXXXXbb' );
-
-$_ = 'aaaXXXXbbb';
-s/b//;
-ok( $_ eq 'aaaXXXXbb' );
-
-$_ = 'aaaXXXXbbb';
-s/bb//;
-ok( $_ eq 'aaaXXXXb' );
-
-$_ = 'aaaXXXXbbb';
-s/aX/y/;
-ok( $_ eq 'aayXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-s/Xb/z/;
-ok( $_ eq 'aaaXXXzbb' );
-
-$_ = 'aaaXXXXbbb';
-s/aaX.*Xbb//;
-ok( $_ eq 'ab' );
-
-$_ = 'aaaXXXXbbb';
-s/bb/x/;
-ok( $_ eq 'aaaXXXXxb' );
-
-# now for some unoptimized versions of the same.
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/^a//;
-ok( $_ eq 'aaXXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/a//;
-ok( $_ eq 'aaXXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/^a/b/;
-ok( $_ eq 'baaXXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/a/b/;
-ok( $_ eq 'baaXXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/aa//;
-ok( $_ eq 'aXXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/aa/b/;
-ok( $_ eq 'baXXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/b$//;
-ok( $_ eq 'aaaXXXXbb' );
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/b//;
-ok( $_ eq 'aaaXXXXbb' );
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/bb//;
-ok( $_ eq 'aaaXXXXb' );
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/aX/y/;
-ok( $_ eq 'aayXXXbbb' );
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/Xb/z/;
-ok( $_ eq 'aaaXXXzbb' );
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/aaX.*Xbb//;
-ok( $_ eq 'ab' );
-
-$_ = 'aaaXXXXbbb';
-$x ne $x || s/bb/x/;
-ok( $_ eq 'aaaXXXXxb' );
-
-$_ = 'abc123xyz';
-s/(\d+)/$1*2/e; # yields 'abc246xyz'
-ok( $_ eq 'abc246xyz' );
-s/(\d+)/sprintf("%5d",$1)/e; # yields 'abc 246xyz'
-ok( $_ eq 'abc 246xyz' );
-s/(\w)/$1 x 2/eg; # yields 'aabbcc 224466xxyyzz'
-ok( $_ eq 'aabbcc 224466xxyyzz' );
-
-$_ = "aaaaa";
-ok( y/a/b/ == 5 );
-ok( y/a/b/ == 0 );
-ok( y/b// == 5 );
-ok( y/b/c/s == 5 );
-ok( y/c// == 1 );
-ok( y/c//d == 1 );
-ok( $_ eq "" );
-
-$_ = "Now is the %#*! time for all good men...";
-ok( ($x=(y/a-zA-Z //cd)) == 7 );
-ok( y/ / /s == 8 );
-
-$_ = 'abcdefghijklmnopqrstuvwxyz0123456789';
-tr/a-z/A-Z/;
-
-ok( $_ eq 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' );
-
-# same as tr/A-Z/a-z/;
-if (defined $Config{ebcdic} && $Config{ebcdic} eq 'define') { # EBCDIC.
- no utf8;
- y[\301-\351][\201-\251];
-} else { # Ye Olde ASCII. Or something like it.
- y[\101-\132][\141-\172];
-}
-
-ok( $_ eq 'abcdefghijklmnopqrstuvwxyz0123456789' );
-
-SKIP: {
- skip("not ASCII",1) unless (ord("+") == ord(",") - 1
- && ord(",") == ord("-") - 1
- && ord("a") == ord("b") - 1
- && ord("b") == ord("c") - 1);
- $_ = '+,-';
- tr/+--/a-c/;
- ok( $_ eq 'abc' );
-}
-
-$_ = '+,-';
-tr/+\--/a\/c/;
-ok( $_ eq 'a,/' );
-
-$_ = '+,-';
-tr/-+,/ab\-/;
-ok( $_ eq 'b-a' );
-
-
-# test recursive substitutions
-# code based on the recursive expansion of makefile variables
-
-my %MK = (
- AAAAA => '$(B)', B=>'$(C)', C => 'D', # long->short
- E => '$(F)', F=>'p $(G) q', G => 'HHHHH', # short->long
- DIR => '$(UNDEFINEDNAME)/xxx',
-);
-sub var {
- my($var,$level) = @_;
- return "\$($var)" unless exists $MK{$var};
- return exp_vars($MK{$var}, $level+1); # can recurse
-}
-sub exp_vars {
- my($str,$level) = @_;
- $str =~ s/\$\((\w+)\)/var($1, $level+1)/ge; # can recurse
- #warn "exp_vars $level = '$str'\n";
- $str;
-}
-
-ok( exp_vars('$(AAAAA)',0) eq 'D' );
-ok( exp_vars('$(E)',0) eq 'p HHHHH q' );
-ok( exp_vars('$(DIR)',0) eq '$(UNDEFINEDNAME)/xxx' );
-ok( exp_vars('foo $(DIR)/yyy bar',0) eq 'foo $(UNDEFINEDNAME)/xxx/yyy bar' );
-
-$_ = "abcd";
-s/(..)/$x = $1, m#.#/eg;
-ok( $x eq "cd", 'a match nested in the RHS of a substitution' );
-
-# Subst and lookbehind
-
-$_="ccccc";
-$snum = s/(?<!x)c/x/g;
-ok( $_ eq "xxxxx" && $snum == 5 );
-
-$_="ccccc";
-$snum = s/(?<!x)(c)/x/g;
-ok( $_ eq "xxxxx" && $snum == 5 );
-
-$_="foobbarfoobbar";
-$snum = s/(?<!r)foobbar/foobar/g;
-ok( $_ eq "foobarfoobbar" && $snum == 1 );
-
-$_="foobbarfoobbar";
-$snum = s/(?<!ar)(foobbar)/foobar/g;
-ok( $_ eq "foobarfoobbar" && $snum == 1 );
-
-$_="foobbarfoobbar";
-$snum = s/(?<!ar)foobbar/foobar/g;
-ok( $_ eq "foobarfoobbar" && $snum == 1 );
-
-eval 's{foo} # this is a comment, not a delimiter
- {bar};';
-ok( ! @?, 'parsing of split subst with comment' );
-
-$_="baacbaa";
-$snum = tr/a/b/s;
-ok( $_ eq "bbcbb" && $snum == 4,
- 'check if squashing works at the end of string' );
-
-$_ = "ab";
-ok( s/a/b/ == 1 );
-
-$_ = <<'EOL';
- $url = new URI::URL "http://www/"; die if $url eq "xXx";
-EOL
-$^R = 'junk';
-
-$foo = ' $@%#lowercase $@%# lowercase UPPERCASE$@%#UPPERCASE' .
- ' $@%#lowercase$@%#lowercase$@%# lowercase lowercase $@%#lowercase' .
- ' lowercase $@%#MiXeD$@%# ';
-
-$snum =
-s{ \d+ \b [,.;]? (?{ 'digits' })
- |
- [a-z]+ \b [,.;]? (?{ 'lowercase' })
- |
- [A-Z]+ \b [,.;]? (?{ 'UPPERCASE' })
- |
- [A-Z] [a-z]+ \b [,.;]? (?{ 'Capitalized' })
- |
- [A-Za-z]+ \b [,.;]? (?{ 'MiXeD' })
- |
- [A-Za-z0-9]+ \b [,.;]? (?{ 'alphanumeric' })
- |
- \s+ (?{ ' ' })
- |
- [^A-Za-z0-9\s]+ (?{ '$@%#' })
-}{$^R}xg;
-ok( $_ eq $foo );
-ok( $snum == 31 );
-
-$_ = 'a' x 6;
-$snum = s/a(?{})//g;
-ok( $_ eq '' && $snum == 6 );
-
-$_ = 'x' x 20;
-$snum = s/(\d*|x)/<$1>/g;
-$foo = '<>' . ('<x><>' x 20) ;
-ok( $_ eq $foo && $snum == 41 );
-
-$t = 'aaaaaaaaa';
-
-$_ = $t;
-pos = 6;
-$snum = s/\Ga/xx/g;
-ok( $_ eq 'aaaaaaxxxxxx' && $snum == 3 );
-
-$_ = $t;
-pos = 6;
-$snum = s/\Ga/x/g;
-ok( $_ eq 'aaaaaaxxx' && $snum == 3 );
-
-$_ = $t;
-pos = 6;
-s/\Ga/xx/;
-ok( $_ eq 'aaaaaaxxaa' );
-
-$_ = $t;
-pos = 6;
-s/\Ga/x/;
-ok( $_ eq 'aaaaaaxaa' );
-
-$_ = $t;
-$snum = s/\Ga/xx/g;
-ok( $_ eq 'xxxxxxxxxxxxxxxxxx' && $snum == 9 );
-
-$_ = $t;
-$snum = s/\Ga/x/g;
-ok( $_ eq 'xxxxxxxxx' && $snum == 9 );
-
-$_ = $t;
-s/\Ga/xx/;
-ok( $_ eq 'xxaaaaaaaa' );
-
-$_ = $t;
-s/\Ga/x/;
-ok( $_ eq 'xaaaaaaaa' );
-
-$_ = 'aaaa';
-$snum = s/\ba/./g;
-ok( $_ eq '.aaa' && $snum == 1 );
-
-eval q% s/a/"b"}/e %;
-ok( $@ =~ /Bad evalled substitution/ );
-eval q% ($_ = "x") =~ s/(.)/"$1 "/e %;
-ok( $_ eq "x " and !length $@ );
-$x = $x = 'interp';
-eval q% ($_ = "x") =~ s/x(($x)*)/"$1"/e %;
-ok( $_ eq '' and !length $@ );
-
-$_ = "C:/";
-ok( !s/^([a-z]:)/\u$1/ );
-
-$_ = "Charles Bronson";
-$snum = s/\B\w//g;
-ok( $_ eq "C B" && $snum == 12 );
-
-{
- use utf8;
- my $s = "H\303\266he";
- my $l = my $r = $s;
- $l =~ s/[^\w]//g;
- $r =~ s/[^\w\.]//g;
- is($l, $r, "use utf8 \\w");
-}
-
-my $pv1 = my $pv2 = "Andreas J. K\303\266nig";
-$pv1 =~ s/A/\x{100}/;
-substr($pv2,0,1) = "\x{100}";
-is($pv1, $pv2);
-
-SKIP: {
- skip("EBCDIC", 3) if ord("A") == 193;
-
- {
- # Gregor Chrupala <gregor.chrupala at star-group.net>
- use utf8;
- $a = 'España';
- $a =~ s/ñ/ñ/;
- like($a, qr/ñ/, "use utf8 RHS");
- }
-
- {
- use utf8;
- $a = 'España España';
- $a =~ s/ñ/ñ/;
- like($a, qr/ñ/, "use utf8 LHS");
- }
-
- {
- use utf8;
- $a = 'España';
- $a =~ s/ñ/ñ/;
- like($a, qr/ñ/, "use utf8 LHS and RHS");
- }
-}
-
-{
- # SADAHIRO Tomoyuki <bqw10602 at nifty.com>
-
- $a = "\x{100}\x{101}";
- $a =~ s/\x{101}/\xFF/;
- like($a, qr/\xFF/);
- is(length($a), 2, "SADAHIRO utf8 s///");
-
- $a = "\x{100}\x{101}";
- $a =~ s/\x{101}/"\xFF"/e;
- like($a, qr/\xFF/);
- is(length($a), 2);
-
- $a = "\x{100}\x{101}";
- $a =~ s/\x{101}/\xFF\xFF\xFF/;
- like($a, qr/\xFF\xFF\xFF/);
- is(length($a), 4);
-
- $a = "\x{100}\x{101}";
- $a =~ s/\x{101}/"\xFF\xFF\xFF"/e;
- like($a, qr/\xFF\xFF\xFF/);
- is(length($a), 4);
-
- $a = "\xFF\x{101}";
- $a =~ s/\xFF/\x{100}/;
- like($a, qr/\x{100}/);
- is(length($a), 2);
-
- $a = "\xFF\x{101}";
- $a =~ s/\xFF/"\x{100}"/e;
- like($a, qr/\x{100}/);
- is(length($a), 2);
-
- $a = "\xFF";
- $a =~ s/\xFF/\x{100}/;
- like($a, qr/\x{100}/);
- is(length($a), 1);
-
- $a = "\xFF";
- $a =~ s/\xFF/"\x{100}"/e;
- like($a, qr/\x{100}/);
- is(length($a), 1);
-}
-
-{
- # subst with mixed utf8/non-utf8 type
- my($ua, $ub, $uc, $ud) = ("\x{101}", "\x{102}", "\x{103}", "\x{104}");
- my($na, $nb) = ("\x{ff}", "\x{fe}");
- my $a = "$ua--$ub";
- my $b;
- ($b = $a) =~ s/--/$na/;
- is($b, "$ua$na$ub", "s///: replace non-utf8 into utf8");
- ($b = $a) =~ s/--/--$na--/;
- is($b, "$ua--$na--$ub", "s///: replace long non-utf8 into utf8");
- ($b = $a) =~ s/--/$uc/;
- is($b, "$ua$uc$ub", "s///: replace utf8 into utf8");
- ($b = $a) =~ s/--/--$uc--/;
- is($b, "$ua--$uc--$ub", "s///: replace long utf8 into utf8");
- $a = "$na--$nb";
- ($b = $a) =~ s/--/$ua/;
- is($b, "$na$ua$nb", "s///: replace utf8 into non-utf8");
- ($b = $a) =~ s/--/--$ua--/;
- is($b, "$na--$ua--$nb", "s///: replace long utf8 into non-utf8");
-
- # now with utf8 pattern
- $a = "$ua--$ub";
- ($b = $a) =~ s/-($ud)?-/$na/;
- is($b, "$ua$na$ub", "s///: replace non-utf8 into utf8 (utf8 pattern)");
- ($b = $a) =~ s/-($ud)?-/--$na--/;
- is($b, "$ua--$na--$ub", "s///: replace long non-utf8 into utf8 (utf8 pattern)");
- ($b = $a) =~ s/-($ud)?-/$uc/;
- is($b, "$ua$uc$ub", "s///: replace utf8 into utf8 (utf8 pattern)");
- ($b = $a) =~ s/-($ud)?-/--$uc--/;
- is($b, "$ua--$uc--$ub", "s///: replace long utf8 into utf8 (utf8 pattern)");
- $a = "$na--$nb";
- ($b = $a) =~ s/-($ud)?-/$ua/;
- is($b, "$na$ua$nb", "s///: replace utf8 into non-utf8 (utf8 pattern)");
- ($b = $a) =~ s/-($ud)?-/--$ua--/;
- is($b, "$na--$ua--$nb", "s///: replace long utf8 into non-utf8 (utf8 pattern)");
- ($b = $a) =~ s/-($ud)?-/$na/;
- is($b, "$na$na$nb", "s///: replace non-utf8 into non-utf8 (utf8 pattern)");
- ($b = $a) =~ s/-($ud)?-/--$na--/;
- is($b, "$na--$na--$nb", "s///: replace long non-utf8 into non-utf8 (utf8 pattern)");
-}
-
-$_ = 'aaaa';
-$r = 'x';
-$s = s/a(?{})/$r/g;
-is("<$_> <$s>", "<xxxx> <4>", "[perl #7806]");
-
-$_ = 'aaaa';
-$s = s/a(?{})//g;
-is("<$_> <$s>", "<> <4>", "[perl #7806]");
-
-# [perl #19048] Coredump in silly replacement
-{
- local $^W = 0;
- $_="abcdef\n";
- s!.!!eg;
- is($_, "\n", "[perl #19048]");
-}
-
-# [perl #17757] interaction between saw_ampersand and study
-{
- my $f = eval q{ $& };
- $f = "xx";
- study $f;
- $f =~ s/x/y/g;
- is($f, "yy", "[perl #17757]");
-}
-
-# [perl #20684] returned a zero count
-$_ = "1111";
-is(s/(??{1})/2/eg, 4, '#20684 s/// with (??{..}) inside');
-
-# [perl #20682] @- not visible in replacement
-$_ = "123";
-/(2)/; # seed @- with something else
-s/(1)(2)(3)/$#- (@-)/;
-is($_, "3 (0 0 1 2)", '#20682 @- not visible in replacement');
-
-# [perl #20682] $^N not visible in replacement
-$_ = "abc";
-/(a)/; s/(b)|(c)/-$^N/g;
-is($_,'a-b-c','#20682 $^N not visible in replacement');
-
-# [perl #22351] perl bug with 'e' substitution modifier
-my $name = "chris";
-{
- no warnings 'uninitialized';
- $name =~ s/hr//e;
-}
-is($name, "cis", q[#22351 bug with 'e' substitution modifier]);
-
-
-# [perl #34171] $1 didn't honour 'use bytes' in s//e
-{
- my $s="\x{100}";
- my $x;
- {
- use bytes;
- $s=~ s/(..)/$x=$1/e
- }
- is(length($x), 2, '[perl #34171]');
-}
-
-
-{ # [perl #27940] perlbug: [\x00-\x1f] works, [\c at -\c_] does not
- my $c;
-
- ($c = "\x20\c@\x30\cA\x40\cZ\x50\c_\x60") =~ s/[\c at -\c_]//g;
- is($c, "\x20\x30\x40\x50\x60", "s/[\\c\@-\\c_]//g");
-
- ($c = "\x20\x00\x30\x01\x40\x1A\x50\x1F\x60") =~ s/[\x00-\x1f]//g;
- is($c, "\x20\x30\x40\x50\x60", "s/[\\x00-\\x1f]//g");
-}
-{
- $_ = "xy";
- no warnings 'uninitialized';
- /(((((((((x)))))))))(z)/; # clear $10
- s/(((((((((x)))))))))(y)/${10}/;
- is($_,"y","RT#6006: \$_ eq '$_'");
- $_ = "xr";
- s/(((((((((x)))))))))(r)/fooba${10}/;
- is($_,"foobar","RT#6006: \$_ eq '$_'");
-}
-{
- my $want=("\n" x 11).("B\n" x 11)."B";
- $_="B";
- our $i;
- for $i(1..11){
- s/^.*$/$&/gm;
- $_="\n$_\n$&";
- }
- is($want,$_,"RT#17542");
-}
-
-{
- my @tests = ('ABC', "\xA3\xA4\xA5", "\x{410}\x{411}\x{412}");
- foreach (@tests) {
- my $id = ord $_;
- s/./pos/ge;
- is($_, "012", "RT#52104: $id");
- }
-}
Deleted: vendor/perl/dist/t/op/substT.t
===================================================================
--- vendor/perl/dist/t/op/substT.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/substT.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,9 +0,0 @@
-#!perl -wT
-
-for $file ('op/subst.t', 't/op/subst.t', ':op:subst.t') {
- if (-r $file) {
- do ($^O eq 'MacOS' ? $file : "./$file");
- exit;
- }
-}
-die "Cannot find op/subst.t or t/op/subst.t\n";
Deleted: vendor/perl/dist/t/op/subst_amp.t
===================================================================
--- vendor/perl/dist/t/op/subst_amp.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/subst_amp.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,104 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require Config; import Config;
-}
-
-print "1..13\n";
-
-$_ = 'x' x 20;
-s/\d*|x/<$&>/g;
-$foo = '<>' . ('<x><>' x 20) ;
-print ($_ eq $foo ? "ok 1\n" : "not ok 1\n#'$_'\n#'$foo'\n");
-
-$t = 'aaa';
-
-$_ = $t;
- at res = ();
-pos = 1;
-s/\Ga(?{push @res, $_, $`})/xx/g;
-print "not " unless "$_ @res" eq 'axxxx aaa a aaa aa';
-print "ok 2\n";
-
-$_ = $t;
- at res = ();
-pos = 1;
-s/\Ga(?{push @res, $_, $`})/x/g;
-print "not " unless "$_ @res" eq 'axx aaa a aaa aa';
-print "ok 3\n";
-
-$_ = $t;
- at res = ();
-pos = 1;
-s/\Ga(?{push @res, $_, $`})/xx/;
-print "not " unless "$_ @res" eq 'axxa aaa a';
-print "ok 4\n";
-
-$_ = $t;
- at res = ();
-pos = 1;
-s/\Ga(?{push @res, $_, $`})/x/;
-print "not " unless "$_ @res" eq 'axa aaa a';
-print "ok 5\n";
-
-$a = $t;
- at res = ();
-pos ($a) = 1;
-$a =~ s/\Ga(?{push @res, $_, $`})/xx/g;
-print "#'$a' '@res'\nnot " unless "$a @res" eq 'axxxx aaa a aaa aa';
-print "ok 6\n";
-
-$a = $t;
- at res = ();
-pos ($a) = 1;
-$a =~ s/\Ga(?{push @res, $_, $`})/x/g;
-print "#'$a' '@res'\nnot " unless "$a @res" eq 'axx aaa a aaa aa';
-print "ok 7\n";
-
-$a = $t;
- at res = ();
-pos ($a) = 1;
-$a =~ s/\Ga(?{push @res, $_, $`})/xx/;
-print "#'$a' '@res'\nnot " unless "$a @res" eq 'axxa aaa a';
-print "ok 8\n";
-
-$a = $t;
- at res = ();
-pos ($a) = 1;
-$a =~ s/\Ga(?{push @res, $_, $`})/x/;
-print "#'$a' '@res'\nnot " unless "$a @res" eq 'axa aaa a';
-print "ok 9\n";
-
-sub x2 {'xx'}
-sub x1 {'x'}
-
-$a = $t;
- at res = ();
-pos ($a) = 1;
-$a =~ s/\Ga(?{push @res, $_, $`})/x2/ge;
-print "#'$a' '@res'\nnot " unless "$a @res" eq 'axxxx aaa a aaa aa';
-print "ok 10\n";
-
-$a = $t;
- at res = ();
-pos ($a) = 1;
-$a =~ s/\Ga(?{push @res, $_, $`})/x1/ge;
-print "#'$a' '@res'\nnot " unless "$a @res" eq 'axx aaa a aaa aa';
-print "ok 11\n";
-
-$a = $t;
- at res = ();
-pos ($a) = 1;
-$a =~ s/\Ga(?{push @res, $_, $`})/x2/e;
-print "#'$a' '@res'\nnot " unless "$a @res" eq 'axxa aaa a';
-print "ok 12\n";
-
-$a = $t;
- at res = ();
-pos ($a) = 1;
-$a =~ s/\Ga(?{push @res, $_, $`})/x1/e;
-print "#'$a' '@res'\nnot " unless "$a @res" eq 'axa aaa a';
-print "ok 13\n";
-
Deleted: vendor/perl/dist/t/op/subst_wamp.t
===================================================================
--- vendor/perl/dist/t/op/subst_wamp.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/subst_wamp.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,11 +0,0 @@
-#!./perl
-
-$dummy = defined $&; # Now we have it...
-for $file ('op/subst.t', 't/op/subst.t', ':op:subst.t') {
- if (-r $file) {
- do ($^O eq 'MacOS' ? $file : "./$file");
- exit;
- }
-}
-die "Cannot find op/subst.t or t/op/subst.t\n";
-
Deleted: vendor/perl/dist/t/op/turkish.t
===================================================================
--- vendor/perl/dist/t/op/turkish.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/turkish.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,100 +0,0 @@
-# Verifies that can implement Turkish casing as defined by Unicode 5.2.
-
-use Config;
-
-BEGIN {
- chdir 't';
- @INC = '../lib';
- require './test.pl';
-}
-
-use subs qw(lc lcfirst uc ucfirst);
-
-sub uc($) {
- my $string = shift;
- utf8::upgrade($string);
- return CORE::uc($string);
-}
-
-sub ucfirst($) {
- my $string = shift;
- utf8::upgrade($string);
- return CORE::ucfirst($string);
-}
-
-sub lc($) {
- my $string = shift;
- utf8::upgrade($string);
-
- # Unless an I is before a dot_above, it turns into a dotless i.
- $string =~ s/I (?! [^\p{ccc=0}\p{ccc=Above}]* \x{0307} )/\x{131}/gx;
-
- # But when the I is followed by a dot_above, remove the dot_above so
- # the end result will be i.
- $string =~ s/I ([^\p{ccc=0}\p{ccc=Above}]* ) \x{0307}/i$1/gx;
- return CORE::lc($string);
-}
-
-sub lcfirst($) {
- my $string = shift;
- utf8::upgrade($string);
-
- # Unless an I is before a dot_above, it turns into a dotless i.
- $string =~ s/^I (?! [^\p{ccc=0}\p{ccc=Above}]* \x{0307} )/\x{131}/x;
-
- # But when the I is followed by a dot_above, remove the dot_above so
- # the end result will be i.
- $string =~ s/^I ([^\p{ccc=0}\p{ccc=Above}]* ) \x{0307}/i$1/x;
- return CORE::lcfirst($string);
-}
-
-plan tests => 22;
-
-my $map_directory = "../lib/unicore/To";
-my $upper = "$map_directory/Upper.pl";
-my $lower = "$map_directory/Lower.pl";
-my $title = "$map_directory/Title.pl";
-
-sub ToUpper {
- my $official = do $upper;
- $utf8::ToSpecUpper{'i'} = "\x{0130}";
- return $official;
-}
-
-sub ToTitle {
- my $official = do $title;
- $utf8::ToSpecTitle{'i'} = "\x{0130}";
- return $official;
-}
-
-sub ToLower {
- my $official = do $lower;
- $utf8::ToSpecLower{"\xc4\xb0"} = "i";
- return $official;
-}
-
-is(uc("\x{DF}\x{DF}"), "SSSS", "Verify that uc of non-overridden multi-char works");
-is(uc("aa"), "AA", "Verify that uc of non-overridden ASCII works");
-is(uc("\x{101}\x{101}"), "\x{100}\x{100}", "Verify that uc of non-overridden utf8 works");
-is(uc("ii"), "\x{130}\x{130}", "Verify uc('ii') eq \\x{130}\\x{130}");
-
-is(ucfirst("\x{DF}\x{DF}"), "Ss\x{DF}", "Verify that ucfirst of non-overridden multi-char works");
-is(ucfirst("\x{101}\x{101}"), "\x{100}\x{101}", "Verify that ucfirst of non-overridden utf8 works");
-is(ucfirst("aa"), "Aa", "Verify that ucfirst of non-overridden ASCII works");
-is(ucfirst("ii"), "\x{130}i", "Verify ucfirst('ii') eq \"\\x{130}i\"");
-
-is(lc("AA"), "aa", "Verify that lc of non-overridden ASCII works");
-is(lc("\x{C0}\x{C0}"), "\x{E0}\x{E0}", "Verify that lc of non-overridden latin1 works");
-is(lc("\x{0178}\x{0178}"), "\x{FF}\x{FF}", "Verify that lc of non-overridden utf8 works");
-is(lc("II"), "\x{131}\x{131}", "Verify that lc('I') eq \\x{131}");
-is(lc("IG\x{0307}IG\x{0307}"), "\x{131}g\x{0307}\x{131}g\x{0307}", "Verify that lc(\"I...\\x{0307}\") eq \"\\x{131}...\\x{0307}\"");
-is(lc("I\x{0307}I\x{0307}"), "ii", "Verify that lc(\"I\\x{0307}\") removes the \\x{0307}, leaving 'i'");
-is(lc("\x{130}\x{130}"), "ii", "Verify that lc(\"\\x{130}\\x{130}\") eq 'ii'");
-
-is(lcfirst("AA"), "aA", "Verify that lcfirst of non-overridden ASCII works");
-is(lcfirst("\x{C0}\x{C0}"), "\x{E0}\x{C0}", "Verify that lcfirst of non-overridden latin1 works");
-is(lcfirst("\x{0178}\x{0178}"), "\x{FF}\x{0178}", "Verify that lcfirst of non-overridden utf8 works");
-is(lcfirst("I"), "\x{131}", "Verify that lcfirst('II') eq \"\\x{131}I\"");
-is(lcfirst("IG\x{0307}"), "\x{131}G\x{0307}", "Verify that lcfirst(\"I...\\x{0307}\") eq \"\\x{131}...\\x{0307}\"");
-is(lcfirst("I\x{0307}I\x{0307}"), "iI\x{0307}", "Verify that lcfirst(\"I\\x{0307}I\\x{0307}\") removes the first \\x{0307}, leaving 'iI\\x{0307}'");
-is(lcfirst("\x{130}\x{130}"), "i\x{130}", "Verify that lcfirst(\"\\x{130}\\x{130}\") eq \"i\\x{130}\"");
Deleted: vendor/perl/dist/t/op/while_readdir.t
===================================================================
--- vendor/perl/dist/t/op/while_readdir.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/op/while_readdir.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,180 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require './test.pl';
-}
-
-use strict;
-use warnings;
-
-plan 10;
-
-# Need to run this in a quiet private directory as it assumes that it can read
-# the contents twice and get the same result.
-my $tempdir = tempfile;
-
-mkdir $tempdir, 0700 or die "Can't mkdir '$tempdir': $!";
-chdir $tempdir or die die "Can't chdir '$tempdir': $!";
-
-my $cleanup = 1;
-my %tempfiles;
-
-END {
- if ($cleanup) {
- foreach my $file (keys %tempfiles) {
- # We only wrote each of these once so 1 delete should work:
- if (unlink $file) {
- warn "unlink tempfile '$file' passed but it's still there"
- if -e $file;
- } else {
- warn "Couldn't unlink tempfile '$file': $!";
- }
- }
- chdir '..' or die "Couldn't chdir .. for cleanup: $!";
- rmdir $tempdir or die "Couldn't unlink tempdir '$tempdir': $!";
- }
-}
-
-# This is intentionally not random (per run), but intentionally will try to
-# give different file names for different people running this test.
-srand $< * $];
-
-my @chars = ('A' .. 'Z', 'a' .. 'z', 0 .. 9);
-
-sub make_file {
- my $name = shift;
-
- return if $tempfiles{$name}++;
-
- print "# Writing to $name in $tempdir\n";
-
- open my $fh, '>', $name or die "Can't open '$name' for writing: $!\n";
- print $fh <<'FILE0';
-This file is here for testing
-
-while(readdir $dir){...}
-... while readdir $dir
-
-etc
-FILE0
- close $fh or die "Can't close '$name': $!";
-}
-
-sub make_some_files {
- for (1..int rand 10) {
- my $name;
- $name .= $chars[rand $#chars] for 1..int(1 + rand 5);
- make_file($name);
- }
-}
-
-make_some_files();
-make_file('0');
-make_some_files();
-
-ok(-f '0', "'0' file is here");
-
-opendir my $dirhandle, '.'
- or die "Failed test: unable to open directory: $!\n";
-
-my @dir = readdir $dirhandle;
-rewinddir $dirhandle;
-
-{
- my @list;
- while(readdir $dirhandle){
- push @list, $_;
- }
- ok( eq_array( \@dir, \@list ), 'while(readdir){push}' );
- rewinddir $dirhandle;
-}
-
-{
- my @list;
- push @list, $_ while readdir $dirhandle;
- ok( eq_array( \@dir, \@list ), 'push while readdir' );
- rewinddir $dirhandle;
-}
-
-{
- my $tmp;
- my @list;
- push @list, $tmp while $tmp = readdir $dirhandle;
- ok( eq_array( \@dir, \@list ), 'push $dir while $dir = readdir' );
- rewinddir $dirhandle;
-}
-
-{
- my @list;
- while( my $dir = readdir $dirhandle){
- push @list, $dir;
- }
- ok( eq_array( \@dir, \@list ), 'while($dir=readdir){push}' );
- rewinddir $dirhandle;
-}
-
-
-{
- my @list;
- my $sub = sub{
- push @list, $_;
- };
- $sub->($_) while readdir $dirhandle;
- ok( eq_array( \@dir, \@list ), '$sub->($_) while readdir' );
- rewinddir $dirhandle;
-}
-
-{
- my $works = 0;
- while(readdir $dirhandle){
- $_ =~ s/\.$// if defined $_ && $^O eq 'VMS'; # may have zero-length extension
- if( defined $_ && $_ eq '0'){
- $works = 1;
- last;
- }
- }
- ok( $works, 'while(readdir){} with file named "0"' );
- rewinddir $dirhandle;
-}
-
-{
- my $works = 0;
- my $sub = sub{
- $_ =~ s/\.$// if defined $_ && $^O eq 'VMS'; # may have zero-length extension
- if( defined $_ && $_ eq '0' ){
- $works = 1;
- }
- };
- $sub->($_) while readdir $dirhandle;
- ok( $works, '$sub->($_) while readdir; with file named "0"' );
- rewinddir $dirhandle;
-}
-
-{
- my $works = 0;
- while( my $dir = readdir $dirhandle ){
- $dir =~ s/\.$// if defined $dir && $^O eq 'VMS'; # may have zero-length extension
- if( defined $dir && $dir eq '0'){
- $works = 1;
- last;
- }
- }
- ok( $works, 'while($dir=readdir){} with file named "0"');
- rewinddir $dirhandle;
-}
-
-{
- my $tmp;
- my $ok;
- my @list;
- while( $tmp = readdir $dirhandle ){
- $tmp =~ s/\.$// if defined $tmp && $^O eq 'VMS'; # may have zero-length extension
- last if defined($tmp)&& !$tmp && ($ok=1)
- }
- ok( $ok, '$dir while $dir = readdir; with file named "0"' );
- rewinddir $dirhandle;
-}
-
-closedir $dirhandle;
Deleted: vendor/perl/dist/t/porting/buildtoc.t
===================================================================
--- vendor/perl/dist/t/porting/buildtoc.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/porting/buildtoc.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,15 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir '..' unless -d 't';
- unshift @INC, 'lib';
-}
-
-use strict;
-require 't/test.pl';
-
-my $result = runperl(switches => ['-f', '-Ilib'],
- progfile => 'pod/buildtoc',
- args => ['--build-toc', '-q', '--test', '--build-all']);
-
-print $result;
Modified: vendor/perl/dist/t/porting/known_pod_issues.dat
===================================================================
--- vendor/perl/dist/t/porting/known_pod_issues.dat 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/porting/known_pod_issues.dat 2014-08-27 11:27:40 UTC (rev 6720)
@@ -236,7 +236,6 @@
pod/perlguts.pod ? Should you be using F<...> or maybe L<...> instead of 2
pod/perlguts.pod ? Should you be using L<...> instead of 1
pod/perlhack.pod ? Should you be using L<...> instead of 1
-pod/perlhack.pod Verbatim line length including indents exceeds 79 by 1
pod/perlhist.pod Verbatim line length including indents exceeds 79 by 1
pod/perlhpux.pod Verbatim line length including indents exceeds 79 by 5
pod/perlhurd.pod Verbatim line length including indents exceeds 79 by 2
Modified: vendor/perl/dist/t/re/overload.t
===================================================================
--- vendor/perl/dist/t/re/overload.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/re/overload.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -220,5 +220,47 @@
}
+{
+ # if the pattern gets silently re-parsed, ensure that any eval'ed
+ # code blocks get the correct lexical scope. The overloading of
+ # concat, along with the modification of the text of the code block,
+ # ensures that it has to be re-compiled.
+
+ {
+ package OL_MOD;
+ use overload
+ q{""} => sub { my ($pat) = @_; $pat->[0] },
+ q{.} => sub {
+ my ($a1, $a2) = @_;
+ $a1 = $a1->[0] if ref $a1;
+ $a2 = $a2->[0] if ref $a2;
+ my $s = "$a1$a2";
+ $s =~ s/x_var/y_var/;
+ bless [ $s ];
+ },
+ ;
+ }
+
+
+ BEGIN {
+ overload::constant qr => sub { bless [ $_[0] ], 'OL_MOD' };
+ }
+
+ $::x_var = # duplicate to avoid 'only used once' warning
+ $::x_var = "ABC";
+ my $x_var = "abc";
+
+ $::y_var = # duplicate to avoid 'only used once' warning
+ $::y_var = "XYZ";
+ my $y_var = "xyz";
+
+ use re 'eval';
+ my $a = 'a';
+ ok("xyz" =~ m{^(??{ $x_var })$}, "OL_MOD");
+ ok("xyza" =~ m{^(??{ $x_var })$a$}, "OL_MOD runtime");
+}
+
+
+
done_testing();
Modified: vendor/perl/dist/t/re/pat.t
===================================================================
--- vendor/perl/dist/t/re/pat.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/re/pat.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -20,7 +20,7 @@
require './test.pl';
}
-plan tests => 472; # Update this when adding/deleting tests.
+plan tests => 672; # Update this when adding/deleting tests.
run_tests() unless caller;
@@ -1364,6 +1364,27 @@
}
{
+ # if we have 87 capture buffers defined then \87 should refer to the
+ # 87th. test that this is true for 1..100
+ # Note that this test causes the engine to recurse at runtime, and
+ # hence use a lot of C stack.
+ for my $i (1..100) {
+ my $capture= "a";
+ $capture= "($capture)" for 1 .. $i;
+ for my $mid ("","b") {
+ my $str= "a${mid}a";
+ my $backref= "\\$i";
+ eval {
+ ok($str=~/$capture$mid$backref/,"\\$i works with $i buffers '$str'=~/...$mid$backref/");
+ 1;
+ } or do {
+ is("$@","","\\$i works with $i buffers works with $i buffers '$str'=~/...$mid$backref/");
+ };
+ }
+ }
+ }
+
+ {
# RT #119125
# the earlier fix for /[#](?{})/x, although correct, as a
# side-effect fixed another long-standing bug where /[#$x]/x
Modified: vendor/perl/dist/t/re/re_tests
===================================================================
--- vendor/perl/dist/t/re/re_tests 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/re/re_tests 2014-08-27 11:27:40 UTC (rev 6720)
@@ -638,6 +638,7 @@
([[:^alpha:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 01
((?a)[[:^alnum:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 __-- ${nulnul}${ffff}
([[:^ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${ffff}
+([:[:^ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${ffff} RT #120799
([[:^cntrl:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__--
([[:^digit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd
([[:^lower:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 AB
Modified: vendor/perl/dist/t/re/reg_pmod.t
===================================================================
--- vendor/perl/dist/t/re/reg_pmod.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/re/reg_pmod.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -11,9 +11,11 @@
our @tests = (
# /p Pattern PRE MATCH POST
- [ '/p', "345", "12-", "345", "-6789"],
- [ '(?p)', "345", "12-", "345", "-6789"],
- [ '(?p:)',"345", "12-", "345", "-6789"],
+ [ '/p', "345", "012-", "345", "-6789"],
+ # these not supported under 5.18.x
+ #[ '/$r/p',"345", "012-", "345", "-6789"],
+ [ '(?p)', "345", "012-", "345", "-6789"],
+ [ '(?p:)',"345", "012-", "345", "-6789"],
[ '', "(345)", undef, undef, undef ],
[ '', "345", undef, undef, undef ],
);
@@ -26,8 +28,10 @@
foreach my $test (@tests) {
my ($p, $pat,$l,$m,$r) = @$test;
+ my $qr = qr/$pat/;
for my $sub (0,1) {
my $test_name = $p eq '/p' ? "/$pat/p"
+ : $p eq '/$r/p'? $p
: $p eq '(?p)' ? "/(?p)$pat/"
: $p eq '(?p:)'? "/(?p:$pat)/"
: "/$pat/";
@@ -36,10 +40,11 @@
#
# Cannot use if/else due to the scope invalidating ${^MATCH} and friends.
#
- $_ = '12-345-6789';
+ $_ = '012-345-6789';
my $ok =
$sub ?
( $p eq '/p' ? s/$pat/abc/p
+ : $p eq '/$r/p'? s/$qr/abc/p
: $p eq '(?p)' ? s/(?p)$pat/abc/
: $p eq '(?p:)'? s/(?p:$pat)/abc/
: s/$pat/abc/
@@ -46,6 +51,7 @@
)
:
( $p eq '/p' ? /$pat/p
+ : $p eq '/$r/p'? /$qr/p
: $p eq '(?p)' ? /(?p)$pat/
: $p eq '(?p:)'? /(?p:$pat)/
: /$pat/
Deleted: vendor/perl/dist/t/re/substr.t
===================================================================
--- vendor/perl/dist/t/re/substr.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/re/substr.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,747 +0,0 @@
-#!./perl
-
-#P = start of string Q = start of substr R = end of substr S = end of string
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-use warnings ;
-no warnings 'deprecated';
-
-$a = 'abcdefxyz';
-$SIG{__WARN__} = sub {
- if ($_[0] =~ /^substr outside of string/) {
- $w++;
- } elsif ($_[0] =~ /^Attempt to use reference as lvalue in substr/) {
- $w += 2;
- } elsif ($_[0] =~ /^Use of uninitialized value/) {
- $w += 3;
- } else {
- warn $_[0];
- }
-};
-
-BEGIN { require './test.pl'; }
-
-plan(362);
-
-run_tests() unless caller;
-
-my $krunch = "a";
-
-sub run_tests {
-
-$FATAL_MSG = qr/^substr outside of string/;
-
-is(substr($a,0,3), 'abc'); # P=Q R S
-is(substr($a,3,3), 'def'); # P Q R S
-is(substr($a,6,999), 'xyz'); # P Q S R
-$b = substr($a,999,999) ; # warn # P R Q S
-is ($w--, 1);
-eval{substr($a,999,999) = "" ; };# P R Q S
-like ($@, $FATAL_MSG);
-is(substr($a,0,-6), 'abc'); # P=Q R S
-is(substr($a,-3,1), 'x'); # P Q R S
-
-$[ = 1;
-
-is(substr($a,1,3), 'abc' ); # P=Q R S
-is(substr($a,4,3), 'def' ); # P Q R S
-is(substr($a,7,999), 'xyz');# P Q S R
-$b = substr($a,999,999) ; # warn # P R Q S
-is($w--, 1);
-eval{substr($a,999,999) = "" ; } ; # P R Q S
-like ($@, $FATAL_MSG);
-is(substr($a,1,-6), 'abc' );# P=Q R S
-is(substr($a,-3,1), 'x' ); # P Q R S
-
-$[ = 0;
-
-substr($a,3,3) = 'XYZ';
-is($a, 'abcXYZxyz' );
-substr($a,0,2) = '';
-is($a, 'cXYZxyz' );
-substr($a,0,0) = 'ab';
-is($a, 'abcXYZxyz' );
-substr($a,0,0) = '12345678';
-is($a, '12345678abcXYZxyz' );
-substr($a,-3,3) = 'def';
-is($a, '12345678abcXYZdef');
-substr($a,-3,3) = '<';
-is($a, '12345678abcXYZ<' );
-substr($a,-1,1) = '12345678';
-is($a, '12345678abcXYZ12345678' );
-
-$a = 'abcdefxyz';
-
-is(substr($a,6), 'xyz' ); # P Q R=S
-is(substr($a,-3), 'xyz' ); # P Q R=S
-$b = substr($a,999,999) ; # warning # P R=S Q
-is($w--, 1);
-eval{substr($a,999,999) = "" ; } ; # P R=S Q
-like($@, $FATAL_MSG);
-is(substr($a,0), 'abcdefxyz'); # P=Q R=S
-is(substr($a,9), ''); # P Q=R=S
-is(substr($a,-11), 'abcdefxyz'); # Q P R=S
-is(substr($a,-9), 'abcdefxyz'); # P=Q R=S
-
-$a = '54321';
-
-$b = substr($a,-7, 1) ; # warn # Q R P S
-is($w--, 1);
-eval{substr($a,-7, 1) = "" ; }; # Q R P S
-like($@, $FATAL_MSG);
-$b = substr($a,-7,-6) ; # warn # Q R P S
-is($w--, 1);
-eval{substr($a,-7,-6) = "" ; }; # Q R P S
-like($@, $FATAL_MSG);
-is(substr($a,-5,-7), ''); # R P=Q S
-is(substr($a, 2,-7), ''); # R P Q S
-is(substr($a,-3,-7), ''); # R P Q S
-is(substr($a, 2,-5), ''); # P=R Q S
-is(substr($a,-3,-5), ''); # P=R Q S
-is(substr($a, 2,-4), ''); # P R Q S
-is(substr($a,-3,-4), ''); # P R Q S
-is(substr($a, 5,-6), ''); # R P Q=S
-is(substr($a, 5,-5), ''); # P=R Q S
-is(substr($a, 5,-3), ''); # P R Q=S
-$b = substr($a, 7,-7) ; # warn # R P S Q
-is($w--, 1);
-eval{substr($a, 7,-7) = "" ; }; # R P S Q
-like($@, $FATAL_MSG);
-$b = substr($a, 7,-5) ; # warn # P=R S Q
-is($w--, 1);
-eval{substr($a, 7,-5) = "" ; }; # P=R S Q
-like($@, $FATAL_MSG);
-$b = substr($a, 7,-3) ; # warn # P Q S Q
-is($w--, 1);
-eval{substr($a, 7,-3) = "" ; }; # P Q S Q
-like($@, $FATAL_MSG);
-$b = substr($a, 7, 0) ; # warn # P S Q=R
-is($w--, 1);
-eval{substr($a, 7, 0) = "" ; }; # P S Q=R
-like($@, $FATAL_MSG);
-
-is(substr($a,-7,2), ''); # Q P=R S
-is(substr($a,-7,4), '54'); # Q P R S
-is(substr($a,-7,7), '54321');# Q P R=S
-is(substr($a,-7,9), '54321');# Q P S R
-is(substr($a,-5,0), ''); # P=Q=R S
-is(substr($a,-5,3), '543');# P=Q R S
-is(substr($a,-5,5), '54321');# P=Q R=S
-is(substr($a,-5,7), '54321');# P=Q S R
-is(substr($a,-3,0), ''); # P Q=R S
-is(substr($a,-3,3), '321');# P Q R=S
-is(substr($a,-2,3), '21'); # P Q S R
-is(substr($a,0,-5), ''); # P=Q=R S
-is(substr($a,2,-3), ''); # P Q=R S
-is(substr($a,0,0), ''); # P=Q=R S
-is(substr($a,0,5), '54321');# P=Q R=S
-is(substr($a,0,7), '54321');# P=Q S R
-is(substr($a,2,0), ''); # P Q=R S
-is(substr($a,2,3), '321'); # P Q R=S
-is(substr($a,5,0), ''); # P Q=R=S
-is(substr($a,5,2), ''); # P Q=S R
-is(substr($a,-7,-5), ''); # Q P=R S
-is(substr($a,-7,-2), '543');# Q P R S
-is(substr($a,-5,-5), ''); # P=Q=R S
-is(substr($a,-5,-2), '543');# P=Q R S
-is(substr($a,-3,-3), ''); # P Q=R S
-is(substr($a,-3,-1), '32');# P Q R S
-
-$a = '';
-
-is(substr($a,-2,2), ''); # Q P=R=S
-is(substr($a,0,0), ''); # P=Q=R=S
-is(substr($a,0,1), ''); # P=Q=S R
-is(substr($a,-2,3), ''); # Q P=S R
-is(substr($a,-2), ''); # Q P=R=S
-is(substr($a,0), ''); # P=Q=R=S
-
-
-is(substr($a,0,-1), ''); # R P=Q=S
-$b = substr($a,-2, 0) ; # warn # Q=R P=S
-is($w--, 1);
-eval{substr($a,-2, 0) = "" ; }; # Q=R P=S
-like($@, $FATAL_MSG);
-
-$b = substr($a,-2, 1) ; # warn # Q R P=S
-is($w--, 1);
-eval{substr($a,-2, 1) = "" ; }; # Q R P=S
-like($@, $FATAL_MSG);
-
-$b = substr($a,-2,-1) ; # warn # Q R P=S
-is($w--, 1);
-eval{substr($a,-2,-1) = "" ; }; # Q R P=S
-like($@, $FATAL_MSG);
-
-$b = substr($a,-2,-2) ; # warn # Q=R P=S
-is($w--, 1);
-eval{substr($a,-2,-2) = "" ; }; # Q=R P=S
-like($@, $FATAL_MSG);
-
-$b = substr($a, 1,-2) ; # warn # R P=S Q
-is($w--, 1);
-eval{substr($a, 1,-2) = "" ; }; # R P=S Q
-like($@, $FATAL_MSG);
-
-$b = substr($a, 1, 1) ; # warn # P=S Q R
-is($w--, 1);
-eval{substr($a, 1, 1) = "" ; }; # P=S Q R
-like($@, $FATAL_MSG);
-
-$b = substr($a, 1, 0) ;# warn # P=S Q=R
-is($w--, 1);
-eval{substr($a, 1, 0) = "" ; }; # P=S Q=R
-like($@, $FATAL_MSG);
-
-$b = substr($a,1) ; # warning # P=R=S Q
-is($w--, 1);
-eval{substr($a,1) = "" ; }; # P=R=S Q
-like($@, $FATAL_MSG);
-
-$b = substr($a,-7,-6) ; # warn # Q R P S
-is($w--, 1);
-eval{substr($a,-7,-6) = "" ; }; # Q R P S
-like($@, $FATAL_MSG);
-
-my $a = 'zxcvbnm';
-substr($a,2,0) = '';
-is($a, 'zxcvbnm');
-substr($a,7,0) = '';
-is($a, 'zxcvbnm');
-substr($a,5,0) = '';
-is($a, 'zxcvbnm');
-substr($a,0,2) = 'pq';
-is($a, 'pqcvbnm');
-substr($a,2,0) = 'r';
-is($a, 'pqrcvbnm');
-substr($a,8,0) = 'asd';
-is($a, 'pqrcvbnmasd');
-substr($a,0,2) = 'iop';
-is($a, 'ioprcvbnmasd');
-substr($a,0,5) = 'fgh';
-is($a, 'fghvbnmasd');
-substr($a,3,5) = 'jkl';
-is($a, 'fghjklsd');
-substr($a,3,2) = '1234';
-is($a, 'fgh1234lsd');
-
-
-# with lexicals (and in re-entered scopes)
-for (0,1) {
- my $txt;
- unless ($_) {
- $txt = "Foo";
- substr($txt, -1) = "X";
- is($txt, "FoX");
- }
- else {
- substr($txt, 0, 1) = "X";
- is($txt, "X");
- }
-}
-
-$w = 0 ;
-# coercion of references
-{
- my $s = [];
- substr($s, 0, 1) = 'Foo';
- is (substr($s,0,7), "FooRRAY");
- is ($w,2);
- $w = 0;
-}
-
-# check no spurious warnings
-is($w, 0);
-
-# check new 4 arg replacement syntax
-$a = "abcxyz";
-$w = 0;
-is(substr($a, 0, 3, ""), "abc");
-is($a, "xyz");
-is(substr($a, 0, 0, "abc"), "");
-is($a, "abcxyz");
-is(substr($a, 3, -1, ""), "xy");
-is($a, "abcz");
-
-is(substr($a, 3, undef, "xy"), "");
-is($a, "abcxyz");
-is($w, 3);
-
-$w = 0;
-
-is(substr($a, 3, 9999999, ""), "xyz");
-is($a, "abc");
-eval{substr($a, -99, 0, "") };
-like($@, $FATAL_MSG);
-eval{substr($a, 99, 3, "") };
-like($@, $FATAL_MSG);
-
-substr($a, 0, length($a), "foo");
-is ($a, "foo");
-is ($w, 0);
-
-# using 4 arg substr as lvalue is a compile time error
-eval 'substr($a,0,0,"") = "abc"';
-like ($@, qr/Can't modify substr/);
-is ($a, "foo");
-
-$a = "abcdefgh";
-is(sub { shift }->(substr($a, 0, 4, "xxxx")), 'abcd');
-is($a, 'xxxxefgh');
-
-{
- my $y = 10;
- $y = "2" . $y;
- is ($y, 210);
-}
-
-# utf8 sanity
-{
- my $x = substr("a\x{263a}b",0);
- is(length($x), 3);
- $x = substr($x,1,1);
- is($x, "\x{263a}");
- $x = $x x 2;
- is(length($x), 2);
- substr($x,0,1) = "abcd";
- is($x, "abcd\x{263a}");
- is(length($x), 5);
- $x = reverse $x;
- is(length($x), 5);
- is($x, "\x{263a}dcba");
-
- my $z = 10;
- $z = "21\x{263a}" . $z;
- is(length($z), 5);
- is($z, "21\x{263a}10");
-}
-
-# replacement should work on magical values
-require Tie::Scalar;
-my %data;
-tie $data{'a'}, 'Tie::StdScalar'; # makes $data{'a'} magical
-$data{a} = "firstlast";
-is(substr($data{'a'}, 0, 5, ""), "first");
-is($data{'a'}, "last");
-
-# more utf8
-
-# The following two originally from Ignasi Roca.
-
-$x = "\xF1\xF2\xF3";
-substr($x, 0, 1) = "\x{100}"; # Ignasi had \x{FF}
-is(length($x), 3);
-is($x, "\x{100}\xF2\xF3");
-is(substr($x, 0, 1), "\x{100}");
-is(substr($x, 1, 1), "\x{F2}");
-is(substr($x, 2, 1), "\x{F3}");
-
-$x = "\xF1\xF2\xF3";
-substr($x, 0, 1) = "\x{100}\x{FF}"; # Ignasi had \x{FF}
-is(length($x), 4);
-is($x, "\x{100}\x{FF}\xF2\xF3");
-is(substr($x, 0, 1), "\x{100}");
-is(substr($x, 1, 1), "\x{FF}");
-is(substr($x, 2, 1), "\x{F2}");
-is(substr($x, 3, 1), "\x{F3}");
-
-# more utf8 lval exercise
-
-$x = "\xF1\xF2\xF3";
-substr($x, 0, 2) = "\x{100}\xFF";
-is(length($x), 3);
-is($x, "\x{100}\xFF\xF3");
-is(substr($x, 0, 1), "\x{100}");
-is(substr($x, 1, 1), "\x{FF}");
-is(substr($x, 2, 1), "\x{F3}");
-
-$x = "\xF1\xF2\xF3";
-substr($x, 1, 1) = "\x{100}\xFF";
-is(length($x), 4);
-is($x, "\xF1\x{100}\xFF\xF3");
-is(substr($x, 0, 1), "\x{F1}");
-is(substr($x, 1, 1), "\x{100}");
-is(substr($x, 2, 1), "\x{FF}");
-is(substr($x, 3, 1), "\x{F3}");
-
-$x = "\xF1\xF2\xF3";
-substr($x, 2, 1) = "\x{100}\xFF";
-is(length($x), 4);
-is($x, "\xF1\xF2\x{100}\xFF");
-is(substr($x, 0, 1), "\x{F1}");
-is(substr($x, 1, 1), "\x{F2}");
-is(substr($x, 2, 1), "\x{100}");
-is(substr($x, 3, 1), "\x{FF}");
-
-$x = "\xF1\xF2\xF3";
-substr($x, 3, 1) = "\x{100}\xFF";
-is(length($x), 5);
-is($x, "\xF1\xF2\xF3\x{100}\xFF");
-is(substr($x, 0, 1), "\x{F1}");
-is(substr($x, 1, 1), "\x{F2}");
-is(substr($x, 2, 1), "\x{F3}");
-is(substr($x, 3, 1), "\x{100}");
-is(substr($x, 4, 1), "\x{FF}");
-
-$x = "\xF1\xF2\xF3";
-substr($x, -1, 1) = "\x{100}\xFF";
-is(length($x), 4);
-is($x, "\xF1\xF2\x{100}\xFF");
-is(substr($x, 0, 1), "\x{F1}");
-is(substr($x, 1, 1), "\x{F2}");
-is(substr($x, 2, 1), "\x{100}");
-is(substr($x, 3, 1), "\x{FF}");
-
-$x = "\xF1\xF2\xF3";
-substr($x, -1, 0) = "\x{100}\xFF";
-is(length($x), 5);
-is($x, "\xF1\xF2\x{100}\xFF\xF3");
-is(substr($x, 0, 1), "\x{F1}");
-is(substr($x, 1, 1), "\x{F2}");
-is(substr($x, 2, 1), "\x{100}");
-is(substr($x, 3, 1), "\x{FF}");
-is(substr($x, 4, 1), "\x{F3}");
-
-$x = "\xF1\xF2\xF3";
-substr($x, 0, -1) = "\x{100}\xFF";
-is(length($x), 3);
-is($x, "\x{100}\xFF\xF3");
-is(substr($x, 0, 1), "\x{100}");
-is(substr($x, 1, 1), "\x{FF}");
-is(substr($x, 2, 1), "\x{F3}");
-
-$x = "\xF1\xF2\xF3";
-substr($x, 0, -2) = "\x{100}\xFF";
-is(length($x), 4);
-is($x, "\x{100}\xFF\xF2\xF3");
-is(substr($x, 0, 1), "\x{100}");
-is(substr($x, 1, 1), "\x{FF}");
-is(substr($x, 2, 1), "\x{F2}");
-is(substr($x, 3, 1), "\x{F3}");
-
-$x = "\xF1\xF2\xF3";
-substr($x, 0, -3) = "\x{100}\xFF";
-is(length($x), 5);
-is($x, "\x{100}\xFF\xF1\xF2\xF3");
-is(substr($x, 0, 1), "\x{100}");
-is(substr($x, 1, 1), "\x{FF}");
-is(substr($x, 2, 1), "\x{F1}");
-is(substr($x, 3, 1), "\x{F2}");
-is(substr($x, 4, 1), "\x{F3}");
-
-$x = "\xF1\xF2\xF3";
-substr($x, 1, -1) = "\x{100}\xFF";
-is(length($x), 4);
-is($x, "\xF1\x{100}\xFF\xF3");
-is(substr($x, 0, 1), "\x{F1}");
-is(substr($x, 1, 1), "\x{100}");
-is(substr($x, 2, 1), "\x{FF}");
-is(substr($x, 3, 1), "\x{F3}");
-
-$x = "\xF1\xF2\xF3";
-substr($x, -1, -1) = "\x{100}\xFF";
-is(length($x), 5);
-is($x, "\xF1\xF2\x{100}\xFF\xF3");
-is(substr($x, 0, 1), "\x{F1}");
-is(substr($x, 1, 1), "\x{F2}");
-is(substr($x, 2, 1), "\x{100}");
-is(substr($x, 3, 1), "\x{FF}");
-is(substr($x, 4, 1), "\x{F3}");
-
-# And tests for already-UTF8 one
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, 0, 1) = "\x{100}";
-is(length($x), 3);
-is($x, "\x{100}\xF2\xF3");
-is(substr($x, 0, 1), "\x{100}");
-is(substr($x, 1, 1), "\x{F2}");
-is(substr($x, 2, 1), "\x{F3}");
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, 0, 1) = "\x{100}\x{FF}";
-is(length($x), 4);
-is($x, "\x{100}\x{FF}\xF2\xF3");
-is(substr($x, 0, 1), "\x{100}");
-is(substr($x, 1, 1), "\x{FF}");
-is(substr($x, 2, 1), "\x{F2}");
-is(substr($x, 3, 1), "\x{F3}");
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, 0, 2) = "\x{100}\xFF";
-is(length($x), 3);
-is($x, "\x{100}\xFF\xF3");
-is(substr($x, 0, 1), "\x{100}");
-is(substr($x, 1, 1), "\x{FF}");
-is(substr($x, 2, 1), "\x{F3}");
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, 1, 1) = "\x{100}\xFF";
-is(length($x), 4);
-is($x, "\x{101}\x{100}\xFF\xF3");
-is(substr($x, 0, 1), "\x{101}");
-is(substr($x, 1, 1), "\x{100}");
-is(substr($x, 2, 1), "\x{FF}");
-is(substr($x, 3, 1), "\x{F3}");
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, 2, 1) = "\x{100}\xFF";
-is(length($x), 4);
-is($x, "\x{101}\xF2\x{100}\xFF");
-is(substr($x, 0, 1), "\x{101}");
-is(substr($x, 1, 1), "\x{F2}");
-is(substr($x, 2, 1), "\x{100}");
-is(substr($x, 3, 1), "\x{FF}");
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, 3, 1) = "\x{100}\xFF";
-is(length($x), 5);
-is($x, "\x{101}\x{F2}\x{F3}\x{100}\xFF");
-is(substr($x, 0, 1), "\x{101}");
-is(substr($x, 1, 1), "\x{F2}");
-is(substr($x, 2, 1), "\x{F3}");
-is(substr($x, 3, 1), "\x{100}");
-is(substr($x, 4, 1), "\x{FF}");
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, -1, 1) = "\x{100}\xFF";
-is(length($x), 4);
-is($x, "\x{101}\xF2\x{100}\xFF");
-is(substr($x, 0, 1), "\x{101}");
-is(substr($x, 1, 1), "\x{F2}");
-is(substr($x, 2, 1), "\x{100}");
-is(substr($x, 3, 1), "\x{FF}");
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, -1, 0) = "\x{100}\xFF";
-is(length($x), 5);
-is($x, "\x{101}\xF2\x{100}\xFF\xF3");
-is(substr($x, 0, 1), "\x{101}");
-is(substr($x, 1, 1), "\x{F2}");
-is(substr($x, 2, 1), "\x{100}");
-is(substr($x, 3, 1), "\x{FF}");
-is(substr($x, 4, 1), "\x{F3}");
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, 0, -1) = "\x{100}\xFF";
-is(length($x), 3);
-is($x, "\x{100}\xFF\xF3");
-is(substr($x, 0, 1), "\x{100}");
-is(substr($x, 1, 1), "\x{FF}");
-is(substr($x, 2, 1), "\x{F3}");
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, 0, -2) = "\x{100}\xFF";
-is(length($x), 4);
-is($x, "\x{100}\xFF\xF2\xF3");
-is(substr($x, 0, 1), "\x{100}");
-is(substr($x, 1, 1), "\x{FF}");
-is(substr($x, 2, 1), "\x{F2}");
-is(substr($x, 3, 1), "\x{F3}");
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, 0, -3) = "\x{100}\xFF";
-is(length($x), 5);
-is($x, "\x{100}\xFF\x{101}\x{F2}\x{F3}");
-is(substr($x, 0, 1), "\x{100}");
-is(substr($x, 1, 1), "\x{FF}");
-is(substr($x, 2, 1), "\x{101}");
-is(substr($x, 3, 1), "\x{F2}");
-is(substr($x, 4, 1), "\x{F3}");
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, 1, -1) = "\x{100}\xFF";
-is(length($x), 4);
-is($x, "\x{101}\x{100}\xFF\xF3");
-is(substr($x, 0, 1), "\x{101}");
-is(substr($x, 1, 1), "\x{100}");
-is(substr($x, 2, 1), "\x{FF}");
-is(substr($x, 3, 1), "\x{F3}");
-
-$x = "\x{101}\x{F2}\x{F3}";
-substr($x, -1, -1) = "\x{100}\xFF";
-is(length($x), 5);
-is($x, "\x{101}\xF2\x{100}\xFF\xF3");
-is(substr($x, 0, 1), "\x{101}");
-is(substr($x, 1, 1), "\x{F2}");
-is(substr($x, 2, 1), "\x{100}");
-is(substr($x, 3, 1), "\x{FF}");
-is(substr($x, 4, 1), "\x{F3}");
-
-substr($x = "ab", 0, 0, "\x{100}\x{200}");
-is($x, "\x{100}\x{200}ab");
-
-substr($x = "\x{100}\x{200}", 0, 0, "ab");
-is($x, "ab\x{100}\x{200}");
-
-substr($x = "ab", 1, 0, "\x{100}\x{200}");
-is($x, "a\x{100}\x{200}b");
-
-substr($x = "\x{100}\x{200}", 1, 0, "ab");
-is($x, "\x{100}ab\x{200}");
-
-substr($x = "ab", 2, 0, "\x{100}\x{200}");
-is($x, "ab\x{100}\x{200}");
-
-substr($x = "\x{100}\x{200}", 2, 0, "ab");
-is($x, "\x{100}\x{200}ab");
-
-substr($x = "\xFFb", 0, 0, "\x{100}\x{200}");
-is($x, "\x{100}\x{200}\xFFb");
-
-substr($x = "\x{100}\x{200}", 0, 0, "\xFFb");
-is($x, "\xFFb\x{100}\x{200}");
-
-substr($x = "\xFFb", 1, 0, "\x{100}\x{200}");
-is($x, "\xFF\x{100}\x{200}b");
-
-substr($x = "\x{100}\x{200}", 1, 0, "\xFFb");
-is($x, "\x{100}\xFFb\x{200}");
-
-substr($x = "\xFFb", 2, 0, "\x{100}\x{200}");
-is($x, "\xFFb\x{100}\x{200}");
-
-substr($x = "\x{100}\x{200}", 2, 0, "\xFFb");
-is($x, "\x{100}\x{200}\xFFb");
-
-# [perl #20933]
-{
- my $s = "ab";
- my @r;
- $r[$_] = \ substr $s, $_, 1 for (0, 1);
- is(join("", map { $$_ } @r), "ab");
-}
-
-# [perl #23207]
-{
- sub ss {
- substr($_[0],0,1) ^= substr($_[0],1,1) ^=
- substr($_[0],0,1) ^= substr($_[0],1,1);
- }
- my $x = my $y = 'AB'; ss $x; ss $y;
- is($x, $y);
-}
-
-# [perl #24605]
-{
- my $x = "0123456789\x{500}";
- my $y = substr $x, 4;
- is(substr($x, 7, 1), "7");
-}
-
-# multiple assignments to lvalue [perl #24346]
-{
- my $x = "abcdef";
- for (substr($x,1,3)) {
- is($_, 'bcd');
- $_ = 'XX';
- is($_, 'XX');
- is($x, 'aXXef');
- $_ = "\xFF";
- is($_, "\xFF");
- is($x, "a\xFFef");
- $_ = "\xF1\xF2\xF3\xF4\xF5\xF6";
- is($_, "\xF1\xF2\xF3\xF4\xF5\xF6");
- is($x, "a\xF1\xF2\xF3\xF4\xF5\xF6ef");
- $_ = 'YYYY';
- is($_, 'YYYY');
- is($x, 'aYYYYef');
- }
-}
-
-# [perl #24200] string corruption with lvalue sub
-
-{
- sub bar: lvalue { substr $krunch, 0 }
- bar = "XXX";
- is(bar, 'XXX');
- $krunch = '123456789';
- is(bar, '123456789');
-}
-
-# [perl #29149]
-{
- my $text = "0123456789\xED ";
- utf8::upgrade($text);
- my $pos = 5;
- pos($text) = $pos;
- my $a = substr($text, $pos, $pos);
- is(substr($text,$pos,1), $pos);
-
-}
-
-# [perl #23765]
-{
- my $a = pack("C", 0xbf);
- substr($a, -1) &= chr(0xfeff);
- is($a, "\xbf");
-}
-
-# [perl #34976] incorrect caching of utf8 substr length
-{
- my $a = "abcd\x{100}";
- is(substr($a,1,2), 'bc');
- is(substr($a,1,1), 'b');
-}
-
-# [perl #62646] offsets exceeding 32 bits on 64-bit system
-SKIP: {
- skip("32-bit system", 24) unless ~0 > 0xffffffff;
- my $a = "abc";
- my $s;
- my $r;
-
- utf8::downgrade($a);
- for (1..2) {
- $w = 0;
- $r = substr($a, 0xffffffff, 1);
- is($r, undef);
- is($w, 1);
-
- $w = 0;
- $r = substr($a, 0xffffffff+1, 1);
- is($r, undef);
- is($w, 1);
-
- $w = 0;
- ok( !eval { $r = substr($s=$a, 0xffffffff, 1, "_"); 1 } );
- is($r, undef);
- is($s, $a);
- is($w, 0);
-
- $w = 0;
- ok( !eval { $r = substr($s=$a, 0xffffffff+1, 1, "_"); 1 } );
- is($r, undef);
- is($s, $a);
- is($w, 0);
-
- utf8::upgrade($a);
- }
-}
-
-}
-
-
-my $destroyed;
-{ package Class; DESTROY { ++$destroyed; } }
-
-$destroyed = 0;
-{
- my $x = '';
- substr($x,0,1) = "";
- $x = bless({}, 'Class');
-}
-is($destroyed, 1, 'Timely scalar destruction with lvalue substr');
-
-# [perl #77692] UTF8 cache not being reset when TARG is reused
-ok eval {
- local ${^UTF8CACHE} = -1;
- for my $i (0..1)
- {
- my $dummy = length(substr("\x{100}",0,$i));
- }
- 1
-}, 'UTF8 cache is reset when TARG is reused [perl #77692]';
Deleted: vendor/perl/dist/t/re/substr_thr.t
===================================================================
--- vendor/perl/dist/t/re/substr_thr.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/re/substr_thr.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,3 +0,0 @@
-#!./perl
-chdir 't' if -d 't';
-require './thread_it.pl';
Deleted: vendor/perl/dist/t/run/switchPx.aux
===================================================================
--- vendor/perl/dist/t/run/switchPx.aux 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/run/switchPx.aux 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,34 +0,0 @@
-Some stuff that's not Perl
-
-This CPP directive should not be read.
-#define BARMAR 1
-
-#perl
-
-Still not perl.
-
-#!
-
-still not perl
-
-#!/something/else
-
-still not perl
-
-#!/some/path/that/leads/to/perl -l
-
-# The -l switch should be applied from the #! line.
-# Unfortunately, -P has a bug whereby the #! line is ignored.
-# If this test suddenly starts printing blank lines that bug is fixed.
-
-#define FOO "ok 1\n"
-
-#ifdef BARMAR
-# define YAR "not ok 2\n"
-#else
-# define YAR "ok 2\n"
-#endif
-
-print "1..2\n";
-print FOO;
-print YAR;
Deleted: vendor/perl/dist/t/run/switchPx.t
===================================================================
--- vendor/perl/dist/t/run/switchPx.t 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/t/run/switchPx.t 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,22 +0,0 @@
-#!./perl
-
-# Ensure that the -P and -x flags work together.
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- $ENV{PERL5LIB} = '../lib';
-
- use Config;
- if ( $^O eq 'MacOS' || ($Config{'cppstdin'} =~ /\bcppstdin\b/) &&
- ! -x $Config{'binexp'} . "/cppstdin" ) {
- print "1..0 # Skip: \$Config{cppstdin} unavailable\n";
- exit; # Cannot test till after install, alas.
- }
-}
-
-require './test.pl';
-
-print runperl( switches => ['-Px'],
- nolib => 1, # for some reason this is necessary under VMS
- progfile => 'run/switchPx.aux' );
Modified: vendor/perl/dist/toke.c
===================================================================
--- vendor/perl/dist/toke.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/toke.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -9244,7 +9244,7 @@
else if ( isWORDCHAR_A(**s) ) {
do {
*(*d)++ = *(*s)++;
- } while isWORDCHAR_A(**s);
+ } while (isWORDCHAR_A(**s) && *d < e);
}
else if (allow_package && **s == '\'' && isIDFIRST_lazy_if(*s+1,is_utf8)) {
*(*d)++ = ':';
Deleted: vendor/perl/dist/utils/dprofpp.PL
===================================================================
--- vendor/perl/dist/utils/dprofpp.PL 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/utils/dprofpp.PL 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,51 +0,0 @@
-#!/usr/local/bin/perl
-
-use Config;
-use File::Basename qw(&basename &dirname);
-use Cwd;
-
-# List explicitly here the variables you want Configure to
-# generate. Metaconfig only looks for shell variables, so you
-# have to mention them as if they were shell variables, not
-# %Config entries. Thus you write
-# $startperl
-# to ensure Configure will look for $Config{startperl}.
-
-# This forces PL files to create target in same directory as PL file.
-# This is so that make depend always knows where to find PL derivatives.
-my $origdir = cwd;
-chdir dirname($0);
-my $file = basename($0, '.PL');
-$file .= '.com' if $^O eq 'VMS';
-
-open OUT,">$file" or die "Can't create $file: $!";
-
-print "Extracting $file (with variable substitutions)\n";
-
-# In this section, perl variables will be expanded during extraction.
-# You can use $Config{...} to use Configure variables.
-
-print OUT <<"!GROK!THIS!";
-$Config{startperl}
- eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
- if \$running_under_some_shell;
-!GROK!THIS!
-
-use File::Spec;
-
-my $script = File::Spec->catfile(
- File::Spec->catdir(
- File::Spec->updir, qw[ cpan Devel-DProf bin ]
- ), "dprofpp");
-
-if (open(IN, $script)) {
- print OUT <IN>;
- close IN;
-} else {
- die "$0: cannot find '$script'\n";
-}
-
-close OUT or die "Can't close $file: $!";
-chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
-exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';
-chdir $origdir;
Modified: vendor/perl/dist/vms/descrip_mms.template
===================================================================
--- vendor/perl/dist/vms/descrip_mms.template 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/vms/descrip_mms.template 2014-08-27 11:27:40 UTC (rev 6720)
@@ -326,7 +326,7 @@
extra.pods : miniperl
@ @extra_pods.com
-PERLDELTA_CURRENT = [.pod]perl5181delta.pod
+PERLDELTA_CURRENT = [.pod]perl5182delta.pod
$(PERLDELTA_CURRENT) : [.pod]perldelta.pod
Copy/NoConfirm/Log $(MMS$SOURCE) $(PERLDELTA_CURRENT)
Deleted: vendor/perl/dist/vms/sockadapt.c
===================================================================
--- vendor/perl/dist/vms/sockadapt.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/vms/sockadapt.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,130 +0,0 @@
-/* sockadapt.c
- *
- * Author: Charles Bailey bailey at newman.upenn.edu
- * Last Revised: 4-Mar-1997
- *
- * This file should contain stubs for any of the TCP/IP functions perl5
- * requires which are not supported by your TCP/IP stack. These stubs
- * can attempt to emulate the routine in question, or can just return
- * an error status or cause perl to die.
- *
- * This version is set up for perl5 with UCX (or emulation) via
- * the DECCRTL or SOCKETSHR 0.9D.
- */
-
-#include "EXTERN.h"
-#include "perl.h"
-
-#if defined(__DECC) && defined(__DECC_VER) && (__DECC_VER >= 50200000)
-# define __sockadapt_my_hostent_t __struct_hostent_ptr32
-# define __sockadapt_my_netent_t __struct_netent_ptr32
-# define __sockadapt_my_servent_t __struct_servent_ptr32
-# define __sockadapt_my_addr_t __in_addr_t
-# define __sockadapt_my_name_t const char *
-#else
-# define __sockadapt_my_hostent_t struct hostent *
-# define __sockadapt_my_netent_t struct netent *
-# define __sockadapt_my_servent_t struct servent *
-# define __sockadapt_my_addr_t long
-# define __sockadapt_my_name_t char *
-#endif
-
-/* We have these on VMS 7.0 and above, or on Dec C 5.6 if it's providing */
-/* the 7.0 DECC RTL */
-#if ((((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000)) && defined(DECCRTL_SOCKETS))
-#else
-void setnetent(int stayopen) {
- dTHX;
- Perl_croak(aTHX_ "Function \"setnetent\" not implemented in this version of perl");
-}
-void endnetent() {
- dTHX;
- Perl_croak(aTHX_ "Function \"endnetent\" not implemented in this version of perl");
-}
-#endif
-
-#if defined(DECCRTL_SOCKETS)
- /* Use builtin socket interface in DECCRTL and
- * UCX emulation in whatever TCP/IP stack is present.
- */
-
-#if ((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000)
-#else
- void sethostent(int stayopen) {
- dTHX;
- Perl_croak(aTHX_ "Function \"sethostent\" not implemented in this version of perl");
- }
- void endhostent() {
- dTHX;
- Perl_croak(aTHX_ "Function \"endhostent\" not implemented in this version of perl");
- }
- void setprotoent(int stayopen) {
- dTHX;
- Perl_croak(aTHX_ "Function \"setprotoent\" not implemented in this version of perl");
- }
- void endprotoent() {
- dTHX;
- Perl_croak(aTHX_ "Function \"endprotoent\" not implemented in this version of perl");
- }
- void setservent(int stayopen) {
- dTHX;
- Perl_croak(aTHX_ "Function \"setservent\" not implemented in this version of perl");
- }
- void endservent() {
- dTHX;
- Perl_croak(aTHX_ "Function \"endservent\" not implemented in this version of perl");
- }
- __sockadapt_my_hostent_t gethostent() {
- dTHX;
- Perl_croak(aTHX_ "Function \"gethostent\" not implemented in this version of perl");
- return (__sockadapt_my_hostent_t )NULL; /* Avoid MISSINGRETURN warning, not reached */
- }
- __sockadapt_my_servent_t getservent() {
- dTHX;
- Perl_croak(aTHX_ "Function \"getservent\" not implemented in this version of perl");
- return (__sockadapt_my_servent_t )NULL; /* Avoid MISSINGRETURN warning, not reached */
- }
-#endif
-
-#else
- /* Work around things missing/broken in SOCKETSHR. */
-
-__sockadapt_my_netent_t getnetbyaddr( __sockadapt_my_addr_t net, int type) {
- dTHX;
- Perl_croak(aTHX_ "Function \"getnetbyaddr\" not implemented in this version of perl");
- return (struct netent *)NULL; /* Avoid MISSINGRETURN warning, not reached */
-}
-__sockadapt_my_netent_t getnetbyname( __sockadapt_my_name_t name) {
- dTHX;
- Perl_croak(aTHX_ "Function \"getnetbyname\" not implemented in this version of perl");
- return (struct netent *)NULL; /* Avoid MISSINGRETURN warning, not reached */
-}
-__sockadapt_my_netent_t getnetent() {
- dTHX;
- Perl_croak(aTHX_ "Function \"getnetent\" not implemented in this version of perl");
- return (__sockadapt_my_netent_t )NULL; /* Avoid MISSINGRETURN warning, not reached */
-}
-
-/* Some TCP/IP implementations seem to return success, when getpeername()
- * is called on a UDP socket, but the port and in_addr are all zeroes.
- */
-
-int my_getpeername(int sock, struct sockaddr *addr, int *addrlen) {
- static char nowhere[] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
- int rslt;
-
- rslt = si_getpeername(sock, addr, addrlen);
-
- /* Just pass an error back up the line */
- if (rslt) return rslt;
-
- /* If the call succeeded, make sure we don't have a zeroed port/addr */
- if (addr->sa_family == AF_INET &&
- !memcmp((char *)addr + sizeof(u_short), nowhere,
- sizeof(u_short) + sizeof(struct in_addr))) {
- rslt = -1;
- SETERRNO(ENOTCONN,SS$_CLEARED);
- }
- return rslt;
-}
-#endif /* SOCKETSHR stuff */
Deleted: vendor/perl/dist/vms/sockadapt.h
===================================================================
--- vendor/perl/dist/vms/sockadapt.h 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/vms/sockadapt.h 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,188 +0,0 @@
-/* sockadapt.h
- *
- * Authors: Charles Bailey bailey at newman.upenn.edu
- * David Denholm denholm at conmat.phys.soton.ac.uk
- * Last Revised: 4-Mar-1997
- *
- * This file should include any other header files and procide any
- * declarations, typedefs, and prototypes needed by perl for TCP/IP
- * operations.
- *
- * This version is set up for perl5 with socketshr 0.9D TCP/IP support.
- */
-
-#ifndef __SOCKADAPT_INCLUDED
-#define __SOCKADAPT_INCLUDED 1
-
-#if defined(DECCRTL_SOCKETS)
- /* Use builtin socket interface in DECCRTL and
- * UCX emulation in whatever TCP/IP stack is present.
- * Provide prototypes for missing routines; stubs are
- * in sockadapt.c.
- */
-# include <socket.h>
-# include <inet.h>
-# include <in.h>
-# include <netdb.h>
-#if ((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000)
-#else
- void sethostent(int);
- void endhostent(void);
- void setnetent(int);
- void endnetent(void);
- void setprotoent(int);
- void endprotoent(void);
- void setservent(int);
- void endservent(void);
-#endif
-# if defined(__DECC) && defined(__DECC_VER) && (__DECC_VER >= 50200000) && !defined(Sock_size_t)
-# define Sock_size_t unsigned int
-# endif
-
-#else
- /* Pull in SOCKETSHR's header, and set up structures for
- * gcc, whose basic header file set doesn't include the
- * TCP/IP stuff.
- */
-
-
-#ifdef __GNU_CC__
-
-/* we may not have netdb.h etc, so lets just do this here - div */
-/* no harm doing this for all .c files - needed only by pp_sys.c */
-
-struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* alias list */
- int h_addrtype; /* host address type */
- int h_length; /* length of address */
- char **h_addr_list; /* address */
-};
-#ifdef h_addr
-# undef h_addr
-#endif
-#define h_addr h_addr_list[0]
-
-struct protoent {
- char *p_name; /* official protocol name */
- char **p_aliases; /* alias list */
- int p_proto; /* protocol # */
-};
-
-struct servent {
- char *s_name; /* official service name */
- char **s_aliases; /* alias list */
- int s_port; /* port # */
- char *s_proto; /* protocol to use */
-};
-
-struct in_addr {
- unsigned long s_addr;
-};
-
-struct sockaddr {
- unsigned short sa_family; /* address family */
- char sa_data[14]; /* up to 14 bytes of direct address */
-};
-
-/*
- * Socket address, internet style.
- */
-struct sockaddr_in {
- short sin_family;
- unsigned short sin_port;
- struct in_addr sin_addr;
- char sin_zero[8];
-};
-
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-
-struct netent {
- char *n_name;
- char **n_aliases;
- int n_addrtype;
- long n_net;
-};
-
-/* Since socketshr.h won't declare function prototypes unless it thinks
- * the system headers have already been included, we convince it that
- * this is the case.
- */
-
-#ifndef AF_INET
-# define AF_INET 2
-#endif
-#ifndef IPPROTO_TCP
-# define IPPROTO_TCP 6
-#endif
-#ifndef __INET_LOADED
-# define __INET_LOADED
-#endif
-#ifndef __NETDB_LOADED
-# define __NETDB_LOADED
-#endif
-
-/* Finally, we provide prototypes for routines not supported by SocketShr,
- * so that the stubs in sockadapt.c won't cause complaints about
- * undeclared routines.
- */
-
-struct netent *getnetbyaddr( long net, int type);
-struct netent *getnetbyname( char *name);
-struct netent *getnetent();
-void setnetent(int);
-void endnetent();
-
-#else /* !__GNU_CC__ */
-
-/* DECC and VAXC have socket headers in the system set; they're for UCX, but
- * we'll assume that the actual calling sequence is identical across the
- * various TCP/IP stacks; these routines are pretty standard.
- */
-#include <socket.h>
-#include <in.h>
-#include <inet.h>
-
-/* SocketShr doesn't support these routines, but the DECC RTL contains
- * stubs with these names, designed to be used with the UCX socket
- * library. We avoid linker collisions by substituting new names.
- */
-#define getnetbyaddr no_getnetbyaddr
-#define getnetbyname no_getnetbyname
-#define getnetent no_getnetent
-#define setnetent no_setnetent
-#define endnetent no_endnetent
-
-#include <netdb.h>
-#endif
-
-/* We don't have these two in the system headers. */
-void setnetent(int);
-void endnetent();
-
-#include <socketshr.h>
-/* socketshr.h from SocketShr 0.9D doesn't alias fileno; its comments say
- * that the CRTL version works OK. This isn't the case, at least with
- * VAXC, so we use the SocketShr version.
- * N.B. This means that sockadapt.h must be included *after* stdio.h.
- * This is presently the case for Perl.
- */
-#ifdef fileno
-# undef fileno
-#endif
-#define fileno si_fileno
-int si_fileno(FILE *);
-
-
-/* Catch erroneous results for UDP sockets -- see sockadapt.c */
-#ifdef getpeername
-# undef getpeername
-#endif
-#define getpeername my_getpeername
-int my_getpeername (int, struct sockaddr *, int *);
-
-#endif /* SOCKETSHR stuff */
-#endif /* include guard */
Modified: vendor/perl/dist/vms/vms.c
===================================================================
--- vendor/perl/dist/vms/vms.c 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/vms/vms.c 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1371,7 +1371,7 @@
my_strlcpy(cmd, "Show Logical *", sizeof(cmd));
if (str$case_blind_compare(env_tables[i],&fildevdsc)) {
my_strlcat(cmd," /Table=", sizeof(cmd));
- cmddsc.dsc$w_length = my_strlcat(cmd, env_tables[i]->dsc$a_pointer, env_tables[i]->dsc$w_length + 1);
+ cmddsc.dsc$w_length = my_strlcat(cmd, env_tables[i]->dsc$a_pointer, sizeof(cmd));
}
else cmddsc.dsc$w_length = 14; /* N.B. We test this below */
flags = defflags | CLI$M_NOCLISYM;
@@ -9658,11 +9658,12 @@
}
tabvec[tabidx] = (struct dsc$descriptor_s *) PerlMem_malloc(sizeof(struct dsc$descriptor_s));
if (tabvec[tabidx] == NULL) _ckvmssts_noperl(SS$_INSFMEM);
- tabvec[tabidx]->dsc$w_length = 0;
+ tabvec[tabidx]->dsc$w_length = len;
tabvec[tabidx]->dsc$b_dtype = DSC$K_DTYPE_T;
- tabvec[tabidx]->dsc$b_class = DSC$K_CLASS_D;
- tabvec[tabidx]->dsc$a_pointer = NULL;
- _ckvmssts_noperl(lib$scopy_r_dx(&len,eqv,tabvec[tabidx]));
+ tabvec[tabidx]->dsc$b_class = DSC$K_CLASS_S;
+ tabvec[tabidx]->dsc$a_pointer = PerlMem_malloc(len + 1);
+ if (tabvec[tabidx]->dsc$a_pointer == NULL) _ckvmssts_noperl(SS$_INSFMEM);
+ my_strlcpy(tabvec[tabidx]->dsc$a_pointer, eqv, len + 1);
}
if (tabidx) { tabvec[tabidx] = NULL; env_tables = tabvec; }
Deleted: vendor/perl/dist/vos/syslog.h
===================================================================
--- vendor/perl/dist/vos/syslog.h 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/vos/syslog.h 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,75 +0,0 @@
-/* Beginning of modification history */
-/* Written 02-08-13 by PG */
-/* End of modification history */
-
-/* This header conforms to IEEE Std 1003.1-2001 */
-
-#ifndef _INCLUDED_SYSLOG_H
-#define _INCLUDED_SYSLOG_H
-
-/* values of the "logopt" option of openlog */
-
-#define LOG_PID 1
-#define LOG_CONS 2
-#define LOG_NDELAY 4
-#define LOG_ODELAY 8
-#define LOG_NOWAIT 16
-
-/* values of the "facility" argument of openlog
- and of the "priority" argument of syslog */
-
-#define LOG_KERN 0
-#define LOG_USER (1<<3)
-#define LOG_MAIL (2<<3)
-#define LOG_NEWS (3<<3)
-#define LOG_UUCP (4<<3)
-#define LOG_DAEMON (5<<3)
-#define LOG_AUTH (6<<3)
-#define LOG_CRON (7<<3)
-#define LOG_LPR (8<<3)
-#define LOG_LOCAL0 (9<<3)
-#define LOG_LOCAL1 (10<<3)
-#define LOG_LOCAL2 (11<<3)
-#define LOG_LOCAL3 (12<<3)
-#define LOG_LOCAL4 (13<<3)
-#define LOG_LOCAL5 (14<<3)
-#define LOG_LOCAL6 (15<<3)
-#define LOG_LOCAL7 (16<<3)
-
-/* macro for constructing "maskpri" arg to setlogmask */
-
-#define LOG_MASK(p) (1 << (p))
-
-/* values of the "priority" argument of syslog */
-
-#define LOG_EMERG 0
-#define LOG_ALERT 1
-#define LOG_CRIT 2
-#define LOG_ERR 3
-#define LOG_WARNING 4
-#define LOG_NOTICE 5
-#define LOG_INFO 6
-#define LOG_DEBUG 7
-
-#undef __P
-#ifdef __PROTOTYPES__
-#define __P(args) args
-#else
-#define __P(args) ()
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void closelog __P((void));
-extern void openlog __P((const char *ident, int logopt,
- int facility));
-extern int setlogmask __P((int maskpri));
-extern void syslog __P((int priority, const char * message, ...));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _INCLUDED_SYSLOG_H */
Modified: vendor/perl/dist/win32/Makefile
===================================================================
--- vendor/perl/dist/win32/Makefile 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/Makefile 2014-08-27 11:27:40 UTC (rev 6720)
@@ -37,7 +37,7 @@
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-#INST_VER = \5.18.1
+#INST_VER = \5.18.2
#
# Comment this out if you DON'T want your perl installation to have
@@ -1158,7 +1158,7 @@
copy ..\README.tw ..\pod\perltw.pod
copy ..\README.vos ..\pod\perlvos.pod
copy ..\README.win32 ..\pod\perlwin32.pod
- copy ..\pod\perldelta.pod ..\pod\perl5181delta.pod
+ copy ..\pod\perldelta.pod ..\pod\perl5182delta.pod
cd ..\win32
$(PERLEXE) $(PL2BAT) $(UTILS)
$(PERLEXE) $(ICWD) ..\autodoc.pl ..
@@ -1251,7 +1251,7 @@
-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
-if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
-cd $(PODDIR) && del /f *.html *.bat roffitall \
- perl5181delta.pod perlaix.pod perlamiga.pod perlapi.pod \
+ perl5182delta.pod perlaix.pod perlamiga.pod perlapi.pod \
perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
perldgux.pod perldos.pod perlfreebsd.pod perlhaiku.pod \
perlhpux.pod perlhurd.pod perlintern.pod perlirix.pod \
Deleted: vendor/perl/dist/win32/config.bc
===================================================================
--- vendor/perl/dist/win32/config.bc 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/config.bc 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1084 +0,0 @@
-## Configured by: ~cf_email~
-## Target system: WIN32
-Author=''
-Date='$Date'
-Header=''
-Id='$Id'
-Locker=''
-Log='$Log'
-RCSfile='$RCSfile'
-Revision='$Revision'
-Source=''
-State=''
-_a='.lib'
-_exe='.exe'
-_o='.obj'
-afs='false'
-afsroot='/afs'
-alignbytes='8'
-ansi2knr=''
-aphostname=''
-api_revision='~PERL_API_REVISION~'
-api_subversion='~PERL_API_SUBVERSION~'
-api_version='~PERL_API_VERSION~'
-api_versionstring='~PERL_API_REVISION~.~PERL_API_VERSION~.~PERL_API_SUBVERSION~'
-ar='tlib /P128'
-archlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~'
-archlibexp='~INST_TOP~~INST_VER~\lib~INST_ARCH~'
-archname64=''
-archname='MSWin32'
-archobjs=''
-asctime_r_proto='0'
-awk='awk'
-baserev='5'
-bash=''
-bin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-binexp='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-bison=''
-byacc='byacc'
-byteorder='1234'
-c=''
-castflags='0'
-cat='type'
-cc='bcc32'
-cccdlflags=' '
-ccdlflags='-tWD'
-ccflags='-DWIN32'
-ccflags_uselargefiles=''
-ccname='~cc~'
-ccsymbols=''
-ccversion=''
-cf_by='nobody'
-cf_email='nobody at no.where.net'
-cf_time=''
-charbits='8'
-chgrp=''
-chmod=''
-chown=''
-clocktype='clock_t'
-comm=''
-compress=''
-contains='grep'
-cp='copy'
-cpio=''
-cpp='cpp32 -oCON'
-cpp_stuff='42'
-cppccsymbols=''
-cppflags='-DWIN32'
-cpplast=''
-cppminus=''
-cpprun='cpp32 -oCON'
-cppstdin='cppstdin'
-cppsymbols=''
-crypt_r_proto='0'
-cryptlib=''
-csh='undef'
-ctermid_r_proto='0'
-ctime_r_proto='0'
-d_Gconvert='gcvt((x),(n),(b))'
-d_PRIEUldbl='undef'
-d_PRIFUldbl='undef'
-d_PRIGUldbl='undef'
-d_PRIXU64='undef'
-d_PRId64='undef'
-d_PRIeldbl='undef'
-d_PRIfldbl='undef'
-d_PRIgldbl='undef'
-d_PRIi64='undef'
-d_PRIo64='undef'
-d_PRIu64='undef'
-d_PRIx64='undef'
-d_SCNfldbl='undef'
-d__fwalk='undef'
-d_access='define'
-d_accessx='undef'
-d_aintl='undef'
-d_alarm='define'
-d_archlib='define'
-d_asctime64='undef'
-d_asctime_r='undef'
-d_atolf='undef'
-d_atoll='undef'
-d_attribute_deprecated='undef'
-d_attribute_format='undef'
-d_attribute_malloc='undef'
-d_attribute_nonnull='undef'
-d_attribute_noreturn='undef'
-d_attribute_pure='undef'
-d_attribute_unused='undef'
-d_attribute_warn_unused_result='undef'
-d_bcmp='undef'
-d_bcopy='undef'
-d_bsd='define'
-d_bsdgetpgrp='undef'
-d_bsdsetpgrp='undef'
-d_builtin_choose_expr='undef'
-d_builtin_expect='undef'
-d_bzero='undef'
-d_c99_variadic_macros='undef'
-d_casti32='define'
-d_castneg='define'
-d_charvspr='undef'
-d_chown='undef'
-d_chroot='undef'
-d_chsize='define'
-d_class='undef'
-d_clearenv='undef'
-d_closedir='define'
-d_cmsghdr_s='undef'
-d_const='define'
-d_copysignl='undef'
-d_cplusplus='undef'
-d_crypt='define'
-d_crypt_r='undef'
-d_csh='undef'
-d_ctermid='undef'
-d_ctermid_r='undef'
-d_ctime64='undef'
-d_ctime_r='undef'
-d_cuserid='undef'
-d_dbl_dig='define'
-d_dbminitproto='undef'
-d_difftime64='undef'
-d_difftime='define'
-d_dir_dd_fd='undef'
-d_dirfd='undef'
-d_dirnamlen='define'
-d_dlerror='define'
-d_dlopen='define'
-d_dlsymun='undef'
-d_dosuid='undef'
-d_drand48_r='undef'
-d_drand48proto='undef'
-d_dup2='define'
-d_eaccess='undef'
-d_endgrent='undef'
-d_endgrent_r='undef'
-d_endhent='undef'
-d_endhostent_r='undef'
-d_endnent='undef'
-d_endnetent_r='undef'
-d_endpent='undef'
-d_endprotoent_r='undef'
-d_endpwent='undef'
-d_endpwent_r='undef'
-d_endsent='undef'
-d_endservent_r='undef'
-d_eofnblk='define'
-d_eunice='undef'
-d_faststdio='define'
-d_fchdir='undef'
-d_fchmod='undef'
-d_fchown='undef'
-d_fcntl_can_lock='undef'
-d_fcntl='undef'
-d_fd_macros='define'
-d_fd_set='define'
-d_fds_bits='define'
-d_fgetpos='define'
-d_finitel='undef'
-d_finite='undef'
-d_flexfnam='define'
-d_flock='define'
-d_flockproto='define'
-d_fork='undef'
-d_fp_class='undef'
-d_fpathconf='undef'
-d_fpclass='undef'
-d_fpclassify='undef'
-d_fpclassl='undef'
-d_fpos64_t='undef'
-d_frexpl='undef'
-d_fs_data_s='undef'
-d_fseeko='undef'
-d_fsetpos='define'
-d_fstatfs='undef'
-d_fstatvfs='undef'
-d_fsync='undef'
-d_ftello='undef'
-d_ftime='define'
-d_futimes='undef'
-d_gdbm_ndbm_h_uses_prototypes='undef'
-d_gdbmndbm_h_uses_prototypes='undef'
-d_getaddrinfo='undef'
-d_getcwd='define'
-d_getespwnam='undef'
-d_getfsstat='undef'
-d_getgrent='undef'
-d_getgrent_r='undef'
-d_getgrgid_r='undef'
-d_getgrnam_r='undef'
-d_getgrps='undef'
-d_gethbyaddr='define'
-d_gethbyname='define'
-d_gethent='undef'
-d_gethname='define'
-d_gethostbyaddr_r='undef'
-d_gethostbyname_r='undef'
-d_gethostent_r='undef'
-d_gethostprotos='define'
-d_getitimer='undef'
-d_getlogin='define'
-d_getlogin_r='undef'
-d_getmnt='undef'
-d_getmntent='undef'
-d_getnameinfo='undef'
-d_getnbyaddr='undef'
-d_getnbyname='undef'
-d_getnent='undef'
-d_getnetbyaddr_r='undef'
-d_getnetbyname_r='undef'
-d_getnetent_r='undef'
-d_getnetprotos='undef'
-d_getpagsz='undef'
-d_getpbyname='define'
-d_getpbynumber='define'
-d_getpent='undef'
-d_getpgid='undef'
-d_getpgrp2='undef'
-d_getpgrp='undef'
-d_getppid='undef'
-d_getprior='undef'
-d_getprotobyname_r='undef'
-d_getprotobynumber_r='undef'
-d_getprotoent_r='undef'
-d_getprotoprotos='define'
-d_getprpwnam='undef'
-d_getpwent='undef'
-d_getpwent_r='undef'
-d_getpwnam_r='undef'
-d_getpwuid_r='undef'
-d_getsbyname='define'
-d_getsbyport='define'
-d_getsent='undef'
-d_getservbyname_r='undef'
-d_getservbyport_r='undef'
-d_getservent_r='undef'
-d_getservprotos='define'
-d_getspnam='undef'
-d_getspnam_r='undef'
-d_gettimeod='define'
-d_gmtime64='undef'
-d_gmtime_r='undef'
-d_gnulibc='undef'
-d_grpasswd='undef'
-d_hasmntopt='undef'
-d_htonl='define'
-d_ilogbl='undef'
-d_inc_version_list='undef'
-d_index='undef'
-d_inetaton='undef'
-d_inetntop='undef'
-d_inetpton='undef'
-d_int64_t='undef'
-d_isascii='define'
-d_isfinite='undef'
-d_isinf='undef'
-d_isnan='define'
-d_isnanl='undef'
-d_killpg='define'
-d_lchown='undef'
-d_ldbl_dig='define'
-d_libm_lib_version='undef'
-d_link='define'
-d_localtime64='undef'
-d_localtime_r='undef'
-d_localtime_r_needs_tzset='undef'
-d_locconv='define'
-d_lockf='undef'
-d_longdbl='define'
-d_longlong='undef'
-d_lseekproto='define'
-d_lstat='undef'
-d_madvise='undef'
-d_malloc_good_size='undef'
-d_malloc_size='undef'
-d_mblen='define'
-d_mbstowcs='define'
-d_mbtowc='define'
-d_memchr='define'
-d_memcmp='define'
-d_memcpy='define'
-d_memmove='define'
-d_memset='define'
-d_mkdir='define'
-d_mkdtemp='undef'
-d_mkfifo='undef'
-d_mkstemp='undef'
-d_mkstemps='undef'
-d_mktime64='undef'
-d_mktime='define'
-d_mmap='undef'
-d_modfl='undef'
-d_modfl_pow32_bug='undef'
-d_modflproto='undef'
-d_mprotect='undef'
-d_msgctl='undef'
-d_msg_ctrunc='undef'
-d_msg_dontroute='undef'
-d_msgget='undef'
-d_msghdr_s='undef'
-d_msg_oob='undef'
-d_msg_peek='undef'
-d_msg_proxy='undef'
-d_msgrcv='undef'
-d_msgsnd='undef'
-d_msg='undef'
-d_msync='undef'
-d_munmap='undef'
-d_mymalloc='undef'
-d_ndbm='undef'
-d_ndbm_h_uses_prototypes='undef'
-d_nice='undef'
-d_nl_langinfo='undef'
-d_nv_preserves_uv='define'
-d_nv_zero_is_allbits_zero='define'
-d_off64_t='undef'
-d_old_pthread_create_joinable='undef'
-d_oldpthreads='undef'
-d_oldsock='undef'
-d_open3='undef'
-d_pathconf='undef'
-d_pause='define'
-d_perl_otherlibdirs='undef'
-d_phostname='undef'
-d_pipe='define'
-d_poll='undef'
-d_portable='define'
-d_prctl='undef'
-d_prctl_set_name='undef'
-d_printf_format_null='undef'
-d_procselfexe='undef'
-d_pseudofork='undef'
-d_pthread_atfork='undef'
-d_pthread_attr_setscope='undef'
-d_pthread_yield='undef'
-d_pwage='undef'
-d_pwchange='undef'
-d_pwclass='undef'
-d_pwcomment='undef'
-d_pwexpire='undef'
-d_pwgecos='undef'
-d_pwpasswd='undef'
-d_pwquota='undef'
-d_qgcvt='undef'
-d_quad='define'
-d_random_r='undef'
-d_readdir64_r='undef'
-d_readdir='define'
-d_readdir_r='undef'
-d_readlink='undef'
-d_readv='undef'
-d_recvmsg='undef'
-d_rename='define'
-d_rewinddir='define'
-d_rmdir='define'
-d_safebcpy='undef'
-d_safemcpy='undef'
-d_sanemcmp='define'
-d_sbrkproto='undef'
-d_scalbnl='undef'
-d_sched_yield='undef'
-d_scm_rights='undef'
-d_seekdir='define'
-d_select='define'
-d_sem='undef'
-d_semctl='undef'
-d_semctl_semid_ds='undef'
-d_semctl_semun='undef'
-d_semget='undef'
-d_semop='undef'
-d_sendmsg='undef'
-d_setegid='undef'
-d_seteuid='undef'
-d_setgrent='undef'
-d_setgrent_r='undef'
-d_setgrps='undef'
-d_sethent='undef'
-d_sethostent_r='undef'
-d_setitimer='undef'
-d_setlinebuf='undef'
-d_setlocale='define'
-d_setlocale_r='undef'
-d_setnent='undef'
-d_setnetent_r='undef'
-d_setpent='undef'
-d_setpgid='undef'
-d_setpgrp2='undef'
-d_setpgrp='undef'
-d_setprior='undef'
-d_setproctitle='undef'
-d_setprotoent_r='undef'
-d_setpwent='undef'
-d_setpwent_r='undef'
-d_setregid='undef'
-d_setresgid='undef'
-d_setresuid='undef'
-d_setreuid='undef'
-d_setrgid='undef'
-d_setruid='undef'
-d_setsent='undef'
-d_setservent_r='undef'
-d_setsid='undef'
-d_setvbuf='define'
-d_sfio='undef'
-d_shm='undef'
-d_shmat='undef'
-d_shmatprototype='undef'
-d_shmctl='undef'
-d_shmdt='undef'
-d_shmget='undef'
-d_sigaction='undef'
-d_signbit='undef'
-d_sigprocmask='undef'
-d_sigsetjmp='undef'
-d_sin6_scope_id='define'
-d_sitearch='define'
-d_snprintf='define'
-d_sockaddr_sa_len='undef'
-d_sockatmark='undef'
-d_sockatmarkproto='undef'
-d_socket='define'
-d_socklen_t='undef'
-d_sockpair='undef'
-d_socks5_init='undef'
-d_sprintf_returns_strlen='define'
-d_sqrtl='undef'
-d_srand48_r='undef'
-d_srandom_r='undef'
-d_sresgproto='undef'
-d_sresuproto='undef'
-d_statblks='undef'
-d_static_inline='undef'
-d_statfs_f_flags='undef'
-d_statfs_s='undef'
-d_statvfs='undef'
-d_stdio_cnt_lval='define'
-d_stdio_ptr_lval='define'
-d_stdio_ptr_lval_nochange_cnt='define'
-d_stdio_ptr_lval_sets_cnt='undef'
-d_stdio_stream_array='undef'
-d_stdiobase='define'
-d_stdstdio='define'
-d_strchr='define'
-d_strcoll='define'
-d_strctcpy='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
-d_strerror_r='undef'
-d_strftime='define'
-d_strlcat='undef'
-d_strlcpy='undef'
-d_strtod='define'
-d_strtol='define'
-d_strtold='undef'
-d_strtoll='undef'
-d_strtoq='undef'
-d_strtoul='define'
-d_strtoull='undef'
-d_strtouq='undef'
-d_strxfrm='define'
-d_suidsafe='undef'
-d_symlink='undef'
-d_syscall='undef'
-d_syscallproto='undef'
-d_sysconf='undef'
-d_sysernlst=''
-d_syserrlst='define'
-d_system='define'
-d_tcgetpgrp='undef'
-d_tcsetpgrp='undef'
-d_telldir='define'
-d_telldirproto='define'
-d_time='define'
-d_timegm='undef'
-d_times='define'
-d_tm_tm_gmtoff='undef'
-d_tm_tm_zone='undef'
-d_tmpnam_r='undef'
-d_truncate='undef'
-d_ttyname_r='undef'
-d_tzname='define'
-d_u32align='define'
-d_ualarm='undef'
-d_umask='define'
-d_uname='define'
-d_union_semun='define'
-d_unordered='undef'
-d_unsetenv='undef'
-d_usleep='undef'
-d_usleepproto='undef'
-d_ustat='undef'
-d_vendorarch='undef'
-d_vendorbin='undef'
-d_vendorlib='undef'
-d_vendorscript='undef'
-d_vfork='undef'
-d_void_closedir='undef'
-d_voidsig='define'
-d_voidtty=''
-d_volatile='define'
-d_vprintf='define'
-d_vsnprintf='define'
-d_wait4='undef'
-d_waitpid='define'
-d_wcstombs='define'
-d_wctomb='define'
-d_writev='undef'
-d_xenix='undef'
-date='date'
-db_hashtype='int'
-db_prefixtype='int'
-db_version_major='0'
-db_version_minor='0'
-db_version_patch='0'
-defvoidused='15'
-direntrytype='struct direct'
-dlext='dll'
-dlsrc='dl_win32.xs'
-doublesize='8'
-drand01='(rand()/(double)((unsigned)1<<RANDBITS))'
-drand48_r_proto='0'
-dtrace=''
-dynamic_ext='Socket IO Fcntl Opcode SDBM_File attributes'
-eagain='EAGAIN'
-ebcdic='undef'
-echo='echo'
-egrep='egrep'
-emacs=''
-endgrent_r_proto='0'
-endhostent_r_proto='0'
-endnetent_r_proto='0'
-endprotoent_r_proto='0'
-endpwent_r_proto='0'
-endservent_r_proto='0'
-eunicefix=':'
-exe_ext='.exe'
-expr='expr'
-extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
-extern_C='extern'
-extras=''
-fflushNULL='define'
-fflushall='undef'
-find='find'
-firstmakefile='makefile'
-flex=''
-fpossize='4'
-fpostype='fpos_t'
-freetype='void'
-from=':'
-full_ar=''
-full_csh=''
-full_sed=''
-gccansipedantic=''
-gccosandvers=''
-gccversion=''
-getgrent_r_proto='0'
-getgrgid_r_proto='0'
-getgrnam_r_proto='0'
-gethostbyaddr_r_proto='0'
-gethostbyname_r_proto='0'
-gethostent_r_proto='0'
-getlogin_r_proto='0'
-getnetbyaddr_r_proto='0'
-getnetbyname_r_proto='0'
-getnetent_r_proto='0'
-getprotobyname_r_proto='0'
-getprotobynumber_r_proto='0'
-getprotoent_r_proto='0'
-getpwent_r_proto='0'
-getpwnam_r_proto='0'
-getpwuid_r_proto='0'
-getservbyname_r_proto='0'
-getservbyport_r_proto='0'
-getservent_r_proto='0'
-getspnam_r_proto='0'
-gidformat='"d"'
-gidsign='-1'
-gidsize='4'
-gidtype='gid_t'
-glibpth='/usr/shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib /usr/shlib '
-gmake='gmake'
-gmtime_r_proto='0'
-gnulibc_version=''
-grep='grep'
-groupcat=''
-groupstype='gid_t'
-gzip='gzip'
-h_fcntl='false'
-h_sysfile='true'
-hint='recommended'
-hostcat='ypcat hosts'
-html1dir=' '
-html1direxp=''
-html3dir=' '
-html3direxp=''
-i16size='2'
-i16type='short'
-i32size='4'
-i32type='long'
-i64size='8'
-i64type='__int64'
-i8size='1'
-i8type='char'
-i_arpainet='define'
-i_assert='define'
-i_bsdioctl=''
-i_crypt='undef'
-i_db='undef'
-i_dbm='undef'
-i_dirent='define'
-i_dld='undef'
-i_dlfcn='define'
-i_fcntl='define'
-i_float='define'
-i_fp='undef'
-i_fp_class='undef'
-i_gdbm='undef'
-i_gdbm_ndbm='undef'
-i_gdbmndbm='undef'
-i_grp='undef'
-i_ieeefp='undef'
-i_inttypes='undef'
-i_langinfo='undef'
-i_libutil='undef'
-i_limits='define'
-i_locale='define'
-i_machcthr='undef'
-i_malloc='define'
-i_mallocmalloc='undef'
-i_math='define'
-i_memory='undef'
-i_mntent='undef'
-i_ndbm='undef'
-i_netdb='undef'
-i_neterrno='undef'
-i_netinettcp='undef'
-i_niin='undef'
-i_poll='undef'
-i_prot='undef'
-i_pthread='undef'
-i_pwd='undef'
-i_rpcsvcdbm='define'
-i_sfio='undef'
-i_sgtty='undef'
-i_shadow='undef'
-i_socks='undef'
-i_stdarg='define'
-i_stddef='define'
-i_stdlib='define'
-i_string='define'
-i_sunmath='undef'
-i_sysaccess='undef'
-i_sysdir='undef'
-i_sysfile='undef'
-i_sysfilio='define'
-i_sysin='undef'
-i_sysioctl='undef'
-i_syslog='undef'
-i_sysmman='undef'
-i_sysmode='undef'
-i_sysmount='undef'
-i_sysndir='undef'
-i_sysparam='undef'
-i_syspoll='undef'
-i_sysresrc='undef'
-i_syssecrt='undef'
-i_sysselct='undef'
-i_syssockio='undef'
-i_sysstat='define'
-i_sysstatfs='undef'
-i_sysstatvfs='undef'
-i_systime='undef'
-i_systimek='undef'
-i_systimes='undef'
-i_systypes='define'
-i_sysuio='undef'
-i_sysun='undef'
-i_sysutsname='undef'
-i_sysvfs='undef'
-i_syswait='undef'
-i_termio='undef'
-i_termios='undef'
-i_time='define'
-i_unistd='undef'
-i_ustat='undef'
-i_utime='define'
-i_values='undef'
-i_varargs='undef'
-i_varhdr='varargs.h'
-i_vfork='undef'
-ignore_versioned_solibs=''
-inc_version_list=''
-inc_version_list_init='0'
-incpath=''
-inews=''
-initialinstalllocation=''
-installarchlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~'
-installbin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-installhtml1dir=''
-installhtml3dir=''
-installhtmldir='~INST_TOP~~INST_VER~\html'
-installhtmlhelpdir='~INST_TOP~~INST_VER~\htmlhelp'
-installman1dir='~INST_TOP~~INST_VER~\man\man1'
-installman3dir='~INST_TOP~~INST_VER~\man\man3'
-installprefix='~INST_TOP~~INST_VER~'
-installprefixexp='~INST_TOP~~INST_VER~'
-installprivlib='~INST_TOP~~INST_VER~\lib'
-installscript='~INST_TOP~~INST_VER~\bin'
-installsitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
-installsitebin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-installsitehtml1dir=''
-installsitehtml3dir=''
-installsitelib='~INST_TOP~\site~INST_VER~\lib'
-installsiteman1dir=''
-installsiteman3dir=''
-installsitescript=''
-installstyle='lib'
-installusrbinperl='undef'
-installvendorarch=''
-installvendorbin=''
-installvendorhtml1dir=''
-installvendorhtml3dir=''
-installvendorlib=''
-installvendorman1dir=''
-installvendorman3dir=''
-installvendorscript=''
-intsize='4'
-issymlink=''
-ivdformat='"ld"'
-ivsize='4'
-ivtype='long'
-known_extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
-ksh=''
-ld='tlink32'
-lddlflags='-Tpd ~LINK_FLAGS~'
-ldflags='~LINK_FLAGS~'
-ldflags_uselargefiles=''
-ldlibpthname=''
-less='less'
-lib_ext='.lib'
-libc='cw32mti.lib'
-libperl='perl.lib'
-libpth=''
-libs=''
-libsdirs=''
-libsfiles=''
-libsfound=''
-libspath=''
-libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
-libswanted_uselargefiles='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
-line='line'
-lint=''
-lkflags=''
-ln=''
-lns='copy'
-localtime_r_proto='0'
-locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
-loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
-longdblsize='10'
-longlongsize='8'
-longsize='4'
-lp=''
-lpr=''
-ls='dir'
-lseeksize='4'
-lseektype='long'
-mad='undef'
-madlyh=''
-madlyobj=''
-madlysrc=''
-mail=''
-mailx=''
-make='dmake'
-make_set_make='#'
-mallocobj='malloc.o'
-mallocsrc='malloc.c'
-malloctype='void *'
-man1dir='~INST_TOP~~INST_VER~\man\man1'
-man1direxp='~INST_TOP~~INST_VER~\man\man1'
-man1ext='1'
-man3dir='~INST_TOP~~INST_VER~\man\man3'
-man3direxp='~INST_TOP~~INST_VER~\man\man3'
-man3ext='3'
-mips_type=''
-mistrustnm=''
-mkdir='mkdir'
-mmaptype='void *'
-modetype='mode_t'
-more='more /e'
-multiarch='undef'
-mv=''
-myarchname='MSWin32'
-mydomain=''
-myhostname=''
-myuname=''
-n='-n'
-need_va_copy='undef'
-netdb_hlen_type='int'
-netdb_host_type='char *'
-netdb_name_type='char *'
-netdb_net_type='long'
-nm=''
-nm_opt=''
-nm_so_opt=''
-nonxs_ext='Errno'
-nroff=''
-nvEUformat='"E"'
-nvFUformat='"F"'
-nvGUformat='"G"'
-nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
-nv_preserves_uv_bits='32'
-nveformat='"e"'
-nvfformat='"f"'
-nvgformat='"g"'
-nvsize='8'
-nvtype='double'
-o_nonblock='O_NONBLOCK'
-obj_ext='.obj'
-old_pthread_create_joinable=''
-optimize='-O2'
-orderlib='false'
-osname='MSWin32'
-osvers='4.0'
-otherlibdirs=''
-package='perl5'
-pager='more /e'
-passcat=''
-patchlevel='~PERL_VERSION~'
-path_sep=';'
-perl5=''
-perl='perl'
-perl_patchlevel='~PERL_PATCHLEVEL~'
-perladmin=''
-perllibs='~libs~'
-perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe'
-perl_static_inline='static'
-pg=''
-phostname='hostname'
-pidtype='int'
-plibpth=''
-pmake=''
-pr=''
-prefix='~INST_TOP~'
-prefixexp='~INST_TOP~'
-privlib='~INST_TOP~~INST_VER~\lib'
-privlibexp='~INST_TOP~~INST_VER~\lib'
-procselfexe=''
-prototype='define'
-ptrsize='4'
-quadkind='5'
-quadtype='__int64'
-randbits='15'
-randfunc='rand'
-random_r_proto='0'
-randseedtype='unsigned'
-ranlib='rem'
-rd_nodata='-1'
-readdir64_r_proto='0'
-readdir_r_proto='0'
-revision='5'
-rm='del'
-rm_try=''
-rmail=''
-run=''
-runnm='true'
-sGMTIME_max="2147483647"
-sGMTIME_min="0"
-sLOCALTIME_max="2147483647"
-sLOCALTIME_min="0"
-sPRIEUldbl='"E"'
-sPRIFUldbl='"F"'
-sPRIGUldbl='"G"'
-sPRIXU64='"lX"'
-sPRId64='"ld"'
-sPRIeldbl='"Le"'
-sPRIfldbl='"Lf"'
-sPRIgldbl='"Lg"'
-sPRIi64='"li"'
-sPRIo64='"lo"'
-sPRIu64='"lu"'
-sPRIx64='"lx"'
-sSCNfldbl='"Lf"'
-sched_yield=''
-scriptdir='~INST_TOP~~INST_VER~\bin'
-scriptdirexp='~INST_TOP~~INST_VER~\bin'
-sed='sed'
-seedfunc='srand'
-selectminbits='32'
-selecttype='Perl_fd_set *'
-sendmail='blat'
-setgrent_r_proto='0'
-sethostent_r_proto='0'
-setlocale_r_proto='0'
-setnetent_r_proto='0'
-setprotoent_r_proto='0'
-setpwent_r_proto='0'
-setservent_r_proto='0'
-sh='cmd /x /c'
-shar=''
-sharpbang='#!'
-shmattype='void *'
-shortsize='2'
-shrpenv=''
-shsharp='true'
-sig_count='26'
-sig_name='ZERO HUP INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM USR1 USR2 CHLD NUM19 USR3 BREAK ABRT STOP NUM24 CONT CLD'
-sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "NUM19", "USR3", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
-sig_num='0 1 2 21 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 18'
-sig_num_init='0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 18, 0'
-sig_size='27'
-signal_t='void'
-sitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
-sitearchexp='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
-sitebin='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~'
-sitebinexp='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~'
-sitehtml1dir=''
-sitehtml1direxp=''
-sitehtml3dir=''
-sitehtml3direxp=''
-sitelib='~INST_TOP~\site~INST_VER~\lib'
-sitelib_stem=''
-sitelibexp='~INST_TOP~\site~INST_VER~\lib'
-siteman1dir=''
-siteman1direxp=''
-siteman3dir=''
-siteman3direxp=''
-siteprefix='~INST_TOP~\site~INST_VER~'
-siteprefixexp='~INST_TOP~\site~INST_VER~'
-sitescript=''
-sitescriptexp=''
-sizesize='4'
-sizetype='size_t'
-sleep=''
-smail=''
-so='dll'
-sockethdr=''
-socketlib=''
-socksizetype='int'
-sort='sort'
-spackage='Perl5'
-spitshell=''
-srand48_r_proto='0'
-srandom_r_proto='0'
-src=''
-ssizetype='int'
-startperl='#!perl'
-startsh='#!/bin/sh'
-static_ext=' '
-stdchar='unsigned char'
-stdio_base='((fp)->buffer)'
-stdio_bufsiz='((fp)->level + (fp)->curp - (fp)->buffer)'
-stdio_cnt='((fp)->level)'
-stdio_filbuf=''
-stdio_ptr='((fp)->curp)'
-stdio_stream_array=''
-strerror_r_proto='0'
-strings='/usr/include/string.h'
-submit=''
-subversion='~SUBVERSION~'
-sysman='/usr/man/man1'
-tail=''
-tar=''
-targetarch=''
-tbl=''
-tee=''
-test=''
-timeincl='/usr/include/sys/time.h '
-timetype='time_t'
-tmpnam_r_proto='0'
-to=':'
-touch='touch'
-tr=''
-trnl='\012'
-troff=''
-ttyname_r_proto='0'
-u16size='2'
-u16type='unsigned short'
-u32size='4'
-u32type='unsigned long'
-u64size='8'
-u64type='unsigned __int64'
-u8size='1'
-u8type='unsigned char'
-uidformat='"d"'
-uidsign='-1'
-uidsize='4'
-uidtype='uid_t'
-uname='uname'
-uniq='uniq'
-uquadtype='unsigned __int64'
-use5005threads='undef'
-use64bitall='undef'
-use64bitint='undef'
-usecrosscompile='undef'
-usedevel='undef'
-usedl='define'
-usedtrace='undef'
-usefaststdio='undef'
-useithreads='undef'
-uselargefiles='undef'
-uselongdouble='undef'
-usemallocwrap='define'
-usemorebits='undef'
-usemultiplicity='undef'
-usemymalloc='n'
-usenm='false'
-useopcode='true'
-useperlio='undef'
-useposix='true'
-usereentrant='undef'
-userelocatableinc='undef'
-usesfio='false'
-useshrplib='true'
-usesitecustomize='undef'
-usesocks='undef'
-usethreads='undef'
-usevendorprefix='undef'
-usevfork='false'
-usrinc='/usr/include'
-uuname=''
-uvXUformat='"lX"'
-uvoformat='"lo"'
-uvsize='4'
-uvtype='unsigned long'
-uvuformat='"lu"'
-uvxformat='"lx"'
-vaproto='undef'
-vendorarch=''
-vendorarchexp=''
-vendorbin=''
-vendorbinexp=''
-vendorhtml1dir=' '
-vendorhtml1direxp=''
-vendorhtml3dir=' '
-vendorhtml3direxp=''
-vendorlib=''
-vendorlib_stem=''
-vendorlibexp=''
-vendorman1dir=' '
-vendorman1direxp=''
-vendorman3dir=' '
-vendorman3direxp=''
-vendorprefix=''
-vendorprefixexp=''
-vendorscript=''
-vendorscriptexp=''
-version='~VERSION~'
-version_patchlevel_string=''
-versiononly='undef'
-vi=''
-voidflags='15'
-xlibpth='/usr/lib/386 /lib/386'
-yacc='yacc'
-yaccflags=''
-zcat=''
-zip='zip'
-PERL_REVISION='~PERL_REVISION~'
-PERL_SUBVERSION='~PERL_SUBVERSION~'
-PERL_VERSION='~PERL_VERSION~'
-PERL_API_REVISION='~PERL_API_REVISION~'
-PERL_API_SUBVERSION='~PERL_API_SUBVERSION~'
-PERL_API_VERSION='~PERL_API_VERSION~'
-PERL_PATCHLEVEL='~PERL_PATCHLEVEL~'
-PERL_CONFIG_SH='true'
Deleted: vendor/perl/dist/win32/config.gc64
===================================================================
--- vendor/perl/dist/win32/config.gc64 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/config.gc64 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1085 +0,0 @@
-## Configured by: ~cf_email~
-## Target system: WIN32
-Author=''
-Date='$Date'
-Header=''
-Id='$Id'
-Locker=''
-Log='$Log'
-RCSfile='$RCSfile'
-Revision='$Revision'
-Source=''
-State=''
-_a='.a'
-_exe='.exe'
-_o='.o'
-afs='false'
-afsroot='/afs'
-alignbytes='8'
-ansi2knr=''
-aphostname=''
-api_revision='~PERL_API_REVISION~'
-api_subversion='~PERL_API_SUBVERSION~'
-api_version='~PERL_API_VERSION~'
-api_versionstring='~PERL_API_REVISION~.~PERL_API_VERSION~.~PERL_API_SUBVERSION~'
-ar='x86_64-w64-mingw32-ar'
-archlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~'
-archlibexp='~INST_TOP~~INST_VER~\lib~INST_ARCH~'
-archname64=''
-archname='MSWin32'
-archobjs=''
-asctime_r_proto='0'
-awk='awk'
-baserev='5'
-bash=''
-bin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-binexp='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-bison=''
-byacc='byacc'
-byteorder='1234'
-c=''
-castflags='0'
-cat='type'
-cc='x86_64-w64-mingw32-gcc'
-cccdlflags=' '
-ccdlflags=' '
-ccflags='-MD -DWIN32'
-ccflags_uselargefiles=''
-ccname='~cc~'
-ccsymbols=''
-ccversion=''
-cf_by='nobody'
-cf_email='nobody at no.where.net'
-cf_time=''
-charbits='8'
-chgrp=''
-chmod=''
-chown=''
-clocktype='clock_t'
-comm=''
-compress=''
-contains='grep'
-cp='copy'
-cpio=''
-cpp='~cc~ -E'
-cpp_stuff='42'
-cppccsymbols=''
-cppflags='-DWIN32'
-cpplast=''
-cppminus='-'
-cpprun='~cc~ -E'
-cppstdin='~cc~ -E'
-cppsymbols=''
-crypt_r_proto='0'
-cryptlib=''
-csh='undef'
-ctermid_r_proto='0'
-ctime_r_proto='0'
-d_Gconvert='sprintf((b),"%.*g",(n),(x))'
-d_PRIEUldbl='undef'
-d_PRIFUldbl='undef'
-d_PRIGUldbl='undef'
-d_PRIXU64='undef'
-d_PRId64='undef'
-d_PRIeldbl='undef'
-d_PRIfldbl='undef'
-d_PRIgldbl='undef'
-d_PRIi64='undef'
-d_PRIo64='undef'
-d_PRIu64='undef'
-d_PRIx64='undef'
-d_SCNfldbl='undef'
-d__fwalk='undef'
-d_access='define'
-d_accessx='undef'
-d_aintl='undef'
-d_alarm='define'
-d_archlib='define'
-d_asctime64='undef'
-d_asctime_r='undef'
-d_atolf='undef'
-d_atoll='define'
-d_attribute_deprecated='undef'
-d_attribute_format='undef'
-d_attribute_malloc='undef'
-d_attribute_nonnull='undef'
-d_attribute_noreturn='undef'
-d_attribute_pure='undef'
-d_attribute_unused='undef'
-d_attribute_warn_unused_result='undef'
-d_bcmp='undef'
-d_bcopy='undef'
-d_bsd='define'
-d_bsdgetpgrp='undef'
-d_bsdsetpgrp='undef'
-d_builtin_choose_expr='undef'
-d_builtin_expect='undef'
-d_bzero='undef'
-d_c99_variadic_macros='undef'
-d_casti32='define'
-d_castneg='define'
-d_charvspr='undef'
-d_chown='undef'
-d_chroot='undef'
-d_chsize='define'
-d_class='undef'
-d_clearenv='undef'
-d_closedir='define'
-d_cmsghdr_s='undef'
-d_const='define'
-d_copysignl='undef'
-d_cplusplus='undef'
-d_crypt='define'
-d_crypt_r='undef'
-d_csh='undef'
-d_ctermid='undef'
-d_ctermid_r='undef'
-d_ctime64='undef'
-d_ctime_r='undef'
-d_cuserid='undef'
-d_dbl_dig='define'
-d_dbminitproto='undef'
-d_difftime64='undef'
-d_difftime='define'
-d_dir_dd_fd='undef'
-d_dirfd='undef'
-d_dirnamlen='define'
-d_dlerror='define'
-d_dlopen='define'
-d_dlsymun='undef'
-d_dosuid='undef'
-d_drand48_r='undef'
-d_drand48proto='undef'
-d_dup2='define'
-d_eaccess='undef'
-d_endgrent='undef'
-d_endgrent_r='undef'
-d_endhent='undef'
-d_endhostent_r='undef'
-d_endnent='undef'
-d_endnetent_r='undef'
-d_endpent='undef'
-d_endprotoent_r='undef'
-d_endpwent='undef'
-d_endpwent_r='undef'
-d_endsent='undef'
-d_endservent_r='undef'
-d_eofnblk='define'
-d_eunice='undef'
-d_faststdio='define'
-d_fchdir='undef'
-d_fchmod='undef'
-d_fchown='undef'
-d_fcntl_can_lock='undef'
-d_fcntl='undef'
-d_fd_macros='define'
-d_fd_set='define'
-d_fds_bits='define'
-d_fgetpos='define'
-d_finitel='undef'
-d_finite='undef'
-d_flexfnam='define'
-d_flock='define'
-d_flockproto='define'
-d_fork='undef'
-d_fp_class='undef'
-d_fpathconf='undef'
-d_fpclass='undef'
-d_fpclassify='undef'
-d_fpclassl='undef'
-d_fpos64_t='undef'
-d_frexpl='undef'
-d_fs_data_s='undef'
-d_fseeko='undef'
-d_fsetpos='define'
-d_fstatfs='undef'
-d_fstatvfs='undef'
-d_fsync='undef'
-d_ftello='undef'
-d_ftime='define'
-d_futimes='undef'
-d_gdbm_ndbm_h_uses_prototypes='undef'
-d_gdbmndbm_h_uses_prototypes='undef'
-d_getaddrinfo='undef'
-d_getcwd='define'
-d_getespwnam='undef'
-d_getfsstat='undef'
-d_getgrent='undef'
-d_getgrent_r='undef'
-d_getgrgid_r='undef'
-d_getgrnam_r='undef'
-d_getgrps='undef'
-d_gethbyaddr='define'
-d_gethbyname='define'
-d_gethent='undef'
-d_gethname='define'
-d_gethostbyaddr_r='undef'
-d_gethostbyname_r='undef'
-d_gethostent_r='undef'
-d_gethostprotos='define'
-d_getitimer='undef'
-d_getlogin='define'
-d_getlogin_r='undef'
-d_getmnt='undef'
-d_getmntent='undef'
-d_getnameinfo='undef'
-d_getnbyaddr='undef'
-d_getnbyname='undef'
-d_getnent='undef'
-d_getnetbyaddr_r='undef'
-d_getnetbyname_r='undef'
-d_getnetent_r='undef'
-d_getnetprotos='undef'
-d_getpagsz='undef'
-d_getpbyname='define'
-d_getpbynumber='define'
-d_getpent='undef'
-d_getpgid='undef'
-d_getpgrp2='undef'
-d_getpgrp='undef'
-d_getppid='undef'
-d_getprior='undef'
-d_getprotobyname_r='undef'
-d_getprotobynumber_r='undef'
-d_getprotoent_r='undef'
-d_getprotoprotos='define'
-d_getprpwnam='undef'
-d_getpwent='undef'
-d_getpwent_r='undef'
-d_getpwnam_r='undef'
-d_getpwuid_r='undef'
-d_getsbyname='define'
-d_getsbyport='define'
-d_getsent='undef'
-d_getservbyname_r='undef'
-d_getservbyport_r='undef'
-d_getservent_r='undef'
-d_getservprotos='define'
-d_getspnam='undef'
-d_getspnam_r='undef'
-d_gettimeod='define'
-d_gmtime64='undef'
-d_gmtime_r='undef'
-d_gnulibc='undef'
-d_grpasswd='undef'
-d_hasmntopt='undef'
-d_htonl='define'
-d_ilogbl='undef'
-d_inc_version_list='undef'
-d_index='undef'
-d_inetaton='undef'
-d_inetntop='undef'
-d_inetpton='undef'
-d_int64_t='undef'
-d_isascii='define'
-d_isfinite='undef'
-d_isinf='undef'
-d_isnan='define'
-d_isnanl='undef'
-d_killpg='define'
-d_lchown='undef'
-d_ldbl_dig='define'
-d_libm_lib_version='undef'
-d_link='define'
-d_localtime64='undef'
-d_localtime_r='undef'
-d_localtime_r_needs_tzset='undef'
-d_locconv='define'
-d_lockf='undef'
-d_longdbl='define'
-d_longlong='define'
-d_lseekproto='define'
-d_lstat='undef'
-d_madvise='undef'
-d_malloc_good_size='undef'
-d_malloc_size='undef'
-d_mblen='define'
-d_mbstowcs='define'
-d_mbtowc='define'
-d_memchr='define'
-d_memcmp='define'
-d_memcpy='define'
-d_memmove='define'
-d_memset='define'
-d_mkdir='define'
-d_mkdtemp='undef'
-d_mkfifo='undef'
-d_mkstemp='undef'
-d_mkstemps='undef'
-d_mktime64='undef'
-d_mktime='define'
-d_mmap='undef'
-d_modfl='undef'
-d_modfl_pow32_bug='undef'
-d_modflproto='undef'
-d_mprotect='undef'
-d_msgctl='undef'
-d_msg_ctrunc='undef'
-d_msg_dontroute='undef'
-d_msgget='undef'
-d_msghdr_s='undef'
-d_msg_oob='undef'
-d_msg_peek='undef'
-d_msg_proxy='undef'
-d_msgrcv='undef'
-d_msgsnd='undef'
-d_msg='undef'
-d_msync='undef'
-d_munmap='undef'
-d_mymalloc='undef'
-d_ndbm='undef'
-d_ndbm_h_uses_prototypes='undef'
-d_nice='undef'
-d_nl_langinfo='undef'
-d_nv_preserves_uv='undef'
-d_nv_zero_is_allbits_zero='define'
-d_off64_t='undef'
-d_old_pthread_create_joinable='undef'
-d_oldpthreads='undef'
-d_oldsock='undef'
-d_open3='undef'
-d_pathconf='undef'
-d_pause='define'
-d_perl_otherlibdirs='undef'
-d_phostname='undef'
-d_pipe='define'
-d_poll='undef'
-d_portable='define'
-d_prctl='undef'
-d_prctl_set_name='undef'
-d_printf_format_null='undef'
-d_procselfexe='undef'
-d_pseudofork='undef'
-d_pthread_atfork='undef'
-d_pthread_attr_setscope='undef'
-d_pthread_yield='undef'
-d_pwage='undef'
-d_pwchange='undef'
-d_pwclass='undef'
-d_pwcomment='undef'
-d_pwexpire='undef'
-d_pwgecos='undef'
-d_pwpasswd='undef'
-d_pwquota='undef'
-d_qgcvt='undef'
-d_quad='define'
-d_random_r='undef'
-d_readdir64_r='undef'
-d_readdir='define'
-d_readdir_r='undef'
-d_readlink='undef'
-d_readv='undef'
-d_recvmsg='undef'
-d_rename='define'
-d_rewinddir='define'
-d_rmdir='define'
-d_safebcpy='undef'
-d_safemcpy='undef'
-d_sanemcmp='define'
-d_sbrkproto='undef'
-d_scalbnl='undef'
-d_sched_yield='undef'
-d_scm_rights='undef'
-d_seekdir='define'
-d_select='define'
-d_sem='undef'
-d_semctl='undef'
-d_semctl_semid_ds='undef'
-d_semctl_semun='undef'
-d_semget='undef'
-d_semop='undef'
-d_sendmsg='undef'
-d_setegid='undef'
-d_seteuid='undef'
-d_setgrent='undef'
-d_setgrent_r='undef'
-d_setgrps='undef'
-d_sethent='undef'
-d_sethostent_r='undef'
-d_setitimer='undef'
-d_setlinebuf='undef'
-d_setlocale='define'
-d_setlocale_r='undef'
-d_setnent='undef'
-d_setnetent_r='undef'
-d_setpent='undef'
-d_setpgid='undef'
-d_setpgrp2='undef'
-d_setpgrp='undef'
-d_setprior='undef'
-d_setproctitle='undef'
-d_setprotoent_r='undef'
-d_setpwent='undef'
-d_setpwent_r='undef'
-d_setregid='undef'
-d_setresgid='undef'
-d_setresuid='undef'
-d_setreuid='undef'
-d_setrgid='undef'
-d_setruid='undef'
-d_setsent='undef'
-d_setservent_r='undef'
-d_setsid='undef'
-d_setvbuf='define'
-d_sfio='undef'
-d_shm='undef'
-d_shmat='undef'
-d_shmatprototype='undef'
-d_shmctl='undef'
-d_shmdt='undef'
-d_shmget='undef'
-d_sigaction='undef'
-d_signbit='undef'
-d_sigprocmask='undef'
-d_sigsetjmp='undef'
-d_sin6_scope_id='define'
-d_sitearch='define'
-d_snprintf='define'
-d_sockaddr_sa_len='undef'
-d_sockatmark='undef'
-d_sockatmarkproto='undef'
-d_socket='define'
-d_socklen_t='undef'
-d_sockpair='undef'
-d_socks5_init='undef'
-d_sprintf_returns_strlen='define'
-d_sqrtl='undef'
-d_srand48_r='undef'
-d_srandom_r='undef'
-d_sresgproto='undef'
-d_sresuproto='undef'
-d_statblks='undef'
-d_static_inline='define'
-d_statfs_f_flags='undef'
-d_statfs_s='undef'
-d_statvfs='undef'
-d_stdio_cnt_lval='define'
-d_stdio_ptr_lval='define'
-d_stdio_ptr_lval_nochange_cnt='define'
-d_stdio_ptr_lval_sets_cnt='undef'
-d_stdio_stream_array='undef'
-d_stdiobase='define'
-d_stdstdio='define'
-d_strchr='define'
-d_strcoll='define'
-d_strctcpy='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
-d_strerror_r='undef'
-d_strftime='define'
-d_strlcat='undef'
-d_strlcpy='undef'
-d_strtod='define'
-d_strtol='define'
-d_strtold='undef'
-d_strtoll='define'
-d_strtoq='undef'
-d_strtoul='define'
-d_strtoull='define'
-d_strtouq='undef'
-d_strxfrm='define'
-d_suidsafe='undef'
-d_symlink='undef'
-d_syscall='undef'
-d_syscallproto='undef'
-d_sysconf='undef'
-d_sysernlst=''
-d_syserrlst='define'
-d_system='define'
-d_tcgetpgrp='undef'
-d_tcsetpgrp='undef'
-d_telldir='define'
-d_telldirproto='define'
-d_time='define'
-d_timegm='undef'
-d_times='define'
-d_tm_tm_gmtoff='undef'
-d_tm_tm_zone='undef'
-d_tmpnam_r='undef'
-d_truncate='undef'
-d_ttyname_r='undef'
-d_tzname='define'
-d_u32align='define'
-d_ualarm='undef'
-d_umask='define'
-d_uname='define'
-d_union_semun='define'
-d_unordered='undef'
-d_unsetenv='undef'
-d_usleep='undef'
-d_usleepproto='undef'
-d_ustat='undef'
-d_vendorarch='undef'
-d_vendorbin='undef'
-d_vendorlib='undef'
-d_vendorscript='undef'
-d_vfork='undef'
-d_void_closedir='undef'
-d_voidsig='define'
-d_voidtty=''
-d_volatile='define'
-d_vprintf='define'
-d_vsnprintf='define'
-d_wait4='undef'
-d_waitpid='define'
-d_wcstombs='define'
-d_wctomb='define'
-d_writev='undef'
-d_xenix='undef'
-date='date'
-db_hashtype='int'
-db_prefixtype='int'
-db_version_major='0'
-db_version_minor='0'
-db_version_patch='0'
-defvoidused='15'
-direntrytype='struct direct'
-dlext='dll'
-dlltool='x86_64-w64-mingw32-dlltool'
-dlsrc='dl_win32.xs'
-doublesize='8'
-drand01='(rand()/(double)((unsigned)1<<RANDBITS))'
-drand48_r_proto='0'
-dtrace=''
-dynamic_ext='Socket IO Fcntl Opcode SDBM_File attributes'
-eagain='EAGAIN'
-ebcdic='undef'
-echo='echo'
-egrep='egrep'
-emacs=''
-endgrent_r_proto='0'
-endhostent_r_proto='0'
-endnetent_r_proto='0'
-endprotoent_r_proto='0'
-endpwent_r_proto='0'
-endservent_r_proto='0'
-eunicefix=':'
-exe_ext='.exe'
-expr='expr'
-extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
-extern_C='extern'
-extras=''
-fflushNULL='define'
-fflushall='undef'
-find='find'
-firstmakefile='makefile'
-flex=''
-fpossize='8'
-fpostype='fpos_t'
-freetype='void'
-from=':'
-full_ar=''
-full_csh=''
-full_sed=''
-gccansipedantic=''
-gccosandvers=''
-gccversion=''
-getgrent_r_proto='0'
-getgrgid_r_proto='0'
-getgrnam_r_proto='0'
-gethostbyaddr_r_proto='0'
-gethostbyname_r_proto='0'
-gethostent_r_proto='0'
-getlogin_r_proto='0'
-getnetbyaddr_r_proto='0'
-getnetbyname_r_proto='0'
-getnetent_r_proto='0'
-getprotobyname_r_proto='0'
-getprotobynumber_r_proto='0'
-getprotoent_r_proto='0'
-getpwent_r_proto='0'
-getpwnam_r_proto='0'
-getpwuid_r_proto='0'
-getservbyname_r_proto='0'
-getservbyport_r_proto='0'
-getservent_r_proto='0'
-getspnam_r_proto='0'
-gidformat='"ld"'
-gidsign='-1'
-gidsize='4'
-gidtype='gid_t'
-glibpth='/usr/shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib /usr/shlib '
-gmake='gmake'
-gmtime_r_proto='0'
-gnulibc_version=''
-grep='grep'
-groupcat=''
-groupstype='gid_t'
-gzip='gzip'
-h_fcntl='false'
-h_sysfile='true'
-hint='recommended'
-hostcat='ypcat hosts'
-html1dir=' '
-html1direxp=''
-html3dir=' '
-html3direxp=''
-i16size='2'
-i16type='short'
-i32size='4'
-i32type='long'
-i64size='8'
-i64type='long long'
-i8size='1'
-i8type='char'
-i_arpainet='define'
-i_assert='define'
-i_bsdioctl=''
-i_crypt='undef'
-i_db='undef'
-i_dbm='undef'
-i_dirent='define'
-i_dld='undef'
-i_dlfcn='define'
-i_fcntl='define'
-i_float='define'
-i_fp='undef'
-i_fp_class='undef'
-i_gdbm='undef'
-i_gdbm_ndbm='undef'
-i_gdbmndbm='undef'
-i_grp='undef'
-i_ieeefp='undef'
-i_inttypes='undef'
-i_langinfo='undef'
-i_libutil='undef'
-i_limits='define'
-i_locale='define'
-i_machcthr='undef'
-i_malloc='define'
-i_mallocmalloc='undef'
-i_math='define'
-i_memory='undef'
-i_mntent='undef'
-i_ndbm='undef'
-i_netdb='undef'
-i_neterrno='undef'
-i_netinettcp='undef'
-i_niin='undef'
-i_poll='undef'
-i_prot='undef'
-i_pthread='undef'
-i_pwd='undef'
-i_rpcsvcdbm='define'
-i_sfio='undef'
-i_sgtty='undef'
-i_shadow='undef'
-i_socks='undef'
-i_stdarg='define'
-i_stddef='define'
-i_stdlib='define'
-i_string='define'
-i_sunmath='undef'
-i_sysaccess='undef'
-i_sysdir='undef'
-i_sysfile='undef'
-i_sysfilio='define'
-i_sysin='undef'
-i_sysioctl='undef'
-i_syslog='undef'
-i_sysmman='undef'
-i_sysmode='undef'
-i_sysmount='undef'
-i_sysndir='undef'
-i_sysparam='undef'
-i_syspoll='undef'
-i_sysresrc='undef'
-i_syssecrt='undef'
-i_sysselct='undef'
-i_syssockio='undef'
-i_sysstat='define'
-i_sysstatfs='undef'
-i_sysstatvfs='undef'
-i_systime='undef'
-i_systimek='undef'
-i_systimes='undef'
-i_systypes='define'
-i_sysuio='undef'
-i_sysun='undef'
-i_sysutsname='undef'
-i_sysvfs='undef'
-i_syswait='undef'
-i_termio='undef'
-i_termios='undef'
-i_time='define'
-i_unistd='undef'
-i_ustat='undef'
-i_utime='define'
-i_values='undef'
-i_varargs='undef'
-i_varhdr='varargs.h'
-i_vfork='undef'
-ignore_versioned_solibs=''
-inc_version_list=''
-inc_version_list_init='0'
-incpath=''
-inews=''
-initialinstalllocation=''
-installarchlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~'
-installbin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-installhtml1dir=''
-installhtml3dir=''
-installhtmldir='~INST_TOP~~INST_VER~\html'
-installhtmlhelpdir='~INST_TOP~~INST_VER~\htmlhelp'
-installman1dir='~INST_TOP~~INST_VER~\man\man1'
-installman3dir='~INST_TOP~~INST_VER~\man\man3'
-installprefix='~INST_TOP~~INST_VER~'
-installprefixexp='~INST_TOP~~INST_VER~'
-installprivlib='~INST_TOP~~INST_VER~\lib'
-installscript='~INST_TOP~~INST_VER~\bin'
-installsitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
-installsitebin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-installsitehtml1dir=''
-installsitehtml3dir=''
-installsitelib='~INST_TOP~\site~INST_VER~\lib'
-installsiteman1dir=''
-installsiteman3dir=''
-installsitescript=''
-installstyle='lib'
-installusrbinperl='undef'
-installvendorarch=''
-installvendorbin=''
-installvendorhtml1dir=''
-installvendorhtml3dir=''
-installvendorlib=''
-installvendorman1dir=''
-installvendorman3dir=''
-installvendorscript=''
-intsize='4'
-issymlink=''
-ivdformat='"I64d"'
-ivsize='8'
-ivtype='long long'
-known_extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
-ksh=''
-ld='x86_64-w64-mingw32-g++'
-lddlflags='-mdll ~LINK_FLAGS~'
-ldflags='~LINK_FLAGS~'
-ldflags_uselargefiles=''
-ldlibpthname=''
-less='less'
-lib_ext='.a'
-libc='libmsvcrt.a'
-libperl='libperl.a'
-libpth=''
-libs=''
-libsdirs=''
-libsfiles=''
-libsfound=''
-libspath=''
-libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
-libswanted_uselargefiles='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
-line='line'
-lint=''
-lkflags=''
-ln=''
-lns='copy'
-localtime_r_proto='0'
-locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
-loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
-longdblsize='12'
-longlongsize='8'
-longsize='4'
-lp=''
-lpr=''
-ls='dir'
-lseeksize='8'
-lseektype='long long'
-mad='undef'
-madlyh=''
-madlyobj=''
-madlysrc=''
-mail=''
-mailx=''
-make='dmake'
-make_set_make='#'
-mallocobj='malloc.o'
-mallocsrc='malloc.c'
-malloctype='void *'
-man1dir='~INST_TOP~~INST_VER~\man\man1'
-man1direxp='~INST_TOP~~INST_VER~\man\man1'
-man1ext='1'
-man3dir='~INST_TOP~~INST_VER~\man\man3'
-man3direxp='~INST_TOP~~INST_VER~\man\man3'
-man3ext='3'
-mips_type=''
-mistrustnm=''
-mkdir='mkdir'
-mmaptype='void *'
-modetype='mode_t'
-more='more /e'
-multiarch='undef'
-mv=''
-myarchname='MSWin32'
-mydomain=''
-myhostname=''
-myuname=''
-n='-n'
-need_va_copy='undef'
-netdb_hlen_type='int'
-netdb_host_type='char *'
-netdb_name_type='char *'
-netdb_net_type='long'
-nm='x86_64-w64-mingw32-nm'
-nm_opt=''
-nm_so_opt=''
-nonxs_ext='Errno'
-nroff=''
-nvEUformat='"E"'
-nvFUformat='"F"'
-nvGUformat='"G"'
-nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
-nv_preserves_uv_bits='53'
-nveformat='"e"'
-nvfformat='"f"'
-nvgformat='"g"'
-nvsize='8'
-nvtype='double'
-o_nonblock='O_NONBLOCK'
-obj_ext='.o'
-old_pthread_create_joinable=''
-optimize='-O2'
-orderlib='false'
-osname='MSWin32'
-osvers='4.0'
-otherlibdirs=''
-package='perl5'
-pager='more /e'
-passcat=''
-patchlevel='~PERL_VERSION~'
-path_sep=';'
-perl5=''
-perl='perl'
-perl_patchlevel='~PERL_PATCHLEVEL~'
-perladmin=''
-perllibs='~libs~'
-perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe'
-perl_static_inline='static __inline__'
-pg=''
-phostname='hostname'
-pidtype='int'
-plibpth=''
-pmake=''
-pr=''
-prefix='~INST_TOP~'
-prefixexp='~INST_TOP~'
-privlib='~INST_TOP~~INST_VER~\lib'
-privlibexp='~INST_TOP~~INST_VER~\lib'
-procselfexe=''
-prototype='define'
-ptrsize='8'
-quadkind='3'
-quadtype='long long'
-randbits='15'
-randfunc='rand'
-random_r_proto='0'
-randseedtype='unsigned'
-ranlib='rem'
-rd_nodata='-1'
-readdir64_r_proto='0'
-readdir_r_proto='0'
-revision='5'
-rm='del'
-rm_try=''
-rmail=''
-run=''
-runnm='true'
-sGMTIME_max="2147483647"
-sGMTIME_min="0"
-sLOCALTIME_max="2147483647"
-sLOCALTIME_min="0"
-sPRIEUldbl='"E"'
-sPRIFUldbl='"F"'
-sPRIGUldbl='"G"'
-sPRIXU64='"I64X"'
-sPRId64='"I64d"'
-sPRIeldbl='"e"'
-sPRIfldbl='"f"'
-sPRIgldbl='"g"'
-sPRIi64='"I64i"'
-sPRIo64='"I64o"'
-sPRIu64='"I64u"'
-sPRIx64='"I64x"'
-sSCNfldbl='"f"'
-sched_yield=''
-scriptdir='~INST_TOP~~INST_VER~\bin'
-scriptdirexp='~INST_TOP~~INST_VER~\bin'
-sed='sed'
-seedfunc='srand'
-selectminbits='32'
-selecttype='Perl_fd_set *'
-sendmail='blat'
-setgrent_r_proto='0'
-sethostent_r_proto='0'
-setlocale_r_proto='0'
-setnetent_r_proto='0'
-setprotoent_r_proto='0'
-setpwent_r_proto='0'
-setservent_r_proto='0'
-sh='cmd /x /c'
-shar=''
-sharpbang='#!'
-shmattype='void *'
-shortsize='2'
-shrpenv=''
-shsharp='true'
-sig_count='26'
-sig_name='ZERO HUP INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM NUM16 NUM17 NUM18 NUM19 CHLD BREAK ABRT STOP NUM24 CONT CLD'
-sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
-sig_num='0 1 2 21 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20'
-sig_num_init='0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0'
-sig_size='27'
-signal_t='void'
-sitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
-sitearchexp='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
-sitebin='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~'
-sitebinexp='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~'
-sitehtml1dir=''
-sitehtml1direxp=''
-sitehtml3dir=''
-sitehtml3direxp=''
-sitelib='~INST_TOP~\site~INST_VER~\lib'
-sitelib_stem=''
-sitelibexp='~INST_TOP~\site~INST_VER~\lib'
-siteman1dir=''
-siteman1direxp=''
-siteman3dir=''
-siteman3direxp=''
-siteprefix='~INST_TOP~\site~INST_VER~'
-siteprefixexp='~INST_TOP~\site~INST_VER~'
-sitescript=''
-sitescriptexp=''
-sizesize='8'
-sizetype='size_t'
-sleep=''
-smail=''
-so='dll'
-sockethdr=''
-socketlib=''
-socksizetype='int'
-sort='sort'
-spackage='Perl5'
-spitshell=''
-srand48_r_proto='0'
-srandom_r_proto='0'
-src=''
-ssizetype='long long'
-startperl='#!perl'
-startsh='#!/bin/sh'
-static_ext=' '
-stdchar='char'
-stdio_base='((fp)->_base)'
-stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)'
-stdio_cnt='((fp)->_cnt)'
-stdio_filbuf=''
-stdio_ptr='((fp)->_ptr)'
-stdio_stream_array=''
-strerror_r_proto='0'
-strings='/usr/include/string.h'
-submit=''
-subversion='~SUBVERSION~'
-sysman='/usr/man/man1'
-tail=''
-tar=''
-targetarch=''
-tbl=''
-tee=''
-test=''
-timeincl='/usr/include/sys/time.h '
-timetype='time_t'
-tmpnam_r_proto='0'
-to=':'
-touch='touch'
-tr=''
-trnl='\012'
-troff=''
-ttyname_r_proto='0'
-u16size='2'
-u16type='unsigned short'
-u32size='4'
-u32type='unsigned long'
-u64size='8'
-u64type='unsigned long long'
-u8size='1'
-u8type='unsigned char'
-uidformat='"ld"'
-uidsign='-1'
-uidsize='4'
-uidtype='uid_t'
-uname='uname'
-uniq='uniq'
-uquadtype='unsigned long long'
-use5005threads='undef'
-use64bitall='undef'
-use64bitint='define'
-usecrosscompile='undef'
-usedevel='undef'
-usedl='define'
-usedtrace='undef'
-usefaststdio='undef'
-useithreads='undef'
-uselargefiles='undef'
-uselongdouble='undef'
-usemallocwrap='define'
-usemorebits='undef'
-usemultiplicity='undef'
-usemymalloc='n'
-usenm='false'
-useopcode='true'
-useperlio='undef'
-useposix='true'
-usereentrant='undef'
-userelocatableinc='undef'
-usesfio='false'
-useshrplib='true'
-usesitecustomize='undef'
-usesocks='undef'
-usethreads='undef'
-usevendorprefix='undef'
-usevfork='false'
-usrinc='/usr/include'
-uuname=''
-uvXUformat='"I64X"'
-uvoformat='"I64o"'
-uvsize='8'
-uvtype='unsigned long long'
-uvuformat='"I64u"'
-uvxformat='"I64x"'
-vaproto='undef'
-vendorarch=''
-vendorarchexp=''
-vendorbin=''
-vendorbinexp=''
-vendorhtml1dir=' '
-vendorhtml1direxp=''
-vendorhtml3dir=' '
-vendorhtml3direxp=''
-vendorlib=''
-vendorlib_stem=''
-vendorlibexp=''
-vendorman1dir=' '
-vendorman1direxp=''
-vendorman3dir=' '
-vendorman3direxp=''
-vendorprefix=''
-vendorprefixexp=''
-vendorscript=''
-vendorscriptexp=''
-version='~VERSION~'
-version_patchlevel_string=''
-versiononly='undef'
-vi=''
-voidflags='15'
-xlibpth='/usr/lib/386 /lib/386'
-yacc='yacc'
-yaccflags=''
-zcat=''
-zip='zip'
-PERL_REVISION='~PERL_REVISION~'
-PERL_SUBVERSION='~PERL_SUBVERSION~'
-PERL_VERSION='~PERL_VERSION~'
-PERL_API_REVISION='~PERL_API_REVISION~'
-PERL_API_SUBVERSION='~PERL_API_SUBVERSION~'
-PERL_API_VERSION='~PERL_API_VERSION~'
-PERL_PATCHLEVEL='~PERL_PATCHLEVEL~'
-PERL_CONFIG_SH='true'
Deleted: vendor/perl/dist/win32/config.gc64nox
===================================================================
--- vendor/perl/dist/win32/config.gc64nox 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/config.gc64nox 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1085 +0,0 @@
-## Configured by: ~cf_email~
-## Target system: WIN32
-Author=''
-Date='$Date'
-Header=''
-Id='$Id'
-Locker=''
-Log='$Log'
-RCSfile='$RCSfile'
-Revision='$Revision'
-Source=''
-State=''
-_a='.a'
-_exe='.exe'
-_o='.o'
-afs='false'
-afsroot='/afs'
-alignbytes='8'
-ansi2knr=''
-aphostname=''
-api_revision='~PERL_API_REVISION~'
-api_subversion='~PERL_API_SUBVERSION~'
-api_version='~PERL_API_VERSION~'
-api_versionstring='~PERL_API_REVISION~.~PERL_API_VERSION~.~PERL_API_SUBVERSION~'
-ar='ar'
-archlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~'
-archlibexp='~INST_TOP~~INST_VER~\lib~INST_ARCH~'
-archname64=''
-archname='MSWin32'
-archobjs=''
-asctime_r_proto='0'
-awk='awk'
-baserev='5'
-bash=''
-bin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-binexp='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-bison=''
-byacc='byacc'
-byteorder='1234'
-c=''
-castflags='0'
-cat='type'
-cc='gcc'
-cccdlflags=' '
-ccdlflags=' '
-ccflags='-MD -DWIN32'
-ccflags_uselargefiles=''
-ccname='~cc~'
-ccsymbols=''
-ccversion=''
-cf_by='nobody'
-cf_email='nobody at no.where.net'
-cf_time=''
-charbits='8'
-chgrp=''
-chmod=''
-chown=''
-clocktype='clock_t'
-comm=''
-compress=''
-contains='grep'
-cp='copy'
-cpio=''
-cpp='~cc~ -E'
-cpp_stuff='42'
-cppccsymbols=''
-cppflags='-DWIN32'
-cpplast=''
-cppminus='-'
-cpprun='~cc~ -E'
-cppstdin='~cc~ -E'
-cppsymbols=''
-crypt_r_proto='0'
-cryptlib=''
-csh='undef'
-ctermid_r_proto='0'
-ctime_r_proto='0'
-d_Gconvert='sprintf((b),"%.*g",(n),(x))'
-d_PRIEUldbl='undef'
-d_PRIFUldbl='undef'
-d_PRIGUldbl='undef'
-d_PRIXU64='undef'
-d_PRId64='undef'
-d_PRIeldbl='undef'
-d_PRIfldbl='undef'
-d_PRIgldbl='undef'
-d_PRIi64='undef'
-d_PRIo64='undef'
-d_PRIu64='undef'
-d_PRIx64='undef'
-d_SCNfldbl='undef'
-d__fwalk='undef'
-d_access='define'
-d_accessx='undef'
-d_aintl='undef'
-d_alarm='define'
-d_archlib='define'
-d_asctime64='undef'
-d_asctime_r='undef'
-d_atolf='undef'
-d_atoll='define'
-d_attribute_deprecated='undef'
-d_attribute_format='undef'
-d_attribute_malloc='undef'
-d_attribute_nonnull='undef'
-d_attribute_noreturn='undef'
-d_attribute_pure='undef'
-d_attribute_unused='undef'
-d_attribute_warn_unused_result='undef'
-d_bcmp='undef'
-d_bcopy='undef'
-d_bsd='define'
-d_bsdgetpgrp='undef'
-d_bsdsetpgrp='undef'
-d_builtin_choose_expr='undef'
-d_builtin_expect='undef'
-d_bzero='undef'
-d_c99_variadic_macros='undef'
-d_casti32='define'
-d_castneg='define'
-d_charvspr='undef'
-d_chown='undef'
-d_chroot='undef'
-d_chsize='define'
-d_class='undef'
-d_clearenv='undef'
-d_closedir='define'
-d_cmsghdr_s='undef'
-d_const='define'
-d_copysignl='undef'
-d_cplusplus='undef'
-d_crypt='define'
-d_crypt_r='undef'
-d_csh='undef'
-d_ctermid='undef'
-d_ctermid_r='undef'
-d_ctime64='undef'
-d_ctime_r='undef'
-d_cuserid='undef'
-d_dbl_dig='define'
-d_dbminitproto='undef'
-d_difftime64='undef'
-d_difftime='define'
-d_dir_dd_fd='undef'
-d_dirfd='undef'
-d_dirnamlen='define'
-d_dlerror='define'
-d_dlopen='define'
-d_dlsymun='undef'
-d_dosuid='undef'
-d_drand48_r='undef'
-d_drand48proto='undef'
-d_dup2='define'
-d_eaccess='undef'
-d_endgrent='undef'
-d_endgrent_r='undef'
-d_endhent='undef'
-d_endhostent_r='undef'
-d_endnent='undef'
-d_endnetent_r='undef'
-d_endpent='undef'
-d_endprotoent_r='undef'
-d_endpwent='undef'
-d_endpwent_r='undef'
-d_endsent='undef'
-d_endservent_r='undef'
-d_eofnblk='define'
-d_eunice='undef'
-d_faststdio='define'
-d_fchdir='undef'
-d_fchmod='undef'
-d_fchown='undef'
-d_fcntl_can_lock='undef'
-d_fcntl='undef'
-d_fd_macros='define'
-d_fd_set='define'
-d_fds_bits='define'
-d_fgetpos='define'
-d_finitel='undef'
-d_finite='undef'
-d_flexfnam='define'
-d_flock='define'
-d_flockproto='define'
-d_fork='undef'
-d_fp_class='undef'
-d_fpathconf='undef'
-d_fpclass='undef'
-d_fpclassify='undef'
-d_fpclassl='undef'
-d_fpos64_t='undef'
-d_frexpl='undef'
-d_fs_data_s='undef'
-d_fseeko='undef'
-d_fsetpos='define'
-d_fstatfs='undef'
-d_fstatvfs='undef'
-d_fsync='undef'
-d_ftello='undef'
-d_ftime='define'
-d_futimes='undef'
-d_gdbm_ndbm_h_uses_prototypes='undef'
-d_gdbmndbm_h_uses_prototypes='undef'
-d_getaddrinfo='undef'
-d_getcwd='define'
-d_getespwnam='undef'
-d_getfsstat='undef'
-d_getgrent='undef'
-d_getgrent_r='undef'
-d_getgrgid_r='undef'
-d_getgrnam_r='undef'
-d_getgrps='undef'
-d_gethbyaddr='define'
-d_gethbyname='define'
-d_gethent='undef'
-d_gethname='define'
-d_gethostbyaddr_r='undef'
-d_gethostbyname_r='undef'
-d_gethostent_r='undef'
-d_gethostprotos='define'
-d_getitimer='undef'
-d_getlogin='define'
-d_getlogin_r='undef'
-d_getmnt='undef'
-d_getmntent='undef'
-d_getnameinfo='undef'
-d_getnbyaddr='undef'
-d_getnbyname='undef'
-d_getnent='undef'
-d_getnetbyaddr_r='undef'
-d_getnetbyname_r='undef'
-d_getnetent_r='undef'
-d_getnetprotos='undef'
-d_getpagsz='undef'
-d_getpbyname='define'
-d_getpbynumber='define'
-d_getpent='undef'
-d_getpgid='undef'
-d_getpgrp2='undef'
-d_getpgrp='undef'
-d_getppid='undef'
-d_getprior='undef'
-d_getprotobyname_r='undef'
-d_getprotobynumber_r='undef'
-d_getprotoent_r='undef'
-d_getprotoprotos='define'
-d_getprpwnam='undef'
-d_getpwent='undef'
-d_getpwent_r='undef'
-d_getpwnam_r='undef'
-d_getpwuid_r='undef'
-d_getsbyname='define'
-d_getsbyport='define'
-d_getsent='undef'
-d_getservbyname_r='undef'
-d_getservbyport_r='undef'
-d_getservent_r='undef'
-d_getservprotos='define'
-d_getspnam='undef'
-d_getspnam_r='undef'
-d_gettimeod='define'
-d_gmtime64='undef'
-d_gmtime_r='undef'
-d_gnulibc='undef'
-d_grpasswd='undef'
-d_hasmntopt='undef'
-d_htonl='define'
-d_ilogbl='undef'
-d_inc_version_list='undef'
-d_index='undef'
-d_inetaton='undef'
-d_inetntop='undef'
-d_inetpton='undef'
-d_int64_t='undef'
-d_isascii='define'
-d_isfinite='undef'
-d_isinf='undef'
-d_isnan='define'
-d_isnanl='undef'
-d_killpg='define'
-d_lchown='undef'
-d_ldbl_dig='define'
-d_libm_lib_version='undef'
-d_link='define'
-d_localtime64='undef'
-d_localtime_r='undef'
-d_localtime_r_needs_tzset='undef'
-d_locconv='define'
-d_lockf='undef'
-d_longdbl='define'
-d_longlong='define'
-d_lseekproto='define'
-d_lstat='undef'
-d_madvise='undef'
-d_malloc_good_size='undef'
-d_malloc_size='undef'
-d_mblen='define'
-d_mbstowcs='define'
-d_mbtowc='define'
-d_memchr='define'
-d_memcmp='define'
-d_memcpy='define'
-d_memmove='define'
-d_memset='define'
-d_mkdir='define'
-d_mkdtemp='undef'
-d_mkfifo='undef'
-d_mkstemp='undef'
-d_mkstemps='undef'
-d_mktime64='undef'
-d_mktime='define'
-d_mmap='undef'
-d_modfl='undef'
-d_modfl_pow32_bug='undef'
-d_modflproto='undef'
-d_mprotect='undef'
-d_msgctl='undef'
-d_msg_ctrunc='undef'
-d_msg_dontroute='undef'
-d_msgget='undef'
-d_msghdr_s='undef'
-d_msg_oob='undef'
-d_msg_peek='undef'
-d_msg_proxy='undef'
-d_msgrcv='undef'
-d_msgsnd='undef'
-d_msg='undef'
-d_msync='undef'
-d_munmap='undef'
-d_mymalloc='undef'
-d_ndbm='undef'
-d_ndbm_h_uses_prototypes='undef'
-d_nice='undef'
-d_nl_langinfo='undef'
-d_nv_preserves_uv='undef'
-d_nv_zero_is_allbits_zero='define'
-d_off64_t='undef'
-d_old_pthread_create_joinable='undef'
-d_oldpthreads='undef'
-d_oldsock='undef'
-d_open3='undef'
-d_pathconf='undef'
-d_pause='define'
-d_perl_otherlibdirs='undef'
-d_phostname='undef'
-d_pipe='define'
-d_poll='undef'
-d_portable='define'
-d_prctl='undef'
-d_prctl_set_name='undef'
-d_printf_format_null='undef'
-d_procselfexe='undef'
-d_pseudofork='undef'
-d_pthread_atfork='undef'
-d_pthread_attr_setscope='undef'
-d_pthread_yield='undef'
-d_pwage='undef'
-d_pwchange='undef'
-d_pwclass='undef'
-d_pwcomment='undef'
-d_pwexpire='undef'
-d_pwgecos='undef'
-d_pwpasswd='undef'
-d_pwquota='undef'
-d_qgcvt='undef'
-d_quad='define'
-d_random_r='undef'
-d_readdir64_r='undef'
-d_readdir='define'
-d_readdir_r='undef'
-d_readlink='undef'
-d_readv='undef'
-d_recvmsg='undef'
-d_rename='define'
-d_rewinddir='define'
-d_rmdir='define'
-d_safebcpy='undef'
-d_safemcpy='undef'
-d_sanemcmp='define'
-d_sbrkproto='undef'
-d_scalbnl='undef'
-d_sched_yield='undef'
-d_scm_rights='undef'
-d_seekdir='define'
-d_select='define'
-d_sem='undef'
-d_semctl='undef'
-d_semctl_semid_ds='undef'
-d_semctl_semun='undef'
-d_semget='undef'
-d_semop='undef'
-d_sendmsg='undef'
-d_setegid='undef'
-d_seteuid='undef'
-d_setgrent='undef'
-d_setgrent_r='undef'
-d_setgrps='undef'
-d_sethent='undef'
-d_sethostent_r='undef'
-d_setitimer='undef'
-d_setlinebuf='undef'
-d_setlocale='define'
-d_setlocale_r='undef'
-d_setnent='undef'
-d_setnetent_r='undef'
-d_setpent='undef'
-d_setpgid='undef'
-d_setpgrp2='undef'
-d_setpgrp='undef'
-d_setprior='undef'
-d_setproctitle='undef'
-d_setprotoent_r='undef'
-d_setpwent='undef'
-d_setpwent_r='undef'
-d_setregid='undef'
-d_setresgid='undef'
-d_setresuid='undef'
-d_setreuid='undef'
-d_setrgid='undef'
-d_setruid='undef'
-d_setsent='undef'
-d_setservent_r='undef'
-d_setsid='undef'
-d_setvbuf='define'
-d_sfio='undef'
-d_shm='undef'
-d_shmat='undef'
-d_shmatprototype='undef'
-d_shmctl='undef'
-d_shmdt='undef'
-d_shmget='undef'
-d_sigaction='undef'
-d_signbit='undef'
-d_sigprocmask='undef'
-d_sigsetjmp='undef'
-d_sin6_scope_id='define'
-d_sitearch='define'
-d_snprintf='define'
-d_sockaddr_sa_len='undef'
-d_sockatmark='undef'
-d_sockatmarkproto='undef'
-d_socket='define'
-d_socklen_t='undef'
-d_sockpair='undef'
-d_socks5_init='undef'
-d_sprintf_returns_strlen='define'
-d_sqrtl='undef'
-d_srand48_r='undef'
-d_srandom_r='undef'
-d_sresgproto='undef'
-d_sresuproto='undef'
-d_statblks='undef'
-d_static_inline='define'
-d_statfs_f_flags='undef'
-d_statfs_s='undef'
-d_statvfs='undef'
-d_stdio_cnt_lval='define'
-d_stdio_ptr_lval='define'
-d_stdio_ptr_lval_nochange_cnt='define'
-d_stdio_ptr_lval_sets_cnt='undef'
-d_stdio_stream_array='undef'
-d_stdiobase='define'
-d_stdstdio='define'
-d_strchr='define'
-d_strcoll='define'
-d_strctcpy='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
-d_strerror_r='undef'
-d_strftime='define'
-d_strlcat='undef'
-d_strlcpy='undef'
-d_strtod='define'
-d_strtol='define'
-d_strtold='undef'
-d_strtoll='define'
-d_strtoq='undef'
-d_strtoul='define'
-d_strtoull='define'
-d_strtouq='undef'
-d_strxfrm='define'
-d_suidsafe='undef'
-d_symlink='undef'
-d_syscall='undef'
-d_syscallproto='undef'
-d_sysconf='undef'
-d_sysernlst=''
-d_syserrlst='define'
-d_system='define'
-d_tcgetpgrp='undef'
-d_tcsetpgrp='undef'
-d_telldir='define'
-d_telldirproto='define'
-d_time='define'
-d_timegm='undef'
-d_times='define'
-d_tm_tm_gmtoff='undef'
-d_tm_tm_zone='undef'
-d_tmpnam_r='undef'
-d_truncate='undef'
-d_ttyname_r='undef'
-d_tzname='define'
-d_u32align='define'
-d_ualarm='undef'
-d_umask='define'
-d_uname='define'
-d_union_semun='define'
-d_unordered='undef'
-d_unsetenv='undef'
-d_usleep='undef'
-d_usleepproto='undef'
-d_ustat='undef'
-d_vendorarch='undef'
-d_vendorbin='undef'
-d_vendorlib='undef'
-d_vendorscript='undef'
-d_vfork='undef'
-d_void_closedir='undef'
-d_voidsig='define'
-d_voidtty=''
-d_volatile='define'
-d_vprintf='define'
-d_vsnprintf='define'
-d_wait4='undef'
-d_waitpid='define'
-d_wcstombs='define'
-d_wctomb='define'
-d_writev='undef'
-d_xenix='undef'
-date='date'
-db_hashtype='int'
-db_prefixtype='int'
-db_version_major='0'
-db_version_minor='0'
-db_version_patch='0'
-defvoidused='15'
-direntrytype='struct direct'
-dlext='dll'
-dlltool='dlltool'
-dlsrc='dl_win32.xs'
-doublesize='8'
-drand01='(rand()/(double)((unsigned)1<<RANDBITS))'
-drand48_r_proto='0'
-dtrace=''
-dynamic_ext='Socket IO Fcntl Opcode SDBM_File attributes'
-eagain='EAGAIN'
-ebcdic='undef'
-echo='echo'
-egrep='egrep'
-emacs=''
-endgrent_r_proto='0'
-endhostent_r_proto='0'
-endnetent_r_proto='0'
-endprotoent_r_proto='0'
-endpwent_r_proto='0'
-endservent_r_proto='0'
-eunicefix=':'
-exe_ext='.exe'
-expr='expr'
-extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
-extern_C='extern'
-extras=''
-fflushNULL='define'
-fflushall='undef'
-find='find'
-firstmakefile='makefile'
-flex=''
-fpossize='8'
-fpostype='fpos_t'
-freetype='void'
-from=':'
-full_ar=''
-full_csh=''
-full_sed=''
-gccansipedantic=''
-gccosandvers=''
-gccversion=''
-getgrent_r_proto='0'
-getgrgid_r_proto='0'
-getgrnam_r_proto='0'
-gethostbyaddr_r_proto='0'
-gethostbyname_r_proto='0'
-gethostent_r_proto='0'
-getlogin_r_proto='0'
-getnetbyaddr_r_proto='0'
-getnetbyname_r_proto='0'
-getnetent_r_proto='0'
-getprotobyname_r_proto='0'
-getprotobynumber_r_proto='0'
-getprotoent_r_proto='0'
-getpwent_r_proto='0'
-getpwnam_r_proto='0'
-getpwuid_r_proto='0'
-getservbyname_r_proto='0'
-getservbyport_r_proto='0'
-getservent_r_proto='0'
-getspnam_r_proto='0'
-gidformat='"ld"'
-gidsign='-1'
-gidsize='4'
-gidtype='gid_t'
-glibpth='/usr/shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib /usr/shlib '
-gmake='gmake'
-gmtime_r_proto='0'
-gnulibc_version=''
-grep='grep'
-groupcat=''
-groupstype='gid_t'
-gzip='gzip'
-h_fcntl='false'
-h_sysfile='true'
-hint='recommended'
-hostcat='ypcat hosts'
-html1dir=' '
-html1direxp=''
-html3dir=' '
-html3direxp=''
-i16size='2'
-i16type='short'
-i32size='4'
-i32type='long'
-i64size='8'
-i64type='long long'
-i8size='1'
-i8type='char'
-i_arpainet='define'
-i_assert='define'
-i_bsdioctl=''
-i_crypt='undef'
-i_db='undef'
-i_dbm='undef'
-i_dirent='define'
-i_dld='undef'
-i_dlfcn='define'
-i_fcntl='define'
-i_float='define'
-i_fp='undef'
-i_fp_class='undef'
-i_gdbm='undef'
-i_gdbm_ndbm='undef'
-i_gdbmndbm='undef'
-i_grp='undef'
-i_ieeefp='undef'
-i_inttypes='undef'
-i_langinfo='undef'
-i_libutil='undef'
-i_limits='define'
-i_locale='define'
-i_machcthr='undef'
-i_malloc='define'
-i_mallocmalloc='undef'
-i_math='define'
-i_memory='undef'
-i_mntent='undef'
-i_ndbm='undef'
-i_netdb='undef'
-i_neterrno='undef'
-i_netinettcp='undef'
-i_niin='undef'
-i_poll='undef'
-i_prot='undef'
-i_pthread='undef'
-i_pwd='undef'
-i_rpcsvcdbm='define'
-i_sfio='undef'
-i_sgtty='undef'
-i_shadow='undef'
-i_socks='undef'
-i_stdarg='define'
-i_stddef='define'
-i_stdlib='define'
-i_string='define'
-i_sunmath='undef'
-i_sysaccess='undef'
-i_sysdir='undef'
-i_sysfile='undef'
-i_sysfilio='define'
-i_sysin='undef'
-i_sysioctl='undef'
-i_syslog='undef'
-i_sysmman='undef'
-i_sysmode='undef'
-i_sysmount='undef'
-i_sysndir='undef'
-i_sysparam='undef'
-i_syspoll='undef'
-i_sysresrc='undef'
-i_syssecrt='undef'
-i_sysselct='undef'
-i_syssockio='undef'
-i_sysstat='define'
-i_sysstatfs='undef'
-i_sysstatvfs='undef'
-i_systime='undef'
-i_systimek='undef'
-i_systimes='undef'
-i_systypes='define'
-i_sysuio='undef'
-i_sysun='undef'
-i_sysutsname='undef'
-i_sysvfs='undef'
-i_syswait='undef'
-i_termio='undef'
-i_termios='undef'
-i_time='define'
-i_unistd='undef'
-i_ustat='undef'
-i_utime='define'
-i_values='undef'
-i_varargs='undef'
-i_varhdr='varargs.h'
-i_vfork='undef'
-ignore_versioned_solibs=''
-inc_version_list=''
-inc_version_list_init='0'
-incpath=''
-inews=''
-initialinstalllocation=''
-installarchlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~'
-installbin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-installhtml1dir=''
-installhtml3dir=''
-installhtmldir='~INST_TOP~~INST_VER~\html'
-installhtmlhelpdir='~INST_TOP~~INST_VER~\htmlhelp'
-installman1dir='~INST_TOP~~INST_VER~\man\man1'
-installman3dir='~INST_TOP~~INST_VER~\man\man3'
-installprefix='~INST_TOP~~INST_VER~'
-installprefixexp='~INST_TOP~~INST_VER~'
-installprivlib='~INST_TOP~~INST_VER~\lib'
-installscript='~INST_TOP~~INST_VER~\bin'
-installsitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
-installsitebin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-installsitehtml1dir=''
-installsitehtml3dir=''
-installsitelib='~INST_TOP~\site~INST_VER~\lib'
-installsiteman1dir=''
-installsiteman3dir=''
-installsitescript=''
-installstyle='lib'
-installusrbinperl='undef'
-installvendorarch=''
-installvendorbin=''
-installvendorhtml1dir=''
-installvendorhtml3dir=''
-installvendorlib=''
-installvendorman1dir=''
-installvendorman3dir=''
-installvendorscript=''
-intsize='4'
-issymlink=''
-ivdformat='"I64d"'
-ivsize='8'
-ivtype='long long'
-known_extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
-ksh=''
-ld='g++'
-lddlflags='-mdll ~LINK_FLAGS~'
-ldflags='~LINK_FLAGS~'
-ldflags_uselargefiles=''
-ldlibpthname=''
-less='less'
-lib_ext='.a'
-libc='libmsvcrt.a'
-libperl='libperl.a'
-libpth=''
-libs=''
-libsdirs=''
-libsfiles=''
-libsfound=''
-libspath=''
-libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
-libswanted_uselargefiles='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
-line='line'
-lint=''
-lkflags=''
-ln=''
-lns='copy'
-localtime_r_proto='0'
-locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
-loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
-longdblsize='12'
-longlongsize='8'
-longsize='4'
-lp=''
-lpr=''
-ls='dir'
-lseeksize='8'
-lseektype='long long'
-mad='undef'
-madlyh=''
-madlyobj=''
-madlysrc=''
-mail=''
-mailx=''
-make='dmake'
-make_set_make='#'
-mallocobj='malloc.o'
-mallocsrc='malloc.c'
-malloctype='void *'
-man1dir='~INST_TOP~~INST_VER~\man\man1'
-man1direxp='~INST_TOP~~INST_VER~\man\man1'
-man1ext='1'
-man3dir='~INST_TOP~~INST_VER~\man\man3'
-man3direxp='~INST_TOP~~INST_VER~\man\man3'
-man3ext='3'
-mips_type=''
-mistrustnm=''
-mkdir='mkdir'
-mmaptype='void *'
-modetype='mode_t'
-more='more /e'
-multiarch='undef'
-mv=''
-myarchname='MSWin32'
-mydomain=''
-myhostname=''
-myuname=''
-n='-n'
-need_va_copy='undef'
-netdb_hlen_type='int'
-netdb_host_type='char *'
-netdb_name_type='char *'
-netdb_net_type='long'
-nm='nm'
-nm_opt=''
-nm_so_opt=''
-nonxs_ext='Errno'
-nroff=''
-nvEUformat='"E"'
-nvFUformat='"F"'
-nvGUformat='"G"'
-nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
-nv_preserves_uv_bits='53'
-nveformat='"e"'
-nvfformat='"f"'
-nvgformat='"g"'
-nvsize='8'
-nvtype='double'
-o_nonblock='O_NONBLOCK'
-obj_ext='.o'
-old_pthread_create_joinable=''
-optimize='-O2'
-orderlib='false'
-osname='MSWin32'
-osvers='4.0'
-otherlibdirs=''
-package='perl5'
-pager='more /e'
-passcat=''
-patchlevel='~PERL_VERSION~'
-path_sep=';'
-perl5=''
-perl='perl'
-perl_patchlevel='~PERL_PATCHLEVEL~'
-perladmin=''
-perllibs='~libs~'
-perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe'
-perl_static_inline='static __inline__'
-pg=''
-phostname='hostname'
-pidtype='int'
-plibpth=''
-pmake=''
-pr=''
-prefix='~INST_TOP~'
-prefixexp='~INST_TOP~'
-privlib='~INST_TOP~~INST_VER~\lib'
-privlibexp='~INST_TOP~~INST_VER~\lib'
-procselfexe=''
-prototype='define'
-ptrsize='8'
-quadkind='3'
-quadtype='long long'
-randbits='15'
-randfunc='rand'
-random_r_proto='0'
-randseedtype='unsigned'
-ranlib='rem'
-rd_nodata='-1'
-readdir64_r_proto='0'
-readdir_r_proto='0'
-revision='5'
-rm='del'
-rm_try=''
-rmail=''
-run=''
-runnm='true'
-sGMTIME_max="2147483647"
-sGMTIME_min="0"
-sLOCALTIME_max="2147483647"
-sLOCALTIME_min="0"
-sPRIEUldbl='"E"'
-sPRIFUldbl='"F"'
-sPRIGUldbl='"G"'
-sPRIXU64='"I64X"'
-sPRId64='"I64d"'
-sPRIeldbl='"e"'
-sPRIfldbl='"f"'
-sPRIgldbl='"g"'
-sPRIi64='"I64i"'
-sPRIo64='"I64o"'
-sPRIu64='"I64u"'
-sPRIx64='"I64x"'
-sSCNfldbl='"f"'
-sched_yield=''
-scriptdir='~INST_TOP~~INST_VER~\bin'
-scriptdirexp='~INST_TOP~~INST_VER~\bin'
-sed='sed'
-seedfunc='srand'
-selectminbits='32'
-selecttype='Perl_fd_set *'
-sendmail='blat'
-setgrent_r_proto='0'
-sethostent_r_proto='0'
-setlocale_r_proto='0'
-setnetent_r_proto='0'
-setprotoent_r_proto='0'
-setpwent_r_proto='0'
-setservent_r_proto='0'
-sh='cmd /x /c'
-shar=''
-sharpbang='#!'
-shmattype='void *'
-shortsize='2'
-shrpenv=''
-shsharp='true'
-sig_count='26'
-sig_name='ZERO HUP INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM NUM16 NUM17 NUM18 NUM19 CHLD BREAK ABRT STOP NUM24 CONT CLD'
-sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
-sig_num='0 1 2 21 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20'
-sig_num_init='0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0'
-sig_size='27'
-signal_t='void'
-sitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
-sitearchexp='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
-sitebin='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~'
-sitebinexp='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~'
-sitehtml1dir=''
-sitehtml1direxp=''
-sitehtml3dir=''
-sitehtml3direxp=''
-sitelib='~INST_TOP~\site~INST_VER~\lib'
-sitelib_stem=''
-sitelibexp='~INST_TOP~\site~INST_VER~\lib'
-siteman1dir=''
-siteman1direxp=''
-siteman3dir=''
-siteman3direxp=''
-siteprefix='~INST_TOP~\site~INST_VER~'
-siteprefixexp='~INST_TOP~\site~INST_VER~'
-sitescript=''
-sitescriptexp=''
-sizesize='8'
-sizetype='size_t'
-sleep=''
-smail=''
-so='dll'
-sockethdr=''
-socketlib=''
-socksizetype='int'
-sort='sort'
-spackage='Perl5'
-spitshell=''
-srand48_r_proto='0'
-srandom_r_proto='0'
-src=''
-ssizetype='long long'
-startperl='#!perl'
-startsh='#!/bin/sh'
-static_ext=' '
-stdchar='char'
-stdio_base='((fp)->_base)'
-stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)'
-stdio_cnt='((fp)->_cnt)'
-stdio_filbuf=''
-stdio_ptr='((fp)->_ptr)'
-stdio_stream_array=''
-strerror_r_proto='0'
-strings='/usr/include/string.h'
-submit=''
-subversion='~SUBVERSION~'
-sysman='/usr/man/man1'
-tail=''
-tar=''
-targetarch=''
-tbl=''
-tee=''
-test=''
-timeincl='/usr/include/sys/time.h '
-timetype='time_t'
-tmpnam_r_proto='0'
-to=':'
-touch='touch'
-tr=''
-trnl='\012'
-troff=''
-ttyname_r_proto='0'
-u16size='2'
-u16type='unsigned short'
-u32size='4'
-u32type='unsigned long'
-u64size='8'
-u64type='unsigned long long'
-u8size='1'
-u8type='unsigned char'
-uidformat='"ld"'
-uidsign='-1'
-uidsize='4'
-uidtype='uid_t'
-uname='uname'
-uniq='uniq'
-uquadtype='unsigned long long'
-use5005threads='undef'
-use64bitall='undef'
-use64bitint='define'
-usecrosscompile='undef'
-usedevel='undef'
-usedl='define'
-usedtrace='undef'
-usefaststdio='undef'
-useithreads='undef'
-uselargefiles='undef'
-uselongdouble='undef'
-usemallocwrap='define'
-usemorebits='undef'
-usemultiplicity='undef'
-usemymalloc='n'
-usenm='false'
-useopcode='true'
-useperlio='undef'
-useposix='true'
-usereentrant='undef'
-userelocatableinc='undef'
-usesfio='false'
-useshrplib='true'
-usesitecustomize='undef'
-usesocks='undef'
-usethreads='undef'
-usevendorprefix='undef'
-usevfork='false'
-usrinc='/usr/include'
-uuname=''
-uvXUformat='"I64X"'
-uvoformat='"I64o"'
-uvsize='8'
-uvtype='unsigned long long'
-uvuformat='"I64u"'
-uvxformat='"I64x"'
-vaproto='undef'
-vendorarch=''
-vendorarchexp=''
-vendorbin=''
-vendorbinexp=''
-vendorhtml1dir=' '
-vendorhtml1direxp=''
-vendorhtml3dir=' '
-vendorhtml3direxp=''
-vendorlib=''
-vendorlib_stem=''
-vendorlibexp=''
-vendorman1dir=' '
-vendorman1direxp=''
-vendorman3dir=' '
-vendorman3direxp=''
-vendorprefix=''
-vendorprefixexp=''
-vendorscript=''
-vendorscriptexp=''
-version='~VERSION~'
-version_patchlevel_string=''
-versiononly='undef'
-vi=''
-voidflags='15'
-xlibpth='/usr/lib/386 /lib/386'
-yacc='yacc'
-yaccflags=''
-zcat=''
-zip='zip'
-PERL_REVISION='~PERL_REVISION~'
-PERL_SUBVERSION='~PERL_SUBVERSION~'
-PERL_VERSION='~PERL_VERSION~'
-PERL_API_REVISION='~PERL_API_REVISION~'
-PERL_API_SUBVERSION='~PERL_API_SUBVERSION~'
-PERL_API_VERSION='~PERL_API_VERSION~'
-PERL_PATCHLEVEL='~PERL_PATCHLEVEL~'
-PERL_CONFIG_SH='true'
Deleted: vendor/perl/dist/win32/config.vc64
===================================================================
--- vendor/perl/dist/win32/config.vc64 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/config.vc64 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,1084 +0,0 @@
-## Configured by: ~cf_email~
-## Target system: WIN32
-Author=''
-Date='$Date'
-Header=''
-Id='$Id'
-Locker=''
-Log='$Log'
-RCSfile='$RCSfile'
-Revision='$Revision'
-Source=''
-State=''
-_a='.lib'
-_exe='.exe'
-_o='.obj'
-afs='false'
-afsroot='/afs'
-alignbytes='8'
-ansi2knr=''
-aphostname=''
-api_revision='~PERL_API_REVISION~'
-api_subversion='~PERL_API_SUBVERSION~'
-api_version='~PERL_API_VERSION~'
-api_versionstring='~PERL_API_REVISION~.~PERL_API_VERSION~.~PERL_API_SUBVERSION~'
-ar='lib'
-archlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~'
-archlibexp='~INST_TOP~~INST_VER~\lib~INST_ARCH~'
-archname64=''
-archname='MSWin32'
-archobjs=''
-asctime_r_proto='0'
-awk='awk'
-baserev='5'
-bash=''
-bin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-binexp='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-bison=''
-byacc='byacc'
-byteorder='1234'
-c=''
-castflags='0'
-cat='type'
-cc='cl'
-cccdlflags=' '
-ccdlflags=' '
-ccflags='-MD -DWIN32'
-ccflags_uselargefiles=''
-ccname='~cc~'
-ccsymbols=''
-ccversion=''
-cf_by='nobody'
-cf_email='nobody at no.where.net'
-cf_time=''
-charbits='8'
-chgrp=''
-chmod=''
-chown=''
-clocktype='clock_t'
-comm=''
-compress=''
-contains='grep'
-cp='copy'
-cpio=''
-cpp='~cc~ -nologo -E'
-cpp_stuff='42'
-cppccsymbols=''
-cppflags='-DWIN32'
-cpplast=''
-cppminus=''
-cpprun='~cc~ -nologo -E'
-cppstdin='cppstdin'
-cppsymbols=''
-crypt_r_proto='0'
-cryptlib=''
-csh='undef'
-ctermid_r_proto='0'
-ctime_r_proto='0'
-d_Gconvert='sprintf((b),"%.*g",(n),(x))'
-d_PRIEUldbl='undef'
-d_PRIFUldbl='undef'
-d_PRIGUldbl='undef'
-d_PRIXU64='undef'
-d_PRId64='undef'
-d_PRIeldbl='undef'
-d_PRIfldbl='undef'
-d_PRIgldbl='undef'
-d_PRIi64='undef'
-d_PRIo64='undef'
-d_PRIu64='undef'
-d_PRIx64='undef'
-d_SCNfldbl='undef'
-d__fwalk='undef'
-d_access='define'
-d_accessx='undef'
-d_aintl='undef'
-d_alarm='define'
-d_archlib='define'
-d_asctime64='undef'
-d_asctime_r='undef'
-d_atolf='undef'
-d_atoll='define'
-d_attribute_deprecated='undef'
-d_attribute_format='undef'
-d_attribute_malloc='undef'
-d_attribute_nonnull='undef'
-d_attribute_noreturn='undef'
-d_attribute_pure='undef'
-d_attribute_unused='undef'
-d_attribute_warn_unused_result='undef'
-d_bcmp='undef'
-d_bcopy='undef'
-d_bsd='define'
-d_bsdgetpgrp='undef'
-d_bsdsetpgrp='undef'
-d_builtin_choose_expr='undef'
-d_builtin_expect='undef'
-d_bzero='undef'
-d_c99_variadic_macros='undef'
-d_casti32='undef'
-d_castneg='define'
-d_charvspr='undef'
-d_chown='undef'
-d_chroot='undef'
-d_chsize='define'
-d_class='undef'
-d_clearenv='undef'
-d_closedir='define'
-d_cmsghdr_s='undef'
-d_const='define'
-d_copysignl='undef'
-d_cplusplus='undef'
-d_crypt='define'
-d_crypt_r='undef'
-d_csh='undef'
-d_ctermid='undef'
-d_ctermid_r='undef'
-d_ctime64='undef'
-d_ctime_r='undef'
-d_cuserid='undef'
-d_dbl_dig='define'
-d_dbminitproto='undef'
-d_difftime64='undef'
-d_difftime='define'
-d_dir_dd_fd='undef'
-d_dirfd='undef'
-d_dirnamlen='define'
-d_dlerror='define'
-d_dlopen='define'
-d_dlsymun='undef'
-d_dosuid='undef'
-d_drand48_r='undef'
-d_drand48proto='undef'
-d_dup2='define'
-d_eaccess='undef'
-d_endgrent='undef'
-d_endgrent_r='undef'
-d_endhent='undef'
-d_endhostent_r='undef'
-d_endnent='undef'
-d_endnetent_r='undef'
-d_endpent='undef'
-d_endprotoent_r='undef'
-d_endpwent='undef'
-d_endpwent_r='undef'
-d_endsent='undef'
-d_endservent_r='undef'
-d_eofnblk='define'
-d_eunice='undef'
-d_faststdio='define'
-d_fchdir='undef'
-d_fchmod='undef'
-d_fchown='undef'
-d_fcntl_can_lock='undef'
-d_fcntl='undef'
-d_fd_macros='define'
-d_fd_set='define'
-d_fds_bits='define'
-d_fgetpos='define'
-d_finitel='undef'
-d_finite='undef'
-d_flexfnam='define'
-d_flock='define'
-d_flockproto='define'
-d_fork='undef'
-d_fp_class='undef'
-d_fpathconf='undef'
-d_fpclass='undef'
-d_fpclassify='undef'
-d_fpclassl='undef'
-d_fpos64_t='undef'
-d_frexpl='undef'
-d_fs_data_s='undef'
-d_fseeko='undef'
-d_fsetpos='define'
-d_fstatfs='undef'
-d_fstatvfs='undef'
-d_fsync='undef'
-d_ftello='undef'
-d_ftime='define'
-d_futimes='undef'
-d_gdbm_ndbm_h_uses_prototypes='undef'
-d_gdbmndbm_h_uses_prototypes='undef'
-d_getaddrinfo='undef'
-d_getcwd='define'
-d_getespwnam='undef'
-d_getfsstat='undef'
-d_getgrent='undef'
-d_getgrent_r='undef'
-d_getgrgid_r='undef'
-d_getgrnam_r='undef'
-d_getgrps='undef'
-d_gethbyaddr='define'
-d_gethbyname='define'
-d_gethent='undef'
-d_gethname='define'
-d_gethostbyaddr_r='undef'
-d_gethostbyname_r='undef'
-d_gethostent_r='undef'
-d_gethostprotos='define'
-d_getitimer='undef'
-d_getlogin='define'
-d_getlogin_r='undef'
-d_getmnt='undef'
-d_getmntent='undef'
-d_getnameinfo='undef'
-d_getnbyaddr='undef'
-d_getnbyname='undef'
-d_getnent='undef'
-d_getnetbyaddr_r='undef'
-d_getnetbyname_r='undef'
-d_getnetent_r='undef'
-d_getnetprotos='undef'
-d_getpagsz='undef'
-d_getpbyname='define'
-d_getpbynumber='define'
-d_getpent='undef'
-d_getpgid='undef'
-d_getpgrp2='undef'
-d_getpgrp='undef'
-d_getppid='undef'
-d_getprior='undef'
-d_getprotobyname_r='undef'
-d_getprotobynumber_r='undef'
-d_getprotoent_r='undef'
-d_getprotoprotos='define'
-d_getprpwnam='undef'
-d_getpwent='undef'
-d_getpwent_r='undef'
-d_getpwnam_r='undef'
-d_getpwuid_r='undef'
-d_getsbyname='define'
-d_getsbyport='define'
-d_getsent='undef'
-d_getservbyname_r='undef'
-d_getservbyport_r='undef'
-d_getservent_r='undef'
-d_getservprotos='define'
-d_getspnam='undef'
-d_getspnam_r='undef'
-d_gettimeod='define'
-d_gmtime64='undef'
-d_gmtime_r='undef'
-d_gnulibc='undef'
-d_grpasswd='undef'
-d_hasmntopt='undef'
-d_htonl='define'
-d_ilogbl='undef'
-d_inc_version_list='undef'
-d_index='undef'
-d_inetaton='undef'
-d_inetntop='undef'
-d_inetpton='undef'
-d_int64_t='undef'
-d_isascii='define'
-d_isfinite='undef'
-d_isinf='undef'
-d_isnan='define'
-d_isnanl='undef'
-d_killpg='define'
-d_lchown='undef'
-d_ldbl_dig='define'
-d_libm_lib_version='undef'
-d_link='define'
-d_localtime64='undef'
-d_localtime_r='undef'
-d_localtime_r_needs_tzset='undef'
-d_locconv='define'
-d_lockf='undef'
-d_longdbl='define'
-d_longlong='undef'
-d_lseekproto='define'
-d_lstat='undef'
-d_madvise='undef'
-d_malloc_good_size='undef'
-d_malloc_size='undef'
-d_mblen='define'
-d_mbstowcs='define'
-d_mbtowc='define'
-d_memchr='define'
-d_memcmp='define'
-d_memcpy='define'
-d_memmove='define'
-d_memset='define'
-d_mkdir='define'
-d_mkdtemp='undef'
-d_mkfifo='undef'
-d_mkstemp='undef'
-d_mkstemps='undef'
-d_mktime64='undef'
-d_mktime='define'
-d_mmap='undef'
-d_modfl='undef'
-d_modfl_pow32_bug='undef'
-d_modflproto='undef'
-d_mprotect='undef'
-d_msgctl='undef'
-d_msg_ctrunc='undef'
-d_msg_dontroute='undef'
-d_msgget='undef'
-d_msghdr_s='undef'
-d_msg_oob='undef'
-d_msg_peek='undef'
-d_msg_proxy='undef'
-d_msgrcv='undef'
-d_msgsnd='undef'
-d_msg='undef'
-d_msync='undef'
-d_munmap='undef'
-d_mymalloc='undef'
-d_ndbm='undef'
-d_ndbm_h_uses_prototypes='undef'
-d_nice='undef'
-d_nl_langinfo='undef'
-d_nv_preserves_uv='undef'
-d_nv_zero_is_allbits_zero='define'
-d_off64_t='undef'
-d_old_pthread_create_joinable='undef'
-d_oldpthreads='undef'
-d_oldsock='undef'
-d_open3='undef'
-d_pathconf='undef'
-d_pause='define'
-d_perl_otherlibdirs='undef'
-d_phostname='undef'
-d_pipe='define'
-d_poll='undef'
-d_portable='define'
-d_prctl='undef'
-d_prctl_set_name='undef'
-d_printf_format_null='undef'
-d_procselfexe='undef'
-d_pseudofork='undef'
-d_pthread_atfork='undef'
-d_pthread_attr_setscope='undef'
-d_pthread_yield='undef'
-d_pwage='undef'
-d_pwchange='undef'
-d_pwclass='undef'
-d_pwcomment='undef'
-d_pwexpire='undef'
-d_pwgecos='undef'
-d_pwpasswd='undef'
-d_pwquota='undef'
-d_qgcvt='undef'
-d_quad='define'
-d_random_r='undef'
-d_readdir64_r='undef'
-d_readdir='define'
-d_readdir_r='undef'
-d_readlink='undef'
-d_readv='undef'
-d_recvmsg='undef'
-d_rename='define'
-d_rewinddir='define'
-d_rmdir='define'
-d_safebcpy='undef'
-d_safemcpy='undef'
-d_sanemcmp='define'
-d_sbrkproto='undef'
-d_scalbnl='undef'
-d_sched_yield='undef'
-d_scm_rights='undef'
-d_seekdir='define'
-d_select='define'
-d_sem='undef'
-d_semctl='undef'
-d_semctl_semid_ds='undef'
-d_semctl_semun='undef'
-d_semget='undef'
-d_semop='undef'
-d_sendmsg='undef'
-d_setegid='undef'
-d_seteuid='undef'
-d_setgrent='undef'
-d_setgrent_r='undef'
-d_setgrps='undef'
-d_sethent='undef'
-d_sethostent_r='undef'
-d_setitimer='undef'
-d_setlinebuf='undef'
-d_setlocale='define'
-d_setlocale_r='undef'
-d_setnent='undef'
-d_setnetent_r='undef'
-d_setpent='undef'
-d_setpgid='undef'
-d_setpgrp2='undef'
-d_setpgrp='undef'
-d_setprior='undef'
-d_setproctitle='undef'
-d_setprotoent_r='undef'
-d_setpwent='undef'
-d_setpwent_r='undef'
-d_setregid='undef'
-d_setresgid='undef'
-d_setresuid='undef'
-d_setreuid='undef'
-d_setrgid='undef'
-d_setruid='undef'
-d_setsent='undef'
-d_setservent_r='undef'
-d_setsid='undef'
-d_setvbuf='define'
-d_sfio='undef'
-d_shm='undef'
-d_shmat='undef'
-d_shmatprototype='undef'
-d_shmctl='undef'
-d_shmdt='undef'
-d_shmget='undef'
-d_sigaction='undef'
-d_signbit='undef'
-d_sigprocmask='undef'
-d_sigsetjmp='undef'
-d_sin6_scope_id='define'
-d_sitearch='define'
-d_snprintf='define'
-d_sockaddr_sa_len='undef'
-d_sockatmark='undef'
-d_sockatmarkproto='undef'
-d_socket='define'
-d_socklen_t='undef'
-d_sockpair='undef'
-d_socks5_init='undef'
-d_sprintf_returns_strlen='define'
-d_sqrtl='undef'
-d_srand48_r='undef'
-d_srandom_r='undef'
-d_sresgproto='undef'
-d_sresuproto='undef'
-d_statblks='undef'
-d_static_inline='define'
-d_statfs_f_flags='undef'
-d_statfs_s='undef'
-d_statvfs='undef'
-d_stdio_cnt_lval='define'
-d_stdio_ptr_lval='define'
-d_stdio_ptr_lval_nochange_cnt='define'
-d_stdio_ptr_lval_sets_cnt='undef'
-d_stdio_stream_array='undef'
-d_stdiobase='define'
-d_stdstdio='define'
-d_strchr='define'
-d_strcoll='define'
-d_strctcpy='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
-d_strerror_r='undef'
-d_strftime='define'
-d_strlcat='undef'
-d_strlcpy='undef'
-d_strtod='define'
-d_strtol='define'
-d_strtold='undef'
-d_strtoll='define'
-d_strtoq='undef'
-d_strtoul='define'
-d_strtoull='define'
-d_strtouq='undef'
-d_strxfrm='define'
-d_suidsafe='undef'
-d_symlink='undef'
-d_syscall='undef'
-d_syscallproto='undef'
-d_sysconf='undef'
-d_sysernlst=''
-d_syserrlst='define'
-d_system='define'
-d_tcgetpgrp='undef'
-d_tcsetpgrp='undef'
-d_telldir='define'
-d_telldirproto='define'
-d_time='define'
-d_timegm='undef'
-d_times='define'
-d_tm_tm_gmtoff='undef'
-d_tm_tm_zone='undef'
-d_tmpnam_r='undef'
-d_truncate='undef'
-d_ttyname_r='undef'
-d_tzname='define'
-d_u32align='define'
-d_ualarm='undef'
-d_umask='define'
-d_uname='define'
-d_union_semun='define'
-d_unordered='undef'
-d_unsetenv='undef'
-d_usleep='undef'
-d_usleepproto='undef'
-d_ustat='undef'
-d_vendorarch='undef'
-d_vendorbin='undef'
-d_vendorlib='undef'
-d_vendorscript='undef'
-d_vfork='undef'
-d_void_closedir='undef'
-d_voidsig='define'
-d_voidtty=''
-d_volatile='define'
-d_vprintf='define'
-d_vsnprintf='define'
-d_wait4='undef'
-d_waitpid='define'
-d_wcstombs='define'
-d_wctomb='define'
-d_writev='undef'
-d_xenix='undef'
-date='date'
-db_hashtype='int'
-db_prefixtype='int'
-db_version_major='0'
-db_version_minor='0'
-db_version_patch='0'
-defvoidused='15'
-direntrytype='struct direct'
-dlext='dll'
-dlsrc='dl_win32.xs'
-doublesize='8'
-drand01='(rand()/(double)((unsigned)1<<RANDBITS))'
-drand48_r_proto='0'
-dtrace=''
-dynamic_ext='Socket IO Fcntl Opcode SDBM_File attributes'
-eagain='EAGAIN'
-ebcdic='undef'
-echo='echo'
-egrep='egrep'
-emacs=''
-endgrent_r_proto='0'
-endhostent_r_proto='0'
-endnetent_r_proto='0'
-endprotoent_r_proto='0'
-endpwent_r_proto='0'
-endservent_r_proto='0'
-eunicefix=':'
-exe_ext='.exe'
-expr='expr'
-extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
-extern_C='extern'
-extras=''
-fflushNULL='define'
-fflushall='undef'
-find='find'
-firstmakefile='makefile'
-flex=''
-fpossize='8'
-fpostype='fpos_t'
-freetype='void'
-from=':'
-full_ar=''
-full_csh=''
-full_sed=''
-gccansipedantic=''
-gccosandvers=''
-gccversion=''
-getgrent_r_proto='0'
-getgrgid_r_proto='0'
-getgrnam_r_proto='0'
-gethostbyaddr_r_proto='0'
-gethostbyname_r_proto='0'
-gethostent_r_proto='0'
-getlogin_r_proto='0'
-getnetbyaddr_r_proto='0'
-getnetbyname_r_proto='0'
-getnetent_r_proto='0'
-getprotobyname_r_proto='0'
-getprotobynumber_r_proto='0'
-getprotoent_r_proto='0'
-getpwent_r_proto='0'
-getpwnam_r_proto='0'
-getpwuid_r_proto='0'
-getservbyname_r_proto='0'
-getservbyport_r_proto='0'
-getservent_r_proto='0'
-getspnam_r_proto='0'
-gidformat='"ld"'
-gidsign='-1'
-gidsize='4'
-gidtype='gid_t'
-glibpth='/usr/shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib /usr/shlib '
-gmake='gmake'
-gmtime_r_proto='0'
-gnulibc_version=''
-grep='grep'
-groupcat=''
-groupstype='gid_t'
-gzip='gzip'
-h_fcntl='false'
-h_sysfile='true'
-hint='recommended'
-hostcat='ypcat hosts'
-html1dir=' '
-html1direxp=''
-html3dir=' '
-html3direxp=''
-i16size='2'
-i16type='short'
-i32size='4'
-i32type='long'
-i64size='8'
-i64type='__int64'
-i8size='1'
-i8type='char'
-i_arpainet='define'
-i_assert='define'
-i_bsdioctl=''
-i_crypt='undef'
-i_db='undef'
-i_dbm='undef'
-i_dirent='define'
-i_dld='undef'
-i_dlfcn='define'
-i_fcntl='define'
-i_float='define'
-i_fp='undef'
-i_fp_class='undef'
-i_gdbm='undef'
-i_gdbm_ndbm='undef'
-i_gdbmndbm='undef'
-i_grp='undef'
-i_ieeefp='undef'
-i_inttypes='undef'
-i_langinfo='undef'
-i_libutil='undef'
-i_limits='define'
-i_locale='define'
-i_machcthr='undef'
-i_malloc='define'
-i_mallocmalloc='undef'
-i_math='define'
-i_memory='undef'
-i_mntent='undef'
-i_ndbm='undef'
-i_netdb='undef'
-i_neterrno='undef'
-i_netinettcp='undef'
-i_niin='undef'
-i_poll='undef'
-i_prot='undef'
-i_pthread='undef'
-i_pwd='undef'
-i_rpcsvcdbm='define'
-i_sfio='undef'
-i_sgtty='undef'
-i_shadow='undef'
-i_socks='undef'
-i_stdarg='define'
-i_stddef='define'
-i_stdlib='define'
-i_string='define'
-i_sunmath='undef'
-i_sysaccess='undef'
-i_sysdir='undef'
-i_sysfile='undef'
-i_sysfilio='define'
-i_sysin='undef'
-i_sysioctl='undef'
-i_syslog='undef'
-i_sysmman='undef'
-i_sysmode='undef'
-i_sysmount='undef'
-i_sysndir='undef'
-i_sysparam='undef'
-i_syspoll='undef'
-i_sysresrc='undef'
-i_syssecrt='undef'
-i_sysselct='undef'
-i_syssockio='undef'
-i_sysstat='define'
-i_sysstatfs='undef'
-i_sysstatvfs='undef'
-i_systime='undef'
-i_systimek='undef'
-i_systimes='undef'
-i_systypes='define'
-i_sysuio='undef'
-i_sysun='undef'
-i_sysutsname='undef'
-i_sysvfs='undef'
-i_syswait='undef'
-i_termio='undef'
-i_termios='undef'
-i_time='define'
-i_unistd='undef'
-i_ustat='undef'
-i_utime='define'
-i_values='undef'
-i_varargs='undef'
-i_varhdr='varargs.h'
-i_vfork='undef'
-ignore_versioned_solibs=''
-inc_version_list=''
-inc_version_list_init='0'
-incpath=''
-inews=''
-initialinstalllocation=''
-installarchlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~'
-installbin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-installhtml1dir=''
-installhtml3dir=''
-installhtmldir='~INST_TOP~~INST_VER~\html'
-installhtmlhelpdir='~INST_TOP~~INST_VER~\htmlhelp'
-installman1dir='~INST_TOP~~INST_VER~\man\man1'
-installman3dir='~INST_TOP~~INST_VER~\man\man3'
-installprefix='~INST_TOP~~INST_VER~'
-installprefixexp='~INST_TOP~~INST_VER~'
-installprivlib='~INST_TOP~~INST_VER~\lib'
-installscript='~INST_TOP~~INST_VER~\bin'
-installsitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
-installsitebin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
-installsitehtml1dir=''
-installsitehtml3dir=''
-installsitelib='~INST_TOP~\site~INST_VER~\lib'
-installsiteman1dir=''
-installsiteman3dir=''
-installsitescript=''
-installstyle='lib'
-installusrbinperl='undef'
-installvendorarch=''
-installvendorbin=''
-installvendorhtml1dir=''
-installvendorhtml3dir=''
-installvendorlib=''
-installvendorman1dir=''
-installvendorman3dir=''
-installvendorscript=''
-intsize='4'
-issymlink=''
-ivdformat='"I64d"'
-ivsize='8'
-ivtype='__int64'
-known_extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
-ksh=''
-ld='link'
-lddlflags='-dll ~LINK_FLAGS~'
-ldflags='~LINK_FLAGS~'
-ldflags_uselargefiles=''
-ldlibpthname=''
-less='less'
-lib_ext='.lib'
-libc='msvcrt.lib'
-libperl='perl.lib'
-libpth=''
-libs=''
-libsdirs=''
-libsfiles=''
-libsfound=''
-libspath=''
-libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
-libswanted_uselargefiles='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
-line='line'
-lint=''
-lkflags=''
-ln=''
-lns='copy'
-localtime_r_proto='0'
-locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
-loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
-longdblsize='8'
-longlongsize='8'
-longsize='4'
-lp=''
-lpr=''
-ls='dir'
-lseeksize='4'
-lseektype='long'
-mad='undef'
-madlyh=''
-madlyobj=''
-madlysrc=''
-mail=''
-mailx=''
-make='nmake'
-make_set_make='#'
-mallocobj='malloc.o'
-mallocsrc='malloc.c'
-malloctype='void *'
-man1dir='~INST_TOP~~INST_VER~\man\man1'
-man1direxp='~INST_TOP~~INST_VER~\man\man1'
-man1ext='1'
-man3dir='~INST_TOP~~INST_VER~\man\man3'
-man3direxp='~INST_TOP~~INST_VER~\man\man3'
-man3ext='3'
-mips_type=''
-mistrustnm=''
-mkdir='mkdir'
-mmaptype='void *'
-modetype='mode_t'
-more='more /e'
-multiarch='undef'
-mv=''
-myarchname='MSWin32'
-mydomain=''
-myhostname=''
-myuname=''
-n='-n'
-need_va_copy='undef'
-netdb_hlen_type='int'
-netdb_host_type='char *'
-netdb_name_type='char *'
-netdb_net_type='long'
-nm=''
-nm_opt=''
-nm_so_opt=''
-nonxs_ext='Errno'
-nroff=''
-nvEUformat='"E"'
-nvFUformat='"F"'
-nvGUformat='"G"'
-nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
-nv_preserves_uv_bits='53'
-nveformat='"e"'
-nvfformat='"f"'
-nvgformat='"g"'
-nvsize='8'
-nvtype='double'
-o_nonblock='O_NONBLOCK'
-obj_ext='.obj'
-old_pthread_create_joinable=''
-optimize='-O'
-orderlib='false'
-osname='MSWin32'
-osvers='4.0'
-otherlibdirs=''
-package='perl5'
-pager='more /e'
-passcat=''
-patchlevel='~PERL_VERSION~'
-path_sep=';'
-perl5=''
-perl='perl'
-perl_patchlevel='~PERL_PATCHLEVEL~'
-perladmin=''
-perllibs='~libs~'
-perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe'
-perl_static_inline='static __inline'
-pg=''
-phostname='hostname'
-pidtype='int'
-plibpth=''
-pmake=''
-pr=''
-prefix='~INST_TOP~'
-prefixexp='~INST_TOP~'
-privlib='~INST_TOP~~INST_VER~\lib'
-privlibexp='~INST_TOP~~INST_VER~\lib'
-procselfexe=''
-prototype='define'
-ptrsize='8'
-quadkind='5'
-quadtype='__int64'
-randbits='15'
-randfunc='rand'
-random_r_proto='0'
-randseedtype='unsigned'
-ranlib='rem'
-rd_nodata='-1'
-readdir64_r_proto='0'
-readdir_r_proto='0'
-revision='5'
-rm='del'
-rm_try=''
-rmail=''
-run=''
-runnm='true'
-sGMTIME_max="2147483647"
-sGMTIME_min="0"
-sLOCALTIME_max="2147483647"
-sLOCALTIME_min="0"
-sPRIEUldbl='"E"'
-sPRIFUldbl='"F"'
-sPRIGUldbl='"G"'
-sPRIXU64='"I64X"'
-sPRId64='"I64d"'
-sPRIeldbl='"e"'
-sPRIfldbl='"f"'
-sPRIgldbl='"g"'
-sPRIi64='"I64i"'
-sPRIo64='"I64o"'
-sPRIu64='"I64u"'
-sPRIx64='"I64x"'
-sSCNfldbl='"f"'
-sched_yield=''
-scriptdir='~INST_TOP~~INST_VER~\bin'
-scriptdirexp='~INST_TOP~~INST_VER~\bin'
-sed='sed'
-seedfunc='srand'
-selectminbits='32'
-selecttype='Perl_fd_set *'
-sendmail='blat'
-setgrent_r_proto='0'
-sethostent_r_proto='0'
-setlocale_r_proto='0'
-setnetent_r_proto='0'
-setprotoent_r_proto='0'
-setpwent_r_proto='0'
-setservent_r_proto='0'
-sh='cmd /x /c'
-shar=''
-sharpbang='#!'
-shmattype='void *'
-shortsize='2'
-shrpenv=''
-shsharp='true'
-sig_count='26'
-sig_name='ZERO HUP INT QUIT ILL NUM05 NUM06 NUM07 FPE KILL NUM10 SEGV NUM12 PIPE ALRM TERM NUM16 NUM17 NUM18 NUM19 CHLD BREAK ABRT STOP NUM24 CONT CLD'
-sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0'
-sig_num='0 1 2 21 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20'
-sig_num_init='0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0'
-sig_size='27'
-signal_t='void'
-sitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
-sitearchexp='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
-sitebin='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~'
-sitebinexp='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~'
-sitehtml1dir=''
-sitehtml1direxp=''
-sitehtml3dir=''
-sitehtml3direxp=''
-sitelib='~INST_TOP~\site~INST_VER~\lib'
-sitelib_stem=''
-sitelibexp='~INST_TOP~\site~INST_VER~\lib'
-siteman1dir=''
-siteman1direxp=''
-siteman3dir=''
-siteman3direxp=''
-siteprefix='~INST_TOP~\site~INST_VER~'
-siteprefixexp='~INST_TOP~\site~INST_VER~'
-sitescript=''
-sitescriptexp=''
-sizesize='8'
-sizetype='size_t'
-sleep=''
-smail=''
-so='dll'
-sockethdr=''
-socketlib=''
-socksizetype='int'
-sort='sort'
-spackage='Perl5'
-spitshell=''
-srand48_r_proto='0'
-srandom_r_proto='0'
-src=''
-ssizetype='__int64'
-startperl='#!perl'
-startsh='#!/bin/sh'
-static_ext=' '
-stdchar='char'
-stdio_base='((fp)->_base)'
-stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)'
-stdio_cnt='((fp)->_cnt)'
-stdio_filbuf=''
-stdio_ptr='((fp)->_ptr)'
-stdio_stream_array=''
-strerror_r_proto='0'
-strings='/usr/include/string.h'
-submit=''
-subversion='~SUBVERSION~'
-sysman='/usr/man/man1'
-tail=''
-tar=''
-targetarch=''
-tbl=''
-tee=''
-test=''
-timeincl='/usr/include/sys/time.h '
-timetype='time_t'
-tmpnam_r_proto='0'
-to=':'
-touch='touch'
-tr=''
-trnl='\012'
-troff=''
-ttyname_r_proto='0'
-u16size='2'
-u16type='unsigned short'
-u32size='4'
-u32type='unsigned long'
-u64size='8'
-u64type='unsigned __int64'
-u8size='1'
-u8type='unsigned char'
-uidformat='"ld"'
-uidsign='-1'
-uidsize='4'
-uidtype='uid_t'
-uname='uname'
-uniq='uniq'
-uquadtype='unsigned __int64'
-use5005threads='undef'
-use64bitall='undef'
-use64bitint='define'
-usecrosscompile='undef'
-usedevel='undef'
-usedl='define'
-usedtrace='undef'
-usefaststdio='undef'
-useithreads='undef'
-uselargefiles='undef'
-uselongdouble='undef'
-usemallocwrap='define'
-usemorebits='undef'
-usemultiplicity='undef'
-usemymalloc='n'
-usenm='false'
-useopcode='true'
-useperlio='undef'
-useposix='true'
-usereentrant='undef'
-userelocatableinc='undef'
-usesfio='false'
-useshrplib='true'
-usesitecustomize='undef'
-usesocks='undef'
-usethreads='undef'
-usevendorprefix='undef'
-usevfork='false'
-usrinc='/usr/include'
-uuname=''
-uvXUformat='"I64X"'
-uvoformat='"I64o"'
-uvsize='8'
-uvtype='unsigned __int64'
-uvuformat='"I64u"'
-uvxformat='"I64x"'
-vaproto='undef'
-vendorarch=''
-vendorarchexp=''
-vendorbin=''
-vendorbinexp=''
-vendorhtml1dir=' '
-vendorhtml1direxp=''
-vendorhtml3dir=' '
-vendorhtml3direxp=''
-vendorlib=''
-vendorlib_stem=''
-vendorlibexp=''
-vendorman1dir=' '
-vendorman1direxp=''
-vendorman3dir=' '
-vendorman3direxp=''
-vendorprefix=''
-vendorprefixexp=''
-vendorscript=''
-vendorscriptexp=''
-version='~VERSION~'
-version_patchlevel_string=''
-versiononly='undef'
-vi=''
-voidflags='15'
-xlibpth='/usr/lib/386 /lib/386'
-yacc='yacc'
-yaccflags=''
-zcat=''
-zip='zip'
-PERL_REVISION='~PERL_REVISION~'
-PERL_SUBVERSION='~PERL_SUBVERSION~'
-PERL_VERSION='~PERL_VERSION~'
-PERL_API_REVISION='~PERL_API_REVISION~'
-PERL_API_SUBVERSION='~PERL_API_SUBVERSION~'
-PERL_API_VERSION='~PERL_API_VERSION~'
-PERL_PATCHLEVEL='~PERL_PATCHLEVEL~'
-PERL_CONFIG_SH='true'
Deleted: vendor/perl/dist/win32/config_H.bc
===================================================================
--- vendor/perl/dist/win32/config_H.bc 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/config_H.bc 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,4670 +0,0 @@
-/*
- * This file was produced by running the config_h.SH script, which
- * gets its values from undef, which is generally produced by
- * running Configure.
- *
- * Feel free to modify any of this as the need arises. Note, however,
- * that running config_h.SH again will wipe out any changes you've made.
- * For a more permanent change edit undef and rerun config_h.SH.
- *
- * $Id: config_H.bc,v 1.1.1.1 2011-05-19 23:03:36 laffer1 Exp $
- */
-
-/*
- * Package name : perl5
- * Source directory :
- * Configuration time: Mon Jan 11 00:09:46 2010
- * Configured by : Steve
- * Target system :
- */
-
-#ifndef _config_h_
-#define _config_h_
-
-/* LOC_SED:
- * This symbol holds the complete pathname to the sed program.
- */
-#define LOC_SED "" /**/
-
-/* HAS_ALARM:
- * This symbol, if defined, indicates that the alarm routine is
- * available.
- */
-#define HAS_ALARM /**/
-
-/* HAS_BCMP:
- * This symbol is defined if the bcmp() routine is available to
- * compare blocks of memory.
- */
-/*#define HAS_BCMP / **/
-
-/* HAS_BCOPY:
- * This symbol is defined if the bcopy() routine is available to
- * copy blocks of memory.
- */
-/*#define HAS_BCOPY / **/
-
-/* HAS_BZERO:
- * This symbol is defined if the bzero() routine is available to
- * set a memory block to 0.
- */
-/*#define HAS_BZERO / **/
-
-/* HAS_CHOWN:
- * This symbol, if defined, indicates that the chown routine is
- * available.
- */
-/*#define HAS_CHOWN / **/
-
-/* HAS_CHROOT:
- * This symbol, if defined, indicates that the chroot routine is
- * available.
- */
-/*#define HAS_CHROOT / **/
-
-/* HAS_CHSIZE:
- * This symbol, if defined, indicates that the chsize routine is available
- * to truncate files. You might need a -lx to get this routine.
- */
-#define HAS_CHSIZE /**/
-
-/* HAS_CRYPT:
- * This symbol, if defined, indicates that the crypt routine is available
- * to encrypt passwords and the like.
- */
-/*#define HAS_CRYPT / **/
-
-/* HAS_CTERMID:
- * This symbol, if defined, indicates that the ctermid routine is
- * available to generate filename for terminal.
- */
-/*#define HAS_CTERMID / **/
-
-/* HAS_CUSERID:
- * This symbol, if defined, indicates that the cuserid routine is
- * available to get character login names.
- */
-/*#define HAS_CUSERID / **/
-
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-#define HAS_DBL_DIG /**/
-
-/* HAS_DIFFTIME:
- * This symbol, if defined, indicates that the difftime routine is
- * available.
- */
-#define HAS_DIFFTIME /**/
-
-/* HAS_DLERROR:
- * This symbol, if defined, indicates that the dlerror routine is
- * available to return a string describing the last error that
- * occurred from a call to dlopen(), dlclose() or dlsym().
- */
-#define HAS_DLERROR /**/
-
-/* HAS_DUP2:
- * This symbol, if defined, indicates that the dup2 routine is
- * available to duplicate file descriptors.
- */
-#define HAS_DUP2 /**/
-
-/* HAS_FCHMOD:
- * This symbol, if defined, indicates that the fchmod routine is available
- * to change mode of opened files. If unavailable, use chmod().
- */
-/*#define HAS_FCHMOD / **/
-
-/* HAS_FCHOWN:
- * This symbol, if defined, indicates that the fchown routine is available
- * to change ownership of opened files. If unavailable, use chown().
- */
-/*#define HAS_FCHOWN / **/
-
-/* HAS_FCNTL:
- * This symbol, if defined, indicates to the C program that
- * the fcntl() function exists.
- */
-/*#define HAS_FCNTL / **/
-
-/* HAS_FGETPOS:
- * This symbol, if defined, indicates that the fgetpos routine is
- * available to get the file position indicator, similar to ftell().
- */
-#define HAS_FGETPOS /**/
-
-/* HAS_FLOCK:
- * This symbol, if defined, indicates that the flock routine is
- * available to do file locking.
- */
-#define HAS_FLOCK /**/
-
-/* HAS_FORK:
- * This symbol, if defined, indicates that the fork routine is
- * available.
- */
-/*#define HAS_FORK / **/
-
-/* HAS_FSETPOS:
- * This symbol, if defined, indicates that the fsetpos routine is
- * available to set the file position indicator, similar to fseek().
- */
-#define HAS_FSETPOS /**/
-
-/* HAS_GETTIMEOFDAY:
- * This symbol, if defined, indicates that the gettimeofday() system
- * call is available for a sub-second accuracy clock. Usually, the file
- * <sys/resource.h> needs to be included (see I_SYS_RESOURCE).
- * The type "Timeval" should be used to refer to "struct timeval".
- */
-#define HAS_GETTIMEOFDAY /**/
-#ifdef HAS_GETTIMEOFDAY
-#define Timeval struct timeval /* Structure used by gettimeofday() */
-#endif
-
-/* HAS_GETGROUPS:
- * This symbol, if defined, indicates that the getgroups() routine is
- * available to get the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
-/*#define HAS_GETGROUPS / **/
-
-/* HAS_GETLOGIN:
- * This symbol, if defined, indicates that the getlogin routine is
- * available to get the login name.
- */
-#define HAS_GETLOGIN /**/
-
-/* HAS_GETPGID:
- * This symbol, if defined, indicates to the C program that
- * the getpgid(pid) function is available to get the
- * process group id.
- */
-/*#define HAS_GETPGID / **/
-
-/* HAS_GETPGRP2:
- * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
- * routine is available to get the current process group.
- */
-/*#define HAS_GETPGRP2 / **/
-
-/* HAS_GETPPID:
- * This symbol, if defined, indicates that the getppid routine is
- * available to get the parent process ID.
- */
-/*#define HAS_GETPPID / **/
-
-/* HAS_GETPRIORITY:
- * This symbol, if defined, indicates that the getpriority routine is
- * available to get a process's priority.
- */
-/*#define HAS_GETPRIORITY / **/
-
-/* HAS_INET_ATON:
- * This symbol, if defined, indicates to the C program that the
- * inet_aton() function is available to parse IP address "dotted-quad"
- * strings.
- */
-/*#define HAS_INET_ATON / **/
-
-/* HAS_KILLPG:
- * This symbol, if defined, indicates that the killpg routine is available
- * to kill process groups. If unavailable, you probably should use kill
- * with a negative process number.
- */
-#define HAS_KILLPG /**/
-
-/* HAS_LINK:
- * This symbol, if defined, indicates that the link routine is
- * available to create hard links.
- */
-#define HAS_LINK /**/
-
-/* HAS_LOCALECONV:
- * This symbol, if defined, indicates that the localeconv routine is
- * available for numeric and monetary formatting conventions.
- */
-#define HAS_LOCALECONV /**/
-
-/* HAS_LOCKF:
- * This symbol, if defined, indicates that the lockf routine is
- * available to do file locking.
- */
-/*#define HAS_LOCKF / **/
-
-/* HAS_LSTAT:
- * This symbol, if defined, indicates that the lstat routine is
- * available to do file stats on symbolic links.
- */
-/*#define HAS_LSTAT / **/
-
-/* HAS_MBLEN:
- * This symbol, if defined, indicates that the mblen routine is available
- * to find the number of bytes in a multibye character.
- */
-#define HAS_MBLEN /**/
-
-/* HAS_MBSTOWCS:
- * This symbol, if defined, indicates that the mbstowcs routine is
- * available to covert a multibyte string into a wide character string.
- */
-#define HAS_MBSTOWCS /**/
-
-/* HAS_MBTOWC:
- * This symbol, if defined, indicates that the mbtowc routine is available
- * to covert a multibyte to a wide character.
- */
-#define HAS_MBTOWC /**/
-
-/* HAS_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * to compare blocks of memory.
- */
-#define HAS_MEMCMP /**/
-
-/* HAS_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy blocks of memory.
- */
-#define HAS_MEMCPY /**/
-
-/* HAS_MEMMOVE:
- * This symbol, if defined, indicates that the memmove routine is available
- * to copy potentially overlapping blocks of memory. This should be used
- * only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your
- * own version.
- */
-#define HAS_MEMMOVE /**/
-
-/* HAS_MEMSET:
- * This symbol, if defined, indicates that the memset routine is available
- * to set blocks of memory.
- */
-#define HAS_MEMSET /**/
-
-/* HAS_MKDIR:
- * This symbol, if defined, indicates that the mkdir routine is available
- * to create directories. Otherwise you should fork off a new process to
- * exec /bin/mkdir.
- */
-#define HAS_MKDIR /**/
-
-/* HAS_MKFIFO:
- * This symbol, if defined, indicates that the mkfifo routine is
- * available to create FIFOs. Otherwise, mknod should be able to
- * do it for you. However, if mkfifo is there, mknod might require
- * super-user privileges which mkfifo will not.
- */
-/*#define HAS_MKFIFO / **/
-
-/* HAS_MKTIME:
- * This symbol, if defined, indicates that the mktime routine is
- * available.
- */
-#define HAS_MKTIME /**/
-
-/* HAS_MSYNC:
- * This symbol, if defined, indicates that the msync system call is
- * available to synchronize a mapped file.
- */
-/*#define HAS_MSYNC / **/
-
-/* HAS_MUNMAP:
- * This symbol, if defined, indicates that the munmap system call is
- * available to unmap a region, usually mapped by mmap().
- */
-/*#define HAS_MUNMAP / **/
-
-/* HAS_NICE:
- * This symbol, if defined, indicates that the nice routine is
- * available.
- */
-/*#define HAS_NICE / **/
-
-/* HAS_PATHCONF:
- * This symbol, if defined, indicates that pathconf() is available
- * to determine file-system related limits and options associated
- * with a given filename.
- */
-/* HAS_FPATHCONF:
- * This symbol, if defined, indicates that pathconf() is available
- * to determine file-system related limits and options associated
- * with a given open file descriptor.
- */
-/*#define HAS_PATHCONF / **/
-/*#define HAS_FPATHCONF / **/
-
-/* HAS_PAUSE:
- * This symbol, if defined, indicates that the pause routine is
- * available to suspend a process until a signal is received.
- */
-#define HAS_PAUSE /**/
-
-/* HAS_PIPE:
- * This symbol, if defined, indicates that the pipe routine is
- * available to create an inter-process channel.
- */
-#define HAS_PIPE /**/
-
-/* HAS_POLL:
- * This symbol, if defined, indicates that the poll routine is
- * available to poll active file descriptors. Please check I_POLL and
- * I_SYS_POLL to know which header should be included as well.
- */
-/*#define HAS_POLL / **/
-
-/* HAS_READDIR:
- * This symbol, if defined, indicates that the readdir routine is
- * available to read directory entries. You may have to include
- * <dirent.h>. See I_DIRENT.
- */
-#define HAS_READDIR /**/
-
-/* HAS_SEEKDIR:
- * This symbol, if defined, indicates that the seekdir routine is
- * available. You may have to include <dirent.h>. See I_DIRENT.
- */
-#define HAS_SEEKDIR /**/
-
-/* HAS_TELLDIR:
- * This symbol, if defined, indicates that the telldir routine is
- * available. You may have to include <dirent.h>. See I_DIRENT.
- */
-#define HAS_TELLDIR /**/
-
-/* HAS_REWINDDIR:
- * This symbol, if defined, indicates that the rewinddir routine is
- * available. You may have to include <dirent.h>. See I_DIRENT.
- */
-#define HAS_REWINDDIR /**/
-
-/* HAS_READLINK:
- * This symbol, if defined, indicates that the readlink routine is
- * available to read the value of a symbolic link.
- */
-/*#define HAS_READLINK / **/
-
-/* HAS_RENAME:
- * This symbol, if defined, indicates that the rename routine is available
- * to rename files. Otherwise you should do the unlink(), link(), unlink()
- * trick.
- */
-#define HAS_RENAME /**/
-
-/* HAS_RMDIR:
- * This symbol, if defined, indicates that the rmdir routine is
- * available to remove directories. Otherwise you should fork off a
- * new process to exec /bin/rmdir.
- */
-#define HAS_RMDIR /**/
-
-/* HAS_SELECT:
- * This symbol, if defined, indicates that the select routine is
- * available to select active file descriptors. If the timeout field
- * is used, <sys/time.h> may need to be included.
- */
-#define HAS_SELECT /**/
-
-/* HAS_SETEGID:
- * This symbol, if defined, indicates that the setegid routine is available
- * to change the effective gid of the current program.
- */
-/*#define HAS_SETEGID / **/
-
-/* HAS_SETEUID:
- * This symbol, if defined, indicates that the seteuid routine is available
- * to change the effective uid of the current program.
- */
-/*#define HAS_SETEUID / **/
-
-/* HAS_SETGROUPS:
- * This symbol, if defined, indicates that the setgroups() routine is
- * available to set the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
-/*#define HAS_SETGROUPS / **/
-
-/* HAS_SETLINEBUF:
- * This symbol, if defined, indicates that the setlinebuf routine is
- * available to change stderr or stdout from block-buffered or unbuffered
- * to a line-buffered mode.
- */
-/*#define HAS_SETLINEBUF / **/
-
-/* HAS_SETLOCALE:
- * This symbol, if defined, indicates that the setlocale routine is
- * available to handle locale-specific ctype implementations.
- */
-#define HAS_SETLOCALE /**/
-
-/* HAS_SETPGID:
- * This symbol, if defined, indicates that the setpgid(pid, gpid)
- * routine is available to set process group ID.
- */
-/*#define HAS_SETPGID / **/
-
-/* HAS_SETPGRP2:
- * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
- * routine is available to set the current process group.
- */
-/*#define HAS_SETPGRP2 / **/
-
-/* HAS_SETPRIORITY:
- * This symbol, if defined, indicates that the setpriority routine is
- * available to set a process's priority.
- */
-/*#define HAS_SETPRIORITY / **/
-
-/* HAS_SETREGID:
- * This symbol, if defined, indicates that the setregid routine is
- * available to change the real and effective gid of the current
- * process.
- */
-/* HAS_SETRESGID:
- * This symbol, if defined, indicates that the setresgid routine is
- * available to change the real, effective and saved gid of the current
- * process.
- */
-/*#define HAS_SETREGID / **/
-/*#define HAS_SETRESGID / **/
-
-/* HAS_SETREUID:
- * This symbol, if defined, indicates that the setreuid routine is
- * available to change the real and effective uid of the current
- * process.
- */
-/* HAS_SETRESUID:
- * This symbol, if defined, indicates that the setresuid routine is
- * available to change the real, effective and saved uid of the current
- * process.
- */
-/*#define HAS_SETREUID / **/
-/*#define HAS_SETRESUID / **/
-
-/* HAS_SETRGID:
- * This symbol, if defined, indicates that the setrgid routine is available
- * to change the real gid of the current program.
- */
-/*#define HAS_SETRGID / **/
-
-/* HAS_SETRUID:
- * This symbol, if defined, indicates that the setruid routine is available
- * to change the real uid of the current program.
- */
-/*#define HAS_SETRUID / **/
-
-/* HAS_SETSID:
- * This symbol, if defined, indicates that the setsid routine is
- * available to set the process group ID.
- */
-/*#define HAS_SETSID / **/
-
-/* HAS_STRCHR:
- * This symbol is defined to indicate that the strchr()/strrchr()
- * functions are available for string searching. If not, try the
- * index()/rindex() pair.
- */
-/* HAS_INDEX:
- * This symbol is defined to indicate that the index()/rindex()
- * functions are available for string searching.
- */
-#define HAS_STRCHR /**/
-/*#define HAS_INDEX / **/
-
-/* HAS_STRCOLL:
- * This symbol, if defined, indicates that the strcoll routine is
- * available to compare strings using collating information.
- */
-#define HAS_STRCOLL /**/
-
-/* HAS_STRTOD:
- * This symbol, if defined, indicates that the strtod routine is
- * available to provide better numeric string conversion than atof().
- */
-#define HAS_STRTOD /**/
-
-/* HAS_STRTOL:
- * This symbol, if defined, indicates that the strtol routine is available
- * to provide better numeric string conversion than atoi() and friends.
- */
-#define HAS_STRTOL /**/
-
-/* HAS_STRXFRM:
- * This symbol, if defined, indicates that the strxfrm() routine is
- * available to transform strings.
- */
-#define HAS_STRXFRM /**/
-
-/* HAS_SYMLINK:
- * This symbol, if defined, indicates that the symlink routine is available
- * to create symbolic links.
- */
-/*#define HAS_SYMLINK / **/
-
-/* HAS_SYSCALL:
- * This symbol, if defined, indicates that the syscall routine is
- * available to call arbitrary system calls. If undefined, that's tough.
- */
-/*#define HAS_SYSCALL / **/
-
-/* HAS_SYSCONF:
- * This symbol, if defined, indicates that sysconf() is available
- * to determine system related limits and options.
- */
-/*#define HAS_SYSCONF / **/
-
-/* HAS_SYSTEM:
- * This symbol, if defined, indicates that the system routine is
- * available to issue a shell command.
- */
-#define HAS_SYSTEM /**/
-
-/* HAS_TCGETPGRP:
- * This symbol, if defined, indicates that the tcgetpgrp routine is
- * available to get foreground process group ID.
- */
-/*#define HAS_TCGETPGRP / **/
-
-/* HAS_TCSETPGRP:
- * This symbol, if defined, indicates that the tcsetpgrp routine is
- * available to set foreground process group ID.
- */
-/*#define HAS_TCSETPGRP / **/
-
-/* HAS_TRUNCATE:
- * This symbol, if defined, indicates that the truncate routine is
- * available to truncate files.
- */
-/*#define HAS_TRUNCATE / **/
-
-/* HAS_TZNAME:
- * This symbol, if defined, indicates that the tzname[] array is
- * available to access timezone names.
- */
-#define HAS_TZNAME /**/
-
-/* HAS_UMASK:
- * This symbol, if defined, indicates that the umask routine is
- * available to set and get the value of the file creation mask.
- */
-#define HAS_UMASK /**/
-
-/* HAS_USLEEP:
- * This symbol, if defined, indicates that the usleep routine is
- * available to let the process sleep on a sub-second accuracy.
- */
-/*#define HAS_USLEEP / **/
-
-/* HAS_WAIT4:
- * This symbol, if defined, indicates that wait4() exists.
- */
-/*#define HAS_WAIT4 / **/
-
-/* HAS_WAITPID:
- * This symbol, if defined, indicates that the waitpid routine is
- * available to wait for child process.
- */
-#define HAS_WAITPID /**/
-
-/* HAS_WCSTOMBS:
- * This symbol, if defined, indicates that the wcstombs routine is
- * available to convert wide character strings to multibyte strings.
- */
-#define HAS_WCSTOMBS /**/
-
-/* HAS_WCTOMB:
- * This symbol, if defined, indicates that the wctomb routine is available
- * to covert a wide character to a multibyte.
- */
-#define HAS_WCTOMB /**/
-
-/* Groups_t:
- * This symbol holds the type used for the second argument to
- * getgroups() and setgroups(). Usually, this is the same as
- * gidtype (gid_t) , but sometimes it isn't.
- * It can be int, ushort, gid_t, etc...
- * It may be necessary to include <sys/types.h> to get any
- * typedef'ed information. This is only required if you have
- * getgroups() or setgroups()..
- */
-#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
-#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */
-#endif
-
-/* I_ARPA_INET:
- * This symbol, if defined, indicates to the C program that it should
- * include <arpa/inet.h> to get inet_addr and friends declarations.
- */
-#define I_ARPA_INET /**/
-
-/* I_DBM:
- * This symbol, if defined, indicates that <dbm.h> exists and should
- * be included.
- */
-/* I_RPCSVC_DBM:
- * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
- * should be included.
- */
-/*#define I_DBM / **/
-#define I_RPCSVC_DBM /**/
-
-/* I_DLFCN:
- * This symbol, if defined, indicates that <dlfcn.h> exists and should
- * be included.
- */
-#define I_DLFCN /**/
-
-/* I_FCNTL:
- * This manifest constant tells the C program to include <fcntl.h>.
- */
-#define I_FCNTL /**/
-
-/* I_FLOAT:
- * This symbol, if defined, indicates to the C program that it should
- * include <float.h> to get definition of symbols like DBL_MAX or
- * DBL_MIN, i.e. machine dependent floating point values.
- */
-#define I_FLOAT /**/
-
-/* I_GDBM:
- * This symbol, if defined, indicates that <gdbm.h> exists and should
- * be included.
- */
-/*#define I_GDBM / **/
-
-/* I_LIMITS:
- * This symbol, if defined, indicates to the C program that it should
- * include <limits.h> to get definition of symbols like WORD_BIT or
- * LONG_MAX, i.e. machine dependant limitations.
- */
-#define I_LIMITS /**/
-
-/* I_LOCALE:
- * This symbol, if defined, indicates to the C program that it should
- * include <locale.h>.
- */
-#define I_LOCALE /**/
-
-/* I_MATH:
- * This symbol, if defined, indicates to the C program that it should
- * include <math.h>.
- */
-#define I_MATH /**/
-
-/* I_MEMORY:
- * This symbol, if defined, indicates to the C program that it should
- * include <memory.h>.
- */
-/*#define I_MEMORY / **/
-
-/* I_NETINET_IN:
- * This symbol, if defined, indicates to the C program that it should
- * include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
- */
-/*#define I_NETINET_IN / **/
-
-/* I_SFIO:
- * This symbol, if defined, indicates to the C program that it should
- * include <sfio.h>.
- */
-/*#define I_SFIO / **/
-
-/* I_STDDEF:
- * This symbol, if defined, indicates that <stddef.h> exists and should
- * be included.
- */
-#define I_STDDEF /**/
-
-/* I_STDLIB:
- * This symbol, if defined, indicates that <stdlib.h> exists and should
- * be included.
- */
-#define I_STDLIB /**/
-
-/* I_STRING:
- * This symbol, if defined, indicates to the C program that it should
- * include <string.h> (USG systems) instead of <strings.h> (BSD systems).
- */
-#define I_STRING /**/
-
-/* I_SYS_DIR:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/dir.h>.
- */
-/*#define I_SYS_DIR / **/
-
-/* I_SYS_FILE:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/file.h> to get definition of R_OK and friends.
- */
-/*#define I_SYS_FILE / **/
-
-/* I_SYS_IOCTL:
- * This symbol, if defined, indicates that <sys/ioctl.h> exists and should
- * be included. Otherwise, include <sgtty.h> or <termio.h>.
- */
-/* I_SYS_SOCKIO:
- * This symbol, if defined, indicates the <sys/sockio.h> should be included
- * to get socket ioctl options, like SIOCATMARK.
- */
-/*#define I_SYS_IOCTL / **/
-/*#define I_SYS_SOCKIO / **/
-
-/* I_SYS_NDIR:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/ndir.h>.
- */
-/*#define I_SYS_NDIR / **/
-
-/* I_SYS_PARAM:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/param.h>.
- */
-/*#define I_SYS_PARAM / **/
-
-/* I_SYS_POLL:
- * This symbol, if defined, indicates that the program may include
- * <sys/poll.h>. When I_POLL is also defined, it's probably safest
- * to only include <poll.h>.
- */
-/*#define I_SYS_POLL / **/
-
-/* I_SYS_RESOURCE:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/resource.h>.
- */
-/*#define I_SYS_RESOURCE / **/
-
-/* I_SYS_SELECT:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/select.h> in order to get definition of struct timeval.
- */
-/*#define I_SYS_SELECT / **/
-
-/* I_SYS_STAT:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/stat.h>.
- */
-#define I_SYS_STAT /**/
-
-/* I_SYS_TIMES:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/times.h>.
- */
-/*#define I_SYS_TIMES / **/
-
-/* I_SYS_TYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/types.h>.
- */
-#define I_SYS_TYPES /**/
-
-/* I_SYS_UN:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/un.h> to get UNIX domain socket definitions.
- */
-/*#define I_SYS_UN / **/
-
-/* I_SYS_WAIT:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/wait.h>.
- */
-/*#define I_SYS_WAIT / **/
-
-/* I_TERMIO:
- * This symbol, if defined, indicates that the program should include
- * <termio.h> rather than <sgtty.h>. There are also differences in
- * the ioctl() calls that depend on the value of this symbol.
- */
-/* I_TERMIOS:
- * This symbol, if defined, indicates that the program should include
- * the POSIX termios.h rather than sgtty.h or termio.h.
- * There are also differences in the ioctl() calls that depend on the
- * value of this symbol.
- */
-/* I_SGTTY:
- * This symbol, if defined, indicates that the program should include
- * <sgtty.h> rather than <termio.h>. There are also differences in
- * the ioctl() calls that depend on the value of this symbol.
- */
-/*#define I_TERMIO / **/
-/*#define I_TERMIOS / **/
-/*#define I_SGTTY / **/
-
-/* I_UNISTD:
- * This symbol, if defined, indicates to the C program that it should
- * include <unistd.h>.
- */
-/*#define I_UNISTD / **/
-
-/* I_UTIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <utime.h>.
- */
-#define I_UTIME /**/
-
-/* I_VALUES:
- * This symbol, if defined, indicates to the C program that it should
- * include <values.h> to get definition of symbols like MINFLOAT or
- * MAXLONG, i.e. machine dependant limitations. Probably, you
- * should use <limits.h> instead, if it is available.
- */
-/*#define I_VALUES / **/
-
-/* I_VFORK:
- * This symbol, if defined, indicates to the C program that it should
- * include vfork.h.
- */
-/*#define I_VFORK / **/
-
-/* CAN_VAPROTO:
- * This variable is defined on systems supporting prototype declaration
- * of functions with a variable number of arguments.
- */
-/* _V:
- * This macro is used to declare function parameters in prototypes for
- * functions with a variable number of parameters. Use double parentheses.
- * For example:
- *
- * int printf _V((char *fmt, ...));
- *
- * Remember to use the plain simple _() macro when declaring a function
- * with no variable number of arguments, since it might be possible to
- * have a non-effect _V() macro and still get prototypes via _().
- */
-/*#define CAN_VAPROTO / **/
-#ifdef CAN_VAPROTO
-#define _V(args) args
-#else
-#define _V(args) ()
-#endif
-
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE 4 /**/
-#define LONGSIZE 4 /**/
-#define SHORTSIZE 2 /**/
-
-/* MULTIARCH:
- * This symbol, if defined, signifies that the build
- * process will produce some binary files that are going to be
- * used in a cross-platform environment. This is the case for
- * example with the NeXT "fat" binaries that contain executables
- * for several CPUs.
- */
-/*#define MULTIARCH / **/
-
-/* HAS_QUAD:
- * This symbol, if defined, tells that there's a 64-bit integer type,
- * Quad_t, and its unsigned counterpar, Uquad_t. QUADKIND will be one
- * of QUAD_IS_INT, QUAD_IS_LONG, QUAD_IS_LONG_LONG, QUAD_IS_INT64_T,
- * or QUAD_IS___INT64.
- */
-#define HAS_QUAD /**/
-#ifdef HAS_QUAD
-# define Quad_t __int64 /**/
-# define Uquad_t unsigned __int64 /**/
-# define QUADKIND 5 /**/
-# define QUAD_IS_INT 1
-# define QUAD_IS_LONG 2
-# define QUAD_IS_LONG_LONG 3
-# define QUAD_IS_INT64_T 4
-# define QUAD_IS___INT64 5
-#endif
-
-/* OSNAME:
- * This symbol contains the name of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-/* OSVERS:
- * This symbol contains the version of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-#define OSNAME "MSWin32" /**/
-#define OSVERS "5.1" /**/
-
-/* ARCHLIB:
- * This variable, if defined, holds the name of the directory in
- * which the user wants to put architecture-dependent public
- * library files for perl5. It is most often a local directory
- * such as /usr/local/lib. Programs using this variable must be
- * prepared to deal with filename expansion. If ARCHLIB is the
- * same as PRIVLIB, it is not defined, since presumably the
- * program already searches PRIVLIB.
- */
-/* ARCHLIB_EXP:
- * This symbol contains the ~name expanded version of ARCHLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-#define ARCHLIB "c:\\perl\\lib" /**/
-/*#define ARCHLIB_EXP "" / **/
-
-/* ARCHNAME:
- * This symbol holds a string representing the architecture name.
- * It may be used to construct an architecture-dependant pathname
- * where library files may be held under a private library, for
- * instance.
- */
-#define ARCHNAME "MSWin32-x86" /**/
-
-/* BIN:
- * This symbol holds the path of the bin directory where the package will
- * be installed. Program must be prepared to deal with ~name substitution.
- */
-/* BIN_EXP:
- * This symbol is the filename expanded version of the BIN symbol, for
- * programs that do not want to deal with that at run-time.
- */
-/* PERL_RELOCATABLE_INC:
- * This symbol, if defined, indicates that we'd like to relocate entries
- * in @INC at run time based on the location of the perl binary.
- */
-#define BIN "c:\\perl\\bin" /**/
-#define BIN_EXP "c:\\perl\\bin" /**/
-#define PERL_RELOCATABLE_INC "undef" /**/
-
-/* CAT2:
- * This macro concatenates 2 tokens together.
- */
-/* STRINGIFY:
- * This macro surrounds its token with double quotes.
- */
-#if 42 == 1
-#define CAT2(a,b) a/**/b
-#define STRINGIFY(a) "a"
-#endif
-#if 42 == 42
-#define PeRl_CaTiFy(a, b) a ## b
-#define PeRl_StGiFy(a) #a
-#define CAT2(a,b) PeRl_CaTiFy(a,b)
-#define StGiFy(a) PeRl_StGiFy(a)
-#define STRINGIFY(a) PeRl_StGiFy(a)
-#endif
-#if 42 != 1 && 42 != 42
-#include "Bletch: How does this C preprocessor concatenate tokens?"
-#endif
-
-/* CPPSTDIN:
- * This symbol contains the first part of the string which will invoke
- * the C preprocessor on the standard input and produce to standard
- * output. Typical value of "cc -E" or "/lib/cpp", but it can also
- * call a wrapper. See CPPRUN.
- */
-/* CPPMINUS:
- * This symbol contains the second part of the string which will invoke
- * the C preprocessor on the standard input and produce to standard
- * output. This symbol will have the value "-" if CPPSTDIN needs a minus
- * to specify standard input, otherwise the value is "".
- */
-/* CPPRUN:
- * This symbol contains the string which will invoke a C preprocessor on
- * the standard input and produce to standard output. It needs to end
- * with CPPLAST, after all other preprocessor flags have been specified.
- * The main difference with CPPSTDIN is that this program will never be a
- * pointer to a shell wrapper, i.e. it will be empty if no preprocessor is
- * available directly to the user. Note that it may well be different from
- * the preprocessor used to compile the C program.
- */
-/* CPPLAST:
- * This symbol is intended to be used along with CPPRUN in the same manner
- * symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "".
- */
-#define CPPSTDIN "cppstdin"
-#define CPPMINUS ""
-#define CPPRUN "cpp32 -oCON"
-#define CPPLAST ""
-
-/* HAS_ACCESS:
- * This manifest constant lets the C program know that the access()
- * system call is available to check for accessibility using real UID/GID.
- * (always present on UNIX.)
- */
-#define HAS_ACCESS /**/
-
-/* HAS_ACCESSX:
- * This symbol, if defined, indicates that the accessx routine is
- * available to do extended access checks.
- */
-/*#define HAS_ACCESSX / **/
-
-/* HAS_ASCTIME_R:
- * This symbol, if defined, indicates that the asctime_r routine
- * is available to asctime re-entrantly.
- */
-/* ASCTIME_R_PROTO:
- * This symbol encodes the prototype of asctime_r.
- * It is zero if d_asctime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_asctime_r
- * is defined.
- */
-/*#define HAS_ASCTIME_R / **/
-#define ASCTIME_R_PROTO 0 /**/
-
-/* HASATTRIBUTE_FORMAT:
- * Can we handle GCC attribute for checking printf-style formats
- */
-/* PRINTF_FORMAT_NULL_OK:
- * Allows __printf__ format to be null when checking printf-style
- */
-/* HASATTRIBUTE_MALLOC:
- * Can we handle GCC attribute for malloc-style functions.
- */
-/* HASATTRIBUTE_NONNULL:
- * Can we handle GCC attribute for nonnull function parms.
- */
-/* HASATTRIBUTE_NORETURN:
- * Can we handle GCC attribute for functions that do not return
- */
-/* HASATTRIBUTE_PURE:
- * Can we handle GCC attribute for pure functions
- */
-/* HASATTRIBUTE_UNUSED:
- * Can we handle GCC attribute for unused variables and arguments
- */
-/* HASATTRIBUTE_DEPRECATED:
- * Can we handle GCC attribute for marking deprecated APIs
- */
-/* HASATTRIBUTE_WARN_UNUSED_RESULT:
- * Can we handle GCC attribute for warning on unused results
- */
-/*#define HASATTRIBUTE_DEPRECATED / **/
-/*#define HASATTRIBUTE_FORMAT / **/
-/*#define PRINTF_FORMAT_NULL_OK / **/
-/*#define HASATTRIBUTE_NORETURN / **/
-/*#define HASATTRIBUTE_MALLOC / **/
-/*#define HASATTRIBUTE_NONNULL / **/
-/*#define HASATTRIBUTE_PURE / **/
-/*#define HASATTRIBUTE_UNUSED / **/
-/*#define HASATTRIBUTE_WARN_UNUSED_RESULT / **/
-
-/* HASCONST:
- * This symbol, if defined, indicates that this C compiler knows about
- * the const type. There is no need to actually test for that symbol
- * within your programs. The mere use of the "const" keyword will
- * trigger the necessary tests.
- */
-#define HASCONST /**/
-#ifndef HASCONST
-#define const
-#endif
-
-/* HAS_CRYPT_R:
- * This symbol, if defined, indicates that the crypt_r routine
- * is available to crypt re-entrantly.
- */
-/* CRYPT_R_PROTO:
- * This symbol encodes the prototype of crypt_r.
- * It is zero if d_crypt_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_crypt_r
- * is defined.
- */
-/*#define HAS_CRYPT_R / **/
-#define CRYPT_R_PROTO 0 /**/
-
-/* HAS_CSH:
- * This symbol, if defined, indicates that the C-shell exists.
- */
-/* CSH:
- * This symbol, if defined, contains the full pathname of csh.
- */
-/*#define HAS_CSH / **/
-#ifdef HAS_CSH
-#define CSH "" /**/
-#endif
-
-/* HAS_CTERMID_R:
- * This symbol, if defined, indicates that the ctermid_r routine
- * is available to ctermid re-entrantly.
- */
-/* CTERMID_R_PROTO:
- * This symbol encodes the prototype of ctermid_r.
- * It is zero if d_ctermid_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctermid_r
- * is defined.
- */
-/*#define HAS_CTERMID_R / **/
-#define CTERMID_R_PROTO 0 /**/
-
-/* HAS_CTIME_R:
- * This symbol, if defined, indicates that the ctime_r routine
- * is available to ctime re-entrantly.
- */
-/* CTIME_R_PROTO:
- * This symbol encodes the prototype of ctime_r.
- * It is zero if d_ctime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctime_r
- * is defined.
- */
-/*#define HAS_CTIME_R / **/
-#define CTIME_R_PROTO 0 /**/
-
-/* HAS_DRAND48_R:
- * This symbol, if defined, indicates that the drand48_r routine
- * is available to drand48 re-entrantly.
- */
-/* DRAND48_R_PROTO:
- * This symbol encodes the prototype of drand48_r.
- * It is zero if d_drand48_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_drand48_r
- * is defined.
- */
-/*#define HAS_DRAND48_R / **/
-#define DRAND48_R_PROTO 0 /**/
-
-/* HAS_DRAND48_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the drand48() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern double drand48(void);
- */
-/*#define HAS_DRAND48_PROTO / **/
-
-/* HAS_EACCESS:
- * This symbol, if defined, indicates that the eaccess routine is
- * available to do extended access checks.
- */
-/*#define HAS_EACCESS / **/
-
-/* HAS_ENDGRENT:
- * This symbol, if defined, indicates that the getgrent routine is
- * available for finalizing sequential access of the group database.
- */
-/*#define HAS_ENDGRENT / **/
-
-/* HAS_ENDGRENT_R:
- * This symbol, if defined, indicates that the endgrent_r routine
- * is available to endgrent re-entrantly.
- */
-/* ENDGRENT_R_PROTO:
- * This symbol encodes the prototype of endgrent_r.
- * It is zero if d_endgrent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endgrent_r
- * is defined.
- */
-/*#define HAS_ENDGRENT_R / **/
-#define ENDGRENT_R_PROTO 0 /**/
-
-/* HAS_ENDHOSTENT:
- * This symbol, if defined, indicates that the endhostent() routine is
- * available to close whatever was being used for host queries.
- */
-/*#define HAS_ENDHOSTENT / **/
-
-/* HAS_ENDHOSTENT_R:
- * This symbol, if defined, indicates that the endhostent_r routine
- * is available to endhostent re-entrantly.
- */
-/* ENDHOSTENT_R_PROTO:
- * This symbol encodes the prototype of endhostent_r.
- * It is zero if d_endhostent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endhostent_r
- * is defined.
- */
-/*#define HAS_ENDHOSTENT_R / **/
-#define ENDHOSTENT_R_PROTO 0 /**/
-
-/* HAS_ENDNETENT:
- * This symbol, if defined, indicates that the endnetent() routine is
- * available to close whatever was being used for network queries.
- */
-/*#define HAS_ENDNETENT / **/
-
-/* HAS_ENDNETENT_R:
- * This symbol, if defined, indicates that the endnetent_r routine
- * is available to endnetent re-entrantly.
- */
-/* ENDNETENT_R_PROTO:
- * This symbol encodes the prototype of endnetent_r.
- * It is zero if d_endnetent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endnetent_r
- * is defined.
- */
-/*#define HAS_ENDNETENT_R / **/
-#define ENDNETENT_R_PROTO 0 /**/
-
-/* HAS_ENDPROTOENT:
- * This symbol, if defined, indicates that the endprotoent() routine is
- * available to close whatever was being used for protocol queries.
- */
-/*#define HAS_ENDPROTOENT / **/
-
-/* HAS_ENDPROTOENT_R:
- * This symbol, if defined, indicates that the endprotoent_r routine
- * is available to endprotoent re-entrantly.
- */
-/* ENDPROTOENT_R_PROTO:
- * This symbol encodes the prototype of endprotoent_r.
- * It is zero if d_endprotoent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endprotoent_r
- * is defined.
- */
-/*#define HAS_ENDPROTOENT_R / **/
-#define ENDPROTOENT_R_PROTO 0 /**/
-
-/* HAS_ENDPWENT:
- * This symbol, if defined, indicates that the getgrent routine is
- * available for finalizing sequential access of the passwd database.
- */
-/*#define HAS_ENDPWENT / **/
-
-/* HAS_ENDPWENT_R:
- * This symbol, if defined, indicates that the endpwent_r routine
- * is available to endpwent re-entrantly.
- */
-/* ENDPWENT_R_PROTO:
- * This symbol encodes the prototype of endpwent_r.
- * It is zero if d_endpwent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endpwent_r
- * is defined.
- */
-/*#define HAS_ENDPWENT_R / **/
-#define ENDPWENT_R_PROTO 0 /**/
-
-/* HAS_ENDSERVENT:
- * This symbol, if defined, indicates that the endservent() routine is
- * available to close whatever was being used for service queries.
- */
-/*#define HAS_ENDSERVENT / **/
-
-/* HAS_ENDSERVENT_R:
- * This symbol, if defined, indicates that the endservent_r routine
- * is available to endservent re-entrantly.
- */
-/* ENDSERVENT_R_PROTO:
- * This symbol encodes the prototype of endservent_r.
- * It is zero if d_endservent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endservent_r
- * is defined.
- */
-/*#define HAS_ENDSERVENT_R / **/
-#define ENDSERVENT_R_PROTO 0 /**/
-
-/* FLEXFILENAMES:
- * This symbol, if defined, indicates that the system supports filenames
- * longer than 14 characters.
- */
-#define FLEXFILENAMES /**/
-
-/* HAS_GETGRENT:
- * This symbol, if defined, indicates that the getgrent routine is
- * available for sequential access of the group database.
- */
-/*#define HAS_GETGRENT / **/
-
-/* HAS_GETGRENT_R:
- * This symbol, if defined, indicates that the getgrent_r routine
- * is available to getgrent re-entrantly.
- */
-/* GETGRENT_R_PROTO:
- * This symbol encodes the prototype of getgrent_r.
- * It is zero if d_getgrent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrent_r
- * is defined.
- */
-/*#define HAS_GETGRENT_R / **/
-#define GETGRENT_R_PROTO 0 /**/
-
-/* HAS_GETGRGID_R:
- * This symbol, if defined, indicates that the getgrgid_r routine
- * is available to getgrgid re-entrantly.
- */
-/* GETGRGID_R_PROTO:
- * This symbol encodes the prototype of getgrgid_r.
- * It is zero if d_getgrgid_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrgid_r
- * is defined.
- */
-/*#define HAS_GETGRGID_R / **/
-#define GETGRGID_R_PROTO 0 /**/
-
-/* HAS_GETGRNAM_R:
- * This symbol, if defined, indicates that the getgrnam_r routine
- * is available to getgrnam re-entrantly.
- */
-/* GETGRNAM_R_PROTO:
- * This symbol encodes the prototype of getgrnam_r.
- * It is zero if d_getgrnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrnam_r
- * is defined.
- */
-/*#define HAS_GETGRNAM_R / **/
-#define GETGRNAM_R_PROTO 0 /**/
-
-/* HAS_GETHOSTBYADDR:
- * This symbol, if defined, indicates that the gethostbyaddr() routine is
- * available to look up hosts by their IP addresses.
- */
-#define HAS_GETHOSTBYADDR /**/
-
-/* HAS_GETHOSTBYNAME:
- * This symbol, if defined, indicates that the gethostbyname() routine is
- * available to look up host names in some data base or other.
- */
-#define HAS_GETHOSTBYNAME /**/
-
-/* HAS_GETHOSTENT:
- * This symbol, if defined, indicates that the gethostent() routine is
- * available to look up host names in some data base or another.
- */
-/*#define HAS_GETHOSTENT / **/
-
-/* HAS_GETHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * gethostname() routine to derive the host name. See also HAS_UNAME
- * and PHOSTNAME.
- */
-/* HAS_UNAME:
- * This symbol, if defined, indicates that the C program may use the
- * uname() routine to derive the host name. See also HAS_GETHOSTNAME
- * and PHOSTNAME.
- */
-/* PHOSTNAME:
- * This symbol, if defined, indicates the command to feed to the
- * popen() routine to derive the host name. See also HAS_GETHOSTNAME
- * and HAS_UNAME. Note that the command uses a fully qualified path,
- * so that it is safe even if used by a process with super-user
- * privileges.
- */
-/* HAS_PHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * contents of PHOSTNAME as a command to feed to the popen() routine
- * to derive the host name.
- */
-#define HAS_GETHOSTNAME /**/
-#define HAS_UNAME /**/
-/*#define HAS_PHOSTNAME / **/
-#ifdef HAS_PHOSTNAME
-#define PHOSTNAME "" /* How to get the host name */
-#endif
-
-/* HAS_GETHOSTBYADDR_R:
- * This symbol, if defined, indicates that the gethostbyaddr_r routine
- * is available to gethostbyaddr re-entrantly.
- */
-/* GETHOSTBYADDR_R_PROTO:
- * This symbol encodes the prototype of gethostbyaddr_r.
- * It is zero if d_gethostbyaddr_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyaddr_r
- * is defined.
- */
-/*#define HAS_GETHOSTBYADDR_R / **/
-#define GETHOSTBYADDR_R_PROTO 0 /**/
-
-/* HAS_GETHOSTBYNAME_R:
- * This symbol, if defined, indicates that the gethostbyname_r routine
- * is available to gethostbyname re-entrantly.
- */
-/* GETHOSTBYNAME_R_PROTO:
- * This symbol encodes the prototype of gethostbyname_r.
- * It is zero if d_gethostbyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyname_r
- * is defined.
- */
-/*#define HAS_GETHOSTBYNAME_R / **/
-#define GETHOSTBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETHOSTENT_R:
- * This symbol, if defined, indicates that the gethostent_r routine
- * is available to gethostent re-entrantly.
- */
-/* GETHOSTENT_R_PROTO:
- * This symbol encodes the prototype of gethostent_r.
- * It is zero if d_gethostent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostent_r
- * is defined.
- */
-/*#define HAS_GETHOSTENT_R / **/
-#define GETHOSTENT_R_PROTO 0 /**/
-
-/* HAS_GETHOST_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for gethostent(), gethostbyname(), and
- * gethostbyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-#define HAS_GETHOST_PROTOS /**/
-
-/* HAS_GETLOGIN_R:
- * This symbol, if defined, indicates that the getlogin_r routine
- * is available to getlogin re-entrantly.
- */
-/* GETLOGIN_R_PROTO:
- * This symbol encodes the prototype of getlogin_r.
- * It is zero if d_getlogin_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getlogin_r
- * is defined.
- */
-/*#define HAS_GETLOGIN_R / **/
-#define GETLOGIN_R_PROTO 0 /**/
-
-/* HAS_GETNETBYADDR:
- * This symbol, if defined, indicates that the getnetbyaddr() routine is
- * available to look up networks by their IP addresses.
- */
-/*#define HAS_GETNETBYADDR / **/
-
-/* HAS_GETNETBYNAME:
- * This symbol, if defined, indicates that the getnetbyname() routine is
- * available to look up networks by their names.
- */
-/*#define HAS_GETNETBYNAME / **/
-
-/* HAS_GETNETENT:
- * This symbol, if defined, indicates that the getnetent() routine is
- * available to look up network names in some data base or another.
- */
-/*#define HAS_GETNETENT / **/
-
-/* HAS_GETNETBYADDR_R:
- * This symbol, if defined, indicates that the getnetbyaddr_r routine
- * is available to getnetbyaddr re-entrantly.
- */
-/* GETNETBYADDR_R_PROTO:
- * This symbol encodes the prototype of getnetbyaddr_r.
- * It is zero if d_getnetbyaddr_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyaddr_r
- * is defined.
- */
-/*#define HAS_GETNETBYADDR_R / **/
-#define GETNETBYADDR_R_PROTO 0 /**/
-
-/* HAS_GETNETBYNAME_R:
- * This symbol, if defined, indicates that the getnetbyname_r routine
- * is available to getnetbyname re-entrantly.
- */
-/* GETNETBYNAME_R_PROTO:
- * This symbol encodes the prototype of getnetbyname_r.
- * It is zero if d_getnetbyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyname_r
- * is defined.
- */
-/*#define HAS_GETNETBYNAME_R / **/
-#define GETNETBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETNETENT_R:
- * This symbol, if defined, indicates that the getnetent_r routine
- * is available to getnetent re-entrantly.
- */
-/* GETNETENT_R_PROTO:
- * This symbol encodes the prototype of getnetent_r.
- * It is zero if d_getnetent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetent_r
- * is defined.
- */
-/*#define HAS_GETNETENT_R / **/
-#define GETNETENT_R_PROTO 0 /**/
-
-/* HAS_GETNET_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for getnetent(), getnetbyname(), and
- * getnetbyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-/*#define HAS_GETNET_PROTOS / **/
-
-/* HAS_GETPROTOENT:
- * This symbol, if defined, indicates that the getprotoent() routine is
- * available to look up protocols in some data base or another.
- */
-/*#define HAS_GETPROTOENT / **/
-
-/* HAS_GETPGRP:
- * This symbol, if defined, indicates that the getpgrp routine is
- * available to get the current process group.
- */
-/* USE_BSD_GETPGRP:
- * This symbol, if defined, indicates that getpgrp needs one
- * arguments whereas USG one needs none.
- */
-/*#define HAS_GETPGRP / **/
-/*#define USE_BSD_GETPGRP / **/
-
-/* HAS_GETPROTOBYNAME:
- * This symbol, if defined, indicates that the getprotobyname()
- * routine is available to look up protocols by their name.
- */
-/* HAS_GETPROTOBYNUMBER:
- * This symbol, if defined, indicates that the getprotobynumber()
- * routine is available to look up protocols by their number.
- */
-#define HAS_GETPROTOBYNAME /**/
-#define HAS_GETPROTOBYNUMBER /**/
-
-/* HAS_GETPROTOBYNAME_R:
- * This symbol, if defined, indicates that the getprotobyname_r routine
- * is available to getprotobyname re-entrantly.
- */
-/* GETPROTOBYNAME_R_PROTO:
- * This symbol encodes the prototype of getprotobyname_r.
- * It is zero if d_getprotobyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobyname_r
- * is defined.
- */
-/*#define HAS_GETPROTOBYNAME_R / **/
-#define GETPROTOBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETPROTOBYNUMBER_R:
- * This symbol, if defined, indicates that the getprotobynumber_r routine
- * is available to getprotobynumber re-entrantly.
- */
-/* GETPROTOBYNUMBER_R_PROTO:
- * This symbol encodes the prototype of getprotobynumber_r.
- * It is zero if d_getprotobynumber_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobynumber_r
- * is defined.
- */
-/*#define HAS_GETPROTOBYNUMBER_R / **/
-#define GETPROTOBYNUMBER_R_PROTO 0 /**/
-
-/* HAS_GETPROTOENT_R:
- * This symbol, if defined, indicates that the getprotoent_r routine
- * is available to getprotoent re-entrantly.
- */
-/* GETPROTOENT_R_PROTO:
- * This symbol encodes the prototype of getprotoent_r.
- * It is zero if d_getprotoent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotoent_r
- * is defined.
- */
-/*#define HAS_GETPROTOENT_R / **/
-#define GETPROTOENT_R_PROTO 0 /**/
-
-/* HAS_GETPROTO_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for getprotoent(), getprotobyname(), and
- * getprotobyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-#define HAS_GETPROTO_PROTOS /**/
-
-/* HAS_GETPWENT:
- * This symbol, if defined, indicates that the getpwent routine is
- * available for sequential access of the passwd database.
- * If this is not available, the older getpw() function may be available.
- */
-/*#define HAS_GETPWENT / **/
-
-/* HAS_GETPWENT_R:
- * This symbol, if defined, indicates that the getpwent_r routine
- * is available to getpwent re-entrantly.
- */
-/* GETPWENT_R_PROTO:
- * This symbol encodes the prototype of getpwent_r.
- * It is zero if d_getpwent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwent_r
- * is defined.
- */
-/*#define HAS_GETPWENT_R / **/
-#define GETPWENT_R_PROTO 0 /**/
-
-/* HAS_GETPWNAM_R:
- * This symbol, if defined, indicates that the getpwnam_r routine
- * is available to getpwnam re-entrantly.
- */
-/* GETPWNAM_R_PROTO:
- * This symbol encodes the prototype of getpwnam_r.
- * It is zero if d_getpwnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwnam_r
- * is defined.
- */
-/*#define HAS_GETPWNAM_R / **/
-#define GETPWNAM_R_PROTO 0 /**/
-
-/* HAS_GETPWUID_R:
- * This symbol, if defined, indicates that the getpwuid_r routine
- * is available to getpwuid re-entrantly.
- */
-/* GETPWUID_R_PROTO:
- * This symbol encodes the prototype of getpwuid_r.
- * It is zero if d_getpwuid_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwuid_r
- * is defined.
- */
-/*#define HAS_GETPWUID_R / **/
-#define GETPWUID_R_PROTO 0 /**/
-
-/* HAS_GETSERVENT:
- * This symbol, if defined, indicates that the getservent() routine is
- * available to look up network services in some data base or another.
- */
-/*#define HAS_GETSERVENT / **/
-
-/* HAS_GETSERVBYNAME_R:
- * This symbol, if defined, indicates that the getservbyname_r routine
- * is available to getservbyname re-entrantly.
- */
-/* GETSERVBYNAME_R_PROTO:
- * This symbol encodes the prototype of getservbyname_r.
- * It is zero if d_getservbyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyname_r
- * is defined.
- */
-/*#define HAS_GETSERVBYNAME_R / **/
-#define GETSERVBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETSERVBYPORT_R:
- * This symbol, if defined, indicates that the getservbyport_r routine
- * is available to getservbyport re-entrantly.
- */
-/* GETSERVBYPORT_R_PROTO:
- * This symbol encodes the prototype of getservbyport_r.
- * It is zero if d_getservbyport_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyport_r
- * is defined.
- */
-/*#define HAS_GETSERVBYPORT_R / **/
-#define GETSERVBYPORT_R_PROTO 0 /**/
-
-/* HAS_GETSERVENT_R:
- * This symbol, if defined, indicates that the getservent_r routine
- * is available to getservent re-entrantly.
- */
-/* GETSERVENT_R_PROTO:
- * This symbol encodes the prototype of getservent_r.
- * It is zero if d_getservent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservent_r
- * is defined.
- */
-/*#define HAS_GETSERVENT_R / **/
-#define GETSERVENT_R_PROTO 0 /**/
-
-/* HAS_GETSERV_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for getservent(), getservbyname(), and
- * getservbyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-#define HAS_GETSERV_PROTOS /**/
-
-/* HAS_GETSPNAM_R:
- * This symbol, if defined, indicates that the getspnam_r routine
- * is available to getspnam re-entrantly.
- */
-/* GETSPNAM_R_PROTO:
- * This symbol encodes the prototype of getspnam_r.
- * It is zero if d_getspnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getspnam_r
- * is defined.
- */
-/*#define HAS_GETSPNAM_R / **/
-#define GETSPNAM_R_PROTO 0 /**/
-
-/* HAS_GETSERVBYNAME:
- * This symbol, if defined, indicates that the getservbyname()
- * routine is available to look up services by their name.
- */
-/* HAS_GETSERVBYPORT:
- * This symbol, if defined, indicates that the getservbyport()
- * routine is available to look up services by their port.
- */
-#define HAS_GETSERVBYNAME /**/
-#define HAS_GETSERVBYPORT /**/
-
-/* HAS_GMTIME_R:
- * This symbol, if defined, indicates that the gmtime_r routine
- * is available to gmtime re-entrantly.
- */
-/* GMTIME_R_PROTO:
- * This symbol encodes the prototype of gmtime_r.
- * It is zero if d_gmtime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gmtime_r
- * is defined.
- */
-/*#define HAS_GMTIME_R / **/
-#define GMTIME_R_PROTO 0 /**/
-
-/* HAS_HTONL:
- * This symbol, if defined, indicates that the htonl() routine (and
- * friends htons() ntohl() ntohs()) are available to do network
- * order byte swapping.
- */
-/* HAS_HTONS:
- * This symbol, if defined, indicates that the htons() routine (and
- * friends htonl() ntohl() ntohs()) are available to do network
- * order byte swapping.
- */
-/* HAS_NTOHL:
- * This symbol, if defined, indicates that the ntohl() routine (and
- * friends htonl() htons() ntohs()) are available to do network
- * order byte swapping.
- */
-/* HAS_NTOHS:
- * This symbol, if defined, indicates that the ntohs() routine (and
- * friends htonl() htons() ntohl()) are available to do network
- * order byte swapping.
- */
-#define HAS_HTONL /**/
-#define HAS_HTONS /**/
-#define HAS_NTOHL /**/
-#define HAS_NTOHS /**/
-
-/* HAS_LOCALTIME_R:
- * This symbol, if defined, indicates that the localtime_r routine
- * is available to localtime re-entrantly.
- */
-/* LOCALTIME_R_NEEDS_TZSET:
- * Many libc's localtime_r implementations do not call tzset,
- * making them differ from localtime(), and making timezone
- * changes using \undef{TZ} without explicitly calling tzset
- * impossible. This symbol makes us call tzset before localtime_r
- */
-/*#define LOCALTIME_R_NEEDS_TZSET / **/
-#ifdef LOCALTIME_R_NEEDS_TZSET
-#define L_R_TZSET tzset(),
-#else
-#define L_R_TZSET
-#endif
-
-/* LOCALTIME_R_PROTO:
- * This symbol encodes the prototype of localtime_r.
- * It is zero if d_localtime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_localtime_r
- * is defined.
- */
-/*#define HAS_LOCALTIME_R / **/
-#define LOCALTIME_R_PROTO 0 /**/
-
-/* HAS_LONG_DOUBLE:
- * This symbol will be defined if the C compiler supports long
- * doubles.
- */
-/* LONG_DOUBLESIZE:
- * This symbol contains the size of a long double, so that the
- * C preprocessor can make decisions based on it. It is only
- * defined if the system supports long doubles.
- */
-#define HAS_LONG_DOUBLE /**/
-#ifdef HAS_LONG_DOUBLE
-#define LONG_DOUBLESIZE 10 /**/
-#endif
-
-/* HAS_LONG_LONG:
- * This symbol will be defined if the C compiler supports long long.
- */
-/* LONGLONGSIZE:
- * This symbol contains the size of a long long, so that the
- * C preprocessor can make decisions based on it. It is only
- * defined if the system supports long long.
- */
-/*#define HAS_LONG_LONG / **/
-#ifdef HAS_LONG_LONG
-#define LONGLONGSIZE 8 /**/
-#endif
-
-/* HAS_LSEEK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the lseek() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern off_t lseek(int, off_t, int);
- */
-#define HAS_LSEEK_PROTO /**/
-
-/* HAS_MEMCHR:
- * This symbol, if defined, indicates that the memchr routine is available
- * to locate characters within a C string.
- */
-#define HAS_MEMCHR /**/
-
-/* HAS_MKSTEMP:
- * This symbol, if defined, indicates that the mkstemp routine is
- * available to exclusively create and open a uniquely named
- * temporary file.
- */
-/*#define HAS_MKSTEMP / **/
-
-/* HAS_MMAP:
- * This symbol, if defined, indicates that the mmap system call is
- * available to map a file into memory.
- */
-/* Mmap_t:
- * This symbol holds the return type of the mmap() system call
- * (and simultaneously the type of the first argument).
- * Usually set to 'void *' or 'caddr_t'.
- */
-/*#define HAS_MMAP / **/
-#define Mmap_t void * /**/
-
-/* HAS_MSG:
- * This symbol, if defined, indicates that the entire msg*(2) library is
- * supported (IPC mechanism based on message queues).
- */
-/*#define HAS_MSG / **/
-
-/* OLD_PTHREAD_CREATE_JOINABLE:
- * This symbol, if defined, indicates how to create pthread
- * in joinable (aka undetached) state. NOTE: not defined
- * if pthread.h already has defined PTHREAD_CREATE_JOINABLE
- * (the new version of the constant).
- * If defined, known values are PTHREAD_CREATE_UNDETACHED
- * and __UNDETACHED.
- */
-/*#define OLD_PTHREAD_CREATE_JOINABLE / **/
-
-/* HAS_PTHREAD_ATFORK:
- * This symbol, if defined, indicates that the pthread_atfork routine
- * is available to setup fork handlers.
- */
-/*#define HAS_PTHREAD_ATFORK / **/
-
-/* HAS_PTHREAD_YIELD:
- * This symbol, if defined, indicates that the pthread_yield
- * routine is available to yield the execution of the current
- * thread. sched_yield is preferable to pthread_yield.
- */
-/* SCHED_YIELD:
- * This symbol defines the way to yield the execution of
- * the current thread. Known ways are sched_yield,
- * pthread_yield, and pthread_yield with NULL.
- */
-/* HAS_SCHED_YIELD:
- * This symbol, if defined, indicates that the sched_yield
- * routine is available to yield the execution of the current
- * thread. sched_yield is preferable to pthread_yield.
- */
-/*#define HAS_PTHREAD_YIELD / **/
-#define SCHED_YIELD /**/
-/*#define HAS_SCHED_YIELD / **/
-
-/* HAS_RANDOM_R:
- * This symbol, if defined, indicates that the random_r routine
- * is available to random re-entrantly.
- */
-/* RANDOM_R_PROTO:
- * This symbol encodes the prototype of random_r.
- * It is zero if d_random_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_random_r
- * is defined.
- */
-/*#define HAS_RANDOM_R / **/
-#define RANDOM_R_PROTO 0 /**/
-
-/* HAS_READDIR64_R:
- * This symbol, if defined, indicates that the readdir64_r routine
- * is available to readdir64 re-entrantly.
- */
-/* READDIR64_R_PROTO:
- * This symbol encodes the prototype of readdir64_r.
- * It is zero if d_readdir64_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir64_r
- * is defined.
- */
-/*#define HAS_READDIR64_R / **/
-#define READDIR64_R_PROTO 0 /**/
-
-/* HAS_READDIR_R:
- * This symbol, if defined, indicates that the readdir_r routine
- * is available to readdir re-entrantly.
- */
-/* READDIR_R_PROTO:
- * This symbol encodes the prototype of readdir_r.
- * It is zero if d_readdir_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir_r
- * is defined.
- */
-/*#define HAS_READDIR_R / **/
-#define READDIR_R_PROTO 0 /**/
-
-/* HAS_SEM:
- * This symbol, if defined, indicates that the entire sem*(2) library is
- * supported.
- */
-/*#define HAS_SEM / **/
-
-/* HAS_SETGRENT:
- * This symbol, if defined, indicates that the setgrent routine is
- * available for initializing sequential access of the group database.
- */
-/*#define HAS_SETGRENT / **/
-
-/* HAS_SETGRENT_R:
- * This symbol, if defined, indicates that the setgrent_r routine
- * is available to setgrent re-entrantly.
- */
-/* SETGRENT_R_PROTO:
- * This symbol encodes the prototype of setgrent_r.
- * It is zero if d_setgrent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setgrent_r
- * is defined.
- */
-/*#define HAS_SETGRENT_R / **/
-#define SETGRENT_R_PROTO 0 /**/
-
-/* HAS_SETHOSTENT:
- * This symbol, if defined, indicates that the sethostent() routine is
- * available.
- */
-/*#define HAS_SETHOSTENT / **/
-
-/* HAS_SETHOSTENT_R:
- * This symbol, if defined, indicates that the sethostent_r routine
- * is available to sethostent re-entrantly.
- */
-/* SETHOSTENT_R_PROTO:
- * This symbol encodes the prototype of sethostent_r.
- * It is zero if d_sethostent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_sethostent_r
- * is defined.
- */
-/*#define HAS_SETHOSTENT_R / **/
-#define SETHOSTENT_R_PROTO 0 /**/
-
-/* HAS_SETLOCALE_R:
- * This symbol, if defined, indicates that the setlocale_r routine
- * is available to setlocale re-entrantly.
- */
-/* SETLOCALE_R_PROTO:
- * This symbol encodes the prototype of setlocale_r.
- * It is zero if d_setlocale_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setlocale_r
- * is defined.
- */
-/*#define HAS_SETLOCALE_R / **/
-#define SETLOCALE_R_PROTO 0 /**/
-
-/* HAS_SETNETENT:
- * This symbol, if defined, indicates that the setnetent() routine is
- * available.
- */
-/*#define HAS_SETNETENT / **/
-
-/* HAS_SETNETENT_R:
- * This symbol, if defined, indicates that the setnetent_r routine
- * is available to setnetent re-entrantly.
- */
-/* SETNETENT_R_PROTO:
- * This symbol encodes the prototype of setnetent_r.
- * It is zero if d_setnetent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setnetent_r
- * is defined.
- */
-/*#define HAS_SETNETENT_R / **/
-#define SETNETENT_R_PROTO 0 /**/
-
-/* HAS_SETPROTOENT:
- * This symbol, if defined, indicates that the setprotoent() routine is
- * available.
- */
-/*#define HAS_SETPROTOENT / **/
-
-/* HAS_SETPGRP:
- * This symbol, if defined, indicates that the setpgrp routine is
- * available to set the current process group.
- */
-/* USE_BSD_SETPGRP:
- * This symbol, if defined, indicates that setpgrp needs two
- * arguments whereas USG one needs none. See also HAS_SETPGID
- * for a POSIX interface.
- */
-/*#define HAS_SETPGRP / **/
-/*#define USE_BSD_SETPGRP / **/
-
-/* HAS_SETPROTOENT_R:
- * This symbol, if defined, indicates that the setprotoent_r routine
- * is available to setprotoent re-entrantly.
- */
-/* SETPROTOENT_R_PROTO:
- * This symbol encodes the prototype of setprotoent_r.
- * It is zero if d_setprotoent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setprotoent_r
- * is defined.
- */
-/*#define HAS_SETPROTOENT_R / **/
-#define SETPROTOENT_R_PROTO 0 /**/
-
-/* HAS_SETPWENT:
- * This symbol, if defined, indicates that the setpwent routine is
- * available for initializing sequential access of the passwd database.
- */
-/*#define HAS_SETPWENT / **/
-
-/* HAS_SETPWENT_R:
- * This symbol, if defined, indicates that the setpwent_r routine
- * is available to setpwent re-entrantly.
- */
-/* SETPWENT_R_PROTO:
- * This symbol encodes the prototype of setpwent_r.
- * It is zero if d_setpwent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setpwent_r
- * is defined.
- */
-/*#define HAS_SETPWENT_R / **/
-#define SETPWENT_R_PROTO 0 /**/
-
-/* HAS_SETSERVENT:
- * This symbol, if defined, indicates that the setservent() routine is
- * available.
- */
-/*#define HAS_SETSERVENT / **/
-
-/* HAS_SETSERVENT_R:
- * This symbol, if defined, indicates that the setservent_r routine
- * is available to setservent re-entrantly.
- */
-/* SETSERVENT_R_PROTO:
- * This symbol encodes the prototype of setservent_r.
- * It is zero if d_setservent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setservent_r
- * is defined.
- */
-/*#define HAS_SETSERVENT_R / **/
-#define SETSERVENT_R_PROTO 0 /**/
-
-/* HAS_SETVBUF:
- * This symbol, if defined, indicates that the setvbuf routine is
- * available to change buffering on an open stdio stream.
- * to a line-buffered mode.
- */
-#define HAS_SETVBUF /**/
-
-/* HAS_SHM:
- * This symbol, if defined, indicates that the entire shm*(2) library is
- * supported.
- */
-/*#define HAS_SHM / **/
-
-/* Shmat_t:
- * This symbol holds the return type of the shmat() system call.
- * Usually set to 'void *' or 'char *'.
- */
-/* HAS_SHMAT_PROTOTYPE:
- * This symbol, if defined, indicates that the sys/shm.h includes
- * a prototype for shmat(). Otherwise, it is up to the program to
- * guess one. Shmat_t shmat(int, Shmat_t, int) is a good guess,
- * but not always right so it should be emitted by the program only
- * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
- */
-#define Shmat_t void * /**/
-/*#define HAS_SHMAT_PROTOTYPE / **/
-
-/* HAS_SOCKET:
- * This symbol, if defined, indicates that the BSD socket interface is
- * supported.
- */
-/* HAS_SOCKETPAIR:
- * This symbol, if defined, indicates that the BSD socketpair() call is
- * supported.
- */
-/* HAS_MSG_CTRUNC:
- * This symbol, if defined, indicates that the MSG_CTRUNC is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_DONTROUTE:
- * This symbol, if defined, indicates that the MSG_DONTROUTE is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_OOB:
- * This symbol, if defined, indicates that the MSG_OOB is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_PEEK:
- * This symbol, if defined, indicates that the MSG_PEEK is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_PROXY:
- * This symbol, if defined, indicates that the MSG_PROXY is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_SCM_RIGHTS:
- * This symbol, if defined, indicates that the SCM_RIGHTS is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-#define HAS_SOCKET /**/
-/*#define HAS_SOCKETPAIR / **/
-/*#define HAS_MSG_CTRUNC / **/
-/*#define HAS_MSG_DONTROUTE / **/
-/*#define HAS_MSG_OOB / **/
-/*#define HAS_MSG_PEEK / **/
-/*#define HAS_MSG_PROXY / **/
-/*#define HAS_SCM_RIGHTS / **/
-
-/* HAS_SRAND48_R:
- * This symbol, if defined, indicates that the srand48_r routine
- * is available to srand48 re-entrantly.
- */
-/* SRAND48_R_PROTO:
- * This symbol encodes the prototype of srand48_r.
- * It is zero if d_srand48_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_srand48_r
- * is defined.
- */
-/*#define HAS_SRAND48_R / **/
-#define SRAND48_R_PROTO 0 /**/
-
-/* HAS_SRANDOM_R:
- * This symbol, if defined, indicates that the srandom_r routine
- * is available to srandom re-entrantly.
- */
-/* SRANDOM_R_PROTO:
- * This symbol encodes the prototype of srandom_r.
- * It is zero if d_srandom_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_srandom_r
- * is defined.
- */
-/*#define HAS_SRANDOM_R / **/
-#define SRANDOM_R_PROTO 0 /**/
-
-/* USE_STAT_BLOCKS:
- * This symbol is defined if this system has a stat structure declaring
- * st_blksize and st_blocks.
- */
-#ifndef USE_STAT_BLOCKS
-/*#define USE_STAT_BLOCKS / **/
-#endif
-
-/* USE_STRUCT_COPY:
- * This symbol, if defined, indicates that this C compiler knows how
- * to copy structures. If undefined, you'll need to use a block copy
- * routine of some sort instead.
- */
-#define USE_STRUCT_COPY /**/
-
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
-/* HAS_SYS_ERRLIST:
- * This symbol, if defined, indicates that the sys_errlist array is
- * available to translate error numbers to strings. The extern int
- * sys_nerr gives the size of that table.
- */
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-#define HAS_STRERROR /**/
-#define HAS_SYS_ERRLIST /**/
-#define Strerror(e) strerror(e)
-
-/* HAS_STRERROR_R:
- * This symbol, if defined, indicates that the strerror_r routine
- * is available to strerror re-entrantly.
- */
-/* STRERROR_R_PROTO:
- * This symbol encodes the prototype of strerror_r.
- * It is zero if d_strerror_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_strerror_r
- * is defined.
- */
-/*#define HAS_STRERROR_R / **/
-#define STRERROR_R_PROTO 0 /**/
-
-/* HAS_STRTOUL:
- * This symbol, if defined, indicates that the strtoul routine is
- * available to provide conversion of strings to unsigned long.
- */
-#define HAS_STRTOUL /**/
-
-/* HAS_TIME:
- * This symbol, if defined, indicates that the time() routine exists.
- */
-/* Time_t:
- * This symbol holds the type returned by time(). It can be long,
- * or time_t on BSD sites (in which case <sys/types.h> should be
- * included).
- */
-#define HAS_TIME /**/
-#define Time_t time_t /* Time type */
-
-/* HAS_TIMES:
- * This symbol, if defined, indicates that the times() routine exists.
- * Note that this became obsolete on some systems (SUNOS), which now
- * use getrusage(). It may be necessary to include <sys/times.h>.
- */
-#define HAS_TIMES /**/
-
-/* HAS_TMPNAM_R:
- * This symbol, if defined, indicates that the tmpnam_r routine
- * is available to tmpnam re-entrantly.
- */
-/* TMPNAM_R_PROTO:
- * This symbol encodes the prototype of tmpnam_r.
- * It is zero if d_tmpnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_tmpnam_r
- * is defined.
- */
-/*#define HAS_TMPNAM_R / **/
-#define TMPNAM_R_PROTO 0 /**/
-
-/* HAS_TTYNAME_R:
- * This symbol, if defined, indicates that the ttyname_r routine
- * is available to ttyname re-entrantly.
- */
-/* TTYNAME_R_PROTO:
- * This symbol encodes the prototype of ttyname_r.
- * It is zero if d_ttyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ttyname_r
- * is defined.
- */
-/*#define HAS_TTYNAME_R / **/
-#define TTYNAME_R_PROTO 0 /**/
-
-/* HAS_UNION_SEMUN:
- * This symbol, if defined, indicates that the union semun is
- * defined by including <sys/sem.h>. If not, the user code
- * probably needs to define it as:
- * union semun {
- * int val;
- * struct semid_ds *buf;
- * unsigned short *array;
- * }
- */
-/* USE_SEMCTL_SEMUN:
- * This symbol, if defined, indicates that union semun is
- * used for semctl IPC_STAT.
- */
-/* USE_SEMCTL_SEMID_DS:
- * This symbol, if defined, indicates that struct semid_ds * is
- * used for semctl IPC_STAT.
- */
-#define HAS_UNION_SEMUN /**/
-/*#define USE_SEMCTL_SEMUN / **/
-/*#define USE_SEMCTL_SEMID_DS / **/
-
-/* HAS_VFORK:
- * This symbol, if defined, indicates that vfork() exists.
- */
-/*#define HAS_VFORK / **/
-
-/* HAS_PSEUDOFORK:
- * This symbol, if defined, indicates that an emulation of the
- * fork routine is available.
- */
-/*#define HAS_PSEUDOFORK / **/
-
-/* Signal_t:
- * This symbol's value is either "void" or "int", corresponding to the
- * appropriate return type of a signal handler. Thus, you can declare
- * a signal handler using "Signal_t (*handler)()", and define the
- * handler using "Signal_t handler(sig)".
- */
-#define Signal_t void /* Signal handler's return type */
-
-/* HASVOLATILE:
- * This symbol, if defined, indicates that this C compiler knows about
- * the volatile declaration.
- */
-#define HASVOLATILE /**/
-#ifndef HASVOLATILE
-#define volatile
-#endif
-
-/* Fpos_t:
- * This symbol holds the type used to declare file positions in libc.
- * It can be fpos_t, long, uint, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Fpos_t fpos_t /* File position type */
-
-/* Gid_t_f:
- * This symbol defines the format string used for printing a Gid_t.
- */
-#define Gid_t_f "d" /**/
-
-/* Gid_t_sign:
- * This symbol holds the signedess of a Gid_t.
- * 1 for unsigned, -1 for signed.
- */
-#define Gid_t_sign -1 /* GID sign */
-
-/* Gid_t_size:
- * This symbol holds the size of a Gid_t in bytes.
- */
-#define Gid_t_size 4 /* GID size */
-
-/* Gid_t:
- * This symbol holds the return type of getgid() and the type of
- * argument to setrgid() and related functions. Typically,
- * it is the type of group ids in the kernel. It can be int, ushort,
- * gid_t, etc... It may be necessary to include <sys/types.h> to get
- * any typedef'ed information.
- */
-#define Gid_t gid_t /* Type for getgid(), etc... */
-
-/* I_DIRENT:
- * This symbol, if defined, indicates to the C program that it should
- * include <dirent.h>. Using this symbol also triggers the definition
- * of the Direntry_t define which ends up being 'struct dirent' or
- * 'struct direct' depending on the availability of <dirent.h>.
- */
-/* DIRNAMLEN:
- * This symbol, if defined, indicates to the C program that the length
- * of directory entry names is provided by a d_namlen field. Otherwise
- * you need to do strlen() on the d_name field.
- */
-/* Direntry_t:
- * This symbol is set to 'struct direct' or 'struct dirent' depending on
- * whether dirent is available or not. You should use this pseudo type to
- * portably declare your directory entries.
- */
-#define I_DIRENT /**/
-#define DIRNAMLEN /**/
-#define Direntry_t struct direct
-
-/* I_GRP:
- * This symbol, if defined, indicates to the C program that it should
- * include <grp.h>.
- */
-/* GRPASSWD:
- * This symbol, if defined, indicates to the C program that struct group
- * in <grp.h> contains gr_passwd.
- */
-/*#define I_GRP / **/
-/*#define GRPASSWD / **/
-
-/* I_MACH_CTHREADS:
- * This symbol, if defined, indicates to the C program that it should
- * include <mach/cthreads.h>.
- */
-/*#define I_MACH_CTHREADS / **/
-
-/* I_NDBM:
- * This symbol, if defined, indicates that <ndbm.h> exists and should
- * be included.
- */
-/* I_GDBMNDBM:
- * This symbol, if defined, indicates that <gdbm/ndbm.h> exists and should
- * be included. This was the location of the ndbm.h compatibility file
- * in RedHat 7.1.
- */
-/* I_GDBM_NDBM:
- * This symbol, if defined, indicates that <gdbm-ndbm.h> exists and should
- * be included. This is the location of the ndbm.h compatibility file
- * in Debian 4.0.
- */
-/* NDBM_H_USES_PROTOTYPES:
- * This symbol, if defined, indicates that <ndbm.h> uses real ANSI C
- * prototypes instead of K&R style function declarations without any
- * parameter information. While ANSI C prototypes are supported in C++,
- * K&R style function declarations will yield errors.
- */
-/* GDBMNDBM_H_USES_PROTOTYPES:
- * This symbol, if defined, indicates that <gdbm/ndbm.h> uses real ANSI C
- * prototypes instead of K&R style function declarations without any
- * parameter information. While ANSI C prototypes are supported in C++,
- * K&R style function declarations will yield errors.
- */
-/* GDBM_NDBM_H_USES_PROTOTYPES:
- * This symbol, if defined, indicates that <gdbm-ndbm.h> uses real ANSI C
- * prototypes instead of K&R style function declarations without any
- * parameter information. While ANSI C prototypes are supported in C++,
- * K&R style function declarations will yield errors.
- */
-/*#define I_NDBM / **/
-/*#define I_GDBMNDBM / **/
-/*#define I_GDBM_NDBM / **/
-/*#define NDBM_H_USES_PROTOTYPES / **/
-/*#define GDBMNDBM_H_USES_PROTOTYPES / **/
-/*#define GDBM_NDBM_H_USES_PROTOTYPES / **/
-
-/* I_NETDB:
- * This symbol, if defined, indicates that <netdb.h> exists and
- * should be included.
- */
-/*#define I_NETDB / **/
-
-/* I_NET_ERRNO:
- * This symbol, if defined, indicates that <net/errno.h> exists and
- * should be included.
- */
-/*#define I_NET_ERRNO / **/
-
-/* I_PTHREAD:
- * This symbol, if defined, indicates to the C program that it should
- * include <pthread.h>.
- */
-/*#define I_PTHREAD / **/
-
-/* I_PWD:
- * This symbol, if defined, indicates to the C program that it should
- * include <pwd.h>.
- */
-/* PWQUOTA:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_quota.
- */
-/* PWAGE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_age.
- */
-/* PWCHANGE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_change.
- */
-/* PWCLASS:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_class.
- */
-/* PWEXPIRE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_expire.
- */
-/* PWCOMMENT:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_comment.
- */
-/* PWGECOS:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_gecos.
- */
-/* PWPASSWD:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_passwd.
- */
-/*#define I_PWD / **/
-/*#define PWQUOTA / **/
-/*#define PWAGE / **/
-/*#define PWCHANGE / **/
-/*#define PWCLASS / **/
-/*#define PWEXPIRE / **/
-/*#define PWCOMMENT / **/
-/*#define PWGECOS / **/
-/*#define PWPASSWD / **/
-
-/* I_SYS_ACCESS:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/access.h>.
- */
-/*#define I_SYS_ACCESS / **/
-
-/* I_SYS_SECURITY:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/security.h>.
- */
-/*#define I_SYS_SECURITY / **/
-
-/* I_SYSUIO:
- * This symbol, if defined, indicates that <sys/uio.h> exists and
- * should be included.
- */
-/*#define I_SYSUIO / **/
-
-/* I_STDARG:
- * This symbol, if defined, indicates that <stdarg.h> exists and should
- * be included.
- */
-/* I_VARARGS:
- * This symbol, if defined, indicates to the C program that it should
- * include <varargs.h>.
- */
-#define I_STDARG /**/
-/*#define I_VARARGS / **/
-
-/* PERL_INC_VERSION_LIST:
- * This variable specifies the list of subdirectories in over
- * which perl.c:incpush() and lib/lib.pm will automatically
- * search when adding directories to @INC, in a format suitable
- * for a C initialization string. See the inc_version_list entry
- * in Porting/Glossary for more details.
- */
-/*#define PERL_INC_VERSION_LIST 0 / **/
-
-/* INSTALL_USR_BIN_PERL:
- * This symbol, if defined, indicates that Perl is to be installed
- * also as /usr/bin/perl.
- */
-/*#define INSTALL_USR_BIN_PERL / **/
-
-/* Off_t:
- * This symbol holds the type used to declare offsets in the kernel.
- * It can be int, long, off_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-/* LSEEKSIZE:
- * This symbol holds the number of bytes used by the Off_t.
- */
-/* Off_t_size:
- * This symbol holds the number of bytes used by the Off_t.
- */
-#define Off_t long /* <offset> type */
-#define LSEEKSIZE 4 /* <offset> size */
-#define Off_t_size 4 /* <offset> size */
-
-/* Free_t:
- * This variable contains the return type of free(). It is usually
- * void, but occasionally int.
- */
-/* Malloc_t:
- * This symbol is the type of pointer returned by malloc and realloc.
- */
-#define Malloc_t void * /**/
-#define Free_t void /**/
-
-/* PERL_MALLOC_WRAP:
- * This symbol, if defined, indicates that we'd like malloc wrap checks.
- */
-#define PERL_MALLOC_WRAP /**/
-
-/* MYMALLOC:
- * This symbol, if defined, indicates that we're using our own malloc.
- */
-/*#define MYMALLOC / **/
-
-/* Mode_t:
- * This symbol holds the type used to declare file modes
- * for systems calls. It is usually mode_t, but may be
- * int or unsigned short. It may be necessary to include <sys/types.h>
- * to get any typedef'ed information.
- */
-#define Mode_t mode_t /* file mode parameter for system calls */
-
-/* Netdb_host_t:
- * This symbol holds the type used for the 1st argument
- * to gethostbyaddr().
- */
-/* Netdb_hlen_t:
- * This symbol holds the type used for the 2nd argument
- * to gethostbyaddr().
- */
-/* Netdb_name_t:
- * This symbol holds the type used for the argument to
- * gethostbyname().
- */
-/* Netdb_net_t:
- * This symbol holds the type used for the 1st argument to
- * getnetbyaddr().
- */
-#define Netdb_host_t char * /**/
-#define Netdb_hlen_t int /**/
-#define Netdb_name_t char * /**/
-#define Netdb_net_t long /**/
-
-/* PERL_OTHERLIBDIRS:
- * This variable contains a colon-separated set of paths for the perl
- * binary to search for additional library files or modules.
- * These directories will be tacked to the end of @INC.
- * Perl will automatically search below each path for version-
- * and architecture-specific directories. See PERL_INC_VERSION_LIST
- * for more details.
- */
-/*#define PERL_OTHERLIBDIRS "" / **/
-
-/* Pid_t:
- * This symbol holds the type used to declare process ids in the kernel.
- * It can be int, uint, pid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Pid_t int /* PID type */
-
-/* PRIVLIB:
- * This symbol contains the name of the private library for this package.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world. The program
- * should be prepared to do ~ expansion.
- */
-/* PRIVLIB_EXP:
- * This symbol contains the ~name expanded version of PRIVLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-#define PRIVLIB "c:\\perl\\lib" /**/
-#define PRIVLIB_EXP (win32_get_privlib(PERL_VERSION_STRING, NULL)) /**/
-
-/* CAN_PROTOTYPE:
- * If defined, this macro indicates that the C compiler can handle
- * function prototypes.
- */
-/* _:
- * This macro is used to declare function parameters for folks who want
- * to make declarations with prototypes using a different style than
- * the above macros. Use double parentheses. For example:
- *
- * int main _((int argc, char *argv[]));
- */
-#define CAN_PROTOTYPE /**/
-#ifdef CAN_PROTOTYPE
-#define _(args) args
-#else
-#define _(args) ()
-#endif
-
-/* Select_fd_set_t:
- * This symbol holds the type used for the 2nd, 3rd, and 4th
- * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
- * is defined, and 'int *' otherwise. This is only useful if you
- * have select(), of course.
- */
-#define Select_fd_set_t Perl_fd_set * /**/
-
-/* SH_PATH:
- * This symbol contains the full pathname to the shell used on this
- * on this system to execute Bourne shell scripts. Usually, this will be
- * /bin/sh, though it's possible that some systems will have /bin/ksh,
- * /bin/pdksh, /bin/ash, /bin/bash, or even something such as
- * D:/bin/sh.exe.
- */
-#define SH_PATH "cmd /x /c" /**/
-
-/* SIG_NAME:
- * This symbol contains a list of signal names in order of
- * signal number. This is intended
- * to be used as a static array initialization, like this:
- * char *sig_name[] = { SIG_NAME };
- * The signals in the list are separated with commas, and each signal
- * is surrounded by double quotes. There is no leading SIG in the signal
- * name, i.e. SIGQUIT is known as "QUIT".
- * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
- * etc., where nn is the actual signal number (e.g. NUM37).
- * The signal number for sig_name[i] is stored in sig_num[i].
- * The last element is 0 to terminate the list with a NULL. This
- * corresponds to the 0 at the end of the sig_name_init list.
- * Note that this variable is initialized from the sig_name_init,
- * not from sig_name (which is unused).
- */
-/* SIG_NUM:
- * This symbol contains a list of signal numbers, in the same order as the
- * SIG_NAME list. It is suitable for static array initialization, as in:
- * int sig_num[] = { SIG_NUM };
- * The signals in the list are separated with commas, and the indices
- * within that list and the SIG_NAME list match, so it's easy to compute
- * the signal name from a number or vice versa at the price of a small
- * dynamic linear lookup.
- * Duplicates are allowed, but are moved to the end of the list.
- * The signal number corresponding to sig_name[i] is sig_number[i].
- * if (i < NSIG) then sig_number[i] == i.
- * The last element is 0, corresponding to the 0 at the end of
- * the sig_name_init list.
- * Note that this variable is initialized from the sig_num_init,
- * not from sig_num (which is unused).
- */
-/* SIG_SIZE:
- * This variable contains the number of elements of the SIG_NAME
- * and SIG_NUM arrays, excluding the final NULL entry.
- */
-#define SIG_NAME "ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD", "NUM19", "USR3", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/
-#define SIG_NUM 0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 18, 0 /**/
-#define SIG_SIZE 27 /**/
-
-/* SITEARCH:
- * This symbol contains the name of the private library for this package.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world. The program
- * should be prepared to do ~ expansion.
- * The standard distribution will put nothing in this directory.
- * After perl has been installed, users may install their own local
- * architecture-dependent modules in this directory with
- * MakeMaker Makefile.PL
- * or equivalent. See INSTALL for details.
- */
-/* SITEARCH_EXP:
- * This symbol contains the ~name expanded version of SITEARCH, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-#define SITEARCH "c:\\perl\\site\\lib" /**/
-/*#define SITEARCH_EXP "" / **/
-
-/* SITELIB:
- * This symbol contains the name of the private library for this package.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world. The program
- * should be prepared to do ~ expansion.
- * The standard distribution will put nothing in this directory.
- * After perl has been installed, users may install their own local
- * architecture-independent modules in this directory with
- * MakeMaker Makefile.PL
- * or equivalent. See INSTALL for details.
- */
-/* SITELIB_EXP:
- * This symbol contains the ~name expanded version of SITELIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-/* SITELIB_STEM:
- * This define is SITELIB_EXP with any trailing version-specific component
- * removed. The elements in inc_version_list (inc_version_list.U) can
- * be tacked onto this variable to generate a list of directories to search.
- */
-#define SITELIB "c:\\perl\\site\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib(PERL_VERSION_STRING, NULL)) /**/
-#define SITELIB_STEM "" /**/
-
-/* Size_t_size:
- * This symbol holds the size of a Size_t in bytes.
- */
-#define Size_t_size 4 /**/
-
-/* Size_t:
- * This symbol holds the type used to declare length parameters
- * for string functions. It is usually size_t, but may be
- * unsigned long, int, etc. It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Size_t size_t /* length paramater for string functions */
-
-/* Sock_size_t:
- * This symbol holds the type used for the size argument of
- * various socket calls (just the base type, not the pointer-to).
- */
-#define Sock_size_t int /**/
-
-/* STDCHAR:
- * This symbol is defined to be the type of char used in stdio.h.
- * It has the values "unsigned char" or "char".
- */
-#define STDCHAR unsigned char /**/
-
-/* Uid_t_f:
- * This symbol defines the format string used for printing a Uid_t.
- */
-#define Uid_t_f "d" /**/
-
-/* Uid_t_sign:
- * This symbol holds the signedess of a Uid_t.
- * 1 for unsigned, -1 for signed.
- */
-#define Uid_t_sign -1 /* UID sign */
-
-/* Uid_t_size:
- * This symbol holds the size of a Uid_t in bytes.
- */
-#define Uid_t_size 4 /* UID size */
-
-/* Uid_t:
- * This symbol holds the type used to declare user ids in the kernel.
- * It can be int, ushort, uid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Uid_t uid_t /* UID type */
-
-/* USE_ITHREADS:
- * This symbol, if defined, indicates that Perl should be built to
- * use the interpreter-based threading implementation.
- */
-/* USE_5005THREADS:
- * This symbol, if defined, indicates that Perl should be built to
- * use the 5.005-based threading implementation.
- * Only valid up to 5.8.x.
- */
-/* OLD_PTHREADS_API:
- * This symbol, if defined, indicates that Perl should
- * be built to use the old draft POSIX threads API.
- */
-/* USE_REENTRANT_API:
- * This symbol, if defined, indicates that Perl should
- * try to use the various _r versions of library functions.
- * This is extremely experimental.
- */
-/*#define USE_5005THREADS / **/
-/*#define USE_ITHREADS / **/
-#if defined(USE_5005THREADS) && !defined(USE_ITHREADS)
-#define USE_THREADS /* until src is revised*/
-#endif
-/*#define OLD_PTHREADS_API / **/
-/*#define USE_REENTRANT_API / **/
-
-/* PERL_VENDORARCH:
- * If defined, this symbol contains the name of a private library.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world.
- * It may have a ~ on the front.
- * The standard distribution will put nothing in this directory.
- * Vendors who distribute perl may wish to place their own
- * architecture-dependent modules and extensions in this directory with
- * MakeMaker Makefile.PL INSTALLDIRS=vendor
- * or equivalent. See INSTALL for details.
- */
-/* PERL_VENDORARCH_EXP:
- * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-/*#define PERL_VENDORARCH "" / **/
-/*#define PERL_VENDORARCH_EXP "" / **/
-
-/* PERL_VENDORLIB_EXP:
- * This symbol contains the ~name expanded version of VENDORLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-/* PERL_VENDORLIB_STEM:
- * This define is PERL_VENDORLIB_EXP with any trailing version-specific component
- * removed. The elements in inc_version_list (inc_version_list.U) can
- * be tacked onto this variable to generate a list of directories to search.
- */
-/*#define PERL_VENDORLIB_EXP "" / **/
-/*#define PERL_VENDORLIB_STEM "" / **/
-
-/* VOIDFLAGS:
- * This symbol indicates how much support of the void type is given by this
- * compiler. What various bits mean:
- *
- * 1 = supports declaration of void
- * 2 = supports arrays of pointers to functions returning void
- * 4 = supports comparisons between pointers to void functions and
- * addresses of void functions
- * 8 = suports declaration of generic void pointers
- *
- * The package designer should define VOIDUSED to indicate the requirements
- * of the package. This can be done either by #defining VOIDUSED before
- * including config.h, or by defining defvoidused in Myinit.U. If the
- * latter approach is taken, only those flags will be tested. If the
- * level of void support necessary is not present, defines void to int.
- */
-#ifndef VOIDUSED
-#define VOIDUSED 15
-#endif
-#define VOIDFLAGS 15
-#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
-#define void int /* is void to be avoided? */
-#define M_VOID /* Xenix strikes again */
-#endif
-
-/* USE_CROSS_COMPILE:
- * This symbol, if defined, indicates that Perl is being cross-compiled.
- */
-/* PERL_TARGETARCH:
- * This symbol, if defined, indicates the target architecture
- * Perl has been cross-compiled to. Undefined if not a cross-compile.
- */
-#ifndef USE_CROSS_COMPILE
-/*#define USE_CROSS_COMPILE / **/
-#define PERL_TARGETARCH "" /**/
-#endif
-
-/* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double, or a long double when applicable. Usual values are 2,
- * 4 and 8. The default is eight, for safety.
- */
-#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
-# define MEM_ALIGNBYTES 8
-#else
-#define MEM_ALIGNBYTES 8
-#endif
-
-/* BYTEORDER:
- * This symbol holds the hexadecimal constant defined in byteorder,
- * in a UV, i.e. 0x1234 or 0x4321 or 0x12345678, etc...
- * If the compiler supports cross-compiling or multiple-architecture
- * binaries (eg. on NeXT systems), use compiler-defined macros to
- * determine the byte order.
- * On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture
- * Binaries (MAB) on either big endian or little endian machines.
- * The endian-ness is available at compile-time. This only matters
- * for perl, where the config.h can be generated and installed on
- * one system, and used by a different architecture to build an
- * extension. Older versions of NeXT that might not have
- * defined either *_ENDIAN__ were all on Motorola 680x0 series,
- * so the default case (for NeXT) is big endian to catch them.
- * This might matter for NeXT 3.0.
- */
-#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
-# ifdef __LITTLE_ENDIAN__
-# if LONGSIZE == 4
-# define BYTEORDER 0x1234
-# else
-# if LONGSIZE == 8
-# define BYTEORDER 0x12345678
-# endif
-# endif
-# else
-# ifdef __BIG_ENDIAN__
-# if LONGSIZE == 4
-# define BYTEORDER 0x4321
-# else
-# if LONGSIZE == 8
-# define BYTEORDER 0x87654321
-# endif
-# endif
-# endif
-# endif
-# if !defined(BYTEORDER) && (defined(NeXT) || defined(__NeXT__))
-# define BYTEORDER 0x4321
-# endif
-#else
-#define BYTEORDER 0x1234 /* large digits for MSB */
-#endif /* NeXT */
-
-/* CHARBITS:
- * This symbol contains the size of a char, so that the C preprocessor
- * can make decisions based on it.
- */
-#define CHARBITS 8 /**/
-
-/* CASTI32:
- * This symbol is defined if the C compiler can cast negative
- * or large floating point numbers to 32-bit ints.
- */
-#define CASTI32 /**/
-
-/* CASTNEGFLOAT:
- * This symbol is defined if the C compiler can cast negative
- * numbers to unsigned longs, ints and shorts.
- */
-/* CASTFLAGS:
- * This symbol contains flags that say what difficulties the compiler
- * has casting odd floating values to unsigned long:
- * 0 = ok
- * 1 = couldn't cast < 0
- * 2 = couldn't cast >= 0x80000000
- * 4 = couldn't cast in argument expression list
- */
-#define CASTNEGFLOAT /**/
-#define CASTFLAGS 0 /**/
-
-/* VOID_CLOSEDIR:
- * This symbol, if defined, indicates that the closedir() routine
- * does not return a value.
- */
-/*#define VOID_CLOSEDIR / **/
-
-/* HAS_FD_SET:
- * This symbol, when defined, indicates presence of the fd_set typedef
- * in <sys/types.h>
- */
-#define HAS_FD_SET /**/
-
-/* Gconvert:
- * This preprocessor macro is defined to convert a floating point
- * number to a string without a trailing decimal point. This
- * emulates the behavior of sprintf("%g"), but is sometimes much more
- * efficient. If gconvert() is not available, but gcvt() drops the
- * trailing decimal point, then gcvt() is used. If all else fails,
- * a macro using sprintf("%g") is used. Arguments for the Gconvert
- * macro are: value, number of digits, whether trailing zeros should
- * be retained, and the output buffer.
- * The usual values are:
- * d_Gconvert='gconvert((x),(n),(t),(b))'
- * d_Gconvert='gcvt((x),(n),(b))'
- * d_Gconvert='sprintf((b),"%.*g",(n),(x))'
- * The last two assume trailing zeros should not be kept.
- */
-#define Gconvert(x,n,t,b) gcvt((x),(n),(b))
-
-/* HAS_GETPAGESIZE:
- * This symbol, if defined, indicates that the getpagesize system call
- * is available to get system page size, which is the granularity of
- * many memory management calls.
- */
-/*#define HAS_GETPAGESIZE / **/
-
-/* HAS_GNULIBC:
- * This symbol, if defined, indicates to the C program that
- * the GNU C library is being used. A better check is to use
- * the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc.
- */
-/*#define HAS_GNULIBC / **/
-#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)
-# define _GNU_SOURCE
-#endif
-
-/* HAS_ISASCII:
- * This manifest constant lets the C program know that isascii
- * is available.
- */
-#define HAS_ISASCII /**/
-
-/* HAS_LCHOWN:
- * This symbol, if defined, indicates that the lchown routine is
- * available to operate on a symbolic link (instead of following the
- * link).
- */
-/*#define HAS_LCHOWN / **/
-
-/* HAS_OPEN3:
- * This manifest constant lets the C program know that the three
- * argument form of open(2) is available.
- */
-/*#define HAS_OPEN3 / **/
-
-/* HAS_SAFE_BCOPY:
- * This symbol, if defined, indicates that the bcopy routine is available
- * to copy potentially overlapping memory blocks. Normally, you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-/*#define HAS_SAFE_BCOPY / **/
-
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. If you need to
- * copy overlapping memory blocks, you should check HAS_MEMMOVE and
- * use memmove() instead, if available.
- */
-/*#define HAS_SAFE_MEMCPY / **/
-
-/* HAS_SANE_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * and can be used to compare relative magnitudes of chars with their high
- * bits set. If it is not defined, roll your own version.
- */
-#define HAS_SANE_MEMCMP /**/
-
-/* HAS_SIGACTION:
- * This symbol, if defined, indicates that Vr4's sigaction() routine
- * is available.
- */
-/*#define HAS_SIGACTION / **/
-
-/* HAS_SIGSETJMP:
- * This variable indicates to the C program that the sigsetjmp()
- * routine is available to save the calling process's registers
- * and stack environment for later use by siglongjmp(), and
- * to optionally save the process's signal mask. See
- * Sigjmp_buf, Sigsetjmp, and Siglongjmp.
- */
-/* Sigjmp_buf:
- * This is the buffer type to be used with Sigsetjmp and Siglongjmp.
- */
-/* Sigsetjmp:
- * This macro is used in the same way as sigsetjmp(), but will invoke
- * traditional setjmp() if sigsetjmp isn't available.
- * See HAS_SIGSETJMP.
- */
-/* Siglongjmp:
- * This macro is used in the same way as siglongjmp(), but will invoke
- * traditional longjmp() if siglongjmp isn't available.
- * See HAS_SIGSETJMP.
- */
-/*#define HAS_SIGSETJMP / **/
-#ifdef HAS_SIGSETJMP
-#define Sigjmp_buf sigjmp_buf
-#define Sigsetjmp(buf,save_mask) sigsetjmp((buf),(save_mask))
-#define Siglongjmp(buf,retval) siglongjmp((buf),(retval))
-#else
-#define Sigjmp_buf jmp_buf
-#define Sigsetjmp(buf,save_mask) setjmp((buf))
-#define Siglongjmp(buf,retval) longjmp((buf),(retval))
-#endif
-
-/* HAS_STATIC_INLINE:
- * This symbol, if defined, indicates that the C compiler supports
- * C99-style static inline. That is, the function can't be called
- * from another translation unit.
- */
-/* PERL_STATIC_INLINE:
- * This symbol gives the best-guess incantation to use for static
- * inline functions. If HAS_STATIC_INLINE is defined, this will
- * give C99-style inline. If HAS_STATIC_INLINE is not defined,
- * this will give a plain 'static'. It will always be defined
- * to something that gives static linkage.
- * Possibilities include
- * static inline (c99)
- * static __inline__ (gcc -ansi)
- * static __inline (MSVC)
- * static _inline (older MSVC)
- * static (c89 compilers)
- */
-/*#define HAS_STATIC_INLINE / **/
-#define PERL_STATIC_INLINE static /**/
-
-/* USE_STDIO_PTR:
- * This symbol is defined if the _ptr and _cnt fields (or similar)
- * of the stdio FILE structure can be used to access the stdio buffer
- * for a file handle. If this is defined, then the FILE_ptr(fp)
- * and FILE_cnt(fp) macros will also be defined and should be used
- * to access these fields.
- */
-/* FILE_ptr:
- * This macro is used to access the _ptr field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_PTR_LVALUE:
- * This symbol is defined if the FILE_ptr macro can be used as an
- * lvalue.
- */
-/* FILE_cnt:
- * This macro is used to access the _cnt field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_CNT_LVALUE:
- * This symbol is defined if the FILE_cnt macro can be used as an
- * lvalue.
- */
-/* STDIO_PTR_LVAL_SETS_CNT:
- * This symbol is defined if using the FILE_ptr macro as an lvalue
- * to increase the pointer by n has the side effect of decreasing the
- * value of File_cnt(fp) by n.
- */
-/* STDIO_PTR_LVAL_NOCHANGE_CNT:
- * This symbol is defined if using the FILE_ptr macro as an lvalue
- * to increase the pointer by n leaves File_cnt(fp) unchanged.
- */
-#define USE_STDIO_PTR /**/
-#ifdef USE_STDIO_PTR
-#define FILE_ptr(fp) ((fp)->curp)
-#define STDIO_PTR_LVALUE /**/
-#define FILE_cnt(fp) ((fp)->level)
-#define STDIO_CNT_LVALUE /**/
-/*#define STDIO_PTR_LVAL_SETS_CNT / **/
-#define STDIO_PTR_LVAL_NOCHANGE_CNT /**/
-#endif
-
-/* USE_STDIO_BASE:
- * This symbol is defined if the _base field (or similar) of the
- * stdio FILE structure can be used to access the stdio buffer for
- * a file handle. If this is defined, then the FILE_base(fp) macro
- * will also be defined and should be used to access this field.
- * Also, the FILE_bufsiz(fp) macro will be defined and should be used
- * to determine the number of bytes in the buffer. USE_STDIO_BASE
- * will never be defined unless USE_STDIO_PTR is.
- */
-/* FILE_base:
- * This macro is used to access the _base field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_BASE is defined.
- */
-/* FILE_bufsiz:
- * This macro is used to determine the number of bytes in the I/O
- * buffer pointed to by _base field (or equivalent) of the FILE
- * structure pointed to its argument. This macro will always be defined
- * if USE_STDIO_BASE is defined.
- */
-#define USE_STDIO_BASE /**/
-#ifdef USE_STDIO_BASE
-#define FILE_base(fp) ((fp)->buffer)
-#define FILE_bufsiz(fp) ((fp)->level + (fp)->curp - (fp)->buffer)
-#endif
-
-/* HAS_VPRINTF:
- * This symbol, if defined, indicates that the vprintf routine is available
- * to printf with a pointer to an argument list. If unavailable, you
- * may need to write your own, probably in terms of _doprnt().
- */
-/* USE_CHAR_VSPRINTF:
- * This symbol is defined if this system has vsprintf() returning type
- * (char*). The trend seems to be to declare it as "int vsprintf()". It
- * is up to the package author to declare vsprintf correctly based on the
- * symbol.
- */
-#define HAS_VPRINTF /**/
-/*#define USE_CHAR_VSPRINTF / **/
-
-/* DOUBLESIZE:
- * This symbol contains the size of a double, so that the C preprocessor
- * can make decisions based on it.
- */
-#define DOUBLESIZE 8 /**/
-
-/* I_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <time.h>.
- */
-/* I_SYS_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h>.
- */
-/* I_SYS_TIME_KERNEL:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h> with KERNEL defined.
- */
-/* HAS_TM_TM_ZONE:
- * This symbol, if defined, indicates to the C program that
- * the struct tm has a tm_zone field.
- */
-/* HAS_TM_TM_GMTOFF:
- * This symbol, if defined, indicates to the C program that
- * the struct tm has a tm_gmtoff field.
- */
-#define I_TIME /**/
-/*#define I_SYS_TIME / **/
-/*#define I_SYS_TIME_KERNEL / **/
-/*#define HAS_TM_TM_ZONE / **/
-/*#define HAS_TM_TM_GMTOFF / **/
-
-/* VAL_O_NONBLOCK:
- * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
- * non-blocking I/O for the file descriptor. Note that there is no way
- * back, i.e. you cannot turn it blocking again this way. If you wish to
- * alternatively switch between blocking and non-blocking, use the
- * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
- */
-/* VAL_EAGAIN:
- * This symbol holds the errno error code set by read() when no data was
- * present on the non-blocking file descriptor.
- */
-/* RD_NODATA:
- * This symbol holds the return code from read() when no data is present
- * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
- * not defined, then you can't distinguish between no data and EOF by
- * issuing a read(). You'll have to find another way to tell for sure!
- */
-/* EOF_NONBLOCK:
- * This symbol, if defined, indicates to the C program that a read() on
- * a non-blocking file descriptor will return 0 on EOF, and not the value
- * held in RD_NODATA (-1 usually, in that case!).
- */
-#define VAL_O_NONBLOCK O_NONBLOCK
-#define VAL_EAGAIN EAGAIN
-#define RD_NODATA -1
-#define EOF_NONBLOCK
-
-/* PTRSIZE:
- * This symbol contains the size of a pointer, so that the C preprocessor
- * can make decisions based on it. It will be sizeof(void *) if
- * the compiler supports (void *); otherwise it will be
- * sizeof(char *).
- */
-#define PTRSIZE 4 /**/
-
-/* Drand01:
- * This macro is to be used to generate uniformly distributed
- * random numbers over the range [0., 1.[. You may have to supply
- * an 'extern double drand48();' in your program since SunOS 4.1.3
- * doesn't provide you with anything relevant in its headers.
- * See HAS_DRAND48_PROTO.
- */
-/* Rand_seed_t:
- * This symbol defines the type of the argument of the
- * random seed function.
- */
-/* seedDrand01:
- * This symbol defines the macro to be used in seeding the
- * random number generator (see Drand01).
- */
-/* RANDBITS:
- * This symbol indicates how many bits are produced by the
- * function used to generate normalized random numbers.
- * Values include 15, 16, 31, and 48.
- */
-#define Drand01() (rand()/(double)((unsigned)1<<RANDBITS)) /**/
-#define Rand_seed_t unsigned /**/
-#define seedDrand01(x) srand((Rand_seed_t)x) /**/
-#define RANDBITS 15 /**/
-
-/* SSize_t:
- * This symbol holds the type used by functions that return
- * a count of bytes or an error condition. It must be a signed type.
- * It is usually ssize_t, but may be long or int, etc.
- * It may be necessary to include <sys/types.h> or <unistd.h>
- * to get any typedef'ed information.
- * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
- */
-#define SSize_t int /* signed count of bytes */
-
-/* EBCDIC:
- * This symbol, if defined, indicates that this system uses
- * EBCDIC encoding.
- */
-/*#define EBCDIC / **/
-
-/* SETUID_SCRIPTS_ARE_SECURE_NOW:
- * This symbol, if defined, indicates that the bug that prevents
- * setuid scripts from being secure is not present in this kernel.
- */
-/* DOSUID:
- * This symbol, if defined, indicates that the C program should
- * check the script that it is executing for setuid/setgid bits, and
- * attempt to emulate setuid/setgid on systems that have disabled
- * setuid #! scripts because the kernel can't do it securely.
- * It is up to the package designer to make sure that this emulation
- * is done securely. Among other things, it should do an fstat on
- * the script it just opened to make sure it really is a setuid/setgid
- * script, it should make sure the arguments passed correspond exactly
- * to the argument on the #! line, and it should not trust any
- * subprocesses to which it must pass the filename rather than the
- * file descriptor of the script to be executed.
- */
-/*#define SETUID_SCRIPTS_ARE_SECURE_NOW / **/
-/*#define DOSUID / **/
-
-/* PERL_USE_DEVEL:
- * This symbol, if defined, indicates that Perl was configured with
- * -Dusedevel, to enable development features. This should not be
- * done for production builds.
- */
-/*#define PERL_USE_DEVEL / **/
-
-/* HAS_ATOLF:
- * This symbol, if defined, indicates that the atolf routine is
- * available to convert strings into long doubles.
- */
-/*#define HAS_ATOLF / **/
-
-/* HAS_ATOLL:
- * This symbol, if defined, indicates that the atoll routine is
- * available to convert strings into long longs.
- */
-/*#define HAS_ATOLL / **/
-
-/* HAS__FWALK:
- * This symbol, if defined, indicates that the _fwalk system call is
- * available to apply a function to all the file handles.
- */
-/*#define HAS__FWALK / **/
-
-/* HAS_AINTL:
- * This symbol, if defined, indicates that the aintl routine is
- * available. If copysignl is also present we can emulate modfl.
- */
-/*#define HAS_AINTL / **/
-
-/* HAS_BUILTIN_CHOOSE_EXPR:
- * Can we handle GCC builtin for compile-time ternary-like expressions
- */
-/* HAS_BUILTIN_EXPECT:
- * Can we handle GCC builtin for telling that certain values are more
- * likely
- */
-/*#define HAS_BUILTIN_EXPECT / **/
-/*#define HAS_BUILTIN_CHOOSE_EXPR / **/
-
-/* HAS_C99_VARIADIC_MACROS:
- * If defined, the compiler supports C99 variadic macros.
- */
-/*#define HAS_C99_VARIADIC_MACROS / **/
-
-/* HAS_CLASS:
- * This symbol, if defined, indicates that the class routine is
- * available to classify doubles. Available for example in AIX.
- * The returned values are defined in <float.h> and are:
- *
- * FP_PLUS_NORM Positive normalized, nonzero
- * FP_MINUS_NORM Negative normalized, nonzero
- * FP_PLUS_DENORM Positive denormalized, nonzero
- * FP_MINUS_DENORM Negative denormalized, nonzero
- * FP_PLUS_ZERO +0.0
- * FP_MINUS_ZERO -0.0
- * FP_PLUS_INF +INF
- * FP_MINUS_INF -INF
- * FP_NANS Signaling Not a Number (NaNS)
- * FP_NANQ Quiet Not a Number (NaNQ)
- */
-/*#define HAS_CLASS / **/
-
-/* HAS_CLEARENV:
- * This symbol, if defined, indicates that the clearenv () routine is
- * available for use.
- */
-/*#define HAS_CLEARENV / **/
-
-/* HAS_STRUCT_CMSGHDR:
- * This symbol, if defined, indicates that the struct cmsghdr
- * is supported.
- */
-/*#define HAS_STRUCT_CMSGHDR / **/
-
-/* HAS_COPYSIGNL:
- * This symbol, if defined, indicates that the copysignl routine is
- * available. If aintl is also present we can emulate modfl.
- */
-/*#define HAS_COPYSIGNL / **/
-
-/* USE_CPLUSPLUS:
- * This symbol, if defined, indicates that a C++ compiler was
- * used to compiled Perl and will be used to compile extensions.
- */
-/*#define USE_CPLUSPLUS / **/
-
-/* HAS_DBMINIT_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the dbminit() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int dbminit(char *);
- */
-/*#define HAS_DBMINIT_PROTO / **/
-
-/* HAS_DIR_DD_FD:
- * This symbol, if defined, indicates that the the DIR* dirstream
- * structure contains a member variable named dd_fd.
- */
-/*#define HAS_DIR_DD_FD / **/
-
-/* HAS_DIRFD:
- * This manifest constant lets the C program know that dirfd
- * is available.
- */
-/*#define HAS_DIRFD / **/
-
-/* DLSYM_NEEDS_UNDERSCORE:
- * This symbol, if defined, indicates that we need to prepend an
- * underscore to the symbol name before calling dlsym(). This only
- * makes sense if you *have* dlsym, which we will presume is the
- * case if you're using dl_dlopen.xs.
- */
-/*#define DLSYM_NEEDS_UNDERSCORE / **/
-
-/* HAS_FAST_STDIO:
- * This symbol, if defined, indicates that the "fast stdio"
- * is available to manipulate the stdio buffers directly.
- */
-#define HAS_FAST_STDIO /**/
-
-/* HAS_FCHDIR:
- * This symbol, if defined, indicates that the fchdir routine is
- * available to change directory using a file descriptor.
- */
-/*#define HAS_FCHDIR / **/
-
-/* FCNTL_CAN_LOCK:
- * This symbol, if defined, indicates that fcntl() can be used
- * for file locking. Normally on Unix systems this is defined.
- * It may be undefined on VMS.
- */
-/*#define FCNTL_CAN_LOCK / **/
-
-/* HAS_FINITE:
- * This symbol, if defined, indicates that the finite routine is
- * available to check whether a double is finite (non-infinity non-NaN).
- */
-/*#define HAS_FINITE / **/
-
-/* HAS_FINITEL:
- * This symbol, if defined, indicates that the finitel routine is
- * available to check whether a long double is finite
- * (non-infinity non-NaN).
- */
-/*#define HAS_FINITEL / **/
-
-/* HAS_FLOCK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the flock() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int flock(int, int);
- */
-#define HAS_FLOCK_PROTO /**/
-
-/* HAS_FP_CLASS:
- * This symbol, if defined, indicates that the fp_class routine is
- * available to classify doubles. Available for example in Digital UNIX.
- * The returned values are defined in <math.h> and are:
- *
- * FP_SNAN Signaling NaN (Not-a-Number)
- * FP_QNAN Quiet NaN (Not-a-Number)
- * FP_POS_INF +infinity
- * FP_NEG_INF -infinity
- * FP_POS_NORM Positive normalized
- * FP_NEG_NORM Negative normalized
- * FP_POS_DENORM Positive denormalized
- * FP_NEG_DENORM Negative denormalized
- * FP_POS_ZERO +0.0 (positive zero)
- * FP_NEG_ZERO -0.0 (negative zero)
- */
-/*#define HAS_FP_CLASS / **/
-
-/* HAS_FPCLASS:
- * This symbol, if defined, indicates that the fpclass routine is
- * available to classify doubles. Available for example in Solaris/SVR4.
- * The returned values are defined in <ieeefp.h> and are:
- *
- * FP_SNAN signaling NaN
- * FP_QNAN quiet NaN
- * FP_NINF negative infinity
- * FP_PINF positive infinity
- * FP_NDENORM negative denormalized non-zero
- * FP_PDENORM positive denormalized non-zero
- * FP_NZERO negative zero
- * FP_PZERO positive zero
- * FP_NNORM negative normalized non-zero
- * FP_PNORM positive normalized non-zero
- */
-/*#define HAS_FPCLASS / **/
-
-/* HAS_FPCLASSIFY:
- * This symbol, if defined, indicates that the fpclassify routine is
- * available to classify doubles. Available for example in HP-UX.
- * The returned values are defined in <math.h> and are
- *
- * FP_NORMAL Normalized
- * FP_ZERO Zero
- * FP_INFINITE Infinity
- * FP_SUBNORMAL Denormalized
- * FP_NAN NaN
- *
- */
-/*#define HAS_FPCLASSIFY / **/
-
-/* HAS_FPCLASSL:
- * This symbol, if defined, indicates that the fpclassl routine is
- * available to classify long doubles. Available for example in IRIX.
- * The returned values are defined in <ieeefp.h> and are:
- *
- * FP_SNAN signaling NaN
- * FP_QNAN quiet NaN
- * FP_NINF negative infinity
- * FP_PINF positive infinity
- * FP_NDENORM negative denormalized non-zero
- * FP_PDENORM positive denormalized non-zero
- * FP_NZERO negative zero
- * FP_PZERO positive zero
- * FP_NNORM negative normalized non-zero
- * FP_PNORM positive normalized non-zero
- */
-/*#define HAS_FPCLASSL / **/
-
-/* HAS_FPOS64_T:
- * This symbol will be defined if the C compiler supports fpos64_t.
- */
-/*#define HAS_FPOS64_T / **/
-
-/* HAS_FREXPL:
- * This symbol, if defined, indicates that the frexpl routine is
- * available to break a long double floating-point number into
- * a normalized fraction and an integral power of 2.
- */
-/*#define HAS_FREXPL / **/
-
-/* HAS_STRUCT_FS_DATA:
- * This symbol, if defined, indicates that the struct fs_data
- * to do statfs() is supported.
- */
-/*#define HAS_STRUCT_FS_DATA / **/
-
-/* HAS_FSEEKO:
- * This symbol, if defined, indicates that the fseeko routine is
- * available to fseek beyond 32 bits (useful for ILP32 hosts).
- */
-/*#define HAS_FSEEKO / **/
-
-/* HAS_FSTATFS:
- * This symbol, if defined, indicates that the fstatfs routine is
- * available to stat filesystems by file descriptors.
- */
-/*#define HAS_FSTATFS / **/
-
-/* HAS_FSYNC:
- * This symbol, if defined, indicates that the fsync routine is
- * available to write a file's modified data and attributes to
- * permanent storage.
- */
-/*#define HAS_FSYNC / **/
-
-/* HAS_FTELLO:
- * This symbol, if defined, indicates that the ftello routine is
- * available to ftell beyond 32 bits (useful for ILP32 hosts).
- */
-/*#define HAS_FTELLO / **/
-
-/* HAS_FUTIMES:
- * This symbol, if defined, indicates that the futimes routine is
- * available to change file descriptor time stamps with struct timevals.
- */
-/*#define HAS_FUTIMES / **/
-
-/* HAS_GETADDRINFO:
- * This symbol, if defined, indicates that the getaddrinfo() function
- * is available for use.
- */
-/*#define HAS_GETADDRINFO / **/
-
-/* HAS_GETCWD:
- * This symbol, if defined, indicates that the getcwd routine is
- * available to get the current working directory.
- */
-#define HAS_GETCWD /**/
-
-/* HAS_GETESPWNAM:
- * This symbol, if defined, indicates that the getespwnam system call is
- * available to retrieve enchanced (shadow) password entries by name.
- */
-/*#define HAS_GETESPWNAM / **/
-
-/* HAS_GETFSSTAT:
- * This symbol, if defined, indicates that the getfsstat routine is
- * available to stat filesystems in bulk.
- */
-/*#define HAS_GETFSSTAT / **/
-
-/* HAS_GETITIMER:
- * This symbol, if defined, indicates that the getitimer routine is
- * available to return interval timers.
- */
-/*#define HAS_GETITIMER / **/
-
-/* HAS_GETMNT:
- * This symbol, if defined, indicates that the getmnt routine is
- * available to get filesystem mount info by filename.
- */
-/*#define HAS_GETMNT / **/
-
-/* HAS_GETMNTENT:
- * This symbol, if defined, indicates that the getmntent routine is
- * available to iterate through mounted file systems to get their info.
- */
-/*#define HAS_GETMNTENT / **/
-
-/* HAS_GETNAMEINFO:
- * This symbol, if defined, indicates that the getnameinfo() function
- * is available for use.
- */
-/*#define HAS_GETNAMEINFO / **/
-
-/* HAS_GETPRPWNAM:
- * This symbol, if defined, indicates that the getprpwnam system call is
- * available to retrieve protected (shadow) password entries by name.
- */
-/*#define HAS_GETPRPWNAM / **/
-
-/* HAS_GETSPNAM:
- * This symbol, if defined, indicates that the getspnam system call is
- * available to retrieve SysV shadow password entries by name.
- */
-/*#define HAS_GETSPNAM / **/
-
-/* HAS_HASMNTOPT:
- * This symbol, if defined, indicates that the hasmntopt routine is
- * available to query the mount options of file systems.
- */
-/*#define HAS_HASMNTOPT / **/
-
-/* HAS_ILOGBL:
- * This symbol, if defined, indicates that the ilogbl routine is
- * available. If scalbnl is also present we can emulate frexpl.
- */
-/*#define HAS_ILOGBL / **/
-
-/* HAS_INETNTOP:
- * This symbol, if defined, indicates that the inet_ntop() function
- * is available to parse IPv4 and IPv6 strings.
- */
-/*#define HAS_INETNTOP / **/
-
-/* HAS_INETPTON:
- * This symbol, if defined, indicates that the inet_pton() function
- * is available to parse IPv4 and IPv6 strings.
- */
-/*#define HAS_INETPTON / **/
-
-/* HAS_INT64_T:
- * This symbol will defined if the C compiler supports int64_t.
- * Usually the <inttypes.h> needs to be included, but sometimes
- * <sys/types.h> is enough.
- */
-/*#define HAS_INT64_T / **/
-
-/* HAS_ISFINITE:
- * This symbol, if defined, indicates that the isfinite routine is
- * available to check whether a double is finite (non-infinity non-NaN).
- */
-/*#define HAS_ISFINITE / **/
-
-/* HAS_ISINF:
- * This symbol, if defined, indicates that the isinf routine is
- * available to check whether a double is an infinity.
- */
-/*#define HAS_ISINF / **/
-
-/* HAS_ISNAN:
- * This symbol, if defined, indicates that the isnan routine is
- * available to check whether a double is a NaN.
- */
-#define HAS_ISNAN /**/
-
-/* HAS_ISNANL:
- * This symbol, if defined, indicates that the isnanl routine is
- * available to check whether a long double is a NaN.
- */
-/*#define HAS_ISNANL / **/
-
-/* HAS_LDBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol LDBL_DIG, which is the number
- * of significant digits in a long double precision number. Unlike
- * for DBL_DIG, there's no good guess for LDBL_DIG if it is undefined.
- */
-#define HAS_LDBL_DIG /**/
-
-/* LIBM_LIB_VERSION:
- * This symbol, if defined, indicates that libm exports _LIB_VERSION
- * and that math.h defines the enum to manipulate it.
- */
-/*#define LIBM_LIB_VERSION / **/
-
-/* HAS_MADVISE:
- * This symbol, if defined, indicates that the madvise system call is
- * available to map a file into memory.
- */
-/*#define HAS_MADVISE / **/
-
-/* HAS_MALLOC_SIZE:
- * This symbol, if defined, indicates that the malloc_size
- * routine is available for use.
- */
-/*#define HAS_MALLOC_SIZE / **/
-
-/* HAS_MALLOC_GOOD_SIZE:
- * This symbol, if defined, indicates that the malloc_good_size
- * routine is available for use.
- */
-/*#define HAS_MALLOC_GOOD_SIZE / **/
-
-/* HAS_MKDTEMP:
- * This symbol, if defined, indicates that the mkdtemp routine is
- * available to exclusively create a uniquely named temporary directory.
- */
-/*#define HAS_MKDTEMP / **/
-
-/* HAS_MKSTEMPS:
- * This symbol, if defined, indicates that the mkstemps routine is
- * available to excluslvely create and open a uniquely named
- * (with a suffix) temporary file.
- */
-/*#define HAS_MKSTEMPS / **/
-
-/* HAS_MODFL:
- * This symbol, if defined, indicates that the modfl routine is
- * available to split a long double x into a fractional part f and
- * an integer part i such that |f| < 1.0 and (f + i) = x.
- */
-/* HAS_MODFL_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the modfl() function. Otherwise, it is up
- * to the program to supply one.
- */
-/* HAS_MODFL_POW32_BUG:
- * This symbol, if defined, indicates that the modfl routine is
- * broken for long doubles >= pow(2, 32).
- * For example from 4294967303.150000 one would get 4294967302.000000
- * and 1.150000. The bug has been seen in certain versions of glibc,
- * release 2.2.2 is known to be okay.
- */
-/*#define HAS_MODFL / **/
-/*#define HAS_MODFL_PROTO / **/
-/*#define HAS_MODFL_POW32_BUG / **/
-
-/* HAS_MPROTECT:
- * This symbol, if defined, indicates that the mprotect system call is
- * available to modify the access protection of a memory mapped file.
- */
-/*#define HAS_MPROTECT / **/
-
-/* HAS_STRUCT_MSGHDR:
- * This symbol, if defined, indicates that the struct msghdr
- * is supported.
- */
-/*#define HAS_STRUCT_MSGHDR / **/
-
-/* HAS_NL_LANGINFO:
- * This symbol, if defined, indicates that the nl_langinfo routine is
- * available to return local data. You will also need <langinfo.h>
- * and therefore I_LANGINFO.
- */
-/*#define HAS_NL_LANGINFO / **/
-
-/* HAS_OFF64_T:
- * This symbol will be defined if the C compiler supports off64_t.
- */
-/*#define HAS_OFF64_T / **/
-
-/* HAS_PROCSELFEXE:
- * This symbol is defined if PROCSELFEXE_PATH is a symlink
- * to the absolute pathname of the executing program.
- */
-/* PROCSELFEXE_PATH:
- * If HAS_PROCSELFEXE is defined this symbol is the filename
- * of the symbolic link pointing to the absolute pathname of
- * the executing program.
- */
-/*#define HAS_PROCSELFEXE / **/
-#if defined(HAS_PROCSELFEXE) && !defined(PROCSELFEXE_PATH)
-#define PROCSELFEXE_PATH /**/
-#endif
-
-/* HAS_PTHREAD_ATTR_SETSCOPE:
- * This symbol, if defined, indicates that the pthread_attr_setscope
- * system call is available to set the contention scope attribute of
- * a thread attribute object.
- */
-/*#define HAS_PTHREAD_ATTR_SETSCOPE / **/
-
-/* HAS_READV:
- * This symbol, if defined, indicates that the readv routine is
- * available to do gather reads. You will also need <sys/uio.h>
- * and there I_SYSUIO.
- */
-/*#define HAS_READV / **/
-
-/* HAS_RECVMSG:
- * This symbol, if defined, indicates that the recvmsg routine is
- * available to send structured socket messages.
- */
-/*#define HAS_RECVMSG / **/
-
-/* HAS_SBRK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the sbrk() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern void* sbrk(int);
- * extern void* sbrk(size_t);
- */
-/*#define HAS_SBRK_PROTO / **/
-
-/* HAS_SCALBNL:
- * This symbol, if defined, indicates that the scalbnl routine is
- * available. If ilogbl is also present we can emulate frexpl.
- */
-/*#define HAS_SCALBNL / **/
-
-/* HAS_SENDMSG:
- * This symbol, if defined, indicates that the sendmsg routine is
- * available to send structured socket messages.
- */
-/*#define HAS_SENDMSG / **/
-
-/* HAS_SETITIMER:
- * This symbol, if defined, indicates that the setitimer routine is
- * available to set interval timers.
- */
-/*#define HAS_SETITIMER / **/
-
-/* HAS_SETPROCTITLE:
- * This symbol, if defined, indicates that the setproctitle routine is
- * available to set process title.
- */
-/*#define HAS_SETPROCTITLE / **/
-
-/* USE_SFIO:
- * This symbol, if defined, indicates that sfio should
- * be used.
- */
-/*#define USE_SFIO / **/
-
-/* HAS_SIGNBIT:
- * This symbol, if defined, indicates that the signbit routine is
- * available to check if the given number has the sign bit set.
- * This should include correct testing of -0.0. This will only be set
- * if the signbit() routine is safe to use with the NV type used internally
- * in perl. Users should call Perl_signbit(), which will be #defined to
- * the system's signbit() function or macro if this symbol is defined.
- */
-/*#define HAS_SIGNBIT / **/
-
-/* HAS_SIGPROCMASK:
- * This symbol, if defined, indicates that the sigprocmask
- * system call is available to examine or change the signal mask
- * of the calling process.
- */
-/*#define HAS_SIGPROCMASK / **/
-
-/* USE_SITECUSTOMIZE:
- * This symbol, if defined, indicates that sitecustomize should
- * be used.
- */
-#ifndef USE_SITECUSTOMIZE
-/*#define USE_SITECUSTOMIZE / **/
-#endif
-
-/* HAS_SNPRINTF:
- * This symbol, if defined, indicates that the snprintf () library
- * function is available for use.
- */
-/* HAS_VSNPRINTF:
- * This symbol, if defined, indicates that the vsnprintf () library
- * function is available for use.
- */
-#define HAS_SNPRINTF /**/
-#define HAS_VSNPRINTF /**/
-
-/* HAS_SOCKATMARK:
- * This symbol, if defined, indicates that the sockatmark routine is
- * available to test whether a socket is at the out-of-band mark.
- */
-/*#define HAS_SOCKATMARK / **/
-
-/* HAS_SOCKATMARK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the sockatmark() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int sockatmark(int);
- */
-/*#define HAS_SOCKATMARK_PROTO / **/
-
-/* HAS_SOCKS5_INIT:
- * This symbol, if defined, indicates that the socks5_init routine is
- * available to initialize SOCKS 5.
- */
-/*#define HAS_SOCKS5_INIT / **/
-
-/* SPRINTF_RETURNS_STRLEN:
- * This variable defines whether sprintf returns the length of the string
- * (as per the ANSI spec). Some C libraries retain compatibility with
- * pre-ANSI C and return a pointer to the passed in buffer; for these
- * this variable will be undef.
- */
-#define SPRINTF_RETURNS_STRLEN /**/
-
-/* HAS_SQRTL:
- * This symbol, if defined, indicates that the sqrtl routine is
- * available to do long double square roots.
- */
-/*#define HAS_SQRTL / **/
-
-/* HAS_SETRESGID_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the setresgid() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern int setresgid(uid_t ruid, uid_t euid, uid_t suid);
- */
-/*#define HAS_SETRESGID_PROTO / **/
-
-/* HAS_SETRESUID_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the setresuid() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern int setresuid(uid_t ruid, uid_t euid, uid_t suid);
- */
-/*#define HAS_SETRESUID_PROTO / **/
-
-/* HAS_STRUCT_STATFS_F_FLAGS:
- * This symbol, if defined, indicates that the struct statfs
- * does have the f_flags member containing the mount flags of
- * the filesystem containing the file.
- * This kind of struct statfs is coming from <sys/mount.h> (BSD 4.3),
- * not from <sys/statfs.h> (SYSV). Older BSDs (like Ultrix) do not
- * have statfs() and struct statfs, they have ustat() and getmnt()
- * with struct ustat and struct fs_data.
- */
-/*#define HAS_STRUCT_STATFS_F_FLAGS / **/
-
-/* HAS_STRUCT_STATFS:
- * This symbol, if defined, indicates that the struct statfs
- * to do statfs() is supported.
- */
-/*#define HAS_STRUCT_STATFS / **/
-
-/* HAS_FSTATVFS:
- * This symbol, if defined, indicates that the fstatvfs routine is
- * available to stat filesystems by file descriptors.
- */
-/*#define HAS_FSTATVFS / **/
-
-/* HAS_STRFTIME:
- * This symbol, if defined, indicates that the strftime routine is
- * available to do time formatting.
- */
-#define HAS_STRFTIME /**/
-
-/* HAS_STRLCAT:
- * This symbol, if defined, indicates that the strlcat () routine is
- * available to do string concatenation.
- */
-/*#define HAS_STRLCAT / **/
-
-/* HAS_STRLCPY:
- * This symbol, if defined, indicates that the strlcpy () routine is
- * available to do string copying.
- */
-/*#define HAS_STRLCPY / **/
-
-/* HAS_STRTOLD:
- * This symbol, if defined, indicates that the strtold routine is
- * available to convert strings to long doubles.
- */
-/*#define HAS_STRTOLD / **/
-
-/* HAS_STRTOLL:
- * This symbol, if defined, indicates that the strtoll routine is
- * available to convert strings to long longs.
- */
-/*#define HAS_STRTOLL / **/
-
-/* HAS_STRTOQ:
- * This symbol, if defined, indicates that the strtoq routine is
- * available to convert strings to long longs (quads).
- */
-/*#define HAS_STRTOQ / **/
-
-/* HAS_STRTOULL:
- * This symbol, if defined, indicates that the strtoull routine is
- * available to convert strings to unsigned long longs.
- */
-/*#define HAS_STRTOULL / **/
-
-/* HAS_STRTOUQ:
- * This symbol, if defined, indicates that the strtouq routine is
- * available to convert strings to unsigned long longs (quads).
- */
-/*#define HAS_STRTOUQ / **/
-
-/* HAS_SYSCALL_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the syscall() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern int syscall(int, ...);
- * extern int syscall(long, ...);
- */
-/*#define HAS_SYSCALL_PROTO / **/
-
-/* HAS_TELLDIR_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the telldir() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern long telldir(DIR*);
- */
-#define HAS_TELLDIR_PROTO /**/
-
-/* HAS_CTIME64:
- * This symbol, if defined, indicates that the ctime64 () routine is
- * available to do the 64bit variant of ctime ()
- */
-/* HAS_LOCALTIME64:
- * This symbol, if defined, indicates that the localtime64 () routine is
- * available to do the 64bit variant of localtime ()
- */
-/* HAS_GMTIME64:
- * This symbol, if defined, indicates that the gmtime64 () routine is
- * available to do the 64bit variant of gmtime ()
- */
-/* HAS_MKTIME64:
- * This symbol, if defined, indicates that the mktime64 () routine is
- * available to do the 64bit variant of mktime ()
- */
-/* HAS_DIFFTIME64:
- * This symbol, if defined, indicates that the difftime64 () routine is
- * available to do the 64bit variant of difftime ()
- */
-/* HAS_ASCTIME64:
- * This symbol, if defined, indicates that the asctime64 () routine is
- * available to do the 64bit variant of asctime ()
- */
-/*#define HAS_CTIME64 / **/
-/*#define HAS_LOCALTIME64 / **/
-/*#define HAS_GMTIME64 / **/
-/*#define HAS_MKTIME64 / **/
-/*#define HAS_DIFFTIME64 / **/
-/*#define HAS_ASCTIME64 / **/
-
-/* HAS_TIMEGM:
- * This symbol, if defined, indicates that the timegm routine is
- * available to do the opposite of gmtime ()
- */
-/*#define HAS_TIMEGM / **/
-
-/* U32_ALIGNMENT_REQUIRED:
- * This symbol, if defined, indicates that you must access
- * character data through U32-aligned pointers.
- */
-#ifndef U32_ALIGNMENT_REQUIRED
-#define U32_ALIGNMENT_REQUIRED /**/
-#endif
-
-/* HAS_UALARM:
- * This symbol, if defined, indicates that the ualarm routine is
- * available to do alarms with microsecond granularity.
- */
-/*#define HAS_UALARM / **/
-
-/* HAS_UNORDERED:
- * This symbol, if defined, indicates that the unordered routine is
- * available to check whether two doubles are unordered
- * (effectively: whether either of them is NaN)
- */
-/*#define HAS_UNORDERED / **/
-
-/* HAS_UNSETENV:
- * This symbol, if defined, indicates that the unsetenv () routine is
- * available for use.
- */
-/*#define HAS_UNSETENV / **/
-
-/* HAS_USLEEP_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the usleep() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int usleep(useconds_t);
- */
-/*#define HAS_USLEEP_PROTO / **/
-
-/* HAS_USTAT:
- * This symbol, if defined, indicates that the ustat system call is
- * available to query file system statistics by dev_t.
- */
-/*#define HAS_USTAT / **/
-
-/* HAS_WRITEV:
- * This symbol, if defined, indicates that the writev routine is
- * available to do scatter writes.
- */
-/*#define HAS_WRITEV / **/
-
-/* USE_DYNAMIC_LOADING:
- * This symbol, if defined, indicates that dynamic loading of
- * some sort is available.
- */
-#define USE_DYNAMIC_LOADING /**/
-
-/* FFLUSH_NULL:
- * This symbol, if defined, tells that fflush(NULL) does flush
- * all pending stdio output.
- */
-/* FFLUSH_ALL:
- * This symbol, if defined, tells that to flush
- * all pending stdio output one must loop through all
- * the stdio file handles stored in an array and fflush them.
- * Note that if fflushNULL is defined, fflushall will not
- * even be probed for and will be left undefined.
- */
-#define FFLUSH_NULL /**/
-/*#define FFLUSH_ALL / **/
-
-/* I_ASSERT:
- * This symbol, if defined, indicates that <assert.h> exists and
- * could be included by the C program to get the assert() macro.
- */
-#define I_ASSERT /**/
-
-/* I_CRYPT:
- * This symbol, if defined, indicates that <crypt.h> exists and
- * should be included.
- */
-/*#define I_CRYPT / **/
-
-/* DB_Prefix_t:
- * This symbol contains the type of the prefix structure element
- * in the <db.h> header file. In older versions of DB, it was
- * int, while in newer ones it is u_int32_t.
- */
-/* DB_Hash_t:
- * This symbol contains the type of the prefix structure element
- * in the <db.h> header file. In older versions of DB, it was
- * int, while in newer ones it is size_t.
- */
-/* DB_VERSION_MAJOR_CFG:
- * This symbol, if defined, defines the major version number of
- * Berkeley DB found in the <db.h> header when Perl was configured.
- */
-/* DB_VERSION_MINOR_CFG:
- * This symbol, if defined, defines the minor version number of
- * Berkeley DB found in the <db.h> header when Perl was configured.
- * For DB version 1 this is always 0.
- */
-/* DB_VERSION_PATCH_CFG:
- * This symbol, if defined, defines the patch version number of
- * Berkeley DB found in the <db.h> header when Perl was configured.
- * For DB version 1 this is always 0.
- */
-#define DB_Hash_t int /**/
-#define DB_Prefix_t int /**/
-#define DB_VERSION_MAJOR_CFG 0 /**/
-#define DB_VERSION_MINOR_CFG 0 /**/
-#define DB_VERSION_PATCH_CFG 0 /**/
-
-/* I_FP:
- * This symbol, if defined, indicates that <fp.h> exists and
- * should be included.
- */
-/*#define I_FP / **/
-
-/* I_FP_CLASS:
- * This symbol, if defined, indicates that <fp_class.h> exists and
- * should be included.
- */
-/*#define I_FP_CLASS / **/
-
-/* I_IEEEFP:
- * This symbol, if defined, indicates that <ieeefp.h> exists and
- * should be included.
- */
-/*#define I_IEEEFP / **/
-
-/* I_INTTYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <inttypes.h>.
- */
-/*#define I_INTTYPES / **/
-
-/* I_LANGINFO:
- * This symbol, if defined, indicates that <langinfo.h> exists and
- * should be included.
- */
-/*#define I_LANGINFO / **/
-
-/* I_LIBUTIL:
- * This symbol, if defined, indicates that <libutil.h> exists and
- * should be included.
- */
-/*#define I_LIBUTIL / **/
-
-/* I_MALLOCMALLOC:
- * This symbol, if defined, indicates to the C program that it should
- * include <malloc/malloc.h>.
- */
-/*#define I_MALLOCMALLOC / **/
-
-/* I_MNTENT:
- * This symbol, if defined, indicates that <mntent.h> exists and
- * should be included.
- */
-/*#define I_MNTENT / **/
-
-/* I_NETINET_TCP:
- * This symbol, if defined, indicates to the C program that it should
- * include <netinet/tcp.h>.
- */
-/*#define I_NETINET_TCP / **/
-
-/* I_POLL:
- * This symbol, if defined, indicates that <poll.h> exists and
- * should be included. (see also HAS_POLL)
- */
-/*#define I_POLL / **/
-
-/* I_PROT:
- * This symbol, if defined, indicates that <prot.h> exists and
- * should be included.
- */
-/*#define I_PROT / **/
-
-/* I_SHADOW:
- * This symbol, if defined, indicates that <shadow.h> exists and
- * should be included.
- */
-/*#define I_SHADOW / **/
-
-/* I_SOCKS:
- * This symbol, if defined, indicates that <socks.h> exists and
- * should be included.
- */
-/*#define I_SOCKS / **/
-
-/* I_SUNMATH:
- * This symbol, if defined, indicates that <sunmath.h> exists and
- * should be included.
- */
-/*#define I_SUNMATH / **/
-
-/* I_SYSLOG:
- * This symbol, if defined, indicates that <syslog.h> exists and
- * should be included.
- */
-/*#define I_SYSLOG / **/
-
-/* I_SYSMODE:
- * This symbol, if defined, indicates that <sys/mode.h> exists and
- * should be included.
- */
-/*#define I_SYSMODE / **/
-
-/* I_SYS_MOUNT:
- * This symbol, if defined, indicates that <sys/mount.h> exists and
- * should be included.
- */
-/*#define I_SYS_MOUNT / **/
-
-/* I_SYS_STATFS:
- * This symbol, if defined, indicates that <sys/statfs.h> exists.
- */
-/*#define I_SYS_STATFS / **/
-
-/* I_SYS_STATVFS:
- * This symbol, if defined, indicates that <sys/statvfs.h> exists and
- * should be included.
- */
-/*#define I_SYS_STATVFS / **/
-
-/* I_SYSUTSNAME:
- * This symbol, if defined, indicates that <sys/utsname.h> exists and
- * should be included.
- */
-/*#define I_SYSUTSNAME / **/
-
-/* I_SYS_VFS:
- * This symbol, if defined, indicates that <sys/vfs.h> exists and
- * should be included.
- */
-/*#define I_SYS_VFS / **/
-
-/* I_USTAT:
- * This symbol, if defined, indicates that <ustat.h> exists and
- * should be included.
- */
-/*#define I_USTAT / **/
-
-/* PERL_PRIfldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'f') for output.
- */
-/* PERL_PRIgldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'g') for output.
- */
-/* PERL_PRIeldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'e') for output.
- */
-/* PERL_SCNfldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'f') for input.
- */
-/*#define PERL_PRIfldbl "Lf" / **/
-/*#define PERL_PRIgldbl "Lg" / **/
-/*#define PERL_PRIeldbl "Le" / **/
-/*#define PERL_SCNfldbl "Lf" / **/
-
-/* PERL_MAD:
- * This symbol, if defined, indicates that the Misc Attribution
- * Declaration code should be conditionally compiled.
- */
-/*#define PERL_MAD / **/
-
-/* NEED_VA_COPY:
- * This symbol, if defined, indicates that the system stores
- * the variable argument list datatype, va_list, in a format
- * that cannot be copied by simple assignment, so that some
- * other means must be used when copying is required.
- * As such systems vary in their provision (or non-provision)
- * of copying mechanisms, handy.h defines a platform-
- * independent macro, Perl_va_copy(src, dst), to do the job.
- */
-/*#define NEED_VA_COPY / **/
-
-/* IVTYPE:
- * This symbol defines the C type used for Perl's IV.
- */
-/* UVTYPE:
- * This symbol defines the C type used for Perl's UV.
- */
-/* I8TYPE:
- * This symbol defines the C type used for Perl's I8.
- */
-/* U8TYPE:
- * This symbol defines the C type used for Perl's U8.
- */
-/* I16TYPE:
- * This symbol defines the C type used for Perl's I16.
- */
-/* U16TYPE:
- * This symbol defines the C type used for Perl's U16.
- */
-/* I32TYPE:
- * This symbol defines the C type used for Perl's I32.
- */
-/* U32TYPE:
- * This symbol defines the C type used for Perl's U32.
- */
-/* I64TYPE:
- * This symbol defines the C type used for Perl's I64.
- */
-/* U64TYPE:
- * This symbol defines the C type used for Perl's U64.
- */
-/* NVTYPE:
- * This symbol defines the C type used for Perl's NV.
- */
-/* IVSIZE:
- * This symbol contains the sizeof(IV).
- */
-/* UVSIZE:
- * This symbol contains the sizeof(UV).
- */
-/* I8SIZE:
- * This symbol contains the sizeof(I8).
- */
-/* U8SIZE:
- * This symbol contains the sizeof(U8).
- */
-/* I16SIZE:
- * This symbol contains the sizeof(I16).
- */
-/* U16SIZE:
- * This symbol contains the sizeof(U16).
- */
-/* I32SIZE:
- * This symbol contains the sizeof(I32).
- */
-/* U32SIZE:
- * This symbol contains the sizeof(U32).
- */
-/* I64SIZE:
- * This symbol contains the sizeof(I64).
- */
-/* U64SIZE:
- * This symbol contains the sizeof(U64).
- */
-/* NVSIZE:
- * This symbol contains the sizeof(NV).
- */
-/* NV_PRESERVES_UV:
- * This symbol, if defined, indicates that a variable of type NVTYPE
- * can preserve all the bits of a variable of type UVTYPE.
- */
-/* NV_PRESERVES_UV_BITS:
- * This symbol contains the number of bits a variable of type NVTYPE
- * can preserve of a variable of type UVTYPE.
- */
-/* NV_OVERFLOWS_INTEGERS_AT:
- * This symbol gives the largest integer value that NVs can hold. This
- * value + 1.0 cannot be stored accurately. It is expressed as constant
- * floating point expression to reduce the chance of decimale/binary
- * conversion issues. If it can not be determined, the value 0 is given.
- */
-/* NV_ZERO_IS_ALLBITS_ZERO:
- * This symbol, if defined, indicates that a variable of type NVTYPE
- * stores 0.0 in memory as all bits zero.
- */
-#define IVTYPE long /**/
-#define UVTYPE unsigned long /**/
-#define I8TYPE char /**/
-#define U8TYPE unsigned char /**/
-#define I16TYPE short /**/
-#define U16TYPE unsigned short /**/
-#define I32TYPE long /**/
-#define U32TYPE unsigned long /**/
-#ifdef HAS_QUAD
-#define I64TYPE __int64 /**/
-#define U64TYPE unsigned __int64 /**/
-#endif
-#define NVTYPE double /**/
-#define IVSIZE 4 /**/
-#define UVSIZE 4 /**/
-#define I8SIZE 1 /**/
-#define U8SIZE 1 /**/
-#define I16SIZE 2 /**/
-#define U16SIZE 2 /**/
-#define I32SIZE 4 /**/
-#define U32SIZE 4 /**/
-#ifdef HAS_QUAD
-#define I64SIZE 8 /**/
-#define U64SIZE 8 /**/
-#endif
-#define NVSIZE 8 /**/
-#define NV_PRESERVES_UV
-#define NV_PRESERVES_UV_BITS 32
-#define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0
-#define NV_ZERO_IS_ALLBITS_ZERO
-#if UVSIZE == 8
-# ifdef BYTEORDER
-# if BYTEORDER == 0x1234
-# undef BYTEORDER
-# define BYTEORDER 0x12345678
-# else
-# if BYTEORDER == 0x4321
-# undef BYTEORDER
-# define BYTEORDER 0x87654321
-# endif
-# endif
-# endif
-#endif
-
-/* IVdf:
- * This symbol defines the format string used for printing a Perl IV
- * as a signed decimal integer.
- */
-/* UVuf:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned decimal integer.
- */
-/* UVof:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned octal integer.
- */
-/* UVxf:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned hexadecimal integer in lowercase abcdef.
- */
-/* UVXf:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned hexadecimal integer in uppercase ABCDEF.
- */
-/* NVef:
- * This symbol defines the format string used for printing a Perl NV
- * using %e-ish floating point format.
- */
-/* NVff:
- * This symbol defines the format string used for printing a Perl NV
- * using %f-ish floating point format.
- */
-/* NVgf:
- * This symbol defines the format string used for printing a Perl NV
- * using %g-ish floating point format.
- */
-#define IVdf "ld" /**/
-#define UVuf "lu" /**/
-#define UVof "lo" /**/
-#define UVxf "lx" /**/
-#define UVXf "lX" /**/
-#define NVef "e" /**/
-#define NVff "f" /**/
-#define NVgf "g" /**/
-
-/* SELECT_MIN_BITS:
- * This symbol holds the minimum number of bits operated by select.
- * That is, if you do select(n, ...), how many bits at least will be
- * cleared in the masks if some activity is detected. Usually this
- * is either n or 32*ceil(n/32), especially many little-endians do
- * the latter. This is only useful if you have select(), naturally.
- */
-#define SELECT_MIN_BITS 32 /**/
-
-/* STARTPERL:
- * This variable contains the string to put in front of a perl
- * script to make sure (one hopes) that it runs with perl and not
- * some shell.
- */
-#define STARTPERL "#!perl" /**/
-
-/* HAS_STDIO_STREAM_ARRAY:
- * This symbol, if defined, tells that there is an array
- * holding the stdio streams.
- */
-/* STDIO_STREAM_ARRAY:
- * This symbol tells the name of the array holding the stdio streams.
- * Usual values include _iob, __iob, and __sF.
- */
-/*#define HAS_STDIO_STREAM_ARRAY / **/
-#ifdef HAS_STDIO_STREAM_ARRAY
-#define STDIO_STREAM_ARRAY
-#endif
-
-/* GMTIME_MAX:
- * This symbol contains the maximum value for the time_t offset that
- * the system function gmtime () accepts, and defaults to 0
- */
-/* GMTIME_MIN:
- * This symbol contains the minimum value for the time_t offset that
- * the system function gmtime () accepts, and defaults to 0
- */
-/* LOCALTIME_MAX:
- * This symbol contains the maximum value for the time_t offset that
- * the system function localtime () accepts, and defaults to 0
- */
-/* LOCALTIME_MIN:
- * This symbol contains the minimum value for the time_t offset that
- * the system function localtime () accepts, and defaults to 0
- */
-#define GMTIME_MAX 2147483647 /**/
-#define GMTIME_MIN 0 /**/
-#define LOCALTIME_MAX 2147483647 /**/
-#define LOCALTIME_MIN 0 /**/
-
-/* USE_64_BIT_INT:
- * This symbol, if defined, indicates that 64-bit integers should
- * be used when available. If not defined, the native integers
- * will be employed (be they 32 or 64 bits). The minimal possible
- * 64-bitness is used, just enough to get 64-bit integers into Perl.
- * This may mean using for example "long longs", while your memory
- * may still be limited to 2 gigabytes.
- */
-/* USE_64_BIT_ALL:
- * This symbol, if defined, indicates that 64-bit integers should
- * be used when available. If not defined, the native integers
- * will be used (be they 32 or 64 bits). The maximal possible
- * 64-bitness is employed: LP64 or ILP64, meaning that you will
- * be able to use more than 2 gigabytes of memory. This mode is
- * even more binary incompatible than USE_64_BIT_INT. You may not
- * be able to run the resulting executable in a 32-bit CPU at all or
- * you may need at least to reboot your OS to 64-bit mode.
- */
-#ifndef USE_64_BIT_INT
-/*#define USE_64_BIT_INT / **/
-#endif
-#ifndef USE_64_BIT_ALL
-/*#define USE_64_BIT_ALL / **/
-#endif
-
-/* USE_DTRACE:
- * This symbol, if defined, indicates that Perl should
- * be built with support for DTrace.
- */
-/*#define USE_DTRACE / **/
-
-/* USE_FAST_STDIO:
- * This symbol, if defined, indicates that Perl should
- * be built to use 'fast stdio'.
- * Defaults to define in Perls 5.8 and earlier, to undef later.
- */
-#ifndef USE_FAST_STDIO
-/*#define USE_FAST_STDIO / **/
-#endif
-
-/* USE_LARGE_FILES:
- * This symbol, if defined, indicates that large file support
- * should be used when available.
- */
-#ifndef USE_LARGE_FILES
-/*#define USE_LARGE_FILES / **/
-#endif
-
-/* USE_LONG_DOUBLE:
- * This symbol, if defined, indicates that long doubles should
- * be used when available.
- */
-#ifndef USE_LONG_DOUBLE
-/*#define USE_LONG_DOUBLE / **/
-#endif
-
-/* USE_MORE_BITS:
- * This symbol, if defined, indicates that 64-bit interfaces and
- * long doubles should be used when available.
- */
-#ifndef USE_MORE_BITS
-/*#define USE_MORE_BITS / **/
-#endif
-
-/* MULTIPLICITY:
- * This symbol, if defined, indicates that Perl should
- * be built to use multiplicity.
- */
-#ifndef MULTIPLICITY
-/*#define MULTIPLICITY / **/
-#endif
-
-/* USE_PERLIO:
- * This symbol, if defined, indicates that the PerlIO abstraction should
- * be used throughout. If not defined, stdio should be
- * used in a fully backward compatible manner.
- */
-#ifndef USE_PERLIO
-/*#define USE_PERLIO / **/
-#endif
-
-/* USE_SOCKS:
- * This symbol, if defined, indicates that Perl should
- * be built to use socks.
- */
-#ifndef USE_SOCKS
-/*#define USE_SOCKS / **/
-#endif
-
-#endif
Deleted: vendor/perl/dist/win32/config_H.gc64
===================================================================
--- vendor/perl/dist/win32/config_H.gc64 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/config_H.gc64 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,4719 +0,0 @@
-/*
- * This file was produced by running the config_h.SH script, which
- * gets its values from undef, which is generally produced by
- * running Configure.
- *
- * Feel free to modify any of this as the need arises. Note, however,
- * that running config_h.SH again will wipe out any changes you've made.
- * For a more permanent change edit undef and rerun config_h.SH.
- *
- * $Id: config_H.gc64,v 1.1.1.1 2011-05-19 23:03:36 laffer1 Exp $
- */
-
-/*
- * Package name : perl5
- * Source directory :
- * Configuration time: Sun Jan 10 19:53:56 2010
- * Configured by : Steve
- * Target system :
- */
-
-#ifndef _config_h_
-#define _config_h_
-
-/* LOC_SED:
- * This symbol holds the complete pathname to the sed program.
- */
-#define LOC_SED "" /**/
-
-/* HAS_ALARM:
- * This symbol, if defined, indicates that the alarm routine is
- * available.
- */
-#define HAS_ALARM /**/
-
-/* HAS_BCMP:
- * This symbol is defined if the bcmp() routine is available to
- * compare blocks of memory.
- */
-/*#define HAS_BCMP / **/
-
-/* HAS_BCOPY:
- * This symbol is defined if the bcopy() routine is available to
- * copy blocks of memory.
- */
-/*#define HAS_BCOPY / **/
-
-/* HAS_BZERO:
- * This symbol is defined if the bzero() routine is available to
- * set a memory block to 0.
- */
-/*#define HAS_BZERO / **/
-
-/* HAS_CHOWN:
- * This symbol, if defined, indicates that the chown routine is
- * available.
- */
-/*#define HAS_CHOWN / **/
-
-/* HAS_CHROOT:
- * This symbol, if defined, indicates that the chroot routine is
- * available.
- */
-/*#define HAS_CHROOT / **/
-
-/* HAS_CHSIZE:
- * This symbol, if defined, indicates that the chsize routine is available
- * to truncate files. You might need a -lx to get this routine.
- */
-#define HAS_CHSIZE /**/
-
-/* HAS_CRYPT:
- * This symbol, if defined, indicates that the crypt routine is available
- * to encrypt passwords and the like.
- */
-/*#define HAS_CRYPT / **/
-
-/* HAS_CTERMID:
- * This symbol, if defined, indicates that the ctermid routine is
- * available to generate filename for terminal.
- */
-/*#define HAS_CTERMID / **/
-
-/* HAS_CUSERID:
- * This symbol, if defined, indicates that the cuserid routine is
- * available to get character login names.
- */
-/*#define HAS_CUSERID / **/
-
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-#define HAS_DBL_DIG /**/
-
-/* HAS_DIFFTIME:
- * This symbol, if defined, indicates that the difftime routine is
- * available.
- */
-#define HAS_DIFFTIME /**/
-
-/* HAS_DLERROR:
- * This symbol, if defined, indicates that the dlerror routine is
- * available to return a string describing the last error that
- * occurred from a call to dlopen(), dlclose() or dlsym().
- */
-#define HAS_DLERROR /**/
-
-/* HAS_DUP2:
- * This symbol, if defined, indicates that the dup2 routine is
- * available to duplicate file descriptors.
- */
-#define HAS_DUP2 /**/
-
-/* HAS_FCHMOD:
- * This symbol, if defined, indicates that the fchmod routine is available
- * to change mode of opened files. If unavailable, use chmod().
- */
-/*#define HAS_FCHMOD / **/
-
-/* HAS_FCHOWN:
- * This symbol, if defined, indicates that the fchown routine is available
- * to change ownership of opened files. If unavailable, use chown().
- */
-/*#define HAS_FCHOWN / **/
-
-/* HAS_FCNTL:
- * This symbol, if defined, indicates to the C program that
- * the fcntl() function exists.
- */
-/*#define HAS_FCNTL / **/
-
-/* HAS_FGETPOS:
- * This symbol, if defined, indicates that the fgetpos routine is
- * available to get the file position indicator, similar to ftell().
- */
-#define HAS_FGETPOS /**/
-
-/* HAS_FLOCK:
- * This symbol, if defined, indicates that the flock routine is
- * available to do file locking.
- */
-#define HAS_FLOCK /**/
-
-/* HAS_FORK:
- * This symbol, if defined, indicates that the fork routine is
- * available.
- */
-/*#define HAS_FORK / **/
-
-/* HAS_FSETPOS:
- * This symbol, if defined, indicates that the fsetpos routine is
- * available to set the file position indicator, similar to fseek().
- */
-#define HAS_FSETPOS /**/
-
-/* HAS_GETTIMEOFDAY:
- * This symbol, if defined, indicates that the gettimeofday() system
- * call is available for a sub-second accuracy clock. Usually, the file
- * <sys/resource.h> needs to be included (see I_SYS_RESOURCE).
- * The type "Timeval" should be used to refer to "struct timeval".
- */
-#define HAS_GETTIMEOFDAY /**/
-#ifdef HAS_GETTIMEOFDAY
-#define Timeval struct timeval /* Structure used by gettimeofday() */
-#endif
-
-/* HAS_GETGROUPS:
- * This symbol, if defined, indicates that the getgroups() routine is
- * available to get the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
-/*#define HAS_GETGROUPS / **/
-
-/* HAS_GETLOGIN:
- * This symbol, if defined, indicates that the getlogin routine is
- * available to get the login name.
- */
-#define HAS_GETLOGIN /**/
-
-/* HAS_GETPGID:
- * This symbol, if defined, indicates to the C program that
- * the getpgid(pid) function is available to get the
- * process group id.
- */
-/*#define HAS_GETPGID / **/
-
-/* HAS_GETPGRP2:
- * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
- * routine is available to get the current process group.
- */
-/*#define HAS_GETPGRP2 / **/
-
-/* HAS_GETPPID:
- * This symbol, if defined, indicates that the getppid routine is
- * available to get the parent process ID.
- */
-/*#define HAS_GETPPID / **/
-
-/* HAS_GETPRIORITY:
- * This symbol, if defined, indicates that the getpriority routine is
- * available to get a process's priority.
- */
-/*#define HAS_GETPRIORITY / **/
-
-/* HAS_INET_ATON:
- * This symbol, if defined, indicates to the C program that the
- * inet_aton() function is available to parse IP address "dotted-quad"
- * strings.
- */
-/*#define HAS_INET_ATON / **/
-
-/* HAS_KILLPG:
- * This symbol, if defined, indicates that the killpg routine is available
- * to kill process groups. If unavailable, you probably should use kill
- * with a negative process number.
- */
-#define HAS_KILLPG /**/
-
-/* HAS_LINK:
- * This symbol, if defined, indicates that the link routine is
- * available to create hard links.
- */
-#define HAS_LINK /**/
-
-/* HAS_LOCALECONV:
- * This symbol, if defined, indicates that the localeconv routine is
- * available for numeric and monetary formatting conventions.
- */
-#define HAS_LOCALECONV /**/
-
-/* HAS_LOCKF:
- * This symbol, if defined, indicates that the lockf routine is
- * available to do file locking.
- */
-/*#define HAS_LOCKF / **/
-
-/* HAS_LSTAT:
- * This symbol, if defined, indicates that the lstat routine is
- * available to do file stats on symbolic links.
- */
-/*#define HAS_LSTAT / **/
-
-/* HAS_MBLEN:
- * This symbol, if defined, indicates that the mblen routine is available
- * to find the number of bytes in a multibye character.
- */
-#define HAS_MBLEN /**/
-
-/* HAS_MBSTOWCS:
- * This symbol, if defined, indicates that the mbstowcs routine is
- * available to covert a multibyte string into a wide character string.
- */
-#define HAS_MBSTOWCS /**/
-
-/* HAS_MBTOWC:
- * This symbol, if defined, indicates that the mbtowc routine is available
- * to covert a multibyte to a wide character.
- */
-#define HAS_MBTOWC /**/
-
-/* HAS_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * to compare blocks of memory.
- */
-#define HAS_MEMCMP /**/
-
-/* HAS_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy blocks of memory.
- */
-#define HAS_MEMCPY /**/
-
-/* HAS_MEMMOVE:
- * This symbol, if defined, indicates that the memmove routine is available
- * to copy potentially overlapping blocks of memory. This should be used
- * only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your
- * own version.
- */
-#define HAS_MEMMOVE /**/
-
-/* HAS_MEMSET:
- * This symbol, if defined, indicates that the memset routine is available
- * to set blocks of memory.
- */
-#define HAS_MEMSET /**/
-
-/* HAS_MKDIR:
- * This symbol, if defined, indicates that the mkdir routine is available
- * to create directories. Otherwise you should fork off a new process to
- * exec /bin/mkdir.
- */
-#define HAS_MKDIR /**/
-
-/* HAS_MKFIFO:
- * This symbol, if defined, indicates that the mkfifo routine is
- * available to create FIFOs. Otherwise, mknod should be able to
- * do it for you. However, if mkfifo is there, mknod might require
- * super-user privileges which mkfifo will not.
- */
-/*#define HAS_MKFIFO / **/
-
-/* HAS_MKTIME:
- * This symbol, if defined, indicates that the mktime routine is
- * available.
- */
-#define HAS_MKTIME /**/
-
-/* HAS_MSYNC:
- * This symbol, if defined, indicates that the msync system call is
- * available to synchronize a mapped file.
- */
-/*#define HAS_MSYNC / **/
-
-/* HAS_MUNMAP:
- * This symbol, if defined, indicates that the munmap system call is
- * available to unmap a region, usually mapped by mmap().
- */
-/*#define HAS_MUNMAP / **/
-
-/* HAS_NICE:
- * This symbol, if defined, indicates that the nice routine is
- * available.
- */
-/*#define HAS_NICE / **/
-
-/* HAS_PATHCONF:
- * This symbol, if defined, indicates that pathconf() is available
- * to determine file-system related limits and options associated
- * with a given filename.
- */
-/* HAS_FPATHCONF:
- * This symbol, if defined, indicates that pathconf() is available
- * to determine file-system related limits and options associated
- * with a given open file descriptor.
- */
-/*#define HAS_PATHCONF / **/
-/*#define HAS_FPATHCONF / **/
-
-/* HAS_PAUSE:
- * This symbol, if defined, indicates that the pause routine is
- * available to suspend a process until a signal is received.
- */
-#define HAS_PAUSE /**/
-
-/* HAS_PIPE:
- * This symbol, if defined, indicates that the pipe routine is
- * available to create an inter-process channel.
- */
-#define HAS_PIPE /**/
-
-/* HAS_POLL:
- * This symbol, if defined, indicates that the poll routine is
- * available to poll active file descriptors. Please check I_POLL and
- * I_SYS_POLL to know which header should be included as well.
- */
-/*#define HAS_POLL / **/
-
-/* HAS_READDIR:
- * This symbol, if defined, indicates that the readdir routine is
- * available to read directory entries. You may have to include
- * <dirent.h>. See I_DIRENT.
- */
-#define HAS_READDIR /**/
-
-/* HAS_SEEKDIR:
- * This symbol, if defined, indicates that the seekdir routine is
- * available. You may have to include <dirent.h>. See I_DIRENT.
- */
-#define HAS_SEEKDIR /**/
-
-/* HAS_TELLDIR:
- * This symbol, if defined, indicates that the telldir routine is
- * available. You may have to include <dirent.h>. See I_DIRENT.
- */
-#define HAS_TELLDIR /**/
-
-/* HAS_REWINDDIR:
- * This symbol, if defined, indicates that the rewinddir routine is
- * available. You may have to include <dirent.h>. See I_DIRENT.
- */
-#define HAS_REWINDDIR /**/
-
-/* HAS_READLINK:
- * This symbol, if defined, indicates that the readlink routine is
- * available to read the value of a symbolic link.
- */
-/*#define HAS_READLINK / **/
-
-/* HAS_RENAME:
- * This symbol, if defined, indicates that the rename routine is available
- * to rename files. Otherwise you should do the unlink(), link(), unlink()
- * trick.
- */
-#define HAS_RENAME /**/
-
-/* HAS_RMDIR:
- * This symbol, if defined, indicates that the rmdir routine is
- * available to remove directories. Otherwise you should fork off a
- * new process to exec /bin/rmdir.
- */
-#define HAS_RMDIR /**/
-
-/* HAS_SELECT:
- * This symbol, if defined, indicates that the select routine is
- * available to select active file descriptors. If the timeout field
- * is used, <sys/time.h> may need to be included.
- */
-#define HAS_SELECT /**/
-
-/* HAS_SETEGID:
- * This symbol, if defined, indicates that the setegid routine is available
- * to change the effective gid of the current program.
- */
-/*#define HAS_SETEGID / **/
-
-/* HAS_SETEUID:
- * This symbol, if defined, indicates that the seteuid routine is available
- * to change the effective uid of the current program.
- */
-/*#define HAS_SETEUID / **/
-
-/* HAS_SETGROUPS:
- * This symbol, if defined, indicates that the setgroups() routine is
- * available to set the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
-/*#define HAS_SETGROUPS / **/
-
-/* HAS_SETLINEBUF:
- * This symbol, if defined, indicates that the setlinebuf routine is
- * available to change stderr or stdout from block-buffered or unbuffered
- * to a line-buffered mode.
- */
-/*#define HAS_SETLINEBUF / **/
-
-/* HAS_SETLOCALE:
- * This symbol, if defined, indicates that the setlocale routine is
- * available to handle locale-specific ctype implementations.
- */
-#define HAS_SETLOCALE /**/
-
-/* HAS_SETPGID:
- * This symbol, if defined, indicates that the setpgid(pid, gpid)
- * routine is available to set process group ID.
- */
-/*#define HAS_SETPGID / **/
-
-/* HAS_SETPGRP2:
- * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
- * routine is available to set the current process group.
- */
-/*#define HAS_SETPGRP2 / **/
-
-/* HAS_SETPRIORITY:
- * This symbol, if defined, indicates that the setpriority routine is
- * available to set a process's priority.
- */
-/*#define HAS_SETPRIORITY / **/
-
-/* HAS_SETREGID:
- * This symbol, if defined, indicates that the setregid routine is
- * available to change the real and effective gid of the current
- * process.
- */
-/* HAS_SETRESGID:
- * This symbol, if defined, indicates that the setresgid routine is
- * available to change the real, effective and saved gid of the current
- * process.
- */
-/*#define HAS_SETREGID / **/
-/*#define HAS_SETRESGID / **/
-
-/* HAS_SETREUID:
- * This symbol, if defined, indicates that the setreuid routine is
- * available to change the real and effective uid of the current
- * process.
- */
-/* HAS_SETRESUID:
- * This symbol, if defined, indicates that the setresuid routine is
- * available to change the real, effective and saved uid of the current
- * process.
- */
-/*#define HAS_SETREUID / **/
-/*#define HAS_SETRESUID / **/
-
-/* HAS_SETRGID:
- * This symbol, if defined, indicates that the setrgid routine is available
- * to change the real gid of the current program.
- */
-/*#define HAS_SETRGID / **/
-
-/* HAS_SETRUID:
- * This symbol, if defined, indicates that the setruid routine is available
- * to change the real uid of the current program.
- */
-/*#define HAS_SETRUID / **/
-
-/* HAS_SETSID:
- * This symbol, if defined, indicates that the setsid routine is
- * available to set the process group ID.
- */
-/*#define HAS_SETSID / **/
-
-/* HAS_STRCHR:
- * This symbol is defined to indicate that the strchr()/strrchr()
- * functions are available for string searching. If not, try the
- * index()/rindex() pair.
- */
-/* HAS_INDEX:
- * This symbol is defined to indicate that the index()/rindex()
- * functions are available for string searching.
- */
-#define HAS_STRCHR /**/
-/*#define HAS_INDEX / **/
-
-/* HAS_STRCOLL:
- * This symbol, if defined, indicates that the strcoll routine is
- * available to compare strings using collating information.
- */
-#define HAS_STRCOLL /**/
-
-/* HAS_STRTOD:
- * This symbol, if defined, indicates that the strtod routine is
- * available to provide better numeric string conversion than atof().
- */
-#define HAS_STRTOD /**/
-
-/* HAS_STRTOL:
- * This symbol, if defined, indicates that the strtol routine is available
- * to provide better numeric string conversion than atoi() and friends.
- */
-#define HAS_STRTOL /**/
-
-/* HAS_STRXFRM:
- * This symbol, if defined, indicates that the strxfrm() routine is
- * available to transform strings.
- */
-#define HAS_STRXFRM /**/
-
-/* HAS_SYMLINK:
- * This symbol, if defined, indicates that the symlink routine is available
- * to create symbolic links.
- */
-/*#define HAS_SYMLINK / **/
-
-/* HAS_SYSCALL:
- * This symbol, if defined, indicates that the syscall routine is
- * available to call arbitrary system calls. If undefined, that's tough.
- */
-/*#define HAS_SYSCALL / **/
-
-/* HAS_SYSCONF:
- * This symbol, if defined, indicates that sysconf() is available
- * to determine system related limits and options.
- */
-/*#define HAS_SYSCONF / **/
-
-/* HAS_SYSTEM:
- * This symbol, if defined, indicates that the system routine is
- * available to issue a shell command.
- */
-#define HAS_SYSTEM /**/
-
-/* HAS_TCGETPGRP:
- * This symbol, if defined, indicates that the tcgetpgrp routine is
- * available to get foreground process group ID.
- */
-/*#define HAS_TCGETPGRP / **/
-
-/* HAS_TCSETPGRP:
- * This symbol, if defined, indicates that the tcsetpgrp routine is
- * available to set foreground process group ID.
- */
-/*#define HAS_TCSETPGRP / **/
-
-/* HAS_TRUNCATE:
- * This symbol, if defined, indicates that the truncate routine is
- * available to truncate files.
- */
-/*#define HAS_TRUNCATE / **/
-
-/* HAS_TZNAME:
- * This symbol, if defined, indicates that the tzname[] array is
- * available to access timezone names.
- */
-#define HAS_TZNAME /**/
-
-/* HAS_UMASK:
- * This symbol, if defined, indicates that the umask routine is
- * available to set and get the value of the file creation mask.
- */
-#define HAS_UMASK /**/
-
-/* HAS_USLEEP:
- * This symbol, if defined, indicates that the usleep routine is
- * available to let the process sleep on a sub-second accuracy.
- */
-/*#define HAS_USLEEP / **/
-
-/* HAS_WAIT4:
- * This symbol, if defined, indicates that wait4() exists.
- */
-/*#define HAS_WAIT4 / **/
-
-/* HAS_WAITPID:
- * This symbol, if defined, indicates that the waitpid routine is
- * available to wait for child process.
- */
-#define HAS_WAITPID /**/
-
-/* HAS_WCSTOMBS:
- * This symbol, if defined, indicates that the wcstombs routine is
- * available to convert wide character strings to multibyte strings.
- */
-#define HAS_WCSTOMBS /**/
-
-/* HAS_WCTOMB:
- * This symbol, if defined, indicates that the wctomb routine is available
- * to covert a wide character to a multibyte.
- */
-#define HAS_WCTOMB /**/
-
-/* Groups_t:
- * This symbol holds the type used for the second argument to
- * getgroups() and setgroups(). Usually, this is the same as
- * gidtype (gid_t) , but sometimes it isn't.
- * It can be int, ushort, gid_t, etc...
- * It may be necessary to include <sys/types.h> to get any
- * typedef'ed information. This is only required if you have
- * getgroups() or setgroups()..
- */
-#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
-#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */
-#endif
-
-/* I_ARPA_INET:
- * This symbol, if defined, indicates to the C program that it should
- * include <arpa/inet.h> to get inet_addr and friends declarations.
- */
-#define I_ARPA_INET /**/
-
-/* I_DBM:
- * This symbol, if defined, indicates that <dbm.h> exists and should
- * be included.
- */
-/* I_RPCSVC_DBM:
- * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
- * should be included.
- */
-/*#define I_DBM / **/
-#define I_RPCSVC_DBM /**/
-
-/* I_DLFCN:
- * This symbol, if defined, indicates that <dlfcn.h> exists and should
- * be included.
- */
-#define I_DLFCN /**/
-
-/* I_FCNTL:
- * This manifest constant tells the C program to include <fcntl.h>.
- */
-#define I_FCNTL /**/
-
-/* I_FLOAT:
- * This symbol, if defined, indicates to the C program that it should
- * include <float.h> to get definition of symbols like DBL_MAX or
- * DBL_MIN, i.e. machine dependent floating point values.
- */
-#define I_FLOAT /**/
-
-/* I_GDBM:
- * This symbol, if defined, indicates that <gdbm.h> exists and should
- * be included.
- */
-/*#define I_GDBM / **/
-
-/* I_LIMITS:
- * This symbol, if defined, indicates to the C program that it should
- * include <limits.h> to get definition of symbols like WORD_BIT or
- * LONG_MAX, i.e. machine dependant limitations.
- */
-#define I_LIMITS /**/
-
-/* I_LOCALE:
- * This symbol, if defined, indicates to the C program that it should
- * include <locale.h>.
- */
-#define I_LOCALE /**/
-
-/* I_MATH:
- * This symbol, if defined, indicates to the C program that it should
- * include <math.h>.
- */
-#define I_MATH /**/
-
-/* I_MEMORY:
- * This symbol, if defined, indicates to the C program that it should
- * include <memory.h>.
- */
-/*#define I_MEMORY / **/
-
-/* I_NETINET_IN:
- * This symbol, if defined, indicates to the C program that it should
- * include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
- */
-/*#define I_NETINET_IN / **/
-
-/* I_SFIO:
- * This symbol, if defined, indicates to the C program that it should
- * include <sfio.h>.
- */
-/*#define I_SFIO / **/
-
-/* I_STDDEF:
- * This symbol, if defined, indicates that <stddef.h> exists and should
- * be included.
- */
-#define I_STDDEF /**/
-
-/* I_STDLIB:
- * This symbol, if defined, indicates that <stdlib.h> exists and should
- * be included.
- */
-#define I_STDLIB /**/
-
-/* I_STRING:
- * This symbol, if defined, indicates to the C program that it should
- * include <string.h> (USG systems) instead of <strings.h> (BSD systems).
- */
-#define I_STRING /**/
-
-/* I_SYS_DIR:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/dir.h>.
- */
-/*#define I_SYS_DIR / **/
-
-/* I_SYS_FILE:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/file.h> to get definition of R_OK and friends.
- */
-/*#define I_SYS_FILE / **/
-
-/* I_SYS_IOCTL:
- * This symbol, if defined, indicates that <sys/ioctl.h> exists and should
- * be included. Otherwise, include <sgtty.h> or <termio.h>.
- */
-/* I_SYS_SOCKIO:
- * This symbol, if defined, indicates the <sys/sockio.h> should be included
- * to get socket ioctl options, like SIOCATMARK.
- */
-/*#define I_SYS_IOCTL / **/
-/*#define I_SYS_SOCKIO / **/
-
-/* I_SYS_NDIR:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/ndir.h>.
- */
-/*#define I_SYS_NDIR / **/
-
-/* I_SYS_PARAM:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/param.h>.
- */
-/*#define I_SYS_PARAM / **/
-
-/* I_SYS_POLL:
- * This symbol, if defined, indicates that the program may include
- * <sys/poll.h>. When I_POLL is also defined, it's probably safest
- * to only include <poll.h>.
- */
-/*#define I_SYS_POLL / **/
-
-/* I_SYS_RESOURCE:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/resource.h>.
- */
-/*#define I_SYS_RESOURCE / **/
-
-/* I_SYS_SELECT:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/select.h> in order to get definition of struct timeval.
- */
-/*#define I_SYS_SELECT / **/
-
-/* I_SYS_STAT:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/stat.h>.
- */
-#define I_SYS_STAT /**/
-
-/* I_SYS_TIMES:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/times.h>.
- */
-/*#define I_SYS_TIMES / **/
-
-/* I_SYS_TYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/types.h>.
- */
-#define I_SYS_TYPES /**/
-
-/* I_SYS_UN:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/un.h> to get UNIX domain socket definitions.
- */
-/*#define I_SYS_UN / **/
-
-/* I_SYS_WAIT:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/wait.h>.
- */
-/*#define I_SYS_WAIT / **/
-
-/* I_TERMIO:
- * This symbol, if defined, indicates that the program should include
- * <termio.h> rather than <sgtty.h>. There are also differences in
- * the ioctl() calls that depend on the value of this symbol.
- */
-/* I_TERMIOS:
- * This symbol, if defined, indicates that the program should include
- * the POSIX termios.h rather than sgtty.h or termio.h.
- * There are also differences in the ioctl() calls that depend on the
- * value of this symbol.
- */
-/* I_SGTTY:
- * This symbol, if defined, indicates that the program should include
- * <sgtty.h> rather than <termio.h>. There are also differences in
- * the ioctl() calls that depend on the value of this symbol.
- */
-/*#define I_TERMIO / **/
-/*#define I_TERMIOS / **/
-/*#define I_SGTTY / **/
-
-/* I_UNISTD:
- * This symbol, if defined, indicates to the C program that it should
- * include <unistd.h>.
- */
-/*#define I_UNISTD / **/
-
-/* I_UTIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <utime.h>.
- */
-#define I_UTIME /**/
-
-/* I_VALUES:
- * This symbol, if defined, indicates to the C program that it should
- * include <values.h> to get definition of symbols like MINFLOAT or
- * MAXLONG, i.e. machine dependant limitations. Probably, you
- * should use <limits.h> instead, if it is available.
- */
-/*#define I_VALUES / **/
-
-/* I_VFORK:
- * This symbol, if defined, indicates to the C program that it should
- * include vfork.h.
- */
-/*#define I_VFORK / **/
-
-/* CAN_VAPROTO:
- * This variable is defined on systems supporting prototype declaration
- * of functions with a variable number of arguments.
- */
-/* _V:
- * This macro is used to declare function parameters in prototypes for
- * functions with a variable number of parameters. Use double parentheses.
- * For example:
- *
- * int printf _V((char *fmt, ...));
- *
- * Remember to use the plain simple _() macro when declaring a function
- * with no variable number of arguments, since it might be possible to
- * have a non-effect _V() macro and still get prototypes via _().
- */
-/*#define CAN_VAPROTO / **/
-#ifdef CAN_VAPROTO
-#define _V(args) args
-#else
-#define _V(args) ()
-#endif
-
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE 4 /**/
-#define LONGSIZE 4 /**/
-#define SHORTSIZE 2 /**/
-
-/* MULTIARCH:
- * This symbol, if defined, signifies that the build
- * process will produce some binary files that are going to be
- * used in a cross-platform environment. This is the case for
- * example with the NeXT "fat" binaries that contain executables
- * for several CPUs.
- */
-/*#define MULTIARCH / **/
-
-/* HAS_QUAD:
- * This symbol, if defined, tells that there's a 64-bit integer type,
- * Quad_t, and its unsigned counterpar, Uquad_t. QUADKIND will be one
- * of QUAD_IS_INT, QUAD_IS_LONG, QUAD_IS_LONG_LONG, QUAD_IS_INT64_T,
- * or QUAD_IS___INT64.
- */
-#define HAS_QUAD /**/
-#ifdef HAS_QUAD
-# ifdef _MSC_VER
-# define Quad_t __int64 /**/
-# define Uquad_t unsigned __int64 /**/
-# define QUADKIND 5 /**/
-# else /* gcc presumably */
-# define Quad_t long long /**/
-# define Uquad_t unsigned long long /**/
-# define QUADKIND 3 /**/
-# endif
-# define QUAD_IS_INT 1
-# define QUAD_IS_LONG 2
-# define QUAD_IS_LONG_LONG 3
-# define QUAD_IS_INT64_T 4
-# define QUAD_IS___INT64 5
-#endif
-
-/* OSNAME:
- * This symbol contains the name of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-/* OSVERS:
- * This symbol contains the version of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-#define OSNAME "MSWin32" /**/
-#define OSVERS "5.1" /**/
-
-/* ARCHLIB:
- * This variable, if defined, holds the name of the directory in
- * which the user wants to put architecture-dependent public
- * library files for perl5. It is most often a local directory
- * such as /usr/local/lib. Programs using this variable must be
- * prepared to deal with filename expansion. If ARCHLIB is the
- * same as PRIVLIB, it is not defined, since presumably the
- * program already searches PRIVLIB.
- */
-/* ARCHLIB_EXP:
- * This symbol contains the ~name expanded version of ARCHLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-#define ARCHLIB "c:\\perl\\lib" /**/
-/*#define ARCHLIB_EXP "" / **/
-
-/* ARCHNAME:
- * This symbol holds a string representing the architecture name.
- * It may be used to construct an architecture-dependant pathname
- * where library files may be held under a private library, for
- * instance.
- */
-#define ARCHNAME "MSWin32-x64" /**/
-
-/* BIN:
- * This symbol holds the path of the bin directory where the package will
- * be installed. Program must be prepared to deal with ~name substitution.
- */
-/* BIN_EXP:
- * This symbol is the filename expanded version of the BIN symbol, for
- * programs that do not want to deal with that at run-time.
- */
-/* PERL_RELOCATABLE_INC:
- * This symbol, if defined, indicates that we'd like to relocate entries
- * in @INC at run time based on the location of the perl binary.
- */
-#define BIN "c:\\perl\\bin" /**/
-#define BIN_EXP "c:\\perl\\bin" /**/
-#define PERL_RELOCATABLE_INC "undef" /**/
-
-/* CAT2:
- * This macro concatenates 2 tokens together.
- */
-/* STRINGIFY:
- * This macro surrounds its token with double quotes.
- */
-#if 42 == 1
-#define CAT2(a,b) a/**/b
-#undef STRINGIFY
-#define STRINGIFY(a) "a"
-#endif
-#if 42 == 42
-#define PeRl_CaTiFy(a, b) a ## b
-#define PeRl_StGiFy(a) #a
-#define CAT2(a,b) PeRl_CaTiFy(a,b)
-#define StGiFy(a) PeRl_StGiFy(a)
-#undef STRINGIFY
-#define STRINGIFY(a) PeRl_StGiFy(a)
-#endif
-#if 42 != 1 && 42 != 42
-#include "Bletch: How does this C preprocessor concatenate tokens?"
-#endif
-
-/* CPPSTDIN:
- * This symbol contains the first part of the string which will invoke
- * the C preprocessor on the standard input and produce to standard
- * output. Typical value of "cc -E" or "/lib/cpp", but it can also
- * call a wrapper. See CPPRUN.
- */
-/* CPPMINUS:
- * This symbol contains the second part of the string which will invoke
- * the C preprocessor on the standard input and produce to standard
- * output. This symbol will have the value "-" if CPPSTDIN needs a minus
- * to specify standard input, otherwise the value is "".
- */
-/* CPPRUN:
- * This symbol contains the string which will invoke a C preprocessor on
- * the standard input and produce to standard output. It needs to end
- * with CPPLAST, after all other preprocessor flags have been specified.
- * The main difference with CPPSTDIN is that this program will never be a
- * pointer to a shell wrapper, i.e. it will be empty if no preprocessor is
- * available directly to the user. Note that it may well be different from
- * the preprocessor used to compile the C program.
- */
-/* CPPLAST:
- * This symbol is intended to be used along with CPPRUN in the same manner
- * symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "".
- */
-#ifdef _MSC_VER
-# define CPPSTDIN "cppstdin"
-# define CPPMINUS ""
-# define CPPRUN "cl -nologo -E"
-#else
-# define CPPSTDIN "x86_64-w64-mingw32-gcc -E"
-# define CPPMINUS "-"
-# define CPPRUN "x86_64-w64-mingw32-gcc -E"
-#endif
-#define CPPLAST ""
-
-/* HAS_ACCESS:
- * This manifest constant lets the C program know that the access()
- * system call is available to check for accessibility using real UID/GID.
- * (always present on UNIX.)
- */
-#define HAS_ACCESS /**/
-
-/* HAS_ACCESSX:
- * This symbol, if defined, indicates that the accessx routine is
- * available to do extended access checks.
- */
-/*#define HAS_ACCESSX / **/
-
-/* HAS_ASCTIME_R:
- * This symbol, if defined, indicates that the asctime_r routine
- * is available to asctime re-entrantly.
- */
-/* ASCTIME_R_PROTO:
- * This symbol encodes the prototype of asctime_r.
- * It is zero if d_asctime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_asctime_r
- * is defined.
- */
-/*#define HAS_ASCTIME_R / **/
-#define ASCTIME_R_PROTO 0 /**/
-
-/* The HASATTRIBUTE_* defines are left undefined here because they vary from
- * one version of GCC to another. Instead, they are defined on the basis of
- * the compiler version in <perl.h>.
- */
-/* HASATTRIBUTE_FORMAT:
- * Can we handle GCC attribute for checking printf-style formats
- */
-/* PRINTF_FORMAT_NULL_OK:
- * Allows __printf__ format to be null when checking printf-style
- */
-/* HASATTRIBUTE_MALLOC:
- * Can we handle GCC attribute for malloc-style functions.
- */
-/* HASATTRIBUTE_NONNULL:
- * Can we handle GCC attribute for nonnull function parms.
- */
-/* HASATTRIBUTE_NORETURN:
- * Can we handle GCC attribute for functions that do not return
- */
-/* HASATTRIBUTE_PURE:
- * Can we handle GCC attribute for pure functions
- */
-/* HASATTRIBUTE_UNUSED:
- * Can we handle GCC attribute for unused variables and arguments
- */
-/* HASATTRIBUTE_DEPRECATED:
- * Can we handle GCC attribute for marking deprecated APIs
- */
-/* HASATTRIBUTE_WARN_UNUSED_RESULT:
- * Can we handle GCC attribute for warning on unused results
- */
-/*#define HASATTRIBUTE_DEPRECATED / **/
-/*#define HASATTRIBUTE_FORMAT / **/
-/*#define PRINTF_FORMAT_NULL_OK / **/
-/*#define HASATTRIBUTE_NORETURN / **/
-/*#define HASATTRIBUTE_MALLOC / **/
-/*#define HASATTRIBUTE_NONNULL / **/
-/*#define HASATTRIBUTE_PURE / **/
-/*#define HASATTRIBUTE_UNUSED / **/
-/*#define HASATTRIBUTE_WARN_UNUSED_RESULT / **/
-
-/* HASCONST:
- * This symbol, if defined, indicates that this C compiler knows about
- * the const type. There is no need to actually test for that symbol
- * within your programs. The mere use of the "const" keyword will
- * trigger the necessary tests.
- */
-#define HASCONST /**/
-#ifndef HASCONST
-#define const
-#endif
-
-/* HAS_CRYPT_R:
- * This symbol, if defined, indicates that the crypt_r routine
- * is available to crypt re-entrantly.
- */
-/* CRYPT_R_PROTO:
- * This symbol encodes the prototype of crypt_r.
- * It is zero if d_crypt_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_crypt_r
- * is defined.
- */
-/*#define HAS_CRYPT_R / **/
-#define CRYPT_R_PROTO 0 /**/
-
-/* HAS_CSH:
- * This symbol, if defined, indicates that the C-shell exists.
- */
-/* CSH:
- * This symbol, if defined, contains the full pathname of csh.
- */
-/*#define HAS_CSH / **/
-#ifdef HAS_CSH
-#define CSH "" /**/
-#endif
-
-/* HAS_CTERMID_R:
- * This symbol, if defined, indicates that the ctermid_r routine
- * is available to ctermid re-entrantly.
- */
-/* CTERMID_R_PROTO:
- * This symbol encodes the prototype of ctermid_r.
- * It is zero if d_ctermid_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctermid_r
- * is defined.
- */
-/*#define HAS_CTERMID_R / **/
-#define CTERMID_R_PROTO 0 /**/
-
-/* HAS_CTIME_R:
- * This symbol, if defined, indicates that the ctime_r routine
- * is available to ctime re-entrantly.
- */
-/* CTIME_R_PROTO:
- * This symbol encodes the prototype of ctime_r.
- * It is zero if d_ctime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctime_r
- * is defined.
- */
-/*#define HAS_CTIME_R / **/
-#define CTIME_R_PROTO 0 /**/
-
-/* HAS_DRAND48_R:
- * This symbol, if defined, indicates that the drand48_r routine
- * is available to drand48 re-entrantly.
- */
-/* DRAND48_R_PROTO:
- * This symbol encodes the prototype of drand48_r.
- * It is zero if d_drand48_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_drand48_r
- * is defined.
- */
-/*#define HAS_DRAND48_R / **/
-#define DRAND48_R_PROTO 0 /**/
-
-/* HAS_DRAND48_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the drand48() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern double drand48(void);
- */
-/*#define HAS_DRAND48_PROTO / **/
-
-/* HAS_EACCESS:
- * This symbol, if defined, indicates that the eaccess routine is
- * available to do extended access checks.
- */
-/*#define HAS_EACCESS / **/
-
-/* HAS_ENDGRENT:
- * This symbol, if defined, indicates that the getgrent routine is
- * available for finalizing sequential access of the group database.
- */
-/*#define HAS_ENDGRENT / **/
-
-/* HAS_ENDGRENT_R:
- * This symbol, if defined, indicates that the endgrent_r routine
- * is available to endgrent re-entrantly.
- */
-/* ENDGRENT_R_PROTO:
- * This symbol encodes the prototype of endgrent_r.
- * It is zero if d_endgrent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endgrent_r
- * is defined.
- */
-/*#define HAS_ENDGRENT_R / **/
-#define ENDGRENT_R_PROTO 0 /**/
-
-/* HAS_ENDHOSTENT:
- * This symbol, if defined, indicates that the endhostent() routine is
- * available to close whatever was being used for host queries.
- */
-/*#define HAS_ENDHOSTENT / **/
-
-/* HAS_ENDHOSTENT_R:
- * This symbol, if defined, indicates that the endhostent_r routine
- * is available to endhostent re-entrantly.
- */
-/* ENDHOSTENT_R_PROTO:
- * This symbol encodes the prototype of endhostent_r.
- * It is zero if d_endhostent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endhostent_r
- * is defined.
- */
-/*#define HAS_ENDHOSTENT_R / **/
-#define ENDHOSTENT_R_PROTO 0 /**/
-
-/* HAS_ENDNETENT:
- * This symbol, if defined, indicates that the endnetent() routine is
- * available to close whatever was being used for network queries.
- */
-/*#define HAS_ENDNETENT / **/
-
-/* HAS_ENDNETENT_R:
- * This symbol, if defined, indicates that the endnetent_r routine
- * is available to endnetent re-entrantly.
- */
-/* ENDNETENT_R_PROTO:
- * This symbol encodes the prototype of endnetent_r.
- * It is zero if d_endnetent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endnetent_r
- * is defined.
- */
-/*#define HAS_ENDNETENT_R / **/
-#define ENDNETENT_R_PROTO 0 /**/
-
-/* HAS_ENDPROTOENT:
- * This symbol, if defined, indicates that the endprotoent() routine is
- * available to close whatever was being used for protocol queries.
- */
-/*#define HAS_ENDPROTOENT / **/
-
-/* HAS_ENDPROTOENT_R:
- * This symbol, if defined, indicates that the endprotoent_r routine
- * is available to endprotoent re-entrantly.
- */
-/* ENDPROTOENT_R_PROTO:
- * This symbol encodes the prototype of endprotoent_r.
- * It is zero if d_endprotoent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endprotoent_r
- * is defined.
- */
-/*#define HAS_ENDPROTOENT_R / **/
-#define ENDPROTOENT_R_PROTO 0 /**/
-
-/* HAS_ENDPWENT:
- * This symbol, if defined, indicates that the getgrent routine is
- * available for finalizing sequential access of the passwd database.
- */
-/*#define HAS_ENDPWENT / **/
-
-/* HAS_ENDPWENT_R:
- * This symbol, if defined, indicates that the endpwent_r routine
- * is available to endpwent re-entrantly.
- */
-/* ENDPWENT_R_PROTO:
- * This symbol encodes the prototype of endpwent_r.
- * It is zero if d_endpwent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endpwent_r
- * is defined.
- */
-/*#define HAS_ENDPWENT_R / **/
-#define ENDPWENT_R_PROTO 0 /**/
-
-/* HAS_ENDSERVENT:
- * This symbol, if defined, indicates that the endservent() routine is
- * available to close whatever was being used for service queries.
- */
-/*#define HAS_ENDSERVENT / **/
-
-/* HAS_ENDSERVENT_R:
- * This symbol, if defined, indicates that the endservent_r routine
- * is available to endservent re-entrantly.
- */
-/* ENDSERVENT_R_PROTO:
- * This symbol encodes the prototype of endservent_r.
- * It is zero if d_endservent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endservent_r
- * is defined.
- */
-/*#define HAS_ENDSERVENT_R / **/
-#define ENDSERVENT_R_PROTO 0 /**/
-
-/* FLEXFILENAMES:
- * This symbol, if defined, indicates that the system supports filenames
- * longer than 14 characters.
- */
-#define FLEXFILENAMES /**/
-
-/* HAS_GETGRENT:
- * This symbol, if defined, indicates that the getgrent routine is
- * available for sequential access of the group database.
- */
-/*#define HAS_GETGRENT / **/
-
-/* HAS_GETGRENT_R:
- * This symbol, if defined, indicates that the getgrent_r routine
- * is available to getgrent re-entrantly.
- */
-/* GETGRENT_R_PROTO:
- * This symbol encodes the prototype of getgrent_r.
- * It is zero if d_getgrent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrent_r
- * is defined.
- */
-/*#define HAS_GETGRENT_R / **/
-#define GETGRENT_R_PROTO 0 /**/
-
-/* HAS_GETGRGID_R:
- * This symbol, if defined, indicates that the getgrgid_r routine
- * is available to getgrgid re-entrantly.
- */
-/* GETGRGID_R_PROTO:
- * This symbol encodes the prototype of getgrgid_r.
- * It is zero if d_getgrgid_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrgid_r
- * is defined.
- */
-/*#define HAS_GETGRGID_R / **/
-#define GETGRGID_R_PROTO 0 /**/
-
-/* HAS_GETGRNAM_R:
- * This symbol, if defined, indicates that the getgrnam_r routine
- * is available to getgrnam re-entrantly.
- */
-/* GETGRNAM_R_PROTO:
- * This symbol encodes the prototype of getgrnam_r.
- * It is zero if d_getgrnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrnam_r
- * is defined.
- */
-/*#define HAS_GETGRNAM_R / **/
-#define GETGRNAM_R_PROTO 0 /**/
-
-/* HAS_GETHOSTBYADDR:
- * This symbol, if defined, indicates that the gethostbyaddr() routine is
- * available to look up hosts by their IP addresses.
- */
-#define HAS_GETHOSTBYADDR /**/
-
-/* HAS_GETHOSTBYNAME:
- * This symbol, if defined, indicates that the gethostbyname() routine is
- * available to look up host names in some data base or other.
- */
-#define HAS_GETHOSTBYNAME /**/
-
-/* HAS_GETHOSTENT:
- * This symbol, if defined, indicates that the gethostent() routine is
- * available to look up host names in some data base or another.
- */
-/*#define HAS_GETHOSTENT / **/
-
-/* HAS_GETHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * gethostname() routine to derive the host name. See also HAS_UNAME
- * and PHOSTNAME.
- */
-/* HAS_UNAME:
- * This symbol, if defined, indicates that the C program may use the
- * uname() routine to derive the host name. See also HAS_GETHOSTNAME
- * and PHOSTNAME.
- */
-/* PHOSTNAME:
- * This symbol, if defined, indicates the command to feed to the
- * popen() routine to derive the host name. See also HAS_GETHOSTNAME
- * and HAS_UNAME. Note that the command uses a fully qualified path,
- * so that it is safe even if used by a process with super-user
- * privileges.
- */
-/* HAS_PHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * contents of PHOSTNAME as a command to feed to the popen() routine
- * to derive the host name.
- */
-#define HAS_GETHOSTNAME /**/
-#define HAS_UNAME /**/
-/*#define HAS_PHOSTNAME / **/
-#ifdef HAS_PHOSTNAME
-#define PHOSTNAME "" /* How to get the host name */
-#endif
-
-/* HAS_GETHOSTBYADDR_R:
- * This symbol, if defined, indicates that the gethostbyaddr_r routine
- * is available to gethostbyaddr re-entrantly.
- */
-/* GETHOSTBYADDR_R_PROTO:
- * This symbol encodes the prototype of gethostbyaddr_r.
- * It is zero if d_gethostbyaddr_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyaddr_r
- * is defined.
- */
-/*#define HAS_GETHOSTBYADDR_R / **/
-#define GETHOSTBYADDR_R_PROTO 0 /**/
-
-/* HAS_GETHOSTBYNAME_R:
- * This symbol, if defined, indicates that the gethostbyname_r routine
- * is available to gethostbyname re-entrantly.
- */
-/* GETHOSTBYNAME_R_PROTO:
- * This symbol encodes the prototype of gethostbyname_r.
- * It is zero if d_gethostbyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyname_r
- * is defined.
- */
-/*#define HAS_GETHOSTBYNAME_R / **/
-#define GETHOSTBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETHOSTENT_R:
- * This symbol, if defined, indicates that the gethostent_r routine
- * is available to gethostent re-entrantly.
- */
-/* GETHOSTENT_R_PROTO:
- * This symbol encodes the prototype of gethostent_r.
- * It is zero if d_gethostent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostent_r
- * is defined.
- */
-/*#define HAS_GETHOSTENT_R / **/
-#define GETHOSTENT_R_PROTO 0 /**/
-
-/* HAS_GETHOST_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for gethostent(), gethostbyname(), and
- * gethostbyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-#define HAS_GETHOST_PROTOS /**/
-
-/* HAS_GETLOGIN_R:
- * This symbol, if defined, indicates that the getlogin_r routine
- * is available to getlogin re-entrantly.
- */
-/* GETLOGIN_R_PROTO:
- * This symbol encodes the prototype of getlogin_r.
- * It is zero if d_getlogin_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getlogin_r
- * is defined.
- */
-/*#define HAS_GETLOGIN_R / **/
-#define GETLOGIN_R_PROTO 0 /**/
-
-/* HAS_GETNETBYADDR:
- * This symbol, if defined, indicates that the getnetbyaddr() routine is
- * available to look up networks by their IP addresses.
- */
-/*#define HAS_GETNETBYADDR / **/
-
-/* HAS_GETNETBYNAME:
- * This symbol, if defined, indicates that the getnetbyname() routine is
- * available to look up networks by their names.
- */
-/*#define HAS_GETNETBYNAME / **/
-
-/* HAS_GETNETENT:
- * This symbol, if defined, indicates that the getnetent() routine is
- * available to look up network names in some data base or another.
- */
-/*#define HAS_GETNETENT / **/
-
-/* HAS_GETNETBYADDR_R:
- * This symbol, if defined, indicates that the getnetbyaddr_r routine
- * is available to getnetbyaddr re-entrantly.
- */
-/* GETNETBYADDR_R_PROTO:
- * This symbol encodes the prototype of getnetbyaddr_r.
- * It is zero if d_getnetbyaddr_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyaddr_r
- * is defined.
- */
-/*#define HAS_GETNETBYADDR_R / **/
-#define GETNETBYADDR_R_PROTO 0 /**/
-
-/* HAS_GETNETBYNAME_R:
- * This symbol, if defined, indicates that the getnetbyname_r routine
- * is available to getnetbyname re-entrantly.
- */
-/* GETNETBYNAME_R_PROTO:
- * This symbol encodes the prototype of getnetbyname_r.
- * It is zero if d_getnetbyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyname_r
- * is defined.
- */
-/*#define HAS_GETNETBYNAME_R / **/
-#define GETNETBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETNETENT_R:
- * This symbol, if defined, indicates that the getnetent_r routine
- * is available to getnetent re-entrantly.
- */
-/* GETNETENT_R_PROTO:
- * This symbol encodes the prototype of getnetent_r.
- * It is zero if d_getnetent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetent_r
- * is defined.
- */
-/*#define HAS_GETNETENT_R / **/
-#define GETNETENT_R_PROTO 0 /**/
-
-/* HAS_GETNET_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for getnetent(), getnetbyname(), and
- * getnetbyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-/*#define HAS_GETNET_PROTOS / **/
-
-/* HAS_GETPROTOENT:
- * This symbol, if defined, indicates that the getprotoent() routine is
- * available to look up protocols in some data base or another.
- */
-/*#define HAS_GETPROTOENT / **/
-
-/* HAS_GETPGRP:
- * This symbol, if defined, indicates that the getpgrp routine is
- * available to get the current process group.
- */
-/* USE_BSD_GETPGRP:
- * This symbol, if defined, indicates that getpgrp needs one
- * arguments whereas USG one needs none.
- */
-/*#define HAS_GETPGRP / **/
-/*#define USE_BSD_GETPGRP / **/
-
-/* HAS_GETPROTOBYNAME:
- * This symbol, if defined, indicates that the getprotobyname()
- * routine is available to look up protocols by their name.
- */
-/* HAS_GETPROTOBYNUMBER:
- * This symbol, if defined, indicates that the getprotobynumber()
- * routine is available to look up protocols by their number.
- */
-#define HAS_GETPROTOBYNAME /**/
-#define HAS_GETPROTOBYNUMBER /**/
-
-/* HAS_GETPROTOBYNAME_R:
- * This symbol, if defined, indicates that the getprotobyname_r routine
- * is available to getprotobyname re-entrantly.
- */
-/* GETPROTOBYNAME_R_PROTO:
- * This symbol encodes the prototype of getprotobyname_r.
- * It is zero if d_getprotobyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobyname_r
- * is defined.
- */
-/*#define HAS_GETPROTOBYNAME_R / **/
-#define GETPROTOBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETPROTOBYNUMBER_R:
- * This symbol, if defined, indicates that the getprotobynumber_r routine
- * is available to getprotobynumber re-entrantly.
- */
-/* GETPROTOBYNUMBER_R_PROTO:
- * This symbol encodes the prototype of getprotobynumber_r.
- * It is zero if d_getprotobynumber_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobynumber_r
- * is defined.
- */
-/*#define HAS_GETPROTOBYNUMBER_R / **/
-#define GETPROTOBYNUMBER_R_PROTO 0 /**/
-
-/* HAS_GETPROTOENT_R:
- * This symbol, if defined, indicates that the getprotoent_r routine
- * is available to getprotoent re-entrantly.
- */
-/* GETPROTOENT_R_PROTO:
- * This symbol encodes the prototype of getprotoent_r.
- * It is zero if d_getprotoent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotoent_r
- * is defined.
- */
-/*#define HAS_GETPROTOENT_R / **/
-#define GETPROTOENT_R_PROTO 0 /**/
-
-/* HAS_GETPROTO_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for getprotoent(), getprotobyname(), and
- * getprotobyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-#define HAS_GETPROTO_PROTOS /**/
-
-/* HAS_GETPWENT:
- * This symbol, if defined, indicates that the getpwent routine is
- * available for sequential access of the passwd database.
- * If this is not available, the older getpw() function may be available.
- */
-/*#define HAS_GETPWENT / **/
-
-/* HAS_GETPWENT_R:
- * This symbol, if defined, indicates that the getpwent_r routine
- * is available to getpwent re-entrantly.
- */
-/* GETPWENT_R_PROTO:
- * This symbol encodes the prototype of getpwent_r.
- * It is zero if d_getpwent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwent_r
- * is defined.
- */
-/*#define HAS_GETPWENT_R / **/
-#define GETPWENT_R_PROTO 0 /**/
-
-/* HAS_GETPWNAM_R:
- * This symbol, if defined, indicates that the getpwnam_r routine
- * is available to getpwnam re-entrantly.
- */
-/* GETPWNAM_R_PROTO:
- * This symbol encodes the prototype of getpwnam_r.
- * It is zero if d_getpwnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwnam_r
- * is defined.
- */
-/*#define HAS_GETPWNAM_R / **/
-#define GETPWNAM_R_PROTO 0 /**/
-
-/* HAS_GETPWUID_R:
- * This symbol, if defined, indicates that the getpwuid_r routine
- * is available to getpwuid re-entrantly.
- */
-/* GETPWUID_R_PROTO:
- * This symbol encodes the prototype of getpwuid_r.
- * It is zero if d_getpwuid_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwuid_r
- * is defined.
- */
-/*#define HAS_GETPWUID_R / **/
-#define GETPWUID_R_PROTO 0 /**/
-
-/* HAS_GETSERVENT:
- * This symbol, if defined, indicates that the getservent() routine is
- * available to look up network services in some data base or another.
- */
-/*#define HAS_GETSERVENT / **/
-
-/* HAS_GETSERVBYNAME_R:
- * This symbol, if defined, indicates that the getservbyname_r routine
- * is available to getservbyname re-entrantly.
- */
-/* GETSERVBYNAME_R_PROTO:
- * This symbol encodes the prototype of getservbyname_r.
- * It is zero if d_getservbyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyname_r
- * is defined.
- */
-/*#define HAS_GETSERVBYNAME_R / **/
-#define GETSERVBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETSERVBYPORT_R:
- * This symbol, if defined, indicates that the getservbyport_r routine
- * is available to getservbyport re-entrantly.
- */
-/* GETSERVBYPORT_R_PROTO:
- * This symbol encodes the prototype of getservbyport_r.
- * It is zero if d_getservbyport_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyport_r
- * is defined.
- */
-/*#define HAS_GETSERVBYPORT_R / **/
-#define GETSERVBYPORT_R_PROTO 0 /**/
-
-/* HAS_GETSERVENT_R:
- * This symbol, if defined, indicates that the getservent_r routine
- * is available to getservent re-entrantly.
- */
-/* GETSERVENT_R_PROTO:
- * This symbol encodes the prototype of getservent_r.
- * It is zero if d_getservent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservent_r
- * is defined.
- */
-/*#define HAS_GETSERVENT_R / **/
-#define GETSERVENT_R_PROTO 0 /**/
-
-/* HAS_GETSERV_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for getservent(), getservbyname(), and
- * getservbyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-#define HAS_GETSERV_PROTOS /**/
-
-/* HAS_GETSPNAM_R:
- * This symbol, if defined, indicates that the getspnam_r routine
- * is available to getspnam re-entrantly.
- */
-/* GETSPNAM_R_PROTO:
- * This symbol encodes the prototype of getspnam_r.
- * It is zero if d_getspnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getspnam_r
- * is defined.
- */
-/*#define HAS_GETSPNAM_R / **/
-#define GETSPNAM_R_PROTO 0 /**/
-
-/* HAS_GETSERVBYNAME:
- * This symbol, if defined, indicates that the getservbyname()
- * routine is available to look up services by their name.
- */
-/* HAS_GETSERVBYPORT:
- * This symbol, if defined, indicates that the getservbyport()
- * routine is available to look up services by their port.
- */
-#define HAS_GETSERVBYNAME /**/
-#define HAS_GETSERVBYPORT /**/
-
-/* HAS_GMTIME_R:
- * This symbol, if defined, indicates that the gmtime_r routine
- * is available to gmtime re-entrantly.
- */
-/* GMTIME_R_PROTO:
- * This symbol encodes the prototype of gmtime_r.
- * It is zero if d_gmtime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gmtime_r
- * is defined.
- */
-/*#define HAS_GMTIME_R / **/
-#define GMTIME_R_PROTO 0 /**/
-
-/* HAS_HTONL:
- * This symbol, if defined, indicates that the htonl() routine (and
- * friends htons() ntohl() ntohs()) are available to do network
- * order byte swapping.
- */
-/* HAS_HTONS:
- * This symbol, if defined, indicates that the htons() routine (and
- * friends htonl() ntohl() ntohs()) are available to do network
- * order byte swapping.
- */
-/* HAS_NTOHL:
- * This symbol, if defined, indicates that the ntohl() routine (and
- * friends htonl() htons() ntohs()) are available to do network
- * order byte swapping.
- */
-/* HAS_NTOHS:
- * This symbol, if defined, indicates that the ntohs() routine (and
- * friends htonl() htons() ntohl()) are available to do network
- * order byte swapping.
- */
-#define HAS_HTONL /**/
-#define HAS_HTONS /**/
-#define HAS_NTOHL /**/
-#define HAS_NTOHS /**/
-
-/* HAS_LOCALTIME_R:
- * This symbol, if defined, indicates that the localtime_r routine
- * is available to localtime re-entrantly.
- */
-/* LOCALTIME_R_NEEDS_TZSET:
- * Many libc's localtime_r implementations do not call tzset,
- * making them differ from localtime(), and making timezone
- * changes using \undef{TZ} without explicitly calling tzset
- * impossible. This symbol makes us call tzset before localtime_r
- */
-/*#define LOCALTIME_R_NEEDS_TZSET / **/
-#ifdef LOCALTIME_R_NEEDS_TZSET
-#define L_R_TZSET tzset(),
-#else
-#define L_R_TZSET
-#endif
-
-/* LOCALTIME_R_PROTO:
- * This symbol encodes the prototype of localtime_r.
- * It is zero if d_localtime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_localtime_r
- * is defined.
- */
-/*#define HAS_LOCALTIME_R / **/
-#define LOCALTIME_R_PROTO 0 /**/
-
-/* HAS_LONG_DOUBLE:
- * This symbol will be defined if the C compiler supports long
- * doubles.
- */
-/* LONG_DOUBLESIZE:
- * This symbol contains the size of a long double, so that the
- * C preprocessor can make decisions based on it. It is only
- * defined if the system supports long doubles.
- */
-#define HAS_LONG_DOUBLE /**/
-#ifdef HAS_LONG_DOUBLE
-# ifdef _MSC_VER
-# define LONG_DOUBLESIZE 8 /**/
-# else
-# define LONG_DOUBLESIZE 12 /**/
-# endif
-#endif
-
-/* HAS_LONG_LONG:
- * This symbol will be defined if the C compiler supports long long.
- */
-/* LONGLONGSIZE:
- * This symbol contains the size of a long long, so that the
- * C preprocessor can make decisions based on it. It is only
- * defined if the system supports long long.
- */
-#ifdef __GNUC__
-# define HAS_LONG_LONG /**/
-#endif
-#ifdef HAS_LONG_LONG
-#define LONGLONGSIZE 8 /**/
-#endif
-
-/* HAS_LSEEK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the lseek() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern off_t lseek(int, off_t, int);
- */
-#define HAS_LSEEK_PROTO /**/
-
-/* HAS_MEMCHR:
- * This symbol, if defined, indicates that the memchr routine is available
- * to locate characters within a C string.
- */
-#define HAS_MEMCHR /**/
-
-/* HAS_MKSTEMP:
- * This symbol, if defined, indicates that the mkstemp routine is
- * available to exclusively create and open a uniquely named
- * temporary file.
- */
-/*#define HAS_MKSTEMP / **/
-
-/* HAS_MMAP:
- * This symbol, if defined, indicates that the mmap system call is
- * available to map a file into memory.
- */
-/* Mmap_t:
- * This symbol holds the return type of the mmap() system call
- * (and simultaneously the type of the first argument).
- * Usually set to 'void *' or 'caddr_t'.
- */
-/*#define HAS_MMAP / **/
-#define Mmap_t void * /**/
-
-/* HAS_MSG:
- * This symbol, if defined, indicates that the entire msg*(2) library is
- * supported (IPC mechanism based on message queues).
- */
-/*#define HAS_MSG / **/
-
-/* OLD_PTHREAD_CREATE_JOINABLE:
- * This symbol, if defined, indicates how to create pthread
- * in joinable (aka undetached) state. NOTE: not defined
- * if pthread.h already has defined PTHREAD_CREATE_JOINABLE
- * (the new version of the constant).
- * If defined, known values are PTHREAD_CREATE_UNDETACHED
- * and __UNDETACHED.
- */
-/*#define OLD_PTHREAD_CREATE_JOINABLE / **/
-
-/* HAS_PTHREAD_ATFORK:
- * This symbol, if defined, indicates that the pthread_atfork routine
- * is available to setup fork handlers.
- */
-/*#define HAS_PTHREAD_ATFORK / **/
-
-/* HAS_PTHREAD_YIELD:
- * This symbol, if defined, indicates that the pthread_yield
- * routine is available to yield the execution of the current
- * thread. sched_yield is preferable to pthread_yield.
- */
-/* SCHED_YIELD:
- * This symbol defines the way to yield the execution of
- * the current thread. Known ways are sched_yield,
- * pthread_yield, and pthread_yield with NULL.
- */
-/* HAS_SCHED_YIELD:
- * This symbol, if defined, indicates that the sched_yield
- * routine is available to yield the execution of the current
- * thread. sched_yield is preferable to pthread_yield.
- */
-/*#define HAS_PTHREAD_YIELD / **/
-#define SCHED_YIELD /**/
-/*#define HAS_SCHED_YIELD / **/
-
-/* HAS_RANDOM_R:
- * This symbol, if defined, indicates that the random_r routine
- * is available to random re-entrantly.
- */
-/* RANDOM_R_PROTO:
- * This symbol encodes the prototype of random_r.
- * It is zero if d_random_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_random_r
- * is defined.
- */
-/*#define HAS_RANDOM_R / **/
-#define RANDOM_R_PROTO 0 /**/
-
-/* HAS_READDIR64_R:
- * This symbol, if defined, indicates that the readdir64_r routine
- * is available to readdir64 re-entrantly.
- */
-/* READDIR64_R_PROTO:
- * This symbol encodes the prototype of readdir64_r.
- * It is zero if d_readdir64_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir64_r
- * is defined.
- */
-/*#define HAS_READDIR64_R / **/
-#define READDIR64_R_PROTO 0 /**/
-
-/* HAS_READDIR_R:
- * This symbol, if defined, indicates that the readdir_r routine
- * is available to readdir re-entrantly.
- */
-/* READDIR_R_PROTO:
- * This symbol encodes the prototype of readdir_r.
- * It is zero if d_readdir_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir_r
- * is defined.
- */
-/*#define HAS_READDIR_R / **/
-#define READDIR_R_PROTO 0 /**/
-
-/* HAS_SEM:
- * This symbol, if defined, indicates that the entire sem*(2) library is
- * supported.
- */
-/*#define HAS_SEM / **/
-
-/* HAS_SETGRENT:
- * This symbol, if defined, indicates that the setgrent routine is
- * available for initializing sequential access of the group database.
- */
-/*#define HAS_SETGRENT / **/
-
-/* HAS_SETGRENT_R:
- * This symbol, if defined, indicates that the setgrent_r routine
- * is available to setgrent re-entrantly.
- */
-/* SETGRENT_R_PROTO:
- * This symbol encodes the prototype of setgrent_r.
- * It is zero if d_setgrent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setgrent_r
- * is defined.
- */
-/*#define HAS_SETGRENT_R / **/
-#define SETGRENT_R_PROTO 0 /**/
-
-/* HAS_SETHOSTENT:
- * This symbol, if defined, indicates that the sethostent() routine is
- * available.
- */
-/*#define HAS_SETHOSTENT / **/
-
-/* HAS_SETHOSTENT_R:
- * This symbol, if defined, indicates that the sethostent_r routine
- * is available to sethostent re-entrantly.
- */
-/* SETHOSTENT_R_PROTO:
- * This symbol encodes the prototype of sethostent_r.
- * It is zero if d_sethostent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_sethostent_r
- * is defined.
- */
-/*#define HAS_SETHOSTENT_R / **/
-#define SETHOSTENT_R_PROTO 0 /**/
-
-/* HAS_SETLOCALE_R:
- * This symbol, if defined, indicates that the setlocale_r routine
- * is available to setlocale re-entrantly.
- */
-/* SETLOCALE_R_PROTO:
- * This symbol encodes the prototype of setlocale_r.
- * It is zero if d_setlocale_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setlocale_r
- * is defined.
- */
-/*#define HAS_SETLOCALE_R / **/
-#define SETLOCALE_R_PROTO 0 /**/
-
-/* HAS_SETNETENT:
- * This symbol, if defined, indicates that the setnetent() routine is
- * available.
- */
-/*#define HAS_SETNETENT / **/
-
-/* HAS_SETNETENT_R:
- * This symbol, if defined, indicates that the setnetent_r routine
- * is available to setnetent re-entrantly.
- */
-/* SETNETENT_R_PROTO:
- * This symbol encodes the prototype of setnetent_r.
- * It is zero if d_setnetent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setnetent_r
- * is defined.
- */
-/*#define HAS_SETNETENT_R / **/
-#define SETNETENT_R_PROTO 0 /**/
-
-/* HAS_SETPROTOENT:
- * This symbol, if defined, indicates that the setprotoent() routine is
- * available.
- */
-/*#define HAS_SETPROTOENT / **/
-
-/* HAS_SETPGRP:
- * This symbol, if defined, indicates that the setpgrp routine is
- * available to set the current process group.
- */
-/* USE_BSD_SETPGRP:
- * This symbol, if defined, indicates that setpgrp needs two
- * arguments whereas USG one needs none. See also HAS_SETPGID
- * for a POSIX interface.
- */
-/*#define HAS_SETPGRP / **/
-/*#define USE_BSD_SETPGRP / **/
-
-/* HAS_SETPROTOENT_R:
- * This symbol, if defined, indicates that the setprotoent_r routine
- * is available to setprotoent re-entrantly.
- */
-/* SETPROTOENT_R_PROTO:
- * This symbol encodes the prototype of setprotoent_r.
- * It is zero if d_setprotoent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setprotoent_r
- * is defined.
- */
-/*#define HAS_SETPROTOENT_R / **/
-#define SETPROTOENT_R_PROTO 0 /**/
-
-/* HAS_SETPWENT:
- * This symbol, if defined, indicates that the setpwent routine is
- * available for initializing sequential access of the passwd database.
- */
-/*#define HAS_SETPWENT / **/
-
-/* HAS_SETPWENT_R:
- * This symbol, if defined, indicates that the setpwent_r routine
- * is available to setpwent re-entrantly.
- */
-/* SETPWENT_R_PROTO:
- * This symbol encodes the prototype of setpwent_r.
- * It is zero if d_setpwent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setpwent_r
- * is defined.
- */
-/*#define HAS_SETPWENT_R / **/
-#define SETPWENT_R_PROTO 0 /**/
-
-/* HAS_SETSERVENT:
- * This symbol, if defined, indicates that the setservent() routine is
- * available.
- */
-/*#define HAS_SETSERVENT / **/
-
-/* HAS_SETSERVENT_R:
- * This symbol, if defined, indicates that the setservent_r routine
- * is available to setservent re-entrantly.
- */
-/* SETSERVENT_R_PROTO:
- * This symbol encodes the prototype of setservent_r.
- * It is zero if d_setservent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setservent_r
- * is defined.
- */
-/*#define HAS_SETSERVENT_R / **/
-#define SETSERVENT_R_PROTO 0 /**/
-
-/* HAS_SETVBUF:
- * This symbol, if defined, indicates that the setvbuf routine is
- * available to change buffering on an open stdio stream.
- * to a line-buffered mode.
- */
-#define HAS_SETVBUF /**/
-
-/* HAS_SHM:
- * This symbol, if defined, indicates that the entire shm*(2) library is
- * supported.
- */
-/*#define HAS_SHM / **/
-
-/* Shmat_t:
- * This symbol holds the return type of the shmat() system call.
- * Usually set to 'void *' or 'char *'.
- */
-/* HAS_SHMAT_PROTOTYPE:
- * This symbol, if defined, indicates that the sys/shm.h includes
- * a prototype for shmat(). Otherwise, it is up to the program to
- * guess one. Shmat_t shmat(int, Shmat_t, int) is a good guess,
- * but not always right so it should be emitted by the program only
- * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
- */
-#define Shmat_t void * /**/
-/*#define HAS_SHMAT_PROTOTYPE / **/
-
-/* HAS_SOCKET:
- * This symbol, if defined, indicates that the BSD socket interface is
- * supported.
- */
-/* HAS_SOCKETPAIR:
- * This symbol, if defined, indicates that the BSD socketpair() call is
- * supported.
- */
-/* HAS_MSG_CTRUNC:
- * This symbol, if defined, indicates that the MSG_CTRUNC is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_DONTROUTE:
- * This symbol, if defined, indicates that the MSG_DONTROUTE is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_OOB:
- * This symbol, if defined, indicates that the MSG_OOB is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_PEEK:
- * This symbol, if defined, indicates that the MSG_PEEK is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_PROXY:
- * This symbol, if defined, indicates that the MSG_PROXY is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_SCM_RIGHTS:
- * This symbol, if defined, indicates that the SCM_RIGHTS is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-#define HAS_SOCKET /**/
-/*#define HAS_SOCKETPAIR / **/
-/*#define HAS_MSG_CTRUNC / **/
-/*#define HAS_MSG_DONTROUTE / **/
-/*#define HAS_MSG_OOB / **/
-/*#define HAS_MSG_PEEK / **/
-/*#define HAS_MSG_PROXY / **/
-/*#define HAS_SCM_RIGHTS / **/
-
-/* HAS_SRAND48_R:
- * This symbol, if defined, indicates that the srand48_r routine
- * is available to srand48 re-entrantly.
- */
-/* SRAND48_R_PROTO:
- * This symbol encodes the prototype of srand48_r.
- * It is zero if d_srand48_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_srand48_r
- * is defined.
- */
-/*#define HAS_SRAND48_R / **/
-#define SRAND48_R_PROTO 0 /**/
-
-/* HAS_SRANDOM_R:
- * This symbol, if defined, indicates that the srandom_r routine
- * is available to srandom re-entrantly.
- */
-/* SRANDOM_R_PROTO:
- * This symbol encodes the prototype of srandom_r.
- * It is zero if d_srandom_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_srandom_r
- * is defined.
- */
-/*#define HAS_SRANDOM_R / **/
-#define SRANDOM_R_PROTO 0 /**/
-
-/* USE_STAT_BLOCKS:
- * This symbol is defined if this system has a stat structure declaring
- * st_blksize and st_blocks.
- */
-#ifndef USE_STAT_BLOCKS
-/*#define USE_STAT_BLOCKS / **/
-#endif
-
-/* USE_STRUCT_COPY:
- * This symbol, if defined, indicates that this C compiler knows how
- * to copy structures. If undefined, you'll need to use a block copy
- * routine of some sort instead.
- */
-#define USE_STRUCT_COPY /**/
-
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
-/* HAS_SYS_ERRLIST:
- * This symbol, if defined, indicates that the sys_errlist array is
- * available to translate error numbers to strings. The extern int
- * sys_nerr gives the size of that table.
- */
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-#define HAS_STRERROR /**/
-#define HAS_SYS_ERRLIST /**/
-#define Strerror(e) strerror(e)
-
-/* HAS_STRERROR_R:
- * This symbol, if defined, indicates that the strerror_r routine
- * is available to strerror re-entrantly.
- */
-/* STRERROR_R_PROTO:
- * This symbol encodes the prototype of strerror_r.
- * It is zero if d_strerror_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_strerror_r
- * is defined.
- */
-/*#define HAS_STRERROR_R / **/
-#define STRERROR_R_PROTO 0 /**/
-
-/* HAS_STRTOUL:
- * This symbol, if defined, indicates that the strtoul routine is
- * available to provide conversion of strings to unsigned long.
- */
-#define HAS_STRTOUL /**/
-
-/* HAS_TIME:
- * This symbol, if defined, indicates that the time() routine exists.
- */
-/* Time_t:
- * This symbol holds the type returned by time(). It can be long,
- * or time_t on BSD sites (in which case <sys/types.h> should be
- * included).
- */
-#define HAS_TIME /**/
-#define Time_t time_t /* Time type */
-
-/* HAS_TIMES:
- * This symbol, if defined, indicates that the times() routine exists.
- * Note that this became obsolete on some systems (SUNOS), which now
- * use getrusage(). It may be necessary to include <sys/times.h>.
- */
-#define HAS_TIMES /**/
-
-/* HAS_TMPNAM_R:
- * This symbol, if defined, indicates that the tmpnam_r routine
- * is available to tmpnam re-entrantly.
- */
-/* TMPNAM_R_PROTO:
- * This symbol encodes the prototype of tmpnam_r.
- * It is zero if d_tmpnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_tmpnam_r
- * is defined.
- */
-/*#define HAS_TMPNAM_R / **/
-#define TMPNAM_R_PROTO 0 /**/
-
-/* HAS_TTYNAME_R:
- * This symbol, if defined, indicates that the ttyname_r routine
- * is available to ttyname re-entrantly.
- */
-/* TTYNAME_R_PROTO:
- * This symbol encodes the prototype of ttyname_r.
- * It is zero if d_ttyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ttyname_r
- * is defined.
- */
-/*#define HAS_TTYNAME_R / **/
-#define TTYNAME_R_PROTO 0 /**/
-
-/* HAS_UNION_SEMUN:
- * This symbol, if defined, indicates that the union semun is
- * defined by including <sys/sem.h>. If not, the user code
- * probably needs to define it as:
- * union semun {
- * int val;
- * struct semid_ds *buf;
- * unsigned short *array;
- * }
- */
-/* USE_SEMCTL_SEMUN:
- * This symbol, if defined, indicates that union semun is
- * used for semctl IPC_STAT.
- */
-/* USE_SEMCTL_SEMID_DS:
- * This symbol, if defined, indicates that struct semid_ds * is
- * used for semctl IPC_STAT.
- */
-#define HAS_UNION_SEMUN /**/
-/*#define USE_SEMCTL_SEMUN / **/
-/*#define USE_SEMCTL_SEMID_DS / **/
-
-/* HAS_VFORK:
- * This symbol, if defined, indicates that vfork() exists.
- */
-/*#define HAS_VFORK / **/
-
-/* HAS_PSEUDOFORK:
- * This symbol, if defined, indicates that an emulation of the
- * fork routine is available.
- */
-/*#define HAS_PSEUDOFORK / **/
-
-/* Signal_t:
- * This symbol's value is either "void" or "int", corresponding to the
- * appropriate return type of a signal handler. Thus, you can declare
- * a signal handler using "Signal_t (*handler)()", and define the
- * handler using "Signal_t handler(sig)".
- */
-#define Signal_t void /* Signal handler's return type */
-
-/* HASVOLATILE:
- * This symbol, if defined, indicates that this C compiler knows about
- * the volatile declaration.
- */
-#define HASVOLATILE /**/
-#ifndef HASVOLATILE
-#define volatile
-#endif
-
-/* Fpos_t:
- * This symbol holds the type used to declare file positions in libc.
- * It can be fpos_t, long, uint, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Fpos_t fpos_t /* File position type */
-
-/* Gid_t_f:
- * This symbol defines the format string used for printing a Gid_t.
- */
-#define Gid_t_f "ld" /**/
-
-/* Gid_t_sign:
- * This symbol holds the signedess of a Gid_t.
- * 1 for unsigned, -1 for signed.
- */
-#define Gid_t_sign -1 /* GID sign */
-
-/* Gid_t_size:
- * This symbol holds the size of a Gid_t in bytes.
- */
-#define Gid_t_size 4 /* GID size */
-
-/* Gid_t:
- * This symbol holds the return type of getgid() and the type of
- * argument to setrgid() and related functions. Typically,
- * it is the type of group ids in the kernel. It can be int, ushort,
- * gid_t, etc... It may be necessary to include <sys/types.h> to get
- * any typedef'ed information.
- */
-#define Gid_t gid_t /* Type for getgid(), etc... */
-
-/* I_DIRENT:
- * This symbol, if defined, indicates to the C program that it should
- * include <dirent.h>. Using this symbol also triggers the definition
- * of the Direntry_t define which ends up being 'struct dirent' or
- * 'struct direct' depending on the availability of <dirent.h>.
- */
-/* DIRNAMLEN:
- * This symbol, if defined, indicates to the C program that the length
- * of directory entry names is provided by a d_namlen field. Otherwise
- * you need to do strlen() on the d_name field.
- */
-/* Direntry_t:
- * This symbol is set to 'struct direct' or 'struct dirent' depending on
- * whether dirent is available or not. You should use this pseudo type to
- * portably declare your directory entries.
- */
-#define I_DIRENT /**/
-#define DIRNAMLEN /**/
-#define Direntry_t struct direct
-
-/* I_GRP:
- * This symbol, if defined, indicates to the C program that it should
- * include <grp.h>.
- */
-/* GRPASSWD:
- * This symbol, if defined, indicates to the C program that struct group
- * in <grp.h> contains gr_passwd.
- */
-/*#define I_GRP / **/
-/*#define GRPASSWD / **/
-
-/* I_MACH_CTHREADS:
- * This symbol, if defined, indicates to the C program that it should
- * include <mach/cthreads.h>.
- */
-/*#define I_MACH_CTHREADS / **/
-
-/* I_NDBM:
- * This symbol, if defined, indicates that <ndbm.h> exists and should
- * be included.
- */
-/* I_GDBMNDBM:
- * This symbol, if defined, indicates that <gdbm/ndbm.h> exists and should
- * be included. This was the location of the ndbm.h compatibility file
- * in RedHat 7.1.
- */
-/* I_GDBM_NDBM:
- * This symbol, if defined, indicates that <gdbm-ndbm.h> exists and should
- * be included. This is the location of the ndbm.h compatibility file
- * in Debian 4.0.
- */
-/* NDBM_H_USES_PROTOTYPES:
- * This symbol, if defined, indicates that <ndbm.h> uses real ANSI C
- * prototypes instead of K&R style function declarations without any
- * parameter information. While ANSI C prototypes are supported in C++,
- * K&R style function declarations will yield errors.
- */
-/* GDBMNDBM_H_USES_PROTOTYPES:
- * This symbol, if defined, indicates that <gdbm/ndbm.h> uses real ANSI C
- * prototypes instead of K&R style function declarations without any
- * parameter information. While ANSI C prototypes are supported in C++,
- * K&R style function declarations will yield errors.
- */
-/* GDBM_NDBM_H_USES_PROTOTYPES:
- * This symbol, if defined, indicates that <gdbm-ndbm.h> uses real ANSI C
- * prototypes instead of K&R style function declarations without any
- * parameter information. While ANSI C prototypes are supported in C++,
- * K&R style function declarations will yield errors.
- */
-/*#define I_NDBM / **/
-/*#define I_GDBMNDBM / **/
-/*#define I_GDBM_NDBM / **/
-/*#define NDBM_H_USES_PROTOTYPES / **/
-/*#define GDBMNDBM_H_USES_PROTOTYPES / **/
-/*#define GDBM_NDBM_H_USES_PROTOTYPES / **/
-
-/* I_NETDB:
- * This symbol, if defined, indicates that <netdb.h> exists and
- * should be included.
- */
-/*#define I_NETDB / **/
-
-/* I_NET_ERRNO:
- * This symbol, if defined, indicates that <net/errno.h> exists and
- * should be included.
- */
-/*#define I_NET_ERRNO / **/
-
-/* I_PTHREAD:
- * This symbol, if defined, indicates to the C program that it should
- * include <pthread.h>.
- */
-/*#define I_PTHREAD / **/
-
-/* I_PWD:
- * This symbol, if defined, indicates to the C program that it should
- * include <pwd.h>.
- */
-/* PWQUOTA:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_quota.
- */
-/* PWAGE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_age.
- */
-/* PWCHANGE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_change.
- */
-/* PWCLASS:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_class.
- */
-/* PWEXPIRE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_expire.
- */
-/* PWCOMMENT:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_comment.
- */
-/* PWGECOS:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_gecos.
- */
-/* PWPASSWD:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_passwd.
- */
-/*#define I_PWD / **/
-/*#define PWQUOTA / **/
-/*#define PWAGE / **/
-/*#define PWCHANGE / **/
-/*#define PWCLASS / **/
-/*#define PWEXPIRE / **/
-/*#define PWCOMMENT / **/
-/*#define PWGECOS / **/
-/*#define PWPASSWD / **/
-
-/* I_SYS_ACCESS:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/access.h>.
- */
-/*#define I_SYS_ACCESS / **/
-
-/* I_SYS_SECURITY:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/security.h>.
- */
-/*#define I_SYS_SECURITY / **/
-
-/* I_SYSUIO:
- * This symbol, if defined, indicates that <sys/uio.h> exists and
- * should be included.
- */
-/*#define I_SYSUIO / **/
-
-/* I_STDARG:
- * This symbol, if defined, indicates that <stdarg.h> exists and should
- * be included.
- */
-/* I_VARARGS:
- * This symbol, if defined, indicates to the C program that it should
- * include <varargs.h>.
- */
-#define I_STDARG /**/
-/*#define I_VARARGS / **/
-
-/* PERL_INC_VERSION_LIST:
- * This variable specifies the list of subdirectories in over
- * which perl.c:incpush() and lib/lib.pm will automatically
- * search when adding directories to @INC, in a format suitable
- * for a C initialization string. See the inc_version_list entry
- * in Porting/Glossary for more details.
- */
-/*#define PERL_INC_VERSION_LIST 0 / **/
-
-/* INSTALL_USR_BIN_PERL:
- * This symbol, if defined, indicates that Perl is to be installed
- * also as /usr/bin/perl.
- */
-/*#define INSTALL_USR_BIN_PERL / **/
-
-/* Off_t:
- * This symbol holds the type used to declare offsets in the kernel.
- * It can be int, long, off_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-/* LSEEKSIZE:
- * This symbol holds the number of bytes used by the Off_t.
- */
-/* Off_t_size:
- * This symbol holds the number of bytes used by the Off_t.
- */
-#ifdef _MSC_VER
-# define Off_t __int64 /* <offset> type */
-#else
-# define Off_t long long /* <offset> type */
-#endif
-#define LSEEKSIZE 8 /* <offset> size */
-#define Off_t_size 8 /* <offset> size */
-
-/* Free_t:
- * This variable contains the return type of free(). It is usually
- * void, but occasionally int.
- */
-/* Malloc_t:
- * This symbol is the type of pointer returned by malloc and realloc.
- */
-#define Malloc_t void * /**/
-#define Free_t void /**/
-
-/* PERL_MALLOC_WRAP:
- * This symbol, if defined, indicates that we'd like malloc wrap checks.
- */
-#define PERL_MALLOC_WRAP /**/
-
-/* MYMALLOC:
- * This symbol, if defined, indicates that we're using our own malloc.
- */
-/*#define MYMALLOC / **/
-
-/* Mode_t:
- * This symbol holds the type used to declare file modes
- * for systems calls. It is usually mode_t, but may be
- * int or unsigned short. It may be necessary to include <sys/types.h>
- * to get any typedef'ed information.
- */
-#define Mode_t mode_t /* file mode parameter for system calls */
-
-/* Netdb_host_t:
- * This symbol holds the type used for the 1st argument
- * to gethostbyaddr().
- */
-/* Netdb_hlen_t:
- * This symbol holds the type used for the 2nd argument
- * to gethostbyaddr().
- */
-/* Netdb_name_t:
- * This symbol holds the type used for the argument to
- * gethostbyname().
- */
-/* Netdb_net_t:
- * This symbol holds the type used for the 1st argument to
- * getnetbyaddr().
- */
-#define Netdb_host_t char * /**/
-#define Netdb_hlen_t int /**/
-#define Netdb_name_t char * /**/
-#define Netdb_net_t long /**/
-
-/* PERL_OTHERLIBDIRS:
- * This variable contains a colon-separated set of paths for the perl
- * binary to search for additional library files or modules.
- * These directories will be tacked to the end of @INC.
- * Perl will automatically search below each path for version-
- * and architecture-specific directories. See PERL_INC_VERSION_LIST
- * for more details.
- */
-/*#define PERL_OTHERLIBDIRS "" / **/
-
-/* Pid_t:
- * This symbol holds the type used to declare process ids in the kernel.
- * It can be int, uint, pid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Pid_t int /* PID type */
-
-/* PRIVLIB:
- * This symbol contains the name of the private library for this package.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world. The program
- * should be prepared to do ~ expansion.
- */
-/* PRIVLIB_EXP:
- * This symbol contains the ~name expanded version of PRIVLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-#define PRIVLIB "c:\\perl\\lib" /**/
-#define PRIVLIB_EXP (win32_get_privlib(PERL_VERSION_STRING)) /**/
-
-/* CAN_PROTOTYPE:
- * If defined, this macro indicates that the C compiler can handle
- * function prototypes.
- */
-/* _:
- * This macro is used to declare function parameters for folks who want
- * to make declarations with prototypes using a different style than
- * the above macros. Use double parentheses. For example:
- *
- * int main _((int argc, char *argv[]));
- */
-#define CAN_PROTOTYPE /**/
-#ifdef CAN_PROTOTYPE
-#define _(args) args
-#else
-#define _(args) ()
-#endif
-
-/* Select_fd_set_t:
- * This symbol holds the type used for the 2nd, 3rd, and 4th
- * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
- * is defined, and 'int *' otherwise. This is only useful if you
- * have select(), of course.
- */
-#define Select_fd_set_t Perl_fd_set * /**/
-
-/* SH_PATH:
- * This symbol contains the full pathname to the shell used on this
- * on this system to execute Bourne shell scripts. Usually, this will be
- * /bin/sh, though it's possible that some systems will have /bin/ksh,
- * /bin/pdksh, /bin/ash, /bin/bash, or even something such as
- * D:/bin/sh.exe.
- */
-#define SH_PATH "cmd /x /c" /**/
-
-/* SIG_NAME:
- * This symbol contains a list of signal names in order of
- * signal number. This is intended
- * to be used as a static array initialization, like this:
- * char *sig_name[] = { SIG_NAME };
- * The signals in the list are separated with commas, and each signal
- * is surrounded by double quotes. There is no leading SIG in the signal
- * name, i.e. SIGQUIT is known as "QUIT".
- * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
- * etc., where nn is the actual signal number (e.g. NUM37).
- * The signal number for sig_name[i] is stored in sig_num[i].
- * The last element is 0 to terminate the list with a NULL. This
- * corresponds to the 0 at the end of the sig_name_init list.
- * Note that this variable is initialized from the sig_name_init,
- * not from sig_name (which is unused).
- */
-/* SIG_NUM:
- * This symbol contains a list of signal numbers, in the same order as the
- * SIG_NAME list. It is suitable for static array initialization, as in:
- * int sig_num[] = { SIG_NUM };
- * The signals in the list are separated with commas, and the indices
- * within that list and the SIG_NAME list match, so it's easy to compute
- * the signal name from a number or vice versa at the price of a small
- * dynamic linear lookup.
- * Duplicates are allowed, but are moved to the end of the list.
- * The signal number corresponding to sig_name[i] is sig_number[i].
- * if (i < NSIG) then sig_number[i] == i.
- * The last element is 0, corresponding to the 0 at the end of
- * the sig_name_init list.
- * Note that this variable is initialized from the sig_num_init,
- * not from sig_num (which is unused).
- */
-/* SIG_SIZE:
- * This variable contains the number of elements of the SIG_NAME
- * and SIG_NUM arrays, excluding the final NULL entry.
- */
-#define SIG_NAME "ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/
-#define SIG_NUM 0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0 /**/
-#define SIG_SIZE 27 /**/
-
-/* SITEARCH:
- * This symbol contains the name of the private library for this package.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world. The program
- * should be prepared to do ~ expansion.
- * The standard distribution will put nothing in this directory.
- * After perl has been installed, users may install their own local
- * architecture-dependent modules in this directory with
- * MakeMaker Makefile.PL
- * or equivalent. See INSTALL for details.
- */
-/* SITEARCH_EXP:
- * This symbol contains the ~name expanded version of SITEARCH, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-#define SITEARCH "c:\\perl\\site\\lib" /**/
-/*#define SITEARCH_EXP "" / **/
-
-/* SITELIB:
- * This symbol contains the name of the private library for this package.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world. The program
- * should be prepared to do ~ expansion.
- * The standard distribution will put nothing in this directory.
- * After perl has been installed, users may install their own local
- * architecture-independent modules in this directory with
- * MakeMaker Makefile.PL
- * or equivalent. See INSTALL for details.
- */
-/* SITELIB_EXP:
- * This symbol contains the ~name expanded version of SITELIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-/* SITELIB_STEM:
- * This define is SITELIB_EXP with any trailing version-specific component
- * removed. The elements in inc_version_list (inc_version_list.U) can
- * be tacked onto this variable to generate a list of directories to search.
- */
-#define SITELIB "c:\\perl\\site\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib(PERL_VERSION_STRING)) /**/
-#define SITELIB_STEM "" /**/
-
-/* Size_t_size:
- * This symbol holds the size of a Size_t in bytes.
- */
-#define Size_t_size 8 /**/
-
-/* Size_t:
- * This symbol holds the type used to declare length parameters
- * for string functions. It is usually size_t, but may be
- * unsigned long, int, etc. It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Size_t size_t /* length paramater for string functions */
-
-/* Sock_size_t:
- * This symbol holds the type used for the size argument of
- * various socket calls (just the base type, not the pointer-to).
- */
-#define Sock_size_t int /**/
-
-/* STDCHAR:
- * This symbol is defined to be the type of char used in stdio.h.
- * It has the values "unsigned char" or "char".
- */
-#define STDCHAR char /**/
-
-/* Uid_t_f:
- * This symbol defines the format string used for printing a Uid_t.
- */
-#define Uid_t_f "ld" /**/
-
-/* Uid_t_sign:
- * This symbol holds the signedess of a Uid_t.
- * 1 for unsigned, -1 for signed.
- */
-#define Uid_t_sign -1 /* UID sign */
-
-/* Uid_t_size:
- * This symbol holds the size of a Uid_t in bytes.
- */
-#define Uid_t_size 4 /* UID size */
-
-/* Uid_t:
- * This symbol holds the type used to declare user ids in the kernel.
- * It can be int, ushort, uid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Uid_t uid_t /* UID type */
-
-/* USE_ITHREADS:
- * This symbol, if defined, indicates that Perl should be built to
- * use the interpreter-based threading implementation.
- */
-/* USE_5005THREADS:
- * This symbol, if defined, indicates that Perl should be built to
- * use the 5.005-based threading implementation.
- * Only valid up to 5.8.x.
- */
-/* OLD_PTHREADS_API:
- * This symbol, if defined, indicates that Perl should
- * be built to use the old draft POSIX threads API.
- */
-/* USE_REENTRANT_API:
- * This symbol, if defined, indicates that Perl should
- * try to use the various _r versions of library functions.
- * This is extremely experimental.
- */
-/*#define USE_5005THREADS / **/
-/*#define USE_ITHREADS / **/
-#if defined(USE_5005THREADS) && !defined(USE_ITHREADS)
-#define USE_THREADS /* until src is revised*/
-#endif
-/*#define OLD_PTHREADS_API / **/
-/*#define USE_REENTRANT_API / **/
-
-/* PERL_VENDORARCH:
- * If defined, this symbol contains the name of a private library.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world.
- * It may have a ~ on the front.
- * The standard distribution will put nothing in this directory.
- * Vendors who distribute perl may wish to place their own
- * architecture-dependent modules and extensions in this directory with
- * MakeMaker Makefile.PL INSTALLDIRS=vendor
- * or equivalent. See INSTALL for details.
- */
-/* PERL_VENDORARCH_EXP:
- * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-/*#define PERL_VENDORARCH "" / **/
-/*#define PERL_VENDORARCH_EXP "" / **/
-
-/* PERL_VENDORLIB_EXP:
- * This symbol contains the ~name expanded version of VENDORLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-/* PERL_VENDORLIB_STEM:
- * This define is PERL_VENDORLIB_EXP with any trailing version-specific component
- * removed. The elements in inc_version_list (inc_version_list.U) can
- * be tacked onto this variable to generate a list of directories to search.
- */
-/*#define PERL_VENDORLIB_EXP "" / **/
-/*#define PERL_VENDORLIB_STEM "" / **/
-
-/* VOIDFLAGS:
- * This symbol indicates how much support of the void type is given by this
- * compiler. What various bits mean:
- *
- * 1 = supports declaration of void
- * 2 = supports arrays of pointers to functions returning void
- * 4 = supports comparisons between pointers to void functions and
- * addresses of void functions
- * 8 = suports declaration of generic void pointers
- *
- * The package designer should define VOIDUSED to indicate the requirements
- * of the package. This can be done either by #defining VOIDUSED before
- * including config.h, or by defining defvoidused in Myinit.U. If the
- * latter approach is taken, only those flags will be tested. If the
- * level of void support necessary is not present, defines void to int.
- */
-#ifndef VOIDUSED
-#define VOIDUSED 15
-#endif
-#define VOIDFLAGS 15
-#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
-#define void int /* is void to be avoided? */
-#define M_VOID /* Xenix strikes again */
-#endif
-
-/* USE_CROSS_COMPILE:
- * This symbol, if defined, indicates that Perl is being cross-compiled.
- */
-/* PERL_TARGETARCH:
- * This symbol, if defined, indicates the target architecture
- * Perl has been cross-compiled to. Undefined if not a cross-compile.
- */
-#ifndef USE_CROSS_COMPILE
-/*#define USE_CROSS_COMPILE / **/
-#define PERL_TARGETARCH "" /**/
-#endif
-
-/* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double, or a long double when applicable. Usual values are 2,
- * 4 and 8. The default is eight, for safety.
- */
-#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
-# define MEM_ALIGNBYTES 8
-#else
-#define MEM_ALIGNBYTES 8
-#endif
-
-/* BYTEORDER:
- * This symbol holds the hexadecimal constant defined in byteorder,
- * in a UV, i.e. 0x1234 or 0x4321 or 0x12345678, etc...
- * If the compiler supports cross-compiling or multiple-architecture
- * binaries (eg. on NeXT systems), use compiler-defined macros to
- * determine the byte order.
- * On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture
- * Binaries (MAB) on either big endian or little endian machines.
- * The endian-ness is available at compile-time. This only matters
- * for perl, where the config.h can be generated and installed on
- * one system, and used by a different architecture to build an
- * extension. Older versions of NeXT that might not have
- * defined either *_ENDIAN__ were all on Motorola 680x0 series,
- * so the default case (for NeXT) is big endian to catch them.
- * This might matter for NeXT 3.0.
- */
-#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
-# ifdef __LITTLE_ENDIAN__
-# if LONGSIZE == 4
-# define BYTEORDER 0x1234
-# else
-# if LONGSIZE == 8
-# define BYTEORDER 0x12345678
-# endif
-# endif
-# else
-# ifdef __BIG_ENDIAN__
-# if LONGSIZE == 4
-# define BYTEORDER 0x4321
-# else
-# if LONGSIZE == 8
-# define BYTEORDER 0x87654321
-# endif
-# endif
-# endif
-# endif
-# if !defined(BYTEORDER) && (defined(NeXT) || defined(__NeXT__))
-# define BYTEORDER 0x4321
-# endif
-#else
-#define BYTEORDER 0x1234 /* large digits for MSB */
-#endif /* NeXT */
-
-/* CHARBITS:
- * This symbol contains the size of a char, so that the C preprocessor
- * can make decisions based on it.
- */
-#define CHARBITS 8 /**/
-
-/* CASTI32:
- * This symbol is defined if the C compiler can cast negative
- * or large floating point numbers to 32-bit ints.
- */
-#ifndef _MSC_VER
-# define CASTI32 /**/
-#endif
-
-/* CASTNEGFLOAT:
- * This symbol is defined if the C compiler can cast negative
- * numbers to unsigned longs, ints and shorts.
- */
-/* CASTFLAGS:
- * This symbol contains flags that say what difficulties the compiler
- * has casting odd floating values to unsigned long:
- * 0 = ok
- * 1 = couldn't cast < 0
- * 2 = couldn't cast >= 0x80000000
- * 4 = couldn't cast in argument expression list
- */
-#define CASTNEGFLOAT /**/
-#define CASTFLAGS 0 /**/
-
-/* VOID_CLOSEDIR:
- * This symbol, if defined, indicates that the closedir() routine
- * does not return a value.
- */
-/*#define VOID_CLOSEDIR / **/
-
-/* HAS_FD_SET:
- * This symbol, when defined, indicates presence of the fd_set typedef
- * in <sys/types.h>
- */
-#define HAS_FD_SET /**/
-
-/* Gconvert:
- * This preprocessor macro is defined to convert a floating point
- * number to a string without a trailing decimal point. This
- * emulates the behavior of sprintf("%g"), but is sometimes much more
- * efficient. If gconvert() is not available, but gcvt() drops the
- * trailing decimal point, then gcvt() is used. If all else fails,
- * a macro using sprintf("%g") is used. Arguments for the Gconvert
- * macro are: value, number of digits, whether trailing zeros should
- * be retained, and the output buffer.
- * The usual values are:
- * d_Gconvert='gconvert((x),(n),(t),(b))'
- * d_Gconvert='gcvt((x),(n),(b))'
- * d_Gconvert='sprintf((b),"%.*g",(n),(x))'
- * The last two assume trailing zeros should not be kept.
- */
-#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
-
-/* HAS_GETPAGESIZE:
- * This symbol, if defined, indicates that the getpagesize system call
- * is available to get system page size, which is the granularity of
- * many memory management calls.
- */
-/*#define HAS_GETPAGESIZE / **/
-
-/* HAS_GNULIBC:
- * This symbol, if defined, indicates to the C program that
- * the GNU C library is being used. A better check is to use
- * the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc.
- */
-/*#define HAS_GNULIBC / **/
-#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)
-# define _GNU_SOURCE
-#endif
-
-/* HAS_ISASCII:
- * This manifest constant lets the C program know that isascii
- * is available.
- */
-#define HAS_ISASCII /**/
-
-/* HAS_LCHOWN:
- * This symbol, if defined, indicates that the lchown routine is
- * available to operate on a symbolic link (instead of following the
- * link).
- */
-/*#define HAS_LCHOWN / **/
-
-/* HAS_OPEN3:
- * This manifest constant lets the C program know that the three
- * argument form of open(2) is available.
- */
-/*#define HAS_OPEN3 / **/
-
-/* HAS_SAFE_BCOPY:
- * This symbol, if defined, indicates that the bcopy routine is available
- * to copy potentially overlapping memory blocks. Normally, you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-/*#define HAS_SAFE_BCOPY / **/
-
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. If you need to
- * copy overlapping memory blocks, you should check HAS_MEMMOVE and
- * use memmove() instead, if available.
- */
-/*#define HAS_SAFE_MEMCPY / **/
-
-/* HAS_SANE_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * and can be used to compare relative magnitudes of chars with their high
- * bits set. If it is not defined, roll your own version.
- */
-#define HAS_SANE_MEMCMP /**/
-
-/* HAS_SIGACTION:
- * This symbol, if defined, indicates that Vr4's sigaction() routine
- * is available.
- */
-/*#define HAS_SIGACTION / **/
-
-/* HAS_SIGSETJMP:
- * This variable indicates to the C program that the sigsetjmp()
- * routine is available to save the calling process's registers
- * and stack environment for later use by siglongjmp(), and
- * to optionally save the process's signal mask. See
- * Sigjmp_buf, Sigsetjmp, and Siglongjmp.
- */
-/* Sigjmp_buf:
- * This is the buffer type to be used with Sigsetjmp and Siglongjmp.
- */
-/* Sigsetjmp:
- * This macro is used in the same way as sigsetjmp(), but will invoke
- * traditional setjmp() if sigsetjmp isn't available.
- * See HAS_SIGSETJMP.
- */
-/* Siglongjmp:
- * This macro is used in the same way as siglongjmp(), but will invoke
- * traditional longjmp() if siglongjmp isn't available.
- * See HAS_SIGSETJMP.
- */
-/*#define HAS_SIGSETJMP / **/
-#ifdef HAS_SIGSETJMP
-#define Sigjmp_buf sigjmp_buf
-#define Sigsetjmp(buf,save_mask) sigsetjmp((buf),(save_mask))
-#define Siglongjmp(buf,retval) siglongjmp((buf),(retval))
-#else
-#define Sigjmp_buf jmp_buf
-#define Sigsetjmp(buf,save_mask) setjmp((buf))
-#define Siglongjmp(buf,retval) longjmp((buf),(retval))
-#endif
-
-/* HAS_STATIC_INLINE:
- * This symbol, if defined, indicates that the C compiler supports
- * C99-style static inline. That is, the function can't be called
- * from another translation unit.
- */
-/* PERL_STATIC_INLINE:
- * This symbol gives the best-guess incantation to use for static
- * inline functions. If HAS_STATIC_INLINE is defined, this will
- * give C99-style inline. If HAS_STATIC_INLINE is not defined,
- * this will give a plain 'static'. It will always be defined
- * to something that gives static linkage.
- * Possibilities include
- * static inline (c99)
- * static __inline__ (gcc -ansi)
- * static __inline (MSVC)
- * static _inline (older MSVC)
- * static (c89 compilers)
- */
-#ifdef _MSC_VER
-# define HAS_STATIC_INLINE /**/
-# define PERL_STATIC_INLINE static __inline /**/
-#else /* gcc presumably */
-# define HAS_STATIC_INLINE /**/
-# define PERL_STATIC_INLINE static __inline__ /**/
-#endif
-
-/* USE_STDIO_PTR:
- * This symbol is defined if the _ptr and _cnt fields (or similar)
- * of the stdio FILE structure can be used to access the stdio buffer
- * for a file handle. If this is defined, then the FILE_ptr(fp)
- * and FILE_cnt(fp) macros will also be defined and should be used
- * to access these fields.
- */
-/* FILE_ptr:
- * This macro is used to access the _ptr field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_PTR_LVALUE:
- * This symbol is defined if the FILE_ptr macro can be used as an
- * lvalue.
- */
-/* FILE_cnt:
- * This macro is used to access the _cnt field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_CNT_LVALUE:
- * This symbol is defined if the FILE_cnt macro can be used as an
- * lvalue.
- */
-/* STDIO_PTR_LVAL_SETS_CNT:
- * This symbol is defined if using the FILE_ptr macro as an lvalue
- * to increase the pointer by n has the side effect of decreasing the
- * value of File_cnt(fp) by n.
- */
-/* STDIO_PTR_LVAL_NOCHANGE_CNT:
- * This symbol is defined if using the FILE_ptr macro as an lvalue
- * to increase the pointer by n leaves File_cnt(fp) unchanged.
- */
-#define USE_STDIO_PTR /**/
-#ifdef USE_STDIO_PTR
-#define FILE_ptr(fp) ((fp)->_ptr)
-#define STDIO_PTR_LVALUE /**/
-#define FILE_cnt(fp) ((fp)->_cnt)
-#define STDIO_CNT_LVALUE /**/
-/*#define STDIO_PTR_LVAL_SETS_CNT / **/
-#define STDIO_PTR_LVAL_NOCHANGE_CNT /**/
-#endif
-
-/* USE_STDIO_BASE:
- * This symbol is defined if the _base field (or similar) of the
- * stdio FILE structure can be used to access the stdio buffer for
- * a file handle. If this is defined, then the FILE_base(fp) macro
- * will also be defined and should be used to access this field.
- * Also, the FILE_bufsiz(fp) macro will be defined and should be used
- * to determine the number of bytes in the buffer. USE_STDIO_BASE
- * will never be defined unless USE_STDIO_PTR is.
- */
-/* FILE_base:
- * This macro is used to access the _base field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_BASE is defined.
- */
-/* FILE_bufsiz:
- * This macro is used to determine the number of bytes in the I/O
- * buffer pointed to by _base field (or equivalent) of the FILE
- * structure pointed to its argument. This macro will always be defined
- * if USE_STDIO_BASE is defined.
- */
-#define USE_STDIO_BASE /**/
-#ifdef USE_STDIO_BASE
-#define FILE_base(fp) ((fp)->_base)
-#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
-#endif
-
-/* HAS_VPRINTF:
- * This symbol, if defined, indicates that the vprintf routine is available
- * to printf with a pointer to an argument list. If unavailable, you
- * may need to write your own, probably in terms of _doprnt().
- */
-/* USE_CHAR_VSPRINTF:
- * This symbol is defined if this system has vsprintf() returning type
- * (char*). The trend seems to be to declare it as "int vsprintf()". It
- * is up to the package author to declare vsprintf correctly based on the
- * symbol.
- */
-#define HAS_VPRINTF /**/
-/*#define USE_CHAR_VSPRINTF / **/
-
-/* DOUBLESIZE:
- * This symbol contains the size of a double, so that the C preprocessor
- * can make decisions based on it.
- */
-#define DOUBLESIZE 8 /**/
-
-/* I_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <time.h>.
- */
-/* I_SYS_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h>.
- */
-/* I_SYS_TIME_KERNEL:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h> with KERNEL defined.
- */
-/* HAS_TM_TM_ZONE:
- * This symbol, if defined, indicates to the C program that
- * the struct tm has a tm_zone field.
- */
-/* HAS_TM_TM_GMTOFF:
- * This symbol, if defined, indicates to the C program that
- * the struct tm has a tm_gmtoff field.
- */
-#define I_TIME /**/
-/*#define I_SYS_TIME / **/
-/*#define I_SYS_TIME_KERNEL / **/
-/*#define HAS_TM_TM_ZONE / **/
-/*#define HAS_TM_TM_GMTOFF / **/
-
-/* VAL_O_NONBLOCK:
- * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
- * non-blocking I/O for the file descriptor. Note that there is no way
- * back, i.e. you cannot turn it blocking again this way. If you wish to
- * alternatively switch between blocking and non-blocking, use the
- * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
- */
-/* VAL_EAGAIN:
- * This symbol holds the errno error code set by read() when no data was
- * present on the non-blocking file descriptor.
- */
-/* RD_NODATA:
- * This symbol holds the return code from read() when no data is present
- * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
- * not defined, then you can't distinguish between no data and EOF by
- * issuing a read(). You'll have to find another way to tell for sure!
- */
-/* EOF_NONBLOCK:
- * This symbol, if defined, indicates to the C program that a read() on
- * a non-blocking file descriptor will return 0 on EOF, and not the value
- * held in RD_NODATA (-1 usually, in that case!).
- */
-#define VAL_O_NONBLOCK O_NONBLOCK
-#define VAL_EAGAIN EAGAIN
-#define RD_NODATA -1
-#define EOF_NONBLOCK
-
-/* PTRSIZE:
- * This symbol contains the size of a pointer, so that the C preprocessor
- * can make decisions based on it. It will be sizeof(void *) if
- * the compiler supports (void *); otherwise it will be
- * sizeof(char *).
- */
-#define PTRSIZE 8 /**/
-
-/* Drand01:
- * This macro is to be used to generate uniformly distributed
- * random numbers over the range [0., 1.[. You may have to supply
- * an 'extern double drand48();' in your program since SunOS 4.1.3
- * doesn't provide you with anything relevant in its headers.
- * See HAS_DRAND48_PROTO.
- */
-/* Rand_seed_t:
- * This symbol defines the type of the argument of the
- * random seed function.
- */
-/* seedDrand01:
- * This symbol defines the macro to be used in seeding the
- * random number generator (see Drand01).
- */
-/* RANDBITS:
- * This symbol indicates how many bits are produced by the
- * function used to generate normalized random numbers.
- * Values include 15, 16, 31, and 48.
- */
-#define Drand01() (rand()/(double)((unsigned)1<<RANDBITS)) /**/
-#define Rand_seed_t unsigned /**/
-#define seedDrand01(x) srand((Rand_seed_t)x) /**/
-#define RANDBITS 15 /**/
-
-/* SSize_t:
- * This symbol holds the type used by functions that return
- * a count of bytes or an error condition. It must be a signed type.
- * It is usually ssize_t, but may be long or int, etc.
- * It may be necessary to include <sys/types.h> or <unistd.h>
- * to get any typedef'ed information.
- * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
- */
-#ifdef _MSC_VER
-# define SSize_t __int64 /* signed count of bytes */
-#else
-# define SSize_t long long /* signed count of bytes */
-#endif
-
-/* EBCDIC:
- * This symbol, if defined, indicates that this system uses
- * EBCDIC encoding.
- */
-/*#define EBCDIC / **/
-
-/* SETUID_SCRIPTS_ARE_SECURE_NOW:
- * This symbol, if defined, indicates that the bug that prevents
- * setuid scripts from being secure is not present in this kernel.
- */
-/* DOSUID:
- * This symbol, if defined, indicates that the C program should
- * check the script that it is executing for setuid/setgid bits, and
- * attempt to emulate setuid/setgid on systems that have disabled
- * setuid #! scripts because the kernel can't do it securely.
- * It is up to the package designer to make sure that this emulation
- * is done securely. Among other things, it should do an fstat on
- * the script it just opened to make sure it really is a setuid/setgid
- * script, it should make sure the arguments passed correspond exactly
- * to the argument on the #! line, and it should not trust any
- * subprocesses to which it must pass the filename rather than the
- * file descriptor of the script to be executed.
- */
-/*#define SETUID_SCRIPTS_ARE_SECURE_NOW / **/
-/*#define DOSUID / **/
-
-/* PERL_USE_DEVEL:
- * This symbol, if defined, indicates that Perl was configured with
- * -Dusedevel, to enable development features. This should not be
- * done for production builds.
- */
-/*#define PERL_USE_DEVEL / **/
-
-/* HAS_ATOLF:
- * This symbol, if defined, indicates that the atolf routine is
- * available to convert strings into long doubles.
- */
-/*#define HAS_ATOLF / **/
-
-/* HAS_ATOLL:
- * This symbol, if defined, indicates that the atoll routine is
- * available to convert strings into long longs.
- */
-#define HAS_ATOLL /**/
-
-/* HAS__FWALK:
- * This symbol, if defined, indicates that the _fwalk system call is
- * available to apply a function to all the file handles.
- */
-/*#define HAS__FWALK / **/
-
-/* HAS_AINTL:
- * This symbol, if defined, indicates that the aintl routine is
- * available. If copysignl is also present we can emulate modfl.
- */
-/*#define HAS_AINTL / **/
-
-/* HAS_BUILTIN_CHOOSE_EXPR:
- * Can we handle GCC builtin for compile-time ternary-like expressions
- */
-/* HAS_BUILTIN_EXPECT:
- * Can we handle GCC builtin for telling that certain values are more
- * likely
- */
-/*#define HAS_BUILTIN_EXPECT / **/
-/*#define HAS_BUILTIN_CHOOSE_EXPR / **/
-
-/* HAS_C99_VARIADIC_MACROS:
- * If defined, the compiler supports C99 variadic macros.
- */
-/*#define HAS_C99_VARIADIC_MACROS / **/
-
-/* HAS_CLASS:
- * This symbol, if defined, indicates that the class routine is
- * available to classify doubles. Available for example in AIX.
- * The returned values are defined in <float.h> and are:
- *
- * FP_PLUS_NORM Positive normalized, nonzero
- * FP_MINUS_NORM Negative normalized, nonzero
- * FP_PLUS_DENORM Positive denormalized, nonzero
- * FP_MINUS_DENORM Negative denormalized, nonzero
- * FP_PLUS_ZERO +0.0
- * FP_MINUS_ZERO -0.0
- * FP_PLUS_INF +INF
- * FP_MINUS_INF -INF
- * FP_NANS Signaling Not a Number (NaNS)
- * FP_NANQ Quiet Not a Number (NaNQ)
- */
-/*#define HAS_CLASS / **/
-
-/* HAS_CLEARENV:
- * This symbol, if defined, indicates that the clearenv () routine is
- * available for use.
- */
-/*#define HAS_CLEARENV / **/
-
-/* HAS_STRUCT_CMSGHDR:
- * This symbol, if defined, indicates that the struct cmsghdr
- * is supported.
- */
-/*#define HAS_STRUCT_CMSGHDR / **/
-
-/* HAS_COPYSIGNL:
- * This symbol, if defined, indicates that the copysignl routine is
- * available. If aintl is also present we can emulate modfl.
- */
-/*#define HAS_COPYSIGNL / **/
-
-/* USE_CPLUSPLUS:
- * This symbol, if defined, indicates that a C++ compiler was
- * used to compiled Perl and will be used to compile extensions.
- */
-/*#define USE_CPLUSPLUS / **/
-
-/* HAS_DBMINIT_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the dbminit() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int dbminit(char *);
- */
-/*#define HAS_DBMINIT_PROTO / **/
-
-/* HAS_DIR_DD_FD:
- * This symbol, if defined, indicates that the the DIR* dirstream
- * structure contains a member variable named dd_fd.
- */
-/*#define HAS_DIR_DD_FD / **/
-
-/* HAS_DIRFD:
- * This manifest constant lets the C program know that dirfd
- * is available.
- */
-/*#define HAS_DIRFD / **/
-
-/* DLSYM_NEEDS_UNDERSCORE:
- * This symbol, if defined, indicates that we need to prepend an
- * underscore to the symbol name before calling dlsym(). This only
- * makes sense if you *have* dlsym, which we will presume is the
- * case if you're using dl_dlopen.xs.
- */
-/*#define DLSYM_NEEDS_UNDERSCORE / **/
-
-/* HAS_FAST_STDIO:
- * This symbol, if defined, indicates that the "fast stdio"
- * is available to manipulate the stdio buffers directly.
- */
-#define HAS_FAST_STDIO /**/
-
-/* HAS_FCHDIR:
- * This symbol, if defined, indicates that the fchdir routine is
- * available to change directory using a file descriptor.
- */
-/*#define HAS_FCHDIR / **/
-
-/* FCNTL_CAN_LOCK:
- * This symbol, if defined, indicates that fcntl() can be used
- * for file locking. Normally on Unix systems this is defined.
- * It may be undefined on VMS.
- */
-/*#define FCNTL_CAN_LOCK / **/
-
-/* HAS_FINITE:
- * This symbol, if defined, indicates that the finite routine is
- * available to check whether a double is finite (non-infinity non-NaN).
- */
-/*#define HAS_FINITE / **/
-
-/* HAS_FINITEL:
- * This symbol, if defined, indicates that the finitel routine is
- * available to check whether a long double is finite
- * (non-infinity non-NaN).
- */
-/*#define HAS_FINITEL / **/
-
-/* HAS_FLOCK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the flock() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int flock(int, int);
- */
-#define HAS_FLOCK_PROTO /**/
-
-/* HAS_FP_CLASS:
- * This symbol, if defined, indicates that the fp_class routine is
- * available to classify doubles. Available for example in Digital UNIX.
- * The returned values are defined in <math.h> and are:
- *
- * FP_SNAN Signaling NaN (Not-a-Number)
- * FP_QNAN Quiet NaN (Not-a-Number)
- * FP_POS_INF +infinity
- * FP_NEG_INF -infinity
- * FP_POS_NORM Positive normalized
- * FP_NEG_NORM Negative normalized
- * FP_POS_DENORM Positive denormalized
- * FP_NEG_DENORM Negative denormalized
- * FP_POS_ZERO +0.0 (positive zero)
- * FP_NEG_ZERO -0.0 (negative zero)
- */
-/*#define HAS_FP_CLASS / **/
-
-/* HAS_FPCLASS:
- * This symbol, if defined, indicates that the fpclass routine is
- * available to classify doubles. Available for example in Solaris/SVR4.
- * The returned values are defined in <ieeefp.h> and are:
- *
- * FP_SNAN signaling NaN
- * FP_QNAN quiet NaN
- * FP_NINF negative infinity
- * FP_PINF positive infinity
- * FP_NDENORM negative denormalized non-zero
- * FP_PDENORM positive denormalized non-zero
- * FP_NZERO negative zero
- * FP_PZERO positive zero
- * FP_NNORM negative normalized non-zero
- * FP_PNORM positive normalized non-zero
- */
-/*#define HAS_FPCLASS / **/
-
-/* HAS_FPCLASSIFY:
- * This symbol, if defined, indicates that the fpclassify routine is
- * available to classify doubles. Available for example in HP-UX.
- * The returned values are defined in <math.h> and are
- *
- * FP_NORMAL Normalized
- * FP_ZERO Zero
- * FP_INFINITE Infinity
- * FP_SUBNORMAL Denormalized
- * FP_NAN NaN
- *
- */
-/*#define HAS_FPCLASSIFY / **/
-
-/* HAS_FPCLASSL:
- * This symbol, if defined, indicates that the fpclassl routine is
- * available to classify long doubles. Available for example in IRIX.
- * The returned values are defined in <ieeefp.h> and are:
- *
- * FP_SNAN signaling NaN
- * FP_QNAN quiet NaN
- * FP_NINF negative infinity
- * FP_PINF positive infinity
- * FP_NDENORM negative denormalized non-zero
- * FP_PDENORM positive denormalized non-zero
- * FP_NZERO negative zero
- * FP_PZERO positive zero
- * FP_NNORM negative normalized non-zero
- * FP_PNORM positive normalized non-zero
- */
-/*#define HAS_FPCLASSL / **/
-
-/* HAS_FPOS64_T:
- * This symbol will be defined if the C compiler supports fpos64_t.
- */
-/*#define HAS_FPOS64_T / **/
-
-/* HAS_FREXPL:
- * This symbol, if defined, indicates that the frexpl routine is
- * available to break a long double floating-point number into
- * a normalized fraction and an integral power of 2.
- */
-/*#define HAS_FREXPL / **/
-
-/* HAS_STRUCT_FS_DATA:
- * This symbol, if defined, indicates that the struct fs_data
- * to do statfs() is supported.
- */
-/*#define HAS_STRUCT_FS_DATA / **/
-
-/* HAS_FSEEKO:
- * This symbol, if defined, indicates that the fseeko routine is
- * available to fseek beyond 32 bits (useful for ILP32 hosts).
- */
-/*#define HAS_FSEEKO / **/
-
-/* HAS_FSTATFS:
- * This symbol, if defined, indicates that the fstatfs routine is
- * available to stat filesystems by file descriptors.
- */
-/*#define HAS_FSTATFS / **/
-
-/* HAS_FSYNC:
- * This symbol, if defined, indicates that the fsync routine is
- * available to write a file's modified data and attributes to
- * permanent storage.
- */
-/*#define HAS_FSYNC / **/
-
-/* HAS_FTELLO:
- * This symbol, if defined, indicates that the ftello routine is
- * available to ftell beyond 32 bits (useful for ILP32 hosts).
- */
-/*#define HAS_FTELLO / **/
-
-/* HAS_FUTIMES:
- * This symbol, if defined, indicates that the futimes routine is
- * available to change file descriptor time stamps with struct timevals.
- */
-/*#define HAS_FUTIMES / **/
-
-/* HAS_GETADDRINFO:
- * This symbol, if defined, indicates that the getaddrinfo() function
- * is available for use.
- */
-/*#define HAS_GETADDRINFO / **/
-
-/* HAS_GETCWD:
- * This symbol, if defined, indicates that the getcwd routine is
- * available to get the current working directory.
- */
-#define HAS_GETCWD /**/
-
-/* HAS_GETESPWNAM:
- * This symbol, if defined, indicates that the getespwnam system call is
- * available to retrieve enchanced (shadow) password entries by name.
- */
-/*#define HAS_GETESPWNAM / **/
-
-/* HAS_GETFSSTAT:
- * This symbol, if defined, indicates that the getfsstat routine is
- * available to stat filesystems in bulk.
- */
-/*#define HAS_GETFSSTAT / **/
-
-/* HAS_GETITIMER:
- * This symbol, if defined, indicates that the getitimer routine is
- * available to return interval timers.
- */
-/*#define HAS_GETITIMER / **/
-
-/* HAS_GETMNT:
- * This symbol, if defined, indicates that the getmnt routine is
- * available to get filesystem mount info by filename.
- */
-/*#define HAS_GETMNT / **/
-
-/* HAS_GETMNTENT:
- * This symbol, if defined, indicates that the getmntent routine is
- * available to iterate through mounted file systems to get their info.
- */
-/*#define HAS_GETMNTENT / **/
-
-/* HAS_GETNAMEINFO:
- * This symbol, if defined, indicates that the getnameinfo() function
- * is available for use.
- */
-/*#define HAS_GETNAMEINFO / **/
-
-/* HAS_GETPRPWNAM:
- * This symbol, if defined, indicates that the getprpwnam system call is
- * available to retrieve protected (shadow) password entries by name.
- */
-/*#define HAS_GETPRPWNAM / **/
-
-/* HAS_GETSPNAM:
- * This symbol, if defined, indicates that the getspnam system call is
- * available to retrieve SysV shadow password entries by name.
- */
-/*#define HAS_GETSPNAM / **/
-
-/* HAS_HASMNTOPT:
- * This symbol, if defined, indicates that the hasmntopt routine is
- * available to query the mount options of file systems.
- */
-/*#define HAS_HASMNTOPT / **/
-
-/* HAS_ILOGBL:
- * This symbol, if defined, indicates that the ilogbl routine is
- * available. If scalbnl is also present we can emulate frexpl.
- */
-/*#define HAS_ILOGBL / **/
-
-/* HAS_INETNTOP:
- * This symbol, if defined, indicates that the inet_ntop() function
- * is available to parse IPv4 and IPv6 strings.
- */
-/*#define HAS_INETNTOP / **/
-
-/* HAS_INETPTON:
- * This symbol, if defined, indicates that the inet_pton() function
- * is available to parse IPv4 and IPv6 strings.
- */
-/*#define HAS_INETPTON / **/
-
-/* HAS_INT64_T:
- * This symbol will defined if the C compiler supports int64_t.
- * Usually the <inttypes.h> needs to be included, but sometimes
- * <sys/types.h> is enough.
- */
-/*#define HAS_INT64_T / **/
-
-/* HAS_ISFINITE:
- * This symbol, if defined, indicates that the isfinite routine is
- * available to check whether a double is finite (non-infinity non-NaN).
- */
-/*#define HAS_ISFINITE / **/
-
-/* HAS_ISINF:
- * This symbol, if defined, indicates that the isinf routine is
- * available to check whether a double is an infinity.
- */
-/*#define HAS_ISINF / **/
-
-/* HAS_ISNAN:
- * This symbol, if defined, indicates that the isnan routine is
- * available to check whether a double is a NaN.
- */
-#define HAS_ISNAN /**/
-
-/* HAS_ISNANL:
- * This symbol, if defined, indicates that the isnanl routine is
- * available to check whether a long double is a NaN.
- */
-/*#define HAS_ISNANL / **/
-
-/* HAS_LDBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol LDBL_DIG, which is the number
- * of significant digits in a long double precision number. Unlike
- * for DBL_DIG, there's no good guess for LDBL_DIG if it is undefined.
- */
-#define HAS_LDBL_DIG /**/
-
-/* LIBM_LIB_VERSION:
- * This symbol, if defined, indicates that libm exports _LIB_VERSION
- * and that math.h defines the enum to manipulate it.
- */
-/*#define LIBM_LIB_VERSION / **/
-
-/* HAS_MADVISE:
- * This symbol, if defined, indicates that the madvise system call is
- * available to map a file into memory.
- */
-/*#define HAS_MADVISE / **/
-
-/* HAS_MALLOC_SIZE:
- * This symbol, if defined, indicates that the malloc_size
- * routine is available for use.
- */
-/*#define HAS_MALLOC_SIZE / **/
-
-/* HAS_MALLOC_GOOD_SIZE:
- * This symbol, if defined, indicates that the malloc_good_size
- * routine is available for use.
- */
-/*#define HAS_MALLOC_GOOD_SIZE / **/
-
-/* HAS_MKDTEMP:
- * This symbol, if defined, indicates that the mkdtemp routine is
- * available to exclusively create a uniquely named temporary directory.
- */
-/*#define HAS_MKDTEMP / **/
-
-/* HAS_MKSTEMPS:
- * This symbol, if defined, indicates that the mkstemps routine is
- * available to excluslvely create and open a uniquely named
- * (with a suffix) temporary file.
- */
-/*#define HAS_MKSTEMPS / **/
-
-/* HAS_MODFL:
- * This symbol, if defined, indicates that the modfl routine is
- * available to split a long double x into a fractional part f and
- * an integer part i such that |f| < 1.0 and (f + i) = x.
- */
-/* HAS_MODFL_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the modfl() function. Otherwise, it is up
- * to the program to supply one.
- */
-/* HAS_MODFL_POW32_BUG:
- * This symbol, if defined, indicates that the modfl routine is
- * broken for long doubles >= pow(2, 32).
- * For example from 4294967303.150000 one would get 4294967302.000000
- * and 1.150000. The bug has been seen in certain versions of glibc,
- * release 2.2.2 is known to be okay.
- */
-/*#define HAS_MODFL / **/
-/*#define HAS_MODFL_PROTO / **/
-/*#define HAS_MODFL_POW32_BUG / **/
-
-/* HAS_MPROTECT:
- * This symbol, if defined, indicates that the mprotect system call is
- * available to modify the access protection of a memory mapped file.
- */
-/*#define HAS_MPROTECT / **/
-
-/* HAS_STRUCT_MSGHDR:
- * This symbol, if defined, indicates that the struct msghdr
- * is supported.
- */
-/*#define HAS_STRUCT_MSGHDR / **/
-
-/* HAS_NL_LANGINFO:
- * This symbol, if defined, indicates that the nl_langinfo routine is
- * available to return local data. You will also need <langinfo.h>
- * and therefore I_LANGINFO.
- */
-/*#define HAS_NL_LANGINFO / **/
-
-/* HAS_OFF64_T:
- * This symbol will be defined if the C compiler supports off64_t.
- */
-/*#define HAS_OFF64_T / **/
-
-/* HAS_PROCSELFEXE:
- * This symbol is defined if PROCSELFEXE_PATH is a symlink
- * to the absolute pathname of the executing program.
- */
-/* PROCSELFEXE_PATH:
- * If HAS_PROCSELFEXE is defined this symbol is the filename
- * of the symbolic link pointing to the absolute pathname of
- * the executing program.
- */
-/*#define HAS_PROCSELFEXE / **/
-#if defined(HAS_PROCSELFEXE) && !defined(PROCSELFEXE_PATH)
-#define PROCSELFEXE_PATH /**/
-#endif
-
-/* HAS_PTHREAD_ATTR_SETSCOPE:
- * This symbol, if defined, indicates that the pthread_attr_setscope
- * system call is available to set the contention scope attribute of
- * a thread attribute object.
- */
-/*#define HAS_PTHREAD_ATTR_SETSCOPE / **/
-
-/* HAS_READV:
- * This symbol, if defined, indicates that the readv routine is
- * available to do gather reads. You will also need <sys/uio.h>
- * and there I_SYSUIO.
- */
-/*#define HAS_READV / **/
-
-/* HAS_RECVMSG:
- * This symbol, if defined, indicates that the recvmsg routine is
- * available to send structured socket messages.
- */
-/*#define HAS_RECVMSG / **/
-
-/* HAS_SBRK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the sbrk() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern void* sbrk(int);
- * extern void* sbrk(size_t);
- */
-/*#define HAS_SBRK_PROTO / **/
-
-/* HAS_SCALBNL:
- * This symbol, if defined, indicates that the scalbnl routine is
- * available. If ilogbl is also present we can emulate frexpl.
- */
-/*#define HAS_SCALBNL / **/
-
-/* HAS_SENDMSG:
- * This symbol, if defined, indicates that the sendmsg routine is
- * available to send structured socket messages.
- */
-/*#define HAS_SENDMSG / **/
-
-/* HAS_SETITIMER:
- * This symbol, if defined, indicates that the setitimer routine is
- * available to set interval timers.
- */
-/*#define HAS_SETITIMER / **/
-
-/* HAS_SETPROCTITLE:
- * This symbol, if defined, indicates that the setproctitle routine is
- * available to set process title.
- */
-/*#define HAS_SETPROCTITLE / **/
-
-/* USE_SFIO:
- * This symbol, if defined, indicates that sfio should
- * be used.
- */
-/*#define USE_SFIO / **/
-
-/* HAS_SIGNBIT:
- * This symbol, if defined, indicates that the signbit routine is
- * available to check if the given number has the sign bit set.
- * This should include correct testing of -0.0. This will only be set
- * if the signbit() routine is safe to use with the NV type used internally
- * in perl. Users should call Perl_signbit(), which will be #defined to
- * the system's signbit() function or macro if this symbol is defined.
- */
-/*#define HAS_SIGNBIT / **/
-
-/* HAS_SIGPROCMASK:
- * This symbol, if defined, indicates that the sigprocmask
- * system call is available to examine or change the signal mask
- * of the calling process.
- */
-/*#define HAS_SIGPROCMASK / **/
-
-/* USE_SITECUSTOMIZE:
- * This symbol, if defined, indicates that sitecustomize should
- * be used.
- */
-#ifndef USE_SITECUSTOMIZE
-/*#define USE_SITECUSTOMIZE / **/
-#endif
-
-/* HAS_SNPRINTF:
- * This symbol, if defined, indicates that the snprintf () library
- * function is available for use.
- */
-/* HAS_VSNPRINTF:
- * This symbol, if defined, indicates that the vsnprintf () library
- * function is available for use.
- */
-#define HAS_SNPRINTF /**/
-#define HAS_VSNPRINTF /**/
-
-/* HAS_SOCKATMARK:
- * This symbol, if defined, indicates that the sockatmark routine is
- * available to test whether a socket is at the out-of-band mark.
- */
-/*#define HAS_SOCKATMARK / **/
-
-/* HAS_SOCKATMARK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the sockatmark() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int sockatmark(int);
- */
-/*#define HAS_SOCKATMARK_PROTO / **/
-
-/* HAS_SOCKS5_INIT:
- * This symbol, if defined, indicates that the socks5_init routine is
- * available to initialize SOCKS 5.
- */
-/*#define HAS_SOCKS5_INIT / **/
-
-/* SPRINTF_RETURNS_STRLEN:
- * This variable defines whether sprintf returns the length of the string
- * (as per the ANSI spec). Some C libraries retain compatibility with
- * pre-ANSI C and return a pointer to the passed in buffer; for these
- * this variable will be undef.
- */
-#define SPRINTF_RETURNS_STRLEN /**/
-
-/* HAS_SQRTL:
- * This symbol, if defined, indicates that the sqrtl routine is
- * available to do long double square roots.
- */
-/*#define HAS_SQRTL / **/
-
-/* HAS_SETRESGID_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the setresgid() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern int setresgid(uid_t ruid, uid_t euid, uid_t suid);
- */
-/*#define HAS_SETRESGID_PROTO / **/
-
-/* HAS_SETRESUID_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the setresuid() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern int setresuid(uid_t ruid, uid_t euid, uid_t suid);
- */
-/*#define HAS_SETRESUID_PROTO / **/
-
-/* HAS_STRUCT_STATFS_F_FLAGS:
- * This symbol, if defined, indicates that the struct statfs
- * does have the f_flags member containing the mount flags of
- * the filesystem containing the file.
- * This kind of struct statfs is coming from <sys/mount.h> (BSD 4.3),
- * not from <sys/statfs.h> (SYSV). Older BSDs (like Ultrix) do not
- * have statfs() and struct statfs, they have ustat() and getmnt()
- * with struct ustat and struct fs_data.
- */
-/*#define HAS_STRUCT_STATFS_F_FLAGS / **/
-
-/* HAS_STRUCT_STATFS:
- * This symbol, if defined, indicates that the struct statfs
- * to do statfs() is supported.
- */
-/*#define HAS_STRUCT_STATFS / **/
-
-/* HAS_FSTATVFS:
- * This symbol, if defined, indicates that the fstatvfs routine is
- * available to stat filesystems by file descriptors.
- */
-/*#define HAS_FSTATVFS / **/
-
-/* HAS_STRFTIME:
- * This symbol, if defined, indicates that the strftime routine is
- * available to do time formatting.
- */
-#define HAS_STRFTIME /**/
-
-/* HAS_STRLCAT:
- * This symbol, if defined, indicates that the strlcat () routine is
- * available to do string concatenation.
- */
-/*#define HAS_STRLCAT / **/
-
-/* HAS_STRLCPY:
- * This symbol, if defined, indicates that the strlcpy () routine is
- * available to do string copying.
- */
-/*#define HAS_STRLCPY / **/
-
-/* HAS_STRTOLD:
- * This symbol, if defined, indicates that the strtold routine is
- * available to convert strings to long doubles.
- */
-/*#define HAS_STRTOLD / **/
-
-/* HAS_STRTOLL:
- * This symbol, if defined, indicates that the strtoll routine is
- * available to convert strings to long longs.
- */
-#define HAS_STRTOLL /**/
-
-/* HAS_STRTOQ:
- * This symbol, if defined, indicates that the strtoq routine is
- * available to convert strings to long longs (quads).
- */
-/*#define HAS_STRTOQ / **/
-
-/* HAS_STRTOULL:
- * This symbol, if defined, indicates that the strtoull routine is
- * available to convert strings to unsigned long longs.
- */
-#define HAS_STRTOULL /**/
-
-/* HAS_STRTOUQ:
- * This symbol, if defined, indicates that the strtouq routine is
- * available to convert strings to unsigned long longs (quads).
- */
-/*#define HAS_STRTOUQ / **/
-
-/* HAS_SYSCALL_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the syscall() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern int syscall(int, ...);
- * extern int syscall(long, ...);
- */
-/*#define HAS_SYSCALL_PROTO / **/
-
-/* HAS_TELLDIR_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the telldir() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern long telldir(DIR*);
- */
-#define HAS_TELLDIR_PROTO /**/
-
-/* HAS_CTIME64:
- * This symbol, if defined, indicates that the ctime64 () routine is
- * available to do the 64bit variant of ctime ()
- */
-/* HAS_LOCALTIME64:
- * This symbol, if defined, indicates that the localtime64 () routine is
- * available to do the 64bit variant of localtime ()
- */
-/* HAS_GMTIME64:
- * This symbol, if defined, indicates that the gmtime64 () routine is
- * available to do the 64bit variant of gmtime ()
- */
-/* HAS_MKTIME64:
- * This symbol, if defined, indicates that the mktime64 () routine is
- * available to do the 64bit variant of mktime ()
- */
-/* HAS_DIFFTIME64:
- * This symbol, if defined, indicates that the difftime64 () routine is
- * available to do the 64bit variant of difftime ()
- */
-/* HAS_ASCTIME64:
- * This symbol, if defined, indicates that the asctime64 () routine is
- * available to do the 64bit variant of asctime ()
- */
-/*#define HAS_CTIME64 / **/
-/*#define HAS_LOCALTIME64 / **/
-/*#define HAS_GMTIME64 / **/
-/*#define HAS_MKTIME64 / **/
-/*#define HAS_DIFFTIME64 / **/
-/*#define HAS_ASCTIME64 / **/
-
-/* HAS_TIMEGM:
- * This symbol, if defined, indicates that the timegm routine is
- * available to do the opposite of gmtime ()
- */
-/*#define HAS_TIMEGM / **/
-
-/* U32_ALIGNMENT_REQUIRED:
- * This symbol, if defined, indicates that you must access
- * character data through U32-aligned pointers.
- */
-#ifndef U32_ALIGNMENT_REQUIRED
-#define U32_ALIGNMENT_REQUIRED /**/
-#endif
-
-/* HAS_UALARM:
- * This symbol, if defined, indicates that the ualarm routine is
- * available to do alarms with microsecond granularity.
- */
-/*#define HAS_UALARM / **/
-
-/* HAS_UNORDERED:
- * This symbol, if defined, indicates that the unordered routine is
- * available to check whether two doubles are unordered
- * (effectively: whether either of them is NaN)
- */
-/*#define HAS_UNORDERED / **/
-
-/* HAS_UNSETENV:
- * This symbol, if defined, indicates that the unsetenv () routine is
- * available for use.
- */
-/*#define HAS_UNSETENV / **/
-
-/* HAS_USLEEP_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the usleep() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int usleep(useconds_t);
- */
-/*#define HAS_USLEEP_PROTO / **/
-
-/* HAS_USTAT:
- * This symbol, if defined, indicates that the ustat system call is
- * available to query file system statistics by dev_t.
- */
-/*#define HAS_USTAT / **/
-
-/* HAS_WRITEV:
- * This symbol, if defined, indicates that the writev routine is
- * available to do scatter writes.
- */
-/*#define HAS_WRITEV / **/
-
-/* USE_DYNAMIC_LOADING:
- * This symbol, if defined, indicates that dynamic loading of
- * some sort is available.
- */
-#define USE_DYNAMIC_LOADING /**/
-
-/* FFLUSH_NULL:
- * This symbol, if defined, tells that fflush(NULL) does flush
- * all pending stdio output.
- */
-/* FFLUSH_ALL:
- * This symbol, if defined, tells that to flush
- * all pending stdio output one must loop through all
- * the stdio file handles stored in an array and fflush them.
- * Note that if fflushNULL is defined, fflushall will not
- * even be probed for and will be left undefined.
- */
-#define FFLUSH_NULL /**/
-/*#define FFLUSH_ALL / **/
-
-/* I_ASSERT:
- * This symbol, if defined, indicates that <assert.h> exists and
- * could be included by the C program to get the assert() macro.
- */
-#define I_ASSERT /**/
-
-/* I_CRYPT:
- * This symbol, if defined, indicates that <crypt.h> exists and
- * should be included.
- */
-/*#define I_CRYPT / **/
-
-/* DB_Prefix_t:
- * This symbol contains the type of the prefix structure element
- * in the <db.h> header file. In older versions of DB, it was
- * int, while in newer ones it is u_int32_t.
- */
-/* DB_Hash_t:
- * This symbol contains the type of the prefix structure element
- * in the <db.h> header file. In older versions of DB, it was
- * int, while in newer ones it is size_t.
- */
-/* DB_VERSION_MAJOR_CFG:
- * This symbol, if defined, defines the major version number of
- * Berkeley DB found in the <db.h> header when Perl was configured.
- */
-/* DB_VERSION_MINOR_CFG:
- * This symbol, if defined, defines the minor version number of
- * Berkeley DB found in the <db.h> header when Perl was configured.
- * For DB version 1 this is always 0.
- */
-/* DB_VERSION_PATCH_CFG:
- * This symbol, if defined, defines the patch version number of
- * Berkeley DB found in the <db.h> header when Perl was configured.
- * For DB version 1 this is always 0.
- */
-#define DB_Hash_t int /**/
-#define DB_Prefix_t int /**/
-#define DB_VERSION_MAJOR_CFG 0 /**/
-#define DB_VERSION_MINOR_CFG 0 /**/
-#define DB_VERSION_PATCH_CFG 0 /**/
-
-/* I_FP:
- * This symbol, if defined, indicates that <fp.h> exists and
- * should be included.
- */
-/*#define I_FP / **/
-
-/* I_FP_CLASS:
- * This symbol, if defined, indicates that <fp_class.h> exists and
- * should be included.
- */
-/*#define I_FP_CLASS / **/
-
-/* I_IEEEFP:
- * This symbol, if defined, indicates that <ieeefp.h> exists and
- * should be included.
- */
-/*#define I_IEEEFP / **/
-
-/* I_INTTYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <inttypes.h>.
- */
-/*#define I_INTTYPES / **/
-
-/* I_LANGINFO:
- * This symbol, if defined, indicates that <langinfo.h> exists and
- * should be included.
- */
-/*#define I_LANGINFO / **/
-
-/* I_LIBUTIL:
- * This symbol, if defined, indicates that <libutil.h> exists and
- * should be included.
- */
-/*#define I_LIBUTIL / **/
-
-/* I_MALLOCMALLOC:
- * This symbol, if defined, indicates to the C program that it should
- * include <malloc/malloc.h>.
- */
-/*#define I_MALLOCMALLOC / **/
-
-/* I_MNTENT:
- * This symbol, if defined, indicates that <mntent.h> exists and
- * should be included.
- */
-/*#define I_MNTENT / **/
-
-/* I_NETINET_TCP:
- * This symbol, if defined, indicates to the C program that it should
- * include <netinet/tcp.h>.
- */
-/*#define I_NETINET_TCP / **/
-
-/* I_POLL:
- * This symbol, if defined, indicates that <poll.h> exists and
- * should be included. (see also HAS_POLL)
- */
-/*#define I_POLL / **/
-
-/* I_PROT:
- * This symbol, if defined, indicates that <prot.h> exists and
- * should be included.
- */
-/*#define I_PROT / **/
-
-/* I_SHADOW:
- * This symbol, if defined, indicates that <shadow.h> exists and
- * should be included.
- */
-/*#define I_SHADOW / **/
-
-/* I_SOCKS:
- * This symbol, if defined, indicates that <socks.h> exists and
- * should be included.
- */
-/*#define I_SOCKS / **/
-
-/* I_SUNMATH:
- * This symbol, if defined, indicates that <sunmath.h> exists and
- * should be included.
- */
-/*#define I_SUNMATH / **/
-
-/* I_SYSLOG:
- * This symbol, if defined, indicates that <syslog.h> exists and
- * should be included.
- */
-/*#define I_SYSLOG / **/
-
-/* I_SYSMODE:
- * This symbol, if defined, indicates that <sys/mode.h> exists and
- * should be included.
- */
-/*#define I_SYSMODE / **/
-
-/* I_SYS_MOUNT:
- * This symbol, if defined, indicates that <sys/mount.h> exists and
- * should be included.
- */
-/*#define I_SYS_MOUNT / **/
-
-/* I_SYS_STATFS:
- * This symbol, if defined, indicates that <sys/statfs.h> exists.
- */
-/*#define I_SYS_STATFS / **/
-
-/* I_SYS_STATVFS:
- * This symbol, if defined, indicates that <sys/statvfs.h> exists and
- * should be included.
- */
-/*#define I_SYS_STATVFS / **/
-
-/* I_SYSUTSNAME:
- * This symbol, if defined, indicates that <sys/utsname.h> exists and
- * should be included.
- */
-/*#define I_SYSUTSNAME / **/
-
-/* I_SYS_VFS:
- * This symbol, if defined, indicates that <sys/vfs.h> exists and
- * should be included.
- */
-/*#define I_SYS_VFS / **/
-
-/* I_USTAT:
- * This symbol, if defined, indicates that <ustat.h> exists and
- * should be included.
- */
-/*#define I_USTAT / **/
-
-/* PERL_PRIfldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'f') for output.
- */
-/* PERL_PRIgldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'g') for output.
- */
-/* PERL_PRIeldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'e') for output.
- */
-/* PERL_SCNfldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'f') for input.
- */
-/*#define PERL_PRIfldbl "f" / **/
-/*#define PERL_PRIgldbl "g" / **/
-/*#define PERL_PRIeldbl "e" / **/
-/*#define PERL_SCNfldbl "f" / **/
-
-/* PERL_MAD:
- * This symbol, if defined, indicates that the Misc Attribution
- * Declaration code should be conditionally compiled.
- */
-/*#define PERL_MAD / **/
-
-/* NEED_VA_COPY:
- * This symbol, if defined, indicates that the system stores
- * the variable argument list datatype, va_list, in a format
- * that cannot be copied by simple assignment, so that some
- * other means must be used when copying is required.
- * As such systems vary in their provision (or non-provision)
- * of copying mechanisms, handy.h defines a platform-
- * independent macro, Perl_va_copy(src, dst), to do the job.
- */
-/*#define NEED_VA_COPY / **/
-
-/* IVTYPE:
- * This symbol defines the C type used for Perl's IV.
- */
-/* UVTYPE:
- * This symbol defines the C type used for Perl's UV.
- */
-/* I8TYPE:
- * This symbol defines the C type used for Perl's I8.
- */
-/* U8TYPE:
- * This symbol defines the C type used for Perl's U8.
- */
-/* I16TYPE:
- * This symbol defines the C type used for Perl's I16.
- */
-/* U16TYPE:
- * This symbol defines the C type used for Perl's U16.
- */
-/* I32TYPE:
- * This symbol defines the C type used for Perl's I32.
- */
-/* U32TYPE:
- * This symbol defines the C type used for Perl's U32.
- */
-/* I64TYPE:
- * This symbol defines the C type used for Perl's I64.
- */
-/* U64TYPE:
- * This symbol defines the C type used for Perl's U64.
- */
-/* NVTYPE:
- * This symbol defines the C type used for Perl's NV.
- */
-/* IVSIZE:
- * This symbol contains the sizeof(IV).
- */
-/* UVSIZE:
- * This symbol contains the sizeof(UV).
- */
-/* I8SIZE:
- * This symbol contains the sizeof(I8).
- */
-/* U8SIZE:
- * This symbol contains the sizeof(U8).
- */
-/* I16SIZE:
- * This symbol contains the sizeof(I16).
- */
-/* U16SIZE:
- * This symbol contains the sizeof(U16).
- */
-/* I32SIZE:
- * This symbol contains the sizeof(I32).
- */
-/* U32SIZE:
- * This symbol contains the sizeof(U32).
- */
-/* I64SIZE:
- * This symbol contains the sizeof(I64).
- */
-/* U64SIZE:
- * This symbol contains the sizeof(U64).
- */
-/* NVSIZE:
- * This symbol contains the sizeof(NV).
- */
-/* NV_PRESERVES_UV:
- * This symbol, if defined, indicates that a variable of type NVTYPE
- * can preserve all the bits of a variable of type UVTYPE.
- */
-/* NV_PRESERVES_UV_BITS:
- * This symbol contains the number of bits a variable of type NVTYPE
- * can preserve of a variable of type UVTYPE.
- */
-/* NV_OVERFLOWS_INTEGERS_AT:
- * This symbol gives the largest integer value that NVs can hold. This
- * value + 1.0 cannot be stored accurately. It is expressed as constant
- * floating point expression to reduce the chance of decimale/binary
- * conversion issues. If it can not be determined, the value 0 is given.
- */
-/* NV_ZERO_IS_ALLBITS_ZERO:
- * This symbol, if defined, indicates that a variable of type NVTYPE
- * stores 0.0 in memory as all bits zero.
- */
-#ifdef _MSC_VER
-# define IVTYPE __int64 /**/
-# define UVTYPE unsigned __int64 /**/
-#else
-# define IVTYPE long long /**/
-# define UVTYPE unsigned long long /**/
-#endif
-#define I8TYPE char /**/
-#define U8TYPE unsigned char /**/
-#define I16TYPE short /**/
-#define U16TYPE unsigned short /**/
-#define I32TYPE long /**/
-#define U32TYPE unsigned long /**/
-#ifdef HAS_QUAD
-# ifdef _MSC_VER
-# define I64TYPE __int64 /**/
-# define U64TYPE unsigned __int64 /**/
-# else
-# define I64TYPE long long /**/
-# define U64TYPE unsigned long long /**/
-# endif
-#endif
-#define NVTYPE double /**/
-#define IVSIZE 8 /**/
-#define UVSIZE 8 /**/
-#define I8SIZE 1 /**/
-#define U8SIZE 1 /**/
-#define I16SIZE 2 /**/
-#define U16SIZE 2 /**/
-#define I32SIZE 4 /**/
-#define U32SIZE 4 /**/
-#ifdef HAS_QUAD
-#define I64SIZE 8 /**/
-#define U64SIZE 8 /**/
-#endif
-#define NVSIZE 8 /**/
-#undef NV_PRESERVES_UV
-#define NV_PRESERVES_UV_BITS 53
-#define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0
-#define NV_ZERO_IS_ALLBITS_ZERO
-#if UVSIZE == 8
-# ifdef BYTEORDER
-# if BYTEORDER == 0x1234
-# undef BYTEORDER
-# define BYTEORDER 0x12345678
-# else
-# if BYTEORDER == 0x4321
-# undef BYTEORDER
-# define BYTEORDER 0x87654321
-# endif
-# endif
-# endif
-#endif
-
-/* IVdf:
- * This symbol defines the format string used for printing a Perl IV
- * as a signed decimal integer.
- */
-/* UVuf:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned decimal integer.
- */
-/* UVof:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned octal integer.
- */
-/* UVxf:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned hexadecimal integer in lowercase abcdef.
- */
-/* UVXf:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned hexadecimal integer in uppercase ABCDEF.
- */
-/* NVef:
- * This symbol defines the format string used for printing a Perl NV
- * using %e-ish floating point format.
- */
-/* NVff:
- * This symbol defines the format string used for printing a Perl NV
- * using %f-ish floating point format.
- */
-/* NVgf:
- * This symbol defines the format string used for printing a Perl NV
- * using %g-ish floating point format.
- */
-#define IVdf "I64d" /**/
-#define UVuf "I64u" /**/
-#define UVof "I64o" /**/
-#define UVxf "I64x" /**/
-#define UVXf "I64X" /**/
-#define NVef "e" /**/
-#define NVff "f" /**/
-#define NVgf "g" /**/
-
-/* SELECT_MIN_BITS:
- * This symbol holds the minimum number of bits operated by select.
- * That is, if you do select(n, ...), how many bits at least will be
- * cleared in the masks if some activity is detected. Usually this
- * is either n or 32*ceil(n/32), especially many little-endians do
- * the latter. This is only useful if you have select(), naturally.
- */
-#define SELECT_MIN_BITS 32 /**/
-
-/* STARTPERL:
- * This variable contains the string to put in front of a perl
- * script to make sure (one hopes) that it runs with perl and not
- * some shell.
- */
-#define STARTPERL "#!perl" /**/
-
-/* HAS_STDIO_STREAM_ARRAY:
- * This symbol, if defined, tells that there is an array
- * holding the stdio streams.
- */
-/* STDIO_STREAM_ARRAY:
- * This symbol tells the name of the array holding the stdio streams.
- * Usual values include _iob, __iob, and __sF.
- */
-/*#define HAS_STDIO_STREAM_ARRAY / **/
-#ifdef HAS_STDIO_STREAM_ARRAY
-#define STDIO_STREAM_ARRAY
-#endif
-
-/* GMTIME_MAX:
- * This symbol contains the maximum value for the time_t offset that
- * the system function gmtime () accepts, and defaults to 0
- */
-/* GMTIME_MIN:
- * This symbol contains the minimum value for the time_t offset that
- * the system function gmtime () accepts, and defaults to 0
- */
-/* LOCALTIME_MAX:
- * This symbol contains the maximum value for the time_t offset that
- * the system function localtime () accepts, and defaults to 0
- */
-/* LOCALTIME_MIN:
- * This symbol contains the minimum value for the time_t offset that
- * the system function localtime () accepts, and defaults to 0
- */
-#define GMTIME_MAX 2147483647 /**/
-#define GMTIME_MIN 0 /**/
-#define LOCALTIME_MAX 2147483647 /**/
-#define LOCALTIME_MIN 0 /**/
-
-/* USE_64_BIT_INT:
- * This symbol, if defined, indicates that 64-bit integers should
- * be used when available. If not defined, the native integers
- * will be employed (be they 32 or 64 bits). The minimal possible
- * 64-bitness is used, just enough to get 64-bit integers into Perl.
- * This may mean using for example "long longs", while your memory
- * may still be limited to 2 gigabytes.
- */
-/* USE_64_BIT_ALL:
- * This symbol, if defined, indicates that 64-bit integers should
- * be used when available. If not defined, the native integers
- * will be used (be they 32 or 64 bits). The maximal possible
- * 64-bitness is employed: LP64 or ILP64, meaning that you will
- * be able to use more than 2 gigabytes of memory. This mode is
- * even more binary incompatible than USE_64_BIT_INT. You may not
- * be able to run the resulting executable in a 32-bit CPU at all or
- * you may need at least to reboot your OS to 64-bit mode.
- */
-#ifndef USE_64_BIT_INT
-#define USE_64_BIT_INT /**/
-#endif
-#ifndef USE_64_BIT_ALL
-/*#define USE_64_BIT_ALL / **/
-#endif
-
-/* USE_DTRACE:
- * This symbol, if defined, indicates that Perl should
- * be built with support for DTrace.
- */
-/*#define USE_DTRACE / **/
-
-/* USE_FAST_STDIO:
- * This symbol, if defined, indicates that Perl should
- * be built to use 'fast stdio'.
- * Defaults to define in Perls 5.8 and earlier, to undef later.
- */
-#ifndef USE_FAST_STDIO
-/*#define USE_FAST_STDIO / **/
-#endif
-
-/* USE_LARGE_FILES:
- * This symbol, if defined, indicates that large file support
- * should be used when available.
- */
-#ifndef USE_LARGE_FILES
-#define USE_LARGE_FILES /**/
-#endif
-
-/* USE_LONG_DOUBLE:
- * This symbol, if defined, indicates that long doubles should
- * be used when available.
- */
-#ifndef USE_LONG_DOUBLE
-/*#define USE_LONG_DOUBLE / **/
-#endif
-
-/* USE_MORE_BITS:
- * This symbol, if defined, indicates that 64-bit interfaces and
- * long doubles should be used when available.
- */
-#ifndef USE_MORE_BITS
-/*#define USE_MORE_BITS / **/
-#endif
-
-/* MULTIPLICITY:
- * This symbol, if defined, indicates that Perl should
- * be built to use multiplicity.
- */
-#ifndef MULTIPLICITY
-#define MULTIPLICITY /**/
-#endif
-
-/* USE_PERLIO:
- * This symbol, if defined, indicates that the PerlIO abstraction should
- * be used throughout. If not defined, stdio should be
- * used in a fully backward compatible manner.
- */
-#ifndef USE_PERLIO
-#define USE_PERLIO /**/
-#endif
-
-/* USE_SOCKS:
- * This symbol, if defined, indicates that Perl should
- * be built to use socks.
- */
-#ifndef USE_SOCKS
-/*#define USE_SOCKS / **/
-#endif
-
-#endif
Deleted: vendor/perl/dist/win32/config_H.gc64nox
===================================================================
--- vendor/perl/dist/win32/config_H.gc64nox 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/config_H.gc64nox 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,4719 +0,0 @@
-/*
- * This file was produced by running the config_h.SH script, which
- * gets its values from undef, which is generally produced by
- * running Configure.
- *
- * Feel free to modify any of this as the need arises. Note, however,
- * that running config_h.SH again will wipe out any changes you've made.
- * For a more permanent change edit undef and rerun config_h.SH.
- *
- * $Id: config_H.gc64nox,v 1.1.1.1 2011-05-19 23:03:36 laffer1 Exp $
- */
-
-/*
- * Package name : perl5
- * Source directory :
- * Configuration time: Sun Jan 10 19:53:56 2010
- * Configured by : Steve
- * Target system :
- */
-
-#ifndef _config_h_
-#define _config_h_
-
-/* LOC_SED:
- * This symbol holds the complete pathname to the sed program.
- */
-#define LOC_SED "" /**/
-
-/* HAS_ALARM:
- * This symbol, if defined, indicates that the alarm routine is
- * available.
- */
-#define HAS_ALARM /**/
-
-/* HAS_BCMP:
- * This symbol is defined if the bcmp() routine is available to
- * compare blocks of memory.
- */
-/*#define HAS_BCMP / **/
-
-/* HAS_BCOPY:
- * This symbol is defined if the bcopy() routine is available to
- * copy blocks of memory.
- */
-/*#define HAS_BCOPY / **/
-
-/* HAS_BZERO:
- * This symbol is defined if the bzero() routine is available to
- * set a memory block to 0.
- */
-/*#define HAS_BZERO / **/
-
-/* HAS_CHOWN:
- * This symbol, if defined, indicates that the chown routine is
- * available.
- */
-/*#define HAS_CHOWN / **/
-
-/* HAS_CHROOT:
- * This symbol, if defined, indicates that the chroot routine is
- * available.
- */
-/*#define HAS_CHROOT / **/
-
-/* HAS_CHSIZE:
- * This symbol, if defined, indicates that the chsize routine is available
- * to truncate files. You might need a -lx to get this routine.
- */
-#define HAS_CHSIZE /**/
-
-/* HAS_CRYPT:
- * This symbol, if defined, indicates that the crypt routine is available
- * to encrypt passwords and the like.
- */
-/*#define HAS_CRYPT / **/
-
-/* HAS_CTERMID:
- * This symbol, if defined, indicates that the ctermid routine is
- * available to generate filename for terminal.
- */
-/*#define HAS_CTERMID / **/
-
-/* HAS_CUSERID:
- * This symbol, if defined, indicates that the cuserid routine is
- * available to get character login names.
- */
-/*#define HAS_CUSERID / **/
-
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-#define HAS_DBL_DIG /**/
-
-/* HAS_DIFFTIME:
- * This symbol, if defined, indicates that the difftime routine is
- * available.
- */
-#define HAS_DIFFTIME /**/
-
-/* HAS_DLERROR:
- * This symbol, if defined, indicates that the dlerror routine is
- * available to return a string describing the last error that
- * occurred from a call to dlopen(), dlclose() or dlsym().
- */
-#define HAS_DLERROR /**/
-
-/* HAS_DUP2:
- * This symbol, if defined, indicates that the dup2 routine is
- * available to duplicate file descriptors.
- */
-#define HAS_DUP2 /**/
-
-/* HAS_FCHMOD:
- * This symbol, if defined, indicates that the fchmod routine is available
- * to change mode of opened files. If unavailable, use chmod().
- */
-/*#define HAS_FCHMOD / **/
-
-/* HAS_FCHOWN:
- * This symbol, if defined, indicates that the fchown routine is available
- * to change ownership of opened files. If unavailable, use chown().
- */
-/*#define HAS_FCHOWN / **/
-
-/* HAS_FCNTL:
- * This symbol, if defined, indicates to the C program that
- * the fcntl() function exists.
- */
-/*#define HAS_FCNTL / **/
-
-/* HAS_FGETPOS:
- * This symbol, if defined, indicates that the fgetpos routine is
- * available to get the file position indicator, similar to ftell().
- */
-#define HAS_FGETPOS /**/
-
-/* HAS_FLOCK:
- * This symbol, if defined, indicates that the flock routine is
- * available to do file locking.
- */
-#define HAS_FLOCK /**/
-
-/* HAS_FORK:
- * This symbol, if defined, indicates that the fork routine is
- * available.
- */
-/*#define HAS_FORK / **/
-
-/* HAS_FSETPOS:
- * This symbol, if defined, indicates that the fsetpos routine is
- * available to set the file position indicator, similar to fseek().
- */
-#define HAS_FSETPOS /**/
-
-/* HAS_GETTIMEOFDAY:
- * This symbol, if defined, indicates that the gettimeofday() system
- * call is available for a sub-second accuracy clock. Usually, the file
- * <sys/resource.h> needs to be included (see I_SYS_RESOURCE).
- * The type "Timeval" should be used to refer to "struct timeval".
- */
-#define HAS_GETTIMEOFDAY /**/
-#ifdef HAS_GETTIMEOFDAY
-#define Timeval struct timeval /* Structure used by gettimeofday() */
-#endif
-
-/* HAS_GETGROUPS:
- * This symbol, if defined, indicates that the getgroups() routine is
- * available to get the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
-/*#define HAS_GETGROUPS / **/
-
-/* HAS_GETLOGIN:
- * This symbol, if defined, indicates that the getlogin routine is
- * available to get the login name.
- */
-#define HAS_GETLOGIN /**/
-
-/* HAS_GETPGID:
- * This symbol, if defined, indicates to the C program that
- * the getpgid(pid) function is available to get the
- * process group id.
- */
-/*#define HAS_GETPGID / **/
-
-/* HAS_GETPGRP2:
- * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
- * routine is available to get the current process group.
- */
-/*#define HAS_GETPGRP2 / **/
-
-/* HAS_GETPPID:
- * This symbol, if defined, indicates that the getppid routine is
- * available to get the parent process ID.
- */
-/*#define HAS_GETPPID / **/
-
-/* HAS_GETPRIORITY:
- * This symbol, if defined, indicates that the getpriority routine is
- * available to get a process's priority.
- */
-/*#define HAS_GETPRIORITY / **/
-
-/* HAS_INET_ATON:
- * This symbol, if defined, indicates to the C program that the
- * inet_aton() function is available to parse IP address "dotted-quad"
- * strings.
- */
-/*#define HAS_INET_ATON / **/
-
-/* HAS_KILLPG:
- * This symbol, if defined, indicates that the killpg routine is available
- * to kill process groups. If unavailable, you probably should use kill
- * with a negative process number.
- */
-#define HAS_KILLPG /**/
-
-/* HAS_LINK:
- * This symbol, if defined, indicates that the link routine is
- * available to create hard links.
- */
-#define HAS_LINK /**/
-
-/* HAS_LOCALECONV:
- * This symbol, if defined, indicates that the localeconv routine is
- * available for numeric and monetary formatting conventions.
- */
-#define HAS_LOCALECONV /**/
-
-/* HAS_LOCKF:
- * This symbol, if defined, indicates that the lockf routine is
- * available to do file locking.
- */
-/*#define HAS_LOCKF / **/
-
-/* HAS_LSTAT:
- * This symbol, if defined, indicates that the lstat routine is
- * available to do file stats on symbolic links.
- */
-/*#define HAS_LSTAT / **/
-
-/* HAS_MBLEN:
- * This symbol, if defined, indicates that the mblen routine is available
- * to find the number of bytes in a multibye character.
- */
-#define HAS_MBLEN /**/
-
-/* HAS_MBSTOWCS:
- * This symbol, if defined, indicates that the mbstowcs routine is
- * available to covert a multibyte string into a wide character string.
- */
-#define HAS_MBSTOWCS /**/
-
-/* HAS_MBTOWC:
- * This symbol, if defined, indicates that the mbtowc routine is available
- * to covert a multibyte to a wide character.
- */
-#define HAS_MBTOWC /**/
-
-/* HAS_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * to compare blocks of memory.
- */
-#define HAS_MEMCMP /**/
-
-/* HAS_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy blocks of memory.
- */
-#define HAS_MEMCPY /**/
-
-/* HAS_MEMMOVE:
- * This symbol, if defined, indicates that the memmove routine is available
- * to copy potentially overlapping blocks of memory. This should be used
- * only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your
- * own version.
- */
-#define HAS_MEMMOVE /**/
-
-/* HAS_MEMSET:
- * This symbol, if defined, indicates that the memset routine is available
- * to set blocks of memory.
- */
-#define HAS_MEMSET /**/
-
-/* HAS_MKDIR:
- * This symbol, if defined, indicates that the mkdir routine is available
- * to create directories. Otherwise you should fork off a new process to
- * exec /bin/mkdir.
- */
-#define HAS_MKDIR /**/
-
-/* HAS_MKFIFO:
- * This symbol, if defined, indicates that the mkfifo routine is
- * available to create FIFOs. Otherwise, mknod should be able to
- * do it for you. However, if mkfifo is there, mknod might require
- * super-user privileges which mkfifo will not.
- */
-/*#define HAS_MKFIFO / **/
-
-/* HAS_MKTIME:
- * This symbol, if defined, indicates that the mktime routine is
- * available.
- */
-#define HAS_MKTIME /**/
-
-/* HAS_MSYNC:
- * This symbol, if defined, indicates that the msync system call is
- * available to synchronize a mapped file.
- */
-/*#define HAS_MSYNC / **/
-
-/* HAS_MUNMAP:
- * This symbol, if defined, indicates that the munmap system call is
- * available to unmap a region, usually mapped by mmap().
- */
-/*#define HAS_MUNMAP / **/
-
-/* HAS_NICE:
- * This symbol, if defined, indicates that the nice routine is
- * available.
- */
-/*#define HAS_NICE / **/
-
-/* HAS_PATHCONF:
- * This symbol, if defined, indicates that pathconf() is available
- * to determine file-system related limits and options associated
- * with a given filename.
- */
-/* HAS_FPATHCONF:
- * This symbol, if defined, indicates that pathconf() is available
- * to determine file-system related limits and options associated
- * with a given open file descriptor.
- */
-/*#define HAS_PATHCONF / **/
-/*#define HAS_FPATHCONF / **/
-
-/* HAS_PAUSE:
- * This symbol, if defined, indicates that the pause routine is
- * available to suspend a process until a signal is received.
- */
-#define HAS_PAUSE /**/
-
-/* HAS_PIPE:
- * This symbol, if defined, indicates that the pipe routine is
- * available to create an inter-process channel.
- */
-#define HAS_PIPE /**/
-
-/* HAS_POLL:
- * This symbol, if defined, indicates that the poll routine is
- * available to poll active file descriptors. Please check I_POLL and
- * I_SYS_POLL to know which header should be included as well.
- */
-/*#define HAS_POLL / **/
-
-/* HAS_READDIR:
- * This symbol, if defined, indicates that the readdir routine is
- * available to read directory entries. You may have to include
- * <dirent.h>. See I_DIRENT.
- */
-#define HAS_READDIR /**/
-
-/* HAS_SEEKDIR:
- * This symbol, if defined, indicates that the seekdir routine is
- * available. You may have to include <dirent.h>. See I_DIRENT.
- */
-#define HAS_SEEKDIR /**/
-
-/* HAS_TELLDIR:
- * This symbol, if defined, indicates that the telldir routine is
- * available. You may have to include <dirent.h>. See I_DIRENT.
- */
-#define HAS_TELLDIR /**/
-
-/* HAS_REWINDDIR:
- * This symbol, if defined, indicates that the rewinddir routine is
- * available. You may have to include <dirent.h>. See I_DIRENT.
- */
-#define HAS_REWINDDIR /**/
-
-/* HAS_READLINK:
- * This symbol, if defined, indicates that the readlink routine is
- * available to read the value of a symbolic link.
- */
-/*#define HAS_READLINK / **/
-
-/* HAS_RENAME:
- * This symbol, if defined, indicates that the rename routine is available
- * to rename files. Otherwise you should do the unlink(), link(), unlink()
- * trick.
- */
-#define HAS_RENAME /**/
-
-/* HAS_RMDIR:
- * This symbol, if defined, indicates that the rmdir routine is
- * available to remove directories. Otherwise you should fork off a
- * new process to exec /bin/rmdir.
- */
-#define HAS_RMDIR /**/
-
-/* HAS_SELECT:
- * This symbol, if defined, indicates that the select routine is
- * available to select active file descriptors. If the timeout field
- * is used, <sys/time.h> may need to be included.
- */
-#define HAS_SELECT /**/
-
-/* HAS_SETEGID:
- * This symbol, if defined, indicates that the setegid routine is available
- * to change the effective gid of the current program.
- */
-/*#define HAS_SETEGID / **/
-
-/* HAS_SETEUID:
- * This symbol, if defined, indicates that the seteuid routine is available
- * to change the effective uid of the current program.
- */
-/*#define HAS_SETEUID / **/
-
-/* HAS_SETGROUPS:
- * This symbol, if defined, indicates that the setgroups() routine is
- * available to set the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
-/*#define HAS_SETGROUPS / **/
-
-/* HAS_SETLINEBUF:
- * This symbol, if defined, indicates that the setlinebuf routine is
- * available to change stderr or stdout from block-buffered or unbuffered
- * to a line-buffered mode.
- */
-/*#define HAS_SETLINEBUF / **/
-
-/* HAS_SETLOCALE:
- * This symbol, if defined, indicates that the setlocale routine is
- * available to handle locale-specific ctype implementations.
- */
-#define HAS_SETLOCALE /**/
-
-/* HAS_SETPGID:
- * This symbol, if defined, indicates that the setpgid(pid, gpid)
- * routine is available to set process group ID.
- */
-/*#define HAS_SETPGID / **/
-
-/* HAS_SETPGRP2:
- * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
- * routine is available to set the current process group.
- */
-/*#define HAS_SETPGRP2 / **/
-
-/* HAS_SETPRIORITY:
- * This symbol, if defined, indicates that the setpriority routine is
- * available to set a process's priority.
- */
-/*#define HAS_SETPRIORITY / **/
-
-/* HAS_SETREGID:
- * This symbol, if defined, indicates that the setregid routine is
- * available to change the real and effective gid of the current
- * process.
- */
-/* HAS_SETRESGID:
- * This symbol, if defined, indicates that the setresgid routine is
- * available to change the real, effective and saved gid of the current
- * process.
- */
-/*#define HAS_SETREGID / **/
-/*#define HAS_SETRESGID / **/
-
-/* HAS_SETREUID:
- * This symbol, if defined, indicates that the setreuid routine is
- * available to change the real and effective uid of the current
- * process.
- */
-/* HAS_SETRESUID:
- * This symbol, if defined, indicates that the setresuid routine is
- * available to change the real, effective and saved uid of the current
- * process.
- */
-/*#define HAS_SETREUID / **/
-/*#define HAS_SETRESUID / **/
-
-/* HAS_SETRGID:
- * This symbol, if defined, indicates that the setrgid routine is available
- * to change the real gid of the current program.
- */
-/*#define HAS_SETRGID / **/
-
-/* HAS_SETRUID:
- * This symbol, if defined, indicates that the setruid routine is available
- * to change the real uid of the current program.
- */
-/*#define HAS_SETRUID / **/
-
-/* HAS_SETSID:
- * This symbol, if defined, indicates that the setsid routine is
- * available to set the process group ID.
- */
-/*#define HAS_SETSID / **/
-
-/* HAS_STRCHR:
- * This symbol is defined to indicate that the strchr()/strrchr()
- * functions are available for string searching. If not, try the
- * index()/rindex() pair.
- */
-/* HAS_INDEX:
- * This symbol is defined to indicate that the index()/rindex()
- * functions are available for string searching.
- */
-#define HAS_STRCHR /**/
-/*#define HAS_INDEX / **/
-
-/* HAS_STRCOLL:
- * This symbol, if defined, indicates that the strcoll routine is
- * available to compare strings using collating information.
- */
-#define HAS_STRCOLL /**/
-
-/* HAS_STRTOD:
- * This symbol, if defined, indicates that the strtod routine is
- * available to provide better numeric string conversion than atof().
- */
-#define HAS_STRTOD /**/
-
-/* HAS_STRTOL:
- * This symbol, if defined, indicates that the strtol routine is available
- * to provide better numeric string conversion than atoi() and friends.
- */
-#define HAS_STRTOL /**/
-
-/* HAS_STRXFRM:
- * This symbol, if defined, indicates that the strxfrm() routine is
- * available to transform strings.
- */
-#define HAS_STRXFRM /**/
-
-/* HAS_SYMLINK:
- * This symbol, if defined, indicates that the symlink routine is available
- * to create symbolic links.
- */
-/*#define HAS_SYMLINK / **/
-
-/* HAS_SYSCALL:
- * This symbol, if defined, indicates that the syscall routine is
- * available to call arbitrary system calls. If undefined, that's tough.
- */
-/*#define HAS_SYSCALL / **/
-
-/* HAS_SYSCONF:
- * This symbol, if defined, indicates that sysconf() is available
- * to determine system related limits and options.
- */
-/*#define HAS_SYSCONF / **/
-
-/* HAS_SYSTEM:
- * This symbol, if defined, indicates that the system routine is
- * available to issue a shell command.
- */
-#define HAS_SYSTEM /**/
-
-/* HAS_TCGETPGRP:
- * This symbol, if defined, indicates that the tcgetpgrp routine is
- * available to get foreground process group ID.
- */
-/*#define HAS_TCGETPGRP / **/
-
-/* HAS_TCSETPGRP:
- * This symbol, if defined, indicates that the tcsetpgrp routine is
- * available to set foreground process group ID.
- */
-/*#define HAS_TCSETPGRP / **/
-
-/* HAS_TRUNCATE:
- * This symbol, if defined, indicates that the truncate routine is
- * available to truncate files.
- */
-/*#define HAS_TRUNCATE / **/
-
-/* HAS_TZNAME:
- * This symbol, if defined, indicates that the tzname[] array is
- * available to access timezone names.
- */
-#define HAS_TZNAME /**/
-
-/* HAS_UMASK:
- * This symbol, if defined, indicates that the umask routine is
- * available to set and get the value of the file creation mask.
- */
-#define HAS_UMASK /**/
-
-/* HAS_USLEEP:
- * This symbol, if defined, indicates that the usleep routine is
- * available to let the process sleep on a sub-second accuracy.
- */
-/*#define HAS_USLEEP / **/
-
-/* HAS_WAIT4:
- * This symbol, if defined, indicates that wait4() exists.
- */
-/*#define HAS_WAIT4 / **/
-
-/* HAS_WAITPID:
- * This symbol, if defined, indicates that the waitpid routine is
- * available to wait for child process.
- */
-#define HAS_WAITPID /**/
-
-/* HAS_WCSTOMBS:
- * This symbol, if defined, indicates that the wcstombs routine is
- * available to convert wide character strings to multibyte strings.
- */
-#define HAS_WCSTOMBS /**/
-
-/* HAS_WCTOMB:
- * This symbol, if defined, indicates that the wctomb routine is available
- * to covert a wide character to a multibyte.
- */
-#define HAS_WCTOMB /**/
-
-/* Groups_t:
- * This symbol holds the type used for the second argument to
- * getgroups() and setgroups(). Usually, this is the same as
- * gidtype (gid_t) , but sometimes it isn't.
- * It can be int, ushort, gid_t, etc...
- * It may be necessary to include <sys/types.h> to get any
- * typedef'ed information. This is only required if you have
- * getgroups() or setgroups()..
- */
-#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
-#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */
-#endif
-
-/* I_ARPA_INET:
- * This symbol, if defined, indicates to the C program that it should
- * include <arpa/inet.h> to get inet_addr and friends declarations.
- */
-#define I_ARPA_INET /**/
-
-/* I_DBM:
- * This symbol, if defined, indicates that <dbm.h> exists and should
- * be included.
- */
-/* I_RPCSVC_DBM:
- * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
- * should be included.
- */
-/*#define I_DBM / **/
-#define I_RPCSVC_DBM /**/
-
-/* I_DLFCN:
- * This symbol, if defined, indicates that <dlfcn.h> exists and should
- * be included.
- */
-#define I_DLFCN /**/
-
-/* I_FCNTL:
- * This manifest constant tells the C program to include <fcntl.h>.
- */
-#define I_FCNTL /**/
-
-/* I_FLOAT:
- * This symbol, if defined, indicates to the C program that it should
- * include <float.h> to get definition of symbols like DBL_MAX or
- * DBL_MIN, i.e. machine dependent floating point values.
- */
-#define I_FLOAT /**/
-
-/* I_GDBM:
- * This symbol, if defined, indicates that <gdbm.h> exists and should
- * be included.
- */
-/*#define I_GDBM / **/
-
-/* I_LIMITS:
- * This symbol, if defined, indicates to the C program that it should
- * include <limits.h> to get definition of symbols like WORD_BIT or
- * LONG_MAX, i.e. machine dependant limitations.
- */
-#define I_LIMITS /**/
-
-/* I_LOCALE:
- * This symbol, if defined, indicates to the C program that it should
- * include <locale.h>.
- */
-#define I_LOCALE /**/
-
-/* I_MATH:
- * This symbol, if defined, indicates to the C program that it should
- * include <math.h>.
- */
-#define I_MATH /**/
-
-/* I_MEMORY:
- * This symbol, if defined, indicates to the C program that it should
- * include <memory.h>.
- */
-/*#define I_MEMORY / **/
-
-/* I_NETINET_IN:
- * This symbol, if defined, indicates to the C program that it should
- * include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
- */
-/*#define I_NETINET_IN / **/
-
-/* I_SFIO:
- * This symbol, if defined, indicates to the C program that it should
- * include <sfio.h>.
- */
-/*#define I_SFIO / **/
-
-/* I_STDDEF:
- * This symbol, if defined, indicates that <stddef.h> exists and should
- * be included.
- */
-#define I_STDDEF /**/
-
-/* I_STDLIB:
- * This symbol, if defined, indicates that <stdlib.h> exists and should
- * be included.
- */
-#define I_STDLIB /**/
-
-/* I_STRING:
- * This symbol, if defined, indicates to the C program that it should
- * include <string.h> (USG systems) instead of <strings.h> (BSD systems).
- */
-#define I_STRING /**/
-
-/* I_SYS_DIR:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/dir.h>.
- */
-/*#define I_SYS_DIR / **/
-
-/* I_SYS_FILE:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/file.h> to get definition of R_OK and friends.
- */
-/*#define I_SYS_FILE / **/
-
-/* I_SYS_IOCTL:
- * This symbol, if defined, indicates that <sys/ioctl.h> exists and should
- * be included. Otherwise, include <sgtty.h> or <termio.h>.
- */
-/* I_SYS_SOCKIO:
- * This symbol, if defined, indicates the <sys/sockio.h> should be included
- * to get socket ioctl options, like SIOCATMARK.
- */
-/*#define I_SYS_IOCTL / **/
-/*#define I_SYS_SOCKIO / **/
-
-/* I_SYS_NDIR:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/ndir.h>.
- */
-/*#define I_SYS_NDIR / **/
-
-/* I_SYS_PARAM:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/param.h>.
- */
-/*#define I_SYS_PARAM / **/
-
-/* I_SYS_POLL:
- * This symbol, if defined, indicates that the program may include
- * <sys/poll.h>. When I_POLL is also defined, it's probably safest
- * to only include <poll.h>.
- */
-/*#define I_SYS_POLL / **/
-
-/* I_SYS_RESOURCE:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/resource.h>.
- */
-/*#define I_SYS_RESOURCE / **/
-
-/* I_SYS_SELECT:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/select.h> in order to get definition of struct timeval.
- */
-/*#define I_SYS_SELECT / **/
-
-/* I_SYS_STAT:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/stat.h>.
- */
-#define I_SYS_STAT /**/
-
-/* I_SYS_TIMES:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/times.h>.
- */
-/*#define I_SYS_TIMES / **/
-
-/* I_SYS_TYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/types.h>.
- */
-#define I_SYS_TYPES /**/
-
-/* I_SYS_UN:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/un.h> to get UNIX domain socket definitions.
- */
-/*#define I_SYS_UN / **/
-
-/* I_SYS_WAIT:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/wait.h>.
- */
-/*#define I_SYS_WAIT / **/
-
-/* I_TERMIO:
- * This symbol, if defined, indicates that the program should include
- * <termio.h> rather than <sgtty.h>. There are also differences in
- * the ioctl() calls that depend on the value of this symbol.
- */
-/* I_TERMIOS:
- * This symbol, if defined, indicates that the program should include
- * the POSIX termios.h rather than sgtty.h or termio.h.
- * There are also differences in the ioctl() calls that depend on the
- * value of this symbol.
- */
-/* I_SGTTY:
- * This symbol, if defined, indicates that the program should include
- * <sgtty.h> rather than <termio.h>. There are also differences in
- * the ioctl() calls that depend on the value of this symbol.
- */
-/*#define I_TERMIO / **/
-/*#define I_TERMIOS / **/
-/*#define I_SGTTY / **/
-
-/* I_UNISTD:
- * This symbol, if defined, indicates to the C program that it should
- * include <unistd.h>.
- */
-/*#define I_UNISTD / **/
-
-/* I_UTIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <utime.h>.
- */
-#define I_UTIME /**/
-
-/* I_VALUES:
- * This symbol, if defined, indicates to the C program that it should
- * include <values.h> to get definition of symbols like MINFLOAT or
- * MAXLONG, i.e. machine dependant limitations. Probably, you
- * should use <limits.h> instead, if it is available.
- */
-/*#define I_VALUES / **/
-
-/* I_VFORK:
- * This symbol, if defined, indicates to the C program that it should
- * include vfork.h.
- */
-/*#define I_VFORK / **/
-
-/* CAN_VAPROTO:
- * This variable is defined on systems supporting prototype declaration
- * of functions with a variable number of arguments.
- */
-/* _V:
- * This macro is used to declare function parameters in prototypes for
- * functions with a variable number of parameters. Use double parentheses.
- * For example:
- *
- * int printf _V((char *fmt, ...));
- *
- * Remember to use the plain simple _() macro when declaring a function
- * with no variable number of arguments, since it might be possible to
- * have a non-effect _V() macro and still get prototypes via _().
- */
-/*#define CAN_VAPROTO / **/
-#ifdef CAN_VAPROTO
-#define _V(args) args
-#else
-#define _V(args) ()
-#endif
-
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE 4 /**/
-#define LONGSIZE 4 /**/
-#define SHORTSIZE 2 /**/
-
-/* MULTIARCH:
- * This symbol, if defined, signifies that the build
- * process will produce some binary files that are going to be
- * used in a cross-platform environment. This is the case for
- * example with the NeXT "fat" binaries that contain executables
- * for several CPUs.
- */
-/*#define MULTIARCH / **/
-
-/* HAS_QUAD:
- * This symbol, if defined, tells that there's a 64-bit integer type,
- * Quad_t, and its unsigned counterpar, Uquad_t. QUADKIND will be one
- * of QUAD_IS_INT, QUAD_IS_LONG, QUAD_IS_LONG_LONG, QUAD_IS_INT64_T,
- * or QUAD_IS___INT64.
- */
-#define HAS_QUAD /**/
-#ifdef HAS_QUAD
-# ifdef _MSC_VER
-# define Quad_t __int64 /**/
-# define Uquad_t unsigned __int64 /**/
-# define QUADKIND 5 /**/
-# else /* gcc presumably */
-# define Quad_t long long /**/
-# define Uquad_t unsigned long long /**/
-# define QUADKIND 3 /**/
-# endif
-# define QUAD_IS_INT 1
-# define QUAD_IS_LONG 2
-# define QUAD_IS_LONG_LONG 3
-# define QUAD_IS_INT64_T 4
-# define QUAD_IS___INT64 5
-#endif
-
-/* OSNAME:
- * This symbol contains the name of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-/* OSVERS:
- * This symbol contains the version of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-#define OSNAME "MSWin32" /**/
-#define OSVERS "5.1" /**/
-
-/* ARCHLIB:
- * This variable, if defined, holds the name of the directory in
- * which the user wants to put architecture-dependent public
- * library files for perl5. It is most often a local directory
- * such as /usr/local/lib. Programs using this variable must be
- * prepared to deal with filename expansion. If ARCHLIB is the
- * same as PRIVLIB, it is not defined, since presumably the
- * program already searches PRIVLIB.
- */
-/* ARCHLIB_EXP:
- * This symbol contains the ~name expanded version of ARCHLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-#define ARCHLIB "c:\\perl\\lib" /**/
-/*#define ARCHLIB_EXP "" / **/
-
-/* ARCHNAME:
- * This symbol holds a string representing the architecture name.
- * It may be used to construct an architecture-dependant pathname
- * where library files may be held under a private library, for
- * instance.
- */
-#define ARCHNAME "MSWin32-x64" /**/
-
-/* BIN:
- * This symbol holds the path of the bin directory where the package will
- * be installed. Program must be prepared to deal with ~name substitution.
- */
-/* BIN_EXP:
- * This symbol is the filename expanded version of the BIN symbol, for
- * programs that do not want to deal with that at run-time.
- */
-/* PERL_RELOCATABLE_INC:
- * This symbol, if defined, indicates that we'd like to relocate entries
- * in @INC at run time based on the location of the perl binary.
- */
-#define BIN "c:\\perl\\bin" /**/
-#define BIN_EXP "c:\\perl\\bin" /**/
-#define PERL_RELOCATABLE_INC "undef" /**/
-
-/* CAT2:
- * This macro concatenates 2 tokens together.
- */
-/* STRINGIFY:
- * This macro surrounds its token with double quotes.
- */
-#if 42 == 1
-#define CAT2(a,b) a/**/b
-#undef STRINGIFY
-#define STRINGIFY(a) "a"
-#endif
-#if 42 == 42
-#define PeRl_CaTiFy(a, b) a ## b
-#define PeRl_StGiFy(a) #a
-#define CAT2(a,b) PeRl_CaTiFy(a,b)
-#define StGiFy(a) PeRl_StGiFy(a)
-#undef STRINGIFY
-#define STRINGIFY(a) PeRl_StGiFy(a)
-#endif
-#if 42 != 1 && 42 != 42
-#include "Bletch: How does this C preprocessor concatenate tokens?"
-#endif
-
-/* CPPSTDIN:
- * This symbol contains the first part of the string which will invoke
- * the C preprocessor on the standard input and produce to standard
- * output. Typical value of "cc -E" or "/lib/cpp", but it can also
- * call a wrapper. See CPPRUN.
- */
-/* CPPMINUS:
- * This symbol contains the second part of the string which will invoke
- * the C preprocessor on the standard input and produce to standard
- * output. This symbol will have the value "-" if CPPSTDIN needs a minus
- * to specify standard input, otherwise the value is "".
- */
-/* CPPRUN:
- * This symbol contains the string which will invoke a C preprocessor on
- * the standard input and produce to standard output. It needs to end
- * with CPPLAST, after all other preprocessor flags have been specified.
- * The main difference with CPPSTDIN is that this program will never be a
- * pointer to a shell wrapper, i.e. it will be empty if no preprocessor is
- * available directly to the user. Note that it may well be different from
- * the preprocessor used to compile the C program.
- */
-/* CPPLAST:
- * This symbol is intended to be used along with CPPRUN in the same manner
- * symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "".
- */
-#ifdef _MSC_VER
-# define CPPSTDIN "cppstdin"
-# define CPPMINUS ""
-# define CPPRUN "cl -nologo -E"
-#else
-# define CPPSTDIN "gcc -E"
-# define CPPMINUS "-"
-# define CPPRUN "gcc -E"
-#endif
-#define CPPLAST ""
-
-/* HAS_ACCESS:
- * This manifest constant lets the C program know that the access()
- * system call is available to check for accessibility using real UID/GID.
- * (always present on UNIX.)
- */
-#define HAS_ACCESS /**/
-
-/* HAS_ACCESSX:
- * This symbol, if defined, indicates that the accessx routine is
- * available to do extended access checks.
- */
-/*#define HAS_ACCESSX / **/
-
-/* HAS_ASCTIME_R:
- * This symbol, if defined, indicates that the asctime_r routine
- * is available to asctime re-entrantly.
- */
-/* ASCTIME_R_PROTO:
- * This symbol encodes the prototype of asctime_r.
- * It is zero if d_asctime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_asctime_r
- * is defined.
- */
-/*#define HAS_ASCTIME_R / **/
-#define ASCTIME_R_PROTO 0 /**/
-
-/* The HASATTRIBUTE_* defines are left undefined here because they vary from
- * one version of GCC to another. Instead, they are defined on the basis of
- * the compiler version in <perl.h>.
- */
-/* HASATTRIBUTE_FORMAT:
- * Can we handle GCC attribute for checking printf-style formats
- */
-/* PRINTF_FORMAT_NULL_OK:
- * Allows __printf__ format to be null when checking printf-style
- */
-/* HASATTRIBUTE_MALLOC:
- * Can we handle GCC attribute for malloc-style functions.
- */
-/* HASATTRIBUTE_NONNULL:
- * Can we handle GCC attribute for nonnull function parms.
- */
-/* HASATTRIBUTE_NORETURN:
- * Can we handle GCC attribute for functions that do not return
- */
-/* HASATTRIBUTE_PURE:
- * Can we handle GCC attribute for pure functions
- */
-/* HASATTRIBUTE_UNUSED:
- * Can we handle GCC attribute for unused variables and arguments
- */
-/* HASATTRIBUTE_DEPRECATED:
- * Can we handle GCC attribute for marking deprecated APIs
- */
-/* HASATTRIBUTE_WARN_UNUSED_RESULT:
- * Can we handle GCC attribute for warning on unused results
- */
-/*#define HASATTRIBUTE_DEPRECATED / **/
-/*#define HASATTRIBUTE_FORMAT / **/
-/*#define PRINTF_FORMAT_NULL_OK / **/
-/*#define HASATTRIBUTE_NORETURN / **/
-/*#define HASATTRIBUTE_MALLOC / **/
-/*#define HASATTRIBUTE_NONNULL / **/
-/*#define HASATTRIBUTE_PURE / **/
-/*#define HASATTRIBUTE_UNUSED / **/
-/*#define HASATTRIBUTE_WARN_UNUSED_RESULT / **/
-
-/* HASCONST:
- * This symbol, if defined, indicates that this C compiler knows about
- * the const type. There is no need to actually test for that symbol
- * within your programs. The mere use of the "const" keyword will
- * trigger the necessary tests.
- */
-#define HASCONST /**/
-#ifndef HASCONST
-#define const
-#endif
-
-/* HAS_CRYPT_R:
- * This symbol, if defined, indicates that the crypt_r routine
- * is available to crypt re-entrantly.
- */
-/* CRYPT_R_PROTO:
- * This symbol encodes the prototype of crypt_r.
- * It is zero if d_crypt_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_crypt_r
- * is defined.
- */
-/*#define HAS_CRYPT_R / **/
-#define CRYPT_R_PROTO 0 /**/
-
-/* HAS_CSH:
- * This symbol, if defined, indicates that the C-shell exists.
- */
-/* CSH:
- * This symbol, if defined, contains the full pathname of csh.
- */
-/*#define HAS_CSH / **/
-#ifdef HAS_CSH
-#define CSH "" /**/
-#endif
-
-/* HAS_CTERMID_R:
- * This symbol, if defined, indicates that the ctermid_r routine
- * is available to ctermid re-entrantly.
- */
-/* CTERMID_R_PROTO:
- * This symbol encodes the prototype of ctermid_r.
- * It is zero if d_ctermid_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctermid_r
- * is defined.
- */
-/*#define HAS_CTERMID_R / **/
-#define CTERMID_R_PROTO 0 /**/
-
-/* HAS_CTIME_R:
- * This symbol, if defined, indicates that the ctime_r routine
- * is available to ctime re-entrantly.
- */
-/* CTIME_R_PROTO:
- * This symbol encodes the prototype of ctime_r.
- * It is zero if d_ctime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctime_r
- * is defined.
- */
-/*#define HAS_CTIME_R / **/
-#define CTIME_R_PROTO 0 /**/
-
-/* HAS_DRAND48_R:
- * This symbol, if defined, indicates that the drand48_r routine
- * is available to drand48 re-entrantly.
- */
-/* DRAND48_R_PROTO:
- * This symbol encodes the prototype of drand48_r.
- * It is zero if d_drand48_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_drand48_r
- * is defined.
- */
-/*#define HAS_DRAND48_R / **/
-#define DRAND48_R_PROTO 0 /**/
-
-/* HAS_DRAND48_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the drand48() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern double drand48(void);
- */
-/*#define HAS_DRAND48_PROTO / **/
-
-/* HAS_EACCESS:
- * This symbol, if defined, indicates that the eaccess routine is
- * available to do extended access checks.
- */
-/*#define HAS_EACCESS / **/
-
-/* HAS_ENDGRENT:
- * This symbol, if defined, indicates that the getgrent routine is
- * available for finalizing sequential access of the group database.
- */
-/*#define HAS_ENDGRENT / **/
-
-/* HAS_ENDGRENT_R:
- * This symbol, if defined, indicates that the endgrent_r routine
- * is available to endgrent re-entrantly.
- */
-/* ENDGRENT_R_PROTO:
- * This symbol encodes the prototype of endgrent_r.
- * It is zero if d_endgrent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endgrent_r
- * is defined.
- */
-/*#define HAS_ENDGRENT_R / **/
-#define ENDGRENT_R_PROTO 0 /**/
-
-/* HAS_ENDHOSTENT:
- * This symbol, if defined, indicates that the endhostent() routine is
- * available to close whatever was being used for host queries.
- */
-/*#define HAS_ENDHOSTENT / **/
-
-/* HAS_ENDHOSTENT_R:
- * This symbol, if defined, indicates that the endhostent_r routine
- * is available to endhostent re-entrantly.
- */
-/* ENDHOSTENT_R_PROTO:
- * This symbol encodes the prototype of endhostent_r.
- * It is zero if d_endhostent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endhostent_r
- * is defined.
- */
-/*#define HAS_ENDHOSTENT_R / **/
-#define ENDHOSTENT_R_PROTO 0 /**/
-
-/* HAS_ENDNETENT:
- * This symbol, if defined, indicates that the endnetent() routine is
- * available to close whatever was being used for network queries.
- */
-/*#define HAS_ENDNETENT / **/
-
-/* HAS_ENDNETENT_R:
- * This symbol, if defined, indicates that the endnetent_r routine
- * is available to endnetent re-entrantly.
- */
-/* ENDNETENT_R_PROTO:
- * This symbol encodes the prototype of endnetent_r.
- * It is zero if d_endnetent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endnetent_r
- * is defined.
- */
-/*#define HAS_ENDNETENT_R / **/
-#define ENDNETENT_R_PROTO 0 /**/
-
-/* HAS_ENDPROTOENT:
- * This symbol, if defined, indicates that the endprotoent() routine is
- * available to close whatever was being used for protocol queries.
- */
-/*#define HAS_ENDPROTOENT / **/
-
-/* HAS_ENDPROTOENT_R:
- * This symbol, if defined, indicates that the endprotoent_r routine
- * is available to endprotoent re-entrantly.
- */
-/* ENDPROTOENT_R_PROTO:
- * This symbol encodes the prototype of endprotoent_r.
- * It is zero if d_endprotoent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endprotoent_r
- * is defined.
- */
-/*#define HAS_ENDPROTOENT_R / **/
-#define ENDPROTOENT_R_PROTO 0 /**/
-
-/* HAS_ENDPWENT:
- * This symbol, if defined, indicates that the getgrent routine is
- * available for finalizing sequential access of the passwd database.
- */
-/*#define HAS_ENDPWENT / **/
-
-/* HAS_ENDPWENT_R:
- * This symbol, if defined, indicates that the endpwent_r routine
- * is available to endpwent re-entrantly.
- */
-/* ENDPWENT_R_PROTO:
- * This symbol encodes the prototype of endpwent_r.
- * It is zero if d_endpwent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endpwent_r
- * is defined.
- */
-/*#define HAS_ENDPWENT_R / **/
-#define ENDPWENT_R_PROTO 0 /**/
-
-/* HAS_ENDSERVENT:
- * This symbol, if defined, indicates that the endservent() routine is
- * available to close whatever was being used for service queries.
- */
-/*#define HAS_ENDSERVENT / **/
-
-/* HAS_ENDSERVENT_R:
- * This symbol, if defined, indicates that the endservent_r routine
- * is available to endservent re-entrantly.
- */
-/* ENDSERVENT_R_PROTO:
- * This symbol encodes the prototype of endservent_r.
- * It is zero if d_endservent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endservent_r
- * is defined.
- */
-/*#define HAS_ENDSERVENT_R / **/
-#define ENDSERVENT_R_PROTO 0 /**/
-
-/* FLEXFILENAMES:
- * This symbol, if defined, indicates that the system supports filenames
- * longer than 14 characters.
- */
-#define FLEXFILENAMES /**/
-
-/* HAS_GETGRENT:
- * This symbol, if defined, indicates that the getgrent routine is
- * available for sequential access of the group database.
- */
-/*#define HAS_GETGRENT / **/
-
-/* HAS_GETGRENT_R:
- * This symbol, if defined, indicates that the getgrent_r routine
- * is available to getgrent re-entrantly.
- */
-/* GETGRENT_R_PROTO:
- * This symbol encodes the prototype of getgrent_r.
- * It is zero if d_getgrent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrent_r
- * is defined.
- */
-/*#define HAS_GETGRENT_R / **/
-#define GETGRENT_R_PROTO 0 /**/
-
-/* HAS_GETGRGID_R:
- * This symbol, if defined, indicates that the getgrgid_r routine
- * is available to getgrgid re-entrantly.
- */
-/* GETGRGID_R_PROTO:
- * This symbol encodes the prototype of getgrgid_r.
- * It is zero if d_getgrgid_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrgid_r
- * is defined.
- */
-/*#define HAS_GETGRGID_R / **/
-#define GETGRGID_R_PROTO 0 /**/
-
-/* HAS_GETGRNAM_R:
- * This symbol, if defined, indicates that the getgrnam_r routine
- * is available to getgrnam re-entrantly.
- */
-/* GETGRNAM_R_PROTO:
- * This symbol encodes the prototype of getgrnam_r.
- * It is zero if d_getgrnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrnam_r
- * is defined.
- */
-/*#define HAS_GETGRNAM_R / **/
-#define GETGRNAM_R_PROTO 0 /**/
-
-/* HAS_GETHOSTBYADDR:
- * This symbol, if defined, indicates that the gethostbyaddr() routine is
- * available to look up hosts by their IP addresses.
- */
-#define HAS_GETHOSTBYADDR /**/
-
-/* HAS_GETHOSTBYNAME:
- * This symbol, if defined, indicates that the gethostbyname() routine is
- * available to look up host names in some data base or other.
- */
-#define HAS_GETHOSTBYNAME /**/
-
-/* HAS_GETHOSTENT:
- * This symbol, if defined, indicates that the gethostent() routine is
- * available to look up host names in some data base or another.
- */
-/*#define HAS_GETHOSTENT / **/
-
-/* HAS_GETHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * gethostname() routine to derive the host name. See also HAS_UNAME
- * and PHOSTNAME.
- */
-/* HAS_UNAME:
- * This symbol, if defined, indicates that the C program may use the
- * uname() routine to derive the host name. See also HAS_GETHOSTNAME
- * and PHOSTNAME.
- */
-/* PHOSTNAME:
- * This symbol, if defined, indicates the command to feed to the
- * popen() routine to derive the host name. See also HAS_GETHOSTNAME
- * and HAS_UNAME. Note that the command uses a fully qualified path,
- * so that it is safe even if used by a process with super-user
- * privileges.
- */
-/* HAS_PHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * contents of PHOSTNAME as a command to feed to the popen() routine
- * to derive the host name.
- */
-#define HAS_GETHOSTNAME /**/
-#define HAS_UNAME /**/
-/*#define HAS_PHOSTNAME / **/
-#ifdef HAS_PHOSTNAME
-#define PHOSTNAME "" /* How to get the host name */
-#endif
-
-/* HAS_GETHOSTBYADDR_R:
- * This symbol, if defined, indicates that the gethostbyaddr_r routine
- * is available to gethostbyaddr re-entrantly.
- */
-/* GETHOSTBYADDR_R_PROTO:
- * This symbol encodes the prototype of gethostbyaddr_r.
- * It is zero if d_gethostbyaddr_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyaddr_r
- * is defined.
- */
-/*#define HAS_GETHOSTBYADDR_R / **/
-#define GETHOSTBYADDR_R_PROTO 0 /**/
-
-/* HAS_GETHOSTBYNAME_R:
- * This symbol, if defined, indicates that the gethostbyname_r routine
- * is available to gethostbyname re-entrantly.
- */
-/* GETHOSTBYNAME_R_PROTO:
- * This symbol encodes the prototype of gethostbyname_r.
- * It is zero if d_gethostbyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyname_r
- * is defined.
- */
-/*#define HAS_GETHOSTBYNAME_R / **/
-#define GETHOSTBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETHOSTENT_R:
- * This symbol, if defined, indicates that the gethostent_r routine
- * is available to gethostent re-entrantly.
- */
-/* GETHOSTENT_R_PROTO:
- * This symbol encodes the prototype of gethostent_r.
- * It is zero if d_gethostent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostent_r
- * is defined.
- */
-/*#define HAS_GETHOSTENT_R / **/
-#define GETHOSTENT_R_PROTO 0 /**/
-
-/* HAS_GETHOST_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for gethostent(), gethostbyname(), and
- * gethostbyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-#define HAS_GETHOST_PROTOS /**/
-
-/* HAS_GETLOGIN_R:
- * This symbol, if defined, indicates that the getlogin_r routine
- * is available to getlogin re-entrantly.
- */
-/* GETLOGIN_R_PROTO:
- * This symbol encodes the prototype of getlogin_r.
- * It is zero if d_getlogin_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getlogin_r
- * is defined.
- */
-/*#define HAS_GETLOGIN_R / **/
-#define GETLOGIN_R_PROTO 0 /**/
-
-/* HAS_GETNETBYADDR:
- * This symbol, if defined, indicates that the getnetbyaddr() routine is
- * available to look up networks by their IP addresses.
- */
-/*#define HAS_GETNETBYADDR / **/
-
-/* HAS_GETNETBYNAME:
- * This symbol, if defined, indicates that the getnetbyname() routine is
- * available to look up networks by their names.
- */
-/*#define HAS_GETNETBYNAME / **/
-
-/* HAS_GETNETENT:
- * This symbol, if defined, indicates that the getnetent() routine is
- * available to look up network names in some data base or another.
- */
-/*#define HAS_GETNETENT / **/
-
-/* HAS_GETNETBYADDR_R:
- * This symbol, if defined, indicates that the getnetbyaddr_r routine
- * is available to getnetbyaddr re-entrantly.
- */
-/* GETNETBYADDR_R_PROTO:
- * This symbol encodes the prototype of getnetbyaddr_r.
- * It is zero if d_getnetbyaddr_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyaddr_r
- * is defined.
- */
-/*#define HAS_GETNETBYADDR_R / **/
-#define GETNETBYADDR_R_PROTO 0 /**/
-
-/* HAS_GETNETBYNAME_R:
- * This symbol, if defined, indicates that the getnetbyname_r routine
- * is available to getnetbyname re-entrantly.
- */
-/* GETNETBYNAME_R_PROTO:
- * This symbol encodes the prototype of getnetbyname_r.
- * It is zero if d_getnetbyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyname_r
- * is defined.
- */
-/*#define HAS_GETNETBYNAME_R / **/
-#define GETNETBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETNETENT_R:
- * This symbol, if defined, indicates that the getnetent_r routine
- * is available to getnetent re-entrantly.
- */
-/* GETNETENT_R_PROTO:
- * This symbol encodes the prototype of getnetent_r.
- * It is zero if d_getnetent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetent_r
- * is defined.
- */
-/*#define HAS_GETNETENT_R / **/
-#define GETNETENT_R_PROTO 0 /**/
-
-/* HAS_GETNET_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for getnetent(), getnetbyname(), and
- * getnetbyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-/*#define HAS_GETNET_PROTOS / **/
-
-/* HAS_GETPROTOENT:
- * This symbol, if defined, indicates that the getprotoent() routine is
- * available to look up protocols in some data base or another.
- */
-/*#define HAS_GETPROTOENT / **/
-
-/* HAS_GETPGRP:
- * This symbol, if defined, indicates that the getpgrp routine is
- * available to get the current process group.
- */
-/* USE_BSD_GETPGRP:
- * This symbol, if defined, indicates that getpgrp needs one
- * arguments whereas USG one needs none.
- */
-/*#define HAS_GETPGRP / **/
-/*#define USE_BSD_GETPGRP / **/
-
-/* HAS_GETPROTOBYNAME:
- * This symbol, if defined, indicates that the getprotobyname()
- * routine is available to look up protocols by their name.
- */
-/* HAS_GETPROTOBYNUMBER:
- * This symbol, if defined, indicates that the getprotobynumber()
- * routine is available to look up protocols by their number.
- */
-#define HAS_GETPROTOBYNAME /**/
-#define HAS_GETPROTOBYNUMBER /**/
-
-/* HAS_GETPROTOBYNAME_R:
- * This symbol, if defined, indicates that the getprotobyname_r routine
- * is available to getprotobyname re-entrantly.
- */
-/* GETPROTOBYNAME_R_PROTO:
- * This symbol encodes the prototype of getprotobyname_r.
- * It is zero if d_getprotobyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobyname_r
- * is defined.
- */
-/*#define HAS_GETPROTOBYNAME_R / **/
-#define GETPROTOBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETPROTOBYNUMBER_R:
- * This symbol, if defined, indicates that the getprotobynumber_r routine
- * is available to getprotobynumber re-entrantly.
- */
-/* GETPROTOBYNUMBER_R_PROTO:
- * This symbol encodes the prototype of getprotobynumber_r.
- * It is zero if d_getprotobynumber_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobynumber_r
- * is defined.
- */
-/*#define HAS_GETPROTOBYNUMBER_R / **/
-#define GETPROTOBYNUMBER_R_PROTO 0 /**/
-
-/* HAS_GETPROTOENT_R:
- * This symbol, if defined, indicates that the getprotoent_r routine
- * is available to getprotoent re-entrantly.
- */
-/* GETPROTOENT_R_PROTO:
- * This symbol encodes the prototype of getprotoent_r.
- * It is zero if d_getprotoent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotoent_r
- * is defined.
- */
-/*#define HAS_GETPROTOENT_R / **/
-#define GETPROTOENT_R_PROTO 0 /**/
-
-/* HAS_GETPROTO_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for getprotoent(), getprotobyname(), and
- * getprotobyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-#define HAS_GETPROTO_PROTOS /**/
-
-/* HAS_GETPWENT:
- * This symbol, if defined, indicates that the getpwent routine is
- * available for sequential access of the passwd database.
- * If this is not available, the older getpw() function may be available.
- */
-/*#define HAS_GETPWENT / **/
-
-/* HAS_GETPWENT_R:
- * This symbol, if defined, indicates that the getpwent_r routine
- * is available to getpwent re-entrantly.
- */
-/* GETPWENT_R_PROTO:
- * This symbol encodes the prototype of getpwent_r.
- * It is zero if d_getpwent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwent_r
- * is defined.
- */
-/*#define HAS_GETPWENT_R / **/
-#define GETPWENT_R_PROTO 0 /**/
-
-/* HAS_GETPWNAM_R:
- * This symbol, if defined, indicates that the getpwnam_r routine
- * is available to getpwnam re-entrantly.
- */
-/* GETPWNAM_R_PROTO:
- * This symbol encodes the prototype of getpwnam_r.
- * It is zero if d_getpwnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwnam_r
- * is defined.
- */
-/*#define HAS_GETPWNAM_R / **/
-#define GETPWNAM_R_PROTO 0 /**/
-
-/* HAS_GETPWUID_R:
- * This symbol, if defined, indicates that the getpwuid_r routine
- * is available to getpwuid re-entrantly.
- */
-/* GETPWUID_R_PROTO:
- * This symbol encodes the prototype of getpwuid_r.
- * It is zero if d_getpwuid_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwuid_r
- * is defined.
- */
-/*#define HAS_GETPWUID_R / **/
-#define GETPWUID_R_PROTO 0 /**/
-
-/* HAS_GETSERVENT:
- * This symbol, if defined, indicates that the getservent() routine is
- * available to look up network services in some data base or another.
- */
-/*#define HAS_GETSERVENT / **/
-
-/* HAS_GETSERVBYNAME_R:
- * This symbol, if defined, indicates that the getservbyname_r routine
- * is available to getservbyname re-entrantly.
- */
-/* GETSERVBYNAME_R_PROTO:
- * This symbol encodes the prototype of getservbyname_r.
- * It is zero if d_getservbyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyname_r
- * is defined.
- */
-/*#define HAS_GETSERVBYNAME_R / **/
-#define GETSERVBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETSERVBYPORT_R:
- * This symbol, if defined, indicates that the getservbyport_r routine
- * is available to getservbyport re-entrantly.
- */
-/* GETSERVBYPORT_R_PROTO:
- * This symbol encodes the prototype of getservbyport_r.
- * It is zero if d_getservbyport_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyport_r
- * is defined.
- */
-/*#define HAS_GETSERVBYPORT_R / **/
-#define GETSERVBYPORT_R_PROTO 0 /**/
-
-/* HAS_GETSERVENT_R:
- * This symbol, if defined, indicates that the getservent_r routine
- * is available to getservent re-entrantly.
- */
-/* GETSERVENT_R_PROTO:
- * This symbol encodes the prototype of getservent_r.
- * It is zero if d_getservent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservent_r
- * is defined.
- */
-/*#define HAS_GETSERVENT_R / **/
-#define GETSERVENT_R_PROTO 0 /**/
-
-/* HAS_GETSERV_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for getservent(), getservbyname(), and
- * getservbyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-#define HAS_GETSERV_PROTOS /**/
-
-/* HAS_GETSPNAM_R:
- * This symbol, if defined, indicates that the getspnam_r routine
- * is available to getspnam re-entrantly.
- */
-/* GETSPNAM_R_PROTO:
- * This symbol encodes the prototype of getspnam_r.
- * It is zero if d_getspnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getspnam_r
- * is defined.
- */
-/*#define HAS_GETSPNAM_R / **/
-#define GETSPNAM_R_PROTO 0 /**/
-
-/* HAS_GETSERVBYNAME:
- * This symbol, if defined, indicates that the getservbyname()
- * routine is available to look up services by their name.
- */
-/* HAS_GETSERVBYPORT:
- * This symbol, if defined, indicates that the getservbyport()
- * routine is available to look up services by their port.
- */
-#define HAS_GETSERVBYNAME /**/
-#define HAS_GETSERVBYPORT /**/
-
-/* HAS_GMTIME_R:
- * This symbol, if defined, indicates that the gmtime_r routine
- * is available to gmtime re-entrantly.
- */
-/* GMTIME_R_PROTO:
- * This symbol encodes the prototype of gmtime_r.
- * It is zero if d_gmtime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gmtime_r
- * is defined.
- */
-/*#define HAS_GMTIME_R / **/
-#define GMTIME_R_PROTO 0 /**/
-
-/* HAS_HTONL:
- * This symbol, if defined, indicates that the htonl() routine (and
- * friends htons() ntohl() ntohs()) are available to do network
- * order byte swapping.
- */
-/* HAS_HTONS:
- * This symbol, if defined, indicates that the htons() routine (and
- * friends htonl() ntohl() ntohs()) are available to do network
- * order byte swapping.
- */
-/* HAS_NTOHL:
- * This symbol, if defined, indicates that the ntohl() routine (and
- * friends htonl() htons() ntohs()) are available to do network
- * order byte swapping.
- */
-/* HAS_NTOHS:
- * This symbol, if defined, indicates that the ntohs() routine (and
- * friends htonl() htons() ntohl()) are available to do network
- * order byte swapping.
- */
-#define HAS_HTONL /**/
-#define HAS_HTONS /**/
-#define HAS_NTOHL /**/
-#define HAS_NTOHS /**/
-
-/* HAS_LOCALTIME_R:
- * This symbol, if defined, indicates that the localtime_r routine
- * is available to localtime re-entrantly.
- */
-/* LOCALTIME_R_NEEDS_TZSET:
- * Many libc's localtime_r implementations do not call tzset,
- * making them differ from localtime(), and making timezone
- * changes using \undef{TZ} without explicitly calling tzset
- * impossible. This symbol makes us call tzset before localtime_r
- */
-/*#define LOCALTIME_R_NEEDS_TZSET / **/
-#ifdef LOCALTIME_R_NEEDS_TZSET
-#define L_R_TZSET tzset(),
-#else
-#define L_R_TZSET
-#endif
-
-/* LOCALTIME_R_PROTO:
- * This symbol encodes the prototype of localtime_r.
- * It is zero if d_localtime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_localtime_r
- * is defined.
- */
-/*#define HAS_LOCALTIME_R / **/
-#define LOCALTIME_R_PROTO 0 /**/
-
-/* HAS_LONG_DOUBLE:
- * This symbol will be defined if the C compiler supports long
- * doubles.
- */
-/* LONG_DOUBLESIZE:
- * This symbol contains the size of a long double, so that the
- * C preprocessor can make decisions based on it. It is only
- * defined if the system supports long doubles.
- */
-#define HAS_LONG_DOUBLE /**/
-#ifdef HAS_LONG_DOUBLE
-# ifdef _MSC_VER
-# define LONG_DOUBLESIZE 8 /**/
-# else
-# define LONG_DOUBLESIZE 12 /**/
-# endif
-#endif
-
-/* HAS_LONG_LONG:
- * This symbol will be defined if the C compiler supports long long.
- */
-/* LONGLONGSIZE:
- * This symbol contains the size of a long long, so that the
- * C preprocessor can make decisions based on it. It is only
- * defined if the system supports long long.
- */
-#ifdef __GNUC__
-# define HAS_LONG_LONG /**/
-#endif
-#ifdef HAS_LONG_LONG
-#define LONGLONGSIZE 8 /**/
-#endif
-
-/* HAS_LSEEK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the lseek() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern off_t lseek(int, off_t, int);
- */
-#define HAS_LSEEK_PROTO /**/
-
-/* HAS_MEMCHR:
- * This symbol, if defined, indicates that the memchr routine is available
- * to locate characters within a C string.
- */
-#define HAS_MEMCHR /**/
-
-/* HAS_MKSTEMP:
- * This symbol, if defined, indicates that the mkstemp routine is
- * available to exclusively create and open a uniquely named
- * temporary file.
- */
-/*#define HAS_MKSTEMP / **/
-
-/* HAS_MMAP:
- * This symbol, if defined, indicates that the mmap system call is
- * available to map a file into memory.
- */
-/* Mmap_t:
- * This symbol holds the return type of the mmap() system call
- * (and simultaneously the type of the first argument).
- * Usually set to 'void *' or 'caddr_t'.
- */
-/*#define HAS_MMAP / **/
-#define Mmap_t void * /**/
-
-/* HAS_MSG:
- * This symbol, if defined, indicates that the entire msg*(2) library is
- * supported (IPC mechanism based on message queues).
- */
-/*#define HAS_MSG / **/
-
-/* OLD_PTHREAD_CREATE_JOINABLE:
- * This symbol, if defined, indicates how to create pthread
- * in joinable (aka undetached) state. NOTE: not defined
- * if pthread.h already has defined PTHREAD_CREATE_JOINABLE
- * (the new version of the constant).
- * If defined, known values are PTHREAD_CREATE_UNDETACHED
- * and __UNDETACHED.
- */
-/*#define OLD_PTHREAD_CREATE_JOINABLE / **/
-
-/* HAS_PTHREAD_ATFORK:
- * This symbol, if defined, indicates that the pthread_atfork routine
- * is available to setup fork handlers.
- */
-/*#define HAS_PTHREAD_ATFORK / **/
-
-/* HAS_PTHREAD_YIELD:
- * This symbol, if defined, indicates that the pthread_yield
- * routine is available to yield the execution of the current
- * thread. sched_yield is preferable to pthread_yield.
- */
-/* SCHED_YIELD:
- * This symbol defines the way to yield the execution of
- * the current thread. Known ways are sched_yield,
- * pthread_yield, and pthread_yield with NULL.
- */
-/* HAS_SCHED_YIELD:
- * This symbol, if defined, indicates that the sched_yield
- * routine is available to yield the execution of the current
- * thread. sched_yield is preferable to pthread_yield.
- */
-/*#define HAS_PTHREAD_YIELD / **/
-#define SCHED_YIELD /**/
-/*#define HAS_SCHED_YIELD / **/
-
-/* HAS_RANDOM_R:
- * This symbol, if defined, indicates that the random_r routine
- * is available to random re-entrantly.
- */
-/* RANDOM_R_PROTO:
- * This symbol encodes the prototype of random_r.
- * It is zero if d_random_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_random_r
- * is defined.
- */
-/*#define HAS_RANDOM_R / **/
-#define RANDOM_R_PROTO 0 /**/
-
-/* HAS_READDIR64_R:
- * This symbol, if defined, indicates that the readdir64_r routine
- * is available to readdir64 re-entrantly.
- */
-/* READDIR64_R_PROTO:
- * This symbol encodes the prototype of readdir64_r.
- * It is zero if d_readdir64_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir64_r
- * is defined.
- */
-/*#define HAS_READDIR64_R / **/
-#define READDIR64_R_PROTO 0 /**/
-
-/* HAS_READDIR_R:
- * This symbol, if defined, indicates that the readdir_r routine
- * is available to readdir re-entrantly.
- */
-/* READDIR_R_PROTO:
- * This symbol encodes the prototype of readdir_r.
- * It is zero if d_readdir_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir_r
- * is defined.
- */
-/*#define HAS_READDIR_R / **/
-#define READDIR_R_PROTO 0 /**/
-
-/* HAS_SEM:
- * This symbol, if defined, indicates that the entire sem*(2) library is
- * supported.
- */
-/*#define HAS_SEM / **/
-
-/* HAS_SETGRENT:
- * This symbol, if defined, indicates that the setgrent routine is
- * available for initializing sequential access of the group database.
- */
-/*#define HAS_SETGRENT / **/
-
-/* HAS_SETGRENT_R:
- * This symbol, if defined, indicates that the setgrent_r routine
- * is available to setgrent re-entrantly.
- */
-/* SETGRENT_R_PROTO:
- * This symbol encodes the prototype of setgrent_r.
- * It is zero if d_setgrent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setgrent_r
- * is defined.
- */
-/*#define HAS_SETGRENT_R / **/
-#define SETGRENT_R_PROTO 0 /**/
-
-/* HAS_SETHOSTENT:
- * This symbol, if defined, indicates that the sethostent() routine is
- * available.
- */
-/*#define HAS_SETHOSTENT / **/
-
-/* HAS_SETHOSTENT_R:
- * This symbol, if defined, indicates that the sethostent_r routine
- * is available to sethostent re-entrantly.
- */
-/* SETHOSTENT_R_PROTO:
- * This symbol encodes the prototype of sethostent_r.
- * It is zero if d_sethostent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_sethostent_r
- * is defined.
- */
-/*#define HAS_SETHOSTENT_R / **/
-#define SETHOSTENT_R_PROTO 0 /**/
-
-/* HAS_SETLOCALE_R:
- * This symbol, if defined, indicates that the setlocale_r routine
- * is available to setlocale re-entrantly.
- */
-/* SETLOCALE_R_PROTO:
- * This symbol encodes the prototype of setlocale_r.
- * It is zero if d_setlocale_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setlocale_r
- * is defined.
- */
-/*#define HAS_SETLOCALE_R / **/
-#define SETLOCALE_R_PROTO 0 /**/
-
-/* HAS_SETNETENT:
- * This symbol, if defined, indicates that the setnetent() routine is
- * available.
- */
-/*#define HAS_SETNETENT / **/
-
-/* HAS_SETNETENT_R:
- * This symbol, if defined, indicates that the setnetent_r routine
- * is available to setnetent re-entrantly.
- */
-/* SETNETENT_R_PROTO:
- * This symbol encodes the prototype of setnetent_r.
- * It is zero if d_setnetent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setnetent_r
- * is defined.
- */
-/*#define HAS_SETNETENT_R / **/
-#define SETNETENT_R_PROTO 0 /**/
-
-/* HAS_SETPROTOENT:
- * This symbol, if defined, indicates that the setprotoent() routine is
- * available.
- */
-/*#define HAS_SETPROTOENT / **/
-
-/* HAS_SETPGRP:
- * This symbol, if defined, indicates that the setpgrp routine is
- * available to set the current process group.
- */
-/* USE_BSD_SETPGRP:
- * This symbol, if defined, indicates that setpgrp needs two
- * arguments whereas USG one needs none. See also HAS_SETPGID
- * for a POSIX interface.
- */
-/*#define HAS_SETPGRP / **/
-/*#define USE_BSD_SETPGRP / **/
-
-/* HAS_SETPROTOENT_R:
- * This symbol, if defined, indicates that the setprotoent_r routine
- * is available to setprotoent re-entrantly.
- */
-/* SETPROTOENT_R_PROTO:
- * This symbol encodes the prototype of setprotoent_r.
- * It is zero if d_setprotoent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setprotoent_r
- * is defined.
- */
-/*#define HAS_SETPROTOENT_R / **/
-#define SETPROTOENT_R_PROTO 0 /**/
-
-/* HAS_SETPWENT:
- * This symbol, if defined, indicates that the setpwent routine is
- * available for initializing sequential access of the passwd database.
- */
-/*#define HAS_SETPWENT / **/
-
-/* HAS_SETPWENT_R:
- * This symbol, if defined, indicates that the setpwent_r routine
- * is available to setpwent re-entrantly.
- */
-/* SETPWENT_R_PROTO:
- * This symbol encodes the prototype of setpwent_r.
- * It is zero if d_setpwent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setpwent_r
- * is defined.
- */
-/*#define HAS_SETPWENT_R / **/
-#define SETPWENT_R_PROTO 0 /**/
-
-/* HAS_SETSERVENT:
- * This symbol, if defined, indicates that the setservent() routine is
- * available.
- */
-/*#define HAS_SETSERVENT / **/
-
-/* HAS_SETSERVENT_R:
- * This symbol, if defined, indicates that the setservent_r routine
- * is available to setservent re-entrantly.
- */
-/* SETSERVENT_R_PROTO:
- * This symbol encodes the prototype of setservent_r.
- * It is zero if d_setservent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setservent_r
- * is defined.
- */
-/*#define HAS_SETSERVENT_R / **/
-#define SETSERVENT_R_PROTO 0 /**/
-
-/* HAS_SETVBUF:
- * This symbol, if defined, indicates that the setvbuf routine is
- * available to change buffering on an open stdio stream.
- * to a line-buffered mode.
- */
-#define HAS_SETVBUF /**/
-
-/* HAS_SHM:
- * This symbol, if defined, indicates that the entire shm*(2) library is
- * supported.
- */
-/*#define HAS_SHM / **/
-
-/* Shmat_t:
- * This symbol holds the return type of the shmat() system call.
- * Usually set to 'void *' or 'char *'.
- */
-/* HAS_SHMAT_PROTOTYPE:
- * This symbol, if defined, indicates that the sys/shm.h includes
- * a prototype for shmat(). Otherwise, it is up to the program to
- * guess one. Shmat_t shmat(int, Shmat_t, int) is a good guess,
- * but not always right so it should be emitted by the program only
- * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
- */
-#define Shmat_t void * /**/
-/*#define HAS_SHMAT_PROTOTYPE / **/
-
-/* HAS_SOCKET:
- * This symbol, if defined, indicates that the BSD socket interface is
- * supported.
- */
-/* HAS_SOCKETPAIR:
- * This symbol, if defined, indicates that the BSD socketpair() call is
- * supported.
- */
-/* HAS_MSG_CTRUNC:
- * This symbol, if defined, indicates that the MSG_CTRUNC is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_DONTROUTE:
- * This symbol, if defined, indicates that the MSG_DONTROUTE is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_OOB:
- * This symbol, if defined, indicates that the MSG_OOB is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_PEEK:
- * This symbol, if defined, indicates that the MSG_PEEK is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_PROXY:
- * This symbol, if defined, indicates that the MSG_PROXY is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_SCM_RIGHTS:
- * This symbol, if defined, indicates that the SCM_RIGHTS is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-#define HAS_SOCKET /**/
-/*#define HAS_SOCKETPAIR / **/
-/*#define HAS_MSG_CTRUNC / **/
-/*#define HAS_MSG_DONTROUTE / **/
-/*#define HAS_MSG_OOB / **/
-/*#define HAS_MSG_PEEK / **/
-/*#define HAS_MSG_PROXY / **/
-/*#define HAS_SCM_RIGHTS / **/
-
-/* HAS_SRAND48_R:
- * This symbol, if defined, indicates that the srand48_r routine
- * is available to srand48 re-entrantly.
- */
-/* SRAND48_R_PROTO:
- * This symbol encodes the prototype of srand48_r.
- * It is zero if d_srand48_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_srand48_r
- * is defined.
- */
-/*#define HAS_SRAND48_R / **/
-#define SRAND48_R_PROTO 0 /**/
-
-/* HAS_SRANDOM_R:
- * This symbol, if defined, indicates that the srandom_r routine
- * is available to srandom re-entrantly.
- */
-/* SRANDOM_R_PROTO:
- * This symbol encodes the prototype of srandom_r.
- * It is zero if d_srandom_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_srandom_r
- * is defined.
- */
-/*#define HAS_SRANDOM_R / **/
-#define SRANDOM_R_PROTO 0 /**/
-
-/* USE_STAT_BLOCKS:
- * This symbol is defined if this system has a stat structure declaring
- * st_blksize and st_blocks.
- */
-#ifndef USE_STAT_BLOCKS
-/*#define USE_STAT_BLOCKS / **/
-#endif
-
-/* USE_STRUCT_COPY:
- * This symbol, if defined, indicates that this C compiler knows how
- * to copy structures. If undefined, you'll need to use a block copy
- * routine of some sort instead.
- */
-#define USE_STRUCT_COPY /**/
-
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
-/* HAS_SYS_ERRLIST:
- * This symbol, if defined, indicates that the sys_errlist array is
- * available to translate error numbers to strings. The extern int
- * sys_nerr gives the size of that table.
- */
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-#define HAS_STRERROR /**/
-#define HAS_SYS_ERRLIST /**/
-#define Strerror(e) strerror(e)
-
-/* HAS_STRERROR_R:
- * This symbol, if defined, indicates that the strerror_r routine
- * is available to strerror re-entrantly.
- */
-/* STRERROR_R_PROTO:
- * This symbol encodes the prototype of strerror_r.
- * It is zero if d_strerror_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_strerror_r
- * is defined.
- */
-/*#define HAS_STRERROR_R / **/
-#define STRERROR_R_PROTO 0 /**/
-
-/* HAS_STRTOUL:
- * This symbol, if defined, indicates that the strtoul routine is
- * available to provide conversion of strings to unsigned long.
- */
-#define HAS_STRTOUL /**/
-
-/* HAS_TIME:
- * This symbol, if defined, indicates that the time() routine exists.
- */
-/* Time_t:
- * This symbol holds the type returned by time(). It can be long,
- * or time_t on BSD sites (in which case <sys/types.h> should be
- * included).
- */
-#define HAS_TIME /**/
-#define Time_t time_t /* Time type */
-
-/* HAS_TIMES:
- * This symbol, if defined, indicates that the times() routine exists.
- * Note that this became obsolete on some systems (SUNOS), which now
- * use getrusage(). It may be necessary to include <sys/times.h>.
- */
-#define HAS_TIMES /**/
-
-/* HAS_TMPNAM_R:
- * This symbol, if defined, indicates that the tmpnam_r routine
- * is available to tmpnam re-entrantly.
- */
-/* TMPNAM_R_PROTO:
- * This symbol encodes the prototype of tmpnam_r.
- * It is zero if d_tmpnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_tmpnam_r
- * is defined.
- */
-/*#define HAS_TMPNAM_R / **/
-#define TMPNAM_R_PROTO 0 /**/
-
-/* HAS_TTYNAME_R:
- * This symbol, if defined, indicates that the ttyname_r routine
- * is available to ttyname re-entrantly.
- */
-/* TTYNAME_R_PROTO:
- * This symbol encodes the prototype of ttyname_r.
- * It is zero if d_ttyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ttyname_r
- * is defined.
- */
-/*#define HAS_TTYNAME_R / **/
-#define TTYNAME_R_PROTO 0 /**/
-
-/* HAS_UNION_SEMUN:
- * This symbol, if defined, indicates that the union semun is
- * defined by including <sys/sem.h>. If not, the user code
- * probably needs to define it as:
- * union semun {
- * int val;
- * struct semid_ds *buf;
- * unsigned short *array;
- * }
- */
-/* USE_SEMCTL_SEMUN:
- * This symbol, if defined, indicates that union semun is
- * used for semctl IPC_STAT.
- */
-/* USE_SEMCTL_SEMID_DS:
- * This symbol, if defined, indicates that struct semid_ds * is
- * used for semctl IPC_STAT.
- */
-#define HAS_UNION_SEMUN /**/
-/*#define USE_SEMCTL_SEMUN / **/
-/*#define USE_SEMCTL_SEMID_DS / **/
-
-/* HAS_VFORK:
- * This symbol, if defined, indicates that vfork() exists.
- */
-/*#define HAS_VFORK / **/
-
-/* HAS_PSEUDOFORK:
- * This symbol, if defined, indicates that an emulation of the
- * fork routine is available.
- */
-/*#define HAS_PSEUDOFORK / **/
-
-/* Signal_t:
- * This symbol's value is either "void" or "int", corresponding to the
- * appropriate return type of a signal handler. Thus, you can declare
- * a signal handler using "Signal_t (*handler)()", and define the
- * handler using "Signal_t handler(sig)".
- */
-#define Signal_t void /* Signal handler's return type */
-
-/* HASVOLATILE:
- * This symbol, if defined, indicates that this C compiler knows about
- * the volatile declaration.
- */
-#define HASVOLATILE /**/
-#ifndef HASVOLATILE
-#define volatile
-#endif
-
-/* Fpos_t:
- * This symbol holds the type used to declare file positions in libc.
- * It can be fpos_t, long, uint, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Fpos_t fpos_t /* File position type */
-
-/* Gid_t_f:
- * This symbol defines the format string used for printing a Gid_t.
- */
-#define Gid_t_f "ld" /**/
-
-/* Gid_t_sign:
- * This symbol holds the signedess of a Gid_t.
- * 1 for unsigned, -1 for signed.
- */
-#define Gid_t_sign -1 /* GID sign */
-
-/* Gid_t_size:
- * This symbol holds the size of a Gid_t in bytes.
- */
-#define Gid_t_size 4 /* GID size */
-
-/* Gid_t:
- * This symbol holds the return type of getgid() and the type of
- * argument to setrgid() and related functions. Typically,
- * it is the type of group ids in the kernel. It can be int, ushort,
- * gid_t, etc... It may be necessary to include <sys/types.h> to get
- * any typedef'ed information.
- */
-#define Gid_t gid_t /* Type for getgid(), etc... */
-
-/* I_DIRENT:
- * This symbol, if defined, indicates to the C program that it should
- * include <dirent.h>. Using this symbol also triggers the definition
- * of the Direntry_t define which ends up being 'struct dirent' or
- * 'struct direct' depending on the availability of <dirent.h>.
- */
-/* DIRNAMLEN:
- * This symbol, if defined, indicates to the C program that the length
- * of directory entry names is provided by a d_namlen field. Otherwise
- * you need to do strlen() on the d_name field.
- */
-/* Direntry_t:
- * This symbol is set to 'struct direct' or 'struct dirent' depending on
- * whether dirent is available or not. You should use this pseudo type to
- * portably declare your directory entries.
- */
-#define I_DIRENT /**/
-#define DIRNAMLEN /**/
-#define Direntry_t struct direct
-
-/* I_GRP:
- * This symbol, if defined, indicates to the C program that it should
- * include <grp.h>.
- */
-/* GRPASSWD:
- * This symbol, if defined, indicates to the C program that struct group
- * in <grp.h> contains gr_passwd.
- */
-/*#define I_GRP / **/
-/*#define GRPASSWD / **/
-
-/* I_MACH_CTHREADS:
- * This symbol, if defined, indicates to the C program that it should
- * include <mach/cthreads.h>.
- */
-/*#define I_MACH_CTHREADS / **/
-
-/* I_NDBM:
- * This symbol, if defined, indicates that <ndbm.h> exists and should
- * be included.
- */
-/* I_GDBMNDBM:
- * This symbol, if defined, indicates that <gdbm/ndbm.h> exists and should
- * be included. This was the location of the ndbm.h compatibility file
- * in RedHat 7.1.
- */
-/* I_GDBM_NDBM:
- * This symbol, if defined, indicates that <gdbm-ndbm.h> exists and should
- * be included. This is the location of the ndbm.h compatibility file
- * in Debian 4.0.
- */
-/* NDBM_H_USES_PROTOTYPES:
- * This symbol, if defined, indicates that <ndbm.h> uses real ANSI C
- * prototypes instead of K&R style function declarations without any
- * parameter information. While ANSI C prototypes are supported in C++,
- * K&R style function declarations will yield errors.
- */
-/* GDBMNDBM_H_USES_PROTOTYPES:
- * This symbol, if defined, indicates that <gdbm/ndbm.h> uses real ANSI C
- * prototypes instead of K&R style function declarations without any
- * parameter information. While ANSI C prototypes are supported in C++,
- * K&R style function declarations will yield errors.
- */
-/* GDBM_NDBM_H_USES_PROTOTYPES:
- * This symbol, if defined, indicates that <gdbm-ndbm.h> uses real ANSI C
- * prototypes instead of K&R style function declarations without any
- * parameter information. While ANSI C prototypes are supported in C++,
- * K&R style function declarations will yield errors.
- */
-/*#define I_NDBM / **/
-/*#define I_GDBMNDBM / **/
-/*#define I_GDBM_NDBM / **/
-/*#define NDBM_H_USES_PROTOTYPES / **/
-/*#define GDBMNDBM_H_USES_PROTOTYPES / **/
-/*#define GDBM_NDBM_H_USES_PROTOTYPES / **/
-
-/* I_NETDB:
- * This symbol, if defined, indicates that <netdb.h> exists and
- * should be included.
- */
-/*#define I_NETDB / **/
-
-/* I_NET_ERRNO:
- * This symbol, if defined, indicates that <net/errno.h> exists and
- * should be included.
- */
-/*#define I_NET_ERRNO / **/
-
-/* I_PTHREAD:
- * This symbol, if defined, indicates to the C program that it should
- * include <pthread.h>.
- */
-/*#define I_PTHREAD / **/
-
-/* I_PWD:
- * This symbol, if defined, indicates to the C program that it should
- * include <pwd.h>.
- */
-/* PWQUOTA:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_quota.
- */
-/* PWAGE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_age.
- */
-/* PWCHANGE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_change.
- */
-/* PWCLASS:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_class.
- */
-/* PWEXPIRE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_expire.
- */
-/* PWCOMMENT:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_comment.
- */
-/* PWGECOS:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_gecos.
- */
-/* PWPASSWD:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_passwd.
- */
-/*#define I_PWD / **/
-/*#define PWQUOTA / **/
-/*#define PWAGE / **/
-/*#define PWCHANGE / **/
-/*#define PWCLASS / **/
-/*#define PWEXPIRE / **/
-/*#define PWCOMMENT / **/
-/*#define PWGECOS / **/
-/*#define PWPASSWD / **/
-
-/* I_SYS_ACCESS:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/access.h>.
- */
-/*#define I_SYS_ACCESS / **/
-
-/* I_SYS_SECURITY:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/security.h>.
- */
-/*#define I_SYS_SECURITY / **/
-
-/* I_SYSUIO:
- * This symbol, if defined, indicates that <sys/uio.h> exists and
- * should be included.
- */
-/*#define I_SYSUIO / **/
-
-/* I_STDARG:
- * This symbol, if defined, indicates that <stdarg.h> exists and should
- * be included.
- */
-/* I_VARARGS:
- * This symbol, if defined, indicates to the C program that it should
- * include <varargs.h>.
- */
-#define I_STDARG /**/
-/*#define I_VARARGS / **/
-
-/* PERL_INC_VERSION_LIST:
- * This variable specifies the list of subdirectories in over
- * which perl.c:incpush() and lib/lib.pm will automatically
- * search when adding directories to @INC, in a format suitable
- * for a C initialization string. See the inc_version_list entry
- * in Porting/Glossary for more details.
- */
-/*#define PERL_INC_VERSION_LIST 0 / **/
-
-/* INSTALL_USR_BIN_PERL:
- * This symbol, if defined, indicates that Perl is to be installed
- * also as /usr/bin/perl.
- */
-/*#define INSTALL_USR_BIN_PERL / **/
-
-/* Off_t:
- * This symbol holds the type used to declare offsets in the kernel.
- * It can be int, long, off_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-/* LSEEKSIZE:
- * This symbol holds the number of bytes used by the Off_t.
- */
-/* Off_t_size:
- * This symbol holds the number of bytes used by the Off_t.
- */
-#ifdef _MSC_VER
-# define Off_t __int64 /* <offset> type */
-#else
-# define Off_t long long /* <offset> type */
-#endif
-#define LSEEKSIZE 8 /* <offset> size */
-#define Off_t_size 8 /* <offset> size */
-
-/* Free_t:
- * This variable contains the return type of free(). It is usually
- * void, but occasionally int.
- */
-/* Malloc_t:
- * This symbol is the type of pointer returned by malloc and realloc.
- */
-#define Malloc_t void * /**/
-#define Free_t void /**/
-
-/* PERL_MALLOC_WRAP:
- * This symbol, if defined, indicates that we'd like malloc wrap checks.
- */
-#define PERL_MALLOC_WRAP /**/
-
-/* MYMALLOC:
- * This symbol, if defined, indicates that we're using our own malloc.
- */
-/*#define MYMALLOC / **/
-
-/* Mode_t:
- * This symbol holds the type used to declare file modes
- * for systems calls. It is usually mode_t, but may be
- * int or unsigned short. It may be necessary to include <sys/types.h>
- * to get any typedef'ed information.
- */
-#define Mode_t mode_t /* file mode parameter for system calls */
-
-/* Netdb_host_t:
- * This symbol holds the type used for the 1st argument
- * to gethostbyaddr().
- */
-/* Netdb_hlen_t:
- * This symbol holds the type used for the 2nd argument
- * to gethostbyaddr().
- */
-/* Netdb_name_t:
- * This symbol holds the type used for the argument to
- * gethostbyname().
- */
-/* Netdb_net_t:
- * This symbol holds the type used for the 1st argument to
- * getnetbyaddr().
- */
-#define Netdb_host_t char * /**/
-#define Netdb_hlen_t int /**/
-#define Netdb_name_t char * /**/
-#define Netdb_net_t long /**/
-
-/* PERL_OTHERLIBDIRS:
- * This variable contains a colon-separated set of paths for the perl
- * binary to search for additional library files or modules.
- * These directories will be tacked to the end of @INC.
- * Perl will automatically search below each path for version-
- * and architecture-specific directories. See PERL_INC_VERSION_LIST
- * for more details.
- */
-/*#define PERL_OTHERLIBDIRS "" / **/
-
-/* Pid_t:
- * This symbol holds the type used to declare process ids in the kernel.
- * It can be int, uint, pid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Pid_t int /* PID type */
-
-/* PRIVLIB:
- * This symbol contains the name of the private library for this package.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world. The program
- * should be prepared to do ~ expansion.
- */
-/* PRIVLIB_EXP:
- * This symbol contains the ~name expanded version of PRIVLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-#define PRIVLIB "c:\\perl\\lib" /**/
-#define PRIVLIB_EXP (win32_get_privlib(PERL_VERSION_STRING)) /**/
-
-/* CAN_PROTOTYPE:
- * If defined, this macro indicates that the C compiler can handle
- * function prototypes.
- */
-/* _:
- * This macro is used to declare function parameters for folks who want
- * to make declarations with prototypes using a different style than
- * the above macros. Use double parentheses. For example:
- *
- * int main _((int argc, char *argv[]));
- */
-#define CAN_PROTOTYPE /**/
-#ifdef CAN_PROTOTYPE
-#define _(args) args
-#else
-#define _(args) ()
-#endif
-
-/* Select_fd_set_t:
- * This symbol holds the type used for the 2nd, 3rd, and 4th
- * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
- * is defined, and 'int *' otherwise. This is only useful if you
- * have select(), of course.
- */
-#define Select_fd_set_t Perl_fd_set * /**/
-
-/* SH_PATH:
- * This symbol contains the full pathname to the shell used on this
- * on this system to execute Bourne shell scripts. Usually, this will be
- * /bin/sh, though it's possible that some systems will have /bin/ksh,
- * /bin/pdksh, /bin/ash, /bin/bash, or even something such as
- * D:/bin/sh.exe.
- */
-#define SH_PATH "cmd /x /c" /**/
-
-/* SIG_NAME:
- * This symbol contains a list of signal names in order of
- * signal number. This is intended
- * to be used as a static array initialization, like this:
- * char *sig_name[] = { SIG_NAME };
- * The signals in the list are separated with commas, and each signal
- * is surrounded by double quotes. There is no leading SIG in the signal
- * name, i.e. SIGQUIT is known as "QUIT".
- * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
- * etc., where nn is the actual signal number (e.g. NUM37).
- * The signal number for sig_name[i] is stored in sig_num[i].
- * The last element is 0 to terminate the list with a NULL. This
- * corresponds to the 0 at the end of the sig_name_init list.
- * Note that this variable is initialized from the sig_name_init,
- * not from sig_name (which is unused).
- */
-/* SIG_NUM:
- * This symbol contains a list of signal numbers, in the same order as the
- * SIG_NAME list. It is suitable for static array initialization, as in:
- * int sig_num[] = { SIG_NUM };
- * The signals in the list are separated with commas, and the indices
- * within that list and the SIG_NAME list match, so it's easy to compute
- * the signal name from a number or vice versa at the price of a small
- * dynamic linear lookup.
- * Duplicates are allowed, but are moved to the end of the list.
- * The signal number corresponding to sig_name[i] is sig_number[i].
- * if (i < NSIG) then sig_number[i] == i.
- * The last element is 0, corresponding to the 0 at the end of
- * the sig_name_init list.
- * Note that this variable is initialized from the sig_num_init,
- * not from sig_num (which is unused).
- */
-/* SIG_SIZE:
- * This variable contains the number of elements of the SIG_NAME
- * and SIG_NUM arrays, excluding the final NULL entry.
- */
-#define SIG_NAME "ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/
-#define SIG_NUM 0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0 /**/
-#define SIG_SIZE 27 /**/
-
-/* SITEARCH:
- * This symbol contains the name of the private library for this package.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world. The program
- * should be prepared to do ~ expansion.
- * The standard distribution will put nothing in this directory.
- * After perl has been installed, users may install their own local
- * architecture-dependent modules in this directory with
- * MakeMaker Makefile.PL
- * or equivalent. See INSTALL for details.
- */
-/* SITEARCH_EXP:
- * This symbol contains the ~name expanded version of SITEARCH, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-#define SITEARCH "c:\\perl\\site\\lib" /**/
-/*#define SITEARCH_EXP "" / **/
-
-/* SITELIB:
- * This symbol contains the name of the private library for this package.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world. The program
- * should be prepared to do ~ expansion.
- * The standard distribution will put nothing in this directory.
- * After perl has been installed, users may install their own local
- * architecture-independent modules in this directory with
- * MakeMaker Makefile.PL
- * or equivalent. See INSTALL for details.
- */
-/* SITELIB_EXP:
- * This symbol contains the ~name expanded version of SITELIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-/* SITELIB_STEM:
- * This define is SITELIB_EXP with any trailing version-specific component
- * removed. The elements in inc_version_list (inc_version_list.U) can
- * be tacked onto this variable to generate a list of directories to search.
- */
-#define SITELIB "c:\\perl\\site\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib(PERL_VERSION_STRING)) /**/
-#define SITELIB_STEM "" /**/
-
-/* Size_t_size:
- * This symbol holds the size of a Size_t in bytes.
- */
-#define Size_t_size 8 /**/
-
-/* Size_t:
- * This symbol holds the type used to declare length parameters
- * for string functions. It is usually size_t, but may be
- * unsigned long, int, etc. It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Size_t size_t /* length paramater for string functions */
-
-/* Sock_size_t:
- * This symbol holds the type used for the size argument of
- * various socket calls (just the base type, not the pointer-to).
- */
-#define Sock_size_t int /**/
-
-/* STDCHAR:
- * This symbol is defined to be the type of char used in stdio.h.
- * It has the values "unsigned char" or "char".
- */
-#define STDCHAR char /**/
-
-/* Uid_t_f:
- * This symbol defines the format string used for printing a Uid_t.
- */
-#define Uid_t_f "ld" /**/
-
-/* Uid_t_sign:
- * This symbol holds the signedess of a Uid_t.
- * 1 for unsigned, -1 for signed.
- */
-#define Uid_t_sign -1 /* UID sign */
-
-/* Uid_t_size:
- * This symbol holds the size of a Uid_t in bytes.
- */
-#define Uid_t_size 4 /* UID size */
-
-/* Uid_t:
- * This symbol holds the type used to declare user ids in the kernel.
- * It can be int, ushort, uid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Uid_t uid_t /* UID type */
-
-/* USE_ITHREADS:
- * This symbol, if defined, indicates that Perl should be built to
- * use the interpreter-based threading implementation.
- */
-/* USE_5005THREADS:
- * This symbol, if defined, indicates that Perl should be built to
- * use the 5.005-based threading implementation.
- * Only valid up to 5.8.x.
- */
-/* OLD_PTHREADS_API:
- * This symbol, if defined, indicates that Perl should
- * be built to use the old draft POSIX threads API.
- */
-/* USE_REENTRANT_API:
- * This symbol, if defined, indicates that Perl should
- * try to use the various _r versions of library functions.
- * This is extremely experimental.
- */
-/*#define USE_5005THREADS / **/
-/*#define USE_ITHREADS / **/
-#if defined(USE_5005THREADS) && !defined(USE_ITHREADS)
-#define USE_THREADS /* until src is revised*/
-#endif
-/*#define OLD_PTHREADS_API / **/
-/*#define USE_REENTRANT_API / **/
-
-/* PERL_VENDORARCH:
- * If defined, this symbol contains the name of a private library.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world.
- * It may have a ~ on the front.
- * The standard distribution will put nothing in this directory.
- * Vendors who distribute perl may wish to place their own
- * architecture-dependent modules and extensions in this directory with
- * MakeMaker Makefile.PL INSTALLDIRS=vendor
- * or equivalent. See INSTALL for details.
- */
-/* PERL_VENDORARCH_EXP:
- * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-/*#define PERL_VENDORARCH "" / **/
-/*#define PERL_VENDORARCH_EXP "" / **/
-
-/* PERL_VENDORLIB_EXP:
- * This symbol contains the ~name expanded version of VENDORLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-/* PERL_VENDORLIB_STEM:
- * This define is PERL_VENDORLIB_EXP with any trailing version-specific component
- * removed. The elements in inc_version_list (inc_version_list.U) can
- * be tacked onto this variable to generate a list of directories to search.
- */
-/*#define PERL_VENDORLIB_EXP "" / **/
-/*#define PERL_VENDORLIB_STEM "" / **/
-
-/* VOIDFLAGS:
- * This symbol indicates how much support of the void type is given by this
- * compiler. What various bits mean:
- *
- * 1 = supports declaration of void
- * 2 = supports arrays of pointers to functions returning void
- * 4 = supports comparisons between pointers to void functions and
- * addresses of void functions
- * 8 = suports declaration of generic void pointers
- *
- * The package designer should define VOIDUSED to indicate the requirements
- * of the package. This can be done either by #defining VOIDUSED before
- * including config.h, or by defining defvoidused in Myinit.U. If the
- * latter approach is taken, only those flags will be tested. If the
- * level of void support necessary is not present, defines void to int.
- */
-#ifndef VOIDUSED
-#define VOIDUSED 15
-#endif
-#define VOIDFLAGS 15
-#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
-#define void int /* is void to be avoided? */
-#define M_VOID /* Xenix strikes again */
-#endif
-
-/* USE_CROSS_COMPILE:
- * This symbol, if defined, indicates that Perl is being cross-compiled.
- */
-/* PERL_TARGETARCH:
- * This symbol, if defined, indicates the target architecture
- * Perl has been cross-compiled to. Undefined if not a cross-compile.
- */
-#ifndef USE_CROSS_COMPILE
-/*#define USE_CROSS_COMPILE / **/
-#define PERL_TARGETARCH "" /**/
-#endif
-
-/* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double, or a long double when applicable. Usual values are 2,
- * 4 and 8. The default is eight, for safety.
- */
-#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
-# define MEM_ALIGNBYTES 8
-#else
-#define MEM_ALIGNBYTES 8
-#endif
-
-/* BYTEORDER:
- * This symbol holds the hexadecimal constant defined in byteorder,
- * in a UV, i.e. 0x1234 or 0x4321 or 0x12345678, etc...
- * If the compiler supports cross-compiling or multiple-architecture
- * binaries (eg. on NeXT systems), use compiler-defined macros to
- * determine the byte order.
- * On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture
- * Binaries (MAB) on either big endian or little endian machines.
- * The endian-ness is available at compile-time. This only matters
- * for perl, where the config.h can be generated and installed on
- * one system, and used by a different architecture to build an
- * extension. Older versions of NeXT that might not have
- * defined either *_ENDIAN__ were all on Motorola 680x0 series,
- * so the default case (for NeXT) is big endian to catch them.
- * This might matter for NeXT 3.0.
- */
-#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
-# ifdef __LITTLE_ENDIAN__
-# if LONGSIZE == 4
-# define BYTEORDER 0x1234
-# else
-# if LONGSIZE == 8
-# define BYTEORDER 0x12345678
-# endif
-# endif
-# else
-# ifdef __BIG_ENDIAN__
-# if LONGSIZE == 4
-# define BYTEORDER 0x4321
-# else
-# if LONGSIZE == 8
-# define BYTEORDER 0x87654321
-# endif
-# endif
-# endif
-# endif
-# if !defined(BYTEORDER) && (defined(NeXT) || defined(__NeXT__))
-# define BYTEORDER 0x4321
-# endif
-#else
-#define BYTEORDER 0x1234 /* large digits for MSB */
-#endif /* NeXT */
-
-/* CHARBITS:
- * This symbol contains the size of a char, so that the C preprocessor
- * can make decisions based on it.
- */
-#define CHARBITS 8 /**/
-
-/* CASTI32:
- * This symbol is defined if the C compiler can cast negative
- * or large floating point numbers to 32-bit ints.
- */
-#ifndef _MSC_VER
-# define CASTI32 /**/
-#endif
-
-/* CASTNEGFLOAT:
- * This symbol is defined if the C compiler can cast negative
- * numbers to unsigned longs, ints and shorts.
- */
-/* CASTFLAGS:
- * This symbol contains flags that say what difficulties the compiler
- * has casting odd floating values to unsigned long:
- * 0 = ok
- * 1 = couldn't cast < 0
- * 2 = couldn't cast >= 0x80000000
- * 4 = couldn't cast in argument expression list
- */
-#define CASTNEGFLOAT /**/
-#define CASTFLAGS 0 /**/
-
-/* VOID_CLOSEDIR:
- * This symbol, if defined, indicates that the closedir() routine
- * does not return a value.
- */
-/*#define VOID_CLOSEDIR / **/
-
-/* HAS_FD_SET:
- * This symbol, when defined, indicates presence of the fd_set typedef
- * in <sys/types.h>
- */
-#define HAS_FD_SET /**/
-
-/* Gconvert:
- * This preprocessor macro is defined to convert a floating point
- * number to a string without a trailing decimal point. This
- * emulates the behavior of sprintf("%g"), but is sometimes much more
- * efficient. If gconvert() is not available, but gcvt() drops the
- * trailing decimal point, then gcvt() is used. If all else fails,
- * a macro using sprintf("%g") is used. Arguments for the Gconvert
- * macro are: value, number of digits, whether trailing zeros should
- * be retained, and the output buffer.
- * The usual values are:
- * d_Gconvert='gconvert((x),(n),(t),(b))'
- * d_Gconvert='gcvt((x),(n),(b))'
- * d_Gconvert='sprintf((b),"%.*g",(n),(x))'
- * The last two assume trailing zeros should not be kept.
- */
-#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
-
-/* HAS_GETPAGESIZE:
- * This symbol, if defined, indicates that the getpagesize system call
- * is available to get system page size, which is the granularity of
- * many memory management calls.
- */
-/*#define HAS_GETPAGESIZE / **/
-
-/* HAS_GNULIBC:
- * This symbol, if defined, indicates to the C program that
- * the GNU C library is being used. A better check is to use
- * the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc.
- */
-/*#define HAS_GNULIBC / **/
-#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)
-# define _GNU_SOURCE
-#endif
-
-/* HAS_ISASCII:
- * This manifest constant lets the C program know that isascii
- * is available.
- */
-#define HAS_ISASCII /**/
-
-/* HAS_LCHOWN:
- * This symbol, if defined, indicates that the lchown routine is
- * available to operate on a symbolic link (instead of following the
- * link).
- */
-/*#define HAS_LCHOWN / **/
-
-/* HAS_OPEN3:
- * This manifest constant lets the C program know that the three
- * argument form of open(2) is available.
- */
-/*#define HAS_OPEN3 / **/
-
-/* HAS_SAFE_BCOPY:
- * This symbol, if defined, indicates that the bcopy routine is available
- * to copy potentially overlapping memory blocks. Normally, you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-/*#define HAS_SAFE_BCOPY / **/
-
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. If you need to
- * copy overlapping memory blocks, you should check HAS_MEMMOVE and
- * use memmove() instead, if available.
- */
-/*#define HAS_SAFE_MEMCPY / **/
-
-/* HAS_SANE_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * and can be used to compare relative magnitudes of chars with their high
- * bits set. If it is not defined, roll your own version.
- */
-#define HAS_SANE_MEMCMP /**/
-
-/* HAS_SIGACTION:
- * This symbol, if defined, indicates that Vr4's sigaction() routine
- * is available.
- */
-/*#define HAS_SIGACTION / **/
-
-/* HAS_SIGSETJMP:
- * This variable indicates to the C program that the sigsetjmp()
- * routine is available to save the calling process's registers
- * and stack environment for later use by siglongjmp(), and
- * to optionally save the process's signal mask. See
- * Sigjmp_buf, Sigsetjmp, and Siglongjmp.
- */
-/* Sigjmp_buf:
- * This is the buffer type to be used with Sigsetjmp and Siglongjmp.
- */
-/* Sigsetjmp:
- * This macro is used in the same way as sigsetjmp(), but will invoke
- * traditional setjmp() if sigsetjmp isn't available.
- * See HAS_SIGSETJMP.
- */
-/* Siglongjmp:
- * This macro is used in the same way as siglongjmp(), but will invoke
- * traditional longjmp() if siglongjmp isn't available.
- * See HAS_SIGSETJMP.
- */
-/*#define HAS_SIGSETJMP / **/
-#ifdef HAS_SIGSETJMP
-#define Sigjmp_buf sigjmp_buf
-#define Sigsetjmp(buf,save_mask) sigsetjmp((buf),(save_mask))
-#define Siglongjmp(buf,retval) siglongjmp((buf),(retval))
-#else
-#define Sigjmp_buf jmp_buf
-#define Sigsetjmp(buf,save_mask) setjmp((buf))
-#define Siglongjmp(buf,retval) longjmp((buf),(retval))
-#endif
-
-/* HAS_STATIC_INLINE:
- * This symbol, if defined, indicates that the C compiler supports
- * C99-style static inline. That is, the function can't be called
- * from another translation unit.
- */
-/* PERL_STATIC_INLINE:
- * This symbol gives the best-guess incantation to use for static
- * inline functions. If HAS_STATIC_INLINE is defined, this will
- * give C99-style inline. If HAS_STATIC_INLINE is not defined,
- * this will give a plain 'static'. It will always be defined
- * to something that gives static linkage.
- * Possibilities include
- * static inline (c99)
- * static __inline__ (gcc -ansi)
- * static __inline (MSVC)
- * static _inline (older MSVC)
- * static (c89 compilers)
- */
-#ifdef _MSC_VER
-# define HAS_STATIC_INLINE /**/
-# define PERL_STATIC_INLINE static __inline /**/
-#else /* gcc presumably */
-# define HAS_STATIC_INLINE /**/
-# define PERL_STATIC_INLINE static __inline__ /**/
-#endif
-
-/* USE_STDIO_PTR:
- * This symbol is defined if the _ptr and _cnt fields (or similar)
- * of the stdio FILE structure can be used to access the stdio buffer
- * for a file handle. If this is defined, then the FILE_ptr(fp)
- * and FILE_cnt(fp) macros will also be defined and should be used
- * to access these fields.
- */
-/* FILE_ptr:
- * This macro is used to access the _ptr field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_PTR_LVALUE:
- * This symbol is defined if the FILE_ptr macro can be used as an
- * lvalue.
- */
-/* FILE_cnt:
- * This macro is used to access the _cnt field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_CNT_LVALUE:
- * This symbol is defined if the FILE_cnt macro can be used as an
- * lvalue.
- */
-/* STDIO_PTR_LVAL_SETS_CNT:
- * This symbol is defined if using the FILE_ptr macro as an lvalue
- * to increase the pointer by n has the side effect of decreasing the
- * value of File_cnt(fp) by n.
- */
-/* STDIO_PTR_LVAL_NOCHANGE_CNT:
- * This symbol is defined if using the FILE_ptr macro as an lvalue
- * to increase the pointer by n leaves File_cnt(fp) unchanged.
- */
-#define USE_STDIO_PTR /**/
-#ifdef USE_STDIO_PTR
-#define FILE_ptr(fp) ((fp)->_ptr)
-#define STDIO_PTR_LVALUE /**/
-#define FILE_cnt(fp) ((fp)->_cnt)
-#define STDIO_CNT_LVALUE /**/
-/*#define STDIO_PTR_LVAL_SETS_CNT / **/
-#define STDIO_PTR_LVAL_NOCHANGE_CNT /**/
-#endif
-
-/* USE_STDIO_BASE:
- * This symbol is defined if the _base field (or similar) of the
- * stdio FILE structure can be used to access the stdio buffer for
- * a file handle. If this is defined, then the FILE_base(fp) macro
- * will also be defined and should be used to access this field.
- * Also, the FILE_bufsiz(fp) macro will be defined and should be used
- * to determine the number of bytes in the buffer. USE_STDIO_BASE
- * will never be defined unless USE_STDIO_PTR is.
- */
-/* FILE_base:
- * This macro is used to access the _base field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_BASE is defined.
- */
-/* FILE_bufsiz:
- * This macro is used to determine the number of bytes in the I/O
- * buffer pointed to by _base field (or equivalent) of the FILE
- * structure pointed to its argument. This macro will always be defined
- * if USE_STDIO_BASE is defined.
- */
-#define USE_STDIO_BASE /**/
-#ifdef USE_STDIO_BASE
-#define FILE_base(fp) ((fp)->_base)
-#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
-#endif
-
-/* HAS_VPRINTF:
- * This symbol, if defined, indicates that the vprintf routine is available
- * to printf with a pointer to an argument list. If unavailable, you
- * may need to write your own, probably in terms of _doprnt().
- */
-/* USE_CHAR_VSPRINTF:
- * This symbol is defined if this system has vsprintf() returning type
- * (char*). The trend seems to be to declare it as "int vsprintf()". It
- * is up to the package author to declare vsprintf correctly based on the
- * symbol.
- */
-#define HAS_VPRINTF /**/
-/*#define USE_CHAR_VSPRINTF / **/
-
-/* DOUBLESIZE:
- * This symbol contains the size of a double, so that the C preprocessor
- * can make decisions based on it.
- */
-#define DOUBLESIZE 8 /**/
-
-/* I_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <time.h>.
- */
-/* I_SYS_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h>.
- */
-/* I_SYS_TIME_KERNEL:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h> with KERNEL defined.
- */
-/* HAS_TM_TM_ZONE:
- * This symbol, if defined, indicates to the C program that
- * the struct tm has a tm_zone field.
- */
-/* HAS_TM_TM_GMTOFF:
- * This symbol, if defined, indicates to the C program that
- * the struct tm has a tm_gmtoff field.
- */
-#define I_TIME /**/
-/*#define I_SYS_TIME / **/
-/*#define I_SYS_TIME_KERNEL / **/
-/*#define HAS_TM_TM_ZONE / **/
-/*#define HAS_TM_TM_GMTOFF / **/
-
-/* VAL_O_NONBLOCK:
- * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
- * non-blocking I/O for the file descriptor. Note that there is no way
- * back, i.e. you cannot turn it blocking again this way. If you wish to
- * alternatively switch between blocking and non-blocking, use the
- * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
- */
-/* VAL_EAGAIN:
- * This symbol holds the errno error code set by read() when no data was
- * present on the non-blocking file descriptor.
- */
-/* RD_NODATA:
- * This symbol holds the return code from read() when no data is present
- * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
- * not defined, then you can't distinguish between no data and EOF by
- * issuing a read(). You'll have to find another way to tell for sure!
- */
-/* EOF_NONBLOCK:
- * This symbol, if defined, indicates to the C program that a read() on
- * a non-blocking file descriptor will return 0 on EOF, and not the value
- * held in RD_NODATA (-1 usually, in that case!).
- */
-#define VAL_O_NONBLOCK O_NONBLOCK
-#define VAL_EAGAIN EAGAIN
-#define RD_NODATA -1
-#define EOF_NONBLOCK
-
-/* PTRSIZE:
- * This symbol contains the size of a pointer, so that the C preprocessor
- * can make decisions based on it. It will be sizeof(void *) if
- * the compiler supports (void *); otherwise it will be
- * sizeof(char *).
- */
-#define PTRSIZE 8 /**/
-
-/* Drand01:
- * This macro is to be used to generate uniformly distributed
- * random numbers over the range [0., 1.[. You may have to supply
- * an 'extern double drand48();' in your program since SunOS 4.1.3
- * doesn't provide you with anything relevant in its headers.
- * See HAS_DRAND48_PROTO.
- */
-/* Rand_seed_t:
- * This symbol defines the type of the argument of the
- * random seed function.
- */
-/* seedDrand01:
- * This symbol defines the macro to be used in seeding the
- * random number generator (see Drand01).
- */
-/* RANDBITS:
- * This symbol indicates how many bits are produced by the
- * function used to generate normalized random numbers.
- * Values include 15, 16, 31, and 48.
- */
-#define Drand01() (rand()/(double)((unsigned)1<<RANDBITS)) /**/
-#define Rand_seed_t unsigned /**/
-#define seedDrand01(x) srand((Rand_seed_t)x) /**/
-#define RANDBITS 15 /**/
-
-/* SSize_t:
- * This symbol holds the type used by functions that return
- * a count of bytes or an error condition. It must be a signed type.
- * It is usually ssize_t, but may be long or int, etc.
- * It may be necessary to include <sys/types.h> or <unistd.h>
- * to get any typedef'ed information.
- * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
- */
-#ifdef _MSC_VER
-# define SSize_t __int64 /* signed count of bytes */
-#else
-# define SSize_t long long /* signed count of bytes */
-#endif
-
-/* EBCDIC:
- * This symbol, if defined, indicates that this system uses
- * EBCDIC encoding.
- */
-/*#define EBCDIC / **/
-
-/* SETUID_SCRIPTS_ARE_SECURE_NOW:
- * This symbol, if defined, indicates that the bug that prevents
- * setuid scripts from being secure is not present in this kernel.
- */
-/* DOSUID:
- * This symbol, if defined, indicates that the C program should
- * check the script that it is executing for setuid/setgid bits, and
- * attempt to emulate setuid/setgid on systems that have disabled
- * setuid #! scripts because the kernel can't do it securely.
- * It is up to the package designer to make sure that this emulation
- * is done securely. Among other things, it should do an fstat on
- * the script it just opened to make sure it really is a setuid/setgid
- * script, it should make sure the arguments passed correspond exactly
- * to the argument on the #! line, and it should not trust any
- * subprocesses to which it must pass the filename rather than the
- * file descriptor of the script to be executed.
- */
-/*#define SETUID_SCRIPTS_ARE_SECURE_NOW / **/
-/*#define DOSUID / **/
-
-/* PERL_USE_DEVEL:
- * This symbol, if defined, indicates that Perl was configured with
- * -Dusedevel, to enable development features. This should not be
- * done for production builds.
- */
-/*#define PERL_USE_DEVEL / **/
-
-/* HAS_ATOLF:
- * This symbol, if defined, indicates that the atolf routine is
- * available to convert strings into long doubles.
- */
-/*#define HAS_ATOLF / **/
-
-/* HAS_ATOLL:
- * This symbol, if defined, indicates that the atoll routine is
- * available to convert strings into long longs.
- */
-#define HAS_ATOLL /**/
-
-/* HAS__FWALK:
- * This symbol, if defined, indicates that the _fwalk system call is
- * available to apply a function to all the file handles.
- */
-/*#define HAS__FWALK / **/
-
-/* HAS_AINTL:
- * This symbol, if defined, indicates that the aintl routine is
- * available. If copysignl is also present we can emulate modfl.
- */
-/*#define HAS_AINTL / **/
-
-/* HAS_BUILTIN_CHOOSE_EXPR:
- * Can we handle GCC builtin for compile-time ternary-like expressions
- */
-/* HAS_BUILTIN_EXPECT:
- * Can we handle GCC builtin for telling that certain values are more
- * likely
- */
-/*#define HAS_BUILTIN_EXPECT / **/
-/*#define HAS_BUILTIN_CHOOSE_EXPR / **/
-
-/* HAS_C99_VARIADIC_MACROS:
- * If defined, the compiler supports C99 variadic macros.
- */
-/*#define HAS_C99_VARIADIC_MACROS / **/
-
-/* HAS_CLASS:
- * This symbol, if defined, indicates that the class routine is
- * available to classify doubles. Available for example in AIX.
- * The returned values are defined in <float.h> and are:
- *
- * FP_PLUS_NORM Positive normalized, nonzero
- * FP_MINUS_NORM Negative normalized, nonzero
- * FP_PLUS_DENORM Positive denormalized, nonzero
- * FP_MINUS_DENORM Negative denormalized, nonzero
- * FP_PLUS_ZERO +0.0
- * FP_MINUS_ZERO -0.0
- * FP_PLUS_INF +INF
- * FP_MINUS_INF -INF
- * FP_NANS Signaling Not a Number (NaNS)
- * FP_NANQ Quiet Not a Number (NaNQ)
- */
-/*#define HAS_CLASS / **/
-
-/* HAS_CLEARENV:
- * This symbol, if defined, indicates that the clearenv () routine is
- * available for use.
- */
-/*#define HAS_CLEARENV / **/
-
-/* HAS_STRUCT_CMSGHDR:
- * This symbol, if defined, indicates that the struct cmsghdr
- * is supported.
- */
-/*#define HAS_STRUCT_CMSGHDR / **/
-
-/* HAS_COPYSIGNL:
- * This symbol, if defined, indicates that the copysignl routine is
- * available. If aintl is also present we can emulate modfl.
- */
-/*#define HAS_COPYSIGNL / **/
-
-/* USE_CPLUSPLUS:
- * This symbol, if defined, indicates that a C++ compiler was
- * used to compiled Perl and will be used to compile extensions.
- */
-/*#define USE_CPLUSPLUS / **/
-
-/* HAS_DBMINIT_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the dbminit() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int dbminit(char *);
- */
-/*#define HAS_DBMINIT_PROTO / **/
-
-/* HAS_DIR_DD_FD:
- * This symbol, if defined, indicates that the the DIR* dirstream
- * structure contains a member variable named dd_fd.
- */
-/*#define HAS_DIR_DD_FD / **/
-
-/* HAS_DIRFD:
- * This manifest constant lets the C program know that dirfd
- * is available.
- */
-/*#define HAS_DIRFD / **/
-
-/* DLSYM_NEEDS_UNDERSCORE:
- * This symbol, if defined, indicates that we need to prepend an
- * underscore to the symbol name before calling dlsym(). This only
- * makes sense if you *have* dlsym, which we will presume is the
- * case if you're using dl_dlopen.xs.
- */
-/*#define DLSYM_NEEDS_UNDERSCORE / **/
-
-/* HAS_FAST_STDIO:
- * This symbol, if defined, indicates that the "fast stdio"
- * is available to manipulate the stdio buffers directly.
- */
-#define HAS_FAST_STDIO /**/
-
-/* HAS_FCHDIR:
- * This symbol, if defined, indicates that the fchdir routine is
- * available to change directory using a file descriptor.
- */
-/*#define HAS_FCHDIR / **/
-
-/* FCNTL_CAN_LOCK:
- * This symbol, if defined, indicates that fcntl() can be used
- * for file locking. Normally on Unix systems this is defined.
- * It may be undefined on VMS.
- */
-/*#define FCNTL_CAN_LOCK / **/
-
-/* HAS_FINITE:
- * This symbol, if defined, indicates that the finite routine is
- * available to check whether a double is finite (non-infinity non-NaN).
- */
-/*#define HAS_FINITE / **/
-
-/* HAS_FINITEL:
- * This symbol, if defined, indicates that the finitel routine is
- * available to check whether a long double is finite
- * (non-infinity non-NaN).
- */
-/*#define HAS_FINITEL / **/
-
-/* HAS_FLOCK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the flock() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int flock(int, int);
- */
-#define HAS_FLOCK_PROTO /**/
-
-/* HAS_FP_CLASS:
- * This symbol, if defined, indicates that the fp_class routine is
- * available to classify doubles. Available for example in Digital UNIX.
- * The returned values are defined in <math.h> and are:
- *
- * FP_SNAN Signaling NaN (Not-a-Number)
- * FP_QNAN Quiet NaN (Not-a-Number)
- * FP_POS_INF +infinity
- * FP_NEG_INF -infinity
- * FP_POS_NORM Positive normalized
- * FP_NEG_NORM Negative normalized
- * FP_POS_DENORM Positive denormalized
- * FP_NEG_DENORM Negative denormalized
- * FP_POS_ZERO +0.0 (positive zero)
- * FP_NEG_ZERO -0.0 (negative zero)
- */
-/*#define HAS_FP_CLASS / **/
-
-/* HAS_FPCLASS:
- * This symbol, if defined, indicates that the fpclass routine is
- * available to classify doubles. Available for example in Solaris/SVR4.
- * The returned values are defined in <ieeefp.h> and are:
- *
- * FP_SNAN signaling NaN
- * FP_QNAN quiet NaN
- * FP_NINF negative infinity
- * FP_PINF positive infinity
- * FP_NDENORM negative denormalized non-zero
- * FP_PDENORM positive denormalized non-zero
- * FP_NZERO negative zero
- * FP_PZERO positive zero
- * FP_NNORM negative normalized non-zero
- * FP_PNORM positive normalized non-zero
- */
-/*#define HAS_FPCLASS / **/
-
-/* HAS_FPCLASSIFY:
- * This symbol, if defined, indicates that the fpclassify routine is
- * available to classify doubles. Available for example in HP-UX.
- * The returned values are defined in <math.h> and are
- *
- * FP_NORMAL Normalized
- * FP_ZERO Zero
- * FP_INFINITE Infinity
- * FP_SUBNORMAL Denormalized
- * FP_NAN NaN
- *
- */
-/*#define HAS_FPCLASSIFY / **/
-
-/* HAS_FPCLASSL:
- * This symbol, if defined, indicates that the fpclassl routine is
- * available to classify long doubles. Available for example in IRIX.
- * The returned values are defined in <ieeefp.h> and are:
- *
- * FP_SNAN signaling NaN
- * FP_QNAN quiet NaN
- * FP_NINF negative infinity
- * FP_PINF positive infinity
- * FP_NDENORM negative denormalized non-zero
- * FP_PDENORM positive denormalized non-zero
- * FP_NZERO negative zero
- * FP_PZERO positive zero
- * FP_NNORM negative normalized non-zero
- * FP_PNORM positive normalized non-zero
- */
-/*#define HAS_FPCLASSL / **/
-
-/* HAS_FPOS64_T:
- * This symbol will be defined if the C compiler supports fpos64_t.
- */
-/*#define HAS_FPOS64_T / **/
-
-/* HAS_FREXPL:
- * This symbol, if defined, indicates that the frexpl routine is
- * available to break a long double floating-point number into
- * a normalized fraction and an integral power of 2.
- */
-/*#define HAS_FREXPL / **/
-
-/* HAS_STRUCT_FS_DATA:
- * This symbol, if defined, indicates that the struct fs_data
- * to do statfs() is supported.
- */
-/*#define HAS_STRUCT_FS_DATA / **/
-
-/* HAS_FSEEKO:
- * This symbol, if defined, indicates that the fseeko routine is
- * available to fseek beyond 32 bits (useful for ILP32 hosts).
- */
-/*#define HAS_FSEEKO / **/
-
-/* HAS_FSTATFS:
- * This symbol, if defined, indicates that the fstatfs routine is
- * available to stat filesystems by file descriptors.
- */
-/*#define HAS_FSTATFS / **/
-
-/* HAS_FSYNC:
- * This symbol, if defined, indicates that the fsync routine is
- * available to write a file's modified data and attributes to
- * permanent storage.
- */
-/*#define HAS_FSYNC / **/
-
-/* HAS_FTELLO:
- * This symbol, if defined, indicates that the ftello routine is
- * available to ftell beyond 32 bits (useful for ILP32 hosts).
- */
-/*#define HAS_FTELLO / **/
-
-/* HAS_FUTIMES:
- * This symbol, if defined, indicates that the futimes routine is
- * available to change file descriptor time stamps with struct timevals.
- */
-/*#define HAS_FUTIMES / **/
-
-/* HAS_GETADDRINFO:
- * This symbol, if defined, indicates that the getaddrinfo() function
- * is available for use.
- */
-/*#define HAS_GETADDRINFO / **/
-
-/* HAS_GETCWD:
- * This symbol, if defined, indicates that the getcwd routine is
- * available to get the current working directory.
- */
-#define HAS_GETCWD /**/
-
-/* HAS_GETESPWNAM:
- * This symbol, if defined, indicates that the getespwnam system call is
- * available to retrieve enchanced (shadow) password entries by name.
- */
-/*#define HAS_GETESPWNAM / **/
-
-/* HAS_GETFSSTAT:
- * This symbol, if defined, indicates that the getfsstat routine is
- * available to stat filesystems in bulk.
- */
-/*#define HAS_GETFSSTAT / **/
-
-/* HAS_GETITIMER:
- * This symbol, if defined, indicates that the getitimer routine is
- * available to return interval timers.
- */
-/*#define HAS_GETITIMER / **/
-
-/* HAS_GETMNT:
- * This symbol, if defined, indicates that the getmnt routine is
- * available to get filesystem mount info by filename.
- */
-/*#define HAS_GETMNT / **/
-
-/* HAS_GETMNTENT:
- * This symbol, if defined, indicates that the getmntent routine is
- * available to iterate through mounted file systems to get their info.
- */
-/*#define HAS_GETMNTENT / **/
-
-/* HAS_GETNAMEINFO:
- * This symbol, if defined, indicates that the getnameinfo() function
- * is available for use.
- */
-/*#define HAS_GETNAMEINFO / **/
-
-/* HAS_GETPRPWNAM:
- * This symbol, if defined, indicates that the getprpwnam system call is
- * available to retrieve protected (shadow) password entries by name.
- */
-/*#define HAS_GETPRPWNAM / **/
-
-/* HAS_GETSPNAM:
- * This symbol, if defined, indicates that the getspnam system call is
- * available to retrieve SysV shadow password entries by name.
- */
-/*#define HAS_GETSPNAM / **/
-
-/* HAS_HASMNTOPT:
- * This symbol, if defined, indicates that the hasmntopt routine is
- * available to query the mount options of file systems.
- */
-/*#define HAS_HASMNTOPT / **/
-
-/* HAS_ILOGBL:
- * This symbol, if defined, indicates that the ilogbl routine is
- * available. If scalbnl is also present we can emulate frexpl.
- */
-/*#define HAS_ILOGBL / **/
-
-/* HAS_INETNTOP:
- * This symbol, if defined, indicates that the inet_ntop() function
- * is available to parse IPv4 and IPv6 strings.
- */
-/*#define HAS_INETNTOP / **/
-
-/* HAS_INETPTON:
- * This symbol, if defined, indicates that the inet_pton() function
- * is available to parse IPv4 and IPv6 strings.
- */
-/*#define HAS_INETPTON / **/
-
-/* HAS_INT64_T:
- * This symbol will defined if the C compiler supports int64_t.
- * Usually the <inttypes.h> needs to be included, but sometimes
- * <sys/types.h> is enough.
- */
-/*#define HAS_INT64_T / **/
-
-/* HAS_ISFINITE:
- * This symbol, if defined, indicates that the isfinite routine is
- * available to check whether a double is finite (non-infinity non-NaN).
- */
-/*#define HAS_ISFINITE / **/
-
-/* HAS_ISINF:
- * This symbol, if defined, indicates that the isinf routine is
- * available to check whether a double is an infinity.
- */
-/*#define HAS_ISINF / **/
-
-/* HAS_ISNAN:
- * This symbol, if defined, indicates that the isnan routine is
- * available to check whether a double is a NaN.
- */
-#define HAS_ISNAN /**/
-
-/* HAS_ISNANL:
- * This symbol, if defined, indicates that the isnanl routine is
- * available to check whether a long double is a NaN.
- */
-/*#define HAS_ISNANL / **/
-
-/* HAS_LDBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol LDBL_DIG, which is the number
- * of significant digits in a long double precision number. Unlike
- * for DBL_DIG, there's no good guess for LDBL_DIG if it is undefined.
- */
-#define HAS_LDBL_DIG /**/
-
-/* LIBM_LIB_VERSION:
- * This symbol, if defined, indicates that libm exports _LIB_VERSION
- * and that math.h defines the enum to manipulate it.
- */
-/*#define LIBM_LIB_VERSION / **/
-
-/* HAS_MADVISE:
- * This symbol, if defined, indicates that the madvise system call is
- * available to map a file into memory.
- */
-/*#define HAS_MADVISE / **/
-
-/* HAS_MALLOC_SIZE:
- * This symbol, if defined, indicates that the malloc_size
- * routine is available for use.
- */
-/*#define HAS_MALLOC_SIZE / **/
-
-/* HAS_MALLOC_GOOD_SIZE:
- * This symbol, if defined, indicates that the malloc_good_size
- * routine is available for use.
- */
-/*#define HAS_MALLOC_GOOD_SIZE / **/
-
-/* HAS_MKDTEMP:
- * This symbol, if defined, indicates that the mkdtemp routine is
- * available to exclusively create a uniquely named temporary directory.
- */
-/*#define HAS_MKDTEMP / **/
-
-/* HAS_MKSTEMPS:
- * This symbol, if defined, indicates that the mkstemps routine is
- * available to excluslvely create and open a uniquely named
- * (with a suffix) temporary file.
- */
-/*#define HAS_MKSTEMPS / **/
-
-/* HAS_MODFL:
- * This symbol, if defined, indicates that the modfl routine is
- * available to split a long double x into a fractional part f and
- * an integer part i such that |f| < 1.0 and (f + i) = x.
- */
-/* HAS_MODFL_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the modfl() function. Otherwise, it is up
- * to the program to supply one.
- */
-/* HAS_MODFL_POW32_BUG:
- * This symbol, if defined, indicates that the modfl routine is
- * broken for long doubles >= pow(2, 32).
- * For example from 4294967303.150000 one would get 4294967302.000000
- * and 1.150000. The bug has been seen in certain versions of glibc,
- * release 2.2.2 is known to be okay.
- */
-/*#define HAS_MODFL / **/
-/*#define HAS_MODFL_PROTO / **/
-/*#define HAS_MODFL_POW32_BUG / **/
-
-/* HAS_MPROTECT:
- * This symbol, if defined, indicates that the mprotect system call is
- * available to modify the access protection of a memory mapped file.
- */
-/*#define HAS_MPROTECT / **/
-
-/* HAS_STRUCT_MSGHDR:
- * This symbol, if defined, indicates that the struct msghdr
- * is supported.
- */
-/*#define HAS_STRUCT_MSGHDR / **/
-
-/* HAS_NL_LANGINFO:
- * This symbol, if defined, indicates that the nl_langinfo routine is
- * available to return local data. You will also need <langinfo.h>
- * and therefore I_LANGINFO.
- */
-/*#define HAS_NL_LANGINFO / **/
-
-/* HAS_OFF64_T:
- * This symbol will be defined if the C compiler supports off64_t.
- */
-/*#define HAS_OFF64_T / **/
-
-/* HAS_PROCSELFEXE:
- * This symbol is defined if PROCSELFEXE_PATH is a symlink
- * to the absolute pathname of the executing program.
- */
-/* PROCSELFEXE_PATH:
- * If HAS_PROCSELFEXE is defined this symbol is the filename
- * of the symbolic link pointing to the absolute pathname of
- * the executing program.
- */
-/*#define HAS_PROCSELFEXE / **/
-#if defined(HAS_PROCSELFEXE) && !defined(PROCSELFEXE_PATH)
-#define PROCSELFEXE_PATH /**/
-#endif
-
-/* HAS_PTHREAD_ATTR_SETSCOPE:
- * This symbol, if defined, indicates that the pthread_attr_setscope
- * system call is available to set the contention scope attribute of
- * a thread attribute object.
- */
-/*#define HAS_PTHREAD_ATTR_SETSCOPE / **/
-
-/* HAS_READV:
- * This symbol, if defined, indicates that the readv routine is
- * available to do gather reads. You will also need <sys/uio.h>
- * and there I_SYSUIO.
- */
-/*#define HAS_READV / **/
-
-/* HAS_RECVMSG:
- * This symbol, if defined, indicates that the recvmsg routine is
- * available to send structured socket messages.
- */
-/*#define HAS_RECVMSG / **/
-
-/* HAS_SBRK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the sbrk() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern void* sbrk(int);
- * extern void* sbrk(size_t);
- */
-/*#define HAS_SBRK_PROTO / **/
-
-/* HAS_SCALBNL:
- * This symbol, if defined, indicates that the scalbnl routine is
- * available. If ilogbl is also present we can emulate frexpl.
- */
-/*#define HAS_SCALBNL / **/
-
-/* HAS_SENDMSG:
- * This symbol, if defined, indicates that the sendmsg routine is
- * available to send structured socket messages.
- */
-/*#define HAS_SENDMSG / **/
-
-/* HAS_SETITIMER:
- * This symbol, if defined, indicates that the setitimer routine is
- * available to set interval timers.
- */
-/*#define HAS_SETITIMER / **/
-
-/* HAS_SETPROCTITLE:
- * This symbol, if defined, indicates that the setproctitle routine is
- * available to set process title.
- */
-/*#define HAS_SETPROCTITLE / **/
-
-/* USE_SFIO:
- * This symbol, if defined, indicates that sfio should
- * be used.
- */
-/*#define USE_SFIO / **/
-
-/* HAS_SIGNBIT:
- * This symbol, if defined, indicates that the signbit routine is
- * available to check if the given number has the sign bit set.
- * This should include correct testing of -0.0. This will only be set
- * if the signbit() routine is safe to use with the NV type used internally
- * in perl. Users should call Perl_signbit(), which will be #defined to
- * the system's signbit() function or macro if this symbol is defined.
- */
-/*#define HAS_SIGNBIT / **/
-
-/* HAS_SIGPROCMASK:
- * This symbol, if defined, indicates that the sigprocmask
- * system call is available to examine or change the signal mask
- * of the calling process.
- */
-/*#define HAS_SIGPROCMASK / **/
-
-/* USE_SITECUSTOMIZE:
- * This symbol, if defined, indicates that sitecustomize should
- * be used.
- */
-#ifndef USE_SITECUSTOMIZE
-/*#define USE_SITECUSTOMIZE / **/
-#endif
-
-/* HAS_SNPRINTF:
- * This symbol, if defined, indicates that the snprintf () library
- * function is available for use.
- */
-/* HAS_VSNPRINTF:
- * This symbol, if defined, indicates that the vsnprintf () library
- * function is available for use.
- */
-#define HAS_SNPRINTF /**/
-#define HAS_VSNPRINTF /**/
-
-/* HAS_SOCKATMARK:
- * This symbol, if defined, indicates that the sockatmark routine is
- * available to test whether a socket is at the out-of-band mark.
- */
-/*#define HAS_SOCKATMARK / **/
-
-/* HAS_SOCKATMARK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the sockatmark() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int sockatmark(int);
- */
-/*#define HAS_SOCKATMARK_PROTO / **/
-
-/* HAS_SOCKS5_INIT:
- * This symbol, if defined, indicates that the socks5_init routine is
- * available to initialize SOCKS 5.
- */
-/*#define HAS_SOCKS5_INIT / **/
-
-/* SPRINTF_RETURNS_STRLEN:
- * This variable defines whether sprintf returns the length of the string
- * (as per the ANSI spec). Some C libraries retain compatibility with
- * pre-ANSI C and return a pointer to the passed in buffer; for these
- * this variable will be undef.
- */
-#define SPRINTF_RETURNS_STRLEN /**/
-
-/* HAS_SQRTL:
- * This symbol, if defined, indicates that the sqrtl routine is
- * available to do long double square roots.
- */
-/*#define HAS_SQRTL / **/
-
-/* HAS_SETRESGID_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the setresgid() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern int setresgid(uid_t ruid, uid_t euid, uid_t suid);
- */
-/*#define HAS_SETRESGID_PROTO / **/
-
-/* HAS_SETRESUID_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the setresuid() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern int setresuid(uid_t ruid, uid_t euid, uid_t suid);
- */
-/*#define HAS_SETRESUID_PROTO / **/
-
-/* HAS_STRUCT_STATFS_F_FLAGS:
- * This symbol, if defined, indicates that the struct statfs
- * does have the f_flags member containing the mount flags of
- * the filesystem containing the file.
- * This kind of struct statfs is coming from <sys/mount.h> (BSD 4.3),
- * not from <sys/statfs.h> (SYSV). Older BSDs (like Ultrix) do not
- * have statfs() and struct statfs, they have ustat() and getmnt()
- * with struct ustat and struct fs_data.
- */
-/*#define HAS_STRUCT_STATFS_F_FLAGS / **/
-
-/* HAS_STRUCT_STATFS:
- * This symbol, if defined, indicates that the struct statfs
- * to do statfs() is supported.
- */
-/*#define HAS_STRUCT_STATFS / **/
-
-/* HAS_FSTATVFS:
- * This symbol, if defined, indicates that the fstatvfs routine is
- * available to stat filesystems by file descriptors.
- */
-/*#define HAS_FSTATVFS / **/
-
-/* HAS_STRFTIME:
- * This symbol, if defined, indicates that the strftime routine is
- * available to do time formatting.
- */
-#define HAS_STRFTIME /**/
-
-/* HAS_STRLCAT:
- * This symbol, if defined, indicates that the strlcat () routine is
- * available to do string concatenation.
- */
-/*#define HAS_STRLCAT / **/
-
-/* HAS_STRLCPY:
- * This symbol, if defined, indicates that the strlcpy () routine is
- * available to do string copying.
- */
-/*#define HAS_STRLCPY / **/
-
-/* HAS_STRTOLD:
- * This symbol, if defined, indicates that the strtold routine is
- * available to convert strings to long doubles.
- */
-/*#define HAS_STRTOLD / **/
-
-/* HAS_STRTOLL:
- * This symbol, if defined, indicates that the strtoll routine is
- * available to convert strings to long longs.
- */
-#define HAS_STRTOLL /**/
-
-/* HAS_STRTOQ:
- * This symbol, if defined, indicates that the strtoq routine is
- * available to convert strings to long longs (quads).
- */
-/*#define HAS_STRTOQ / **/
-
-/* HAS_STRTOULL:
- * This symbol, if defined, indicates that the strtoull routine is
- * available to convert strings to unsigned long longs.
- */
-#define HAS_STRTOULL /**/
-
-/* HAS_STRTOUQ:
- * This symbol, if defined, indicates that the strtouq routine is
- * available to convert strings to unsigned long longs (quads).
- */
-/*#define HAS_STRTOUQ / **/
-
-/* HAS_SYSCALL_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the syscall() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern int syscall(int, ...);
- * extern int syscall(long, ...);
- */
-/*#define HAS_SYSCALL_PROTO / **/
-
-/* HAS_TELLDIR_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the telldir() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern long telldir(DIR*);
- */
-#define HAS_TELLDIR_PROTO /**/
-
-/* HAS_CTIME64:
- * This symbol, if defined, indicates that the ctime64 () routine is
- * available to do the 64bit variant of ctime ()
- */
-/* HAS_LOCALTIME64:
- * This symbol, if defined, indicates that the localtime64 () routine is
- * available to do the 64bit variant of localtime ()
- */
-/* HAS_GMTIME64:
- * This symbol, if defined, indicates that the gmtime64 () routine is
- * available to do the 64bit variant of gmtime ()
- */
-/* HAS_MKTIME64:
- * This symbol, if defined, indicates that the mktime64 () routine is
- * available to do the 64bit variant of mktime ()
- */
-/* HAS_DIFFTIME64:
- * This symbol, if defined, indicates that the difftime64 () routine is
- * available to do the 64bit variant of difftime ()
- */
-/* HAS_ASCTIME64:
- * This symbol, if defined, indicates that the asctime64 () routine is
- * available to do the 64bit variant of asctime ()
- */
-/*#define HAS_CTIME64 / **/
-/*#define HAS_LOCALTIME64 / **/
-/*#define HAS_GMTIME64 / **/
-/*#define HAS_MKTIME64 / **/
-/*#define HAS_DIFFTIME64 / **/
-/*#define HAS_ASCTIME64 / **/
-
-/* HAS_TIMEGM:
- * This symbol, if defined, indicates that the timegm routine is
- * available to do the opposite of gmtime ()
- */
-/*#define HAS_TIMEGM / **/
-
-/* U32_ALIGNMENT_REQUIRED:
- * This symbol, if defined, indicates that you must access
- * character data through U32-aligned pointers.
- */
-#ifndef U32_ALIGNMENT_REQUIRED
-#define U32_ALIGNMENT_REQUIRED /**/
-#endif
-
-/* HAS_UALARM:
- * This symbol, if defined, indicates that the ualarm routine is
- * available to do alarms with microsecond granularity.
- */
-/*#define HAS_UALARM / **/
-
-/* HAS_UNORDERED:
- * This symbol, if defined, indicates that the unordered routine is
- * available to check whether two doubles are unordered
- * (effectively: whether either of them is NaN)
- */
-/*#define HAS_UNORDERED / **/
-
-/* HAS_UNSETENV:
- * This symbol, if defined, indicates that the unsetenv () routine is
- * available for use.
- */
-/*#define HAS_UNSETENV / **/
-
-/* HAS_USLEEP_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the usleep() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int usleep(useconds_t);
- */
-/*#define HAS_USLEEP_PROTO / **/
-
-/* HAS_USTAT:
- * This symbol, if defined, indicates that the ustat system call is
- * available to query file system statistics by dev_t.
- */
-/*#define HAS_USTAT / **/
-
-/* HAS_WRITEV:
- * This symbol, if defined, indicates that the writev routine is
- * available to do scatter writes.
- */
-/*#define HAS_WRITEV / **/
-
-/* USE_DYNAMIC_LOADING:
- * This symbol, if defined, indicates that dynamic loading of
- * some sort is available.
- */
-#define USE_DYNAMIC_LOADING /**/
-
-/* FFLUSH_NULL:
- * This symbol, if defined, tells that fflush(NULL) does flush
- * all pending stdio output.
- */
-/* FFLUSH_ALL:
- * This symbol, if defined, tells that to flush
- * all pending stdio output one must loop through all
- * the stdio file handles stored in an array and fflush them.
- * Note that if fflushNULL is defined, fflushall will not
- * even be probed for and will be left undefined.
- */
-#define FFLUSH_NULL /**/
-/*#define FFLUSH_ALL / **/
-
-/* I_ASSERT:
- * This symbol, if defined, indicates that <assert.h> exists and
- * could be included by the C program to get the assert() macro.
- */
-#define I_ASSERT /**/
-
-/* I_CRYPT:
- * This symbol, if defined, indicates that <crypt.h> exists and
- * should be included.
- */
-/*#define I_CRYPT / **/
-
-/* DB_Prefix_t:
- * This symbol contains the type of the prefix structure element
- * in the <db.h> header file. In older versions of DB, it was
- * int, while in newer ones it is u_int32_t.
- */
-/* DB_Hash_t:
- * This symbol contains the type of the prefix structure element
- * in the <db.h> header file. In older versions of DB, it was
- * int, while in newer ones it is size_t.
- */
-/* DB_VERSION_MAJOR_CFG:
- * This symbol, if defined, defines the major version number of
- * Berkeley DB found in the <db.h> header when Perl was configured.
- */
-/* DB_VERSION_MINOR_CFG:
- * This symbol, if defined, defines the minor version number of
- * Berkeley DB found in the <db.h> header when Perl was configured.
- * For DB version 1 this is always 0.
- */
-/* DB_VERSION_PATCH_CFG:
- * This symbol, if defined, defines the patch version number of
- * Berkeley DB found in the <db.h> header when Perl was configured.
- * For DB version 1 this is always 0.
- */
-#define DB_Hash_t int /**/
-#define DB_Prefix_t int /**/
-#define DB_VERSION_MAJOR_CFG 0 /**/
-#define DB_VERSION_MINOR_CFG 0 /**/
-#define DB_VERSION_PATCH_CFG 0 /**/
-
-/* I_FP:
- * This symbol, if defined, indicates that <fp.h> exists and
- * should be included.
- */
-/*#define I_FP / **/
-
-/* I_FP_CLASS:
- * This symbol, if defined, indicates that <fp_class.h> exists and
- * should be included.
- */
-/*#define I_FP_CLASS / **/
-
-/* I_IEEEFP:
- * This symbol, if defined, indicates that <ieeefp.h> exists and
- * should be included.
- */
-/*#define I_IEEEFP / **/
-
-/* I_INTTYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <inttypes.h>.
- */
-/*#define I_INTTYPES / **/
-
-/* I_LANGINFO:
- * This symbol, if defined, indicates that <langinfo.h> exists and
- * should be included.
- */
-/*#define I_LANGINFO / **/
-
-/* I_LIBUTIL:
- * This symbol, if defined, indicates that <libutil.h> exists and
- * should be included.
- */
-/*#define I_LIBUTIL / **/
-
-/* I_MALLOCMALLOC:
- * This symbol, if defined, indicates to the C program that it should
- * include <malloc/malloc.h>.
- */
-/*#define I_MALLOCMALLOC / **/
-
-/* I_MNTENT:
- * This symbol, if defined, indicates that <mntent.h> exists and
- * should be included.
- */
-/*#define I_MNTENT / **/
-
-/* I_NETINET_TCP:
- * This symbol, if defined, indicates to the C program that it should
- * include <netinet/tcp.h>.
- */
-/*#define I_NETINET_TCP / **/
-
-/* I_POLL:
- * This symbol, if defined, indicates that <poll.h> exists and
- * should be included. (see also HAS_POLL)
- */
-/*#define I_POLL / **/
-
-/* I_PROT:
- * This symbol, if defined, indicates that <prot.h> exists and
- * should be included.
- */
-/*#define I_PROT / **/
-
-/* I_SHADOW:
- * This symbol, if defined, indicates that <shadow.h> exists and
- * should be included.
- */
-/*#define I_SHADOW / **/
-
-/* I_SOCKS:
- * This symbol, if defined, indicates that <socks.h> exists and
- * should be included.
- */
-/*#define I_SOCKS / **/
-
-/* I_SUNMATH:
- * This symbol, if defined, indicates that <sunmath.h> exists and
- * should be included.
- */
-/*#define I_SUNMATH / **/
-
-/* I_SYSLOG:
- * This symbol, if defined, indicates that <syslog.h> exists and
- * should be included.
- */
-/*#define I_SYSLOG / **/
-
-/* I_SYSMODE:
- * This symbol, if defined, indicates that <sys/mode.h> exists and
- * should be included.
- */
-/*#define I_SYSMODE / **/
-
-/* I_SYS_MOUNT:
- * This symbol, if defined, indicates that <sys/mount.h> exists and
- * should be included.
- */
-/*#define I_SYS_MOUNT / **/
-
-/* I_SYS_STATFS:
- * This symbol, if defined, indicates that <sys/statfs.h> exists.
- */
-/*#define I_SYS_STATFS / **/
-
-/* I_SYS_STATVFS:
- * This symbol, if defined, indicates that <sys/statvfs.h> exists and
- * should be included.
- */
-/*#define I_SYS_STATVFS / **/
-
-/* I_SYSUTSNAME:
- * This symbol, if defined, indicates that <sys/utsname.h> exists and
- * should be included.
- */
-/*#define I_SYSUTSNAME / **/
-
-/* I_SYS_VFS:
- * This symbol, if defined, indicates that <sys/vfs.h> exists and
- * should be included.
- */
-/*#define I_SYS_VFS / **/
-
-/* I_USTAT:
- * This symbol, if defined, indicates that <ustat.h> exists and
- * should be included.
- */
-/*#define I_USTAT / **/
-
-/* PERL_PRIfldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'f') for output.
- */
-/* PERL_PRIgldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'g') for output.
- */
-/* PERL_PRIeldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'e') for output.
- */
-/* PERL_SCNfldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'f') for input.
- */
-/*#define PERL_PRIfldbl "f" / **/
-/*#define PERL_PRIgldbl "g" / **/
-/*#define PERL_PRIeldbl "e" / **/
-/*#define PERL_SCNfldbl "f" / **/
-
-/* PERL_MAD:
- * This symbol, if defined, indicates that the Misc Attribution
- * Declaration code should be conditionally compiled.
- */
-/*#define PERL_MAD / **/
-
-/* NEED_VA_COPY:
- * This symbol, if defined, indicates that the system stores
- * the variable argument list datatype, va_list, in a format
- * that cannot be copied by simple assignment, so that some
- * other means must be used when copying is required.
- * As such systems vary in their provision (or non-provision)
- * of copying mechanisms, handy.h defines a platform-
- * independent macro, Perl_va_copy(src, dst), to do the job.
- */
-/*#define NEED_VA_COPY / **/
-
-/* IVTYPE:
- * This symbol defines the C type used for Perl's IV.
- */
-/* UVTYPE:
- * This symbol defines the C type used for Perl's UV.
- */
-/* I8TYPE:
- * This symbol defines the C type used for Perl's I8.
- */
-/* U8TYPE:
- * This symbol defines the C type used for Perl's U8.
- */
-/* I16TYPE:
- * This symbol defines the C type used for Perl's I16.
- */
-/* U16TYPE:
- * This symbol defines the C type used for Perl's U16.
- */
-/* I32TYPE:
- * This symbol defines the C type used for Perl's I32.
- */
-/* U32TYPE:
- * This symbol defines the C type used for Perl's U32.
- */
-/* I64TYPE:
- * This symbol defines the C type used for Perl's I64.
- */
-/* U64TYPE:
- * This symbol defines the C type used for Perl's U64.
- */
-/* NVTYPE:
- * This symbol defines the C type used for Perl's NV.
- */
-/* IVSIZE:
- * This symbol contains the sizeof(IV).
- */
-/* UVSIZE:
- * This symbol contains the sizeof(UV).
- */
-/* I8SIZE:
- * This symbol contains the sizeof(I8).
- */
-/* U8SIZE:
- * This symbol contains the sizeof(U8).
- */
-/* I16SIZE:
- * This symbol contains the sizeof(I16).
- */
-/* U16SIZE:
- * This symbol contains the sizeof(U16).
- */
-/* I32SIZE:
- * This symbol contains the sizeof(I32).
- */
-/* U32SIZE:
- * This symbol contains the sizeof(U32).
- */
-/* I64SIZE:
- * This symbol contains the sizeof(I64).
- */
-/* U64SIZE:
- * This symbol contains the sizeof(U64).
- */
-/* NVSIZE:
- * This symbol contains the sizeof(NV).
- */
-/* NV_PRESERVES_UV:
- * This symbol, if defined, indicates that a variable of type NVTYPE
- * can preserve all the bits of a variable of type UVTYPE.
- */
-/* NV_PRESERVES_UV_BITS:
- * This symbol contains the number of bits a variable of type NVTYPE
- * can preserve of a variable of type UVTYPE.
- */
-/* NV_OVERFLOWS_INTEGERS_AT:
- * This symbol gives the largest integer value that NVs can hold. This
- * value + 1.0 cannot be stored accurately. It is expressed as constant
- * floating point expression to reduce the chance of decimale/binary
- * conversion issues. If it can not be determined, the value 0 is given.
- */
-/* NV_ZERO_IS_ALLBITS_ZERO:
- * This symbol, if defined, indicates that a variable of type NVTYPE
- * stores 0.0 in memory as all bits zero.
- */
-#ifdef _MSC_VER
-# define IVTYPE __int64 /**/
-# define UVTYPE unsigned __int64 /**/
-#else
-# define IVTYPE long long /**/
-# define UVTYPE unsigned long long /**/
-#endif
-#define I8TYPE char /**/
-#define U8TYPE unsigned char /**/
-#define I16TYPE short /**/
-#define U16TYPE unsigned short /**/
-#define I32TYPE long /**/
-#define U32TYPE unsigned long /**/
-#ifdef HAS_QUAD
-# ifdef _MSC_VER
-# define I64TYPE __int64 /**/
-# define U64TYPE unsigned __int64 /**/
-# else
-# define I64TYPE long long /**/
-# define U64TYPE unsigned long long /**/
-# endif
-#endif
-#define NVTYPE double /**/
-#define IVSIZE 8 /**/
-#define UVSIZE 8 /**/
-#define I8SIZE 1 /**/
-#define U8SIZE 1 /**/
-#define I16SIZE 2 /**/
-#define U16SIZE 2 /**/
-#define I32SIZE 4 /**/
-#define U32SIZE 4 /**/
-#ifdef HAS_QUAD
-#define I64SIZE 8 /**/
-#define U64SIZE 8 /**/
-#endif
-#define NVSIZE 8 /**/
-#undef NV_PRESERVES_UV
-#define NV_PRESERVES_UV_BITS 53
-#define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0
-#define NV_ZERO_IS_ALLBITS_ZERO
-#if UVSIZE == 8
-# ifdef BYTEORDER
-# if BYTEORDER == 0x1234
-# undef BYTEORDER
-# define BYTEORDER 0x12345678
-# else
-# if BYTEORDER == 0x4321
-# undef BYTEORDER
-# define BYTEORDER 0x87654321
-# endif
-# endif
-# endif
-#endif
-
-/* IVdf:
- * This symbol defines the format string used for printing a Perl IV
- * as a signed decimal integer.
- */
-/* UVuf:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned decimal integer.
- */
-/* UVof:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned octal integer.
- */
-/* UVxf:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned hexadecimal integer in lowercase abcdef.
- */
-/* UVXf:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned hexadecimal integer in uppercase ABCDEF.
- */
-/* NVef:
- * This symbol defines the format string used for printing a Perl NV
- * using %e-ish floating point format.
- */
-/* NVff:
- * This symbol defines the format string used for printing a Perl NV
- * using %f-ish floating point format.
- */
-/* NVgf:
- * This symbol defines the format string used for printing a Perl NV
- * using %g-ish floating point format.
- */
-#define IVdf "I64d" /**/
-#define UVuf "I64u" /**/
-#define UVof "I64o" /**/
-#define UVxf "I64x" /**/
-#define UVXf "I64X" /**/
-#define NVef "e" /**/
-#define NVff "f" /**/
-#define NVgf "g" /**/
-
-/* SELECT_MIN_BITS:
- * This symbol holds the minimum number of bits operated by select.
- * That is, if you do select(n, ...), how many bits at least will be
- * cleared in the masks if some activity is detected. Usually this
- * is either n or 32*ceil(n/32), especially many little-endians do
- * the latter. This is only useful if you have select(), naturally.
- */
-#define SELECT_MIN_BITS 32 /**/
-
-/* STARTPERL:
- * This variable contains the string to put in front of a perl
- * script to make sure (one hopes) that it runs with perl and not
- * some shell.
- */
-#define STARTPERL "#!perl" /**/
-
-/* HAS_STDIO_STREAM_ARRAY:
- * This symbol, if defined, tells that there is an array
- * holding the stdio streams.
- */
-/* STDIO_STREAM_ARRAY:
- * This symbol tells the name of the array holding the stdio streams.
- * Usual values include _iob, __iob, and __sF.
- */
-/*#define HAS_STDIO_STREAM_ARRAY / **/
-#ifdef HAS_STDIO_STREAM_ARRAY
-#define STDIO_STREAM_ARRAY
-#endif
-
-/* GMTIME_MAX:
- * This symbol contains the maximum value for the time_t offset that
- * the system function gmtime () accepts, and defaults to 0
- */
-/* GMTIME_MIN:
- * This symbol contains the minimum value for the time_t offset that
- * the system function gmtime () accepts, and defaults to 0
- */
-/* LOCALTIME_MAX:
- * This symbol contains the maximum value for the time_t offset that
- * the system function localtime () accepts, and defaults to 0
- */
-/* LOCALTIME_MIN:
- * This symbol contains the minimum value for the time_t offset that
- * the system function localtime () accepts, and defaults to 0
- */
-#define GMTIME_MAX 2147483647 /**/
-#define GMTIME_MIN 0 /**/
-#define LOCALTIME_MAX 2147483647 /**/
-#define LOCALTIME_MIN 0 /**/
-
-/* USE_64_BIT_INT:
- * This symbol, if defined, indicates that 64-bit integers should
- * be used when available. If not defined, the native integers
- * will be employed (be they 32 or 64 bits). The minimal possible
- * 64-bitness is used, just enough to get 64-bit integers into Perl.
- * This may mean using for example "long longs", while your memory
- * may still be limited to 2 gigabytes.
- */
-/* USE_64_BIT_ALL:
- * This symbol, if defined, indicates that 64-bit integers should
- * be used when available. If not defined, the native integers
- * will be used (be they 32 or 64 bits). The maximal possible
- * 64-bitness is employed: LP64 or ILP64, meaning that you will
- * be able to use more than 2 gigabytes of memory. This mode is
- * even more binary incompatible than USE_64_BIT_INT. You may not
- * be able to run the resulting executable in a 32-bit CPU at all or
- * you may need at least to reboot your OS to 64-bit mode.
- */
-#ifndef USE_64_BIT_INT
-#define USE_64_BIT_INT /**/
-#endif
-#ifndef USE_64_BIT_ALL
-/*#define USE_64_BIT_ALL / **/
-#endif
-
-/* USE_DTRACE:
- * This symbol, if defined, indicates that Perl should
- * be built with support for DTrace.
- */
-/*#define USE_DTRACE / **/
-
-/* USE_FAST_STDIO:
- * This symbol, if defined, indicates that Perl should
- * be built to use 'fast stdio'.
- * Defaults to define in Perls 5.8 and earlier, to undef later.
- */
-#ifndef USE_FAST_STDIO
-/*#define USE_FAST_STDIO / **/
-#endif
-
-/* USE_LARGE_FILES:
- * This symbol, if defined, indicates that large file support
- * should be used when available.
- */
-#ifndef USE_LARGE_FILES
-#define USE_LARGE_FILES /**/
-#endif
-
-/* USE_LONG_DOUBLE:
- * This symbol, if defined, indicates that long doubles should
- * be used when available.
- */
-#ifndef USE_LONG_DOUBLE
-/*#define USE_LONG_DOUBLE / **/
-#endif
-
-/* USE_MORE_BITS:
- * This symbol, if defined, indicates that 64-bit interfaces and
- * long doubles should be used when available.
- */
-#ifndef USE_MORE_BITS
-/*#define USE_MORE_BITS / **/
-#endif
-
-/* MULTIPLICITY:
- * This symbol, if defined, indicates that Perl should
- * be built to use multiplicity.
- */
-#ifndef MULTIPLICITY
-#define MULTIPLICITY /**/
-#endif
-
-/* USE_PERLIO:
- * This symbol, if defined, indicates that the PerlIO abstraction should
- * be used throughout. If not defined, stdio should be
- * used in a fully backward compatible manner.
- */
-#ifndef USE_PERLIO
-#define USE_PERLIO /**/
-#endif
-
-/* USE_SOCKS:
- * This symbol, if defined, indicates that Perl should
- * be built to use socks.
- */
-#ifndef USE_SOCKS
-/*#define USE_SOCKS / **/
-#endif
-
-#endif
Deleted: vendor/perl/dist/win32/config_H.vc64
===================================================================
--- vendor/perl/dist/win32/config_H.vc64 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/config_H.vc64 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,4675 +0,0 @@
-/*
- * This file was produced by running the config_h.SH script, which
- * gets its values from undef, which is generally produced by
- * running Configure.
- *
- * Feel free to modify any of this as the need arises. Note, however,
- * that running config_h.SH again will wipe out any changes you've made.
- * For a more permanent change edit undef and rerun config_h.SH.
- *
- * $Id: config_H.vc64,v 1.1.1.1 2011-05-19 23:03:36 laffer1 Exp $
- */
-
-/*
- * Package name : perl5
- * Source directory :
- * Configuration time: Sat Jan 9 17:22:03 2010
- * Configured by : Steve
- * Target system :
- */
-
-#ifndef _config_h_
-#define _config_h_
-
-/* LOC_SED:
- * This symbol holds the complete pathname to the sed program.
- */
-#define LOC_SED "" /**/
-
-/* HAS_ALARM:
- * This symbol, if defined, indicates that the alarm routine is
- * available.
- */
-#define HAS_ALARM /**/
-
-/* HAS_BCMP:
- * This symbol is defined if the bcmp() routine is available to
- * compare blocks of memory.
- */
-/*#define HAS_BCMP / **/
-
-/* HAS_BCOPY:
- * This symbol is defined if the bcopy() routine is available to
- * copy blocks of memory.
- */
-/*#define HAS_BCOPY / **/
-
-/* HAS_BZERO:
- * This symbol is defined if the bzero() routine is available to
- * set a memory block to 0.
- */
-/*#define HAS_BZERO / **/
-
-/* HAS_CHOWN:
- * This symbol, if defined, indicates that the chown routine is
- * available.
- */
-/*#define HAS_CHOWN / **/
-
-/* HAS_CHROOT:
- * This symbol, if defined, indicates that the chroot routine is
- * available.
- */
-/*#define HAS_CHROOT / **/
-
-/* HAS_CHSIZE:
- * This symbol, if defined, indicates that the chsize routine is available
- * to truncate files. You might need a -lx to get this routine.
- */
-#define HAS_CHSIZE /**/
-
-/* HAS_CRYPT:
- * This symbol, if defined, indicates that the crypt routine is available
- * to encrypt passwords and the like.
- */
-/*#define HAS_CRYPT / **/
-
-/* HAS_CTERMID:
- * This symbol, if defined, indicates that the ctermid routine is
- * available to generate filename for terminal.
- */
-/*#define HAS_CTERMID / **/
-
-/* HAS_CUSERID:
- * This symbol, if defined, indicates that the cuserid routine is
- * available to get character login names.
- */
-/*#define HAS_CUSERID / **/
-
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-#define HAS_DBL_DIG /**/
-
-/* HAS_DIFFTIME:
- * This symbol, if defined, indicates that the difftime routine is
- * available.
- */
-#define HAS_DIFFTIME /**/
-
-/* HAS_DLERROR:
- * This symbol, if defined, indicates that the dlerror routine is
- * available to return a string describing the last error that
- * occurred from a call to dlopen(), dlclose() or dlsym().
- */
-#define HAS_DLERROR /**/
-
-/* HAS_DUP2:
- * This symbol, if defined, indicates that the dup2 routine is
- * available to duplicate file descriptors.
- */
-#define HAS_DUP2 /**/
-
-/* HAS_FCHMOD:
- * This symbol, if defined, indicates that the fchmod routine is available
- * to change mode of opened files. If unavailable, use chmod().
- */
-/*#define HAS_FCHMOD / **/
-
-/* HAS_FCHOWN:
- * This symbol, if defined, indicates that the fchown routine is available
- * to change ownership of opened files. If unavailable, use chown().
- */
-/*#define HAS_FCHOWN / **/
-
-/* HAS_FCNTL:
- * This symbol, if defined, indicates to the C program that
- * the fcntl() function exists.
- */
-/*#define HAS_FCNTL / **/
-
-/* HAS_FGETPOS:
- * This symbol, if defined, indicates that the fgetpos routine is
- * available to get the file position indicator, similar to ftell().
- */
-#define HAS_FGETPOS /**/
-
-/* HAS_FLOCK:
- * This symbol, if defined, indicates that the flock routine is
- * available to do file locking.
- */
-#define HAS_FLOCK /**/
-
-/* HAS_FORK:
- * This symbol, if defined, indicates that the fork routine is
- * available.
- */
-/*#define HAS_FORK / **/
-
-/* HAS_FSETPOS:
- * This symbol, if defined, indicates that the fsetpos routine is
- * available to set the file position indicator, similar to fseek().
- */
-#define HAS_FSETPOS /**/
-
-/* HAS_GETTIMEOFDAY:
- * This symbol, if defined, indicates that the gettimeofday() system
- * call is available for a sub-second accuracy clock. Usually, the file
- * <sys/resource.h> needs to be included (see I_SYS_RESOURCE).
- * The type "Timeval" should be used to refer to "struct timeval".
- */
-#define HAS_GETTIMEOFDAY /**/
-#ifdef HAS_GETTIMEOFDAY
-#define Timeval struct timeval /* Structure used by gettimeofday() */
-#endif
-
-/* HAS_GETGROUPS:
- * This symbol, if defined, indicates that the getgroups() routine is
- * available to get the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
-/*#define HAS_GETGROUPS / **/
-
-/* HAS_GETLOGIN:
- * This symbol, if defined, indicates that the getlogin routine is
- * available to get the login name.
- */
-#define HAS_GETLOGIN /**/
-
-/* HAS_GETPGID:
- * This symbol, if defined, indicates to the C program that
- * the getpgid(pid) function is available to get the
- * process group id.
- */
-/*#define HAS_GETPGID / **/
-
-/* HAS_GETPGRP2:
- * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
- * routine is available to get the current process group.
- */
-/*#define HAS_GETPGRP2 / **/
-
-/* HAS_GETPPID:
- * This symbol, if defined, indicates that the getppid routine is
- * available to get the parent process ID.
- */
-/*#define HAS_GETPPID / **/
-
-/* HAS_GETPRIORITY:
- * This symbol, if defined, indicates that the getpriority routine is
- * available to get a process's priority.
- */
-/*#define HAS_GETPRIORITY / **/
-
-/* HAS_INET_ATON:
- * This symbol, if defined, indicates to the C program that the
- * inet_aton() function is available to parse IP address "dotted-quad"
- * strings.
- */
-/*#define HAS_INET_ATON / **/
-
-/* HAS_KILLPG:
- * This symbol, if defined, indicates that the killpg routine is available
- * to kill process groups. If unavailable, you probably should use kill
- * with a negative process number.
- */
-#define HAS_KILLPG /**/
-
-/* HAS_LINK:
- * This symbol, if defined, indicates that the link routine is
- * available to create hard links.
- */
-#define HAS_LINK /**/
-
-/* HAS_LOCALECONV:
- * This symbol, if defined, indicates that the localeconv routine is
- * available for numeric and monetary formatting conventions.
- */
-#define HAS_LOCALECONV /**/
-
-/* HAS_LOCKF:
- * This symbol, if defined, indicates that the lockf routine is
- * available to do file locking.
- */
-/*#define HAS_LOCKF / **/
-
-/* HAS_LSTAT:
- * This symbol, if defined, indicates that the lstat routine is
- * available to do file stats on symbolic links.
- */
-/*#define HAS_LSTAT / **/
-
-/* HAS_MBLEN:
- * This symbol, if defined, indicates that the mblen routine is available
- * to find the number of bytes in a multibye character.
- */
-#define HAS_MBLEN /**/
-
-/* HAS_MBSTOWCS:
- * This symbol, if defined, indicates that the mbstowcs routine is
- * available to covert a multibyte string into a wide character string.
- */
-#define HAS_MBSTOWCS /**/
-
-/* HAS_MBTOWC:
- * This symbol, if defined, indicates that the mbtowc routine is available
- * to covert a multibyte to a wide character.
- */
-#define HAS_MBTOWC /**/
-
-/* HAS_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * to compare blocks of memory.
- */
-#define HAS_MEMCMP /**/
-
-/* HAS_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy blocks of memory.
- */
-#define HAS_MEMCPY /**/
-
-/* HAS_MEMMOVE:
- * This symbol, if defined, indicates that the memmove routine is available
- * to copy potentially overlapping blocks of memory. This should be used
- * only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your
- * own version.
- */
-#define HAS_MEMMOVE /**/
-
-/* HAS_MEMSET:
- * This symbol, if defined, indicates that the memset routine is available
- * to set blocks of memory.
- */
-#define HAS_MEMSET /**/
-
-/* HAS_MKDIR:
- * This symbol, if defined, indicates that the mkdir routine is available
- * to create directories. Otherwise you should fork off a new process to
- * exec /bin/mkdir.
- */
-#define HAS_MKDIR /**/
-
-/* HAS_MKFIFO:
- * This symbol, if defined, indicates that the mkfifo routine is
- * available to create FIFOs. Otherwise, mknod should be able to
- * do it for you. However, if mkfifo is there, mknod might require
- * super-user privileges which mkfifo will not.
- */
-/*#define HAS_MKFIFO / **/
-
-/* HAS_MKTIME:
- * This symbol, if defined, indicates that the mktime routine is
- * available.
- */
-#define HAS_MKTIME /**/
-
-/* HAS_MSYNC:
- * This symbol, if defined, indicates that the msync system call is
- * available to synchronize a mapped file.
- */
-/*#define HAS_MSYNC / **/
-
-/* HAS_MUNMAP:
- * This symbol, if defined, indicates that the munmap system call is
- * available to unmap a region, usually mapped by mmap().
- */
-/*#define HAS_MUNMAP / **/
-
-/* HAS_NICE:
- * This symbol, if defined, indicates that the nice routine is
- * available.
- */
-/*#define HAS_NICE / **/
-
-/* HAS_PATHCONF:
- * This symbol, if defined, indicates that pathconf() is available
- * to determine file-system related limits and options associated
- * with a given filename.
- */
-/* HAS_FPATHCONF:
- * This symbol, if defined, indicates that pathconf() is available
- * to determine file-system related limits and options associated
- * with a given open file descriptor.
- */
-/*#define HAS_PATHCONF / **/
-/*#define HAS_FPATHCONF / **/
-
-/* HAS_PAUSE:
- * This symbol, if defined, indicates that the pause routine is
- * available to suspend a process until a signal is received.
- */
-#define HAS_PAUSE /**/
-
-/* HAS_PIPE:
- * This symbol, if defined, indicates that the pipe routine is
- * available to create an inter-process channel.
- */
-#define HAS_PIPE /**/
-
-/* HAS_POLL:
- * This symbol, if defined, indicates that the poll routine is
- * available to poll active file descriptors. Please check I_POLL and
- * I_SYS_POLL to know which header should be included as well.
- */
-/*#define HAS_POLL / **/
-
-/* HAS_READDIR:
- * This symbol, if defined, indicates that the readdir routine is
- * available to read directory entries. You may have to include
- * <dirent.h>. See I_DIRENT.
- */
-#define HAS_READDIR /**/
-
-/* HAS_SEEKDIR:
- * This symbol, if defined, indicates that the seekdir routine is
- * available. You may have to include <dirent.h>. See I_DIRENT.
- */
-#define HAS_SEEKDIR /**/
-
-/* HAS_TELLDIR:
- * This symbol, if defined, indicates that the telldir routine is
- * available. You may have to include <dirent.h>. See I_DIRENT.
- */
-#define HAS_TELLDIR /**/
-
-/* HAS_REWINDDIR:
- * This symbol, if defined, indicates that the rewinddir routine is
- * available. You may have to include <dirent.h>. See I_DIRENT.
- */
-#define HAS_REWINDDIR /**/
-
-/* HAS_READLINK:
- * This symbol, if defined, indicates that the readlink routine is
- * available to read the value of a symbolic link.
- */
-/*#define HAS_READLINK / **/
-
-/* HAS_RENAME:
- * This symbol, if defined, indicates that the rename routine is available
- * to rename files. Otherwise you should do the unlink(), link(), unlink()
- * trick.
- */
-#define HAS_RENAME /**/
-
-/* HAS_RMDIR:
- * This symbol, if defined, indicates that the rmdir routine is
- * available to remove directories. Otherwise you should fork off a
- * new process to exec /bin/rmdir.
- */
-#define HAS_RMDIR /**/
-
-/* HAS_SELECT:
- * This symbol, if defined, indicates that the select routine is
- * available to select active file descriptors. If the timeout field
- * is used, <sys/time.h> may need to be included.
- */
-#define HAS_SELECT /**/
-
-/* HAS_SETEGID:
- * This symbol, if defined, indicates that the setegid routine is available
- * to change the effective gid of the current program.
- */
-/*#define HAS_SETEGID / **/
-
-/* HAS_SETEUID:
- * This symbol, if defined, indicates that the seteuid routine is available
- * to change the effective uid of the current program.
- */
-/*#define HAS_SETEUID / **/
-
-/* HAS_SETGROUPS:
- * This symbol, if defined, indicates that the setgroups() routine is
- * available to set the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
-/*#define HAS_SETGROUPS / **/
-
-/* HAS_SETLINEBUF:
- * This symbol, if defined, indicates that the setlinebuf routine is
- * available to change stderr or stdout from block-buffered or unbuffered
- * to a line-buffered mode.
- */
-/*#define HAS_SETLINEBUF / **/
-
-/* HAS_SETLOCALE:
- * This symbol, if defined, indicates that the setlocale routine is
- * available to handle locale-specific ctype implementations.
- */
-#define HAS_SETLOCALE /**/
-
-/* HAS_SETPGID:
- * This symbol, if defined, indicates that the setpgid(pid, gpid)
- * routine is available to set process group ID.
- */
-/*#define HAS_SETPGID / **/
-
-/* HAS_SETPGRP2:
- * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
- * routine is available to set the current process group.
- */
-/*#define HAS_SETPGRP2 / **/
-
-/* HAS_SETPRIORITY:
- * This symbol, if defined, indicates that the setpriority routine is
- * available to set a process's priority.
- */
-/*#define HAS_SETPRIORITY / **/
-
-/* HAS_SETREGID:
- * This symbol, if defined, indicates that the setregid routine is
- * available to change the real and effective gid of the current
- * process.
- */
-/* HAS_SETRESGID:
- * This symbol, if defined, indicates that the setresgid routine is
- * available to change the real, effective and saved gid of the current
- * process.
- */
-/*#define HAS_SETREGID / **/
-/*#define HAS_SETRESGID / **/
-
-/* HAS_SETREUID:
- * This symbol, if defined, indicates that the setreuid routine is
- * available to change the real and effective uid of the current
- * process.
- */
-/* HAS_SETRESUID:
- * This symbol, if defined, indicates that the setresuid routine is
- * available to change the real, effective and saved uid of the current
- * process.
- */
-/*#define HAS_SETREUID / **/
-/*#define HAS_SETRESUID / **/
-
-/* HAS_SETRGID:
- * This symbol, if defined, indicates that the setrgid routine is available
- * to change the real gid of the current program.
- */
-/*#define HAS_SETRGID / **/
-
-/* HAS_SETRUID:
- * This symbol, if defined, indicates that the setruid routine is available
- * to change the real uid of the current program.
- */
-/*#define HAS_SETRUID / **/
-
-/* HAS_SETSID:
- * This symbol, if defined, indicates that the setsid routine is
- * available to set the process group ID.
- */
-/*#define HAS_SETSID / **/
-
-/* HAS_STRCHR:
- * This symbol is defined to indicate that the strchr()/strrchr()
- * functions are available for string searching. If not, try the
- * index()/rindex() pair.
- */
-/* HAS_INDEX:
- * This symbol is defined to indicate that the index()/rindex()
- * functions are available for string searching.
- */
-#define HAS_STRCHR /**/
-/*#define HAS_INDEX / **/
-
-/* HAS_STRCOLL:
- * This symbol, if defined, indicates that the strcoll routine is
- * available to compare strings using collating information.
- */
-#define HAS_STRCOLL /**/
-
-/* HAS_STRTOD:
- * This symbol, if defined, indicates that the strtod routine is
- * available to provide better numeric string conversion than atof().
- */
-#define HAS_STRTOD /**/
-
-/* HAS_STRTOL:
- * This symbol, if defined, indicates that the strtol routine is available
- * to provide better numeric string conversion than atoi() and friends.
- */
-#define HAS_STRTOL /**/
-
-/* HAS_STRXFRM:
- * This symbol, if defined, indicates that the strxfrm() routine is
- * available to transform strings.
- */
-#define HAS_STRXFRM /**/
-
-/* HAS_SYMLINK:
- * This symbol, if defined, indicates that the symlink routine is available
- * to create symbolic links.
- */
-/*#define HAS_SYMLINK / **/
-
-/* HAS_SYSCALL:
- * This symbol, if defined, indicates that the syscall routine is
- * available to call arbitrary system calls. If undefined, that's tough.
- */
-/*#define HAS_SYSCALL / **/
-
-/* HAS_SYSCONF:
- * This symbol, if defined, indicates that sysconf() is available
- * to determine system related limits and options.
- */
-/*#define HAS_SYSCONF / **/
-
-/* HAS_SYSTEM:
- * This symbol, if defined, indicates that the system routine is
- * available to issue a shell command.
- */
-#define HAS_SYSTEM /**/
-
-/* HAS_TCGETPGRP:
- * This symbol, if defined, indicates that the tcgetpgrp routine is
- * available to get foreground process group ID.
- */
-/*#define HAS_TCGETPGRP / **/
-
-/* HAS_TCSETPGRP:
- * This symbol, if defined, indicates that the tcsetpgrp routine is
- * available to set foreground process group ID.
- */
-/*#define HAS_TCSETPGRP / **/
-
-/* HAS_TRUNCATE:
- * This symbol, if defined, indicates that the truncate routine is
- * available to truncate files.
- */
-/*#define HAS_TRUNCATE / **/
-
-/* HAS_TZNAME:
- * This symbol, if defined, indicates that the tzname[] array is
- * available to access timezone names.
- */
-#define HAS_TZNAME /**/
-
-/* HAS_UMASK:
- * This symbol, if defined, indicates that the umask routine is
- * available to set and get the value of the file creation mask.
- */
-#define HAS_UMASK /**/
-
-/* HAS_USLEEP:
- * This symbol, if defined, indicates that the usleep routine is
- * available to let the process sleep on a sub-second accuracy.
- */
-/*#define HAS_USLEEP / **/
-
-/* HAS_WAIT4:
- * This symbol, if defined, indicates that wait4() exists.
- */
-/*#define HAS_WAIT4 / **/
-
-/* HAS_WAITPID:
- * This symbol, if defined, indicates that the waitpid routine is
- * available to wait for child process.
- */
-#define HAS_WAITPID /**/
-
-/* HAS_WCSTOMBS:
- * This symbol, if defined, indicates that the wcstombs routine is
- * available to convert wide character strings to multibyte strings.
- */
-#define HAS_WCSTOMBS /**/
-
-/* HAS_WCTOMB:
- * This symbol, if defined, indicates that the wctomb routine is available
- * to covert a wide character to a multibyte.
- */
-#define HAS_WCTOMB /**/
-
-/* Groups_t:
- * This symbol holds the type used for the second argument to
- * getgroups() and setgroups(). Usually, this is the same as
- * gidtype (gid_t) , but sometimes it isn't.
- * It can be int, ushort, gid_t, etc...
- * It may be necessary to include <sys/types.h> to get any
- * typedef'ed information. This is only required if you have
- * getgroups() or setgroups()..
- */
-#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
-#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */
-#endif
-
-/* I_ARPA_INET:
- * This symbol, if defined, indicates to the C program that it should
- * include <arpa/inet.h> to get inet_addr and friends declarations.
- */
-#define I_ARPA_INET /**/
-
-/* I_DBM:
- * This symbol, if defined, indicates that <dbm.h> exists and should
- * be included.
- */
-/* I_RPCSVC_DBM:
- * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
- * should be included.
- */
-/*#define I_DBM / **/
-#define I_RPCSVC_DBM /**/
-
-/* I_DLFCN:
- * This symbol, if defined, indicates that <dlfcn.h> exists and should
- * be included.
- */
-#define I_DLFCN /**/
-
-/* I_FCNTL:
- * This manifest constant tells the C program to include <fcntl.h>.
- */
-#define I_FCNTL /**/
-
-/* I_FLOAT:
- * This symbol, if defined, indicates to the C program that it should
- * include <float.h> to get definition of symbols like DBL_MAX or
- * DBL_MIN, i.e. machine dependent floating point values.
- */
-#define I_FLOAT /**/
-
-/* I_GDBM:
- * This symbol, if defined, indicates that <gdbm.h> exists and should
- * be included.
- */
-/*#define I_GDBM / **/
-
-/* I_LIMITS:
- * This symbol, if defined, indicates to the C program that it should
- * include <limits.h> to get definition of symbols like WORD_BIT or
- * LONG_MAX, i.e. machine dependant limitations.
- */
-#define I_LIMITS /**/
-
-/* I_LOCALE:
- * This symbol, if defined, indicates to the C program that it should
- * include <locale.h>.
- */
-#define I_LOCALE /**/
-
-/* I_MATH:
- * This symbol, if defined, indicates to the C program that it should
- * include <math.h>.
- */
-#define I_MATH /**/
-
-/* I_MEMORY:
- * This symbol, if defined, indicates to the C program that it should
- * include <memory.h>.
- */
-/*#define I_MEMORY / **/
-
-/* I_NETINET_IN:
- * This symbol, if defined, indicates to the C program that it should
- * include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
- */
-/*#define I_NETINET_IN / **/
-
-/* I_SFIO:
- * This symbol, if defined, indicates to the C program that it should
- * include <sfio.h>.
- */
-/*#define I_SFIO / **/
-
-/* I_STDDEF:
- * This symbol, if defined, indicates that <stddef.h> exists and should
- * be included.
- */
-#define I_STDDEF /**/
-
-/* I_STDLIB:
- * This symbol, if defined, indicates that <stdlib.h> exists and should
- * be included.
- */
-#define I_STDLIB /**/
-
-/* I_STRING:
- * This symbol, if defined, indicates to the C program that it should
- * include <string.h> (USG systems) instead of <strings.h> (BSD systems).
- */
-#define I_STRING /**/
-
-/* I_SYS_DIR:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/dir.h>.
- */
-/*#define I_SYS_DIR / **/
-
-/* I_SYS_FILE:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/file.h> to get definition of R_OK and friends.
- */
-/*#define I_SYS_FILE / **/
-
-/* I_SYS_IOCTL:
- * This symbol, if defined, indicates that <sys/ioctl.h> exists and should
- * be included. Otherwise, include <sgtty.h> or <termio.h>.
- */
-/* I_SYS_SOCKIO:
- * This symbol, if defined, indicates the <sys/sockio.h> should be included
- * to get socket ioctl options, like SIOCATMARK.
- */
-/*#define I_SYS_IOCTL / **/
-/*#define I_SYS_SOCKIO / **/
-
-/* I_SYS_NDIR:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/ndir.h>.
- */
-/*#define I_SYS_NDIR / **/
-
-/* I_SYS_PARAM:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/param.h>.
- */
-/*#define I_SYS_PARAM / **/
-
-/* I_SYS_POLL:
- * This symbol, if defined, indicates that the program may include
- * <sys/poll.h>. When I_POLL is also defined, it's probably safest
- * to only include <poll.h>.
- */
-/*#define I_SYS_POLL / **/
-
-/* I_SYS_RESOURCE:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/resource.h>.
- */
-/*#define I_SYS_RESOURCE / **/
-
-/* I_SYS_SELECT:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/select.h> in order to get definition of struct timeval.
- */
-/*#define I_SYS_SELECT / **/
-
-/* I_SYS_STAT:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/stat.h>.
- */
-#define I_SYS_STAT /**/
-
-/* I_SYS_TIMES:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/times.h>.
- */
-/*#define I_SYS_TIMES / **/
-
-/* I_SYS_TYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/types.h>.
- */
-#define I_SYS_TYPES /**/
-
-/* I_SYS_UN:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/un.h> to get UNIX domain socket definitions.
- */
-/*#define I_SYS_UN / **/
-
-/* I_SYS_WAIT:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/wait.h>.
- */
-/*#define I_SYS_WAIT / **/
-
-/* I_TERMIO:
- * This symbol, if defined, indicates that the program should include
- * <termio.h> rather than <sgtty.h>. There are also differences in
- * the ioctl() calls that depend on the value of this symbol.
- */
-/* I_TERMIOS:
- * This symbol, if defined, indicates that the program should include
- * the POSIX termios.h rather than sgtty.h or termio.h.
- * There are also differences in the ioctl() calls that depend on the
- * value of this symbol.
- */
-/* I_SGTTY:
- * This symbol, if defined, indicates that the program should include
- * <sgtty.h> rather than <termio.h>. There are also differences in
- * the ioctl() calls that depend on the value of this symbol.
- */
-/*#define I_TERMIO / **/
-/*#define I_TERMIOS / **/
-/*#define I_SGTTY / **/
-
-/* I_UNISTD:
- * This symbol, if defined, indicates to the C program that it should
- * include <unistd.h>.
- */
-/*#define I_UNISTD / **/
-
-/* I_UTIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <utime.h>.
- */
-#define I_UTIME /**/
-
-/* I_VALUES:
- * This symbol, if defined, indicates to the C program that it should
- * include <values.h> to get definition of symbols like MINFLOAT or
- * MAXLONG, i.e. machine dependant limitations. Probably, you
- * should use <limits.h> instead, if it is available.
- */
-/*#define I_VALUES / **/
-
-/* I_VFORK:
- * This symbol, if defined, indicates to the C program that it should
- * include vfork.h.
- */
-/*#define I_VFORK / **/
-
-/* CAN_VAPROTO:
- * This variable is defined on systems supporting prototype declaration
- * of functions with a variable number of arguments.
- */
-/* _V:
- * This macro is used to declare function parameters in prototypes for
- * functions with a variable number of parameters. Use double parentheses.
- * For example:
- *
- * int printf _V((char *fmt, ...));
- *
- * Remember to use the plain simple _() macro when declaring a function
- * with no variable number of arguments, since it might be possible to
- * have a non-effect _V() macro and still get prototypes via _().
- */
-/*#define CAN_VAPROTO / **/
-#ifdef CAN_VAPROTO
-#define _V(args) args
-#else
-#define _V(args) ()
-#endif
-
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE 4 /**/
-#define LONGSIZE 4 /**/
-#define SHORTSIZE 2 /**/
-
-/* MULTIARCH:
- * This symbol, if defined, signifies that the build
- * process will produce some binary files that are going to be
- * used in a cross-platform environment. This is the case for
- * example with the NeXT "fat" binaries that contain executables
- * for several CPUs.
- */
-/*#define MULTIARCH / **/
-
-/* HAS_QUAD:
- * This symbol, if defined, tells that there's a 64-bit integer type,
- * Quad_t, and its unsigned counterpar, Uquad_t. QUADKIND will be one
- * of QUAD_IS_INT, QUAD_IS_LONG, QUAD_IS_LONG_LONG, QUAD_IS_INT64_T
- * or QUAD_IS___INT64.
- */
-#define HAS_QUAD /**/
-#ifdef HAS_QUAD
-# define Quad_t __int64 /**/
-# define Uquad_t unsigned __int64 /**/
-# define QUADKIND 5 /**/
-# define QUAD_IS_INT 1
-# define QUAD_IS_LONG 2
-# define QUAD_IS_LONG_LONG 3
-# define QUAD_IS_INT64_T 4
-# define QUAD_IS___INT64 5
-#endif
-
-/* OSNAME:
- * This symbol contains the name of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-/* OSVERS:
- * This symbol contains the version of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-#define OSNAME "MSWin32" /**/
-#define OSVERS "5.1" /**/
-
-/* ARCHLIB:
- * This variable, if defined, holds the name of the directory in
- * which the user wants to put architecture-dependent public
- * library files for perl5. It is most often a local directory
- * such as /usr/local/lib. Programs using this variable must be
- * prepared to deal with filename expansion. If ARCHLIB is the
- * same as PRIVLIB, it is not defined, since presumably the
- * program already searches PRIVLIB.
- */
-/* ARCHLIB_EXP:
- * This symbol contains the ~name expanded version of ARCHLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-#define ARCHLIB "c:\\perl\\lib" /**/
-/*#define ARCHLIB_EXP "" / **/
-
-/* ARCHNAME:
- * This symbol holds a string representing the architecture name.
- * It may be used to construct an architecture-dependant pathname
- * where library files may be held under a private library, for
- * instance.
- */
-#define ARCHNAME "MSWin32-x86" /**/
-
-/* BIN:
- * This symbol holds the path of the bin directory where the package will
- * be installed. Program must be prepared to deal with ~name substitution.
- */
-/* BIN_EXP:
- * This symbol is the filename expanded version of the BIN symbol, for
- * programs that do not want to deal with that at run-time.
- */
-/* PERL_RELOCATABLE_INC:
- * This symbol, if defined, indicates that we'd like to relocate entries
- * in @INC at run time based on the location of the perl binary.
- */
-#define BIN "c:\\perl\\bin" /**/
-#define BIN_EXP "c:\\perl\\bin" /**/
-#define PERL_RELOCATABLE_INC "undef" /**/
-
-/* CAT2:
- * This macro concatenates 2 tokens together.
- */
-/* STRINGIFY:
- * This macro surrounds its token with double quotes.
- */
-#if 42 == 1
-#define CAT2(a,b) a/**/b
-#define STRINGIFY(a) "a"
-#endif
-#if 42 == 42
-#define PeRl_CaTiFy(a, b) a ## b
-#define PeRl_StGiFy(a) #a
-#define CAT2(a,b) PeRl_CaTiFy(a,b)
-#define StGiFy(a) PeRl_StGiFy(a)
-#define STRINGIFY(a) PeRl_StGiFy(a)
-#endif
-#if 42 != 1 && 42 != 42
-#include "Bletch: How does this C preprocessor concatenate tokens?"
-#endif
-
-/* CPPSTDIN:
- * This symbol contains the first part of the string which will invoke
- * the C preprocessor on the standard input and produce to standard
- * output. Typical value of "cc -E" or "/lib/cpp", but it can also
- * call a wrapper. See CPPRUN.
- */
-/* CPPMINUS:
- * This symbol contains the second part of the string which will invoke
- * the C preprocessor on the standard input and produce to standard
- * output. This symbol will have the value "-" if CPPSTDIN needs a minus
- * to specify standard input, otherwise the value is "".
- */
-/* CPPRUN:
- * This symbol contains the string which will invoke a C preprocessor on
- * the standard input and produce to standard output. It needs to end
- * with CPPLAST, after all other preprocessor flags have been specified.
- * The main difference with CPPSTDIN is that this program will never be a
- * pointer to a shell wrapper, i.e. it will be empty if no preprocessor is
- * available directly to the user. Note that it may well be different from
- * the preprocessor used to compile the C program.
- */
-/* CPPLAST:
- * This symbol is intended to be used along with CPPRUN in the same manner
- * symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "".
- */
-#define CPPSTDIN "cppstdin"
-#define CPPMINUS ""
-#define CPPRUN "cl -nologo -E"
-#define CPPLAST ""
-
-/* HAS_ACCESS:
- * This manifest constant lets the C program know that the access()
- * system call is available to check for accessibility using real UID/GID.
- * (always present on UNIX.)
- */
-#define HAS_ACCESS /**/
-
-/* HAS_ACCESSX:
- * This symbol, if defined, indicates that the accessx routine is
- * available to do extended access checks.
- */
-/*#define HAS_ACCESSX / **/
-
-/* HAS_ASCTIME_R:
- * This symbol, if defined, indicates that the asctime_r routine
- * is available to asctime re-entrantly.
- */
-/* ASCTIME_R_PROTO:
- * This symbol encodes the prototype of asctime_r.
- * It is zero if d_asctime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_asctime_r
- * is defined.
- */
-/*#define HAS_ASCTIME_R / **/
-#define ASCTIME_R_PROTO 0 /**/
-
-/* HASATTRIBUTE_FORMAT:
- * Can we handle GCC attribute for checking printf-style formats
- */
-/* PRINTF_FORMAT_NULL_OK:
- * Allows __printf__ format to be null when checking printf-style
- */
-/* HASATTRIBUTE_MALLOC:
- * Can we handle GCC attribute for malloc-style functions.
- */
-/* HASATTRIBUTE_NONNULL:
- * Can we handle GCC attribute for nonnull function parms.
- */
-/* HASATTRIBUTE_NORETURN:
- * Can we handle GCC attribute for functions that do not return
- */
-/* HASATTRIBUTE_PURE:
- * Can we handle GCC attribute for pure functions
- */
-/* HASATTRIBUTE_UNUSED:
- * Can we handle GCC attribute for unused variables and arguments
- */
-/* HASATTRIBUTE_DEPRECATED:
- * Can we handle GCC attribute for marking deprecated APIs
- */
-/* HASATTRIBUTE_WARN_UNUSED_RESULT:
- * Can we handle GCC attribute for warning on unused results
- */
-/*#define HASATTRIBUTE_DEPRECATED / **/
-/*#define HASATTRIBUTE_FORMAT / **/
-/*#define PRINTF_FORMAT_NULL_OK / **/
-/*#define HASATTRIBUTE_NORETURN / **/
-/*#define HASATTRIBUTE_MALLOC / **/
-/*#define HASATTRIBUTE_NONNULL / **/
-/*#define HASATTRIBUTE_PURE / **/
-/*#define HASATTRIBUTE_UNUSED / **/
-/*#define HASATTRIBUTE_WARN_UNUSED_RESULT / **/
-
-/* HASCONST:
- * This symbol, if defined, indicates that this C compiler knows about
- * the const type. There is no need to actually test for that symbol
- * within your programs. The mere use of the "const" keyword will
- * trigger the necessary tests.
- */
-#define HASCONST /**/
-#ifndef HASCONST
-#define const
-#endif
-
-/* HAS_CRYPT_R:
- * This symbol, if defined, indicates that the crypt_r routine
- * is available to crypt re-entrantly.
- */
-/* CRYPT_R_PROTO:
- * This symbol encodes the prototype of crypt_r.
- * It is zero if d_crypt_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_crypt_r
- * is defined.
- */
-/*#define HAS_CRYPT_R / **/
-#define CRYPT_R_PROTO 0 /**/
-
-/* HAS_CSH:
- * This symbol, if defined, indicates that the C-shell exists.
- */
-/* CSH:
- * This symbol, if defined, contains the full pathname of csh.
- */
-/*#define HAS_CSH / **/
-#ifdef HAS_CSH
-#define CSH "" /**/
-#endif
-
-/* HAS_CTERMID_R:
- * This symbol, if defined, indicates that the ctermid_r routine
- * is available to ctermid re-entrantly.
- */
-/* CTERMID_R_PROTO:
- * This symbol encodes the prototype of ctermid_r.
- * It is zero if d_ctermid_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctermid_r
- * is defined.
- */
-/*#define HAS_CTERMID_R / **/
-#define CTERMID_R_PROTO 0 /**/
-
-/* HAS_CTIME_R:
- * This symbol, if defined, indicates that the ctime_r routine
- * is available to ctime re-entrantly.
- */
-/* CTIME_R_PROTO:
- * This symbol encodes the prototype of ctime_r.
- * It is zero if d_ctime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ctime_r
- * is defined.
- */
-/*#define HAS_CTIME_R / **/
-#define CTIME_R_PROTO 0 /**/
-
-/* HAS_DRAND48_R:
- * This symbol, if defined, indicates that the drand48_r routine
- * is available to drand48 re-entrantly.
- */
-/* DRAND48_R_PROTO:
- * This symbol encodes the prototype of drand48_r.
- * It is zero if d_drand48_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_drand48_r
- * is defined.
- */
-/*#define HAS_DRAND48_R / **/
-#define DRAND48_R_PROTO 0 /**/
-
-/* HAS_DRAND48_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the drand48() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern double drand48(void);
- */
-/*#define HAS_DRAND48_PROTO / **/
-
-/* HAS_EACCESS:
- * This symbol, if defined, indicates that the eaccess routine is
- * available to do extended access checks.
- */
-/*#define HAS_EACCESS / **/
-
-/* HAS_ENDGRENT:
- * This symbol, if defined, indicates that the getgrent routine is
- * available for finalizing sequential access of the group database.
- */
-/*#define HAS_ENDGRENT / **/
-
-/* HAS_ENDGRENT_R:
- * This symbol, if defined, indicates that the endgrent_r routine
- * is available to endgrent re-entrantly.
- */
-/* ENDGRENT_R_PROTO:
- * This symbol encodes the prototype of endgrent_r.
- * It is zero if d_endgrent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endgrent_r
- * is defined.
- */
-/*#define HAS_ENDGRENT_R / **/
-#define ENDGRENT_R_PROTO 0 /**/
-
-/* HAS_ENDHOSTENT:
- * This symbol, if defined, indicates that the endhostent() routine is
- * available to close whatever was being used for host queries.
- */
-/*#define HAS_ENDHOSTENT / **/
-
-/* HAS_ENDHOSTENT_R:
- * This symbol, if defined, indicates that the endhostent_r routine
- * is available to endhostent re-entrantly.
- */
-/* ENDHOSTENT_R_PROTO:
- * This symbol encodes the prototype of endhostent_r.
- * It is zero if d_endhostent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endhostent_r
- * is defined.
- */
-/*#define HAS_ENDHOSTENT_R / **/
-#define ENDHOSTENT_R_PROTO 0 /**/
-
-/* HAS_ENDNETENT:
- * This symbol, if defined, indicates that the endnetent() routine is
- * available to close whatever was being used for network queries.
- */
-/*#define HAS_ENDNETENT / **/
-
-/* HAS_ENDNETENT_R:
- * This symbol, if defined, indicates that the endnetent_r routine
- * is available to endnetent re-entrantly.
- */
-/* ENDNETENT_R_PROTO:
- * This symbol encodes the prototype of endnetent_r.
- * It is zero if d_endnetent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endnetent_r
- * is defined.
- */
-/*#define HAS_ENDNETENT_R / **/
-#define ENDNETENT_R_PROTO 0 /**/
-
-/* HAS_ENDPROTOENT:
- * This symbol, if defined, indicates that the endprotoent() routine is
- * available to close whatever was being used for protocol queries.
- */
-/*#define HAS_ENDPROTOENT / **/
-
-/* HAS_ENDPROTOENT_R:
- * This symbol, if defined, indicates that the endprotoent_r routine
- * is available to endprotoent re-entrantly.
- */
-/* ENDPROTOENT_R_PROTO:
- * This symbol encodes the prototype of endprotoent_r.
- * It is zero if d_endprotoent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endprotoent_r
- * is defined.
- */
-/*#define HAS_ENDPROTOENT_R / **/
-#define ENDPROTOENT_R_PROTO 0 /**/
-
-/* HAS_ENDPWENT:
- * This symbol, if defined, indicates that the getgrent routine is
- * available for finalizing sequential access of the passwd database.
- */
-/*#define HAS_ENDPWENT / **/
-
-/* HAS_ENDPWENT_R:
- * This symbol, if defined, indicates that the endpwent_r routine
- * is available to endpwent re-entrantly.
- */
-/* ENDPWENT_R_PROTO:
- * This symbol encodes the prototype of endpwent_r.
- * It is zero if d_endpwent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endpwent_r
- * is defined.
- */
-/*#define HAS_ENDPWENT_R / **/
-#define ENDPWENT_R_PROTO 0 /**/
-
-/* HAS_ENDSERVENT:
- * This symbol, if defined, indicates that the endservent() routine is
- * available to close whatever was being used for service queries.
- */
-/*#define HAS_ENDSERVENT / **/
-
-/* HAS_ENDSERVENT_R:
- * This symbol, if defined, indicates that the endservent_r routine
- * is available to endservent re-entrantly.
- */
-/* ENDSERVENT_R_PROTO:
- * This symbol encodes the prototype of endservent_r.
- * It is zero if d_endservent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_endservent_r
- * is defined.
- */
-/*#define HAS_ENDSERVENT_R / **/
-#define ENDSERVENT_R_PROTO 0 /**/
-
-/* FLEXFILENAMES:
- * This symbol, if defined, indicates that the system supports filenames
- * longer than 14 characters.
- */
-#define FLEXFILENAMES /**/
-
-/* HAS_GETGRENT:
- * This symbol, if defined, indicates that the getgrent routine is
- * available for sequential access of the group database.
- */
-/*#define HAS_GETGRENT / **/
-
-/* HAS_GETGRENT_R:
- * This symbol, if defined, indicates that the getgrent_r routine
- * is available to getgrent re-entrantly.
- */
-/* GETGRENT_R_PROTO:
- * This symbol encodes the prototype of getgrent_r.
- * It is zero if d_getgrent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrent_r
- * is defined.
- */
-/*#define HAS_GETGRENT_R / **/
-#define GETGRENT_R_PROTO 0 /**/
-
-/* HAS_GETGRGID_R:
- * This symbol, if defined, indicates that the getgrgid_r routine
- * is available to getgrgid re-entrantly.
- */
-/* GETGRGID_R_PROTO:
- * This symbol encodes the prototype of getgrgid_r.
- * It is zero if d_getgrgid_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrgid_r
- * is defined.
- */
-/*#define HAS_GETGRGID_R / **/
-#define GETGRGID_R_PROTO 0 /**/
-
-/* HAS_GETGRNAM_R:
- * This symbol, if defined, indicates that the getgrnam_r routine
- * is available to getgrnam re-entrantly.
- */
-/* GETGRNAM_R_PROTO:
- * This symbol encodes the prototype of getgrnam_r.
- * It is zero if d_getgrnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getgrnam_r
- * is defined.
- */
-/*#define HAS_GETGRNAM_R / **/
-#define GETGRNAM_R_PROTO 0 /**/
-
-/* HAS_GETHOSTBYADDR:
- * This symbol, if defined, indicates that the gethostbyaddr() routine is
- * available to look up hosts by their IP addresses.
- */
-#define HAS_GETHOSTBYADDR /**/
-
-/* HAS_GETHOSTBYNAME:
- * This symbol, if defined, indicates that the gethostbyname() routine is
- * available to look up host names in some data base or other.
- */
-#define HAS_GETHOSTBYNAME /**/
-
-/* HAS_GETHOSTENT:
- * This symbol, if defined, indicates that the gethostent() routine is
- * available to look up host names in some data base or another.
- */
-/*#define HAS_GETHOSTENT / **/
-
-/* HAS_GETHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * gethostname() routine to derive the host name. See also HAS_UNAME
- * and PHOSTNAME.
- */
-/* HAS_UNAME:
- * This symbol, if defined, indicates that the C program may use the
- * uname() routine to derive the host name. See also HAS_GETHOSTNAME
- * and PHOSTNAME.
- */
-/* PHOSTNAME:
- * This symbol, if defined, indicates the command to feed to the
- * popen() routine to derive the host name. See also HAS_GETHOSTNAME
- * and HAS_UNAME. Note that the command uses a fully qualified path,
- * so that it is safe even if used by a process with super-user
- * privileges.
- */
-/* HAS_PHOSTNAME:
- * This symbol, if defined, indicates that the C program may use the
- * contents of PHOSTNAME as a command to feed to the popen() routine
- * to derive the host name.
- */
-#define HAS_GETHOSTNAME /**/
-#define HAS_UNAME /**/
-/*#define HAS_PHOSTNAME / **/
-#ifdef HAS_PHOSTNAME
-#define PHOSTNAME "" /* How to get the host name */
-#endif
-
-/* HAS_GETHOSTBYADDR_R:
- * This symbol, if defined, indicates that the gethostbyaddr_r routine
- * is available to gethostbyaddr re-entrantly.
- */
-/* GETHOSTBYADDR_R_PROTO:
- * This symbol encodes the prototype of gethostbyaddr_r.
- * It is zero if d_gethostbyaddr_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyaddr_r
- * is defined.
- */
-/*#define HAS_GETHOSTBYADDR_R / **/
-#define GETHOSTBYADDR_R_PROTO 0 /**/
-
-/* HAS_GETHOSTBYNAME_R:
- * This symbol, if defined, indicates that the gethostbyname_r routine
- * is available to gethostbyname re-entrantly.
- */
-/* GETHOSTBYNAME_R_PROTO:
- * This symbol encodes the prototype of gethostbyname_r.
- * It is zero if d_gethostbyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostbyname_r
- * is defined.
- */
-/*#define HAS_GETHOSTBYNAME_R / **/
-#define GETHOSTBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETHOSTENT_R:
- * This symbol, if defined, indicates that the gethostent_r routine
- * is available to gethostent re-entrantly.
- */
-/* GETHOSTENT_R_PROTO:
- * This symbol encodes the prototype of gethostent_r.
- * It is zero if d_gethostent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gethostent_r
- * is defined.
- */
-/*#define HAS_GETHOSTENT_R / **/
-#define GETHOSTENT_R_PROTO 0 /**/
-
-/* HAS_GETHOST_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for gethostent(), gethostbyname(), and
- * gethostbyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-#define HAS_GETHOST_PROTOS /**/
-
-/* HAS_GETLOGIN_R:
- * This symbol, if defined, indicates that the getlogin_r routine
- * is available to getlogin re-entrantly.
- */
-/* GETLOGIN_R_PROTO:
- * This symbol encodes the prototype of getlogin_r.
- * It is zero if d_getlogin_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getlogin_r
- * is defined.
- */
-/*#define HAS_GETLOGIN_R / **/
-#define GETLOGIN_R_PROTO 0 /**/
-
-/* HAS_GETNETBYADDR:
- * This symbol, if defined, indicates that the getnetbyaddr() routine is
- * available to look up networks by their IP addresses.
- */
-/*#define HAS_GETNETBYADDR / **/
-
-/* HAS_GETNETBYNAME:
- * This symbol, if defined, indicates that the getnetbyname() routine is
- * available to look up networks by their names.
- */
-/*#define HAS_GETNETBYNAME / **/
-
-/* HAS_GETNETENT:
- * This symbol, if defined, indicates that the getnetent() routine is
- * available to look up network names in some data base or another.
- */
-/*#define HAS_GETNETENT / **/
-
-/* HAS_GETNETBYADDR_R:
- * This symbol, if defined, indicates that the getnetbyaddr_r routine
- * is available to getnetbyaddr re-entrantly.
- */
-/* GETNETBYADDR_R_PROTO:
- * This symbol encodes the prototype of getnetbyaddr_r.
- * It is zero if d_getnetbyaddr_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyaddr_r
- * is defined.
- */
-/*#define HAS_GETNETBYADDR_R / **/
-#define GETNETBYADDR_R_PROTO 0 /**/
-
-/* HAS_GETNETBYNAME_R:
- * This symbol, if defined, indicates that the getnetbyname_r routine
- * is available to getnetbyname re-entrantly.
- */
-/* GETNETBYNAME_R_PROTO:
- * This symbol encodes the prototype of getnetbyname_r.
- * It is zero if d_getnetbyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetbyname_r
- * is defined.
- */
-/*#define HAS_GETNETBYNAME_R / **/
-#define GETNETBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETNETENT_R:
- * This symbol, if defined, indicates that the getnetent_r routine
- * is available to getnetent re-entrantly.
- */
-/* GETNETENT_R_PROTO:
- * This symbol encodes the prototype of getnetent_r.
- * It is zero if d_getnetent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getnetent_r
- * is defined.
- */
-/*#define HAS_GETNETENT_R / **/
-#define GETNETENT_R_PROTO 0 /**/
-
-/* HAS_GETNET_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for getnetent(), getnetbyname(), and
- * getnetbyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-/*#define HAS_GETNET_PROTOS / **/
-
-/* HAS_GETPROTOENT:
- * This symbol, if defined, indicates that the getprotoent() routine is
- * available to look up protocols in some data base or another.
- */
-/*#define HAS_GETPROTOENT / **/
-
-/* HAS_GETPGRP:
- * This symbol, if defined, indicates that the getpgrp routine is
- * available to get the current process group.
- */
-/* USE_BSD_GETPGRP:
- * This symbol, if defined, indicates that getpgrp needs one
- * arguments whereas USG one needs none.
- */
-/*#define HAS_GETPGRP / **/
-/*#define USE_BSD_GETPGRP / **/
-
-/* HAS_GETPROTOBYNAME:
- * This symbol, if defined, indicates that the getprotobyname()
- * routine is available to look up protocols by their name.
- */
-/* HAS_GETPROTOBYNUMBER:
- * This symbol, if defined, indicates that the getprotobynumber()
- * routine is available to look up protocols by their number.
- */
-#define HAS_GETPROTOBYNAME /**/
-#define HAS_GETPROTOBYNUMBER /**/
-
-/* HAS_GETPROTOBYNAME_R:
- * This symbol, if defined, indicates that the getprotobyname_r routine
- * is available to getprotobyname re-entrantly.
- */
-/* GETPROTOBYNAME_R_PROTO:
- * This symbol encodes the prototype of getprotobyname_r.
- * It is zero if d_getprotobyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobyname_r
- * is defined.
- */
-/*#define HAS_GETPROTOBYNAME_R / **/
-#define GETPROTOBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETPROTOBYNUMBER_R:
- * This symbol, if defined, indicates that the getprotobynumber_r routine
- * is available to getprotobynumber re-entrantly.
- */
-/* GETPROTOBYNUMBER_R_PROTO:
- * This symbol encodes the prototype of getprotobynumber_r.
- * It is zero if d_getprotobynumber_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotobynumber_r
- * is defined.
- */
-/*#define HAS_GETPROTOBYNUMBER_R / **/
-#define GETPROTOBYNUMBER_R_PROTO 0 /**/
-
-/* HAS_GETPROTOENT_R:
- * This symbol, if defined, indicates that the getprotoent_r routine
- * is available to getprotoent re-entrantly.
- */
-/* GETPROTOENT_R_PROTO:
- * This symbol encodes the prototype of getprotoent_r.
- * It is zero if d_getprotoent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getprotoent_r
- * is defined.
- */
-/*#define HAS_GETPROTOENT_R / **/
-#define GETPROTOENT_R_PROTO 0 /**/
-
-/* HAS_GETPROTO_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for getprotoent(), getprotobyname(), and
- * getprotobyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-#define HAS_GETPROTO_PROTOS /**/
-
-/* HAS_GETPWENT:
- * This symbol, if defined, indicates that the getpwent routine is
- * available for sequential access of the passwd database.
- * If this is not available, the older getpw() function may be available.
- */
-/*#define HAS_GETPWENT / **/
-
-/* HAS_GETPWENT_R:
- * This symbol, if defined, indicates that the getpwent_r routine
- * is available to getpwent re-entrantly.
- */
-/* GETPWENT_R_PROTO:
- * This symbol encodes the prototype of getpwent_r.
- * It is zero if d_getpwent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwent_r
- * is defined.
- */
-/*#define HAS_GETPWENT_R / **/
-#define GETPWENT_R_PROTO 0 /**/
-
-/* HAS_GETPWNAM_R:
- * This symbol, if defined, indicates that the getpwnam_r routine
- * is available to getpwnam re-entrantly.
- */
-/* GETPWNAM_R_PROTO:
- * This symbol encodes the prototype of getpwnam_r.
- * It is zero if d_getpwnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwnam_r
- * is defined.
- */
-/*#define HAS_GETPWNAM_R / **/
-#define GETPWNAM_R_PROTO 0 /**/
-
-/* HAS_GETPWUID_R:
- * This symbol, if defined, indicates that the getpwuid_r routine
- * is available to getpwuid re-entrantly.
- */
-/* GETPWUID_R_PROTO:
- * This symbol encodes the prototype of getpwuid_r.
- * It is zero if d_getpwuid_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwuid_r
- * is defined.
- */
-/*#define HAS_GETPWUID_R / **/
-#define GETPWUID_R_PROTO 0 /**/
-
-/* HAS_GETSERVENT:
- * This symbol, if defined, indicates that the getservent() routine is
- * available to look up network services in some data base or another.
- */
-/*#define HAS_GETSERVENT / **/
-
-/* HAS_GETSERVBYNAME_R:
- * This symbol, if defined, indicates that the getservbyname_r routine
- * is available to getservbyname re-entrantly.
- */
-/* GETSERVBYNAME_R_PROTO:
- * This symbol encodes the prototype of getservbyname_r.
- * It is zero if d_getservbyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyname_r
- * is defined.
- */
-/*#define HAS_GETSERVBYNAME_R / **/
-#define GETSERVBYNAME_R_PROTO 0 /**/
-
-/* HAS_GETSERVBYPORT_R:
- * This symbol, if defined, indicates that the getservbyport_r routine
- * is available to getservbyport re-entrantly.
- */
-/* GETSERVBYPORT_R_PROTO:
- * This symbol encodes the prototype of getservbyport_r.
- * It is zero if d_getservbyport_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservbyport_r
- * is defined.
- */
-/*#define HAS_GETSERVBYPORT_R / **/
-#define GETSERVBYPORT_R_PROTO 0 /**/
-
-/* HAS_GETSERVENT_R:
- * This symbol, if defined, indicates that the getservent_r routine
- * is available to getservent re-entrantly.
- */
-/* GETSERVENT_R_PROTO:
- * This symbol encodes the prototype of getservent_r.
- * It is zero if d_getservent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getservent_r
- * is defined.
- */
-/*#define HAS_GETSERVENT_R / **/
-#define GETSERVENT_R_PROTO 0 /**/
-
-/* HAS_GETSERV_PROTOS:
- * This symbol, if defined, indicates that <netdb.h> includes
- * prototypes for getservent(), getservbyname(), and
- * getservbyaddr(). Otherwise, it is up to the program to guess
- * them. See netdbtype.U for probing for various Netdb_xxx_t types.
- */
-#define HAS_GETSERV_PROTOS /**/
-
-/* HAS_GETSPNAM_R:
- * This symbol, if defined, indicates that the getspnam_r routine
- * is available to getspnam re-entrantly.
- */
-/* GETSPNAM_R_PROTO:
- * This symbol encodes the prototype of getspnam_r.
- * It is zero if d_getspnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_getspnam_r
- * is defined.
- */
-/*#define HAS_GETSPNAM_R / **/
-#define GETSPNAM_R_PROTO 0 /**/
-
-/* HAS_GETSERVBYNAME:
- * This symbol, if defined, indicates that the getservbyname()
- * routine is available to look up services by their name.
- */
-/* HAS_GETSERVBYPORT:
- * This symbol, if defined, indicates that the getservbyport()
- * routine is available to look up services by their port.
- */
-#define HAS_GETSERVBYNAME /**/
-#define HAS_GETSERVBYPORT /**/
-
-/* HAS_GMTIME_R:
- * This symbol, if defined, indicates that the gmtime_r routine
- * is available to gmtime re-entrantly.
- */
-/* GMTIME_R_PROTO:
- * This symbol encodes the prototype of gmtime_r.
- * It is zero if d_gmtime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_gmtime_r
- * is defined.
- */
-/*#define HAS_GMTIME_R / **/
-#define GMTIME_R_PROTO 0 /**/
-
-/* HAS_HTONL:
- * This symbol, if defined, indicates that the htonl() routine (and
- * friends htons() ntohl() ntohs()) are available to do network
- * order byte swapping.
- */
-/* HAS_HTONS:
- * This symbol, if defined, indicates that the htons() routine (and
- * friends htonl() ntohl() ntohs()) are available to do network
- * order byte swapping.
- */
-/* HAS_NTOHL:
- * This symbol, if defined, indicates that the ntohl() routine (and
- * friends htonl() htons() ntohs()) are available to do network
- * order byte swapping.
- */
-/* HAS_NTOHS:
- * This symbol, if defined, indicates that the ntohs() routine (and
- * friends htonl() htons() ntohl()) are available to do network
- * order byte swapping.
- */
-#define HAS_HTONL /**/
-#define HAS_HTONS /**/
-#define HAS_NTOHL /**/
-#define HAS_NTOHS /**/
-
-/* HAS_LOCALTIME_R:
- * This symbol, if defined, indicates that the localtime_r routine
- * is available to localtime re-entrantly.
- */
-/* LOCALTIME_R_NEEDS_TZSET:
- * Many libc's localtime_r implementations do not call tzset,
- * making them differ from localtime(), and making timezone
- * changes using \undef{TZ} without explicitly calling tzset
- * impossible. This symbol makes us call tzset before localtime_r
- */
-/*#define LOCALTIME_R_NEEDS_TZSET / **/
-#ifdef LOCALTIME_R_NEEDS_TZSET
-#define L_R_TZSET tzset(),
-#else
-#define L_R_TZSET
-#endif
-
-/* LOCALTIME_R_PROTO:
- * This symbol encodes the prototype of localtime_r.
- * It is zero if d_localtime_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_localtime_r
- * is defined.
- */
-/*#define HAS_LOCALTIME_R / **/
-#define LOCALTIME_R_PROTO 0 /**/
-
-/* HAS_LONG_DOUBLE:
- * This symbol will be defined if the C compiler supports long
- * doubles.
- */
-/* LONG_DOUBLESIZE:
- * This symbol contains the size of a long double, so that the
- * C preprocessor can make decisions based on it. It is only
- * defined if the system supports long doubles.
- */
-#define HAS_LONG_DOUBLE /**/
-#ifdef HAS_LONG_DOUBLE
-#define LONG_DOUBLESIZE 8 /**/
-#endif
-
-/* HAS_LONG_LONG:
- * This symbol will be defined if the C compiler supports long long.
- */
-/* LONGLONGSIZE:
- * This symbol contains the size of a long long, so that the
- * C preprocessor can make decisions based on it. It is only
- * defined if the system supports long long.
- */
-/*#define HAS_LONG_LONG / **/
-#ifdef HAS_LONG_LONG
-#define LONGLONGSIZE 8 /**/
-#endif
-
-/* HAS_LSEEK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the lseek() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern off_t lseek(int, off_t, int);
- */
-#define HAS_LSEEK_PROTO /**/
-
-/* HAS_MEMCHR:
- * This symbol, if defined, indicates that the memchr routine is available
- * to locate characters within a C string.
- */
-#define HAS_MEMCHR /**/
-
-/* HAS_MKSTEMP:
- * This symbol, if defined, indicates that the mkstemp routine is
- * available to exclusively create and open a uniquely named
- * temporary file.
- */
-/*#define HAS_MKSTEMP / **/
-
-/* HAS_MMAP:
- * This symbol, if defined, indicates that the mmap system call is
- * available to map a file into memory.
- */
-/* Mmap_t:
- * This symbol holds the return type of the mmap() system call
- * (and simultaneously the type of the first argument).
- * Usually set to 'void *' or 'caddr_t'.
- */
-/*#define HAS_MMAP / **/
-#define Mmap_t void * /**/
-
-/* HAS_MSG:
- * This symbol, if defined, indicates that the entire msg*(2) library is
- * supported (IPC mechanism based on message queues).
- */
-/*#define HAS_MSG / **/
-
-/* OLD_PTHREAD_CREATE_JOINABLE:
- * This symbol, if defined, indicates how to create pthread
- * in joinable (aka undetached) state. NOTE: not defined
- * if pthread.h already has defined PTHREAD_CREATE_JOINABLE
- * (the new version of the constant).
- * If defined, known values are PTHREAD_CREATE_UNDETACHED
- * and __UNDETACHED.
- */
-/*#define OLD_PTHREAD_CREATE_JOINABLE / **/
-
-/* HAS_PTHREAD_ATFORK:
- * This symbol, if defined, indicates that the pthread_atfork routine
- * is available to setup fork handlers.
- */
-/*#define HAS_PTHREAD_ATFORK / **/
-
-/* HAS_PTHREAD_YIELD:
- * This symbol, if defined, indicates that the pthread_yield
- * routine is available to yield the execution of the current
- * thread. sched_yield is preferable to pthread_yield.
- */
-/* SCHED_YIELD:
- * This symbol defines the way to yield the execution of
- * the current thread. Known ways are sched_yield,
- * pthread_yield, and pthread_yield with NULL.
- */
-/* HAS_SCHED_YIELD:
- * This symbol, if defined, indicates that the sched_yield
- * routine is available to yield the execution of the current
- * thread. sched_yield is preferable to pthread_yield.
- */
-/*#define HAS_PTHREAD_YIELD / **/
-#define SCHED_YIELD /**/
-/*#define HAS_SCHED_YIELD / **/
-
-/* HAS_RANDOM_R:
- * This symbol, if defined, indicates that the random_r routine
- * is available to random re-entrantly.
- */
-/* RANDOM_R_PROTO:
- * This symbol encodes the prototype of random_r.
- * It is zero if d_random_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_random_r
- * is defined.
- */
-/*#define HAS_RANDOM_R / **/
-#define RANDOM_R_PROTO 0 /**/
-
-/* HAS_READDIR64_R:
- * This symbol, if defined, indicates that the readdir64_r routine
- * is available to readdir64 re-entrantly.
- */
-/* READDIR64_R_PROTO:
- * This symbol encodes the prototype of readdir64_r.
- * It is zero if d_readdir64_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir64_r
- * is defined.
- */
-/*#define HAS_READDIR64_R / **/
-#define READDIR64_R_PROTO 0 /**/
-
-/* HAS_READDIR_R:
- * This symbol, if defined, indicates that the readdir_r routine
- * is available to readdir re-entrantly.
- */
-/* READDIR_R_PROTO:
- * This symbol encodes the prototype of readdir_r.
- * It is zero if d_readdir_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_readdir_r
- * is defined.
- */
-/*#define HAS_READDIR_R / **/
-#define READDIR_R_PROTO 0 /**/
-
-/* HAS_SEM:
- * This symbol, if defined, indicates that the entire sem*(2) library is
- * supported.
- */
-/*#define HAS_SEM / **/
-
-/* HAS_SETGRENT:
- * This symbol, if defined, indicates that the setgrent routine is
- * available for initializing sequential access of the group database.
- */
-/*#define HAS_SETGRENT / **/
-
-/* HAS_SETGRENT_R:
- * This symbol, if defined, indicates that the setgrent_r routine
- * is available to setgrent re-entrantly.
- */
-/* SETGRENT_R_PROTO:
- * This symbol encodes the prototype of setgrent_r.
- * It is zero if d_setgrent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setgrent_r
- * is defined.
- */
-/*#define HAS_SETGRENT_R / **/
-#define SETGRENT_R_PROTO 0 /**/
-
-/* HAS_SETHOSTENT:
- * This symbol, if defined, indicates that the sethostent() routine is
- * available.
- */
-/*#define HAS_SETHOSTENT / **/
-
-/* HAS_SETHOSTENT_R:
- * This symbol, if defined, indicates that the sethostent_r routine
- * is available to sethostent re-entrantly.
- */
-/* SETHOSTENT_R_PROTO:
- * This symbol encodes the prototype of sethostent_r.
- * It is zero if d_sethostent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_sethostent_r
- * is defined.
- */
-/*#define HAS_SETHOSTENT_R / **/
-#define SETHOSTENT_R_PROTO 0 /**/
-
-/* HAS_SETLOCALE_R:
- * This symbol, if defined, indicates that the setlocale_r routine
- * is available to setlocale re-entrantly.
- */
-/* SETLOCALE_R_PROTO:
- * This symbol encodes the prototype of setlocale_r.
- * It is zero if d_setlocale_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setlocale_r
- * is defined.
- */
-/*#define HAS_SETLOCALE_R / **/
-#define SETLOCALE_R_PROTO 0 /**/
-
-/* HAS_SETNETENT:
- * This symbol, if defined, indicates that the setnetent() routine is
- * available.
- */
-/*#define HAS_SETNETENT / **/
-
-/* HAS_SETNETENT_R:
- * This symbol, if defined, indicates that the setnetent_r routine
- * is available to setnetent re-entrantly.
- */
-/* SETNETENT_R_PROTO:
- * This symbol encodes the prototype of setnetent_r.
- * It is zero if d_setnetent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setnetent_r
- * is defined.
- */
-/*#define HAS_SETNETENT_R / **/
-#define SETNETENT_R_PROTO 0 /**/
-
-/* HAS_SETPROTOENT:
- * This symbol, if defined, indicates that the setprotoent() routine is
- * available.
- */
-/*#define HAS_SETPROTOENT / **/
-
-/* HAS_SETPGRP:
- * This symbol, if defined, indicates that the setpgrp routine is
- * available to set the current process group.
- */
-/* USE_BSD_SETPGRP:
- * This symbol, if defined, indicates that setpgrp needs two
- * arguments whereas USG one needs none. See also HAS_SETPGID
- * for a POSIX interface.
- */
-/*#define HAS_SETPGRP / **/
-/*#define USE_BSD_SETPGRP / **/
-
-/* HAS_SETPROTOENT_R:
- * This symbol, if defined, indicates that the setprotoent_r routine
- * is available to setprotoent re-entrantly.
- */
-/* SETPROTOENT_R_PROTO:
- * This symbol encodes the prototype of setprotoent_r.
- * It is zero if d_setprotoent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setprotoent_r
- * is defined.
- */
-/*#define HAS_SETPROTOENT_R / **/
-#define SETPROTOENT_R_PROTO 0 /**/
-
-/* HAS_SETPWENT:
- * This symbol, if defined, indicates that the setpwent routine is
- * available for initializing sequential access of the passwd database.
- */
-/*#define HAS_SETPWENT / **/
-
-/* HAS_SETPWENT_R:
- * This symbol, if defined, indicates that the setpwent_r routine
- * is available to setpwent re-entrantly.
- */
-/* SETPWENT_R_PROTO:
- * This symbol encodes the prototype of setpwent_r.
- * It is zero if d_setpwent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setpwent_r
- * is defined.
- */
-/*#define HAS_SETPWENT_R / **/
-#define SETPWENT_R_PROTO 0 /**/
-
-/* HAS_SETSERVENT:
- * This symbol, if defined, indicates that the setservent() routine is
- * available.
- */
-/*#define HAS_SETSERVENT / **/
-
-/* HAS_SETSERVENT_R:
- * This symbol, if defined, indicates that the setservent_r routine
- * is available to setservent re-entrantly.
- */
-/* SETSERVENT_R_PROTO:
- * This symbol encodes the prototype of setservent_r.
- * It is zero if d_setservent_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_setservent_r
- * is defined.
- */
-/*#define HAS_SETSERVENT_R / **/
-#define SETSERVENT_R_PROTO 0 /**/
-
-/* HAS_SETVBUF:
- * This symbol, if defined, indicates that the setvbuf routine is
- * available to change buffering on an open stdio stream.
- * to a line-buffered mode.
- */
-#define HAS_SETVBUF /**/
-
-/* HAS_SHM:
- * This symbol, if defined, indicates that the entire shm*(2) library is
- * supported.
- */
-/*#define HAS_SHM / **/
-
-/* Shmat_t:
- * This symbol holds the return type of the shmat() system call.
- * Usually set to 'void *' or 'char *'.
- */
-/* HAS_SHMAT_PROTOTYPE:
- * This symbol, if defined, indicates that the sys/shm.h includes
- * a prototype for shmat(). Otherwise, it is up to the program to
- * guess one. Shmat_t shmat(int, Shmat_t, int) is a good guess,
- * but not always right so it should be emitted by the program only
- * when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
- */
-#define Shmat_t void * /**/
-/*#define HAS_SHMAT_PROTOTYPE / **/
-
-/* HAS_SOCKET:
- * This symbol, if defined, indicates that the BSD socket interface is
- * supported.
- */
-/* HAS_SOCKETPAIR:
- * This symbol, if defined, indicates that the BSD socketpair() call is
- * supported.
- */
-/* HAS_MSG_CTRUNC:
- * This symbol, if defined, indicates that the MSG_CTRUNC is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_DONTROUTE:
- * This symbol, if defined, indicates that the MSG_DONTROUTE is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_OOB:
- * This symbol, if defined, indicates that the MSG_OOB is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_PEEK:
- * This symbol, if defined, indicates that the MSG_PEEK is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_MSG_PROXY:
- * This symbol, if defined, indicates that the MSG_PROXY is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-/* HAS_SCM_RIGHTS:
- * This symbol, if defined, indicates that the SCM_RIGHTS is supported.
- * Checking just with #ifdef might not be enough because this symbol
- * has been known to be an enum.
- */
-#define HAS_SOCKET /**/
-/*#define HAS_SOCKETPAIR / **/
-/*#define HAS_MSG_CTRUNC / **/
-/*#define HAS_MSG_DONTROUTE / **/
-/*#define HAS_MSG_OOB / **/
-/*#define HAS_MSG_PEEK / **/
-/*#define HAS_MSG_PROXY / **/
-/*#define HAS_SCM_RIGHTS / **/
-
-/* HAS_SRAND48_R:
- * This symbol, if defined, indicates that the srand48_r routine
- * is available to srand48 re-entrantly.
- */
-/* SRAND48_R_PROTO:
- * This symbol encodes the prototype of srand48_r.
- * It is zero if d_srand48_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_srand48_r
- * is defined.
- */
-/*#define HAS_SRAND48_R / **/
-#define SRAND48_R_PROTO 0 /**/
-
-/* HAS_SRANDOM_R:
- * This symbol, if defined, indicates that the srandom_r routine
- * is available to srandom re-entrantly.
- */
-/* SRANDOM_R_PROTO:
- * This symbol encodes the prototype of srandom_r.
- * It is zero if d_srandom_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_srandom_r
- * is defined.
- */
-/*#define HAS_SRANDOM_R / **/
-#define SRANDOM_R_PROTO 0 /**/
-
-/* USE_STAT_BLOCKS:
- * This symbol is defined if this system has a stat structure declaring
- * st_blksize and st_blocks.
- */
-#ifndef USE_STAT_BLOCKS
-/*#define USE_STAT_BLOCKS / **/
-#endif
-
-/* USE_STRUCT_COPY:
- * This symbol, if defined, indicates that this C compiler knows how
- * to copy structures. If undefined, you'll need to use a block copy
- * routine of some sort instead.
- */
-#define USE_STRUCT_COPY /**/
-
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
-/* HAS_SYS_ERRLIST:
- * This symbol, if defined, indicates that the sys_errlist array is
- * available to translate error numbers to strings. The extern int
- * sys_nerr gives the size of that table.
- */
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-#define HAS_STRERROR /**/
-#define HAS_SYS_ERRLIST /**/
-#define Strerror(e) strerror(e)
-
-/* HAS_STRERROR_R:
- * This symbol, if defined, indicates that the strerror_r routine
- * is available to strerror re-entrantly.
- */
-/* STRERROR_R_PROTO:
- * This symbol encodes the prototype of strerror_r.
- * It is zero if d_strerror_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_strerror_r
- * is defined.
- */
-/*#define HAS_STRERROR_R / **/
-#define STRERROR_R_PROTO 0 /**/
-
-/* HAS_STRTOUL:
- * This symbol, if defined, indicates that the strtoul routine is
- * available to provide conversion of strings to unsigned long.
- */
-#define HAS_STRTOUL /**/
-
-/* HAS_TIME:
- * This symbol, if defined, indicates that the time() routine exists.
- */
-/* Time_t:
- * This symbol holds the type returned by time(). It can be long,
- * or time_t on BSD sites (in which case <sys/types.h> should be
- * included).
- */
-#define HAS_TIME /**/
-#define Time_t time_t /* Time type */
-
-/* HAS_TIMES:
- * This symbol, if defined, indicates that the times() routine exists.
- * Note that this became obsolete on some systems (SUNOS), which now
- * use getrusage(). It may be necessary to include <sys/times.h>.
- */
-#define HAS_TIMES /**/
-
-/* HAS_TMPNAM_R:
- * This symbol, if defined, indicates that the tmpnam_r routine
- * is available to tmpnam re-entrantly.
- */
-/* TMPNAM_R_PROTO:
- * This symbol encodes the prototype of tmpnam_r.
- * It is zero if d_tmpnam_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_tmpnam_r
- * is defined.
- */
-/*#define HAS_TMPNAM_R / **/
-#define TMPNAM_R_PROTO 0 /**/
-
-/* HAS_TTYNAME_R:
- * This symbol, if defined, indicates that the ttyname_r routine
- * is available to ttyname re-entrantly.
- */
-/* TTYNAME_R_PROTO:
- * This symbol encodes the prototype of ttyname_r.
- * It is zero if d_ttyname_r is undef, and one of the
- * REENTRANT_PROTO_T_ABC macros of reentr.h if d_ttyname_r
- * is defined.
- */
-/*#define HAS_TTYNAME_R / **/
-#define TTYNAME_R_PROTO 0 /**/
-
-/* HAS_UNION_SEMUN:
- * This symbol, if defined, indicates that the union semun is
- * defined by including <sys/sem.h>. If not, the user code
- * probably needs to define it as:
- * union semun {
- * int val;
- * struct semid_ds *buf;
- * unsigned short *array;
- * }
- */
-/* USE_SEMCTL_SEMUN:
- * This symbol, if defined, indicates that union semun is
- * used for semctl IPC_STAT.
- */
-/* USE_SEMCTL_SEMID_DS:
- * This symbol, if defined, indicates that struct semid_ds * is
- * used for semctl IPC_STAT.
- */
-#define HAS_UNION_SEMUN /**/
-/*#define USE_SEMCTL_SEMUN / **/
-/*#define USE_SEMCTL_SEMID_DS / **/
-
-/* HAS_VFORK:
- * This symbol, if defined, indicates that vfork() exists.
- */
-/*#define HAS_VFORK / **/
-
-/* HAS_PSEUDOFORK:
- * This symbol, if defined, indicates that an emulation of the
- * fork routine is available.
- */
-/*#define HAS_PSEUDOFORK / **/
-
-/* Signal_t:
- * This symbol's value is either "void" or "int", corresponding to the
- * appropriate return type of a signal handler. Thus, you can declare
- * a signal handler using "Signal_t (*handler)()", and define the
- * handler using "Signal_t handler(sig)".
- */
-#define Signal_t void /* Signal handler's return type */
-
-/* HASVOLATILE:
- * This symbol, if defined, indicates that this C compiler knows about
- * the volatile declaration.
- */
-#define HASVOLATILE /**/
-#ifndef HASVOLATILE
-#define volatile
-#endif
-
-/* Fpos_t:
- * This symbol holds the type used to declare file positions in libc.
- * It can be fpos_t, long, uint, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Fpos_t fpos_t /* File position type */
-
-/* Gid_t_f:
- * This symbol defines the format string used for printing a Gid_t.
- */
-#define Gid_t_f "ld" /**/
-
-/* Gid_t_sign:
- * This symbol holds the signedess of a Gid_t.
- * 1 for unsigned, -1 for signed.
- */
-#define Gid_t_sign -1 /* GID sign */
-
-/* Gid_t_size:
- * This symbol holds the size of a Gid_t in bytes.
- */
-#define Gid_t_size 4 /* GID size */
-
-/* Gid_t:
- * This symbol holds the return type of getgid() and the type of
- * argument to setrgid() and related functions. Typically,
- * it is the type of group ids in the kernel. It can be int, ushort,
- * gid_t, etc... It may be necessary to include <sys/types.h> to get
- * any typedef'ed information.
- */
-#define Gid_t gid_t /* Type for getgid(), etc... */
-
-/* I_DIRENT:
- * This symbol, if defined, indicates to the C program that it should
- * include <dirent.h>. Using this symbol also triggers the definition
- * of the Direntry_t define which ends up being 'struct dirent' or
- * 'struct direct' depending on the availability of <dirent.h>.
- */
-/* DIRNAMLEN:
- * This symbol, if defined, indicates to the C program that the length
- * of directory entry names is provided by a d_namlen field. Otherwise
- * you need to do strlen() on the d_name field.
- */
-/* Direntry_t:
- * This symbol is set to 'struct direct' or 'struct dirent' depending on
- * whether dirent is available or not. You should use this pseudo type to
- * portably declare your directory entries.
- */
-#define I_DIRENT /**/
-#define DIRNAMLEN /**/
-#define Direntry_t struct direct
-
-/* I_GRP:
- * This symbol, if defined, indicates to the C program that it should
- * include <grp.h>.
- */
-/* GRPASSWD:
- * This symbol, if defined, indicates to the C program that struct group
- * in <grp.h> contains gr_passwd.
- */
-/*#define I_GRP / **/
-/*#define GRPASSWD / **/
-
-/* I_MACH_CTHREADS:
- * This symbol, if defined, indicates to the C program that it should
- * include <mach/cthreads.h>.
- */
-/*#define I_MACH_CTHREADS / **/
-
-/* I_NDBM:
- * This symbol, if defined, indicates that <ndbm.h> exists and should
- * be included.
- */
-/* I_GDBMNDBM:
- * This symbol, if defined, indicates that <gdbm/ndbm.h> exists and should
- * be included. This was the location of the ndbm.h compatibility file
- * in RedHat 7.1.
- */
-/* I_GDBM_NDBM:
- * This symbol, if defined, indicates that <gdbm-ndbm.h> exists and should
- * be included. This is the location of the ndbm.h compatibility file
- * in Debian 4.0.
- */
-/* NDBM_H_USES_PROTOTYPES:
- * This symbol, if defined, indicates that <ndbm.h> uses real ANSI C
- * prototypes instead of K&R style function declarations without any
- * parameter information. While ANSI C prototypes are supported in C++,
- * K&R style function declarations will yield errors.
- */
-/* GDBMNDBM_H_USES_PROTOTYPES:
- * This symbol, if defined, indicates that <gdbm/ndbm.h> uses real ANSI C
- * prototypes instead of K&R style function declarations without any
- * parameter information. While ANSI C prototypes are supported in C++,
- * K&R style function declarations will yield errors.
- */
-/* GDBM_NDBM_H_USES_PROTOTYPES:
- * This symbol, if defined, indicates that <gdbm-ndbm.h> uses real ANSI C
- * prototypes instead of K&R style function declarations without any
- * parameter information. While ANSI C prototypes are supported in C++,
- * K&R style function declarations will yield errors.
- */
-/*#define I_NDBM / **/
-/*#define I_GDBMNDBM / **/
-/*#define I_GDBM_NDBM / **/
-/*#define NDBM_H_USES_PROTOTYPES / **/
-/*#define GDBMNDBM_H_USES_PROTOTYPES / **/
-/*#define GDBM_NDBM_H_USES_PROTOTYPES / **/
-
-/* I_NETDB:
- * This symbol, if defined, indicates that <netdb.h> exists and
- * should be included.
- */
-/*#define I_NETDB / **/
-
-/* I_NET_ERRNO:
- * This symbol, if defined, indicates that <net/errno.h> exists and
- * should be included.
- */
-/*#define I_NET_ERRNO / **/
-
-/* I_PTHREAD:
- * This symbol, if defined, indicates to the C program that it should
- * include <pthread.h>.
- */
-/*#define I_PTHREAD / **/
-
-/* I_PWD:
- * This symbol, if defined, indicates to the C program that it should
- * include <pwd.h>.
- */
-/* PWQUOTA:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_quota.
- */
-/* PWAGE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_age.
- */
-/* PWCHANGE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_change.
- */
-/* PWCLASS:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_class.
- */
-/* PWEXPIRE:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_expire.
- */
-/* PWCOMMENT:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_comment.
- */
-/* PWGECOS:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_gecos.
- */
-/* PWPASSWD:
- * This symbol, if defined, indicates to the C program that struct passwd
- * contains pw_passwd.
- */
-/*#define I_PWD / **/
-/*#define PWQUOTA / **/
-/*#define PWAGE / **/
-/*#define PWCHANGE / **/
-/*#define PWCLASS / **/
-/*#define PWEXPIRE / **/
-/*#define PWCOMMENT / **/
-/*#define PWGECOS / **/
-/*#define PWPASSWD / **/
-
-/* I_SYS_ACCESS:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/access.h>.
- */
-/*#define I_SYS_ACCESS / **/
-
-/* I_SYS_SECURITY:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/security.h>.
- */
-/*#define I_SYS_SECURITY / **/
-
-/* I_SYSUIO:
- * This symbol, if defined, indicates that <sys/uio.h> exists and
- * should be included.
- */
-/*#define I_SYSUIO / **/
-
-/* I_STDARG:
- * This symbol, if defined, indicates that <stdarg.h> exists and should
- * be included.
- */
-/* I_VARARGS:
- * This symbol, if defined, indicates to the C program that it should
- * include <varargs.h>.
- */
-#define I_STDARG /**/
-/*#define I_VARARGS / **/
-
-/* PERL_INC_VERSION_LIST:
- * This variable specifies the list of subdirectories in over
- * which perl.c:incpush() and lib/lib.pm will automatically
- * search when adding directories to @INC, in a format suitable
- * for a C initialization string. See the inc_version_list entry
- * in Porting/Glossary for more details.
- */
-/*#define PERL_INC_VERSION_LIST 0 / **/
-
-/* INSTALL_USR_BIN_PERL:
- * This symbol, if defined, indicates that Perl is to be installed
- * also as /usr/bin/perl.
- */
-/*#define INSTALL_USR_BIN_PERL / **/
-
-/* Off_t:
- * This symbol holds the type used to declare offsets in the kernel.
- * It can be int, long, off_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-/* LSEEKSIZE:
- * This symbol holds the number of bytes used by the Off_t.
- */
-/* Off_t_size:
- * This symbol holds the number of bytes used by the Off_t.
- */
-#define Off_t long /* <offset> type */
-#define LSEEKSIZE 4 /* <offset> size */
-#define Off_t_size 4 /* <offset> size */
-
-/* Free_t:
- * This variable contains the return type of free(). It is usually
- * void, but occasionally int.
- */
-/* Malloc_t:
- * This symbol is the type of pointer returned by malloc and realloc.
- */
-#define Malloc_t void * /**/
-#define Free_t void /**/
-
-/* PERL_MALLOC_WRAP:
- * This symbol, if defined, indicates that we'd like malloc wrap checks.
- */
-#define PERL_MALLOC_WRAP /**/
-
-/* MYMALLOC:
- * This symbol, if defined, indicates that we're using our own malloc.
- */
-/*#define MYMALLOC / **/
-
-/* Mode_t:
- * This symbol holds the type used to declare file modes
- * for systems calls. It is usually mode_t, but may be
- * int or unsigned short. It may be necessary to include <sys/types.h>
- * to get any typedef'ed information.
- */
-#define Mode_t mode_t /* file mode parameter for system calls */
-
-/* Netdb_host_t:
- * This symbol holds the type used for the 1st argument
- * to gethostbyaddr().
- */
-/* Netdb_hlen_t:
- * This symbol holds the type used for the 2nd argument
- * to gethostbyaddr().
- */
-/* Netdb_name_t:
- * This symbol holds the type used for the argument to
- * gethostbyname().
- */
-/* Netdb_net_t:
- * This symbol holds the type used for the 1st argument to
- * getnetbyaddr().
- */
-#define Netdb_host_t char * /**/
-#define Netdb_hlen_t int /**/
-#define Netdb_name_t char * /**/
-#define Netdb_net_t long /**/
-
-/* PERL_OTHERLIBDIRS:
- * This variable contains a colon-separated set of paths for the perl
- * binary to search for additional library files or modules.
- * These directories will be tacked to the end of @INC.
- * Perl will automatically search below each path for version-
- * and architecture-specific directories. See PERL_INC_VERSION_LIST
- * for more details.
- */
-/*#define PERL_OTHERLIBDIRS "" / **/
-
-/* Pid_t:
- * This symbol holds the type used to declare process ids in the kernel.
- * It can be int, uint, pid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Pid_t int /* PID type */
-
-/* PRIVLIB:
- * This symbol contains the name of the private library for this package.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world. The program
- * should be prepared to do ~ expansion.
- */
-/* PRIVLIB_EXP:
- * This symbol contains the ~name expanded version of PRIVLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-#define PRIVLIB "c:\\perl\\lib" /**/
-#define PRIVLIB_EXP (win32_get_privlib(PERL_VERSION_STRING, NULL)) /**/
-
-/* CAN_PROTOTYPE:
- * If defined, this macro indicates that the C compiler can handle
- * function prototypes.
- */
-/* _:
- * This macro is used to declare function parameters for folks who want
- * to make declarations with prototypes using a different style than
- * the above macros. Use double parentheses. For example:
- *
- * int main _((int argc, char *argv[]));
- */
-#define CAN_PROTOTYPE /**/
-#ifdef CAN_PROTOTYPE
-#define _(args) args
-#else
-#define _(args) ()
-#endif
-
-/* Select_fd_set_t:
- * This symbol holds the type used for the 2nd, 3rd, and 4th
- * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
- * is defined, and 'int *' otherwise. This is only useful if you
- * have select(), of course.
- */
-#define Select_fd_set_t Perl_fd_set * /**/
-
-/* SH_PATH:
- * This symbol contains the full pathname to the shell used on this
- * on this system to execute Bourne shell scripts. Usually, this will be
- * /bin/sh, though it's possible that some systems will have /bin/ksh,
- * /bin/pdksh, /bin/ash, /bin/bash, or even something such as
- * D:/bin/sh.exe.
- */
-#define SH_PATH "cmd /x /c" /**/
-
-/* SIG_NAME:
- * This symbol contains a list of signal names in order of
- * signal number. This is intended
- * to be used as a static array initialization, like this:
- * char *sig_name[] = { SIG_NAME };
- * The signals in the list are separated with commas, and each signal
- * is surrounded by double quotes. There is no leading SIG in the signal
- * name, i.e. SIGQUIT is known as "QUIT".
- * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
- * etc., where nn is the actual signal number (e.g. NUM37).
- * The signal number for sig_name[i] is stored in sig_num[i].
- * The last element is 0 to terminate the list with a NULL. This
- * corresponds to the 0 at the end of the sig_name_init list.
- * Note that this variable is initialized from the sig_name_init,
- * not from sig_name (which is unused).
- */
-/* SIG_NUM:
- * This symbol contains a list of signal numbers, in the same order as the
- * SIG_NAME list. It is suitable for static array initialization, as in:
- * int sig_num[] = { SIG_NUM };
- * The signals in the list are separated with commas, and the indices
- * within that list and the SIG_NAME list match, so it's easy to compute
- * the signal name from a number or vice versa at the price of a small
- * dynamic linear lookup.
- * Duplicates are allowed, but are moved to the end of the list.
- * The signal number corresponding to sig_name[i] is sig_number[i].
- * if (i < NSIG) then sig_number[i] == i.
- * The last element is 0, corresponding to the 0 at the end of
- * the sig_name_init list.
- * Note that this variable is initialized from the sig_num_init,
- * not from sig_num (which is unused).
- */
-/* SIG_SIZE:
- * This variable contains the number of elements of the SIG_NAME
- * and SIG_NUM arrays, excluding the final NULL entry.
- */
-#define SIG_NAME "ZERO", "HUP", "INT", "QUIT", "ILL", "NUM05", "NUM06", "NUM07", "FPE", "KILL", "NUM10", "SEGV", "NUM12", "PIPE", "ALRM", "TERM", "NUM16", "NUM17", "NUM18", "NUM19", "CHLD", "BREAK", "ABRT", "STOP", "NUM24", "CONT", "CLD", 0 /**/
-#define SIG_NUM 0, 1, 2, 21, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 20, 0 /**/
-#define SIG_SIZE 27 /**/
-
-/* SITEARCH:
- * This symbol contains the name of the private library for this package.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world. The program
- * should be prepared to do ~ expansion.
- * The standard distribution will put nothing in this directory.
- * After perl has been installed, users may install their own local
- * architecture-dependent modules in this directory with
- * MakeMaker Makefile.PL
- * or equivalent. See INSTALL for details.
- */
-/* SITEARCH_EXP:
- * This symbol contains the ~name expanded version of SITEARCH, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-#define SITEARCH "c:\\perl\\site\\lib" /**/
-/*#define SITEARCH_EXP "" / **/
-
-/* SITELIB:
- * This symbol contains the name of the private library for this package.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world. The program
- * should be prepared to do ~ expansion.
- * The standard distribution will put nothing in this directory.
- * After perl has been installed, users may install their own local
- * architecture-independent modules in this directory with
- * MakeMaker Makefile.PL
- * or equivalent. See INSTALL for details.
- */
-/* SITELIB_EXP:
- * This symbol contains the ~name expanded version of SITELIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-/* SITELIB_STEM:
- * This define is SITELIB_EXP with any trailing version-specific component
- * removed. The elements in inc_version_list (inc_version_list.U) can
- * be tacked onto this variable to generate a list of directories to search.
- */
-#define SITELIB "c:\\perl\\site\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib(PERL_VERSION_STRING, NULL)) /**/
-#define SITELIB_STEM "" /**/
-
-/* Size_t_size:
- * This symbol holds the size of a Size_t in bytes.
- */
-#define Size_t_size 8 /**/
-
-/* Size_t:
- * This symbol holds the type used to declare length parameters
- * for string functions. It is usually size_t, but may be
- * unsigned long, int, etc. It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Size_t size_t /* length paramater for string functions */
-
-/* Sock_size_t:
- * This symbol holds the type used for the size argument of
- * various socket calls (just the base type, not the pointer-to).
- */
-#define Sock_size_t int /**/
-
-/* STDCHAR:
- * This symbol is defined to be the type of char used in stdio.h.
- * It has the values "unsigned char" or "char".
- */
-#define STDCHAR char /**/
-
-/* Uid_t_f:
- * This symbol defines the format string used for printing a Uid_t.
- */
-#define Uid_t_f "ld" /**/
-
-/* Uid_t_sign:
- * This symbol holds the signedess of a Uid_t.
- * 1 for unsigned, -1 for signed.
- */
-#define Uid_t_sign -1 /* UID sign */
-
-/* Uid_t_size:
- * This symbol holds the size of a Uid_t in bytes.
- */
-#define Uid_t_size 4 /* UID size */
-
-/* Uid_t:
- * This symbol holds the type used to declare user ids in the kernel.
- * It can be int, ushort, uid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Uid_t uid_t /* UID type */
-
-/* USE_ITHREADS:
- * This symbol, if defined, indicates that Perl should be built to
- * use the interpreter-based threading implementation.
- */
-/* USE_5005THREADS:
- * This symbol, if defined, indicates that Perl should be built to
- * use the 5.005-based threading implementation.
- * Only valid up to 5.8.x.
- */
-/* OLD_PTHREADS_API:
- * This symbol, if defined, indicates that Perl should
- * be built to use the old draft POSIX threads API.
- */
-/* USE_REENTRANT_API:
- * This symbol, if defined, indicates that Perl should
- * try to use the various _r versions of library functions.
- * This is extremely experimental.
- */
-/*#define USE_5005THREADS / **/
-/*#define USE_ITHREADS / **/
-#if defined(USE_5005THREADS) && !defined(USE_ITHREADS)
-#define USE_THREADS /* until src is revised*/
-#endif
-/*#define OLD_PTHREADS_API / **/
-/*#define USE_REENTRANT_API / **/
-
-/* PERL_VENDORARCH:
- * If defined, this symbol contains the name of a private library.
- * The library is private in the sense that it needn't be in anyone's
- * execution path, but it should be accessible by the world.
- * It may have a ~ on the front.
- * The standard distribution will put nothing in this directory.
- * Vendors who distribute perl may wish to place their own
- * architecture-dependent modules and extensions in this directory with
- * MakeMaker Makefile.PL INSTALLDIRS=vendor
- * or equivalent. See INSTALL for details.
- */
-/* PERL_VENDORARCH_EXP:
- * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-/*#define PERL_VENDORARCH "" / **/
-/*#define PERL_VENDORARCH_EXP "" / **/
-
-/* PERL_VENDORLIB_EXP:
- * This symbol contains the ~name expanded version of VENDORLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
- */
-/* PERL_VENDORLIB_STEM:
- * This define is PERL_VENDORLIB_EXP with any trailing version-specific component
- * removed. The elements in inc_version_list (inc_version_list.U) can
- * be tacked onto this variable to generate a list of directories to search.
- */
-/*#define PERL_VENDORLIB_EXP "" / **/
-/*#define PERL_VENDORLIB_STEM "" / **/
-
-/* VOIDFLAGS:
- * This symbol indicates how much support of the void type is given by this
- * compiler. What various bits mean:
- *
- * 1 = supports declaration of void
- * 2 = supports arrays of pointers to functions returning void
- * 4 = supports comparisons between pointers to void functions and
- * addresses of void functions
- * 8 = suports declaration of generic void pointers
- *
- * The package designer should define VOIDUSED to indicate the requirements
- * of the package. This can be done either by #defining VOIDUSED before
- * including config.h, or by defining defvoidused in Myinit.U. If the
- * latter approach is taken, only those flags will be tested. If the
- * level of void support necessary is not present, defines void to int.
- */
-#ifndef VOIDUSED
-#define VOIDUSED 15
-#endif
-#define VOIDFLAGS 15
-#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
-#define void int /* is void to be avoided? */
-#define M_VOID /* Xenix strikes again */
-#endif
-
-/* USE_CROSS_COMPILE:
- * This symbol, if defined, indicates that Perl is being cross-compiled.
- */
-/* PERL_TARGETARCH:
- * This symbol, if defined, indicates the target architecture
- * Perl has been cross-compiled to. Undefined if not a cross-compile.
- */
-#ifndef USE_CROSS_COMPILE
-/*#define USE_CROSS_COMPILE / **/
-#define PERL_TARGETARCH "" /**/
-#endif
-
-/* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double, or a long double when applicable. Usual values are 2,
- * 4 and 8. The default is eight, for safety.
- */
-#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
-# define MEM_ALIGNBYTES 8
-#else
-#define MEM_ALIGNBYTES 8
-#endif
-
-/* BYTEORDER:
- * This symbol holds the hexadecimal constant defined in byteorder,
- * in a UV, i.e. 0x1234 or 0x4321 or 0x12345678, etc...
- * If the compiler supports cross-compiling or multiple-architecture
- * binaries (eg. on NeXT systems), use compiler-defined macros to
- * determine the byte order.
- * On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture
- * Binaries (MAB) on either big endian or little endian machines.
- * The endian-ness is available at compile-time. This only matters
- * for perl, where the config.h can be generated and installed on
- * one system, and used by a different architecture to build an
- * extension. Older versions of NeXT that might not have
- * defined either *_ENDIAN__ were all on Motorola 680x0 series,
- * so the default case (for NeXT) is big endian to catch them.
- * This might matter for NeXT 3.0.
- */
-#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
-# ifdef __LITTLE_ENDIAN__
-# if LONGSIZE == 4
-# define BYTEORDER 0x1234
-# else
-# if LONGSIZE == 8
-# define BYTEORDER 0x12345678
-# endif
-# endif
-# else
-# ifdef __BIG_ENDIAN__
-# if LONGSIZE == 4
-# define BYTEORDER 0x4321
-# else
-# if LONGSIZE == 8
-# define BYTEORDER 0x87654321
-# endif
-# endif
-# endif
-# endif
-# if !defined(BYTEORDER) && (defined(NeXT) || defined(__NeXT__))
-# define BYTEORDER 0x4321
-# endif
-#else
-#define BYTEORDER 0x1234 /* large digits for MSB */
-#endif /* NeXT */
-
-/* CHARBITS:
- * This symbol contains the size of a char, so that the C preprocessor
- * can make decisions based on it.
- */
-#define CHARBITS 8 /**/
-
-/* CASTI32:
- * This symbol is defined if the C compiler can cast negative
- * or large floating point numbers to 32-bit ints.
- */
-/*#define CASTI32 / **/
-
-/* CASTNEGFLOAT:
- * This symbol is defined if the C compiler can cast negative
- * numbers to unsigned longs, ints and shorts.
- */
-/* CASTFLAGS:
- * This symbol contains flags that say what difficulties the compiler
- * has casting odd floating values to unsigned long:
- * 0 = ok
- * 1 = couldn't cast < 0
- * 2 = couldn't cast >= 0x80000000
- * 4 = couldn't cast in argument expression list
- */
-#define CASTNEGFLOAT /**/
-#define CASTFLAGS 0 /**/
-
-/* VOID_CLOSEDIR:
- * This symbol, if defined, indicates that the closedir() routine
- * does not return a value.
- */
-/*#define VOID_CLOSEDIR / **/
-
-/* HAS_FD_SET:
- * This symbol, when defined, indicates presence of the fd_set typedef
- * in <sys/types.h>
- */
-#define HAS_FD_SET /**/
-
-/* Gconvert:
- * This preprocessor macro is defined to convert a floating point
- * number to a string without a trailing decimal point. This
- * emulates the behavior of sprintf("%g"), but is sometimes much more
- * efficient. If gconvert() is not available, but gcvt() drops the
- * trailing decimal point, then gcvt() is used. If all else fails,
- * a macro using sprintf("%g") is used. Arguments for the Gconvert
- * macro are: value, number of digits, whether trailing zeros should
- * be retained, and the output buffer.
- * The usual values are:
- * d_Gconvert='gconvert((x),(n),(t),(b))'
- * d_Gconvert='gcvt((x),(n),(b))'
- * d_Gconvert='sprintf((b),"%.*g",(n),(x))'
- * The last two assume trailing zeros should not be kept.
- */
-#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
-
-/* HAS_GETPAGESIZE:
- * This symbol, if defined, indicates that the getpagesize system call
- * is available to get system page size, which is the granularity of
- * many memory management calls.
- */
-/*#define HAS_GETPAGESIZE / **/
-
-/* HAS_GNULIBC:
- * This symbol, if defined, indicates to the C program that
- * the GNU C library is being used. A better check is to use
- * the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc.
- */
-/*#define HAS_GNULIBC / **/
-#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)
-# define _GNU_SOURCE
-#endif
-
-/* HAS_ISASCII:
- * This manifest constant lets the C program know that isascii
- * is available.
- */
-#define HAS_ISASCII /**/
-
-/* HAS_LCHOWN:
- * This symbol, if defined, indicates that the lchown routine is
- * available to operate on a symbolic link (instead of following the
- * link).
- */
-/*#define HAS_LCHOWN / **/
-
-/* HAS_OPEN3:
- * This manifest constant lets the C program know that the three
- * argument form of open(2) is available.
- */
-/*#define HAS_OPEN3 / **/
-
-/* HAS_SAFE_BCOPY:
- * This symbol, if defined, indicates that the bcopy routine is available
- * to copy potentially overlapping memory blocks. Normally, you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-/*#define HAS_SAFE_BCOPY / **/
-
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. If you need to
- * copy overlapping memory blocks, you should check HAS_MEMMOVE and
- * use memmove() instead, if available.
- */
-/*#define HAS_SAFE_MEMCPY / **/
-
-/* HAS_SANE_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * and can be used to compare relative magnitudes of chars with their high
- * bits set. If it is not defined, roll your own version.
- */
-#define HAS_SANE_MEMCMP /**/
-
-/* HAS_SIGACTION:
- * This symbol, if defined, indicates that Vr4's sigaction() routine
- * is available.
- */
-/*#define HAS_SIGACTION / **/
-
-/* HAS_SIGSETJMP:
- * This variable indicates to the C program that the sigsetjmp()
- * routine is available to save the calling process's registers
- * and stack environment for later use by siglongjmp(), and
- * to optionally save the process's signal mask. See
- * Sigjmp_buf, Sigsetjmp, and Siglongjmp.
- */
-/* Sigjmp_buf:
- * This is the buffer type to be used with Sigsetjmp and Siglongjmp.
- */
-/* Sigsetjmp:
- * This macro is used in the same way as sigsetjmp(), but will invoke
- * traditional setjmp() if sigsetjmp isn't available.
- * See HAS_SIGSETJMP.
- */
-/* Siglongjmp:
- * This macro is used in the same way as siglongjmp(), but will invoke
- * traditional longjmp() if siglongjmp isn't available.
- * See HAS_SIGSETJMP.
- */
-/*#define HAS_SIGSETJMP / **/
-#ifdef HAS_SIGSETJMP
-#define Sigjmp_buf sigjmp_buf
-#define Sigsetjmp(buf,save_mask) sigsetjmp((buf),(save_mask))
-#define Siglongjmp(buf,retval) siglongjmp((buf),(retval))
-#else
-#define Sigjmp_buf jmp_buf
-#define Sigsetjmp(buf,save_mask) setjmp((buf))
-#define Siglongjmp(buf,retval) longjmp((buf),(retval))
-#endif
-
-/* HAS_STATIC_INLINE:
- * This symbol, if defined, indicates that the C compiler supports
- * C99-style static inline. That is, the function can't be called
- * from another translation unit.
- */
-/* PERL_STATIC_INLINE:
- * This symbol gives the best-guess incantation to use for static
- * inline functions. If HAS_STATIC_INLINE is defined, this will
- * give C99-style inline. If HAS_STATIC_INLINE is not defined,
- * this will give a plain 'static'. It will always be defined
- * to something that gives static linkage.
- * Possibilities include
- * static inline (c99)
- * static __inline__ (gcc -ansi)
- * static __inline (MSVC)
- * static _inline (older MSVC)
- * static (c89 compilers)
- */
-#ifdef _MSC_VER
-# define HAS_STATIC_INLINE /**/
-# define PERL_STATIC_INLINE static __inline /**/
-#else /* gcc presumably */
-# define HAS_STATIC_INLINE /**/
-# define PERL_STATIC_INLINE static __inline__ /**/
-#endif
-
-/* USE_STDIO_PTR:
- * This symbol is defined if the _ptr and _cnt fields (or similar)
- * of the stdio FILE structure can be used to access the stdio buffer
- * for a file handle. If this is defined, then the FILE_ptr(fp)
- * and FILE_cnt(fp) macros will also be defined and should be used
- * to access these fields.
- */
-/* FILE_ptr:
- * This macro is used to access the _ptr field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_PTR_LVALUE:
- * This symbol is defined if the FILE_ptr macro can be used as an
- * lvalue.
- */
-/* FILE_cnt:
- * This macro is used to access the _cnt field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_CNT_LVALUE:
- * This symbol is defined if the FILE_cnt macro can be used as an
- * lvalue.
- */
-/* STDIO_PTR_LVAL_SETS_CNT:
- * This symbol is defined if using the FILE_ptr macro as an lvalue
- * to increase the pointer by n has the side effect of decreasing the
- * value of File_cnt(fp) by n.
- */
-/* STDIO_PTR_LVAL_NOCHANGE_CNT:
- * This symbol is defined if using the FILE_ptr macro as an lvalue
- * to increase the pointer by n leaves File_cnt(fp) unchanged.
- */
-#define USE_STDIO_PTR /**/
-#ifdef USE_STDIO_PTR
-#define FILE_ptr(fp) ((fp)->_ptr)
-#define STDIO_PTR_LVALUE /**/
-#define FILE_cnt(fp) ((fp)->_cnt)
-#define STDIO_CNT_LVALUE /**/
-/*#define STDIO_PTR_LVAL_SETS_CNT / **/
-#define STDIO_PTR_LVAL_NOCHANGE_CNT /**/
-#endif
-
-/* USE_STDIO_BASE:
- * This symbol is defined if the _base field (or similar) of the
- * stdio FILE structure can be used to access the stdio buffer for
- * a file handle. If this is defined, then the FILE_base(fp) macro
- * will also be defined and should be used to access this field.
- * Also, the FILE_bufsiz(fp) macro will be defined and should be used
- * to determine the number of bytes in the buffer. USE_STDIO_BASE
- * will never be defined unless USE_STDIO_PTR is.
- */
-/* FILE_base:
- * This macro is used to access the _base field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_BASE is defined.
- */
-/* FILE_bufsiz:
- * This macro is used to determine the number of bytes in the I/O
- * buffer pointed to by _base field (or equivalent) of the FILE
- * structure pointed to its argument. This macro will always be defined
- * if USE_STDIO_BASE is defined.
- */
-#define USE_STDIO_BASE /**/
-#ifdef USE_STDIO_BASE
-#define FILE_base(fp) ((fp)->_base)
-#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
-#endif
-
-/* HAS_VPRINTF:
- * This symbol, if defined, indicates that the vprintf routine is available
- * to printf with a pointer to an argument list. If unavailable, you
- * may need to write your own, probably in terms of _doprnt().
- */
-/* USE_CHAR_VSPRINTF:
- * This symbol is defined if this system has vsprintf() returning type
- * (char*). The trend seems to be to declare it as "int vsprintf()". It
- * is up to the package author to declare vsprintf correctly based on the
- * symbol.
- */
-#define HAS_VPRINTF /**/
-/*#define USE_CHAR_VSPRINTF / **/
-
-/* DOUBLESIZE:
- * This symbol contains the size of a double, so that the C preprocessor
- * can make decisions based on it.
- */
-#define DOUBLESIZE 8 /**/
-
-/* I_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <time.h>.
- */
-/* I_SYS_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h>.
- */
-/* I_SYS_TIME_KERNEL:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h> with KERNEL defined.
- */
-/* HAS_TM_TM_ZONE:
- * This symbol, if defined, indicates to the C program that
- * the struct tm has a tm_zone field.
- */
-/* HAS_TM_TM_GMTOFF:
- * This symbol, if defined, indicates to the C program that
- * the struct tm has a tm_gmtoff field.
- */
-#define I_TIME /**/
-/*#define I_SYS_TIME / **/
-/*#define I_SYS_TIME_KERNEL / **/
-/*#define HAS_TM_TM_ZONE / **/
-/*#define HAS_TM_TM_GMTOFF / **/
-
-/* VAL_O_NONBLOCK:
- * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
- * non-blocking I/O for the file descriptor. Note that there is no way
- * back, i.e. you cannot turn it blocking again this way. If you wish to
- * alternatively switch between blocking and non-blocking, use the
- * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
- */
-/* VAL_EAGAIN:
- * This symbol holds the errno error code set by read() when no data was
- * present on the non-blocking file descriptor.
- */
-/* RD_NODATA:
- * This symbol holds the return code from read() when no data is present
- * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
- * not defined, then you can't distinguish between no data and EOF by
- * issuing a read(). You'll have to find another way to tell for sure!
- */
-/* EOF_NONBLOCK:
- * This symbol, if defined, indicates to the C program that a read() on
- * a non-blocking file descriptor will return 0 on EOF, and not the value
- * held in RD_NODATA (-1 usually, in that case!).
- */
-#define VAL_O_NONBLOCK O_NONBLOCK
-#define VAL_EAGAIN EAGAIN
-#define RD_NODATA -1
-#define EOF_NONBLOCK
-
-/* PTRSIZE:
- * This symbol contains the size of a pointer, so that the C preprocessor
- * can make decisions based on it. It will be sizeof(void *) if
- * the compiler supports (void *); otherwise it will be
- * sizeof(char *).
- */
-#define PTRSIZE 8 /**/
-
-/* Drand01:
- * This macro is to be used to generate uniformly distributed
- * random numbers over the range [0., 1.[. You may have to supply
- * an 'extern double drand48();' in your program since SunOS 4.1.3
- * doesn't provide you with anything relevant in its headers.
- * See HAS_DRAND48_PROTO.
- */
-/* Rand_seed_t:
- * This symbol defines the type of the argument of the
- * random seed function.
- */
-/* seedDrand01:
- * This symbol defines the macro to be used in seeding the
- * random number generator (see Drand01).
- */
-/* RANDBITS:
- * This symbol indicates how many bits are produced by the
- * function used to generate normalized random numbers.
- * Values include 15, 16, 31, and 48.
- */
-#define Drand01() (rand()/(double)((unsigned)1<<RANDBITS)) /**/
-#define Rand_seed_t unsigned /**/
-#define seedDrand01(x) srand((Rand_seed_t)x) /**/
-#define RANDBITS 15 /**/
-
-/* SSize_t:
- * This symbol holds the type used by functions that return
- * a count of bytes or an error condition. It must be a signed type.
- * It is usually ssize_t, but may be long or int, etc.
- * It may be necessary to include <sys/types.h> or <unistd.h>
- * to get any typedef'ed information.
- * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
- */
-#define SSize_t __int64 /* signed count of bytes */
-
-/* EBCDIC:
- * This symbol, if defined, indicates that this system uses
- * EBCDIC encoding.
- */
-/*#define EBCDIC / **/
-
-/* SETUID_SCRIPTS_ARE_SECURE_NOW:
- * This symbol, if defined, indicates that the bug that prevents
- * setuid scripts from being secure is not present in this kernel.
- */
-/* DOSUID:
- * This symbol, if defined, indicates that the C program should
- * check the script that it is executing for setuid/setgid bits, and
- * attempt to emulate setuid/setgid on systems that have disabled
- * setuid #! scripts because the kernel can't do it securely.
- * It is up to the package designer to make sure that this emulation
- * is done securely. Among other things, it should do an fstat on
- * the script it just opened to make sure it really is a setuid/setgid
- * script, it should make sure the arguments passed correspond exactly
- * to the argument on the #! line, and it should not trust any
- * subprocesses to which it must pass the filename rather than the
- * file descriptor of the script to be executed.
- */
-/*#define SETUID_SCRIPTS_ARE_SECURE_NOW / **/
-/*#define DOSUID / **/
-
-/* PERL_USE_DEVEL:
- * This symbol, if defined, indicates that Perl was configured with
- * -Dusedevel, to enable development features. This should not be
- * done for production builds.
- */
-/*#define PERL_USE_DEVEL / **/
-
-/* HAS_ATOLF:
- * This symbol, if defined, indicates that the atolf routine is
- * available to convert strings into long doubles.
- */
-/*#define HAS_ATOLF / **/
-
-/* HAS_ATOLL:
- * This symbol, if defined, indicates that the atoll routine is
- * available to convert strings into long longs.
- */
-#define HAS_ATOLL /**/
-
-/* HAS__FWALK:
- * This symbol, if defined, indicates that the _fwalk system call is
- * available to apply a function to all the file handles.
- */
-/*#define HAS__FWALK / **/
-
-/* HAS_AINTL:
- * This symbol, if defined, indicates that the aintl routine is
- * available. If copysignl is also present we can emulate modfl.
- */
-/*#define HAS_AINTL / **/
-
-/* HAS_BUILTIN_CHOOSE_EXPR:
- * Can we handle GCC builtin for compile-time ternary-like expressions
- */
-/* HAS_BUILTIN_EXPECT:
- * Can we handle GCC builtin for telling that certain values are more
- * likely
- */
-/*#define HAS_BUILTIN_EXPECT / **/
-/*#define HAS_BUILTIN_CHOOSE_EXPR / **/
-
-/* HAS_C99_VARIADIC_MACROS:
- * If defined, the compiler supports C99 variadic macros.
- */
-/*#define HAS_C99_VARIADIC_MACROS / **/
-
-/* HAS_CLASS:
- * This symbol, if defined, indicates that the class routine is
- * available to classify doubles. Available for example in AIX.
- * The returned values are defined in <float.h> and are:
- *
- * FP_PLUS_NORM Positive normalized, nonzero
- * FP_MINUS_NORM Negative normalized, nonzero
- * FP_PLUS_DENORM Positive denormalized, nonzero
- * FP_MINUS_DENORM Negative denormalized, nonzero
- * FP_PLUS_ZERO +0.0
- * FP_MINUS_ZERO -0.0
- * FP_PLUS_INF +INF
- * FP_MINUS_INF -INF
- * FP_NANS Signaling Not a Number (NaNS)
- * FP_NANQ Quiet Not a Number (NaNQ)
- */
-/*#define HAS_CLASS / **/
-
-/* HAS_CLEARENV:
- * This symbol, if defined, indicates that the clearenv () routine is
- * available for use.
- */
-/*#define HAS_CLEARENV / **/
-
-/* HAS_STRUCT_CMSGHDR:
- * This symbol, if defined, indicates that the struct cmsghdr
- * is supported.
- */
-/*#define HAS_STRUCT_CMSGHDR / **/
-
-/* HAS_COPYSIGNL:
- * This symbol, if defined, indicates that the copysignl routine is
- * available. If aintl is also present we can emulate modfl.
- */
-/*#define HAS_COPYSIGNL / **/
-
-/* USE_CPLUSPLUS:
- * This symbol, if defined, indicates that a C++ compiler was
- * used to compiled Perl and will be used to compile extensions.
- */
-/*#define USE_CPLUSPLUS / **/
-
-/* HAS_DBMINIT_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the dbminit() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int dbminit(char *);
- */
-/*#define HAS_DBMINIT_PROTO / **/
-
-/* HAS_DIR_DD_FD:
- * This symbol, if defined, indicates that the the DIR* dirstream
- * structure contains a member variable named dd_fd.
- */
-/*#define HAS_DIR_DD_FD / **/
-
-/* HAS_DIRFD:
- * This manifest constant lets the C program know that dirfd
- * is available.
- */
-/*#define HAS_DIRFD / **/
-
-/* DLSYM_NEEDS_UNDERSCORE:
- * This symbol, if defined, indicates that we need to prepend an
- * underscore to the symbol name before calling dlsym(). This only
- * makes sense if you *have* dlsym, which we will presume is the
- * case if you're using dl_dlopen.xs.
- */
-/*#define DLSYM_NEEDS_UNDERSCORE / **/
-
-/* HAS_FAST_STDIO:
- * This symbol, if defined, indicates that the "fast stdio"
- * is available to manipulate the stdio buffers directly.
- */
-#define HAS_FAST_STDIO /**/
-
-/* HAS_FCHDIR:
- * This symbol, if defined, indicates that the fchdir routine is
- * available to change directory using a file descriptor.
- */
-/*#define HAS_FCHDIR / **/
-
-/* FCNTL_CAN_LOCK:
- * This symbol, if defined, indicates that fcntl() can be used
- * for file locking. Normally on Unix systems this is defined.
- * It may be undefined on VMS.
- */
-/*#define FCNTL_CAN_LOCK / **/
-
-/* HAS_FINITE:
- * This symbol, if defined, indicates that the finite routine is
- * available to check whether a double is finite (non-infinity non-NaN).
- */
-/*#define HAS_FINITE / **/
-
-/* HAS_FINITEL:
- * This symbol, if defined, indicates that the finitel routine is
- * available to check whether a long double is finite
- * (non-infinity non-NaN).
- */
-/*#define HAS_FINITEL / **/
-
-/* HAS_FLOCK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the flock() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int flock(int, int);
- */
-#define HAS_FLOCK_PROTO /**/
-
-/* HAS_FP_CLASS:
- * This symbol, if defined, indicates that the fp_class routine is
- * available to classify doubles. Available for example in Digital UNIX.
- * The returned values are defined in <math.h> and are:
- *
- * FP_SNAN Signaling NaN (Not-a-Number)
- * FP_QNAN Quiet NaN (Not-a-Number)
- * FP_POS_INF +infinity
- * FP_NEG_INF -infinity
- * FP_POS_NORM Positive normalized
- * FP_NEG_NORM Negative normalized
- * FP_POS_DENORM Positive denormalized
- * FP_NEG_DENORM Negative denormalized
- * FP_POS_ZERO +0.0 (positive zero)
- * FP_NEG_ZERO -0.0 (negative zero)
- */
-/*#define HAS_FP_CLASS / **/
-
-/* HAS_FPCLASS:
- * This symbol, if defined, indicates that the fpclass routine is
- * available to classify doubles. Available for example in Solaris/SVR4.
- * The returned values are defined in <ieeefp.h> and are:
- *
- * FP_SNAN signaling NaN
- * FP_QNAN quiet NaN
- * FP_NINF negative infinity
- * FP_PINF positive infinity
- * FP_NDENORM negative denormalized non-zero
- * FP_PDENORM positive denormalized non-zero
- * FP_NZERO negative zero
- * FP_PZERO positive zero
- * FP_NNORM negative normalized non-zero
- * FP_PNORM positive normalized non-zero
- */
-/*#define HAS_FPCLASS / **/
-
-/* HAS_FPCLASSIFY:
- * This symbol, if defined, indicates that the fpclassify routine is
- * available to classify doubles. Available for example in HP-UX.
- * The returned values are defined in <math.h> and are
- *
- * FP_NORMAL Normalized
- * FP_ZERO Zero
- * FP_INFINITE Infinity
- * FP_SUBNORMAL Denormalized
- * FP_NAN NaN
- *
- */
-/*#define HAS_FPCLASSIFY / **/
-
-/* HAS_FPCLASSL:
- * This symbol, if defined, indicates that the fpclassl routine is
- * available to classify long doubles. Available for example in IRIX.
- * The returned values are defined in <ieeefp.h> and are:
- *
- * FP_SNAN signaling NaN
- * FP_QNAN quiet NaN
- * FP_NINF negative infinity
- * FP_PINF positive infinity
- * FP_NDENORM negative denormalized non-zero
- * FP_PDENORM positive denormalized non-zero
- * FP_NZERO negative zero
- * FP_PZERO positive zero
- * FP_NNORM negative normalized non-zero
- * FP_PNORM positive normalized non-zero
- */
-/*#define HAS_FPCLASSL / **/
-
-/* HAS_FPOS64_T:
- * This symbol will be defined if the C compiler supports fpos64_t.
- */
-/*#define HAS_FPOS64_T / **/
-
-/* HAS_FREXPL:
- * This symbol, if defined, indicates that the frexpl routine is
- * available to break a long double floating-point number into
- * a normalized fraction and an integral power of 2.
- */
-/*#define HAS_FREXPL / **/
-
-/* HAS_STRUCT_FS_DATA:
- * This symbol, if defined, indicates that the struct fs_data
- * to do statfs() is supported.
- */
-/*#define HAS_STRUCT_FS_DATA / **/
-
-/* HAS_FSEEKO:
- * This symbol, if defined, indicates that the fseeko routine is
- * available to fseek beyond 32 bits (useful for ILP32 hosts).
- */
-/*#define HAS_FSEEKO / **/
-
-/* HAS_FSTATFS:
- * This symbol, if defined, indicates that the fstatfs routine is
- * available to stat filesystems by file descriptors.
- */
-/*#define HAS_FSTATFS / **/
-
-/* HAS_FSYNC:
- * This symbol, if defined, indicates that the fsync routine is
- * available to write a file's modified data and attributes to
- * permanent storage.
- */
-/*#define HAS_FSYNC / **/
-
-/* HAS_FTELLO:
- * This symbol, if defined, indicates that the ftello routine is
- * available to ftell beyond 32 bits (useful for ILP32 hosts).
- */
-/*#define HAS_FTELLO / **/
-
-/* HAS_FUTIMES:
- * This symbol, if defined, indicates that the futimes routine is
- * available to change file descriptor time stamps with struct timevals.
- */
-/*#define HAS_FUTIMES / **/
-
-/* HAS_GETADDRINFO:
- * This symbol, if defined, indicates that the getaddrinfo() function
- * is available for use.
- */
-/*#define HAS_GETADDRINFO / **/
-
-/* HAS_GETCWD:
- * This symbol, if defined, indicates that the getcwd routine is
- * available to get the current working directory.
- */
-#define HAS_GETCWD /**/
-
-/* HAS_GETESPWNAM:
- * This symbol, if defined, indicates that the getespwnam system call is
- * available to retrieve enchanced (shadow) password entries by name.
- */
-/*#define HAS_GETESPWNAM / **/
-
-/* HAS_GETFSSTAT:
- * This symbol, if defined, indicates that the getfsstat routine is
- * available to stat filesystems in bulk.
- */
-/*#define HAS_GETFSSTAT / **/
-
-/* HAS_GETITIMER:
- * This symbol, if defined, indicates that the getitimer routine is
- * available to return interval timers.
- */
-/*#define HAS_GETITIMER / **/
-
-/* HAS_GETMNT:
- * This symbol, if defined, indicates that the getmnt routine is
- * available to get filesystem mount info by filename.
- */
-/*#define HAS_GETMNT / **/
-
-/* HAS_GETMNTENT:
- * This symbol, if defined, indicates that the getmntent routine is
- * available to iterate through mounted file systems to get their info.
- */
-/*#define HAS_GETMNTENT / **/
-
-/* HAS_GETNAMEINFO:
- * This symbol, if defined, indicates that the getnameinfo() function
- * is available for use.
- */
-/*#define HAS_GETNAMEINFO / **/
-
-/* HAS_GETPRPWNAM:
- * This symbol, if defined, indicates that the getprpwnam system call is
- * available to retrieve protected (shadow) password entries by name.
- */
-/*#define HAS_GETPRPWNAM / **/
-
-/* HAS_GETSPNAM:
- * This symbol, if defined, indicates that the getspnam system call is
- * available to retrieve SysV shadow password entries by name.
- */
-/*#define HAS_GETSPNAM / **/
-
-/* HAS_HASMNTOPT:
- * This symbol, if defined, indicates that the hasmntopt routine is
- * available to query the mount options of file systems.
- */
-/*#define HAS_HASMNTOPT / **/
-
-/* HAS_ILOGBL:
- * This symbol, if defined, indicates that the ilogbl routine is
- * available. If scalbnl is also present we can emulate frexpl.
- */
-/*#define HAS_ILOGBL / **/
-
-/* HAS_INETNTOP:
- * This symbol, if defined, indicates that the inet_ntop() function
- * is available to parse IPv4 and IPv6 strings.
- */
-/*#define HAS_INETNTOP / **/
-
-/* HAS_INETPTON:
- * This symbol, if defined, indicates that the inet_pton() function
- * is available to parse IPv4 and IPv6 strings.
- */
-/*#define HAS_INETPTON / **/
-
-/* HAS_INT64_T:
- * This symbol will defined if the C compiler supports int64_t.
- * Usually the <inttypes.h> needs to be included, but sometimes
- * <sys/types.h> is enough.
- */
-/*#define HAS_INT64_T / **/
-
-/* HAS_ISFINITE:
- * This symbol, if defined, indicates that the isfinite routine is
- * available to check whether a double is finite (non-infinity non-NaN).
- */
-/*#define HAS_ISFINITE / **/
-
-/* HAS_ISINF:
- * This symbol, if defined, indicates that the isinf routine is
- * available to check whether a double is an infinity.
- */
-/*#define HAS_ISINF / **/
-
-/* HAS_ISNAN:
- * This symbol, if defined, indicates that the isnan routine is
- * available to check whether a double is a NaN.
- */
-#define HAS_ISNAN /**/
-
-/* HAS_ISNANL:
- * This symbol, if defined, indicates that the isnanl routine is
- * available to check whether a long double is a NaN.
- */
-/*#define HAS_ISNANL / **/
-
-/* HAS_LDBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol LDBL_DIG, which is the number
- * of significant digits in a long double precision number. Unlike
- * for DBL_DIG, there's no good guess for LDBL_DIG if it is undefined.
- */
-#define HAS_LDBL_DIG /**/
-
-/* LIBM_LIB_VERSION:
- * This symbol, if defined, indicates that libm exports _LIB_VERSION
- * and that math.h defines the enum to manipulate it.
- */
-/*#define LIBM_LIB_VERSION / **/
-
-/* HAS_MADVISE:
- * This symbol, if defined, indicates that the madvise system call is
- * available to map a file into memory.
- */
-/*#define HAS_MADVISE / **/
-
-/* HAS_MALLOC_SIZE:
- * This symbol, if defined, indicates that the malloc_size
- * routine is available for use.
- */
-/*#define HAS_MALLOC_SIZE / **/
-
-/* HAS_MALLOC_GOOD_SIZE:
- * This symbol, if defined, indicates that the malloc_good_size
- * routine is available for use.
- */
-/*#define HAS_MALLOC_GOOD_SIZE / **/
-
-/* HAS_MKDTEMP:
- * This symbol, if defined, indicates that the mkdtemp routine is
- * available to exclusively create a uniquely named temporary directory.
- */
-/*#define HAS_MKDTEMP / **/
-
-/* HAS_MKSTEMPS:
- * This symbol, if defined, indicates that the mkstemps routine is
- * available to excluslvely create and open a uniquely named
- * (with a suffix) temporary file.
- */
-/*#define HAS_MKSTEMPS / **/
-
-/* HAS_MODFL:
- * This symbol, if defined, indicates that the modfl routine is
- * available to split a long double x into a fractional part f and
- * an integer part i such that |f| < 1.0 and (f + i) = x.
- */
-/* HAS_MODFL_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the modfl() function. Otherwise, it is up
- * to the program to supply one.
- */
-/* HAS_MODFL_POW32_BUG:
- * This symbol, if defined, indicates that the modfl routine is
- * broken for long doubles >= pow(2, 32).
- * For example from 4294967303.150000 one would get 4294967302.000000
- * and 1.150000. The bug has been seen in certain versions of glibc,
- * release 2.2.2 is known to be okay.
- */
-/*#define HAS_MODFL / **/
-/*#define HAS_MODFL_PROTO / **/
-/*#define HAS_MODFL_POW32_BUG / **/
-
-/* HAS_MPROTECT:
- * This symbol, if defined, indicates that the mprotect system call is
- * available to modify the access protection of a memory mapped file.
- */
-/*#define HAS_MPROTECT / **/
-
-/* HAS_STRUCT_MSGHDR:
- * This symbol, if defined, indicates that the struct msghdr
- * is supported.
- */
-/*#define HAS_STRUCT_MSGHDR / **/
-
-/* HAS_NL_LANGINFO:
- * This symbol, if defined, indicates that the nl_langinfo routine is
- * available to return local data. You will also need <langinfo.h>
- * and therefore I_LANGINFO.
- */
-/*#define HAS_NL_LANGINFO / **/
-
-/* HAS_OFF64_T:
- * This symbol will be defined if the C compiler supports off64_t.
- */
-/*#define HAS_OFF64_T / **/
-
-/* HAS_PROCSELFEXE:
- * This symbol is defined if PROCSELFEXE_PATH is a symlink
- * to the absolute pathname of the executing program.
- */
-/* PROCSELFEXE_PATH:
- * If HAS_PROCSELFEXE is defined this symbol is the filename
- * of the symbolic link pointing to the absolute pathname of
- * the executing program.
- */
-/*#define HAS_PROCSELFEXE / **/
-#if defined(HAS_PROCSELFEXE) && !defined(PROCSELFEXE_PATH)
-#define PROCSELFEXE_PATH /**/
-#endif
-
-/* HAS_PTHREAD_ATTR_SETSCOPE:
- * This symbol, if defined, indicates that the pthread_attr_setscope
- * system call is available to set the contention scope attribute of
- * a thread attribute object.
- */
-/*#define HAS_PTHREAD_ATTR_SETSCOPE / **/
-
-/* HAS_READV:
- * This symbol, if defined, indicates that the readv routine is
- * available to do gather reads. You will also need <sys/uio.h>
- * and there I_SYSUIO.
- */
-/*#define HAS_READV / **/
-
-/* HAS_RECVMSG:
- * This symbol, if defined, indicates that the recvmsg routine is
- * available to send structured socket messages.
- */
-/*#define HAS_RECVMSG / **/
-
-/* HAS_SBRK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the sbrk() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern void* sbrk(int);
- * extern void* sbrk(size_t);
- */
-/*#define HAS_SBRK_PROTO / **/
-
-/* HAS_SCALBNL:
- * This symbol, if defined, indicates that the scalbnl routine is
- * available. If ilogbl is also present we can emulate frexpl.
- */
-/*#define HAS_SCALBNL / **/
-
-/* HAS_SENDMSG:
- * This symbol, if defined, indicates that the sendmsg routine is
- * available to send structured socket messages.
- */
-/*#define HAS_SENDMSG / **/
-
-/* HAS_SETITIMER:
- * This symbol, if defined, indicates that the setitimer routine is
- * available to set interval timers.
- */
-/*#define HAS_SETITIMER / **/
-
-/* HAS_SETPROCTITLE:
- * This symbol, if defined, indicates that the setproctitle routine is
- * available to set process title.
- */
-/*#define HAS_SETPROCTITLE / **/
-
-/* USE_SFIO:
- * This symbol, if defined, indicates that sfio should
- * be used.
- */
-/*#define USE_SFIO / **/
-
-/* HAS_SIGNBIT:
- * This symbol, if defined, indicates that the signbit routine is
- * available to check if the given number has the sign bit set.
- * This should include correct testing of -0.0. This will only be set
- * if the signbit() routine is safe to use with the NV type used internally
- * in perl. Users should call Perl_signbit(), which will be #defined to
- * the system's signbit() function or macro if this symbol is defined.
- */
-/*#define HAS_SIGNBIT / **/
-
-/* HAS_SIGPROCMASK:
- * This symbol, if defined, indicates that the sigprocmask
- * system call is available to examine or change the signal mask
- * of the calling process.
- */
-/*#define HAS_SIGPROCMASK / **/
-
-/* USE_SITECUSTOMIZE:
- * This symbol, if defined, indicates that sitecustomize should
- * be used.
- */
-#ifndef USE_SITECUSTOMIZE
-/*#define USE_SITECUSTOMIZE / **/
-#endif
-
-/* HAS_SNPRINTF:
- * This symbol, if defined, indicates that the snprintf () library
- * function is available for use.
- */
-/* HAS_VSNPRINTF:
- * This symbol, if defined, indicates that the vsnprintf () library
- * function is available for use.
- */
-#define HAS_SNPRINTF /**/
-#define HAS_VSNPRINTF /**/
-
-/* HAS_SOCKATMARK:
- * This symbol, if defined, indicates that the sockatmark routine is
- * available to test whether a socket is at the out-of-band mark.
- */
-/*#define HAS_SOCKATMARK / **/
-
-/* HAS_SOCKATMARK_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the sockatmark() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int sockatmark(int);
- */
-/*#define HAS_SOCKATMARK_PROTO / **/
-
-/* HAS_SOCKS5_INIT:
- * This symbol, if defined, indicates that the socks5_init routine is
- * available to initialize SOCKS 5.
- */
-/*#define HAS_SOCKS5_INIT / **/
-
-/* SPRINTF_RETURNS_STRLEN:
- * This variable defines whether sprintf returns the length of the string
- * (as per the ANSI spec). Some C libraries retain compatibility with
- * pre-ANSI C and return a pointer to the passed in buffer; for these
- * this variable will be undef.
- */
-#define SPRINTF_RETURNS_STRLEN /**/
-
-/* HAS_SQRTL:
- * This symbol, if defined, indicates that the sqrtl routine is
- * available to do long double square roots.
- */
-/*#define HAS_SQRTL / **/
-
-/* HAS_SETRESGID_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the setresgid() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern int setresgid(uid_t ruid, uid_t euid, uid_t suid);
- */
-/*#define HAS_SETRESGID_PROTO / **/
-
-/* HAS_SETRESUID_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the setresuid() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern int setresuid(uid_t ruid, uid_t euid, uid_t suid);
- */
-/*#define HAS_SETRESUID_PROTO / **/
-
-/* HAS_STRUCT_STATFS_F_FLAGS:
- * This symbol, if defined, indicates that the struct statfs
- * does have the f_flags member containing the mount flags of
- * the filesystem containing the file.
- * This kind of struct statfs is coming from <sys/mount.h> (BSD 4.3),
- * not from <sys/statfs.h> (SYSV). Older BSDs (like Ultrix) do not
- * have statfs() and struct statfs, they have ustat() and getmnt()
- * with struct ustat and struct fs_data.
- */
-/*#define HAS_STRUCT_STATFS_F_FLAGS / **/
-
-/* HAS_STRUCT_STATFS:
- * This symbol, if defined, indicates that the struct statfs
- * to do statfs() is supported.
- */
-/*#define HAS_STRUCT_STATFS / **/
-
-/* HAS_FSTATVFS:
- * This symbol, if defined, indicates that the fstatvfs routine is
- * available to stat filesystems by file descriptors.
- */
-/*#define HAS_FSTATVFS / **/
-
-/* HAS_STRFTIME:
- * This symbol, if defined, indicates that the strftime routine is
- * available to do time formatting.
- */
-#define HAS_STRFTIME /**/
-
-/* HAS_STRLCAT:
- * This symbol, if defined, indicates that the strlcat () routine is
- * available to do string concatenation.
- */
-/*#define HAS_STRLCAT / **/
-
-/* HAS_STRLCPY:
- * This symbol, if defined, indicates that the strlcpy () routine is
- * available to do string copying.
- */
-/*#define HAS_STRLCPY / **/
-
-/* HAS_STRTOLD:
- * This symbol, if defined, indicates that the strtold routine is
- * available to convert strings to long doubles.
- */
-/*#define HAS_STRTOLD / **/
-
-/* HAS_STRTOLL:
- * This symbol, if defined, indicates that the strtoll routine is
- * available to convert strings to long longs.
- */
-#define HAS_STRTOLL /**/
-
-/* HAS_STRTOQ:
- * This symbol, if defined, indicates that the strtoq routine is
- * available to convert strings to long longs (quads).
- */
-/*#define HAS_STRTOQ / **/
-
-/* HAS_STRTOULL:
- * This symbol, if defined, indicates that the strtoull routine is
- * available to convert strings to unsigned long longs.
- */
-#define HAS_STRTOULL /**/
-
-/* HAS_STRTOUQ:
- * This symbol, if defined, indicates that the strtouq routine is
- * available to convert strings to unsigned long longs (quads).
- */
-/*#define HAS_STRTOUQ / **/
-
-/* HAS_SYSCALL_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the syscall() function. Otherwise, it is up
- * to the program to supply one. Good guesses are
- * extern int syscall(int, ...);
- * extern int syscall(long, ...);
- */
-/*#define HAS_SYSCALL_PROTO / **/
-
-/* HAS_TELLDIR_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the telldir() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern long telldir(DIR*);
- */
-#define HAS_TELLDIR_PROTO /**/
-
-/* HAS_CTIME64:
- * This symbol, if defined, indicates that the ctime64 () routine is
- * available to do the 64bit variant of ctime ()
- */
-/* HAS_LOCALTIME64:
- * This symbol, if defined, indicates that the localtime64 () routine is
- * available to do the 64bit variant of localtime ()
- */
-/* HAS_GMTIME64:
- * This symbol, if defined, indicates that the gmtime64 () routine is
- * available to do the 64bit variant of gmtime ()
- */
-/* HAS_MKTIME64:
- * This symbol, if defined, indicates that the mktime64 () routine is
- * available to do the 64bit variant of mktime ()
- */
-/* HAS_DIFFTIME64:
- * This symbol, if defined, indicates that the difftime64 () routine is
- * available to do the 64bit variant of difftime ()
- */
-/* HAS_ASCTIME64:
- * This symbol, if defined, indicates that the asctime64 () routine is
- * available to do the 64bit variant of asctime ()
- */
-/*#define HAS_CTIME64 / **/
-/*#define HAS_LOCALTIME64 / **/
-/*#define HAS_GMTIME64 / **/
-/*#define HAS_MKTIME64 / **/
-/*#define HAS_DIFFTIME64 / **/
-/*#define HAS_ASCTIME64 / **/
-
-/* HAS_TIMEGM:
- * This symbol, if defined, indicates that the timegm routine is
- * available to do the opposite of gmtime ()
- */
-/*#define HAS_TIMEGM / **/
-
-/* U32_ALIGNMENT_REQUIRED:
- * This symbol, if defined, indicates that you must access
- * character data through U32-aligned pointers.
- */
-#ifndef U32_ALIGNMENT_REQUIRED
-#define U32_ALIGNMENT_REQUIRED /**/
-#endif
-
-/* HAS_UALARM:
- * This symbol, if defined, indicates that the ualarm routine is
- * available to do alarms with microsecond granularity.
- */
-/*#define HAS_UALARM / **/
-
-/* HAS_UNORDERED:
- * This symbol, if defined, indicates that the unordered routine is
- * available to check whether two doubles are unordered
- * (effectively: whether either of them is NaN)
- */
-/*#define HAS_UNORDERED / **/
-
-/* HAS_UNSETENV:
- * This symbol, if defined, indicates that the unsetenv () routine is
- * available for use.
- */
-/*#define HAS_UNSETENV / **/
-
-/* HAS_USLEEP_PROTO:
- * This symbol, if defined, indicates that the system provides
- * a prototype for the usleep() function. Otherwise, it is up
- * to the program to supply one. A good guess is
- * extern int usleep(useconds_t);
- */
-/*#define HAS_USLEEP_PROTO / **/
-
-/* HAS_USTAT:
- * This symbol, if defined, indicates that the ustat system call is
- * available to query file system statistics by dev_t.
- */
-/*#define HAS_USTAT / **/
-
-/* HAS_WRITEV:
- * This symbol, if defined, indicates that the writev routine is
- * available to do scatter writes.
- */
-/*#define HAS_WRITEV / **/
-
-/* USE_DYNAMIC_LOADING:
- * This symbol, if defined, indicates that dynamic loading of
- * some sort is available.
- */
-#define USE_DYNAMIC_LOADING /**/
-
-/* FFLUSH_NULL:
- * This symbol, if defined, tells that fflush(NULL) does flush
- * all pending stdio output.
- */
-/* FFLUSH_ALL:
- * This symbol, if defined, tells that to flush
- * all pending stdio output one must loop through all
- * the stdio file handles stored in an array and fflush them.
- * Note that if fflushNULL is defined, fflushall will not
- * even be probed for and will be left undefined.
- */
-#define FFLUSH_NULL /**/
-/*#define FFLUSH_ALL / **/
-
-/* I_ASSERT:
- * This symbol, if defined, indicates that <assert.h> exists and
- * could be included by the C program to get the assert() macro.
- */
-#define I_ASSERT /**/
-
-/* I_CRYPT:
- * This symbol, if defined, indicates that <crypt.h> exists and
- * should be included.
- */
-/*#define I_CRYPT / **/
-
-/* DB_Prefix_t:
- * This symbol contains the type of the prefix structure element
- * in the <db.h> header file. In older versions of DB, it was
- * int, while in newer ones it is u_int32_t.
- */
-/* DB_Hash_t:
- * This symbol contains the type of the prefix structure element
- * in the <db.h> header file. In older versions of DB, it was
- * int, while in newer ones it is size_t.
- */
-/* DB_VERSION_MAJOR_CFG:
- * This symbol, if defined, defines the major version number of
- * Berkeley DB found in the <db.h> header when Perl was configured.
- */
-/* DB_VERSION_MINOR_CFG:
- * This symbol, if defined, defines the minor version number of
- * Berkeley DB found in the <db.h> header when Perl was configured.
- * For DB version 1 this is always 0.
- */
-/* DB_VERSION_PATCH_CFG:
- * This symbol, if defined, defines the patch version number of
- * Berkeley DB found in the <db.h> header when Perl was configured.
- * For DB version 1 this is always 0.
- */
-#define DB_Hash_t int /**/
-#define DB_Prefix_t int /**/
-#define DB_VERSION_MAJOR_CFG 0 /**/
-#define DB_VERSION_MINOR_CFG 0 /**/
-#define DB_VERSION_PATCH_CFG 0 /**/
-
-/* I_FP:
- * This symbol, if defined, indicates that <fp.h> exists and
- * should be included.
- */
-/*#define I_FP / **/
-
-/* I_FP_CLASS:
- * This symbol, if defined, indicates that <fp_class.h> exists and
- * should be included.
- */
-/*#define I_FP_CLASS / **/
-
-/* I_IEEEFP:
- * This symbol, if defined, indicates that <ieeefp.h> exists and
- * should be included.
- */
-/*#define I_IEEEFP / **/
-
-/* I_INTTYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <inttypes.h>.
- */
-/*#define I_INTTYPES / **/
-
-/* I_LANGINFO:
- * This symbol, if defined, indicates that <langinfo.h> exists and
- * should be included.
- */
-/*#define I_LANGINFO / **/
-
-/* I_LIBUTIL:
- * This symbol, if defined, indicates that <libutil.h> exists and
- * should be included.
- */
-/*#define I_LIBUTIL / **/
-
-/* I_MALLOCMALLOC:
- * This symbol, if defined, indicates to the C program that it should
- * include <malloc/malloc.h>.
- */
-/*#define I_MALLOCMALLOC / **/
-
-/* I_MNTENT:
- * This symbol, if defined, indicates that <mntent.h> exists and
- * should be included.
- */
-/*#define I_MNTENT / **/
-
-/* I_NETINET_TCP:
- * This symbol, if defined, indicates to the C program that it should
- * include <netinet/tcp.h>.
- */
-/*#define I_NETINET_TCP / **/
-
-/* I_POLL:
- * This symbol, if defined, indicates that <poll.h> exists and
- * should be included. (see also HAS_POLL)
- */
-/*#define I_POLL / **/
-
-/* I_PROT:
- * This symbol, if defined, indicates that <prot.h> exists and
- * should be included.
- */
-/*#define I_PROT / **/
-
-/* I_SHADOW:
- * This symbol, if defined, indicates that <shadow.h> exists and
- * should be included.
- */
-/*#define I_SHADOW / **/
-
-/* I_SOCKS:
- * This symbol, if defined, indicates that <socks.h> exists and
- * should be included.
- */
-/*#define I_SOCKS / **/
-
-/* I_SUNMATH:
- * This symbol, if defined, indicates that <sunmath.h> exists and
- * should be included.
- */
-/*#define I_SUNMATH / **/
-
-/* I_SYSLOG:
- * This symbol, if defined, indicates that <syslog.h> exists and
- * should be included.
- */
-/*#define I_SYSLOG / **/
-
-/* I_SYSMODE:
- * This symbol, if defined, indicates that <sys/mode.h> exists and
- * should be included.
- */
-/*#define I_SYSMODE / **/
-
-/* I_SYS_MOUNT:
- * This symbol, if defined, indicates that <sys/mount.h> exists and
- * should be included.
- */
-/*#define I_SYS_MOUNT / **/
-
-/* I_SYS_STATFS:
- * This symbol, if defined, indicates that <sys/statfs.h> exists.
- */
-/*#define I_SYS_STATFS / **/
-
-/* I_SYS_STATVFS:
- * This symbol, if defined, indicates that <sys/statvfs.h> exists and
- * should be included.
- */
-/*#define I_SYS_STATVFS / **/
-
-/* I_SYSUTSNAME:
- * This symbol, if defined, indicates that <sys/utsname.h> exists and
- * should be included.
- */
-/*#define I_SYSUTSNAME / **/
-
-/* I_SYS_VFS:
- * This symbol, if defined, indicates that <sys/vfs.h> exists and
- * should be included.
- */
-/*#define I_SYS_VFS / **/
-
-/* I_USTAT:
- * This symbol, if defined, indicates that <ustat.h> exists and
- * should be included.
- */
-/*#define I_USTAT / **/
-
-/* PERL_PRIfldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'f') for output.
- */
-/* PERL_PRIgldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'g') for output.
- */
-/* PERL_PRIeldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'e') for output.
- */
-/* PERL_SCNfldbl:
- * This symbol, if defined, contains the string used by stdio to
- * format long doubles (format 'f') for input.
- */
-/*#define PERL_PRIfldbl "f" / **/
-/*#define PERL_PRIgldbl "g" / **/
-/*#define PERL_PRIeldbl "e" / **/
-/*#define PERL_SCNfldbl "f" / **/
-
-/* PERL_MAD:
- * This symbol, if defined, indicates that the Misc Attribution
- * Declaration code should be conditionally compiled.
- */
-/*#define PERL_MAD / **/
-
-/* NEED_VA_COPY:
- * This symbol, if defined, indicates that the system stores
- * the variable argument list datatype, va_list, in a format
- * that cannot be copied by simple assignment, so that some
- * other means must be used when copying is required.
- * As such systems vary in their provision (or non-provision)
- * of copying mechanisms, handy.h defines a platform-
- * independent macro, Perl_va_copy(src, dst), to do the job.
- */
-/*#define NEED_VA_COPY / **/
-
-/* IVTYPE:
- * This symbol defines the C type used for Perl's IV.
- */
-/* UVTYPE:
- * This symbol defines the C type used for Perl's UV.
- */
-/* I8TYPE:
- * This symbol defines the C type used for Perl's I8.
- */
-/* U8TYPE:
- * This symbol defines the C type used for Perl's U8.
- */
-/* I16TYPE:
- * This symbol defines the C type used for Perl's I16.
- */
-/* U16TYPE:
- * This symbol defines the C type used for Perl's U16.
- */
-/* I32TYPE:
- * This symbol defines the C type used for Perl's I32.
- */
-/* U32TYPE:
- * This symbol defines the C type used for Perl's U32.
- */
-/* I64TYPE:
- * This symbol defines the C type used for Perl's I64.
- */
-/* U64TYPE:
- * This symbol defines the C type used for Perl's U64.
- */
-/* NVTYPE:
- * This symbol defines the C type used for Perl's NV.
- */
-/* IVSIZE:
- * This symbol contains the sizeof(IV).
- */
-/* UVSIZE:
- * This symbol contains the sizeof(UV).
- */
-/* I8SIZE:
- * This symbol contains the sizeof(I8).
- */
-/* U8SIZE:
- * This symbol contains the sizeof(U8).
- */
-/* I16SIZE:
- * This symbol contains the sizeof(I16).
- */
-/* U16SIZE:
- * This symbol contains the sizeof(U16).
- */
-/* I32SIZE:
- * This symbol contains the sizeof(I32).
- */
-/* U32SIZE:
- * This symbol contains the sizeof(U32).
- */
-/* I64SIZE:
- * This symbol contains the sizeof(I64).
- */
-/* U64SIZE:
- * This symbol contains the sizeof(U64).
- */
-/* NVSIZE:
- * This symbol contains the sizeof(NV).
- */
-/* NV_PRESERVES_UV:
- * This symbol, if defined, indicates that a variable of type NVTYPE
- * can preserve all the bits of a variable of type UVTYPE.
- */
-/* NV_PRESERVES_UV_BITS:
- * This symbol contains the number of bits a variable of type NVTYPE
- * can preserve of a variable of type UVTYPE.
- */
-/* NV_OVERFLOWS_INTEGERS_AT:
- * This symbol gives the largest integer value that NVs can hold. This
- * value + 1.0 cannot be stored accurately. It is expressed as constant
- * floating point expression to reduce the chance of decimale/binary
- * conversion issues. If it can not be determined, the value 0 is given.
- */
-/* NV_ZERO_IS_ALLBITS_ZERO:
- * This symbol, if defined, indicates that a variable of type NVTYPE
- * stores 0.0 in memory as all bits zero.
- */
-#define IVTYPE __int64 /**/
-#define UVTYPE unsigned __int64 /**/
-#define I8TYPE char /**/
-#define U8TYPE unsigned char /**/
-#define I16TYPE short /**/
-#define U16TYPE unsigned short /**/
-#define I32TYPE long /**/
-#define U32TYPE unsigned long /**/
-#ifdef HAS_QUAD
-#define I64TYPE __int64 /**/
-#define U64TYPE unsigned __int64 /**/
-#endif
-#define NVTYPE double /**/
-#define IVSIZE 8 /**/
-#define UVSIZE 8 /**/
-#define I8SIZE 1 /**/
-#define U8SIZE 1 /**/
-#define I16SIZE 2 /**/
-#define U16SIZE 2 /**/
-#define I32SIZE 4 /**/
-#define U32SIZE 4 /**/
-#ifdef HAS_QUAD
-#define I64SIZE 8 /**/
-#define U64SIZE 8 /**/
-#endif
-#define NVSIZE 8 /**/
-#undef NV_PRESERVES_UV
-#define NV_PRESERVES_UV_BITS 53
-#define NV_OVERFLOWS_INTEGERS_AT 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0
-#define NV_ZERO_IS_ALLBITS_ZERO
-#if UVSIZE == 8
-# ifdef BYTEORDER
-# if BYTEORDER == 0x1234
-# undef BYTEORDER
-# define BYTEORDER 0x12345678
-# else
-# if BYTEORDER == 0x4321
-# undef BYTEORDER
-# define BYTEORDER 0x87654321
-# endif
-# endif
-# endif
-#endif
-
-/* IVdf:
- * This symbol defines the format string used for printing a Perl IV
- * as a signed decimal integer.
- */
-/* UVuf:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned decimal integer.
- */
-/* UVof:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned octal integer.
- */
-/* UVxf:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned hexadecimal integer in lowercase abcdef.
- */
-/* UVXf:
- * This symbol defines the format string used for printing a Perl UV
- * as an unsigned hexadecimal integer in uppercase ABCDEF.
- */
-/* NVef:
- * This symbol defines the format string used for printing a Perl NV
- * using %e-ish floating point format.
- */
-/* NVff:
- * This symbol defines the format string used for printing a Perl NV
- * using %f-ish floating point format.
- */
-/* NVgf:
- * This symbol defines the format string used for printing a Perl NV
- * using %g-ish floating point format.
- */
-#define IVdf "I64d" /**/
-#define UVuf "I64u" /**/
-#define UVof "I64o" /**/
-#define UVxf "I64x" /**/
-#define UVXf "I64X" /**/
-#define NVef "e" /**/
-#define NVff "f" /**/
-#define NVgf "g" /**/
-
-/* SELECT_MIN_BITS:
- * This symbol holds the minimum number of bits operated by select.
- * That is, if you do select(n, ...), how many bits at least will be
- * cleared in the masks if some activity is detected. Usually this
- * is either n or 32*ceil(n/32), especially many little-endians do
- * the latter. This is only useful if you have select(), naturally.
- */
-#define SELECT_MIN_BITS 32 /**/
-
-/* STARTPERL:
- * This variable contains the string to put in front of a perl
- * script to make sure (one hopes) that it runs with perl and not
- * some shell.
- */
-#define STARTPERL "#!perl" /**/
-
-/* HAS_STDIO_STREAM_ARRAY:
- * This symbol, if defined, tells that there is an array
- * holding the stdio streams.
- */
-/* STDIO_STREAM_ARRAY:
- * This symbol tells the name of the array holding the stdio streams.
- * Usual values include _iob, __iob, and __sF.
- */
-/*#define HAS_STDIO_STREAM_ARRAY / **/
-#ifdef HAS_STDIO_STREAM_ARRAY
-#define STDIO_STREAM_ARRAY
-#endif
-
-/* GMTIME_MAX:
- * This symbol contains the maximum value for the time_t offset that
- * the system function gmtime () accepts, and defaults to 0
- */
-/* GMTIME_MIN:
- * This symbol contains the minimum value for the time_t offset that
- * the system function gmtime () accepts, and defaults to 0
- */
-/* LOCALTIME_MAX:
- * This symbol contains the maximum value for the time_t offset that
- * the system function localtime () accepts, and defaults to 0
- */
-/* LOCALTIME_MIN:
- * This symbol contains the minimum value for the time_t offset that
- * the system function localtime () accepts, and defaults to 0
- */
-#define GMTIME_MAX 2147483647 /**/
-#define GMTIME_MIN 0 /**/
-#define LOCALTIME_MAX 2147483647 /**/
-#define LOCALTIME_MIN 0 /**/
-
-/* USE_64_BIT_INT:
- * This symbol, if defined, indicates that 64-bit integers should
- * be used when available. If not defined, the native integers
- * will be employed (be they 32 or 64 bits). The minimal possible
- * 64-bitness is used, just enough to get 64-bit integers into Perl.
- * This may mean using for example "long longs", while your memory
- * may still be limited to 2 gigabytes.
- */
-/* USE_64_BIT_ALL:
- * This symbol, if defined, indicates that 64-bit integers should
- * be used when available. If not defined, the native integers
- * will be used (be they 32 or 64 bits). The maximal possible
- * 64-bitness is employed: LP64 or ILP64, meaning that you will
- * be able to use more than 2 gigabytes of memory. This mode is
- * even more binary incompatible than USE_64_BIT_INT. You may not
- * be able to run the resulting executable in a 32-bit CPU at all or
- * you may need at least to reboot your OS to 64-bit mode.
- */
-#ifndef USE_64_BIT_INT
-#define USE_64_BIT_INT /**/
-#endif
-#ifndef USE_64_BIT_ALL
-/*#define USE_64_BIT_ALL / **/
-#endif
-
-/* USE_DTRACE:
- * This symbol, if defined, indicates that Perl should
- * be built with support for DTrace.
- */
-/*#define USE_DTRACE / **/
-
-/* USE_FAST_STDIO:
- * This symbol, if defined, indicates that Perl should
- * be built to use 'fast stdio'.
- * Defaults to define in Perls 5.8 and earlier, to undef later.
- */
-#ifndef USE_FAST_STDIO
-/*#define USE_FAST_STDIO / **/
-#endif
-
-/* USE_LARGE_FILES:
- * This symbol, if defined, indicates that large file support
- * should be used when available.
- */
-#ifndef USE_LARGE_FILES
-/*#define USE_LARGE_FILES / **/
-#endif
-
-/* USE_LONG_DOUBLE:
- * This symbol, if defined, indicates that long doubles should
- * be used when available.
- */
-#ifndef USE_LONG_DOUBLE
-/*#define USE_LONG_DOUBLE / **/
-#endif
-
-/* USE_MORE_BITS:
- * This symbol, if defined, indicates that 64-bit interfaces and
- * long doubles should be used when available.
- */
-#ifndef USE_MORE_BITS
-/*#define USE_MORE_BITS / **/
-#endif
-
-/* MULTIPLICITY:
- * This symbol, if defined, indicates that Perl should
- * be built to use multiplicity.
- */
-#ifndef MULTIPLICITY
-/*#define MULTIPLICITY / **/
-#endif
-
-/* USE_PERLIO:
- * This symbol, if defined, indicates that the PerlIO abstraction should
- * be used throughout. If not defined, stdio should be
- * used in a fully backward compatible manner.
- */
-#ifndef USE_PERLIO
-/*#define USE_PERLIO / **/
-#endif
-
-/* USE_SOCKS:
- * This symbol, if defined, indicates that Perl should
- * be built to use socks.
- */
-#ifndef USE_SOCKS
-/*#define USE_SOCKS / **/
-#endif
-
-#endif
Deleted: vendor/perl/dist/win32/genmk95.pl
===================================================================
--- vendor/perl/dist/win32/genmk95.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/genmk95.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,87 +0,0 @@
-# genmk95.pl - uses miniperl to generate a makefile that command.com will
-# understand given one that cmd.exe will understand
-
-# Author: Benjamin K. Stuhl
-# Date: 10-16-1999
-
-# how it works:
-# dmake supports an alternative form for its recipes, called "group
-# recipes", in which all elements of a recipe are run with only one shell.
-# This program converts the standard dmake makefile.mk to one using group
-# recipes. This is done so that lines using && or || (which command.com
-# doesn't understand) may be split into two lines that will still be run
-# with one shell.
-
-my ($filein, $fileout) = @ARGV;
-
-open my $in, $filein or die "Error opening input file: $!\n";
-open my $out, "> $fileout" or die "Error opening output file: $!\n";
-
-print $out <<_EOH_;
-# *** Warning: this file is autogenerated from $filein by $0 ***
-# *** Do not edit this file - edit $filein instead ***
-
-_HOME_DIR := \$(PWD)
-
-_EOH_
-
-my $inrec = 0;
-
-while (<$in>)
-{
- chomp;
- if (/^[^#.\t][^#=]*?:(?:[^=]|$)/)
- {
- if (! $inrec)
- {
- print $out "$_\n";
- while (/\\\s*$/)
- {
- chomp($_ = <$in>);
- print $out "$_\n";
- }
- print $out "@[\n";
- $inrec = 1;
- next;
- }
- else {
- if (!/^\t/) {
- seek ($out, -4, 2); # no recipe, so back up and undo grouping
- # should be -3, but MS has its CR/LF thing...
- $inrec = 0;
- }
- print $out "$_\n";
- next;
- }
- }
- if ((/^\s*$/ || /^[^#.\t][^#=]*?:/) && $inrec)
- {
- print $out "]\n";
- print $out "$_\n";
- $inrec = 0;
- next;
- }
- if (/^(.*?)(&&|\|\|)(.*)$/) # two commands separated by && or ||
- {
- my ($one, $sep, $two) = ($1, $2, $3);
- $one =~ s/^\t(?:-(?!-))?\@?(.*?)$/\t$1/; # no -,@ in group recipes
-LINE_CONT:
- if ($two =~ /\\\s*$/)
- {
- chomp ($two .= "\n" . scalar <$in>);
- goto LINE_CONT;
- }
- s/^\s*// for ($one, $two);
- print $out "\t$one\n\t$two\n" if ($sep eq "&&");
- print $out "\t$one\n\tif errorlevel 1 $two\n" if ($sep eq "||");
- print $out "\tcd \$(_HOME_DIR)\n";
- next;
- }
- # fall through - no need for special handling
- s/^\t(?:-(?!-))?\@?(.*?)$/\t$1/; # no -,@ in group recipes
- print $out "$_\n";
-}
-print $out "]\n" if ($inrec);
-
-close $in or warn "Error closing \$in: $!\n";
-close $out or warn "Error closing \$out: $!\n";
Modified: vendor/perl/dist/win32/makefile.mk
===================================================================
--- vendor/perl/dist/win32/makefile.mk 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/makefile.mk 2014-08-27 11:27:40 UTC (rev 6720)
@@ -38,7 +38,7 @@
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-#INST_VER *= \5.18.1
+#INST_VER *= \5.18.2
#
# Comment this out if you DON'T want your perl installation to have
@@ -1338,7 +1338,7 @@
copy ..\README.tw ..\pod\perltw.pod
copy ..\README.vos ..\pod\perlvos.pod
copy ..\README.win32 ..\pod\perlwin32.pod
- copy ..\pod\perldelta.pod ..\pod\perl5181delta.pod
+ copy ..\pod\perldelta.pod ..\pod\perl5182delta.pod
$(PERLEXE) $(PL2BAT) $(UTILS)
$(PERLEXE) $(ICWD) ..\autodoc.pl ..
$(PERLEXE) $(ICWD) ..\pod\perlmodlib.pl -q
@@ -1430,7 +1430,7 @@
-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
-if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API
-cd $(PODDIR) && del /f *.html *.bat roffitall \
- perl5181delta.pod perlaix.pod perlamiga.pod perlapi.pod \
+ perl5182delta.pod perlaix.pod perlamiga.pod perlapi.pod \
perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
perldgux.pod perldos.pod perlfreebsd.pod perlhaiku.pod \
perlhpux.pod perlhurd.pod perlintern.pod perlirix.pod \
Deleted: vendor/perl/dist/win32/mdelete.bat
===================================================================
--- vendor/perl/dist/win32/mdelete.bat 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/mdelete.bat 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,29 +0,0 @@
- at echo off
-rem ! This is a batch file to delete all the files on its
-rem ! command line, to work around command.com's del command's
-rem ! braindeadness
-rem !
-rem ! -- BKS, 11-11-2000
-
-:nextfile
-set file=%1
-shift
-if "%file%"=="" goto end
-del %file%
-goto nextfile
-:end
-
- at echo off
-rem ! This is a batch file to delete all the files on its
-rem ! command line, to work around command.com's del command's
-rem ! braindeadness
-rem !
-rem ! -- BKS, 11-11-2000
-
-:nextfile
-set file=%1
-shift
-if "%file%"=="" goto end
-del %file%
-goto nextfile
-:end
Modified: vendor/perl/dist/win32/pod.mak
===================================================================
--- vendor/perl/dist/win32/pod.mak 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/pod.mak 2014-08-27 11:27:40 UTC (rev 6720)
@@ -35,6 +35,7 @@
perl5163delta.pod \
perl5180delta.pod \
perl5181delta.pod \
+ perl5182delta.pod \
perl561delta.pod \
perl56delta.pod \
perl581delta.pod \
@@ -114,6 +115,7 @@
perlref.pod \
perlreftut.pod \
perlreguts.pod \
+ perlrepository.pod \
perlrequick.pod \
perlreref.pod \
perlretut.pod \
@@ -161,6 +163,7 @@
perl5163delta.man \
perl5180delta.man \
perl5181delta.man \
+ perl5182delta.man \
perl561delta.man \
perl56delta.man \
perl581delta.man \
@@ -240,6 +243,7 @@
perlref.man \
perlreftut.man \
perlreguts.man \
+ perlrepository.man \
perlrequick.man \
perlreref.man \
perlretut.man \
@@ -287,6 +291,7 @@
perl5163delta.html \
perl5180delta.html \
perl5181delta.html \
+ perl5182delta.html \
perl561delta.html \
perl56delta.html \
perl581delta.html \
@@ -366,6 +371,7 @@
perlref.html \
perlreftut.html \
perlreguts.html \
+ perlrepository.html \
perlrequick.html \
perlreref.html \
perlretut.html \
@@ -413,6 +419,7 @@
perl5163delta.tex \
perl5180delta.tex \
perl5181delta.tex \
+ perl5182delta.tex \
perl561delta.tex \
perl56delta.tex \
perl581delta.tex \
@@ -492,6 +499,7 @@
perlref.tex \
perlreftut.tex \
perlreguts.tex \
+ perlrepository.tex \
perlrequick.tex \
perlreref.tex \
perlretut.tex \
Deleted: vendor/perl/dist/win32/sync_ext.pl
===================================================================
--- vendor/perl/dist/win32/sync_ext.pl 2014-07-30 21:37:49 UTC (rev 6719)
+++ vendor/perl/dist/win32/sync_ext.pl 2014-08-27 11:27:40 UTC (rev 6720)
@@ -1,71 +0,0 @@
-=begin comment
-
-Synchronize filename cases for extensions.
-
-This script could be used to perform following renaming:
-if there exist file, for example, "FiLeNaME.c" and
-filename.obj then it renames "filename.obj" to "FiLeNaME.obj".
-There is a problem when some compilers (e.g.Borland) generate
-such .obj files and then "make" process will not treat them
-as dependant and already maked files.
-
-This script takes two arguments - first and second extensions to
-synchronize filename cases with.
-
-There may be specified following options:
- --verbose <== say everything what is going on
- --recurse <== recurse subdirectories
- --dummy <== do not perform actual renaming
- --say-subdir
-Every such option can be specified with an optional "no" prefix to negate it.
-
-Typically, it is invoked as:
- perl sync_ext.pl c obj --verbose
-
-=cut
-
-use strict;
-
-my ($ext1, $ext2) = map {quotemeta} grep {!/^--/} @ARGV;
-my %opts = (
- #defaults
- 'verbose' => 0,
- 'recurse' => 1,
- 'dummy' => 0,
- 'say-subdir' => 0,
- #options itself
- (map {/^--([\-_\w]+)=(.*)$/} @ARGV), # --opt=smth
- (map {/^no-?(.*)$/i?($1=>0):($_=>1)} map {/^--([\-_\w]+)$/} @ARGV), # --opt --no-opt --noopt
- );
-
-my $sp = '';
-sub xx {
- opendir DIR, '.';
- my @t = readdir DIR;
- my @f = map {/^(.*)\.$ext1$/i} @t;
- my %f = map {lc($_)=>$_} map {/^(.*)\.$ext2$/i} @t;
- for (@f) {
- my $lc = lc($_);
- if (exists $f{$lc} and $f{$lc} ne $_) {
- print STDERR "$sp$f{$lc}.$ext2 <==> $_.$ext1\n" if $opts{verbose};
- if ($opts{dummy}) {
- print STDERR "ren $f{$lc}.$ext2 $_.$ext2\n";
- }
- else {
- system "ren $f{$lc}.$ext2 $_.$ext2";
- }
- }
- }
- if ($opts{recurse}) {
- for (grep {-d&&!/^\.\.?$/} @t) {
- print STDERR "$sp\\$_\n" if $opts{'say-subdir'};
- $sp .= ' ';
- chdir $_ or die;
- xx();
- chdir ".." or die;
- chop $sp;
- }
- }
-}
-
-xx();
More information about the Midnightbsd-cvs
mailing list