From 256a93a44f36679bee503f12e49566c2183f6181 Mon Sep 17 00:00:00 2001 From: afresh1 Date: Wed, 15 Feb 2023 01:31:50 +0000 Subject: [PATCH] Import perl-5.36.0 OK bluhm@ a good time naddy@ --- gnu/usr.bin/perl/.editorconfig | 10 + gnu/usr.bin/perl/.travis.yml | 10 +- gnu/usr.bin/perl/CODE_OF_CONDUCT.md | 20 + gnu/usr.bin/perl/Porting/GitUtils.pm | 1 + gnu/usr.bin/perl/Porting/Maintainers.pm | 4 +- gnu/usr.bin/perl/Porting/acknowledgements.pl | 2 +- gnu/usr.bin/perl/Porting/add-pod-file | 244 + gnu/usr.bin/perl/Porting/config_h.pl | 36 +- gnu/usr.bin/perl/Porting/core-team.json | 35 + .../perl/Porting/docs-team-charter.pod | 121 + gnu/usr.bin/perl/Porting/exercise_makedef.pl | 2 +- gnu/usr.bin/perl/Porting/manicheck | 43 +- gnu/usr.bin/perl/Porting/manifest_lib.pl | 5 +- gnu/usr.bin/perl/Porting/perlgov-team-update | 32 + gnu/usr.bin/perl/Porting/timecheck.c | 104 +- gnu/usr.bin/perl/Porting/timecheck2.c | 4 +- gnu/usr.bin/perl/Porting/updateAUTHORS.pl | 661 + gnu/usr.bin/perl/Porting/vote_admin_guide.pod | 191 + gnu/usr.bin/perl/README.cn | 36 +- gnu/usr.bin/perl/README.jp | 4 - gnu/usr.bin/perl/README.ko | 4 +- gnu/usr.bin/perl/README.tw | 4 +- gnu/usr.bin/perl/SECURITY.md | 3 +- gnu/usr.bin/perl/amigaos4/amigaio.h | 28 +- gnu/usr.bin/perl/amigaos4/amigaos.c | 1044 +- gnu/usr.bin/perl/builtin.c | 465 + gnu/usr.bin/perl/cpan/Archive-Tar/t/01_use.t | 2 +- .../perl/cpan/Archive-Tar/t/02_methods.t | 43 +- .../cpan/Archive-Tar/t/04_resolved_issues.t | 5 +- gnu/usr.bin/perl/cpan/Archive-Tar/t/05_iter.t | 6 +- .../perl/cpan/Archive-Tar/t/09_roundtrip.t | 2 + gnu/usr.bin/perl/cpan/Archive-Tar/t/99_pod.t | 2 + gnu/usr.bin/perl/cpan/CPAN/PAUSE2022.pub | 598 + gnu/usr.bin/perl/cpan/CPAN/t/32pushyhttps.t | 129 + .../perl/cpan/Compress-Raw-Bzip2/Makefile.PL | 39 +- .../Compress-Raw-Bzip2/bzip2-src/bzip2.patch | 236 + .../perl/cpan/Compress-Raw-Bzip2/t/01bzip2.t | 303 +- .../cpan/Compress-Raw-Bzip2/t/09limitoutput.t | 33 +- .../perl/cpan/Compress-Raw-Bzip2/t/19nonpv.t | 28 +- .../t/compress/CompTestUtils.pm | 52 +- .../perl/cpan/Compress-Raw-Bzip2/typemap | 4 - .../perl/cpan/Compress-Raw-Zlib/t/01version.t | 88 +- .../cpan/Compress-Raw-Zlib/t/09limitoutput.t | 59 +- .../perl/cpan/Compress-Raw-Zlib/t/18lvalue.t | 22 +- .../perl/cpan/Compress-Raw-Zlib/t/19nonpv.t | 33 +- .../t/compress/CompTestUtils.pm | 52 +- .../perl/cpan/Compress-Raw-Zlib/typemap | 3 - .../cpan/Compress-Raw-Zlib/zlib-src/crc32.h | 9877 +++++++++- .../cpan/Compress-Raw-Zlib/zlib-src/infback.c | 4 +- .../cpan/Compress-Raw-Zlib/zlib-src/inffast.c | 28 +- .../cpan/Compress-Raw-Zlib/zlib-src/inflate.h | 5 +- .../Compress-Raw-Zlib/zlib-src/inftrees.c | 6 +- .../cpan/Compress-Raw-Zlib/zlib-src/zlib.h | 235 +- .../perl/cpan/Config-Perl-V/t/35_plv52910g.t | 188 + .../perl/cpan/Config-Perl-V/t/36_plv5300.t | 182 + .../perl/cpan/Config-Perl-V/t/37_plv53111qm.t | 186 + .../perl/cpan/Config-Perl-V/t/38_plv5320tld.t | 182 + gnu/usr.bin/perl/cpan/DB_File/config.in | 8 +- gnu/usr.bin/perl/cpan/DB_File/dbinfo | 6 +- gnu/usr.bin/perl/cpan/DB_File/hints/bitrig.pl | 1 + .../perl/cpan/DB_File/hints/dynixptx.pl | 2 +- gnu/usr.bin/perl/cpan/DB_File/hints/minix.pl | 1 + gnu/usr.bin/perl/cpan/DB_File/hints/netbsd.pl | 1 + .../perl/cpan/DB_File/hints/openbsd.pl | 1 + gnu/usr.bin/perl/cpan/DB_File/hints/sco.pl | 1 + gnu/usr.bin/perl/cpan/DB_File/t/db-btree.t | 260 +- gnu/usr.bin/perl/cpan/DB_File/t/db-hash.t | 132 +- gnu/usr.bin/perl/cpan/DB_File/t/db-recno.t | 206 +- gnu/usr.bin/perl/cpan/DB_File/t/db-threads.t | 2 +- gnu/usr.bin/perl/cpan/DB_File/typemap | 8 +- gnu/usr.bin/perl/cpan/DB_File/version.c | 22 +- .../perl/cpan/Digest-MD5/hints/MacOS.pl | 2 + .../perl/cpan/Digest-MD5/hints/irix_6.pl | 8 +- gnu/usr.bin/perl/cpan/Digest-MD5/t/align.t | 4 +- gnu/usr.bin/perl/cpan/Digest-MD5/t/badfile.t | 6 +- gnu/usr.bin/perl/cpan/Digest-MD5/t/bits.t | 3 + gnu/usr.bin/perl/cpan/Digest-MD5/t/clone.t | 6 +- gnu/usr.bin/perl/cpan/Digest-MD5/t/md5-aaa.t | 4 +- gnu/usr.bin/perl/cpan/Digest-MD5/t/utf8.t | 6 +- gnu/usr.bin/perl/cpan/Digest-MD5/t/warns.t | 62 + gnu/usr.bin/perl/cpan/Digest/lib/Digest.pm | 334 + .../perl/cpan/Digest/lib/Digest/base.pm | 106 + .../perl/cpan/Digest/lib/Digest/file.pm | 83 + .../perl/cpan/Digest/t/lib/Digest/Dummy.pm | 11 +- gnu/usr.bin/perl/cpan/Encode/t/Encode.t | 11 +- .../perl/cpan/Encode/t/Unicode_trailing_nul.t | 26 + gnu/usr.bin/perl/cpan/Encode/t/gsm0338.t | 80 +- .../perl/cpan/Encode/t/utf32warnings.t | 277 + .../lib/ExtUtils/Constant/Base.pm | 4 +- .../perl/cpan/ExtUtils-Constant/t/Constant.t | 6 +- .../cpan/ExtUtils-Install/t/Installapi2.t | 2 +- .../perl/cpan/ExtUtils-Install/t/Packlist.t | 2 + .../t/lib/MakeMaker/Test/Utils.pm | 2 +- .../cpan/ExtUtils-Install/t/lib/TieOut.pm | 1 + .../lib/ExtUtils/MM_OS390.pm | 86 + .../cpan/ExtUtils-MakeMaker/t/00compile.t | 1 + .../cpan/ExtUtils-MakeMaker/t/03-xsstatic.t | 1 + .../ExtUtils-MakeMaker/t/04-xs-rpath-darwin.t | 269 + .../perl/cpan/ExtUtils-MakeMaker/t/INST.t | 1 + .../cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t | 1 + .../perl/cpan/ExtUtils-MakeMaker/t/Liblist.t | 1 + .../perl/cpan/ExtUtils-MakeMaker/t/MM_Any.t | 3 + .../perl/cpan/ExtUtils-MakeMaker/t/MM_BeOS.t | 2 + .../cpan/ExtUtils-MakeMaker/t/MM_Cygwin.t | 3 +- .../perl/cpan/ExtUtils-MakeMaker/t/MM_NW5.t | 3 +- .../perl/cpan/ExtUtils-MakeMaker/t/MM_OS2.t | 1 + .../perl/cpan/ExtUtils-MakeMaker/t/MM_VMS.t | 5 + .../perl/cpan/ExtUtils-MakeMaker/t/MM_Win32.t | 1 + .../cpan/ExtUtils-MakeMaker/t/Mkbootstrap.t | 3 + .../cpan/ExtUtils-MakeMaker/t/VERSION_FROM.t | 1 + .../ExtUtils-MakeMaker/t/WriteEmptyMakefile.t | 3 + .../cpan/ExtUtils-MakeMaker/t/arch_check.t | 1 + .../cpan/ExtUtils-MakeMaker/t/backwards.t | 1 + .../perl/cpan/ExtUtils-MakeMaker/t/config.t | 2 + .../perl/cpan/ExtUtils-MakeMaker/t/cp.t | 2 + .../cpan/ExtUtils-MakeMaker/t/dir_target.t | 3 + .../perl/cpan/ExtUtils-MakeMaker/t/fix_libs.t | 1 + .../perl/cpan/ExtUtils-MakeMaker/t/fixin.t | 3 + .../perl/cpan/ExtUtils-MakeMaker/t/hints.t | 5 +- .../cpan/ExtUtils-MakeMaker/t/is_of_type.t | 1 + .../t/lib/MakeMaker/Test/Setup/BFD.pm | 1 + .../cpan/ExtUtils-MakeMaker/t/lib/TieIn.pm | 3 + .../cpan/ExtUtils-MakeMaker/t/lib/TieOut.pm | 3 + .../perl/cpan/ExtUtils-MakeMaker/t/make.t | 3 + .../ExtUtils-MakeMaker/t/maketext_filter.t | 3 + .../cpan/ExtUtils-MakeMaker/t/metafile_data.t | 1 + .../cpan/ExtUtils-MakeMaker/t/metafile_file.t | 1 + .../ExtUtils-MakeMaker/t/os_unsupported.t | 1 + .../perl/cpan/ExtUtils-MakeMaker/t/pm.t | 1 + .../perl/cpan/ExtUtils-MakeMaker/t/pod2man.t | 1 + .../cpan/ExtUtils-MakeMaker/t/prefixify.t | 1 + .../cpan/ExtUtils-MakeMaker/t/prereq_print.t | 1 + .../perl/cpan/ExtUtils-MakeMaker/t/problems.t | 1 + .../perl/cpan/ExtUtils-MakeMaker/t/prompt.t | 1 + .../perl/cpan/ExtUtils-MakeMaker/t/revision.t | 3 + .../cpan/ExtUtils-MakeMaker/t/split_command.t | 6 +- .../ExtUtils-MakeMaker/t/test_boilerplate.t | 1 + .../perl/cpan/ExtUtils-MakeMaker/t/testlib.t | 2 + .../ExtUtils-PL2Bat/lib/ExtUtils/PL2Bat.pm | 194 + .../cpan/ExtUtils-PL2Bat/t/make_executable.t | 89 + .../perl/cpan/File-Fetch/t/01_File-Fetch.t | 2 +- .../perl/cpan/File-Temp/lib/File/Temp.pm | 105 +- gnu/usr.bin/perl/cpan/File-Temp/t/cmp.t | 2 +- gnu/usr.bin/perl/cpan/File-Temp/t/fork.t | 14 +- gnu/usr.bin/perl/cpan/File-Temp/t/lock.t | 2 +- gnu/usr.bin/perl/cpan/File-Temp/t/object.t | 12 +- gnu/usr.bin/perl/cpan/File-Temp/t/rmtree.t | 2 +- gnu/usr.bin/perl/cpan/File-Temp/t/tempfile.t | 29 +- .../perl/cpan/Getopt-Long/t/gol-basic.t | 16 +- .../perl/cpan/HTTP-Tiny/corpus/form-01.txt | 6 +- .../perl/cpan/HTTP-Tiny/corpus/form-02.txt | 6 +- .../perl/cpan/HTTP-Tiny/corpus/get-23.txt | 17 + .../perl/cpan/HTTP-Tiny/corpus/post-02.txt | 20 + .../perl/cpan/HTTP-Tiny/corpus/put-06.txt | 20 + .../perl/cpan/HTTP-Tiny/corpus/put-07.txt | 22 + .../perl/cpan/HTTP-Tiny/corpus/put-08.txt | 23 + .../cpan/HTTP-Tiny/corpus/redirect-09.txt | 1 + gnu/usr.bin/perl/cpan/HTTP-Tiny/t/003_agent.t | 4 +- .../perl/cpan/HTTP-Tiny/t/030_response.t | 37 + .../perl/cpan/HTTP-Tiny/t/141_no_proxy.t | 1 + .../perl/cpan/IO-Compress/bin/streamzip | 193 +- .../perl/cpan/IO-Compress/t/001bzip2.t | 38 +- .../cpan/IO-Compress/t/002any-transparent.t | 8 +- .../perl/cpan/IO-Compress/t/004gziphdr.t | 247 +- .../perl/cpan/IO-Compress/t/005defhdr.t | 38 +- gnu/usr.bin/perl/cpan/IO-Compress/t/006zip.t | 166 +- .../perl/cpan/IO-Compress/t/011-streamzip.t | 111 +- gnu/usr.bin/perl/cpan/IO-Compress/t/01misc.t | 110 +- .../perl/cpan/IO-Compress/t/050interop-gzip.t | 24 +- .../cpan/IO-Compress/t/105oneshot-gzip-only.t | 17 +- .../IO-Compress/t/105oneshot-zip-bzip2-only.t | 27 +- .../cpan/IO-Compress/t/105oneshot-zip-only.t | 94 +- .../cpan/IO-Compress/t/107multi-zip-only.t | 8 +- .../IO-Compress/t/108anyunc-transparent.t | 8 +- .../cpan/IO-Compress/t/111const-deflate.t | 53 +- .../perl/cpan/IO-Compress/t/112utf8-zip.t | 60 +- .../perl/cpan/IO-Compress/t/113issues.t | 66 + .../IO-Compress/t/compress/CompTestUtils.pm | 60 +- .../perl/cpan/IO-Compress/t/compress/any.pl | 22 +- .../cpan/IO-Compress/t/compress/anyunc.pl | 20 +- .../cpan/IO-Compress/t/compress/destroy.pl | 36 +- .../cpan/IO-Compress/t/compress/encode.pl | 81 +- .../cpan/IO-Compress/t/compress/generic.pl | 471 +- .../perl/cpan/IO-Compress/t/compress/merge.pl | 54 +- .../perl/cpan/IO-Compress/t/compress/multi.pl | 34 +- .../cpan/IO-Compress/t/compress/newtied.pl | 84 +- .../perl/cpan/IO-Compress/t/compress/tied.pl | 138 +- .../cpan/IO-Compress/t/compress/truncate.pl | 73 +- .../IO-Compress/t/compress/zlib-generic.pl | 78 +- .../perl/cpan/IO-Compress/t/cz-01version.t | 12 +- .../perl/cpan/IO-Compress/t/cz-03zlib-v1.t | 315 +- .../perl/cpan/IO-Compress/t/cz-06gzsetp.t | 42 +- .../perl/cpan/IO-Compress/t/cz-08encoding.t | 21 +- .../perl/cpan/IO-Compress/t/cz-14gzopen.t | 224 +- .../IO-Compress/t/files/encrypt-standard.zip | Bin 207 -> 207 bytes .../cpan/IO-Compress/t/files/testfile1.odt | Bin 0 -> 12076 bytes .../perl/cpan/IO-Compress/t/globmapper.t | 61 +- gnu/usr.bin/perl/cpan/IO-Socket-IP/t/00use.t | 1 + .../cpan/IO-Socket-IP/t/04local-client-v6.t | 1 + gnu/usr.bin/perl/cpan/IO-Socket-IP/t/10args.t | 1 + .../cpan/IO-Socket-IP/t/12port-fallback.t | 1 + .../perl/cpan/IO-Socket-IP/t/13addrinfo.t | 1 + .../perl/cpan/IO-Socket-IP/t/14fileno.t | 1 + .../perl/cpan/IO-Socket-IP/t/17gai-flags.t | 1 + .../perl/cpan/IO-Socket-IP/t/18fdopen.t | 1 + .../perl/cpan/IO-Socket-IP/t/19no-addrs.t | 1 + .../perl/cpan/IO-Socket-IP/t/20subclass.t | 1 + .../perl/cpan/IO-Socket-IP/t/21as-inet.t | 1 + .../perl/cpan/IO-Socket-IP/t/22timeout.t | 1 + .../IO-Socket-IP/t/30nonblocking-connect.t | 1 + .../t/31nonblocking-connect-internet.t | 1 + gnu/usr.bin/perl/cpan/IO-Socket-IP/t/99pod.t | 1 + gnu/usr.bin/perl/cpan/IO-Zlib/Zlib.pm | 384 +- gnu/usr.bin/perl/cpan/IO-Zlib/t/basic.t | 15 +- gnu/usr.bin/perl/cpan/IO-Zlib/t/external.t | 121 +- gnu/usr.bin/perl/cpan/IO-Zlib/t/getc.t | 12 +- gnu/usr.bin/perl/cpan/IO-Zlib/t/getline.t | 16 +- gnu/usr.bin/perl/cpan/IO-Zlib/t/import.t | 4 + gnu/usr.bin/perl/cpan/IO-Zlib/t/large.t | 15 +- gnu/usr.bin/perl/cpan/IO-Zlib/t/tied.t | 13 +- gnu/usr.bin/perl/cpan/IO-Zlib/t/uncomp1.t | 22 +- gnu/usr.bin/perl/cpan/IO-Zlib/t/uncomp2.t | 21 +- .../perl/cpan/JSON-PP/lib/JSON/PP/Boolean.pm | 2 +- gnu/usr.bin/perl/cpan/JSON-PP/t/000_load.t | 4 + gnu/usr.bin/perl/cpan/JSON-PP/t/001_utf8.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/002_error.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/003_types.t | 1 + .../perl/cpan/JSON-PP/t/004_dwiw_encode.t | 1 + .../perl/cpan/JSON-PP/t/006_pc_pretty.t | 3 +- gnu/usr.bin/perl/cpan/JSON-PP/t/007_pc_esc.t | 3 +- gnu/usr.bin/perl/cpan/JSON-PP/t/008_pc_base.t | 3 +- .../perl/cpan/JSON-PP/t/009_pc_extra_number.t | 3 +- .../perl/cpan/JSON-PP/t/010_pc_keysort.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/011_pc_expo.t | 3 +- gnu/usr.bin/perl/cpan/JSON-PP/t/012_blessed.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/013_limit.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/014_latin1.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/015_prefix.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/016_tied.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/017_relaxed.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/019_incr.t | 4 +- gnu/usr.bin/perl/cpan/JSON-PP/t/020_unknown.t | 3 +- gnu/usr.bin/perl/cpan/JSON-PP/t/021_evans.t | 2 +- gnu/usr.bin/perl/cpan/JSON-PP/t/052_object.t | 15 +- gnu/usr.bin/perl/cpan/JSON-PP/t/099_binary.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/104_sortby.t | 1 + .../perl/cpan/JSON-PP/t/105_esc_slash.t | 1 + .../perl/cpan/JSON-PP/t/106_allow_barekey.t | 1 + .../cpan/JSON-PP/t/107_allow_singlequote.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/108_decode.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/109_encode.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/110_bignum.t | 3 +- gnu/usr.bin/perl/cpan/JSON-PP/t/112_upgrade.t | 1 + .../perl/cpan/JSON-PP/t/113_overloaded_eq.t | 3 + .../perl/cpan/JSON-PP/t/114_decode_prefix.t | 1 + .../perl/cpan/JSON-PP/t/115_tie_ixhash.t | 1 + .../cpan/JSON-PP/t/116_incr_parse_fixed.t | 1 + gnu/usr.bin/perl/cpan/JSON-PP/t/117_numbers.t | 1 + .../perl/cpan/JSON-PP/t/118_boolean_values.t | 9 +- .../cpan/JSON-PP/t/gh_28_json_test_suite.t | 1 + .../JSON-PP/t/gh_29_trailing_false_value.t | 1 + .../t/rt_116998_wrong_character_offset.t | 1 + .../perl/cpan/JSON-PP/t/rt_90071_incr_parse.t | 1 + .../perl/cpan/MIME-Base64/lib/MIME/Base64.pm | 188 + .../cpan/MIME-Base64/lib/MIME/QuotedPrint.pm | 114 + gnu/usr.bin/perl/cpan/MIME-Base64/t/base64.t | 4 +- .../perl/cpan/MIME-Base64/t/base64url.t | 34 + gnu/usr.bin/perl/cpan/MIME-Base64/t/length.t | 1 + .../perl/cpan/MIME-Base64/t/quoted-print.t | 19 +- gnu/usr.bin/perl/cpan/MIME-Base64/t/unicode.t | 3 + .../perl/cpan/Math-BigInt-FastCalc/t/biglog.t | 2 +- .../cpan/Math-BigInt-FastCalc/t/bigroot.t | 2 +- .../cpan/Math-BigInt/lib/Math/BigInt/Lib.pm | 232 +- .../Math-BigInt/t/Math/BigInt/Lib/Minimal.pm | 9 +- .../Math-BigInt/t/Math/BigInt/Lib/TestUtil.pm | 2 +- .../Math-BigInt/t/_bin_parts_to_lib_parts.t | 88 + .../Math-BigInt/t/_bin_str_to_str_parts.t | 58 + .../Math-BigInt/t/_dec_parts_to_lib_parts.t | 69 + .../Math-BigInt/t/_dec_str_to_str_parts.t | 57 + .../Math-BigInt/t/_hex_str_to_str_parts.t | 58 + .../Math-BigInt/t/_oct_str_to_str_parts.t | 58 + .../perl/cpan/Math-BigInt/t/backermann-mbi.t | 2 +- .../perl/cpan/Math-BigInt/t/bdigitsum-mbi.t | 2 +- .../perl/cpan/Math-BigInt/t/bdstr-mbf.t | 2 +- .../perl/cpan/Math-BigInt/t/bdstr-mbi.t | 2 +- .../perl/cpan/Math-BigInt/t/bestr-mbf.t | 2 +- .../perl/cpan/Math-BigInt/t/bestr-mbi.t | 2 +- .../perl/cpan/Math-BigInt/t/bfib-mbi.t | 2 +- .../perl/cpan/Math-BigInt/t/bigintc-import.t | 39 + .../perl/cpan/Math-BigInt/t/blucas-mbi.t | 2 +- .../perl/cpan/Math-BigInt/t/bnok-mbf.t | 2 +- .../perl/cpan/Math-BigInt/t/bnok-mbi.t | 2 +- .../perl/cpan/Math-BigInt/t/bnstr-mbf.t | 2 +- .../perl/cpan/Math-BigInt/t/bnstr-mbi.t | 2 +- gnu/usr.bin/perl/cpan/Math-BigInt/t/bpi-mbf.t | 53 + gnu/usr.bin/perl/cpan/Math-BigInt/t/bpi-mbi.t | 103 + .../perl/cpan/Math-BigInt/t/bpow-mbf.t | 348 + .../perl/cpan/Math-BigInt/t/bpow-mbi.t | 172 + .../perl/cpan/Math-BigInt/t/bsstr-mbf.t | 2 +- .../perl/cpan/Math-BigInt/t/bsstr-mbi.t | 2 +- .../perl/cpan/Math-BigInt/t/buparrow-mbi.t | 2 +- .../Math-BigInt/t/calling-class-methods.t | 4 +- .../cpan/Math-BigInt/t/calling-constant.t | 18 + .../Math-BigInt/t/calling-instance-methods.t | 4 +- .../perl/cpan/Math-BigInt/t/calling-lib1.t | 18 + .../perl/cpan/Math-BigInt/t/calling-lib2.t | 18 + .../perl/cpan/Math-BigInt/t/const-mbf.t | 314 + .../perl/cpan/Math-BigInt/t/const-mbi.t | 235 + .../perl/cpan/Math-BigInt/t/dparts-mbf.t | 2 +- .../perl/cpan/Math-BigInt/t/dparts-mbi.t | 2 +- .../perl/cpan/Math-BigInt/t/eparts-mbf.t | 2 +- .../perl/cpan/Math-BigInt/t/eparts-mbi.t | 2 +- .../perl/cpan/Math-BigInt/t/fparts-mbf.t | 97 + .../perl/cpan/Math-BigInt/t/fparts-mbi.t | 92 + .../perl/cpan/Math-BigInt/t/from_base-mbi.t | 2 +- .../cpan/Math-BigInt/t/from_base_num-mbi.t | 119 + .../perl/cpan/Math-BigInt/t/from_bin-mbf.t | 9 +- .../perl/cpan/Math-BigInt/t/from_bin-mbi.t | 8 +- .../perl/cpan/Math-BigInt/t/from_hex-mbi.t | 8 +- .../cpan/Math-BigInt/t/from_ieee754-mbf.t | 2 +- .../perl/cpan/Math-BigInt/t/from_oct-mbf.t | 41 +- .../perl/cpan/Math-BigInt/t/from_oct-mbi.t | 62 +- .../cpan/Math-BigInt/t/lib_load-mbf-mbi.t | 72 + .../cpan/Math-BigInt/t/lib_load-mbi-mbf.t | 72 + gnu/usr.bin/perl/cpan/Math-BigInt/t/new-mbf.t | 271 +- gnu/usr.bin/perl/cpan/Math-BigInt/t/new-mbi.t | 279 + .../perl/cpan/Math-BigInt/t/nparts-mbf.t | 2 +- .../perl/cpan/Math-BigInt/t/nparts-mbi.t | 2 +- .../perl/cpan/Math-BigInt/t/objectify_mbf.t | 2 +- .../perl/cpan/Math-BigInt/t/objectify_mbi.t | 2 +- .../perl/cpan/Math-BigInt/t/rt-16221.t | 2 +- .../perl/cpan/Math-BigInt/t/sparts-mbf.t | 35 +- .../perl/cpan/Math-BigInt/t/sparts-mbi.t | 35 +- .../perl/cpan/Math-BigInt/t/to_base-mbi.t | 11 +- .../perl/cpan/Math-BigInt/t/to_base_num-mbi.t | 63 + .../perl/cpan/Math-BigInt/t/to_ieee754-mbf.t | 103 +- .../perl/cpan/Math-BigInt/t/upgrade2.t | 2 +- .../perl/cpan/Math-BigInt/t/use_lib5.t | 19 + .../perl/cpan/Math-BigInt/t/use_lib6.t | 16 + .../perl/cpan/Math-BigRat/t/badd-mbr.t | 164 + .../perl/cpan/Math-BigRat/t/binv-mbr.t | 89 + .../perl/cpan/Math-BigRat/t/bnok-mbr.t | 1451 ++ .../perl/cpan/Math-BigRat/t/const-mbr.t | 319 + .../perl/cpan/Math-BigRat/t/downgrade.t | 107 + .../perl/cpan/Math-BigRat/t/dparts-mbr.t | 67 + .../perl/cpan/Math-BigRat/t/fparts-mbr.t | 97 + gnu/usr.bin/perl/cpan/Math-BigRat/t/new-mbr.t | 68 + .../perl/cpan/Math-BigRat/t/rt121139.t | 2 +- .../cpan/Math-Complex/lib/Math/Complex.pm | 2 +- .../perl/cpan/Math-Complex/t/Complex.t | 8 + gnu/usr.bin/perl/cpan/Math-Complex/t/Trig.t | 4 +- .../perl/cpan/Math-Complex/t/underbar.t | 5 +- gnu/usr.bin/perl/cpan/Memoize/t/errors.t | 4 +- gnu/usr.bin/perl/cpan/Memoize/t/tie_gdbm.t | 2 +- .../Module-Load-Conditional/t/test_lib/a/X.pm | 1 + .../Module-Load-Conditional/t/test_lib/b/X.pm | 1 + .../t/to_load/Commented.pm | 2 + .../t/to_load/HereDoc.pm | 1 + .../t/to_load/InPod.pm | 3 +- .../t/to_load/LoadIt.pm | 3 +- .../t/to_load/LoadMe.pl | 3 +- .../t/to_load/MustBe/Loaded.pm | 3 +- .../t/to_load/NotMain.pm | 3 +- .../Module-Load-Conditional/t/to_load/NotX.pm | 9 +- .../perl/cpan/Module-Load/lib/Module/Load.pm | 7 +- .../perl/cpan/Module-Load/t/01_Module-Load.t | 4 +- .../perl/cpan/Module-Load/t/02_Module-Load.t | 3 +- .../perl/cpan/Module-Load/t/to_load/LoadIt.pm | 4 +- .../Module-Load/t/to_load/Must/Be/Loaded.pm | 4 +- .../cpan/Module-Load/t/to_load/TestModule.pm | 2 + gnu/usr.bin/perl/cpan/NEXT/t/actuns.t | 15 +- .../NEXT/t/dynamically_scoped_regex_vars.t | 2 + gnu/usr.bin/perl/cpan/NEXT/t/next.t | 22 +- gnu/usr.bin/perl/cpan/NEXT/t/unseen.t | 26 +- .../PerlIO-via-QuotedPrint/t/QuotedPrint.t | 25 +- .../cpan/PerlIO-via-QuotedPrint/t/changes.t | 48 + .../cpan/PerlIO-via-QuotedPrint/t/critic.t | 48 + .../perl/cpan/PerlIO-via-QuotedPrint/t/pod.t | 51 + .../PerlIO-via-QuotedPrint/t/pod_coverage.t | 54 + .../perl/cpan/Pod-Checker/lib/Pod/Checker.pm | 128 +- .../cpan/Pod-Checker/scripts/podchecker.PL | 3 +- .../perl/cpan/Pod-Checker/t/pod/poderrs.t | 2 + .../perl/cpan/Pod-Checker/t/pod/poderrs.xr | 58 +- .../perl/cpan/Pod-Checker/t/pod/podname.t | 42 + .../perl/cpan/Pod-Checker/t/pod/testpchk.pl | 8 +- .../cpan/Pod-Simple/lib/Pod/Simple/JustPod.pm | 4 + gnu/usr.bin/perl/cpan/Pod-Simple/t/00about.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/20_skip.t | 4 + .../perl/cpan/Pod-Simple/t/JustPod02.t | 12 + .../perl/cpan/Pod-Simple/t/JustPod_corpus.t | 201 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/ac_d.t | 3 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/accept01.t | 9 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/accept05.t | 9 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/begin.t | 9 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/cbacks.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/chunking.t | 8 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/closeys.t | 12 +- .../perl/cpan/Pod-Simple/t/content_seen.t | 1 + .../perl/cpan/Pod-Simple/t/emptylists.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/encod01.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/encod02.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/encod03.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/end_over.t | 35 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/fcodes.t | 8 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/fcodes_e.t | 10 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/fcodes_l.t | 10 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/fcodes_s.t | 6 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/for.t | 8 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/fornot.t | 8 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/heads.t | 27 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/html02.t | 3 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/html03.t | 4 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/htmlbat.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/items.t | 9 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/items02.t | 9 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/itemstar.t | 8 +- .../perl/cpan/Pod-Simple/t/lib/helpers.pm | 18 + gnu/usr.bin/perl/cpan/Pod-Simple/t/linkclas.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/output.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/puller.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/pulltitl.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/reinit.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/rtf_utf8.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/search05.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/search25.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/search27.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/search29.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/search60.t | 3 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/stree.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/strpvbtm.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/tiedfh.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/verb_fmt.t | 6 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/verbatim.t | 14 +- gnu/usr.bin/perl/cpan/Pod-Simple/t/x_nixer.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/xhtml05.t | 1 + gnu/usr.bin/perl/cpan/Pod-Simple/t/xhtml10.t | 45 +- .../cpan/Pod-Usage/t/inc/Pod/InputObjects.pm | 1883 +- .../perl/cpan/Pod-Usage/t/inc/Pod/Parser.pm | 20 +- .../cpan/Pod-Usage/t/inc/Pod/PlainText.pm | 3 +- .../perl/cpan/Pod-Usage/t/inc/Pod/Select.pm | 5 +- .../cpan/Pod-Usage/t/pod/headwithmarkup.t | 3 + .../cpan/Pod-Usage/t/pod/selectheaders.pl | 1 + .../perl/cpan/Pod-Usage/t/pod/selectheaders.t | 3 + .../cpan/Pod-Usage/t/pod/selectsections.pl | 3 + .../cpan/Pod-Usage/t/pod/selectsections.t | 3 + .../perl/cpan/Scalar-List-Utils/t/mesh.t | 31 + .../cpan/Scalar-List-Utils/t/reductions.t | 2 +- .../Scalar-List-Utils/t/undefined-block.t | 18 + .../perl/cpan/Scalar-List-Utils/t/uniq.t | 3 +- .../perl/cpan/Scalar-List-Utils/t/uniqnum.t | 4 +- .../perl/cpan/Scalar-List-Utils/t/zip.t | 31 + gnu/usr.bin/perl/cpan/Socket/t/Socket.t | 16 +- gnu/usr.bin/perl/cpan/Socket/t/ip_mreq.t | 1 + gnu/usr.bin/perl/cpan/Socket/t/ipv6_mreq.t | 1 + gnu/usr.bin/perl/cpan/Socket/t/sockaddr.t | 29 +- .../t/compat/test-harness-compat.t | 60 +- .../cpan/Test-Harness/t/harness-bailout.t | 274 +- .../perl/cpan/Test-Harness/t/harness.t | 17 +- .../perl/cpan/Test-Harness/t/regression.t | 6 +- .../cpan/Test-Harness/t/sample-tests/segfault | 2 +- gnu/usr.bin/perl/cpan/Test-Harness/t/source.t | 3 +- .../Test-Simple/lib/Test/Builder/Formatter.pm | 4 +- .../Test-Simple/lib/Test/Builder/TodoDiag.pm | 4 +- .../perl/cpan/Test-Simple/lib/Test2.pm | 4 +- .../perl/cpan/Test-Simple/lib/Test2/API.pm | 71 +- .../Test-Simple/lib/Test2/API/Breakage.pm | 4 +- .../cpan/Test-Simple/lib/Test2/API/Context.pm | 4 +- .../Test-Simple/lib/Test2/API/Instance.pm | 4 +- .../lib/Test2/API/InterceptResult.pm | 634 + .../lib/Test2/API/InterceptResult/Event.pm | 1087 ++ .../lib/Test2/API/InterceptResult/Facet.pm | 25 + .../lib/Test2/API/InterceptResult/Hub.pm | 66 + .../lib/Test2/API/InterceptResult/Squasher.pm | 196 + .../cpan/Test-Simple/lib/Test2/API/Stack.pm | 4 +- .../perl/cpan/Test-Simple/lib/Test2/Event.pm | 4 +- .../cpan/Test-Simple/lib/Test2/Event/Bail.pm | 4 +- .../cpan/Test-Simple/lib/Test2/Event/Diag.pm | 4 +- .../Test-Simple/lib/Test2/Event/Encoding.pm | 4 +- .../Test-Simple/lib/Test2/Event/Exception.pm | 4 +- .../cpan/Test-Simple/lib/Test2/Event/Fail.pm | 4 +- .../Test-Simple/lib/Test2/Event/Generic.pm | 4 +- .../cpan/Test-Simple/lib/Test2/Event/Note.pm | 4 +- .../cpan/Test-Simple/lib/Test2/Event/Ok.pm | 13 +- .../cpan/Test-Simple/lib/Test2/Event/Pass.pm | 4 +- .../cpan/Test-Simple/lib/Test2/Event/Plan.pm | 4 +- .../cpan/Test-Simple/lib/Test2/Event/Skip.pm | 4 +- .../Test-Simple/lib/Test2/Event/Subtest.pm | 11 +- .../lib/Test2/Event/TAP/Version.pm | 4 +- .../cpan/Test-Simple/lib/Test2/Event/V2.pm | 7 +- .../Test-Simple/lib/Test2/Event/Waiting.pm | 4 +- .../cpan/Test-Simple/lib/Test2/EventFacet.pm | 4 +- .../Test-Simple/lib/Test2/EventFacet/About.pm | 4 +- .../lib/Test2/EventFacet/Amnesty.pm | 4 +- .../lib/Test2/EventFacet/Assert.pm | 4 +- .../lib/Test2/EventFacet/Control.pm | 4 +- .../Test-Simple/lib/Test2/EventFacet/Error.pm | 4 +- .../Test-Simple/lib/Test2/EventFacet/Hub.pm | 4 +- .../Test-Simple/lib/Test2/EventFacet/Info.pm | 4 +- .../lib/Test2/EventFacet/Info/Table.pm | 4 +- .../Test-Simple/lib/Test2/EventFacet/Meta.pm | 4 +- .../lib/Test2/EventFacet/Parent.pm | 6 +- .../Test-Simple/lib/Test2/EventFacet/Plan.pm | 4 +- .../lib/Test2/EventFacet/Render.pm | 4 +- .../Test-Simple/lib/Test2/EventFacet/Trace.pm | 33 +- .../cpan/Test-Simple/lib/Test2/Formatter.pm | 4 +- .../Test-Simple/lib/Test2/Formatter/TAP.pm | 4 +- .../perl/cpan/Test-Simple/lib/Test2/Hub.pm | 10 +- .../Test-Simple/lib/Test2/Hub/Interceptor.pm | 60 +- .../lib/Test2/Hub/Interceptor/Terminator.pm | 4 +- .../cpan/Test-Simple/lib/Test2/Hub/Subtest.pm | 4 +- .../perl/cpan/Test-Simple/lib/Test2/IPC.pm | 4 +- .../cpan/Test-Simple/lib/Test2/IPC/Driver.pm | 4 +- .../Test-Simple/lib/Test2/IPC/Driver/Files.pm | 12 +- .../cpan/Test-Simple/lib/Test2/Tools/Tiny.pm | 4 +- .../cpan/Test-Simple/lib/Test2/Transition.pod | 2 +- .../perl/cpan/Test-Simple/lib/Test2/Util.pm | 7 +- .../lib/Test2/Util/ExternalMeta.pm | 4 +- .../lib/Test2/Util/Facets2Legacy.pm | 4 +- .../Test-Simple/lib/Test2/Util/HashBase.pm | 2 +- .../cpan/Test-Simple/lib/Test2/Util/Trace.pm | 10 +- .../t/Legacy/Builder/current_test.t | 5 +- .../perl/cpan/Test-Simple/t/Legacy/More.t | 2 +- .../Regression/870-experimental-warnings.t | 16 + .../t/Legacy/Regression/is_capture.t | 20 + .../perl/cpan/Test-Simple/t/Legacy/buffer.t | 5 +- .../cpan/Test-Simple/t/Legacy/fail-like.t | 5 +- .../cpan/Test-Simple/t/Legacy/fail-more.t | 2 +- .../Test-Simple/t/Legacy/is_deeply_fail.t | 1 + .../perl/cpan/Test-Simple/t/Legacy/todo.t | 5 +- .../t/Test2/modules/API/Breakage.t | 21 +- .../t/Test2/modules/API/InterceptResult.t | 302 + .../Test2/modules/API/InterceptResult/Event.t | 950 + .../modules/API/InterceptResult/Squasher.t | 117 + .../t/Test2/modules/Event/Subtest.t | 29 + .../Test-Simple/t/Test2/modules/Event/V2.t | 2 +- .../t/Test2/modules/IPC/Driver/Files.t | 26 +- .../perl/cpan/Test-Simple/t/lib/MyOverload.pm | 10 +- .../t/regression/862-intercept_tb_todo.t | 62 + .../t/regression/skip_reason_object_ipc.t | 33 + .../perl/cpan/Text-Balanced/t/01_compile.t | 7 +- .../perl/cpan/Text-Balanced/t/02_extbrk.t | 64 +- .../perl/cpan/Text-Balanced/t/03_extcbk.t | 66 +- .../perl/cpan/Text-Balanced/t/04_extdel.t | 60 +- .../perl/cpan/Text-Balanced/t/05_extmul.t | 198 +- .../perl/cpan/Text-Balanced/t/06_extqlk.t | 102 +- .../perl/cpan/Text-Balanced/t/07_exttag.t | 118 +- .../perl/cpan/Text-Balanced/t/08_extvar.t | 62 +- .../perl/cpan/Text-Balanced/t/09_gentag.t | 119 +- .../perl/cpan/Text-Balanced/t/94_changes.t | 48 + .../perl/cpan/Text-Balanced/t/95_critic.t | 48 + .../perl/cpan/Text-Balanced/t/96_pmv.t | 32 + .../perl/cpan/Text-Balanced/t/97_pod.t | 32 + .../cpan/Text-Balanced/t/98_pod_coverage.t | 51 + .../perl/cpan/Text-ParseWords/t/taint.t | 7 + gnu/usr.bin/perl/cpan/Text-Tabs/t/37000.t | 22 +- gnu/usr.bin/perl/cpan/Text-Tabs/t/39548.t | 15 +- gnu/usr.bin/perl/cpan/Text-Tabs/t/79766.t | 11 +- gnu/usr.bin/perl/cpan/Text-Tabs/t/Jacobson.t | 20 +- gnu/usr.bin/perl/cpan/Text-Tabs/t/Jacobson2.t | 18 +- gnu/usr.bin/perl/cpan/Text-Tabs/t/Jochen.t | 5 +- gnu/usr.bin/perl/cpan/Text-Tabs/t/belg4mit.t | 22 +- gnu/usr.bin/perl/cpan/Text-Tabs/t/dandv.t | 18 +- gnu/usr.bin/perl/cpan/Text-Tabs/t/fill.t | 51 +- gnu/usr.bin/perl/cpan/Text-Tabs/t/lib/ok.pl | 5 + gnu/usr.bin/perl/cpan/Text-Tabs/t/sep.t | 63 +- gnu/usr.bin/perl/cpan/Text-Tabs/t/sep2.t | 63 +- gnu/usr.bin/perl/cpan/Text-Tabs/t/tabs.t | 44 +- gnu/usr.bin/perl/cpan/Text-Tabs/t/undef.t | 23 + gnu/usr.bin/perl/cpan/Text-Tabs/t/wrap.t | 67 +- .../perl/cpan/Text-Tabs/t/wrap_separator2.t | 10 +- .../perl/cpan/Tie-RefHash/lib/Tie/RefHash.pm | 312 +- gnu/usr.bin/perl/cpan/Tie-RefHash/t/rebless.t | 3 +- gnu/usr.bin/perl/cpan/Tie-RefHash/t/refhash.t | 4 +- .../perl/cpan/Tie-RefHash/t/threaded.t | 5 +- .../perl/cpan/Time-Local/lib/Time/Local.pm | 117 +- gnu/usr.bin/perl/cpan/Time-Local/t/Local.t | 618 +- .../cpan/Unicode-Collate/Collate/Locale/cu.pl | 224 +- .../Collate/Locale/de_at_ph.pl | 56 +- .../Unicode-Collate/Collate/Locale/dsb.pl | 112 +- .../Unicode-Collate/Collate/Locale/fr_ca.pl | 2 +- .../cpan/Unicode-Collate/Collate/Locale/he.pl | 8 +- .../Unicode-Collate/Collate/Locale/lkt.pl | 44 +- .../Unicode-Collate/Collate/Locale/ug_cyrl.pl | 8 +- .../cpan/Unicode-Collate/Collate/Locale/vo.pl | 52 +- .../perl/cpan/Unicode-Collate/t/altern.t | 12 +- .../perl/cpan/Unicode-Collate/t/backwds.t | 13 +- .../perl/cpan/Unicode-Collate/t/cjk_b5.t | 15 +- .../perl/cpan/Unicode-Collate/t/cjk_gb.t | 15 +- .../perl/cpan/Unicode-Collate/t/cjk_ja.t | 15 +- .../perl/cpan/Unicode-Collate/t/cjk_ko.t | 15 +- .../perl/cpan/Unicode-Collate/t/cjk_py.t | 15 +- .../perl/cpan/Unicode-Collate/t/cjk_st.t | 15 +- .../perl/cpan/Unicode-Collate/t/cjk_zy.t | 15 +- .../perl/cpan/Unicode-Collate/t/cjkrange.t | 62 +- .../perl/cpan/Unicode-Collate/t/compatui.t | 16 +- .../perl/cpan/Unicode-Collate/t/default.t | 12 +- .../perl/cpan/Unicode-Collate/t/hangtype.t | 16 +- .../perl/cpan/Unicode-Collate/t/hangul.t | 11 +- .../perl/cpan/Unicode-Collate/t/iglevel2.t | 11 +- .../perl/cpan/Unicode-Collate/t/ignor.t | 11 +- .../perl/cpan/Unicode-Collate/t/illegalp.t | 30 +- .../perl/cpan/Unicode-Collate/t/index.t | 13 +- .../perl/cpan/Unicode-Collate/t/khitan.t | 61 + .../perl/cpan/Unicode-Collate/t/loc_af.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_ar.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_as.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_az.t | 31 +- .../perl/cpan/Unicode-Collate/t/loc_be.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_bg.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_bn.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_bs.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_bscy.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_ca.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_cjk.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_cjkc.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_cs.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_cu.t | 79 +- .../perl/cpan/Unicode-Collate/t/loc_cy.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_cyrl.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_da.t | 43 +- .../perl/cpan/Unicode-Collate/t/loc_de.t | 23 +- .../perl/cpan/Unicode-Collate/t/loc_deat.t | 27 +- .../perl/cpan/Unicode-Collate/t/loc_deph.t | 23 +- .../perl/cpan/Unicode-Collate/t/loc_dsb.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_ee.t | 31 +- .../perl/cpan/Unicode-Collate/t/loc_eo.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_et.t | 27 +- .../perl/cpan/Unicode-Collate/t/loc_fa.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_fi.t | 35 +- .../perl/cpan/Unicode-Collate/t/loc_fil.t | 15 +- .../perl/cpan/Unicode-Collate/t/loc_fiph.t | 35 +- .../perl/cpan/Unicode-Collate/t/loc_fo.t | 43 +- .../perl/cpan/Unicode-Collate/t/loc_frca.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_gu.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_ha.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_haw.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_he.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_hi.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_hr.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_hu.t | 19 +- .../perl/cpan/Unicode-Collate/t/loc_hy.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_ig.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_is.t | 87 +- .../perl/cpan/Unicode-Collate/t/loc_ja.t | 21 +- .../perl/cpan/Unicode-Collate/t/loc_jait.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_japr.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_kk.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_kl.t | 43 +- .../perl/cpan/Unicode-Collate/t/loc_kn.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_ko.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_kok.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_lkt.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_ln.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_lt.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_lv.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_mk.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_ml.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_mncy.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_mr.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_mt.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_nb.t | 43 +- .../perl/cpan/Unicode-Collate/t/loc_nn.t | 43 +- .../perl/cpan/Unicode-Collate/t/loc_nso.t | 19 +- .../perl/cpan/Unicode-Collate/t/loc_om.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_or.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_pa.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_pl.t | 19 +- .../perl/cpan/Unicode-Collate/t/loc_ro.t | 19 +- .../perl/cpan/Unicode-Collate/t/loc_ru.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_sa.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_se.t | 67 +- .../perl/cpan/Unicode-Collate/t/loc_si.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_sidt.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_sk.t | 19 +- .../perl/cpan/Unicode-Collate/t/loc_sl.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_sq.t | 19 +- .../perl/cpan/Unicode-Collate/t/loc_sr.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_srla.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_sv.t | 47 +- .../perl/cpan/Unicode-Collate/t/loc_svrf.t | 47 +- .../perl/cpan/Unicode-Collate/t/loc_sw.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_ta.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_te.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_test.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_th.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_tn.t | 19 +- .../perl/cpan/Unicode-Collate/t/loc_to.t | 51 +- .../perl/cpan/Unicode-Collate/t/loc_tr.t | 31 +- .../perl/cpan/Unicode-Collate/t/loc_ugcy.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_uk.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_ur.t | 13 +- .../perl/cpan/Unicode-Collate/t/loc_vi.t | 259 +- .../perl/cpan/Unicode-Collate/t/loc_vo.t | 23 +- .../perl/cpan/Unicode-Collate/t/loc_wae.t | 31 +- .../perl/cpan/Unicode-Collate/t/loc_wo.t | 43 +- .../perl/cpan/Unicode-Collate/t/loc_yo.t | 11 +- .../perl/cpan/Unicode-Collate/t/loc_zh.t | 107 +- .../perl/cpan/Unicode-Collate/t/loc_zhb5.t | 107 +- .../perl/cpan/Unicode-Collate/t/loc_zhgb.t | 107 +- .../perl/cpan/Unicode-Collate/t/loc_zhpy.t | 107 +- .../perl/cpan/Unicode-Collate/t/loc_zhst.t | 107 +- .../perl/cpan/Unicode-Collate/t/loc_zhzy.t | 107 +- .../perl/cpan/Unicode-Collate/t/normal.t | 23 +- .../perl/cpan/Unicode-Collate/t/notable.t | 11 +- .../perl/cpan/Unicode-Collate/t/nushu.t | 16 +- .../perl/cpan/Unicode-Collate/t/overcjk0.t | 41 +- .../perl/cpan/Unicode-Collate/t/overcjk1.t | 30 +- .../perl/cpan/Unicode-Collate/t/override.t | 11 +- .../perl/cpan/Unicode-Collate/t/rearrang.t | 14 +- .../perl/cpan/Unicode-Collate/t/rewrite.t | 11 +- .../perl/cpan/Unicode-Collate/t/tangut.t | 37 +- .../perl/cpan/Unicode-Collate/t/test.t | 12 +- .../perl/cpan/Unicode-Collate/t/trailwt.t | 11 +- .../perl/cpan/Unicode-Collate/t/variable.t | 12 +- gnu/usr.bin/perl/cpan/Win32/Makefile.PL | 22 +- .../perl/cpan/Win32/t/GetFullPathName.t | 4 +- .../perl/cpan/Win32/t/GetShortPathName.t | 10 + gnu/usr.bin/perl/cpan/Win32/t/Names.t | 9 +- gnu/usr.bin/perl/cpan/Win32/t/Privileges.t | 55 + gnu/usr.bin/perl/cpan/Win32/t/Unicode.t | 10 +- .../perl/cpan/autodie/t/exception_nonref.t | 11 + .../perl/cpan/bignum/gentest/backend.sh | 53 + .../cpan/bignum/gentest/scope-nested-const.sh | 110 + .../bignum/gentest/scope-nested-hex-oct.sh | 110 + .../perl/cpan/bignum/lib/Math/BigRat/Trace.pm | 76 + gnu/usr.bin/perl/cpan/bignum/lib/bigfloat.pm | 851 + .../perl/cpan/bignum/t/backend-gmp-bigfloat.t | 21 + .../perl/cpan/bignum/t/backend-gmp-bigint.t | 21 + .../perl/cpan/bignum/t/backend-gmp-bignum.t | 21 + .../perl/cpan/bignum/t/backend-gmp-bigrat.t | 21 + .../cpan/bignum/t/backend-pari-bigfloat.t | 21 + .../perl/cpan/bignum/t/backend-pari-bigint.t | 21 + .../perl/cpan/bignum/t/backend-pari-bignum.t | 21 + .../perl/cpan/bignum/t/backend-pari-bigrat.t | 21 + gnu/usr.bin/perl/cpan/bignum/t/bigfloat.t | 59 + .../perl/cpan/bignum/t/const-bigfloat.t | 337 + gnu/usr.bin/perl/cpan/bignum/t/const-bigint.t | 237 + gnu/usr.bin/perl/cpan/bignum/t/const-bignum.t | 339 + gnu/usr.bin/perl/cpan/bignum/t/const-bigrat.t | 316 + .../perl/cpan/bignum/t/down-mbi-up-mbf.t | 58 + .../perl/cpan/bignum/t/down-mbi-up-mbr.t | 43 + .../perl/cpan/bignum/t/down-mbi-up-undef.t | 45 + .../perl/cpan/bignum/t/down-undef-up-mbf.t | 38 + .../perl/cpan/bignum/t/e_pi-bigfloat.t | 17 + gnu/usr.bin/perl/cpan/bignum/t/e_pi-bigint.t | 18 + gnu/usr.bin/perl/cpan/bignum/t/e_pi-bignum.t | 17 + gnu/usr.bin/perl/cpan/bignum/t/e_pi-bigrat.t | 22 + .../perl/cpan/bignum/t/import-bigfloat.t | 63 + .../perl/cpan/bignum/t/import-bigint.t | 63 + .../perl/cpan/bignum/t/import-bignum.t | 63 + .../perl/cpan/bignum/t/import-bigrat.t | 63 + .../perl/cpan/bignum/t/infnan-bigfloat.t | 100 + .../perl/cpan/bignum/t/infnan-bigint.t | 100 + .../perl/cpan/bignum/t/infnan-bignum.t | 100 + .../perl/cpan/bignum/t/infnan-bigrat.t | 100 + .../perl/cpan/bignum/t/option_a-bignum.t | 18 + .../perl/cpan/bignum/t/option_l-bigfloat.t | 72 + .../perl/cpan/bignum/t/option_l-bigint.t | 72 + .../perl/cpan/bignum/t/option_l-bignum.t | 72 + .../perl/cpan/bignum/t/option_l-bigrat.t | 72 + .../perl/cpan/bignum/t/option_p-bignum.t | 18 + gnu/usr.bin/perl/cpan/bignum/t/overrides.t | 58 +- .../perl/cpan/bignum/t/scope-bigfloat.t | 35 + gnu/usr.bin/perl/cpan/bignum/t/scope-bigint.t | 35 + gnu/usr.bin/perl/cpan/bignum/t/scope-bignum.t | 35 + gnu/usr.bin/perl/cpan/bignum/t/scope-bigrat.t | 35 + .../perl/cpan/bignum/t/scope-nested-const.t | 274 + .../perl/cpan/bignum/t/scope-nested-hex-oct.t | 274 + gnu/usr.bin/perl/cpan/libnet/t/nntp_ssl.t | 12 +- gnu/usr.bin/perl/cpan/libnet/t/pop3_ssl.t | 12 +- gnu/usr.bin/perl/cpan/libnet/t/smtp_ssl.t | 12 +- .../perl/cpan/podlators/t/text/invalid.t | 3 +- .../perl/cpan/version/t/04strict_lax.t | 2 +- gnu/usr.bin/perl/cpan/version/t/10_lyon.t | 48 +- .../perl/dist/Attribute-Handlers/t/caller.t | 39 + .../perl/dist/Carp/t/Carp_overloadless.t | 6 +- gnu/usr.bin/perl/dist/Carp/t/broken_can.t | 5 +- .../perl/dist/Carp/t/broken_univ_can.t | 12 +- gnu/usr.bin/perl/dist/Carp/t/vivify_stash.t | 6 +- gnu/usr.bin/perl/dist/Data-Dumper/Makefile.PL | 23 + gnu/usr.bin/perl/dist/Data-Dumper/t/bless.t | 5 + .../dist/Data-Dumper/t/bless_var_method.t | 12 +- gnu/usr.bin/perl/dist/Data-Dumper/t/bugs.t | 11 +- gnu/usr.bin/perl/dist/Data-Dumper/t/deparse.t | 12 +- .../perl/dist/Data-Dumper/t/dumpperl.t | 12 +- gnu/usr.bin/perl/dist/Data-Dumper/t/freezer.t | 11 +- .../perl/dist/Data-Dumper/t/freezer_useperl.t | 11 +- gnu/usr.bin/perl/dist/Data-Dumper/t/huge.t | 2 - gnu/usr.bin/perl/dist/Data-Dumper/t/indent.t | 11 +- .../perl/dist/Data-Dumper/t/lib/Testing.pm | 2 +- gnu/usr.bin/perl/dist/Data-Dumper/t/misc.t | 12 +- gnu/usr.bin/perl/dist/Data-Dumper/t/names.t | 13 +- .../perl/dist/Data-Dumper/t/overload.t | 13 +- gnu/usr.bin/perl/dist/Data-Dumper/t/pair.t | 13 +- .../perl/dist/Data-Dumper/t/perl-74170.t | 12 +- .../Data-Dumper/t/purity_deepcopy_maxdepth.t | 12 +- gnu/usr.bin/perl/dist/Data-Dumper/t/qr.t | 20 +- gnu/usr.bin/perl/dist/Data-Dumper/t/seen.t | 12 +- .../perl/dist/Data-Dumper/t/sortkeys.t | 26 +- .../perl/dist/Data-Dumper/t/sparseseen.t | 12 +- gnu/usr.bin/perl/dist/Data-Dumper/t/terse.t | 1 + gnu/usr.bin/perl/dist/Data-Dumper/t/toaster.t | 12 +- .../perl/dist/Data-Dumper/t/trailing_comma.t | 12 +- gnu/usr.bin/perl/dist/Data-Dumper/t/values.t | 13 +- .../perl/dist/Devel-PPPort/devel/mktodo | 5 +- gnu/usr.bin/perl/dist/Env/lib/Env.pm | 13 +- .../perl/dist/Exporter/lib/Exporter/Heavy.pm | 2 +- gnu/usr.bin/perl/dist/Exporter/t/Exporter.t | 48 +- gnu/usr.bin/perl/dist/Exporter/t/warn.t | 3 +- .../perl/dist/ExtUtils-ParseXS/t/001-basic.t | 29 +- .../perl/dist/ExtUtils-ParseXS/t/002-more.t | 16 +- .../perl/dist/ExtUtils-ParseXS/t/003-usage.t | 3 +- .../perl/dist/ExtUtils-ParseXS/t/XSBroken.xs | 26 + .../perl/dist/ExtUtils-ParseXS/t/XSMore.xs | 50 + gnu/usr.bin/perl/dist/FindBin/lib/FindBin.pm | 19 +- gnu/usr.bin/perl/dist/FindBin/t/FindBin.t | 3 + gnu/usr.bin/perl/dist/IO/ChangeLog | 38 + gnu/usr.bin/perl/dist/IO/Makefile.PL | 2 +- gnu/usr.bin/perl/dist/IO/t/io_const.t | 1 + gnu/usr.bin/perl/dist/IO/t/io_dir.t | 10 +- gnu/usr.bin/perl/dist/IO/t/io_dup.t | 12 +- gnu/usr.bin/perl/dist/IO/t/io_multihomed.t | 12 +- gnu/usr.bin/perl/dist/IO/t/io_pipe.t | 22 +- gnu/usr.bin/perl/dist/IO/t/io_sel.t | 10 +- gnu/usr.bin/perl/dist/IO/t/io_sock_errstr.t | 34 + gnu/usr.bin/perl/dist/IO/t/io_tell.t | 11 +- gnu/usr.bin/perl/dist/IO/t/io_unix.t | 12 +- gnu/usr.bin/perl/dist/IO/t/io_utf8.t | 2 +- .../Locale-Maketext/lib/Locale/Maketext.pod | 74 +- .../lib/Locale/Maketext/Cookbook.pod | 24 +- .../lib/Locale/Maketext/TPJ13.pod | 8 +- .../Locale-Maketext/t/30_eval_dollar_at.t | 2 +- .../perl/dist/Locale-Maketext/t/40_super.t | 6 +- .../perl/dist/Locale-Maketext/t/50_super.t | 2 +- .../dist/Locale-Maketext/t/70_fail_auto.t | 4 +- .../dist/Locale-Maketext/t/92_blacklist.t | 34 +- .../dist/Locale-Maketext/t/93_whitelist.t | 42 +- .../perl/dist/Locale-Maketext/t/94_denylist.t | 93 + .../dist/Locale-Maketext/t/95_allowlist.t | 96 + gnu/usr.bin/perl/dist/Net-Ping/Changes | 29 + .../perl/dist/Net-Ping/t/200_ping_tcp.t | 20 +- .../perl/dist/Net-Ping/t/501_ping_icmpv6.t | 6 +- gnu/usr.bin/perl/dist/PathTools/t/cwd.t | 4 + .../perl/dist/PathTools/t/cwd_enoent.t | 5 + gnu/usr.bin/perl/dist/Storable/t/downgrade.t | 56 +- gnu/usr.bin/perl/dist/Storable/t/freeze.t | 1 - gnu/usr.bin/perl/dist/Storable/t/integer.t | 5 - .../perl/dist/Storable/t/make_downgrade.pl | 5 +- gnu/usr.bin/perl/dist/Storable/t/malice.t | 6 +- gnu/usr.bin/perl/dist/Storable/t/restrict.t | 7 +- .../perl/dist/Unicode-Normalize/Makefile.PL | 22 +- .../perl/dist/Unicode-Normalize/Normalize.pm | 61 +- .../perl/dist/Unicode-Normalize/Normalize.xs | 71 +- .../perl/dist/Unicode-Normalize/mkheader | 20 +- .../perl/dist/Unicode-Normalize/t/fcdc.t | 22 +- .../perl/dist/Unicode-Normalize/t/form.t | 20 +- .../perl/dist/Unicode-Normalize/t/func.t | 22 +- .../perl/dist/Unicode-Normalize/t/illegal.t | 22 +- .../perl/dist/Unicode-Normalize/t/norm.t | 24 +- .../perl/dist/Unicode-Normalize/t/null.t | 11 - .../perl/dist/Unicode-Normalize/t/partial1.t | 20 +- .../perl/dist/Unicode-Normalize/t/partial2.t | 24 +- .../perl/dist/Unicode-Normalize/t/proto.t | 20 +- .../perl/dist/Unicode-Normalize/t/split.t | 24 +- .../perl/dist/Unicode-Normalize/t/test.t | 24 +- .../perl/dist/Unicode-Normalize/t/tie.t | 20 +- gnu/usr.bin/perl/dist/base/t/fields-5_6_0.t | 2 +- gnu/usr.bin/perl/dist/threads/t/libc.t | 6 + gnu/usr.bin/perl/dist/threads/t/stack.t | 82 +- gnu/usr.bin/perl/dist/threads/t/stack_env.t | 46 +- gnu/usr.bin/perl/ext/Amiga-ARexx/ARexx.pm | 9 +- gnu/usr.bin/perl/ext/Amiga-Exec/Exec.pm | 11 +- gnu/usr.bin/perl/ext/B/t/B/success.pm | 13 + gnu/usr.bin/perl/ext/B/t/invlist.t | 65 + gnu/usr.bin/perl/ext/B/t/o.t | 47 +- gnu/usr.bin/perl/ext/B/t/optree_constants.t | 5 - gnu/usr.bin/perl/ext/B/t/optree_for.t | 312 + gnu/usr.bin/perl/ext/Fcntl/t/syslfs.t | 2 +- .../perl/ext/File-Find/t/lib/Testing.pm | 5 +- gnu/usr.bin/perl/ext/File-Find/t/taint.t | 40 +- gnu/usr.bin/perl/ext/File-Glob/bsd_glob.h | 36 +- gnu/usr.bin/perl/ext/File-Glob/t/basic.t | 14 +- gnu/usr.bin/perl/ext/File-Glob/t/case.t | 2 +- gnu/usr.bin/perl/ext/GDBM_File/GDBM_File.xs | 945 +- gnu/usr.bin/perl/ext/GDBM_File/Makefile.PL | 84 +- gnu/usr.bin/perl/ext/GDBM_File/t/count.t | 37 + gnu/usr.bin/perl/ext/GDBM_File/t/dump.t | 101 + gnu/usr.bin/perl/ext/GDBM_File/t/fatal.t | 9 +- gnu/usr.bin/perl/ext/GDBM_File/t/opt.t | 37 + gnu/usr.bin/perl/ext/GDBM_File/t/snapshot.t | 100 + .../perl/ext/Hash-Util-FieldHash/t/01_load.t | 7 +- .../ext/Hash-Util-FieldHash/t/02_function.t | 61 +- .../perl/ext/Hash-Util-FieldHash/t/03_class.t | 21 +- .../ext/Hash-Util-FieldHash/t/04_thread.t | 26 +- .../ext/Hash-Util-FieldHash/t/11_hashassign.t | 88 +- .../ext/Hash-Util-FieldHash/t/12_hashwarn.t | 8 +- .../perl/ext/IPC-Open3/lib/IPC/Open2.pm | 10 +- gnu/usr.bin/perl/ext/IPC-Open3/t/IPC-Open2.t | 6 +- gnu/usr.bin/perl/ext/POSIX/t/fenv.t | 48 + gnu/usr.bin/perl/ext/POSIX/t/iv_const.t | 75 + gnu/usr.bin/perl/ext/POSIX/t/mb.t | 4 +- gnu/usr.bin/perl/ext/POSIX/t/sigset.t | 2 +- gnu/usr.bin/perl/ext/POSIX/t/sysconf.t | 15 +- gnu/usr.bin/perl/ext/POSIX/t/termios.t | 44 +- gnu/usr.bin/perl/ext/POSIX/t/waitpid.t | 2 +- gnu/usr.bin/perl/ext/PerlIO-via/t/thread.t | 4 - gnu/usr.bin/perl/ext/PerlIO-via/t/via.t | 4 - .../perl/ext/Pod-Functions/Makefile.PL | 2 +- .../ext/Pod-Html/corpus/perlpodspec-copy.pod | 1904 ++ .../perl/ext/Pod-Html/corpus/perlvar-copy.pod | 1742 ++ .../perl/ext/Pod-Html/lib/Pod/Html/Util.pm | 282 + .../perl/ext/Pod-Html/t/anchorify-536.t | 114 + gnu/usr.bin/perl/ext/Pod-Html/t/anchorify.t | 22 +- gnu/usr.bin/perl/ext/Pod-Html/t/cache.t | 35 +- gnu/usr.bin/perl/ext/Pod-Html/t/eol.t | 15 +- gnu/usr.bin/perl/ext/Pod-Html/t/feature.t | 52 +- gnu/usr.bin/perl/ext/Pod-Html/t/feature2.t | 47 +- gnu/usr.bin/perl/ext/Pod-Html/t/htmldir1.t | 100 +- gnu/usr.bin/perl/ext/Pod-Html/t/htmldir2.t | 84 +- gnu/usr.bin/perl/ext/Pod-Html/t/htmldir3.t | 112 +- gnu/usr.bin/perl/ext/Pod-Html/t/htmldir4.t | 70 +- gnu/usr.bin/perl/ext/Pod-Html/t/htmldir5.t | 68 +- gnu/usr.bin/perl/ext/Pod-Html/t/htmlescp.pod | 2 +- gnu/usr.bin/perl/ext/Pod-Html/t/htmlescp.t | 36 +- gnu/usr.bin/perl/ext/Pod-Html/t/htmllink.t | 34 +- .../perl/ext/Pod-Html/t/lib/Testing.pm | 698 + gnu/usr.bin/perl/ext/Pod-Html/t/poderr.t | 33 +- gnu/usr.bin/perl/ext/Pod-Html/t/podnoerr.t | 38 +- gnu/usr.bin/perl/ext/SDBM_File/dba.c | 104 +- gnu/usr.bin/perl/ext/SDBM_File/dbd.c | 142 +- gnu/usr.bin/perl/ext/SDBM_File/t/corrupt.t | 2 +- gnu/usr.bin/perl/ext/SDBM_File/tune.h | 2 +- gnu/usr.bin/perl/ext/SDBM_File/util.c | 52 +- .../perl/ext/VMS-Filespec/lib/VMS/Filespec.pm | 11 +- gnu/usr.bin/perl/ext/VMS-Stdio/Stdio.pm | 8 +- .../perl/ext/XS-APItest/t/boolean-thr.t | 38 + gnu/usr.bin/perl/ext/XS-APItest/t/boolean.t | 46 + gnu/usr.bin/perl/ext/XS-APItest/t/caller.t | 3 +- gnu/usr.bin/perl/ext/XS-APItest/t/delimcpy.t | 193 + gnu/usr.bin/perl/ext/XS-APItest/t/hv_macro.t | 12 +- gnu/usr.bin/perl/ext/XS-APItest/t/my_strtod.t | 16 + gnu/usr.bin/perl/ext/XS-APItest/t/ptr_table.t | 6 - gnu/usr.bin/perl/ext/XS-APItest/t/push.t | 16 +- gnu/usr.bin/perl/ext/XS-APItest/t/sv_numeq.t | 32 + gnu/usr.bin/perl/ext/XS-APItest/t/sv_streq.t | 44 + .../perl/ext/XS-APItest/t/utf16_to_utf8.t | 31 +- .../perl/ext/XS-APItest/t/utf8_warn_base.pl | 7 +- gnu/usr.bin/perl/ext/re/t/re_funcs.t | 83 +- gnu/usr.bin/perl/haiku/Haiku/Haiku.pm | 2 +- gnu/usr.bin/perl/haiku/Haiku/Haiku.xs | 4 - gnu/usr.bin/perl/hints/cygwin.sh | 6 + gnu/usr.bin/perl/hints/t001.c | 94 +- gnu/usr.bin/perl/hv_macro.h | 6 +- gnu/usr.bin/perl/lib/AnyDBM_File.t | 1 - gnu/usr.bin/perl/lib/B/Deparse-subclass.t | 4 +- gnu/usr.bin/perl/lib/Config/Extensions.t | 4 +- gnu/usr.bin/perl/lib/DBM_Filter/t/01error.t | 3 +- gnu/usr.bin/perl/lib/DBM_Filter/t/02core.t | 3 +- gnu/usr.bin/perl/lib/DBM_Filter/t/compress.t | 3 +- gnu/usr.bin/perl/lib/DBM_Filter/t/int32.t | 3 +- gnu/usr.bin/perl/lib/DBM_Filter/t/null.t | 3 +- gnu/usr.bin/perl/lib/DirHandle.t | 4 +- gnu/usr.bin/perl/lib/English.t | 12 +- gnu/usr.bin/perl/lib/File/Basename.t | 4 +- gnu/usr.bin/perl/lib/File/Compare.t | 4 +- gnu/usr.bin/perl/lib/FileHandle.t | 13 +- gnu/usr.bin/perl/lib/Getopt/Std.t | 6 +- gnu/usr.bin/perl/lib/Internals.t | 4 +- gnu/usr.bin/perl/lib/Net/hostent.t | 14 +- gnu/usr.bin/perl/lib/PerlIO.pm | 8 +- gnu/usr.bin/perl/lib/Pod/t/Usage.t | 3 +- gnu/usr.bin/perl/lib/Symbol.t | 35 +- gnu/usr.bin/perl/lib/Thread.t | 4 +- gnu/usr.bin/perl/lib/Tie/ExtraHash.t | 3 +- gnu/usr.bin/perl/lib/Tie/Handle.pm | 4 +- gnu/usr.bin/perl/lib/Tie/Handle/stdhandle.t | 4 +- .../lib/Tie/Handle/stdhandle_from_handle.t | 4 +- gnu/usr.bin/perl/lib/Tie/Hash.t | 4 +- gnu/usr.bin/perl/lib/Tie/Scalar.t | 4 +- gnu/usr.bin/perl/lib/Tie/SubstrHash.t | 100 +- gnu/usr.bin/perl/lib/Time/gmtime.t | 4 +- gnu/usr.bin/perl/lib/Time/localtime.t | 4 +- gnu/usr.bin/perl/lib/User/grent.t | 2 +- gnu/usr.bin/perl/lib/blib.t | 4 +- gnu/usr.bin/perl/lib/builtin.pm | 287 + gnu/usr.bin/perl/lib/builtin.t | 347 + gnu/usr.bin/perl/lib/dumpvar.t | 4 +- gnu/usr.bin/perl/lib/filetest.t | 4 +- gnu/usr.bin/perl/lib/integer.t | 4 +- gnu/usr.bin/perl/lib/less.t | 4 +- gnu/usr.bin/perl/lib/meta_notation.pm | 1 - gnu/usr.bin/perl/lib/open.pm | 21 +- gnu/usr.bin/perl/lib/overload64.t | 4 +- gnu/usr.bin/perl/lib/overloading.t | 7 +- gnu/usr.bin/perl/lib/perl5db/t/gh-17661 | 14 + gnu/usr.bin/perl/lib/perl5db/t/gh-17661b | 14 + .../perl/lib/perl5db/t/test-a-statement-3 | 6 + gnu/usr.bin/perl/lib/sort.pm | 143 +- .../unicore/EquivalentUnifiedIdeograph.txt | 6 +- gnu/usr.bin/perl/lib/unicore/IdStatus.txt | 31 +- gnu/usr.bin/perl/lib/unicore/IdType.txt | 125 +- .../perl/lib/unicore/VerticalOrientation.txt | 187 +- gnu/usr.bin/perl/lib/unicore/emoji/emoji.txt | 96 +- gnu/usr.bin/perl/lib/unicore/uni_keywords.pl | 2570 +-- gnu/usr.bin/perl/lib/vmsish.t | 4 +- gnu/usr.bin/perl/makedepend_file.SH | 176 + .../perl/os2/OS2/OS2-Process/Makefile.PL | 2 +- gnu/usr.bin/perl/os2/perlrexx.c | 108 +- gnu/usr.bin/perl/packsizetables.inc | 4 +- gnu/usr.bin/perl/perl_inc_macro.h | 42 +- gnu/usr.bin/perl/perl_siphash.h | 127 + gnu/usr.bin/perl/plan9/9front.patch | 46 + gnu/usr.bin/perl/plan9/aperl | 3 +- gnu/usr.bin/perl/plan9/exclude | 1 + gnu/usr.bin/perl/plan9/fndvers | 5 + gnu/usr.bin/perl/plan9/math.h | 12 + gnu/usr.bin/perl/plan9/plan9.c | 53 +- gnu/usr.bin/perl/plan9/setup.rc | 58 +- gnu/usr.bin/perl/plan9/uninstall.rc | 25 + gnu/usr.bin/perl/pod/perl5100delta.pod | 2 +- gnu/usr.bin/perl/pod/perl5120delta.pod | 2 +- gnu/usr.bin/perl/pod/perl5121delta.pod | 42 +- gnu/usr.bin/perl/pod/perl5122delta.pod | 6 +- gnu/usr.bin/perl/pod/perl5140delta.pod | 4 +- gnu/usr.bin/perl/pod/perl5160delta.pod | 2 +- gnu/usr.bin/perl/pod/perl5180delta.pod | 2 +- gnu/usr.bin/perl/pod/perl5184delta.pod | 4 +- gnu/usr.bin/perl/pod/perl5201delta.pod | 28 +- gnu/usr.bin/perl/pod/perl5202delta.pod | 48 +- gnu/usr.bin/perl/pod/perl5203delta.pod | 32 +- gnu/usr.bin/perl/pod/perl5220delta.pod | 265 +- gnu/usr.bin/perl/pod/perl5221delta.pod | 42 +- gnu/usr.bin/perl/pod/perl5222delta.pod | 62 +- gnu/usr.bin/perl/pod/perl5223delta.pod | 2 +- gnu/usr.bin/perl/pod/perl5224delta.pod | 2 +- gnu/usr.bin/perl/pod/perl5241delta.pod | 2 +- gnu/usr.bin/perl/pod/perl5242delta.pod | 2 +- gnu/usr.bin/perl/pod/perl5243delta.pod | 72 +- gnu/usr.bin/perl/pod/perl5244delta.pod | 8 +- gnu/usr.bin/perl/pod/perl5260delta.pod | 236 +- gnu/usr.bin/perl/pod/perl5261delta.pod | 30 +- gnu/usr.bin/perl/pod/perl5262delta.pod | 26 +- gnu/usr.bin/perl/pod/perl5263delta.pod | 10 +- gnu/usr.bin/perl/pod/perl5280delta.pod | 186 +- gnu/usr.bin/perl/pod/perl5281delta.pod | 8 +- gnu/usr.bin/perl/pod/perl5282delta.pod | 10 +- gnu/usr.bin/perl/pod/perl5300delta.pod | 118 +- gnu/usr.bin/perl/pod/perl5301delta.pod | 4 +- gnu/usr.bin/perl/pod/perl5320delta.pod | 90 +- gnu/usr.bin/perl/pod/perl5321delta.pod | 266 + gnu/usr.bin/perl/pod/perl5340delta.pod | 1459 ++ gnu/usr.bin/perl/pod/perl5341delta.pod | 153 + gnu/usr.bin/perl/pod/perldbmfilter.pod | 6 +- gnu/usr.bin/perl/pod/perldeprecation.pod | 48 +- gnu/usr.bin/perl/pod/perldocstyle.pod | 1118 ++ gnu/usr.bin/perl/pod/perlgov.pod | 112 +- gnu/usr.bin/perl/pod/perlinterp.pod | 16 +- gnu/usr.bin/perl/pod/perlnumber.pod | 10 +- gnu/usr.bin/perl/pod/perlpragma.pod | 6 +- gnu/usr.bin/perl/pod/perlreguts.pod | 72 +- gnu/usr.bin/perl/pod/perlsecpolicy.pod | 14 +- gnu/usr.bin/perl/qnx/qnx.c | 2 +- gnu/usr.bin/perl/reentr.h | 128 +- gnu/usr.bin/perl/regen/mph.pl | 1187 +- gnu/usr.bin/perl/sbox32_hash.h | 83 +- gnu/usr.bin/perl/sv_inline.h | 532 + gnu/usr.bin/perl/t/base/num.t | 13 +- gnu/usr.bin/perl/t/comp/opsubs.t | 15 +- gnu/usr.bin/perl/t/comp/parser_run.t | 6 +- gnu/usr.bin/perl/t/io/closepid.t | 4 - gnu/usr.bin/perl/t/io/getcwd.t | 13 +- gnu/usr.bin/perl/t/io/layers.t | 3 +- gnu/usr.bin/perl/t/io/msg.t | 76 + gnu/usr.bin/perl/t/io/openpid.t | 4 - gnu/usr.bin/perl/t/io/sem.t | 73 +- gnu/usr.bin/perl/t/io/shm.t | 23 +- gnu/usr.bin/perl/t/io/socketpair.t | 2 +- gnu/usr.bin/perl/t/japh/abigail.t | 3 - gnu/usr.bin/perl/t/lib/GH_15109/Apack.pm | 4 + gnu/usr.bin/perl/t/lib/GH_15109/Bpack.pm | 4 + gnu/usr.bin/perl/t/lib/GH_15109/Cpack.pm | 11 + gnu/usr.bin/perl/t/lib/GH_15109/Foo.pm | 9 + gnu/usr.bin/perl/t/lib/commonsense.t | 3 +- gnu/usr.bin/perl/t/lib/croak/regcomp | 5 - gnu/usr.bin/perl/t/lib/dbmt_common.pl | 2 +- gnu/usr.bin/perl/t/lib/feature/api | 48 + .../perl/t/lib/feature/bareword_filehandles | 498 + .../perl/t/lib/feature/multidimensional | 22 + gnu/usr.bin/perl/t/lib/h2ph.h | 6 +- gnu/usr.bin/perl/t/lib/warnings/2use | 51 + gnu/usr.bin/perl/t/lib/warnings/builtin | 123 + gnu/usr.bin/perl/t/lib/warnings/pad | 57 +- gnu/usr.bin/perl/t/lib/warnings/taint | 31 +- gnu/usr.bin/perl/t/op/arith2.t | 68 + gnu/usr.bin/perl/t/op/bool.t | 37 + gnu/usr.bin/perl/t/op/cmpchain.t | 2 +- gnu/usr.bin/perl/t/op/defer.t | 328 + gnu/usr.bin/perl/t/op/die_exit.t | 2 +- gnu/usr.bin/perl/t/op/for-many.t | 538 + .../perl/t/op/hash-clear-placeholders.t | 56 + gnu/usr.bin/perl/t/op/hashassign.t | 18 +- gnu/usr.bin/perl/t/op/isa.t | 9 +- gnu/usr.bin/perl/t/op/lfs.t | 2 +- gnu/usr.bin/perl/t/op/numify.t | 54 + gnu/usr.bin/perl/t/op/numify_chkflags.t | 129 + gnu/usr.bin/perl/t/op/svflags.t | 85 + gnu/usr.bin/perl/t/op/tiehash.t | 234 + gnu/usr.bin/perl/t/op/tr_latin1.t | 2 +- gnu/usr.bin/perl/t/op/try.t | 355 + gnu/usr.bin/perl/t/porting/authors.t | 16 +- gnu/usr.bin/perl/t/re/anyof.t | 4 + gnu/usr.bin/perl/t/re/fold_grind.pl | 24 +- gnu/usr.bin/perl/t/re/fold_grind_8.t | 2 +- gnu/usr.bin/perl/t/re/fold_grind_T.t | 2 +- gnu/usr.bin/perl/t/re/fold_grind_a.t | 2 +- gnu/usr.bin/perl/t/re/fold_grind_aa.t | 2 +- gnu/usr.bin/perl/t/re/fold_grind_d.t | 2 +- gnu/usr.bin/perl/t/re/fold_grind_l.t | 2 +- gnu/usr.bin/perl/t/re/fold_grind_u.t | 2 +- gnu/usr.bin/perl/t/re/opt.t | 276 + gnu/usr.bin/perl/t/run/runenv_hashseed.t | 320 + gnu/usr.bin/perl/t/win32/popen.t | 2 +- gnu/usr.bin/perl/t/win32/signal.t | 5 +- gnu/usr.bin/perl/t/win32/stat.t | 238 + gnu/usr.bin/perl/t/win32/symlink.t | 106 + gnu/usr.bin/perl/time64_config.h | 2 + gnu/usr.bin/perl/uni_keywords.h | 15119 ++++++++-------- gnu/usr.bin/perl/utils/corelist.PL | 2 +- gnu/usr.bin/perl/utils/cpan.PL | 2 +- gnu/usr.bin/perl/utils/instmodsh.PL | 2 +- gnu/usr.bin/perl/utils/json_pp.PL | 2 +- gnu/usr.bin/perl/utils/piconv.PL | 2 +- gnu/usr.bin/perl/utils/pod2html.PL | 2 +- gnu/usr.bin/perl/utils/prove.PL | 2 +- gnu/usr.bin/perl/utils/ptar.PL | 2 +- gnu/usr.bin/perl/utils/ptardiff.PL | 2 +- gnu/usr.bin/perl/utils/ptargrep.PL | 2 +- gnu/usr.bin/perl/utils/shasum.PL | 2 +- gnu/usr.bin/perl/utils/streamzip.PL | 2 +- gnu/usr.bin/perl/utils/xsubpp.PL | 2 +- gnu/usr.bin/perl/utils/zipdetails.PL | 2 +- gnu/usr.bin/perl/vms/munchconfig.c | 30 +- gnu/usr.bin/perl/win32/perlexe.rc | 2 - gnu/usr.bin/perl/win32/win32thread.h | 104 +- gnu/usr.bin/perl/zaphod32_hash.h | 4 +- 1145 files changed, 67720 insertions(+), 20827 deletions(-) create mode 100644 gnu/usr.bin/perl/.editorconfig create mode 100644 gnu/usr.bin/perl/CODE_OF_CONDUCT.md create mode 100644 gnu/usr.bin/perl/Porting/add-pod-file create mode 100644 gnu/usr.bin/perl/Porting/core-team.json create mode 100644 gnu/usr.bin/perl/Porting/docs-team-charter.pod create mode 100644 gnu/usr.bin/perl/Porting/perlgov-team-update create mode 100755 gnu/usr.bin/perl/Porting/updateAUTHORS.pl create mode 100644 gnu/usr.bin/perl/Porting/vote_admin_guide.pod create mode 100644 gnu/usr.bin/perl/builtin.c create mode 100644 gnu/usr.bin/perl/cpan/CPAN/PAUSE2022.pub create mode 100644 gnu/usr.bin/perl/cpan/CPAN/t/32pushyhttps.t create mode 100644 gnu/usr.bin/perl/cpan/Compress-Raw-Bzip2/bzip2-src/bzip2.patch create mode 100644 gnu/usr.bin/perl/cpan/Config-Perl-V/t/35_plv52910g.t create mode 100644 gnu/usr.bin/perl/cpan/Config-Perl-V/t/36_plv5300.t create mode 100644 gnu/usr.bin/perl/cpan/Config-Perl-V/t/37_plv53111qm.t create mode 100644 gnu/usr.bin/perl/cpan/Config-Perl-V/t/38_plv5320tld.t create mode 100644 gnu/usr.bin/perl/cpan/Digest-MD5/t/warns.t create mode 100644 gnu/usr.bin/perl/cpan/Digest/lib/Digest.pm create mode 100644 gnu/usr.bin/perl/cpan/Digest/lib/Digest/base.pm create mode 100644 gnu/usr.bin/perl/cpan/Digest/lib/Digest/file.pm create mode 100644 gnu/usr.bin/perl/cpan/Encode/t/Unicode_trailing_nul.t create mode 100644 gnu/usr.bin/perl/cpan/Encode/t/utf32warnings.t create mode 100644 gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS390.pm create mode 100644 gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/04-xs-rpath-darwin.t create mode 100644 gnu/usr.bin/perl/cpan/ExtUtils-PL2Bat/lib/ExtUtils/PL2Bat.pm create mode 100644 gnu/usr.bin/perl/cpan/ExtUtils-PL2Bat/t/make_executable.t create mode 100644 gnu/usr.bin/perl/cpan/HTTP-Tiny/corpus/get-23.txt create mode 100644 gnu/usr.bin/perl/cpan/HTTP-Tiny/corpus/post-02.txt create mode 100644 gnu/usr.bin/perl/cpan/HTTP-Tiny/corpus/put-06.txt create mode 100644 gnu/usr.bin/perl/cpan/HTTP-Tiny/corpus/put-07.txt create mode 100644 gnu/usr.bin/perl/cpan/HTTP-Tiny/corpus/put-08.txt create mode 100644 gnu/usr.bin/perl/cpan/IO-Compress/t/113issues.t create mode 100644 gnu/usr.bin/perl/cpan/IO-Compress/t/files/testfile1.odt create mode 100644 gnu/usr.bin/perl/cpan/MIME-Base64/lib/MIME/Base64.pm create mode 100644 gnu/usr.bin/perl/cpan/MIME-Base64/lib/MIME/QuotedPrint.pm create mode 100644 gnu/usr.bin/perl/cpan/MIME-Base64/t/base64url.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/_bin_parts_to_lib_parts.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/_bin_str_to_str_parts.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/_dec_parts_to_lib_parts.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/_dec_str_to_str_parts.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/_hex_str_to_str_parts.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/_oct_str_to_str_parts.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/bigintc-import.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/bpi-mbf.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/bpi-mbi.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/bpow-mbf.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/bpow-mbi.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/calling-constant.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/calling-lib1.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/calling-lib2.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/const-mbf.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/const-mbi.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/fparts-mbf.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/fparts-mbi.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/from_base_num-mbi.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/lib_load-mbf-mbi.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/lib_load-mbi-mbf.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/new-mbi.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/to_base_num-mbi.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/use_lib5.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigInt/t/use_lib6.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigRat/t/badd-mbr.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigRat/t/binv-mbr.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigRat/t/bnok-mbr.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigRat/t/const-mbr.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigRat/t/downgrade.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigRat/t/dparts-mbr.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigRat/t/fparts-mbr.t create mode 100644 gnu/usr.bin/perl/cpan/Math-BigRat/t/new-mbr.t create mode 100644 gnu/usr.bin/perl/cpan/PerlIO-via-QuotedPrint/t/changes.t create mode 100644 gnu/usr.bin/perl/cpan/PerlIO-via-QuotedPrint/t/critic.t create mode 100644 gnu/usr.bin/perl/cpan/PerlIO-via-QuotedPrint/t/pod.t create mode 100644 gnu/usr.bin/perl/cpan/PerlIO-via-QuotedPrint/t/pod_coverage.t create mode 100644 gnu/usr.bin/perl/cpan/Pod-Checker/t/pod/podname.t create mode 100644 gnu/usr.bin/perl/cpan/Pod-Simple/t/lib/helpers.pm create mode 100644 gnu/usr.bin/perl/cpan/Scalar-List-Utils/t/mesh.t create mode 100644 gnu/usr.bin/perl/cpan/Scalar-List-Utils/t/undefined-block.t create mode 100644 gnu/usr.bin/perl/cpan/Scalar-List-Utils/t/zip.t create mode 100644 gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/InterceptResult.pm create mode 100644 gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/InterceptResult/Event.pm create mode 100644 gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/InterceptResult/Facet.pm create mode 100644 gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/InterceptResult/Hub.pm create mode 100644 gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/API/InterceptResult/Squasher.pm create mode 100644 gnu/usr.bin/perl/cpan/Test-Simple/t/Legacy/Regression/870-experimental-warnings.t create mode 100644 gnu/usr.bin/perl/cpan/Test-Simple/t/Legacy/Regression/is_capture.t create mode 100644 gnu/usr.bin/perl/cpan/Test-Simple/t/Test2/modules/API/InterceptResult.t create mode 100644 gnu/usr.bin/perl/cpan/Test-Simple/t/Test2/modules/API/InterceptResult/Event.t create mode 100644 gnu/usr.bin/perl/cpan/Test-Simple/t/Test2/modules/API/InterceptResult/Squasher.t create mode 100644 gnu/usr.bin/perl/cpan/Test-Simple/t/regression/862-intercept_tb_todo.t create mode 100644 gnu/usr.bin/perl/cpan/Test-Simple/t/regression/skip_reason_object_ipc.t create mode 100644 gnu/usr.bin/perl/cpan/Text-Balanced/t/94_changes.t create mode 100644 gnu/usr.bin/perl/cpan/Text-Balanced/t/95_critic.t create mode 100644 gnu/usr.bin/perl/cpan/Text-Balanced/t/96_pmv.t create mode 100644 gnu/usr.bin/perl/cpan/Text-Balanced/t/97_pod.t create mode 100644 gnu/usr.bin/perl/cpan/Text-Balanced/t/98_pod_coverage.t create mode 100644 gnu/usr.bin/perl/cpan/Text-Tabs/t/lib/ok.pl create mode 100644 gnu/usr.bin/perl/cpan/Text-Tabs/t/undef.t create mode 100644 gnu/usr.bin/perl/cpan/Unicode-Collate/t/khitan.t create mode 100644 gnu/usr.bin/perl/cpan/Win32/t/Privileges.t create mode 100644 gnu/usr.bin/perl/cpan/autodie/t/exception_nonref.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/gentest/backend.sh create mode 100644 gnu/usr.bin/perl/cpan/bignum/gentest/scope-nested-const.sh create mode 100644 gnu/usr.bin/perl/cpan/bignum/gentest/scope-nested-hex-oct.sh create mode 100644 gnu/usr.bin/perl/cpan/bignum/lib/Math/BigRat/Trace.pm create mode 100644 gnu/usr.bin/perl/cpan/bignum/lib/bigfloat.pm create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/backend-gmp-bigfloat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/backend-gmp-bigint.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/backend-gmp-bignum.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/backend-gmp-bigrat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/backend-pari-bigfloat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/backend-pari-bigint.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/backend-pari-bignum.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/backend-pari-bigrat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/bigfloat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/const-bigfloat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/const-bigint.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/const-bignum.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/const-bigrat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/down-mbi-up-mbf.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/down-mbi-up-mbr.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/down-mbi-up-undef.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/down-undef-up-mbf.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/e_pi-bigfloat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/e_pi-bigint.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/e_pi-bignum.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/e_pi-bigrat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/import-bigfloat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/import-bigint.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/import-bignum.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/import-bigrat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/infnan-bigfloat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/infnan-bigint.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/infnan-bignum.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/infnan-bigrat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/option_a-bignum.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/option_l-bigfloat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/option_l-bigint.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/option_l-bignum.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/option_l-bigrat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/option_p-bignum.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/scope-bigfloat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/scope-bigint.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/scope-bignum.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/scope-bigrat.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/scope-nested-const.t create mode 100644 gnu/usr.bin/perl/cpan/bignum/t/scope-nested-hex-oct.t create mode 100644 gnu/usr.bin/perl/dist/Attribute-Handlers/t/caller.t create mode 100644 gnu/usr.bin/perl/dist/Data-Dumper/Makefile.PL create mode 100644 gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/XSBroken.xs create mode 100644 gnu/usr.bin/perl/dist/IO/t/io_sock_errstr.t create mode 100644 gnu/usr.bin/perl/dist/Locale-Maketext/t/94_denylist.t create mode 100644 gnu/usr.bin/perl/dist/Locale-Maketext/t/95_allowlist.t create mode 100644 gnu/usr.bin/perl/ext/B/t/B/success.pm create mode 100644 gnu/usr.bin/perl/ext/B/t/invlist.t create mode 100644 gnu/usr.bin/perl/ext/B/t/optree_for.t create mode 100644 gnu/usr.bin/perl/ext/GDBM_File/t/count.t create mode 100644 gnu/usr.bin/perl/ext/GDBM_File/t/dump.t create mode 100644 gnu/usr.bin/perl/ext/GDBM_File/t/opt.t create mode 100644 gnu/usr.bin/perl/ext/GDBM_File/t/snapshot.t create mode 100644 gnu/usr.bin/perl/ext/POSIX/t/fenv.t create mode 100644 gnu/usr.bin/perl/ext/POSIX/t/iv_const.t create mode 100644 gnu/usr.bin/perl/ext/Pod-Html/corpus/perlpodspec-copy.pod create mode 100644 gnu/usr.bin/perl/ext/Pod-Html/corpus/perlvar-copy.pod create mode 100644 gnu/usr.bin/perl/ext/Pod-Html/lib/Pod/Html/Util.pm create mode 100644 gnu/usr.bin/perl/ext/Pod-Html/t/anchorify-536.t create mode 100644 gnu/usr.bin/perl/ext/Pod-Html/t/lib/Testing.pm create mode 100644 gnu/usr.bin/perl/ext/XS-APItest/t/boolean-thr.t create mode 100644 gnu/usr.bin/perl/ext/XS-APItest/t/boolean.t create mode 100644 gnu/usr.bin/perl/ext/XS-APItest/t/delimcpy.t create mode 100644 gnu/usr.bin/perl/ext/XS-APItest/t/my_strtod.t create mode 100644 gnu/usr.bin/perl/ext/XS-APItest/t/sv_numeq.t create mode 100644 gnu/usr.bin/perl/ext/XS-APItest/t/sv_streq.t create mode 100644 gnu/usr.bin/perl/lib/builtin.pm create mode 100644 gnu/usr.bin/perl/lib/builtin.t create mode 100644 gnu/usr.bin/perl/lib/perl5db/t/gh-17661 create mode 100644 gnu/usr.bin/perl/lib/perl5db/t/gh-17661b create mode 100644 gnu/usr.bin/perl/lib/perl5db/t/test-a-statement-3 create mode 100644 gnu/usr.bin/perl/makedepend_file.SH create mode 100644 gnu/usr.bin/perl/perl_siphash.h create mode 100644 gnu/usr.bin/perl/plan9/9front.patch create mode 100644 gnu/usr.bin/perl/plan9/math.h create mode 100755 gnu/usr.bin/perl/plan9/uninstall.rc create mode 100644 gnu/usr.bin/perl/pod/perl5321delta.pod create mode 100644 gnu/usr.bin/perl/pod/perl5340delta.pod create mode 100644 gnu/usr.bin/perl/pod/perl5341delta.pod create mode 100644 gnu/usr.bin/perl/pod/perldocstyle.pod create mode 100644 gnu/usr.bin/perl/sv_inline.h create mode 100644 gnu/usr.bin/perl/t/io/msg.t create mode 100644 gnu/usr.bin/perl/t/lib/GH_15109/Apack.pm create mode 100644 gnu/usr.bin/perl/t/lib/GH_15109/Bpack.pm create mode 100644 gnu/usr.bin/perl/t/lib/GH_15109/Cpack.pm create mode 100644 gnu/usr.bin/perl/t/lib/GH_15109/Foo.pm create mode 100644 gnu/usr.bin/perl/t/lib/feature/api create mode 100644 gnu/usr.bin/perl/t/lib/feature/bareword_filehandles create mode 100644 gnu/usr.bin/perl/t/lib/feature/multidimensional create mode 100644 gnu/usr.bin/perl/t/lib/warnings/builtin create mode 100644 gnu/usr.bin/perl/t/op/arith2.t create mode 100644 gnu/usr.bin/perl/t/op/bool.t create mode 100644 gnu/usr.bin/perl/t/op/defer.t create mode 100644 gnu/usr.bin/perl/t/op/for-many.t create mode 100644 gnu/usr.bin/perl/t/op/hash-clear-placeholders.t create mode 100644 gnu/usr.bin/perl/t/op/numify.t create mode 100644 gnu/usr.bin/perl/t/op/numify_chkflags.t create mode 100644 gnu/usr.bin/perl/t/op/svflags.t create mode 100644 gnu/usr.bin/perl/t/op/tiehash.t create mode 100644 gnu/usr.bin/perl/t/op/try.t create mode 100644 gnu/usr.bin/perl/t/re/opt.t create mode 100644 gnu/usr.bin/perl/t/run/runenv_hashseed.t create mode 100644 gnu/usr.bin/perl/t/win32/stat.t create mode 100644 gnu/usr.bin/perl/t/win32/symlink.t diff --git a/gnu/usr.bin/perl/.editorconfig b/gnu/usr.bin/perl/.editorconfig new file mode 100644 index 00000000000..a7417d0bbe2 --- /dev/null +++ b/gnu/usr.bin/perl/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[**/*.[ch]] +charset = utf-8 +indent_style = space +indent_size = 4 +tab_width = 8 +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/gnu/usr.bin/perl/.travis.yml b/gnu/usr.bin/perl/.travis.yml index 9115d30b44b..51f83e1f96a 100644 --- a/gnu/usr.bin/perl/.travis.yml +++ b/gnu/usr.bin/perl/.travis.yml @@ -21,12 +21,10 @@ env: # threads often cause build issues - CONFIGURE_ARGS='-Uusethreads' - CONFIGURE_ARGS='-Dusethreads' - # it's easy to miss dVAR - - CONFIGURE_ARGS='-DPERL_GLOBAL_STRUCT_PRIVATE' - # test scripts can be sensitive to PERL_UNICODE, and check long doubles - - CONFIGURE_ARGS='-Duseshrplib -Dusesitecustomize -Duselongdouble' PERL_UNICODE='' LANG='en_US.UTF-8' - # we've rarely had a problem with non-Englush locales, and exercise quadmath - - CONFIGURE_ARGS='-Duseshrplib -Dusequadmath -Dusecbacktrace -Dusethreads' PERL_UNICODE='' LANG='de_DE.UTF-8' + # check long doubles + - CONFIGURE_ARGS='-Duseshrplib -Dusesitecustomize -Duselongdouble' + # exercise quadmath + - CONFIGURE_ARGS='-Duseshrplib -Dusequadmath -Dusecbacktrace -Dusethreads' matrix: fast_finish: true diff --git a/gnu/usr.bin/perl/CODE_OF_CONDUCT.md b/gnu/usr.bin/perl/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..d41ac174baf --- /dev/null +++ b/gnu/usr.bin/perl/CODE_OF_CONDUCT.md @@ -0,0 +1,20 @@ +# Code of Conduct + +Development of the Perl 5 language is covered by the [Standards of +Conduct](https://perldoc.perl.org/perlpolicy#STANDARDS-OF-CONDUCT) in the +[perlpolicy](https://perldoc.perl.org/perlpolicy) document. (See +[pod/perlpolicy.pod](pod/perlpolicy.pod) for source version.) + +The overarching rule is that participants are expected to **be civil**. +It is not enough to be factual. You must also be civil. + +The Standard of Conduct falls under the authority of the +[Perl Steering Council](https://perldoc.perl.org/perlgov#The-Steering-Council) +and covers activities on the perl5-porters mailing list, the +GitHub repository issue/pull-request tracker, and any other venues +directly organized on behalf the Perl Steering Council. + +**NOTE**: The Perl Steering Council operates independently of +[The Perl Foundation](https://www.perlfoundation.org/) and other +Perl community organizations. Consult their websites for information on +other community codes of conduct. diff --git a/gnu/usr.bin/perl/Porting/GitUtils.pm b/gnu/usr.bin/perl/Porting/GitUtils.pm index f1b4354dfd4..6377b6b27bb 100644 --- a/gnu/usr.bin/perl/Porting/GitUtils.pm +++ b/gnu/usr.bin/perl/Porting/GitUtils.pm @@ -1,4 +1,5 @@ #!/usr/bin/perl +package GitUtils; use strict; use warnings; use POSIX qw(strftime); diff --git a/gnu/usr.bin/perl/Porting/Maintainers.pm b/gnu/usr.bin/perl/Porting/Maintainers.pm index 20ed4f70555..5ffcfb28c8f 100644 --- a/gnu/usr.bin/perl/Porting/Maintainers.pm +++ b/gnu/usr.bin/perl/Porting/Maintainers.pm @@ -21,7 +21,7 @@ our @EXPORT_OK = qw(%Modules %Maintainers show_results process_options files_to_modules finish_tap_output reload_manifest); -our $VERSION = 0.13; +our $VERSION = 0.14; require Exporter; @@ -355,7 +355,7 @@ sub duplicated_maintainers { sub warn_maintainer { my $name = shift; - ok($files{$name}, "$name has a maintainer (see Porting/Maintainer.pl)"); + ok($files{$name}, "$name has a maintainer (see Porting/Maintainers.pl)"); } sub missing_maintainers { diff --git a/gnu/usr.bin/perl/Porting/acknowledgements.pl b/gnu/usr.bin/perl/Porting/acknowledgements.pl index f04dac5614c..c0c70860118 100644 --- a/gnu/usr.bin/perl/Porting/acknowledgements.pl +++ b/gnu/usr.bin/perl/Porting/acknowledgements.pl @@ -125,7 +125,7 @@ sub _round { # version sub changes_files { my $output = qx(git diff --shortstat $since_until); - my $q = ($^O =~ /^(?:MSWin32|NetWare|VMS)$/io) ? '"' : "'"; + my $q = ($^O =~ /^(?:MSWin32|VMS)$/io) ? '"' : "'"; my @filenames = qx(git diff --numstat $since_until | $^X -anle ${q}next if m{^dist/Module-CoreList} or not /\\.(?:pm|c|h|t)\\z/; print \$F[2]$q); chomp @filenames; my $output_code_changed = qx# git diff --shortstat $since_until -- @filenames #; diff --git a/gnu/usr.bin/perl/Porting/add-pod-file b/gnu/usr.bin/perl/Porting/add-pod-file new file mode 100644 index 00000000000..871b5cc265a --- /dev/null +++ b/gnu/usr.bin/perl/Porting/add-pod-file @@ -0,0 +1,244 @@ +#!/usr/bin/perl +use 5.14.0; +use warnings; +use Carp; +use File::Spec; +use Getopt::Long; +use Module::Metadata; +require "./Porting/manifest_lib.pl"; + +=head1 NAME + +add-pod-file - Utility to add new F file to core distribution + +=head1 USAGE + +After C has been run, call from top level of Perl 5 core +distribution: + + perl Porting/add-pod-file \ + --stub= --section= --verbose + +=head1 DESCRIPTION + +This is a program which I be helpful when a committer has to add a new +F<*.pod> file in the F directory. + +=head2 Prerequisites + +This program assumes that committer has taken the following steps (in the +order listed): + +=over 4 + +=item 1 You have run F. + +This is to guarantee that all files are properly positioned. + +=item 2 You have placed a well-formatted F<.pod> file into the F directory. + +In the C section of this file there is a single non-blank line which +consists of a string in the format C, where C is the +basename of the file without the C<.pod> suffix and C is the short +description of the file. For example, a new file whose path is +F must have a C section like this: + + =head1 NAME + + perlphonypod - This is phony POD + +=back + +F files need entries in multiple locations to keep F happy. This program automates the formulation of I of +those entries, but will need some assistance from the committer to work +properly. The committer will have to make a reasonable choice as to which +section of F the new F<.pod> file should be listed under. +The eligible sections are shown in the following table: + + Command-Line Value Section in pod/perl.pod + + O => 'Overview', + T => 'Tutorials', + R => 'Reference Manual', + I => 'Internals and C Language Interface', + H => 'History', + M => 'Miscellaneous', + L => 'Language-Specific', + P => 'Platform-Specific', + +For a first pass, we'll put the new entry at the end of the C<^=head2> section +specified by the committer with the single-initial provided for command-line +switch C
. + +=head2 Testing this program + +=over 4 + +=item 1 Run F and F in the source tree. + +=item 2 Create a well formatted F<.pod> file somewhere on your system. + +=item 3 Copy it into the source tree under F. + +=item 4 Call the program as in L above. + +=item 5 Call F and examine results. + +=item 6 Run F. + +=back + +=head1 BUGS + +When the argument provided to the C<--section> command-line switch is C

(for platform-specific), F is not getting updated -- but it's not clear whether it I to be updated. + +=cut + +my @man_sections = ( + O => 'Overview', + T => 'Tutorials', + R => 'Reference Manual', + I => 'Internals and C Language Interface', + H => 'History', + M => 'Miscellaneous', + L => 'Language-Specific', + P => 'Platform-Specific', +); + +my @man_section_abbrevs = (); +my $man_sections_str = ''; +for (my $i=0; $i<= $#man_sections; $i+=2) { + my $j = $i+1; + push @man_section_abbrevs, $man_sections[$i]; + $man_sections_str .= "\t$man_sections[$i] => $man_sections[$j]\n"; +} +my %man_sections_seen = map { $_ => 1 } @man_section_abbrevs; +my $man_sections = { @man_sections }; + +my ($stub, $section, $verbose) = ('') x 3; +GetOptions( + "stub=s" => \$stub, + "section=s" => \$section, + "verbose" => \$verbose, +) or croak("Error in command line arguments to add-pod-file.pl\n"); +croak "$0: Must provide value for command-line switch 'stub'" + unless length($stub); +croak "$0: Must provide value for command-line switch 'section'" + unless length($section); +my $section_croak = "$0: Value for command-line switch must be one of @man_section_abbrevs\n"; +$section_croak .= " Select one initial from:\n$man_sections_str"; +croak $section_croak unless $man_sections_seen{$section}; + +my $newpodfile = "$stub.pod"; +my $newpodpath = File::Spec->catfile('pod', $newpodfile); +croak "Unable to locate new file '$newpodpath'" unless -f $newpodpath; +my $thispodchecker = File::Spec->catfile(qw|cpan Pod-Checker podchecker|); +croak "Cannot locate 'podchecker' within this checkout; have you called 'make'?" + unless -f $thispodchecker; + +say "Step 1: Basic test of validity of POD in $newpodpath" if $verbose; + +system(qq|$^X $thispodchecker $newpodpath|) + and croak "$newpodpath has POD errors; correct before proceeding further"; +my $data = Module::Metadata->new_from_file($newpodpath, collect_pod => 1, decode_pod => 1); + +my $regex = qr/\A\s*(?:\S+\s+)+?-+\s+(.+?)\s*\z/s; +my ($abstract) = ($data->pod('NAME') // '') =~ $regex + or croak "Could not parse abstract from `=head1 NAME` in $newpodpath"; + +system(qq|git add $newpodpath|) and croak "Unable to 'git add'"; + +# Step 2: Insert entry for $newpodpath into MANIFEST + +my $manifest = 'MANIFEST'; +say "Step 2: Insert entry for $newpodpath into $manifest" if $verbose; + +open(my $IN, '<', $manifest) + or croak "Can't open $manifest for reading"; +my @manifest_orig = <$IN>; +close($IN) or croak "Can't close $manifest after reading"; +chomp(@manifest_orig); + +my (@before_pod, @pod, @after_pod); +my $seen_pod = 0; +while (my $l = shift(@manifest_orig)) { + if (! $seen_pod and $l !~ m{^pod\/}) { + push @before_pod, $l; + } + elsif ($l =~ m{^pod\/}) { + push @pod, $l; + $seen_pod++; + } + else { + push @after_pod, $l; + } +} + +say "Inserting entry for '$newpodpath' into $manifest; text will be '$abstract'" if $verbose; +my $new_manifest_entry = "$newpodpath\t\t$abstract"; +my @new_pod = sort_manifest(@pod, $new_manifest_entry); + +open(my $OUT, '>', $manifest) + or croak "Can't open $manifest for writing"; +binmode($OUT); +say $OUT join("\n", @before_pod, @new_pod, @after_pod); +close($OUT) or croak "Can't close $manifest after writing"; + +my $perlpod = File::Spec->catfile(qw|pod perl.pod|); + +say "Step 3: Add entry to $perlpod" if $verbose; + +# Read the existing pod/perl.pod into memory. +# Divide it into chunks before the selected section, the head2 of the selected +# section, the selected section, and what comes after the selected section. +# Add the stub and abstract for the new .pod file to the end of the selected +# section. (Manually reposition to taste.) + +open(my $IN1, '<', $perlpod) + or croak "Can't open $perlpod for reading"; +my $perlpod_str; +{ + local $/; + $perlpod_str = <$IN1>; +} +close($IN1) or croak "Can't close $perlpod after reading"; + +my $section_head = "=head2 $man_sections->{$section}"; +my @chunks = split $section_head, $perlpod_str; +chomp $chunks[0]; # So we can use 'say' consistently later on + +my @balance = split /\n/, $chunks[1]; +shift @balance; # $chunks[1] begins with a newline which we won't need to output +my (@target_section, @after_section); + +my $target = \@target_section; +for my $l (@balance) { + $target = \@after_section if $l =~ m/^=(head2|for)/; + push @$target, $l; +} + +push @target_section, " $stub\t\t$abstract"; + +open(my $OUT1, '>', $perlpod) + or croak "Can't open $perlpod for writing"; +say $OUT1 $chunks[0]; +say $OUT1 $section_head; +say $OUT1 join("\n" => @target_section), "\n"; +say $OUT1 join("\n" => @after_section), "\n"; +close $OUT1 or croak "Can't close $perlpod after writing"; + +my $podmak_command = './perl -Ilib Porting/pod_rules.pl --build-podmak --verbose'; +say "Step 4: Running '$podmak_command' to update win32/pod.mak." + if $verbose; + +system($podmak_command) and croak "'$podmak_command' failed"; + +system(qq|git add MANIFEST pod/perl.pod win32/pod.mak|) + and croak "Unable to git-add three updated files"; + +if ($verbose) { + say "Call 'git diff --staged' and inspect modified files; correct as needed."; + say "Then run 'make test_porting'."; + say "Then say 'git commit'."; +} diff --git a/gnu/usr.bin/perl/Porting/config_h.pl b/gnu/usr.bin/perl/Porting/config_h.pl index 8ac15824a2a..935834990d6 100755 --- a/gnu/usr.bin/perl/Porting/config_h.pl +++ b/gnu/usr.bin/perl/Porting/config_h.pl @@ -6,7 +6,7 @@ # This script is run just after metaconfig, and it # is run ONLY ONCE. Not to be used afterwards # -# Copyright (C) 2005-2012 by H.Merijn Brand (m)'12 [22-09-2012] +# Copyright (C) 2005-2020 by H.Merijn Brand (m)'20 [23-08-2020] # # You may distribute under the terms of either the GNU General Public # License or the Artistic License, as specified in the README file. @@ -15,14 +15,13 @@ use strict; use warnings; my ($cSH, $ch, @ch, %ch) = ("config_h.SH"); -open $ch, '<', $cSH or die "Cannot open $cSH: $!\n"; +open $ch, "<", $cSH or die "Cannot open $cSH: $!\n"; { local $/ = "\n\n"; @ch = <$ch>; close $ch; } -sub ch_index () -{ +sub ch_index { %ch = (); foreach my $ch (0 .. $#ch) { while ($ch[$ch] =~ m{^/\* ([A-Z]\w+)}gm) { @@ -45,14 +44,14 @@ my $changed; do { $changed = 0; foreach my $sym (keys %dep) { - ch_index; + ch_index (); foreach my $dep (@{$dep{$sym}}) { print STDERR "Check if $sym\t($ch{$sym}) precedes $dep\t($ch{$dep})\n"; $ch{$sym} < $ch{$dep} and next; my $ch = splice @ch, $ch{$sym}, 1; splice @ch, $ch{$dep}, 0, $ch; $changed++; - ch_index; + ch_index (); } } } while ($changed); @@ -65,19 +64,20 @@ for (grep m{echo .Extracting \$CONFIG_H} => @ch) { qq{*)}, ""; s{^(?=echo .Extracting)}{$case}m; } -push @ch, ";;\nesac\n"; +unless ($ch[0] =~ m/THIS IS A GENERATED FILE/) { + unshift @ch, join "\n" => + "#!/bin/sh", + "#", + "# THIS IS A GENERATED FILE", + "# DO NOT HAND-EDIT", + "#", + "# See Porting/config_h.pl", + "", + ""; + push @ch, ";;\nesac\n"; + } -open $ch, '>', $cSH or die "Cannot write $cSH: $!\n"; -print $ch <", $cSH or die "Cannot write $cSH: $!\n"; print $ch @ch; close $ch; diff --git a/gnu/usr.bin/perl/Porting/core-team.json b/gnu/usr.bin/perl/Porting/core-team.json new file mode 100644 index 00000000000..56f443b37c2 --- /dev/null +++ b/gnu/usr.bin/perl/Porting/core-team.json @@ -0,0 +1,35 @@ +{ + "inactive": [ + "ams@toroid.org", + "doughera@lafayette.edu", + "jan@jandubois.com", + "jesse@fsck.com" + ], + "active": [ + "book@cpan.org", + "chris@bingosnet.co.uk", + "cpan@corion.net", + "craigberry@mac.com", + "davem@iabyn.com", + "ether@cpan.org", + "exodist7@gmail.com", + "fawaka@gmail.com", + "hv@crypt.org", + "ilmari@ilmari.org", + "jkeenan@cpan.org", + "jmac@jmac.org", + "khw@cpan.org", + "leonerd@leonerd.org.uk", + "neilb@neilb.org", + "nick@ccl4.org", + "nicolas@atoomic.org", + "perl5@tux.freedom.nl", + "rjbs@semiotic.systems", + "steve.m.hay@googlemail.com", + "stuart@perlfoundation.org", + "toddr@cpanel.net", + "tony@develop-help.com", + "wolfsage@gmail.com", + "xdg@xdg.me" + ] +} diff --git a/gnu/usr.bin/perl/Porting/docs-team-charter.pod b/gnu/usr.bin/perl/Porting/docs-team-charter.pod new file mode 100644 index 00000000000..4a3c4619f4f --- /dev/null +++ b/gnu/usr.bin/perl/Porting/docs-team-charter.pod @@ -0,0 +1,121 @@ +=head1 NAME + +docs-team-charter - Perl Documentation Team Charter + +=head1 SUMMARY + +This is the founding charter for the Perl Documentation Team. + +The Perl project has a documentation sub-project, responsible for +maintaining the quality and consistency of Perl's core documentation. + +This project is managed by the Documentation Team (a.k.a. "Docs Team"). + +=head2 Mission and Duties + +=head3 Mission statement + +The Perl Documentation Team oversees the quality, accessibility, and +maintainability of Perl's core documentation. + +=head3 The mission in-depth + +A few definitions of terms appearing in the mission statement: + +=over + +=item Perl's core documentation + +By "core documentation", we mean all the documentation that ships with +Perl itself: stand-alone documents, function reference sections, and +documentation attached to standard modules. + +Even though much of that standard module documentation doesn't exist +within Perl's core source distribution, the Docs Team still monitors +their state on CPAN, and actively makes recommendations to improve them +as needed. + +=item Quality + +The obvious job. The Docs Team is responsible for the core docs staying +up-to-date, consistently readable, and correct. + +=item Accessibility + +The Docs Team makes sure that Perl's core docs are discoverable and +navigable by all the language's users, new and old, across all relevant +media. This includes the web. + +=item Maintainability + +The Docs team treats the core docs as a proper FOSS concern, within the +larger Perl project. + +This includes enthusiastically welcoming patches from the community, and +making it easy for any interested reader to discover how they can +contribute to the documentation project. It also includes working with +Core Team to make sure that docs stay synchronized with new Perl +releases. + +=back + +=head3 Duties + +=over + +=item * + +Actively reviewing and improving Perl's existing collection of core +documentation. This includes revising this documentation as needed for +the sake of style, consistency, and modern best practices. + +=item * + +Assisting Perl contributors in making sure that any core documentation +they add or update adheres to established standards. + +=item * + +Encouraging the community to contribute to Perl's documentation, making +the process of submitting contributions clear and rewarding. + +=item * + +Fostering projects to improve the accessibility of Perl's core +documentation, across various media. + +=back + +=head2 Personnel + +The Docs Team consists of one manager and any number of other volunteers. + +The Docs Team manager is appointed by the Perl Steering Council, and may be +removed or replaced by them as well. + +Both the manager and the Steering Council may add volunteers to or remove +volunteers from the Docs Team. + +=head2 Resources + +=head3 Mailing list + +The Docs Team will maintain a publicly-archived mailing list for discussion of +its work. The mailing list will be the medium of record for recording team +plans and decisions. It must be possible for the Steering Council to transfer +the rights to the list when a change in Docs Team management occurs. + +The current mailing list can be found at I<< to be determined >>. + +=head3 Real-time chat + +The team also collaborates on the C<< #docs >> channel on irc.perl.org. The +manager may migrate this to other chat systems in the future at their own +discretion. + +=head3 Funding + +When appropriate, the team will seek funding for specific projects or materials +via grants from The Perl Foundation or similar sources, just as with any other +Perl infrastructure project. All Docs Team members otherwise serve on a +volunteer basis. diff --git a/gnu/usr.bin/perl/Porting/exercise_makedef.pl b/gnu/usr.bin/perl/Porting/exercise_makedef.pl index 3b2d1b3512a..d8d2d7b9ba9 100644 --- a/gnu/usr.bin/perl/Porting/exercise_makedef.pl +++ b/gnu/usr.bin/perl/Porting/exercise_makedef.pl @@ -48,7 +48,7 @@ $SIG{INT} = sub { die }; # Trigger END processing close $out or die "Can't close $mpm: $!"; } -my @args = (platform => [map {"PLATFORM=$_"} qw(aix win32 os2 netware vms test)], +my @args = (platform => [map {"PLATFORM=$_"} qw(aix win32 os2 vms test)], cflags => ['', 'CCFLAGS=-Dperl=rules -Dzzz'], Deq => ['', '-Dbeer=foamy'], D => ['', '-DPERL_IMPLICIT_SYS'], diff --git a/gnu/usr.bin/perl/Porting/manicheck b/gnu/usr.bin/perl/Porting/manicheck index 47bb2df381c..6db1fd21204 100644 --- a/gnu/usr.bin/perl/Porting/manicheck +++ b/gnu/usr.bin/perl/Porting/manicheck @@ -4,28 +4,55 @@ # a) files listed in MANIFEST which don't exist # b) files which exist but which aren't in MANIFEST -use strict; +use v5.14; use warnings; use File::Find; +use Getopt::Long; +use constant SKIP => 125; + +my $exitstatus; +GetOptions('exitstatus!', \$exitstatus) + or die "$0 [--exitstatus]"; + +my %files; +my $missing = 0; +my $bonus = 0; open my $fh, '<', 'MANIFEST' or die "Can't read MANIFEST: $!\n"; -my @files = map { (split)[0] } <$fh>; -close $fh; -for (@files) { - print "$_ from MANIFEST doesn't exist\n" if ! -f; +for my $line (<$fh>) { + my ($file) = $line =~ /^(\S+)/; + ++$files{$file}; + next if -f $file; + ++$missing; + print "$file from MANIFEST doesn't exist\n"; } -my %files = map { $_ => 1 } @files; +close $fh; + find { wanted => sub { - my $x = $File::Find::name; $x =~ s/^..//; return if -d; return if $_ eq '.mailmap'; return if $_ eq '.gitignore'; return if $_ eq '.gitattributes'; return if $_ eq '.git_patch'; + + my $x = $File::Find::name =~ s!^\./!!r; return if $x =~ /^\.git\b/; return if $x =~ m{^\.github/}; - print "$x\t\tnot in MANIFEST\n" if !$files{$x}; + return if $files{$x}; + ++$bonus; + print "$x\t\tnot in MANIFEST\n"; }, }, "."; +my $exitcode = $exitstatus ? $missing + $bonus : 0; + +# We can't (meaningfully) exit with codes above 255, so we're going to have to +# clamp them to some range whatever we do. So as we need the code anyway, use +# 124 as our maximum instead, and then we can run as a useful git bisect run +# script if needed... + +$exitcode = SKIP - 1 + if $exitcode > SKIP; + +exit $exitcode; diff --git a/gnu/usr.bin/perl/Porting/manifest_lib.pl b/gnu/usr.bin/perl/Porting/manifest_lib.pl index 0b63046056e..95d49be9cd3 100644 --- a/gnu/usr.bin/perl/Porting/manifest_lib.pl +++ b/gnu/usr.bin/perl/Porting/manifest_lib.pl @@ -12,6 +12,8 @@ Porting/manifest_lib.pl - functions for managing manifests =head1 DESCRIPTION +This file makes available one function, C. + =head2 C Treats its arguments as (chomped) lines from a MANIFEST file, and returns that @@ -42,7 +44,8 @@ sub sort_manifest { $m =~ s!/!\0!g; # replace the extension (only one) by null null extension. # this puts any foo/blah.ext before any files in foo/blah/ - $m =~ s!(\.[^.]+\z)!\0\0$1!; + $m =~ s{(? }; + +my $data = JSON::PP->new->decode($json); + +my $pod = q{}; + +for my $key (qw( active inactive )) { + $pod .= qq{=head2 \u$key Members\n\n=over 4\n\n}; + + my @items = map {; encode('utf-8', "<$_>") } $data->{$key}->@*; + + open(my $fh, '-|', 'git', 'check-mailmap', @items) + or die "error running check-mailmap: $!"; + + my @lines = <$fh>; + + $pod .= "=item $_\n" for sort @lines; + + $pod .= "=back\n\n"; +} + +say $pod; diff --git a/gnu/usr.bin/perl/Porting/timecheck.c b/gnu/usr.bin/perl/Porting/timecheck.c index 87a252d631e..9d977ca9f3f 100644 --- a/gnu/usr.bin/perl/Porting/timecheck.c +++ b/gnu/usr.bin/perl/Porting/timecheck.c @@ -17,9 +17,9 @@ static char hexbuf[80]; char *hex (time_t t) { if ((long long)t < 0) - sprintf (hexbuf, " -0x%016lx", -t); + sprintf (hexbuf, " -0x%016lx", -t); else - sprintf (hexbuf, " 0x%016lx", t); + sprintf (hexbuf, " 0x%016lx", t); return (hexbuf); } /* hex */ @@ -27,19 +27,19 @@ void gm_check (time_t t, int min_year, int max_year) { tmp = gmtime (&t); if ( tmp == NULL || - /* Check tm_year overflow */ - tmp->tm_year < min_year || tmp->tm_year > max_year) { - if (opt_v) - fprintf (stderr, "gmtime (%ld) failed with errno %d\n", t, errno); - } + /* Check tm_year overflow */ + tmp->tm_year < min_year || tmp->tm_year > max_year) { + if (opt_v) + fprintf (stderr, "gmtime (%ld) failed with errno %d\n", t, errno); + } else { - if (opt_v) - fprintf (stderr, "%3d:%s: %12ld-%02d-%02d %02d:%02d:%02d\n", - i, hex (t), - (long)(tmp->tm_year) + 1900, tmp->tm_mon + 1, tmp->tm_mday, - tmp->tm_hour, tmp->tm_min, tmp->tm_sec); - pt = t; - } + if (opt_v) + fprintf (stderr, "%3d:%s: %12ld-%02d-%02d %02d:%02d:%02d\n", + i, hex (t), + (long)(tmp->tm_year) + 1900, tmp->tm_mon + 1, tmp->tm_mday, + tmp->tm_hour, tmp->tm_min, tmp->tm_sec); + pt = t; + } } /* gm_check */ int check_gm_max () @@ -47,12 +47,12 @@ int check_gm_max () tmp = NULL; pt = 0; if (tmp == NULL || tmp->tm_year < 0) { - for (i = 63; i >= 0; i--) { - time_t x = pt | ((time_t)1 << i); - if (x < 0 || x < pt) continue; - gm_check (x, 69, 0x7fffffff); - } - } + for (i = 63; i >= 0; i--) { + time_t x = pt | ((time_t)1 << i); + if (x < 0 || x < pt) continue; + gm_check (x, 69, 0x7fffffff); + } + } pt_max = pt; return (0); } /* check_gm_max */ @@ -62,12 +62,12 @@ int check_gm_min () tmp = NULL; pt = 0; if (tmp == NULL) { - for (i = 36; i >= 0; i--) { - time_t x = pt - ((time_t)1 << i); - if (x > 0) continue; - gm_check (x, -1900, 70); - } - } + for (i = 36; i >= 0; i--) { + time_t x = pt - ((time_t)1 << i); + if (x > 0) continue; + gm_check (x, -1900, 70); + } + } pt_min = pt; return (0); } /* check_gm_min */ @@ -75,23 +75,23 @@ int check_gm_min () void lt_check (time_t t, int min_year, int max_year) { if (sizeof (time_t) > 4 && t > 0x7ffffffffffff000LL) - tmp = NULL; + tmp = NULL; else - tmp = localtime (&t); + tmp = localtime (&t); if ( tmp == NULL || - /* Check tm_year overflow */ - tmp->tm_year < min_year || tmp->tm_year > max_year) { - if (opt_v) - fprintf (stderr, "localtime (%ld) failed with errno %d\n", t, errno); - } + /* Check tm_year overflow */ + tmp->tm_year < min_year || tmp->tm_year > max_year) { + if (opt_v) + fprintf (stderr, "localtime (%ld) failed with errno %d\n", t, errno); + } else { - if (opt_v) - fprintf (stderr, "%3d:%s: %12ld-%02d-%02d %02d:%02d:%02d\n", - i, hex (t), - (long)(tmp->tm_year) + 1900, tmp->tm_mon + 1, tmp->tm_mday, - tmp->tm_hour, tmp->tm_min, tmp->tm_sec); - pt = t; - } + if (opt_v) + fprintf (stderr, "%3d:%s: %12ld-%02d-%02d %02d:%02d:%02d\n", + i, hex (t), + (long)(tmp->tm_year) + 1900, tmp->tm_mon + 1, tmp->tm_mday, + tmp->tm_hour, tmp->tm_min, tmp->tm_sec); + pt = t; + } } /* lt_check */ int check_lt_max () @@ -99,12 +99,12 @@ int check_lt_max () tmp = NULL; pt = 0; if (tmp == NULL || tmp->tm_year < 0) { - for (i = 63; i >= 0; i--) { - time_t x = pt | ((time_t)1 << i); - if (x < 0 || x < pt) continue; - lt_check (x, 69, 0x7fffffff); - } - } + for (i = 63; i >= 0; i--) { + time_t x = pt | ((time_t)1 << i); + if (x < 0 || x < pt) continue; + lt_check (x, 69, 0x7fffffff); + } + } pt_max = pt; return (0); } /* check_lt_max */ @@ -114,12 +114,12 @@ int check_lt_min () tmp = NULL; pt = 0; if (tmp == NULL) { - for (i = 36; i >= 0; i--) { - time_t x = pt - ((time_t)1 << i); - if (x > 0) continue; - lt_check (x, -1900, 70); - } - } + for (i = 36; i >= 0; i--) { + time_t x = pt - ((time_t)1 << i); + if (x > 0) continue; + lt_check (x, -1900, 70); + } + } pt_min = pt; return (0); } /* check_lt_min */ diff --git a/gnu/usr.bin/perl/Porting/timecheck2.c b/gnu/usr.bin/perl/Porting/timecheck2.c index 06d4a66cff9..483e152a23b 100644 --- a/gnu/usr.bin/perl/Porting/timecheck2.c +++ b/gnu/usr.bin/perl/Porting/timecheck2.c @@ -10,8 +10,8 @@ time_t Time_Zero = 0; /* Visual C++ 2008's difftime() can't do negative times */ double my_difftime(time_t left, time_t right) { - double diff = (double)left - (double)right; - return diff; + double diff = (double)left - (double)right; + return diff; } void check_date_max( struct tm * (*date_func)(const time_t *), char *func_name ) { diff --git a/gnu/usr.bin/perl/Porting/updateAUTHORS.pl b/gnu/usr.bin/perl/Porting/updateAUTHORS.pl new file mode 100755 index 00000000000..6eb64bb64f1 --- /dev/null +++ b/gnu/usr.bin/perl/Porting/updateAUTHORS.pl @@ -0,0 +1,661 @@ +#!/usr/bin/env perl +package Porting::updateAUTHORS; +use strict; +use warnings; +use Getopt::Long qw(GetOptions); +use Pod::Usage qw(pod2usage); +use Data::Dumper; +use Encode qw(encode_utf8 decode_utf8 decode); + +# The style of this file is determined by: +# +# perltidy -w -ple -bbb -bbc -bbs -nolq -l=80 -noll -nola -nwls='=' \ +# -isbc -nolc -otr -kis -ci=4 -se -sot -sct -nsbl -pt=2 -fs \ +# -fsb='#start-no-tidy' -fse='#end-no-tidy' + +# Info and config for passing to git log. +# %an: author name +# %aN: author name (respecting .mailmap, see git-shortlog(1) or git-blame(1)) +# %ae: author email +# %aE: author email (respecting .mailmap, see git-shortlog(1) or git-blame(1)) +# %cn: committer name +# %cN: committer name (respecting .mailmap, see git-shortlog(1) or git-blame(1)) +# %ce: committer email +# %cE: committer email (respecting .mailmap, see git-shortlog(1) or git-blame(1)) +# %H: commit hash +# %h: abbreviated commit hash +# %s: subject +# %x00: print a byte from a hex code + +my %field_spec= ( + "an" => "author_name", + "aN" => "author_name_mm", + "ae" => "author_email", + "aE" => "author_email_mm", + "cn" => "committer_name", + "cN" => "committer_name_mm", + "ce" => "committer_email", + "cE" => "committer_email_mm", + "H" => "commit_hash", + "h" => "abbrev_hash", + "s" => "commit_subject", +); + +my @field_codes= sort keys %field_spec; +my @field_names= map { $field_spec{$_} } @field_codes; +my $tformat= join "%x00", map { "%" . $_ } @field_codes; + +sub _make_name_author_info { + my ($author_info, $commit_info, $name_key)= @_; + (my $email_key= $name_key) =~ s/name/email/; + my $email= $commit_info->{$email_key}; + my $name= $commit_info->{$name_key}; + + my $line= $author_info->{"email2line"}{$email} + // $author_info->{"name2line"}{$name}; + + $line //= sprintf "%-31s<%s>", + $commit_info->{$name_key}, $commit_info->{$email_key}; + return $line; +} + +sub _make_name_simple { + my ($commit_info, $key)= @_; + my $name_key= $key . "_name"; + my $email_key= $key . "_email"; + return sprintf "%s <%s>", $commit_info->{$name_key}, + lc($commit_info->{$email_key}); +} + +sub read_commit_log { + my ($author_info, $mailmap_info)= @_; + $author_info ||= {}; + open my $fh, qq(git log --pretty='tformat:$tformat' |); + + while (defined(my $line= <$fh>)) { + chomp $line; + $line= decode_utf8($line); + my $commit_info= {}; + @{$commit_info}{@field_names}= split /\0/, $line, 0 + @field_names; + + my $author_name_mm= _make_name_author_info($author_info, $commit_info, + "author_name_mm"); + + my $committer_name_mm= + _make_name_author_info($author_info, $commit_info, + "committer_name_mm"); + + my $author_name_real= _make_name_simple($commit_info, "author"); + + my $committer_name_real= _make_name_simple($commit_info, "committer"); + + _check_name_mailmap( + $mailmap_info, $author_name_mm, $author_name_real, + $commit_info, "author name" + ); + _check_name_mailmap($mailmap_info, $committer_name_mm, + $committer_name_real, $commit_info, "committer name"); + + $author_info->{"lines"}{$author_name_mm}++; + $author_info->{"lines"}{$committer_name_mm}++; + } + return $author_info; +} + +sub read_authors { + my ($authors_file)= @_; + $authors_file ||= "AUTHORS"; + + my @authors_preamble; + open my $in_fh, "<", $authors_file + or die "Failed to open for read '$authors_file': $!"; + while (defined(my $line= <$in_fh>)) { + chomp $line; + push @authors_preamble, $line; + if ($line =~ /^--/) { + last; + } + } + my %author_info; + while (defined(my $line= <$in_fh>)) { + chomp $line; + $line= decode_utf8($line); + my ($name, $email); + my $copy= $line; + $copy =~ s/\s+\z//; + if ($copy =~ s/<([^<>]*)>//) { + $email= $1; + } + elsif ($copy =~ s/\s+(\@\w+)\z//) { + $email= $1; + } + $copy =~ s/\s+\z//; + $name= $copy; + $email //= "unknown"; + $email= lc($email); + + $author_info{"lines"}{$line}++; + $author_info{"email2line"}{$email}= $line + if $email and $email ne "unknown"; + $author_info{"name2line"}{$name}= $line + if $name and $name ne "unknown"; + $author_info{"email2name"}{ lc($email) }= $name + if $email + and $name + and $email ne "unknown"; + $author_info{"name2email"}{$name}= $email + if $name and $name ne "unknown"; + } + close $in_fh + or die "Failed to close '$authors_file': $!"; + return (\%author_info, \@authors_preamble); +} + +sub update_authors { + my ($author_info, $authors_preamble, $authors_file)= @_; + $authors_file ||= "AUTHORS"; + my $authors_file_new= $authors_file . ".new"; + open my $out_fh, ">", $authors_file_new + or die "Failed to open for write '$authors_file_new': $!"; + binmode $out_fh; + foreach my $line (@$authors_preamble) { + print $out_fh encode_utf8($line), "\n" + or die "Failed to print to '$authors_file_new': $!"; + } + foreach my $author (_sorted_hash_keys($author_info->{"lines"})) { + next if $author =~ /^unknown/; + if ($author =~ s/\s*\z//) { + next if $author =~ /^\w+$/; + } + print $out_fh encode_utf8($author), "\n" + or die "Failed to print to '$authors_file_new': $!"; + } + close $out_fh + or die "Failed to close '$authors_file_new': $!"; + rename $authors_file_new, $authors_file + or die "Failed to rename '$authors_file_new' to '$authors_file':$!"; + return 1; # ok +} + +sub read_mailmap { + my ($mailmap_file)= @_; + $mailmap_file ||= ".mailmap"; + + open my $in, "<", $mailmap_file + or die "Failed to read '$mailmap_file': $!"; + my %mailmap_hash; + my @mailmap_preamble; + my $line_num= 0; + while (defined(my $line= <$in>)) { + ++$line_num; + next unless $line =~ /\S/; + chomp($line); + $line= decode_utf8($line); + if ($line =~ /^#/) { + if (!keys %mailmap_hash) { + push @mailmap_preamble, $line; + } + else { + die encode_utf8 "Not expecting comments after header ", + "finished at line $line_num!\nLine: $line\n"; + } + } + else { + $mailmap_hash{$line}= $line_num; + } + } + close $in; + return \%mailmap_hash, \@mailmap_preamble; +} + +# this can be used to extract data from the checkAUTHORS data +sub merge_mailmap_with_AUTHORS_and_checkAUTHORS_data { + my ($mailmap_hash, $author_info)= @_; + require 'Porting/checkAUTHORS.pl' or die "No authors?"; + my ($map, $preferred_email_or_github)= + Porting::checkAUTHORS::generate_known_author_map(); + + foreach my $old (sort keys %$preferred_email_or_github) { + my $new= $preferred_email_or_github->{$old}; + next if $old !~ /\@/ or $new !~ /\@/ or $new eq $old; + my $name= $author_info->{"email2name"}{$new}; + if ($name) { + my $line= "$name <$new> <$old>"; + $mailmap_hash->{$line}++; + } + } + return 1; # ok +} + +sub _sorted_hash_keys { + my ($hash)= @_; + my @sorted= sort { lc($a) cmp lc($b) || $a cmp $b } keys %$hash; + return @sorted; +} + +sub update_mailmap { + my ($mailmap_hash, $mailmap_preamble, $mailmap_file)= @_; + $mailmap_file ||= ".mailmap"; + + my $mailmap_file_new= $mailmap_file . "_new"; + open my $out, ">", $mailmap_file_new + or die "Failed to write '$mailmap_file_new':$!"; + binmode $out; + foreach my $line (@$mailmap_preamble, _sorted_hash_keys($mailmap_hash),) { + print $out encode_utf8($line), "\n" + or die "Failed to print to '$mailmap_file': $!"; + } + close $out; + rename $mailmap_file_new, $mailmap_file + or die "Failed to rename '$mailmap_file_new' to '$mailmap_file':$!"; + return 1; # ok +} + +sub parse_mailmap_hash { + my ($mailmap_hash)= @_; + my @recs; + foreach my $line (sort keys %$mailmap_hash) { + my $line_num= $mailmap_hash->{$line}; + $line =~ /^ \s* (?: ( [^<>]*? ) \s+ )? <([^<>]*)> + (?: \s+ (?: ( [^<>]*? ) \s+ )? <([^<>]*)> )? \s* \z /x + or die encode_utf8 "Failed to parse line num $line_num: '$line'"; + if (!$1 or !$2) { + die encode_utf8 "Both preferred name and email are mandatory ", + "in line num $line_num: '$line'"; + } + + # [ preferred_name, preferred_email, other_name, other_email ] + push @recs, [ $1, $2, $3, $4, $line_num ]; + } + return \@recs; +} + +sub _safe_set_key { + my ($hash, $root_key, $key, $val, $pretty_name)= @_; + $hash->{$root_key}{$key} //= $val; + my $prev= $hash->{$root_key}{$key}; + if ($prev ne $val) { + die encode_utf8 "Collision on mapping $root_key: " + . " '$key' maps to '$prev' and '$val'\n"; + } +} + +my $O2P= "other2preferred"; +my $O2PN= "other2preferred_name"; +my $O2PE= "other2preferred_email"; +my $P2O= "preferred2other"; +my $N2P= "name2preferred"; +my $E2P= "email2preferred"; + +my $blurb= ""; # FIXME - replace with a nice message + +sub _check_name_mailmap { + my ($mailmap_info, $auth_name, $raw_name, $commit_info, $descr)= @_; + my $name= $auth_name; + $name =~ s/<([^<>]+)>/<\L$1\E>/ + or $name =~ s/(\s)(\@\w+)\z/$1<\L$2\E>/ + or $name .= " "; + + $name =~ s/\s+/ /g; + + if (!$mailmap_info->{$P2O}{$name}) { + warn encode_utf8 sprintf "Unknown %s '%s' in commit %s '%s'\n%s", + $descr, + $name, $commit_info->{"abbrev_hash"}, + $commit_info->{"commit_subject"}, + $blurb; + $mailmap_info->{add}{"$name $raw_name"}++; + return 0; + } + elsif (!$mailmap_info->{$P2O}{$name}{$raw_name}) { + $mailmap_info->{add}{"$name $raw_name"}++; + } + return 1; +} + +sub check_fix_mailmap_hash { + my ($mailmap_hash, $authors_info)= @_; + my $parsed= parse_mailmap_hash($mailmap_hash); + my @fixed; + my %seen_map; + my %pref_groups; + + # first pass through the data, do any conversions, eg, LC + # the email address, decode any MIME-Header style email addresses. + # We also correct any preferred name entries so they match what + # we already have in AUTHORS, and check that there aren't collisions + # or other issues in the data. + foreach my $rec (@$parsed) { + my ($pname, $pemail, $oname, $oemail, $line_num)= @$rec; + $pemail= lc($pemail); + $oemail= lc($oemail) if defined $oemail; + if ($pname =~ /=\?UTF-8\?/) { + $pname= decode("MIME-Header", $pname); + } + my $auth_email= $authors_info->{"name2email"}{$pname}; + if ($auth_email) { + ## this name exists in authors, so use its email data for pemail + $pemail= $auth_email; + } + my $auth_name= $authors_info->{"email2name"}{$pemail}; + if ($auth_name) { + ## this email exists in authors, so use its name data for pname + $pname= $auth_name; + } + + # neither name nor email exist in authors. + if ($pname ne "unknown") { + if (my $email= $seen_map{"name"}{$pname}) { + ## we have seen this pname before, check the pemail + ## is consistent + if ($email ne $pemail) { + warn encode_utf8 "Inconsistent emails for name '$pname'" + . " at line num $line_num: keeping '$email'," + . " ignoring '$pemail'\n"; + $pemail= $email; + } + } + else { + $seen_map{"name"}{$pname}= $pemail; + } + } + if ($pemail ne "unknown") { + if (my $name= $seen_map{"email"}{$pemail}) { + ## we have seen this preferred_email before, check the preferred_name + ## is consistent + if ($name ne $pname) { + warn encode_utf8 "Inconsistent name for email '$pemail'" + . " at line num $line_num: keeping '$name', ignoring" + . " '$pname'\n"; + $pname= $name; + } + } + else { + $seen_map{"email"}{$pemail}= $pname; + } + } + + # Build an index of "preferred name/email" to other-email, other name + # we use this later to remove redundant entries missing a name. + $pref_groups{"$pname $pemail"}{$oemail}{ $oname || "" }= + [ $pname, $pemail, $oname, $oemail, $line_num ]; + } + + # this removes entries like + # Joe + # where there is a corresponding + # Joe Joe X + foreach my $pref (_sorted_hash_keys(\%pref_groups)) { + my $entries= $pref_groups{$pref}; + foreach my $email (_sorted_hash_keys($entries)) { + my @names= _sorted_hash_keys($entries->{$email}); + if ($names[0] eq "" and @names > 1) { + shift @names; + } + foreach my $name (@names) { + push @fixed, $entries->{$email}{$name}; + } + } + } + + # final pass through the dataset, build up a database + # we will use later for checks and updates, and reconstruct + # the canonical entries. + my $new_mailmap_hash= {}; + my $mailmap_info= {}; + foreach my $rec (@fixed) { + my ($pname, $pemail, $oname, $oemail, $line_num)= @$rec; + my $preferred= "$pname <$pemail>"; + my $other; + if (defined $oemail) { + $other= $oname ? "$oname <$oemail>" : "<$oemail>"; + } + if ($other and $other ne "") { + _safe_set_key($mailmap_info, $O2P, $other, $preferred); + _safe_set_key($mailmap_info, $O2PN, $other, $pname); + _safe_set_key($mailmap_info, $O2PE, $other, $pemail); + } + $mailmap_info->{$P2O}{$preferred}{$other}++; + if ($pname ne "unknown") { + _safe_set_key($mailmap_info, $N2P, $pname, $preferred); + } + if ($pemail ne "unknown") { + _safe_set_key($mailmap_info, $E2P, $pemail, $preferred); + } + my $line= $preferred; + $line .= " $other" if $other; + $new_mailmap_hash->{$line}= $line_num; + } + return ($new_mailmap_hash, $mailmap_info); +} + +sub add_new_mailmap_entries { + my ($mailmap_hash, $mailmap_info, $mailmap_file)= @_; + + my $mailmap_add= $mailmap_info->{add} + or return 0; + + my $num= 0; + for my $new (sort keys %$mailmap_add) { + !$mailmap_hash->{$new}++ or next; + warn encode_utf8 "Updating '$mailmap_file' with: $new\n"; + $num++; + } + return $num; +} + +sub read_and_update { + my ($authors_file, $mailmap_file)= @_; + + # read the authors file and extract the info it contains + my ($author_info, $authors_preamble)= read_authors($authors_file); + + # read the mailmap file. + my ($orig_mailmap_hash, $mailmap_preamble)= read_mailmap($mailmap_file); + + # check and possibly fix the mailmap data, and build a set of precomputed + # datasets to work with it. + my ($mailmap_hash, $mailmap_info)= + check_fix_mailmap_hash($orig_mailmap_hash, $author_info); + + # update the mailmap based on any check or fixes we just did, + # we always write even if we did not do any changes. + update_mailmap($mailmap_hash, $mailmap_preamble, $mailmap_file); + + # read the commits names using git log, and compares and checks + # them against the data we have in authors. + read_commit_log($author_info, $mailmap_info); + + # update the authors file with any changes, we always write, + # but we may not change anything + update_authors($author_info, $authors_preamble, $authors_file); + + # check if we discovered new email data from the commits that + # we need to write back to disk. + add_new_mailmap_entries($mailmap_hash, $mailmap_info, $mailmap_file) + and update_mailmap($mailmap_hash, $mailmap_preamble, + $mailmap_file, $mailmap_info); + + return undef; +} + +sub main { + local $Data::Dumper::Sortkeys= 1; + my $authors_file= "AUTHORS"; + my $mailmap_file= ".mailmap"; + my $show_man= 0; + my $show_help= 0; + + ## Parse options and print usage if there is a syntax error, + ## or if usage was explicitly requested. + GetOptions( + 'help|?' => \$show_help, + 'man' => \$show_man, + 'authors_file|authors-file=s' => \$authors_file, + 'mailmap_file|mailmap-file=s' => \$mailmap_file, + ) or pod2usage(2); + pod2usage(1) if $show_help; + pod2usage(-verbose => 2) if $show_man; + + read_and_update($authors_file, $mailmap_file); + return 0; # 0 for no error - intended for exit(); +} + +exit(main()) unless caller; + +1; +__END__ + +=head1 NAME + +Porting/updateAUTHORS.pl - Automatically update AUTHORS and .mailmap +based on commit data. + +=head1 SYNOPSIS + +Porting/updateAUTHORS.pl + + Options: + --help brief help message + --man full documentation + --authors-file=FILE override default location of AUTHORS + --mailmap-file=FILE override default location of .mailmap + +=head1 OPTIONS + +=over 4 + +=item --help + +Print a brief help message and exits. + +=item --man + +Prints the manual page and exits. + +=item --authors-file=FILE + +=item --authors_file=FILE + +Override the default location of the authors file, which is "AUTHORS" in +the current directory. + +=item --mailmap-file=FILE + +=item --mailmap_file=FILE + +Override the default location of the mailmap file, which is ".mailmap" +in the current directory. + +=back + +=head1 DESCRIPTION + +This program will automatically manage updates to the AUTHORS file and +.mailmap file based on the data in our commits and the data in the files +themselves. It uses no other sources of data. Expects to be run from +the root a git repo of perl. + +In simple, execute the script and it will either die with a helpful +message or it will update the files as necessary, possibly not at all if +there is no need to do so. Note it will actually rewrite the files at +least once, but it may not actually make any changes to their content. +Thus to use the script is currently required that the files are +modifiable. + +Review the changes it makes to make sure they are sane. If they are +commit. If they are not then update the AUTHORS or .mailmap files as is +appropriate and run the tool again. Typically you shouldn't need to do +either unless you are changing the default name or email for a user. For +instance if a person currently listed in the AUTHORS file whishes to +change their preferred name or email then change it in the AUTHORS file +and run the script again. I am not sure when you might need to directly +modify .mailmap, usually modifying the AUTHORS file should suffice. + +=head1 FUNCTIONS + +Note that the file can also be used as a package. If you require the +file then you can access the functions located within the package +C. These are as follows: + +=over 4 + +=item add_new_mailmap_entries($mailmap_hash, $mailmap_info, $mailmap_file) + +If any additions were identified while reading the commits this will +inject them into the mailmap_hash so they can be written out. Returns a +count of additions found. + +=item check_fix_mailmap_hash($mailmap_hash, $authors_info) + +Analyzes the data contained the in the .mailmap file and applies any +automated fixes which are required and which it can automatically +perform. Returns a hash of adjusted entries and a hash with additional +metadata about the mailmap entries. + +=item main() + +This implements the command line version of this module, handle command +line options, etc. + +=item merge_mailmap_with_AUTHORS_and_checkAUTHORS_data + +This is a utility function that combines data from this tool with data +contained in F it is not used directly, but was +used to cleanup and generate the current version of the .mailmap file. + +=item parse_mailmap_hash($mailmap_hash) + +Takes a mailmap_hash and parses it and returns it as an array of array +records with the contents: + + [ $preferred_name, $preferred_email, + $other_name, $other_email, + $line_num ] + +=item read_and_update($authors_file, $mailmap_file) + +Wraps the other functions in this library and implements the logic and +intent of this tool. Takes two arguments, the authors file name, and the +mailmap file name. Returns nothing but may modify the AUTHORS file +or the .mailmap file. Requires that both files are editable. + +=item read_commit_log($authors_info, $mailmap_info) + +Read the commit log and find any new names it contains. + +=item read_authors($authors_file) + +Read the AUTHORS file and return data about it. + +=item read_mailmap($mailmap_file) + +Read the .mailmap file and return data about it. + +=item update_authors($authors_info, $authors_preamble, $authors_file) + +Write out an updated AUTHORS file. This is done atomically +using a rename, we will not leave a half modified file in +the repo. + +=item update_mailmap($mm_hash, $mm_preamble, $mailmap_file, $mm_info) + +Write out an updated .mailmap file. This is done atomically +using a rename, we will not leave a half modified file in +the repo. + +=back + +=head1 TODO + +More documentation and testing. + +=head1 SEE ALSO + +F + +=head1 AUTHOR + +Yves Orton + +=cut diff --git a/gnu/usr.bin/perl/Porting/vote_admin_guide.pod b/gnu/usr.bin/perl/Porting/vote_admin_guide.pod new file mode 100644 index 00000000000..3ba8febd673 --- /dev/null +++ b/gnu/usr.bin/perl/Porting/vote_admin_guide.pod @@ -0,0 +1,191 @@ +=encoding utf8 + +=head1 NAME + +vote_admin_guide - Perl Governance Vote Administrator Guide + +=head1 Running a Steering Council nomination process + +Announce the nomination period to the Perl Core mailing list. Be explicit +about the end time. Set a calendar reminder for yourself for when it's +time to close the nominations and begin the voting. + +Remember that inactive Core Team members may not participate in the nomination +or voting process. The governance document is clear that inactive members may +not declare themselves active when a vote is proposed, which includes the +nomination process. + +If someone outside the Core Team is nominated, contact them to confirm that +they accept the nomination. If they do, ask the Steering Council to add +them as a moderated member of the Perl Core list for the duration of the +election and invite them to offer a statement on their candidacy to the +list. + +Before the end of the nomination period, remind everyone of the schedule +and share the current list of nominees to confirm you aren't missing +anyone. + +At the end of the nomination period, notify the Perl Core list of the list +of nominees and set their expectations for when you'll be opening the +voting period. + +=head1 Using CIVS + +We are using L +(CIVS), which is pretty easy to use, although it has a lot of options. + +First, bookmark that link, but realize that there are no user accounts. +Whenever you create or participate in a poll, you'll get a unique URL, and you +need to save it to come back to what you were doing before. + +=head2 Preliminary work + +You'll need to complete these steps. + +=head3 Get list of active Core Team member emails + +This can be found in the F file. + +=head3 Remind Core Team members to opt-in their email address + +CIVS has a required opt-in to send polls out to an email address. The active +Core Team members that would like to vote and haven't opted-in yet must use the +following link with the email address they have in F: +L + +=head2 Running an election on CIVS + +The following instructions describe steps to run an election. + +=head3 Creating a poll + +On the right sidebar of the CIVS landing page is a list of links, and the +first one is Create a poll. Some of the things it asks for are simple: +what's it called? Who is running it? It asks for an email address, and it +has to work: that's where you're going to get all the links! + +Note that "day and time you plan to stop" is just a text box. It gets sent +to the recipient in their invitation to vote. It does not schedule one +dang thing, so you better set yourself a reminder to close the poll on +time! Also, remember to think about time zones! (You are free to +selfishly pick your local time.) + +The description box is limited HTML: you can put in C<<

>> and +C<< >> and C<<

=> L<"section"|/section> + L => L<"section" in name|name/section> + +=item * + +Note that section names might contain markup. I.e., if a section +starts with: + + =head2 About the C<-M> Operator + +or with: + + =item About the C<-M> Operator + +then a link to it would look like this: + + L Operator> + +Formatters may choose to ignore the markup for purposes of resolving +the link and use only the renderable characters in the section name, +as in: + +

About the -M + Operator

+ + ... + + About the -M + Operator" in somedoc + +=item * + +Previous versions of perlpod distinguished Cname/"section"E> +links from Cname/itemE> links (and their targets). These +have been merged syntactically and semantically in the current +specification, and I
can refer either to a "=headI Heading +Content" command or to a "=item Item Content" command. This +specification does not specify what behavior should be in the case +of a given document having several things all seeming to produce the +same I
identifier (e.g., in HTML, several things all producing +the same I in ... +elements). Where Pod processors can control this behavior, they should +use the first such anchor. That is, CFoo/BarE> refers to the +I "Bar" section in Foo. + +But for some processors/formats this cannot be easily controlled; as +with the HTML example, the behavior of multiple ambiguous +... is most easily just left up to +browsers to decide. + +=item * + +Authors wanting to link to a particular (absolute) URL, must do so +only with "LEscheme:...>" codes (like +LEhttp://www.perl.org>), and must not attempt "LESome Site +Name|scheme:...>" codes. This restriction avoids many problems +in parsing and rendering LE...> codes. + +=item * + +In a Ctext|...E> code, text may contain formatting codes +for formatting or for EE...> escapes, as in: + + Lstuff>|...> + +For C...E> codes without a "name|" part, only +C...E> and CE> codes may occur -- no +other formatting codes. That is, authors should not use +"CBEFoo::BarEE>". + +Note, however, that formatting codes and ZE>'s can occur in any +and all parts of an LE...> (i.e., in I, I
, I, +and I). + +Authors must not nest LE...> codes. For example, "LEThe +LEFoo::Bar> man page>" should be treated as an error. + +=item * + +Note that Pod authors may use formatting codes inside the "text" +part of "LEtext|name>" (and so on for LEtext|/"sec">). + +In other words, this is valid: + + Go read L|perlvar-copy/"$."> + +Some output formats that do allow rendering "LE...>" codes as +hypertext, might not allow the link-text to be formatted; in +that case, formatters will have to just ignore that formatting. + +=item * + +At time of writing, CnameE> values are of two types: +either the name of a Pod page like CFoo::BarE> (which +might be a real Perl module or program in an @INC / PATH +directory, or a .pod file in those places); or the name of a UNIX +man page, like Ccrontab(5)E>. In theory, CchmodE> +in ambiguous between a Pod page called "chmod", or the Unix man page +"chmod" (in whatever man-section). However, the presence of a string +in parens, as in "crontab(5)", is sufficient to signal that what +is being discussed is not a Pod page, and so is presumably a +UNIX man page. The distinction is of no importance to many +Pod processors, but some processors that render to hypertext formats +may need to distinguish them in order to know how to render a +given CfooE> code. + +=item * + +Previous versions of perlpod allowed for a CsectionE> syntax +(as in CObject AttributesE>), which was not easily distinguishable +from CnameE> syntax. This syntax is no longer in the +specification, and has been replaced by the C"section"E> syntax +(where the quotes were formerly optional). Pod parsers should tolerate +the CsectionE> syntax, for a while at least. The suggested +heuristic for distinguishing CsectionE> from CnameE> +is that if it contains any whitespace, it's a I
. Pod processors +may warn about this being deprecated syntax. + +=back + +=head1 About =over...=back Regions + +"=over"..."=back" regions are used for various kinds of list-like +structures. (I use the term "region" here simply as a collective +term for everything from the "=over" to the matching "=back".) + +=over + +=item * + +The non-zero numeric I in "=over I" ... +"=back" is used for giving the formatter a clue as to how many +"spaces" (ems, or roughly equivalent units) it should tab over, +although many formatters will have to convert this to an absolute +measurement that may not exactly match with the size of spaces (or M's) +in the document's base font. Other formatters may have to completely +ignore the number. The lack of any explicit I parameter is +equivalent to an I value of 4. Pod processors may +complain if I is present but is not a positive number +matching C. + +=item * + +Authors of Pod formatters are reminded that "=over" ... "=back" may +map to several different constructs in your output format. For +example, in converting Pod to (X)HTML, it can map to any of +
    ...
,
    ...
,
...
, or +
...
. Similarly, "=item" can map to
  • or +
    . + +=item * + +Each "=over" ... "=back" region should be one of the following: + +=over + +=item * + +An "=over" ... "=back" region containing only "=item *" commands, +each followed by some number of ordinary/verbatim paragraphs, other +nested "=over" ... "=back" regions, "=for..." paragraphs, and +"=begin"..."=end" regions. + +(Pod processors must tolerate a bare "=item" as if it were "=item +*".) Whether "*" is rendered as a literal asterisk, an "o", or as +some kind of real bullet character, is left up to the Pod formatter, +and may depend on the level of nesting. + +=item * + +An "=over" ... "=back" region containing only +C paragraphs, each one (or each group of them) +followed by some number of ordinary/verbatim paragraphs, other nested +"=over" ... "=back" regions, "=for..." paragraphs, and/or +"=begin"..."=end" codes. Note that the numbers must start at 1 +in each section, and must proceed in order and without skipping +numbers. + +(Pod processors must tolerate lines like "=item 1" as if they were +"=item 1.", with the period.) + +=item * + +An "=over" ... "=back" region containing only "=item [text]" +commands, each one (or each group of them) followed by some number of +ordinary/verbatim paragraphs, other nested "=over" ... "=back" +regions, or "=for..." paragraphs, and "=begin"..."=end" regions. + +The "=item [text]" paragraph should not match +C or C, nor should it +match just C. + +=item * + +An "=over" ... "=back" region containing no "=item" paragraphs at +all, and containing only some number of +ordinary/verbatim paragraphs, and possibly also some nested "=over" +... "=back" regions, "=for..." paragraphs, and "=begin"..."=end" +regions. Such an itemless "=over" ... "=back" region in Pod is +equivalent in meaning to a "
    ...
    " element in +HTML. + +=back + +Note that with all the above cases, you can determine which type of +"=over" ... "=back" you have, by examining the first (non-"=cut", +non-"=pod") Pod paragraph after the "=over" command. + +=item * + +Pod formatters I tolerate arbitrarily large amounts of text +in the "=item I" paragraph. In practice, most such +paragraphs are short, as in: + + =item For cutting off our trade with all parts of the world + +But they may be arbitrarily long: + + =item For transporting us beyond seas to be tried for pretended + offenses + + =item He is at this time transporting large armies of foreign + mercenaries to complete the works of death, desolation and + tyranny, already begun with circumstances of cruelty and perfidy + scarcely paralleled in the most barbarous ages, and totally + unworthy the head of a civilized nation. + +=item * + +Pod processors should tolerate "=item *" / "=item I" commands +with no accompanying paragraph. The middle item is an example: + + =over + + =item 1 + + Pick up dry cleaning. + + =item 2 + + =item 3 + + Stop by the store. Get Abba Zabas, Stoli, and cheap lawn chairs. + + =back + +=item * + +No "=over" ... "=back" region can contain headings. Processors may +treat such a heading as an error. + +=item * + +Note that an "=over" ... "=back" region should have some +content. That is, authors should not have an empty region like this: + + =over + + =back + +Pod processors seeing such a contentless "=over" ... "=back" region, +may ignore it, or may report it as an error. + +=item * + +Processors must tolerate an "=over" list that goes off the end of the +document (i.e., which has no matching "=back"), but they may warn +about such a list. + +=item * + +Authors of Pod formatters should note that this construct: + + =item Neque + + =item Porro + + =item Quisquam Est + + Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci + velit, sed quia non numquam eius modi tempora incidunt ut + labore et dolore magnam aliquam quaerat voluptatem. + + =item Ut Enim + +is semantically ambiguous, in a way that makes formatting decisions +a bit difficult. On the one hand, it could be mention of an item +"Neque", mention of another item "Porro", and mention of another +item "Quisquam Est", with just the last one requiring the explanatory +paragraph "Qui dolorem ipsum quia dolor..."; and then an item +"Ut Enim". In that case, you'd want to format it like so: + + Neque + + Porro + + Quisquam Est + Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci + velit, sed quia non numquam eius modi tempora incidunt ut + labore et dolore magnam aliquam quaerat voluptatem. + + Ut Enim + +But it could equally well be a discussion of three (related or equivalent) +items, "Neque", "Porro", and "Quisquam Est", followed by a paragraph +explaining them all, and then a new item "Ut Enim". In that case, you'd +probably want to format it like so: + + Neque + Porro + Quisquam Est + Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci + velit, sed quia non numquam eius modi tempora incidunt ut + labore et dolore magnam aliquam quaerat voluptatem. + + Ut Enim + +But (for the foreseeable future), Pod does not provide any way for Pod +authors to distinguish which grouping is meant by the above +"=item"-cluster structure. So formatters should format it like so: + + Neque + + Porro + + Quisquam Est + + Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci + velit, sed quia non numquam eius modi tempora incidunt ut + labore et dolore magnam aliquam quaerat voluptatem. + + Ut Enim + +That is, there should be (at least roughly) equal spacing between +items as between paragraphs (although that spacing may well be less +than the full height of a line of text). This leaves it to the reader +to use (con)textual cues to figure out whether the "Qui dolorem +ipsum..." paragraph applies to the "Quisquam Est" item or to all three +items "Neque", "Porro", and "Quisquam Est". While not an ideal +situation, this is preferable to providing formatting cues that may +be actually contrary to the author's intent. + +=back + + + +=head1 About Data Paragraphs and "=begin/=end" Regions + +Data paragraphs are typically used for inlining non-Pod data that is +to be used (typically passed through) when rendering the document to +a specific format: + + =begin rtf + + \par{\pard\qr\sa4500{\i Printed\~\chdate\~\chtime}\par} + + =end rtf + +The exact same effect could, incidentally, be achieved with a single +"=for" paragraph: + + =for rtf \par{\pard\qr\sa4500{\i Printed\~\chdate\~\chtime}\par} + +(Although that is not formally a data paragraph, it has the same +meaning as one, and Pod parsers may parse it as one.) + +Another example of a data paragraph: + + =begin html + + I like PIE! + +
    Especially pecan pie! + + =end html + +If these were ordinary paragraphs, the Pod parser would try to +expand the "EE/em>" (in the first paragraph) as a formatting +code, just like "EElt>" or "EEeacute>". But since this +is in a "=begin I"..."=end I" region I +the identifier "html" doesn't begin have a ":" prefix, the contents +of this region are stored as data paragraphs, instead of being +processed as ordinary paragraphs (or if they began with a spaces +and/or tabs, as verbatim paragraphs). + +As a further example: At time of writing, no "biblio" identifier is +supported, but suppose some processor were written to recognize it as +a way of (say) denoting a bibliographic reference (necessarily +containing formatting codes in ordinary paragraphs). The fact that +"biblio" paragraphs were meant for ordinary processing would be +indicated by prefacing each "biblio" identifier with a colon: + + =begin :biblio + + Wirth, Niklaus. 1976. I Prentice-Hall, Englewood Cliffs, NJ. + + =end :biblio + +This would signal to the parser that paragraphs in this begin...end +region are subject to normal handling as ordinary/verbatim paragraphs +(while still tagged as meant only for processors that understand the +"biblio" identifier). The same effect could be had with: + + =for :biblio + Wirth, Niklaus. 1976. I Prentice-Hall, Englewood Cliffs, NJ. + +The ":" on these identifiers means simply "process this stuff +normally, even though the result will be for some special target". +I suggest that parser APIs report "biblio" as the target identifier, +but also report that it had a ":" prefix. (And similarly, with the +above "html", report "html" as the target identifier, and note the +I of a ":" prefix.) + +Note that a "=begin I"..."=end I" region where +I begins with a colon, I contain commands. For example: + + =begin :biblio + + Wirth's classic is available in several editions, including: + + =for comment + hm, check abebooks.com for how much used copies cost. + + =over + + =item + + Wirth, Niklaus. 1975. I + Teubner, Stuttgart. [Yes, it's in German.] + + =item + + Wirth, Niklaus. 1976. I Prentice-Hall, Englewood Cliffs, NJ. + + =back + + =end :biblio + +Note, however, a "=begin I"..."=end I" +region where I does I begin with a colon, should not +directly contain "=head1" ... "=head4" commands, nor "=over", nor "=back", +nor "=item". For example, this may be considered invalid: + + =begin somedata + + This is a data paragraph. + + =head1 Don't do this! + + This is a data paragraph too. + + =end somedata + +A Pod processor may signal that the above (specifically the "=head1" +paragraph) is an error. Note, however, that the following should +I be treated as an error: + + =begin somedata + + This is a data paragraph. + + =cut + + # Yup, this isn't Pod anymore. + sub excl { (rand() > .5) ? "hoo!" : "hah!" } + + =pod + + This is a data paragraph too. + + =end somedata + +And this too is valid: + + =begin someformat + + This is a data paragraph. + + And this is a data paragraph. + + =begin someotherformat + + This is a data paragraph too. + + And this is a data paragraph too. + + =begin :yetanotherformat + + =head2 This is a command paragraph! + + This is an ordinary paragraph! + + And this is a verbatim paragraph! + + =end :yetanotherformat + + =end someotherformat + + Another data paragraph! + + =end someformat + +The contents of the above "=begin :yetanotherformat" ... +"=end :yetanotherformat" region I data paragraphs, because +the immediately containing region's identifier (":yetanotherformat") +begins with a colon. In practice, most regions that contain +data paragraphs will contain I data paragraphs; however, +the above nesting is syntactically valid as Pod, even if it is +rare. However, the handlers for some formats, like "html", +will accept only data paragraphs, not nested regions; and they may +complain if they see (targeted for them) nested regions, or commands, +other than "=end", "=pod", and "=cut". + +Also consider this valid structure: + + =begin :biblio + + Wirth's classic is available in several editions, including: + + =over + + =item + + Wirth, Niklaus. 1975. I + Teubner, Stuttgart. [Yes, it's in German.] + + =item + + Wirth, Niklaus. 1976. I Prentice-Hall, Englewood Cliffs, NJ. + + =back + + Buy buy buy! + + =begin html + + + +
    + + =end html + + Now now now! + + =end :biblio + +There, the "=begin html"..."=end html" region is nested inside +the larger "=begin :biblio"..."=end :biblio" region. Note that the +content of the "=begin html"..."=end html" region is data +paragraph(s), because the immediately containing region's identifier +("html") I begin with a colon. + +Pod parsers, when processing a series of data paragraphs one +after another (within a single region), should consider them to +be one large data paragraph that happens to contain blank lines. So +the content of the above "=begin html"..."=end html" I be stored +as two data paragraphs (one consisting of +"\n" +and another consisting of "
    \n"), but I be stored as +a single data paragraph (consisting of +"\n\n
    \n"). + +Pod processors should tolerate empty +"=begin I"..."=end I" regions, +empty "=begin :I"..."=end :I" regions, and +contentless "=for I" and "=for :I" +paragraphs. I.e., these should be tolerated: + + =for html + + =begin html + + =end html + + =begin :biblio + + =end :biblio + +Incidentally, note that there's no easy way to express a data +paragraph starting with something that looks like a command. Consider: + + =begin stuff + + =shazbot + + =end stuff + +There, "=shazbot" will be parsed as a Pod command "shazbot", not as a data +paragraph "=shazbot\n". However, you can express a data paragraph consisting +of "=shazbot\n" using this code: + + =for stuff =shazbot + +The situation where this is necessary, is presumably quite rare. + +Note that =end commands must match the currently open =begin command. That +is, they must properly nest. For example, this is valid: + + =begin outer + + X + + =begin inner + + Y + + =end inner + + Z + + =end outer + +while this is invalid: + + =begin outer + + X + + =begin inner + + Y + + =end outer + + Z + + =end inner + +This latter is improper because when the "=end outer" command is seen, the +currently open region has the formatname "inner", not "outer". (It just +happens that "outer" is the format name of a higher-up region.) This is +an error. Processors must by default report this as an error, and may halt +processing the document containing that error. A corollary of this is that +regions cannot "overlap" -- i.e., the latter block above does not represent +a region called "outer" which contains X and Y, overlapping a region called +"inner" which contains Y and Z. But because it is invalid (as all +apparently overlapping regions would be), it doesn't represent that, or +anything at all. + +Similarly, this is invalid: + + =begin thing + + =end hting + +This is an error because the region is opened by "thing", and the "=end" +tries to close "hting" [sic]. + +This is also invalid: + + =begin thing + + =end + +This is invalid because every "=end" command must have a formatname +parameter. + +=head1 SEE ALSO + +L, L, +L + +=head1 AUTHOR + +Sean M. Burke + +=cut + + diff --git a/gnu/usr.bin/perl/ext/Pod-Html/corpus/perlvar-copy.pod b/gnu/usr.bin/perl/ext/Pod-Html/corpus/perlvar-copy.pod new file mode 100644 index 00000000000..efb00a012dc --- /dev/null +++ b/gnu/usr.bin/perl/ext/Pod-Html/corpus/perlvar-copy.pod @@ -0,0 +1,1742 @@ +=head1 NAME + +perlvarcopy - Perl predefined variables + +=head1 DISCLAIMER + +This is a pod file used for testing purposes by the test suite, please +see L. + +=head1 DESCRIPTION + +=head2 Predefined Names + +The following names have special meaning to Perl. Most +punctuation names have reasonable mnemonics, or analogs in the +shells. Nevertheless, if you wish to use long variable names, +you need only say + + use English; + +at the top of your program. This aliases all the short names to the long +names in the current package. Some even have medium names, generally +borrowed from B. In general, it's best to use the + + use English '-no_match_vars'; + +invocation if you don't need $PREMATCH, $MATCH, or $POSTMATCH, as it avoids +a certain performance hit with the use of regular expressions. See +L. + +Variables that depend on the currently selected filehandle may be set by +calling an appropriate object method on the IO::Handle object, although +this is less efficient than using the regular built-in variables. (Summary +lines below for this contain the word HANDLE.) First you must say + + use IO::Handle; + +after which you may use either + + method HANDLE EXPR + +or more safely, + + HANDLE->method(EXPR) + +Each method returns the old value of the IO::Handle attribute. +The methods each take an optional EXPR, which, if supplied, specifies the +new value for the IO::Handle attribute in question. If not supplied, +most methods do nothing to the current value--except for +autoflush(), which will assume a 1 for you, just to be different. + +Because loading in the IO::Handle class is an expensive operation, you should +learn how to use the regular built-in variables. + +A few of these variables are considered "read-only". This means that if +you try to assign to this variable, either directly or indirectly through +a reference, you'll raise a run-time exception. + +You should be very careful when modifying the default values of most +special variables described in this document. In most cases you want +to localize these variables before changing them, since if you don't, +the change may affect other modules which rely on the default values +of the special variables that you have changed. This is one of the +correct ways to read the whole file at once: + + open my $fh, "<", "foo" or die $!; + local $/; # enable localized slurp mode + my $content = <$fh>; + close $fh; + +But the following code is quite bad: + + open my $fh, "<", "foo" or die $!; + undef $/; # enable slurp mode + my $content = <$fh>; + close $fh; + +since some other module, may want to read data from some file in the +default "line mode", so if the code we have just presented has been +executed, the global value of C<$/> is now changed for any other code +running inside the same Perl interpreter. + +Usually when a variable is localized you want to make sure that this +change affects the shortest scope possible. So unless you are already +inside some short C<{}> block, you should create one yourself. For +example: + + my $content = ''; + open my $fh, "<", "foo" or die $!; + { + local $/; + $content = <$fh>; + } + close $fh; + +Here is an example of how your own code can go broken: + + for (1..5){ + nasty_break(); + print "$_ "; + } + sub nasty_break { + $_ = 5; + # do something with $_ + } + +You probably expect this code to print: + + 1 2 3 4 5 + +but instead you get: + + 5 5 5 5 5 + +Why? Because nasty_break() modifies C<$_> without localizing it +first. The fix is to add local(): + + local $_ = 5; + +It's easy to notice the problem in such a short example, but in more +complicated code you are looking for trouble if you don't localize +changes to the special variables. + +The following list is ordered by scalar variables first, then the +arrays, then the hashes. + +=over 8 + +=item $ARG + +=item $_ +X<$_> X<$ARG> + +The default input and pattern-searching space. The following pairs are +equivalent: + + while (<>) {...} # equivalent only in while! + while (defined($_ = <>)) {...} + + /^Subject:/ + $_ =~ /^Subject:/ + + tr/a-z/A-Z/ + $_ =~ tr/a-z/A-Z/ + + chomp + chomp($_) + +Here are the places where Perl will assume $_ even if you +don't use it: + +=over 3 + +=item * + +The following functions: + +abs, alarm, chomp, chop, chr, chroot, cos, defined, eval, exp, glob, +hex, int, lc, lcfirst, length, log, lstat, mkdir, oct, ord, pos, print, +quotemeta, readlink, readpipe, ref, require, reverse (in scalar context only), +rmdir, sin, split (on its second argument), sqrt, stat, study, uc, ucfirst, +unlink, unpack. + +=item * + +All file tests (C<-f>, C<-d>) except for C<-t>, which defaults to STDIN. +See L + + +=item * + +The pattern matching operations C, C and C (aka C) +when used without an C<=~> operator. + +=item * + +The default iterator variable in a C loop if no other +variable is supplied. + +=item * + +The implicit iterator variable in the grep() and map() functions. + +=item * + +The implicit variable of given(). + +=item * + +The default place to put an input record when a C<< >> +operation's result is tested by itself as the sole criterion of a C +test. Outside a C test, this will not happen. + +=back + +As C<$_> is a global variable, this may lead in some cases to unwanted +side-effects. As of perl 5.9.1, you can now use a lexical version of +C<$_> by declaring it in a file or in a block with C. Moreover, +declaring C restores the global C<$_> in the current scope. + +(Mnemonic: underline is understood in certain operations.) + +=back + +=over 8 + +=item $a + +=item $b +X<$a> X<$b> + +Special package variables when using sort(), see L. +Because of this specialness $a and $b don't need to be declared +(using use vars, or our()) even when using the C pragma. +Don't lexicalize them with C or C if you want to be +able to use them in the sort() comparison block or function. + +=back + +=over 8 + +=item $> +X<$1> X<$2> X<$3> + +Contains the subpattern from the corresponding set of capturing +parentheses from the last pattern match, not counting patterns +matched in nested blocks that have been exited already. (Mnemonic: +like \digits.) These variables are all read-only and dynamically +scoped to the current BLOCK. + +=item $MATCH + +=item $& +X<$&> X<$MATCH> + +The string matched by the last successful pattern match (not counting +any matches hidden within a BLOCK or eval() enclosed by the current +BLOCK). (Mnemonic: like & in some editors.) This variable is read-only +and dynamically scoped to the current BLOCK. + +The use of this variable anywhere in a program imposes a considerable +performance penalty on all regular expression matches. See L. + +See L for a replacement. + +=item ${^MATCH} +X<${^MATCH}> + +This is similar to C<$&> (C<$MATCH>) except that it does not incur the +performance penalty associated with that variable, and is only guaranteed +to return a defined value when the pattern was compiled or executed with +the C

    modifier. + +=item $PREMATCH + +=item $` +X<$`> X<$PREMATCH> + +The string preceding whatever was matched by the last successful +pattern match (not counting any matches hidden within a BLOCK or eval +enclosed by the current BLOCK). (Mnemonic: C<`> often precedes a quoted +string.) This variable is read-only. + +The use of this variable anywhere in a program imposes a considerable +performance penalty on all regular expression matches. See L. + +See L for a replacement. + +=item ${^PREMATCH} +X<${^PREMATCH}> + +This is similar to C<$`> ($PREMATCH) except that it does not incur the +performance penalty associated with that variable, and is only guaranteed +to return a defined value when the pattern was compiled or executed with +the C

    modifier. + +=item $POSTMATCH + +=item $' +X<$'> X<$POSTMATCH> + +The string following whatever was matched by the last successful +pattern match (not counting any matches hidden within a BLOCK or eval() +enclosed by the current BLOCK). (Mnemonic: C<'> often follows a quoted +string.) Example: + + local $_ = 'abcdefghi'; + /def/; + print "$`:$&:$'\n"; # prints abc:def:ghi + +This variable is read-only and dynamically scoped to the current BLOCK. + +The use of this variable anywhere in a program imposes a considerable +performance penalty on all regular expression matches. See L. + +See L for a replacement. + +=item ${^POSTMATCH} +X<${^POSTMATCH}> + +This is similar to C<$'> (C<$POSTMATCH>) except that it does not incur the +performance penalty associated with that variable, and is only guaranteed +to return a defined value when the pattern was compiled or executed with +the C

    modifier. + +=item $LAST_PAREN_MATCH + +=item $+ +X<$+> X<$LAST_PAREN_MATCH> + +The text matched by the last bracket of the last successful search pattern. +This is useful if you don't know which one of a set of alternative patterns +matched. For example: + + /Version: (.*)|Revision: (.*)/ && ($rev = $+); + +(Mnemonic: be positive and forward looking.) +This variable is read-only and dynamically scoped to the current BLOCK. + +=item $LAST_SUBMATCH_RESULT + +=item $^N +X<$^N> + +The text matched by the used group most-recently closed (i.e. the group +with the rightmost closing parenthesis) of the last successful search +pattern. (Mnemonic: the (possibly) Nested parenthesis that most +recently closed.) + +This is primarily used inside C<(?{...})> blocks for examining text +recently matched. For example, to effectively capture text to a variable +(in addition to C<$1>, C<$2>, etc.), replace C<(...)> with + + (?:(...)(?{ $var = $^N })) + +By setting and then using C<$var> in this way relieves you from having to +worry about exactly which numbered set of parentheses they are. + +This variable is dynamically scoped to the current BLOCK. + +=item @LAST_MATCH_END + +=item @+ +X<@+> X<@LAST_MATCH_END> + +This array holds the offsets of the ends of the last successful +submatches in the currently active dynamic scope. C<$+[0]> is +the offset into the string of the end of the entire match. This +is the same value as what the C function returns when called +on the variable that was matched against. The Ith element +of this array holds the offset of the Ith submatch, so +C<$+[1]> is the offset past where $1 ends, C<$+[2]> the offset +past where $2 ends, and so on. You can use C<$#+> to determine +how many subgroups were in the last successful match. See the +examples given for the C<@-> variable. + +=item %LAST_PAREN_MATCH + +=item %+ +X<%+> + +Similar to C<@+>, the C<%+> hash allows access to the named capture +buffers, should they exist, in the last successful match in the +currently active dynamic scope. + +For example, C<$+{foo}> is equivalent to C<$1> after the following match: + + 'foo' =~ /(?foo)/; + +The keys of the C<%+> hash list only the names of buffers that have +captured (and that are thus associated to defined values). + +The underlying behaviour of C<%+> is provided by the +L module. + +B C<%-> and C<%+> are tied views into a common internal hash +associated with the last successful regular expression. Therefore mixing +iterative access to them via C may have unpredictable results. +Likewise, if the last successful match changes, then the results may be +surprising. + +=item HANDLE->input_line_number(EXPR) + +=item $INPUT_LINE_NUMBER + +=item $NR + +=item $. +X<$.> X<$NR> X<$INPUT_LINE_NUMBER> X + +Current line number for the last filehandle accessed. + +Each filehandle in Perl counts the number of lines that have been read +from it. (Depending on the value of C<$/>, Perl's idea of what +constitutes a line may not match yours.) When a line is read from a +filehandle (via readline() or C<< <> >>), or when tell() or seek() is +called on it, C<$.> becomes an alias to the line counter for that +filehandle. + +You can adjust the counter by assigning to C<$.>, but this will not +actually move the seek pointer. I will not localize +the filehandle's line count>. Instead, it will localize perl's notion +of which filehandle C<$.> is currently aliased to. + +C<$.> is reset when the filehandle is closed, but B when an open +filehandle is reopened without an intervening close(). For more +details, see LO Operators">. Because C<< <> >> never does +an explicit close, line numbers increase across ARGV files (but see +examples in L). + +You can also use C<< HANDLE->input_line_number(EXPR) >> to access the +line counter for a given filehandle without having to worry about +which handle you last accessed. + +(Mnemonic: many programs use "." to mean the current line number.) + +=item IO::Handle->input_record_separator(EXPR) + +=item $INPUT_RECORD_SEPARATOR + +=item $RS + +=item $/ +X<$/> X<$RS> X<$INPUT_RECORD_SEPARATOR> + +The input record separator, newline by default. This +influences Perl's idea of what a "line" is. Works like B's RS +variable, including treating empty lines as a terminator if set to +the null string. (An empty line cannot contain any spaces +or tabs.) You may set it to a multi-character string to match a +multi-character terminator, or to C to read through the end +of file. Setting it to C<"\n\n"> means something slightly +different than setting to C<"">, if the file contains consecutive +empty lines. Setting to C<""> will treat two or more consecutive +empty lines as a single empty line. Setting to C<"\n\n"> will +blindly assume that the next input character belongs to the next +paragraph, even if it's a newline. (Mnemonic: / delimits +line boundaries when quoting poetry.) + + local $/; # enable "slurp" mode + local $_ = ; # whole file now here + s/\n[ \t]+/ /g; + +Remember: the value of C<$/> is a string, not a regex. B has to be +better for something. :-) + +Setting C<$/> to a reference to an integer, scalar containing an integer, or +scalar that's convertible to an integer will attempt to read records +instead of lines, with the maximum record size being the referenced +integer. So this: + + local $/ = \32768; # or \"32768", or \$var_containing_32768 + open my $fh, "<", $myfile or die $!; + local $_ = <$fh>; + +will read a record of no more than 32768 bytes from FILE. If you're +not reading from a record-oriented file (or your OS doesn't have +record-oriented files), then you'll likely get a full chunk of data +with every read. If a record is larger than the record size you've +set, you'll get the record back in pieces. Trying to set the record +size to zero or less will cause reading in the (rest of the) whole file. + +On VMS, record reads are done with the equivalent of C, +so it's best not to mix record and non-record reads on the same +file. (This is unlikely to be a problem, because any file you'd +want to read in record mode is probably unusable in line mode.) +Non-VMS systems do normal I/O, so it's safe to mix record and +non-record reads of a file. + +See also L. Also see C<$.>. + +=item HANDLE->autoflush(EXPR) + +=item $OUTPUT_AUTOFLUSH + +=item $| +X<$|> X X X<$OUTPUT_AUTOFLUSH> + +If set to nonzero, forces a flush right away and after every write +or print on the currently selected output channel. Default is 0 +(regardless of whether the channel is really buffered by the +system or not; C<$|> tells you only whether you've asked Perl +explicitly to flush after each write). STDOUT will +typically be line buffered if output is to the terminal and block +buffered otherwise. Setting this variable is useful primarily when +you are outputting to a pipe or socket, such as when you are running +a Perl program under B and want to see the output as it's +happening. This has no effect on input buffering. See L +for that. See L on how to select the output channel. +See also L. (Mnemonic: when you want your pipes to be piping hot.) + +=item IO::Handle->output_field_separator EXPR + +=item $OUTPUT_FIELD_SEPARATOR + +=item $OFS + +=item $, +X<$,> X<$OFS> X<$OUTPUT_FIELD_SEPARATOR> + +The output field separator for the print operator. If defined, this +value is printed between each of print's arguments. Default is C. +(Mnemonic: what is printed when there is a "," in your print statement.) + +=item IO::Handle->output_record_separator EXPR + +=item $OUTPUT_RECORD_SEPARATOR + +=item $ORS + +=item $\ +X<$\> X<$ORS> X<$OUTPUT_RECORD_SEPARATOR> + +The output record separator for the print operator. If defined, this +value is printed after the last of print's arguments. Default is C. +(Mnemonic: you set C<$\> instead of adding "\n" at the end of the print. +Also, it's just like C<$/>, but it's what you get "back" from Perl.) + +=item $LIST_SEPARATOR + +=item $" +X<$"> X<$LIST_SEPARATOR> + +This is like C<$,> except that it applies to array and slice values +interpolated into a double-quoted string (or similar interpreted +string). Default is a space. (Mnemonic: obvious, I think.) + +=item $SUBSCRIPT_SEPARATOR + +=item $SUBSEP + +=item $; +X<$;> X<$SUBSEP> X + +The subscript separator for multidimensional array emulation. If you +refer to a hash element as + + $foo{$a,$b,$c} + +it really means + + $foo{join($;, $a, $b, $c)} + +But don't put + + @foo{$a,$b,$c} # a slice--note the @ + +which means + + ($foo{$a},$foo{$b},$foo{$c}) + +Default is "\034", the same as SUBSEP in B. If your +keys contain binary data there might not be any safe value for C<$;>. +(Mnemonic: comma (the syntactic subscript separator) is a +semi-semicolon. Yeah, I know, it's pretty lame, but C<$,> is already +taken for something more important.) + +Consider using "real" multidimensional arrays as described +in L. + +=item HANDLE->format_page_number(EXPR) + +=item $FORMAT_PAGE_NUMBER + +=item $% +X<$%> X<$FORMAT_PAGE_NUMBER> + +The current page number of the currently selected output channel. +Used with formats. +(Mnemonic: % is page number in B.) + +=item HANDLE->format_lines_per_page(EXPR) + +=item $FORMAT_LINES_PER_PAGE + +=item $= +X<$=> X<$FORMAT_LINES_PER_PAGE> + +The current page length (printable lines) of the currently selected +output channel. Default is 60. +Used with formats. +(Mnemonic: = has horizontal lines.) + +=item HANDLE->format_lines_left(EXPR) + +=item $FORMAT_LINES_LEFT + +=item $- +X<$-> X<$FORMAT_LINES_LEFT> + +The number of lines left on the page of the currently selected output +channel. +Used with formats. +(Mnemonic: lines_on_page - lines_printed.) + +=item @LAST_MATCH_START + +=item @- +X<@-> X<@LAST_MATCH_START> + +$-[0] is the offset of the start of the last successful match. +C<$-[>IC<]> is the offset of the start of the substring matched by +I-th subpattern, or undef if the subpattern did not match. + +Thus after a match against $_, $& coincides with C. Similarly, $I coincides with C if C<$-[n]> is defined, and $+ coincides with +C. One can use C<$#-> to find the last +matched subgroup in the last successful match. Contrast with +C<$#+>, the number of subgroups in the regular expression. Compare +with C<@+>. + +This array holds the offsets of the beginnings of the last +successful submatches in the currently active dynamic scope. +C<$-[0]> is the offset into the string of the beginning of the +entire match. The Ith element of this array holds the offset +of the Ith submatch, so C<$-[1]> is the offset where $1 +begins, C<$-[2]> the offset where $2 begins, and so on. + +After a match against some variable $var: + +=over 5 + +=item C<$`> is the same as C + +=item C<$&> is the same as C + +=item C<$'> is the same as C + +=item C<$1> is the same as C + +=item C<$2> is the same as C + +=item C<$3> is the same as C + +=back + +=item %- +X<%-> + +Similar to C<%+>, this variable allows access to the named capture buffers +in the last successful match in the currently active dynamic scope. To +each capture buffer name found in the regular expression, it associates a +reference to an array containing the list of values captured by all +buffers with that name (should there be several of them), in the order +where they appear. + +Here's an example: + + if ('1234' =~ /(?1)(?2)(?3)(?4)/) { + foreach my $bufname (sort keys %-) { + my $ary = $-{$bufname}; + foreach my $idx (0..$#$ary) { + print "\$-{$bufname}[$idx] : ", + (defined($ary->[$idx]) ? "'$ary->[$idx]'" : "undef"), + "\n"; + } + } + } + +would print out: + + $-{A}[0] : '1' + $-{A}[1] : '3' + $-{B}[0] : '2' + $-{B}[1] : '4' + +The keys of the C<%-> hash correspond to all buffer names found in +the regular expression. + +The behaviour of C<%-> is implemented via the +L module. + +B C<%-> and C<%+> are tied views into a common internal hash +associated with the last successful regular expression. Therefore mixing +iterative access to them via C may have unpredictable results. +Likewise, if the last successful match changes, then the results may be +surprising. + +=item HANDLE->format_name(EXPR) + +=item $FORMAT_NAME + +=item $~ +X<$~> X<$FORMAT_NAME> + +The name of the current report format for the currently selected output +channel. Default is the name of the filehandle. (Mnemonic: brother to +C<$^>.) + +=item HANDLE->format_top_name(EXPR) + +=item $FORMAT_TOP_NAME + +=item $^ +X<$^> X<$FORMAT_TOP_NAME> + +The name of the current top-of-page format for the currently selected +output channel. Default is the name of the filehandle with _TOP +appended. (Mnemonic: points to top of page.) + +=item IO::Handle->format_line_break_characters EXPR + +=item $FORMAT_LINE_BREAK_CHARACTERS + +=item $: +X<$:> X + +The current set of characters after which a string may be broken to +fill continuation fields (starting with ^) in a format. Default is +S<" \n-">, to break on whitespace or hyphens. (Mnemonic: a "colon" in +poetry is a part of a line.) + +=item IO::Handle->format_formfeed EXPR + +=item $FORMAT_FORMFEED + +=item $^L +X<$^L> X<$FORMAT_FORMFEED> + +What formats output as a form feed. Default is \f. + +=item $ACCUMULATOR + +=item $^A +X<$^A> X<$ACCUMULATOR> + +The current value of the write() accumulator for format() lines. A format +contains formline() calls that put their result into C<$^A>. After +calling its format, write() prints out the contents of C<$^A> and empties. +So you never really see the contents of C<$^A> unless you call +formline() yourself and then look at it. See L and +L. + +=item $CHILD_ERROR + +=item $? +X<$?> X<$CHILD_ERROR> + +The status returned by the last pipe close, backtick (C<``>) command, +successful call to wait() or waitpid(), or from the system() +operator. This is just the 16-bit status word returned by the +traditional Unix wait() system call (or else is made up to look like it). Thus, the +exit value of the subprocess is really (C<<< $? >> 8 >>>), and +C<$? & 127> gives which signal, if any, the process died from, and +C<$? & 128> reports whether there was a core dump. (Mnemonic: +similar to B and B.) + +Additionally, if the C variable is supported in C, its value +is returned via $? if any C function fails. + +If you have installed a signal handler for C, the +value of C<$?> will usually be wrong outside that handler. + +Inside an C subroutine C<$?> contains the value that is going to be +given to C. You can modify C<$?> in an C subroutine to +change the exit status of your program. For example: + + END { + $? = 1 if $? == 255; # die would make it 255 + } + +Under VMS, the pragma C makes C<$?> reflect the +actual VMS exit status, instead of the default emulation of POSIX +status; see L for details. + +Also see L. + +=item ${^CHILD_ERROR_NATIVE} +X<$^CHILD_ERROR_NATIVE> + +The native status returned by the last pipe close, backtick (C<``>) +command, successful call to wait() or waitpid(), or from the system() +operator. On POSIX-like systems this value can be decoded with the +WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WIFSTOPPED, WSTOPSIG +and WIFCONTINUED functions provided by the L module. + +Under VMS this reflects the actual VMS exit status; i.e. it is the same +as $? when the pragma C is in effect. + +=item ${^ENCODING} +X<$^ENCODING> + +The I to the Encode object that is used to convert +the source code to Unicode. Thanks to this variable your perl script +does not have to be written in UTF-8. Default is I. The direct +manipulation of this variable is highly discouraged. + +=item $OS_ERROR + +=item $ERRNO + +=item $! +X<$!> X<$ERRNO> X<$OS_ERROR> + +If used numerically, yields the current value of the C C +variable, or in other words, if a system or library call fails, it +sets this variable. This means that the value of C<$!> is meaningful +only I after a B: + + if (open my $fh, "<", $filename) { + # Here $! is meaningless. + ... + } else { + # ONLY here is $! meaningful. + ... + # Already here $! might be meaningless. + } + # Since here we might have either success or failure, + # here $! is meaningless. + +In the above I stands for anything: zero, non-zero, +C. A successful system or library call does B set +the variable to zero. + +If used as a string, yields the corresponding system error string. +You can assign a number to C<$!> to set I if, for instance, +you want C<"$!"> to return the string for error I, or you want +to set the exit value for the die() operator. (Mnemonic: What just +went bang?) + +Also see L. + +=item %OS_ERROR + +=item %ERRNO + +=item %! +X<%!> + +Each element of C<%!> has a true value only if C<$!> is set to that +value. For example, C<$!{ENOENT}> is true if and only if the current +value of C<$!> is C; that is, if the most recent error was +"No such file or directory" (or its moral equivalent: not all operating +systems give that exact error, and certainly not all languages). +To check if a particular key is meaningful on your system, use +C; for a list of legal keys, use C. +See L for more information, and also see above for the +validity of C<$!>. + +=item $EXTENDED_OS_ERROR + +=item $^E +X<$^E> X<$EXTENDED_OS_ERROR> + +Error information specific to the current operating system. At +the moment, this differs from C<$!> under only VMS, OS/2, and Win32 +(and for MacPerl). On all other platforms, C<$^E> is always just +the same as C<$!>. + +Under VMS, C<$^E> provides the VMS status value from the last +system error. This is more specific information about the last +system error than that provided by C<$!>. This is particularly +important when C<$!> is set to B. + +Under OS/2, C<$^E> is set to the error code of the last call to +OS/2 API either via CRT, or directly from perl. + +Under Win32, C<$^E> always returns the last error information +reported by the Win32 call C which describes +the last error from within the Win32 API. Most Win32-specific +code will report errors via C<$^E>. ANSI C and Unix-like calls +set C and so most portable Perl code will report errors +via C<$!>. + +Caveats mentioned in the description of C<$!> generally apply to +C<$^E>, also. (Mnemonic: Extra error explanation.) + +Also see L. + +=item $EVAL_ERROR + +=item $@ +X<$@> X<$EVAL_ERROR> + +The Perl syntax error message from the last eval() operator. +If $@ is the null string, the last eval() parsed and executed +correctly (although the operations you invoked may have failed in the +normal fashion). (Mnemonic: Where was the syntax error "at"?) + +Warning messages are not collected in this variable. You can, +however, set up a routine to process warnings by setting C<$SIG{__WARN__}> +as described below. + +Also see L. + +=item $PROCESS_ID + +=item $PID + +=item $$ +X<$$> X<$PID> X<$PROCESS_ID> + +The process number of the Perl running this script. You should +consider this variable read-only, although it will be altered +across fork() calls. (Mnemonic: same as shells.) + +Note for Linux users: on Linux, the C functions C and +C return different values from different threads. In order to +be portable, this behavior is not reflected by C<$$>, whose value remains +consistent across threads. If you want to call the underlying C, +you may use the CPAN module C. + +=item $REAL_USER_ID + +=item $UID + +=item $< +X<< $< >> X<$UID> X<$REAL_USER_ID> + +The real uid of this process. (Mnemonic: it's the uid you came I, +if you're running setuid.) You can change both the real uid and +the effective uid at the same time by using POSIX::setuid(). Since +changes to $< require a system call, check $! after a change attempt to +detect any possible errors. + +=item $EFFECTIVE_USER_ID + +=item $EUID + +=item $> +X<< $> >> X<$EUID> X<$EFFECTIVE_USER_ID> + +The effective uid of this process. Example: + + $< = $>; # set real to effective uid + ($<,$>) = ($>,$<); # swap real and effective uid + +You can change both the effective uid and the real uid at the same +time by using POSIX::setuid(). Changes to $> require a check to $! +to detect any possible errors after an attempted change. + +(Mnemonic: it's the uid you went I, if you're running setuid.) +C<< $< >> and C<< $> >> can be swapped only on machines +supporting setreuid(). + +=item $REAL_GROUP_ID + +=item $GID + +=item $( +X<$(> X<$GID> X<$REAL_GROUP_ID> + +The real gid of this process. If you are on a machine that supports +membership in multiple groups simultaneously, gives a space separated +list of groups you are in. The first number is the one returned by +getgid(), and the subsequent ones by getgroups(), one of which may be +the same as the first number. + +However, a value assigned to C<$(> must be a single number used to +set the real gid. So the value given by C<$(> should I be assigned +back to C<$(> without being forced numeric, such as by adding zero. Note +that this is different to the effective gid (C<$)>) which does take a +list. + +You can change both the real gid and the effective gid at the same +time by using POSIX::setgid(). Changes to $( require a check to $! +to detect any possible errors after an attempted change. + +(Mnemonic: parentheses are used to I things. The real gid is the +group you I, if you're running setgid.) + +=item $EFFECTIVE_GROUP_ID + +=item $EGID + +=item $) +X<$)> X<$EGID> X<$EFFECTIVE_GROUP_ID> + +The effective gid of this process. If you are on a machine that +supports membership in multiple groups simultaneously, gives a space +separated list of groups you are in. The first number is the one +returned by getegid(), and the subsequent ones by getgroups(), one of +which may be the same as the first number. + +Similarly, a value assigned to C<$)> must also be a space-separated +list of numbers. The first number sets the effective gid, and +the rest (if any) are passed to setgroups(). To get the effect of an +empty list for setgroups(), just repeat the new effective gid; that is, +to force an effective gid of 5 and an effectively empty setgroups() +list, say C< $) = "5 5" >. + +You can change both the effective gid and the real gid at the same +time by using POSIX::setgid() (use only a single numeric argument). +Changes to $) require a check to $! to detect any possible errors +after an attempted change. + +(Mnemonic: parentheses are used to I things. The effective gid +is the group that's I for you, if you're running setgid.) + +C<< $< >>, C<< $> >>, C<$(> and C<$)> can be set only on +machines that support the corresponding I routine. C<$(> +and C<$)> can be swapped only on machines supporting setregid(). + +=item $PROGRAM_NAME + +=item $0 +X<$0> X<$PROGRAM_NAME> + +Contains the name of the program being executed. + +On some (read: not all) operating systems assigning to C<$0> modifies +the argument area that the C program sees. On some platforms you +may have to use special C options or a different C to see the +changes. Modifying the $0 is more useful as a way of indicating the +current program state than it is for hiding the program you're +running. (Mnemonic: same as B and B.) + +Note that there are platform specific limitations on the maximum +length of C<$0>. In the most extreme case it may be limited to the +space occupied by the original C<$0>. + +In some platforms there may be arbitrary amount of padding, for +example space characters, after the modified name as shown by C. +In some platforms this padding may extend all the way to the original +length of the argument area, no matter what you do (this is the case +for example with Linux 2.2). + +Note for BSD users: setting C<$0> does not completely remove "perl" +from the ps(1) output. For example, setting C<$0> to C<"foobar"> may +result in C<"perl: foobar (perl)"> (whether both the C<"perl: "> prefix +and the " (perl)" suffix are shown depends on your exact BSD variant +and version). This is an operating system feature, Perl cannot help it. + +In multithreaded scripts Perl coordinates the threads so that any +thread may modify its copy of the C<$0> and the change becomes visible +to ps(1) (assuming the operating system plays along). Note that +the view of C<$0> the other threads have will not change since they +have their own copies of it. + +If the program has been given to perl via the switches C<-e> or C<-E>, +C<$0> will contain the string C<"-e">. + +=item $[ +X<$[> + +The index of the first element in an array, and of the first character +in a substring. Default is 0, but you could theoretically set it +to 1 to make Perl behave more like B (or Fortran) when +subscripting and when evaluating the index() and substr() functions. +(Mnemonic: [ begins subscripts.) + +As of release 5 of Perl, assignment to C<$[> is treated as a compiler +directive, and cannot influence the behavior of any other file. +(That's why you can only assign compile-time constants to it.) +Its use is highly discouraged. + +Note that, unlike other compile-time directives (such as L), +assignment to C<$[> can be seen from outer lexical scopes in the same file. +However, you can use local() on it to strictly bind its value to a +lexical block. + +=item $] +X<$]> + +The version + patchlevel / 1000 of the Perl interpreter. This variable +can be used to determine whether the Perl interpreter executing a +script is in the right range of versions. (Mnemonic: Is this version +of perl in the right bracket?) Example: + + warn "No checksumming!\n" if $] < 3.019; + +See also the documentation of C and C +for a convenient way to fail if the running Perl interpreter is too old. + +The floating point representation can sometimes lead to inaccurate +numeric comparisons. See C<$^V> for a more modern representation of +the Perl version that allows accurate string comparisons. + +=item $COMPILING + +=item $^C +X<$^C> X<$COMPILING> + +The current value of the flag associated with the B<-c> switch. +Mainly of use with B<-MO=...> to allow code to alter its behavior +when being compiled, such as for example to AUTOLOAD at compile +time rather than normal, deferred loading. Setting +C<$^C = 1> is similar to calling C. + +=item $DEBUGGING + +=item $^D +X<$^D> X<$DEBUGGING> + +The current value of the debugging flags. (Mnemonic: value of B<-D> +switch.) May be read or set. Like its command-line equivalent, you can use +numeric or symbolic values, eg C<$^D = 10> or C<$^D = "st">. + +=item ${^RE_DEBUG_FLAGS} + +The current value of the regex debugging flags. Set to 0 for no debug output +even when the re 'debug' module is loaded. See L for details. + +=item ${^RE_TRIE_MAXBUF} + +Controls how certain regex optimisations are applied and how much memory they +utilize. This value by default is 65536 which corresponds to a 512kB temporary +cache. Set this to a higher value to trade memory for speed when matching +large alternations. Set it to a lower value if you want the optimisations to +be as conservative of memory as possible but still occur, and set it to a +negative value to prevent the optimisation and conserve the most memory. +Under normal situations this variable should be of no interest to you. + +=item $SYSTEM_FD_MAX + +=item $^F +X<$^F> X<$SYSTEM_FD_MAX> + +The maximum system file descriptor, ordinarily 2. System file +descriptors are passed to exec()ed processes, while higher file +descriptors are not. Also, during an open(), system file descriptors are +preserved even if the open() fails. (Ordinary file descriptors are +closed before the open() is attempted.) The close-on-exec +status of a file descriptor will be decided according to the value of +C<$^F> when the corresponding file, pipe, or socket was opened, not the +time of the exec(). + +=item $^H + +WARNING: This variable is strictly for internal use only. Its availability, +behavior, and contents are subject to change without notice. + +This variable contains compile-time hints for the Perl interpreter. At the +end of compilation of a BLOCK the value of this variable is restored to the +value when the interpreter started to compile the BLOCK. + +When perl begins to parse any block construct that provides a lexical scope +(e.g., eval body, required file, subroutine body, loop body, or conditional +block), the existing value of $^H is saved, but its value is left unchanged. +When the compilation of the block is completed, it regains the saved value. +Between the points where its value is saved and restored, code that +executes within BEGIN blocks is free to change the value of $^H. + +This behavior provides the semantic of lexical scoping, and is used in, +for instance, the C pragma. + +The contents should be an integer; different bits of it are used for +different pragmatic flags. Here's an example: + + sub add_100 { $^H |= 0x100 } + + sub foo { + BEGIN { add_100() } + bar->baz($boon); + } + +Consider what happens during execution of the BEGIN block. At this point +the BEGIN block has already been compiled, but the body of foo() is still +being compiled. The new value of $^H will therefore be visible only while +the body of foo() is being compiled. + +Substitution of the above BEGIN block with: + + BEGIN { require strict; strict->import('vars') } + +demonstrates how C is implemented. Here's a conditional +version of the same lexical pragma: + + BEGIN { require strict; strict->import('vars') if $condition } + +=item %^H + +The %^H hash provides the same scoping semantic as $^H. This makes it +useful for implementation of lexically scoped pragmas. See L. + +=item $INPLACE_EDIT + +=item $^I +X<$^I> X<$INPLACE_EDIT> + +The current value of the inplace-edit extension. Use C to disable +inplace editing. (Mnemonic: value of B<-i> switch.) + +=item $^M +X<$^M> + +By default, running out of memory is an untrappable, fatal error. +However, if suitably built, Perl can use the contents of C<$^M> +as an emergency memory pool after die()ing. Suppose that your Perl +were compiled with C<-DPERL_EMERGENCY_SBRK> and used Perl's malloc. +Then + + $^M = 'a' x (1 << 16); + +would allocate a 64K buffer for use in an emergency. See the +F file in the Perl distribution for information on how to +add custom C compilation flags when compiling perl. To discourage casual +use of this advanced feature, there is no L long name for +this variable. + +=item $OSNAME + +=item $^O +X<$^O> X<$OSNAME> + +The name of the operating system under which this copy of Perl was +built, as determined during the configuration process. The value +is identical to C<$Config{'osname'}>. See also L and the +B<-V> command-line switch documented in L. + +In Windows platforms, $^O is not very helpful: since it is always +C, it doesn't tell the difference between +95/98/ME/NT/2000/XP/CE/.NET. Use Win32::GetOSName() or +Win32::GetOSVersion() (see L and L) to distinguish +between the variants. + +=item ${^OPEN} + +An internal variable used by PerlIO. A string in two parts, separated +by a C<\0> byte, the first part describes the input layers, the second +part describes the output layers. + +=item $PERLDB + +=item $^P +X<$^P> X<$PERLDB> + +The internal variable for debugging support. The meanings of the +various bits are subject to change, but currently indicate: + +=over 6 + +=item 0x01 + +Debug subroutine enter/exit. + +=item 0x02 + +Line-by-line debugging. Causes DB::DB() subroutine to be called for each +statement executed. Also causes saving source code lines (like 0x400). + +=item 0x04 + +Switch off optimizations. + +=item 0x08 + +Preserve more data for future interactive inspections. + +=item 0x10 + +Keep info about source lines on which a subroutine is defined. + +=item 0x20 + +Start with single-step on. + +=item 0x40 + +Use subroutine address instead of name when reporting. + +=item 0x80 + +Report C as well. + +=item 0x100 + +Provide informative "file" names for evals based on the place they were compiled. + +=item 0x200 + +Provide informative names to anonymous subroutines based on the place they +were compiled. + +=item 0x400 + +Save source code lines into C<@{"_<$filename"}>. + +=back + +Some bits may be relevant at compile-time only, some at +run-time only. This is a new mechanism and the details may change. +See also L. + +=item $LAST_REGEXP_CODE_RESULT + +=item $^R +X<$^R> X<$LAST_REGEXP_CODE_RESULT> + +The result of evaluation of the last successful C<(?{ code })> +regular expression assertion (see L). May be written to. + +=item $EXCEPTIONS_BEING_CAUGHT + +=item $^S +X<$^S> X<$EXCEPTIONS_BEING_CAUGHT> + +Current state of the interpreter. + + $^S State + --------- ------------------- + undef Parsing module/eval + true (1) Executing an eval + false (0) Otherwise + +The first state may happen in $SIG{__DIE__} and $SIG{__WARN__} handlers. + +=item $BASETIME + +=item $^T +X<$^T> X<$BASETIME> + +The time at which the program began running, in seconds since the +epoch (beginning of 1970). The values returned by the B<-M>, B<-A>, +and B<-C> filetests are based on this value. + +=item ${^TAINT} + +Reflects if taint mode is on or off. 1 for on (the program was run with +B<-T>), 0 for off, -1 when only taint warnings are enabled (i.e. with +B<-t> or B<-TU>). This variable is read-only. + +=item ${^UNICODE} + +Reflects certain Unicode settings of Perl. See L +documentation for the C<-C> switch for more information about +the possible values. This variable is set during Perl startup +and is thereafter read-only. + +=item ${^UTF8CACHE} + +This variable controls the state of the internal UTF-8 offset caching code. +1 for on (the default), 0 for off, -1 to debug the caching code by checking +all its results against linear scans, and panicking on any discrepancy. + +=item ${^UTF8LOCALE} + +This variable indicates whether an UTF-8 locale was detected by perl at +startup. This information is used by perl when it's in +adjust-utf8ness-to-locale mode (as when run with the C<-CL> command-line +switch); see L for more info on this. + +=item $PERL_VERSION + +=item $^V +X<$^V> X<$PERL_VERSION> + +The revision, version, and subversion of the Perl interpreter, represented +as a C object. + +This variable first appeared in perl 5.6.0; earlier versions of perl will +see an undefined value. Before perl 5.10.0 $^V was represented as a v-string. + +$^V can be used to determine whether the Perl interpreter executing a +script is in the right range of versions. (Mnemonic: use ^V for Version +Control.) Example: + + warn "Hashes not randomized!\n" if !$^V or $^V lt v5.8.1 + +To convert C<$^V> into its string representation use sprintf()'s +C<"%vd"> conversion: + + printf "version is v%vd\n", $^V; # Perl's version + +See the documentation of C and C +for a convenient way to fail if the running Perl interpreter is too old. + +See also C<$]> for an older representation of the Perl version. + +=item $WARNING + +=item $^W +X<$^W> X<$WARNING> + +The current value of the warning switch, initially true if B<-w> +was used, false otherwise, but directly modifiable. (Mnemonic: +related to the B<-w> switch.) See also L. + +=item ${^WARNING_BITS} + +The current set of warning checks enabled by the C pragma. +See the documentation of C for more details. + +=item ${^WIN32_SLOPPY_STAT} + +If this variable is set to a true value, then stat() on Windows will +not try to open the file. This means that the link count cannot be +determined and file attributes may be out of date if additional +hardlinks to the file exist. On the other hand, not opening the file +is considerably faster, especially for files on network drives. + +This variable could be set in the F file to +configure the local Perl installation to use "sloppy" stat() by +default. See L for more information about site +customization. + +=item $EXECUTABLE_NAME + +=item $^X +X<$^X> X<$EXECUTABLE_NAME> + +The name used to execute the current copy of Perl, from C's +C or (where supported) F. + +Depending on the host operating system, the value of $^X may be +a relative or absolute pathname of the perl program file, or may +be the string used to invoke perl but not the pathname of the +perl program file. Also, most operating systems permit invoking +programs that are not in the PATH environment variable, so there +is no guarantee that the value of $^X is in PATH. For VMS, the +value may or may not include a version number. + +You usually can use the value of $^X to re-invoke an independent +copy of the same perl that is currently running, e.g., + + @first_run = `$^X -le "print int rand 100 for 1..100"`; + +But recall that not all operating systems support forking or +capturing of the output of commands, so this complex statement +may not be portable. + +It is not safe to use the value of $^X as a path name of a file, +as some operating systems that have a mandatory suffix on +executable files do not require use of the suffix when invoking +a command. To convert the value of $^X to a path name, use the +following statements: + + # Build up a set of file names (not command names). + use Config; + $this_perl = $^X; + if ($^O ne 'VMS') + {$this_perl .= $Config{_exe} + unless $this_perl =~ m/$Config{_exe}$/i;} + +Because many operating systems permit anyone with read access to +the Perl program file to make a copy of it, patch the copy, and +then execute the copy, the security-conscious Perl programmer +should take care to invoke the installed copy of perl, not the +copy referenced by $^X. The following statements accomplish +this goal, and produce a pathname that can be invoked as a +command or referenced as a file. + + use Config; + $secure_perl_path = $Config{perlpath}; + if ($^O ne 'VMS') + {$secure_perl_path .= $Config{_exe} + unless $secure_perl_path =~ m/$Config{_exe}$/i;} + +=item ARGV +X + +The special filehandle that iterates over command-line filenames in +C<@ARGV>. Usually written as the null filehandle in the angle operator +C<< <> >>. Note that currently C only has its magical effect +within the C<< <> >> operator; elsewhere it is just a plain filehandle +corresponding to the last file opened by C<< <> >>. In particular, +passing C<\*ARGV> as a parameter to a function that expects a filehandle +may not cause your function to automatically read the contents of all the +files in C<@ARGV>. + +=item $ARGV +X<$ARGV> + +contains the name of the current file when reading from <>. + +=item @ARGV +X<@ARGV> + +The array @ARGV contains the command-line arguments intended for +the script. C<$#ARGV> is generally the number of arguments minus +one, because C<$ARGV[0]> is the first argument, I the program's +command name itself. See C<$0> for the command name. + +=item ARGVOUT +X + +The special filehandle that points to the currently open output file +when doing edit-in-place processing with B<-i>. Useful when you have +to do a lot of inserting and don't want to keep modifying $_. See +L for the B<-i> switch. + +=item @F +X<@F> + +The array @F contains the fields of each line read in when autosplit +mode is turned on. See L for the B<-a> switch. This array +is package-specific, and must be declared or given a full package name +if not in package main when running under C. + +=item @INC +X<@INC> + +The array @INC contains the list of places that the C, +C, or C constructs look for their library files. It +initially consists of the arguments to any B<-I> command-line +switches, followed by the default Perl library, probably +F, followed by ".", to represent the current +directory. ("." will not be appended if taint checks are enabled, either by +C<-T> or by C<-t>.) If you need to modify this at runtime, you should use +the C pragma to get the machine-dependent library properly +loaded also: + + use lib '/mypath/libdir/'; + use SomeMod; + +You can also insert hooks into the file inclusion system by putting Perl +code directly into @INC. Those hooks may be subroutine references, array +references or blessed objects. See L for details. + +=item @ARG + +=item @_ +X<@_> X<@ARG> + +Within a subroutine the array @_ contains the parameters passed to that +subroutine. See L. + +=item %INC +X<%INC> + +The hash %INC contains entries for each filename included via the +C, C, or C operators. The key is the filename +you specified (with module names converted to pathnames), and the +value is the location of the file found. The C +operator uses this hash to determine whether a particular file has +already been included. + +If the file was loaded via a hook (e.g. a subroutine reference, see +L for a description of these hooks), this hook is +by default inserted into %INC in place of a filename. Note, however, +that the hook may have set the %INC entry by itself to provide some more +specific info. + +=item %ENV + +=item $ENV{expr} +X<%ENV> + +The hash %ENV contains your current environment. Setting a +value in C changes the environment for any child processes +you subsequently fork() off. + +=item %SIG + +=item $SIG{expr} +X<%SIG> + +The hash C<%SIG> contains signal handlers for signals. For example: + + sub handler { # 1st argument is signal name + my($sig) = @_; + print "Caught a SIG$sig--shutting down\n"; + close(LOG); + exit(0); + } + + $SIG{'INT'} = \&handler; + $SIG{'QUIT'} = \&handler; + ... + $SIG{'INT'} = 'DEFAULT'; # restore default action + $SIG{'QUIT'} = 'IGNORE'; # ignore SIGQUIT + +Using a value of C<'IGNORE'> usually has the effect of ignoring the +signal, except for the C signal. See L for more about +this special case. + +Here are some other examples: + + $SIG{"PIPE"} = "Plumber"; # assumes main::Plumber (not recommended) + $SIG{"PIPE"} = \&Plumber; # just fine; assume current Plumber + $SIG{"PIPE"} = *Plumber; # somewhat esoteric + $SIG{"PIPE"} = Plumber(); # oops, what did Plumber() return?? + +Be sure not to use a bareword as the name of a signal handler, +lest you inadvertently call it. + +If your system has the sigaction() function then signal handlers are +installed using it. This means you get reliable signal handling. + +The default delivery policy of signals changed in Perl 5.8.0 from +immediate (also known as "unsafe") to deferred, also known as +"safe signals". See L for more information. + +Certain internal hooks can be also set using the %SIG hash. The +routine indicated by C<$SIG{__WARN__}> is called when a warning message is +about to be printed. The warning message is passed as the first +argument. The presence of a C<__WARN__> hook causes the ordinary printing +of warnings to C to be suppressed. You can use this to save warnings +in a variable, or turn warnings into fatal errors, like this: + + local $SIG{__WARN__} = sub { die $_[0] }; + eval $proggie; + +As the C<'IGNORE'> hook is not supported by C<__WARN__>, you can +disable warnings using the empty subroutine: + + local $SIG{__WARN__} = sub {}; + +The routine indicated by C<$SIG{__DIE__}> is called when a fatal exception +is about to be thrown. The error message is passed as the first +argument. When a C<__DIE__> hook routine returns, the exception +processing continues as it would have in the absence of the hook, +unless the hook routine itself exits via a C, a loop exit, or a C. +The C<__DIE__> handler is explicitly disabled during the call, so that you +can die from a C<__DIE__> handler. Similarly for C<__WARN__>. + +Due to an implementation glitch, the C<$SIG{__DIE__}> hook is called +even inside an eval(). Do not use this to rewrite a pending exception +in C<$@>, or as a bizarre substitute for overriding C. +This strange action at a distance may be fixed in a future release +so that C<$SIG{__DIE__}> is only called if your program is about +to exit, as was the original intent. Any other use is deprecated. + +C<__DIE__>/C<__WARN__> handlers are very special in one respect: +they may be called to report (probable) errors found by the parser. +In such a case the parser may be in inconsistent state, so any +attempt to evaluate Perl code from such a handler will probably +result in a segfault. This means that warnings or errors that +result from parsing Perl should be used with extreme caution, like +this: + + require Carp if defined $^S; + Carp::confess("Something wrong") if defined &Carp::confess; + die "Something wrong, but could not load Carp to give backtrace... + To see backtrace try starting Perl with -MCarp switch"; + +Here the first line will load Carp I it is the parser who +called the handler. The second line will print backtrace and die if +Carp was available. The third line will be executed only if Carp was +not available. + +See L, L, L, and +L for additional information. + +=back + +=head2 Error Indicators +X X + +The variables C<$@>, C<$!>, C<$^E>, and C<$?> contain information +about different types of error conditions that may appear during +execution of a Perl program. The variables are shown ordered by +the "distance" between the subsystem which reported the error and +the Perl process. They correspond to errors detected by the Perl +interpreter, C library, operating system, or an external program, +respectively. + +To illustrate the differences between these variables, consider the +following Perl expression, which uses a single-quoted string: + + eval q{ + open my $pipe, "/cdrom/install |" or die $!; + my @res = <$pipe>; + close $pipe or die "bad pipe: $?, $!"; + }; + +After execution of this statement all 4 variables may have been set. + +C<$@> is set if the string to be C-ed did not compile (this +may happen if C or C were imported with bad prototypes), +or if Perl code executed during evaluation die()d . In these cases +the value of $@ is the compile error, or the argument to C +(which will interpolate C<$!> and C<$?>). (See also L, +though.) + +When the eval() expression above is executed, open(), C<< >>, +and C are translated to calls in the C run-time library and +thence to the operating system kernel. C<$!> is set to the C library's +C if one of these calls fails. + +Under a few operating systems, C<$^E> may contain a more verbose +error indicator, such as in this case, "CDROM tray not closed." +Systems that do not support extended error messages leave C<$^E> +the same as C<$!>. + +Finally, C<$?> may be set to non-0 value if the external program +F fails. The upper eight bits reflect specific +error conditions encountered by the program (the program's exit() +value). The lower eight bits reflect mode of failure, like signal +death and core dump information See wait(2) for details. In +contrast to C<$!> and C<$^E>, which are set only if error condition +is detected, the variable C<$?> is set on each C or pipe +C, overwriting the old value. This is more like C<$@>, which +on every eval() is always set on failure and cleared on success. + +For more details, see the individual descriptions at C<$@>, C<$!>, C<$^E>, +and C<$?>. + +=head2 Technical Note on the Syntax of Variable Names + +Variable names in Perl can have several formats. Usually, they +must begin with a letter or underscore, in which case they can be +arbitrarily long (up to an internal limit of 251 characters) and +may contain letters, digits, underscores, or the special sequence +C<::> or C<'>. In this case, the part before the last C<::> or +C<'> is taken to be a I; see L. + +Perl variable names may also be a sequence of digits or a single +punctuation or control character. These names are all reserved for +special uses by Perl; for example, the all-digits names are used +to hold data captured by backreferences after a regular expression +match. Perl has a special syntax for the single-control-character +names: It understands C<^X> (caret C) to mean the control-C +character. For example, the notation C<$^W> (dollar-sign caret +C) is the scalar variable whose name is the single character +control-C. This is better than typing a literal control-C +into your program. + +Finally, new in Perl 5.6, Perl variable names may be alphanumeric +strings that begin with control characters (or better yet, a caret). +These variables must be written in the form C<${^Foo}>; the braces +are not optional. C<${^Foo}> denotes the scalar variable whose +name is a control-C followed by two C's. These variables are +reserved for future special uses by Perl, except for the ones that +begin with C<^_> (control-underscore or caret-underscore). No +control-character name that begins with C<^_> will acquire a special +meaning in any future version of Perl; such names may therefore be +used safely in programs. C<$^_> itself, however, I reserved. + +Perl identifiers that begin with digits, control characters, or +punctuation characters are exempt from the effects of the C +declaration and are always forced to be in package C
    ; they are +also exempt from C errors. A few other names are also +exempt in these ways: + + ENV STDIN + INC STDOUT + ARGV STDERR + ARGVOUT _ + SIG + +In particular, the new special C<${^_XYZ}> variables are always taken +to be in package C
    , regardless of any C declarations +presently in scope. + +=head1 BUGS + +Due to an unfortunate accident of Perl's implementation, C imposes a considerable performance penalty on all regular +expression matches in a program, regardless of whether they occur +in the scope of C. For that reason, saying C in libraries is strongly discouraged. See the +Devel::SawAmpersand module documentation from CPAN +( http://www.cpan.org/modules/by-module/Devel/ ) +for more information. Writing C +avoids the performance penalty. + +Having to even think about the C<$^S> variable in your exception +handlers is simply wrong. C<$SIG{__DIE__}> as currently implemented +invites grievous and difficult to track down errors. Avoid it +and use an C or CORE::GLOBAL::die override instead. diff --git a/gnu/usr.bin/perl/ext/Pod-Html/lib/Pod/Html/Util.pm b/gnu/usr.bin/perl/ext/Pod-Html/lib/Pod/Html/Util.pm new file mode 100644 index 00000000000..57fcab95cff --- /dev/null +++ b/gnu/usr.bin/perl/ext/Pod-Html/lib/Pod/Html/Util.pm @@ -0,0 +1,282 @@ +package Pod::Html::Util; +use strict; +use Exporter 'import'; + +our $VERSION = 1.33; # Please keep in synch with lib/Pod/Html.pm +$VERSION = eval $VERSION; +our @EXPORT_OK = qw( + anchorify + html_escape + htmlify + process_command_line + relativize_url + trim_leading_whitespace + unixify + usage +); + +use Config; +use File::Spec; +use File::Spec::Unix; +use Getopt::Long; +use Pod::Simple::XHTML; +use Text::Tabs; +use locale; # make \w work right in non-ASCII lands + +=head1 NAME + +Pod::Html::Util - helper functions for Pod-Html + +=head1 SUBROUTINES + +B While these functions are importable on request from +F, they are specifically intended for use within (a) the +F distribution (modules and test programs) shipped as part of the +Perl 5 core and (b) other parts of the core such as the F +program. These functions may be modified or relocated within the core +distribution -- or removed entirely therefrom -- as the core's needs evolve. +Hence, you should not rely on these functions in situations other than those +just described. + +=cut + +=head2 C + +Process command-line switches (options). Returns a reference to a hash. Will +provide usage message if C<--help> switch is present or if parameters are +invalid. + +Calling this subroutine may modify C<@ARGV>. + +=cut + +sub process_command_line { + my %opts = map { $_ => undef } (qw| + backlink cachedir css flush + header help htmldir htmlroot + index infile outfile poderrors + podpath podroot quiet recurse + title verbose + |); + unshift @ARGV, split ' ', $Config{pod2html} if $Config{pod2html}; + my $result = GetOptions(\%opts, + 'backlink!', + 'cachedir=s', + 'css=s', + 'flush', + 'help', + 'header!', + 'htmldir=s', + 'htmlroot=s', + 'index!', + 'infile=s', + 'outfile=s', + 'poderrors!', + 'podpath=s', + 'podroot=s', + 'quiet!', + 'recurse!', + 'title=s', + 'verbose!', + ); + usage("-", "invalid parameters") if not $result; + usage("-") if defined $opts{help}; # see if the user asked for help + $opts{help} = ""; # just to make -w shut-up. + return \%opts; +} + +=head2 C + +Display customary Pod::Html usage information on STDERR. + +=cut + +sub usage { + my $podfile = shift; + warn "$0: $podfile: @_\n" if @_; + die < --htmlroot= + --infile= --outfile= + --podpath=:...: --podroot= + --cachedir= --flush --recurse --norecurse + --quiet --noquiet --verbose --noverbose + --index --noindex --backlink --nobacklink + --header --noheader --poderrors --nopoderrors + --css= --title= + + --[no]backlink - turn =head1 directives into links pointing to the top of + the page (off by default). + --cachedir - directory for the directory cache files. + --css - stylesheet URL + --flush - flushes the directory cache. + --[no]header - produce block header/footer (default is no headers). + --help - prints this message. + --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). + --outfile - filename for the resulting html file (output sent to + stdout by default). + --[no]poderrors - include a POD ERRORS section in the output if there were + any POD errors in the input (default behavior). + --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). + +END_OF_USAGE + +} + +=head2 C + +Ensure that F's internals and tests handle paths consistently +across Unix, Windows and VMS. + +=cut + +sub unixify { + my $full_path = shift; + return '' unless $full_path; + return $full_path if $full_path eq '/'; + + my ($vol, $dirs, $file) = File::Spec->splitpath($full_path); + my @dirs = $dirs eq File::Spec->curdir() + ? (File::Spec::Unix->curdir()) + : File::Spec->splitdir($dirs); + if (defined($vol) && $vol) { + $vol =~ s/:$// if $^O eq 'VMS'; + $vol = uc $vol if $^O eq 'MSWin32'; + + if( $dirs[0] ) { + unshift @dirs, $vol; + } + else { + $dirs[0] = $vol; + } + } + unshift @dirs, '' if File::Spec->file_name_is_absolute($full_path); + return $file unless scalar(@dirs); + $full_path = File::Spec::Unix->catfile(File::Spec::Unix->catdir(@dirs), + $file); + $full_path =~ s|^\/|| if $^O eq 'MSWin32'; # C:/foo works, /C:/foo doesn't + $full_path =~ s/\^\././g if $^O eq 'VMS'; # unescape dots + return $full_path; +} + +=head2 C + +Convert an absolute URL to one relative to a base URL. +Assumes both end in a filename. + +=cut + +sub relativize_url { + my ($dest, $source) = @_; + + # Remove each file from its path + 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 '/') { + $rel_path .= "/$dest_file"; + } else { + $rel_path .= "$dest_file"; + } + + return $rel_path; +} + +=head2 C + +Make text safe for HTML. + +=cut + +sub html_escape { + my $rest = $_[0]; + $rest =~ s/&/&/g; + $rest =~ s//>/g; + $rest =~ s/"/"/g; + $rest =~ s/([[:^print:]])/sprintf("&#x%x;", ord($1))/aeg; + return $rest; +} + +=head2 C + + 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...). + +=cut + +sub htmlify { + my( $heading) = @_; + return Pod::Simple::XHTML->can("idify")->(undef, $heading, 1); +} + +=head2 C + + anchorify(@heading); + +Similar to C, but turns non-alphanumerics into underscores. Note +that C is not exported by default. + +=cut + +sub anchorify { + my ($anchor) = @_; + $anchor = htmlify($anchor); + $anchor =~ s/\W/_/g; + return $anchor; +} + +=head2 C + +Remove any level of indentation (spaces or tabs) from each code block +consistently. Adapted from: +https://metacpan.org/source/HAARG/MetaCPAN-Pod-XHTML-0.002001/lib/Pod/Simple/Role/StripVerbatimIndent.pm + +=cut + +sub trim_leading_whitespace { + my ($para) = @_; + + # Start by converting tabs to spaces + @$para = Text::Tabs::expand(@$para); + + # Find the line with the least amount of indent, as that's our "base" + my @indent_levels = (sort(map { $_ =~ /^( *)./mg } @$para)); + my $indent = $indent_levels[0] || ""; + + # Remove the "base" amount of indent from each line + foreach (@$para) { + $_ =~ s/^\Q$indent//mg; + } + + return; +} + +1; + diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/anchorify-536.t b/gnu/usr.bin/perl/ext/Pod-Html/t/anchorify-536.t new file mode 100644 index 00000000000..e8e01ea9c54 --- /dev/null +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/anchorify-536.t @@ -0,0 +1,114 @@ +use strict; +use warnings; +use Pod::Html qw( anchorify relativize_url ); +my ($revision,$version,$subversion) = split /\./, sprintf("%vd",$^V); +use Test::More; +unless ($version == 35 or $version == 36) { + plan skip_all => "Needed only during 5.36"; +} + +my @filedata; +{ + local $/ = ''; + @filedata = ; +} + +my (@poddata, $i, $j); +for ($i = 0, $j = -1; $i <= $#filedata; $i++) { + $j++ if ($filedata[$i] =~ /^\s*=head[1-6]/); + if ($j >= 0) { + $poddata[$j] = "" unless defined $poddata[$j]; + $poddata[$j] .= "\n$filedata[$i]" if $j >= 0; + } +} + +my %heads = (); +foreach $i (0..$#poddata) { + $heads{anchorify($1)} = 1 if $poddata[$i] =~ /=head[1-6]\s+(.*)/; +} +my %expected = map { $_ => 1 } qw( + NAME + DESCRIPTION + Subroutine + Error + Method + Has_A_Wordspace + HasTrailingWordspace + HasLeadingWordspace + Has_Extra_InternalWordspace + Has_Quotes + Has_QuestionMark + Has_Hyphen_And_Space +); +is_deeply( + \%heads, + \%expected, + "Got expected POD heads" +); + +{ + # adapted from 'installhtml' + my $file = '/home/username/tmp/installhtml/pod/perlipc'; + my $capture = 'NAME'; + my $expected_url = '/home/username/tmp/installhtml/pod/perlipc/NAME.html'; + my $expected_relativized_url = 'perlipc/NAME.html'; + my $url = "$file/@{[anchorify(qq($capture))]}.html" ; + is($url, $expected_url, "anchorify() returned expected value"); + my $relativized_url = relativize_url( $url, "$file.html" ); + is($relativized_url, $expected_relativized_url, "relativize_url() returned expected value"); +} + +done_testing; + +__DATA__ +=head1 NAME + +anchorify - Test C + +=head1 DESCRIPTION + +alpha + +=head2 Subroutine + +beta + +=head3 Error + +gamma + +=head4 Method + +delta + +=head4 Has A Wordspace + +delta + +=head4 HasTrailingWordspace + +epsilon + +=head4 HasLeadingWordspace + +zeta + +=head4 Has Extra InternalWordspace + +eta + +=head4 Has"Quotes" + +theta + +=head4 Has?QuestionMark + +iota + +=head4 Has-Hyphen And Space + +kappa + +=cut + +__END__ diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/anchorify.t b/gnu/usr.bin/perl/ext/Pod-Html/t/anchorify.t index 0677f9ed302..6d14eb39cc2 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/anchorify.t +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/anchorify.t @@ -1,7 +1,7 @@ -# -*- perl -*- use strict; -use Pod::Html qw( anchorify ); -use Test::More tests => 1; +use warnings; +use Pod::Html::Util qw( anchorify relativize_url ); +use Test::More; my @filedata; { @@ -42,10 +42,24 @@ is_deeply( "Got expected POD heads" ); +{ + # adapted from 'installhtml' + my $file = '/home/username/tmp/installhtml/pod/perlipc'; + my $capture = 'NAME'; + my $expected_url = '/home/username/tmp/installhtml/pod/perlipc/NAME.html'; + my $expected_relativized_url = 'perlipc/NAME.html'; + my $url = "$file/@{[anchorify(qq($capture))]}.html" ; + is($url, $expected_url, "anchorify() returned expected value"); + my $relativized_url = relativize_url( $url, "$file.html" ); + is($relativized_url, $expected_relativized_url, "relativize_url() returned expected value"); +} + +done_testing; + __DATA__ =head1 NAME -anchorify - Test C +anchorify - Test C =head1 DESCRIPTION diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/cache.t b/gnu/usr.bin/perl/ext/Pod-Html/t/cache.t index 3a48a3cb232..54190d360ad 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/cache.t +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/cache.t @@ -1,23 +1,32 @@ -#!/usr/bin/perl -w # -*- perl -*- - BEGIN { - die "Run me from outside the t/ directory, please" unless -d 't'; + use File::Spec::Functions ':ALL'; + @INC = map { rel2abs($_) } + (qw| ./lib ./t/lib ../../lib |); } -# test the directory cache -# XXX test --flush and %Pages being loaded/used for cross references - use strict; +use warnings; +use Test::More; +use Testing qw( setup_testing_dir xconvert ); use Cwd; -use Pod::Html; -use Data::Dumper; -use Test::More tests => 10; +use Pod::Html::Util qw( + unixify +); + +my $debug = 0; +my $startdir = cwd(); +END { chdir($startdir) or die("Cannot change back to $startdir: $!"); } +my $args; -my $cwd = Pod::Html::_unixify(Cwd::cwd()); -my $infile = "t/cache.pod"; +my $tdir = setup_testing_dir( { + debug => $debug, +} ); + +my $cwd = unixify(Cwd::cwd()); +my $infile = catfile('t', 'cache.pod'); my $outfile = "cacheout.html"; my $cachefile = "pod2htmd.tmp"; -my $tcachefile = "t/pod2htmd.tmp"; +my $tcachefile = catfile('t', 'pod2htmd.tmp'); unlink $cachefile, $tcachefile; is(-f $cachefile, undef, "No cache file to start"); @@ -70,3 +79,5 @@ close $cache; 1 while unlink $tcachefile; is(-f $cachefile, undef, "No cache file to end"); is(-f $tcachefile, undef, "No cache file to end"); + +done_testing; diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/eol.t b/gnu/usr.bin/perl/ext/Pod-Html/t/eol.t index a159fb75519..c6bcea9746e 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/eol.t +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/eol.t @@ -1,6 +1,7 @@ -#!./perl -w - -use Test::More tests => 3; +use strict; +use warnings; +use Pod::Html; +use Test::More; my $podfile = "$$.pod"; my $infile = "$$.in"; @@ -34,15 +35,13 @@ crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf crlf __EOF__ close $pod or die $!; -use Pod::Html; - my $i = 0; foreach my $eol ("\r", "\n", "\r\n") { open $pod, '<', $podfile or die "$podfile: $!"; open my $in, '>', $infile or die "$infile: $!"; while (<$pod>) { - s/[\r\n]+/$eol/g; - print $in $_; + s/[\r\n]+/$eol/g; + print $in $_; } close $pod or die $!; close $in or die $!; @@ -69,3 +68,5 @@ is($cksum[1], $cksum[2], "LF vs CRLF"); END { 1 while unlink $podfile, $infile, @outfile, 'pod2htmd.tmp'; } + +done_testing; diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/feature.t b/gnu/usr.bin/perl/ext/Pod-Html/t/feature.t index 313928117fa..72aef3e8c6c 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/feature.t +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/feature.t @@ -1,27 +1,47 @@ -#!/usr/bin/perl -w # -*- perl -*- - BEGIN { - require "./t/pod2html-lib.pl"; + use File::Spec::Functions ':ALL'; + @INC = map { rel2abs($_) } + (qw| ./lib ./t/lib ../../lib |); } use strict; +use warnings; +use Test::More; +use Testing qw( setup_testing_dir xconvert ); use Cwd; -use File::Spec::Functions; -use Test::More tests => 1; + +my $debug = 0; +my $startdir = cwd(); +END { chdir($startdir) or die("Cannot change back to $startdir: $!"); } +my ($expect_raw, $args); +{ local $/; $expect_raw = ; } + +my $tdir = setup_testing_dir( { + debug => $debug, +} ); my $cwd = cwd(); -convert_n_test("feature", "misc pod-html features", - "--backlink", - "--css=style.css", - "--header", # no styling b/c of --ccs - "--htmldir=". catdir($cwd, 't'), - "--noindex", - "--podpath=t", - "--podroot=$cwd", - "--title=a title", - "--quiet", - ); +$args = { + podstub => "feature", + description => "misc pod-html features", + expect => $expect_raw, + p2h => { + backlink => 1, + css => 'style.css', + header => 1, # no styling b/c of --ccs + htmldir => catdir($cwd, 't'), + noindex => 1, + podpath => 't', + podroot => $cwd, + title => 'a title', + quiet => 1, + }, + debug => $debug, +}; +xconvert($args); + +done_testing; __DATA__ diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/feature2.t b/gnu/usr.bin/perl/ext/Pod-Html/t/feature2.t index ea335b06680..fcf8e831a2f 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/feature2.t +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/feature2.t @@ -1,28 +1,45 @@ -#!/usr/bin/perl -w # -*- perl -*- - - BEGIN { - require "./t/pod2html-lib.pl"; + use File::Spec::Functions ':ALL'; + @INC = map { rel2abs($_) } + (qw| ./lib ./t/lib ../../lib |); } use strict; +use warnings; +use Test::More; +use Testing qw( setup_testing_dir xconvert ); use Cwd; -use Test::More tests => 2; + +my $debug = 0; +my $startdir = cwd(); +END { chdir($startdir) or die("Cannot change back to $startdir: $!"); } +my ($expect_raw, $args); +{ local $/; $expect_raw = ; } + +my $tdir = setup_testing_dir( { + debug => $debug, +} ); my $cwd = cwd(); my $warn; $SIG{__WARN__} = sub { $warn .= $_[0] }; -convert_n_test("feature2", "misc pod-html features 2", - "--backlink", - "--header", - "--podpath=.", - "--podroot=$cwd", - "--norecurse", - "--verbose", - "--quiet", - ); +$args = { + podstub => "feature2", + description => "misc pod-html features 2", + expect => $expect_raw, + p2h => { + backlink => 1, + header => 1, + podpath => '.', + podroot => $cwd, + norecurse => 1, + verbose => 1, + }, + debug => $debug, +}; +xconvert($args); like($warn, qr( @@ -33,6 +50,8 @@ like($warn, )x, "misc pod-html --verbose warnings"); +done_testing; + __DATA__ diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir1.t b/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir1.t index 22632a18ba5..91856982672 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir1.t +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir1.t @@ -1,51 +1,61 @@ -#!/usr/bin/perl -w # -*- perl -*- - BEGIN { - require "./t/pod2html-lib.pl"; -} - -END { - rem_test_dir(); + use File::Spec::Functions ':ALL'; + @INC = map { rel2abs($_) } + (qw| ./lib ./t/lib ../../lib |); } use strict; +use warnings; +use Test::More; +use Testing qw( setup_testing_dir xconvert ); use Cwd; -use File::Spec::Functions; -use Test::More tests => 2; - -# XXX Separate tests that rely on test.lib from the others so they are the only -# ones skipped (instead of all of them). This applies to htmldir{1,3,5}.t, and -# crossref.t (as of 10/29/11). -SKIP: { - my $output = make_test_dir(); - skip "$output", 2 if $output; - - my ($v, $d) = splitpath(cwd(), 1); - my @dirs = splitdir($d); - shift @dirs if $dirs[0] eq ''; - my $relcwd = join '/', @dirs; - - my $data_pos = tell DATA; # to read twice - - - convert_n_test("htmldir1", "test --htmldir and --htmlroot 1a", - "--podpath=". File::Spec::Unix->catdir($relcwd, 't') . ":" - . File::Spec::Unix->catdir($relcwd, 'testdir/test.lib'), - "--podroot=". catpath($v, '/', ''), - "--htmldir=t", - "--quiet", - ); - - seek DATA, $data_pos, 0; # to read twice (expected output is the same) - - convert_n_test("htmldir1", "test --htmldir and --htmlroot 1b", - "--podpath=$relcwd", - "--podroot=". catpath($v, '/', ''), - "--htmldir=". catdir($relcwd, 't'), - "--htmlroot=/", - "--quiet", - ); -} + +my $debug = 0; +my $startdir = cwd(); +END { chdir($startdir) or die("Cannot change back to $startdir: $!"); } +my ($expect_raw, $args); +{ local $/; $expect_raw = ; } + +my $tdir = setup_testing_dir( { + debug => $debug, +} ); + +my ($v, $d) = splitpath(cwd(), 1); +my @dirs = splitdir($d); +shift @dirs if $dirs[0] eq ''; +my $relcwd = join '/', @dirs; + +$args = { + podstub => "htmldir1", + description => "test --htmldir and --htmlroot 1a", + expect => $expect_raw, + p2h => { + podpath => File::Spec::Unix->catdir($relcwd, 't') . ":" . + File::Spec::Unix->catdir($relcwd, 'corpus/test.lib'), + podroot => catpath($v, '/', ''), + htmldir => 't', + quiet => 1, + }, + debug => $debug, +}; +xconvert($args); + +$args = { + podstub => "htmldir1", + description => "test --htmldir and --htmlroot 1b", + expect => $expect_raw, + p2h => { + podpath => $relcwd, + podroot => catpath($v, '/', ''), + htmldir => catdir($relcwd, 't'), + htmlroot => '/', + quiet => 1, + }, + debug => $debug, +}; +xconvert($args); + +done_testing; __DATA__ @@ -72,11 +82,11 @@ __DATA__

    LINKS

    -
      Verbatim B<means> verbatim.
    +
    Verbatim B<means> verbatim.

    Normal text, a link to nowhere,

    -

    a link to var-copy,

    +

    a link to var-copy,

    htmlescp,

    diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir2.t b/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir2.t index 36efdb7ad8a..143c1ab96e6 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir2.t +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir2.t @@ -1,38 +1,66 @@ -#!/usr/bin/perl -w # -*- perl -*- - BEGIN { - require "./t/pod2html-lib.pl"; + use File::Spec::Functions ':ALL'; + @INC = map { rel2abs($_) } + (qw| ./lib ./t/lib ../../lib |); } use strict; +use warnings; +use Test::More; +use Testing qw( setup_testing_dir xconvert ); use Cwd; -use Test::More tests => 3; + +my $debug = 0; +my $startdir = cwd(); +END { chdir($startdir) or die("Cannot change back to $startdir: $!"); } +my ($expect_raw, $args); +{ local $/; $expect_raw = ; } + +my $tdir = setup_testing_dir( { + debug => $debug, +} ); + +$args = { + podstub => "htmldir2", + description => "test --htmldir and --htmlroot 2a", + expect => $expect_raw, + p2h => { + podpath => 't', + htmldir => 't', + quiet => 1, + }, + debug => $debug, +}; +xconvert($args); + +$args = { + podstub => "htmldir2", + description => "test --htmldir and --htmlroot 2b", + expect => $expect_raw, + p2h => { + podpath => 't', + quiet => 1, + }, + debug => $debug, +}; +xconvert($args); my $cwd = cwd(); -my $data_pos = tell DATA; # to read twice - -convert_n_test("htmldir2", "test --htmldir and --htmlroot 2a", - "--podpath=t", - "--htmldir=t", - "--quiet", -); - -seek DATA, $data_pos, 0; # to read twice (expected output is the same) - -convert_n_test("htmldir2", "test --htmldir and --htmlroot 2b", - "--podpath=t", - "--quiet", -); - -seek DATA, $data_pos, 0; # to read thrice (expected output is the same) - -# this test makes sure paths are absolute unless --htmldir is specified -convert_n_test("htmldir2", "test --htmldir and --htmlroot 2c", - "--podpath=t", - "--podroot=$cwd", - "--norecurse", # testing --norecurse, too - "--quiet", -); +$args = { + podstub => "htmldir2", + description => "test --htmldir and --htmlroot 2c", + expect => $expect_raw, + p2h => { + podpath => 't', + podroot => $cwd, + norecurse => 1, # testing --norecurse, too + quiet => 1, + }, + debug => $debug, +}; +xconvert($args); + +done_testing; __DATA__ diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir3.t b/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir3.t index 3bcf4d09c96..e29a4f17693 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir3.t +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir3.t @@ -1,47 +1,79 @@ -#!/usr/bin/perl -w # -*- perl -*- - BEGIN { - require "./t/pod2html-lib.pl"; -} - -END { - rem_test_dir(); + use File::Spec::Functions ':ALL'; + @INC = map { rel2abs($_) } + (qw| ./lib ./t/lib ../../lib |); } use strict; +use warnings; +use Test::More; +use Testing qw( setup_testing_dir xconvert ); use Cwd; -use File::Spec::Functions; -use Test::More tests => 2; - -SKIP: { - my $output = make_test_dir(); - skip "$output", 2 if $output; - - my $cwd = cwd(); - my ($v, $d) = splitpath($cwd, 1); - my @dirs = splitdir($d); - shift @dirs if $dirs[0] eq ''; - my $relcwd = join '/', @dirs; - - my $data_pos = tell DATA; # to read twice - - convert_n_test("htmldir3", "test --htmldir and --htmlroot 3a", - "--podpath=$relcwd", - "--podroot=". catpath($v, '/', ''), - "--htmldir=". catdir($cwd, 't', ''), # test removal trailing slash, - "--quiet", - ); - - seek DATA, $data_pos, 0; # to read twice (expected output is the same) - - convert_n_test("htmldir3", "test --htmldir and --htmlroot 3b", - "--podpath=". catdir($relcwd, 't'), - "--podroot=". catpath($v, '/', ''), - "--htmldir=t", - "--outfile=t/htmldir3.html", - "--quiet", - ); -} + +my $debug = 0; +my $startdir = cwd(); +END { chdir($startdir) or die("Cannot change back to $startdir: $!"); } +my ($expect_raw, $args); +{ local $/; $expect_raw = ; } + +my $tdir = setup_testing_dir( { + debug => $debug, +} ); + +my $cwd = cwd(); +my ($v, $d) = splitpath($cwd, 1); +my @dirs = splitdir($d); +shift @dirs if $dirs[0] eq ''; +my $relcwd = join '/', @dirs; + +$args = { + podstub => "htmldir3", + description => "test --htmldir and --htmlroot 3c: as expected pod file not yet locatable either under podroot or in cache: GH 12271", + expect => $expect_raw, + expect_fail => 1, + p2h => { + podpath => catdir($relcwd, 't'), + podroot => catpath($v, '/', ''), + htmldir => 't', + outfile => 't/htmldir3.html', + quiet => 1, + }, + debug => $debug, +}; +$args->{core} = 1 if $ENV{PERL_CORE}; +xconvert($args); + +$args = { + podstub => "htmldir3", + description => "test --htmldir and --htmlroot 3a", + expect => $expect_raw, + p2h => { + podpath => $relcwd, + podroot => catpath($v, '/', ''), + htmldir => catdir($cwd, 't', ''), # test removal trailing slash, + quiet => 1, + }, + debug => $debug, +}; +xconvert($args); + +$args = { + podstub => "htmldir3", + description => "test --htmldir and --htmlroot 3b: as expected pod file not yet locatable either under podroot or in cache: GH 12271", + expect => $expect_raw, + expect_fail => 1, + p2h => { + podpath => catdir($relcwd, 't'), + podroot => catpath($v, '/', ''), + htmldir => 't', + outfile => 't/htmldir3.html', + quiet => 1, + }, + debug => $debug, +}; +xconvert($args); + +done_testing; __DATA__ @@ -70,7 +102,7 @@ __DATA__

    Normal text, a link to nowhere,

    -

    a link to var-copy,

    +

    a link to var-copy,

    htmlescp,

    diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir4.t b/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir4.t index 14435fa8d21..52d9d7d4477 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir4.t +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir4.t @@ -1,33 +1,57 @@ -#!/usr/bin/perl -w # -*- perl -*- - BEGIN { - require "./t/pod2html-lib.pl"; + use File::Spec::Functions ':ALL'; + @INC = map { rel2abs($_) } + (qw| ./lib ./t/lib ../../lib |); } use strict; +use warnings; +use Test::More; +use Testing qw( setup_testing_dir xconvert ); use Cwd; -use File::Spec::Functions ':ALL'; -use Test::More tests => 2; + +my $debug = 0; +my $startdir = cwd(); +END { chdir($startdir) or die("Cannot change back to $startdir: $!"); } +my ($expect_raw, $args); +{ local $/; $expect_raw = ; } + +my $tdir = setup_testing_dir( { + debug => $debug, +} ); my $cwd = cwd(); -my $data_pos = tell DATA; # to read twice - -convert_n_test("htmldir4", "test --htmldir and --htmlroot 4a", - "--podpath=t", - "--htmldir=t", - "--outfile=". catfile('t', 'htmldir4.html'), - "--quiet", -); - -seek DATA, $data_pos, 0; # to read twice (expected output is the same) - -convert_n_test("htmldir4", "test --htmldir and --htmlroot 4b", - "--podpath=t", - "--podroot=$cwd", - "--htmldir=". catdir($cwd, 't'), - "--norecurse", - "--quiet", -); + +$args = { + podstub => "htmldir4", + description => "test --htmldir and --htmlroot 4a", + expect => $expect_raw, + p2h => { + podpath => 't', + htmldir => 't', + outfile => catfile('t', 'htmldir4.html'), + quiet => 1, + }, + debug => $debug, +}; +xconvert($args); + +$args = { + podstub => "htmldir4", + description => "test --htmldir and --htmlroot 4b", + expect => $expect_raw, + p2h => { + podpath => 't', + podroot => $cwd, + htmldir => catdir($cwd, 't'), + norecurse => 1, + quiet => 1, + }, + debug => $debug, +}; +xconvert($args); + +done_testing; __DATA__ diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir5.t b/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir5.t index 3f53d3ffba1..bac4977fd5d 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir5.t +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/htmldir5.t @@ -1,36 +1,46 @@ -#!/usr/bin/perl -w # -*- perl -*- - BEGIN { - require "./t/pod2html-lib.pl"; -} - -END { - rem_test_dir(); + use File::Spec::Functions ':ALL'; + @INC = map { rel2abs($_) } + (qw| ./lib ./t/lib ../../lib |); } use strict; +use warnings; +use Test::More; +use Testing qw( setup_testing_dir xconvert ); use Cwd; -use File::Spec::Functions; -use Test::More tests => 1; - -SKIP: { - my $output = make_test_dir(); - skip "$output", 1 if $output; - - - my $cwd = catdir cwd(); # catdir converts path separators to that of the OS - # running the test - # XXX but why don't the other tests complain about - # this? - - convert_n_test("htmldir5", "test --htmldir and --htmlroot 5", - "--podpath=t:testdir/test.lib", - "--podroot=$cwd", - "--htmldir=$cwd", - "--htmlroot=/", - "--quiet", - ); -} + +my $debug = 0; +my $startdir = cwd(); +END { chdir($startdir) or die("Cannot change back to $startdir: $!"); } +my ($expect_raw, $args); +{ local $/; $expect_raw = ; } + +my $tdir = setup_testing_dir( { + debug => $debug, +} ); + +my $cwd = catdir cwd(); # catdir converts path separators to that of the OS + # running the test + # XXX but why don't the other tests complain about + # this? + +$args = { + podstub => "htmldir5", + description => "test --htmldir and --htmlroot 5", + expect => $expect_raw, + p2h => { + podpath => 't:corpus/test.lib', + podroot => $cwd, + htmldir => $cwd, + htmlroot => '/', + quiet => 1, + }, + debug => $debug, +}; +xconvert($args); + +done_testing; __DATA__ @@ -59,7 +69,7 @@ __DATA__

    Normal text, a link to nowhere,

    -

    a link to var-copy,

    +

    a link to var-copy,

    htmlescp,

    diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/htmlescp.pod b/gnu/usr.bin/perl/ext/Pod-Html/t/htmlescp.pod index c901314c761..a432c3dcbad 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/htmlescp.pod +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/htmlescp.pod @@ -1,6 +1,6 @@ =head1 NAME -Escape Sequences Test +Escape Sequences Test: Recalling the Glory "<&&&>" of Ampersands =head1 DESCRIPTION diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/htmlescp.t b/gnu/usr.bin/perl/ext/Pod-Html/t/htmlescp.t index fd5207ab223..049a380f091 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/htmlescp.t +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/htmlescp.t @@ -1,20 +1,42 @@ -#!/usr/bin/perl -w # -*- perl -*- - BEGIN { - require "./t/pod2html-lib.pl"; + use File::Spec::Functions ':ALL'; + @INC = map { rel2abs($_) } + (qw| ./lib ./t/lib ../../lib |); } use strict; -use Test::More tests => 1; +use warnings; +use Test::More; +use Testing qw( setup_testing_dir xconvert ); +use Cwd; + +my $debug = 0; +my $startdir = cwd(); +END { chdir($startdir) or die("Cannot change back to $startdir: $!"); } +my ($expect_raw, $args); +{ local $/; $expect_raw = ; } + +my $tdir = setup_testing_dir( { + debug => $debug, +} ); + +$args = { + podstub => "htmlescp", + description => "html escape", + expect => $expect_raw, + debug => $debug, +}; + +xconvert($args); -convert_n_test("htmlescp", "html escape"); +done_testing; __DATA__ -Escape Sequences Test +Escape Sequences Test: Recalling the Glory "<&&&>" of Ampersands @@ -30,7 +52,7 @@ __DATA__

    NAME

    -

    Escape Sequences Test

    +

    Escape Sequences Test: Recalling the Glory "<&&&>" of Ampersands

    DESCRIPTION

    diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/htmllink.t b/gnu/usr.bin/perl/ext/Pod-Html/t/htmllink.t index 033c93f16f9..c0a9a324881 100644 --- a/gnu/usr.bin/perl/ext/Pod-Html/t/htmllink.t +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/htmllink.t @@ -1,13 +1,35 @@ -#!/usr/bin/perl -w # -*- perl -*- - BEGIN { - require "./t/pod2html-lib.pl"; + use File::Spec::Functions ':ALL'; + @INC = map { rel2abs($_) } + (qw| ./lib ./t/lib ../../lib |); } use strict; -use Test::More tests => 1; - -convert_n_test("htmllink", "html links"); +use warnings; +use Test::More; +use Testing qw( setup_testing_dir xconvert ); +use Cwd; + +my $debug = 0; +my $startdir = cwd(); +END { chdir($startdir) or die("Cannot change back to $startdir: $!"); } +my ($expect_raw, $args); +{ local $/; $expect_raw = ; } + +my $tdir = setup_testing_dir( { + debug => $debug, +} ); + +$args = { + podstub => "htmllink", + description => "html links", + expect => $expect_raw, + debug => 1, +}; + +xconvert($args); + +done_testing; __DATA__ diff --git a/gnu/usr.bin/perl/ext/Pod-Html/t/lib/Testing.pm b/gnu/usr.bin/perl/ext/Pod-Html/t/lib/Testing.pm new file mode 100644 index 00000000000..a30f02af1fc --- /dev/null +++ b/gnu/usr.bin/perl/ext/Pod-Html/t/lib/Testing.pm @@ -0,0 +1,698 @@ +package Testing; +use 5.10.0; +use warnings; +use Exporter 'import'; +our $VERSION = 1.33; # Let's keep this same as lib/Pod/Html.pm +$VERSION = eval $VERSION; +our @EXPORT_OK = qw( + setup_testing_dir + xconvert + record_state_of_cache +); +use Cwd; +use Pod::Html; +use Config; +use File::Basename; +use File::Copy; +use File::Path ( qw| make_path | ); +use File::Spec::Functions ':ALL'; +use File::Temp ( qw| tempdir | ); +use Data::Dumper;$Data::Dumper::Sortkeys=1; +use Pod::Html::Util qw( + unixify +); + +*ok = \&Test::More::ok; +*is = \&Test::More::is; + +our @no_arg_switches = ( qw| + flush recurse norecurse + quiet noquiet verbose noverbose + index noindex backlink nobacklink + header noheader poderrors nopoderrors +| ); + +=head1 NAME + +Testing - Helper functions for testing Pod-Html + +=head1 SYNOPSIS + + use Testing qw( setup_testing_dir xconvert ); + + my $tdir = setup_testing_dir( { + debug => $debug, + } ); + + $args = { + podstub => "htmldir1", + description => "test --htmldir and --htmlroot 1a", + expect => $expect_raw, + p2h => { + podpath => File::Spec::Unix->catdir($relcwd, 't') . ":" . + File::Spec::Unix->catdir($relcwd, 'corpus/test.lib'), + podroot => catpath($v, '/', ''), + htmldir => 't', + quiet => 1, + }, + debug => $debug, + }; + xconvert($args); + +=head1 DESCRIPTION + +This module exports, upon request only, 2 subroutines which are used in most +of the files in the core distribution test suite for Pod-HTML +(F). In the future we may add additional subroutines, +particularly to better diagnose problems with Pod-Html. + +=head2 Pod-Html's Testing Structure + +As of version 1.26 of this module (early 2021), the testing structure consists +of 16 F<.pod> files and 18 F<.t> files located in two subdirectories, +F and F. Let's analyze these by directory. + +=head3 Files in F + +There are currently 2 F<.pod> files in F both of which are old +versions of F files selected to give some complexity to the test +suite. Since we don't actually attempt to make HTML out of their POD, we +don't need to discuss them further. + +=head3 Files in F + +There are currently 14 F<.pod> files and 18 F<.t> files in F. Both of +these numbers may change in the future. + +Currently there are 2 F files (F and F) which +exercise certain functionality of F but which do not require +F files as data input. These files do not make use of the +subroutines exported by this module. We may add more test files like this in +the future to ensure high test coverage, but don't need to discuss them +further here. + +The remaining 16 F test programs make use of the testing subroutines +exported by this module. Most, but not all, of these test programs make use +of the F files. Each such test program makes use of only 1 +F file at a time, though there are several cases where several, +similarly named, test programs make use of the same F file for data +input. For example, + + t/crossref.t + t/crossref2.t + t/crossref3.t + +all make use of + + t/crossref.pod + +Each F file consists solely of simple documentation in POD format. + +=head3 High-level description of programs which use F<.pod> files as input + +Each of the F programs which makes use of a given F file +slurps the text of a single such F file into memory. The test +program holds text in a C handle which serves as a B